voyager-ionic-core 7.7.0 → 7.7.2
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/components/action-sheet.js +8 -4
- package/components/alert.js +6 -2
- package/components/ion-loading.js +6 -2
- package/components/ion-modal.js +8 -6
- package/components/ion-picker.js +6 -2
- package/components/ion-toast.js +6 -2
- package/components/item.js +3 -12
- package/components/overlays.js +54 -9
- package/components/popover.js +7 -3
- package/components/select-popover.js +2 -2
- package/dist/cjs/{app-globals-5a17c5e1.js → app-globals-92ad1b3d.js} +1 -1
- package/dist/cjs/{button-active-b8c3f603.js → button-active-2d6520ec.js} +1 -1
- package/dist/cjs/{hardware-back-button-d23873bb.js → hardware-back-button-2696acaf.js} +2 -2
- package/dist/cjs/{index-5a471146.js → index-0ffe376d.js} +25 -22
- package/dist/cjs/{index-8c679cbf.js → index-a43f7a0f.js} +2 -2
- package/dist/cjs/{index-84351d21.js → index-c3580a90.js} +3 -3
- package/dist/cjs/index.cjs.js +8 -8
- package/dist/cjs/ion-accordion_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-action-sheet.cjs.entry.js +13 -9
- package/dist/cjs/ion-alert.cjs.entry.js +11 -7
- package/dist/cjs/ion-app_8.cjs.entry.js +6 -6
- package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-back-button.cjs.entry.js +2 -2
- package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
- package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-button_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-card_5.cjs.entry.js +2 -2
- package/dist/cjs/ion-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ion-chip.cjs.entry.js +2 -2
- package/dist/cjs/ion-col_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime-button.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime_3.cjs.entry.js +10 -6
- package/dist/cjs/ion-fab_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-img.cjs.entry.js +2 -2
- package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-input.cjs.entry.js +2 -2
- package/dist/cjs/ion-item-option_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-item_8.cjs.entry.js +4 -4
- package/dist/cjs/ion-loading.cjs.entry.js +10 -6
- package/dist/cjs/ion-menu_3.cjs.entry.js +5 -5
- package/dist/cjs/ion-modal.cjs.entry.js +12 -10
- package/dist/cjs/ion-nav_2.cjs.entry.js +3 -3
- package/dist/cjs/ion-picker-column-internal.cjs.entry.js +2 -2
- package/dist/cjs/ion-picker-internal.cjs.entry.js +1 -1
- package/dist/cjs/ion-popover.cjs.entry.js +12 -8
- package/dist/cjs/ion-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/ion-radio_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-range.cjs.entry.js +2 -2
- package/dist/cjs/ion-refresher_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-ripple-effect.cjs.entry.js +2 -2
- package/dist/cjs/ion-route_4.cjs.entry.js +2 -2
- package/dist/cjs/ion-searchbar.cjs.entry.js +2 -2
- package/dist/cjs/ion-segment_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-select_3.cjs.entry.js +6 -6
- package/dist/cjs/ion-spinner.cjs.entry.js +2 -2
- package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-text.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ion-toast.cjs.entry.js +10 -6
- package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
- package/dist/cjs/{ionic-global-7358c23e.js → ionic-global-59a10130.js} +1 -1
- package/dist/cjs/ionic.cjs.js +6 -6
- package/dist/cjs/{ios.transition-8e40c54e.js → ios.transition-c3b11cc3.js} +2 -2
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/{md.transition-597a2479.js → md.transition-82a8c649.js} +2 -2
- package/dist/cjs/{overlays-eaf2075f.js → overlays-fb7ca451.js} +55 -11
- package/dist/cjs/{status-tap-b0bfea34.js → status-tap-692f6d32.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/action-sheet/action-sheet.ios.css +13 -1
- package/dist/collection/components/action-sheet/action-sheet.js +9 -5
- package/dist/collection/components/alert/alert.js +8 -4
- package/dist/collection/components/item/item.js +3 -12
- package/dist/collection/components/loading/loading.js +8 -4
- package/dist/collection/components/modal/modal.js +10 -8
- package/dist/collection/components/modal/test/animations/modal.e2e.js +36 -0
- package/dist/collection/components/picker/picker.js +8 -4
- package/dist/collection/components/popover/popover.ios.css +7 -0
- package/dist/collection/components/popover/popover.js +8 -4
- package/dist/collection/components/select-popover/select-popover.ios.css +10 -0
- package/dist/collection/components/select-popover/select-popover.md.css +10 -0
- package/dist/collection/components/toast/test/toast.spec.js +12 -0
- package/dist/collection/components/toast/toast.js +8 -4
- package/dist/collection/utils/overlays.js +53 -8
- package/dist/collection/utils/test/overlays/overlays.e2e.js +33 -0
- package/dist/collection/utils/test/overlays/overlays.spec.js +51 -0
- package/dist/docs.json +23 -23
- package/dist/esm/{app-globals-47226a12.js → app-globals-5cf6195b.js} +1 -1
- package/dist/esm/{button-active-4bee452c.js → button-active-47ac8092.js} +1 -1
- package/dist/esm/{hardware-back-button-f42b9c80.js → hardware-back-button-b410a047.js} +2 -2
- package/dist/esm/{index-4b98143d.js → index-0b4beb69.js} +3 -3
- package/dist/esm/{index-48209844.js → index-47b2066d.js} +2 -2
- package/dist/esm/{index-73881b51.js → index-4c30cddd.js} +25 -22
- package/dist/esm/index.js +8 -8
- package/dist/esm/ion-accordion_2.entry.js +2 -2
- package/dist/esm/ion-action-sheet.entry.js +13 -9
- package/dist/esm/ion-alert.entry.js +11 -7
- package/dist/esm/ion-app_8.entry.js +6 -6
- package/dist/esm/ion-avatar_3.entry.js +2 -2
- package/dist/esm/ion-back-button.entry.js +2 -2
- package/dist/esm/ion-backdrop.entry.js +2 -2
- package/dist/esm/ion-breadcrumb_2.entry.js +2 -2
- package/dist/esm/ion-button_2.entry.js +2 -2
- package/dist/esm/ion-card_5.entry.js +2 -2
- package/dist/esm/ion-checkbox.entry.js +2 -2
- package/dist/esm/ion-chip.entry.js +2 -2
- package/dist/esm/ion-col_3.entry.js +2 -2
- package/dist/esm/ion-datetime-button.entry.js +2 -2
- package/dist/esm/ion-datetime_3.entry.js +10 -6
- package/dist/esm/ion-fab_3.entry.js +2 -2
- package/dist/esm/ion-img.entry.js +2 -2
- package/dist/esm/ion-infinite-scroll_2.entry.js +2 -2
- package/dist/esm/ion-input.entry.js +2 -2
- package/dist/esm/ion-item-option_3.entry.js +2 -2
- package/dist/esm/ion-item_8.entry.js +4 -4
- package/dist/esm/ion-loading.entry.js +10 -6
- package/dist/esm/ion-menu_3.entry.js +5 -5
- package/dist/esm/ion-modal.entry.js +12 -10
- package/dist/esm/ion-nav_2.entry.js +3 -3
- package/dist/esm/ion-picker-column-internal.entry.js +2 -2
- package/dist/esm/ion-picker-internal.entry.js +1 -1
- package/dist/esm/ion-popover.entry.js +12 -8
- package/dist/esm/ion-progress-bar.entry.js +2 -2
- package/dist/esm/ion-radio_2.entry.js +2 -2
- package/dist/esm/ion-range.entry.js +2 -2
- package/dist/esm/ion-refresher_2.entry.js +2 -2
- package/dist/esm/ion-reorder_2.entry.js +2 -2
- package/dist/esm/ion-ripple-effect.entry.js +2 -2
- package/dist/esm/ion-route_4.entry.js +2 -2
- package/dist/esm/ion-searchbar.entry.js +2 -2
- package/dist/esm/ion-segment_2.entry.js +2 -2
- package/dist/esm/ion-select_3.entry.js +6 -6
- package/dist/esm/ion-spinner.entry.js +2 -2
- package/dist/esm/ion-split-pane.entry.js +2 -2
- package/dist/esm/ion-tab-bar_2.entry.js +2 -2
- package/dist/esm/ion-tab_2.entry.js +1 -1
- package/dist/esm/ion-text.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +10 -6
- package/dist/esm/ion-toggle.entry.js +2 -2
- package/dist/esm/{ionic-global-778b7863.js → ionic-global-ad9a1810.js} +1 -1
- package/dist/esm/ionic.js +7 -7
- package/dist/esm/{ios.transition-7ff7381d.js → ios.transition-b76c7020.js} +2 -2
- package/dist/esm/loader.js +6 -6
- package/dist/esm/{md.transition-28a9a26b.js → md.transition-564937a7.js} +2 -2
- package/dist/esm/{overlays-fad5fe01.js → overlays-04a9a43f.js} +56 -11
- package/dist/esm/{status-tap-2b335fb7.js → status-tap-5a95077d.js} +1 -1
- package/dist/esm-es5/app-globals-5cf6195b.js +4 -0
- package/dist/esm-es5/{button-active-4bee452c.js → button-active-47ac8092.js} +1 -1
- package/dist/esm-es5/{hardware-back-button-f42b9c80.js → hardware-back-button-b410a047.js} +1 -1
- package/dist/esm-es5/{index-4b98143d.js → index-0b4beb69.js} +1 -1
- package/dist/esm-es5/{index-48209844.js → index-47b2066d.js} +1 -1
- package/dist/esm-es5/{index-73881b51.js → index-4c30cddd.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
- package/dist/esm-es5/ion-back-button.entry.js +1 -1
- package/dist/esm-es5/ion-backdrop.entry.js +1 -1
- package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
- package/dist/esm-es5/ion-button_2.entry.js +1 -1
- package/dist/esm-es5/ion-card_5.entry.js +1 -1
- package/dist/esm-es5/ion-checkbox.entry.js +1 -1
- package/dist/esm-es5/ion-chip.entry.js +1 -1
- package/dist/esm-es5/ion-col_3.entry.js +1 -1
- package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-fab_3.entry.js +1 -1
- package/dist/esm-es5/ion-img.entry.js +1 -1
- package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
- package/dist/esm-es5/ion-input.entry.js +1 -1
- package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
- package/dist/esm-es5/ion-item_8.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-nav_2.entry.js +1 -1
- package/dist/esm-es5/ion-picker-column-internal.entry.js +1 -1
- package/dist/esm-es5/ion-picker-internal.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-progress-bar.entry.js +1 -1
- package/dist/esm-es5/ion-radio_2.entry.js +1 -1
- package/dist/esm-es5/ion-range.entry.js +1 -1
- package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
- package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
- package/dist/esm-es5/ion-ripple-effect.entry.js +1 -1
- package/dist/esm-es5/ion-route_4.entry.js +1 -1
- package/dist/esm-es5/ion-searchbar.entry.js +1 -1
- package/dist/esm-es5/ion-segment_2.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-spinner.entry.js +1 -1
- package/dist/esm-es5/ion-split-pane.entry.js +1 -1
- package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
- package/dist/esm-es5/ion-tab_2.entry.js +1 -1
- package/dist/esm-es5/ion-text.entry.js +1 -1
- package/dist/esm-es5/ion-textarea.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/ion-toggle.entry.js +1 -1
- package/dist/esm-es5/{ionic-global-778b7863.js → ionic-global-ad9a1810.js} +1 -1
- package/dist/esm-es5/ionic.js +2 -2
- package/dist/esm-es5/{ios.transition-7ff7381d.js → ios.transition-b76c7020.js} +1 -1
- package/dist/esm-es5/loader.js +2 -2
- package/dist/esm-es5/md.transition-564937a7.js +4 -0
- package/dist/esm-es5/overlays-04a9a43f.js +4 -0
- package/dist/esm-es5/{status-tap-2b335fb7.js → status-tap-5a95077d.js} +1 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/ionic.js +1 -1
- package/dist/ionic/{p-ce2eabd5.entry.js → p-027f3674.entry.js} +1 -1
- package/dist/ionic/{p-dce9bc53.entry.js → p-0457213c.entry.js} +1 -1
- package/dist/ionic/{p-9db1e4c5.entry.js → p-05d560ec.entry.js} +1 -1
- package/dist/ionic/p-0b34d3a7.system.js +4 -0
- package/dist/ionic/{p-eb1fdf9f.system.entry.js → p-0e23c289.system.entry.js} +1 -1
- package/dist/ionic/{p-8569d759.system.entry.js → p-1131946f.system.entry.js} +1 -1
- package/dist/ionic/{p-8ddc00f7.js → p-123b4809.js} +1 -1
- package/dist/ionic/{p-5eea8b4c.system.js → p-1636923f.system.js} +1 -1
- package/dist/ionic/{p-333f06ed.entry.js → p-16a61810.entry.js} +1 -1
- package/dist/ionic/p-18beebdf.system.entry.js +4 -0
- package/dist/ionic/{p-e6cfaa07.system.entry.js → p-1924f2e0.system.entry.js} +2 -2
- package/dist/ionic/{p-396c1a55.entry.js → p-1f16d040.entry.js} +1 -1
- package/dist/ionic/{p-e6aaff14.system.entry.js → p-1f19958f.system.entry.js} +1 -1
- package/dist/ionic/p-21ca1f1c.js +4 -0
- package/dist/ionic/{p-df468a8f.entry.js → p-2327064c.entry.js} +1 -1
- package/dist/ionic/{p-5a0c301f.entry.js → p-23c73017.entry.js} +1 -1
- package/dist/ionic/{p-3a98f8db.entry.js → p-275705e5.entry.js} +1 -1
- package/dist/ionic/{p-c6fef62b.system.js → p-2e14c533.system.js} +1 -1
- package/dist/ionic/{p-34947dff.system.entry.js → p-2e1f014a.system.entry.js} +1 -1
- package/dist/ionic/{p-aa7ae6aa.entry.js → p-3079950e.entry.js} +1 -1
- package/dist/ionic/{p-b4d8fe47.js → p-30cd5e7b.js} +1 -1
- package/dist/ionic/{p-b8c4df21.entry.js → p-337ac0f5.entry.js} +1 -1
- package/dist/ionic/{p-9eb4ea47.system.entry.js → p-3471a7c0.system.entry.js} +1 -1
- package/dist/ionic/{p-0e29919c.system.entry.js → p-3481d54e.system.entry.js} +1 -1
- package/dist/ionic/{p-51f08a9f.entry.js → p-396083cc.entry.js} +1 -1
- package/dist/ionic/{p-f88dd429.entry.js → p-3a7de59c.entry.js} +1 -1
- package/dist/ionic/{p-9f6397ce.entry.js → p-3d961d93.entry.js} +1 -1
- package/dist/ionic/p-3e9ad72a.system.entry.js +4 -0
- package/dist/ionic/{p-70026e8f.system.entry.js → p-42a9f663.system.entry.js} +1 -1
- package/dist/ionic/{p-400574bf.entry.js → p-43a5edee.entry.js} +1 -1
- package/dist/ionic/{p-3eb2da31.js → p-49aba878.js} +1 -1
- package/dist/ionic/{p-5e60dbc8.entry.js → p-4fda5c35.entry.js} +1 -1
- package/dist/ionic/{p-3cdbaa49.entry.js → p-502780e4.entry.js} +1 -1
- package/dist/ionic/{p-108f730a.entry.js → p-508a4c87.entry.js} +1 -1
- package/dist/ionic/{p-9f5b40c0.system.entry.js → p-5928fac9.system.entry.js} +1 -1
- package/dist/ionic/p-5b40d967.entry.js +4 -0
- package/dist/ionic/p-5c2ae448.js +4 -0
- package/dist/ionic/{p-a2ad515b.entry.js → p-5c580e89.entry.js} +1 -1
- package/dist/ionic/{p-a02b2d75.entry.js → p-5c6a04bd.entry.js} +1 -1
- package/dist/ionic/{p-30c9e049.system.entry.js → p-5cb5f63d.system.entry.js} +1 -1
- package/dist/ionic/{p-1aa7c019.js → p-5d7e32ce.js} +1 -1
- package/dist/ionic/{p-3a54c070.system.entry.js → p-5e23bea8.system.entry.js} +1 -1
- package/dist/ionic/{p-a114530c.entry.js → p-5f169eba.entry.js} +1 -1
- package/dist/ionic/{p-1c531ca2.entry.js → p-601e17b4.entry.js} +1 -1
- package/dist/ionic/{p-84f589e1.entry.js → p-64761c90.entry.js} +1 -1
- package/dist/ionic/{p-bc2c03d7.system.entry.js → p-64856c3c.system.entry.js} +1 -1
- package/dist/ionic/{p-d181166c.system.entry.js → p-6486e393.system.entry.js} +1 -1
- package/dist/ionic/{p-efe9180b.entry.js → p-64db1331.entry.js} +1 -1
- package/dist/ionic/{p-3f028207.system.js → p-6525a8cd.system.js} +1 -1
- package/dist/ionic/{p-d8607ede.entry.js → p-657ccdd6.entry.js} +1 -1
- package/dist/ionic/p-667e3e2d.entry.js +4 -0
- package/dist/ionic/{p-cd055d60.system.entry.js → p-68ba8e77.system.entry.js} +1 -1
- package/dist/ionic/{p-2f66e177.system.entry.js → p-70e34286.system.entry.js} +1 -1
- package/dist/ionic/{p-df281664.system.entry.js → p-7173ba59.system.entry.js} +1 -1
- package/dist/ionic/{p-20a6513f.system.entry.js → p-717e2526.system.entry.js} +1 -1
- package/dist/ionic/{p-76893257.system.js → p-72fa96bf.system.js} +1 -1
- package/dist/ionic/{p-25b08bc4.system.js → p-74deb358.system.js} +1 -1
- package/dist/ionic/{p-a1bfaa5c.system.entry.js → p-7b1ed642.system.entry.js} +1 -1
- package/dist/ionic/{p-fd3f475f.entry.js → p-7ce40e7b.entry.js} +1 -1
- package/dist/ionic/{p-58e3ae88.system.entry.js → p-86813176.system.entry.js} +1 -1
- package/dist/ionic/{p-0eef8b34.system.entry.js → p-8794fa00.system.entry.js} +1 -1
- package/dist/ionic/{p-a051c371.entry.js → p-88e9052d.entry.js} +1 -1
- package/dist/ionic/{p-b94882a9.system.js → p-89ca4c4b.system.js} +1 -1
- package/dist/ionic/{p-f46775e4.entry.js → p-8e651c29.entry.js} +1 -1
- package/dist/ionic/{p-f97b9cdd.system.entry.js → p-9056778e.system.entry.js} +1 -1
- package/dist/ionic/{p-594ead2f.entry.js → p-91cb3f9a.entry.js} +1 -1
- package/dist/ionic/{p-97eca294.entry.js → p-95d5a097.entry.js} +1 -1
- package/dist/ionic/{p-95c44e02.system.js → p-9cd7ba27.system.js} +1 -1
- package/dist/ionic/{p-fd36799d.system.js → p-9ec7208d.system.js} +1 -1
- package/dist/ionic/{p-4fc40349.system.entry.js → p-a022b684.system.entry.js} +1 -1
- package/dist/ionic/{p-078fd095.system.entry.js → p-a0b28c69.system.entry.js} +1 -1
- package/dist/ionic/{p-eda7a1db.system.entry.js → p-a3df16b9.system.entry.js} +1 -1
- package/dist/ionic/{p-62a3c609.system.js → p-a5951821.system.js} +1 -1
- package/dist/ionic/{p-c569d1c8.entry.js → p-a6e465f5.entry.js} +1 -1
- package/dist/ionic/{p-9a6ab80a.system.entry.js → p-a85d9047.system.entry.js} +1 -1
- package/dist/ionic/{p-88ca4854.entry.js → p-a8a56449.entry.js} +1 -1
- package/dist/ionic/{p-5615cf3f.system.entry.js → p-aaaa615c.system.entry.js} +1 -1
- package/dist/ionic/{p-ac20160b.system.entry.js → p-abcedc15.system.entry.js} +1 -1
- package/dist/ionic/{p-0ae25399.system.entry.js → p-ae35294f.system.entry.js} +1 -1
- package/dist/ionic/{p-6f38d0c5.system.entry.js → p-afd6d696.system.entry.js} +1 -1
- package/dist/ionic/{p-d7260b87.entry.js → p-b0ff8075.entry.js} +1 -1
- package/dist/ionic/{p-e68980ff.system.entry.js → p-b2595011.system.entry.js} +1 -1
- package/dist/ionic/{p-fe92da17.entry.js → p-b6279412.entry.js} +1 -1
- package/dist/ionic/{p-1d8c2cfc.system.entry.js → p-ba97a133.system.entry.js} +1 -1
- package/dist/ionic/{p-38a6fee7.entry.js → p-bd4787eb.entry.js} +1 -1
- package/dist/ionic/p-bdca4784.js +4 -0
- package/dist/ionic/{p-2da0a76c.entry.js → p-bf05cbc7.entry.js} +1 -1
- package/dist/ionic/{p-dbb4c012.entry.js → p-c11bab7e.entry.js} +1 -1
- package/dist/ionic/{p-78edc0cd.system.entry.js → p-c1797ec5.system.entry.js} +1 -1
- package/dist/ionic/{p-d95c8e90.entry.js → p-c308f773.entry.js} +1 -1
- package/dist/ionic/{p-f7b43141.system.entry.js → p-c39cc96d.system.entry.js} +1 -1
- package/dist/ionic/{p-92c2178e.system.entry.js → p-c747f89b.system.entry.js} +1 -1
- package/dist/ionic/{p-a19f5ae1.entry.js → p-cb9e71e0.entry.js} +1 -1
- package/dist/ionic/{p-5f456b3c.system.entry.js → p-cd9a7017.system.entry.js} +1 -1
- package/dist/ionic/{p-20f7a91e.system.entry.js → p-cde3ac34.system.entry.js} +1 -1
- package/dist/ionic/{p-4b2d5b9c.js → p-ceceac26.js} +1 -1
- package/dist/ionic/{p-89b5aff2.entry.js → p-d39ab63d.entry.js} +1 -1
- package/dist/ionic/{p-55d5cd00.system.js → p-d4cadd34.system.js} +1 -1
- package/dist/ionic/{p-c3d041af.entry.js → p-db30f71b.entry.js} +1 -1
- package/dist/ionic/p-dbcba5a2.js +4 -0
- package/dist/ionic/{p-ea8fbf09.entry.js → p-dcb5711d.entry.js} +1 -1
- package/dist/ionic/{p-341b4519.js → p-de55ec45.js} +1 -1
- package/dist/ionic/{p-001010b6.system.js → p-df504a37.system.js} +1 -1
- package/dist/ionic/{p-84879f61.system.entry.js → p-e04b9647.system.entry.js} +1 -1
- package/dist/ionic/{p-dd60faa5.system.entry.js → p-e81bf09e.system.entry.js} +1 -1
- package/dist/ionic/p-e9f9388e.system.js +4 -0
- package/dist/ionic/{p-1f6cdf2c.system.entry.js → p-ea25b4c8.system.entry.js} +1 -1
- package/dist/ionic/{p-8a671f16.entry.js → p-eb07b88f.entry.js} +1 -1
- package/dist/ionic/p-ed7a529f.js +5 -0
- package/dist/ionic/p-edcada2b.system.entry.js +4 -0
- package/dist/ionic/{p-7c32fb95.system.entry.js → p-f0194418.system.entry.js} +1 -1
- package/dist/ionic/{p-ef441122.entry.js → p-f460c7ae.entry.js} +1 -1
- package/dist/ionic/{p-680f96e8.system.entry.js → p-f53d074d.system.entry.js} +1 -1
- package/dist/ionic/{p-d74ca358.entry.js → p-f840d817.entry.js} +1 -1
- package/dist/ionic/{p-044ad008.system.entry.js → p-f8c96502.system.entry.js} +1 -1
- package/dist/ionic/{p-0fd295ef.system.entry.js → p-fb9f8495.system.entry.js} +1 -1
- package/dist/types/components/action-sheet/action-sheet.d.ts +4 -0
- package/dist/types/components/alert/alert.d.ts +4 -0
- package/dist/types/components/loading/loading.d.ts +4 -0
- package/dist/types/components/modal/modal.d.ts +4 -0
- package/dist/types/components/picker/picker.d.ts +4 -0
- package/dist/types/components/popover/popover.d.ts +4 -0
- package/dist/types/components/toast/toast.d.ts +4 -0
- package/dist/types/components.d.ts +7 -7
- package/hydrate/index.d.ts +1 -1
- package/hydrate/index.js +222 -44
- package/package.json +6 -6
- package/dist/esm-es5/app-globals-47226a12.js +0 -4
- package/dist/esm-es5/md.transition-28a9a26b.js +0 -4
- package/dist/esm-es5/overlays-fad5fe01.js +0 -4
- package/dist/ionic/p-0b955124.system.js +0 -4
- package/dist/ionic/p-1375f21f.js +0 -4
- package/dist/ionic/p-41fde260.entry.js +0 -4
- package/dist/ionic/p-52e02877.entry.js +0 -4
- package/dist/ionic/p-62067818.system.entry.js +0 -4
- package/dist/ionic/p-6b02edd6.js +0 -4
- package/dist/ionic/p-86670b91.system.js +0 -4
- package/dist/ionic/p-8f1ce253.js +0 -4
- package/dist/ionic/p-b1f0c48e.system.entry.js +0 -4
- package/dist/ionic/p-b4a95b80.system.entry.js +0 -4
- package/dist/ionic/p-c5c3710c.js +0 -4
- package/dist/ionic/p-e1271366.js +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{__awaiter,__generator}from"tslib";
|
|
2
2
|
/*!
|
|
3
3
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{w as writeTask,r as registerInstance,d as createEvent,e as readTask,h,f as getElement,H as Host}from"./index-73881b51.js";import{g as getTimeGivenProgression}from"./cubic-bezier-fe2083dc.js";import{I as ION_CONTENT_CLASS_SELECTOR,b as ION_CONTENT_ELEMENT_SELECTOR,p as printIonContentErrorMsg,g as getScrollElement}from"./index-eb12ef92.js";import{t as transitionEndAsync,c as componentOnReady,l as clamp,g as getElementRoot,r as raf}from"./helpers-c0b9ca37.js";import{d as hapticImpact,I as ImpactStyle}from"./haptic-554688a5.js";import{b as getIonMode,c as config}from"./ionic-global-778b7863.js";import{c as createAnimation}from"./animation-60dbdd13.js";import{E as ENABLE_HTML_CONTENT_DEFAULT,a as sanitizeDOMString}from"./config-49c88215.js";import{h as caretBackSharp,i as arrowDown}from"./index-f7dc70ba.js";import{S as SPINNERS}from"./spinner-configs-964f7cf3.js";import"./index-9b0d46f4.js";import"./capacitor-59395cbd.js";import"./index-a5d50daf.js";var getRefresherAnimationType=function(e){var r=e.previousElementSibling;var n=r!==null&&r.tagName==="ION-HEADER";return n?"translate":"scale"};var createPullingAnimation=function(e,r,n){return e==="scale"?createScaleAnimation(r,n):createTranslateAnimation(r,n)};var createBaseAnimation=function(e){var r=e.querySelector("ion-spinner");var n=r.shadowRoot.querySelector("circle");var t=e.querySelector(".spinner-arrow-container");var i=e.querySelector(".arrow-container");var s=i?i.querySelector("ion-icon"):null;var o=createAnimation().duration(1e3).easing("ease-out");var a=createAnimation().addElement(t).keyframes([{offset:0,opacity:"0.3"},{offset:.45,opacity:"0.3"},{offset:.55,opacity:"1"},{offset:1,opacity:"1"}]);var f=createAnimation().addElement(n).keyframes([{offset:0,strokeDasharray:"1px, 200px"},{offset:.2,strokeDasharray:"1px, 200px"},{offset:.55,strokeDasharray:"100px, 200px"},{offset:1,strokeDasharray:"100px, 200px"}]);var h=createAnimation().addElement(r).keyframes([{offset:0,transform:"rotate(-90deg)"},{offset:1,transform:"rotate(210deg)"}]);if(i&&s){var l=createAnimation().addElement(i).keyframes([{offset:0,transform:"rotate(0deg)"},{offset:.3,transform:"rotate(0deg)"},{offset:.55,transform:"rotate(280deg)"},{offset:1,transform:"rotate(400deg)"}]);var c=createAnimation().addElement(s).keyframes([{offset:0,transform:"translateX(2px) scale(0)"},{offset:.3,transform:"translateX(2px) scale(0)"},{offset:.55,transform:"translateX(-1.5px) scale(1)"},{offset:1,transform:"translateX(-1.5px) scale(1)"}]);o.addAnimation([l,c])}return o.addAnimation([a,f,h])};var createScaleAnimation=function(e,r){var n=r.clientHeight;var t=createAnimation().addElement(e).keyframes([{offset:0,transform:"scale(0) translateY(-".concat(n,"px)")},{offset:1,transform:"scale(1) translateY(100px)"}]);return createBaseAnimation(e).addAnimation([t])};var createTranslateAnimation=function(e,r){var n=r.clientHeight;var t=createAnimation().addElement(e).keyframes([{offset:0,transform:"translateY(-".concat(n,"px)")},{offset:1,transform:"translateY(100px)"}]);return createBaseAnimation(e).addAnimation([t])};var createSnapBackAnimation=function(e){return createAnimation().duration(125).addElement(e).fromTo("transform","translateY(var(--ion-pulling-refresher-translate, 100px))","translateY(0px)")};var setSpinnerOpacity=function(e,r){e.style.setProperty("opacity",r.toString())};var handleScrollWhilePulling=function(e,r,n){var t=1;writeTask((function(){e.forEach((function(e,i){var s=i*(t/r);var o=t-s;var a=n-s;var f=clamp(0,a/o,1);e.style.setProperty("opacity",f.toString())}))}))};var handleScrollWhileRefreshing=function(e,r){writeTask((function(){e.style.setProperty("--refreshing-rotation-duration",r>=1?"0.5s":"2s");e.style.setProperty("opacity","1")}))};var translateElement=function(e,r,n){if(n===void 0){n=200}if(!e){return Promise.resolve()}var t=transitionEndAsync(e,n);writeTask((function(){e.style.setProperty("transition","".concat(n,"ms all ease-out"));if(r===undefined){e.style.removeProperty("transform")}else{e.style.setProperty("transform","translate3d(0px, ".concat(r,", 0px)"))}}));return t};var supportsRubberBandScrolling=function(){return navigator.maxTouchPoints>0&&CSS.supports("background: -webkit-named-image(apple-pay-logo-black)")};var shouldUseNativeRefresher=function(e,r){return __awaiter(void 0,void 0,void 0,(function(){var n,t,i;return __generator(this,(function(s){switch(s.label){case 0:n=e.querySelector("ion-refresher-content");if(!n){return[2,Promise.resolve(false)]}return[4,new Promise((function(e){return componentOnReady(n,e)}))];case 1:s.sent();t=e.querySelector("ion-refresher-content .refresher-pulling ion-spinner");i=e.querySelector("ion-refresher-content .refresher-refreshing ion-spinner");return[2,t!==null&&i!==null&&(r==="ios"&&supportsRubberBandScrolling()||r==="md")]}}))}))};var refresherIosCss="ion-refresher{top:0;display:none;position:absolute;width:100%;height:60px;pointer-events:none;z-index:-1}@supports (inset-inline-start: 0){ion-refresher{inset-inline-start:0}}@supports not (inset-inline-start: 0){ion-refresher{left:0}:host-context([dir=rtl]) ion-refresher{left:unset;right:unset;right:0}[dir=rtl] ion-refresher{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){ion-refresher:dir(rtl){left:unset;right:unset;right:0}}}ion-refresher.refresher-active{display:block}ion-refresher-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.refresher-pulling,.refresher-refreshing{display:none;width:100%}.refresher-pulling-icon,.refresher-refreshing-icon{-webkit-transform-origin:center;transform-origin:center;-webkit-transition:200ms;transition:200ms;font-size:30px;text-align:center}:host-context([dir=rtl]) .refresher-pulling-icon,:host-context([dir=rtl]) .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}[dir=rtl] .refresher-pulling-icon,[dir=rtl] .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}@supports selector(:dir(rtl)){.refresher-pulling-icon:dir(rtl),.refresher-refreshing-icon:dir(rtl){-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}}.refresher-pulling-text,.refresher-refreshing-text{font-size:16px;text-align:center}ion-refresher-content .arrow-container{display:none}.refresher-pulling ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.refresher-refreshing ion-refresher-content .refresher-refreshing{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-completing ion-refresher-content .refresher-refreshing{display:block}.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-native .refresher-pulling-text,.refresher-native .refresher-refreshing-text{display:none}.refresher-ios .refresher-pulling-icon,.refresher-ios .refresher-refreshing-icon{color:var(--ion-text-color, #000)}.refresher-ios .refresher-pulling-text,.refresher-ios .refresher-refreshing-text{color:var(--ion-text-color, #000)}.refresher-ios .refresher-refreshing .spinner-lines-ios line,.refresher-ios .refresher-refreshing .spinner-lines-small-ios line,.refresher-ios .refresher-refreshing .spinner-crescent circle{stroke:var(--ion-text-color, #000)}.refresher-ios .refresher-refreshing .spinner-bubbles circle,.refresher-ios .refresher-refreshing .spinner-circles circle,.refresher-ios .refresher-refreshing .spinner-dots circle{fill:var(--ion-text-color, #000)}ion-refresher.refresher-native{display:block;z-index:1}ion-refresher.refresher-native ion-spinner{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}.refresher-native .refresher-refreshing ion-spinner{--refreshing-rotation-duration:2s;display:none;-webkit-animation:var(--refreshing-rotation-duration) ease-out refresher-rotate forwards;animation:var(--refreshing-rotation-duration) ease-out refresher-rotate forwards}.refresher-native .refresher-refreshing{display:none;-webkit-animation:250ms linear refresher-pop forwards;animation:250ms linear refresher-pop forwards}.refresher-native ion-spinner{width:32px;height:32px;color:var(--ion-color-step-450, #747577)}.refresher-native.refresher-refreshing .refresher-pulling ion-spinner,.refresher-native.refresher-completing .refresher-pulling ion-spinner{display:none}.refresher-native.refresher-refreshing .refresher-refreshing ion-spinner,.refresher-native.refresher-completing .refresher-refreshing ion-spinner{display:block}.refresher-native.refresher-pulling .refresher-pulling ion-spinner{display:block}.refresher-native.refresher-pulling .refresher-refreshing ion-spinner{display:none}.refresher-native.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0) rotate(180deg);transform:scale(0) rotate(180deg);-webkit-transition:300ms;transition:300ms}@-webkit-keyframes refresher-pop{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}50%{-webkit-transform:scale(1.2);transform:scale(1.2);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes refresher-pop{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}50%{-webkit-transform:scale(1.2);transform:scale(1.2);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes refresher-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}@keyframes refresher-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}";var IonRefresherIosStyle0=refresherIosCss;var refresherMdCss="ion-refresher{top:0;display:none;position:absolute;width:100%;height:60px;pointer-events:none;z-index:-1}@supports (inset-inline-start: 0){ion-refresher{inset-inline-start:0}}@supports not (inset-inline-start: 0){ion-refresher{left:0}:host-context([dir=rtl]) ion-refresher{left:unset;right:unset;right:0}[dir=rtl] ion-refresher{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){ion-refresher:dir(rtl){left:unset;right:unset;right:0}}}ion-refresher.refresher-active{display:block}ion-refresher-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.refresher-pulling,.refresher-refreshing{display:none;width:100%}.refresher-pulling-icon,.refresher-refreshing-icon{-webkit-transform-origin:center;transform-origin:center;-webkit-transition:200ms;transition:200ms;font-size:30px;text-align:center}:host-context([dir=rtl]) .refresher-pulling-icon,:host-context([dir=rtl]) .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}[dir=rtl] .refresher-pulling-icon,[dir=rtl] .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}@supports selector(:dir(rtl)){.refresher-pulling-icon:dir(rtl),.refresher-refreshing-icon:dir(rtl){-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}}.refresher-pulling-text,.refresher-refreshing-text{font-size:16px;text-align:center}ion-refresher-content .arrow-container{display:none}.refresher-pulling ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.refresher-refreshing ion-refresher-content .refresher-refreshing{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-completing ion-refresher-content .refresher-refreshing{display:block}.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-native .refresher-pulling-text,.refresher-native .refresher-refreshing-text{display:none}.refresher-md .refresher-pulling-icon,.refresher-md .refresher-refreshing-icon{color:var(--ion-text-color, #000)}.refresher-md .refresher-pulling-text,.refresher-md .refresher-refreshing-text{color:var(--ion-text-color, #000)}.refresher-md .refresher-refreshing .spinner-lines-md line,.refresher-md .refresher-refreshing .spinner-lines-small-md line,.refresher-md .refresher-refreshing .spinner-crescent circle{stroke:var(--ion-text-color, #000)}.refresher-md .refresher-refreshing .spinner-bubbles circle,.refresher-md .refresher-refreshing .spinner-circles circle,.refresher-md .refresher-refreshing .spinner-dots circle{fill:var(--ion-text-color, #000)}ion-refresher.refresher-native{display:block;z-index:1}ion-refresher.refresher-native ion-spinner{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;width:24px;height:24px;color:var(--ion-color-primary, #3880ff)}ion-refresher.refresher-native .spinner-arrow-container{display:inherit}ion-refresher.refresher-native .arrow-container{display:block;position:absolute;width:24px;height:24px}ion-refresher.refresher-native .arrow-container ion-icon{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;left:0;right:0;bottom:-4px;position:absolute;color:var(--ion-color-primary, #3880ff);font-size:12px}ion-refresher.refresher-native.refresher-pulling ion-refresher-content .refresher-pulling,ion-refresher.refresher-native.refresher-ready ion-refresher-content .refresher-pulling{display:-ms-flexbox;display:flex}ion-refresher.refresher-native.refresher-refreshing ion-refresher-content .refresher-refreshing,ion-refresher.refresher-native.refresher-completing ion-refresher-content .refresher-refreshing,ion-refresher.refresher-native.refresher-cancelling ion-refresher-content .refresher-refreshing{display:-ms-flexbox;display:flex}ion-refresher.refresher-native .refresher-pulling-icon{-webkit-transform:translateY(calc(-100% - 10px));transform:translateY(calc(-100% - 10px))}ion-refresher.refresher-native .refresher-pulling-icon,ion-refresher.refresher-native .refresher-refreshing-icon{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;border-radius:100%;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;display:-ms-flexbox;display:flex;border:1px solid var(--ion-color-step-200, #ececec);background:var(--ion-color-step-250, #ffffff);-webkit-box-shadow:0px 1px 6px rgba(0, 0, 0, 0.1);box-shadow:0px 1px 6px rgba(0, 0, 0, 0.1)}";var IonRefresherMdStyle0=refresherMdCss;var Refresher=function(){function e(e){registerInstance(this,e);this.ionRefresh=createEvent(this,"ionRefresh",7);this.ionPull=createEvent(this,"ionPull",7);this.ionStart=createEvent(this,"ionStart",7);this.appliedStyles=false;this.didStart=false;this.progress=0;this.pointerDown=false;this.needsCompletion=false;this.didRefresh=false;this.lastVelocityY=0;this.animations=[];this.nativeRefresher=false;this.state=1;this.pullMin=60;this.pullMax=this.pullMin+60;this.closeDuration="280ms";this.snapbackDuration="280ms";this.pullFactor=1;this.disabled=false}e.prototype.disabledChanged=function(){if(this.gesture){this.gesture.enable(!this.disabled)}};e.prototype.checkNativeRefresher=function(){return __awaiter(this,void 0,void 0,(function(){var e,r;return __generator(this,(function(n){switch(n.label){case 0:return[4,shouldUseNativeRefresher(this.el,getIonMode(this))];case 1:e=n.sent();if(e&&!this.nativeRefresher){r=this.el.closest("ion-content");this.setupNativeRefresher(r)}else if(!e){this.destroyNativeRefresher()}return[2]}}))}))};e.prototype.destroyNativeRefresher=function(){if(this.scrollEl&&this.scrollListenerCallback){this.scrollEl.removeEventListener("scroll",this.scrollListenerCallback);this.scrollListenerCallback=undefined}this.nativeRefresher=false};e.prototype.resetNativeRefresher=function(e,r){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:this.state=r;if(!(getIonMode(this)==="ios"))return[3,2];return[4,translateElement(e,undefined,300)];case 1:n.sent();return[3,4];case 2:return[4,transitionEndAsync(this.el.querySelector(".refresher-refreshing-icon"),200)];case 3:n.sent();n.label=4;case 4:this.didRefresh=false;this.needsCompletion=false;this.pointerDown=false;this.animations.forEach((function(e){return e.destroy()}));this.animations=[];this.progress=0;this.state=1;return[2]}}))}))};e.prototype.setupiOSNativeRefresher=function(e,r){return __awaiter(this,void 0,void 0,(function(){var n,t,i,s;var o=this;return __generator(this,(function(a){switch(a.label){case 0:this.elementToTransform=this.scrollEl;n=e.shadowRoot.querySelectorAll("svg");t=this.scrollEl.clientHeight*.16;i=n.length;writeTask((function(){return n.forEach((function(e){return e.style.setProperty("animation","none")}))}));this.scrollListenerCallback=function(){if(!o.pointerDown&&o.state===1){return}readTask((function(){var e=o.scrollEl.scrollTop;var s=o.el.clientHeight;if(e>0){if(o.state===8){var a=clamp(0,e/(s*.5),1);writeTask((function(){return setSpinnerOpacity(r,1-a)}));return}return}if(o.pointerDown){if(!o.didStart){o.didStart=true;o.ionStart.emit()}if(o.pointerDown){o.ionPull.emit()}}var f=o.didStart?30:0;var h=o.progress=clamp(0,(Math.abs(e)-f)/t,1);var l=o.state===8||h===1;if(l){if(o.pointerDown){handleScrollWhileRefreshing(r,o.lastVelocityY)}if(!o.didRefresh){o.beginRefresh();o.didRefresh=true;hapticImpact({style:ImpactStyle.Light});if(!o.pointerDown){translateElement(o.elementToTransform,"".concat(s,"px"))}}}else{o.state=2;handleScrollWhilePulling(n,i,h)}}))};this.scrollEl.addEventListener("scroll",this.scrollListenerCallback);s=this;return[4,import("./index-2cf77112.js")];case 1:s.gesture=a.sent().createGesture({el:this.scrollEl,gestureName:"refresher",gesturePriority:31,direction:"y",threshold:5,onStart:function(){o.pointerDown=true;if(!o.didRefresh){translateElement(o.elementToTransform,"0px")}if(t===0){t=o.scrollEl.clientHeight*.16}},onMove:function(e){o.lastVelocityY=e.velocityY},onEnd:function(){o.pointerDown=false;o.didStart=false;if(o.needsCompletion){o.resetNativeRefresher(o.elementToTransform,32);o.needsCompletion=false}else if(o.didRefresh){readTask((function(){return translateElement(o.elementToTransform,"".concat(o.el.clientHeight,"px"))}))}}});this.disabledChanged();return[2]}}))}))};e.prototype.setupMDNativeRefresher=function(e,r,n){return __awaiter(this,void 0,void 0,(function(){var t,i,s,o;var a=this;return __generator(this,(function(f){switch(f.label){case 0:t=getElementRoot(r).querySelector("circle");i=this.el.querySelector("ion-refresher-content .refresher-pulling-icon");s=getElementRoot(n).querySelector("circle");if(t!==null&&s!==null){writeTask((function(){t.style.setProperty("animation","none");n.style.setProperty("animation-delay","-655ms");s.style.setProperty("animation-delay","-655ms")}))}o=this;return[4,import("./index-2cf77112.js")];case 1:o.gesture=f.sent().createGesture({el:this.scrollEl,gestureName:"refresher",gesturePriority:31,direction:"y",threshold:5,canStart:function(){return a.state!==8&&a.state!==32&&a.scrollEl.scrollTop===0},onStart:function(e){a.progress=0;e.data={animation:undefined,didStart:false,cancelled:false}},onMove:function(r){if(r.velocityY<0&&a.progress===0&&!r.data.didStart||r.data.cancelled){r.data.cancelled=true;return}if(!r.data.didStart){r.data.didStart=true;a.state=2;var n=a.scrollEl;var t=n.matches(ION_CONTENT_CLASS_SELECTOR)?"overflow":"--overflow";writeTask((function(){return n.style.setProperty(t,"hidden")}));var s=getRefresherAnimationType(e);var o=createPullingAnimation(s,i,a.el);r.data.animation=o;o.progressStart(false,0);a.ionStart.emit();a.animations.push(o);return}a.progress=clamp(0,r.deltaY/180*.5,1);r.data.animation.progressStep(a.progress);a.ionPull.emit()},onEnd:function(e){if(!e.data.didStart){return}a.gesture.enable(false);var r=a.scrollEl;var n=r.matches(ION_CONTENT_CLASS_SELECTOR)?"overflow":"--overflow";writeTask((function(){return r.style.removeProperty(n)}));if(a.progress<=.4){e.data.animation.progressEnd(0,a.progress,500).onFinish((function(){a.animations.forEach((function(e){return e.destroy()}));a.animations=[];a.gesture.enable(true);a.state=1}));return}var t=getTimeGivenProgression([0,0],[0,0],[1,1],[1,1],a.progress)[0];var s=createSnapBackAnimation(i);a.animations.push(s);writeTask((function(){return __awaiter(a,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:i.style.setProperty("--ion-pulling-refresher-translate","".concat(t*100,"px"));e.data.animation.progressEnd();return[4,s.play()];case 1:r.sent();this.beginRefresh();e.data.animation.destroy();this.gesture.enable(true);return[2]}}))}))}))}});this.disabledChanged();return[2]}}))}))};e.prototype.setupNativeRefresher=function(e){return __awaiter(this,void 0,void 0,(function(){var r,n;return __generator(this,(function(t){if(this.scrollListenerCallback||!e||this.nativeRefresher||!this.scrollEl){return[2]}this.setCss(0,"",false,"");this.nativeRefresher=true;r=this.el.querySelector("ion-refresher-content .refresher-pulling ion-spinner");n=this.el.querySelector("ion-refresher-content .refresher-refreshing ion-spinner");if(getIonMode(this)==="ios"){this.setupiOSNativeRefresher(r,n)}else{this.setupMDNativeRefresher(e,r,n)}return[2]}))}))};e.prototype.componentDidUpdate=function(){this.checkNativeRefresher()};e.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var e;var r=this;return __generator(this,(function(n){if(this.el.getAttribute("slot")!=="fixed"){console.error('Make sure you use: <ion-refresher slot="fixed">');return[2]}e=this.el.closest(ION_CONTENT_ELEMENT_SELECTOR);if(!e){printIonContentErrorMsg(this.el);return[2]}componentOnReady(e,(function(){return __awaiter(r,void 0,void 0,(function(){var r,n,t,i;var s=this;return __generator(this,(function(o){switch(o.label){case 0:r=e.querySelector(ION_CONTENT_CLASS_SELECTOR);n=this;return[4,getScrollElement(r!==null&&r!==void 0?r:e)];case 1:n.scrollEl=o.sent();t=this;return[4,e.getBackgroundElement()];case 2:t.backgroundContentEl=o.sent();return[4,shouldUseNativeRefresher(this.el,getIonMode(this))];case 3:if(!o.sent())return[3,4];this.setupNativeRefresher(e);return[3,6];case 4:i=this;return[4,import("./index-2cf77112.js")];case 5:i.gesture=o.sent().createGesture({el:e,gestureName:"refresher",gesturePriority:31,direction:"y",threshold:20,passive:false,canStart:function(){return s.canStart()},onStart:function(){return s.onStart()},onMove:function(e){return s.onMove(e)},onEnd:function(){return s.onEnd()}});this.disabledChanged();o.label=6;case 6:return[2]}}))}))}));return[2]}))}))};e.prototype.disconnectedCallback=function(){this.destroyNativeRefresher();this.scrollEl=undefined;if(this.gesture){this.gesture.destroy();this.gesture=undefined}};e.prototype.complete=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(r){if(this.nativeRefresher){this.needsCompletion=true;if(!this.pointerDown){raf((function(){return raf((function(){return e.resetNativeRefresher(e.elementToTransform,32)}))}))}}else{this.close(32,"120ms")}return[2]}))}))};e.prototype.cancel=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(r){if(this.nativeRefresher){if(!this.pointerDown){raf((function(){return raf((function(){return e.resetNativeRefresher(e.elementToTransform,16)}))}))}}else{this.close(16,"")}return[2]}))}))};e.prototype.getProgress=function(){return Promise.resolve(this.progress)};e.prototype.canStart=function(){if(!this.scrollEl){return false}if(this.state!==1){return false}if(this.scrollEl.scrollTop>0){return false}return true};e.prototype.onStart=function(){this.progress=0;this.state=1;this.memoizeOverflowStyle()};e.prototype.onMove=function(e){if(!this.scrollEl){return}var r=e.event;if(r.touches!==undefined&&r.touches.length>1){return}if((this.state&56)!==0){return}var n=Number.isNaN(this.pullFactor)||this.pullFactor<0?1:this.pullFactor;var t=e.deltaY*n;if(t<=0){this.progress=0;this.state=1;if(this.appliedStyles){this.setCss(0,"",false,"");return}return}if(this.state===1){var i=this.scrollEl.scrollTop;if(i>0){this.progress=0;return}this.state=2}if(r.cancelable){r.preventDefault()}this.setCss(t,"0ms",true,"");if(t===0){this.progress=0;return}var s=this.pullMin;this.progress=t/s;if(!this.didStart){this.didStart=true;this.ionStart.emit()}this.ionPull.emit();if(t<s){this.state=2;return}if(t>this.pullMax){this.beginRefresh();return}this.state=4;return};e.prototype.onEnd=function(){if(this.state===4){this.beginRefresh()}else if(this.state===2){this.cancel()}else if(this.state===1){this.restoreOverflowStyle()}};e.prototype.beginRefresh=function(){this.state=8;this.setCss(this.pullMin,this.snapbackDuration,true,"");this.ionRefresh.emit({complete:this.complete.bind(this)})};e.prototype.close=function(e,r){var n=this;setTimeout((function(){n.state=1;n.progress=0;n.didStart=false;n.setCss(0,"0ms",false,"",true)}),600);this.state=e;this.setCss(0,this.closeDuration,true,r)};e.prototype.setCss=function(e,r,n,t,i){var s=this;if(i===void 0){i=false}if(this.nativeRefresher){return}this.appliedStyles=e>0;writeTask((function(){if(s.scrollEl&&s.backgroundContentEl){var o=s.scrollEl.style;var a=s.backgroundContentEl.style;o.transform=a.transform=e>0?"translateY(".concat(e,"px) translateZ(0px)"):"";o.transitionDuration=a.transitionDuration=r;o.transitionDelay=a.transitionDelay=t;o.overflow=n?"hidden":""}if(i){s.restoreOverflowStyle()}}))};e.prototype.memoizeOverflowStyle=function(){if(this.scrollEl){var e=this.scrollEl.style,r=e.overflow,n=e.overflowX,t=e.overflowY;this.overflowStyles={overflow:r!==null&&r!==void 0?r:"",overflowX:n!==null&&n!==void 0?n:"",overflowY:t!==null&&t!==void 0?t:""}}};e.prototype.restoreOverflowStyle=function(){if(this.overflowStyles!==undefined&&this.scrollEl!==undefined){var e=this.overflowStyles,r=e.overflow,n=e.overflowX,t=e.overflowY;this.scrollEl.style.overflow=r;this.scrollEl.style.overflowX=n;this.scrollEl.style.overflowY=t;this.overflowStyles=undefined}};e.prototype.render=function(){var e;var r=getIonMode(this);return h(Host,{key:"9cf8e306e367e0ffd99f8a242dce0c9d78f96317",slot:"fixed",class:(e={},e[r]=true,e["refresher-".concat(r)]=true,e["refresher-native"]=this.nativeRefresher,e["refresher-active"]=this.state!==1,e["refresher-pulling"]=this.state===2,e["refresher-ready"]=this.state===4,e["refresher-refreshing"]=this.state===8,e["refresher-cancelling"]=this.state===16,e["refresher-completing"]=this.state===32,e)})};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{disabled:["disabledChanged"]}},enumerable:false,configurable:true});return e}();Refresher.style={ios:IonRefresherIosStyle0,md:IonRefresherMdStyle0};var RefresherContent=function(){function e(e){registerInstance(this,e);this.customHTMLEnabled=config.get("innerHTMLTemplatesEnabled",ENABLE_HTML_CONTENT_DEFAULT);this.pullingIcon=undefined;this.pullingText=undefined;this.refreshingSpinner=undefined;this.refreshingText=undefined}e.prototype.componentWillLoad=function(){if(this.pullingIcon===undefined){var e=supportsRubberBandScrolling();var r=getIonMode(this);var n=e?"lines":arrowDown;this.pullingIcon=config.get("refreshingIcon",r==="ios"&&e?config.get("spinner",n):"circular")}if(this.refreshingSpinner===undefined){var r=getIonMode(this);this.refreshingSpinner=config.get("refreshingSpinner",config.get("spinner",r==="ios"?"lines":"circular"))}};e.prototype.renderPullingText=function(){var e=this,r=e.customHTMLEnabled,n=e.pullingText;if(r){return h("div",{class:"refresher-pulling-text",innerHTML:sanitizeDOMString(n)})}return h("div",{class:"refresher-pulling-text"},n)};e.prototype.renderRefreshingText=function(){var e=this,r=e.customHTMLEnabled,n=e.refreshingText;if(r){return h("div",{class:"refresher-refreshing-text",innerHTML:sanitizeDOMString(n)})}return h("div",{class:"refresher-refreshing-text"},n)};e.prototype.render=function(){var e=this.pullingIcon;var r=e!=null&&SPINNERS[e]!==undefined;var n=getIonMode(this);return h(Host,{key:"537e4d601fd09804d072e9fed9b2c6ba8d890548",class:n},h("div",{key:"67f46df746f7da2fc60c47da9216a2920c25166f",class:"refresher-pulling"},this.pullingIcon&&r&&h("div",{class:"refresher-pulling-icon"},h("div",{class:"spinner-arrow-container"},h("ion-spinner",{name:this.pullingIcon,paused:true}),n==="md"&&this.pullingIcon==="circular"&&h("div",{class:"arrow-container"},h("ion-icon",{icon:caretBackSharp,"aria-hidden":"true"})))),this.pullingIcon&&!r&&h("div",{class:"refresher-pulling-icon"},h("ion-icon",{icon:this.pullingIcon,lazy:false,"aria-hidden":"true"})),this.pullingText!==undefined&&this.renderPullingText()),h("div",{key:"216f96af452e1567df7906c4d9e6fbf8c397ad21",class:"refresher-refreshing"},this.refreshingSpinner&&h("div",{class:"refresher-refreshing-icon"},h("ion-spinner",{name:this.refreshingSpinner})),this.refreshingText!==undefined&&this.renderRefreshingText()))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();export{Refresher as ion_refresher,RefresherContent as ion_refresher_content};
|
|
4
|
+
*/import{w as writeTask,r as registerInstance,d as createEvent,e as readTask,h,f as getElement,H as Host}from"./index-4c30cddd.js";import{g as getTimeGivenProgression}from"./cubic-bezier-fe2083dc.js";import{I as ION_CONTENT_CLASS_SELECTOR,b as ION_CONTENT_ELEMENT_SELECTOR,p as printIonContentErrorMsg,g as getScrollElement}from"./index-eb12ef92.js";import{t as transitionEndAsync,c as componentOnReady,l as clamp,g as getElementRoot,r as raf}from"./helpers-c0b9ca37.js";import{d as hapticImpact,I as ImpactStyle}from"./haptic-554688a5.js";import{b as getIonMode,c as config}from"./ionic-global-ad9a1810.js";import{c as createAnimation}from"./animation-60dbdd13.js";import{E as ENABLE_HTML_CONTENT_DEFAULT,a as sanitizeDOMString}from"./config-49c88215.js";import{h as caretBackSharp,i as arrowDown}from"./index-f7dc70ba.js";import{S as SPINNERS}from"./spinner-configs-964f7cf3.js";import"./index-9b0d46f4.js";import"./capacitor-59395cbd.js";import"./index-a5d50daf.js";var getRefresherAnimationType=function(e){var r=e.previousElementSibling;var n=r!==null&&r.tagName==="ION-HEADER";return n?"translate":"scale"};var createPullingAnimation=function(e,r,n){return e==="scale"?createScaleAnimation(r,n):createTranslateAnimation(r,n)};var createBaseAnimation=function(e){var r=e.querySelector("ion-spinner");var n=r.shadowRoot.querySelector("circle");var t=e.querySelector(".spinner-arrow-container");var i=e.querySelector(".arrow-container");var s=i?i.querySelector("ion-icon"):null;var o=createAnimation().duration(1e3).easing("ease-out");var a=createAnimation().addElement(t).keyframes([{offset:0,opacity:"0.3"},{offset:.45,opacity:"0.3"},{offset:.55,opacity:"1"},{offset:1,opacity:"1"}]);var f=createAnimation().addElement(n).keyframes([{offset:0,strokeDasharray:"1px, 200px"},{offset:.2,strokeDasharray:"1px, 200px"},{offset:.55,strokeDasharray:"100px, 200px"},{offset:1,strokeDasharray:"100px, 200px"}]);var h=createAnimation().addElement(r).keyframes([{offset:0,transform:"rotate(-90deg)"},{offset:1,transform:"rotate(210deg)"}]);if(i&&s){var l=createAnimation().addElement(i).keyframes([{offset:0,transform:"rotate(0deg)"},{offset:.3,transform:"rotate(0deg)"},{offset:.55,transform:"rotate(280deg)"},{offset:1,transform:"rotate(400deg)"}]);var c=createAnimation().addElement(s).keyframes([{offset:0,transform:"translateX(2px) scale(0)"},{offset:.3,transform:"translateX(2px) scale(0)"},{offset:.55,transform:"translateX(-1.5px) scale(1)"},{offset:1,transform:"translateX(-1.5px) scale(1)"}]);o.addAnimation([l,c])}return o.addAnimation([a,f,h])};var createScaleAnimation=function(e,r){var n=r.clientHeight;var t=createAnimation().addElement(e).keyframes([{offset:0,transform:"scale(0) translateY(-".concat(n,"px)")},{offset:1,transform:"scale(1) translateY(100px)"}]);return createBaseAnimation(e).addAnimation([t])};var createTranslateAnimation=function(e,r){var n=r.clientHeight;var t=createAnimation().addElement(e).keyframes([{offset:0,transform:"translateY(-".concat(n,"px)")},{offset:1,transform:"translateY(100px)"}]);return createBaseAnimation(e).addAnimation([t])};var createSnapBackAnimation=function(e){return createAnimation().duration(125).addElement(e).fromTo("transform","translateY(var(--ion-pulling-refresher-translate, 100px))","translateY(0px)")};var setSpinnerOpacity=function(e,r){e.style.setProperty("opacity",r.toString())};var handleScrollWhilePulling=function(e,r,n){var t=1;writeTask((function(){e.forEach((function(e,i){var s=i*(t/r);var o=t-s;var a=n-s;var f=clamp(0,a/o,1);e.style.setProperty("opacity",f.toString())}))}))};var handleScrollWhileRefreshing=function(e,r){writeTask((function(){e.style.setProperty("--refreshing-rotation-duration",r>=1?"0.5s":"2s");e.style.setProperty("opacity","1")}))};var translateElement=function(e,r,n){if(n===void 0){n=200}if(!e){return Promise.resolve()}var t=transitionEndAsync(e,n);writeTask((function(){e.style.setProperty("transition","".concat(n,"ms all ease-out"));if(r===undefined){e.style.removeProperty("transform")}else{e.style.setProperty("transform","translate3d(0px, ".concat(r,", 0px)"))}}));return t};var supportsRubberBandScrolling=function(){return navigator.maxTouchPoints>0&&CSS.supports("background: -webkit-named-image(apple-pay-logo-black)")};var shouldUseNativeRefresher=function(e,r){return __awaiter(void 0,void 0,void 0,(function(){var n,t,i;return __generator(this,(function(s){switch(s.label){case 0:n=e.querySelector("ion-refresher-content");if(!n){return[2,Promise.resolve(false)]}return[4,new Promise((function(e){return componentOnReady(n,e)}))];case 1:s.sent();t=e.querySelector("ion-refresher-content .refresher-pulling ion-spinner");i=e.querySelector("ion-refresher-content .refresher-refreshing ion-spinner");return[2,t!==null&&i!==null&&(r==="ios"&&supportsRubberBandScrolling()||r==="md")]}}))}))};var refresherIosCss="ion-refresher{top:0;display:none;position:absolute;width:100%;height:60px;pointer-events:none;z-index:-1}@supports (inset-inline-start: 0){ion-refresher{inset-inline-start:0}}@supports not (inset-inline-start: 0){ion-refresher{left:0}:host-context([dir=rtl]) ion-refresher{left:unset;right:unset;right:0}[dir=rtl] ion-refresher{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){ion-refresher:dir(rtl){left:unset;right:unset;right:0}}}ion-refresher.refresher-active{display:block}ion-refresher-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.refresher-pulling,.refresher-refreshing{display:none;width:100%}.refresher-pulling-icon,.refresher-refreshing-icon{-webkit-transform-origin:center;transform-origin:center;-webkit-transition:200ms;transition:200ms;font-size:30px;text-align:center}:host-context([dir=rtl]) .refresher-pulling-icon,:host-context([dir=rtl]) .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}[dir=rtl] .refresher-pulling-icon,[dir=rtl] .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}@supports selector(:dir(rtl)){.refresher-pulling-icon:dir(rtl),.refresher-refreshing-icon:dir(rtl){-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}}.refresher-pulling-text,.refresher-refreshing-text{font-size:16px;text-align:center}ion-refresher-content .arrow-container{display:none}.refresher-pulling ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.refresher-refreshing ion-refresher-content .refresher-refreshing{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-completing ion-refresher-content .refresher-refreshing{display:block}.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-native .refresher-pulling-text,.refresher-native .refresher-refreshing-text{display:none}.refresher-ios .refresher-pulling-icon,.refresher-ios .refresher-refreshing-icon{color:var(--ion-text-color, #000)}.refresher-ios .refresher-pulling-text,.refresher-ios .refresher-refreshing-text{color:var(--ion-text-color, #000)}.refresher-ios .refresher-refreshing .spinner-lines-ios line,.refresher-ios .refresher-refreshing .spinner-lines-small-ios line,.refresher-ios .refresher-refreshing .spinner-crescent circle{stroke:var(--ion-text-color, #000)}.refresher-ios .refresher-refreshing .spinner-bubbles circle,.refresher-ios .refresher-refreshing .spinner-circles circle,.refresher-ios .refresher-refreshing .spinner-dots circle{fill:var(--ion-text-color, #000)}ion-refresher.refresher-native{display:block;z-index:1}ion-refresher.refresher-native ion-spinner{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}.refresher-native .refresher-refreshing ion-spinner{--refreshing-rotation-duration:2s;display:none;-webkit-animation:var(--refreshing-rotation-duration) ease-out refresher-rotate forwards;animation:var(--refreshing-rotation-duration) ease-out refresher-rotate forwards}.refresher-native .refresher-refreshing{display:none;-webkit-animation:250ms linear refresher-pop forwards;animation:250ms linear refresher-pop forwards}.refresher-native ion-spinner{width:32px;height:32px;color:var(--ion-color-step-450, #747577)}.refresher-native.refresher-refreshing .refresher-pulling ion-spinner,.refresher-native.refresher-completing .refresher-pulling ion-spinner{display:none}.refresher-native.refresher-refreshing .refresher-refreshing ion-spinner,.refresher-native.refresher-completing .refresher-refreshing ion-spinner{display:block}.refresher-native.refresher-pulling .refresher-pulling ion-spinner{display:block}.refresher-native.refresher-pulling .refresher-refreshing ion-spinner{display:none}.refresher-native.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0) rotate(180deg);transform:scale(0) rotate(180deg);-webkit-transition:300ms;transition:300ms}@-webkit-keyframes refresher-pop{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}50%{-webkit-transform:scale(1.2);transform:scale(1.2);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes refresher-pop{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}50%{-webkit-transform:scale(1.2);transform:scale(1.2);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes refresher-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}@keyframes refresher-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}";var IonRefresherIosStyle0=refresherIosCss;var refresherMdCss="ion-refresher{top:0;display:none;position:absolute;width:100%;height:60px;pointer-events:none;z-index:-1}@supports (inset-inline-start: 0){ion-refresher{inset-inline-start:0}}@supports not (inset-inline-start: 0){ion-refresher{left:0}:host-context([dir=rtl]) ion-refresher{left:unset;right:unset;right:0}[dir=rtl] ion-refresher{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){ion-refresher:dir(rtl){left:unset;right:unset;right:0}}}ion-refresher.refresher-active{display:block}ion-refresher-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.refresher-pulling,.refresher-refreshing{display:none;width:100%}.refresher-pulling-icon,.refresher-refreshing-icon{-webkit-transform-origin:center;transform-origin:center;-webkit-transition:200ms;transition:200ms;font-size:30px;text-align:center}:host-context([dir=rtl]) .refresher-pulling-icon,:host-context([dir=rtl]) .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}[dir=rtl] .refresher-pulling-icon,[dir=rtl] .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}@supports selector(:dir(rtl)){.refresher-pulling-icon:dir(rtl),.refresher-refreshing-icon:dir(rtl){-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}}.refresher-pulling-text,.refresher-refreshing-text{font-size:16px;text-align:center}ion-refresher-content .arrow-container{display:none}.refresher-pulling ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.refresher-refreshing ion-refresher-content .refresher-refreshing{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-completing ion-refresher-content .refresher-refreshing{display:block}.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-native .refresher-pulling-text,.refresher-native .refresher-refreshing-text{display:none}.refresher-md .refresher-pulling-icon,.refresher-md .refresher-refreshing-icon{color:var(--ion-text-color, #000)}.refresher-md .refresher-pulling-text,.refresher-md .refresher-refreshing-text{color:var(--ion-text-color, #000)}.refresher-md .refresher-refreshing .spinner-lines-md line,.refresher-md .refresher-refreshing .spinner-lines-small-md line,.refresher-md .refresher-refreshing .spinner-crescent circle{stroke:var(--ion-text-color, #000)}.refresher-md .refresher-refreshing .spinner-bubbles circle,.refresher-md .refresher-refreshing .spinner-circles circle,.refresher-md .refresher-refreshing .spinner-dots circle{fill:var(--ion-text-color, #000)}ion-refresher.refresher-native{display:block;z-index:1}ion-refresher.refresher-native ion-spinner{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;width:24px;height:24px;color:var(--ion-color-primary, #3880ff)}ion-refresher.refresher-native .spinner-arrow-container{display:inherit}ion-refresher.refresher-native .arrow-container{display:block;position:absolute;width:24px;height:24px}ion-refresher.refresher-native .arrow-container ion-icon{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;left:0;right:0;bottom:-4px;position:absolute;color:var(--ion-color-primary, #3880ff);font-size:12px}ion-refresher.refresher-native.refresher-pulling ion-refresher-content .refresher-pulling,ion-refresher.refresher-native.refresher-ready ion-refresher-content .refresher-pulling{display:-ms-flexbox;display:flex}ion-refresher.refresher-native.refresher-refreshing ion-refresher-content .refresher-refreshing,ion-refresher.refresher-native.refresher-completing ion-refresher-content .refresher-refreshing,ion-refresher.refresher-native.refresher-cancelling ion-refresher-content .refresher-refreshing{display:-ms-flexbox;display:flex}ion-refresher.refresher-native .refresher-pulling-icon{-webkit-transform:translateY(calc(-100% - 10px));transform:translateY(calc(-100% - 10px))}ion-refresher.refresher-native .refresher-pulling-icon,ion-refresher.refresher-native .refresher-refreshing-icon{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;border-radius:100%;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;display:-ms-flexbox;display:flex;border:1px solid var(--ion-color-step-200, #ececec);background:var(--ion-color-step-250, #ffffff);-webkit-box-shadow:0px 1px 6px rgba(0, 0, 0, 0.1);box-shadow:0px 1px 6px rgba(0, 0, 0, 0.1)}";var IonRefresherMdStyle0=refresherMdCss;var Refresher=function(){function e(e){registerInstance(this,e);this.ionRefresh=createEvent(this,"ionRefresh",7);this.ionPull=createEvent(this,"ionPull",7);this.ionStart=createEvent(this,"ionStart",7);this.appliedStyles=false;this.didStart=false;this.progress=0;this.pointerDown=false;this.needsCompletion=false;this.didRefresh=false;this.lastVelocityY=0;this.animations=[];this.nativeRefresher=false;this.state=1;this.pullMin=60;this.pullMax=this.pullMin+60;this.closeDuration="280ms";this.snapbackDuration="280ms";this.pullFactor=1;this.disabled=false}e.prototype.disabledChanged=function(){if(this.gesture){this.gesture.enable(!this.disabled)}};e.prototype.checkNativeRefresher=function(){return __awaiter(this,void 0,void 0,(function(){var e,r;return __generator(this,(function(n){switch(n.label){case 0:return[4,shouldUseNativeRefresher(this.el,getIonMode(this))];case 1:e=n.sent();if(e&&!this.nativeRefresher){r=this.el.closest("ion-content");this.setupNativeRefresher(r)}else if(!e){this.destroyNativeRefresher()}return[2]}}))}))};e.prototype.destroyNativeRefresher=function(){if(this.scrollEl&&this.scrollListenerCallback){this.scrollEl.removeEventListener("scroll",this.scrollListenerCallback);this.scrollListenerCallback=undefined}this.nativeRefresher=false};e.prototype.resetNativeRefresher=function(e,r){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){switch(n.label){case 0:this.state=r;if(!(getIonMode(this)==="ios"))return[3,2];return[4,translateElement(e,undefined,300)];case 1:n.sent();return[3,4];case 2:return[4,transitionEndAsync(this.el.querySelector(".refresher-refreshing-icon"),200)];case 3:n.sent();n.label=4;case 4:this.didRefresh=false;this.needsCompletion=false;this.pointerDown=false;this.animations.forEach((function(e){return e.destroy()}));this.animations=[];this.progress=0;this.state=1;return[2]}}))}))};e.prototype.setupiOSNativeRefresher=function(e,r){return __awaiter(this,void 0,void 0,(function(){var n,t,i,s;var o=this;return __generator(this,(function(a){switch(a.label){case 0:this.elementToTransform=this.scrollEl;n=e.shadowRoot.querySelectorAll("svg");t=this.scrollEl.clientHeight*.16;i=n.length;writeTask((function(){return n.forEach((function(e){return e.style.setProperty("animation","none")}))}));this.scrollListenerCallback=function(){if(!o.pointerDown&&o.state===1){return}readTask((function(){var e=o.scrollEl.scrollTop;var s=o.el.clientHeight;if(e>0){if(o.state===8){var a=clamp(0,e/(s*.5),1);writeTask((function(){return setSpinnerOpacity(r,1-a)}));return}return}if(o.pointerDown){if(!o.didStart){o.didStart=true;o.ionStart.emit()}if(o.pointerDown){o.ionPull.emit()}}var f=o.didStart?30:0;var h=o.progress=clamp(0,(Math.abs(e)-f)/t,1);var l=o.state===8||h===1;if(l){if(o.pointerDown){handleScrollWhileRefreshing(r,o.lastVelocityY)}if(!o.didRefresh){o.beginRefresh();o.didRefresh=true;hapticImpact({style:ImpactStyle.Light});if(!o.pointerDown){translateElement(o.elementToTransform,"".concat(s,"px"))}}}else{o.state=2;handleScrollWhilePulling(n,i,h)}}))};this.scrollEl.addEventListener("scroll",this.scrollListenerCallback);s=this;return[4,import("./index-2cf77112.js")];case 1:s.gesture=a.sent().createGesture({el:this.scrollEl,gestureName:"refresher",gesturePriority:31,direction:"y",threshold:5,onStart:function(){o.pointerDown=true;if(!o.didRefresh){translateElement(o.elementToTransform,"0px")}if(t===0){t=o.scrollEl.clientHeight*.16}},onMove:function(e){o.lastVelocityY=e.velocityY},onEnd:function(){o.pointerDown=false;o.didStart=false;if(o.needsCompletion){o.resetNativeRefresher(o.elementToTransform,32);o.needsCompletion=false}else if(o.didRefresh){readTask((function(){return translateElement(o.elementToTransform,"".concat(o.el.clientHeight,"px"))}))}}});this.disabledChanged();return[2]}}))}))};e.prototype.setupMDNativeRefresher=function(e,r,n){return __awaiter(this,void 0,void 0,(function(){var t,i,s,o;var a=this;return __generator(this,(function(f){switch(f.label){case 0:t=getElementRoot(r).querySelector("circle");i=this.el.querySelector("ion-refresher-content .refresher-pulling-icon");s=getElementRoot(n).querySelector("circle");if(t!==null&&s!==null){writeTask((function(){t.style.setProperty("animation","none");n.style.setProperty("animation-delay","-655ms");s.style.setProperty("animation-delay","-655ms")}))}o=this;return[4,import("./index-2cf77112.js")];case 1:o.gesture=f.sent().createGesture({el:this.scrollEl,gestureName:"refresher",gesturePriority:31,direction:"y",threshold:5,canStart:function(){return a.state!==8&&a.state!==32&&a.scrollEl.scrollTop===0},onStart:function(e){a.progress=0;e.data={animation:undefined,didStart:false,cancelled:false}},onMove:function(r){if(r.velocityY<0&&a.progress===0&&!r.data.didStart||r.data.cancelled){r.data.cancelled=true;return}if(!r.data.didStart){r.data.didStart=true;a.state=2;var n=a.scrollEl;var t=n.matches(ION_CONTENT_CLASS_SELECTOR)?"overflow":"--overflow";writeTask((function(){return n.style.setProperty(t,"hidden")}));var s=getRefresherAnimationType(e);var o=createPullingAnimation(s,i,a.el);r.data.animation=o;o.progressStart(false,0);a.ionStart.emit();a.animations.push(o);return}a.progress=clamp(0,r.deltaY/180*.5,1);r.data.animation.progressStep(a.progress);a.ionPull.emit()},onEnd:function(e){if(!e.data.didStart){return}a.gesture.enable(false);var r=a.scrollEl;var n=r.matches(ION_CONTENT_CLASS_SELECTOR)?"overflow":"--overflow";writeTask((function(){return r.style.removeProperty(n)}));if(a.progress<=.4){e.data.animation.progressEnd(0,a.progress,500).onFinish((function(){a.animations.forEach((function(e){return e.destroy()}));a.animations=[];a.gesture.enable(true);a.state=1}));return}var t=getTimeGivenProgression([0,0],[0,0],[1,1],[1,1],a.progress)[0];var s=createSnapBackAnimation(i);a.animations.push(s);writeTask((function(){return __awaiter(a,void 0,void 0,(function(){return __generator(this,(function(r){switch(r.label){case 0:i.style.setProperty("--ion-pulling-refresher-translate","".concat(t*100,"px"));e.data.animation.progressEnd();return[4,s.play()];case 1:r.sent();this.beginRefresh();e.data.animation.destroy();this.gesture.enable(true);return[2]}}))}))}))}});this.disabledChanged();return[2]}}))}))};e.prototype.setupNativeRefresher=function(e){return __awaiter(this,void 0,void 0,(function(){var r,n;return __generator(this,(function(t){if(this.scrollListenerCallback||!e||this.nativeRefresher||!this.scrollEl){return[2]}this.setCss(0,"",false,"");this.nativeRefresher=true;r=this.el.querySelector("ion-refresher-content .refresher-pulling ion-spinner");n=this.el.querySelector("ion-refresher-content .refresher-refreshing ion-spinner");if(getIonMode(this)==="ios"){this.setupiOSNativeRefresher(r,n)}else{this.setupMDNativeRefresher(e,r,n)}return[2]}))}))};e.prototype.componentDidUpdate=function(){this.checkNativeRefresher()};e.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var e;var r=this;return __generator(this,(function(n){if(this.el.getAttribute("slot")!=="fixed"){console.error('Make sure you use: <ion-refresher slot="fixed">');return[2]}e=this.el.closest(ION_CONTENT_ELEMENT_SELECTOR);if(!e){printIonContentErrorMsg(this.el);return[2]}componentOnReady(e,(function(){return __awaiter(r,void 0,void 0,(function(){var r,n,t,i;var s=this;return __generator(this,(function(o){switch(o.label){case 0:r=e.querySelector(ION_CONTENT_CLASS_SELECTOR);n=this;return[4,getScrollElement(r!==null&&r!==void 0?r:e)];case 1:n.scrollEl=o.sent();t=this;return[4,e.getBackgroundElement()];case 2:t.backgroundContentEl=o.sent();return[4,shouldUseNativeRefresher(this.el,getIonMode(this))];case 3:if(!o.sent())return[3,4];this.setupNativeRefresher(e);return[3,6];case 4:i=this;return[4,import("./index-2cf77112.js")];case 5:i.gesture=o.sent().createGesture({el:e,gestureName:"refresher",gesturePriority:31,direction:"y",threshold:20,passive:false,canStart:function(){return s.canStart()},onStart:function(){return s.onStart()},onMove:function(e){return s.onMove(e)},onEnd:function(){return s.onEnd()}});this.disabledChanged();o.label=6;case 6:return[2]}}))}))}));return[2]}))}))};e.prototype.disconnectedCallback=function(){this.destroyNativeRefresher();this.scrollEl=undefined;if(this.gesture){this.gesture.destroy();this.gesture=undefined}};e.prototype.complete=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(r){if(this.nativeRefresher){this.needsCompletion=true;if(!this.pointerDown){raf((function(){return raf((function(){return e.resetNativeRefresher(e.elementToTransform,32)}))}))}}else{this.close(32,"120ms")}return[2]}))}))};e.prototype.cancel=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(r){if(this.nativeRefresher){if(!this.pointerDown){raf((function(){return raf((function(){return e.resetNativeRefresher(e.elementToTransform,16)}))}))}}else{this.close(16,"")}return[2]}))}))};e.prototype.getProgress=function(){return Promise.resolve(this.progress)};e.prototype.canStart=function(){if(!this.scrollEl){return false}if(this.state!==1){return false}if(this.scrollEl.scrollTop>0){return false}return true};e.prototype.onStart=function(){this.progress=0;this.state=1;this.memoizeOverflowStyle()};e.prototype.onMove=function(e){if(!this.scrollEl){return}var r=e.event;if(r.touches!==undefined&&r.touches.length>1){return}if((this.state&56)!==0){return}var n=Number.isNaN(this.pullFactor)||this.pullFactor<0?1:this.pullFactor;var t=e.deltaY*n;if(t<=0){this.progress=0;this.state=1;if(this.appliedStyles){this.setCss(0,"",false,"");return}return}if(this.state===1){var i=this.scrollEl.scrollTop;if(i>0){this.progress=0;return}this.state=2}if(r.cancelable){r.preventDefault()}this.setCss(t,"0ms",true,"");if(t===0){this.progress=0;return}var s=this.pullMin;this.progress=t/s;if(!this.didStart){this.didStart=true;this.ionStart.emit()}this.ionPull.emit();if(t<s){this.state=2;return}if(t>this.pullMax){this.beginRefresh();return}this.state=4;return};e.prototype.onEnd=function(){if(this.state===4){this.beginRefresh()}else if(this.state===2){this.cancel()}else if(this.state===1){this.restoreOverflowStyle()}};e.prototype.beginRefresh=function(){this.state=8;this.setCss(this.pullMin,this.snapbackDuration,true,"");this.ionRefresh.emit({complete:this.complete.bind(this)})};e.prototype.close=function(e,r){var n=this;setTimeout((function(){n.state=1;n.progress=0;n.didStart=false;n.setCss(0,"0ms",false,"",true)}),600);this.state=e;this.setCss(0,this.closeDuration,true,r)};e.prototype.setCss=function(e,r,n,t,i){var s=this;if(i===void 0){i=false}if(this.nativeRefresher){return}this.appliedStyles=e>0;writeTask((function(){if(s.scrollEl&&s.backgroundContentEl){var o=s.scrollEl.style;var a=s.backgroundContentEl.style;o.transform=a.transform=e>0?"translateY(".concat(e,"px) translateZ(0px)"):"";o.transitionDuration=a.transitionDuration=r;o.transitionDelay=a.transitionDelay=t;o.overflow=n?"hidden":""}if(i){s.restoreOverflowStyle()}}))};e.prototype.memoizeOverflowStyle=function(){if(this.scrollEl){var e=this.scrollEl.style,r=e.overflow,n=e.overflowX,t=e.overflowY;this.overflowStyles={overflow:r!==null&&r!==void 0?r:"",overflowX:n!==null&&n!==void 0?n:"",overflowY:t!==null&&t!==void 0?t:""}}};e.prototype.restoreOverflowStyle=function(){if(this.overflowStyles!==undefined&&this.scrollEl!==undefined){var e=this.overflowStyles,r=e.overflow,n=e.overflowX,t=e.overflowY;this.scrollEl.style.overflow=r;this.scrollEl.style.overflowX=n;this.scrollEl.style.overflowY=t;this.overflowStyles=undefined}};e.prototype.render=function(){var e;var r=getIonMode(this);return h(Host,{key:"9cf8e306e367e0ffd99f8a242dce0c9d78f96317",slot:"fixed",class:(e={},e[r]=true,e["refresher-".concat(r)]=true,e["refresher-native"]=this.nativeRefresher,e["refresher-active"]=this.state!==1,e["refresher-pulling"]=this.state===2,e["refresher-ready"]=this.state===4,e["refresher-refreshing"]=this.state===8,e["refresher-cancelling"]=this.state===16,e["refresher-completing"]=this.state===32,e)})};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{disabled:["disabledChanged"]}},enumerable:false,configurable:true});return e}();Refresher.style={ios:IonRefresherIosStyle0,md:IonRefresherMdStyle0};var RefresherContent=function(){function e(e){registerInstance(this,e);this.customHTMLEnabled=config.get("innerHTMLTemplatesEnabled",ENABLE_HTML_CONTENT_DEFAULT);this.pullingIcon=undefined;this.pullingText=undefined;this.refreshingSpinner=undefined;this.refreshingText=undefined}e.prototype.componentWillLoad=function(){if(this.pullingIcon===undefined){var e=supportsRubberBandScrolling();var r=getIonMode(this);var n=e?"lines":arrowDown;this.pullingIcon=config.get("refreshingIcon",r==="ios"&&e?config.get("spinner",n):"circular")}if(this.refreshingSpinner===undefined){var r=getIonMode(this);this.refreshingSpinner=config.get("refreshingSpinner",config.get("spinner",r==="ios"?"lines":"circular"))}};e.prototype.renderPullingText=function(){var e=this,r=e.customHTMLEnabled,n=e.pullingText;if(r){return h("div",{class:"refresher-pulling-text",innerHTML:sanitizeDOMString(n)})}return h("div",{class:"refresher-pulling-text"},n)};e.prototype.renderRefreshingText=function(){var e=this,r=e.customHTMLEnabled,n=e.refreshingText;if(r){return h("div",{class:"refresher-refreshing-text",innerHTML:sanitizeDOMString(n)})}return h("div",{class:"refresher-refreshing-text"},n)};e.prototype.render=function(){var e=this.pullingIcon;var r=e!=null&&SPINNERS[e]!==undefined;var n=getIonMode(this);return h(Host,{key:"537e4d601fd09804d072e9fed9b2c6ba8d890548",class:n},h("div",{key:"67f46df746f7da2fc60c47da9216a2920c25166f",class:"refresher-pulling"},this.pullingIcon&&r&&h("div",{class:"refresher-pulling-icon"},h("div",{class:"spinner-arrow-container"},h("ion-spinner",{name:this.pullingIcon,paused:true}),n==="md"&&this.pullingIcon==="circular"&&h("div",{class:"arrow-container"},h("ion-icon",{icon:caretBackSharp,"aria-hidden":"true"})))),this.pullingIcon&&!r&&h("div",{class:"refresher-pulling-icon"},h("ion-icon",{icon:this.pullingIcon,lazy:false,"aria-hidden":"true"})),this.pullingText!==undefined&&this.renderPullingText()),h("div",{key:"216f96af452e1567df7906c4d9e6fbf8c397ad21",class:"refresher-refreshing"},this.refreshingSpinner&&h("div",{class:"refresher-refreshing-icon"},h("ion-spinner",{name:this.refreshingSpinner})),this.refreshingText!==undefined&&this.renderRefreshingText()))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();export{Refresher as ion_refresher,RefresherContent as ion_refresher_content};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{__awaiter,__generator}from"tslib";
|
|
2
2
|
/*!
|
|
3
3
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{r as registerInstance,h,H as Host,f as getElement,d as createEvent}from"./index-
|
|
4
|
+
*/import{r as registerInstance,h,H as Host,f as getElement,d as createEvent}from"./index-4c30cddd.js";import{j as reorderThreeOutline,k as reorderTwoSharp}from"./index-f7dc70ba.js";import{b as getIonMode}from"./ionic-global-ad9a1810.js";import{f as findClosestIonContent,g as getScrollElement}from"./index-eb12ef92.js";import{r as raf}from"./helpers-c0b9ca37.js";import{a as hapticSelectionStart,b as hapticSelectionChanged,h as hapticSelectionEnd}from"./haptic-554688a5.js";import"./index-9b0d46f4.js";import"./capacitor-59395cbd.js";import"./index-a5d50daf.js";var reorderIosCss=":host([slot]){display:none;line-height:0;z-index:100}.reorder-icon{display:block}::slotted(ion-icon){font-size:dynamic-font(16px)}.reorder-icon{font-size:2.125rem;opacity:0.4}";var IonReorderIosStyle0=reorderIosCss;var reorderMdCss=":host([slot]){display:none;line-height:0;z-index:100}.reorder-icon{display:block}::slotted(ion-icon){font-size:dynamic-font(16px)}.reorder-icon{font-size:1.9375rem;opacity:0.3}";var IonReorderMdStyle0=reorderMdCss;var Reorder=function(){function r(r){registerInstance(this,r)}r.prototype.onClick=function(r){var e=this.el.closest("ion-reorder-group");r.preventDefault();if(!e||!e.disabled){r.stopImmediatePropagation()}};r.prototype.render=function(){var r=getIonMode(this);var e=r==="ios"?reorderThreeOutline:reorderTwoSharp;return h(Host,{key:"e625707b1810f93f5c667e38b8e2904988a3cff0",class:r},h("slot",{key:"fd0c3167e8a7955a6f841b338345de0528535ff5"},h("ion-icon",{key:"3fc7bb1adb0dde839ec4898361e359c640e81067",icon:e,lazy:false,class:"reorder-icon",part:"icon","aria-hidden":"true"})))};Object.defineProperty(r.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return r}();Reorder.style={ios:IonReorderIosStyle0,md:IonReorderMdStyle0};var reorderGroupCss=".reorder-list-active>*{display:block;-webkit-transition:-webkit-transform 300ms;transition:-webkit-transform 300ms;transition:transform 300ms;transition:transform 300ms, -webkit-transform 300ms;will-change:transform}.reorder-enabled{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.reorder-enabled ion-reorder{display:block;cursor:-webkit-grab;cursor:grab;pointer-events:all;-ms-touch-action:none;touch-action:none}.reorder-selected,.reorder-selected ion-reorder{cursor:-webkit-grabbing;cursor:grabbing}.reorder-selected{position:relative;-webkit-transition:none !important;transition:none !important;-webkit-box-shadow:0 0 10px rgba(0, 0, 0, 0.4);box-shadow:0 0 10px rgba(0, 0, 0, 0.4);opacity:0.8;z-index:100}.reorder-visible ion-reorder .reorder-icon{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}";var IonReorderGroupStyle0=reorderGroupCss;var ReorderGroup=function(){function r(r){registerInstance(this,r);this.ionItemReorder=createEvent(this,"ionItemReorder",7);this.lastToIndex=-1;this.cachedHeights=[];this.scrollElTop=0;this.scrollElBottom=0;this.scrollElInitial=0;this.containerTop=0;this.containerBottom=0;this.state=0;this.disabled=true}r.prototype.disabledChanged=function(){if(this.gesture){this.gesture.enable(!this.disabled)}};r.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var r,e,t;var i=this;return __generator(this,(function(n){switch(n.label){case 0:r=findClosestIonContent(this.el);if(!r)return[3,2];e=this;return[4,getScrollElement(r)];case 1:e.scrollEl=n.sent();n.label=2;case 2:t=this;return[4,import("./index-2cf77112.js")];case 3:t.gesture=n.sent().createGesture({el:this.el,gestureName:"reorder",gesturePriority:110,threshold:0,direction:"y",passive:false,canStart:function(r){return i.canStart(r)},onStart:function(r){return i.onStart(r)},onMove:function(r){return i.onMove(r)},onEnd:function(){return i.onEnd()}});this.disabledChanged();return[2]}}))}))};r.prototype.disconnectedCallback=function(){this.onEnd();if(this.gesture){this.gesture.destroy();this.gesture=undefined}};r.prototype.complete=function(r){return Promise.resolve(this.completeReorder(r))};r.prototype.canStart=function(r){if(this.selectedItemEl||this.state!==0){return false}var e=r.event.target;var t=e.closest("ion-reorder");if(!t){return false}var i=findReorderItem(t,this.el);if(!i){return false}r.data=i;return true};r.prototype.onStart=function(r){r.event.preventDefault();var e=this.selectedItemEl=r.data;var t=this.cachedHeights;t.length=0;var i=this.el;var n=i.children;if(!n||n.length===0){return}var o=0;for(var s=0;s<n.length;s++){var a=n[s];o+=a.offsetHeight;t.push(o);a.$ionIndex=s}var d=i.getBoundingClientRect();this.containerTop=d.top;this.containerBottom=d.bottom;if(this.scrollEl){var h=this.scrollEl.getBoundingClientRect();this.scrollElInitial=this.scrollEl.scrollTop;this.scrollElTop=h.top+AUTO_SCROLL_MARGIN;this.scrollElBottom=h.bottom-AUTO_SCROLL_MARGIN}else{this.scrollElInitial=0;this.scrollElTop=0;this.scrollElBottom=0}this.lastToIndex=indexForItem(e);this.selectedItemHeight=e.offsetHeight;this.state=1;e.classList.add(ITEM_REORDER_SELECTED);hapticSelectionStart()};r.prototype.onMove=function(r){var e=this.selectedItemEl;if(!e){return}var t=this.autoscroll(r.currentY);var i=this.containerTop-t;var n=this.containerBottom-t;var o=Math.max(i,Math.min(r.currentY,n));var s=t+o-r.startY;var a=o-i;var d=this.itemIndexForTop(a);if(d!==this.lastToIndex){var h=indexForItem(e);this.lastToIndex=d;hapticSelectionChanged();this.reorderMove(h,d)}e.style.transform="translateY(".concat(s,"px)")};r.prototype.onEnd=function(){var r=this.selectedItemEl;this.state=2;if(!r){this.state=0;return}var e=this.lastToIndex;var t=indexForItem(r);if(e===t){this.completeReorder()}else{this.ionItemReorder.emit({from:t,to:e,complete:this.completeReorder.bind(this)})}hapticSelectionEnd()};r.prototype.completeReorder=function(r){var e=this;var t=this.selectedItemEl;if(t&&this.state===2){var i=this.el.children;var n=i.length;var o=this.lastToIndex;var s=indexForItem(t);raf((function(){if(o!==s&&(r===undefined||r===true)){var a=s<o?i[o+1]:i[o];e.el.insertBefore(t,a)}for(var d=0;d<n;d++){i[d].style["transform"]=""}}));if(Array.isArray(r)){r=reorderArray(r,s,o)}t.style.transition="";t.classList.remove(ITEM_REORDER_SELECTED);this.selectedItemEl=undefined;this.state=0}return r};r.prototype.itemIndexForTop=function(r){var e=this.cachedHeights;for(var t=0;t<e.length;t++){if(e[t]>r){return t}}return e.length-1};r.prototype.reorderMove=function(r,e){var t=this.selectedItemHeight;var i=this.el.children;for(var n=0;n<i.length;n++){var o=i[n].style;var s="";if(n>r&&n<=e){s="translateY(".concat(-t,"px)")}else if(n<r&&n>=e){s="translateY(".concat(t,"px)")}o["transform"]=s}};r.prototype.autoscroll=function(r){if(!this.scrollEl){return 0}var e=0;if(r<this.scrollElTop){e=-SCROLL_JUMP}else if(r>this.scrollElBottom){e=SCROLL_JUMP}if(e!==0){this.scrollEl.scrollBy(0,e)}return this.scrollEl.scrollTop-this.scrollElInitial};r.prototype.render=function(){var r;var e=getIonMode(this);return h(Host,{key:"067b8ff26887c4e458163f70f7308723c90a53f8",class:(r={},r[e]=true,r["reorder-enabled"]=!this.disabled,r["reorder-list-active"]=this.state!==0,r)})};Object.defineProperty(r.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(r,"watchers",{get:function(){return{disabled:["disabledChanged"]}},enumerable:false,configurable:true});return r}();var indexForItem=function(r){return r["$ionIndex"]};var findReorderItem=function(r,e){var t;while(r){t=r.parentElement;if(t===e){return r}r=t}return undefined};var AUTO_SCROLL_MARGIN=60;var SCROLL_JUMP=10;var ITEM_REORDER_SELECTED="reorder-selected";var reorderArray=function(r,e,t){var i=r[e];r.splice(e,1);r.splice(t,0,i);return r.slice()};ReorderGroup.style=IonReorderGroupStyle0;export{Reorder as ion_reorder,ReorderGroup as ion_reorder_group};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{__awaiter,__generator}from"tslib";
|
|
2
2
|
/*!
|
|
3
3
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{r as registerInstance,e as readTask,w as writeTask,h,f as getElement,H as Host}from"./index-
|
|
4
|
+
*/import{r as registerInstance,e as readTask,w as writeTask,h,f as getElement,H as Host}from"./index-4c30cddd.js";import{b as getIonMode}from"./ionic-global-ad9a1810.js";var rippleEffectCss=":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:strict;pointer-events:none}:host(.unbounded){contain:layout size style}.ripple-effect{border-radius:50%;position:absolute;background-color:currentColor;color:inherit;contain:strict;opacity:0;-webkit-animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;will-change:transform, opacity;pointer-events:none}.fade-out{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1));-webkit-animation:150ms fadeOutAnimation forwards;animation:150ms fadeOutAnimation forwards}@-webkit-keyframes rippleAnimation{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@keyframes rippleAnimation{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@-webkit-keyframes fadeInAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:0.16}}@keyframes fadeInAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:0.16}}@-webkit-keyframes fadeOutAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0.16}to{opacity:0}}@keyframes fadeOutAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0.16}to{opacity:0}}";var IonRippleEffectStyle0=rippleEffectCss;var RippleEffect=function(){function t(t){registerInstance(this,t);this.type="bounded"}t.prototype.addRipple=function(t,a){return __awaiter(this,void 0,void 0,(function(){var n=this;return __generator(this,(function(i){return[2,new Promise((function(i){readTask((function(){var e=n.el.getBoundingClientRect();var r=e.width;var o=e.height;var s=Math.sqrt(r*r+o*o);var f=Math.max(o,r);var c=n.unbounded?f:s+PADDING;var l=Math.floor(f*INITIAL_ORIGIN_SCALE);var m=c/l;var u=t-e.left;var p=a-e.top;if(n.unbounded){u=r*.5;p=o*.5}var d=u-l*.5;var v=p-l*.5;var b=r*.5-u;var w=o*.5-p;writeTask((function(){var t=document.createElement("div");t.classList.add("ripple-effect");var a=t.style;a.top=v+"px";a.left=d+"px";a.width=a.height=l+"px";a.setProperty("--final-scale","".concat(m));a.setProperty("--translate-end","".concat(b,"px, ").concat(w,"px"));var e=n.el.shadowRoot||n.el;e.appendChild(t);setTimeout((function(){i((function(){removeRipple(t)}))}),225+100)}))}))}))]}))}))};Object.defineProperty(t.prototype,"unbounded",{get:function(){return this.type==="unbounded"},enumerable:false,configurable:true});t.prototype.render=function(){var t;var a=getIonMode(this);return h(Host,{key:"a9ff1956627908ee4071002ca018eaa80f87cd59",role:"presentation",class:(t={},t[a]=true,t.unbounded=this.unbounded,t)})};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();var removeRipple=function(t){t.classList.add("fade-out");setTimeout((function(){t.remove()}),200)};var PADDING=10;var INITIAL_ORIGIN_SCALE=.5;RippleEffect.style=IonRippleEffectStyle0;export{RippleEffect as ion_ripple_effect};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{__awaiter,__generator,__spreadArray}from"tslib";
|
|
2
2
|
/*!
|
|
3
3
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{r as registerInstance,d as createEvent,f as getElement,h,H as Host}from"./index-73881b51.js";import{c as componentOnReady,q as debounce}from"./helpers-c0b9ca37.js";import{o as openURL,c as createColorClasses}from"./theme-01f3f29c.js";import{b as getIonMode}from"./ionic-global-778b7863.js";var Route=function(){function r(r){registerInstance(this,r);this.ionRouteDataChanged=createEvent(this,"ionRouteDataChanged",7);this.url="";this.component=undefined;this.componentProps=undefined;this.beforeLeave=undefined;this.beforeEnter=undefined}r.prototype.onUpdate=function(r){this.ionRouteDataChanged.emit(r)};r.prototype.onComponentProps=function(r,e){if(r===e){return}var t=r?Object.keys(r):[];var n=e?Object.keys(e):[];if(t.length!==n.length){this.onUpdate(r);return}for(var i=0,a=t;i<a.length;i++){var o=a[i];if(r[o]!==e[o]){this.onUpdate(r);return}}};r.prototype.connectedCallback=function(){this.ionRouteDataChanged.emit()};Object.defineProperty(r,"watchers",{get:function(){return{url:["onUpdate"],component:["onUpdate"],componentProps:["onComponentProps"]}},enumerable:false,configurable:true});return r}();var RouteRedirect=function(){function r(r){registerInstance(this,r);this.ionRouteRedirectChanged=createEvent(this,"ionRouteRedirectChanged",7);this.from=undefined;this.to=undefined}r.prototype.propDidChange=function(){this.ionRouteRedirectChanged.emit()};r.prototype.connectedCallback=function(){this.ionRouteRedirectChanged.emit()};Object.defineProperty(r,"watchers",{get:function(){return{from:["propDidChange"],to:["propDidChange"]}},enumerable:false,configurable:true});return r}();var ROUTER_INTENT_NONE="root";var ROUTER_INTENT_FORWARD="forward";var ROUTER_INTENT_BACK="back";var generatePath=function(r){var e=r.filter((function(r){return r.length>0})).join("/");return"/"+e};var generateUrl=function(r,e,t){var n=generatePath(r);if(e){n="#"+n}if(t!==undefined){n+="?"+t}return n};var writeSegments=function(r,e,t,n,i,a,o){var u=generateUrl(__spreadArray(__spreadArray([],parsePath(e).segments,true),n,true),t,o);if(i===ROUTER_INTENT_FORWARD){r.pushState(a,"",u)}else{r.replaceState(a,"",u)}};var chainToSegments=function(r){var e=[];for(var t=0,n=r;t<n.length;t++){var i=n[t];for(var a=0,o=i.segments;a<o.length;a++){var u=o[a];if(u[0]===":"){var s=i.params&&i.params[u.slice(1)];if(!s){return null}e.push(s)}else if(u!==""){e.push(u)}}}return e};var removePrefix=function(r,e){if(r.length>e.length){return null}if(r.length<=1&&r[0]===""){return e}for(var t=0;t<r.length;t++){if(r[t]!==e[t]){return null}}if(e.length===r.length){return[""]}return e.slice(r.length)};var readSegments=function(r,e,t){var n=parsePath(e).segments;var i=t?r.hash.slice(1):r.pathname;var a=parsePath(i).segments;return removePrefix(n,a)};var parsePath=function(r){var e=[""];var t;if(r!=null){var n=r.indexOf("?");if(n>-1){t=r.substring(n+1);r=r.substring(0,n)}e=r.split("/").map((function(r){return r.trim()})).filter((function(r){return r.length>0}));if(e.length===0){e=[""]}}return{segments:e,queryString:t}};var printRoutes=function(r){console.group("[ion-core] ROUTES[".concat(r.length,"]"));var e=function(r){var e=[];r.forEach((function(r){return e.push.apply(e,r.segments)}));var t=r.map((function(r){return r.id}));console.debug("%c ".concat(generatePath(e)),"font-weight: bold; padding-left: 20px","=>\t","(".concat(t.join(", "),")"))};for(var t=0,n=r;t<n.length;t++){var i=n[t];e(i)}console.groupEnd()};var printRedirects=function(r){console.group("[ion-core] REDIRECTS[".concat(r.length,"]"));for(var e=0,t=r;e<t.length;e++){var n=t[e];if(n.to){console.debug("FROM: ","$c ".concat(generatePath(n.from)),"font-weight: bold"," TO: ","$c ".concat(generatePath(n.to.segments)),"font-weight: bold")}}console.groupEnd()};var writeNavState=function(r,e,t,n,i,a){if(i===void 0){i=false}return __awaiter(void 0,void 0,void 0,(function(){var o,u,s,f;return __generator(this,(function(c){switch(c.label){case 0:c.trys.push([0,6,,7]);o=searchNavNode(r);if(n>=e.length||!o){return[2,i]}return[4,new Promise((function(r){return componentOnReady(o,r)}))];case 1:c.sent();u=e[n];return[4,o.setRouteId(u.id,u.params,t,a)];case 2:s=c.sent();if(s.changed){t=ROUTER_INTENT_NONE;i=true}return[4,writeNavState(s.element,e,t,n+1,i,a)];case 3:i=c.sent();if(!s.markVisible)return[3,5];return[4,s.markVisible()];case 4:c.sent();c.label=5;case 5:return[2,i];case 6:f=c.sent();console.error(f);return[2,false];case 7:return[2]}}))}))};var readNavState=function(r){return __awaiter(void 0,void 0,void 0,(function(){var e,t,n,i;return __generator(this,(function(a){switch(a.label){case 0:e=[];n=r;a.label=1;case 1:if(!(t=searchNavNode(n)))return[3,3];return[4,t.getRouteId()];case 2:i=a.sent();if(i){n=i.element;i.element=undefined;e.push(i)}else{return[3,3]}return[3,1];case 3:return[2,{ids:e,outlet:t}]}}))}))};var waitUntilNavNode=function(){if(searchNavNode(document.body)){return Promise.resolve()}return new Promise((function(r){window.addEventListener("ionNavWillLoad",(function(){return r()}),{once:true})}))};var OUTLET_SELECTOR=":not([no-router]) ion-nav, :not([no-router]) ion-tabs, :not([no-router]) ion-router-outlet";var searchNavNode=function(r){if(!r){return undefined}if(r.matches(OUTLET_SELECTOR)){return r}var e=r.querySelector(OUTLET_SELECTOR);return e!==null&&e!==void 0?e:undefined};var matchesRedirect=function(r,e){var t=e.from,n=e.to;if(n===undefined){return false}if(t.length>r.length){return false}for(var i=0;i<t.length;i++){var a=t[i];if(a==="*"){return true}if(a!==r[i]){return false}}return t.length===r.length};var findRouteRedirect=function(r,e){return e.find((function(e){return matchesRedirect(r,e)}))};var matchesIDs=function(r,e){var t=Math.min(r.length,e.length);var n=0;for(var i=0;i<t;i++){var a=r[i];var o=e[i];if(a.id.toLowerCase()!==o.id){break}if(a.params){var u=Object.keys(a.params);if(u.length===o.segments.length){var s=u.map((function(r){return":".concat(r)}));for(var f=0;f<s.length;f++){if(s[f].toLowerCase()!==o.segments[f]){break}n++}}}n++}return n};var matchesSegments=function(r,e){var t=new RouterSegments(r);var n=false;var i;for(var a=0;a<e.length;a++){var o=e[a].segments;if(o[0]===""){n=true}else{for(var u=0,s=o;u<s.length;u++){var f=s[u];var c=t.next();if(f[0]===":"){if(c===""){return null}i=i||[];var h=i[a]||(i[a]={});h[f.slice(1)]=c}else if(c!==f){return null}}n=false}}var v=n?n===(t.next()===""):true;if(!v){return null}if(i){return e.map((function(r,e){return{id:r.id,segments:r.segments,params:mergeParams(r.params,i[e]),beforeEnter:r.beforeEnter,beforeLeave:r.beforeLeave}}))}return e};var mergeParams=function(r,e){return r||e?Object.assign(Object.assign({},r),e):undefined};var findChainForIDs=function(r,e){var t=null;var n=0;for(var i=0,a=e;i<a.length;i++){var o=a[i];var u=matchesIDs(r,o);if(u>n){t=o;n=u}}if(t){return t.map((function(e,t){var n;return{id:e.id,segments:e.segments,params:mergeParams(e.params,(n=r[t])===null||n===void 0?void 0:n.params)}}))}return null};var findChainForSegments=function(r,e){var t=null;var n=0;for(var i=0,a=e;i<a.length;i++){var o=a[i];var u=matchesSegments(r,o);if(u!==null){var s=computePriority(u);if(s>n){n=s;t=u}}}return t};var computePriority=function(r){var e=1;var t=1;for(var n=0,i=r;n<i.length;n++){var a=i[n];for(var o=0,u=a.segments;o<u.length;o++){var s=u[o];if(s[0]===":"){e+=Math.pow(1,t)}else if(s!==""){e+=Math.pow(2,t)}t++}}return e};var RouterSegments=function(){function r(r){this.segments=r.slice()}r.prototype.next=function(){if(this.segments.length>0){return this.segments.shift()}return""};return r}();var readProp=function(r,e){if(e in r){return r[e]}if(r.hasAttribute(e)){return r.getAttribute(e)}return null};var readRedirects=function(r){return Array.from(r.children).filter((function(r){return r.tagName==="ION-ROUTE-REDIRECT"})).map((function(r){var e=readProp(r,"to");return{from:parsePath(readProp(r,"from")).segments,to:e==null?undefined:parsePath(e)}}))};var readRoutes=function(r){return flattenRouterTree(readRouteNodes(r))};var readRouteNodes=function(r){return Array.from(r.children).filter((function(r){return r.tagName==="ION-ROUTE"&&r.component})).map((function(r){var e=readProp(r,"component");return{segments:parsePath(readProp(r,"url")).segments,id:e.toLowerCase(),params:r.componentProps,beforeLeave:r.beforeLeave,beforeEnter:r.beforeEnter,children:readRouteNodes(r)}}))};var flattenRouterTree=function(r){var e=[];for(var t=0,n=r;t<n.length;t++){var i=n[t];flattenNode([],e,i)}return e};var flattenNode=function(r,e,t){r=__spreadArray(__spreadArray([],r,true),[{id:t.id,segments:t.segments,params:t.params,beforeLeave:t.beforeLeave,beforeEnter:t.beforeEnter}],false);if(t.children.length===0){e.push(r);return}for(var n=0,i=t.children;n<i.length;n++){var a=i[n];flattenNode(r,e,a)}};var Router=function(){function r(r){registerInstance(this,r);this.ionRouteWillChange=createEvent(this,"ionRouteWillChange",7);this.ionRouteDidChange=createEvent(this,"ionRouteDidChange",7);this.previousPath=null;this.busy=false;this.state=0;this.lastState=0;this.root="/";this.useHash=true}r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,e,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,waitUntilNavNode()];case 1:n.sent();return[4,this.runGuards(this.getSegments())];case 2:r=n.sent();if(!(r!==true))return[3,5];if(!(typeof r==="object"))return[3,4];e=r.redirect;t=parsePath(e);this.setSegments(t.segments,ROUTER_INTENT_NONE,t.queryString);return[4,this.writeNavStateRoot(t.segments,ROUTER_INTENT_NONE)];case 3:n.sent();n.label=4;case 4:return[3,7];case 5:return[4,this.onRoutesChanged()];case 6:n.sent();n.label=7;case 7:return[2]}}))}))};r.prototype.componentDidLoad=function(){window.addEventListener("ionRouteRedirectChanged",debounce(this.onRedirectChanged.bind(this),10));window.addEventListener("ionRouteDataChanged",debounce(this.onRoutesChanged.bind(this),100))};r.prototype.onPopState=function(){return __awaiter(this,void 0,void 0,(function(){var r,e,t;return __generator(this,(function(n){switch(n.label){case 0:r=this.historyDirection();e=this.getSegments();return[4,this.runGuards(e)];case 1:t=n.sent();if(t!==true){if(typeof t==="object"){e=parsePath(t.redirect).segments}else{return[2,false]}}return[2,this.writeNavStateRoot(e,r)]}}))}))};r.prototype.onBackButton=function(r){var e=this;r.detail.register(0,(function(r){e.back();r()}))};r.prototype.canTransition=function(){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.runGuards()];case 1:r=e.sent();if(r!==true){if(typeof r==="object"){return[2,r.redirect]}else{return[2,false]}}return[2,true]}}))}))};r.prototype.push=function(r,e,t){if(e===void 0){e="forward"}return __awaiter(this,void 0,void 0,(function(){var n,i,a,o,u;return __generator(this,(function(s){switch(s.label){case 0:if(r.startsWith(".")){i=(n=this.previousPath)!==null&&n!==void 0?n:"/";a=new URL(r,"https://host/".concat(i));r=a.pathname+a.search}o=parsePath(r);return[4,this.runGuards(o.segments)];case 1:u=s.sent();if(u!==true){if(typeof u==="object"){o=parsePath(u.redirect)}else{return[2,false]}}this.setSegments(o.segments,e,o.queryString);return[2,this.writeNavStateRoot(o.segments,e,t)]}}))}))};r.prototype.back=function(){window.history.back();return Promise.resolve(this.waitPromise)};r.prototype.printDebug=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){printRoutes(readRoutes(this.el));printRedirects(readRedirects(this.el));return[2]}))}))};r.prototype.navChanged=function(r){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,a,o;return __generator(this,(function(u){switch(u.label){case 0:if(this.busy){console.warn("[ion-router] router is busy, navChanged was cancelled");return[2,false]}return[4,readNavState(window.document.body)];case 1:e=u.sent(),t=e.ids,n=e.outlet;i=readRoutes(this.el);a=findChainForIDs(t,i);if(!a){console.warn("[ion-router] no matching URL for ",t.map((function(r){return r.id})));return[2,false]}o=chainToSegments(a);if(!o){console.warn("[ion-router] router could not match path because some required param is missing");return[2,false]}this.setSegments(o,r);return[4,this.safeWriteNavState(n,a,ROUTER_INTENT_NONE,o,null,t.length)];case 2:u.sent();return[2,true]}}))}))};r.prototype.onRedirectChanged=function(){var r=this.getSegments();if(r&&findRouteRedirect(r,readRedirects(this.el))){this.writeNavStateRoot(r,ROUTER_INTENT_NONE)}};r.prototype.onRoutesChanged=function(){return this.writeNavStateRoot(this.getSegments(),ROUTER_INTENT_NONE)};r.prototype.historyDirection=function(){var r;var e=window;if(e.history.state===null){this.state++;e.history.replaceState(this.state,e.document.title,(r=e.document.location)===null||r===void 0?void 0:r.href)}var t=e.history.state;var n=this.lastState;this.lastState=t;if(t>n||t>=n&&n>0){return ROUTER_INTENT_FORWARD}if(t<n){return ROUTER_INTENT_BACK}return ROUTER_INTENT_NONE};r.prototype.writeNavStateRoot=function(r,e,t){return __awaiter(this,void 0,void 0,(function(){var n,i,a,o,u,s,f,c;return __generator(this,(function(h){if(!r){console.error("[ion-router] URL is not part of the routing set");return[2,false]}n=readRedirects(this.el);i=findRouteRedirect(r,n);a=null;if(i){o=i.to,u=o.segments,s=o.queryString;this.setSegments(u,e,s);a=i.from;r=u}f=readRoutes(this.el);c=findChainForSegments(r,f);if(!c){console.error("[ion-router] the path does not match any route");return[2,false]}return[2,this.safeWriteNavState(document.body,c,e,r,a,0,t)]}))}))};r.prototype.safeWriteNavState=function(r,e,t,n,i,a,o){if(a===void 0){a=0}return __awaiter(this,void 0,void 0,(function(){var u,s,f;return __generator(this,(function(c){switch(c.label){case 0:return[4,this.lock()];case 1:u=c.sent();s=false;c.label=2;case 2:c.trys.push([2,4,,5]);return[4,this.writeNavState(r,e,t,n,i,a,o)];case 3:s=c.sent();return[3,5];case 4:f=c.sent();console.error(f);return[3,5];case 5:u();return[2,s]}}))}))};r.prototype.lock=function(){return __awaiter(this,void 0,void 0,(function(){var r,e;return __generator(this,(function(t){switch(t.label){case 0:r=this.waitPromise;this.waitPromise=new Promise((function(r){return e=r}));if(!(r!==undefined))return[3,2];return[4,r];case 1:t.sent();t.label=2;case 2:return[2,e]}}))}))};r.prototype.runGuards=function(r,e){if(r===void 0){r=this.getSegments()}return __awaiter(this,void 0,void 0,(function(){var t,n,i,a,o,u,s;return __generator(this,(function(f){switch(f.label){case 0:if(e===undefined){e=parsePath(this.previousPath).segments}if(!r||!e){return[2,true]}t=readRoutes(this.el);n=findChainForSegments(e,t);i=n&&n[n.length-1].beforeLeave;if(!i)return[3,2];return[4,i()];case 1:o=f.sent();return[3,3];case 2:o=true;f.label=3;case 3:a=o;if(a===false||typeof a==="object"){return[2,a]}u=findChainForSegments(r,t);s=u&&u[u.length-1].beforeEnter;return[2,s?s():true]}}))}))};r.prototype.writeNavState=function(r,e,t,n,i,a,o){if(a===void 0){a=0}return __awaiter(this,void 0,void 0,(function(){var u,s;return __generator(this,(function(f){switch(f.label){case 0:if(this.busy){console.warn("[ion-router] router is busy, transition was cancelled");return[2,false]}this.busy=true;u=this.routeChangeEvent(n,i);if(u){this.ionRouteWillChange.emit(u)}return[4,writeNavState(r,e,t,a,false,o)];case 1:s=f.sent();this.busy=false;if(u){this.ionRouteDidChange.emit(u)}return[2,s]}}))}))};r.prototype.setSegments=function(r,e,t){this.state++;writeSegments(window.history,this.root,this.useHash,r,e,this.state,t)};r.prototype.getSegments=function(){return readSegments(window.location,this.root,this.useHash)};r.prototype.routeChangeEvent=function(r,e){var t=this.previousPath;var n=generatePath(r);this.previousPath=n;if(n===t){return null}var i=e?generatePath(e):null;return{from:t,redirectedFrom:i,to:n}};Object.defineProperty(r.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return r}();var routerLinkCss=":host{--background:transparent;--color:var(--ion-color-primary, #3880ff);background:var(--background);color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}a{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit}";var IonRouterLinkStyle0=routerLinkCss;var RouterLink=function(){function r(r){var e=this;registerInstance(this,r);this.onClick=function(r){openURL(e.href,r,e.routerDirection,e.routerAnimation)};this.color=undefined;this.href=undefined;this.rel=undefined;this.routerDirection="forward";this.routerAnimation=undefined;this.target=undefined}r.prototype.render=function(){var r;var e=getIonMode(this);var t={href:this.href,rel:this.rel,target:this.target};return h(Host,{key:"9944573e56abecc47afd2df03b386e38fc7ed2f3",onClick:this.onClick,class:createColorClasses(this.color,(r={},r[e]=true,r["ion-activatable"]=true,r))},h("a",Object.assign({key:"383de10c02eb9ab87e27890548ef681dccf2a765"},t),h("slot",{key:"584a5a52e2b116f3827596cc5869a3557d6bcb6b"})))};return r}();RouterLink.style=IonRouterLinkStyle0;export{Route as ion_route,RouteRedirect as ion_route_redirect,Router as ion_router,RouterLink as ion_router_link};
|
|
4
|
+
*/import{r as registerInstance,d as createEvent,f as getElement,h,H as Host}from"./index-4c30cddd.js";import{c as componentOnReady,q as debounce}from"./helpers-c0b9ca37.js";import{o as openURL,c as createColorClasses}from"./theme-01f3f29c.js";import{b as getIonMode}from"./ionic-global-ad9a1810.js";var Route=function(){function r(r){registerInstance(this,r);this.ionRouteDataChanged=createEvent(this,"ionRouteDataChanged",7);this.url="";this.component=undefined;this.componentProps=undefined;this.beforeLeave=undefined;this.beforeEnter=undefined}r.prototype.onUpdate=function(r){this.ionRouteDataChanged.emit(r)};r.prototype.onComponentProps=function(r,e){if(r===e){return}var t=r?Object.keys(r):[];var n=e?Object.keys(e):[];if(t.length!==n.length){this.onUpdate(r);return}for(var i=0,a=t;i<a.length;i++){var o=a[i];if(r[o]!==e[o]){this.onUpdate(r);return}}};r.prototype.connectedCallback=function(){this.ionRouteDataChanged.emit()};Object.defineProperty(r,"watchers",{get:function(){return{url:["onUpdate"],component:["onUpdate"],componentProps:["onComponentProps"]}},enumerable:false,configurable:true});return r}();var RouteRedirect=function(){function r(r){registerInstance(this,r);this.ionRouteRedirectChanged=createEvent(this,"ionRouteRedirectChanged",7);this.from=undefined;this.to=undefined}r.prototype.propDidChange=function(){this.ionRouteRedirectChanged.emit()};r.prototype.connectedCallback=function(){this.ionRouteRedirectChanged.emit()};Object.defineProperty(r,"watchers",{get:function(){return{from:["propDidChange"],to:["propDidChange"]}},enumerable:false,configurable:true});return r}();var ROUTER_INTENT_NONE="root";var ROUTER_INTENT_FORWARD="forward";var ROUTER_INTENT_BACK="back";var generatePath=function(r){var e=r.filter((function(r){return r.length>0})).join("/");return"/"+e};var generateUrl=function(r,e,t){var n=generatePath(r);if(e){n="#"+n}if(t!==undefined){n+="?"+t}return n};var writeSegments=function(r,e,t,n,i,a,o){var u=generateUrl(__spreadArray(__spreadArray([],parsePath(e).segments,true),n,true),t,o);if(i===ROUTER_INTENT_FORWARD){r.pushState(a,"",u)}else{r.replaceState(a,"",u)}};var chainToSegments=function(r){var e=[];for(var t=0,n=r;t<n.length;t++){var i=n[t];for(var a=0,o=i.segments;a<o.length;a++){var u=o[a];if(u[0]===":"){var s=i.params&&i.params[u.slice(1)];if(!s){return null}e.push(s)}else if(u!==""){e.push(u)}}}return e};var removePrefix=function(r,e){if(r.length>e.length){return null}if(r.length<=1&&r[0]===""){return e}for(var t=0;t<r.length;t++){if(r[t]!==e[t]){return null}}if(e.length===r.length){return[""]}return e.slice(r.length)};var readSegments=function(r,e,t){var n=parsePath(e).segments;var i=t?r.hash.slice(1):r.pathname;var a=parsePath(i).segments;return removePrefix(n,a)};var parsePath=function(r){var e=[""];var t;if(r!=null){var n=r.indexOf("?");if(n>-1){t=r.substring(n+1);r=r.substring(0,n)}e=r.split("/").map((function(r){return r.trim()})).filter((function(r){return r.length>0}));if(e.length===0){e=[""]}}return{segments:e,queryString:t}};var printRoutes=function(r){console.group("[ion-core] ROUTES[".concat(r.length,"]"));var e=function(r){var e=[];r.forEach((function(r){return e.push.apply(e,r.segments)}));var t=r.map((function(r){return r.id}));console.debug("%c ".concat(generatePath(e)),"font-weight: bold; padding-left: 20px","=>\t","(".concat(t.join(", "),")"))};for(var t=0,n=r;t<n.length;t++){var i=n[t];e(i)}console.groupEnd()};var printRedirects=function(r){console.group("[ion-core] REDIRECTS[".concat(r.length,"]"));for(var e=0,t=r;e<t.length;e++){var n=t[e];if(n.to){console.debug("FROM: ","$c ".concat(generatePath(n.from)),"font-weight: bold"," TO: ","$c ".concat(generatePath(n.to.segments)),"font-weight: bold")}}console.groupEnd()};var writeNavState=function(r,e,t,n,i,a){if(i===void 0){i=false}return __awaiter(void 0,void 0,void 0,(function(){var o,u,s,f;return __generator(this,(function(c){switch(c.label){case 0:c.trys.push([0,6,,7]);o=searchNavNode(r);if(n>=e.length||!o){return[2,i]}return[4,new Promise((function(r){return componentOnReady(o,r)}))];case 1:c.sent();u=e[n];return[4,o.setRouteId(u.id,u.params,t,a)];case 2:s=c.sent();if(s.changed){t=ROUTER_INTENT_NONE;i=true}return[4,writeNavState(s.element,e,t,n+1,i,a)];case 3:i=c.sent();if(!s.markVisible)return[3,5];return[4,s.markVisible()];case 4:c.sent();c.label=5;case 5:return[2,i];case 6:f=c.sent();console.error(f);return[2,false];case 7:return[2]}}))}))};var readNavState=function(r){return __awaiter(void 0,void 0,void 0,(function(){var e,t,n,i;return __generator(this,(function(a){switch(a.label){case 0:e=[];n=r;a.label=1;case 1:if(!(t=searchNavNode(n)))return[3,3];return[4,t.getRouteId()];case 2:i=a.sent();if(i){n=i.element;i.element=undefined;e.push(i)}else{return[3,3]}return[3,1];case 3:return[2,{ids:e,outlet:t}]}}))}))};var waitUntilNavNode=function(){if(searchNavNode(document.body)){return Promise.resolve()}return new Promise((function(r){window.addEventListener("ionNavWillLoad",(function(){return r()}),{once:true})}))};var OUTLET_SELECTOR=":not([no-router]) ion-nav, :not([no-router]) ion-tabs, :not([no-router]) ion-router-outlet";var searchNavNode=function(r){if(!r){return undefined}if(r.matches(OUTLET_SELECTOR)){return r}var e=r.querySelector(OUTLET_SELECTOR);return e!==null&&e!==void 0?e:undefined};var matchesRedirect=function(r,e){var t=e.from,n=e.to;if(n===undefined){return false}if(t.length>r.length){return false}for(var i=0;i<t.length;i++){var a=t[i];if(a==="*"){return true}if(a!==r[i]){return false}}return t.length===r.length};var findRouteRedirect=function(r,e){return e.find((function(e){return matchesRedirect(r,e)}))};var matchesIDs=function(r,e){var t=Math.min(r.length,e.length);var n=0;for(var i=0;i<t;i++){var a=r[i];var o=e[i];if(a.id.toLowerCase()!==o.id){break}if(a.params){var u=Object.keys(a.params);if(u.length===o.segments.length){var s=u.map((function(r){return":".concat(r)}));for(var f=0;f<s.length;f++){if(s[f].toLowerCase()!==o.segments[f]){break}n++}}}n++}return n};var matchesSegments=function(r,e){var t=new RouterSegments(r);var n=false;var i;for(var a=0;a<e.length;a++){var o=e[a].segments;if(o[0]===""){n=true}else{for(var u=0,s=o;u<s.length;u++){var f=s[u];var c=t.next();if(f[0]===":"){if(c===""){return null}i=i||[];var h=i[a]||(i[a]={});h[f.slice(1)]=c}else if(c!==f){return null}}n=false}}var d=n?n===(t.next()===""):true;if(!d){return null}if(i){return e.map((function(r,e){return{id:r.id,segments:r.segments,params:mergeParams(r.params,i[e]),beforeEnter:r.beforeEnter,beforeLeave:r.beforeLeave}}))}return e};var mergeParams=function(r,e){return r||e?Object.assign(Object.assign({},r),e):undefined};var findChainForIDs=function(r,e){var t=null;var n=0;for(var i=0,a=e;i<a.length;i++){var o=a[i];var u=matchesIDs(r,o);if(u>n){t=o;n=u}}if(t){return t.map((function(e,t){var n;return{id:e.id,segments:e.segments,params:mergeParams(e.params,(n=r[t])===null||n===void 0?void 0:n.params)}}))}return null};var findChainForSegments=function(r,e){var t=null;var n=0;for(var i=0,a=e;i<a.length;i++){var o=a[i];var u=matchesSegments(r,o);if(u!==null){var s=computePriority(u);if(s>n){n=s;t=u}}}return t};var computePriority=function(r){var e=1;var t=1;for(var n=0,i=r;n<i.length;n++){var a=i[n];for(var o=0,u=a.segments;o<u.length;o++){var s=u[o];if(s[0]===":"){e+=Math.pow(1,t)}else if(s!==""){e+=Math.pow(2,t)}t++}}return e};var RouterSegments=function(){function r(r){this.segments=r.slice()}r.prototype.next=function(){if(this.segments.length>0){return this.segments.shift()}return""};return r}();var readProp=function(r,e){if(e in r){return r[e]}if(r.hasAttribute(e)){return r.getAttribute(e)}return null};var readRedirects=function(r){return Array.from(r.children).filter((function(r){return r.tagName==="ION-ROUTE-REDIRECT"})).map((function(r){var e=readProp(r,"to");return{from:parsePath(readProp(r,"from")).segments,to:e==null?undefined:parsePath(e)}}))};var readRoutes=function(r){return flattenRouterTree(readRouteNodes(r))};var readRouteNodes=function(r){return Array.from(r.children).filter((function(r){return r.tagName==="ION-ROUTE"&&r.component})).map((function(r){var e=readProp(r,"component");return{segments:parsePath(readProp(r,"url")).segments,id:e.toLowerCase(),params:r.componentProps,beforeLeave:r.beforeLeave,beforeEnter:r.beforeEnter,children:readRouteNodes(r)}}))};var flattenRouterTree=function(r){var e=[];for(var t=0,n=r;t<n.length;t++){var i=n[t];flattenNode([],e,i)}return e};var flattenNode=function(r,e,t){r=__spreadArray(__spreadArray([],r,true),[{id:t.id,segments:t.segments,params:t.params,beforeLeave:t.beforeLeave,beforeEnter:t.beforeEnter}],false);if(t.children.length===0){e.push(r);return}for(var n=0,i=t.children;n<i.length;n++){var a=i[n];flattenNode(r,e,a)}};var Router=function(){function r(r){registerInstance(this,r);this.ionRouteWillChange=createEvent(this,"ionRouteWillChange",7);this.ionRouteDidChange=createEvent(this,"ionRouteDidChange",7);this.previousPath=null;this.busy=false;this.state=0;this.lastState=0;this.root="/";this.useHash=true}r.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var r,e,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,waitUntilNavNode()];case 1:n.sent();return[4,this.runGuards(this.getSegments())];case 2:r=n.sent();if(!(r!==true))return[3,5];if(!(typeof r==="object"))return[3,4];e=r.redirect;t=parsePath(e);this.setSegments(t.segments,ROUTER_INTENT_NONE,t.queryString);return[4,this.writeNavStateRoot(t.segments,ROUTER_INTENT_NONE)];case 3:n.sent();n.label=4;case 4:return[3,7];case 5:return[4,this.onRoutesChanged()];case 6:n.sent();n.label=7;case 7:return[2]}}))}))};r.prototype.componentDidLoad=function(){window.addEventListener("ionRouteRedirectChanged",debounce(this.onRedirectChanged.bind(this),10));window.addEventListener("ionRouteDataChanged",debounce(this.onRoutesChanged.bind(this),100))};r.prototype.onPopState=function(){return __awaiter(this,void 0,void 0,(function(){var r,e,t;return __generator(this,(function(n){switch(n.label){case 0:r=this.historyDirection();e=this.getSegments();return[4,this.runGuards(e)];case 1:t=n.sent();if(t!==true){if(typeof t==="object"){e=parsePath(t.redirect).segments}else{return[2,false]}}return[2,this.writeNavStateRoot(e,r)]}}))}))};r.prototype.onBackButton=function(r){var e=this;r.detail.register(0,(function(r){e.back();r()}))};r.prototype.canTransition=function(){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.runGuards()];case 1:r=e.sent();if(r!==true){if(typeof r==="object"){return[2,r.redirect]}else{return[2,false]}}return[2,true]}}))}))};r.prototype.push=function(r,e,t){if(e===void 0){e="forward"}return __awaiter(this,void 0,void 0,(function(){var n,i,a,o,u;return __generator(this,(function(s){switch(s.label){case 0:if(r.startsWith(".")){i=(n=this.previousPath)!==null&&n!==void 0?n:"/";a=new URL(r,"https://host/".concat(i));r=a.pathname+a.search}o=parsePath(r);return[4,this.runGuards(o.segments)];case 1:u=s.sent();if(u!==true){if(typeof u==="object"){o=parsePath(u.redirect)}else{return[2,false]}}this.setSegments(o.segments,e,o.queryString);return[2,this.writeNavStateRoot(o.segments,e,t)]}}))}))};r.prototype.back=function(){window.history.back();return Promise.resolve(this.waitPromise)};r.prototype.printDebug=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){printRoutes(readRoutes(this.el));printRedirects(readRedirects(this.el));return[2]}))}))};r.prototype.navChanged=function(r){return __awaiter(this,void 0,void 0,(function(){var e,t,n,i,a,o;return __generator(this,(function(u){switch(u.label){case 0:if(this.busy){console.warn("[ion-router] router is busy, navChanged was cancelled");return[2,false]}return[4,readNavState(window.document.body)];case 1:e=u.sent(),t=e.ids,n=e.outlet;i=readRoutes(this.el);a=findChainForIDs(t,i);if(!a){console.warn("[ion-router] no matching URL for ",t.map((function(r){return r.id})));return[2,false]}o=chainToSegments(a);if(!o){console.warn("[ion-router] router could not match path because some required param is missing");return[2,false]}this.setSegments(o,r);return[4,this.safeWriteNavState(n,a,ROUTER_INTENT_NONE,o,null,t.length)];case 2:u.sent();return[2,true]}}))}))};r.prototype.onRedirectChanged=function(){var r=this.getSegments();if(r&&findRouteRedirect(r,readRedirects(this.el))){this.writeNavStateRoot(r,ROUTER_INTENT_NONE)}};r.prototype.onRoutesChanged=function(){return this.writeNavStateRoot(this.getSegments(),ROUTER_INTENT_NONE)};r.prototype.historyDirection=function(){var r;var e=window;if(e.history.state===null){this.state++;e.history.replaceState(this.state,e.document.title,(r=e.document.location)===null||r===void 0?void 0:r.href)}var t=e.history.state;var n=this.lastState;this.lastState=t;if(t>n||t>=n&&n>0){return ROUTER_INTENT_FORWARD}if(t<n){return ROUTER_INTENT_BACK}return ROUTER_INTENT_NONE};r.prototype.writeNavStateRoot=function(r,e,t){return __awaiter(this,void 0,void 0,(function(){var n,i,a,o,u,s,f,c;return __generator(this,(function(h){if(!r){console.error("[ion-router] URL is not part of the routing set");return[2,false]}n=readRedirects(this.el);i=findRouteRedirect(r,n);a=null;if(i){o=i.to,u=o.segments,s=o.queryString;this.setSegments(u,e,s);a=i.from;r=u}f=readRoutes(this.el);c=findChainForSegments(r,f);if(!c){console.error("[ion-router] the path does not match any route");return[2,false]}return[2,this.safeWriteNavState(document.body,c,e,r,a,0,t)]}))}))};r.prototype.safeWriteNavState=function(r,e,t,n,i,a,o){if(a===void 0){a=0}return __awaiter(this,void 0,void 0,(function(){var u,s,f;return __generator(this,(function(c){switch(c.label){case 0:return[4,this.lock()];case 1:u=c.sent();s=false;c.label=2;case 2:c.trys.push([2,4,,5]);return[4,this.writeNavState(r,e,t,n,i,a,o)];case 3:s=c.sent();return[3,5];case 4:f=c.sent();console.error(f);return[3,5];case 5:u();return[2,s]}}))}))};r.prototype.lock=function(){return __awaiter(this,void 0,void 0,(function(){var r,e;return __generator(this,(function(t){switch(t.label){case 0:r=this.waitPromise;this.waitPromise=new Promise((function(r){return e=r}));if(!(r!==undefined))return[3,2];return[4,r];case 1:t.sent();t.label=2;case 2:return[2,e]}}))}))};r.prototype.runGuards=function(r,e){if(r===void 0){r=this.getSegments()}return __awaiter(this,void 0,void 0,(function(){var t,n,i,a,o,u,s;return __generator(this,(function(f){switch(f.label){case 0:if(e===undefined){e=parsePath(this.previousPath).segments}if(!r||!e){return[2,true]}t=readRoutes(this.el);n=findChainForSegments(e,t);i=n&&n[n.length-1].beforeLeave;if(!i)return[3,2];return[4,i()];case 1:o=f.sent();return[3,3];case 2:o=true;f.label=3;case 3:a=o;if(a===false||typeof a==="object"){return[2,a]}u=findChainForSegments(r,t);s=u&&u[u.length-1].beforeEnter;return[2,s?s():true]}}))}))};r.prototype.writeNavState=function(r,e,t,n,i,a,o){if(a===void 0){a=0}return __awaiter(this,void 0,void 0,(function(){var u,s;return __generator(this,(function(f){switch(f.label){case 0:if(this.busy){console.warn("[ion-router] router is busy, transition was cancelled");return[2,false]}this.busy=true;u=this.routeChangeEvent(n,i);if(u){this.ionRouteWillChange.emit(u)}return[4,writeNavState(r,e,t,a,false,o)];case 1:s=f.sent();this.busy=false;if(u){this.ionRouteDidChange.emit(u)}return[2,s]}}))}))};r.prototype.setSegments=function(r,e,t){this.state++;writeSegments(window.history,this.root,this.useHash,r,e,this.state,t)};r.prototype.getSegments=function(){return readSegments(window.location,this.root,this.useHash)};r.prototype.routeChangeEvent=function(r,e){var t=this.previousPath;var n=generatePath(r);this.previousPath=n;if(n===t){return null}var i=e?generatePath(e):null;return{from:t,redirectedFrom:i,to:n}};Object.defineProperty(r.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return r}();var routerLinkCss=":host{--background:transparent;--color:var(--ion-color-primary, #3880ff);background:var(--background);color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}a{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit}";var IonRouterLinkStyle0=routerLinkCss;var RouterLink=function(){function r(r){var e=this;registerInstance(this,r);this.onClick=function(r){openURL(e.href,r,e.routerDirection,e.routerAnimation)};this.color=undefined;this.href=undefined;this.rel=undefined;this.routerDirection="forward";this.routerAnimation=undefined;this.target=undefined}r.prototype.render=function(){var r;var e=getIonMode(this);var t={href:this.href,rel:this.rel,target:this.target};return h(Host,{key:"9944573e56abecc47afd2df03b386e38fc7ed2f3",onClick:this.onClick,class:createColorClasses(this.color,(r={},r[e]=true,r["ion-activatable"]=true,r))},h("a",Object.assign({key:"383de10c02eb9ab87e27890548ef681dccf2a765"},t),h("slot",{key:"584a5a52e2b116f3827596cc5869a3557d6bcb6b"})))};return r}();RouterLink.style=IonRouterLinkStyle0;export{Route as ion_route,RouteRedirect as ion_route_redirect,Router as ion_router,RouterLink as ion_router_link};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{__awaiter,__generator}from"tslib";
|
|
2
2
|
/*!
|
|
3
3
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{r as registerInstance,d as createEvent,i as forceUpdate,h,H as Host,f as getElement}from"./index-73881b51.js";import{j as debounceEvent,c as componentOnReady,r as raf}from"./helpers-c0b9ca37.js";import{i as isRTL}from"./dir-babeabeb.js";import{c as createColorClasses}from"./theme-01f3f29c.js";import{a as arrowBackSharp,b as closeCircle,d as closeSharp,s as searchOutline,e as searchSharp}from"./index-f7dc70ba.js";import{c as config,b as getIonMode}from"./ionic-global-778b7863.js";var searchbarIosCss=".sc-ion-searchbar-ios-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:0.6;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;color:var(--color);font-family:var(--ion-font-family, inherit);-webkit-box-sizing:border-box;box-sizing:border-box}.ion-color.sc-ion-searchbar-ios-h{color:var(--ion-color-contrast)}.ion-color.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{background:var(--ion-color-base)}.ion-color.sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios,.ion-color.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.ion-color.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{color:inherit}.searchbar-search-icon.sc-ion-searchbar-ios{color:var(--icon-color);pointer-events:none}.searchbar-input-container.sc-ion-searchbar-ios{display:block;position:relative;-ms-flex-negative:1;flex-shrink:1;width:100%}.searchbar-input.sc-ion-searchbar-ios{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;border-radius:var(--border-radius);display:block;width:100%;min-height:inherit;border:0;outline:none;background:var(--background);font-family:inherit;-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-input.sc-ion-searchbar-ios::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios::-moz-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios::-webkit-search-cancel-button,.searchbar-input.sc-ion-searchbar-ios::-ms-clear{display:none}.searchbar-cancel-button.sc-ion-searchbar-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:none;height:100%;border:0;outline:none;color:var(--cancel-button-color);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-cancel-button.sc-ion-searchbar-ios>div.sc-ion-searchbar-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%}.searchbar-clear-button.sc-ion-searchbar-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:none;min-height:0;outline:none;color:var(--clear-button-color);-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-clear-button.sc-ion-searchbar-ios:focus{opacity:0.5}.searchbar-has-value.searchbar-should-show-clear.sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios{display:block}.searchbar-disabled.sc-ion-searchbar-ios-h{cursor:default;opacity:0.4;pointer-events:none}.sc-ion-searchbar-ios-h{--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.07);--border-radius:10px;--box-shadow:none;--cancel-button-color:var(--ion-color-primary, #3880ff);--clear-button-color:var(--ion-color-step-600, #666666);--color:var(--ion-text-color, #000);--icon-color:var(--ion-color-step-600, #666666);-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:12px;padding-bottom:12px;min-height:60px;contain:content}.searchbar-input-container.sc-ion-searchbar-ios{min-height:36px}.searchbar-search-icon.sc-ion-searchbar-ios{-webkit-margin-start:calc(50% - 60px);margin-inline-start:calc(50% - 60px);top:0;position:absolute;width:1.375rem;height:100%;contain:strict}@supports (inset-inline-start: 0){.searchbar-search-icon.sc-ion-searchbar-ios{inset-inline-start:5px}}@supports not (inset-inline-start: 0){.searchbar-search-icon.sc-ion-searchbar-ios{left:5px}[dir=rtl].sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,[dir=rtl] .sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{left:unset;right:unset;right:5px}[dir=rtl].sc-ion-searchbar-ios .searchbar-search-icon.sc-ion-searchbar-ios{left:unset;right:unset;right:5px}@supports selector(:dir(rtl)){.searchbar-search-icon.sc-ion-searchbar-ios:dir(rtl){left:unset;right:unset;right:5px}}}.searchbar-input.sc-ion-searchbar-ios{-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:6px;padding-bottom:6px;height:100%;font-size:1.0625rem;font-weight:400;contain:strict}.searchbar-has-value.searchbar-should-show-clear.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{-webkit-padding-start:1.75rem;padding-inline-start:1.75rem;-webkit-padding-end:1.75rem;padding-inline-end:1.75rem}.searchbar-clear-button.sc-ion-searchbar-ios{top:0;background-position:center;position:absolute;width:1.875rem;height:100%;border:0;background-color:transparent}@supports (inset-inline-start: 0){.searchbar-clear-button.sc-ion-searchbar-ios{inset-inline-end:0}}@supports not (inset-inline-start: 0){.searchbar-clear-button.sc-ion-searchbar-ios{right:0}[dir=rtl].sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios,[dir=rtl] .sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios{left:unset;right:unset;left:0}[dir=rtl].sc-ion-searchbar-ios .searchbar-clear-button.sc-ion-searchbar-ios{left:unset;right:unset;left:0}@supports selector(:dir(rtl)){.searchbar-clear-button.sc-ion-searchbar-ios:dir(rtl){left:unset;right:unset;left:0}}}.searchbar-clear-icon.sc-ion-searchbar-ios{width:1.125rem;height:100%}.searchbar-cancel-button.sc-ion-searchbar-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0;background-color:transparent;font-size:16px}.searchbar-left-aligned.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{-webkit-margin-start:0;margin-inline-start:0}.searchbar-left-aligned.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{-webkit-padding-start:1.875rem;padding-inline-start:1.875rem}.searchbar-has-focus.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.searchbar-should-show-cancel.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{display:block}.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{-webkit-transition:all 300ms ease;transition:all 300ms ease}.searchbar-animated.searchbar-has-focus.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.searchbar-animated.searchbar-should-show-cancel.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{opacity:1;pointer-events:auto}.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{-webkit-margin-end:-100%;margin-inline-end:-100%;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:all 300ms ease;transition:all 300ms ease;opacity:0;pointer-events:none}.searchbar-no-animate.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,.searchbar-no-animate.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios,.searchbar-no-animate.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{-webkit-transition-duration:0ms;transition-duration:0ms}.ion-color.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{color:var(--ion-color-base)}@media (any-hover: hover){.ion-color.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios:hover{color:var(--ion-color-tint)}}ion-toolbar.sc-ion-searchbar-ios-h,ion-toolbar .sc-ion-searchbar-ios-h{padding-top:1px;padding-bottom:15px;min-height:52px}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color),ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color){color:inherit}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-cancel-button.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-cancel-button.sc-ion-searchbar-ios{color:currentColor}ion-toolbar.ion-color.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{color:currentColor;opacity:0.5}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-input.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-input.sc-ion-searchbar-ios{background:rgba(var(--ion-color-contrast-rgb), 0.07);color:currentColor}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-clear-button.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-clear-button.sc-ion-searchbar-ios{color:currentColor;opacity:0.5}";var IonSearchbarIosStyle0=searchbarIosCss;var searchbarMdCss=".sc-ion-searchbar-md-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:0.6;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;color:var(--color);font-family:var(--ion-font-family, inherit);-webkit-box-sizing:border-box;box-sizing:border-box}.ion-color.sc-ion-searchbar-md-h{color:var(--ion-color-contrast)}.ion-color.sc-ion-searchbar-md-h .searchbar-input.sc-ion-searchbar-md{background:var(--ion-color-base)}.ion-color.sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md,.ion-color.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md,.ion-color.sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md{color:inherit}.searchbar-search-icon.sc-ion-searchbar-md{color:var(--icon-color);pointer-events:none}.searchbar-input-container.sc-ion-searchbar-md{display:block;position:relative;-ms-flex-negative:1;flex-shrink:1;width:100%}.searchbar-input.sc-ion-searchbar-md{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;border-radius:var(--border-radius);display:block;width:100%;min-height:inherit;border:0;outline:none;background:var(--background);font-family:inherit;-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-input.sc-ion-searchbar-md::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md::-moz-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md::-webkit-search-cancel-button,.searchbar-input.sc-ion-searchbar-md::-ms-clear{display:none}.searchbar-cancel-button.sc-ion-searchbar-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:none;height:100%;border:0;outline:none;color:var(--cancel-button-color);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-cancel-button.sc-ion-searchbar-md>div.sc-ion-searchbar-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%}.searchbar-clear-button.sc-ion-searchbar-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:none;min-height:0;outline:none;color:var(--clear-button-color);-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-clear-button.sc-ion-searchbar-md:focus{opacity:0.5}.searchbar-has-value.searchbar-should-show-clear.sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md{display:block}.searchbar-disabled.sc-ion-searchbar-md-h{cursor:default;opacity:0.4;pointer-events:none}.sc-ion-searchbar-md-h{--background:var(--ion-background-color, #fff);--border-radius:2px;--box-shadow:0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);--cancel-button-color:var(--ion-color-step-900, #1a1a1a);--clear-button-color:initial;--color:var(--ion-color-step-850, #262626);--icon-color:var(--ion-color-step-600, #666666);-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;background:inherit}.searchbar-search-icon.sc-ion-searchbar-md{top:11px;width:1.3125rem;height:1.3125rem}@supports (inset-inline-start: 0){.searchbar-search-icon.sc-ion-searchbar-md{inset-inline-start:16px}}@supports not (inset-inline-start: 0){.searchbar-search-icon.sc-ion-searchbar-md{left:16px}[dir=rtl].sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md{left:unset;right:unset;right:16px}[dir=rtl].sc-ion-searchbar-md .searchbar-search-icon.sc-ion-searchbar-md{left:unset;right:unset;right:16px}@supports selector(:dir(rtl)){.searchbar-search-icon.sc-ion-searchbar-md:dir(rtl){left:unset;right:unset;right:16px}}}.searchbar-cancel-button.sc-ion-searchbar-md{top:0;background-color:transparent;font-size:1.5em}@supports (inset-inline-start: 0){.searchbar-cancel-button.sc-ion-searchbar-md{inset-inline-start:9px}}@supports not (inset-inline-start: 0){.searchbar-cancel-button.sc-ion-searchbar-md{left:9px}[dir=rtl].sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md{left:unset;right:unset;right:9px}[dir=rtl].sc-ion-searchbar-md .searchbar-cancel-button.sc-ion-searchbar-md{left:unset;right:unset;right:9px}@supports selector(:dir(rtl)){.searchbar-cancel-button.sc-ion-searchbar-md:dir(rtl){left:unset;right:unset;right:9px}}}.searchbar-search-icon.sc-ion-searchbar-md,.searchbar-cancel-button.sc-ion-searchbar-md{position:absolute}.searchbar-search-icon.ion-activated.sc-ion-searchbar-md,.searchbar-cancel-button.ion-activated.sc-ion-searchbar-md{background-color:transparent}.searchbar-input.sc-ion-searchbar-md{-webkit-padding-start:3.4375rem;padding-inline-start:3.4375rem;-webkit-padding-end:3.4375rem;padding-inline-end:3.4375rem;padding-top:0.375rem;padding-bottom:0.375rem;background-position:left 8px center;height:auto;font-size:1rem;font-weight:400;line-height:30px}[dir=rtl].sc-ion-searchbar-md-h .searchbar-input.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-input.sc-ion-searchbar-md{background-position:right 8px center}[dir=rtl].sc-ion-searchbar-md .searchbar-input.sc-ion-searchbar-md{background-position:right 8px center}@supports selector(:dir(rtl)){.searchbar-input.sc-ion-searchbar-md:dir(rtl){background-position:right 8px center}}.searchbar-clear-button.sc-ion-searchbar-md{top:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;position:absolute;height:100%;border:0;background-color:transparent}@supports (inset-inline-start: 0){.searchbar-clear-button.sc-ion-searchbar-md{inset-inline-end:13px}}@supports not (inset-inline-start: 0){.searchbar-clear-button.sc-ion-searchbar-md{right:13px}[dir=rtl].sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md{left:unset;right:unset;left:13px}[dir=rtl].sc-ion-searchbar-md .searchbar-clear-button.sc-ion-searchbar-md{left:unset;right:unset;left:13px}@supports selector(:dir(rtl)){.searchbar-clear-button.sc-ion-searchbar-md:dir(rtl){left:unset;right:unset;left:13px}}}.searchbar-clear-button.ion-activated.sc-ion-searchbar-md{background-color:transparent}.searchbar-clear-icon.sc-ion-searchbar-md{width:1.375rem;height:100%}.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md{display:block}.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md,.searchbar-should-show-cancel.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md{display:block}.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md+.searchbar-search-icon.sc-ion-searchbar-md,.searchbar-should-show-cancel.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md+.searchbar-search-icon.sc-ion-searchbar-md{display:none}ion-toolbar.sc-ion-searchbar-md-h,ion-toolbar .sc-ion-searchbar-md-h{-webkit-padding-start:7px;padding-inline-start:7px;-webkit-padding-end:7px;padding-inline-end:7px;padding-top:3px;padding-bottom:3px}";var IonSearchbarMdStyle0=searchbarMdCss;var Searchbar=function(){function r(r){var a=this;registerInstance(this,r);this.ionInput=createEvent(this,"ionInput",7);this.ionChange=createEvent(this,"ionChange",7);this.ionCancel=createEvent(this,"ionCancel",7);this.ionClear=createEvent(this,"ionClear",7);this.ionBlur=createEvent(this,"ionBlur",7);this.ionFocus=createEvent(this,"ionFocus",7);this.ionStyle=createEvent(this,"ionStyle",7);this.isCancelVisible=false;this.shouldAlignLeft=true;this.inputId="ion-searchbar-".concat(searchbarIds++);this.onClearInput=function(r){return __awaiter(a,void 0,void 0,(function(){var a=this;return __generator(this,(function(e){this.ionClear.emit();return[2,new Promise((function(e){setTimeout((function(){var i=a.getValue();if(i!==""){a.value="";a.emitInputChange();if(r&&!a.focused){a.setFocus();a.focusedValue=i}}e()}),16*4)}))]}))}))};this.onCancelSearchbar=function(r){return __awaiter(a,void 0,void 0,(function(){var a,e;return __generator(this,(function(i){switch(i.label){case 0:if(r){r.preventDefault();r.stopPropagation()}this.ionCancel.emit();a=this.getValue();e=this.focused;return[4,this.onClearInput()];case 1:i.sent();if(a&&!e){this.emitValueChange(r)}if(this.nativeInput){this.nativeInput.blur()}return[2]}}))}))};this.onInput=function(r){var e=r.target;if(e){a.value=e.value}a.emitInputChange(r)};this.onChange=function(r){a.emitValueChange(r)};this.onBlur=function(r){a.focused=false;a.ionBlur.emit();a.positionElements();if(a.focusedValue!==a.value){a.emitValueChange(r)}a.focusedValue=undefined};this.onFocus=function(){a.focused=true;a.focusedValue=a.value;a.ionFocus.emit();a.positionElements()};this.focused=false;this.noAnimate=true;this.color=undefined;this.animated=false;this.autocomplete="off";this.autocorrect="off";this.cancelButtonIcon=config.get("backButtonIcon",arrowBackSharp);this.cancelButtonText="Cancel";this.clearIcon=undefined;this.debounce=undefined;this.disabled=false;this.inputmode=undefined;this.enterkeyhint=undefined;this.name=this.inputId;this.placeholder="Search";this.searchIcon=undefined;this.showCancelButton="never";this.showClearButton="always";this.spellcheck=false;this.type="search";this.value=""}r.prototype.debounceChanged=function(){var r=this,a=r.ionInput,e=r.debounce,i=r.originalIonInput;this.ionInput=e===undefined?i!==null&&i!==void 0?i:a:debounceEvent(a,e)};r.prototype.valueChanged=function(){var r=this.nativeInput;var a=this.getValue();if(r&&r.value!==a){r.value=a}};r.prototype.showCancelButtonChanged=function(){var r=this;requestAnimationFrame((function(){r.positionElements();forceUpdate(r)}))};r.prototype.connectedCallback=function(){this.emitStyle()};r.prototype.componentDidLoad=function(){var r=this;this.originalIonInput=this.ionInput;this.positionElements();this.debounceChanged();setTimeout((function(){r.noAnimate=false}),300)};r.prototype.emitStyle=function(){this.ionStyle.emit({searchbar:true})};r.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){if(this.nativeInput){this.nativeInput.focus()}return[2]}))}))};r.prototype.getInputElement=function(){return __awaiter(this,void 0,void 0,(function(){var r=this;return __generator(this,(function(a){switch(a.label){case 0:if(!!this.nativeInput)return[3,2];return[4,new Promise((function(a){return componentOnReady(r.el,a)}))];case 1:a.sent();a.label=2;case 2:return[2,Promise.resolve(this.nativeInput)]}}))}))};r.prototype.emitValueChange=function(r){var a=this.value;var e=a==null?a:a.toString();this.focusedValue=e;this.ionChange.emit({value:e,event:r})};r.prototype.emitInputChange=function(r){var a=this.value;this.ionInput.emit({value:a,event:r})};r.prototype.positionElements=function(){var r=this.getValue();var a=this.shouldAlignLeft;var e=getIonMode(this);var i=!this.animated||r.trim()!==""||!!this.focused;this.shouldAlignLeft=i;if(e!=="ios"){return}if(a!==i){this.positionPlaceholder()}if(this.animated){this.positionCancelButton()}};r.prototype.positionPlaceholder=function(){var r=this.nativeInput;if(!r){return}var a=isRTL(this.el);var e=(this.el.shadowRoot||this.el).querySelector(".searchbar-search-icon");if(this.shouldAlignLeft){r.removeAttribute("style");e.removeAttribute("style")}else{var i=document;var o=i.createElement("span");o.innerText=this.placeholder||"";i.body.appendChild(o);raf((function(){var i=o.offsetWidth;o.remove();var n="calc(50% - "+i/2+"px)";var t="calc(50% - "+(i/2+e.clientWidth+8)+"px)";if(a){r.style.paddingRight=n;e.style.marginRight=t}else{r.style.paddingLeft=n;e.style.marginLeft=t}}))}};r.prototype.positionCancelButton=function(){var r=isRTL(this.el);var a=(this.el.shadowRoot||this.el).querySelector(".searchbar-cancel-button");var e=this.shouldShowCancelButton();if(a!==null&&e!==this.isCancelVisible){var i=a.style;this.isCancelVisible=e;if(e){if(r){i.marginLeft="0"}else{i.marginRight="0"}}else{var o=a.offsetWidth;if(o>0){if(r){i.marginLeft=-o+"px"}else{i.marginRight=-o+"px"}}}}};r.prototype.getValue=function(){return this.value||""};r.prototype.hasValue=function(){return this.getValue()!==""};r.prototype.shouldShowCancelButton=function(){if(this.showCancelButton==="never"||this.showCancelButton==="focus"&&!this.focused){return false}return true};r.prototype.shouldShowClearButton=function(){if(this.showClearButton==="never"||this.showClearButton==="focus"&&!this.focused){return false}return true};r.prototype.render=function(){var r;var a=this;var e=this.cancelButtonText;var i=this.animated&&config.getBoolean("animated",true);var o=getIonMode(this);var n=this.clearIcon||(o==="ios"?closeCircle:closeSharp);var t=this.searchIcon||(o==="ios"?searchOutline:searchSharp);var s=this.shouldShowCancelButton();var c=this.showCancelButton!=="never"&&h("button",{key:"1de9b9bc6bad708bafcf4d31fa82838355120486","aria-label":e,"aria-hidden":s?undefined:"true",type:"button",tabIndex:o==="ios"&&!s?-1:undefined,onMouseDown:this.onCancelSearchbar,onTouchStart:this.onCancelSearchbar,class:"searchbar-cancel-button"},h("div",{key:"e5178016e17104a80732edbae73c0dfc264bfe52","aria-hidden":"true"},o==="md"?h("ion-icon",{"aria-hidden":"true",mode:o,icon:this.cancelButtonIcon,lazy:false}):e));return h(Host,{key:"2c88a7b6ec7f33ada7dae560881210d7a8800f76",role:"search","aria-disabled":this.disabled?"true":null,class:createColorClasses(this.color,(r={},r[o]=true,r["searchbar-animated"]=i,r["searchbar-disabled"]=this.disabled,r["searchbar-no-animate"]=i&&this.noAnimate,r["searchbar-has-value"]=this.hasValue(),r["searchbar-left-aligned"]=this.shouldAlignLeft,r["searchbar-has-focus"]=this.focused,r["searchbar-should-show-clear"]=this.shouldShowClearButton(),r["searchbar-should-show-cancel"]=this.shouldShowCancelButton(),r))},h("div",{key:"8e914264a99453748a2bf370943e4047a0a587fb",class:"searchbar-input-container"},h("input",{key:"d772f3e8d42301e50fbd6c9deb332fbdf3c435ac","aria-label":"search text",disabled:this.disabled,ref:function(r){return a.nativeInput=r},class:"searchbar-input",inputMode:this.inputmode,enterKeyHint:this.enterkeyhint,name:this.name,onInput:this.onInput,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,placeholder:this.placeholder,type:this.type,value:this.getValue(),autoComplete:this.autocomplete,autoCorrect:this.autocorrect,spellcheck:this.spellcheck}),o==="md"&&c,h("ion-icon",{key:"8d9b461c2c34729b1bb562c227868cf817a353bc","aria-hidden":"true",mode:o,icon:t,lazy:false,class:"searchbar-search-icon"}),h("button",{key:"bcc39be721f4b825af31aae4dfb3058722d889a8","aria-label":"reset",type:"button","no-blur":true,class:"searchbar-clear-button",onPointerDown:function(r){r.preventDefault()},onClick:function(){return a.onClearInput(true)}},h("ion-icon",{key:"9a6478e1f1482aa6e62c88bd96cd19cacbfb8d60","aria-hidden":"true",mode:o,icon:n,lazy:false,class:"searchbar-clear-icon"}))),o==="ios"&&c)};Object.defineProperty(r.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(r,"watchers",{get:function(){return{debounce:["debounceChanged"],value:["valueChanged"],showCancelButton:["showCancelButtonChanged"]}},enumerable:false,configurable:true});return r}();var searchbarIds=0;Searchbar.style={ios:IonSearchbarIosStyle0,md:IonSearchbarMdStyle0};export{Searchbar as ion_searchbar};
|
|
4
|
+
*/import{r as registerInstance,d as createEvent,i as forceUpdate,h,H as Host,f as getElement}from"./index-4c30cddd.js";import{j as debounceEvent,c as componentOnReady,r as raf}from"./helpers-c0b9ca37.js";import{i as isRTL}from"./dir-babeabeb.js";import{c as createColorClasses}from"./theme-01f3f29c.js";import{a as arrowBackSharp,b as closeCircle,d as closeSharp,s as searchOutline,e as searchSharp}from"./index-f7dc70ba.js";import{c as config,b as getIonMode}from"./ionic-global-ad9a1810.js";var searchbarIosCss=".sc-ion-searchbar-ios-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:0.6;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;color:var(--color);font-family:var(--ion-font-family, inherit);-webkit-box-sizing:border-box;box-sizing:border-box}.ion-color.sc-ion-searchbar-ios-h{color:var(--ion-color-contrast)}.ion-color.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{background:var(--ion-color-base)}.ion-color.sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios,.ion-color.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.ion-color.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{color:inherit}.searchbar-search-icon.sc-ion-searchbar-ios{color:var(--icon-color);pointer-events:none}.searchbar-input-container.sc-ion-searchbar-ios{display:block;position:relative;-ms-flex-negative:1;flex-shrink:1;width:100%}.searchbar-input.sc-ion-searchbar-ios{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;border-radius:var(--border-radius);display:block;width:100%;min-height:inherit;border:0;outline:none;background:var(--background);font-family:inherit;-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-input.sc-ion-searchbar-ios::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios::-moz-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios::-webkit-search-cancel-button,.searchbar-input.sc-ion-searchbar-ios::-ms-clear{display:none}.searchbar-cancel-button.sc-ion-searchbar-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:none;height:100%;border:0;outline:none;color:var(--cancel-button-color);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-cancel-button.sc-ion-searchbar-ios>div.sc-ion-searchbar-ios{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%}.searchbar-clear-button.sc-ion-searchbar-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:none;min-height:0;outline:none;color:var(--clear-button-color);-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-clear-button.sc-ion-searchbar-ios:focus{opacity:0.5}.searchbar-has-value.searchbar-should-show-clear.sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios{display:block}.searchbar-disabled.sc-ion-searchbar-ios-h{cursor:default;opacity:0.4;pointer-events:none}.sc-ion-searchbar-ios-h{--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.07);--border-radius:10px;--box-shadow:none;--cancel-button-color:var(--ion-color-primary, #3880ff);--clear-button-color:var(--ion-color-step-600, #666666);--color:var(--ion-text-color, #000);--icon-color:var(--ion-color-step-600, #666666);-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:12px;padding-bottom:12px;min-height:60px;contain:content}.searchbar-input-container.sc-ion-searchbar-ios{min-height:36px}.searchbar-search-icon.sc-ion-searchbar-ios{-webkit-margin-start:calc(50% - 60px);margin-inline-start:calc(50% - 60px);top:0;position:absolute;width:1.375rem;height:100%;contain:strict}@supports (inset-inline-start: 0){.searchbar-search-icon.sc-ion-searchbar-ios{inset-inline-start:5px}}@supports not (inset-inline-start: 0){.searchbar-search-icon.sc-ion-searchbar-ios{left:5px}[dir=rtl].sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,[dir=rtl] .sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{left:unset;right:unset;right:5px}[dir=rtl].sc-ion-searchbar-ios .searchbar-search-icon.sc-ion-searchbar-ios{left:unset;right:unset;right:5px}@supports selector(:dir(rtl)){.searchbar-search-icon.sc-ion-searchbar-ios:dir(rtl){left:unset;right:unset;right:5px}}}.searchbar-input.sc-ion-searchbar-ios{-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:6px;padding-bottom:6px;height:100%;font-size:1.0625rem;font-weight:400;contain:strict}.searchbar-has-value.searchbar-should-show-clear.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{-webkit-padding-start:1.75rem;padding-inline-start:1.75rem;-webkit-padding-end:1.75rem;padding-inline-end:1.75rem}.searchbar-clear-button.sc-ion-searchbar-ios{top:0;background-position:center;position:absolute;width:1.875rem;height:100%;border:0;background-color:transparent}@supports (inset-inline-start: 0){.searchbar-clear-button.sc-ion-searchbar-ios{inset-inline-end:0}}@supports not (inset-inline-start: 0){.searchbar-clear-button.sc-ion-searchbar-ios{right:0}[dir=rtl].sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios,[dir=rtl] .sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios{left:unset;right:unset;left:0}[dir=rtl].sc-ion-searchbar-ios .searchbar-clear-button.sc-ion-searchbar-ios{left:unset;right:unset;left:0}@supports selector(:dir(rtl)){.searchbar-clear-button.sc-ion-searchbar-ios:dir(rtl){left:unset;right:unset;left:0}}}.searchbar-clear-icon.sc-ion-searchbar-ios{width:1.125rem;height:100%}.searchbar-cancel-button.sc-ion-searchbar-ios{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0;background-color:transparent;font-size:16px}.searchbar-left-aligned.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{-webkit-margin-start:0;margin-inline-start:0}.searchbar-left-aligned.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{-webkit-padding-start:1.875rem;padding-inline-start:1.875rem}.searchbar-has-focus.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.searchbar-should-show-cancel.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{display:block}.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{-webkit-transition:all 300ms ease;transition:all 300ms ease}.searchbar-animated.searchbar-has-focus.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.searchbar-animated.searchbar-should-show-cancel.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{opacity:1;pointer-events:auto}.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{-webkit-margin-end:-100%;margin-inline-end:-100%;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);-webkit-transition:all 300ms ease;transition:all 300ms ease;opacity:0;pointer-events:none}.searchbar-no-animate.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,.searchbar-no-animate.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios,.searchbar-no-animate.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{-webkit-transition-duration:0ms;transition-duration:0ms}.ion-color.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{color:var(--ion-color-base)}@media (any-hover: hover){.ion-color.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios:hover{color:var(--ion-color-tint)}}ion-toolbar.sc-ion-searchbar-ios-h,ion-toolbar .sc-ion-searchbar-ios-h{padding-top:1px;padding-bottom:15px;min-height:52px}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color),ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color){color:inherit}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-cancel-button.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-cancel-button.sc-ion-searchbar-ios{color:currentColor}ion-toolbar.ion-color.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{color:currentColor;opacity:0.5}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-input.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-input.sc-ion-searchbar-ios{background:rgba(var(--ion-color-contrast-rgb), 0.07);color:currentColor}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-clear-button.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-clear-button.sc-ion-searchbar-ios{color:currentColor;opacity:0.5}";var IonSearchbarIosStyle0=searchbarIosCss;var searchbarMdCss=".sc-ion-searchbar-md-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:0.6;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;width:100%;color:var(--color);font-family:var(--ion-font-family, inherit);-webkit-box-sizing:border-box;box-sizing:border-box}.ion-color.sc-ion-searchbar-md-h{color:var(--ion-color-contrast)}.ion-color.sc-ion-searchbar-md-h .searchbar-input.sc-ion-searchbar-md{background:var(--ion-color-base)}.ion-color.sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md,.ion-color.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md,.ion-color.sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md{color:inherit}.searchbar-search-icon.sc-ion-searchbar-md{color:var(--icon-color);pointer-events:none}.searchbar-input-container.sc-ion-searchbar-md{display:block;position:relative;-ms-flex-negative:1;flex-shrink:1;width:100%}.searchbar-input.sc-ion-searchbar-md{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;border-radius:var(--border-radius);display:block;width:100%;min-height:inherit;border:0;outline:none;background:var(--background);font-family:inherit;-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-input.sc-ion-searchbar-md::-webkit-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md::-moz-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md:-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md::-ms-input-placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md::-webkit-search-cancel-button,.searchbar-input.sc-ion-searchbar-md::-ms-clear{display:none}.searchbar-cancel-button.sc-ion-searchbar-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:none;height:100%;border:0;outline:none;color:var(--cancel-button-color);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-cancel-button.sc-ion-searchbar-md>div.sc-ion-searchbar-md{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%}.searchbar-clear-button.sc-ion-searchbar-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:none;min-height:0;outline:none;color:var(--clear-button-color);-webkit-appearance:none;-moz-appearance:none;appearance:none}.searchbar-clear-button.sc-ion-searchbar-md:focus{opacity:0.5}.searchbar-has-value.searchbar-should-show-clear.sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md{display:block}.searchbar-disabled.sc-ion-searchbar-md-h{cursor:default;opacity:0.4;pointer-events:none}.sc-ion-searchbar-md-h{--background:var(--ion-background-color, #fff);--border-radius:2px;--box-shadow:0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);--cancel-button-color:var(--ion-color-step-900, #1a1a1a);--clear-button-color:initial;--color:var(--ion-color-step-850, #262626);--icon-color:var(--ion-color-step-600, #666666);-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;background:inherit}.searchbar-search-icon.sc-ion-searchbar-md{top:11px;width:1.3125rem;height:1.3125rem}@supports (inset-inline-start: 0){.searchbar-search-icon.sc-ion-searchbar-md{inset-inline-start:16px}}@supports not (inset-inline-start: 0){.searchbar-search-icon.sc-ion-searchbar-md{left:16px}[dir=rtl].sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md{left:unset;right:unset;right:16px}[dir=rtl].sc-ion-searchbar-md .searchbar-search-icon.sc-ion-searchbar-md{left:unset;right:unset;right:16px}@supports selector(:dir(rtl)){.searchbar-search-icon.sc-ion-searchbar-md:dir(rtl){left:unset;right:unset;right:16px}}}.searchbar-cancel-button.sc-ion-searchbar-md{top:0;background-color:transparent;font-size:1.5em}@supports (inset-inline-start: 0){.searchbar-cancel-button.sc-ion-searchbar-md{inset-inline-start:9px}}@supports not (inset-inline-start: 0){.searchbar-cancel-button.sc-ion-searchbar-md{left:9px}[dir=rtl].sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md{left:unset;right:unset;right:9px}[dir=rtl].sc-ion-searchbar-md .searchbar-cancel-button.sc-ion-searchbar-md{left:unset;right:unset;right:9px}@supports selector(:dir(rtl)){.searchbar-cancel-button.sc-ion-searchbar-md:dir(rtl){left:unset;right:unset;right:9px}}}.searchbar-search-icon.sc-ion-searchbar-md,.searchbar-cancel-button.sc-ion-searchbar-md{position:absolute}.searchbar-search-icon.ion-activated.sc-ion-searchbar-md,.searchbar-cancel-button.ion-activated.sc-ion-searchbar-md{background-color:transparent}.searchbar-input.sc-ion-searchbar-md{-webkit-padding-start:3.4375rem;padding-inline-start:3.4375rem;-webkit-padding-end:3.4375rem;padding-inline-end:3.4375rem;padding-top:0.375rem;padding-bottom:0.375rem;background-position:left 8px center;height:auto;font-size:1rem;font-weight:400;line-height:30px}[dir=rtl].sc-ion-searchbar-md-h .searchbar-input.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-input.sc-ion-searchbar-md{background-position:right 8px center}[dir=rtl].sc-ion-searchbar-md .searchbar-input.sc-ion-searchbar-md{background-position:right 8px center}@supports selector(:dir(rtl)){.searchbar-input.sc-ion-searchbar-md:dir(rtl){background-position:right 8px center}}.searchbar-clear-button.sc-ion-searchbar-md{top:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;position:absolute;height:100%;border:0;background-color:transparent}@supports (inset-inline-start: 0){.searchbar-clear-button.sc-ion-searchbar-md{inset-inline-end:13px}}@supports not (inset-inline-start: 0){.searchbar-clear-button.sc-ion-searchbar-md{right:13px}[dir=rtl].sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md{left:unset;right:unset;left:13px}[dir=rtl].sc-ion-searchbar-md .searchbar-clear-button.sc-ion-searchbar-md{left:unset;right:unset;left:13px}@supports selector(:dir(rtl)){.searchbar-clear-button.sc-ion-searchbar-md:dir(rtl){left:unset;right:unset;left:13px}}}.searchbar-clear-button.ion-activated.sc-ion-searchbar-md{background-color:transparent}.searchbar-clear-icon.sc-ion-searchbar-md{width:1.375rem;height:100%}.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md{display:block}.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md,.searchbar-should-show-cancel.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md{display:block}.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md+.searchbar-search-icon.sc-ion-searchbar-md,.searchbar-should-show-cancel.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md+.searchbar-search-icon.sc-ion-searchbar-md{display:none}ion-toolbar.sc-ion-searchbar-md-h,ion-toolbar .sc-ion-searchbar-md-h{-webkit-padding-start:7px;padding-inline-start:7px;-webkit-padding-end:7px;padding-inline-end:7px;padding-top:3px;padding-bottom:3px}";var IonSearchbarMdStyle0=searchbarMdCss;var Searchbar=function(){function r(r){var a=this;registerInstance(this,r);this.ionInput=createEvent(this,"ionInput",7);this.ionChange=createEvent(this,"ionChange",7);this.ionCancel=createEvent(this,"ionCancel",7);this.ionClear=createEvent(this,"ionClear",7);this.ionBlur=createEvent(this,"ionBlur",7);this.ionFocus=createEvent(this,"ionFocus",7);this.ionStyle=createEvent(this,"ionStyle",7);this.isCancelVisible=false;this.shouldAlignLeft=true;this.inputId="ion-searchbar-".concat(searchbarIds++);this.onClearInput=function(r){return __awaiter(a,void 0,void 0,(function(){var a=this;return __generator(this,(function(e){this.ionClear.emit();return[2,new Promise((function(e){setTimeout((function(){var i=a.getValue();if(i!==""){a.value="";a.emitInputChange();if(r&&!a.focused){a.setFocus();a.focusedValue=i}}e()}),16*4)}))]}))}))};this.onCancelSearchbar=function(r){return __awaiter(a,void 0,void 0,(function(){var a,e;return __generator(this,(function(i){switch(i.label){case 0:if(r){r.preventDefault();r.stopPropagation()}this.ionCancel.emit();a=this.getValue();e=this.focused;return[4,this.onClearInput()];case 1:i.sent();if(a&&!e){this.emitValueChange(r)}if(this.nativeInput){this.nativeInput.blur()}return[2]}}))}))};this.onInput=function(r){var e=r.target;if(e){a.value=e.value}a.emitInputChange(r)};this.onChange=function(r){a.emitValueChange(r)};this.onBlur=function(r){a.focused=false;a.ionBlur.emit();a.positionElements();if(a.focusedValue!==a.value){a.emitValueChange(r)}a.focusedValue=undefined};this.onFocus=function(){a.focused=true;a.focusedValue=a.value;a.ionFocus.emit();a.positionElements()};this.focused=false;this.noAnimate=true;this.color=undefined;this.animated=false;this.autocomplete="off";this.autocorrect="off";this.cancelButtonIcon=config.get("backButtonIcon",arrowBackSharp);this.cancelButtonText="Cancel";this.clearIcon=undefined;this.debounce=undefined;this.disabled=false;this.inputmode=undefined;this.enterkeyhint=undefined;this.name=this.inputId;this.placeholder="Search";this.searchIcon=undefined;this.showCancelButton="never";this.showClearButton="always";this.spellcheck=false;this.type="search";this.value=""}r.prototype.debounceChanged=function(){var r=this,a=r.ionInput,e=r.debounce,i=r.originalIonInput;this.ionInput=e===undefined?i!==null&&i!==void 0?i:a:debounceEvent(a,e)};r.prototype.valueChanged=function(){var r=this.nativeInput;var a=this.getValue();if(r&&r.value!==a){r.value=a}};r.prototype.showCancelButtonChanged=function(){var r=this;requestAnimationFrame((function(){r.positionElements();forceUpdate(r)}))};r.prototype.connectedCallback=function(){this.emitStyle()};r.prototype.componentDidLoad=function(){var r=this;this.originalIonInput=this.ionInput;this.positionElements();this.debounceChanged();setTimeout((function(){r.noAnimate=false}),300)};r.prototype.emitStyle=function(){this.ionStyle.emit({searchbar:true})};r.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(r){if(this.nativeInput){this.nativeInput.focus()}return[2]}))}))};r.prototype.getInputElement=function(){return __awaiter(this,void 0,void 0,(function(){var r=this;return __generator(this,(function(a){switch(a.label){case 0:if(!!this.nativeInput)return[3,2];return[4,new Promise((function(a){return componentOnReady(r.el,a)}))];case 1:a.sent();a.label=2;case 2:return[2,Promise.resolve(this.nativeInput)]}}))}))};r.prototype.emitValueChange=function(r){var a=this.value;var e=a==null?a:a.toString();this.focusedValue=e;this.ionChange.emit({value:e,event:r})};r.prototype.emitInputChange=function(r){var a=this.value;this.ionInput.emit({value:a,event:r})};r.prototype.positionElements=function(){var r=this.getValue();var a=this.shouldAlignLeft;var e=getIonMode(this);var i=!this.animated||r.trim()!==""||!!this.focused;this.shouldAlignLeft=i;if(e!=="ios"){return}if(a!==i){this.positionPlaceholder()}if(this.animated){this.positionCancelButton()}};r.prototype.positionPlaceholder=function(){var r=this.nativeInput;if(!r){return}var a=isRTL(this.el);var e=(this.el.shadowRoot||this.el).querySelector(".searchbar-search-icon");if(this.shouldAlignLeft){r.removeAttribute("style");e.removeAttribute("style")}else{var i=document;var o=i.createElement("span");o.innerText=this.placeholder||"";i.body.appendChild(o);raf((function(){var i=o.offsetWidth;o.remove();var n="calc(50% - "+i/2+"px)";var t="calc(50% - "+(i/2+e.clientWidth+8)+"px)";if(a){r.style.paddingRight=n;e.style.marginRight=t}else{r.style.paddingLeft=n;e.style.marginLeft=t}}))}};r.prototype.positionCancelButton=function(){var r=isRTL(this.el);var a=(this.el.shadowRoot||this.el).querySelector(".searchbar-cancel-button");var e=this.shouldShowCancelButton();if(a!==null&&e!==this.isCancelVisible){var i=a.style;this.isCancelVisible=e;if(e){if(r){i.marginLeft="0"}else{i.marginRight="0"}}else{var o=a.offsetWidth;if(o>0){if(r){i.marginLeft=-o+"px"}else{i.marginRight=-o+"px"}}}}};r.prototype.getValue=function(){return this.value||""};r.prototype.hasValue=function(){return this.getValue()!==""};r.prototype.shouldShowCancelButton=function(){if(this.showCancelButton==="never"||this.showCancelButton==="focus"&&!this.focused){return false}return true};r.prototype.shouldShowClearButton=function(){if(this.showClearButton==="never"||this.showClearButton==="focus"&&!this.focused){return false}return true};r.prototype.render=function(){var r;var a=this;var e=this.cancelButtonText;var i=this.animated&&config.getBoolean("animated",true);var o=getIonMode(this);var n=this.clearIcon||(o==="ios"?closeCircle:closeSharp);var t=this.searchIcon||(o==="ios"?searchOutline:searchSharp);var s=this.shouldShowCancelButton();var c=this.showCancelButton!=="never"&&h("button",{key:"1de9b9bc6bad708bafcf4d31fa82838355120486","aria-label":e,"aria-hidden":s?undefined:"true",type:"button",tabIndex:o==="ios"&&!s?-1:undefined,onMouseDown:this.onCancelSearchbar,onTouchStart:this.onCancelSearchbar,class:"searchbar-cancel-button"},h("div",{key:"e5178016e17104a80732edbae73c0dfc264bfe52","aria-hidden":"true"},o==="md"?h("ion-icon",{"aria-hidden":"true",mode:o,icon:this.cancelButtonIcon,lazy:false}):e));return h(Host,{key:"2c88a7b6ec7f33ada7dae560881210d7a8800f76",role:"search","aria-disabled":this.disabled?"true":null,class:createColorClasses(this.color,(r={},r[o]=true,r["searchbar-animated"]=i,r["searchbar-disabled"]=this.disabled,r["searchbar-no-animate"]=i&&this.noAnimate,r["searchbar-has-value"]=this.hasValue(),r["searchbar-left-aligned"]=this.shouldAlignLeft,r["searchbar-has-focus"]=this.focused,r["searchbar-should-show-clear"]=this.shouldShowClearButton(),r["searchbar-should-show-cancel"]=this.shouldShowCancelButton(),r))},h("div",{key:"8e914264a99453748a2bf370943e4047a0a587fb",class:"searchbar-input-container"},h("input",{key:"d772f3e8d42301e50fbd6c9deb332fbdf3c435ac","aria-label":"search text",disabled:this.disabled,ref:function(r){return a.nativeInput=r},class:"searchbar-input",inputMode:this.inputmode,enterKeyHint:this.enterkeyhint,name:this.name,onInput:this.onInput,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,placeholder:this.placeholder,type:this.type,value:this.getValue(),autoComplete:this.autocomplete,autoCorrect:this.autocorrect,spellcheck:this.spellcheck}),o==="md"&&c,h("ion-icon",{key:"8d9b461c2c34729b1bb562c227868cf817a353bc","aria-hidden":"true",mode:o,icon:t,lazy:false,class:"searchbar-search-icon"}),h("button",{key:"bcc39be721f4b825af31aae4dfb3058722d889a8","aria-label":"reset",type:"button","no-blur":true,class:"searchbar-clear-button",onPointerDown:function(r){r.preventDefault()},onClick:function(){return a.onClearInput(true)}},h("ion-icon",{key:"9a6478e1f1482aa6e62c88bd96cd19cacbfb8d60","aria-hidden":"true",mode:o,icon:n,lazy:false,class:"searchbar-clear-icon"}))),o==="ios"&&c)};Object.defineProperty(r.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(r,"watchers",{get:function(){return{debounce:["debounceChanged"],value:["valueChanged"],showCancelButton:["showCancelButtonChanged"]}},enumerable:false,configurable:true});return r}();var searchbarIds=0;Searchbar.style={ios:IonSearchbarIosStyle0,md:IonSearchbarMdStyle0};export{Searchbar as ion_searchbar};
|