@ionic/angular 7.6.2-dev.11706202387.1dfcd9b8 → 7.6.2-dev.11706205501.196a5433
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/directives/navigation/nav.d.ts +2 -2
- package/common/providers/angular-delegate.d.ts +5 -4
- package/directives/navigation/ion-nav.d.ts +2 -2
- package/esm2020/common/directives/navigation/nav.mjs +5 -5
- package/esm2020/common/providers/angular-delegate.mjs +35 -23
- package/esm2020/directives/navigation/ion-nav.mjs +5 -5
- package/esm2020/providers/modal-controller.mjs +4 -3
- package/esm2020/providers/popover-controller.mjs +4 -3
- package/esm2020/standalone/navigation/nav.mjs +5 -5
- package/esm2020/standalone/providers/modal-controller.mjs +4 -3
- package/esm2020/standalone/providers/popover-controller.mjs +4 -3
- package/fesm2015/ionic-angular-common.mjs +38 -26
- package/fesm2015/ionic-angular-common.mjs.map +1 -1
- package/fesm2015/ionic-angular-standalone.mjs +9 -7
- package/fesm2015/ionic-angular-standalone.mjs.map +1 -1
- package/fesm2015/ionic-angular.mjs +9 -7
- package/fesm2015/ionic-angular.mjs.map +1 -1
- package/fesm2020/ionic-angular-common.mjs +38 -26
- package/fesm2020/ionic-angular-common.mjs.map +1 -1
- package/fesm2020/ionic-angular-standalone.mjs +9 -7
- package/fesm2020/ionic-angular-standalone.mjs.map +1 -1
- package/fesm2020/ionic-angular.mjs +9 -7
- package/fesm2020/ionic-angular.mjs.map +1 -1
- package/package.json +2 -2
- package/providers/modal-controller.d.ts +1 -0
- package/providers/popover-controller.d.ts +1 -0
- package/standalone/navigation/nav.d.ts +2 -2
- package/standalone/providers/modal-controller.d.ts +1 -0
- package/standalone/providers/popover-controller.d.ts +1 -0
|
@@ -677,8 +677,8 @@ class AngularDelegate {
|
|
|
677
677
|
this.zone = inject(NgZone);
|
|
678
678
|
this.applicationRef = inject(ApplicationRef);
|
|
679
679
|
}
|
|
680
|
-
create(environmentInjector, elementReferenceKey) {
|
|
681
|
-
return new AngularFrameworkDelegate(environmentInjector, this.applicationRef, this.zone, elementReferenceKey);
|
|
680
|
+
create(environmentInjector, injector, elementReferenceKey) {
|
|
681
|
+
return new AngularFrameworkDelegate(environmentInjector, injector, this.applicationRef, this.zone, elementReferenceKey);
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
684
|
/** @nocollapse */ AngularDelegate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AngularDelegate, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -687,8 +687,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
687
687
|
type: Injectable
|
|
688
688
|
}] });
|
|
689
689
|
class AngularFrameworkDelegate {
|
|
690
|
-
constructor(environmentInjector, applicationRef, zone, elementReferenceKey) {
|
|
690
|
+
constructor(environmentInjector, injector, applicationRef, zone, elementReferenceKey) {
|
|
691
691
|
this.environmentInjector = environmentInjector;
|
|
692
|
+
this.injector = injector;
|
|
692
693
|
this.applicationRef = applicationRef;
|
|
693
694
|
this.zone = zone;
|
|
694
695
|
this.elementReferenceKey = elementReferenceKey;
|
|
@@ -712,7 +713,7 @@ class AngularFrameworkDelegate {
|
|
|
712
713
|
if (this.elementReferenceKey !== undefined) {
|
|
713
714
|
componentProps[this.elementReferenceKey] = container;
|
|
714
715
|
}
|
|
715
|
-
const el = attachView(this.zone, this.environmentInjector, this.applicationRef, this.elRefMap, this.elEventsMap, container, component, componentProps, cssClasses, this.elementReferenceKey);
|
|
716
|
+
const el = attachView(this.zone, this.environmentInjector, this.injector, this.applicationRef, this.elRefMap, this.elEventsMap, container, component, componentProps, cssClasses, this.elementReferenceKey);
|
|
716
717
|
resolve(el);
|
|
717
718
|
});
|
|
718
719
|
});
|
|
@@ -735,9 +736,10 @@ class AngularFrameworkDelegate {
|
|
|
735
736
|
});
|
|
736
737
|
}
|
|
737
738
|
}
|
|
738
|
-
const attachView = (zone, environmentInjector, applicationRef, elRefMap, elEventsMap, container, component, params, cssClasses, elementReferenceKey) => {
|
|
739
|
+
const attachView = (zone, environmentInjector, injector, applicationRef, elRefMap, elEventsMap, container, component, params, cssClasses, elementReferenceKey) => {
|
|
739
740
|
const componentRef = createComponent(component, {
|
|
740
741
|
environmentInjector,
|
|
742
|
+
elementInjector: injector,
|
|
741
743
|
});
|
|
742
744
|
const instance = componentRef.instance;
|
|
743
745
|
const hostElement = componentRef.location.nativeElement;
|
|
@@ -752,26 +754,36 @@ const attachView = (zone, environmentInjector, applicationRef, elRefMap, elEvent
|
|
|
752
754
|
if (elementReferenceKey && instance[elementReferenceKey] !== undefined) {
|
|
753
755
|
console.error(`[Ionic Error]: ${elementReferenceKey} is a reserved property when using ${container.tagName.toLowerCase()}. Rename or remove the "${elementReferenceKey}" property from ${component.name}.`);
|
|
754
756
|
}
|
|
755
|
-
const { modal, popover, ...otherParams } = params;
|
|
756
|
-
/**
|
|
757
|
-
* Any key/value pairs set in componentProps
|
|
758
|
-
* must be set as inputs on the component instance.
|
|
759
|
-
*/
|
|
760
|
-
for (const key in otherParams) {
|
|
761
|
-
componentRef.setInput(key, otherParams[key]);
|
|
762
|
-
}
|
|
763
757
|
/**
|
|
764
|
-
*
|
|
765
|
-
*
|
|
766
|
-
*
|
|
767
|
-
* compatibility purposes we fall back to using
|
|
768
|
-
* Object.assign for these properties.
|
|
758
|
+
* Angular 14.1 added support for setInput
|
|
759
|
+
* so we need to fall back to Object.assign
|
|
760
|
+
* for Angular 14.0.
|
|
769
761
|
*/
|
|
770
|
-
if (
|
|
771
|
-
|
|
762
|
+
if (componentRef.setInput !== undefined) {
|
|
763
|
+
const { modal, popover, ...otherParams } = params;
|
|
764
|
+
/**
|
|
765
|
+
* Any key/value pairs set in componentProps
|
|
766
|
+
* must be set as inputs on the component instance.
|
|
767
|
+
*/
|
|
768
|
+
for (const key in otherParams) {
|
|
769
|
+
componentRef.setInput(key, otherParams[key]);
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Using setInput will cause an error when
|
|
773
|
+
* setting modal/popover on a component that
|
|
774
|
+
* does not define them as an input. For backwards
|
|
775
|
+
* compatibility purposes we fall back to using
|
|
776
|
+
* Object.assign for these properties.
|
|
777
|
+
*/
|
|
778
|
+
if (modal !== undefined) {
|
|
779
|
+
Object.assign(instance, { modal });
|
|
780
|
+
}
|
|
781
|
+
if (popover !== undefined) {
|
|
782
|
+
Object.assign(instance, { popover });
|
|
783
|
+
}
|
|
772
784
|
}
|
|
773
|
-
|
|
774
|
-
Object.assign(instance,
|
|
785
|
+
else {
|
|
786
|
+
Object.assign(instance, params);
|
|
775
787
|
}
|
|
776
788
|
}
|
|
777
789
|
if (cssClasses) {
|
|
@@ -1979,15 +1991,15 @@ const NAV_METHODS = [
|
|
|
1979
1991
|
'getPrevious',
|
|
1980
1992
|
];
|
|
1981
1993
|
let IonNav = class IonNav {
|
|
1982
|
-
constructor(ref, environmentInjector, angularDelegate, z, c) {
|
|
1994
|
+
constructor(ref, environmentInjector, injector, angularDelegate, z, c) {
|
|
1983
1995
|
this.z = z;
|
|
1984
1996
|
c.detach();
|
|
1985
1997
|
this.el = ref.nativeElement;
|
|
1986
|
-
ref.nativeElement.delegate = angularDelegate.create(environmentInjector);
|
|
1998
|
+
ref.nativeElement.delegate = angularDelegate.create(environmentInjector, injector);
|
|
1987
1999
|
proxyOutputs(this, this.el, ['ionNavDidChange', 'ionNavWillChange']);
|
|
1988
2000
|
}
|
|
1989
2001
|
};
|
|
1990
|
-
/** @nocollapse */ IonNav.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonNav, deps: [{ token: i0.ElementRef }, { token: i0.EnvironmentInjector }, { token: AngularDelegate }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2002
|
+
/** @nocollapse */ IonNav.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonNav, deps: [{ token: i0.ElementRef }, { token: i0.EnvironmentInjector }, { token: i0.Injector }, { token: AngularDelegate }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1991
2003
|
/** @nocollapse */ IonNav.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: IonNav, inputs: { animated: "animated", animation: "animation", root: "root", rootParams: "rootParams", swipeGesture: "swipeGesture" }, ngImport: i0 });
|
|
1992
2004
|
IonNav = __decorate([
|
|
1993
2005
|
ProxyCmp({
|
|
@@ -2001,7 +2013,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
2001
2013
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
2002
2014
|
inputs: NAV_INPUTS,
|
|
2003
2015
|
}]
|
|
2004
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.EnvironmentInjector }, { type: AngularDelegate }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; } });
|
|
2016
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.EnvironmentInjector }, { type: i0.Injector }, { type: AngularDelegate }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; } });
|
|
2005
2017
|
|
|
2006
2018
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
2007
2019
|
class IonTabs {
|