@beeq/core 1.11.0-beta.2 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/beeq/beeq.esm.js +1 -1
- package/dist/beeq/beeq.esm.js.map +1 -1
- package/dist/beeq/bq-accordion-group.entry.esm.js.map +1 -1
- package/dist/beeq/bq-accordion.entry.esm.js.map +1 -1
- package/dist/beeq/bq-alert.entry.esm.js.map +1 -1
- package/dist/beeq/bq-avatar.entry.esm.js.map +1 -1
- package/dist/beeq/bq-badge.entry.esm.js.map +1 -1
- package/dist/beeq/bq-breadcrumb-item.entry.esm.js.map +1 -1
- package/dist/beeq/bq-breadcrumb.entry.esm.js.map +1 -1
- package/dist/beeq/bq-button.bq-icon.entry.esm.js.map +1 -1
- package/dist/beeq/bq-card.entry.esm.js.map +1 -1
- package/dist/beeq/bq-checkbox.entry.esm.js.map +1 -1
- package/dist/beeq/bq-date-picker.entry.esm.js.map +1 -1
- package/dist/beeq/bq-dialog.entry.esm.js.map +1 -1
- package/dist/beeq/bq-divider.entry.esm.js.map +1 -1
- package/dist/beeq/bq-drawer.entry.esm.js.map +1 -1
- package/dist/beeq/bq-dropdown.bq-panel.entry.esm.js.map +1 -1
- package/dist/beeq/bq-empty-state.entry.esm.js.map +1 -1
- package/dist/beeq/bq-input.entry.esm.js.map +1 -1
- package/dist/beeq/bq-notification.entry.esm.js.map +1 -1
- package/dist/beeq/bq-option-group.entry.esm.js.map +1 -1
- package/dist/beeq/bq-option-list.bq-tag.entry.esm.js.map +1 -1
- package/dist/beeq/bq-option.entry.esm.js.map +1 -1
- package/dist/beeq/bq-page-title.entry.esm.js.map +1 -1
- package/dist/beeq/bq-progress.entry.esm.js.map +1 -1
- package/dist/beeq/bq-radio-group.entry.esm.js.map +1 -1
- package/dist/beeq/bq-radio.entry.esm.js.map +1 -1
- package/dist/beeq/bq-select.entry.esm.js.map +1 -1
- package/dist/beeq/bq-side-menu-item.entry.esm.js.map +1 -1
- package/dist/beeq/bq-side-menu.entry.esm.js.map +1 -1
- package/dist/beeq/bq-slider.entry.esm.js.map +1 -1
- package/dist/beeq/bq-spinner.entry.esm.js.map +1 -1
- package/dist/beeq/bq-status.entry.esm.js.map +1 -1
- package/dist/beeq/bq-step-item.entry.esm.js.map +1 -1
- package/dist/beeq/bq-steps.entry.esm.js.map +1 -1
- package/dist/beeq/bq-switch.entry.esm.js.map +1 -1
- package/dist/beeq/bq-tab-group.entry.esm.js.map +1 -1
- package/dist/beeq/bq-tab.entry.esm.js.map +1 -1
- package/dist/beeq/bq-textarea.entry.esm.js.map +1 -1
- package/dist/beeq/bq-toast.entry.esm.js.map +1 -1
- package/dist/beeq/bq-tooltip.entry.esm.js.map +1 -1
- package/dist/beeq/index.esm.js +1 -1
- package/dist/beeq/index.esm.js.map +1 -1
- package/dist/beeq/{p-6eb0f643.entry.js → p-0bf5e367.entry.js} +2 -2
- package/dist/beeq/p-0bf5e367.entry.js.map +1 -0
- package/dist/beeq/{p-acec3250.entry.js → p-16defa87.entry.js} +2 -2
- package/dist/beeq/{p-acec3250.entry.js.map → p-16defa87.entry.js.map} +1 -1
- package/dist/beeq/{p-e1450a16.entry.js → p-17de1ba4.entry.js} +2 -2
- package/dist/beeq/{p-e1450a16.entry.js.map → p-17de1ba4.entry.js.map} +1 -1
- package/dist/beeq/p-1df8fe61.entry.js +6 -0
- package/dist/beeq/p-1df8fe61.entry.js.map +1 -0
- package/dist/beeq/{p-c7471d26.entry.js → p-24749f67.entry.js} +2 -2
- package/dist/beeq/{p-c7471d26.entry.js.map → p-24749f67.entry.js.map} +1 -1
- package/dist/beeq/{p-92fed771.entry.js → p-38add122.entry.js} +2 -2
- package/dist/beeq/p-38add122.entry.js.map +1 -0
- package/dist/beeq/{p-14588d1f.entry.js → p-454fa535.entry.js} +2 -2
- package/dist/beeq/{p-14588d1f.entry.js.map → p-454fa535.entry.js.map} +1 -1
- package/dist/beeq/{p-0e481031.entry.js → p-4647a0fb.entry.js} +2 -2
- package/dist/beeq/{p-0e481031.entry.js.map → p-4647a0fb.entry.js.map} +1 -1
- package/dist/beeq/{p-ba7572f4.entry.js → p-4725a142.entry.js} +2 -2
- package/dist/beeq/{p-ba7572f4.entry.js.map → p-4725a142.entry.js.map} +1 -1
- package/dist/beeq/{p-73054d34.entry.js → p-51351eed.entry.js} +2 -2
- package/dist/beeq/p-51351eed.entry.js.map +1 -0
- package/dist/beeq/{p-84c96afc.entry.js → p-5b0a56e7.entry.js} +2 -2
- package/dist/beeq/p-5b0a56e7.entry.js.map +1 -0
- package/dist/beeq/{p-28788a48.entry.js → p-5c23324d.entry.js} +2 -2
- package/dist/beeq/p-5c23324d.entry.js.map +1 -0
- package/dist/beeq/p-5dd30c4c.entry.js +6 -0
- package/dist/beeq/p-5dd30c4c.entry.js.map +1 -0
- package/dist/beeq/{p-bcd00932.entry.js → p-5df7df5d.entry.js} +2 -2
- package/dist/beeq/p-5df7df5d.entry.js.map +1 -0
- package/dist/beeq/{p-1f8cc15c.entry.js → p-5e8c8e90.entry.js} +2 -2
- package/dist/beeq/{p-1f8cc15c.entry.js.map → p-5e8c8e90.entry.js.map} +1 -1
- package/dist/beeq/{p-b324e939.entry.js → p-662578a2.entry.js} +2 -2
- package/dist/beeq/{p-b324e939.entry.js.map → p-662578a2.entry.js.map} +1 -1
- package/dist/beeq/{p-f82cff9e.entry.js → p-6ae2ca4b.entry.js} +2 -2
- package/dist/beeq/{p-f82cff9e.entry.js.map → p-6ae2ca4b.entry.js.map} +1 -1
- package/dist/beeq/{p-3b1ef7e6.entry.js → p-7ca73c06.entry.js} +2 -2
- package/dist/beeq/p-7ca73c06.entry.js.map +1 -0
- package/dist/beeq/{p-61fe519c.entry.js → p-84e62655.entry.js} +2 -2
- package/dist/beeq/{p-61fe519c.entry.js.map → p-84e62655.entry.js.map} +1 -1
- package/dist/beeq/{p-afecb3f2.entry.js → p-93d6f4f0.entry.js} +2 -2
- package/dist/beeq/p-93d6f4f0.entry.js.map +1 -0
- package/dist/beeq/{p-3424586a.entry.js → p-9585221e.entry.js} +2 -2
- package/dist/beeq/p-9585221e.entry.js.map +1 -0
- package/dist/beeq/{p-9584ff4f.entry.js → p-9e9baa82.entry.js} +2 -2
- package/dist/beeq/{p-9584ff4f.entry.js.map → p-9e9baa82.entry.js.map} +1 -1
- package/dist/beeq/{p-DMf9D39m.js → p-BNvWMggA.js} +2 -2
- package/dist/beeq/{p-DMf9D39m.js.map → p-BNvWMggA.js.map} +1 -1
- package/dist/beeq/p-BOf9EC3C.js +7 -0
- package/dist/beeq/p-BOf9EC3C.js.map +1 -0
- package/dist/beeq/{p-Ci39rxuU.js → p-BRbYDZoo.js} +2 -2
- package/dist/beeq/{p-Ci39rxuU.js.map → p-BRbYDZoo.js.map} +1 -1
- package/dist/beeq/{p-D9ofIraD.js → p-CVw85-WU.js} +1 -1
- package/dist/beeq/p-CVw85-WU.js.map +1 -0
- package/dist/{components/p-C_mtknb1.js → beeq/p-CgIw4Syg.js} +2 -2
- package/dist/beeq/{p-C_mtknb1.js.map → p-CgIw4Syg.js.map} +1 -1
- package/dist/beeq/{p-895454b8.entry.js → p-b1d2e472.entry.js} +2 -2
- package/dist/beeq/{p-895454b8.entry.js.map → p-b1d2e472.entry.js.map} +1 -1
- package/dist/beeq/p-b7efb629.entry.js +6 -0
- package/dist/beeq/{p-4a726c36.entry.js.map → p-b7efb629.entry.js.map} +1 -1
- package/dist/beeq/{p-7bf79e31.entry.js → p-b88b2573.entry.js} +2 -2
- package/dist/beeq/p-b88b2573.entry.js.map +1 -0
- package/dist/beeq/p-bfca08f5.entry.js +6 -0
- package/dist/beeq/p-bfca08f5.entry.js.map +1 -0
- package/dist/beeq/{p-7ecff021.entry.js → p-c63b89d2.entry.js} +2 -2
- package/dist/beeq/p-c63b89d2.entry.js.map +1 -0
- package/dist/beeq/{p-33899839.entry.js → p-ca93325b.entry.js} +2 -2
- package/dist/beeq/{p-33899839.entry.js.map → p-ca93325b.entry.js.map} +1 -1
- package/dist/beeq/{p-db38b20c.entry.js → p-cb0639d5.entry.js} +2 -2
- package/dist/beeq/{p-db38b20c.entry.js.map → p-cb0639d5.entry.js.map} +1 -1
- package/dist/beeq/{p-b40aaef2.entry.js → p-cd53041f.entry.js} +2 -2
- package/dist/beeq/p-cd53041f.entry.js.map +1 -0
- package/dist/beeq/{p-ee9117e4.entry.js → p-d8118f0b.entry.js} +2 -2
- package/dist/beeq/p-d8118f0b.entry.js.map +1 -0
- package/dist/beeq/p-d9c5ab1d.entry.js +6 -0
- package/dist/beeq/p-d9c5ab1d.entry.js.map +1 -0
- package/dist/beeq/{p-25e92d0a.entry.js → p-dc5aa386.entry.js} +2 -2
- package/dist/beeq/{p-25e92d0a.entry.js.map → p-dc5aa386.entry.js.map} +1 -1
- package/dist/beeq/{p-32a07a71.entry.js → p-dcda1181.entry.js} +2 -2
- package/dist/beeq/{p-32a07a71.entry.js.map → p-dcda1181.entry.js.map} +1 -1
- package/dist/beeq/{p-1770fd5b.entry.js → p-e5c12fd7.entry.js} +2 -2
- package/dist/beeq/p-e5c12fd7.entry.js.map +1 -0
- package/dist/beeq/p-eaa8c123.entry.js +6 -0
- package/dist/beeq/p-eaa8c123.entry.js.map +1 -0
- package/dist/beeq/{p-de332995.entry.js → p-eb47c1ae.entry.js} +2 -2
- package/dist/beeq/p-eb47c1ae.entry.js.map +1 -0
- package/dist/beeq/{p-b387860a.entry.js → p-eb6eac82.entry.js} +2 -2
- package/dist/beeq/{p-b387860a.entry.js.map → p-eb6eac82.entry.js.map} +1 -1
- package/dist/beeq/{p-e1ecf09d.entry.js → p-f691f00c.entry.js} +2 -2
- package/dist/beeq/{p-e1ecf09d.entry.js.map → p-f691f00c.entry.js.map} +1 -1
- package/dist/beeq/p-igOoibr-.js +6 -0
- package/dist/beeq/p-igOoibr-.js.map +1 -0
- package/dist/beeq/{p-CVMdKx0v.js → p-lysmVw2n.js} +2 -2
- package/dist/beeq/{p-CVMdKx0v.js.map → p-lysmVw2n.js.map} +1 -1
- package/dist/beeq.html-custom-data.json +20 -29
- package/dist/cjs/beeq.cjs.js +3 -3
- package/dist/cjs/beeq.cjs.js.map +1 -1
- package/dist/cjs/bq-accordion-group.cjs.entry.js +2 -2
- package/dist/cjs/bq-accordion-group.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-accordion.cjs.entry.js +18 -8
- package/dist/cjs/bq-accordion.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-alert.cjs.entry.js +13 -10
- package/dist/cjs/bq-alert.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-avatar.cjs.entry.js +6 -6
- package/dist/cjs/bq-avatar.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-badge.cjs.entry.js +4 -2
- package/dist/cjs/bq-badge.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-breadcrumb-item.cjs.entry.js +5 -5
- package/dist/cjs/bq-breadcrumb-item.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-breadcrumb.cjs.entry.js +7 -3
- package/dist/cjs/bq-breadcrumb.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-button.bq-icon.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-button_2.cjs.entry.js +14 -10
- package/dist/cjs/bq-card.cjs.entry.js +3 -3
- package/dist/cjs/bq-card.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-checkbox.cjs.entry.js +6 -4
- package/dist/cjs/bq-checkbox.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-date-picker.cjs.entry.js +70 -25
- package/dist/cjs/bq-date-picker.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-dialog.cjs.entry.js +13 -7
- package/dist/cjs/bq-dialog.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-divider.cjs.entry.js +7 -5
- package/dist/cjs/bq-divider.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-drawer.cjs.entry.js +9 -5
- package/dist/cjs/bq-drawer.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-dropdown.bq-panel.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-dropdown_2.cjs.entry.js +13 -7
- package/dist/cjs/bq-empty-state.cjs.entry.js +10 -6
- package/dist/cjs/bq-empty-state.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-input.cjs.entry.js +30 -22
- package/dist/cjs/bq-input.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-notification.cjs.entry.js +11 -5
- package/dist/cjs/bq-notification.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-option-group.cjs.entry.js +3 -3
- package/dist/cjs/bq-option-group.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-option-list.bq-tag.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-option-list_2.cjs.entry.js +8 -6
- package/dist/cjs/bq-option.cjs.entry.js +17 -10
- package/dist/cjs/bq-option.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-page-title.cjs.entry.js +11 -5
- package/dist/cjs/bq-page-title.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-progress.cjs.entry.js +7 -7
- package/dist/cjs/bq-progress.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-radio-group.cjs.entry.js +15 -9
- package/dist/cjs/bq-radio-group.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-radio.cjs.entry.js +4 -2
- package/dist/cjs/bq-radio.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-select.cjs.entry.js +76 -29
- package/dist/cjs/bq-select.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-side-menu-item.cjs.entry.js +7 -5
- package/dist/cjs/bq-side-menu-item.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-side-menu.cjs.entry.js +11 -7
- package/dist/cjs/bq-side-menu.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-slider.cjs.entry.js +25 -12
- package/dist/cjs/bq-slider.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-spinner.cjs.entry.js +12 -12
- package/dist/cjs/bq-spinner.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-status.cjs.entry.js +3 -3
- package/dist/cjs/bq-status.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-step-item.cjs.entry.js +7 -7
- package/dist/cjs/bq-step-item.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-steps.cjs.entry.js +6 -4
- package/dist/cjs/bq-steps.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-switch.cjs.entry.js +9 -5
- package/dist/cjs/bq-switch.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-tab-group.cjs.entry.js +9 -7
- package/dist/cjs/bq-tab-group.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-tab.cjs.entry.js +9 -5
- package/dist/cjs/bq-tab.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-textarea.cjs.entry.js +17 -14
- package/dist/cjs/bq-textarea.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-toast.cjs.entry.js +5 -6
- package/dist/cjs/bq-toast.entry.cjs.js.map +1 -1
- package/dist/cjs/bq-tooltip.cjs.entry.js +9 -3
- package/dist/cjs/bq-tooltip.entry.cjs.js.map +1 -1
- package/dist/cjs/date-C-h2CBps.js +170 -0
- package/dist/cjs/date-C-h2CBps.js.map +1 -0
- package/dist/cjs/{debounce-DFaAa1Cu.js → debounce-D0tIpUuS.js} +4 -4
- package/dist/cjs/debounce-D0tIpUuS.js.map +1 -0
- package/dist/cjs/{index-B6fG32hZ.js → index-D7RDSS0K.js} +36 -27
- package/dist/cjs/{index-B6fG32hZ.js.map → index-D7RDSS0K.js.map} +1 -1
- package/dist/cjs/{index-DMgUhnao.js → index-g8MkV15i.js} +56 -48
- package/dist/cjs/index-g8MkV15i.js.map +1 -0
- package/dist/cjs/index.cjs.js +7 -4
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/{isDefined-K4EcmGLZ.js → isDefined-D24L82z9.js} +3 -3
- package/dist/cjs/{isDefined-K4EcmGLZ.js.map → isDefined-D24L82z9.js.map} +1 -1
- package/dist/cjs/{isString-CHgmxASW.js → isString-CA9m1aBg.js} +3 -3
- package/dist/cjs/{isString-CHgmxASW.js.map → isString-CA9m1aBg.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{stringToArray-DTx7uqZ4.js → stringToArray-B747BpEA.js} +4 -4
- package/dist/cjs/{stringToArray-DTx7uqZ4.js.map → stringToArray-B747BpEA.js.map} +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/accordion/bq-accordion.js +17 -11
- package/dist/collection/components/accordion/bq-accordion.js.map +1 -1
- package/dist/collection/components/accordion/helper/index.js +6 -2
- package/dist/collection/components/accordion/helper/index.js.map +1 -1
- package/dist/collection/components/accordion/scss/bq-accordion.css +1 -1
- package/dist/collection/components/accordion-group/bq-accordion-group.js +6 -6
- package/dist/collection/components/alert/bq-alert.js +25 -22
- package/dist/collection/components/alert/bq-alert.js.map +1 -1
- package/dist/collection/components/avatar/bq-avatar.js +16 -16
- package/dist/collection/components/avatar/bq-avatar.js.map +1 -1
- package/dist/collection/components/badge/bq-badge.js +10 -8
- package/dist/collection/components/badge/bq-badge.js.map +1 -1
- package/dist/collection/components/breadcrumb/bq-breadcrumb.js +7 -3
- package/dist/collection/components/breadcrumb/bq-breadcrumb.js.map +1 -1
- package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js +6 -6
- package/dist/collection/components/breadcrumb-item/bq-breadcrumb-item.js.map +1 -1
- package/dist/collection/components/button/bq-button.js +23 -19
- package/dist/collection/components/button/bq-button.js.map +1 -1
- package/dist/collection/components/button/scss/bq-button.css +1 -1
- package/dist/collection/components/card/bq-card.js +5 -5
- package/dist/collection/components/card/bq-card.js.map +1 -1
- package/dist/collection/components/checkbox/bq-checkbox.js +19 -17
- package/dist/collection/components/checkbox/bq-checkbox.js.map +1 -1
- package/dist/collection/components/date-picker/bq-date-picker.js +103 -61
- package/dist/collection/components/date-picker/bq-date-picker.js.map +1 -1
- package/dist/collection/components/dialog/bq-dialog.js +20 -14
- package/dist/collection/components/dialog/bq-dialog.js.map +1 -1
- package/dist/collection/components/divider/bq-divider.js +17 -15
- package/dist/collection/components/divider/bq-divider.js.map +1 -1
- package/dist/collection/components/drawer/bq-drawer.js +16 -12
- package/dist/collection/components/drawer/bq-drawer.js.map +1 -1
- package/dist/collection/components/dropdown/bq-dropdown.js +18 -14
- package/dist/collection/components/dropdown/bq-dropdown.js.map +1 -1
- package/dist/collection/components/empty-state/bq-empty-state.js +10 -6
- package/dist/collection/components/empty-state/bq-empty-state.js.map +1 -1
- package/dist/collection/components/icon/bq-icon.js +17 -17
- package/dist/collection/components/icon/bq-icon.js.map +1 -1
- package/dist/collection/components/input/bq-input.js +89 -86
- package/dist/collection/components/input/bq-input.js.map +1 -1
- package/dist/collection/components/notification/bq-notification.js +21 -15
- package/dist/collection/components/notification/bq-notification.js.map +1 -1
- package/dist/collection/components/option/bq-option.js +42 -16
- package/dist/collection/components/option/bq-option.js.map +1 -1
- package/dist/collection/components/option/scss/bq-option.css +1 -1
- package/dist/collection/components/option-group/bq-option-group.js +1 -1
- package/dist/collection/components/option-group/bq-option-group.js.map +1 -1
- package/dist/collection/components/option-list/bq-option-list.js +1 -1
- package/dist/collection/components/option-list/bq-option-list.js.map +1 -1
- package/dist/collection/components/page-title/bq-page-title.js +9 -3
- package/dist/collection/components/page-title/bq-page-title.js.map +1 -1
- package/dist/collection/components/panel/bq-panel.js +10 -8
- package/dist/collection/components/panel/bq-panel.js.map +1 -1
- package/dist/collection/components/progress/bq-progress.js +14 -14
- package/dist/collection/components/progress/bq-progress.js.map +1 -1
- package/dist/collection/components/radio/bq-radio.js +16 -14
- package/dist/collection/components/radio/bq-radio.js.map +1 -1
- package/dist/collection/components/radio-group/bq-radio-group.js +25 -19
- package/dist/collection/components/radio-group/bq-radio-group.js.map +1 -1
- package/dist/collection/components/select/bq-select.js +103 -56
- package/dist/collection/components/select/bq-select.js.map +1 -1
- package/dist/collection/components/select/scss/bq-select.css +1 -1
- package/dist/collection/components/side-menu/bq-side-menu.js +12 -8
- package/dist/collection/components/side-menu/bq-side-menu.js.map +1 -1
- package/dist/collection/components/side-menu/scss/bq-side-menu.css +1 -1
- package/dist/collection/components/side-menu-item/bq-side-menu-item.js +8 -6
- package/dist/collection/components/side-menu-item/bq-side-menu-item.js.map +1 -1
- package/dist/collection/components/slider/bq-slider.js +36 -23
- package/dist/collection/components/slider/bq-slider.js.map +1 -1
- package/dist/collection/components/spinner/bq-spinner.js +14 -14
- package/dist/collection/components/spinner/bq-spinner.js.map +1 -1
- package/dist/collection/components/spinner/bq-spinner.types.js +1 -1
- package/dist/collection/components/spinner/bq-spinner.types.js.map +1 -1
- package/dist/collection/components/spinner/scss/bq-spinner.css +1 -1
- package/dist/collection/components/status/bq-status.js +3 -3
- package/dist/collection/components/status/bq-status.js.map +1 -1
- package/dist/collection/components/step-item/bq-step-item.js +11 -11
- package/dist/collection/components/step-item/bq-step-item.js.map +1 -1
- package/dist/collection/components/steps/bq-steps.js +8 -6
- package/dist/collection/components/steps/bq-steps.js.map +1 -1
- package/dist/collection/components/switch/bq-switch.js +22 -18
- package/dist/collection/components/switch/bq-switch.js.map +1 -1
- package/dist/collection/components/tab/bq-tab.js +17 -13
- package/dist/collection/components/tab/bq-tab.js.map +1 -1
- package/dist/collection/components/tab-group/bq-tab-group.js +15 -13
- package/dist/collection/components/tab-group/bq-tab-group.js.map +1 -1
- package/dist/collection/components/tag/bq-tag.js +19 -17
- package/dist/collection/components/tag/bq-tag.js.map +1 -1
- package/dist/collection/components/tag/helper/index.js.map +1 -1
- package/dist/collection/components/textarea/bq-textarea.js +51 -62
- package/dist/collection/components/textarea/bq-textarea.js.map +1 -1
- package/dist/collection/components/toast/bq-toast.js +11 -12
- package/dist/collection/components/toast/bq-toast.js.map +1 -1
- package/dist/collection/components/tooltip/bq-tooltip.js +14 -8
- package/dist/collection/components/tooltip/bq-tooltip.js.map +1 -1
- package/dist/collection/services/interfaces/floating-ui.js.map +1 -1
- package/dist/collection/services/libraries/floating-ui/index.js +34 -25
- package/dist/collection/services/libraries/floating-ui/index.js.map +1 -1
- package/dist/collection/shared/test-utils/sleep.js +1 -1
- package/dist/collection/shared/test-utils/sleep.js.map +1 -1
- package/dist/collection/shared/utils/date.js +163 -0
- package/dist/collection/shared/utils/date.js.map +1 -0
- package/dist/collection/shared/utils/debounce.js +2 -1
- package/dist/collection/shared/utils/debounce.js.map +1 -1
- package/dist/collection/shared/utils/index.js +1 -0
- package/dist/collection/shared/utils/index.js.map +1 -1
- package/dist/collection/shared/utils/isString.js +1 -1
- package/dist/collection/shared/utils/isString.js.map +1 -1
- package/dist/collection/shared/utils/setRafTimeout.js +0 -1
- package/dist/collection/shared/utils/setRafTimeout.js.map +1 -1
- package/dist/collection/tools/angular-value-accessor-config.js.map +1 -1
- package/dist/collection/tools/generate-custom-elements-json.js +2 -2
- package/dist/collection/tools/generate-custom-elements-json.js.map +1 -1
- package/dist/collection/tools/vue-model-config.js.map +1 -1
- package/dist/components/bq-accordion-group.js +1 -1
- package/dist/components/bq-accordion-group.js.map +1 -1
- package/dist/components/bq-accordion.js +1 -1
- package/dist/components/bq-accordion.js.map +1 -1
- package/dist/components/bq-alert.js +1 -1
- package/dist/components/bq-alert.js.map +1 -1
- package/dist/components/bq-avatar.js +1 -1
- package/dist/components/bq-avatar.js.map +1 -1
- package/dist/components/bq-badge.js +1 -1
- package/dist/components/bq-breadcrumb-item.js +1 -1
- package/dist/components/bq-breadcrumb-item.js.map +1 -1
- package/dist/components/bq-breadcrumb.js +1 -1
- package/dist/components/bq-breadcrumb.js.map +1 -1
- package/dist/components/bq-button.js +1 -1
- package/dist/components/bq-card.js +1 -1
- package/dist/components/bq-card.js.map +1 -1
- package/dist/components/bq-checkbox.js +1 -1
- package/dist/components/bq-checkbox.js.map +1 -1
- package/dist/components/bq-date-picker.js +1 -1
- package/dist/components/bq-date-picker.js.map +1 -1
- package/dist/components/bq-dialog.js +1 -1
- package/dist/components/bq-dialog.js.map +1 -1
- package/dist/components/bq-divider.js +1 -1
- package/dist/components/bq-drawer.js +1 -1
- package/dist/components/bq-drawer.js.map +1 -1
- package/dist/components/bq-dropdown.js +1 -1
- package/dist/components/bq-empty-state.js +1 -1
- package/dist/components/bq-empty-state.js.map +1 -1
- package/dist/components/bq-icon.js +1 -1
- package/dist/components/bq-input.js +1 -1
- package/dist/components/bq-input.js.map +1 -1
- package/dist/components/bq-notification.js +1 -1
- package/dist/components/bq-notification.js.map +1 -1
- package/dist/components/bq-option-group.js +1 -1
- package/dist/components/bq-option-group.js.map +1 -1
- package/dist/components/bq-option-list.js +1 -1
- package/dist/components/bq-option.js +1 -1
- package/dist/components/bq-option.js.map +1 -1
- package/dist/components/bq-page-title.js +1 -1
- package/dist/components/bq-page-title.js.map +1 -1
- package/dist/components/bq-panel.js +1 -1
- package/dist/components/bq-progress.js +1 -1
- package/dist/components/bq-progress.js.map +1 -1
- package/dist/components/bq-radio-group.js +1 -1
- package/dist/components/bq-radio-group.js.map +1 -1
- package/dist/components/bq-radio.js +1 -1
- package/dist/components/bq-radio.js.map +1 -1
- package/dist/components/bq-select.js +1 -1
- package/dist/components/bq-select.js.map +1 -1
- package/dist/components/bq-side-menu-item.js +1 -1
- package/dist/components/bq-side-menu-item.js.map +1 -1
- package/dist/components/bq-side-menu.js +1 -1
- package/dist/components/bq-side-menu.js.map +1 -1
- package/dist/components/bq-slider.js +1 -1
- package/dist/components/bq-slider.js.map +1 -1
- package/dist/components/bq-spinner.js +1 -1
- package/dist/components/bq-spinner.js.map +1 -1
- package/dist/components/bq-status.js +1 -1
- package/dist/components/bq-status.js.map +1 -1
- package/dist/components/bq-step-item.js +1 -1
- package/dist/components/bq-step-item.js.map +1 -1
- package/dist/components/bq-steps.js +1 -1
- package/dist/components/bq-steps.js.map +1 -1
- package/dist/components/bq-switch.js +1 -1
- package/dist/components/bq-switch.js.map +1 -1
- package/dist/components/bq-tab-group.js +1 -1
- package/dist/components/bq-tab-group.js.map +1 -1
- package/dist/components/bq-tab.js +1 -1
- package/dist/components/bq-tab.js.map +1 -1
- package/dist/components/bq-tag.js +1 -1
- package/dist/components/bq-textarea.js +1 -1
- package/dist/components/bq-textarea.js.map +1 -1
- package/dist/components/bq-toast.js +1 -1
- package/dist/components/bq-toast.js.map +1 -1
- package/dist/components/bq-tooltip.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-DX628oDu.js → p-16lKXCDk.js} +2 -2
- package/dist/components/p-16lKXCDk.js.map +1 -0
- package/dist/components/{p-3U5U42sd.js → p-A6e1tN-B.js} +2 -2
- package/dist/components/p-A6e1tN-B.js.map +1 -0
- package/dist/components/{p-CHy0sCco.js → p-B5XEhmuc.js} +2 -2
- package/dist/components/{p-CHy0sCco.js.map → p-B5XEhmuc.js.map} +1 -1
- package/dist/components/{p-BeCgojET.js → p-BBhidARY.js} +2 -2
- package/dist/components/p-BBhidARY.js.map +1 -0
- package/dist/components/{p-Ci39rxuU.js → p-BRbYDZoo.js} +2 -2
- package/dist/components/{p-D9ofIraD.js → p-CVw85-WU.js} +1 -1
- package/dist/components/p-CVw85-WU.js.map +1 -0
- package/dist/components/p-CXUO6Zub.js +6 -0
- package/dist/components/p-CXUO6Zub.js.map +1 -0
- package/dist/{beeq/p-C_mtknb1.js → components/p-CgIw4Syg.js} +2 -2
- package/dist/components/p-CgIw4Syg.js.map +1 -0
- package/dist/components/{p-B6nMRjwz.js → p-D14_9VoZ.js} +2 -2
- package/dist/components/{p-B6nMRjwz.js.map → p-D14_9VoZ.js.map} +1 -1
- package/dist/components/{p-eLopxgQr.js → p-DGysEMss.js} +2 -2
- package/dist/components/p-DGysEMss.js.map +1 -0
- package/dist/components/p-DHdYy1q5.js +6 -0
- package/dist/components/p-DHdYy1q5.js.map +1 -0
- package/dist/components/{p--r87nWid.js → p-DokL_HVP.js} +2 -2
- package/dist/components/p-DokL_HVP.js.map +1 -0
- package/dist/components/{p-DwLfHxB7.js → p-eRUe5rRq.js} +2 -2
- package/dist/components/p-eRUe5rRq.js.map +1 -0
- package/dist/components/{p-CVMdKx0v.js → p-lysmVw2n.js} +2 -2
- package/dist/components/{p-CVMdKx0v.js.map → p-lysmVw2n.js.map} +1 -1
- package/dist/custom-elements.json +374 -378
- package/dist/esm/beeq.js +4 -4
- package/dist/esm/beeq.js.map +1 -1
- package/dist/esm/bq-accordion-group.entry.js +2 -2
- package/dist/esm/bq-accordion-group.entry.js.map +1 -1
- package/dist/esm/bq-accordion.entry.js +18 -8
- package/dist/esm/bq-accordion.entry.js.map +1 -1
- package/dist/esm/bq-alert.entry.js +13 -10
- package/dist/esm/bq-alert.entry.js.map +1 -1
- package/dist/esm/bq-avatar.entry.js +6 -6
- package/dist/esm/bq-avatar.entry.js.map +1 -1
- package/dist/esm/bq-badge.entry.js +4 -2
- package/dist/esm/bq-badge.entry.js.map +1 -1
- package/dist/esm/bq-breadcrumb-item.entry.js +5 -5
- package/dist/esm/bq-breadcrumb-item.entry.js.map +1 -1
- package/dist/esm/bq-breadcrumb.entry.js +7 -3
- package/dist/esm/bq-breadcrumb.entry.js.map +1 -1
- package/dist/esm/bq-button.bq-icon.entry.js.map +1 -1
- package/dist/esm/bq-button_2.entry.js +14 -10
- package/dist/esm/bq-card.entry.js +3 -3
- package/dist/esm/bq-card.entry.js.map +1 -1
- package/dist/esm/bq-checkbox.entry.js +6 -4
- package/dist/esm/bq-checkbox.entry.js.map +1 -1
- package/dist/esm/bq-date-picker.entry.js +70 -25
- package/dist/esm/bq-date-picker.entry.js.map +1 -1
- package/dist/esm/bq-dialog.entry.js +13 -7
- package/dist/esm/bq-dialog.entry.js.map +1 -1
- package/dist/esm/bq-divider.entry.js +7 -5
- package/dist/esm/bq-divider.entry.js.map +1 -1
- package/dist/esm/bq-drawer.entry.js +9 -5
- package/dist/esm/bq-drawer.entry.js.map +1 -1
- package/dist/esm/bq-dropdown.bq-panel.entry.js.map +1 -1
- package/dist/esm/bq-dropdown_2.entry.js +13 -7
- package/dist/esm/bq-empty-state.entry.js +10 -6
- package/dist/esm/bq-empty-state.entry.js.map +1 -1
- package/dist/esm/bq-input.entry.js +30 -22
- package/dist/esm/bq-input.entry.js.map +1 -1
- package/dist/esm/bq-notification.entry.js +11 -5
- package/dist/esm/bq-notification.entry.js.map +1 -1
- package/dist/esm/bq-option-group.entry.js +3 -3
- package/dist/esm/bq-option-group.entry.js.map +1 -1
- package/dist/esm/bq-option-list.bq-tag.entry.js.map +1 -1
- package/dist/esm/bq-option-list_2.entry.js +8 -6
- package/dist/esm/bq-option.entry.js +17 -10
- package/dist/esm/bq-option.entry.js.map +1 -1
- package/dist/esm/bq-page-title.entry.js +11 -5
- package/dist/esm/bq-page-title.entry.js.map +1 -1
- package/dist/esm/bq-progress.entry.js +7 -7
- package/dist/esm/bq-progress.entry.js.map +1 -1
- package/dist/esm/bq-radio-group.entry.js +15 -9
- package/dist/esm/bq-radio-group.entry.js.map +1 -1
- package/dist/esm/bq-radio.entry.js +4 -2
- package/dist/esm/bq-radio.entry.js.map +1 -1
- package/dist/esm/bq-select.entry.js +76 -29
- package/dist/esm/bq-select.entry.js.map +1 -1
- package/dist/esm/bq-side-menu-item.entry.js +7 -5
- package/dist/esm/bq-side-menu-item.entry.js.map +1 -1
- package/dist/esm/bq-side-menu.entry.js +11 -7
- package/dist/esm/bq-side-menu.entry.js.map +1 -1
- package/dist/esm/bq-slider.entry.js +25 -12
- package/dist/esm/bq-slider.entry.js.map +1 -1
- package/dist/esm/bq-spinner.entry.js +12 -12
- package/dist/esm/bq-spinner.entry.js.map +1 -1
- package/dist/esm/bq-status.entry.js +3 -3
- package/dist/esm/bq-status.entry.js.map +1 -1
- package/dist/esm/bq-step-item.entry.js +7 -7
- package/dist/esm/bq-step-item.entry.js.map +1 -1
- package/dist/esm/bq-steps.entry.js +6 -4
- package/dist/esm/bq-steps.entry.js.map +1 -1
- package/dist/esm/bq-switch.entry.js +9 -5
- package/dist/esm/bq-switch.entry.js.map +1 -1
- package/dist/esm/bq-tab-group.entry.js +9 -7
- package/dist/esm/bq-tab-group.entry.js.map +1 -1
- package/dist/esm/bq-tab.entry.js +9 -5
- package/dist/esm/bq-tab.entry.js.map +1 -1
- package/dist/esm/bq-textarea.entry.js +17 -14
- package/dist/esm/bq-textarea.entry.js.map +1 -1
- package/dist/esm/bq-toast.entry.js +5 -6
- package/dist/esm/bq-toast.entry.js.map +1 -1
- package/dist/esm/bq-tooltip.entry.js +9 -3
- package/dist/esm/bq-tooltip.entry.js.map +1 -1
- package/dist/esm/date-igOoibr-.js +167 -0
- package/dist/esm/date-igOoibr-.js.map +1 -0
- package/dist/esm/{debounce-cjfQylgg.js → debounce-gVeuteEJ.js} +4 -4
- package/dist/esm/debounce-gVeuteEJ.js.map +1 -0
- package/dist/esm/{index-B2Q_ACEf.js → index-BOf9EC3C.js} +56 -48
- package/dist/esm/index-BOf9EC3C.js.map +1 -0
- package/dist/esm/{index-C_mtknb1.js → index-CgIw4Syg.js} +36 -27
- package/dist/esm/{index-C_mtknb1.js.map → index-CgIw4Syg.js.map} +1 -1
- package/dist/esm/index.js +5 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/{isDefined-DjmcVyb_.js → isDefined-DvmFa_bD.js} +3 -3
- package/dist/esm/{isDefined-DjmcVyb_.js.map → isDefined-DvmFa_bD.js.map} +1 -1
- package/dist/esm/{isString-CVMdKx0v.js → isString-lysmVw2n.js} +3 -3
- package/dist/esm/{isString-CVMdKx0v.js.map → isString-lysmVw2n.js.map} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{stringToArray-DD7NecAG.js → stringToArray-CIJArUww.js} +4 -4
- package/dist/esm/{stringToArray-DD7NecAG.js.map → stringToArray-CIJArUww.js.map} +1 -1
- package/dist/hydrate/index.d.ts +2 -0
- package/dist/hydrate/index.js +905 -519
- package/dist/hydrate/index.mjs +905 -519
- package/dist/jest.config.js +3 -0
- package/dist/jest.config.js.map +1 -1
- package/dist/stencil.config.js +3 -2
- package/dist/stencil.config.js.map +1 -1
- package/dist/types/components/date-picker/bq-date-picker.d.ts +5 -2
- package/dist/types/components/dropdown/bq-dropdown.d.ts +1 -0
- package/dist/types/components/icon/bq-icon.d.ts +1 -1
- package/dist/types/components/input/bq-input.d.ts +10 -11
- package/dist/types/components/option/bq-option.d.ts +4 -2
- package/dist/types/components/select/bq-select.d.ts +1 -0
- package/dist/types/components/spinner/bq-spinner.types.d.ts +1 -1
- package/dist/types/components/step-item/bq-step-item.d.ts +1 -1
- package/dist/types/components/tag/helper/index.d.ts +1 -1
- package/dist/types/components/textarea/bq-textarea.d.ts +5 -9
- package/dist/types/components.d.ts +40 -42
- package/dist/types/global.d.ts +1 -4
- package/dist/types/{Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System → home/runner/work/BEEQ/BEEQ}/.stencil/packages/beeq/jest.config.d.ts +3 -0
- package/dist/types/services/interfaces/floating-ui.d.ts +1 -1
- package/dist/types/services/libraries/floating-ui/index.d.ts +5 -2
- package/dist/types/shared/test-utils/setProperties.d.ts +1 -1
- package/dist/types/shared/test-utils/sleep.d.ts +1 -1
- package/dist/types/shared/utils/date.d.ts +18 -0
- package/dist/types/shared/utils/debounce.d.ts +1 -1
- package/dist/types/shared/utils/index.d.ts +1 -0
- package/dist/types/shared/utils/setRafTimeout.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +35 -11
- package/dist/types/tools/angular-value-accessor-config.d.ts +1 -1
- package/dist/types/tools/vue-model-config.d.ts +1 -1
- package/package.json +4 -4
- package/dist/beeq/p-1770fd5b.entry.js.map +0 -1
- package/dist/beeq/p-28788a48.entry.js.map +0 -1
- package/dist/beeq/p-3424586a.entry.js.map +0 -1
- package/dist/beeq/p-3b1ef7e6.entry.js.map +0 -1
- package/dist/beeq/p-4a726c36.entry.js +0 -6
- package/dist/beeq/p-61065a1c.entry.js +0 -6
- package/dist/beeq/p-61065a1c.entry.js.map +0 -1
- package/dist/beeq/p-6eb0f643.entry.js.map +0 -1
- package/dist/beeq/p-73054d34.entry.js.map +0 -1
- package/dist/beeq/p-7bf79e31.entry.js.map +0 -1
- package/dist/beeq/p-7ecff021.entry.js.map +0 -1
- package/dist/beeq/p-84c96afc.entry.js.map +0 -1
- package/dist/beeq/p-92fed771.entry.js.map +0 -1
- package/dist/beeq/p-B2Q_ACEf.js +0 -7
- package/dist/beeq/p-B2Q_ACEf.js.map +0 -1
- package/dist/beeq/p-D9ofIraD.js.map +0 -1
- package/dist/beeq/p-afecb3f2.entry.js.map +0 -1
- package/dist/beeq/p-b40aaef2.entry.js.map +0 -1
- package/dist/beeq/p-bcd00932.entry.js.map +0 -1
- package/dist/beeq/p-c737da48.entry.js +0 -6
- package/dist/beeq/p-c737da48.entry.js.map +0 -1
- package/dist/beeq/p-dc188227.entry.js +0 -6
- package/dist/beeq/p-dc188227.entry.js.map +0 -1
- package/dist/beeq/p-de332995.entry.js.map +0 -1
- package/dist/beeq/p-e2aec11c.entry.js +0 -6
- package/dist/beeq/p-e2aec11c.entry.js.map +0 -1
- package/dist/beeq/p-e5e294ad.entry.js +0 -6
- package/dist/beeq/p-e5e294ad.entry.js.map +0 -1
- package/dist/beeq/p-ee9117e4.entry.js.map +0 -1
- package/dist/cjs/debounce-DFaAa1Cu.js.map +0 -1
- package/dist/cjs/index-DMgUhnao.js.map +0 -1
- package/dist/components/p--r87nWid.js.map +0 -1
- package/dist/components/p-3U5U42sd.js.map +0 -1
- package/dist/components/p-BeCgojET.js.map +0 -1
- package/dist/components/p-C_mtknb1.js.map +0 -1
- package/dist/components/p-D5Ui9x2e.js +0 -6
- package/dist/components/p-D5Ui9x2e.js.map +0 -1
- package/dist/components/p-D8zAe4nK.js +0 -6
- package/dist/components/p-D8zAe4nK.js.map +0 -1
- package/dist/components/p-D9ofIraD.js.map +0 -1
- package/dist/components/p-DX628oDu.js.map +0 -1
- package/dist/components/p-DwLfHxB7.js.map +0 -1
- package/dist/components/p-eLopxgQr.js.map +0 -1
- package/dist/esm/debounce-cjfQylgg.js.map +0 -1
- package/dist/esm/index-B2Q_ACEf.js.map +0 -1
- /package/dist/components/{p-Ci39rxuU.js.map → p-BRbYDZoo.js.map} +0 -0
- /package/dist/types/{Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System → home/runner/work/BEEQ/BEEQ}/.stencil/packages/beeq/stencil.config.d.ts +0 -0
- /package/dist/types/{Users/dramos/PROJECTs/ENDAVA/BEEQ-Design-System → home/runner/work/BEEQ/BEEQ}/.stencil/tailwind.config.d.ts +0 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built by Endavans
|
|
3
|
+
* © https://beeq.design - Apache 2 License.
|
|
4
|
+
*/
|
|
5
|
+
'use strict';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Static date parsing patterns
|
|
9
|
+
*/
|
|
10
|
+
const DATE_PATTERNS = [
|
|
11
|
+
{
|
|
12
|
+
// Matches "30 May 2024" or "30 January 2024"
|
|
13
|
+
regex: /^(\d{1,2})\s+([a-z]+)\s+(\d{4})$/i,
|
|
14
|
+
parse: (m, months) => ({
|
|
15
|
+
day: +m[1],
|
|
16
|
+
month: months[m[2].toLowerCase()],
|
|
17
|
+
year: +m[3],
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
// Matches "05/30/2024", "30-05-2024", "30.05.2024", "05.30.2024" (with heuristic for day/month)
|
|
22
|
+
regex: /^(\d{1,2})[\s\-/.](\d{1,2})[\s\-/.](\d{4})$/,
|
|
23
|
+
parse: (m, _, locale) => {
|
|
24
|
+
const { day, month } = parseNumericDate(+m[1], +m[2], locale);
|
|
25
|
+
return { day, month, year: +m[3] };
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
// Matches "May 30, 2024" or "January 1, 1970" (with optional comma)
|
|
30
|
+
regex: /^([a-z]+)\s+(\d{1,2}),?\s+(\d{4})$/i,
|
|
31
|
+
parse: (m, months) => ({
|
|
32
|
+
month: months[m[1].toLowerCase()],
|
|
33
|
+
day: +m[2],
|
|
34
|
+
year: +m[3],
|
|
35
|
+
}),
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
// Matches "2024-05-30" (ISO format without parsing as Date first)
|
|
39
|
+
regex: /^(\d{4})-(\d{2})-(\d{2})$/,
|
|
40
|
+
parse: (m) => ({
|
|
41
|
+
year: +m[1],
|
|
42
|
+
month: +m[2] - 1,
|
|
43
|
+
day: +m[3],
|
|
44
|
+
}),
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
const monthNamesCache = new Map();
|
|
48
|
+
/**
|
|
49
|
+
* Gets localized month names for the given locale (both short and long forms)
|
|
50
|
+
* Caches results for performance
|
|
51
|
+
* @param {Intl.LocalesArgument} locale - The locale identifier, e.g., 'en-GB', 'fr-FR', etc.
|
|
52
|
+
* @returns {Record<string, number>} Mapping of month names to month indices
|
|
53
|
+
*/
|
|
54
|
+
const getMonthNamesForLocale = (locale) => {
|
|
55
|
+
const cacheKey = typeof locale === 'string' ? locale : JSON.stringify(locale);
|
|
56
|
+
const cachedMonthNames = monthNamesCache.get(cacheKey);
|
|
57
|
+
if (cachedMonthNames)
|
|
58
|
+
return cachedMonthNames;
|
|
59
|
+
const monthMap = {};
|
|
60
|
+
const shortFormatter = new Intl.DateTimeFormat(locale, { month: 'short' });
|
|
61
|
+
const longFormatter = new Intl.DateTimeFormat(locale, { month: 'long' });
|
|
62
|
+
for (let month = 0; month < 12; month++) {
|
|
63
|
+
const date = new Date(2024, month, 1);
|
|
64
|
+
monthMap[shortFormatter.format(date).toLowerCase()] = month;
|
|
65
|
+
monthMap[longFormatter.format(date).toLowerCase()] = month;
|
|
66
|
+
}
|
|
67
|
+
monthNamesCache.set(cacheKey, monthMap);
|
|
68
|
+
return monthMap;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Parses day-month-year or month-day-year numeric date format
|
|
72
|
+
* Uses heuristic: if any number > 12, treat it as day, otherwise defaults to locale preference
|
|
73
|
+
* @param {number} first - The first numeric part (day or month)
|
|
74
|
+
* @param {number} second - The second numeric part (month or day)
|
|
75
|
+
* @param {Intl.LocalesArgument} locale - The locale for determining format preference
|
|
76
|
+
* @returns {{day: number, month: number}} Object with day and month (0-based)
|
|
77
|
+
*/
|
|
78
|
+
const parseNumericDate = (first, second, locale = 'en-GB') => {
|
|
79
|
+
// If first number > 12, it must be the day (DD/MM format)
|
|
80
|
+
if (first > 12)
|
|
81
|
+
return { day: first, month: second - 1 };
|
|
82
|
+
// If second number > 12, it must be the day (MM/DD format)
|
|
83
|
+
if (second > 12)
|
|
84
|
+
return { day: second, month: first - 1 };
|
|
85
|
+
// Both numbers <= 12: ambiguous case
|
|
86
|
+
// Use locale to determine format preference
|
|
87
|
+
const localeStr = typeof locale === 'string' ? locale : locale?.[0] || 'en-GB';
|
|
88
|
+
const usesMMDD = ['en-US', 'en-CA'].some((l) => localeStr.startsWith(l));
|
|
89
|
+
if (usesMMDD) {
|
|
90
|
+
// US/Canada format: MM/DD
|
|
91
|
+
return { day: second, month: first - 1 };
|
|
92
|
+
}
|
|
93
|
+
// Default to DD/MM (European/most of world format)
|
|
94
|
+
return { day: first, month: second - 1 };
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Validates that a date is actually valid (not auto-corrected by Date constructor)
|
|
98
|
+
* @param {number} day - Day of the month
|
|
99
|
+
* @param {number} month - Month (0-based)
|
|
100
|
+
* @param {number} year - Full year
|
|
101
|
+
* @returns {boolean} True if the date is valid
|
|
102
|
+
*/
|
|
103
|
+
const isDateValid = (day, month, year) => {
|
|
104
|
+
const date = new Date(year, month, day);
|
|
105
|
+
return date.getDate() === day && date.getMonth() === month && date.getFullYear() === year;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Validates and creates a Date object from day, month, and year
|
|
109
|
+
* @param {number} day - Day of the month
|
|
110
|
+
* @param {number} month - Month (0-based)
|
|
111
|
+
* @param {number} year - Full year
|
|
112
|
+
* @returns {Date | null} Valid Date object or null if invalid
|
|
113
|
+
*/
|
|
114
|
+
const createValidDate = (day, month, year) => {
|
|
115
|
+
if (month === undefined || !day || !year)
|
|
116
|
+
return null;
|
|
117
|
+
if (!isDateValid(day, month, year))
|
|
118
|
+
return null;
|
|
119
|
+
return new Date(year, month, day);
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Parses various date input formats and returns a Date object
|
|
123
|
+
* Supports:
|
|
124
|
+
* - ISO format: "2024-05-30"
|
|
125
|
+
* - Text format: "30 May 2024", "May 30, 2024", "30 January 2024", "January 1, 1970" (locale-aware)
|
|
126
|
+
* - Numeric formats: "30/05/2024", "05-30-2024", "30.05.2024", "05.30.2024" (with heuristic for day/month)
|
|
127
|
+
*
|
|
128
|
+
* @param {string} inputValue - The date string to parse
|
|
129
|
+
* @param {Intl.LocalesArgument} locale - The locale for month name recognition (defaults to 'en-GB')
|
|
130
|
+
* @returns {Date | null} Parsed Date object or null if parsing fails
|
|
131
|
+
*/
|
|
132
|
+
const parseDateInput = (inputValue, locale = 'en-GB') => {
|
|
133
|
+
if (!inputValue?.trim())
|
|
134
|
+
return null;
|
|
135
|
+
// Try ISO format first
|
|
136
|
+
const isoDate = new Date(`${inputValue}T00:00:00`);
|
|
137
|
+
if (!Number.isNaN(isoDate.getTime()) && isValidISODate(inputValue))
|
|
138
|
+
return isoDate;
|
|
139
|
+
const monthMap = getMonthNamesForLocale(locale);
|
|
140
|
+
for (const { regex, parse } of DATE_PATTERNS) {
|
|
141
|
+
const match = regex.exec(inputValue);
|
|
142
|
+
if (!match)
|
|
143
|
+
continue;
|
|
144
|
+
const { day, month, year } = parse(match, monthMap, locale);
|
|
145
|
+
const date = createValidDate(day, month, year);
|
|
146
|
+
if (date)
|
|
147
|
+
return date;
|
|
148
|
+
}
|
|
149
|
+
return null;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Validates if a string is in ISO date format (YYYY-MM-DD) with actual valid date values
|
|
153
|
+
* @param {string} dateStr - The date string to validate
|
|
154
|
+
* @returns {boolean} True if the date string is valid in ISO format and represents an actual valid date
|
|
155
|
+
*/
|
|
156
|
+
const isValidISODate = (dateStr) => {
|
|
157
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(dateStr))
|
|
158
|
+
return false;
|
|
159
|
+
const [yearStr, monthStr, dayStr] = dateStr.split('-');
|
|
160
|
+
const year = +yearStr;
|
|
161
|
+
const month = +monthStr - 1;
|
|
162
|
+
const day = +dayStr;
|
|
163
|
+
return isDateValid(day, month, year);
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
exports.isValidISODate = isValidISODate;
|
|
167
|
+
exports.parseDateInput = parseDateInput;
|
|
168
|
+
//# sourceMappingURL=date-C-h2CBps.js.map
|
|
169
|
+
|
|
170
|
+
//# sourceMappingURL=date-C-h2CBps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-C-h2CBps.js","sources":["../../packages/beeq/src/shared/utils/date.ts"],"sourcesContent":["/**\n * Date parsing pattern definition\n */\ntype TDatePattern = {\n regex: RegExp;\n parse: (\n match: RegExpExecArray,\n monthMap: Record<string, number>,\n locale?: Intl.LocalesArgument,\n ) => { day: number; month: number; year: number };\n};\n\n/**\n * Static date parsing patterns\n */\nconst DATE_PATTERNS: TDatePattern[] = [\n {\n // Matches \"30 May 2024\" or \"30 January 2024\"\n regex: /^(\\d{1,2})\\s+([a-z]+)\\s+(\\d{4})$/i,\n parse: (m, months) => ({\n day: +m[1],\n month: months[m[2].toLowerCase()],\n year: +m[3],\n }),\n },\n {\n // Matches \"05/30/2024\", \"30-05-2024\", \"30.05.2024\", \"05.30.2024\" (with heuristic for day/month)\n regex: /^(\\d{1,2})[\\s\\-/.](\\d{1,2})[\\s\\-/.](\\d{4})$/,\n parse: (m, _, locale) => {\n const { day, month } = parseNumericDate(+m[1], +m[2], locale);\n return { day, month, year: +m[3] };\n },\n },\n {\n // Matches \"May 30, 2024\" or \"January 1, 1970\" (with optional comma)\n regex: /^([a-z]+)\\s+(\\d{1,2}),?\\s+(\\d{4})$/i,\n parse: (m, months) => ({\n month: months[m[1].toLowerCase()],\n day: +m[2],\n year: +m[3],\n }),\n },\n {\n // Matches \"2024-05-30\" (ISO format without parsing as Date first)\n regex: /^(\\d{4})-(\\d{2})-(\\d{2})$/,\n parse: (m) => ({\n year: +m[1],\n month: +m[2] - 1,\n day: +m[3],\n }),\n },\n];\n\nconst monthNamesCache = new Map<string, Record<string, number>>();\n\n/**\n * Gets localized month names for the given locale (both short and long forms)\n * Caches results for performance\n * @param {Intl.LocalesArgument} locale - The locale identifier, e.g., 'en-GB', 'fr-FR', etc.\n * @returns {Record<string, number>} Mapping of month names to month indices\n */\nconst getMonthNamesForLocale = (locale: Intl.LocalesArgument): Record<string, number> => {\n const cacheKey = typeof locale === 'string' ? locale : JSON.stringify(locale);\n\n const cachedMonthNames = monthNamesCache.get(cacheKey);\n if (cachedMonthNames) return cachedMonthNames;\n\n const monthMap: Record<string, number> = {};\n const shortFormatter = new Intl.DateTimeFormat(locale, { month: 'short' });\n const longFormatter = new Intl.DateTimeFormat(locale, { month: 'long' });\n\n for (let month = 0; month < 12; month++) {\n const date = new Date(2024, month, 1);\n monthMap[shortFormatter.format(date).toLowerCase()] = month;\n monthMap[longFormatter.format(date).toLowerCase()] = month;\n }\n\n monthNamesCache.set(cacheKey, monthMap);\n return monthMap;\n};\n\n/**\n * Parses day-month-year or month-day-year numeric date format\n * Uses heuristic: if any number > 12, treat it as day, otherwise defaults to locale preference\n * @param {number} first - The first numeric part (day or month)\n * @param {number} second - The second numeric part (month or day)\n * @param {Intl.LocalesArgument} locale - The locale for determining format preference\n * @returns {{day: number, month: number}} Object with day and month (0-based)\n */\nconst parseNumericDate = (\n first: number,\n second: number,\n locale: Intl.LocalesArgument = 'en-GB',\n): { day: number; month: number } => {\n // If first number > 12, it must be the day (DD/MM format)\n if (first > 12) return { day: first, month: second - 1 };\n\n // If second number > 12, it must be the day (MM/DD format)\n if (second > 12) return { day: second, month: first - 1 };\n\n // Both numbers <= 12: ambiguous case\n // Use locale to determine format preference\n const localeStr = typeof locale === 'string' ? locale : locale?.[0] || 'en-GB';\n const usesMMDD = ['en-US', 'en-CA'].some((l) => localeStr.startsWith(l));\n\n if (usesMMDD) {\n // US/Canada format: MM/DD\n return { day: second, month: first - 1 };\n }\n\n // Default to DD/MM (European/most of world format)\n return { day: first, month: second - 1 };\n};\n\n/**\n * Validates that a date is actually valid (not auto-corrected by Date constructor)\n * @param {number} day - Day of the month\n * @param {number} month - Month (0-based)\n * @param {number} year - Full year\n * @returns {boolean} True if the date is valid\n */\nconst isDateValid = (day: number, month: number, year: number): boolean => {\n const date = new Date(year, month, day);\n return date.getDate() === day && date.getMonth() === month && date.getFullYear() === year;\n};\n\n/**\n * Validates and creates a Date object from day, month, and year\n * @param {number} day - Day of the month\n * @param {number} month - Month (0-based)\n * @param {number} year - Full year\n * @returns {Date | null} Valid Date object or null if invalid\n */\nconst createValidDate = (day: number, month: number, year: number): Date | null => {\n if (month === undefined || !day || !year) return null;\n if (!isDateValid(day, month, year)) return null;\n\n return new Date(year, month, day);\n};\n\n/**\n * Parses various date input formats and returns a Date object\n * Supports:\n * - ISO format: \"2024-05-30\"\n * - Text format: \"30 May 2024\", \"May 30, 2024\", \"30 January 2024\", \"January 1, 1970\" (locale-aware)\n * - Numeric formats: \"30/05/2024\", \"05-30-2024\", \"30.05.2024\", \"05.30.2024\" (with heuristic for day/month)\n *\n * @param {string} inputValue - The date string to parse\n * @param {Intl.LocalesArgument} locale - The locale for month name recognition (defaults to 'en-GB')\n * @returns {Date | null} Parsed Date object or null if parsing fails\n */\nexport const parseDateInput = (inputValue: string, locale: Intl.LocalesArgument = 'en-GB'): Date | null => {\n if (!inputValue?.trim()) return null;\n\n // Try ISO format first\n const isoDate = new Date(`${inputValue}T00:00:00`);\n if (!Number.isNaN(isoDate.getTime()) && isValidISODate(inputValue)) return isoDate;\n\n const monthMap = getMonthNamesForLocale(locale);\n\n for (const { regex, parse } of DATE_PATTERNS) {\n const match = regex.exec(inputValue);\n if (!match) continue;\n\n const { day, month, year } = parse(match, monthMap, locale);\n const date = createValidDate(day, month, year);\n if (date) return date;\n }\n\n return null;\n};\n\n/**\n * Validates if a string is in ISO date format (YYYY-MM-DD) with actual valid date values\n * @param {string} dateStr - The date string to validate\n * @returns {boolean} True if the date string is valid in ISO format and represents an actual valid date\n */\nexport const isValidISODate = (dateStr: string): boolean => {\n if (!/^\\d{4}-\\d{2}-\\d{2}$/.test(dateStr)) return false;\n\n const [yearStr, monthStr, dayStr] = dateStr.split('-');\n const year = +yearStr;\n const month = +monthStr - 1;\n const day = +dayStr;\n\n return isDateValid(day, month, year);\n};\n"],"names":[],"mappings":";;;;;;AAYA;;AAEG;AACH,MAAM,aAAa,GAAmB;AACpC,IAAA;;AAEE,QAAA,KAAK,EAAE,mCAAmC;QAC1C,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,MAAM;AACrB,YAAA,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YACV,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AACjC,YAAA,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;SACZ,CAAC;AACH,KAAA;AACD,IAAA;;AAEE,QAAA,KAAK,EAAE,6CAA6C;QACpD,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,KAAI;YACtB,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC;AAC7D,YAAA,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;SACnC;AACF,KAAA;AACD,IAAA;;AAEE,QAAA,KAAK,EAAE,qCAAqC;QAC5C,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,MAAM;YACrB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AACjC,YAAA,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACV,YAAA,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;SACZ,CAAC;AACH,KAAA;AACD,IAAA;;AAEE,QAAA,KAAK,EAAE,2BAA2B;AAClC,QAAA,KAAK,EAAE,CAAC,CAAC,MAAM;AACb,YAAA,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACX,YAAA,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AAChB,YAAA,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;SACX,CAAC;AACH,KAAA;CACF;AAED,MAAM,eAAe,GAAG,IAAI,GAAG,EAAkC;AAEjE;;;;;AAKG;AACH,MAAM,sBAAsB,GAAG,CAAC,MAA4B,KAA4B;AACtF,IAAA,MAAM,QAAQ,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;IAE7E,MAAM,gBAAgB,GAAG,eAAe,CAAC,GAAG,CAAC,QAAQ,CAAC;AACtD,IAAA,IAAI,gBAAgB;AAAE,QAAA,OAAO,gBAAgB;IAE7C,MAAM,QAAQ,GAA2B,EAAE;AAC3C,IAAA,MAAM,cAAc,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAC1E,IAAA,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAExE,IAAA,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE;QACvC,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;AACrC,QAAA,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,GAAG,KAAK;AAC3D,QAAA,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,GAAG,KAAK;;AAG5D,IAAA,eAAe,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC;AACvC,IAAA,OAAO,QAAQ;AACjB,CAAC;AAED;;;;;;;AAOG;AACH,MAAM,gBAAgB,GAAG,CACvB,KAAa,EACb,MAAc,EACd,MAAA,GAA+B,OAAO,KACJ;;IAElC,IAAI,KAAK,GAAG,EAAE;QAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,EAAE;;IAGxD,IAAI,MAAM,GAAG,EAAE;QAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE;;;IAIzD,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC,IAAI,OAAO;IAC9E,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAExE,IAAI,QAAQ,EAAE;;QAEZ,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE;;;IAI1C,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,EAAE;AAC1C,CAAC;AAED;;;;;;AAMG;AACH,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,KAAa,EAAE,IAAY,KAAa;IACxE,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC;IACvC,OAAO,IAAI,CAAC,OAAO,EAAE,KAAK,GAAG,IAAI,IAAI,CAAC,QAAQ,EAAE,KAAK,KAAK,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,IAAI;AAC3F,CAAC;AAED;;;;;;AAMG;AACH,MAAM,eAAe,GAAG,CAAC,GAAW,EAAE,KAAa,EAAE,IAAY,KAAiB;IAChF,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,IAAI;IACrD,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC;AAAE,QAAA,OAAO,IAAI;IAE/C,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC;AACnC,CAAC;AAED;;;;;;;;;;AAUG;AACU,MAAA,cAAc,GAAG,CAAC,UAAkB,EAAE,MAAA,GAA+B,OAAO,KAAiB;AACxG,IAAA,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE;AAAE,QAAA,OAAO,IAAI;;IAGpC,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,CAAG,EAAA,UAAU,CAAW,SAAA,CAAA,CAAC;AAClD,IAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,cAAc,CAAC,UAAU,CAAC;AAAE,QAAA,OAAO,OAAO;AAElF,IAAA,MAAM,QAAQ,GAAG,sBAAsB,CAAC,MAAM,CAAC;IAE/C,KAAK,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,aAAa,EAAE;QAC5C,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC;AACpC,QAAA,IAAI,CAAC,KAAK;YAAE;AAEZ,QAAA,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC;QAC3D,MAAM,IAAI,GAAG,eAAe,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC;AAC9C,QAAA,IAAI,IAAI;AAAE,YAAA,OAAO,IAAI;;AAGvB,IAAA,OAAO,IAAI;AACb;AAEA;;;;AAIG;AACU,MAAA,cAAc,GAAG,CAAC,OAAe,KAAa;AACzD,IAAA,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC;AAAE,QAAA,OAAO,KAAK;AAEtD,IAAA,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC;AACtD,IAAA,MAAM,IAAI,GAAG,CAAC,OAAO;AACrB,IAAA,MAAM,KAAK,GAAG,CAAC,QAAQ,GAAG,CAAC;AAC3B,IAAA,MAAM,GAAG,GAAG,CAAC,MAAM;IAEnB,OAAO,WAAW,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC;AACtC;;;;;"}
|
|
@@ -14,7 +14,6 @@ var isNil = require('./isNil-CFhdj92S.js');
|
|
|
14
14
|
* @param {Any[]} args - The arguments of func.
|
|
15
15
|
* @returns {void}
|
|
16
16
|
*/
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
17
|
const setRafTimeout = (func, wait, ...args) => {
|
|
19
18
|
const invokeFunc = () => func(...args);
|
|
20
19
|
if (wait === 0) {
|
|
@@ -53,7 +52,8 @@ const debounce = (func, wait = 0, immediate = false) => {
|
|
|
53
52
|
let cancel;
|
|
54
53
|
function debounceHandler(...args) {
|
|
55
54
|
cancel?.();
|
|
56
|
-
//
|
|
55
|
+
// We're doing this on purpose to capture and preserve the `this` context
|
|
56
|
+
// biome-ignore lint/complexity/noUselessThisAlias: <see above>
|
|
57
57
|
const context = this;
|
|
58
58
|
function timeoutHandler(fn, context, ...args) {
|
|
59
59
|
fn.apply(context, args);
|
|
@@ -72,6 +72,6 @@ const debounce = (func, wait = 0, immediate = false) => {
|
|
|
72
72
|
|
|
73
73
|
exports.debounce = debounce;
|
|
74
74
|
exports.setRafTimeout = setRafTimeout;
|
|
75
|
-
//# sourceMappingURL=debounce-
|
|
75
|
+
//# sourceMappingURL=debounce-D0tIpUuS.js.map
|
|
76
76
|
|
|
77
|
-
//# sourceMappingURL=debounce-
|
|
77
|
+
//# sourceMappingURL=debounce-D0tIpUuS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debounce-D0tIpUuS.js","sources":["../../packages/beeq/src/shared/utils/setRafTimeout.ts","../../packages/beeq/src/shared/utils/debounce.ts"],"sourcesContent":["/**\n * Implements setTimeout using requestAnimationFrame. Uses setTimeout if wait is 0.\n *\n * @param {Function} func - The function to timeout.\n * @param {Number} wait - The number of milliseconds to delay.\n * @param {Any[]} args - The arguments of func.\n * @returns {void}\n */\nexport const setRafTimeout = <TFunc extends (...args: unknown[]) => void>(\n func: TFunc,\n wait: number,\n ...args: Parameters<TFunc>\n): (() => void) => {\n const invokeFunc = () => func(...args);\n\n if (wait === 0) {\n const timeoutId = setTimeout(invokeFunc, wait);\n return () => clearTimeout(timeoutId);\n } else {\n let rafId: number;\n const currentTime = performance.now();\n\n const cancel = () => cancelAnimationFrame(rafId);\n\n const handleRequestAnimationFrame: FrameRequestCallback = (time) => {\n const delta = time - currentTime;\n\n cancel();\n\n if (delta < wait) {\n rafId = requestAnimationFrame(handleRequestAnimationFrame);\n } else {\n invokeFunc();\n }\n };\n\n rafId = requestAnimationFrame(handleRequestAnimationFrame);\n\n return cancel;\n }\n};\n","import { isNil } from './isNil';\nimport { setRafTimeout } from './setRafTimeout';\n\nexport type TFunction = (...args: unknown[]) => unknown;\n\ntype TDebounceFnReturn<T> = T extends unknown[] ? (...params: T) => void : (param: T) => void;\nexport type TDebounce<T> = TDebounceFnReturn<T> & { cancel: () => void } extends infer U ? U : never;\n\n/**\n * Creates a debounced function that delays invoking func until after wait milliseconds have elapsed\n * since the last time the debounced function was invoked.\n *\n * @param {Function} func - The function to debounce.\n * @param {Number} wait - The number of milliseconds to delay.\n * @param {Boolean} immediate - If `true`, the function triggers immediately and then waits for the interval before being called again.\n * @return {Function} The new debounced function.\n */\nexport const debounce = <TFunc extends TFunction>(func: TFunc, wait = 0, immediate = false) => {\n let cancel: (() => void) | undefined;\n\n function debounceHandler(...args: Parameters<typeof func>) {\n cancel?.();\n\n // We're doing this on purpose to capture and preserve the `this` context\n // biome-ignore lint/complexity/noUselessThisAlias: <see above>\n const context = this;\n\n function timeoutHandler(fn: TFunc, context: unknown, ...args: Parameters<typeof fn>) {\n fn.apply(context, args);\n }\n\n if (immediate && isNil(cancel)) {\n func.apply(context, args);\n }\n\n cancel = setRafTimeout(timeoutHandler, wait, func, context, ...args);\n }\n\n return Object.assign(debounceHandler, {\n cancel: () => {\n cancel?.();\n },\n });\n};\n"],"names":["isNil"],"mappings":";;;;;;;;AAAA;;;;;;;AAOG;AACI,MAAM,aAAa,GAAG,CAC3B,IAAW,EACX,IAAY,EACZ,GAAG,IAAuB,KACV;IAChB,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;AAEtC,IAAA,IAAI,IAAI,KAAK,CAAC,EAAE;QACd,MAAM,SAAS,GAAG,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC;AAC9C,QAAA,OAAO,MAAM,YAAY,CAAC,SAAS,CAAC;;SAC/B;AACL,QAAA,IAAI,KAAa;AACjB,QAAA,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE;QAErC,MAAM,MAAM,GAAG,MAAM,oBAAoB,CAAC,KAAK,CAAC;AAEhD,QAAA,MAAM,2BAA2B,GAAyB,CAAC,IAAI,KAAI;AACjE,YAAA,MAAM,KAAK,GAAG,IAAI,GAAG,WAAW;AAEhC,YAAA,MAAM,EAAE;AAER,YAAA,IAAI,KAAK,GAAG,IAAI,EAAE;AAChB,gBAAA,KAAK,GAAG,qBAAqB,CAAC,2BAA2B,CAAC;;iBACrD;AACL,gBAAA,UAAU,EAAE;;AAEhB,SAAC;AAED,QAAA,KAAK,GAAG,qBAAqB,CAAC,2BAA2B,CAAC;AAE1D,QAAA,OAAO,MAAM;;AAEjB;;AChCA;;;;;;;;AAQG;AACI,MAAM,QAAQ,GAAG,CAA0B,IAAW,EAAE,IAAI,GAAG,CAAC,EAAE,SAAS,GAAG,KAAK,KAAI;AAC5F,IAAA,IAAI,MAAgC;IAEpC,SAAS,eAAe,CAAC,GAAG,IAA6B,EAAA;QACvD,MAAM,IAAI;;;QAIV,MAAM,OAAO,GAAG,IAAI;AAEpB,QAAA,SAAS,cAAc,CAAC,EAAS,EAAE,OAAgB,EAAE,GAAG,IAA2B,EAAA;AACjF,YAAA,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;;AAGzB,QAAA,IAAI,SAAS,IAAIA,WAAK,CAAC,MAAM,CAAC,EAAE;AAC9B,YAAA,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;;AAG3B,QAAA,MAAM,GAAG,aAAa,CAAC,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;;AAGtE,IAAA,OAAO,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;QACpC,MAAM,EAAE,MAAK;YACX,MAAM,IAAI;SACX;AACF,KAAA,CAAC;AACJ;;;;;"}
|
|
@@ -1827,31 +1827,9 @@ class FloatingUI {
|
|
|
1827
1827
|
hide(),
|
|
1828
1828
|
],
|
|
1829
1829
|
});
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
transform: `translate(${this.roundByDPR(x)}px,${this.roundByDPR(y)}px)`,
|
|
1834
|
-
});
|
|
1835
|
-
if (this.options.arrow) {
|
|
1836
|
-
const { x: arrowX, y: arrowY } = middlewareData.arrow;
|
|
1837
|
-
const staticSide = {
|
|
1838
|
-
top: 'bottom',
|
|
1839
|
-
right: 'left',
|
|
1840
|
-
bottom: 'top',
|
|
1841
|
-
left: 'right',
|
|
1842
|
-
}[placement.split('-')[0]];
|
|
1843
|
-
Object.assign(this.options.arrow.style, {
|
|
1844
|
-
left: arrowX != null ? `${arrowX}px` : '',
|
|
1845
|
-
top: arrowY != null ? `${arrowY}px` : '',
|
|
1846
|
-
right: '',
|
|
1847
|
-
bottom: '',
|
|
1848
|
-
[staticSide]: '-4px',
|
|
1849
|
-
});
|
|
1850
|
-
}
|
|
1851
|
-
const { referenceHidden } = middlewareData.hide;
|
|
1852
|
-
Object.assign(this.panel.style, {
|
|
1853
|
-
visibility: referenceHidden ? 'hidden' : 'visible',
|
|
1854
|
-
});
|
|
1830
|
+
this.applyPanelPosition(x, y);
|
|
1831
|
+
this.applyArrowPosition(placement, middlewareData);
|
|
1832
|
+
this.applyVisibility(middlewareData);
|
|
1855
1833
|
})();
|
|
1856
1834
|
});
|
|
1857
1835
|
}
|
|
@@ -1871,6 +1849,37 @@ class FloatingUI {
|
|
|
1871
1849
|
},
|
|
1872
1850
|
};
|
|
1873
1851
|
}
|
|
1852
|
+
applyPanelPosition(x, y) {
|
|
1853
|
+
Object.assign(this.panel.style, {
|
|
1854
|
+
top: '0',
|
|
1855
|
+
left: '0',
|
|
1856
|
+
transform: `translate(${this.roundByDPR(x)}px,${this.roundByDPR(y)}px)`,
|
|
1857
|
+
});
|
|
1858
|
+
}
|
|
1859
|
+
applyArrowPosition(placement, middlewareData) {
|
|
1860
|
+
if (!this.options.arrow)
|
|
1861
|
+
return;
|
|
1862
|
+
const { x: arrowX, y: arrowY } = middlewareData.arrow;
|
|
1863
|
+
const staticSide = {
|
|
1864
|
+
top: 'bottom',
|
|
1865
|
+
right: 'left',
|
|
1866
|
+
bottom: 'top',
|
|
1867
|
+
left: 'right',
|
|
1868
|
+
}[placement.split('-')[0]];
|
|
1869
|
+
Object.assign(this.options.arrow.style, {
|
|
1870
|
+
left: arrowX != null ? `${arrowX}px` : '',
|
|
1871
|
+
top: arrowY != null ? `${arrowY}px` : '',
|
|
1872
|
+
right: '',
|
|
1873
|
+
bottom: '',
|
|
1874
|
+
[staticSide]: '-4px',
|
|
1875
|
+
});
|
|
1876
|
+
}
|
|
1877
|
+
applyVisibility(middlewareData) {
|
|
1878
|
+
const { referenceHidden } = middlewareData.hide;
|
|
1879
|
+
Object.assign(this.panel.style, {
|
|
1880
|
+
visibility: referenceHidden ? 'hidden' : 'visible',
|
|
1881
|
+
});
|
|
1882
|
+
}
|
|
1874
1883
|
roundByDPR(value) {
|
|
1875
1884
|
const dpr = window.devicePixelRatio || 1;
|
|
1876
1885
|
return Math.round(value * dpr) / dpr;
|
|
@@ -1878,6 +1887,6 @@ class FloatingUI {
|
|
|
1878
1887
|
}
|
|
1879
1888
|
|
|
1880
1889
|
exports.FloatingUI = FloatingUI;
|
|
1881
|
-
//# sourceMappingURL=index-
|
|
1890
|
+
//# sourceMappingURL=index-D7RDSS0K.js.map
|
|
1882
1891
|
|
|
1883
|
-
//# sourceMappingURL=index-
|
|
1892
|
+
//# sourceMappingURL=index-D7RDSS0K.js.map
|