@amwaljs/checkout-button 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/checkout/checkout.esm.js +1 -1
- package/dist/checkout/{p-c03b6161.entry.js → p-00045a8c.entry.js} +1 -1
- package/dist/checkout/p-01bbe74f.entry.js +1 -0
- package/dist/checkout/p-051412fa.entry.js +1 -0
- package/dist/checkout/p-09cbe586.entry.js +4 -0
- package/dist/checkout/{p-439ad699.entry.js → p-0a85a01f.entry.js} +2 -2
- package/dist/checkout/{p-d5652cd4.entry.js → p-0bbfeb3c.entry.js} +1 -1
- package/dist/checkout/{p-4ae1a390.entry.js → p-0d96b482.entry.js} +1 -1
- package/dist/checkout/{p-DUa_5Mmb.js → p-0f03cd28.js} +2 -2
- package/dist/checkout/p-104d7733.entry.js +1 -0
- package/dist/checkout/{p-8036cf49.entry.js → p-10ad151a.entry.js} +5 -5
- package/dist/checkout/p-112455b1.js +1 -0
- package/dist/checkout/p-11beffea.entry.js +1 -0
- package/dist/checkout/p-13245fd4.js +1 -0
- package/dist/checkout/p-13741a94.entry.js +1 -0
- package/dist/checkout/p-14ea2c82.entry.js +1 -0
- package/dist/checkout/p-167dc7a7.entry.js +4 -0
- package/dist/checkout/p-1a749b59.entry.js +1 -0
- package/dist/checkout/p-1c718939.entry.js +1 -0
- package/dist/checkout/{p-11205aeb.entry.js → p-1cbb13f2.entry.js} +1 -1
- package/dist/checkout/{p-46ff73b3.entry.js → p-20df5234.entry.js} +1 -1
- package/dist/checkout/p-24068b1c.entry.js +1 -0
- package/dist/checkout/{p-7006753a.entry.js → p-28ccecc7.entry.js} +2 -2
- package/dist/checkout/p-361649c3.js +4 -0
- package/dist/{components/p-DoR35tr_.js → checkout/p-39ad94cf.js} +2 -2
- package/dist/checkout/p-3b75b22a.js +5 -0
- package/dist/checkout/p-3b80783d.js +8 -0
- package/dist/checkout/p-3d3eefc3.js +4 -0
- package/dist/checkout/p-3e1e3453.js +4 -0
- package/dist/checkout/p-3e681e57.js +4 -0
- package/dist/checkout/{p-bf933eb6.entry.js → p-3e8da476.entry.js} +1 -1
- package/dist/checkout/{p-1dc08181.entry.js → p-4028c0d2.entry.js} +1 -1
- package/dist/checkout/p-44c91c42.entry.js +1 -0
- package/dist/checkout/p-464f5a60.entry.js +1 -0
- package/dist/checkout/p-46b7ee7f.entry.js +1 -0
- package/dist/checkout/p-48784250.entry.js +1 -0
- package/dist/{components/p-wiOwkFtc.js → checkout/p-4be20bf2.js} +1 -1
- package/dist/{components/p-Dl_WhQZu.js → checkout/p-4f78d3a0.js} +2 -2
- package/dist/checkout/{p-4da4ecc4.entry.js → p-529bce3f.entry.js} +1 -1
- package/dist/checkout/p-536a0294.js +4 -0
- package/dist/checkout/{p-eae2d3f2.entry.js → p-5eecd5ef.entry.js} +1 -1
- package/dist/checkout/p-64257c8d.entry.js +1 -0
- package/dist/checkout/{p-5903b3af.entry.js → p-64bd1dd3.entry.js} +1 -1
- package/dist/checkout/{p-9b7d7231.entry.js → p-68a4caba.entry.js} +1 -1
- package/dist/checkout/{p-978b3762.entry.js → p-69242ed6.entry.js} +1 -1
- package/dist/checkout/{p-62b7c8b0.entry.js → p-6d886d7e.entry.js} +1 -1
- package/dist/checkout/{p-ofaUly0p.js → p-6fa979e3.js} +2 -2
- package/dist/checkout/p-6fb474f3.entry.js +1 -0
- package/dist/checkout/p-77104220.js +7 -0
- package/dist/checkout/{p-aba43d04.entry.js → p-79ec3e4b.entry.js} +1 -1
- package/dist/checkout/{p-cd2c344b.entry.js → p-7b51bf67.entry.js} +2 -2
- package/dist/checkout/p-7f0004c9.js +4 -0
- package/dist/checkout/p-7fe50ab4.entry.js +1 -0
- package/dist/checkout/p-880b451c.entry.js +4 -0
- package/dist/checkout/p-886dad62.entry.js +1 -0
- package/dist/checkout/p-886e8746.entry.js +1 -0
- package/dist/checkout/p-88abdf59.js +4 -0
- package/dist/checkout/{p-f845e91b.entry.js → p-8a97a411.entry.js} +1 -1
- package/dist/checkout/p-8af3c6cc.entry.js +1 -0
- package/dist/checkout/{p-8b015c21.entry.js → p-8c022f5d.entry.js} +1 -1
- package/dist/checkout/{p-56e307eb.entry.js → p-91855eae.entry.js} +1 -1
- package/dist/checkout/{p-ca257d45.entry.js → p-9185e55b.entry.js} +1 -1
- package/dist/checkout/{p-4b34896c.entry.js → p-926eda98.entry.js} +1 -1
- package/dist/checkout/p-93e5b313.entry.js +4 -0
- package/dist/checkout/{p-4a86b731.entry.js → p-97024acb.entry.js} +1 -1
- package/dist/checkout/p-99e447f9.js +1 -0
- package/dist/{components/p-BgOwfqIY.js → checkout/p-9b519de5.js} +2 -2
- package/dist/checkout/{p-b8245f6a.entry.js → p-9b65a6e5.entry.js} +1 -1
- package/dist/checkout/{p-53ae9dd0.entry.js → p-9cc1fdfb.entry.js} +1 -1
- package/dist/checkout/{p-8fc1287a.entry.js → p-9f26fb71.entry.js} +1 -1
- package/dist/checkout/p-9f41a631.entry.js +1 -0
- package/dist/checkout/{p-5f005b5e.entry.js → p-a2ce8858.entry.js} +1 -1
- package/dist/checkout/{p-e4d0702d.entry.js → p-a3fca65c.entry.js} +1 -1
- package/dist/checkout/{p-d370e756.entry.js → p-a6056eb1.entry.js} +2 -2
- package/dist/checkout/{p-c929d6ea.entry.js → p-a7b2cbb9.entry.js} +1 -1
- package/dist/{components/p-Dwo-QLgs.js → checkout/p-ab16e6ce.js} +1 -1
- package/dist/checkout/{p-63db3363.entry.js → p-ab9a18c4.entry.js} +1 -1
- package/dist/checkout/p-b038db20.js +4 -0
- package/dist/checkout/p-b4ad8642.entry.js +1 -0
- package/dist/checkout/p-b4cf78ad.entry.js +1 -0
- package/dist/checkout/p-b7be2ec0.js +4 -0
- package/dist/checkout/p-b84d9e44.js +4 -0
- package/dist/{components/p-CwRU9ccI.js → checkout/p-b8fdd517.js} +1 -1
- package/dist/checkout/{p-d799009b.entry.js → p-b9d8ab12.entry.js} +1 -1
- package/dist/checkout/p-bb1f698e.js +4 -0
- package/dist/checkout/p-bd17be25.js +4 -0
- package/dist/checkout/p-bd4df0bc.entry.js +1 -0
- package/dist/checkout/p-c152bdea.js +4 -0
- package/dist/checkout/{p-f22v7XAM.js → p-c30e2b28.js} +2 -2
- package/dist/checkout/{p-c2296aa1.entry.js → p-c61a3d5d.entry.js} +1 -1
- package/dist/checkout/p-c6ee4bb6.entry.js +1 -0
- package/dist/checkout/p-c771a565.entry.js +1 -0
- package/dist/checkout/{p-3c9a8bee.entry.js → p-c82b2823.entry.js} +1 -1
- package/dist/checkout/p-c8f7d1b5.entry.js +1 -0
- package/dist/checkout/p-ceef30cd.entry.js +1 -0
- package/dist/checkout/p-d5733333.entry.js +1 -0
- package/dist/checkout/p-d5bba69c.entry.js +1 -0
- package/dist/checkout/p-d60b2328.js +4 -0
- package/dist/checkout/p-d60e05e2.entry.js +1 -0
- package/dist/checkout/p-d6b04157.entry.js +1 -0
- package/dist/checkout/p-d7a430bf.js +2 -0
- package/dist/checkout/{p-B3WORC1a.js → p-d839c693.js} +1 -1
- package/dist/checkout/{p-141f2eab.entry.js → p-d9dfb3ae.entry.js} +3 -3
- package/dist/checkout/p-dc51d318.js +5 -0
- package/dist/checkout/p-ddbe30b8.entry.js +1 -0
- package/dist/checkout/p-de418dd1.entry.js +1 -0
- package/dist/checkout/{p-b4000357.entry.js → p-defa5f72.entry.js} +2 -2
- package/dist/checkout/{p-b90c064e.entry.js → p-df0fa5e1.entry.js} +2 -2
- package/dist/checkout/{p-c8740acc.entry.js → p-e0f073f1.entry.js} +3 -3
- package/dist/checkout/p-e237d611.entry.js +1 -0
- package/dist/checkout/p-ea71fb8d.entry.js +1 -0
- package/dist/checkout/{p-95563c4c.entry.js → p-eda93a0b.entry.js} +1 -1
- package/dist/checkout/p-eee05053.entry.js +1 -0
- package/dist/checkout/{p-95431a73.entry.js → p-f8460dc4.entry.js} +1 -1
- package/dist/checkout/p-f875507d.entry.js +1 -0
- package/dist/checkout/p-faf06441.js +4 -0
- package/dist/checkout/p-fb147065.entry.js +1 -0
- package/dist/checkout/{p-af32124b.entry.js → p-fb45cdd1.entry.js} +1 -1
- package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
- package/dist/cjs/amwal-checkout-button_5.cjs.entry.js +1298 -2881
- package/dist/cjs/amwal-installments-guide.cjs.entry.js +42 -43
- package/dist/cjs/amwal-pos.cjs.entry.js +3180 -3452
- package/dist/cjs/amwal-widget-modal.cjs.entry.js +162 -175
- package/dist/cjs/amwal-widget.cjs.entry.js +314 -343
- package/dist/cjs/{animation-BhN-MT4J.js → animation-26241cb2.js} +2 -2
- package/dist/cjs/{app-globals-NtXImkuk.js → app-globals-42a13029.js} +1 -1
- package/dist/cjs/{ar-CbT6TM-Q.js → ar-3a6829a4.js} +10 -4
- package/dist/cjs/{capacitor-CqhugS19.js → capacitor-a9365f60.js} +1 -1
- package/dist/cjs/checkout.cjs.js +19 -16
- package/dist/cjs/{data-UgkxeXMB.js → data-19081291.js} +1 -1
- package/dist/cjs/{form-controller-DRf0gBOg.js → form-controller-3ffb27b1.js} +1 -1
- package/dist/cjs/{framework-delegate-D-6PUvOi.js → framework-delegate-ab2cc190.js} +1 -1
- package/dist/cjs/{gesture-controller-IMq9Cgi2.js → gesture-controller-b1c0efac.js} +1 -1
- package/dist/cjs/{haptic-CC9tl6g8.js → haptic-80174512.js} +1 -1
- package/dist/cjs/{hardware-back-button-C2D2eOk8.js → hardware-back-button-ddfefd22.js} +3 -3
- package/dist/cjs/{helpers-B4vhh9gt.js → helpers-72ba682d.js} +4 -1
- package/dist/cjs/i18n-18ad02d5.js +13 -0
- package/dist/cjs/{index-CKcQE8Zg.js → index-0d0b84fb.js} +4 -3
- package/dist/cjs/{index-6eOg4xTk.js → index-2602a653.js} +0 -1
- package/dist/cjs/{index-DZA7ogU0.js → index-2cd1a895.js} +4 -4
- package/dist/cjs/index-7522b3a9.js +2256 -0
- package/dist/cjs/{index-bc_r9XRf.js → index-9b7d2c31.js} +9 -9
- package/dist/cjs/{index-q1ImtF5k.js → index-ce06e6a3.js} +3 -3
- package/dist/cjs/{index-XMjUjboS.js → index-da554121.js} +3 -3
- package/dist/cjs/{input-shims-CCRbO2DB.js → input-shims-1a8ed779.js} +6 -6
- package/dist/cjs/{input.utils-CyVgmmWQ.js → input.utils-67143876.js} +3 -3
- package/dist/cjs/ion-accordion-group.cjs.entry.js +199 -203
- package/dist/cjs/ion-accordion.cjs.entry.js +305 -305
- package/dist/cjs/ion-action-sheet_3.cjs.entry.js +695 -705
- package/dist/cjs/ion-app.cjs.entry.js +95 -93
- package/dist/cjs/ion-avatar.cjs.entry.js +14 -12
- package/dist/cjs/ion-back-button.cjs.entry.js +78 -76
- package/dist/cjs/ion-backdrop.cjs.entry.js +44 -42
- package/dist/cjs/ion-badge.cjs.entry.js +19 -17
- package/dist/cjs/ion-breadcrumb.cjs.entry.js +86 -84
- package/dist/cjs/ion-breadcrumbs.cjs.entry.js +120 -124
- package/dist/cjs/ion-buttons_3.cjs.entry.js +822 -822
- package/dist/cjs/ion-card-content.cjs.entry.js +19 -17
- package/dist/cjs/ion-card-header.cjs.entry.js +22 -20
- package/dist/cjs/ion-card-subtitle.cjs.entry.js +20 -18
- package/dist/cjs/ion-card-title.cjs.entry.js +20 -18
- package/dist/cjs/ion-card.cjs.entry.js +55 -53
- package/dist/cjs/ion-checkbox_7.cjs.entry.js +862 -882
- package/dist/cjs/ion-chip.cjs.entry.js +24 -22
- package/dist/cjs/ion-col.cjs.entry.js +110 -108
- package/dist/cjs/ion-content.cjs.entry.js +376 -374
- package/dist/cjs/ion-datetime-button.cjs.entry.js +330 -328
- package/dist/cjs/ion-datetime.cjs.entry.js +1547 -1567
- package/dist/cjs/ion-fab-button.cjs.entry.js +78 -76
- package/dist/cjs/ion-fab-list.cjs.entry.js +31 -31
- package/dist/cjs/ion-fab.cjs.entry.js +58 -58
- package/dist/cjs/ion-footer.cjs.entry.js +94 -92
- package/dist/cjs/ion-grid.cjs.entry.js +17 -15
- package/dist/cjs/ion-header.cjs.entry.js +143 -141
- package/dist/cjs/ion-icon.cjs.entry.js +104 -112
- package/dist/cjs/ion-img.cjs.entry.js +83 -83
- package/dist/cjs/ion-infinite-scroll-content.cjs.entry.js +34 -32
- package/dist/cjs/ion-infinite-scroll.cjs.entry.js +174 -176
- package/dist/cjs/ion-input.cjs.entry.js +447 -453
- package/dist/cjs/ion-item-divider.cjs.entry.js +23 -21
- package/dist/cjs/ion-item-group.cjs.entry.js +20 -18
- package/dist/cjs/ion-item-option.cjs.entry.js +45 -43
- package/dist/cjs/ion-item-options.cjs.entry.js +40 -38
- package/dist/cjs/ion-item-sliding.cjs.entry.js +391 -391
- package/dist/cjs/ion-loading.cjs.entry.js +162 -164
- package/dist/cjs/ion-menu-button.cjs.entry.js +60 -58
- package/dist/cjs/ion-menu-toggle.cjs.entry.js +36 -34
- package/dist/cjs/ion-menu.cjs.entry.js +606 -612
- package/dist/cjs/ion-modal.cjs.entry.js +551 -553
- package/dist/cjs/ion-nav-link.cjs.entry.js +17 -15
- package/dist/cjs/ion-nav.cjs.entry.js +823 -825
- package/dist/cjs/ion-note.cjs.entry.js +19 -17
- package/dist/cjs/ion-picker-column.cjs.entry.js +327 -327
- package/dist/cjs/ion-picker.cjs.entry.js +198 -200
- package/dist/cjs/ion-popover.cjs.entry.js +326 -330
- package/dist/cjs/ion-progress-bar.cjs.entry.js +44 -42
- package/dist/cjs/ion-range.cjs.entry.js +644 -654
- package/dist/cjs/ion-refresher-content.cjs.entry.js +53 -51
- package/dist/cjs/ion-refresher.cjs.entry.js +586 -586
- package/dist/cjs/ion-reorder-group.cjs.entry.js +252 -252
- package/dist/cjs/ion-reorder.cjs.entry.js +26 -24
- package/dist/cjs/ion-route-redirect.cjs.entry.js +19 -21
- package/dist/cjs/ion-route.cjs.entry.js +37 -41
- package/dist/cjs/ion-router-link.cjs.entry.js +31 -29
- package/dist/cjs/ion-router-outlet.cjs.entry.js +178 -178
- package/dist/cjs/ion-router.cjs.entry.js +266 -264
- package/dist/cjs/ion-row.cjs.entry.js +12 -10
- package/dist/cjs/ion-searchbar.cjs.entry.js +388 -396
- package/dist/cjs/ion-segment-button.cjs.entry.js +96 -96
- package/dist/cjs/ion-segment.cjs.entry.js +414 -420
- package/dist/cjs/ion-select-option.cjs.entry.js +16 -14
- package/dist/cjs/ion-select.cjs.entry.js +693 -699
- package/dist/cjs/ion-skeleton-text.cjs.entry.js +35 -33
- package/dist/cjs/ion-spinner.cjs.entry.js +50 -48
- package/dist/cjs/ion-split-pane.cjs.entry.js +120 -124
- package/dist/cjs/ion-tab-bar.cjs.entry.js +66 -66
- package/dist/cjs/ion-tab-button.cjs.entry.js +82 -80
- package/dist/cjs/ion-tab.cjs.entry.js +50 -50
- package/dist/cjs/ion-tabs.cjs.entry.js +134 -132
- package/dist/cjs/ion-textarea.cjs.entry.js +396 -400
- package/dist/cjs/ion-thumbnail.cjs.entry.js +12 -10
- package/dist/cjs/ion-title.cjs.entry.js +43 -43
- package/dist/cjs/ion-toast.cjs.entry.js +371 -375
- package/dist/cjs/ion-toggle.cjs.entry.js +230 -230
- package/dist/cjs/ion-toolbar.cjs.entry.js +61 -59
- package/dist/cjs/{ionic-global-DRLi5Iq3.js → ionic-global-3915f1f1.js} +55 -58
- package/dist/cjs/{ios.transition-D4vyO_a_.js → ios.transition-b9c0b967.js} +5 -5
- package/dist/cjs/{keyboard-iyHR2ZF4.js → keyboard-5d4b83b3.js} +3 -3
- package/dist/cjs/{keyboard-DuKzsHsS.js → keyboard-bc8ebbf7.js} +1 -1
- package/dist/cjs/{keyboard-controller-rH21qC_2.js → keyboard-controller-c6633754.js} +2 -2
- package/dist/cjs/loader.cjs.js +19 -8
- package/dist/cjs/{md.transition-Dkxy3kpE.js → md.transition-830acbb7.js} +5 -5
- package/dist/cjs/{menu-toggle-util-CmPuayU0.js → menu-toggle-util-315c26b3.js} +1 -1
- package/dist/cjs/{notch-controller-Dtpow1eD.js → notch-controller-dcf09601.js} +2 -2
- package/dist/cjs/{overlays-Bc8tk6t5.js → overlays-08819e3f.js} +6 -6
- package/dist/cjs/{refresher.utils-CPl6gciv.js → refresher.utils-e41509f7.js} +3 -3
- package/dist/cjs/{status-tap-XtIhF72O.js → status-tap-ec021cb4.js} +4 -4
- package/dist/cjs/{swipe-back-C9j0kufI.js → swipe-back-3d3a5129.js} +4 -4
- package/dist/collection/collection-manifest.json +8 -8
- package/dist/collection/components/amwal-checkout-button/amwal-checkout-button.js +1714 -1888
- package/dist/collection/components/amwal-checkout-button/amwal-checkout-button.stories.js +84 -84
- package/dist/collection/components/amwal-installments-guide/amwal-installments-guide.js +75 -80
- package/dist/collection/components/amwal-installments-guide/amwal-installments-guide.stories.js +25 -25
- package/dist/collection/components/amwal-installments-timeline/amwal-installments-timeline.js +506 -569
- package/dist/collection/components/amwal-installments-timeline/amwal-installments-timeline.stories.js +80 -80
- package/dist/collection/components/amwal-pos/amwal-pos.js +1022 -1094
- package/dist/collection/components/amwal-pos/amwal-pos.stories.js +209 -209
- package/dist/collection/components/amwal-widget/amwal-widget-modal.js +326 -350
- package/dist/collection/components/amwal-widget/amwal-widget.js +673 -736
- package/dist/collection/components/amwal-widget/amwal-widget.stories.js +184 -184
- package/dist/collection/lang/i18n.js +7 -7
- package/dist/components/amwal-checkout-button.d.ts +2 -2
- package/dist/components/amwal-checkout-button.js +3811 -1
- package/dist/components/amwal-installments-guide.d.ts +2 -2
- package/dist/components/amwal-installments-guide.js +75 -1
- package/dist/components/amwal-installments-timeline.d.ts +2 -2
- package/dist/components/amwal-installments-timeline.js +6 -1
- package/dist/components/amwal-pos.d.ts +2 -2
- package/dist/components/amwal-pos.js +3391 -1
- package/dist/components/amwal-widget-modal.d.ts +2 -2
- package/dist/components/amwal-widget-modal.js +6 -1
- package/dist/components/amwal-widget.d.ts +2 -2
- package/dist/components/amwal-widget.js +389 -1
- package/dist/components/index.d.ts +0 -6
- package/dist/components/index.js +6 -1
- package/dist/components/ion-accordion-group.js +248 -1
- package/dist/components/ion-accordion.js +353 -1
- package/dist/components/ion-action-sheet.js +6 -1
- package/dist/components/ion-alert.js +6 -1
- package/dist/components/ion-app.js +125 -1
- package/dist/components/ion-avatar.js +39 -1
- package/dist/components/ion-back-button.js +127 -1
- package/dist/components/ion-backdrop.js +6 -1
- package/dist/components/ion-badge.js +46 -1
- package/dist/components/ion-breadcrumb.js +131 -1
- package/dist/components/ion-breadcrumbs.js +152 -1
- package/dist/components/ion-button.js +6 -1
- package/dist/components/ion-buttons.js +6 -1
- package/dist/components/ion-card-content.js +43 -1
- package/dist/components/ion-card-header.js +50 -1
- package/dist/components/ion-card-subtitle.js +47 -1
- package/dist/components/ion-card-title.js +47 -1
- package/dist/components/ion-card.js +98 -1
- package/dist/components/ion-checkbox.js +6 -1
- package/dist/components/ion-chip.js +59 -1
- package/dist/components/ion-col.js +186 -2
- package/dist/components/ion-content.js +440 -1
- package/dist/components/ion-datetime-button.js +378 -1
- package/dist/components/ion-datetime.js +1961 -2
- package/dist/components/ion-fab-button.js +130 -1
- package/dist/components/ion-fab-list.js +56 -1
- package/dist/components/ion-fab.js +90 -1
- package/dist/components/ion-footer.js +152 -2
- package/dist/components/ion-grid.js +41 -1
- package/dist/components/ion-header.js +356 -2
- package/dist/components/ion-icon.js +6 -1
- package/dist/components/ion-img.js +124 -1
- package/dist/components/ion-infinite-scroll-content.js +69 -1
- package/dist/components/ion-infinite-scroll.js +209 -1
- package/dist/components/ion-input.js +564 -1
- package/dist/components/ion-item-divider.js +51 -1
- package/dist/components/ion-item-group.js +44 -1
- package/dist/components/ion-item-option.js +85 -1
- package/dist/components/ion-item-options.js +67 -1
- package/dist/components/ion-item-sliding.js +449 -1
- package/dist/components/ion-item.js +6 -1
- package/dist/components/ion-label.js +6 -1
- package/dist/components/ion-list-header.js +6 -1
- package/dist/components/ion-list.js +6 -1
- package/dist/components/ion-loading.js +325 -3
- package/dist/components/ion-menu-button.js +100 -1
- package/dist/components/ion-menu-toggle.js +57 -1
- package/dist/components/ion-menu.js +679 -1
- package/dist/components/ion-modal.js +1775 -3
- package/dist/components/ion-nav-link.js +63 -2
- package/dist/components/ion-nav.js +945 -2
- package/dist/components/ion-note.js +6 -1
- package/dist/components/ion-picker-column-internal.js +6 -1
- package/dist/components/ion-picker-column.js +6 -1
- package/dist/components/ion-picker-internal.js +6 -1
- package/dist/components/ion-picker.js +317 -3
- package/dist/components/ion-popover.js +6 -1
- package/dist/components/ion-progress-bar.js +79 -1
- package/dist/components/ion-radio-group.js +6 -1
- package/dist/components/ion-radio.js +6 -1
- package/dist/components/ion-range.js +778 -2
- package/dist/components/ion-refresher-content.js +90 -1
- package/dist/components/ion-refresher.js +652 -1
- package/dist/components/ion-reorder-group.js +300 -1
- package/dist/components/ion-reorder.js +58 -1
- package/dist/components/ion-ripple-effect.js +6 -1
- package/dist/components/ion-route-redirect.js +42 -1
- package/dist/components/ion-route.js +66 -1
- package/dist/components/ion-router-link.js +60 -1
- package/dist/components/ion-router-outlet.js +219 -1
- package/dist/components/ion-router.js +833 -3
- package/dist/components/ion-row.js +34 -1
- package/dist/components/ion-searchbar.js +472 -1
- package/dist/components/ion-segment-button.js +139 -1
- package/dist/components/ion-segment.js +472 -1
- package/dist/components/ion-select-option.js +42 -1
- package/dist/components/ion-select-popover.js +6 -1
- package/dist/components/ion-select.js +864 -1
- package/dist/components/ion-skeleton-text.js +59 -1
- package/dist/components/ion-spinner.js +6 -1
- package/dist/components/ion-split-pane.js +166 -1
- package/dist/components/ion-tab-bar.js +95 -1
- package/dist/components/ion-tab-button.js +125 -1
- package/dist/components/ion-tab.js +80 -1
- package/dist/components/ion-tabs.js +176 -1
- package/dist/components/ion-text.js +6 -1
- package/dist/components/ion-textarea.js +496 -1
- package/dist/components/ion-thumbnail.js +34 -1
- package/dist/components/ion-title.js +71 -1
- package/dist/components/ion-toast.js +914 -3
- package/dist/components/ion-toggle.js +282 -1
- package/dist/components/ion-toolbar.js +91 -1
- package/dist/components/p-01b49f83.js +269 -0
- package/dist/{esm/ios.transition-DMsViooj.js → components/p-02b77441.js} +2 -5
- package/dist/components/p-02bc6b21.js +203 -0
- package/dist/components/p-031ed92d.js +389 -0
- package/dist/components/p-03803c7d.js +369 -0
- package/dist/components/p-089e034e.js +234 -0
- package/dist/components/p-0dc7a5ff.js +512 -0
- package/dist/components/p-110f8490.js +566 -0
- package/dist/components/p-112455b1.js +17 -0
- package/dist/{esm/index-BMJhFU53.js → components/p-1596e301.js} +4 -4
- package/dist/components/p-1785e30a.js +318 -0
- package/dist/{esm/helpers-C6kqtbmV.js → components/p-2bb89b46.js} +5 -2
- package/dist/components/p-2d7d745d.js +224 -0
- package/dist/components/p-2fc99fef.js +262 -0
- package/dist/{esm/input-shims-DSFPFhb7.js → components/p-3296ebd9.js} +4 -6
- package/dist/{esm/data-Cl-_yBA0.js → components/p-39ad94cf.js} +2 -2
- package/dist/{esm/capacitor-CG3xQUND.js → components/p-3d3eefc3.js} +1 -1
- package/dist/{esm/form-controller-xetTxjL6.js → components/p-3e1d2896.js} +1 -1
- package/dist/{esm/keyboard-controller-CqGCg8tB.js → components/p-3e1e3453.js} +2 -2
- package/dist/{esm/md.transition-BQT2r4ED.js → components/p-503328f2.js} +2 -5
- package/dist/components/p-51c44f42.js +98 -0
- package/dist/components/p-5280b372.js +42 -0
- package/dist/{esm/index-DuUXGZp2.js → components/p-53e2dbe4.js} +3 -3
- package/dist/components/p-5441c730.js +851 -0
- package/dist/{esm/refresher.utils-D4tPnZsM.js → components/p-74e68924.js} +4 -4
- package/dist/{esm/framework-delegate-D_uGiYYw.js → components/p-76525f0f.js} +1 -1
- package/dist/{esm/index-CcopIPA0.js → components/p-77104220.js} +6 -4
- package/dist/components/p-77ccb793.js +185 -0
- package/dist/components/p-83e529db.js +380 -0
- package/dist/{esm/animation-DRf3dwMu.js → components/p-89c4c5cb.js} +2 -2
- package/dist/components/p-8b3d1e06.js +67 -0
- package/dist/components/p-901c16c5.js +210 -0
- package/dist/components/p-93e2a608.js +374 -0
- package/dist/components/p-95c79593.js +43 -0
- package/dist/components/p-96073863.js +82 -0
- package/dist/components/p-99e447f9.js +13 -0
- package/dist/{esm/keyboard-DgiyREKb.js → components/p-9b519de5.js} +1 -1
- package/dist/{esm/input.utils-BuIvhxo3.js → components/p-9d350d61.js} +3 -3
- package/dist/{esm/notch-controller-CQeDnZLe.js → components/p-9df67c24.js} +2 -2
- package/dist/components/p-a0e691dd.js +39 -0
- package/dist/components/p-ab10d1ae.js +47 -0
- package/dist/components/p-abc01c5d.js +194 -0
- package/dist/components/p-abd248d1.js +196 -0
- package/dist/{esm/haptic-D5jGzBs8.js → components/p-af073aaf.js} +2 -2
- package/dist/{esm/swipe-back-DE05lWQD.js → components/p-b32529b9.js} +3 -4
- package/dist/{esm/index-C75BfBAE.js → components/p-b8fdd517.js} +1 -2
- package/dist/components/p-cebc113f.js +38 -0
- package/dist/components/p-d25fd077.js +331 -0
- package/dist/{esm/menu-toggle-util-wdO31cdC.js → components/p-d3596f64.js} +1 -1
- package/dist/{esm/keyboard-DcbqYXj5.js → components/p-d60b2328.js} +1 -3
- package/dist/components/p-d69dc32f.js +97 -0
- package/dist/{esm/hardware-back-button-CzxcJiYO.js → components/p-d72e8d7b.js} +2 -3
- package/dist/{esm/ar-B3WORC1a.js → components/p-d839c693.js} +12 -5
- package/dist/{esm/index-D8d_89Nl.js → components/p-e187a77c.js} +1 -1
- package/dist/components/p-e65ea9fb.js +1379 -0
- package/dist/components/p-ec0e3f3f.js +2040 -0
- package/dist/components/p-ecb4db1c.js +64 -0
- package/dist/{esm/gesture-controller-CukVBo5-.js → components/p-f728a68f.js} +1 -1
- package/dist/components/p-f7e3c502.js +73 -0
- package/dist/components/p-fe463a42.js +272 -0
- package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
- package/dist/esm/amwal-checkout-button_5.entry.js +1296 -2881
- package/dist/esm/amwal-installments-guide.entry.js +40 -43
- package/dist/esm/amwal-pos.entry.js +3178 -3452
- package/dist/esm/amwal-widget-modal.entry.js +160 -175
- package/dist/esm/amwal-widget.entry.js +312 -343
- package/dist/esm/animation-a6d5c3b1.js +1063 -0
- package/dist/esm/{app-globals-BHnkZZiH.js → app-globals-c817b28b.js} +1 -1
- package/dist/esm/ar-7d2629bf.js +51 -0
- package/dist/esm/capacitor-ba4337da.js +13 -0
- package/dist/esm/checkout.js +18 -16
- package/dist/esm/config-8e06237c.js +171 -0
- package/dist/esm/cubic-bezier-874f336d.js +90 -0
- package/dist/esm/data-8916315d.js +1628 -0
- package/dist/esm/dir-1d4aa386.js +18 -0
- package/dist/esm/focus-visible-32968d3d.js +75 -0
- package/dist/esm/form-controller-b1aa7393.js +64 -0
- package/dist/esm/framework-delegate-de1aa369.js +140 -0
- package/dist/esm/gesture-controller-58ffa500.js +195 -0
- package/dist/esm/haptic-4d4d8eb1.js +206 -0
- package/dist/esm/hardware-back-button-f93acff0.js +116 -0
- package/dist/esm/helpers-f0dcbd72.js +418 -0
- package/dist/esm/i18n-53f85411.js +13 -0
- package/dist/esm/{index-CNcx43L8.js → index-0b560278.js} +4 -4
- package/dist/esm/index-5894dd63.js +196 -0
- package/dist/esm/{index-DUF6JAQL.js → index-5a126e54.js} +6 -6
- package/dist/esm/index-5e663431.js +128 -0
- package/dist/esm/index-8cc94b11.js +2219 -0
- package/dist/esm/index-afdf867c.js +26 -0
- package/dist/esm/index-d9b41a43.js +34 -0
- package/dist/esm/index-f6dce931.js +466 -0
- package/dist/esm/index-fb97e55c.js +7 -0
- package/dist/esm/input-shims-75d4750d.js +617 -0
- package/dist/esm/input.utils-79bde07f.js +138 -0
- package/dist/esm/ion-accordion-group.entry.js +197 -203
- package/dist/esm/ion-accordion.entry.js +303 -305
- package/dist/esm/ion-action-sheet_3.entry.js +693 -705
- package/dist/esm/ion-app.entry.js +93 -93
- package/dist/esm/ion-avatar.entry.js +12 -12
- package/dist/esm/ion-back-button.entry.js +76 -76
- package/dist/esm/ion-backdrop.entry.js +42 -42
- package/dist/esm/ion-badge.entry.js +17 -17
- package/dist/esm/ion-breadcrumb.entry.js +84 -84
- package/dist/esm/ion-breadcrumbs.entry.js +118 -124
- package/dist/esm/ion-buttons_3.entry.js +820 -822
- package/dist/esm/ion-card-content.entry.js +17 -17
- package/dist/esm/ion-card-header.entry.js +20 -20
- package/dist/esm/ion-card-subtitle.entry.js +18 -18
- package/dist/esm/ion-card-title.entry.js +18 -18
- package/dist/esm/ion-card.entry.js +53 -53
- package/dist/esm/ion-checkbox_7.entry.js +860 -882
- package/dist/esm/ion-chip.entry.js +22 -22
- package/dist/esm/ion-col.entry.js +108 -108
- package/dist/esm/ion-content.entry.js +374 -374
- package/dist/esm/ion-datetime-button.entry.js +328 -328
- package/dist/esm/ion-datetime.entry.js +1545 -1567
- package/dist/esm/ion-fab-button.entry.js +76 -76
- package/dist/esm/ion-fab-list.entry.js +29 -31
- package/dist/esm/ion-fab.entry.js +56 -58
- package/dist/esm/ion-footer.entry.js +92 -92
- package/dist/esm/ion-grid.entry.js +15 -15
- package/dist/esm/ion-header.entry.js +141 -141
- package/dist/esm/ion-icon.entry.js +102 -112
- package/dist/esm/ion-img.entry.js +81 -83
- package/dist/esm/ion-infinite-scroll-content.entry.js +32 -32
- package/dist/esm/ion-infinite-scroll.entry.js +172 -176
- package/dist/esm/ion-input.entry.js +445 -453
- package/dist/esm/ion-item-divider.entry.js +21 -21
- package/dist/esm/ion-item-group.entry.js +18 -18
- package/dist/esm/ion-item-option.entry.js +43 -43
- package/dist/esm/ion-item-options.entry.js +38 -38
- package/dist/esm/ion-item-sliding.entry.js +389 -391
- package/dist/esm/ion-loading.entry.js +160 -164
- package/dist/esm/ion-menu-button.entry.js +58 -58
- package/dist/esm/ion-menu-toggle.entry.js +34 -34
- package/dist/esm/ion-menu.entry.js +604 -612
- package/dist/esm/ion-modal.entry.js +549 -553
- package/dist/esm/ion-nav-link.entry.js +15 -15
- package/dist/esm/ion-nav.entry.js +821 -825
- package/dist/esm/ion-note.entry.js +17 -17
- package/dist/esm/ion-picker-column.entry.js +325 -327
- package/dist/esm/ion-picker.entry.js +196 -200
- package/dist/esm/ion-popover.entry.js +324 -330
- package/dist/esm/ion-progress-bar.entry.js +42 -42
- package/dist/esm/ion-range.entry.js +642 -654
- package/dist/esm/ion-refresher-content.entry.js +51 -51
- package/dist/esm/ion-refresher.entry.js +584 -586
- package/dist/esm/ion-reorder-group.entry.js +250 -252
- package/dist/esm/ion-reorder.entry.js +24 -24
- package/dist/esm/ion-route-redirect.entry.js +17 -21
- package/dist/esm/ion-route.entry.js +35 -41
- package/dist/esm/ion-router-link.entry.js +29 -29
- package/dist/esm/ion-router-outlet.entry.js +176 -178
- package/dist/esm/ion-router.entry.js +264 -264
- package/dist/esm/ion-row.entry.js +10 -10
- package/dist/esm/ion-searchbar.entry.js +386 -396
- package/dist/esm/ion-segment-button.entry.js +94 -96
- package/dist/esm/ion-segment.entry.js +412 -420
- package/dist/esm/ion-select-option.entry.js +14 -14
- package/dist/esm/ion-select.entry.js +691 -699
- package/dist/esm/ion-skeleton-text.entry.js +33 -33
- package/dist/esm/ion-spinner.entry.js +48 -48
- package/dist/esm/ion-split-pane.entry.js +118 -124
- package/dist/esm/ion-tab-bar.entry.js +64 -66
- package/dist/esm/ion-tab-button.entry.js +80 -80
- package/dist/esm/ion-tab.entry.js +48 -50
- package/dist/esm/ion-tabs.entry.js +132 -132
- package/dist/esm/ion-textarea.entry.js +394 -400
- package/dist/esm/ion-thumbnail.entry.js +10 -10
- package/dist/esm/ion-title.entry.js +41 -43
- package/dist/esm/ion-toast.entry.js +369 -375
- package/dist/esm/ion-toggle.entry.js +228 -230
- package/dist/esm/ion-toolbar.entry.js +59 -59
- package/dist/esm/{ionic-global-DXXzPLPc.js → ionic-global-0b7766cb.js} +55 -58
- package/dist/esm/ios.transition-22fb53bc.js +651 -0
- package/dist/esm/keyboard-1f073554.js +82 -0
- package/dist/esm/keyboard-96b6e80b.js +146 -0
- package/dist/esm/keyboard-controller-5a2f625f.js +165 -0
- package/dist/esm/loader.js +17 -8
- package/dist/esm/lock-controller-632e3c10.js +38 -0
- package/dist/esm/md.transition-f6ff9834.js +57 -0
- package/dist/esm/menu-toggle-util-594849ff.js +12 -0
- package/dist/esm/notch-controller-d511b3b3.js +153 -0
- package/dist/esm/{overlays-SBLrmFy6.js → overlays-642a91df.js} +7 -7
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/refresher.utils-19137568.js +196 -0
- package/dist/esm/{status-tap-CjxQA4Bj.js → status-tap-bb6959a8.js} +4 -4
- package/dist/esm/swipe-back-6cec4c33.js +79 -0
- package/dist/esm/theme-35c700b7.js +43 -0
- package/dist/esm/watch-options-7bf43687.js +47 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.ios.css +193 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/accordion/accordion.md.css +135 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.ios.css +127 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/accordion-group/accordion-group.md.css +229 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.ios.css +456 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/action-sheet/action-sheet.md.css +384 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.ios.css +755 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/alert/alert.md.css +770 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/app/app.css +17 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.ios.css +132 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/avatar/avatar.md.css +132 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.ios.css +372 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/back-button/back-button.md.css +385 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.ios.css +136 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/backdrop/backdrop.md.css +136 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.ios.css +168 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/badge/badge.md.css +164 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.ios.css +326 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumb/breadcrumb.md.css +310 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.ios.css +81 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/breadcrumbs/breadcrumbs.md.css +80 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/button/button.ios.css +596 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/button/button.md.css +517 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.ios.css +279 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/buttons/buttons.md.css +299 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card/card.ios.css +203 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card/card.md.css +198 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.ios.css +163 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-content/card-content.md.css +165 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.ios.css +141 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-header/card-header.md.css +138 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.ios.css +138 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-subtitle/card-subtitle.md.css +136 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.ios.css +137 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/card-title/card-title.md.css +137 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.ios.css +536 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/checkbox/checkbox.md.css +552 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.ios.css +212 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/chip/chip.md.css +207 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/col/col.css +200 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/content/content.css +282 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.ios.css +850 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/datetime/datetime.md.css +706 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/datetime-button/datetime-button.css +100 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/fab/fab.css +366 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.ios.css +422 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/fab-button/fab-button.md.css +393 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/fab-list/fab-list.css +240 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.ios.css +146 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/footer/footer.md.css +129 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/grid/grid.css +235 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/header/header.ios.css +250 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/header/header.md.css +133 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/img/img.css +12 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll/infinite-scroll.css +8 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.ios.css +156 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/infinite-scroll-content/infinite-scroll-content.md.css +156 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/input/input.ios.css +833 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/input/input.md.css +1446 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item/item.ios.css +815 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item/item.md.css +1187 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.ios.css +351 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-divider/item-divider.md.css +417 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.ios.css +114 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-group/item-group.md.css +114 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.ios.css +242 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-option/item-option.md.css +236 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.ios.css +287 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-options/item-options.md.css +284 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/item-sliding/item-sliding.css +121 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/label/label.ios.css +334 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/label/label.md.css +421 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/list/list.ios.css +242 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/list/list.md.css +287 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.ios.css +285 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/list-header/list-header.md.css +266 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.ios.css +205 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/loading/loading.md.css +196 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.ios.css +378 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu/menu.md.css +374 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.ios.css +279 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu-button/menu-button.md.css +282 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/menu-toggle/menu-toggle.css +3 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.ios.css +357 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/modal/modal.md.css +272 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/nav/nav.css +64 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/note/note.ios.css +127 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/note/note.md.css +127 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.ios.css +367 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker/picker.md.css +354 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.ios.css +255 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker-column/picker-column.md.css +246 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.ios.css +138 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker-column-internal/picker-column-internal.md.css +196 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.ios.css +262 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/picker-internal/picker-internal.md.css +258 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.ios.css +366 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/popover/popover.md.css +266 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.ios.css +261 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/progress-bar/progress-bar.md.css +261 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.ios.css +557 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/radio/radio.md.css +580 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/range/range.ios.css +660 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/range/range.md.css +819 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.ios.css +321 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/refresher/refresher.md.css +316 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.ios.css +77 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/reorder/reorder.md.css +77 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/reorder-group/reorder-group.css +89 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/ripple-effect/ripple-effect.css +113 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/router-link/router-link.css +84 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/router-outlet/router-outlet.css +64 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/row/row.css +136 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.ios.css +477 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/searchbar/searchbar.md.css +456 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.ios.css +224 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/segment/segment.md.css +214 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.ios.css +520 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/segment-button/segment-button.md.css +506 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select/select.ios.css +787 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select/select.md.css +1374 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select-option/select-option.css +3 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.ios.css +190 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/select-popover/select-popover.md.css +212 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/skeleton-text/skeleton-text.css +108 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/spinner/spinner.css +232 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.ios.css +265 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/split-pane/split-pane.md.css +265 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab/tab.css +4 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.ios.css +252 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab-bar/tab-bar.md.css +239 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.ios.css +477 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tab-button/tab-button.md.css +501 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/tabs/tabs.css +74 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/text/text.css +58 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.ios.css +987 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/textarea/textarea.md.css +1553 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/thumbnail/thumbnail.css +76 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/title/title.ios.css +183 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/title/title.md.css +102 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.ios.css +399 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toast/toast.md.css +429 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.ios.css +680 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toggle/toggle.md.css +625 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.ios.css +265 -0
- package/dist/node_modules/@ionic/core/dist/collection/components/toolbar/toolbar.md.css +244 -0
- package/dist/node_modules/ionicons/dist/collection/components/icon/icon.css +144 -0
- package/dist/types/components/amwal-checkout-button/amwal-checkout-button.d.ts +327 -327
- package/dist/types/components/amwal-checkout-button/amwal-checkout-button.stories.d.ts +34 -34
- package/dist/types/components/amwal-installments-guide/amwal-installments-guide.d.ts +14 -14
- package/dist/types/components/amwal-installments-guide/amwal-installments-guide.stories.d.ts +17 -17
- package/dist/types/components/amwal-installments-timeline/amwal-installments-timeline.d.ts +106 -106
- package/dist/types/components/amwal-installments-timeline/amwal-installments-timeline.stories.d.ts +67 -67
- package/dist/types/components/amwal-pos/amwal-pos.d.ts +228 -228
- package/dist/types/components/amwal-pos/amwal-pos.stories.d.ts +185 -185
- package/dist/types/components/amwal-widget/amwal-widget-modal.d.ts +56 -56
- package/dist/types/components/amwal-widget/amwal-widget.d.ts +165 -165
- package/dist/types/components/amwal-widget/amwal-widget.stories.d.ts +101 -101
- package/dist/types/components.d.ts +0 -206
- package/dist/types/lang/i18n.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +21 -191
- package/loader/cdn.js +3 -1
- package/loader/index.cjs.js +3 -1
- package/loader/index.d.ts +1 -4
- package/loader/index.es2017.js +3 -1
- package/loader/index.js +3 -1
- package/loader/package.json +11 -0
- package/package.json +28 -34
- package/dist/checkout/p-0161d109.entry.js +0 -1
- package/dist/checkout/p-0a8ef1ec.entry.js +0 -1
- package/dist/checkout/p-10a72fbe.entry.js +0 -1
- package/dist/checkout/p-12ed4081.entry.js +0 -1
- package/dist/checkout/p-13c36adc.entry.js +0 -1
- package/dist/checkout/p-194b17d8.entry.js +0 -1
- package/dist/checkout/p-272a1ffd.entry.js +0 -1
- package/dist/checkout/p-307af48b.entry.js +0 -1
- package/dist/checkout/p-3207674d.entry.js +0 -1
- package/dist/checkout/p-3208e56f.entry.js +0 -1
- package/dist/checkout/p-4426eb3b.entry.js +0 -1
- package/dist/checkout/p-458da59f.entry.js +0 -1
- package/dist/checkout/p-46e69508.entry.js +0 -1
- package/dist/checkout/p-49046c16.entry.js +0 -4
- package/dist/checkout/p-53dc0e86.entry.js +0 -1
- package/dist/checkout/p-5a6fc9fd.entry.js +0 -1
- package/dist/checkout/p-5e65653a.entry.js +0 -1
- package/dist/checkout/p-5f124c24.entry.js +0 -1
- package/dist/checkout/p-6a8ad104.entry.js +0 -1
- package/dist/checkout/p-76fb4325.entry.js +0 -1
- package/dist/checkout/p-78db60fb.entry.js +0 -1
- package/dist/checkout/p-8e34a1bb.entry.js +0 -1
- package/dist/checkout/p-91474b10.entry.js +0 -1
- package/dist/checkout/p-93OyAGoo.js +0 -2
- package/dist/checkout/p-94a57258.entry.js +0 -1
- package/dist/checkout/p-BEVStXwd.js +0 -7
- package/dist/checkout/p-BQu7QPd5.js +0 -4
- package/dist/checkout/p-BR7SJd-v.js +0 -4
- package/dist/checkout/p-BcFRJSFv.js +0 -4
- package/dist/checkout/p-BcUxrseY.js +0 -1
- package/dist/checkout/p-BdG893XR.js +0 -4
- package/dist/checkout/p-BgOwfqIY.js +0 -4
- package/dist/checkout/p-Bm9bMvCb.js +0 -4
- package/dist/checkout/p-C03M5ZSM.js +0 -1
- package/dist/checkout/p-C6kqtbmV.js +0 -4
- package/dist/checkout/p-C75BfBAE.js +0 -1
- package/dist/checkout/p-CVrvo9Qz.js +0 -4
- package/dist/checkout/p-ChixdDt6.js +0 -4
- package/dist/checkout/p-Cjnmql4G.js +0 -8
- package/dist/checkout/p-D0I0TqZU.js +0 -4
- package/dist/checkout/p-D2NxOvQ8.js +0 -4
- package/dist/checkout/p-D8d_89Nl.js +0 -4
- package/dist/checkout/p-DAhcxcAh.js +0 -4
- package/dist/checkout/p-DDtPO7yO.js +0 -4
- package/dist/checkout/p-DKg_dYcq.js +0 -4
- package/dist/checkout/p-DMAPbDyG.js +0 -4
- package/dist/checkout/p-DihS-5gH.js +0 -4
- package/dist/checkout/p-DkrNcwKK.js +0 -5
- package/dist/checkout/p-Dzj_jqIY.js +0 -4
- package/dist/checkout/p-E8AXUhZ3.js +0 -7
- package/dist/checkout/p-Ufaww5Lq.js +0 -4
- package/dist/checkout/p-a90efa79.entry.js +0 -1
- package/dist/checkout/p-abd12b84.entry.js +0 -1
- package/dist/checkout/p-abe1becc.entry.js +0 -1
- package/dist/checkout/p-b2f66c60.entry.js +0 -4
- package/dist/checkout/p-b45f5952.entry.js +0 -1
- package/dist/checkout/p-c2240d19.entry.js +0 -1
- package/dist/checkout/p-c28b4374.entry.js +0 -1
- package/dist/checkout/p-cb2db223.entry.js +0 -1
- package/dist/checkout/p-cb3967fc.entry.js +0 -1
- package/dist/checkout/p-cef16f11.entry.js +0 -1
- package/dist/checkout/p-df1b4347.entry.js +0 -4
- package/dist/checkout/p-e4bc42fb.entry.js +0 -1
- package/dist/checkout/p-e785fb8a.entry.js +0 -1
- package/dist/checkout/p-e8bd206a.entry.js +0 -1
- package/dist/checkout/p-ef749875.entry.js +0 -1
- package/dist/checkout/p-f157b6b2.entry.js +0 -4
- package/dist/checkout/p-f351a19a.entry.js +0 -1
- package/dist/checkout/p-ff2e59e3.entry.js +0 -1
- package/dist/checkout/p-hAETByzF.js +0 -5
- package/dist/checkout/p-vn1iXXUO.js +0 -9
- package/dist/cjs/i18n-uGNv9SLK.js +0 -13
- package/dist/cjs/index-DncWzXDA.js +0 -3738
- package/dist/components/p-55BwDerf.js +0 -8
- package/dist/components/p-B-M4K7iJ.js +0 -7
- package/dist/components/p-B-hirT0v.js +0 -4
- package/dist/components/p-B3WORC1a.js +0 -1
- package/dist/components/p-B5XH2zAk.js +0 -1
- package/dist/components/p-B5ZghgSh.js +0 -4
- package/dist/components/p-BEVStXwd.js +0 -7
- package/dist/components/p-BH0TCnxk.js +0 -4
- package/dist/components/p-BIA8A9ZO.js +0 -1
- package/dist/components/p-BOkYKP6F.js +0 -1
- package/dist/components/p-BOm0KT2x.js +0 -1
- package/dist/components/p-Bb_Zji0h.js +0 -4
- package/dist/components/p-BmVRXR1y.js +0 -4
- package/dist/components/p-BnQDByf2.js +0 -1
- package/dist/components/p-BoxjYI-Q.js +0 -4
- package/dist/components/p-BriBxgcM.js +0 -1
- package/dist/components/p-BwKjt_Dc.js +0 -4
- package/dist/components/p-Bx78uXfc.js +0 -5
- package/dist/components/p-C-20JWsp.js +0 -4
- package/dist/components/p-C03M5ZSM.js +0 -1
- package/dist/components/p-C53feagD.js +0 -4
- package/dist/components/p-CLrB3zV0.js +0 -4
- package/dist/components/p-CN34uOrj.js +0 -9
- package/dist/components/p-CQmcNwZM.js +0 -4
- package/dist/components/p-CYd0Smt1.js +0 -1
- package/dist/components/p-CgPXSjzI.js +0 -4
- package/dist/components/p-Cho32MPa.js +0 -4
- package/dist/components/p-ClE6rMJs.js +0 -4
- package/dist/components/p-Cm9b7fIl.js +0 -1
- package/dist/components/p-CukVBo5-.js +0 -4
- package/dist/components/p-D2NxOvQ8.js +0 -4
- package/dist/components/p-D4DqwBlW.js +0 -4
- package/dist/components/p-D7YY0NXg.js +0 -4
- package/dist/components/p-D8OVJo1v.js +0 -7
- package/dist/components/p-DKg_dYcq.js +0 -4
- package/dist/components/p-DLVYPrYs.js +0 -1
- package/dist/components/p-DMmSL7_l.js +0 -1
- package/dist/components/p-DOPF2QRF.js +0 -1
- package/dist/components/p-DTgJTJD6.js +0 -1
- package/dist/components/p-DiVJyqlX.js +0 -4
- package/dist/components/p-DrS88eFz.js +0 -1
- package/dist/components/p-Dtdm8lKC.js +0 -4
- package/dist/components/p-DuZ7hY1a.js +0 -4
- package/dist/components/p-Dx-C8Ob_.js +0 -7
- package/dist/components/p-DxEgz9x_.js +0 -1
- package/dist/components/p-DxSo4SXG.js +0 -1
- package/dist/components/p-HSPzo8it.js +0 -1
- package/dist/components/p-OrwCUtWu.js +0 -4
- package/dist/components/p-UgkI2Wa4.js +0 -1
- package/dist/components/p-VeNdmYSo.js +0 -1
- package/dist/components/p-YbpebnFS.js +0 -4
- package/dist/components/p-ZjP4CjeZ.js +0 -4
- package/dist/components/p-_VuKPdkD.js +0 -4
- package/dist/components/p-aWL6BxTN.js +0 -4
- package/dist/components/p-hHmYLOfE.js +0 -4
- package/dist/components/p-qoI-S7yk.js +0 -4
- package/dist/components/p-uXV7tzS3.js +0 -1
- package/dist/components/p-yu3xCFhr.js +0 -7
- package/dist/components/p-zp5f483d.js +0 -1
- package/dist/esm/i18n-C_AfxZ5D.js +0 -13
- package/dist/esm/index-93OyAGoo.js +0 -3721
- /package/dist/checkout/{p-B-hirT0v.js → p-01ad898f.js} +0 -0
- /package/dist/checkout/{p-DiVJyqlX.js → p-350e7423.js} +0 -0
- /package/dist/checkout/{p-sObYyvOy.js → p-52b4c112.js} +0 -0
- /package/dist/checkout/{p-BmVRXR1y.js → p-620fa0ec.js} +0 -0
- /package/dist/checkout/{p-hHmYLOfE.js → p-94286cc3.js} +0 -0
- /package/dist/checkout/{p-D4RIp70E.js → p-9efbca93.js} +0 -0
- /package/dist/checkout/{p-Dtdm8lKC.js → p-9f4ac833.js} +0 -0
- /package/dist/checkout/{p-yu3xCFhr.js → p-b2289937.js} +0 -0
- /package/dist/checkout/{p-C53feagD.js → p-d5862637.js} +0 -0
- /package/dist/checkout/{p-ZjP4CjeZ.js → p-d7fe59ee.js} +0 -0
- /package/dist/{components/p-CYPPT3AE.js → checkout/p-e187a77c.js} +0 -0
- /package/dist/checkout/{p-CukVBo5-.js → p-f728a68f.js} +0 -0
- /package/dist/cjs/{compare-with-utils-JlLIkecm.js → compare-with-utils-adbe64a6.js} +0 -0
- /package/dist/cjs/{config-ptk2Lf4l.js → config-e2a8c0c7.js} +0 -0
- /package/dist/cjs/{cubic-bezier-Bv3PvaRI.js → cubic-bezier-5ff9b04e.js} +0 -0
- /package/dist/cjs/{dir-Br-7_bel.js → dir-374f13f2.js} +0 -0
- /package/dist/cjs/{focus-visible-Da2o6bTP.js → focus-visible-b7381162.js} +0 -0
- /package/dist/cjs/{index-CH3IFTaK.js → index-071786b4.js} +0 -0
- /package/dist/cjs/{index-D3mJ1Cix.js → index-a281cac3.js} +0 -0
- /package/dist/cjs/{lock-controller-58TZFRHC.js → lock-controller-e2dfece6.js} +0 -0
- /package/dist/cjs/{spinner-configs-BN41iw42.js → spinner-configs-036ebfd8.js} +0 -0
- /package/dist/cjs/{theme-DbHdw1Nx.js → theme-12dec869.js} +0 -0
- /package/dist/cjs/{watch-options-DOFUPyuf.js → watch-options-1cccbe6a.js} +0 -0
- /package/dist/{esm/lock-controller-B-hirT0v.js → components/p-01ad898f.js} +0 -0
- /package/dist/{esm/theme-DiVJyqlX.js → components/p-350e7423.js} +0 -0
- /package/dist/{esm/focus-visible-BmVRXR1y.js → components/p-620fa0ec.js} +0 -0
- /package/dist/{esm/cubic-bezier-hHmYLOfE.js → components/p-94286cc3.js} +0 -0
- /package/dist/{esm/watch-options-Dtdm8lKC.js → components/p-9f4ac833.js} +0 -0
- /package/dist/{esm/config-yu3xCFhr.js → components/p-b2289937.js} +0 -0
- /package/dist/{esm/dir-C53feagD.js → components/p-d5862637.js} +0 -0
- /package/dist/{esm/index-ZjP4CjeZ.js → components/p-d7fe59ee.js} +0 -0
- /package/dist/esm/{compare-with-utils-sObYyvOy.js → compare-with-utils-d58be312.js} +0 -0
- /package/dist/esm/{spinner-configs-D4RIp70E.js → spinner-configs-c9fb0813.js} +0 -0
|
@@ -1,882 +1,880 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host,
|
|
2
|
-
import { g as getIonMode, a as isPlatform } from './ionic-global-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { c as createColorClasses } from './theme-
|
|
6
|
-
import './capacitor-
|
|
7
|
-
import './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, d as createEvent, e as getElement } from './index-8cc94b11.js';
|
|
2
|
+
import { g as getIonMode, a as isPlatform } from './ionic-global-0b7766cb.js';
|
|
3
|
+
import { b as raf, g as getElementRoot } from './helpers-f0dcbd72.js';
|
|
4
|
+
import { a as hapticSelectionStart, b as hapticSelectionChanged, c as hapticSelectionEnd } from './haptic-4d4d8eb1.js';
|
|
5
|
+
import { c as createColorClasses } from './theme-35c700b7.js';
|
|
6
|
+
import './capacitor-ba4337da.js';
|
|
7
|
+
import './index-fb97e55c.js';
|
|
8
8
|
|
|
9
|
-
const buttonsIosCss =
|
|
9
|
+
const buttonsIosCss = ".sc-ion-buttons-ios-h{display:flex;align-items:center;transform:translateZ(0);z-index:99}.sc-ion-buttons-ios-s ion-button{--padding-top:0;--padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.sc-ion-buttons-ios-s ion-button{--padding-top:3px;--padding-bottom:3px;--padding-start:5px;--padding-end:5px;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;min-height:32px}.sc-ion-buttons-ios-s .button-has-icon-only{--padding-top:0;--padding-bottom:0}.sc-ion-buttons-ios-s ion-button:not(.button-round){--border-radius:4px}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button{--color:initial;--border-color:initial;--background-focused:var(--ion-color-contrast)}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button-solid,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button-solid{--background:var(--ion-color-contrast);--background-focused:#000;--background-focused-opacity:.12;--background-activated:#000;--background-activated-opacity:.12;--background-hover:var(--ion-color-base);--background-hover-opacity:0.45;--color:var(--ion-color-base);--color-focused:var(--ion-color-base)}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button-clear,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button-clear{--color-activated:var(--ion-color-contrast);--color-focused:var(--ion-color-contrast)}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button-outline,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button-outline{--color-activated:var(--ion-color-base);--color-focused:var(--ion-color-contrast);--background-activated:var(--ion-color-contrast)}.sc-ion-buttons-ios-s .button-clear,.sc-ion-buttons-ios-s .button-outline{--background-activated:transparent;--background-focused:currentColor;--background-hover:transparent}.sc-ion-buttons-ios-s .button-solid:not(.ion-color){--background-focused:#000;--background-focused-opacity:.12;--background-activated:#000;--background-activated-opacity:.12}.sc-ion-buttons-ios-s ion-icon[slot=start]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-margin-end:0.3em;margin-inline-end:0.3em;font-size:1.41em;line-height:0.67}.sc-ion-buttons-ios-s ion-icon[slot=end]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-margin-start:0.4em;margin-inline-start:0.4em;font-size:1.41em;line-height:0.67}.sc-ion-buttons-ios-s ion-icon[slot=icon-only]{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;font-size:1.65em;line-height:0.67}";
|
|
10
10
|
|
|
11
|
-
const buttonsMdCss =
|
|
11
|
+
const buttonsMdCss = ".sc-ion-buttons-md-h{display:flex;align-items:center;transform:translateZ(0);z-index:99}.sc-ion-buttons-md-s ion-button{--padding-top:0;--padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.sc-ion-buttons-md-s ion-button{--padding-top:3px;--padding-bottom:3px;--padding-start:8px;--padding-end:8px;--box-shadow:none;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;min-height:32px}.sc-ion-buttons-md-s .button-has-icon-only{--padding-top:0;--padding-bottom:0}.sc-ion-buttons-md-s ion-button:not(.button-round){--border-radius:2px}.sc-ion-buttons-md-h.ion-color.sc-ion-buttons-md-s .button,.ion-color .sc-ion-buttons-md-h.sc-ion-buttons-md-s .button{--color:initial;--color-focused:var(--ion-color-contrast);--color-hover:var(--ion-color-contrast);--background-activated:transparent;--background-focused:var(--ion-color-contrast);--background-hover:var(--ion-color-contrast)}.sc-ion-buttons-md-h.ion-color.sc-ion-buttons-md-s .button-solid,.ion-color .sc-ion-buttons-md-h.sc-ion-buttons-md-s .button-solid{--background:var(--ion-color-contrast);--background-activated:transparent;--background-focused:var(--ion-color-shade);--background-hover:var(--ion-color-base);--color:var(--ion-color-base);--color-focused:var(--ion-color-base);--color-hover:var(--ion-color-base)}.sc-ion-buttons-md-h.ion-color.sc-ion-buttons-md-s .button-outline,.ion-color .sc-ion-buttons-md-h.sc-ion-buttons-md-s .button-outline{--border-color:var(--ion-color-contrast)}.sc-ion-buttons-md-s .button-has-icon-only.button-clear{--padding-top:12px;--padding-end:12px;--padding-bottom:12px;--padding-start:12px;--border-radius:50%;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;width:3rem;height:3rem}.sc-ion-buttons-md-s .button{--background-hover:currentColor}.sc-ion-buttons-md-s .button-solid{--color:var(--ion-toolbar-background, var(--ion-background-color, #fff));--background:var(--ion-toolbar-color, var(--ion-text-color, #424242));--background-activated:transparent;--background-focused:currentColor}.sc-ion-buttons-md-s .button-outline{--color:initial;--background:transparent;--background-activated:transparent;--background-focused:currentColor;--background-hover:currentColor;--border-color:currentColor}.sc-ion-buttons-md-s .button-clear{--color:initial;--background:transparent;--background-activated:transparent;--background-focused:currentColor;--background-hover:currentColor}.sc-ion-buttons-md-s ion-icon[slot=start]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-margin-end:0.3em;margin-inline-end:0.3em;font-size:1.4em}.sc-ion-buttons-md-s ion-icon[slot=end]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;-webkit-margin-start:0.4em;margin-inline-start:0.4em;font-size:1.4em}.sc-ion-buttons-md-s ion-icon[slot=icon-only]{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;font-size:1.8em}";
|
|
12
12
|
|
|
13
13
|
const Buttons = class {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
constructor(hostRef) {
|
|
15
|
+
registerInstance(this, hostRef);
|
|
16
|
+
this.collapse = false;
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
const mode = getIonMode(this);
|
|
20
|
+
return (h(Host, { key: '2929fd8c4469bab2953c23d47f601706acb104f1', class: {
|
|
21
|
+
[mode]: true,
|
|
22
|
+
['buttons-collapse']: this.collapse,
|
|
23
|
+
} }));
|
|
24
|
+
}
|
|
25
25
|
};
|
|
26
26
|
Buttons.style = {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
ios: buttonsIosCss,
|
|
28
|
+
md: buttonsMdCss
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
const pickerColumnInternalIosCss =
|
|
31
|
+
const pickerColumnInternalIosCss = ":host{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;height:200px;outline:none;font-size:22px;scroll-snap-type:y mandatory;overflow-x:hidden;overflow-y:scroll;scrollbar-width:none;text-align:center}:host::-webkit-scrollbar{display:none}:host .picker-item{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden;scroll-snap-align:center}:host .picker-item-empty,:host .picker-item[disabled]{cursor:default}:host .picker-item-empty,:host(:not([disabled])) .picker-item[disabled]{scroll-snap-align:none}:host([disabled]){overflow-y:hidden}:host .picker-item[disabled]{opacity:0.4}:host(.picker-column-active) .picker-item.picker-item-active{color:var(--ion-color-base)}@media (any-hover: hover){:host(:focus){outline:none;background:rgba(var(--ion-color-base-rgb), 0.2)}}";
|
|
32
32
|
|
|
33
|
-
const pickerColumnInternalMdCss =
|
|
33
|
+
const pickerColumnInternalMdCss = ":host{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;height:200px;outline:none;font-size:22px;scroll-snap-type:y mandatory;overflow-x:hidden;overflow-y:scroll;scrollbar-width:none;text-align:center}:host::-webkit-scrollbar{display:none}:host .picker-item{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden;scroll-snap-align:center}:host .picker-item-empty,:host .picker-item[disabled]{cursor:default}:host .picker-item-empty,:host(:not([disabled])) .picker-item[disabled]{scroll-snap-align:none}:host([disabled]){overflow-y:hidden}:host .picker-item[disabled]{opacity:0.4}:host(.picker-column-active) .picker-item.picker-item-active{color:var(--ion-color-base)}@media (any-hover: hover){:host(:focus){outline:none;background:rgba(var(--ion-color-base-rgb), 0.2)}}:host .picker-item-active{color:var(--ion-color-base)}";
|
|
34
34
|
|
|
35
35
|
const PickerColumnInternal = class {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
36
|
+
constructor(hostRef) {
|
|
37
|
+
registerInstance(this, hostRef);
|
|
38
|
+
this.ionChange = createEvent(this, "ionChange", 7);
|
|
39
|
+
this.isScrolling = false;
|
|
40
|
+
this.isColumnVisible = false;
|
|
41
|
+
this.canExitInputMode = true;
|
|
42
|
+
this.centerPickerItemInView = (target, smooth = true, canExitInputMode = true) => {
|
|
43
|
+
const { el, isColumnVisible } = this;
|
|
44
|
+
if (isColumnVisible) {
|
|
45
|
+
// (Vertical offset from parent) - (three empty picker rows) + (half the height of the target to ensure the scroll triggers)
|
|
46
|
+
const top = target.offsetTop - 3 * target.clientHeight + target.clientHeight / 2;
|
|
47
|
+
if (el.scrollTop !== top) {
|
|
48
|
+
/**
|
|
49
|
+
* Setting this flag prevents input
|
|
50
|
+
* mode from exiting in the picker column's
|
|
51
|
+
* scroll callback. This is useful when the user manually
|
|
52
|
+
* taps an item or types on the keyboard as both
|
|
53
|
+
* of these can cause a scroll to occur.
|
|
54
|
+
*/
|
|
55
|
+
this.canExitInputMode = canExitInputMode;
|
|
56
|
+
el.scroll({
|
|
57
|
+
top,
|
|
58
|
+
left: 0,
|
|
59
|
+
behavior: smooth ? 'smooth' : undefined,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
this.setPickerItemActiveState = (item, isActive) => {
|
|
65
|
+
if (isActive) {
|
|
66
|
+
item.classList.add(PICKER_ITEM_ACTIVE_CLASS);
|
|
67
|
+
item.part.add(PICKER_ITEM_ACTIVE_PART);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
item.classList.remove(PICKER_ITEM_ACTIVE_CLASS);
|
|
71
|
+
item.part.remove(PICKER_ITEM_ACTIVE_PART);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* When ionInputModeChange is emitted, each column
|
|
76
|
+
* needs to check if it is the one being made available
|
|
77
|
+
* for text entry.
|
|
78
|
+
*/
|
|
79
|
+
this.inputModeChange = (ev) => {
|
|
80
|
+
if (!this.numericInput) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const { useInputMode, inputModeColumn } = ev.detail;
|
|
84
|
+
/**
|
|
85
|
+
* If inputModeColumn is undefined then this means
|
|
86
|
+
* all numericInput columns are being selected.
|
|
87
|
+
*/
|
|
88
|
+
const isColumnActive = inputModeColumn === undefined || inputModeColumn === this.el;
|
|
89
|
+
if (!useInputMode || !isColumnActive) {
|
|
90
|
+
this.setInputModeActive(false);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
this.setInputModeActive(true);
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Setting isActive will cause a re-render.
|
|
97
|
+
* As a result, we do not want to cause the
|
|
98
|
+
* re-render mid scroll as this will cause
|
|
99
|
+
* the picker column to jump back to
|
|
100
|
+
* whatever value was selected at the
|
|
101
|
+
* start of the scroll interaction.
|
|
102
|
+
*/
|
|
103
|
+
this.setInputModeActive = (state) => {
|
|
104
|
+
if (this.isScrolling) {
|
|
105
|
+
this.scrollEndCallback = () => {
|
|
106
|
+
this.isActive = state;
|
|
73
107
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
this.isActive = state;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* When the column scrolls, the component
|
|
114
|
+
* needs to determine which item is centered
|
|
115
|
+
* in the view and will emit an ionChange with
|
|
116
|
+
* the item object.
|
|
117
|
+
*/
|
|
118
|
+
this.initializeScrollListener = () => {
|
|
119
|
+
/**
|
|
120
|
+
* The haptics for the wheel picker are
|
|
121
|
+
* an iOS-only feature. As a result, they should
|
|
122
|
+
* be disabled on Android.
|
|
123
|
+
*/
|
|
124
|
+
const enableHaptics = isPlatform('ios');
|
|
125
|
+
const { el } = this;
|
|
126
|
+
let timeout;
|
|
127
|
+
let activeEl = this.activeItem;
|
|
128
|
+
const scrollCallback = () => {
|
|
129
|
+
raf(() => {
|
|
130
|
+
if (timeout) {
|
|
131
|
+
clearTimeout(timeout);
|
|
132
|
+
timeout = undefined;
|
|
133
|
+
}
|
|
134
|
+
if (!this.isScrolling) {
|
|
135
|
+
enableHaptics && hapticSelectionStart();
|
|
136
|
+
this.isScrolling = true;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Select item in the center of the column
|
|
140
|
+
* which is the month/year that we want to select
|
|
141
|
+
*/
|
|
142
|
+
const bbox = el.getBoundingClientRect();
|
|
143
|
+
const centerX = bbox.x + bbox.width / 2;
|
|
144
|
+
const centerY = bbox.y + bbox.height / 2;
|
|
145
|
+
const activeElement = el.shadowRoot.elementFromPoint(centerX, centerY);
|
|
146
|
+
if (activeEl !== null) {
|
|
147
|
+
this.setPickerItemActiveState(activeEl, false);
|
|
148
|
+
}
|
|
149
|
+
if (activeElement === null || activeElement.disabled) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* If we are selecting a new value,
|
|
154
|
+
* we need to run haptics again.
|
|
155
|
+
*/
|
|
156
|
+
if (activeElement !== activeEl) {
|
|
157
|
+
enableHaptics && hapticSelectionChanged();
|
|
158
|
+
if (this.canExitInputMode) {
|
|
159
|
+
/**
|
|
160
|
+
* The native iOS wheel picker
|
|
161
|
+
* only dismisses the keyboard
|
|
162
|
+
* once the selected item has changed
|
|
163
|
+
* as a result of a swipe
|
|
164
|
+
* from the user. If `canExitInputMode` is
|
|
165
|
+
* `false` then this means that the
|
|
166
|
+
* scroll is happening as a result of
|
|
167
|
+
* the `value` property programmatically changing
|
|
168
|
+
* either by an application or by the user via the keyboard.
|
|
169
|
+
*/
|
|
170
|
+
this.exitInputMode();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
activeEl = activeElement;
|
|
174
|
+
this.setPickerItemActiveState(activeElement, true);
|
|
175
|
+
timeout = setTimeout(() => {
|
|
176
|
+
this.isScrolling = false;
|
|
177
|
+
enableHaptics && hapticSelectionEnd();
|
|
84
178
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
179
|
+
* Certain tasks (such as those that
|
|
180
|
+
* cause re-renders) should only be done
|
|
181
|
+
* once scrolling has finished, otherwise
|
|
182
|
+
* flickering may occur.
|
|
87
183
|
*/
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
this.setInputModeActive(true);
|
|
94
|
-
};
|
|
95
|
-
/**
|
|
96
|
-
* Setting isActive will cause a re-render.
|
|
97
|
-
* As a result, we do not want to cause the
|
|
98
|
-
* re-render mid scroll as this will cause
|
|
99
|
-
* the picker column to jump back to
|
|
100
|
-
* whatever value was selected at the
|
|
101
|
-
* start of the scroll interaction.
|
|
102
|
-
*/
|
|
103
|
-
this.setInputModeActive = (state) => {
|
|
104
|
-
if (this.isScrolling) {
|
|
105
|
-
this.scrollEndCallback = () => {
|
|
106
|
-
this.isActive = state;
|
|
107
|
-
};
|
|
108
|
-
return;
|
|
184
|
+
const { scrollEndCallback } = this;
|
|
185
|
+
if (scrollEndCallback) {
|
|
186
|
+
scrollEndCallback();
|
|
187
|
+
this.scrollEndCallback = undefined;
|
|
109
188
|
}
|
|
110
|
-
this.isActive = state;
|
|
111
|
-
};
|
|
112
|
-
/**
|
|
113
|
-
* When the column scrolls, the component
|
|
114
|
-
* needs to determine which item is centered
|
|
115
|
-
* in the view and will emit an ionChange with
|
|
116
|
-
* the item object.
|
|
117
|
-
*/
|
|
118
|
-
this.initializeScrollListener = () => {
|
|
119
189
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
* be
|
|
190
|
+
* Reset this flag as the
|
|
191
|
+
* next scroll interaction could
|
|
192
|
+
* be a scroll from the user. In this
|
|
193
|
+
* case, we should exit input mode.
|
|
123
194
|
*/
|
|
124
|
-
|
|
125
|
-
const
|
|
126
|
-
let timeout;
|
|
127
|
-
let activeEl = this.activeItem;
|
|
128
|
-
const scrollCallback = () => {
|
|
129
|
-
raf(() => {
|
|
130
|
-
if (timeout) {
|
|
131
|
-
clearTimeout(timeout);
|
|
132
|
-
timeout = undefined;
|
|
133
|
-
}
|
|
134
|
-
if (!this.isScrolling) {
|
|
135
|
-
enableHaptics && hapticSelectionStart();
|
|
136
|
-
this.isScrolling = true;
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Select item in the center of the column
|
|
140
|
-
* which is the month/year that we want to select
|
|
141
|
-
*/
|
|
142
|
-
const bbox = el.getBoundingClientRect();
|
|
143
|
-
const centerX = bbox.x + bbox.width / 2;
|
|
144
|
-
const centerY = bbox.y + bbox.height / 2;
|
|
145
|
-
const activeElement = el.shadowRoot.elementFromPoint(centerX, centerY);
|
|
146
|
-
if (activeEl !== null) {
|
|
147
|
-
this.setPickerItemActiveState(activeEl, false);
|
|
148
|
-
}
|
|
149
|
-
if (activeElement === null || activeElement.disabled) {
|
|
150
|
-
return;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* If we are selecting a new value,
|
|
154
|
-
* we need to run haptics again.
|
|
155
|
-
*/
|
|
156
|
-
if (activeElement !== activeEl) {
|
|
157
|
-
enableHaptics && hapticSelectionChanged();
|
|
158
|
-
if (this.canExitInputMode) {
|
|
159
|
-
/**
|
|
160
|
-
* The native iOS wheel picker
|
|
161
|
-
* only dismisses the keyboard
|
|
162
|
-
* once the selected item has changed
|
|
163
|
-
* as a result of a swipe
|
|
164
|
-
* from the user. If `canExitInputMode` is
|
|
165
|
-
* `false` then this means that the
|
|
166
|
-
* scroll is happening as a result of
|
|
167
|
-
* the `value` property programmatically changing
|
|
168
|
-
* either by an application or by the user via the keyboard.
|
|
169
|
-
*/
|
|
170
|
-
this.exitInputMode();
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
activeEl = activeElement;
|
|
174
|
-
this.setPickerItemActiveState(activeElement, true);
|
|
175
|
-
timeout = setTimeout(() => {
|
|
176
|
-
this.isScrolling = false;
|
|
177
|
-
enableHaptics && hapticSelectionEnd();
|
|
178
|
-
/**
|
|
179
|
-
* Certain tasks (such as those that
|
|
180
|
-
* cause re-renders) should only be done
|
|
181
|
-
* once scrolling has finished, otherwise
|
|
182
|
-
* flickering may occur.
|
|
183
|
-
*/
|
|
184
|
-
const { scrollEndCallback } = this;
|
|
185
|
-
if (scrollEndCallback) {
|
|
186
|
-
scrollEndCallback();
|
|
187
|
-
this.scrollEndCallback = undefined;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Reset this flag as the
|
|
191
|
-
* next scroll interaction could
|
|
192
|
-
* be a scroll from the user. In this
|
|
193
|
-
* case, we should exit input mode.
|
|
194
|
-
*/
|
|
195
|
-
this.canExitInputMode = true;
|
|
196
|
-
const dataIndex = activeElement.getAttribute('data-index');
|
|
197
|
-
/**
|
|
198
|
-
* If no value it is
|
|
199
|
-
* possible we hit one of the
|
|
200
|
-
* empty padding columns.
|
|
201
|
-
*/
|
|
202
|
-
if (dataIndex === null) {
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
const index = parseInt(dataIndex, 10);
|
|
206
|
-
const selectedItem = this.items[index];
|
|
207
|
-
if (selectedItem.value !== this.value) {
|
|
208
|
-
this.setValue(selectedItem.value);
|
|
209
|
-
}
|
|
210
|
-
}, 250);
|
|
211
|
-
});
|
|
212
|
-
};
|
|
213
|
-
/**
|
|
214
|
-
* Wrap this in an raf so that the scroll callback
|
|
215
|
-
* does not fire when component is initially shown.
|
|
216
|
-
*/
|
|
217
|
-
raf(() => {
|
|
218
|
-
el.addEventListener('scroll', scrollCallback);
|
|
219
|
-
this.destroyScrollListener = () => {
|
|
220
|
-
el.removeEventListener('scroll', scrollCallback);
|
|
221
|
-
};
|
|
222
|
-
});
|
|
223
|
-
};
|
|
224
|
-
/**
|
|
225
|
-
* Tells the parent picker to
|
|
226
|
-
* exit text entry mode. This is only called
|
|
227
|
-
* when the selected item changes during scroll, so
|
|
228
|
-
* we know that the user likely wants to scroll
|
|
229
|
-
* instead of type.
|
|
230
|
-
*/
|
|
231
|
-
this.exitInputMode = () => {
|
|
232
|
-
const { parentEl } = this;
|
|
233
|
-
if (parentEl == null)
|
|
234
|
-
return;
|
|
235
|
-
parentEl.exitInputMode();
|
|
195
|
+
this.canExitInputMode = true;
|
|
196
|
+
const dataIndex = activeElement.getAttribute('data-index');
|
|
236
197
|
/**
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
* However, we want the visual active
|
|
241
|
-
* indicator to go away immediately, so
|
|
242
|
-
* we call classList.remove here.
|
|
198
|
+
* If no value it is
|
|
199
|
+
* possible we hit one of the
|
|
200
|
+
* empty padding columns.
|
|
243
201
|
*/
|
|
244
|
-
|
|
202
|
+
if (dataIndex === null) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
const index = parseInt(dataIndex, 10);
|
|
206
|
+
const selectedItem = this.items[index];
|
|
207
|
+
if (selectedItem.value !== this.value) {
|
|
208
|
+
this.setValue(selectedItem.value);
|
|
209
|
+
}
|
|
210
|
+
}, 250);
|
|
211
|
+
});
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Wrap this in an raf so that the scroll callback
|
|
215
|
+
* does not fire when component is initially shown.
|
|
216
|
+
*/
|
|
217
|
+
raf(() => {
|
|
218
|
+
el.addEventListener('scroll', scrollCallback);
|
|
219
|
+
this.destroyScrollListener = () => {
|
|
220
|
+
el.removeEventListener('scroll', scrollCallback);
|
|
245
221
|
};
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
this.items = [];
|
|
249
|
-
this.value = undefined;
|
|
250
|
-
this.color = 'primary';
|
|
251
|
-
this.numericInput = false;
|
|
252
|
-
}
|
|
253
|
-
valueChange() {
|
|
254
|
-
if (this.isColumnVisible) {
|
|
255
|
-
/**
|
|
256
|
-
* Only scroll the active item into view when the picker column
|
|
257
|
-
* is actively visible to the user.
|
|
258
|
-
*/
|
|
259
|
-
this.scrollActiveItemIntoView();
|
|
260
|
-
}
|
|
261
|
-
}
|
|
222
|
+
});
|
|
223
|
+
};
|
|
262
224
|
/**
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
* the
|
|
266
|
-
*
|
|
225
|
+
* Tells the parent picker to
|
|
226
|
+
* exit text entry mode. This is only called
|
|
227
|
+
* when the selected item changes during scroll, so
|
|
228
|
+
* we know that the user likely wants to scroll
|
|
229
|
+
* instead of type.
|
|
267
230
|
*/
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
};
|
|
300
|
-
new IntersectionObserver(visibleCallback, { threshold: 0.001 }).observe(this.el);
|
|
301
|
-
const parentEl = (this.parentEl = this.el.closest('ion-picker-internal'));
|
|
302
|
-
if (parentEl !== null) {
|
|
303
|
-
// TODO(FW-2832): type
|
|
304
|
-
parentEl.addEventListener('ionInputModeChange', (ev) => this.inputModeChange(ev));
|
|
305
|
-
}
|
|
231
|
+
this.exitInputMode = () => {
|
|
232
|
+
const { parentEl } = this;
|
|
233
|
+
if (parentEl == null)
|
|
234
|
+
return;
|
|
235
|
+
parentEl.exitInputMode();
|
|
236
|
+
/**
|
|
237
|
+
* setInputModeActive only takes
|
|
238
|
+
* effect once scrolling stops to avoid
|
|
239
|
+
* a component re-render while scrolling.
|
|
240
|
+
* However, we want the visual active
|
|
241
|
+
* indicator to go away immediately, so
|
|
242
|
+
* we call classList.remove here.
|
|
243
|
+
*/
|
|
244
|
+
this.el.classList.remove('picker-column-active');
|
|
245
|
+
};
|
|
246
|
+
this.isActive = false;
|
|
247
|
+
this.disabled = false;
|
|
248
|
+
this.items = [];
|
|
249
|
+
this.value = undefined;
|
|
250
|
+
this.color = 'primary';
|
|
251
|
+
this.numericInput = false;
|
|
252
|
+
}
|
|
253
|
+
valueChange() {
|
|
254
|
+
if (this.isColumnVisible) {
|
|
255
|
+
/**
|
|
256
|
+
* Only scroll the active item into view when the picker column
|
|
257
|
+
* is actively visible to the user.
|
|
258
|
+
*/
|
|
259
|
+
this.scrollActiveItemIntoView();
|
|
306
260
|
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Only setup scroll listeners
|
|
264
|
+
* when the picker is visible, otherwise
|
|
265
|
+
* the container will have a scroll
|
|
266
|
+
* height of 0px.
|
|
267
|
+
*/
|
|
268
|
+
componentWillLoad() {
|
|
269
|
+
const visibleCallback = (entries) => {
|
|
270
|
+
/**
|
|
271
|
+
* Browsers will sometimes group multiple IO events into a single callback.
|
|
272
|
+
* As a result, we want to grab the last/most recent event in case there are multiple events.
|
|
273
|
+
*/
|
|
274
|
+
const ev = entries[entries.length - 1];
|
|
275
|
+
if (ev.isIntersecting) {
|
|
276
|
+
const { activeItem, el } = this;
|
|
277
|
+
this.isColumnVisible = true;
|
|
278
|
+
/**
|
|
279
|
+
* Because this initial call to scrollActiveItemIntoView has to fire before
|
|
280
|
+
* the scroll listener is set up, we need to manage the active class manually.
|
|
281
|
+
*/
|
|
282
|
+
const oldActive = getElementRoot(el).querySelector(`.${PICKER_ITEM_ACTIVE_CLASS}`);
|
|
283
|
+
if (oldActive) {
|
|
284
|
+
this.setPickerItemActiveState(oldActive, false);
|
|
324
285
|
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
const activeEl = this.activeItem;
|
|
329
|
-
if (activeEl) {
|
|
330
|
-
this.centerPickerItemInView(activeEl, false, false);
|
|
286
|
+
this.scrollActiveItemIntoView();
|
|
287
|
+
if (activeItem) {
|
|
288
|
+
this.setPickerItemActiveState(activeItem, true);
|
|
331
289
|
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
*/
|
|
340
|
-
async setValue(value) {
|
|
341
|
-
const { items } = this;
|
|
342
|
-
this.value = value;
|
|
343
|
-
const findItem = items.find((item) => item.value === value && item.disabled !== true);
|
|
344
|
-
if (findItem) {
|
|
345
|
-
this.ionChange.emit(findItem);
|
|
290
|
+
this.initializeScrollListener();
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
this.isColumnVisible = false;
|
|
294
|
+
if (this.destroyScrollListener) {
|
|
295
|
+
this.destroyScrollListener();
|
|
296
|
+
this.destroyScrollListener = undefined;
|
|
346
297
|
}
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
new IntersectionObserver(visibleCallback, { threshold: 0.001 }).observe(this.el);
|
|
301
|
+
const parentEl = (this.parentEl = this.el.closest('ion-picker-internal'));
|
|
302
|
+
if (parentEl !== null) {
|
|
303
|
+
// TODO(FW-2832): type
|
|
304
|
+
parentEl.addEventListener('ionInputModeChange', (ev) => this.inputModeChange(ev));
|
|
347
305
|
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
306
|
+
}
|
|
307
|
+
componentDidRender() {
|
|
308
|
+
var _a;
|
|
309
|
+
const { activeItem, items, isColumnVisible, value } = this;
|
|
310
|
+
if (isColumnVisible) {
|
|
311
|
+
if (activeItem) {
|
|
312
|
+
this.scrollActiveItemIntoView();
|
|
313
|
+
}
|
|
314
|
+
else if (((_a = items[0]) === null || _a === void 0 ? void 0 : _a.value) !== value) {
|
|
357
315
|
/**
|
|
358
|
-
*
|
|
359
|
-
*
|
|
360
|
-
* the
|
|
361
|
-
*
|
|
316
|
+
* If the picker column does not have an active item and the current value
|
|
317
|
+
* does not match the first item in the picker column, that means
|
|
318
|
+
* the value is out of bounds. In this case, we assign the value to the
|
|
319
|
+
* first item to match the scroll position of the column.
|
|
320
|
+
*
|
|
362
321
|
*/
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
['picker-column-active']: isActive,
|
|
366
|
-
['picker-column-numeric-input']: numericInput,
|
|
367
|
-
}) }, h("div", { key: '85efccb40c87d473c06026b8041d57b40d2369c3', class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '9fae4dd6697f23acba18c218ba250ea77954b18d', class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: 'f117afeb204a4f6bb34a1cd0e1b786fa479d8b32', class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), items.map((item, index) => {
|
|
368
|
-
const isItemDisabled = pickerDisabled || item.disabled || false;
|
|
369
|
-
return (h("button", { tabindex: "-1", class: {
|
|
370
|
-
'picker-item': true,
|
|
371
|
-
}, "data-value": item.value, "data-index": index, onClick: (ev) => {
|
|
372
|
-
this.centerPickerItemInView(ev.target, true);
|
|
373
|
-
}, disabled: isItemDisabled, part: PICKER_ITEM_PART }, item.text));
|
|
374
|
-
}), h("div", { key: '28aa37f9ce90e88b9c3a5b2c399e3066e9f339e1', class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: 'ef4ae6bee2b17918f0c2aba9d5c720c1d95987e4', class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '564967bc8e42a9018163850da3a967a933b3de7b', class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0")));
|
|
322
|
+
this.setValue(items[0].value);
|
|
323
|
+
}
|
|
375
324
|
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
325
|
+
}
|
|
326
|
+
/** @internal */
|
|
327
|
+
async scrollActiveItemIntoView() {
|
|
328
|
+
const activeEl = this.activeItem;
|
|
329
|
+
if (activeEl) {
|
|
330
|
+
this.centerPickerItemInView(activeEl, false, false);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Sets the value prop and fires the ionChange event.
|
|
335
|
+
* This is used when we need to fire ionChange from
|
|
336
|
+
* user-generated events that cannot be caught with normal
|
|
337
|
+
* input/change event listeners.
|
|
338
|
+
* @internal
|
|
339
|
+
*/
|
|
340
|
+
async setValue(value) {
|
|
341
|
+
const { items } = this;
|
|
342
|
+
this.value = value;
|
|
343
|
+
const findItem = items.find((item) => item.value === value && item.disabled !== true);
|
|
344
|
+
if (findItem) {
|
|
345
|
+
this.ionChange.emit(findItem);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
get activeItem() {
|
|
349
|
+
// If the whole picker column is disabled, the current value should appear active
|
|
350
|
+
// If the current value item is specifically disabled, it should not appear active
|
|
351
|
+
const selector = `.picker-item[data-value="${this.value}"]${this.disabled ? '' : ':not([disabled])'}`;
|
|
352
|
+
return getElementRoot(this.el).querySelector(selector);
|
|
353
|
+
}
|
|
354
|
+
render() {
|
|
355
|
+
const { items, color, disabled: pickerDisabled, isActive, numericInput } = this;
|
|
356
|
+
const mode = getIonMode(this);
|
|
357
|
+
/**
|
|
358
|
+
* exportparts is needed so ion-datetime can expose the parts
|
|
359
|
+
* from two layers of shadow nesting. If this causes problems,
|
|
360
|
+
* the attribute can be moved to datetime.tsx and set on every
|
|
361
|
+
* instance of ion-picker-column-internal there instead.
|
|
362
|
+
*/
|
|
363
|
+
return (h(Host, { key: '42a034f2533d30d19f96a121eb74d5f757e1c684', exportparts: `${PICKER_ITEM_PART}, ${PICKER_ITEM_ACTIVE_PART}`, disabled: pickerDisabled, tabindex: pickerDisabled ? null : 0, class: createColorClasses(color, {
|
|
364
|
+
[mode]: true,
|
|
365
|
+
['picker-column-active']: isActive,
|
|
366
|
+
['picker-column-numeric-input']: numericInput,
|
|
367
|
+
}) }, h("div", { key: '85efccb40c87d473c06026b8041d57b40d2369c3', class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '9fae4dd6697f23acba18c218ba250ea77954b18d', class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: 'f117afeb204a4f6bb34a1cd0e1b786fa479d8b32', class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), items.map((item, index) => {
|
|
368
|
+
const isItemDisabled = pickerDisabled || item.disabled || false;
|
|
369
|
+
return (h("button", { tabindex: "-1", class: {
|
|
370
|
+
'picker-item': true,
|
|
371
|
+
}, "data-value": item.value, "data-index": index, onClick: (ev) => {
|
|
372
|
+
this.centerPickerItemInView(ev.target, true);
|
|
373
|
+
}, disabled: isItemDisabled, part: PICKER_ITEM_PART }, item.text));
|
|
374
|
+
}), h("div", { key: '28aa37f9ce90e88b9c3a5b2c399e3066e9f339e1', class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: 'ef4ae6bee2b17918f0c2aba9d5c720c1d95987e4', class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0"), h("div", { key: '564967bc8e42a9018163850da3a967a933b3de7b', class: "picker-item picker-item-empty", "aria-hidden": "true" }, "\u00A0")));
|
|
375
|
+
}
|
|
376
|
+
get el() { return getElement(this); }
|
|
377
|
+
static get watchers() { return {
|
|
378
|
+
"value": ["valueChange"]
|
|
379
|
+
}; }
|
|
382
380
|
};
|
|
383
381
|
const PICKER_ITEM_ACTIVE_CLASS = 'picker-item-active';
|
|
384
382
|
const PICKER_ITEM_PART = 'wheel-item';
|
|
385
383
|
const PICKER_ITEM_ACTIVE_PART = 'active';
|
|
386
384
|
PickerColumnInternal.style = {
|
|
387
|
-
|
|
388
|
-
|
|
385
|
+
ios: pickerColumnInternalIosCss,
|
|
386
|
+
md: pickerColumnInternalMdCss
|
|
389
387
|
};
|
|
390
388
|
|
|
391
|
-
const pickerInternalIosCss =
|
|
389
|
+
const pickerInternalIosCss = ":host{display:flex;position:relative;align-items:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{top:0;height:83px}@supports (inset-inline-start: 0){:host .picker-before{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-before{left:0}:host-context([dir=rtl]) .picker-before{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-before{left:unset;right:unset;right:0}}}:host .picker-after{top:116px;height:84px}@supports (inset-inline-start: 0){:host .picker-after{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-after{left:0}:host-context([dir=rtl]) .picker-after{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-after{left:unset;right:unset;right:0}}}:host .picker-highlight{border-radius:8px;left:0;right:0;top:50%;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;transform:translateY(-50%);background:var(--wheel-highlight-background);z-index:-1}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column-internal:first-of-type){text-align:start}:host ::slotted(ion-picker-column-internal:last-of-type){text-align:end}:host ::slotted(ion-picker-column-internal:only-child){text-align:center}:host .picker-before{background:linear-gradient(to bottom, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8) 100%)}:host .picker-after{background:linear-gradient(to top, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0.8) 100%)}:host .picker-highlight{background:var(--wheel-highlight-background, var(--ion-color-step-150, #eeeeef))}";
|
|
392
390
|
|
|
393
|
-
const pickerInternalMdCss =
|
|
391
|
+
const pickerInternalMdCss = ":host{display:flex;position:relative;align-items:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{top:0;height:83px}@supports (inset-inline-start: 0){:host .picker-before{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-before{left:0}:host-context([dir=rtl]) .picker-before{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-before{left:unset;right:unset;right:0}}}:host .picker-after{top:116px;height:84px}@supports (inset-inline-start: 0){:host .picker-after{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host .picker-after{left:0}:host-context([dir=rtl]) .picker-after{left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host(:dir(rtl)) .picker-after{left:unset;right:unset;right:0}}}:host .picker-highlight{border-radius:8px;left:0;right:0;top:50%;bottom:0;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;transform:translateY(-50%);background:var(--wheel-highlight-background);z-index:-1}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column-internal:first-of-type){text-align:start}:host ::slotted(ion-picker-column-internal:last-of-type){text-align:end}:host ::slotted(ion-picker-column-internal:only-child){text-align:center}:host .picker-before{background:linear-gradient(to bottom, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 20%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0) 90%)}:host .picker-after{background:linear-gradient(to top, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 1) 30%, rgba(var(--wheel-fade-background-rgb, var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255))), 0) 90%)}";
|
|
394
392
|
|
|
395
393
|
const PickerInternal = class {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
394
|
+
constructor(hostRef) {
|
|
395
|
+
registerInstance(this, hostRef);
|
|
396
|
+
this.ionInputModeChange = createEvent(this, "ionInputModeChange", 7);
|
|
397
|
+
this.useInputMode = false;
|
|
398
|
+
this.isInHighlightBounds = (ev) => {
|
|
399
|
+
const { highlightEl } = this;
|
|
400
|
+
if (!highlightEl) {
|
|
401
|
+
return false;
|
|
402
|
+
}
|
|
403
|
+
const bbox = highlightEl.getBoundingClientRect();
|
|
404
|
+
/**
|
|
405
|
+
* Check to see if the user clicked
|
|
406
|
+
* outside the bounds of the highlight.
|
|
407
|
+
*/
|
|
408
|
+
const outsideX = ev.clientX < bbox.left || ev.clientX > bbox.right;
|
|
409
|
+
const outsideY = ev.clientY < bbox.top || ev.clientY > bbox.bottom;
|
|
410
|
+
if (outsideX || outsideY) {
|
|
411
|
+
return false;
|
|
412
|
+
}
|
|
413
|
+
return true;
|
|
414
|
+
};
|
|
415
|
+
/**
|
|
416
|
+
* If we are no longer focused
|
|
417
|
+
* on a picker column, then we should
|
|
418
|
+
* exit input mode. An exception is made
|
|
419
|
+
* for the input in the picker since having
|
|
420
|
+
* that focused means we are still in input mode.
|
|
421
|
+
*/
|
|
422
|
+
this.onFocusOut = (ev) => {
|
|
423
|
+
// TODO(FW-2832): type
|
|
424
|
+
const { relatedTarget } = ev;
|
|
425
|
+
if (!relatedTarget || (relatedTarget.tagName !== 'ION-PICKER-COLUMN-INTERNAL' && relatedTarget !== this.inputEl)) {
|
|
426
|
+
this.exitInputMode();
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
/**
|
|
430
|
+
* When picker columns receive focus
|
|
431
|
+
* the parent picker needs to determine
|
|
432
|
+
* whether to enter/exit input mode.
|
|
433
|
+
*/
|
|
434
|
+
this.onFocusIn = (ev) => {
|
|
435
|
+
// TODO(FW-2832): type
|
|
436
|
+
const { target } = ev;
|
|
437
|
+
/**
|
|
438
|
+
* Due to browser differences in how/when focus
|
|
439
|
+
* is dispatched on certain elements, we need to
|
|
440
|
+
* make sure that this function only ever runs when
|
|
441
|
+
* focusing a picker column.
|
|
442
|
+
*/
|
|
443
|
+
if (target.tagName !== 'ION-PICKER-COLUMN-INTERNAL') {
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* If we have actionOnClick
|
|
448
|
+
* then this means the user focused
|
|
449
|
+
* a picker column via mouse or
|
|
450
|
+
* touch (i.e. a PointerEvent). As a result,
|
|
451
|
+
* we should not enter/exit input mode
|
|
452
|
+
* until the click event has fired, which happens
|
|
453
|
+
* after the `focusin` event.
|
|
454
|
+
*
|
|
455
|
+
* Otherwise, the user likely focused
|
|
456
|
+
* the column using their keyboard and
|
|
457
|
+
* we should enter/exit input mode automatically.
|
|
458
|
+
*/
|
|
459
|
+
if (!this.actionOnClick) {
|
|
460
|
+
const columnEl = target;
|
|
461
|
+
const allowInput = columnEl.numericInput;
|
|
462
|
+
if (allowInput) {
|
|
463
|
+
this.enterInputMode(columnEl, false);
|
|
464
|
+
}
|
|
465
|
+
else {
|
|
466
|
+
this.exitInputMode();
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
/**
|
|
471
|
+
* On click we need to run an actionOnClick
|
|
472
|
+
* function that has been set in onPointerDown
|
|
473
|
+
* so that we enter/exit input mode correctly.
|
|
474
|
+
*/
|
|
475
|
+
this.onClick = () => {
|
|
476
|
+
const { actionOnClick } = this;
|
|
477
|
+
if (actionOnClick) {
|
|
478
|
+
actionOnClick();
|
|
479
|
+
this.actionOnClick = undefined;
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
/**
|
|
483
|
+
* Clicking a column also focuses the column on
|
|
484
|
+
* certain browsers, so we use onPointerDown
|
|
485
|
+
* to tell the onFocusIn function that users
|
|
486
|
+
* are trying to click the column rather than
|
|
487
|
+
* focus the column using the keyboard. When the
|
|
488
|
+
* user completes the click, the onClick function
|
|
489
|
+
* runs and runs the actionOnClick callback.
|
|
490
|
+
*/
|
|
491
|
+
this.onPointerDown = (ev) => {
|
|
492
|
+
const { useInputMode, inputModeColumn, el } = this;
|
|
493
|
+
if (this.isInHighlightBounds(ev)) {
|
|
431
494
|
/**
|
|
432
|
-
*
|
|
433
|
-
*
|
|
434
|
-
*
|
|
495
|
+
* If we were already in
|
|
496
|
+
* input mode, then we should determine
|
|
497
|
+
* if we tapped a particular column and
|
|
498
|
+
* should switch to input mode for
|
|
499
|
+
* that specific column.
|
|
435
500
|
*/
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
return;
|
|
447
|
-
}
|
|
501
|
+
if (useInputMode) {
|
|
502
|
+
/**
|
|
503
|
+
* If we tapped a picker column
|
|
504
|
+
* then we should either switch to input
|
|
505
|
+
* mode for that column or all columns.
|
|
506
|
+
* Otherwise we should exit input mode
|
|
507
|
+
* since we just tapped the highlight and
|
|
508
|
+
* not a column.
|
|
509
|
+
*/
|
|
510
|
+
if (ev.target.tagName === 'ION-PICKER-COLUMN-INTERNAL') {
|
|
448
511
|
/**
|
|
449
|
-
* If
|
|
450
|
-
* then
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
* we should not enter/exit input mode
|
|
454
|
-
* until the click event has fired, which happens
|
|
455
|
-
* after the `focusin` event.
|
|
456
|
-
*
|
|
457
|
-
* Otherwise, the user likely focused
|
|
458
|
-
* the column using their keyboard and
|
|
459
|
-
* we should enter/exit input mode automatically.
|
|
512
|
+
* If user taps 2 different columns
|
|
513
|
+
* then we should just switch to input mode
|
|
514
|
+
* for the new column rather than switching to
|
|
515
|
+
* input mode for all columns.
|
|
460
516
|
*/
|
|
461
|
-
if (
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
this.enterInputMode(columnEl, false);
|
|
466
|
-
}
|
|
467
|
-
else {
|
|
468
|
-
this.exitInputMode();
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
/**
|
|
473
|
-
* On click we need to run an actionOnClick
|
|
474
|
-
* function that has been set in onPointerDown
|
|
475
|
-
* so that we enter/exit input mode correctly.
|
|
476
|
-
*/
|
|
477
|
-
this.onClick = () => {
|
|
478
|
-
const { actionOnClick } = this;
|
|
479
|
-
if (actionOnClick) {
|
|
480
|
-
actionOnClick();
|
|
481
|
-
this.actionOnClick = undefined;
|
|
517
|
+
if (inputModeColumn && inputModeColumn === ev.target) {
|
|
518
|
+
this.actionOnClick = () => {
|
|
519
|
+
this.enterInputMode();
|
|
520
|
+
};
|
|
482
521
|
}
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
* to tell the onFocusIn function that users
|
|
488
|
-
* are trying to click the column rather than
|
|
489
|
-
* focus the column using the keyboard. When the
|
|
490
|
-
* user completes the click, the onClick function
|
|
491
|
-
* runs and runs the actionOnClick callback.
|
|
492
|
-
*/
|
|
493
|
-
this.onPointerDown = (ev) => {
|
|
494
|
-
const { useInputMode, inputModeColumn, el } = this;
|
|
495
|
-
if (this.isInHighlightBounds(ev)) {
|
|
496
|
-
/**
|
|
497
|
-
* If we were already in
|
|
498
|
-
* input mode, then we should determine
|
|
499
|
-
* if we tapped a particular column and
|
|
500
|
-
* should switch to input mode for
|
|
501
|
-
* that specific column.
|
|
502
|
-
*/
|
|
503
|
-
if (useInputMode) {
|
|
504
|
-
/**
|
|
505
|
-
* If we tapped a picker column
|
|
506
|
-
* then we should either switch to input
|
|
507
|
-
* mode for that column or all columns.
|
|
508
|
-
* Otherwise we should exit input mode
|
|
509
|
-
* since we just tapped the highlight and
|
|
510
|
-
* not a column.
|
|
511
|
-
*/
|
|
512
|
-
if (ev.target.tagName === 'ION-PICKER-COLUMN-INTERNAL') {
|
|
513
|
-
/**
|
|
514
|
-
* If user taps 2 different columns
|
|
515
|
-
* then we should just switch to input mode
|
|
516
|
-
* for the new column rather than switching to
|
|
517
|
-
* input mode for all columns.
|
|
518
|
-
*/
|
|
519
|
-
if (inputModeColumn && inputModeColumn === ev.target) {
|
|
520
|
-
this.actionOnClick = () => {
|
|
521
|
-
this.enterInputMode();
|
|
522
|
-
};
|
|
523
|
-
}
|
|
524
|
-
else {
|
|
525
|
-
this.actionOnClick = () => {
|
|
526
|
-
this.enterInputMode(ev.target);
|
|
527
|
-
};
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
else {
|
|
531
|
-
this.actionOnClick = () => {
|
|
532
|
-
this.exitInputMode();
|
|
533
|
-
};
|
|
534
|
-
}
|
|
535
|
-
/**
|
|
536
|
-
* If we were not already in
|
|
537
|
-
* input mode, then we should
|
|
538
|
-
* enter input mode for all columns.
|
|
539
|
-
*/
|
|
540
|
-
}
|
|
541
|
-
else {
|
|
542
|
-
/**
|
|
543
|
-
* If there is only 1 numeric input column
|
|
544
|
-
* then we should skip multi column input.
|
|
545
|
-
*/
|
|
546
|
-
const columns = el.querySelectorAll('ion-picker-column-internal.picker-column-numeric-input');
|
|
547
|
-
const columnEl = columns.length === 1 ? ev.target : undefined;
|
|
548
|
-
this.actionOnClick = () => {
|
|
549
|
-
this.enterInputMode(columnEl);
|
|
550
|
-
};
|
|
551
|
-
}
|
|
552
|
-
return;
|
|
522
|
+
else {
|
|
523
|
+
this.actionOnClick = () => {
|
|
524
|
+
this.enterInputMode(ev.target);
|
|
525
|
+
};
|
|
553
526
|
}
|
|
527
|
+
}
|
|
528
|
+
else {
|
|
554
529
|
this.actionOnClick = () => {
|
|
555
|
-
|
|
530
|
+
this.exitInputMode();
|
|
556
531
|
};
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* If we were not already in
|
|
535
|
+
* input mode, then we should
|
|
536
|
+
* enter input mode for all columns.
|
|
537
|
+
*/
|
|
538
|
+
}
|
|
539
|
+
else {
|
|
540
|
+
/**
|
|
541
|
+
* If there is only 1 numeric input column
|
|
542
|
+
* then we should skip multi column input.
|
|
543
|
+
*/
|
|
544
|
+
const columns = el.querySelectorAll('ion-picker-column-internal.picker-column-numeric-input');
|
|
545
|
+
const columnEl = columns.length === 1 ? ev.target : undefined;
|
|
546
|
+
this.actionOnClick = () => {
|
|
547
|
+
this.enterInputMode(columnEl);
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
this.actionOnClick = () => {
|
|
553
|
+
this.exitInputMode();
|
|
554
|
+
};
|
|
555
|
+
};
|
|
556
|
+
/**
|
|
557
|
+
* Enters input mode to allow
|
|
558
|
+
* for text entry of numeric values.
|
|
559
|
+
* If on mobile, we focus a hidden input
|
|
560
|
+
* field so that the on screen keyboard
|
|
561
|
+
* is brought up. When tabbing using a
|
|
562
|
+
* keyboard, picker columns receive an outline
|
|
563
|
+
* to indicate they are focused. As a result,
|
|
564
|
+
* we should not focus the hidden input as it
|
|
565
|
+
* would cause the outline to go away, preventing
|
|
566
|
+
* users from having any visual indication of which
|
|
567
|
+
* column is focused.
|
|
568
|
+
*/
|
|
569
|
+
this.enterInputMode = (columnEl, focusInput = true) => {
|
|
570
|
+
const { inputEl, el } = this;
|
|
571
|
+
if (!inputEl) {
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Only active input mode if there is at
|
|
576
|
+
* least one column that accepts numeric input.
|
|
577
|
+
*/
|
|
578
|
+
const hasInputColumn = el.querySelector('ion-picker-column-internal.picker-column-numeric-input');
|
|
579
|
+
if (!hasInputColumn) {
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* If columnEl is undefined then
|
|
584
|
+
* it is assumed that all numeric pickers
|
|
585
|
+
* are eligible for text entry.
|
|
586
|
+
* (i.e. hour and minute columns)
|
|
587
|
+
*/
|
|
588
|
+
this.useInputMode = true;
|
|
589
|
+
this.inputModeColumn = columnEl;
|
|
590
|
+
/**
|
|
591
|
+
* Users with a keyboard and mouse can
|
|
592
|
+
* activate input mode where the input is
|
|
593
|
+
* focused as well as when it is not focused,
|
|
594
|
+
* so we need to make sure we clean up any
|
|
595
|
+
* old listeners.
|
|
596
|
+
*/
|
|
597
|
+
if (focusInput) {
|
|
598
|
+
if (this.destroyKeypressListener) {
|
|
599
|
+
this.destroyKeypressListener();
|
|
600
|
+
this.destroyKeypressListener = undefined;
|
|
601
|
+
}
|
|
602
|
+
inputEl.focus();
|
|
603
|
+
}
|
|
604
|
+
else {
|
|
605
|
+
// TODO FW-5900 Use keydown instead
|
|
606
|
+
el.addEventListener('keypress', this.onKeyPress);
|
|
607
|
+
this.destroyKeypressListener = () => {
|
|
608
|
+
el.removeEventListener('keypress', this.onKeyPress);
|
|
557
609
|
};
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
* <select> behaves. So typing "34", waiting,
|
|
639
|
-
* then typing "5" should select "05".
|
|
640
|
-
*/
|
|
641
|
-
if (singleColumnSearchTimeout) {
|
|
642
|
-
clearTimeout(singleColumnSearchTimeout);
|
|
643
|
-
}
|
|
644
|
-
this.singleColumnSearchTimeout = setTimeout(() => {
|
|
645
|
-
inputEl.value = '';
|
|
646
|
-
this.singleColumnSearchTimeout = undefined;
|
|
647
|
-
}, 1000);
|
|
648
|
-
/**
|
|
649
|
-
* For values that are longer than 2 digits long
|
|
650
|
-
* we should shift the value over 1 character
|
|
651
|
-
* to the left. So typing "456" would result in "56".
|
|
652
|
-
* TODO: If we want to support more than just
|
|
653
|
-
* time entry, we should update this value to be
|
|
654
|
-
* the max length of all of the picker items.
|
|
655
|
-
*/
|
|
656
|
-
if (inputEl.value.length >= 3) {
|
|
657
|
-
const startIndex = inputEl.value.length - 2;
|
|
658
|
-
const newString = inputEl.value.substring(startIndex);
|
|
659
|
-
inputEl.value = newString;
|
|
660
|
-
this.selectSingleColumn();
|
|
661
|
-
return;
|
|
662
|
-
}
|
|
663
|
-
/**
|
|
664
|
-
* Checking the value of the input gets priority
|
|
665
|
-
* first. For example, if the value of the input
|
|
666
|
-
* is "1" and we entered "2", then the complete value
|
|
667
|
-
* is "12" and we should select hour 12.
|
|
668
|
-
*
|
|
669
|
-
* Regex removes any leading zeros from values like "02",
|
|
670
|
-
* but it keeps a single zero if there are only zeros in the string.
|
|
671
|
-
* 0+(?=[1-9]) --> Match 1 or more zeros that are followed by 1-9
|
|
672
|
-
* 0+(?=0$) --> Match 1 or more zeros that must be followed by one 0 and end.
|
|
673
|
-
*/
|
|
674
|
-
const findItemFromCompleteValue = values.find(({ text }) => {
|
|
675
|
-
const parsedText = text.replace(/^0+(?=[1-9])|0+(?=0$)/, '');
|
|
676
|
-
return parsedText === inputEl.value;
|
|
677
|
-
});
|
|
678
|
-
if (findItemFromCompleteValue) {
|
|
679
|
-
inputModeColumn.setValue(findItemFromCompleteValue.value);
|
|
680
|
-
return;
|
|
681
|
-
}
|
|
682
|
-
/**
|
|
683
|
-
* If we typed "56" to get minute 56, then typed "7",
|
|
684
|
-
* we should select "07" as "567" is not a valid minute.
|
|
685
|
-
*/
|
|
686
|
-
if (inputEl.value.length === 2) {
|
|
687
|
-
const changedCharacter = inputEl.value.substring(inputEl.value.length - 1);
|
|
688
|
-
inputEl.value = changedCharacter;
|
|
689
|
-
this.selectSingleColumn();
|
|
690
|
-
}
|
|
691
|
-
};
|
|
692
|
-
/**
|
|
693
|
-
* Searches a list of column items for a particular
|
|
694
|
-
* value. This is currently used for numeric values.
|
|
695
|
-
* The zeroBehavior can be set to account for leading
|
|
696
|
-
* or trailing zeros when looking at the item text.
|
|
697
|
-
*/
|
|
698
|
-
this.searchColumn = (colEl, value, zeroBehavior = 'start') => {
|
|
699
|
-
const behavior = zeroBehavior === 'start' ? /^0+/ : /0$/;
|
|
700
|
-
const item = colEl.items.find(({ text, disabled }) => disabled !== true && text.replace(behavior, '') === value);
|
|
701
|
-
if (item) {
|
|
702
|
-
colEl.setValue(item.value);
|
|
703
|
-
}
|
|
704
|
-
};
|
|
705
|
-
this.selectMultiColumn = () => {
|
|
706
|
-
const { inputEl, el } = this;
|
|
707
|
-
if (!inputEl) {
|
|
708
|
-
return;
|
|
709
|
-
}
|
|
710
|
-
const numericPickers = Array.from(el.querySelectorAll('ion-picker-column-internal')).filter((col) => col.numericInput);
|
|
711
|
-
const firstColumn = numericPickers[0];
|
|
712
|
-
const lastColumn = numericPickers[1];
|
|
713
|
-
let value = inputEl.value;
|
|
714
|
-
let minuteValue;
|
|
715
|
-
switch (value.length) {
|
|
716
|
-
case 1:
|
|
717
|
-
this.searchColumn(firstColumn, value);
|
|
718
|
-
break;
|
|
719
|
-
case 2:
|
|
720
|
-
/**
|
|
721
|
-
* If the first character is `0` or `1` it is
|
|
722
|
-
* possible that users are trying to type `09`
|
|
723
|
-
* or `11` into the hour field, so we should look
|
|
724
|
-
* at that first.
|
|
725
|
-
*/
|
|
726
|
-
const firstCharacter = inputEl.value.substring(0, 1);
|
|
727
|
-
value = firstCharacter === '0' || firstCharacter === '1' ? inputEl.value : firstCharacter;
|
|
728
|
-
this.searchColumn(firstColumn, value);
|
|
729
|
-
/**
|
|
730
|
-
* If only checked the first value,
|
|
731
|
-
* we can check the second value
|
|
732
|
-
* for a match in the minutes column
|
|
733
|
-
*/
|
|
734
|
-
if (value.length === 1) {
|
|
735
|
-
minuteValue = inputEl.value.substring(inputEl.value.length - 1);
|
|
736
|
-
this.searchColumn(lastColumn, minuteValue, 'end');
|
|
737
|
-
}
|
|
738
|
-
break;
|
|
739
|
-
case 3:
|
|
740
|
-
/**
|
|
741
|
-
* If the first character is `0` or `1` it is
|
|
742
|
-
* possible that users are trying to type `09`
|
|
743
|
-
* or `11` into the hour field, so we should look
|
|
744
|
-
* at that first.
|
|
745
|
-
*/
|
|
746
|
-
const firstCharacterAgain = inputEl.value.substring(0, 1);
|
|
747
|
-
value =
|
|
748
|
-
firstCharacterAgain === '0' || firstCharacterAgain === '1'
|
|
749
|
-
? inputEl.value.substring(0, 2)
|
|
750
|
-
: firstCharacterAgain;
|
|
751
|
-
this.searchColumn(firstColumn, value);
|
|
752
|
-
/**
|
|
753
|
-
* If only checked the first value,
|
|
754
|
-
* we can check the second value
|
|
755
|
-
* for a match in the minutes column
|
|
756
|
-
*/
|
|
757
|
-
minuteValue = value.length === 1 ? inputEl.value.substring(1) : inputEl.value.substring(2);
|
|
758
|
-
this.searchColumn(lastColumn, minuteValue, 'end');
|
|
759
|
-
break;
|
|
760
|
-
case 4:
|
|
761
|
-
/**
|
|
762
|
-
* If the first character is `0` or `1` it is
|
|
763
|
-
* possible that users are trying to type `09`
|
|
764
|
-
* or `11` into the hour field, so we should look
|
|
765
|
-
* at that first.
|
|
766
|
-
*/
|
|
767
|
-
const firstCharacterAgainAgain = inputEl.value.substring(0, 1);
|
|
768
|
-
value =
|
|
769
|
-
firstCharacterAgainAgain === '0' || firstCharacterAgainAgain === '1'
|
|
770
|
-
? inputEl.value.substring(0, 2)
|
|
771
|
-
: firstCharacterAgainAgain;
|
|
772
|
-
this.searchColumn(firstColumn, value);
|
|
773
|
-
/**
|
|
774
|
-
* If only checked the first value,
|
|
775
|
-
* we can check the second value
|
|
776
|
-
* for a match in the minutes column
|
|
777
|
-
*/
|
|
778
|
-
const minuteValueAgain = value.length === 1
|
|
779
|
-
? inputEl.value.substring(1, inputEl.value.length)
|
|
780
|
-
: inputEl.value.substring(2, inputEl.value.length);
|
|
781
|
-
this.searchColumn(lastColumn, minuteValueAgain, 'end');
|
|
782
|
-
break;
|
|
783
|
-
default:
|
|
784
|
-
const startIndex = inputEl.value.length - 4;
|
|
785
|
-
const newString = inputEl.value.substring(startIndex);
|
|
786
|
-
inputEl.value = newString;
|
|
787
|
-
this.selectMultiColumn();
|
|
788
|
-
break;
|
|
789
|
-
}
|
|
790
|
-
};
|
|
791
|
-
/**
|
|
792
|
-
* Searches the value of the active column
|
|
793
|
-
* to determine which value users are trying
|
|
794
|
-
* to select
|
|
795
|
-
*/
|
|
796
|
-
this.onInputChange = () => {
|
|
797
|
-
const { useInputMode, inputEl, inputModeColumn } = this;
|
|
798
|
-
if (!useInputMode || !inputEl) {
|
|
799
|
-
return;
|
|
800
|
-
}
|
|
801
|
-
if (inputModeColumn) {
|
|
802
|
-
this.selectSingleColumn();
|
|
803
|
-
}
|
|
804
|
-
else {
|
|
805
|
-
this.selectMultiColumn();
|
|
806
|
-
}
|
|
807
|
-
};
|
|
808
|
-
/**
|
|
809
|
-
* Emit ionInputModeChange. Picker columns
|
|
810
|
-
* listen for this event to determine whether
|
|
811
|
-
* or not their column is "active" for text input.
|
|
812
|
-
*/
|
|
813
|
-
this.emitInputModeChange = () => {
|
|
814
|
-
const { useInputMode, inputModeColumn } = this;
|
|
815
|
-
this.ionInputModeChange.emit({
|
|
816
|
-
useInputMode,
|
|
817
|
-
inputModeColumn,
|
|
818
|
-
});
|
|
819
|
-
};
|
|
820
|
-
}
|
|
610
|
+
}
|
|
611
|
+
this.emitInputModeChange();
|
|
612
|
+
};
|
|
613
|
+
this.onKeyPress = (ev) => {
|
|
614
|
+
const { inputEl } = this;
|
|
615
|
+
if (!inputEl) {
|
|
616
|
+
return;
|
|
617
|
+
}
|
|
618
|
+
const parsedValue = parseInt(ev.key, 10);
|
|
619
|
+
/**
|
|
620
|
+
* Only numbers should be allowed
|
|
621
|
+
*/
|
|
622
|
+
if (!Number.isNaN(parsedValue)) {
|
|
623
|
+
inputEl.value += ev.key;
|
|
624
|
+
this.onInputChange();
|
|
625
|
+
}
|
|
626
|
+
};
|
|
627
|
+
this.selectSingleColumn = () => {
|
|
628
|
+
const { inputEl, inputModeColumn, singleColumnSearchTimeout } = this;
|
|
629
|
+
if (!inputEl || !inputModeColumn) {
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
const values = inputModeColumn.items.filter((item) => item.disabled !== true);
|
|
633
|
+
/**
|
|
634
|
+
* If users pause for a bit, the search
|
|
635
|
+
* value should be reset similar to how a
|
|
636
|
+
* <select> behaves. So typing "34", waiting,
|
|
637
|
+
* then typing "5" should select "05".
|
|
638
|
+
*/
|
|
639
|
+
if (singleColumnSearchTimeout) {
|
|
640
|
+
clearTimeout(singleColumnSearchTimeout);
|
|
641
|
+
}
|
|
642
|
+
this.singleColumnSearchTimeout = setTimeout(() => {
|
|
643
|
+
inputEl.value = '';
|
|
644
|
+
this.singleColumnSearchTimeout = undefined;
|
|
645
|
+
}, 1000);
|
|
646
|
+
/**
|
|
647
|
+
* For values that are longer than 2 digits long
|
|
648
|
+
* we should shift the value over 1 character
|
|
649
|
+
* to the left. So typing "456" would result in "56".
|
|
650
|
+
* TODO: If we want to support more than just
|
|
651
|
+
* time entry, we should update this value to be
|
|
652
|
+
* the max length of all of the picker items.
|
|
653
|
+
*/
|
|
654
|
+
if (inputEl.value.length >= 3) {
|
|
655
|
+
const startIndex = inputEl.value.length - 2;
|
|
656
|
+
const newString = inputEl.value.substring(startIndex);
|
|
657
|
+
inputEl.value = newString;
|
|
658
|
+
this.selectSingleColumn();
|
|
659
|
+
return;
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* Checking the value of the input gets priority
|
|
663
|
+
* first. For example, if the value of the input
|
|
664
|
+
* is "1" and we entered "2", then the complete value
|
|
665
|
+
* is "12" and we should select hour 12.
|
|
666
|
+
*
|
|
667
|
+
* Regex removes any leading zeros from values like "02",
|
|
668
|
+
* but it keeps a single zero if there are only zeros in the string.
|
|
669
|
+
* 0+(?=[1-9]) --> Match 1 or more zeros that are followed by 1-9
|
|
670
|
+
* 0+(?=0$) --> Match 1 or more zeros that must be followed by one 0 and end.
|
|
671
|
+
*/
|
|
672
|
+
const findItemFromCompleteValue = values.find(({ text }) => {
|
|
673
|
+
const parsedText = text.replace(/^0+(?=[1-9])|0+(?=0$)/, '');
|
|
674
|
+
return parsedText === inputEl.value;
|
|
675
|
+
});
|
|
676
|
+
if (findItemFromCompleteValue) {
|
|
677
|
+
inputModeColumn.setValue(findItemFromCompleteValue.value);
|
|
678
|
+
return;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* If we typed "56" to get minute 56, then typed "7",
|
|
682
|
+
* we should select "07" as "567" is not a valid minute.
|
|
683
|
+
*/
|
|
684
|
+
if (inputEl.value.length === 2) {
|
|
685
|
+
const changedCharacter = inputEl.value.substring(inputEl.value.length - 1);
|
|
686
|
+
inputEl.value = changedCharacter;
|
|
687
|
+
this.selectSingleColumn();
|
|
688
|
+
}
|
|
689
|
+
};
|
|
821
690
|
/**
|
|
822
|
-
*
|
|
823
|
-
*
|
|
824
|
-
*
|
|
825
|
-
*
|
|
826
|
-
* in ion-datetime should not cause
|
|
827
|
-
* a card modal to swipe to close.
|
|
691
|
+
* Searches a list of column items for a particular
|
|
692
|
+
* value. This is currently used for numeric values.
|
|
693
|
+
* The zeroBehavior can be set to account for leading
|
|
694
|
+
* or trailing zeros when looking at the item text.
|
|
828
695
|
*/
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
}
|
|
696
|
+
this.searchColumn = (colEl, value, zeroBehavior = 'start') => {
|
|
697
|
+
const behavior = zeroBehavior === 'start' ? /^0+/ : /0$/;
|
|
698
|
+
const item = colEl.items.find(({ text, disabled }) => disabled !== true && text.replace(behavior, '') === value);
|
|
699
|
+
if (item) {
|
|
700
|
+
colEl.setValue(item.value);
|
|
701
|
+
}
|
|
702
|
+
};
|
|
703
|
+
this.selectMultiColumn = () => {
|
|
704
|
+
const { inputEl, el } = this;
|
|
705
|
+
if (!inputEl) {
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
708
|
+
const numericPickers = Array.from(el.querySelectorAll('ion-picker-column-internal')).filter((col) => col.numericInput);
|
|
709
|
+
const firstColumn = numericPickers[0];
|
|
710
|
+
const lastColumn = numericPickers[1];
|
|
711
|
+
let value = inputEl.value;
|
|
712
|
+
let minuteValue;
|
|
713
|
+
switch (value.length) {
|
|
714
|
+
case 1:
|
|
715
|
+
this.searchColumn(firstColumn, value);
|
|
716
|
+
break;
|
|
717
|
+
case 2:
|
|
718
|
+
/**
|
|
719
|
+
* If the first character is `0` or `1` it is
|
|
720
|
+
* possible that users are trying to type `09`
|
|
721
|
+
* or `11` into the hour field, so we should look
|
|
722
|
+
* at that first.
|
|
723
|
+
*/
|
|
724
|
+
const firstCharacter = inputEl.value.substring(0, 1);
|
|
725
|
+
value = firstCharacter === '0' || firstCharacter === '1' ? inputEl.value : firstCharacter;
|
|
726
|
+
this.searchColumn(firstColumn, value);
|
|
727
|
+
/**
|
|
728
|
+
* If only checked the first value,
|
|
729
|
+
* we can check the second value
|
|
730
|
+
* for a match in the minutes column
|
|
731
|
+
*/
|
|
732
|
+
if (value.length === 1) {
|
|
733
|
+
minuteValue = inputEl.value.substring(inputEl.value.length - 1);
|
|
734
|
+
this.searchColumn(lastColumn, minuteValue, 'end');
|
|
735
|
+
}
|
|
736
|
+
break;
|
|
737
|
+
case 3:
|
|
738
|
+
/**
|
|
739
|
+
* If the first character is `0` or `1` it is
|
|
740
|
+
* possible that users are trying to type `09`
|
|
741
|
+
* or `11` into the hour field, so we should look
|
|
742
|
+
* at that first.
|
|
743
|
+
*/
|
|
744
|
+
const firstCharacterAgain = inputEl.value.substring(0, 1);
|
|
745
|
+
value =
|
|
746
|
+
firstCharacterAgain === '0' || firstCharacterAgain === '1'
|
|
747
|
+
? inputEl.value.substring(0, 2)
|
|
748
|
+
: firstCharacterAgain;
|
|
749
|
+
this.searchColumn(firstColumn, value);
|
|
750
|
+
/**
|
|
751
|
+
* If only checked the first value,
|
|
752
|
+
* we can check the second value
|
|
753
|
+
* for a match in the minutes column
|
|
754
|
+
*/
|
|
755
|
+
minuteValue = value.length === 1 ? inputEl.value.substring(1) : inputEl.value.substring(2);
|
|
756
|
+
this.searchColumn(lastColumn, minuteValue, 'end');
|
|
757
|
+
break;
|
|
758
|
+
case 4:
|
|
759
|
+
/**
|
|
760
|
+
* If the first character is `0` or `1` it is
|
|
761
|
+
* possible that users are trying to type `09`
|
|
762
|
+
* or `11` into the hour field, so we should look
|
|
763
|
+
* at that first.
|
|
764
|
+
*/
|
|
765
|
+
const firstCharacterAgainAgain = inputEl.value.substring(0, 1);
|
|
766
|
+
value =
|
|
767
|
+
firstCharacterAgainAgain === '0' || firstCharacterAgainAgain === '1'
|
|
768
|
+
? inputEl.value.substring(0, 2)
|
|
769
|
+
: firstCharacterAgainAgain;
|
|
770
|
+
this.searchColumn(firstColumn, value);
|
|
771
|
+
/**
|
|
772
|
+
* If only checked the first value,
|
|
773
|
+
* we can check the second value
|
|
774
|
+
* for a match in the minutes column
|
|
775
|
+
*/
|
|
776
|
+
const minuteValueAgain = value.length === 1
|
|
777
|
+
? inputEl.value.substring(1, inputEl.value.length)
|
|
778
|
+
: inputEl.value.substring(2, inputEl.value.length);
|
|
779
|
+
this.searchColumn(lastColumn, minuteValueAgain, 'end');
|
|
780
|
+
break;
|
|
781
|
+
default:
|
|
782
|
+
const startIndex = inputEl.value.length - 4;
|
|
783
|
+
const newString = inputEl.value.substring(startIndex);
|
|
784
|
+
inputEl.value = newString;
|
|
785
|
+
this.selectMultiColumn();
|
|
786
|
+
break;
|
|
787
|
+
}
|
|
788
|
+
};
|
|
836
789
|
/**
|
|
837
|
-
*
|
|
838
|
-
*
|
|
839
|
-
*
|
|
840
|
-
* and cause the keyboard to dismiss.
|
|
790
|
+
* Searches the value of the active column
|
|
791
|
+
* to determine which value users are trying
|
|
792
|
+
* to select
|
|
841
793
|
*/
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
this.
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
794
|
+
this.onInputChange = () => {
|
|
795
|
+
const { useInputMode, inputEl, inputModeColumn } = this;
|
|
796
|
+
if (!useInputMode || !inputEl) {
|
|
797
|
+
return;
|
|
798
|
+
}
|
|
799
|
+
if (inputModeColumn) {
|
|
800
|
+
this.selectSingleColumn();
|
|
801
|
+
}
|
|
802
|
+
else {
|
|
803
|
+
this.selectMultiColumn();
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
/**
|
|
807
|
+
* Emit ionInputModeChange. Picker columns
|
|
808
|
+
* listen for this event to determine whether
|
|
809
|
+
* or not their column is "active" for text input.
|
|
810
|
+
*/
|
|
811
|
+
this.emitInputModeChange = () => {
|
|
812
|
+
const { useInputMode, inputModeColumn } = this;
|
|
813
|
+
this.ionInputModeChange.emit({
|
|
814
|
+
useInputMode,
|
|
815
|
+
inputModeColumn,
|
|
816
|
+
});
|
|
817
|
+
};
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* When the picker is interacted with
|
|
821
|
+
* we need to prevent touchstart so other
|
|
822
|
+
* gestures do not fire. For example,
|
|
823
|
+
* scrolling on the wheel picker
|
|
824
|
+
* in ion-datetime should not cause
|
|
825
|
+
* a card modal to swipe to close.
|
|
826
|
+
*/
|
|
827
|
+
preventTouchStartPropagation(ev) {
|
|
828
|
+
ev.stopPropagation();
|
|
829
|
+
}
|
|
830
|
+
componentWillLoad() {
|
|
831
|
+
getElementRoot(this.el).addEventListener('focusin', this.onFocusIn);
|
|
832
|
+
getElementRoot(this.el).addEventListener('focusout', this.onFocusOut);
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* @internal
|
|
836
|
+
* Exits text entry mode for the picker
|
|
837
|
+
* This method blurs the hidden input
|
|
838
|
+
* and cause the keyboard to dismiss.
|
|
839
|
+
*/
|
|
840
|
+
async exitInputMode() {
|
|
841
|
+
const { inputEl, useInputMode } = this;
|
|
842
|
+
if (!useInputMode || !inputEl) {
|
|
843
|
+
return;
|
|
856
844
|
}
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
* input (and therefore close the keyboard)
|
|
865
|
-
*
|
|
866
|
-
* Updating the picker's state to no longer
|
|
867
|
-
* be in input mode is handled in the onBlur
|
|
868
|
-
* callback below.
|
|
869
|
-
*/
|
|
870
|
-
if (ev.key === 'Enter') {
|
|
871
|
-
(_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.blur();
|
|
872
|
-
}
|
|
873
|
-
}, ref: (el) => (this.inputEl = el), onInput: () => this.onInputChange(), onBlur: () => this.exitInputMode() }), h("div", { key: '4700c9d877f54ae8f3fb173122193c27637f70a4', class: "picker-before" }), h("div", { key: '7ceae834b15d559f3819ec2116f83669cf6665fc', class: "picker-after" }), h("div", { key: '2d3bfda76279c2ee14edc067c53651be23b8b525', class: "picker-highlight", ref: (el) => (this.highlightEl = el) }), h("slot", { key: '4797def7a3882a8a911ad47949b76f58a9f448d1' })));
|
|
845
|
+
this.useInputMode = false;
|
|
846
|
+
this.inputModeColumn = undefined;
|
|
847
|
+
inputEl.blur();
|
|
848
|
+
inputEl.value = '';
|
|
849
|
+
if (this.destroyKeypressListener) {
|
|
850
|
+
this.destroyKeypressListener();
|
|
851
|
+
this.destroyKeypressListener = undefined;
|
|
874
852
|
}
|
|
875
|
-
|
|
853
|
+
this.emitInputModeChange();
|
|
854
|
+
}
|
|
855
|
+
render() {
|
|
856
|
+
return (h(Host, { key: '01cbd466787242ad070b01909714089570b4d67f', onPointerDown: (ev) => this.onPointerDown(ev), onClick: () => this.onClick() }, h("input", { key: '7ff8c0a74c107610a6f0dd9fbc2fc7a4a6dc2468', "aria-hidden": "true", tabindex: -1, inputmode: "numeric", type: "number", onKeyDown: (ev) => {
|
|
857
|
+
var _a;
|
|
858
|
+
/**
|
|
859
|
+
* The "Enter" key represents
|
|
860
|
+
* the user submitting their time
|
|
861
|
+
* selection, so we should blur the
|
|
862
|
+
* input (and therefore close the keyboard)
|
|
863
|
+
*
|
|
864
|
+
* Updating the picker's state to no longer
|
|
865
|
+
* be in input mode is handled in the onBlur
|
|
866
|
+
* callback below.
|
|
867
|
+
*/
|
|
868
|
+
if (ev.key === 'Enter') {
|
|
869
|
+
(_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.blur();
|
|
870
|
+
}
|
|
871
|
+
}, ref: (el) => (this.inputEl = el), onInput: () => this.onInputChange(), onBlur: () => this.exitInputMode() }), h("div", { key: '4700c9d877f54ae8f3fb173122193c27637f70a4', class: "picker-before" }), h("div", { key: '7ceae834b15d559f3819ec2116f83669cf6665fc', class: "picker-after" }), h("div", { key: '2d3bfda76279c2ee14edc067c53651be23b8b525', class: "picker-highlight", ref: (el) => (this.highlightEl = el) }), h("slot", { key: '4797def7a3882a8a911ad47949b76f58a9f448d1' })));
|
|
872
|
+
}
|
|
873
|
+
get el() { return getElement(this); }
|
|
876
874
|
};
|
|
877
875
|
PickerInternal.style = {
|
|
878
|
-
|
|
879
|
-
|
|
876
|
+
ios: pickerInternalIosCss,
|
|
877
|
+
md: pickerInternalMdCss
|
|
880
878
|
};
|
|
881
879
|
|
|
882
880
|
export { Buttons as ion_buttons, PickerColumnInternal as ion_picker_column_internal, PickerInternal as ion_picker_internal };
|