@ionic/angular 7.5.5-dev.11699655013.1a2cb3ad → 7.5.5-dev.11699885804.1d8011d5

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 (41) hide show
  1. package/common/index.d.ts +4 -0
  2. package/{providers → common/providers}/animation-controller.d.ts +1 -1
  3. package/{standalone → common}/providers/modal-controller.d.ts +1 -1
  4. package/{standalone → common}/providers/toast-controller.d.ts +1 -1
  5. package/esm2020/common/index.mjs +5 -1
  6. package/esm2020/common/providers/animation-controller.mjs +37 -0
  7. package/esm2020/common/providers/gesture-controller.mjs +31 -0
  8. package/esm2020/common/providers/modal-controller.mjs +25 -0
  9. package/esm2020/common/providers/toast-controller.mjs +18 -0
  10. package/esm2020/index.mjs +3 -7
  11. package/esm2020/ionic-module.mjs +2 -3
  12. package/esm2020/standalone/index.mjs +3 -7
  13. package/esm2020/standalone/providers/ionic-angular.mjs +2 -3
  14. package/fesm2015/ionic-angular-common.mjs +287 -194
  15. package/fesm2015/ionic-angular-common.mjs.map +1 -1
  16. package/fesm2015/ionic-angular-standalone.mjs +10 -103
  17. package/fesm2015/ionic-angular-standalone.mjs.map +1 -1
  18. package/fesm2015/ionic-angular.mjs +9 -102
  19. package/fesm2015/ionic-angular.mjs.map +1 -1
  20. package/fesm2020/ionic-angular-common.mjs +292 -196
  21. package/fesm2020/ionic-angular-common.mjs.map +1 -1
  22. package/fesm2020/ionic-angular-standalone.mjs +10 -106
  23. package/fesm2020/ionic-angular-standalone.mjs.map +1 -1
  24. package/fesm2020/ionic-angular.mjs +9 -105
  25. package/fesm2020/ionic-angular.mjs.map +1 -1
  26. package/index.d.ts +2 -6
  27. package/package.json +2 -2
  28. package/standalone/index.d.ts +2 -6
  29. package/esm2020/providers/animation-controller.mjs +0 -37
  30. package/esm2020/providers/gesture-controller.mjs +0 -31
  31. package/esm2020/providers/modal-controller.mjs +0 -24
  32. package/esm2020/providers/toast-controller.mjs +0 -18
  33. package/esm2020/standalone/providers/animation-controller.mjs +0 -37
  34. package/esm2020/standalone/providers/gesture-controller.mjs +0 -31
  35. package/esm2020/standalone/providers/modal-controller.mjs +0 -24
  36. package/esm2020/standalone/providers/toast-controller.mjs +0 -18
  37. package/providers/gesture-controller.d.ts +0 -13
  38. package/providers/modal-controller.d.ts +0 -12
  39. package/providers/toast-controller.d.ts +0 -8
  40. package/standalone/providers/animation-controller.d.ts +0 -25
  41. /package/{standalone → common}/providers/gesture-controller.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Inject, Optional, InjectionToken, inject, NgZone, ApplicationRef, Injector, createComponent, TemplateRef, Directive, ContentChild, EventEmitter, ViewContainerRef, EnvironmentInjector, Attribute, SkipSelf, Input, Output, reflectComponentType, HostListener, ElementRef, ViewChild } from '@angular/core';
3
- import { alertController, loadingController, pickerController, isPlatform, getPlatforms, LIFECYCLE_WILL_ENTER, LIFECYCLE_DID_ENTER, LIFECYCLE_WILL_LEAVE, LIFECYCLE_DID_LEAVE, LIFECYCLE_WILL_UNLOAD, componentOnReady } from '@ionic/core/components';
2
+ import { Injectable, inject, NgZone, ApplicationRef, Injector, createComponent, InjectionToken, EnvironmentInjector, Inject, Optional, TemplateRef, Directive, ContentChild, EventEmitter, ViewContainerRef, Attribute, SkipSelf, Input, Output, reflectComponentType, HostListener, ElementRef, ViewChild } from '@angular/core';
3
+ import { alertController, loadingController, LIFECYCLE_WILL_ENTER, LIFECYCLE_DID_ENTER, LIFECYCLE_WILL_LEAVE, LIFECYCLE_DID_LEAVE, LIFECYCLE_WILL_UNLOAD, modalController, pickerController, toastController, createAnimation, getTimeGivenProgression, createGesture, isPlatform, getPlatforms, componentOnReady } from '@ionic/core/components';
4
4
  import { __awaiter, __decorate } from 'tslib';
5
5
  import * as i3 from '@angular/router';
6
6
  import { NavigationStart, PRIMARY_OUTLET, ChildrenOutletContexts, ActivatedRoute, Router } from '@angular/router';
@@ -155,6 +155,214 @@ class MenuController {
155
155
  }
156
156
  }
157
157
 
158
+ /**
159
+ * @description
160
+ * NavParams are an object that exists on a page and can contain data for that particular view.
161
+ * Similar to how data was pass to a view in V1 with `$stateParams`, NavParams offer a much more flexible
162
+ * option with a simple `get` method.
163
+ *
164
+ * @usage
165
+ * ```ts
166
+ * import { NavParams } from '@ionic/angular';
167
+ *
168
+ * export class MyClass{
169
+ *
170
+ * constructor(navParams: NavParams){
171
+ * // userParams is an object we have in our nav-parameters
172
+ * navParams.get('userParams');
173
+ * }
174
+ *
175
+ * }
176
+ * ```
177
+ */
178
+ class NavParams {
179
+ constructor(data = {}) {
180
+ this.data = data;
181
+ }
182
+ /**
183
+ * Get the value of a nav-parameter for the current view
184
+ *
185
+ * ```ts
186
+ * import { NavParams } from 'ionic-angular';
187
+ *
188
+ * export class MyClass{
189
+ * constructor(public navParams: NavParams){
190
+ * // userParams is an object we have in our nav-parameters
191
+ * this.navParams.get('userParams');
192
+ * }
193
+ * }
194
+ * ```
195
+ *
196
+ * @param param Which param you want to look up
197
+ */
198
+ get(param) {
199
+ return this.data[param];
200
+ }
201
+ }
202
+
203
+ // TODO(FW-2827): types
204
+ class AngularDelegate {
205
+ constructor() {
206
+ this.zone = inject(NgZone);
207
+ this.applicationRef = inject(ApplicationRef);
208
+ }
209
+ create(environmentInjector, injector, elementReferenceKey) {
210
+ return new AngularFrameworkDelegate(environmentInjector, injector, this.applicationRef, this.zone, elementReferenceKey);
211
+ }
212
+ }
213
+ /** @nocollapse */ AngularDelegate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AngularDelegate, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
214
+ /** @nocollapse */ AngularDelegate.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AngularDelegate });
215
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AngularDelegate, decorators: [{
216
+ type: Injectable
217
+ }] });
218
+ class AngularFrameworkDelegate {
219
+ constructor(environmentInjector, injector, applicationRef, zone, elementReferenceKey) {
220
+ this.environmentInjector = environmentInjector;
221
+ this.injector = injector;
222
+ this.applicationRef = applicationRef;
223
+ this.zone = zone;
224
+ this.elementReferenceKey = elementReferenceKey;
225
+ this.elRefMap = new WeakMap();
226
+ this.elEventsMap = new WeakMap();
227
+ }
228
+ attachViewToDom(container, component, params, cssClasses) {
229
+ return this.zone.run(() => {
230
+ return new Promise((resolve) => {
231
+ const componentProps = Object.assign({}, params);
232
+ /**
233
+ * Ionic Angular passes a reference to a modal
234
+ * or popover that can be accessed using a
235
+ * variable in the overlay component. If
236
+ * elementReferenceKey is defined, then we should
237
+ * pass a reference to the component using
238
+ * elementReferenceKey as the key.
239
+ */
240
+ if (this.elementReferenceKey !== undefined) {
241
+ componentProps[this.elementReferenceKey] = container;
242
+ }
243
+ const el = attachView(this.zone, this.environmentInjector, this.injector, this.applicationRef, this.elRefMap, this.elEventsMap, container, component, componentProps, cssClasses, this.elementReferenceKey);
244
+ resolve(el);
245
+ });
246
+ });
247
+ }
248
+ removeViewFromDom(_container, component) {
249
+ return this.zone.run(() => {
250
+ return new Promise((resolve) => {
251
+ const componentRef = this.elRefMap.get(component);
252
+ if (componentRef) {
253
+ componentRef.destroy();
254
+ this.elRefMap.delete(component);
255
+ const unbindEvents = this.elEventsMap.get(component);
256
+ if (unbindEvents) {
257
+ unbindEvents();
258
+ this.elEventsMap.delete(component);
259
+ }
260
+ }
261
+ resolve();
262
+ });
263
+ });
264
+ }
265
+ }
266
+ const attachView = (zone, environmentInjector, injector, applicationRef, elRefMap, elEventsMap, container, component, params, cssClasses, elementReferenceKey) => {
267
+ /**
268
+ * Wraps the injector with a custom injector that
269
+ * provides NavParams to the component.
270
+ *
271
+ * NavParams is a legacy feature from Ionic v3 that allows
272
+ * Angular developers to provide data to a component
273
+ * and access it by providing NavParams as a dependency
274
+ * in the constructor.
275
+ *
276
+ * The modern approach is to access the data directly
277
+ * from the component's class instance.
278
+ */
279
+ const childInjector = Injector.create({
280
+ providers: getProviders(params),
281
+ parent: injector,
282
+ });
283
+ const componentRef = createComponent(component, {
284
+ environmentInjector,
285
+ elementInjector: childInjector,
286
+ });
287
+ const instance = componentRef.instance;
288
+ const hostElement = componentRef.location.nativeElement;
289
+ if (params) {
290
+ /**
291
+ * For modals and popovers, a reference to the component is
292
+ * added to `params` during the call to attachViewToDom. If
293
+ * a reference using this name is already set, this means
294
+ * the app is trying to use the name as a component prop,
295
+ * which will cause collisions.
296
+ */
297
+ if (elementReferenceKey && instance[elementReferenceKey] !== undefined) {
298
+ console.error(`[Ionic Error]: ${elementReferenceKey} is a reserved property when using ${container.tagName.toLowerCase()}. Rename or remove the "${elementReferenceKey}" property from ${component.name}.`);
299
+ }
300
+ Object.assign(instance, params);
301
+ }
302
+ if (cssClasses) {
303
+ for (const cssClass of cssClasses) {
304
+ hostElement.classList.add(cssClass);
305
+ }
306
+ }
307
+ const unbindEvents = bindLifecycleEvents(zone, instance, hostElement);
308
+ container.appendChild(hostElement);
309
+ applicationRef.attachView(componentRef.hostView);
310
+ elRefMap.set(hostElement, componentRef);
311
+ elEventsMap.set(hostElement, unbindEvents);
312
+ return hostElement;
313
+ };
314
+ const LIFECYCLES = [
315
+ LIFECYCLE_WILL_ENTER,
316
+ LIFECYCLE_DID_ENTER,
317
+ LIFECYCLE_WILL_LEAVE,
318
+ LIFECYCLE_DID_LEAVE,
319
+ LIFECYCLE_WILL_UNLOAD,
320
+ ];
321
+ const bindLifecycleEvents = (zone, instance, element) => {
322
+ return zone.run(() => {
323
+ const unregisters = LIFECYCLES.filter((eventName) => typeof instance[eventName] === 'function').map((eventName) => {
324
+ const handler = (ev) => instance[eventName](ev.detail);
325
+ element.addEventListener(eventName, handler);
326
+ return () => element.removeEventListener(eventName, handler);
327
+ });
328
+ return () => unregisters.forEach((fn) => fn());
329
+ });
330
+ };
331
+ const NavParamsToken = new InjectionToken('NavParamsToken');
332
+ const getProviders = (params) => {
333
+ return [
334
+ {
335
+ provide: NavParamsToken,
336
+ useValue: params,
337
+ },
338
+ {
339
+ provide: NavParams,
340
+ useFactory: provideNavParamsInjectable,
341
+ deps: [NavParamsToken],
342
+ },
343
+ ];
344
+ };
345
+ const provideNavParamsInjectable = (params) => {
346
+ return new NavParams(params);
347
+ };
348
+
349
+ class ModalController extends OverlayBaseController {
350
+ constructor() {
351
+ super(modalController);
352
+ this.angularDelegate = inject(AngularDelegate);
353
+ this.injector = inject(Injector);
354
+ this.environmentInjector = inject(EnvironmentInjector);
355
+ }
356
+ create(opts) {
357
+ return super.create(Object.assign(Object.assign({}, opts), { delegate: this.angularDelegate.create(this.environmentInjector, this.injector, 'modal') }));
358
+ }
359
+ }
360
+ /** @nocollapse */ ModalController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ModalController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
361
+ /** @nocollapse */ ModalController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ModalController });
362
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ModalController, decorators: [{
363
+ type: Injectable
364
+ }], ctorParameters: function () { return []; } });
365
+
158
366
  class PickerController extends OverlayBaseController {
159
367
  constructor() {
160
368
  super(pickerController);
@@ -169,6 +377,82 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
169
377
  }]
170
378
  }], ctorParameters: function () { return []; } });
171
379
 
380
+ class ToastController extends OverlayBaseController {
381
+ constructor() {
382
+ super(toastController);
383
+ }
384
+ }
385
+ /** @nocollapse */ ToastController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ToastController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
386
+ /** @nocollapse */ ToastController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ToastController, providedIn: 'root' });
387
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: ToastController, decorators: [{
388
+ type: Injectable,
389
+ args: [{
390
+ providedIn: 'root',
391
+ }]
392
+ }], ctorParameters: function () { return []; } });
393
+
394
+ class AnimationController {
395
+ /**
396
+ * Create a new animation
397
+ */
398
+ create(animationId) {
399
+ return createAnimation(animationId);
400
+ }
401
+ /**
402
+ * EXPERIMENTAL
403
+ *
404
+ * Given a progression and a cubic bezier function,
405
+ * this utility returns the time value(s) at which the
406
+ * cubic bezier reaches the given time progression.
407
+ *
408
+ * If the cubic bezier never reaches the progression
409
+ * the result will be an empty array.
410
+ *
411
+ * This is most useful for switching between easing curves
412
+ * when doing a gesture animation (i.e. going from linear easing
413
+ * during a drag, to another easing when `progressEnd` is called)
414
+ */
415
+ easingTime(p0, p1, p2, p3, progression) {
416
+ return getTimeGivenProgression(p0, p1, p2, p3, progression);
417
+ }
418
+ }
419
+ /** @nocollapse */ AnimationController.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AnimationController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
420
+ /** @nocollapse */ AnimationController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AnimationController, providedIn: 'root' });
421
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AnimationController, decorators: [{
422
+ type: Injectable,
423
+ args: [{
424
+ providedIn: 'root',
425
+ }]
426
+ }] });
427
+
428
+ class GestureController {
429
+ constructor(zone) {
430
+ this.zone = zone;
431
+ }
432
+ /**
433
+ * Create a new gesture
434
+ */
435
+ create(opts, runInsideAngularZone = false) {
436
+ if (runInsideAngularZone) {
437
+ Object.getOwnPropertyNames(opts).forEach((key) => {
438
+ if (typeof opts[key] === 'function') {
439
+ const fn = opts[key];
440
+ opts[key] = (...props) => this.zone.run(() => fn(...props));
441
+ }
442
+ });
443
+ }
444
+ return createGesture(opts);
445
+ }
446
+ }
447
+ /** @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 });
448
+ /** @nocollapse */ GestureController.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: GestureController, providedIn: 'root' });
449
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: GestureController, decorators: [{
450
+ type: Injectable,
451
+ args: [{
452
+ providedIn: 'root',
453
+ }]
454
+ }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
455
+
172
456
  class DomController {
173
457
  /**
174
458
  * Schedules a task to run during the READ phase of the next frame.
@@ -725,197 +1009,6 @@ const getConfig = () => {
725
1009
  return null;
726
1010
  };
727
1011
 
728
- /**
729
- * @description
730
- * NavParams are an object that exists on a page and can contain data for that particular view.
731
- * Similar to how data was pass to a view in V1 with `$stateParams`, NavParams offer a much more flexible
732
- * option with a simple `get` method.
733
- *
734
- * @usage
735
- * ```ts
736
- * import { NavParams } from '@ionic/angular';
737
- *
738
- * export class MyClass{
739
- *
740
- * constructor(navParams: NavParams){
741
- * // userParams is an object we have in our nav-parameters
742
- * navParams.get('userParams');
743
- * }
744
- *
745
- * }
746
- * ```
747
- */
748
- class NavParams {
749
- constructor(data = {}) {
750
- this.data = data;
751
- }
752
- /**
753
- * Get the value of a nav-parameter for the current view
754
- *
755
- * ```ts
756
- * import { NavParams } from 'ionic-angular';
757
- *
758
- * export class MyClass{
759
- * constructor(public navParams: NavParams){
760
- * // userParams is an object we have in our nav-parameters
761
- * this.navParams.get('userParams');
762
- * }
763
- * }
764
- * ```
765
- *
766
- * @param param Which param you want to look up
767
- */
768
- get(param) {
769
- return this.data[param];
770
- }
771
- }
772
-
773
- // TODO(FW-2827): types
774
- class AngularDelegate {
775
- constructor() {
776
- this.zone = inject(NgZone);
777
- this.applicationRef = inject(ApplicationRef);
778
- }
779
- create(environmentInjector, injector, elementReferenceKey) {
780
- return new AngularFrameworkDelegate(environmentInjector, injector, this.applicationRef, this.zone, elementReferenceKey);
781
- }
782
- }
783
- /** @nocollapse */ AngularDelegate.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AngularDelegate, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
784
- /** @nocollapse */ AngularDelegate.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AngularDelegate });
785
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AngularDelegate, decorators: [{
786
- type: Injectable
787
- }] });
788
- class AngularFrameworkDelegate {
789
- constructor(environmentInjector, injector, applicationRef, zone, elementReferenceKey) {
790
- this.environmentInjector = environmentInjector;
791
- this.injector = injector;
792
- this.applicationRef = applicationRef;
793
- this.zone = zone;
794
- this.elementReferenceKey = elementReferenceKey;
795
- this.elRefMap = new WeakMap();
796
- this.elEventsMap = new WeakMap();
797
- }
798
- attachViewToDom(container, component, params, cssClasses) {
799
- return this.zone.run(() => {
800
- return new Promise((resolve) => {
801
- const componentProps = Object.assign({}, params);
802
- /**
803
- * Ionic Angular passes a reference to a modal
804
- * or popover that can be accessed using a
805
- * variable in the overlay component. If
806
- * elementReferenceKey is defined, then we should
807
- * pass a reference to the component using
808
- * elementReferenceKey as the key.
809
- */
810
- if (this.elementReferenceKey !== undefined) {
811
- componentProps[this.elementReferenceKey] = container;
812
- }
813
- const el = attachView(this.zone, this.environmentInjector, this.injector, this.applicationRef, this.elRefMap, this.elEventsMap, container, component, componentProps, cssClasses, this.elementReferenceKey);
814
- resolve(el);
815
- });
816
- });
817
- }
818
- removeViewFromDom(_container, component) {
819
- return this.zone.run(() => {
820
- return new Promise((resolve) => {
821
- const componentRef = this.elRefMap.get(component);
822
- if (componentRef) {
823
- componentRef.destroy();
824
- this.elRefMap.delete(component);
825
- const unbindEvents = this.elEventsMap.get(component);
826
- if (unbindEvents) {
827
- unbindEvents();
828
- this.elEventsMap.delete(component);
829
- }
830
- }
831
- resolve();
832
- });
833
- });
834
- }
835
- }
836
- const attachView = (zone, environmentInjector, injector, applicationRef, elRefMap, elEventsMap, container, component, params, cssClasses, elementReferenceKey) => {
837
- /**
838
- * Wraps the injector with a custom injector that
839
- * provides NavParams to the component.
840
- *
841
- * NavParams is a legacy feature from Ionic v3 that allows
842
- * Angular developers to provide data to a component
843
- * and access it by providing NavParams as a dependency
844
- * in the constructor.
845
- *
846
- * The modern approach is to access the data directly
847
- * from the component's class instance.
848
- */
849
- const childInjector = Injector.create({
850
- providers: getProviders(params),
851
- parent: injector,
852
- });
853
- const componentRef = createComponent(component, {
854
- environmentInjector,
855
- elementInjector: childInjector,
856
- });
857
- const instance = componentRef.instance;
858
- const hostElement = componentRef.location.nativeElement;
859
- if (params) {
860
- /**
861
- * For modals and popovers, a reference to the component is
862
- * added to `params` during the call to attachViewToDom. If
863
- * a reference using this name is already set, this means
864
- * the app is trying to use the name as a component prop,
865
- * which will cause collisions.
866
- */
867
- if (elementReferenceKey && instance[elementReferenceKey] !== undefined) {
868
- console.error(`[Ionic Error]: ${elementReferenceKey} is a reserved property when using ${container.tagName.toLowerCase()}. Rename or remove the "${elementReferenceKey}" property from ${component.name}.`);
869
- }
870
- Object.assign(instance, params);
871
- }
872
- if (cssClasses) {
873
- for (const cssClass of cssClasses) {
874
- hostElement.classList.add(cssClass);
875
- }
876
- }
877
- const unbindEvents = bindLifecycleEvents(zone, instance, hostElement);
878
- container.appendChild(hostElement);
879
- applicationRef.attachView(componentRef.hostView);
880
- elRefMap.set(hostElement, componentRef);
881
- elEventsMap.set(hostElement, unbindEvents);
882
- return hostElement;
883
- };
884
- const LIFECYCLES = [
885
- LIFECYCLE_WILL_ENTER,
886
- LIFECYCLE_DID_ENTER,
887
- LIFECYCLE_WILL_LEAVE,
888
- LIFECYCLE_DID_LEAVE,
889
- LIFECYCLE_WILL_UNLOAD,
890
- ];
891
- const bindLifecycleEvents = (zone, instance, element) => {
892
- return zone.run(() => {
893
- const unregisters = LIFECYCLES.filter((eventName) => typeof instance[eventName] === 'function').map((eventName) => {
894
- const handler = (ev) => instance[eventName](ev.detail);
895
- element.addEventListener(eventName, handler);
896
- return () => element.removeEventListener(eventName, handler);
897
- });
898
- return () => unregisters.forEach((fn) => fn());
899
- });
900
- };
901
- const NavParamsToken = new InjectionToken('NavParamsToken');
902
- const getProviders = (params) => {
903
- return [
904
- {
905
- provide: NavParamsToken,
906
- useValue: params,
907
- },
908
- {
909
- provide: NavParams,
910
- useFactory: provideNavParamsInjectable,
911
- deps: [NavParamsToken],
912
- },
913
- ];
914
- };
915
- const provideNavParamsInjectable = (params) => {
916
- return new NavParams(params);
917
- };
918
-
919
1012
  // TODO: Is there a way we can grab this from angular-component-lib instead?
920
1013
  const proxyInputs = (Cmp, inputs) => {
921
1014
  const Prototype = Cmp.prototype;
@@ -2495,5 +2588,5 @@ class IonicRouteStrategy {
2495
2588
  * Generated bundle index. Do not edit.
2496
2589
  */
2497
2590
 
2498
- export { AlertController, AngularDelegate, Config, ConfigToken, DomController, IonBackButton, IonModal, IonNav, IonPopover, IonRouterOutlet, IonTabs, IonicRouteStrategy, LoadingController, MenuController, NavController, NavParams, OverlayBaseController, PickerController, Platform, ProxyCmp, RouterLinkDelegateDirective, RouterLinkWithHrefDelegateDirective, ValueAccessor, bindLifecycleEvents, provideComponentInputBinding, raf, setIonicClasses };
2591
+ export { AlertController, AngularDelegate, AnimationController, Config, ConfigToken, DomController, GestureController, IonBackButton, IonModal, IonNav, IonPopover, IonRouterOutlet, IonTabs, IonicRouteStrategy, LoadingController, MenuController, ModalController, NavController, NavParams, OverlayBaseController, PickerController, Platform, ProxyCmp, RouterLinkDelegateDirective, RouterLinkWithHrefDelegateDirective, ToastController, ValueAccessor, bindLifecycleEvents, provideComponentInputBinding, raf, setIonicClasses };
2499
2592
  //# sourceMappingURL=ionic-angular-common.mjs.map