@ionic/angular 7.6.2-dev.11705694334.11b34c62 → 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/router-outlet.d.ts +4 -3
- package/common/index.d.ts +0 -1
- package/css/core.css +101 -34
- package/css/core.css.map +1 -1
- package/css/global.bundle.css +1 -1
- package/css/ionic.bundle.css +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/css/themes/dark.always.css +122 -0
- package/css/themes/dark.always.css.map +1 -0
- package/css/themes/dark.class.css +122 -0
- package/css/themes/dark.class.css.map +1 -0
- package/css/themes/dark.css +3 -0
- package/css/themes/dark.css.map +1 -0
- package/css/themes/dark.system.css +124 -0
- package/css/themes/dark.system.css.map +1 -0
- package/css/typography.css +1 -1
- package/directives/navigation/ion-router-outlet.d.ts +12 -4
- package/directives/proxies.d.ts +1 -1
- package/esm2020/common/directives/navigation/router-outlet.mjs +15 -6
- package/esm2020/common/directives/navigation/stack-controller.mjs +1 -4
- package/esm2020/common/index.mjs +1 -2
- package/esm2020/common/providers/angular-delegate.mjs +34 -38
- package/esm2020/directives/navigation/ion-router-outlet.mjs +13 -9
- package/esm2020/directives/navigation/ion-tabs.mjs +1 -1
- package/esm2020/directives/proxies.mjs +4 -4
- package/esm2020/index.mjs +2 -2
- package/esm2020/standalone/directives/proxies.mjs +4 -4
- package/esm2020/standalone/index.mjs +2 -2
- package/esm2020/standalone/navigation/router-outlet.mjs +13 -9
- package/esm2020/standalone/navigation/tabs.mjs +1 -1
- package/fesm2015/ionic-angular-common.mjs +49 -91
- package/fesm2015/ionic-angular-common.mjs.map +1 -1
- package/fesm2015/ionic-angular-standalone.mjs +17 -13
- package/fesm2015/ionic-angular-standalone.mjs.map +1 -1
- package/fesm2015/ionic-angular.mjs +17 -13
- package/fesm2015/ionic-angular.mjs.map +1 -1
- package/fesm2020/ionic-angular-common.mjs +48 -90
- package/fesm2020/ionic-angular-common.mjs.map +1 -1
- package/fesm2020/ionic-angular-standalone.mjs +17 -13
- package/fesm2020/ionic-angular-standalone.mjs.map +1 -1
- package/fesm2020/ionic-angular.mjs +17 -13
- package/fesm2020/ionic-angular.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +2 -2
- package/standalone/directives/proxies.d.ts +1 -1
- package/standalone/index.d.ts +1 -1
- package/standalone/navigation/router-outlet.d.ts +12 -4
- package/common/directives/navigation/nav-params.d.ts +0 -45
- package/esm2020/common/directives/navigation/nav-params.mjs +0 -45
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Inject, Optional, InjectionToken, inject, NgZone, ApplicationRef,
|
|
2
|
+
import { Injectable, Inject, Optional, InjectionToken, inject, NgZone, ApplicationRef, createComponent, TemplateRef, Directive, ContentChild, EventEmitter, ViewContainerRef, EnvironmentInjector, Attribute, SkipSelf, Input, Output, reflectComponentType, HostListener, ElementRef, ViewChild } from '@angular/core';
|
|
3
3
|
import * as i3 from '@angular/router';
|
|
4
4
|
import { NavigationStart, PRIMARY_OUTLET, ChildrenOutletContexts, ActivatedRoute, Router } from '@angular/router';
|
|
5
5
|
import * as i1 from '@angular/common';
|
|
@@ -671,51 +671,6 @@ const getConfig = () => {
|
|
|
671
671
|
return null;
|
|
672
672
|
};
|
|
673
673
|
|
|
674
|
-
/**
|
|
675
|
-
* @description
|
|
676
|
-
* NavParams are an object that exists on a page and can contain data for that particular view.
|
|
677
|
-
* Similar to how data was pass to a view in V1 with `$stateParams`, NavParams offer a much more flexible
|
|
678
|
-
* option with a simple `get` method.
|
|
679
|
-
*
|
|
680
|
-
* @usage
|
|
681
|
-
* ```ts
|
|
682
|
-
* import { NavParams } from '@ionic/angular';
|
|
683
|
-
*
|
|
684
|
-
* export class MyClass{
|
|
685
|
-
*
|
|
686
|
-
* constructor(navParams: NavParams){
|
|
687
|
-
* // userParams is an object we have in our nav-parameters
|
|
688
|
-
* navParams.get('userParams');
|
|
689
|
-
* }
|
|
690
|
-
*
|
|
691
|
-
* }
|
|
692
|
-
* ```
|
|
693
|
-
*/
|
|
694
|
-
class NavParams {
|
|
695
|
-
constructor(data = {}) {
|
|
696
|
-
this.data = data;
|
|
697
|
-
}
|
|
698
|
-
/**
|
|
699
|
-
* Get the value of a nav-parameter for the current view
|
|
700
|
-
*
|
|
701
|
-
* ```ts
|
|
702
|
-
* import { NavParams } from 'ionic-angular';
|
|
703
|
-
*
|
|
704
|
-
* export class MyClass{
|
|
705
|
-
* constructor(public navParams: NavParams){
|
|
706
|
-
* // userParams is an object we have in our nav-parameters
|
|
707
|
-
* this.navParams.get('userParams');
|
|
708
|
-
* }
|
|
709
|
-
* }
|
|
710
|
-
* ```
|
|
711
|
-
*
|
|
712
|
-
* @param param Which param you want to look up
|
|
713
|
-
*/
|
|
714
|
-
get(param) {
|
|
715
|
-
return this.data[param];
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
|
|
719
674
|
// TODO(FW-2827): types
|
|
720
675
|
class AngularDelegate {
|
|
721
676
|
constructor() {
|
|
@@ -782,25 +737,9 @@ class AngularFrameworkDelegate {
|
|
|
782
737
|
}
|
|
783
738
|
}
|
|
784
739
|
const attachView = (zone, environmentInjector, injector, applicationRef, elRefMap, elEventsMap, container, component, params, cssClasses, elementReferenceKey) => {
|
|
785
|
-
/**
|
|
786
|
-
* Wraps the injector with a custom injector that
|
|
787
|
-
* provides NavParams to the component.
|
|
788
|
-
*
|
|
789
|
-
* NavParams is a legacy feature from Ionic v3 that allows
|
|
790
|
-
* Angular developers to provide data to a component
|
|
791
|
-
* and access it by providing NavParams as a dependency
|
|
792
|
-
* in the constructor.
|
|
793
|
-
*
|
|
794
|
-
* The modern approach is to access the data directly
|
|
795
|
-
* from the component's class instance.
|
|
796
|
-
*/
|
|
797
|
-
const childInjector = Injector.create({
|
|
798
|
-
providers: getProviders(params),
|
|
799
|
-
parent: injector,
|
|
800
|
-
});
|
|
801
740
|
const componentRef = createComponent(component, {
|
|
802
741
|
environmentInjector,
|
|
803
|
-
elementInjector:
|
|
742
|
+
elementInjector: injector,
|
|
804
743
|
});
|
|
805
744
|
const instance = componentRef.instance;
|
|
806
745
|
const hostElement = componentRef.location.nativeElement;
|
|
@@ -815,7 +754,37 @@ const attachView = (zone, environmentInjector, injector, applicationRef, elRefMa
|
|
|
815
754
|
if (elementReferenceKey && instance[elementReferenceKey] !== undefined) {
|
|
816
755
|
console.error(`[Ionic Error]: ${elementReferenceKey} is a reserved property when using ${container.tagName.toLowerCase()}. Rename or remove the "${elementReferenceKey}" property from ${component.name}.`);
|
|
817
756
|
}
|
|
818
|
-
|
|
757
|
+
/**
|
|
758
|
+
* Angular 14.1 added support for setInput
|
|
759
|
+
* so we need to fall back to Object.assign
|
|
760
|
+
* for Angular 14.0.
|
|
761
|
+
*/
|
|
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
|
+
}
|
|
784
|
+
}
|
|
785
|
+
else {
|
|
786
|
+
Object.assign(instance, params);
|
|
787
|
+
}
|
|
819
788
|
}
|
|
820
789
|
if (cssClasses) {
|
|
821
790
|
for (const cssClass of cssClasses) {
|
|
@@ -846,23 +815,6 @@ const bindLifecycleEvents = (zone, instance, element) => {
|
|
|
846
815
|
return () => unregisters.forEach((fn) => fn());
|
|
847
816
|
});
|
|
848
817
|
};
|
|
849
|
-
const NavParamsToken = new InjectionToken('NavParamsToken');
|
|
850
|
-
const getProviders = (params) => {
|
|
851
|
-
return [
|
|
852
|
-
{
|
|
853
|
-
provide: NavParamsToken,
|
|
854
|
-
useValue: params,
|
|
855
|
-
},
|
|
856
|
-
{
|
|
857
|
-
provide: NavParams,
|
|
858
|
-
useFactory: provideNavParamsInjectable,
|
|
859
|
-
deps: [NavParamsToken],
|
|
860
|
-
},
|
|
861
|
-
];
|
|
862
|
-
};
|
|
863
|
-
const provideNavParamsInjectable = (params) => {
|
|
864
|
-
return new NavParams(params);
|
|
865
|
-
};
|
|
866
818
|
|
|
867
819
|
// TODO: Is there a way we can grab this from angular-component-lib instead?
|
|
868
820
|
const proxyInputs = (Cmp, inputs) => {
|
|
@@ -1347,9 +1299,6 @@ class StackController {
|
|
|
1347
1299
|
if (enteringEl && enteringEl !== leavingEl) {
|
|
1348
1300
|
enteringEl.classList.add('ion-page');
|
|
1349
1301
|
enteringEl.classList.add('ion-page-invisible');
|
|
1350
|
-
if (enteringEl.parentElement !== containerEl) {
|
|
1351
|
-
containerEl.appendChild(enteringEl);
|
|
1352
|
-
}
|
|
1353
1302
|
if (containerEl.commit) {
|
|
1354
1303
|
return containerEl.commit(enteringEl, leavingEl, {
|
|
1355
1304
|
duration: direction === undefined ? 0 : undefined,
|
|
@@ -1413,7 +1362,8 @@ const cleanup = (activeRoute, views, viewsSnapshot, location, zone) => {
|
|
|
1413
1362
|
// TODO(FW-2827): types
|
|
1414
1363
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
|
1415
1364
|
class IonRouterOutlet {
|
|
1416
|
-
constructor(name, tabs, commonLocation, elementRef, router, zone, activatedRoute, parentOutlet) {
|
|
1365
|
+
constructor(name, tabs, commonLocation, elementRef, router, zone, activatedRoute, outletContent, parentOutlet) {
|
|
1366
|
+
this.outletContent = outletContent;
|
|
1417
1367
|
this.parentOutlet = parentOutlet;
|
|
1418
1368
|
this.activatedView = null;
|
|
1419
1369
|
// Maintain map of activated route proxies for each component instance
|
|
@@ -1600,8 +1550,16 @@ class IonRouterOutlet {
|
|
|
1600
1550
|
const injector = new OutletInjector(activatedRouteProxy, childContexts, this.location.injector);
|
|
1601
1551
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1602
1552
|
const component = snapshot.routeConfig.component ?? snapshot.component;
|
|
1603
|
-
|
|
1604
|
-
|
|
1553
|
+
/**
|
|
1554
|
+
* View components need to be added as a child of ion-router-outlet
|
|
1555
|
+
* for page transitions and swipe to go back.
|
|
1556
|
+
* However, createComponent mounts components as siblings of the
|
|
1557
|
+
* ViewContainerRef. As a result, outletContent must reference
|
|
1558
|
+
* an ng-container inside of ion-router-outlet and not
|
|
1559
|
+
* ion-router-outlet itself.
|
|
1560
|
+
*/
|
|
1561
|
+
cmpRef = this.activated = this.outletContent.createComponent(component, {
|
|
1562
|
+
index: this.outletContent.length,
|
|
1605
1563
|
injector,
|
|
1606
1564
|
environmentInjector: environmentInjector ?? this.environmentInjector,
|
|
1607
1565
|
});
|
|
@@ -1720,7 +1678,7 @@ class IonRouterOutlet {
|
|
|
1720
1678
|
this.currentActivatedRoute$.next({ component, activatedRoute });
|
|
1721
1679
|
}
|
|
1722
1680
|
}
|
|
1723
|
-
/** @nocollapse */ IonRouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonRouterOutlet, deps: [{ token: 'name', attribute: true }, { token: 'tabs', attribute: true, optional: true }, { token: i1.Location }, { token: i0.ElementRef }, { token: i3.Router }, { token: i0.NgZone }, { token: i3.ActivatedRoute }, { token: IonRouterOutlet, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1681
|
+
/** @nocollapse */ IonRouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonRouterOutlet, deps: [{ token: 'name', attribute: true }, { token: 'tabs', attribute: true, optional: true }, { token: i1.Location }, { token: i0.ElementRef }, { token: i3.Router }, { token: i0.NgZone }, { token: i3.ActivatedRoute }, { token: i0.ViewContainerRef }, { token: IonRouterOutlet, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1724
1682
|
/** @nocollapse */ IonRouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: IonRouterOutlet, selector: "ion-router-outlet", inputs: { animated: "animated", animation: "animation", mode: "mode", swipeGesture: "swipeGesture", name: "name" }, outputs: { stackWillChange: "stackWillChange", stackDidChange: "stackDidChange", activateEvents: "activate", deactivateEvents: "deactivate" }, exportAs: ["outlet"], ngImport: i0 });
|
|
1725
1683
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonRouterOutlet, decorators: [{
|
|
1726
1684
|
type: Directive,
|
|
@@ -1738,7 +1696,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
1738
1696
|
}, {
|
|
1739
1697
|
type: Attribute,
|
|
1740
1698
|
args: ['tabs']
|
|
1741
|
-
}] }, { type: i1.Location }, { type: i0.ElementRef }, { type: i3.Router }, { type: i0.NgZone }, { type: i3.ActivatedRoute }, { type: IonRouterOutlet, decorators: [{
|
|
1699
|
+
}] }, { type: i1.Location }, { type: i0.ElementRef }, { type: i3.Router }, { type: i0.NgZone }, { type: i3.ActivatedRoute }, { type: i0.ViewContainerRef }, { type: IonRouterOutlet, decorators: [{
|
|
1742
1700
|
type: SkipSelf
|
|
1743
1701
|
}, {
|
|
1744
1702
|
type: Optional
|
|
@@ -2457,5 +2415,5 @@ class OverlayBaseController {
|
|
|
2457
2415
|
* Generated bundle index. Do not edit.
|
|
2458
2416
|
*/
|
|
2459
2417
|
|
|
2460
|
-
export { AngularDelegate, Config, ConfigToken, DomController, IonBackButton, IonModal, IonNav, IonPopover, IonRouterOutlet, IonTabs, IonicRouteStrategy, MenuController, NavController,
|
|
2418
|
+
export { AngularDelegate, Config, ConfigToken, DomController, IonBackButton, IonModal, IonNav, IonPopover, IonRouterOutlet, IonTabs, IonicRouteStrategy, MenuController, NavController, OverlayBaseController, Platform, ProxyCmp, RouterLinkDelegateDirective, RouterLinkWithHrefDelegateDirective, ValueAccessor, bindLifecycleEvents, provideComponentInputBinding, raf, setIonicClasses };
|
|
2461
2419
|
//# sourceMappingURL=ionic-angular-common.mjs.map
|