@ionic/angular 8.8.19-dev.11786735826.1fad7c0a → 8.8.19-dev.11786832241.150538c7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/common/directives/control-value-accessors/index.d.ts +1 -0
- package/dist/common/directives/control-value-accessors/index.js +2 -0
- package/dist/common/directives/control-value-accessors/index.js.map +1 -0
- package/dist/common/directives/control-value-accessors/value-accessor.d.ts +36 -0
- package/dist/common/directives/control-value-accessors/value-accessor.js +152 -0
- package/dist/common/directives/control-value-accessors/value-accessor.js.map +1 -0
- package/dist/common/directives/navigation/back-button.d.ts +23 -0
- package/dist/common/directives/navigation/back-button.js +61 -0
- package/dist/common/directives/navigation/back-button.js.map +1 -0
- package/dist/common/directives/navigation/nav-params.d.ts +45 -0
- package/dist/common/directives/navigation/nav-params.js +47 -0
- package/dist/common/directives/navigation/nav-params.js.map +1 -0
- package/dist/common/directives/navigation/nav.d.ts +21 -0
- package/dist/common/directives/navigation/nav.js +49 -0
- package/dist/common/directives/navigation/nav.js.map +1 -0
- package/dist/common/directives/navigation/router-link-delegate.d.ts +70 -0
- package/dist/common/directives/navigation/router-link-delegate.js +188 -0
- package/dist/common/directives/navigation/router-link-delegate.js.map +1 -0
- package/dist/common/directives/navigation/router-outlet.d.ts +104 -0
- package/dist/common/directives/navigation/router-outlet.js +476 -0
- package/dist/common/directives/navigation/router-outlet.js.map +1 -0
- package/dist/common/directives/navigation/stack-controller.d.ts +42 -0
- package/dist/common/directives/navigation/stack-controller.js +282 -0
- package/dist/common/directives/navigation/stack-controller.js.map +1 -0
- package/dist/common/directives/navigation/stack-utils.d.ts +38 -0
- package/dist/common/directives/navigation/stack-utils.js +73 -0
- package/dist/common/directives/navigation/stack-utils.js.map +1 -0
- package/dist/common/directives/navigation/tabs.d.ts +91 -0
- package/dist/common/directives/navigation/tabs.js +290 -0
- package/dist/common/directives/navigation/tabs.js.map +1 -0
- package/dist/common/index.d.ts +22 -0
- package/dist/common/index.js +20 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/overlays/modal.d.ts +62 -0
- package/dist/common/overlays/modal.js +96 -0
- package/dist/common/overlays/modal.js.map +1 -0
- package/dist/common/overlays/popover.d.ts +46 -0
- package/dist/common/overlays/popover.js +84 -0
- package/dist/common/overlays/popover.js.map +1 -0
- package/dist/common/providers/angular-delegate.d.ts +28 -0
- package/dist/common/providers/angular-delegate.js +229 -0
- package/dist/common/providers/angular-delegate.js.map +1 -0
- package/dist/common/providers/config.d.ts +11 -0
- package/dist/common/providers/config.js +44 -0
- package/dist/common/providers/config.js.map +1 -0
- package/dist/common/providers/dom-controller.d.ts +16 -0
- package/dist/common/providers/dom-controller.js +44 -0
- package/dist/common/providers/dom-controller.js.map +1 -0
- package/dist/common/providers/menu-controller.d.ts +78 -0
- package/dist/common/providers/menu-controller.js +114 -0
- package/dist/common/providers/menu-controller.js.map +1 -0
- package/dist/common/providers/nav-controller.d.ts +116 -0
- package/dist/common/providers/nav-controller.js +232 -0
- package/dist/common/providers/nav-controller.js.map +1 -0
- package/dist/common/providers/platform.d.ts +174 -0
- package/dist/common/providers/platform.js +256 -0
- package/dist/common/providers/platform.js.map +1 -0
- package/dist/common/types/interfaces.d.ts +8 -0
- package/dist/common/types/interfaces.js +2 -0
- package/dist/common/types/interfaces.js.map +1 -0
- package/dist/common/types/ionic-lifecycle-hooks.d.ts +27 -0
- package/dist/common/types/ionic-lifecycle-hooks.js +5 -0
- package/dist/common/types/ionic-lifecycle-hooks.js.map +1 -0
- package/dist/common/types/overlay-options.d.ts +16 -0
- package/dist/common/types/overlay-options.js +2 -0
- package/dist/common/types/overlay-options.js.map +1 -0
- package/dist/common/utils/overlay.d.ts +21 -0
- package/dist/common/utils/overlay.js +26 -0
- package/dist/common/utils/overlay.js.map +1 -0
- package/dist/common/utils/proxy.d.ts +8 -0
- package/dist/common/utils/proxy.js +47 -0
- package/dist/common/utils/proxy.js.map +1 -0
- package/dist/common/utils/routing.d.ts +28 -0
- package/dist/common/utils/routing.js +55 -0
- package/dist/common/utils/routing.js.map +1 -0
- package/dist/common/utils/util.d.ts +1 -0
- package/dist/common/utils/util.js +10 -0
- package/dist/common/utils/util.js.map +1 -0
- package/dist/lazy/app-initialize.d.ts +3 -0
- package/dist/lazy/app-initialize.js +29 -0
- package/dist/lazy/app-initialize.js.map +1 -0
- package/dist/lazy/directives/angular-component-lib/utils.d.ts +9 -0
- package/dist/lazy/directives/angular-component-lib/utils.js +59 -0
- package/dist/lazy/directives/angular-component-lib/utils.js.map +1 -0
- package/dist/lazy/directives/control-value-accessors/boolean-value-accessor.d.ts +10 -0
- package/dist/lazy/directives/control-value-accessors/boolean-value-accessor.js +47 -0
- package/dist/lazy/directives/control-value-accessors/boolean-value-accessor.js.map +1 -0
- package/dist/lazy/directives/control-value-accessors/index.d.ts +4 -0
- package/dist/lazy/directives/control-value-accessors/index.js +5 -0
- package/dist/lazy/directives/control-value-accessors/index.js.map +1 -0
- package/dist/lazy/directives/control-value-accessors/numeric-value-accessor.d.ts +11 -0
- package/dist/lazy/directives/control-value-accessors/numeric-value-accessor.js +55 -0
- package/dist/lazy/directives/control-value-accessors/numeric-value-accessor.js.map +1 -0
- package/dist/lazy/directives/control-value-accessors/select-value-accessor.d.ts +9 -0
- package/dist/lazy/directives/control-value-accessors/select-value-accessor.js +44 -0
- package/dist/lazy/directives/control-value-accessors/select-value-accessor.js.map +1 -0
- package/dist/lazy/directives/control-value-accessors/text-value-accessor.d.ts +9 -0
- package/dist/lazy/directives/control-value-accessors/text-value-accessor.js +43 -0
- package/dist/lazy/directives/control-value-accessors/text-value-accessor.js.map +1 -0
- package/dist/lazy/directives/navigation/ion-back-button.d.ts +9 -0
- package/dist/lazy/directives/navigation/ion-back-button.js +24 -0
- package/dist/lazy/directives/navigation/ion-back-button.js.map +1 -0
- package/dist/lazy/directives/navigation/ion-nav.d.ts +8 -0
- package/dist/lazy/directives/navigation/ion-nav.js +21 -0
- package/dist/lazy/directives/navigation/ion-nav.js.map +1 -0
- package/dist/lazy/directives/navigation/ion-router-outlet.d.ts +25 -0
- package/dist/lazy/directives/navigation/ion-router-outlet.js +52 -0
- package/dist/lazy/directives/navigation/ion-router-outlet.js.map +1 -0
- package/dist/lazy/directives/navigation/ion-tabs.d.ts +13 -0
- package/dist/lazy/directives/navigation/ion-tabs.js +58 -0
- package/dist/lazy/directives/navigation/ion-tabs.js.map +1 -0
- package/dist/lazy/directives/navigation/router-link-delegate.d.ts +16 -0
- package/dist/lazy/directives/navigation/router-link-delegate.js +32 -0
- package/dist/lazy/directives/navigation/router-link-delegate.js.map +1 -0
- package/dist/lazy/directives/overlays/modal.d.ts +6 -0
- package/dist/lazy/directives/overlays/modal.js +22 -0
- package/dist/lazy/directives/overlays/modal.js.map +1 -0
- package/dist/lazy/directives/overlays/popover.d.ts +6 -0
- package/dist/lazy/directives/overlays/popover.js +18 -0
- package/dist/lazy/directives/overlays/popover.js.map +1 -0
- package/dist/lazy/directives/proxies-list.d.ts +2 -0
- package/dist/lazy/directives/proxies-list.js +89 -0
- package/dist/lazy/directives/proxies-list.js.map +1 -0
- package/{types/ionic-angular-lazy.d.ts → dist/lazy/directives/proxies.d.ts} +339 -503
- package/{fesm2022/ionic-angular-lazy.mjs → dist/lazy/directives/proxies.js} +91 -882
- package/dist/lazy/directives/proxies.js.map +1 -0
- package/dist/lazy/directives/validators/index.d.ts +2 -0
- package/dist/lazy/directives/validators/index.js +3 -0
- package/dist/lazy/directives/validators/index.js.map +1 -0
- package/dist/lazy/directives/validators/max-validator.d.ts +12 -0
- package/dist/lazy/directives/validators/max-validator.js +26 -0
- package/dist/lazy/directives/validators/max-validator.js.map +1 -0
- package/dist/lazy/directives/validators/min-validator.d.ts +12 -0
- package/dist/lazy/directives/validators/min-validator.js +26 -0
- package/dist/lazy/directives/validators/min-validator.js.map +1 -0
- package/dist/lazy/index.d.ts +26 -0
- package/dist/lazy/index.js +34 -0
- package/dist/lazy/index.js.map +1 -0
- package/dist/lazy/ionic-module.d.ts +38 -0
- package/dist/lazy/ionic-module.js +121 -0
- package/dist/lazy/ionic-module.js.map +1 -0
- package/dist/lazy/providers/action-sheet-controller.d.ts +8 -0
- package/dist/lazy/providers/action-sheet-controller.js +18 -0
- package/dist/lazy/providers/action-sheet-controller.js.map +1 -0
- package/dist/lazy/providers/alert-controller.d.ts +8 -0
- package/dist/lazy/providers/alert-controller.js +18 -0
- package/dist/lazy/providers/alert-controller.js.map +1 -0
- package/dist/lazy/providers/animation-controller.d.ts +25 -0
- package/dist/lazy/providers/animation-controller.js +37 -0
- package/dist/lazy/providers/animation-controller.js.map +1 -0
- package/dist/lazy/providers/gesture-controller.d.ts +13 -0
- package/dist/lazy/providers/gesture-controller.js +32 -0
- package/dist/lazy/providers/gesture-controller.js.map +1 -0
- package/dist/lazy/providers/loading-controller.d.ts +8 -0
- package/dist/lazy/providers/loading-controller.js +18 -0
- package/dist/lazy/providers/loading-controller.js.map +1 -0
- package/dist/lazy/providers/menu-controller.d.ts +7 -0
- package/dist/lazy/providers/menu-controller.js +18 -0
- package/dist/lazy/providers/menu-controller.js.map +1 -0
- package/dist/lazy/providers/modal-controller.d.ts +12 -0
- package/dist/lazy/providers/modal-controller.js +25 -0
- package/dist/lazy/providers/modal-controller.js.map +1 -0
- package/dist/lazy/providers/popover-controller.d.ts +9 -0
- package/dist/lazy/providers/popover-controller.js +19 -0
- package/dist/lazy/providers/popover-controller.js.map +1 -0
- package/dist/lazy/providers/toast-controller.d.ts +8 -0
- package/dist/lazy/providers/toast-controller.js +18 -0
- package/dist/lazy/providers/toast-controller.js.map +1 -0
- package/dist/standalone/directives/angular-component-lib/utils.d.ts +9 -0
- package/dist/standalone/directives/angular-component-lib/utils.js +59 -0
- package/dist/standalone/directives/angular-component-lib/utils.js.map +1 -0
- package/dist/standalone/directives/checkbox.d.ts +30 -0
- package/dist/standalone/directives/checkbox.js +75 -0
- package/dist/standalone/directives/checkbox.js.map +1 -0
- package/dist/standalone/directives/datetime.d.ts +30 -0
- package/dist/standalone/directives/datetime.js +93 -0
- package/dist/standalone/directives/datetime.js.map +1 -0
- package/dist/standalone/directives/icon.d.ts +9 -0
- package/dist/standalone/directives/icon.js +35 -0
- package/dist/standalone/directives/icon.js.map +1 -0
- package/dist/standalone/directives/index.d.ts +12 -0
- package/dist/standalone/directives/index.js +13 -0
- package/dist/standalone/directives/index.js.map +1 -0
- package/dist/standalone/directives/input-otp.d.ts +49 -0
- package/dist/standalone/directives/input-otp.js +89 -0
- package/dist/standalone/directives/input-otp.js.map +1 -0
- package/dist/standalone/directives/input.d.ts +47 -0
- package/dist/standalone/directives/input.js +112 -0
- package/dist/standalone/directives/input.js.map +1 -0
- package/dist/standalone/directives/ion-accordion-group.d.ts +21 -0
- package/dist/standalone/directives/ion-accordion-group.js +40 -0
- package/dist/standalone/directives/ion-accordion-group.js.map +1 -0
- package/dist/standalone/directives/ion-accordion.d.ts +12 -0
- package/dist/standalone/directives/ion-accordion.js +36 -0
- package/dist/standalone/directives/ion-accordion.js.map +1 -0
- package/dist/standalone/directives/ion-action-sheet.d.ts +58 -0
- package/dist/standalone/directives/ion-action-sheet.js +62 -0
- package/dist/standalone/directives/ion-action-sheet.js.map +1 -0
- package/dist/standalone/directives/ion-alert.d.ts +58 -0
- package/dist/standalone/directives/ion-alert.js +62 -0
- package/dist/standalone/directives/ion-alert.js.map +1 -0
- package/dist/standalone/directives/ion-app.d.ts +12 -0
- package/dist/standalone/directives/ion-app.js +36 -0
- package/dist/standalone/directives/ion-app.js.map +1 -0
- package/dist/standalone/directives/ion-avatar.d.ts +12 -0
- package/dist/standalone/directives/ion-avatar.js +35 -0
- package/dist/standalone/directives/ion-avatar.js.map +1 -0
- package/dist/standalone/directives/ion-backdrop.d.ts +18 -0
- package/dist/standalone/directives/ion-backdrop.js +40 -0
- package/dist/standalone/directives/ion-backdrop.js.map +1 -0
- package/dist/standalone/directives/ion-badge.d.ts +12 -0
- package/dist/standalone/directives/ion-badge.js +36 -0
- package/dist/standalone/directives/ion-badge.js.map +1 -0
- package/dist/standalone/directives/ion-breadcrumb.d.ts +23 -0
- package/dist/standalone/directives/ion-breadcrumb.js +43 -0
- package/dist/standalone/directives/ion-breadcrumb.js.map +1 -0
- package/dist/standalone/directives/ion-breadcrumbs.d.ts +19 -0
- package/dist/standalone/directives/ion-breadcrumbs.js +40 -0
- package/dist/standalone/directives/ion-breadcrumbs.js.map +1 -0
- package/dist/standalone/directives/ion-button.d.ts +23 -0
- package/dist/standalone/directives/ion-button.js +43 -0
- package/dist/standalone/directives/ion-button.js.map +1 -0
- package/dist/standalone/directives/ion-buttons.d.ts +12 -0
- package/dist/standalone/directives/ion-buttons.js +36 -0
- package/dist/standalone/directives/ion-buttons.js.map +1 -0
- package/dist/standalone/directives/ion-card-content.d.ts +12 -0
- package/dist/standalone/directives/ion-card-content.js +36 -0
- package/dist/standalone/directives/ion-card-content.js.map +1 -0
- package/dist/standalone/directives/ion-card-header.d.ts +12 -0
- package/dist/standalone/directives/ion-card-header.js +36 -0
- package/dist/standalone/directives/ion-card-header.js.map +1 -0
- package/dist/standalone/directives/ion-card-subtitle.d.ts +12 -0
- package/dist/standalone/directives/ion-card-subtitle.js +36 -0
- package/dist/standalone/directives/ion-card-subtitle.js.map +1 -0
- package/dist/standalone/directives/ion-card-title.d.ts +12 -0
- package/dist/standalone/directives/ion-card-title.js +36 -0
- package/dist/standalone/directives/ion-card-title.js.map +1 -0
- package/dist/standalone/directives/ion-card.d.ts +12 -0
- package/dist/standalone/directives/ion-card.js +36 -0
- package/dist/standalone/directives/ion-card.js.map +1 -0
- package/dist/standalone/directives/ion-chip.d.ts +12 -0
- package/dist/standalone/directives/ion-chip.js +36 -0
- package/dist/standalone/directives/ion-chip.js.map +1 -0
- package/dist/standalone/directives/ion-col.d.ts +12 -0
- package/dist/standalone/directives/ion-col.js +36 -0
- package/dist/standalone/directives/ion-col.js.map +1 -0
- package/dist/standalone/directives/ion-content.d.ts +33 -0
- package/dist/standalone/directives/ion-content.js +47 -0
- package/dist/standalone/directives/ion-content.js.map +1 -0
- package/dist/standalone/directives/ion-datetime-button.d.ts +12 -0
- package/dist/standalone/directives/ion-datetime-button.js +36 -0
- package/dist/standalone/directives/ion-datetime-button.js.map +1 -0
- package/dist/standalone/directives/ion-fab-button.d.ts +23 -0
- package/dist/standalone/directives/ion-fab-button.js +43 -0
- package/dist/standalone/directives/ion-fab-button.js.map +1 -0
- package/dist/standalone/directives/ion-fab-list.d.ts +12 -0
- package/dist/standalone/directives/ion-fab-list.js +36 -0
- package/dist/standalone/directives/ion-fab-list.js.map +1 -0
- package/dist/standalone/directives/ion-fab.d.ts +12 -0
- package/dist/standalone/directives/ion-fab.js +37 -0
- package/dist/standalone/directives/ion-fab.js.map +1 -0
- package/dist/standalone/directives/ion-footer.d.ts +12 -0
- package/dist/standalone/directives/ion-footer.js +36 -0
- package/dist/standalone/directives/ion-footer.js.map +1 -0
- package/dist/standalone/directives/ion-grid.d.ts +12 -0
- package/dist/standalone/directives/ion-grid.js +36 -0
- package/dist/standalone/directives/ion-grid.js.map +1 -0
- package/dist/standalone/directives/ion-header.d.ts +12 -0
- package/dist/standalone/directives/ion-header.js +36 -0
- package/dist/standalone/directives/ion-header.js.map +1 -0
- package/dist/standalone/directives/ion-img.d.ts +28 -0
- package/dist/standalone/directives/ion-img.js +46 -0
- package/dist/standalone/directives/ion-img.js.map +1 -0
- package/dist/standalone/directives/ion-infinite-scroll-content.d.ts +12 -0
- package/dist/standalone/directives/ion-infinite-scroll-content.js +36 -0
- package/dist/standalone/directives/ion-infinite-scroll-content.js.map +1 -0
- package/dist/standalone/directives/ion-infinite-scroll.d.ts +21 -0
- package/dist/standalone/directives/ion-infinite-scroll.js +41 -0
- package/dist/standalone/directives/ion-infinite-scroll.js.map +1 -0
- package/dist/standalone/directives/ion-input-password-toggle.d.ts +12 -0
- package/dist/standalone/directives/ion-input-password-toggle.js +36 -0
- package/dist/standalone/directives/ion-input-password-toggle.js.map +1 -0
- package/dist/standalone/directives/ion-item-divider.d.ts +12 -0
- package/dist/standalone/directives/ion-item-divider.js +36 -0
- package/dist/standalone/directives/ion-item-divider.js.map +1 -0
- package/dist/standalone/directives/ion-item-group.d.ts +12 -0
- package/dist/standalone/directives/ion-item-group.js +35 -0
- package/dist/standalone/directives/ion-item-group.js.map +1 -0
- package/dist/standalone/directives/ion-item-option.d.ts +12 -0
- package/dist/standalone/directives/ion-item-option.js +36 -0
- package/dist/standalone/directives/ion-item-option.js.map +1 -0
- package/dist/standalone/directives/ion-item-options.d.ts +18 -0
- package/dist/standalone/directives/ion-item-options.js +40 -0
- package/dist/standalone/directives/ion-item-options.js.map +1 -0
- package/dist/standalone/directives/ion-item-sliding.d.ts +18 -0
- package/dist/standalone/directives/ion-item-sliding.js +41 -0
- package/dist/standalone/directives/ion-item-sliding.js.map +1 -0
- package/dist/standalone/directives/ion-item.d.ts +12 -0
- package/dist/standalone/directives/ion-item.js +36 -0
- package/dist/standalone/directives/ion-item.js.map +1 -0
- package/dist/standalone/directives/ion-label.d.ts +12 -0
- package/dist/standalone/directives/ion-label.js +36 -0
- package/dist/standalone/directives/ion-label.js.map +1 -0
- package/dist/standalone/directives/ion-list-header.d.ts +12 -0
- package/dist/standalone/directives/ion-list-header.js +36 -0
- package/dist/standalone/directives/ion-list-header.js.map +1 -0
- package/dist/standalone/directives/ion-list.d.ts +12 -0
- package/dist/standalone/directives/ion-list.js +37 -0
- package/dist/standalone/directives/ion-list.js.map +1 -0
- package/dist/standalone/directives/ion-loading.d.ts +58 -0
- package/dist/standalone/directives/ion-loading.js +62 -0
- package/dist/standalone/directives/ion-loading.js.map +1 -0
- package/dist/standalone/directives/ion-menu-button.d.ts +12 -0
- package/dist/standalone/directives/ion-menu-button.js +36 -0
- package/dist/standalone/directives/ion-menu-button.js.map +1 -0
- package/dist/standalone/directives/ion-menu-toggle.d.ts +12 -0
- package/dist/standalone/directives/ion-menu-toggle.js +36 -0
- package/dist/standalone/directives/ion-menu-toggle.js.map +1 -0
- package/dist/standalone/directives/ion-menu.d.ts +34 -0
- package/dist/standalone/directives/ion-menu.js +50 -0
- package/dist/standalone/directives/ion-menu.js.map +1 -0
- package/dist/standalone/directives/ion-nav-link.d.ts +12 -0
- package/dist/standalone/directives/ion-nav-link.js +36 -0
- package/dist/standalone/directives/ion-nav-link.js.map +1 -0
- package/dist/standalone/directives/ion-note.d.ts +12 -0
- package/dist/standalone/directives/ion-note.js +36 -0
- package/dist/standalone/directives/ion-note.js.map +1 -0
- package/dist/standalone/directives/ion-picker-column-option.d.ts +12 -0
- package/dist/standalone/directives/ion-picker-column-option.js +36 -0
- package/dist/standalone/directives/ion-picker-column-option.js.map +1 -0
- package/dist/standalone/directives/ion-picker-column.d.ts +21 -0
- package/dist/standalone/directives/ion-picker-column.js +41 -0
- package/dist/standalone/directives/ion-picker-column.js.map +1 -0
- package/dist/standalone/directives/ion-picker.d.ts +12 -0
- package/dist/standalone/directives/ion-picker.js +36 -0
- package/dist/standalone/directives/ion-picker.js.map +1 -0
- package/dist/standalone/directives/ion-progress-bar.d.ts +12 -0
- package/dist/standalone/directives/ion-progress-bar.js +36 -0
- package/dist/standalone/directives/ion-progress-bar.js.map +1 -0
- package/dist/standalone/directives/ion-radio.d.ts +23 -0
- package/dist/standalone/directives/ion-radio.js +43 -0
- package/dist/standalone/directives/ion-radio.js.map +1 -0
- package/dist/standalone/directives/ion-refresher-content.d.ts +12 -0
- package/dist/standalone/directives/ion-refresher-content.js +36 -0
- package/dist/standalone/directives/ion-refresher-content.js.map +1 -0
- package/dist/standalone/directives/ion-refresher.d.ts +45 -0
- package/dist/standalone/directives/ion-refresher.js +53 -0
- package/dist/standalone/directives/ion-refresher.js.map +1 -0
- package/dist/standalone/directives/ion-reorder-group.d.ts +44 -0
- package/dist/standalone/directives/ion-reorder-group.js +50 -0
- package/dist/standalone/directives/ion-reorder-group.js.map +1 -0
- package/dist/standalone/directives/ion-reorder.d.ts +12 -0
- package/dist/standalone/directives/ion-reorder.js +35 -0
- package/dist/standalone/directives/ion-reorder.js.map +1 -0
- package/dist/standalone/directives/ion-ripple-effect.d.ts +12 -0
- package/dist/standalone/directives/ion-ripple-effect.js +37 -0
- package/dist/standalone/directives/ion-ripple-effect.js.map +1 -0
- package/dist/standalone/directives/ion-row.d.ts +12 -0
- package/dist/standalone/directives/ion-row.js +35 -0
- package/dist/standalone/directives/ion-row.js.map +1 -0
- package/dist/standalone/directives/ion-segment-button.d.ts +12 -0
- package/dist/standalone/directives/ion-segment-button.js +36 -0
- package/dist/standalone/directives/ion-segment-button.js.map +1 -0
- package/dist/standalone/directives/ion-segment-content.d.ts +12 -0
- package/dist/standalone/directives/ion-segment-content.js +35 -0
- package/dist/standalone/directives/ion-segment-content.js.map +1 -0
- package/dist/standalone/directives/ion-segment-view.d.ts +19 -0
- package/dist/standalone/directives/ion-segment-view.js +40 -0
- package/dist/standalone/directives/ion-segment-view.js.map +1 -0
- package/dist/standalone/directives/ion-select-modal.d.ts +12 -0
- package/dist/standalone/directives/ion-select-modal.js +36 -0
- package/dist/standalone/directives/ion-select-modal.js.map +1 -0
- package/dist/standalone/directives/ion-select-option.d.ts +12 -0
- package/dist/standalone/directives/ion-select-option.js +36 -0
- package/dist/standalone/directives/ion-select-option.js.map +1 -0
- package/dist/standalone/directives/ion-skeleton-text.d.ts +12 -0
- package/dist/standalone/directives/ion-skeleton-text.js +36 -0
- package/dist/standalone/directives/ion-skeleton-text.js.map +1 -0
- package/dist/standalone/directives/ion-spinner.d.ts +12 -0
- package/dist/standalone/directives/ion-spinner.js +36 -0
- package/dist/standalone/directives/ion-spinner.js.map +1 -0
- package/dist/standalone/directives/ion-split-pane.d.ts +22 -0
- package/dist/standalone/directives/ion-split-pane.js +40 -0
- package/dist/standalone/directives/ion-split-pane.js.map +1 -0
- package/dist/standalone/directives/ion-tab-bar.d.ts +12 -0
- package/dist/standalone/directives/ion-tab-bar.js +36 -0
- package/dist/standalone/directives/ion-tab-bar.js.map +1 -0
- package/dist/standalone/directives/ion-tab-button.d.ts +12 -0
- package/dist/standalone/directives/ion-tab-button.js +36 -0
- package/dist/standalone/directives/ion-tab-button.js.map +1 -0
- package/dist/standalone/directives/ion-tab.d.ts +12 -0
- package/dist/standalone/directives/ion-tab.js +37 -0
- package/dist/standalone/directives/ion-tab.js.map +1 -0
- package/dist/standalone/directives/ion-text.d.ts +12 -0
- package/dist/standalone/directives/ion-text.js +36 -0
- package/dist/standalone/directives/ion-text.js.map +1 -0
- package/dist/standalone/directives/ion-thumbnail.d.ts +12 -0
- package/dist/standalone/directives/ion-thumbnail.js +35 -0
- package/dist/standalone/directives/ion-thumbnail.js.map +1 -0
- package/dist/standalone/directives/ion-title.d.ts +12 -0
- package/dist/standalone/directives/ion-title.js +36 -0
- package/dist/standalone/directives/ion-title.js.map +1 -0
- package/dist/standalone/directives/ion-toast.d.ts +58 -0
- package/dist/standalone/directives/ion-toast.js +62 -0
- package/dist/standalone/directives/ion-toast.js.map +1 -0
- package/dist/standalone/directives/ion-toolbar.d.ts +12 -0
- package/dist/standalone/directives/ion-toolbar.js +36 -0
- package/dist/standalone/directives/ion-toolbar.js.map +1 -0
- package/dist/standalone/directives/proxies.d.ts +77 -0
- package/dist/standalone/directives/proxies.js +79 -0
- package/dist/standalone/directives/proxies.js.map +1 -0
- package/dist/standalone/directives/radio-group.d.ts +18 -0
- package/dist/standalone/directives/radio-group.js +59 -0
- package/dist/standalone/directives/radio-group.js.map +1 -0
- package/dist/standalone/directives/range.d.ts +47 -0
- package/dist/standalone/directives/range.js +77 -0
- package/dist/standalone/directives/range.js.map +1 -0
- package/dist/standalone/directives/searchbar.d.ts +45 -0
- package/dist/standalone/directives/searchbar.js +81 -0
- package/dist/standalone/directives/searchbar.js.map +1 -0
- package/dist/standalone/directives/segment.d.ts +19 -0
- package/dist/standalone/directives/segment.js +59 -0
- package/dist/standalone/directives/segment.js.map +1 -0
- package/dist/standalone/directives/select.d.ts +34 -0
- package/dist/standalone/directives/select.js +83 -0
- package/dist/standalone/directives/select.js.map +1 -0
- package/dist/standalone/directives/textarea.d.ts +37 -0
- package/dist/standalone/directives/textarea.js +90 -0
- package/dist/standalone/directives/textarea.js.map +1 -0
- package/dist/standalone/directives/toggle.d.ts +28 -0
- package/dist/standalone/directives/toggle.js +75 -0
- package/dist/standalone/directives/toggle.js.map +1 -0
- package/dist/standalone/index.d.ts +22 -0
- package/dist/standalone/index.js +24 -0
- package/dist/standalone/index.js.map +1 -0
- package/dist/standalone/navigation/back-button.d.ts +9 -0
- package/dist/standalone/navigation/back-button.js +32 -0
- package/dist/standalone/navigation/back-button.js.map +1 -0
- package/dist/standalone/navigation/nav.d.ts +8 -0
- package/dist/standalone/navigation/nav.js +28 -0
- package/dist/standalone/navigation/nav.js.map +1 -0
- package/dist/standalone/navigation/router-link-delegate.d.ts +10 -0
- package/dist/standalone/navigation/router-link-delegate.js +26 -0
- package/dist/standalone/navigation/router-link-delegate.js.map +1 -0
- package/dist/standalone/navigation/router-outlet.d.ts +25 -0
- package/dist/standalone/navigation/router-outlet.js +60 -0
- package/dist/standalone/navigation/router-outlet.js.map +1 -0
- package/dist/standalone/navigation/tabs.d.ts +13 -0
- package/dist/standalone/navigation/tabs.js +57 -0
- package/dist/standalone/navigation/tabs.js.map +1 -0
- package/dist/standalone/overlays/modal.d.ts +6 -0
- package/dist/standalone/overlays/modal.js +32 -0
- package/dist/standalone/overlays/modal.js.map +1 -0
- package/dist/standalone/overlays/popover.d.ts +6 -0
- package/dist/standalone/overlays/popover.js +28 -0
- package/dist/standalone/overlays/popover.js.map +1 -0
- package/dist/standalone/providers/action-sheet-controller.d.ts +8 -0
- package/dist/standalone/providers/action-sheet-controller.js +20 -0
- package/dist/standalone/providers/action-sheet-controller.js.map +1 -0
- package/dist/standalone/providers/alert-controller.d.ts +8 -0
- package/dist/standalone/providers/alert-controller.js +20 -0
- package/dist/standalone/providers/alert-controller.js.map +1 -0
- package/dist/standalone/providers/animation-controller.d.ts +25 -0
- package/dist/standalone/providers/animation-controller.js +37 -0
- package/dist/standalone/providers/animation-controller.js.map +1 -0
- package/dist/standalone/providers/gesture-controller.d.ts +13 -0
- package/dist/standalone/providers/gesture-controller.js +32 -0
- package/dist/standalone/providers/gesture-controller.js.map +1 -0
- package/dist/standalone/providers/ionic-angular.d.ts +7 -0
- package/dist/standalone/providers/ionic-angular.js +38 -0
- package/dist/standalone/providers/ionic-angular.js.map +1 -0
- package/dist/standalone/providers/loading-controller.d.ts +8 -0
- package/dist/standalone/providers/loading-controller.js +20 -0
- package/dist/standalone/providers/loading-controller.js.map +1 -0
- package/dist/standalone/providers/menu-controller.d.ts +7 -0
- package/dist/standalone/providers/menu-controller.js +18 -0
- package/dist/standalone/providers/menu-controller.js.map +1 -0
- package/dist/standalone/providers/modal-controller.d.ts +12 -0
- package/dist/standalone/providers/modal-controller.js +27 -0
- package/dist/standalone/providers/modal-controller.js.map +1 -0
- package/dist/standalone/providers/popover-controller.d.ts +9 -0
- package/dist/standalone/providers/popover-controller.js +21 -0
- package/dist/standalone/providers/popover-controller.js.map +1 -0
- package/dist/standalone/providers/toast-controller.d.ts +8 -0
- package/dist/standalone/providers/toast-controller.js +20 -0
- package/dist/standalone/providers/toast-controller.js.map +1 -0
- package/package.json +165 -23
- package/fesm2022/ionic-angular-common.mjs +0 -2802
- package/fesm2022/ionic-angular-common.mjs.map +0 -1
- package/fesm2022/ionic-angular-lazy.mjs.map +0 -1
- package/fesm2022/ionic-angular.mjs +0 -3644
- package/fesm2022/ionic-angular.mjs.map +0 -1
- package/types/ionic-angular-common.d.ts +0 -1031
- package/types/ionic-angular.d.ts +0 -1560
- /package/{schematics → dist/schematics}/add/files/root/theme/variables.css +0 -0
- /package/{schematics → dist/schematics}/add/index.js +0 -0
- /package/{schematics → dist/schematics}/add/schema.json +0 -0
- /package/{schematics → dist/schematics}/collection.json +0 -0
- /package/{schematics → dist/schematics}/utils/ast.js +0 -0
- /package/{schematics → dist/schematics}/utils/config.js +0 -0
- /package/{schematics → dist/schematics}/utils/package.js +0 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { bindLifecycleEvents } from '../../providers/angular-delegate';
|
|
2
|
+
import { computeStackId, destroyView, getUrl, insertView, isTabSwitch, toSegments, } from './stack-utils';
|
|
3
|
+
// TODO(FW-2827): types
|
|
4
|
+
export class StackController {
|
|
5
|
+
containerEl;
|
|
6
|
+
router;
|
|
7
|
+
navCtrl;
|
|
8
|
+
zone;
|
|
9
|
+
location;
|
|
10
|
+
views = [];
|
|
11
|
+
runningTask;
|
|
12
|
+
skipTransition = false;
|
|
13
|
+
tabsPrefix;
|
|
14
|
+
activeView;
|
|
15
|
+
nextId = 0;
|
|
16
|
+
constructor(tabsPrefix, containerEl, router, navCtrl, zone, location) {
|
|
17
|
+
this.containerEl = containerEl;
|
|
18
|
+
this.router = router;
|
|
19
|
+
this.navCtrl = navCtrl;
|
|
20
|
+
this.zone = zone;
|
|
21
|
+
this.location = location;
|
|
22
|
+
this.tabsPrefix = tabsPrefix !== undefined ? toSegments(tabsPrefix) : undefined;
|
|
23
|
+
}
|
|
24
|
+
createView(ref, activatedRoute) {
|
|
25
|
+
const url = getUrl(this.router, activatedRoute);
|
|
26
|
+
const element = ref?.location?.nativeElement;
|
|
27
|
+
const unlistenEvents = bindLifecycleEvents(this.zone, ref.changeDetectorRef, ref.instance, element);
|
|
28
|
+
return {
|
|
29
|
+
id: this.nextId++,
|
|
30
|
+
stackId: computeStackId(this.tabsPrefix, url),
|
|
31
|
+
unlistenEvents,
|
|
32
|
+
element,
|
|
33
|
+
ref,
|
|
34
|
+
url,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
getExistingView(activatedRoute) {
|
|
38
|
+
const activatedUrlKey = getUrl(this.router, activatedRoute);
|
|
39
|
+
const view = this.views.find((vw) => vw.url === activatedUrlKey);
|
|
40
|
+
if (view) {
|
|
41
|
+
view.ref.changeDetectorRef.reattach();
|
|
42
|
+
}
|
|
43
|
+
return view;
|
|
44
|
+
}
|
|
45
|
+
setActive(enteringView) {
|
|
46
|
+
const consumeResult = this.navCtrl.consumeTransition();
|
|
47
|
+
let { direction, animation, animationBuilder } = consumeResult;
|
|
48
|
+
const leavingView = this.activeView;
|
|
49
|
+
const tabSwitch = isTabSwitch(enteringView, leavingView);
|
|
50
|
+
if (tabSwitch) {
|
|
51
|
+
direction = 'back';
|
|
52
|
+
animation = undefined;
|
|
53
|
+
}
|
|
54
|
+
const viewsSnapshot = this.views.slice();
|
|
55
|
+
let currentNavigation;
|
|
56
|
+
const router = this.router;
|
|
57
|
+
// Angular >= 7.2.0
|
|
58
|
+
if (router.getCurrentNavigation) {
|
|
59
|
+
currentNavigation = router.getCurrentNavigation();
|
|
60
|
+
// Angular < 7.2.0
|
|
61
|
+
}
|
|
62
|
+
else if (router.navigations?.value) {
|
|
63
|
+
currentNavigation = router.navigations.value;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* If the navigation action
|
|
67
|
+
* sets `replaceUrl: true`
|
|
68
|
+
* then we need to make sure
|
|
69
|
+
* we remove the last item
|
|
70
|
+
* from our views stack
|
|
71
|
+
*/
|
|
72
|
+
if (currentNavigation?.extras?.replaceUrl) {
|
|
73
|
+
if (this.views.length > 0) {
|
|
74
|
+
this.views.splice(-1, 1);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const reused = this.views.includes(enteringView);
|
|
78
|
+
const views = this.insertView(enteringView, direction);
|
|
79
|
+
// Trigger change detection before transition starts
|
|
80
|
+
// This will call ngOnInit() the first time too, just after the view
|
|
81
|
+
// was attached to the dom, but BEFORE the transition starts
|
|
82
|
+
if (!reused) {
|
|
83
|
+
enteringView.ref.changeDetectorRef.detectChanges();
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* If we are going back from a page that
|
|
87
|
+
* was presented using a custom animation
|
|
88
|
+
* we should default to using that
|
|
89
|
+
* unless the developer explicitly
|
|
90
|
+
* provided another animation.
|
|
91
|
+
*/
|
|
92
|
+
const customAnimation = enteringView.animationBuilder;
|
|
93
|
+
if (animationBuilder === undefined && direction === 'back' && !tabSwitch && customAnimation !== undefined) {
|
|
94
|
+
animationBuilder = customAnimation;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Save any custom animation so that navigating
|
|
98
|
+
* back will use this custom animation by default.
|
|
99
|
+
*/
|
|
100
|
+
if (leavingView) {
|
|
101
|
+
leavingView.animationBuilder = animationBuilder;
|
|
102
|
+
}
|
|
103
|
+
// Wait until previous transitions finish
|
|
104
|
+
return this.zone.runOutsideAngular(() => {
|
|
105
|
+
return this.wait(() => {
|
|
106
|
+
// disconnect leaving page from change detection to
|
|
107
|
+
// reduce jank during the page transition
|
|
108
|
+
if (leavingView) {
|
|
109
|
+
leavingView.ref.changeDetectorRef.detach();
|
|
110
|
+
}
|
|
111
|
+
// In case the enteringView is the same as the leavingPage we need to reattach()
|
|
112
|
+
enteringView.ref.changeDetectorRef.reattach();
|
|
113
|
+
return this.transition(enteringView, leavingView, animation, this.canGoBack(1), false, animationBuilder)
|
|
114
|
+
.then(() => cleanupAsync(enteringView, views, viewsSnapshot, this.location, this.zone))
|
|
115
|
+
.then(() => ({
|
|
116
|
+
enteringView,
|
|
117
|
+
direction,
|
|
118
|
+
animation,
|
|
119
|
+
tabSwitch,
|
|
120
|
+
}));
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
canGoBack(deep, stackId = this.getActiveStackId()) {
|
|
125
|
+
return this.getStack(stackId).length > deep;
|
|
126
|
+
}
|
|
127
|
+
pop(deep, stackId = this.getActiveStackId()) {
|
|
128
|
+
return this.zone.run(() => {
|
|
129
|
+
const views = this.getStack(stackId);
|
|
130
|
+
if (views.length <= deep) {
|
|
131
|
+
return Promise.resolve(false);
|
|
132
|
+
}
|
|
133
|
+
const view = views[views.length - deep - 1];
|
|
134
|
+
let url = view.url;
|
|
135
|
+
const viewSavedData = view.savedData;
|
|
136
|
+
if (viewSavedData) {
|
|
137
|
+
const primaryOutlet = viewSavedData.get('primary');
|
|
138
|
+
if (primaryOutlet?.route?._routerState?.snapshot.url) {
|
|
139
|
+
url = primaryOutlet.route._routerState.snapshot.url;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const { animationBuilder } = this.navCtrl.consumeTransition();
|
|
143
|
+
return this.navCtrl.navigateBack(url, { ...view.savedExtras, animation: animationBuilder }).then(() => true);
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
startBackTransition() {
|
|
147
|
+
const leavingView = this.activeView;
|
|
148
|
+
if (leavingView) {
|
|
149
|
+
const views = this.getStack(leavingView.stackId);
|
|
150
|
+
const enteringView = views[views.length - 2];
|
|
151
|
+
const customAnimation = enteringView.animationBuilder;
|
|
152
|
+
return this.wait(() => {
|
|
153
|
+
return this.transition(enteringView, // entering view
|
|
154
|
+
leavingView, // leaving view
|
|
155
|
+
'back', this.canGoBack(2), true, customAnimation);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return Promise.resolve();
|
|
159
|
+
}
|
|
160
|
+
endBackTransition(shouldComplete) {
|
|
161
|
+
if (shouldComplete) {
|
|
162
|
+
this.skipTransition = true;
|
|
163
|
+
this.pop(1);
|
|
164
|
+
}
|
|
165
|
+
else if (this.activeView) {
|
|
166
|
+
cleanup(this.activeView, this.views, this.views, this.location, this.zone);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
getLastUrl(stackId) {
|
|
170
|
+
const views = this.getStack(stackId);
|
|
171
|
+
return views.length > 0 ? views[views.length - 1] : undefined;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* @internal
|
|
175
|
+
*/
|
|
176
|
+
getRootUrl(stackId) {
|
|
177
|
+
const views = this.getStack(stackId);
|
|
178
|
+
return views.length > 0 ? views[0] : undefined;
|
|
179
|
+
}
|
|
180
|
+
getActiveStackId() {
|
|
181
|
+
return this.activeView ? this.activeView.stackId : undefined;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* @internal
|
|
185
|
+
*/
|
|
186
|
+
getActiveView() {
|
|
187
|
+
return this.activeView;
|
|
188
|
+
}
|
|
189
|
+
hasRunningTask() {
|
|
190
|
+
return this.runningTask !== undefined;
|
|
191
|
+
}
|
|
192
|
+
destroy() {
|
|
193
|
+
this.containerEl = undefined;
|
|
194
|
+
this.views.forEach(destroyView);
|
|
195
|
+
this.activeView = undefined;
|
|
196
|
+
this.views = [];
|
|
197
|
+
}
|
|
198
|
+
getStack(stackId) {
|
|
199
|
+
return this.views.filter((v) => v.stackId === stackId);
|
|
200
|
+
}
|
|
201
|
+
insertView(enteringView, direction) {
|
|
202
|
+
this.activeView = enteringView;
|
|
203
|
+
this.views = insertView(this.views, enteringView, direction);
|
|
204
|
+
return this.views.slice();
|
|
205
|
+
}
|
|
206
|
+
transition(enteringView, leavingView, direction, showGoBack, progressAnimation, animationBuilder) {
|
|
207
|
+
if (this.skipTransition) {
|
|
208
|
+
this.skipTransition = false;
|
|
209
|
+
return Promise.resolve(false);
|
|
210
|
+
}
|
|
211
|
+
if (leavingView === enteringView) {
|
|
212
|
+
return Promise.resolve(false);
|
|
213
|
+
}
|
|
214
|
+
const enteringEl = enteringView ? enteringView.element : undefined;
|
|
215
|
+
const leavingEl = leavingView ? leavingView.element : undefined;
|
|
216
|
+
const containerEl = this.containerEl;
|
|
217
|
+
if (enteringEl && enteringEl !== leavingEl) {
|
|
218
|
+
enteringEl.classList.add('ion-page');
|
|
219
|
+
enteringEl.classList.add('ion-page-invisible');
|
|
220
|
+
// containerEl is set to undefined when the stack controller is destroyed,
|
|
221
|
+
// so a transition that resolves after its outlet was destroyed must not
|
|
222
|
+
// dereference it (see destroy()).
|
|
223
|
+
if (containerEl?.commit) {
|
|
224
|
+
return containerEl.commit(enteringEl, leavingEl, {
|
|
225
|
+
duration: direction === undefined ? 0 : undefined,
|
|
226
|
+
direction,
|
|
227
|
+
showGoBack,
|
|
228
|
+
progressAnimation,
|
|
229
|
+
animationBuilder,
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return Promise.resolve(false);
|
|
234
|
+
}
|
|
235
|
+
async wait(task) {
|
|
236
|
+
if (this.runningTask !== undefined) {
|
|
237
|
+
await this.runningTask;
|
|
238
|
+
this.runningTask = undefined;
|
|
239
|
+
}
|
|
240
|
+
const promise = (this.runningTask = task());
|
|
241
|
+
promise.finally(() => (this.runningTask = undefined));
|
|
242
|
+
return promise;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
const cleanupAsync = (activeRoute, views, viewsSnapshot, location, zone) => {
|
|
246
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
247
|
+
return new Promise((resolve) => {
|
|
248
|
+
requestAnimationFrame(() => {
|
|
249
|
+
cleanup(activeRoute, views, viewsSnapshot, location, zone);
|
|
250
|
+
resolve();
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
return Promise.resolve();
|
|
255
|
+
};
|
|
256
|
+
const cleanup = (activeRoute, views, viewsSnapshot, location, zone) => {
|
|
257
|
+
/**
|
|
258
|
+
* Re-enter the Angular zone when destroying page components. This will allow
|
|
259
|
+
* lifecycle events (`ngOnDestroy`) to be run inside the Angular zone.
|
|
260
|
+
*/
|
|
261
|
+
zone.run(() => viewsSnapshot.filter((view) => !views.includes(view)).forEach(destroyView));
|
|
262
|
+
views.forEach((view) => {
|
|
263
|
+
/**
|
|
264
|
+
* In the event that a user navigated multiple
|
|
265
|
+
* times in rapid succession, we want to make sure
|
|
266
|
+
* we don't pre-emptively detach a view while
|
|
267
|
+
* it is in mid-transition.
|
|
268
|
+
*
|
|
269
|
+
* In this instance we also do not care about query
|
|
270
|
+
* params or fragments as it will be the same view regardless
|
|
271
|
+
*/
|
|
272
|
+
const locationWithoutParams = location.path().split('?')[0];
|
|
273
|
+
const locationWithoutFragment = locationWithoutParams.split('#')[0];
|
|
274
|
+
if (view !== activeRoute && view.url !== locationWithoutFragment) {
|
|
275
|
+
const element = view.element;
|
|
276
|
+
element.setAttribute('aria-hidden', 'true');
|
|
277
|
+
element.classList.add('ion-page-hidden');
|
|
278
|
+
view.ref.changeDetectorRef.detach();
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
};
|
|
282
|
+
//# sourceMappingURL=stack-controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack-controller.js","sourceRoot":"","sources":["../../../../src/common/directives/navigation/stack-controller.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAGL,cAAc,EACd,WAAW,EACX,MAAM,EACN,UAAU,EACV,WAAW,EACX,UAAU,GACX,MAAM,eAAe,CAAC;AAEvB,uBAAuB;AAEvB,MAAM,OAAO,eAAe;IAUhB;IACA;IACA;IACA;IACA;IAbF,KAAK,GAAgB,EAAE,CAAC;IACxB,WAAW,CAAgB;IAC3B,cAAc,GAAG,KAAK,CAAC;IACvB,UAAU,CAAuB;IACjC,UAAU,CAAwB;IAClC,MAAM,GAAG,CAAC,CAAC;IAEnB,YACE,UAA8B,EACtB,WAAuC,EACvC,MAAc,EACd,OAAsB,EACtB,IAAY,EACZ,QAAkB;QAJlB,gBAAW,GAAX,WAAW,CAA4B;QACvC,WAAM,GAAN,MAAM,CAAQ;QACd,YAAO,GAAP,OAAO,CAAe;QACtB,SAAI,GAAJ,IAAI,CAAQ;QACZ,aAAQ,GAAR,QAAQ,CAAU;QAE1B,IAAI,CAAC,UAAU,GAAG,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAClF,CAAC;IAED,UAAU,CAAC,GAAsB,EAAE,cAA8B;QAC/D,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;QAChD,MAAM,OAAO,GAAG,GAAG,EAAE,QAAQ,EAAE,aAA4B,CAAC;QAC5D,MAAM,cAAc,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,EAAE,IAAI,CAAC,CAAC;gBAC3D,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,CACd,WAAsB,EACtB,KAAkB,EAClB,aAA0B,EAC1B,QAAkB,EAClB,IAAY,EACZ,EAAE;IACF;;;OAGG;IACH,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;IAE3F,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACrB;;;;;;;;WAQG;QACH,MAAM,qBAAqB,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5D,MAAM,uBAAuB,GAAG,qBAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAEpE,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,GAAG,KAAK,uBAAuB,EAAE,CAAC;YACjE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;YAC7B,OAAO,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YAC5C,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;YACzC,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC;QACtC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["import { Location } from '@angular/common';\nimport { ComponentRef, NgZone } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport type { AnimationBuilder, RouterDirection } from '@ionic/core/components';\n\nimport { bindLifecycleEvents } from '../../providers/angular-delegate';\nimport { NavController } from '../../providers/nav-controller';\n\nimport {\n RouteView,\n StackDidChangeEvent,\n computeStackId,\n destroyView,\n getUrl,\n insertView,\n isTabSwitch,\n toSegments,\n} from './stack-utils';\n\n// TODO(FW-2827): types\n\nexport class StackController {\n private views: RouteView[] = [];\n private runningTask?: Promise<any>;\n private skipTransition = false;\n private tabsPrefix: string[] | undefined;\n private activeView: RouteView | undefined;\n private nextId = 0;\n\n constructor(\n tabsPrefix: string | undefined,\n private containerEl: HTMLIonRouterOutletElement,\n private router: Router,\n private navCtrl: NavController,\n private zone: NgZone,\n private location: Location\n ) {\n this.tabsPrefix = tabsPrefix !== undefined ? toSegments(tabsPrefix) : undefined;\n }\n\n createView(ref: ComponentRef<any>, activatedRoute: ActivatedRoute): RouteView {\n const url = getUrl(this.router, activatedRoute);\n const element = ref?.location?.nativeElement as HTMLElement;\n const unlistenEvents = bindLifecycleEvents(this.zone, ref.changeDetectorRef, ref.instance, element);\n return {\n id: this.nextId++,\n stackId: computeStackId(this.tabsPrefix, url),\n unlistenEvents,\n element,\n ref,\n url,\n };\n }\n\n getExistingView(activatedRoute: ActivatedRoute): RouteView | undefined {\n const activatedUrlKey = getUrl(this.router, activatedRoute);\n const view = this.views.find((vw) => vw.url === activatedUrlKey);\n if (view) {\n view.ref.changeDetectorRef.reattach();\n }\n return view;\n }\n\n setActive(enteringView: RouteView): Promise<StackDidChangeEvent> {\n const consumeResult = this.navCtrl.consumeTransition();\n let { direction, animation, animationBuilder } = consumeResult;\n const leavingView = this.activeView;\n const tabSwitch = isTabSwitch(enteringView, leavingView);\n if (tabSwitch) {\n direction = 'back';\n animation = undefined;\n }\n\n const viewsSnapshot = this.views.slice();\n\n let currentNavigation;\n\n const router = this.router as any;\n\n // Angular >= 7.2.0\n if (router.getCurrentNavigation) {\n currentNavigation = router.getCurrentNavigation();\n\n // Angular < 7.2.0\n } else if (router.navigations?.value) {\n currentNavigation = router.navigations.value;\n }\n\n /**\n * If the navigation action\n * sets `replaceUrl: true`\n * then we need to make sure\n * we remove the last item\n * from our views stack\n */\n if (currentNavigation?.extras?.replaceUrl) {\n if (this.views.length > 0) {\n this.views.splice(-1, 1);\n }\n }\n\n const reused = this.views.includes(enteringView);\n const views = this.insertView(enteringView, direction);\n\n // Trigger change detection before transition starts\n // This will call ngOnInit() the first time too, just after the view\n // was attached to the dom, but BEFORE the transition starts\n if (!reused) {\n enteringView.ref.changeDetectorRef.detectChanges();\n }\n\n /**\n * If we are going back from a page that\n * was presented using a custom animation\n * we should default to using that\n * unless the developer explicitly\n * provided another animation.\n */\n const customAnimation = enteringView.animationBuilder;\n if (animationBuilder === undefined && direction === 'back' && !tabSwitch && customAnimation !== undefined) {\n animationBuilder = customAnimation;\n }\n\n /**\n * Save any custom animation so that navigating\n * back will use this custom animation by default.\n */\n if (leavingView) {\n leavingView.animationBuilder = animationBuilder;\n }\n\n // Wait until previous transitions finish\n return this.zone.runOutsideAngular(() => {\n return this.wait(() => {\n // disconnect leaving page from change detection to\n // reduce jank during the page transition\n if (leavingView) {\n leavingView.ref.changeDetectorRef.detach();\n }\n // In case the enteringView is the same as the leavingPage we need to reattach()\n enteringView.ref.changeDetectorRef.reattach();\n\n return this.transition(enteringView, leavingView, animation, this.canGoBack(1), false, animationBuilder)\n .then(() => cleanupAsync(enteringView, views, viewsSnapshot, this.location, this.zone))\n .then(() => ({\n enteringView,\n direction,\n animation,\n tabSwitch,\n }));\n });\n });\n }\n\n canGoBack(deep: number, stackId = this.getActiveStackId()): boolean {\n return this.getStack(stackId).length > deep;\n }\n\n pop(deep: number, stackId = this.getActiveStackId()): Promise<boolean> {\n return this.zone.run(() => {\n const views = this.getStack(stackId);\n if (views.length <= deep) {\n return Promise.resolve(false);\n }\n const view = views[views.length - deep - 1];\n let url = view.url;\n\n const viewSavedData = view.savedData;\n if (viewSavedData) {\n const primaryOutlet = viewSavedData.get('primary');\n if (primaryOutlet?.route?._routerState?.snapshot.url) {\n url = primaryOutlet.route._routerState.snapshot.url;\n }\n }\n const { animationBuilder } = this.navCtrl.consumeTransition();\n return this.navCtrl.navigateBack(url, { ...view.savedExtras, animation: animationBuilder }).then(() => true);\n });\n }\n\n startBackTransition(): Promise<boolean> | Promise<void> {\n const leavingView = this.activeView;\n if (leavingView) {\n const views = this.getStack(leavingView.stackId);\n const enteringView = views[views.length - 2];\n const customAnimation = enteringView.animationBuilder;\n\n return this.wait(() => {\n return this.transition(\n enteringView, // entering view\n leavingView, // leaving view\n 'back',\n this.canGoBack(2),\n true,\n customAnimation\n );\n });\n }\n return Promise.resolve();\n }\n\n endBackTransition(shouldComplete: boolean): void {\n if (shouldComplete) {\n this.skipTransition = true;\n this.pop(1);\n } else if (this.activeView) {\n cleanup(this.activeView, this.views, this.views, this.location, this.zone);\n }\n }\n\n getLastUrl(stackId?: string): RouteView | undefined {\n const views = this.getStack(stackId);\n return views.length > 0 ? views[views.length - 1] : undefined;\n }\n\n /**\n * @internal\n */\n getRootUrl(stackId?: string): RouteView | undefined {\n const views = this.getStack(stackId);\n return views.length > 0 ? views[0] : undefined;\n }\n\n getActiveStackId(): string | undefined {\n return this.activeView ? this.activeView.stackId : undefined;\n }\n\n /**\n * @internal\n */\n getActiveView(): RouteView | undefined {\n return this.activeView;\n }\n\n hasRunningTask(): boolean {\n return this.runningTask !== undefined;\n }\n\n destroy(): void {\n this.containerEl = undefined!;\n this.views.forEach(destroyView);\n this.activeView = undefined;\n this.views = [];\n }\n\n private getStack(stackId: string | undefined) {\n return this.views.filter((v) => v.stackId === stackId);\n }\n\n private insertView(enteringView: RouteView, direction: RouterDirection) {\n this.activeView = enteringView;\n this.views = insertView(this.views, enteringView, direction);\n return this.views.slice();\n }\n\n private transition(\n enteringView: RouteView | undefined,\n leavingView: RouteView | undefined,\n direction: 'forward' | 'back' | undefined,\n showGoBack: boolean,\n progressAnimation: boolean,\n animationBuilder?: AnimationBuilder\n ) {\n if (this.skipTransition) {\n this.skipTransition = false;\n return Promise.resolve(false);\n }\n if (leavingView === enteringView) {\n return Promise.resolve(false);\n }\n const enteringEl = enteringView ? enteringView.element : undefined;\n const leavingEl = leavingView ? leavingView.element : undefined;\n const containerEl = this.containerEl;\n if (enteringEl && enteringEl !== leavingEl) {\n enteringEl.classList.add('ion-page');\n enteringEl.classList.add('ion-page-invisible');\n\n // containerEl is set to undefined when the stack controller is destroyed,\n // so a transition that resolves after its outlet was destroyed must not\n // dereference it (see destroy()).\n if ((containerEl as any)?.commit) {\n return containerEl.commit(enteringEl, leavingEl, {\n duration: direction === undefined ? 0 : undefined,\n direction,\n showGoBack,\n progressAnimation,\n animationBuilder,\n });\n }\n }\n return Promise.resolve(false);\n }\n\n private async wait<T>(task: () => Promise<T>): Promise<T> {\n if (this.runningTask !== undefined) {\n await this.runningTask;\n this.runningTask = undefined;\n }\n const promise = (this.runningTask = task());\n promise.finally(() => (this.runningTask = undefined));\n return promise;\n }\n}\n\nconst cleanupAsync = (\n activeRoute: RouteView,\n views: RouteView[],\n viewsSnapshot: RouteView[],\n location: Location,\n zone: NgZone\n) => {\n if (typeof (requestAnimationFrame as any) === 'function') {\n return new Promise<void>((resolve) => {\n requestAnimationFrame(() => {\n cleanup(activeRoute, views, viewsSnapshot, location, zone);\n resolve();\n });\n });\n }\n return Promise.resolve();\n};\n\nconst cleanup = (\n activeRoute: RouteView,\n views: RouteView[],\n viewsSnapshot: RouteView[],\n location: Location,\n zone: NgZone\n) => {\n /**\n * Re-enter the Angular zone when destroying page components. This will allow\n * lifecycle events (`ngOnDestroy`) to be run inside the Angular zone.\n */\n zone.run(() => viewsSnapshot.filter((view) => !views.includes(view)).forEach(destroyView));\n\n views.forEach((view) => {\n /**\n * In the event that a user navigated multiple\n * times in rapid succession, we want to make sure\n * we don't pre-emptively detach a view while\n * it is in mid-transition.\n *\n * In this instance we also do not care about query\n * params or fragments as it will be the same view regardless\n */\n const locationWithoutParams = location.path().split('?')[0];\n const locationWithoutFragment = locationWithoutParams.split('#')[0];\n\n if (view !== activeRoute && view.url !== locationWithoutFragment) {\n const element = view.element;\n element.setAttribute('aria-hidden', 'true');\n element.classList.add('ion-page-hidden');\n view.ref.changeDetectorRef.detach();\n }\n });\n};\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ComponentRef } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, NavigationExtras, Router } from '@angular/router';
|
|
3
|
+
import type { AnimationBuilder, NavDirection, RouterDirection } from '@ionic/core/components';
|
|
4
|
+
export declare const insertView: (views: RouteView[], view: RouteView, direction: RouterDirection) => RouteView[];
|
|
5
|
+
export declare const getUrl: (router: Router, activatedRoute: ActivatedRoute) => string;
|
|
6
|
+
export declare const isTabSwitch: (enteringView: RouteView, leavingView: RouteView | undefined) => boolean;
|
|
7
|
+
export declare const computeStackId: (prefixUrl: string[] | undefined, url: string) => string | undefined;
|
|
8
|
+
export declare const toSegments: (path: string) => string[];
|
|
9
|
+
export declare const destroyView: (view: RouteView | undefined) => void;
|
|
10
|
+
export interface StackWillChangeEvent {
|
|
11
|
+
enteringView: RouteView;
|
|
12
|
+
/**
|
|
13
|
+
* `true` if the event is trigged as a result of a switch
|
|
14
|
+
* between tab navigation stacks.
|
|
15
|
+
*/
|
|
16
|
+
tabSwitch: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface StackDidChangeEvent {
|
|
19
|
+
enteringView: RouteView;
|
|
20
|
+
direction: RouterDirection;
|
|
21
|
+
animation: NavDirection | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* `true` if the event is trigged as a result of a switch
|
|
24
|
+
* between tab navigation stacks.
|
|
25
|
+
*/
|
|
26
|
+
tabSwitch: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface RouteView {
|
|
29
|
+
id: number;
|
|
30
|
+
url: string;
|
|
31
|
+
stackId: string | undefined;
|
|
32
|
+
element: HTMLElement;
|
|
33
|
+
ref: ComponentRef<any>;
|
|
34
|
+
savedData?: any;
|
|
35
|
+
savedExtras?: NavigationExtras;
|
|
36
|
+
unlistenEvents: () => void;
|
|
37
|
+
animationBuilder?: AnimationBuilder;
|
|
38
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export const insertView = (views, view, direction) => {
|
|
2
|
+
if (direction === 'root') {
|
|
3
|
+
return setRoot(views, view);
|
|
4
|
+
}
|
|
5
|
+
else if (direction === 'forward') {
|
|
6
|
+
return setForward(views, view);
|
|
7
|
+
}
|
|
8
|
+
else {
|
|
9
|
+
return setBack(views, view);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
const setRoot = (views, view) => {
|
|
13
|
+
views = views.filter((v) => v.stackId !== view.stackId);
|
|
14
|
+
views.push(view);
|
|
15
|
+
return views;
|
|
16
|
+
};
|
|
17
|
+
const setForward = (views, view) => {
|
|
18
|
+
const index = views.indexOf(view);
|
|
19
|
+
if (index >= 0) {
|
|
20
|
+
views = views.filter((v) => v.stackId !== view.stackId || v.id <= view.id);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
views.push(view);
|
|
24
|
+
}
|
|
25
|
+
return views;
|
|
26
|
+
};
|
|
27
|
+
const setBack = (views, view) => {
|
|
28
|
+
const index = views.indexOf(view);
|
|
29
|
+
if (index >= 0) {
|
|
30
|
+
return views.filter((v) => v.stackId !== view.stackId || v.id <= view.id);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
return setRoot(views, view);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
export const getUrl = (router, activatedRoute) => {
|
|
37
|
+
const urlTree = router.createUrlTree(['.'], { relativeTo: activatedRoute });
|
|
38
|
+
return router.serializeUrl(urlTree);
|
|
39
|
+
};
|
|
40
|
+
export const isTabSwitch = (enteringView, leavingView) => {
|
|
41
|
+
if (!leavingView) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
return enteringView.stackId !== leavingView.stackId;
|
|
45
|
+
};
|
|
46
|
+
export const computeStackId = (prefixUrl, url) => {
|
|
47
|
+
if (!prefixUrl) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
const segments = toSegments(url);
|
|
51
|
+
for (let i = 0; i < segments.length; i++) {
|
|
52
|
+
if (i >= prefixUrl.length) {
|
|
53
|
+
return segments[i];
|
|
54
|
+
}
|
|
55
|
+
if (segments[i] !== prefixUrl[i]) {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return undefined;
|
|
60
|
+
};
|
|
61
|
+
export const toSegments = (path) => {
|
|
62
|
+
return path
|
|
63
|
+
.split('/')
|
|
64
|
+
.map((s) => s.trim())
|
|
65
|
+
.filter((s) => s !== '');
|
|
66
|
+
};
|
|
67
|
+
export const destroyView = (view) => {
|
|
68
|
+
if (view) {
|
|
69
|
+
view.ref.destroy();
|
|
70
|
+
view.unlistenEvents();
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=stack-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack-utils.js","sourceRoot":"","sources":["../../../../src/common/directives/navigation/stack-utils.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAkB,EAAE,IAAe,EAAE,SAA0B,EAAe,EAAE;IACzG,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;QACzB,OAAO,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;SAAM,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QACnC,OAAO,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACjC,CAAC;SAAM,CAAC;QACN,OAAO,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,CAAC,KAAkB,EAAE,IAAe,EAAE,EAAE;IACtD,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,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A2B,EAAQ,EAAE;IAC/D,IAAI,IAAI,EAAE,CAAC;QACT,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QACnB,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;AACH,CAAC,CAAC","sourcesContent":["import { ComponentRef } from '@angular/core';\nimport { ActivatedRoute, NavigationExtras, Router } from '@angular/router';\nimport type { AnimationBuilder, NavDirection, RouterDirection } from '@ionic/core/components';\n\nexport const insertView = (views: RouteView[], view: RouteView, direction: RouterDirection): RouteView[] => {\n if (direction === 'root') {\n return setRoot(views, view);\n } else if (direction === 'forward') {\n return setForward(views, view);\n } else {\n return setBack(views, view);\n }\n};\n\nconst setRoot = (views: RouteView[], view: RouteView) => {\n views = views.filter((v) => v.stackId !== view.stackId);\n views.push(view);\n return views;\n};\n\nconst setForward = (views: RouteView[], view: RouteView) => {\n const index = views.indexOf(view);\n if (index >= 0) {\n views = views.filter((v) => v.stackId !== view.stackId || v.id <= view.id);\n } else {\n views.push(view);\n }\n return views;\n};\n\nconst setBack = (views: RouteView[], view: RouteView) => {\n const index = views.indexOf(view);\n if (index >= 0) {\n return views.filter((v) => v.stackId !== view.stackId || v.id <= view.id);\n } else {\n return setRoot(views, view);\n }\n};\n\nexport const getUrl = (router: Router, activatedRoute: ActivatedRoute): string => {\n const urlTree = router.createUrlTree(['.'], { relativeTo: activatedRoute });\n return router.serializeUrl(urlTree);\n};\n\nexport const isTabSwitch = (enteringView: RouteView, leavingView: RouteView | undefined): boolean => {\n if (!leavingView) {\n return true;\n }\n return enteringView.stackId !== leavingView.stackId;\n};\n\nexport const computeStackId = (prefixUrl: string[] | undefined, url: string): string | undefined => {\n if (!prefixUrl) {\n return undefined;\n }\n const segments = toSegments(url);\n for (let i = 0; i < segments.length; i++) {\n if (i >= prefixUrl.length) {\n return segments[i];\n }\n if (segments[i] !== prefixUrl[i]) {\n return undefined;\n }\n }\n return undefined;\n};\n\nexport const toSegments = (path: string): string[] => {\n return path\n .split('/')\n .map((s) => s.trim())\n .filter((s) => s !== '');\n};\n\nexport const destroyView = (view: RouteView | undefined): void => {\n if (view) {\n view.ref.destroy();\n view.unlistenEvents();\n }\n};\n\nexport interface StackWillChangeEvent {\n enteringView: RouteView;\n /**\n * `true` if the event is trigged as a result of a switch\n * between tab navigation stacks.\n */\n tabSwitch: boolean;\n}\n\nexport interface StackDidChangeEvent {\n enteringView: RouteView;\n direction: RouterDirection;\n animation: NavDirection | undefined;\n /**\n * `true` if the event is trigged as a result of a switch\n * between tab navigation stacks.\n */\n tabSwitch: boolean;\n}\n\n// TODO(FW-2827): types\nexport interface RouteView {\n id: number;\n url: string;\n stackId: string | undefined;\n element: HTMLElement;\n ref: ComponentRef<any>;\n savedData?: any;\n savedExtras?: NavigationExtras;\n unlistenEvents: () => void;\n animationBuilder?: AnimationBuilder;\n}\n"]}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { AfterContentChecked, AfterContentInit, ElementRef, EventEmitter, AfterViewInit, QueryList } from '@angular/core';
|
|
2
|
+
import { NavController } from '../../providers/nav-controller';
|
|
3
|
+
import { StackDidChangeEvent, StackWillChangeEvent } from './stack-utils';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare abstract class IonTabs implements AfterViewInit, AfterContentInit, AfterContentChecked {
|
|
6
|
+
private navCtrl;
|
|
7
|
+
/**
|
|
8
|
+
* Note: These must be redeclared on each child class since it needs
|
|
9
|
+
* access to generated components such as IonRouterOutlet and IonTabBar.
|
|
10
|
+
*/
|
|
11
|
+
abstract outlet: any;
|
|
12
|
+
abstract tabBar: any;
|
|
13
|
+
abstract tabBars: QueryList<any>;
|
|
14
|
+
abstract tabs: QueryList<any>;
|
|
15
|
+
tabsInner: ElementRef<HTMLDivElement>;
|
|
16
|
+
/**
|
|
17
|
+
* Emitted before the tab view is changed.
|
|
18
|
+
*/
|
|
19
|
+
ionTabsWillChange: EventEmitter<{
|
|
20
|
+
tab: string;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* Emitted after the tab view is changed.
|
|
24
|
+
*/
|
|
25
|
+
ionTabsDidChange: EventEmitter<{
|
|
26
|
+
tab: string;
|
|
27
|
+
}>;
|
|
28
|
+
private tabBarSlot;
|
|
29
|
+
private hasTab;
|
|
30
|
+
private selectedTab?;
|
|
31
|
+
private leavingTab?;
|
|
32
|
+
constructor(navCtrl: NavController);
|
|
33
|
+
ngAfterViewInit(): void;
|
|
34
|
+
ngAfterContentInit(): void;
|
|
35
|
+
ngAfterContentChecked(): void;
|
|
36
|
+
/**
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
onStackWillChange({ enteringView, tabSwitch }: StackWillChangeEvent): void;
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
onStackDidChange({ enteringView, tabSwitch }: StackDidChangeEvent): void;
|
|
44
|
+
/**
|
|
45
|
+
* Host listener for the `ionTabButtonClick` event. Angular 22 enabled stricter
|
|
46
|
+
* host-binding type checking, which types `$event` as the DOM `Event`. That is
|
|
47
|
+
* not assignable to `select`'s public `string | CustomEvent` parameter, so this
|
|
48
|
+
* thin wrapper narrows the event before forwarding to keep `select`'s public
|
|
49
|
+
* signature intact.
|
|
50
|
+
*/
|
|
51
|
+
onTabButtonClick(ev: Event): Promise<boolean> | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* When a tab button is clicked, there are several scenarios:
|
|
54
|
+
* 1. If the selected tab is currently active (the tab button has been clicked
|
|
55
|
+
* again), then it should go to the root view for that tab.
|
|
56
|
+
*
|
|
57
|
+
* a. Get the saved root view from the router outlet. If the saved root view
|
|
58
|
+
* matches the tabRootUrl, set the route view to this view including the
|
|
59
|
+
* navigation extras. Any `queryParams` or `fragment` declared on the tab
|
|
60
|
+
* button's `href` are also forwarded.
|
|
61
|
+
* b. If the saved root view from the router outlet does not match, navigate
|
|
62
|
+
* to the tabRootUrl, forwarding any `queryParams`/`fragment` declared on
|
|
63
|
+
* the tab button's `href`.
|
|
64
|
+
*
|
|
65
|
+
* 2. If the current tab tab is not currently selected, get the last route
|
|
66
|
+
* view from the router outlet.
|
|
67
|
+
*
|
|
68
|
+
* a. If the last route view exists, navigate to that view including any
|
|
69
|
+
* navigation extras.
|
|
70
|
+
* b. If the last route view doesn't exist, then navigate to the default
|
|
71
|
+
* tabRootUrl, forwarding any `queryParams`/`fragment` declared on the
|
|
72
|
+
* tab button's `href`.
|
|
73
|
+
*/
|
|
74
|
+
select(tabOrEvent: string | CustomEvent): Promise<boolean> | undefined;
|
|
75
|
+
private setActiveTab;
|
|
76
|
+
private tabSwitch;
|
|
77
|
+
getSelected(): string | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Detects changes to the slot attribute of the tab bar.
|
|
80
|
+
*
|
|
81
|
+
* If the slot attribute has changed, then the tab bar
|
|
82
|
+
* should be relocated to the new slot position.
|
|
83
|
+
*/
|
|
84
|
+
private detectSlotChanges;
|
|
85
|
+
/**
|
|
86
|
+
* Relocates the tab bar to the new slot position.
|
|
87
|
+
*/
|
|
88
|
+
private relocateTabBar;
|
|
89
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IonTabs, never>;
|
|
90
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<IonTabs, "ion-tabs", never, {}, { "ionTabsWillChange": "ionTabsWillChange"; "ionTabsDidChange": "ionTabsDidChange"; }, never, never, true, never>;
|
|
91
|
+
}
|