@ionic/angular 7.3.4-dev.11694532574.1e397a21 → 7.3.4-dev.11694542086.1f624b36

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.
Files changed (192) hide show
  1. package/README.md +0 -20
  2. package/app-initialize.d.ts +1 -1
  3. package/directives/control-value-accessors/boolean-value-accessor.d.ts +1 -1
  4. package/directives/control-value-accessors/numeric-value-accessor.d.ts +1 -1
  5. package/directives/control-value-accessors/radio-value-accessor.d.ts +1 -1
  6. package/directives/control-value-accessors/select-value-accessor.d.ts +1 -1
  7. package/directives/control-value-accessors/text-value-accessor.d.ts +1 -1
  8. package/{common/directives → directives}/control-value-accessors/value-accessor.d.ts +2 -2
  9. package/directives/navigation/ion-back-button.d.ts +16 -6
  10. package/directives/navigation/ion-router-outlet.d.ts +122 -4
  11. package/directives/navigation/ion-tabs.d.ts +64 -4
  12. package/directives/navigation/nav-delegate.d.ts +9 -0
  13. package/directives/navigation/router-link-delegate.d.ts +41 -7
  14. package/{common/directives → directives}/navigation/stack-utils.d.ts +1 -1
  15. package/directives/overlays/modal.d.ts +47 -3
  16. package/directives/overlays/popover.d.ts +43 -3
  17. package/directives/proxies-list.d.ts +1 -1
  18. package/directives/proxies.d.ts +26 -0
  19. package/esm2020/app-initialize.mjs +2 -2
  20. package/esm2020/directives/control-value-accessors/boolean-value-accessor.mjs +4 -4
  21. package/esm2020/directives/control-value-accessors/numeric-value-accessor.mjs +2 -2
  22. package/esm2020/directives/control-value-accessors/radio-value-accessor.mjs +3 -6
  23. package/esm2020/directives/control-value-accessors/select-value-accessor.mjs +2 -2
  24. package/esm2020/directives/control-value-accessors/text-value-accessor.mjs +2 -2
  25. package/esm2020/directives/control-value-accessors/value-accessor.mjs +141 -0
  26. package/esm2020/directives/navigation/ion-back-button.mjs +36 -15
  27. package/esm2020/directives/navigation/ion-router-outlet.mjs +435 -6
  28. package/esm2020/directives/navigation/ion-tabs.mjs +166 -9
  29. package/esm2020/directives/navigation/nav-delegate.mjs +42 -0
  30. package/esm2020/directives/navigation/nav-params.mjs +45 -0
  31. package/esm2020/directives/navigation/router-link-delegate.mjs +92 -11
  32. package/esm2020/directives/navigation/stack-controller.mjs +275 -0
  33. package/esm2020/directives/navigation/stack-utils.mjs +73 -0
  34. package/esm2020/directives/overlays/modal.mjs +88 -8
  35. package/esm2020/directives/overlays/popover.mjs +87 -8
  36. package/esm2020/directives/proxies-list.mjs +3 -1
  37. package/esm2020/directives/proxies.mjs +53 -1
  38. package/esm2020/index.mjs +21 -4
  39. package/esm2020/ionic-core.mjs +6 -0
  40. package/esm2020/ionic-module.mjs +32 -14
  41. package/esm2020/providers/action-sheet-controller.mjs +18 -0
  42. package/esm2020/providers/alert-controller.mjs +18 -0
  43. package/esm2020/providers/angular-delegate.mjs +152 -0
  44. package/esm2020/providers/animation-controller.mjs +37 -0
  45. package/esm2020/providers/config.mjs +44 -0
  46. package/esm2020/providers/dom-controller.mjs +44 -0
  47. package/esm2020/providers/gesture-controller.mjs +31 -0
  48. package/esm2020/providers/loading-controller.mjs +18 -0
  49. package/esm2020/providers/menu-controller.mjs +100 -0
  50. package/esm2020/providers/modal-controller.mjs +25 -0
  51. package/esm2020/providers/nav-controller.mjs +221 -0
  52. package/esm2020/providers/picker-controller.mjs +18 -0
  53. package/esm2020/providers/platform.mjs +246 -0
  54. package/esm2020/providers/popover-controller.mjs +25 -0
  55. package/esm2020/providers/toast-controller.mjs +18 -0
  56. package/esm2020/types/interfaces.mjs +2 -0
  57. package/esm2020/util/ionic-router-reuse-strategy.mjs +55 -0
  58. package/esm2020/util/overlay.mjs +25 -0
  59. package/esm2020/util/util.mjs +10 -0
  60. package/fesm2015/ionic-angular.mjs +2645 -151
  61. package/fesm2015/ionic-angular.mjs.map +1 -1
  62. package/fesm2020/ionic-angular.mjs +2637 -152
  63. package/fesm2020/ionic-angular.mjs.map +1 -1
  64. package/index.d.ts +19 -3
  65. package/ionic-core.d.ts +2 -0
  66. package/ionic-module.d.ts +2 -2
  67. package/package.json +2 -18
  68. package/{common/providers → providers}/action-sheet-controller.d.ts +2 -2
  69. package/{common/providers → providers}/alert-controller.d.ts +2 -2
  70. package/{common/providers → providers}/angular-delegate.d.ts +1 -1
  71. package/{common/providers → providers}/animation-controller.d.ts +1 -1
  72. package/{common/providers → providers}/config.d.ts +1 -1
  73. package/{common/providers → providers}/gesture-controller.d.ts +1 -1
  74. package/{common/providers → providers}/loading-controller.d.ts +2 -2
  75. package/{common/providers → providers}/modal-controller.d.ts +2 -2
  76. package/{common/providers → providers}/nav-controller.d.ts +2 -2
  77. package/{common/providers → providers}/picker-controller.d.ts +2 -2
  78. package/{common/providers → providers}/platform.d.ts +1 -1
  79. package/{common/providers → providers}/popover-controller.d.ts +2 -2
  80. package/{common/providers → providers}/toast-controller.d.ts +2 -2
  81. package/test/README.md +0 -8
  82. package/{common/types → types}/interfaces.d.ts +4 -0
  83. package/common/directives/control-value-accessors/index.d.ts +0 -1
  84. package/common/directives/navigation/back-button.d.ts +0 -26
  85. package/common/directives/navigation/nav.d.ts +0 -13
  86. package/common/directives/navigation/router-link-delegate.d.ts +0 -50
  87. package/common/directives/navigation/router-outlet.d.ts +0 -103
  88. package/common/directives/navigation/tabs.d.ts +0 -74
  89. package/common/index.d.ts +0 -28
  90. package/common/overlays/modal.d.ts +0 -50
  91. package/common/overlays/popover.d.ts +0 -46
  92. package/common/utils/proxy.d.ts +0 -8
  93. package/directives/navigation/ion-nav.d.ts +0 -8
  94. package/esm2020/common/directives/control-value-accessors/index.mjs +0 -2
  95. package/esm2020/common/directives/control-value-accessors/value-accessor.mjs +0 -141
  96. package/esm2020/common/directives/navigation/back-button.mjs +0 -59
  97. package/esm2020/common/directives/navigation/nav-params.mjs +0 -45
  98. package/esm2020/common/directives/navigation/nav.mjs +0 -47
  99. package/esm2020/common/directives/navigation/router-link-delegate.mjs +0 -111
  100. package/esm2020/common/directives/navigation/router-outlet.mjs +0 -461
  101. package/esm2020/common/directives/navigation/stack-controller.mjs +0 -275
  102. package/esm2020/common/directives/navigation/stack-utils.mjs +0 -73
  103. package/esm2020/common/directives/navigation/tabs.mjs +0 -172
  104. package/esm2020/common/index.mjs +0 -28
  105. package/esm2020/common/ionic-angular-common.mjs +0 -5
  106. package/esm2020/common/overlays/modal.mjs +0 -87
  107. package/esm2020/common/overlays/popover.mjs +0 -79
  108. package/esm2020/common/providers/action-sheet-controller.mjs +0 -18
  109. package/esm2020/common/providers/alert-controller.mjs +0 -18
  110. package/esm2020/common/providers/angular-delegate.mjs +0 -152
  111. package/esm2020/common/providers/animation-controller.mjs +0 -37
  112. package/esm2020/common/providers/config.mjs +0 -44
  113. package/esm2020/common/providers/dom-controller.mjs +0 -44
  114. package/esm2020/common/providers/gesture-controller.mjs +0 -31
  115. package/esm2020/common/providers/loading-controller.mjs +0 -18
  116. package/esm2020/common/providers/menu-controller.mjs +0 -100
  117. package/esm2020/common/providers/modal-controller.mjs +0 -25
  118. package/esm2020/common/providers/nav-controller.mjs +0 -221
  119. package/esm2020/common/providers/picker-controller.mjs +0 -18
  120. package/esm2020/common/providers/platform.mjs +0 -246
  121. package/esm2020/common/providers/popover-controller.mjs +0 -25
  122. package/esm2020/common/providers/toast-controller.mjs +0 -18
  123. package/esm2020/common/types/interfaces.mjs +0 -2
  124. package/esm2020/common/utils/overlay.mjs +0 -25
  125. package/esm2020/common/utils/proxy.mjs +0 -47
  126. package/esm2020/common/utils/routing.mjs +0 -55
  127. package/esm2020/common/utils/util.mjs +0 -10
  128. package/esm2020/directives/navigation/ion-nav.mjs +0 -21
  129. package/esm2020/standalone/directives/angular-component-lib/utils.mjs +0 -51
  130. package/esm2020/standalone/directives/checkbox.mjs +0 -73
  131. package/esm2020/standalone/directives/datetime.mjs +0 -90
  132. package/esm2020/standalone/directives/icon.mjs +0 -33
  133. package/esm2020/standalone/directives/index.mjs +0 -13
  134. package/esm2020/standalone/directives/input.mjs +0 -112
  135. package/esm2020/standalone/directives/proxies.mjs +0 -2268
  136. package/esm2020/standalone/directives/radio-group.mjs +0 -58
  137. package/esm2020/standalone/directives/radio.mjs +0 -62
  138. package/esm2020/standalone/directives/range.mjs +0 -77
  139. package/esm2020/standalone/directives/searchbar.mjs +0 -80
  140. package/esm2020/standalone/directives/segment.mjs +0 -58
  141. package/esm2020/standalone/directives/select.mjs +0 -81
  142. package/esm2020/standalone/directives/textarea.mjs +0 -90
  143. package/esm2020/standalone/directives/toggle.mjs +0 -73
  144. package/esm2020/standalone/index.mjs +0 -12
  145. package/esm2020/standalone/ionic-angular-standalone.mjs +0 -5
  146. package/esm2020/standalone/navigation/back-button.mjs +0 -32
  147. package/esm2020/standalone/navigation/nav.mjs +0 -28
  148. package/esm2020/standalone/navigation/router-link-delegate.mjs +0 -30
  149. package/esm2020/standalone/navigation/router-outlet.mjs +0 -23
  150. package/esm2020/standalone/navigation/tabs.mjs +0 -46
  151. package/esm2020/standalone/overlays/modal.mjs +0 -32
  152. package/esm2020/standalone/overlays/popover.mjs +0 -28
  153. package/esm2020/standalone/providers/ionic-angular.mjs +0 -41
  154. package/fesm2015/ionic-angular-common.mjs +0 -2620
  155. package/fesm2015/ionic-angular-common.mjs.map +0 -1
  156. package/fesm2015/ionic-angular-standalone.mjs +0 -3287
  157. package/fesm2015/ionic-angular-standalone.mjs.map +0 -1
  158. package/fesm2020/ionic-angular-common.mjs +0 -2609
  159. package/fesm2020/ionic-angular-common.mjs.map +0 -1
  160. package/fesm2020/ionic-angular-standalone.mjs +0 -3285
  161. package/fesm2020/ionic-angular-standalone.mjs.map +0 -1
  162. package/standalone/directives/angular-component-lib/utils.d.ts +0 -9
  163. package/standalone/directives/checkbox.d.ts +0 -30
  164. package/standalone/directives/datetime.d.ts +0 -30
  165. package/standalone/directives/icon.d.ts +0 -9
  166. package/standalone/directives/index.d.ts +0 -12
  167. package/standalone/directives/input.d.ts +0 -47
  168. package/standalone/directives/proxies.d.ts +0 -903
  169. package/standalone/directives/radio-group.d.ts +0 -18
  170. package/standalone/directives/radio.d.ts +0 -22
  171. package/standalone/directives/range.d.ts +0 -47
  172. package/standalone/directives/searchbar.d.ts +0 -45
  173. package/standalone/directives/segment.d.ts +0 -19
  174. package/standalone/directives/select.d.ts +0 -34
  175. package/standalone/directives/textarea.d.ts +0 -37
  176. package/standalone/directives/toggle.d.ts +0 -28
  177. package/standalone/index.d.ts +0 -11
  178. package/standalone/navigation/back-button.d.ts +0 -9
  179. package/standalone/navigation/nav.d.ts +0 -8
  180. package/standalone/navigation/router-link-delegate.d.ts +0 -10
  181. package/standalone/navigation/router-outlet.d.ts +0 -6
  182. package/standalone/navigation/tabs.d.ts +0 -12
  183. package/standalone/overlays/modal.d.ts +0 -6
  184. package/standalone/overlays/popover.d.ts +0 -6
  185. package/standalone/providers/ionic-angular.d.ts +0 -3
  186. /package/{common/directives → directives}/navigation/nav-params.d.ts +0 -0
  187. /package/{common/directives → directives}/navigation/stack-controller.d.ts +0 -0
  188. /package/{common/providers → providers}/dom-controller.d.ts +0 -0
  189. /package/{common/providers → providers}/menu-controller.d.ts +0 -0
  190. /package/{common/utils/routing.d.ts → util/ionic-router-reuse-strategy.d.ts} +0 -0
  191. /package/{common/utils → util}/overlay.d.ts +0 -0
  192. /package/{common/utils → util}/util.d.ts +0 -0
@@ -1,24 +1,171 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, HostListener, Component, ChangeDetectionStrategy, ViewChild, ContentChild, ContentChildren, Optional, forwardRef, APP_INITIALIZER, NgZone, NgModule } from '@angular/core';
3
- import { NG_VALUE_ACCESSOR, NG_VALIDATORS, MaxValidator, MinValidator } from '@angular/forms';
4
- import * as i2 from '@ionic/angular/common';
5
- import { ValueAccessor, setIonicClasses, IonRouterOutlet as IonRouterOutlet$1, IonTabs as IonTabs$1, IonBackButton as IonBackButton$1, IonNav as IonNav$1, RouterLinkDelegateDirective as RouterLinkDelegateDirective$1, RouterLinkWithHrefDelegateDirective as RouterLinkWithHrefDelegateDirective$1, IonModal as IonModal$1, IonPopover as IonPopover$1, raf, ConfigToken, provideComponentInputBinding, AngularDelegate, ModalController, PopoverController } from '@ionic/angular/common';
6
- export { ActionSheetController, AlertController, AngularDelegate, AnimationController, Config, DomController, GestureController, IonicRouteStrategy, LoadingController, MenuController, ModalController, NavController, NavParams, PickerController, Platform, PopoverController, ToastController } from '@ionic/angular/common';
2
+ import { Directive, HostListener, Component, ChangeDetectionStrategy, Injectable, InjectionToken, Inject, Optional, inject, NgZone, ApplicationRef, Injector, createComponent, EventEmitter, ViewContainerRef, EnvironmentInjector, Attribute, SkipSelf, Input, Output, reflectComponentType, ElementRef, ViewChild, ContentChild, ContentChildren, TemplateRef, forwardRef, APP_INITIALIZER, NgModule } from '@angular/core';
3
+ import { NgControl, NG_VALUE_ACCESSOR, NG_VALIDATORS, MaxValidator, MinValidator } from '@angular/forms';
7
4
  import { __decorate } from 'tslib';
8
- import { fromEvent } from 'rxjs';
5
+ import { fromEvent, Subject, BehaviorSubject, combineLatest, of } from 'rxjs';
6
+ import * as i3 from '@angular/router';
7
+ import { NavigationStart, PRIMARY_OUTLET, ChildrenOutletContexts, ActivatedRoute, Router } from '@angular/router';
8
+ import { isPlatform, getPlatforms, LIFECYCLE_WILL_ENTER, LIFECYCLE_DID_ENTER, LIFECYCLE_WILL_LEAVE, LIFECYCLE_DID_LEAVE, LIFECYCLE_WILL_UNLOAD, componentOnReady, actionSheetController, alertController, loadingController, menuController, pickerController, modalController, popoverController, toastController, createAnimation, getTimeGivenProgression, createGesture, setupConfig } from '@ionic/core';
9
+ export { IonicSafeString, IonicSlides, createAnimation, createGesture, getPlatforms, getTimeGivenProgression, iosTransitionAnimation, isPlatform, mdTransitionAnimation } from '@ionic/core';
10
+ import { filter, switchMap, distinctUntilChanged } from 'rxjs/operators';
9
11
  import * as i1 from '@angular/common';
10
12
  import { DOCUMENT, CommonModule } from '@angular/common';
11
- import { setupConfig } from '@ionic/core';
12
- export { IonicSafeString, IonicSlides, createAnimation, createGesture, getPlatforms, getTimeGivenProgression, iosTransitionAnimation, isPlatform, mdTransitionAnimation } from '@ionic/core';
13
13
  import { applyPolyfills, defineCustomElements } from '@ionic/core/loader';
14
14
 
15
+ const raf = (h) => {
16
+ if (typeof __zone_symbol__requestAnimationFrame === 'function') {
17
+ return __zone_symbol__requestAnimationFrame(h);
18
+ }
19
+ if (typeof requestAnimationFrame === 'function') {
20
+ return requestAnimationFrame(h);
21
+ }
22
+ return setTimeout(h);
23
+ };
24
+
25
+ // TODO(FW-2827): types
26
+ class ValueAccessor {
27
+ constructor(injector, el) {
28
+ this.injector = injector;
29
+ this.el = el;
30
+ this.onChange = () => {
31
+ /**/
32
+ };
33
+ this.onTouched = () => {
34
+ /**/
35
+ };
36
+ }
37
+ writeValue(value) {
38
+ this.el.nativeElement.value = this.lastValue = value;
39
+ setIonicClasses(this.el);
40
+ }
41
+ /**
42
+ * Notifies the ControlValueAccessor of a change in the value of the control.
43
+ *
44
+ * This is called by each of the ValueAccessor directives when we want to update
45
+ * the status and validity of the form control. For example with text components this
46
+ * is called when the ionInput event is fired. For select components this is called
47
+ * when the ionChange event is fired.
48
+ *
49
+ * This also updates the Ionic form status classes on the element.
50
+ *
51
+ * @param el The component element.
52
+ * @param value The new value of the control.
53
+ */
54
+ handleValueChange(el, value) {
55
+ if (el === this.el.nativeElement) {
56
+ if (value !== this.lastValue) {
57
+ this.lastValue = value;
58
+ this.onChange(value);
59
+ }
60
+ setIonicClasses(this.el);
61
+ }
62
+ }
63
+ _handleBlurEvent(el) {
64
+ if (el === this.el.nativeElement) {
65
+ this.onTouched();
66
+ setIonicClasses(this.el);
67
+ }
68
+ }
69
+ registerOnChange(fn) {
70
+ this.onChange = fn;
71
+ }
72
+ registerOnTouched(fn) {
73
+ this.onTouched = fn;
74
+ }
75
+ setDisabledState(isDisabled) {
76
+ this.el.nativeElement.disabled = isDisabled;
77
+ }
78
+ ngOnDestroy() {
79
+ if (this.statusChanges) {
80
+ this.statusChanges.unsubscribe();
81
+ }
82
+ }
83
+ ngAfterViewInit() {
84
+ let ngControl;
85
+ try {
86
+ ngControl = this.injector.get(NgControl);
87
+ }
88
+ catch {
89
+ /* No FormControl or ngModel binding */
90
+ }
91
+ if (!ngControl) {
92
+ return;
93
+ }
94
+ // Listen for changes in validity, disabled, or pending states
95
+ if (ngControl.statusChanges) {
96
+ this.statusChanges = ngControl.statusChanges.subscribe(() => setIonicClasses(this.el));
97
+ }
98
+ /**
99
+ * TODO FW-2787: Remove this in favor of https://github.com/angular/angular/issues/10887
100
+ * whenever it is implemented.
101
+ */
102
+ const formControl = ngControl.control;
103
+ if (formControl) {
104
+ const methodsToPatch = ['markAsTouched', 'markAllAsTouched', 'markAsUntouched', 'markAsDirty', 'markAsPristine'];
105
+ methodsToPatch.forEach((method) => {
106
+ if (typeof formControl[method] !== 'undefined') {
107
+ const oldFn = formControl[method].bind(formControl);
108
+ formControl[method] = (...params) => {
109
+ oldFn(...params);
110
+ setIonicClasses(this.el);
111
+ };
112
+ }
113
+ });
114
+ }
115
+ }
116
+ }
117
+ /** @nocollapse */ ValueAccessor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ValueAccessor, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
118
+ /** @nocollapse */ ValueAccessor.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: ValueAccessor, host: { listeners: { "ionBlur": "_handleBlurEvent($event.target)" } }, ngImport: i0 });
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ValueAccessor, decorators: [{
120
+ type: Directive
121
+ }], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.ElementRef }]; }, propDecorators: { _handleBlurEvent: [{
122
+ type: HostListener,
123
+ args: ['ionBlur', ['$event.target']]
124
+ }] } });
125
+ const setIonicClasses = (element) => {
126
+ raf(() => {
127
+ const input = element.nativeElement;
128
+ const hasValue = input.value != null && input.value.toString().length > 0;
129
+ const classes = getClasses(input);
130
+ setClasses(input, classes);
131
+ const item = input.closest('ion-item');
132
+ if (item) {
133
+ if (hasValue) {
134
+ setClasses(item, [...classes, 'item-has-value']);
135
+ }
136
+ else {
137
+ setClasses(item, classes);
138
+ }
139
+ }
140
+ });
141
+ };
142
+ const getClasses = (element) => {
143
+ const classList = element.classList;
144
+ const classes = [];
145
+ for (let i = 0; i < classList.length; i++) {
146
+ const item = classList.item(i);
147
+ if (item !== null && startsWith(item, 'ng-')) {
148
+ classes.push(`ion-${item.substring(3)}`);
149
+ }
150
+ }
151
+ return classes;
152
+ };
153
+ const setClasses = (element, classes) => {
154
+ const classList = element.classList;
155
+ classList.remove('ion-valid', 'ion-invalid', 'ion-touched', 'ion-untouched', 'ion-dirty', 'ion-pristine');
156
+ classList.add(...classes);
157
+ };
158
+ const startsWith = (input, search) => {
159
+ return input.substring(0, search.length) === search;
160
+ };
161
+
15
162
  class BooleanValueAccessorDirective extends ValueAccessor {
16
163
  constructor(injector, el) {
17
164
  super(injector, el);
18
165
  }
19
166
  writeValue(value) {
20
- this.elementRef.nativeElement.checked = this.lastValue = value;
21
- setIonicClasses(this.elementRef);
167
+ this.el.nativeElement.checked = this.lastValue = value;
168
+ setIonicClasses(this.el);
22
169
  }
23
170
  _handleIonChange(el) {
24
171
  this.handleValueChange(el, el.checked);
@@ -91,11 +238,8 @@ class RadioValueAccessorDirective extends ValueAccessor {
91
238
  constructor(injector, el) {
92
239
  super(injector, el);
93
240
  }
241
+ // TODO(FW-2827): type (HTMLIonRadioElement and HTMLElement are both missing `checked`)
94
242
  _handleIonSelect(el) {
95
- /**
96
- * The `el` type is any to access the `checked` state property
97
- * that is not exposed on the type interface.
98
- */
99
243
  this.handleValueChange(el, el.checked);
100
244
  }
101
245
  }
@@ -386,6 +530,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
386
530
  inputs: [],
387
531
  }]
388
532
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
533
+ let IonBackButton = class IonBackButton {
534
+ constructor(c, r, z) {
535
+ this.z = z;
536
+ c.detach();
537
+ this.el = r.nativeElement;
538
+ }
539
+ };
540
+ /** @nocollapse */ IonBackButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonBackButton, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
541
+ /** @nocollapse */ IonBackButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IonBackButton, selector: "ion-back-button", inputs: { color: "color", defaultHref: "defaultHref", disabled: "disabled", icon: "icon", mode: "mode", routerAnimation: "routerAnimation", text: "text", type: "type" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
542
+ IonBackButton = __decorate([
543
+ ProxyCmp({
544
+ inputs: ['color', 'defaultHref', 'disabled', 'icon', 'mode', 'routerAnimation', 'text', 'type']
545
+ })
546
+ ], IonBackButton);
547
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonBackButton, decorators: [{
548
+ type: Component,
549
+ args: [{
550
+ selector: 'ion-back-button',
551
+ changeDetection: ChangeDetectionStrategy.OnPush,
552
+ template: '<ng-content></ng-content>',
553
+ // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
554
+ inputs: ['color', 'defaultHref', 'disabled', 'icon', 'mode', 'routerAnimation', 'text', 'type'],
555
+ }]
556
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
389
557
  let IonBackdrop = class IonBackdrop {
390
558
  constructor(c, r, z) {
391
559
  this.z = z;
@@ -1392,6 +1560,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
1392
1560
  inputs: ['autoHide', 'menu'],
1393
1561
  }]
1394
1562
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
1563
+ let IonNav = class IonNav {
1564
+ constructor(c, r, z) {
1565
+ this.z = z;
1566
+ c.detach();
1567
+ this.el = r.nativeElement;
1568
+ proxyOutputs(this, this.el, ['ionNavWillChange', 'ionNavDidChange']);
1569
+ }
1570
+ };
1571
+ /** @nocollapse */ IonNav.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonNav, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
1572
+ /** @nocollapse */ IonNav.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IonNav, selector: "ion-nav", inputs: { animated: "animated", animation: "animation", root: "root", rootParams: "rootParams", swipeGesture: "swipeGesture" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1573
+ IonNav = __decorate([
1574
+ ProxyCmp({
1575
+ inputs: ['animated', 'animation', 'root', 'rootParams', 'swipeGesture'],
1576
+ methods: ['push', 'insert', 'insertPages', 'pop', 'popTo', 'popToRoot', 'removeIndex', 'setRoot', 'setPages', 'getActive', 'getByIndex', 'canGoBack', 'getPrevious']
1577
+ })
1578
+ ], IonNav);
1579
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonNav, decorators: [{
1580
+ type: Component,
1581
+ args: [{
1582
+ selector: 'ion-nav',
1583
+ changeDetection: ChangeDetectionStrategy.OnPush,
1584
+ template: '<ng-content></ng-content>',
1585
+ // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
1586
+ inputs: ['animated', 'animation', 'root', 'rootParams', 'swipeGesture'],
1587
+ }]
1588
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
1395
1589
  let IonNavLink = class IonNavLink {
1396
1590
  constructor(c, r, z) {
1397
1591
  this.z = z;
@@ -2128,157 +2322,2041 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
2128
2322
  }]
2129
2323
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; } });
2130
2324
 
2131
- // eslint-disable-next-line @angular-eslint/directive-class-suffix
2132
- class IonRouterOutlet extends IonRouterOutlet$1 {
2325
+ class Config {
2326
+ get(key, fallback) {
2327
+ const c = getConfig();
2328
+ if (c) {
2329
+ return c.get(key, fallback);
2330
+ }
2331
+ return null;
2332
+ }
2333
+ getBoolean(key, fallback) {
2334
+ const c = getConfig();
2335
+ if (c) {
2336
+ return c.getBoolean(key, fallback);
2337
+ }
2338
+ return false;
2339
+ }
2340
+ getNumber(key, fallback) {
2341
+ const c = getConfig();
2342
+ if (c) {
2343
+ return c.getNumber(key, fallback);
2344
+ }
2345
+ return 0;
2346
+ }
2133
2347
  }
2134
- /** @nocollapse */ IonRouterOutlet.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonRouterOutlet, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2135
- /** @nocollapse */ IonRouterOutlet.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: IonRouterOutlet, selector: "ion-router-outlet", usesInheritance: true, ngImport: i0 });
2136
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonRouterOutlet, decorators: [{
2137
- type: Directive,
2348
+ /** @nocollapse */ Config.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: Config, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2349
+ /** @nocollapse */ Config.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: Config, providedIn: 'root' });
2350
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: Config, decorators: [{
2351
+ type: Injectable,
2138
2352
  args: [{
2139
- selector: 'ion-router-outlet',
2353
+ providedIn: 'root',
2140
2354
  }]
2141
2355
  }] });
2356
+ const ConfigToken = new InjectionToken('USERCONFIG');
2357
+ const getConfig = () => {
2358
+ if (typeof window !== 'undefined') {
2359
+ const Ionic = window.Ionic;
2360
+ if (Ionic?.config) {
2361
+ return Ionic.config;
2362
+ }
2363
+ }
2364
+ return null;
2365
+ };
2142
2366
 
2143
- // eslint-disable-next-line @angular-eslint/component-class-suffix
2144
- class IonTabs extends IonTabs$1 {
2145
- }
2146
- /** @nocollapse */ IonTabs.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonTabs, deps: null, target: i0.ɵɵFactoryTarget.Component });
2147
- /** @nocollapse */ IonTabs.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IonTabs, selector: "ion-tabs", queries: [{ propertyName: "tabBar", first: true, predicate: IonTabBar, descendants: true }, { propertyName: "tabBars", predicate: IonTabBar }], viewQueries: [{ propertyName: "outlet", first: true, predicate: ["outlet"], descendants: true, read: IonRouterOutlet }], usesInheritance: true, ngImport: i0, template: `
2148
- <ng-content select="[slot=top]"></ng-content>
2149
- <div class="tabs-inner" #tabsInner>
2150
- <ion-router-outlet
2151
- #outlet
2152
- tabs="true"
2153
- (stackWillChange)="onStackWillChange($event)"
2154
- (stackDidChange)="onStackDidChange($event)"
2155
- ></ion-router-outlet>
2156
- </div>
2157
- <ng-content></ng-content>
2158
- `, isInline: true, styles: [":host{display:flex;position:absolute;inset:0;flex-direction:column;width:100%;height:100%;contain:layout size style}.tabs-inner{position:relative;flex:1;contain:layout size style}\n"], dependencies: [{ kind: "directive", type: IonRouterOutlet, selector: "ion-router-outlet" }] });
2159
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonTabs, decorators: [{
2160
- type: Component,
2161
- args: [{ selector: 'ion-tabs', template: `
2162
- <ng-content select="[slot=top]"></ng-content>
2163
- <div class="tabs-inner" #tabsInner>
2164
- <ion-router-outlet
2165
- #outlet
2166
- tabs="true"
2167
- (stackWillChange)="onStackWillChange($event)"
2168
- (stackDidChange)="onStackDidChange($event)"
2169
- ></ion-router-outlet>
2170
- </div>
2171
- <ng-content></ng-content>
2172
- `, styles: [":host{display:flex;position:absolute;inset:0;flex-direction:column;width:100%;height:100%;contain:layout size style}.tabs-inner{position:relative;flex:1;contain:layout size style}\n"] }]
2173
- }], propDecorators: { outlet: [{
2174
- type: ViewChild,
2175
- args: ['outlet', { read: IonRouterOutlet, static: false }]
2176
- }], tabBar: [{
2177
- type: ContentChild,
2178
- args: [IonTabBar, { static: false }]
2179
- }], tabBars: [{
2180
- type: ContentChildren,
2181
- args: [IonTabBar]
2182
- }] } });
2183
-
2184
- // eslint-disable-next-line @angular-eslint/directive-class-suffix
2185
- class IonBackButton extends IonBackButton$1 {
2186
- constructor(routerOutlet, navCtrl, config, r, z, c) {
2187
- super(routerOutlet, navCtrl, config, r, z, c);
2367
+ class Platform {
2368
+ constructor(doc, zone) {
2369
+ this.doc = doc;
2370
+ /**
2371
+ * @hidden
2372
+ */
2373
+ this.backButton = new Subject();
2374
+ /**
2375
+ * The keyboardDidShow event emits when the
2376
+ * on-screen keyboard is presented.
2377
+ */
2378
+ this.keyboardDidShow = new Subject();
2379
+ /**
2380
+ * The keyboardDidHide event emits when the
2381
+ * on-screen keyboard is hidden.
2382
+ */
2383
+ this.keyboardDidHide = new Subject();
2384
+ /**
2385
+ * The pause event emits when the native platform puts the application
2386
+ * into the background, typically when the user switches to a different
2387
+ * application. This event would emit when a Cordova app is put into
2388
+ * the background, however, it would not fire on a standard web browser.
2389
+ */
2390
+ this.pause = new Subject();
2391
+ /**
2392
+ * The resume event emits when the native platform pulls the application
2393
+ * out from the background. This event would emit when a Cordova app comes
2394
+ * out from the background, however, it would not fire on a standard web browser.
2395
+ */
2396
+ this.resume = new Subject();
2397
+ /**
2398
+ * The resize event emits when the browser window has changed dimensions. This
2399
+ * could be from a browser window being physically resized, or from a device
2400
+ * changing orientation.
2401
+ */
2402
+ this.resize = new Subject();
2403
+ zone.run(() => {
2404
+ this.win = doc.defaultView;
2405
+ this.backButton.subscribeWithPriority = function (priority, callback) {
2406
+ return this.subscribe((ev) => {
2407
+ return ev.register(priority, (processNextHandler) => zone.run(() => callback(processNextHandler)));
2408
+ });
2409
+ };
2410
+ proxyEvent(this.pause, doc, 'pause');
2411
+ proxyEvent(this.resume, doc, 'resume');
2412
+ proxyEvent(this.backButton, doc, 'ionBackButton');
2413
+ proxyEvent(this.resize, this.win, 'resize');
2414
+ proxyEvent(this.keyboardDidShow, this.win, 'ionKeyboardDidShow');
2415
+ proxyEvent(this.keyboardDidHide, this.win, 'ionKeyboardDidHide');
2416
+ let readyResolve;
2417
+ this._readyPromise = new Promise((res) => {
2418
+ readyResolve = res;
2419
+ });
2420
+ if (this.win?.['cordova']) {
2421
+ doc.addEventListener('deviceready', () => {
2422
+ readyResolve('cordova');
2423
+ }, { once: true });
2424
+ }
2425
+ else {
2426
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2427
+ readyResolve('dom');
2428
+ }
2429
+ });
2430
+ }
2431
+ /**
2432
+ * @returns returns true/false based on platform.
2433
+ * @description
2434
+ * Depending on the platform the user is on, `is(platformName)` will
2435
+ * return `true` or `false`. Note that the same app can return `true`
2436
+ * for more than one platform name. For example, an app running from
2437
+ * an iPad would return `true` for the platform names: `mobile`,
2438
+ * `ios`, `ipad`, and `tablet`. Additionally, if the app was running
2439
+ * from Cordova then `cordova` would be true, and if it was running
2440
+ * from a web browser on the iPad then `mobileweb` would be `true`.
2441
+ *
2442
+ * ```
2443
+ * import { Platform } from 'ionic-angular';
2444
+ *
2445
+ * @Component({...})
2446
+ * export MyPage {
2447
+ * constructor(public platform: Platform) {
2448
+ * if (this.platform.is('ios')) {
2449
+ * // This will only print when on iOS
2450
+ * console.log('I am an iOS device!');
2451
+ * }
2452
+ * }
2453
+ * }
2454
+ * ```
2455
+ *
2456
+ * | Platform Name | Description |
2457
+ * |-----------------|------------------------------------|
2458
+ * | android | on a device running Android. |
2459
+ * | capacitor | on a device running Capacitor. |
2460
+ * | cordova | on a device running Cordova. |
2461
+ * | ios | on a device running iOS. |
2462
+ * | ipad | on an iPad device. |
2463
+ * | iphone | on an iPhone device. |
2464
+ * | phablet | on a phablet device. |
2465
+ * | tablet | on a tablet device. |
2466
+ * | electron | in Electron on a desktop device. |
2467
+ * | pwa | as a PWA app. |
2468
+ * | mobile | on a mobile device. |
2469
+ * | mobileweb | on a mobile device in a browser. |
2470
+ * | desktop | on a desktop device. |
2471
+ * | hybrid | is a cordova or capacitor app. |
2472
+ *
2473
+ */
2474
+ is(platformName) {
2475
+ return isPlatform(this.win, platformName);
2476
+ }
2477
+ /**
2478
+ * @returns the array of platforms
2479
+ * @description
2480
+ * Depending on what device you are on, `platforms` can return multiple values.
2481
+ * Each possible value is a hierarchy of platforms. For example, on an iPhone,
2482
+ * it would return `mobile`, `ios`, and `iphone`.
2483
+ *
2484
+ * ```
2485
+ * import { Platform } from 'ionic-angular';
2486
+ *
2487
+ * @Component({...})
2488
+ * export MyPage {
2489
+ * constructor(public platform: Platform) {
2490
+ * // This will print an array of the current platforms
2491
+ * console.log(this.platform.platforms());
2492
+ * }
2493
+ * }
2494
+ * ```
2495
+ */
2496
+ platforms() {
2497
+ return getPlatforms(this.win);
2498
+ }
2499
+ /**
2500
+ * Returns a promise when the platform is ready and native functionality
2501
+ * can be called. If the app is running from within a web browser, then
2502
+ * the promise will resolve when the DOM is ready. When the app is running
2503
+ * from an application engine such as Cordova, then the promise will
2504
+ * resolve when Cordova triggers the `deviceready` event.
2505
+ *
2506
+ * The resolved value is the `readySource`, which states which platform
2507
+ * ready was used. For example, when Cordova is ready, the resolved ready
2508
+ * source is `cordova`. The default ready source value will be `dom`. The
2509
+ * `readySource` is useful if different logic should run depending on the
2510
+ * platform the app is running from. For example, only Cordova can execute
2511
+ * the status bar plugin, so the web should not run status bar plugin logic.
2512
+ *
2513
+ * ```
2514
+ * import { Component } from '@angular/core';
2515
+ * import { Platform } from 'ionic-angular';
2516
+ *
2517
+ * @Component({...})
2518
+ * export MyApp {
2519
+ * constructor(public platform: Platform) {
2520
+ * this.platform.ready().then((readySource) => {
2521
+ * console.log('Platform ready from', readySource);
2522
+ * // Platform now ready, execute any required native code
2523
+ * });
2524
+ * }
2525
+ * }
2526
+ * ```
2527
+ */
2528
+ ready() {
2529
+ return this._readyPromise;
2530
+ }
2531
+ /**
2532
+ * Returns if this app is using right-to-left language direction or not.
2533
+ * We recommend the app's `index.html` file already has the correct `dir`
2534
+ * attribute value set, such as `<html dir="ltr">` or `<html dir="rtl">`.
2535
+ * [W3C: Structural markup and right-to-left text in HTML](http://www.w3.org/International/questions/qa-html-dir)
2536
+ */
2537
+ get isRTL() {
2538
+ return this.doc.dir === 'rtl';
2539
+ }
2540
+ /**
2541
+ * Get the query string parameter
2542
+ */
2543
+ getQueryParam(key) {
2544
+ return readQueryParam(this.win.location.href, key);
2545
+ }
2546
+ /**
2547
+ * Returns `true` if the app is in landscape mode.
2548
+ */
2549
+ isLandscape() {
2550
+ return !this.isPortrait();
2551
+ }
2552
+ /**
2553
+ * Returns `true` if the app is in portrait mode.
2554
+ */
2555
+ isPortrait() {
2556
+ return this.win.matchMedia?.('(orientation: portrait)').matches;
2557
+ }
2558
+ testUserAgent(expression) {
2559
+ const nav = this.win.navigator;
2560
+ return !!(nav?.userAgent && nav.userAgent.indexOf(expression) >= 0);
2561
+ }
2562
+ /**
2563
+ * Get the current url.
2564
+ */
2565
+ url() {
2566
+ return this.win.location.href;
2567
+ }
2568
+ /**
2569
+ * Gets the width of the platform's viewport using `window.innerWidth`.
2570
+ */
2571
+ width() {
2572
+ return this.win.innerWidth;
2573
+ }
2574
+ /**
2575
+ * Gets the height of the platform's viewport using `window.innerHeight`.
2576
+ */
2577
+ height() {
2578
+ return this.win.innerHeight;
2188
2579
  }
2189
2580
  }
2190
- /** @nocollapse */ IonBackButton.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonBackButton, deps: [{ token: IonRouterOutlet, optional: true }, { token: i2.NavController }, { token: i2.Config }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2191
- /** @nocollapse */ IonBackButton.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IonBackButton, selector: "ion-back-button", usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2192
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonBackButton, decorators: [{
2193
- type: Component,
2581
+ /** @nocollapse */ Platform.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: Platform, deps: [{ token: DOCUMENT }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
2582
+ /** @nocollapse */ Platform.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: Platform, providedIn: 'root' });
2583
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: Platform, decorators: [{
2584
+ type: Injectable,
2194
2585
  args: [{
2195
- selector: 'ion-back-button',
2196
- template: '<ng-content></ng-content>',
2197
- changeDetection: ChangeDetectionStrategy.OnPush,
2586
+ providedIn: 'root',
2198
2587
  }]
2199
- }], ctorParameters: function () { return [{ type: IonRouterOutlet, decorators: [{
2200
- type: Optional
2201
- }] }, { type: i2.NavController }, { type: i2.Config }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; } });
2588
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
2589
+ type: Inject,
2590
+ args: [DOCUMENT]
2591
+ }] }, { type: i0.NgZone }]; } });
2592
+ const readQueryParam = (url, key) => {
2593
+ key = key.replace(/[[\]\\]/g, '\\$&');
2594
+ const regex = new RegExp('[\\?&]' + key + '=([^&#]*)');
2595
+ const results = regex.exec(url);
2596
+ return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
2597
+ };
2598
+ const proxyEvent = (emitter, el, eventName) => {
2599
+ if (el) {
2600
+ el.addEventListener(eventName, (ev) => {
2601
+ // ?? cordova might emit "null" events
2602
+ const value = ev != null ? ev.detail : undefined;
2603
+ emitter.next(value);
2604
+ });
2605
+ }
2606
+ };
2202
2607
 
2203
- // eslint-disable-next-line @angular-eslint/directive-class-suffix
2204
- class IonNav extends IonNav$1 {
2205
- constructor(ref, environmentInjector, injector, angularDelegate, z, c) {
2206
- super(ref, environmentInjector, injector, angularDelegate, z, c);
2608
+ class NavController {
2609
+ constructor(platform, location, serializer, router) {
2610
+ this.location = location;
2611
+ this.serializer = serializer;
2612
+ this.router = router;
2613
+ this.direction = DEFAULT_DIRECTION;
2614
+ this.animated = DEFAULT_ANIMATED;
2615
+ this.guessDirection = 'forward';
2616
+ this.lastNavId = -1;
2617
+ // Subscribe to router events to detect direction
2618
+ if (router) {
2619
+ router.events.subscribe((ev) => {
2620
+ if (ev instanceof NavigationStart) {
2621
+ const id = ev.restoredState ? ev.restoredState.navigationId : ev.id;
2622
+ this.guessDirection = id < this.lastNavId ? 'back' : 'forward';
2623
+ this.guessAnimation = !ev.restoredState ? this.guessDirection : undefined;
2624
+ this.lastNavId = this.guessDirection === 'forward' ? ev.id : id;
2625
+ }
2626
+ });
2627
+ }
2628
+ // Subscribe to backButton events
2629
+ platform.backButton.subscribeWithPriority(0, (processNextHandler) => {
2630
+ this.pop();
2631
+ processNextHandler();
2632
+ });
2633
+ }
2634
+ /**
2635
+ * This method uses Angular's [Router](https://angular.io/api/router/Router) under the hood,
2636
+ * it's equivalent to calling `this.router.navigateByUrl()`, but it's explicit about the **direction** of the transition.
2637
+ *
2638
+ * Going **forward** means that a new page is going to be pushed to the stack of the outlet (ion-router-outlet),
2639
+ * and that it will show a "forward" animation by default.
2640
+ *
2641
+ * Navigating forward can also be triggered in a declarative manner by using the `[routerDirection]` directive:
2642
+ *
2643
+ * ```html
2644
+ * <a routerLink="/path/to/page" routerDirection="forward">Link</a>
2645
+ * ```
2646
+ */
2647
+ navigateForward(url, options = {}) {
2648
+ this.setDirection('forward', options.animated, options.animationDirection, options.animation);
2649
+ return this.navigate(url, options);
2650
+ }
2651
+ /**
2652
+ * This method uses Angular's [Router](https://angular.io/api/router/Router) under the hood,
2653
+ * it's equivalent to calling:
2654
+ *
2655
+ * ```ts
2656
+ * this.navController.setDirection('back');
2657
+ * this.router.navigateByUrl(path);
2658
+ * ```
2659
+ *
2660
+ * Going **back** means that all the pages in the stack until the navigated page is found will be popped,
2661
+ * and that it will show a "back" animation by default.
2662
+ *
2663
+ * Navigating back can also be triggered in a declarative manner by using the `[routerDirection]` directive:
2664
+ *
2665
+ * ```html
2666
+ * <a routerLink="/path/to/page" routerDirection="back">Link</a>
2667
+ * ```
2668
+ */
2669
+ navigateBack(url, options = {}) {
2670
+ this.setDirection('back', options.animated, options.animationDirection, options.animation);
2671
+ return this.navigate(url, options);
2672
+ }
2673
+ /**
2674
+ * This method uses Angular's [Router](https://angular.io/api/router/Router) under the hood,
2675
+ * it's equivalent to calling:
2676
+ *
2677
+ * ```ts
2678
+ * this.navController.setDirection('root');
2679
+ * this.router.navigateByUrl(path);
2680
+ * ```
2681
+ *
2682
+ * Going **root** means that all existing pages in the stack will be removed,
2683
+ * and the navigated page will become the single page in the stack.
2684
+ *
2685
+ * Navigating root can also be triggered in a declarative manner by using the `[routerDirection]` directive:
2686
+ *
2687
+ * ```html
2688
+ * <a routerLink="/path/to/page" routerDirection="root">Link</a>
2689
+ * ```
2690
+ */
2691
+ navigateRoot(url, options = {}) {
2692
+ this.setDirection('root', options.animated, options.animationDirection, options.animation);
2693
+ return this.navigate(url, options);
2694
+ }
2695
+ /**
2696
+ * Same as [Location](https://angular.io/api/common/Location)'s back() method.
2697
+ * It will use the standard `window.history.back()` under the hood, but featuring a `back` animation
2698
+ * by default.
2699
+ */
2700
+ back(options = { animated: true, animationDirection: 'back' }) {
2701
+ this.setDirection('back', options.animated, options.animationDirection, options.animation);
2702
+ return this.location.back();
2703
+ }
2704
+ /**
2705
+ * This methods goes back in the context of Ionic's stack navigation.
2706
+ *
2707
+ * It recursively finds the top active `ion-router-outlet` and calls `pop()`.
2708
+ * This is the recommended way to go back when you are using `ion-router-outlet`.
2709
+ *
2710
+ * Resolves to `true` if it was able to pop.
2711
+ */
2712
+ async pop() {
2713
+ let outlet = this.topOutlet;
2714
+ while (outlet) {
2715
+ if (await outlet.pop()) {
2716
+ return true;
2717
+ }
2718
+ else {
2719
+ outlet = outlet.parentOutlet;
2720
+ }
2721
+ }
2722
+ return false;
2723
+ }
2724
+ /**
2725
+ * This methods specifies the direction of the next navigation performed by the Angular router.
2726
+ *
2727
+ * `setDirection()` does not trigger any transition, it just sets some flags to be consumed by `ion-router-outlet`.
2728
+ *
2729
+ * It's recommended to use `navigateForward()`, `navigateBack()` and `navigateRoot()` instead of `setDirection()`.
2730
+ */
2731
+ setDirection(direction, animated, animationDirection, animationBuilder) {
2732
+ this.direction = direction;
2733
+ this.animated = getAnimation(direction, animated, animationDirection);
2734
+ this.animationBuilder = animationBuilder;
2735
+ }
2736
+ /**
2737
+ * @internal
2738
+ */
2739
+ setTopOutlet(outlet) {
2740
+ this.topOutlet = outlet;
2741
+ }
2742
+ /**
2743
+ * @internal
2744
+ */
2745
+ consumeTransition() {
2746
+ let direction = 'root';
2747
+ let animation;
2748
+ const animationBuilder = this.animationBuilder;
2749
+ if (this.direction === 'auto') {
2750
+ direction = this.guessDirection;
2751
+ animation = this.guessAnimation;
2752
+ }
2753
+ else {
2754
+ animation = this.animated;
2755
+ direction = this.direction;
2756
+ }
2757
+ this.direction = DEFAULT_DIRECTION;
2758
+ this.animated = DEFAULT_ANIMATED;
2759
+ this.animationBuilder = undefined;
2760
+ return {
2761
+ direction,
2762
+ animation,
2763
+ animationBuilder,
2764
+ };
2765
+ }
2766
+ navigate(url, options) {
2767
+ if (Array.isArray(url)) {
2768
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2769
+ return this.router.navigate(url, options);
2770
+ }
2771
+ else {
2772
+ /**
2773
+ * navigateByUrl ignores any properties that
2774
+ * would change the url, so things like queryParams
2775
+ * would be ignored unless we create a url tree
2776
+ * More Info: https://github.com/angular/angular/issues/18798
2777
+ */
2778
+ const urlTree = this.serializer.parse(url.toString());
2779
+ if (options.queryParams !== undefined) {
2780
+ urlTree.queryParams = { ...options.queryParams };
2781
+ }
2782
+ if (options.fragment !== undefined) {
2783
+ urlTree.fragment = options.fragment;
2784
+ }
2785
+ /**
2786
+ * `navigateByUrl` will still apply `NavigationExtras` properties
2787
+ * that do not modify the url, such as `replaceUrl` which is why
2788
+ * `options` is passed in here.
2789
+ */
2790
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2791
+ return this.router.navigateByUrl(urlTree, options);
2792
+ }
2207
2793
  }
2208
2794
  }
2209
- /** @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: i2.AngularDelegate }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
2210
- /** @nocollapse */ IonNav.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IonNav, selector: "ion-nav", usesInheritance: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2211
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonNav, decorators: [{
2212
- type: Component,
2795
+ /** @nocollapse */ NavController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: NavController, deps: [{ token: Platform }, { token: i1.Location }, { token: i3.UrlSerializer }, { token: i3.Router, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
2796
+ /** @nocollapse */ NavController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: NavController, providedIn: 'root' });
2797
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: NavController, decorators: [{
2798
+ type: Injectable,
2213
2799
  args: [{
2214
- selector: 'ion-nav',
2215
- template: '<ng-content></ng-content>',
2216
- changeDetection: ChangeDetectionStrategy.OnPush,
2800
+ providedIn: 'root',
2217
2801
  }]
2218
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.EnvironmentInjector }, { type: i0.Injector }, { type: i2.AngularDelegate }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; } });
2802
+ }], ctorParameters: function () { return [{ type: Platform }, { type: i1.Location }, { type: i3.UrlSerializer }, { type: i3.Router, decorators: [{
2803
+ type: Optional
2804
+ }] }]; } });
2805
+ const getAnimation = (direction, animated, animationDirection) => {
2806
+ if (animated === false) {
2807
+ return undefined;
2808
+ }
2809
+ if (animationDirection !== undefined) {
2810
+ return animationDirection;
2811
+ }
2812
+ if (direction === 'forward' || direction === 'back') {
2813
+ return direction;
2814
+ }
2815
+ else if (direction === 'root' && animated === true) {
2816
+ return 'forward';
2817
+ }
2818
+ return undefined;
2819
+ };
2820
+ const DEFAULT_DIRECTION = 'auto';
2821
+ const DEFAULT_ANIMATED = undefined;
2219
2822
 
2220
2823
  /**
2221
- * Adds support for Ionic routing directions and animations to the base Angular router link directive.
2824
+ * @description
2825
+ * NavParams are an object that exists on a page and can contain data for that particular view.
2826
+ * Similar to how data was pass to a view in V1 with `$stateParams`, NavParams offer a much more flexible
2827
+ * option with a simple `get` method.
2222
2828
  *
2223
- * When the router link is clicked, the directive will assign the direction and
2224
- * animation so that the routing integration will transition correctly.
2829
+ * @usage
2830
+ * ```ts
2831
+ * import { NavParams } from '@ionic/angular';
2832
+ *
2833
+ * export class MyClass{
2834
+ *
2835
+ * constructor(navParams: NavParams){
2836
+ * // userParams is an object we have in our nav-parameters
2837
+ * navParams.get('userParams');
2838
+ * }
2839
+ *
2840
+ * }
2841
+ * ```
2225
2842
  */
2226
- class RouterLinkDelegateDirective extends RouterLinkDelegateDirective$1 {
2227
- }
2228
- /** @nocollapse */ RouterLinkDelegateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RouterLinkDelegateDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2229
- /** @nocollapse */ RouterLinkDelegateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: RouterLinkDelegateDirective, selector: ":not(a):not(area)[routerLink]", usesInheritance: true, ngImport: i0 });
2230
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RouterLinkDelegateDirective, decorators: [{
2231
- type: Directive,
2232
- args: [{
2233
- selector: ':not(a):not(area)[routerLink]',
2234
- }]
2235
- }] });
2236
- class RouterLinkWithHrefDelegateDirective extends RouterLinkWithHrefDelegateDirective$1 {
2843
+ class NavParams {
2844
+ constructor(data = {}) {
2845
+ this.data = data;
2846
+ }
2847
+ /**
2848
+ * Get the value of a nav-parameter for the current view
2849
+ *
2850
+ * ```ts
2851
+ * import { NavParams } from 'ionic-angular';
2852
+ *
2853
+ * export class MyClass{
2854
+ * constructor(public navParams: NavParams){
2855
+ * // userParams is an object we have in our nav-parameters
2856
+ * this.navParams.get('userParams');
2857
+ * }
2858
+ * }
2859
+ * ```
2860
+ *
2861
+ * @param param Which param you want to look up
2862
+ */
2863
+ get(param) {
2864
+ return this.data[param];
2865
+ }
2237
2866
  }
2238
- /** @nocollapse */ RouterLinkWithHrefDelegateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RouterLinkWithHrefDelegateDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2239
- /** @nocollapse */ RouterLinkWithHrefDelegateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: RouterLinkWithHrefDelegateDirective, selector: "a[routerLink],area[routerLink]", usesInheritance: true, ngImport: i0 });
2240
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RouterLinkWithHrefDelegateDirective, decorators: [{
2241
- type: Directive,
2242
- args: [{
2243
- selector: 'a[routerLink],area[routerLink]',
2244
- }]
2245
- }] });
2246
2867
 
2247
- class IonModal extends IonModal$1 {
2868
+ // TODO(FW-2827): types
2869
+ class AngularDelegate {
2870
+ constructor() {
2871
+ this.zone = inject(NgZone);
2872
+ this.applicationRef = inject(ApplicationRef);
2873
+ }
2874
+ create(environmentInjector, injector, elementReferenceKey) {
2875
+ return new AngularFrameworkDelegate(environmentInjector, injector, this.applicationRef, this.zone, elementReferenceKey);
2876
+ }
2248
2877
  }
2249
- /** @nocollapse */ IonModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonModal, deps: null, target: i0.ɵɵFactoryTarget.Component });
2250
- /** @nocollapse */ IonModal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IonModal, selector: "ion-modal", usesInheritance: true, ngImport: i0, template: `<div class="ion-delegate-host ion-page" *ngIf="isCmpOpen || keepContentsMounted">
2251
- <ng-container [ngTemplateOutlet]="template"></ng-container>
2252
- </div>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonModal, decorators: [{
2254
- type: Component,
2255
- args: [{
2256
- selector: 'ion-modal',
2257
- changeDetection: ChangeDetectionStrategy.OnPush,
2258
- template: `<div class="ion-delegate-host ion-page" *ngIf="isCmpOpen || keepContentsMounted">
2259
- <ng-container [ngTemplateOutlet]="template"></ng-container>
2260
- </div>`,
2261
- }]
2878
+ /** @nocollapse */ AngularDelegate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AngularDelegate, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2879
+ /** @nocollapse */ AngularDelegate.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AngularDelegate });
2880
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AngularDelegate, decorators: [{
2881
+ type: Injectable
2262
2882
  }] });
2263
-
2264
- class IonPopover extends IonPopover$1 {
2883
+ class AngularFrameworkDelegate {
2884
+ constructor(environmentInjector, injector, applicationRef, zone, elementReferenceKey) {
2885
+ this.environmentInjector = environmentInjector;
2886
+ this.injector = injector;
2887
+ this.applicationRef = applicationRef;
2888
+ this.zone = zone;
2889
+ this.elementReferenceKey = elementReferenceKey;
2890
+ this.elRefMap = new WeakMap();
2891
+ this.elEventsMap = new WeakMap();
2892
+ }
2893
+ attachViewToDom(container, component, params, cssClasses) {
2894
+ return this.zone.run(() => {
2895
+ return new Promise((resolve) => {
2896
+ const componentProps = {
2897
+ ...params,
2898
+ };
2899
+ /**
2900
+ * Ionic Angular passes a reference to a modal
2901
+ * or popover that can be accessed using a
2902
+ * variable in the overlay component. If
2903
+ * elementReferenceKey is defined, then we should
2904
+ * pass a reference to the component using
2905
+ * elementReferenceKey as the key.
2906
+ */
2907
+ if (this.elementReferenceKey !== undefined) {
2908
+ componentProps[this.elementReferenceKey] = container;
2909
+ }
2910
+ const el = attachView(this.zone, this.environmentInjector, this.injector, this.applicationRef, this.elRefMap, this.elEventsMap, container, component, componentProps, cssClasses, this.elementReferenceKey);
2911
+ resolve(el);
2912
+ });
2913
+ });
2914
+ }
2915
+ removeViewFromDom(_container, component) {
2916
+ return this.zone.run(() => {
2917
+ return new Promise((resolve) => {
2918
+ const componentRef = this.elRefMap.get(component);
2919
+ if (componentRef) {
2920
+ componentRef.destroy();
2921
+ this.elRefMap.delete(component);
2922
+ const unbindEvents = this.elEventsMap.get(component);
2923
+ if (unbindEvents) {
2924
+ unbindEvents();
2925
+ this.elEventsMap.delete(component);
2926
+ }
2927
+ }
2928
+ resolve();
2929
+ });
2930
+ });
2931
+ }
2265
2932
  }
2266
- /** @nocollapse */ IonPopover.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonPopover, deps: null, target: i0.ɵɵFactoryTarget.Component });
2267
- /** @nocollapse */ IonPopover.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IonPopover, selector: "ion-popover", usesInheritance: true, ngImport: i0, template: `<ng-container [ngTemplateOutlet]="template" *ngIf="isCmpOpen || keepContentsMounted"></ng-container>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2268
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonPopover, decorators: [{
2269
- type: Component,
2270
- args: [{
2271
- selector: 'ion-popover',
2272
- changeDetection: ChangeDetectionStrategy.OnPush,
2273
- template: `<ng-container [ngTemplateOutlet]="template" *ngIf="isCmpOpen || keepContentsMounted"></ng-container>`,
2274
- }]
2275
- }] });
2276
-
2277
- /**
2278
- * @description
2279
- * Provider which adds `MaxValidator` to the `NG_VALIDATORS` multi-provider list.
2280
- */
2281
- const ION_MAX_VALIDATOR = {
2933
+ const attachView = (zone, environmentInjector, injector, applicationRef, elRefMap, elEventsMap, container, component, params, cssClasses, elementReferenceKey) => {
2934
+ /**
2935
+ * Wraps the injector with a custom injector that
2936
+ * provides NavParams to the component.
2937
+ *
2938
+ * NavParams is a legacy feature from Ionic v3 that allows
2939
+ * Angular developers to provide data to a component
2940
+ * and access it by providing NavParams as a dependency
2941
+ * in the constructor.
2942
+ *
2943
+ * The modern approach is to access the data directly
2944
+ * from the component's class instance.
2945
+ */
2946
+ const childInjector = Injector.create({
2947
+ providers: getProviders(params),
2948
+ parent: injector,
2949
+ });
2950
+ const componentRef = createComponent(component, {
2951
+ environmentInjector,
2952
+ elementInjector: childInjector,
2953
+ });
2954
+ const instance = componentRef.instance;
2955
+ const hostElement = componentRef.location.nativeElement;
2956
+ if (params) {
2957
+ /**
2958
+ * For modals and popovers, a reference to the component is
2959
+ * added to `params` during the call to attachViewToDom. If
2960
+ * a reference using this name is already set, this means
2961
+ * the app is trying to use the name as a component prop,
2962
+ * which will cause collisions.
2963
+ */
2964
+ if (elementReferenceKey && instance[elementReferenceKey] !== undefined) {
2965
+ console.error(`[Ionic Error]: ${elementReferenceKey} is a reserved property when using ${container.tagName.toLowerCase()}. Rename or remove the "${elementReferenceKey}" property from ${component.name}.`);
2966
+ }
2967
+ Object.assign(instance, params);
2968
+ }
2969
+ if (cssClasses) {
2970
+ for (const cssClass of cssClasses) {
2971
+ hostElement.classList.add(cssClass);
2972
+ }
2973
+ }
2974
+ const unbindEvents = bindLifecycleEvents(zone, instance, hostElement);
2975
+ container.appendChild(hostElement);
2976
+ applicationRef.attachView(componentRef.hostView);
2977
+ elRefMap.set(hostElement, componentRef);
2978
+ elEventsMap.set(hostElement, unbindEvents);
2979
+ return hostElement;
2980
+ };
2981
+ const LIFECYCLES = [
2982
+ LIFECYCLE_WILL_ENTER,
2983
+ LIFECYCLE_DID_ENTER,
2984
+ LIFECYCLE_WILL_LEAVE,
2985
+ LIFECYCLE_DID_LEAVE,
2986
+ LIFECYCLE_WILL_UNLOAD,
2987
+ ];
2988
+ const bindLifecycleEvents = (zone, instance, element) => {
2989
+ return zone.run(() => {
2990
+ const unregisters = LIFECYCLES.filter((eventName) => typeof instance[eventName] === 'function').map((eventName) => {
2991
+ const handler = (ev) => instance[eventName](ev.detail);
2992
+ element.addEventListener(eventName, handler);
2993
+ return () => element.removeEventListener(eventName, handler);
2994
+ });
2995
+ return () => unregisters.forEach((fn) => fn());
2996
+ });
2997
+ };
2998
+ const NavParamsToken = new InjectionToken('NavParamsToken');
2999
+ const getProviders = (params) => {
3000
+ return [
3001
+ {
3002
+ provide: NavParamsToken,
3003
+ useValue: params,
3004
+ },
3005
+ {
3006
+ provide: NavParams,
3007
+ useFactory: provideNavParamsInjectable,
3008
+ deps: [NavParamsToken],
3009
+ },
3010
+ ];
3011
+ };
3012
+ const provideNavParamsInjectable = (params) => {
3013
+ return new NavParams(params);
3014
+ };
3015
+
3016
+ const insertView = (views, view, direction) => {
3017
+ if (direction === 'root') {
3018
+ return setRoot(views, view);
3019
+ }
3020
+ else if (direction === 'forward') {
3021
+ return setForward(views, view);
3022
+ }
3023
+ else {
3024
+ return setBack(views, view);
3025
+ }
3026
+ };
3027
+ const setRoot = (views, view) => {
3028
+ views = views.filter((v) => v.stackId !== view.stackId);
3029
+ views.push(view);
3030
+ return views;
3031
+ };
3032
+ const setForward = (views, view) => {
3033
+ const index = views.indexOf(view);
3034
+ if (index >= 0) {
3035
+ views = views.filter((v) => v.stackId !== view.stackId || v.id <= view.id);
3036
+ }
3037
+ else {
3038
+ views.push(view);
3039
+ }
3040
+ return views;
3041
+ };
3042
+ const setBack = (views, view) => {
3043
+ const index = views.indexOf(view);
3044
+ if (index >= 0) {
3045
+ return views.filter((v) => v.stackId !== view.stackId || v.id <= view.id);
3046
+ }
3047
+ else {
3048
+ return setRoot(views, view);
3049
+ }
3050
+ };
3051
+ const getUrl = (router, activatedRoute) => {
3052
+ const urlTree = router.createUrlTree(['.'], { relativeTo: activatedRoute });
3053
+ return router.serializeUrl(urlTree);
3054
+ };
3055
+ const isTabSwitch = (enteringView, leavingView) => {
3056
+ if (!leavingView) {
3057
+ return true;
3058
+ }
3059
+ return enteringView.stackId !== leavingView.stackId;
3060
+ };
3061
+ const computeStackId = (prefixUrl, url) => {
3062
+ if (!prefixUrl) {
3063
+ return undefined;
3064
+ }
3065
+ const segments = toSegments(url);
3066
+ for (let i = 0; i < segments.length; i++) {
3067
+ if (i >= prefixUrl.length) {
3068
+ return segments[i];
3069
+ }
3070
+ if (segments[i] !== prefixUrl[i]) {
3071
+ return undefined;
3072
+ }
3073
+ }
3074
+ return undefined;
3075
+ };
3076
+ const toSegments = (path) => {
3077
+ return path
3078
+ .split('/')
3079
+ .map((s) => s.trim())
3080
+ .filter((s) => s !== '');
3081
+ };
3082
+ const destroyView = (view) => {
3083
+ if (view) {
3084
+ view.ref.destroy();
3085
+ view.unlistenEvents();
3086
+ }
3087
+ };
3088
+
3089
+ // TODO(FW-2827): types
3090
+ class StackController {
3091
+ constructor(tabsPrefix, containerEl, router, navCtrl, zone, location) {
3092
+ this.containerEl = containerEl;
3093
+ this.router = router;
3094
+ this.navCtrl = navCtrl;
3095
+ this.zone = zone;
3096
+ this.location = location;
3097
+ this.views = [];
3098
+ this.skipTransition = false;
3099
+ this.nextId = 0;
3100
+ this.tabsPrefix = tabsPrefix !== undefined ? toSegments(tabsPrefix) : undefined;
3101
+ }
3102
+ createView(ref, activatedRoute) {
3103
+ const url = getUrl(this.router, activatedRoute);
3104
+ const element = ref?.location?.nativeElement;
3105
+ const unlistenEvents = bindLifecycleEvents(this.zone, ref.instance, element);
3106
+ return {
3107
+ id: this.nextId++,
3108
+ stackId: computeStackId(this.tabsPrefix, url),
3109
+ unlistenEvents,
3110
+ element,
3111
+ ref,
3112
+ url,
3113
+ };
3114
+ }
3115
+ getExistingView(activatedRoute) {
3116
+ const activatedUrlKey = getUrl(this.router, activatedRoute);
3117
+ const view = this.views.find((vw) => vw.url === activatedUrlKey);
3118
+ if (view) {
3119
+ view.ref.changeDetectorRef.reattach();
3120
+ }
3121
+ return view;
3122
+ }
3123
+ setActive(enteringView) {
3124
+ const consumeResult = this.navCtrl.consumeTransition();
3125
+ let { direction, animation, animationBuilder } = consumeResult;
3126
+ const leavingView = this.activeView;
3127
+ const tabSwitch = isTabSwitch(enteringView, leavingView);
3128
+ if (tabSwitch) {
3129
+ direction = 'back';
3130
+ animation = undefined;
3131
+ }
3132
+ const viewsSnapshot = this.views.slice();
3133
+ let currentNavigation;
3134
+ const router = this.router;
3135
+ // Angular >= 7.2.0
3136
+ if (router.getCurrentNavigation) {
3137
+ currentNavigation = router.getCurrentNavigation();
3138
+ // Angular < 7.2.0
3139
+ }
3140
+ else if (router.navigations?.value) {
3141
+ currentNavigation = router.navigations.value;
3142
+ }
3143
+ /**
3144
+ * If the navigation action
3145
+ * sets `replaceUrl: true`
3146
+ * then we need to make sure
3147
+ * we remove the last item
3148
+ * from our views stack
3149
+ */
3150
+ if (currentNavigation?.extras?.replaceUrl) {
3151
+ if (this.views.length > 0) {
3152
+ this.views.splice(-1, 1);
3153
+ }
3154
+ }
3155
+ const reused = this.views.includes(enteringView);
3156
+ const views = this.insertView(enteringView, direction);
3157
+ // Trigger change detection before transition starts
3158
+ // This will call ngOnInit() the first time too, just after the view
3159
+ // was attached to the dom, but BEFORE the transition starts
3160
+ if (!reused) {
3161
+ enteringView.ref.changeDetectorRef.detectChanges();
3162
+ }
3163
+ /**
3164
+ * If we are going back from a page that
3165
+ * was presented using a custom animation
3166
+ * we should default to using that
3167
+ * unless the developer explicitly
3168
+ * provided another animation.
3169
+ */
3170
+ const customAnimation = enteringView.animationBuilder;
3171
+ if (animationBuilder === undefined && direction === 'back' && !tabSwitch && customAnimation !== undefined) {
3172
+ animationBuilder = customAnimation;
3173
+ }
3174
+ /**
3175
+ * Save any custom animation so that navigating
3176
+ * back will use this custom animation by default.
3177
+ */
3178
+ if (leavingView) {
3179
+ leavingView.animationBuilder = animationBuilder;
3180
+ }
3181
+ // Wait until previous transitions finish
3182
+ return this.zone.runOutsideAngular(() => {
3183
+ return this.wait(() => {
3184
+ // disconnect leaving page from change detection to
3185
+ // reduce jank during the page transition
3186
+ if (leavingView) {
3187
+ leavingView.ref.changeDetectorRef.detach();
3188
+ }
3189
+ // In case the enteringView is the same as the leavingPage we need to reattach()
3190
+ enteringView.ref.changeDetectorRef.reattach();
3191
+ return this.transition(enteringView, leavingView, animation, this.canGoBack(1), false, animationBuilder)
3192
+ .then(() => cleanupAsync(enteringView, views, viewsSnapshot, this.location, this.zone))
3193
+ .then(() => ({
3194
+ enteringView,
3195
+ direction,
3196
+ animation,
3197
+ tabSwitch,
3198
+ }));
3199
+ });
3200
+ });
3201
+ }
3202
+ canGoBack(deep, stackId = this.getActiveStackId()) {
3203
+ return this.getStack(stackId).length > deep;
3204
+ }
3205
+ pop(deep, stackId = this.getActiveStackId()) {
3206
+ return this.zone.run(() => {
3207
+ const views = this.getStack(stackId);
3208
+ if (views.length <= deep) {
3209
+ return Promise.resolve(false);
3210
+ }
3211
+ const view = views[views.length - deep - 1];
3212
+ let url = view.url;
3213
+ const viewSavedData = view.savedData;
3214
+ if (viewSavedData) {
3215
+ const primaryOutlet = viewSavedData.get('primary');
3216
+ if (primaryOutlet?.route?._routerState?.snapshot.url) {
3217
+ url = primaryOutlet.route._routerState.snapshot.url;
3218
+ }
3219
+ }
3220
+ const { animationBuilder } = this.navCtrl.consumeTransition();
3221
+ return this.navCtrl.navigateBack(url, { ...view.savedExtras, animation: animationBuilder }).then(() => true);
3222
+ });
3223
+ }
3224
+ startBackTransition() {
3225
+ const leavingView = this.activeView;
3226
+ if (leavingView) {
3227
+ const views = this.getStack(leavingView.stackId);
3228
+ const enteringView = views[views.length - 2];
3229
+ const customAnimation = enteringView.animationBuilder;
3230
+ return this.wait(() => {
3231
+ return this.transition(enteringView, // entering view
3232
+ leavingView, // leaving view
3233
+ 'back', this.canGoBack(2), true, customAnimation);
3234
+ });
3235
+ }
3236
+ return Promise.resolve();
3237
+ }
3238
+ endBackTransition(shouldComplete) {
3239
+ if (shouldComplete) {
3240
+ this.skipTransition = true;
3241
+ this.pop(1);
3242
+ }
3243
+ else if (this.activeView) {
3244
+ cleanup(this.activeView, this.views, this.views, this.location, this.zone);
3245
+ }
3246
+ }
3247
+ getLastUrl(stackId) {
3248
+ const views = this.getStack(stackId);
3249
+ return views.length > 0 ? views[views.length - 1] : undefined;
3250
+ }
3251
+ /**
3252
+ * @internal
3253
+ */
3254
+ getRootUrl(stackId) {
3255
+ const views = this.getStack(stackId);
3256
+ return views.length > 0 ? views[0] : undefined;
3257
+ }
3258
+ getActiveStackId() {
3259
+ return this.activeView ? this.activeView.stackId : undefined;
3260
+ }
3261
+ /**
3262
+ * @internal
3263
+ */
3264
+ getActiveView() {
3265
+ return this.activeView;
3266
+ }
3267
+ hasRunningTask() {
3268
+ return this.runningTask !== undefined;
3269
+ }
3270
+ destroy() {
3271
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
3272
+ this.containerEl = undefined;
3273
+ this.views.forEach(destroyView);
3274
+ this.activeView = undefined;
3275
+ this.views = [];
3276
+ }
3277
+ getStack(stackId) {
3278
+ return this.views.filter((v) => v.stackId === stackId);
3279
+ }
3280
+ insertView(enteringView, direction) {
3281
+ this.activeView = enteringView;
3282
+ this.views = insertView(this.views, enteringView, direction);
3283
+ return this.views.slice();
3284
+ }
3285
+ transition(enteringView, leavingView, direction, showGoBack, progressAnimation, animationBuilder) {
3286
+ if (this.skipTransition) {
3287
+ this.skipTransition = false;
3288
+ return Promise.resolve(false);
3289
+ }
3290
+ if (leavingView === enteringView) {
3291
+ return Promise.resolve(false);
3292
+ }
3293
+ const enteringEl = enteringView ? enteringView.element : undefined;
3294
+ const leavingEl = leavingView ? leavingView.element : undefined;
3295
+ const containerEl = this.containerEl;
3296
+ if (enteringEl && enteringEl !== leavingEl) {
3297
+ enteringEl.classList.add('ion-page');
3298
+ enteringEl.classList.add('ion-page-invisible');
3299
+ if (enteringEl.parentElement !== containerEl) {
3300
+ containerEl.appendChild(enteringEl);
3301
+ }
3302
+ if (containerEl.commit) {
3303
+ return containerEl.commit(enteringEl, leavingEl, {
3304
+ duration: direction === undefined ? 0 : undefined,
3305
+ direction,
3306
+ showGoBack,
3307
+ progressAnimation,
3308
+ animationBuilder,
3309
+ });
3310
+ }
3311
+ }
3312
+ return Promise.resolve(false);
3313
+ }
3314
+ async wait(task) {
3315
+ if (this.runningTask !== undefined) {
3316
+ await this.runningTask;
3317
+ this.runningTask = undefined;
3318
+ }
3319
+ const promise = (this.runningTask = task());
3320
+ promise.finally(() => (this.runningTask = undefined));
3321
+ return promise;
3322
+ }
3323
+ }
3324
+ const cleanupAsync = (activeRoute, views, viewsSnapshot, location, zone) => {
3325
+ if (typeof requestAnimationFrame === 'function') {
3326
+ return new Promise((resolve) => {
3327
+ requestAnimationFrame(() => {
3328
+ cleanup(activeRoute, views, viewsSnapshot, location, zone);
3329
+ resolve();
3330
+ });
3331
+ });
3332
+ }
3333
+ return Promise.resolve();
3334
+ };
3335
+ const cleanup = (activeRoute, views, viewsSnapshot, location, zone) => {
3336
+ /**
3337
+ * Re-enter the Angular zone when destroying page components. This will allow
3338
+ * lifecycle events (`ngOnDestroy`) to be run inside the Angular zone.
3339
+ */
3340
+ zone.run(() => viewsSnapshot.filter((view) => !views.includes(view)).forEach(destroyView));
3341
+ views.forEach((view) => {
3342
+ /**
3343
+ * In the event that a user navigated multiple
3344
+ * times in rapid succession, we want to make sure
3345
+ * we don't pre-emptively detach a view while
3346
+ * it is in mid-transition.
3347
+ *
3348
+ * In this instance we also do not care about query
3349
+ * params or fragments as it will be the same view regardless
3350
+ */
3351
+ const locationWithoutParams = location.path().split('?')[0];
3352
+ const locationWithoutFragment = locationWithoutParams.split('#')[0];
3353
+ if (view !== activeRoute && view.url !== locationWithoutFragment) {
3354
+ const element = view.element;
3355
+ element.setAttribute('aria-hidden', 'true');
3356
+ element.classList.add('ion-page-hidden');
3357
+ view.ref.changeDetectorRef.detach();
3358
+ }
3359
+ });
3360
+ };
3361
+
3362
+ // TODO(FW-2827): types
3363
+ // eslint-disable-next-line @angular-eslint/directive-class-suffix
3364
+ class IonRouterOutlet {
3365
+ constructor(name, tabs, commonLocation, elementRef, router, zone, activatedRoute, parentOutlet) {
3366
+ this.parentOutlet = parentOutlet;
3367
+ this.activatedView = null;
3368
+ // Maintain map of activated route proxies for each component instance
3369
+ this.proxyMap = new WeakMap();
3370
+ // Keep the latest activated route in a subject for the proxy routes to switch map to
3371
+ this.currentActivatedRoute$ = new BehaviorSubject(null);
3372
+ this.activated = null;
3373
+ this._activatedRoute = null;
3374
+ /**
3375
+ * The name of the outlet
3376
+ */
3377
+ this.name = PRIMARY_OUTLET;
3378
+ /** @internal */
3379
+ this.stackWillChange = new EventEmitter();
3380
+ /** @internal */
3381
+ this.stackDidChange = new EventEmitter();
3382
+ // eslint-disable-next-line @angular-eslint/no-output-rename
3383
+ this.activateEvents = new EventEmitter();
3384
+ // eslint-disable-next-line @angular-eslint/no-output-rename
3385
+ this.deactivateEvents = new EventEmitter();
3386
+ this.parentContexts = inject(ChildrenOutletContexts);
3387
+ this.location = inject(ViewContainerRef);
3388
+ this.environmentInjector = inject(EnvironmentInjector);
3389
+ this.inputBinder = inject(INPUT_BINDER, { optional: true });
3390
+ /** @nodoc */
3391
+ this.supportsBindingToComponentInputs = true;
3392
+ // Ionic providers
3393
+ this.config = inject(Config);
3394
+ this.navCtrl = inject(NavController);
3395
+ this.nativeEl = elementRef.nativeElement;
3396
+ this.name = name || PRIMARY_OUTLET;
3397
+ this.tabsPrefix = tabs === 'true' ? getUrl(router, activatedRoute) : undefined;
3398
+ this.stackCtrl = new StackController(this.tabsPrefix, this.nativeEl, router, this.navCtrl, zone, commonLocation);
3399
+ this.parentContexts.onChildOutletCreated(this.name, this);
3400
+ }
3401
+ /** @internal */
3402
+ get activatedComponentRef() {
3403
+ return this.activated;
3404
+ }
3405
+ set animation(animation) {
3406
+ this.nativeEl.animation = animation;
3407
+ }
3408
+ set animated(animated) {
3409
+ this.nativeEl.animated = animated;
3410
+ }
3411
+ set swipeGesture(swipe) {
3412
+ this._swipeGesture = swipe;
3413
+ this.nativeEl.swipeHandler = swipe
3414
+ ? {
3415
+ canStart: () => this.stackCtrl.canGoBack(1) && !this.stackCtrl.hasRunningTask(),
3416
+ onStart: () => this.stackCtrl.startBackTransition(),
3417
+ onEnd: (shouldContinue) => this.stackCtrl.endBackTransition(shouldContinue),
3418
+ }
3419
+ : undefined;
3420
+ }
3421
+ ngOnDestroy() {
3422
+ this.stackCtrl.destroy();
3423
+ this.inputBinder?.unsubscribeFromRouteData(this);
3424
+ }
3425
+ getContext() {
3426
+ return this.parentContexts.getContext(this.name);
3427
+ }
3428
+ ngOnInit() {
3429
+ this.initializeOutletWithName();
3430
+ }
3431
+ // Note: Ionic deviates from the Angular Router implementation here
3432
+ initializeOutletWithName() {
3433
+ if (!this.activated) {
3434
+ // If the outlet was not instantiated at the time the route got activated we need to populate
3435
+ // the outlet when it is initialized (ie inside a NgIf)
3436
+ const context = this.getContext();
3437
+ if (context?.route) {
3438
+ this.activateWith(context.route, context.injector);
3439
+ }
3440
+ }
3441
+ new Promise((resolve) => componentOnReady(this.nativeEl, resolve)).then(() => {
3442
+ if (this._swipeGesture === undefined) {
3443
+ this.swipeGesture = this.config.getBoolean('swipeBackEnabled', this.nativeEl.mode === 'ios');
3444
+ }
3445
+ });
3446
+ }
3447
+ get isActivated() {
3448
+ return !!this.activated;
3449
+ }
3450
+ get component() {
3451
+ if (!this.activated) {
3452
+ throw new Error('Outlet is not activated');
3453
+ }
3454
+ return this.activated.instance;
3455
+ }
3456
+ get activatedRoute() {
3457
+ if (!this.activated) {
3458
+ throw new Error('Outlet is not activated');
3459
+ }
3460
+ return this._activatedRoute;
3461
+ }
3462
+ get activatedRouteData() {
3463
+ if (this._activatedRoute) {
3464
+ return this._activatedRoute.snapshot.data;
3465
+ }
3466
+ return {};
3467
+ }
3468
+ /**
3469
+ * Called when the `RouteReuseStrategy` instructs to detach the subtree
3470
+ */
3471
+ detach() {
3472
+ throw new Error('incompatible reuse strategy');
3473
+ }
3474
+ /**
3475
+ * Called when the `RouteReuseStrategy` instructs to re-attach a previously detached subtree
3476
+ */
3477
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
3478
+ attach(_ref, _activatedRoute) {
3479
+ throw new Error('incompatible reuse strategy');
3480
+ }
3481
+ deactivate() {
3482
+ if (this.activated) {
3483
+ if (this.activatedView) {
3484
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
3485
+ const context = this.getContext();
3486
+ this.activatedView.savedData = new Map(context.children['contexts']);
3487
+ /**
3488
+ * Angular v11.2.10 introduced a change
3489
+ * where this route context is cleared out when
3490
+ * a router-outlet is deactivated, However,
3491
+ * we need this route information in order to
3492
+ * return a user back to the correct tab when
3493
+ * leaving and then going back to the tab context.
3494
+ */
3495
+ const primaryOutlet = this.activatedView.savedData.get('primary');
3496
+ if (primaryOutlet && context.route) {
3497
+ primaryOutlet.route = { ...context.route };
3498
+ }
3499
+ /**
3500
+ * Ensure we are saving the NavigationExtras
3501
+ * data otherwise it will be lost
3502
+ */
3503
+ this.activatedView.savedExtras = {};
3504
+ if (context.route) {
3505
+ const contextSnapshot = context.route.snapshot;
3506
+ this.activatedView.savedExtras.queryParams = contextSnapshot.queryParams;
3507
+ this.activatedView.savedExtras.fragment = contextSnapshot.fragment;
3508
+ }
3509
+ }
3510
+ const c = this.component;
3511
+ this.activatedView = null;
3512
+ this.activated = null;
3513
+ this._activatedRoute = null;
3514
+ this.deactivateEvents.emit(c);
3515
+ }
3516
+ }
3517
+ activateWith(activatedRoute, environmentInjector) {
3518
+ if (this.isActivated) {
3519
+ throw new Error('Cannot activate an already activated outlet');
3520
+ }
3521
+ this._activatedRoute = activatedRoute;
3522
+ let cmpRef;
3523
+ let enteringView = this.stackCtrl.getExistingView(activatedRoute);
3524
+ if (enteringView) {
3525
+ cmpRef = this.activated = enteringView.ref;
3526
+ const saved = enteringView.savedData;
3527
+ if (saved) {
3528
+ // self-restore
3529
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
3530
+ const context = this.getContext();
3531
+ context.children['contexts'] = saved;
3532
+ }
3533
+ // Updated activated route proxy for this component
3534
+ this.updateActivatedRouteProxy(cmpRef.instance, activatedRoute);
3535
+ }
3536
+ else {
3537
+ const snapshot = activatedRoute._futureSnapshot;
3538
+ /**
3539
+ * Angular 14 introduces a new `loadComponent` property to the route config.
3540
+ * This function will assign a `component` property to the route snapshot.
3541
+ * We check for the presence of this property to determine if the route is
3542
+ * using standalone components.
3543
+ */
3544
+ const childContexts = this.parentContexts.getOrCreateContext(this.name).children;
3545
+ // We create an activated route proxy object that will maintain future updates for this component
3546
+ // over its lifecycle in the stack.
3547
+ const component$ = new BehaviorSubject(null);
3548
+ const activatedRouteProxy = this.createActivatedRouteProxy(component$, activatedRoute);
3549
+ const injector = new OutletInjector(activatedRouteProxy, childContexts, this.location.injector);
3550
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
3551
+ const component = snapshot.routeConfig.component ?? snapshot.component;
3552
+ cmpRef = this.activated = this.location.createComponent(component, {
3553
+ index: this.location.length,
3554
+ injector,
3555
+ environmentInjector: environmentInjector ?? this.environmentInjector,
3556
+ });
3557
+ // Once the component is created we can push it to our local subject supplied to the proxy
3558
+ component$.next(cmpRef.instance);
3559
+ // Calling `markForCheck` to make sure we will run the change detection when the
3560
+ // `RouterOutlet` is inside a `ChangeDetectionStrategy.OnPush` component.
3561
+ enteringView = this.stackCtrl.createView(this.activated, activatedRoute);
3562
+ // Store references to the proxy by component
3563
+ this.proxyMap.set(cmpRef.instance, activatedRouteProxy);
3564
+ this.currentActivatedRoute$.next({ component: cmpRef.instance, activatedRoute });
3565
+ }
3566
+ this.inputBinder?.bindActivatedRouteToOutletComponent(this);
3567
+ this.activatedView = enteringView;
3568
+ /**
3569
+ * The top outlet is set prior to the entering view's transition completing,
3570
+ * so that when we have nested outlets (e.g. ion-tabs inside an ion-router-outlet),
3571
+ * the tabs outlet will be assigned as the top outlet when a view inside tabs is
3572
+ * activated.
3573
+ *
3574
+ * In this scenario, activeWith is called for both the tabs and the root router outlet.
3575
+ * To avoid a race condition, we assign the top outlet synchronously.
3576
+ */
3577
+ this.navCtrl.setTopOutlet(this);
3578
+ const leavingView = this.stackCtrl.getActiveView();
3579
+ this.stackWillChange.emit({
3580
+ enteringView,
3581
+ tabSwitch: isTabSwitch(enteringView, leavingView),
3582
+ });
3583
+ this.stackCtrl.setActive(enteringView).then((data) => {
3584
+ this.activateEvents.emit(cmpRef.instance);
3585
+ this.stackDidChange.emit(data);
3586
+ });
3587
+ }
3588
+ /**
3589
+ * Returns `true` if there are pages in the stack to go back.
3590
+ */
3591
+ canGoBack(deep = 1, stackId) {
3592
+ return this.stackCtrl.canGoBack(deep, stackId);
3593
+ }
3594
+ /**
3595
+ * Resolves to `true` if it the outlet was able to sucessfully pop the last N pages.
3596
+ */
3597
+ pop(deep = 1, stackId) {
3598
+ return this.stackCtrl.pop(deep, stackId);
3599
+ }
3600
+ /**
3601
+ * Returns the URL of the active page of each stack.
3602
+ */
3603
+ getLastUrl(stackId) {
3604
+ const active = this.stackCtrl.getLastUrl(stackId);
3605
+ return active ? active.url : undefined;
3606
+ }
3607
+ /**
3608
+ * Returns the RouteView of the active page of each stack.
3609
+ * @internal
3610
+ */
3611
+ getLastRouteView(stackId) {
3612
+ return this.stackCtrl.getLastUrl(stackId);
3613
+ }
3614
+ /**
3615
+ * Returns the root view in the tab stack.
3616
+ * @internal
3617
+ */
3618
+ getRootView(stackId) {
3619
+ return this.stackCtrl.getRootUrl(stackId);
3620
+ }
3621
+ /**
3622
+ * Returns the active stack ID. In the context of ion-tabs, it means the active tab.
3623
+ */
3624
+ getActiveStackId() {
3625
+ return this.stackCtrl.getActiveStackId();
3626
+ }
3627
+ /**
3628
+ * Since the activated route can change over the life time of a component in an ion router outlet, we create
3629
+ * a proxy so that we can update the values over time as a user navigates back to components already in the stack.
3630
+ */
3631
+ createActivatedRouteProxy(component$, activatedRoute) {
3632
+ const proxy = new ActivatedRoute();
3633
+ proxy._futureSnapshot = activatedRoute._futureSnapshot;
3634
+ proxy._routerState = activatedRoute._routerState;
3635
+ proxy.snapshot = activatedRoute.snapshot;
3636
+ proxy.outlet = activatedRoute.outlet;
3637
+ proxy.component = activatedRoute.component;
3638
+ // Setup wrappers for the observables so consumers don't have to worry about switching to new observables as the state updates
3639
+ proxy._paramMap = this.proxyObservable(component$, 'paramMap');
3640
+ proxy._queryParamMap = this.proxyObservable(component$, 'queryParamMap');
3641
+ proxy.url = this.proxyObservable(component$, 'url');
3642
+ proxy.params = this.proxyObservable(component$, 'params');
3643
+ proxy.queryParams = this.proxyObservable(component$, 'queryParams');
3644
+ proxy.fragment = this.proxyObservable(component$, 'fragment');
3645
+ proxy.data = this.proxyObservable(component$, 'data');
3646
+ return proxy;
3647
+ }
3648
+ /**
3649
+ * Create a wrapped observable that will switch to the latest activated route matched by the given component
3650
+ */
3651
+ proxyObservable(component$, path) {
3652
+ return component$.pipe(
3653
+ // First wait until the component instance is pushed
3654
+ filter((component) => !!component), switchMap((component) => this.currentActivatedRoute$.pipe(filter((current) => current !== null && current.component === component), switchMap((current) => current && current.activatedRoute[path]), distinctUntilChanged())));
3655
+ }
3656
+ /**
3657
+ * Updates the activated route proxy for the given component to the new incoming router state
3658
+ */
3659
+ updateActivatedRouteProxy(component, activatedRoute) {
3660
+ const proxy = this.proxyMap.get(component);
3661
+ if (!proxy) {
3662
+ throw new Error(`Could not find activated route proxy for view`);
3663
+ }
3664
+ proxy._futureSnapshot = activatedRoute._futureSnapshot;
3665
+ proxy._routerState = activatedRoute._routerState;
3666
+ proxy.snapshot = activatedRoute.snapshot;
3667
+ proxy.outlet = activatedRoute.outlet;
3668
+ proxy.component = activatedRoute.component;
3669
+ this.currentActivatedRoute$.next({ component, activatedRoute });
3670
+ }
3671
+ }
3672
+ /** @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 });
3673
+ /** @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 });
3674
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonRouterOutlet, decorators: [{
3675
+ type: Directive,
3676
+ args: [{
3677
+ selector: 'ion-router-outlet',
3678
+ exportAs: 'outlet',
3679
+ // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
3680
+ inputs: ['animated', 'animation', 'mode', 'swipeGesture'],
3681
+ }]
3682
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
3683
+ type: Attribute,
3684
+ args: ['name']
3685
+ }] }, { type: undefined, decorators: [{
3686
+ type: Optional
3687
+ }, {
3688
+ type: Attribute,
3689
+ args: ['tabs']
3690
+ }] }, { type: i1.Location }, { type: i0.ElementRef }, { type: i3.Router }, { type: i0.NgZone }, { type: i3.ActivatedRoute }, { type: IonRouterOutlet, decorators: [{
3691
+ type: SkipSelf
3692
+ }, {
3693
+ type: Optional
3694
+ }] }]; }, propDecorators: { name: [{
3695
+ type: Input
3696
+ }], stackWillChange: [{
3697
+ type: Output
3698
+ }], stackDidChange: [{
3699
+ type: Output
3700
+ }], activateEvents: [{
3701
+ type: Output,
3702
+ args: ['activate']
3703
+ }], deactivateEvents: [{
3704
+ type: Output,
3705
+ args: ['deactivate']
3706
+ }] } });
3707
+ class OutletInjector {
3708
+ constructor(route, childContexts, parent) {
3709
+ this.route = route;
3710
+ this.childContexts = childContexts;
3711
+ this.parent = parent;
3712
+ }
3713
+ get(token, notFoundValue) {
3714
+ if (token === ActivatedRoute) {
3715
+ return this.route;
3716
+ }
3717
+ if (token === ChildrenOutletContexts) {
3718
+ return this.childContexts;
3719
+ }
3720
+ return this.parent.get(token, notFoundValue);
3721
+ }
3722
+ }
3723
+ // TODO: FW-4785 - Remove this once Angular 15 support is dropped
3724
+ const INPUT_BINDER = new InjectionToken('');
3725
+ /**
3726
+ * Injectable used as a tree-shakable provider for opting in to binding router data to component
3727
+ * inputs.
3728
+ *
3729
+ * The RouterOutlet registers itself with this service when an `ActivatedRoute` is attached or
3730
+ * activated. When this happens, the service subscribes to the `ActivatedRoute` observables (params,
3731
+ * queryParams, data) and sets the inputs of the component using `ComponentRef.setInput`.
3732
+ * Importantly, when an input does not have an item in the route data with a matching key, this
3733
+ * input is set to `undefined`. If it were not done this way, the previous information would be
3734
+ * retained if the data got removed from the route (i.e. if a query parameter is removed).
3735
+ *
3736
+ * The `RouterOutlet` should unregister itself when destroyed via `unsubscribeFromRouteData` so that
3737
+ * the subscriptions are cleaned up.
3738
+ */
3739
+ class RoutedComponentInputBinder {
3740
+ constructor() {
3741
+ this.outletDataSubscriptions = new Map();
3742
+ }
3743
+ bindActivatedRouteToOutletComponent(outlet) {
3744
+ this.unsubscribeFromRouteData(outlet);
3745
+ this.subscribeToRouteData(outlet);
3746
+ }
3747
+ unsubscribeFromRouteData(outlet) {
3748
+ this.outletDataSubscriptions.get(outlet)?.unsubscribe();
3749
+ this.outletDataSubscriptions.delete(outlet);
3750
+ }
3751
+ subscribeToRouteData(outlet) {
3752
+ const { activatedRoute } = outlet;
3753
+ const dataSubscription = combineLatest([activatedRoute.queryParams, activatedRoute.params, activatedRoute.data])
3754
+ .pipe(switchMap(([queryParams, params, data], index) => {
3755
+ data = { ...queryParams, ...params, ...data };
3756
+ // Get the first result from the data subscription synchronously so it's available to
3757
+ // the component as soon as possible (and doesn't require a second change detection).
3758
+ if (index === 0) {
3759
+ return of(data);
3760
+ }
3761
+ // Promise.resolve is used to avoid synchronously writing the wrong data when
3762
+ // two of the Observables in the `combineLatest` stream emit one after
3763
+ // another.
3764
+ return Promise.resolve(data);
3765
+ }))
3766
+ .subscribe((data) => {
3767
+ // Outlet may have been deactivated or changed names to be associated with a different
3768
+ // route
3769
+ if (!outlet.isActivated ||
3770
+ !outlet.activatedComponentRef ||
3771
+ outlet.activatedRoute !== activatedRoute ||
3772
+ activatedRoute.component === null) {
3773
+ this.unsubscribeFromRouteData(outlet);
3774
+ return;
3775
+ }
3776
+ const mirror = reflectComponentType(activatedRoute.component);
3777
+ if (!mirror) {
3778
+ this.unsubscribeFromRouteData(outlet);
3779
+ return;
3780
+ }
3781
+ for (const { templateName } of mirror.inputs) {
3782
+ outlet.activatedComponentRef.setInput(templateName, data[templateName]);
3783
+ }
3784
+ });
3785
+ this.outletDataSubscriptions.set(outlet, dataSubscription);
3786
+ }
3787
+ }
3788
+ /** @nocollapse */ RoutedComponentInputBinder.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RoutedComponentInputBinder, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3789
+ /** @nocollapse */ RoutedComponentInputBinder.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RoutedComponentInputBinder });
3790
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RoutedComponentInputBinder, decorators: [{
3791
+ type: Injectable
3792
+ }] });
3793
+
3794
+ // eslint-disable-next-line @angular-eslint/component-class-suffix
3795
+ class IonTabs {
3796
+ constructor(navCtrl) {
3797
+ this.navCtrl = navCtrl;
3798
+ /**
3799
+ * Emitted before the tab view is changed.
3800
+ */
3801
+ this.ionTabsWillChange = new EventEmitter();
3802
+ /**
3803
+ * Emitted after the tab view is changed.
3804
+ */
3805
+ this.ionTabsDidChange = new EventEmitter();
3806
+ this.tabBarSlot = 'bottom';
3807
+ }
3808
+ ngAfterContentInit() {
3809
+ this.detectSlotChanges();
3810
+ }
3811
+ ngAfterContentChecked() {
3812
+ this.detectSlotChanges();
3813
+ }
3814
+ /**
3815
+ * @internal
3816
+ */
3817
+ onStackWillChange({ enteringView, tabSwitch }) {
3818
+ const stackId = enteringView.stackId;
3819
+ if (tabSwitch && stackId !== undefined) {
3820
+ this.ionTabsWillChange.emit({ tab: stackId });
3821
+ }
3822
+ }
3823
+ /**
3824
+ * @internal
3825
+ */
3826
+ onStackDidChange({ enteringView, tabSwitch }) {
3827
+ const stackId = enteringView.stackId;
3828
+ if (tabSwitch && stackId !== undefined) {
3829
+ if (this.tabBar) {
3830
+ this.tabBar.selectedTab = stackId;
3831
+ }
3832
+ this.ionTabsDidChange.emit({ tab: stackId });
3833
+ }
3834
+ }
3835
+ /**
3836
+ * When a tab button is clicked, there are several scenarios:
3837
+ * 1. If the selected tab is currently active (the tab button has been clicked
3838
+ * again), then it should go to the root view for that tab.
3839
+ *
3840
+ * a. Get the saved root view from the router outlet. If the saved root view
3841
+ * matches the tabRootUrl, set the route view to this view including the
3842
+ * navigation extras.
3843
+ * b. If the saved root view from the router outlet does
3844
+ * not match, navigate to the tabRootUrl. No navigation extras are
3845
+ * included.
3846
+ *
3847
+ * 2. If the current tab tab is not currently selected, get the last route
3848
+ * view from the router outlet.
3849
+ *
3850
+ * a. If the last route view exists, navigate to that view including any
3851
+ * navigation extras
3852
+ * b. If the last route view doesn't exist, then navigate
3853
+ * to the default tabRootUrl
3854
+ */
3855
+ select(tabOrEvent) {
3856
+ const isTabString = typeof tabOrEvent === 'string';
3857
+ const tab = isTabString ? tabOrEvent : tabOrEvent.detail.tab;
3858
+ const alreadySelected = this.outlet.getActiveStackId() === tab;
3859
+ const tabRootUrl = `${this.outlet.tabsPrefix}/${tab}`;
3860
+ /**
3861
+ * If this is a nested tab, prevent the event
3862
+ * from bubbling otherwise the outer tabs
3863
+ * will respond to this event too, causing
3864
+ * the app to get directed to the wrong place.
3865
+ */
3866
+ if (!isTabString) {
3867
+ tabOrEvent.stopPropagation();
3868
+ }
3869
+ if (alreadySelected) {
3870
+ const activeStackId = this.outlet.getActiveStackId();
3871
+ const activeView = this.outlet.getLastRouteView(activeStackId);
3872
+ // If on root tab, do not navigate to root tab again
3873
+ if (activeView?.url === tabRootUrl) {
3874
+ return;
3875
+ }
3876
+ const rootView = this.outlet.getRootView(tab);
3877
+ const navigationExtras = rootView && tabRootUrl === rootView.url && rootView.savedExtras;
3878
+ return this.navCtrl.navigateRoot(tabRootUrl, {
3879
+ ...navigationExtras,
3880
+ animated: true,
3881
+ animationDirection: 'back',
3882
+ });
3883
+ }
3884
+ else {
3885
+ const lastRoute = this.outlet.getLastRouteView(tab);
3886
+ /**
3887
+ * If there is a lastRoute, goto that, otherwise goto the fallback url of the
3888
+ * selected tab
3889
+ */
3890
+ const url = lastRoute?.url || tabRootUrl;
3891
+ const navigationExtras = lastRoute?.savedExtras;
3892
+ return this.navCtrl.navigateRoot(url, {
3893
+ ...navigationExtras,
3894
+ animated: true,
3895
+ animationDirection: 'back',
3896
+ });
3897
+ }
3898
+ }
3899
+ getSelected() {
3900
+ return this.outlet.getActiveStackId();
3901
+ }
3902
+ /**
3903
+ * Detects changes to the slot attribute of the tab bar.
3904
+ *
3905
+ * If the slot attribute has changed, then the tab bar
3906
+ * should be relocated to the new slot position.
3907
+ */
3908
+ detectSlotChanges() {
3909
+ this.tabBars.forEach((tabBar) => {
3910
+ // el is a protected attribute from the generated component wrapper
3911
+ const currentSlot = tabBar.el.getAttribute('slot');
3912
+ if (currentSlot !== this.tabBarSlot) {
3913
+ this.tabBarSlot = currentSlot;
3914
+ this.relocateTabBar();
3915
+ }
3916
+ });
3917
+ }
3918
+ /**
3919
+ * Relocates the tab bar to the new slot position.
3920
+ */
3921
+ relocateTabBar() {
3922
+ /**
3923
+ * `el` is a protected attribute from the generated component wrapper.
3924
+ * To avoid having to manually create the wrapper for tab bar, we
3925
+ * cast the tab bar to any and access the protected attribute.
3926
+ */
3927
+ const tabBar = this.tabBar.el;
3928
+ if (this.tabBarSlot === 'top') {
3929
+ /**
3930
+ * A tab bar with a slot of "top" should be inserted
3931
+ * at the top of the container.
3932
+ */
3933
+ this.tabsInner.nativeElement.before(tabBar);
3934
+ }
3935
+ else {
3936
+ /**
3937
+ * A tab bar with a slot of "bottom" or without a slot
3938
+ * should be inserted at the end of the container.
3939
+ */
3940
+ this.tabsInner.nativeElement.after(tabBar);
3941
+ }
3942
+ }
3943
+ }
3944
+ /** @nocollapse */ IonTabs.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonTabs, deps: [{ token: NavController }], target: i0.ɵɵFactoryTarget.Component });
3945
+ /** @nocollapse */ IonTabs.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IonTabs, selector: "ion-tabs", outputs: { ionTabsWillChange: "ionTabsWillChange", ionTabsDidChange: "ionTabsDidChange" }, host: { listeners: { "ionTabButtonClick": "select($event)" } }, queries: [{ propertyName: "tabBar", first: true, predicate: IonTabBar, descendants: true }, { propertyName: "tabBars", predicate: IonTabBar }], viewQueries: [{ propertyName: "outlet", first: true, predicate: ["outlet"], descendants: true, read: IonRouterOutlet }, { propertyName: "tabsInner", first: true, predicate: ["tabsInner"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: `
3946
+ <ng-content select="[slot=top]"></ng-content>
3947
+ <div class="tabs-inner" #tabsInner>
3948
+ <ion-router-outlet
3949
+ #outlet
3950
+ tabs="true"
3951
+ (stackWillChange)="onStackWillChange($event)"
3952
+ (stackDidChange)="onStackDidChange($event)"
3953
+ ></ion-router-outlet>
3954
+ </div>
3955
+ <ng-content></ng-content>
3956
+ `, isInline: true, styles: [":host{display:flex;position:absolute;inset:0;flex-direction:column;width:100%;height:100%;contain:layout size style}.tabs-inner{position:relative;flex:1;contain:layout size style}\n"], dependencies: [{ kind: "directive", type: IonRouterOutlet, selector: "ion-router-outlet", inputs: ["animated", "animation", "mode", "swipeGesture", "name"], outputs: ["stackWillChange", "stackDidChange", "activate", "deactivate"], exportAs: ["outlet"] }] });
3957
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonTabs, decorators: [{
3958
+ type: Component,
3959
+ args: [{ selector: 'ion-tabs', template: `
3960
+ <ng-content select="[slot=top]"></ng-content>
3961
+ <div class="tabs-inner" #tabsInner>
3962
+ <ion-router-outlet
3963
+ #outlet
3964
+ tabs="true"
3965
+ (stackWillChange)="onStackWillChange($event)"
3966
+ (stackDidChange)="onStackDidChange($event)"
3967
+ ></ion-router-outlet>
3968
+ </div>
3969
+ <ng-content></ng-content>
3970
+ `, styles: [":host{display:flex;position:absolute;inset:0;flex-direction:column;width:100%;height:100%;contain:layout size style}.tabs-inner{position:relative;flex:1;contain:layout size style}\n"] }]
3971
+ }], ctorParameters: function () { return [{ type: NavController }]; }, propDecorators: { outlet: [{
3972
+ type: ViewChild,
3973
+ args: ['outlet', { read: IonRouterOutlet, static: false }]
3974
+ }], tabsInner: [{
3975
+ type: ViewChild,
3976
+ args: ['tabsInner', { read: ElementRef, static: true }]
3977
+ }], tabBar: [{
3978
+ type: ContentChild,
3979
+ args: [IonTabBar, { static: false }]
3980
+ }], tabBars: [{
3981
+ type: ContentChildren,
3982
+ args: [IonTabBar]
3983
+ }], ionTabsWillChange: [{
3984
+ type: Output
3985
+ }], ionTabsDidChange: [{
3986
+ type: Output
3987
+ }], select: [{
3988
+ type: HostListener,
3989
+ args: ['ionTabButtonClick', ['$event']]
3990
+ }] } });
3991
+
3992
+ class IonBackButtonDelegateDirective {
3993
+ constructor(routerOutlet, navCtrl, config) {
3994
+ this.routerOutlet = routerOutlet;
3995
+ this.navCtrl = navCtrl;
3996
+ this.config = config;
3997
+ }
3998
+ /**
3999
+ * @internal
4000
+ */
4001
+ onClick(ev) {
4002
+ const defaultHref = this.defaultHref || this.config.get('backButtonDefaultHref');
4003
+ if (this.routerOutlet?.canGoBack()) {
4004
+ this.navCtrl.setDirection('back', undefined, undefined, this.routerAnimation);
4005
+ this.routerOutlet.pop();
4006
+ ev.preventDefault();
4007
+ }
4008
+ else if (defaultHref != null) {
4009
+ this.navCtrl.navigateBack(defaultHref, { animation: this.routerAnimation });
4010
+ ev.preventDefault();
4011
+ }
4012
+ }
4013
+ }
4014
+ /** @nocollapse */ IonBackButtonDelegateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonBackButtonDelegateDirective, deps: [{ token: IonRouterOutlet, optional: true }, { token: NavController }, { token: Config }], target: i0.ɵɵFactoryTarget.Directive });
4015
+ /** @nocollapse */ IonBackButtonDelegateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: IonBackButtonDelegateDirective, selector: "ion-back-button", inputs: { defaultHref: "defaultHref", routerAnimation: "routerAnimation" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 });
4016
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonBackButtonDelegateDirective, decorators: [{
4017
+ type: Directive,
4018
+ args: [{
4019
+ selector: 'ion-back-button',
4020
+ }]
4021
+ }], ctorParameters: function () { return [{ type: IonRouterOutlet, decorators: [{
4022
+ type: Optional
4023
+ }] }, { type: NavController }, { type: Config }]; }, propDecorators: { defaultHref: [{
4024
+ type: Input
4025
+ }], routerAnimation: [{
4026
+ type: Input
4027
+ }], onClick: [{
4028
+ type: HostListener,
4029
+ args: ['click', ['$event']]
4030
+ }] } });
4031
+
4032
+ let NavDelegate = class NavDelegate {
4033
+ constructor(ref, environmentInjector, injector, angularDelegate) {
4034
+ this.el = ref.nativeElement;
4035
+ ref.nativeElement.delegate = angularDelegate.create(environmentInjector, injector);
4036
+ proxyOutputs(this, this.el, ['ionNavDidChange', 'ionNavWillChange']);
4037
+ }
4038
+ };
4039
+ /** @nocollapse */ NavDelegate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: NavDelegate, deps: [{ token: i0.ElementRef }, { token: i0.EnvironmentInjector }, { token: i0.Injector }, { token: AngularDelegate }], target: i0.ɵɵFactoryTarget.Directive });
4040
+ /** @nocollapse */ NavDelegate.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: NavDelegate, selector: "ion-nav", ngImport: i0 });
4041
+ NavDelegate = __decorate([
4042
+ ProxyCmp({
4043
+ inputs: ['animated', 'animation', 'root', 'rootParams', 'swipeGesture'],
4044
+ methods: [
4045
+ 'push',
4046
+ 'insert',
4047
+ 'insertPages',
4048
+ 'pop',
4049
+ 'popTo',
4050
+ 'popToRoot',
4051
+ 'removeIndex',
4052
+ 'setRoot',
4053
+ 'setPages',
4054
+ 'getActive',
4055
+ 'getByIndex',
4056
+ 'canGoBack',
4057
+ 'getPrevious',
4058
+ ],
4059
+ })
4060
+ ], NavDelegate);
4061
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: NavDelegate, decorators: [{
4062
+ type: Directive,
4063
+ args: [{
4064
+ selector: 'ion-nav',
4065
+ }]
4066
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.EnvironmentInjector }, { type: i0.Injector }, { type: AngularDelegate }]; } });
4067
+
4068
+ /**
4069
+ * Adds support for Ionic routing directions and animations to the base Angular router link directive.
4070
+ *
4071
+ * When the router link is clicked, the directive will assign the direction and
4072
+ * animation so that the routing integration will transition correctly.
4073
+ */
4074
+ class RouterLinkDelegateDirective {
4075
+ constructor(locationStrategy, navCtrl, elementRef, router, routerLink) {
4076
+ this.locationStrategy = locationStrategy;
4077
+ this.navCtrl = navCtrl;
4078
+ this.elementRef = elementRef;
4079
+ this.router = router;
4080
+ this.routerLink = routerLink;
4081
+ this.routerDirection = 'forward';
4082
+ }
4083
+ ngOnInit() {
4084
+ this.updateTargetUrlAndHref();
4085
+ }
4086
+ ngOnChanges() {
4087
+ this.updateTargetUrlAndHref();
4088
+ }
4089
+ updateTargetUrlAndHref() {
4090
+ if (this.routerLink?.urlTree) {
4091
+ const href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.routerLink.urlTree));
4092
+ this.elementRef.nativeElement.href = href;
4093
+ }
4094
+ }
4095
+ /**
4096
+ * @internal
4097
+ */
4098
+ onClick(ev) {
4099
+ this.navCtrl.setDirection(this.routerDirection, undefined, undefined, this.routerAnimation);
4100
+ /**
4101
+ * This prevents the browser from
4102
+ * performing a page reload when pressing
4103
+ * an Ionic component with routerLink.
4104
+ * The page reload interferes with routing
4105
+ * and causes ion-back-button to disappear
4106
+ * since the local history is wiped on reload.
4107
+ */
4108
+ ev.preventDefault();
4109
+ }
4110
+ }
4111
+ /** @nocollapse */ RouterLinkDelegateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RouterLinkDelegateDirective, deps: [{ token: i1.LocationStrategy }, { token: NavController }, { token: i0.ElementRef }, { token: i3.Router }, { token: i3.RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
4112
+ /** @nocollapse */ RouterLinkDelegateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: RouterLinkDelegateDirective, selector: ":not(a):not(area)[routerLink]", inputs: { routerDirection: "routerDirection", routerAnimation: "routerAnimation" }, host: { listeners: { "click": "onClick($event)" } }, usesOnChanges: true, ngImport: i0 });
4113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RouterLinkDelegateDirective, decorators: [{
4114
+ type: Directive,
4115
+ args: [{
4116
+ selector: ':not(a):not(area)[routerLink]',
4117
+ }]
4118
+ }], ctorParameters: function () { return [{ type: i1.LocationStrategy }, { type: NavController }, { type: i0.ElementRef }, { type: i3.Router }, { type: i3.RouterLink, decorators: [{
4119
+ type: Optional
4120
+ }] }]; }, propDecorators: { routerDirection: [{
4121
+ type: Input
4122
+ }], routerAnimation: [{
4123
+ type: Input
4124
+ }], onClick: [{
4125
+ type: HostListener,
4126
+ args: ['click', ['$event']]
4127
+ }] } });
4128
+ class RouterLinkWithHrefDelegateDirective {
4129
+ constructor(locationStrategy, navCtrl, elementRef, router, routerLink) {
4130
+ this.locationStrategy = locationStrategy;
4131
+ this.navCtrl = navCtrl;
4132
+ this.elementRef = elementRef;
4133
+ this.router = router;
4134
+ this.routerLink = routerLink;
4135
+ this.routerDirection = 'forward';
4136
+ }
4137
+ ngOnInit() {
4138
+ this.updateTargetUrlAndHref();
4139
+ }
4140
+ ngOnChanges() {
4141
+ this.updateTargetUrlAndHref();
4142
+ }
4143
+ updateTargetUrlAndHref() {
4144
+ if (this.routerLink?.urlTree) {
4145
+ const href = this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.routerLink.urlTree));
4146
+ this.elementRef.nativeElement.href = href;
4147
+ }
4148
+ }
4149
+ /**
4150
+ * @internal
4151
+ */
4152
+ onClick() {
4153
+ this.navCtrl.setDirection(this.routerDirection, undefined, undefined, this.routerAnimation);
4154
+ }
4155
+ }
4156
+ /** @nocollapse */ RouterLinkWithHrefDelegateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RouterLinkWithHrefDelegateDirective, deps: [{ token: i1.LocationStrategy }, { token: NavController }, { token: i0.ElementRef }, { token: i3.Router }, { token: i3.RouterLink, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
4157
+ /** @nocollapse */ RouterLinkWithHrefDelegateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: RouterLinkWithHrefDelegateDirective, selector: "a[routerLink],area[routerLink]", inputs: { routerDirection: "routerDirection", routerAnimation: "routerAnimation" }, host: { listeners: { "click": "onClick()" } }, usesOnChanges: true, ngImport: i0 });
4158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: RouterLinkWithHrefDelegateDirective, decorators: [{
4159
+ type: Directive,
4160
+ args: [{
4161
+ selector: 'a[routerLink],area[routerLink]',
4162
+ }]
4163
+ }], ctorParameters: function () { return [{ type: i1.LocationStrategy }, { type: NavController }, { type: i0.ElementRef }, { type: i3.Router }, { type: i3.RouterLink, decorators: [{
4164
+ type: Optional
4165
+ }] }]; }, propDecorators: { routerDirection: [{
4166
+ type: Input
4167
+ }], routerAnimation: [{
4168
+ type: Input
4169
+ }], onClick: [{
4170
+ type: HostListener,
4171
+ args: ['click']
4172
+ }] } });
4173
+
4174
+ let IonModal = class IonModal {
4175
+ constructor(c, r, z) {
4176
+ this.z = z;
4177
+ this.isCmpOpen = false;
4178
+ this.el = r.nativeElement;
4179
+ this.el.addEventListener('ionMount', () => {
4180
+ this.isCmpOpen = true;
4181
+ c.detectChanges();
4182
+ });
4183
+ this.el.addEventListener('didDismiss', () => {
4184
+ this.isCmpOpen = false;
4185
+ c.detectChanges();
4186
+ });
4187
+ proxyOutputs(this, this.el, [
4188
+ 'ionModalDidPresent',
4189
+ 'ionModalWillPresent',
4190
+ 'ionModalWillDismiss',
4191
+ 'ionModalDidDismiss',
4192
+ 'ionBreakpointDidChange',
4193
+ 'didPresent',
4194
+ 'willPresent',
4195
+ 'willDismiss',
4196
+ 'didDismiss',
4197
+ ]);
4198
+ }
4199
+ };
4200
+ /** @nocollapse */ IonModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonModal, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
4201
+ /** @nocollapse */ IonModal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IonModal, selector: "ion-modal", inputs: { animated: "animated", keepContentsMounted: "keepContentsMounted", backdropBreakpoint: "backdropBreakpoint", backdropDismiss: "backdropDismiss", breakpoints: "breakpoints", canDismiss: "canDismiss", cssClass: "cssClass", enterAnimation: "enterAnimation", event: "event", handle: "handle", handleBehavior: "handleBehavior", initialBreakpoint: "initialBreakpoint", isOpen: "isOpen", keyboardClose: "keyboardClose", leaveAnimation: "leaveAnimation", mode: "mode", presentingElement: "presentingElement", showBackdrop: "showBackdrop", translucent: "translucent", trigger: "trigger" }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: `<div class="ion-delegate-host ion-page" *ngIf="isCmpOpen || keepContentsMounted">
4202
+ <ng-container [ngTemplateOutlet]="template"></ng-container>
4203
+ </div>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4204
+ IonModal = __decorate([
4205
+ ProxyCmp({
4206
+ inputs: [
4207
+ 'animated',
4208
+ 'keepContentsMounted',
4209
+ 'backdropBreakpoint',
4210
+ 'backdropDismiss',
4211
+ 'breakpoints',
4212
+ 'canDismiss',
4213
+ 'cssClass',
4214
+ 'enterAnimation',
4215
+ 'event',
4216
+ 'handle',
4217
+ 'handleBehavior',
4218
+ 'initialBreakpoint',
4219
+ 'isOpen',
4220
+ 'keyboardClose',
4221
+ 'leaveAnimation',
4222
+ 'mode',
4223
+ 'presentingElement',
4224
+ 'showBackdrop',
4225
+ 'translucent',
4226
+ 'trigger',
4227
+ ],
4228
+ methods: ['present', 'dismiss', 'onDidDismiss', 'onWillDismiss', 'setCurrentBreakpoint', 'getCurrentBreakpoint'],
4229
+ })
4230
+ ], IonModal);
4231
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonModal, decorators: [{
4232
+ type: Component,
4233
+ args: [{
4234
+ selector: 'ion-modal',
4235
+ changeDetection: ChangeDetectionStrategy.OnPush,
4236
+ template: `<div class="ion-delegate-host ion-page" *ngIf="isCmpOpen || keepContentsMounted">
4237
+ <ng-container [ngTemplateOutlet]="template"></ng-container>
4238
+ </div>`,
4239
+ inputs: [
4240
+ 'animated',
4241
+ 'keepContentsMounted',
4242
+ 'backdropBreakpoint',
4243
+ 'backdropDismiss',
4244
+ 'breakpoints',
4245
+ 'canDismiss',
4246
+ 'cssClass',
4247
+ 'enterAnimation',
4248
+ 'event',
4249
+ 'handle',
4250
+ 'handleBehavior',
4251
+ 'initialBreakpoint',
4252
+ 'isOpen',
4253
+ 'keyboardClose',
4254
+ 'leaveAnimation',
4255
+ 'mode',
4256
+ 'presentingElement',
4257
+ 'showBackdrop',
4258
+ 'translucent',
4259
+ 'trigger',
4260
+ ],
4261
+ }]
4262
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { template: [{
4263
+ type: ContentChild,
4264
+ args: [TemplateRef, { static: false }]
4265
+ }] } });
4266
+
4267
+ let IonPopover = class IonPopover {
4268
+ constructor(c, r, z) {
4269
+ this.z = z;
4270
+ this.isCmpOpen = false;
4271
+ this.el = r.nativeElement;
4272
+ this.el.addEventListener('ionMount', () => {
4273
+ this.isCmpOpen = true;
4274
+ c.detectChanges();
4275
+ });
4276
+ this.el.addEventListener('didDismiss', () => {
4277
+ this.isCmpOpen = false;
4278
+ c.detectChanges();
4279
+ });
4280
+ proxyOutputs(this, this.el, [
4281
+ 'ionPopoverDidPresent',
4282
+ 'ionPopoverWillPresent',
4283
+ 'ionPopoverWillDismiss',
4284
+ 'ionPopoverDidDismiss',
4285
+ 'didPresent',
4286
+ 'willPresent',
4287
+ 'willDismiss',
4288
+ 'didDismiss',
4289
+ ]);
4290
+ }
4291
+ };
4292
+ /** @nocollapse */ IonPopover.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonPopover, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
4293
+ /** @nocollapse */ IonPopover.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: IonPopover, selector: "ion-popover", inputs: { alignment: "alignment", animated: "animated", arrow: "arrow", keepContentsMounted: "keepContentsMounted", backdropDismiss: "backdropDismiss", cssClass: "cssClass", dismissOnSelect: "dismissOnSelect", enterAnimation: "enterAnimation", event: "event", isOpen: "isOpen", keyboardClose: "keyboardClose", leaveAnimation: "leaveAnimation", mode: "mode", showBackdrop: "showBackdrop", translucent: "translucent", trigger: "trigger", triggerAction: "triggerAction", reference: "reference", size: "size", side: "side" }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: `<ng-container [ngTemplateOutlet]="template" *ngIf="isCmpOpen || keepContentsMounted"></ng-container>`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4294
+ IonPopover = __decorate([
4295
+ ProxyCmp({
4296
+ inputs: [
4297
+ 'alignment',
4298
+ 'animated',
4299
+ 'arrow',
4300
+ 'keepContentsMounted',
4301
+ 'backdropDismiss',
4302
+ 'cssClass',
4303
+ 'dismissOnSelect',
4304
+ 'enterAnimation',
4305
+ 'event',
4306
+ 'isOpen',
4307
+ 'keyboardClose',
4308
+ 'leaveAnimation',
4309
+ 'mode',
4310
+ 'showBackdrop',
4311
+ 'translucent',
4312
+ 'trigger',
4313
+ 'triggerAction',
4314
+ 'reference',
4315
+ 'size',
4316
+ 'side',
4317
+ ],
4318
+ methods: ['present', 'dismiss', 'onDidDismiss', 'onWillDismiss'],
4319
+ })
4320
+ ], IonPopover);
4321
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonPopover, decorators: [{
4322
+ type: Component,
4323
+ args: [{
4324
+ selector: 'ion-popover',
4325
+ changeDetection: ChangeDetectionStrategy.OnPush,
4326
+ template: `<ng-container [ngTemplateOutlet]="template" *ngIf="isCmpOpen || keepContentsMounted"></ng-container>`,
4327
+ inputs: [
4328
+ 'alignment',
4329
+ 'animated',
4330
+ 'arrow',
4331
+ 'keepContentsMounted',
4332
+ 'backdropDismiss',
4333
+ 'cssClass',
4334
+ 'dismissOnSelect',
4335
+ 'enterAnimation',
4336
+ 'event',
4337
+ 'isOpen',
4338
+ 'keyboardClose',
4339
+ 'leaveAnimation',
4340
+ 'mode',
4341
+ 'showBackdrop',
4342
+ 'translucent',
4343
+ 'trigger',
4344
+ 'triggerAction',
4345
+ 'reference',
4346
+ 'size',
4347
+ 'side',
4348
+ ],
4349
+ }]
4350
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }]; }, propDecorators: { template: [{
4351
+ type: ContentChild,
4352
+ args: [TemplateRef, { static: false }]
4353
+ }] } });
4354
+
4355
+ /**
4356
+ * @description
4357
+ * Provider which adds `MaxValidator` to the `NG_VALIDATORS` multi-provider list.
4358
+ */
4359
+ const ION_MAX_VALIDATOR = {
2282
4360
  provide: NG_VALIDATORS,
2283
4361
  useExisting: forwardRef(() => IonMaxValidator),
2284
4362
  multi: true,
@@ -2322,6 +4400,397 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
2322
4400
  }]
2323
4401
  }] });
2324
4402
 
4403
+ // TODO(FW-2827): types
4404
+ class OverlayBaseController {
4405
+ constructor(ctrl) {
4406
+ this.ctrl = ctrl;
4407
+ }
4408
+ /**
4409
+ * Creates a new overlay
4410
+ */
4411
+ create(opts) {
4412
+ return this.ctrl.create((opts || {}));
4413
+ }
4414
+ /**
4415
+ * When `id` is not provided, it dismisses the top overlay.
4416
+ */
4417
+ dismiss(data, role, id) {
4418
+ return this.ctrl.dismiss(data, role, id);
4419
+ }
4420
+ /**
4421
+ * Returns the top overlay.
4422
+ */
4423
+ getTop() {
4424
+ return this.ctrl.getTop();
4425
+ }
4426
+ }
4427
+
4428
+ class ActionSheetController extends OverlayBaseController {
4429
+ constructor() {
4430
+ super(actionSheetController);
4431
+ }
4432
+ }
4433
+ /** @nocollapse */ ActionSheetController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ActionSheetController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4434
+ /** @nocollapse */ ActionSheetController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ActionSheetController, providedIn: 'root' });
4435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ActionSheetController, decorators: [{
4436
+ type: Injectable,
4437
+ args: [{
4438
+ providedIn: 'root',
4439
+ }]
4440
+ }], ctorParameters: function () { return []; } });
4441
+
4442
+ class AlertController extends OverlayBaseController {
4443
+ constructor() {
4444
+ super(alertController);
4445
+ }
4446
+ }
4447
+ /** @nocollapse */ AlertController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AlertController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4448
+ /** @nocollapse */ AlertController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AlertController, providedIn: 'root' });
4449
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AlertController, decorators: [{
4450
+ type: Injectable,
4451
+ args: [{
4452
+ providedIn: 'root',
4453
+ }]
4454
+ }], ctorParameters: function () { return []; } });
4455
+
4456
+ class LoadingController extends OverlayBaseController {
4457
+ constructor() {
4458
+ super(loadingController);
4459
+ }
4460
+ }
4461
+ /** @nocollapse */ LoadingController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LoadingController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4462
+ /** @nocollapse */ LoadingController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LoadingController, providedIn: 'root' });
4463
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LoadingController, decorators: [{
4464
+ type: Injectable,
4465
+ args: [{
4466
+ providedIn: 'root',
4467
+ }]
4468
+ }], ctorParameters: function () { return []; } });
4469
+
4470
+ class MenuController {
4471
+ /**
4472
+ * Programmatically open the Menu.
4473
+ * @param [menuId] Optionally get the menu by its id, or side.
4474
+ * @return returns a promise when the menu is fully opened
4475
+ */
4476
+ open(menuId) {
4477
+ return menuController.open(menuId);
4478
+ }
4479
+ /**
4480
+ * Programmatically close the Menu. If no `menuId` is given as the first
4481
+ * argument then it'll close any menu which is open. If a `menuId`
4482
+ * is given then it'll close that exact menu.
4483
+ * @param [menuId] Optionally get the menu by its id, or side.
4484
+ * @return returns a promise when the menu is fully closed
4485
+ */
4486
+ close(menuId) {
4487
+ return menuController.close(menuId);
4488
+ }
4489
+ /**
4490
+ * Toggle the menu. If it's closed, it will open, and if opened, it
4491
+ * will close.
4492
+ * @param [menuId] Optionally get the menu by its id, or side.
4493
+ * @return returns a promise when the menu has been toggled
4494
+ */
4495
+ toggle(menuId) {
4496
+ return menuController.toggle(menuId);
4497
+ }
4498
+ /**
4499
+ * Used to enable or disable a menu. For example, there could be multiple
4500
+ * left menus, but only one of them should be able to be opened at the same
4501
+ * time. If there are multiple menus on the same side, then enabling one menu
4502
+ * will also automatically disable all the others that are on the same side.
4503
+ * @param [menuId] Optionally get the menu by its id, or side.
4504
+ * @return Returns the instance of the menu, which is useful for chaining.
4505
+ */
4506
+ enable(shouldEnable, menuId) {
4507
+ return menuController.enable(shouldEnable, menuId);
4508
+ }
4509
+ /**
4510
+ * Used to enable or disable the ability to swipe open the menu.
4511
+ * @param shouldEnable True if it should be swipe-able, false if not.
4512
+ * @param [menuId] Optionally get the menu by its id, or side.
4513
+ * @return Returns the instance of the menu, which is useful for chaining.
4514
+ */
4515
+ swipeGesture(shouldEnable, menuId) {
4516
+ return menuController.swipeGesture(shouldEnable, menuId);
4517
+ }
4518
+ /**
4519
+ * @param [menuId] Optionally get the menu by its id, or side.
4520
+ * @return Returns true if the specified menu is currently open, otherwise false.
4521
+ * If the menuId is not specified, it returns true if ANY menu is currenly open.
4522
+ */
4523
+ isOpen(menuId) {
4524
+ return menuController.isOpen(menuId);
4525
+ }
4526
+ /**
4527
+ * @param [menuId] Optionally get the menu by its id, or side.
4528
+ * @return Returns true if the menu is currently enabled, otherwise false.
4529
+ */
4530
+ isEnabled(menuId) {
4531
+ return menuController.isEnabled(menuId);
4532
+ }
4533
+ /**
4534
+ * Used to get a menu instance. If a `menuId` is not provided then it'll
4535
+ * return the first menu found. If a `menuId` is `left` or `right`, then
4536
+ * it'll return the enabled menu on that side. Otherwise, if a `menuId` is
4537
+ * provided, then it'll try to find the menu using the menu's `id`
4538
+ * property. If a menu is not found then it'll return `null`.
4539
+ * @param [menuId] Optionally get the menu by its id, or side.
4540
+ * @return Returns the instance of the menu if found, otherwise `null`.
4541
+ */
4542
+ get(menuId) {
4543
+ return menuController.get(menuId);
4544
+ }
4545
+ /**
4546
+ * @return Returns the instance of the menu already opened, otherwise `null`.
4547
+ */
4548
+ getOpen() {
4549
+ return menuController.getOpen();
4550
+ }
4551
+ /**
4552
+ * @return Returns an array of all menu instances.
4553
+ */
4554
+ getMenus() {
4555
+ return menuController.getMenus();
4556
+ }
4557
+ }
4558
+ /** @nocollapse */ MenuController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MenuController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4559
+ /** @nocollapse */ MenuController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MenuController, providedIn: 'root' });
4560
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: MenuController, decorators: [{
4561
+ type: Injectable,
4562
+ args: [{
4563
+ providedIn: 'root',
4564
+ }]
4565
+ }] });
4566
+
4567
+ class PickerController extends OverlayBaseController {
4568
+ constructor() {
4569
+ super(pickerController);
4570
+ }
4571
+ }
4572
+ /** @nocollapse */ PickerController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: PickerController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4573
+ /** @nocollapse */ PickerController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: PickerController, providedIn: 'root' });
4574
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: PickerController, decorators: [{
4575
+ type: Injectable,
4576
+ args: [{
4577
+ providedIn: 'root',
4578
+ }]
4579
+ }], ctorParameters: function () { return []; } });
4580
+
4581
+ class ModalController extends OverlayBaseController {
4582
+ constructor() {
4583
+ super(modalController);
4584
+ this.angularDelegate = inject(AngularDelegate);
4585
+ this.injector = inject(Injector);
4586
+ this.environmentInjector = inject(EnvironmentInjector);
4587
+ }
4588
+ create(opts) {
4589
+ return super.create({
4590
+ ...opts,
4591
+ delegate: this.angularDelegate.create(this.environmentInjector, this.injector, 'modal'),
4592
+ });
4593
+ }
4594
+ }
4595
+ /** @nocollapse */ ModalController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ModalController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4596
+ /** @nocollapse */ ModalController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ModalController });
4597
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ModalController, decorators: [{
4598
+ type: Injectable
4599
+ }], ctorParameters: function () { return []; } });
4600
+
4601
+ class PopoverController extends OverlayBaseController {
4602
+ constructor() {
4603
+ super(popoverController);
4604
+ this.angularDelegate = inject(AngularDelegate);
4605
+ this.injector = inject(Injector);
4606
+ this.environmentInjector = inject(EnvironmentInjector);
4607
+ }
4608
+ create(opts) {
4609
+ return super.create({
4610
+ ...opts,
4611
+ delegate: this.angularDelegate.create(this.environmentInjector, this.injector, 'popover'),
4612
+ });
4613
+ }
4614
+ }
4615
+ /** @nocollapse */ PopoverController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: PopoverController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4616
+ /** @nocollapse */ PopoverController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: PopoverController });
4617
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: PopoverController, decorators: [{
4618
+ type: Injectable
4619
+ }], ctorParameters: function () { return []; } });
4620
+
4621
+ class ToastController extends OverlayBaseController {
4622
+ constructor() {
4623
+ super(toastController);
4624
+ }
4625
+ }
4626
+ /** @nocollapse */ ToastController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ToastController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4627
+ /** @nocollapse */ ToastController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ToastController, providedIn: 'root' });
4628
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ToastController, decorators: [{
4629
+ type: Injectable,
4630
+ args: [{
4631
+ providedIn: 'root',
4632
+ }]
4633
+ }], ctorParameters: function () { return []; } });
4634
+
4635
+ class DomController {
4636
+ /**
4637
+ * Schedules a task to run during the READ phase of the next frame.
4638
+ * This task should only read the DOM, but never modify it.
4639
+ */
4640
+ read(cb) {
4641
+ getQueue().read(cb);
4642
+ }
4643
+ /**
4644
+ * Schedules a task to run during the WRITE phase of the next frame.
4645
+ * This task should write the DOM, but never READ it.
4646
+ */
4647
+ write(cb) {
4648
+ getQueue().write(cb);
4649
+ }
4650
+ }
4651
+ /** @nocollapse */ DomController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DomController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4652
+ /** @nocollapse */ DomController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DomController, providedIn: 'root' });
4653
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DomController, decorators: [{
4654
+ type: Injectable,
4655
+ args: [{
4656
+ providedIn: 'root',
4657
+ }]
4658
+ }] });
4659
+ const getQueue = () => {
4660
+ const win = typeof window !== 'undefined' ? window : null;
4661
+ if (win != null) {
4662
+ const Ionic = win.Ionic;
4663
+ if (Ionic?.queue) {
4664
+ return Ionic.queue;
4665
+ }
4666
+ return {
4667
+ read: (cb) => win.requestAnimationFrame(cb),
4668
+ write: (cb) => win.requestAnimationFrame(cb),
4669
+ };
4670
+ }
4671
+ return {
4672
+ read: (cb) => cb(),
4673
+ write: (cb) => cb(),
4674
+ };
4675
+ };
4676
+
4677
+ class AnimationController {
4678
+ /**
4679
+ * Create a new animation
4680
+ */
4681
+ create(animationId) {
4682
+ return createAnimation(animationId);
4683
+ }
4684
+ /**
4685
+ * EXPERIMENTAL
4686
+ *
4687
+ * Given a progression and a cubic bezier function,
4688
+ * this utility returns the time value(s) at which the
4689
+ * cubic bezier reaches the given time progression.
4690
+ *
4691
+ * If the cubic bezier never reaches the progression
4692
+ * the result will be an empty array.
4693
+ *
4694
+ * This is most useful for switching between easing curves
4695
+ * when doing a gesture animation (i.e. going from linear easing
4696
+ * during a drag, to another easing when `progressEnd` is called)
4697
+ */
4698
+ easingTime(p0, p1, p2, p3, progression) {
4699
+ return getTimeGivenProgression(p0, p1, p2, p3, progression);
4700
+ }
4701
+ }
4702
+ /** @nocollapse */ AnimationController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AnimationController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4703
+ /** @nocollapse */ AnimationController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AnimationController, providedIn: 'root' });
4704
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AnimationController, decorators: [{
4705
+ type: Injectable,
4706
+ args: [{
4707
+ providedIn: 'root',
4708
+ }]
4709
+ }] });
4710
+
4711
+ class GestureController {
4712
+ constructor(zone) {
4713
+ this.zone = zone;
4714
+ }
4715
+ /**
4716
+ * Create a new gesture
4717
+ */
4718
+ create(opts, runInsideAngularZone = false) {
4719
+ if (runInsideAngularZone) {
4720
+ Object.getOwnPropertyNames(opts).forEach((key) => {
4721
+ if (typeof opts[key] === 'function') {
4722
+ const fn = opts[key];
4723
+ opts[key] = (...props) => this.zone.run(() => fn(...props));
4724
+ }
4725
+ });
4726
+ }
4727
+ return createGesture(opts);
4728
+ }
4729
+ }
4730
+ /** @nocollapse */ GestureController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: GestureController, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
4731
+ /** @nocollapse */ GestureController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: GestureController, providedIn: 'root' });
4732
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: GestureController, decorators: [{
4733
+ type: Injectable,
4734
+ args: [{
4735
+ providedIn: 'root',
4736
+ }]
4737
+ }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
4738
+
4739
+ /**
4740
+ * Provides a way to customize when activated routes get reused.
4741
+ */
4742
+ class IonicRouteStrategy {
4743
+ /**
4744
+ * Whether the given route should detach for later reuse.
4745
+ */
4746
+ shouldDetach(_route) {
4747
+ return false;
4748
+ }
4749
+ /**
4750
+ * Returns `false`, meaning the route (and its subtree) is never reattached
4751
+ */
4752
+ shouldAttach(_route) {
4753
+ return false;
4754
+ }
4755
+ /**
4756
+ * A no-op; the route is never stored since this strategy never detaches routes for later re-use.
4757
+ */
4758
+ store(_route, _detachedTree) {
4759
+ return;
4760
+ }
4761
+ /**
4762
+ * Returns `null` because this strategy does not store routes for later re-use.
4763
+ */
4764
+ retrieve(_route) {
4765
+ return null;
4766
+ }
4767
+ /**
4768
+ * Determines if a route should be reused.
4769
+ * This strategy returns `true` when the future route config and
4770
+ * current route config are identical and all route parameters are identical.
4771
+ */
4772
+ shouldReuseRoute(future, curr) {
4773
+ if (future.routeConfig !== curr.routeConfig) {
4774
+ return false;
4775
+ }
4776
+ // checking router params
4777
+ const futureParams = future.params;
4778
+ const currentParams = curr.params;
4779
+ const keysA = Object.keys(futureParams);
4780
+ const keysB = Object.keys(currentParams);
4781
+ if (keysA.length !== keysB.length) {
4782
+ return false;
4783
+ }
4784
+ // Test for A's keys different from B.
4785
+ for (const key of keysA) {
4786
+ if (currentParams[key] !== futureParams[key]) {
4787
+ return false;
4788
+ }
4789
+ }
4790
+ return true;
4791
+ }
4792
+ }
4793
+
2325
4794
  /**
2326
4795
  * https://ionicframework.com/docs/api/router-outlet#life-cycle-hooks
2327
4796
  */
@@ -2361,6 +4830,7 @@ const DIRECTIVES = [
2361
4830
  IonAlert,
2362
4831
  IonApp,
2363
4832
  IonAvatar,
4833
+ IonBackButton,
2364
4834
  IonBackdrop,
2365
4835
  IonBadge,
2366
4836
  IonBreadcrumb,
@@ -2402,6 +4872,7 @@ const DIRECTIVES = [
2402
4872
  IonMenu,
2403
4873
  IonMenuButton,
2404
4874
  IonMenuToggle,
4875
+ IonNav,
2405
4876
  IonNavLink,
2406
4877
  IonNote,
2407
4878
  IonPicker,
@@ -2449,8 +4920,8 @@ const DECLARATIONS = [
2449
4920
  // navigation
2450
4921
  IonTabs,
2451
4922
  IonRouterOutlet,
2452
- IonBackButton,
2453
- IonNav,
4923
+ IonBackButtonDelegateDirective,
4924
+ NavDelegate,
2454
4925
  RouterLinkDelegateDirective,
2455
4926
  RouterLinkWithHrefDelegateDirective,
2456
4927
  // validators
@@ -2472,13 +4943,17 @@ class IonicModule {
2472
4943
  multi: true,
2473
4944
  deps: [ConfigToken, DOCUMENT, NgZone],
2474
4945
  },
2475
- provideComponentInputBinding(),
4946
+ {
4947
+ provide: INPUT_BINDER,
4948
+ useFactory: componentInputBindingFactory,
4949
+ deps: [Router],
4950
+ },
2476
4951
  ],
2477
4952
  };
2478
4953
  }
2479
4954
  }
2480
4955
  /** @nocollapse */ IonicModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: IonicModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2481
- /** @nocollapse */ IonicModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: IonicModule, declarations: [IonAccordion, IonAccordionGroup, IonActionSheet, IonAlert, IonApp, IonAvatar, IonBackdrop, IonBadge, IonBreadcrumb, IonBreadcrumbs, IonButton, IonButtons, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonCheckbox, IonChip, IonCol, IonContent, IonDatetime, IonDatetimeButton, IonFab, IonFabButton, IonFabList, IonFooter, IonGrid, IonHeader, IonIcon, IonImg, IonInfiniteScroll, IonInfiniteScrollContent, IonInput, IonItem, IonItemDivider, IonItemGroup, IonItemOption, IonItemOptions, IonItemSliding, IonLabel, IonList, IonListHeader, IonLoading, IonMenu, IonMenuButton, IonMenuToggle, IonNavLink, IonNote, IonPicker, IonProgressBar, IonRadio, IonRadioGroup, IonRange, IonRefresher, IonRefresherContent, IonReorder, IonReorderGroup, IonRippleEffect, IonRow, IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption, IonSkeletonText, IonSpinner, IonSplitPane, IonTabBar, IonTabButton, IonText, IonTextarea, IonThumbnail, IonTitle, IonToast, IonToggle, IonToolbar,
4956
+ /** @nocollapse */ IonicModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: IonicModule, declarations: [IonAccordion, IonAccordionGroup, IonActionSheet, IonAlert, IonApp, IonAvatar, IonBackButton, IonBackdrop, IonBadge, IonBreadcrumb, IonBreadcrumbs, IonButton, IonButtons, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonCheckbox, IonChip, IonCol, IonContent, IonDatetime, IonDatetimeButton, IonFab, IonFabButton, IonFabList, IonFooter, IonGrid, IonHeader, IonIcon, IonImg, IonInfiniteScroll, IonInfiniteScrollContent, IonInput, IonItem, IonItemDivider, IonItemGroup, IonItemOption, IonItemOptions, IonItemSliding, IonLabel, IonList, IonListHeader, IonLoading, IonMenu, IonMenuButton, IonMenuToggle, IonNav, IonNavLink, IonNote, IonPicker, IonProgressBar, IonRadio, IonRadioGroup, IonRange, IonRefresher, IonRefresherContent, IonReorder, IonReorderGroup, IonRippleEffect, IonRow, IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption, IonSkeletonText, IonSpinner, IonSplitPane, IonTabBar, IonTabButton, IonText, IonTextarea, IonThumbnail, IonTitle, IonToast, IonToggle, IonToolbar,
2482
4957
  // manual proxies
2483
4958
  IonModal,
2484
4959
  IonPopover,
@@ -2491,13 +4966,13 @@ class IonicModule {
2491
4966
  // navigation
2492
4967
  IonTabs,
2493
4968
  IonRouterOutlet,
2494
- IonBackButton,
2495
- IonNav,
4969
+ IonBackButtonDelegateDirective,
4970
+ NavDelegate,
2496
4971
  RouterLinkDelegateDirective,
2497
4972
  RouterLinkWithHrefDelegateDirective,
2498
4973
  // validators
2499
4974
  IonMinValidator,
2500
- IonMaxValidator], imports: [CommonModule], exports: [IonAccordion, IonAccordionGroup, IonActionSheet, IonAlert, IonApp, IonAvatar, IonBackdrop, IonBadge, IonBreadcrumb, IonBreadcrumbs, IonButton, IonButtons, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonCheckbox, IonChip, IonCol, IonContent, IonDatetime, IonDatetimeButton, IonFab, IonFabButton, IonFabList, IonFooter, IonGrid, IonHeader, IonIcon, IonImg, IonInfiniteScroll, IonInfiniteScrollContent, IonInput, IonItem, IonItemDivider, IonItemGroup, IonItemOption, IonItemOptions, IonItemSliding, IonLabel, IonList, IonListHeader, IonLoading, IonMenu, IonMenuButton, IonMenuToggle, IonNavLink, IonNote, IonPicker, IonProgressBar, IonRadio, IonRadioGroup, IonRange, IonRefresher, IonRefresherContent, IonReorder, IonReorderGroup, IonRippleEffect, IonRow, IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption, IonSkeletonText, IonSpinner, IonSplitPane, IonTabBar, IonTabButton, IonText, IonTextarea, IonThumbnail, IonTitle, IonToast, IonToggle, IonToolbar,
4975
+ IonMaxValidator], imports: [CommonModule], exports: [IonAccordion, IonAccordionGroup, IonActionSheet, IonAlert, IonApp, IonAvatar, IonBackButton, IonBackdrop, IonBadge, IonBreadcrumb, IonBreadcrumbs, IonButton, IonButtons, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonCheckbox, IonChip, IonCol, IonContent, IonDatetime, IonDatetimeButton, IonFab, IonFabButton, IonFabList, IonFooter, IonGrid, IonHeader, IonIcon, IonImg, IonInfiniteScroll, IonInfiniteScrollContent, IonInput, IonItem, IonItemDivider, IonItemGroup, IonItemOption, IonItemOptions, IonItemSliding, IonLabel, IonList, IonListHeader, IonLoading, IonMenu, IonMenuButton, IonMenuToggle, IonNav, IonNavLink, IonNote, IonPicker, IonProgressBar, IonRadio, IonRadioGroup, IonRange, IonRefresher, IonRefresherContent, IonReorder, IonReorderGroup, IonRippleEffect, IonRow, IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption, IonSkeletonText, IonSpinner, IonSplitPane, IonTabBar, IonTabButton, IonText, IonTextarea, IonThumbnail, IonTitle, IonToast, IonToggle, IonToolbar,
2501
4976
  // manual proxies
2502
4977
  IonModal,
2503
4978
  IonPopover,
@@ -2510,8 +4985,8 @@ class IonicModule {
2510
4985
  // navigation
2511
4986
  IonTabs,
2512
4987
  IonRouterOutlet,
2513
- IonBackButton,
2514
- IonNav,
4988
+ IonBackButtonDelegateDirective,
4989
+ NavDelegate,
2515
4990
  RouterLinkDelegateDirective,
2516
4991
  RouterLinkWithHrefDelegateDirective,
2517
4992
  // validators
@@ -2527,6 +5002,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
2527
5002
  imports: [CommonModule],
2528
5003
  }]
2529
5004
  }] });
5005
+ function componentInputBindingFactory(router) {
5006
+ /**
5007
+ * We cast the router to any here, since the componentInputBindingEnabled
5008
+ * property is not available until Angular v16.
5009
+ */
5010
+ if (router?.componentInputBindingEnabled) {
5011
+ return new RoutedComponentInputBinder();
5012
+ }
5013
+ return null;
5014
+ }
2530
5015
 
2531
5016
  // DIRECTIVES
2532
5017
 
@@ -2534,5 +5019,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
2534
5019
  * Generated bundle index. Do not edit.
2535
5020
  */
2536
5021
 
2537
- export { BooleanValueAccessorDirective as BooleanValueAccessor, ION_MAX_VALIDATOR, ION_MIN_VALIDATOR, IonAccordion, IonAccordionGroup, IonActionSheet, IonAlert, IonApp, IonAvatar, IonBackButton, IonBackdrop, IonBadge, IonBreadcrumb, IonBreadcrumbs, IonButton, IonButtons, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonCheckbox, IonChip, IonCol, IonContent, IonDatetime, IonDatetimeButton, IonFab, IonFabButton, IonFabList, IonFooter, IonGrid, IonHeader, IonIcon, IonImg, IonInfiniteScroll, IonInfiniteScrollContent, IonInput, IonItem, IonItemDivider, IonItemGroup, IonItemOption, IonItemOptions, IonItemSliding, IonLabel, IonList, IonListHeader, IonLoading, IonMaxValidator, IonMenu, IonMenuButton, IonMenuToggle, IonMinValidator, IonModal, IonNav, IonNavLink, IonNote, IonPicker, IonPopover, IonProgressBar, IonRadio, IonRadioGroup, IonRange, IonRefresher, IonRefresherContent, IonReorder, IonReorderGroup, IonRippleEffect, IonRouterOutlet, IonRow, IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption, IonSkeletonText, IonSpinner, IonSplitPane, IonTabBar, IonTabButton, IonTabs, IonText, IonTextarea, IonThumbnail, IonTitle, IonToast, IonToggle, IonToolbar, IonicModule, NumericValueAccessorDirective as NumericValueAccessor, RadioValueAccessorDirective as RadioValueAccessor, RouterLinkDelegateDirective as RouterLinkDelegate, RouterLinkWithHrefDelegateDirective as RouterLinkWithHrefDelegate, SelectValueAccessorDirective as SelectValueAccessor, TextValueAccessorDirective as TextValueAccessor };
5022
+ export { ActionSheetController, AlertController, AngularDelegate, AnimationController, BooleanValueAccessorDirective as BooleanValueAccessor, Config, DomController, GestureController, ION_MAX_VALIDATOR, ION_MIN_VALIDATOR, IonAccordion, IonAccordionGroup, IonActionSheet, IonAlert, IonApp, IonAvatar, IonBackButton, IonBackButtonDelegateDirective as IonBackButtonDelegate, IonBackdrop, IonBadge, IonBreadcrumb, IonBreadcrumbs, IonButton, IonButtons, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonCheckbox, IonChip, IonCol, IonContent, IonDatetime, IonDatetimeButton, IonFab, IonFabButton, IonFabList, IonFooter, IonGrid, IonHeader, IonIcon, IonImg, IonInfiniteScroll, IonInfiniteScrollContent, IonInput, IonItem, IonItemDivider, IonItemGroup, IonItemOption, IonItemOptions, IonItemSliding, IonLabel, IonList, IonListHeader, IonLoading, IonMaxValidator, IonMenu, IonMenuButton, IonMenuToggle, IonMinValidator, IonModal, IonNav, IonNavLink, IonNote, IonPicker, IonPopover, IonProgressBar, IonRadio, IonRadioGroup, IonRange, IonRefresher, IonRefresherContent, IonReorder, IonReorderGroup, IonRippleEffect, IonRouterOutlet, IonRow, IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption, IonSkeletonText, IonSpinner, IonSplitPane, IonTabBar, IonTabButton, IonTabs, IonText, IonTextarea, IonThumbnail, IonTitle, IonToast, IonToggle, IonToolbar, IonicModule, IonicRouteStrategy, LoadingController, MenuController, ModalController, NavController, NavDelegate, NavParams, NumericValueAccessorDirective as NumericValueAccessor, PickerController, Platform, PopoverController, RadioValueAccessorDirective as RadioValueAccessor, RouterLinkDelegateDirective as RouterLinkDelegate, RouterLinkWithHrefDelegateDirective as RouterLinkWithHrefDelegate, SelectValueAccessorDirective as SelectValueAccessor, TextValueAccessorDirective as TextValueAccessor, ToastController };
2538
5023
  //# sourceMappingURL=ionic-angular.mjs.map