mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
merge release-6.2.1
Release 6.2.1
This commit is contained in:
17
.github/workflows/release.yml
vendored
17
.github/workflows/release.yml
vendored
@ -61,4 +61,21 @@ jobs:
|
|||||||
git add .
|
git add .
|
||||||
git commit -m "chore(): update package lock files"
|
git commit -m "chore(): update package lock files"
|
||||||
git push
|
git push
|
||||||
|
# Purge the JSDeliver CDN cache so
|
||||||
|
# component playgrounds always load
|
||||||
|
# the latest version of Ionic.
|
||||||
|
- name: Purge JSDelivr Cache
|
||||||
|
run: |
|
||||||
|
curl -X POST \
|
||||||
|
https://purge.jsdelivr.net/ \
|
||||||
|
-H 'cache-control: no-cache' \
|
||||||
|
-H 'content-type: application/json' \
|
||||||
|
-d '{
|
||||||
|
"path": [
|
||||||
|
"/npm/@ionic/core@6/dist/ionic/ionic.esm.js",
|
||||||
|
"/npm/@ionic/core@latest/dist/ionic/ionic.esm.js",
|
||||||
|
"/npm/@ionic/core@6/css/ionic.bundle.css,
|
||||||
|
"/npm/@ionic/core@latest/css/ionic.bundle.css
|
||||||
|
]}'
|
||||||
|
|
||||||
|
|
||||||
|
14
CHANGELOG.md
14
CHANGELOG.md
@ -3,6 +3,20 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [6.2.1](https://github.com/ionic-team/ionic-framework/compare/v6.2.0...v6.2.1) (2022-08-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **datetime:** display time in user's timezone after selection ([#25694](https://github.com/ionic-team/ionic-framework/issues/25694)) ([11c69c8](https://github.com/ionic-team/ionic-framework/commit/11c69c8df50b75440c9e876b4d99d469d16e144f)), closes [#25693](https://github.com/ionic-team/ionic-framework/issues/25693)
|
||||||
|
* **datetime:** selecting today with multiple date select now works ([#25699](https://github.com/ionic-team/ionic-framework/issues/25699)) ([86b7000](https://github.com/ionic-team/ionic-framework/commit/86b7000bcd1b4519e8c20907050e15ba7c99bab0))
|
||||||
|
* **nav:** exclude nav from custom dialog ([#25689](https://github.com/ionic-team/ionic-framework/issues/25689)) ([d1e517b](https://github.com/ionic-team/ionic-framework/commit/d1e517bfef03b822dfa7651681013277762eda08)), closes [#25677](https://github.com/ionic-team/ionic-framework/issues/25677) [#25688](https://github.com/ionic-team/ionic-framework/issues/25688)
|
||||||
|
* **react:** IonNav apply properties to page components ([#25603](https://github.com/ionic-team/ionic-framework/issues/25603)) ([61e4ffe](https://github.com/ionic-team/ionic-framework/commit/61e4ffe47f73034808b65ee37342f540ee5a6a97)), closes [#25602](https://github.com/ionic-team/ionic-framework/issues/25602)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.2.0](https://github.com/ionic-team/ionic-framework/compare/v6.1.15...v6.2.0) (2022-07-27)
|
# [6.2.0](https://github.com/ionic-team/ionic-framework/compare/v6.1.15...v6.2.0) (2022-07-27)
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [6.2.1](https://github.com/ionic-team/ionic/compare/v6.2.0...v6.2.1) (2022-08-03)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ionic/angular
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.2.0](https://github.com/ionic-team/ionic/compare/v6.1.15...v6.2.0) (2022-07-27)
|
# [6.2.0](https://github.com/ionic-team/ionic/compare/v6.1.15...v6.2.0) (2022-07-27)
|
||||||
|
|
||||||
|
|
||||||
|
18
angular/package-lock.json
generated
18
angular/package-lock.json
generated
@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/angular",
|
"name": "@ionic/angular",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@ionic/angular",
|
"name": "@ionic/angular",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ionic/core": "^6.2.0",
|
"@ionic/core": "^6.2.1",
|
||||||
"jsonc-parser": "^3.0.0",
|
"jsonc-parser": "^3.0.0",
|
||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
},
|
},
|
||||||
@ -1023,9 +1023,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@ionic/core": {
|
"node_modules/@ionic/core": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.1.tgz",
|
||||||
"integrity": "sha512-3qUNsVcSAdrjhIhPr5M2RRnh+1xuc9RFaxoeUgI9xQ0YjTmn2FWiH4urDCXuE/rZAwnvHF4X17P0L2EqCPSfWA==",
|
"integrity": "sha512-bWlE2ZMR7tMyqcBhncc21zZPMZfCEoyGQP2bdu/ft1uov0ozw/wfETygd07C+0DOkbU6x1OYncIvo+1bzK4alA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@stencil/core": "^2.16.0",
|
"@stencil/core": "^2.16.0",
|
||||||
"ionicons": "^6.0.2",
|
"ionicons": "^6.0.2",
|
||||||
@ -7939,9 +7939,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@ionic/core": {
|
"@ionic/core": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.1.tgz",
|
||||||
"integrity": "sha512-3qUNsVcSAdrjhIhPr5M2RRnh+1xuc9RFaxoeUgI9xQ0YjTmn2FWiH4urDCXuE/rZAwnvHF4X17P0L2EqCPSfWA==",
|
"integrity": "sha512-bWlE2ZMR7tMyqcBhncc21zZPMZfCEoyGQP2bdu/ft1uov0ozw/wfETygd07C+0DOkbU6x1OYncIvo+1bzK4alA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@stencil/core": "^2.16.0",
|
"@stencil/core": "^2.16.0",
|
||||||
"ionicons": "^6.0.2",
|
"ionicons": "^6.0.2",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/angular",
|
"name": "@ionic/angular",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"description": "Angular specific wrappers for @ionic/core",
|
"description": "Angular specific wrappers for @ionic/core",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ionic",
|
"ionic",
|
||||||
@ -44,7 +44,7 @@
|
|||||||
"validate": "npm i && npm run lint && npm run test && npm run build"
|
"validate": "npm i && npm run lint && npm run test && npm run build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ionic/core": "^6.2.0",
|
"@ionic/core": "^6.2.1",
|
||||||
"jsonc-parser": "^3.0.0",
|
"jsonc-parser": "^3.0.0",
|
||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
},
|
},
|
||||||
|
@ -3,6 +3,19 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [6.2.1](https://github.com/ionic-team/ionic/compare/v6.2.0...v6.2.1) (2022-08-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **datetime:** display time in user's timezone after selection ([#25694](https://github.com/ionic-team/ionic/issues/25694)) ([11c69c8](https://github.com/ionic-team/ionic/commit/11c69c8df50b75440c9e876b4d99d469d16e144f)), closes [#25693](https://github.com/ionic-team/ionic/issues/25693)
|
||||||
|
* **datetime:** selecting today with multiple date select now works ([#25699](https://github.com/ionic-team/ionic/issues/25699)) ([86b7000](https://github.com/ionic-team/ionic/commit/86b7000bcd1b4519e8c20907050e15ba7c99bab0))
|
||||||
|
* **nav:** exclude nav from custom dialog ([#25689](https://github.com/ionic-team/ionic/issues/25689)) ([d1e517b](https://github.com/ionic-team/ionic/commit/d1e517bfef03b822dfa7651681013277762eda08)), closes [#25677](https://github.com/ionic-team/ionic/issues/25677) [#25688](https://github.com/ionic-team/ionic/issues/25688)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.2.0 Chromium](https://github.com/ionic-team/ionic-framework/compare/v6.1.15...v6.2.0) (2022-07-27)
|
# [6.2.0 Chromium](https://github.com/ionic-team/ionic-framework/compare/v6.1.15...v6.2.0) (2022-07-27)
|
||||||
|
|
||||||
|
|
||||||
|
4
core/package-lock.json
generated
4
core/package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/core",
|
"name": "@ionic/core",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@ionic/core",
|
"name": "@ionic/core",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@stencil/core": "^2.16.0",
|
"@stencil/core": "^2.16.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/core",
|
"name": "@ionic/core",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"description": "Base components for Ionic",
|
"description": "Base components for Ionic",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ionic",
|
"ionic",
|
||||||
|
@ -1929,7 +1929,7 @@ export class Datetime implements ComponentInterface {
|
|||||||
day,
|
day,
|
||||||
year,
|
year,
|
||||||
},
|
},
|
||||||
isActive
|
isActive && highlightActiveParts
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.setActiveParts({
|
this.setActiveParts({
|
||||||
|
@ -5,6 +5,7 @@ import {
|
|||||||
addTimePadding,
|
addTimePadding,
|
||||||
getMonthAndYear,
|
getMonthAndYear,
|
||||||
getLocalizedDayPeriod,
|
getLocalizedDayPeriod,
|
||||||
|
getLocalizedTime,
|
||||||
} from '../utils/format';
|
} from '../utils/format';
|
||||||
|
|
||||||
describe('generateDayAriaLabel()', () => {
|
describe('generateDayAriaLabel()', () => {
|
||||||
@ -99,3 +100,59 @@ describe('getLocalizedDayPeriod', () => {
|
|||||||
expect(getLocalizedDayPeriod('en-US', 'pm'));
|
expect(getLocalizedDayPeriod('en-US', 'pm'));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('getLocalizedTime', () => {
|
||||||
|
describe('with a timezone offset', () => {
|
||||||
|
it('should ignore the offset and localize the time to PM', () => {
|
||||||
|
const datetimeParts = {
|
||||||
|
day: 1,
|
||||||
|
month: 1,
|
||||||
|
year: 2022,
|
||||||
|
hour: 13,
|
||||||
|
minute: 40,
|
||||||
|
tzOffset: -240,
|
||||||
|
};
|
||||||
|
|
||||||
|
expect(getLocalizedTime('en-US', datetimeParts, false)).toEqual('1:40 PM');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should ignore the offset and localize the time to AM', () => {
|
||||||
|
const datetimeParts = {
|
||||||
|
day: 1,
|
||||||
|
month: 1,
|
||||||
|
year: 2022,
|
||||||
|
hour: 9,
|
||||||
|
minute: 40,
|
||||||
|
tzOffset: -240,
|
||||||
|
};
|
||||||
|
|
||||||
|
expect(getLocalizedTime('en-US', datetimeParts, false)).toEqual('9:40 AM');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should localize the time to PM', () => {
|
||||||
|
const datetimeParts = {
|
||||||
|
day: 1,
|
||||||
|
month: 1,
|
||||||
|
year: 2022,
|
||||||
|
hour: 13,
|
||||||
|
minute: 40,
|
||||||
|
tzOffset: 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
expect(getLocalizedTime('en-US', datetimeParts, false)).toEqual('1:40 PM');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should localize the time to AM', () => {
|
||||||
|
const datetimeParts = {
|
||||||
|
day: 1,
|
||||||
|
month: 1,
|
||||||
|
year: 2022,
|
||||||
|
hour: 9,
|
||||||
|
minute: 40,
|
||||||
|
tzOffset: 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
expect(getLocalizedTime('en-US', datetimeParts, false)).toEqual('9:40 AM');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
@ -20,7 +20,15 @@ export const getLocalizedTime = (locale: string, refParts: DatetimeParts, use24H
|
|||||||
minute: 'numeric',
|
minute: 'numeric',
|
||||||
timeZone: 'UTC',
|
timeZone: 'UTC',
|
||||||
hour12: !use24Hour,
|
hour12: !use24Hour,
|
||||||
}).format(new Date(convertDataToISO(refParts)));
|
}).format(
|
||||||
|
new Date(
|
||||||
|
convertDataToISO({
|
||||||
|
...refParts,
|
||||||
|
// TODO: FW-1831 will remove the need to manually set the tzOffset to undefined
|
||||||
|
tzOffset: undefined,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -170,7 +170,7 @@ html.ios ion-modal.modal-card .ion-page {
|
|||||||
* These changes allow certain dimension values
|
* These changes allow certain dimension values
|
||||||
* such as fit-content to work correctly.
|
* such as fit-content to work correctly.
|
||||||
*/
|
*/
|
||||||
ion-modal .ion-page {
|
ion-modal .ion-page:not(ion-nav .ion-page) {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
contain: layout style;
|
contain: layout style;
|
||||||
|
@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [6.2.1](https://github.com/ionic-team/ionic-docs/compare/v6.2.0...v6.2.1) (2022-08-03)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ionic/docs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.2.0](https://github.com/ionic-team/ionic-docs/compare/v6.1.15...v6.2.0) (2022-07-27)
|
# [6.2.0](https://github.com/ionic-team/ionic-docs/compare/v6.1.15...v6.2.0) (2022-07-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ionic/docs
|
**Note:** Version bump only for package @ionic/docs
|
||||||
|
4
docs/package-lock.json
generated
4
docs/package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/docs",
|
"name": "@ionic/docs",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@ionic/docs",
|
"name": "@ionic/docs",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/docs",
|
"name": "@ionic/docs",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"description": "Pre-packaged API documentation for the Ionic docs.",
|
"description": "Pre-packaged API documentation for the Ionic docs.",
|
||||||
"main": "core.json",
|
"main": "core.json",
|
||||||
"types": "core.d.ts",
|
"types": "core.d.ts",
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
"angular",
|
"angular",
|
||||||
"packages/*"
|
"packages/*"
|
||||||
],
|
],
|
||||||
"version": "6.2.0"
|
"version": "6.2.1"
|
||||||
}
|
}
|
||||||
|
8757
package-lock.json
generated
8757
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"description": "Ionic mono-repo root package.json, used mainly to execute build scripts. This package is not published to npm.",
|
"description": "Ionic mono-repo root package.json, used mainly to execute build scripts. This package is not published to npm.",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"lerna": "^4.0.0",
|
"lerna": "^5.3.0",
|
||||||
"semver": "^5.5.0"
|
"semver": "^5.5.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [6.2.1](https://github.com/ionic-team/ionic/compare/v6.2.0...v6.2.1) (2022-08-03)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ionic/angular-server
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.2.0](https://github.com/ionic-team/ionic/compare/v6.1.15...v6.2.0) (2022-07-27)
|
# [6.2.0](https://github.com/ionic-team/ionic/compare/v6.1.15...v6.2.0) (2022-07-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ionic/angular-server
|
**Note:** Version bump only for package @ionic/angular-server
|
||||||
|
18
packages/angular-server/package-lock.json
generated
18
packages/angular-server/package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/angular-server",
|
"name": "@ionic/angular-server",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@ionic/angular-server",
|
"name": "@ionic/angular-server",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-eslint/eslint-plugin": "^12.6.1",
|
"@angular-eslint/eslint-plugin": "^12.6.1",
|
||||||
@ -18,7 +18,7 @@
|
|||||||
"@angular/platform-browser": "^12.0.0",
|
"@angular/platform-browser": "^12.0.0",
|
||||||
"@angular/platform-browser-dynamic": "^12.2.10",
|
"@angular/platform-browser-dynamic": "^12.2.10",
|
||||||
"@angular/platform-server": "^12.0.0",
|
"@angular/platform-server": "^12.0.0",
|
||||||
"@ionic/core": "^6.2.0",
|
"@ionic/core": "^6.2.1",
|
||||||
"@ionic/eslint-config": "^0.3.0",
|
"@ionic/eslint-config": "^0.3.0",
|
||||||
"@ionic/prettier-config": "^2.0.0",
|
"@ionic/prettier-config": "^2.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.2.0",
|
"@typescript-eslint/eslint-plugin": "^5.2.0",
|
||||||
@ -786,9 +786,9 @@
|
|||||||
"license": "BSD-3-Clause"
|
"license": "BSD-3-Clause"
|
||||||
},
|
},
|
||||||
"node_modules/@ionic/core": {
|
"node_modules/@ionic/core": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.1.tgz",
|
||||||
"integrity": "sha512-3qUNsVcSAdrjhIhPr5M2RRnh+1xuc9RFaxoeUgI9xQ0YjTmn2FWiH4urDCXuE/rZAwnvHF4X17P0L2EqCPSfWA==",
|
"integrity": "sha512-bWlE2ZMR7tMyqcBhncc21zZPMZfCEoyGQP2bdu/ft1uov0ozw/wfETygd07C+0DOkbU6x1OYncIvo+1bzK4alA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@stencil/core": "^2.16.0",
|
"@stencil/core": "^2.16.0",
|
||||||
@ -7103,9 +7103,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@ionic/core": {
|
"@ionic/core": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.1.tgz",
|
||||||
"integrity": "sha512-3qUNsVcSAdrjhIhPr5M2RRnh+1xuc9RFaxoeUgI9xQ0YjTmn2FWiH4urDCXuE/rZAwnvHF4X17P0L2EqCPSfWA==",
|
"integrity": "sha512-bWlE2ZMR7tMyqcBhncc21zZPMZfCEoyGQP2bdu/ft1uov0ozw/wfETygd07C+0DOkbU6x1OYncIvo+1bzK4alA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@stencil/core": "^2.16.0",
|
"@stencil/core": "^2.16.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/angular-server",
|
"name": "@ionic/angular-server",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"description": "Angular SSR Module for Ionic",
|
"description": "Angular SSR Module for Ionic",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ionic",
|
"ionic",
|
||||||
@ -56,7 +56,7 @@
|
|||||||
"@angular/platform-browser": "^12.0.0",
|
"@angular/platform-browser": "^12.0.0",
|
||||||
"@angular/platform-browser-dynamic": "^12.2.10",
|
"@angular/platform-browser-dynamic": "^12.2.10",
|
||||||
"@angular/platform-server": "^12.0.0",
|
"@angular/platform-server": "^12.0.0",
|
||||||
"@ionic/core": "^6.2.0",
|
"@ionic/core": "^6.2.1",
|
||||||
"@ionic/eslint-config": "^0.3.0",
|
"@ionic/eslint-config": "^0.3.0",
|
||||||
"@ionic/prettier-config": "^2.0.0",
|
"@ionic/prettier-config": "^2.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.2.0",
|
"@typescript-eslint/eslint-plugin": "^5.2.0",
|
||||||
|
@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [6.2.1](https://github.com/ionic-team/ionic/compare/v6.2.0...v6.2.1) (2022-08-03)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ionic/react-router
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.2.0](https://github.com/ionic-team/ionic/compare/v6.1.15...v6.2.0) (2022-07-27)
|
# [6.2.0](https://github.com/ionic-team/ionic/compare/v6.1.15...v6.2.0) (2022-07-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ionic/react-router
|
**Note:** Version bump only for package @ionic/react-router
|
||||||
|
46
packages/react-router/package-lock.json
generated
46
packages/react-router/package-lock.json
generated
@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/react-router",
|
"name": "@ionic/react-router",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@ionic/react-router",
|
"name": "@ionic/react-router",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ionic/react": "^6.2.0",
|
"@ionic/react": "^6.2.1",
|
||||||
"tslib": "*"
|
"tslib": "*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -147,9 +147,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ionic/core": {
|
"node_modules/@ionic/core": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.1.tgz",
|
||||||
"integrity": "sha512-3qUNsVcSAdrjhIhPr5M2RRnh+1xuc9RFaxoeUgI9xQ0YjTmn2FWiH4urDCXuE/rZAwnvHF4X17P0L2EqCPSfWA==",
|
"integrity": "sha512-bWlE2ZMR7tMyqcBhncc21zZPMZfCEoyGQP2bdu/ft1uov0ozw/wfETygd07C+0DOkbU6x1OYncIvo+1bzK4alA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@stencil/core": "^2.16.0",
|
"@stencil/core": "^2.16.0",
|
||||||
"ionicons": "^6.0.2",
|
"ionicons": "^6.0.2",
|
||||||
@ -157,11 +157,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ionic/react": {
|
"node_modules/@ionic/react": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-6.2.1.tgz",
|
||||||
"integrity": "sha512-6RJrMpivslHszazxDV7Shmqbmgi7ki0RsqTklAXKKk40+Gglfx/fm+9H7PRJMGJ17ueGRFKN4ZWLahnzl6Y6ag==",
|
"integrity": "sha512-zHqoGeEm4QwzCijBvcYZQifrCvFXSRChh8ey5lsYUixxKwgl2j9y3kKLckLiipR/g+mbC5lVjno0UlIlBvsulQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ionic/core": "^6.2.0",
|
"@ionic/core": "^6.2.1",
|
||||||
"ionicons": "^6.0.2",
|
"ionicons": "^6.0.2",
|
||||||
"tslib": "*"
|
"tslib": "*"
|
||||||
},
|
},
|
||||||
@ -207,9 +207,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@stencil/core": {
|
"node_modules/@stencil/core": {
|
||||||
"version": "2.17.1",
|
"version": "2.17.3",
|
||||||
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.17.1.tgz",
|
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.17.3.tgz",
|
||||||
"integrity": "sha512-ErjQsNALgZQ9SYeBHhqwL1UO+Zbptwl3kwrRJC2tGlc3G/T6UvPuaKr+PGsqI+CZGia+0+R5EELQvFu74mYeIg==",
|
"integrity": "sha512-qw2DZzOpyaltLLEfYRTj3n+XbvRtkmv4QQimYDJubC6jMY0NXK9r6H2+VyszdbbVmvK1D9GqZtyvY0NmOrztsg==",
|
||||||
"bin": {
|
"bin": {
|
||||||
"stencil": "bin/stencil"
|
"stencil": "bin/stencil"
|
||||||
},
|
},
|
||||||
@ -1157,9 +1157,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@ionic/core": {
|
"@ionic/core": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.1.tgz",
|
||||||
"integrity": "sha512-3qUNsVcSAdrjhIhPr5M2RRnh+1xuc9RFaxoeUgI9xQ0YjTmn2FWiH4urDCXuE/rZAwnvHF4X17P0L2EqCPSfWA==",
|
"integrity": "sha512-bWlE2ZMR7tMyqcBhncc21zZPMZfCEoyGQP2bdu/ft1uov0ozw/wfETygd07C+0DOkbU6x1OYncIvo+1bzK4alA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@stencil/core": "^2.16.0",
|
"@stencil/core": "^2.16.0",
|
||||||
"ionicons": "^6.0.2",
|
"ionicons": "^6.0.2",
|
||||||
@ -1167,11 +1167,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@ionic/react": {
|
"@ionic/react": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/react/-/react-6.2.1.tgz",
|
||||||
"integrity": "sha512-6RJrMpivslHszazxDV7Shmqbmgi7ki0RsqTklAXKKk40+Gglfx/fm+9H7PRJMGJ17ueGRFKN4ZWLahnzl6Y6ag==",
|
"integrity": "sha512-zHqoGeEm4QwzCijBvcYZQifrCvFXSRChh8ey5lsYUixxKwgl2j9y3kKLckLiipR/g+mbC5lVjno0UlIlBvsulQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@ionic/core": "^6.2.0",
|
"@ionic/core": "^6.2.1",
|
||||||
"ionicons": "^6.0.2",
|
"ionicons": "^6.0.2",
|
||||||
"tslib": "*"
|
"tslib": "*"
|
||||||
}
|
}
|
||||||
@ -1199,9 +1199,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@stencil/core": {
|
"@stencil/core": {
|
||||||
"version": "2.17.1",
|
"version": "2.17.3",
|
||||||
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.17.1.tgz",
|
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.17.3.tgz",
|
||||||
"integrity": "sha512-ErjQsNALgZQ9SYeBHhqwL1UO+Zbptwl3kwrRJC2tGlc3G/T6UvPuaKr+PGsqI+CZGia+0+R5EELQvFu74mYeIg=="
|
"integrity": "sha512-qw2DZzOpyaltLLEfYRTj3n+XbvRtkmv4QQimYDJubC6jMY0NXK9r6H2+VyszdbbVmvK1D9GqZtyvY0NmOrztsg=="
|
||||||
},
|
},
|
||||||
"@types/estree": {
|
"@types/estree": {
|
||||||
"version": "0.0.39",
|
"version": "0.0.39",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/react-router",
|
"name": "@ionic/react-router",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"description": "React Router wrapper for @ionic/react",
|
"description": "React Router wrapper for @ionic/react",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ionic",
|
"ionic",
|
||||||
@ -37,7 +37,7 @@
|
|||||||
"dist/"
|
"dist/"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ionic/react": "^6.2.0",
|
"@ionic/react": "^6.2.1",
|
||||||
"tslib": "*"
|
"tslib": "*"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
@ -3,6 +3,17 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [6.2.1](https://github.com/ionic-team/ionic/compare/v6.2.0...v6.2.1) (2022-08-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **react:** IonNav apply properties to page components ([#25603](https://github.com/ionic-team/ionic/issues/25603)) ([61e4ffe](https://github.com/ionic-team/ionic/commit/61e4ffe47f73034808b65ee37342f540ee5a6a97)), closes [#25602](https://github.com/ionic-team/ionic/issues/25602)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.2.0](https://github.com/ionic-team/ionic/compare/v6.1.15...v6.2.0) (2022-07-27)
|
# [6.2.0](https://github.com/ionic-team/ionic/compare/v6.1.15...v6.2.0) (2022-07-27)
|
||||||
|
|
||||||
|
|
||||||
|
18
packages/react/package-lock.json
generated
18
packages/react/package-lock.json
generated
@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/react",
|
"name": "@ionic/react",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@ionic/react",
|
"name": "@ionic/react",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ionic/core": "^6.2.0",
|
"@ionic/core": "^6.2.1",
|
||||||
"ionicons": "^6.0.2",
|
"ionicons": "^6.0.2",
|
||||||
"tslib": "*"
|
"tslib": "*"
|
||||||
},
|
},
|
||||||
@ -607,9 +607,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ionic/core": {
|
"node_modules/@ionic/core": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.1.tgz",
|
||||||
"integrity": "sha512-3qUNsVcSAdrjhIhPr5M2RRnh+1xuc9RFaxoeUgI9xQ0YjTmn2FWiH4urDCXuE/rZAwnvHF4X17P0L2EqCPSfWA==",
|
"integrity": "sha512-bWlE2ZMR7tMyqcBhncc21zZPMZfCEoyGQP2bdu/ft1uov0ozw/wfETygd07C+0DOkbU6x1OYncIvo+1bzK4alA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@stencil/core": "^2.16.0",
|
"@stencil/core": "^2.16.0",
|
||||||
"ionicons": "^6.0.2",
|
"ionicons": "^6.0.2",
|
||||||
@ -9522,9 +9522,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@ionic/core": {
|
"@ionic/core": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.1.tgz",
|
||||||
"integrity": "sha512-3qUNsVcSAdrjhIhPr5M2RRnh+1xuc9RFaxoeUgI9xQ0YjTmn2FWiH4urDCXuE/rZAwnvHF4X17P0L2EqCPSfWA==",
|
"integrity": "sha512-bWlE2ZMR7tMyqcBhncc21zZPMZfCEoyGQP2bdu/ft1uov0ozw/wfETygd07C+0DOkbU6x1OYncIvo+1bzK4alA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@stencil/core": "^2.16.0",
|
"@stencil/core": "^2.16.0",
|
||||||
"ionicons": "^6.0.2",
|
"ionicons": "^6.0.2",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/react",
|
"name": "@ionic/react",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"description": "React specific wrapper for @ionic/core",
|
"description": "React specific wrapper for @ionic/core",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"ionic",
|
"ionic",
|
||||||
@ -41,7 +41,7 @@
|
|||||||
"css/"
|
"css/"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ionic/core": "^6.2.0",
|
"@ionic/core": "^6.2.1",
|
||||||
"ionicons": "^6.0.2",
|
"ionicons": "^6.0.2",
|
||||||
"tslib": "*"
|
"tslib": "*"
|
||||||
},
|
},
|
||||||
|
@ -4,27 +4,34 @@ import React, { useState } from 'react';
|
|||||||
|
|
||||||
import { ReactDelegate } from '../../framework-delegate';
|
import { ReactDelegate } from '../../framework-delegate';
|
||||||
import { createReactComponent } from '../react-component-lib';
|
import { createReactComponent } from '../react-component-lib';
|
||||||
|
import { createForwardRef } from '../utils';
|
||||||
|
|
||||||
const IonNavInner = createReactComponent<
|
const IonNavInner = createReactComponent<
|
||||||
JSX.IonNav & { delegate: FrameworkDelegate },
|
JSX.IonNav & { delegate: FrameworkDelegate },
|
||||||
HTMLIonNavElement
|
HTMLIonNavElement
|
||||||
>('ion-nav', undefined, undefined, defineCustomElement);
|
>('ion-nav', undefined, undefined, defineCustomElement);
|
||||||
|
|
||||||
export const IonNav: React.FC<JSX.IonNav> = ({ children, ...restOfProps }) => {
|
type IonNavProps = JSX.IonNav & {
|
||||||
const [views, setViews] = useState<React.ReactPortal[]>([]);
|
forwardedRef?: React.ForwardedRef<HTMLIonNavElement>;
|
||||||
|
};
|
||||||
|
|
||||||
|
const IonNavInternal: React.FC<IonNavProps> = ({ children, forwardedRef, ...restOfProps }) => {
|
||||||
|
const [views, setViews] = useState<React.ReactElement[]>([]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows us to create React components that are rendered within
|
* Allows us to create React components that are rendered within
|
||||||
* the context of the IonNav component.
|
* the context of the IonNav component.
|
||||||
*/
|
*/
|
||||||
const addView = (view: React.ReactPortal) => setViews([...views, view]);
|
const addView = (view: React.ReactElement) => setViews([...views, view]);
|
||||||
const removeView = (view: React.ReactPortal) => setViews(views.filter((v) => v !== view));
|
const removeView = (view: React.ReactElement) => setViews(views.filter((v) => v !== view));
|
||||||
|
|
||||||
const delegate = ReactDelegate(addView, removeView);
|
const delegate = ReactDelegate(addView, removeView);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IonNavInner delegate={delegate} {...restOfProps}>
|
<IonNavInner delegate={delegate} ref={forwardedRef} {...restOfProps}>
|
||||||
{views}
|
{views}
|
||||||
</IonNavInner>
|
</IonNavInner>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const IonNav = createForwardRef<IonNavProps, HTMLIonNavElement>(IonNavInternal, 'IonNav');
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
import { FrameworkDelegate } from '@ionic/core/components';
|
import { FrameworkDelegate } from '@ionic/core/components';
|
||||||
import { createPortal } from 'react-dom';
|
import { createPortal } from 'react-dom';
|
||||||
|
|
||||||
|
type ReactComponent = (props?: any) => JSX.Element;
|
||||||
|
|
||||||
export const ReactDelegate = (
|
export const ReactDelegate = (
|
||||||
addView: (view: React.ReactPortal) => void,
|
addView: (view: React.ReactElement) => void,
|
||||||
removeView: (view: React.ReactPortal) => void
|
removeView: (view: React.ReactElement) => void
|
||||||
): FrameworkDelegate => {
|
): FrameworkDelegate => {
|
||||||
let Component: React.ReactPortal;
|
const refMap = new WeakMap<ReactComponent, React.ReactElement>();
|
||||||
|
|
||||||
const attachViewToDom = async (
|
const attachViewToDom = async (
|
||||||
parentElement: HTMLElement,
|
parentElement: HTMLElement,
|
||||||
component: () => JSX.Element,
|
component: ReactComponent,
|
||||||
propsOrDataObj?: any,
|
propsOrDataObj?: any,
|
||||||
cssClasses?: string[]
|
cssClasses?: string[]
|
||||||
): Promise<any> => {
|
): Promise<any> => {
|
||||||
@ -17,17 +19,20 @@ export const ReactDelegate = (
|
|||||||
cssClasses && div.classList.add(...cssClasses);
|
cssClasses && div.classList.add(...cssClasses);
|
||||||
parentElement.appendChild(div);
|
parentElement.appendChild(div);
|
||||||
|
|
||||||
Component = createPortal(component(), div);
|
const componentWithProps = component(propsOrDataObj);
|
||||||
|
const hostComponent = createPortal(componentWithProps, div);
|
||||||
|
|
||||||
Component.props = propsOrDataObj;
|
refMap.set(component, hostComponent);
|
||||||
|
|
||||||
addView(Component);
|
addView(hostComponent);
|
||||||
|
|
||||||
return Promise.resolve(div);
|
return Promise.resolve(div);
|
||||||
};
|
};
|
||||||
|
|
||||||
const removeViewFromDom = (): Promise<void> => {
|
const removeViewFromDom = (_container: any, component: ReactComponent): Promise<void> => {
|
||||||
Component && removeView(Component);
|
const hostComponent = refMap.get(component);
|
||||||
|
hostComponent && removeView(hostComponent);
|
||||||
|
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7,6 +7,10 @@ describe('IonNav', () => {
|
|||||||
cy.get('ion-nav').contains('Page one content');
|
cy.get('ion-nav').contains('Page one content');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should have a ref defined', () => {
|
||||||
|
cy.get('#navRef').should('have.text', 'Nav ref is defined: true');
|
||||||
|
});
|
||||||
|
|
||||||
it('should push a page', () => {
|
it('should push a page', () => {
|
||||||
cy.get('ion-button').contains('Go to Page Two').click();
|
cy.get('ion-button').contains('Go to Page Two').click();
|
||||||
cy.get('#pageTwoContent').should('be.visible');
|
cy.get('#pageTwoContent').should('be.visible');
|
||||||
@ -25,4 +29,16 @@ describe('IonNav', () => {
|
|||||||
cy.get('ion-nav').contains('Page one content');
|
cy.get('ion-nav').contains('Page one content');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should pass params to the page', () => {
|
||||||
|
cy.get('#pageOneProps').should('have.text', '{"someString":"Hello","someNumber":3,"someBoolean":true}');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should pass componentProps to sub pages', () => {
|
||||||
|
cy.get('ion-button').contains('Go to Page Two').click();
|
||||||
|
|
||||||
|
cy.get('#pageTwoContent').should('be.visible');
|
||||||
|
|
||||||
|
cy.get('#pageTwoProps').should('have.text', '{"someValue":"Hello"}');
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -11,13 +11,17 @@ import {
|
|||||||
IonBackButton,
|
IonBackButton,
|
||||||
IonPage,
|
IonPage,
|
||||||
} from '@ionic/react';
|
} from '@ionic/react';
|
||||||
import React from 'react';
|
import React, { useRef } from 'react';
|
||||||
|
|
||||||
const NavComponent: React.FC = () => {
|
const PageOne = ({
|
||||||
return (
|
nav,
|
||||||
<IonPage>
|
...restOfProps
|
||||||
<IonNav
|
}: {
|
||||||
root={() => {
|
someString: string;
|
||||||
|
someNumber: number;
|
||||||
|
someBoolean: boolean;
|
||||||
|
nav: React.MutableRefObject<HTMLIonNavElement>;
|
||||||
|
}) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<IonHeader>
|
<IonHeader>
|
||||||
@ -30,9 +34,21 @@ const NavComponent: React.FC = () => {
|
|||||||
</IonHeader>
|
</IonHeader>
|
||||||
<IonContent id="pageOneContent">
|
<IonContent id="pageOneContent">
|
||||||
<IonLabel>Page one content</IonLabel>
|
<IonLabel>Page one content</IonLabel>
|
||||||
|
<div id="pageOneProps">{JSON.stringify(restOfProps)}</div>
|
||||||
|
<div id="navRef">Nav ref is defined: {nav.current !== null ? 'true' : 'false'}</div>
|
||||||
<IonNavLink
|
<IonNavLink
|
||||||
routerDirection="forward"
|
routerDirection="forward"
|
||||||
component={() => {
|
component={PageTwo}
|
||||||
|
componentProps={{ someValue: 'Hello' }}
|
||||||
|
>
|
||||||
|
<IonButton>Go to Page Two</IonButton>
|
||||||
|
</IonNavLink>
|
||||||
|
</IonContent>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const PageTwo = (props?: { someValue: string }) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<IonHeader>
|
<IonHeader>
|
||||||
@ -45,9 +61,17 @@ const NavComponent: React.FC = () => {
|
|||||||
</IonHeader>
|
</IonHeader>
|
||||||
<IonContent id="pageTwoContent">
|
<IonContent id="pageTwoContent">
|
||||||
<IonLabel>Page two content</IonLabel>
|
<IonLabel>Page two content</IonLabel>
|
||||||
<IonNavLink
|
<div id="pageTwoProps">{JSON.stringify(props)}</div>
|
||||||
routerDirection="forward"
|
<IonNavLink routerDirection="forward" component={PageThree}>
|
||||||
component={() => (
|
<IonButton>Go to Page Three</IonButton>
|
||||||
|
</IonNavLink>
|
||||||
|
</IonContent>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const PageThree = () => {
|
||||||
|
return (
|
||||||
<>
|
<>
|
||||||
<IonHeader>
|
<IonHeader>
|
||||||
<IonToolbar>
|
<IonToolbar>
|
||||||
@ -61,22 +85,23 @@ const NavComponent: React.FC = () => {
|
|||||||
<IonLabel>Page three content</IonLabel>
|
<IonLabel>Page three content</IonLabel>
|
||||||
</IonContent>
|
</IonContent>
|
||||||
</>
|
</>
|
||||||
)}
|
|
||||||
>
|
|
||||||
<IonButton>Go to Page Three</IonButton>
|
|
||||||
</IonNavLink>
|
|
||||||
</IonContent>
|
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const NavComponent: React.FC = () => {
|
||||||
|
const ref = useRef<any>();
|
||||||
|
return (
|
||||||
|
<IonPage>
|
||||||
|
<IonNav
|
||||||
|
ref={ref}
|
||||||
|
root={PageOne}
|
||||||
|
rootParams={{
|
||||||
|
someString: 'Hello',
|
||||||
|
someNumber: 3,
|
||||||
|
someBoolean: true,
|
||||||
|
nav: ref,
|
||||||
}}
|
}}
|
||||||
>
|
/>
|
||||||
<IonButton>Go to Page Two</IonButton>
|
|
||||||
</IonNavLink>
|
|
||||||
</IonContent>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
></IonNav>
|
|
||||||
</IonPage>
|
</IonPage>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [6.2.1](https://github.com/ionic-team/ionic/compare/v6.2.0...v6.2.1) (2022-08-03)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ionic/vue-router
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.2.0](https://github.com/ionic-team/ionic/compare/v6.1.15...v6.2.0) (2022-07-27)
|
# [6.2.0](https://github.com/ionic-team/ionic/compare/v6.1.15...v6.2.0) (2022-07-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package @ionic/vue-router
|
**Note:** Version bump only for package @ionic/vue-router
|
||||||
|
46
packages/vue-router/package-lock.json
generated
46
packages/vue-router/package-lock.json
generated
@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/vue-router",
|
"name": "@ionic/vue-router",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@ionic/vue-router",
|
"name": "@ionic/vue-router",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ionic/vue": "^6.2.0"
|
"@ionic/vue": "^6.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^28.1.1",
|
"@types/jest": "^28.1.1",
|
||||||
@ -578,9 +578,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@ionic/core": {
|
"node_modules/@ionic/core": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.1.tgz",
|
||||||
"integrity": "sha512-3qUNsVcSAdrjhIhPr5M2RRnh+1xuc9RFaxoeUgI9xQ0YjTmn2FWiH4urDCXuE/rZAwnvHF4X17P0L2EqCPSfWA==",
|
"integrity": "sha512-bWlE2ZMR7tMyqcBhncc21zZPMZfCEoyGQP2bdu/ft1uov0ozw/wfETygd07C+0DOkbU6x1OYncIvo+1bzK4alA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@stencil/core": "^2.16.0",
|
"@stencil/core": "^2.16.0",
|
||||||
"ionicons": "^6.0.2",
|
"ionicons": "^6.0.2",
|
||||||
@ -588,11 +588,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ionic/vue": {
|
"node_modules/@ionic/vue": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.2.1.tgz",
|
||||||
"integrity": "sha512-tF+922bNLBTrN204CRUBDDRc6E+ygkMExxH2RX/QlXyRaVbSbmVlYXFe56nCu8caZgFlX711lHhHL1D+FsnOng==",
|
"integrity": "sha512-buVKw5ZAeNCBa1PmSZWkUDaNJgRSjp2iBzYH6/8MQC/bniTRb1QV6LebTAw3xt+6QhHqCeiBedZtwYCSlr510Q==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ionic/core": "^6.2.0",
|
"@ionic/core": "^6.2.1",
|
||||||
"ionicons": "^6.0.2"
|
"ionicons": "^6.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1005,9 +1005,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@stencil/core": {
|
"node_modules/@stencil/core": {
|
||||||
"version": "2.17.1",
|
"version": "2.17.3",
|
||||||
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.17.1.tgz",
|
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.17.3.tgz",
|
||||||
"integrity": "sha512-ErjQsNALgZQ9SYeBHhqwL1UO+Zbptwl3kwrRJC2tGlc3G/T6UvPuaKr+PGsqI+CZGia+0+R5EELQvFu74mYeIg==",
|
"integrity": "sha512-qw2DZzOpyaltLLEfYRTj3n+XbvRtkmv4QQimYDJubC6jMY0NXK9r6H2+VyszdbbVmvK1D9GqZtyvY0NmOrztsg==",
|
||||||
"bin": {
|
"bin": {
|
||||||
"stencil": "bin/stencil"
|
"stencil": "bin/stencil"
|
||||||
},
|
},
|
||||||
@ -5233,9 +5233,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@ionic/core": {
|
"@ionic/core": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.1.tgz",
|
||||||
"integrity": "sha512-3qUNsVcSAdrjhIhPr5M2RRnh+1xuc9RFaxoeUgI9xQ0YjTmn2FWiH4urDCXuE/rZAwnvHF4X17P0L2EqCPSfWA==",
|
"integrity": "sha512-bWlE2ZMR7tMyqcBhncc21zZPMZfCEoyGQP2bdu/ft1uov0ozw/wfETygd07C+0DOkbU6x1OYncIvo+1bzK4alA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@stencil/core": "^2.16.0",
|
"@stencil/core": "^2.16.0",
|
||||||
"ionicons": "^6.0.2",
|
"ionicons": "^6.0.2",
|
||||||
@ -5243,11 +5243,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@ionic/vue": {
|
"@ionic/vue": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.2.1.tgz",
|
||||||
"integrity": "sha512-tF+922bNLBTrN204CRUBDDRc6E+ygkMExxH2RX/QlXyRaVbSbmVlYXFe56nCu8caZgFlX711lHhHL1D+FsnOng==",
|
"integrity": "sha512-buVKw5ZAeNCBa1PmSZWkUDaNJgRSjp2iBzYH6/8MQC/bniTRb1QV6LebTAw3xt+6QhHqCeiBedZtwYCSlr510Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@ionic/core": "^6.2.0",
|
"@ionic/core": "^6.2.1",
|
||||||
"ionicons": "^6.0.2"
|
"ionicons": "^6.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -5580,9 +5580,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@stencil/core": {
|
"@stencil/core": {
|
||||||
"version": "2.17.1",
|
"version": "2.17.3",
|
||||||
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.17.1.tgz",
|
"resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.17.3.tgz",
|
||||||
"integrity": "sha512-ErjQsNALgZQ9SYeBHhqwL1UO+Zbptwl3kwrRJC2tGlc3G/T6UvPuaKr+PGsqI+CZGia+0+R5EELQvFu74mYeIg=="
|
"integrity": "sha512-qw2DZzOpyaltLLEfYRTj3n+XbvRtkmv4QQimYDJubC6jMY0NXK9r6H2+VyszdbbVmvK1D9GqZtyvY0NmOrztsg=="
|
||||||
},
|
},
|
||||||
"@tootallnate/once": {
|
"@tootallnate/once": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/vue-router",
|
"name": "@ionic/vue-router",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"description": "Vue Router integration for @ionic/vue",
|
"description": "Vue Router integration for @ionic/vue",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepublishOnly": "npm run build",
|
"prepublishOnly": "npm run build",
|
||||||
@ -44,7 +44,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/ionic-team/ionic#readme",
|
"homepage": "https://github.com/ionic-team/ionic#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ionic/vue": "^6.2.0"
|
"@ionic/vue": "^6.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^28.1.1",
|
"@types/jest": "^28.1.1",
|
||||||
|
@ -3,6 +3,14 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [6.2.1](https://github.com/ionic-team/ionic/compare/v6.2.0...v6.2.1) (2022-08-03)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @ionic/vue
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# [6.2.0](https://github.com/ionic-team/ionic/compare/v6.1.15...v6.2.0) (2022-07-27)
|
# [6.2.0](https://github.com/ionic-team/ionic/compare/v6.1.15...v6.2.0) (2022-07-27)
|
||||||
|
|
||||||
|
|
||||||
|
18
packages/vue/package-lock.json
generated
18
packages/vue/package-lock.json
generated
@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/vue",
|
"name": "@ionic/vue",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@ionic/vue",
|
"name": "@ionic/vue",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ionic/core": "^6.2.0",
|
"@ionic/core": "^6.2.1",
|
||||||
"ionicons": "^6.0.2"
|
"ionicons": "^6.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -59,9 +59,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ionic/core": {
|
"node_modules/@ionic/core": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.1.tgz",
|
||||||
"integrity": "sha512-3qUNsVcSAdrjhIhPr5M2RRnh+1xuc9RFaxoeUgI9xQ0YjTmn2FWiH4urDCXuE/rZAwnvHF4X17P0L2EqCPSfWA==",
|
"integrity": "sha512-bWlE2ZMR7tMyqcBhncc21zZPMZfCEoyGQP2bdu/ft1uov0ozw/wfETygd07C+0DOkbU6x1OYncIvo+1bzK4alA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@stencil/core": "^2.16.0",
|
"@stencil/core": "^2.16.0",
|
||||||
"ionicons": "^6.0.2",
|
"ionicons": "^6.0.2",
|
||||||
@ -768,9 +768,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@ionic/core": {
|
"@ionic/core": {
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.1.tgz",
|
||||||
"integrity": "sha512-3qUNsVcSAdrjhIhPr5M2RRnh+1xuc9RFaxoeUgI9xQ0YjTmn2FWiH4urDCXuE/rZAwnvHF4X17P0L2EqCPSfWA==",
|
"integrity": "sha512-bWlE2ZMR7tMyqcBhncc21zZPMZfCEoyGQP2bdu/ft1uov0ozw/wfETygd07C+0DOkbU6x1OYncIvo+1bzK4alA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@stencil/core": "^2.16.0",
|
"@stencil/core": "^2.16.0",
|
||||||
"ionicons": "^6.0.2",
|
"ionicons": "^6.0.2",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ionic/vue",
|
"name": "@ionic/vue",
|
||||||
"version": "6.2.0",
|
"version": "6.2.1",
|
||||||
"description": "Vue specific wrapper for @ionic/core",
|
"description": "Vue specific wrapper for @ionic/core",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepublishOnly": "npm run build",
|
"prepublishOnly": "npm run build",
|
||||||
@ -61,7 +61,7 @@
|
|||||||
"vue-router": "^4.0.16"
|
"vue-router": "^4.0.16"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ionic/core": "^6.2.0",
|
"@ionic/core": "^6.2.1",
|
||||||
"ionicons": "^6.0.2"
|
"ionicons": "^6.0.2"
|
||||||
},
|
},
|
||||||
"vetur": {
|
"vetur": {
|
||||||
|
Reference in New Issue
Block a user