@adyen/bento-vue2 1.78.1 → 1.78.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/accordion-item.css +1 -1
- package/dist/assets/action-bar.css +1 -1
- package/dist/assets/base-modal.css +1 -1
- package/dist/assets/button-actions.css +1 -1
- package/dist/assets/card.css +1 -1
- package/dist/assets/data-grid.css +1 -1
- package/dist/assets/dialog-page.css +1 -1
- package/dist/assets/file-uploader.css +1 -1
- package/dist/assets/inspector.css +1 -1
- package/dist/assets/modal-fullscreen.css +1 -1
- package/dist/assets/sidepanel.css +1 -1
- package/dist/chunks/{data-grid.DpPIDzP-.js → data-grid.CS7Q8EWs.js} +2 -2
- package/dist/chunks/{data-grid.DpPIDzP-.js.map → data-grid.CS7Q8EWs.js.map} +1 -1
- package/dist/chunks/{filter-bar.DYPo4bp_.js → filter-bar.F5drAPol.js} +406 -391
- package/dist/chunks/filter-bar.F5drAPol.js.map +1 -0
- package/dist/data-grid.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/index.js +2 -2
- package/dist/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/chunks/filter-bar.DYPo4bp_.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filter-bar.DYPo4bp_.js","sources":["../../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.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/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/boolean-filter/boolean-filter.vue","../../src/components/filter-bar/components/range-filter/range-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","../../../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":["<template>\n <base-button\n ref=\"filterBarButtonRef\"\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=\"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\n <template #iconRight>\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 </template>\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 * 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,\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","import { type BentoTooltipPosition } from '../../../../directives/tooltip/tooltip.types';\n\n/**\n * Private\n */\nexport enum BaseFilterEvent {\n APPLY = 'apply',\n CLEAR = 'clear',\n OPEN = 'open',\n CLOSE = 'close',\n RESET = 'reset',\n CANCEL = 'cancel',\n}\n\n/**\n * Public\n */\nexport interface BentoBaseFilterProps<Value, Field> {\n /**\n * Total count of applied filters\n */\n appliedFiltersCount?: string | number;\n\n /**\n * Overrides the label of the popover visibility toggle button text.\n */\n buttonLabel?: string;\n\n /**\n * Sets the secondary label text of the popover visibility toggle button text.\n */\n buttonSecondaryLabel?: string;\n\n /**\n * Disables the filter from being interacted with.\n */\n disabled?: boolean;\n\n /**\n * Default value of the filter to reset to.\n */\n defaultValue?: Value;\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?: boolean;\n\n /**\n * Allows to handle the controls (apply/clear) from outside\n * of the component\n */\n controlled?: boolean;\n\n /**\n * Disable the \"apply\" button\n */\n disableApplyButton?: boolean;\n\n /**\n * Disable the secondary button action.\n */\n disableSecondaryButton?: boolean;\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: Field;\n\n /**\n * Label text to be displayed\n */\n label: string;\n\n /**\n * Sets the size of the container to fit its content\n */\n fitContent?: boolean;\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}`;\n\n /**\n * The current value of the filter, used for v-model.\n */\n value?: Value;\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=\"filterButtonRef\">\n <bento-popover\n v-if=\"filterButtonRef\"\n :id=\"popoverId\"\n ref=\"popoverRef\"\n class=\"b-base-filter__popover\"\n divider\n :open=\"isFilterOpen\"\n :actions=\"controlled ? null : actions\"\n actions-layout=\"space-between\"\n :target-element=\"filterButtonRef\"\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, type BentoBaseFilterProps } from './base-filter.types';\n import messages from './messages.json';\n import { generateUid } from '@/core/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 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\ntype 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 :popover-overflow-visible=\"isDropdownVariant\"\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 :dropdown=\"dropdownProp\"\n :dropdown-position=\"options?.dropdownPosition\"\n :placeholder=\"options?.placeholder\"\n :variant=\"inputVariant\"\n :value=\"internalFilterValue\"\n :disabled=\"disabled\"\n @input=\"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 type BentoInputFilterInputAndDropdownValues,\n type BentoInputFilterValue,\n } from '@/components/filter-bar/filter-bar.types';\n import { BentoInputField } from '@/components/input-field';\n import { truncate } from '@/utils/ts/truncate';\n import { type BentoListboxSelectedValue } from '@/types/listbox';\n import { INPUT_FILTER_POPOVER_INJECTION_KEY } from '@/components/filter-bar/components/input-filter/input-filter.keys';\n import { deprecate } from '@/utils/ts/deprecate';\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 // Dropdown\n const dropdownValue = ref<BentoListboxSelectedValue>(props?.options?.dropdown?.value);\n const isDropdownVariant = computed(\n () => props?.options?.variant === 'dropdown' && props?.options?.dropdown !== undefined\n );\n const dropdownProp = computed(() =>\n isDropdownVariant.value ? { ...props?.options?.dropdown, value: dropdownValue.value } : undefined\n );\n // For now we only allow the dropdown or the default variant for the input field.\n const inputVariant = computed(() => (props?.options?.variant === 'dropdown' ? 'dropdown' : 'default'));\n\n // Computed value as the input value location will be different if it is a dropdown variant\n const valueProp = computed(() =>\n isDropdownVariant.value\n ? (props.value as BentoInputFilterInputAndDropdownValues)?.inputValue\n : (props?.value as string)\n );\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } = useBaseFilter<string>(\n valueProp,\n toRef(props, 'defaultValue')\n );\n\n const buttonLabel = computed(() => props.label);\n const buttonSecondaryLabel = computed(() => truncate(valueProp.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 = valueProp.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: isDropdownVariant.value\n ? ({\n inputValue: internalFilterValue.value,\n dropdownValue: dropdownValue.value,\n } as BentoInputFilterValue)\n : 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\n const onDropdownInput = (selectedValue: BentoListboxSelectedValue) => {\n dropdownValue.value = 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_POPOVER_INJECTION_KEY, isDropdownVariant.value);\n\n // Verify that no unsopported attributes are passed to the component\n watch(\n () => props.options,\n () => {\n if (props.options?.dropdown || props.options?.dropdownPosition || props.options?.variant) {\n deprecate(\n 'BentoInputFilter \"options\" property',\n `BentoInputFilter \"options\" no longer supports \"dropdown\", \"dropdownPosition\" or \"variant\" attributes.\n Use the \"BentoFilterItemType.INPUT_DROPDOWN\" instead of \"BentoFilterItemType.INPUT\"\n <bento-filter-bar\n :config=\"[{\n field: 'name',\n label: 'Name',\n type: BentoFilterItemType.INPUT_DROPDOWN,\n options: [...],\n }]\"\n />`,\n '2.0.0'\n );\n }\n },\n { immediate: true }\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} from '@/components/date-picker';\nimport {\n type BentoDateRangePickerGranularityConfig,\n type BentoDateRangePickerValue,\n type BentoDateRangePickerVariant,\n} from '@/components/date-range-picker';\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 { BentoTooltipPosition } from '@/directives';\n\n/**\n * Re-export filter component types\n */\nexport type * from './components/input-filter/input-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 * @deprecated from version 2.0.0. The persistent filter label now uses a counter instead of custom strings. This property is now redundant.\n * The translation object to handle any custom transations. e.g. perisistent filter labels.\n */\n messages?: {\n [key: string]: {\n persistentButtonLabelPartiallySelected?: string;\n persistentButtonLabelAllSelected?: string;\n [key: string]: string;\n };\n };\n\n /**\n * @deprecated from version 2.0.0. The persistent filter label now uses a counter instead of custom strings. This property is now redundant.\n * The unique key to use in the messages translation object to use for the persistent button label\n * when the select filter has partially selected items.\n */\n messagesPersistentButtonLabelPartiallySelectedKey?: string;\n\n /**\n * @deprecated from version 2.0.0. The persistent filter label now uses a counter instead of custom strings. This property is now redundant.\n * The unique key to use in the messages translation object to use for the persistent button label\n * when the select filter has all items selected.\n */\n messagesPersistentButtonLabelAllSelectedKey?: string;\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 type BentoBooleanFilterOption = { label: string; value: string | boolean };\n\nexport type BentoBooleanFilterOptions = {\n positiveOption?: BentoBooleanFilterOption;\n negativeOption?: BentoBooleanFilterOption;\n tooltipText?: string;\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n};\n\nexport type BentoInputWithDropdownFilterOptions = {\n dropdown: BentoInputDropdownProps;\n dropdownPosition?: BentoInputFieldElementPosition | `${BentoInputFieldElementPosition}`;\n tooltipText?: string;\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n};\n\nexport type BentoRangeFilterOptions = {\n tooltipText?: string;\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n};\n\n// Date\nexport interface BentoDateFilterOptions {\n firstDayOfWeek?: BentoDatePickerFirstDayOfWeek;\n isDateDisabled?: BentoDatePickerIsDateDisabled;\n variant?: `${BentoDatePickerVariant}`;\n tooltipText?: string;\n tooltipPosition?: BentoTooltipPosition | `${BentoTooltipPosition}`;\n}\nexport interface BentoDateRangeFilterOptions {\n allowTimeInput?: boolean;\n firstDayOfWeek?: BentoDatePickerFirstDayOfWeek;\n isDateDisabled?: BentoDatePickerIsDateDisabled;\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 type BentoInpuWithDropdowntFilterValue = {\n inputValue: BentoInputFieldValue;\n dropdownValue: BentoInputDropdownProps['value'];\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\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 | 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 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}\n\nexport interface BentoFilterValue {\n field: string;\n value?: BentoFilterBarValue;\n}\n\nexport interface BentoFilterModel<CustomOptions = undefined> extends BentoFilterValue {\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 * @deprecated This property will be removed in version 2.0, please use `config` & `filter-values` properties.\n */\n value?: BentoFilterBarValue;\n}\n\nexport type BentoFilterBarModel<CustomOptions = undefined> = 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'>;\nexport type BentoFilterBarSearchTerm = BentoSearchBarProps['value'];\n\nexport type BentoFilterBarScreenOptionsLayout = 'one-line' | 'multi-line';\n\nexport interface BentoFilterBarContainerSizeLayout {\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 = undefined> {\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): Always multi-line\n * - Medium (>=430px & <700px)\n * - Small (<430px)\n *\n * @example\n * {\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 * 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 * Can be used with v-model or independently with the @input event.\n *\n * @example\n * [{\n * field: 'company',\n * label: 'Company',\n * value: '200',\n * type: FilterType.TEXT,\n * }, {\n * field: 'name',\n * label: 'Name',\n * value: null,\n * type: FilterType.TEXT,\n * }]\n *\n * @deprecated from version 2.0.0. Use the config property instead.\n */\n value?: BentoFilterBarModel;\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 :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 :value=\"internalFilterValue?.inputValue\"\n :disabled=\"disabled\"\n @input=\"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 buttonLabel = computed(() => props.label);\n const buttonSecondaryLabel = computed(() => truncate(props.value?.inputValue, 12));\n\n const dropdownSelection = computed(\n () =>\n internalFilterValue.value?.dropdownValue ??\n props.options?.dropdown?.modelValue ??\n props.options?.dropdown?.value\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 fit-content\n @apply=\"updateFilter\"\n @clear=\"clearFilter\"\n @open=\"openFilter\"\n @reset=\"resetFilter\"\n >\n <bento-date-picker\n v-if=\"onlySlot\"\n :value=\"internalFilterValue\"\n :first-day-of-week=\"options?.firstDayOfWeek\"\n :is-date-disabled=\"options?.isDateDisabled\"\n :variant=\"options?.variant\"\n :disabled=\"disabled\"\n @input=\"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 @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 { format } from 'date-fns/format';\n import { useI18n } from '@/utils/ts/i18n';\n import { getDateLocale } from '@/utils/ts/get-date-locale/get-date-locale';\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 { locale } = useI18n(undefined, true);\n const locales = getDateLocale();\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } = useBaseFilter(\n toRef(props, 'value'),\n toRef(props, 'defaultValue')\n );\n\n const formattedButtonDateText = computed(() =>\n props.value\n ? format(props.value, 'dd MMM, yyyy', {\n locale: locales[locale.value?.substring(0, 2)] || locales.enUS,\n })\n : 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 return {\n // Values\n internalFilterValue,\n isApplyButtonDisabled,\n isSecondaryButtonDisabled,\n buttonLabel,\n buttonSecondaryLabel,\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 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 :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 @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 @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 { getDateLocale } from '@/utils/ts/get-date-locale/get-date-locale';\n import { DateFormat } from '@/types/date-format';\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\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 locales = getDateLocale();\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 formatFormDate = (date: Date) =>\n date\n ? format(date, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value?.substring(0, 2)] || locales.enUS,\n })\n : undefined;\n\n const formatFormTime = (dateToFormat?: Date) => {\n if (!dateToFormat) {\n return '';\n }\n\n return format(dateToFormat, DateFormat.HOUR_MINUTE_SECONDS, {\n locale: locales[locale.value?.substring(0, 2)] || locales.enUS,\n });\n };\n\n const baseFilter = ref(null);\n const isDateIncorrect = ref(false);\n const formData = reactive({\n startDate: formatFormDate(props.value?.startDate),\n endDate: formatFormDate(props.value?.endDate),\n startTime: formatFormTime(props.value?.startDate),\n endTime: formatFormTime(props.value?.endDate),\n });\n watch(\n () => props.value,\n () => {\n formData.startDate = formatFormDate(props.value?.startDate);\n formData.endDate = formatFormDate(props.value?.endDate);\n formData.startTime = formatFormTime(props.value?.startDate);\n formData.endTime = formatFormTime(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: locales[locale.value?.substring(0, 2)] || locales.enUS,\n })} - ${format(currentValue.endDate, 'HH:mm:ss', {\n locale: locales[locale.value?.substring(0, 2)] || locales.enUS,\n })}`\n : `${format(currentValue.startDate, 'dd MMM, yyyy', {\n locale: locales[locale.value?.substring(0, 2)] || locales.enUS,\n })} - ${format(currentValue.endDate, 'dd MMM, yyyy', {\n locale: locales[locale.value?.substring(0, 2)] || locales.enUS,\n })}`;\n };\n\n const buttonSecondaryLabel = ref(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 = formatFormDate(props.value?.startDate);\n formData.endDate = formatFormDate(props.value?.endDate);\n formData.startTime = formatFormTime(props.value?.startDate);\n formData.endTime = formatFormTime(props.value?.endDate);\n };\n\n const onDateSelected = (selectedDate: BentoDateRangePickerValue) => {\n isSelectingDate.value = false;\n internalFilterValue.value = selectedDate;\n formData.startDate = formatFormDate(selectedDate.startDate);\n formData.endDate = formatFormDate(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 = formatFormDate(quickSelectRanges.startDate);\n formData.endDate = formatFormDate(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 watch(\n () => props.value,\n newValue => {\n buttonSecondaryLabel.value = calculateSecondaryLabel(newValue);\n },\n { deep: true }\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 :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 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 '@/core/utils/ts';\n import { truncate } from '@/utils/ts/truncate';\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 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;\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 \"internalFilterValue\" has the label, no need to search for it.\n if (props.options?.enableValueLabelPair) {\n const displayValue =\n internalFilterValue.value?.length > 0 ? internalFilterValue.value[0].label : props.value;\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 { onMounted, useSlots } from 'vue';\n import { deprecate } from '@/utils/ts/deprecate';\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 const props = defineProps(SelectFilterProps);\n\n const onInput = (updatedProps: any) => emit('input', updatedProps);\n const onUpdate = (updatedProps: any) => emit('update', updatedProps);\n\n onMounted(() => {\n if (props?.options?.messages) {\n deprecate(\n 'BentoFilterBar filter of type \"BentoFilterItemType.SELECT\" options message property',\n `Please remove the \"options.messages\" property from this filter, it is not required any more for persistent filters.\n This will be the default behavior in the v2 and \"options.messages\" will be removed.`,\n '2.0.0'\n );\n }\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</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 } 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 const filteredItems = ref<BentoCurrencyListboxOptions>(props.options.listboxItems);\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 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 { deprecate } from '@/utils/ts/deprecate';\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);\n const listboxItems = ref(props.options.listboxItems);\n\n watch([() => props.options.variant, () => props.options.listboxItems], () => {\n variant.value = props.options.variant;\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\n if (!variant.value || variant.value === 'custom') {\n deprecate(\n 'BentoSelectCountryFilter type with `options.variant===\"custom\"`',\n 'Use any of the other BentoSelectCountryFilter variants instead OR use BentoSelectFilter type for custom labels',\n '2.0.0'\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 <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, 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 { type BentoBooleanFilterOptions, BentoFilterEvent } from '../../filter-bar.types';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\n /**\n * Example description of the component...\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 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","<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=\"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-range-filter\" :class=\"conditionalClasses\" @keydown.enter=\"updateFilter\">\n <bento-input-field\n ref=\"inputTextRef\"\n :value=\"internalFilterValue ? internalFilterValue[0] : ''\"\n type=\"number\"\n :aria-label=\"t('from').toString()\"\n :disabled=\"disabled\"\n @input=\"updateFrom\"\n >\n {{ t('from') }}\n </bento-input-field>\n <bento-input-field\n class=\"b-range-filter__input-field\"\n :value=\"internalFilterValue ? internalFilterValue[1] : ''\"\n type=\"number\"\n :aria-label=\"t('to')\"\n :disabled=\"disabled\"\n @input=\"updateTo\"\n >\n {{ t('to') }}\n </bento-input-field>\n </div>\n </bento-base-filter>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, nextTick, type PropType, ref, toRef } from 'vue';\n import { BentoFilterEvent, type BentoRangeFilterOptions } from '../../filter-bar.types';\n import { BentoBaseFilter, useBaseFilter } from '@/components/filter-bar/components/base-filter';\n import { BentoInputField } from '@/components/input-field';\n import { truncate } from '@/utils/ts/truncate';\n import { useI18n } from '@/utils/ts/i18n';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\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 defineComponent({\n name: 'bento-range-filter',\n i18n: { messages },\n components: { BentoBaseFilter, BentoInputField },\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: Array as PropType<Array<string>>, 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: Array as PropType<Array<string>>, default: () => ['', ''] },\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 * - 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: { type: Object as PropType<BentoRangeFilterOptions>, default: undefined },\n },\n emits: [BentoFilterEvent.INPUT, BentoFilterEvent.UPDATE],\n setup(props, { emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const inputTextRef = ref(null);\n\n const { internalFilterValue, isSecondaryButtonDisabled, isApplyButtonDisabled } = useBaseFilter(\n toRef(props, 'value'),\n toRef(props, 'defaultValue')\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 rangeFromLabel = props.value?.[0] ? `${truncate(props.value[0], 5)}` : '';\n const seperator = props.value?.[0] && props.value?.[1] ? ' - ' : '';\n const rangeToLabel = props.value?.[1] ? `${truncate(props.value[1], 5)}` : '';\n\n return `${prefix}${rangeFromLabel}${seperator}${rangeToLabel}`;\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(() => inputTextRef.value.focusInput());\n };\n\n const onInput = () => {\n emit(BentoFilterEvent.INPUT, { ...props, value: internalFilterValue.value });\n };\n\n const updateFrom = newValue => {\n internalFilterValue.value = [newValue, internalFilterValue.value[1]];\n onInput();\n };\n\n const updateTo = newValue => {\n internalFilterValue.value = [internalFilterValue.value[0], newValue];\n onInput();\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\n return {\n // Values\n inputTextRef,\n conditionalClasses,\n internalFilterValue,\n isApplyButtonDisabled,\n isSecondaryButtonDisabled,\n buttonLabel,\n buttonSecondaryLabel,\n\n // Events\n updateFrom,\n updateTo,\n updateFilter,\n clearFilter,\n openFilter,\n resetFilter,\n\n // Translations\n t,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./range-filter.scss\" />\n","import { computed, ref, type Ref, 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 */\n const screenLayoutComponent = ref<'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\n setMultiLineConfig();\n } else if (containerWidth.value < LARGE_SIZE_THRESHOLD && containerWidth.value >= SMALL_SIZE_THRESHOLD) {\n // Medium screen\n if (containerSizeLayoutOptions.value.medium === 'multi-line') {\n setMultiLineConfig();\n } else {\n setOneLineConfig();\n }\n } else {\n // Small screen\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 return {\n screenLayoutComponent,\n showSearchbarInsideContainer,\n isOneLineLayout,\n };\n}\n","export enum AllFiltersModalEvent {\n INPUT = 'input',\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","\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>\n import '../css/main.css';\n\n let uuid = 0;\n\n export default {\n beforeCreate() {\n this.uuid = uuid.toString();\n uuid += 1;\n },\n };\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 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 <div\n ref=\"allFiltersModalFiltersSection\"\n class=\"b-all-filters-modal__filters\"\n @keydown.right=\"onKeydownRight\"\n >\n <bento-search-bar\n class=\"b-all-filters-modal__search-bar\"\n :value=\"searchTerm\"\n :input-field-aria-label=\"t('searchBar').toString()\"\n @input=\"searchTerm = $event\"\n @clear=\"onSearchbarClear\"\n />\n <div v-if=\"isEmptyResultForSearchFilter\" class=\"b-all-filters-modal__empty-search-message\">\n <bento-typography el=\"span\"> {{ t('noFiltersMatchThisSearch') }}</bento-typography>\n </div>\n <div v-if=\"activeFilters.length\" class=\"b-all-filters-modal__filters-section\">\n <bento-typography\n :id=\"`active-filters-${allFiltersModalUniqueId}`\"\n class=\"b-all-filters-modal__filters-section-title\"\n el=\"span\"\n variant=\"caption\"\n >\n {{ t('activeFilters') }}</bento-typography\n >\n <ul\n class=\"b-all-filters-modal__filters-list\"\n :aria-labelledby=\"`active-filters-${allFiltersModalUniqueId}`\"\n >\n <li v-for=\"item in activeFilters\" :key=\"`${item.label}-${item.field}`\">\n <all-filters-modal-button\n :ref=\"el => (allFiltersModalFilterButtons[item.label] = el)\"\n :label=\"item.label\"\n :applied-filters-count=\"getFilterCount(item)\"\n :is-filter-open=\"selectedFilter.label === item.label\"\n :disabled=\"item.disabled\"\n @click=\"selectFilter(item.label, item.field)\"\n />\n </li>\n </ul>\n </div>\n <div v-if=\"otherFilters.length\" class=\"b-all-filters-modal__filters-section\">\n <bento-typography\n v-if=\"activeFilters.length\"\n :id=\"`other-filters-${allFiltersModalUniqueId}`\"\n class=\"b-all-filters-modal__filters-section-title\"\n el=\"span\"\n variant=\"caption\"\n >\n {{ t('otherFilters') }}</bento-typography\n >\n <ul\n class=\"b-all-filters-modal__filters-list\"\n :aria-labelledby=\"`other-filters-${allFiltersModalUniqueId}`\"\n >\n <li v-for=\"item in otherFilters\" :key=\"`${item.label}-${item.field}`\">\n <all-filters-modal-button\n :ref=\"el => (allFiltersModalFilterButtons[item.label] = el)\"\n :label=\"item.label\"\n :disabled=\"item.disabled\"\n :applied-filters-count=\"getFilterCount(item)\"\n :is-filter-open=\"selectedFilter.label === item.label\"\n @click=\"selectFilter(item.label, item.field)\"\n />\n </li>\n </ul>\n </div>\n </div>\n </template>\n <template #content-col-2>\n <div class=\"b-all-filters-modal__selected-filter-content\" @keydown.left=\"onKeydownLeft\">\n <div class=\"b-all-filters-modal__selected-filter-text\">\n <bento-typography el=\"div\" variant=\"title\" medium>{{ selectedFilter.label }}</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 :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 @input=\"updateFilter\"\n />\n </div>\n <div class=\"b-all-filters-modal__clear-button\">\n <bento-button variant=\"secondary\" :disabled=\"isClearButtonDisabled\" @click=\"clearFilter\">{{\n t('clear')\n }}</bento-button>\n </div>\n </div>\n </template>\n </bento-modal>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, onBeforeUpdate, onMounted, type PropType, ref, toRef, watch } from 'vue';\n import BentoModal from '@/components/modal/modal.vue';\n import { BentoButton } from '@/components/button';\n import {\n type BentoFilterBarModel,\n BentoFilterItemType,\n type BentoFilterModel,\n type BentoSelectFilterOptions,\n } from '@/components/filter-bar/filter-bar.types';\n import {\n BentoBooleanFilter,\n BentoDateFilter,\n BentoDateRangeFilter,\n BentoInputFilter,\n BentoInputWithDropdownFilter,\n BentoRangeFilter,\n BentoSelectAvatarFilter,\n BentoSelectCountryFilter,\n BentoSelectCurrencyFilter,\n BentoSelectFilter,\n BentoSelectPaymentMethodFilter,\n BentoSelectTagFilter,\n } from '../index';\n import { type BentoDateRangePickerValue } from '@/components/date-range-picker';\n import BentoSearchBar from '@/components/search-bar/search-bar.vue';\n import { BentoTypography } from '@/components/typography';\n import { useSearchBarFilter } from '@/components/search-bar';\n import { generateUid } from '@/core/utils/ts';\n import { getNextFocusableElement } from '@/utils/ts/focus-trap.utils';\n import { FilterBarButton } from '../filter-bar-button';\n import { AllFiltersModalEvent } from './all-filters-modal.types';\n import { useI18n } from '@/utils/ts/i18n';\n import AllFiltersModalButton from './components/all-filters-modal-button/all-filters-modal-button.vue';\n import SlidersIcon from '@adyen/ui-assets-icons-16/vue/sliders-1';\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n\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 defineComponent({\n i18n: { messages },\n name: 'all-filters-modal',\n components: {\n AllFiltersModalButton,\n BentoBooleanFilter,\n BentoButton,\n BentoDateFilter,\n BentoDateRangeFilter,\n BentoInputFilter,\n BentoInputWithDropdownFilter,\n BentoModal,\n BentoRangeFilter,\n BentoSearchBar,\n BentoSelectAvatarFilter,\n BentoSelectCurrencyFilter,\n BentoSelectCountryFilter,\n BentoSelectFilter,\n BentoSelectPaymentMethodFilter,\n BentoSelectTagFilter,\n BentoTypography,\n FilterBarButton,\n SlidersIcon,\n },\n props: {\n /**\n * Array of filters based on {@see FilterBarModel}.\n * Each one of the elements in the array correspond to a filter that will\n * be created and rendered in the AllFiltersModal.\n *\n * Can be used with v-model or independently with the @input event.\n *\n * @example\n * [{\n * field: 'company',\n * label: 'Company',\n * value: '200',\n * type: FilterType.TEXT,\n * }, {\n * field: 'name',\n * label: 'Name',\n * value: null,\n * type: FilterType.TEXT,\n * }]\n */\n value: {\n type: Array as PropType<BentoFilterBarModel>,\n default: () => [],\n },\n },\n emits: [AllFiltersModalEvent.INPUT],\n setup(props, { emit }) {\n const filtersInModal = ref(props.value);\n const allFiltersModalUniqueId = generateUid('all-filters-modal');\n const allFiltersModalFiltersSection = ref([]);\n const isModalOpen = ref(false);\n const selectedFilterIndex = ref(0);\n const selectedFilterRef = ref(null);\n const searchTerm = ref<string>('');\n\n const { t, n } = useI18n<{ message: MessageSchema }>({ messages });\n const filteredItems = useSearchBarFilter<BentoFilterModel>(searchTerm, toRef(filtersInModal, 'value'));\n\n const allFiltersModalFilterButtons = ref({});\n onBeforeUpdate(() => {\n allFiltersModalFilterButtons.value = [];\n });\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: BentoFilterBarModel) =>\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)\n ? el.value?.length === 0 || el.value?.every(item => item === '')\n : !el.value\n )\n )\n );\n\n const isEmptyResultForSearchFilter = computed(() => searchTerm.value && filteredItems.value?.length === 0);\n\n const selectedFilter = computed(() => filtersInModal.value[selectedFilterIndex.value]);\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 onMounted(() => {\n selectOpenedFilter();\n });\n\n const computeCounts = (filterValue: BentoFilterBarModel) =>\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.INPUT:\n case BentoFilterItemType.BOOLEAN:\n case BentoFilterItemType.DATE:\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 hasValueSelected = computed(() =>\n Array.isArray(selectedFilter.value.value)\n ? selectedFilter.value?.value.length && selectedFilter.value.value.find(item => item !== '')\n : !!filtersInModal.value[selectedFilterIndex.value].value\n );\n\n const isClearButtonDisabled = computed(() => !hasValueSelected.value || selectedFilter.value.disabled);\n\n const numberOfActiveFilters = computed(\n () => computeCounts(props.value)?.filter(({ count }) => !!count).length\n );\n\n const onClickAllFiltersModal = () => {\n if (!isModalOpen.value) {\n isModalOpen.value = true;\n } else {\n isModalOpen.value = false;\n }\n };\n\n const getFilterCount = (filter: BentoFilterModel) => {\n const filterCount = computeCounts(filtersInModal.value).find(el => el.field === filter.field).count;\n\n if (\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 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 };\n\n const onSearchbarClear = () => {\n searchTerm.value = '';\n };\n\n const cancel = () => {\n isModalOpen.value = false;\n filtersInModal.value = props.value;\n onSearchbarClear();\n selectOpenedFilter();\n // TODO: scroll filters section to top\n };\n\n const updateFilter = (updatedFilter: BentoFilterModel) => {\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 clearFilter = () => {\n updateFilter({\n field: selectedFilter.value.field,\n label: selectedFilter.value.label,\n type: selectedFilter.value.type,\n value: undefined,\n });\n };\n\n const clearAll = () => {\n filtersInModal.value = props.value.map(({ value, ...otherFields }) => ({\n ...otherFields,\n value: undefined,\n }));\n };\n\n const applyAll = () => {\n emit(AllFiltersModalEvent.INPUT, filtersInModal.value);\n isModalOpen.value = false;\n };\n\n const isApplyAllButtonDisabled = computed(\n () => JSON.stringify(filtersInModal.value) === JSON.stringify(props.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('clearAll'),\n disabled: !numberOfActiveFilters.value,\n event: clearAll,\n },\n ]);\n\n const onKeydownRight = () => {\n const focusableEl = getNextFocusableElement(1, selectedFilterRef.value.$el);\n focusableEl.focus();\n };\n\n const onKeydownLeft = () => {\n allFiltersModalFilterButtons.value[selectedFilter.value.label].$el.focus();\n };\n\n return {\n // Values\n allFiltersModalUniqueId,\n allFiltersModalFiltersSection,\n allFiltersModalFilterButtons,\n numberOfActiveFilters,\n isEmptyResultForSearchFilter,\n isModalOpen,\n isClearButtonDisabled,\n activeFilters,\n otherFilters,\n modalActions,\n selectedFilter,\n selectedFilterRef,\n searchTerm,\n\n // Methods\n onClickAllFiltersModal,\n getFilterCount,\n cancel,\n selectFilter,\n clearFilter,\n updateFilter,\n onSearchbarClear,\n onKeydownRight,\n onKeydownLeft,\n\n // Translations\n t,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./all-filters-modal.scss\" />\n","<template>\n <div ref=\"filterBarRef\" class=\"b-filter-bar\">\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 @input=\"onSearchbarInput\"\n @clear=\"onSearchbarClear\"\n />\n </div>\n\n <component :is=\"screenLayoutComponent\" :class=\"containerConditionalClasses\" condensed>\n <div :class=\"contentConditionalClasses\">\n <div v-if=\"showSearchbarInsideContainer && isSearchBarEnabled\">\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=\"valueAndFilterValuesPropsMerged\"\n @input=\"updateAllFilters\"\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\" generic=\"\">\n import { computed, ref, toRef } from 'vue';\n import { FilterBarButton } from './components/filter-bar-button';\n import {\n BentoFilterBarEvent,\n type BentoFilterBarModel,\n type BentoFilterBarProps,\n type BentoFilterModel,\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: () => ({\n medium: 'one-line',\n small: 'multi-line',\n }) },\n search: { default: undefined },\n searchTerm: { default: undefined },\n showAppliedHiddenFilters: { type: Boolean, default: false },\n value: { default: () => [] },\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<BentoFilterBarModel>(() =>\n (props.config?.length > 0 ? props.config : props.value)?.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 // If the filter is using the deprecated `config` value prop use that\n // But if that is also not set then check if a default value exists set it to that if it is defined.\n filterValue =\n filterModel?.value === undefined && filterModel?.defaultValue !== undefined\n ? filterModel?.defaultValue\n : filterModel?.value;\n }\n\n return { ...filterModel, value: filterValue !== undefined ? filterValue : filterModel?.value };\n })\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 { screenLayoutComponent, showSearchbarInsideContainer, isOneLineLayout } = useContainerSizeOptionsLayout(\n filterBarRef,\n toRef(props, 'containerSizeLayout')\n );\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 hasHiddenFilters = computed(() => {\n // Has props with visible set\n const hasVisibleSet = valueAndFilterValuesPropsMerged.value.some(\n ({ visible }) => visible !== undefined && visible !== null\n );\n return hasVisibleSet ? 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(({ defaultValue }) => defaultValue !== undefined)\n );\n // Show non-persistent & visible filters\n const regularFilters = computed(() => {\n const hasVisibleSet = valueAndFilterValuesPropsMerged.value.some(\n ({ visible }) => visible !== undefined && visible !== null\n );\n // If no filter has the `visible` prop set then all are visible, otherwise search for the \"visible: true\" elements\n return hasVisibleSet\n ? valueAndFilterValuesPropsMerged.value.filter(\n ({ defaultValue, visible, value }) =>\n // eslint-disable-next-line eqeqeq\n (defaultValue === undefined && visible) || (props.showAppliedHiddenFilters && value != undefined)\n )\n : valueAndFilterValuesPropsMerged.value.filter(\n ({ defaultValue, value }) =>\n // eslint-disable-next-line eqeqeq\n defaultValue === undefined || (props.showAppliedHiddenFilters && value != undefined)\n );\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(() => persistentFilters.value.length === 0 && hasActiveFilters.value);\n\n const isResetAllVisible = computed(() => {\n if (persistentFilters.value.length === 0) {\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: BentoFilterBarModel) => {\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 = (updatedFilter: BentoFilterModel) => {\n const filterIndex = valueAndFilterValuesPropsMerged.value.findIndex(\n filter => filter.field === updatedFilter.field\n );\n const newFilters = valueAndFilterValuesPropsMerged.value.slice();\n newFilters[filterIndex].value = updatedFilter.value;\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 BentoDateFilter,\n BentoDateRangeFilter,\n BentoInputFilter,\n BentoInputWithDropdownFilter,\n BentoRangeFilter,\n BentoSelectAvatarFilter,\n BentoSelectCountryFilter,\n BentoSelectCurrencyFilter,\n BentoSelectFilter,\n BentoSelectPaymentMethodFilter,\n BentoSelectTagFilter,\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 * filters: [{\n * field: 'name',\n * label: 'Name',\n * value: null,\n * options: { ... },\n * type: FilterType.TEXT,\n * }]\n * }),\n * template: `\n * <bento-filter-bar\n * v-model=\"filter\"\n * />\n * `\n * }\n */\n export default {\n i18n: { messages },\n name: 'bento-filter-bar',\n components: {\n BentoBooleanFilter,\n BentoDateFilter,\n BentoDateRangeFilter,\n BentoInputFilter,\n BentoInputWithDropdownFilter,\n BentoRangeFilter,\n BentoSelectAvatarFilter,\n BentoSelectCountryFilter,\n BentoSelectCurrencyFilter,\n BentoSelectFilter,\n BentoSelectPaymentMethodFilter,\n BentoSelectTagFilter,\n BentoTeleport,\n FixedScroller,\n },\n };\n</script>\n\n<style lang=\"scss\" scoped src=\"./filter-bar.scss\" />\n"],"names":["__default__$9","slots","useSlots","attrs","useAttrs","hasSlot","useHasSlot","labelSlot","computed","getSlotText","isIconOnly","computedAriaLabel","useAriaLabel","filterBarButtonRef","ref","ariaAttributes","_a","isAppliedFilter","props","conditionalClasses","event","emit","__default__$8","BaseFilterEvent","BaseFilterEvent2","__default__$7","messages$7","t","useI18n","popoverId","generateUid","isFilterOpen","filterButtonRef","popoverRef","isPersistentFilter","isValueChanged","ariaLabelValuePart","computedButtonText","computedClearButtonLabel","resetFocus","nextTick","_b","closePopover","resetFilter","onClickSecondaryAction","onClickFilter","onClickApply","onCancel","onClickOutside","actions","watch","value","prevValue","useClickOutside","expose","isArray","isValueEmpty","el","isEqual","first","second","useBaseFilter","appliedFilter","defaultFilter","internalFilterValue","isFilterInactive","isSecondaryButtonDisabled","isApplyButtonDisabled","__default__$6","inputTextRef","dropdownValue","isDropdownVariant","dropdownProp","inputVariant","valueProp","toRef","buttonLabel","buttonSecondaryLabel","truncate","onBeforeUpdate","openFilter","updateFilter","clearFilter","onInput","setInternalFilterValue","onDropdownInput","selectedValue","provide","INPUT_FILTER_POPOVER_INJECTION_KEY","_c","deprecate","BentoFilterEvent","BentoFilterEvent2","BentoFilterBarEvent","BentoFilterBarEvent2","BentoFilterItemType","BentoFilterItemType2","__default__$5","dropdownSelection","_e","_d","dropdownOptions","shouldDisableApply","INPUT_FILTER_WITH_DROPDOWN_POPOVER_INJECTION_KEY","_sfc_main$g","defineComponent","BentoBaseFilter","BentoDatePicker","BentoDivider","Calendar","locale","locales","getDateLocale","formattedButtonDateText","format","onDateSelected","selectedDate","_sfc_main$f","messages$6","BentoButtonActions","BentoDateRangePicker","BentoTypography","DateRangePickerCalendar","isSelectingDate","adjustedQuickSelectRanges","range","timeDiff","formatFormDate","date","DateFormat","formatFormTime","dateToFormat","baseFilter","isDateIncorrect","formData","reactive","isQuickSelectAnArray","quickSelectRanges","calculateSecondaryLabel","currentValue","customRangeSelected","data","isEqual$1","isToday","isSameDay","_f","_g","_h","_i","_j","onlySlot","cleanedProps","onRangeSelectorInput","onDateInputSelected","onDatePickerRangeError","onDatePickerRangeFormDateInputUpdate","dateFormDate","newValue","__default__$4","messages$5","searchTerm","optionsRef","itemsRef","cachedSelectedListboxOptions","setCachedValues","resetCache","useCachedSelectedValues","cachedDefaultSelectedListboxOptions","filteredItems","useSearchBarFilter","noResultsMessage","isSingleSelectAndOneItemSelected","isMultiSelectedAndOneItemSelected","displayValue2","displayValue","x","listboxFilterId","onOptionSelected","value2","value3","closeFilter","appliedFiltersCount","allSelectableItemsCount","acc","item","selectedAmount","__default__$3","messages$4","SelectFilterProps","__default__$2","updatedProps","onUpdate","onMounted","_sfc_main$b","BentoSelectFilter","BentoAvatar","_","_sfc_main$a","ListboxOptionTag","search","searchableItems","searchResults","normalizedResults","result","internalOptions","__default__$1","variant","listboxItems","countryItems","useCountryItems","countryOptions","_sfc_main$8","BentoPaymentMethod","_props","_sfc_main$7","tagItems","label","_sfc_main$6","messages$3","BentoRadioGroup","translateBooleanToString","aStringOrBooleanValue","translateBackToOriginalValueType","translatedDefaultValue","translatedValue","items","_sfc_main$5","messages$2","BentoInputField","truncatedRangeValues","prefix","rangeFromLabel","seperator","rangeToLabel","updateFrom","updateTo","SMALL_SIZE_THRESHOLD","LARGE_SIZE_THRESHOLD","useContainerSizeOptionsLayout","target","containerSizeLayoutOptions","screenLayoutComponent","isOneLineLayout","containerWidth","showSearchbarInsideContainer","setMultiLineConfig","setOneLineConfig","FixedScroller","calculateConfig","useResizeObserver","entries","AllFiltersModalEvent","AllFiltersModalEvent2","_sfc_main$4","BaseButton","ChevronUpIcon","ChevronDownIcon","BentoBaseButtonEvent","baseFilterButtonRef","_sfc_main$3","BaseFilterButton","uuid","_sfc_main$2","_sfc_main$1","messages$1","AllFiltersModalButton","BentoBooleanFilter","BentoButton","BentoDateFilter","BentoDateRangeFilter","BentoInputFilter","BentoInputWithDropdownFilter","BentoModal","BentoRangeFilter","BentoSearchBar","BentoSelectAvatarFilter","BentoSelectCurrencyFilter","BentoSelectCountryFilter","BentoSelectPaymentMethodFilter","BentoSelectTagFilter","FilterBarButton","SlidersIcon","filtersInModal","allFiltersModalUniqueId","allFiltersModalFiltersSection","isModalOpen","selectedFilterIndex","selectedFilterRef","n","allFiltersModalFilterButtons","filter","index","sortAlphabetically","array","a","b","activeFilters","otherFilters","isEmptyResultForSearchFilter","selectedFilter","selectOpenedFilter","openedFilter","openedFilterIndex","computeCounts","filterValue","hasValueSelected","isClearButtonDisabled","numberOfActiveFilters","count","onClickAllFiltersModal","getFilterCount","filterCount","selectFilter","filterLabel","filterField","onSearchbarClear","cancel","updatedFilter","updatedFilters","otherFields","clearAll","applyAll","isApplyAllButtonDisabled","modalActions","getNextFocusableElement","__default__","messages","BentoTeleport","filterBarRef","valueAndFilterValuesPropsMerged","filterModel","field","addToast","useBentoToastController","containerConditionalClasses","contentConditionalClasses","searchBarAriaLabel","searchBarProps","debounceTime","disabled","inputFieldAriaLabel","hint","placeholder","hasHiddenFilters","visible","persistentFilters","defaultValue","regularFilters","isSearchBarEnabled","hasActiveFilters","isClearAllVisible","isResetAllVisible","updateAllFilters","newFilters","updateFilterHandler","filterIndex","clearAllFilters","previousFilters","clearedFilters","resetAllFilters","resetFilters","onSearchbarInput","newSearchTerm","BentoSearchBarEvent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuJI,MAAAA,KAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAlDAC,IAAAC,GAAA,GACAC,IAAAC,GAAA,GACAC,IAAAC,GAAAL,CAAA,GACAM,IAAAC,EAAA,MAAAP,EAAA,UAAAQ,GAAAR,CAAA,EAAA,SAAA,IAAA,IAAA,GACAS,IAAAF,EAAA,MAAA,CAAAH,EAAA,SAAA,KAAAA,EAAA,UAAA,CAAA,GACAM,IAAAC,GAAA,EAAA,WAAAL,EAAA,CAAA,GACAM,IAAAC,EAAA,IAAA,GAEAC,IAAAP,EAAA,MAAA;;AAAA;AAAA,QAAuC,kBAAAQ,IAAAb,EAAA,eAAA,MAAA,gBAAAa,EAAA;AAAA,MACe;AAAA,KAAA,GAGtDC,IAAAT;AAAA,MAAwB,OAAAU,EAAA,uBAAAA,EAAA,kBAAAA,EAAA,uBAAA,CAAAA,EAAA;AAAA,IAGT,GAGfC,IAAAX,EAAA,OAAA;AAAA,MAA2C,gCAAAS,EAAA;AAAA,MACS,oCAAAC,EAAA,gBAAA,CAAAD,EAAA;AAAA,MAC2B,4CAAAC,EAAA,gBAAAD,EAAA;AAAA,MACO,6CAAAC,EAAA;AAAA,MAC/B,qCAAAA,EAAA;AAAA,MACR,kCAAAR,EAAA;AAAA,IACE,EAAA;kOAGjD,CAAAU,MAAA;AACI,MAAAA,EAAA,eAAA,GACAF,EAAA,YACI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