voyager-ionic-core 7.6.0 → 7.6.1
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/data.js +64 -14
- package/components/ion-datetime.js +22 -3
- package/components/ion-input.js +21 -2
- package/components/ion-menu.js +2 -2
- package/components/ion-split-pane.js +2 -2
- package/components/ion-textarea.js +25 -2
- package/css/core.css +0 -8
- package/css/core.css.map +1 -1
- package/css/ionic.bundle.css +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/dist/cjs/{app-globals-0af482c7.js → app-globals-7def22c8.js} +1 -1
- package/dist/cjs/{button-active-a5185907.js → button-active-962fe442.js} +1 -1
- package/dist/cjs/{data-36b9094e.js → data-a5109f09.js} +64 -14
- package/dist/cjs/{index-f8f13389.js → index-17ab7794.js} +3 -3
- package/dist/cjs/{index-ce101dc9.js → index-3b012034.js} +1 -1
- package/dist/cjs/{index-bbb4336c.js → index-50dcfe2f.js} +21 -8
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/ion-accordion_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-action-sheet.cjs.entry.js +4 -4
- package/dist/cjs/ion-alert.cjs.entry.js +4 -4
- package/dist/cjs/ion-app_8.cjs.entry.js +4 -4
- 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 +3 -3
- package/dist/cjs/ion-datetime_3.cjs.entry.js +26 -7
- 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 +23 -4
- package/dist/cjs/ion-item-option_3.cjs.entry.js +2 -2
- package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
- package/dist/cjs/ion-loading.cjs.entry.js +3 -3
- package/dist/cjs/ion-menu_3.cjs.entry.js +6 -6
- package/dist/cjs/ion-modal.cjs.entry.js +4 -4
- 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 +4 -4
- 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 +3 -3
- package/dist/cjs/ion-spinner.cjs.entry.js +2 -2
- package/dist/cjs/ion-split-pane.cjs.entry.js +4 -4
- 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 +27 -4
- package/dist/cjs/ion-toast.cjs.entry.js +3 -3
- package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
- package/dist/cjs/{ionic-global-f4a2093b.js → ionic-global-a4edbf03.js} +1 -1
- package/dist/cjs/ionic.cjs.js +4 -4
- package/dist/cjs/{ios.transition-6787b799.js → ios.transition-b5353f3e.js} +2 -2
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{md.transition-e033d20a.js → md.transition-67157dd9.js} +2 -2
- package/dist/cjs/{overlays-27a6fb16.js → overlays-e77cc023.js} +1 -1
- package/dist/cjs/{status-tap-415acac6.js → status-tap-b5d77c08.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/datetime/datetime.js +22 -3
- package/dist/collection/components/datetime/test/manipulation.spec.js +133 -1
- package/dist/collection/components/datetime/test/prefer-wheel/datetime.spec.js +27 -0
- package/dist/collection/components/datetime/utils/manipulation.js +65 -15
- package/dist/collection/components/input/input.js +21 -2
- package/dist/collection/components/input/test/clear-on-edit/input.e2e.js +28 -8
- package/dist/collection/components/menu/menu.ios.css +3 -4
- package/dist/collection/components/menu/menu.md.css +3 -4
- package/dist/collection/components/menu/test/custom/menu.e2e.js +61 -0
- package/dist/collection/components/radio/test/a11y/radio.e2e.js +2 -1
- package/dist/collection/components/split-pane/split-pane.ios.css +1 -2
- package/dist/collection/components/split-pane/split-pane.md.css +1 -2
- package/dist/collection/components/textarea/test/clear-on-edit/textarea.e2e.js +36 -0
- package/dist/collection/components/textarea/textarea.js +25 -2
- package/dist/docs.json +2 -2
- package/dist/esm/{app-globals-722340c4.js → app-globals-8c62bec2.js} +1 -1
- package/dist/esm/{button-active-c6ee4f50.js → button-active-308d3edd.js} +1 -1
- package/dist/esm/{data-f5c75b4e.js → data-775093f5.js} +64 -14
- package/dist/esm/{index-0c12c22b.js → index-1193f005.js} +1 -1
- package/dist/esm/{index-1932b201.js → index-4743453d.js} +3 -3
- package/dist/esm/{index-08d686eb.js → index-b7d870cf.js} +21 -8
- package/dist/esm/index.js +7 -7
- package/dist/esm/ion-accordion_2.entry.js +2 -2
- package/dist/esm/ion-action-sheet.entry.js +4 -4
- package/dist/esm/ion-alert.entry.js +4 -4
- package/dist/esm/ion-app_8.entry.js +4 -4
- 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 +3 -3
- package/dist/esm/ion-datetime_3.entry.js +26 -7
- 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 +23 -4
- package/dist/esm/ion-item-option_3.entry.js +2 -2
- package/dist/esm/ion-item_8.entry.js +2 -2
- package/dist/esm/ion-loading.entry.js +3 -3
- package/dist/esm/ion-menu_3.entry.js +6 -6
- package/dist/esm/ion-modal.entry.js +4 -4
- 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 +4 -4
- 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 +3 -3
- package/dist/esm/ion-spinner.entry.js +2 -2
- package/dist/esm/ion-split-pane.entry.js +4 -4
- 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 +27 -4
- package/dist/esm/ion-toast.entry.js +3 -3
- package/dist/esm/ion-toggle.entry.js +2 -2
- package/dist/esm/{ionic-global-c0cda98e.js → ionic-global-1f99b929.js} +1 -1
- package/dist/esm/ionic.js +5 -5
- package/dist/esm/{ios.transition-802a84a6.js → ios.transition-3376ccb2.js} +2 -2
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{md.transition-43c2874d.js → md.transition-f992779f.js} +2 -2
- package/dist/esm/{overlays-32ef481d.js → overlays-b33f6bca.js} +1 -1
- package/dist/esm/{status-tap-2b93b1b5.js → status-tap-16fd8f3d.js} +1 -1
- package/dist/esm-es5/app-globals-8c62bec2.js +4 -0
- package/dist/esm-es5/{button-active-c6ee4f50.js → button-active-308d3edd.js} +1 -1
- package/dist/esm-es5/data-775093f5.js +4 -0
- package/dist/esm-es5/{index-0c12c22b.js → index-1193f005.js} +1 -1
- package/dist/esm-es5/{index-1932b201.js → index-4743453d.js} +1 -1
- package/dist/esm-es5/index-b7d870cf.js +5 -0
- 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-c0cda98e.js → ionic-global-1f99b929.js} +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/{ios.transition-802a84a6.js → ios.transition-3376ccb2.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/md.transition-f992779f.js +4 -0
- package/dist/esm-es5/{overlays-32ef481d.js → overlays-b33f6bca.js} +1 -1
- package/dist/esm-es5/{status-tap-2b93b1b5.js → status-tap-16fd8f3d.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-f70970cf.js → p-0235067a.js} +1 -1
- package/dist/ionic/{p-cdbeaadc.js → p-04377cfa.js} +1 -1
- package/dist/ionic/{p-f656e032.system.entry.js → p-043aa6cc.system.entry.js} +1 -1
- package/dist/ionic/{p-c3c3333a.js → p-0509fd34.js} +1 -1
- package/dist/ionic/{p-765f4dde.entry.js → p-0550f802.entry.js} +1 -1
- package/dist/ionic/{p-8acae6b0.system.entry.js → p-06abe918.system.entry.js} +1 -1
- package/dist/ionic/{p-5e745192.system.js → p-0aa78a8d.system.js} +1 -1
- package/dist/ionic/{p-9f6ee2c0.system.entry.js → p-0dfa4ab4.system.entry.js} +2 -2
- package/dist/ionic/{p-b56d0866.system.entry.js → p-0ebc87b7.system.entry.js} +1 -1
- package/dist/ionic/{p-a0bb7b92.system.entry.js → p-10ec9af7.system.entry.js} +1 -1
- package/dist/ionic/{p-0add7211.entry.js → p-11786dc7.entry.js} +1 -1
- package/dist/ionic/{p-3dd98a73.entry.js → p-11a3973f.entry.js} +1 -1
- package/dist/ionic/{p-b4a51c42.system.js → p-1501b945.system.js} +1 -1
- package/dist/ionic/{p-6f8dbe92.system.entry.js → p-158efe8d.system.entry.js} +1 -1
- package/dist/ionic/{p-dc6af8e9.entry.js → p-164aa69c.entry.js} +1 -1
- package/dist/ionic/{p-8804a472.system.entry.js → p-17d283b9.system.entry.js} +1 -1
- package/dist/ionic/p-18cae04f.js +4 -0
- package/dist/ionic/{p-e7ea9815.system.entry.js → p-19c379da.system.entry.js} +1 -1
- package/dist/ionic/{p-e3584231.system.js → p-19d9ceb8.system.js} +1 -1
- package/dist/ionic/{p-2d539df1.entry.js → p-1b27ac67.entry.js} +1 -1
- package/dist/ionic/{p-a3277a67.entry.js → p-1c249831.entry.js} +1 -1
- package/dist/ionic/{p-0e53f8ea.system.entry.js → p-20e0e75d.system.entry.js} +1 -1
- package/dist/ionic/{p-6de62649.system.entry.js → p-22827063.system.entry.js} +1 -1
- package/dist/ionic/{p-78aadecb.entry.js → p-26c4bf85.entry.js} +1 -1
- package/dist/ionic/{p-a1987850.entry.js → p-2894d5f6.entry.js} +1 -1
- package/dist/ionic/{p-9738fd82.js → p-290d3fe9.js} +1 -1
- package/dist/ionic/{p-3f5179b5.entry.js → p-2a583966.entry.js} +1 -1
- package/dist/ionic/{p-958d6ebe.system.entry.js → p-2ba9a9bd.system.entry.js} +2 -2
- package/dist/ionic/{p-28249b10.system.entry.js → p-2cf21a15.system.entry.js} +1 -1
- package/dist/ionic/p-2df97906.system.entry.js +4 -0
- package/dist/ionic/{p-1161a793.entry.js → p-3313c481.entry.js} +1 -1
- package/dist/ionic/{p-2938823a.system.entry.js → p-332ea4d3.system.entry.js} +1 -1
- package/dist/ionic/{p-a0d7bb5e.system.js → p-3671f1b9.system.js} +1 -1
- package/dist/ionic/p-38531958.system.entry.js +4 -0
- package/dist/ionic/{p-98f3d827.entry.js → p-3dfc522b.entry.js} +1 -1
- package/dist/ionic/{p-88fde0e0.entry.js → p-3e8d5e53.entry.js} +1 -1
- package/dist/ionic/{p-ef126ae8.system.entry.js → p-41208f54.system.entry.js} +1 -1
- package/dist/ionic/{p-caf21b46.system.entry.js → p-4489dd20.system.entry.js} +1 -1
- package/dist/ionic/{p-72f6ff89.js → p-44a56556.js} +1 -1
- package/dist/ionic/{p-353b349d.entry.js → p-44dc52e5.entry.js} +1 -1
- package/dist/ionic/{p-c9a21dfd.system.entry.js → p-4685218a.system.entry.js} +1 -1
- package/dist/ionic/{p-01d14eba.system.entry.js → p-469dd571.system.entry.js} +1 -1
- package/dist/ionic/{p-80fa068e.entry.js → p-47bb15a1.entry.js} +1 -1
- package/dist/ionic/{p-b7010c69.system.entry.js → p-4981ea0a.system.entry.js} +1 -1
- package/dist/ionic/{p-16756e94.system.entry.js → p-507ddbfe.system.entry.js} +1 -1
- package/dist/ionic/{p-8f5d30f5.entry.js → p-529b24fb.entry.js} +1 -1
- package/dist/ionic/p-52cfafe9.system.js +5 -0
- package/dist/ionic/{p-4155f352.system.js → p-5ad1fe3b.system.js} +1 -1
- package/dist/ionic/{p-d37b441e.entry.js → p-60959b71.entry.js} +1 -1
- package/dist/ionic/{p-28a2c2a2.entry.js → p-61e4d3ec.entry.js} +1 -1
- package/dist/ionic/{p-ada96dd0.system.entry.js → p-648ad047.system.entry.js} +1 -1
- package/dist/ionic/{p-51a087d6.entry.js → p-6855f26a.entry.js} +1 -1
- package/dist/ionic/{p-4fb51e61.system.entry.js → p-69641343.system.entry.js} +1 -1
- package/dist/ionic/{p-47b6ba5b.js → p-6ab03751.js} +1 -1
- package/dist/ionic/{p-517a9885.system.entry.js → p-6c277fa2.system.entry.js} +1 -1
- package/dist/ionic/{p-46d400b4.system.entry.js → p-6e0539ea.system.entry.js} +1 -1
- package/dist/ionic/{p-dee7c1d0.system.entry.js → p-6fba0ce1.system.entry.js} +1 -1
- package/dist/ionic/{p-9eec42cc.system.entry.js → p-745e3339.system.entry.js} +1 -1
- package/dist/ionic/{p-1b19c04b.entry.js → p-767f1a92.entry.js} +1 -1
- package/dist/ionic/p-7dc892f8.entry.js +4 -0
- package/dist/ionic/{p-5ecae037.js → p-7fae5c36.js} +1 -1
- package/dist/ionic/{p-b5f9f14c.entry.js → p-803efb5d.entry.js} +1 -1
- package/dist/ionic/{p-18ba8221.entry.js → p-806a9810.entry.js} +1 -1
- package/dist/ionic/{p-ea69616e.entry.js → p-84b567a6.entry.js} +1 -1
- package/dist/ionic/{p-b6f9d32a.entry.js → p-85f48531.entry.js} +1 -1
- package/dist/ionic/p-87bb3735.system.js +4 -0
- package/dist/ionic/{p-908475e7.system.entry.js → p-8f301ac5.system.entry.js} +1 -1
- package/dist/ionic/{p-cfe57b1b.entry.js → p-928ee57a.entry.js} +1 -1
- package/dist/ionic/p-932f2259.system.entry.js +4 -0
- package/dist/ionic/{p-953009b1.entry.js → p-93390f78.entry.js} +1 -1
- package/dist/ionic/p-950c05ad.entry.js +4 -0
- package/dist/ionic/{p-6ad34705.system.entry.js → p-96d4814f.system.entry.js} +1 -1
- package/dist/ionic/p-97174c1e.js +4 -0
- package/dist/ionic/{p-6de472cb.js → p-98f35d98.js} +1 -1
- package/dist/ionic/p-9a68d8ef.system.js +4 -0
- package/dist/ionic/{p-4233cc1e.system.entry.js → p-9ba72fdb.system.entry.js} +1 -1
- package/dist/ionic/{p-5b365ca7.system.js → p-9f94c72e.system.js} +1 -1
- package/dist/ionic/{p-1208f939.entry.js → p-9fb45814.entry.js} +1 -1
- package/dist/ionic/{p-3e6b47e8.system.entry.js → p-9fda6824.system.entry.js} +1 -1
- package/dist/ionic/{p-588fdf40.entry.js → p-a06501e3.entry.js} +1 -1
- package/dist/ionic/{p-31fcb233.system.js → p-a074be82.system.js} +1 -1
- package/dist/ionic/{p-17da5ed1.entry.js → p-a3013394.entry.js} +1 -1
- package/dist/ionic/{p-d032f825.system.entry.js → p-a42ef163.system.entry.js} +1 -1
- package/dist/ionic/{p-8314281e.system.js → p-a49931aa.system.js} +1 -1
- package/dist/ionic/{p-e6d68e02.system.entry.js → p-a821750c.system.entry.js} +1 -1
- package/dist/ionic/{p-5bebc7b3.system.entry.js → p-abd5d0d5.system.entry.js} +1 -1
- package/dist/ionic/{p-270e1a1d.entry.js → p-ade3cf46.entry.js} +1 -1
- package/dist/ionic/{p-6fbecbda.entry.js → p-ae4b7df8.entry.js} +1 -1
- package/dist/ionic/{p-a9978d08.entry.js → p-aee39e06.entry.js} +1 -1
- package/dist/ionic/{p-e24ce1e5.system.js → p-afa9f205.system.js} +1 -1
- package/dist/ionic/{p-c91ccbfa.system.entry.js → p-b7058a0e.system.entry.js} +1 -1
- package/dist/ionic/{p-feae5133.entry.js → p-b78e6a44.entry.js} +1 -1
- package/dist/ionic/{p-cce9f61a.system.entry.js → p-b7a2ffc9.system.entry.js} +1 -1
- package/dist/ionic/{p-b3b3efba.system.entry.js → p-b8a9e195.system.entry.js} +1 -1
- package/dist/ionic/{p-ddb30596.entry.js → p-b964aba3.entry.js} +1 -1
- package/dist/ionic/{p-6e70dd1a.system.entry.js → p-beeed22c.system.entry.js} +1 -1
- package/dist/ionic/{p-f8a5bb89.entry.js → p-c08fe2c0.entry.js} +1 -1
- package/dist/ionic/{p-4d67d27a.entry.js → p-c1701827.entry.js} +1 -1
- package/dist/ionic/{p-5eda1d7d.entry.js → p-c5acfeb1.entry.js} +1 -1
- package/dist/ionic/{p-9709ebd8.system.entry.js → p-cb8dff22.system.entry.js} +1 -1
- package/dist/ionic/{p-042e6f4b.entry.js → p-cd1b920b.entry.js} +1 -1
- package/dist/ionic/p-cd574dfa.js +4 -0
- package/dist/ionic/{p-3a45a82b.entry.js → p-cf235986.entry.js} +1 -1
- package/dist/ionic/{p-9b7f0b0f.entry.js → p-cf53213c.entry.js} +1 -1
- package/dist/ionic/{p-b6f5e4f2.system.entry.js → p-d93eed83.system.entry.js} +1 -1
- package/dist/ionic/{p-e94c392d.entry.js → p-da5e2652.entry.js} +1 -1
- package/dist/ionic/p-dc6d8647.entry.js +4 -0
- package/dist/ionic/{p-7d92bf15.system.entry.js → p-dc71e4ef.system.entry.js} +1 -1
- package/dist/ionic/{p-6577aea9.system.entry.js → p-ddd48faf.system.entry.js} +1 -1
- package/dist/ionic/p-e2903cdc.system.entry.js +4 -0
- package/dist/ionic/{p-2092f39f.entry.js → p-e33d1ebc.entry.js} +1 -1
- package/dist/ionic/{p-8d69a624.entry.js → p-ebe8bd8a.entry.js} +1 -1
- package/dist/ionic/{p-c847fb35.system.entry.js → p-f0504446.system.entry.js} +1 -1
- package/dist/ionic/{p-2d3b9fa3.system.entry.js → p-f434bcf3.system.entry.js} +1 -1
- package/dist/ionic/{p-33a37fad.system.js → p-f6e9c227.system.js} +1 -1
- package/dist/ionic/{p-251666e2.entry.js → p-f894e0ad.entry.js} +1 -1
- package/dist/types/components/datetime/utils/manipulation.d.ts +34 -7
- package/hydrate/index.js +172 -60
- package/package.json +3 -3
- package/dist/esm-es5/app-globals-722340c4.js +0 -4
- package/dist/esm-es5/data-f5c75b4e.js +0 -4
- package/dist/esm-es5/index-08d686eb.js +0 -5
- package/dist/esm-es5/md.transition-43c2874d.js +0 -4
- package/dist/ionic/p-1786bc72.js +0 -4
- package/dist/ionic/p-2aea8b1e.js +0 -4
- package/dist/ionic/p-350f7292.system.entry.js +0 -4
- package/dist/ionic/p-564af202.system.entry.js +0 -4
- package/dist/ionic/p-5e4eec2e.entry.js +0 -4
- package/dist/ionic/p-82e3d633.system.js +0 -4
- package/dist/ionic/p-91d33c4a.js +0 -4
- package/dist/ionic/p-9e447eb1.system.js +0 -4
- package/dist/ionic/p-a4afcc88.entry.js +0 -4
- package/dist/ionic/p-afd6ca9d.entry.js +0 -4
- package/dist/ionic/p-d3b030b8.system.js +0 -5
- package/dist/ionic/p-f0445d82.system.entry.js +0 -4
- package/dist/ionic/p-fba0a6e7.system.entry.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { getPreviousYear, getNextYear, getPreviousMonth, getNextMonth, getPreviousDay, getNextDay, getPreviousWeek, getNextWeek, getEndOfWeek, getStartOfWeek, convert12HourTo24Hour, getInternalHourValue, calculateHourFromAMPM, subtractDays, addDays, validateParts, } from "../utils/manipulation";
|
|
4
|
+
import { getPreviousYear, getNextYear, getPreviousMonth, getNextMonth, getPreviousDay, getNextDay, getPreviousWeek, getNextWeek, getEndOfWeek, getStartOfWeek, convert12HourTo24Hour, getInternalHourValue, calculateHourFromAMPM, subtractDays, addDays, validateParts, getClosestValidDate, } from "../utils/manipulation";
|
|
5
5
|
describe('addDays()', () => {
|
|
6
6
|
it('should correctly add days', () => {
|
|
7
7
|
expect(addDays({
|
|
@@ -431,3 +431,135 @@ describe('validateParts()', () => {
|
|
|
431
431
|
})).toEqual({ month: 1, day: 1, year: 2022, hour: 9, minute: 30 });
|
|
432
432
|
});
|
|
433
433
|
});
|
|
434
|
+
describe('getClosestValidDate()', () => {
|
|
435
|
+
it('should match a date with only month/day/year', () => {
|
|
436
|
+
// October 10, 2023
|
|
437
|
+
const refParts = { month: 10, day: 10, year: 2023 };
|
|
438
|
+
// April 10, 2021
|
|
439
|
+
const minParts = { month: 4, day: 10, year: 2021 };
|
|
440
|
+
// September 14, 2021
|
|
441
|
+
const maxParts = { month: 9, day: 14, year: 2021 };
|
|
442
|
+
// September 4, 2021
|
|
443
|
+
const expected = { month: 9, day: 4, year: 2021, dayOfWeek: undefined };
|
|
444
|
+
expect(getClosestValidDate({
|
|
445
|
+
refParts,
|
|
446
|
+
monthValues: [2, 3, 7, 9, 10],
|
|
447
|
+
dayValues: [4, 15, 25],
|
|
448
|
+
yearValues: [2020, 2021, 2023],
|
|
449
|
+
maxParts,
|
|
450
|
+
minParts,
|
|
451
|
+
})).toEqual(expected);
|
|
452
|
+
});
|
|
453
|
+
it('should match a date when the reference date is before the min', () => {
|
|
454
|
+
// April 2, 2020 3:20 PM
|
|
455
|
+
const refParts = { month: 4, day: 2, year: 2020, hour: 15, minute: 20 };
|
|
456
|
+
// September 10, 2021 10:10 AM
|
|
457
|
+
const minParts = { month: 9, day: 10, year: 2021, hour: 10, minute: 10 };
|
|
458
|
+
// September 14, 2021 10:11 AM
|
|
459
|
+
const maxParts = { month: 9, day: 14, year: 2021, hour: 10, minute: 11 };
|
|
460
|
+
// September 11, 2021 11:15 AM
|
|
461
|
+
const expected = {
|
|
462
|
+
year: 2021,
|
|
463
|
+
day: 11,
|
|
464
|
+
month: 9,
|
|
465
|
+
hour: 11,
|
|
466
|
+
minute: 15,
|
|
467
|
+
ampm: 'am',
|
|
468
|
+
dayOfWeek: undefined,
|
|
469
|
+
};
|
|
470
|
+
expect(getClosestValidDate({
|
|
471
|
+
refParts,
|
|
472
|
+
monthValues: [4, 9, 11],
|
|
473
|
+
dayValues: [11, 12, 13, 14],
|
|
474
|
+
yearValues: [2020, 2021, 2023],
|
|
475
|
+
hourValues: [9, 10, 11],
|
|
476
|
+
minuteValues: [11, 12, 13, 14, 15],
|
|
477
|
+
maxParts,
|
|
478
|
+
minParts,
|
|
479
|
+
})).toEqual(expected);
|
|
480
|
+
});
|
|
481
|
+
it('should match a date when the reference date is before the min', () => {
|
|
482
|
+
// April 2, 2020 3:20 PM
|
|
483
|
+
const refParts = { month: 4, day: 2, year: 2020, hour: 15, minute: 20 };
|
|
484
|
+
// September 10, 2021 10:10 AM
|
|
485
|
+
const minParts = { month: 9, day: 10, year: 2021, hour: 10, minute: 10 };
|
|
486
|
+
// September 10, 2021 10:15 AM
|
|
487
|
+
const maxParts = { month: 9, day: 10, year: 2021, hour: 10, minute: 15 };
|
|
488
|
+
// September 10, 2021 10:15 AM
|
|
489
|
+
const expected = {
|
|
490
|
+
month: 9,
|
|
491
|
+
day: 10,
|
|
492
|
+
year: 2021,
|
|
493
|
+
hour: 10,
|
|
494
|
+
minute: 15,
|
|
495
|
+
ampm: 'am',
|
|
496
|
+
dayOfWeek: undefined,
|
|
497
|
+
};
|
|
498
|
+
expect(getClosestValidDate({
|
|
499
|
+
refParts,
|
|
500
|
+
monthValues: [4, 9, 11],
|
|
501
|
+
dayValues: [10, 12, 13, 14],
|
|
502
|
+
yearValues: [2020, 2021, 2023],
|
|
503
|
+
hourValues: [9, 10, 11],
|
|
504
|
+
minuteValues: [11, 12, 13, 14, 15],
|
|
505
|
+
minParts,
|
|
506
|
+
maxParts,
|
|
507
|
+
})).toEqual(expected);
|
|
508
|
+
});
|
|
509
|
+
it('should only clamp minutes if within the same day and hour as min/max', () => {
|
|
510
|
+
// April 2, 2020 9:16 AM
|
|
511
|
+
const refParts = { month: 4, day: 2, year: 2020, hour: 9, minute: 16 };
|
|
512
|
+
// September 10, 2021 10:10 AM
|
|
513
|
+
const minParts = { month: 9, day: 10, year: 2021, hour: 10, minute: 10 };
|
|
514
|
+
// September 10, 2021 11:15 AM
|
|
515
|
+
const maxParts = { month: 9, day: 10, year: 2021, hour: 11, minute: 15 };
|
|
516
|
+
// September 10, 2021 10:16 AM
|
|
517
|
+
const expected = {
|
|
518
|
+
month: 9,
|
|
519
|
+
day: 10,
|
|
520
|
+
year: 2021,
|
|
521
|
+
hour: 10,
|
|
522
|
+
minute: 16,
|
|
523
|
+
ampm: 'am',
|
|
524
|
+
dayOfWeek: undefined,
|
|
525
|
+
};
|
|
526
|
+
expect(getClosestValidDate({
|
|
527
|
+
refParts,
|
|
528
|
+
monthValues: [4, 9, 11],
|
|
529
|
+
dayValues: [10, 12, 13, 14],
|
|
530
|
+
yearValues: [2020, 2021, 2023],
|
|
531
|
+
hourValues: [9, 10, 11],
|
|
532
|
+
minuteValues: [10, 15, 16],
|
|
533
|
+
minParts,
|
|
534
|
+
maxParts,
|
|
535
|
+
})).toEqual(expected);
|
|
536
|
+
});
|
|
537
|
+
it('should return the closest valid date after adjusting the allowed year', () => {
|
|
538
|
+
// April 2, 2022 9:16 AM
|
|
539
|
+
const refParts = { month: 4, day: 2, year: 2022, hour: 9, minute: 16 };
|
|
540
|
+
// September 10, 2021 10:10 AM
|
|
541
|
+
const minParts = { month: 9, day: 10, year: 2021, hour: 10, minute: 10 };
|
|
542
|
+
// September 10, 2023 11:15 AM
|
|
543
|
+
const maxParts = { month: 9, day: 10, year: 2023, hour: 11, minute: 15 };
|
|
544
|
+
// April 2, 2022 9:16 AM
|
|
545
|
+
const expected = {
|
|
546
|
+
month: 4,
|
|
547
|
+
day: 2,
|
|
548
|
+
year: 2022,
|
|
549
|
+
hour: 9,
|
|
550
|
+
minute: 16,
|
|
551
|
+
ampm: 'am',
|
|
552
|
+
dayOfWeek: undefined,
|
|
553
|
+
};
|
|
554
|
+
expect(getClosestValidDate({
|
|
555
|
+
refParts,
|
|
556
|
+
monthValues: [4, 9, 11],
|
|
557
|
+
dayValues: [2, 10, 12, 13, 14],
|
|
558
|
+
yearValues: [2020, 2021, 2022, 2023],
|
|
559
|
+
hourValues: [9, 10, 11],
|
|
560
|
+
minuteValues: [10, 15, 16],
|
|
561
|
+
minParts,
|
|
562
|
+
maxParts,
|
|
563
|
+
})).toEqual(expected);
|
|
564
|
+
});
|
|
565
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
5
|
+
import { Datetime } from "../../datetime";
|
|
6
|
+
describe('datetime: preferWheel', () => {
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
const mockIntersectionObserver = jest.fn();
|
|
9
|
+
mockIntersectionObserver.mockReturnValue({
|
|
10
|
+
observe: () => null,
|
|
11
|
+
unobserve: () => null,
|
|
12
|
+
disconnect: () => null,
|
|
13
|
+
});
|
|
14
|
+
global.IntersectionObserver = mockIntersectionObserver;
|
|
15
|
+
});
|
|
16
|
+
it('should select the working day when clicking the confirm button', async () => {
|
|
17
|
+
const page = await newSpecPage({
|
|
18
|
+
components: [Datetime],
|
|
19
|
+
html: '<ion-datetime prefer-wheel="true" max="2021" show-default-buttons="true"></ion-datetime>',
|
|
20
|
+
});
|
|
21
|
+
const datetime = page.body.querySelector('ion-datetime');
|
|
22
|
+
const confirmButton = datetime.shadowRoot.querySelector('#confirm-button');
|
|
23
|
+
confirmButton.click();
|
|
24
|
+
await page.waitForChanges();
|
|
25
|
+
expect(datetime.value).toBe('2021-12-31T23:59:00');
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { isSameDay } from "./comparison";
|
|
4
|
+
import { isAfter, isBefore, isSameDay } from "./comparison";
|
|
5
5
|
import { getNumDaysInMonth } from "./helpers";
|
|
6
6
|
import { clampDate, parseAmPm } from "./parse";
|
|
7
7
|
const twoDigit = (val) => {
|
|
@@ -355,32 +355,82 @@ export const validateParts = (parts, minParts, maxParts) => {
|
|
|
355
355
|
* Returns the closest date to refParts
|
|
356
356
|
* that also meets the constraints of
|
|
357
357
|
* the *Values params.
|
|
358
|
-
* @param refParts The reference date
|
|
359
|
-
* @param monthValues The allowed month values
|
|
360
|
-
* @param dayValues The allowed day (of the month) values
|
|
361
|
-
* @param yearValues The allowed year values
|
|
362
|
-
* @param hourValues The allowed hour values
|
|
363
|
-
* @param minuteValues The allowed minute values
|
|
364
358
|
*/
|
|
365
|
-
export const getClosestValidDate = (refParts, monthValues, dayValues, yearValues, hourValues, minuteValues) => {
|
|
359
|
+
export const getClosestValidDate = ({ refParts, monthValues, dayValues, yearValues, hourValues, minuteValues, minParts, maxParts, }) => {
|
|
366
360
|
const { hour, minute, day, month, year } = refParts;
|
|
367
361
|
const copyParts = Object.assign(Object.assign({}, refParts), { dayOfWeek: undefined });
|
|
362
|
+
if (yearValues !== undefined) {
|
|
363
|
+
// Filters out years that are out of the min/max bounds
|
|
364
|
+
const filteredYears = yearValues.filter((year) => {
|
|
365
|
+
if (minParts !== undefined && year < minParts.year) {
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
if (maxParts !== undefined && year > maxParts.year) {
|
|
369
|
+
return false;
|
|
370
|
+
}
|
|
371
|
+
return true;
|
|
372
|
+
});
|
|
373
|
+
copyParts.year = findClosestValue(year, filteredYears);
|
|
374
|
+
}
|
|
368
375
|
if (monthValues !== undefined) {
|
|
369
|
-
|
|
376
|
+
// Filters out months that are out of the min/max bounds
|
|
377
|
+
const filteredMonths = monthValues.filter((month) => {
|
|
378
|
+
if (minParts !== undefined && copyParts.year === minParts.year && month < minParts.month) {
|
|
379
|
+
return false;
|
|
380
|
+
}
|
|
381
|
+
if (maxParts !== undefined && copyParts.year === maxParts.year && month > maxParts.month) {
|
|
382
|
+
return false;
|
|
383
|
+
}
|
|
384
|
+
return true;
|
|
385
|
+
});
|
|
386
|
+
copyParts.month = findClosestValue(month, filteredMonths);
|
|
370
387
|
}
|
|
371
388
|
// Day is nullable but cannot be undefined
|
|
372
389
|
if (day !== null && dayValues !== undefined) {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
390
|
+
// Filters out days that are out of the min/max bounds
|
|
391
|
+
const filteredDays = dayValues.filter((day) => {
|
|
392
|
+
if (minParts !== undefined && isBefore(Object.assign(Object.assign({}, copyParts), { day }), minParts)) {
|
|
393
|
+
return false;
|
|
394
|
+
}
|
|
395
|
+
if (maxParts !== undefined && isAfter(Object.assign(Object.assign({}, copyParts), { day }), maxParts)) {
|
|
396
|
+
return false;
|
|
397
|
+
}
|
|
398
|
+
return true;
|
|
399
|
+
});
|
|
400
|
+
copyParts.day = findClosestValue(day, filteredDays);
|
|
377
401
|
}
|
|
378
402
|
if (hour !== undefined && hourValues !== undefined) {
|
|
379
|
-
|
|
403
|
+
// Filters out hours that are out of the min/max bounds
|
|
404
|
+
const filteredHours = hourValues.filter((hour) => {
|
|
405
|
+
if ((minParts === null || minParts === void 0 ? void 0 : minParts.hour) !== undefined && isSameDay(copyParts, minParts) && hour < minParts.hour) {
|
|
406
|
+
return false;
|
|
407
|
+
}
|
|
408
|
+
if ((maxParts === null || maxParts === void 0 ? void 0 : maxParts.hour) !== undefined && isSameDay(copyParts, maxParts) && hour > maxParts.hour) {
|
|
409
|
+
return false;
|
|
410
|
+
}
|
|
411
|
+
return true;
|
|
412
|
+
});
|
|
413
|
+
copyParts.hour = findClosestValue(hour, filteredHours);
|
|
380
414
|
copyParts.ampm = parseAmPm(copyParts.hour);
|
|
381
415
|
}
|
|
382
416
|
if (minute !== undefined && minuteValues !== undefined) {
|
|
383
|
-
|
|
417
|
+
// Filters out minutes that are out of the min/max bounds
|
|
418
|
+
const filteredMinutes = minuteValues.filter((minute) => {
|
|
419
|
+
if ((minParts === null || minParts === void 0 ? void 0 : minParts.minute) !== undefined &&
|
|
420
|
+
isSameDay(copyParts, minParts) &&
|
|
421
|
+
copyParts.hour === minParts.hour &&
|
|
422
|
+
minute < minParts.minute) {
|
|
423
|
+
return false;
|
|
424
|
+
}
|
|
425
|
+
if ((maxParts === null || maxParts === void 0 ? void 0 : maxParts.minute) !== undefined &&
|
|
426
|
+
isSameDay(copyParts, maxParts) &&
|
|
427
|
+
copyParts.hour === maxParts.hour &&
|
|
428
|
+
minute > maxParts.minute) {
|
|
429
|
+
return false;
|
|
430
|
+
}
|
|
431
|
+
return true;
|
|
432
|
+
});
|
|
433
|
+
copyParts.minute = findClosestValue(minute, filteredMinutes);
|
|
384
434
|
}
|
|
385
435
|
return copyParts;
|
|
386
436
|
};
|
|
@@ -269,15 +269,34 @@ export class Input {
|
|
|
269
269
|
if (!this.shouldClearOnEdit()) {
|
|
270
270
|
return;
|
|
271
271
|
}
|
|
272
|
+
/**
|
|
273
|
+
* The following keys do not modify the
|
|
274
|
+
* contents of the input. As a result, pressing
|
|
275
|
+
* them should not edit the input.
|
|
276
|
+
*
|
|
277
|
+
* We can't check to see if the value of the input
|
|
278
|
+
* was changed because we call checkClearOnEdit
|
|
279
|
+
* in a keydown listener, and the key has not yet
|
|
280
|
+
* been added to the input.
|
|
281
|
+
*/
|
|
282
|
+
const IGNORED_KEYS = ['Enter', 'Tab', 'Shift', 'Meta', 'Alt', 'Control'];
|
|
283
|
+
const pressedIgnoredKey = IGNORED_KEYS.includes(ev.key);
|
|
272
284
|
/**
|
|
273
285
|
* Clear the input if the control has not been previously cleared during focus.
|
|
274
286
|
* Do not clear if the user hitting enter to submit a form.
|
|
275
287
|
*/
|
|
276
|
-
if (!this.didInputClearOnEdit && this.hasValue() &&
|
|
288
|
+
if (!this.didInputClearOnEdit && this.hasValue() && !pressedIgnoredKey) {
|
|
277
289
|
this.value = '';
|
|
278
290
|
this.emitInputChange(ev);
|
|
279
291
|
}
|
|
280
|
-
|
|
292
|
+
/**
|
|
293
|
+
* Pressing an IGNORED_KEYS first and
|
|
294
|
+
* then an allowed key will cause the input to not
|
|
295
|
+
* be cleared.
|
|
296
|
+
*/
|
|
297
|
+
if (!pressedIgnoredKey) {
|
|
298
|
+
this.didInputClearOnEdit = true;
|
|
299
|
+
}
|
|
281
300
|
}
|
|
282
301
|
hasValue() {
|
|
283
302
|
return this.getValue().length > 0;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { expect } from "@playwright/test";
|
|
5
5
|
import { test, configs } from "../../../../utils/test/playwright/index";
|
|
6
|
+
const IGNORED_KEYS = ['Enter', 'Tab', 'Shift', 'Meta', 'Alt', 'Control'];
|
|
6
7
|
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
7
8
|
test.describe(title('input: clearOnEdit'), () => {
|
|
8
9
|
test('should clear when typed into', async ({ page }) => {
|
|
@@ -13,21 +14,40 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
|
|
|
13
14
|
await ionInput.next();
|
|
14
15
|
await expect(input).toHaveJSProperty('value', 'h');
|
|
15
16
|
});
|
|
16
|
-
test('should not clear
|
|
17
|
-
await page.setContent(`<ion-input value="
|
|
17
|
+
test('should not clear the input if it does not have an initial value when typing', async ({ page }) => {
|
|
18
|
+
await page.setContent(`<ion-input label="input" value="" clear-on-edit="true"></ion-input>`, config);
|
|
18
19
|
const input = page.locator('ion-input');
|
|
19
|
-
await input.
|
|
20
|
-
await
|
|
21
|
-
await
|
|
22
|
-
|
|
20
|
+
await input.click();
|
|
21
|
+
await input.type('hello world');
|
|
22
|
+
await expect(input).toHaveJSProperty('value', 'hello world');
|
|
23
|
+
});
|
|
24
|
+
IGNORED_KEYS.forEach((ignoredKey) => {
|
|
25
|
+
test(`should not clear when ${ignoredKey} is pressed`, async ({ page, skip }) => {
|
|
26
|
+
skip.browser((browserName) => browserName === 'firefox' && ignoredKey === 'Meta', 'Firefox incorrectly adds "OS" to the input when pressing the Meta key on Linux');
|
|
27
|
+
await page.setContent(`<ion-input value="abc" clear-on-edit="true" aria-label="input"></ion-input>`, config);
|
|
28
|
+
const input = page.locator('ion-input');
|
|
29
|
+
await input.locator('input').focus();
|
|
30
|
+
await page.keyboard.press(ignoredKey);
|
|
31
|
+
await page.waitForChanges();
|
|
32
|
+
await expect(input).toHaveJSProperty('value', 'abc');
|
|
33
|
+
});
|
|
23
34
|
});
|
|
24
|
-
test('should
|
|
35
|
+
test('should clear after when pressing valid key after pressing ignored key', async ({ page }) => {
|
|
36
|
+
test.info().annotations.push({
|
|
37
|
+
type: 'issue',
|
|
38
|
+
description: 'https://github.com/ionic-team/ionic-framework/issues/28633',
|
|
39
|
+
});
|
|
25
40
|
await page.setContent(`<ion-input value="abc" clear-on-edit="true" aria-label="input"></ion-input>`, config);
|
|
26
41
|
const input = page.locator('ion-input');
|
|
27
42
|
await input.locator('input').focus();
|
|
28
|
-
|
|
43
|
+
// ignored
|
|
44
|
+
await page.keyboard.press('Shift');
|
|
29
45
|
await page.waitForChanges();
|
|
30
46
|
await expect(input).toHaveJSProperty('value', 'abc');
|
|
47
|
+
// allowed
|
|
48
|
+
await page.keyboard.press('a');
|
|
49
|
+
await page.waitForChanges();
|
|
50
|
+
await expect(input).toHaveJSProperty('value', 'a');
|
|
31
51
|
});
|
|
32
52
|
});
|
|
33
53
|
});
|
|
@@ -305,14 +305,13 @@ ion-backdrop {
|
|
|
305
305
|
left: 0;
|
|
306
306
|
right: 0;
|
|
307
307
|
width: auto;
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
box-shadow: none !important;
|
|
308
|
+
transform: none;
|
|
309
|
+
box-shadow: none;
|
|
311
310
|
}
|
|
312
311
|
|
|
313
312
|
:host(.menu-pane-visible) ion-backdrop {
|
|
313
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
314
314
|
display: hidden !important;
|
|
315
|
-
/* stylelint-enable declaration-no-important */
|
|
316
315
|
}
|
|
317
316
|
|
|
318
317
|
/**
|
|
@@ -305,14 +305,13 @@ ion-backdrop {
|
|
|
305
305
|
left: 0;
|
|
306
306
|
right: 0;
|
|
307
307
|
width: auto;
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
box-shadow: none !important;
|
|
308
|
+
transform: none;
|
|
309
|
+
box-shadow: none;
|
|
311
310
|
}
|
|
312
311
|
|
|
313
312
|
:host(.menu-pane-visible) ion-backdrop {
|
|
313
|
+
/* stylelint-disable-next-line declaration-no-important */
|
|
314
314
|
display: hidden !important;
|
|
315
|
-
/* stylelint-enable declaration-no-important */
|
|
316
315
|
}
|
|
317
316
|
|
|
318
317
|
/**
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { expect } from "@playwright/test";
|
|
5
|
+
import { configs, test } from "../../../../utils/test/playwright/index";
|
|
6
|
+
/**
|
|
7
|
+
* This behavior does not vary across directions.
|
|
8
|
+
*/
|
|
9
|
+
configs({ directions: ['ltr'] }).forEach(({ title, config, screenshot }) => {
|
|
10
|
+
test.describe(title('menu: custom'), () => {
|
|
11
|
+
test('should allow styling the menu box shadow when inside a split pane', async ({ page }) => {
|
|
12
|
+
test.info().annotations.push({
|
|
13
|
+
type: 'issue',
|
|
14
|
+
description: 'https://github.com/ionic-team/ionic-framework/issues/21530',
|
|
15
|
+
});
|
|
16
|
+
await page.setContent(`
|
|
17
|
+
<style>
|
|
18
|
+
ion-split-pane {
|
|
19
|
+
--side-width: 200px;
|
|
20
|
+
--side-min-width: 200px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
ion-menu {
|
|
24
|
+
box-shadow: 10px 5px 5px red;
|
|
25
|
+
z-index: 1;
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
28
|
+
|
|
29
|
+
<ion-app>
|
|
30
|
+
<ion-split-pane when="xs" id="splitPane" content-id="split-content">
|
|
31
|
+
<ion-menu side="start" content-id="split-content">
|
|
32
|
+
<ion-header>
|
|
33
|
+
<ion-toolbar color="secondary">
|
|
34
|
+
<ion-title>Menu</ion-title>
|
|
35
|
+
</ion-toolbar>
|
|
36
|
+
</ion-header>
|
|
37
|
+
|
|
38
|
+
<ion-content class="ion-padding">Menu Content</ion-content>
|
|
39
|
+
</ion-menu>
|
|
40
|
+
|
|
41
|
+
<div class="ion-page" id="split-content">
|
|
42
|
+
<ion-header>
|
|
43
|
+
<ion-toolbar>
|
|
44
|
+
<ion-buttons slot="start">
|
|
45
|
+
<ion-menu-button></ion-menu-button>
|
|
46
|
+
</ion-buttons>
|
|
47
|
+
|
|
48
|
+
<ion-title>Content</ion-title>
|
|
49
|
+
</ion-toolbar>
|
|
50
|
+
</ion-header>
|
|
51
|
+
|
|
52
|
+
<ion-content class="ion-padding">Main Content</ion-content>
|
|
53
|
+
</div>
|
|
54
|
+
</ion-split-pane>
|
|
55
|
+
</ion-app>
|
|
56
|
+
`, config);
|
|
57
|
+
const app = page.locator('ion-app');
|
|
58
|
+
await expect(app).toHaveScreenshot(screenshot(`menu-custom-split-pane`));
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
});
|
|
@@ -15,7 +15,8 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
|
|
|
15
15
|
expect(results.violations).toEqual([]);
|
|
16
16
|
});
|
|
17
17
|
});
|
|
18
|
-
|
|
18
|
+
// TODO(FW-5715): re-enable test
|
|
19
|
+
test.skip(title('radio: keyboard navigation'), () => {
|
|
19
20
|
test.beforeEach(async ({ page }) => {
|
|
20
21
|
await page.setContent(`
|
|
21
22
|
<ion-app>
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { expect } from "@playwright/test";
|
|
5
5
|
import { test, configs } from "../../../../utils/test/playwright/index";
|
|
6
|
+
const IGNORED_KEYS = ['Tab', 'Shift', 'Meta', 'Alt', 'Control'];
|
|
6
7
|
configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => {
|
|
7
8
|
test.describe(title('textarea: clearOnEdit'), () => {
|
|
8
9
|
test('should clear when typed into', async ({ page }) => {
|
|
@@ -21,5 +22,40 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) =>
|
|
|
21
22
|
await page.waitForChanges();
|
|
22
23
|
await expect(textarea).toHaveJSProperty('value', 'abc');
|
|
23
24
|
});
|
|
25
|
+
test('should not clear the textarea if it does not have an initial value when typing', async ({ page }) => {
|
|
26
|
+
await page.setContent(`<ion-textarea label="textarea" value="" clear-on-edit="true"></ion-textarea>`, config);
|
|
27
|
+
const textarea = page.locator('ion-textarea');
|
|
28
|
+
await textarea.click();
|
|
29
|
+
await textarea.type('hello world');
|
|
30
|
+
await expect(textarea).toHaveJSProperty('value', 'hello world');
|
|
31
|
+
});
|
|
32
|
+
IGNORED_KEYS.forEach((ignoredKey) => {
|
|
33
|
+
test(`should not clear when ${ignoredKey} is pressed`, async ({ page, skip }) => {
|
|
34
|
+
skip.browser((browserName) => browserName === 'firefox' && ignoredKey === 'Meta', 'Firefox incorrectly adds "OS" to the textarea when pressing the Meta key on Linux');
|
|
35
|
+
await page.setContent(`<ion-textarea value="abc" clear-on-edit="true" aria-label="textarea"></ion-textarea>`, config);
|
|
36
|
+
const textarea = page.locator('ion-textarea');
|
|
37
|
+
await textarea.locator('textarea').focus();
|
|
38
|
+
await page.keyboard.press(ignoredKey);
|
|
39
|
+
await page.waitForChanges();
|
|
40
|
+
await expect(textarea).toHaveJSProperty('value', 'abc');
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
test('should clear after when pressing valid key after pressing ignored key', async ({ page }) => {
|
|
44
|
+
test.info().annotations.push({
|
|
45
|
+
type: 'issue',
|
|
46
|
+
description: 'https://github.com/ionic-team/ionic-framework/issues/28633',
|
|
47
|
+
});
|
|
48
|
+
await page.setContent(`<ion-textarea value="abc" clear-on-edit="true" aria-label="textarea"></ion-textarea>`, config);
|
|
49
|
+
const textarea = page.locator('ion-textarea');
|
|
50
|
+
await textarea.locator('textarea').focus();
|
|
51
|
+
// ignored
|
|
52
|
+
await page.keyboard.press('Shift');
|
|
53
|
+
await page.waitForChanges();
|
|
54
|
+
await expect(textarea).toHaveJSProperty('value', 'abc');
|
|
55
|
+
// allowed
|
|
56
|
+
await page.keyboard.press('a');
|
|
57
|
+
await page.waitForChanges();
|
|
58
|
+
await expect(textarea).toHaveJSProperty('value', 'a');
|
|
59
|
+
});
|
|
24
60
|
});
|
|
25
61
|
});
|
|
@@ -238,15 +238,38 @@ export class Textarea {
|
|
|
238
238
|
if (!this.clearOnEdit) {
|
|
239
239
|
return;
|
|
240
240
|
}
|
|
241
|
+
/**
|
|
242
|
+
* The following keys do not modify the
|
|
243
|
+
* contents of the input. As a result, pressing
|
|
244
|
+
* them should not edit the textarea.
|
|
245
|
+
*
|
|
246
|
+
* We can't check to see if the value of the textarea
|
|
247
|
+
* was changed because we call checkClearOnEdit
|
|
248
|
+
* in a keydown listener, and the key has not yet
|
|
249
|
+
* been added to the textarea.
|
|
250
|
+
*
|
|
251
|
+
* Unlike ion-input, the "Enter" key does modify the
|
|
252
|
+
* textarea by adding a new line, so "Enter" is not
|
|
253
|
+
* included in the IGNORED_KEYS array.
|
|
254
|
+
*/
|
|
255
|
+
const IGNORED_KEYS = ['Tab', 'Shift', 'Meta', 'Alt', 'Control'];
|
|
256
|
+
const pressedIgnoredKey = IGNORED_KEYS.includes(ev.key);
|
|
241
257
|
/**
|
|
242
258
|
* Clear the textarea if the control has not been previously cleared
|
|
243
259
|
* during focus.
|
|
244
260
|
*/
|
|
245
|
-
if (!this.didTextareaClearOnEdit && this.hasValue() &&
|
|
261
|
+
if (!this.didTextareaClearOnEdit && this.hasValue() && !pressedIgnoredKey) {
|
|
246
262
|
this.value = '';
|
|
247
263
|
this.emitInputChange(ev);
|
|
248
264
|
}
|
|
249
|
-
|
|
265
|
+
/**
|
|
266
|
+
* Pressing an IGNORED_KEYS first and
|
|
267
|
+
* then an allowed key will cause the input to not
|
|
268
|
+
* be cleared.
|
|
269
|
+
*/
|
|
270
|
+
if (!pressedIgnoredKey) {
|
|
271
|
+
this.didTextareaClearOnEdit = true;
|
|
272
|
+
}
|
|
250
273
|
}
|
|
251
274
|
focusChange() {
|
|
252
275
|
this.emitStyle();
|
package/dist/docs.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import { w as writeTask } from './index-
|
|
4
|
+
import { w as writeTask } from './index-b7d870cf.js';
|
|
5
5
|
import { h as hapticSelectionEnd, a as hapticSelectionStart, b as hapticSelectionChanged } from './haptic-554688a5.js';
|
|
6
6
|
import { createGesture } from './index-2cf77112.js';
|
|
7
7
|
|