@ionic/core 7.7.2-dev.11707881769.185d2a14 → 7.7.2-dev.11707926434.1affaed4
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 +3 -7
- package/components/alert.js +2 -6
- package/components/data.js +28 -38
- package/components/ion-datetime-button.js +11 -10
- package/components/ion-datetime.js +68 -7
- package/components/ion-loading.js +2 -6
- package/components/ion-modal.js +3 -7
- package/components/ion-picker.js +2 -6
- package/components/ion-toast.js +2 -6
- package/components/item.js +12 -3
- package/components/overlays.js +4 -54
- package/components/popover.js +2 -6
- package/dist/cjs/{app-globals-92ad1b3d.js → app-globals-5a17c5e1.js} +1 -1
- package/dist/cjs/{button-active-2d6520ec.js → button-active-b8c3f603.js} +1 -1
- package/dist/cjs/{data-a5109f09.js → data-6246812e.js} +27 -39
- package/dist/cjs/{hardware-back-button-2696acaf.js → hardware-back-button-d23873bb.js} +2 -2
- package/dist/cjs/{index-0ffe376d.js → index-5a471146.js} +22 -25
- package/dist/cjs/{index-c3580a90.js → index-84351d21.js} +3 -3
- package/dist/cjs/{index-a43f7a0f.js → index-8c679cbf.js} +2 -2
- 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 +8 -12
- package/dist/cjs/ion-alert.cjs.entry.js +7 -11
- 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 +13 -12
- package/dist/cjs/ion-datetime_3.cjs.entry.js +71 -17
- 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 +6 -10
- package/dist/cjs/ion-menu_3.cjs.entry.js +5 -5
- package/dist/cjs/ion-modal.cjs.entry.js +8 -12
- 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 +7 -11
- 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 +4 -4
- 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 +6 -10
- package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
- package/dist/cjs/{ionic-global-59a10130.js → ionic-global-7358c23e.js} +1 -1
- package/dist/cjs/ionic.cjs.js +7 -7
- package/dist/cjs/{ios.transition-c3b11cc3.js → ios.transition-8e40c54e.js} +2 -2
- package/dist/cjs/loader.cjs.js +6 -6
- package/dist/cjs/{md.transition-82a8c649.js → md.transition-597a2479.js} +2 -2
- package/dist/cjs/{overlays-fb7ca451.js → overlays-330df245.js} +6 -56
- package/dist/cjs/{status-tap-692f6d32.js → status-tap-b0bfea34.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/action-sheet/action-sheet.js +5 -9
- package/dist/collection/components/alert/alert.js +4 -8
- package/dist/collection/components/datetime/datetime.js +90 -7
- package/dist/collection/components/datetime/test/basic/datetime.e2e.js +79 -0
- package/dist/collection/components/datetime/test/format.spec.js +65 -1
- package/dist/collection/components/datetime/utils/format.js +28 -20
- package/dist/collection/components/datetime-button/datetime-button.js +11 -10
- package/dist/collection/components/datetime-button/test/basic/datetime-button.e2e.js +66 -0
- package/dist/collection/components/item/item.js +12 -3
- package/dist/collection/components/loading/loading.js +4 -8
- package/dist/collection/components/modal/modal.js +5 -9
- package/dist/collection/components/picker/picker.js +4 -8
- package/dist/collection/components/popover/popover.js +4 -8
- package/dist/collection/components/toast/test/toast.spec.js +0 -12
- package/dist/collection/components/toast/toast.js +4 -8
- package/dist/collection/utils/overlays.js +4 -54
- package/dist/collection/utils/test/overlays/overlays.e2e.js +0 -33
- package/dist/collection/utils/test/overlays/overlays.spec.js +0 -51
- package/dist/docs.json +66 -23
- package/dist/esm/{app-globals-5cf6195b.js → app-globals-47226a12.js} +1 -1
- package/dist/esm/{button-active-47ac8092.js → button-active-4bee452c.js} +1 -1
- package/dist/esm/{data-0f3ab200.js → data-25d50209.js} +28 -38
- package/dist/esm/{hardware-back-button-b410a047.js → hardware-back-button-f42b9c80.js} +2 -2
- package/dist/esm/{index-47b2066d.js → index-48209844.js} +2 -2
- package/dist/esm/{index-0b4beb69.js → index-4b98143d.js} +3 -3
- package/dist/esm/{index-4c30cddd.js → index-73881b51.js} +22 -25
- 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 +8 -12
- package/dist/esm/ion-alert.entry.js +7 -11
- 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 +13 -12
- package/dist/esm/ion-datetime_3.entry.js +71 -17
- 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 +6 -10
- package/dist/esm/ion-menu_3.entry.js +5 -5
- package/dist/esm/ion-modal.entry.js +8 -12
- 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 +7 -11
- 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 +4 -4
- 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 +6 -10
- package/dist/esm/ion-toggle.entry.js +2 -2
- package/dist/esm/{ionic-global-ad9a1810.js → ionic-global-778b7863.js} +1 -1
- package/dist/esm/ionic.js +8 -8
- package/dist/esm/{ios.transition-b76c7020.js → ios.transition-7ff7381d.js} +2 -2
- package/dist/esm/loader.js +7 -7
- package/dist/esm/{md.transition-564937a7.js → md.transition-28a9a26b.js} +2 -2
- package/dist/esm/{overlays-04a9a43f.js → overlays-33ae3ea0.js} +6 -56
- package/dist/esm/{status-tap-5a95077d.js → status-tap-2b335fb7.js} +1 -1
- package/dist/esm-es5/app-globals-47226a12.js +4 -0
- package/dist/esm-es5/{button-active-47ac8092.js → button-active-4bee452c.js} +1 -1
- package/dist/esm-es5/data-25d50209.js +4 -0
- package/dist/esm-es5/{hardware-back-button-b410a047.js → hardware-back-button-f42b9c80.js} +1 -1
- package/dist/esm-es5/{index-47b2066d.js → index-48209844.js} +1 -1
- package/dist/esm-es5/{index-0b4beb69.js → index-4b98143d.js} +1 -1
- package/dist/esm-es5/{index-4c30cddd.js → index-73881b51.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-ad9a1810.js → ionic-global-778b7863.js} +1 -1
- package/dist/esm-es5/ionic.js +2 -2
- package/dist/esm-es5/{ios.transition-b76c7020.js → ios.transition-7ff7381d.js} +1 -1
- package/dist/esm-es5/loader.js +2 -2
- package/dist/esm-es5/md.transition-28a9a26b.js +4 -0
- package/dist/esm-es5/{overlays-04a9a43f.js → overlays-33ae3ea0.js} +1 -1
- package/dist/esm-es5/{status-tap-5a95077d.js → status-tap-2b335fb7.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-df504a37.system.js → p-001010b6.system.js} +1 -1
- package/dist/ionic/{p-1924f2e0.system.entry.js → p-016976a7.system.entry.js} +2 -2
- package/dist/ionic/{p-a0b28c69.system.entry.js → p-078fd095.system.entry.js} +1 -1
- package/dist/ionic/{p-ae35294f.system.entry.js → p-0ae25399.system.entry.js} +1 -1
- package/dist/ionic/p-0b955124.system.js +4 -0
- package/dist/ionic/{p-3481d54e.system.entry.js → p-0e29919c.system.entry.js} +1 -1
- package/dist/ionic/{p-8794fa00.system.entry.js → p-0eef8b34.system.entry.js} +1 -1
- package/dist/ionic/{p-fb9f8495.system.entry.js → p-0fd295ef.system.entry.js} +1 -1
- package/dist/ionic/{p-508a4c87.entry.js → p-108f730a.entry.js} +1 -1
- package/dist/ionic/{p-5d7e32ce.js → p-1aa7c019.js} +1 -1
- package/dist/ionic/{p-601e17b4.entry.js → p-1c531ca2.entry.js} +1 -1
- package/dist/ionic/{p-91cb3f9a.entry.js → p-1f583f73.entry.js} +1 -1
- package/dist/ionic/{p-ea25b4c8.system.entry.js → p-1f6cdf2c.system.entry.js} +1 -1
- package/dist/ionic/{p-717e2526.system.entry.js → p-20a6513f.system.entry.js} +1 -1
- package/dist/ionic/{p-cde3ac34.system.entry.js → p-20f7a91e.system.entry.js} +1 -1
- package/dist/ionic/{p-74deb358.system.js → p-25b08bc4.system.js} +1 -1
- package/dist/ionic/p-26138fed.js +4 -0
- package/dist/ionic/{p-bf05cbc7.entry.js → p-2da0a76c.entry.js} +1 -1
- package/dist/ionic/{p-70e34286.system.entry.js → p-2f66e177.system.entry.js} +1 -1
- package/dist/ionic/{p-5cb5f63d.system.entry.js → p-30c9e049.system.entry.js} +1 -1
- package/dist/ionic/{p-16a61810.entry.js → p-333f06ed.entry.js} +1 -1
- package/dist/ionic/{p-de55ec45.js → p-341b4519.js} +1 -1
- package/dist/ionic/{p-bd314f1e.system.entry.js → p-389ff4d2.system.entry.js} +1 -1
- package/dist/ionic/{p-1f16d040.entry.js → p-396c1a55.entry.js} +1 -1
- package/dist/ionic/{p-5e23bea8.system.entry.js → p-3a54c070.system.entry.js} +1 -1
- package/dist/ionic/{p-275705e5.entry.js → p-3a98f8db.entry.js} +1 -1
- package/dist/ionic/{p-502780e4.entry.js → p-3cdbaa49.entry.js} +1 -1
- package/dist/ionic/{p-49aba878.js → p-3eb2da31.js} +1 -1
- package/dist/ionic/{p-6525a8cd.system.js → p-3f028207.system.js} +1 -1
- package/dist/ionic/{p-43a5edee.entry.js → p-400574bf.entry.js} +1 -1
- package/dist/ionic/{p-18beebdf.system.entry.js → p-48af4316.system.entry.js} +2 -2
- package/dist/ionic/{p-ceceac26.js → p-4b2d5b9c.js} +1 -1
- package/dist/ionic/{p-a022b684.system.entry.js → p-4c256bc2.system.entry.js} +1 -1
- package/dist/ionic/{p-b7efc743.system.entry.js → p-4dfc27eb.system.entry.js} +1 -1
- package/dist/ionic/{p-396083cc.entry.js → p-51f08a9f.entry.js} +1 -1
- package/dist/ionic/{p-86813176.system.entry.js → p-58e3ae88.system.entry.js} +1 -1
- package/dist/ionic/{p-31450f73.entry.js → p-5b6aa59a.entry.js} +1 -1
- package/dist/ionic/{p-4fda5c35.entry.js → p-5e60dbc8.entry.js} +1 -1
- package/dist/ionic/{p-1636923f.system.js → p-5eea8b4c.system.js} +1 -1
- package/dist/ionic/{p-cd9a7017.system.entry.js → p-5f456b3c.system.entry.js} +1 -1
- package/dist/ionic/{p-2e1f014a.system.entry.js → p-61c0f8bf.system.entry.js} +1 -1
- package/dist/ionic/{p-a5951821.system.js → p-62a3c609.system.js} +1 -1
- package/dist/ionic/{p-f53d074d.system.entry.js → p-680f96e8.system.entry.js} +1 -1
- package/dist/ionic/p-68ae6719.system.entry.js +4 -0
- package/dist/ionic/{p-5b40d967.entry.js → p-6a34980d.entry.js} +1 -1
- package/dist/ionic/p-6b02edd6.js +4 -0
- package/dist/ionic/{p-afd6d696.system.entry.js → p-6f38d0c5.system.entry.js} +1 -1
- package/dist/ionic/{p-42a9f663.system.entry.js → p-70026e8f.system.entry.js} +1 -1
- package/dist/ionic/{p-72fa96bf.system.js → p-76893257.system.js} +1 -1
- package/dist/ionic/{p-c1797ec5.system.entry.js → p-78edc0cd.system.entry.js} +1 -1
- package/dist/ionic/{p-f0194418.system.entry.js → p-7c32fb95.system.entry.js} +1 -1
- package/dist/ionic/p-7c5e8706.entry.js +4 -0
- package/dist/ionic/{p-05d560ec.entry.js → p-7dc7514a.entry.js} +1 -1
- package/dist/ionic/{p-bd4787eb.entry.js → p-84513dfb.entry.js} +1 -1
- package/dist/ionic/{p-e04b9647.system.entry.js → p-84879f61.system.entry.js} +1 -1
- package/dist/ionic/{p-1131946f.system.entry.js → p-8569d759.system.entry.js} +1 -1
- package/dist/ionic/p-87ae4f6c.system.entry.js +4 -0
- package/dist/ionic/{p-eb07b88f.entry.js → p-8a671f16.entry.js} +1 -1
- package/dist/ionic/{p-123b4809.js → p-8ddc00f7.js} +1 -1
- package/dist/ionic/p-8e16390d.system.js +4 -0
- package/dist/ionic/{p-a8a56449.entry.js → p-8ebd9951.entry.js} +1 -1
- package/dist/ionic/p-8f1ce253.js +4 -0
- package/dist/ionic/{p-c747f89b.system.entry.js → p-92c2178e.system.entry.js} +1 -1
- package/dist/ionic/{p-9cd7ba27.system.js → p-95c44e02.system.js} +1 -1
- package/dist/ionic/{p-95d5a097.entry.js → p-97eca294.entry.js} +1 -1
- package/dist/ionic/{p-a85d9047.system.entry.js → p-9a6ab80a.system.entry.js} +1 -1
- package/dist/ionic/{p-e9f9388e.system.js → p-9beb5039.system.js} +1 -1
- package/dist/ionic/{p-5928fac9.system.entry.js → p-9f5b40c0.system.entry.js} +1 -1
- package/dist/ionic/{p-3d961d93.entry.js → p-9f6397ce.entry.js} +1 -1
- package/dist/ionic/{p-5c6a04bd.entry.js → p-a02b2d75.entry.js} +1 -1
- package/dist/ionic/{p-88e9052d.entry.js → p-a051c371.entry.js} +1 -1
- package/dist/ionic/{p-cb9e71e0.entry.js → p-a19f5ae1.entry.js} +1 -1
- package/dist/ionic/{p-7b1ed642.system.entry.js → p-a1bfaa5c.system.entry.js} +1 -1
- package/dist/ionic/{p-5c580e89.entry.js → p-a2ad515b.entry.js} +1 -1
- package/dist/ionic/{p-3079950e.entry.js → p-aa7ae6aa.entry.js} +1 -1
- package/dist/ionic/{p-caeefe16.system.entry.js → p-aaa4ffb3.system.entry.js} +1 -1
- package/dist/ionic/{p-abcedc15.system.entry.js → p-ac20160b.system.entry.js} +1 -1
- package/dist/ionic/{p-ba97a133.system.entry.js → p-ac979ebf.system.entry.js} +1 -1
- package/dist/ionic/{p-dbd70d97.system.entry.js → p-b37e4ee5.system.entry.js} +1 -1
- package/dist/ionic/{p-c771a6ef.entry.js → p-b498de69.entry.js} +1 -1
- package/dist/ionic/{p-30cd5e7b.js → p-b4d8fe47.js} +1 -1
- package/dist/ionic/{p-337ac0f5.entry.js → p-b8c4df21.entry.js} +1 -1
- package/dist/ionic/{p-89ca4c4b.system.js → p-b94882a9.system.js} +1 -1
- package/dist/ionic/{p-edcada2b.system.entry.js → p-b96699d3.system.entry.js} +1 -1
- package/dist/ionic/{p-64856c3c.system.entry.js → p-bc2c03d7.system.entry.js} +1 -1
- package/dist/ionic/{p-8f872991.entry.js → p-c3790581.entry.js} +1 -1
- package/dist/ionic/p-c5c3710c.js +4 -0
- package/dist/ionic/{p-2e14c533.system.js → p-c6fef62b.system.js} +1 -1
- package/dist/ionic/{p-aaaa615c.system.entry.js → p-c851b204.system.entry.js} +1 -1
- package/dist/ionic/{p-d39ab63d.entry.js → p-ccd419ae.entry.js} +1 -1
- package/dist/ionic/{p-68ba8e77.system.entry.js → p-cd055d60.system.entry.js} +1 -1
- package/dist/ionic/{p-027f3674.entry.js → p-ce2eabd5.entry.js} +1 -1
- package/dist/ionic/{p-b0ff8075.entry.js → p-d7260b87.entry.js} +1 -1
- package/dist/ionic/{p-f840d817.entry.js → p-d74ca358.entry.js} +1 -1
- package/dist/ionic/{p-657ccdd6.entry.js → p-d8607ede.entry.js} +1 -1
- package/dist/ionic/{p-c308f773.entry.js → p-d95c8e90.entry.js} +1 -1
- package/dist/ionic/{p-c11bab7e.entry.js → p-dbb4c012.entry.js} +1 -1
- package/dist/ionic/{p-0457213c.entry.js → p-dce9bc53.entry.js} +1 -1
- package/dist/ionic/{p-7173ba59.system.entry.js → p-df281664.system.entry.js} +1 -1
- package/dist/ionic/{p-2327064c.entry.js → p-df468a8f.entry.js} +1 -1
- package/dist/ionic/p-e1271366.js +5 -0
- package/dist/ionic/{p-b2595011.system.entry.js → p-e68980ff.system.entry.js} +1 -1
- package/dist/ionic/{p-1f19958f.system.entry.js → p-e6aaff14.system.entry.js} +1 -1
- package/dist/ionic/{p-dcb5711d.entry.js → p-ea8fbf09.entry.js} +1 -1
- package/dist/ionic/{p-a3df16b9.system.entry.js → p-eda7a1db.system.entry.js} +1 -1
- package/dist/ionic/{p-64db1331.entry.js → p-efe9180b.entry.js} +1 -1
- package/dist/ionic/{p-64761c90.entry.js → p-f1ad3b3d.entry.js} +1 -1
- package/dist/ionic/{p-94ff532b.entry.js → p-f1cc690e.entry.js} +1 -1
- package/dist/ionic/{p-8e651c29.entry.js → p-f46775e4.entry.js} +1 -1
- package/dist/ionic/p-f74afe3b.entry.js +4 -0
- package/dist/ionic/{p-c39cc96d.system.entry.js → p-f7b43141.system.entry.js} +1 -1
- package/dist/ionic/{p-3a7de59c.entry.js → p-f88dd429.entry.js} +1 -1
- package/dist/ionic/p-f89ae259.js +4 -0
- package/dist/ionic/{p-9056778e.system.entry.js → p-f97b9cdd.system.entry.js} +1 -1
- package/dist/ionic/{p-9ec7208d.system.js → p-fd36799d.system.js} +1 -1
- package/dist/ionic/{p-7ce40e7b.entry.js → p-fd3f475f.entry.js} +1 -1
- package/dist/ionic/{p-d4cadd34.system.js → p-fd9a9db3.system.js} +1 -1
- package/dist/ionic/{p-b6279412.entry.js → p-fe92da17.entry.js} +1 -1
- package/dist/types/components/action-sheet/action-sheet.d.ts +0 -4
- package/dist/types/components/alert/alert.d.ts +0 -4
- package/dist/types/components/datetime/datetime-interface.d.ts +10 -0
- package/dist/types/components/datetime/datetime.d.ts +16 -1
- package/dist/types/components/datetime/utils/format.d.ts +7 -1
- package/dist/types/components/loading/loading.d.ts +0 -4
- package/dist/types/components/modal/modal.d.ts +0 -4
- package/dist/types/components/picker/picker.d.ts +0 -4
- package/dist/types/components/popover/popover.d.ts +0 -4
- package/dist/types/components/toast/toast.d.ts +0 -4
- package/dist/types/components.d.ts +17 -9
- package/hydrate/index.d.ts +1 -1
- package/hydrate/index.js +136 -271
- package/package.json +4 -4
- package/dist/esm-es5/app-globals-5cf6195b.js +0 -4
- package/dist/esm-es5/data-0f3ab200.js +0 -4
- package/dist/esm-es5/md.transition-564937a7.js +0 -4
- package/dist/ionic/p-0b34d3a7.system.js +0 -4
- package/dist/ionic/p-0e23c289.system.entry.js +0 -4
- package/dist/ionic/p-21ca1f1c.js +0 -4
- package/dist/ionic/p-23c73017.entry.js +0 -4
- package/dist/ionic/p-5c2ae448.js +0 -4
- package/dist/ionic/p-7330c044.system.js +0 -4
- package/dist/ionic/p-a6e465f5.entry.js +0 -4
- package/dist/ionic/p-bdca4784.js +0 -4
- package/dist/ionic/p-dbcba5a2.js +0 -4
- package/dist/ionic/p-e81bf09e.system.entry.js +0 -4
- package/dist/ionic/p-ed7a529f.js +0 -5
- package/dist/ionic/p-f7dce541.js +0 -4
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
6
6
|
const index = require('./index-c8d52405.js');
|
|
7
|
-
const hardwareBackButton = require('./hardware-back-button-
|
|
8
|
-
const ionicGlobal = require('./ionic-global-
|
|
7
|
+
const hardwareBackButton = require('./hardware-back-button-d23873bb.js');
|
|
8
|
+
const ionicGlobal = require('./ionic-global-7358c23e.js');
|
|
9
9
|
const frameworkDelegate = require('./framework-delegate-a3e6d060.js');
|
|
10
10
|
const helpers = require('./helpers-2e1028fa.js');
|
|
11
11
|
const index$1 = require('./index-5915f9b3.js');
|
|
@@ -410,15 +410,6 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
410
410
|
return;
|
|
411
411
|
}
|
|
412
412
|
setRootAriaHidden(true);
|
|
413
|
-
/**
|
|
414
|
-
* Hide all other overlays from screen readers so only this one
|
|
415
|
-
* can be read. Note that presenting an overlay always makes
|
|
416
|
-
* it the topmost one.
|
|
417
|
-
*/
|
|
418
|
-
if (index.doc !== undefined) {
|
|
419
|
-
const presentedOverlays = getPresentedOverlays(index.doc);
|
|
420
|
-
presentedOverlays.forEach((o) => o.setAttribute('aria-hidden', 'true'));
|
|
421
|
-
}
|
|
422
413
|
overlay.presented = true;
|
|
423
414
|
overlay.willPresent.emit();
|
|
424
415
|
(_a = overlay.willPresentShorthand) === null || _a === void 0 ? void 0 : _a.emit();
|
|
@@ -441,7 +432,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
441
432
|
* from returning focus as a result.
|
|
442
433
|
*/
|
|
443
434
|
if (overlay.el.tagName !== 'ION-TOAST') {
|
|
444
|
-
|
|
435
|
+
focusPreviousElementOnDismiss(overlay.el);
|
|
445
436
|
}
|
|
446
437
|
/**
|
|
447
438
|
* If the focused element is already
|
|
@@ -452,14 +443,6 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
452
443
|
if (overlay.keyboardClose && (document.activeElement === null || !overlay.el.contains(document.activeElement))) {
|
|
453
444
|
overlay.el.focus();
|
|
454
445
|
}
|
|
455
|
-
/**
|
|
456
|
-
* If this overlay was previously dismissed without being
|
|
457
|
-
* the topmost one (such as by manually calling dismiss()),
|
|
458
|
-
* it would still have aria-hidden on being presented again.
|
|
459
|
-
* Removing it here ensures the overlay is visible to screen
|
|
460
|
-
* readers.
|
|
461
|
-
*/
|
|
462
|
-
overlay.el.removeAttribute('aria-hidden');
|
|
463
446
|
};
|
|
464
447
|
/**
|
|
465
448
|
* When an overlay component is dismissed,
|
|
@@ -471,7 +454,7 @@ const present = async (overlay, name, iosEnterAnimation, mdEnterAnimation, opts)
|
|
|
471
454
|
* to where they were before they
|
|
472
455
|
* opened the overlay.
|
|
473
456
|
*/
|
|
474
|
-
const
|
|
457
|
+
const focusPreviousElementOnDismiss = async (overlayEl) => {
|
|
475
458
|
let previousElement = document.activeElement;
|
|
476
459
|
if (!previousElement) {
|
|
477
460
|
return;
|
|
@@ -482,36 +465,10 @@ const restoreElementFocus = async (overlayEl) => {
|
|
|
482
465
|
previousElement = shadowRoot.querySelector(focusableQueryString) || previousElement;
|
|
483
466
|
}
|
|
484
467
|
await overlayEl.onDidDismiss();
|
|
485
|
-
|
|
486
|
-
* After onDidDismiss, the overlay loses focus
|
|
487
|
-
* because it is removed from the document
|
|
488
|
-
*
|
|
489
|
-
* > An element will also lose focus [...]
|
|
490
|
-
* > if the element is removed from the document)
|
|
491
|
-
*
|
|
492
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/Element/blur_event
|
|
493
|
-
*
|
|
494
|
-
* Additionally, `document.activeElement` returns:
|
|
495
|
-
*
|
|
496
|
-
* > The Element which currently has focus,
|
|
497
|
-
* > `<body>` or null if there is
|
|
498
|
-
* > no focused element.
|
|
499
|
-
*
|
|
500
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/Document/activeElement#value
|
|
501
|
-
*
|
|
502
|
-
* However, if the user has already focused
|
|
503
|
-
* an element sometime between onWillDismiss
|
|
504
|
-
* and onDidDismiss (for example, focusing a
|
|
505
|
-
* text box after tapping a button in an
|
|
506
|
-
* action sheet) then don't restore focus to
|
|
507
|
-
* previous element
|
|
508
|
-
*/
|
|
509
|
-
if (document.activeElement === null || document.activeElement === document.body) {
|
|
510
|
-
previousElement.focus();
|
|
511
|
-
}
|
|
468
|
+
previousElement.focus();
|
|
512
469
|
};
|
|
513
470
|
const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnimation, opts) => {
|
|
514
|
-
var _a, _b
|
|
471
|
+
var _a, _b;
|
|
515
472
|
if (!overlay.presented) {
|
|
516
473
|
return false;
|
|
517
474
|
}
|
|
@@ -562,13 +519,6 @@ const dismiss = async (overlay, data, role, name, iosLeaveAnimation, mdLeaveAnim
|
|
|
562
519
|
console.error(err);
|
|
563
520
|
}
|
|
564
521
|
overlay.el.remove();
|
|
565
|
-
/**
|
|
566
|
-
* If there are other overlays presented, unhide the new
|
|
567
|
-
* topmost one from screen readers.
|
|
568
|
-
*/
|
|
569
|
-
if (index.doc !== undefined) {
|
|
570
|
-
(_c = getPresentedOverlay(index.doc)) === null || _c === void 0 ? void 0 : _c.removeAttribute('aria-hidden');
|
|
571
|
-
}
|
|
572
522
|
return true;
|
|
573
523
|
};
|
|
574
524
|
const getAppRoot = (doc) => {
|
|
@@ -79,10 +79,6 @@ export class ActionSheet {
|
|
|
79
79
|
* This can be useful in a button handler for determining which button was
|
|
80
80
|
* clicked to dismiss the action sheet.
|
|
81
81
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
82
|
-
*
|
|
83
|
-
* This is a no-op if the overlay has not been presented yet. If you want
|
|
84
|
-
* to remove an overlay from the DOM that was never presented, use the
|
|
85
|
-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
86
82
|
*/
|
|
87
83
|
async dismiss(data, role) {
|
|
88
84
|
const unlock = await this.lockController.lock();
|
|
@@ -191,12 +187,12 @@ export class ActionSheet {
|
|
|
191
187
|
const cancelButton = allButtons.find((b) => b.role === 'cancel');
|
|
192
188
|
const buttons = allButtons.filter((b) => b.role !== 'cancel');
|
|
193
189
|
const headerID = `action-sheet-${overlayIndex}-header`;
|
|
194
|
-
return (h(Host, Object.assign({ key: '
|
|
190
|
+
return (h(Host, Object.assign({ key: '98851ef73ef85bb1e364111f090480102929a197', role: "dialog", "aria-modal": "true", "aria-labelledby": header !== undefined ? headerID : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
195
191
|
zIndex: `${20000 + this.overlayIndex}`,
|
|
196
|
-
}, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), h("ion-backdrop", { key: '
|
|
192
|
+
}, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), h("ion-backdrop", { key: 'e2520342ca16aae4dac0bd7bff59b2150aeb2171', tappable: this.backdropDismiss }), h("div", { key: 'c95f2ec4edde1dc3a8860e68b4a86b82f6797aee', tabindex: "0" }), h("div", { key: '7af9edad368e308508801c8ef2225928ced63159', class: "action-sheet-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { key: 'd1d92b4d1814d34eb7d8134ff77ee260ca521a6d', class: "action-sheet-container" }, h("div", { key: 'cc774b45a9992e95bfee788cb484d99364b76d22', class: "action-sheet-group", ref: (el) => (this.groupEl = el) }, header !== undefined && (h("div", { id: headerID, class: {
|
|
197
193
|
'action-sheet-title': true,
|
|
198
194
|
'action-sheet-has-sub-title': this.subHeader !== undefined,
|
|
199
|
-
} }, header, this.subHeader && h("div", { class: "action-sheet-sub-title" }, this.subHeader))), buttons.map((b) => (h("button", Object.assign({}, b.htmlAttributes, { type: "button", id: b.id, class: buttonClass(b), onClick: () => this.buttonClick(b) }), h("span", { class: "action-sheet-button-inner" }, b.icon && h("ion-icon", { icon: b.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" }), b.text), mode === 'md' && h("ion-ripple-effect", null))))), cancelButton && (h("div", { class: "action-sheet-group action-sheet-group-cancel" }, h("button", Object.assign({}, cancelButton.htmlAttributes, { type: "button", class: buttonClass(cancelButton), onClick: () => this.buttonClick(cancelButton) }), h("span", { class: "action-sheet-button-inner" }, cancelButton.icon && (h("ion-icon", { icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && h("ion-ripple-effect", null)))))), h("div", { key: '
|
|
195
|
+
} }, header, this.subHeader && h("div", { class: "action-sheet-sub-title" }, this.subHeader))), buttons.map((b) => (h("button", Object.assign({}, b.htmlAttributes, { type: "button", id: b.id, class: buttonClass(b), onClick: () => this.buttonClick(b) }), h("span", { class: "action-sheet-button-inner" }, b.icon && h("ion-icon", { icon: b.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" }), b.text), mode === 'md' && h("ion-ripple-effect", null))))), cancelButton && (h("div", { class: "action-sheet-group action-sheet-group-cancel" }, h("button", Object.assign({}, cancelButton.htmlAttributes, { type: "button", class: buttonClass(cancelButton), onClick: () => this.buttonClick(cancelButton) }), h("span", { class: "action-sheet-button-inner" }, cancelButton.icon && (h("ion-icon", { icon: cancelButton.icon, "aria-hidden": "true", lazy: false, class: "action-sheet-icon" })), cancelButton.text), mode === 'md' && h("ion-ripple-effect", null)))))), h("div", { key: '9a013adda7dec101cf0c90feb02f5b7f5582a0b3', tabindex: "0" })));
|
|
200
196
|
}
|
|
201
197
|
static get is() { return "ion-action-sheet"; }
|
|
202
198
|
static get encapsulation() { return "scoped"; }
|
|
@@ -694,7 +690,7 @@ export class ActionSheet {
|
|
|
694
690
|
}, {
|
|
695
691
|
"name": "role",
|
|
696
692
|
"type": "string | undefined",
|
|
697
|
-
"docs": "The role of the element that is dismissing the action sheet.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the action sheet.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"
|
|
693
|
+
"docs": "The role of the element that is dismissing the action sheet.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the action sheet.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`."
|
|
698
694
|
}],
|
|
699
695
|
"references": {
|
|
700
696
|
"Promise": {
|
|
@@ -711,7 +707,7 @@ export class ActionSheet {
|
|
|
711
707
|
"text": "data Any data to emit in the dismiss events."
|
|
712
708
|
}, {
|
|
713
709
|
"name": "param",
|
|
714
|
-
"text": "role The role of the element that is dismissing the action sheet.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the action sheet.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"
|
|
710
|
+
"text": "role The role of the element that is dismissing the action sheet.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the action sheet.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`."
|
|
715
711
|
}]
|
|
716
712
|
}
|
|
717
713
|
},
|
|
@@ -220,10 +220,6 @@ export class Alert {
|
|
|
220
220
|
* This can be useful in a button handler for determining which button was
|
|
221
221
|
* clicked to dismiss the alert.
|
|
222
222
|
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
223
|
-
*
|
|
224
|
-
* This is a no-op if the overlay has not been presented yet. If you want
|
|
225
|
-
* to remove an overlay from the DOM that was never presented, use the
|
|
226
|
-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
|
|
227
223
|
*/
|
|
228
224
|
async dismiss(data, role) {
|
|
229
225
|
const unlock = await this.lockController.lock();
|
|
@@ -391,9 +387,9 @@ export class Alert {
|
|
|
391
387
|
* If neither is defined, don't set aria-labelledby.
|
|
392
388
|
*/
|
|
393
389
|
const ariaLabelledBy = header ? hdrId : subHeader ? subHdrId : null;
|
|
394
|
-
return (h(Host, Object.assign({ key: '
|
|
390
|
+
return (h(Host, Object.assign({ key: '8327e1aef6c404c2021d43aaa542d86e839817f5', role: role, "aria-modal": "true", "aria-labelledby": ariaLabelledBy, "aria-describedby": message !== undefined ? msgId : null, tabindex: "-1" }, htmlAttributes, { style: {
|
|
395
391
|
zIndex: `${20000 + overlayIndex}`,
|
|
396
|
-
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), h("ion-backdrop", { key: '
|
|
392
|
+
}, class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { [mode]: true, 'overlay-hidden': true, 'alert-translucent': this.translucent }), onIonAlertWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }), h("ion-backdrop", { key: '814a4e1b4f7560026b089b762c68401b6277355e', tappable: this.backdropDismiss }), h("div", { key: 'b31ce08019e7223a098d18cb857f72eddc245e98', tabindex: "0" }), h("div", { key: '77efa4b9f7062f55ba0998a09a24550ec0b9b4f5', class: "alert-wrapper ion-overlay-wrapper", ref: (el) => (this.wrapperEl = el) }, h("div", { key: '648e0768610ee57f9e5c84b8955da497ec9b0b82', class: "alert-head" }, header && (h("h2", { id: hdrId, class: "alert-title" }, header)), subHeader && (h("h2", { id: subHdrId, class: "alert-sub-title" }, subHeader))), this.renderAlertMessage(msgId), this.renderAlertInputs(), this.renderAlertButtons()), h("div", { key: 'f3d752cce77ca021dc959611ad5078b94b7f3cec', tabindex: "0" })));
|
|
397
393
|
}
|
|
398
394
|
static get is() { return "ion-alert"; }
|
|
399
395
|
static get encapsulation() { return "scoped"; }
|
|
@@ -936,7 +932,7 @@ export class Alert {
|
|
|
936
932
|
}, {
|
|
937
933
|
"name": "role",
|
|
938
934
|
"type": "string | undefined",
|
|
939
|
-
"docs": "The role of the element that is dismissing the alert.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the alert.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"
|
|
935
|
+
"docs": "The role of the element that is dismissing the alert.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the alert.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`."
|
|
940
936
|
}],
|
|
941
937
|
"references": {
|
|
942
938
|
"Promise": {
|
|
@@ -953,7 +949,7 @@ export class Alert {
|
|
|
953
949
|
"text": "data Any data to emit in the dismiss events."
|
|
954
950
|
}, {
|
|
955
951
|
"name": "param",
|
|
956
|
-
"text": "role The role of the element that is dismissing the alert.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the alert.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"
|
|
952
|
+
"text": "role The role of the element that is dismissing the alert.\nThis can be useful in a button handler for determining which button was\nclicked to dismiss the alert.\nSome examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`."
|
|
957
953
|
}]
|
|
958
954
|
}
|
|
959
955
|
},
|
|
@@ -11,7 +11,7 @@ import { caretDownSharp, caretUpSharp, chevronBack, chevronDown, chevronForward
|
|
|
11
11
|
import { getIonMode } from "../../global/ionic-global";
|
|
12
12
|
import { isSameDay, warnIfValueOutOfBounds, isBefore, isAfter } from "./utils/comparison";
|
|
13
13
|
import { generateMonths, getDaysOfMonth, getDaysOfWeek, getToday, getMonthColumnData, getDayColumnData, getYearColumnData, getTimeColumnsData, getCombinedDateColumnData, } from "./utils/data";
|
|
14
|
-
import { formatValue,
|
|
14
|
+
import { formatValue, getLocalizedDateTime, getLocalizedTime, getMonthAndYear } from "./utils/format";
|
|
15
15
|
import { isLocaleDayPeriodRTL, isMonthFirstLocale, getNumDaysInMonth, getHourCycle } from "./utils/helpers";
|
|
16
16
|
import { calculateHourFromAMPM, convertDataToISO, getClosestValidDate, getEndOfWeek, getNextDay, getNextMonth, getNextWeek, getNextYear, getPreviousDay, getPreviousMonth, getPreviousWeek, getPreviousYear, getStartOfWeek, validateParts, } from "./utils/manipulation";
|
|
17
17
|
import { clampDate, convertToArrayOfNumbers, getPartsFromCalendarDay, parseAmPm, parseDate, parseMaxParts, parseMinParts, } from "./utils/parse";
|
|
@@ -592,6 +592,34 @@ export class Datetime {
|
|
|
592
592
|
this.resolveForceDateScrolling = undefined;
|
|
593
593
|
this.forceRenderDate = undefined;
|
|
594
594
|
};
|
|
595
|
+
this.checkForPresentationFormatMismatch = () => {
|
|
596
|
+
const { formatOptions, presentation } = this;
|
|
597
|
+
// formatOptions is not required
|
|
598
|
+
if (!formatOptions)
|
|
599
|
+
return;
|
|
600
|
+
// If formatOptions is provided, the date and/or time objects are required, depending on the presentation
|
|
601
|
+
switch (presentation) {
|
|
602
|
+
case 'date':
|
|
603
|
+
case 'month-year':
|
|
604
|
+
case 'month':
|
|
605
|
+
case 'year':
|
|
606
|
+
if (formatOptions.date === undefined) {
|
|
607
|
+
printIonWarning(`Datetime: The '${presentation}' presentation requires a date object in formatOptions.`, this.el);
|
|
608
|
+
}
|
|
609
|
+
break;
|
|
610
|
+
case 'time':
|
|
611
|
+
if (formatOptions.time === undefined) {
|
|
612
|
+
printIonWarning(`Datetime: The 'time' presentation requires a time object in formatOptions.`, this.el);
|
|
613
|
+
}
|
|
614
|
+
break;
|
|
615
|
+
case 'date-time':
|
|
616
|
+
case 'time-date':
|
|
617
|
+
if (formatOptions.date === undefined || formatOptions.time === undefined) {
|
|
618
|
+
printIonWarning(`Datetime: The '${presentation}' presentation requires both a date and time object in formatOptions.`, this.el);
|
|
619
|
+
}
|
|
620
|
+
break;
|
|
621
|
+
}
|
|
622
|
+
};
|
|
595
623
|
this.onFocus = () => {
|
|
596
624
|
this.ionFocus.emit();
|
|
597
625
|
};
|
|
@@ -650,6 +678,7 @@ export class Datetime {
|
|
|
650
678
|
this.color = 'primary';
|
|
651
679
|
this.name = this.inputId;
|
|
652
680
|
this.disabled = false;
|
|
681
|
+
this.formatOptions = undefined;
|
|
653
682
|
this.readonly = false;
|
|
654
683
|
this.isDateEnabled = undefined;
|
|
655
684
|
this.min = undefined;
|
|
@@ -677,6 +706,10 @@ export class Datetime {
|
|
|
677
706
|
this.size = 'fixed';
|
|
678
707
|
this.preferWheel = false;
|
|
679
708
|
}
|
|
709
|
+
formatOptionsChanged() {
|
|
710
|
+
this.checkForPresentationFormatMismatch();
|
|
711
|
+
this.errorIfTimeZoneProvided();
|
|
712
|
+
}
|
|
680
713
|
disabledChanged() {
|
|
681
714
|
this.emitStyle();
|
|
682
715
|
}
|
|
@@ -686,6 +719,9 @@ export class Datetime {
|
|
|
686
719
|
maxChanged() {
|
|
687
720
|
this.processMaxParts();
|
|
688
721
|
}
|
|
722
|
+
presentationChanged() {
|
|
723
|
+
this.checkForPresentationFormatMismatch();
|
|
724
|
+
}
|
|
689
725
|
get isGridStyle() {
|
|
690
726
|
const { presentation, preferWheel } = this;
|
|
691
727
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
@@ -921,7 +957,7 @@ export class Datetime {
|
|
|
921
957
|
});
|
|
922
958
|
}
|
|
923
959
|
componentWillLoad() {
|
|
924
|
-
const { el, highlightedDates, multiple, presentation, preferWheel } = this;
|
|
960
|
+
const { el, formatOptions, highlightedDates, multiple, presentation, preferWheel } = this;
|
|
925
961
|
if (multiple) {
|
|
926
962
|
if (presentation !== 'date') {
|
|
927
963
|
printIonWarning('Multiple date selection is only supported for presentation="date".', el);
|
|
@@ -938,6 +974,10 @@ export class Datetime {
|
|
|
938
974
|
printIonWarning('The highlightedDates property is not supported with preferWheel="true".', el);
|
|
939
975
|
}
|
|
940
976
|
}
|
|
977
|
+
if (formatOptions) {
|
|
978
|
+
this.checkForPresentationFormatMismatch();
|
|
979
|
+
this.errorIfTimeZoneProvided();
|
|
980
|
+
}
|
|
941
981
|
const hourValues = (this.parsedHourValues = convertToArrayOfNumbers(this.hourValues));
|
|
942
982
|
const minuteValues = (this.parsedMinuteValues = convertToArrayOfNumbers(this.minuteValues));
|
|
943
983
|
const monthValues = (this.parsedMonthValues = convertToArrayOfNumbers(this.monthValues));
|
|
@@ -959,6 +999,21 @@ export class Datetime {
|
|
|
959
999
|
this.processValue(this.value);
|
|
960
1000
|
this.emitStyle();
|
|
961
1001
|
}
|
|
1002
|
+
/**
|
|
1003
|
+
* If a time zone is provided in the format options, the rendered text could
|
|
1004
|
+
* differ from what was selected in the Datetime, which could cause
|
|
1005
|
+
* confusion.
|
|
1006
|
+
*/
|
|
1007
|
+
errorIfTimeZoneProvided() {
|
|
1008
|
+
var _a, _b, _c, _d;
|
|
1009
|
+
const { formatOptions } = this;
|
|
1010
|
+
if (((_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) === null || _a === void 0 ? void 0 : _a.timeZone) ||
|
|
1011
|
+
((_b = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) === null || _b === void 0 ? void 0 : _b.timeZoneName) ||
|
|
1012
|
+
((_c = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) === null || _c === void 0 ? void 0 : _c.timeZone) ||
|
|
1013
|
+
((_d = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) === null || _d === void 0 ? void 0 : _d.timeZoneName)) {
|
|
1014
|
+
printIonWarning('Datetime: "timeZone" and "timeZoneName" are not supported in "formatOptions".');
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
962
1017
|
emitStyle() {
|
|
963
1018
|
this.ionStyle.emit({
|
|
964
1019
|
interactive: true,
|
|
@@ -1445,7 +1500,7 @@ export class Datetime {
|
|
|
1445
1500
|
return h("slot", { name: "time-label" }, "Time");
|
|
1446
1501
|
}
|
|
1447
1502
|
renderTimeOverlay() {
|
|
1448
|
-
const { disabled, hourCycle, isTimePopoverOpen, locale } = this;
|
|
1503
|
+
const { disabled, hourCycle, isTimePopoverOpen, locale, formatOptions } = this;
|
|
1449
1504
|
const computedHourCycle = getHourCycle(locale, hourCycle);
|
|
1450
1505
|
const activePart = this.getActivePartsWithFallback();
|
|
1451
1506
|
return [
|
|
@@ -1465,7 +1520,7 @@ export class Datetime {
|
|
|
1465
1520
|
await popoverRef.onWillDismiss();
|
|
1466
1521
|
this.isTimePopoverOpen = false;
|
|
1467
1522
|
}
|
|
1468
|
-
} }, getLocalizedTime(locale, activePart, computedHourCycle)),
|
|
1523
|
+
} }, getLocalizedTime(locale, activePart, computedHourCycle, formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time)),
|
|
1469
1524
|
h("ion-popover", { alignment: "center", translucent: true, overlayIndex: 1, arrow: false, onWillPresent: (ev) => {
|
|
1470
1525
|
/**
|
|
1471
1526
|
* Intersection Observers do not consistently fire between Blink and Webkit
|
|
@@ -1488,7 +1543,8 @@ export class Datetime {
|
|
|
1488
1543
|
];
|
|
1489
1544
|
}
|
|
1490
1545
|
getHeaderSelectedDateText() {
|
|
1491
|
-
|
|
1546
|
+
var _a;
|
|
1547
|
+
const { activeParts, formatOptions, multiple, titleSelectedDatesFormatter } = this;
|
|
1492
1548
|
const isArray = Array.isArray(activeParts);
|
|
1493
1549
|
let headerText;
|
|
1494
1550
|
if (multiple && isArray && activeParts.length !== 1) {
|
|
@@ -1504,7 +1560,7 @@ export class Datetime {
|
|
|
1504
1560
|
}
|
|
1505
1561
|
else {
|
|
1506
1562
|
// for exactly 1 day selected (multiple set or not), show a formatted version of that
|
|
1507
|
-
headerText =
|
|
1563
|
+
headerText = getLocalizedDateTime(this.locale, this.getActivePartsWithFallback(), (_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _a !== void 0 ? _a : { weekday: 'short', month: 'short', day: 'numeric' });
|
|
1508
1564
|
}
|
|
1509
1565
|
return headerText;
|
|
1510
1566
|
}
|
|
@@ -1593,7 +1649,7 @@ export class Datetime {
|
|
|
1593
1649
|
const hasDatePresentation = presentation === 'date' || presentation === 'date-time' || presentation === 'time-date';
|
|
1594
1650
|
const hasWheelVariant = hasDatePresentation && preferWheel;
|
|
1595
1651
|
renderHiddenInput(true, el, name, formatValue(value), disabled);
|
|
1596
|
-
return (h(Host, { key: '
|
|
1652
|
+
return (h(Host, { key: 'ff50a7d344831b3af2e7f5cfe52b0a71c8c4b8d1', "aria-disabled": disabled ? 'true' : null, onFocus: this.onFocus, onBlur: this.onBlur, class: Object.assign({}, createColorClasses(color, {
|
|
1597
1653
|
[mode]: true,
|
|
1598
1654
|
['datetime-readonly']: readonly,
|
|
1599
1655
|
['datetime-disabled']: disabled,
|
|
@@ -1681,6 +1737,27 @@ export class Datetime {
|
|
|
1681
1737
|
"reflect": false,
|
|
1682
1738
|
"defaultValue": "false"
|
|
1683
1739
|
},
|
|
1740
|
+
"formatOptions": {
|
|
1741
|
+
"type": "unknown",
|
|
1742
|
+
"mutable": false,
|
|
1743
|
+
"complexType": {
|
|
1744
|
+
"original": "FormatOptions",
|
|
1745
|
+
"resolved": "undefined | { date: DateTimeFormatOptions; time?: DateTimeFormatOptions | undefined; } | { date?: DateTimeFormatOptions | undefined; time: DateTimeFormatOptions; }",
|
|
1746
|
+
"references": {
|
|
1747
|
+
"FormatOptions": {
|
|
1748
|
+
"location": "import",
|
|
1749
|
+
"path": "./datetime-interface",
|
|
1750
|
+
"id": "src/components/datetime/datetime-interface.ts::FormatOptions"
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
},
|
|
1754
|
+
"required": false,
|
|
1755
|
+
"optional": true,
|
|
1756
|
+
"docs": {
|
|
1757
|
+
"tags": [],
|
|
1758
|
+
"text": "Formatting options for dates and times.\nShould include a 'date' and/or 'time' object, each of which is of type [Intl.DateTimeFormatOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options)."
|
|
1759
|
+
}
|
|
1760
|
+
},
|
|
1684
1761
|
"readonly": {
|
|
1685
1762
|
"type": "boolean",
|
|
1686
1763
|
"mutable": false,
|
|
@@ -2376,6 +2453,9 @@ export class Datetime {
|
|
|
2376
2453
|
static get elementRef() { return "el"; }
|
|
2377
2454
|
static get watchers() {
|
|
2378
2455
|
return [{
|
|
2456
|
+
"propName": "formatOptions",
|
|
2457
|
+
"methodName": "formatOptionsChanged"
|
|
2458
|
+
}, {
|
|
2379
2459
|
"propName": "disabled",
|
|
2380
2460
|
"methodName": "disabledChanged"
|
|
2381
2461
|
}, {
|
|
@@ -2384,6 +2464,9 @@ export class Datetime {
|
|
|
2384
2464
|
}, {
|
|
2385
2465
|
"propName": "max",
|
|
2386
2466
|
"methodName": "maxChanged"
|
|
2467
|
+
}, {
|
|
2468
|
+
"propName": "presentation",
|
|
2469
|
+
"methodName": "presentationChanged"
|
|
2387
2470
|
}, {
|
|
2388
2471
|
"propName": "yearValues",
|
|
2389
2472
|
"methodName": "yearValuesChanged"
|
|
@@ -402,3 +402,82 @@ configs({ directions: ['ltr'] }).forEach(({ title, screenshot, config }) => {
|
|
|
402
402
|
});
|
|
403
403
|
});
|
|
404
404
|
});
|
|
405
|
+
/**
|
|
406
|
+
* This behavior does not differ across
|
|
407
|
+
* directions.
|
|
408
|
+
*/
|
|
409
|
+
configs({ directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
410
|
+
test.describe(title('datetime: formatOptions'), () => {
|
|
411
|
+
test('should format header and time button', async ({ page }) => {
|
|
412
|
+
await page.setContent(`
|
|
413
|
+
<ion-datetime value="2022-02-01T16:30:00">
|
|
414
|
+
<span slot="title">Select Date</span>
|
|
415
|
+
</ion-datetime>
|
|
416
|
+
<script>
|
|
417
|
+
const datetime = document.querySelector('ion-datetime');
|
|
418
|
+
datetime.formatOptions = {
|
|
419
|
+
time: { hour: '2-digit', minute: '2-digit' },
|
|
420
|
+
date: { day: '2-digit', month: 'long', era: 'short' },
|
|
421
|
+
}
|
|
422
|
+
</script>
|
|
423
|
+
`, config);
|
|
424
|
+
await page.locator('.datetime-ready').waitFor();
|
|
425
|
+
const headerDate = page.locator('ion-datetime .datetime-selected-date');
|
|
426
|
+
await expect(headerDate).toHaveText('February 01 AD');
|
|
427
|
+
const timeBody = page.locator('ion-datetime .time-body');
|
|
428
|
+
await expect(timeBody).toHaveText('04:30 PM');
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
});
|
|
432
|
+
/**
|
|
433
|
+
* This behavior does not differ across
|
|
434
|
+
* modes/directions.
|
|
435
|
+
*/
|
|
436
|
+
configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
437
|
+
test.describe(title('datetime: formatOptions misconfiguration errors'), () => {
|
|
438
|
+
test('should log a warning if time zone is provided', async ({ page }) => {
|
|
439
|
+
const logs = [];
|
|
440
|
+
page.on('console', (msg) => {
|
|
441
|
+
if (msg.type() === 'warning') {
|
|
442
|
+
logs.push(msg.text());
|
|
443
|
+
}
|
|
444
|
+
});
|
|
445
|
+
await page.setContent(`
|
|
446
|
+
<ion-datetime value="2022-02-01T16:30:00" presentation="date">
|
|
447
|
+
<span slot="title">Select Date</span>
|
|
448
|
+
</ion-datetime>
|
|
449
|
+
<script>
|
|
450
|
+
const datetime = document.querySelector('ion-datetime');
|
|
451
|
+
datetime.formatOptions = {
|
|
452
|
+
date: { timeZone: 'UTC' },
|
|
453
|
+
}
|
|
454
|
+
</script>
|
|
455
|
+
`, config);
|
|
456
|
+
await page.locator('.datetime-ready').waitFor();
|
|
457
|
+
expect(logs.length).toBe(1);
|
|
458
|
+
expect(logs[0]).toContain('[Ionic Warning]: Datetime: "timeZone" and "timeZoneName" are not supported in "formatOptions".');
|
|
459
|
+
});
|
|
460
|
+
test('should log a warning if the required formatOptions are not provided for a presentation', async ({ page }) => {
|
|
461
|
+
const logs = [];
|
|
462
|
+
page.on('console', (msg) => {
|
|
463
|
+
if (msg.type() === 'warning') {
|
|
464
|
+
logs.push(msg.text());
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
await page.setContent(`
|
|
468
|
+
<ion-datetime value="2022-02-01T16:30:00">
|
|
469
|
+
<span slot="title">Select Date</span>
|
|
470
|
+
</ion-datetime>
|
|
471
|
+
<script>
|
|
472
|
+
const datetime = document.querySelector('ion-datetime');
|
|
473
|
+
datetime.formatOptions = {
|
|
474
|
+
time: { hour: '2-digit', minute: '2-digit' },
|
|
475
|
+
}
|
|
476
|
+
</script>
|
|
477
|
+
`, config);
|
|
478
|
+
await page.locator('.datetime-ready').waitFor();
|
|
479
|
+
expect(logs.length).toBe(1);
|
|
480
|
+
expect(logs[0]).toContain("[Ionic Warning]: Datetime: The 'date-time' presentation requires both a date and time object in formatOptions.");
|
|
481
|
+
});
|
|
482
|
+
});
|
|
483
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { generateDayAriaLabel, getMonthAndDay, getFormattedHour, addTimePadding, getMonthAndYear, getLocalizedDayPeriod, getLocalizedTime, } from "../utils/format";
|
|
4
|
+
import { generateDayAriaLabel, getMonthAndDay, getFormattedHour, addTimePadding, getMonthAndYear, getLocalizedDayPeriod, getLocalizedTime, stripTimeZone, } from "../utils/format";
|
|
5
5
|
describe('generateDayAriaLabel()', () => {
|
|
6
6
|
it('should return Wednesday, May 12', () => {
|
|
7
7
|
const reference = { month: 5, day: 12, year: 2021 };
|
|
@@ -121,4 +121,68 @@ describe('getLocalizedTime', () => {
|
|
|
121
121
|
expect(getLocalizedTime('en-US', datetimeParts, 'h12')).toEqual('10:40 PM');
|
|
122
122
|
expect(getLocalizedTime('en-US', datetimeParts, 'h23')).toEqual('22:40');
|
|
123
123
|
});
|
|
124
|
+
it('should use formatOptions', () => {
|
|
125
|
+
const datetimeParts = {
|
|
126
|
+
day: 1,
|
|
127
|
+
month: 1,
|
|
128
|
+
year: 2022,
|
|
129
|
+
hour: 9,
|
|
130
|
+
minute: 40,
|
|
131
|
+
};
|
|
132
|
+
const formatOptions = {
|
|
133
|
+
hour: '2-digit',
|
|
134
|
+
minute: '2-digit',
|
|
135
|
+
dayPeriod: 'short',
|
|
136
|
+
day: '2-digit',
|
|
137
|
+
};
|
|
138
|
+
// Even though this method is intended to be used for time, the date may be displayed as well when passing formatOptions
|
|
139
|
+
expect(getLocalizedTime('en-US', datetimeParts, 'h12', formatOptions)).toEqual('01, 09:40 in the morning');
|
|
140
|
+
});
|
|
141
|
+
it('should override provided time zone with UTC', () => {
|
|
142
|
+
const datetimeParts = {
|
|
143
|
+
day: 1,
|
|
144
|
+
month: 1,
|
|
145
|
+
year: 2022,
|
|
146
|
+
hour: 9,
|
|
147
|
+
minute: 40,
|
|
148
|
+
};
|
|
149
|
+
const formatOptions = {
|
|
150
|
+
timeZone: 'Australia/Sydney',
|
|
151
|
+
timeZoneName: 'long',
|
|
152
|
+
hour: 'numeric',
|
|
153
|
+
minute: 'numeric',
|
|
154
|
+
};
|
|
155
|
+
expect(getLocalizedTime('en-US', datetimeParts, 'h12', formatOptions)).toEqual('9:40 AM');
|
|
156
|
+
});
|
|
157
|
+
it('should not include time zone name', () => {
|
|
158
|
+
const datetimeParts = {
|
|
159
|
+
day: 1,
|
|
160
|
+
month: 1,
|
|
161
|
+
year: 2022,
|
|
162
|
+
hour: 9,
|
|
163
|
+
minute: 40,
|
|
164
|
+
};
|
|
165
|
+
const formatOptions = {
|
|
166
|
+
timeZone: 'America/Los_Angeles',
|
|
167
|
+
timeZoneName: 'long',
|
|
168
|
+
hour: 'numeric',
|
|
169
|
+
minute: 'numeric',
|
|
170
|
+
};
|
|
171
|
+
expect(getLocalizedTime('en-US', datetimeParts, 'h12', formatOptions)).toEqual('9:40 AM');
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
describe('stripTimeZone', () => {
|
|
175
|
+
it('should remove the time zone name from the options and set the time zone to UTC', () => {
|
|
176
|
+
const formatOptions = {
|
|
177
|
+
timeZone: 'America/Los_Angeles',
|
|
178
|
+
timeZoneName: 'long',
|
|
179
|
+
hour: 'numeric',
|
|
180
|
+
minute: 'numeric',
|
|
181
|
+
};
|
|
182
|
+
expect(stripTimeZone(formatOptions)).toEqual({
|
|
183
|
+
timeZone: 'UTC',
|
|
184
|
+
hour: 'numeric',
|
|
185
|
+
minute: 'numeric',
|
|
186
|
+
});
|
|
187
|
+
});
|
|
124
188
|
});
|