@ionic/core 7.5.8-dev.11704294569.1abc989d → 7.5.8-dev.11705350665.1a40ee3a
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 +1 -1
- package/components/alert.js +2 -2
- package/components/button.js +2 -2
- package/components/checkbox.js +2 -2
- package/components/data.js +1 -1
- package/components/index2.js +91 -0
- package/components/ion-back-button.js +1 -1
- package/components/ion-badge.js +2 -2
- package/components/ion-datetime.js +39 -30
- package/components/ion-fab-button.js +2 -2
- package/components/ion-input.js +2 -2
- package/components/ion-item-option.js +2 -2
- package/components/ion-loading.js +1 -1
- package/components/ion-menu-button.js +1 -1
- package/components/ion-picker-column-option.d.ts +11 -0
- package/components/ion-picker-column-option.js +9 -0
- package/components/ion-picker-column.js +2 -2
- package/components/ion-picker-legacy-column.d.ts +11 -0
- package/components/ion-picker-legacy-column.js +9 -0
- package/components/{ion-picker-internal.d.ts → ion-picker-legacy.d.ts} +4 -4
- package/components/ion-picker-legacy.js +309 -0
- package/components/ion-picker.js +1 -309
- package/components/ion-progress-bar.js +2 -2
- package/components/ion-range.js +2 -2
- package/components/ion-refresher-content.js +1 -1
- package/components/ion-refresher.js +1 -1
- package/components/ion-router-link.js +1 -1
- package/components/ion-searchbar.js +1 -1
- package/components/ion-segment-button.js +1 -1
- package/components/ion-select.js +2 -2
- package/components/ion-tab-bar.js +2 -2
- package/components/ion-textarea.js +2 -2
- package/components/ion-toast.js +2 -2
- package/components/ion-toggle.js +2 -2
- package/components/item.js +2 -2
- package/components/label.js +1 -1
- package/components/overlays.js +6 -3
- package/components/picker-column-option.js +122 -0
- package/components/picker-column.js +351 -322
- package/components/picker-column2.js +379 -0
- package/components/{picker-internal.js → picker.js} +29 -22
- package/components/radio.js +2 -2
- package/components/select-popover.js +1 -1
- package/css/core.css +44 -35
- package/css/core.css.map +1 -1
- package/css/global.bundle.css +1 -1
- package/css/ionic.bundle.css +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/css/typography.css +1 -1
- package/dist/cjs/{data-36b9094e.js → data-e7526b58.js} +1 -1
- package/dist/cjs/{index-d4c2e02c.js → index-ec51e99c.js} +93 -2
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/ion-action-sheet.cjs.entry.js +2 -2
- package/dist/cjs/ion-alert.cjs.entry.js +3 -3
- package/dist/cjs/ion-app_8.cjs.entry.js +1 -1
- package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-back-button.cjs.entry.js +1 -1
- package/dist/cjs/ion-button_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/ion-datetime-button.cjs.entry.js +1 -1
- package/dist/cjs/ion-datetime_3.cjs.entry.js +30 -36
- package/dist/cjs/ion-fab_3.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 +3 -3
- package/dist/cjs/ion-loading.cjs.entry.js +2 -2
- package/dist/cjs/ion-menu_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-modal.cjs.entry.js +2 -2
- package/dist/cjs/ion-nav_2.cjs.entry.js +2 -1
- package/dist/cjs/ion-picker-column-option.cjs.entry.js +104 -0
- package/dist/cjs/{ion-picker-column-internal.cjs.entry.js → ion-picker-column.cjs.entry.js} +104 -87
- package/dist/cjs/{ion-picker-internal.cjs.entry.js → ion-picker.cjs.entry.js} +26 -19
- package/dist/cjs/ion-popover.cjs.entry.js +2 -2
- 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-route_4.cjs.entry.js +1 -1
- package/dist/cjs/ion-searchbar.cjs.entry.js +1 -1
- package/dist/cjs/ion-segment_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-select_3.cjs.entry.js +4 -4
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ion-toast.cjs.entry.js +3 -3
- package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/{ios.transition-a4ffb5a2.js → ios.transition-039d6aeb.js} +3 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{md.transition-292abe1c.js → md.transition-ce763350.js} +3 -1
- package/dist/cjs/{overlays-2c6b1072.js → overlays-e8e05b0e.js} +6 -3
- package/dist/collection/collection-manifest.json +7 -6
- package/dist/collection/components/action-sheet/action-sheet.ios.css +3 -3
- package/dist/collection/components/action-sheet/test/a11y/action-sheet.e2e.js +14 -23
- package/dist/collection/components/alert/alert.ios.css +6 -6
- package/dist/collection/components/alert/alert.md.css +6 -6
- package/dist/collection/components/alert/test/a11y/alert.e2e.js +9 -22
- package/dist/collection/components/back-button/back-button.ios.css +1 -1
- package/dist/collection/components/back-button/test/a11y/back-button.e2e.js +0 -21
- package/dist/collection/components/badge/badge.ios.css +1 -1
- package/dist/collection/components/badge/badge.md.css +1 -1
- package/dist/collection/components/badge/test/a11y/badge.e2e.js +0 -18
- package/dist/collection/components/button/button.ios.css +11 -11
- package/dist/collection/components/button/button.md.css +9 -9
- package/dist/collection/components/button/test/a11y/button.e2e.js +0 -48
- package/dist/collection/components/button/test/wrap/button.e2e.js +12 -24
- package/dist/collection/components/checkbox/checkbox.ios.css +2 -2
- package/dist/collection/components/checkbox/checkbox.md.css +2 -2
- package/dist/collection/components/checkbox/test/a11y/checkbox.e2e.js +2 -11
- package/dist/collection/components/datetime/datetime.ios.css +8 -13
- package/dist/collection/components/datetime/datetime.js +19 -16
- package/dist/collection/components/datetime/datetime.md.css +8 -13
- package/dist/collection/components/datetime/test/datetime.e2e.js +2 -2
- package/dist/collection/components/datetime/test/disabled/datetime.spec.js +4 -4
- package/dist/collection/components/datetime/test/locale/datetime.e2e.js +2 -2
- package/dist/collection/components/datetime/test/minmax/datetime.e2e.js +6 -6
- package/dist/collection/components/datetime/test/prefer-wheel/datetime.e2e.js +43 -41
- package/dist/collection/components/datetime/test/presentation/datetime.e2e.js +1 -1
- package/dist/collection/components/datetime/test/readonly/datetime.e2e.js +2 -2
- package/dist/collection/components/datetime/test/values/datetime.e2e.js +15 -12
- package/dist/collection/components/datetime/utils/data.js +1 -1
- package/dist/collection/components/fab-button/fab-button.ios.css +13 -13
- package/dist/collection/components/fab-button/fab-button.md.css +4 -4
- package/dist/collection/components/fab-button/test/a11y/fab-button.e2e.js +0 -50
- package/dist/collection/components/input/input.ios.css +3 -3
- package/dist/collection/components/input/input.md.css +3 -3
- package/dist/collection/components/input/test/a11y/input.e2e.js +3 -35
- package/dist/collection/components/item/item.ios.css +3 -3
- package/dist/collection/components/item/item.md.css +4 -4
- package/dist/collection/components/item-option/item-option.ios.css +2 -2
- package/dist/collection/components/item-option/item-option.md.css +1 -1
- package/dist/collection/components/item-sliding/test/a11y/item-sliding.e2e.js +0 -28
- package/dist/collection/components/label/label.md.css +1 -1
- package/dist/collection/components/label/test/a11y/label.e2e.js +0 -20
- package/dist/collection/components/loading/loading.md.css +1 -1
- package/dist/collection/components/loading/test/a11y/loading.e2e.js +5 -21
- package/dist/collection/components/menu-button/menu-button.ios.css +1 -1
- package/dist/collection/components/menu-button/test/a11y/menu-button.e2e.js +0 -14
- package/dist/collection/components/picker/picker.ios.css +112 -211
- package/dist/collection/components/picker/picker.js +472 -744
- package/dist/collection/components/picker/picker.md.css +108 -198
- package/dist/collection/components/picker/test/a11y/picker.e2e.js +15 -0
- package/dist/collection/components/picker/test/basic/picker.e2e.js +99 -13
- package/dist/collection/components/picker/test/custom/picker.e2e.js +85 -0
- package/dist/collection/components/{picker-internal/test/keyboard-entry/picker-internal.e2e.js → picker/test/keyboard-entry/picker.e2e.js} +63 -32
- package/dist/collection/components/{picker-column-internal/picker-column-internal.md.css → picker-column/picker-column.css} +96 -83
- package/dist/collection/components/picker-column/picker-column.js +497 -335
- package/dist/collection/components/{picker-column-internal/test/basic/picker-column-internal.e2e.js → picker-column/test/basic/picker-column.e2e.js} +8 -8
- package/dist/collection/components/picker-column/test/disabled/picker-column.e2e.js +91 -0
- package/dist/collection/components/picker-column/test/slots/picker-column.e2e.js +39 -0
- package/dist/collection/components/picker-column-option/picker-column-option.ios.css +87 -0
- package/dist/collection/components/picker-column-option/picker-column-option.js +173 -0
- package/dist/collection/components/{picker-column-internal/picker-column-internal.ios.css → picker-column-option/picker-column-option.md.css} +6 -53
- package/dist/collection/components/picker-column-option/test/a11y/picker-column-option.e2e.js +18 -0
- package/dist/collection/components/picker-column-option/test/basic/picker-column-option.e2e.js +37 -0
- package/dist/collection/components/picker-column-option/test/picker-column-option.spec.js +29 -0
- package/dist/collection/components/{picker-internal/picker-internal.md.css → picker-legacy/picker.ios.css} +207 -98
- package/dist/collection/components/picker-legacy/picker.js +817 -0
- package/dist/collection/components/{picker-internal/picker-internal.ios.css → picker-legacy/picker.md.css} +192 -100
- package/dist/collection/components/picker-legacy/test/basic/picker.e2e.js +25 -0
- package/dist/collection/components/{picker → picker-legacy}/test/is-open/picker.e2e.js +4 -4
- package/dist/collection/components/{picker → picker-legacy}/test/picker-id.spec.js +5 -5
- package/dist/collection/components/{picker → picker-legacy}/test/trigger/picker.e2e.js +1 -1
- package/dist/collection/components/picker-legacy-column/picker-column.js +419 -0
- package/dist/collection/components/{picker-column → picker-legacy-column}/picker-column.md.css +1 -1
- package/dist/collection/components/{picker-column → picker-legacy-column}/test/picker-column-aria.spec.js +3 -3
- package/dist/collection/components/{picker-column → picker-legacy-column}/test/picker-column-dynamic.spec.js +2 -2
- package/dist/collection/components/{picker-column → picker-legacy-column}/test/picker-column.spec.js +2 -2
- package/dist/collection/components/{picker-column → picker-legacy-column}/test/standalone/picker-column.e2e.js +3 -3
- package/dist/collection/components/progress-bar/progress-bar.ios.css +2 -2
- package/dist/collection/components/progress-bar/progress-bar.md.css +2 -2
- package/dist/collection/components/radio/radio.ios.css +2 -2
- package/dist/collection/components/radio/radio.md.css +2 -2
- package/dist/collection/components/radio/test/a11y/radio.e2e.js +6 -44
- package/dist/collection/components/range/range.ios.css +1 -1
- package/dist/collection/components/range/range.md.css +3 -3
- package/dist/collection/components/range/test/a11y/range.e2e.js +8 -18
- package/dist/collection/components/refresher/refresher.md.css +2 -2
- package/dist/collection/components/refresher-content/refresher-content.js +1 -1
- package/dist/collection/components/router-link/router-link.css +1 -1
- package/dist/collection/components/searchbar/searchbar.ios.css +1 -1
- package/dist/collection/components/segment/test/a11y/segment.e2e.js +0 -23
- package/dist/collection/components/segment-button/segment-button.md.css +2 -2
- package/dist/collection/components/select/select.ios.css +3 -3
- package/dist/collection/components/select/select.md.css +3 -3
- package/dist/collection/components/select/test/a11y/select.e2e.js +4 -59
- package/dist/collection/components/select-popover/select-popover.md.css +4 -4
- package/dist/collection/components/tab-bar/tab-bar.ios.css +1 -1
- package/dist/collection/components/tab-bar/tab-bar.md.css +1 -1
- package/dist/collection/components/textarea/test/a11y/textarea.e2e.js +3 -35
- package/dist/collection/components/textarea/textarea.ios.css +3 -3
- package/dist/collection/components/textarea/textarea.md.css +3 -3
- package/dist/collection/components/toast/test/a11y/toast.e2e.js +24 -56
- package/dist/collection/components/toast/toast.ios.css +1 -1
- package/dist/collection/components/toast/toast.md.css +2 -2
- package/dist/collection/components/toggle/test/a11y/toggle.e2e.js +2 -8
- package/dist/collection/components/toggle/toggle.ios.css +1 -1
- package/dist/collection/components/toggle/toggle.md.css +2 -2
- package/dist/collection/css/test/a11y/typography.e2e.js +0 -18
- package/dist/collection/utils/overlays.js +6 -3
- package/dist/collection/utils/test/playwright/generator.js +0 -1
- package/dist/collection/utils/test/playwright/page/utils/set-content.js +1 -1
- package/dist/collection/utils/transition/index.js +91 -0
- package/dist/docs.json +472 -24
- package/dist/esm/{data-f5c75b4e.js → data-4b9508c9.js} +1 -1
- package/dist/esm/{index-d8817fb0.js → index-933484ae.js} +93 -2
- package/dist/esm/index.js +5 -5
- package/dist/esm/ion-action-sheet.entry.js +2 -2
- package/dist/esm/ion-alert.entry.js +3 -3
- package/dist/esm/ion-app_8.entry.js +1 -1
- package/dist/esm/ion-avatar_3.entry.js +2 -2
- package/dist/esm/ion-back-button.entry.js +1 -1
- package/dist/esm/ion-button_2.entry.js +2 -2
- package/dist/esm/ion-checkbox.entry.js +2 -2
- package/dist/esm/ion-datetime-button.entry.js +1 -1
- package/dist/esm/ion-datetime_3.entry.js +29 -35
- package/dist/esm/ion-fab_3.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 +3 -3
- package/dist/esm/ion-loading.entry.js +2 -2
- package/dist/esm/ion-menu_3.entry.js +2 -2
- package/dist/esm/ion-modal.entry.js +2 -2
- package/dist/esm/ion-nav_2.entry.js +2 -1
- package/dist/esm/ion-picker-column-option.entry.js +100 -0
- package/dist/esm/{ion-picker-column-internal.entry.js → ion-picker-column.entry.js} +104 -87
- package/dist/esm/{ion-picker-internal.entry.js → ion-picker.entry.js} +26 -19
- package/dist/esm/ion-popover.entry.js +2 -2
- 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-route_4.entry.js +1 -1
- package/dist/esm/ion-searchbar.entry.js +1 -1
- package/dist/esm/ion-segment_2.entry.js +1 -1
- package/dist/esm/ion-select_3.entry.js +4 -4
- package/dist/esm/ion-tab-bar_2.entry.js +2 -2
- package/dist/esm/ion-textarea.entry.js +2 -2
- package/dist/esm/ion-toast.entry.js +3 -3
- package/dist/esm/ion-toggle.entry.js +2 -2
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/{ios.transition-fd16bec1.js → ios.transition-9e42996d.js} +3 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{md.transition-94ac93e1.js → md.transition-8cbb4e1d.js} +3 -1
- package/dist/esm/{overlays-d23ea6e1.js → overlays-fbc5cab5.js} +6 -3
- package/dist/esm-es5/index-933484ae.js +4 -0
- package/dist/esm-es5/index.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-button_2.entry.js +1 -1
- package/dist/esm-es5/ion-checkbox.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-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-option.entry.js +4 -0
- package/dist/esm-es5/ion-picker-column.entry.js +4 -0
- package/dist/esm-es5/ion-picker.entry.js +4 -0
- 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-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-tab-bar_2.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.js +1 -1
- package/dist/esm-es5/ios.transition-9e42996d.js +4 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/md.transition-8cbb4e1d.js +4 -0
- package/dist/esm-es5/overlays-fbc5cab5.js +4 -0
- package/dist/html.html-data.json +152 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/{p-fff7a57e.system.js → p-16bd5224.system.js} +1 -1
- package/dist/ionic/p-17da5ed1.entry.js +4 -0
- package/dist/ionic/{p-be6344dd.entry.js → p-18ba8221.entry.js} +1 -1
- package/dist/ionic/{p-29bf41bd.entry.js → p-21c3515a.entry.js} +1 -1
- package/dist/ionic/{p-1de103b7.entry.js → p-22e5af95.entry.js} +1 -1
- package/dist/ionic/{p-02e066a0.entry.js → p-232d1f22.entry.js} +1 -1
- package/dist/ionic/{p-8e086176.system.entry.js → p-26798a7b.system.entry.js} +1 -1
- package/dist/ionic/{p-b1a2a195.system.entry.js → p-27bcbbc7.system.entry.js} +1 -1
- package/dist/ionic/p-294725bb.js +4 -0
- package/dist/ionic/{p-6f96f7b1.system.entry.js → p-2ab4e925.system.entry.js} +1 -1
- package/dist/ionic/{p-98c798de.system.entry.js → p-32303650.system.entry.js} +1 -1
- package/dist/ionic/{p-1286049a.entry.js → p-34c39c48.entry.js} +1 -1
- package/dist/ionic/p-36d194c5.entry.js +4 -0
- package/dist/ionic/p-3993ae66.entry.js +4 -0
- package/dist/ionic/{p-55a0cd33.entry.js → p-3f6270b3.entry.js} +1 -1
- package/dist/ionic/{p-0339b688.system.entry.js → p-3fd26bd6.system.entry.js} +1 -1
- package/dist/ionic/p-400b61c7.system.entry.js +4 -0
- package/dist/ionic/{p-d51019a8.entry.js → p-42ba3902.entry.js} +1 -1
- package/dist/ionic/{p-ed25b7cc.system.entry.js → p-464975c5.system.entry.js} +1 -1
- package/dist/ionic/{p-023b1cf4.entry.js → p-4911a5d6.entry.js} +1 -1
- package/dist/ionic/p-49c5f1a3.js +4 -0
- package/dist/ionic/{p-7c7e21a7.entry.js → p-4a31c99f.entry.js} +1 -1
- package/dist/ionic/{p-7a63e024.entry.js → p-4bee86bd.entry.js} +1 -1
- package/dist/ionic/p-510d9b43.js +4 -0
- package/dist/ionic/{p-0ebcff25.entry.js → p-51a087d6.entry.js} +1 -1
- package/dist/ionic/p-5a1aac13.system.entry.js +4 -0
- package/dist/ionic/{p-12869199.system.entry.js → p-5bebc7b3.system.entry.js} +1 -1
- package/dist/ionic/{p-5b834053.entry.js → p-5d42b6b4.entry.js} +1 -1
- package/dist/ionic/{p-2f2293da.system.entry.js → p-6555a5e7.system.entry.js} +1 -1
- package/dist/ionic/{p-60b386c9.system.entry.js → p-65e27aae.system.entry.js} +1 -1
- package/dist/ionic/{p-cef8c5c2.entry.js → p-6b7c55cd.entry.js} +1 -1
- package/dist/ionic/{p-0941a5d7.entry.js → p-6d72fb44.entry.js} +1 -1
- package/dist/ionic/p-6e70dd1a.system.entry.js +4 -0
- package/dist/ionic/{p-d1025b3d.entry.js → p-6fbecbda.entry.js} +1 -1
- package/dist/ionic/{p-ad8bed54.system.entry.js → p-6fd64e7c.system.entry.js} +1 -1
- package/dist/ionic/{p-0afef6b9.entry.js → p-73190c5f.entry.js} +1 -1
- package/dist/ionic/{p-c7c7c110.entry.js → p-73aa7604.entry.js} +1 -1
- package/dist/ionic/{p-5b20db28.entry.js → p-7b725280.entry.js} +1 -1
- package/dist/ionic/{p-de74582b.system.entry.js → p-8017aad2.system.entry.js} +1 -1
- package/dist/ionic/{p-3b568d18.entry.js → p-8adc9a45.entry.js} +1 -1
- package/dist/ionic/p-8c0e5060.system.js +4 -0
- package/dist/ionic/p-8e42850f.entry.js +4 -0
- package/dist/ionic/{p-5fbfa8c9.entry.js → p-8f5d30f5.entry.js} +1 -1
- package/dist/ionic/p-8fa6583d.system.js +4 -0
- package/dist/ionic/p-91af3c52.system.entry.js +4 -0
- package/dist/ionic/{p-3e625023.system.entry.js → p-93000a81.system.entry.js} +1 -1
- package/dist/ionic/{p-90483001.system.entry.js → p-96dbbac1.system.entry.js} +1 -1
- package/dist/ionic/p-9e48593b.system.js +4 -0
- package/dist/ionic/{p-a8e90d15.system.entry.js → p-a225bf0f.system.entry.js} +1 -1
- package/dist/ionic/{p-57798ba6.entry.js → p-a8baa23e.entry.js} +1 -1
- package/dist/ionic/{p-bcd073dd.entry.js → p-a98dc0c1.entry.js} +1 -1
- package/dist/ionic/{p-9588396d.entry.js → p-a9a80f5b.entry.js} +1 -1
- package/dist/ionic/{p-098f4d12.system.entry.js → p-ab9456e9.system.entry.js} +1 -1
- package/dist/ionic/{p-ebcf6eca.entry.js → p-ae712b95.entry.js} +1 -1
- package/dist/ionic/p-afcf4620.entry.js +4 -0
- package/dist/ionic/{p-ddb30596.entry.js → p-b133e9b4.entry.js} +1 -1
- package/dist/ionic/{p-d32188f3.system.entry.js → p-b4d31b30.system.entry.js} +1 -1
- package/dist/ionic/p-b7010c69.system.entry.js +4 -0
- package/dist/ionic/{p-7828a27f.system.entry.js → p-b752714f.system.entry.js} +1 -1
- package/dist/ionic/p-c006d974.entry.js +4 -0
- package/dist/ionic/{p-ec040c06.system.entry.js → p-c18de88a.system.entry.js} +1 -1
- package/dist/ionic/p-c41bff4e.system.entry.js +4 -0
- package/dist/ionic/{p-76c94634.system.entry.js → p-c9a21dfd.system.entry.js} +1 -1
- package/dist/ionic/p-ca8938f4.js +4 -0
- package/dist/ionic/p-cde52378.system.entry.js +4 -0
- package/dist/ionic/{p-1e57bd24.entry.js → p-d3c773d0.entry.js} +1 -1
- package/dist/ionic/p-d9ec6cf0.system.js +4 -0
- package/dist/ionic/p-e3584231.system.js +1 -1
- package/dist/ionic/{p-f957d584.system.entry.js → p-e7ea9815.system.entry.js} +1 -1
- package/dist/ionic/{p-93f25d0d.system.entry.js → p-e8e86f69.system.entry.js} +1 -1
- package/dist/ionic/{p-31cf9613.entry.js → p-ea69616e.entry.js} +1 -1
- package/dist/ionic/{p-d39db09e.system.entry.js → p-ef126ae8.system.entry.js} +1 -1
- package/dist/ionic/{p-5ff60387.system.entry.js → p-f6160677.system.entry.js} +1 -1
- package/dist/ionic/{p-9eec42cc.system.entry.js → p-f910cc73.system.entry.js} +1 -1
- package/dist/ionic/{p-193ff029.system.entry.js → p-fbf3a689.system.entry.js} +1 -1
- package/dist/ionic/p-ffd5dba4.system.entry.js +4 -0
- package/dist/types/components/datetime/utils/data.d.ts +11 -7
- package/dist/types/components/picker/picker-interfaces.d.ts +8 -0
- package/dist/types/components/picker/picker.d.ts +75 -129
- package/dist/types/components/picker-column/picker-column-interfaces.d.ts +4 -0
- package/dist/types/components/picker-column/picker-column.d.ts +99 -39
- package/dist/types/components/picker-column-option/picker-column-option.d.ts +66 -0
- package/dist/types/components/picker-legacy/picker.d.ts +158 -0
- package/dist/types/components/picker-legacy-column/picker-column.d.ts +46 -0
- package/dist/types/components.d.ts +154 -122
- package/dist/types/interface.d.ts +1 -1
- package/dist/types/utils/config.d.ts +8 -2
- package/dist/types/utils/overlays.d.ts +5 -2
- package/hydrate/index.js +1617 -1404
- package/package.json +1 -1
- package/components/ion-picker-column-internal.d.ts +0 -11
- package/components/ion-picker-column-internal.js +0 -9
- package/components/ion-picker-internal.js +0 -9
- package/components/picker-column-internal.js +0 -390
- package/css/themes/dark.always.css +0 -122
- package/css/themes/dark.always.css.map +0 -1
- package/css/themes/dark.class.css +0 -122
- package/css/themes/dark.class.css.map +0 -1
- package/css/themes/dark.css +0 -3
- package/css/themes/dark.css.map +0 -1
- package/css/themes/dark.system.css +0 -124
- package/css/themes/dark.system.css.map +0 -1
- package/dist/collection/components/picker-column-internal/picker-column-internal.js +0 -565
- package/dist/collection/components/picker-column-internal/test/disabled/picker-column-internal.e2e.js +0 -162
- package/dist/collection/components/picker-internal/picker-internal.js +0 -544
- package/dist/collection/components/picker-internal/test/a11y/picker-internal.e2e.js +0 -31
- package/dist/collection/components/picker-internal/test/basic/picker-internal.e2e.js +0 -118
- package/dist/collection/components/progress-bar/test/a11y/progress-bar.e2e.js +0 -24
- package/dist/collection/components/refresher/test/a11y/refresher.e2e.js +0 -25
- package/dist/collection/components/router-link/test/a11y/router-link.e2e.js +0 -23
- package/dist/collection/components/select-popover/test/a11y/select-popover.e2e.js +0 -32
- package/dist/collection/themes/test/colors/theme.e2e.js +0 -114
- package/dist/esm-es5/index-d8817fb0.js +0 -4
- package/dist/esm-es5/ion-picker-column-internal.entry.js +0 -4
- package/dist/esm-es5/ion-picker-internal.entry.js +0 -4
- package/dist/esm-es5/ios.transition-fd16bec1.js +0 -4
- package/dist/esm-es5/md.transition-94ac93e1.js +0 -4
- package/dist/esm-es5/overlays-d23ea6e1.js +0 -4
- package/dist/ionic/p-2dd0355d.system.entry.js +0 -4
- package/dist/ionic/p-30029cc2.system.js +0 -4
- package/dist/ionic/p-31158892.js +0 -4
- package/dist/ionic/p-3e13501a.system.entry.js +0 -4
- package/dist/ionic/p-4890093d.js +0 -4
- package/dist/ionic/p-535d2a67.entry.js +0 -4
- package/dist/ionic/p-57477107.system.js +0 -4
- package/dist/ionic/p-67da080d.entry.js +0 -4
- package/dist/ionic/p-73ea8f82.system.entry.js +0 -4
- package/dist/ionic/p-80fa068e.entry.js +0 -4
- package/dist/ionic/p-9c229210.system.entry.js +0 -4
- package/dist/ionic/p-9eae578e.system.entry.js +0 -4
- package/dist/ionic/p-ab11130c.system.js +0 -4
- package/dist/ionic/p-c14f8ac8.js +0 -4
- package/dist/ionic/p-c9e07b2f.entry.js +0 -4
- package/dist/ionic/p-ccc2fb62.system.entry.js +0 -4
- package/dist/ionic/p-cce9f61a.system.entry.js +0 -4
- package/dist/ionic/p-d7e9a0ac.entry.js +0 -4
- package/dist/ionic/p-e4d90573.js +0 -4
- package/dist/ionic/p-f7a36cd0.system.js +0 -4
- package/dist/types/components/picker-column-internal/picker-column-internal-interfaces.d.ts +0 -5
- package/dist/types/components/picker-column-internal/picker-column-internal.d.ts +0 -102
- package/dist/types/components/picker-internal/picker-internal-interfaces.d.ts +0 -8
- package/dist/types/components/picker-internal/picker-internal.d.ts +0 -102
- /package/dist/collection/components/{picker-internal/picker-internal-interfaces.js → picker/picker-interfaces.js} +0 -0
- /package/dist/collection/components/{picker-column-internal/picker-column-internal-interfaces.js → picker-column/picker-column-interfaces.js} +0 -0
- /package/dist/collection/components/{picker → picker-legacy}/animations/ios.enter.js +0 -0
- /package/dist/collection/components/{picker → picker-legacy}/animations/ios.leave.js +0 -0
- /package/dist/collection/components/{picker → picker-legacy}/picker-interface.js +0 -0
- /package/dist/collection/components/{picker-column → picker-legacy-column}/picker-column.ios.css +0 -0
- /package/dist/collection/components/{picker-column → picker-legacy-column}/test/test.utils.js +0 -0
- /package/dist/esm-es5/{data-f5c75b4e.js → data-4b9508c9.js} +0 -0
- /package/dist/ionic/{p-2aea8b1e.js → p-368f5215.js} +0 -0
- /package/dist/ionic/{p-82e3d633.system.js → p-f58981c2.system.js} +0 -0
- /package/dist/types/components/{picker → picker-legacy}/animations/ios.enter.d.ts +0 -0
- /package/dist/types/components/{picker → picker-legacy}/animations/ios.leave.d.ts +0 -0
- /package/dist/types/components/{picker → picker-legacy}/picker-interface.d.ts +0 -0
- /package/dist/types/components/{picker-column → picker-legacy-column}/test/test.utils.d.ts +0 -0
|
@@ -977,7 +977,7 @@ export class Datetime {
|
|
|
977
977
|
const renderArray = forcePresentation === 'time-date'
|
|
978
978
|
? [this.renderTimePickerColumns(forcePresentation), this.renderDatePickerColumns(forcePresentation)]
|
|
979
979
|
: [this.renderDatePickerColumns(forcePresentation), this.renderTimePickerColumns(forcePresentation)];
|
|
980
|
-
return h("ion-picker
|
|
980
|
+
return h("ion-picker", null, renderArray);
|
|
981
981
|
}
|
|
982
982
|
renderDatePickerColumns(forcePresentation) {
|
|
983
983
|
return forcePresentation === 'date-time' || forcePresentation === 'time-date'
|
|
@@ -1036,7 +1036,7 @@ export class Datetime {
|
|
|
1036
1036
|
const todayString = workingParts.day !== null
|
|
1037
1037
|
? `${workingParts.year}-${workingParts.month}-${workingParts.day}`
|
|
1038
1038
|
: `${defaultParts.year}-${defaultParts.month}-${defaultParts.day}`;
|
|
1039
|
-
return (h("ion-picker-column
|
|
1039
|
+
return (h("ion-picker-column", { class: "date-column", color: this.color, disabled: disabled, value: todayString, onIonChange: (ev) => {
|
|
1040
1040
|
// TODO(FW-1823) Remove this when iOS 14 support is dropped.
|
|
1041
1041
|
// Due to a Safari 14 issue we need to destroy
|
|
1042
1042
|
// the scroll listener before we update state
|
|
@@ -1052,7 +1052,7 @@ export class Datetime {
|
|
|
1052
1052
|
// the working parts have been updated.
|
|
1053
1053
|
this.initializeCalendarListener();
|
|
1054
1054
|
ev.stopPropagation();
|
|
1055
|
-
} }));
|
|
1055
|
+
} }, items.map((item) => (h("ion-picker-column-option", { part: item.value === todayString ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: item.value, disabled: item.disabled, value: item.value }, item.text)))));
|
|
1056
1056
|
}
|
|
1057
1057
|
renderIndividualDatePickerColumns(forcePresentation) {
|
|
1058
1058
|
const { workingParts, isDateEnabled } = this;
|
|
@@ -1120,7 +1120,8 @@ export class Datetime {
|
|
|
1120
1120
|
}
|
|
1121
1121
|
const { disabled, workingParts } = this;
|
|
1122
1122
|
const activePart = this.getActivePartsWithFallback();
|
|
1123
|
-
|
|
1123
|
+
const pickerColumnValue = (_a = (workingParts.day !== null ? workingParts.day : this.defaultParts.day)) !== null && _a !== void 0 ? _a : undefined;
|
|
1124
|
+
return (h("ion-picker-column", { class: "day-column", color: this.color, disabled: disabled, value: pickerColumnValue, onIonChange: (ev) => {
|
|
1124
1125
|
// TODO(FW-1823) Remove this when iOS 14 support is dropped.
|
|
1125
1126
|
// Due to a Safari 14 issue we need to destroy
|
|
1126
1127
|
// the scroll listener before we update state
|
|
@@ -1134,7 +1135,7 @@ export class Datetime {
|
|
|
1134
1135
|
// the working parts have been updated.
|
|
1135
1136
|
this.initializeCalendarListener();
|
|
1136
1137
|
ev.stopPropagation();
|
|
1137
|
-
} }));
|
|
1138
|
+
} }, days.map((day) => (h("ion-picker-column-option", { part: day.value === pickerColumnValue ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: day.value, disabled: day.disabled, value: day.value }, day.text)))));
|
|
1138
1139
|
}
|
|
1139
1140
|
renderMonthPickerColumn(months) {
|
|
1140
1141
|
if (months.length === 0) {
|
|
@@ -1142,7 +1143,7 @@ export class Datetime {
|
|
|
1142
1143
|
}
|
|
1143
1144
|
const { disabled, workingParts } = this;
|
|
1144
1145
|
const activePart = this.getActivePartsWithFallback();
|
|
1145
|
-
return (h("ion-picker-column
|
|
1146
|
+
return (h("ion-picker-column", { class: "month-column", color: this.color, disabled: disabled, value: workingParts.month, onIonChange: (ev) => {
|
|
1146
1147
|
// TODO(FW-1823) Remove this when iOS 14 support is dropped.
|
|
1147
1148
|
// Due to a Safari 14 issue we need to destroy
|
|
1148
1149
|
// the scroll listener before we update state
|
|
@@ -1156,7 +1157,7 @@ export class Datetime {
|
|
|
1156
1157
|
// the working parts have been updated.
|
|
1157
1158
|
this.initializeCalendarListener();
|
|
1158
1159
|
ev.stopPropagation();
|
|
1159
|
-
} }));
|
|
1160
|
+
} }, months.map((month) => (h("ion-picker-column-option", { part: month.value === workingParts.month ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: month.value, disabled: month.disabled, value: month.value }, month.text)))));
|
|
1160
1161
|
}
|
|
1161
1162
|
renderYearPickerColumn(years) {
|
|
1162
1163
|
if (years.length === 0) {
|
|
@@ -1164,7 +1165,7 @@ export class Datetime {
|
|
|
1164
1165
|
}
|
|
1165
1166
|
const { disabled, workingParts } = this;
|
|
1166
1167
|
const activePart = this.getActivePartsWithFallback();
|
|
1167
|
-
return (h("ion-picker-column
|
|
1168
|
+
return (h("ion-picker-column", { class: "year-column", color: this.color, disabled: disabled, value: workingParts.year, onIonChange: (ev) => {
|
|
1168
1169
|
// TODO(FW-1823) Remove this when iOS 14 support is dropped.
|
|
1169
1170
|
// Due to a Safari 14 issue we need to destroy
|
|
1170
1171
|
// the scroll listener before we update state
|
|
@@ -1178,7 +1179,7 @@ export class Datetime {
|
|
|
1178
1179
|
// the working parts have been updated.
|
|
1179
1180
|
this.initializeCalendarListener();
|
|
1180
1181
|
ev.stopPropagation();
|
|
1181
|
-
} }));
|
|
1182
|
+
} }, years.map((year) => (h("ion-picker-column-option", { part: year.value === workingParts.year ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: year.value, disabled: year.disabled, value: year.value }, year.text)))));
|
|
1182
1183
|
}
|
|
1183
1184
|
renderTimePickerColumns(forcePresentation) {
|
|
1184
1185
|
if (['date', 'month', 'month-year', 'year'].includes(forcePresentation)) {
|
|
@@ -1207,22 +1208,22 @@ export class Datetime {
|
|
|
1207
1208
|
if (hoursData.length === 0)
|
|
1208
1209
|
return [];
|
|
1209
1210
|
const activePart = this.getActivePartsWithFallback();
|
|
1210
|
-
return (h("ion-picker-column
|
|
1211
|
+
return (h("ion-picker-column", { color: this.color, disabled: disabled, value: activePart.hour, numericInput: true, onIonChange: (ev) => {
|
|
1211
1212
|
this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { hour: ev.detail.value }));
|
|
1212
1213
|
this.setActiveParts(Object.assign(Object.assign({}, activePart), { hour: ev.detail.value }));
|
|
1213
1214
|
ev.stopPropagation();
|
|
1214
|
-
} }));
|
|
1215
|
+
} }, hoursData.map((hour) => (h("ion-picker-column-option", { part: hour.value === activePart.hour ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: hour.value, disabled: hour.disabled, value: hour.value }, hour.text)))));
|
|
1215
1216
|
}
|
|
1216
1217
|
renderMinutePickerColumn(minutesData) {
|
|
1217
1218
|
const { disabled, workingParts } = this;
|
|
1218
1219
|
if (minutesData.length === 0)
|
|
1219
1220
|
return [];
|
|
1220
1221
|
const activePart = this.getActivePartsWithFallback();
|
|
1221
|
-
return (h("ion-picker-column
|
|
1222
|
+
return (h("ion-picker-column", { color: this.color, disabled: disabled, value: activePart.minute, numericInput: true, onIonChange: (ev) => {
|
|
1222
1223
|
this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { minute: ev.detail.value }));
|
|
1223
1224
|
this.setActiveParts(Object.assign(Object.assign({}, activePart), { minute: ev.detail.value }));
|
|
1224
1225
|
ev.stopPropagation();
|
|
1225
|
-
} }));
|
|
1226
|
+
} }, minutesData.map((minute) => (h("ion-picker-column-option", { part: minute.value === activePart.minute ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: minute.value, disabled: minute.disabled, value: minute.value }, minute.text)))));
|
|
1226
1227
|
}
|
|
1227
1228
|
renderDayPeriodPickerColumn(dayPeriodData) {
|
|
1228
1229
|
const { disabled, workingParts } = this;
|
|
@@ -1231,12 +1232,12 @@ export class Datetime {
|
|
|
1231
1232
|
}
|
|
1232
1233
|
const activePart = this.getActivePartsWithFallback();
|
|
1233
1234
|
const isDayPeriodRTL = isLocaleDayPeriodRTL(this.locale);
|
|
1234
|
-
return (h("ion-picker-column
|
|
1235
|
+
return (h("ion-picker-column", { style: isDayPeriodRTL ? { order: '-1' } : {}, color: this.color, disabled: disabled, value: activePart.ampm, onIonChange: (ev) => {
|
|
1235
1236
|
const hour = calculateHourFromAMPM(workingParts, ev.detail.value);
|
|
1236
1237
|
this.setWorkingParts(Object.assign(Object.assign({}, workingParts), { ampm: ev.detail.value, hour }));
|
|
1237
1238
|
this.setActiveParts(Object.assign(Object.assign({}, activePart), { ampm: ev.detail.value, hour }));
|
|
1238
1239
|
ev.stopPropagation();
|
|
1239
|
-
} }));
|
|
1240
|
+
} }, dayPeriodData.map((dayPeriod) => (h("ion-picker-column-option", { part: dayPeriod.value === activePart.ampm ? `${WHEEL_ITEM_PART} ${WHEEL_ITEM_ACTIVE_PART}` : WHEEL_ITEM_PART, key: dayPeriod.value, disabled: dayPeriod.disabled, value: dayPeriod.value }, dayPeriod.text)))));
|
|
1240
1241
|
}
|
|
1241
1242
|
renderWheelView(forcePresentation) {
|
|
1242
1243
|
const { locale } = this;
|
|
@@ -1422,7 +1423,7 @@ export class Datetime {
|
|
|
1422
1423
|
* This will correctly scroll the element position to the correct time value,
|
|
1423
1424
|
* before the popover is fully presented.
|
|
1424
1425
|
*/
|
|
1425
|
-
const cols = ev.target.querySelectorAll('ion-picker-column
|
|
1426
|
+
const cols = ev.target.querySelectorAll('ion-picker-column');
|
|
1426
1427
|
// TODO (FW-615): Potentially remove this when intersection observers are fixed in picker column
|
|
1427
1428
|
cols.forEach((col) => col.scrollActiveItemIntoView());
|
|
1428
1429
|
}, style: {
|
|
@@ -2350,3 +2351,5 @@ export class Datetime {
|
|
|
2350
2351
|
}
|
|
2351
2352
|
}
|
|
2352
2353
|
let datetimeIds = 0;
|
|
2354
|
+
const WHEEL_ITEM_PART = 'wheel-item';
|
|
2355
|
+
const WHEEL_ITEM_ACTIVE_PART = `active`;
|
|
@@ -61,6 +61,8 @@
|
|
|
61
61
|
*
|
|
62
62
|
* @prop --wheel-highlight-background: The background of the highlight under the selected
|
|
63
63
|
* item when using a wheel style layout, or in the month/year picker for grid style layouts.
|
|
64
|
+
* @prop --wheel-highlight-border-radius: The border radius of the highlight under the selected
|
|
65
|
+
* item when using a wheel style layout, or in the month/year picker for grid style layouts.
|
|
64
66
|
* @prop --wheel-fade-background-rgb: The color of the gradient covering non-selected items
|
|
65
67
|
* when using a wheel style layout, or in the month/year picker for grid style layouts. Must
|
|
66
68
|
* be in RGB format, e.g. `255, 255, 255`.
|
|
@@ -71,19 +73,6 @@
|
|
|
71
73
|
overflow: hidden;
|
|
72
74
|
}
|
|
73
75
|
|
|
74
|
-
/**
|
|
75
|
-
* When using the wheel picker to switch
|
|
76
|
-
* between months, sometimes the allowed
|
|
77
|
-
* dates may be filtered. As a result, it
|
|
78
|
-
* is possible to get a layout shift as
|
|
79
|
-
* the picker column will shrink to fit the
|
|
80
|
-
* widest item in the column. Setting a minimum
|
|
81
|
-
* width avoids this layout shifting.
|
|
82
|
-
*/
|
|
83
|
-
ion-picker-column-internal {
|
|
84
|
-
min-width: 26px;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
76
|
:host(.datetime-size-fixed) {
|
|
88
77
|
width: auto;
|
|
89
78
|
height: auto;
|
|
@@ -562,6 +551,12 @@ ion-picker-column-internal {
|
|
|
562
551
|
align-items: center;
|
|
563
552
|
}
|
|
564
553
|
|
|
554
|
+
ion-picker {
|
|
555
|
+
--highlight-background: var(--wheel-highlight-background);
|
|
556
|
+
--highlight-border-radius: var(--wheel-highlight-border-radius);
|
|
557
|
+
--fade-background-rgb: var(--wheel-fade-background-rgb);
|
|
558
|
+
}
|
|
559
|
+
|
|
565
560
|
/**
|
|
566
561
|
* Convert a font size to a dynamic font size.
|
|
567
562
|
* Fonts that participate in Dynamic Type should use
|
|
@@ -13,7 +13,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
13
13
|
});
|
|
14
14
|
test('should switch the calendar header when moving to a month with a different number of days', async ({ page, }) => {
|
|
15
15
|
const monthYearToggle = page.locator('ion-datetime .calendar-month-year');
|
|
16
|
-
const monthColumnItems = page.locator('ion-datetime .month-column
|
|
16
|
+
const monthColumnItems = page.locator('ion-datetime .month-column ion-picker-column-option');
|
|
17
17
|
await expect(monthYearToggle).toContainText('January 2022');
|
|
18
18
|
await monthYearToggle.click();
|
|
19
19
|
await page.waitForChanges();
|
|
@@ -24,7 +24,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
24
24
|
});
|
|
25
25
|
test('should adjust the selected day when moving to a month with a different number of days', async ({ page }) => {
|
|
26
26
|
const monthYearToggle = page.locator('ion-datetime .calendar-month-year');
|
|
27
|
-
const monthColumnItems = page.locator('ion-datetime .month-column
|
|
27
|
+
const monthColumnItems = page.locator('ion-datetime .month-column ion-picker-column-option');
|
|
28
28
|
const datetime = page.locator('ion-datetime');
|
|
29
29
|
const ionChange = await page.spyOnEvent('ionChange');
|
|
30
30
|
await monthYearToggle.click();
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
import { h } from "@stencil/core";
|
|
5
5
|
import { newSpecPage } from "@stencil/core/testing";
|
|
6
6
|
import { Datetime } from "../../../datetime/datetime";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { PickerColumn } from "../../../picker-column/picker-column";
|
|
8
|
+
import { Picker } from "../../../picker/picker";
|
|
9
9
|
describe('ion-datetime disabled', () => {
|
|
10
10
|
beforeEach(() => {
|
|
11
11
|
// IntersectionObserver isn't available in test environment
|
|
@@ -19,12 +19,12 @@ describe('ion-datetime disabled', () => {
|
|
|
19
19
|
});
|
|
20
20
|
it('picker should be disabled in prefer wheel mode', async () => {
|
|
21
21
|
const page = await newSpecPage({
|
|
22
|
-
components: [Datetime,
|
|
22
|
+
components: [Datetime, PickerColumn, Picker],
|
|
23
23
|
template: () => (h("ion-datetime", { id: "inline-datetime-wheel", disabled: true, "prefer-wheel": true, value: "2022-04-21T00:00:00" })),
|
|
24
24
|
});
|
|
25
25
|
await page.waitForChanges();
|
|
26
26
|
const datetime = page.body.querySelector('ion-datetime');
|
|
27
|
-
const columns = datetime.shadowRoot.querySelectorAll('ion-picker-column
|
|
27
|
+
const columns = datetime.shadowRoot.querySelectorAll('ion-picker-column');
|
|
28
28
|
await expect(columns.length).toEqual(4);
|
|
29
29
|
columns.forEach((column) => {
|
|
30
30
|
expect(column.disabled).toBe(true);
|
|
@@ -85,10 +85,10 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
|
|
|
85
85
|
});
|
|
86
86
|
test('should correctly localize year column data', async ({ page }) => {
|
|
87
87
|
await page.setContent(`
|
|
88
|
-
<ion-datetime prefer-wheel="true" locale="ar-EG" presentation="date" value="2022-01-01"></ion-datetime>
|
|
88
|
+
<ion-datetime prefer-wheel="true" locale="ar-EG" presentation="date" value="2022-01-01" max="2022" min="2022"></ion-datetime>
|
|
89
89
|
`, config);
|
|
90
90
|
await page.waitForSelector('.datetime-ready');
|
|
91
|
-
const datetimeYear = page.locator('ion-datetime .year-column
|
|
91
|
+
const datetimeYear = page.locator('ion-datetime .year-column ion-picker-column-option').nth(0);
|
|
92
92
|
await expect(datetimeYear).toHaveText('٢٠٢٢');
|
|
93
93
|
});
|
|
94
94
|
});
|
|
@@ -81,8 +81,8 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
|
|
|
81
81
|
const ionPopoverDidPresent = await page.spyOnEvent('ionPopoverDidPresent');
|
|
82
82
|
await page.click('.time-body');
|
|
83
83
|
await ionPopoverDidPresent.next();
|
|
84
|
-
const hours = page.locator('ion-popover ion-picker-column
|
|
85
|
-
const minutes = page.locator('ion-popover ion-picker-column
|
|
84
|
+
const hours = page.locator('ion-popover ion-picker-column:nth-child(1) ion-picker-column-option');
|
|
85
|
+
const minutes = page.locator('ion-popover ion-picker-column:nth-child(2) ion-picker-column-option');
|
|
86
86
|
expect(await hours.count()).toBe(12);
|
|
87
87
|
expect(await minutes.count()).toBe(60);
|
|
88
88
|
});
|
|
@@ -159,7 +159,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
|
|
|
159
159
|
value="2022-04-25T08:30:00"
|
|
160
160
|
></ion-datetime>
|
|
161
161
|
`, config);
|
|
162
|
-
const hourPickerItems = page.locator('ion-datetime ion-picker-column
|
|
162
|
+
const hourPickerItems = page.locator('ion-datetime ion-picker-column:first-of-type ion-picker-column-option');
|
|
163
163
|
await expect(hourPickerItems).toHaveText(['8', '9', '10', '11']);
|
|
164
164
|
});
|
|
165
165
|
test('should include 12PM when minimum is greater than 12', async ({ page }) => {
|
|
@@ -175,7 +175,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
|
|
|
175
175
|
value="2022-07-29T12:00:00"
|
|
176
176
|
></ion-datetime>
|
|
177
177
|
`, config);
|
|
178
|
-
const hourPickerItems = page.locator('ion-datetime ion-picker-column
|
|
178
|
+
const hourPickerItems = page.locator('ion-datetime ion-picker-column:first-of-type ion-picker-column-option');
|
|
179
179
|
await expect(hourPickerItems).toHaveText(['12', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11']);
|
|
180
180
|
});
|
|
181
181
|
test.describe('minmax value adjustment when out of bounds', () => {
|
|
@@ -218,7 +218,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
|
|
|
218
218
|
></ion-datetime>
|
|
219
219
|
`, config);
|
|
220
220
|
const datetime = page.locator('ion-datetime');
|
|
221
|
-
const monthColumnItems = page.locator('ion-datetime .month-column
|
|
221
|
+
const monthColumnItems = page.locator('ion-datetime .month-column ion-picker-column-option');
|
|
222
222
|
const ionChange = await page.spyOnEvent('ionChange');
|
|
223
223
|
await page.waitForSelector('.datetime-ready');
|
|
224
224
|
await monthColumnItems.nth(0).click(); // switch to January
|
|
@@ -258,7 +258,7 @@ configs({ directions: ['ltr'], modes: ['ios'] }).forEach(({ title, config }) =>
|
|
|
258
258
|
const timeButton = page.locator('ion-datetime .time-body');
|
|
259
259
|
await timeButton.click();
|
|
260
260
|
await ionPopoverDidPresent.next();
|
|
261
|
-
const hours = page.locator('ion-popover ion-picker-column
|
|
261
|
+
const hours = page.locator('ion-popover ion-picker-column:nth-child(1) ion-picker-column-option');
|
|
262
262
|
await expect(await hours.count()).toBe(4);
|
|
263
263
|
});
|
|
264
264
|
});
|
|
@@ -60,7 +60,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
60
60
|
<ion-datetime presentation="date" prefer-wheel="true" min="2019-05-05" max="2023-10-01" value="2019-05-30"></ion-datetime>
|
|
61
61
|
`, config);
|
|
62
62
|
await page.waitForSelector('.datetime-ready');
|
|
63
|
-
const dayValues = page.locator('ion-datetime .day-column
|
|
63
|
+
const dayValues = page.locator('ion-datetime .day-column ion-picker-column-option');
|
|
64
64
|
expect(await dayValues.count()).toEqual(27);
|
|
65
65
|
});
|
|
66
66
|
test('should respect the max bounds', async ({ page }) => {
|
|
@@ -68,7 +68,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
68
68
|
<ion-datetime presentation="date" prefer-wheel="true" min="2019-05-05" max="2023-10-01" value="2023-10-01"></ion-datetime>
|
|
69
69
|
`, config);
|
|
70
70
|
await page.waitForSelector('.datetime-ready');
|
|
71
|
-
const dayValues = page.locator('ion-datetime .day-column
|
|
71
|
+
const dayValues = page.locator('ion-datetime .day-column ion-picker-column-option');
|
|
72
72
|
expect(await dayValues.count()).toEqual(1);
|
|
73
73
|
});
|
|
74
74
|
test('should respect isDateEnabled preference', async ({ page }) => {
|
|
@@ -86,9 +86,9 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
86
86
|
</script>
|
|
87
87
|
`, config);
|
|
88
88
|
await page.waitForSelector('.datetime-ready');
|
|
89
|
-
const disabledMonths = page.locator('.month-column
|
|
90
|
-
const disabledYears = page.locator('.year-column
|
|
91
|
-
const disabledDays = page.locator('.day-column
|
|
89
|
+
const disabledMonths = page.locator('.month-column ion-picker-column-option.option-disabled');
|
|
90
|
+
const disabledYears = page.locator('.year-column ion-picker-column-option.option-disabled');
|
|
91
|
+
const disabledDays = page.locator('.day-column ion-picker-column-option.option-disabled');
|
|
92
92
|
expect(await disabledMonths.count()).toBe(0);
|
|
93
93
|
expect(await disabledYears.count()).toBe(0);
|
|
94
94
|
expect(await disabledDays.count()).toBe(15);
|
|
@@ -105,9 +105,9 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
105
105
|
></ion-datetime>
|
|
106
106
|
`, config);
|
|
107
107
|
await page.waitForSelector('.datetime-ready');
|
|
108
|
-
const monthValues = page.locator('.month-column
|
|
109
|
-
const yearValues = page.locator('.year-column
|
|
110
|
-
const dayValues = page.locator('.day-column
|
|
108
|
+
const monthValues = page.locator('.month-column ion-picker-column-option');
|
|
109
|
+
const yearValues = page.locator('.year-column ion-picker-column-option');
|
|
110
|
+
const dayValues = page.locator('.day-column ion-picker-column-option');
|
|
111
111
|
expect(await monthValues.count()).toBe(2);
|
|
112
112
|
expect(await yearValues.count()).toBe(3);
|
|
113
113
|
expect(await dayValues.count()).toBe(5);
|
|
@@ -134,7 +134,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
134
134
|
`, config);
|
|
135
135
|
await page.waitForSelector('.datetime-ready');
|
|
136
136
|
const ionChange = await page.spyOnEvent('ionChange');
|
|
137
|
-
const monthValues = page.locator('.month-column
|
|
137
|
+
const monthValues = page.locator('.month-column ion-picker-column-option');
|
|
138
138
|
// Change month value
|
|
139
139
|
await monthValues.nth(0).click();
|
|
140
140
|
await ionChange.next();
|
|
@@ -161,7 +161,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
161
161
|
`, config);
|
|
162
162
|
await page.waitForSelector('.datetime-ready');
|
|
163
163
|
const ionChange = await page.spyOnEvent('ionChange');
|
|
164
|
-
const dayValues = page.locator('.day-column
|
|
164
|
+
const dayValues = page.locator('.day-column ion-picker-column-option');
|
|
165
165
|
// Change day value
|
|
166
166
|
await dayValues.nth(0).click();
|
|
167
167
|
await ionChange.next();
|
|
@@ -175,7 +175,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
175
175
|
`, config);
|
|
176
176
|
await page.waitForSelector('.datetime-ready');
|
|
177
177
|
const ionChange = await page.spyOnEvent('ionChange');
|
|
178
|
-
const yearValues = page.locator('.year-column
|
|
178
|
+
const yearValues = page.locator('.year-column ion-picker-column-option');
|
|
179
179
|
/**
|
|
180
180
|
* Change year value
|
|
181
181
|
* The 0th index is the current
|
|
@@ -192,9 +192,9 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
192
192
|
const datetime = page.locator('ion-datetime');
|
|
193
193
|
await datetime.evaluate((el) => (el.value = '2021-05-25T12:40:00.000Z'));
|
|
194
194
|
await page.waitForChanges();
|
|
195
|
-
const selectedMonth = datetime.locator('.month-column
|
|
196
|
-
const selectedDay = datetime.locator('.day-column
|
|
197
|
-
const selectedYear = datetime.locator('.year-column
|
|
195
|
+
const selectedMonth = datetime.locator('.month-column ion-picker-column-option.option-active');
|
|
196
|
+
const selectedDay = datetime.locator('.day-column ion-picker-column-option.option-active');
|
|
197
|
+
const selectedYear = datetime.locator('.year-column ion-picker-column-option.option-active');
|
|
198
198
|
await expect(selectedMonth).toHaveText(/May/);
|
|
199
199
|
await expect(selectedDay).toHaveText(/25/);
|
|
200
200
|
await expect(selectedYear).toHaveText(/2021/);
|
|
@@ -213,8 +213,8 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
213
213
|
></ion-datetime>
|
|
214
214
|
`, config);
|
|
215
215
|
await page.waitForSelector('.datetime-ready');
|
|
216
|
-
const monthValues = page.locator('.month-column
|
|
217
|
-
const dayValues = page.locator('.day-column
|
|
216
|
+
const monthValues = page.locator('.month-column ion-picker-column-option');
|
|
217
|
+
const dayValues = page.locator('.day-column ion-picker-column-option');
|
|
218
218
|
await expect(monthValues).toHaveText(['1月', '2月', '3月']);
|
|
219
219
|
await expect(dayValues).toHaveText(['1日', '2日', '3日']);
|
|
220
220
|
});
|
|
@@ -228,7 +228,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
228
228
|
></ion-datetime>
|
|
229
229
|
`, config);
|
|
230
230
|
await page.waitForSelector('.datetime-ready');
|
|
231
|
-
const columns = page.locator('ion-picker-column
|
|
231
|
+
const columns = page.locator('ion-picker-column');
|
|
232
232
|
await expect(columns.nth(0)).toHaveClass(/month-column/);
|
|
233
233
|
await expect(columns.nth(1)).toHaveClass(/day-column/);
|
|
234
234
|
await expect(columns.nth(2)).toHaveClass(/year-column/);
|
|
@@ -243,7 +243,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
243
243
|
></ion-datetime>
|
|
244
244
|
`, config);
|
|
245
245
|
await page.waitForSelector('.datetime-ready');
|
|
246
|
-
const columns = page.locator('ion-picker-column
|
|
246
|
+
const columns = page.locator('ion-picker-column');
|
|
247
247
|
await expect(columns.nth(0)).toHaveClass(/day-column/);
|
|
248
248
|
await expect(columns.nth(1)).toHaveClass(/month-column/);
|
|
249
249
|
await expect(columns.nth(2)).toHaveClass(/year-column/);
|
|
@@ -256,7 +256,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
256
256
|
<ion-datetime presentation="date-time" prefer-wheel="true" min="2019-05-05" value="2019-05-10T16:30:00"></ion-datetime>
|
|
257
257
|
`, config);
|
|
258
258
|
await page.waitForSelector('.datetime-ready');
|
|
259
|
-
const dayValues = page.locator('ion-datetime .date-column
|
|
259
|
+
const dayValues = page.locator('ion-datetime .date-column ion-picker-column-option');
|
|
260
260
|
expect(await dayValues.count()).toEqual(57);
|
|
261
261
|
});
|
|
262
262
|
test('should respect the max bounds', async ({ page }) => {
|
|
@@ -264,7 +264,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
264
264
|
<ion-datetime presentation="date-time" prefer-wheel="true" max="2023-06-10" value="2023-06-05T16:30:00"></ion-datetime>
|
|
265
265
|
`, config);
|
|
266
266
|
await page.waitForSelector('.datetime-ready');
|
|
267
|
-
const dayValues = page.locator('ion-datetime .date-column
|
|
267
|
+
const dayValues = page.locator('ion-datetime .date-column ion-picker-column-option');
|
|
268
268
|
expect(await dayValues.count()).toEqual(41);
|
|
269
269
|
});
|
|
270
270
|
test('should respect isDateEnabled preference', async ({ page }) => {
|
|
@@ -282,7 +282,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
282
282
|
</script>
|
|
283
283
|
`, config);
|
|
284
284
|
await page.waitForSelector('.datetime-ready');
|
|
285
|
-
const disabledDates = page.locator('.date-column
|
|
285
|
+
const disabledDates = page.locator('.date-column ion-picker-column-option.option-disabled');
|
|
286
286
|
expect(await disabledDates.count()).toBe(44);
|
|
287
287
|
});
|
|
288
288
|
test('should respect month, day, and year preferences', async ({ page }) => {
|
|
@@ -297,7 +297,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
297
297
|
></ion-datetime>
|
|
298
298
|
`, config);
|
|
299
299
|
await page.waitForSelector('.datetime-ready');
|
|
300
|
-
const dateValues = page.locator('.date-column
|
|
300
|
+
const dateValues = page.locator('.date-column ion-picker-column-option');
|
|
301
301
|
expect(await dateValues.count()).toBe(5);
|
|
302
302
|
});
|
|
303
303
|
test('should correctly localize the date data', async ({ page }) => {
|
|
@@ -312,7 +312,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
312
312
|
></ion-datetime>
|
|
313
313
|
`, config);
|
|
314
314
|
await page.waitForSelector('.datetime-ready');
|
|
315
|
-
const dateValues = page.locator('.date-column
|
|
315
|
+
const dateValues = page.locator('.date-column ion-picker-column-option');
|
|
316
316
|
await expect(dateValues).toHaveText(['2月1日(火)', '2月2日(水)', '2月3日(木)']);
|
|
317
317
|
});
|
|
318
318
|
test('should respect min and max bounds even across years', async ({ page }) => {
|
|
@@ -327,15 +327,16 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
327
327
|
`, config);
|
|
328
328
|
await page.waitForSelector('.datetime-ready');
|
|
329
329
|
const dateColumn = page.locator('.date-column');
|
|
330
|
-
const
|
|
330
|
+
const dateColumnScrollEl = dateColumn.locator('.picker-opts');
|
|
331
|
+
const dateValues = dateColumn.locator('ion-picker-column-option');
|
|
331
332
|
expect(await dateValues.count()).toBe(90);
|
|
332
333
|
/**
|
|
333
334
|
* Select 1st item to change the dates rendered
|
|
334
335
|
*/
|
|
335
|
-
await expect(dateValues.nth(0)).
|
|
336
|
-
await
|
|
336
|
+
await expect(dateValues.nth(0)).toHaveJSProperty('value', '2022-1-1');
|
|
337
|
+
await dateColumnScrollEl.evaluate((el) => (el.scrollTop = 0));
|
|
337
338
|
await page.waitForChanges();
|
|
338
|
-
await expect(dateValues.nth(0)).
|
|
339
|
+
await expect(dateValues.nth(0)).toHaveJSProperty('value', '2021-12-1');
|
|
339
340
|
});
|
|
340
341
|
test('should keep sliding window if default window is within min and max constraints', async ({ page }) => {
|
|
341
342
|
await page.setContent(`
|
|
@@ -348,7 +349,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
348
349
|
></ion-datetime>
|
|
349
350
|
`, config);
|
|
350
351
|
await page.waitForSelector('.datetime-ready');
|
|
351
|
-
const dayValues = page.locator('.date-column
|
|
352
|
+
const dayValues = page.locator('.date-column ion-picker-column-option');
|
|
352
353
|
expect(await dayValues.count()).toBe(92);
|
|
353
354
|
});
|
|
354
355
|
test('should narrow sliding window if default window is not within min and max constraints', async ({ page }) => {
|
|
@@ -362,7 +363,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
362
363
|
></ion-datetime>
|
|
363
364
|
`, config);
|
|
364
365
|
await page.waitForSelector('.datetime-ready');
|
|
365
|
-
const dayValues = page.locator('.date-column
|
|
366
|
+
const dayValues = page.locator('.date-column ion-picker-column-option');
|
|
366
367
|
expect(await dayValues.count()).toBe(15);
|
|
367
368
|
});
|
|
368
369
|
test('selecting date should update value when no value is set', async ({ page }) => {
|
|
@@ -374,7 +375,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
374
375
|
`, config);
|
|
375
376
|
await page.waitForSelector('.datetime-ready');
|
|
376
377
|
const ionChange = await page.spyOnEvent('ionChange');
|
|
377
|
-
const dayValues = page.locator('.date-column
|
|
378
|
+
const dayValues = page.locator('.date-column ion-picker-column-option');
|
|
378
379
|
// Change day/month value
|
|
379
380
|
await dayValues.nth(0).click();
|
|
380
381
|
await ionChange.next();
|
|
@@ -386,7 +387,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
386
387
|
<ion-datetime presentation="time-date" prefer-wheel="true" min="2019-05-05" value="2019-05-10T16:30:00"></ion-datetime>
|
|
387
388
|
`, config);
|
|
388
389
|
await page.waitForSelector('.datetime-ready');
|
|
389
|
-
const dayValues = page.locator('ion-datetime .date-column
|
|
390
|
+
const dayValues = page.locator('ion-datetime .date-column ion-picker-column-option');
|
|
390
391
|
expect(await dayValues.count()).toEqual(57);
|
|
391
392
|
});
|
|
392
393
|
test('should respect the max bounds', async ({ page }) => {
|
|
@@ -394,7 +395,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
394
395
|
<ion-datetime presentation="time-date" prefer-wheel="true" max="2023-06-10" value="2023-06-05T16:30:00"></ion-datetime>
|
|
395
396
|
`, config);
|
|
396
397
|
await page.waitForSelector('.datetime-ready');
|
|
397
|
-
const dayValues = page.locator('ion-datetime .date-column
|
|
398
|
+
const dayValues = page.locator('ion-datetime .date-column ion-picker-column-option');
|
|
398
399
|
expect(await dayValues.count()).toEqual(41);
|
|
399
400
|
});
|
|
400
401
|
test('should respect isDateEnabled preference', async ({ page }) => {
|
|
@@ -412,7 +413,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
412
413
|
</script>
|
|
413
414
|
`, config);
|
|
414
415
|
await page.waitForSelector('.datetime-ready');
|
|
415
|
-
const disabledDates = page.locator('.date-column
|
|
416
|
+
const disabledDates = page.locator('.date-column ion-picker-column-option.option-disabled');
|
|
416
417
|
expect(await disabledDates.count()).toBe(44);
|
|
417
418
|
});
|
|
418
419
|
test('should respect month, day, and year preferences', async ({ page }) => {
|
|
@@ -427,7 +428,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
427
428
|
></ion-datetime>
|
|
428
429
|
`, config);
|
|
429
430
|
await page.waitForSelector('.datetime-ready');
|
|
430
|
-
const dateValues = page.locator('.date-column
|
|
431
|
+
const dateValues = page.locator('.date-column ion-picker-column-option');
|
|
431
432
|
expect(await dateValues.count()).toBe(5);
|
|
432
433
|
});
|
|
433
434
|
test('should correctly localize the date data', async ({ page }) => {
|
|
@@ -442,7 +443,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
442
443
|
></ion-datetime>
|
|
443
444
|
`, config);
|
|
444
445
|
await page.waitForSelector('.datetime-ready');
|
|
445
|
-
const dateValues = page.locator('.date-column
|
|
446
|
+
const dateValues = page.locator('.date-column ion-picker-column-option');
|
|
446
447
|
await expect(dateValues).toHaveText(['2月1日(火)', '2月2日(水)', '2月3日(木)']);
|
|
447
448
|
});
|
|
448
449
|
test('should respect min and max bounds even across years', async ({ page }) => {
|
|
@@ -457,15 +458,16 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
457
458
|
`, config);
|
|
458
459
|
await page.waitForSelector('.datetime-ready');
|
|
459
460
|
const dateColumn = page.locator('.date-column');
|
|
460
|
-
const
|
|
461
|
+
const dateColumnScrollEl = dateColumn.locator('.picker-opts');
|
|
462
|
+
const dateValues = dateColumn.locator('ion-picker-column-option');
|
|
461
463
|
expect(await dateValues.count()).toBe(90);
|
|
462
464
|
/**
|
|
463
465
|
* Select 1st item to change the dates rendered
|
|
464
466
|
*/
|
|
465
|
-
await expect(dateValues.nth(0)).
|
|
466
|
-
await
|
|
467
|
+
await expect(dateValues.nth(0)).toHaveJSProperty('value', '2022-1-1');
|
|
468
|
+
await dateColumnScrollEl.evaluate((el) => (el.scrollTop = 0));
|
|
467
469
|
await page.waitForChanges();
|
|
468
|
-
await expect(dateValues.nth(0)).
|
|
470
|
+
await expect(dateValues.nth(0)).toHaveJSProperty('value', '2021-12-1');
|
|
469
471
|
});
|
|
470
472
|
test('should keep sliding window if default window is within min and max constraints', async ({ page }) => {
|
|
471
473
|
await page.setContent(`
|
|
@@ -478,7 +480,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
478
480
|
></ion-datetime>
|
|
479
481
|
`, config);
|
|
480
482
|
await page.waitForSelector('.datetime-ready');
|
|
481
|
-
const dayValues = page.locator('.date-column
|
|
483
|
+
const dayValues = page.locator('.date-column ion-picker-column-option');
|
|
482
484
|
expect(await dayValues.count()).toBe(92);
|
|
483
485
|
});
|
|
484
486
|
test('should narrow sliding window if default window is not within min and max constraints', async ({ page }) => {
|
|
@@ -492,7 +494,7 @@ configs({ modes: ['md'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
|
492
494
|
></ion-datetime>
|
|
493
495
|
`, config);
|
|
494
496
|
await page.waitForSelector('.datetime-ready');
|
|
495
|
-
const dayValues = page.locator('.date-column
|
|
497
|
+
const dayValues = page.locator('.date-column ion-picker-column-option');
|
|
496
498
|
expect(await dayValues.count()).toBe(15);
|
|
497
499
|
});
|
|
498
500
|
});
|
|
@@ -161,7 +161,7 @@ class TimePickerFixture {
|
|
|
161
161
|
await this.page.waitForChanges();
|
|
162
162
|
}
|
|
163
163
|
async expectTime(hour, minute, ampm) {
|
|
164
|
-
const pickerColumns = this.timePicker.locator('ion-picker-column
|
|
164
|
+
const pickerColumns = this.timePicker.locator('ion-picker-column');
|
|
165
165
|
await expect(pickerColumns.nth(0)).toHaveJSProperty('value', hour);
|
|
166
166
|
await expect(pickerColumns.nth(1)).toHaveJSProperty('value', minute);
|
|
167
167
|
await expect(pickerColumns.nth(2)).toHaveJSProperty('value', ampm);
|
|
@@ -34,7 +34,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree
|
|
|
34
34
|
await expect(calendarMonthYear).toHaveText('February 2022');
|
|
35
35
|
await calendarMonthYear.click();
|
|
36
36
|
await page.waitForChanges();
|
|
37
|
-
await page.locator('.month-column
|
|
37
|
+
await page.locator('.month-column ion-picker-column-option').nth(2).click();
|
|
38
38
|
await page.waitForChanges();
|
|
39
39
|
await expect(calendarMonthYear).toHaveText('March 2022');
|
|
40
40
|
await expect(ionChange).not.toHaveReceivedEvent();
|
|
@@ -53,7 +53,7 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config, scree
|
|
|
53
53
|
await page.waitForChanges();
|
|
54
54
|
await page.keyboard.press('Enter');
|
|
55
55
|
await page.waitForChanges();
|
|
56
|
-
const marchPickerItem = page.locator('.month-column
|
|
56
|
+
const marchPickerItem = page.locator('.month-column ion-picker-column-option').nth(2);
|
|
57
57
|
await expect(marchPickerItem).toBeVisible();
|
|
58
58
|
});
|
|
59
59
|
test('should view next month via next button', async ({ page }) => {
|