@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
package/README.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './value-accessor';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/directives/control-value-accessors/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './value-accessor';\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, Injector, OnDestroy } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ValueAccessor implements ControlValueAccessor, AfterViewInit, OnDestroy {
|
|
5
|
+
protected injector: Injector;
|
|
6
|
+
protected elementRef: ElementRef;
|
|
7
|
+
private onChange;
|
|
8
|
+
private onTouched;
|
|
9
|
+
protected lastValue: any;
|
|
10
|
+
private statusChanges?;
|
|
11
|
+
constructor(injector: Injector, elementRef: ElementRef);
|
|
12
|
+
writeValue(value: any): void;
|
|
13
|
+
/**
|
|
14
|
+
* Notifies the ControlValueAccessor of a change in the value of the control.
|
|
15
|
+
*
|
|
16
|
+
* This is called by each of the ValueAccessor directives when we want to update
|
|
17
|
+
* the status and validity of the form control. For example with text components this
|
|
18
|
+
* is called when the ionInput event is fired. For select components this is called
|
|
19
|
+
* when the ionChange event is fired.
|
|
20
|
+
*
|
|
21
|
+
* This also updates the Ionic form status classes on the element.
|
|
22
|
+
*
|
|
23
|
+
* @param el The component element.
|
|
24
|
+
* @param value The new value of the control.
|
|
25
|
+
*/
|
|
26
|
+
handleValueChange(el: HTMLElement, value: any): void;
|
|
27
|
+
_handleBlurEvent(el: any): void;
|
|
28
|
+
registerOnChange(fn: (value: any) => void): void;
|
|
29
|
+
registerOnTouched(fn: () => void): void;
|
|
30
|
+
setDisabledState(isDisabled: boolean): void;
|
|
31
|
+
ngOnDestroy(): void;
|
|
32
|
+
ngAfterViewInit(): void;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ValueAccessor, never>;
|
|
34
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ValueAccessor, never, never, {}, {}, never, never, true, never>;
|
|
35
|
+
}
|
|
36
|
+
export declare const setIonicClasses: (element: ElementRef) => void;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { Directive, HostListener } from '@angular/core';
|
|
2
|
+
import { NgControl } from '@angular/forms';
|
|
3
|
+
import { raf } from '../../utils/util';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
// TODO(FW-2827): types
|
|
6
|
+
export class ValueAccessor {
|
|
7
|
+
injector;
|
|
8
|
+
elementRef;
|
|
9
|
+
onChange = () => {
|
|
10
|
+
/**/
|
|
11
|
+
};
|
|
12
|
+
onTouched = () => {
|
|
13
|
+
/**/
|
|
14
|
+
};
|
|
15
|
+
lastValue;
|
|
16
|
+
statusChanges;
|
|
17
|
+
constructor(injector, elementRef) {
|
|
18
|
+
this.injector = injector;
|
|
19
|
+
this.elementRef = elementRef;
|
|
20
|
+
}
|
|
21
|
+
writeValue(value) {
|
|
22
|
+
this.elementRef.nativeElement.value = this.lastValue = value;
|
|
23
|
+
setIonicClasses(this.elementRef);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Notifies the ControlValueAccessor of a change in the value of the control.
|
|
27
|
+
*
|
|
28
|
+
* This is called by each of the ValueAccessor directives when we want to update
|
|
29
|
+
* the status and validity of the form control. For example with text components this
|
|
30
|
+
* is called when the ionInput event is fired. For select components this is called
|
|
31
|
+
* when the ionChange event is fired.
|
|
32
|
+
*
|
|
33
|
+
* This also updates the Ionic form status classes on the element.
|
|
34
|
+
*
|
|
35
|
+
* @param el The component element.
|
|
36
|
+
* @param value The new value of the control.
|
|
37
|
+
*/
|
|
38
|
+
handleValueChange(el, value) {
|
|
39
|
+
if (el === this.elementRef.nativeElement) {
|
|
40
|
+
if (value !== this.lastValue) {
|
|
41
|
+
this.lastValue = value;
|
|
42
|
+
this.onChange(value);
|
|
43
|
+
}
|
|
44
|
+
setIonicClasses(this.elementRef);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
_handleBlurEvent(el) {
|
|
48
|
+
if (el === this.elementRef.nativeElement) {
|
|
49
|
+
this.onTouched();
|
|
50
|
+
setIonicClasses(this.elementRef);
|
|
51
|
+
// When ion-radio is blurred, el and this.elementRef.nativeElement are
|
|
52
|
+
// different so we need to check if the closest ion-radio-group is the same
|
|
53
|
+
// as this.elementRef.nativeElement and if so, we need to mark the radio group
|
|
54
|
+
// as touched
|
|
55
|
+
}
|
|
56
|
+
else if (el.closest('ion-radio-group') === this.elementRef.nativeElement) {
|
|
57
|
+
this.onTouched();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
registerOnChange(fn) {
|
|
61
|
+
this.onChange = fn;
|
|
62
|
+
}
|
|
63
|
+
registerOnTouched(fn) {
|
|
64
|
+
this.onTouched = fn;
|
|
65
|
+
}
|
|
66
|
+
setDisabledState(isDisabled) {
|
|
67
|
+
this.elementRef.nativeElement.disabled = isDisabled;
|
|
68
|
+
}
|
|
69
|
+
ngOnDestroy() {
|
|
70
|
+
if (this.statusChanges) {
|
|
71
|
+
this.statusChanges.unsubscribe();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
ngAfterViewInit() {
|
|
75
|
+
let ngControl;
|
|
76
|
+
try {
|
|
77
|
+
ngControl = this.injector.get(NgControl);
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
/* No FormControl or ngModel binding */
|
|
81
|
+
}
|
|
82
|
+
if (!ngControl) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
// Listen for changes in validity, disabled, or pending states
|
|
86
|
+
if (ngControl.statusChanges) {
|
|
87
|
+
this.statusChanges = ngControl.statusChanges.subscribe(() => setIonicClasses(this.elementRef));
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* TODO FW-2787: Remove this in favor of https://github.com/angular/angular/issues/10887
|
|
91
|
+
* whenever it is implemented.
|
|
92
|
+
*/
|
|
93
|
+
const formControl = ngControl.control;
|
|
94
|
+
if (formControl) {
|
|
95
|
+
const methodsToPatch = ['markAsTouched', 'markAllAsTouched', 'markAsUntouched', 'markAsDirty', 'markAsPristine'];
|
|
96
|
+
methodsToPatch.forEach((method) => {
|
|
97
|
+
if (typeof formControl[method] !== 'undefined') {
|
|
98
|
+
const oldFn = formControl[method].bind(formControl);
|
|
99
|
+
formControl[method] = (...params) => {
|
|
100
|
+
oldFn(...params);
|
|
101
|
+
setIonicClasses(this.elementRef);
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ValueAccessor, deps: [{ token: i0.Injector }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
108
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: ValueAccessor, isStandalone: true, host: { listeners: { "ionBlur": "_handleBlurEvent($event.target)" } }, ngImport: i0 });
|
|
109
|
+
}
|
|
110
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ValueAccessor, decorators: [{
|
|
111
|
+
type: Directive
|
|
112
|
+
}], ctorParameters: () => [{ type: i0.Injector }, { type: i0.ElementRef }], propDecorators: { _handleBlurEvent: [{
|
|
113
|
+
type: HostListener,
|
|
114
|
+
args: ['ionBlur', ['$event.target']]
|
|
115
|
+
}] } });
|
|
116
|
+
export const setIonicClasses = (element) => {
|
|
117
|
+
raf(() => {
|
|
118
|
+
const input = element.nativeElement;
|
|
119
|
+
const hasValue = input.value != null && input.value.toString().length > 0;
|
|
120
|
+
const classes = getClasses(input);
|
|
121
|
+
setClasses(input, classes);
|
|
122
|
+
const item = input.closest('ion-item');
|
|
123
|
+
if (item) {
|
|
124
|
+
if (hasValue) {
|
|
125
|
+
setClasses(item, [...classes, 'item-has-value']);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
setClasses(item, classes);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
const getClasses = (element) => {
|
|
134
|
+
const classList = element.classList;
|
|
135
|
+
const classes = [];
|
|
136
|
+
for (let i = 0; i < classList.length; i++) {
|
|
137
|
+
const item = classList.item(i);
|
|
138
|
+
if (item !== null && startsWith(item, 'ng-')) {
|
|
139
|
+
classes.push(`ion-${item.substring(3)}`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return classes;
|
|
143
|
+
};
|
|
144
|
+
const setClasses = (element, classes) => {
|
|
145
|
+
const classList = element.classList;
|
|
146
|
+
classList.remove('ion-valid', 'ion-invalid', 'ion-touched', 'ion-untouched', 'ion-dirty', 'ion-pristine');
|
|
147
|
+
classList.add(...classes);
|
|
148
|
+
};
|
|
149
|
+
const startsWith = (input, search) => {
|
|
150
|
+
return input.substring(0, search.length) === search;
|
|
151
|
+
};
|
|
152
|
+
//# sourceMappingURL=value-accessor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"value-accessor.js","sourceRoot":"","sources":["../../../../src/common/directives/control-value-accessors/value-accessor.ts"],"names":[],"mappings":"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","sourcesContent":["import { AfterViewInit, ElementRef, Injector, OnDestroy, Directive, HostListener } from '@angular/core';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { Subscription } from 'rxjs';\n\nimport { raf } from '../../utils/util';\n\n// TODO(FW-2827): types\n\n@Directive()\nexport class ValueAccessor implements ControlValueAccessor, AfterViewInit, OnDestroy {\n private onChange: (value: any) => void = () => {\n /**/\n };\n private onTouched: () => void = () => {\n /**/\n };\n protected lastValue: any;\n private statusChanges?: Subscription;\n\n constructor(protected injector: Injector, protected elementRef: ElementRef) {}\n\n writeValue(value: any): void {\n this.elementRef.nativeElement.value = this.lastValue = value;\n setIonicClasses(this.elementRef);\n }\n\n /**\n * Notifies the ControlValueAccessor of a change in the value of the control.\n *\n * This is called by each of the ValueAccessor directives when we want to update\n * the status and validity of the form control. For example with text components this\n * is called when the ionInput event is fired. For select components this is called\n * when the ionChange event is fired.\n *\n * This also updates the Ionic form status classes on the element.\n *\n * @param el The component element.\n * @param value The new value of the control.\n */\n handleValueChange(el: HTMLElement, value: any): void {\n if (el === this.elementRef.nativeElement) {\n if (value !== this.lastValue) {\n this.lastValue = value;\n this.onChange(value);\n }\n setIonicClasses(this.elementRef);\n }\n }\n\n @HostListener('ionBlur', ['$event.target'])\n _handleBlurEvent(el: any): void {\n if (el === this.elementRef.nativeElement) {\n this.onTouched();\n setIonicClasses(this.elementRef);\n\n // When ion-radio is blurred, el and this.elementRef.nativeElement are\n // different so we need to check if the closest ion-radio-group is the same\n // as this.elementRef.nativeElement and if so, we need to mark the radio group\n // as touched\n } else if (el.closest('ion-radio-group') === this.elementRef.nativeElement) {\n this.onTouched();\n }\n }\n\n registerOnChange(fn: (value: any) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.elementRef.nativeElement.disabled = isDisabled;\n }\n\n ngOnDestroy(): void {\n if (this.statusChanges) {\n this.statusChanges.unsubscribe();\n }\n }\n\n ngAfterViewInit(): void {\n let ngControl;\n try {\n ngControl = this.injector.get<NgControl>(NgControl);\n } catch {\n /* No FormControl or ngModel binding */\n }\n\n if (!ngControl) {\n return;\n }\n\n // Listen for changes in validity, disabled, or pending states\n if (ngControl.statusChanges) {\n this.statusChanges = ngControl.statusChanges.subscribe(() => setIonicClasses(this.elementRef));\n }\n\n /**\n * TODO FW-2787: Remove this in favor of https://github.com/angular/angular/issues/10887\n * whenever it is implemented.\n */\n const formControl = ngControl.control as any;\n if (formControl) {\n const methodsToPatch = ['markAsTouched', 'markAllAsTouched', 'markAsUntouched', 'markAsDirty', 'markAsPristine'];\n methodsToPatch.forEach((method) => {\n if (typeof formControl[method] !== 'undefined') {\n const oldFn = formControl[method].bind(formControl);\n formControl[method] = (...params: any[]) => {\n oldFn(...params);\n setIonicClasses(this.elementRef);\n };\n }\n });\n }\n }\n}\n\nexport const setIonicClasses = (element: ElementRef): void => {\n raf(() => {\n const input = element.nativeElement as HTMLInputElement;\n const hasValue = input.value != null && input.value.toString().length > 0;\n const classes = getClasses(input);\n setClasses(input, classes);\n const item = input.closest('ion-item');\n if (item) {\n if (hasValue) {\n setClasses(item, [...classes, 'item-has-value']);\n } else {\n setClasses(item, classes);\n }\n }\n });\n};\n\nconst getClasses = (element: HTMLElement) => {\n const classList = element.classList;\n const classes: string[] = [];\n for (let i = 0; i < classList.length; i++) {\n const item = classList.item(i);\n if (item !== null && startsWith(item, 'ng-')) {\n classes.push(`ion-${item.substring(3)}`);\n }\n }\n return classes;\n};\n\nconst setClasses = (element: HTMLElement, classes: string[]) => {\n const classList = element.classList;\n classList.remove('ion-valid', 'ion-invalid', 'ion-touched', 'ion-untouched', 'ion-dirty', 'ion-pristine');\n classList.add(...classes);\n};\n\nconst startsWith = (input: string, search: string): boolean => {\n return input.substring(0, search.length) === search;\n};\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ElementRef, NgZone, ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import type { Components } from '@ionic/core';
|
|
3
|
+
import { Config } from '../../providers/config';
|
|
4
|
+
import { NavController } from '../../providers/nav-controller';
|
|
5
|
+
import { IonRouterOutlet } from './router-outlet';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare interface IonBackButton extends Components.IonBackButton {
|
|
8
|
+
}
|
|
9
|
+
export declare class IonBackButton {
|
|
10
|
+
private routerOutlet;
|
|
11
|
+
private navCtrl;
|
|
12
|
+
private config;
|
|
13
|
+
private r;
|
|
14
|
+
protected z: NgZone;
|
|
15
|
+
protected el: HTMLElement;
|
|
16
|
+
constructor(routerOutlet: IonRouterOutlet, navCtrl: NavController, config: Config, r: ElementRef, z: NgZone, c: ChangeDetectorRef);
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
onClick(ev: Event): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IonBackButton, [{ optional: true; }, null, null, null, null, null]>;
|
|
22
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<IonBackButton, never, never, { "color": { "alias": "color"; "required": false; }; "defaultHref": { "alias": "defaultHref"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "routerAnimation": { "alias": "routerAnimation"; "required": false; }; "text": { "alias": "text"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { HostListener, Optional, Directive } from '@angular/core';
|
|
3
|
+
import { ProxyCmp } from '../../utils/proxy';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "./router-outlet";
|
|
6
|
+
import * as i2 from "../../providers/nav-controller";
|
|
7
|
+
import * as i3 from "../../providers/config";
|
|
8
|
+
const BACK_BUTTON_INPUTS = ['color', 'defaultHref', 'disabled', 'icon', 'mode', 'routerAnimation', 'text', 'type'];
|
|
9
|
+
let IonBackButton = class IonBackButton {
|
|
10
|
+
routerOutlet;
|
|
11
|
+
navCtrl;
|
|
12
|
+
config;
|
|
13
|
+
r;
|
|
14
|
+
z;
|
|
15
|
+
el;
|
|
16
|
+
constructor(routerOutlet, navCtrl, config, r, z, c) {
|
|
17
|
+
this.routerOutlet = routerOutlet;
|
|
18
|
+
this.navCtrl = navCtrl;
|
|
19
|
+
this.config = config;
|
|
20
|
+
this.r = r;
|
|
21
|
+
this.z = z;
|
|
22
|
+
c.detach();
|
|
23
|
+
this.el = this.r.nativeElement;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
onClick(ev) {
|
|
29
|
+
const defaultHref = this.defaultHref || this.config.get('backButtonDefaultHref');
|
|
30
|
+
if (this.routerOutlet?.canGoBack()) {
|
|
31
|
+
this.navCtrl.setDirection('back', undefined, undefined, this.routerAnimation);
|
|
32
|
+
this.routerOutlet.pop();
|
|
33
|
+
ev.preventDefault();
|
|
34
|
+
}
|
|
35
|
+
else if (defaultHref != null) {
|
|
36
|
+
this.navCtrl.navigateBack(defaultHref, { animation: this.routerAnimation });
|
|
37
|
+
ev.preventDefault();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: IonBackButton, deps: [{ token: i1.IonRouterOutlet, optional: true }, { token: i2.NavController }, { token: i3.Config }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
41
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: IonBackButton, isStandalone: true, inputs: { color: "color", defaultHref: "defaultHref", disabled: "disabled", icon: "icon", mode: "mode", routerAnimation: "routerAnimation", text: "text", type: "type" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 });
|
|
42
|
+
};
|
|
43
|
+
IonBackButton = __decorate([
|
|
44
|
+
ProxyCmp({
|
|
45
|
+
inputs: BACK_BUTTON_INPUTS,
|
|
46
|
+
})
|
|
47
|
+
], IonBackButton);
|
|
48
|
+
export { IonBackButton };
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: IonBackButton, decorators: [{
|
|
50
|
+
type: Directive,
|
|
51
|
+
args: [{
|
|
52
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
53
|
+
inputs: BACK_BUTTON_INPUTS,
|
|
54
|
+
}]
|
|
55
|
+
}], ctorParameters: () => [{ type: i1.IonRouterOutlet, decorators: [{
|
|
56
|
+
type: Optional
|
|
57
|
+
}] }, { type: i2.NavController }, { type: i3.Config }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { onClick: [{
|
|
58
|
+
type: HostListener,
|
|
59
|
+
args: ['click', ['$event']]
|
|
60
|
+
}] } });
|
|
61
|
+
//# sourceMappingURL=back-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"back-button.js","sourceRoot":"","sources":["../../../../src/common/directives/navigation/back-button.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAyC,SAAS,EAAE,MAAM,eAAe,CAAC;AAKzG,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;;;;;AAI7C,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAY5G,IAAM,aAAa,GAAnB,MAAM,aAAa;IAIF;IACZ;IACA;IACA;IACE;IAPF,EAAE,CAAc;IAE1B,YACsB,YAA6B,EACzC,OAAsB,EACtB,MAAc,EACd,CAAa,EACX,CAAS,EACnB,CAAoB;QALA,iBAAY,GAAZ,YAAY,CAAiB;QACzC,YAAO,GAAP,OAAO,CAAe;QACtB,WAAM,GAAN,MAAM,CAAQ;QACd,MAAC,GAAD,CAAC,CAAY;QACX,MAAC,GAAD,CAAC,CAAQ;QAGnB,CAAC,CAAC,MAAM,EAAE,CAAC;QACX,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC;IACjC,CAAC;IAED;;OAEG;IAEH,OAAO,CAAC,EAAS;QACf,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;QAEjF,IAAI,IAAI,CAAC,YAAY,EAAE,SAAS,EAAE,EAAE,CAAC;YACnC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;YAC9E,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;YACxB,EAAE,CAAC,cAAc,EAAE,CAAC;QACtB,CAAC;aAAM,IAAI,WAAW,IAAI,IAAI,EAAE,CAAC;YAC/B,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;YAC5E,EAAE,CAAC,cAAc,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;0HA9BU,aAAa;8GAAb,aAAa;;AAAb,aAAa;IAPzB,QAAQ,CAAC;QACR,MAAM,EAAE,kBAAkB;KAC3B,CAAC;GAKW,aAAa,CA+BzB;;2FA/BY,aAAa;kBAJzB,SAAS;mBAAC;oBACT,uEAAuE;oBACvE,MAAM,EAAE,kBAAkB;iBAC3B;;0BAKI,QAAQ;;sBAcV,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC","sourcesContent":["import { HostListener, Optional, ElementRef, NgZone, ChangeDetectorRef, Directive } from '@angular/core';\nimport type { Components } from '@ionic/core';\n\nimport { Config } from '../../providers/config';\nimport { NavController } from '../../providers/nav-controller';\nimport { ProxyCmp } from '../../utils/proxy';\n\nimport { IonRouterOutlet } from './router-outlet';\n\nconst BACK_BUTTON_INPUTS = ['color', 'defaultHref', 'disabled', 'icon', 'mode', 'routerAnimation', 'text', 'type'];\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport declare interface IonBackButton extends Components.IonBackButton {}\n\n@ProxyCmp({\n inputs: BACK_BUTTON_INPUTS,\n})\n@Directive({\n // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property\n inputs: BACK_BUTTON_INPUTS,\n})\nexport class IonBackButton {\n protected el: HTMLElement;\n\n constructor(\n @Optional() private routerOutlet: IonRouterOutlet,\n private navCtrl: NavController,\n private config: Config,\n private r: ElementRef,\n protected z: NgZone,\n c: ChangeDetectorRef\n ) {\n c.detach();\n this.el = this.r.nativeElement;\n }\n\n /**\n * @internal\n */\n @HostListener('click', ['$event'])\n onClick(ev: Event): void {\n const defaultHref = this.defaultHref || this.config.get('backButtonDefaultHref');\n\n if (this.routerOutlet?.canGoBack()) {\n this.navCtrl.setDirection('back', undefined, undefined, this.routerAnimation);\n this.routerOutlet.pop();\n ev.preventDefault();\n } else if (defaultHref != null) {\n this.navCtrl.navigateBack(defaultHref, { animation: this.routerAnimation });\n ev.preventDefault();\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* NavParams are an object that exists on a page and can contain data for that particular view.
|
|
4
|
+
* Similar to how data was pass to a view in V1 with `$stateParams`, NavParams offer a much more flexible
|
|
5
|
+
* option with a simple `get` method.
|
|
6
|
+
*
|
|
7
|
+
* @usage
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { NavParams } from '@ionic/angular';
|
|
10
|
+
*
|
|
11
|
+
* export class MyClass{
|
|
12
|
+
*
|
|
13
|
+
* constructor(navParams: NavParams){
|
|
14
|
+
* // userParams is an object we have in our nav-parameters
|
|
15
|
+
* navParams.get('userParams');
|
|
16
|
+
* }
|
|
17
|
+
*
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare class NavParams {
|
|
22
|
+
data: {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
};
|
|
25
|
+
constructor(data?: {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* Get the value of a nav-parameter for the current view
|
|
30
|
+
*
|
|
31
|
+
* ```ts
|
|
32
|
+
* import { NavParams } from 'ionic-angular';
|
|
33
|
+
*
|
|
34
|
+
* export class MyClass{
|
|
35
|
+
* constructor(public navParams: NavParams){
|
|
36
|
+
* // userParams is an object we have in our nav-parameters
|
|
37
|
+
* this.navParams.get('userParams');
|
|
38
|
+
* }
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @param param Which param you want to look up
|
|
43
|
+
*/
|
|
44
|
+
get<T = any>(param: string): T;
|
|
45
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* NavParams are an object that exists on a page and can contain data for that particular view.
|
|
4
|
+
* Similar to how data was pass to a view in V1 with `$stateParams`, NavParams offer a much more flexible
|
|
5
|
+
* option with a simple `get` method.
|
|
6
|
+
*
|
|
7
|
+
* @usage
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { NavParams } from '@ionic/angular';
|
|
10
|
+
*
|
|
11
|
+
* export class MyClass{
|
|
12
|
+
*
|
|
13
|
+
* constructor(navParams: NavParams){
|
|
14
|
+
* // userParams is an object we have in our nav-parameters
|
|
15
|
+
* navParams.get('userParams');
|
|
16
|
+
* }
|
|
17
|
+
*
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export class NavParams {
|
|
22
|
+
data;
|
|
23
|
+
constructor(data = {}) {
|
|
24
|
+
this.data = data;
|
|
25
|
+
console.warn(`[Ionic Warning]: NavParams has been deprecated in favor of using Angular's input API. Developers should migrate to either the @Input decorator or the Signals-based input API.`);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get the value of a nav-parameter for the current view
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
* import { NavParams } from 'ionic-angular';
|
|
32
|
+
*
|
|
33
|
+
* export class MyClass{
|
|
34
|
+
* constructor(public navParams: NavParams){
|
|
35
|
+
* // userParams is an object we have in our nav-parameters
|
|
36
|
+
* this.navParams.get('userParams');
|
|
37
|
+
* }
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @param param Which param you want to look up
|
|
42
|
+
*/
|
|
43
|
+
get(param) {
|
|
44
|
+
return this.data[param];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=nav-params.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav-params.js","sourceRoot":"","sources":["../../../../src/common/directives/navigation/nav-params.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,SAAS;IACD;IAAnB,YAAmB,OAA+B,EAAE;QAAjC,SAAI,GAAJ,IAAI,CAA6B;QAClD,OAAO,CAAC,IAAI,CACV,gLAAgL,CACjL,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,GAAG,CAAU,KAAa;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;CACF","sourcesContent":["/**\n * @description\n * NavParams are an object that exists on a page and can contain data for that particular view.\n * Similar to how data was pass to a view in V1 with `$stateParams`, NavParams offer a much more flexible\n * option with a simple `get` method.\n *\n * @usage\n * ```ts\n * import { NavParams } from '@ionic/angular';\n *\n * export class MyClass{\n *\n * constructor(navParams: NavParams){\n * // userParams is an object we have in our nav-parameters\n * navParams.get('userParams');\n * }\n *\n * }\n * ```\n */\nexport class NavParams {\n constructor(public data: { [key: string]: any } = {}) {\n console.warn(\n `[Ionic Warning]: NavParams has been deprecated in favor of using Angular's input API. Developers should migrate to either the @Input decorator or the Signals-based input API.`\n );\n }\n\n /**\n * Get the value of a nav-parameter for the current view\n *\n * ```ts\n * import { NavParams } from 'ionic-angular';\n *\n * export class MyClass{\n * constructor(public navParams: NavParams){\n * // userParams is an object we have in our nav-parameters\n * this.navParams.get('userParams');\n * }\n * }\n * ```\n *\n * @param param Which param you want to look up\n */\n get<T = any>(param: string): T {\n return this.data[param];\n }\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ElementRef, Injector, EnvironmentInjector, NgZone, ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
2
|
+
import type { Components } from '@ionic/core';
|
|
3
|
+
import { AngularDelegate } from '../../providers/angular-delegate';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare interface IonNav extends Components.IonNav {
|
|
6
|
+
/**
|
|
7
|
+
* Event fired when the nav will change components
|
|
8
|
+
*/
|
|
9
|
+
ionNavWillChange: EventEmitter<CustomEvent<void>>;
|
|
10
|
+
/**
|
|
11
|
+
* Event fired when the nav has changed components
|
|
12
|
+
*/
|
|
13
|
+
ionNavDidChange: EventEmitter<CustomEvent<void>>;
|
|
14
|
+
}
|
|
15
|
+
export declare class IonNav {
|
|
16
|
+
protected z: NgZone;
|
|
17
|
+
protected el: HTMLElement;
|
|
18
|
+
constructor(ref: ElementRef, environmentInjector: EnvironmentInjector, injector: Injector, angularDelegate: AngularDelegate, z: NgZone, c: ChangeDetectorRef);
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IonNav, never>;
|
|
20
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<IonNav, never, never, { "animated": { "alias": "animated"; "required": false; }; "animation": { "alias": "animation"; "required": false; }; "root": { "alias": "root"; "required": false; }; "rootParams": { "alias": "rootParams"; "required": false; }; "swipeGesture": { "alias": "swipeGesture"; "required": false; }; }, {}, never, never, true, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { Directive, } from '@angular/core';
|
|
3
|
+
import { ProxyCmp, proxyOutputs } from '../../utils/proxy';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "../../providers/angular-delegate";
|
|
6
|
+
const NAV_INPUTS = ['animated', 'animation', 'root', 'rootParams', 'swipeGesture'];
|
|
7
|
+
const NAV_METHODS = [
|
|
8
|
+
'push',
|
|
9
|
+
'insert',
|
|
10
|
+
'insertPages',
|
|
11
|
+
'pop',
|
|
12
|
+
'popTo',
|
|
13
|
+
'popToRoot',
|
|
14
|
+
'removeIndex',
|
|
15
|
+
'setRoot',
|
|
16
|
+
'setPages',
|
|
17
|
+
'getActive',
|
|
18
|
+
'getByIndex',
|
|
19
|
+
'canGoBack',
|
|
20
|
+
'getPrevious',
|
|
21
|
+
];
|
|
22
|
+
let IonNav = class IonNav {
|
|
23
|
+
z;
|
|
24
|
+
el;
|
|
25
|
+
constructor(ref, environmentInjector, injector, angularDelegate, z, c) {
|
|
26
|
+
this.z = z;
|
|
27
|
+
c.detach();
|
|
28
|
+
this.el = ref.nativeElement;
|
|
29
|
+
ref.nativeElement.delegate = angularDelegate.create(environmentInjector, injector);
|
|
30
|
+
proxyOutputs(this, this.el, ['ionNavDidChange', 'ionNavWillChange']);
|
|
31
|
+
}
|
|
32
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: IonNav, deps: [{ token: i0.ElementRef }, { token: i0.EnvironmentInjector }, { token: i0.Injector }, { token: i1.AngularDelegate }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
33
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.0", type: IonNav, isStandalone: true, inputs: { animated: "animated", animation: "animation", root: "root", rootParams: "rootParams", swipeGesture: "swipeGesture" }, ngImport: i0 });
|
|
34
|
+
};
|
|
35
|
+
IonNav = __decorate([
|
|
36
|
+
ProxyCmp({
|
|
37
|
+
inputs: NAV_INPUTS,
|
|
38
|
+
methods: NAV_METHODS,
|
|
39
|
+
})
|
|
40
|
+
], IonNav);
|
|
41
|
+
export { IonNav };
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: IonNav, decorators: [{
|
|
43
|
+
type: Directive,
|
|
44
|
+
args: [{
|
|
45
|
+
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
46
|
+
inputs: NAV_INPUTS,
|
|
47
|
+
}]
|
|
48
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.EnvironmentInjector }, { type: i0.Injector }, { type: i1.AngularDelegate }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }] });
|
|
49
|
+
//# sourceMappingURL=nav.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav.js","sourceRoot":"","sources":["../../../../src/common/directives/navigation/nav.ts"],"names":[],"mappings":";AAAA,OAAO,EAML,SAAS,GAEV,MAAM,eAAe,CAAC;AAIvB,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;;;AAE3D,MAAM,UAAU,GAAG,CAAC,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;AAEnF,MAAM,WAAW,GAAG;IAClB,MAAM;IACN,QAAQ;IACR,aAAa;IACb,KAAK;IACL,OAAO;IACP,WAAW;IACX,aAAa;IACb,SAAS;IACT,UAAU;IACV,WAAW;IACX,YAAY;IACZ,WAAW;IACX,aAAa;CACd,CAAC;AAqBK,IAAM,MAAM,GAAZ,MAAM,MAAM;IAOL;IANF,EAAE,CAAc;IAC1B,YACE,GAAe,EACf,mBAAwC,EACxC,QAAkB,EAClB,eAAgC,EACtB,CAAS,EACnB,CAAoB;QADV,MAAC,GAAD,CAAC,CAAQ;QAGnB,CAAC,CAAC,MAAM,EAAE,CAAC;QACX,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC,aAAa,CAAC;QAC5B,GAAG,CAAC,aAAa,CAAC,QAAQ,GAAG,eAAe,CAAC,MAAM,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC;QACnF,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAAC,CAAC;IACvE,CAAC;0HAdU,MAAM;8GAAN,MAAM;;AAAN,MAAM;IARlB,QAAQ,CAAC;QACR,MAAM,EAAE,UAAU;QAClB,OAAO,EAAE,WAAW;KACrB,CAAC;GAKW,MAAM,CAelB;;2FAfY,MAAM;kBAJlB,SAAS;mBAAC;oBACT,uEAAuE;oBACvE,MAAM,EAAE,UAAU;iBACnB","sourcesContent":["import {\n ElementRef,\n Injector,\n EnvironmentInjector,\n NgZone,\n ChangeDetectorRef,\n Directive,\n EventEmitter,\n} from '@angular/core';\nimport type { Components } from '@ionic/core';\n\nimport { AngularDelegate } from '../../providers/angular-delegate';\nimport { ProxyCmp, proxyOutputs } from '../../utils/proxy';\n\nconst NAV_INPUTS = ['animated', 'animation', 'root', 'rootParams', 'swipeGesture'];\n\nconst NAV_METHODS = [\n 'push',\n 'insert',\n 'insertPages',\n 'pop',\n 'popTo',\n 'popToRoot',\n 'removeIndex',\n 'setRoot',\n 'setPages',\n 'getActive',\n 'getByIndex',\n 'canGoBack',\n 'getPrevious',\n];\n\nexport declare interface IonNav extends Components.IonNav {\n /**\n * Event fired when the nav will change components\n */\n ionNavWillChange: EventEmitter<CustomEvent<void>>;\n /**\n * Event fired when the nav has changed components\n */\n ionNavDidChange: EventEmitter<CustomEvent<void>>;\n}\n\n@ProxyCmp({\n inputs: NAV_INPUTS,\n methods: NAV_METHODS,\n})\n@Directive({\n // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property\n inputs: NAV_INPUTS,\n})\nexport class IonNav {\n protected el: HTMLElement;\n constructor(\n ref: ElementRef,\n environmentInjector: EnvironmentInjector,\n injector: Injector,\n angularDelegate: AngularDelegate,\n protected z: NgZone,\n c: ChangeDetectorRef\n ) {\n c.detach();\n this.el = ref.nativeElement;\n ref.nativeElement.delegate = angularDelegate.create(environmentInjector, injector);\n proxyOutputs(this, this.el, ['ionNavDidChange', 'ionNavWillChange']);\n }\n}\n"]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { LocationStrategy } from '@angular/common';
|
|
2
|
+
import { ElementRef, OnChanges, OnDestroy, OnInit } from '@angular/core';
|
|
3
|
+
import { Router, RouterLink } from '@angular/router';
|
|
4
|
+
import type { AnimationBuilder, RouterDirection } from '@ionic/core/components';
|
|
5
|
+
import { NavController } from '../../providers/nav-controller';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Adds support for Ionic routing directions and animations to the base Angular router link directive.
|
|
9
|
+
*
|
|
10
|
+
* When the router link is clicked, the directive will assign the direction and
|
|
11
|
+
* animation so that the routing integration will transition correctly.
|
|
12
|
+
*/
|
|
13
|
+
export declare class RouterLinkDelegateDirective implements OnInit, OnChanges, OnDestroy {
|
|
14
|
+
private locationStrategy;
|
|
15
|
+
private navCtrl;
|
|
16
|
+
private elementRef;
|
|
17
|
+
private router;
|
|
18
|
+
private routerLink?;
|
|
19
|
+
routerDirection: RouterDirection;
|
|
20
|
+
routerAnimation?: AnimationBuilder;
|
|
21
|
+
constructor(locationStrategy: LocationStrategy, navCtrl: NavController, elementRef: ElementRef, router: Router, routerLink?: RouterLink | undefined);
|
|
22
|
+
ngOnInit(): void;
|
|
23
|
+
ngOnChanges(): void;
|
|
24
|
+
ngOnDestroy(): void;
|
|
25
|
+
private onCaptureClick;
|
|
26
|
+
/**
|
|
27
|
+
* True when the browser should handle the click natively instead of routing
|
|
28
|
+
* in-app: a modifier was held (ctrl/meta/shift/alt), or the host targets
|
|
29
|
+
* something other than `_self`. This mirrors the modifier set Angular's own
|
|
30
|
+
* `RouterLink` guards on, so an Ionic `routerLink` behaves like a plain anchor
|
|
31
|
+
* for new-tab, new-window, and download intents.
|
|
32
|
+
*/
|
|
33
|
+
private opensNatively;
|
|
34
|
+
/**
|
|
35
|
+
* The `tabindex` is set to `0` by default on the host element when
|
|
36
|
+
* the `routerLink` directive is used. This causes issues with Ionic
|
|
37
|
+
* components that wrap an `a` or `button` element, such as `ion-item`.
|
|
38
|
+
* See issue https://github.com/angular/angular/issues/28345
|
|
39
|
+
*
|
|
40
|
+
* This method removes the `tabindex` attribute from the host element
|
|
41
|
+
* to allow the Ionic component to manage the focus state correctly.
|
|
42
|
+
*/
|
|
43
|
+
private updateTabindex;
|
|
44
|
+
private updateTargetUrlAndHref;
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
onClick(ev: UIEvent): void;
|
|
49
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RouterLinkDelegateDirective, [null, null, null, null, { optional: true; }]>;
|
|
50
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLinkDelegateDirective, ":not(a):not(area)[routerLink]", never, { "routerDirection": { "alias": "routerDirection"; "required": false; }; "routerAnimation": { "alias": "routerAnimation"; "required": false; }; }, {}, never, never, true, never>;
|
|
51
|
+
}
|
|
52
|
+
export declare class RouterLinkWithHrefDelegateDirective implements OnInit, OnChanges {
|
|
53
|
+
private locationStrategy;
|
|
54
|
+
private navCtrl;
|
|
55
|
+
private elementRef;
|
|
56
|
+
private router;
|
|
57
|
+
private routerLink?;
|
|
58
|
+
routerDirection: RouterDirection;
|
|
59
|
+
routerAnimation?: AnimationBuilder;
|
|
60
|
+
constructor(locationStrategy: LocationStrategy, navCtrl: NavController, elementRef: ElementRef, router: Router, routerLink?: RouterLink | undefined);
|
|
61
|
+
ngOnInit(): void;
|
|
62
|
+
ngOnChanges(): void;
|
|
63
|
+
private updateTargetUrlAndHref;
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
onClick(): void;
|
|
68
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RouterLinkWithHrefDelegateDirective, [null, null, null, null, { optional: true; }]>;
|
|
69
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLinkWithHrefDelegateDirective, "a[routerLink],area[routerLink]", never, { "routerDirection": { "alias": "routerDirection"; "required": false; }; "routerAnimation": { "alias": "routerAnimation"; "required": false; }; }, {}, never, never, true, never>;
|
|
70
|
+
}
|