@ionic/angular 9.0.7-dev.11791305593.188c8151 → 9.0.7-dev.11791381676.118a7a15

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.
@@ -16,7 +16,6 @@ export declare abstract class IonRouterOutlet implements OnDestroy, OnInit {
16
16
  private proxyMap;
17
17
  private currentActivatedRoute$;
18
18
  private activated;
19
- private unbindParentLifecycle?;
20
19
  /** @internal */
21
20
  get activatedComponentRef(): ComponentRef<any> | null;
22
21
  private _activatedRoute;
@@ -46,17 +45,6 @@ export declare abstract class IonRouterOutlet implements OnDestroy, OnInit {
46
45
  getContext(): OutletContext | null;
47
46
  ngOnInit(): void;
48
47
  private initializeOutletWithName;
49
- /**
50
- * Core doesn't bubble lifecycle events, so forward the ones on the page
51
- * hosting this outlet (such as a page containing `ion-tabs`) to the page
52
- * active in this outlet. Enter events only go to a page that left with the
53
- * parent page.
54
- */
55
- private bindParentLifecycle;
56
- /**
57
- * The page in the parent outlet that contains this outlet, if any.
58
- */
59
- private getParentPageElement;
60
48
  get isActivated(): boolean;
61
49
  get component(): Record<string, unknown>;
62
50
  get activatedRoute(): ActivatedRoute;
@@ -1,6 +1,6 @@
1
1
  import { ViewContainerRef, inject, Attribute, Directive, EventEmitter, Optional, Output, SkipSelf, EnvironmentInjector, Input, InjectionToken, Injectable, reflectComponentType, } from '@angular/core';
2
2
  import { Router, ActivatedRoute, ChildrenOutletContexts, PRIMARY_OUTLET } from '@angular/router';
3
- import { LIFECYCLE_DID_ENTER, LIFECYCLE_DID_LEAVE, LIFECYCLE_WILL_ENTER, LIFECYCLE_WILL_LEAVE, componentOnReady, } from '@ionic/core/components';
3
+ import { componentOnReady } from '@ionic/core/components';
4
4
  import { BehaviorSubject, combineLatest, of } from 'rxjs';
5
5
  import { distinctUntilChanged, filter, switchMap } from 'rxjs/operators';
6
6
  import { Config } from '../../providers/config';
@@ -10,24 +10,6 @@ import { getUrl, isTabSwitch } from './stack-utils';
10
10
  import * as i0 from "@angular/core";
11
11
  import * as i1 from "@angular/common";
12
12
  import * as i2 from "@angular/router";
13
- /**
14
- * A page that left along with its parent page is still the active view of its
15
- * outlet. If the user comes back to a different page in that outlet, the
16
- * outlet's own transition fires leave on it a second time, so swallow leave
17
- * events on it until it enters again. Unblock on `ionViewDidEnter`, since a
18
- * cancelled swipe back only fires `ionViewWillEnter`.
19
- */
20
- const blockRepeatLeave = (pageEl) => {
21
- // Capture so this runs before the page's own lifecycle listeners.
22
- const block = (ev) => ev.stopImmediatePropagation();
23
- const unblock = () => {
24
- pageEl.removeEventListener(LIFECYCLE_WILL_LEAVE, block, true);
25
- pageEl.removeEventListener(LIFECYCLE_DID_LEAVE, block, true);
26
- };
27
- pageEl.addEventListener(LIFECYCLE_WILL_LEAVE, block, true);
28
- pageEl.addEventListener(LIFECYCLE_DID_LEAVE, block, true);
29
- pageEl.addEventListener(LIFECYCLE_DID_ENTER, unblock, { capture: true, once: true });
30
- };
31
13
  // TODO(FW-2827): types
32
14
  export class IonRouterOutlet {
33
15
  parentOutlet;
@@ -41,7 +23,6 @@ export class IonRouterOutlet {
41
23
  // Keep the latest activated route in a subject for the proxy routes to switch map to
42
24
  currentActivatedRoute$ = new BehaviorSubject(null);
43
25
  activated = null;
44
- unbindParentLifecycle;
45
26
  /** @internal */
46
27
  get activatedComponentRef() {
47
28
  return this.activated;
@@ -94,7 +75,6 @@ export class IonRouterOutlet {
94
75
  this.parentContexts.onChildOutletCreated(this.name, this);
95
76
  }
96
77
  ngOnDestroy() {
97
- this.unbindParentLifecycle?.();
98
78
  this.stackCtrl.destroy();
99
79
  this.inputBinder?.unsubscribeFromRouteData(this);
100
80
  }
@@ -103,7 +83,6 @@ export class IonRouterOutlet {
103
83
  }
104
84
  ngOnInit() {
105
85
  this.initializeOutletWithName();
106
- this.bindParentLifecycle();
107
86
  }
108
87
  // Note: Ionic deviates from the Angular Router implementation here
109
88
  initializeOutletWithName() {
@@ -121,95 +100,6 @@ export class IonRouterOutlet {
121
100
  }
122
101
  });
123
102
  }
124
- /**
125
- * Core doesn't bubble lifecycle events, so forward the ones on the page
126
- * hosting this outlet (such as a page containing `ion-tabs`) to the page
127
- * active in this outlet. Enter events only go to a page that left with the
128
- * parent page.
129
- */
130
- bindParentLifecycle() {
131
- const parentPageEl = this.getParentPageElement();
132
- if (!parentPageEl) {
133
- return;
134
- }
135
- let leftWithParent;
136
- /**
137
- * Apps using the workaround from
138
- * https://github.com/ionic-team/ionic-framework/issues/16834 already
139
- * re-dispatch the parent's lifecycle events onto the active tab, so track
140
- * whether the active page got the event to avoid firing it twice.
141
- */
142
- let parentEventType;
143
- let activeViewReceived = false;
144
- const onParentEventStart = (ev) => {
145
- if (ev.target === parentPageEl) {
146
- parentEventType = ev.type;
147
- activeViewReceived = false;
148
- }
149
- };
150
- const onOutletEvent = (ev) => {
151
- if (ev.type === parentEventType && ev.target === this.stackCtrl.getActiveView()?.element) {
152
- activeViewReceived = true;
153
- }
154
- };
155
- const forward = (ev) => {
156
- const alreadyReceived = activeViewReceived;
157
- parentEventType = undefined;
158
- activeViewReceived = false;
159
- const activeView = this.stackCtrl.getActiveView();
160
- if (!activeView) {
161
- return;
162
- }
163
- const isEnter = ev.type === LIFECYCLE_WILL_ENTER || ev.type === LIFECYCLE_DID_ENTER;
164
- if (isEnter && activeView !== leftWithParent) {
165
- return;
166
- }
167
- if (!alreadyReceived) {
168
- activeView.element.dispatchEvent(new CustomEvent(ev.type, { bubbles: false, cancelable: false }));
169
- }
170
- if (ev.type === LIFECYCLE_DID_LEAVE) {
171
- leftWithParent = activeView;
172
- blockRepeatLeave(activeView.element);
173
- }
174
- else if (ev.type === LIFECYCLE_DID_ENTER) {
175
- leftWithParent = undefined;
176
- }
177
- };
178
- /**
179
- * Capture listeners see the event before the parent page's own hooks run,
180
- * and see events dispatched on pages in this outlet even though they
181
- * don't bubble. The bubble-phase `forward` listener runs after the parent
182
- * page's own hooks because those are bound when the page is created,
183
- * before this outlet inits.
184
- */
185
- const events = [LIFECYCLE_WILL_ENTER, LIFECYCLE_DID_ENTER, LIFECYCLE_WILL_LEAVE, LIFECYCLE_DID_LEAVE];
186
- events.forEach((eventName) => {
187
- parentPageEl.addEventListener(eventName, onParentEventStart, true);
188
- parentPageEl.addEventListener(eventName, forward);
189
- this.nativeEl.addEventListener(eventName, onOutletEvent, true);
190
- });
191
- this.unbindParentLifecycle = () => {
192
- events.forEach((eventName) => {
193
- parentPageEl.removeEventListener(eventName, onParentEventStart, true);
194
- parentPageEl.removeEventListener(eventName, forward);
195
- this.nativeEl.removeEventListener(eventName, onOutletEvent, true);
196
- });
197
- };
198
- }
199
- /**
200
- * The page in the parent outlet that contains this outlet, if any.
201
- */
202
- getParentPageElement() {
203
- const parentOutletEl = this.parentOutlet?.nativeEl;
204
- if (!parentOutletEl) {
205
- return undefined;
206
- }
207
- let el = this.nativeEl;
208
- while (el && el.parentElement !== parentOutletEl) {
209
- el = el.parentElement;
210
- }
211
- return el ?? undefined;
212
- }
213
103
  get isActivated() {
214
104
  return !!this.activated;
215
105
  }
@@ -1 +1 @@
1
- {"version":3,"file":"router-outlet.js","sourceRoot":"","sources":["../../../../src/common/directives/navigation/router-outlet.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,gBAAgB,EAChB,MAAM,EACN,SAAS,EACT,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,mBAAmB,EACnB,KAAK,EACL,cAAc,EACd,UAAU,EACV,oBAAoB,GACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAiB,MAAM,EAAE,cAAc,EAAE,sBAAsB,EAAE,cAAc,EAAQ,MAAM,iBAAiB,CAAC;AACtH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAc,eAAe,EAAgB,aAAa,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AACpF,OAA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AAS,KAAK,IAAI,EACjC,CAAC;gBACD,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC;gBACtC,OAAO;YACT,CAAC;YAED,MAAM,MAAM,GAAG,oBAAoB,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;YAC9D,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC;gBACtC,OAAO;YACT,CAAC;YAED,KAAK,MAAM,EAAE,YAAY,EAAE,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;gBAC7C,MAAM,CAAC,qBAAqB,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YAC1E,CAAC;QACH,CAAC,CAAC,CAAC;QAEL,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC7D,CAAC;0HAvDG,0BAA0B;8HAA1B,0BAA0B;;2FAA1B,0BAA0B;kBAD/B,UAAU;;AA2DX,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAa,EAAE;IACzD,OAAO;QACL,OAAO,EAAE,YAAY;QACrB,UAAU,EAAE,4BAA4B;QACxC,IAAI,EAAE,CAAC,MAAM,CAAC;KACf,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,4BAA4B,CAAC,MAAe;IACnD;;;OAGG;IACH,IAAK,MAAc,EAAE,4BAA4B,EAAE,CAAC;QAClD,OAAO,IAAI,0BAA0B,EAAE,CAAC;IAC1C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { Location } from '@angular/common';\nimport {\n ComponentRef,\n ElementRef,\n Injector,\n NgZone,\n OnDestroy,\n OnInit,\n ViewContainerRef,\n inject,\n Attribute,\n Directive,\n EventEmitter,\n Optional,\n Output,\n SkipSelf,\n EnvironmentInjector,\n Input,\n InjectionToken,\n Injectable,\n reflectComponentType,\n} from '@angular/core';\nimport type { Provider } from '@angular/core';\nimport { OutletContext, Router, ActivatedRoute, ChildrenOutletContexts, PRIMARY_OUTLET, Data } from '@angular/router';\nimport {\n LIFECYCLE_DID_ENTER,\n LIFECYCLE_DID_LEAVE,\n LIFECYCLE_WILL_ENTER,\n LIFECYCLE_WILL_LEAVE,\n componentOnReady,\n} from '@ionic/core/components';\nimport type { AnimationBuilder } from '@ionic/core/components';\nimport { Observable, BehaviorSubject, Subscription, combineLatest, of } from 'rxjs';\nimport { distinctUntilChanged, filter, switchMap } from 'rxjs/operators';\n\nimport { Config } from '../../providers/config';\nimport { NavController } from '../../providers/nav-controller';\n\nimport { StackController } from './stack-controller';\nimport { RouteView, StackDidChangeEvent, StackWillChangeEvent, getUrl, isTabSwitch } from './stack-utils';\n\n/**\n * A page that left along with its parent page is still the active view of its\n * outlet. If the user comes back to a different page in that outlet, the\n * outlet's own transition fires leave on it a second time, so swallow leave\n * events on it until it enters again. Unblock on `ionViewDidEnter`, since a\n * cancelled swipe back only fires `ionViewWillEnter`.\n */\nconst blockRepeatLeave = (pageEl: HTMLElement) => {\n // Capture so this runs before the page's own lifecycle listeners.\n const block = (ev: Event) => ev.stopImmediatePropagation();\n const unblock = () => {\n pageEl.removeEventListener(LIFECYCLE_WILL_LEAVE, block, true);\n pageEl.removeEventListener(LIFECYCLE_DID_LEAVE, block, true);\n };\n\n pageEl.addEventListener(LIFECYCLE_WILL_LEAVE, block, true);\n pageEl.addEventListener(LIFECYCLE_DID_LEAVE, block, true);\n pageEl.addEventListener(LIFECYCLE_DID_ENTER, unblock, { capture: true, once: true });\n};\n\n// TODO(FW-2827): types\n\n@Directive({\n selector: 'ion-router-outlet',\n exportAs: 'outlet',\n // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property\n inputs: ['animated', 'animation', 'mode', 'swipeGesture'],\n})\nexport abstract class IonRouterOutlet implements OnDestroy, OnInit {\n abstract outletContent: any;\n\n nativeEl: HTMLIonRouterOutletElement;\n activatedView: RouteView | null = null;\n tabsPrefix: string | undefined;\n\n private _swipeGesture?: boolean;\n private stackCtrl: StackController;\n\n // Maintain map of activated route proxies for each component instance\n private proxyMap = new WeakMap<any, ActivatedRoute>();\n // Keep the latest activated route in a subject for the proxy routes to switch map to\n private currentActivatedRoute$ = new BehaviorSubject<{ component: any; activatedRoute: ActivatedRoute } | null>(null);\n\n private activated: ComponentRef<any> | null = null;\n private unbindParentLifecycle?: () => void;\n /** @internal */\n get activatedComponentRef(): ComponentRef<any> | null {\n return this.activated;\n }\n private _activatedRoute: ActivatedRoute | null = null;\n\n /**\n * The name of the outlet\n */\n @Input() name = PRIMARY_OUTLET;\n\n /** @internal */\n @Output() stackWillChange = new EventEmitter<StackWillChangeEvent>();\n /** @internal */\n @Output() stackDidChange = new EventEmitter<StackDidChangeEvent>();\n\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('activate') activateEvents = new EventEmitter<any>();\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n private parentContexts = inject(ChildrenOutletContexts);\n private location = inject(ViewContainerRef);\n private environmentInjector = inject(EnvironmentInjector);\n private inputBinder = inject(INPUT_BINDER, { optional: true });\n /** @nodoc */\n readonly supportsBindingToComponentInputs = true;\n\n // Ionic providers\n private config = inject(Config);\n private navCtrl = inject(NavController);\n\n set animation(animation: AnimationBuilder) {\n this.nativeEl.animation = animation;\n }\n\n set animated(animated: boolean) {\n this.nativeEl.animated = animated;\n }\n\n set swipeGesture(swipe: boolean) {\n this._swipeGesture = swipe;\n\n this.nativeEl.swipeHandler = swipe\n ? {\n canStart: () => this.stackCtrl.canGoBack(1) && !this.stackCtrl.hasRunningTask(),\n onStart: () => this.stackCtrl.startBackTransition(),\n onEnd: (shouldContinue) => this.stackCtrl.endBackTransition(shouldContinue),\n }\n : undefined;\n\n this.nativeEl.swipeGesture = swipe;\n }\n\n constructor(\n @Attribute('name') name: string,\n @Optional() @Attribute('tabs') tabs: string,\n commonLocation: Location,\n elementRef: ElementRef,\n router: Router,\n zone: NgZone,\n activatedRoute: ActivatedRoute,\n @SkipSelf() @Optional() readonly parentOutlet?: IonRouterOutlet\n ) {\n this.nativeEl = elementRef.nativeElement;\n this.name = name || PRIMARY_OUTLET;\n this.tabsPrefix = tabs === 'true' ? getUrl(router, activatedRoute) : undefined;\n this.stackCtrl = new StackController(this.tabsPrefix, this.nativeEl, router, this.navCtrl, zone, commonLocation);\n this.parentContexts.onChildOutletCreated(this.name, this as any);\n }\n\n ngOnDestroy(): void {\n this.unbindParentLifecycle?.();\n this.stackCtrl.destroy();\n this.inputBinder?.unsubscribeFromRouteData(this);\n }\n\n getContext(): OutletContext | null {\n return this.parentContexts.getContext(this.name);\n }\n\n ngOnInit(): void {\n this.initializeOutletWithName();\n this.bindParentLifecycle();\n }\n\n // Note: Ionic deviates from the Angular Router implementation here\n private initializeOutletWithName() {\n if (!this.activated) {\n // If the outlet was not instantiated at the time the route got activated we need to populate\n // the outlet when it is initialized (ie inside a NgIf)\n const context = this.getContext();\n if (context?.route) {\n this.activateWith(context.route, context.injector);\n }\n }\n\n new Promise((resolve) => componentOnReady(this.nativeEl, resolve)).then(() => {\n if (this._swipeGesture === undefined) {\n this.swipeGesture = this.config.getBoolean('swipeBackEnabled', (this.nativeEl as any).mode === 'ios');\n }\n });\n }\n\n /**\n * Core doesn't bubble lifecycle events, so forward the ones on the page\n * hosting this outlet (such as a page containing `ion-tabs`) to the page\n * active in this outlet. Enter events only go to a page that left with the\n * parent page.\n */\n private bindParentLifecycle() {\n const parentPageEl = this.getParentPageElement();\n if (!parentPageEl) {\n return;\n }\n\n let leftWithParent: RouteView | undefined;\n\n /**\n * Apps using the workaround from\n * https://github.com/ionic-team/ionic-framework/issues/16834 already\n * re-dispatch the parent's lifecycle events onto the active tab, so track\n * whether the active page got the event to avoid firing it twice.\n */\n let parentEventType: string | undefined;\n let activeViewReceived = false;\n const onParentEventStart = (ev: Event) => {\n if (ev.target === parentPageEl) {\n parentEventType = ev.type;\n activeViewReceived = false;\n }\n };\n const onOutletEvent = (ev: Event) => {\n if (ev.type === parentEventType && ev.target === this.stackCtrl.getActiveView()?.element) {\n activeViewReceived = true;\n }\n };\n\n const forward = (ev: Event) => {\n const alreadyReceived = activeViewReceived;\n parentEventType = undefined;\n activeViewReceived = false;\n\n const activeView = this.stackCtrl.getActiveView();\n if (!activeView) {\n return;\n }\n\n const isEnter = ev.type === LIFECYCLE_WILL_ENTER || ev.type === LIFECYCLE_DID_ENTER;\n if (isEnter && activeView !== leftWithParent) {\n return;\n }\n\n if (!alreadyReceived) {\n activeView.element.dispatchEvent(new CustomEvent(ev.type, { bubbles: false, cancelable: false }));\n }\n\n if (ev.type === LIFECYCLE_DID_LEAVE) {\n leftWithParent = activeView;\n blockRepeatLeave(activeView.element);\n } else if (ev.type === LIFECYCLE_DID_ENTER) {\n leftWithParent = undefined;\n }\n };\n\n /**\n * Capture listeners see the event before the parent page's own hooks run,\n * and see events dispatched on pages in this outlet even though they\n * don't bubble. The bubble-phase `forward` listener runs after the parent\n * page's own hooks because those are bound when the page is created,\n * before this outlet inits.\n */\n const events = [LIFECYCLE_WILL_ENTER, LIFECYCLE_DID_ENTER, LIFECYCLE_WILL_LEAVE, LIFECYCLE_DID_LEAVE];\n events.forEach((eventName) => {\n parentPageEl.addEventListener(eventName, onParentEventStart, true);\n parentPageEl.addEventListener(eventName, forward);\n this.nativeEl.addEventListener(eventName, onOutletEvent, true);\n });\n this.unbindParentLifecycle = () => {\n events.forEach((eventName) => {\n parentPageEl.removeEventListener(eventName, onParentEventStart, true);\n parentPageEl.removeEventListener(eventName, forward);\n this.nativeEl.removeEventListener(eventName, onOutletEvent, true);\n });\n };\n }\n\n /**\n * The page in the parent outlet that contains this outlet, if any.\n */\n private getParentPageElement(): HTMLElement | undefined {\n const parentOutletEl = this.parentOutlet?.nativeEl;\n if (!parentOutletEl) {\n return undefined;\n }\n\n let el: HTMLElement | null = this.nativeEl;\n while (el && el.parentElement !== parentOutletEl) {\n el = el.parentElement;\n }\n return el ?? undefined;\n }\n\n get isActivated(): boolean {\n return !!this.activated;\n }\n\n get component(): Record<string, unknown> {\n if (!this.activated) {\n throw new Error('Outlet is not activated');\n }\n return this.activated.instance;\n }\n\n get activatedRoute(): ActivatedRoute {\n if (!this.activated) {\n throw new Error('Outlet is not activated');\n }\n return this._activatedRoute as ActivatedRoute;\n }\n\n get activatedRouteData(): Data {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n detach(): ComponentRef<any> {\n throw new Error('incompatible reuse strategy');\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n attach(_ref: ComponentRef<any>, _activatedRoute: ActivatedRoute): void {\n throw new Error('incompatible reuse strategy');\n }\n\n deactivate(): void {\n if (this.activated) {\n if (this.activatedView) {\n const context = this.getContext()!;\n this.activatedView.savedData = new Map(context.children['contexts']);\n\n /**\n * Angular v11.2.10 introduced a change\n * where this route context is cleared out when\n * a router-outlet is deactivated, However,\n * we need this route information in order to\n * return a user back to the correct tab when\n * leaving and then going back to the tab context.\n */\n const primaryOutlet = this.activatedView.savedData.get('primary');\n if (primaryOutlet && context.route) {\n primaryOutlet.route = { ...context.route };\n }\n\n /**\n * Ensure we are saving the NavigationExtras\n * data otherwise it will be lost\n */\n this.activatedView.savedExtras = {};\n if (context.route) {\n const contextSnapshot = context.route.snapshot;\n\n this.activatedView.savedExtras.queryParams = contextSnapshot.queryParams;\n (this.activatedView.savedExtras.fragment as string | null) = contextSnapshot.fragment;\n }\n }\n const c = this.component;\n this.activatedView = null;\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n }\n\n activateWith(activatedRoute: ActivatedRoute, environmentInjector: EnvironmentInjector | null): void {\n if (this.isActivated) {\n throw new Error('Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n\n let cmpRef: any;\n let enteringView = this.stackCtrl.getExistingView(activatedRoute);\n if (enteringView) {\n cmpRef = this.activated = enteringView.ref;\n const saved = enteringView.savedData;\n if (saved) {\n // self-restore\n const context = this.getContext()!;\n context.children['contexts'] = saved;\n }\n // Updated activated route proxy for this component\n this.updateActivatedRouteProxy(cmpRef.instance, activatedRoute);\n } else {\n const snapshot = (activatedRoute as any)._futureSnapshot;\n\n /**\n * Angular 14 introduces a new `loadComponent` property to the route config.\n * This function will assign a `component` property to the route snapshot.\n * We check for the presence of this property to determine if the route is\n * using standalone components.\n */\n const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n\n // We create an activated route proxy object that will maintain future updates for this component\n // over its lifecycle in the stack.\n const component$ = new BehaviorSubject<any>(null);\n const activatedRouteProxy = this.createActivatedRouteProxy(component$, activatedRoute);\n\n const injector = new OutletInjector(activatedRouteProxy, childContexts, this.location.injector);\n\n const component = snapshot.routeConfig!.component ?? snapshot.component;\n\n /**\n * View components need to be added as a child of ion-router-outlet\n * for page transitions and swipe to go back.\n * However, createComponent mounts components as siblings of the\n * ViewContainerRef. As a result, outletContent must reference\n * an ng-container inside of ion-router-outlet and not\n * ion-router-outlet itself.\n */\n cmpRef = this.activated = this.outletContent.createComponent(component, {\n index: this.outletContent.length,\n injector,\n environmentInjector: environmentInjector ?? this.environmentInjector,\n });\n\n // Once the component is created we can push it to our local subject supplied to the proxy\n component$.next(cmpRef.instance);\n\n // Calling `markForCheck` to make sure we will run the change detection when the\n // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n\n /**\n * At this point this.activated has been set earlier\n * in this function, so it is guaranteed to be non-null.\n */\n enteringView = this.stackCtrl.createView(this.activated!, activatedRoute);\n\n // Store references to the proxy by component\n this.proxyMap.set(cmpRef.instance, activatedRouteProxy);\n this.currentActivatedRoute$.next({ component: cmpRef.instance, activatedRoute });\n }\n\n this.inputBinder?.bindActivatedRouteToOutletComponent(this);\n\n this.activatedView = enteringView;\n\n /**\n * The top outlet is set prior to the entering view's transition completing,\n * so that when we have nested outlets (e.g. ion-tabs inside an ion-router-outlet),\n * the tabs outlet will be assigned as the top outlet when a view inside tabs is\n * activated.\n *\n * In this scenario, activeWith is called for both the tabs and the root router outlet.\n * To avoid a race condition, we assign the top outlet synchronously.\n */\n this.navCtrl.setTopOutlet(this);\n\n const leavingView = this.stackCtrl.getActiveView();\n\n this.stackWillChange.emit({\n enteringView,\n tabSwitch: isTabSwitch(enteringView, leavingView),\n });\n\n this.stackCtrl.setActive(enteringView).then((data) => {\n this.activateEvents.emit(cmpRef.instance);\n this.stackDidChange.emit(data);\n });\n }\n\n /**\n * Returns `true` if there are pages in the stack to go back.\n */\n canGoBack(deep = 1, stackId?: string): boolean {\n return this.stackCtrl.canGoBack(deep, stackId);\n }\n\n /**\n * Resolves to `true` if it the outlet was able to sucessfully pop the last N pages.\n */\n pop(deep = 1, stackId?: string): Promise<boolean> {\n return this.stackCtrl.pop(deep, stackId);\n }\n\n /**\n * Returns the URL of the active page of each stack.\n */\n getLastUrl(stackId?: string): string | undefined {\n const active = this.stackCtrl.getLastUrl(stackId);\n return active ? active.url : undefined;\n }\n\n /**\n * Returns the RouteView of the active page of each stack.\n * @internal\n */\n getLastRouteView(stackId?: string): RouteView | undefined {\n return this.stackCtrl.getLastUrl(stackId);\n }\n\n /**\n * Returns the root view in the tab stack.\n * @internal\n */\n getRootView(stackId?: string): RouteView | undefined {\n return this.stackCtrl.getRootUrl(stackId);\n }\n\n /**\n * Returns the active stack ID. In the context of ion-tabs, it means the active tab.\n */\n getActiveStackId(): string | undefined {\n return this.stackCtrl.getActiveStackId();\n }\n\n /**\n * Since the activated route can change over the life time of a component in an ion router outlet, we create\n * a proxy so that we can update the values over time as a user navigates back to components already in the stack.\n */\n private createActivatedRouteProxy(component$: Observable<any>, activatedRoute: ActivatedRoute): ActivatedRoute {\n const proxy: any = new ActivatedRoute();\n\n proxy._futureSnapshot = (activatedRoute as any)._futureSnapshot;\n proxy._routerState = (activatedRoute as any)._routerState;\n proxy.snapshot = activatedRoute.snapshot;\n proxy.outlet = activatedRoute.outlet;\n proxy.component = activatedRoute.component;\n\n // Setup wrappers for the observables so consumers don't have to worry about switching to new observables as the state updates\n (proxy as any)._paramMap = this.proxyObservable(component$, 'paramMap');\n (proxy as any)._queryParamMap = this.proxyObservable(component$, 'queryParamMap');\n proxy.url = this.proxyObservable(component$, 'url');\n proxy.params = this.proxyObservable(component$, 'params');\n proxy.queryParams = this.proxyObservable(component$, 'queryParams');\n proxy.fragment = this.proxyObservable(component$, 'fragment');\n proxy.data = this.proxyObservable(component$, 'data');\n\n return proxy as ActivatedRoute;\n }\n\n /**\n * Create a wrapped observable that will switch to the latest activated route matched by the given component\n */\n private proxyObservable(component$: Observable<any>, path: string): Observable<any> {\n return component$.pipe(\n // First wait until the component instance is pushed\n filter((component) => !!component),\n switchMap((component) =>\n this.currentActivatedRoute$.pipe(\n filter((current) => current !== null && current.component === component),\n switchMap((current) => current && (current.activatedRoute as any)[path]),\n distinctUntilChanged()\n )\n )\n );\n }\n\n /**\n * Updates the activated route proxy for the given component to the new incoming router state\n */\n private updateActivatedRouteProxy(component: any, activatedRoute: ActivatedRoute): void {\n const proxy = this.proxyMap.get(component);\n if (!proxy) {\n throw new Error(`Could not find activated route proxy for view`);\n }\n\n (proxy as any)._futureSnapshot = (activatedRoute as any)._futureSnapshot;\n (proxy as any)._routerState = (activatedRoute as any)._routerState;\n proxy.snapshot = activatedRoute.snapshot;\n proxy.outlet = activatedRoute.outlet;\n proxy.component = activatedRoute.component;\n\n this.currentActivatedRoute$.next({ component, activatedRoute });\n }\n}\n\nclass OutletInjector implements Injector {\n constructor(private route: ActivatedRoute, private childContexts: ChildrenOutletContexts, private parent: Injector) {}\n\n get(token: any, notFoundValue?: any): any {\n if (token === ActivatedRoute) {\n return this.route;\n }\n\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n\n return this.parent.get(token, notFoundValue);\n }\n}\n\n// TODO: FW-4785 - Remove this once Angular 15 support is dropped\nconst INPUT_BINDER = new InjectionToken<RoutedComponentInputBinder>('');\n\n/**\n * Injectable used as a tree-shakable provider for opting in to binding router data to component\n * inputs.\n *\n * The RouterOutlet registers itself with this service when an `ActivatedRoute` is attached or\n * activated. When this happens, the service subscribes to the `ActivatedRoute` observables (params,\n * queryParams, data) and sets the inputs of the component using `ComponentRef.setInput`.\n * Importantly, when an input does not have an item in the route data with a matching key, this\n * input is set to `undefined`. If it were not done this way, the previous information would be\n * retained if the data got removed from the route (i.e. if a query parameter is removed).\n *\n * The `RouterOutlet` should unregister itself when destroyed via `unsubscribeFromRouteData` so that\n * the subscriptions are cleaned up.\n */\n@Injectable()\nclass RoutedComponentInputBinder {\n private outletDataSubscriptions = new Map<IonRouterOutlet, Subscription>();\n\n bindActivatedRouteToOutletComponent(outlet: IonRouterOutlet): void {\n this.unsubscribeFromRouteData(outlet);\n this.subscribeToRouteData(outlet);\n }\n\n unsubscribeFromRouteData(outlet: IonRouterOutlet): void {\n this.outletDataSubscriptions.get(outlet)?.unsubscribe();\n this.outletDataSubscriptions.delete(outlet);\n }\n\n private subscribeToRouteData(outlet: IonRouterOutlet) {\n const { activatedRoute } = outlet;\n const dataSubscription = combineLatest([activatedRoute.queryParams, activatedRoute.params, activatedRoute.data])\n .pipe(\n switchMap(([queryParams, params, data], index) => {\n data = { ...queryParams, ...params, ...data };\n // Get the first result from the data subscription synchronously so it's available to\n // the component as soon as possible (and doesn't require a second change detection).\n if (index === 0) {\n return of(data);\n }\n // Promise.resolve is used to avoid synchronously writing the wrong data when\n // two of the Observables in the `combineLatest` stream emit one after\n // another.\n return Promise.resolve(data);\n })\n )\n .subscribe((data) => {\n // Outlet may have been deactivated or changed names to be associated with a different\n // route\n if (\n !outlet.isActivated ||\n !outlet.activatedComponentRef ||\n outlet.activatedRoute !== activatedRoute ||\n activatedRoute.component === null\n ) {\n this.unsubscribeFromRouteData(outlet);\n return;\n }\n\n const mirror = reflectComponentType(activatedRoute.component);\n if (!mirror) {\n this.unsubscribeFromRouteData(outlet);\n return;\n }\n\n for (const { templateName } of mirror.inputs) {\n outlet.activatedComponentRef.setInput(templateName, data[templateName]);\n }\n });\n\n this.outletDataSubscriptions.set(outlet, dataSubscription);\n }\n}\n\nexport const provideComponentInputBinding = (): Provider => {\n return {\n provide: INPUT_BINDER,\n useFactory: componentInputBindingFactory,\n deps: [Router],\n };\n};\n\nfunction componentInputBindingFactory(router?: Router) {\n /**\n * We cast the router to any here, since the componentInputBindingEnabled\n * property is not available until Angular v16.\n */\n if ((router as any)?.componentInputBindingEnabled) {\n return new RoutedComponentInputBinder();\n }\n return null;\n}\n"]}
1
+ {"version":3,"file":"router-outlet.js","sourceRoot":"","sources":["../../../../src/common/directives/navigation/router-outlet.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,gBAAgB,EAChB,MAAM,EACN,SAAS,EACT,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,mBAAmB,EACnB,KAAK,EACL,cAAc,EACd,UAAU,EACV,oBAAoB,GACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAiB,MAAM,EAAE,cAAc,EAAE,sBAAsB,EAAE,cAAc,EAAQ,MAAM,iBAAiB,CAAC;AACtH,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAc,eAAe,EAAgB,aAAa,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEzE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAwD,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;;;;AAE1G,uBAAuB;AAQvB,MAAM,OAAg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CAAC,MAAM,CAAC,CAAC;gBACtC,OAAO;YACT,CAAC;YAED,KAAK,MAAM,EAAE,YAAY,EAAE,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;gBAC7C,MAAM,CAAC,qBAAqB,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;YAC1E,CAAC;QACH,CAAC,CAAC,CAAC;QAEL,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC7D,CAAC;0HAvDG,0BAA0B;8HAA1B,0BAA0B;;2FAA1B,0BAA0B;kBAD/B,UAAU;;AA2DX,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAa,EAAE;IACzD,OAAO;QACL,OAAO,EAAE,YAAY;QACrB,UAAU,EAAE,4BAA4B;QACxC,IAAI,EAAE,CAAC,MAAM,CAAC;KACf,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,4BAA4B,CAAC,MAAe;IACnD;;;OAGG;IACH,IAAK,MAAc,EAAE,4BAA4B,EAAE,CAAC;QAClD,OAAO,IAAI,0BAA0B,EAAE,CAAC;IAC1C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { Location } from '@angular/common';\nimport {\n ComponentRef,\n ElementRef,\n Injector,\n NgZone,\n OnDestroy,\n OnInit,\n ViewContainerRef,\n inject,\n Attribute,\n Directive,\n EventEmitter,\n Optional,\n Output,\n SkipSelf,\n EnvironmentInjector,\n Input,\n InjectionToken,\n Injectable,\n reflectComponentType,\n} from '@angular/core';\nimport type { Provider } from '@angular/core';\nimport { OutletContext, Router, ActivatedRoute, ChildrenOutletContexts, PRIMARY_OUTLET, Data } from '@angular/router';\nimport { componentOnReady } from '@ionic/core/components';\nimport type { AnimationBuilder } from '@ionic/core/components';\nimport { Observable, BehaviorSubject, Subscription, combineLatest, of } from 'rxjs';\nimport { distinctUntilChanged, filter, switchMap } from 'rxjs/operators';\n\nimport { Config } from '../../providers/config';\nimport { NavController } from '../../providers/nav-controller';\n\nimport { StackController } from './stack-controller';\nimport { RouteView, StackDidChangeEvent, StackWillChangeEvent, getUrl, isTabSwitch } from './stack-utils';\n\n// TODO(FW-2827): types\n\n@Directive({\n selector: 'ion-router-outlet',\n exportAs: 'outlet',\n // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property\n inputs: ['animated', 'animation', 'mode', 'swipeGesture'],\n})\nexport abstract class IonRouterOutlet implements OnDestroy, OnInit {\n abstract outletContent: any;\n\n nativeEl: HTMLIonRouterOutletElement;\n activatedView: RouteView | null = null;\n tabsPrefix: string | undefined;\n\n private _swipeGesture?: boolean;\n private stackCtrl: StackController;\n\n // Maintain map of activated route proxies for each component instance\n private proxyMap = new WeakMap<any, ActivatedRoute>();\n // Keep the latest activated route in a subject for the proxy routes to switch map to\n private currentActivatedRoute$ = new BehaviorSubject<{ component: any; activatedRoute: ActivatedRoute } | null>(null);\n\n private activated: ComponentRef<any> | null = null;\n /** @internal */\n get activatedComponentRef(): ComponentRef<any> | null {\n return this.activated;\n }\n private _activatedRoute: ActivatedRoute | null = null;\n\n /**\n * The name of the outlet\n */\n @Input() name = PRIMARY_OUTLET;\n\n /** @internal */\n @Output() stackWillChange = new EventEmitter<StackWillChangeEvent>();\n /** @internal */\n @Output() stackDidChange = new EventEmitter<StackDidChangeEvent>();\n\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('activate') activateEvents = new EventEmitter<any>();\n // eslint-disable-next-line @angular-eslint/no-output-rename\n @Output('deactivate') deactivateEvents = new EventEmitter<any>();\n\n private parentContexts = inject(ChildrenOutletContexts);\n private location = inject(ViewContainerRef);\n private environmentInjector = inject(EnvironmentInjector);\n private inputBinder = inject(INPUT_BINDER, { optional: true });\n /** @nodoc */\n readonly supportsBindingToComponentInputs = true;\n\n // Ionic providers\n private config = inject(Config);\n private navCtrl = inject(NavController);\n\n set animation(animation: AnimationBuilder) {\n this.nativeEl.animation = animation;\n }\n\n set animated(animated: boolean) {\n this.nativeEl.animated = animated;\n }\n\n set swipeGesture(swipe: boolean) {\n this._swipeGesture = swipe;\n\n this.nativeEl.swipeHandler = swipe\n ? {\n canStart: () => this.stackCtrl.canGoBack(1) && !this.stackCtrl.hasRunningTask(),\n onStart: () => this.stackCtrl.startBackTransition(),\n onEnd: (shouldContinue) => this.stackCtrl.endBackTransition(shouldContinue),\n }\n : undefined;\n\n this.nativeEl.swipeGesture = swipe;\n }\n\n constructor(\n @Attribute('name') name: string,\n @Optional() @Attribute('tabs') tabs: string,\n commonLocation: Location,\n elementRef: ElementRef,\n router: Router,\n zone: NgZone,\n activatedRoute: ActivatedRoute,\n @SkipSelf() @Optional() readonly parentOutlet?: IonRouterOutlet\n ) {\n this.nativeEl = elementRef.nativeElement;\n this.name = name || PRIMARY_OUTLET;\n this.tabsPrefix = tabs === 'true' ? getUrl(router, activatedRoute) : undefined;\n this.stackCtrl = new StackController(this.tabsPrefix, this.nativeEl, router, this.navCtrl, zone, commonLocation);\n this.parentContexts.onChildOutletCreated(this.name, this as any);\n }\n\n ngOnDestroy(): void {\n this.stackCtrl.destroy();\n this.inputBinder?.unsubscribeFromRouteData(this);\n }\n\n getContext(): OutletContext | null {\n return this.parentContexts.getContext(this.name);\n }\n\n ngOnInit(): void {\n this.initializeOutletWithName();\n }\n\n // Note: Ionic deviates from the Angular Router implementation here\n private initializeOutletWithName() {\n if (!this.activated) {\n // If the outlet was not instantiated at the time the route got activated we need to populate\n // the outlet when it is initialized (ie inside a NgIf)\n const context = this.getContext();\n if (context?.route) {\n this.activateWith(context.route, context.injector);\n }\n }\n\n new Promise((resolve) => componentOnReady(this.nativeEl, resolve)).then(() => {\n if (this._swipeGesture === undefined) {\n this.swipeGesture = this.config.getBoolean('swipeBackEnabled', (this.nativeEl as any).mode === 'ios');\n }\n });\n }\n\n get isActivated(): boolean {\n return !!this.activated;\n }\n\n get component(): Record<string, unknown> {\n if (!this.activated) {\n throw new Error('Outlet is not activated');\n }\n return this.activated.instance;\n }\n\n get activatedRoute(): ActivatedRoute {\n if (!this.activated) {\n throw new Error('Outlet is not activated');\n }\n return this._activatedRoute as ActivatedRoute;\n }\n\n get activatedRouteData(): Data {\n if (this._activatedRoute) {\n return this._activatedRoute.snapshot.data;\n }\n return {};\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to detach the subtree\n */\n detach(): ComponentRef<any> {\n throw new Error('incompatible reuse strategy');\n }\n\n /**\n * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n attach(_ref: ComponentRef<any>, _activatedRoute: ActivatedRoute): void {\n throw new Error('incompatible reuse strategy');\n }\n\n deactivate(): void {\n if (this.activated) {\n if (this.activatedView) {\n const context = this.getContext()!;\n this.activatedView.savedData = new Map(context.children['contexts']);\n\n /**\n * Angular v11.2.10 introduced a change\n * where this route context is cleared out when\n * a router-outlet is deactivated, However,\n * we need this route information in order to\n * return a user back to the correct tab when\n * leaving and then going back to the tab context.\n */\n const primaryOutlet = this.activatedView.savedData.get('primary');\n if (primaryOutlet && context.route) {\n primaryOutlet.route = { ...context.route };\n }\n\n /**\n * Ensure we are saving the NavigationExtras\n * data otherwise it will be lost\n */\n this.activatedView.savedExtras = {};\n if (context.route) {\n const contextSnapshot = context.route.snapshot;\n\n this.activatedView.savedExtras.queryParams = contextSnapshot.queryParams;\n (this.activatedView.savedExtras.fragment as string | null) = contextSnapshot.fragment;\n }\n }\n const c = this.component;\n this.activatedView = null;\n this.activated = null;\n this._activatedRoute = null;\n this.deactivateEvents.emit(c);\n }\n }\n\n activateWith(activatedRoute: ActivatedRoute, environmentInjector: EnvironmentInjector | null): void {\n if (this.isActivated) {\n throw new Error('Cannot activate an already activated outlet');\n }\n this._activatedRoute = activatedRoute;\n\n let cmpRef: any;\n let enteringView = this.stackCtrl.getExistingView(activatedRoute);\n if (enteringView) {\n cmpRef = this.activated = enteringView.ref;\n const saved = enteringView.savedData;\n if (saved) {\n // self-restore\n const context = this.getContext()!;\n context.children['contexts'] = saved;\n }\n // Updated activated route proxy for this component\n this.updateActivatedRouteProxy(cmpRef.instance, activatedRoute);\n } else {\n const snapshot = (activatedRoute as any)._futureSnapshot;\n\n /**\n * Angular 14 introduces a new `loadComponent` property to the route config.\n * This function will assign a `component` property to the route snapshot.\n * We check for the presence of this property to determine if the route is\n * using standalone components.\n */\n const childContexts = this.parentContexts.getOrCreateContext(this.name).children;\n\n // We create an activated route proxy object that will maintain future updates for this component\n // over its lifecycle in the stack.\n const component$ = new BehaviorSubject<any>(null);\n const activatedRouteProxy = this.createActivatedRouteProxy(component$, activatedRoute);\n\n const injector = new OutletInjector(activatedRouteProxy, childContexts, this.location.injector);\n\n const component = snapshot.routeConfig!.component ?? snapshot.component;\n\n /**\n * View components need to be added as a child of ion-router-outlet\n * for page transitions and swipe to go back.\n * However, createComponent mounts components as siblings of the\n * ViewContainerRef. As a result, outletContent must reference\n * an ng-container inside of ion-router-outlet and not\n * ion-router-outlet itself.\n */\n cmpRef = this.activated = this.outletContent.createComponent(component, {\n index: this.outletContent.length,\n injector,\n environmentInjector: environmentInjector ?? this.environmentInjector,\n });\n\n // Once the component is created we can push it to our local subject supplied to the proxy\n component$.next(cmpRef.instance);\n\n // Calling `markForCheck` to make sure we will run the change detection when the\n // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.\n\n /**\n * At this point this.activated has been set earlier\n * in this function, so it is guaranteed to be non-null.\n */\n enteringView = this.stackCtrl.createView(this.activated!, activatedRoute);\n\n // Store references to the proxy by component\n this.proxyMap.set(cmpRef.instance, activatedRouteProxy);\n this.currentActivatedRoute$.next({ component: cmpRef.instance, activatedRoute });\n }\n\n this.inputBinder?.bindActivatedRouteToOutletComponent(this);\n\n this.activatedView = enteringView;\n\n /**\n * The top outlet is set prior to the entering view's transition completing,\n * so that when we have nested outlets (e.g. ion-tabs inside an ion-router-outlet),\n * the tabs outlet will be assigned as the top outlet when a view inside tabs is\n * activated.\n *\n * In this scenario, activeWith is called for both the tabs and the root router outlet.\n * To avoid a race condition, we assign the top outlet synchronously.\n */\n this.navCtrl.setTopOutlet(this);\n\n const leavingView = this.stackCtrl.getActiveView();\n\n this.stackWillChange.emit({\n enteringView,\n tabSwitch: isTabSwitch(enteringView, leavingView),\n });\n\n this.stackCtrl.setActive(enteringView).then((data) => {\n this.activateEvents.emit(cmpRef.instance);\n this.stackDidChange.emit(data);\n });\n }\n\n /**\n * Returns `true` if there are pages in the stack to go back.\n */\n canGoBack(deep = 1, stackId?: string): boolean {\n return this.stackCtrl.canGoBack(deep, stackId);\n }\n\n /**\n * Resolves to `true` if it the outlet was able to sucessfully pop the last N pages.\n */\n pop(deep = 1, stackId?: string): Promise<boolean> {\n return this.stackCtrl.pop(deep, stackId);\n }\n\n /**\n * Returns the URL of the active page of each stack.\n */\n getLastUrl(stackId?: string): string | undefined {\n const active = this.stackCtrl.getLastUrl(stackId);\n return active ? active.url : undefined;\n }\n\n /**\n * Returns the RouteView of the active page of each stack.\n * @internal\n */\n getLastRouteView(stackId?: string): RouteView | undefined {\n return this.stackCtrl.getLastUrl(stackId);\n }\n\n /**\n * Returns the root view in the tab stack.\n * @internal\n */\n getRootView(stackId?: string): RouteView | undefined {\n return this.stackCtrl.getRootUrl(stackId);\n }\n\n /**\n * Returns the active stack ID. In the context of ion-tabs, it means the active tab.\n */\n getActiveStackId(): string | undefined {\n return this.stackCtrl.getActiveStackId();\n }\n\n /**\n * Since the activated route can change over the life time of a component in an ion router outlet, we create\n * a proxy so that we can update the values over time as a user navigates back to components already in the stack.\n */\n private createActivatedRouteProxy(component$: Observable<any>, activatedRoute: ActivatedRoute): ActivatedRoute {\n const proxy: any = new ActivatedRoute();\n\n proxy._futureSnapshot = (activatedRoute as any)._futureSnapshot;\n proxy._routerState = (activatedRoute as any)._routerState;\n proxy.snapshot = activatedRoute.snapshot;\n proxy.outlet = activatedRoute.outlet;\n proxy.component = activatedRoute.component;\n\n // Setup wrappers for the observables so consumers don't have to worry about switching to new observables as the state updates\n (proxy as any)._paramMap = this.proxyObservable(component$, 'paramMap');\n (proxy as any)._queryParamMap = this.proxyObservable(component$, 'queryParamMap');\n proxy.url = this.proxyObservable(component$, 'url');\n proxy.params = this.proxyObservable(component$, 'params');\n proxy.queryParams = this.proxyObservable(component$, 'queryParams');\n proxy.fragment = this.proxyObservable(component$, 'fragment');\n proxy.data = this.proxyObservable(component$, 'data');\n\n return proxy as ActivatedRoute;\n }\n\n /**\n * Create a wrapped observable that will switch to the latest activated route matched by the given component\n */\n private proxyObservable(component$: Observable<any>, path: string): Observable<any> {\n return component$.pipe(\n // First wait until the component instance is pushed\n filter((component) => !!component),\n switchMap((component) =>\n this.currentActivatedRoute$.pipe(\n filter((current) => current !== null && current.component === component),\n switchMap((current) => current && (current.activatedRoute as any)[path]),\n distinctUntilChanged()\n )\n )\n );\n }\n\n /**\n * Updates the activated route proxy for the given component to the new incoming router state\n */\n private updateActivatedRouteProxy(component: any, activatedRoute: ActivatedRoute): void {\n const proxy = this.proxyMap.get(component);\n if (!proxy) {\n throw new Error(`Could not find activated route proxy for view`);\n }\n\n (proxy as any)._futureSnapshot = (activatedRoute as any)._futureSnapshot;\n (proxy as any)._routerState = (activatedRoute as any)._routerState;\n proxy.snapshot = activatedRoute.snapshot;\n proxy.outlet = activatedRoute.outlet;\n proxy.component = activatedRoute.component;\n\n this.currentActivatedRoute$.next({ component, activatedRoute });\n }\n}\n\nclass OutletInjector implements Injector {\n constructor(private route: ActivatedRoute, private childContexts: ChildrenOutletContexts, private parent: Injector) {}\n\n get(token: any, notFoundValue?: any): any {\n if (token === ActivatedRoute) {\n return this.route;\n }\n\n if (token === ChildrenOutletContexts) {\n return this.childContexts;\n }\n\n return this.parent.get(token, notFoundValue);\n }\n}\n\n// TODO: FW-4785 - Remove this once Angular 15 support is dropped\nconst INPUT_BINDER = new InjectionToken<RoutedComponentInputBinder>('');\n\n/**\n * Injectable used as a tree-shakable provider for opting in to binding router data to component\n * inputs.\n *\n * The RouterOutlet registers itself with this service when an `ActivatedRoute` is attached or\n * activated. When this happens, the service subscribes to the `ActivatedRoute` observables (params,\n * queryParams, data) and sets the inputs of the component using `ComponentRef.setInput`.\n * Importantly, when an input does not have an item in the route data with a matching key, this\n * input is set to `undefined`. If it were not done this way, the previous information would be\n * retained if the data got removed from the route (i.e. if a query parameter is removed).\n *\n * The `RouterOutlet` should unregister itself when destroyed via `unsubscribeFromRouteData` so that\n * the subscriptions are cleaned up.\n */\n@Injectable()\nclass RoutedComponentInputBinder {\n private outletDataSubscriptions = new Map<IonRouterOutlet, Subscription>();\n\n bindActivatedRouteToOutletComponent(outlet: IonRouterOutlet): void {\n this.unsubscribeFromRouteData(outlet);\n this.subscribeToRouteData(outlet);\n }\n\n unsubscribeFromRouteData(outlet: IonRouterOutlet): void {\n this.outletDataSubscriptions.get(outlet)?.unsubscribe();\n this.outletDataSubscriptions.delete(outlet);\n }\n\n private subscribeToRouteData(outlet: IonRouterOutlet) {\n const { activatedRoute } = outlet;\n const dataSubscription = combineLatest([activatedRoute.queryParams, activatedRoute.params, activatedRoute.data])\n .pipe(\n switchMap(([queryParams, params, data], index) => {\n data = { ...queryParams, ...params, ...data };\n // Get the first result from the data subscription synchronously so it's available to\n // the component as soon as possible (and doesn't require a second change detection).\n if (index === 0) {\n return of(data);\n }\n // Promise.resolve is used to avoid synchronously writing the wrong data when\n // two of the Observables in the `combineLatest` stream emit one after\n // another.\n return Promise.resolve(data);\n })\n )\n .subscribe((data) => {\n // Outlet may have been deactivated or changed names to be associated with a different\n // route\n if (\n !outlet.isActivated ||\n !outlet.activatedComponentRef ||\n outlet.activatedRoute !== activatedRoute ||\n activatedRoute.component === null\n ) {\n this.unsubscribeFromRouteData(outlet);\n return;\n }\n\n const mirror = reflectComponentType(activatedRoute.component);\n if (!mirror) {\n this.unsubscribeFromRouteData(outlet);\n return;\n }\n\n for (const { templateName } of mirror.inputs) {\n outlet.activatedComponentRef.setInput(templateName, data[templateName]);\n }\n });\n\n this.outletDataSubscriptions.set(outlet, dataSubscription);\n }\n}\n\nexport const provideComponentInputBinding = (): Provider => {\n return {\n provide: INPUT_BINDER,\n useFactory: componentInputBindingFactory,\n deps: [Router],\n };\n};\n\nfunction componentInputBindingFactory(router?: Router) {\n /**\n * We cast the router to any here, since the componentInputBindingEnabled\n * property is not available until Angular v16.\n */\n if ((router as any)?.componentInputBindingEnabled) {\n return new RoutedComponentInputBinder();\n }\n return null;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/angular",
3
- "version": "9.0.7-dev.11791305593.188c8151",
3
+ "version": "9.0.7-dev.11791381676.118a7a15",
4
4
  "description": "Angular specific wrappers for @ionic/core",
5
5
  "keywords": [
6
6
  "ionic",
@@ -168,7 +168,7 @@
168
168
  "css/"
169
169
  ],
170
170
  "dependencies": {
171
- "@ionic/core": "9.0.7-dev.11791305593.188c8151",
171
+ "@ionic/core": "9.0.7-dev.11791381676.118a7a15",
172
172
  "ionicons": "^8.0.13",
173
173
  "jsonc-parser": "^3.0.0",
174
174
  "tslib": "^2.3.0"