chore(): sync with main

This commit is contained in:
Liam DeBeasi
2022-06-27 09:54:57 -04:00
391 changed files with 15762 additions and 40817 deletions

View File

@@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [6.1.11](https://github.com/ionic-team/ionic/compare/v6.1.10...v6.1.11) (2022-06-22)
**Note:** Version bump only for package @ionic/angular
## [6.1.10](https://github.com/ionic-team/ionic/compare/v6.1.9...v6.1.10) (2022-06-15)
### Bug Fixes
* **angular:** router compatibility with Angular 12/13 ([#25456](https://github.com/ionic-team/ionic/issues/25456)) ([7b105a3](https://github.com/ionic-team/ionic/commit/7b105a3471e5bc588ba63f820b707e131c878b6f)), closes [#25448](https://github.com/ionic-team/ionic/issues/25448)
## [6.1.9](https://github.com/ionic-team/ionic/compare/v6.1.8...v6.1.9) (2022-06-08)

View File

@@ -1,15 +1,15 @@
{
"name": "@ionic/angular",
"version": "6.1.9",
"version": "6.1.11",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@ionic/angular",
"version": "6.1.9",
"version": "6.1.11",
"license": "MIT",
"dependencies": {
"@ionic/core": "^6.1.9",
"@ionic/core": "^6.1.11",
"jsonc-parser": "^3.0.0",
"tslib": "^2.0.0"
},
@@ -1023,9 +1023,9 @@
"dev": true
},
"node_modules/@ionic/core": {
"version": "6.1.9",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.1.9.tgz",
"integrity": "sha512-EaClsiGB/E9wPkujnrMZ71BLVcA8t6DBZu+caJMmqPLF/64S37CiyfrrMbL1UnxDWP2TXsPFH3seWl6Ek/W1bw==",
"version": "6.1.11",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.1.11.tgz",
"integrity": "sha512-hMYZ+Iqvv2a8Qj3HCbtnI4DDIplMvr7x1Jk3aljNsvYQeyVLXxXvyNfpBzVuJxF7lJeGMlq9cY5XWUXh2gQnIA==",
"dependencies": {
"@stencil/core": "^2.16.0",
"ionicons": "^6.0.2",
@@ -7939,9 +7939,9 @@
"dev": true
},
"@ionic/core": {
"version": "6.1.9",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.1.9.tgz",
"integrity": "sha512-EaClsiGB/E9wPkujnrMZ71BLVcA8t6DBZu+caJMmqPLF/64S37CiyfrrMbL1UnxDWP2TXsPFH3seWl6Ek/W1bw==",
"version": "6.1.11",
"resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.1.11.tgz",
"integrity": "sha512-hMYZ+Iqvv2a8Qj3HCbtnI4DDIplMvr7x1Jk3aljNsvYQeyVLXxXvyNfpBzVuJxF7lJeGMlq9cY5XWUXh2gQnIA==",
"requires": {
"@stencil/core": "^2.16.0",
"ionicons": "^6.0.2",

View File

@@ -1,6 +1,6 @@
{
"name": "@ionic/angular",
"version": "6.1.9",
"version": "6.1.11",
"description": "Angular specific wrappers for @ionic/core",
"keywords": [
"ionic",
@@ -44,7 +44,7 @@
"validate": "npm i && npm run lint && npm run test && npm run build"
},
"dependencies": {
"@ionic/core": "^6.1.9",
"@ionic/core": "^6.1.11",
"jsonc-parser": "^3.0.0",
"tslib": "^2.0.0"
},

View File

@@ -89,6 +89,7 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
private config: Config,
private navCtrl: NavController,
@Optional() private environmentInjector: EnvironmentInjector,
@Optional() private componentFactoryResolver: ComponentFactoryResolver,
commonLocation: Location,
elementRef: ElementRef,
router: Router,
@@ -232,8 +233,25 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
this.updateActivatedRouteProxy(cmpRef.instance, activatedRoute);
} else {
const snapshot = (activatedRoute as any)._futureSnapshot;
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const component = snapshot.routeConfig!.component as any;
/**
* Angular 14 introduces a new `loadComponent` property to the route config,
* that assigns the component to load to the `component` property of
* the route snapshot. We can check for the presence of this property
* to determine if the route is using standalone components.
*
* TODO: FW-1631: Remove this check when supporting standalone components
*/
if (component == null && snapshot.component) {
console.warn(
'[Ionic Warning]: Standalone components are not currently supported with ion-router-outlet. You can track this feature request at https://github.com/ionic-team/ionic-framework/issues/25404'
);
return;
}
const childContexts = this.parentContexts.getOrCreateContext(this.name).children;
// We create an activated route proxy object that will maintain future updates for this component
@@ -243,6 +261,12 @@ export class IonRouterOutlet implements OnDestroy, OnInit {
const injector = new OutletInjector(activatedRouteProxy, childContexts, this.location.injector);
/**
* The resolver is not always provided and is required in Angular 12.
* Fallback to the class-level provider when the resolver is not set.
*/
resolverOrInjector = resolverOrInjector || this.componentFactoryResolver;
if (resolverOrInjector && isComponentFactoryResolver(resolverOrInjector)) {
// Backwards compatibility for Angular 13 and lower
const factory = resolverOrInjector.resolveComponentFactory(component);

View File

@@ -253,7 +253,7 @@ export class Platform {
}
const readQueryParam = (url: string, key: string) => {
key = key.replace(/[[]/, '\\[').replace(/[\]]/, '\\]');
key = key.replace(/[[\]\\]/g, '\\$&');
const regex = new RegExp('[\\?&]' + key + '=([^&#]*)');
const results = regex.exec(url);
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;

View File

@@ -0,0 +1,16 @@
import { defineConfig } from 'cypress'
export default defineConfig({
video: false,
screenshotOnRunFailure: false,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
specPattern: './e2e/**/*.spec.ts',
baseUrl: 'http://localhost:4200/',
excludeSpecPattern: '**/examples/*',
},
})

View File

@@ -1,8 +0,0 @@
{
"integrationFolder": "./e2e",
"testFiles": "**/*.spec.ts",
"baseUrl": "http://localhost:4200/",
"ignoreTestFiles": "**/examples/*",
"video": false,
"screenshotOnRunFailure": false
}

View File

@@ -39,6 +39,9 @@ describe('Form', () => {
cy.get('ion-input.required').invoke('prop', 'value', 'Some value');
testStatus('INVALID');
// TODO: FW-1160 - Remove when v7 is released
cy.wait(300);
cy.get('ion-select').invoke('prop', 'value', 'nes');
testStatus('INVALID');

View File

@@ -13,6 +13,7 @@ describe('Providers', () => {
cy.get('#is-desktop').should('have.text', 'true');
cy.get('#is-mobile').should('have.text', 'false');
cy.get('#keyboard-height').should('have.text', '12345');
cy.get('#query-params').should('have.text', 'firstParam: null, firstParam: null');
});
it('should detect testing mode', () => {
@@ -20,5 +21,11 @@ describe('Providers', () => {
cy.get('#is-testing').should('have.text', 'true');
});
it('should get query params', () => {
cy.visit('/providers?firstParam=abc&secondParam=true');
cy.get('#query-params').should('have.text', 'firstParam: abc, firstParam: true');
})
});

View File

@@ -5,10 +5,7 @@ describe('Virtual Scroll', () => {
})
it('should open virtual-scroll', () => {
cy.document().then((doc) => {
const virtualElements = doc.querySelectorAll('ion-virtual-scroll > *');
expect(virtualElements.length).to.be.greaterThan(0);
});
cy.get('ion-virtual-scroll > *').its('length').should('be.gt', 0);
});
});

View File

File diff suppressed because it is too large Load Diff

View File

@@ -56,7 +56,7 @@
"@typescript-eslint/eslint-plugin": "4.28.2",
"@typescript-eslint/parser": "4.28.2",
"concurrently": "^6.0.0",
"cypress": "^6.7.1",
"cypress": "^10.2.0",
"eslint": "^7.26.0",
"ts-loader": "^6.2.2",
"ts-node": "^8.3.0",

View File

@@ -33,4 +33,7 @@
<p>
keyboardHeight: <span id="keyboard-height">{{keyboardHeight}}</span>
</p>
<p>
queryParams: <span id="query-params">{{queryParams}}</span>
</p>
</ion-content>

View File

@@ -20,6 +20,7 @@ export class ProvidersComponent {
isDesktop: boolean = undefined;
isMobile: boolean = undefined;
keyboardHeight = 0;
queryParams = '';
constructor(
actionSheetCtrl: ActionSheetController,
@@ -64,6 +65,10 @@ export class ProvidersComponent {
NgZone.assertInAngularZone();
this.isResized = true;
});
const firstQuery = platform.getQueryParam('firstParam');
const secondQuery = platform.getQueryParam('secondParam');
this.queryParams = `firstParam: ${firstQuery}, firstParam: ${secondQuery}`;
this.isDesktop = platform.is('desktop');
this.isMobile = platform.is('mobile');