@leaflink/stash 49.3.1 → 49.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/AddressSelect.js +2 -2
  2. package/dist/Badge.vue.d.ts +1 -1
  3. package/dist/CurrencyInput.js +4 -3
  4. package/dist/CurrencyInput.js.map +1 -1
  5. package/dist/CurrencyInput.vue.d.ts +4 -0
  6. package/dist/DataViewFilters.js +68 -65
  7. package/dist/DataViewFilters.js.map +1 -1
  8. package/dist/DataViewFilters.vue.d.ts +12 -5
  9. package/dist/DatePicker.js +2 -2
  10. package/dist/Field.js +2 -2
  11. package/dist/Field.vue.d.ts +7 -0
  12. package/dist/{Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js → Field.vue_vue_type_script_setup_true_lang-3ea26741.js} +22 -19
  13. package/dist/Field.vue_vue_type_script_setup_true_lang-3ea26741.js.map +1 -0
  14. package/dist/FilterSelect.js +2 -2
  15. package/dist/Filters.js +2 -2
  16. package/dist/Filters.vue.d.ts +38 -0
  17. package/dist/InlineEdit.js +2 -2
  18. package/dist/Input.js +61 -59
  19. package/dist/Input.js.map +1 -1
  20. package/dist/Input.vue.d.ts +7 -0
  21. package/dist/InputOptions.js +52 -49
  22. package/dist/InputOptions.js.map +1 -1
  23. package/dist/InputOptions.vue.d.ts +7 -0
  24. package/dist/Label.js +1 -1
  25. package/dist/Label.vue.d.ts +6 -0
  26. package/dist/Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js +43 -0
  27. package/dist/Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js.map +1 -0
  28. package/dist/ListView.js +2 -2
  29. package/dist/ListView.vue.d.ts +76 -19
  30. package/dist/RadioGroup.js +2 -2
  31. package/dist/SearchBar.js +2 -2
  32. package/dist/Select.js +82 -81
  33. package/dist/Select.js.map +1 -1
  34. package/dist/SelectStatus.js +2 -2
  35. package/dist/TextEditor.js +6 -6
  36. package/dist/TextEditor.js.map +1 -1
  37. package/dist/Textarea.js +38 -34
  38. package/dist/Textarea.js.map +1 -1
  39. package/dist/Textarea.vue.d.ts +7 -0
  40. package/dist/components.css +2 -2
  41. package/package.json +1 -1
  42. package/dist/Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js.map +0 -1
  43. package/dist/Label.vue_vue_type_script_setup_true_lang-4b02087f.js +0 -38
  44. package/dist/Label.vue_vue_type_script_setup_true_lang-4b02087f.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"DataViewFilters.js","sources":["../src/components/DataViewFilters/useFilters.ts","../src/components/DataViewFilters/DataViewFilters.vue"],"sourcesContent":["import cloneDeep from 'lodash-es/cloneDeep';\nimport { computed, ComputedRef, Ref, ref } from 'vue';\n\nimport isDefined from '../../composables/useValidation/utils/isDefined';\nimport DataView from '../DataView/DataView.vue';\n\ntype DataViewInstance = InstanceType<typeof DataView>;\n\n/**\n * Contains metadata and configuration for the filters.\n * @see https://www.typescriptlang.org/docs/handbook/2/mapped-types.html\n */\nexport type UseFiltersSchema<Values extends object, Groups extends string> = {\n [Property in keyof Values]: {\n defaultValue?: Values[Property];\n group?: Groups;\n isActive?: (value: Values[Property]) => boolean;\n };\n};\n\nexport interface UseFiltersArgs<Values extends object, Groups extends string> {\n schema: UseFiltersSchema<Values, Groups>;\n /** A ref for an instance of DataView */\n dataViewRef: Ref<unknown>; // Note: using `Ref<InstanceType<typeof DataView>>` here causes type errors when providing a value for this argument\n}\n\nexport interface UseFiltersReturnType<Values = object, Groups extends string = string> {\n applyFilters: () => void;\n resetAllFilters: () => void;\n resetFilterGroup: (group: string) => void; // Note: group is intentionally not typed as `Groups` since there is no way to pass in a Groups type to UseFiltersReturnType within DataViewFilters.vue\n undoWorkingFilters: () => void;\n activeFiltersCounts: ComputedRef<Record<Groups, number>>;\n totalActiveFiltersCount: ComputedRef<number>;\n appliedFilters: Ref<Values>;\n workingFilters: Ref<Values>;\n}\n\n/**\n * Provides utility functions for working with `DataViewFilters`.\n */\nexport function useFilters<Values extends object, Groups extends string>({\n schema,\n dataViewRef,\n}: UseFiltersArgs<Values, Groups>): UseFiltersReturnType<Values, Groups> {\n const appliedFilters = ref({}) as Ref<Values>;\n const workingFilters = ref({}) as Ref<Values>;\n\n for (const filterName in schema) {\n // @ts-expect-error \"could be instantiated with an arbitrary type\"; TODO: figure out how to resolve the types\n appliedFilters.value[filterName] = schema[filterName].defaultValue;\n // @ts-expect-error \"could be instantiated with an arbitrary type\"; TODO: figure out how to resolve the types\n workingFilters.value[filterName] = schema[filterName].defaultValue;\n }\n\n const dvRef = dataViewRef as Ref<DataViewInstance>;\n\n /**\n * For when an \"Apply\" button is clicked. It does the following:\n * 1) applies the working filter state\n * 2) sets the current page to 1\n * 3) emits the \"update\" event from DataView\n */\n function applyFilters() {\n appliedFilters.value = cloneDeep(workingFilters.value);\n dvRef.value.updateCurrentFilters(appliedFilters.value, { shouldEmit: true });\n }\n\n /**\n * For when a \"Reset all\" button is clicked. It does the following:\n * 1) applies the defaultValue filter values to all filters\n * 2) sets the current page to 1\n * 3) emits the \"update\" event from DataView\n */\n function resetAllFilters() {\n for (const filterName in schema) {\n // @ts-expect-error \"could be instantiated with an arbitrary type\"; TODO: figure out how to resolve the types\n appliedFilters.value[filterName] = schema[filterName].defaultValue;\n // @ts-expect-error \"could be instantiated with an arbitrary type\"; TODO: figure out how to resolve the types\n workingFilters.value[filterName] = schema[filterName].defaultValue;\n }\n\n dvRef.value.updateCurrentFilters(appliedFilters.value, { shouldEmit: true });\n }\n\n /**\n * For when a \"Reset\" button is clicked. It does the following:\n * 1) applies the defaultValue filter values to the given filter group\n * 2) sets the current page to 1\n * 3) emits the \"update\" event from DataView\n */\n function resetFilterGroup(group: Groups) {\n for (const filterName in schema) {\n if (schema[filterName].group === group) {\n // @ts-expect-error \"could be instantiated with an arbitrary type\"; TODO: figure out how to resolve the types\n appliedFilters.value[filterName] = schema[filterName].defaultValue;\n // @ts-expect-error \"could be instantiated with an arbitrary type\"; TODO: figure out how to resolve the types\n workingFilters.value[filterName] = schema[filterName].defaultValue;\n }\n }\n\n dvRef.value.updateCurrentFilters(appliedFilters.value, { shouldEmit: true });\n }\n\n /**\n * Resets the `workingFilters` to match the `appliedFilters`. This can be used when the FilterDrawer or a FilterDropdown is dismissed without clicking \"Reset\" or \"Apply\".\n */\n function undoWorkingFilters() {\n workingFilters.value = cloneDeep(appliedFilters.value);\n }\n\n const activeFiltersCounts = computed(() => {\n const counts = {} as Record<Groups, number>;\n\n for (const filterName in schema) {\n const config = schema[filterName];\n const value = appliedFilters.value[filterName];\n const isActive = config.isActive?.(value) || isDefined(value);\n\n if (isActive && config.group) {\n counts[config.group] = (counts[config.group] ?? 0) + 1;\n }\n }\n\n return counts;\n });\n\n const totalActiveFiltersCount = computed(() => {\n let count = 0;\n\n for (const filterName in schema) {\n const config = schema[filterName];\n const value = appliedFilters.value[filterName];\n const isActive = config.isActive?.(value) || isDefined(value);\n\n if (isActive) {\n count += 1;\n }\n }\n\n return count;\n });\n\n return {\n applyFilters,\n resetAllFilters,\n // @ts-expect-error \"could be instantiated with a different subtype\": TODO: figure out how to resolve the types\n resetFilterGroup,\n undoWorkingFilters,\n activeFiltersCounts,\n totalActiveFiltersCount,\n appliedFilters,\n workingFilters,\n };\n}\n\nexport default useFilters;\n","<script lang=\"ts\">\n export * from './DataViewFilters.keys';\n export * from './DataViewFilters.types';\n export * from './useFilters';\n</script>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide, ref, watch } from 'vue';\n\n import useMediaQuery from '../../composables/useMediaQuery/useMediaQuery';\n import { SCREEN_SIZES } from '../../constants';\n import { t } from '../../locale';\n import Box from '../Box/Box.vue';\n import Button from '../Button/Button.vue';\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.vue';\n import FilterChip from '../FilterChip/FilterChip.vue';\n import Icon from '../Icon/Icon.vue';\n import Label from '../Label/Label.vue';\n import Modal, { type ModalProps } from '../Modal/Modal.vue';\n import SearchBar, { SearchBarProps } from '../SearchBar/SearchBar.vue';\n import { DATA_VIEW_FILTERS_UTILS_INJECTION } from './DataViewFilters.keys';\n import type { DrawerStyle, OnApplyFilters } from './DataViewFilters.types';\n import type { UseFiltersReturnType } from './useFilters';\n\n export interface DataViewFiltersProps {\n filtersLabelText?: string;\n /**\n * Props to pass to the `SearchBar` component.\n */\n searchBarProps?: SearchBarProps;\n showSearch?: boolean;\n /** 'cascade' displays all fields within every filter group; 'nested' displays only the group names and requires clicking a group to view its fields */\n drawerStyle?: DrawerStyle;\n drawerProps?: ModalProps;\n /**\n * @deprecated The `activeGroup` prop is a sufficient replacement for this prop. A falsy `activeGroup` will hide the button and a truthy `activeGroup` will show it (when the `drawerStyle` is 'nested').\n *\n * **Note:** This prop has no effect when using a \"cascade\" `drawerStyle`.\n */\n showDrawerPreviousButton?: boolean;\n /**\n * Required when using filters. This prop should contain the return value of the `useFilters()` composable.\n */\n useFiltersInstance?: UseFiltersReturnType;\n onApply?: OnApplyFilters;\n /**\n * The name of the active filter group. The active filter group is determined by which instance of FilterDropdown or FilterDrawerItem is open.\n *\n * **Note:** This prop is required when using a \"nested\" `drawerStyle`, but has no effect when using a \"cascade\" `drawerStyle`.\n */\n activeGroup?: string;\n }\n\n export interface DataViewFiltersSlots {\n default?: void;\n drawer?: void;\n 'filters-label'?: void;\n }\n\n const props = withDefaults(defineProps<DataViewFiltersProps>(), {\n filtersLabelText: t('ll.filterBy'),\n isLoading: false,\n drawerStyle: 'nested',\n drawerProps: undefined,\n searchBarProps: undefined,\n showDrawerPreviousButton: false,\n showSearch: true,\n useFiltersInstance: undefined,\n onApply: undefined,\n activeGroup: undefined,\n });\n\n const emit = defineEmits<{\n /** When the drawer is opened */\n (e: 'open-drawer'): void;\n /** When the drawer is dismissed */\n (e: 'dismiss'): void;\n /** When the \"Previous\" button in the header is clicked */\n (e: 'previous'): void;\n /** When the \"Reset\" button is clicked while viewing a filter group */\n (e: 'reset-group'): void;\n /** When one of the \"Reset All\" buttons is clicked */\n (e: 'reset-all'): void;\n }>();\n\n const slots = defineSlots<DataViewFiltersSlots>();\n\n const isDesktop = useMediaQuery(`(min-width: ${SCREEN_SIZES.lg})`);\n const isViewingGroupsMenu = computed(() => props.drawerStyle === 'nested' && !props.activeGroup);\n const isViewingSingleGroup = computed(() => props.drawerStyle === 'nested' && props.activeGroup);\n\n const {\n density,\n isLoading: isDataViewLoading,\n isWithinModule,\n currentSearch,\n updateCurrentSearch,\n } = inject(DATA_VIEW_INJECTION.key, DATA_VIEW_INJECTION.defaults);\n\n provide(DATA_VIEW_FILTERS_UTILS_INJECTION.key, {\n useFiltersInstance: props.useFiltersInstance,\n drawerStyle: props.drawerStyle,\n });\n\n const totalActiveFiltersCount = computed(() => props.useFiltersInstance?.totalActiveFiltersCount.value ?? 0);\n /** The number of active filters in the currently active group. This is only used when the drawerStyle is 'nested'. */\n const activeGroupActiveFiltersCount = computed(\n () => Number(props.activeGroup && props.useFiltersInstance?.activeFiltersCounts.value[props.activeGroup]) || 0,\n );\n const isDrawerOpen = ref(false);\n\n async function handleApplyClick() {\n const { preventDismiss } = (await props.onApply?.()) || props.useFiltersInstance?.applyFilters() || {};\n\n if (!preventDismiss) {\n isDrawerOpen.value = false;\n }\n }\n\n function handleResetGroupClick() {\n if (!props.activeGroup) {\n return;\n }\n\n props.useFiltersInstance?.resetFilterGroup(props.activeGroup);\n emit('reset-group');\n isDrawerOpen.value = false;\n }\n\n function handleResetAllClick() {\n props.useFiltersInstance?.resetAllFilters();\n emit('reset-all');\n isDrawerOpen.value = false;\n }\n\n function onDismiss() {\n props.useFiltersInstance?.undoWorkingFilters();\n isDrawerOpen.value = false;\n emit('dismiss');\n }\n\n watch(isDrawerOpen, () => {\n if (isDrawerOpen.value) {\n emit('open-drawer');\n }\n });\n</script>\n\n<template>\n <Box\n class=\"stash-data-view-filters tw-grid tw-grid-cols-12 tw-gap-6 tw-p-3\"\n :class=\"{ 'lg:tw-p-6': density === 'comfortable', 'tw-mb-3': !isWithinModule }\"\n :radius=\"isWithinModule ? 'none' : 'rounded'\"\n data-test=\"stash-data-view-filters\"\n disable-padding\n >\n <SearchBar\n v-if=\"props.showSearch\"\n class=\"tw-col-span-12 md:tw-col-span-6 lg:tw-col-span-4\"\n data-test=\"stash-data-view-filters|search-bar\"\n :is-loading=\"isDataViewLoading\"\n :label=\"t('ll.search')\"\n :model-value=\"currentSearch\"\n v-bind=\"props.searchBarProps\"\n @search=\"(searchTerm) => updateCurrentSearch(searchTerm, { shouldEmit: true })\"\n />\n <div\n v-if=\"slots.default\"\n class=\"tw-col-span-12 tw-row-start-2 md:tw-col-start-7 md:tw-row-start-1 lg:tw-col-span-8 lg:tw-col-start-5\"\n >\n <div class=\"tw-hidden md:tw-block\">\n <slot name=\"filters-label\">\n <Label>{{ props.filtersLabelText }}</Label>\n </slot>\n </div>\n <div class=\"tw-flex tw-gap-4\">\n <FilterChip\n secondary\n class=\"!tw-flex tw-w-full tw-justify-center tw-gap-4 md:!tw-inline-flex md:tw-w-auto\"\n data-test=\"stash-data-view-filters|drawer-toggle-button\"\n :filter-count=\"totalActiveFiltersCount\"\n @click=\"isDrawerOpen = true\"\n >\n <span class=\"tw-inline-flex tw-items-center tw-gap-3\">\n <Icon name=\"filter-line\" class=\"tw-text-ice-700\" />\n <span>{{ t('ll.filters') }}</span>\n </span>\n </FilterChip>\n <slot v-if=\"isDesktop\"></slot>\n <Button v-if=\"totalActiveFiltersCount > 0 && isDesktop\" inline @click=\"handleResetAllClick\">\n {{ t('ll.resetAll') }}\n </Button>\n </div>\n </div>\n <Modal\n v-if=\"slots.drawer\"\n data-test=\"stash-data-view-filters|drawer\"\n disable-body-padding\n position=\"right\"\n :is-open=\"isDrawerOpen\"\n :title=\"t('ll.allFilters')\"\n v-bind=\"props.drawerProps\"\n @dismiss=\"onDismiss\"\n >\n <template #headerAction>\n <Button\n v-if=\"isViewingSingleGroup\"\n icon\n class=\"tw-text-ice-100\"\n data-test=\"stash-data-view-filters|drawer-previous-button\"\n :aria-label=\"t('ll.previous')\"\n :title=\"t('ll.previous')\"\n @click=\"emit('previous')\"\n >\n <Icon name=\"chevron-left\" />\n </Button>\n </template>\n\n <slot name=\"drawer\"></slot>\n\n <template #footer>\n <div class=\"tw-flex tw-justify-end tw-gap-gutter\">\n <Button v-if=\"totalActiveFiltersCount === 0\" secondary @click=\"onDismiss\">\n {{ t('ll.cancel') }}\n </Button>\n <Button\n v-if=\"(isViewingGroupsMenu || props.drawerStyle === 'cascade') && totalActiveFiltersCount > 0\"\n secondary\n :disabled=\"isDataViewLoading\"\n @click=\"handleResetAllClick\"\n >\n {{ t('ll.resetAll') }}\n </Button>\n <Button\n v-if=\"isViewingSingleGroup && activeGroupActiveFiltersCount > 0\"\n secondary\n :disabled=\"isDataViewLoading\"\n @click=\"handleResetGroupClick\"\n >\n {{ t('ll.reset') }}\n </Button>\n <Button\n v-if=\"isViewingSingleGroup || props.drawerStyle === 'cascade'\"\n :disabled=\"isDataViewLoading\"\n @click=\"handleApplyClick\"\n >\n {{ t('ll.apply') }}\n </Button>\n </div>\n </template>\n </Modal>\n </Box>\n</template>\n"],"names":["useFilters","schema","dataViewRef","appliedFilters","ref","workingFilters","filterName","dvRef","applyFilters","cloneDeep","resetAllFilters","resetFilterGroup","group","undoWorkingFilters","activeFiltersCounts","computed","counts","config","value","_a","isDefined","totalActiveFiltersCount","count","props","__props","emit","__emit","slots","_useSlots","isDesktop","useMediaQuery","SCREEN_SIZES","isViewingGroupsMenu","isViewingSingleGroup","density","isDataViewLoading","isWithinModule","currentSearch","updateCurrentSearch","inject","DATA_VIEW_INJECTION","provide","DATA_VIEW_FILTERS_UTILS_INJECTION","activeGroupActiveFiltersCount","isDrawerOpen","handleApplyClick","preventDismiss","_b","handleResetGroupClick","handleResetAllClick","onDismiss","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCO,SAASA,GAAyD;AAAA,EACvE,QAAAC;AAAA,EACA,aAAAC;AACF,GAAyE;AACjE,QAAAC,IAAiBC,EAAI,CAAA,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N,gBAAAJ,EAA0B,oBAAoB,MAAMI,EAAM,aAAY,KAAK;AAAA;AAAA,IAAA,GAEzGqB,IAAexC,EAAI,EAAK;AAE9B,mBAAeyC,IAAmB;;AAC1B,YAAA,EAAE,gBAAAC,MAAoB,QAAM3B,IAAAI,EAAM,YAAN,gBAAAJ,EAAA,KAAAI,SAAsBwB,IAAAxB,EAAM,uBAAN,gBAAAwB,EAA0B,mBAAkB;AAEpG,MAAKD,MACHF,EAAa,QAAQ;AAAA,IAEzB;AAEA,aAASI,IAAwB;;AAC3B,MAACzB,EAAM,iBAILJ,IAAAI,EAAA,uBAAA,QAAAJ,EAAoB,iBAAiBI,EAAM,cACjDE,EAAK,aAAa,GAClBmB,EAAa,QAAQ;AAAA,IACvB;AAEA,aAASK,IAAsB;;AAC7B,OAAA9B,IAAAI,EAAM,uBAAN,QAAAJ,EAA0B,mBAC1BM,EAAK,WAAW,GAChBmB,EAAa,QAAQ;AAAA,IACvB;AAEA,aAASM,IAAY;;AACnB,OAAA/B,IAAAI,EAAM,uBAAN,QAAAJ,EAA0B,sBAC1ByB,EAAa,QAAQ,IACrBnB,EAAK,SAAS;AAAA,IAChB;AAEA,WAAA0B,EAAMP,GAAc,MAAM;AACxB,MAAIA,EAAa,SACfnB,EAAK,aAAa;AAAA,IACpB,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DataViewFilters.js","sources":["../src/components/DataViewFilters/DataViewFilters.types.ts","../src/components/DataViewFilters/useFilters.ts","../src/components/DataViewFilters/DataViewFilters.vue"],"sourcesContent":["import { UseFiltersReturnType } from './useFilters';\n\n/**\n * A function that is called when the user clicks one of the \"Apply\" buttons in DataViewFilters.\n *\n * A return value of `{ preventDismiss: true }` can be used to prevent the DataViewFilters drawer or a FilterDropdown from closing, such as when some filters have invalid values.\n */\nexport type OnApplyFilters = () => Promise<{ preventDismiss?: boolean } | void> | { preventDismiss?: boolean } | void;\n\nexport enum DrawerStyle {\n /** Displays all groups and their fields without the need for navigating submenus. */\n Cascade = 'cascade',\n /** Displays only group names or fields; navigation between the group names and a submenu of fields is required. */\n Nested = 'nested',\n}\n\nexport type DrawerStyles = `${DrawerStyle}`;\n\nexport interface DataViewFiltersUtilsInjection {\n useFiltersInstance?: UseFiltersReturnType;\n drawerStyle?: DrawerStyles;\n}\n","import cloneDeep from 'lodash-es/cloneDeep';\nimport { computed, ComputedRef, Ref, ref } from 'vue';\n\nimport isDefined from '../../composables/useValidation/utils/isDefined';\nimport DataView from '../DataView/DataView.vue';\n\ntype DataViewInstance = InstanceType<typeof DataView>;\n\n/**\n * Contains metadata and configuration for the filters.\n * @see https://www.typescriptlang.org/docs/handbook/2/mapped-types.html\n */\nexport type UseFiltersSchema<Values extends object, Groups extends string> = {\n [Property in keyof Values]: {\n defaultValue?: Values[Property];\n group?: Groups;\n isActive?: (value: Values[Property]) => boolean;\n };\n};\n\nexport interface UseFiltersArgs<Values extends object, Groups extends string> {\n schema: UseFiltersSchema<Values, Groups>;\n /** A ref for an instance of DataView */\n dataViewRef: Ref<unknown>; // Note: using `Ref<InstanceType<typeof DataView>>` here causes type errors when providing a value for this argument\n}\n\nexport interface UseFiltersReturnType<Values = object, Groups extends string = string> {\n applyFilters: () => void;\n resetAllFilters: () => void;\n resetFilterGroup: (group: string) => void; // Note: group is intentionally not typed as `Groups` since there is no way to pass in a Groups type to UseFiltersReturnType within DataViewFilters.vue\n undoWorkingFilters: () => void;\n activeFiltersCounts: ComputedRef<Record<Groups, number>>;\n totalActiveFiltersCount: ComputedRef<number>;\n appliedFilters: Ref<Values>;\n workingFilters: Ref<Values>;\n}\n\n/**\n * Provides utility functions for working with `DataViewFilters`.\n */\nexport function useFilters<Values extends object, Groups extends string>({\n schema,\n dataViewRef,\n}: UseFiltersArgs<Values, Groups>): UseFiltersReturnType<Values, Groups> {\n const appliedFilters = ref({}) as Ref<Values>;\n const workingFilters = ref({}) as Ref<Values>;\n\n for (const filterName in schema) {\n // @ts-expect-error \"could be instantiated with an arbitrary type\"; TODO: figure out how to resolve the types\n appliedFilters.value[filterName] = schema[filterName].defaultValue;\n // @ts-expect-error \"could be instantiated with an arbitrary type\"; TODO: figure out how to resolve the types\n workingFilters.value[filterName] = schema[filterName].defaultValue;\n }\n\n const dvRef = dataViewRef as Ref<DataViewInstance>;\n\n /**\n * For when an \"Apply\" button is clicked. It does the following:\n * 1) applies the working filter state\n * 2) sets the current page to 1\n * 3) emits the \"update\" event from DataView\n */\n function applyFilters() {\n appliedFilters.value = cloneDeep(workingFilters.value);\n dvRef.value.updateCurrentFilters(appliedFilters.value, { shouldEmit: true });\n }\n\n /**\n * For when a \"Reset all\" button is clicked. It does the following:\n * 1) applies the defaultValue filter values to all filters\n * 2) sets the current page to 1\n * 3) emits the \"update\" event from DataView\n */\n function resetAllFilters() {\n for (const filterName in schema) {\n // @ts-expect-error \"could be instantiated with an arbitrary type\"; TODO: figure out how to resolve the types\n appliedFilters.value[filterName] = schema[filterName].defaultValue;\n // @ts-expect-error \"could be instantiated with an arbitrary type\"; TODO: figure out how to resolve the types\n workingFilters.value[filterName] = schema[filterName].defaultValue;\n }\n\n dvRef.value.updateCurrentFilters(appliedFilters.value, { shouldEmit: true });\n }\n\n /**\n * For when a \"Reset\" button is clicked. It does the following:\n * 1) applies the defaultValue filter values to the given filter group\n * 2) sets the current page to 1\n * 3) emits the \"update\" event from DataView\n */\n function resetFilterGroup(group: Groups) {\n for (const filterName in schema) {\n if (schema[filterName].group === group) {\n // @ts-expect-error \"could be instantiated with an arbitrary type\"; TODO: figure out how to resolve the types\n appliedFilters.value[filterName] = schema[filterName].defaultValue;\n // @ts-expect-error \"could be instantiated with an arbitrary type\"; TODO: figure out how to resolve the types\n workingFilters.value[filterName] = schema[filterName].defaultValue;\n }\n }\n\n dvRef.value.updateCurrentFilters(appliedFilters.value, { shouldEmit: true });\n }\n\n /**\n * Resets the `workingFilters` to match the `appliedFilters`. This can be used when the FilterDrawer or a FilterDropdown is dismissed without clicking \"Reset\" or \"Apply\".\n */\n function undoWorkingFilters() {\n workingFilters.value = cloneDeep(appliedFilters.value);\n }\n\n const activeFiltersCounts = computed(() => {\n const counts = {} as Record<Groups, number>;\n\n for (const filterName in schema) {\n const config = schema[filterName];\n const value = appliedFilters.value[filterName];\n const isActive = config.isActive?.(value) || isDefined(value);\n\n if (isActive && config.group) {\n counts[config.group] = (counts[config.group] ?? 0) + 1;\n }\n }\n\n return counts;\n });\n\n const totalActiveFiltersCount = computed(() => {\n let count = 0;\n\n for (const filterName in schema) {\n const config = schema[filterName];\n const value = appliedFilters.value[filterName];\n const isActive = config.isActive?.(value) || isDefined(value);\n\n if (isActive) {\n count += 1;\n }\n }\n\n return count;\n });\n\n return {\n applyFilters,\n resetAllFilters,\n // @ts-expect-error \"could be instantiated with a different subtype\": TODO: figure out how to resolve the types\n resetFilterGroup,\n undoWorkingFilters,\n activeFiltersCounts,\n totalActiveFiltersCount,\n appliedFilters,\n workingFilters,\n };\n}\n\nexport default useFilters;\n","<script lang=\"ts\">\n export * from './DataViewFilters.keys';\n export * from './DataViewFilters.types';\n export * from './useFilters';\n</script>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide, ref, watch } from 'vue';\n\n import useMediaQuery from '../../composables/useMediaQuery/useMediaQuery';\n import { SCREEN_SIZES } from '../../constants';\n import { t } from '../../locale';\n import Box from '../Box/Box.vue';\n import Button from '../Button/Button.vue';\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.vue';\n import FilterChip from '../FilterChip/FilterChip.vue';\n import Icon from '../Icon/Icon.vue';\n import Label from '../Label/Label.vue';\n import Modal, { type ModalProps } from '../Modal/Modal.vue';\n import SearchBar, { SearchBarProps } from '../SearchBar/SearchBar.vue';\n import { DATA_VIEW_FILTERS_UTILS_INJECTION } from './DataViewFilters.keys';\n import type { DrawerStyles, OnApplyFilters } from './DataViewFilters.types';\n import type { UseFiltersReturnType } from './useFilters';\n\n export interface DataViewFiltersProps {\n filtersLabelText?: string;\n /**\n * Props to pass to the `SearchBar` component.\n */\n searchBarProps?: SearchBarProps;\n showSearch?: boolean;\n /** 'cascade' displays all fields within every filter group; 'nested' displays only the group names and requires clicking a group to view its fields. */\n drawerStyle?: DrawerStyles;\n drawerProps?: ModalProps;\n /**\n * @deprecated The `activeGroup` prop is a sufficient replacement for this prop. A falsy `activeGroup` will hide the button and a truthy `activeGroup` will show it (when the `drawerStyle` is 'nested').\n *\n * **Note:** This prop has no effect when using a \"cascade\" `drawerStyle`.\n */\n showDrawerPreviousButton?: boolean;\n /**\n * Required when using filters. This prop should contain the return value of the `useFilters()` composable.\n */\n useFiltersInstance?: UseFiltersReturnType;\n onApply?: OnApplyFilters;\n /**\n * The name of the active filter group. The active filter group is determined by which instance of FilterDropdown or FilterDrawerItem is open.\n *\n * **Note:** This prop is required when using a \"nested\" `drawerStyle`, but has no effect when using a \"cascade\" `drawerStyle`.\n */\n activeGroup?: string;\n }\n\n export interface DataViewFiltersSlots {\n default?: void;\n drawer?: void;\n 'filters-label'?: void;\n }\n\n const props = withDefaults(defineProps<DataViewFiltersProps>(), {\n filtersLabelText: t('ll.filterBy'),\n isLoading: false,\n drawerStyle: 'cascade',\n drawerProps: undefined,\n searchBarProps: undefined,\n showDrawerPreviousButton: false,\n showSearch: true,\n useFiltersInstance: undefined,\n onApply: undefined,\n activeGroup: undefined,\n });\n\n const emit = defineEmits<{\n /** When the drawer is opened */\n (e: 'open-drawer'): void;\n /** When the drawer is dismissed */\n (e: 'dismiss'): void;\n /** When the \"Previous\" button in the header is clicked */\n (e: 'previous'): void;\n /** When the \"Reset\" button is clicked while viewing a filter group */\n (e: 'reset-group'): void;\n /** When one of the \"Reset All\" buttons is clicked */\n (e: 'reset-all'): void;\n }>();\n\n const slots = defineSlots<DataViewFiltersSlots>();\n\n const isDesktop = useMediaQuery(`(min-width: ${SCREEN_SIZES.lg})`);\n const isViewingGroupsMenu = computed(() => props.drawerStyle === 'nested' && !props.activeGroup);\n const isViewingSingleGroup = computed(() => props.drawerStyle === 'nested' && props.activeGroup);\n\n const {\n density,\n isLoading: isDataViewLoading,\n isWithinModule,\n currentSearch,\n updateCurrentSearch,\n } = inject(DATA_VIEW_INJECTION.key, DATA_VIEW_INJECTION.defaults);\n\n provide(DATA_VIEW_FILTERS_UTILS_INJECTION.key, {\n useFiltersInstance: props.useFiltersInstance,\n drawerStyle: props.drawerStyle,\n });\n\n const totalActiveFiltersCount = computed(() => props.useFiltersInstance?.totalActiveFiltersCount.value ?? 0);\n /** The number of active filters in the currently active group. This is only used when the drawerStyle is 'nested'. */\n const activeGroupActiveFiltersCount = computed(\n () => Number(props.activeGroup && props.useFiltersInstance?.activeFiltersCounts.value[props.activeGroup]) || 0,\n );\n const isDrawerOpen = ref(false);\n\n async function handleApplyClick() {\n const { preventDismiss } = (await props.onApply?.()) || props.useFiltersInstance?.applyFilters() || {};\n\n if (!preventDismiss) {\n isDrawerOpen.value = false;\n }\n }\n\n function handleResetGroupClick() {\n if (!props.activeGroup) {\n return;\n }\n\n props.useFiltersInstance?.resetFilterGroup(props.activeGroup);\n emit('reset-group');\n isDrawerOpen.value = false;\n }\n\n function handleResetAllClick() {\n props.useFiltersInstance?.resetAllFilters();\n emit('reset-all');\n isDrawerOpen.value = false;\n }\n\n function onDismiss() {\n props.useFiltersInstance?.undoWorkingFilters();\n isDrawerOpen.value = false;\n emit('dismiss');\n }\n\n watch(isDrawerOpen, () => {\n if (isDrawerOpen.value) {\n emit('open-drawer');\n }\n });\n</script>\n\n<template>\n <Box\n class=\"stash-data-view-filters tw-grid tw-grid-cols-12 tw-gap-6 tw-p-3\"\n :class=\"{ 'lg:tw-p-6': density === 'comfortable', 'tw-mb-3': !isWithinModule }\"\n :radius=\"isWithinModule ? 'none' : 'rounded'\"\n data-test=\"stash-data-view-filters\"\n disable-padding\n >\n <SearchBar\n v-if=\"props.showSearch\"\n class=\"tw-col-span-12 md:tw-col-span-6 lg:tw-col-span-4\"\n data-test=\"stash-data-view-filters|search-bar\"\n :is-loading=\"isDataViewLoading\"\n :label=\"t('ll.search')\"\n :model-value=\"currentSearch\"\n v-bind=\"props.searchBarProps\"\n @search=\"(searchTerm) => updateCurrentSearch(searchTerm, { shouldEmit: true })\"\n />\n <div\n v-if=\"slots.default\"\n class=\"tw-col-span-12 tw-row-start-2 md:tw-col-start-7 md:tw-row-start-1 lg:tw-col-span-8 lg:tw-col-start-5\"\n >\n <div class=\"tw-hidden md:tw-block\">\n <slot name=\"filters-label\">\n <Label>{{ props.filtersLabelText }}</Label>\n </slot>\n </div>\n <div class=\"tw-flex tw-gap-4\">\n <FilterChip\n secondary\n class=\"!tw-flex tw-w-full tw-justify-center tw-gap-4 md:!tw-inline-flex md:tw-w-auto\"\n data-test=\"stash-data-view-filters|drawer-toggle-button\"\n :filter-count=\"totalActiveFiltersCount\"\n @click=\"isDrawerOpen = true\"\n >\n <span class=\"tw-inline-flex tw-items-center tw-gap-3\">\n <Icon name=\"filter-line\" class=\"tw-text-ice-700\" />\n <span>{{ t('ll.filters') }}</span>\n </span>\n </FilterChip>\n <slot v-if=\"isDesktop\"></slot>\n <Button v-if=\"totalActiveFiltersCount > 0 && isDesktop\" inline @click=\"handleResetAllClick\">\n {{ t('ll.resetAll') }}\n </Button>\n </div>\n </div>\n <Modal\n v-if=\"slots.drawer\"\n data-test=\"stash-data-view-filters|drawer\"\n disable-body-padding\n position=\"right\"\n size=\"narrow\"\n :is-open=\"isDrawerOpen\"\n :title=\"t('ll.allFilters')\"\n v-bind=\"props.drawerProps\"\n @dismiss=\"onDismiss\"\n >\n <template #headerAction>\n <Button\n v-if=\"isViewingSingleGroup\"\n icon\n class=\"tw-text-ice-100\"\n data-test=\"stash-data-view-filters|drawer-previous-button\"\n :aria-label=\"t('ll.previous')\"\n :title=\"t('ll.previous')\"\n @click=\"emit('previous')\"\n >\n <Icon name=\"chevron-left\" />\n </Button>\n </template>\n\n <slot name=\"drawer\"></slot>\n\n <template #footer>\n <div class=\"tw-flex tw-justify-end tw-gap-gutter\">\n <Button v-if=\"totalActiveFiltersCount === 0\" secondary @click=\"onDismiss\">\n {{ t('ll.cancel') }}\n </Button>\n <Button\n v-if=\"(isViewingGroupsMenu || props.drawerStyle === 'cascade') && totalActiveFiltersCount > 0\"\n secondary\n :disabled=\"isDataViewLoading\"\n @click=\"handleResetAllClick\"\n >\n {{ t('ll.resetAll') }}\n </Button>\n <Button\n v-if=\"isViewingSingleGroup && activeGroupActiveFiltersCount > 0\"\n secondary\n :disabled=\"isDataViewLoading\"\n @click=\"handleResetGroupClick\"\n >\n {{ t('ll.reset') }}\n </Button>\n <Button\n v-if=\"isViewingSingleGroup || props.drawerStyle === 'cascade'\"\n :disabled=\"isDataViewLoading\"\n @click=\"handleApplyClick\"\n >\n {{ t('ll.apply') }}\n </Button>\n </div>\n </template>\n </Modal>\n </Box>\n</template>\n"],"names":["DrawerStyle","useFilters","schema","dataViewRef","appliedFilters","ref","workingFilters","filterName","dvRef","applyFilters","cloneDeep","resetAllFilters","resetFilterGroup","group","undoWorkingFilters","activeFiltersCounts","computed","counts","config","value","_a","isDefined","totalActiveFiltersCount","count","props","__props","emit","__emit","slots","_useSlots","isDesktop","useMediaQuery","SCREEN_SIZES","isViewingGroupsMenu","isViewingSingleGroup","density","isDataViewLoading","isWithinModule","currentSearch","updateCurrentSearch","inject","DATA_VIEW_INJECTION","provide","DATA_VIEW_FILTERS_UTILS_INJECTION","activeGroupActiveFiltersCount","isDrawerOpen","handleApplyClick","preventDismiss","_b","handleResetGroupClick","handleResetAllClick","onDismiss","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASY,IAAAA,uBAAAA,OAEVA,EAAA,UAAU,WAEVA,EAAA,SAAS,UAJCA,IAAAA,MAAA,CAAA,CAAA;AC+BL,SAASC,GAAyD;AAAA,EACvE,QAAAC;A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MACpC,MAAA;;AAAM,sBAAOQ,EAAM,iBAAeJ,IAAAI,EAAM,uBAAN,gBAAAJ,EAA0B,oBAAoB,MAAMI,EAAM,aAAY,KAAK;AAAA;AAAA,IAAA,GAEzGqB,IAAexC,EAAI,EAAK;AAE9B,mBAAeyC,IAAmB;;AAC1B,YAAA,EAAE,gBAAAC,MAAoB,QAAM3B,IAAAI,EAAM,YAAN,gBAAAJ,EAAA,KAAAI,SAAsBwB,IAAAxB,EAAM,uBAAN,gBAAAwB,EAA0B,mBAAkB;AAEpG,MAAKD,MACHF,EAAa,QAAQ;AAAA,IAEzB;AAEA,aAASI,IAAwB;;AAC3B,MAACzB,EAAM,iBAILJ,IAAAI,EAAA,uBAAA,QAAAJ,EAAoB,iBAAiBI,EAAM,cACjDE,EAAK,aAAa,GAClBmB,EAAa,QAAQ;AAAA,IACvB;AAEA,aAASK,IAAsB;;AAC7B,OAAA9B,IAAAI,EAAM,uBAAN,QAAAJ,EAA0B,mBAC1BM,EAAK,WAAW,GAChBmB,EAAa,QAAQ;AAAA,IACvB;AAEA,aAASM,IAAY;;AACnB,OAAA/B,IAAAI,EAAM,uBAAN,QAAAJ,EAA0B,sBAC1ByB,EAAa,QAAQ,IACrBnB,EAAK,SAAS;AAAA,IAChB;AAEA,WAAA0B,EAAMP,GAAc,MAAM;AACxB,MAAIA,EAAa,SACfnB,EAAK,aAAa;AAAA,IACpB,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -44,8 +44,8 @@ export declare interface DataViewFiltersProps {
44
44
  */
45
45
  searchBarProps?: SearchBarProps;
46
46
  showSearch?: boolean;
47
- /** 'cascade' displays all fields within every filter group; 'nested' displays only the group names and requires clicking a group to view its fields */
48
- drawerStyle?: DrawerStyle;
47
+ /** 'cascade' displays all fields within every filter group; 'nested' displays only the group names and requires clicking a group to view its fields. */
48
+ drawerStyle?: DrawerStyles;
49
49
  drawerProps?: ModalProps;
50
50
  /**
51
51
  * @deprecated The `activeGroup` prop is a sufficient replacement for this prop. A falsy `activeGroup` will hide the button and a truthy `activeGroup` will show it (when the `drawerStyle` is 'nested').
@@ -74,7 +74,7 @@ export declare interface DataViewFiltersSlots {
74
74
 
75
75
  export declare interface DataViewFiltersUtilsInjection {
76
76
  useFiltersInstance?: UseFiltersReturnType;
77
- drawerStyle?: DrawerStyle;
77
+ drawerStyle?: DrawerStyles;
78
78
  }
79
79
 
80
80
  declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DataViewFiltersProps>, {
@@ -115,7 +115,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes
115
115
  filtersLabelText: string;
116
116
  searchBarProps: SearchBarProps;
117
117
  showSearch: boolean;
118
- drawerStyle: DrawerStyle;
118
+ drawerStyle: "cascade" | "nested";
119
119
  drawerProps: ModalProps;
120
120
  showDrawerPreviousButton: boolean;
121
121
  useFiltersInstance: UseFiltersReturnType<object, string>;
@@ -124,7 +124,14 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes
124
124
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, Readonly<DataViewFiltersSlots> & DataViewFiltersSlots>;
125
125
  export default _default;
126
126
 
127
- export declare type DrawerStyle = 'cascade' | 'nested';
127
+ export declare enum DrawerStyle {
128
+ /** Displays all groups and their fields without the need for navigating submenus. */
129
+ Cascade = "cascade",
130
+ /** Displays only group names or fields; navigation between the group names and a submenu of fields is required. */
131
+ Nested = "nested"
132
+ }
133
+
134
+ export declare type DrawerStyles = `${DrawerStyle}`;
128
135
 
129
136
  declare interface Injection<T> {
130
137
  key: InjectionKey<T>;
@@ -22,8 +22,8 @@ import "./index-9e1095ef.js";
22
22
  import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
23
23
  import "lodash-es/isNil";
24
24
  import "./utils/i18n.js";
25
- import "./Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js";
26
- import "./Label.vue_vue_type_script_setup_true_lang-4b02087f.js";
25
+ import "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
26
+ import "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
27
27
  function so(e, t) {
28
28
  const r = Ae(e);
29
29
  return isNaN(t) ? ke(e, NaN) : (t && r.setDate(r.getDate() + t), r);
package/dist/Field.js CHANGED
@@ -1,7 +1,7 @@
1
- import { _ as o } from "./Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js";
1
+ import { _ as o } from "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
2
2
  import "vue";
3
3
  import "lodash-es/uniqueId";
4
- import "./Label.vue_vue_type_script_setup_true_lang-4b02087f.js";
4
+ import "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
5
5
  import "./locale.js";
6
6
  import "lodash-es/get";
7
7
  export {
@@ -42,6 +42,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes
42
42
  label: undefined;
43
43
  showOptionalInLabel: boolean;
44
44
  fieldset: boolean;
45
+ disabled: boolean;
45
46
  }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FieldProps>, {
46
47
  addBottomSpace: boolean;
47
48
  errorText: undefined;
@@ -52,7 +53,9 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes
52
53
  label: undefined;
53
54
  showOptionalInLabel: boolean;
54
55
  fieldset: boolean;
56
+ disabled: boolean;
55
57
  }>>> & Readonly<{}>, {
58
+ disabled: boolean;
56
59
  fieldset: boolean;
57
60
  label: string;
58
61
  id: string;
@@ -116,6 +119,10 @@ export declare interface FieldProps {
116
119
  * Indicates wheter the field is a fieldset or not
117
120
  */
118
121
  fieldset?: boolean;
122
+ /**
123
+ * Indicates whether the field is disabled.
124
+ */
125
+ disabled?: boolean;
119
126
  }
120
127
 
121
128
  export { }
@@ -1,6 +1,6 @@
1
- import { defineComponent as _, useAttrs as T, useSlots as k, computed as l, openBlock as s, createBlock as w, resolveDynamicComponent as B, mergeProps as O, unref as f, withCtx as m, normalizeClass as R, createTextVNode as q, toDisplayString as h, createCommentVNode as v, createElementBlock as o, renderSlot as u } from "vue";
1
+ import { defineComponent as _, useAttrs as B, useSlots as T, computed as l, openBlock as s, createBlock as w, resolveDynamicComponent as k, mergeProps as O, unref as f, withCtx as b, normalizeClass as R, createTextVNode as q, toDisplayString as h, createCommentVNode as m, createElementBlock as o, renderSlot as u } from "vue";
2
2
  import p from "lodash-es/uniqueId";
3
- import { _ as E } from "./Label.vue_vue_type_script_setup_true_lang-4b02087f.js";
3
+ import { _ as E } from "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
4
4
  const L = ["aria-labelledby"], S = ["id"], C = {
5
5
  key: 4,
6
6
  class: "stash-field-hint tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs",
@@ -22,44 +22,47 @@ const L = ["aria-labelledby"], S = ["id"], C = {
22
22
  isRequired: { type: Boolean, default: !1 },
23
23
  label: { default: void 0 },
24
24
  showOptionalInLabel: { type: Boolean, default: !1 },
25
- fieldset: { type: Boolean, default: !1 }
25
+ fieldset: { type: Boolean, default: !1 },
26
+ disabled: { type: Boolean, default: !1 }
26
27
  },
27
- setup(b) {
28
- const e = b, y = T(), r = k(), i = l(() => e.id || p("stash-field-")), d = l(() => e.errorId || p("stash-field-error-")), a = l(() => p("stash-field-label-")), n = l(() => !!e.errorText), I = l(() => e.fieldset ? "fieldset" : "div"), x = l(() => {
28
+ setup(v) {
29
+ const e = v, y = B(), r = T(), d = l(() => e.id || p("stash-field-")), i = l(() => e.errorId || p("stash-field-error-")), a = l(() => p("stash-field-label-")), n = l(() => !!e.errorText), I = l(() => e.fieldset ? "fieldset" : "div"), x = l(() => {
29
30
  const { placeholder: t, ...c } = y;
30
31
  return c;
31
32
  });
32
- return (t, c) => (s(), w(B(I.value), O({
33
+ return (t, c) => (s(), w(k(I.value), O({
33
34
  "data-test": "stash-field",
34
35
  class: ["stash-field", [
35
36
  { "tw-p-0": e.fieldset },
36
37
  { "tw-mb-9": e.addBottomSpace && !e.errorText && !e.hintText && !f(r).hint },
37
- { "tw-mb-4": e.addBottomSpace && (e.errorText || e.hintText || f(r).hint) }
38
+ { "tw-mb-4": e.addBottomSpace && (e.errorText || e.hintText || f(r).hint) },
39
+ { "stash-field--disabled": e.disabled }
38
40
  ]]
39
41
  }, x.value), {
40
- default: m(() => [
42
+ default: b(() => [
41
43
  e.label ? (s(), w(E, {
42
44
  key: 0,
43
45
  id: a.value,
44
46
  class: R({ "tw-mb-1.5": !!e.isReadOnly }),
45
- for: i.value,
47
+ for: d.value,
46
48
  "has-error": n.value,
47
49
  "is-required": t.isRequired,
48
50
  "show-optional": e.showOptionalInLabel,
49
- legend: e.fieldset
51
+ legend: e.fieldset,
52
+ disabled: e.disabled
50
53
  }, {
51
- default: m(() => [
54
+ default: b(() => [
52
55
  q(h(e.label), 1)
53
56
  ]),
54
57
  _: 1
55
- }, 8, ["id", "class", "for", "has-error", "is-required", "show-optional", "legend"])) : v("", !0),
58
+ }, 8, ["id", "class", "for", "has-error", "is-required", "show-optional", "legend", "disabled"])) : m("", !0),
56
59
  e.isReadOnly ? (s(), o("div", {
57
60
  key: 1,
58
61
  "aria-labelledby": a.value
59
62
  }, [
60
63
  u(t.$slots, "default", {
61
- fieldId: i.value,
62
- fieldErrorId: d.value,
64
+ fieldId: d.value,
65
+ fieldErrorId: i.value,
63
66
  hasError: n.value,
64
67
  isRequired: t.isRequired,
65
68
  labelId: a.value,
@@ -67,8 +70,8 @@ const L = ["aria-labelledby"], S = ["id"], C = {
67
70
  })
68
71
  ], 8, L)) : u(t.$slots, "default", {
69
72
  key: 2,
70
- fieldId: i.value,
71
- fieldErrorId: d.value,
73
+ fieldId: d.value,
74
+ fieldErrorId: i.value,
72
75
  hasError: n.value,
73
76
  isRequired: t.isRequired,
74
77
  labelId: a.value,
@@ -76,12 +79,12 @@ const L = ["aria-labelledby"], S = ["id"], C = {
76
79
  }),
77
80
  e.errorText ? (s(), o("span", {
78
81
  key: 3,
79
- id: d.value,
82
+ id: i.value,
80
83
  class: "stash-field-error tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs tw-text-red-500",
81
84
  "data-test": "stash-field-error"
82
85
  }, h(e.errorText), 9, S)) : e.hintText && !e.isReadOnly ? (s(), o("span", C, h(e.hintText), 1)) : f(r).hint && !e.isReadOnly ? (s(), o("div", g, [
83
86
  u(t.$slots, "hint")
84
- ])) : v("", !0)
87
+ ])) : m("", !0)
85
88
  ]),
86
89
  _: 3
87
90
  }, 16, ["class"]));
@@ -90,4 +93,4 @@ const L = ["aria-labelledby"], S = ["id"], C = {
90
93
  export {
91
94
  N as _
92
95
  };
93
- //# sourceMappingURL=Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js.map
96
+ //# sourceMappingURL=Field.vue_vue_type_script_setup_true_lang-3ea26741.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Field.vue_vue_type_script_setup_true_lang-3ea26741.js","sources":["../src/components/Field/Field.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, useAttrs, useSlots } from 'vue';\n\n import Label from '../Label/Label.vue';\n\n defineOptions({\n inheritAttrs: false,\n });\n\n export interface FieldProps {\n /**\n * Adds spacing under the field that is consistent whether hint/error text is displayed.\n */\n addBottomSpace?: boolean;\n\n /**\n * Error text to display. Replaces `hintText` (if provided) & adds error styling.\n */\n errorText?: string;\n\n /**\n * Displays text below the input; hidden when the isReadOnly prop is truthy.\n */\n hintText?: string;\n\n /**\n * ID for the Label and Input; must be unique\n */\n id?: string;\n\n /**\n * ID for the error text element; useful for aria-errormessage\n */\n errorId?: string;\n\n /**\n * Whether it's a readonly field.\n */\n isReadOnly?: boolean;\n\n /**\n * Whether the field is required.\n */\n isRequired?: boolean;\n\n /**\n * Label to render above the input.\n */\n label?: string;\n\n /**\n * Show \"(optional)\" to the right of the label text\n */\n showOptionalInLabel?: boolean;\n\n /**\n * Indicates wheter the field is a fieldset or not\n */\n fieldset?: boolean;\n\n /**\n * Indicates whether the field is disabled.\n */\n disabled?: boolean;\n }\n\n const props = withDefaults(defineProps<FieldProps>(), {\n addBottomSpace: false,\n errorText: undefined,\n hintText: undefined,\n id: undefined,\n errorId: undefined,\n isRequired: false,\n label: undefined,\n showOptionalInLabel: false,\n fieldset: false,\n disabled: false,\n });\n const attrs = useAttrs();\n const slots = useSlots();\n const fieldId = computed(() => props.id || uniqueId('stash-field-'));\n const fieldErrorId = computed(() => props.errorId || uniqueId('stash-field-error-'));\n const labelId = computed(() => uniqueId('stash-field-label-'));\n const hasError = computed(() => !!props.errorText);\n const wrapperElement = computed(() => (props.fieldset ? 'fieldset' : 'div'));\n\n // Any attributes that are unique to form elements, you want to exclude from\n // being bound from the root element.\n const rootAttrs = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { placeholder, ...otherAttrs } = attrs;\n\n return otherAttrs;\n });\n</script>\n\n<template>\n <component\n :is=\"wrapperElement\"\n data-test=\"stash-field\"\n class=\"stash-field\"\n :class=\"[\n { 'tw-p-0': props.fieldset },\n { 'tw-mb-9': props.addBottomSpace && !props.errorText && !props.hintText && !slots.hint },\n { 'tw-mb-4': props.addBottomSpace && (props.errorText || props.hintText || slots.hint) },\n { 'stash-field--disabled': props.disabled },\n ]\"\n v-bind=\"rootAttrs\"\n >\n <Label\n v-if=\"props.label\"\n :id=\"labelId\"\n :class=\"{ 'tw-mb-1.5': !!props.isReadOnly }\"\n :for=\"fieldId\"\n :has-error=\"hasError\"\n :is-required=\"isRequired\"\n :show-optional=\"props.showOptionalInLabel\"\n :legend=\"props.fieldset\"\n :disabled=\"props.disabled\"\n >\n {{ props.label }}\n </Label>\n\n <!-- @slot for the form field; the Label can also be rendered here instead of using the label prop -->\n <template v-if=\"props.isReadOnly\">\n <div :aria-labelledby=\"labelId\">\n <slot\n :field-id=\"fieldId\"\n :field-error-id=\"fieldErrorId\"\n :has-error=\"hasError\"\n :is-required=\"isRequired\"\n :label-id=\"labelId\"\n :show-optional-in-label=\"props.showOptionalInLabel\"\n ></slot>\n </div>\n </template>\n <template v-else>\n <slot\n :field-id=\"fieldId\"\n :field-error-id=\"fieldErrorId\"\n :has-error=\"hasError\"\n :is-required=\"isRequired\"\n :label-id=\"labelId\"\n :show-optional-in-label=\"props.showOptionalInLabel\"\n ></slot>\n </template>\n\n <span\n v-if=\"props.errorText\"\n :id=\"fieldErrorId\"\n class=\"stash-field-error tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs tw-text-red-500\"\n data-test=\"stash-field-error\"\n >\n {{ props.errorText }}\n </span>\n\n <span\n v-else-if=\"props.hintText && !props.isReadOnly\"\n class=\"stash-field-hint tw-mt-1 tw-block tw-whitespace-pre-line tw-text-xs\"\n data-test=\"stash-field-hint\"\n >\n {{ props.hintText }}\n </span>\n\n <div\n v-else-if=\"slots.hint && !props.isReadOnly\"\n class=\"stash-field-hint tw-mt-1 tw-whitespace-pre-line tw-text-xs\"\n data-test=\"stash-field-hint\"\n >\n <!-- @slot for displaying hint text below the field -->\n <slot name=\"hint\"></slot>\n </div>\n </component>\n</template>\n"],"names":["props","__props","attrs","useAttrs","slots","useSlots","fieldId","computed","uniqueId","fieldErrorId","labelId","hasError","wrapperElement","rootAttrs","placeholder","otherAttrs"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEE,UAAMA,IAAQC,GAYRC,IAAQC,KACRC,IAAQC,KACRC,IAAUC,EAAS,MAAMP,EAAM,MAAMQ,EAAS,cAAc,CAAC,GAC7DC,IAAeF,EAAS,MAAMP,EAAM,WAAWQ,EAAS,oBAAoB,CAAC,GAC7EE,IAAUH,EAAS,MAAMC,EAAS,oBAAoB,CAAC,GACvDG,IAAWJ,EAAS,MAAM,CAAC,CAACP,EAAM,SAAS,GAC3CY,IAAiBL,EAAS,MAAOP,EAAM,WAAW,aAAa,KAAM,GAIrEa,IAAYN,EAAS,MAAM;AAE/B,YAAM,EAAE,aAAAO,GAAa,GAAGC,EAAA,IAAeb;AAEhC,aAAAa;AAAA,IAAA,CACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as $, computed as p, openBlock as r, createBlock as C, withCtx as u, createElementVNode as s, createElementBlock as d, withDirectives as f, vModelCheckbox as v, createVNode as _, withKeys as h, createTextVNode as b, toDisplayString as x, unref as A, createCommentVNode as B, Fragment as E, renderList as K } from "vue";
2
2
  import { t as N } from "./locale.js";
3
- import { _ as F } from "./Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js";
3
+ import { _ as F } from "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
4
4
  import y from "./FilterChip.js";
5
5
  import "lodash-es/get";
6
6
  import "lodash-es/uniqueId";
7
- import "./Label.vue_vue_type_script_setup_true_lang-4b02087f.js";
7
+ import "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
8
8
  import "./Chip.js";
9
9
  import "./utils/colorScheme.js";
10
10
  import "./Icon.js";
package/dist/Filters.js CHANGED
@@ -37,8 +37,8 @@ import "./utils/normalizeDate.js";
37
37
  import "./toTimeZone-a2ed6470.js";
38
38
  import "lodash-es/isNil";
39
39
  import "./utils/i18n.js";
40
- import "./Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js";
41
- import "./Label.vue_vue_type_script_setup_true_lang-4b02087f.js";
40
+ import "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
41
+ import "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
42
42
  import "./floating-ui.vue-8d7f7932.js";
43
43
  import "lodash-es/isEmpty";
44
44
  import "lodash-es/isEqual";
@@ -496,6 +496,10 @@ declare const _default: DefineComponent<any, {
496
496
  type: PropType<string>;
497
497
  default: string;
498
498
  };
499
+ disabled: {
500
+ type: PropType<boolean>;
501
+ default: boolean;
502
+ };
499
503
  label: {
500
504
  type: PropType<string>;
501
505
  default: undefined;
@@ -547,6 +551,10 @@ declare const _default: DefineComponent<any, {
547
551
  type: PropType<string>;
548
552
  default: string;
549
553
  };
554
+ disabled: {
555
+ type: PropType<boolean>;
556
+ default: boolean;
557
+ };
550
558
  label: {
551
559
  type: PropType<string>;
552
560
  default: undefined;
@@ -588,6 +596,7 @@ declare const _default: DefineComponent<any, {
588
596
  "onUpdate:model-value"?: ((v: string | number) => any) | undefined;
589
597
  }>, {
590
598
  type: string;
599
+ disabled: boolean;
591
600
  label: string;
592
601
  id: string;
593
602
  errorText: string;
@@ -607,6 +616,10 @@ declare const _default: DefineComponent<any, {
607
616
  type: PropType<string>;
608
617
  default: string;
609
618
  };
619
+ disabled: {
620
+ type: PropType<boolean>;
621
+ default: boolean;
622
+ };
610
623
  label: {
611
624
  type: PropType<string>;
612
625
  default: undefined;
@@ -650,6 +663,7 @@ declare const _default: DefineComponent<any, {
650
663
  inputEl: Ref<HTMLInputElement | undefined, HTMLInputElement | undefined>;
651
664
  }, {}, {}, {}, {
652
665
  type: string;
666
+ disabled: boolean;
653
667
  label: string;
654
668
  id: string;
655
669
  errorText: string;
@@ -666,6 +680,10 @@ declare const _default: DefineComponent<any, {
666
680
  type: PropType<string>;
667
681
  default: string;
668
682
  };
683
+ disabled: {
684
+ type: PropType<boolean>;
685
+ default: boolean;
686
+ };
669
687
  label: {
670
688
  type: PropType<string>;
671
689
  default: undefined;
@@ -714,6 +732,7 @@ declare const _default: DefineComponent<any, {
714
732
  blur: (evt: Event) => void;
715
733
  }, string, {
716
734
  type: string;
735
+ disabled: boolean;
717
736
  label: string;
718
737
  id: string;
719
738
  errorText: string;
@@ -734,6 +753,10 @@ declare const _default: DefineComponent<any, {
734
753
  type: PropType<string>;
735
754
  default: string;
736
755
  };
756
+ disabled: {
757
+ type: PropType<boolean>;
758
+ default: boolean;
759
+ };
737
760
  label: {
738
761
  type: PropType<string>;
739
762
  default: undefined;
@@ -795,6 +818,10 @@ declare const _default: DefineComponent<any, {
795
818
  type: PropType<string>;
796
819
  default: string;
797
820
  };
821
+ disabled: {
822
+ type: PropType<boolean>;
823
+ default: boolean;
824
+ };
798
825
  label: {
799
826
  type: PropType<string>;
800
827
  default: undefined;
@@ -840,6 +867,7 @@ declare const _default: DefineComponent<any, {
840
867
  }) => any) | undefined;
841
868
  }>, {
842
869
  type: string;
870
+ disabled: boolean;
843
871
  label: string;
844
872
  errorText: string;
845
873
  hintText: string;
@@ -861,6 +889,10 @@ declare const _default: DefineComponent<any, {
861
889
  type: PropType<string>;
862
890
  default: string;
863
891
  };
892
+ disabled: {
893
+ type: PropType<boolean>;
894
+ default: boolean;
895
+ };
864
896
  label: {
865
897
  type: PropType<string>;
866
898
  default: undefined;
@@ -906,6 +938,7 @@ declare const _default: DefineComponent<any, {
906
938
  }) => any) | undefined;
907
939
  }>, {}, {}, {}, {}, {
908
940
  type: string;
941
+ disabled: boolean;
909
942
  label: string;
910
943
  errorText: string;
911
944
  hintText: string;
@@ -924,6 +957,10 @@ declare const _default: DefineComponent<any, {
924
957
  type: PropType<string>;
925
958
  default: string;
926
959
  };
960
+ disabled: {
961
+ type: PropType<boolean>;
962
+ default: boolean;
963
+ };
927
964
  label: {
928
965
  type: PropType<string>;
929
966
  default: undefined;
@@ -982,6 +1019,7 @@ declare const _default: DefineComponent<any, {
982
1019
  }) => void;
983
1020
  }, string, {
984
1021
  type: string;
1022
+ disabled: boolean;
985
1023
  label: string;
986
1024
  errorText: string;
987
1025
  hintText: string;
@@ -5,9 +5,9 @@ import "./constants.js";
5
5
  import "./locale.js";
6
6
  import "lodash-es/get";
7
7
  import "lodash-es/isNil";
8
- import "./Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js";
8
+ import "./Field.vue_vue_type_script_setup_true_lang-3ea26741.js";
9
9
  import "lodash-es/uniqueId";
10
- import "./Label.vue_vue_type_script_setup_true_lang-4b02087f.js";
10
+ import "./Label.vue_vue_type_script_setup_true_lang-b6ba2f02.js";
11
11
  import "./Icon.js";
12
12
  import "./index-9e1095ef.js";
13
13
  import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";