@adyen/bento-vue2 1.11.1 → 1.13.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/@types/components.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/button/components/button-actions/button-actions.vue.d.ts +10 -22
- package/dist/@types/packages/vue2/src/components/code-snippet/code-snippet.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/data-grid/components/data-grid-columns/data-grid-columns.vue.d.ts +34 -0
- package/dist/@types/packages/vue2/src/components/data-grid/composables/use-scroller/use-scroller.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.types.d.ts +3 -1
- package/dist/@types/packages/vue2/src/components/data-grid/data-grid.vue.d.ts +9 -0
- package/dist/@types/packages/vue2/src/components/date/date.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-base-textbox/dropdown-base-textbox.vue.d.ts +38 -29
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/dropdown-options-container.vue.d.ts +43 -1306
- package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-small-textbox/dropdown-small-textbox.vue.d.ts +5 -11
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.vue.d.ts +43 -48
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-avatar/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/dropdown-country.vue.d.ts +43 -44
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-currency/dropdown-currency.vue.d.ts +43 -43
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.vue.d.ts +43 -43
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-payment-method/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/dropdown-tag.vue.d.ts +43 -48
- package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-tag/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/use-display-value.types.d.ts +28 -0
- package/dist/@types/packages/vue2/src/components/dropdown/composables/{useKeyboardNavigation.d.ts → use-keyboard-navigation.d.ts} +3 -13
- package/dist/@types/packages/vue2/src/components/dropdown/composables/use-keyboard-navigation.types.d.ts +15 -0
- package/dist/@types/packages/vue2/src/components/dropdown/dropdown.vue.d.ts +48 -1674
- package/dist/@types/packages/vue2/src/components/dropdown/index.d.ts +5 -4
- package/dist/@types/packages/vue2/src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue.d.ts +532 -12
- package/dist/@types/packages/vue2/src/components/filter-bar/components/base-filter/base-filter.vue.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/filter-bar/filter-bar.types.d.ts +4 -1
- package/dist/@types/packages/vue2/src/components/input-field/input-field.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-chips/index.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-chips/listbox-multi-select-chips.vue.d.ts +28 -0
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue.d.ts +3 -4
- package/dist/@types/packages/vue2/src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/composables/useListboxKeyboardNavigation.d.ts +2 -2
- package/dist/@types/packages/vue2/src/components/internal/listbox/listbox.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/link/link.vue.d.ts +20 -13
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/modal/components/base-modal/base-modal.vue.d.ts +16 -60
- package/dist/@types/packages/vue2/src/components/modal/components/modal-default/modal-default.vue.d.ts +59 -49
- package/dist/@types/packages/vue2/src/components/modal/components/modal-dialog/modal-dialog.vue.d.ts +39 -291
- package/dist/@types/packages/vue2/src/components/modal/modal.vue.d.ts +76 -83
- package/dist/@types/packages/vue2/src/components/pagination/pagination.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/popper-container/popper-container.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/index.d.ts +2 -0
- package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.types.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/radio-group/components/radio-button/radio-button.vue.d.ts +22 -26
- package/dist/@types/packages/vue2/src/components/radio-group/index.d.ts +2 -1
- package/dist/@types/packages/vue2/src/components/search-bar/search-bar.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/sidepanel/sidepanel.keys.d.ts +1 -0
- package/dist/@types/packages/vue2/src/components/summary-grid/components/summary-grid-item/summary-grid-item.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/components/textarea/textarea.vue.d.ts +1 -1
- package/dist/@types/packages/vue2/src/components/tooltip/tooltip.vue.d.ts +3 -3
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.types.d.ts +6 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/data-grid-template.vue.d.ts +10 -0
- package/dist/@types/packages/vue2/src/templates/data-grid-template/index.d.ts +1 -0
- package/dist/accordion.js +2 -2
- package/dist/action-bar.js +5 -5
- package/dist/alert.js +17 -16
- package/dist/alert.js.map +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button.css +1 -1
- package/dist/assets/checkbox.css +1 -1
- package/dist/assets/controls-group.css +1 -1
- package/dist/assets/dropdown-default-textbox.css +1 -1
- package/dist/assets/dropdown.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index29.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index43.css +1 -1
- package/dist/assets/index44.css +1 -1
- package/dist/assets/index45.css +1 -1
- package/dist/assets/index46.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/assets/listbox.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +45 -52
- package/dist/button.js.map +1 -1
- package/dist/card.js +15 -15
- package/dist/card.js.map +1 -1
- package/dist/checkbox.js +6 -6
- package/dist/chunks/arrow-left.2db60716.js.map +1 -1
- package/dist/chunks/{base-button.f58ffaaa.js → base-button.f9080a52.js} +2 -2
- package/dist/chunks/{base-button.f58ffaaa.js.map → base-button.f9080a52.js.map} +1 -1
- package/dist/chunks/base-modal.a580438d.js +202 -0
- package/dist/chunks/base-modal.a580438d.js.map +1 -0
- package/dist/chunks/{button-actions-with-menu.3849a35c.js → button-actions-with-menu.a9087340.js} +3 -3
- package/dist/chunks/{button-actions-with-menu.3849a35c.js.map → button-actions-with-menu.a9087340.js.map} +1 -1
- package/dist/chunks/{button.3ce10493.js → button.bb0d7584.js} +7 -7
- package/dist/chunks/{button.3ce10493.js.map → button.bb0d7584.js.map} +1 -1
- package/dist/chunks/{calendar.3e9c35d0.js → calendar.17ab99de.js} +69 -68
- package/dist/chunks/{calendar.3e9c35d0.js.map → calendar.17ab99de.js.map} +1 -1
- package/dist/chunks/{checkbox.68cc1f84.js → checkbox.51cdb397.js} +3 -3
- package/dist/chunks/checkbox.51cdb397.js.map +1 -0
- package/dist/chunks/checkmark-circle-fill.345311d2.js.map +1 -1
- package/dist/chunks/checkmark-small.520f01b1.js.map +1 -1
- package/dist/chunks/checkmark.a6ed8f47.js.map +1 -1
- package/dist/chunks/chevron-left.5edf02ac.js.map +1 -1
- package/dist/chunks/chevron-up.81185563.js.map +1 -1
- package/dist/chunks/{controls-group.9e878137.js → controls-group.3716f4b4.js} +4 -4
- package/dist/chunks/{controls-group.9e878137.js.map → controls-group.3716f4b4.js.map} +1 -1
- package/dist/chunks/{copy.14578696.js → copy.54cc3ab4.js} +4 -4
- package/dist/chunks/copy.54cc3ab4.js.map +1 -0
- package/dist/chunks/cross-circle-fill.27580c4b.js.map +1 -1
- package/dist/chunks/cross-small.e851e0de.js +26 -0
- package/dist/chunks/cross-small.e851e0de.js.map +1 -0
- package/dist/chunks/cross.04678d81.js.map +1 -1
- package/dist/chunks/{dropdown-default-textbox.4b227b24.js → dropdown-default-textbox.13b5054e.js} +129 -148
- package/dist/chunks/dropdown-default-textbox.13b5054e.js.map +1 -0
- package/dist/chunks/dropdown.4d800c61.js +797 -0
- package/dist/chunks/dropdown.4d800c61.js.map +1 -0
- package/dist/chunks/{field-label.3019a2f3.js → field-label.7328b82b.js} +2 -2
- package/dist/chunks/{field-label.3019a2f3.js.map → field-label.7328b82b.js.map} +1 -1
- package/dist/chunks/{fixed-scroller.cd3e1f8d.js → fixed-scroller.d6c11166.js} +2 -2
- package/dist/chunks/{fixed-scroller.cd3e1f8d.js.map → fixed-scroller.d6c11166.js.map} +1 -1
- package/dist/chunks/{footer-actions.da12aa54.js → footer-actions.bc0cb7e0.js} +3 -3
- package/dist/chunks/{footer-actions.da12aa54.js.map → footer-actions.bc0cb7e0.js.map} +1 -1
- package/dist/chunks/{index.eede8742.js → index.170ac16b.js} +3 -3
- package/dist/chunks/{index.eede8742.js.map → index.170ac16b.js.map} +1 -1
- package/dist/chunks/index.339f15c4.js +637 -0
- package/dist/chunks/index.339f15c4.js.map +1 -0
- package/dist/chunks/{index.026ae47b.js → index.541cce1c.js} +2 -2
- package/dist/chunks/{index.026ae47b.js.map → index.541cce1c.js.map} +1 -1
- package/dist/chunks/{index.c032aa32.js → index.5742fba4.js} +7 -7
- package/dist/chunks/index.5742fba4.js.map +1 -0
- package/dist/chunks/{index.32095db1.js → index.6ac01113.js} +2 -2
- package/dist/chunks/{index.32095db1.js.map → index.6ac01113.js.map} +1 -1
- package/dist/chunks/{index.618cc4cb.js → index.772a5595.js} +13 -12
- package/dist/chunks/{index.618cc4cb.js.map → index.772a5595.js.map} +1 -1
- package/dist/chunks/{index.8f1e4d8d.js → index.82ff40be.js} +3 -3
- package/dist/chunks/{index.8f1e4d8d.js.map → index.82ff40be.js.map} +1 -1
- package/dist/chunks/{index.13ede682.js → index.a4a820fd.js} +6 -6
- package/dist/chunks/{index.13ede682.js.map → index.a4a820fd.js.map} +1 -1
- package/dist/chunks/{index.02859365.js → index.af238ed6.js} +2 -2
- package/dist/chunks/{index.02859365.js.map → index.af238ed6.js.map} +1 -1
- package/dist/chunks/index.d1f65246.js +80 -0
- package/dist/chunks/index.d1f65246.js.map +1 -0
- package/dist/chunks/{index.6a417137.js → index.ec0743da.js} +5 -5
- package/dist/chunks/{index.6a417137.js.map → index.ec0743da.js.map} +1 -1
- package/dist/chunks/{info-filled.27bd4bfb.js → info-filled.c37e091d.js} +12 -33
- package/dist/chunks/{info-filled.27bd4bfb.js.map → info-filled.c37e091d.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.2efd15e0.js → listbox-option-tag.6f3e922c.js} +3 -3
- package/dist/chunks/{listbox-option-tag.2efd15e0.js.map → listbox-option-tag.6f3e922c.js.map} +1 -1
- package/dist/chunks/{listbox.371743bc.js → listbox.e5d70b9b.js} +472 -423
- package/dist/chunks/listbox.e5d70b9b.js.map +1 -0
- package/dist/chunks/{loading-button.2e197f34.js → loading-button.7301cc2e.js} +2 -2
- package/dist/chunks/{loading-button.2e197f34.js.map → loading-button.7301cc2e.js.map} +1 -1
- package/dist/chunks/refresh.71a03998.js.map +1 -1
- package/dist/chunks/search.471270fe.js.map +1 -1
- package/dist/chunks/sidepanel.keys.3f8d69c1.js +7 -0
- package/dist/chunks/sidepanel.keys.3f8d69c1.js.map +1 -0
- package/dist/chunks/{tooltip.1ec3479c.js → tooltip.46858ae6.js} +3 -3
- package/dist/chunks/{tooltip.1ec3479c.js.map → tooltip.46858ae6.js.map} +1 -1
- package/dist/chunks/{useCountryItems.6b7985bf.js → use-country-items.6b7985bf.js} +1 -1
- package/dist/chunks/use-country-items.6b7985bf.js.map +1 -0
- package/dist/code-snippet.js +7 -7
- package/dist/code-snippet.js.map +1 -1
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +674 -656
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +30 -30
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +102 -132
- package/dist/dropdown.js.map +1 -1
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +487 -480
- package/dist/filter-bar.js.map +1 -1
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header.js +3 -3
- package/dist/index.js +207 -201
- package/dist/info-icon.js +3 -3
- package/dist/info-icon.js.map +1 -1
- package/dist/input-field.js +4 -4
- package/dist/internal.js +7 -7
- package/dist/link.js +3 -46
- package/dist/link.js.map +1 -1
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +1 -1
- package/dist/modal.js +209 -302
- package/dist/modal.js.map +1 -1
- package/dist/pagination.js +88 -88
- package/dist/pagination.js.map +1 -1
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +1 -1
- package/dist/popper-container.js +1 -1
- package/dist/radio-group.js +84 -101
- package/dist/radio-group.js.map +1 -1
- package/dist/search-bar.js +2 -2
- package/dist/secondary-nav.js +2 -2
- package/dist/segmented-control.js +3 -3
- package/dist/sidepanel.js +73 -71
- package/dist/sidepanel.js.map +1 -1
- package/dist/status.js +2 -2
- package/dist/stepper.js +3 -3
- package/dist/stepper.js.map +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/tabs.js +4 -4
- package/dist/tabs.js.map +1 -1
- package/dist/tag.js +3 -3
- package/dist/textarea.js +91 -87
- package/dist/textarea.js.map +1 -1
- package/dist/timeline.js +6 -6
- package/dist/timeline.js.map +1 -1
- package/dist/toast.js +8 -7
- package/dist/toast.js.map +1 -1
- package/dist/toggle.js +2 -2
- package/dist/tutorial.js +5 -5
- package/dist/tutorial.js.map +1 -1
- package/dist/typography.js +1 -1
- package/dist/web-types.json +3708 -3474
- package/package.json +2 -2
- package/dist/@types/packages/vue2/src/components/dropdown/composables/useDisplayValue.d.ts +0 -2
- package/dist/@types/packages/vue2/src/components/dropdown/composables/useDisplayValue.types.d.ts +0 -12
- package/dist/@types/packages/vue2/src/components/dropdown/composables/useDropdownSearchFilter.d.ts +0 -3
- package/dist/chunks/base-modal.435bdd62.js +0 -222
- package/dist/chunks/base-modal.435bdd62.js.map +0 -1
- package/dist/chunks/checkbox.68cc1f84.js.map +0 -1
- package/dist/chunks/copy.14578696.js.map +0 -1
- package/dist/chunks/dropdown-default-textbox.4b227b24.js.map +0 -1
- package/dist/chunks/dropdown.7749c2d7.js +0 -887
- package/dist/chunks/dropdown.7749c2d7.js.map +0 -1
- package/dist/chunks/index.9398acc6.js +0 -635
- package/dist/chunks/index.9398acc6.js.map +0 -1
- package/dist/chunks/index.c032aa32.js.map +0 -1
- package/dist/chunks/listbox.371743bc.js.map +0 -1
- package/dist/chunks/useCountryItems.6b7985bf.js.map +0 -1
- /package/dist/@types/packages/vue2/src/components/dropdown/components/dropdown-options-container/composables/{useDropdownOptionsListbox.d.ts → use-dropdown-options-listbox.d.ts} +0 -0
- /package/dist/@types/packages/vue2/src/components/dropdown/components/variants/dropdown-country/composables/{useCountryItems.d.ts → use-country-items.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.9398acc6.js","sources":["../../../../node_modules/date-fns/esm/isEqual/index.js","../../../../node_modules/date-fns/esm/setHours/index.js","../../../../node_modules/date-fns/esm/setMinutes/index.js","../../../../node_modules/date-fns/esm/setSeconds/index.js","../../src/components/internal/calendar/components/calendar-month/composables/granular-min-max-date.ts","../../src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types.ts","../../src/utils/ts/time-input.ts","../../src/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue","../../src/components/date-range-picker/composables/use-date-range-picker-calendar-text.ts","../../src/components/date-range-picker/date-range-picker.types.ts","../../src/components/date-range-picker/date-range-picker.vue"],"sourcesContent":["import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Boolean} the dates are equal\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * var result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0),\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\n\nexport default function isEqual(dirtyLeftDate, dirtyRightDate) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyLeftDate);\n var dateRight = toDate(dirtyRightDate);\n return dateLeft.getTime() === dateRight.getTime();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setHours\n * @category Hour Helpers\n * @summary Set the hours to the given date.\n *\n * @description\n * Set the hours to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} hours - the hours of the new date\n * @returns {Date} the new date with the hours set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 4 hours to 1 September 2014 11:30:00:\n * var result = setHours(new Date(2014, 8, 1, 11, 30), 4)\n * //=> Mon Sep 01 2014 04:30:00\n */\n\nexport default function setHours(dirtyDate, dirtyHours) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var hours = toInteger(dirtyHours);\n date.setHours(hours);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMinutes\n * @category Minute Helpers\n * @summary Set the minutes to the given date.\n *\n * @description\n * Set the minutes to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} minutes - the minutes of the new date\n * @returns {Date} the new date with the minutes set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 45 minutes to 1 September 2014 11:30:40:\n * const result = setMinutes(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:45:40\n */\n\nexport default function setMinutes(dirtyDate, dirtyMinutes) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var minutes = toInteger(dirtyMinutes);\n date.setMinutes(minutes);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setSeconds\n * @category Second Helpers\n * @summary Set the seconds to the given date.\n *\n * @description\n * Set the seconds to the given date.\n *\n * ### v2.0.0 breaking changes:\n *\n * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} seconds - the seconds of the new date\n * @returns {Date} the new date with the seconds set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set 45 seconds to 1 September 2014 11:30:40:\n * const result = setSeconds(new Date(2014, 8, 1, 11, 30, 40), 45)\n * //=> Mon Sep 01 2014 11:30:45\n */\n\nexport default function setSeconds(dirtyDate, dirtySeconds) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var seconds = toInteger(dirtySeconds);\n date.setSeconds(seconds);\n return date;\n}","import addMonths from 'date-fns/addMonths';\nimport endOfDay from 'date-fns/endOfDay';\nimport endOfMonth from 'date-fns/endOfMonth';\nimport endOfWeek from 'date-fns/endOfWeek';\nimport isSameDay from 'date-fns/isSameDay';\nimport startOfDay from 'date-fns/startOfDay';\nimport startOfMonth from 'date-fns/startOfMonth';\nimport startOfWeek from 'date-fns/startOfWeek';\nimport subDays from 'date-fns/subDays';\n\nimport type { CalendarGranularityConfig } from '../../../calendar.types';\nimport type { UseGranularMinMaxDate } from './granular-min-max-date.types';\n\n/**\n * Provides utility function to set calendar min/max dates based on the granularity selected.\n * @param props Configured min/max dates, and the day the week starts on.\n * @returns Function to calculate calendar limits.\n */\nexport const useGranularMinMaxDate: UseGranularMinMaxDate = ({\n firstDayOfWeek,\n min: minimumDate,\n max: maximumDate,\n}) => {\n const getGranularCalendarLimits = (granularity: CalendarGranularityConfig) => {\n let min = startOfDay(minimumDate);\n let max = endOfDay(maximumDate);\n\n if (granularity?.type === 'weekly') {\n if (granularity.earliest) {\n min = granularity.earliest;\n } else {\n const startOfMin = startOfWeek(min, { weekStartsOn: firstDayOfWeek });\n\n // If the minimum is in the middle of a week, set to the end (only allow full weeks)\n if (!isSameDay(min, startOfMin)) {\n min = endOfWeek(min, { weekStartsOn: firstDayOfWeek });\n }\n }\n\n if (granularity.latest) {\n max = granularity.latest;\n } else {\n const endOfMax = endOfWeek(max, { weekStartsOn: firstDayOfWeek });\n\n // If the maximum is in the middle of a week, set to the end of last week (only allow full weeks)\n if (!isSameDay(max, endOfMax)) {\n max = subDays(startOfWeek(max, { weekStartsOn: firstDayOfWeek }), 1);\n }\n }\n }\n\n if (granularity?.type === 'monthly') {\n if (granularity.earliest) {\n min = granularity.earliest;\n } else {\n const startOfMin = startOfMonth(min);\n\n // If the minimum is in the middle of a month, set to the start of next month (only allow full month)\n if (!isSameDay(min, startOfMin)) {\n min = startOfMonth(addMonths(min, 1));\n }\n }\n\n if (granularity.latest) {\n max = granularity.latest;\n } else {\n const endOfMax = endOfMonth(max);\n\n // If the maximum is in the middle of a month, set to the end of last month (only allow full months)\n if (!isSameDay(max, endOfMax)) {\n max = subDays(startOfMonth(max), 1);\n }\n }\n }\n\n return { min, max };\n };\n\n return { getGranularCalendarLimits };\n};\n","import { CalendarGranularityType } from '@/internal';\n\nexport interface DateRangePickerCalendarFormData {\n startDate: string;\n endDate: string;\n startTime?: string;\n endTime?: string;\n granularity?: CalendarGranularityType;\n}\n\nexport enum DateRangePickerCalendarEvent {\n CUSTOM_RANGE = 'custom-range',\n INPUT = 'input',\n ERROR = 'error',\n FORM_DATE = 'form-date',\n}\n\nexport interface DateRangePickerCalendarRangeSelectorItem {\n label: string;\n value: string;\n data: {\n startDate: Date;\n endDate: Date;\n granularity?: CalendarGranularityType;\n };\n}\n\nexport type DateRangePickerCalendarRangeSelectorItems = Array<DateRangePickerCalendarRangeSelectorItem>;\n","const validDigitRegex = /[\\d]/;\n\nconst hourRegex = /^\\d{2}$/;\nconst minuteRegex = /^\\d{2}:\\d{2}$/;\n\nexport const validateTimeInput = (event: KeyboardEvent) => {\n const { selectionStart } = event.target as HTMLInputElement;\n\n const isValidKey = validDigitRegex.test(event.key) || event.key === 'Backspace';\n const isValidColon = [1, 2, 4, 5].includes(selectionStart) && event.key === ':';\n\n if (!isValidKey && !isValidColon) {\n event.preventDefault();\n }\n};\n\nexport const formatTimeInputValue = (value: string) => {\n if (!value) {\n return value;\n }\n\n let formattedValue = value;\n\n // Format if the first value is bigger than 2, because it can't be bigger than 24 hours\n if (formattedValue.length === 1 && parseInt(value, 10) > 2) {\n return `0${formattedValue}:`;\n }\n\n const [secondToLastDigit, lastDigit] = formattedValue.slice(-2);\n if ([2, 5].includes(formattedValue.length) && lastDigit === ':') {\n formattedValue = `${formattedValue.slice(0, formattedValue.length - 2)}0${secondToLastDigit}`;\n }\n\n // Add `:` after hour/minute\n if (hourRegex.test(formattedValue) || minuteRegex.test(formattedValue)) {\n formattedValue += ':';\n }\n return formattedValue;\n};\n","<template>\n <div class=\"b-date-range-picker-calendar\">\n <!-- Form -->\n <div class=\"b-date-range-picker-calendar__form-container\">\n <div class=\"b-date-range-picker-calendar__form\">\n <template v-if=\"hasSlot('title')\">\n <slot name=\"title\" />\n </template>\n\n <bento-dropdown\n v-if=\"quickSelectRanges\"\n :aria-label=\"t('customRange')\"\n :items=\"quickSelectRangeDefaultItems\"\n :value=\"selectedRangeSelectorValue\"\n @input=\"onRangeSelectorInput\"\n />\n\n <bento-segmented-control\n v-if=\"granularities\"\n :items=\"granularityItems\"\n :model-value=\"internalRangeDate.granularity\"\n full-width\n @update:model-value=\"internalRangeDate.granularity = $event\"\n >\n </bento-segmented-control>\n <div>\n <bento-typography stronger el=\"span\" class=\"b-date-range-picker-calendar__label\">\n From\n </bento-typography>\n <div :class=\"formInputWrapperConditionalClasses\">\n <bento-input-field\n :aria-label=\"$t('dateFrom')\"\n :value=\"dateTextInput.startDate\"\n :error=\"startDateError\"\n class=\"b-date-range-picker-calendar__form-input\"\n @input=\"onStartDateInput\"\n @keydown=\"onDateInputKeyDown\"\n >\n <template #description>YYYY-MM-DD</template>\n </bento-input-field>\n\n <bento-input-field\n v-if=\"allowTimeInput\"\n :aria-label=\"t('timeFrom')\"\n :value=\"dateTextInput.startTime\"\n :error=\"startTimeError\"\n class=\"b-date-range-picker-calendar__form-input\"\n @input=\"onStartTimeInput\"\n @keydown=\"onTimeInputKeyDown\"\n >\n <template #description>HH:MM:SS</template>\n </bento-input-field>\n </div>\n </div>\n\n <div>\n <bento-typography stronger el=\"span\" class=\"b-date-range-picker-calendar__label\">\n To\n </bento-typography>\n <div :class=\"formInputWrapperConditionalClasses\">\n <bento-input-field\n class=\"b-date-range-picker-calendar__form-input\"\n :aria-label=\"$t('dateTo')\"\n :value=\"dateTextInput.endDate\"\n :error=\"endDateError\"\n @input=\"onEndDateInput\"\n @keydown=\"onDateInputKeyDown\"\n >\n <template #description>YYYY-MM-DD</template>\n </bento-input-field>\n\n <bento-input-field\n v-if=\"allowTimeInput\"\n :aria-label=\"t('timeTo')\"\n :value=\"dateTextInput.endTime\"\n :error=\"endTimeError\"\n class=\"b-date-range-picker-calendar__form-input\"\n @input=\"onEndTimeInput\"\n @keydown=\"onTimeInputKeyDown\"\n >\n <template #description>HH:MM:SS</template>\n </bento-input-field>\n </div>\n </div>\n </div>\n\n <div v-if=\"hasSlot('actions')\">\n <slot name=\"actions\" />\n </div>\n </div>\n\n <!-- Calendar -->\n <div class=\"b-date-range-picker-calendar__calendars-container\">\n <calendar\n :value=\"value\"\n :first-day-of-week=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :max-range=\"maxRange\"\n :min=\"computedMinMax.min\"\n :max=\"computedMinMax.max\"\n :number-of-months=\"numberOfMonths\"\n :granularity=\"selectedGranularity\"\n is-range\n @input=\"onDateInput\"\n @start-date-selected=\"onStartDateSelected\"\n @end-date-selected=\"onEndDateSelected\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, reactive, ref } from 'vue';\n import { Calendar, CalendarRangeDateValue } from '@/internal';\n import { BentoTypography } from '@/components/typography';\n import { BentoInputField } from '@/components/input-field';\n import { BentoDropdown } from '@/components/dropdown';\n import { BentoSegmentedControl, type BentoSegmentedControlItem } from '@/components/segmented-control';\n import { de, enUS, fr } from 'date-fns/locale';\n import { useI18n } from '@/utils/ts/i18n';\n import { debounce } from '@/utils/ts/debounce';\n import { useHasSlot } from '@/composables';\n import { useGranularityAdjustments } from '@/components/internal/calendar/composables/use-granularity-adjustments';\n import { useGranularMinMaxDate } from '@/components/internal/calendar/components/calendar-month/composables/granular-min-max-date';\n import { formatDateInputValue, validateDateInput } from '@/utils/ts/date-input';\n import {\n DateRangePickerCalendarEvent,\n DateRangePickerCalendarFormData,\n DateRangePickerCalendarRangeSelectorItems,\n } from './date-range-picker-calendar.types';\n import type { BentoDateRangePickerGranularityConfig } from '../../date-range-picker.types';\n import { DateFormat } from '@/types';\n import { formatTimeInputValue, validateTimeInput } from '@/utils/ts/time-input';\n import setHours from 'date-fns/setHours';\n import setMinutes from 'date-fns/setMinutes';\n import setSeconds from 'date-fns/setSeconds';\n import format from 'date-fns/format';\n import endOfDay from 'date-fns/endOfDay';\n import isEqual from 'date-fns/isEqual';\n import messages from './messages.json';\n\n const FORM_INPUT_DEBOUNCE_TIME = 300;\n const RANGE_SELECTOR_CUSTOM_RANGE_KEY = 'customRange';\n const DEFAULT_GRANULARITY = 'daily';\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Calendar for range dates. Contains the logic to handle the range forms.\n *\n * @example\n * import DatePickerCalendarRange from './date-range-picker-calendar.vue';\n *\n * export default {\n * components: { DatePickerCalendarRange },\n * template: `\n * <date-range-picker-calendar\n * :value=\"{startDate: new Date(), endDate: new Date() }\"\n * :first-day-of-week=\"BentoDatePickerFirstDayOfWeek.MONDAY\"\n * :is-date-disabled=\"(date: Date) => boolean\"\n * :number-of-months=\"2\"\n * @input=\"({ startDate, endDate }) => void\"\n * />\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'date-range-picker-calendar',\n components: {\n BentoDropdown,\n BentoInputField,\n BentoSegmentedControl,\n BentoTypography,\n Calendar,\n },\n props: {\n /**\n * Allows user to enter time values in the form\n */\n allowTimeInput: { type: Boolean, default: false },\n\n /**\n * Ranges form persistance data\n */\n dateFormData: {\n type: Object as PropType<DateRangePickerCalendarFormData>,\n default: () => ({ startDate: undefined, endDate: undefined, startTime: undefined, endTime: undefined }),\n },\n\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: Calendar.props.firstDayOfWeek,\n\n /**\n * A list of available granularities.\n * If present, the date picker will display a segmented control to change granularity.\n */\n granularities: {\n type: Array as PropType<Array<BentoDateRangePickerGranularityConfig>>,\n default: null,\n },\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: Calendar.props.isDateDisabled,\n\n /**\n * Set a maximum number of dates to be selectable by the range.\n */\n maxRange: Calendar.props.maxRange,\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min: Calendar.props.min,\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max: Calendar.props.max,\n\n /**\n * Number of months rendered on pane\n */\n numberOfMonths: Calendar.props.numberOfMonths,\n\n /**\n * Enables the custom range selector.\n * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:\n * `label` - label of custom range item.\n * `value` - a unique key of the custom range item.\n * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.\n */\n quickSelectRanges: {\n type: Array as PropType<DateRangePickerCalendarRangeSelectorItems>,\n default: undefined,\n },\n\n /**\n * Selected date\n */\n value: { type: Object as PropType<CalendarRangeDateValue>, default: undefined },\n },\n emits: [\n DateRangePickerCalendarEvent.CUSTOM_RANGE,\n DateRangePickerCalendarEvent.INPUT,\n DateRangePickerCalendarEvent.ERROR,\n DateRangePickerCalendarEvent.FORM_DATE,\n ],\n setup(props, { emit, slots }) {\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n const locales = { de, enUS, fr };\n const internalRangeDate = reactive({\n startDate: (props.value as CalendarRangeDateValue)?.startDate,\n endDate: (props.value as CalendarRangeDateValue)?.endDate,\n ...(props.granularities\n ? {\n granularity: (props.value as CalendarRangeDateValue)?.granularity || DEFAULT_GRANULARITY,\n }\n : {}),\n });\n const selectedRangeSelectorValue = ref(\n props?.quickSelectRanges?.find(\n ({ data }) =>\n isEqual(data.startDate, internalRangeDate.startDate) &&\n isEqual(data.endDate, internalRangeDate.endDate)\n )?.value ?? RANGE_SELECTOR_CUSTOM_RANGE_KEY\n );\n const formInputWrapperConditionalClasses = computed(() => ({\n 'b-date-range-picker-calendar__form-input-wrapper': props.allowTimeInput,\n }));\n const quickSelectRangeDefaultItems = computed(() => {\n if (props.quickSelectRanges) {\n return [\n { label: t('customRange'), value: RANGE_SELECTOR_CUSTOM_RANGE_KEY },\n ...props.quickSelectRanges,\n ];\n }\n return [];\n });\n\n const selectedGranularity = computed(\n () => props.granularities?.find(({ type }) => type === internalRangeDate.granularity) || null\n );\n\n const granularityItems = computed<Array<BentoSegmentedControlItem>>(() =>\n props.granularities.map(({ type, disabled }) => ({\n label: t(type),\n value: type,\n disabled,\n }))\n );\n\n const { getGranularCalendarLimits } = useGranularMinMaxDate(props);\n\n const computedMinMax = computed(() =>\n props.granularities\n ? getGranularCalendarLimits(selectedGranularity.value)\n : { min: props.min, max: props.max }\n );\n\n const {\n adjustStartDateInputForWeekly,\n adjustEndDateInputForWeekly,\n adjustStartDateInputForMonthly,\n adjustEndDateInputForMonthly,\n } = useGranularityAdjustments(props.firstDayOfWeek, props.min, props.max);\n\n /**\n * When selecting a custom range, set the range selecter if it is enabled.\n */\n const resetCustomRangeToDefault = () => {\n if (props?.quickSelectRanges) {\n selectedRangeSelectorValue.value = RANGE_SELECTOR_CUSTOM_RANGE_KEY;\n }\n };\n\n /**\n * Format date to a string value in format yyyy-MM-dd\n * @param {Date} dateToFormat Date to be formatted\n */\n const formatDate = (dateToFormat?: Date) => {\n if (!dateToFormat) {\n return '';\n }\n return format(dateToFormat, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n };\n\n const formatTime = (dateToFormat?: Date) => {\n if (!dateToFormat) {\n return '';\n }\n\n return format(dateToFormat, DateFormat.HOUR_MINUTE_SECONDS, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n };\n\n // Form error flags\n const startDateError = ref(false);\n const endDateError = ref(false);\n const startTimeError = ref(false);\n const endTimeError = ref(false);\n\n // Form input text used in range variant\n const dateTextInput = reactive({\n startDate: props.dateFormData.startDate,\n endDate: props.dateFormData.endDate,\n startTime: props.dateFormData.startTime,\n endTime: props.dateFormData.endTime,\n });\n\n const onDateInput = (selectedRange: CalendarRangeDateValue) => {\n internalRangeDate.startDate = selectedRange.startDate;\n internalRangeDate.endDate = selectedRange.endDate;\n emit(DateRangePickerCalendarEvent.INPUT, internalRangeDate);\n };\n\n // Validate time\n const isValidTime = (timeText: string) => {\n // HH:MM:SS regex\n const timeRegex = /^(?:[01]\\d|2[01234]):(?:[012345]\\d):(?:[012345]\\d)$/;\n return timeRegex.test(timeText);\n };\n\n const setTimeInDate = (date: Date, time: string) => {\n if (!time || !isValidTime(time)) {\n return date;\n }\n\n let dateWithTime = new Date(date);\n\n const [hours, minutes, seconds] = time.split(':');\n dateWithTime = setHours(dateWithTime, parseInt(hours, 10));\n dateWithTime = setMinutes(dateWithTime, parseInt(minutes, 10));\n dateWithTime = setSeconds(dateWithTime, parseInt(seconds, 10));\n return dateWithTime;\n };\n\n const isValidDate = (dateText: string) => {\n // Is date selectable\n const isDateEnabled = (date: Date) => {\n // Check if date is between min/max bounds, if there are any\n if ((props.min && date <= props.min) || (props.max && date >= props.max)) {\n return false;\n }\n\n // Check if function is set, otherwise all dates are enabled\n if (props.isDateDisabled) {\n return !props.isDateDisabled(date);\n }\n\n return true;\n };\n\n // YYYY-MM-DD regex\n const dateRegex = /^\\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/;\n // Date matches text regex\n return dateRegex.test(dateText) && isDateEnabled(new Date(dateText));\n };\n\n /**\n * When mounted, set the input error states to true if the values are not valid\n */\n onMounted(() => {\n if (props.dateFormData.startDate && !isValidDate(props.dateFormData.startDate)) {\n startDateError.value = true;\n } else {\n startDateError.value = false;\n startTimeError.value = false;\n }\n\n if (props.dateFormData.endDate && !isValidDate(props.dateFormData.endDate)) {\n endDateError.value = true;\n } else {\n endDateError.value = false;\n endTimeError.value = false;\n }\n });\n\n const onStartDateSelected = (newStartDate: Date) => {\n resetCustomRangeToDefault();\n dateTextInput.startDate = formatDate(newStartDate);\n if (!dateTextInput.startTime) {\n // Set the time to the beginning of the day\n dateTextInput.startTime = formatTime(newStartDate);\n } else if (startTimeError.value) {\n // Set the form time if it was previously set\n dateTextInput.startTime = props.dateFormData?.startTime;\n }\n\n // Reset errors\n startDateError.value = false;\n startTimeError.value = false;\n };\n\n const onEndDateSelected = (newEndDate: Date) => {\n dateTextInput.endDate = formatDate(newEndDate);\n if (!dateTextInput.endTime) {\n // Set the time to the end of the day\n dateTextInput.endTime = formatTime(endOfDay(newEndDate));\n } else if (endTimeError.value) {\n // Set the form time if it was previously set\n dateTextInput.endTime = props.dateFormData?.endTime;\n }\n\n // Reset errors\n endDateError.value = false;\n endTimeError.value = false;\n };\n\n const getDate = (keyName: keyof CalendarRangeDateValue) => {\n const dateProp = (props.value as CalendarRangeDateValue)[keyName];\n if (dateProp) {\n return dateProp;\n }\n\n if (props.dateFormData[keyName] && isValidDate(props.dateFormData[keyName])) {\n return new Date(props.dateFormData[keyName]);\n }\n\n return undefined;\n };\n\n const validateStartDate = debounce((startDateText: string) => {\n // Checks for YYYY-MM-DD format\n if (isValidDate(startDateText)) {\n let dateText = startDateText;\n\n startDateError.value = false;\n\n switch (selectedGranularity.value.type) {\n case 'weekly':\n dateText = adjustStartDateInputForWeekly(startDateText, formatDate);\n dateTextInput.startDate = dateText;\n break;\n case 'monthly':\n dateText = adjustStartDateInputForMonthly(startDateText, formatDate);\n dateTextInput.startDate = dateText;\n break;\n case 'daily':\n default:\n break;\n }\n\n // Format date string to Date object\n internalRangeDate.startDate = setTimeInDate(new Date(dateText), dateTextInput.startTime);\n\n const endDate = getDate('endDate');\n\n emit(DateRangePickerCalendarEvent.FORM_DATE, {\n startDate: new Date(dateText),\n endDate,\n });\n\n emit(DateRangePickerCalendarEvent.INPUT, {\n startDate: new Date(dateText),\n endDate,\n });\n } else {\n // Indicate form error\n startDateError.value = true;\n // Emit Date picker calendar error\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n }\n }, FORM_INPUT_DEBOUNCE_TIME);\n\n const onStartDateInput = (startDateText: string) => {\n resetCustomRangeToDefault();\n // Set the date as string when input through the form\n dateTextInput.startDate = formatDateInputValue(startDateText);\n validateStartDate(dateTextInput.startDate);\n };\n\n const validateEndDate = debounce((endDateText: string) => {\n // Checks for YYYY-MM-DD format\n if (isValidDate(endDateText)) {\n let dateText = endDateText;\n\n endDateError.value = false;\n\n switch (selectedGranularity.value.type) {\n case 'weekly':\n dateText = adjustEndDateInputForWeekly(endDateText, formatDate);\n dateTextInput.endDate = dateText;\n break;\n case 'monthly':\n dateText = adjustEndDateInputForMonthly(endDateText, formatDate);\n dateTextInput.endDate = dateText;\n break;\n case 'daily':\n default:\n break;\n }\n\n internalRangeDate.endDate = setTimeInDate(new Date(dateText), dateTextInput.endTime);\n\n const startDate = getDate('startDate');\n\n emit(DateRangePickerCalendarEvent.FORM_DATE, {\n startDate,\n endDate: new Date(internalRangeDate.endDate),\n startTime: props.dateFormData.endTime,\n endTime: dateText,\n });\n\n emit(DateRangePickerCalendarEvent.INPUT, {\n startDate,\n endDate: new Date(internalRangeDate.endDate),\n });\n } else {\n // Indicate form error\n endDateError.value = true;\n // Emit Date picker calendar error\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n }\n }, FORM_INPUT_DEBOUNCE_TIME);\n\n const onEndDateInput = (endDateText: string) => {\n resetCustomRangeToDefault();\n // Set the date as string when input through the form\n dateTextInput.endDate = formatDateInputValue(endDateText);\n validateEndDate(dateTextInput.endDate);\n };\n\n const onDateInputKeyDown = (event: KeyboardEvent) => {\n validateDateInput(event);\n };\n\n const validateStartTime = debounce((startTimeText: string) => {\n if (isValidTime(startTimeText)) {\n startTimeError.value = false;\n internalRangeDate.startDate = setTimeInDate(internalRangeDate.startDate, startTimeText);\n\n const endDate = getDate('endDate');\n\n emit(DateRangePickerCalendarEvent.FORM_DATE, {\n startDate: new Date(internalRangeDate.startDate),\n endDate,\n startTime: startTimeText,\n endTime: props.dateFormData.endTime,\n });\n\n emit(DateRangePickerCalendarEvent.INPUT, {\n startDate: new Date(internalRangeDate.startDate),\n endDate,\n });\n } else {\n // Indicate form error\n startTimeError.value = true;\n // Emit Date picker calendar error\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n }\n });\n\n const validateEndTime = debounce((endTimeText: string) => {\n if (isValidTime(endTimeText)) {\n endTimeError.value = false;\n internalRangeDate.endDate = setTimeInDate(internalRangeDate.endDate, endTimeText);\n\n const startDate = getDate('startDate');\n\n emit(DateRangePickerCalendarEvent.FORM_DATE, {\n startDate,\n endDate: new Date(internalRangeDate.endDate),\n startTime: props.dateFormData.startTime,\n endTime: endTimeText,\n });\n emit(DateRangePickerCalendarEvent.INPUT, {\n startDate,\n endDate: new Date(internalRangeDate.endDate),\n });\n } else {\n // Indicate form error\n endTimeError.value = true;\n // Emit Date picker calendar error\n emit(DateRangePickerCalendarEvent.ERROR, { ...dateTextInput });\n }\n });\n\n const onStartTimeInput = (startTimeText: string) => {\n resetCustomRangeToDefault();\n dateTextInput.startTime = formatTimeInputValue(startTimeText);\n validateStartTime(dateTextInput.startTime);\n };\n\n const onEndTimeInput = (endDateText: string) => {\n resetCustomRangeToDefault();\n dateTextInput.endTime = formatTimeInputValue(endDateText);\n validateEndTime(dateTextInput.endTime);\n };\n\n const onTimeInputKeyDown = (event: KeyboardEvent) => {\n validateTimeInput(event);\n };\n\n const onRangeSelectorInput = (newCustomRangeValue: string) => {\n selectedRangeSelectorValue.value = newCustomRangeValue;\n const foundResult = props.quickSelectRanges?.find(({ value }) => value === newCustomRangeValue)?.data;\n if (foundResult) {\n dateTextInput.startDate = formatDate(foundResult.startDate);\n dateTextInput.endDate = formatDate(foundResult.endDate);\n\n if (props.granularities) {\n internalRangeDate.granularity = foundResult.granularity || DEFAULT_GRANULARITY;\n }\n if (!dateTextInput.startTime) {\n dateTextInput.startTime = formatTime(endOfDay(foundResult.startDate));\n }\n if (!dateTextInput.endTime) {\n dateTextInput.endTime = formatTime(endOfDay(foundResult.endDate));\n }\n emit(DateRangePickerCalendarEvent.CUSTOM_RANGE, foundResult);\n }\n };\n\n return {\n // Values\n internalRangeDate,\n dateTextInput,\n endDateError,\n endTimeError,\n granularityItems,\n selectedGranularity,\n computedMinMax,\n selectedRangeSelectorValue,\n startDateError,\n startTimeError,\n quickSelectRangeDefaultItems,\n formInputWrapperConditionalClasses,\n\n // Methods\n hasSlot: useHasSlot(slots),\n t,\n\n // Events\n onDateInput,\n onDateInputKeyDown,\n onEndDateInput,\n onEndDateSelected,\n onEndTimeInput,\n onRangeSelectorInput,\n onStartDateInput,\n onStartDateSelected,\n onStartTimeInput,\n onTimeInputKeyDown,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-range-picker-calendar.scss\" />\n","import { computed, reactive } from 'vue';\nimport { de, enUS, fr } from 'date-fns/locale';\nimport { useI18n } from '@/utils/ts/i18n';\nimport { UseDateDisplayText } from './use-date-range-picker-calendar-text.types';\nimport { DateFormat } from '@/types';\nimport { CalendarRangeDateValue } from '@/internal';\nimport { DateRangePickerCalendarFormData } from '../components/date-range-picker-calendar/date-range-picker-calendar.types';\nimport format from 'date-fns/format';\n\nexport const useDateRangePickerCalendarText: UseDateDisplayText<CalendarRangeDateValue> = ({\n datePickerValue,\n isDateIncorrect,\n}) => {\n const { locale, t } = useI18n();\n const locales = { de, enUS, fr };\n\n const formatDate = (date: Date, dateFormat: DateFormat) =>\n format(date, dateFormat, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n\n const formatTime = (date: Date) =>\n format(date, DateFormat.HOUR_MINUTE_SECONDS, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n\n // Handle the form input text\n const textInputDisplayValue = reactive<DateRangePickerCalendarFormData>({\n startDate: datePickerValue.value?.startDate\n ? formatDate(datePickerValue.value.startDate, DateFormat.NUMERIC_DATE_YEAR_FIRST)\n : undefined,\n endDate: datePickerValue.value?.endDate\n ? formatDate(datePickerValue.value.endDate, DateFormat.NUMERIC_DATE_YEAR_FIRST)\n : undefined,\n\n // Set time if the startDate/endDate are set\n startTime: datePickerValue.value?.startDate ? formatTime(datePickerValue.value?.startDate) : undefined,\n endTime: datePickerValue.value?.endDate ? formatTime(datePickerValue.value.endDate) : undefined,\n });\n\n const dateDisplayValue = computed(() => {\n // Display incorrect date when there's an error with the input\n if (isDateIncorrect.value) {\n return `${textInputDisplayValue.startDate || ''} - ${textInputDisplayValue.endDate || ''}`;\n }\n\n // Display \"Select a date\" when there's no date selected or input\n if (!datePickerValue.value || (!datePickerValue.value.startDate && !datePickerValue.value.endDate)) {\n return t('selectDateRange') as string;\n }\n\n const { startDate, endDate } = textInputDisplayValue;\n return `${formatDate(new Date(startDate), DateFormat.FULL_DATE_MONTH_FIRST)} - ${formatDate(\n new Date(endDate),\n DateFormat.FULL_DATE_MONTH_FIRST\n )}`;\n });\n\n const formatTextInputDisplayValue = () => '';\n\n return {\n // Values\n dateDisplayValue,\n textInputDisplayValue,\n\n // Methods\n formatTextInputDisplayValue,\n };\n};\n","export { CalendarFirstDayOfWeek as BentoDateRangePickerFirstDayOfWeek } from '@/internal';\nexport type {\n CalendarIsDateDisabled as BentoDateRangePickerIsDateDisabled,\n CalendarRangeDateValue as BentoDateRangePickerValue,\n CalendarGranularityConfig as BentoDateRangePickerGranularityConfig,\n} from '@/internal';\n\nexport enum BentoDateRangePickerEvent {\n INPUT = 'input',\n}\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div v-bento-click-outside-directive=\"closeDateRangePicker\" class=\"b-date-range-picker\">\n <!-- Label -->\n <field-label\n v-if=\"label\"\n :id=\"labelId\"\n :label=\"label\"\n :tooltip-text=\"tooltipText\"\n :optional=\"optional\"\n :required=\"required\"\n />\n\n <!-- Input -->\n <div @keydown.enter=\"onEnterPressedOverInput\">\n <dropdown-input-default\n ref=\"inputContainerRef\"\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDateRangePickerOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :disabled=\"disabled\"\n :is-invalid=\"!!errorMessage || isDateIncorrect\"\n :open=\"isDateRangePickerOpen\"\n :display-value=\"dateDisplayValue\"\n :readonly=\"isReadOnly\"\n @open=\"openDateRangePicker\"\n @clear=\"clearDateRangePickerValue\"\n @close=\"closeDateRangePicker\"\n />\n </div>\n\n <!-- Error Messages -->\n <error-message\n v-if=\"isDateIncorrect\"\n :id=\"dateErrorId\"\n :error-message=\"$t('provideDateInAFormat').toString()\"\n class=\"b-date-range-picker__error-message\"\n />\n <error-message\n v-if=\"!!errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-date-range-picker__error-message\"\n />\n\n <!-- Description -->\n <bento-typography\n v-if=\"description\"\n :id=\"descriptionId\"\n class=\"b-date-range-picker__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n {{ description }}\n </bento-typography>\n\n <!-- Calendar container -->\n <bento-popover\n v-if=\"inputContainerRef\"\n :id=\"datePickerContainerId\"\n class=\"b-date-range-picker__container\"\n :open=\"isDateRangePickerOpen\"\n :target-element=\"inputContainerRef\"\n :disable-focus-trap=\"true\"\n :aria-label=\"popoverAriaLabel\"\n position=\"bottom-start\"\n without-space\n fit-content\n >\n <date-range-picker-calendar\n :allow-time-input=\"allowTimeInput\"\n :quick-select-ranges=\"quickSelectRanges\"\n :value=\"value\"\n :first-day-of-week=\"firstDayOfWeek\"\n :granularities=\"granularities\"\n :is-date-disabled=\"isDateDisabled\"\n :max-range=\"maxRange\"\n :min=\"min\"\n :max=\"max\"\n :number-of-months=\"numberOfMonths\"\n :date-form-data=\"textInputDisplayValue\"\n @custom-range=\"onRangeSelectorInput\"\n @input=\"onDateRangePickerInput\"\n @error=\"onDateRangePickerError\"\n @form-date=\"onDateRangePickerFormDateInputUpdate\"\n />\n </bento-popover>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef, watch } from 'vue';\n\n // Components\n import { BentoPopover } from '@/components/popover';\n import { BentoTypography } from '../typography';\n import { DateRangePickerCalendar } from './components/date-range-picker-calendar';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n import { ErrorMessage, FieldLabel } from '@/internal';\n\n // Utils\n import { de, enUS, fr } from 'date-fns/locale';\n import { generateUid } from '@/utils/ts/unique-id';\n import { useI18n } from '@/utils/ts/i18n';\n import format from 'date-fns/format';\n\n // Composables\n import { useDateRangePickerCalendarText } from './composables/use-date-range-picker-calendar-text';\n import { useFormLayoutFieldLoading } from '@/composables';\n\n // Directives\n import { BentoClickOutsideDirective } from '@/directives';\n\n // Types\n import { BentoDateRangePickerEvent, BentoDateRangePickerValue } from './date-range-picker.types';\n import { DateFormat } from '@/types';\n import {\n DateRangePickerCalendarFormData,\n DateRangePickerCalendarRangeSelectorItems,\n } from './components/date-range-picker-calendar/date-range-picker-calendar.types';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Date range picker selector.\n *\n * @example\n * import { BentoDateRangePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDateRangePicker },\n * template: `\n * <bento-date-range-picker\n * label=\"Label\"\n * description=\"Supporting text\"\n * required\n * optional\n * disabled\n * @input=\"onDateChanged\"\n * v-model=\"selectedDate\"\n * />\n * `,\n * setup() {\n * const selectedDate = ref(new Date()); // reactive({ startDate: new Date(), endDate: new Date() })\n * return {\n * selectedDate,\n * }\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-date-range-picker',\n components: {\n BentoTypography,\n BentoPopover,\n DateRangePickerCalendar,\n DropdownInputDefault,\n ErrorMessage,\n FieldLabel,\n },\n directives: { BentoClickOutsideDirective },\n props: {\n /**\n * Allows user to enter time values in the form\n */\n allowTimeInput: { type: Boolean, default: false },\n\n /**\n * Descriptive supporting text visbile underneath the dropdown.\n */\n description: { type: String, default: undefined },\n\n /**\n * Disables dropdown functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Displays component in an error state with an error message\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: DateRangePickerCalendar.props.firstDayOfWeek,\n\n /**\n * A list of available granularities.\n * If present, the date picker will display a segmented control to change granularity.\n */\n granularities: DateRangePickerCalendar.props.granularities,\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: DateRangePickerCalendar.props.isDateDisabled,\n\n /**\n * Text that is displayed as a label above the element.\n */\n label: { type: String, default: undefined },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * The Boolean readonly property, when present, makes the element not mutable, meaning the user can not edit the date range picker.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Adds a info icon next to the label to display the passed tooltip message.\n */\n tooltipText: { type: String, default: null },\n\n /**\n * Enables the range selector.\n * If provided, must be an array that sets the custom range dropdown items. Items are of the structure:\n * `label` - label of custom range item.\n * `value` - a unique key of the custom range item.\n * `data` - an object `{ startDate: Date; endDate: Date }` to set the date picker range to upon selecting.\n */\n quickSelectRanges: {\n type: Array as PropType<DateRangePickerCalendarRangeSelectorItems>,\n default: undefined,\n },\n\n /**\n * Set a maximum number of dates to be selectable by the range.\n */\n maxRange: DateRangePickerCalendar.props.maxRange,\n\n /**\n * Sets a minimum limit for selectable dates - dates before `min` will not be selectable\n */\n min: DateRangePickerCalendar.props.min,\n\n /**\n * Sets a maximum limit for selectable dates - dates after `max` will not be selectable\n */\n max: DateRangePickerCalendar.props.max,\n\n /**\n * Number of months rendered on pane\n */\n numberOfMonths: DateRangePickerCalendar.props.numberOfMonths,\n\n /**\n * Selected date\n */\n value: DateRangePickerCalendar.props.value,\n },\n emits: [BentoDateRangePickerEvent.INPUT],\n setup(props, { emit }) {\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n const locales = { de, enUS, fr };\n const datePickerContainerId = generateUid('bento-date-range-picker-container');\n const labelId = generateUid('bento-date-range-picker-label');\n const descriptionId = generateUid('bento-date-range-picker-description');\n const errorId = generateUid('bento-date-range-picker-error');\n const dateErrorId = generateUid('bento-date-range-picker-date-error');\n const popoverAriaLabel = computed(\n () => props.label || t('dateRangePicker', { name: datePickerContainerId })\n );\n\n const isDateIncorrect = ref(false);\n const inputContainerRef = ref(null);\n const isDateRangePickerOpen = ref(false);\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n watch(\n () => props.disabled,\n () => {\n // Close date picker popover if it's opened when it's disabled\n if (props.disabled && isDateRangePickerOpen.value) {\n isDateRangePickerOpen.value = false;\n }\n }\n );\n\n const descriptionConditionalClasses = computed(() => ({\n 'b-date-range-picker__description--error': !!props.errorMessage || isDateIncorrect.value,\n }));\n\n const { dateDisplayValue, textInputDisplayValue, formatTextInputDisplayValue } =\n useDateRangePickerCalendarText({\n datePickerValue: toRef(props, 'value'),\n isDateIncorrect,\n });\n\n const ariaDescribedBy = computed(\n () =>\n `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''} ${\n isDateIncorrect.value ? dateErrorId : ''\n }`.trim() || null\n );\n\n const closeDateRangePicker = () => {\n isDateRangePickerOpen.value = false;\n };\n\n const openDateRangePicker = () => {\n isDateRangePickerOpen.value = true;\n formatTextInputDisplayValue();\n };\n\n const onDateRangePickerInput = (selectedRange: BentoDateRangePickerValue) => {\n // Reset the errors when the date is correct\n isDateIncorrect.value = false;\n\n const formatDate = (date: Date) =>\n format(date, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n\n textInputDisplayValue.startDate = formatDate(selectedRange.startDate);\n textInputDisplayValue.endDate = formatDate(selectedRange.endDate);\n emit(BentoDateRangePickerEvent.INPUT, selectedRange);\n };\n\n const clearDateRangePickerValue = async () => {\n if (isDateIncorrect.value) {\n isDateIncorrect.value = false;\n }\n emit(BentoDateRangePickerEvent.INPUT, null);\n };\n\n const onEnterPressedOverInput = () => {\n // Close the date picker if the date is correct\n if (!isDateIncorrect.value) {\n isDateRangePickerOpen.value = false;\n }\n };\n\n const onDateRangePickerFormDateInputUpdate = (dateFormDate: DateRangePickerCalendarFormData) => {\n isDateIncorrect.value = false;\n\n if (dateFormDate.startTime) {\n textInputDisplayValue.startTime = dateFormDate.startTime;\n }\n\n if (dateFormDate.endTime) {\n textInputDisplayValue.endTime = dateFormDate.endTime;\n }\n };\n\n const onDateRangePickerError = dateTextInput => {\n isDateIncorrect.value = true;\n textInputDisplayValue.startDate = dateTextInput.startDate;\n textInputDisplayValue.endDate = dateTextInput.endDate;\n\n // Remove current date range selection\n emit(BentoDateRangePickerEvent.INPUT, { startDate: null, endDate: null });\n };\n\n const onRangeSelectorInput = (quickSelectRanges?: { startDate: Date; endDate: Date }) => {\n if (quickSelectRanges) {\n const formatDate = (date: Date) =>\n format(date, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n textInputDisplayValue.startDate = formatDate(quickSelectRanges.startDate);\n textInputDisplayValue.endDate = formatDate(quickSelectRanges.endDate);\n emit(BentoDateRangePickerEvent.INPUT, quickSelectRanges);\n }\n };\n\n return {\n // Refs\n inputContainerRef,\n\n // Values,\n dateDisplayValue,\n datePickerContainerId,\n descriptionConditionalClasses,\n isDateIncorrect,\n isDateRangePickerOpen,\n isReadOnly,\n labelId,\n descriptionId,\n dateErrorId,\n errorId,\n popoverAriaLabel,\n ariaDescribedBy,\n textInputDisplayValue,\n\n // Events\n closeDateRangePicker,\n clearDateRangePickerValue,\n openDateRangePicker,\n onRangeSelectorInput,\n onEnterPressedOverInput,\n onDateRangePickerInput,\n onDateRangePickerError,\n onDateRangePickerFormDateInputUpdate,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-range-picker.scss\" />\n"],"names":["isEqual","dirtyLeftDate","dirtyRightDate","requiredArgs","dateLeft","toDate","dateRight","setHours","dirtyDate","dirtyHours","date","hours","toInteger","setMinutes","dirtyMinutes","minutes","setSeconds","dirtySeconds","seconds","useGranularMinMaxDate","firstDayOfWeek","minimumDate","maximumDate","granularity","min","startOfDay","max","endOfDay","startOfMin","startOfWeek","isSameDay","endOfWeek","endOfMax","subDays","startOfMonth","addMonths","endOfMonth","DateRangePickerCalendarEvent","DateRangePickerCalendarEvent2","validDigitRegex","hourRegex","minuteRegex","validateTimeInput","event","selectionStart","isValidKey","isValidColon","formatTimeInputValue","value","formattedValue","secondToLastDigit","lastDigit","FORM_INPUT_DEBOUNCE_TIME","RANGE_SELECTOR_CUSTOM_RANGE_KEY","DEFAULT_GRANULARITY","_sfc_main$1","defineComponent","messages$1","BentoDropdown","BentoInputField","BentoSegmentedControl","BentoTypography","Calendar","props","emit","slots","locale","t","useI18n","locales","de","enUS","fr","internalRangeDate","reactive","_a","_b","_c","selectedRangeSelectorValue","ref","_e","_d","data","formInputWrapperConditionalClasses","computed","quickSelectRangeDefaultItems","selectedGranularity","type","granularityItems","disabled","getGranularCalendarLimits","computedMinMax","adjustStartDateInputForWeekly","adjustEndDateInputForWeekly","adjustStartDateInputForMonthly","adjustEndDateInputForMonthly","useGranularityAdjustments","resetCustomRangeToDefault","formatDate","dateToFormat","format","DateFormat","formatTime","startDateError","endDateError","startTimeError","endTimeError","dateTextInput","onDateInput","selectedRange","isValidTime","timeText","setTimeInDate","time","dateWithTime","isValidDate","dateText","isDateEnabled","onMounted","onStartDateSelected","newStartDate","onEndDateSelected","newEndDate","getDate","keyName","dateProp","validateStartDate","debounce","startDateText","endDate","onStartDateInput","formatDateInputValue","validateEndDate","endDateText","startDate","onEndDateInput","onDateInputKeyDown","validateDateInput","validateStartTime","startTimeText","validateEndTime","endTimeText","onStartTimeInput","onEndTimeInput","onTimeInputKeyDown","onRangeSelectorInput","newCustomRangeValue","foundResult","useHasSlot","useDateRangePickerCalendarText","datePickerValue","isDateIncorrect","dateFormat","textInputDisplayValue","BentoDateRangePickerEvent","BentoDateRangePickerEvent2","_sfc_main","messages","BentoPopover","DateRangePickerCalendar","DropdownInputDefault","ErrorMessage","FieldLabel","BentoClickOutsideDirective","datePickerContainerId","generateUid","labelId","descriptionId","errorId","dateErrorId","popoverAriaLabel","inputContainerRef","isDateRangePickerOpen","isReadOnly","useFormLayoutFieldLoading","toRef","watch","descriptionConditionalClasses","dateDisplayValue","form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MAAA,UAAA,GAAA,CAAA,CAAA,KAAAK;AAAA,UACA,CAAA;AAEA,UAAAkF,EAAA,YAAAvD,EAAAmF,EAAA,SAAA,GACA5B,EAAA,UAAAvD,EAAAmF,EAAA,OAAA,GACArH,EAAA0F,EAAA,OAAA2B,CAAA;AAAA;AAAA,MACA;AAAA,MA0BA,yBA/DA,MAAA;AAEA,QAAA9B,EAAA,UACAqB,EAAA,QAAA;AAAA,MACA;AAAA,MA4DA,wBArFA,CAAA/D,MAAA;AAEA,QAAA0C,EAAA,QAAA;AAEA,cAAArD,IAAA,CAAAxF,MAAA0F,EAAA1F,GAAA2F,EAAA,yBAAA;AAAA,UACA,QAAAhC,EAAAH,EAAA,MAAA,UAAA,GAAA,CAAA,CAAA,KAAAK;AAAA,QACA,CAAA;AAGA,QAAAkF,EAAA,YAAAvD,EAAAW,EAAA,SAAA,GACA4C,EAAA,UAAAvD,EAAAW,EAAA,OAAA,GACA7C,EAAA0F,EAAA,OAAA7C,CAAA;AAAA,MAAA;AAAA,MA2EA,wBA9CA,CAAAF,MAAA;AACA,QAAA4C,EAAA,QAAA,IACAE,EAAA,YAAA9C,EAAA,WACA8C,EAAA,UAAA9C,EAAA,SAGA3C,EAAA0F,EAAA,OAAA,EAAA,WAAA,MAAA,SAAA,KAAA,CAAA;AAAA,MAAA;AAAA,MAyCA,sCA3DA,CAAA4B,MAAA;AACA,QAAA/B,EAAA,QAAA,IAEA+B,EAAA,cACA7B,EAAA,YAAA6B,EAAA,YAGAA,EAAA,YACA7B,EAAA,UAAA6B,EAAA;AAAA,MACA;AAAA,IAmDA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.c032aa32.js","sources":["../../node_modules/@adyen/ui-assets-icons-16/dist/vue/options-vertical.vue","../../src/components/menu/components/menu-item/menu-item.vue","../../src/components/menu/menu.types.ts","../../src/components/menu/components/menu-list-container/menu-list-container.vue","../../src/components/menu/components/sub-menu-item-list/sub-menu-item-list.vue","../../src/components/menu/components/menu-item-list/menu-item-list.vue","../../src/components/menu/menu.keys.ts","../../src/components/menu/menu.vue"],"sourcesContent":["\n<template>\n <svg role=\"img\" v-bind=\"$attrs\" class=\"ui-assets-icons-16\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\"><title v-if=\"$attrs['svg-title']\">{{ $attrs['svg-title'] }}</title><path fill=\"#00112C\" d=\"M8 4C8.29667 4 8.58668 3.91203 8.83335 3.74721C9.08003 3.58238 9.27229 3.34811 9.38582 3.07403C9.49935 2.79994 9.52906 2.49834 9.47118 2.20737C9.4133 1.91639 9.27044 1.64912 9.06066 1.43934C8.85088 1.22956 8.58361 1.0867 8.29264 1.02882C8.00167 0.970945 7.70006 1.00065 7.42598 1.11418C7.15189 1.22771 6.91762 1.41997 6.7528 1.66665C6.58797 1.91332 6.5 2.20333 6.5 2.5C6.5 2.89783 6.65803 3.27936 6.93934 3.56066C7.22064 3.84197 7.60218 4 8 4Z\"/><path fill=\"#00112C\" d=\"M8 15C8.29667 15 8.58668 14.912 8.83335 14.7472C9.08003 14.5824 9.27229 14.3481 9.38582 14.074C9.49935 13.7999 9.52906 13.4983 9.47118 13.2074C9.4133 12.9164 9.27044 12.6491 9.06066 12.4393C8.85088 12.2296 8.58361 12.0867 8.29264 12.0288C8.00167 11.9709 7.70006 12.0007 7.42598 12.1142C7.15189 12.2277 6.91762 12.42 6.7528 12.6666C6.58797 12.9133 6.5 13.2033 6.5 13.5C6.5 13.8978 6.65803 14.2794 6.93934 14.5607C7.22064 14.842 7.60218 15 8 15Z\"/><path fill=\"#00112C\" d=\"M8.83335 9.24721C8.58668 9.41203 8.29667 9.5 8 9.5C7.60218 9.5 7.22064 9.34197 6.93934 9.06066C6.65803 8.77936 6.5 8.39783 6.5 8C6.5 7.70333 6.58797 7.41332 6.7528 7.16665C6.91762 6.91997 7.15189 6.72771 7.42598 6.61418C7.70006 6.50065 8.00167 6.47094 8.29264 6.52882C8.58361 6.5867 8.85088 6.72956 9.06066 6.93934C9.27044 7.14912 9.4133 7.41639 9.47118 7.70737C9.52906 7.99834 9.49935 8.29994 9.38582 8.57403C9.27229 8.84811 9.08003 9.08238 8.83335 9.24721Z\"/></svg>\n</template>\n<script>\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\n</script>\n<style>\n @import '../css/main.css';\n</style>\n","<template>\n <base-button\n class=\"b-menu-item\"\n role=\"menuitem\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n tabindex=\"-1\"\n @click=\"onClick\"\n >\n <template v-if=\"icon\" #iconLeft>\n <component :is=\"icon\" class=\"b-menu-item__icon-left\" aria-hidden=\"true\" />\n </template>\n <template #default>\n <bento-typography el=\"span\" variant=\"body\" :stronger=\"isTitle\" class=\"b-menu-item__primary-text\">\n {{ text }}\n </bento-typography>\n <bento-typography v-if=\"secondaryText\" el=\"span\" variant=\"body\" class=\"b-menu-item__secondary-text\">\n {{ secondaryText }}\n </bento-typography>\n </template>\n <template v-if=\"chevron\" #iconRight><chevron-right-icon aria-hidden=\"true\" /></template>\n </base-button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import ChevronRightIcon from '@adyen/ui-assets-icons-16/vue/chevron-right';\n import { BaseButton, BentoBaseButtonEvent } from '@/components/internal/base-button';\n import { BentoTypography } from '@/components/typography';\n import { BentoMenuItem } from './menu-item.types';\n\n /**\n * Menu item component to render items in a menu. For internal use only.\n */\n export default defineComponent({\n name: 'menu-item',\n components: { BaseButton, BentoTypography, ChevronRightIcon },\n props: {\n /**\n * menu-item text that gets displayed as the main label\n */\n text: {\n type: String,\n required: true,\n },\n /**\n * menu-item action that gets executed when the MeniItem is clicked\n */\n handler: {\n type: Function as PropType<BentoMenuItem['handler']>,\n required: true,\n },\n /**\n * menu-item text that gets displayed as the secondary label\n */\n secondaryText: {\n type: String,\n default: null,\n },\n /**\n * Optional chevron icon displayed to the right of the menu-item\n */\n chevron: {\n type: Boolean,\n default: false,\n },\n /**\n * Optional icon displayed to the left of the menu-item\n */\n icon: {\n // Types for Vue2 (Object) and Vue3 (Function)\n // TODO: Remove Object when fully migrated to Vue3\n type: [Object, Function] as PropType<BentoMenuItem['icon']>,\n default: null,\n },\n /**\n * Disables menu-item button functionality\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays an indent variant od the menu-item\n */\n indent: {\n type: Boolean,\n default: false,\n },\n /**\n * Displays menu-item button as critical\n */\n critical: {\n type: Boolean,\n default: false,\n },\n /**\n * Renders the text in a bold variant\n */\n isTitle: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoBaseButtonEvent.CLICK],\n setup(props, { emit }) {\n const conditionalClasses = computed(() => ({\n 'b-menu-item--critical': props.critical,\n 'b-menu-item--indent': props.indent,\n }));\n\n const onClick = (e: MouseEvent) => {\n e.stopPropagation();\n props.handler();\n emit(BentoBaseButtonEvent.CLICK);\n };\n\n return {\n // Values\n conditionalClasses,\n\n // Methods\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-item.scss\" />\n","import { BentoButton } from '../button';\n\nexport enum BentoMenuEvent {\n BACK = 'back',\n CLOSE = 'close',\n OPEN = 'open',\n}\n\ntype ButtonProps = InstanceType<typeof BentoButton>['$props'];\n\nexport type BentoMenuButtonProps = {\n variant?: ButtonProps['variant'];\n condensed?: ButtonProps['condensed'];\n disabled?: ButtonProps['disabled'];\n};\n","<template>\n <div class=\"b-menu-list-container\"><slot></slot></div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n\n /**\n * Menu list container component to set the correct styling in a menu list. For internal use only.\n */\n export default defineComponent({\n name: 'bento-menu-list-container',\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-list-container.scss\" />\n","<template>\n <transition name=\"b-sub-menu-item-list__transition\" appear>\n <menu-list-container class=\"b-sub-menu-item-list\">\n <ul\n ref=\"subMenuItemListRefLocal\"\n role=\"menu\"\n class=\"b-sub-menu-item-list__list\"\n @keydown.down.stop=\"focusNext\"\n @keydown.up.stop=\"focusPrevious\"\n @keydown.esc.stop=\"onBackButton\"\n >\n <li v-for=\"(item, index) in computedItems\" :key=\"`sub-menu-item-list-item-${index}`\" role=\"none\">\n <menu-item\n :text=\"item.text\"\n :handler=\"item.handler\"\n :secondary-text=\"item.secondaryText\"\n :icon=\"item.icon\"\n :is-title=\"item.isTitle\"\n :disabled=\"item.disabled\"\n :critical=\"item.critical\"\n :indent=\"item.indent\"\n :tabindex=\"index === subMenuFocusedIndex ? '0' : '-1'\"\n @click=\"item.clickHandler\"\n />\n <bento-divider v-if=\"item.addDivider\" class=\"b-sub-menu-item-list__divider\" />\n </li>\n </ul>\n </menu-list-container>\n </transition>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onMounted, PropType, ref } from 'vue';\n import { BentoDivider } from '@/components/divider';\n import { BentoMenuItem, MenuItem } from '../menu-item';\n import MenuListContainer from '../menu-list-container/menu-list-container.vue';\n import ChevronLeftIcon from '@adyen/ui-assets-icons-16/vue/chevron-left';\n import { BentoMenuEvent } from '../../menu.types';\n import messages from '../../messages.json';\n\n /**\n * SubMenuItemList component to render a submenu with the sliding transition. For internal use only.\n */\n export default defineComponent({\n i18n: { messages },\n name: 'sub-menu-item-list',\n components: { BentoDivider, MenuItem, MenuListContainer },\n props: {\n items: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n title: {\n type: String,\n required: true,\n },\n },\n emits: [BentoMenuEvent.CLOSE, BentoMenuEvent.BACK],\n setup(props, { emit }) {\n const subMenuItemListRefLocal = ref(null);\n const subMenuFocusedIndex = ref(0);\n const numberOfItems = ref(props.items.length);\n\n const closeMenu = () => emit(BentoMenuEvent.CLOSE);\n\n const onBackButton = () => emit(BentoMenuEvent.BACK);\n\n const computedItems = computed(() => {\n const items = props.items?.map(el => ({\n ...el,\n indent: !el.icon,\n isTitle: false,\n clickHandler: closeMenu,\n }));\n return [\n {\n text: props.title,\n secondaryText: null,\n critical: false,\n icon: ChevronLeftIcon,\n isTitle: true,\n disabled: false,\n indent: false,\n handler: onBackButton,\n clickHandler: onBackButton,\n addDivider: true,\n },\n ...items,\n ];\n });\n\n const focusItem = async () => {\n subMenuItemListRefLocal.value?.children?.[subMenuFocusedIndex.value]?.children?.[0]?.focus();\n };\n\n onMounted(async () => {\n // Using setTimeout otherwise the sliding animation doesn't work anymore. The timeout imer is the same as the transition time (0.15s)\n setTimeout(() => focusItem(), 150);\n });\n\n const focusPrevious = () => {\n if (subMenuFocusedIndex.value > 0) {\n subMenuFocusedIndex.value -= 1;\n if (computedItems.value[subMenuFocusedIndex.value].disabled) {\n focusPrevious();\n }\n } else {\n subMenuFocusedIndex.value = numberOfItems.value;\n }\n focusItem();\n };\n\n const focusNext = () => {\n if (subMenuFocusedIndex.value < numberOfItems.value) {\n subMenuFocusedIndex.value += 1;\n if (computedItems.value[subMenuFocusedIndex.value].disabled) {\n focusNext();\n }\n } else {\n subMenuFocusedIndex.value = 0;\n }\n focusItem();\n };\n\n return {\n // Enums\n BentoMenuEvent,\n\n // Values\n subMenuItemListRefLocal,\n subMenuFocusedIndex,\n ChevronLeftIcon,\n computedItems,\n\n // Methods\n closeMenu,\n onBackButton,\n focusPrevious,\n focusNext,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./sub-menu-item-list.scss\" />\n","<template>\n <menu-list-container ref=\"menuItemListWrapperRef\" :style=\"{ height: computedHeight }\">\n <ul\n ref=\"menuItemListRef\"\n class=\"b-menu-item-list\"\n role=\"menu\"\n @keydown.down=\"focusNext\"\n @keydown.up=\"focusPrevious\"\n @keydown.esc=\"closeMenu\"\n @keydown.tab=\"closeMenu\"\n >\n <li\n v-for=\"(item, index) in computedData\"\n :key=\"`menu-item-${index}`\"\n class=\"b-menu-item-list__item\"\n role=\"none\"\n @keydown.right=\"focusRight(item, index)\"\n @keydown.left=\"focusLeft()\"\n >\n <menu-item\n :text=\"item.text\"\n :handler=\"!item.items?.length ? item.handler : () => null\"\n :secondary-text=\"item.secondaryText\"\n :icon=\"item.icon\"\n :chevron=\"!!item.items?.length\"\n :disabled=\"item.disabled\"\n :critical=\"item.critical\"\n :indent=\"item.indent\"\n :tabindex=\"index === subMenuFocusedIndex ? '0' : '-1'\"\n :aria-haspopup=\"!!item.items?.length\"\n :aria-expanded=\"showSubMenu && visibleSubMenuIndex === index\"\n @click=\"toggleMenu(item, index)\"\n />\n <bento-divider v-if=\"item.addDivider\" class=\"b-menu-item-list__divider\" />\n <sub-menu-item-list\n v-if=\"item.items?.length && showSubMenu && visibleSubMenuIndex === index\"\n ref=\"subMenuItemListRef\"\n :items=\"item.items\"\n :title=\"item.text\"\n @back=\"onBackButton\"\n @close=\"closeMenu\"\n />\n </li>\n </ul>\n </menu-list-container>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref } from 'vue';\n import { BentoDivider } from '@/components/divider';\n import { BentoMenuItem, MenuItem } from '../menu-item';\n import { BentoMenuEvent } from '../../menu.types';\n import MenuListContainer from '../menu-list-container/menu-list-container.vue';\n import SubMenuItemList from '../sub-menu-item-list/sub-menu-item-list.vue';\n\n /**\n * MenuItem list to be used in the Menu component. For internal use only.\n */\n export default defineComponent({\n name: 'menu-item-list',\n components: { BentoDivider, MenuItem, MenuListContainer, SubMenuItemList },\n props: {\n /**\n * The data to be displayed in the list\n */\n data: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n /**\n * Displays the menu-items of the list in the indent variant. Only applies to elements that don't have an icon to their left.\n */\n indentItems: {\n type: Boolean,\n default: false,\n },\n /**\n * If set to true, focuses the last item on the list instead of the first. Used for accessibility purposes when the menu is opened with the 'up' arrow key.\n */\n focusLastElement: {\n type: Boolean,\n default: false,\n },\n },\n emits: [BentoMenuEvent.CLOSE],\n setup(props, { emit }) {\n const menuItemListRef = ref(null);\n const menuItemListWrapperRef = ref(null);\n const subMenuItemListRef = ref(null);\n const showSubMenu = ref(false);\n const visibleSubMenuIndex = ref(null);\n const focusedIndex = ref(props.focusLastElement ? props.data.length - 1 : 0);\n const subMenuFocusedIndex = ref(0);\n const numberOfItems = ref(props.data.length - 1);\n const hasMenuItemsWithIcon = computed(() => props.data.some(el => el.icon));\n\n const computedData = computed(() => {\n if (props.indentItems || hasMenuItemsWithIcon.value) {\n return props.data.map(el => {\n let indent = false;\n if (!el.icon) {\n indent = true;\n }\n return {\n ...el,\n // eslint-disable-next-line no-param-reassign\n indent,\n };\n });\n }\n return props.data;\n });\n\n const focusItem = () => menuItemListRef.value?.children[focusedIndex.value]?.children[0]?.focus();\n\n const closeMenu = () => emit(BentoMenuEvent.CLOSE);\n\n const toggleMenu = async (item: BentoMenuItem, index: number) => {\n if (item.items) {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = true;\n } else {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = false;\n closeMenu();\n }\n };\n\n const focusPrevious = () => {\n if (focusedIndex.value > 0) {\n focusedIndex.value -= 1;\n if (computedData.value[focusedIndex.value].disabled) {\n focusPrevious();\n }\n } else {\n focusedIndex.value = numberOfItems.value;\n }\n focusItem();\n };\n\n const focusNext = () => {\n if (focusedIndex.value < numberOfItems.value) {\n focusedIndex.value += 1;\n if (computedData.value[focusedIndex.value].disabled) {\n focusNext();\n }\n } else {\n focusedIndex.value = 0;\n }\n focusItem();\n };\n\n const focusRight = (item, index) => {\n if (item?.items?.length) {\n visibleSubMenuIndex.value = index;\n showSubMenu.value = true;\n }\n };\n\n const focusLeft = () => {\n if (visibleSubMenuIndex.value && showSubMenu.value) {\n visibleSubMenuIndex.value = null;\n showSubMenu.value = false;\n }\n };\n\n const onBackButton = () => {\n showSubMenu.value = false;\n visibleSubMenuIndex.value = null;\n // Focus the right element\n focusItem();\n };\n\n const subMenuHeight = computed(() => subMenuItemListRef.value?.[0]?.$el?.offsetHeight);\n\n // When we show the sub menu we need to set the height of the container because of the way the submenus are handled,\n // but the main menu doesn't need a height, as the popover will generate it with the right height\n const computedHeight = computed(() => (showSubMenu.value ? `${subMenuHeight.value}px` : ''));\n\n return {\n // Values\n menuItemListRef,\n menuItemListWrapperRef,\n subMenuItemListRef,\n\n computedData,\n computedHeight,\n\n focusedIndex,\n subMenuFocusedIndex,\n\n showSubMenu,\n visibleSubMenuIndex,\n\n // Methods\n toggleMenu,\n closeMenu,\n focusPrevious,\n focusNext,\n focusRight,\n focusLeft,\n onBackButton,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu-item-list.scss\" />\n","export const MENU_INVERSE_INJECTION_KEY = Symbol('menu inverse style injection key');\n","<template>\n <div\n v-bento-click-outside-directive=\"closeMenu\"\n :class=\"computedClasses\"\n class=\"b-menu\"\n @keydown.down=\"onKeyDown\"\n @keydown.up=\"onKeyUp\"\n @keydown.esc=\"closeMenu\"\n >\n <bento-button\n ref=\"menuButtonRef\"\n aria-haspopup=\"true\"\n v-bind=\"button\"\n :aria-expanded=\"`${showMenu}`\"\n :aria-controls=\"showMenu ? menuId : null\"\n :inverse=\"isInverseColorSet\"\n @click=\"toggleShowMenu\"\n >\n <template v-if=\"!hasSlot('default') || hasSlot('iconLeft')\" #iconLeft>\n <slot name=\"iconLeft\">\n <options-vertical-icon :title=\"$t('menuButton')\" />\n </slot>\n </template>\n <template v-if=\"hasSlot('default')\" #default>\n <slot />\n </template>\n <template v-if=\"hasSlot('iconRight')\" #iconRight>\n <slot name=\"iconRight\" />\n </template>\n </bento-button>\n <bento-popover\n v-if=\"menuButtonRef\"\n :id=\"menuId\"\n :open=\"showMenu\"\n class=\"b-menu__popover\"\n :style=\"computedMenuWidth\"\n :target-element=\"menuButtonRef\"\n :position=\"menuPosition\"\n :fixed-positioning=\"menuFixedPositioning\"\n :fallback-position=\"[\n 'bottom-start',\n 'bottom-end',\n 'top-start',\n 'top-end',\n 'right-start',\n 'right-end',\n 'left-start',\n 'left-end',\n ]\"\n without-space\n >\n <menu-item-list :data=\"data\" :focus-last-element=\"isLastElementFocused\" @close=\"closeMenu\" />\n </bento-popover>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, inject, PropType, provide, ref } from 'vue';\n import OptionsVerticalIcon from '@adyen/ui-assets-icons-16/vue/options-vertical';\n import { generateUid } from '@/utils/ts/unique-id';\n import { BentoClickOutsideDirective } from '@/directives';\n import { BentoButton } from '@/components/button';\n import { BentoPopover, BentoPopoverPositions } from '@/components/popover';\n import { BentoMenuItem, MenuItemList } from './components';\n import { BentoMenuButtonProps, BentoMenuEvent } from './menu.types';\n import { DIVIDER_INVERSE_INJECTION_KEY } from '@/components/divider/divider.keys';\n import { MENU_INVERSE_INJECTION_KEY } from './menu.keys';\n import messages from './messages.json';\n import { useHasSlot } from '@/composables';\n\n /**\n * Menu component to render a series of buttons. Csan render nested submenus.\n *\n * @example\n * import { BentoMenu } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoMenu },\n * template: `\n * <bento-menu\n * :data=[\n * { text: 'Menu item text', handler: () => { some code here } },\n * { text: 'Another menu item text', handler: () => { some other code here }, critical: true }\n * ]\n * />\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-menu',\n components: { BentoButton, BentoPopover, MenuItemList, OptionsVerticalIcon },\n directives: { BentoClickOutsideDirective },\n props: {\n /**\n * Object containing props to change the menu button appearance. Accepts the same props present in BentoButton.\n */\n button: {\n type: Object as PropType<BentoMenuButtonProps>,\n default: () =>\n ({\n variant: 'secondary',\n } as BentoMenuButtonProps),\n },\n /**\n * The data to be displayed in the list\n */\n data: {\n type: Array as PropType<BentoMenuItem[]>,\n required: true,\n },\n\n /**\n * The position of where the menu should open.\n */\n menuPosition: {\n type: String as PropType<BentoPopoverPositions | `${BentoPopoverPositions}`>,\n default: BentoPopoverPositions.BOTTOM_START,\n validator: (value: BentoPopoverPositions) => Object.values(BentoPopoverPositions).includes(value),\n },\n\n /**\n * Instructs the menu popover to be visible outside of the containing container.\n * @see {@link https://floating-ui.com/docs/usefloating#strategy}\n */\n menuFixedPositioning: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets a custom width for the menu popover.\n */\n menuWidth: {\n type: Number,\n default: null,\n },\n },\n emits: [BentoMenuEvent.CLOSE, BentoMenuEvent.OPEN],\n setup(props, { emit, slots }) {\n const menuButtonRef = ref(null);\n const showMenu = ref(false);\n const isLastElementFocused = ref(false);\n const menuId = generateUid('menu');\n const popoverId = generateUid('menu-popover');\n\n const isInverseColorSet = inject(MENU_INVERSE_INJECTION_KEY, ref(false));\n provide(DIVIDER_INVERSE_INJECTION_KEY, isInverseColorSet);\n\n const computedClasses = computed(() => ({\n 'b-menu--inverse': isInverseColorSet.value,\n }));\n\n const computedMenuWidth = computed(() => (props.menuWidth ? { width: `${props.menuWidth}px` } : null));\n\n const openMenu = () => {\n showMenu.value = true;\n emit(BentoMenuEvent.OPEN);\n };\n\n const closeMenu = () => {\n if (showMenu.value) {\n showMenu.value = false;\n menuButtonRef.value.$el.focus();\n emit(BentoMenuEvent.CLOSE);\n }\n };\n\n const toggleShowMenu = (e: MouseEvent) => {\n e.stopPropagation();\n if (!showMenu.value) {\n openMenu();\n } else {\n closeMenu();\n }\n };\n\n const onKeyDown = () => {\n isLastElementFocused.value = false;\n openMenu();\n };\n\n const onKeyUp = () => {\n isLastElementFocused.value = true;\n openMenu();\n };\n\n return {\n // Values\n menuButtonRef,\n menuId,\n popoverId,\n showMenu,\n computedMenuWidth,\n isLastElementFocused,\n\n // Classes\n computedClasses,\n isInverseColorSet,\n\n // Methods\n hasSlot: useHasSlot(slots),\n onKeyDown,\n onKeyUp,\n closeMenu,\n toggleShowMenu,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./menu.scss\" />\n"],"names":["uuid","_sfc_main$5","_sfc_main$4","defineComponent","BaseButton","BentoTypography","ChevronRightIcon","BentoBaseButtonEvent","props","emit","computed","e","BentoMenuEvent","BentoMenuEvent2","_sfc_main$3","_sfc_main$2","messages","BentoDivider","MenuItem","MenuListContainer","subMenuItemListRefLocal","ref","subMenuFocusedIndex","numberOfItems","closeMenu","onBackButton","computedItems","items","_a","el","ChevronLeftIcon","focusItem","_e","_d","_c","_b","onMounted","focusPrevious","focusNext","_sfc_main$1","SubMenuItemList","menuItemListRef","menuItemListWrapperRef","subMenuItemListRef","showSubMenu","visibleSubMenuIndex","focusedIndex","hasMenuItemsWithIcon","computedData","indent","toggleMenu","item","index","focusRight","focusLeft","subMenuHeight","computedHeight","MENU_INVERSE_INJECTION_KEY","_sfc_main","BentoButton","BentoPopover","MenuItemList","OptionsVerticalIcon","BentoClickOutsideDirective","BentoPopoverPositions","value","slots","menuButtonRef","showMenu","isLastElementFocused","menuId","generateUid","popoverId","isInverseColorSet","inject","provide","DIVIDER_INVERSE_INJECTION_KEY","computedClasses","computedMenuWidth","openMenu","toggleShowMenu","onKeyDown","onKeyUp","useHasSlot"],"mappings":";;;;;;;;;;;;AAKA,IAAAA,IAAA;AAEA,MAAAC,IAAA;AAAA,EACA,eAAA;AACA,SAAA,OAAAD,EAAA,SAAA,GACAA,KAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;sBCsBAE,KAAAC,EAAA;AAAA,EAAA,MAAA;AAAA,EACA,YAAA,EAAA,YAAAC,GAAA,iBAAAC,GAAA,kBAAAC,EAAA;AAAA,EACA,OAAA;AAAA;AAAA;AAAA;AAAA,IACA,MAAA;AAAA,MAIA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,SAAA;AAAA,MAIA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,eAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,SAAA;AAAA,MAIA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IACA,MAAA;AAAA;AAAA;AAAA,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J;AAAA,MACA,mBAAAU;AAAA,MACA,sBAAAT;AAAA;AAAA,MACA,iBAAAQ;AAAA,MAGA,mBAAAJ;AAAA;AAAA,MACA,SAAAU,EAAAjB,CAAA;AAAA,MAGA,WAAAe;AAAA,MACA,SAAAC;AAAA,MACA,WAAA1D;AAAA,MACA,gBAAAwD;AAAA,IACA;AAAA,EACA;AAEA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"listbox.371743bc.js","sources":["../../src/composables/use-checkbox-select-all/use-checkbox-select-all.ts","../../src/composables/use-virtual-list/use-virtual-list.ts","../../src/types/listbox.ts","../../src/components/internal/listbox/components/listbox-single-select/components/listbox-single-select-category/listbox-single-select-category.vue","../../src/components/internal/listbox/components/listbox-option/listbox-option.vue","../../src/components/internal/listbox/components/listbox-single-select-option/listbox-single-select-option.vue","../../src/components/internal/listbox/composables/useListboxKeyboardNavigation.ts","../../src/components/internal/listbox/components/listbox-single-select/listbox-single-select.vue","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.types.ts","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/components/listbox-multi-select-category/listbox-multi-select-category.vue","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.types.ts","../../src/components/internal/listbox/components/listbox-multi-select/components/listbox-multi-select-options/listbox-multi-select-options.vue","../../src/components/internal/listbox/composables/use-multi-level-items/use-multi-level-items.ts","../../src/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue","../../src/components/internal/listbox/listbox.vue"],"sourcesContent":["import { computed } from 'vue';\nimport type { ComputedRef } from 'vue';\nimport type { BentoListboxMultiSelectValue, Fn } from '@/types';\nimport { BentoListboxOptions } from '@/types';\n\n/**\n * Callback function that alllows to select all the items when called\n * @callback selectAllCallback\n */\n\n/**\n * Callback function that alllows to select all the items when called\n * @callback unselectAllCallback\n */\n\n/**\n * @typedef {Object} UseCheckboxSelectAll\n * @property {Ref<boolean>} isAllSelected - Indicates if all values are selected. Pass this to the :value property.\n * @property {Ref<boolean>} isIndeterminate - Indicates if it is in an indeterminated state (not all values are selected nor unselected). Pass this to the :indeterminate property.\n * @property {(selectedValue: boolean) => void} toggleSelectAll - Handles the select all flow, selects or unselects all and nullifies the indeterminated state. Pass this to the @input method.\n */\n\n/**\n * Composable to handle a 3 way checkbox state that allows to manage\n * a \"select all\", \"unselect all\" and an intermediate state where\n * not all are selected.\n *\n * @example\n * const checkboxVModelRef = ref<number[]>([]);\n *\n * const { isAllSelected, isIndeterminate, toggleSelectAll, updateIndeterminate } = useCheckboxSelectAll(\n * checkboxVModelRef,\n * () => { checkboxVModelRef.value = [...] // select all logic },\n * () => { checkboxVModelRef.value = [] // unselect all logic },\n * );\n * toggleSelectAll(true|false); // Hook this to the @input method\n * updateIndeterminate(totalOfAvailableItems);\n *\n *\n * @param {ComputedRef<BentoListboxMultiSelectValue>} selectedItemsList - Reference to the list of selected values\n * @param {ComputedRef<BentoListboxOptions>} items - Reference to the list of all available items in the dropdown\n * @param {selectAllCallback} selectAll - Callback function that alllows to select all the items when called\n * @param {unselectAllCallback} unselectAll - Callback function that alllows to select all the items when called\n * @returns {UseCheckboxSelectAll} Values to be set to the bento-checkbox value and indeterminate props, as well as functions to update them accordingly\n *\n */\nexport const useCheckboxSelectAll = (\n selectedItemsList: ComputedRef<BentoListboxMultiSelectValue>,\n items: ComputedRef<BentoListboxOptions>,\n selectAll: Fn,\n unselectAll: Fn\n) => {\n const isAllSelected = computed(\n () => !!selectedItemsList.value?.length && selectedItemsList.value?.length === items.value.length\n );\n const isIndeterminate = computed(() => {\n // eslint-disable-next-line eqeqeq\n if (selectedItemsList.value == undefined || selectedItemsList.value.length === 0) {\n return false;\n }\n\n return selectedItemsList.value?.length !== items.value.length;\n });\n\n const toggleSelectAll = (selectedValue: boolean) => {\n if (selectedValue) {\n selectAll();\n } else {\n unselectAll();\n }\n };\n\n return {\n isAllSelected,\n isIndeterminate,\n\n toggleSelectAll,\n };\n};\n","import { computed, onMounted, onUnmounted, Ref, ref, watch } from 'vue';\nimport type {\n UseVirtualListContainerProps,\n UseVirtualListOptions,\n UseVirtualListWrapperProps,\n} from './use-virtual-list.types';\nimport { observeSizeOfElement } from '../../utils/ts/resize';\n\n/**\n * Sets up a virtual scrolling functionality on a container element and a list of items to virtually scroll over.\n * This composables returns the containerProps and wrapperProps objects that should be v-binded onto the container and wrapper elements\n * of the list you wish to virtually scroll.\n *\n * This will return a filtered down list object the user can render based on how much the user has scrolled on the container.\n *\n * @usage\n * <template>\n * <div v-bind=\"containerProps\" @scroll=\"onScroll\">\n * <ul v-bind=\"wrapperProps\">\n * <li v-for=\"item in list\" :key=\"item.index\" style=\"height: 22px\">\n * {{ item.label }}\n * </li>\n * </ul>\n * </div>\n * </template>\n *\n * <script setup lang=\"ts\"\n * import { useVirtualList } from '@adyen/bento-vue2';\n *\n * const DEFAULT_OPTIONS: { label: string }[] = new Array(100)\n * .fill(0)\n * .map((_, index) => ({ label: `Option ${index + 1}` }));\n * const ITEMS = ref(DEFAULT_OPTIONS);\n * const ITEM_HEIGHT = 30;\n *\n * const { containerProps, wrapperProps, list, onScroll } = useVirtualList(ITEMS, { itemHeight: ITEM_HEIGHT });\n * </script>\n *\n *\n * @param items - a reference to a list of items to virtually scroll over.\n * @param options - customises how the Virtual scroller list functions.\n * @param options.itemHeight - the height in pixel or a function that returns the height in pixels for each item.\n * @param options.overscan - number of pre-rendered DOM nodes. Prevents whitespace between items if you scroll very quickly.\n * @param options.prefixHeight - the prefix height of elements present the scrollable area but not present in the items property.\n * @param options.disabled - if set to true, disables the virtual scrolling functionality.\n */\nexport function useVirtualList<T>(\n items: Ref<T[]>,\n { disabled, itemHeight, overscan = 5, prefixHeight }: UseVirtualListOptions\n) {\n const containerRef = ref<HTMLElement | null>(null);\n const list = ref<T[]>([]) as Ref<T[]>;\n const startIndex = ref(0);\n const endIndex = ref(0);\n const containerHeight = ref(0);\n let listObserver;\n\n const wrapperProps = computed<UseVirtualListWrapperProps>(() => {\n const totalHeight =\n typeof itemHeight === 'number'\n ? items.value.length * itemHeight\n : items.value.reduce((sum, _, index) => sum + itemHeight(index), 0);\n\n const offSetTop =\n typeof itemHeight === 'number'\n ? startIndex.value * itemHeight\n : items.value.slice(0, startIndex.value).reduce((sum, _, i) => sum + itemHeight(i), 0);\n\n return {\n style: {\n marginTop: `${offSetTop}px`,\n height: `${totalHeight - offSetTop}px`,\n },\n };\n });\n\n /**\n * Gets the offset for the first item to show within the visible area.\n * @returns offset number.\n */\n const getOffset = () => {\n const prefixHeightIfSet = prefixHeight?.value ?? 0;\n const scrollTop = Math.max(containerRef.value.scrollTop - prefixHeightIfSet, 0);\n if (typeof itemHeight === 'number') {\n return Math.floor(scrollTop / itemHeight);\n }\n\n let sum = 0;\n let offset = 0;\n\n for (let i = 0; i < items.value.length; i += 1) {\n const size = itemHeight(i);\n sum += size;\n if (sum >= scrollTop) {\n offset = i;\n break;\n }\n }\n return offset;\n };\n\n /**\n * Gets the visible number of items based on the container size and item heights.\n * @returns visible number of items.\n */\n const getVisibileNumberOfItems = () => {\n containerHeight.value = containerRef.value.clientHeight;\n if (typeof itemHeight === 'number') {\n return Math.ceil(containerHeight.value / itemHeight);\n }\n\n const start = startIndex.value ?? 0;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < items.value.length; i += 1) {\n const size = itemHeight(i);\n sum += size;\n capacity = i;\n if (sum > containerHeight.value) {\n break;\n }\n }\n return capacity - start;\n };\n\n const updateVisibleItems = () => {\n if (containerRef.value) {\n const visibleCount = getVisibileNumberOfItems();\n startIndex.value = getOffset();\n endIndex.value = Math.min(startIndex.value + visibleCount + overscan, items.value.length);\n list.value = items.value.slice(startIndex.value, endIndex.value);\n }\n };\n\n const onScroll = () => {\n updateVisibleItems();\n };\n\n if (!disabled) {\n onMounted(() => {\n if (containerRef.value) {\n containerHeight.value = containerRef.value.clientHeight;\n // When the listbox opens we need to update the height\n listObserver = observeSizeOfElement(containerRef.value, ({ clientHeight }) => {\n containerHeight.value = clientHeight;\n updateVisibleItems();\n });\n updateVisibleItems();\n }\n });\n\n onUnmounted(() => {\n listObserver?.disconnect();\n });\n\n watch(\n () => items.value,\n () => {\n updateVisibleItems();\n }\n );\n }\n\n const containerProps: UseVirtualListContainerProps = {\n ref: containerRef,\n style: { overflowY: 'auto' },\n };\n\n if (disabled) {\n return {\n containerRef,\n containerProps,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onScroll: () => {},\n list: items,\n };\n }\n\n return {\n containerRef,\n containerProps,\n onScroll,\n list,\n wrapperProps,\n };\n}\n","import { BentoSearchBarItem } from '@/components/search-bar';\nimport { BentoEmptyState } from '@/components/empty-state';\nimport { OmitStrict } from './omit-strict';\nimport { BentoButtonActionObject } from '@/components/button';\nimport { UseVirtualListItemHeight } from '@/composables/use-virtual-list';\n\nexport type BentoListboxValue = string | number;\n\nexport type BentoListboxMultiSelectValue = BentoListboxValue[];\n\nexport interface BentoListboxOptionItem extends BentoSearchBarItem {\n data?: unknown;\n description?: string;\n value: BentoListboxValue;\n items?: Array<BentoListboxOptionItem>; // Reference itself for multi-level options\n}\n\nexport type BentoListboxSelectedValue = BentoListboxValue | BentoListboxMultiSelectValue;\n\nexport type BentoListboxOptions = Array<BentoListboxOptionItem>;\n\nexport type BentoListboxIsOptionDisabled = undefined | ((optionValue: BentoListboxOptionItem) => boolean);\n\nexport enum BentoListboxEvent {\n SELECT = 'select',\n SHOW_MORE = 'show-more',\n ESCAPE = 'escape-pressed',\n CLICK = 'click',\n ENTER = 'enter-pressed',\n SPACE = 'space-pressed',\n TAB = 'tab-pressed',\n CLOSE_DROPDOWN = 'close-dropdown',\n}\n\n/**\n * @deprecated for usage with properties since version 2.0. Use the string literal instead.\n */\nexport enum BentoListboxLazyLoadType {\n AUTOMATIC = 'automatic',\n BUTTON = 'button',\n NONE = 'none',\n}\n\nexport interface BentoListboxSearchOptions {\n /**\n * Custom debounce time. Default: 300\n */\n debounceTime?: number;\n\n /**\n * The event that triggers upon user filtering the listbox items.\n */\n searchEvent: (searchValue: string) => void;\n}\n\nexport type BentoListboxEmptyStateProps = { action: { icon?: any } & BentoButtonActionObject } & OmitStrict<\n InstanceType<typeof BentoEmptyState>['$props'],\n 'variant' | 'image' | 'description'\n>;\n\nexport type BentoListboxVirtulisationOptions = boolean | { itemHeight: UseVirtualListItemHeight };\n","<template>\n <div class=\"b-listbox-single-select-category\">\n <bento-typography variant=\"caption\" el=\"span\" class=\"b-listbox-single-select-category__label-text\">\n {{ categoryLabel }}\n </bento-typography>\n <div>\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent } from 'vue';\n import { BentoTypography } from '@/components/typography';\n\n export default defineComponent({\n name: 'bento-listbox-static-category',\n components: {\n BentoTypography,\n },\n props: {\n /**\n * Category label text\n */\n categoryLabel: {\n type: String,\n required: true,\n },\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-single-select-category.scss\" />\n","<template>\n <label\n class=\"b-listbox-option\"\n role=\"option\"\n :class=\"conditionalClasses\"\n v-bind=\"$attrs\"\n @click=\"onClick\"\n @keydown.enter=\"onOptionSelected(BentoListboxEvent.ENTER, $event)\"\n @keydown.space=\"onOptionSelected(BentoListboxEvent.SPACE, $event)\"\n @keydown.tab=\"onOptionSelected(BentoListboxEvent.TAB, $event)\"\n >\n <slot></slot>\n </label>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import { BentoKeyboardNavigationKeyDownEvent, BentoListboxEvent } from '@/types';\n\n /**\n * listbox option wrapper.\n * Contains only styles and allows the Multi-Select and Single-Select DRY the styles.\n *\n * Options and Attributes are inherited (`inheritAttrs: true`)\n *\n * @example\n * <bento-listbox-option\n * ...props\n * ...attrs\n * />\n */\n export default defineComponent({\n name: 'bento-listbox-option',\n props: {\n /**\n * Setting this property to true will disable the option.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Indicates if the value is selected. Only one element can be selected at a time.\n */\n selected: { type: Boolean, default: false },\n },\n emits: [BentoListboxEvent.CLICK, BentoListboxEvent.ENTER, BentoListboxEvent.SPACE, BentoListboxEvent.TAB],\n setup(props, { emit }) {\n const conditionalClasses = computed(() => ({\n 'b-listbox-option--disabled': props.disabled,\n 'b-listbox-option--selected': props.selected,\n }));\n\n const onClick = (e: Event) => {\n emit(BentoListboxEvent.CLICK, e);\n };\n\n const onOptionSelected = (eventName, e: Event) => {\n emit(eventName, e);\n };\n\n return {\n // Enums\n BentoKeyboardNavigationKeyDownEvent,\n BentoListboxEvent,\n\n // Values\n conditionalClasses,\n\n // Events\n onClick,\n onOptionSelected,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-option.scss\" />\n","<template>\n <bento-listbox-option\n class=\"b-listbox-single-select-option\"\n :disabled=\"disabled\"\n :selected=\"selected\"\n :aria-selected=\"ariaSelected\"\n :aria-disabled=\"ariaDisabled\"\n :tabindex=\"tabIndex\"\n @click=\"onOptionSelected(BentoListboxEvent.SELECT)\"\n @[BentoListboxEvent.ENTER]=\"onOptionSelected(BentoListboxEvent.ENTER)\"\n @[BentoListboxEvent.SPACE]=\"onOptionSelected(BentoListboxEvent.SPACE)\"\n @[BentoListboxEvent.TAB]=\"onOptionSelected(BentoListboxEvent.TAB)\"\n >\n <slot v-bind=\"option\">\n <span class=\"b-listbox-single-select-option__text\">\n <bento-typography el=\"span\">{{ option.label }}</bento-typography>\n <bento-typography\n v-if=\"option.description\"\n class=\"b-listbox-single-select-option__description\"\n el=\"span\"\n >\n {{ option.description }}\n </bento-typography>\n </span>\n </slot>\n <span class=\"b-listbox-single-select-option__check-icon\">\n <checkmark-icon v-show=\"selected\" svg-title=\"selected\" />\n </span>\n </bento-listbox-option>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoTypography } from '@/components/typography';\n import { BentoListboxOption } from '../listbox-option';\n import { BentoListboxEvent, BentoListboxOptionItem } from '@/types';\n import CheckmarkIcon from '@adyen/ui-assets-icons-16/vue/checkmark';\n\n /**\n * Listbox option element.\n *\n * @example\n * <bento-listbox-single-select-option\n * v-for=\"option in options\"\n * :key=\"option.value\"\n * :option=\"option\"\n * :selected=\"option.selected\"\n * @select=\"onOptionSelected\"\n * />\n */\n export default defineComponent({\n name: 'bento-listbox-single-select-option',\n components: {\n BentoListboxOption,\n BentoTypography,\n CheckmarkIcon,\n },\n props: {\n /**\n * Setting this property to true will disable the option.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * The option item that contains all the option item's data.\n * @type {BentoListboxOptionItem}\n */\n option: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n\n /**\n * Indicates if the value is selected. Only one element can be selected at a time.\n */\n selected: { type: Boolean, default: false },\n },\n emits: [BentoListboxEvent.ENTER, BentoListboxEvent.SELECT, BentoListboxEvent.SPACE, BentoListboxEvent.TAB],\n setup(props, { emit }) {\n const onOptionSelected = eventName => {\n if (props.disabled) {\n return;\n }\n\n /**\n * Trigerred when an option is clicked or selected via keyboard navigation.\n * Indicates which option was selected.\n *\n * @event {string} - The corresponding event\n * @property {number} selectedValue - Selected option's value\n */\n emit(eventName, props.option.value);\n };\n\n const ariaDisabled = computed(() => (props.disabled ? true : null));\n const ariaSelected = computed(() => (props.selected ? true : null));\n const tabIndex = computed(() => (props.disabled ? -1 : 0));\n\n return {\n // Values\n ariaDisabled,\n ariaSelected,\n tabIndex,\n\n // Enums\n BentoListboxEvent,\n\n // Events\n onOptionSelected,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-single-select-option.scss\" />\n","import { computed, onMounted, ref } from 'vue';\n\nconst enum ListboxKeyboardNavigationMutationDirection {\n INCREASE = 'increase',\n DECREASE = 'decrease',\n}\n\nexport const useListboxKeyboardNavigation = ({ items, isOptionDisabled }, focusItem) => {\n const numberOfItems = computed(() => items.value.length - 1);\n const focusedIndex = ref(0);\n\n onMounted(() => {\n if (isOptionDisabled) {\n focusedIndex.value = items.value.findIndex(el => !isOptionDisabled(el));\n }\n });\n\n const isItemDisabled = (itemIndex: number) =>\n !isOptionDisabled || (!!isOptionDisabled && isOptionDisabled(items.value[itemIndex]));\n\n const isItemEnabled = (itemIndex: number) =>\n !isOptionDisabled || (!!isOptionDisabled && !isOptionDisabled(items.value[itemIndex]));\n\n const mutateFocusedIndex = (direction: ListboxKeyboardNavigationMutationDirection) => {\n switch (direction) {\n case ListboxKeyboardNavigationMutationDirection.INCREASE:\n focusedIndex.value += 1;\n break;\n case ListboxKeyboardNavigationMutationDirection.DECREASE:\n focusedIndex.value -= 1;\n break;\n default:\n break;\n }\n };\n\n const calculateFocusedIndex = ({ edgeCaseItem, isItemBeforeEdgeCaseItem }, callback, direction) => {\n const isEdgeCaseItem = focusedIndex.value === edgeCaseItem;\n if (isEdgeCaseItem) {\n return;\n }\n if (isItemBeforeEdgeCaseItem) {\n if (isItemEnabled(edgeCaseItem)) {\n mutateFocusedIndex(direction);\n }\n } else {\n mutateFocusedIndex(direction);\n if (isItemDisabled(focusedIndex.value)) {\n callback();\n }\n }\n focusItem(focusedIndex.value);\n };\n\n const moveToNextElement = () => {\n const isIndexSecondToLastItemInArray = focusedIndex.value === numberOfItems.value - 2;\n calculateFocusedIndex(\n {\n isItemBeforeEdgeCaseItem: isIndexSecondToLastItemInArray,\n edgeCaseItem: numberOfItems.value,\n },\n moveToNextElement,\n ListboxKeyboardNavigationMutationDirection.INCREASE\n );\n };\n\n const moveToPreviousElement = () => {\n const IsIndexSecondItemInArray = focusedIndex.value === 1;\n calculateFocusedIndex(\n {\n edgeCaseItem: 0,\n isItemBeforeEdgeCaseItem: IsIndexSecondItemInArray,\n },\n moveToPreviousElement,\n ListboxKeyboardNavigationMutationDirection.DECREASE\n );\n };\n\n const moveToFirstElement = () => {\n focusedIndex.value = 0;\n if (isItemDisabled(focusedIndex.value)) {\n moveToNextElement();\n } else {\n focusItem(focusedIndex.value);\n }\n };\n\n const moveToLastElement = () => {\n focusedIndex.value = numberOfItems.value;\n if (isItemDisabled(focusedIndex.value)) {\n moveToPreviousElement();\n } else {\n focusItem(focusedIndex.value);\n }\n };\n\n return {\n moveToFirstElement,\n moveToLastElement,\n moveToNextElement,\n moveToPreviousElement,\n };\n};\n","<template>\n <div v-bento-keyboard-navigation-directive v-on=\"listboxListeners\">\n <template v-if=\"hasCategories && staticCategories\">\n <bento-listbox-single-select-category\n v-for=\"category in items\"\n :key=\"category.value\"\n :category-label=\"category.label\"\n role=\"group\"\n >\n <bento-listbox-single-select-option\n v-for=\"option in category.items\"\n :key=\"option.value\"\n ref=\"listboxItemRef\"\n role=\"option\"\n :option=\"option\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :selected=\"option.value === selectedValue\"\n v-on=\"listboxOptionListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-single-select-option>\n </bento-listbox-single-select-category>\n </template>\n <template v-else>\n <bento-listbox-single-select-option\n v-for=\"option in items\"\n :key=\"option.value\"\n ref=\"listboxItemRef\"\n role=\"option\"\n :option=\"option\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :selected=\"option.value === selectedValue\"\n v-on=\"listboxOptionListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-single-select-option>\n </template>\n </div>\n</template>\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef } from 'vue';\n import { BentoListboxSingleSelectCategory } from './components/listbox-single-select-category';\n import { BentoListboxSingleSelectOption } from '../listbox-single-select-option';\n import { useListboxKeyboardNavigation } from '../../composables/useListboxKeyboardNavigation';\n import {\n BentoKeyboardNavigationKeyDownEvent,\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n } from '@/types';\n import { BentoKeyboardNavigationDirective } from '@/directives';\n\n /**\n * Listbox single-select options list\n *\n * @example\n * import { BentoListboxMultiSelect } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoListboxMultiSelect },\n * template: `\n * <bento-listbox-multi-select\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :selected-values=\"['option-1']\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-listbox-single-select',\n components: {\n BentoListboxSingleSelectCategory,\n BentoListboxSingleSelectOption,\n },\n directives: { BentoKeyboardNavigationDirective },\n inheritAttrs: false,\n props: {\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: () => false,\n },\n\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\n * @property {string} value.label - Text to be displayed in the option\n * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\n /**\n * The `input` value.\n * Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected\n */\n selectedValue: {\n type: [String, Number] as PropType<BentoListboxSelectedValue>,\n default: undefined,\n },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n },\n emits: [BentoListboxEvent.SELECT, BentoListboxEvent.ENTER, BentoListboxEvent.SPACE, BentoListboxEvent.TAB],\n setup(props, { emit, slots }) {\n const listboxItemRef = ref([]);\n\n /**\n * Finds out if items have sub items\n */\n const hasCategories = computed(() => !!props.items.find(({ items }) => !!items));\n\n const onOptionSelected = eventName => (selectedValue: BentoListboxSelectedValue) => {\n emit(eventName, selectedValue);\n };\n\n const focusItem = (nextFocusedItemIndex: number) => listboxItemRef.value[nextFocusedItemIndex].$el.focus();\n\n // Keyboard navigation\n const { moveToNextElement, moveToPreviousElement, moveToFirstElement, moveToLastElement } =\n useListboxKeyboardNavigation(\n {\n items: toRef(props, 'items'),\n isOptionDisabled: props.isOptionDisabled,\n },\n focusItem\n );\n\n const listboxListeners = {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: moveToPreviousElement,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: moveToNextElement,\n [BentoKeyboardNavigationKeyDownEvent.HOME]: moveToFirstElement,\n [BentoKeyboardNavigationKeyDownEvent.END]: moveToLastElement,\n };\n\n const listboxOptionListeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected(BentoListboxEvent.SELECT),\n [BentoListboxEvent.SPACE]: onOptionSelected(BentoListboxEvent.SPACE),\n [BentoListboxEvent.TAB]: onOptionSelected(BentoListboxEvent.TAB),\n [BentoListboxEvent.ENTER]: onOptionSelected(BentoListboxEvent.ENTER),\n };\n\n return {\n // Enums\n BentoListboxEvent,\n\n // Values\n listboxItemRef,\n slots,\n\n // Computed\n hasCategories,\n\n // Methods\n onOptionSelected,\n\n // Keyboard navigation\n listboxListeners,\n listboxOptionListeners,\n };\n },\n });\n</script>\n","export enum ListboxMultiSelectCategoryClass {\n DISABLED = 'disabled',\n STATIC_CATEGORY = 'static-category',\n}\n\nexport enum ListboxMultiSelectCategoryEvent {\n SELECT_CATEGORY = 'select-category',\n UNSELECT_CATEGORY = 'unselect-category',\n}\n","<template>\n <div>\n <bento-listbox-option class=\"b-listbox-multi-select-category__option\" :class=\"conditionalClass\">\n <bento-checkbox\n v-if=\"!isStaticCategory\"\n :model-value=\"isAllSelected\"\n :indeterminate=\"isIndeterminate\"\n :disabled=\"hasAllPropsDisabled\"\n :aria-label=\"category.label\"\n :value=\"category.value\"\n @update:model-value=\"toggleSelectAll\"\n />\n <span class=\"b-listbox-multi-select-category__label\">\n <bento-typography v-bind=\"categoryLabelProps\" class=\"b-listbox-multi-select-category__label-text\">\n {{ category.label }}\n </bento-typography>\n <div\n v-if=\"!isStaticCategory\"\n class=\"b-listbox-multi-select-category__label-chevron\"\n data-testid=\"toggle-listbox\"\n @click.capture=\"toggleOpen\"\n >\n <chevron-up-icon v-if=\"isOpen\" :svg-title=\"chevronTitle\" />\n <chevron-down-icon v-else :svg-title=\"chevronTitle\" />\n </div>\n </span>\n </bento-listbox-option>\n\n <div v-show=\"showItemChildren\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef } from 'vue';\n import { BentoCheckbox } from '@/components/checkbox';\n import { BentoTypography } from '@/components/typography';\n import { BentoListboxOption } from '../../../../../listbox-option';\n import {\n BentoListboxIsOptionDisabled,\n BentoListboxMultiSelectValue,\n BentoListboxOptionItem,\n BentoListboxValue,\n } from '@/types';\n import { useCheckboxSelectAll } from '@/composables';\n import {\n ListboxMultiSelectCategoryClass,\n ListboxMultiSelectCategoryEvent,\n } from './listbox-multi-select-category.types';\n import { useI18n } from '@/utils/ts/i18n';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n import messages from './messages.json';\n\n /**\n * Listbox multi-select category list.\n * Allows the rendering of nested lists\n *\n * @example\n * import { ListboxMultiSelectCategory } from '@/internal/listbox';\n *\n * export default {\n * components: { BentoListboxMultiSelectCategory },\n * template: `\n * <listbox-multi-select-category\n * :category=\"option\"\n * :is-option-disabled=\"true\"\n * :selected-items-list=\"['option-1']\"\n * @select-category=\"$emit('select-category', option)\"\n * @unselect-category=\"$emit('unselect-category', option)\"\n * >\n * <listbox-multi-select-options\n * category-items\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :is-multi-level=\"true\"\n * :selected-items-list=\"['option-']\"\n * :searching=\"false\"\n * @toggle-checkbox-selection=\"value => toggleCheckboxSelection(value)\"\n * />\n * </listbox-multi-select-category>\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-listbox-multi-select-category',\n components: {\n BentoCheckbox,\n BentoTypography,\n BentoListboxOption,\n ChevronDownIcon,\n ChevronUpIcon,\n },\n props: {\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\n * @property {string} value.label - Text to be displayed in the option\n * @property {string,number} value.value - Value of the option\n * @property {BentoListboxOptionItem} value.items - Category items list\n */\n category: {\n type: Object as PropType<BentoListboxOptionItem>,\n required: true,\n },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: [Function] as PropType<BentoListboxIsOptionDisabled>,\n default: () => false,\n },\n\n /**\n * The `input` value.\n * Providing an empty array will select no options.\n */\n selectedItemsList: {\n type: Array as PropType<BentoListboxValue[]>,\n default: () => [],\n },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n },\n emits: [ListboxMultiSelectCategoryEvent.SELECT_CATEGORY, ListboxMultiSelectCategoryEvent.UNSELECT_CATEGORY],\n setup(props, { emit }) {\n const isOpen = ref(false);\n const { t } = useI18n();\n\n // This method should be used to determine if an option is disabled as it works for both vue 2 & 3.\n const vue2Vue3FixedisOptionDisabled = option =>\n props.isOptionDisabled ? props.isOptionDisabled(option) : false;\n\n const hasAllPropsDisabled = computed(() =>\n props.category.items.every(option => vue2Vue3FixedisOptionDisabled(option))\n );\n\n const isStaticCategory = toRef(props, 'staticCategories');\n\n // Display item children if is open state or if static categories is enabled\n const showItemChildren = computed(() => isOpen.value || props.staticCategories);\n\n const conditionalClass = computed(() => ({\n [`b-listbox-multi-select-category--${ListboxMultiSelectCategoryClass.DISABLED}`]:\n hasAllPropsDisabled.value,\n [`b-listbox-multi-select-category--${ListboxMultiSelectCategoryClass.STATIC_CATEGORY}`]:\n props.staticCategories,\n }));\n\n const toggleOpen = (event: Event) => {\n event.preventDefault();\n isOpen.value = !isOpen.value;\n };\n\n const optionStates = (option: BentoListboxOptionItem) => {\n const isDisabled = vue2Vue3FixedisOptionDisabled(option);\n const isPreSelected =\n (props.selectedItemsList as BentoListboxMultiSelectValue)?.includes(option.value) || false;\n return { isDisabled, isPreSelected };\n };\n\n const enabledItems = computed(() =>\n props.category.items.filter(option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return (isDisabled && isPreSelected) || !isDisabled;\n })\n );\n\n const visibleSelectedList = computed(\n () =>\n enabledItems.value?.filter(({ value }) =>\n props.selectedItemsList?.includes(value)\n ) as unknown as BentoListboxMultiSelectValue\n );\n\n const chevronTitle = computed(() => {\n const messageName = isOpen.value ? 'categoryOpened' : 'categoryClosed';\n return t(messageName, { category: props.category.label }) as string;\n });\n\n const categoryLabelProps = computed(\n () =>\n ({\n el: 'span',\n variant: props.staticCategories ? 'caption' : 'body',\n } as InstanceType<typeof BentoTypography>['$props'])\n );\n\n const selectAll = () => {\n emit(ListboxMultiSelectCategoryEvent.SELECT_CATEGORY);\n };\n const unselectAll = () => {\n emit(ListboxMultiSelectCategoryEvent.UNSELECT_CATEGORY);\n };\n\n const { isAllSelected, isIndeterminate, toggleSelectAll } = useCheckboxSelectAll(\n visibleSelectedList,\n enabledItems,\n selectAll,\n unselectAll\n );\n\n return {\n // Values\n chevronTitle,\n conditionalClass,\n hasAllPropsDisabled,\n isOpen,\n isAllSelected,\n isIndeterminate,\n isStaticCategory,\n\n // Computed\n showItemChildren,\n categoryLabelProps,\n\n // Methods\n toggleOpen,\n toggleSelectAll,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select-category.scss\" />\n","export enum ListboxMultiSelectOptionsEvent {\n SELECT_CATEGORY = 'select-category',\n TOGGLE_CHECKBOX_SELECTION = 'toggle-checkbox-selection',\n UNSELECT_CATEGORY = 'unselect-category',\n}\n","<template>\n <div>\n <div v-for=\"option in items\" :key=\"`selected-${option.value}`\">\n <template v-if=\"searching && isMultiLevel\">\n <bento-listbox-option\n class=\"b-listbox-multi-select-options\"\n :class=\"conditionalClasses\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n >\n <bento-checkbox\n :model-value=\"isOptionSelected(option)\"\n :aria-label=\"option.label\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :value=\"option.value\"\n @update:model-value=\"value => selectSearch(value, option)\"\n />\n <slot v-bind=\"option\">\n <span class=\"b-listbox-multi-select__option-text\">\n <bento-typography el=\"span\">{{ option.label }}</bento-typography>\n <bento-typography\n v-if=\"shouldShowDescription(option)\"\n class=\"b-listbox-multi-select__option-description\"\n el=\"span\"\n >\n {{ option.description }}\n </bento-typography>\n </span>\n </slot>\n </bento-listbox-option>\n </template>\n\n <template v-else>\n <!-- Category -->\n <template v-if=\"option.items\">\n <listbox-multi-select-category\n :category=\"option\"\n :static-categories=\"staticCategories\"\n :is-option-disabled=\"isOptionDisabled\"\n :selected-items-list=\"selectedItemsList\"\n @select-category=\"$emit(ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, option)\"\n @unselect-category=\"$emit(ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, option)\"\n >\n <listbox-multi-select-options\n category-items\n :items=\"option.items\"\n :is-option-disabled=\"isOptionDisabled\"\n :is-multi-level=\"isMultiLevel\"\n :static-categories=\"staticCategories\"\n :selected-items-list=\"selectedItemsList\"\n :searching=\"searching\"\n @toggle-checkbox-selection=\"value => toggleCheckboxSelection(value)\"\n />\n </listbox-multi-select-category>\n </template>\n\n <!-- Option -->\n <bento-listbox-option\n v-else\n class=\"b-listbox-multi-select-options\"\n :class=\"conditionalClasses\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n >\n <bento-checkbox\n :model-value=\"selectedItemsList\"\n :aria-label=\"option.label\"\n :disabled=\"isOptionDisabled ? isOptionDisabled(option) : null\"\n :value=\"option.value\"\n @update:model-value=\"toggleCheckboxSelection(option.value)\"\n />\n <slot v-bind=\"option\">\n <span class=\"b-listbox-multi-select__option-text\">\n <bento-typography el=\"span\">{{ option.label }}</bento-typography>\n <bento-typography\n v-if=\"shouldShowDescription(option)\"\n class=\"b-listbox-multi-select__option-description\"\n el=\"span\"\n >\n {{ option.description }}\n </bento-typography>\n </span>\n </slot>\n </bento-listbox-option>\n </template>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType } from 'vue';\n import { BentoCheckbox } from '@/components/checkbox';\n import { BentoListboxOption } from '../../../listbox-option';\n import { BentoTypography } from '@/components/typography';\n import { ListboxMultiSelectCategory } from './components/listbox-multi-select-category';\n import {\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxOptionItem,\n BentoListboxOptions,\n BentoListboxValue,\n } from '@/types';\n import { ListboxMultiSelectOptionsEvent } from './listbox-multi-select-options.types';\n\n /**\n * Listbox multi-select options list\n *\n * @example\n * import { ListboxMultiSelectOptions } from './components/listbox-multi-select-options';\n *\n * export default {\n * components: { ListboxMultiSelect },\n * template: `\n * <listbox-multi-select\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :selected-values=\"['option-1']\"\n * />\n * `\n * }\n */\n export default defineComponent({\n name: 'listbox-multi-select-options',\n components: {\n BentoCheckbox,\n BentoListboxOption,\n BentoTypography,\n ListboxMultiSelectCategory,\n },\n props: {\n /**\n * Indicates if the items listed are inside a category\n * so they can be padded to right by one level in recursion.\n * Items of categories are automatically defined as \"categoryItems\"\n */\n categoryItems: { type: Boolean, default: false },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: () => false,\n },\n\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\n * @property {string} value.label - Text to be displayed in the option\n * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\n /**\n * Indicates if the elements options are inside a multi-level category\n */\n isMultiLevel: { type: Boolean, default: false },\n\n /**\n * Flag that indicates that an external search it's being made\n * to filter out the items inside the the multi-select listbox\n *\n * If enabled, hides the \"Select all\" checkbox in \"multiple\" mode.\n */\n searching: { type: Boolean, default: false },\n\n /**\n * List of selected items.\n * Providing an empty array will select no options.\n */\n selectedItemsList: {\n type: Array as PropType<BentoListboxValue[]>,\n default: () => [],\n },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n },\n emits: [\n ListboxMultiSelectOptionsEvent.TOGGLE_CHECKBOX_SELECTION,\n ListboxMultiSelectOptionsEvent.SELECT_CATEGORY,\n ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY,\n ],\n setup(props, { emit }) {\n const toggleCheckboxSelection = (value: BentoListboxValue) => {\n emit(ListboxMultiSelectOptionsEvent.TOGGLE_CHECKBOX_SELECTION, value);\n };\n\n const isCategory = (option: BentoListboxOptionItem) => !!option.items;\n const shouldShowDescription = (option: BentoListboxOptionItem) => {\n const isSearchingMultiLevel = props.isMultiLevel && props.searching;\n\n return option.description && (!props.isMultiLevel || isSearchingMultiLevel);\n };\n\n const isOptionSelected = option => {\n if (option.items) {\n return !!option.items.find(item => props.selectedItemsList.includes(item.value));\n }\n return props.selectedItemsList.includes(option.value);\n };\n\n // eslint-disable-next-line consistent-return\n const selectSearch = (selectedValue, option) => {\n if (isCategory(option)) {\n return selectedValue\n ? emit(ListboxMultiSelectOptionsEvent.SELECT_CATEGORY, option)\n : emit(ListboxMultiSelectOptionsEvent.UNSELECT_CATEGORY, option);\n }\n\n toggleCheckboxSelection(option.value);\n };\n\n const conditionalClasses = computed(() => ({\n 'b-listbox-multi-select-options__static-category-option': props.staticCategories,\n 'b-listbox-multi-select-options__category-option': props.categoryItems,\n }));\n\n return {\n // Values\n conditionalClasses,\n\n // Methods\n isCategory,\n isOptionSelected,\n shouldShowDescription,\n toggleCheckboxSelection,\n selectSearch,\n\n // Enums\n BentoListboxEvent,\n ListboxMultiSelectOptionsEvent,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select-options.scss\" />\n","import { BentoListboxOptions } from '@/types/listbox';\nimport { computed, Ref } from 'vue';\n\n/**\n * Checks if items array is flat or has multi levels and converts items into a flat array if needed\n *\n * It receives a layout of type @see BentoLayoutGroupProportions to\n * generate the class and apply it to the children of the @see BentoFormLayoutGroup component\n *\n * @param {Ref<BentoListboxOptions>} itemsList - ref of the list of items for the listbox\n * @returns {ComputedRef<boolean>} isMultiLevelSelect - Indicates if items array is multi level\n * @returns {ComputedRef<any[]>} flattenedItemsList - list of items computed into a flat array\n */\nexport const useMultiLevelItems = (itemsList: Ref<BentoListboxOptions>) => {\n const isMultiLevelSelect = computed(() => !!itemsList.value?.find(({ items }) => !!items));\n\n const flattenedItemsList = computed(() => {\n if (isMultiLevelSelect.value) {\n return itemsList.value?.reduce((acc, val) => {\n if (val.items) {\n acc.push(...val.items.flat());\n } else {\n acc.push(val);\n }\n return acc;\n }, []);\n }\n\n return itemsList.value;\n });\n\n return {\n isMultiLevelSelect,\n flattenedItemsList,\n };\n};\n","<template>\n <div v-bento-keyboard-navigation-directive class=\"b-listbox-multi-select\" v-on=\"listboxListeners\">\n <!-- Select all -->\n <bento-listbox-option ref=\"selectAllListboxItemsRef\" class=\"b-listbox-multi-select__option\">\n <bento-checkbox\n :aria-label=\"selectAllCheckboxText\"\n :model-value=\"isAllSelected\"\n :indeterminate=\"isIndeterminate\"\n @update:model-value=\"toggleSelectAll\"\n />\n <bento-typography el=\"span\">\n {{ selectAllCheckboxText }}\n </bento-typography>\n </bento-listbox-option>\n\n <!-- Selected options -->\n <div v-if=\"isAnOptionSelected\">\n <hr class=\"b-listbox-multi-select__divider\" />\n\n <listbox-multi-select-options\n ref=\"selectedListboxItemsRef\"\n :items=\"selectedOptions\"\n :is-option-disabled=\"isOptionDisabled\"\n :is-multi-level=\"isMultiLevelSelect\"\n :static-categories=\"staticCategories\"\n :searching=\"searching\"\n :selected-items-list=\"selectedItemsList\"\n @select-category=\"selectAllCategory\"\n @unselect-category=\"unselectAllCategory\"\n @toggle-checkbox-selection=\"toggleCheckboxSelection(BentoListboxEvent.SELECT, $event)\"\n @[BentoListboxEvent.SPACE]=\"toggleCheckboxSelection(BentoListboxEvent.SPACE, $event)\"\n @[BentoListboxEvent.TAB]=\"toggleCheckboxSelection(BentoListboxEvent.TAB, $event)\"\n @[BentoListboxEvent.ENTER]=\"toggleCheckboxSelection(BentoListboxEvent.ENTER, $event)\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </listbox-multi-select-options>\n </div>\n\n <!-- Available options -->\n <div v-show=\"!isAllItemsIncludingDisabled\">\n <hr class=\"b-listbox-multi-select__divider\" />\n\n <listbox-multi-select-options\n ref=\"listboxItemsRef\"\n :items=\"items\"\n :is-option-disabled=\"isOptionDisabled\"\n :is-multi-level=\"isMultiLevelSelect\"\n :static-categories=\"staticCategories\"\n :searching=\"searching\"\n :selected-items-list=\"selectedItemsList\"\n @toggle-checkbox-selection=\"toggleCheckboxSelection(BentoListboxEvent.SELECT, $event)\"\n @select-category=\"selectAllCategory\"\n @unselect-category=\"unselectAllCategory\"\n @[BentoListboxEvent.SPACE]=\"toggleCheckboxSelection(BentoListboxEvent.SPACE, $event)\"\n @[BentoListboxEvent.TAB]=\"toggleCheckboxSelection(BentoListboxEvent.TAB, $event)\"\n @[BentoListboxEvent.ENTER]=\"toggleCheckboxSelection(BentoListboxEvent.ENTER, $event)\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </listbox-multi-select-options>\n </div>\n </div>\n</template>\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef, watch } from 'vue';\n import { BentoCheckbox } from '@/components/checkbox';\n import { BentoListboxOption } from '../listbox-option';\n import { BentoTypography } from '@/components/typography';\n import { useCheckboxSelectAll } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import {\n BentoKeyboardNavigationKeyDownEvent,\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxMultiSelectValue,\n BentoListboxOptionItem,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n BentoListboxValue,\n } from '@/types';\n import { BentoKeyboardNavigationDirective } from '@/directives';\n import { ListboxMultiSelectOptions } from './components/listbox-multi-select-options';\n\n import messages from './messages.json';\n import { useListboxKeyboardNavigation } from '../../composables/useListboxKeyboardNavigation';\n import { useMultiLevelItems } from '../../composables/use-multi-level-items/use-multi-level-items';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Listbox multi-select options list\n *\n * @example\n * import { BentoListboxMultiSelect } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoListboxMultiSelect },\n * template: `\n * <bento-listbox-multi-select\n * :items=\"[{ label: 'Option 1', value: 'option-1' }]\"\n * :selected-values=\"['option-1']\"\n * />\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-listbox-multi-select',\n components: {\n BentoCheckbox,\n BentoListboxOption,\n BentoTypography,\n ListboxMultiSelectOptions,\n },\n directives: { BentoKeyboardNavigationDirective },\n props: {\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - listbox option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: () => false,\n },\n\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }.\n *\n * @property {string} value.label - Text to be displayed in the option\n * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\n /**\n * Flag that indicates that an external search it's being made\n * to filter out the items inside the the multi-select listbox\n *\n * If enabled, hides the \"Select all\" checkbox in \"multiple\" mode.\n */\n searching: { type: Boolean, default: false },\n\n /**\n * The `input` value.\n * Providing an empty array will select no options.\n */\n selectedValues: {\n type: Array as PropType<BentoListboxSelectedValue>,\n default: () => [] as BentoListboxSelectedValue,\n },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n },\n emits: [BentoListboxEvent.SELECT],\n setup(props, { emit, slots }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const selectAllListboxItemsRef = ref(null);\n const selectedListboxItemsRef = ref(null);\n const listboxItemsRef = ref(null);\n\n const selectedItemsList = ref();\n watch(\n () => props.selectedValues,\n () => {\n selectedItemsList.value = ([...((props.selectedValues as Array<unknown>) ?? [])] ||\n []) as BentoListboxMultiSelectValue;\n },\n {\n immediate: true,\n }\n );\n\n const { isMultiLevelSelect, flattenedItemsList } = useMultiLevelItems(toRef(props, 'items'));\n\n const optionStates = (option: BentoListboxOptionItem) => {\n const isDisabled = props.isOptionDisabled(option);\n const isPreSelected =\n (selectedItemsList.value as BentoListboxMultiSelectValue)?.includes(option.value) || false;\n return { isDisabled, isPreSelected };\n };\n\n // Items that are not disabled and pre-selected disabled items\n const enabledItems = computed(() =>\n props.searching && isMultiLevelSelect\n ? props.items\n : flattenedItemsList.value.filter(option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return (isDisabled && isPreSelected) || !isDisabled;\n })\n );\n\n const visibleSelectedList = computed(\n () =>\n enabledItems.value?.filter(option => {\n if (option.items && isMultiLevelSelect.value && props.searching) {\n const amountOfSelectedCategoryOptions = option.items.filter(categoryOption =>\n ((props.selectedValues as Array<BentoListboxSelectedValue>) ?? []).includes(\n categoryOption.value\n )\n ).length;\n return amountOfSelectedCategoryOptions === option.items.length;\n }\n\n return selectedItemsList.value?.includes(option.value); // Check for category\n }) as BentoListboxMultiSelectValue\n );\n\n const calculateTotalItems = () => {\n if (isMultiLevelSelect.value && !props.searching) {\n return flattenedItemsList.value.length;\n }\n\n return props.items.length;\n };\n\n const selectAllCheckboxText = computed(() => {\n const possibleSelections = enabledItems.value.length;\n const total = calculateTotalItems();\n const amountSelectedValues = visibleSelectedList.value?.length || 0;\n\n if (amountSelectedValues === 0) {\n return t('selectAll', { total: possibleSelections });\n }\n\n return amountSelectedValues === total\n ? t('allSelected', { total })\n : t('numberOfTotalSelected', { number: amountSelectedValues, total });\n });\n\n const selectAll = (selectableItems: BentoListboxOptions) => {\n const filterOutDisabledAndNotPreselectedOptions = option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return (isDisabled && isPreSelected) || !isDisabled;\n };\n\n // Adding or removing this list of values\n const addOrRemoveList = selectableItems\n .filter(filterOutDisabledAndNotPreselectedOptions)\n .filter(item => !selectedItemsList.value.includes(item.value)) // MAKE SURE NOT TO ADD DUPLICATES\n .map(({ value }) => value);\n\n selectedItemsList.value = [...selectedItemsList.value, ...addOrRemoveList];\n emit(BentoListboxEvent.SELECT, selectedItemsList.value);\n };\n\n const unselectAll = (selectableItems: BentoListboxOptions) => {\n const findEnabledUnselectedItems = option => {\n const { isDisabled, isPreSelected } = optionStates(option);\n return !(isDisabled && isPreSelected);\n };\n\n const unselectedItemsList = selectableItems\n .filter(findEnabledUnselectedItems)\n .map(({ value }) => value);\n selectedItemsList.value = selectedItemsList.value.filter(item => !unselectedItemsList?.includes(item));\n emit(BentoListboxEvent.SELECT, selectedItemsList.value);\n };\n\n const selectAllItems = () => {\n selectAll(flattenedItemsList.value);\n };\n\n const unselectAllItems = () => {\n unselectAll(flattenedItemsList.value);\n };\n\n const { isAllSelected, isIndeterminate, toggleSelectAll } = useCheckboxSelectAll(\n visibleSelectedList,\n enabledItems,\n selectAllItems,\n unselectAllItems\n );\n\n const selectAllCategory = (category: BentoListboxOptionItem) => {\n selectAll(category.items);\n };\n\n const unselectAllCategory = (category: BentoListboxOptionItem) => {\n unselectAll(category.items);\n };\n\n const toggleCheckboxSelection = (eventName, value: BentoListboxValue) => {\n let exists = false;\n selectedItemsList.value = selectedItemsList.value.filter(option => {\n if (value === option) {\n exists = true;\n return false;\n }\n\n return true;\n });\n\n if (!exists) {\n selectedItemsList.value.push(value);\n }\n emit(eventName, selectedItemsList.value);\n };\n\n const selectedOptions = computed(() => {\n const isOptionSelected = option =>\n (selectedItemsList.value as unknown as Array<string | number>).includes(option.value);\n\n const categoryOptionsSelected = categoryOptions =>\n !!categoryOptions.find(option => isOptionSelected(option));\n\n if (isMultiLevelSelect.value && props.staticCategories) {\n const nestedOptions = props.items.flatMap(({ items }) => items.filter(isOptionSelected));\n\n return nestedOptions;\n }\n\n const options = props.items.filter(option => {\n // Check selected categories category\n if (option.items && categoryOptionsSelected(option.items)) {\n return true;\n }\n\n return isOptionSelected(option);\n });\n\n return options;\n });\n\n const isAnOptionSelected = computed(() => selectedOptions.value?.length > 0);\n\n const isAllItemsIncludingDisabled = computed(\n () => visibleSelectedList.value?.length === flattenedItemsList.value?.length\n );\n\n const computedSelectAllListboxItemsRefs = computed(() =>\n selectAllListboxItemsRef.value ? [selectAllListboxItemsRef.value] : []\n );\n\n // Keyboard navigation\n const computedselectedListboxItemsRefs = computed(() =>\n selectedListboxItemsRef.value?.$children?.length ? selectedListboxItemsRef.value.$children : []\n );\n\n const computedlistboxItems = computed(() =>\n listboxItemsRef.value?.$children?.length ? listboxItemsRef.value.$children : []\n );\n\n const computedselectAllItemRefs = computed(() => ({ label: selectAllCheckboxText, value: isAllSelected }));\n\n const computedItems = computed(() => [\n computedselectAllItemRefs,\n ...selectedOptions.value,\n ...flattenedItemsList.value,\n ]);\n\n const focusItem = (nextFocusedItemIndex: number) => {\n const multiSelectListboxItems = [\n ...computedSelectAllListboxItemsRefs.value,\n ...computedselectedListboxItemsRefs.value,\n ...computedlistboxItems.value,\n ];\n multiSelectListboxItems[nextFocusedItemIndex].$el.focus();\n };\n\n const { moveToNextElement, moveToPreviousElement, moveToFirstElement, moveToLastElement } =\n useListboxKeyboardNavigation(\n {\n items: ref(computedItems),\n isOptionDisabled: props.isOptionDisabled,\n },\n focusItem\n );\n\n const listboxListeners = {\n [BentoKeyboardNavigationKeyDownEvent.ARROW_UP]: moveToPreviousElement,\n [BentoKeyboardNavigationKeyDownEvent.ARROW_DOWN]: moveToNextElement,\n [BentoKeyboardNavigationKeyDownEvent.HOME]: moveToFirstElement,\n [BentoKeyboardNavigationKeyDownEvent.END]: moveToLastElement,\n };\n\n return {\n // Refs\n selectAllListboxItemsRef,\n selectedListboxItemsRef,\n listboxItemsRef,\n\n // Values\n isAllSelected,\n isAllItemsIncludingDisabled,\n isAnOptionSelected,\n isIndeterminate,\n isMultiLevelSelect,\n flattenedItemsList,\n selectedItemsList,\n selectAllCheckboxText,\n selectedOptions,\n slots,\n\n // Enums\n BentoListboxEvent,\n\n // Methods\n selectAllCategory,\n toggleCheckboxSelection,\n toggleSelectAll,\n unselectAllCategory,\n\n // Events\n listboxListeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox-multi-select.scss\" />\n","<template>\n <div\n :id=\"id\"\n v-bento-keyboard-navigation-directive\n v-bind=\"containerProps\"\n class=\"b-listbox\"\n role=\"listbox\"\n tabindex=\"-1\"\n :aria-busy=\"ariaBusy\"\n :aria-atomic=\"ariaAtomic\"\n :aria-label=\"ariaLabel\"\n :aria-live=\"ariaLive\"\n @scroll=\"onListboxContainerScroll\"\n >\n <div v-bind=\"wrapperProps\">\n <!-- Empty search message -->\n <div v-if=\"isSearchResultEmpty\" class=\"b-listbox__empty-search-message\">\n <bento-empty-state v-if=\"emptyState\" v-bind=\"limitedEmptyStateProps\" />\n <bento-typography v-else el=\"span\">{{ noResultsMessage }}</bento-typography>\n </div>\n\n <template v-else>\n <!-- Multi select -->\n <template v-if=\"multiple\">\n <bento-listbox-multi-select\n ref=\"listboxItemRef\"\n :items=\"items\"\n :static-categories=\"staticCategories\"\n :selected-values=\"selectedValue\"\n :searching=\"searching\"\n :is-option-disabled=\"isOptionDisabled\"\n v-on=\"listboxListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-multi-select>\n </template>\n\n <!-- Single select -->\n <template v-else>\n <bento-listbox-single-select\n ref=\"listboxItemRef\"\n :items=\"virtualisedItems\"\n :selected-value=\"selectedValue\"\n :static-categories=\"staticCategories\"\n :is-option-disabled=\"isOptionDisabled\"\n v-on=\"listboxListeners\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox-single-select>\n </template>\n <div v-if=\"shouldDisplayShowMoreButton\" class=\"b-listbox__lazy-load\">\n <bento-loading-button :state=\"loadingButtonState\" variant=\"secondary\" @click.capture=\"emitShowMore\">\n {{ showMoreButtonText }}\n </bento-loading-button>\n </div>\n <div v-else-if=\"loading\" class=\"b-listbox__lazy-load\">\n <bento-loading-indicator />\n </div>\n </template>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, PropType, ref, toRef } from 'vue';\n import {\n BentoKeyboardNavigationKeyDownEvent,\n BentoListboxEmptyStateProps,\n BentoListboxEvent,\n BentoListboxIsOptionDisabled,\n BentoListboxLazyLoadType,\n BentoListboxOptionItem,\n BentoListboxOptions,\n BentoListboxSelectedValue,\n BentoListboxVirtulisationOptions,\n } from '@/types';\n import { BentoKeyboardNavigationDirective } from '@/directives';\n import { BentoListboxSingleSelect } from './components/listbox-single-select';\n import { BentoListboxMultiSelect } from './components/listbox-multi-select';\n import { BentoTypography } from '@/components/typography';\n import { BentoLoadingIndicator } from '@/components/loading-indicator';\n import { BentoLoadingButton, BentoLoadingButtonState } from '@/components/button';\n import { BentoEmptyState } from '@/components/empty-state';\n import { useI18n } from '@/utils/ts/i18n';\n import { debounce } from '@/utils/ts/debounce';\n import { useVirtualList } from '@/composables/use-virtual-list';\n import type { HTMLAttributes } from 'vue/types/jsx';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const DEFAULT_DROPDOWN_ITEM_HEIGHT = 36;\n\n /**\n * Listbox container.\n * It lists all the available options.\n *\n * @example\n * <bento-listbox\n * v-slot=\"{label, value}\"\n * :id=\"listboxOptionsContainerId\"\n * :aria-label=\"ariaLabel\"\n * :disabled=\"disabled\"\n * :multiple=\"multiple\"\n * :selected=\"value\"\n * :isOptionDisabled=\"option => option.value === 2\"\n * :items=\"[{\n * { label: 'Option 1', value: 1 },\n * { label: 'Option 2', value: 2 },\n * }]\"\n * @select=\"onOptionSelected\"\n * >\n * </bento-listbox>\n */\n export default defineComponent({\n name: 'bento-listbox',\n components: {\n BentoEmptyState,\n BentoListboxSingleSelect,\n BentoListboxMultiSelect,\n BentoTypography,\n BentoLoadingIndicator,\n BentoLoadingButton,\n },\n directives: { BentoKeyboardNavigationDirective },\n i18n: { messages },\n props: {\n /**\n * Defines a string value that labels an interactive element.\n */\n ariaLabel: { type: String, default: null },\n\n /**\n * Empty state props that will be used with the inner empty state component to be displayed when no search results are found.\n */\n emptyState: {\n type: Object as PropType<BentoListboxEmptyStateProps>,\n default: undefined,\n },\n\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: { type: Boolean, default: false },\n\n /**\n * Identifies the listbox whose contents are controlled by the the combobox on which the aria-controls attribute is set.\n */\n id: { type: String, required: true },\n\n /**\n * Function that allows the options to be disabled\n *\n * @type {BentoListboxIsOptionDisabled}\n * @param {BentoListboxOptionItem} option - Listbox option object\n * @param {string} option.label - Option's label text\n * @param {string|number} option.value - Option's value\n * @param {unknown} option.data - Option's extra data to be passed to the default slot\n */\n isOptionDisabled: {\n type: Function as PropType<BentoListboxIsOptionDisabled>,\n default: () => undefined,\n },\n\n /**\n * The option elements to populate the listbox with.\n * It must be an array of {@see BentoListboxOptionItem }\n * * @property {string} value.label - Text to be displayed in the option\n * * @property {string,number} value.value - Value of the option\n */\n items: {\n type: Array as PropType<BentoListboxOptions>,\n required: true,\n },\n\n /**\n * Indicates if new options are loading.\n */\n loading: { type: Boolean, default: false },\n\n /**\n * The type of `Lazy Load`.\n * Type \"automatic\" will enable infinite scrolling\n * Type \"button\" will enable lazy loading with \"Show more\" button\n */\n lazyLoadType: {\n type: String as PropType<BentoListboxLazyLoadType | `${BentoListboxLazyLoadType}`>,\n default: BentoListboxLazyLoadType.NONE,\n validator: (value: BentoListboxLazyLoadType) => Object.values(BentoListboxLazyLoadType).includes(value),\n },\n\n /**\n * If enabled, the user will be able to select multiple items.\n */\n multiple: { type: Boolean, default: false },\n\n /**\n * If enabled, dropdown will display non-selectable, static categories\n */\n staticCategories: { type: Boolean, default: false },\n\n /**\n * Messaged displayed when no items are listed in the listbox\n */\n noResultsMessage: { type: String, required: true },\n\n /**\n * Flag that indicates that an external search it's being made\n * to filter out the items inside the the multi-select listbox\n *\n * If enabled, hides the \"Select all\" checkbox in \"multiple\" mode.\n */\n searching: BentoListboxMultiSelect.props.searching,\n\n /**\n * The `input` value.\n * Providing an empty string or empty array will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected for single select\n */\n selectedValue: {\n type: [String, Number, Array] as PropType<BentoListboxSelectedValue>,\n default: undefined,\n },\n\n /**\n * Enables virtual scrolling if set to true or by providing an object with itemHeight function.\n * The itemHeight function is used to calculate the height of rendered item given it's index.\n */\n virtualScroll: {\n type: [Boolean, Object] as PropType<BentoListboxVirtulisationOptions>,\n default: false,\n },\n },\n emits: [\n BentoListboxEvent.SELECT,\n BentoListboxEvent.SPACE,\n BentoListboxEvent.SHOW_MORE,\n BentoListboxEvent.ENTER,\n BentoListboxEvent.ESCAPE,\n BentoListboxEvent.TAB,\n ],\n setup(props, { emit, slots }) {\n const listboxItemRef = ref([]);\n const items = toRef(props, 'items');\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const isLazyLoadListbox = computed(() => props.lazyLoadType !== BentoListboxLazyLoadType.AUTOMATIC);\n const hasAutomaticLazyLoader = computed(() => props.lazyLoadType === BentoListboxLazyLoadType.AUTOMATIC);\n\n // Virtual scrolling\n const virtualScrollItemHeight = () => {\n if (typeof props?.virtualScroll === 'object' && props?.virtualScroll?.itemHeight) {\n return props.virtualScroll.itemHeight;\n }\n return DEFAULT_DROPDOWN_ITEM_HEIGHT;\n };\n const {\n containerRef: listboxRef,\n containerProps,\n onScroll: onContainerScroll,\n list: virtualisedItems,\n wrapperProps,\n } = useVirtualList<BentoListboxOptionItem>(items, {\n itemHeight: virtualScrollItemHeight(),\n // Disable virtual scrolling if not enabled or if lazy loading is enabled or if multi-select\n disabled: props?.multiple || props?.virtualScroll === false || props?.lazyLoadType !== 'none',\n });\n\n // Aria a11y\n const ariaAtomic = computed<HTMLAttributes['aria-atomic']>(() =>\n isLazyLoadListbox.value ? 'true' : undefined\n );\n const ariaBusy = computed<HTMLAttributes['aria-busy']>(() =>\n isLazyLoadListbox.value && props.loading ? 'true' : 'false'\n );\n const ariaLive = computed<HTMLAttributes['aria-live']>(() =>\n isLazyLoadListbox.value ? 'polite' : undefined\n );\n\n const onOptionSelected = eventName => (selectedValue: BentoListboxSelectedValue) => {\n emit(eventName, selectedValue);\n };\n\n const emitShowMore = () => {\n emit(BentoListboxEvent.SHOW_MORE);\n };\n\n const emitShowMoreOnScrollEnd = debounce(() => {\n const container = listboxRef.value;\n\n if (!container) {\n return;\n }\n\n const isAtBottom = Math.round(container.scrollTop) + container.clientHeight >= container.scrollHeight;\n\n if (props.hasMoreItems && isAtBottom && !props.loading) {\n emitShowMore();\n }\n });\n\n const onListboxContainerScroll = () => {\n if (hasAutomaticLazyLoader.value) {\n emitShowMoreOnScrollEnd();\n } else {\n onContainerScroll();\n }\n };\n\n const isSearchResultEmpty = computed(() => props.searching && props.items?.length === 0);\n\n const shouldDisplayShowMoreButton = computed(\n () => props.lazyLoadType === BentoListboxLazyLoadType.BUTTON && props.hasMoreItems\n );\n\n const loadingButtonState = computed(() =>\n props.loading ? BentoLoadingButtonState.LOADING : BentoLoadingButtonState.START\n );\n\n const showMoreButtonText = computed(() => (props.loading ? t('loading') : t('showMore')));\n\n const limitedEmptyStateProps = computed<InstanceType<typeof BentoEmptyState>['$props']>(() => ({\n ...props.emptyState,\n variant: 'condensed',\n }));\n\n const listboxListeners = {\n [BentoListboxEvent.SELECT]: onOptionSelected(BentoListboxEvent.SELECT),\n [BentoListboxEvent.SPACE]: onOptionSelected(BentoListboxEvent.SPACE),\n [BentoListboxEvent.TAB]: onOptionSelected(BentoListboxEvent.TAB),\n [BentoListboxEvent.ENTER]: onOptionSelected(BentoListboxEvent.ENTER),\n };\n\n return {\n // Refs\n listboxRef,\n listboxItemRef,\n\n // a11y\n ariaAtomic,\n ariaBusy,\n ariaLive,\n\n // Values\n containerProps,\n isSearchResultEmpty,\n limitedEmptyStateProps,\n loadingButtonState,\n slots,\n shouldDisplayShowMoreButton,\n showMoreButtonText,\n virtualisedItems,\n wrapperProps,\n\n // Enums\n BentoKeyboardNavigationKeyDownEvent,\n BentoListboxEvent,\n\n // Methods\n onListboxContainerScroll,\n onOptionSelected,\n emitShowMore,\n listboxListeners,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./listbox.scss\" />\n"],"names":["useCheckboxSelectAll","selectedItemsList","items","selectAll","unselectAll","isAllSelected","computed","_a","_b","isIndeterminate","selectedValue","useVirtualList","disabled","itemHeight","overscan","prefixHeight","containerRef","ref","list","startIndex","endIndex","containerHeight","listObserver","wrapperProps","totalHeight","sum","index","offSetTop","i","getOffset","prefixHeightIfSet","scrollTop","offset","size","getVisibileNumberOfItems","start","capacity","updateVisibleItems","visibleCount","onScroll","onMounted","observeSizeOfElement","clientHeight","onUnmounted","watch","containerProps","BentoListboxEvent","BentoListboxEvent2","BentoListboxLazyLoadType","BentoListboxLazyLoadType2","_sfc_main$7","defineComponent","BentoTypography","_sfc_main$6","props","emit","conditionalClasses","BentoKeyboardNavigationKeyDownEvent","e","eventName","_sfc_main$5","BentoListboxOption","CheckmarkIcon","onOptionSelected","ariaDisabled","ariaSelected","tabIndex","useListboxKeyboardNavigation","isOptionDisabled","focusItem","numberOfItems","focusedIndex","el","isItemDisabled","itemIndex","isItemEnabled","mutateFocusedIndex","direction","calculateFocusedIndex","edgeCaseItem","isItemBeforeEdgeCaseItem","callback","moveToNextElement","isIndexSecondToLastItemInArray","moveToPreviousElement","IsIndexSecondItemInArray","_sfc_main$4","BentoListboxSingleSelectCategory","BentoListboxSingleSelectOption","BentoKeyboardNavigationDirective","slots","listboxItemRef","hasCategories","nextFocusedItemIndex","moveToFirstElement","moveToLastElement","toRef","listboxListeners","listboxOptionListeners","ListboxMultiSelectCategoryClass","ListboxMultiSelectCategoryClass2","ListboxMultiSelectCategoryEvent","ListboxMultiSelectCategoryEvent2","_sfc_main$3","messages$2","BentoCheckbox","ChevronDownIcon","ChevronUpIcon","isOpen","t","useI18n","vue2Vue3FixedisOptionDisabled","option","hasAllPropsDisabled","isStaticCategory","showItemChildren","conditionalClass","toggleOpen","event","optionStates","isDisabled","isPreSelected","enabledItems","visibleSelectedList","value","chevronTitle","messageName","categoryLabelProps","toggleSelectAll","ListboxMultiSelectOptionsEvent","ListboxMultiSelectOptionsEvent2","_sfc_main$2","ListboxMultiSelectCategory","toggleCheckboxSelection","isCategory","shouldShowDescription","isSearchingMultiLevel","isOptionSelected","item","selectSearch","useMultiLevelItems","itemsList","isMultiLevelSelect","flattenedItemsList","acc","val","_sfc_main$1","messages$1","ListboxMultiSelectOptions","selectAllListboxItemsRef","selectedListboxItemsRef","listboxItemsRef","categoryOption","calculateTotalItems","selectAllCheckboxText","possibleSelections","total","amountSelectedValues","selectableItems","filterOutDisabledAndNotPreselectedOptions","addOrRemoveList","findEnabledUnselectedItems","unselectedItemsList","selectAllItems","unselectAllItems","selectAllCategory","category","unselectAllCategory","exists","selectedOptions","categoryOptionsSelected","categoryOptions","isAnOptionSelected","isAllItemsIncludingDisabled","computedSelectAllListboxItemsRefs","computedselectedListboxItemsRefs","computedlistboxItems","computedselectAllItemRefs","computedItems","DEFAULT_DROPDOWN_ITEM_HEIGHT","_sfc_main","BentoEmptyState","BentoListboxSingleSelect","BentoListboxMultiSelect","BentoLoadingIndicator","BentoLoadingButton","messages","isLazyLoadListbox","hasAutomaticLazyLoader","virtualScrollItemHeight","listboxRef","onContainerScroll","virtualisedItems","ariaAtomic","ariaBusy","ariaLive","emitShowMore","emitShowMoreOnScrollEnd","debounce","container","isAtBottom","onListboxContainerScroll","isSearchResultEmpty","shouldDisplayShowMoreButton","loadingButtonState","BentoLoadingButtonState","showMoreButtonText","limitedEmptyStateProps"],"mappings":";;;;;;;;;;;;;;;AA8CO,MAAAA,KAAA,CAAAC,GAAAC,GAAAC,GAAAC,MAAA;AAMH,QAAAC,IAAAC;AAAA,IAAsB,MAAA;;AAAA,cAAA,GAAAC,IAAAN,EAAA,UAAA,QAAAM,EAAA,aAAAC,IAAAP,EAAA,UAAA,gBAAAO,EAAA,YAAAN,EAAA,MAAA;AAAA;AAAA,EACyE,GAE/FO,IAAAH,EAAA,MAAA;;AAEI,WAAAL,EAAA,SAAA,QAAAA,EAAA,MAAA,WAAA,IACI,OAGJM,IAAAN,EAAA,UAAA,gBAAAM,EAAA,YAAAL,EAAA,MAAA;AAAA,EAAuD,CAAA;AAW3D,SAAA;AAAA,IAAO,eAAAG;AAAA,IACH,iBAAAI;AAAA,IACA,iBAVJ,CAAAC,MAAA;AACI,MAAAA,IACIP,EAAA,IAEAC,EAAA;AAAA,IACJ;AAAA,EAOA;AAER;AChCgB,SAAAO,GAAAT,GAAA,EAAA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