@ionic/angular 8.8.19 → 8.8.20-dev.11787158518.168a2fea
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 +9 -7
- package/dist/common/directives/control-value-accessors/index.js +2 -0
- package/dist/common/directives/control-value-accessors/index.js.map +1 -0
- package/{common → dist/common}/directives/control-value-accessors/value-accessor.d.ts +1 -1
- 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/{common → dist/common}/directives/navigation/back-button.d.ts +1 -1
- 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.js +47 -0
- package/dist/common/directives/navigation/nav-params.js.map +1 -0
- package/{common → dist/common}/directives/navigation/nav.d.ts +1 -1
- package/dist/common/directives/navigation/nav.js +49 -0
- package/dist/common/directives/navigation/nav.js.map +1 -0
- package/{common → dist/common}/directives/navigation/router-link-delegate.d.ts +2 -2
- package/dist/common/directives/navigation/router-link-delegate.js +188 -0
- package/dist/common/directives/navigation/router-link-delegate.js.map +1 -0
- package/{common → dist/common}/directives/navigation/router-outlet.d.ts +1 -1
- 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.js +282 -0
- package/dist/common/directives/navigation/stack-controller.js.map +1 -0
- package/dist/common/directives/navigation/stack-utils.js +73 -0
- package/dist/common/directives/navigation/stack-utils.js.map +1 -0
- package/{common → dist/common}/directives/navigation/tabs.d.ts +9 -1
- package/dist/common/directives/navigation/tabs.js +290 -0
- package/dist/common/directives/navigation/tabs.js.map +1 -0
- package/{common → dist/common}/index.d.ts +1 -1
- package/dist/common/index.js +20 -0
- package/dist/common/index.js.map +1 -0
- package/{common → dist/common}/overlays/modal.d.ts +1 -1
- package/dist/common/overlays/modal.js +96 -0
- package/dist/common/overlays/modal.js.map +1 -0
- package/{common → dist/common}/overlays/popover.d.ts +1 -1
- package/dist/common/overlays/popover.js +84 -0
- package/dist/common/overlays/popover.js.map +1 -0
- package/{common → dist/common}/providers/angular-delegate.d.ts +2 -2
- package/dist/common/providers/angular-delegate.js +229 -0
- package/dist/common/providers/angular-delegate.js.map +1 -0
- package/dist/common/providers/config.js +44 -0
- package/dist/common/providers/config.js.map +1 -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.js +114 -0
- package/dist/common/providers/menu-controller.js.map +1 -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.js +256 -0
- package/dist/common/providers/platform.js.map +1 -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.js +5 -0
- package/dist/common/types/ionic-lifecycle-hooks.js.map +1 -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.js +26 -0
- package/dist/common/utils/overlay.js.map +1 -0
- package/dist/common/utils/proxy.js +47 -0
- package/dist/common/utils/proxy.js.map +1 -0
- package/dist/common/utils/routing.js +55 -0
- package/dist/common/utils/routing.js.map +1 -0
- package/dist/common/utils/util.js +10 -0
- package/dist/common/utils/util.js.map +1 -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.js +59 -0
- package/dist/lazy/directives/angular-component-lib/utils.js.map +1 -0
- package/{directives → dist/lazy/directives}/control-value-accessors/boolean-value-accessor.d.ts +1 -1
- 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.js +5 -0
- package/dist/lazy/directives/control-value-accessors/index.js.map +1 -0
- package/{directives → dist/lazy/directives}/control-value-accessors/numeric-value-accessor.d.ts +1 -1
- 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/{directives → dist/lazy/directives}/control-value-accessors/select-value-accessor.d.ts +1 -1
- 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/{directives → dist/lazy/directives}/control-value-accessors/text-value-accessor.d.ts +1 -1
- 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.js +24 -0
- package/dist/lazy/directives/navigation/ion-back-button.js.map +1 -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.js +52 -0
- package/dist/lazy/directives/navigation/ion-router-outlet.js.map +1 -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.js +32 -0
- package/dist/lazy/directives/navigation/router-link-delegate.js.map +1 -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.js +18 -0
- package/dist/lazy/directives/overlays/popover.js.map +1 -0
- package/{directives → dist/lazy/directives}/proxies-list.d.ts +1 -1
- package/dist/lazy/directives/proxies-list.js +89 -0
- package/dist/lazy/directives/proxies-list.js.map +1 -0
- package/{directives → dist/lazy/directives}/proxies.d.ts +290 -191
- package/dist/lazy/directives/proxies.js +2759 -0
- package/dist/lazy/directives/proxies.js.map +1 -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.js +26 -0
- package/dist/lazy/directives/validators/max-validator.js.map +1 -0
- package/dist/lazy/directives/validators/min-validator.js +26 -0
- package/dist/lazy/directives/validators/min-validator.js.map +1 -0
- package/{index.d.ts → dist/lazy/index.d.ts} +1 -2
- 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.js +18 -0
- package/dist/lazy/providers/action-sheet-controller.js.map +1 -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.js +37 -0
- package/dist/lazy/providers/animation-controller.js.map +1 -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.js +18 -0
- package/dist/lazy/providers/loading-controller.js.map +1 -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.js +25 -0
- package/dist/lazy/providers/modal-controller.js.map +1 -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.js +18 -0
- package/dist/lazy/providers/toast-controller.js.map +1 -0
- package/{schematics → dist/schematics}/add/index.js +6 -6
- package/dist/schematics/utils/ast.js +64 -0
- package/{schematics → dist/schematics}/utils/config.js +10 -11
- package/{schematics → dist/schematics}/utils/package.js +6 -4
- 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.js +75 -0
- package/dist/standalone/directives/checkbox.js.map +1 -0
- package/dist/standalone/directives/datetime.js +93 -0
- package/dist/standalone/directives/datetime.js.map +1 -0
- package/dist/standalone/directives/icon.js +35 -0
- package/dist/standalone/directives/icon.js.map +1 -0
- package/dist/standalone/directives/index.js +13 -0
- package/dist/standalone/directives/index.js.map +1 -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.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.js +59 -0
- package/dist/standalone/directives/radio-group.js.map +1 -0
- package/dist/standalone/directives/range.js +77 -0
- package/dist/standalone/directives/range.js.map +1 -0
- package/dist/standalone/directives/searchbar.js +81 -0
- package/dist/standalone/directives/searchbar.js.map +1 -0
- package/dist/standalone/directives/segment.js +59 -0
- package/dist/standalone/directives/segment.js.map +1 -0
- package/dist/standalone/directives/select.js +83 -0
- package/dist/standalone/directives/select.js.map +1 -0
- package/dist/standalone/directives/textarea.js +90 -0
- package/dist/standalone/directives/textarea.js.map +1 -0
- package/dist/standalone/directives/toggle.js +75 -0
- package/dist/standalone/directives/toggle.js.map +1 -0
- package/{standalone → dist/standalone}/index.d.ts +1 -2
- package/dist/standalone/index.js +24 -0
- package/dist/standalone/index.js.map +1 -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.js +28 -0
- package/dist/standalone/navigation/nav.js.map +1 -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.js +60 -0
- package/dist/standalone/navigation/router-outlet.js.map +1 -0
- package/dist/standalone/navigation/tabs.js +57 -0
- package/dist/standalone/navigation/tabs.js.map +1 -0
- package/dist/standalone/overlays/modal.js +32 -0
- package/dist/standalone/overlays/modal.js.map +1 -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.js +20 -0
- package/dist/standalone/providers/action-sheet-controller.js.map +1 -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.js +37 -0
- package/dist/standalone/providers/animation-controller.js.map +1 -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.js +38 -0
- package/dist/standalone/providers/ionic-angular.js.map +1 -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.js +18 -0
- package/dist/standalone/providers/menu-controller.js.map +1 -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.js +21 -0
- package/dist/standalone/providers/popover-controller.js.map +1 -0
- package/dist/standalone/providers/toast-controller.js +20 -0
- package/dist/standalone/providers/toast-controller.js.map +1 -0
- package/package.json +172 -30
- package/esm2022/app-initialize.mjs +0 -29
- package/esm2022/common/directives/control-value-accessors/index.mjs +0 -2
- package/esm2022/common/directives/control-value-accessors/value-accessor.mjs +0 -153
- package/esm2022/common/directives/navigation/back-button.mjs +0 -61
- package/esm2022/common/directives/navigation/nav-params.mjs +0 -47
- package/esm2022/common/directives/navigation/nav.mjs +0 -49
- package/esm2022/common/directives/navigation/router-link-delegate.mjs +0 -190
- package/esm2022/common/directives/navigation/router-outlet.mjs +0 -480
- package/esm2022/common/directives/navigation/stack-controller.mjs +0 -283
- package/esm2022/common/directives/navigation/stack-utils.mjs +0 -73
- package/esm2022/common/directives/navigation/tabs.mjs +0 -279
- package/esm2022/common/index.mjs +0 -20
- package/esm2022/common/ionic-angular-common.mjs +0 -5
- package/esm2022/common/overlays/modal.mjs +0 -103
- package/esm2022/common/overlays/popover.mjs +0 -91
- package/esm2022/common/providers/angular-delegate.mjs +0 -210
- package/esm2022/common/providers/config.mjs +0 -45
- package/esm2022/common/providers/dom-controller.mjs +0 -45
- package/esm2022/common/providers/menu-controller.mjs +0 -114
- package/esm2022/common/providers/nav-controller.mjs +0 -235
- package/esm2022/common/providers/platform.mjs +0 -258
- package/esm2022/common/types/interfaces.mjs +0 -2
- package/esm2022/common/types/ionic-lifecycle-hooks.mjs +0 -5
- package/esm2022/common/types/overlay-options.mjs +0 -2
- package/esm2022/common/utils/overlay.mjs +0 -26
- package/esm2022/common/utils/proxy.mjs +0 -47
- package/esm2022/common/utils/routing.mjs +0 -55
- package/esm2022/common/utils/util.mjs +0 -10
- package/esm2022/directives/angular-component-lib/utils.mjs +0 -59
- package/esm2022/directives/control-value-accessors/boolean-value-accessor.mjs +0 -42
- package/esm2022/directives/control-value-accessors/index.mjs +0 -5
- package/esm2022/directives/control-value-accessors/numeric-value-accessor.mjs +0 -50
- package/esm2022/directives/control-value-accessors/select-value-accessor.mjs +0 -39
- package/esm2022/directives/control-value-accessors/text-value-accessor.mjs +0 -38
- package/esm2022/directives/navigation/ion-back-button.mjs +0 -24
- package/esm2022/directives/navigation/ion-nav.mjs +0 -21
- package/esm2022/directives/navigation/ion-router-outlet.mjs +0 -52
- package/esm2022/directives/navigation/ion-tabs.mjs +0 -59
- package/esm2022/directives/navigation/router-link-delegate.mjs +0 -32
- package/esm2022/directives/overlays/modal.mjs +0 -22
- package/esm2022/directives/overlays/popover.mjs +0 -18
- package/esm2022/directives/proxies-list.mjs +0 -90
- package/esm2022/directives/proxies.mjs +0 -2373
- package/esm2022/directives/validators/index.mjs +0 -3
- package/esm2022/directives/validators/max-validator.mjs +0 -27
- package/esm2022/directives/validators/min-validator.mjs +0 -27
- package/esm2022/index.mjs +0 -32
- package/esm2022/ionic-angular.mjs +0 -5
- package/esm2022/ionic-module.mjs +0 -111
- package/esm2022/providers/action-sheet-controller.mjs +0 -19
- package/esm2022/providers/alert-controller.mjs +0 -19
- package/esm2022/providers/animation-controller.mjs +0 -38
- package/esm2022/providers/gesture-controller.mjs +0 -33
- package/esm2022/providers/loading-controller.mjs +0 -19
- package/esm2022/providers/menu-controller.mjs +0 -19
- package/esm2022/providers/modal-controller.mjs +0 -26
- package/esm2022/providers/picker-controller.mjs +0 -22
- package/esm2022/providers/popover-controller.mjs +0 -19
- package/esm2022/providers/toast-controller.mjs +0 -19
- package/esm2022/standalone/directives/angular-component-lib/utils.mjs +0 -59
- package/esm2022/standalone/directives/checkbox.mjs +0 -76
- package/esm2022/standalone/directives/datetime.mjs +0 -95
- package/esm2022/standalone/directives/icon.mjs +0 -35
- package/esm2022/standalone/directives/index.mjs +0 -13
- package/esm2022/standalone/directives/input-otp.mjs +0 -90
- package/esm2022/standalone/directives/input.mjs +0 -113
- package/esm2022/standalone/directives/proxies.mjs +0 -2260
- package/esm2022/standalone/directives/radio-group.mjs +0 -60
- package/esm2022/standalone/directives/range.mjs +0 -78
- package/esm2022/standalone/directives/searchbar.mjs +0 -82
- package/esm2022/standalone/directives/segment.mjs +0 -60
- package/esm2022/standalone/directives/select.mjs +0 -84
- package/esm2022/standalone/directives/textarea.mjs +0 -91
- package/esm2022/standalone/directives/toggle.mjs +0 -76
- package/esm2022/standalone/index.mjs +0 -25
- package/esm2022/standalone/ionic-angular-standalone.mjs +0 -5
- package/esm2022/standalone/navigation/back-button.mjs +0 -32
- package/esm2022/standalone/navigation/nav.mjs +0 -28
- package/esm2022/standalone/navigation/router-link-delegate.mjs +0 -28
- package/esm2022/standalone/navigation/router-outlet.mjs +0 -60
- package/esm2022/standalone/navigation/tabs.mjs +0 -58
- package/esm2022/standalone/overlays/modal.mjs +0 -32
- package/esm2022/standalone/overlays/popover.mjs +0 -28
- package/esm2022/standalone/providers/action-sheet-controller.mjs +0 -21
- package/esm2022/standalone/providers/alert-controller.mjs +0 -21
- package/esm2022/standalone/providers/animation-controller.mjs +0 -38
- package/esm2022/standalone/providers/gesture-controller.mjs +0 -33
- package/esm2022/standalone/providers/ionic-angular.mjs +0 -38
- package/esm2022/standalone/providers/loading-controller.mjs +0 -21
- package/esm2022/standalone/providers/menu-controller.mjs +0 -19
- package/esm2022/standalone/providers/modal-controller.mjs +0 -28
- package/esm2022/standalone/providers/picker-controller.mjs +0 -24
- package/esm2022/standalone/providers/popover-controller.mjs +0 -21
- package/esm2022/standalone/providers/toast-controller.mjs +0 -21
- package/fesm2022/ionic-angular-common.mjs +0 -2791
- package/fesm2022/ionic-angular-common.mjs.map +0 -1
- package/fesm2022/ionic-angular-standalone.mjs +0 -3562
- package/fesm2022/ionic-angular-standalone.mjs.map +0 -1
- package/fesm2022/ionic-angular.mjs +0 -3139
- package/fesm2022/ionic-angular.mjs.map +0 -1
- package/ionic-module.d.ts +0 -28
- package/providers/picker-controller.d.ts +0 -11
- package/schematics/utils/ast.js +0 -32
- package/standalone/directives/proxies.d.ts +0 -1035
- package/standalone/providers/picker-controller.d.ts +0 -11
- /package/{common → dist/common}/directives/control-value-accessors/index.d.ts +0 -0
- /package/{common → dist/common}/directives/navigation/nav-params.d.ts +0 -0
- /package/{common → dist/common}/directives/navigation/stack-controller.d.ts +0 -0
- /package/{common → dist/common}/directives/navigation/stack-utils.d.ts +0 -0
- /package/{common → dist/common}/providers/config.d.ts +0 -0
- /package/{common → dist/common}/providers/dom-controller.d.ts +0 -0
- /package/{common → dist/common}/providers/menu-controller.d.ts +0 -0
- /package/{common → dist/common}/providers/nav-controller.d.ts +0 -0
- /package/{common → dist/common}/providers/platform.d.ts +0 -0
- /package/{common → dist/common}/types/interfaces.d.ts +0 -0
- /package/{common → dist/common}/types/ionic-lifecycle-hooks.d.ts +0 -0
- /package/{common → dist/common}/types/overlay-options.d.ts +0 -0
- /package/{common → dist/common}/utils/overlay.d.ts +0 -0
- /package/{common → dist/common}/utils/proxy.d.ts +0 -0
- /package/{common → dist/common}/utils/routing.d.ts +0 -0
- /package/{common → dist/common}/utils/util.d.ts +0 -0
- /package/{app-initialize.d.ts → dist/lazy/app-initialize.d.ts} +0 -0
- /package/{directives → dist/lazy/directives}/angular-component-lib/utils.d.ts +0 -0
- /package/{directives → dist/lazy/directives}/control-value-accessors/index.d.ts +0 -0
- /package/{directives → dist/lazy/directives}/navigation/ion-back-button.d.ts +0 -0
- /package/{directives → dist/lazy/directives}/navigation/ion-nav.d.ts +0 -0
- /package/{directives → dist/lazy/directives}/navigation/ion-router-outlet.d.ts +0 -0
- /package/{directives → dist/lazy/directives}/navigation/ion-tabs.d.ts +0 -0
- /package/{directives → dist/lazy/directives}/navigation/router-link-delegate.d.ts +0 -0
- /package/{directives → dist/lazy/directives}/overlays/modal.d.ts +0 -0
- /package/{directives → dist/lazy/directives}/overlays/popover.d.ts +0 -0
- /package/{directives → dist/lazy/directives}/validators/index.d.ts +0 -0
- /package/{directives → dist/lazy/directives}/validators/max-validator.d.ts +0 -0
- /package/{directives → dist/lazy/directives}/validators/min-validator.d.ts +0 -0
- /package/{providers → dist/lazy/providers}/action-sheet-controller.d.ts +0 -0
- /package/{providers → dist/lazy/providers}/alert-controller.d.ts +0 -0
- /package/{providers → dist/lazy/providers}/animation-controller.d.ts +0 -0
- /package/{providers → dist/lazy/providers}/gesture-controller.d.ts +0 -0
- /package/{providers → dist/lazy/providers}/loading-controller.d.ts +0 -0
- /package/{providers → dist/lazy/providers}/menu-controller.d.ts +0 -0
- /package/{providers → dist/lazy/providers}/modal-controller.d.ts +0 -0
- /package/{providers → dist/lazy/providers}/popover-controller.d.ts +0 -0
- /package/{providers → dist/lazy/providers}/toast-controller.d.ts +0 -0
- /package/{schematics → dist/schematics}/add/files/root/theme/variables.css +0 -0
- /package/{schematics → dist/schematics}/add/schema.json +0 -0
- /package/{schematics → dist/schematics}/collection.json +0 -0
- /package/{standalone → dist/standalone}/directives/angular-component-lib/utils.d.ts +0 -0
- /package/{standalone → dist/standalone}/directives/checkbox.d.ts +0 -0
- /package/{standalone → dist/standalone}/directives/datetime.d.ts +0 -0
- /package/{standalone → dist/standalone}/directives/icon.d.ts +0 -0
- /package/{standalone → dist/standalone}/directives/index.d.ts +0 -0
- /package/{standalone → dist/standalone}/directives/input-otp.d.ts +0 -0
- /package/{standalone → dist/standalone}/directives/input.d.ts +0 -0
- /package/{standalone → dist/standalone}/directives/radio-group.d.ts +0 -0
- /package/{standalone → dist/standalone}/directives/range.d.ts +0 -0
- /package/{standalone → dist/standalone}/directives/searchbar.d.ts +0 -0
- /package/{standalone → dist/standalone}/directives/segment.d.ts +0 -0
- /package/{standalone → dist/standalone}/directives/select.d.ts +0 -0
- /package/{standalone → dist/standalone}/directives/textarea.d.ts +0 -0
- /package/{standalone → dist/standalone}/directives/toggle.d.ts +0 -0
- /package/{standalone → dist/standalone}/navigation/back-button.d.ts +0 -0
- /package/{standalone → dist/standalone}/navigation/nav.d.ts +0 -0
- /package/{standalone → dist/standalone}/navigation/router-link-delegate.d.ts +0 -0
- /package/{standalone → dist/standalone}/navigation/router-outlet.d.ts +0 -0
- /package/{standalone → dist/standalone}/navigation/tabs.d.ts +0 -0
- /package/{standalone → dist/standalone}/overlays/modal.d.ts +0 -0
- /package/{standalone → dist/standalone}/overlays/popover.d.ts +0 -0
- /package/{standalone → dist/standalone}/providers/action-sheet-controller.d.ts +0 -0
- /package/{standalone → dist/standalone}/providers/alert-controller.d.ts +0 -0
- /package/{standalone → dist/standalone}/providers/animation-controller.d.ts +0 -0
- /package/{standalone → dist/standalone}/providers/gesture-controller.d.ts +0 -0
- /package/{standalone → dist/standalone}/providers/ionic-angular.d.ts +0 -0
- /package/{standalone → dist/standalone}/providers/loading-controller.d.ts +0 -0
- /package/{standalone → dist/standalone}/providers/menu-controller.d.ts +0 -0
- /package/{standalone → dist/standalone}/providers/modal-controller.d.ts +0 -0
- /package/{standalone → dist/standalone}/providers/popover-controller.d.ts +0 -0
- /package/{standalone → dist/standalone}/providers/toast-controller.d.ts +0 -0
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { ApplicationRef, createComponent, inject, Injectable, InjectionToken, Injector, NgZone, } from '@angular/core';
|
|
2
|
+
import { LIFECYCLE_DID_ENTER, LIFECYCLE_DID_LEAVE, LIFECYCLE_WILL_ENTER, LIFECYCLE_WILL_LEAVE, LIFECYCLE_WILL_UNLOAD, } from '@ionic/core/components';
|
|
3
|
+
import { NavParams } from '../directives/navigation/nav-params';
|
|
4
|
+
import { ConfigToken } from './config';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
// Token for injecting the modal element
|
|
7
|
+
export const IonModalToken = new InjectionToken('IonModalToken');
|
|
8
|
+
// TODO(FW-2827): types
|
|
9
|
+
export class AngularDelegate {
|
|
10
|
+
zone = inject(NgZone);
|
|
11
|
+
applicationRef = inject(ApplicationRef);
|
|
12
|
+
config = inject(ConfigToken);
|
|
13
|
+
create(environmentInjector, injector, elementReferenceKey, customInjector) {
|
|
14
|
+
return new AngularFrameworkDelegate(environmentInjector, injector, this.applicationRef, this.zone, elementReferenceKey, this.config.useSetInputAPI ?? false, customInjector);
|
|
15
|
+
}
|
|
16
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: AngularDelegate, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
17
|
+
/** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: AngularDelegate });
|
|
18
|
+
}
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: AngularDelegate, decorators: [{
|
|
20
|
+
type: Injectable
|
|
21
|
+
}] });
|
|
22
|
+
export class AngularFrameworkDelegate {
|
|
23
|
+
environmentInjector;
|
|
24
|
+
injector;
|
|
25
|
+
applicationRef;
|
|
26
|
+
zone;
|
|
27
|
+
elementReferenceKey;
|
|
28
|
+
enableSignalsSupport;
|
|
29
|
+
customInjector;
|
|
30
|
+
elRefMap = new WeakMap();
|
|
31
|
+
elEventsMap = new WeakMap();
|
|
32
|
+
constructor(environmentInjector, injector, applicationRef, zone, elementReferenceKey, enableSignalsSupport, customInjector) {
|
|
33
|
+
this.environmentInjector = environmentInjector;
|
|
34
|
+
this.injector = injector;
|
|
35
|
+
this.applicationRef = applicationRef;
|
|
36
|
+
this.zone = zone;
|
|
37
|
+
this.elementReferenceKey = elementReferenceKey;
|
|
38
|
+
this.enableSignalsSupport = enableSignalsSupport;
|
|
39
|
+
this.customInjector = customInjector;
|
|
40
|
+
}
|
|
41
|
+
attachViewToDom(container, component, params, cssClasses) {
|
|
42
|
+
return this.zone.run(() => {
|
|
43
|
+
return new Promise((resolve) => {
|
|
44
|
+
const componentProps = {
|
|
45
|
+
...params,
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Ionic Angular passes a reference to a modal
|
|
49
|
+
* or popover that can be accessed using a
|
|
50
|
+
* variable in the overlay component. If
|
|
51
|
+
* elementReferenceKey is defined, then we should
|
|
52
|
+
* pass a reference to the component using
|
|
53
|
+
* elementReferenceKey as the key.
|
|
54
|
+
*/
|
|
55
|
+
if (this.elementReferenceKey !== undefined) {
|
|
56
|
+
componentProps[this.elementReferenceKey] = container;
|
|
57
|
+
}
|
|
58
|
+
const el = attachView(this.zone, this.environmentInjector, this.injector, this.applicationRef, this.elRefMap, this.elEventsMap, container, component, componentProps, cssClasses, this.elementReferenceKey, this.enableSignalsSupport, this.customInjector);
|
|
59
|
+
resolve(el);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
removeViewFromDom(_container, component) {
|
|
64
|
+
return this.zone.run(() => {
|
|
65
|
+
return new Promise((resolve) => {
|
|
66
|
+
const componentRef = this.elRefMap.get(component);
|
|
67
|
+
if (componentRef) {
|
|
68
|
+
componentRef.destroy();
|
|
69
|
+
this.elRefMap.delete(component);
|
|
70
|
+
const unbindEvents = this.elEventsMap.get(component);
|
|
71
|
+
if (unbindEvents) {
|
|
72
|
+
unbindEvents();
|
|
73
|
+
this.elEventsMap.delete(component);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
resolve();
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
export const attachView = (zone, environmentInjector, injector, applicationRef, elRefMap, elEventsMap, container, component, params, cssClasses, elementReferenceKey, enableSignalsSupport, customInjector) => {
|
|
82
|
+
/**
|
|
83
|
+
* Wraps the injector with a custom injector that
|
|
84
|
+
* provides NavParams to the component.
|
|
85
|
+
*
|
|
86
|
+
* NavParams is a legacy feature from Ionic v3 that allows
|
|
87
|
+
* Angular developers to provide data to a component
|
|
88
|
+
* and access it by providing NavParams as a dependency
|
|
89
|
+
* in the constructor.
|
|
90
|
+
*
|
|
91
|
+
* The modern approach is to access the data directly
|
|
92
|
+
* from the component's class instance.
|
|
93
|
+
*/
|
|
94
|
+
const providers = getProviders(params);
|
|
95
|
+
// If this is an ion-modal, provide the modal element as an injectable
|
|
96
|
+
// so components inside the modal can inject it directly
|
|
97
|
+
if (container.tagName.toLowerCase() === 'ion-modal') {
|
|
98
|
+
providers.push({
|
|
99
|
+
provide: IonModalToken,
|
|
100
|
+
useValue: container,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
const childInjector = Injector.create({
|
|
104
|
+
providers,
|
|
105
|
+
parent: customInjector ?? injector,
|
|
106
|
+
});
|
|
107
|
+
const componentRef = createComponent(component, {
|
|
108
|
+
environmentInjector,
|
|
109
|
+
elementInjector: childInjector,
|
|
110
|
+
});
|
|
111
|
+
const instance = componentRef.instance;
|
|
112
|
+
const hostElement = componentRef.location.nativeElement;
|
|
113
|
+
if (params) {
|
|
114
|
+
/**
|
|
115
|
+
* For modals and popovers, a reference to the component is
|
|
116
|
+
* added to `params` during the call to attachViewToDom. If
|
|
117
|
+
* a reference using this name is already set, this means
|
|
118
|
+
* the app is trying to use the name as a component prop,
|
|
119
|
+
* which will cause collisions.
|
|
120
|
+
*/
|
|
121
|
+
if (elementReferenceKey && instance[elementReferenceKey] !== undefined) {
|
|
122
|
+
console.error(`[Ionic Error]: ${elementReferenceKey} is a reserved property when using ${container.tagName.toLowerCase()}. Rename or remove the "${elementReferenceKey}" property from ${component.name}.`);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Angular 14.1 added support for setInput
|
|
126
|
+
* so we need to fall back to Object.assign
|
|
127
|
+
* for Angular 14.0.
|
|
128
|
+
*/
|
|
129
|
+
if (enableSignalsSupport === true && componentRef.setInput !== undefined) {
|
|
130
|
+
const { modal, popover, ...otherParams } = params;
|
|
131
|
+
/**
|
|
132
|
+
* Any key/value pairs set in componentProps
|
|
133
|
+
* must be set as inputs on the component instance.
|
|
134
|
+
*/
|
|
135
|
+
for (const key in otherParams) {
|
|
136
|
+
componentRef.setInput(key, otherParams[key]);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Using setInput will cause an error when
|
|
140
|
+
* setting modal/popover on a component that
|
|
141
|
+
* does not define them as an input. For backwards
|
|
142
|
+
* compatibility purposes we fall back to using
|
|
143
|
+
* Object.assign for these properties.
|
|
144
|
+
*/
|
|
145
|
+
if (modal !== undefined) {
|
|
146
|
+
Object.assign(instance, { modal });
|
|
147
|
+
}
|
|
148
|
+
if (popover !== undefined) {
|
|
149
|
+
Object.assign(instance, { popover });
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
Object.assign(instance, params);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (cssClasses) {
|
|
157
|
+
for (const cssClass of cssClasses) {
|
|
158
|
+
hostElement.classList.add(cssClass);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
const unbindEvents = bindLifecycleEvents(zone, componentRef.changeDetectorRef, instance, hostElement);
|
|
162
|
+
container.appendChild(hostElement);
|
|
163
|
+
applicationRef.attachView(componentRef.hostView);
|
|
164
|
+
/**
|
|
165
|
+
* Run change detection on the freshly attached view so Angular's init hooks
|
|
166
|
+
* (`ngOnInit`, `ngAfterViewInit`) fire and template bindings (e.g.
|
|
167
|
+
* `<ion-nav [root]="rootPage">`) apply during this synchronous pass, before the
|
|
168
|
+
* web component runs its load lifecycle and dispatches its Ionic lifecycle events
|
|
169
|
+
* (`ionViewWillEnter`, etc.). `createComponent` only runs the creation pass; the
|
|
170
|
+
* init hooks and binding updates run during an update pass. Under Zone.js an
|
|
171
|
+
* implicit tick used to cover this, but zoneless Angular schedules no such tick,
|
|
172
|
+
* so without this the binding could land after the element has loaded (too late
|
|
173
|
+
* for `ion-nav` to read it) and the first `ionViewWillEnter` could run before
|
|
174
|
+
* `ngOnInit`.
|
|
175
|
+
*/
|
|
176
|
+
componentRef.changeDetectorRef.detectChanges();
|
|
177
|
+
elRefMap.set(hostElement, componentRef);
|
|
178
|
+
elEventsMap.set(hostElement, unbindEvents);
|
|
179
|
+
return hostElement;
|
|
180
|
+
};
|
|
181
|
+
const LIFECYCLES = [
|
|
182
|
+
LIFECYCLE_WILL_ENTER,
|
|
183
|
+
LIFECYCLE_DID_ENTER,
|
|
184
|
+
LIFECYCLE_WILL_LEAVE,
|
|
185
|
+
LIFECYCLE_DID_LEAVE,
|
|
186
|
+
LIFECYCLE_WILL_UNLOAD,
|
|
187
|
+
];
|
|
188
|
+
export const bindLifecycleEvents = (zone, changeDetectorRef, instance, element) => {
|
|
189
|
+
/**
|
|
190
|
+
* `zone.run` keeps the listener registration (and, under Zone.js, the handler
|
|
191
|
+
* execution) inside the Angular zone, so async work started inside a lifecycle
|
|
192
|
+
* hook is still zone-tracked. Under zoneless Angular it is a passthrough.
|
|
193
|
+
*/
|
|
194
|
+
return zone.run(() => {
|
|
195
|
+
const unregisters = LIFECYCLES.filter((eventName) => typeof instance[eventName] === 'function').map((eventName) => {
|
|
196
|
+
const handler = (ev) => {
|
|
197
|
+
instance[eventName](ev.detail);
|
|
198
|
+
/**
|
|
199
|
+
* Ionic lifecycle events (`ionViewWillEnter`, etc.) are dispatched from
|
|
200
|
+
* the web component via a native event listener, so under zoneless
|
|
201
|
+
* Angular nothing schedules change detection for state the hook mutates.
|
|
202
|
+
* Mark the view dirty explicitly. This is a no-op-or-better under Zone.js.
|
|
203
|
+
*/
|
|
204
|
+
changeDetectorRef.markForCheck();
|
|
205
|
+
};
|
|
206
|
+
element.addEventListener(eventName, handler);
|
|
207
|
+
return () => element.removeEventListener(eventName, handler);
|
|
208
|
+
});
|
|
209
|
+
return () => unregisters.forEach((fn) => fn());
|
|
210
|
+
});
|
|
211
|
+
};
|
|
212
|
+
const NavParamsToken = new InjectionToken('NavParamsToken');
|
|
213
|
+
const getProviders = (params) => {
|
|
214
|
+
return [
|
|
215
|
+
{
|
|
216
|
+
provide: NavParamsToken,
|
|
217
|
+
useValue: params,
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
provide: NavParams,
|
|
221
|
+
useFactory: provideNavParamsInjectable,
|
|
222
|
+
deps: [NavParamsToken],
|
|
223
|
+
},
|
|
224
|
+
];
|
|
225
|
+
};
|
|
226
|
+
const provideNavParamsInjectable = (params) => {
|
|
227
|
+
return new NavParams(params);
|
|
228
|
+
};
|
|
229
|
+
//# sourceMappingURL=angular-delegate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"angular-delegate.js","sourceRoot":"","sources":["../../../src/common/providers/angular-delegate.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAGd,eAAe,EAEf,MAAM,EACN,UAAU,EACV,cAAc,EACd,QAAQ,EACR,MAAM,GACP,MAAM,eAAe,CA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,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,IAAI,cAAc,CAAM,gBAAgB,CAAC,CAAC;AAEjE,MAAM,YAAY,GAAG,CAAC,MAA8B,EAAE,EAAE;IACtD,OAAO;QACL;YACE,OAAO,EAAE,cAAc;YACvB,QAAQ,EAAE,MAAM;SACjB;QACD;YACE,OAAO,EAAE,SAAS;YAClB,UAAU,EAAE,0BAA0B;YACtC,IAAI,EAAE,CAAC,cAAc,CAAC;SACvB;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,CAAC,MAA8B,EAAE,EAAE;IACpE,OAAO,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC,CAAC","sourcesContent":["import {\n ApplicationRef,\n ChangeDetectorRef,\n ComponentRef,\n createComponent,\n EnvironmentInjector,\n inject,\n Injectable,\n InjectionToken,\n Injector,\n NgZone,\n} from '@angular/core';\nimport {\n FrameworkDelegate,\n LIFECYCLE_DID_ENTER,\n LIFECYCLE_DID_LEAVE,\n LIFECYCLE_WILL_ENTER,\n LIFECYCLE_WILL_LEAVE,\n LIFECYCLE_WILL_UNLOAD,\n} from '@ionic/core/components';\n\nimport { NavParams } from '../directives/navigation/nav-params';\n\nimport { ConfigToken } from './config';\n\n// Token for injecting the modal element\nexport const IonModalToken = new InjectionToken<HTMLIonModalElement>('IonModalToken');\n\n// TODO(FW-2827): types\n\n@Injectable()\nexport class AngularDelegate {\n private zone = inject(NgZone);\n private applicationRef = inject(ApplicationRef);\n private config = inject(ConfigToken);\n\n create(\n environmentInjector: EnvironmentInjector,\n injector: Injector,\n elementReferenceKey?: string,\n customInjector?: Injector\n ): AngularFrameworkDelegate {\n return new AngularFrameworkDelegate(\n environmentInjector,\n injector,\n this.applicationRef,\n this.zone,\n elementReferenceKey,\n this.config.useSetInputAPI ?? false,\n customInjector\n );\n }\n}\n\nexport class AngularFrameworkDelegate implements FrameworkDelegate {\n private elRefMap = new WeakMap<HTMLElement, ComponentRef<any>>();\n private elEventsMap = new WeakMap<HTMLElement, () => void>();\n\n constructor(\n private environmentInjector: EnvironmentInjector,\n private injector: Injector,\n private applicationRef: ApplicationRef,\n private zone: NgZone,\n private elementReferenceKey?: string,\n private enableSignalsSupport?: boolean,\n private customInjector?: Injector\n ) {}\n\n attachViewToDom(container: any, component: any, params?: any, cssClasses?: string[]): Promise<any> {\n return this.zone.run(() => {\n return new Promise((resolve) => {\n const componentProps = {\n ...params,\n };\n\n /**\n * Ionic Angular passes a reference to a modal\n * or popover that can be accessed using a\n * variable in the overlay component. If\n * elementReferenceKey is defined, then we should\n * pass a reference to the component using\n * elementReferenceKey as the key.\n */\n if (this.elementReferenceKey !== undefined) {\n componentProps[this.elementReferenceKey] = container;\n }\n\n const el = attachView(\n this.zone,\n this.environmentInjector,\n this.injector,\n this.applicationRef,\n this.elRefMap,\n this.elEventsMap,\n container,\n component,\n componentProps,\n cssClasses,\n this.elementReferenceKey,\n this.enableSignalsSupport,\n this.customInjector\n );\n resolve(el);\n });\n });\n }\n\n removeViewFromDom(_container: any, component: any): Promise<void> {\n return this.zone.run(() => {\n return new Promise((resolve) => {\n const componentRef = this.elRefMap.get(component);\n if (componentRef) {\n componentRef.destroy();\n this.elRefMap.delete(component);\n const unbindEvents = this.elEventsMap.get(component);\n if (unbindEvents) {\n unbindEvents();\n this.elEventsMap.delete(component);\n }\n }\n resolve();\n });\n });\n }\n}\n\nexport const attachView = (\n zone: NgZone,\n environmentInjector: EnvironmentInjector,\n injector: Injector,\n applicationRef: ApplicationRef,\n elRefMap: WeakMap<HTMLElement, ComponentRef<any>>,\n elEventsMap: WeakMap<HTMLElement, () => void>,\n container: any,\n component: any,\n params: any,\n cssClasses: string[] | undefined,\n elementReferenceKey: string | undefined,\n enableSignalsSupport: boolean | undefined,\n customInjector?: Injector\n): any => {\n /**\n * Wraps the injector with a custom injector that\n * provides NavParams to the component.\n *\n * NavParams is a legacy feature from Ionic v3 that allows\n * Angular developers to provide data to a component\n * and access it by providing NavParams as a dependency\n * in the constructor.\n *\n * The modern approach is to access the data directly\n * from the component's class instance.\n */\n const providers = getProviders(params);\n\n // If this is an ion-modal, provide the modal element as an injectable\n // so components inside the modal can inject it directly\n if (container.tagName.toLowerCase() === 'ion-modal') {\n providers.push({\n provide: IonModalToken,\n useValue: container,\n });\n }\n\n const childInjector = Injector.create({\n providers,\n parent: customInjector ?? injector,\n });\n\n const componentRef = createComponent<any>(component, {\n environmentInjector,\n elementInjector: childInjector,\n });\n\n const instance = componentRef.instance;\n const hostElement = componentRef.location.nativeElement;\n\n if (params) {\n /**\n * For modals and popovers, a reference to the component is\n * added to `params` during the call to attachViewToDom. If\n * a reference using this name is already set, this means\n * the app is trying to use the name as a component prop,\n * which will cause collisions.\n */\n if (elementReferenceKey && instance[elementReferenceKey] !== undefined) {\n console.error(\n `[Ionic Error]: ${elementReferenceKey} is a reserved property when using ${container.tagName.toLowerCase()}. Rename or remove the \"${elementReferenceKey}\" property from ${\n component.name\n }.`\n );\n }\n\n /**\n * Angular 14.1 added support for setInput\n * so we need to fall back to Object.assign\n * for Angular 14.0.\n */\n if (enableSignalsSupport === true && componentRef.setInput !== undefined) {\n const { modal, popover, ...otherParams } = params;\n /**\n * Any key/value pairs set in componentProps\n * must be set as inputs on the component instance.\n */\n for (const key in otherParams) {\n componentRef.setInput(key, otherParams[key]);\n }\n\n /**\n * Using setInput will cause an error when\n * setting modal/popover on a component that\n * does not define them as an input. For backwards\n * compatibility purposes we fall back to using\n * Object.assign for these properties.\n */\n if (modal !== undefined) {\n Object.assign(instance, { modal });\n }\n\n if (popover !== undefined) {\n Object.assign(instance, { popover });\n }\n } else {\n Object.assign(instance, params);\n }\n }\n if (cssClasses) {\n for (const cssClass of cssClasses) {\n hostElement.classList.add(cssClass);\n }\n }\n const unbindEvents = bindLifecycleEvents(zone, componentRef.changeDetectorRef, instance, hostElement);\n container.appendChild(hostElement);\n\n applicationRef.attachView(componentRef.hostView);\n\n /**\n * Run change detection on the freshly attached view so Angular's init hooks\n * (`ngOnInit`, `ngAfterViewInit`) fire and template bindings (e.g.\n * `<ion-nav [root]=\"rootPage\">`) apply during this synchronous pass, before the\n * web component runs its load lifecycle and dispatches its Ionic lifecycle events\n * (`ionViewWillEnter`, etc.). `createComponent` only runs the creation pass; the\n * init hooks and binding updates run during an update pass. Under Zone.js an\n * implicit tick used to cover this, but zoneless Angular schedules no such tick,\n * so without this the binding could land after the element has loaded (too late\n * for `ion-nav` to read it) and the first `ionViewWillEnter` could run before\n * `ngOnInit`.\n */\n componentRef.changeDetectorRef.detectChanges();\n\n elRefMap.set(hostElement, componentRef);\n elEventsMap.set(hostElement, unbindEvents);\n return hostElement;\n};\n\nconst LIFECYCLES = [\n LIFECYCLE_WILL_ENTER,\n LIFECYCLE_DID_ENTER,\n LIFECYCLE_WILL_LEAVE,\n LIFECYCLE_DID_LEAVE,\n LIFECYCLE_WILL_UNLOAD,\n];\n\nexport const bindLifecycleEvents = (\n zone: NgZone,\n changeDetectorRef: ChangeDetectorRef,\n instance: any,\n element: HTMLElement\n): (() => void) => {\n /**\n * `zone.run` keeps the listener registration (and, under Zone.js, the handler\n * execution) inside the Angular zone, so async work started inside a lifecycle\n * hook is still zone-tracked. Under zoneless Angular it is a passthrough.\n */\n return zone.run(() => {\n const unregisters = LIFECYCLES.filter((eventName) => typeof instance[eventName] === 'function').map((eventName) => {\n const handler = (ev: any) => {\n instance[eventName](ev.detail);\n /**\n * Ionic lifecycle events (`ionViewWillEnter`, etc.) are dispatched from\n * the web component via a native event listener, so under zoneless\n * Angular nothing schedules change detection for state the hook mutates.\n * Mark the view dirty explicitly. This is a no-op-or-better under Zone.js.\n */\n changeDetectorRef.markForCheck();\n };\n element.addEventListener(eventName, handler);\n return () => element.removeEventListener(eventName, handler);\n });\n return () => unregisters.forEach((fn) => fn());\n });\n};\n\nconst NavParamsToken = new InjectionToken<any>('NavParamsToken');\n\nconst getProviders = (params: { [key: string]: any }) => {\n return [\n {\n provide: NavParamsToken,\n useValue: params,\n },\n {\n provide: NavParams,\n useFactory: provideNavParamsInjectable,\n deps: [NavParamsToken],\n },\n ];\n};\n\nconst provideNavParamsInjectable = (params: { [key: string]: any }) => {\n return new NavParams(params);\n};\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Injectable, InjectionToken } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class Config {
|
|
4
|
+
get(key, fallback) {
|
|
5
|
+
const c = getConfig();
|
|
6
|
+
if (c) {
|
|
7
|
+
return c.get(key, fallback);
|
|
8
|
+
}
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
getBoolean(key, fallback) {
|
|
12
|
+
const c = getConfig();
|
|
13
|
+
if (c) {
|
|
14
|
+
return c.getBoolean(key, fallback);
|
|
15
|
+
}
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
getNumber(key, fallback) {
|
|
19
|
+
const c = getConfig();
|
|
20
|
+
if (c) {
|
|
21
|
+
return c.getNumber(key, fallback);
|
|
22
|
+
}
|
|
23
|
+
return 0;
|
|
24
|
+
}
|
|
25
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: Config, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
26
|
+
/** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: Config, providedIn: 'root' });
|
|
27
|
+
}
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: Config, decorators: [{
|
|
29
|
+
type: Injectable,
|
|
30
|
+
args: [{
|
|
31
|
+
providedIn: 'root',
|
|
32
|
+
}]
|
|
33
|
+
}] });
|
|
34
|
+
export const ConfigToken = new InjectionToken('USERCONFIG');
|
|
35
|
+
const getConfig = () => {
|
|
36
|
+
if (typeof window !== 'undefined') {
|
|
37
|
+
const Ionic = window.Ionic;
|
|
38
|
+
if (Ionic?.config) {
|
|
39
|
+
return Ionic.config;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/common/providers/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;;AAQ3D,MAAM,OAAO,MAAM;IACjB,GAAG,CAAC,GAAsB,EAAE,QAAc;QACxC,MAAM,CAAC,GAAG,SAAS,EAAE,CAAC;QACtB,IAAI,CAAC,EAAE,CAAC;YACN,OAAO,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAC9B,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,UAAU,CAAC,GAAsB,EAAE,QAAkB;QACnD,MAAM,CAAC,GAAG,SAAS,EAAE,CAAC;QACtB,IAAI,CAAC,EAAE,CAAC;YACN,OAAO,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,SAAS,CAAC,GAAsB,EAAE,QAAiB;QACjD,MAAM,CAAC,GAAG,SAAS,EAAE,CAAC;QACtB,IAAI,CAAC,EAAE,CAAC;YACN,OAAO,CAAC,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACpC,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;0HAvBU,MAAM;8HAAN,MAAM,cAFL,MAAM;;2FAEP,MAAM;kBAHlB,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;AA2BD,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,cAAc,CAAM,YAAY,CAAC,CAAC;AAEjE,MAAM,SAAS,GAAG,GAAsB,EAAE;IACxC,IAAI,OAAQ,MAAc,KAAK,WAAW,EAAE,CAAC;QAC3C,MAAM,KAAK,GAAI,MAA6B,CAAC,KAAK,CAAC;QACnD,IAAI,KAAK,EAAE,MAAM,EAAE,CAAC;YAClB,OAAO,KAAK,CAAC,MAAM,CAAC;QACtB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["import { Injectable, InjectionToken } from '@angular/core';\nimport type { Config as CoreConfig, IonicConfig } from '@ionic/core/components';\n\nimport { IonicWindow } from '../types/interfaces';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class Config {\n get(key: keyof IonicConfig, fallback?: any): any {\n const c = getConfig();\n if (c) {\n return c.get(key, fallback);\n }\n return null;\n }\n\n getBoolean(key: keyof IonicConfig, fallback?: boolean): boolean {\n const c = getConfig();\n if (c) {\n return c.getBoolean(key, fallback);\n }\n return false;\n }\n\n getNumber(key: keyof IonicConfig, fallback?: number): number {\n const c = getConfig();\n if (c) {\n return c.getNumber(key, fallback);\n }\n return 0;\n }\n}\n\nexport const ConfigToken = new InjectionToken<any>('USERCONFIG');\n\nconst getConfig = (): CoreConfig | null => {\n if (typeof (window as any) !== 'undefined') {\n const Ionic = (window as any as IonicWindow).Ionic;\n if (Ionic?.config) {\n return Ionic.config;\n }\n }\n return null;\n};\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class DomController {
|
|
4
|
+
/**
|
|
5
|
+
* Schedules a task to run during the READ phase of the next frame.
|
|
6
|
+
* This task should only read the DOM, but never modify it.
|
|
7
|
+
*/
|
|
8
|
+
read(cb) {
|
|
9
|
+
getQueue().read(cb);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Schedules a task to run during the WRITE phase of the next frame.
|
|
13
|
+
* This task should write the DOM, but never READ it.
|
|
14
|
+
*/
|
|
15
|
+
write(cb) {
|
|
16
|
+
getQueue().write(cb);
|
|
17
|
+
}
|
|
18
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: DomController, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
19
|
+
/** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: DomController, providedIn: 'root' });
|
|
20
|
+
}
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: DomController, decorators: [{
|
|
22
|
+
type: Injectable,
|
|
23
|
+
args: [{
|
|
24
|
+
providedIn: 'root',
|
|
25
|
+
}]
|
|
26
|
+
}] });
|
|
27
|
+
const getQueue = () => {
|
|
28
|
+
const win = typeof window !== 'undefined' ? window : null;
|
|
29
|
+
if (win != null) {
|
|
30
|
+
const Ionic = win.Ionic;
|
|
31
|
+
if (Ionic?.queue) {
|
|
32
|
+
return Ionic.queue;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
read: (cb) => win.requestAnimationFrame(cb),
|
|
36
|
+
write: (cb) => win.requestAnimationFrame(cb),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
read: (cb) => cb(),
|
|
41
|
+
write: (cb) => cb(),
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=dom-controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom-controller.js","sourceRoot":"","sources":["../../../src/common/providers/dom-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;;AAK3C,MAAM,OAAO,aAAa;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAe;QAClB,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACtB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,EAAe;QACnB,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvB,CAAC;0HAfU,aAAa;8HAAb,aAAa,cAFZ,MAAM;;2FAEP,aAAa;kBAHzB,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;AAmBD,MAAM,QAAQ,GAAG,GAAG,EAAE;IACpB,MAAM,GAAG,GAAG,OAAQ,MAAc,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAE,IAAY,CAAC;IAE5E,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAChB,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;QACxB,IAAI,KAAK,EAAE,KAAK,EAAE,CAAC;YACjB,OAAO,KAAK,CAAC,KAAK,CAAC;QACrB,CAAC;QAED,OAAO;YACL,IAAI,EAAE,CAAC,EAAO,EAAE,EAAE,CAAC,GAAG,CAAC,qBAAqB,CAAC,EAAE,CAAC;YAChD,KAAK,EAAE,CAAC,EAAO,EAAE,EAAE,CAAC,GAAG,CAAC,qBAAqB,CAAC,EAAE,CAAC;SAClD,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,CAAC,EAAO,EAAE,EAAE,CAAC,EAAE,EAAE;QACvB,KAAK,EAAE,CAAC,EAAO,EAAE,EAAE,CAAC,EAAE,EAAE;KACzB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DomController {\n /**\n * Schedules a task to run during the READ phase of the next frame.\n * This task should only read the DOM, but never modify it.\n */\n read(cb: RafCallback): void {\n getQueue().read(cb);\n }\n\n /**\n * Schedules a task to run during the WRITE phase of the next frame.\n * This task should write the DOM, but never READ it.\n */\n write(cb: RafCallback): void {\n getQueue().write(cb);\n }\n}\n\nconst getQueue = () => {\n const win = typeof (window as any) !== 'undefined' ? window : (null as any);\n\n if (win != null) {\n const Ionic = win.Ionic;\n if (Ionic?.queue) {\n return Ionic.queue;\n }\n\n return {\n read: (cb: any) => win.requestAnimationFrame(cb),\n write: (cb: any) => win.requestAnimationFrame(cb),\n };\n }\n\n return {\n read: (cb: any) => cb(),\n write: (cb: any) => cb(),\n };\n};\n\nexport type RafCallback = (timeStamp?: number) => void;\n"]}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
export class MenuController {
|
|
2
|
+
menuController;
|
|
3
|
+
constructor(menuController) {
|
|
4
|
+
this.menuController = menuController;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Programmatically open the Menu.
|
|
8
|
+
* @param [menuId] Optionally get the menu by its id, or side.
|
|
9
|
+
* @return returns a promise when the menu is fully opened
|
|
10
|
+
*/
|
|
11
|
+
open(menuId) {
|
|
12
|
+
return this.menuController.open(menuId);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Programmatically close the Menu. If no `menuId` is given as the first
|
|
16
|
+
* argument then it'll close any menu which is open. If a `menuId`
|
|
17
|
+
* is given then it'll close that exact menu.
|
|
18
|
+
* @param [menuId] Optionally get the menu by its id, or side.
|
|
19
|
+
* @return returns a promise when the menu is fully closed
|
|
20
|
+
*/
|
|
21
|
+
close(menuId) {
|
|
22
|
+
return this.menuController.close(menuId);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Toggle the menu. If it's closed, it will open, and if opened, it
|
|
26
|
+
* will close.
|
|
27
|
+
* @param [menuId] Optionally get the menu by its id, or side.
|
|
28
|
+
* @return returns a promise when the menu has been toggled
|
|
29
|
+
*/
|
|
30
|
+
toggle(menuId) {
|
|
31
|
+
return this.menuController.toggle(menuId);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Used to enable or disable a menu. For example, there could be multiple
|
|
35
|
+
* left menus, but only one of them should be able to be opened at the same
|
|
36
|
+
* time. If there are multiple menus on the same side, then enabling one menu
|
|
37
|
+
* will also automatically disable all the others that are on the same side.
|
|
38
|
+
* @param [menuId] Optionally get the menu by its id, or side.
|
|
39
|
+
* @return Returns the instance of the menu, which is useful for chaining.
|
|
40
|
+
*/
|
|
41
|
+
enable(shouldEnable, menuId) {
|
|
42
|
+
return this.menuController.enable(shouldEnable, menuId);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Used to enable or disable the ability to swipe open the menu.
|
|
46
|
+
* @param shouldEnable True if it should be swipe-able, false if not.
|
|
47
|
+
* @param [menuId] Optionally get the menu by its id, or side.
|
|
48
|
+
* @return Returns the instance of the menu, which is useful for chaining.
|
|
49
|
+
*/
|
|
50
|
+
swipeGesture(shouldEnable, menuId) {
|
|
51
|
+
return this.menuController.swipeGesture(shouldEnable, menuId);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* @param [menuId] Optionally get the menu by its id, or side.
|
|
55
|
+
* @return Returns true if the specified menu is currently open, otherwise false.
|
|
56
|
+
* If the menuId is not specified, it returns true if ANY menu is currenly open.
|
|
57
|
+
*/
|
|
58
|
+
isOpen(menuId) {
|
|
59
|
+
return this.menuController.isOpen(menuId);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @param [menuId] Optionally get the menu by its id, or side.
|
|
63
|
+
* @return Returns true if the menu is currently enabled, otherwise false.
|
|
64
|
+
*/
|
|
65
|
+
isEnabled(menuId) {
|
|
66
|
+
return this.menuController.isEnabled(menuId);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Used to get a menu instance. If a `menuId` is not provided then it'll
|
|
70
|
+
* return the first menu found. If a `menuId` is `left` or `right`, then
|
|
71
|
+
* it'll return the enabled menu on that side. Otherwise, if a `menuId` is
|
|
72
|
+
* provided, then it'll try to find the menu using the menu's `id`
|
|
73
|
+
* property. If a menu is not found then it'll return `null`.
|
|
74
|
+
* @param [menuId] Optionally get the menu by its id, or side.
|
|
75
|
+
* @return Returns the instance of the menu if found, otherwise `null`.
|
|
76
|
+
*/
|
|
77
|
+
get(menuId) {
|
|
78
|
+
return this.menuController.get(menuId);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* @return Returns the instance of the menu already opened, otherwise `null`.
|
|
82
|
+
*/
|
|
83
|
+
getOpen() {
|
|
84
|
+
return this.menuController.getOpen();
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* @return Returns an array of all menu instances.
|
|
88
|
+
*/
|
|
89
|
+
getMenus() {
|
|
90
|
+
return this.menuController.getMenus();
|
|
91
|
+
}
|
|
92
|
+
registerAnimation(name, animation) {
|
|
93
|
+
return this.menuController.registerAnimation(name, animation);
|
|
94
|
+
}
|
|
95
|
+
isAnimating() {
|
|
96
|
+
return this.menuController.isAnimating();
|
|
97
|
+
}
|
|
98
|
+
_getOpenSync() {
|
|
99
|
+
return this.menuController._getOpenSync();
|
|
100
|
+
}
|
|
101
|
+
_createAnimation(type, menuCmp) {
|
|
102
|
+
return this.menuController._createAnimation(type, menuCmp);
|
|
103
|
+
}
|
|
104
|
+
_register(menu) {
|
|
105
|
+
return this.menuController._register(menu);
|
|
106
|
+
}
|
|
107
|
+
_unregister(menu) {
|
|
108
|
+
return this.menuController._unregister(menu);
|
|
109
|
+
}
|
|
110
|
+
_setOpen(menu, shouldOpen, animated) {
|
|
111
|
+
return this.menuController._setOpen(menu, shouldOpen, animated);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=menu-controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-controller.js","sourceRoot":"","sources":["../../../src/common/providers/menu-controller.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,cAAc;IACL;IAApB,YAAoB,cAA+B;QAA/B,mBAAc,GAAd,cAAc,CAAiB;IAAG,CAAC;IAEvD;;;;OAIG;IACH,IAAI,CAAC,MAAe;QAClB,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;OAMG;IACH,KA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C,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC;IAC5C,CAAC;IAED,gBAAgB,CAAC,IAAY,EAAE,OAAc;QAC3C,OAAO,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED,SAAS,CAAC,IAAW;QACnB,OAAO,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAED,WAAW,CAAC,IAAW;QACrB,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED,QAAQ,CAAC,IAAW,EAAE,UAAmB,EAAE,QAAiB;QAC1D,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;IAClE,CAAC;CACF","sourcesContent":["import type { MenuControllerI, AnimationBuilder, MenuI, Animation } from '@ionic/core/components';\n\nexport class MenuController implements MenuControllerI {\n constructor(private menuController: MenuControllerI) {}\n\n /**\n * Programmatically open the Menu.\n * @param [menuId] Optionally get the menu by its id, or side.\n * @return returns a promise when the menu is fully opened\n */\n open(menuId?: string): Promise<boolean> {\n return this.menuController.open(menuId);\n }\n\n /**\n * Programmatically close the Menu. If no `menuId` is given as the first\n * argument then it'll close any menu which is open. If a `menuId`\n * is given then it'll close that exact menu.\n * @param [menuId] Optionally get the menu by its id, or side.\n * @return returns a promise when the menu is fully closed\n */\n close(menuId?: string): Promise<boolean> {\n return this.menuController.close(menuId);\n }\n\n /**\n * Toggle the menu. If it's closed, it will open, and if opened, it\n * will close.\n * @param [menuId] Optionally get the menu by its id, or side.\n * @return returns a promise when the menu has been toggled\n */\n toggle(menuId?: string): Promise<boolean> {\n return this.menuController.toggle(menuId);\n }\n\n /**\n * Used to enable or disable a menu. For example, there could be multiple\n * left menus, but only one of them should be able to be opened at the same\n * time. If there are multiple menus on the same side, then enabling one menu\n * will also automatically disable all the others that are on the same side.\n * @param [menuId] Optionally get the menu by its id, or side.\n * @return Returns the instance of the menu, which is useful for chaining.\n */\n enable(shouldEnable: boolean, menuId?: string): Promise<HTMLIonMenuElement | undefined> {\n return this.menuController.enable(shouldEnable, menuId);\n }\n\n /**\n * Used to enable or disable the ability to swipe open the menu.\n * @param shouldEnable True if it should be swipe-able, false if not.\n * @param [menuId] Optionally get the menu by its id, or side.\n * @return Returns the instance of the menu, which is useful for chaining.\n */\n swipeGesture(shouldEnable: boolean, menuId?: string): Promise<HTMLIonMenuElement | undefined> {\n return this.menuController.swipeGesture(shouldEnable, menuId);\n }\n\n /**\n * @param [menuId] Optionally get the menu by its id, or side.\n * @return Returns true if the specified menu is currently open, otherwise false.\n * If the menuId is not specified, it returns true if ANY menu is currenly open.\n */\n isOpen(menuId?: string): Promise<boolean> {\n return this.menuController.isOpen(menuId);\n }\n\n /**\n * @param [menuId] Optionally get the menu by its id, or side.\n * @return Returns true if the menu is currently enabled, otherwise false.\n */\n isEnabled(menuId?: string): Promise<boolean> {\n return this.menuController.isEnabled(menuId);\n }\n\n /**\n * Used to get a menu instance. If a `menuId` is not provided then it'll\n * return the first menu found. If a `menuId` is `left` or `right`, then\n * it'll return the enabled menu on that side. Otherwise, if a `menuId` is\n * provided, then it'll try to find the menu using the menu's `id`\n * property. If a menu is not found then it'll return `null`.\n * @param [menuId] Optionally get the menu by its id, or side.\n * @return Returns the instance of the menu if found, otherwise `null`.\n */\n get(menuId?: string): Promise<HTMLIonMenuElement | undefined> {\n return this.menuController.get(menuId);\n }\n\n /**\n * @return Returns the instance of the menu already opened, otherwise `null`.\n */\n getOpen(): Promise<HTMLIonMenuElement | undefined> {\n return this.menuController.getOpen();\n }\n\n /**\n * @return Returns an array of all menu instances.\n */\n getMenus(): Promise<HTMLIonMenuElement[]> {\n return this.menuController.getMenus();\n }\n\n registerAnimation(name: string, animation: AnimationBuilder): void {\n return this.menuController.registerAnimation(name, animation);\n }\n\n isAnimating(): Promise<boolean> {\n return this.menuController.isAnimating();\n }\n\n _getOpenSync(): HTMLIonMenuElement | undefined {\n return this.menuController._getOpenSync();\n }\n\n _createAnimation(type: string, menuCmp: MenuI): Promise<Animation> {\n return this.menuController._createAnimation(type, menuCmp);\n }\n\n _register(menu: MenuI): void {\n return this.menuController._register(menu);\n }\n\n _unregister(menu: MenuI): void {\n return this.menuController._unregister(menu);\n }\n\n _setOpen(menu: MenuI, shouldOpen: boolean, animated: boolean): Promise<boolean> {\n return this.menuController._setOpen(menu, shouldOpen, animated);\n }\n}\n"]}
|