@pod-os/elements 0.7.1-92705ee.0 → 0.7.1-a71f01c.0
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/dist/cjs/{animation-5840e4df.js → animation-9bea118f.js} +115 -84
- package/dist/cjs/{app-globals-1aedd05c.js → app-globals-6352043e.js} +1 -1
- package/dist/cjs/{cubic-bezier-dcb7bfef.js → cubic-bezier-0b702a31.js} +13 -12
- package/dist/cjs/data-0c9489d7.js +1510 -0
- package/dist/cjs/dir-011f46ea.js +20 -0
- package/dist/cjs/elements.cjs.js +5 -5
- package/dist/cjs/focus-visible-2624ec15.js +76 -0
- package/dist/cjs/framework-delegate-437c0645.js +119 -0
- package/dist/cjs/{gesture-controller-fbbe9a65.js → gesture-controller-00a6b02f.js} +6 -2
- package/dist/cjs/{haptic-09e73337.js → haptic-7358cb0b.js} +37 -8
- package/dist/cjs/{hardware-back-button-01027575.js → hardware-back-button-25372ec7.js} +11 -8
- package/dist/cjs/{helpers-398ced09.js → helpers-cb08f5ae.js} +115 -15
- package/dist/cjs/{index-2067b305.js → index-1b07c737.js} +35 -24
- package/dist/cjs/{index-68ae43d2.js → index-2dc3637c.js} +34 -28
- package/dist/cjs/index-57b9fa9e.js +30 -0
- package/dist/cjs/{index-d01d9183.js → index-643851c6.js} +34 -19
- package/dist/cjs/index-731691ca.js +48 -0
- package/dist/cjs/{index-6bbae9b1.js → index-7d56774d.js} +12 -8
- package/dist/cjs/index-9fca5d6f.js +140 -0
- package/dist/cjs/index-b2a479e4.js +38 -0
- package/dist/cjs/{index-b4a9ece2.js → index-eaa0d16e.js} +7 -0
- package/dist/cjs/{tap-click-f24cb477.js → index-ed2ce04f.js} +37 -19
- package/dist/cjs/{input-shims-e959d9e2.js → input-shims-427999f7.js} +89 -38
- package/dist/cjs/ion-accordion-group.cjs.entry.js +205 -0
- package/dist/cjs/ion-accordion.cjs.entry.js +336 -0
- package/dist/cjs/ion-action-sheet_3.cjs.entry.js +865 -0
- package/dist/cjs/{ion-app_45.cjs.entry.js → ion-app_46.cjs.entry.js} +1906 -1492
- package/dist/cjs/ion-avatar.cjs.entry.js +2 -2
- package/dist/cjs/ion-back-button.cjs.entry.js +12 -11
- package/dist/cjs/ion-backdrop.cjs.entry.js +4 -4
- package/dist/cjs/ion-breadcrumb.cjs.entry.js +101 -0
- package/dist/cjs/ion-breadcrumbs.cjs.entry.js +137 -0
- package/dist/cjs/ion-buttons_3.cjs.entry.js +799 -0
- package/dist/cjs/ion-card-subtitle.cjs.entry.js +4 -4
- package/dist/cjs/{ion-list-header_3.cjs.entry.js → ion-checkbox_4.cjs.entry.js} +124 -23
- package/dist/cjs/ion-chip.cjs.entry.js +5 -10
- package/dist/cjs/ion-datetime-button.cjs.entry.js +346 -0
- package/dist/cjs/ion-datetime.cjs.entry.js +1548 -856
- package/dist/cjs/ion-fab-button.cjs.entry.js +26 -9
- package/dist/cjs/ion-fab-list.cjs.entry.js +4 -4
- package/dist/cjs/ion-fab.cjs.entry.js +15 -13
- package/dist/cjs/ion-img.cjs.entry.js +28 -4
- package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +5 -5
- package/dist/cjs/ion-infinite-scroll.cjs.entry.js +13 -13
- package/dist/cjs/ion-input.cjs.entry.js +57 -23
- package/dist/cjs/ion-item-option.cjs.entry.js +8 -8
- package/dist/cjs/ion-item-options.cjs.entry.js +5 -5
- package/dist/cjs/ion-item-sliding.cjs.entry.js +59 -63
- package/dist/cjs/ion-loading.cjs.entry.js +38 -37
- package/dist/cjs/ion-menu-button.cjs.entry.js +14 -12
- package/dist/cjs/ion-menu-toggle.cjs.entry.js +8 -7
- package/dist/cjs/ion-menu.cjs.entry.js +71 -57
- package/dist/cjs/ion-modal.cjs.entry.js +1386 -156
- package/dist/cjs/ion-nav-link.cjs.entry.js +5 -2
- package/dist/cjs/ion-nav.cjs.entry.js +177 -171
- package/dist/cjs/ion-picker-column.cjs.entry.js +25 -27
- package/dist/cjs/ion-picker.cjs.entry.js +22 -17
- package/dist/cjs/ion-popover.cjs.entry.js +1208 -182
- package/dist/cjs/ion-range.cjs.entry.js +137 -57
- package/dist/cjs/ion-refresher-content.cjs.entry.js +7 -12
- package/dist/cjs/ion-refresher.cjs.entry.js +150 -148
- package/dist/cjs/ion-reorder-group.cjs.entry.js +42 -35
- package/dist/cjs/ion-reorder.cjs.entry.js +5 -4
- package/dist/cjs/ion-route-redirect.cjs.entry.js +1 -1
- package/dist/cjs/ion-route.cjs.entry.js +1 -1
- package/dist/cjs/ion-router-link.cjs.entry.js +5 -5
- package/dist/cjs/ion-router-outlet.cjs.entry.js +24 -20
- package/dist/cjs/ion-router.cjs.entry.js +291 -194
- package/dist/cjs/ion-segment-button.cjs.entry.js +10 -17
- package/dist/cjs/ion-segment.cjs.entry.js +127 -26
- package/dist/cjs/ion-select-option.cjs.entry.js +3 -3
- package/dist/cjs/ion-select.cjs.entry.js +113 -78
- package/dist/cjs/ion-slide.cjs.entry.js +3 -3
- package/dist/cjs/ion-slides.cjs.entry.js +26 -27
- package/dist/cjs/ion-spinner.cjs.entry.js +10 -9
- package/dist/cjs/ion-split-pane.cjs.entry.js +16 -12
- package/dist/cjs/ion-tab-bar.cjs.entry.js +16 -23
- package/dist/cjs/ion-tab-button.cjs.entry.js +6 -6
- package/dist/cjs/ion-tab.cjs.entry.js +4 -4
- package/dist/cjs/ion-tabs.cjs.entry.js +4 -5
- package/dist/cjs/ion-text.cjs.entry.js +3 -3
- package/dist/cjs/ion-textarea.cjs.entry.js +31 -29
- package/dist/cjs/ion-thumbnail.cjs.entry.js +2 -2
- package/dist/cjs/ion-toast.cjs.entry.js +50 -60
- package/dist/cjs/ion-toggle.cjs.entry.js +41 -22
- package/dist/cjs/ion-virtual-scroll.cjs.entry.js +39 -31
- package/dist/cjs/{ionic-global-56e10eb5.js → ionic-global-f2d95fd3.js} +112 -93
- package/dist/cjs/{ios.transition-32e4623d.js → ios.transition-0f31ec9a.js} +78 -53
- package/dist/cjs/{keyboard-9e8103e4.js → keyboard-79afcba2.js} +6 -3
- package/dist/cjs/keyboard-controller-a934d106.js +42 -0
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/{md.transition-169c54f0.js → md.transition-d2a33a23.js} +15 -17
- package/dist/cjs/{menu-toggle-util-087678e0.js → menu-toggle-util-0a43ff7c.js} +5 -2
- package/dist/cjs/{overlays-49fe9ba7.js → overlays-f7d24abf.js} +190 -72
- package/dist/cjs/spinner-configs-cd0abbeb.js +147 -0
- package/dist/cjs/{status-tap-ada894ff.js → status-tap-beaa3a71.js} +10 -5
- package/dist/cjs/{swipe-back-c4a778df.js → swipe-back-666ea8e6.js} +34 -15
- package/dist/cjs/{theme-2259d0f5.js → theme-fc63803b.js} +9 -5
- package/dist/collection/collection-manifest.json +10 -4
- package/dist/collection/components/pos-rich-link/pos-rich-link.js +1 -1
- package/dist/components/ResourceAware.js +5 -0
- package/dist/components/action-sheet.js +309 -0
- package/dist/{esm/ion-alert.entry.js → components/alert.js} +150 -105
- package/dist/{esm/animation-fe6ed422.js → components/animation.js} +115 -84
- package/dist/components/app.js +112 -0
- package/dist/components/backdrop.js +82 -0
- package/dist/components/badge.js +42 -0
- package/dist/{esm/button-active-fd9d6d91.js → components/button-active.js} +9 -6
- package/dist/components/button.js +207 -0
- package/dist/{esm/ion-buttons.entry.js → components/buttons.js} +28 -12
- package/dist/components/card-content.js +40 -0
- package/dist/components/card-header.js +51 -0
- package/dist/components/card-title.js +43 -0
- package/dist/components/card.js +102 -0
- package/dist/{esm/ion-checkbox.entry.js → components/checkbox.js} +42 -24
- package/dist/components/col.js +161 -0
- package/dist/components/content.js +356 -0
- package/dist/{esm/cubic-bezier-108b8579.js → components/cubic-bezier.js} +13 -12
- package/dist/components/data.js +1463 -0
- package/dist/components/dir.js +18 -0
- package/dist/components/focus-visible.js +74 -0
- package/dist/components/footer.js +149 -0
- package/dist/components/framework-delegate.js +115 -0
- package/dist/{esm/gesture-controller-8f35af24.js → components/gesture-controller.js} +6 -2
- package/dist/components/grid.js +41 -0
- package/dist/{esm/haptic-c424e670.js → components/haptic.js} +38 -9
- package/dist/{esm/hardware-back-button-bb4c578a.js → components/hardware-back-button.js} +11 -8
- package/dist/components/header.js +360 -0
- package/dist/{esm/helpers-44e3bd9f.js → components/helpers.js} +113 -16
- package/dist/components/icon.js +367 -0
- package/dist/components/index.d.ts +41 -0
- package/dist/components/index.js +123 -0
- package/dist/components/index10.js +28 -0
- package/dist/{esm/tap-click-a7e55ef5.js → components/index11.js} +37 -19
- package/dist/components/index2.js +25 -0
- package/dist/{esm/index-8d682224.js → components/index3.js} +12 -8
- package/dist/components/index4.js +34 -0
- package/dist/components/index5.js +128 -0
- package/dist/{esm/index-97199683.js → components/index6.js} +34 -28
- package/dist/{esm/index-8a463a85.js → components/index7.js} +35 -24
- package/dist/{custom-elements/index.js → components/index8.js} +1049 -20945
- package/dist/{esm/index-3a1bd803.js → components/index9.js} +35 -20
- package/dist/{custom-elements → components}/input-shims.js +88 -38
- package/dist/components/ion-accordion-group.js +228 -0
- package/dist/components/ion-accordion.js +365 -0
- package/dist/components/ion-action-sheet.js +6 -0
- package/dist/components/ion-alert.js +6 -0
- package/dist/components/ion-app.js +6 -0
- package/dist/components/ion-avatar.js +39 -0
- package/dist/components/ion-back-button.js +128 -0
- package/dist/components/ion-backdrop.js +6 -0
- package/dist/components/ion-badge.js +6 -0
- package/dist/components/ion-breadcrumb.js +135 -0
- package/dist/components/ion-breadcrumbs.js +158 -0
- package/dist/components/ion-button.js +6 -0
- package/dist/components/ion-buttons.js +6 -0
- package/dist/components/ion-card-content.js +6 -0
- package/dist/components/ion-card-header.js +6 -0
- package/dist/components/ion-card-subtitle.js +46 -0
- package/dist/components/ion-card-title.js +6 -0
- package/dist/components/ion-card.js +6 -0
- package/dist/components/ion-checkbox.js +6 -0
- package/dist/components/ion-chip.js +59 -0
- package/dist/components/ion-col.js +6 -0
- package/dist/components/ion-content.js +6 -0
- package/dist/components/ion-datetime-button.js +375 -0
- package/dist/components/ion-datetime.js +1802 -0
- package/dist/components/ion-fab-button.js +149 -0
- package/dist/components/ion-fab-list.js +62 -0
- package/dist/components/ion-fab.js +97 -0
- package/dist/components/ion-footer.js +6 -0
- package/dist/components/ion-grid.js +6 -0
- package/dist/components/ion-header.js +6 -0
- package/dist/components/ion-icon.js +6 -0
- package/dist/components/ion-img.js +120 -0
- package/dist/components/ion-infinite-scroll-content.js +59 -0
- package/dist/components/ion-infinite-scroll.js +223 -0
- package/dist/components/ion-input.js +352 -0
- package/dist/components/ion-item-divider.js +6 -0
- package/dist/components/ion-item-group.js +6 -0
- package/dist/components/ion-item-option.js +89 -0
- package/dist/components/ion-item-options.js +63 -0
- package/dist/components/ion-item-sliding.js +419 -0
- package/dist/components/ion-item.js +6 -0
- package/dist/components/ion-label.js +6 -0
- package/dist/components/ion-list-header.js +6 -0
- package/dist/components/ion-list.js +6 -0
- package/dist/components/ion-loading.js +256 -0
- package/dist/components/ion-menu-button.js +107 -0
- package/dist/components/ion-menu-toggle.js +62 -0
- package/dist/components/ion-menu.js +611 -0
- package/dist/components/ion-modal.js +1765 -0
- package/dist/components/ion-nav-link.js +65 -0
- package/dist/components/ion-nav.js +905 -0
- package/dist/components/ion-note.js +6 -0
- package/dist/components/ion-picker-column-internal.js +6 -0
- package/dist/components/ion-picker-column.js +6 -0
- package/dist/components/ion-picker-internal.js +6 -0
- package/dist/components/ion-picker.js +263 -0
- package/dist/components/ion-popover.js +6 -0
- package/dist/components/ion-progress-bar.js +6 -0
- package/dist/components/ion-radio-group.js +6 -0
- package/dist/components/ion-radio.js +6 -0
- package/dist/components/ion-range.js +550 -0
- package/dist/components/ion-refresher-content.js +64 -0
- package/dist/components/ion-refresher.js +826 -0
- package/dist/components/ion-reorder-group.js +303 -0
- package/dist/components/ion-reorder.js +58 -0
- package/dist/components/ion-ripple-effect.js +6 -0
- package/dist/components/ion-route-redirect.js +40 -0
- package/dist/components/ion-route.js +68 -0
- package/dist/components/ion-router-link.js +59 -0
- package/dist/components/ion-router-outlet.js +223 -0
- package/dist/components/ion-router.js +852 -0
- package/dist/components/ion-row.js +6 -0
- package/dist/components/ion-searchbar.js +6 -0
- package/dist/components/ion-segment-button.js +128 -0
- package/dist/components/ion-segment.js +463 -0
- package/dist/components/ion-select-option.js +44 -0
- package/dist/components/ion-select-popover.js +6 -0
- package/dist/components/ion-select.js +596 -0
- package/dist/components/ion-skeleton-text.js +6 -0
- package/dist/components/ion-slide.js +38 -0
- package/dist/components/ion-slides.js +423 -0
- package/dist/components/ion-spinner.js +6 -0
- package/dist/components/ion-split-pane.js +179 -0
- package/dist/components/ion-tab-bar.js +86 -0
- package/dist/components/ion-tab-button.js +132 -0
- package/dist/components/ion-tab.js +86 -0
- package/dist/components/ion-tabs.js +176 -0
- package/dist/components/ion-text.js +40 -0
- package/dist/components/ion-textarea.js +287 -0
- package/dist/components/ion-thumbnail.js +34 -0
- package/dist/components/ion-title.js +6 -0
- package/dist/components/ion-toast.js +317 -0
- package/dist/components/ion-toggle.js +207 -0
- package/dist/components/ion-toolbar.js +6 -0
- package/dist/components/ion-virtual-scroll.js +588 -0
- package/dist/components/ionic-global.js +226 -0
- package/dist/{custom-elements → components}/ios.transition.js +75 -50
- package/dist/components/item-divider.js +54 -0
- package/dist/components/item-group.js +41 -0
- package/dist/components/item.js +323 -0
- package/dist/components/keyboard-controller.js +40 -0
- package/dist/{custom-elements → components}/keyboard.js +6 -3
- package/dist/components/label.js +95 -0
- package/dist/components/list-header.js +45 -0
- package/dist/components/list.js +66 -0
- package/dist/{custom-elements → components}/md.transition.js +12 -14
- package/dist/{esm/menu-toggle-util-562dfc9c.js → components/menu-toggle-util.js} +5 -2
- package/dist/components/note.js +42 -0
- package/dist/{esm/overlays-fc9a0625.js → components/overlays.js} +188 -72
- package/dist/components/picker-column-internal.js +315 -0
- package/dist/components/picker-column.js +343 -0
- package/dist/components/picker-internal.js +486 -0
- package/dist/components/popover.js +1440 -0
- package/dist/components/pos-app-browser.d.ts +11 -0
- package/dist/components/pos-app-browser.js +299 -0
- package/dist/components/pos-app-generic.d.ts +11 -0
- package/dist/components/pos-app-generic.js +6 -0
- package/dist/components/pos-app-generic2.js +194 -0
- package/dist/components/pos-app-image-viewer.d.ts +11 -0
- package/dist/components/pos-app-image-viewer.js +6 -0
- package/dist/components/pos-app-image-viewer2.js +162 -0
- package/dist/components/pos-app-rdf-document.d.ts +11 -0
- package/dist/components/pos-app-rdf-document.js +6 -0
- package/dist/components/pos-app-rdf-document2.js +170 -0
- package/dist/components/pos-app.d.ts +11 -0
- package/dist/components/pos-app.js +6 -0
- package/dist/components/pos-app2.js +53 -0
- package/dist/components/pos-description.d.ts +11 -0
- package/dist/components/pos-description.js +6 -0
- package/dist/components/pos-description2.js +38 -0
- package/dist/components/pos-image.d.ts +11 -0
- package/dist/components/pos-image.js +6 -0
- package/dist/components/pos-image2.js +117 -0
- package/dist/components/pos-label.d.ts +11 -0
- package/dist/components/pos-label.js +6 -0
- package/dist/components/pos-label2.js +38 -0
- package/dist/components/pos-literals.d.ts +11 -0
- package/dist/components/pos-literals.js +6 -0
- package/dist/components/pos-literals2.js +87 -0
- package/dist/components/pos-login.d.ts +11 -0
- package/dist/components/pos-login.js +6 -0
- package/dist/components/pos-login2.js +120 -0
- package/dist/components/pos-navigation-bar.d.ts +11 -0
- package/dist/components/pos-navigation-bar.js +6 -0
- package/dist/components/pos-navigation-bar2.js +52 -0
- package/dist/components/pos-picture.d.ts +11 -0
- package/dist/components/pos-picture.js +6 -0
- package/dist/components/pos-picture2.js +62 -0
- package/dist/components/pos-relations.d.ts +11 -0
- package/dist/components/pos-relations.js +6 -0
- package/dist/components/pos-relations2.js +135 -0
- package/dist/components/pos-resource.d.ts +11 -0
- package/dist/components/pos-resource.js +6 -0
- package/dist/components/pos-resource2.js +126 -0
- package/dist/components/pos-reverse-relations.d.ts +11 -0
- package/dist/components/pos-reverse-relations.js +6 -0
- package/dist/components/pos-reverse-relations2.js +135 -0
- package/dist/components/pos-rich-link.d.ts +11 -0
- package/dist/components/pos-rich-link.js +6 -0
- package/dist/components/pos-rich-link2.js +106 -0
- package/dist/components/pos-router.d.ts +11 -0
- package/dist/components/pos-router.js +6 -0
- package/dist/components/pos-router2.js +813 -0
- package/dist/components/pos-subjects.d.ts +11 -0
- package/dist/components/pos-subjects.js +6 -0
- package/dist/components/pos-subjects2.js +125 -0
- package/dist/components/pos-type-badges.d.ts +11 -0
- package/dist/components/pos-type-badges.js +6 -0
- package/dist/components/pos-type-badges2.js +69 -0
- package/dist/components/pos-type-router.d.ts +11 -0
- package/dist/components/pos-type-router.js +6 -0
- package/dist/components/pos-type-router2.js +241 -0
- package/dist/components/progress-bar.js +91 -0
- package/dist/components/radio-group.js +139 -0
- package/dist/components/radio.js +135 -0
- package/dist/components/ripple-effect.js +107 -0
- package/dist/components/row.js +31 -0
- package/dist/components/searchbar.js +412 -0
- package/dist/components/select-popover.js +174 -0
- package/dist/components/session.js +202 -0
- package/dist/components/skeleton-text.js +46 -0
- package/dist/components/spinner.js +224 -0
- package/dist/{custom-elements → components}/status-tap.js +8 -4
- package/dist/{custom-elements → components}/swipe-back.js +33 -13
- package/dist/{custom-elements → components}/swiper.bundle.js +0 -0
- package/dist/{esm/theme-d21826a7.js → components/theme.js} +9 -5
- package/dist/components/title.js +66 -0
- package/dist/components/toolbar.js +87 -0
- package/dist/elements/elements.css +1 -1
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/p-00f19b1d.js +4 -0
- package/dist/elements/p-0587332d.entry.js +1 -0
- package/dist/elements/p-07f54139.entry.js +7 -0
- package/dist/elements/{p-cfc0e54d.js → p-0991c811.js} +3 -0
- package/dist/elements/p-0a69a563.entry.js +1 -0
- package/dist/elements/p-0d284fe0.entry.js +1 -0
- package/dist/elements/p-116437b0.entry.js +13 -0
- package/dist/elements/p-12880671.entry.js +1 -0
- package/dist/elements/p-14ccd586.entry.js +1 -0
- package/dist/elements/{p-83d45051.entry.js → p-14df6ac0.entry.js} +1 -1
- package/dist/elements/{p-e860be6a.entry.js → p-17079f06.entry.js} +1 -1
- package/dist/elements/p-19e4a688.js +4 -0
- package/dist/elements/p-1afc4eb4.js +4 -0
- package/dist/elements/p-1beaf6bf.js +4 -0
- package/dist/elements/p-1d1c6a6f.entry.js +1 -0
- package/dist/elements/{p-31d30e42.entry.js → p-1d98f84b.entry.js} +1 -1
- package/dist/elements/p-1e617706.entry.js +7 -0
- package/dist/elements/p-278ca4c9.js +4 -0
- package/dist/elements/p-27f5629c.entry.js +1 -0
- package/dist/elements/p-29c0f03f.js +4 -0
- package/dist/elements/p-2a629468.entry.js +4 -0
- package/dist/elements/p-2da59aca.js +4 -0
- package/dist/elements/p-3152143f.js +4 -0
- package/dist/elements/p-343ff720.entry.js +7 -0
- package/dist/elements/p-36d4c9a8.js +4 -0
- package/dist/elements/p-3a30dfb2.entry.js +1 -0
- package/dist/elements/p-3c013bf1.entry.js +1 -0
- package/dist/elements/{p-74ba1e42.entry.js → p-3c318da5.entry.js} +1 -1
- package/dist/elements/p-3cee3222.entry.js +1 -0
- package/dist/elements/p-3d0f59af.entry.js +7 -0
- package/dist/elements/p-41cb5688.entry.js +1 -0
- package/dist/elements/p-480b3c4f.entry.js +1 -0
- package/dist/elements/p-4e9d8f18.entry.js +1 -0
- package/dist/elements/p-53e23176.js +2 -0
- package/dist/elements/p-548524f3.js +4 -0
- package/dist/elements/p-5739fa41.entry.js +1 -0
- package/dist/elements/p-5808c505.js +1 -0
- package/dist/elements/p-58a8cc2a.js +4 -0
- package/dist/elements/p-6035415e.entry.js +1 -0
- package/dist/elements/p-60eeae90.js +4 -0
- package/dist/elements/p-667550a9.entry.js +14 -0
- package/dist/elements/p-67777478.entry.js +1 -0
- package/dist/elements/p-6ab826e1.entry.js +1 -0
- package/dist/elements/p-6f5a2827.entry.js +1 -0
- package/dist/elements/p-7916ecc5.entry.js +1 -0
- package/dist/elements/p-79f06b80.entry.js +1 -0
- package/dist/elements/p-7d0def79.js +5 -0
- package/dist/elements/p-8112afea.js +4 -0
- package/dist/elements/p-83678d7d.entry.js +4 -0
- package/dist/elements/p-87e45c94.entry.js +1 -0
- package/dist/elements/p-8f80768f.entry.js +4 -0
- package/dist/elements/p-8fe0433b.js +4 -0
- package/dist/elements/{p-4cb27b48.entry.js → p-9147d82b.entry.js} +1 -1
- package/dist/elements/p-96aeb07a.entry.js +1 -0
- package/dist/elements/p-97abb434.entry.js +1 -0
- package/dist/elements/p-98497a4b.entry.js +1 -0
- package/dist/elements/p-9c719139.js +4 -0
- package/dist/elements/p-9ca37332.js +4 -0
- package/dist/elements/{p-37de7110.js → p-9d48def2.js} +3 -0
- package/dist/elements/p-a805f2f9.entry.js +1 -0
- package/dist/elements/p-a86a5bfa.entry.js +1 -0
- package/dist/elements/{p-9c1dbe52.entry.js → p-ac34eab7.entry.js} +1 -1
- package/dist/elements/p-ad366eab.entry.js +4 -0
- package/dist/elements/p-aef3a931.js +7 -0
- package/dist/elements/p-b0537eb3.entry.js +1 -0
- package/dist/elements/p-b41e66f0.entry.js +1 -0
- package/dist/elements/p-b47e7091.entry.js +1 -0
- package/dist/elements/p-b840320e.js +4 -0
- package/dist/elements/p-b934ac5d.entry.js +1 -0
- package/dist/elements/p-bc63f4b6.entry.js +1 -0
- package/dist/elements/p-bd12806f.entry.js +1 -0
- package/dist/elements/p-bf90022d.entry.js +4 -0
- package/dist/elements/p-c16d38d5.js +4 -0
- package/dist/elements/p-c84205a3.js +4 -0
- package/dist/elements/{p-06675ac7.entry.js → p-cbe318f8.entry.js} +1 -1
- package/dist/elements/p-cfed7395.js +4 -0
- package/dist/elements/p-d3e75c94.entry.js +1 -0
- package/dist/elements/p-d8e7ebf4.entry.js +7 -0
- package/dist/elements/p-d9880221.entry.js +4 -0
- package/dist/elements/p-da5db8fb.entry.js +1 -0
- package/dist/elements/{p-91fe653f.js → p-dcc6b03c.js} +3 -0
- package/dist/elements/{p-305e246c.entry.js → p-dd846020.entry.js} +1 -1
- package/dist/elements/p-dffd8689.js +4 -0
- package/dist/elements/p-e3bcb6e8.entry.js +1 -0
- package/dist/elements/p-e495a095.js +4 -0
- package/dist/elements/p-e59d9789.entry.js +1 -0
- package/dist/elements/p-e5fc7d42.entry.js +1 -0
- package/dist/elements/{p-aaa8393e.entry.js → p-eb137e9d.entry.js} +1 -1
- package/dist/elements/p-f4e54a17.js +7 -0
- package/dist/elements/p-f67d0717.entry.js +1 -0
- package/dist/elements/p-f7f4c640.js +1 -0
- package/dist/elements/p-f851b91a.js +4 -0
- package/dist/elements/p-fb27ee76.entry.js +1 -0
- package/dist/elements/p-fbddca35.entry.js +1 -0
- package/dist/elements/p-fdac5f3a.js +4 -0
- package/dist/elements/p-feb0cea8.entry.js +4 -0
- package/dist/esm/animation-801a007a.js +986 -0
- package/dist/esm/{app-globals-27d92837.js → app-globals-05a3abfb.js} +1 -1
- package/dist/esm/cubic-bezier-538b6253.js +90 -0
- package/dist/esm/data-62c81c24.js +1463 -0
- package/dist/esm/dir-defb16c6.js +18 -0
- package/dist/esm/elements.js +5 -5
- package/dist/esm/focus-visible-78d55799.js +74 -0
- package/dist/esm/framework-delegate-7e2b767b.js +115 -0
- package/dist/esm/gesture-controller-c466ff14.js +195 -0
- package/dist/esm/haptic-e7d5ef4d.js +135 -0
- package/dist/esm/hardware-back-button-242191a7.js +71 -0
- package/dist/esm/helpers-aeff219b.js +410 -0
- package/dist/esm/index-0dbaca1a.js +28 -0
- package/dist/esm/index-1f3d8582.js +34 -0
- package/dist/esm/index-2be9a18b.js +312 -0
- package/dist/esm/index-51e4a829.js +137 -0
- package/dist/esm/index-6048aed6.js +224 -0
- package/dist/esm/index-65ecd543.js +25 -0
- package/dist/{custom-elements/tap-click.js → esm/index-b212db1c.js} +37 -19
- package/dist/esm/{index-e4deec27.js → index-cb938ffb.js} +7 -1
- package/dist/esm/index-d39eb62b.js +463 -0
- package/dist/esm/index-ebf7f059.js +128 -0
- package/dist/esm/{input-shims-3b48722f.js → input-shims-8a389148.js} +89 -38
- package/dist/esm/ion-accordion-group.entry.js +201 -0
- package/dist/esm/ion-accordion.entry.js +332 -0
- package/dist/esm/ion-action-sheet_3.entry.js +859 -0
- package/dist/esm/{ion-app_45.entry.js → ion-app_46.entry.js} +1906 -1493
- package/dist/esm/ion-avatar.entry.js +2 -2
- package/dist/esm/ion-back-button.entry.js +12 -11
- package/dist/esm/ion-backdrop.entry.js +4 -4
- package/dist/esm/ion-breadcrumb.entry.js +97 -0
- package/dist/esm/ion-breadcrumbs.entry.js +133 -0
- package/dist/esm/ion-buttons_3.entry.js +793 -0
- package/dist/esm/ion-card-subtitle.entry.js +4 -4
- package/dist/esm/{ion-list-header_3.entry.js → ion-checkbox_4.entry.js} +124 -24
- package/dist/esm/ion-chip.entry.js +5 -10
- package/dist/esm/ion-datetime-button.entry.js +342 -0
- package/dist/esm/ion-datetime.entry.js +1548 -856
- package/dist/esm/ion-fab-button.entry.js +26 -9
- package/dist/esm/ion-fab-list.entry.js +4 -4
- package/dist/esm/ion-fab.entry.js +15 -13
- package/dist/esm/ion-img.entry.js +28 -4
- package/dist/esm/ion-infinite-scroll-content.entry.js +5 -5
- package/dist/esm/ion-infinite-scroll.entry.js +13 -13
- package/dist/esm/ion-input.entry.js +57 -23
- package/dist/esm/ion-item-option.entry.js +8 -8
- package/dist/esm/ion-item-options.entry.js +5 -5
- package/dist/esm/ion-item-sliding.entry.js +59 -63
- package/dist/esm/ion-loading.entry.js +38 -37
- package/dist/esm/ion-menu-button.entry.js +14 -12
- package/dist/esm/ion-menu-toggle.entry.js +8 -7
- package/dist/esm/ion-menu.entry.js +71 -57
- package/dist/esm/ion-modal.entry.js +1377 -147
- package/dist/esm/ion-nav-link.entry.js +5 -2
- package/dist/esm/ion-nav.entry.js +177 -171
- package/dist/esm/ion-picker-column.entry.js +25 -27
- package/dist/esm/ion-picker.entry.js +22 -17
- package/dist/esm/ion-popover.entry.js +1208 -182
- package/dist/esm/ion-range.entry.js +137 -57
- package/dist/esm/ion-refresher-content.entry.js +7 -12
- package/dist/esm/ion-refresher.entry.js +149 -147
- package/dist/esm/ion-reorder-group.entry.js +42 -35
- package/dist/esm/ion-reorder.entry.js +5 -4
- package/dist/esm/ion-route-redirect.entry.js +1 -1
- package/dist/esm/ion-route.entry.js +1 -1
- package/dist/esm/ion-router-link.entry.js +5 -5
- package/dist/esm/ion-router-outlet.entry.js +24 -20
- package/dist/esm/ion-router.entry.js +291 -194
- package/dist/esm/ion-segment-button.entry.js +10 -17
- package/dist/esm/ion-segment.entry.js +127 -26
- package/dist/esm/ion-select-option.entry.js +3 -3
- package/dist/esm/ion-select.entry.js +113 -78
- package/dist/esm/ion-slide.entry.js +3 -3
- package/dist/esm/ion-slides.entry.js +26 -27
- package/dist/esm/ion-spinner.entry.js +10 -9
- package/dist/esm/ion-split-pane.entry.js +16 -12
- package/dist/esm/ion-tab-bar.entry.js +16 -23
- package/dist/esm/ion-tab-button.entry.js +6 -6
- package/dist/esm/ion-tab.entry.js +4 -4
- package/dist/esm/ion-tabs.entry.js +4 -5
- package/dist/esm/ion-text.entry.js +3 -3
- package/dist/esm/ion-textarea.entry.js +31 -29
- package/dist/esm/ion-thumbnail.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +50 -60
- package/dist/esm/ion-toggle.entry.js +41 -22
- package/dist/esm/ion-virtual-scroll.entry.js +39 -31
- package/dist/esm/{ionic-global-2e28f7c7.js → ionic-global-6cd57191.js} +112 -93
- package/dist/esm/{ios.transition-a783e3cd.js → ios.transition-bbd952f2.js} +78 -53
- package/dist/esm/{keyboard-e6abcb80.js → keyboard-413afe04.js} +6 -3
- package/dist/esm/keyboard-controller-33693bc2.js +40 -0
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{md.transition-5a4a8c82.js → md.transition-5170a6d3.js} +15 -17
- package/dist/esm/menu-toggle-util-82bf888a.js +12 -0
- package/dist/esm/overlays-bd4abb68.js +502 -0
- package/dist/esm/spinner-configs-cbcd1f62.js +145 -0
- package/dist/esm/{status-tap-69e62ad6.js → status-tap-ad757b8a.js} +10 -5
- package/dist/esm/swipe-back-7ef22876.js +69 -0
- package/dist/esm/theme-7cf2cab0.js +43 -0
- package/dist/types/components.d.ts +0 -13
- package/package.json +7 -8
- package/dist/cjs/button-active-c14dab31.js +0 -66
- package/dist/cjs/focus-visible-16c98640.js +0 -45
- package/dist/cjs/framework-delegate-c45292a3.js +0 -37
- package/dist/cjs/ion-action-sheet.cjs.entry.js +0 -265
- package/dist/cjs/ion-alert.cjs.entry.js +0 -456
- package/dist/cjs/ion-buttons.cjs.entry.js +0 -42
- package/dist/cjs/ion-checkbox.cjs.entry.js +0 -117
- package/dist/cjs/ion-note.cjs.entry.js +0 -29
- package/dist/cjs/ion-select-popover.cjs.entry.js +0 -35
- package/dist/cjs/spinner-configs-fb16b986.js +0 -112
- package/dist/cjs/test-component.cjs.entry.js +0 -13
- package/dist/collection/test/TestComponent.js +0 -3
- package/dist/collection/test/mockPodOS.js +0 -35
- package/dist/collection/test/renderFunctionalComponent.js +0 -8
- package/dist/custom-elements/focus-visible.js +0 -43
- package/dist/custom-elements/index.d.ts +0 -165
- package/dist/elements/p-03bda390.js +0 -1
- package/dist/elements/p-0be044f1.entry.js +0 -1
- package/dist/elements/p-119c7c6c.entry.js +0 -1
- package/dist/elements/p-14c7c3ea.entry.js +0 -1
- package/dist/elements/p-1d4a2c61.js +0 -1
- package/dist/elements/p-1d894ac4.entry.js +0 -1
- package/dist/elements/p-1dafa1ce.entry.js +0 -1
- package/dist/elements/p-23b89ccb.entry.js +0 -1
- package/dist/elements/p-2c03b9ab.entry.js +0 -1
- package/dist/elements/p-346985f2.js +0 -1
- package/dist/elements/p-360f1c62.entry.js +0 -1
- package/dist/elements/p-373e1f25.entry.js +0 -1
- package/dist/elements/p-40547acb.entry.js +0 -1
- package/dist/elements/p-40b68014.entry.js +0 -1
- package/dist/elements/p-42e4f702.entry.js +0 -1
- package/dist/elements/p-489807e5.js +0 -1
- package/dist/elements/p-4ad72d54.entry.js +0 -1
- package/dist/elements/p-4cca7b5e.entry.js +0 -1
- package/dist/elements/p-4f24d306.js +0 -1
- package/dist/elements/p-519d6a53.entry.js +0 -1
- package/dist/elements/p-536e8e52.entry.js +0 -1
- package/dist/elements/p-599bb53f.entry.js +0 -1
- package/dist/elements/p-5eb7a546.js +0 -1
- package/dist/elements/p-60df2bed.entry.js +0 -1
- package/dist/elements/p-65133e33.js +0 -1
- package/dist/elements/p-6693fce8.js +0 -1
- package/dist/elements/p-689bdcc1.entry.js +0 -1
- package/dist/elements/p-70713b3d.entry.js +0 -1
- package/dist/elements/p-707d5d76.js +0 -1
- package/dist/elements/p-7212b7f2.js +0 -1
- package/dist/elements/p-73992898.entry.js +0 -1
- package/dist/elements/p-792c1e0f.entry.js +0 -1
- package/dist/elements/p-7e5300af.js +0 -2
- package/dist/elements/p-8068987c.entry.js +0 -1
- package/dist/elements/p-83accf46.entry.js +0 -1
- package/dist/elements/p-86635d06.entry.js +0 -1
- package/dist/elements/p-874c2b44.js +0 -1
- package/dist/elements/p-89c12ce8.entry.js +0 -1
- package/dist/elements/p-8bcba3f7.entry.js +0 -1
- package/dist/elements/p-8c759f51.entry.js +0 -1
- package/dist/elements/p-8f945e6b.entry.js +0 -1
- package/dist/elements/p-9300ab6a.js +0 -1
- package/dist/elements/p-93cacd51.entry.js +0 -1
- package/dist/elements/p-9408d0b4.entry.js +0 -1
- package/dist/elements/p-98c79eda.js +0 -1
- package/dist/elements/p-99f8abed.js +0 -1
- package/dist/elements/p-9ca7e079.js +0 -1
- package/dist/elements/p-a4648b74.entry.js +0 -1
- package/dist/elements/p-aab0f63c.js +0 -1
- package/dist/elements/p-ad4e2295.entry.js +0 -1
- package/dist/elements/p-afb8f7d5.entry.js +0 -1
- package/dist/elements/p-b055ec44.js +0 -1
- package/dist/elements/p-b078d63b.entry.js +0 -1
- package/dist/elements/p-b3460325.entry.js +0 -1
- package/dist/elements/p-b5406b58.entry.js +0 -1
- package/dist/elements/p-b5ef0c91.entry.js +0 -1
- package/dist/elements/p-b6ba623e.entry.js +0 -1
- package/dist/elements/p-b9926d8b.entry.js +0 -1
- package/dist/elements/p-bfd4cfcd.entry.js +0 -1
- package/dist/elements/p-c08dd7d0.entry.js +0 -1
- package/dist/elements/p-c0db9c51.entry.js +0 -1
- package/dist/elements/p-c1e7fbfb.js +0 -1
- package/dist/elements/p-ca69d6c9.js +0 -1
- package/dist/elements/p-cc4cb1ac.entry.js +0 -1
- package/dist/elements/p-cf8a7031.entry.js +0 -1
- package/dist/elements/p-cff82b6f.js +0 -1
- package/dist/elements/p-d01009b8.entry.js +0 -67
- package/dist/elements/p-d6d1e65f.entry.js +0 -1
- package/dist/elements/p-d9462b66.entry.js +0 -1
- package/dist/elements/p-e2e0fee9.entry.js +0 -1
- package/dist/elements/p-e642b266.entry.js +0 -1
- package/dist/elements/p-e953934f.entry.js +0 -1
- package/dist/elements/p-f0474f46.js +0 -1
- package/dist/elements/p-f10a94f6.entry.js +0 -1
- package/dist/elements/p-f2426182.entry.js +0 -1
- package/dist/elements/p-f327fd21.js +0 -1
- package/dist/elements/p-f84987ee.js +0 -1
- package/dist/elements/p-f8a3367d.entry.js +0 -1
- package/dist/esm/focus-visible-edb28f19.js +0 -43
- package/dist/esm/framework-delegate-9cd8048f.js +0 -34
- package/dist/esm/ion-action-sheet.entry.js +0 -261
- package/dist/esm/ion-note.entry.js +0 -25
- package/dist/esm/ion-select-popover.entry.js +0 -31
- package/dist/esm/spinner-configs-aaf2a1a9.js +0 -110
- package/dist/esm/swipe-back-d84cfc8a.js +0 -50
- package/dist/esm/test-component.entry.js +0 -9
- package/dist/types/test/TestComponent.d.ts +0 -2
- package/dist/types/test/mockPodOS.d.ts +0 -11
- package/dist/types/test/renderFunctionalComponent.d.ts +0 -1
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
const HapticEngine = {
|
|
5
|
+
getEngine() {
|
|
6
|
+
var _a;
|
|
7
|
+
const win = window;
|
|
8
|
+
return win.TapticEngine || (((_a = win.Capacitor) === null || _a === void 0 ? void 0 : _a.isPluginAvailable('Haptics')) && win.Capacitor.Plugins.Haptics);
|
|
9
|
+
},
|
|
10
|
+
available() {
|
|
11
|
+
var _a;
|
|
12
|
+
const win = window;
|
|
13
|
+
const engine = this.getEngine();
|
|
14
|
+
if (!engine) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Developers can manually import the
|
|
19
|
+
* Haptics plugin in their app which will cause
|
|
20
|
+
* getEngine to return the Haptics engine. However,
|
|
21
|
+
* the Haptics engine will throw an error if
|
|
22
|
+
* used in a web browser that does not support
|
|
23
|
+
* the Vibrate API. This check avoids that error
|
|
24
|
+
* if the browser does not support the Vibrate API.
|
|
25
|
+
*/
|
|
26
|
+
if (((_a = win.Capacitor) === null || _a === void 0 ? void 0 : _a.getPlatform()) === 'web') {
|
|
27
|
+
return typeof navigator !== 'undefined' && navigator.vibrate !== undefined;
|
|
28
|
+
}
|
|
29
|
+
return true;
|
|
30
|
+
},
|
|
31
|
+
isCordova() {
|
|
32
|
+
return !!window.TapticEngine;
|
|
33
|
+
},
|
|
34
|
+
isCapacitor() {
|
|
35
|
+
const win = window;
|
|
36
|
+
return !!win.Capacitor;
|
|
37
|
+
},
|
|
38
|
+
impact(options) {
|
|
39
|
+
const engine = this.getEngine();
|
|
40
|
+
if (!engine) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const style = this.isCapacitor() ? options.style.toUpperCase() : options.style;
|
|
44
|
+
engine.impact({ style });
|
|
45
|
+
},
|
|
46
|
+
notification(options) {
|
|
47
|
+
const engine = this.getEngine();
|
|
48
|
+
if (!engine) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const style = this.isCapacitor() ? options.style.toUpperCase() : options.style;
|
|
52
|
+
engine.notification({ style });
|
|
53
|
+
},
|
|
54
|
+
selection() {
|
|
55
|
+
this.impact({ style: 'light' });
|
|
56
|
+
},
|
|
57
|
+
selectionStart() {
|
|
58
|
+
const engine = this.getEngine();
|
|
59
|
+
if (!engine) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (this.isCapacitor()) {
|
|
63
|
+
engine.selectionStart();
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
engine.gestureSelectionStart();
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
selectionChanged() {
|
|
70
|
+
const engine = this.getEngine();
|
|
71
|
+
if (!engine) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (this.isCapacitor()) {
|
|
75
|
+
engine.selectionChanged();
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
engine.gestureSelectionChanged();
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
selectionEnd() {
|
|
82
|
+
const engine = this.getEngine();
|
|
83
|
+
if (!engine) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (this.isCapacitor()) {
|
|
87
|
+
engine.selectionEnd();
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
engine.gestureSelectionEnd();
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Check to see if the Haptic Plugin is available
|
|
96
|
+
* @return Returns `true` or false if the plugin is available
|
|
97
|
+
*/
|
|
98
|
+
const hapticAvailable = () => {
|
|
99
|
+
return HapticEngine.available();
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Trigger a selection changed haptic event. Good for one-time events
|
|
103
|
+
* (not for gestures)
|
|
104
|
+
*/
|
|
105
|
+
const hapticSelection = () => {
|
|
106
|
+
hapticAvailable() && HapticEngine.selection();
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Tell the haptic engine that a gesture for a selection change is starting.
|
|
110
|
+
*/
|
|
111
|
+
const hapticSelectionStart = () => {
|
|
112
|
+
hapticAvailable() && HapticEngine.selectionStart();
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Tell the haptic engine that a selection changed during a gesture.
|
|
116
|
+
*/
|
|
117
|
+
const hapticSelectionChanged = () => {
|
|
118
|
+
hapticAvailable() && HapticEngine.selectionChanged();
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Tell the haptic engine we are done with a gesture. This needs to be
|
|
122
|
+
* called lest resources are not properly recycled.
|
|
123
|
+
*/
|
|
124
|
+
const hapticSelectionEnd = () => {
|
|
125
|
+
hapticAvailable() && HapticEngine.selectionEnd();
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Use this to indicate success/failure/warning to the user.
|
|
129
|
+
* options should be of the type `{ style: 'light' }` (or `medium`/`heavy`)
|
|
130
|
+
*/
|
|
131
|
+
const hapticImpact = (options) => {
|
|
132
|
+
hapticAvailable() && HapticEngine.impact(options);
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export { hapticSelectionStart as a, hapticSelectionChanged as b, hapticSelectionEnd as c, hapticSelection as d, hapticImpact as h };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* When hardwareBackButton: false in config,
|
|
6
|
+
* we need to make sure we also block the default
|
|
7
|
+
* webview behavior. If we don't then it will be
|
|
8
|
+
* possible for users to navigate backward while
|
|
9
|
+
* an overlay is still open. Additionally, it will
|
|
10
|
+
* give the appearance that the hardwareBackButton
|
|
11
|
+
* config is not working as the page transition
|
|
12
|
+
* will still happen.
|
|
13
|
+
*/
|
|
14
|
+
const blockHardwareBackButton = () => {
|
|
15
|
+
document.addEventListener('backbutton', () => { }); // eslint-disable-line
|
|
16
|
+
};
|
|
17
|
+
const startHardwareBackButton = () => {
|
|
18
|
+
const doc = document;
|
|
19
|
+
let busy = false;
|
|
20
|
+
doc.addEventListener('backbutton', () => {
|
|
21
|
+
if (busy) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
let index = 0;
|
|
25
|
+
let handlers = [];
|
|
26
|
+
const ev = new CustomEvent('ionBackButton', {
|
|
27
|
+
bubbles: false,
|
|
28
|
+
detail: {
|
|
29
|
+
register(priority, handler) {
|
|
30
|
+
handlers.push({ priority, handler, id: index++ });
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
doc.dispatchEvent(ev);
|
|
35
|
+
const executeAction = async (handlerRegister) => {
|
|
36
|
+
try {
|
|
37
|
+
if (handlerRegister === null || handlerRegister === void 0 ? void 0 : handlerRegister.handler) {
|
|
38
|
+
const result = handlerRegister.handler(processHandlers);
|
|
39
|
+
if (result != null) {
|
|
40
|
+
await result;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
catch (e) {
|
|
45
|
+
console.error(e);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const processHandlers = () => {
|
|
49
|
+
if (handlers.length > 0) {
|
|
50
|
+
let selectedHandler = {
|
|
51
|
+
priority: Number.MIN_SAFE_INTEGER,
|
|
52
|
+
handler: () => undefined,
|
|
53
|
+
id: -1,
|
|
54
|
+
};
|
|
55
|
+
handlers.forEach((handler) => {
|
|
56
|
+
if (handler.priority >= selectedHandler.priority) {
|
|
57
|
+
selectedHandler = handler;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
busy = true;
|
|
61
|
+
handlers = handlers.filter((handler) => handler.id !== selectedHandler.id);
|
|
62
|
+
executeAction(selectedHandler).then(() => (busy = false));
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
processHandlers();
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
const OVERLAY_BACK_BUTTON_PRIORITY = 100;
|
|
69
|
+
const MENU_BACK_BUTTON_PRIORITY = 99; // 1 less than overlay priority since menu is displayed behind overlays
|
|
70
|
+
|
|
71
|
+
export { MENU_BACK_BUTTON_PRIORITY, OVERLAY_BACK_BUTTON_PRIORITY, blockHardwareBackButton, startHardwareBackButton };
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
const transitionEndAsync = (el, expectedDuration = 0) => {
|
|
5
|
+
return new Promise((resolve) => {
|
|
6
|
+
transitionEnd(el, expectedDuration, resolve);
|
|
7
|
+
});
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Allows developer to wait for a transition
|
|
11
|
+
* to finish and fallback to a timer if the
|
|
12
|
+
* transition is cancelled or otherwise
|
|
13
|
+
* never finishes. Also see transitionEndAsync
|
|
14
|
+
* which is an await-able version of this.
|
|
15
|
+
*/
|
|
16
|
+
const transitionEnd = (el, expectedDuration = 0, callback) => {
|
|
17
|
+
let unRegTrans;
|
|
18
|
+
let animationTimeout;
|
|
19
|
+
const opts = { passive: true };
|
|
20
|
+
const ANIMATION_FALLBACK_TIMEOUT = 500;
|
|
21
|
+
const unregister = () => {
|
|
22
|
+
if (unRegTrans) {
|
|
23
|
+
unRegTrans();
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const onTransitionEnd = (ev) => {
|
|
27
|
+
if (ev === undefined || el === ev.target) {
|
|
28
|
+
unregister();
|
|
29
|
+
callback(ev);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
if (el) {
|
|
33
|
+
el.addEventListener('webkitTransitionEnd', onTransitionEnd, opts);
|
|
34
|
+
el.addEventListener('transitionend', onTransitionEnd, opts);
|
|
35
|
+
animationTimeout = setTimeout(onTransitionEnd, expectedDuration + ANIMATION_FALLBACK_TIMEOUT);
|
|
36
|
+
unRegTrans = () => {
|
|
37
|
+
if (animationTimeout) {
|
|
38
|
+
clearTimeout(animationTimeout);
|
|
39
|
+
animationTimeout = undefined;
|
|
40
|
+
}
|
|
41
|
+
el.removeEventListener('webkitTransitionEnd', onTransitionEnd, opts);
|
|
42
|
+
el.removeEventListener('transitionend', onTransitionEnd, opts);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
return unregister;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Waits for a component to be ready for
|
|
49
|
+
* both custom element and non-custom element builds.
|
|
50
|
+
* If non-custom element build, el.componentOnReady
|
|
51
|
+
* will be used.
|
|
52
|
+
* For custom element builds, we wait a frame
|
|
53
|
+
* so that the inner contents of the component
|
|
54
|
+
* have a chance to render.
|
|
55
|
+
*
|
|
56
|
+
* Use this utility rather than calling
|
|
57
|
+
* el.componentOnReady yourself.
|
|
58
|
+
*/
|
|
59
|
+
const componentOnReady = (el, callback) => {
|
|
60
|
+
if (el.componentOnReady) {
|
|
61
|
+
// eslint-disable-next-line custom-rules/no-component-on-ready-method
|
|
62
|
+
el.componentOnReady().then((resolvedEl) => callback(resolvedEl));
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
raf(() => callback(el));
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Elements inside of web components sometimes need to inherit global attributes
|
|
70
|
+
* set on the host. For example, the inner input in `ion-input` should inherit
|
|
71
|
+
* the `title` attribute that developers set directly on `ion-input`. This
|
|
72
|
+
* helper function should be called in componentWillLoad and assigned to a variable
|
|
73
|
+
* that is later used in the render function.
|
|
74
|
+
*
|
|
75
|
+
* This does not need to be reactive as changing attributes on the host element
|
|
76
|
+
* does not trigger a re-render.
|
|
77
|
+
*/
|
|
78
|
+
const inheritAttributes = (el, attributes = []) => {
|
|
79
|
+
const attributeObject = {};
|
|
80
|
+
attributes.forEach((attr) => {
|
|
81
|
+
if (el.hasAttribute(attr)) {
|
|
82
|
+
const value = el.getAttribute(attr);
|
|
83
|
+
if (value !== null) {
|
|
84
|
+
attributeObject[attr] = el.getAttribute(attr);
|
|
85
|
+
}
|
|
86
|
+
el.removeAttribute(attr);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
return attributeObject;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* List of available ARIA attributes + `role`.
|
|
93
|
+
* Removed deprecated attributes.
|
|
94
|
+
* https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes
|
|
95
|
+
*/
|
|
96
|
+
const ariaAttributes = [
|
|
97
|
+
'role',
|
|
98
|
+
'aria-activedescendant',
|
|
99
|
+
'aria-atomic',
|
|
100
|
+
'aria-autocomplete',
|
|
101
|
+
'aria-braillelabel',
|
|
102
|
+
'aria-brailleroledescription',
|
|
103
|
+
'aria-busy',
|
|
104
|
+
'aria-checked',
|
|
105
|
+
'aria-colcount',
|
|
106
|
+
'aria-colindex',
|
|
107
|
+
'aria-colindextext',
|
|
108
|
+
'aria-colspan',
|
|
109
|
+
'aria-controls',
|
|
110
|
+
'aria-current',
|
|
111
|
+
'aria-describedby',
|
|
112
|
+
'aria-description',
|
|
113
|
+
'aria-details',
|
|
114
|
+
'aria-disabled',
|
|
115
|
+
'aria-errormessage',
|
|
116
|
+
'aria-expanded',
|
|
117
|
+
'aria-flowto',
|
|
118
|
+
'aria-haspopup',
|
|
119
|
+
'aria-hidden',
|
|
120
|
+
'aria-invalid',
|
|
121
|
+
'aria-keyshortcuts',
|
|
122
|
+
'aria-label',
|
|
123
|
+
'aria-labelledby',
|
|
124
|
+
'aria-level',
|
|
125
|
+
'aria-live',
|
|
126
|
+
'aria-multiline',
|
|
127
|
+
'aria-multiselectable',
|
|
128
|
+
'aria-orientation',
|
|
129
|
+
'aria-owns',
|
|
130
|
+
'aria-placeholder',
|
|
131
|
+
'aria-posinset',
|
|
132
|
+
'aria-pressed',
|
|
133
|
+
'aria-readonly',
|
|
134
|
+
'aria-relevant',
|
|
135
|
+
'aria-required',
|
|
136
|
+
'aria-roledescription',
|
|
137
|
+
'aria-rowcount',
|
|
138
|
+
'aria-rowindex',
|
|
139
|
+
'aria-rowindextext',
|
|
140
|
+
'aria-rowspan',
|
|
141
|
+
'aria-selected',
|
|
142
|
+
'aria-setsize',
|
|
143
|
+
'aria-sort',
|
|
144
|
+
'aria-valuemax',
|
|
145
|
+
'aria-valuemin',
|
|
146
|
+
'aria-valuenow',
|
|
147
|
+
'aria-valuetext',
|
|
148
|
+
];
|
|
149
|
+
/**
|
|
150
|
+
* Returns an array of aria attributes that should be copied from
|
|
151
|
+
* the shadow host element to a target within the light DOM.
|
|
152
|
+
* @param el The element that the attributes should be copied from.
|
|
153
|
+
* @param ignoreList The list of aria-attributes to ignore reflecting and removing from the host.
|
|
154
|
+
* Use this in instances where we manually specify aria attributes on the `<Host>` element.
|
|
155
|
+
*/
|
|
156
|
+
const inheritAriaAttributes = (el, ignoreList) => {
|
|
157
|
+
let attributesToInherit = ariaAttributes;
|
|
158
|
+
if (ignoreList && ignoreList.length > 0) {
|
|
159
|
+
attributesToInherit = attributesToInherit.filter((attr) => !ignoreList.includes(attr));
|
|
160
|
+
}
|
|
161
|
+
return inheritAttributes(el, attributesToInherit);
|
|
162
|
+
};
|
|
163
|
+
const addEventListener = (el, eventName, callback, opts) => {
|
|
164
|
+
var _a;
|
|
165
|
+
if (typeof window !== 'undefined') {
|
|
166
|
+
const win = window;
|
|
167
|
+
const config = (_a = win === null || win === void 0 ? void 0 : win.Ionic) === null || _a === void 0 ? void 0 : _a.config;
|
|
168
|
+
if (config) {
|
|
169
|
+
const ael = config.get('_ael');
|
|
170
|
+
if (ael) {
|
|
171
|
+
return ael(el, eventName, callback, opts);
|
|
172
|
+
}
|
|
173
|
+
else if (config._ael) {
|
|
174
|
+
return config._ael(el, eventName, callback, opts);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return el.addEventListener(eventName, callback, opts);
|
|
179
|
+
};
|
|
180
|
+
const removeEventListener = (el, eventName, callback, opts) => {
|
|
181
|
+
var _a;
|
|
182
|
+
if (typeof window !== 'undefined') {
|
|
183
|
+
const win = window;
|
|
184
|
+
const config = (_a = win === null || win === void 0 ? void 0 : win.Ionic) === null || _a === void 0 ? void 0 : _a.config;
|
|
185
|
+
if (config) {
|
|
186
|
+
const rel = config.get('_rel');
|
|
187
|
+
if (rel) {
|
|
188
|
+
return rel(el, eventName, callback, opts);
|
|
189
|
+
}
|
|
190
|
+
else if (config._rel) {
|
|
191
|
+
return config._rel(el, eventName, callback, opts);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return el.removeEventListener(eventName, callback, opts);
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Gets the root context of a shadow dom element
|
|
199
|
+
* On newer browsers this will be the shadowRoot,
|
|
200
|
+
* but for older browser this may just be the
|
|
201
|
+
* element itself.
|
|
202
|
+
*
|
|
203
|
+
* Useful for whenever you need to explicitly
|
|
204
|
+
* do "myElement.shadowRoot!.querySelector(...)".
|
|
205
|
+
*/
|
|
206
|
+
const getElementRoot = (el, fallback = el) => {
|
|
207
|
+
return el.shadowRoot || fallback;
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Patched version of requestAnimationFrame that avoids ngzone
|
|
211
|
+
* Use only when you know ngzone should not run
|
|
212
|
+
*/
|
|
213
|
+
const raf = (h) => {
|
|
214
|
+
if (typeof __zone_symbol__requestAnimationFrame === 'function') {
|
|
215
|
+
return __zone_symbol__requestAnimationFrame(h);
|
|
216
|
+
}
|
|
217
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
218
|
+
return requestAnimationFrame(h);
|
|
219
|
+
}
|
|
220
|
+
return setTimeout(h);
|
|
221
|
+
};
|
|
222
|
+
const hasShadowDom = (el) => {
|
|
223
|
+
return !!el.shadowRoot && !!el.attachShadow;
|
|
224
|
+
};
|
|
225
|
+
const findItemLabel = (componentEl) => {
|
|
226
|
+
const itemEl = componentEl.closest('ion-item');
|
|
227
|
+
if (itemEl) {
|
|
228
|
+
return itemEl.querySelector('ion-label');
|
|
229
|
+
}
|
|
230
|
+
return null;
|
|
231
|
+
};
|
|
232
|
+
const focusElement = (el) => {
|
|
233
|
+
el.focus();
|
|
234
|
+
/**
|
|
235
|
+
* When programmatically focusing an element,
|
|
236
|
+
* the focus-visible utility will not run because
|
|
237
|
+
* it is expecting a keyboard event to have triggered this;
|
|
238
|
+
* however, there are times when we need to manually control
|
|
239
|
+
* this behavior so we call the `setFocus` method on ion-app
|
|
240
|
+
* which will let us explicitly set the elements to focus.
|
|
241
|
+
*/
|
|
242
|
+
if (el.classList.contains('ion-focusable')) {
|
|
243
|
+
const app = el.closest('ion-app');
|
|
244
|
+
if (app) {
|
|
245
|
+
app.setFocus([el]);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
/**
|
|
250
|
+
* This method is used for Ionic's input components that use Shadow DOM. In
|
|
251
|
+
* order to properly label the inputs to work with screen readers, we need
|
|
252
|
+
* to get the text content of the label outside of the shadow root and pass
|
|
253
|
+
* it to the input inside of the shadow root.
|
|
254
|
+
*
|
|
255
|
+
* Referencing label elements by id from outside of the component is
|
|
256
|
+
* impossible due to the shadow boundary, read more here:
|
|
257
|
+
* https://developer.salesforce.com/blogs/2020/01/accessibility-for-web-components.html
|
|
258
|
+
*
|
|
259
|
+
* @param componentEl The shadow element that needs the aria label
|
|
260
|
+
* @param inputId The unique identifier for the input
|
|
261
|
+
*/
|
|
262
|
+
const getAriaLabel = (componentEl, inputId) => {
|
|
263
|
+
let labelText;
|
|
264
|
+
// If the user provides their own label via the aria-labelledby attr
|
|
265
|
+
// we should use that instead of looking for an ion-label
|
|
266
|
+
const labelledBy = componentEl.getAttribute('aria-labelledby');
|
|
267
|
+
// Grab the id off of the component in case they are using
|
|
268
|
+
// a custom label using the label element
|
|
269
|
+
const componentId = componentEl.id;
|
|
270
|
+
let labelId = labelledBy !== null && labelledBy.trim() !== '' ? labelledBy : inputId + '-lbl';
|
|
271
|
+
let label = labelledBy !== null && labelledBy.trim() !== '' ? document.getElementById(labelledBy) : findItemLabel(componentEl);
|
|
272
|
+
if (label) {
|
|
273
|
+
if (labelledBy === null) {
|
|
274
|
+
label.id = labelId;
|
|
275
|
+
}
|
|
276
|
+
labelText = label.textContent;
|
|
277
|
+
label.setAttribute('aria-hidden', 'true');
|
|
278
|
+
// if there is no label, check to see if the user has provided
|
|
279
|
+
// one by setting an id on the component and using the label element
|
|
280
|
+
}
|
|
281
|
+
else if (componentId.trim() !== '') {
|
|
282
|
+
label = document.querySelector(`label[for="${componentId}"]`);
|
|
283
|
+
if (label) {
|
|
284
|
+
if (label.id !== '') {
|
|
285
|
+
labelId = label.id;
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
label.id = labelId = `${componentId}-lbl`;
|
|
289
|
+
}
|
|
290
|
+
labelText = label.textContent;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return { label, labelId, labelText };
|
|
294
|
+
};
|
|
295
|
+
/**
|
|
296
|
+
* This method is used to add a hidden input to a host element that contains
|
|
297
|
+
* a Shadow DOM. It does not add the input inside of the Shadow root which
|
|
298
|
+
* allows it to be picked up inside of forms. It should contain the same
|
|
299
|
+
* values as the host element.
|
|
300
|
+
*
|
|
301
|
+
* @param always Add a hidden input even if the container does not use Shadow
|
|
302
|
+
* @param container The element where the input will be added
|
|
303
|
+
* @param name The name of the input
|
|
304
|
+
* @param value The value of the input
|
|
305
|
+
* @param disabled If true, the input is disabled
|
|
306
|
+
*/
|
|
307
|
+
const renderHiddenInput = (always, container, name, value, disabled) => {
|
|
308
|
+
if (always || hasShadowDom(container)) {
|
|
309
|
+
let input = container.querySelector('input.aux-input');
|
|
310
|
+
if (!input) {
|
|
311
|
+
input = container.ownerDocument.createElement('input');
|
|
312
|
+
input.type = 'hidden';
|
|
313
|
+
input.classList.add('aux-input');
|
|
314
|
+
container.appendChild(input);
|
|
315
|
+
}
|
|
316
|
+
input.disabled = disabled;
|
|
317
|
+
input.name = name;
|
|
318
|
+
input.value = value || '';
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
const clamp = (min, n, max) => {
|
|
322
|
+
return Math.max(min, Math.min(n, max));
|
|
323
|
+
};
|
|
324
|
+
const assert = (actual, reason) => {
|
|
325
|
+
if (!actual) {
|
|
326
|
+
const message = 'ASSERT: ' + reason;
|
|
327
|
+
console.error(message);
|
|
328
|
+
debugger; // eslint-disable-line
|
|
329
|
+
throw new Error(message);
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
const now = (ev) => {
|
|
333
|
+
return ev.timeStamp || Date.now();
|
|
334
|
+
};
|
|
335
|
+
const pointerCoord = (ev) => {
|
|
336
|
+
// get X coordinates for either a mouse click
|
|
337
|
+
// or a touch depending on the given event
|
|
338
|
+
if (ev) {
|
|
339
|
+
const changedTouches = ev.changedTouches;
|
|
340
|
+
if (changedTouches && changedTouches.length > 0) {
|
|
341
|
+
const touch = changedTouches[0];
|
|
342
|
+
return { x: touch.clientX, y: touch.clientY };
|
|
343
|
+
}
|
|
344
|
+
if (ev.pageX !== undefined) {
|
|
345
|
+
return { x: ev.pageX, y: ev.pageY };
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
return { x: 0, y: 0 };
|
|
349
|
+
};
|
|
350
|
+
/**
|
|
351
|
+
* @hidden
|
|
352
|
+
* Given a side, return if it should be on the end
|
|
353
|
+
* based on the value of dir
|
|
354
|
+
* @param side the side
|
|
355
|
+
* @param isRTL whether the application dir is rtl
|
|
356
|
+
*/
|
|
357
|
+
const isEndSide = (side) => {
|
|
358
|
+
const isRTL = document.dir === 'rtl';
|
|
359
|
+
switch (side) {
|
|
360
|
+
case 'start':
|
|
361
|
+
return isRTL;
|
|
362
|
+
case 'end':
|
|
363
|
+
return !isRTL;
|
|
364
|
+
default:
|
|
365
|
+
throw new Error(`"${side}" is not a valid value for [side]. Use "start" or "end" instead.`);
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
const debounceEvent = (event, wait) => {
|
|
369
|
+
const original = event._original || event;
|
|
370
|
+
return {
|
|
371
|
+
_original: event,
|
|
372
|
+
emit: debounce(original.emit.bind(original), wait),
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
const debounce = (func, wait = 0) => {
|
|
376
|
+
let timer;
|
|
377
|
+
return (...args) => {
|
|
378
|
+
clearTimeout(timer);
|
|
379
|
+
timer = setTimeout(func, wait, ...args);
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
/**
|
|
383
|
+
* Check whether the two string maps are shallow equal.
|
|
384
|
+
*
|
|
385
|
+
* undefined is treated as an empty map.
|
|
386
|
+
*
|
|
387
|
+
* @returns whether the keys are the same and the values are shallow equal.
|
|
388
|
+
*/
|
|
389
|
+
const shallowEqualStringMap = (map1, map2) => {
|
|
390
|
+
map1 !== null && map1 !== void 0 ? map1 : (map1 = {});
|
|
391
|
+
map2 !== null && map2 !== void 0 ? map2 : (map2 = {});
|
|
392
|
+
if (map1 === map2) {
|
|
393
|
+
return true;
|
|
394
|
+
}
|
|
395
|
+
const keys1 = Object.keys(map1);
|
|
396
|
+
if (keys1.length !== Object.keys(map2).length) {
|
|
397
|
+
return false;
|
|
398
|
+
}
|
|
399
|
+
for (const k1 of keys1) {
|
|
400
|
+
if (!(k1 in map2)) {
|
|
401
|
+
return false;
|
|
402
|
+
}
|
|
403
|
+
if (map1[k1] !== map2[k1]) {
|
|
404
|
+
return false;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
return true;
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
export { inheritAttributes as a, clamp as b, componentOnReady as c, debounceEvent as d, addEventListener as e, removeEventListener as f, getElementRoot as g, hasShadowDom as h, inheritAriaAttributes as i, renderHiddenInput as j, findItemLabel as k, isEndSide as l, focusElement as m, assert as n, getAriaLabel as o, debounce as p, pointerCoord as q, raf as r, shallowEqualStringMap as s, transitionEndAsync as t, now as u };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* When accessing the window, it is important
|
|
6
|
+
* to account for SSR applications where the
|
|
7
|
+
* window is not available. Code that accesses
|
|
8
|
+
* window when it is not available will crash.
|
|
9
|
+
* Even checking if `window === undefined` will cause
|
|
10
|
+
* apps to crash in SSR.
|
|
11
|
+
*
|
|
12
|
+
* Use win below to access an SSR-safe version
|
|
13
|
+
* of the window.
|
|
14
|
+
*
|
|
15
|
+
* Example 1:
|
|
16
|
+
* Before:
|
|
17
|
+
* if (window.innerWidth > 768) { ... }
|
|
18
|
+
*
|
|
19
|
+
* After:
|
|
20
|
+
* import { win } from 'path/to/this/file';
|
|
21
|
+
* if (win?.innerWidth > 768) { ... }
|
|
22
|
+
*
|
|
23
|
+
* Note: Code inside of this if-block will
|
|
24
|
+
* not run in an SSR environment.
|
|
25
|
+
*/
|
|
26
|
+
const win = typeof window !== 'undefined' ? window : undefined;
|
|
27
|
+
|
|
28
|
+
export { win as w };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Logs a warning to the console with an Ionic prefix
|
|
6
|
+
* to indicate the library that is warning the developer.
|
|
7
|
+
*
|
|
8
|
+
* @param message - The string message to be logged to the console.
|
|
9
|
+
*/
|
|
10
|
+
const printIonWarning = (message, ...params) => {
|
|
11
|
+
return console.warn(`[Ionic Warning]: ${message}`, ...params);
|
|
12
|
+
};
|
|
13
|
+
/*
|
|
14
|
+
* Logs an error to the console with an Ionic prefix
|
|
15
|
+
* to indicate the library that is warning the developer.
|
|
16
|
+
*
|
|
17
|
+
* @param message - The string message to be logged to the console.
|
|
18
|
+
* @param params - Additional arguments to supply to the console.error.
|
|
19
|
+
*/
|
|
20
|
+
const printIonError = (message, ...params) => {
|
|
21
|
+
return console.error(`[Ionic Error]: ${message}`, ...params);
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Prints an error informing developers that an implementation requires an element to be used
|
|
25
|
+
* within a specific selector.
|
|
26
|
+
*
|
|
27
|
+
* @param el The web component element this is requiring the element.
|
|
28
|
+
* @param targetSelectors The selector or selectors that were not found.
|
|
29
|
+
*/
|
|
30
|
+
const printRequiredElementError = (el, ...targetSelectors) => {
|
|
31
|
+
return console.error(`<${el.tagName.toLowerCase()}> must be used inside ${targetSelectors.join(' or ')}.`);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { printIonError as a, printRequiredElementError as b, printIonWarning as p };
|