@adyen/bento-vue2 2.0.0 → 2.0.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.
Files changed (52) hide show
  1. package/dist/accordion.js +1 -1
  2. package/dist/assets/accordion-item.css +1 -1
  3. package/dist/assets/action-bar.css +1 -1
  4. package/dist/assets/base-modal.css +1 -1
  5. package/dist/assets/button-actions.css +1 -1
  6. package/dist/assets/card.css +1 -1
  7. package/dist/assets/data-grid.css +1 -1
  8. package/dist/assets/dialog-page.css +1 -1
  9. package/dist/assets/file-uploader.css +1 -1
  10. package/dist/assets/inspector.css +1 -1
  11. package/dist/assets/modal-fullscreen.css +1 -1
  12. package/dist/assets/navigation-menu-group.css +1 -1
  13. package/dist/assets/secondary-nav.css +1 -1
  14. package/dist/assets/sidepanel.css +1 -1
  15. package/dist/card.js +1 -1
  16. package/dist/checkbox.js +2 -2
  17. package/dist/chunks/{accordion-item.DOj7vqeL.js → accordion-item.B7lteJBu.js} +2 -2
  18. package/dist/chunks/{accordion-item.DOj7vqeL.js.map → accordion-item.B7lteJBu.js.map} +1 -1
  19. package/dist/chunks/{card.b9PEJ7hm.js → card.BmpB0VbL.js} +2 -2
  20. package/dist/chunks/{card.b9PEJ7hm.js.map → card.BmpB0VbL.js.map} +1 -1
  21. package/dist/chunks/{checkbox-group.UYN1ljai.js → checkbox-group.D1uyc3z3.js} +2 -2
  22. package/dist/chunks/{checkbox-group.UYN1ljai.js.map → checkbox-group.D1uyc3z3.js.map} +1 -1
  23. package/dist/chunks/{checkbox.Co4HoHKF.js → checkbox.D5xZ5Nnh.js} +14 -14
  24. package/dist/chunks/{checkbox.Co4HoHKF.js.map → checkbox.D5xZ5Nnh.js.map} +1 -1
  25. package/dist/chunks/{data-grid.B1lI07ze.js → data-grid.CMxQpfrY.js} +4 -4
  26. package/dist/chunks/{data-grid.B1lI07ze.js.map → data-grid.CMxQpfrY.js.map} +1 -1
  27. package/dist/chunks/{filter-bar.DXpLhnxG.js → filter-bar.D7Lk7wlq.js} +2 -2
  28. package/dist/chunks/{filter-bar.DXpLhnxG.js.map → filter-bar.D7Lk7wlq.js.map} +1 -1
  29. package/dist/chunks/{header-with-views.HwbE278X.js → header-with-views.BqobE7IF.js} +2 -2
  30. package/dist/chunks/{header-with-views.HwbE278X.js.map → header-with-views.BqobE7IF.js.map} +1 -1
  31. package/dist/chunks/{navigation-menu-group.B-AV49Bn.js → navigation-menu-group.BnHdXODQ.js} +2 -2
  32. package/dist/chunks/{navigation-menu-group.B-AV49Bn.js.map → navigation-menu-group.BnHdXODQ.js.map} +1 -1
  33. package/dist/chunks/{rich-text-editor.DNmVJilP.js → rich-text-editor.rXoS7KGY.js} +2 -2
  34. package/dist/chunks/{rich-text-editor.DNmVJilP.js.map → rich-text-editor.rXoS7KGY.js.map} +1 -1
  35. package/dist/chunks/{secondary-nav.CXtDQAay.js → secondary-nav.CgdV0QwZ.js} +2 -2
  36. package/dist/chunks/{secondary-nav.CXtDQAay.js.map → secondary-nav.CgdV0QwZ.js.map} +1 -1
  37. package/dist/chunks/{selection-card-group.DjFWMqVZ.js → selection-card-group.CmDuj1c7.js} +8 -8
  38. package/dist/chunks/{selection-card-group.DjFWMqVZ.js.map → selection-card-group.CmDuj1c7.js.map} +1 -1
  39. package/dist/chunks/use-expandable-content-height.DmFeas9-.js +36 -0
  40. package/dist/chunks/use-expandable-content-height.DmFeas9-.js.map +1 -0
  41. package/dist/data-grid.js +1 -1
  42. package/dist/filter-bar.js +1 -1
  43. package/dist/header-with-views.js +1 -1
  44. package/dist/index.js +11 -11
  45. package/dist/navigation-menu.js +1 -1
  46. package/dist/rich-text-editor.js +1 -1
  47. package/dist/secondary-nav.js +1 -1
  48. package/dist/selection-card.js +1 -1
  49. package/dist/web-types.json +1 -1
  50. package/package.json +6 -6
  51. package/dist/chunks/use-expandable-content-height.Bdd9hQwq.js +0 -34
  52. package/dist/chunks/use-expandable-content-height.Bdd9hQwq.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"filter-bar.DXpLhnxG.js","sources":["../../src/composables/use-bento-base-filter/utils/utils.ts","../../src/composables/use-bento-base-filter/use-bento-base-filter.ts","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isDate.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isValid.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getDayOfYear.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/addLeadingZeros.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/lightFormatters.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/formatters.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/format.js","../../src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue","../../src/components/filter-bar/components/filter-bar-button-group/filter-bar-button-group.vue","../../src/components/filter-bar/components/base-filter/base-filter.internal.types.ts","../../src/components/filter-bar/components/base-filter/base-filter.vue","../../src/components/filter-bar/components/base-filter/composables/use-base-filter.ts","../../src/components/filter-bar/components/input-filter/input-filter.vue","../../src/components/filter-bar/filter-bar.types.ts","../../src/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.vue","../../src/components/filter-bar/components/date-filter/date-filter.vue","../../src/components/filter-bar/components/date-range-filter/date-range-filter.vue","../../src/components/filter-bar/components/radio-group-filter/radio-group-filter.vue","../../src/components/filter-bar/components/select-filter/components/select-filter-button/select-filter-button.vue","../../src/components/filter-bar/components/select-filter/components/select-filter-dropdown/select-filter-dropdown.vue","../../src/components/filter-bar/components/select-filter/select-filter.props.ts","../../src/components/filter-bar/components/select-filter/select-filter.vue","../../src/components/filter-bar/components/select-filter/variants/select-avatar-filter/select-avatar-filter.vue","../../src/components/filter-bar/components/select-filter/variants/select-currency-filter/select-currency-filter.vue","../../src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue","../../src/components/filter-bar/components/select-filter/variants/select-payment-method-filter/select-payment-method-filter.vue","../../src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue","../../src/components/filter-bar/components/toggle-filter/toggle-filter.vue","../../src/components/filter-bar/components/boolean-filter/boolean-filter.vue","../../src/composables/use-numeric-input/use-numeric-input.ts","../../src/components/filter-bar/components/range-filter/range-filter.vue","../../src/components/filter-bar/components/checkbox-group-filter/checkbox-group-filter.vue","../../src/components/filter-bar/composables/use-container-size-options-layout/use-container-size-options-layout.ts","../../src/components/filter-bar/components/all-filters-modal/all-filters-modal.types.ts","../../src/components/filter-bar/components/base-filter-button/base-filter-button.vue","../../src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-button/all-filters-modal-button.vue","../../src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-filter-selection/all-filters-modal-filter-selection.vue","../../src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-selected-filter/all-filters-modal-selected-filter.vue","../../../ui-assets/icons-16/dist/vue/sliders-1.vue","../../src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue","../../src/components/filter-bar/filter-bar.vue"],"sourcesContent":["/**\n * Checks if a value is a plain object.\n *\n * @param value The value to check.\n * @returns Whether the value is a plain object.\n */\nexport const isPlainObject = (value: unknown) => {\n if (value === null || typeof value !== 'object') {\n return false;\n }\n\n return Object.prototype.toString.call(value) === '[object Object]';\n};\n\n/**\n * Checks if a value is an array.\n *\n * @param value The value to check.\n * @returns Whether the value is an array.\n */\nexport const isArray = <T>(value: T) => Array.isArray(value);\n\n/**\n * Checks if a value is empty.\n * If the value is an array, it checks if the array is empty or if all elements are empty strings.\n * If the value is not an array, it checks if the value is falsy.\n *\n * @param value The value to check.\n * @returns Whether the value is empty.\n */\nexport const isValueEmpty = <T>(value: T) =>\n isArray(value) ? (value as []).length === 0 || (value as Array<T>).every(el => el === '') : !value;\n\n/**\n * Checks if two objects are deeply equal by comparing their JSON string representations.\n *\n * @param first The first value.\n * @param second The second value.\n * @returns Whether the values are equal.\n */\nexport const isEqual = <T>(first: T, second: T) => JSON.stringify(first) === JSON.stringify(second);\n\n/**\n * Creates a deep copy of a value.\n * Recursively copies an object or array to return the original value.\n * Otherwise, it returns the value as is.\n *\n * @param value The value to copy.\n * @returns The deep copied value or the original value if it's not a plain object or array.\n */\nexport const deepCopy = <T>(value: T) => {\n if (!isPlainObject(value)) {\n return value;\n }\n\n // If it's a Date, make a copy\n if (value instanceof Date) {\n return new Date(value.getTime()) as T;\n }\n\n // If it's an array, map over it and deep copy each item\n if (isArray(value)) {\n return value.map(item => deepCopy(item)) as T;\n }\n\n // If it's an object, iterate over its keys and deep copy each value\n return Object.keys(value).reduce((acc, key) => {\n acc[key] = deepCopy(value[key]);\n return acc;\n }, {});\n};\n\n/**\n * Copies the structure of a plain object, setting all values to `undefined`.\n * If the value is not a plain object, it returns `undefined`.\n *\n * @param value The object whose structure to copy.\n * @returns An object with the same keys as the input object but with all values set to `undefined`, or `undefined` if the input is not a plain object.\n */\nexport const copyStructure = <T>(value: T) =>\n isPlainObject(value) ? Object.fromEntries(Object.keys(value).map(key => [key, undefined])) : undefined;\n","import { computed, onMounted, ref, watch } from 'vue';\nimport type { Ref } from 'vue';\nimport { copyStructure, deepCopy, isEqual, isValueEmpty } from './utils';\n\n/**\n * A composable to wire the `bento-base-filter` component for the mandatory fields and events.\n *\n * @usage\n * ```vue\n * <template>\n * <bento-base-filter\n * :disable-apply-button=\"isApplyButtonDisabled\"\n * :disable-secondary-button=\"isSecondaryButtonDisabled\"\n * @ apply=\"updateFilter\"\n * @ clear=\"clearFilter(updateFilter)\"\n * @ open=\"openFilter\"\n * @ reset=\"resetFilter(updateFilter)\"\n * >\n * <!-- CONTENT HERE -->\n * </bento-base-filter>\n * </template>\n * <script>\n * import { ref } from 'vue'\n * import { useBentoBaseFilter, BentoBaseFilter, BentoBaseFilterProps } from '@adyen/bento-vue2'\n *\n * type CustomFilterValue = boolean\n * const props = defineProps<BentoBaseFilterProps<CustomFilterValue>>();\n *\n * const {\n * // Values\n * internalFilterValue,\n * isSecondaryButtonDisabled,\n * isApplyButtonDisabled,\n *\n * // Methods\n * clearFilter,\n * resetFilter,\n * openFilter,\n * } = useBentoBaseFilter<CustomFilterValue>(toRef(props, 'value'), toRef(props, 'defaultValue'));\n * </script>\n * ```\n *\n * @param appliedFilter The currently applied filter value.\n * @param defaultFilter The default filter value (if available).\n * @returns An object containing refs and functions:\n * - `internalFilterValue`: The temporary state of the filter before it's applied.\n * - `isSecondaryButtonDisabled`: `true` if the secondary (clear/reset) button should be disabled.\n * - `isApplyButtonDisabled`: `true` if the apply button should be disabled.\n * - `clearFilter`: Clears the filter to its initial or default state.\n * - `resetFilter`: Resets the filter to its default state.\n * - `openFilter`: Syncs the internal state with the applied filter.\n */\nexport function useBentoBaseFilter<T>(appliedFilter: Ref<T>, defaultFilter: Ref<T>) {\n /**\n * Handles the internal value. Kept in sync when the new value is applied\n */\n const internalFilterValue = ref<T>();\n const initialStructureOrValue = ref<T>();\n\n onMounted(() => {\n /**\n * Copy initial structure as long as the value is not \"undefined\"\n */\n if (appliedFilter.value != null) {\n initialStructureOrValue.value = copyStructure<T>(appliedFilter.value) as T;\n }\n });\n\n watch(\n () => appliedFilter.value,\n newValue => {\n internalFilterValue.value = deepCopy<T>(newValue);\n },\n { immediate: true }\n );\n\n /**\n * Indicates if the filter has a value applied (active).\n * - inactive (`true`): `appliedFilter` is empty (`undefined`) or all of its properties are empty for object values\n */\n const isFilterInactive = computed(\n () => isValueEmpty(appliedFilter.value) || isEqual<T>(appliedFilter.value, initialStructureOrValue.value)\n );\n\n /**\n * Indicates if the secondary (clear/reset) button should be disabled.\n * - disabled (`true`): No filter value is applied or `appliedFilter` value is the same as the `defaultFilter` (persistent) value\n */\n const isSecondaryButtonDisabled = computed(() =>\n defaultFilter.value != null ? isEqual<T>(defaultFilter.value, appliedFilter.value) : isFilterInactive.value\n );\n\n const isApplyButtonDisabled = computed(() => {\n const isValueUnchanged = isEqual<T>(internalFilterValue.value, appliedFilter.value);\n return isValueUnchanged || (isValueEmpty(internalFilterValue.value) && isFilterInactive.value);\n });\n\n /**\n * Clears the non-persistent filters (not used in persistent filters).\n *\n * Receives a callback to execute additional tasks required when clearing a filter\n *\n * - `object`: Sets all properties to `undefined`\n * - non-`object`: Sets to `undefined`\n * @param callback Function to be called when clearing a filter\n */\n function clearFilter(callback?: (newValue: T) => void) {\n internalFilterValue.value = deepCopy<T>(initialStructureOrValue.value);\n if (callback) {\n callback(internalFilterValue.value);\n }\n }\n\n /**\n * Resets the persistent filters (not used in non-persistent filters).\n * Sets the `internalFilterValue`\n *\n * Receives a callback to execute additional tasks required when resetting a filter.\n * @param callback Function to be called when resetting a filter\n */\n function resetFilter(callback?: (newValue: T) => void) {\n internalFilterValue.value = deepCopy<T>(defaultFilter.value);\n if (callback) {\n callback(internalFilterValue.value);\n }\n }\n\n /**\n * Sets the value to what is applied when opening a filter.\n * @param callback Function to be called when opening a filter\n */\n function openFilter(callback?: (newValue: T) => void) {\n // Reset value every time it opens\n internalFilterValue.value = deepCopy<T>(appliedFilter.value);\n if (callback) {\n callback(internalFilterValue.value);\n }\n }\n\n return {\n // Values\n internalFilterValue,\n isSecondaryButtonDisabled,\n isApplyButtonDisabled,\n\n // Methods\n clearFilter,\n resetFilter,\n openFilter,\n };\n}\n","/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n return (\n value instanceof Date ||\n (typeof value === \"object\" &&\n Object.prototype.toString.call(value) === \"[object Date]\")\n );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n","import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const diff = differenceInCalendarDays(_date, startOfYear(_date));\n const dayOfYear = diff + 1;\n return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n","export function addLeadingZeros(number, targetLength) {\n const sign = number < 0 ? \"-\" : \"\";\n const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n return sign + output;\n}\n","import { addLeadingZeros } from \"../addLeadingZeros.js\";\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n // Year\n y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n },\n\n // Month\n M(date, token) {\n const month = date.getMonth();\n return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n\n // Day of the month\n d(date, token) {\n return addLeadingZeros(date.getDate(), token.length);\n },\n\n // AM or PM\n a(date, token) {\n const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return dayPeriodEnumValue.toUpperCase();\n case \"aaa\":\n return dayPeriodEnumValue;\n case \"aaaaa\":\n return dayPeriodEnumValue[0];\n case \"aaaa\":\n default:\n return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n }\n },\n\n // Hour [1-12]\n h(date, token) {\n return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n },\n\n // Hour [0-23]\n H(date, token) {\n return addLeadingZeros(date.getHours(), token.length);\n },\n\n // Minute\n m(date, token) {\n return addLeadingZeros(date.getMinutes(), token.length);\n },\n\n // Second\n s(date, token) {\n return addLeadingZeros(date.getSeconds(), token.length);\n },\n\n // Fraction of second\n S(date, token) {\n const numberOfDigits = token.length;\n const milliseconds = date.getMilliseconds();\n const fractionalSeconds = Math.trunc(\n milliseconds * Math.pow(10, numberOfDigits - 3),\n );\n return addLeadingZeros(fractionalSeconds, token.length);\n },\n};\n","import { getDayOfYear } from \"../../getDayOfYear.js\";\nimport { getISOWeek } from \"../../getISOWeek.js\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.js\";\nimport { getWeek } from \"../../getWeek.js\";\nimport { getWeekYear } from \"../../getWeekYear.js\";\n\nimport { addLeadingZeros } from \"../addLeadingZeros.js\";\nimport { lightFormatters } from \"./lightFormatters.js\";\n\nconst dayPeriodEnum = {\n am: \"am\",\n pm: \"pm\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n // Era\n G: function (date, token, localize) {\n const era = date.getFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case \"G\":\n case \"GG\":\n case \"GGG\":\n return localize.era(era, { width: \"abbreviated\" });\n // A, B\n case \"GGGGG\":\n return localize.era(era, { width: \"narrow\" });\n // Anno Domini, Before Christ\n case \"GGGG\":\n default:\n return localize.era(era, { width: \"wide\" });\n }\n },\n\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === \"yo\") {\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, { unit: \"year\" });\n }\n\n return lightFormatters.y(date, token);\n },\n\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n const signedWeekYear = getWeekYear(date, options);\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === \"YY\") {\n const twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n }\n\n // Ordinal number\n if (token === \"Yo\") {\n return localize.ordinalNumber(weekYear, { unit: \"year\" });\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length);\n },\n\n // ISO week-numbering year\n R: function (date, token) {\n const isoWeekYear = getISOWeekYear(date);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length);\n },\n\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n const year = date.getFullYear();\n return addLeadingZeros(year, token.length);\n },\n\n // Quarter\n Q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"Q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"QQ\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"Qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"QQQ\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"QQQQQ\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"QQQQ\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone quarter\n q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"qq\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"qqq\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"qqqqq\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"qqqq\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // Month\n M: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n case \"M\":\n case \"MM\":\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n case \"Mo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"MMM\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // J, F, ..., D\n case \"MMMMM\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // January, February, ..., December\n case \"MMMM\":\n default:\n return localize.month(month, { width: \"wide\", context: \"formatting\" });\n }\n },\n\n // Stand-alone month\n L: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n // 1, 2, ..., 12\n case \"L\":\n return String(month + 1);\n // 01, 02, ..., 12\n case \"LL\":\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n case \"Lo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"LLL\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // J, F, ..., D\n case \"LLLLL\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // January, February, ..., December\n case \"LLLL\":\n default:\n return localize.month(month, { width: \"wide\", context: \"standalone\" });\n }\n },\n\n // Local week of year\n w: function (date, token, localize, options) {\n const week = getWeek(date, options);\n\n if (token === \"wo\") {\n return localize.ordinalNumber(week, { unit: \"week\" });\n }\n\n return addLeadingZeros(week, token.length);\n },\n\n // ISO week of year\n I: function (date, token, localize) {\n const isoWeek = getISOWeek(date);\n\n if (token === \"Io\") {\n return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n\n // Day of the month\n d: function (date, token, localize) {\n if (token === \"do\") {\n return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n }\n\n return lightFormatters.d(date, token);\n },\n\n // Day of year\n D: function (date, token, localize) {\n const dayOfYear = getDayOfYear(date);\n\n if (token === \"Do\") {\n return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n\n // Day of week\n E: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n switch (token) {\n // Tue\n case \"E\":\n case \"EE\":\n case \"EEE\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"EEEEE\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"EEEEEE\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"EEEE\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Local day of week\n e: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case \"e\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"ee\":\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n case \"eo\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"eee\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"eeeee\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"eeeeee\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"eeee\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case \"c\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"cc\":\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n case \"co\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"ccc\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // T\n case \"ccccc\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // Tu\n case \"cccccc\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"standalone\",\n });\n // Tuesday\n case \"cccc\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // ISO day of week\n i: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case \"i\":\n return String(isoDayOfWeek);\n // 02\n case \"ii\":\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n case \"io\":\n return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n // Tue\n case \"iii\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"iiiii\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"iiiiii\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"iiii\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM or PM\n a: function (date, token, localize) {\n const hours = date.getHours();\n const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"aaa\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"aaaaa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"aaaa\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n }\n\n switch (token) {\n case \"b\":\n case \"bb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"bbb\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"bbbbb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"bbbb\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case \"B\":\n case \"BB\":\n case \"BBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"BBBBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"BBBB\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === \"ho\") {\n let hours = date.getHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return lightFormatters.h(date, token);\n },\n\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === \"Ho\") {\n return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n }\n\n return lightFormatters.H(date, token);\n },\n\n // Hour [0-11]\n K: function (date, token, localize) {\n const hours = date.getHours() % 12;\n\n if (token === \"Ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Hour [1-24]\n k: function (date, token, localize) {\n let hours = date.getHours();\n if (hours === 0) hours = 24;\n\n if (token === \"ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Minute\n m: function (date, token, localize) {\n if (token === \"mo\") {\n return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n }\n\n return lightFormatters.m(date, token);\n },\n\n // Second\n s: function (date, token, localize) {\n if (token === \"so\") {\n return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n }\n\n return lightFormatters.s(date, token);\n },\n\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return \"Z\";\n }\n\n switch (token) {\n // Hours and optional minutes\n case \"X\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case \"XXXX\":\n case \"XX\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case \"XXXXX\":\n case \"XXX\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case \"x\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case \"xxxx\":\n case \"xx\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case \"xxxxx\":\n case \"xxx\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (GMT)\n O: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"O\":\n case \"OO\":\n case \"OOO\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"OOOO\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (specific non-location)\n z: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"z\":\n case \"zz\":\n case \"zzz\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"zzzz\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Seconds timestamp\n t: function (date, token, _localize) {\n const timestamp = Math.trunc(+date / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n\n // Milliseconds timestamp\n T: function (date, token, _localize) {\n return addLeadingZeros(+date, token.length);\n },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = Math.trunc(absOffset / 60);\n const minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n if (offset % 60 === 0) {\n const sign = offset > 0 ? \"-\" : \"+\";\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n const minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const originalDate = toDate(date, options?.in);\n\n if (!isValid(originalDate)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n let parts = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp)\n .map((substring) => {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return { isToken: false, value: \"'\" };\n }\n\n const firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return { isToken: false, value: cleanEscapedString(substring) };\n }\n\n if (formatters[firstCharacter]) {\n return { isToken: true, value: substring };\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n return { isToken: false, value: substring };\n });\n\n // invoke localize preprocessor (only for french locales at the moment)\n if (locale.localize.preprocessor) {\n parts = locale.localize.preprocessor(originalDate, parts);\n }\n\n const formatterOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n return parts\n .map((part) => {\n if (!part.isToken) return part.value;\n\n const token = part.value;\n\n if (\n (!options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)) ||\n (!options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token))\n ) {\n warnOrThrowProtectedError(token, formatStr, String(date));\n }\n\n const formatter = formatters[token[0]];\n return formatter(originalDate, token, locale.localize, formatterOptions);\n })\n .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n const matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n","<template>\n <base-button\n ref=\"filterBarButtonRef\"\n v-bind=\"$attrs\"\n class=\"b-filter-bar-button\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n :aria-label=\"computedAriaLabel\"\n :aria-controls=\"ariaAttributes['aria-controls']\"\n type=\"button\"\n @click=\"onClickButton\"\n >\n <div class=\"b-filter-bar-button__container\">\n <template v-if=\"hasSlot('iconLeft')\">\n <slot name=\"iconLeft\" />\n </template>\n\n <div class=\"b-filter-bar-button__label-container\">\n <bento-typography el=\"span\" variant=\"body\" stronger class=\"b-filter-bar-button__label\">\n <span>\n <slot />\n </span>\n <bento-typography\n v-if=\"secondaryLabel && !isIconOnly\"\n el=\"span\"\n variant=\"body\"\n stronger\n class=\"b-filter-bar-button__label\"\n >:</bento-typography\n >\n </bento-typography>\n <bento-typography\n v-if=\"appliedFiltersCount && !isIconOnly\"\n class=\"b-filter-bar-button__counter\"\n el=\"span\"\n variant=\"body\"\n stronger\n >\n {{ appliedFiltersCount }}\n </bento-typography>\n <bento-typography\n v-if=\"secondaryLabel && !isIconOnly\"\n el=\"span\"\n variant=\"body\"\n stronger\n class=\"b-filter-bar-button__secondary-label\"\n >\n {{ secondaryLabel }}\n </bento-typography>\n </div>\n </div>\n </base-button>\n</template>\n\n<script setup lang=\"ts\">\n import { BaseButton } from '@/components/internal/base-button';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { computed, ref, useAttrs, useSlots } from 'vue';\n\n const props = defineProps({\n /**\n * Allows to set the button as active without setting a \"secondaryLabel\"\n */\n active: { type: Boolean, default: false },\n\n /**\n * The number of applied values within the filter.\n * Text can also be applied here such as 'All'.\n * e.g. if 2 items in a dropdown filter have been applied, the number 2 will be shown here.\n */\n appliedFiltersCount: { type: [String, Number], default: null },\n\n /**\n * Disables button functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Signifies if the filter is open or closed.\n */\n isFilterOpen: { type: Boolean, default: false },\n\n /**\n * Signifies if the filter is a persistent filter\n */\n isPersistentFilter: { type: Boolean, default: false },\n\n /**\n * Renders the button without the applied state styles\n */\n noAppliedStateStyles: { type: Boolean, default: false },\n\n /**\n * A secondary label to be added next to the primary for additional filtering information.\n * i.e. Can be used to show the set value for said filter.\n */\n secondaryLabel: { type: String, default: null },\n });\n\n const emit = defineEmits([\"click\"]);\n\n const slots = useSlots();\n const attrs = useAttrs();\n const hasSlot = useHasSlot(slots);\n const labelSlot = computed((): string => (slots.default ? getSlotText(slots)('default') : null));\n const isIconOnly = computed(() => !hasSlot('default') && hasSlot('iconLeft'));\n const computedAriaLabel = useAriaLabel({ ariaLabel: labelSlot });\n const filterBarButtonRef = ref(null);\n\n const ariaAttributes = computed(() => ({\n 'aria-controls': attrs['aria-controls']?.toString() as string,\n }));\n\n const isAppliedFilter = computed(\n () =>\n (props.appliedFiltersCount || props.secondaryLabel || props.isPersistentFilter) &&\n !props.noAppliedStateStyles\n );\n\n const conditionalClasses = computed(() => ({\n 'b-filter-bar-button--applied': isAppliedFilter.value || props.active,\n 'b-filter-bar-button--filter-open': props.isFilterOpen && !isAppliedFilter.value,\n 'b-filter-bar-button--filter-open-applied': props.isFilterOpen && isAppliedFilter.value,\n 'b-filter-bar-button--with-secondary-label': props.secondaryLabel,\n 'b-filter-bar-button--with-counter': props.appliedFiltersCount,\n 'b-filter-bar-button--icon-only': isIconOnly.value,\n }));\n\n const onClickButton = (event: MouseEvent) => {\n event.preventDefault();\n if (!props.disabled) {\n emit('click', event);\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * A filter button used as a base to extend all sorts of filter buttons.\n * Used in the bento-filter-bar and all-filter-modals components.\n *\n * @usage\n * export default {\n * components: { FilterBarButton },\n * template: `\n * <filter-bar-button>\n * Filter\n * </filter-bar-button>\n * `,\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./filter-bar-button.scss\" />\n","<template>\n <div class=\"b-filter-bar-button-group\" :class=\"conditionalClasses\">\n <slot></slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { type BentoFilterBarButtonGroupProps } from './filter-bar-button-group.types';\n import { computed } from 'vue';\n\n const props = defineProps({\n isActive: { type: Boolean, default: false },\n skipGrouping: { type: Boolean, default: false }\n});\n\n const conditionalClasses = computed(() => ({\n 'b-filter-bar-button-group--active': props.isActive,\n 'b-filter-bar-button-group--grouped': !props.skipGrouping,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * A button group used to group buttons in the filter bar.\n *\n * @usage\n * import { FilterBarButtonGroup } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { FilterBarButtonGroup },\n * template: `\n * <filter-bar-button-group>\n * <filter-bar-button>Filter</filter-bar-button>\n * <filter-bar-button>Clear</filter-bar-button>\n * </filter-bar-button-group>\n * `,\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./filter-bar-button-group.scss\" />\n","export enum BaseFilterEvent {\n APPLY = 'apply',\n CLEAR = 'clear',\n OPEN = 'open',\n CLOSE = 'close',\n RESET = 'reset',\n CANCEL = 'cancel',\n}\n","<template>\n <div v-if=\"onlySlot\">\n <slot></slot>\n </div>\n <div v-else class=\"b-base-filter\">\n <filter-bar-button-group\n v-bento-tooltip-directive:[tooltipPosition]=\"tooltipText\"\n :is-active=\"isFilterOpen\"\n :skip-grouping=\"!isValueChanged\"\n >\n <filter-bar-button\n ref=\"filterButtonRef\"\n :aria-label=\"computedAriaLabel\"\n :aria-controls=\"isFilterOpen ? popoverId : null\"\n :applied-filters-count=\"appliedFiltersCount\"\n :disabled=\"disabled\"\n :is-persistent-filter=\"isPersistentFilter\"\n :is-filter-open=\"isFilterOpen\"\n :secondary-label=\"buttonSecondaryLabel\"\n @click=\"onClickFilter\"\n @keydown.esc=\"closePopover\"\n >\n {{ computedButtonText }}\n </filter-bar-button>\n\n <filter-bar-button\n v-if=\"isValueChanged\"\n :applied-filters-count=\"appliedFiltersCount\"\n :disabled=\"disabled\"\n :is-persistent-filter=\"isPersistentFilter\"\n :is-filter-open=\"isFilterOpen\"\n :secondary-label=\"buttonSecondaryLabel\"\n @click=\"resetFilter\"\n >\n <template #iconLeft>\n <cross-small-icon :svg-title=\"computedClearButtonLabel\"></cross-small-icon>\n </template>\n </filter-bar-button>\n </filter-bar-button-group>\n\n <bento-teleport v-if=\"filterButtonEl\">\n <bento-popover\n :id=\"popoverId\"\n :ref=\"setPopoverRef\"\n class=\"b-base-filter__popover\"\n divider\n :aria-label=\"label\"\n :open=\"isFilterOpen\"\n :actions=\"controlled ? null : actions\"\n actions-layout=\"space-between\"\n :target-element=\"filterButtonEl\"\n :title=\"controlled ? null : label\"\n :fit-content=\"fitContent\"\n position=\"bottom-start\"\n :without-space=\"controlled\"\n :fallback-position=\"['bottom-end']\"\n overflow-visible\n >\n <div @keydown.esc=\"onCancel\">\n <slot></slot>\n </div>\n </bento-popover>\n </bento-teleport>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, ref, watch } from 'vue';\n import BentoPopover from '@/components/popover/popover.vue';\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives/tooltip/tooltip';\n import { FilterBarButton } from '../filter-bar-button';\n import FilterBarButtonGroup from '../filter-bar-button-group/filter-bar-button-group.vue';\n import { useI18n } from '@/utils/ts/i18n';\n import { BaseFilterEvent } from './base-filter.internal.types';\n import { type BentoBaseFilterProps } from './base-filter.types';\n import messages from './messages.json';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { useClickOutside } from '@/composables/use-click-outside';\n import BentoTeleport from '@/internal/teleport/teleport.vue';\n import type { BentoFilterBarValue } from '../../filter-bar.types';\n import CrossSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-small';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const emit = defineEmits([\n BaseFilterEvent.APPLY,\n BaseFilterEvent.CLEAR,\n BaseFilterEvent.OPEN,\n BaseFilterEvent.CLOSE,\n BaseFilterEvent.RESET,\n BaseFilterEvent.CANCEL,\n ]);\n\n const props = defineProps({\n appliedFiltersCount: { default: null },\n buttonLabel: { default: undefined },\n buttonSecondaryLabel: { default: undefined },\n disabled: { type: Boolean, default: false },\n defaultValue: { default: null },\n onlySlot: { type: Boolean, default: false },\n controlled: { type: Boolean, default: false },\n disableApplyButton: { type: Boolean, default: false },\n disableSecondaryButton: { type: Boolean, default: false },\n field: null,\n label: null,\n fitContent: { type: Boolean, default: undefined },\n tooltipText: { default: undefined },\n tooltipPosition: { default: undefined },\n value: { default: undefined }\n});\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const popoverId = generateUid('base-filter-popover');\n const isFilterOpen = ref(false);\n const filterButtonRef = ref(null);\n const popoverRef = ref(null);\n\n const filterButtonEl = computed(() => filterButtonRef.value?.$el ?? null);\n\n const setPopoverRef = (instance: unknown) => {\n popoverRef.value = instance ?? null;\n };\n\n const isPersistentFilter = computed(() => props.defaultValue !== null);\n\n const isValueChanged = computed(() => {\n // If it's not a persistent filter, its value can't have changed.\n if (!isPersistentFilter.value) {\n return props.appliedFiltersCount || props.buttonSecondaryLabel;\n }\n\n // Use JSON.stringify for a simple but effective deep comparison\n // of objects, arrays, and primitives.\n return JSON.stringify(props.value) !== JSON.stringify(props.defaultValue);\n });\n\n const computedAriaLabel = computed(() => {\n let ariaLabelValuePart = props.buttonSecondaryLabel ? `: ${props.buttonSecondaryLabel}` : '';\n\n if (props.appliedFiltersCount) {\n ariaLabelValuePart = `: ${t('numberSelected', { numberOfItemsSelected: props.appliedFiltersCount })}`;\n }\n\n return (isPersistentFilter.value ? props.label : computedButtonText.value) + ariaLabelValuePart;\n });\n\n const computedClearButtonLabel = computed(() =>\n isPersistentFilter.value\n ? t('resetFilter', {\n function: computedButtonText.value,\n })\n : t('clearFilter', {\n function: computedButtonText.value,\n })\n );\n\n const computedButtonText = computed(() => props.buttonLabel || props.label);\n\n const resetFocus = async () => {\n await nextTick();\n filterButtonRef.value?.$el?.focus();\n };\n\n const closePopover = () => {\n if (!isFilterOpen.value) {\n return;\n }\n\n isFilterOpen.value = false;\n resetFocus();\n emit(BaseFilterEvent.CLOSE);\n };\n\n const resetFilter = () => {\n if (isPersistentFilter.value) {\n emit(BaseFilterEvent.RESET);\n } else {\n emit(BaseFilterEvent.CLEAR);\n }\n\n resetFocus();\n };\n\n const onClickSecondaryAction = () => {\n closePopover();\n resetFilter();\n };\n\n const onClickFilter = () => {\n if (isFilterOpen.value) {\n closePopover();\n } else {\n isFilterOpen.value = true;\n emit(BaseFilterEvent.OPEN);\n }\n };\n const onClickApply = () => {\n closePopover();\n emit(BaseFilterEvent.APPLY);\n };\n\n const onCancel = () => {\n closePopover();\n emit(BaseFilterEvent.CANCEL);\n };\n\n const onClickOutside = () => onCancel();\n\n const actions = computed(() => [\n {\n title: t('apply') as string,\n event: onClickApply,\n disabled: props.disableApplyButton,\n },\n {\n title: isPersistentFilter.value ? (t('reset') as string) : (t('clear') as string),\n event: onClickSecondaryAction,\n disabled: props.disableSecondaryButton,\n },\n ]);\n\n watch(\n () => isFilterOpen.value,\n (value, prevValue) => {\n if (!value && prevValue) {\n if (filterButtonRef.value?.filterBarButtonRef?.bentoBaseButtonRef) {\n filterButtonRef.value.filterBarButtonRef.bentoBaseButtonRef.focus();\n }\n }\n }\n );\n\n // Ignore the events inside the Button and the Popover\n useClickOutside(popoverRef, onClickOutside, { ignore: [filterButtonRef] });\n\n defineExpose({\n closePopover,\n });\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n name: 'bento-base-filter',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-filter.scss\"></style>\n","import { computed, ref, watch } from 'vue';\nimport type { ComputedRef, Ref, UnwrapRef } from 'vue';\n\nconst isArray = <T>(value: T) => value instanceof Array;\nconst isValueEmpty = <T>(value: T) =>\n isArray(value) ? (value as []).length === 0 || (value as Array<T>).every(el => el === '') : !value;\nconst isEqual = <T>(first: T, second: T) => JSON.stringify(first) === JSON.stringify(second);\n\ninterface UseBaseFilterReturn<T> {\n internalFilterValue: Ref<T> | Ref<UnwrapRef<T>>;\n isSecondaryButtonDisabled: ComputedRef<boolean>;\n isApplyButtonDisabled: ComputedRef<boolean>;\n}\n\nexport const useBaseFilter = <T>(appliedFilter: Ref<T>, defaultFilter: Ref<T>): UseBaseFilterReturn<T> => {\n const internalFilterValue = ref<T>(appliedFilter.value as T);\n\n watch(\n () => appliedFilter.value,\n () => {\n (internalFilterValue as Ref<T>).value = appliedFilter.value as T;\n }\n );\n\n const isFilterInactive = computed(() => isValueEmpty(appliedFilter.value));\n\n const isSecondaryButtonDisabled = computed(() =>\n defaultFilter.value !== null ? isEqual<T>(defaultFilter.value, appliedFilter.value) : isFilterInactive.value\n );\n const isApplyButtonDisabled = computed(() => {\n const isValueUnchanged = isEqual((internalFilterValue as Ref<T>).value, appliedFilter.value as T);\n return isValueUnchanged || (isValueEmpty(internalFilterValue.value) && isFilterInactive.value);\n });\n\n return {\n internalFilterValue,\n isSecondaryButtonDisabled,\n isApplyButtonDisabled,\n };\n};\n","<template>\n <bento-base-filter\n v-bind=\"$props\"\n :button-label=\"buttonLabel\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :disable-apply-button=\"isApplyButtonDisabled\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :only-slot=\"onlySlot\"\n :tooltip-position=\"options?.tooltipPosition\"\n :tooltip-text=\"options?.tooltipText\"\n @apply=\"updateFilter\"\n @clear=\"clearFilter\"\n @open=\"openFilter\"\n @reset=\"resetFilter\"\n >\n <div class=\"b-input-filter\" :class=\"conditionalClasses\" @keydown.enter=\"updateFilter\" @input=\"onInput\">\n <bento-input-field\n ref=\"inputTextRef\"\n :placeholder=\"options?.placeholder\"\n :model-value=\"internalFilterValue\"\n :disabled=\"disabled\"\n @update:model-value=\"setInternalFilterValue\"\n />\n </div>\n </bento-base-filter>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onBeforeUpdate, ref, toRef, watch } from 'vue';\n import { BentoBaseFilter, useBaseFilter } from '../base-filter';\n import { BentoInputField } from '@/components/input-field';\n import { truncate } from '@/utils/ts/truncate';\n import { type BentoInputFilterProps } from './input-filter.types';\n\n const props = defineProps({\n defaultValue: { default: null },\n disabled: { type: Boolean, default: false },\n field: null,\n label: null,\n onlySlot: { type: Boolean, default: false },\n options: { default: undefined },\n value: { default: null }\n});\n\n const emit = defineEmits([\"input\", \"update\"]);\n\n const inputTextRef = ref(null);\n\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } = useBaseFilter<string>(\n toRef(props, 'value'),\n toRef(props, 'defaultValue')\n );\n\n const buttonLabel = computed(() => props.label);\n const buttonSecondaryLabel = computed(() => truncate(props.value, 12));\n\n const conditionalClasses = computed(() => ({\n [`b-input-filter--only-slot`]: props.onlySlot,\n }));\n\n onBeforeUpdate(() => {\n // Set value to null when the string is empty\n if (internalFilterValue.value === '') {\n internalFilterValue.value = null;\n }\n });\n\n watch(inputTextRef, () => {\n // Focus on the input when it's opened\n inputTextRef.value?.focusInput();\n });\n\n const openFilter = () => {\n internalFilterValue.value = props.value;\n };\n\n const updateFilter = () => {\n if (!internalFilterValue.value && props.defaultValue !== null) {\n // If value set to empty, reset back to default value\n internalFilterValue.value = props.defaultValue;\n }\n\n emit('update', {\n ...props,\n value: internalFilterValue.value,\n });\n };\n\n const resetFilter = () => emit('update', { ...props, value: props.defaultValue });\n\n const clearFilter = () => {\n internalFilterValue.value = null;\n updateFilter();\n };\n\n const onInput = () => {\n emit('input', { ...props, value: internalFilterValue.value });\n };\n\n const setInternalFilterValue = (event: string) => {\n internalFilterValue.value = event;\n };\n</script>\n\n<script lang=\"ts\">\n export default {\n name: 'bento-input-filter',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-filter.scss\" />\n","import { type BentoAvatarListboxOptions } from '@/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.types';\nimport {\n type BentoListboxEmptyStateProps,\n type BentoListboxIsOptionDisabled,\n type BentoListboxLazyLoadType,\n type BentoListboxOptions,\n type BentoListboxSearchOptions,\n type BentoListboxSelectedValue,\n type BentoListboxVirtulisationOptions,\n} from '@/types/listbox';\nimport { type OmitStrict } from '@/types/omit-strict';\nimport { type VueNodeElement } from '@/types/elements';\nimport { type BentoCountryListboxOptions } from '@/components/dropdown/components/variants/dropdown-country/dropdown-country.types';\nimport { type BentoTagListboxOptions } from '@/components/dropdown/components/variants/dropdown-tag/dropdown-tag.types';\nimport { type BentoCountryVariant } from '@/components/country';\nimport { type BentoCurrencyListboxOptions } from '@/components/dropdown/components/variants/dropdown-currency/dropdown-currency.types';\nimport { type BentoPaymentMethodListboxOptions } from '@/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.types';\nimport {\n type BentoInputDropdownProps,\n type BentoInputFieldElementPosition,\n type BentoInputFieldValue,\n} from '@/components/input-field';\nimport {\n type BentoDatePickerFirstDayOfWeek,\n type BentoDatePickerIsDateDisabled,\n type BentoDatePickerVariant,\n type BentoDatePickerYearRange,\n} from '@/components/date-picker';\nimport {\n type BentoDateRangePickerGranularityConfig,\n type BentoDateRangePickerValue,\n type BentoDateRangePickerVariant,\n type BentoDateRangePickerYearRange,\n} from '@/components/date-range-picker';\nimport {\n type BentoRadioGroupFilterOptions,\n type BentoRadioGroupFilterValue,\n} from './components/radio-group-filter/radio-group-filter.types';\nimport { type DateRangePickerCalendarRangeSelectorItems } from '../date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types';\nimport { type BentoSearchBarProps } from '@/components/search-bar/search-bar.types';\nimport type { BentoInputFilterOptions, BentoInputFilterValue } from './components/input-filter/input-filter.types';\nimport type { BentoToggleFilterOptions, BentoToggleFilterValue } from './components/toggle-filter/toggle-filter.types';\nimport type { BentoTooltipPosition } from '@/directives';\nimport {\n type BentoCheckboxGroupFilterOptions,\n type BentoCheckboxGroupFilterValue,\n} from './components/checkbox-group-filter/checkbox-group-filter.types';\n\n/**\n * Re-export filter component types\n */\nexport type * from './components/input-filter/input-filter.types';\nexport type * from './components/radio-group-filter/radio-group-filter.types';\nexport type * from './components/toggle-filter/toggle-filter.types';\n\nexport interface BentoSelectFilterOptions {\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?: BentoListboxEmptyStateProps;\n\n /**\n * Option items for the list-box\n */\n listboxItems: BentoListboxOptions;\n\n /**\n * Defines if the list-box should be a multi-select filter\n */\n multiple?: boolean;\n\n /**\n * The event fire when the filter is opened.\n */\n onOpen?: () => void;\n\n lazy?: {\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: boolean;\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: BentoListboxLazyLoadType | `${BentoListboxLazyLoadType}`;\n\n /**\n * Indicates if new options are loading.\n */\n loading: boolean;\n\n /**\n * The click event that fires when the user press on the \"show more\" button OR when the user\n * scrolls down to bottom of the select filter box.\n */\n showMoreEvent?: () => void;\n };\n\n /**\n * Toggles the loading state of the listbox.\n */\n loading?: boolean;\n\n /**\n * Search options and events for the listbox filtering.\n */\n search?: BentoListboxSearchOptions;\n\n /**\n * Defines if the list-box should support static categories\n */\n staticCategories?: boolean;\n\n /**\n * A function that defines which option in the list-box is disabled\n */\n isOptionDisabled?: BentoListboxIsOptionDisabled;\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?: BentoListboxVirtulisationOptions;\n\n /**\n * Attaches a `BentoTooltip` if present. Text showed in the tooltip on hover.\n */\n tooltipText?: string;\n\n /**\n * Position the tooltip should take if space is available.\n */\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n\n /**\n * Enables value/label value handling. When `true`, the component expects and emits value/label\n * pair objects instead of primitive values.\n *\n * This affects both the `value` prop and the `input` event payload.\n *\n * - **Input (`value` prop):** Expects a `{ value: string | number, label: string }` object (or an array of them for multi-select).\n * - **Output (`input` event):** Emits a `{ value: string | number, label: string }` object (or an array of them) upon selection.\n *\n * This is particularly useful when a selected item's label is not available in the `items` prop,\n * allowing the component to display the correct label for values loaded from external sources.\n * @default false\n */\n enableValueLabelPair?: boolean;\n\n /**\n * Enables a search bar that dynamically filters values\n * @default true\n */\n dynamicFiltering?: boolean;\n}\nexport type BentoSelectAvatarFilterOptions = OmitStrict<BentoSelectFilterOptions, 'listboxItems'> & {\n listboxItems: BentoAvatarListboxOptions;\n};\nexport type BentoSelectCountryFilterOptions = OmitStrict<BentoSelectFilterOptions, 'listboxItems'> & {\n listboxItems: BentoCountryListboxOptions;\n variant?: BentoCountryVariant | `${BentoCountryVariant}`;\n};\nexport type BentoSelectCurrencyFilterOptions = OmitStrict<BentoSelectFilterOptions, 'listboxItems'> & {\n listboxItems: BentoCurrencyListboxOptions;\n};\nexport type BentoSelectTagFilterOptions = OmitStrict<BentoSelectFilterOptions, 'listboxItems'> & {\n listboxItems: BentoTagListboxOptions;\n};\n\nexport type BentoSelectPaymentMethodFilterOptions = OmitStrict<BentoSelectFilterOptions, 'listboxItems'> & {\n listboxItems: BentoPaymentMethodListboxOptions;\n};\n\nexport interface BentoBooleanFilterOption {\n label: string;\n value: string | boolean;\n}\n\nexport interface BentoBooleanFilterOptions {\n positiveOption?: BentoBooleanFilterOption;\n negativeOption?: BentoBooleanFilterOption;\n tooltipText?: string;\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n}\n\nexport interface BentoInputWithDropdownFilterOptions {\n dropdown: BentoInputDropdownProps;\n dropdownPosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n tooltipText?: string;\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n}\n\nexport interface BentoRangeFilterOptions {\n tooltipText?: string;\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n}\n\n// Date\nexport interface BentoDateFilterOptions {\n firstDayOfWeek?: BentoDatePickerFirstDayOfWeek;\n isDateDisabled?: BentoDatePickerIsDateDisabled;\n yearRange?: BentoDatePickerYearRange;\n variant?: `${BentoDatePickerVariant}`;\n tooltipText?: string;\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n}\nexport interface BentoDateRangeFilterOptions {\n allowTimeInput?: boolean;\n firstDayOfWeek?: BentoDatePickerFirstDayOfWeek;\n isDateDisabled?: BentoDatePickerIsDateDisabled;\n yearRange?: BentoDateRangePickerYearRange;\n granularities?: Array<BentoDateRangePickerGranularityConfig>;\n maxRange?: number;\n min?: Date;\n max?: Date;\n numberOfMonths?: number;\n showEndDateOnOpen?: boolean;\n quickSelectRanges?: DateRangePickerCalendarRangeSelectorItems | boolean;\n variant?: `${BentoDateRangePickerVariant}`;\n tooltipText?: string;\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n}\n\nexport interface BentoInpuWithDropdowntFilterValue {\n inputValue: BentoInputFieldValue;\n dropdownValue: BentoInputDropdownProps['modelValue'];\n}\n\nexport type BentoSelectFilterValue = BentoListboxSelectedValue;\nexport type BentoBooleanFilterValue = string | null;\nexport type BentoDateFilterValue = Date | null;\nexport type BentoDateRangeFilterValue = BentoDateRangePickerValue | null;\nexport type BentoFilterBarValue =\n | BentoInputFilterValue\n | BentoInpuWithDropdowntFilterValue\n | BentoSelectFilterValue\n | BentoBooleanFilterValue\n | BentoDateFilterValue\n | BentoDateRangeFilterValue\n | BentoRadioGroupFilterValue\n | BentoCheckboxGroupFilterValue\n | BentoToggleFilterValue;\n\nexport type BentoFilterOptions =\n | BentoSelectFilterOptions\n | BentoSelectAvatarFilterOptions\n | BentoSelectCountryFilterOptions\n | BentoSelectCurrencyFilterOptions\n | BentoSelectPaymentMethodFilterOptions\n | BentoSelectTagFilterOptions\n | BentoDateFilterOptions\n | BentoDateRangeFilterOptions\n | BentoBooleanFilterOptions\n | BentoInputFilterOptions\n | BentoInputWithDropdownFilterOptions\n | BentoRadioGroupFilterOptions\n | BentoCheckboxGroupFilterOptions\n | BentoToggleFilterOptions\n | undefined;\n\nexport enum BentoFilterEvent {\n // Fires upon the user interacting with the filter\n INPUT = 'input',\n // Fires on the (new) filter values being applied\n UPDATE = 'update',\n}\n\nexport enum BentoFilterBarEvent {\n INPUT = 'input',\n UPDATE_FILTER_VALUES_OBJECT = 'update:filter-values-object',\n UPDATE_FILTER_VALUES_ARRAY = 'update:filter-values',\n}\n\nexport enum BentoFilterItemType {\n /**\n * @deprecated Since v2.0.0. Use `BentoFilterItemType.RADIO_GROUP` instead.\n */\n BOOLEAN = 'BentoBooleanFilter',\n RANGE = 'BentoRangeFilter',\n // Input\n INPUT = 'BentoInputFilter',\n INPUT_DROPDOWN = 'BentoInputWithDropdownFilter',\n // Select\n SELECT = 'BentoSelectFilter',\n SELECT_AVATAR = 'BentoSelectAvatarFilter',\n SELECT_COUNTRY = 'BentoSelectCountryFilter',\n SELECT_CURRENCY = 'BentoSelectCurrencyFilter',\n SELECT_PAYMENT_METHOD = 'BentoSelectPaymentMethodFilter',\n SELECT_TAG = 'BentoSelectTagFilter',\n // Date\n DATE = 'BentoDateFilter',\n DATE_RANGE = 'BentoDateRangeFilter',\n // Radio group\n RADIO_GROUP = 'BentoRadioGroupFilter',\n // Checkbox\n CHECKBOX_GROUP = 'BentoCheckboxGroupFilter',\n // Toggle\n TOGGLE = 'BentoToggleFilter',\n}\n\nexport interface BentoFilterValue {\n field: string;\n value?: BentoFilterBarValue;\n}\n\nexport interface BentoFilterModel<CustomOptions = any> {\n field: BentoFilterValue['field'];\n label: string;\n description?: string;\n options?: BentoFilterOptions | CustomOptions;\n disabled?: boolean;\n defaultValue?: BentoFilterBarValue;\n visible?: boolean;\n\n /**\n * Defines the filter to be used.\n *\n * Can be one filter defined in the {@link BentoFilterItemType} enum or a\n * custom filter component defined as a {@link VueNodeElement}\n */\n type: BentoFilterItemType | VueNodeElement;\n}\n\n/**\n * A filter model combined with its current value.\n */\nexport type BentoFilterBarFilterWithValue = BentoFilterModel & BentoFilterValue;\n\n/**\n * An array of filter models combined with their current values.\n */\nexport type BentoFilterBarFiltersWithValues = Array<BentoFilterBarFilterWithValue>;\n\nexport type BentoFilterBarModel<CustomOptions = any> = Array<BentoFilterModel<CustomOptions>>;\nexport type BentoFilterValues = Array<BentoFilterValue>;\nexport type BentoFilterValueObject<T extends PropertyKey = string, CustomValue = BentoFilterBarValue> = Record<\n T,\n CustomValue\n>;\n\nexport type BentoFilterBarSearchBarProps = OmitStrict<BentoSearchBarProps, 'value' | 'condensed'> & {\n /**\n * CSS width value applied to the search box element (e.g. `'200px'`, `'50%'`).\n */\n width?: string;\n};\nexport type BentoFilterBarSearchTerm = BentoSearchBarProps['value'];\n\nexport type BentoFilterBarScreenOptionsLayout = 'one-line' | 'multi-line';\n\nexport interface BentoFilterBarContainerSizeLayout {\n /**\n * @default 'multi-line'\n */\n large?: BentoFilterBarScreenOptionsLayout;\n /**\n * @default 'one-line'\n */\n medium?: BentoFilterBarScreenOptionsLayout;\n /**\n * @default 'multi-line'\n */\n small?: BentoFilterBarScreenOptionsLayout;\n}\n\nexport interface BentoFilterBarProps<CustomValue = BentoFilterBarValue | any, CustomOptions = any> {\n /**\n * Array of filters based on @see {@link BentoFilterBarModel}.\n * Each one of the elements in the array correspond to a filter that will\n * be created and rendered in the FilterBar.\n *\n * @example\n * [{\n * field: 'company',\n * label: 'Company',\n * type: FilterType.TEXT,\n * }, {\n * field: 'name',\n * label: 'Name',\n * type: FilterType.TEXT,\n * }]\n */\n config?: BentoFilterBarModel<CustomOptions>;\n\n /**\n * An array of the values for each filter in the filter bar.\n * @see {@link BentoFilterValues}\n *\n * @example\n * [{\n * field: 'company',\n * value: '200',\n * }, {\n * field: 'name',\n * value: 'some text',\n * }]\n */\n filterValues?: BentoFilterValues;\n\n /**\n * Defines the layout (multi-line or one-line) to be used in the filter bar for different\n * container sizes:\n * - Large (>=700px)\n * - Medium (>=430px & <700px)\n * - Small (<430px)\n *\n * @example\n * {\n * large: 'multi-line',\n * medium: 'multi-line',\n * small: 'one-line'\n * }\n */\n containerSizeLayout?: BentoFilterBarContainerSizeLayout;\n\n /**\n * Search bar properties with which the placeholder, hint and other\n * \"bento-search-bar\" properties can be set. @see {@link BentoFilterBarSearchBarProps}\n */\n search?: BentoFilterBarSearchBarProps;\n\n /**\n * Search term useful to filter all the data by text.\n * If the value is non-existant (null or undefined) the search bar won't be enabled.\n * Can be used with `.sync`\n */\n searchTerm?: BentoFilterBarSearchTerm;\n\n /**\n * Will show all applied filters even if their visibility is set to false.\n */\n showAppliedHiddenFilters?: boolean;\n\n /**\n * An object of the values for each filter in the filter bar where key is a the field name and the value is the BentoFilterBarValue.\n *\n * @example\n * {\n * 'company': '200',\n * 'name': 'some text'\n * },\n */\n filterValuesObject?: BentoFilterValueObject<string, CustomValue>;\n}\n","<template>\n <bento-base-filter\n v-bind=\"$props\"\n :applied-filters-count=\"selectedDropdownLabel\"\n :button-label=\"buttonLabel\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :disable-apply-button=\"shouldDisableApply\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :only-slot=\"onlySlot\"\n :tooltip-position=\"options?.tooltipPosition\"\n :tooltip-text=\"options?.tooltipText\"\n @apply=\"updateFilter\"\n @clear=\"clearFilter\"\n @open=\"openFilter\"\n @reset=\"resetFilter\"\n >\n <div\n class=\"b-input-with-dropdown-filter\"\n :class=\"conditionalClasses\"\n @keydown.enter=\"updateFilter\"\n @input=\"onInput\"\n >\n <bento-input-field\n ref=\"inputTextRef\"\n :dropdown=\"dropdownOptions\"\n :dropdown-position=\"options?.dropdownPosition\"\n variant=\"dropdown\"\n :model-value=\"internalFilterValue?.inputValue\"\n :disabled=\"disabled\"\n @update:model-value=\"setInternalFilterValue\"\n @dropdown-input=\"onDropdownInput\"\n />\n </div>\n </bento-base-filter>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onBeforeUpdate, provide, ref, toRef, watch } from 'vue';\n import { BentoBaseFilter, useBaseFilter } from '../base-filter';\n import {\n BentoFilterEvent,\n type BentoInputWithDropdownFilterOptions,\n type BentoInpuWithDropdowntFilterValue,\n } from '../../filter-bar.types';\n import { type BentoInputDropdownProps, BentoInputField } from '@/components/input-field';\n import { truncate } from '@/utils/ts/truncate';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY } from '@/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.keys';\n\n const props = defineProps({\n disabled: { type: Boolean },\n defaultValue: { default: undefined },\n field: null,\n label: null,\n onlySlot: { type: Boolean, default: false },\n options: { default: undefined },\n value: { default: undefined }\n});\n\n const emit = defineEmits([BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE]);\n\n const inputTextRef = ref(null);\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } =\n useBaseFilter<BentoInpuWithDropdowntFilterValue>(toRef(props, 'value'), toRef(props, 'defaultValue'));\n\n const selectedDropdownLabel = computed(() => {\n const selectedValue = props.value?.dropdownValue ?? props.options?.dropdown?.modelValue;\n\n if (\n !buttonSecondaryLabel.value ||\n selectedValue === undefined ||\n selectedValue === null ||\n !props.options?.dropdown?.items\n ) {\n return null;\n }\n\n const label = props.options.dropdown.items.find(item => item.value === selectedValue)?.label;\n\n return label ? truncate(label, 12) : null;\n });\n\n const buttonLabel = computed(() => props.label);\n\n const buttonSecondaryLabel = computed(() =>\n props.value?.inputValue ? truncate(props.value.inputValue, 12) : undefined\n );\n\n const dropdownSelection = computed(\n () => internalFilterValue.value?.dropdownValue ?? props.options?.dropdown?.modelValue\n );\n\n const dropdownOptions = computed<BentoInputDropdownProps>(() => ({\n ...((props.options?.dropdown || {}) as BentoInputDropdownProps),\n modelValue: dropdownSelection.value,\n }));\n\n const conditionalClasses = computed(() => ({\n [`b-input-with-dropdown-filter--only-slot`]: props.onlySlot,\n }));\n\n const shouldDisableApply = computed(() => {\n const allFieldsAreSet = !!internalFilterValue.value?.inputValue && !!dropdownSelection.value;\n return !allFieldsAreSet || isApplyButtonDisabled.value;\n });\n\n onBeforeUpdate(() => {\n // Set value to null when the string is empty\n if (internalFilterValue.value?.inputValue === '') {\n internalFilterValue.value = { ...internalFilterValue.value, inputValue: undefined };\n }\n });\n\n watch(inputTextRef, () => {\n // Focus on the input when it's opened\n inputTextRef.value?.focusInput();\n });\n\n const openFilter = () => {\n internalFilterValue.value = props.value;\n };\n\n const updateFilter = () => {\n if (!internalFilterValue.value?.inputValue && props.defaultValue !== null) {\n // If value set to empty, reset back to default value\n internalFilterValue.value = { ...props.defaultValue };\n }\n\n emit(BentoFilterEvent.UPDATE, {\n ...props,\n value: internalFilterValue.value,\n });\n };\n\n const resetFilter = () => emit(BentoFilterEvent.UPDATE, { ...props, value: props.defaultValue });\n\n const clearFilter = () => {\n internalFilterValue.value = null;\n updateFilter();\n };\n\n const onInput = () => {\n emit(BentoFilterEvent.INPUT, { ...props, value: internalFilterValue.value });\n };\n\n const setInternalFilterValue = (event: string) => {\n internalFilterValue.value = { dropdownValue: dropdownSelection.value, inputValue: event };\n };\n\n const onDropdownInput = (selectedValue: BentoListboxSelectedValue) => {\n internalFilterValue.value = { ...internalFilterValue.value, dropdownValue: selectedValue };\n };\n\n // We need to change the base filter's popover to have overflow visible so the dropdown options is\n // not hidden inside the filter when opened.\n provide(INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY, true);\n</script>\n\n<script lang=\"ts\">\n /**\n *\n */\n export default {\n name: 'bento-input-with-dropdown-filter',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-with-dropdown-filter.scss\" />\n","<template>\n <bento-base-filter\n :button-label=\"buttonLabel\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :disabled=\"disabled\"\n :default-value=\"defaultValue\"\n :disable-apply-button=\"isApplyButtonDisabled\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :field=\"field\"\n :label=\"label\"\n :only-slot=\"onlySlot\"\n :tooltip-position=\"options?.tooltipPosition\"\n :tooltip-text=\"options?.tooltipText\"\n :value=\"value\"\n fit-content\n @apply=\"updateFilter\"\n @clear=\"clearFilter\"\n @open=\"openFilter\"\n @reset=\"resetFilter\"\n >\n <bento-date-picker\n v-if=\"onlySlot || isTouchDevice\"\n :class=\"touchDeviceDatePickerConditionalClasses\"\n :aria-labelledby=\"$attrs?.['aria-labelledby']\"\n :model-value=\"internalFilterValue\"\n :first-day-of-week=\"options?.firstDayOfWeek\"\n :is-date-disabled=\"options?.isDateDisabled\"\n :variant=\"options?.variant\"\n :year-range=\"options?.yearRange\"\n :disabled=\"disabled\"\n @update:model-value=\"onDateInputSelected\"\n />\n <template v-else>\n <bento-divider class=\"b-date-filter__divider\" />\n\n <div class=\"b-date-filter\">\n <calendar\n :first-day-of-week=\"options?.firstDayOfWeek\"\n :is-date-disabled=\"options?.isDateDisabled\"\n :number-of-months=\"1\"\n :value=\"internalFilterValue\"\n :variant=\"options?.variant\"\n :year-range=\"options?.yearRange\"\n @input=\"onDateSelected\"\n />\n </div>\n </template>\n </bento-base-filter>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, toRef } from 'vue';\n import { BentoBaseFilter, useBaseFilter } from '../base-filter';\n import { type BentoDateFilterOptions, type BentoDateFilterValue, BentoFilterEvent } from '../../filter-bar.types';\n import { Calendar } from '@/internal';\n import { BentoDivider } from '@/components/divider';\n import { BentoDatePicker } from '@/components/date-picker';\n import { useI18n } from '@/utils/ts/i18n';\n import { getDateTimeFormatter } from '@/utils/ts/format-date';\n import { useTouchDevice } from '@/composables';\n\n /**\n * The Date filter displays a calendar that allows\n * to select a single date.\n *\n * @example\n * import { BentoDateFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDateFilter },\n * template: `\n * <bento-date-filter\n * :field=\"filter.field\"\n * :label=\"filter.label\"\n * :options=\"filter.options\"\n * :value=\"filter.value\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-date-filter',\n components: {\n BentoBaseFilter,\n BentoDatePicker,\n BentoDivider,\n Calendar,\n },\n props: {\n /**\n * Disables the filter from being interacted with.\n */\n disabled: { type: Boolean, default: false },\n\n isDateInput: { type: Boolean, default: true },\n\n /**\n * Default value of the filter to reset to.\n */\n defaultValue: { type: Date as PropType<BentoDateFilterValue>, default: null },\n\n /**\n * Filter name/key referencing the actual property name in the data set.\n * Should be unique per filter bar.\n */\n field: { type: String, required: true },\n\n /**\n * Label text to be displayed\n */\n label: { type: String, required: true },\n\n /**\n * Renders the base filter's slot content only - leaving out the button and the popover.\n * Used for the allFiltersModal component.\n */\n onlySlot: { type: Boolean, default: false },\n\n /**\n * List of options that are needed to setup the filter\n * Available options:\n * - firstDayOfWeek: Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n * - isDateDisabled: Indicate if a date should be disabled or not\n * - tooltipPosition: The position of the tooltip attached to the filter button\n * - tooltipText: The content of the tooltip attached to the filter button\n */\n options: {\n type: Object as PropType<BentoDateFilterOptions>,\n default: undefined,\n },\n\n /**\n * Current value of the filter\n */\n value: { type: Date as PropType<BentoDateFilterValue>, default: undefined },\n },\n emits: [BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE],\n setup(props, { emit }) {\n const { isTouchDevice } = useTouchDevice();\n const { locale } = useI18n(undefined, true);\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } = useBaseFilter(\n toRef(props, 'value'),\n toRef(props, 'defaultValue')\n );\n\n const formattedButtonDateText = computed(() => {\n const dateFormatOptions: Intl.DateTimeFormatOptions =\n props?.options?.variant === 'month'\n ? { month: 'long', year: 'numeric' }\n : { day: 'numeric', month: 'short', year: 'numeric' };\n\n return props.value ? getDateTimeFormatter(locale.value, dateFormatOptions).format(props.value) : null;\n });\n const buttonLabel = computed(() => props.label);\n const buttonSecondaryLabel = computed(() => formattedButtonDateText.value);\n\n const updateFilter = () => {\n emit(BentoFilterEvent.UPDATE, { ...props, value: internalFilterValue.value });\n };\n\n const clearFilter = () => {\n internalFilterValue.value = null;\n updateFilter();\n };\n\n const resetFilter = () => {\n internalFilterValue.value = props.defaultValue;\n updateFilter();\n };\n\n const openFilter = () => {\n internalFilterValue.value = props.value;\n };\n\n const onDateSelected = (selectedDate: Date) => {\n internalFilterValue.value = selectedDate;\n emit(BentoFilterEvent.INPUT, { ...props, value: internalFilterValue.value });\n };\n\n // Update internal date and emit selected date when using date-picker input\n const onDateInputSelected = (selectedDate: Date) => {\n internalFilterValue.value = selectedDate;\n onDateSelected(selectedDate);\n updateFilter();\n };\n\n const touchDeviceDatePickerConditionalClasses = computed(() => ({\n 'b-date-filter--touch-device': isTouchDevice.value,\n }));\n\n return {\n // Values\n internalFilterValue,\n isApplyButtonDisabled,\n isSecondaryButtonDisabled,\n buttonLabel,\n buttonSecondaryLabel,\n isTouchDevice,\n touchDeviceDatePickerConditionalClasses,\n\n // Events\n clearFilter,\n onDateSelected,\n openFilter,\n updateFilter,\n resetFilter,\n onDateInputSelected,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-filter.scss\" />\n","<template>\n <bento-base-filter\n ref=\"baseFilter\"\n class=\"b-base-filter-date-range-filter\"\n :button-label=\"buttonLabel\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :controlled=\"!onlySlot\"\n :disabled=\"disabled\"\n :disable-apply-button=\"isApplyButtonDisabled\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :default-value=\"defaultValue\"\n :field=\"field\"\n :label=\"label\"\n :only-slot=\"onlySlot\"\n :tooltip-position=\"options?.tooltipPosition\"\n :tooltip-text=\"options?.tooltipText\"\n :value=\"value\"\n fit-content\n @open=\"openFilter\"\n @clear=\"clearFilter\"\n @reset=\"resetFilter\"\n @cancel=\"onCancel\"\n >\n <bento-date-range-picker\n v-if=\"onlySlot\"\n :allow-time-input=\"options?.allowTimeInput\"\n :model-value=\"internalFilterValue\"\n :first-day-of-week=\"options?.firstDayOfWeek\"\n :is-date-disabled=\"options?.isDateDisabled\"\n :number-of-months=\"options?.numberOfMonths\"\n :quick-select-ranges=\"options?.quickSelectRanges\"\n :variant=\"options?.variant\"\n :year-range=\"options?.yearRange\"\n :disabled=\"disabled\"\n :granularities=\"options?.granularities\"\n :max-range=\"options?.maxRange\"\n :min=\"options?.min\"\n :max=\"options?.max\"\n :date-form-data=\"formData\"\n :show-end-date-on-open=\"options?.showEndDateOnOpen\"\n :aria-labelledby=\"$attrs?.['aria-labelledby']\"\n @update:model-value=\"onDateInputSelected\"\n />\n\n <template v-else>\n <div class=\"b-date-range-filter\">\n <date-range-picker-calendar\n :allow-time-input=\"options?.allowTimeInput\"\n :first-day-of-week=\"options?.firstDayOfWeek\"\n :is-date-disabled=\"options?.isDateDisabled\"\n :granularities=\"options?.granularities\"\n :max-range=\"options?.maxRange\"\n :min=\"options?.min\"\n :max=\"options?.max\"\n :number-of-months=\"options?.numberOfMonths\"\n :quick-select-ranges=\"adjustedQuickSelectRanges\"\n :value=\"internalFilterValue\"\n :date-form-data=\"formData\"\n :show-end-date-on-open=\"options?.showEndDateOnOpen\"\n :variant=\"options?.variant\"\n :year-range=\"options?.yearRange\"\n @input=\"onDateSelected\"\n @custom-range=\"onRangeSelectorInput\"\n @error=\"onDatePickerRangeError\"\n @form-date=\"onDatePickerRangeFormDateInputUpdate\"\n @start-date-selected=\"isSelectingDate = true\"\n >\n <template #title>\n <bento-typography strongest variant=\"body\" el=\"span\">\n {{ label }}\n </bento-typography>\n </template>\n <template #actions>\n <bento-divider class=\"b-date-range-filter__divider\" />\n\n <bento-button-actions\n class=\"b-date-range-filter__actions\"\n :actions=\"actions\"\n layout=\"space-between\"\n />\n </template>\n </date-range-picker-calendar>\n </div>\n </template>\n </bento-base-filter>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, reactive, ref, toRef, watch } from 'vue';\n import { BentoBaseFilter, useBaseFilter } from '../base-filter';\n import {\n type BentoDateRangeFilterOptions,\n type BentoDateRangeFilterValue,\n BentoFilterEvent,\n } from '../../filter-bar.types';\n import { DateRangePickerCalendar } from '@/components/date-range-picker/components/date-range-picker-calendar';\n import { BentoDateRangePicker, type BentoDateRangePickerValue } from '@/components/date-range-picker';\n import { BentoDivider } from '@/components/divider';\n import { BentoTypography } from '@/components/typography';\n import { BentoButtonActions, type BentoButtonActionsList } from '@/components/button/components/button-actions';\n import { useI18n } from '@/utils/ts/i18n';\n import { isSameDay } from 'date-fns/isSameDay';\n import { format } from 'date-fns/format';\n import { isEqual } from 'date-fns/isEqual';\n import { isToday } from 'date-fns/isToday';\n import { dateToTimeInputString } from '@/utils/ts/format-date';\n import { useDateInputFormatter, useDynamicDateFnsLocale } from '@/composables';\n\n import messages from './messages.json';\n import {\n type DateRangePickerCalendarFormData,\n type DateRangePickerCalendarRangeSelectorItem,\n type DateRangePickerCalendarRangeSelectorItems,\n } from '@/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * The Date filter displays a calendar that allows\n * to select a single date.\n *\n * @example\n * import { BentoDateRangeFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDateRangeFilter },\n * template: `\n * <bento-date-range-filter\n * :field=\"filter.field\"\n * :label=\"filter.label\"\n * :options=\"filter.options\"\n * :value=\"filter.value\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-date-range-filter',\n components: {\n BentoBaseFilter,\n BentoButtonActions,\n BentoDateRangePicker,\n BentoTypography,\n BentoDivider,\n DateRangePickerCalendar,\n },\n props: {\n /**\n * Disables the filter from being interacted with.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Default value of the filter to reset to.\n */\n defaultValue: { type: Object as PropType<BentoDateRangeFilterValue>, default: null },\n\n /**\n * Filter name/key referencing the actual property name in the data set.\n * Should be unique per filter bar.\n */\n field: { type: String, required: true },\n\n /**\n * Label text to be displayed\n */\n label: { type: String, required: true },\n\n /**\n * Renders the base filter's slot content only - leaving out the button and the popover.\n * Used for the allFiltersModal component.\n */\n onlySlot: { type: Boolean, default: false },\n\n /**\n * List of options that are needed to setup the filter\n * Available options:\n * - allowTimeInput: Allows user to enter time values in the form\n * - firstDayOfWeek: Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n * - isDateDisabled: Indicate if a date should be disabled or not\n * - maxRange: Set a maximum number of dates to be selectable by the range\n * - numberOfMonths: Number of months rendered on pane\n * - quickSelectRanges: An array that sets the custom range dropdown items. @see BentoDateRangePicker\n * - showEndDateOnOpen: Upon opening date range picker, end date's month will be pre-selected.\n * - granularities: A list of available granularities.\n * - variant: The type of calendar to display. Defaults to showing days.\n * - tooltipPosition: The position of the tooltip attached to the filter button\n * - tooltipText: The content of the tooltip attached to the filter button\n */\n options: {\n type: Object as PropType<BentoDateRangeFilterOptions>,\n default: undefined,\n },\n\n /**\n * Current value of the filter\n */\n value: {\n type: Object as PropType<BentoDateRangeFilterValue>,\n default: () => ({ startDate: undefined, endDate: undefined }),\n },\n },\n emits: [BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE],\n setup(props, { emit }) {\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n const dateLocale = useDynamicDateFnsLocale(locale);\n const { dateToInputDateString } = useDateInputFormatter();\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } = useBaseFilter(\n toRef(props, 'value'),\n toRef(props, 'defaultValue')\n );\n const isSelectingDate = ref(false);\n\n const adjustedQuickSelectRanges = computed<Array<DateRangePickerCalendarRangeSelectorItem>>(() => {\n return (\n props?.options?.quickSelectRanges &&\n props.options.quickSelectRanges.map((range: DateRangePickerCalendarRangeSelectorItem) => {\n const timeDiff = !range.data.endDate\n ? new Date(Date.now()).getTime() - range.data.startDate.getTime()\n : undefined;\n return {\n ...range,\n data: {\n ...range.data,\n // Adding timeDifference to calculate an up-to-date endDate on range selection\n timeDifference: timeDiff,\n },\n };\n })\n );\n });\n\n const baseFilter = ref(null);\n const isDateIncorrect = ref(false);\n const formData = reactive({\n startDate: dateToInputDateString(props.value?.startDate),\n endDate: dateToInputDateString(props.value?.endDate),\n startTime: dateToTimeInputString(props.value?.startDate),\n endTime: dateToTimeInputString(props.value?.endDate),\n });\n watch(\n () => props.value,\n () => {\n formData.startDate = dateToInputDateString(props.value?.startDate);\n formData.endDate = dateToInputDateString(props.value?.endDate);\n formData.startTime = dateToTimeInputString(props.value?.startDate);\n formData.endTime = dateToTimeInputString(props.value?.endDate);\n }\n );\n\n function isQuickSelectAnArray(\n quickSelectRanges: BentoDateRangeFilterOptions['quickSelectRanges']\n ): quickSelectRanges is DateRangePickerCalendarRangeSelectorItems {\n return (quickSelectRanges as DateRangePickerCalendarRangeSelectorItems)?.length !== undefined;\n }\n\n const calculateSecondaryLabel = (currentValue: BentoDateRangeFilterValue) => {\n if (!currentValue || (!currentValue?.startDate && !currentValue.endDate)) {\n return null;\n }\n // If quick select range selected then display its label\n if (\n isQuickSelectAnArray(props.options?.quickSelectRanges) &&\n props.options?.quickSelectRanges?.length > 0\n ) {\n const customRangeSelected = props.options?.quickSelectRanges?.find(({ value, data }) => {\n if (currentValue) {\n if (currentValue.range) {\n return value === currentValue.range;\n }\n\n if (!currentValue.startDate || !currentValue.endDate) {\n return false;\n }\n\n if (!data?.endDate) {\n // Autoselecting the correct value for open-ended ranges\n return (\n isEqual(data?.startDate, currentValue.startDate) && isToday(currentValue.endDate)\n );\n }\n // If no range selected but start and end dates correspond to one of the preselected ranges, select it\n return (\n isEqual(data?.startDate, currentValue.startDate) &&\n isEqual(data?.endDate, currentValue.endDate)\n );\n }\n return false;\n });\n\n if (customRangeSelected) {\n return customRangeSelected.label;\n }\n }\n\n if (!currentValue.startDate || !currentValue.endDate) {\n return null;\n }\n\n return isSameDay(currentValue.startDate, currentValue.endDate) && props?.options?.allowTimeInput\n ? `${format(currentValue.startDate, 'dd MMM, yyyy HH:mm:ss', {\n locale: dateLocale.value,\n })} - ${format(currentValue.endDate, 'HH:mm:ss', {\n locale: dateLocale.value,\n })}`\n : `${format(currentValue.startDate, 'dd MMM, yyyy', {\n locale: dateLocale.value,\n })} - ${format(currentValue.endDate, 'dd MMM, yyyy', {\n locale: dateLocale.value,\n })}`;\n };\n\n const buttonSecondaryLabel = computed(() => calculateSecondaryLabel(props.value));\n const buttonLabel = computed(() => props.label);\n\n const updateFilter = () => {\n baseFilter.value.closePopover();\n // Omit the onlySlot prop as it is not needed\n const { onlySlot, ...cleanedProps } = props;\n emit(BentoFilterEvent.UPDATE, { ...cleanedProps, value: internalFilterValue.value });\n };\n\n const clearFilter = () => {\n internalFilterValue.value = undefined;\n updateFilter();\n };\n\n const resetFilter = () => {\n internalFilterValue.value = props.defaultValue;\n updateFilter();\n };\n\n const openFilter = () => {\n internalFilterValue.value = props.value;\n };\n\n // If we click outside or press escape this should cancel and reset the form inputs\n // set all internal states back to their initial values\n const onCancel = () => {\n internalFilterValue.value = props.value;\n isSelectingDate.value = false;\n formData.startDate = dateToInputDateString(props.value?.startDate);\n formData.endDate = dateToInputDateString(props.value?.endDate);\n formData.startTime = dateToTimeInputString(props.value?.startDate);\n formData.endTime = dateToTimeInputString(props.value?.endDate);\n };\n\n const onDateSelected = (selectedDate: BentoDateRangePickerValue) => {\n isSelectingDate.value = false;\n internalFilterValue.value = selectedDate;\n formData.startDate = dateToInputDateString(selectedDate.startDate);\n formData.endDate = dateToInputDateString(selectedDate.endDate);\n emit(BentoFilterEvent.INPUT, { ...props, value: internalFilterValue.value });\n };\n\n const onRangeSelectorInput = (quickSelectRanges?: { startDate: Date; endDate: Date }) => {\n if (quickSelectRanges?.startDate && quickSelectRanges?.endDate) {\n internalFilterValue.value = quickSelectRanges;\n formData.startDate = dateToInputDateString(quickSelectRanges.startDate);\n formData.endDate = dateToInputDateString(quickSelectRanges.endDate);\n emit(BentoFilterEvent.INPUT, { ...props, value: internalFilterValue.value });\n }\n };\n\n // Need to update the internal value and emit the date when using the date-picker input\n const onDateInputSelected = (selectedDate: BentoDateRangePickerValue) => {\n onDateSelected(selectedDate);\n emit(BentoFilterEvent.INPUT, { ...props, value: internalFilterValue.value });\n };\n\n const actions = computed(\n () =>\n [\n {\n title: t('apply') as string,\n event: updateFilter,\n disabled: isSelectingDate.value || isDateIncorrect.value || isApplyButtonDisabled.value,\n },\n {\n title: (props.defaultValue ? t('reset') : t('clear')) as string,\n event: (props.defaultValue ? resetFilter : clearFilter) as () => void,\n disabled: isDateIncorrect.value && isSecondaryButtonDisabled.value,\n },\n ] as BentoButtonActionsList\n );\n\n const onDatePickerRangeError = () => {\n isDateIncorrect.value = true;\n internalFilterValue.value = { startDate: undefined, endDate: undefined };\n emit(BentoFilterEvent.INPUT, { ...props, value: internalFilterValue.value });\n };\n\n const onDatePickerRangeFormDateInputUpdate = (dateFormDate: DateRangePickerCalendarFormData) => {\n isDateIncorrect.value = false;\n\n if (dateFormDate.startTime) {\n formData.startTime = dateFormDate.startTime;\n }\n\n if (dateFormDate.endTime) {\n formData.endTime = dateFormDate.endTime;\n }\n };\n\n return {\n // Refs\n baseFilter,\n\n // Values\n actions,\n formData,\n internalFilterValue,\n isApplyButtonDisabled,\n isSecondaryButtonDisabled,\n isSelectingDate,\n buttonLabel,\n buttonSecondaryLabel,\n adjustedQuickSelectRanges,\n\n // Events\n onCancel,\n onDateSelected,\n openFilter,\n clearFilter,\n resetFilter,\n updateFilter,\n onDatePickerRangeError,\n onDatePickerRangeFormDateInputUpdate,\n onDateInputSelected,\n onRangeSelectorInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-range-filter.scss\" />\n","<template>\n <bento-base-filter\n v-bind=\"$props\"\n :button-label=\"label\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :disable-apply-button=\"isApplyButtonDisabled\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :only-slot=\"onlySlot\"\n @apply=\"updateFilter\"\n @clear=\"clearFilter(updateFilter)\"\n @open=\"openFilter\"\n @reset=\"resetFilter(updateFilter)\"\n >\n <div class=\"b-radio-group-filter\" :class=\"conditionalClasses\">\n <bento-radio-group\n v-model=\"internalFilterValue\"\n :items=\"options?.items\"\n :label=\"label\"\n :disabled=\"disabled\"\n hide-label\n variant=\"vertical\"\n @update:model-value=\"onInput\"\n />\n </div>\n </bento-base-filter>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoRadioGroup } from '@/components/radio-group';\n import { BentoBaseFilter } from '../base-filter';\n import { computed, toRef } from 'vue';\n import { useBentoBaseFilter } from '@/composables/use-bento-base-filter';\n import { truncate } from '@/utils/ts/truncate';\n import { type BentoRadioGroupFilterProps, type BentoRadioGroupFilterValue } from './radio-group-filter.types';\n\n const props = defineProps({\n disabled: { type: Boolean },\n defaultValue: { default: undefined },\n field: null,\n label: null,\n options: { default: () => ({\n items: [],\n }) },\n onlySlot: { type: Boolean },\n value: { default: undefined }\n});\n\n const emit = defineEmits([\"input\", \"update\"]);\n\n const {\n // Fields\n internalFilterValue,\n isSecondaryButtonDisabled,\n isApplyButtonDisabled,\n // Methods\n clearFilter,\n openFilter,\n resetFilter,\n } = useBentoBaseFilter<BentoRadioGroupFilterValue>(toRef(props, 'value'), toRef(props, 'defaultValue'));\n\n // Used to truncate the label of the selected option\n const buttonSecondaryLabel = computed(() => {\n const selectedValueLabel = props.options.items.find(item => item.value === props.value)?.label || '';\n return truncate(selectedValueLabel, 12);\n });\n\n const conditionalClasses = computed(() => ({\n [`b-radio-group-filter--only-slot`]: props.onlySlot,\n }));\n\n function onInput(newValue: BentoRadioGroupFilterValue) {\n internalFilterValue.value = newValue;\n // Emitted for the filter bar all filters modal\n emit('input', { ...props, value: internalFilterValue.value });\n }\n\n function updateFilter() {\n // Emitted for the filter bar\n emit('update', { ...props, value: internalFilterValue.value });\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Radio group filter component\n *\n * @example\n * import { BentoRadioGroupFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoRadioGroupFilter },\n * template: `\n * <bento-radio-group-filter\n * :label=\"label\"\n * :options=\"{\n * items: [\n * { value: 'value1', label: 'Label 1' },\n * { value: 'value2', label: 'Label 2' },\n * ],\n * }\"\n * value=\"value1\"\n * defaultValue=\"value2\"\n * />\n * `\n * }\n */\n export default {\n name: 'bento-radio-group-filter',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-group-filter.scss\" />\n","<template>\n <bento-base-filter\n :applied-filters-count=\"appliedFiltersCount\"\n :button-label=\"buttonLabel\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :disabled=\"disabled\"\n :disable-apply-button=\"isApplyButtonDisabled\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :default-value=\"defaultValue\"\n :label=\"label\"\n :field=\"field\"\n :only-slot=\"false\"\n :tooltip-position=\"options?.tooltipPosition\"\n :tooltip-text=\"options?.tooltipText\"\n :value=\"value\"\n @apply=\"updateFilter\"\n @clear=\"clearFilter\"\n @reset=\"resetFilter\"\n @open=\"openFilter\"\n @close=\"closeFilter\"\n >\n <div class=\"b-select-filter-button__search-bar-wrapper\">\n <div v-if=\"options?.dynamicFiltering ?? true\" class=\"b-select-filter-button__search-bar\">\n <bento-search-bar\n :debounce-time=\"options?.search?.debounceTime\"\n :value=\"searchTerm\"\n :input-field-aria-label=\"t('searchFilter', { filter: label.toLocaleLowerCase() })\"\n @input=\"searchTerm = $event\"\n />\n </div>\n\n <div class=\"b-select-filter-button__divider\">\n <bento-divider />\n </div>\n </div>\n\n <bento-listbox\n :id=\"listboxFilterId\"\n :aria-label=\"label\"\n class=\"b-select-filter-button__wrapper\"\n :component-loading=\"options?.loading\"\n :empty-state=\"options?.emptyState\"\n :has-more-items=\"options?.lazy?.hasMoreItems\"\n :items=\"filteredItems\"\n :is-option-disabled=\"options?.isOptionDisabled\"\n :lazy-load-type=\"options?.lazy?.lazyLoadType\"\n :loading=\"options?.lazy?.loading\"\n :multiple=\"options?.multiple\"\n :static-categories=\"options?.staticCategories\"\n :no-results-message=\"noResultsMessage\"\n :searching=\"!!searchTerm\"\n :selected-value=\"internalFilterValue\"\n :virtual-scroll=\"options?.virtualScroll\"\n @select=\"onOptionSelected\"\n @space-pressed=\"onOptionSelected\"\n @enter-pressed=\"onOptionSelected\"\n @show-more=\"options?.lazy?.showMoreEvent()\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox>\n </bento-base-filter>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type PropType, ref, toRef, useSlots, watch } from 'vue';\n\n // Components\n import BentoSearchBar from '@/components/search-bar/search-bar.vue';\n import { BentoDivider } from '@/components/divider';\n import { BentoListbox, useCachedSelectedValues } from '@/internal';\n import {\n type BentoListboxMultiSelectValue,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxSelectedValue,\n type BentoListboxSelectedValueLabelPair,\n type BentoListboxValue,\n } from '@/types/listbox';\n import { BentoBaseFilter, useBaseFilter } from '../../../base-filter';\n\n // Types\n import { BentoFilterEvent, type BentoSelectFilterOptions } from '../../../../filter-bar.types';\n\n // Utilities\n import { useSearchBarFilter } from '@/components/search-bar';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { truncate } from '@/utils/ts/truncate';\n import { useI18n } from '@/utils/ts/i18n';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n\n const emit = defineEmits([\"input\", \"update\"]);\n\n const props = defineProps({\n /**\n * Disables the filter from being interacted with.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Default value of the filter to reset to.\n *\n */\n defaultValue: {\n type: [String, Number, Array] as PropType<BentoListboxSelectedValue>,\n default: null,\n },\n\n /**\n * Filter name/key referencing the actual property name in the data set.\n * Should be unique per filter bar.\n */\n field: { type: String, required: true },\n\n /**\n * Label text to be displayed\n */\n label: { type: String, required: true },\n\n /**\n * Renders the base filter's slot content only - leaving out the button and the popover.\n * Used for the allFiltersModal component.\n */\n onlySlot: { type: Boolean, default: false },\n\n /**\n * List of options that are needed to setup the filter\n * Available options:\n * - multiple: If \"true\", the user will be able to select multiple items.\n * - listboxItems: The option elements to populate the filter with.\n *\n * @default undefined\n */\n options: {\n type: Object as PropType<BentoSelectFilterOptions>,\n default: undefined,\n },\n\n /**\n * Current value of the filter\n *\n * @default undefined\n */\n value: {\n type: [String, Number, Array, Object] as PropType<BentoListboxSelectedValue>,\n default: undefined,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const searchTerm = ref('');\n const optionsRef = toRef(props, 'options');\n const itemsRef = ref(props.options.listboxItems ?? []);\n\n const { cachedSelectedListboxOptions, setCachedValues, resetCache } = useCachedSelectedValues(\n itemsRef,\n toRef(props, 'value'),\n toRef(optionsRef.value, 'multiple')\n );\n\n const { cachedSelectedListboxOptions: cachedDefaultSelectedListboxOptions } = useCachedSelectedValues(\n itemsRef,\n toRef(props, 'defaultValue'),\n toRef(optionsRef.value, 'multiple')\n );\n\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } =\n useBaseFilter<BentoListboxOptions>(cachedSelectedListboxOptions, cachedDefaultSelectedListboxOptions);\n\n // We need to make sure to update the items if the consumer updates them manually\n watch(optionsRef, () => {\n itemsRef.value = optionsRef.value.listboxItems ?? [];\n });\n\n const filteredItems = useSearchBarFilter<BentoListboxOptionItem>(\n searchTerm,\n itemsRef,\n props.options?.search?.searchEvent\n );\n const noResultsMessage = computed(() => t('noFiltersMatchThisSearch') as string);\n\n const buttonLabel = computed(() => props.label);\n\n const buttonSecondaryLabel = computed(() => {\n const isSingleSelectAndOneItemSelected = !props?.options?.multiple && props.value != null;\n const isMultiSelectedAndOneItemSelected =\n props?.options?.multiple && Array.isArray(props.value) && props.value.length === 1;\n\n // When only 1 item is selected: Display the Label of the selected value or use value as Label\n if (isSingleSelectAndOneItemSelected || isMultiSelectedAndOneItemSelected) {\n // If enableValueLabelPair is enabled then \"value\" has the label, no need to search for it.\n if (props.options?.enableValueLabelPair) {\n let displayValue =\n (props.value as Array<BentoListboxSelectedValueLabelPair>)?.length > 0\n ? (props.value[0] as BentoListboxSelectedValueLabelPair).label\n : (props.value as BentoListboxSelectedValueLabelPair).label;\n\n if (!displayValue) {\n displayValue = props.value as string;\n printDevelopmentWarning(\n 'BentoFilterBar Select filter (single & multi): The \"value\" provided is incorrect. The \"value\" must be of type \"BentoListboxSelectedValueLabelPair\" or \"Array<BentoListboxSelectedValueLabelPair>\" when \"enableValueLabelPair\" is set to true'\n );\n }\n return truncate(displayValue as string, 12);\n }\n\n const flatListboxItems = props.options.listboxItems.flatMap(x => (x.items ? x.items : x));\n // If the value is not in the list of Items set the value as secondary label.\n // This happens on external filtering\n let displayValue = flatListboxItems.find(({ value }) =>\n Array.isArray(props.value)\n ? (props?.value as BentoListboxMultiSelectValue)?.includes(value as BentoListboxValue)\n : value === props.value\n )?.label;\n\n if (!displayValue && props.value) {\n displayValue = (props.value as BentoListboxMultiSelectValue)[0] as string;\n }\n\n return truncate(displayValue, 12);\n }\n return null;\n });\n\n const listboxFilterId = computed(() => generateUid(`filter-listbox-${props.field}`));\n\n const onOptionSelected = (selectedValue: BentoListboxOptions) => {\n internalFilterValue.value = selectedValue;\n\n const { onlySlot, ...cleanedProps } = props;\n // Return null if there are no selected values\n if (props.options?.multiple) {\n let value: BentoListboxSelectedValue;\n\n if (props.options?.enableValueLabelPair) {\n value = selectedValue.length ? internalFilterValue.value : null;\n } else {\n value = selectedValue.length ? internalFilterValue.value.map(({ value }) => value) : null;\n }\n emit(BentoFilterEvent.INPUT, { ...cleanedProps, value });\n return;\n }\n\n let value: BentoListboxSelectedValue;\n if (props.options?.enableValueLabelPair) {\n value = selectedValue.length ? selectedValue[0] : null;\n } else {\n value = selectedValue.length ? selectedValue[0].value : null;\n }\n emit(BentoFilterEvent.INPUT, { ...cleanedProps, value });\n };\n\n const updateFilter = () => {\n // Omit the onlySlot prop as it is not needed\n const { onlySlot, ...cleanedProps } = props;\n\n if (props.options.multiple) {\n // If multi select filter and all items unchecked,\n // If persistent filter, reset back to default value, else reset back to undefined\n if (internalFilterValue.value && (internalFilterValue.value as Array<unknown>)?.length === 0) {\n internalFilterValue.value =\n props.defaultValue !== null ? cachedDefaultSelectedListboxOptions.value : undefined;\n }\n\n let value: BentoListboxSelectedValue;\n if (props.options?.enableValueLabelPair) {\n value = internalFilterValue.value?.length ? internalFilterValue.value : null;\n } else {\n value = internalFilterValue.value?.length ? internalFilterValue.value?.map(({ value }) => value) : null;\n }\n emit(BentoFilterEvent.UPDATE, {\n ...cleanedProps,\n value,\n });\n return;\n }\n\n let value: BentoListboxSelectedValue;\n if (props.options?.enableValueLabelPair) {\n value = internalFilterValue.value.length ? internalFilterValue.value[0] : undefined;\n } else {\n value = internalFilterValue.value.length ? internalFilterValue.value[0].value : undefined;\n }\n emit(BentoFilterEvent.UPDATE, { ...cleanedProps, value });\n };\n\n const openFilter = () => {\n internalFilterValue.value = cachedSelectedListboxOptions.value;\n props.options?.onOpen?.();\n };\n\n const closeFilter = () => {\n // If the search term is set, reset it to \"empty\"\n if (searchTerm.value) {\n searchTerm.value = '';\n }\n };\n\n const resetFilter = () => {\n setCachedValues(cachedDefaultSelectedListboxOptions.value);\n internalFilterValue.value = cachedDefaultSelectedListboxOptions.value;\n updateFilter();\n };\n\n const clearFilter = () => {\n resetCache();\n internalFilterValue.value = [];\n updateFilter();\n };\n\n const appliedFiltersCount = computed(() => {\n // Don't show if no filter applied or peristent filter or not multiple select\n if (props.value == null || !props.options.multiple) {\n return null;\n }\n\n /*\n * Show amount of items selceted (props.value) or 'All' if all items selected\n */\n\n // If nested we need to get the correct count\n const allSelectableItemsCount = props.options.listboxItems?.reduce((acc, item) => {\n // eslint-disable-next-line no-param-reassign\n acc += item?.items?.length ? item.items.length : 1;\n return acc;\n }, 0);\n\n const selectedAmount = (props.value as Array<string | number>)?.length;\n\n if (selectedAmount === 1) {\n return null;\n }\n\n return selectedAmount === allSelectableItemsCount ? t('all') : selectedAmount;\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * The Listbox filter displays a listbox of items\n * passed in the \"options.listboxItems\" property.\n *\n * @example\n * import { BentoSelectFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectFilter },\n * template: `\n * <bento-select-filter\n * :field=\"filter.field\"\n * :label=\"filter.label\"\n * :options=\"filter.options\"\n * :value=\"filter.value\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./select-filter-button.scss\" />\n","<template>\n <bento-dropdown\n :model-value=\"internalFilterValue\"\n :items=\"options.listboxItems\"\n :search=\"options?.search\"\n :multiple=\"options?.multiple\"\n :static-categories=\"options?.staticCategories\"\n :no-results-message=\"noResultsMessage\"\n :is-option-disabled=\"options.isOptionDisabled\"\n :dynamic-filtering=\"options?.dynamicFiltering ?? true\"\n :component-loading=\"options?.loading\"\n :empty-state=\"options?.emptyState\"\n :disabled=\"disabled\"\n :enable-value-label-pair=\"options?.enableValueLabelPair\"\n @update:model-value=\"onOptionSelected\"\n @open=\"() => options?.onOpen?.()\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type PropType, ref, toRef, useSlots, watch } from 'vue';\n\n // Components\n import { BentoDropdown } from '@/components/dropdown';\n\n // Composables\n import { useBaseFilter } from '../../../base-filter';\n\n // Types\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoFilterEvent, type BentoSelectFilterOptions } from '../../../../filter-bar.types';\n\n // Utils\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const slots = useSlots();\n\n const emit = defineEmits([\"input\", \"update\"]);\n\n const props = defineProps({\n /**\n * Disables the filter from being interacted with.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Default value of the filter to reset to.\n *\n */\n defaultValue: {\n type: [String, Number, Array] as PropType<BentoListboxSelectedValue>,\n default: null,\n },\n\n /**\n * Filter name/key referencing the actual property name in the data set.\n * Should be unique per filter bar.\n */\n field: { type: String, required: true },\n\n /**\n * Label text to be displayed\n */\n label: { type: String, required: true },\n\n /**\n * Renders the base filter's slot content only - leaving out the button and the popover.\n * Used for the allFiltersModal component.\n *\n */\n onlySlot: { type: Boolean, default: false },\n\n /**\n * List of options that are needed to setup the filter\n * Available options:\n * - multiple: If \"true\", the user will be able to select multiple items.\n * - listboxItems: The option elements to populate the filter with.\n *\n * @default undefined\n */\n options: {\n type: Object as PropType<BentoSelectFilterOptions>,\n default: undefined,\n },\n\n /**\n * Current value of the filter\n *\n * @default undefined\n */\n value: {\n type: [String, Number, Array] as PropType<BentoListboxSelectedValue>,\n default: undefined,\n },\n });\n\n const { internalFilterValue } = useBaseFilter(toRef(props, 'value'), toRef(props, 'defaultValue'));\n\n const optionsRef = toRef(props, 'options');\n const itemsRef = ref(props.options.listboxItems);\n\n // We need to make sure to update the items if the consumer updates them manually\n watch(optionsRef, () => {\n itemsRef.value = optionsRef.value.listboxItems;\n });\n\n const noResultsMessage = computed(() => t('noFiltersMatchThisSearch') as string);\n\n const onOptionSelected = (selectedValue: BentoListboxSelectedValue) => {\n internalFilterValue.value = selectedValue;\n const { onlySlot, ...cleanedProps } = props;\n emit(BentoFilterEvent.INPUT, { ...cleanedProps, value: internalFilterValue.value });\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * The Listbox filter displays a listbox of items\n * passed in the \"options.listboxItems\" property.\n *\n * @example\n * import { BentoSelectFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectFilter },\n * template: `\n * <bento-select-filter\n * :field=\"filter.field\"\n * :label=\"filter.label\"\n * :options=\"filter.options\"\n * :value=\"filter.value\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'select-filter-dropdown',\n };\n</script>\n","import type { PropType } from 'vue';\nimport type { BentoListboxSelectedValue } from '@/types/listbox';\nimport type { BentoSelectFilterOptions } from '@/components/filter-bar/filter-bar.types';\n\nexport const SelectFilterProps = {\n /**\n * Disables the filter from being interacted with.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Default value of the filter to reset to.\n *\n */\n defaultValue: {\n type: [String, Number, Array, Object] as PropType<BentoListboxSelectedValue>,\n default: null,\n },\n\n /**\n * Filter name/key referencing the actual property name in the data set.\n * Should be unique per filter bar.\n */\n field: { type: String, required: true },\n\n /**\n * Label text to be displayed\n */\n label: { type: String, required: true },\n\n /**\n * Renders the base filter's slot content only - leaving out the button and the popover.\n * Used for the allFiltersModal component.\n *\n */\n onlySlot: { type: Boolean, default: false },\n\n /**\n * List of options that are needed to setup the filter\n * Available options:\n * - multiple: If \"true\", the user will be able to select multiple items.\n * - listboxItems: The option elements to populate the filter with.\n * - tooltipPosition: The position of the tooltip attached to the filter button\n * - tooltipText: The content of the tooltip attached to the filter button\n *\n * @default undefined\n */\n options: {\n type: Object as PropType<BentoSelectFilterOptions>,\n default: undefined,\n },\n\n /**\n * Current value of the filter\n *\n * @default undefined\n */\n value: {\n type: [String, Number, Array, Object] as PropType<BentoListboxSelectedValue>,\n default: undefined,\n },\n};\n\nexport default SelectFilterProps;\n","<template>\n <select-filter-dropdown\n v-if=\"onlySlot\"\n :disabled=\"disabled\"\n :default-value=\"defaultValue\"\n :field=\"field\"\n :label=\"label\"\n :options=\"options\"\n :value=\"value\"\n @input=\"onInput\"\n @update=\"onUpdate\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </select-filter-dropdown>\n\n <select-filter-button\n v-else\n :disabled=\"disabled\"\n :default-value=\"defaultValue\"\n :field=\"field\"\n :label=\"label\"\n :options=\"options\"\n :value=\"value\"\n @input=\"onInput\"\n @update=\"onUpdate\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </select-filter-button>\n</template>\n\n<script setup lang=\"ts\">\n import { SelectFilterButton, SelectFilterDropdown } from './components';\n import { useSlots } from 'vue';\n import SelectFilterProps from '@/components/filter-bar/components/select-filter/select-filter.props';\n\n const slots = useSlots();\n\n const emit = defineEmits([\"input\", \"update\"]);\n\n defineProps(SelectFilterProps);\n\n const onInput = (updatedProps: any) => emit('input', updatedProps);\n const onUpdate = (updatedProps: any) => emit('update', updatedProps);\n</script>\n\n<script lang=\"ts\">\n /**\n * The Listbox filter displays a listbox of items\n * passed in the \"options.listboxItems\" property.\n *\n * @example\n * import { BentoSelectFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectFilter },\n * template: `\n * <bento-select-filter\n * :field=\"filter.field\"\n * :label=\"filter.label\"\n * :options=\"filter.options\"\n * :value=\"filter.value\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <bento-select-filter\n v-slot=\"{ label: slotLabel, data }\"\n v-bind=\"$props\"\n :field=\"field\"\n :label=\"label\"\n @update=\"onUpdate\"\n @input=\"e => $emit(BentoFilterEvent.INPUT, e)\"\n >\n <bento-avatar :username=\"slotLabel\" :src=\"data\" />\n </bento-select-filter>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, type PropType } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoSelectFilter } from '../../index';\n import { BentoFilterEvent, type BentoSelectAvatarFilterOptions } from '@/components/filter-bar/filter-bar.types';\n import { BentoAvatar } from '@/components/avatar';\n import SelectFilterProps from '@/components/filter-bar/components/select-filter/select-filter.props';\n\n /**\n * The Select Avatar filter displays a listbox of avatar items\n * passed in the \"options.listboxItems\" property.\n *\n * @example\n * import { BentoSelectAvatarFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectAvatarFilter },\n * template: `\n * <bento-select-avatar-filter\n * :field=\"avatar\"\n * :label=\"Avatar\"\n * :options=\"{\n * listboxItems: [{\n * label: 'Avatar 1',\n * value: 'avatar-2'\n * }, {\n * label: 'Avatar 2',\n * value: 'avatar-2'\n * }],\n * :multiple=\"false\"\n * }\"\n * value=\"avatar-2\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-select-avatar-filter',\n components: {\n BentoSelectFilter,\n BentoAvatar,\n },\n props: {\n ...SelectFilterProps,\n\n /**\n * List of options that are needed to setup the country filter\n * Available options:\n * - multiple: If \"true\", the user will be able to select multiple items.\n * - listboxItems: The option elements to populate the filter with {@see BentoSelectCountryFilterOptions}\n */\n options: {\n type: Object as PropType<BentoSelectAvatarFilterOptions>,\n default: undefined,\n },\n },\n emits: [BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE],\n setup(_, { emit }) {\n const onUpdate = (selectedValue: BentoListboxSelectedValue) => emit(BentoFilterEvent.UPDATE, selectedValue);\n\n return {\n // Enums\n BentoFilterEvent,\n\n // Methods\n onUpdate,\n };\n },\n });\n</script>\n","<template>\n <bento-select-filter\n v-slot=\"slotProps\"\n v-bind=\"$props\"\n :field=\"field\"\n :label=\"label\"\n :options=\"internalOptions\"\n @update=\"onUpdate\"\n @input=\"e => $emit(BentoFilterEvent.INPUT, e)\"\n >\n <listbox-option-tag :option=\"slotProps\" />\n </bento-select-filter>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, ref, watch } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoSelectFilter } from '../../index';\n import { ListboxOptionTag } from '@/internal';\n import { BentoFilterEvent, type BentoSelectCurrencyFilterOptions } from '@/components/filter-bar/filter-bar.types';\n import SelectFilterProps from '@/components/filter-bar/components/select-filter/select-filter.props';\n import { useSearchBarFilter } from '@/components/search-bar';\n import { type BentoCurrencyListboxOptions } from '@/components/dropdown';\n\n /**\n * The Select Country filter displays a listbox of country items\n * passed in the \"options.listboxItems\" property.\n *\n * @example\n * import { BentoCurrencyISOCode, BentoSelectCurrencyFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectCurrencyFilter },\n * template: `\n * <bento-select-currency-filter\n * :field=\"currency\"\n * :label=\"Currency\"\n * :options=\"{\n * listboxItems: [{\n * label: 'Euro',\n * value: BentoCurrencyISOCode.EUR,\n * }, {\n * label: 'US Dollars',\n * value: BentoCurrencyISOCode.USD,\n * }],\n * multiple=\"false\",\n * isOptionsDisabled=\"option => option.value === BentoCurrencyISOCode.USD\"\n * }\"\n * :value=\"BentoCurrencyISOCode.EUR\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-select-currency-filter',\n components: {\n BentoSelectFilter,\n ListboxOptionTag,\n },\n props: {\n ...SelectFilterProps,\n\n /**\n * List of options that are needed to setup the country filter\n * Available options:\n * - multiple: If \"true\", the user will be able to select multiple items.\n * - listboxItems: The option elements to populate the filter with {@see BentoSelectCurrencyFilterOptions}\n */\n options: {\n type: Object as PropType<BentoSelectCurrencyFilterOptions>,\n default: undefined,\n },\n },\n emits: [BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE],\n setup(props, { emit }) {\n const onUpdate = (selectedValue: BentoListboxSelectedValue) => {\n emit(BentoFilterEvent.UPDATE, selectedValue);\n };\n\n // If the parent updates the list, the local reference needs to be updated so the UI isn't empty on load\n const filteredItems = ref<BentoCurrencyListboxOptions>([]);\n\n watch(\n () => props.options?.listboxItems,\n newList => {\n filteredItems.value = newList || [];\n },\n { immediate: true }\n );\n\n const search = props.options?.search\n ? props.options.search\n : {\n debounceTime: 500,\n searchEvent: async (searchTerm: string) => {\n // Combine value and label to be able to search by the currency code\n // If searchTerm is empty, reset to the full list\n if (!searchTerm) {\n filteredItems.value = props.options?.listboxItems || [];\n return;\n }\n\n const searchableItems = (props.options?.listboxItems || []).map(item => ({\n ...item,\n label: `${item.value} ${item.label}`,\n }));\n\n const searchResults = useSearchBarFilter(\n ref(searchTerm),\n ref<BentoCurrencyListboxOptions>(searchableItems),\n props.options?.search?.searchEvent,\n ref(false)\n ).value;\n\n // Restore original labels by removing the prepended value\n const normalizedResults = searchResults?.map(result => ({\n ...result,\n label: result.label.substring(result.value.length + 1),\n }));\n\n filteredItems.value = normalizedResults;\n },\n };\n\n const internalOptions = computed(() => ({\n ...props.options,\n search: search,\n listboxItems: filteredItems.value,\n }));\n\n return {\n // Enums\n BentoFilterEvent,\n\n // Methods\n onUpdate,\n internalOptions,\n };\n },\n });\n</script>\n","<template>\n <bento-select-filter\n v-slot=\"{ label: slotLabel }\"\n v-bind=\"props\"\n :field=\"field\"\n :label=\"label\"\n :options=\"countryOptions\"\n @update=\"onUpdate\"\n @input=\"e => $emit(BentoFilterEvent.INPUT, e)\"\n >\n <bento-typography el=\"span\">{{ slotLabel }}</bento-typography>\n </bento-select-filter>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type PropType, ref, watch } from 'vue';\n import { useCountryItems } from '@/components/dropdown/components/variants/dropdown-country/composables/use-country-items';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoFilterEvent, type BentoSelectCountryFilterOptions } from '@/components/filter-bar/filter-bar.types';\n import { BentoCountryVariant } from '@/components/country';\n import { BentoTypography } from '@/components/typography';\n import BentoSelectFilter from '../../select-filter.vue';\n import SelectFilterProps from '@/components/filter-bar/components/select-filter/select-filter.props';\n\n const props = defineProps({\n ...SelectFilterProps,\n\n /**\n * List of options that are needed to setup the country filter\n * Available options:\n * - multiple: If \"true\", the user will be able to select multiple items.\n * - listboxItems: The option elements to populate the filter with {@see BentoSelectCountryFilterOptions}\n * - variant: Which label variant to display for the option item.\n */\n options: {\n type: Object as PropType<BentoSelectCountryFilterOptions>,\n default: undefined,\n },\n });\n\n const emit = defineEmits([BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE]);\n\n const variant = ref(props.options?.variant ?? BentoCountryVariant.NAME);\n const listboxItems = ref(props.options?.listboxItems);\n\n watch([() => props.options?.variant, () => props.options?.listboxItems], () => {\n variant.value = props.options?.variant ?? BentoCountryVariant.NAME;\n listboxItems.value = props.options?.listboxItems;\n });\n\n const onUpdate = (selectedValue: BentoListboxSelectedValue) => emit(BentoFilterEvent.UPDATE, selectedValue);\n\n const countryItems = useCountryItems(variant, listboxItems);\n const countryOptions = computed(() => {\n return {\n ...(props?.options ? props.options : {}),\n listboxItems: countryItems.value,\n };\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * The Select Country filter displays a listbox of country items\n * passed in the \"options.listboxItems\" property.\n *\n * @example\n * import { BentoSelectCountryFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectCountryFilter },\n * template: `\n * <bento-select-country-filter\n * :field=\"country\"\n * :label=\"Country\"\n * :options=\"{\n * listboxItems: [{\n * value: \"NL\",\n * }, {\n * value: \"BE\",\n * }],\n * variant: 'capital'\n * }\"\n * :value=\"BE\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default {\n name: 'bento-select-country-filter',\n };\n</script>\n","<template>\n <bento-select-filter\n v-slot=\"{ value, label: slotLabel }\"\n v-bind=\"$props\"\n :field=\"field\"\n :label=\"label\"\n @update=\"onUpdate\"\n @input=\"e => $emit(BentoFilterEvent.INPUT, e)\"\n >\n <bento-payment-method :type=\"value\" :label=\"slotLabel\" />\n </bento-select-filter>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, type PropType } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoSelectFilter } from '../../index';\n import {\n BentoFilterEvent,\n type BentoSelectPaymentMethodFilterOptions,\n } from '@/components/filter-bar/filter-bar.types';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import SelectFilterProps from '@/components/filter-bar/components/select-filter/select-filter.props';\n\n /**\n * The Select Payment Method filter displays a listbox of country items\n * passed in the \"options.listboxItems\" property to be used in the FilterBar component.\n *\n * @example\n * import { BentoSelectPaymentMethodFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectPaymentMethodFilter },\n * template: `\n * <bento-select-paymnent-method-filter\n * :field=\"paymentMethod\"\n * :label=\"Payment method\"\n * :options=\"{\n * listboxItems: [\n * { label: 'Option 1', value: 'ideal' },\n * { label: 'Option 2', value: 'visa' },\n * ],\n * }\"\n * value=\"ideal\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-select-payment-method-filter',\n components: {\n BentoSelectFilter,\n BentoPaymentMethod,\n },\n props: {\n ...SelectFilterProps,\n\n /**\n * List of options that are needed to setup the payment method filter\n * Available options:\n * - multiple: If \"true\", the user will be able to select multiple items.\n * - listboxItems: The option elements to populate the filter with {@see BentoSelectPaymentMethodFilterOptions}\n */\n options: {\n type: Object as PropType<BentoSelectPaymentMethodFilterOptions>,\n default: undefined,\n },\n },\n emits: [BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE],\n setup(_props, { emit }) {\n const onUpdate = (selectedValue: BentoListboxSelectedValue) => emit(BentoFilterEvent.UPDATE, selectedValue);\n\n return {\n // Enums\n BentoFilterEvent,\n\n // Methods\n onUpdate,\n };\n },\n });\n</script>\n","<template>\n <bento-select-filter\n v-slot=\"{ label: slotLabel, data }\"\n v-bind=\"$props\"\n :field=\"field\"\n :label=\"label\"\n :options=\"countryOptions\"\n @update=\"onUpdate\"\n @input=\"e => $emit(BentoFilterEvent.INPUT, e)\"\n >\n <listbox-option-tag :option=\"{ value: slotLabel, data, label: '' }\" />\n </bento-select-filter>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoSelectFilter } from '../../index';\n import { BentoFilterEvent, type BentoSelectTagFilterOptions } from '@/components/filter-bar/filter-bar.types';\n import { ListboxOptionTag } from '@/internal';\n import SelectFilterProps from '@/components/filter-bar/components/select-filter/select-filter.props';\n\n /**\n * The Select Tag filter displays a listbox of tag items\n * passed in the \"options.listboxItems\" property.\n *\n * @example\n * import { BentoSelectTagFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectTagFilter },\n * template: `\n * <bento-select-tag-filter\n * :field=\"tag\"\n * :label=\"Tag\"\n * :options=\"{\n * listboxItems: [\n * { label: 'Offline', value: 'unique-id-1', variant: 'red' },\n * { label: 'Online', value: 'unique-id-2', variant: 'green' },\n * { label: 'Standby', value: 'unique-id-3', variant: 'orange' },\n * { label: 'Busy with things', value: 'unique-id-4', variant: 'blue' },\n * ]\n * }\"\n * :value=\"'unique-id-4'\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-select-country-filter',\n components: {\n BentoSelectFilter,\n ListboxOptionTag,\n },\n props: {\n ...SelectFilterProps,\n\n /**\n * List of options that are needed to setup the tag filter\n * Available options:\n * - multiple: If \"true\", the user will be able to select multiple items.\n * - listboxItems: The option elements to populate the filter with {@see BentoSelectTagFilterOptions}\n */\n options: {\n type: Object as PropType<BentoSelectTagFilterOptions>,\n default: undefined,\n },\n },\n emits: [BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE],\n setup(props, { emit }) {\n const onUpdate = (selectedValue: BentoListboxSelectedValue) => emit(BentoFilterEvent.UPDATE, selectedValue);\n\n const tagItems = computed(() =>\n props?.options?.listboxItems?.map(({ label, value, variant }) => ({ label, value, data: variant }))\n );\n const countryOptions = computed(() => ({\n ...props.options,\n listboxItems: tagItems.value,\n }));\n\n return {\n // Values\n countryOptions,\n\n // Methods\n onUpdate,\n\n // Enums\n BentoFilterEvent,\n };\n },\n });\n</script>\n","<template>\n <filter-bar-button-group\n v-if=\"!onlySlot\"\n v-bento-tooltip-directive:[options?.tooltipPosition]=\"options?.tooltipText\"\n :skip-grouping=\"!internalValue\"\n >\n <filter-bar-button\n :aria-pressed=\"internalValue ? 'true' : 'false'\"\n :active=\"internalValue\"\n :disabled=\"disabled\"\n @click=\"toggleFilter\"\n >\n <div class=\"b-toggle-filter\">\n {{ label }}\n <checkmark-icon v-show=\"internalValue\" aria-hidden=\"true\" class=\"b-toggle-filter__checkmark\" />\n </div>\n </filter-bar-button>\n\n <filter-bar-button\n v-if=\"internalValue\"\n :aria-label=\"t('resetFilter', { filterName: label })\"\n :disabled=\"disabled\"\n :active=\"internalValue\"\n @click=\"resetFilter\"\n >\n <template #iconLeft>\n <cross-small-icon aria-hidden=\"true\" />\n </template>\n </filter-bar-button>\n </filter-bar-button-group>\n\n <label v-else class=\"b-toggle-filter__only-slot\" :class=\"onlySlotConditionalClasses\">\n <checkbox-input\n :aria-labelledby=\"checkboxLabelId\"\n :aria-describedby=\"checkboxDescriptionId\"\n :disabled=\"disabled\"\n class=\"b-toggle-filter__checkbox\"\n :model-value=\"internalValue\"\n @update:model-value=\"onInput\"\n ></checkbox-input>\n <div class=\"b-toggle-filter__content\">\n <bento-typography :id=\"checkboxLabelId\" variant=\"title\" medium>{{ label }}</bento-typography>\n <bento-typography v-if=\"description\" :id=\"checkboxDescriptionId\">{{ description }}</bento-typography>\n </div>\n </label>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue';\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives/tooltip/tooltip';\n import { FilterBarButtonGroup } from '../filter-bar-button-group';\n import { FilterBarButton } from '../filter-bar-button';\n import { type BentoToggleFilterProps, type BentoToggleFilterValue } from './toggle-filter.types';\n import { CheckboxInput } from '@/internal/checkbox-input';\n import { BentoTypography } from '@/components/typography';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { useI18n } from '@/utils/ts/i18n';\n import CheckmarkIcon from '@adyen/ui-assets-icons-16/vue/checkmark';\n import CrossSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-small';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n /**\n * IDs used for the checkbox a11y\n */\n const checkboxLabelId = generateUid('toggle-filter-checkbox-label');\n const checkboxDescriptionId = generateUid('toggle-filter-checkbox-description');\n\n const props = defineProps({\n description: null,\n disabled: { type: Boolean, default: false },\n field: null,\n label: null,\n onlySlot: { type: Boolean, default: false },\n options: { default: undefined },\n value: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([\"input\", \"update\"]);\n\n /**\n * Toggle internal field in sync with props.value\n */\n const internalValue = ref<BentoToggleFilterValue>(props.value);\n watch(\n () => props.value,\n value => {\n internalValue.value = value;\n }\n );\n\n const onlySlotConditionalClasses = computed(() => ({\n 'b-toggle-filter__only-slot--disabled': props.disabled,\n }));\n\n /**\n * Used only for the checkbox.\n * Input emitted for the `all filters` modal\n * @param value new checkbox value\n */\n const onInput = (value: BentoToggleFilterValue) => {\n internalValue.value = value;\n emit('input', { ...props, value });\n };\n\n /**\n * Applies the filter.\n * Update emitted for the filter bar. Updates all props\n */\n const updateProps = () => {\n emit('update', { ...props, value: internalValue.value });\n };\n\n /**\n * Toggles filter with the main part (left side button)\n */\n const toggleFilter = () => {\n internalValue.value = !internalValue.value;\n updateProps();\n };\n\n /**\n * Resets filter with the main part (left side button).\n * Has no persistent filter functionality.\n */\n const resetFilter = () => {\n internalValue.value = false;\n updateProps();\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Toggle filter.\n *\n * @example\n * import { BentoToggleFilter } from './toggle-filter';\n *\n * export default {\n * components: { BentoToggleFilter },\n * template: `\n * <bento-toggle-filter\n * label=\"Toggle filter\"\n * field=\"toggle-filter\"\n * only-slot\n * disabled\n * :value=\"true\"\n * :tooltip-text=\"Tooltip text\"\n * tooltip-position=\"top\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-toggle-filter',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./toggle-filter.scss\" />\n","<template>\n <bento-base-filter\n v-bind=\"$props\"\n :value=\"translatedValue\"\n :default-value=\"translatedDefaultValue\"\n :button-label=\"buttonLabel\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :disable-apply-button=\"isApplyButtonDisabled\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :only-slot=\"onlySlot\"\n :tooltip-position=\"options?.tooltipPosition\"\n :tooltip-text=\"options?.tooltipText\"\n @apply=\"updateFilter\"\n @clear=\"clearFilter\"\n @open=\"openFilter\"\n @reset=\"resetFilter\"\n >\n <div class=\"b-boolean-filter\" :class=\"conditionalClasses\" @keydown.enter=\"updateFilter\">\n <bento-radio-group\n :items=\"items\"\n :label=\"label\"\n :model-value=\"internalFilterValue\"\n :disabled=\"disabled\"\n hide-label\n @update:model-value=\"onInput\"\n ></bento-radio-group>\n </div>\n </bento-base-filter>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onBeforeUpdate, onMounted, type PropType } from 'vue';\n import { BentoBaseFilter, useBaseFilter } from '@/components/filter-bar/components/base-filter';\n import { BentoRadioGroup } from '@/components/radio-group';\n import { useI18n } from '@/utils/ts/i18n';\n import { truncate } from '@/utils/ts/truncate';\n import { deprecate } from '@/utils/ts/deprecate';\n import { type BentoBooleanFilterOptions, BentoFilterEvent } from '../../filter-bar.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Boolean filter\n *\n * @deprecated Since v2.0.0. Use `BentoFilterItemType.RADIO_GROUP` instead.\n *\n * @example\n * import { BentoBooleanFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoBooleanFilter },\n * template: `\n * <bento-boolean-filter>\n * ...Example code of the component\n * </bento-boolean-filter>\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-boolean-filter',\n i18n: { messages },\n components: { BentoBaseFilter, BentoRadioGroup },\n props: {\n /**\n * Disables the filter from being interacted with.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Default value of the filter to reset to.\n */\n defaultValue: { type: [String, Boolean], default: null },\n\n /**\n * Filter name/key referencing the actual property name in the data set.\n * Should be unique per filter bar.\n */\n field: { type: String, required: true },\n\n /**\n * Label text to be displayed\n */\n label: { type: String, required: true },\n\n /**\n * Current value of the filter\n */\n value: { type: [String, Boolean], default: null },\n\n /**\n * Renders the base filter's slot content only - leaving out the button and the popover.\n * Used for the allFiltersModal component.\n */\n onlySlot: { type: Boolean, default: false },\n\n /**\n * List of options that are needed to setup the filter\n * Available options:\n * - positiveOption: The positive option label/value\n * - negativeOption: The positive option label/value\n * - tooltipPosition: The position of the tooltip attached to the filter button\n * - tooltipText: The content of the tooltip attached to the filter button\n */\n options: {\n type: Object as PropType<BentoBooleanFilterOptions>,\n default: undefined,\n },\n },\n emits: [BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE],\n setup(props, { emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n /**\n * Translates a value, that possibly is a boolean, always to a string.\n */\n const translateBooleanToString = (aStringOrBooleanValue?: string | boolean) => {\n if (typeof aStringOrBooleanValue === 'boolean') {\n return aStringOrBooleanValue?.toString();\n }\n return aStringOrBooleanValue;\n };\n\n /**\n * Translates a value that back to a boolean if the value property was given as a boolean.\n */\n const translateBackToOriginalValueType = (aStringOrBooleanValue: string | boolean) => {\n if (\n props?.options?.positiveOption?.value !== undefined &&\n props?.options?.negativeOption?.value !== undefined &&\n typeof props.options.positiveOption.value === 'boolean' &&\n typeof props.options.negativeOption.value === 'boolean' &&\n typeof aStringOrBooleanValue === 'string'\n ) {\n return aStringOrBooleanValue === 'true';\n }\n return aStringOrBooleanValue;\n };\n\n const translatedDefaultValue = computed(() => translateBooleanToString(props.defaultValue));\n const translatedValue = computed(() => translateBooleanToString(props.value));\n const items = computed(() => {\n if (props.options && props.options.positiveOption && props.options.negativeOption) {\n return [\n {\n ...props.options.positiveOption,\n value: translateBooleanToString(props.options.positiveOption.value),\n },\n {\n ...props.options.negativeOption,\n value: translateBooleanToString(props.options.negativeOption.value),\n },\n ];\n }\n return [\n { value: 'yes', label: t('yes') as string },\n { value: 'no', label: t('no') as string },\n ];\n });\n\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } = useBaseFilter(\n translatedValue,\n translatedDefaultValue\n );\n\n const buttonLabel = computed(() => props.label);\n const buttonSecondaryLabel = computed(() =>\n truncate(items.value.find(({ value }) => value === translatedValue.value)?.label, 12)\n );\n\n const conditionalClasses = computed(() => ({\n [`b-boolean-filter--only-slot`]: props.onlySlot,\n }));\n\n onBeforeUpdate(() => {\n // Set value to null when the value is unset\n if (!internalFilterValue.value) {\n internalFilterValue.value = null;\n }\n });\n\n const onInput = event => {\n internalFilterValue.value = event;\n emit(BentoFilterEvent.INPUT, {\n ...props,\n value: translateBackToOriginalValueType(internalFilterValue.value),\n });\n };\n\n const openFilter = () => {\n internalFilterValue.value = translatedValue.value;\n };\n\n const updateFilter = () => {\n emit(BentoFilterEvent.UPDATE, {\n ...props,\n value: translateBackToOriginalValueType(internalFilterValue.value),\n });\n };\n\n const resetFilter = () => emit(BentoFilterEvent.UPDATE, { ...props, value: props.defaultValue });\n\n const clearFilter = () => {\n internalFilterValue.value = null;\n updateFilter();\n };\n\n /**\n * Deprecations\n */\n\n onMounted(() => {\n deprecate(\n 'Boolean filter \"BentoFilterItemType.BOOLEAN\"',\n `Use the Radio group filter type \"BentoFilterItemType.RADIO_GROUP\" instead.`,\n '2.0.0'\n );\n });\n\n return {\n // Values\n items,\n conditionalClasses,\n buttonLabel,\n buttonSecondaryLabel,\n internalFilterValue,\n isApplyButtonDisabled,\n isSecondaryButtonDisabled,\n translatedValue,\n translatedDefaultValue,\n\n // Events\n onInput,\n updateFilter,\n clearFilter,\n openFilter,\n resetFilter,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./boolean-filter.scss\" />\n","import { computed, nextTick, ref, unref, watch } from 'vue';\nimport type { NumericInputEvent, NumericKeyDownEvent, UseNumericInputOptions } from './use-numeric-input.types';\nimport { useI18n } from '@/utils/ts/i18n';\n\nconst isDigit = (value: string) => /^\\d$/.test(value);\n\n/**\n * Composable to handle localized numeric input with live formatting and caret management.\n */\nexport function useNumericInput(options: UseNumericInputOptions) {\n const { value, onInput } = options;\n const prettyOutput = computed(() => unref(options.prettyOutput) ?? false);\n const { n, locale } = useI18n();\n\n const inputRef = ref<HTMLInputElement | null>(null);\n const isFocused = ref(false);\n const negative = ref(false);\n const focusedDecimalPart = ref<string | null>(null);\n const privateValue = ref<number | null>(null);\n\n // Detect locale-specific separators\n const decimalSeparator = computed(() => {\n const parts = new Intl.NumberFormat(locale.value, { style: 'decimal' }).formatToParts(0.1);\n return parts.find(p => p.type === 'decimal')?.value || '.';\n });\n\n const maximumFractionDigits = computed(() => {\n return new Intl.NumberFormat(locale.value, { style: 'decimal' }).resolvedOptions().maximumFractionDigits;\n });\n\n const invalidPattern = computed(() => new RegExp(`[^\\\\d${decimalSeparator.value}]`, 'g'));\n\n const getEventTargetValue = (event: NumericInputEvent) => {\n if (typeof event === 'string') {\n return event.trim();\n }\n\n const target = event.target as HTMLInputElement | { value?: string } | null | undefined;\n return target?.value?.trim() ?? '';\n };\n\n // Sanitize once, then keep both the numeric value and the typed decimal text.\n const parseInputValue = (inputValue: string) => {\n const isNegative = inputValue.startsWith('-');\n const sanitizedValue = inputValue.slice(isNegative ? 1 : 0).replace(invalidPattern.value, '');\n const decimalSeparatorIndex = sanitizedValue.indexOf(decimalSeparator.value);\n const hasSingleDecimalSeparator =\n decimalSeparatorIndex !== -1 &&\n decimalSeparatorIndex === sanitizedValue.lastIndexOf(decimalSeparator.value);\n // Only preserve partial decimals when there is exactly one separator; \"1..2\" should stay invalid.\n const decimalPart = hasSingleDecimalSeparator\n ? sanitizedValue.slice(decimalSeparatorIndex + decimalSeparator.value.length)\n : null;\n // Intl decimal formatting caps fractions by default; mirror that for continued typing past the limit.\n const shouldCapDecimalPart = prettyOutput.value && isFocused.value && focusedDecimalPart.value !== null;\n const cappedDecimalPart =\n shouldCapDecimalPart && decimalPart !== null\n ? decimalPart.slice(0, maximumFractionDigits.value)\n : decimalPart;\n const cappedSanitizedValue =\n cappedDecimalPart !== null\n ? `${sanitizedValue.slice(0, decimalSeparatorIndex)}${decimalSeparator.value}${cappedDecimalPart}`\n : sanitizedValue;\n const normalizedValue =\n decimalSeparator.value === '.'\n ? cappedSanitizedValue\n : cappedSanitizedValue.split(decimalSeparator.value).join('.');\n const numberValue = normalizedValue.length > 0 ? Number(normalizedValue) : null;\n const shouldPreserveNegative =\n isNegative &&\n (Number.isFinite(numberValue) ||\n sanitizedValue.length === 0 ||\n (hasSingleDecimalSeparator && sanitizedValue.slice(0, decimalSeparatorIndex).length === 0));\n\n return {\n decimalPart: cappedDecimalPart,\n isNegative: shouldPreserveNegative,\n numberValue: Number.isFinite(numberValue) ? numberValue : null,\n };\n };\n\n /**\n * Formats a raw number for display according to the locale.\n */\n const getOutputValue = (val: number): string => {\n if (!prettyOutput.value) {\n return String(val);\n }\n return n(val, { style: 'decimal' });\n };\n\n const getFocusedOutputValue = (val: number): string => {\n const integerValue = Math.trunc(val);\n const formattedInteger = prettyOutput.value ? n(integerValue, { style: 'decimal' }) : String(integerValue);\n return `${formattedInteger}${decimalSeparator.value}${focusedDecimalPart.value}`;\n };\n\n const displayValue = computed(() => {\n if (privateValue.value === null) {\n if (isFocused.value && negative.value) {\n return focusedDecimalPart.value !== null\n ? `-${decimalSeparator.value}${focusedDecimalPart.value}`\n : '-';\n }\n\n return '';\n }\n\n const formattedValue =\n isFocused.value && focusedDecimalPart.value !== null\n ? getFocusedOutputValue(privateValue.value)\n : getOutputValue(privateValue.value);\n\n return negative.value ? `-${formattedValue}` : formattedValue;\n });\n\n /**\n * Updates the internal state and emits the new value.\n */\n const setValue = (inputValue: string) => {\n const { decimalPart, isNegative, numberValue } = parseInputValue(inputValue);\n\n negative.value = isNegative;\n // Keep the typed fractional part while focused: Number('1.') and Number('1.0') both collapse to 1.\n focusedDecimalPart.value = decimalPart;\n\n if (numberValue !== null) {\n privateValue.value = numberValue;\n const finalValue = negative.value ? -numberValue : numberValue;\n onInput?.(finalValue);\n } else {\n privateValue.value = null;\n onInput?.(null);\n }\n };\n\n // Synchronize external value changes\n watch(\n value,\n newValue => {\n const isNumber = typeof newValue === 'number';\n const isNegative = isNumber && (newValue < 0 || Object.is(newValue, -0));\n const absValue = isNumber ? Math.abs(newValue) : null;\n\n if (privateValue.value !== absValue || negative.value !== isNegative) {\n negative.value = isNegative;\n focusedDecimalPart.value = null;\n privateValue.value = absValue;\n }\n },\n { immediate: true }\n );\n\n /* Caret Management */\n\n const getCaretPosition = () => {\n return inputRef.value?.selectionStart || 0;\n };\n\n const setCaretPosition = (pos: number) => {\n if (inputRef.value) {\n inputRef.value.setSelectionRange(pos, pos);\n }\n };\n\n const getDigitsBeforeCaret = (fieldValue: string, caretPosition: number) => {\n let digits = 0;\n for (let i = 0; i < caretPosition; i++) {\n if (isDigit(fieldValue[i])) {\n digits++;\n }\n }\n return digits;\n };\n\n const setCaretAfterNthDigit = (nDigits: number) => {\n let digits = 0;\n let position = 0;\n const currentDisplay = displayValue.value;\n\n if (currentDisplay.length) {\n while (digits < nDigits && position < currentDisplay.length) {\n if (isDigit(currentDisplay[position])) {\n digits++;\n }\n position++;\n }\n }\n setCaretPosition(position);\n };\n\n const handlePrettyInput = async (inputValue: string) => {\n const oldCaretPosition = getCaretPosition();\n const isInputAtTheEnd = oldCaretPosition === inputValue.length;\n\n if (!isInputAtTheEnd) {\n const nDigitsBefore = getDigitsBeforeCaret(inputValue, oldCaretPosition);\n setValue(inputValue);\n await nextTick();\n setCaretAfterNthDigit(nDigitsBefore);\n } else {\n setValue(inputValue);\n }\n };\n\n /* Public Handlers */\n\n const handleInput = (event: NumericInputEvent) => {\n const inputValue = getEventTargetValue(event);\n\n if (prettyOutput.value && isFocused.value) {\n handlePrettyInput(inputValue);\n } else {\n setValue(inputValue);\n }\n\n // We don't emit or store letters that the user types in the input.\n // However, Vue doesn't strip them away either, so we need to force it.\n // In Composition API, we can manually sync the input value.\n if (inputRef.value && inputRef.value.value !== displayValue.value) {\n inputRef.value.value = displayValue.value;\n }\n };\n\n const handleKeyDown = (event: NumericKeyDownEvent) => {\n const target = event.target as\n | HTMLInputElement\n | { value?: string; selectionStart?: number | null; selectionEnd?: number | null }\n | null\n | undefined;\n\n if (!target) {\n return;\n }\n\n // Avoid invalid partial numbers such as \".\" or \"1..\".\n if (event.key === decimalSeparator.value) {\n const selectionStart = target.selectionStart ?? 0;\n const selectionEnd = target.selectionEnd ?? 0;\n const targetValue = target.value ?? '';\n const valueWithoutSelection = targetValue.slice(0, selectionStart) + targetValue.slice(selectionEnd);\n\n if (!valueWithoutSelection || valueWithoutSelection.includes(decimalSeparator.value)) {\n event.preventDefault?.();\n }\n }\n };\n\n return {\n inputRef,\n displayValue,\n isFocused,\n handleInput,\n handleKeyDown,\n onFocus: () => {\n isFocused.value = true;\n },\n onBlur: () => {\n isFocused.value = false;\n focusedDecimalPart.value = null;\n },\n };\n}\n","<template>\n <bento-base-filter\n v-bind=\"props\"\n :disable-apply-button=\"isApplyButtonDisabled\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :button-label=\"buttonLabel\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :only-slot=\"props.onlySlot\"\n :tooltip-position=\"props.options?.tooltipPosition\"\n :tooltip-text=\"props.options?.tooltipText\"\n @apply=\"updateFilter\"\n @clear=\"clearFilter\"\n @open=\"openFilter\"\n @reset=\"resetFilter\"\n >\n <div class=\"b-range-filter\" :class=\"conditionalClasses\" @keydown.enter=\"updateFilter\">\n <bento-input-field\n ref=\"fromFieldRef\"\n :model-value=\"displayFrom\"\n type=\"text\"\n inputmode=\"numeric\"\n :aria-label=\"t('from').toString()\"\n :disabled=\"props.disabled\"\n @update:model-value=\"handleModelValueFrom\"\n @keydown=\"handleKeyDownFrom\"\n @focus=\"onFocusFrom\"\n @blur=\"onBlurFrom\"\n >\n {{ t('from') }}\n </bento-input-field>\n <bento-input-field\n ref=\"toFieldRef\"\n class=\"b-range-filter__input-field\"\n :model-value=\"displayTo\"\n type=\"text\"\n inputmode=\"numeric\"\n :aria-label=\"t('to')\"\n :disabled=\"props.disabled\"\n @update:model-value=\"handleModelValueTo\"\n @keydown=\"handleKeyDownTo\"\n @focus=\"onFocusTo\"\n @blur=\"onBlurTo\"\n >\n {{ t('to') }}\n </bento-input-field>\n </div>\n </bento-base-filter>\n</template>\n\n<script lang=\"ts\">\n /**\n * Range filter used in the filter-bar component.\n *\n * @example\n * import { BentoRangeFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoRangeFilter },\n * template: `\n * <bento-range-filter field=\"filter-field\" label=\"Filter label\" value=\"['0', '1']\"/>\n * `\n * }\n */\n export default {\n name: 'bento-range-filter',\n i18n: { messages },\n };\n</script>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, onMounted, ref, toRef, watch } from 'vue';\n import { BentoFilterEvent } from '../../filter-bar.types';\n import type { BentoRangeFilterProps, BentoRangeFilterValue } from './range-filter.types';\n import { BentoBaseFilter, useBaseFilter } from '@/components/filter-bar/components/base-filter';\n import { BentoInputField, type BentoInputFieldValue } from '@/components/input-field';\n import { truncate } from '@/utils/ts/truncate';\n import { useI18n } from '@/utils/ts/i18n';\n import { useNumericInput } from '@/composables/use-numeric-input/use-numeric-input';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n interface RangeFilterInputField {\n inputFieldElement: HTMLInputElement | null;\n focusInput: () => void;\n }\n\n const props = defineProps({\n disabled: { type: Boolean, default: false },\n defaultValue: { default: null },\n field: null,\n label: null,\n value: { default: () => ['', ''] },\n onlySlot: { type: Boolean, default: false },\n options: { default: undefined }\n});\n\n const emit = defineEmits([BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE]);\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n const fromFieldRef = ref<RangeFilterInputField | null>(null);\n const toFieldRef = ref<RangeFilterInputField | null>(null);\n\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } =\n useBaseFilter<BentoRangeFilterValue>(toRef(props, 'value'), toRef(props, 'defaultValue'));\n\n const fromNum = ref<number | null>(null);\n const toNum = ref<number | null>(null);\n const stringifyInputValue = (val: number | null) =>\n val !== null ? (Object.is(val, -0) ? '-0' : val.toString()) : '';\n\n const {\n displayValue: displayFrom,\n handleInput: handleInputFrom,\n handleKeyDown: handleKeyDownFrom,\n onFocus: onFocusFrom,\n onBlur: onBlurFrom,\n inputRef: inputRefFrom,\n } = useNumericInput({\n value: fromNum,\n prettyOutput: true,\n onInput: val => {\n const currentValue = internalFilterValue.value ?? ['', ''];\n internalFilterValue.value = [stringifyInputValue(val), currentValue[1]];\n onInput();\n },\n });\n const handleModelValueFrom = (val: BentoInputFieldValue) => handleInputFrom(String(val));\n\n const {\n displayValue: displayTo,\n handleInput: handleInputTo,\n handleKeyDown: handleKeyDownTo,\n onFocus: onFocusTo,\n onBlur: onBlurTo,\n inputRef: inputRefTo,\n } = useNumericInput({\n value: toNum,\n prettyOutput: true,\n onInput: val => {\n const currentValue = internalFilterValue.value ?? ['', ''];\n internalFilterValue.value = [currentValue[0], stringifyInputValue(val)];\n onInput();\n },\n });\n const handleModelValueTo = (val: BentoInputFieldValue) => handleInputTo(String(val));\n\n onMounted(() => {\n inputRefFrom.value = fromFieldRef.value?.inputFieldElement ?? null;\n inputRefTo.value = toFieldRef.value?.inputFieldElement ?? null;\n });\n\n watch(\n () => internalFilterValue.value,\n newVal => {\n const nextFrom = newVal?.[0] ? parseFloat(newVal[0]) : null;\n const nextTo = newVal?.[1] ? parseFloat(newVal[1]) : null;\n\n if (fromNum.value !== nextFrom) {\n fromNum.value = nextFrom;\n }\n if (toNum.value !== nextTo) {\n toNum.value = nextTo;\n }\n },\n { immediate: true }\n );\n\n const truncatedRangeValues = computed(() => {\n if (!props.value?.[0] && !props.value?.[1]) {\n return null;\n }\n\n // Set prefix is one range value is not set\n let prefix = '';\n if (!props.value?.[0]) {\n prefix = '≤';\n } else if (!props.value?.[1]) {\n prefix = '≥';\n }\n\n const fromVal = props.value?.[0] ? parseFloat(props.value[0]) : null;\n const toVal = props.value?.[1] ? parseFloat(props.value[1]) : null;\n\n const rangeFromLabel = fromVal !== null ? n(fromVal, { style: 'decimal' }) : '';\n const seperator = props.value?.[0] && props.value?.[1] ? ' - ' : '';\n const rangeToLabel = toVal !== null ? n(toVal, { style: 'decimal' }) : '';\n\n return `${prefix}${truncate(rangeFromLabel, 10)}${seperator}${truncate(rangeToLabel, 10)}`;\n });\n const buttonLabel = computed(() => props.label);\n const buttonSecondaryLabel = computed(() => truncatedRangeValues.value);\n\n const conditionalClasses = computed(() => ({\n [`b-range-filter--only-slot`]: props.onlySlot,\n }));\n\n const openFilter = () => {\n internalFilterValue.value = props.value;\n\n nextTick(() => fromFieldRef.value?.focusInput());\n };\n\n const onInput = () => {\n emit(BentoFilterEvent.INPUT, { ...props, value: internalFilterValue.value });\n };\n\n const updateFilter = () => {\n if (!internalFilterValue.value?.some(x => x)) {\n // If both range values are empty,\n // If persistent filter, reset back to default value, else reset back to undefined\n internalFilterValue.value = props.defaultValue !== null ? props.defaultValue : undefined;\n }\n emit(BentoFilterEvent.UPDATE, {\n ...props,\n value: internalFilterValue.value,\n });\n };\n\n const resetFilter = () => emit(BentoFilterEvent.UPDATE, { ...props, value: props.defaultValue });\n\n const clearFilter = () => {\n internalFilterValue.value = ['', ''];\n updateFilter();\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./range-filter.scss\" />\n","<template>\n <bento-base-filter\n v-bind=\"$props\"\n :applied-filters-count=\"appliedFiltersCount\"\n :button-label=\"buttonLabel\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :disable-apply-button=\"isApplyButtonDisabled\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :tooltip-position=\"options?.tooltipPosition\"\n :tooltip-text=\"options?.tooltipText\"\n @apply=\"updateFilter(internalFilterValue)\"\n @clear=\"clearFilter(updateFilter)\"\n @open=\"openFilter\"\n @reset=\"resetFilter(updateFilter)\"\n >\n <div\n class=\"b-checkbox-group-filter\"\n :class=\"conditionalClasses\"\n @keydown.enter=\"updateFilter(internalFilterValue)\"\n >\n <bento-checkbox-group\n :model-value=\"internalFilterValue\"\n :items=\"options?.checkboxItems\"\n :label=\"label\"\n :disabled=\"disabled\"\n hide-label\n @update:model-value=\"onModelValueUpdate\"\n />\n </div>\n </bento-base-filter>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, toRef, watch } from 'vue';\n import BentoCheckboxGroup from '../../../checkbox/components/checkbox-group/checkbox-group.vue';\n import { BentoBaseFilter } from '../base-filter';\n import { useBentoBaseFilter } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import { truncate } from '@/utils/ts/truncate';\n import {\n type BentoCheckboxGroupFilterProps,\n type BentoCheckboxGroupFilterValue,\n } from './checkbox-group-filter.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n disabled: { type: Boolean, default: false },\n defaultValue: { default: undefined },\n field: null,\n label: null,\n onlySlot: { type: Boolean, default: false },\n options: { default: undefined },\n value: { default: undefined }\n});\n\n const emit = defineEmits([\"input\", \"update\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const {\n internalFilterValue,\n isSecondaryButtonDisabled,\n isApplyButtonDisabled,\n clearFilter,\n resetFilter,\n openFilter,\n } = useBentoBaseFilter<BentoCheckboxGroupFilterValue>(toRef(props, 'value'), toRef(props, 'defaultValue'));\n\n const displayedValues = ref<BentoCheckboxGroupFilterValue>(internalFilterValue.value ?? []);\n watch(\n () => props.value,\n newValue => {\n displayedValues.value = newValue ?? [];\n }\n );\n\n const conditionalClasses = computed(() => ({\n [`b-checkbox-group-filter--only-slot`]: props.onlySlot,\n }));\n\n const buttonLabel = computed(() => props.label);\n\n const buttonSecondaryLabel = computed(() =>\n displayedValues.value.length === 1\n ? truncate(\n props.options?.checkboxItems.find(item => displayedValues.value[0] === item.value)?.label ?? '',\n 12\n )\n : null\n );\n\n const appliedFiltersCount = computed(() => {\n if (!displayedValues.value.length || buttonSecondaryLabel.value) {\n return null;\n }\n\n if (displayedValues.value.length === props.options?.checkboxItems.length) {\n return t('all');\n }\n\n return displayedValues.value.length;\n });\n\n const updateFilter = (value: BentoCheckboxGroupFilterValue) => {\n displayedValues.value = value ?? [];\n emit('update', { ...props, value });\n };\n\n const onModelValueUpdate = (value: BentoCheckboxGroupFilterValue) => {\n internalFilterValue.value = value;\n emit('input', { ...props, value: internalFilterValue.value });\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * The Checkbox Group filter displays a group of checkboxes that allows\n * to select multiple values.\n *\n * @example\n * import { BentoCheckboxGroupFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCheckboxGroupFilter },\n * template: `\n * <bento-checkbox-group-filter\n * :field=\"filter.field\"\n * :label=\"filter.label\"\n * :options=\"filter.options\"\n * :value=\"filter.value\"\n * @update=\"updateFilterHandler\"\n * />\n * `\n * }\n */\n export default {\n name: 'bento-checkbox-group-filter',\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./checkbox-group-filter.scss\" />\n","import { computed, type Ref, ref, shallowRef, watch } from 'vue';\nimport { FixedScroller } from '@/internal';\nimport { type BentoFilterBarContainerSizeLayout } from '../../filter-bar.types';\nimport { useResizeObserver } from '@vueuse/core';\n\nconst SMALL_SIZE_THRESHOLD = 430;\nconst LARGE_SIZE_THRESHOLD = 700;\n\n/**\n * Calculates the layout of the filter bar based on the options provided by the user\n * for each container size. This allows to hot-swap the container component from a \"div\" to the \"Fixed Scroller\"\n * to display a \"one-line\" to a \"multi-line\" layout.\n *\n * Container sizes:\n * - Large: >700\n * - Medium: >430 & <700\n * - Small: <430\n *\n * @param target Container element that has the container-query and can be resized.\n * @param containerSizeLayoutOptions User layout options for each container size\n * @returns Components and their respective classes that allows to swap between a wrap container and the fixed scroller.\n */\nexport function useContainerSizeOptionsLayout(\n target: Ref<HTMLDivElement>,\n containerSizeLayoutOptions: Ref<BentoFilterBarContainerSizeLayout>\n) {\n /**\n * Stores the Component to be rendered (\"div\" or \"fixed-scroller\") and\n * the classes required for each component to work/display correctly.\n * Uses `shallowRef` because component definitions should not be made\n * deeply reactive (Vue 3.5+ warns about this and it can cause infinite\n * update loops when the component's reactive proxy is rendered).\n */\n const screenLayoutComponent = shallowRef<'div' | typeof FixedScroller>('div');\n\n /**\n * Indicates if the layout is one-line based on the current\n * container size and the \"containerSizeLayoutOptions\" prop\n */\n const isOneLineLayout = ref(false);\n\n /**\n * Stores the container width.\n * Updated when the resize event on \"target\" happens\n */\n const containerWidth = ref<number>(0);\n\n /**\n * Indicates if the search bar should be inside or outside the \"Fixed scroller\".\n * Only needed for the \"Small\" size.\n *\n * Always indicates that the search bar should be inside the container.\n * Only outside if \"small\" & \"multi-line\".\n */\n const showSearchbarInsideContainer = computed<boolean>(() => {\n if (containerWidth.value < SMALL_SIZE_THRESHOLD && containerSizeLayoutOptions.value.small === 'multi-line') {\n return false;\n }\n\n return true;\n });\n\n /**\n * Sets the configuration (Component & classes)\n * required for the \"multi-line\" layout.\n */\n function setMultiLineConfig() {\n isOneLineLayout.value = false;\n screenLayoutComponent.value = 'div';\n }\n\n /**\n * Sets the configuration (Component & classes)\n * required for the \"one-line\" layout\n */\n function setOneLineConfig() {\n isOneLineLayout.value = true;\n screenLayoutComponent.value = FixedScroller;\n }\n\n /**\n * Sets the configuration required for given the current\n * container size (Large, Medium, Small)\n */\n function calculateConfig() {\n if (containerWidth.value >= LARGE_SIZE_THRESHOLD) {\n // Large screen: customizable, defaults to multi-line\n if (containerSizeLayoutOptions.value?.large === 'one-line') {\n setOneLineConfig();\n } else {\n setMultiLineConfig();\n }\n } else if (containerWidth.value >= SMALL_SIZE_THRESHOLD) {\n // Medium screen: customizable, defaults to one-line\n if (containerSizeLayoutOptions.value?.medium === 'multi-line') {\n setMultiLineConfig();\n } else {\n setOneLineConfig();\n }\n } else {\n // Small screen: always one-line (the \"small\" prop only controls search bar placement)\n setOneLineConfig();\n }\n }\n\n /**\n * Allows the component to be reactive.\n * It updates configuration if the options are changed.\n */\n watch(() => containerSizeLayoutOptions.value, calculateConfig);\n\n useResizeObserver(target, entries => {\n // Observing only one entry.\n // Updated every time a resize occurs\n containerWidth.value = entries[0].contentRect.width;\n\n // Calculate the config based on the new width.\n calculateConfig();\n });\n\n const isLargeLayout = computed(() => containerWidth.value >= LARGE_SIZE_THRESHOLD);\n const rootElementConditionalClasses = computed(() => ({ 'b-filter-bar--large-layout': isLargeLayout.value }));\n\n return {\n screenLayoutComponent,\n showSearchbarInsideContainer,\n isOneLineLayout,\n isLargeLayout,\n rootElementConditionalClasses,\n };\n}\n","import type { BentoFilterBarFilterWithValue, BentoFilterModel } from '../../filter-bar.types';\n\nexport enum AllFiltersModalEvent {\n INPUT = 'input',\n}\n\nexport interface BentoAllFiltersModalSelectedFilter extends BentoFilterBarFilterWithValue {\n labelId: string;\n}\n\nexport type BentoAllFiltersModalGetFilterCount = (filter: BentoFilterModel) => string | number | null;\n\nexport interface BentoAllFiltersModalButtonInstance {\n $el: HTMLElement;\n}\n\nexport interface BentoAllFiltersModalFilterSelectionInstance {\n focusFilter: (label: string) => void;\n}\n\nexport interface BentoAllFiltersModalSelectedFilterContentInstance {\n focusFirstInput: () => void;\n}\n\nexport interface BentoAllFiltersModalSelectedFilterInstance {\n $el: HTMLElement;\n}\n","<template>\n <base-button\n ref=\"baseFilterButtonRef\"\n class=\"b-base-filter-button\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n :aria-label=\"computedAriaLabel\"\n :aria-controls=\"ariaAttributes['aria-controls']\"\n type=\"button\"\n @click=\"onClickButton\"\n >\n <div class=\"b-base-filter-button__default-container\">\n <div class=\"b-base-filter-button__label-container\">\n <bento-typography el=\"span\" variant=\"body\" :stronger=\"bold\" class=\"b-base-filter-button__label\">\n <slot />\n </bento-typography>\n </div>\n\n <div v-if=\"amountAppliedValues && !hasChevron\" class=\"b-base-filter-button__counter-wrapper\">\n <bento-typography class=\"b-base-filter-button__counter\" el=\"span\" variant=\"body\" stronger>\n {{ amountAppliedValues }}\n </bento-typography>\n </div>\n </div>\n <template v-if=\"hasChevron\" #iconRight>\n <chevron-up-icon v-if=\"isFilterOpen\" aria-hidden=\"true\" />\n <chevron-down-icon v-else aria-hidden=\"true\" />\n </template>\n </base-button>\n</template>\n\n<script lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useHasSlot } from '@/composables';\n import { computed, defineComponent, ref } from 'vue';\n import { BaseButton, BentoBaseButtonEvent } from '@/components/internal/base-button';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n\n /**\n * A filter button used as a base to extend all sorts of filter buttons.\n * Used in the bento-filter-bar and all-filter-modals components.\n *\n * @usage\n * export default {\n * components: { BaseFilterButton },\n * template: `\n * <base-filter-button disabled>\n * Filter\n * </base-filter-button>\n * `,\n * }\n */\n export default defineComponent({\n name: 'base-filter-button',\n components: { BaseButton, BentoTypography, ChevronUpIcon, ChevronDownIcon },\n props: {\n /**\n * The number of applies values within the filter.\n * e.g. if 2 items in a dropdown filter have been applied, the number 2 will be shown here.\n */\n amountAppliedValues: { type: [Number, String], default: null },\n\n /**\n * Disables button functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Signifies if the filter is open or closed.\n */\n isFilterOpen: { type: Boolean, default: false },\n\n /**\n * Toggles if a chevron icon should be displayed in the button.\n * The chevron will change depending on the open state of the filter.\n */\n hasChevron: { type: Boolean, default: false },\n\n /**\n * Renders the text in a stronger variant.\n */\n bold: { type: Boolean, default: false },\n },\n emits: [BentoBaseButtonEvent.CLICK],\n setup(props, { slots, emit, attrs }) {\n const labelSlot = computed((): string => (slots.default ? getSlotText(slots)('default') : null));\n const computedAriaLabel = useAriaLabel({ ariaLabel: labelSlot });\n const baseFilterButtonRef = ref(null);\n\n const ariaAttributes = computed(() => ({\n 'aria-controls': attrs['aria-controls']?.toString() as string,\n }));\n\n const conditionalClasses = computed(() => ({\n [`b-base-filter-button--with-chevron`]: props.hasChevron,\n [`b-base-filter-button--filter-open`]: props.isFilterOpen,\n }));\n\n const onClickButton = () => {\n if (!props.disabled) {\n emit(BentoBaseButtonEvent.CLICK);\n }\n };\n\n return {\n // Values\n ariaAttributes,\n computedAriaLabel,\n conditionalClasses,\n\n // Methods\n onClickButton,\n hasSlot: useHasSlot(slots),\n\n // Refs\n baseFilterButtonRef,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-filter-button.scss\" />\n","<template>\n <base-filter-button\n class=\"b-all-filters-modal-button\"\n :class=\"conditionalClasses\"\n :amount-applied-values=\"appliedFiltersCount\"\n :is-filter-open=\"isFilterOpen\"\n :disabled=\"disabled\"\n @click=\"onClick\"\n >\n {{ label }}\n </base-filter-button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import BaseFilterButton from '../../../base-filter-button/base-filter-button.vue';\n\n export default defineComponent({\n name: 'all-filters-modal-button',\n components: { BaseFilterButton },\n props: {\n /**\n * Button label to be displayed\n */\n label: { type: String, required: true },\n\n /**\n * Total count of applied filters\n */\n appliedFiltersCount: { type: [Number, String], default: null },\n\n /**\n * Indicates whether the filter popover tied to this button is showing\n */\n isFilterOpen: { type: Boolean, default: false },\n\n /**\n * Disables button functionality.\n */\n disabled: { type: Boolean, default: false },\n },\n emits: ['click'],\n setup(props, { emit }) {\n const conditionalClasses = computed(() => ({\n [`b-all-filters-modal-button--with-counter`]: props.appliedFiltersCount,\n [`b-all-filters-modal-button--filter-open`]: props.isFilterOpen,\n }));\n\n const onClick = () => {\n emit('click');\n };\n\n return {\n conditionalClasses,\n\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./all-filters-modal-button.scss\" />\n","<template>\n <div\n class=\"b-all-filters-modal-filter-selection\"\n :class=\"conditionalClasses\"\n @keydown.right=\"$emit('keydown-right')\"\n >\n <bento-search-bar\n class=\"b-all-filters-modal-filter-selection__search-bar\"\n :value=\"searchTerm\"\n :input-field-aria-label=\"searchBarAriaLabel\"\n @input=\"$emit('update:search-term', $event)\"\n @clear=\"$emit('clear-search')\"\n />\n <div v-if=\"emptySearchMessage\" class=\"b-all-filters-modal-filter-selection__empty-search-message\">\n <bento-typography el=\"span\">{{ emptySearchMessage }}</bento-typography>\n </div>\n <div v-if=\"activeFilters.length\" class=\"b-all-filters-modal-filter-selection__filters-section\">\n <bento-typography\n :id=\"`active-filters-${screenIdPrefix}${uniqueId}`\"\n class=\"b-all-filters-modal-filter-selection__filters-section-title\"\n el=\"span\"\n variant=\"caption\"\n >\n {{ activeFiltersLabel }}\n </bento-typography>\n <ul\n class=\"b-all-filters-modal-filter-selection__filters-list\"\n :aria-labelledby=\"`active-filters-${screenIdPrefix}${uniqueId}`\"\n >\n <li v-for=\"item in activeFilters\" :key=\"`${item.label}-${item.field}`\">\n <all-filters-modal-button\n :ref=\"element => setFilterButtonRef(element, item.label)\"\n :label=\"item.label\"\n :applied-filters-count=\"getFilterCount(item)\"\n :is-filter-open=\"!smallScreen && selectedFilterLabel === item.label\"\n :disabled=\"item.disabled\"\n @click=\"$emit('select-filter', item.label, item.field)\"\n />\n </li>\n </ul>\n </div>\n <div v-if=\"otherFilters.length\" class=\"b-all-filters-modal-filter-selection__filters-section\">\n <bento-typography\n v-if=\"activeFilters.length\"\n :id=\"`other-filters-${screenIdPrefix}${uniqueId}`\"\n class=\"b-all-filters-modal-filter-selection__filters-section-title\"\n el=\"span\"\n variant=\"caption\"\n >\n {{ otherFiltersLabel }}\n </bento-typography>\n <ul\n class=\"b-all-filters-modal-filter-selection__filters-list\"\n :aria-labelledby=\"`other-filters-${screenIdPrefix}${uniqueId}`\"\n >\n <li v-for=\"item in otherFilters\" :key=\"`${item.label}-${item.field}`\">\n <all-filters-modal-button\n :ref=\"element => setFilterButtonRef(element, item.label)\"\n :label=\"item.label\"\n :disabled=\"item.disabled\"\n :applied-filters-count=\"getFilterCount(item)\"\n :is-filter-open=\"!smallScreen && selectedFilterLabel === item.label\"\n @click=\"$emit('select-filter', item.label, item.field)\"\n />\n </li>\n </ul>\n </div>\n <bento-button-actions\n v-if=\"smallScreen\"\n class=\"b-all-filters-modal-filter-selection__actions\"\n :actions=\"actions\"\n layout=\"vertical-stack\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onBeforeUpdate, ref } from 'vue';\n\n import { BentoButtonActions } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import BentoSearchBar from '@/components/search-bar/search-bar.vue';\n\n import { type BentoAllFiltersModalButtonInstance } from '../../all-filters-modal.types';\n import AllFiltersModalButton from '../all-filters-modal-button/all-filters-modal-button.vue';\n import {\n type BentoAllFiltersModalFilterSelectionEmits,\n type BentoAllFiltersModalFilterSelectionProps,\n } from './all-filters-modal-filter-selection.types';\n\n const props = defineProps({\n activeFilters: null,\n actions: { default: () => [] },\n activeFiltersLabel: null,\n emptySearchMessage: { default: '' },\n getFilterCount: { type: Function },\n otherFilters: null,\n otherFiltersLabel: null,\n selectedFilterLabel: null,\n searchBarAriaLabel: null,\n searchTerm: null,\n smallScreen: { type: Boolean, default: false },\n uniqueId: null\n});\n\n defineEmits([\"clear-search\", \"keydown-right\", \"select-filter\", \"update:search-term\"]);\n\n const conditionalClasses = computed(() => ({\n 'b-all-filters-modal-filter-selection--small-screen': props.smallScreen,\n }));\n\n const filterButtons = ref<Record<string, BentoAllFiltersModalButtonInstance>>({});\n\n const screenIdPrefix = computed(() => (props.smallScreen ? 'small-screen-' : ''));\n\n onBeforeUpdate(() => {\n filterButtons.value = {};\n });\n\n const setFilterButtonRef = (element: BentoAllFiltersModalButtonInstance | null, label: string) => {\n if (element) {\n filterButtons.value[label] = element;\n }\n };\n\n const focusFilter = (label: string) => {\n filterButtons.value[label]?.$el?.focus();\n };\n\n defineExpose({ focusFilter });\n</script>\n\n<script lang=\"ts\">\n export default {\n name: 'all-filters-modal-filter-selection',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./all-filters-modal-filter-selection.scss\" />\n","<template>\n <div class=\"b-all-filters-modal-selected-filter\" :class=\"conditionalClasses\" @keydown.left=\"$emit('keydown-left')\">\n <div v-if=\"smallScreen || shouldShowFilterTitle\" class=\"b-all-filters-modal-selected-filter__text\">\n <bento-typography :id=\"selectedFilter.labelId\" el=\"div\" variant=\"title\" medium>\n {{ selectedFilter.label }}\n </bento-typography>\n <bento-typography v-if=\"selectedFilter.description\" el=\"div\" variant=\"body\" wide>\n {{ selectedFilter.description }}\n </bento-typography>\n </div>\n <div class=\"b-all-filters-modal-selected-filter__component\">\n <component\n :is=\"selectedFilter.type\"\n ref=\"selectedFilterRef\"\n :key=\"selectedFilter.field\"\n :description=\"selectedFilter.description\"\n :field=\"selectedFilter.field\"\n :label=\"selectedFilter.label\"\n :options=\"selectedFilter.options\"\n :value=\"selectedFilter.value\"\n :default-value=\"selectedFilter.defaultValue\"\n :only-slot=\"true\"\n :disabled=\"selectedFilter.disabled\"\n :aria-labelledby=\"selectedFilter.labelId\"\n @input=\"$emit('input', $event)\"\n />\n </div>\n <bento-button-actions\n v-if=\"smallScreen\"\n class=\"b-all-filters-modal-selected-filter__actions\"\n :actions=\"actions\"\n layout=\"vertical-stack\"\n />\n <div v-else class=\"b-all-filters-modal-selected-filter__clear-button\">\n <bento-button variant=\"secondary\" :disabled=\"isClearButtonDisabled\" @click=\"$emit('clear')\">\n {{ clearButtonLabel }}\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref } from 'vue';\n\n import { BentoButton, BentoButtonActions, type BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n\n import { getNextFocusableElement } from '@/utils/ts/focus-trap.utils';\n\n import { type BentoFilterModel } from '@/components/filter-bar/filter-bar.types';\n import {\n type BentoAllFiltersModalSelectedFilter,\n type BentoAllFiltersModalSelectedFilterInstance,\n } from '../../all-filters-modal.types';\n\n const props = defineProps({\n actions: { default: () => [] },\n clearButtonLabel: null,\n isClearButtonDisabled: { type: Boolean },\n selectedFilter: null,\n smallScreen: { type: Boolean, default: false },\n shouldShowFilterTitle: { type: Boolean }\n});\n\n defineEmits([\"clear\", \"input\", \"keydown-left\"]);\n\n const conditionalClasses = computed(() => ({\n 'b-all-filters-modal-selected-filter--small-screen': props.smallScreen,\n }));\n\n const selectedFilterRef = ref<BentoAllFiltersModalSelectedFilterInstance | null>(null);\n\n const focusFirstInput = () => {\n const selectedFilterElement = selectedFilterRef.value?.$el;\n if (!selectedFilterElement) {\n return;\n }\n getNextFocusableElement(1, selectedFilterElement).focus();\n };\n\n defineExpose({ focusFirstInput });\n</script>\n\n<script lang=\"ts\">\n import {\n BentoBooleanFilter,\n BentoCheckboxGroupFilter,\n BentoDateFilter,\n BentoDateRangeFilter,\n BentoInputFilter,\n BentoInputWithDropdownFilter,\n BentoRadioGroupFilter,\n BentoRangeFilter,\n BentoSelectAvatarFilter,\n BentoSelectCountryFilter,\n BentoSelectCurrencyFilter,\n BentoSelectFilter,\n BentoSelectPaymentMethodFilter,\n BentoSelectTagFilter,\n BentoToggleFilter,\n } from '../../../index';\n\n export default {\n name: 'all-filters-modal-selected-filter',\n components: {\n BentoBooleanFilter,\n BentoCheckboxGroupFilter,\n BentoDateFilter,\n BentoDateRangeFilter,\n BentoInputFilter,\n BentoInputWithDropdownFilter,\n BentoRadioGroupFilter,\n BentoRangeFilter,\n BentoSelectAvatarFilter,\n BentoSelectCountryFilter,\n BentoSelectCurrencyFilter,\n BentoSelectFilter,\n BentoSelectPaymentMethodFilter,\n BentoSelectTagFilter,\n BentoToggleFilter,\n },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./all-filters-modal-selected-filter.scss\" />\n","\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=\"#001222\" d=\"M12.6465 4.58337C12.32 3.42912 11.2588 2.58337 10 2.58337C8.74122 2.58337 7.67998 3.42912 7.35352 4.58337H1.25V6.08337H7.35352C7.67998 7.23763 8.74122 8.08337 10 8.08337C11.2588 8.08337 12.32 7.23763 12.6465 6.08337H14.75V4.58337H12.6465ZM11.25 5.33337C11.25 6.02373 10.6904 6.58337 10 6.58337C9.30964 6.58337 8.75 6.02373 8.75 5.33337C8.75 4.64302 9.30964 4.08337 10 4.08337C10.6904 4.08337 11.25 4.64302 11.25 5.33337Z\"/><path fill=\"#001222\" d=\"M4 7.91687C5.25878 7.91687 6.32002 8.76262 6.64648 9.91687H14.75V11.4169H6.64648C6.32002 12.5711 5.25878 13.4169 4 13.4169C2.48122 13.4169 1.25 12.1857 1.25 10.6669C1.25 9.14809 2.48122 7.91687 4 7.91687ZM5.25 10.6669C5.25 9.97651 4.69036 9.41687 4 9.41687C3.30964 9.41687 2.75 9.97651 2.75 10.6669C2.75 11.3572 3.30964 11.9169 4 11.9169C4.69036 11.9169 5.25 11.3572 5.25 10.6669Z\"/></svg>\n</template>\n<script setup>\n import { getCurrentInstance } from 'vue';\n import '../css/main.css';\n\n const instance = getCurrentInstance();\n const uuid = String(instance?.uid ?? instance?.proxy?._uid);\n</script>\n","<template>\n <div class=\"b-all-filters-modal\">\n <filter-bar-button\n :is-filter-open=\"isModalOpen\"\n :applied-filters-count=\"numberOfActiveFilters\"\n no-applied-state-styles\n @click=\"onClickAllFiltersModal\"\n >\n {{ t('allFilters') }}\n\n <template #iconLeft>\n <sliders-icon aria-hidden=\"true\" />\n </template>\n </filter-bar-button>\n <bento-modal\n v-if=\"!isSmallScreen\"\n class=\"b-all-filters-modal__modal\"\n :is-open=\"isModalOpen\"\n :with-column-layout=\"true\"\n size=\"large\"\n :actions=\"modalActions\"\n :is-dismissible=\"false\"\n hide-close-button\n @close-modal=\"cancel\"\n >\n <template #default>\n {{ t('allFilters') }}\n </template>\n <template #content-col-1>\n <all-filters-modal-filter-selection\n ref=\"filterSelectionRef\"\n :active-filters=\"activeFilters\"\n :actions=\"modalActions\"\n :active-filters-label=\"t('activeFilters')\"\n :empty-search-message=\"isEmptyResultForSearchFilter ? t('noFiltersMatchThisSearch') : ''\"\n :get-filter-count=\"getFilterCount\"\n :other-filters=\"otherFilters\"\n :other-filters-label=\"t('otherFilters')\"\n :search-bar-aria-label=\"t('searchBar')\"\n :search-term=\"searchTerm\"\n :selected-filter-label=\"selectedFilter.label\"\n :unique-id=\"allFiltersModalUniqueId\"\n @clear-search=\"onSearchbarClear\"\n @keydown-right=\"onKeydownRight\"\n @select-filter=\"selectFilter\"\n @update:search-term=\"searchTerm = $event\"\n />\n </template>\n <template #content-col-2>\n <all-filters-modal-selected-filter\n ref=\"selectedFilterContentRef\"\n :actions=\"modalActions\"\n :clear-button-label=\"t(isSelectedFilterPersistent ? 'reset' : 'clear')\"\n :is-clear-button-disabled=\"isClearButtonDisabled\"\n :selected-filter=\"selectedFilter\"\n :should-show-filter-title=\"shouldShowFilterTitle\"\n @clear=\"clearSelectedFilter\"\n @input=\"updateFilter\"\n @keydown-left=\"onKeydownLeft\"\n />\n </template>\n </bento-modal>\n <bento-modal-fullscreen\n v-else\n class=\"b-all-filters-modal__modal b-all-filters-modal__modal--small-screen\"\n :active-page=\"smallScreenActivePage\"\n :is-open=\"isModalOpen\"\n @before-close=\"cancel\"\n @update:active-page=\"smallScreenActivePage = $event\"\n >\n <bento-modal-fullscreen-page\n :page-id=\"FILTER_SELECTION_PAGE_ID\"\n :previous-page=\"null\"\n :title=\"t('allFilters')\"\n >\n <all-filters-modal-filter-selection\n :active-filters=\"activeFilters\"\n :actions=\"modalActions\"\n :active-filters-label=\"t('activeFilters')\"\n :empty-search-message=\"isEmptyResultForSearchFilter ? t('noFiltersMatchThisSearch') : ''\"\n :get-filter-count=\"getFilterCount\"\n :other-filters=\"otherFilters\"\n :other-filters-label=\"t('otherFilters')\"\n :search-bar-aria-label=\"t('searchBar')\"\n :search-term=\"searchTerm\"\n :selected-filter-label=\"selectedFilter.label\"\n :unique-id=\"allFiltersModalUniqueId\"\n small-screen\n @clear-search=\"onSearchbarClear\"\n @select-filter=\"selectFilter\"\n @update:search-term=\"searchTerm = $event\"\n />\n </bento-modal-fullscreen-page>\n <bento-modal-fullscreen-page\n :page-id=\"FILTER_APPLICATION_PAGE_ID\"\n :previous-page=\"FILTER_SELECTION_PAGE_ID\"\n :title=\"t('allFilters')\"\n >\n <all-filters-modal-selected-filter\n :actions=\"modalActions\"\n :clear-button-label=\"t(isSelectedFilterPersistent ? 'reset' : 'clear')\"\n :is-clear-button-disabled=\"isClearButtonDisabled\"\n :selected-filter=\"selectedFilter\"\n :should-show-filter-title=\"shouldShowFilterTitle\"\n small-screen\n @input=\"updateFilter\"\n />\n </bento-modal-fullscreen-page>\n </bento-modal-fullscreen>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, toRef, watch } from 'vue';\n import { useMediaQuery } from '@vueuse/core';\n\n import { type BentoDateRangePickerValue } from '@/components/date-range-picker';\n import { BentoModalFullscreen, BentoModalFullscreenPage } from '@/components/modal-fullscreen';\n import BentoModal from '@/components/modal/modal.vue';\n import { useSearchBarFilter } from '@/components/search-bar';\n\n import { generateUid } from '@/utils/ts/generate-uid';\n import { useI18n } from '@/utils/ts/i18n';\n\n import {\n type BentoFilterBarFiltersWithValues,\n type BentoFilterBarFilterWithValue,\n BentoFilterItemType,\n type BentoSelectFilterOptions,\n } from '@/components/filter-bar/filter-bar.types';\n import { FilterBarButton } from '../filter-bar-button';\n import {\n AllFiltersModalEvent,\n type BentoAllFiltersModalFilterSelectionInstance,\n type BentoAllFiltersModalSelectedFilterContentInstance,\n } from './all-filters-modal.types';\n import AllFiltersModalFilterSelection from './components/all-filters-modal-filter-selection/all-filters-modal-filter-selection.vue';\n import AllFiltersModalSelectedFilter from './components/all-filters-modal-selected-filter/all-filters-modal-selected-filter.vue';\n import SlidersIcon from '@adyen/ui-assets-icons-16/vue/sliders-1';\n import { type BentoCheckboxGroupFilterOptions } from '../checkbox-group-filter';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const FILTER_SELECTION_PAGE_ID = 'filter-selection';\n const FILTER_APPLICATION_PAGE_ID = 'filter-application';\n\n const props = defineProps({\n value: { default: () => [] }\n});\n\n const emit = defineEmits([AllFiltersModalEvent.INPUT]);\n\n const filtersInModal = ref<BentoFilterBarFiltersWithValues>(props.value);\n const allFiltersModalUniqueId = generateUid('all-filters-modal');\n const filterSelectionRef = ref<BentoAllFiltersModalFilterSelectionInstance | null>(null);\n const isModalOpen = ref(false);\n const selectedFilterIndex = ref(0);\n const selectedFilterContentRef = ref<BentoAllFiltersModalSelectedFilterContentInstance | null>(null);\n const searchTerm = ref<string>('');\n const smallScreenActivePage = ref(FILTER_SELECTION_PAGE_ID);\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n const isSmallScreen = useMediaQuery('(max-width: 599px)');\n const filteredItems = useSearchBarFilter<BentoFilterBarFilterWithValue>(searchTerm, toRef(filtersInModal, 'value'));\n\n watch(\n () => props.value,\n () => {\n /**\n * Values need to be preserve when the modal is opened given that\n * when the \"select\" filter is enabled with external filtering inside the modal\n * the \"searchTerm\" gets reset and doing so resets all the unsaved values of the array\n */\n if (isModalOpen.value) {\n filtersInModal.value = props.value.map((filter, index) => {\n return { ...filter, value: filtersInModal.value[index].value };\n });\n } else {\n filtersInModal.value = props.value;\n }\n }\n );\n\n const sortAlphabetically = (array: BentoFilterBarFiltersWithValues) =>\n array.sort((a, b) => (a.label > b.label ? 1 : b.label > a.label ? -1 : 0));\n\n const activeFilters = computed(() =>\n sortAlphabetically(\n filteredItems.value.filter(el =>\n Array.isArray(el.value) ? el.value?.length && el.value?.find(item => item !== '') : el.value\n )\n )\n );\n\n const otherFilters = computed(() =>\n sortAlphabetically(\n filteredItems.value.filter(el =>\n Array.isArray(el.value) ? el.value?.length === 0 || el.value?.every(item => item === '') : !el.value\n )\n )\n );\n\n const isEmptyResultForSearchFilter = computed(() => searchTerm.value && filteredItems.value?.length === 0);\n\n const selectedFilter = computed(() => ({\n ...filtersInModal.value[selectedFilterIndex.value],\n labelId: generateUid(filtersInModal.value[selectedFilterIndex.value]?.field),\n }));\n\n const selectOpenedFilter = () => {\n const openedFilter = activeFilters.value.length ? activeFilters.value[0] : otherFilters.value[0];\n const openedFilterIndex = filtersInModal.value.findIndex(\n el => el.label === openedFilter.label && el.field === openedFilter.field\n );\n selectedFilterIndex.value = openedFilterIndex;\n };\n\n watch(\n () => isModalOpen.value,\n isOpen => {\n if (isOpen) {\n selectOpenedFilter();\n }\n }\n );\n\n const computeCounts = (filterValue: BentoFilterBarFiltersWithValues) =>\n filterValue.map(filter => {\n switch (filter.type) {\n case BentoFilterItemType.SELECT:\n case BentoFilterItemType.SELECT_AVATAR:\n case BentoFilterItemType.SELECT_COUNTRY:\n case BentoFilterItemType.SELECT_CURRENCY:\n case BentoFilterItemType.SELECT_PAYMENT_METHOD:\n case BentoFilterItemType.SELECT_TAG:\n switch ((filter.options as BentoSelectFilterOptions)?.multiple) {\n case true:\n return {\n label: filter.label,\n field: filter.field,\n count: (filter.value as Array<string | number>)?.length\n ? (filter.value as Array<string | number>)?.length\n : null,\n };\n default:\n return {\n label: filter.label,\n field: filter.field,\n count: filter.value == null ? null : 1,\n };\n }\n case BentoFilterItemType.DATE_RANGE:\n return {\n label: filter.label,\n field: filter.field,\n count:\n (filter.value as BentoDateRangePickerValue)?.startDate != null &&\n (filter.value as BentoDateRangePickerValue)?.endDate != null\n ? 1\n : null,\n };\n case BentoFilterItemType.RANGE:\n return {\n label: filter.label,\n field: filter.field,\n count: (filter.value as Array<string>)?.find(el => el !== '') ? 1 : null,\n };\n case BentoFilterItemType.CHECKBOX_GROUP:\n return {\n label: filter.label,\n field: filter.field,\n count: (filter.value as Array<string | number>)?.length\n ? (filter.value as Array<string | number>)?.length\n : null,\n };\n case BentoFilterItemType.TOGGLE:\n return {\n label: filter.label,\n field: filter.field,\n count: filter.value ? 1 : null,\n };\n case BentoFilterItemType.INPUT:\n case BentoFilterItemType.BOOLEAN:\n case BentoFilterItemType.DATE:\n case BentoFilterItemType.RADIO_GROUP:\n default:\n return {\n label: filter.label,\n field: filter.field,\n count: filter.value != null ? 1 : null,\n };\n }\n });\n\n const selectedFilterValue = computed(() => selectedFilter.value.value);\n\n const hasValueSelected = computed(() =>\n Array.isArray(selectedFilterValue.value)\n ? selectedFilterValue.value.length && selectedFilterValue.value.find(item => item !== '')\n : !!selectedFilterValue.value\n );\n\n const hasPersistentFilters = computed(() =>\n filtersInModal.value.some(({ defaultValue }) => defaultValue !== undefined)\n );\n\n const isSelectedFilterPersistent = computed(() => selectedFilter.value.defaultValue !== undefined);\n\n /**\n * Hides filter title if the selected filter is Toggle.\n * The Toggle filter shows a checkbox next to the \"title\".\n */\n const shouldShowFilterTitle = computed(() => {\n return selectedFilter.value.type !== BentoFilterItemType.TOGGLE;\n });\n\n const isClearButtonDisabled = computed(\n () =>\n selectedFilter.value.disabled ||\n (isSelectedFilterPersistent.value\n ? JSON.stringify(selectedFilter.value.value) === JSON.stringify(selectedFilter.value.defaultValue)\n : !hasValueSelected.value)\n );\n\n const filtersIncludedInActiveCount = computed(() =>\n props.value.filter(\n filter =>\n filter.defaultValue === undefined ||\n (filter.visible === false && JSON.stringify(filter.value) !== JSON.stringify(filter.defaultValue))\n )\n );\n\n const numberOfActiveFilters = computed(\n () => computeCounts(filtersIncludedInActiveCount.value)?.filter(({ count }) => !!count).length\n );\n\n const onClickAllFiltersModal = () => {\n if (!isModalOpen.value) {\n smallScreenActivePage.value = FILTER_SELECTION_PAGE_ID;\n isModalOpen.value = true;\n } else {\n isModalOpen.value = false;\n }\n };\n\n const filterCounts = computed(\n () => new Map(computeCounts(filtersInModal.value).map(({ field, count }) => [field, count]))\n );\n\n const getFilterCount = (filter: BentoFilterBarFilterWithValue) => {\n const filterCount = filterCounts.value.get(filter.field);\n\n const isBentoSelectFilter =\n typeof filter.type === 'string' && // Type guard to avoid casting\n filter.type.includes('BentoSelect') &&\n (filter.options as BentoSelectFilterOptions)?.multiple &&\n filterCount === (filter.options as BentoSelectFilterOptions)?.listboxItems?.length;\n\n const isBentoCheckboxGroupFilter =\n typeof filter.type === 'string' &&\n filter.type === BentoFilterItemType.CHECKBOX_GROUP &&\n filterCount === (filter.options as BentoCheckboxGroupFilterOptions)?.checkboxItems?.length;\n\n if (isBentoSelectFilter || isBentoCheckboxGroupFilter) {\n return t('all');\n }\n return filterCount == null ? null : n(filterCount);\n };\n\n const selectFilter = (filterLabel: string, filterField: string) => {\n selectedFilterIndex.value = filtersInModal.value.findIndex(\n el => el.label === filterLabel && el.field === filterField\n );\n if (isSmallScreen.value) {\n smallScreenActivePage.value = FILTER_APPLICATION_PAGE_ID;\n }\n };\n\n const onSearchbarClear = () => {\n searchTerm.value = '';\n };\n\n const cancel = () => {\n isModalOpen.value = false;\n filtersInModal.value = props.value;\n onSearchbarClear();\n };\n\n const updateFilter = (updatedFilter: BentoFilterBarFilterWithValue) => {\n const updatedFilters = filtersInModal.value.map(({ value, ...otherFields }, index) => {\n if (index === selectedFilterIndex.value) {\n return { value: updatedFilter.value, ...otherFields };\n }\n return { value, ...otherFields };\n });\n\n filtersInModal.value = updatedFilters;\n };\n\n const clearSelectedFilter = () => {\n updateFilter({\n field: selectedFilter.value.field,\n label: selectedFilter.value.label,\n type: selectedFilter.value.type,\n value: isSelectedFilterPersistent.value ? selectedFilter.value.defaultValue : undefined,\n });\n };\n\n const clearAll = () => {\n filtersInModal.value = props.value.map(filter => ({\n ...filter,\n value: filter.defaultValue,\n }));\n };\n\n const applyAll = () => {\n emit(AllFiltersModalEvent.INPUT, filtersInModal.value);\n isModalOpen.value = false;\n smallScreenActivePage.value = FILTER_SELECTION_PAGE_ID;\n };\n\n const isApplyAllButtonDisabled = computed(\n () => JSON.stringify(filtersInModal.value) === JSON.stringify(props.value)\n );\n\n const isClearAllButtonDisabled = computed(() =>\n hasPersistentFilters.value\n ? filtersInModal.value.every(filter => JSON.stringify(filter.value) === JSON.stringify(filter.defaultValue))\n : !numberOfActiveFilters.value\n );\n\n const modalActions = computed(() => [\n {\n title: t('applyAll'),\n disabled: isApplyAllButtonDisabled.value,\n event: applyAll,\n },\n\n {\n title: t('cancel'),\n event: cancel,\n },\n {\n title: t(hasPersistentFilters.value ? 'resetAll' : 'clearAll'),\n disabled: isClearAllButtonDisabled.value,\n event: clearAll,\n },\n ]);\n\n const onKeydownRight = () => {\n selectedFilterContentRef.value?.focusFirstInput();\n };\n\n const onKeydownLeft = () => {\n filterSelectionRef.value?.focusFilter(selectedFilter.value.label);\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * A modal that acts as sort of filter manager for the BentoFilterBar.\n *\n * @example\n * import { BentoAllFiltersModal } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAllFiltersModal },\n * template: `\n * <bento-all-filters-modal>\n * ...Example code of the component\n * </bento-all-filters-modal>\n * `\n * }\n */\n export default {\n name: 'all-filters-modal',\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./all-filters-modal.scss\" />\n","<template>\n <div ref=\"filterBarRef\" class=\"b-filter-bar\" :class=\"rootElementConditionalClasses\">\n <div v-if=\"!showSearchbarInsideContainer && isSearchBarEnabled\" class=\"b-filter-bar__search-external-container\">\n <bento-search-bar\n class=\"b-filter-bar__search-bar\"\n v-bind=\"searchBarProps\"\n :input-field-aria-label=\"searchBarAriaLabel\"\n :value=\"searchTerm\"\n condensed\n :style=\"searchBarWidthStyle\"\n @input=\"onSearchbarInput\"\n @clear=\"onSearchbarClear\"\n />\n </div>\n\n <component :is=\"screenLayoutComponent\" :class=\"containerConditionalClasses\" condensed>\n <div :class=\"contentConditionalClasses\">\n <div\n v-if=\"showSearchbarInsideContainer && isSearchBarEnabled\"\n class=\"b-filter-bar__search-bar-container\"\n :style=\"searchBarWidthStyle\"\n >\n <bento-search-bar\n class=\"b-filter-bar__search-bar\"\n v-bind=\"searchBarProps\"\n :input-field-aria-label=\"searchBarAriaLabel\"\n :value=\"searchTerm\"\n condensed\n @input=\"onSearchbarInput\"\n @clear=\"onSearchbarClear\"\n />\n </div>\n\n <template v-if=\"persistentFilters.length\">\n <component\n :is=\"filter.type\"\n v-for=\"filter in persistentFilters\"\n :key=\"filter.field\"\n :field=\"filter.field\"\n :label=\"filter.label\"\n :disabled=\"filter?.disabled\"\n :options=\"filter.options\"\n :value=\"filter.value\"\n :default-value=\"filter.defaultValue\"\n @update=\"updateFilterHandler\"\n />\n </template>\n\n <component\n :is=\"filter.type\"\n v-for=\"filter in regularFilters\"\n :key=\"filter.field\"\n :field=\"filter.field\"\n :label=\"filter.label\"\n :disabled=\"filter?.disabled\"\n :options=\"filter.options\"\n :value=\"filter.value\"\n @update=\"updateFilterHandler\"\n />\n\n <!-- All filters button -->\n <all-filters-modal\n v-if=\"hasHiddenFilters\"\n class=\"b-filter-bar__all-filters-modal\"\n :value=\"filtersInAllFiltersModal\"\n @input=\"updateFilterHandler\"\n />\n\n <!-- Clear all filters button -->\n <filter-bar-button v-if=\"isClearAllVisible\" class=\"b-filter-bar__clear-all\" @click=\"clearAllFilters\">\n {{ t('clearFilters') }}\n <template #iconLeft>\n <refresh-icon aria-hidden=\"true\" />\n </template>\n </filter-bar-button>\n\n <!-- Reset all filters button -->\n <filter-bar-button v-if=\"isResetAllVisible\" class=\"b-filter-bar__reset-all\" @click=\"resetAllFilters\">\n {{ t('resetFilters') }}\n <template #iconLeft>\n <refresh-icon aria-hidden=\"true\" />\n </template>\n </filter-bar-button>\n </div>\n </component>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref } from 'vue';\n import { FilterBarButton } from './components/filter-bar-button';\n import {\n type BentoFilterBarContainerSizeLayout,\n BentoFilterBarEvent,\n type BentoFilterBarFiltersWithValues,\n type BentoFilterBarFilterWithValue,\n type BentoFilterBarProps,\n } from './filter-bar.types';\n import BentoSearchBar from '@/components/search-bar/search-bar.vue';\n import { BentoSearchBarEvent } from '@/components/search-bar/search-bar.types';\n import { useBentoToastController } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import { useContainerSizeOptionsLayout } from './composables/use-container-size-options-layout/use-container-size-options-layout';\n import AllFiltersModal from './components/all-filters-modal/all-filters-modal.vue';\n import RefreshIcon from '@adyen/ui-assets-icons-16/vue/refresh';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n // TODO: setup Vue3 generics in Bento 2.0.0\n const props = defineProps({\n config: { default: () => [] },\n filterValues: { default: () => [] },\n containerSizeLayout: { default: null },\n search: { default: undefined },\n searchTerm: { default: undefined },\n showAppliedHiddenFilters: { type: Boolean, default: false },\n filterValuesObject: { default: undefined }\n});\n\n const emit = defineEmits([\n BentoFilterBarEvent.INPUT,\n BentoFilterBarEvent.UPDATE_FILTER_VALUES_OBJECT,\n BentoFilterBarEvent.UPDATE_FILTER_VALUES_ARRAY,\n BentoSearchBarEvent.CLEAR,\n BentoSearchBarEvent.INPUT,\n BentoSearchBarEvent.UPDATE,\n ]);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const filterBarRef = ref<HTMLDivElement>(null);\n\n const valueAndFilterValuesPropsMerged = computed(\n () =>\n props.config?.map(filterModel => {\n let filterValue = props.filterValues.find(({ field }) => field === filterModel.field)?.value;\n if (props.filterValuesObject && filterModel.field in props.filterValuesObject) {\n filterValue = props.filterValuesObject[filterModel.field];\n }\n if (filterValue === undefined) {\n filterValue = filterModel?.defaultValue;\n }\n\n return { ...filterModel, value: filterValue };\n }) as BentoFilterBarFiltersWithValues\n );\n const { addToast } = useBentoToastController();\n\n /**\n * Container size layout.\n * Allows to change the layout from multi-line to one-line for each container size type:\n * - large: >=700\n * - medium: >=430 & <700\n * - small: <430\n */\n const DEFAULT_CONTAINER_SIZE_LAYOUT: Required<BentoFilterBarContainerSizeLayout> = {\n large: 'multi-line',\n medium: 'one-line',\n small: 'multi-line',\n };\n\n const mergedContainerSizeLayout = computed<Required<BentoFilterBarContainerSizeLayout>>(() => ({\n ...DEFAULT_CONTAINER_SIZE_LAYOUT,\n ...props.containerSizeLayout,\n }));\n\n const {\n screenLayoutComponent,\n showSearchbarInsideContainer,\n isOneLineLayout,\n isLargeLayout,\n rootElementConditionalClasses,\n } = useContainerSizeOptionsLayout(filterBarRef, mergedContainerSizeLayout);\n\n /**\n * Classes\n */\n\n /**\n * Handles the classes of the swappable component ('div' or 'fixed-scroller)\n */\n const containerConditionalClasses = computed(() => ({\n 'b-filter-bar__fixed-scroller': isOneLineLayout.value,\n 'b-filter-bar__container': !isOneLineLayout.value, // Multi-line\n }));\n\n /**\n * Handles the classes of the container inside the swappable component.\n */\n const contentConditionalClasses = computed(() => ({\n 'b-filter-bar__scroller-content': isOneLineLayout.value,\n 'b-filter-bar__filters': !isOneLineLayout.value, // Multi-line\n }));\n\n /**\n * Search bar pops\n */\n const searchBarAriaLabel = computed(() => props.search?.inputFieldAriaLabel || (t('searchBar') as string));\n const searchBarProps = computed(() => {\n if (!props.search) {\n return undefined;\n }\n\n const { debounceTime, disabled, inputFieldAriaLabel, hint, placeholder } = props.search;\n return { debounceTime, disabled, inputFieldAriaLabel, hint, placeholder };\n });\n\n const searchBarWidthStyle = computed(() =>\n props.search?.width && isLargeLayout.value\n ? { flexBasis: props.search.width, maxWidth: props.search.width }\n : undefined\n );\n\n const hasVisibleSet = computed(() =>\n valueAndFilterValuesPropsMerged.value.some(({ visible }) => visible !== undefined && visible !== null)\n );\n\n const hasHiddenFilters = computed(() =>\n hasVisibleSet.value ? valueAndFilterValuesPropsMerged.value.some(({ visible }) => !visible) : false\n );\n\n // Persistent filters i.e. filters with default value\n const persistentFilters = computed(() =>\n valueAndFilterValuesPropsMerged.value.filter(\n ({ defaultValue, visible }) => defaultValue !== undefined && visible !== false\n )\n );\n\n const filtersInAllFiltersModal = computed(() =>\n valueAndFilterValuesPropsMerged.value.filter(\n ({ defaultValue, visible }) => defaultValue === undefined || visible === false\n )\n );\n\n const hasPersistentFilters = computed(() =>\n valueAndFilterValuesPropsMerged.value.some(({ defaultValue }) => defaultValue !== undefined)\n );\n\n // Show non-persistent & visible filters\n const regularFilters = computed(() => {\n // If no filter has the `visible` prop set then all are visible, otherwise search for the \"visible: true\" elements\n return hasVisibleSet.value\n ? valueAndFilterValuesPropsMerged.value.filter(\n ({ defaultValue, visible, value }) =>\n defaultValue === undefined &&\n (visible || (props.showAppliedHiddenFilters && value !== undefined && value !== null))\n )\n : valueAndFilterValuesPropsMerged.value.filter(({ defaultValue }) => defaultValue === undefined);\n });\n\n // Enable search bar.\n // Soft equality to check for \"null\" and \"undefined\"\n // eslint-disable-next-line eqeqeq\n const isSearchBarEnabled = computed(() => props.searchTerm != undefined);\n\n const hasActiveFilters = computed(() =>\n valueAndFilterValuesPropsMerged.value\n .filter(({ defaultValue }) => defaultValue === undefined || defaultValue === null)\n // Disabling strict equality to check for both undefined and null\n // eslint-disable-next-line eqeqeq\n .some(({ value }) => value != undefined)\n );\n\n // Show the \"Clear all\" button (true) if at least one filter is active (contains a value)\n // and there are not persistent filters present.\n const isClearAllVisible = computed(() => !hasPersistentFilters.value && hasActiveFilters.value);\n\n const isResetAllVisible = computed(() => {\n if (!hasPersistentFilters.value) {\n return false;\n }\n const areAllValuesEqualToDefaults = valueAndFilterValuesPropsMerged.value\n .filter(({ defaultValue }) => defaultValue !== undefined || defaultValue !== null)\n .every(({ value, defaultValue }) => JSON.stringify(value) === JSON.stringify(defaultValue));\n\n return !areAllValuesEqualToDefaults || hasActiveFilters.value;\n });\n\n const updateAllFilters = (newFilters: BentoFilterBarFiltersWithValues) => {\n emit(BentoFilterBarEvent.INPUT, newFilters);\n emit(\n BentoFilterBarEvent.UPDATE_FILTER_VALUES_ARRAY,\n newFilters\n ?.filter(({ value }) => value !== null || value !== undefined)\n .map(({ field, value }) => ({ field, value }))\n );\n emit(\n BentoFilterBarEvent.UPDATE_FILTER_VALUES_OBJECT,\n newFilters\n ?.filter(({ value }) => value !== null || value !== undefined)\n .reduce((acc, filter) => {\n acc[filter.field] = filter.value;\n return acc;\n }, {})\n );\n };\n\n const updateFilterHandler = (updatedFilters: BentoFilterBarFilterWithValue | BentoFilterBarFiltersWithValues) => {\n const filtersArray = Array.isArray(updatedFilters) ? updatedFilters : [updatedFilters];\n const updatedFiltersMap = new Map(filtersArray.map(filter => [filter.field, filter.value]));\n\n const newFilters = valueAndFilterValuesPropsMerged.value.map(filter => {\n if (updatedFiltersMap.has(filter.field)) {\n return { ...filter, value: updatedFiltersMap.get(filter.field) };\n }\n return filter;\n });\n\n updateAllFilters(newFilters);\n };\n\n const clearAllFilters = () => {\n const previousFilters = valueAndFilterValuesPropsMerged.value.slice();\n const clearedFilters = valueAndFilterValuesPropsMerged.value.map(({ value, ...otherFields }) => ({\n ...otherFields,\n value: undefined,\n }));\n\n addToast({\n text: t('filtersHaveBeenCleared') as string,\n action: {\n handler: () => updateAllFilters(previousFilters),\n text: t('undo') as string,\n },\n });\n updateAllFilters(clearedFilters);\n };\n\n const resetAllFilters = () => {\n const previousFilters = valueAndFilterValuesPropsMerged.value.slice();\n const resetFilters = valueAndFilterValuesPropsMerged.value.map(({ defaultValue, ...otherFields }) => ({\n ...otherFields,\n defaultValue,\n value: defaultValue,\n }));\n\n addToast({\n text: t('filtersHaveBeenReset') as string,\n action: {\n handler: () => updateAllFilters(previousFilters),\n text: t('undo') as string,\n },\n });\n updateAllFilters(resetFilters);\n };\n\n const onSearchbarInput = (newSearchTerm: string) => {\n emit(BentoSearchBarEvent.INPUT, newSearchTerm);\n emit(BentoSearchBarEvent.UPDATE, newSearchTerm);\n };\n const onSearchbarClear = () => {\n emit(BentoSearchBarEvent.CLEAR);\n };\n\n // Expose methods for BentoDataGrid to access\n defineExpose({ isClearAllVisible, clearAllFilters, isResetAllVisible, resetAllFilters });\n</script>\n\n<script lang=\"ts\">\n import {\n BentoBooleanFilter,\n BentoCheckboxGroupFilter,\n BentoDateFilter,\n BentoDateRangeFilter,\n BentoInputFilter,\n BentoInputWithDropdownFilter,\n BentoRadioGroupFilter,\n BentoRangeFilter,\n BentoSelectAvatarFilter,\n BentoSelectCountryFilter,\n BentoSelectCurrencyFilter,\n BentoSelectFilter,\n BentoSelectPaymentMethodFilter,\n BentoSelectTagFilter,\n BentoToggleFilter,\n } from './components';\n import { BentoTeleport, FixedScroller } from '@/internal';\n\n /**\n * The filter bar filters item lists and tables according to various filter criteria.\n *\n * @example\n * import { BentoFilterBar } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoFilterBar },\n * data: () => ({\n * filtersConfig: [{\n * field: 'name',\n * label: 'Name',\n * options: { ... },\n * type: FilterType.TEXT,\n * }],\n * filterValues: [{\n * field: 'name',\n * value: null,\n * }],\n * }),\n * template: `\n * <bento-filter-bar\n * :config=\"filtersConfig\"\n * :filter-values=\"filterValues\"\n * @update:filter-values=\"filterValues = $event\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-filter-bar',\n components: {\n BentoBooleanFilter,\n BentoCheckboxGroupFilter,\n BentoDateFilter,\n BentoDateRangeFilter,\n BentoInputFilter,\n BentoInputWithDropdownFilter,\n BentoRadioGroupFilter,\n BentoRangeFilter,\n BentoSelectAvatarFilter,\n BentoSelectCountryFilter,\n BentoSelectCurrencyFilter,\n BentoSelectFilter,\n BentoSelectPaymentMethodFilter,\n BentoSelectTagFilter,\n BentoTeleport,\n BentoToggleFilter,\n FixedScroller,\n },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./filter-bar.scss\" />\n"],"names":["isPlainObject","value","isArray$1","isValueEmpty$1","el","isEqual$1","first","second","deepCopy","item","acc","key","copyStructure","useBentoBaseFilter","appliedFilter","defaultFilter","internalFilterValue","ref","initialStructureOrValue","onMounted","watch","newValue","isFilterInactive","computed","isSecondaryButtonDisabled","isApplyButtonDisabled","clearFilter","callback","resetFilter","openFilter","isDate","isValid","date","toDate","getDayOfYear","options","_date","differenceInCalendarDays","startOfYear","addLeadingZeros","number","targetLength","sign","output","lightFormatters","token","signedYear","year","month","dayPeriodEnumValue","numberOfDigits","milliseconds","fractionalSeconds","dayPeriodEnum","formatters","localize","era","signedWeekYear","getWeekYear","weekYear","twoDigitYear","isoWeekYear","getISOWeekYear","quarter","week","getWeek","isoWeek","getISOWeek","dayOfYear","dayOfWeek","localDayOfWeek","isoDayOfWeek","hours","_localize","timezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","formatTimezoneShort","timestamp","offset","delimiter","absOffset","minutes","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","format","formatStr","defaultOptions","getDefaultOptions","locale","enUS","firstWeekContainsDate","weekStartsOn","originalDate","parts","substring","firstCharacter","longFormatter","longFormatters","cleanEscapedString","formatterOptions","part","isProtectedWeekYearToken","isProtectedDayOfYearToken","warnOrThrowProtectedError","formatter","input","matched","__default__$g","slots","useSlots","attrs","useAttrs","hasSlot","useHasSlot","labelSlot","getSlotText","isIconOnly","computedAriaLabel","useAriaLabel","filterBarButtonRef","ariaAttributes","isAppliedFilter","props","conditionalClasses","event","emit","__default__$f","BaseFilterEvent","BaseFilterEvent2","__default__$e","messages$9","t","useI18n","popoverId","generateUid","isFilterOpen","filterButtonRef","popoverRef","filterButtonEl","setPopoverRef","instance","isPersistentFilter","isValueChanged","ariaLabelValuePart","computedButtonText","computedClearButtonLabel","resetFocus","nextTick","closePopover","onClickSecondaryAction","onClickFilter","onClickApply","onCancel","onClickOutside","actions","prevValue","useClickOutside","expose","isArray","isValueEmpty","isEqual","useBaseFilter","__default__$d","inputTextRef","toRef","buttonLabel","buttonSecondaryLabel","truncate","onBeforeUpdate","updateFilter","BentoFilterEvent","BentoFilterEvent2","BentoFilterBarEvent","BentoFilterBarEvent2","BentoFilterItemType","BentoFilterItemType2","__default__$c","selectedDropdownLabel","selectedValue","label","dropdownSelection","dropdownOptions","shouldDisableApply","onInput","setInternalFilterValue","onDropdownInput","provide","INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY","_sfc_main$l","defineComponent","BentoBaseFilter","BentoDatePicker","BentoDivider","Calendar","isTouchDevice","useTouchDevice","formattedButtonDateText","dateFormatOptions","getDateTimeFormatter","onDateSelected","selectedDate","onDateInputSelected","touchDeviceDatePickerConditionalClasses","_sfc_main$k","messages$8","BentoButtonActions","BentoDateRangePicker","BentoTypography","DateRangePickerCalendar","dateLocale","useDynamicDateFnsLocale","dateToInputDateString","useDateInputFormatter","isSelectingDate","adjustedQuickSelectRanges","range","timeDiff","baseFilter","isDateIncorrect","formData","reactive","dateToTimeInputString","isQuickSelectAnArray","quickSelectRanges","calculateSecondaryLabel","currentValue","customRangeSelected","data","isEqual$2","isToday","isSameDay","onlySlot","cleanedProps","onRangeSelectorInput","dateFormDate","__default__$b","selectedValueLabel","__default__$a","messages$7","searchTerm","optionsRef","itemsRef","cachedSelectedListboxOptions","setCachedValues","resetCache","useCachedSelectedValues","cachedDefaultSelectedListboxOptions","filteredItems","useSearchBarFilter","noResultsMessage","isSingleSelectAndOneItemSelected","isMultiSelectedAndOneItemSelected","displayValue2","printDevelopmentWarning","displayValue","x","listboxFilterId","onOptionSelected","value2","value3","closeFilter","appliedFiltersCount","allSelectableItemsCount","selectedAmount","__default__$9","messages$6","SelectFilterProps","__default__$8","updatedProps","_sfc_main$f","BentoSelectFilter","BentoAvatar","_","_sfc_main$e","ListboxOptionTag","onUpdate","newList","search","searchableItems","normalizedResults","result","internalOptions","__default__$7","variant","BentoCountryVariant","listboxItems","countryItems","useCountryItems","countryOptions","_sfc_main$c","BentoPaymentMethod","_props","_sfc_main$b","tagItems","__default__$6","messages$5","checkboxLabelId","checkboxDescriptionId","internalValue","onlySlotConditionalClasses","updateProps","_sfc_main$9","messages$4","BentoRadioGroup","translateBooleanToString","aStringOrBooleanValue","translateBackToOriginalValueType","translatedDefaultValue","translatedValue","items","deprecate","isDigit","useNumericInput","prettyOutput","unref","inputRef","isFocused","negative","focusedDecimalPart","privateValue","decimalSeparator","p","maximumFractionDigits","invalidPattern","getEventTargetValue","parseInputValue","inputValue","isNegative","sanitizedValue","decimalSeparatorIndex","hasSingleDecimalSeparator","decimalPart","cappedDecimalPart","cappedSanitizedValue","normalizedValue","numberValue","shouldPreserveNegative","getOutputValue","val","getFocusedOutputValue","integerValue","formattedValue","setValue","finalValue","isNumber","absValue","getCaretPosition","setCaretPosition","pos","getDigitsBeforeCaret","fieldValue","caretPosition","digits","i","setCaretAfterNthDigit","nDigits","position","currentDisplay","handlePrettyInput","oldCaretPosition","nDigitsBefore","target","selectionStart","selectionEnd","targetValue","valueWithoutSelection","__default__$5","messages$3","fromFieldRef","toFieldRef","fromNum","toNum","stringifyInputValue","displayFrom","handleInputFrom","handleKeyDownFrom","onFocusFrom","onBlurFrom","inputRefFrom","handleModelValueFrom","displayTo","handleInputTo","handleKeyDownTo","onFocusTo","onBlurTo","inputRefTo","handleModelValueTo","newVal","nextFrom","nextTo","truncatedRangeValues","prefix","fromVal","toVal","rangeFromLabel","seperator","rangeToLabel","__default__$4","messages$2","displayedValues","SMALL_SIZE_THRESHOLD","LARGE_SIZE_THRESHOLD","useContainerSizeOptionsLayout","containerSizeLayoutOptions","screenLayoutComponent","shallowRef","isOneLineLayout","containerWidth","showSearchbarInsideContainer","setMultiLineConfig","setOneLineConfig","FixedScroller","calculateConfig","useResizeObserver","entries","isLargeLayout","rootElementConditionalClasses","AllFiltersModalEvent","AllFiltersModalEvent2","_sfc_main$6","BaseButton","ChevronUpIcon","ChevronDownIcon","BentoBaseButtonEvent","baseFilterButtonRef","_sfc_main$5","BaseFilterButton","__default__$3","filterButtons","screenIdPrefix","setFilterButtonRef","element","focusFilter","__default__$2","BentoBooleanFilter","BentoCheckboxGroupFilter","BentoDateFilter","BentoDateRangeFilter","BentoInputFilter","BentoInputWithDropdownFilter","BentoRadioGroupFilter","BentoRangeFilter","BentoSelectAvatarFilter","BentoSelectCountryFilter","BentoSelectCurrencyFilter","BentoSelectPaymentMethodFilter","BentoSelectTagFilter","BentoToggleFilter","selectedFilterRef","focusFirstInput","selectedFilterElement","getNextFocusableElement","getCurrentInstance","uuid","__default__$1","messages$1","FILTER_SELECTION_PAGE_ID","FILTER_APPLICATION_PAGE_ID","filtersInModal","allFiltersModalUniqueId","filterSelectionRef","isModalOpen","selectedFilterIndex","selectedFilterContentRef","smallScreenActivePage","n","isSmallScreen","useMediaQuery","filter","index","sortAlphabetically","array","a","b","activeFilters","otherFilters","isEmptyResultForSearchFilter","selectedFilter","selectOpenedFilter","openedFilter","openedFilterIndex","isOpen","computeCounts","filterValue","selectedFilterValue","hasValueSelected","hasPersistentFilters","defaultValue","isSelectedFilterPersistent","shouldShowFilterTitle","isClearButtonDisabled","filtersIncludedInActiveCount","numberOfActiveFilters","count","onClickAllFiltersModal","filterCounts","field","getFilterCount","filterCount","isBentoSelectFilter","isBentoCheckboxGroupFilter","selectFilter","filterLabel","filterField","onSearchbarClear","cancel","updatedFilter","updatedFilters","otherFields","clearSelectedFilter","clearAll","applyAll","isApplyAllButtonDisabled","isClearAllButtonDisabled","modalActions","__default__","messages","BentoTeleport","filterBarRef","valueAndFilterValuesPropsMerged","filterModel","addToast","useBentoToastController","DEFAULT_CONTAINER_SIZE_LAYOUT","mergedContainerSizeLayout","containerConditionalClasses","contentConditionalClasses","searchBarAriaLabel","searchBarProps","debounceTime","disabled","inputFieldAriaLabel","hint","placeholder","searchBarWidthStyle","hasVisibleSet","visible","hasHiddenFilters","persistentFilters","filtersInAllFiltersModal","regularFilters","isSearchBarEnabled","hasActiveFilters","isClearAllVisible","isResetAllVisible","updateAllFilters","newFilters","updateFilterHandler","filtersArray","updatedFiltersMap","clearAllFilters","previousFilters","clearedFilters","resetAllFilters","resetFilters","onSearchbarInput","newSearchTerm","BentoSearchBarEvent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,MAAAA,KAAA,CAAAC,MACHA,MAAA,QAAA,OAAAA,KAAA,WACI,KAGJ,OAAA,UAAA,SAAA,KAAAA,CAAA,MAAA,mBASGC,KAAA,CAAAD,MAAA,MAAA,QAAAA,CAAA,GAUAE,KAAA,CAAAF,MAAAC,GAAAD,CAAA,IAAAA,EAAA,WAAA,KAAAA,EAAA,MAAA,CAAAG,MAAAA,MAAA,EAAA,IAAA,CAAAH,GAUAI,KAAA,CAAAC,GAAAC,MAAA,KAAA,UAAAD,CAAA,MAAA,KAAA,UAAAC,CAAA,GAUAC,KAAA,CAAAP,MACHD,GAAAC,CAAA,IAKAA,aAAA,OACI,IAAA,KAAAA,EAAA,QAAA,CAAA,IAIJC,GAAAD,CAAA,IACIA,EAAA,IAAA,CAAAQ,MAAAD,GAAAC,CAAA,CAAA,IAIJ,OAAA,KAAAR,CAAA,EAAA,OAAA,CAAAS,GAAAC,OACID,EAAAC,CAAA,IAAAH,GAAAP,EAAAU,CA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AAAgb,GAAA,OAAAD,CAAA,GACA/a,EAAAgb,GAAA,QAAAD,CAAA;AAAA,IAA8C,GAElDpD,KAAA,MAAA;AACI,MAAA3X,EAAAgb,GAAA,KAAA;AAAA,IAA8B;AAIlC,WAAAhZ,EAAA,EAAA,mBAAAkY,GAAA,iBAAAO,GAAA,mBAAAN,GAAA,iBAAAS,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[2,3,4,5,6,7,8]}
1
+ {"version":3,"file":"filter-bar.D7Lk7wlq.js","sources":["../../src/composables/use-bento-base-filter/utils/utils.ts","../../src/composables/use-bento-base-filter/use-bento-base-filter.ts","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isDate.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isValid.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getDayOfYear.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/addLeadingZeros.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/lightFormatters.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/formatters.js","../../../../node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/format.js","../../src/components/filter-bar/components/filter-bar-button/filter-bar-button.vue","../../src/components/filter-bar/components/filter-bar-button-group/filter-bar-button-group.vue","../../src/components/filter-bar/components/base-filter/base-filter.internal.types.ts","../../src/components/filter-bar/components/base-filter/base-filter.vue","../../src/components/filter-bar/components/base-filter/composables/use-base-filter.ts","../../src/components/filter-bar/components/input-filter/input-filter.vue","../../src/components/filter-bar/filter-bar.types.ts","../../src/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.vue","../../src/components/filter-bar/components/date-filter/date-filter.vue","../../src/components/filter-bar/components/date-range-filter/date-range-filter.vue","../../src/components/filter-bar/components/radio-group-filter/radio-group-filter.vue","../../src/components/filter-bar/components/select-filter/components/select-filter-button/select-filter-button.vue","../../src/components/filter-bar/components/select-filter/components/select-filter-dropdown/select-filter-dropdown.vue","../../src/components/filter-bar/components/select-filter/select-filter.props.ts","../../src/components/filter-bar/components/select-filter/select-filter.vue","../../src/components/filter-bar/components/select-filter/variants/select-avatar-filter/select-avatar-filter.vue","../../src/components/filter-bar/components/select-filter/variants/select-currency-filter/select-currency-filter.vue","../../src/components/filter-bar/components/select-filter/variants/select-country-filter/select-country-filter.vue","../../src/components/filter-bar/components/select-filter/variants/select-payment-method-filter/select-payment-method-filter.vue","../../src/components/filter-bar/components/select-filter/variants/select-tag-filter/select-tag-filter.vue","../../src/components/filter-bar/components/toggle-filter/toggle-filter.vue","../../src/components/filter-bar/components/boolean-filter/boolean-filter.vue","../../src/composables/use-numeric-input/use-numeric-input.ts","../../src/components/filter-bar/components/range-filter/range-filter.vue","../../src/components/filter-bar/components/checkbox-group-filter/checkbox-group-filter.vue","../../src/components/filter-bar/composables/use-container-size-options-layout/use-container-size-options-layout.ts","../../src/components/filter-bar/components/all-filters-modal/all-filters-modal.types.ts","../../src/components/filter-bar/components/base-filter-button/base-filter-button.vue","../../src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-button/all-filters-modal-button.vue","../../src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-filter-selection/all-filters-modal-filter-selection.vue","../../src/components/filter-bar/components/all-filters-modal/components/all-filters-modal-selected-filter/all-filters-modal-selected-filter.vue","../../../ui-assets/icons-16/dist/vue/sliders-1.vue","../../src/components/filter-bar/components/all-filters-modal/all-filters-modal.vue","../../src/components/filter-bar/filter-bar.vue"],"sourcesContent":["/**\n * Checks if a value is a plain object.\n *\n * @param value The value to check.\n * @returns Whether the value is a plain object.\n */\nexport const isPlainObject = (value: unknown) => {\n if (value === null || typeof value !== 'object') {\n return false;\n }\n\n return Object.prototype.toString.call(value) === '[object Object]';\n};\n\n/**\n * Checks if a value is an array.\n *\n * @param value The value to check.\n * @returns Whether the value is an array.\n */\nexport const isArray = <T>(value: T) => Array.isArray(value);\n\n/**\n * Checks if a value is empty.\n * If the value is an array, it checks if the array is empty or if all elements are empty strings.\n * If the value is not an array, it checks if the value is falsy.\n *\n * @param value The value to check.\n * @returns Whether the value is empty.\n */\nexport const isValueEmpty = <T>(value: T) =>\n isArray(value) ? (value as []).length === 0 || (value as Array<T>).every(el => el === '') : !value;\n\n/**\n * Checks if two objects are deeply equal by comparing their JSON string representations.\n *\n * @param first The first value.\n * @param second The second value.\n * @returns Whether the values are equal.\n */\nexport const isEqual = <T>(first: T, second: T) => JSON.stringify(first) === JSON.stringify(second);\n\n/**\n * Creates a deep copy of a value.\n * Recursively copies an object or array to return the original value.\n * Otherwise, it returns the value as is.\n *\n * @param value The value to copy.\n * @returns The deep copied value or the original value if it's not a plain object or array.\n */\nexport const deepCopy = <T>(value: T) => {\n if (!isPlainObject(value)) {\n return value;\n }\n\n // If it's a Date, make a copy\n if (value instanceof Date) {\n return new Date(value.getTime()) as T;\n }\n\n // If it's an array, map over it and deep copy each item\n if (isArray(value)) {\n return value.map(item => deepCopy(item)) as T;\n }\n\n // If it's an object, iterate over its keys and deep copy each value\n return Object.keys(value).reduce((acc, key) => {\n acc[key] = deepCopy(value[key]);\n return acc;\n }, {});\n};\n\n/**\n * Copies the structure of a plain object, setting all values to `undefined`.\n * If the value is not a plain object, it returns `undefined`.\n *\n * @param value The object whose structure to copy.\n * @returns An object with the same keys as the input object but with all values set to `undefined`, or `undefined` if the input is not a plain object.\n */\nexport const copyStructure = <T>(value: T) =>\n isPlainObject(value) ? Object.fromEntries(Object.keys(value).map(key => [key, undefined])) : undefined;\n","import { computed, onMounted, ref, watch } from 'vue';\nimport type { Ref } from 'vue';\nimport { copyStructure, deepCopy, isEqual, isValueEmpty } from './utils';\n\n/**\n * A composable to wire the `bento-base-filter` component for the mandatory fields and events.\n *\n * @usage\n * ```vue\n * <template>\n * <bento-base-filter\n * :disable-apply-button=\"isApplyButtonDisabled\"\n * :disable-secondary-button=\"isSecondaryButtonDisabled\"\n * @ apply=\"updateFilter\"\n * @ clear=\"clearFilter(updateFilter)\"\n * @ open=\"openFilter\"\n * @ reset=\"resetFilter(updateFilter)\"\n * >\n * <!-- CONTENT HERE -->\n * </bento-base-filter>\n * </template>\n * <script>\n * import { ref } from 'vue'\n * import { useBentoBaseFilter, BentoBaseFilter, BentoBaseFilterProps } from '@adyen/bento-vue2'\n *\n * type CustomFilterValue = boolean\n * const props = defineProps<BentoBaseFilterProps<CustomFilterValue>>();\n *\n * const {\n * // Values\n * internalFilterValue,\n * isSecondaryButtonDisabled,\n * isApplyButtonDisabled,\n *\n * // Methods\n * clearFilter,\n * resetFilter,\n * openFilter,\n * } = useBentoBaseFilter<CustomFilterValue>(toRef(props, 'value'), toRef(props, 'defaultValue'));\n * </script>\n * ```\n *\n * @param appliedFilter The currently applied filter value.\n * @param defaultFilter The default filter value (if available).\n * @returns An object containing refs and functions:\n * - `internalFilterValue`: The temporary state of the filter before it's applied.\n * - `isSecondaryButtonDisabled`: `true` if the secondary (clear/reset) button should be disabled.\n * - `isApplyButtonDisabled`: `true` if the apply button should be disabled.\n * - `clearFilter`: Clears the filter to its initial or default state.\n * - `resetFilter`: Resets the filter to its default state.\n * - `openFilter`: Syncs the internal state with the applied filter.\n */\nexport function useBentoBaseFilter<T>(appliedFilter: Ref<T>, defaultFilter: Ref<T>) {\n /**\n * Handles the internal value. Kept in sync when the new value is applied\n */\n const internalFilterValue = ref<T>();\n const initialStructureOrValue = ref<T>();\n\n onMounted(() => {\n /**\n * Copy initial structure as long as the value is not \"undefined\"\n */\n if (appliedFilter.value != null) {\n initialStructureOrValue.value = copyStructure<T>(appliedFilter.value) as T;\n }\n });\n\n watch(\n () => appliedFilter.value,\n newValue => {\n internalFilterValue.value = deepCopy<T>(newValue);\n },\n { immediate: true }\n );\n\n /**\n * Indicates if the filter has a value applied (active).\n * - inactive (`true`): `appliedFilter` is empty (`undefined`) or all of its properties are empty for object values\n */\n const isFilterInactive = computed(\n () => isValueEmpty(appliedFilter.value) || isEqual<T>(appliedFilter.value, initialStructureOrValue.value)\n );\n\n /**\n * Indicates if the secondary (clear/reset) button should be disabled.\n * - disabled (`true`): No filter value is applied or `appliedFilter` value is the same as the `defaultFilter` (persistent) value\n */\n const isSecondaryButtonDisabled = computed(() =>\n defaultFilter.value != null ? isEqual<T>(defaultFilter.value, appliedFilter.value) : isFilterInactive.value\n );\n\n const isApplyButtonDisabled = computed(() => {\n const isValueUnchanged = isEqual<T>(internalFilterValue.value, appliedFilter.value);\n return isValueUnchanged || (isValueEmpty(internalFilterValue.value) && isFilterInactive.value);\n });\n\n /**\n * Clears the non-persistent filters (not used in persistent filters).\n *\n * Receives a callback to execute additional tasks required when clearing a filter\n *\n * - `object`: Sets all properties to `undefined`\n * - non-`object`: Sets to `undefined`\n * @param callback Function to be called when clearing a filter\n */\n function clearFilter(callback?: (newValue: T) => void) {\n internalFilterValue.value = deepCopy<T>(initialStructureOrValue.value);\n if (callback) {\n callback(internalFilterValue.value);\n }\n }\n\n /**\n * Resets the persistent filters (not used in non-persistent filters).\n * Sets the `internalFilterValue`\n *\n * Receives a callback to execute additional tasks required when resetting a filter.\n * @param callback Function to be called when resetting a filter\n */\n function resetFilter(callback?: (newValue: T) => void) {\n internalFilterValue.value = deepCopy<T>(defaultFilter.value);\n if (callback) {\n callback(internalFilterValue.value);\n }\n }\n\n /**\n * Sets the value to what is applied when opening a filter.\n * @param callback Function to be called when opening a filter\n */\n function openFilter(callback?: (newValue: T) => void) {\n // Reset value every time it opens\n internalFilterValue.value = deepCopy<T>(appliedFilter.value);\n if (callback) {\n callback(internalFilterValue.value);\n }\n }\n\n return {\n // Values\n internalFilterValue,\n isSecondaryButtonDisabled,\n isApplyButtonDisabled,\n\n // Methods\n clearFilter,\n resetFilter,\n openFilter,\n };\n}\n","/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n return (\n value instanceof Date ||\n (typeof value === \"object\" &&\n Object.prototype.toString.call(value) === \"[object Date]\")\n );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n","import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const diff = differenceInCalendarDays(_date, startOfYear(_date));\n const dayOfYear = diff + 1;\n return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n","export function addLeadingZeros(number, targetLength) {\n const sign = number < 0 ? \"-\" : \"\";\n const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n return sign + output;\n}\n","import { addLeadingZeros } from \"../addLeadingZeros.js\";\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n // Year\n y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n },\n\n // Month\n M(date, token) {\n const month = date.getMonth();\n return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n\n // Day of the month\n d(date, token) {\n return addLeadingZeros(date.getDate(), token.length);\n },\n\n // AM or PM\n a(date, token) {\n const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return dayPeriodEnumValue.toUpperCase();\n case \"aaa\":\n return dayPeriodEnumValue;\n case \"aaaaa\":\n return dayPeriodEnumValue[0];\n case \"aaaa\":\n default:\n return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n }\n },\n\n // Hour [1-12]\n h(date, token) {\n return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n },\n\n // Hour [0-23]\n H(date, token) {\n return addLeadingZeros(date.getHours(), token.length);\n },\n\n // Minute\n m(date, token) {\n return addLeadingZeros(date.getMinutes(), token.length);\n },\n\n // Second\n s(date, token) {\n return addLeadingZeros(date.getSeconds(), token.length);\n },\n\n // Fraction of second\n S(date, token) {\n const numberOfDigits = token.length;\n const milliseconds = date.getMilliseconds();\n const fractionalSeconds = Math.trunc(\n milliseconds * Math.pow(10, numberOfDigits - 3),\n );\n return addLeadingZeros(fractionalSeconds, token.length);\n },\n};\n","import { getDayOfYear } from \"../../getDayOfYear.js\";\nimport { getISOWeek } from \"../../getISOWeek.js\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.js\";\nimport { getWeek } from \"../../getWeek.js\";\nimport { getWeekYear } from \"../../getWeekYear.js\";\n\nimport { addLeadingZeros } from \"../addLeadingZeros.js\";\nimport { lightFormatters } from \"./lightFormatters.js\";\n\nconst dayPeriodEnum = {\n am: \"am\",\n pm: \"pm\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n // Era\n G: function (date, token, localize) {\n const era = date.getFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case \"G\":\n case \"GG\":\n case \"GGG\":\n return localize.era(era, { width: \"abbreviated\" });\n // A, B\n case \"GGGGG\":\n return localize.era(era, { width: \"narrow\" });\n // Anno Domini, Before Christ\n case \"GGGG\":\n default:\n return localize.era(era, { width: \"wide\" });\n }\n },\n\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === \"yo\") {\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, { unit: \"year\" });\n }\n\n return lightFormatters.y(date, token);\n },\n\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n const signedWeekYear = getWeekYear(date, options);\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === \"YY\") {\n const twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n }\n\n // Ordinal number\n if (token === \"Yo\") {\n return localize.ordinalNumber(weekYear, { unit: \"year\" });\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length);\n },\n\n // ISO week-numbering year\n R: function (date, token) {\n const isoWeekYear = getISOWeekYear(date);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length);\n },\n\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n const year = date.getFullYear();\n return addLeadingZeros(year, token.length);\n },\n\n // Quarter\n Q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"Q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"QQ\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"Qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"QQQ\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"QQQQQ\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"QQQQ\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone quarter\n q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"qq\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"qqq\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"qqqqq\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"qqqq\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // Month\n M: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n case \"M\":\n case \"MM\":\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n case \"Mo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"MMM\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // J, F, ..., D\n case \"MMMMM\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // January, February, ..., December\n case \"MMMM\":\n default:\n return localize.month(month, { width: \"wide\", context: \"formatting\" });\n }\n },\n\n // Stand-alone month\n L: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n // 1, 2, ..., 12\n case \"L\":\n return String(month + 1);\n // 01, 02, ..., 12\n case \"LL\":\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n case \"Lo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"LLL\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // J, F, ..., D\n case \"LLLLL\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // January, February, ..., December\n case \"LLLL\":\n default:\n return localize.month(month, { width: \"wide\", context: \"standalone\" });\n }\n },\n\n // Local week of year\n w: function (date, token, localize, options) {\n const week = getWeek(date, options);\n\n if (token === \"wo\") {\n return localize.ordinalNumber(week, { unit: \"week\" });\n }\n\n return addLeadingZeros(week, token.length);\n },\n\n // ISO week of year\n I: function (date, token, localize) {\n const isoWeek = getISOWeek(date);\n\n if (token === \"Io\") {\n return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n\n // Day of the month\n d: function (date, token, localize) {\n if (token === \"do\") {\n return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n }\n\n return lightFormatters.d(date, token);\n },\n\n // Day of year\n D: function (date, token, localize) {\n const dayOfYear = getDayOfYear(date);\n\n if (token === \"Do\") {\n return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n\n // Day of week\n E: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n switch (token) {\n // Tue\n case \"E\":\n case \"EE\":\n case \"EEE\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"EEEEE\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"EEEEEE\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"EEEE\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Local day of week\n e: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case \"e\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"ee\":\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n case \"eo\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"eee\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"eeeee\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"eeeeee\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"eeee\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case \"c\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"cc\":\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n case \"co\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"ccc\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // T\n case \"ccccc\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // Tu\n case \"cccccc\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"standalone\",\n });\n // Tuesday\n case \"cccc\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // ISO day of week\n i: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case \"i\":\n return String(isoDayOfWeek);\n // 02\n case \"ii\":\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n case \"io\":\n return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n // Tue\n case \"iii\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"iiiii\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"iiiiii\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"iiii\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM or PM\n a: function (date, token, localize) {\n const hours = date.getHours();\n const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"aaa\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"aaaaa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"aaaa\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n }\n\n switch (token) {\n case \"b\":\n case \"bb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"bbb\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"bbbbb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"bbbb\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case \"B\":\n case \"BB\":\n case \"BBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"BBBBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"BBBB\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === \"ho\") {\n let hours = date.getHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return lightFormatters.h(date, token);\n },\n\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === \"Ho\") {\n return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n }\n\n return lightFormatters.H(date, token);\n },\n\n // Hour [0-11]\n K: function (date, token, localize) {\n const hours = date.getHours() % 12;\n\n if (token === \"Ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Hour [1-24]\n k: function (date, token, localize) {\n let hours = date.getHours();\n if (hours === 0) hours = 24;\n\n if (token === \"ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Minute\n m: function (date, token, localize) {\n if (token === \"mo\") {\n return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n }\n\n return lightFormatters.m(date, token);\n },\n\n // Second\n s: function (date, token, localize) {\n if (token === \"so\") {\n return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n }\n\n return lightFormatters.s(date, token);\n },\n\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return \"Z\";\n }\n\n switch (token) {\n // Hours and optional minutes\n case \"X\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case \"XXXX\":\n case \"XX\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case \"XXXXX\":\n case \"XXX\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case \"x\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case \"xxxx\":\n case \"xx\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case \"xxxxx\":\n case \"xxx\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (GMT)\n O: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"O\":\n case \"OO\":\n case \"OOO\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"OOOO\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (specific non-location)\n z: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"z\":\n case \"zz\":\n case \"zzz\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"zzzz\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Seconds timestamp\n t: function (date, token, _localize) {\n const timestamp = Math.trunc(+date / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n\n // Milliseconds timestamp\n T: function (date, token, _localize) {\n return addLeadingZeros(+date, token.length);\n },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = Math.trunc(absOffset / 60);\n const minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n if (offset % 60 === 0) {\n const sign = offset > 0 ? \"-\" : \"+\";\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n const minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const originalDate = toDate(date, options?.in);\n\n if (!isValid(originalDate)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n let parts = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp)\n .map((substring) => {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return { isToken: false, value: \"'\" };\n }\n\n const firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return { isToken: false, value: cleanEscapedString(substring) };\n }\n\n if (formatters[firstCharacter]) {\n return { isToken: true, value: substring };\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n return { isToken: false, value: substring };\n });\n\n // invoke localize preprocessor (only for french locales at the moment)\n if (locale.localize.preprocessor) {\n parts = locale.localize.preprocessor(originalDate, parts);\n }\n\n const formatterOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n return parts\n .map((part) => {\n if (!part.isToken) return part.value;\n\n const token = part.value;\n\n if (\n (!options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)) ||\n (!options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token))\n ) {\n warnOrThrowProtectedError(token, formatStr, String(date));\n }\n\n const formatter = formatters[token[0]];\n return formatter(originalDate, token, locale.localize, formatterOptions);\n })\n .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n const matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n","<template>\n <base-button\n ref=\"filterBarButtonRef\"\n v-bind=\"$attrs\"\n class=\"b-filter-bar-button\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n :aria-label=\"computedAriaLabel\"\n :aria-controls=\"ariaAttributes['aria-controls']\"\n type=\"button\"\n @click=\"onClickButton\"\n >\n <div class=\"b-filter-bar-button__container\">\n <template v-if=\"hasSlot('iconLeft')\">\n <slot name=\"iconLeft\" />\n </template>\n\n <div class=\"b-filter-bar-button__label-container\">\n <bento-typography el=\"span\" variant=\"body\" stronger class=\"b-filter-bar-button__label\">\n <span>\n <slot />\n </span>\n <bento-typography\n v-if=\"secondaryLabel && !isIconOnly\"\n el=\"span\"\n variant=\"body\"\n stronger\n class=\"b-filter-bar-button__label\"\n >:</bento-typography\n >\n </bento-typography>\n <bento-typography\n v-if=\"appliedFiltersCount && !isIconOnly\"\n class=\"b-filter-bar-button__counter\"\n el=\"span\"\n variant=\"body\"\n stronger\n >\n {{ appliedFiltersCount }}\n </bento-typography>\n <bento-typography\n v-if=\"secondaryLabel && !isIconOnly\"\n el=\"span\"\n variant=\"body\"\n stronger\n class=\"b-filter-bar-button__secondary-label\"\n >\n {{ secondaryLabel }}\n </bento-typography>\n </div>\n </div>\n </base-button>\n</template>\n\n<script setup lang=\"ts\">\n import { BaseButton } from '@/components/internal/base-button';\n import { BentoTypography } from '@/components/typography';\n import { useHasSlot } from '@/composables';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import { computed, ref, useAttrs, useSlots } from 'vue';\n\n const props = defineProps({\n /**\n * Allows to set the button as active without setting a \"secondaryLabel\"\n */\n active: { type: Boolean, default: false },\n\n /**\n * The number of applied values within the filter.\n * Text can also be applied here such as 'All'.\n * e.g. if 2 items in a dropdown filter have been applied, the number 2 will be shown here.\n */\n appliedFiltersCount: { type: [String, Number], default: null },\n\n /**\n * Disables button functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Signifies if the filter is open or closed.\n */\n isFilterOpen: { type: Boolean, default: false },\n\n /**\n * Signifies if the filter is a persistent filter\n */\n isPersistentFilter: { type: Boolean, default: false },\n\n /**\n * Renders the button without the applied state styles\n */\n noAppliedStateStyles: { type: Boolean, default: false },\n\n /**\n * A secondary label to be added next to the primary for additional filtering information.\n * i.e. Can be used to show the set value for said filter.\n */\n secondaryLabel: { type: String, default: null },\n });\n\n const emit = defineEmits([\"click\"]);\n\n const slots = useSlots();\n const attrs = useAttrs();\n const hasSlot = useHasSlot(slots);\n const labelSlot = computed((): string => (slots.default ? getSlotText(slots)('default') : null));\n const isIconOnly = computed(() => !hasSlot('default') && hasSlot('iconLeft'));\n const computedAriaLabel = useAriaLabel({ ariaLabel: labelSlot });\n const filterBarButtonRef = ref(null);\n\n const ariaAttributes = computed(() => ({\n 'aria-controls': attrs['aria-controls']?.toString() as string,\n }));\n\n const isAppliedFilter = computed(\n () =>\n (props.appliedFiltersCount || props.secondaryLabel || props.isPersistentFilter) &&\n !props.noAppliedStateStyles\n );\n\n const conditionalClasses = computed(() => ({\n 'b-filter-bar-button--applied': isAppliedFilter.value || props.active,\n 'b-filter-bar-button--filter-open': props.isFilterOpen && !isAppliedFilter.value,\n 'b-filter-bar-button--filter-open-applied': props.isFilterOpen && isAppliedFilter.value,\n 'b-filter-bar-button--with-secondary-label': props.secondaryLabel,\n 'b-filter-bar-button--with-counter': props.appliedFiltersCount,\n 'b-filter-bar-button--icon-only': isIconOnly.value,\n }));\n\n const onClickButton = (event: MouseEvent) => {\n event.preventDefault();\n if (!props.disabled) {\n emit('click', event);\n }\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * A filter button used as a base to extend all sorts of filter buttons.\n * Used in the bento-filter-bar and all-filter-modals components.\n *\n * @usage\n * export default {\n * components: { FilterBarButton },\n * template: `\n * <filter-bar-button>\n * Filter\n * </filter-bar-button>\n * `,\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./filter-bar-button.scss\" />\n","<template>\n <div class=\"b-filter-bar-button-group\" :class=\"conditionalClasses\">\n <slot></slot>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { type BentoFilterBarButtonGroupProps } from './filter-bar-button-group.types';\n import { computed } from 'vue';\n\n const props = defineProps({\n isActive: { type: Boolean, default: false },\n skipGrouping: { type: Boolean, default: false }\n});\n\n const conditionalClasses = computed(() => ({\n 'b-filter-bar-button-group--active': props.isActive,\n 'b-filter-bar-button-group--grouped': !props.skipGrouping,\n }));\n</script>\n\n<script lang=\"ts\">\n /**\n * A button group used to group buttons in the filter bar.\n *\n * @usage\n * import { FilterBarButtonGroup } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { FilterBarButtonGroup },\n * template: `\n * <filter-bar-button-group>\n * <filter-bar-button>Filter</filter-bar-button>\n * <filter-bar-button>Clear</filter-bar-button>\n * </filter-bar-button-group>\n * `,\n * }\n */\n export default {};\n</script>\n\n<style lang=\"scss\" scoped src=\"./filter-bar-button-group.scss\" />\n","export enum BaseFilterEvent {\n APPLY = 'apply',\n CLEAR = 'clear',\n OPEN = 'open',\n CLOSE = 'close',\n RESET = 'reset',\n CANCEL = 'cancel',\n}\n","<template>\n <div v-if=\"onlySlot\">\n <slot></slot>\n </div>\n <div v-else class=\"b-base-filter\">\n <filter-bar-button-group\n v-bento-tooltip-directive:[tooltipPosition]=\"tooltipText\"\n :is-active=\"isFilterOpen\"\n :skip-grouping=\"!isValueChanged\"\n >\n <filter-bar-button\n ref=\"filterButtonRef\"\n :aria-label=\"computedAriaLabel\"\n :aria-controls=\"isFilterOpen ? popoverId : null\"\n :applied-filters-count=\"appliedFiltersCount\"\n :disabled=\"disabled\"\n :is-persistent-filter=\"isPersistentFilter\"\n :is-filter-open=\"isFilterOpen\"\n :secondary-label=\"buttonSecondaryLabel\"\n @click=\"onClickFilter\"\n @keydown.esc=\"closePopover\"\n >\n {{ computedButtonText }}\n </filter-bar-button>\n\n <filter-bar-button\n v-if=\"isValueChanged\"\n :applied-filters-count=\"appliedFiltersCount\"\n :disabled=\"disabled\"\n :is-persistent-filter=\"isPersistentFilter\"\n :is-filter-open=\"isFilterOpen\"\n :secondary-label=\"buttonSecondaryLabel\"\n @click=\"resetFilter\"\n >\n <template #iconLeft>\n <cross-small-icon :svg-title=\"computedClearButtonLabel\"></cross-small-icon>\n </template>\n </filter-bar-button>\n </filter-bar-button-group>\n\n <bento-teleport v-if=\"filterButtonEl\">\n <bento-popover\n :id=\"popoverId\"\n :ref=\"setPopoverRef\"\n class=\"b-base-filter__popover\"\n divider\n :aria-label=\"label\"\n :open=\"isFilterOpen\"\n :actions=\"controlled ? null : actions\"\n actions-layout=\"space-between\"\n :target-element=\"filterButtonEl\"\n :title=\"controlled ? null : label\"\n :fit-content=\"fitContent\"\n position=\"bottom-start\"\n :without-space=\"controlled\"\n :fallback-position=\"['bottom-end']\"\n overflow-visible\n >\n <div @keydown.esc=\"onCancel\">\n <slot></slot>\n </div>\n </bento-popover>\n </bento-teleport>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, ref, watch } from 'vue';\n import BentoPopover from '@/components/popover/popover.vue';\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives/tooltip/tooltip';\n import { FilterBarButton } from '../filter-bar-button';\n import FilterBarButtonGroup from '../filter-bar-button-group/filter-bar-button-group.vue';\n import { useI18n } from '@/utils/ts/i18n';\n import { BaseFilterEvent } from './base-filter.internal.types';\n import { type BentoBaseFilterProps } from './base-filter.types';\n import messages from './messages.json';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { useClickOutside } from '@/composables/use-click-outside';\n import BentoTeleport from '@/internal/teleport/teleport.vue';\n import type { BentoFilterBarValue } from '../../filter-bar.types';\n import CrossSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-small';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const emit = defineEmits([\n BaseFilterEvent.APPLY,\n BaseFilterEvent.CLEAR,\n BaseFilterEvent.OPEN,\n BaseFilterEvent.CLOSE,\n BaseFilterEvent.RESET,\n BaseFilterEvent.CANCEL,\n ]);\n\n const props = defineProps({\n appliedFiltersCount: { default: null },\n buttonLabel: { default: undefined },\n buttonSecondaryLabel: { default: undefined },\n disabled: { type: Boolean, default: false },\n defaultValue: { default: null },\n onlySlot: { type: Boolean, default: false },\n controlled: { type: Boolean, default: false },\n disableApplyButton: { type: Boolean, default: false },\n disableSecondaryButton: { type: Boolean, default: false },\n field: null,\n label: null,\n fitContent: { type: Boolean, default: undefined },\n tooltipText: { default: undefined },\n tooltipPosition: { default: undefined },\n value: { default: undefined }\n});\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const popoverId = generateUid('base-filter-popover');\n const isFilterOpen = ref(false);\n const filterButtonRef = ref(null);\n const popoverRef = ref(null);\n\n const filterButtonEl = computed(() => filterButtonRef.value?.$el ?? null);\n\n const setPopoverRef = (instance: unknown) => {\n popoverRef.value = instance ?? null;\n };\n\n const isPersistentFilter = computed(() => props.defaultValue !== null);\n\n const isValueChanged = computed(() => {\n // If it's not a persistent filter, its value can't have changed.\n if (!isPersistentFilter.value) {\n return props.appliedFiltersCount || props.buttonSecondaryLabel;\n }\n\n // Use JSON.stringify for a simple but effective deep comparison\n // of objects, arrays, and primitives.\n return JSON.stringify(props.value) !== JSON.stringify(props.defaultValue);\n });\n\n const computedAriaLabel = computed(() => {\n let ariaLabelValuePart = props.buttonSecondaryLabel ? `: ${props.buttonSecondaryLabel}` : '';\n\n if (props.appliedFiltersCount) {\n ariaLabelValuePart = `: ${t('numberSelected', { numberOfItemsSelected: props.appliedFiltersCount })}`;\n }\n\n return (isPersistentFilter.value ? props.label : computedButtonText.value) + ariaLabelValuePart;\n });\n\n const computedClearButtonLabel = computed(() =>\n isPersistentFilter.value\n ? t('resetFilter', {\n function: computedButtonText.value,\n })\n : t('clearFilter', {\n function: computedButtonText.value,\n })\n );\n\n const computedButtonText = computed(() => props.buttonLabel || props.label);\n\n const resetFocus = async () => {\n await nextTick();\n filterButtonRef.value?.$el?.focus();\n };\n\n const closePopover = () => {\n if (!isFilterOpen.value) {\n return;\n }\n\n isFilterOpen.value = false;\n resetFocus();\n emit(BaseFilterEvent.CLOSE);\n };\n\n const resetFilter = () => {\n if (isPersistentFilter.value) {\n emit(BaseFilterEvent.RESET);\n } else {\n emit(BaseFilterEvent.CLEAR);\n }\n\n resetFocus();\n };\n\n const onClickSecondaryAction = () => {\n closePopover();\n resetFilter();\n };\n\n const onClickFilter = () => {\n if (isFilterOpen.value) {\n closePopover();\n } else {\n isFilterOpen.value = true;\n emit(BaseFilterEvent.OPEN);\n }\n };\n const onClickApply = () => {\n closePopover();\n emit(BaseFilterEvent.APPLY);\n };\n\n const onCancel = () => {\n closePopover();\n emit(BaseFilterEvent.CANCEL);\n };\n\n const onClickOutside = () => onCancel();\n\n const actions = computed(() => [\n {\n title: t('apply') as string,\n event: onClickApply,\n disabled: props.disableApplyButton,\n },\n {\n title: isPersistentFilter.value ? (t('reset') as string) : (t('clear') as string),\n event: onClickSecondaryAction,\n disabled: props.disableSecondaryButton,\n },\n ]);\n\n watch(\n () => isFilterOpen.value,\n (value, prevValue) => {\n if (!value && prevValue) {\n if (filterButtonRef.value?.filterBarButtonRef?.bentoBaseButtonRef) {\n filterButtonRef.value.filterBarButtonRef.bentoBaseButtonRef.focus();\n }\n }\n }\n );\n\n // Ignore the events inside the Button and the Popover\n useClickOutside(popoverRef, onClickOutside, { ignore: [filterButtonRef] });\n\n defineExpose({\n closePopover,\n });\n</script>\n\n<script lang=\"ts\">\n export default {\n i18n: { messages },\n name: 'bento-base-filter',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-filter.scss\"></style>\n","import { computed, ref, watch } from 'vue';\nimport type { ComputedRef, Ref, UnwrapRef } from 'vue';\n\nconst isArray = <T>(value: T) => value instanceof Array;\nconst isValueEmpty = <T>(value: T) =>\n isArray(value) ? (value as []).length === 0 || (value as Array<T>).every(el => el === '') : !value;\nconst isEqual = <T>(first: T, second: T) => JSON.stringify(first) === JSON.stringify(second);\n\ninterface UseBaseFilterReturn<T> {\n internalFilterValue: Ref<T> | Ref<UnwrapRef<T>>;\n isSecondaryButtonDisabled: ComputedRef<boolean>;\n isApplyButtonDisabled: ComputedRef<boolean>;\n}\n\nexport const useBaseFilter = <T>(appliedFilter: Ref<T>, defaultFilter: Ref<T>): UseBaseFilterReturn<T> => {\n const internalFilterValue = ref<T>(appliedFilter.value as T);\n\n watch(\n () => appliedFilter.value,\n () => {\n (internalFilterValue as Ref<T>).value = appliedFilter.value as T;\n }\n );\n\n const isFilterInactive = computed(() => isValueEmpty(appliedFilter.value));\n\n const isSecondaryButtonDisabled = computed(() =>\n defaultFilter.value !== null ? isEqual<T>(defaultFilter.value, appliedFilter.value) : isFilterInactive.value\n );\n const isApplyButtonDisabled = computed(() => {\n const isValueUnchanged = isEqual((internalFilterValue as Ref<T>).value, appliedFilter.value as T);\n return isValueUnchanged || (isValueEmpty(internalFilterValue.value) && isFilterInactive.value);\n });\n\n return {\n internalFilterValue,\n isSecondaryButtonDisabled,\n isApplyButtonDisabled,\n };\n};\n","<template>\n <bento-base-filter\n v-bind=\"$props\"\n :button-label=\"buttonLabel\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :disable-apply-button=\"isApplyButtonDisabled\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :only-slot=\"onlySlot\"\n :tooltip-position=\"options?.tooltipPosition\"\n :tooltip-text=\"options?.tooltipText\"\n @apply=\"updateFilter\"\n @clear=\"clearFilter\"\n @open=\"openFilter\"\n @reset=\"resetFilter\"\n >\n <div class=\"b-input-filter\" :class=\"conditionalClasses\" @keydown.enter=\"updateFilter\" @input=\"onInput\">\n <bento-input-field\n ref=\"inputTextRef\"\n :placeholder=\"options?.placeholder\"\n :model-value=\"internalFilterValue\"\n :disabled=\"disabled\"\n @update:model-value=\"setInternalFilterValue\"\n />\n </div>\n </bento-base-filter>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onBeforeUpdate, ref, toRef, watch } from 'vue';\n import { BentoBaseFilter, useBaseFilter } from '../base-filter';\n import { BentoInputField } from '@/components/input-field';\n import { truncate } from '@/utils/ts/truncate';\n import { type BentoInputFilterProps } from './input-filter.types';\n\n const props = defineProps({\n defaultValue: { default: null },\n disabled: { type: Boolean, default: false },\n field: null,\n label: null,\n onlySlot: { type: Boolean, default: false },\n options: { default: undefined },\n value: { default: null }\n});\n\n const emit = defineEmits([\"input\", \"update\"]);\n\n const inputTextRef = ref(null);\n\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } = useBaseFilter<string>(\n toRef(props, 'value'),\n toRef(props, 'defaultValue')\n );\n\n const buttonLabel = computed(() => props.label);\n const buttonSecondaryLabel = computed(() => truncate(props.value, 12));\n\n const conditionalClasses = computed(() => ({\n [`b-input-filter--only-slot`]: props.onlySlot,\n }));\n\n onBeforeUpdate(() => {\n // Set value to null when the string is empty\n if (internalFilterValue.value === '') {\n internalFilterValue.value = null;\n }\n });\n\n watch(inputTextRef, () => {\n // Focus on the input when it's opened\n inputTextRef.value?.focusInput();\n });\n\n const openFilter = () => {\n internalFilterValue.value = props.value;\n };\n\n const updateFilter = () => {\n if (!internalFilterValue.value && props.defaultValue !== null) {\n // If value set to empty, reset back to default value\n internalFilterValue.value = props.defaultValue;\n }\n\n emit('update', {\n ...props,\n value: internalFilterValue.value,\n });\n };\n\n const resetFilter = () => emit('update', { ...props, value: props.defaultValue });\n\n const clearFilter = () => {\n internalFilterValue.value = null;\n updateFilter();\n };\n\n const onInput = () => {\n emit('input', { ...props, value: internalFilterValue.value });\n };\n\n const setInternalFilterValue = (event: string) => {\n internalFilterValue.value = event;\n };\n</script>\n\n<script lang=\"ts\">\n export default {\n name: 'bento-input-filter',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-filter.scss\" />\n","import { type BentoAvatarListboxOptions } from '@/components/dropdown/components/variants/dropdown-avatar/dropdown-avatar.types';\nimport {\n type BentoListboxEmptyStateProps,\n type BentoListboxIsOptionDisabled,\n type BentoListboxLazyLoadType,\n type BentoListboxOptions,\n type BentoListboxSearchOptions,\n type BentoListboxSelectedValue,\n type BentoListboxVirtulisationOptions,\n} from '@/types/listbox';\nimport { type OmitStrict } from '@/types/omit-strict';\nimport { type VueNodeElement } from '@/types/elements';\nimport { type BentoCountryListboxOptions } from '@/components/dropdown/components/variants/dropdown-country/dropdown-country.types';\nimport { type BentoTagListboxOptions } from '@/components/dropdown/components/variants/dropdown-tag/dropdown-tag.types';\nimport { type BentoCountryVariant } from '@/components/country';\nimport { type BentoCurrencyListboxOptions } from '@/components/dropdown/components/variants/dropdown-currency/dropdown-currency.types';\nimport { type BentoPaymentMethodListboxOptions } from '@/components/dropdown/components/variants/dropdown-payment-method/dropdown-payment-method.types';\nimport {\n type BentoInputDropdownProps,\n type BentoInputFieldElementPosition,\n type BentoInputFieldValue,\n} from '@/components/input-field';\nimport {\n type BentoDatePickerFirstDayOfWeek,\n type BentoDatePickerIsDateDisabled,\n type BentoDatePickerVariant,\n type BentoDatePickerYearRange,\n} from '@/components/date-picker';\nimport {\n type BentoDateRangePickerGranularityConfig,\n type BentoDateRangePickerValue,\n type BentoDateRangePickerVariant,\n type BentoDateRangePickerYearRange,\n} from '@/components/date-range-picker';\nimport {\n type BentoRadioGroupFilterOptions,\n type BentoRadioGroupFilterValue,\n} from './components/radio-group-filter/radio-group-filter.types';\nimport { type DateRangePickerCalendarRangeSelectorItems } from '../date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types';\nimport { type BentoSearchBarProps } from '@/components/search-bar/search-bar.types';\nimport type { BentoInputFilterOptions, BentoInputFilterValue } from './components/input-filter/input-filter.types';\nimport type { BentoToggleFilterOptions, BentoToggleFilterValue } from './components/toggle-filter/toggle-filter.types';\nimport type { BentoTooltipPosition } from '@/directives';\nimport {\n type BentoCheckboxGroupFilterOptions,\n type BentoCheckboxGroupFilterValue,\n} from './components/checkbox-group-filter/checkbox-group-filter.types';\n\n/**\n * Re-export filter component types\n */\nexport type * from './components/input-filter/input-filter.types';\nexport type * from './components/radio-group-filter/radio-group-filter.types';\nexport type * from './components/toggle-filter/toggle-filter.types';\n\nexport interface BentoSelectFilterOptions {\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?: BentoListboxEmptyStateProps;\n\n /**\n * Option items for the list-box\n */\n listboxItems: BentoListboxOptions;\n\n /**\n * Defines if the list-box should be a multi-select filter\n */\n multiple?: boolean;\n\n /**\n * The event fire when the filter is opened.\n */\n onOpen?: () => void;\n\n lazy?: {\n /**\n * Indicates whether there are more items to load\n */\n hasMoreItems: boolean;\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: BentoListboxLazyLoadType | `${BentoListboxLazyLoadType}`;\n\n /**\n * Indicates if new options are loading.\n */\n loading: boolean;\n\n /**\n * The click event that fires when the user press on the \"show more\" button OR when the user\n * scrolls down to bottom of the select filter box.\n */\n showMoreEvent?: () => void;\n };\n\n /**\n * Toggles the loading state of the listbox.\n */\n loading?: boolean;\n\n /**\n * Search options and events for the listbox filtering.\n */\n search?: BentoListboxSearchOptions;\n\n /**\n * Defines if the list-box should support static categories\n */\n staticCategories?: boolean;\n\n /**\n * A function that defines which option in the list-box is disabled\n */\n isOptionDisabled?: BentoListboxIsOptionDisabled;\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?: BentoListboxVirtulisationOptions;\n\n /**\n * Attaches a `BentoTooltip` if present. Text showed in the tooltip on hover.\n */\n tooltipText?: string;\n\n /**\n * Position the tooltip should take if space is available.\n */\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n\n /**\n * Enables value/label value handling. When `true`, the component expects and emits value/label\n * pair objects instead of primitive values.\n *\n * This affects both the `value` prop and the `input` event payload.\n *\n * - **Input (`value` prop):** Expects a `{ value: string | number, label: string }` object (or an array of them for multi-select).\n * - **Output (`input` event):** Emits a `{ value: string | number, label: string }` object (or an array of them) upon selection.\n *\n * This is particularly useful when a selected item's label is not available in the `items` prop,\n * allowing the component to display the correct label for values loaded from external sources.\n * @default false\n */\n enableValueLabelPair?: boolean;\n\n /**\n * Enables a search bar that dynamically filters values\n * @default true\n */\n dynamicFiltering?: boolean;\n}\nexport type BentoSelectAvatarFilterOptions = OmitStrict<BentoSelectFilterOptions, 'listboxItems'> & {\n listboxItems: BentoAvatarListboxOptions;\n};\nexport type BentoSelectCountryFilterOptions = OmitStrict<BentoSelectFilterOptions, 'listboxItems'> & {\n listboxItems: BentoCountryListboxOptions;\n variant?: BentoCountryVariant | `${BentoCountryVariant}`;\n};\nexport type BentoSelectCurrencyFilterOptions = OmitStrict<BentoSelectFilterOptions, 'listboxItems'> & {\n listboxItems: BentoCurrencyListboxOptions;\n};\nexport type BentoSelectTagFilterOptions = OmitStrict<BentoSelectFilterOptions, 'listboxItems'> & {\n listboxItems: BentoTagListboxOptions;\n};\n\nexport type BentoSelectPaymentMethodFilterOptions = OmitStrict<BentoSelectFilterOptions, 'listboxItems'> & {\n listboxItems: BentoPaymentMethodListboxOptions;\n};\n\nexport interface BentoBooleanFilterOption {\n label: string;\n value: string | boolean;\n}\n\nexport interface BentoBooleanFilterOptions {\n positiveOption?: BentoBooleanFilterOption;\n negativeOption?: BentoBooleanFilterOption;\n tooltipText?: string;\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n}\n\nexport interface BentoInputWithDropdownFilterOptions {\n dropdown: BentoInputDropdownProps;\n dropdownPosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n tooltipText?: string;\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n}\n\nexport interface BentoRangeFilterOptions {\n tooltipText?: string;\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n}\n\n// Date\nexport interface BentoDateFilterOptions {\n firstDayOfWeek?: BentoDatePickerFirstDayOfWeek;\n isDateDisabled?: BentoDatePickerIsDateDisabled;\n yearRange?: BentoDatePickerYearRange;\n variant?: `${BentoDatePickerVariant}`;\n tooltipText?: string;\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n}\nexport interface BentoDateRangeFilterOptions {\n allowTimeInput?: boolean;\n firstDayOfWeek?: BentoDatePickerFirstDayOfWeek;\n isDateDisabled?: BentoDatePickerIsDateDisabled;\n yearRange?: BentoDateRangePickerYearRange;\n granularities?: Array<BentoDateRangePickerGranularityConfig>;\n maxRange?: number;\n min?: Date;\n max?: Date;\n numberOfMonths?: number;\n showEndDateOnOpen?: boolean;\n quickSelectRanges?: DateRangePickerCalendarRangeSelectorItems | boolean;\n variant?: `${BentoDateRangePickerVariant}`;\n tooltipText?: string;\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n}\n\nexport interface BentoInpuWithDropdowntFilterValue {\n inputValue: BentoInputFieldValue;\n dropdownValue: BentoInputDropdownProps['modelValue'];\n}\n\nexport type BentoSelectFilterValue = BentoListboxSelectedValue;\nexport type BentoBooleanFilterValue = string | null;\nexport type BentoDateFilterValue = Date | null;\nexport type BentoDateRangeFilterValue = BentoDateRangePickerValue | null;\nexport type BentoFilterBarValue =\n | BentoInputFilterValue\n | BentoInpuWithDropdowntFilterValue\n | BentoSelectFilterValue\n | BentoBooleanFilterValue\n | BentoDateFilterValue\n | BentoDateRangeFilterValue\n | BentoRadioGroupFilterValue\n | BentoCheckboxGroupFilterValue\n | BentoToggleFilterValue;\n\nexport type BentoFilterOptions =\n | BentoSelectFilterOptions\n | BentoSelectAvatarFilterOptions\n | BentoSelectCountryFilterOptions\n | BentoSelectCurrencyFilterOptions\n | BentoSelectPaymentMethodFilterOptions\n | BentoSelectTagFilterOptions\n | BentoDateFilterOptions\n | BentoDateRangeFilterOptions\n | BentoBooleanFilterOptions\n | BentoInputFilterOptions\n | BentoInputWithDropdownFilterOptions\n | BentoRadioGroupFilterOptions\n | BentoCheckboxGroupFilterOptions\n | BentoToggleFilterOptions\n | undefined;\n\nexport enum BentoFilterEvent {\n // Fires upon the user interacting with the filter\n INPUT = 'input',\n // Fires on the (new) filter values being applied\n UPDATE = 'update',\n}\n\nexport enum BentoFilterBarEvent {\n INPUT = 'input',\n UPDATE_FILTER_VALUES_OBJECT = 'update:filter-values-object',\n UPDATE_FILTER_VALUES_ARRAY = 'update:filter-values',\n}\n\nexport enum BentoFilterItemType {\n /**\n * @deprecated Since v2.0.0. Use `BentoFilterItemType.RADIO_GROUP` instead.\n */\n BOOLEAN = 'BentoBooleanFilter',\n RANGE = 'BentoRangeFilter',\n // Input\n INPUT = 'BentoInputFilter',\n INPUT_DROPDOWN = 'BentoInputWithDropdownFilter',\n // Select\n SELECT = 'BentoSelectFilter',\n SELECT_AVATAR = 'BentoSelectAvatarFilter',\n SELECT_COUNTRY = 'BentoSelectCountryFilter',\n SELECT_CURRENCY = 'BentoSelectCurrencyFilter',\n SELECT_PAYMENT_METHOD = 'BentoSelectPaymentMethodFilter',\n SELECT_TAG = 'BentoSelectTagFilter',\n // Date\n DATE = 'BentoDateFilter',\n DATE_RANGE = 'BentoDateRangeFilter',\n // Radio group\n RADIO_GROUP = 'BentoRadioGroupFilter',\n // Checkbox\n CHECKBOX_GROUP = 'BentoCheckboxGroupFilter',\n // Toggle\n TOGGLE = 'BentoToggleFilter',\n}\n\nexport interface BentoFilterValue {\n field: string;\n value?: BentoFilterBarValue;\n}\n\nexport interface BentoFilterModel<CustomOptions = any> {\n field: BentoFilterValue['field'];\n label: string;\n description?: string;\n options?: BentoFilterOptions | CustomOptions;\n disabled?: boolean;\n defaultValue?: BentoFilterBarValue;\n visible?: boolean;\n\n /**\n * Defines the filter to be used.\n *\n * Can be one filter defined in the {@link BentoFilterItemType} enum or a\n * custom filter component defined as a {@link VueNodeElement}\n */\n type: BentoFilterItemType | VueNodeElement;\n}\n\n/**\n * A filter model combined with its current value.\n */\nexport type BentoFilterBarFilterWithValue = BentoFilterModel & BentoFilterValue;\n\n/**\n * An array of filter models combined with their current values.\n */\nexport type BentoFilterBarFiltersWithValues = Array<BentoFilterBarFilterWithValue>;\n\nexport type BentoFilterBarModel<CustomOptions = any> = Array<BentoFilterModel<CustomOptions>>;\nexport type BentoFilterValues = Array<BentoFilterValue>;\nexport type BentoFilterValueObject<T extends PropertyKey = string, CustomValue = BentoFilterBarValue> = Record<\n T,\n CustomValue\n>;\n\nexport type BentoFilterBarSearchBarProps = OmitStrict<BentoSearchBarProps, 'value' | 'condensed'> & {\n /**\n * CSS width value applied to the search box element (e.g. `'200px'`, `'50%'`).\n */\n width?: string;\n};\nexport type BentoFilterBarSearchTerm = BentoSearchBarProps['value'];\n\nexport type BentoFilterBarScreenOptionsLayout = 'one-line' | 'multi-line';\n\nexport interface BentoFilterBarContainerSizeLayout {\n /**\n * @default 'multi-line'\n */\n large?: BentoFilterBarScreenOptionsLayout;\n /**\n * @default 'one-line'\n */\n medium?: BentoFilterBarScreenOptionsLayout;\n /**\n * @default 'multi-line'\n */\n small?: BentoFilterBarScreenOptionsLayout;\n}\n\nexport interface BentoFilterBarProps<CustomValue = BentoFilterBarValue | any, CustomOptions = any> {\n /**\n * Array of filters based on @see {@link BentoFilterBarModel}.\n * Each one of the elements in the array correspond to a filter that will\n * be created and rendered in the FilterBar.\n *\n * @example\n * [{\n * field: 'company',\n * label: 'Company',\n * type: FilterType.TEXT,\n * }, {\n * field: 'name',\n * label: 'Name',\n * type: FilterType.TEXT,\n * }]\n */\n config?: BentoFilterBarModel<CustomOptions>;\n\n /**\n * An array of the values for each filter in the filter bar.\n * @see {@link BentoFilterValues}\n *\n * @example\n * [{\n * field: 'company',\n * value: '200',\n * }, {\n * field: 'name',\n * value: 'some text',\n * }]\n */\n filterValues?: BentoFilterValues;\n\n /**\n * Defines the layout (multi-line or one-line) to be used in the filter bar for different\n * container sizes:\n * - Large (>=700px)\n * - Medium (>=430px & <700px)\n * - Small (<430px)\n *\n * @example\n * {\n * large: 'multi-line',\n * medium: 'multi-line',\n * small: 'one-line'\n * }\n */\n containerSizeLayout?: BentoFilterBarContainerSizeLayout;\n\n /**\n * Search bar properties with which the placeholder, hint and other\n * \"bento-search-bar\" properties can be set. @see {@link BentoFilterBarSearchBarProps}\n */\n search?: BentoFilterBarSearchBarProps;\n\n /**\n * Search term useful to filter all the data by text.\n * If the value is non-existant (null or undefined) the search bar won't be enabled.\n * Can be used with `.sync`\n */\n searchTerm?: BentoFilterBarSearchTerm;\n\n /**\n * Will show all applied filters even if their visibility is set to false.\n */\n showAppliedHiddenFilters?: boolean;\n\n /**\n * An object of the values for each filter in the filter bar where key is a the field name and the value is the BentoFilterBarValue.\n *\n * @example\n * {\n * 'company': '200',\n * 'name': 'some text'\n * },\n */\n filterValuesObject?: BentoFilterValueObject<string, CustomValue>;\n}\n","<template>\n <bento-base-filter\n v-bind=\"$props\"\n :applied-filters-count=\"selectedDropdownLabel\"\n :button-label=\"buttonLabel\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :disable-apply-button=\"shouldDisableApply\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :only-slot=\"onlySlot\"\n :tooltip-position=\"options?.tooltipPosition\"\n :tooltip-text=\"options?.tooltipText\"\n @apply=\"updateFilter\"\n @clear=\"clearFilter\"\n @open=\"openFilter\"\n @reset=\"resetFilter\"\n >\n <div\n class=\"b-input-with-dropdown-filter\"\n :class=\"conditionalClasses\"\n @keydown.enter=\"updateFilter\"\n @input=\"onInput\"\n >\n <bento-input-field\n ref=\"inputTextRef\"\n :dropdown=\"dropdownOptions\"\n :dropdown-position=\"options?.dropdownPosition\"\n variant=\"dropdown\"\n :model-value=\"internalFilterValue?.inputValue\"\n :disabled=\"disabled\"\n @update:model-value=\"setInternalFilterValue\"\n @dropdown-input=\"onDropdownInput\"\n />\n </div>\n </bento-base-filter>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onBeforeUpdate, provide, ref, toRef, watch } from 'vue';\n import { BentoBaseFilter, useBaseFilter } from '../base-filter';\n import {\n BentoFilterEvent,\n type BentoInputWithDropdownFilterOptions,\n type BentoInpuWithDropdowntFilterValue,\n } from '../../filter-bar.types';\n import { type BentoInputDropdownProps, BentoInputField } from '@/components/input-field';\n import { truncate } from '@/utils/ts/truncate';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY } from '@/components/filter-bar/components/input-with-dropdown-filter/input-with-dropdown-filter.keys';\n\n const props = defineProps({\n disabled: { type: Boolean },\n defaultValue: { default: undefined },\n field: null,\n label: null,\n onlySlot: { type: Boolean, default: false },\n options: { default: undefined },\n value: { default: undefined }\n});\n\n const emit = defineEmits([BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE]);\n\n const inputTextRef = ref(null);\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } =\n useBaseFilter<BentoInpuWithDropdowntFilterValue>(toRef(props, 'value'), toRef(props, 'defaultValue'));\n\n const selectedDropdownLabel = computed(() => {\n const selectedValue = props.value?.dropdownValue ?? props.options?.dropdown?.modelValue;\n\n if (\n !buttonSecondaryLabel.value ||\n selectedValue === undefined ||\n selectedValue === null ||\n !props.options?.dropdown?.items\n ) {\n return null;\n }\n\n const label = props.options.dropdown.items.find(item => item.value === selectedValue)?.label;\n\n return label ? truncate(label, 12) : null;\n });\n\n const buttonLabel = computed(() => props.label);\n\n const buttonSecondaryLabel = computed(() =>\n props.value?.inputValue ? truncate(props.value.inputValue, 12) : undefined\n );\n\n const dropdownSelection = computed(\n () => internalFilterValue.value?.dropdownValue ?? props.options?.dropdown?.modelValue\n );\n\n const dropdownOptions = computed<BentoInputDropdownProps>(() => ({\n ...((props.options?.dropdown || {}) as BentoInputDropdownProps),\n modelValue: dropdownSelection.value,\n }));\n\n const conditionalClasses = computed(() => ({\n [`b-input-with-dropdown-filter--only-slot`]: props.onlySlot,\n }));\n\n const shouldDisableApply = computed(() => {\n const allFieldsAreSet = !!internalFilterValue.value?.inputValue && !!dropdownSelection.value;\n return !allFieldsAreSet || isApplyButtonDisabled.value;\n });\n\n onBeforeUpdate(() => {\n // Set value to null when the string is empty\n if (internalFilterValue.value?.inputValue === '') {\n internalFilterValue.value = { ...internalFilterValue.value, inputValue: undefined };\n }\n });\n\n watch(inputTextRef, () => {\n // Focus on the input when it's opened\n inputTextRef.value?.focusInput();\n });\n\n const openFilter = () => {\n internalFilterValue.value = props.value;\n };\n\n const updateFilter = () => {\n if (!internalFilterValue.value?.inputValue && props.defaultValue !== null) {\n // If value set to empty, reset back to default value\n internalFilterValue.value = { ...props.defaultValue };\n }\n\n emit(BentoFilterEvent.UPDATE, {\n ...props,\n value: internalFilterValue.value,\n });\n };\n\n const resetFilter = () => emit(BentoFilterEvent.UPDATE, { ...props, value: props.defaultValue });\n\n const clearFilter = () => {\n internalFilterValue.value = null;\n updateFilter();\n };\n\n const onInput = () => {\n emit(BentoFilterEvent.INPUT, { ...props, value: internalFilterValue.value });\n };\n\n const setInternalFilterValue = (event: string) => {\n internalFilterValue.value = { dropdownValue: dropdownSelection.value, inputValue: event };\n };\n\n const onDropdownInput = (selectedValue: BentoListboxSelectedValue) => {\n internalFilterValue.value = { ...internalFilterValue.value, dropdownValue: selectedValue };\n };\n\n // We need to change the base filter's popover to have overflow visible so the dropdown options is\n // not hidden inside the filter when opened.\n provide(INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY, true);\n</script>\n\n<script lang=\"ts\">\n /**\n *\n */\n export default {\n name: 'bento-input-with-dropdown-filter',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./input-with-dropdown-filter.scss\" />\n","<template>\n <bento-base-filter\n :button-label=\"buttonLabel\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :disabled=\"disabled\"\n :default-value=\"defaultValue\"\n :disable-apply-button=\"isApplyButtonDisabled\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :field=\"field\"\n :label=\"label\"\n :only-slot=\"onlySlot\"\n :tooltip-position=\"options?.tooltipPosition\"\n :tooltip-text=\"options?.tooltipText\"\n :value=\"value\"\n fit-content\n @apply=\"updateFilter\"\n @clear=\"clearFilter\"\n @open=\"openFilter\"\n @reset=\"resetFilter\"\n >\n <bento-date-picker\n v-if=\"onlySlot || isTouchDevice\"\n :class=\"touchDeviceDatePickerConditionalClasses\"\n :aria-labelledby=\"$attrs?.['aria-labelledby']\"\n :model-value=\"internalFilterValue\"\n :first-day-of-week=\"options?.firstDayOfWeek\"\n :is-date-disabled=\"options?.isDateDisabled\"\n :variant=\"options?.variant\"\n :year-range=\"options?.yearRange\"\n :disabled=\"disabled\"\n @update:model-value=\"onDateInputSelected\"\n />\n <template v-else>\n <bento-divider class=\"b-date-filter__divider\" />\n\n <div class=\"b-date-filter\">\n <calendar\n :first-day-of-week=\"options?.firstDayOfWeek\"\n :is-date-disabled=\"options?.isDateDisabled\"\n :number-of-months=\"1\"\n :value=\"internalFilterValue\"\n :variant=\"options?.variant\"\n :year-range=\"options?.yearRange\"\n @input=\"onDateSelected\"\n />\n </div>\n </template>\n </bento-base-filter>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, toRef } from 'vue';\n import { BentoBaseFilter, useBaseFilter } from '../base-filter';\n import { type BentoDateFilterOptions, type BentoDateFilterValue, BentoFilterEvent } from '../../filter-bar.types';\n import { Calendar } from '@/internal';\n import { BentoDivider } from '@/components/divider';\n import { BentoDatePicker } from '@/components/date-picker';\n import { useI18n } from '@/utils/ts/i18n';\n import { getDateTimeFormatter } from '@/utils/ts/format-date';\n import { useTouchDevice } from '@/composables';\n\n /**\n * The Date filter displays a calendar that allows\n * to select a single date.\n *\n * @example\n * import { BentoDateFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDateFilter },\n * template: `\n * <bento-date-filter\n * :field=\"filter.field\"\n * :label=\"filter.label\"\n * :options=\"filter.options\"\n * :value=\"filter.value\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-date-filter',\n components: {\n BentoBaseFilter,\n BentoDatePicker,\n BentoDivider,\n Calendar,\n },\n props: {\n /**\n * Disables the filter from being interacted with.\n */\n disabled: { type: Boolean, default: false },\n\n isDateInput: { type: Boolean, default: true },\n\n /**\n * Default value of the filter to reset to.\n */\n defaultValue: { type: Date as PropType<BentoDateFilterValue>, default: null },\n\n /**\n * Filter name/key referencing the actual property name in the data set.\n * Should be unique per filter bar.\n */\n field: { type: String, required: true },\n\n /**\n * Label text to be displayed\n */\n label: { type: String, required: true },\n\n /**\n * Renders the base filter's slot content only - leaving out the button and the popover.\n * Used for the allFiltersModal component.\n */\n onlySlot: { type: Boolean, default: false },\n\n /**\n * List of options that are needed to setup the filter\n * Available options:\n * - firstDayOfWeek: Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n * - isDateDisabled: Indicate if a date should be disabled or not\n * - tooltipPosition: The position of the tooltip attached to the filter button\n * - tooltipText: The content of the tooltip attached to the filter button\n */\n options: {\n type: Object as PropType<BentoDateFilterOptions>,\n default: undefined,\n },\n\n /**\n * Current value of the filter\n */\n value: { type: Date as PropType<BentoDateFilterValue>, default: undefined },\n },\n emits: [BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE],\n setup(props, { emit }) {\n const { isTouchDevice } = useTouchDevice();\n const { locale } = useI18n(undefined, true);\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } = useBaseFilter(\n toRef(props, 'value'),\n toRef(props, 'defaultValue')\n );\n\n const formattedButtonDateText = computed(() => {\n const dateFormatOptions: Intl.DateTimeFormatOptions =\n props?.options?.variant === 'month'\n ? { month: 'long', year: 'numeric' }\n : { day: 'numeric', month: 'short', year: 'numeric' };\n\n return props.value ? getDateTimeFormatter(locale.value, dateFormatOptions).format(props.value) : null;\n });\n const buttonLabel = computed(() => props.label);\n const buttonSecondaryLabel = computed(() => formattedButtonDateText.value);\n\n const updateFilter = () => {\n emit(BentoFilterEvent.UPDATE, { ...props, value: internalFilterValue.value });\n };\n\n const clearFilter = () => {\n internalFilterValue.value = null;\n updateFilter();\n };\n\n const resetFilter = () => {\n internalFilterValue.value = props.defaultValue;\n updateFilter();\n };\n\n const openFilter = () => {\n internalFilterValue.value = props.value;\n };\n\n const onDateSelected = (selectedDate: Date) => {\n internalFilterValue.value = selectedDate;\n emit(BentoFilterEvent.INPUT, { ...props, value: internalFilterValue.value });\n };\n\n // Update internal date and emit selected date when using date-picker input\n const onDateInputSelected = (selectedDate: Date) => {\n internalFilterValue.value = selectedDate;\n onDateSelected(selectedDate);\n updateFilter();\n };\n\n const touchDeviceDatePickerConditionalClasses = computed(() => ({\n 'b-date-filter--touch-device': isTouchDevice.value,\n }));\n\n return {\n // Values\n internalFilterValue,\n isApplyButtonDisabled,\n isSecondaryButtonDisabled,\n buttonLabel,\n buttonSecondaryLabel,\n isTouchDevice,\n touchDeviceDatePickerConditionalClasses,\n\n // Events\n clearFilter,\n onDateSelected,\n openFilter,\n updateFilter,\n resetFilter,\n onDateInputSelected,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-filter.scss\" />\n","<template>\n <bento-base-filter\n ref=\"baseFilter\"\n class=\"b-base-filter-date-range-filter\"\n :button-label=\"buttonLabel\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :controlled=\"!onlySlot\"\n :disabled=\"disabled\"\n :disable-apply-button=\"isApplyButtonDisabled\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :default-value=\"defaultValue\"\n :field=\"field\"\n :label=\"label\"\n :only-slot=\"onlySlot\"\n :tooltip-position=\"options?.tooltipPosition\"\n :tooltip-text=\"options?.tooltipText\"\n :value=\"value\"\n fit-content\n @open=\"openFilter\"\n @clear=\"clearFilter\"\n @reset=\"resetFilter\"\n @cancel=\"onCancel\"\n >\n <bento-date-range-picker\n v-if=\"onlySlot\"\n :allow-time-input=\"options?.allowTimeInput\"\n :model-value=\"internalFilterValue\"\n :first-day-of-week=\"options?.firstDayOfWeek\"\n :is-date-disabled=\"options?.isDateDisabled\"\n :number-of-months=\"options?.numberOfMonths\"\n :quick-select-ranges=\"options?.quickSelectRanges\"\n :variant=\"options?.variant\"\n :year-range=\"options?.yearRange\"\n :disabled=\"disabled\"\n :granularities=\"options?.granularities\"\n :max-range=\"options?.maxRange\"\n :min=\"options?.min\"\n :max=\"options?.max\"\n :date-form-data=\"formData\"\n :show-end-date-on-open=\"options?.showEndDateOnOpen\"\n :aria-labelledby=\"$attrs?.['aria-labelledby']\"\n @update:model-value=\"onDateInputSelected\"\n />\n\n <template v-else>\n <div class=\"b-date-range-filter\">\n <date-range-picker-calendar\n :allow-time-input=\"options?.allowTimeInput\"\n :first-day-of-week=\"options?.firstDayOfWeek\"\n :is-date-disabled=\"options?.isDateDisabled\"\n :granularities=\"options?.granularities\"\n :max-range=\"options?.maxRange\"\n :min=\"options?.min\"\n :max=\"options?.max\"\n :number-of-months=\"options?.numberOfMonths\"\n :quick-select-ranges=\"adjustedQuickSelectRanges\"\n :value=\"internalFilterValue\"\n :date-form-data=\"formData\"\n :show-end-date-on-open=\"options?.showEndDateOnOpen\"\n :variant=\"options?.variant\"\n :year-range=\"options?.yearRange\"\n @input=\"onDateSelected\"\n @custom-range=\"onRangeSelectorInput\"\n @error=\"onDatePickerRangeError\"\n @form-date=\"onDatePickerRangeFormDateInputUpdate\"\n @start-date-selected=\"isSelectingDate = true\"\n >\n <template #title>\n <bento-typography strongest variant=\"body\" el=\"span\">\n {{ label }}\n </bento-typography>\n </template>\n <template #actions>\n <bento-divider class=\"b-date-range-filter__divider\" />\n\n <bento-button-actions\n class=\"b-date-range-filter__actions\"\n :actions=\"actions\"\n layout=\"space-between\"\n />\n </template>\n </date-range-picker-calendar>\n </div>\n </template>\n </bento-base-filter>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, reactive, ref, toRef, watch } from 'vue';\n import { BentoBaseFilter, useBaseFilter } from '../base-filter';\n import {\n type BentoDateRangeFilterOptions,\n type BentoDateRangeFilterValue,\n BentoFilterEvent,\n } from '../../filter-bar.types';\n import { DateRangePickerCalendar } from '@/components/date-range-picker/components/date-range-picker-calendar';\n import { BentoDateRangePicker, type BentoDateRangePickerValue } from '@/components/date-range-picker';\n import { BentoDivider } from '@/components/divider';\n import { BentoTypography } from '@/components/typography';\n import { BentoButtonActions, type BentoButtonActionsList } from '@/components/button/components/button-actions';\n import { useI18n } from '@/utils/ts/i18n';\n import { isSameDay } from 'date-fns/isSameDay';\n import { format } from 'date-fns/format';\n import { isEqual } from 'date-fns/isEqual';\n import { isToday } from 'date-fns/isToday';\n import { dateToTimeInputString } from '@/utils/ts/format-date';\n import { useDateInputFormatter, useDynamicDateFnsLocale } from '@/composables';\n\n import messages from './messages.json';\n import {\n type DateRangePickerCalendarFormData,\n type DateRangePickerCalendarRangeSelectorItem,\n type DateRangePickerCalendarRangeSelectorItems,\n } from '@/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.types';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * The Date filter displays a calendar that allows\n * to select a single date.\n *\n * @example\n * import { BentoDateRangeFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDateRangeFilter },\n * template: `\n * <bento-date-range-filter\n * :field=\"filter.field\"\n * :label=\"filter.label\"\n * :options=\"filter.options\"\n * :value=\"filter.value\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-date-range-filter',\n components: {\n BentoBaseFilter,\n BentoButtonActions,\n BentoDateRangePicker,\n BentoTypography,\n BentoDivider,\n DateRangePickerCalendar,\n },\n props: {\n /**\n * Disables the filter from being interacted with.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Default value of the filter to reset to.\n */\n defaultValue: { type: Object as PropType<BentoDateRangeFilterValue>, default: null },\n\n /**\n * Filter name/key referencing the actual property name in the data set.\n * Should be unique per filter bar.\n */\n field: { type: String, required: true },\n\n /**\n * Label text to be displayed\n */\n label: { type: String, required: true },\n\n /**\n * Renders the base filter's slot content only - leaving out the button and the popover.\n * Used for the allFiltersModal component.\n */\n onlySlot: { type: Boolean, default: false },\n\n /**\n * List of options that are needed to setup the filter\n * Available options:\n * - allowTimeInput: Allows user to enter time values in the form\n * - firstDayOfWeek: Allows user to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n * - isDateDisabled: Indicate if a date should be disabled or not\n * - maxRange: Set a maximum number of dates to be selectable by the range\n * - numberOfMonths: Number of months rendered on pane\n * - quickSelectRanges: An array that sets the custom range dropdown items. @see BentoDateRangePicker\n * - showEndDateOnOpen: Upon opening date range picker, end date's month will be pre-selected.\n * - granularities: A list of available granularities.\n * - variant: The type of calendar to display. Defaults to showing days.\n * - tooltipPosition: The position of the tooltip attached to the filter button\n * - tooltipText: The content of the tooltip attached to the filter button\n */\n options: {\n type: Object as PropType<BentoDateRangeFilterOptions>,\n default: undefined,\n },\n\n /**\n * Current value of the filter\n */\n value: {\n type: Object as PropType<BentoDateRangeFilterValue>,\n default: () => ({ startDate: undefined, endDate: undefined }),\n },\n },\n emits: [BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE],\n setup(props, { emit }) {\n const { locale, t } = useI18n<{ message: MessageSchema }>({ messages });\n const dateLocale = useDynamicDateFnsLocale(locale);\n const { dateToInputDateString } = useDateInputFormatter();\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } = useBaseFilter(\n toRef(props, 'value'),\n toRef(props, 'defaultValue')\n );\n const isSelectingDate = ref(false);\n\n const adjustedQuickSelectRanges = computed<Array<DateRangePickerCalendarRangeSelectorItem>>(() => {\n return (\n props?.options?.quickSelectRanges &&\n props.options.quickSelectRanges.map((range: DateRangePickerCalendarRangeSelectorItem) => {\n const timeDiff = !range.data.endDate\n ? new Date(Date.now()).getTime() - range.data.startDate.getTime()\n : undefined;\n return {\n ...range,\n data: {\n ...range.data,\n // Adding timeDifference to calculate an up-to-date endDate on range selection\n timeDifference: timeDiff,\n },\n };\n })\n );\n });\n\n const baseFilter = ref(null);\n const isDateIncorrect = ref(false);\n const formData = reactive({\n startDate: dateToInputDateString(props.value?.startDate),\n endDate: dateToInputDateString(props.value?.endDate),\n startTime: dateToTimeInputString(props.value?.startDate),\n endTime: dateToTimeInputString(props.value?.endDate),\n });\n watch(\n () => props.value,\n () => {\n formData.startDate = dateToInputDateString(props.value?.startDate);\n formData.endDate = dateToInputDateString(props.value?.endDate);\n formData.startTime = dateToTimeInputString(props.value?.startDate);\n formData.endTime = dateToTimeInputString(props.value?.endDate);\n }\n );\n\n function isQuickSelectAnArray(\n quickSelectRanges: BentoDateRangeFilterOptions['quickSelectRanges']\n ): quickSelectRanges is DateRangePickerCalendarRangeSelectorItems {\n return (quickSelectRanges as DateRangePickerCalendarRangeSelectorItems)?.length !== undefined;\n }\n\n const calculateSecondaryLabel = (currentValue: BentoDateRangeFilterValue) => {\n if (!currentValue || (!currentValue?.startDate && !currentValue.endDate)) {\n return null;\n }\n // If quick select range selected then display its label\n if (\n isQuickSelectAnArray(props.options?.quickSelectRanges) &&\n props.options?.quickSelectRanges?.length > 0\n ) {\n const customRangeSelected = props.options?.quickSelectRanges?.find(({ value, data }) => {\n if (currentValue) {\n if (currentValue.range) {\n return value === currentValue.range;\n }\n\n if (!currentValue.startDate || !currentValue.endDate) {\n return false;\n }\n\n if (!data?.endDate) {\n // Autoselecting the correct value for open-ended ranges\n return (\n isEqual(data?.startDate, currentValue.startDate) && isToday(currentValue.endDate)\n );\n }\n // If no range selected but start and end dates correspond to one of the preselected ranges, select it\n return (\n isEqual(data?.startDate, currentValue.startDate) &&\n isEqual(data?.endDate, currentValue.endDate)\n );\n }\n return false;\n });\n\n if (customRangeSelected) {\n return customRangeSelected.label;\n }\n }\n\n if (!currentValue.startDate || !currentValue.endDate) {\n return null;\n }\n\n return isSameDay(currentValue.startDate, currentValue.endDate) && props?.options?.allowTimeInput\n ? `${format(currentValue.startDate, 'dd MMM, yyyy HH:mm:ss', {\n locale: dateLocale.value,\n })} - ${format(currentValue.endDate, 'HH:mm:ss', {\n locale: dateLocale.value,\n })}`\n : `${format(currentValue.startDate, 'dd MMM, yyyy', {\n locale: dateLocale.value,\n })} - ${format(currentValue.endDate, 'dd MMM, yyyy', {\n locale: dateLocale.value,\n })}`;\n };\n\n const buttonSecondaryLabel = computed(() => calculateSecondaryLabel(props.value));\n const buttonLabel = computed(() => props.label);\n\n const updateFilter = () => {\n baseFilter.value.closePopover();\n // Omit the onlySlot prop as it is not needed\n const { onlySlot, ...cleanedProps } = props;\n emit(BentoFilterEvent.UPDATE, { ...cleanedProps, value: internalFilterValue.value });\n };\n\n const clearFilter = () => {\n internalFilterValue.value = undefined;\n updateFilter();\n };\n\n const resetFilter = () => {\n internalFilterValue.value = props.defaultValue;\n updateFilter();\n };\n\n const openFilter = () => {\n internalFilterValue.value = props.value;\n };\n\n // If we click outside or press escape this should cancel and reset the form inputs\n // set all internal states back to their initial values\n const onCancel = () => {\n internalFilterValue.value = props.value;\n isSelectingDate.value = false;\n formData.startDate = dateToInputDateString(props.value?.startDate);\n formData.endDate = dateToInputDateString(props.value?.endDate);\n formData.startTime = dateToTimeInputString(props.value?.startDate);\n formData.endTime = dateToTimeInputString(props.value?.endDate);\n };\n\n const onDateSelected = (selectedDate: BentoDateRangePickerValue) => {\n isSelectingDate.value = false;\n internalFilterValue.value = selectedDate;\n formData.startDate = dateToInputDateString(selectedDate.startDate);\n formData.endDate = dateToInputDateString(selectedDate.endDate);\n emit(BentoFilterEvent.INPUT, { ...props, value: internalFilterValue.value });\n };\n\n const onRangeSelectorInput = (quickSelectRanges?: { startDate: Date; endDate: Date }) => {\n if (quickSelectRanges?.startDate && quickSelectRanges?.endDate) {\n internalFilterValue.value = quickSelectRanges;\n formData.startDate = dateToInputDateString(quickSelectRanges.startDate);\n formData.endDate = dateToInputDateString(quickSelectRanges.endDate);\n emit(BentoFilterEvent.INPUT, { ...props, value: internalFilterValue.value });\n }\n };\n\n // Need to update the internal value and emit the date when using the date-picker input\n const onDateInputSelected = (selectedDate: BentoDateRangePickerValue) => {\n onDateSelected(selectedDate);\n emit(BentoFilterEvent.INPUT, { ...props, value: internalFilterValue.value });\n };\n\n const actions = computed(\n () =>\n [\n {\n title: t('apply') as string,\n event: updateFilter,\n disabled: isSelectingDate.value || isDateIncorrect.value || isApplyButtonDisabled.value,\n },\n {\n title: (props.defaultValue ? t('reset') : t('clear')) as string,\n event: (props.defaultValue ? resetFilter : clearFilter) as () => void,\n disabled: isDateIncorrect.value && isSecondaryButtonDisabled.value,\n },\n ] as BentoButtonActionsList\n );\n\n const onDatePickerRangeError = () => {\n isDateIncorrect.value = true;\n internalFilterValue.value = { startDate: undefined, endDate: undefined };\n emit(BentoFilterEvent.INPUT, { ...props, value: internalFilterValue.value });\n };\n\n const onDatePickerRangeFormDateInputUpdate = (dateFormDate: DateRangePickerCalendarFormData) => {\n isDateIncorrect.value = false;\n\n if (dateFormDate.startTime) {\n formData.startTime = dateFormDate.startTime;\n }\n\n if (dateFormDate.endTime) {\n formData.endTime = dateFormDate.endTime;\n }\n };\n\n return {\n // Refs\n baseFilter,\n\n // Values\n actions,\n formData,\n internalFilterValue,\n isApplyButtonDisabled,\n isSecondaryButtonDisabled,\n isSelectingDate,\n buttonLabel,\n buttonSecondaryLabel,\n adjustedQuickSelectRanges,\n\n // Events\n onCancel,\n onDateSelected,\n openFilter,\n clearFilter,\n resetFilter,\n updateFilter,\n onDatePickerRangeError,\n onDatePickerRangeFormDateInputUpdate,\n onDateInputSelected,\n onRangeSelectorInput,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-range-filter.scss\" />\n","<template>\n <bento-base-filter\n v-bind=\"$props\"\n :button-label=\"label\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :disable-apply-button=\"isApplyButtonDisabled\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :only-slot=\"onlySlot\"\n @apply=\"updateFilter\"\n @clear=\"clearFilter(updateFilter)\"\n @open=\"openFilter\"\n @reset=\"resetFilter(updateFilter)\"\n >\n <div class=\"b-radio-group-filter\" :class=\"conditionalClasses\">\n <bento-radio-group\n v-model=\"internalFilterValue\"\n :items=\"options?.items\"\n :label=\"label\"\n :disabled=\"disabled\"\n hide-label\n variant=\"vertical\"\n @update:model-value=\"onInput\"\n />\n </div>\n </bento-base-filter>\n</template>\n\n<script setup lang=\"ts\">\n import { BentoRadioGroup } from '@/components/radio-group';\n import { BentoBaseFilter } from '../base-filter';\n import { computed, toRef } from 'vue';\n import { useBentoBaseFilter } from '@/composables/use-bento-base-filter';\n import { truncate } from '@/utils/ts/truncate';\n import { type BentoRadioGroupFilterProps, type BentoRadioGroupFilterValue } from './radio-group-filter.types';\n\n const props = defineProps({\n disabled: { type: Boolean },\n defaultValue: { default: undefined },\n field: null,\n label: null,\n options: { default: () => ({\n items: [],\n }) },\n onlySlot: { type: Boolean },\n value: { default: undefined }\n});\n\n const emit = defineEmits([\"input\", \"update\"]);\n\n const {\n // Fields\n internalFilterValue,\n isSecondaryButtonDisabled,\n isApplyButtonDisabled,\n // Methods\n clearFilter,\n openFilter,\n resetFilter,\n } = useBentoBaseFilter<BentoRadioGroupFilterValue>(toRef(props, 'value'), toRef(props, 'defaultValue'));\n\n // Used to truncate the label of the selected option\n const buttonSecondaryLabel = computed(() => {\n const selectedValueLabel = props.options.items.find(item => item.value === props.value)?.label || '';\n return truncate(selectedValueLabel, 12);\n });\n\n const conditionalClasses = computed(() => ({\n [`b-radio-group-filter--only-slot`]: props.onlySlot,\n }));\n\n function onInput(newValue: BentoRadioGroupFilterValue) {\n internalFilterValue.value = newValue;\n // Emitted for the filter bar all filters modal\n emit('input', { ...props, value: internalFilterValue.value });\n }\n\n function updateFilter() {\n // Emitted for the filter bar\n emit('update', { ...props, value: internalFilterValue.value });\n }\n</script>\n\n<script lang=\"ts\">\n /**\n * Radio group filter component\n *\n * @example\n * import { BentoRadioGroupFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoRadioGroupFilter },\n * template: `\n * <bento-radio-group-filter\n * :label=\"label\"\n * :options=\"{\n * items: [\n * { value: 'value1', label: 'Label 1' },\n * { value: 'value2', label: 'Label 2' },\n * ],\n * }\"\n * value=\"value1\"\n * defaultValue=\"value2\"\n * />\n * `\n * }\n */\n export default {\n name: 'bento-radio-group-filter',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./radio-group-filter.scss\" />\n","<template>\n <bento-base-filter\n :applied-filters-count=\"appliedFiltersCount\"\n :button-label=\"buttonLabel\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :disabled=\"disabled\"\n :disable-apply-button=\"isApplyButtonDisabled\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :default-value=\"defaultValue\"\n :label=\"label\"\n :field=\"field\"\n :only-slot=\"false\"\n :tooltip-position=\"options?.tooltipPosition\"\n :tooltip-text=\"options?.tooltipText\"\n :value=\"value\"\n @apply=\"updateFilter\"\n @clear=\"clearFilter\"\n @reset=\"resetFilter\"\n @open=\"openFilter\"\n @close=\"closeFilter\"\n >\n <div class=\"b-select-filter-button__search-bar-wrapper\">\n <div v-if=\"options?.dynamicFiltering ?? true\" class=\"b-select-filter-button__search-bar\">\n <bento-search-bar\n :debounce-time=\"options?.search?.debounceTime\"\n :value=\"searchTerm\"\n :input-field-aria-label=\"t('searchFilter', { filter: label.toLocaleLowerCase() })\"\n @input=\"searchTerm = $event\"\n />\n </div>\n\n <div class=\"b-select-filter-button__divider\">\n <bento-divider />\n </div>\n </div>\n\n <bento-listbox\n :id=\"listboxFilterId\"\n :aria-label=\"label\"\n class=\"b-select-filter-button__wrapper\"\n :component-loading=\"options?.loading\"\n :empty-state=\"options?.emptyState\"\n :has-more-items=\"options?.lazy?.hasMoreItems\"\n :items=\"filteredItems\"\n :is-option-disabled=\"options?.isOptionDisabled\"\n :lazy-load-type=\"options?.lazy?.lazyLoadType\"\n :loading=\"options?.lazy?.loading\"\n :multiple=\"options?.multiple\"\n :static-categories=\"options?.staticCategories\"\n :no-results-message=\"noResultsMessage\"\n :searching=\"!!searchTerm\"\n :selected-value=\"internalFilterValue\"\n :virtual-scroll=\"options?.virtualScroll\"\n @select=\"onOptionSelected\"\n @space-pressed=\"onOptionSelected\"\n @enter-pressed=\"onOptionSelected\"\n @show-more=\"options?.lazy?.showMoreEvent()\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-listbox>\n </bento-base-filter>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type PropType, ref, toRef, useSlots, watch } from 'vue';\n\n // Components\n import BentoSearchBar from '@/components/search-bar/search-bar.vue';\n import { BentoDivider } from '@/components/divider';\n import { BentoListbox, useCachedSelectedValues } from '@/internal';\n import {\n type BentoListboxMultiSelectValue,\n type BentoListboxOptionItem,\n type BentoListboxOptions,\n type BentoListboxSelectedValue,\n type BentoListboxSelectedValueLabelPair,\n type BentoListboxValue,\n } from '@/types/listbox';\n import { BentoBaseFilter, useBaseFilter } from '../../../base-filter';\n\n // Types\n import { BentoFilterEvent, type BentoSelectFilterOptions } from '../../../../filter-bar.types';\n\n // Utilities\n import { useSearchBarFilter } from '@/components/search-bar';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { truncate } from '@/utils/ts/truncate';\n import { useI18n } from '@/utils/ts/i18n';\n import { printDevelopmentWarning } from '@/utils/ts/print-development-warning';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const slots = useSlots();\n\n const emit = defineEmits([\"input\", \"update\"]);\n\n const props = defineProps({\n /**\n * Disables the filter from being interacted with.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Default value of the filter to reset to.\n *\n */\n defaultValue: {\n type: [String, Number, Array] as PropType<BentoListboxSelectedValue>,\n default: null,\n },\n\n /**\n * Filter name/key referencing the actual property name in the data set.\n * Should be unique per filter bar.\n */\n field: { type: String, required: true },\n\n /**\n * Label text to be displayed\n */\n label: { type: String, required: true },\n\n /**\n * Renders the base filter's slot content only - leaving out the button and the popover.\n * Used for the allFiltersModal component.\n */\n onlySlot: { type: Boolean, default: false },\n\n /**\n * List of options that are needed to setup the filter\n * Available options:\n * - multiple: If \"true\", the user will be able to select multiple items.\n * - listboxItems: The option elements to populate the filter with.\n *\n * @default undefined\n */\n options: {\n type: Object as PropType<BentoSelectFilterOptions>,\n default: undefined,\n },\n\n /**\n * Current value of the filter\n *\n * @default undefined\n */\n value: {\n type: [String, Number, Array, Object] as PropType<BentoListboxSelectedValue>,\n default: undefined,\n },\n });\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const searchTerm = ref('');\n const optionsRef = toRef(props, 'options');\n const itemsRef = ref(props.options.listboxItems ?? []);\n\n const { cachedSelectedListboxOptions, setCachedValues, resetCache } = useCachedSelectedValues(\n itemsRef,\n toRef(props, 'value'),\n toRef(optionsRef.value, 'multiple')\n );\n\n const { cachedSelectedListboxOptions: cachedDefaultSelectedListboxOptions } = useCachedSelectedValues(\n itemsRef,\n toRef(props, 'defaultValue'),\n toRef(optionsRef.value, 'multiple')\n );\n\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } =\n useBaseFilter<BentoListboxOptions>(cachedSelectedListboxOptions, cachedDefaultSelectedListboxOptions);\n\n // We need to make sure to update the items if the consumer updates them manually\n watch(optionsRef, () => {\n itemsRef.value = optionsRef.value.listboxItems ?? [];\n });\n\n const filteredItems = useSearchBarFilter<BentoListboxOptionItem>(\n searchTerm,\n itemsRef,\n props.options?.search?.searchEvent\n );\n const noResultsMessage = computed(() => t('noFiltersMatchThisSearch') as string);\n\n const buttonLabel = computed(() => props.label);\n\n const buttonSecondaryLabel = computed(() => {\n const isSingleSelectAndOneItemSelected = !props?.options?.multiple && props.value != null;\n const isMultiSelectedAndOneItemSelected =\n props?.options?.multiple && Array.isArray(props.value) && props.value.length === 1;\n\n // When only 1 item is selected: Display the Label of the selected value or use value as Label\n if (isSingleSelectAndOneItemSelected || isMultiSelectedAndOneItemSelected) {\n // If enableValueLabelPair is enabled then \"value\" has the label, no need to search for it.\n if (props.options?.enableValueLabelPair) {\n let displayValue =\n (props.value as Array<BentoListboxSelectedValueLabelPair>)?.length > 0\n ? (props.value[0] as BentoListboxSelectedValueLabelPair).label\n : (props.value as BentoListboxSelectedValueLabelPair).label;\n\n if (!displayValue) {\n displayValue = props.value as string;\n printDevelopmentWarning(\n 'BentoFilterBar Select filter (single & multi): The \"value\" provided is incorrect. The \"value\" must be of type \"BentoListboxSelectedValueLabelPair\" or \"Array<BentoListboxSelectedValueLabelPair>\" when \"enableValueLabelPair\" is set to true'\n );\n }\n return truncate(displayValue as string, 12);\n }\n\n const flatListboxItems = props.options.listboxItems.flatMap(x => (x.items ? x.items : x));\n // If the value is not in the list of Items set the value as secondary label.\n // This happens on external filtering\n let displayValue = flatListboxItems.find(({ value }) =>\n Array.isArray(props.value)\n ? (props?.value as BentoListboxMultiSelectValue)?.includes(value as BentoListboxValue)\n : value === props.value\n )?.label;\n\n if (!displayValue && props.value) {\n displayValue = (props.value as BentoListboxMultiSelectValue)[0] as string;\n }\n\n return truncate(displayValue, 12);\n }\n return null;\n });\n\n const listboxFilterId = computed(() => generateUid(`filter-listbox-${props.field}`));\n\n const onOptionSelected = (selectedValue: BentoListboxOptions) => {\n internalFilterValue.value = selectedValue;\n\n const { onlySlot, ...cleanedProps } = props;\n // Return null if there are no selected values\n if (props.options?.multiple) {\n let value: BentoListboxSelectedValue;\n\n if (props.options?.enableValueLabelPair) {\n value = selectedValue.length ? internalFilterValue.value : null;\n } else {\n value = selectedValue.length ? internalFilterValue.value.map(({ value }) => value) : null;\n }\n emit(BentoFilterEvent.INPUT, { ...cleanedProps, value });\n return;\n }\n\n let value: BentoListboxSelectedValue;\n if (props.options?.enableValueLabelPair) {\n value = selectedValue.length ? selectedValue[0] : null;\n } else {\n value = selectedValue.length ? selectedValue[0].value : null;\n }\n emit(BentoFilterEvent.INPUT, { ...cleanedProps, value });\n };\n\n const updateFilter = () => {\n // Omit the onlySlot prop as it is not needed\n const { onlySlot, ...cleanedProps } = props;\n\n if (props.options.multiple) {\n // If multi select filter and all items unchecked,\n // If persistent filter, reset back to default value, else reset back to undefined\n if (internalFilterValue.value && (internalFilterValue.value as Array<unknown>)?.length === 0) {\n internalFilterValue.value =\n props.defaultValue !== null ? cachedDefaultSelectedListboxOptions.value : undefined;\n }\n\n let value: BentoListboxSelectedValue;\n if (props.options?.enableValueLabelPair) {\n value = internalFilterValue.value?.length ? internalFilterValue.value : null;\n } else {\n value = internalFilterValue.value?.length ? internalFilterValue.value?.map(({ value }) => value) : null;\n }\n emit(BentoFilterEvent.UPDATE, {\n ...cleanedProps,\n value,\n });\n return;\n }\n\n let value: BentoListboxSelectedValue;\n if (props.options?.enableValueLabelPair) {\n value = internalFilterValue.value.length ? internalFilterValue.value[0] : undefined;\n } else {\n value = internalFilterValue.value.length ? internalFilterValue.value[0].value : undefined;\n }\n emit(BentoFilterEvent.UPDATE, { ...cleanedProps, value });\n };\n\n const openFilter = () => {\n internalFilterValue.value = cachedSelectedListboxOptions.value;\n props.options?.onOpen?.();\n };\n\n const closeFilter = () => {\n // If the search term is set, reset it to \"empty\"\n if (searchTerm.value) {\n searchTerm.value = '';\n }\n };\n\n const resetFilter = () => {\n setCachedValues(cachedDefaultSelectedListboxOptions.value);\n internalFilterValue.value = cachedDefaultSelectedListboxOptions.value;\n updateFilter();\n };\n\n const clearFilter = () => {\n resetCache();\n internalFilterValue.value = [];\n updateFilter();\n };\n\n const appliedFiltersCount = computed(() => {\n // Don't show if no filter applied or peristent filter or not multiple select\n if (props.value == null || !props.options.multiple) {\n return null;\n }\n\n /*\n * Show amount of items selceted (props.value) or 'All' if all items selected\n */\n\n // If nested we need to get the correct count\n const allSelectableItemsCount = props.options.listboxItems?.reduce((acc, item) => {\n // eslint-disable-next-line no-param-reassign\n acc += item?.items?.length ? item.items.length : 1;\n return acc;\n }, 0);\n\n const selectedAmount = (props.value as Array<string | number>)?.length;\n\n if (selectedAmount === 1) {\n return null;\n }\n\n return selectedAmount === allSelectableItemsCount ? t('all') : selectedAmount;\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * The Listbox filter displays a listbox of items\n * passed in the \"options.listboxItems\" property.\n *\n * @example\n * import { BentoSelectFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectFilter },\n * template: `\n * <bento-select-filter\n * :field=\"filter.field\"\n * :label=\"filter.label\"\n * :options=\"filter.options\"\n * :value=\"filter.value\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default {\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./select-filter-button.scss\" />\n","<template>\n <bento-dropdown\n :model-value=\"internalFilterValue\"\n :items=\"options.listboxItems\"\n :search=\"options?.search\"\n :multiple=\"options?.multiple\"\n :static-categories=\"options?.staticCategories\"\n :no-results-message=\"noResultsMessage\"\n :is-option-disabled=\"options.isOptionDisabled\"\n :dynamic-filtering=\"options?.dynamicFiltering ?? true\"\n :component-loading=\"options?.loading\"\n :empty-state=\"options?.emptyState\"\n :disabled=\"disabled\"\n :enable-value-label-pair=\"options?.enableValueLabelPair\"\n @update:model-value=\"onOptionSelected\"\n @open=\"() => options?.onOpen?.()\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </bento-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type PropType, ref, toRef, useSlots, watch } from 'vue';\n\n // Components\n import { BentoDropdown } from '@/components/dropdown';\n\n // Composables\n import { useBaseFilter } from '../../../base-filter';\n\n // Types\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoFilterEvent, type BentoSelectFilterOptions } from '../../../../filter-bar.types';\n\n // Utils\n import { useI18n } from '@/utils/ts/i18n';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const slots = useSlots();\n\n const emit = defineEmits([\"input\", \"update\"]);\n\n const props = defineProps({\n /**\n * Disables the filter from being interacted with.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Default value of the filter to reset to.\n *\n */\n defaultValue: {\n type: [String, Number, Array] as PropType<BentoListboxSelectedValue>,\n default: null,\n },\n\n /**\n * Filter name/key referencing the actual property name in the data set.\n * Should be unique per filter bar.\n */\n field: { type: String, required: true },\n\n /**\n * Label text to be displayed\n */\n label: { type: String, required: true },\n\n /**\n * Renders the base filter's slot content only - leaving out the button and the popover.\n * Used for the allFiltersModal component.\n *\n */\n onlySlot: { type: Boolean, default: false },\n\n /**\n * List of options that are needed to setup the filter\n * Available options:\n * - multiple: If \"true\", the user will be able to select multiple items.\n * - listboxItems: The option elements to populate the filter with.\n *\n * @default undefined\n */\n options: {\n type: Object as PropType<BentoSelectFilterOptions>,\n default: undefined,\n },\n\n /**\n * Current value of the filter\n *\n * @default undefined\n */\n value: {\n type: [String, Number, Array] as PropType<BentoListboxSelectedValue>,\n default: undefined,\n },\n });\n\n const { internalFilterValue } = useBaseFilter(toRef(props, 'value'), toRef(props, 'defaultValue'));\n\n const optionsRef = toRef(props, 'options');\n const itemsRef = ref(props.options.listboxItems);\n\n // We need to make sure to update the items if the consumer updates them manually\n watch(optionsRef, () => {\n itemsRef.value = optionsRef.value.listboxItems;\n });\n\n const noResultsMessage = computed(() => t('noFiltersMatchThisSearch') as string);\n\n const onOptionSelected = (selectedValue: BentoListboxSelectedValue) => {\n internalFilterValue.value = selectedValue;\n const { onlySlot, ...cleanedProps } = props;\n emit(BentoFilterEvent.INPUT, { ...cleanedProps, value: internalFilterValue.value });\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * The Listbox filter displays a listbox of items\n * passed in the \"options.listboxItems\" property.\n *\n * @example\n * import { BentoSelectFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectFilter },\n * template: `\n * <bento-select-filter\n * :field=\"filter.field\"\n * :label=\"filter.label\"\n * :options=\"filter.options\"\n * :value=\"filter.value\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'select-filter-dropdown',\n };\n</script>\n","import type { PropType } from 'vue';\nimport type { BentoListboxSelectedValue } from '@/types/listbox';\nimport type { BentoSelectFilterOptions } from '@/components/filter-bar/filter-bar.types';\n\nexport const SelectFilterProps = {\n /**\n * Disables the filter from being interacted with.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Default value of the filter to reset to.\n *\n */\n defaultValue: {\n type: [String, Number, Array, Object] as PropType<BentoListboxSelectedValue>,\n default: null,\n },\n\n /**\n * Filter name/key referencing the actual property name in the data set.\n * Should be unique per filter bar.\n */\n field: { type: String, required: true },\n\n /**\n * Label text to be displayed\n */\n label: { type: String, required: true },\n\n /**\n * Renders the base filter's slot content only - leaving out the button and the popover.\n * Used for the allFiltersModal component.\n *\n */\n onlySlot: { type: Boolean, default: false },\n\n /**\n * List of options that are needed to setup the filter\n * Available options:\n * - multiple: If \"true\", the user will be able to select multiple items.\n * - listboxItems: The option elements to populate the filter with.\n * - tooltipPosition: The position of the tooltip attached to the filter button\n * - tooltipText: The content of the tooltip attached to the filter button\n *\n * @default undefined\n */\n options: {\n type: Object as PropType<BentoSelectFilterOptions>,\n default: undefined,\n },\n\n /**\n * Current value of the filter\n *\n * @default undefined\n */\n value: {\n type: [String, Number, Array, Object] as PropType<BentoListboxSelectedValue>,\n default: undefined,\n },\n};\n\nexport default SelectFilterProps;\n","<template>\n <select-filter-dropdown\n v-if=\"onlySlot\"\n :disabled=\"disabled\"\n :default-value=\"defaultValue\"\n :field=\"field\"\n :label=\"label\"\n :options=\"options\"\n :value=\"value\"\n @input=\"onInput\"\n @update=\"onUpdate\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </select-filter-dropdown>\n\n <select-filter-button\n v-else\n :disabled=\"disabled\"\n :default-value=\"defaultValue\"\n :field=\"field\"\n :label=\"label\"\n :options=\"options\"\n :value=\"value\"\n @input=\"onInput\"\n @update=\"onUpdate\"\n >\n <template v-for=\"(_, innerSlot) of slots\" #[innerSlot]=\"scope\">\n <slot :name=\"innerSlot\" v-bind=\"scope\" />\n </template>\n </select-filter-button>\n</template>\n\n<script setup lang=\"ts\">\n import { SelectFilterButton, SelectFilterDropdown } from './components';\n import { useSlots } from 'vue';\n import SelectFilterProps from '@/components/filter-bar/components/select-filter/select-filter.props';\n\n const slots = useSlots();\n\n const emit = defineEmits([\"input\", \"update\"]);\n\n defineProps(SelectFilterProps);\n\n const onInput = (updatedProps: any) => emit('input', updatedProps);\n const onUpdate = (updatedProps: any) => emit('update', updatedProps);\n</script>\n\n<script lang=\"ts\">\n /**\n * The Listbox filter displays a listbox of items\n * passed in the \"options.listboxItems\" property.\n *\n * @example\n * import { BentoSelectFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectFilter },\n * template: `\n * <bento-select-filter\n * :field=\"filter.field\"\n * :label=\"filter.label\"\n * :options=\"filter.options\"\n * :value=\"filter.value\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default {};\n</script>\n","<template>\n <bento-select-filter\n v-slot=\"{ label: slotLabel, data }\"\n v-bind=\"$props\"\n :field=\"field\"\n :label=\"label\"\n @update=\"onUpdate\"\n @input=\"e => $emit(BentoFilterEvent.INPUT, e)\"\n >\n <bento-avatar :username=\"slotLabel\" :src=\"data\" />\n </bento-select-filter>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, type PropType } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoSelectFilter } from '../../index';\n import { BentoFilterEvent, type BentoSelectAvatarFilterOptions } from '@/components/filter-bar/filter-bar.types';\n import { BentoAvatar } from '@/components/avatar';\n import SelectFilterProps from '@/components/filter-bar/components/select-filter/select-filter.props';\n\n /**\n * The Select Avatar filter displays a listbox of avatar items\n * passed in the \"options.listboxItems\" property.\n *\n * @example\n * import { BentoSelectAvatarFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectAvatarFilter },\n * template: `\n * <bento-select-avatar-filter\n * :field=\"avatar\"\n * :label=\"Avatar\"\n * :options=\"{\n * listboxItems: [{\n * label: 'Avatar 1',\n * value: 'avatar-2'\n * }, {\n * label: 'Avatar 2',\n * value: 'avatar-2'\n * }],\n * :multiple=\"false\"\n * }\"\n * value=\"avatar-2\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-select-avatar-filter',\n components: {\n BentoSelectFilter,\n BentoAvatar,\n },\n props: {\n ...SelectFilterProps,\n\n /**\n * List of options that are needed to setup the country filter\n * Available options:\n * - multiple: If \"true\", the user will be able to select multiple items.\n * - listboxItems: The option elements to populate the filter with {@see BentoSelectCountryFilterOptions}\n */\n options: {\n type: Object as PropType<BentoSelectAvatarFilterOptions>,\n default: undefined,\n },\n },\n emits: [BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE],\n setup(_, { emit }) {\n const onUpdate = (selectedValue: BentoListboxSelectedValue) => emit(BentoFilterEvent.UPDATE, selectedValue);\n\n return {\n // Enums\n BentoFilterEvent,\n\n // Methods\n onUpdate,\n };\n },\n });\n</script>\n","<template>\n <bento-select-filter\n v-slot=\"slotProps\"\n v-bind=\"$props\"\n :field=\"field\"\n :label=\"label\"\n :options=\"internalOptions\"\n @update=\"onUpdate\"\n @input=\"e => $emit(BentoFilterEvent.INPUT, e)\"\n >\n <listbox-option-tag :option=\"slotProps\" />\n </bento-select-filter>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType, ref, watch } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoSelectFilter } from '../../index';\n import { ListboxOptionTag } from '@/internal';\n import { BentoFilterEvent, type BentoSelectCurrencyFilterOptions } from '@/components/filter-bar/filter-bar.types';\n import SelectFilterProps from '@/components/filter-bar/components/select-filter/select-filter.props';\n import { useSearchBarFilter } from '@/components/search-bar';\n import { type BentoCurrencyListboxOptions } from '@/components/dropdown';\n\n /**\n * The Select Country filter displays a listbox of country items\n * passed in the \"options.listboxItems\" property.\n *\n * @example\n * import { BentoCurrencyISOCode, BentoSelectCurrencyFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectCurrencyFilter },\n * template: `\n * <bento-select-currency-filter\n * :field=\"currency\"\n * :label=\"Currency\"\n * :options=\"{\n * listboxItems: [{\n * label: 'Euro',\n * value: BentoCurrencyISOCode.EUR,\n * }, {\n * label: 'US Dollars',\n * value: BentoCurrencyISOCode.USD,\n * }],\n * multiple=\"false\",\n * isOptionsDisabled=\"option => option.value === BentoCurrencyISOCode.USD\"\n * }\"\n * :value=\"BentoCurrencyISOCode.EUR\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-select-currency-filter',\n components: {\n BentoSelectFilter,\n ListboxOptionTag,\n },\n props: {\n ...SelectFilterProps,\n\n /**\n * List of options that are needed to setup the country filter\n * Available options:\n * - multiple: If \"true\", the user will be able to select multiple items.\n * - listboxItems: The option elements to populate the filter with {@see BentoSelectCurrencyFilterOptions}\n */\n options: {\n type: Object as PropType<BentoSelectCurrencyFilterOptions>,\n default: undefined,\n },\n },\n emits: [BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE],\n setup(props, { emit }) {\n const onUpdate = (selectedValue: BentoListboxSelectedValue) => {\n emit(BentoFilterEvent.UPDATE, selectedValue);\n };\n\n // If the parent updates the list, the local reference needs to be updated so the UI isn't empty on load\n const filteredItems = ref<BentoCurrencyListboxOptions>([]);\n\n watch(\n () => props.options?.listboxItems,\n newList => {\n filteredItems.value = newList || [];\n },\n { immediate: true }\n );\n\n const search = props.options?.search\n ? props.options.search\n : {\n debounceTime: 500,\n searchEvent: async (searchTerm: string) => {\n // Combine value and label to be able to search by the currency code\n // If searchTerm is empty, reset to the full list\n if (!searchTerm) {\n filteredItems.value = props.options?.listboxItems || [];\n return;\n }\n\n const searchableItems = (props.options?.listboxItems || []).map(item => ({\n ...item,\n label: `${item.value} ${item.label}`,\n }));\n\n const searchResults = useSearchBarFilter(\n ref(searchTerm),\n ref<BentoCurrencyListboxOptions>(searchableItems),\n props.options?.search?.searchEvent,\n ref(false)\n ).value;\n\n // Restore original labels by removing the prepended value\n const normalizedResults = searchResults?.map(result => ({\n ...result,\n label: result.label.substring(result.value.length + 1),\n }));\n\n filteredItems.value = normalizedResults;\n },\n };\n\n const internalOptions = computed(() => ({\n ...props.options,\n search: search,\n listboxItems: filteredItems.value,\n }));\n\n return {\n // Enums\n BentoFilterEvent,\n\n // Methods\n onUpdate,\n internalOptions,\n };\n },\n });\n</script>\n","<template>\n <bento-select-filter\n v-slot=\"{ label: slotLabel }\"\n v-bind=\"props\"\n :field=\"field\"\n :label=\"label\"\n :options=\"countryOptions\"\n @update=\"onUpdate\"\n @input=\"e => $emit(BentoFilterEvent.INPUT, e)\"\n >\n <bento-typography el=\"span\">{{ slotLabel }}</bento-typography>\n </bento-select-filter>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, type PropType, ref, watch } from 'vue';\n import { useCountryItems } from '@/components/dropdown/components/variants/dropdown-country/composables/use-country-items';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoFilterEvent, type BentoSelectCountryFilterOptions } from '@/components/filter-bar/filter-bar.types';\n import { BentoCountryVariant } from '@/components/country';\n import { BentoTypography } from '@/components/typography';\n import BentoSelectFilter from '../../select-filter.vue';\n import SelectFilterProps from '@/components/filter-bar/components/select-filter/select-filter.props';\n\n const props = defineProps({\n ...SelectFilterProps,\n\n /**\n * List of options that are needed to setup the country filter\n * Available options:\n * - multiple: If \"true\", the user will be able to select multiple items.\n * - listboxItems: The option elements to populate the filter with {@see BentoSelectCountryFilterOptions}\n * - variant: Which label variant to display for the option item.\n */\n options: {\n type: Object as PropType<BentoSelectCountryFilterOptions>,\n default: undefined,\n },\n });\n\n const emit = defineEmits([BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE]);\n\n const variant = ref(props.options?.variant ?? BentoCountryVariant.NAME);\n const listboxItems = ref(props.options?.listboxItems);\n\n watch([() => props.options?.variant, () => props.options?.listboxItems], () => {\n variant.value = props.options?.variant ?? BentoCountryVariant.NAME;\n listboxItems.value = props.options?.listboxItems;\n });\n\n const onUpdate = (selectedValue: BentoListboxSelectedValue) => emit(BentoFilterEvent.UPDATE, selectedValue);\n\n const countryItems = useCountryItems(variant, listboxItems);\n const countryOptions = computed(() => {\n return {\n ...(props?.options ? props.options : {}),\n listboxItems: countryItems.value,\n };\n });\n</script>\n\n<script lang=\"ts\">\n /**\n * The Select Country filter displays a listbox of country items\n * passed in the \"options.listboxItems\" property.\n *\n * @example\n * import { BentoSelectCountryFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectCountryFilter },\n * template: `\n * <bento-select-country-filter\n * :field=\"country\"\n * :label=\"Country\"\n * :options=\"{\n * listboxItems: [{\n * value: \"NL\",\n * }, {\n * value: \"BE\",\n * }],\n * variant: 'capital'\n * }\"\n * :value=\"BE\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default {\n name: 'bento-select-country-filter',\n };\n</script>\n","<template>\n <bento-select-filter\n v-slot=\"{ value, label: slotLabel }\"\n v-bind=\"$props\"\n :field=\"field\"\n :label=\"label\"\n @update=\"onUpdate\"\n @input=\"e => $emit(BentoFilterEvent.INPUT, e)\"\n >\n <bento-payment-method :type=\"value\" :label=\"slotLabel\" />\n </bento-select-filter>\n</template>\n\n<script lang=\"ts\">\n import { defineComponent, type PropType } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoSelectFilter } from '../../index';\n import {\n BentoFilterEvent,\n type BentoSelectPaymentMethodFilterOptions,\n } from '@/components/filter-bar/filter-bar.types';\n import { BentoPaymentMethod } from '@/components/payment-method';\n import SelectFilterProps from '@/components/filter-bar/components/select-filter/select-filter.props';\n\n /**\n * The Select Payment Method filter displays a listbox of country items\n * passed in the \"options.listboxItems\" property to be used in the FilterBar component.\n *\n * @example\n * import { BentoSelectPaymentMethodFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectPaymentMethodFilter },\n * template: `\n * <bento-select-paymnent-method-filter\n * :field=\"paymentMethod\"\n * :label=\"Payment method\"\n * :options=\"{\n * listboxItems: [\n * { label: 'Option 1', value: 'ideal' },\n * { label: 'Option 2', value: 'visa' },\n * ],\n * }\"\n * value=\"ideal\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-select-payment-method-filter',\n components: {\n BentoSelectFilter,\n BentoPaymentMethod,\n },\n props: {\n ...SelectFilterProps,\n\n /**\n * List of options that are needed to setup the payment method filter\n * Available options:\n * - multiple: If \"true\", the user will be able to select multiple items.\n * - listboxItems: The option elements to populate the filter with {@see BentoSelectPaymentMethodFilterOptions}\n */\n options: {\n type: Object as PropType<BentoSelectPaymentMethodFilterOptions>,\n default: undefined,\n },\n },\n emits: [BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE],\n setup(_props, { emit }) {\n const onUpdate = (selectedValue: BentoListboxSelectedValue) => emit(BentoFilterEvent.UPDATE, selectedValue);\n\n return {\n // Enums\n BentoFilterEvent,\n\n // Methods\n onUpdate,\n };\n },\n });\n</script>\n","<template>\n <bento-select-filter\n v-slot=\"{ label: slotLabel, data }\"\n v-bind=\"$props\"\n :field=\"field\"\n :label=\"label\"\n :options=\"countryOptions\"\n @update=\"onUpdate\"\n @input=\"e => $emit(BentoFilterEvent.INPUT, e)\"\n >\n <listbox-option-tag :option=\"{ value: slotLabel, data, label: '' }\" />\n </bento-select-filter>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, type PropType } from 'vue';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { BentoSelectFilter } from '../../index';\n import { BentoFilterEvent, type BentoSelectTagFilterOptions } from '@/components/filter-bar/filter-bar.types';\n import { ListboxOptionTag } from '@/internal';\n import SelectFilterProps from '@/components/filter-bar/components/select-filter/select-filter.props';\n\n /**\n * The Select Tag filter displays a listbox of tag items\n * passed in the \"options.listboxItems\" property.\n *\n * @example\n * import { BentoSelectTagFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoSelectTagFilter },\n * template: `\n * <bento-select-tag-filter\n * :field=\"tag\"\n * :label=\"Tag\"\n * :options=\"{\n * listboxItems: [\n * { label: 'Offline', value: 'unique-id-1', variant: 'red' },\n * { label: 'Online', value: 'unique-id-2', variant: 'green' },\n * { label: 'Standby', value: 'unique-id-3', variant: 'orange' },\n * { label: 'Busy with things', value: 'unique-id-4', variant: 'blue' },\n * ]\n * }\"\n * :value=\"'unique-id-4'\"\n * @update=\"updateFilterHandler\"\n * >\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-select-country-filter',\n components: {\n BentoSelectFilter,\n ListboxOptionTag,\n },\n props: {\n ...SelectFilterProps,\n\n /**\n * List of options that are needed to setup the tag filter\n * Available options:\n * - multiple: If \"true\", the user will be able to select multiple items.\n * - listboxItems: The option elements to populate the filter with {@see BentoSelectTagFilterOptions}\n */\n options: {\n type: Object as PropType<BentoSelectTagFilterOptions>,\n default: undefined,\n },\n },\n emits: [BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE],\n setup(props, { emit }) {\n const onUpdate = (selectedValue: BentoListboxSelectedValue) => emit(BentoFilterEvent.UPDATE, selectedValue);\n\n const tagItems = computed(() =>\n props?.options?.listboxItems?.map(({ label, value, variant }) => ({ label, value, data: variant }))\n );\n const countryOptions = computed(() => ({\n ...props.options,\n listboxItems: tagItems.value,\n }));\n\n return {\n // Values\n countryOptions,\n\n // Methods\n onUpdate,\n\n // Enums\n BentoFilterEvent,\n };\n },\n });\n</script>\n","<template>\n <filter-bar-button-group\n v-if=\"!onlySlot\"\n v-bento-tooltip-directive:[options?.tooltipPosition]=\"options?.tooltipText\"\n :skip-grouping=\"!internalValue\"\n >\n <filter-bar-button\n :aria-pressed=\"internalValue ? 'true' : 'false'\"\n :active=\"internalValue\"\n :disabled=\"disabled\"\n @click=\"toggleFilter\"\n >\n <div class=\"b-toggle-filter\">\n {{ label }}\n <checkmark-icon v-show=\"internalValue\" aria-hidden=\"true\" class=\"b-toggle-filter__checkmark\" />\n </div>\n </filter-bar-button>\n\n <filter-bar-button\n v-if=\"internalValue\"\n :aria-label=\"t('resetFilter', { filterName: label })\"\n :disabled=\"disabled\"\n :active=\"internalValue\"\n @click=\"resetFilter\"\n >\n <template #iconLeft>\n <cross-small-icon aria-hidden=\"true\" />\n </template>\n </filter-bar-button>\n </filter-bar-button-group>\n\n <label v-else class=\"b-toggle-filter__only-slot\" :class=\"onlySlotConditionalClasses\">\n <checkbox-input\n :aria-labelledby=\"checkboxLabelId\"\n :aria-describedby=\"checkboxDescriptionId\"\n :disabled=\"disabled\"\n class=\"b-toggle-filter__checkbox\"\n :model-value=\"internalValue\"\n @update:model-value=\"onInput\"\n ></checkbox-input>\n <div class=\"b-toggle-filter__content\">\n <bento-typography :id=\"checkboxLabelId\" variant=\"title\" medium>{{ label }}</bento-typography>\n <bento-typography v-if=\"description\" :id=\"checkboxDescriptionId\">{{ description }}</bento-typography>\n </div>\n </label>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, watch } from 'vue';\n import { BentoTooltipDirective as vBentoTooltipDirective } from '@/directives/tooltip/tooltip';\n import { FilterBarButtonGroup } from '../filter-bar-button-group';\n import { FilterBarButton } from '../filter-bar-button';\n import { type BentoToggleFilterProps, type BentoToggleFilterValue } from './toggle-filter.types';\n import { CheckboxInput } from '@/internal/checkbox-input';\n import { BentoTypography } from '@/components/typography';\n import { generateUid } from '@/utils/ts/generate-uid';\n import { useI18n } from '@/utils/ts/i18n';\n import CheckmarkIcon from '@adyen/ui-assets-icons-16/vue/checkmark';\n import CrossSmallIcon from '@adyen/ui-assets-icons-16/vue/cross-small';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n /**\n * IDs used for the checkbox a11y\n */\n const checkboxLabelId = generateUid('toggle-filter-checkbox-label');\n const checkboxDescriptionId = generateUid('toggle-filter-checkbox-description');\n\n const props = defineProps({\n description: null,\n disabled: { type: Boolean, default: false },\n field: null,\n label: null,\n onlySlot: { type: Boolean, default: false },\n options: { default: undefined },\n value: { type: Boolean, default: false }\n});\n\n const emit = defineEmits([\"input\", \"update\"]);\n\n /**\n * Toggle internal field in sync with props.value\n */\n const internalValue = ref<BentoToggleFilterValue>(props.value);\n watch(\n () => props.value,\n value => {\n internalValue.value = value;\n }\n );\n\n const onlySlotConditionalClasses = computed(() => ({\n 'b-toggle-filter__only-slot--disabled': props.disabled,\n }));\n\n /**\n * Used only for the checkbox.\n * Input emitted for the `all filters` modal\n * @param value new checkbox value\n */\n const onInput = (value: BentoToggleFilterValue) => {\n internalValue.value = value;\n emit('input', { ...props, value });\n };\n\n /**\n * Applies the filter.\n * Update emitted for the filter bar. Updates all props\n */\n const updateProps = () => {\n emit('update', { ...props, value: internalValue.value });\n };\n\n /**\n * Toggles filter with the main part (left side button)\n */\n const toggleFilter = () => {\n internalValue.value = !internalValue.value;\n updateProps();\n };\n\n /**\n * Resets filter with the main part (left side button).\n * Has no persistent filter functionality.\n */\n const resetFilter = () => {\n internalValue.value = false;\n updateProps();\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * Toggle filter.\n *\n * @example\n * import { BentoToggleFilter } from './toggle-filter';\n *\n * export default {\n * components: { BentoToggleFilter },\n * template: `\n * <bento-toggle-filter\n * label=\"Toggle filter\"\n * field=\"toggle-filter\"\n * only-slot\n * disabled\n * :value=\"true\"\n * :tooltip-text=\"Tooltip text\"\n * tooltip-position=\"top\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-toggle-filter',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./toggle-filter.scss\" />\n","<template>\n <bento-base-filter\n v-bind=\"$props\"\n :value=\"translatedValue\"\n :default-value=\"translatedDefaultValue\"\n :button-label=\"buttonLabel\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :disable-apply-button=\"isApplyButtonDisabled\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :only-slot=\"onlySlot\"\n :tooltip-position=\"options?.tooltipPosition\"\n :tooltip-text=\"options?.tooltipText\"\n @apply=\"updateFilter\"\n @clear=\"clearFilter\"\n @open=\"openFilter\"\n @reset=\"resetFilter\"\n >\n <div class=\"b-boolean-filter\" :class=\"conditionalClasses\" @keydown.enter=\"updateFilter\">\n <bento-radio-group\n :items=\"items\"\n :label=\"label\"\n :model-value=\"internalFilterValue\"\n :disabled=\"disabled\"\n hide-label\n @update:model-value=\"onInput\"\n ></bento-radio-group>\n </div>\n </bento-base-filter>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onBeforeUpdate, onMounted, type PropType } from 'vue';\n import { BentoBaseFilter, useBaseFilter } from '@/components/filter-bar/components/base-filter';\n import { BentoRadioGroup } from '@/components/radio-group';\n import { useI18n } from '@/utils/ts/i18n';\n import { truncate } from '@/utils/ts/truncate';\n import { deprecate } from '@/utils/ts/deprecate';\n import { type BentoBooleanFilterOptions, BentoFilterEvent } from '../../filter-bar.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Boolean filter\n *\n * @deprecated Since v2.0.0. Use `BentoFilterItemType.RADIO_GROUP` instead.\n *\n * @example\n * import { BentoBooleanFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoBooleanFilter },\n * template: `\n * <bento-boolean-filter>\n * ...Example code of the component\n * </bento-boolean-filter>\n * `\n * }\n */\n export default defineComponent({\n name: 'bento-boolean-filter',\n i18n: { messages },\n components: { BentoBaseFilter, BentoRadioGroup },\n props: {\n /**\n * Disables the filter from being interacted with.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Default value of the filter to reset to.\n */\n defaultValue: { type: [String, Boolean], default: null },\n\n /**\n * Filter name/key referencing the actual property name in the data set.\n * Should be unique per filter bar.\n */\n field: { type: String, required: true },\n\n /**\n * Label text to be displayed\n */\n label: { type: String, required: true },\n\n /**\n * Current value of the filter\n */\n value: { type: [String, Boolean], default: null },\n\n /**\n * Renders the base filter's slot content only - leaving out the button and the popover.\n * Used for the allFiltersModal component.\n */\n onlySlot: { type: Boolean, default: false },\n\n /**\n * List of options that are needed to setup the filter\n * Available options:\n * - positiveOption: The positive option label/value\n * - negativeOption: The positive option label/value\n * - tooltipPosition: The position of the tooltip attached to the filter button\n * - tooltipText: The content of the tooltip attached to the filter button\n */\n options: {\n type: Object as PropType<BentoBooleanFilterOptions>,\n default: undefined,\n },\n },\n emits: [BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE],\n setup(props, { emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n /**\n * Translates a value, that possibly is a boolean, always to a string.\n */\n const translateBooleanToString = (aStringOrBooleanValue?: string | boolean) => {\n if (typeof aStringOrBooleanValue === 'boolean') {\n return aStringOrBooleanValue?.toString();\n }\n return aStringOrBooleanValue;\n };\n\n /**\n * Translates a value that back to a boolean if the value property was given as a boolean.\n */\n const translateBackToOriginalValueType = (aStringOrBooleanValue: string | boolean) => {\n if (\n props?.options?.positiveOption?.value !== undefined &&\n props?.options?.negativeOption?.value !== undefined &&\n typeof props.options.positiveOption.value === 'boolean' &&\n typeof props.options.negativeOption.value === 'boolean' &&\n typeof aStringOrBooleanValue === 'string'\n ) {\n return aStringOrBooleanValue === 'true';\n }\n return aStringOrBooleanValue;\n };\n\n const translatedDefaultValue = computed(() => translateBooleanToString(props.defaultValue));\n const translatedValue = computed(() => translateBooleanToString(props.value));\n const items = computed(() => {\n if (props.options && props.options.positiveOption && props.options.negativeOption) {\n return [\n {\n ...props.options.positiveOption,\n value: translateBooleanToString(props.options.positiveOption.value),\n },\n {\n ...props.options.negativeOption,\n value: translateBooleanToString(props.options.negativeOption.value),\n },\n ];\n }\n return [\n { value: 'yes', label: t('yes') as string },\n { value: 'no', label: t('no') as string },\n ];\n });\n\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } = useBaseFilter(\n translatedValue,\n translatedDefaultValue\n );\n\n const buttonLabel = computed(() => props.label);\n const buttonSecondaryLabel = computed(() =>\n truncate(items.value.find(({ value }) => value === translatedValue.value)?.label, 12)\n );\n\n const conditionalClasses = computed(() => ({\n [`b-boolean-filter--only-slot`]: props.onlySlot,\n }));\n\n onBeforeUpdate(() => {\n // Set value to null when the value is unset\n if (!internalFilterValue.value) {\n internalFilterValue.value = null;\n }\n });\n\n const onInput = event => {\n internalFilterValue.value = event;\n emit(BentoFilterEvent.INPUT, {\n ...props,\n value: translateBackToOriginalValueType(internalFilterValue.value),\n });\n };\n\n const openFilter = () => {\n internalFilterValue.value = translatedValue.value;\n };\n\n const updateFilter = () => {\n emit(BentoFilterEvent.UPDATE, {\n ...props,\n value: translateBackToOriginalValueType(internalFilterValue.value),\n });\n };\n\n const resetFilter = () => emit(BentoFilterEvent.UPDATE, { ...props, value: props.defaultValue });\n\n const clearFilter = () => {\n internalFilterValue.value = null;\n updateFilter();\n };\n\n /**\n * Deprecations\n */\n\n onMounted(() => {\n deprecate(\n 'Boolean filter \"BentoFilterItemType.BOOLEAN\"',\n `Use the Radio group filter type \"BentoFilterItemType.RADIO_GROUP\" instead.`,\n '2.0.0'\n );\n });\n\n return {\n // Values\n items,\n conditionalClasses,\n buttonLabel,\n buttonSecondaryLabel,\n internalFilterValue,\n isApplyButtonDisabled,\n isSecondaryButtonDisabled,\n translatedValue,\n translatedDefaultValue,\n\n // Events\n onInput,\n updateFilter,\n clearFilter,\n openFilter,\n resetFilter,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./boolean-filter.scss\" />\n","import { computed, nextTick, ref, unref, watch } from 'vue';\nimport type { NumericInputEvent, NumericKeyDownEvent, UseNumericInputOptions } from './use-numeric-input.types';\nimport { useI18n } from '@/utils/ts/i18n';\n\nconst isDigit = (value: string) => /^\\d$/.test(value);\n\n/**\n * Composable to handle localized numeric input with live formatting and caret management.\n */\nexport function useNumericInput(options: UseNumericInputOptions) {\n const { value, onInput } = options;\n const prettyOutput = computed(() => unref(options.prettyOutput) ?? false);\n const { n, locale } = useI18n();\n\n const inputRef = ref<HTMLInputElement | null>(null);\n const isFocused = ref(false);\n const negative = ref(false);\n const focusedDecimalPart = ref<string | null>(null);\n const privateValue = ref<number | null>(null);\n\n // Detect locale-specific separators\n const decimalSeparator = computed(() => {\n const parts = new Intl.NumberFormat(locale.value, { style: 'decimal' }).formatToParts(0.1);\n return parts.find(p => p.type === 'decimal')?.value || '.';\n });\n\n const maximumFractionDigits = computed(() => {\n return new Intl.NumberFormat(locale.value, { style: 'decimal' }).resolvedOptions().maximumFractionDigits;\n });\n\n const invalidPattern = computed(() => new RegExp(`[^\\\\d${decimalSeparator.value}]`, 'g'));\n\n const getEventTargetValue = (event: NumericInputEvent) => {\n if (typeof event === 'string') {\n return event.trim();\n }\n\n const target = event.target as HTMLInputElement | { value?: string } | null | undefined;\n return target?.value?.trim() ?? '';\n };\n\n // Sanitize once, then keep both the numeric value and the typed decimal text.\n const parseInputValue = (inputValue: string) => {\n const isNegative = inputValue.startsWith('-');\n const sanitizedValue = inputValue.slice(isNegative ? 1 : 0).replace(invalidPattern.value, '');\n const decimalSeparatorIndex = sanitizedValue.indexOf(decimalSeparator.value);\n const hasSingleDecimalSeparator =\n decimalSeparatorIndex !== -1 &&\n decimalSeparatorIndex === sanitizedValue.lastIndexOf(decimalSeparator.value);\n // Only preserve partial decimals when there is exactly one separator; \"1..2\" should stay invalid.\n const decimalPart = hasSingleDecimalSeparator\n ? sanitizedValue.slice(decimalSeparatorIndex + decimalSeparator.value.length)\n : null;\n // Intl decimal formatting caps fractions by default; mirror that for continued typing past the limit.\n const shouldCapDecimalPart = prettyOutput.value && isFocused.value && focusedDecimalPart.value !== null;\n const cappedDecimalPart =\n shouldCapDecimalPart && decimalPart !== null\n ? decimalPart.slice(0, maximumFractionDigits.value)\n : decimalPart;\n const cappedSanitizedValue =\n cappedDecimalPart !== null\n ? `${sanitizedValue.slice(0, decimalSeparatorIndex)}${decimalSeparator.value}${cappedDecimalPart}`\n : sanitizedValue;\n const normalizedValue =\n decimalSeparator.value === '.'\n ? cappedSanitizedValue\n : cappedSanitizedValue.split(decimalSeparator.value).join('.');\n const numberValue = normalizedValue.length > 0 ? Number(normalizedValue) : null;\n const shouldPreserveNegative =\n isNegative &&\n (Number.isFinite(numberValue) ||\n sanitizedValue.length === 0 ||\n (hasSingleDecimalSeparator && sanitizedValue.slice(0, decimalSeparatorIndex).length === 0));\n\n return {\n decimalPart: cappedDecimalPart,\n isNegative: shouldPreserveNegative,\n numberValue: Number.isFinite(numberValue) ? numberValue : null,\n };\n };\n\n /**\n * Formats a raw number for display according to the locale.\n */\n const getOutputValue = (val: number): string => {\n if (!prettyOutput.value) {\n return String(val);\n }\n return n(val, { style: 'decimal' });\n };\n\n const getFocusedOutputValue = (val: number): string => {\n const integerValue = Math.trunc(val);\n const formattedInteger = prettyOutput.value ? n(integerValue, { style: 'decimal' }) : String(integerValue);\n return `${formattedInteger}${decimalSeparator.value}${focusedDecimalPart.value}`;\n };\n\n const displayValue = computed(() => {\n if (privateValue.value === null) {\n if (isFocused.value && negative.value) {\n return focusedDecimalPart.value !== null\n ? `-${decimalSeparator.value}${focusedDecimalPart.value}`\n : '-';\n }\n\n return '';\n }\n\n const formattedValue =\n isFocused.value && focusedDecimalPart.value !== null\n ? getFocusedOutputValue(privateValue.value)\n : getOutputValue(privateValue.value);\n\n return negative.value ? `-${formattedValue}` : formattedValue;\n });\n\n /**\n * Updates the internal state and emits the new value.\n */\n const setValue = (inputValue: string) => {\n const { decimalPart, isNegative, numberValue } = parseInputValue(inputValue);\n\n negative.value = isNegative;\n // Keep the typed fractional part while focused: Number('1.') and Number('1.0') both collapse to 1.\n focusedDecimalPart.value = decimalPart;\n\n if (numberValue !== null) {\n privateValue.value = numberValue;\n const finalValue = negative.value ? -numberValue : numberValue;\n onInput?.(finalValue);\n } else {\n privateValue.value = null;\n onInput?.(null);\n }\n };\n\n // Synchronize external value changes\n watch(\n value,\n newValue => {\n const isNumber = typeof newValue === 'number';\n const isNegative = isNumber && (newValue < 0 || Object.is(newValue, -0));\n const absValue = isNumber ? Math.abs(newValue) : null;\n\n if (privateValue.value !== absValue || negative.value !== isNegative) {\n negative.value = isNegative;\n focusedDecimalPart.value = null;\n privateValue.value = absValue;\n }\n },\n { immediate: true }\n );\n\n /* Caret Management */\n\n const getCaretPosition = () => {\n return inputRef.value?.selectionStart || 0;\n };\n\n const setCaretPosition = (pos: number) => {\n if (inputRef.value) {\n inputRef.value.setSelectionRange(pos, pos);\n }\n };\n\n const getDigitsBeforeCaret = (fieldValue: string, caretPosition: number) => {\n let digits = 0;\n for (let i = 0; i < caretPosition; i++) {\n if (isDigit(fieldValue[i])) {\n digits++;\n }\n }\n return digits;\n };\n\n const setCaretAfterNthDigit = (nDigits: number) => {\n let digits = 0;\n let position = 0;\n const currentDisplay = displayValue.value;\n\n if (currentDisplay.length) {\n while (digits < nDigits && position < currentDisplay.length) {\n if (isDigit(currentDisplay[position])) {\n digits++;\n }\n position++;\n }\n }\n setCaretPosition(position);\n };\n\n const handlePrettyInput = async (inputValue: string) => {\n const oldCaretPosition = getCaretPosition();\n const isInputAtTheEnd = oldCaretPosition === inputValue.length;\n\n if (!isInputAtTheEnd) {\n const nDigitsBefore = getDigitsBeforeCaret(inputValue, oldCaretPosition);\n setValue(inputValue);\n await nextTick();\n setCaretAfterNthDigit(nDigitsBefore);\n } else {\n setValue(inputValue);\n }\n };\n\n /* Public Handlers */\n\n const handleInput = (event: NumericInputEvent) => {\n const inputValue = getEventTargetValue(event);\n\n if (prettyOutput.value && isFocused.value) {\n handlePrettyInput(inputValue);\n } else {\n setValue(inputValue);\n }\n\n // We don't emit or store letters that the user types in the input.\n // However, Vue doesn't strip them away either, so we need to force it.\n // In Composition API, we can manually sync the input value.\n if (inputRef.value && inputRef.value.value !== displayValue.value) {\n inputRef.value.value = displayValue.value;\n }\n };\n\n const handleKeyDown = (event: NumericKeyDownEvent) => {\n const target = event.target as\n | HTMLInputElement\n | { value?: string; selectionStart?: number | null; selectionEnd?: number | null }\n | null\n | undefined;\n\n if (!target) {\n return;\n }\n\n // Avoid invalid partial numbers such as \".\" or \"1..\".\n if (event.key === decimalSeparator.value) {\n const selectionStart = target.selectionStart ?? 0;\n const selectionEnd = target.selectionEnd ?? 0;\n const targetValue = target.value ?? '';\n const valueWithoutSelection = targetValue.slice(0, selectionStart) + targetValue.slice(selectionEnd);\n\n if (!valueWithoutSelection || valueWithoutSelection.includes(decimalSeparator.value)) {\n event.preventDefault?.();\n }\n }\n };\n\n return {\n inputRef,\n displayValue,\n isFocused,\n handleInput,\n handleKeyDown,\n onFocus: () => {\n isFocused.value = true;\n },\n onBlur: () => {\n isFocused.value = false;\n focusedDecimalPart.value = null;\n },\n };\n}\n","<template>\n <bento-base-filter\n v-bind=\"props\"\n :disable-apply-button=\"isApplyButtonDisabled\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :button-label=\"buttonLabel\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :only-slot=\"props.onlySlot\"\n :tooltip-position=\"props.options?.tooltipPosition\"\n :tooltip-text=\"props.options?.tooltipText\"\n @apply=\"updateFilter\"\n @clear=\"clearFilter\"\n @open=\"openFilter\"\n @reset=\"resetFilter\"\n >\n <div class=\"b-range-filter\" :class=\"conditionalClasses\" @keydown.enter=\"updateFilter\">\n <bento-input-field\n ref=\"fromFieldRef\"\n :model-value=\"displayFrom\"\n type=\"text\"\n inputmode=\"numeric\"\n :aria-label=\"t('from').toString()\"\n :disabled=\"props.disabled\"\n @update:model-value=\"handleModelValueFrom\"\n @keydown=\"handleKeyDownFrom\"\n @focus=\"onFocusFrom\"\n @blur=\"onBlurFrom\"\n >\n {{ t('from') }}\n </bento-input-field>\n <bento-input-field\n ref=\"toFieldRef\"\n class=\"b-range-filter__input-field\"\n :model-value=\"displayTo\"\n type=\"text\"\n inputmode=\"numeric\"\n :aria-label=\"t('to')\"\n :disabled=\"props.disabled\"\n @update:model-value=\"handleModelValueTo\"\n @keydown=\"handleKeyDownTo\"\n @focus=\"onFocusTo\"\n @blur=\"onBlurTo\"\n >\n {{ t('to') }}\n </bento-input-field>\n </div>\n </bento-base-filter>\n</template>\n\n<script lang=\"ts\">\n /**\n * Range filter used in the filter-bar component.\n *\n * @example\n * import { BentoRangeFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoRangeFilter },\n * template: `\n * <bento-range-filter field=\"filter-field\" label=\"Filter label\" value=\"['0', '1']\"/>\n * `\n * }\n */\n export default {\n name: 'bento-range-filter',\n i18n: { messages },\n };\n</script>\n\n<script setup lang=\"ts\">\n import { computed, nextTick, onMounted, ref, toRef, watch } from 'vue';\n import { BentoFilterEvent } from '../../filter-bar.types';\n import type { BentoRangeFilterProps, BentoRangeFilterValue } from './range-filter.types';\n import { BentoBaseFilter, useBaseFilter } from '@/components/filter-bar/components/base-filter';\n import { BentoInputField, type BentoInputFieldValue } from '@/components/input-field';\n import { truncate } from '@/utils/ts/truncate';\n import { useI18n } from '@/utils/ts/i18n';\n import { useNumericInput } from '@/composables/use-numeric-input/use-numeric-input';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n interface RangeFilterInputField {\n inputFieldElement: HTMLInputElement | null;\n focusInput: () => void;\n }\n\n const props = defineProps({\n disabled: { type: Boolean, default: false },\n defaultValue: { default: null },\n field: null,\n label: null,\n value: { default: () => ['', ''] },\n onlySlot: { type: Boolean, default: false },\n options: { default: undefined }\n});\n\n const emit = defineEmits([BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE]);\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n const fromFieldRef = ref<RangeFilterInputField | null>(null);\n const toFieldRef = ref<RangeFilterInputField | null>(null);\n\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } =\n useBaseFilter<BentoRangeFilterValue>(toRef(props, 'value'), toRef(props, 'defaultValue'));\n\n const fromNum = ref<number | null>(null);\n const toNum = ref<number | null>(null);\n const stringifyInputValue = (val: number | null) =>\n val !== null ? (Object.is(val, -0) ? '-0' : val.toString()) : '';\n\n const {\n displayValue: displayFrom,\n handleInput: handleInputFrom,\n handleKeyDown: handleKeyDownFrom,\n onFocus: onFocusFrom,\n onBlur: onBlurFrom,\n inputRef: inputRefFrom,\n } = useNumericInput({\n value: fromNum,\n prettyOutput: true,\n onInput: val => {\n const currentValue = internalFilterValue.value ?? ['', ''];\n internalFilterValue.value = [stringifyInputValue(val), currentValue[1]];\n onInput();\n },\n });\n const handleModelValueFrom = (val: BentoInputFieldValue) => handleInputFrom(String(val));\n\n const {\n displayValue: displayTo,\n handleInput: handleInputTo,\n handleKeyDown: handleKeyDownTo,\n onFocus: onFocusTo,\n onBlur: onBlurTo,\n inputRef: inputRefTo,\n } = useNumericInput({\n value: toNum,\n prettyOutput: true,\n onInput: val => {\n const currentValue = internalFilterValue.value ?? ['', ''];\n internalFilterValue.value = [currentValue[0], stringifyInputValue(val)];\n onInput();\n },\n });\n const handleModelValueTo = (val: BentoInputFieldValue) => handleInputTo(String(val));\n\n onMounted(() => {\n inputRefFrom.value = fromFieldRef.value?.inputFieldElement ?? null;\n inputRefTo.value = toFieldRef.value?.inputFieldElement ?? null;\n });\n\n watch(\n () => internalFilterValue.value,\n newVal => {\n const nextFrom = newVal?.[0] ? parseFloat(newVal[0]) : null;\n const nextTo = newVal?.[1] ? parseFloat(newVal[1]) : null;\n\n if (fromNum.value !== nextFrom) {\n fromNum.value = nextFrom;\n }\n if (toNum.value !== nextTo) {\n toNum.value = nextTo;\n }\n },\n { immediate: true }\n );\n\n const truncatedRangeValues = computed(() => {\n if (!props.value?.[0] && !props.value?.[1]) {\n return null;\n }\n\n // Set prefix is one range value is not set\n let prefix = '';\n if (!props.value?.[0]) {\n prefix = '≤';\n } else if (!props.value?.[1]) {\n prefix = '≥';\n }\n\n const fromVal = props.value?.[0] ? parseFloat(props.value[0]) : null;\n const toVal = props.value?.[1] ? parseFloat(props.value[1]) : null;\n\n const rangeFromLabel = fromVal !== null ? n(fromVal, { style: 'decimal' }) : '';\n const seperator = props.value?.[0] && props.value?.[1] ? ' - ' : '';\n const rangeToLabel = toVal !== null ? n(toVal, { style: 'decimal' }) : '';\n\n return `${prefix}${truncate(rangeFromLabel, 10)}${seperator}${truncate(rangeToLabel, 10)}`;\n });\n const buttonLabel = computed(() => props.label);\n const buttonSecondaryLabel = computed(() => truncatedRangeValues.value);\n\n const conditionalClasses = computed(() => ({\n [`b-range-filter--only-slot`]: props.onlySlot,\n }));\n\n const openFilter = () => {\n internalFilterValue.value = props.value;\n\n nextTick(() => fromFieldRef.value?.focusInput());\n };\n\n const onInput = () => {\n emit(BentoFilterEvent.INPUT, { ...props, value: internalFilterValue.value });\n };\n\n const updateFilter = () => {\n if (!internalFilterValue.value?.some(x => x)) {\n // If both range values are empty,\n // If persistent filter, reset back to default value, else reset back to undefined\n internalFilterValue.value = props.defaultValue !== null ? props.defaultValue : undefined;\n }\n emit(BentoFilterEvent.UPDATE, {\n ...props,\n value: internalFilterValue.value,\n });\n };\n\n const resetFilter = () => emit(BentoFilterEvent.UPDATE, { ...props, value: props.defaultValue });\n\n const clearFilter = () => {\n internalFilterValue.value = ['', ''];\n updateFilter();\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./range-filter.scss\" />\n","<template>\n <bento-base-filter\n v-bind=\"$props\"\n :applied-filters-count=\"appliedFiltersCount\"\n :button-label=\"buttonLabel\"\n :button-secondary-label=\"buttonSecondaryLabel\"\n :disable-apply-button=\"isApplyButtonDisabled\"\n :disable-secondary-button=\"isSecondaryButtonDisabled\"\n :tooltip-position=\"options?.tooltipPosition\"\n :tooltip-text=\"options?.tooltipText\"\n @apply=\"updateFilter(internalFilterValue)\"\n @clear=\"clearFilter(updateFilter)\"\n @open=\"openFilter\"\n @reset=\"resetFilter(updateFilter)\"\n >\n <div\n class=\"b-checkbox-group-filter\"\n :class=\"conditionalClasses\"\n @keydown.enter=\"updateFilter(internalFilterValue)\"\n >\n <bento-checkbox-group\n :model-value=\"internalFilterValue\"\n :items=\"options?.checkboxItems\"\n :label=\"label\"\n :disabled=\"disabled\"\n hide-label\n @update:model-value=\"onModelValueUpdate\"\n />\n </div>\n </bento-base-filter>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, toRef, watch } from 'vue';\n import BentoCheckboxGroup from '../../../checkbox/components/checkbox-group/checkbox-group.vue';\n import { BentoBaseFilter } from '../base-filter';\n import { useBentoBaseFilter } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import { truncate } from '@/utils/ts/truncate';\n import {\n type BentoCheckboxGroupFilterProps,\n type BentoCheckboxGroupFilterValue,\n } from './checkbox-group-filter.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const props = defineProps({\n disabled: { type: Boolean, default: false },\n defaultValue: { default: undefined },\n field: null,\n label: null,\n onlySlot: { type: Boolean, default: false },\n options: { default: undefined },\n value: { default: undefined }\n});\n\n const emit = defineEmits([\"input\", \"update\"]);\n\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const {\n internalFilterValue,\n isSecondaryButtonDisabled,\n isApplyButtonDisabled,\n clearFilter,\n resetFilter,\n openFilter,\n } = useBentoBaseFilter<BentoCheckboxGroupFilterValue>(toRef(props, 'value'), toRef(props, 'defaultValue'));\n\n const displayedValues = ref<BentoCheckboxGroupFilterValue>(internalFilterValue.value ?? []);\n watch(\n () => props.value,\n newValue => {\n displayedValues.value = newValue ?? [];\n }\n );\n\n const conditionalClasses = computed(() => ({\n [`b-checkbox-group-filter--only-slot`]: props.onlySlot,\n }));\n\n const buttonLabel = computed(() => props.label);\n\n const buttonSecondaryLabel = computed(() =>\n displayedValues.value.length === 1\n ? truncate(\n props.options?.checkboxItems.find(item => displayedValues.value[0] === item.value)?.label ?? '',\n 12\n )\n : null\n );\n\n const appliedFiltersCount = computed(() => {\n if (!displayedValues.value.length || buttonSecondaryLabel.value) {\n return null;\n }\n\n if (displayedValues.value.length === props.options?.checkboxItems.length) {\n return t('all');\n }\n\n return displayedValues.value.length;\n });\n\n const updateFilter = (value: BentoCheckboxGroupFilterValue) => {\n displayedValues.value = value ?? [];\n emit('update', { ...props, value });\n };\n\n const onModelValueUpdate = (value: BentoCheckboxGroupFilterValue) => {\n internalFilterValue.value = value;\n emit('input', { ...props, value: internalFilterValue.value });\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * The Checkbox Group filter displays a group of checkboxes that allows\n * to select multiple values.\n *\n * @example\n * import { BentoCheckboxGroupFilter } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoCheckboxGroupFilter },\n * template: `\n * <bento-checkbox-group-filter\n * :field=\"filter.field\"\n * :label=\"filter.label\"\n * :options=\"filter.options\"\n * :value=\"filter.value\"\n * @update=\"updateFilterHandler\"\n * />\n * `\n * }\n */\n export default {\n name: 'bento-checkbox-group-filter',\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./checkbox-group-filter.scss\" />\n","import { computed, type Ref, ref, shallowRef, watch } from 'vue';\nimport { FixedScroller } from '@/internal';\nimport { type BentoFilterBarContainerSizeLayout } from '../../filter-bar.types';\nimport { useResizeObserver } from '@vueuse/core';\n\nconst SMALL_SIZE_THRESHOLD = 430;\nconst LARGE_SIZE_THRESHOLD = 700;\n\n/**\n * Calculates the layout of the filter bar based on the options provided by the user\n * for each container size. This allows to hot-swap the container component from a \"div\" to the \"Fixed Scroller\"\n * to display a \"one-line\" to a \"multi-line\" layout.\n *\n * Container sizes:\n * - Large: >700\n * - Medium: >430 & <700\n * - Small: <430\n *\n * @param target Container element that has the container-query and can be resized.\n * @param containerSizeLayoutOptions User layout options for each container size\n * @returns Components and their respective classes that allows to swap between a wrap container and the fixed scroller.\n */\nexport function useContainerSizeOptionsLayout(\n target: Ref<HTMLDivElement>,\n containerSizeLayoutOptions: Ref<BentoFilterBarContainerSizeLayout>\n) {\n /**\n * Stores the Component to be rendered (\"div\" or \"fixed-scroller\") and\n * the classes required for each component to work/display correctly.\n * Uses `shallowRef` because component definitions should not be made\n * deeply reactive (Vue 3.5+ warns about this and it can cause infinite\n * update loops when the component's reactive proxy is rendered).\n */\n const screenLayoutComponent = shallowRef<'div' | typeof FixedScroller>('div');\n\n /**\n * Indicates if the layout is one-line based on the current\n * container size and the \"containerSizeLayoutOptions\" prop\n */\n const isOneLineLayout = ref(false);\n\n /**\n * Stores the container width.\n * Updated when the resize event on \"target\" happens\n */\n const containerWidth = ref<number>(0);\n\n /**\n * Indicates if the search bar should be inside or outside the \"Fixed scroller\".\n * Only needed for the \"Small\" size.\n *\n * Always indicates that the search bar should be inside the container.\n * Only outside if \"small\" & \"multi-line\".\n */\n const showSearchbarInsideContainer = computed<boolean>(() => {\n if (containerWidth.value < SMALL_SIZE_THRESHOLD && containerSizeLayoutOptions.value.small === 'multi-line') {\n return false;\n }\n\n return true;\n });\n\n /**\n * Sets the configuration (Component & classes)\n * required for the \"multi-line\" layout.\n */\n function setMultiLineConfig() {\n isOneLineLayout.value = false;\n screenLayoutComponent.value = 'div';\n }\n\n /**\n * Sets the configuration (Component & classes)\n * required for the \"one-line\" layout\n */\n function setOneLineConfig() {\n isOneLineLayout.value = true;\n screenLayoutComponent.value = FixedScroller;\n }\n\n /**\n * Sets the configuration required for given the current\n * container size (Large, Medium, Small)\n */\n function calculateConfig() {\n if (containerWidth.value >= LARGE_SIZE_THRESHOLD) {\n // Large screen: customizable, defaults to multi-line\n if (containerSizeLayoutOptions.value?.large === 'one-line') {\n setOneLineConfig();\n } else {\n setMultiLineConfig();\n }\n } else if (containerWidth.value >= SMALL_SIZE_THRESHOLD) {\n // Medium screen: customizable, defaults to one-line\n if (containerSizeLayoutOptions.value?.medium === 'multi-line') {\n setMultiLineConfig();\n } else {\n setOneLineConfig();\n }\n } else {\n // Small screen: always one-line (the \"small\" prop only controls search bar placement)\n setOneLineConfig();\n }\n }\n\n /**\n * Allows the component to be reactive.\n * It updates configuration if the options are changed.\n */\n watch(() => containerSizeLayoutOptions.value, calculateConfig);\n\n useResizeObserver(target, entries => {\n // Observing only one entry.\n // Updated every time a resize occurs\n containerWidth.value = entries[0].contentRect.width;\n\n // Calculate the config based on the new width.\n calculateConfig();\n });\n\n const isLargeLayout = computed(() => containerWidth.value >= LARGE_SIZE_THRESHOLD);\n const rootElementConditionalClasses = computed(() => ({ 'b-filter-bar--large-layout': isLargeLayout.value }));\n\n return {\n screenLayoutComponent,\n showSearchbarInsideContainer,\n isOneLineLayout,\n isLargeLayout,\n rootElementConditionalClasses,\n };\n}\n","import type { BentoFilterBarFilterWithValue, BentoFilterModel } from '../../filter-bar.types';\n\nexport enum AllFiltersModalEvent {\n INPUT = 'input',\n}\n\nexport interface BentoAllFiltersModalSelectedFilter extends BentoFilterBarFilterWithValue {\n labelId: string;\n}\n\nexport type BentoAllFiltersModalGetFilterCount = (filter: BentoFilterModel) => string | number | null;\n\nexport interface BentoAllFiltersModalButtonInstance {\n $el: HTMLElement;\n}\n\nexport interface BentoAllFiltersModalFilterSelectionInstance {\n focusFilter: (label: string) => void;\n}\n\nexport interface BentoAllFiltersModalSelectedFilterContentInstance {\n focusFirstInput: () => void;\n}\n\nexport interface BentoAllFiltersModalSelectedFilterInstance {\n $el: HTMLElement;\n}\n","<template>\n <base-button\n ref=\"baseFilterButtonRef\"\n class=\"b-base-filter-button\"\n :class=\"conditionalClasses\"\n :disabled=\"disabled\"\n :aria-label=\"computedAriaLabel\"\n :aria-controls=\"ariaAttributes['aria-controls']\"\n type=\"button\"\n @click=\"onClickButton\"\n >\n <div class=\"b-base-filter-button__default-container\">\n <div class=\"b-base-filter-button__label-container\">\n <bento-typography el=\"span\" variant=\"body\" :stronger=\"bold\" class=\"b-base-filter-button__label\">\n <slot />\n </bento-typography>\n </div>\n\n <div v-if=\"amountAppliedValues && !hasChevron\" class=\"b-base-filter-button__counter-wrapper\">\n <bento-typography class=\"b-base-filter-button__counter\" el=\"span\" variant=\"body\" stronger>\n {{ amountAppliedValues }}\n </bento-typography>\n </div>\n </div>\n <template v-if=\"hasChevron\" #iconRight>\n <chevron-up-icon v-if=\"isFilterOpen\" aria-hidden=\"true\" />\n <chevron-down-icon v-else aria-hidden=\"true\" />\n </template>\n </base-button>\n</template>\n\n<script lang=\"ts\">\n import { BentoTypography } from '@/components/typography';\n import { useAriaLabel } from '@/utils/ts/aria-label';\n import { useHasSlot } from '@/composables';\n import { computed, defineComponent, ref } from 'vue';\n import { BaseButton, BentoBaseButtonEvent } from '@/components/internal/base-button';\n import { getSlotText } from '@/utils/ts/get-slot-text';\n import ChevronUpIcon from '@adyen/ui-assets-icons-16/vue/chevron-up';\n import ChevronDownIcon from '@adyen/ui-assets-icons-16/vue/chevron-down';\n\n /**\n * A filter button used as a base to extend all sorts of filter buttons.\n * Used in the bento-filter-bar and all-filter-modals components.\n *\n * @usage\n * export default {\n * components: { BaseFilterButton },\n * template: `\n * <base-filter-button disabled>\n * Filter\n * </base-filter-button>\n * `,\n * }\n */\n export default defineComponent({\n name: 'base-filter-button',\n components: { BaseButton, BentoTypography, ChevronUpIcon, ChevronDownIcon },\n props: {\n /**\n * The number of applies values within the filter.\n * e.g. if 2 items in a dropdown filter have been applied, the number 2 will be shown here.\n */\n amountAppliedValues: { type: [Number, String], default: null },\n\n /**\n * Disables button functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Signifies if the filter is open or closed.\n */\n isFilterOpen: { type: Boolean, default: false },\n\n /**\n * Toggles if a chevron icon should be displayed in the button.\n * The chevron will change depending on the open state of the filter.\n */\n hasChevron: { type: Boolean, default: false },\n\n /**\n * Renders the text in a stronger variant.\n */\n bold: { type: Boolean, default: false },\n },\n emits: [BentoBaseButtonEvent.CLICK],\n setup(props, { slots, emit, attrs }) {\n const labelSlot = computed((): string => (slots.default ? getSlotText(slots)('default') : null));\n const computedAriaLabel = useAriaLabel({ ariaLabel: labelSlot });\n const baseFilterButtonRef = ref(null);\n\n const ariaAttributes = computed(() => ({\n 'aria-controls': attrs['aria-controls']?.toString() as string,\n }));\n\n const conditionalClasses = computed(() => ({\n [`b-base-filter-button--with-chevron`]: props.hasChevron,\n [`b-base-filter-button--filter-open`]: props.isFilterOpen,\n }));\n\n const onClickButton = () => {\n if (!props.disabled) {\n emit(BentoBaseButtonEvent.CLICK);\n }\n };\n\n return {\n // Values\n ariaAttributes,\n computedAriaLabel,\n conditionalClasses,\n\n // Methods\n onClickButton,\n hasSlot: useHasSlot(slots),\n\n // Refs\n baseFilterButtonRef,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./base-filter-button.scss\" />\n","<template>\n <base-filter-button\n class=\"b-all-filters-modal-button\"\n :class=\"conditionalClasses\"\n :amount-applied-values=\"appliedFiltersCount\"\n :is-filter-open=\"isFilterOpen\"\n :disabled=\"disabled\"\n @click=\"onClick\"\n >\n {{ label }}\n </base-filter-button>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent } from 'vue';\n import BaseFilterButton from '../../../base-filter-button/base-filter-button.vue';\n\n export default defineComponent({\n name: 'all-filters-modal-button',\n components: { BaseFilterButton },\n props: {\n /**\n * Button label to be displayed\n */\n label: { type: String, required: true },\n\n /**\n * Total count of applied filters\n */\n appliedFiltersCount: { type: [Number, String], default: null },\n\n /**\n * Indicates whether the filter popover tied to this button is showing\n */\n isFilterOpen: { type: Boolean, default: false },\n\n /**\n * Disables button functionality.\n */\n disabled: { type: Boolean, default: false },\n },\n emits: ['click'],\n setup(props, { emit }) {\n const conditionalClasses = computed(() => ({\n [`b-all-filters-modal-button--with-counter`]: props.appliedFiltersCount,\n [`b-all-filters-modal-button--filter-open`]: props.isFilterOpen,\n }));\n\n const onClick = () => {\n emit('click');\n };\n\n return {\n conditionalClasses,\n\n onClick,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./all-filters-modal-button.scss\" />\n","<template>\n <div\n class=\"b-all-filters-modal-filter-selection\"\n :class=\"conditionalClasses\"\n @keydown.right=\"$emit('keydown-right')\"\n >\n <bento-search-bar\n class=\"b-all-filters-modal-filter-selection__search-bar\"\n :value=\"searchTerm\"\n :input-field-aria-label=\"searchBarAriaLabel\"\n @input=\"$emit('update:search-term', $event)\"\n @clear=\"$emit('clear-search')\"\n />\n <div v-if=\"emptySearchMessage\" class=\"b-all-filters-modal-filter-selection__empty-search-message\">\n <bento-typography el=\"span\">{{ emptySearchMessage }}</bento-typography>\n </div>\n <div v-if=\"activeFilters.length\" class=\"b-all-filters-modal-filter-selection__filters-section\">\n <bento-typography\n :id=\"`active-filters-${screenIdPrefix}${uniqueId}`\"\n class=\"b-all-filters-modal-filter-selection__filters-section-title\"\n el=\"span\"\n variant=\"caption\"\n >\n {{ activeFiltersLabel }}\n </bento-typography>\n <ul\n class=\"b-all-filters-modal-filter-selection__filters-list\"\n :aria-labelledby=\"`active-filters-${screenIdPrefix}${uniqueId}`\"\n >\n <li v-for=\"item in activeFilters\" :key=\"`${item.label}-${item.field}`\">\n <all-filters-modal-button\n :ref=\"element => setFilterButtonRef(element, item.label)\"\n :label=\"item.label\"\n :applied-filters-count=\"getFilterCount(item)\"\n :is-filter-open=\"!smallScreen && selectedFilterLabel === item.label\"\n :disabled=\"item.disabled\"\n @click=\"$emit('select-filter', item.label, item.field)\"\n />\n </li>\n </ul>\n </div>\n <div v-if=\"otherFilters.length\" class=\"b-all-filters-modal-filter-selection__filters-section\">\n <bento-typography\n v-if=\"activeFilters.length\"\n :id=\"`other-filters-${screenIdPrefix}${uniqueId}`\"\n class=\"b-all-filters-modal-filter-selection__filters-section-title\"\n el=\"span\"\n variant=\"caption\"\n >\n {{ otherFiltersLabel }}\n </bento-typography>\n <ul\n class=\"b-all-filters-modal-filter-selection__filters-list\"\n :aria-labelledby=\"`other-filters-${screenIdPrefix}${uniqueId}`\"\n >\n <li v-for=\"item in otherFilters\" :key=\"`${item.label}-${item.field}`\">\n <all-filters-modal-button\n :ref=\"element => setFilterButtonRef(element, item.label)\"\n :label=\"item.label\"\n :disabled=\"item.disabled\"\n :applied-filters-count=\"getFilterCount(item)\"\n :is-filter-open=\"!smallScreen && selectedFilterLabel === item.label\"\n @click=\"$emit('select-filter', item.label, item.field)\"\n />\n </li>\n </ul>\n </div>\n <bento-button-actions\n v-if=\"smallScreen\"\n class=\"b-all-filters-modal-filter-selection__actions\"\n :actions=\"actions\"\n layout=\"vertical-stack\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, onBeforeUpdate, ref } from 'vue';\n\n import { BentoButtonActions } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n import BentoSearchBar from '@/components/search-bar/search-bar.vue';\n\n import { type BentoAllFiltersModalButtonInstance } from '../../all-filters-modal.types';\n import AllFiltersModalButton from '../all-filters-modal-button/all-filters-modal-button.vue';\n import {\n type BentoAllFiltersModalFilterSelectionEmits,\n type BentoAllFiltersModalFilterSelectionProps,\n } from './all-filters-modal-filter-selection.types';\n\n const props = defineProps({\n activeFilters: null,\n actions: { default: () => [] },\n activeFiltersLabel: null,\n emptySearchMessage: { default: '' },\n getFilterCount: { type: Function },\n otherFilters: null,\n otherFiltersLabel: null,\n selectedFilterLabel: null,\n searchBarAriaLabel: null,\n searchTerm: null,\n smallScreen: { type: Boolean, default: false },\n uniqueId: null\n});\n\n defineEmits([\"clear-search\", \"keydown-right\", \"select-filter\", \"update:search-term\"]);\n\n const conditionalClasses = computed(() => ({\n 'b-all-filters-modal-filter-selection--small-screen': props.smallScreen,\n }));\n\n const filterButtons = ref<Record<string, BentoAllFiltersModalButtonInstance>>({});\n\n const screenIdPrefix = computed(() => (props.smallScreen ? 'small-screen-' : ''));\n\n onBeforeUpdate(() => {\n filterButtons.value = {};\n });\n\n const setFilterButtonRef = (element: BentoAllFiltersModalButtonInstance | null, label: string) => {\n if (element) {\n filterButtons.value[label] = element;\n }\n };\n\n const focusFilter = (label: string) => {\n filterButtons.value[label]?.$el?.focus();\n };\n\n defineExpose({ focusFilter });\n</script>\n\n<script lang=\"ts\">\n export default {\n name: 'all-filters-modal-filter-selection',\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./all-filters-modal-filter-selection.scss\" />\n","<template>\n <div class=\"b-all-filters-modal-selected-filter\" :class=\"conditionalClasses\" @keydown.left=\"$emit('keydown-left')\">\n <div v-if=\"smallScreen || shouldShowFilterTitle\" class=\"b-all-filters-modal-selected-filter__text\">\n <bento-typography :id=\"selectedFilter.labelId\" el=\"div\" variant=\"title\" medium>\n {{ selectedFilter.label }}\n </bento-typography>\n <bento-typography v-if=\"selectedFilter.description\" el=\"div\" variant=\"body\" wide>\n {{ selectedFilter.description }}\n </bento-typography>\n </div>\n <div class=\"b-all-filters-modal-selected-filter__component\">\n <component\n :is=\"selectedFilter.type\"\n ref=\"selectedFilterRef\"\n :key=\"selectedFilter.field\"\n :description=\"selectedFilter.description\"\n :field=\"selectedFilter.field\"\n :label=\"selectedFilter.label\"\n :options=\"selectedFilter.options\"\n :value=\"selectedFilter.value\"\n :default-value=\"selectedFilter.defaultValue\"\n :only-slot=\"true\"\n :disabled=\"selectedFilter.disabled\"\n :aria-labelledby=\"selectedFilter.labelId\"\n @input=\"$emit('input', $event)\"\n />\n </div>\n <bento-button-actions\n v-if=\"smallScreen\"\n class=\"b-all-filters-modal-selected-filter__actions\"\n :actions=\"actions\"\n layout=\"vertical-stack\"\n />\n <div v-else class=\"b-all-filters-modal-selected-filter__clear-button\">\n <bento-button variant=\"secondary\" :disabled=\"isClearButtonDisabled\" @click=\"$emit('clear')\">\n {{ clearButtonLabel }}\n </bento-button>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref } from 'vue';\n\n import { BentoButton, BentoButtonActions, type BentoButtonActionsList } from '@/components/button';\n import { BentoTypography } from '@/components/typography';\n\n import { getNextFocusableElement } from '@/utils/ts/focus-trap.utils';\n\n import { type BentoFilterModel } from '@/components/filter-bar/filter-bar.types';\n import {\n type BentoAllFiltersModalSelectedFilter,\n type BentoAllFiltersModalSelectedFilterInstance,\n } from '../../all-filters-modal.types';\n\n const props = defineProps({\n actions: { default: () => [] },\n clearButtonLabel: null,\n isClearButtonDisabled: { type: Boolean },\n selectedFilter: null,\n smallScreen: { type: Boolean, default: false },\n shouldShowFilterTitle: { type: Boolean }\n});\n\n defineEmits([\"clear\", \"input\", \"keydown-left\"]);\n\n const conditionalClasses = computed(() => ({\n 'b-all-filters-modal-selected-filter--small-screen': props.smallScreen,\n }));\n\n const selectedFilterRef = ref<BentoAllFiltersModalSelectedFilterInstance | null>(null);\n\n const focusFirstInput = () => {\n const selectedFilterElement = selectedFilterRef.value?.$el;\n if (!selectedFilterElement) {\n return;\n }\n getNextFocusableElement(1, selectedFilterElement).focus();\n };\n\n defineExpose({ focusFirstInput });\n</script>\n\n<script lang=\"ts\">\n import {\n BentoBooleanFilter,\n BentoCheckboxGroupFilter,\n BentoDateFilter,\n BentoDateRangeFilter,\n BentoInputFilter,\n BentoInputWithDropdownFilter,\n BentoRadioGroupFilter,\n BentoRangeFilter,\n BentoSelectAvatarFilter,\n BentoSelectCountryFilter,\n BentoSelectCurrencyFilter,\n BentoSelectFilter,\n BentoSelectPaymentMethodFilter,\n BentoSelectTagFilter,\n BentoToggleFilter,\n } from '../../../index';\n\n export default {\n name: 'all-filters-modal-selected-filter',\n components: {\n BentoBooleanFilter,\n BentoCheckboxGroupFilter,\n BentoDateFilter,\n BentoDateRangeFilter,\n BentoInputFilter,\n BentoInputWithDropdownFilter,\n BentoRadioGroupFilter,\n BentoRangeFilter,\n BentoSelectAvatarFilter,\n BentoSelectCountryFilter,\n BentoSelectCurrencyFilter,\n BentoSelectFilter,\n BentoSelectPaymentMethodFilter,\n BentoSelectTagFilter,\n BentoToggleFilter,\n },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./all-filters-modal-selected-filter.scss\" />\n","\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=\"#001222\" d=\"M12.6465 4.58337C12.32 3.42912 11.2588 2.58337 10 2.58337C8.74122 2.58337 7.67998 3.42912 7.35352 4.58337H1.25V6.08337H7.35352C7.67998 7.23763 8.74122 8.08337 10 8.08337C11.2588 8.08337 12.32 7.23763 12.6465 6.08337H14.75V4.58337H12.6465ZM11.25 5.33337C11.25 6.02373 10.6904 6.58337 10 6.58337C9.30964 6.58337 8.75 6.02373 8.75 5.33337C8.75 4.64302 9.30964 4.08337 10 4.08337C10.6904 4.08337 11.25 4.64302 11.25 5.33337Z\"/><path fill=\"#001222\" d=\"M4 7.91687C5.25878 7.91687 6.32002 8.76262 6.64648 9.91687H14.75V11.4169H6.64648C6.32002 12.5711 5.25878 13.4169 4 13.4169C2.48122 13.4169 1.25 12.1857 1.25 10.6669C1.25 9.14809 2.48122 7.91687 4 7.91687ZM5.25 10.6669C5.25 9.97651 4.69036 9.41687 4 9.41687C3.30964 9.41687 2.75 9.97651 2.75 10.6669C2.75 11.3572 3.30964 11.9169 4 11.9169C4.69036 11.9169 5.25 11.3572 5.25 10.6669Z\"/></svg>\n</template>\n<script setup>\n import { getCurrentInstance } from 'vue';\n import '../css/main.css';\n\n const instance = getCurrentInstance();\n const uuid = String(instance?.uid ?? instance?.proxy?._uid);\n</script>\n","<template>\n <div class=\"b-all-filters-modal\">\n <filter-bar-button\n :is-filter-open=\"isModalOpen\"\n :applied-filters-count=\"numberOfActiveFilters\"\n no-applied-state-styles\n @click=\"onClickAllFiltersModal\"\n >\n {{ t('allFilters') }}\n\n <template #iconLeft>\n <sliders-icon aria-hidden=\"true\" />\n </template>\n </filter-bar-button>\n <bento-modal\n v-if=\"!isSmallScreen\"\n class=\"b-all-filters-modal__modal\"\n :is-open=\"isModalOpen\"\n :with-column-layout=\"true\"\n size=\"large\"\n :actions=\"modalActions\"\n :is-dismissible=\"false\"\n hide-close-button\n @close-modal=\"cancel\"\n >\n <template #default>\n {{ t('allFilters') }}\n </template>\n <template #content-col-1>\n <all-filters-modal-filter-selection\n ref=\"filterSelectionRef\"\n :active-filters=\"activeFilters\"\n :actions=\"modalActions\"\n :active-filters-label=\"t('activeFilters')\"\n :empty-search-message=\"isEmptyResultForSearchFilter ? t('noFiltersMatchThisSearch') : ''\"\n :get-filter-count=\"getFilterCount\"\n :other-filters=\"otherFilters\"\n :other-filters-label=\"t('otherFilters')\"\n :search-bar-aria-label=\"t('searchBar')\"\n :search-term=\"searchTerm\"\n :selected-filter-label=\"selectedFilter.label\"\n :unique-id=\"allFiltersModalUniqueId\"\n @clear-search=\"onSearchbarClear\"\n @keydown-right=\"onKeydownRight\"\n @select-filter=\"selectFilter\"\n @update:search-term=\"searchTerm = $event\"\n />\n </template>\n <template #content-col-2>\n <all-filters-modal-selected-filter\n ref=\"selectedFilterContentRef\"\n :actions=\"modalActions\"\n :clear-button-label=\"t(isSelectedFilterPersistent ? 'reset' : 'clear')\"\n :is-clear-button-disabled=\"isClearButtonDisabled\"\n :selected-filter=\"selectedFilter\"\n :should-show-filter-title=\"shouldShowFilterTitle\"\n @clear=\"clearSelectedFilter\"\n @input=\"updateFilter\"\n @keydown-left=\"onKeydownLeft\"\n />\n </template>\n </bento-modal>\n <bento-modal-fullscreen\n v-else\n class=\"b-all-filters-modal__modal b-all-filters-modal__modal--small-screen\"\n :active-page=\"smallScreenActivePage\"\n :is-open=\"isModalOpen\"\n @before-close=\"cancel\"\n @update:active-page=\"smallScreenActivePage = $event\"\n >\n <bento-modal-fullscreen-page\n :page-id=\"FILTER_SELECTION_PAGE_ID\"\n :previous-page=\"null\"\n :title=\"t('allFilters')\"\n >\n <all-filters-modal-filter-selection\n :active-filters=\"activeFilters\"\n :actions=\"modalActions\"\n :active-filters-label=\"t('activeFilters')\"\n :empty-search-message=\"isEmptyResultForSearchFilter ? t('noFiltersMatchThisSearch') : ''\"\n :get-filter-count=\"getFilterCount\"\n :other-filters=\"otherFilters\"\n :other-filters-label=\"t('otherFilters')\"\n :search-bar-aria-label=\"t('searchBar')\"\n :search-term=\"searchTerm\"\n :selected-filter-label=\"selectedFilter.label\"\n :unique-id=\"allFiltersModalUniqueId\"\n small-screen\n @clear-search=\"onSearchbarClear\"\n @select-filter=\"selectFilter\"\n @update:search-term=\"searchTerm = $event\"\n />\n </bento-modal-fullscreen-page>\n <bento-modal-fullscreen-page\n :page-id=\"FILTER_APPLICATION_PAGE_ID\"\n :previous-page=\"FILTER_SELECTION_PAGE_ID\"\n :title=\"t('allFilters')\"\n >\n <all-filters-modal-selected-filter\n :actions=\"modalActions\"\n :clear-button-label=\"t(isSelectedFilterPersistent ? 'reset' : 'clear')\"\n :is-clear-button-disabled=\"isClearButtonDisabled\"\n :selected-filter=\"selectedFilter\"\n :should-show-filter-title=\"shouldShowFilterTitle\"\n small-screen\n @input=\"updateFilter\"\n />\n </bento-modal-fullscreen-page>\n </bento-modal-fullscreen>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref, toRef, watch } from 'vue';\n import { useMediaQuery } from '@vueuse/core';\n\n import { type BentoDateRangePickerValue } from '@/components/date-range-picker';\n import { BentoModalFullscreen, BentoModalFullscreenPage } from '@/components/modal-fullscreen';\n import BentoModal from '@/components/modal/modal.vue';\n import { useSearchBarFilter } from '@/components/search-bar';\n\n import { generateUid } from '@/utils/ts/generate-uid';\n import { useI18n } from '@/utils/ts/i18n';\n\n import {\n type BentoFilterBarFiltersWithValues,\n type BentoFilterBarFilterWithValue,\n BentoFilterItemType,\n type BentoSelectFilterOptions,\n } from '@/components/filter-bar/filter-bar.types';\n import { FilterBarButton } from '../filter-bar-button';\n import {\n AllFiltersModalEvent,\n type BentoAllFiltersModalFilterSelectionInstance,\n type BentoAllFiltersModalSelectedFilterContentInstance,\n } from './all-filters-modal.types';\n import AllFiltersModalFilterSelection from './components/all-filters-modal-filter-selection/all-filters-modal-filter-selection.vue';\n import AllFiltersModalSelectedFilter from './components/all-filters-modal-selected-filter/all-filters-modal-selected-filter.vue';\n import SlidersIcon from '@adyen/ui-assets-icons-16/vue/sliders-1';\n import { type BentoCheckboxGroupFilterOptions } from '../checkbox-group-filter';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n const FILTER_SELECTION_PAGE_ID = 'filter-selection';\n const FILTER_APPLICATION_PAGE_ID = 'filter-application';\n\n const props = defineProps({\n value: { default: () => [] }\n});\n\n const emit = defineEmits([AllFiltersModalEvent.INPUT]);\n\n const filtersInModal = ref<BentoFilterBarFiltersWithValues>(props.value);\n const allFiltersModalUniqueId = generateUid('all-filters-modal');\n const filterSelectionRef = ref<BentoAllFiltersModalFilterSelectionInstance | null>(null);\n const isModalOpen = ref(false);\n const selectedFilterIndex = ref(0);\n const selectedFilterContentRef = ref<BentoAllFiltersModalSelectedFilterContentInstance | null>(null);\n const searchTerm = ref<string>('');\n const smallScreenActivePage = ref(FILTER_SELECTION_PAGE_ID);\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n const isSmallScreen = useMediaQuery('(max-width: 599px)');\n const filteredItems = useSearchBarFilter<BentoFilterBarFilterWithValue>(searchTerm, toRef(filtersInModal, 'value'));\n\n watch(\n () => props.value,\n () => {\n /**\n * Values need to be preserve when the modal is opened given that\n * when the \"select\" filter is enabled with external filtering inside the modal\n * the \"searchTerm\" gets reset and doing so resets all the unsaved values of the array\n */\n if (isModalOpen.value) {\n filtersInModal.value = props.value.map((filter, index) => {\n return { ...filter, value: filtersInModal.value[index].value };\n });\n } else {\n filtersInModal.value = props.value;\n }\n }\n );\n\n const sortAlphabetically = (array: BentoFilterBarFiltersWithValues) =>\n array.sort((a, b) => (a.label > b.label ? 1 : b.label > a.label ? -1 : 0));\n\n const activeFilters = computed(() =>\n sortAlphabetically(\n filteredItems.value.filter(el =>\n Array.isArray(el.value) ? el.value?.length && el.value?.find(item => item !== '') : el.value\n )\n )\n );\n\n const otherFilters = computed(() =>\n sortAlphabetically(\n filteredItems.value.filter(el =>\n Array.isArray(el.value) ? el.value?.length === 0 || el.value?.every(item => item === '') : !el.value\n )\n )\n );\n\n const isEmptyResultForSearchFilter = computed(() => searchTerm.value && filteredItems.value?.length === 0);\n\n const selectedFilter = computed(() => ({\n ...filtersInModal.value[selectedFilterIndex.value],\n labelId: generateUid(filtersInModal.value[selectedFilterIndex.value]?.field),\n }));\n\n const selectOpenedFilter = () => {\n const openedFilter = activeFilters.value.length ? activeFilters.value[0] : otherFilters.value[0];\n const openedFilterIndex = filtersInModal.value.findIndex(\n el => el.label === openedFilter.label && el.field === openedFilter.field\n );\n selectedFilterIndex.value = openedFilterIndex;\n };\n\n watch(\n () => isModalOpen.value,\n isOpen => {\n if (isOpen) {\n selectOpenedFilter();\n }\n }\n );\n\n const computeCounts = (filterValue: BentoFilterBarFiltersWithValues) =>\n filterValue.map(filter => {\n switch (filter.type) {\n case BentoFilterItemType.SELECT:\n case BentoFilterItemType.SELECT_AVATAR:\n case BentoFilterItemType.SELECT_COUNTRY:\n case BentoFilterItemType.SELECT_CURRENCY:\n case BentoFilterItemType.SELECT_PAYMENT_METHOD:\n case BentoFilterItemType.SELECT_TAG:\n switch ((filter.options as BentoSelectFilterOptions)?.multiple) {\n case true:\n return {\n label: filter.label,\n field: filter.field,\n count: (filter.value as Array<string | number>)?.length\n ? (filter.value as Array<string | number>)?.length\n : null,\n };\n default:\n return {\n label: filter.label,\n field: filter.field,\n count: filter.value == null ? null : 1,\n };\n }\n case BentoFilterItemType.DATE_RANGE:\n return {\n label: filter.label,\n field: filter.field,\n count:\n (filter.value as BentoDateRangePickerValue)?.startDate != null &&\n (filter.value as BentoDateRangePickerValue)?.endDate != null\n ? 1\n : null,\n };\n case BentoFilterItemType.RANGE:\n return {\n label: filter.label,\n field: filter.field,\n count: (filter.value as Array<string>)?.find(el => el !== '') ? 1 : null,\n };\n case BentoFilterItemType.CHECKBOX_GROUP:\n return {\n label: filter.label,\n field: filter.field,\n count: (filter.value as Array<string | number>)?.length\n ? (filter.value as Array<string | number>)?.length\n : null,\n };\n case BentoFilterItemType.TOGGLE:\n return {\n label: filter.label,\n field: filter.field,\n count: filter.value ? 1 : null,\n };\n case BentoFilterItemType.INPUT:\n case BentoFilterItemType.BOOLEAN:\n case BentoFilterItemType.DATE:\n case BentoFilterItemType.RADIO_GROUP:\n default:\n return {\n label: filter.label,\n field: filter.field,\n count: filter.value != null ? 1 : null,\n };\n }\n });\n\n const selectedFilterValue = computed(() => selectedFilter.value.value);\n\n const hasValueSelected = computed(() =>\n Array.isArray(selectedFilterValue.value)\n ? selectedFilterValue.value.length && selectedFilterValue.value.find(item => item !== '')\n : !!selectedFilterValue.value\n );\n\n const hasPersistentFilters = computed(() =>\n filtersInModal.value.some(({ defaultValue }) => defaultValue !== undefined)\n );\n\n const isSelectedFilterPersistent = computed(() => selectedFilter.value.defaultValue !== undefined);\n\n /**\n * Hides filter title if the selected filter is Toggle.\n * The Toggle filter shows a checkbox next to the \"title\".\n */\n const shouldShowFilterTitle = computed(() => {\n return selectedFilter.value.type !== BentoFilterItemType.TOGGLE;\n });\n\n const isClearButtonDisabled = computed(\n () =>\n selectedFilter.value.disabled ||\n (isSelectedFilterPersistent.value\n ? JSON.stringify(selectedFilter.value.value) === JSON.stringify(selectedFilter.value.defaultValue)\n : !hasValueSelected.value)\n );\n\n const filtersIncludedInActiveCount = computed(() =>\n props.value.filter(\n filter =>\n filter.defaultValue === undefined ||\n (filter.visible === false && JSON.stringify(filter.value) !== JSON.stringify(filter.defaultValue))\n )\n );\n\n const numberOfActiveFilters = computed(\n () => computeCounts(filtersIncludedInActiveCount.value)?.filter(({ count }) => !!count).length\n );\n\n const onClickAllFiltersModal = () => {\n if (!isModalOpen.value) {\n smallScreenActivePage.value = FILTER_SELECTION_PAGE_ID;\n isModalOpen.value = true;\n } else {\n isModalOpen.value = false;\n }\n };\n\n const filterCounts = computed(\n () => new Map(computeCounts(filtersInModal.value).map(({ field, count }) => [field, count]))\n );\n\n const getFilterCount = (filter: BentoFilterBarFilterWithValue) => {\n const filterCount = filterCounts.value.get(filter.field);\n\n const isBentoSelectFilter =\n typeof filter.type === 'string' && // Type guard to avoid casting\n filter.type.includes('BentoSelect') &&\n (filter.options as BentoSelectFilterOptions)?.multiple &&\n filterCount === (filter.options as BentoSelectFilterOptions)?.listboxItems?.length;\n\n const isBentoCheckboxGroupFilter =\n typeof filter.type === 'string' &&\n filter.type === BentoFilterItemType.CHECKBOX_GROUP &&\n filterCount === (filter.options as BentoCheckboxGroupFilterOptions)?.checkboxItems?.length;\n\n if (isBentoSelectFilter || isBentoCheckboxGroupFilter) {\n return t('all');\n }\n return filterCount == null ? null : n(filterCount);\n };\n\n const selectFilter = (filterLabel: string, filterField: string) => {\n selectedFilterIndex.value = filtersInModal.value.findIndex(\n el => el.label === filterLabel && el.field === filterField\n );\n if (isSmallScreen.value) {\n smallScreenActivePage.value = FILTER_APPLICATION_PAGE_ID;\n }\n };\n\n const onSearchbarClear = () => {\n searchTerm.value = '';\n };\n\n const cancel = () => {\n isModalOpen.value = false;\n filtersInModal.value = props.value;\n onSearchbarClear();\n };\n\n const updateFilter = (updatedFilter: BentoFilterBarFilterWithValue) => {\n const updatedFilters = filtersInModal.value.map(({ value, ...otherFields }, index) => {\n if (index === selectedFilterIndex.value) {\n return { value: updatedFilter.value, ...otherFields };\n }\n return { value, ...otherFields };\n });\n\n filtersInModal.value = updatedFilters;\n };\n\n const clearSelectedFilter = () => {\n updateFilter({\n field: selectedFilter.value.field,\n label: selectedFilter.value.label,\n type: selectedFilter.value.type,\n value: isSelectedFilterPersistent.value ? selectedFilter.value.defaultValue : undefined,\n });\n };\n\n const clearAll = () => {\n filtersInModal.value = props.value.map(filter => ({\n ...filter,\n value: filter.defaultValue,\n }));\n };\n\n const applyAll = () => {\n emit(AllFiltersModalEvent.INPUT, filtersInModal.value);\n isModalOpen.value = false;\n smallScreenActivePage.value = FILTER_SELECTION_PAGE_ID;\n };\n\n const isApplyAllButtonDisabled = computed(\n () => JSON.stringify(filtersInModal.value) === JSON.stringify(props.value)\n );\n\n const isClearAllButtonDisabled = computed(() =>\n hasPersistentFilters.value\n ? filtersInModal.value.every(filter => JSON.stringify(filter.value) === JSON.stringify(filter.defaultValue))\n : !numberOfActiveFilters.value\n );\n\n const modalActions = computed(() => [\n {\n title: t('applyAll'),\n disabled: isApplyAllButtonDisabled.value,\n event: applyAll,\n },\n\n {\n title: t('cancel'),\n event: cancel,\n },\n {\n title: t(hasPersistentFilters.value ? 'resetAll' : 'clearAll'),\n disabled: isClearAllButtonDisabled.value,\n event: clearAll,\n },\n ]);\n\n const onKeydownRight = () => {\n selectedFilterContentRef.value?.focusFirstInput();\n };\n\n const onKeydownLeft = () => {\n filterSelectionRef.value?.focusFilter(selectedFilter.value.label);\n };\n</script>\n\n<script lang=\"ts\">\n /**\n * A modal that acts as sort of filter manager for the BentoFilterBar.\n *\n * @example\n * import { BentoAllFiltersModal } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoAllFiltersModal },\n * template: `\n * <bento-all-filters-modal>\n * ...Example code of the component\n * </bento-all-filters-modal>\n * `\n * }\n */\n export default {\n name: 'all-filters-modal',\n i18n: { messages },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./all-filters-modal.scss\" />\n","<template>\n <div ref=\"filterBarRef\" class=\"b-filter-bar\" :class=\"rootElementConditionalClasses\">\n <div v-if=\"!showSearchbarInsideContainer && isSearchBarEnabled\" class=\"b-filter-bar__search-external-container\">\n <bento-search-bar\n class=\"b-filter-bar__search-bar\"\n v-bind=\"searchBarProps\"\n :input-field-aria-label=\"searchBarAriaLabel\"\n :value=\"searchTerm\"\n condensed\n :style=\"searchBarWidthStyle\"\n @input=\"onSearchbarInput\"\n @clear=\"onSearchbarClear\"\n />\n </div>\n\n <component :is=\"screenLayoutComponent\" :class=\"containerConditionalClasses\" condensed>\n <div :class=\"contentConditionalClasses\">\n <div\n v-if=\"showSearchbarInsideContainer && isSearchBarEnabled\"\n class=\"b-filter-bar__search-bar-container\"\n :style=\"searchBarWidthStyle\"\n >\n <bento-search-bar\n class=\"b-filter-bar__search-bar\"\n v-bind=\"searchBarProps\"\n :input-field-aria-label=\"searchBarAriaLabel\"\n :value=\"searchTerm\"\n condensed\n @input=\"onSearchbarInput\"\n @clear=\"onSearchbarClear\"\n />\n </div>\n\n <template v-if=\"persistentFilters.length\">\n <component\n :is=\"filter.type\"\n v-for=\"filter in persistentFilters\"\n :key=\"filter.field\"\n :field=\"filter.field\"\n :label=\"filter.label\"\n :disabled=\"filter?.disabled\"\n :options=\"filter.options\"\n :value=\"filter.value\"\n :default-value=\"filter.defaultValue\"\n @update=\"updateFilterHandler\"\n />\n </template>\n\n <component\n :is=\"filter.type\"\n v-for=\"filter in regularFilters\"\n :key=\"filter.field\"\n :field=\"filter.field\"\n :label=\"filter.label\"\n :disabled=\"filter?.disabled\"\n :options=\"filter.options\"\n :value=\"filter.value\"\n @update=\"updateFilterHandler\"\n />\n\n <!-- All filters button -->\n <all-filters-modal\n v-if=\"hasHiddenFilters\"\n class=\"b-filter-bar__all-filters-modal\"\n :value=\"filtersInAllFiltersModal\"\n @input=\"updateFilterHandler\"\n />\n\n <!-- Clear all filters button -->\n <filter-bar-button v-if=\"isClearAllVisible\" class=\"b-filter-bar__clear-all\" @click=\"clearAllFilters\">\n {{ t('clearFilters') }}\n <template #iconLeft>\n <refresh-icon aria-hidden=\"true\" />\n </template>\n </filter-bar-button>\n\n <!-- Reset all filters button -->\n <filter-bar-button v-if=\"isResetAllVisible\" class=\"b-filter-bar__reset-all\" @click=\"resetAllFilters\">\n {{ t('resetFilters') }}\n <template #iconLeft>\n <refresh-icon aria-hidden=\"true\" />\n </template>\n </filter-bar-button>\n </div>\n </component>\n </div>\n</template>\n\n<script setup lang=\"ts\">\n import { computed, ref } from 'vue';\n import { FilterBarButton } from './components/filter-bar-button';\n import {\n type BentoFilterBarContainerSizeLayout,\n BentoFilterBarEvent,\n type BentoFilterBarFiltersWithValues,\n type BentoFilterBarFilterWithValue,\n type BentoFilterBarProps,\n } from './filter-bar.types';\n import BentoSearchBar from '@/components/search-bar/search-bar.vue';\n import { BentoSearchBarEvent } from '@/components/search-bar/search-bar.types';\n import { useBentoToastController } from '@/composables';\n import { useI18n } from '@/utils/ts/i18n';\n import { useContainerSizeOptionsLayout } from './composables/use-container-size-options-layout/use-container-size-options-layout';\n import AllFiltersModal from './components/all-filters-modal/all-filters-modal.vue';\n import RefreshIcon from '@adyen/ui-assets-icons-16/vue/refresh';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n // TODO: setup Vue3 generics in Bento 2.0.0\n const props = defineProps({\n config: { default: () => [] },\n filterValues: { default: () => [] },\n containerSizeLayout: { default: null },\n search: { default: undefined },\n searchTerm: { default: undefined },\n showAppliedHiddenFilters: { type: Boolean, default: false },\n filterValuesObject: { default: undefined }\n});\n\n const emit = defineEmits([\n BentoFilterBarEvent.INPUT,\n BentoFilterBarEvent.UPDATE_FILTER_VALUES_OBJECT,\n BentoFilterBarEvent.UPDATE_FILTER_VALUES_ARRAY,\n BentoSearchBarEvent.CLEAR,\n BentoSearchBarEvent.INPUT,\n BentoSearchBarEvent.UPDATE,\n ]);\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n\n const filterBarRef = ref<HTMLDivElement>(null);\n\n const valueAndFilterValuesPropsMerged = computed(\n () =>\n props.config?.map(filterModel => {\n let filterValue = props.filterValues.find(({ field }) => field === filterModel.field)?.value;\n if (props.filterValuesObject && filterModel.field in props.filterValuesObject) {\n filterValue = props.filterValuesObject[filterModel.field];\n }\n if (filterValue === undefined) {\n filterValue = filterModel?.defaultValue;\n }\n\n return { ...filterModel, value: filterValue };\n }) as BentoFilterBarFiltersWithValues\n );\n const { addToast } = useBentoToastController();\n\n /**\n * Container size layout.\n * Allows to change the layout from multi-line to one-line for each container size type:\n * - large: >=700\n * - medium: >=430 & <700\n * - small: <430\n */\n const DEFAULT_CONTAINER_SIZE_LAYOUT: Required<BentoFilterBarContainerSizeLayout> = {\n large: 'multi-line',\n medium: 'one-line',\n small: 'multi-line',\n };\n\n const mergedContainerSizeLayout = computed<Required<BentoFilterBarContainerSizeLayout>>(() => ({\n ...DEFAULT_CONTAINER_SIZE_LAYOUT,\n ...props.containerSizeLayout,\n }));\n\n const {\n screenLayoutComponent,\n showSearchbarInsideContainer,\n isOneLineLayout,\n isLargeLayout,\n rootElementConditionalClasses,\n } = useContainerSizeOptionsLayout(filterBarRef, mergedContainerSizeLayout);\n\n /**\n * Classes\n */\n\n /**\n * Handles the classes of the swappable component ('div' or 'fixed-scroller)\n */\n const containerConditionalClasses = computed(() => ({\n 'b-filter-bar__fixed-scroller': isOneLineLayout.value,\n 'b-filter-bar__container': !isOneLineLayout.value, // Multi-line\n }));\n\n /**\n * Handles the classes of the container inside the swappable component.\n */\n const contentConditionalClasses = computed(() => ({\n 'b-filter-bar__scroller-content': isOneLineLayout.value,\n 'b-filter-bar__filters': !isOneLineLayout.value, // Multi-line\n }));\n\n /**\n * Search bar pops\n */\n const searchBarAriaLabel = computed(() => props.search?.inputFieldAriaLabel || (t('searchBar') as string));\n const searchBarProps = computed(() => {\n if (!props.search) {\n return undefined;\n }\n\n const { debounceTime, disabled, inputFieldAriaLabel, hint, placeholder } = props.search;\n return { debounceTime, disabled, inputFieldAriaLabel, hint, placeholder };\n });\n\n const searchBarWidthStyle = computed(() =>\n props.search?.width && isLargeLayout.value\n ? { flexBasis: props.search.width, maxWidth: props.search.width }\n : undefined\n );\n\n const hasVisibleSet = computed(() =>\n valueAndFilterValuesPropsMerged.value.some(({ visible }) => visible !== undefined && visible !== null)\n );\n\n const hasHiddenFilters = computed(() =>\n hasVisibleSet.value ? valueAndFilterValuesPropsMerged.value.some(({ visible }) => !visible) : false\n );\n\n // Persistent filters i.e. filters with default value\n const persistentFilters = computed(() =>\n valueAndFilterValuesPropsMerged.value.filter(\n ({ defaultValue, visible }) => defaultValue !== undefined && visible !== false\n )\n );\n\n const filtersInAllFiltersModal = computed(() =>\n valueAndFilterValuesPropsMerged.value.filter(\n ({ defaultValue, visible }) => defaultValue === undefined || visible === false\n )\n );\n\n const hasPersistentFilters = computed(() =>\n valueAndFilterValuesPropsMerged.value.some(({ defaultValue }) => defaultValue !== undefined)\n );\n\n // Show non-persistent & visible filters\n const regularFilters = computed(() => {\n // If no filter has the `visible` prop set then all are visible, otherwise search for the \"visible: true\" elements\n return hasVisibleSet.value\n ? valueAndFilterValuesPropsMerged.value.filter(\n ({ defaultValue, visible, value }) =>\n defaultValue === undefined &&\n (visible || (props.showAppliedHiddenFilters && value !== undefined && value !== null))\n )\n : valueAndFilterValuesPropsMerged.value.filter(({ defaultValue }) => defaultValue === undefined);\n });\n\n // Enable search bar.\n // Soft equality to check for \"null\" and \"undefined\"\n // eslint-disable-next-line eqeqeq\n const isSearchBarEnabled = computed(() => props.searchTerm != undefined);\n\n const hasActiveFilters = computed(() =>\n valueAndFilterValuesPropsMerged.value\n .filter(({ defaultValue }) => defaultValue === undefined || defaultValue === null)\n // Disabling strict equality to check for both undefined and null\n // eslint-disable-next-line eqeqeq\n .some(({ value }) => value != undefined)\n );\n\n // Show the \"Clear all\" button (true) if at least one filter is active (contains a value)\n // and there are not persistent filters present.\n const isClearAllVisible = computed(() => !hasPersistentFilters.value && hasActiveFilters.value);\n\n const isResetAllVisible = computed(() => {\n if (!hasPersistentFilters.value) {\n return false;\n }\n const areAllValuesEqualToDefaults = valueAndFilterValuesPropsMerged.value\n .filter(({ defaultValue }) => defaultValue !== undefined || defaultValue !== null)\n .every(({ value, defaultValue }) => JSON.stringify(value) === JSON.stringify(defaultValue));\n\n return !areAllValuesEqualToDefaults || hasActiveFilters.value;\n });\n\n const updateAllFilters = (newFilters: BentoFilterBarFiltersWithValues) => {\n emit(BentoFilterBarEvent.INPUT, newFilters);\n emit(\n BentoFilterBarEvent.UPDATE_FILTER_VALUES_ARRAY,\n newFilters\n ?.filter(({ value }) => value !== null || value !== undefined)\n .map(({ field, value }) => ({ field, value }))\n );\n emit(\n BentoFilterBarEvent.UPDATE_FILTER_VALUES_OBJECT,\n newFilters\n ?.filter(({ value }) => value !== null || value !== undefined)\n .reduce((acc, filter) => {\n acc[filter.field] = filter.value;\n return acc;\n }, {})\n );\n };\n\n const updateFilterHandler = (updatedFilters: BentoFilterBarFilterWithValue | BentoFilterBarFiltersWithValues) => {\n const filtersArray = Array.isArray(updatedFilters) ? updatedFilters : [updatedFilters];\n const updatedFiltersMap = new Map(filtersArray.map(filter => [filter.field, filter.value]));\n\n const newFilters = valueAndFilterValuesPropsMerged.value.map(filter => {\n if (updatedFiltersMap.has(filter.field)) {\n return { ...filter, value: updatedFiltersMap.get(filter.field) };\n }\n return filter;\n });\n\n updateAllFilters(newFilters);\n };\n\n const clearAllFilters = () => {\n const previousFilters = valueAndFilterValuesPropsMerged.value.slice();\n const clearedFilters = valueAndFilterValuesPropsMerged.value.map(({ value, ...otherFields }) => ({\n ...otherFields,\n value: undefined,\n }));\n\n addToast({\n text: t('filtersHaveBeenCleared') as string,\n action: {\n handler: () => updateAllFilters(previousFilters),\n text: t('undo') as string,\n },\n });\n updateAllFilters(clearedFilters);\n };\n\n const resetAllFilters = () => {\n const previousFilters = valueAndFilterValuesPropsMerged.value.slice();\n const resetFilters = valueAndFilterValuesPropsMerged.value.map(({ defaultValue, ...otherFields }) => ({\n ...otherFields,\n defaultValue,\n value: defaultValue,\n }));\n\n addToast({\n text: t('filtersHaveBeenReset') as string,\n action: {\n handler: () => updateAllFilters(previousFilters),\n text: t('undo') as string,\n },\n });\n updateAllFilters(resetFilters);\n };\n\n const onSearchbarInput = (newSearchTerm: string) => {\n emit(BentoSearchBarEvent.INPUT, newSearchTerm);\n emit(BentoSearchBarEvent.UPDATE, newSearchTerm);\n };\n const onSearchbarClear = () => {\n emit(BentoSearchBarEvent.CLEAR);\n };\n\n // Expose methods for BentoDataGrid to access\n defineExpose({ isClearAllVisible, clearAllFilters, isResetAllVisible, resetAllFilters });\n</script>\n\n<script lang=\"ts\">\n import {\n BentoBooleanFilter,\n BentoCheckboxGroupFilter,\n BentoDateFilter,\n BentoDateRangeFilter,\n BentoInputFilter,\n BentoInputWithDropdownFilter,\n BentoRadioGroupFilter,\n BentoRangeFilter,\n BentoSelectAvatarFilter,\n BentoSelectCountryFilter,\n BentoSelectCurrencyFilter,\n BentoSelectFilter,\n BentoSelectPaymentMethodFilter,\n BentoSelectTagFilter,\n BentoToggleFilter,\n } from './components';\n import { BentoTeleport, FixedScroller } from '@/internal';\n\n /**\n * The filter bar filters item lists and tables according to various filter criteria.\n *\n * @example\n * import { BentoFilterBar } from '@adyen/bento-vue2'\n *\n * export default {\n * components: { BentoFilterBar },\n * data: () => ({\n * filtersConfig: [{\n * field: 'name',\n * label: 'Name',\n * options: { ... },\n * type: FilterType.TEXT,\n * }],\n * filterValues: [{\n * field: 'name',\n * value: null,\n * }],\n * }),\n * template: `\n * <bento-filter-bar\n * :config=\"filtersConfig\"\n * :filter-values=\"filterValues\"\n * @update:filter-values=\"filterValues = $event\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-filter-bar',\n components: {\n BentoBooleanFilter,\n BentoCheckboxGroupFilter,\n BentoDateFilter,\n BentoDateRangeFilter,\n BentoInputFilter,\n BentoInputWithDropdownFilter,\n BentoRadioGroupFilter,\n BentoRangeFilter,\n BentoSelectAvatarFilter,\n BentoSelectCountryFilter,\n BentoSelectCurrencyFilter,\n BentoSelectFilter,\n BentoSelectPaymentMethodFilter,\n BentoSelectTagFilter,\n BentoTeleport,\n BentoToggleFilter,\n FixedScroller,\n },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./filter-bar.scss\" />\n"],"names":["isPlainObject","value","isArray$1","isValueEmpty$1","el","isEqual$1","first","second","deepCopy","item","acc","key","copyStructure","useBentoBaseFilter","appliedFilter","defaultFilter","internalFilterValue","ref","initialStructureOrValue","onMounted","watch","newValue","isFilterInactive","computed","isSecondaryButtonDisabled","isApplyButtonDisabled","clearFilter","callback","resetFilter","openFilter","isDate","isValid","date","toDate","getDayOfYear","options","_date","differenceInCalendarDays","startOfYear","addLeadingZeros","number","targetLength","sign","output","lightFormatters","token","signedYear","year","month","dayPeriodEnumValue","numberOfDigits","milliseconds","fractionalSeconds","dayPeriodEnum","formatters","localize","era","signedWeekYear","getWeekYear","weekYear","twoDigitYear","isoWeekYear","getISOWeekYear","quarter","week","getWeek","isoWeek","getISOWeek","dayOfYear","dayOfWeek","localDayOfWeek","isoDayOfWeek","hours","_localize","timezoneOffset","formatTimezoneWithOptionalMinutes","formatTimezone","formatTimezoneShort","timestamp","offset","delimiter","absOffset","minutes","formattingTokensRegExp","longFormattingTokensRegExp","escapedStringRegExp","doubleQuoteRegExp","unescapedLatinCharacterRegExp","format","formatStr","defaultOptions","getDefaultOptions","locale","enUS","firstWeekContainsDate","weekStartsOn","originalDate","parts","substring","firstCharacter","longFormatter","longFormatters","cleanEscapedString","formatterOptions","part","isProtectedWeekYearToken","isProtectedDayOfYearToken","warnOrThrowProtectedError","formatter","input","matched","__default__$g","slots","useSlots","attrs","useAttrs","hasSlot","useHasSlot","labelSlot","getSlotText","isIconOnly","computedAriaLabel","useAriaLabel","filterBarButtonRef","ariaAttributes","isAppliedFilter","props","conditionalClasses","event","emit","__default__$f","BaseFilterEvent","BaseFilterEvent2","__default__$e","messages$9","t","useI18n","popoverId","generateUid","isFilterOpen","filterButtonRef","popoverRef","filterButtonEl","setPopoverRef","instance","isPersistentFilter","isValueChanged","ariaLabelValuePart","computedButtonText","computedClearButtonLabel","resetFocus","nextTick","closePopover","onClickSecondaryAction","onClickFilter","onClickApply","onCancel","onClickOutside","actions","prevValue","useClickOutside","expose","isArray","isValueEmpty","isEqual","useBaseFilter","__default__$d","inputTextRef","toRef","buttonLabel","buttonSecondaryLabel","truncate","onBeforeUpdate","updateFilter","BentoFilterEvent","BentoFilterEvent2","BentoFilterBarEvent","BentoFilterBarEvent2","BentoFilterItemType","BentoFilterItemType2","__default__$c","selectedDropdownLabel","selectedValue","label","dropdownSelection","dropdownOptions","shouldDisableApply","onInput","setInternalFilterValue","onDropdownInput","provide","INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY","_sfc_main$l","defineComponent","BentoBaseFilter","BentoDatePicker","BentoDivider","Calendar","isTouchDevice","useTouchDevice","formattedButtonDateText","dateFormatOptions","getDateTimeFormatter","onDateSelected","selectedDate","onDateInputSelected","touchDeviceDatePickerConditionalClasses","_sfc_main$k","messages$8","BentoButtonActions","BentoDateRangePicker","BentoTypography","DateRangePickerCalendar","dateLocale","useDynamicDateFnsLocale","dateToInputDateString","useDateInputFormatter","isSelectingDate","adjustedQuickSelectRanges","range","timeDiff","baseFilter","isDateIncorrect","formData","reactive","dateToTimeInputString","isQuickSelectAnArray","quickSelectRanges","calculateSecondaryLabel","currentValue","customRangeSelected","data","isEqual$2","isToday","isSameDay","onlySlot","cleanedProps","onRangeSelectorInput","dateFormDate","__default__$b","selectedValueLabel","__default__$a","messages$7","searchTerm","optionsRef","itemsRef","cachedSelectedListboxOptions","setCachedValues","resetCache","useCachedSelectedValues","cachedDefaultSelectedListboxOptions","filteredItems","useSearchBarFilter","noResultsMessage","isSingleSelectAndOneItemSelected","isMultiSelectedAndOneItemSelected","displayValue2","printDevelopmentWarning","displayValue","x","listboxFilterId","onOptionSelected","value2","value3","closeFilter","appliedFiltersCount","allSelectableItemsCount","selectedAmount","__default__$9","messages$6","SelectFilterProps","__default__$8","updatedProps","_sfc_main$f","BentoSelectFilter","BentoAvatar","_","_sfc_main$e","ListboxOptionTag","onUpdate","newList","search","searchableItems","normalizedResults","result","internalOptions","__default__$7","variant","BentoCountryVariant","listboxItems","countryItems","useCountryItems","countryOptions","_sfc_main$c","BentoPaymentMethod","_props","_sfc_main$b","tagItems","__default__$6","messages$5","checkboxLabelId","checkboxDescriptionId","internalValue","onlySlotConditionalClasses","updateProps","_sfc_main$9","messages$4","BentoRadioGroup","translateBooleanToString","aStringOrBooleanValue","translateBackToOriginalValueType","translatedDefaultValue","translatedValue","items","deprecate","isDigit","useNumericInput","prettyOutput","unref","inputRef","isFocused","negative","focusedDecimalPart","privateValue","decimalSeparator","p","maximumFractionDigits","invalidPattern","getEventTargetValue","parseInputValue","inputValue","isNegative","sanitizedValue","decimalSeparatorIndex","hasSingleDecimalSeparator","decimalPart","cappedDecimalPart","cappedSanitizedValue","normalizedValue","numberValue","shouldPreserveNegative","getOutputValue","val","getFocusedOutputValue","integerValue","formattedValue","setValue","finalValue","isNumber","absValue","getCaretPosition","setCaretPosition","pos","getDigitsBeforeCaret","fieldValue","caretPosition","digits","i","setCaretAfterNthDigit","nDigits","position","currentDisplay","handlePrettyInput","oldCaretPosition","nDigitsBefore","target","selectionStart","selectionEnd","targetValue","valueWithoutSelection","__default__$5","messages$3","fromFieldRef","toFieldRef","fromNum","toNum","stringifyInputValue","displayFrom","handleInputFrom","handleKeyDownFrom","onFocusFrom","onBlurFrom","inputRefFrom","handleModelValueFrom","displayTo","handleInputTo","handleKeyDownTo","onFocusTo","onBlurTo","inputRefTo","handleModelValueTo","newVal","nextFrom","nextTo","truncatedRangeValues","prefix","fromVal","toVal","rangeFromLabel","seperator","rangeToLabel","__default__$4","messages$2","displayedValues","SMALL_SIZE_THRESHOLD","LARGE_SIZE_THRESHOLD","useContainerSizeOptionsLayout","containerSizeLayoutOptions","screenLayoutComponent","shallowRef","isOneLineLayout","containerWidth","showSearchbarInsideContainer","setMultiLineConfig","setOneLineConfig","FixedScroller","calculateConfig","useResizeObserver","entries","isLargeLayout","rootElementConditionalClasses","AllFiltersModalEvent","AllFiltersModalEvent2","_sfc_main$6","BaseButton","ChevronUpIcon","ChevronDownIcon","BentoBaseButtonEvent","baseFilterButtonRef","_sfc_main$5","BaseFilterButton","__default__$3","filterButtons","screenIdPrefix","setFilterButtonRef","element","focusFilter","__default__$2","BentoBooleanFilter","BentoCheckboxGroupFilter","BentoDateFilter","BentoDateRangeFilter","BentoInputFilter","BentoInputWithDropdownFilter","BentoRadioGroupFilter","BentoRangeFilter","BentoSelectAvatarFilter","BentoSelectCountryFilter","BentoSelectCurrencyFilter","BentoSelectPaymentMethodFilter","BentoSelectTagFilter","BentoToggleFilter","selectedFilterRef","focusFirstInput","selectedFilterElement","getNextFocusableElement","getCurrentInstance","uuid","__default__$1","messages$1","FILTER_SELECTION_PAGE_ID","FILTER_APPLICATION_PAGE_ID","filtersInModal","allFiltersModalUniqueId","filterSelectionRef","isModalOpen","selectedFilterIndex","selectedFilterContentRef","smallScreenActivePage","n","isSmallScreen","useMediaQuery","filter","index","sortAlphabetically","array","a","b","activeFilters","otherFilters","isEmptyResultForSearchFilter","selectedFilter","selectOpenedFilter","openedFilter","openedFilterIndex","isOpen","computeCounts","filterValue","selectedFilterValue","hasValueSelected","hasPersistentFilters","defaultValue","isSelectedFilterPersistent","shouldShowFilterTitle","isClearButtonDisabled","filtersIncludedInActiveCount","numberOfActiveFilters","count","onClickAllFiltersModal","filterCounts","field","getFilterCount","filterCount","isBentoSelectFilter","isBentoCheckboxGroupFilter","selectFilter","filterLabel","filterField","onSearchbarClear","cancel","updatedFilter","updatedFilters","otherFields","clearSelectedFilter","clearAll","applyAll","isApplyAllButtonDisabled","isClearAllButtonDisabled","modalActions","__default__","messages","BentoTeleport","filterBarRef","valueAndFilterValuesPropsMerged","filterModel","addToast","useBentoToastController","DEFAULT_CONTAINER_SIZE_LAYOUT","mergedContainerSizeLayout","containerConditionalClasses","contentConditionalClasses","searchBarAriaLabel","searchBarProps","debounceTime","disabled","inputFieldAriaLabel","hint","placeholder","searchBarWidthStyle","hasVisibleSet","visible","hasHiddenFilters","persistentFilters","filtersInAllFiltersModal","regularFilters","isSearchBarEnabled","hasActiveFilters","isClearAllVisible","isResetAllVisible","updateAllFilters","newFilters","updateFilterHandler","filtersArray","updatedFiltersMap","clearAllFilters","previousFilters","clearedFilters","resetAllFilters","resetFilters","onSearchbarInput","newSearchTerm","BentoSearchBarEvent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,MAAAA,KAAA,CAAAC,MACHA,MAAA,QAAA,OAAAA,KAAA,WACI,KAGJ,OAAA,UAAA,SAAA,KAAAA,CAAA,MAAA,mBASGC,KAAA,CAAAD,MAAA,MAAA,QAAAA,CAAA,GAUAE,KAAA,CAAAF,MAAAC,GAAAD,CAAA,IAAAA,EAAA,WAAA,KAAAA,EAAA,MAAA,CAAAG,MAAAA,MAAA,EAAA,IAAA,CAAAH,GAUAI,KAAA,CAAAC,GAAAC,MAAA,KAAA,UA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