@leaflink/stash 48.16.0 → 48.16.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/assets/illustrations/FileUpload/csv.svg +1 -1
- package/assets/illustrations/FileUpload/document.svg +1 -17
- package/assets/illustrations/FileUpload/image.svg +1 -1
- package/assets/illustrations/FileUpload/pdf.svg +1 -1
- package/dist/Accordion.js +1 -1
- package/dist/Accordion.js.map +1 -1
- package/dist/Accordion.vue.d.ts +8 -9
- package/dist/ActionsDropdown.js.map +1 -1
- package/dist/ActionsDropdown.vue.d.ts +7 -8
- package/dist/AddressSelect.js +42 -38
- package/dist/AddressSelect.js.map +1 -1
- package/dist/AddressSelect.vue.d.ts +10 -11
- package/dist/Alert.js.map +1 -1
- package/dist/Alert.vue.d.ts +6 -7
- package/dist/AppNavigationItem.js +2 -2
- package/dist/AppNavigationItem.js.map +1 -1
- package/dist/AppNavigationItem.vue.d.ts +7 -8
- package/dist/AppSidebar.js +42 -42
- package/dist/AppSidebar.js.map +1 -1
- package/dist/AppSidebar.vue.d.ts +8 -9
- package/dist/AppTopbar.js +16 -16
- package/dist/AppTopbar.js.map +1 -1
- package/dist/AppTopbar.vue.d.ts +8 -9
- package/dist/Avatar.js.map +1 -1
- package/dist/Avatar.vue.d.ts +7 -8
- package/dist/Backdrop.vue.d.ts +3 -5
- package/dist/Badge.js +1 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Badge.vue.d.ts +7 -8
- package/dist/Box.vue.d.ts +6 -7
- package/dist/Box.vue_vue_type_script_setup_true_lang-69e5176b.js.map +1 -1
- package/dist/Button.js.map +1 -1
- package/dist/Button.vue.d.ts +7 -8
- package/dist/ButtonGroup.js +29 -29
- package/dist/ButtonGroup.js.map +1 -1
- package/dist/ButtonGroup.vue.d.ts +8 -9
- package/dist/Card.js.map +1 -1
- package/dist/Card.vue.d.ts +6 -7
- package/dist/CardContent.vue.d.ts +3 -5
- package/dist/CardFooter.vue.d.ts +3 -5
- package/dist/CardHeader.js.map +1 -1
- package/dist/CardHeader.vue.d.ts +3 -4
- package/dist/CardMedia.js +6 -6
- package/dist/CardMedia.js.map +1 -1
- package/dist/CardMedia.vue.d.ts +3 -4
- package/dist/Carousel.js +249 -249
- package/dist/Carousel.js.map +1 -1
- package/dist/Carousel.vue.d.ts +9 -9
- package/dist/Checkbox.js +27 -27
- package/dist/Checkbox.js.map +1 -1
- package/dist/Checkbox.vue.d.ts +11 -12
- package/dist/ChevronToggle.js +1 -1
- package/dist/ChevronToggle.vue.d.ts +8 -9
- package/dist/{ChevronToggle.vue_vue_type_script_setup_true_lang-1591294c.js → ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js} +11 -11
- package/dist/{ChevronToggle.vue_vue_type_script_setup_true_lang-1591294c.js.map → ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js.map} +1 -1
- package/dist/Chip.js +30 -30
- package/dist/Chip.js.map +1 -1
- package/dist/Chip.vue.d.ts +9 -10
- package/dist/ConfirmationCodeInput.js +25 -25
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ConfirmationCodeInput.vue.d.ts +8 -9
- package/dist/ContextSwitcher.js +18 -18
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/ContextSwitcher.vue.d.ts +9 -10
- package/dist/Copy.js.map +1 -1
- package/dist/Copy.vue.d.ts +6 -7
- package/dist/CurrencyInput.js +93 -93
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/CurrencyInput.vue.d.ts +10 -11
- package/dist/CustomRender.vue.d.ts +3 -15
- package/dist/DataView.js +97 -97
- package/dist/DataView.js.map +1 -1
- package/dist/DataView.vue.d.ts +9 -10
- package/dist/DataViewFilters.js +153 -150
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewFilters.vue.d.ts +9 -10
- package/dist/DataViewSortButton.js.map +1 -1
- package/dist/DataViewSortButton.vue.d.ts +6 -7
- package/dist/DataViewToolbar.js +27 -27
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DataViewToolbar.vue.d.ts +8 -9
- package/dist/DatePicker.js +738 -738
- package/dist/DatePicker.js.map +1 -1
- package/dist/DatePicker.vue.d.ts +11 -12
- package/dist/DescriptionList.js.map +1 -1
- package/dist/DescriptionList.vue.d.ts +6 -7
- package/dist/DescriptionListDetail.vue.d.ts +3 -5
- package/dist/DescriptionListGroup.vue.d.ts +3 -5
- package/dist/DescriptionListTerm.vue.d.ts +3 -5
- package/dist/Dialog.js +44 -44
- package/dist/Dialog.js.map +1 -1
- package/dist/Dialog.vue.d.ts +10 -11
- package/dist/Divider.vue.d.ts +3 -5
- package/dist/Dropdown.js +38 -38
- package/dist/Dropdown.js.map +1 -1
- package/dist/Dropdown.vue.d.ts +9 -10
- package/dist/EmptyState.js +20 -20
- package/dist/EmptyState.js.map +1 -1
- package/dist/EmptyState.vue.d.ts +6 -7
- package/dist/Expand.js +1 -1
- package/dist/Expand.vue.d.ts +8 -9
- package/dist/{Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js → Expand.vue_vue_type_script_setup_true_lang-0f236267.js} +19 -19
- package/dist/Expand.vue_vue_type_script_setup_true_lang-0f236267.js.map +1 -0
- package/dist/Field.vue.d.ts +6 -7
- package/dist/Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js.map +1 -1
- package/dist/FileUpload.js +65 -65
- package/dist/FileUpload.js.map +1 -1
- package/dist/FileUpload.vue.d.ts +10 -11
- package/dist/FilterChip.js +27 -27
- package/dist/FilterChip.js.map +1 -1
- package/dist/FilterChip.vue.d.ts +8 -9
- package/dist/FilterDrawerItem.js +26 -26
- package/dist/FilterDrawerItem.js.map +1 -1
- package/dist/FilterDrawerItem.vue.d.ts +5 -6
- package/dist/FilterDropdown.js +49 -49
- package/dist/FilterDropdown.js.map +1 -1
- package/dist/FilterDropdown.vue.d.ts +8 -9
- package/dist/FilterSelect.js +23 -23
- package/dist/FilterSelect.js.map +1 -1
- package/dist/FilterSelect.vue.d.ts +8 -9
- package/dist/Filters.js +112 -104
- package/dist/Filters.js.map +1 -1
- package/dist/Filters.vue.d.ts +2204 -65
- package/dist/HttpError.js +42 -42
- package/dist/HttpError.js.map +1 -1
- package/dist/HttpError.vue.d.ts +6 -7
- package/dist/Icon.js.map +1 -1
- package/dist/Icon.vue.d.ts +7 -8
- package/dist/IconLabel.js.map +1 -1
- package/dist/IconLabel.vue.d.ts +8 -9
- package/dist/Illustration.vue.d.ts +6 -7
- package/dist/Illustration.vue_vue_type_script_setup_true_lang-e26c3841.js.map +1 -1
- package/dist/Image.js +47 -47
- package/dist/Image.js.map +1 -1
- package/dist/Image.vue.d.ts +6 -7
- package/dist/InlineEdit.js +34 -34
- package/dist/InlineEdit.js.map +1 -1
- package/dist/InlineEdit.vue.d.ts +9 -10
- package/dist/Input.js +35 -35
- package/dist/Input.js.map +1 -1
- package/dist/Input.vue.d.ts +13 -14
- package/dist/InputOptions.js +33 -33
- package/dist/InputOptions.js.map +1 -1
- package/dist/InputOptions.vue.d.ts +8 -9
- package/dist/IntegrationIcon.js.map +1 -1
- package/dist/IntegrationIcon.vue.d.ts +7 -8
- package/dist/Label.vue.d.ts +6 -7
- package/dist/Label.vue_vue_type_script_setup_true_lang-4b02087f.js.map +1 -1
- package/dist/LicenseChip.js.map +1 -1
- package/dist/LicenseChip.vue.d.ts +6 -7
- package/dist/ListItem.vue.d.ts +225 -95
- package/dist/ListItemCell.vue.d.ts +4 -16
- package/dist/ListView.js +1 -1
- package/dist/ListView.vue.d.ts +5072 -470
- package/dist/Loading.js +16 -16
- package/dist/Loading.js.map +1 -1
- package/dist/Loading.vue.d.ts +3 -5
- package/dist/Logo.js +1 -1
- package/dist/Logo.vue.d.ts +9 -10
- package/dist/Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js +196 -0
- package/dist/Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js.map +1 -0
- package/dist/Menu.vue.d.ts +3 -5
- package/dist/MenuItem.vue.d.ts +3 -5
- package/dist/Metric.js.map +1 -1
- package/dist/Metric.vue.d.ts +6 -7
- package/dist/Modal.js +29 -29
- package/dist/Modal.js.map +1 -1
- package/dist/Modal.vue.d.ts +8 -9
- package/dist/Modals.js +8 -7
- package/dist/Modals.js.map +1 -1
- package/dist/Modals.vue.d.ts +3 -5
- package/dist/Module.js.map +1 -1
- package/dist/Module.vue.d.ts +7 -8
- package/dist/ModuleContent.vue.d.ts +3 -5
- package/dist/ModuleFooter.vue.d.ts +3 -5
- package/dist/ModuleHeader.js.map +1 -1
- package/dist/ModuleHeader.vue.d.ts +6 -7
- package/dist/ObfuscateText.js +1 -1
- package/dist/ObfuscateText.js.map +1 -1
- package/dist/ObfuscateText.vue.d.ts +6 -7
- package/dist/PageContent.vue.d.ts +3 -5
- package/dist/PageHeader.js.map +1 -1
- package/dist/PageHeader.vue.d.ts +6 -7
- package/dist/PageNavigation.js +30 -27
- package/dist/PageNavigation.js.map +1 -1
- package/dist/PageNavigation.vue.d.ts +8 -9
- package/dist/Paginate.js +32 -32
- package/dist/Paginate.js.map +1 -1
- package/dist/Paginate.vue.d.ts +8 -9
- package/dist/PlaidLink.js +29 -29
- package/dist/PlaidLink.js.map +1 -1
- package/dist/PlaidLink.vue.d.ts +11 -12
- package/dist/QuickAction.js.map +1 -1
- package/dist/QuickAction.vue.d.ts +4 -5
- package/dist/Radio.vue.d.ts +20 -1
- package/dist/RadioGroup.js +123 -123
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioGroup.vue.d.ts +10 -11
- package/dist/RadioNew.js +102 -102
- package/dist/RadioNew.js.map +1 -1
- package/dist/RadioNew.vue.d.ts +10 -11
- package/dist/RangeInput.vue.d.ts +3 -5
- package/dist/SearchBar.js +36 -36
- package/dist/SearchBar.js.map +1 -1
- package/dist/SearchBar.vue.d.ts +9 -10
- package/dist/Select.js +792 -774
- package/dist/Select.js.map +1 -1
- package/dist/Select.vue.d.ts +14 -15
- package/dist/SelectStatus.js +27 -27
- package/dist/SelectStatus.js.map +1 -1
- package/dist/SelectStatus.vue.d.ts +12 -13
- package/dist/Skeleton.js.map +1 -1
- package/dist/Skeleton.vue.d.ts +7 -8
- package/dist/Step.js.map +1 -1
- package/dist/Step.vue.d.ts +7 -8
- package/dist/Stepper.js +19 -19
- package/dist/Stepper.js.map +1 -1
- package/dist/Stepper.vue.d.ts +9 -10
- package/dist/Switch.js +25 -25
- package/dist/Switch.js.map +1 -1
- package/dist/Switch.vue.d.ts +11 -12
- package/dist/Tab.js +2 -2
- package/dist/Tab.vue.d.ts +3 -4
- package/dist/{Tab.vue_vue_type_script_setup_true_lang-69d1b046.js → Tab.vue_vue_type_script_setup_true_lang-9aa53203.js} +5 -3
- package/dist/Tab.vue_vue_type_script_setup_true_lang-9aa53203.js.map +1 -0
- package/dist/Table.js +3 -3
- package/dist/Table.js.map +1 -1
- package/dist/{Table.keys-cf93df19.js → Table.keys-83e4f09b.js} +11 -11
- package/dist/{Table.keys-cf93df19.js.map → Table.keys-83e4f09b.js.map} +1 -1
- package/dist/Table.vue.d.ts +6 -7
- package/dist/TableCell.js +1 -1
- package/dist/TableCell.js.map +1 -1
- package/dist/TableCell.vue.d.ts +6 -7
- package/dist/TableHeaderCell.js +12 -12
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableHeaderCell.vue.d.ts +6 -7
- package/dist/TableHeaderRow.js +21 -21
- package/dist/TableHeaderRow.js.map +1 -1
- package/dist/TableHeaderRow.vue.d.ts +8 -9
- package/dist/TableRow.js +42 -42
- package/dist/TableRow.js.map +1 -1
- package/dist/TableRow.vue.d.ts +8 -9
- package/dist/Tabs.js +2 -2
- package/dist/Tabs.vue.d.ts +8 -9
- package/dist/{Tabs.vue_used_vue_type_style_index_0_lang.module-2a131332.js → Tabs.vue_used_vue_type_style_index_0_lang.module-3aa36673.js} +37 -37
- package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-3aa36673.js.map +1 -0
- package/dist/TextEditor.js +565 -565
- package/dist/TextEditor.js.map +1 -1
- package/dist/TextEditor.vue.d.ts +12 -13
- package/dist/Textarea.js +28 -28
- package/dist/Textarea.js.map +1 -1
- package/dist/Textarea.vue.d.ts +10 -11
- package/dist/Timeline.js.map +1 -1
- package/dist/Timeline.vue.d.ts +6 -7
- package/dist/TimelineItem.js +21 -21
- package/dist/TimelineItem.js.map +1 -1
- package/dist/TimelineItem.vue.d.ts +13 -6
- package/dist/Toast.js +134 -134
- package/dist/Toast.js.map +1 -1
- package/dist/Toast.vue.d.ts +6 -7
- package/dist/Toasts.vue.d.ts +3 -5
- package/dist/components.css +1 -1
- package/dist/index.js.map +1 -1
- package/dist/tailwind-base.js.map +1 -1
- package/dist/usePlaidLink.d.ts +1 -6
- package/dist/useScriptTag.d.ts +3 -8
- package/dist/useStepper.d.ts +7 -2
- package/package.json +1 -1
- package/tailwind-base.ts +13 -6
- package/dist/Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js.map +0 -1
- package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js +0 -196
- package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js.map +0 -1
- package/dist/Tab.vue_vue_type_script_setup_true_lang-69d1b046.js.map +0 -1
- package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-2a131332.js.map +0 -1
package/dist/DataView.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataView.js","sources":["../src/components/DataView/DataView.utils.ts","../src/components/DataView/DataView.types.ts","../src/components/DataView/DataView.vue"],"sourcesContent":["import { SortId, SortOrder, SortValue, SortValueDeserialized } from './DataView.types';\n\n/**\n * Receives a SortValue (ex: `'-product_name'`) and returns an object with a `id` and an `order`.\n */\nexport function deserializeSortValue(sort: SortValue): SortValueDeserialized {\n const order = sort[0] === '-' ? 'desc' : 'asc';\n const id = order === 'asc' ? sort : sort.slice(1);\n\n return { id, order };\n}\n\n/**\n * Receives an object with a `id` and an `order` and returns a SortValue (ex: `'-product_name'`).\n */\nexport function serializeSortValue({ id, order }: SortValueDeserialized): SortValue {\n return `${order === 'desc' ? '-' : ''}${id}`;\n}\n\ninterface GetNextSortArgs {\n newId: SortId | undefined;\n newOrder?: SortOrder;\n oldId?: SortId;\n oldOrder?: SortOrder;\n}\n\n/**\n * Given new and old sorting data, it returns the next sorting value using the following sorting cycle:\n *\n * \"unsorted --> ascending --> descending --> unsorted\"\n */\nexport function getNextSort({ newId, newOrder, oldId, oldOrder }: GetNextSortArgs): SortValue | undefined {\n if (!newId) {\n return undefined;\n }\n\n if (newId !== oldId) {\n // if sorting by a new field, sort ascending\n return serializeSortValue({ id: newId, order: newOrder || 'asc' });\n }\n\n /**\n * `newOrder` and `oldOrder` can each have 3 different values: undefined, 'asc', or 'desc'.\n * Therefore, there are 9 possible combinations (3 times 3). See below:\n */\n\n // #region newOrder: undefined\n if (!newOrder && !oldOrder) {\n return newId; // ascending\n }\n\n if (!newOrder && oldOrder === 'desc') {\n return undefined; // unsorted\n }\n\n if (!newOrder && oldOrder === 'asc') {\n return `-${newId}`; // descending\n }\n // #endregion\n\n // #region newOrder: asc\n if (newOrder === 'asc' && !oldOrder) {\n return newId;\n }\n\n if (newOrder === 'asc' && oldOrder === 'asc') {\n return undefined;\n }\n\n if (newOrder === 'asc' && oldOrder === 'desc') {\n return newId;\n }\n // #endregion\n\n // #region newOrder: desc\n if (newOrder === 'desc' && !oldOrder) {\n return `-${newId}`;\n }\n\n if (newOrder === 'desc' && oldOrder === 'desc') {\n return undefined;\n }\n\n if (newOrder === 'desc' && oldOrder === 'asc') {\n return `-${newId}`;\n }\n // #endregion\n}\n","import { ComputedRef, Ref } from 'vue';\n\nimport { SpacingDensities } from '../../../types/misc';\n\nexport enum DataViewVariant {\n Table = 'table',\n}\n\nexport type DataViewVariants = `${DataViewVariant}`;\n\n/**\n * A unique id for a sorting strategy. If the order is descending, it must begin with \"-\" (a hyphen/dash).\n *\n * Ex: `'product_name'` if ascending or `'-product_name'` if descending\n */\nexport type SortValue = string;\n\n/**\n * The SortValue with its leading hyphen/dash removed\n */\nexport type SortId = string;\n\n/**\n * Determined by whether or not there is a leading hyphen/dash in the SortValue\n */\nexport type SortOrder = 'asc' | 'desc';\n\n/**\n * A deserialized instance of a `SortValue`.\n */\nexport type SortValueDeserialized = {\n id: SortId;\n order: SortOrder;\n};\n\n/** Updates the DataView internal state with the given sortId */\nexport type UpdateCurrentSort = (\n sortId: SortId | undefined,\n options?: {\n sortOrder?: SortOrder;\n /** If true, emits the `update:currentSort` and `update` events from DataView */\n shouldEmit?: boolean;\n },\n) => void;\n\n/** Updates the DataView internal state with the given page */\nexport type SetPage = (\n page: number,\n options?: {\n /** If true, emits the `update:currentPage` and `update` events from DataView */\n shouldEmit?: boolean;\n },\n) => void;\n\n/** Updates the DataView internal state with the previous page */\nexport type GoPrevPage = (options?: {\n /** If true, emits the `update:currentPage` and `update` events from DataView */\n shouldEmit?: boolean;\n}) => void;\n\n/** Updates the DataView internal state with the next page */\nexport type GoNextPage = (options?: {\n /** If true, emits the `update:currentPage` and `update` events from DataView */\n shouldEmit?: boolean;\n}) => void;\n\n/** Updates the DataView internal state with the given searchTerm */\nexport type UpdateCurrentSearch = (\n searchTerm?: string,\n options?: {\n /** If true, emits the `update:currentSearch` and `update` events from DataView */\n shouldEmit?: boolean;\n },\n) => void;\n\n/** Updates the DataView internal state with the given filter values */\nexport type UpdateCurrentFilters<FilterValues = object> = (\n newFilters: FilterValues,\n options?: {\n /** If true, emits the `update:currentSearch` and `update` events from DataView */\n shouldEmit?: boolean;\n },\n) => void;\n\nexport interface UpdateEvent<FilterValues = object> {\n page?: number;\n pageSize?: number;\n ordering?: string;\n search?: string;\n filters?: FilterValues;\n}\n\nexport interface DataViewInjection {\n currentPage: ComputedRef<number>;\n\n isPaginationEnabled: ComputedRef<boolean>;\n\n pageCount: ComputedRef<number>;\n\n pageSize: ComputedRef<number>;\n\n totalDataCount: ComputedRef<number>;\n\n /** Updates the DataView internal state with the given page */\n setPage: SetPage;\n\n /** Updates the DataView internal state with the previous page */\n goPrevPage: GoPrevPage;\n\n /** Updates the DataView internal state with the next page */\n goNextPage: GoNextPage;\n\n currentSortId: ComputedRef<SortId | undefined>;\n\n currentSortOrder: ComputedRef<SortOrder | undefined>;\n\n /** Updates the DataView internal state with the given sortId */\n updateCurrentSort: UpdateCurrentSort;\n\n currentSearch: ComputedRef<string>;\n\n /** Updates the DataView internal state with the given searchTerm */\n updateCurrentSearch: UpdateCurrentSearch;\n\n /**\n * The DataView's padding; the default value is \"comfortable\". On small screens, the density will always be \"compact\".\n */\n density: ComputedRef<SpacingDensities | undefined>;\n\n /**\n * Defines if a DataView has a Toolbar rendered. This prop is updated when DataViewToolbar exists and is mounted.\n */\n hasToolbar?: Ref<boolean>;\n\n /**\n * Enables certain loading indicators to be displayed within the DataView.\n */\n isLoading?: ComputedRef<boolean>;\n\n /**\n * Enables certain empty states to be displayed within the DataView.\n */\n isEmpty?: ComputedRef<boolean>;\n\n /**\n * Allows Table to control whether or not a DataViewToolbar should show a checkmark\n */\n isSelectable?: Ref<boolean>;\n\n /**\n * Whether or not the DataView is rendered within a Module; the value is inferred based on being\n * able to inject details from Module.\n *\n * Note: This is sent to DataView child components so they only need to worry about interfacing\n * with the DataViewInjection API.\n */\n isWithinModule: ComputedRef<boolean>;\n\n /**\n * The DataView's variant; the default value is undefined.\n */\n variant: ComputedRef<DataViewVariants | undefined>;\n}\n","<script lang=\"ts\">\n export * from './DataView.constants';\n export * from './DataView.keys';\n export * from './DataView.types';\n export * from './DataView.utils';\n</script>\n\n<script setup lang=\"ts\">\n import cloneDeep from 'lodash-es/cloneDeep';\n import { computed, inject, provide, ref, useCssModule, watch } from 'vue';\n\n import { SpacingDensities } from '../../../types/misc';\n import { MODULE_INJECTION } from '../Module/Module.keys';\n import Paginate from '../Paginate/Paginate.vue';\n import { DEFAULT_PAGE_SIZE } from './DataView.constants';\n import { DATA_VIEW_INJECTION } from './DataView.keys';\n import {\n DataViewVariants,\n GoNextPage,\n GoPrevPage,\n SetPage,\n SortId,\n SortOrder,\n SortValue,\n UpdateCurrentFilters,\n UpdateCurrentSearch,\n UpdateCurrentSort,\n UpdateEvent,\n } from './DataView.types';\n import { deserializeSortValue, getNextSort } from './DataView.utils';\n\n export interface DataViewProps {\n /**\n * Can be used to provide the initial page.\n * Also, it can be used to control the active page with `v-model:current-page=\"myPage\"`.\n */\n currentPage?: number;\n\n /**\n * Can be used to set the initial search term.\n * Also, it can be used to control the active search term with `v-model:current-search=\"mySearchTerm\"`.\n */\n currentSearch?: string;\n\n /**\n * Can be used to provide the initial sort order.\n * Also, it can be used to control the active sort order with `v-model:current-sort=\"mySortOrder\"`.\n */\n currentSort?: SortValue;\n\n /**\n * A list of records. If pagination is enabled, `data` must be only the current page of records.\n */\n data?: object[];\n\n /**\n * Controls the DataView's padding; the default value is \"comfortable\". On small screens, \"compact\" density is applied regardless of this prop's value.\n */\n density?: SpacingDensities;\n\n pageSize?: number;\n\n /**\n * Opt-out of displaying pagination. Hides the pagination buttons and page stats.\n */\n disablePagination?: boolean;\n\n /**\n * Hides the bottom pagination without disabling the pagination from the toolbar\n */\n hideBottomPagination?: boolean;\n\n /**\n * The total number of records available.\n * Used to auto-enable pagination when results exist.\n * DataView does not paginate data for you; instead, `props.data` should always show\n * the current page of results.\n */\n totalDataCount?: number;\n\n /**\n * DataView variant. The default value is `undefined`. Will default to `table` when used within\n * a `<Module variant=\"table\">`.\n */\n variant?: DataViewVariants;\n\n isLoading?: boolean;\n }\n\n const props = withDefaults(defineProps<DataViewProps>(), {\n currentPage: 1,\n currentSearch: undefined,\n currentSort: undefined,\n data: () => [],\n density: 'comfortable',\n pageSize: DEFAULT_PAGE_SIZE,\n disablePagination: false,\n totalDataCount: 0,\n hideBottomPagination: false,\n variant: undefined,\n });\n\n const emit =\n defineEmits<{\n (e: 'update', state: UpdateEvent): void;\n (e: 'update:currentFilters', newFilters: object): void;\n (e: 'update:currentPage', page: number, pageSize: number): void;\n (e: 'update:currentSearch', searchTerm?: string): void;\n (e: 'update:currentSort', payload?: SortValue): void;\n }>();\n\n const classes = useCssModule();\n const rootRef = ref<HTMLElement | null>(null);\n const moduleInjection = inject(MODULE_INJECTION.key, MODULE_INJECTION.defaults);\n const computedVariant = computed<DataViewVariants | undefined>(() => {\n if (props.variant) {\n return props.variant;\n }\n\n if (moduleInjection.variant?.value === 'table') {\n return 'table';\n }\n\n return undefined;\n });\n const isWithinModule = computed(() => moduleInjection.variant !== undefined);\n\n // #region pagination\n const internalPage = ref(1);\n const isPaginationEnabled = computed(() => !props.disablePagination && props.totalDataCount > 0);\n const pageCount = computed(() => Math.ceil(props.totalDataCount / props.pageSize));\n\n const setPage: SetPage = function (page: number, { shouldEmit } = {}) {\n internalPage.value = page;\n\n if (shouldEmit) {\n emitUpdate();\n emit('update:currentPage', page, props.pageSize);\n }\n\n if (Number(rootRef.value?.getBoundingClientRect().top) < 0) {\n rootRef.value?.scrollIntoView({ behavior: 'smooth', block: 'start' });\n }\n };\n\n const goPrevPage: GoPrevPage = function ({ shouldEmit } = {}) {\n const page = Math.max(internalPage.value - 1, 1);\n\n setPage(page, { shouldEmit });\n };\n\n /** Updates the DataView internal state with the previous page */\n const goNextPage: GoNextPage = function ({ shouldEmit } = {}) {\n const page = Math.min(internalPage.value + 1, pageCount.value);\n\n setPage(page, { shouldEmit });\n };\n\n watch(\n () => props.currentPage,\n () => {\n setPage(props.currentPage);\n },\n { immediate: true },\n );\n // #endregion pagination\n\n // #region sorting\n const internalSort = ref<SortValue | undefined>(undefined);\n\n const internalSortId = computed<SortId | undefined>(() =>\n internalSort.value ? deserializeSortValue(internalSort.value).id : undefined,\n );\n const internalSortOrder = computed<SortOrder | undefined>(() =>\n internalSort.value ? deserializeSortValue(internalSort.value).order : undefined,\n );\n\n const updateCurrentSort: UpdateCurrentSort = function (sortId, { sortOrder, shouldEmit } = {}) {\n const { id: oldId, order: oldOrder } = deserializeSortValue(internalSort.value || '');\n const nextSort = getNextSort({ newId: sortId, newOrder: sortOrder, oldId, oldOrder });\n\n internalSort.value = nextSort;\n setPage(1);\n\n if (shouldEmit) {\n emitUpdate();\n emit('update:currentSort', nextSort);\n }\n };\n\n watch(\n () => props.currentSort,\n () => {\n updateCurrentSort(props.currentSort);\n },\n { immediate: true },\n );\n // #endregion sorting\n\n // #region search\n const internalSearch = ref('');\n\n const hasToolbar = ref(false);\n const isSelectable = ref(false);\n\n const updateCurrentSearch: UpdateCurrentSearch = function (searchTerm, { shouldEmit } = {}) {\n internalSearch.value = searchTerm || '';\n setPage(1);\n\n if (shouldEmit) {\n emitUpdate();\n emit('update:currentSearch', searchTerm);\n }\n };\n\n watch(\n () => props.currentSearch,\n () => {\n updateCurrentSearch(props.currentSearch);\n },\n { immediate: true },\n );\n // #endregion search\n\n // #region filters\n const internalFilters = ref<object>({});\n\n const updateCurrentFilters: UpdateCurrentFilters = function (newFilters: object, { shouldEmit } = {}) {\n internalFilters.value = newFilters;\n setPage(1);\n\n if (shouldEmit) {\n emitUpdate();\n emit('update:currentFilters', newFilters);\n }\n };\n // #endregion filters\n\n function emitUpdate() {\n emit('update', {\n page: internalPage.value,\n pageSize: props.pageSize,\n ordering: internalSort.value,\n search: internalSearch.value,\n filters: cloneDeep(internalFilters.value),\n });\n }\n\n provide(\n DATA_VIEW_INJECTION.key,\n Object.freeze({\n // Pagination\n currentPage: computed(() => internalPage.value),\n isPaginationEnabled,\n pageCount,\n pageSize: computed(() => props.pageSize),\n totalDataCount: computed(() => props.totalDataCount),\n setPage,\n goPrevPage,\n goNextPage,\n\n // Sorting\n currentSortId: internalSortId,\n currentSortOrder: internalSortOrder,\n updateCurrentSort,\n\n // Search\n currentSearch: computed(() => internalSearch.value),\n updateCurrentSearch,\n\n // Miscellaneous\n density: computed(() => props.density),\n hasToolbar,\n isEmpty: computed(() => props.data.length === 0),\n isSelectable,\n isLoading: computed(() => props.isLoading),\n isWithinModule,\n variant: computedVariant,\n }),\n );\n\n defineExpose({\n page: computed(() => internalPage.value),\n pageSize: computed(() => props.pageSize),\n setPage,\n goPrevPage,\n goNextPage,\n ordering: computed(() => internalSort.value),\n updateCurrentSort,\n search: computed(() => internalSearch.value),\n updateCurrentSearch,\n filters: computed(() => internalFilters.value),\n updateCurrentFilters,\n });\n</script>\n\n<template>\n <div ref=\"rootRef\" class=\"stash-data-view tw-relative\" data-test=\"stash-data-view\">\n <!-- @slot default -->\n <slot\n :current-page=\"internalPage\"\n :current-sort-id=\"internalSortId\"\n :current-sort-order=\"internalSortOrder\"\n :data=\"data\"\n :go-prev-page=\"goPrevPage\"\n :go-next-page=\"goNextPage\"\n :page-count=\"pageCount\"\n :set-page=\"setPage\"\n :total-data-count=\"props.totalDataCount\"\n :update-current-sort=\"updateCurrentSort\"\n :update-current-search=\"updateCurrentSearch\"\n ></slot>\n\n <Paginate\n v-if=\"isPaginationEnabled && !isWithinModule && pageCount > 1 && !props.hideBottomPagination\"\n class=\"tw-mt-6\"\n :class=\"classes.paginate\"\n :current-page=\"internalPage\"\n :list-length=\"props.totalDataCount\"\n :page-size=\"props.pageSize\"\n @set-page=\"(page: number) => setPage(page, { shouldEmit: true })\"\n />\n </div>\n</template>\n\n<style module>\n .paginate ul {\n margin: 0;\n }\n</style>\n"],"names":["deserializeSortValue","sort","order","serializeSortValue","id","getNextSort","newId","newOrder","oldId","oldOrder","DataViewVariant","classes","useCssModule","rootRef","ref","moduleInjection","inject","MODULE_INJECTION","computedVariant","computed","props","_a","isWithinModule","internalPage","isPaginationEnabled","pageCount","setPage","page","shouldEmit","emitUpdate","emit","_b","goPrevPage","goNextPage","watch","internalSort","internalSortId","internalSortOrder","updateCurrentSort","sortId","sortOrder","nextSort","internalSearch","hasToolbar","isSelectable","updateCurrentSearch","searchTerm","internalFilters","updateCurrentFilters","newFilters","cloneDeep","provide","DATA_VIEW_INJECTION","__expose"],"mappings":";;;;;;;;;;;AAKO,SAASA,EAAqBC,GAAwC;AAC3E,QAAMC,IAAQD,EAAK,CAAC,MAAM,MAAM,SAAS;AAGlC,SAAA,EAAE,IAFEC,MAAU,QAAQD,IAAOA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AAA,IACH;AAEA,WAAAI;AAAA,MACEC,EAAoB;AAAA,MACpB,OAAO,OAAO;AAAA;AAAA,QAEZ,aAAajC,EAAS,MAAMI,EAAa,KAAK;AAAA,QAC9C,qBAAAC;AAAA,QACA,WAAAC;AAAA,QACA,UAAUN,EAAS,MAAMC,EAAM,QAAQ;AAAA,QACvC,gBAAgBD,EAAS,MAAMC,EAAM,cAAc;AAAA,QACnD,SAAAM;AAAA,QACA,YAAAM;AAAA,QACA,YAAAC;AAAA;AAAA,QAGA,eAAeG;AAAA,QACf,kBAAkBC;AAAA,QAClB,mBAAAC;AAAA;AAAA,QAGA,eAAenB,EAAS,MAAMuB,EAAe,KAAK;AAAA,QAClD,qBAAAG;AAAA;AAAA,QAGA,SAAS1B,EAAS,MAAMC,EAAM,OAAO;AAAA,QACrC,YAAAuB;AAAA,QACA,SAASxB,EAAS,MAAMC,EAAM,KAAK,WAAW,CAAC;AAAA,QAC/C,cAAAwB;AAAA,QACA,WAAWzB,EAAS,MAAMC,EAAM,SAAS;AAAA,QACzC,gBAAAE;AAAA,QACA,SAASJ;AAAA,MAAA,CACV;AAAA,IAAA,GAGUmC,EAAA;AAAA,MACX,MAAMlC,EAAS,MAAMI,EAAa,KAAK;AAAA,MACvC,UAAUJ,EAAS,MAAMC,EAAM,QAAQ;AAAA,MACvC,SAAAM;AAAA,MACA,YAAAM;AAAA,MACA,YAAAC;AAAA,MACA,UAAUd,EAAS,MAAMgB,EAAa,KAAK;AAAA,MAC3C,mBAAAG;AAAA,MACA,QAAQnB,EAAS,MAAMuB,EAAe,KAAK;AAAA,MAC3C,qBAAAG;AAAA,MACA,SAAS1B,EAAS,MAAM4B,EAAgB,KAAK;AAAA,MAC7C,sBAAAC;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"DataView.js","sources":["../src/components/DataView/DataView.utils.ts","../src/components/DataView/DataView.types.ts","../src/components/DataView/DataView.vue"],"sourcesContent":["import { SortId, SortOrder, SortValue, SortValueDeserialized } from './DataView.types';\n\n/**\n * Receives a SortValue (ex: `'-product_name'`) and returns an object with a `id` and an `order`.\n */\nexport function deserializeSortValue(sort: SortValue): SortValueDeserialized {\n const order = sort[0] === '-' ? 'desc' : 'asc';\n const id = order === 'asc' ? sort : sort.slice(1);\n\n return { id, order };\n}\n\n/**\n * Receives an object with a `id` and an `order` and returns a SortValue (ex: `'-product_name'`).\n */\nexport function serializeSortValue({ id, order }: SortValueDeserialized): SortValue {\n return `${order === 'desc' ? '-' : ''}${id}`;\n}\n\ninterface GetNextSortArgs {\n newId: SortId | undefined;\n newOrder?: SortOrder;\n oldId?: SortId;\n oldOrder?: SortOrder;\n}\n\n/**\n * Given new and old sorting data, it returns the next sorting value using the following sorting cycle:\n *\n * \"unsorted --> ascending --> descending --> unsorted\"\n */\nexport function getNextSort({ newId, newOrder, oldId, oldOrder }: GetNextSortArgs): SortValue | undefined {\n if (!newId) {\n return undefined;\n }\n\n if (newId !== oldId) {\n // if sorting by a new field, sort ascending\n return serializeSortValue({ id: newId, order: newOrder || 'asc' });\n }\n\n /**\n * `newOrder` and `oldOrder` can each have 3 different values: undefined, 'asc', or 'desc'.\n * Therefore, there are 9 possible combinations (3 times 3). See below:\n */\n\n // #region newOrder: undefined\n if (!newOrder && !oldOrder) {\n return newId; // ascending\n }\n\n if (!newOrder && oldOrder === 'desc') {\n return undefined; // unsorted\n }\n\n if (!newOrder && oldOrder === 'asc') {\n return `-${newId}`; // descending\n }\n // #endregion\n\n // #region newOrder: asc\n if (newOrder === 'asc' && !oldOrder) {\n return newId;\n }\n\n if (newOrder === 'asc' && oldOrder === 'asc') {\n return undefined;\n }\n\n if (newOrder === 'asc' && oldOrder === 'desc') {\n return newId;\n }\n // #endregion\n\n // #region newOrder: desc\n if (newOrder === 'desc' && !oldOrder) {\n return `-${newId}`;\n }\n\n if (newOrder === 'desc' && oldOrder === 'desc') {\n return undefined;\n }\n\n if (newOrder === 'desc' && oldOrder === 'asc') {\n return `-${newId}`;\n }\n // #endregion\n}\n","import { ComputedRef, Ref } from 'vue';\n\nimport { SpacingDensities } from '../../../types/misc';\n\nexport enum DataViewVariant {\n Table = 'table',\n}\n\nexport type DataViewVariants = `${DataViewVariant}`;\n\n/**\n * A unique id for a sorting strategy. If the order is descending, it must begin with \"-\" (a hyphen/dash).\n *\n * Ex: `'product_name'` if ascending or `'-product_name'` if descending\n */\nexport type SortValue = string;\n\n/**\n * The SortValue with its leading hyphen/dash removed\n */\nexport type SortId = string;\n\n/**\n * Determined by whether or not there is a leading hyphen/dash in the SortValue\n */\nexport type SortOrder = 'asc' | 'desc';\n\n/**\n * A deserialized instance of a `SortValue`.\n */\nexport type SortValueDeserialized = {\n id: SortId;\n order: SortOrder;\n};\n\n/** Updates the DataView internal state with the given sortId */\nexport type UpdateCurrentSort = (\n sortId: SortId | undefined,\n options?: {\n sortOrder?: SortOrder;\n /** If true, emits the `update:currentSort` and `update` events from DataView */\n shouldEmit?: boolean;\n },\n) => void;\n\n/** Updates the DataView internal state with the given page */\nexport type SetPage = (\n page: number,\n options?: {\n /** If true, emits the `update:currentPage` and `update` events from DataView */\n shouldEmit?: boolean;\n },\n) => void;\n\n/** Updates the DataView internal state with the previous page */\nexport type GoPrevPage = (options?: {\n /** If true, emits the `update:currentPage` and `update` events from DataView */\n shouldEmit?: boolean;\n}) => void;\n\n/** Updates the DataView internal state with the next page */\nexport type GoNextPage = (options?: {\n /** If true, emits the `update:currentPage` and `update` events from DataView */\n shouldEmit?: boolean;\n}) => void;\n\n/** Updates the DataView internal state with the given searchTerm */\nexport type UpdateCurrentSearch = (\n searchTerm?: string,\n options?: {\n /** If true, emits the `update:currentSearch` and `update` events from DataView */\n shouldEmit?: boolean;\n },\n) => void;\n\n/** Updates the DataView internal state with the given filter values */\nexport type UpdateCurrentFilters<FilterValues = object> = (\n newFilters: FilterValues,\n options?: {\n /** If true, emits the `update:currentSearch` and `update` events from DataView */\n shouldEmit?: boolean;\n },\n) => void;\n\nexport interface UpdateEvent<FilterValues = object> {\n page?: number;\n pageSize?: number;\n ordering?: string;\n search?: string;\n filters?: FilterValues;\n}\n\nexport interface DataViewInjection {\n currentPage: ComputedRef<number>;\n\n isPaginationEnabled: ComputedRef<boolean>;\n\n pageCount: ComputedRef<number>;\n\n pageSize: ComputedRef<number>;\n\n totalDataCount: ComputedRef<number>;\n\n /** Updates the DataView internal state with the given page */\n setPage: SetPage;\n\n /** Updates the DataView internal state with the previous page */\n goPrevPage: GoPrevPage;\n\n /** Updates the DataView internal state with the next page */\n goNextPage: GoNextPage;\n\n currentSortId: ComputedRef<SortId | undefined>;\n\n currentSortOrder: ComputedRef<SortOrder | undefined>;\n\n /** Updates the DataView internal state with the given sortId */\n updateCurrentSort: UpdateCurrentSort;\n\n currentSearch: ComputedRef<string>;\n\n /** Updates the DataView internal state with the given searchTerm */\n updateCurrentSearch: UpdateCurrentSearch;\n\n /**\n * The DataView's padding; the default value is \"comfortable\". On small screens, the density will always be \"compact\".\n */\n density: ComputedRef<SpacingDensities | undefined>;\n\n /**\n * Defines if a DataView has a Toolbar rendered. This prop is updated when DataViewToolbar exists and is mounted.\n */\n hasToolbar?: Ref<boolean>;\n\n /**\n * Enables certain loading indicators to be displayed within the DataView.\n */\n isLoading?: ComputedRef<boolean>;\n\n /**\n * Enables certain empty states to be displayed within the DataView.\n */\n isEmpty?: ComputedRef<boolean>;\n\n /**\n * Allows Table to control whether or not a DataViewToolbar should show a checkmark\n */\n isSelectable?: Ref<boolean>;\n\n /**\n * Whether or not the DataView is rendered within a Module; the value is inferred based on being\n * able to inject details from Module.\n *\n * Note: This is sent to DataView child components so they only need to worry about interfacing\n * with the DataViewInjection API.\n */\n isWithinModule: ComputedRef<boolean>;\n\n /**\n * The DataView's variant; the default value is undefined.\n */\n variant: ComputedRef<DataViewVariants | undefined>;\n}\n","<script lang=\"ts\">\n export * from './DataView.constants';\n export * from './DataView.keys';\n export * from './DataView.types';\n export * from './DataView.utils';\n</script>\n\n<script setup lang=\"ts\">\n import cloneDeep from 'lodash-es/cloneDeep';\n import { computed, inject, provide, ref, useCssModule, watch } from 'vue';\n\n import { SpacingDensities } from '../../../types/misc';\n import { MODULE_INJECTION } from '../Module/Module.keys';\n import Paginate from '../Paginate/Paginate.vue';\n import { DEFAULT_PAGE_SIZE } from './DataView.constants';\n import { DATA_VIEW_INJECTION } from './DataView.keys';\n import {\n DataViewVariants,\n GoNextPage,\n GoPrevPage,\n SetPage,\n SortId,\n SortOrder,\n SortValue,\n UpdateCurrentFilters,\n UpdateCurrentSearch,\n UpdateCurrentSort,\n UpdateEvent,\n } from './DataView.types';\n import { deserializeSortValue, getNextSort } from './DataView.utils';\n\n export interface DataViewProps {\n /**\n * Can be used to provide the initial page.\n * Also, it can be used to control the active page with `v-model:current-page=\"myPage\"`.\n */\n currentPage?: number;\n\n /**\n * Can be used to set the initial search term.\n * Also, it can be used to control the active search term with `v-model:current-search=\"mySearchTerm\"`.\n */\n currentSearch?: string;\n\n /**\n * Can be used to provide the initial sort order.\n * Also, it can be used to control the active sort order with `v-model:current-sort=\"mySortOrder\"`.\n */\n currentSort?: SortValue;\n\n /**\n * A list of records. If pagination is enabled, `data` must be only the current page of records.\n */\n data?: object[];\n\n /**\n * Controls the DataView's padding; the default value is \"comfortable\". On small screens, \"compact\" density is applied regardless of this prop's value.\n */\n density?: SpacingDensities;\n\n pageSize?: number;\n\n /**\n * Opt-out of displaying pagination. Hides the pagination buttons and page stats.\n */\n disablePagination?: boolean;\n\n /**\n * Hides the bottom pagination without disabling the pagination from the toolbar\n */\n hideBottomPagination?: boolean;\n\n /**\n * The total number of records available.\n * Used to auto-enable pagination when results exist.\n * DataView does not paginate data for you; instead, `props.data` should always show\n * the current page of results.\n */\n totalDataCount?: number;\n\n /**\n * DataView variant. The default value is `undefined`. Will default to `table` when used within\n * a `<Module variant=\"table\">`.\n */\n variant?: DataViewVariants;\n\n isLoading?: boolean;\n }\n\n const props = withDefaults(defineProps<DataViewProps>(), {\n currentPage: 1,\n currentSearch: undefined,\n currentSort: undefined,\n data: () => [],\n density: 'comfortable',\n pageSize: DEFAULT_PAGE_SIZE,\n disablePagination: false,\n totalDataCount: 0,\n hideBottomPagination: false,\n variant: undefined,\n });\n\n const emit = defineEmits<{\n (e: 'update', state: UpdateEvent): void;\n (e: 'update:currentFilters', newFilters: object): void;\n (e: 'update:currentPage', page: number, pageSize: number): void;\n (e: 'update:currentSearch', searchTerm?: string): void;\n (e: 'update:currentSort', payload?: SortValue): void;\n }>();\n\n const classes = useCssModule();\n const rootRef = ref<HTMLElement | null>(null);\n const moduleInjection = inject(MODULE_INJECTION.key, MODULE_INJECTION.defaults);\n const computedVariant = computed<DataViewVariants | undefined>(() => {\n if (props.variant) {\n return props.variant;\n }\n\n if (moduleInjection.variant?.value === 'table') {\n return 'table';\n }\n\n return undefined;\n });\n const isWithinModule = computed(() => moduleInjection.variant !== undefined);\n\n // #region pagination\n const internalPage = ref(1);\n const isPaginationEnabled = computed(() => !props.disablePagination && props.totalDataCount > 0);\n const pageCount = computed(() => Math.ceil(props.totalDataCount / props.pageSize));\n\n const setPage: SetPage = function (page: number, { shouldEmit } = {}) {\n internalPage.value = page;\n\n if (shouldEmit) {\n emitUpdate();\n emit('update:currentPage', page, props.pageSize);\n }\n\n if (Number(rootRef.value?.getBoundingClientRect().top) < 0) {\n rootRef.value?.scrollIntoView({ behavior: 'smooth', block: 'start' });\n }\n };\n\n const goPrevPage: GoPrevPage = function ({ shouldEmit } = {}) {\n const page = Math.max(internalPage.value - 1, 1);\n\n setPage(page, { shouldEmit });\n };\n\n /** Updates the DataView internal state with the previous page */\n const goNextPage: GoNextPage = function ({ shouldEmit } = {}) {\n const page = Math.min(internalPage.value + 1, pageCount.value);\n\n setPage(page, { shouldEmit });\n };\n\n watch(\n () => props.currentPage,\n () => {\n setPage(props.currentPage);\n },\n { immediate: true },\n );\n // #endregion pagination\n\n // #region sorting\n const internalSort = ref<SortValue | undefined>(undefined);\n\n const internalSortId = computed<SortId | undefined>(() =>\n internalSort.value ? deserializeSortValue(internalSort.value).id : undefined,\n );\n const internalSortOrder = computed<SortOrder | undefined>(() =>\n internalSort.value ? deserializeSortValue(internalSort.value).order : undefined,\n );\n\n const updateCurrentSort: UpdateCurrentSort = function (sortId, { sortOrder, shouldEmit } = {}) {\n const { id: oldId, order: oldOrder } = deserializeSortValue(internalSort.value || '');\n const nextSort = getNextSort({ newId: sortId, newOrder: sortOrder, oldId, oldOrder });\n\n internalSort.value = nextSort;\n setPage(1);\n\n if (shouldEmit) {\n emitUpdate();\n emit('update:currentSort', nextSort);\n }\n };\n\n watch(\n () => props.currentSort,\n () => {\n updateCurrentSort(props.currentSort);\n },\n { immediate: true },\n );\n // #endregion sorting\n\n // #region search\n const internalSearch = ref('');\n\n const hasToolbar = ref(false);\n const isSelectable = ref(false);\n\n const updateCurrentSearch: UpdateCurrentSearch = function (searchTerm, { shouldEmit } = {}) {\n internalSearch.value = searchTerm || '';\n setPage(1);\n\n if (shouldEmit) {\n emitUpdate();\n emit('update:currentSearch', searchTerm);\n }\n };\n\n watch(\n () => props.currentSearch,\n () => {\n updateCurrentSearch(props.currentSearch);\n },\n { immediate: true },\n );\n // #endregion search\n\n // #region filters\n const internalFilters = ref<object>({});\n\n const updateCurrentFilters: UpdateCurrentFilters = function (newFilters: object, { shouldEmit } = {}) {\n internalFilters.value = newFilters;\n setPage(1);\n\n if (shouldEmit) {\n emitUpdate();\n emit('update:currentFilters', newFilters);\n }\n };\n // #endregion filters\n\n function emitUpdate() {\n emit('update', {\n page: internalPage.value,\n pageSize: props.pageSize,\n ordering: internalSort.value,\n search: internalSearch.value,\n filters: cloneDeep(internalFilters.value),\n });\n }\n\n provide(\n DATA_VIEW_INJECTION.key,\n Object.freeze({\n // Pagination\n currentPage: computed(() => internalPage.value),\n isPaginationEnabled,\n pageCount,\n pageSize: computed(() => props.pageSize),\n totalDataCount: computed(() => props.totalDataCount),\n setPage,\n goPrevPage,\n goNextPage,\n\n // Sorting\n currentSortId: internalSortId,\n currentSortOrder: internalSortOrder,\n updateCurrentSort,\n\n // Search\n currentSearch: computed(() => internalSearch.value),\n updateCurrentSearch,\n\n // Miscellaneous\n density: computed(() => props.density),\n hasToolbar,\n isEmpty: computed(() => props.data.length === 0),\n isSelectable,\n isLoading: computed(() => props.isLoading),\n isWithinModule,\n variant: computedVariant,\n }),\n );\n\n defineExpose({\n page: computed(() => internalPage.value),\n pageSize: computed(() => props.pageSize),\n setPage,\n goPrevPage,\n goNextPage,\n ordering: computed(() => internalSort.value),\n updateCurrentSort,\n search: computed(() => internalSearch.value),\n updateCurrentSearch,\n filters: computed(() => internalFilters.value),\n updateCurrentFilters,\n });\n</script>\n\n<template>\n <div ref=\"rootRef\" class=\"stash-data-view tw-relative\" data-test=\"stash-data-view\">\n <!-- @slot default -->\n <slot\n :current-page=\"internalPage\"\n :current-sort-id=\"internalSortId\"\n :current-sort-order=\"internalSortOrder\"\n :data=\"data\"\n :go-prev-page=\"goPrevPage\"\n :go-next-page=\"goNextPage\"\n :page-count=\"pageCount\"\n :set-page=\"setPage\"\n :total-data-count=\"props.totalDataCount\"\n :update-current-sort=\"updateCurrentSort\"\n :update-current-search=\"updateCurrentSearch\"\n ></slot>\n\n <Paginate\n v-if=\"isPaginationEnabled && !isWithinModule && pageCount > 1 && !props.hideBottomPagination\"\n class=\"tw-mt-6\"\n :class=\"classes.paginate\"\n :current-page=\"internalPage\"\n :list-length=\"props.totalDataCount\"\n :page-size=\"props.pageSize\"\n @set-page=\"(page: number) => setPage(page, { shouldEmit: true })\"\n />\n </div>\n</template>\n\n<style module>\n .paginate ul {\n margin: 0;\n }\n</style>\n"],"names":["deserializeSortValue","sort","order","serializeSortValue","id","getNextSort","newId","newOrder","oldId","oldOrder","DataViewVariant","props","__props","emit","__emit","classes","useCssModule","rootRef","ref","moduleInjection","inject","MODULE_INJECTION","computedVariant","computed","_a","isWithinModule","internalPage","isPaginationEnabled","pageCount","setPage","page","shouldEmit","emitUpdate","_b","goPrevPage","goNextPage","watch","internalSort","internalSortId","internalSortOrder","updateCurrentSort","sortId","sortOrder","nextSort","internalSearch","hasToolbar","isSelectable","updateCurrentSearch","searchTerm","internalFilters","updateCurrentFilters","newFilters","cloneDeep","provide","DATA_VIEW_INJECTION","__expose"],"mappings":";;;;;;;;;;;AAKO,SAASA,EAAqBC,GAAwC;AAC3E,QAAMC,IAAQD,EAAK,CAAC,MAAM,MAAM,SAAS;AAGlC,SAAA,EAAE,IAFEC,MAAU,QAAQD,IAAOA,EAAK,MAAM,CAAC,GAEnC,OAAAC;AACf;AAKO,SAASC,GAAmB,EAAE,IAAAC,GAAI,OAAAF,KAA2C;AAClF,SAAO,GAAGA,MAAU,SAAS,MAAM,KAAKE;AAC1C;AAcO,SAASC,GAAY,EAAE,OAAAC,GAAO,UAAAC,GAAU,OAAAC,GAAO,UAAAC,KAAoD;AACxG,MAAKH,GAIL;AAAA,QAAIA,MAAUE;AAEZ,aAAOL,GAAmB,EAAE,IAAIG,GAAO,OAAOC,KAAY,OAAO;AAS/D,QAAA,CAACA,KAAY,CAACE;AACT,aAAAH;AAGL,QAAA,GAACC,KAAYE,MAAa,SAI1B;AAAA,UAAA,CAACF,KAAYE,MAAa;AAC5B,eAAO,IAAIH;AAKT,UAAAC,MAAa,SAAS,CAACE;AAClB,eAAAH;AAGL,UAAA,EAAAC,MAAa,SAASE,MAAa,QAInC;AAAA,YAAAF,MAAa,SAASE,MAAa;AAC9B,iBAAAH;AAKL,YAAAC,MAAa,UAAU,CAACE;AAC1B,iBAAO,IAAIH;AAGT,YAAA,EAAAC,MAAa,UAAUE,MAAa,WAIpCF,MAAa,UAAUE,MAAa;AACtC,iBAAO,IAAIH;AAAA;AAAA;AAAA;AAGf;ACnFY,IAAAI,uBAAAA,OACVA,EAAA,QAAQ,SADEA,IAAAA,MAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;ACqFV,UAAMC,IAAQC,GAaRC,IAAOC,GAQPC,IAAUC,KACVC,IAAUC,EAA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A,YAAAC;AAAA,MACA,UAAUZ,EAAS,MAAMc,EAAa,KAAK;AAAA,MAC3C,mBAAAG;AAAA,MACA,QAAQjB,EAAS,MAAMqB,EAAe,KAAK;AAAA,MAC3C,qBAAAG;AAAA,MACA,SAASxB,EAAS,MAAM0B,EAAgB,KAAK;AAAA,MAC7C,sBAAAC;AAAA,IAAA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/DataView.vue.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { AllowedComponentProps } from 'vue';
|
|
2
|
-
import { ComponentCustomProps } from 'vue';
|
|
3
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
4
3
|
import { ComputedRef } from 'vue';
|
|
5
4
|
import { DefineComponent } from 'vue';
|
|
6
5
|
import { ExtractPropTypes } from 'vue';
|
|
7
6
|
import { InjectionKey } from 'vue';
|
|
8
7
|
import { PropType } from 'vue';
|
|
8
|
+
import { PublicProps } from 'vue';
|
|
9
9
|
import { Ref } from 'vue';
|
|
10
|
-
import { VNodeProps } from 'vue';
|
|
11
10
|
|
|
12
11
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
12
|
|
|
@@ -149,7 +148,7 @@ export declare enum DataViewVariant {
|
|
|
149
148
|
|
|
150
149
|
export declare type DataViewVariants = `${DataViewVariant}`;
|
|
151
150
|
|
|
152
|
-
declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DataViewProps>, {
|
|
151
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DataViewProps>, {
|
|
153
152
|
currentPage: number;
|
|
154
153
|
currentSearch: undefined;
|
|
155
154
|
currentSort: undefined;
|
|
@@ -160,7 +159,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
160
159
|
totalDataCount: number;
|
|
161
160
|
hideBottomPagination: boolean;
|
|
162
161
|
variant: undefined;
|
|
163
|
-
}
|
|
162
|
+
}>>, {
|
|
164
163
|
page: ComputedRef<number>;
|
|
165
164
|
pageSize: ComputedRef<number>;
|
|
166
165
|
setPage: SetPage;
|
|
@@ -172,13 +171,13 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
172
171
|
updateCurrentSearch: UpdateCurrentSearch;
|
|
173
172
|
filters: ComputedRef<object>;
|
|
174
173
|
updateCurrentFilters: UpdateCurrentFilters;
|
|
175
|
-
},
|
|
174
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
176
175
|
update: (state: UpdateEvent<object>) => void;
|
|
177
176
|
"update:currentFilters": (newFilters: object) => void;
|
|
178
177
|
"update:currentPage": (page: number, pageSize: number) => void;
|
|
179
178
|
"update:currentSearch": (searchTerm?: string | undefined) => void;
|
|
180
179
|
"update:currentSort": (payload?: string | undefined) => void;
|
|
181
|
-
}, string,
|
|
180
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DataViewProps>, {
|
|
182
181
|
currentPage: number;
|
|
183
182
|
currentSearch: undefined;
|
|
184
183
|
currentSort: undefined;
|
|
@@ -189,13 +188,13 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
189
188
|
totalDataCount: number;
|
|
190
189
|
hideBottomPagination: boolean;
|
|
191
190
|
variant: undefined;
|
|
192
|
-
}>>> & {
|
|
191
|
+
}>>> & Readonly<{
|
|
193
192
|
onUpdate?: ((state: UpdateEvent<object>) => any) | undefined;
|
|
194
193
|
"onUpdate:currentFilters"?: ((newFilters: object) => any) | undefined;
|
|
195
194
|
"onUpdate:currentPage"?: ((page: number, pageSize: number) => any) | undefined;
|
|
196
195
|
"onUpdate:currentSearch"?: ((searchTerm?: string | undefined) => any) | undefined;
|
|
197
196
|
"onUpdate:currentSort"?: ((payload?: string | undefined) => any) | undefined;
|
|
198
|
-
}
|
|
197
|
+
}>, {
|
|
199
198
|
data: object[];
|
|
200
199
|
variant: "table";
|
|
201
200
|
currentPage: number;
|
|
@@ -206,7 +205,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
206
205
|
currentSort: string;
|
|
207
206
|
disablePagination: boolean;
|
|
208
207
|
hideBottomPagination: boolean;
|
|
209
|
-
}, {}>, {
|
|
208
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
210
209
|
default?(_: {
|
|
211
210
|
currentPage: number;
|
|
212
211
|
currentSortId: string | undefined;
|
package/dist/DataViewFilters.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ref as x, computed as S, defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { SCREEN_SIZES as
|
|
4
|
-
import { t as
|
|
5
|
-
import { _ as
|
|
6
|
-
import
|
|
1
|
+
import { ref as x, computed as S, defineComponent as W, useSlots as j, inject as M, provide as O, watch as J, openBlock as f, createBlock as v, normalizeClass as z, unref as r, withCtx as u, mergeProps as P, createCommentVNode as p, createElementBlock as Q, createElementVNode as _, renderSlot as V, createVNode as I, createTextVNode as k, toDisplayString as g } from "vue";
|
|
2
|
+
import U from "./useMediaQuery.js";
|
|
3
|
+
import { SCREEN_SIZES as Z } from "./constants.js";
|
|
4
|
+
import { t as d } from "./locale.js";
|
|
5
|
+
import { _ as q } from "./Box.vue_vue_type_script_setup_true_lang-69e5176b.js";
|
|
6
|
+
import C from "./Button.js";
|
|
7
7
|
import T from "lodash-es/cloneDeep";
|
|
8
8
|
import $ from "./Icon.js";
|
|
9
9
|
import "./Paginate.vue_used_vue_type_style_index_0_lang.module-18343da7.js";
|
|
10
10
|
import { D as G } from "./DataView.vue_used_vue_type_style_index_0_lang.module-5c180dba.js";
|
|
11
|
-
import
|
|
12
|
-
import { _ as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { D as
|
|
11
|
+
import H from "./FilterChip.js";
|
|
12
|
+
import { _ as K } from "./Label.vue_vue_type_script_setup_true_lang-4b02087f.js";
|
|
13
|
+
import X from "./Modal.js";
|
|
14
|
+
import Y from "./SearchBar.js";
|
|
15
|
+
import { D as ee } from "./DataViewFilters.keys-c80ffabe.js";
|
|
16
16
|
import { i as L } from "./isDefined-2ce6cde4.js";
|
|
17
17
|
import "lodash-es/get";
|
|
18
18
|
import "./Button.vue_used_vue_type_style_index_0_lang.module-a9290468.js";
|
|
@@ -27,66 +27,66 @@ import "./Input.js";
|
|
|
27
27
|
import "lodash-es/isNil";
|
|
28
28
|
import "./utils/i18n.js";
|
|
29
29
|
import "./Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js";
|
|
30
|
-
function
|
|
31
|
-
schema:
|
|
32
|
-
dataViewRef:
|
|
30
|
+
function Te({
|
|
31
|
+
schema: s,
|
|
32
|
+
dataViewRef: D
|
|
33
33
|
}) {
|
|
34
|
-
const e = x({}),
|
|
35
|
-
for (const
|
|
36
|
-
e.value[
|
|
37
|
-
const
|
|
38
|
-
function
|
|
39
|
-
e.value = T(
|
|
34
|
+
const e = x({}), o = x({});
|
|
35
|
+
for (const t in s)
|
|
36
|
+
e.value[t] = s[t].defaultValue, o.value[t] = s[t].defaultValue;
|
|
37
|
+
const m = D;
|
|
38
|
+
function h() {
|
|
39
|
+
e.value = T(o.value), m.value.updateCurrentFilters(e.value, { shouldEmit: !0 });
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
for (const
|
|
43
|
-
e.value[
|
|
44
|
-
|
|
41
|
+
function B() {
|
|
42
|
+
for (const t in s)
|
|
43
|
+
e.value[t] = s[t].defaultValue, o.value[t] = s[t].defaultValue;
|
|
44
|
+
m.value.updateCurrentFilters(e.value, { shouldEmit: !0 });
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
for (const
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
function y(t) {
|
|
47
|
+
for (const i in s)
|
|
48
|
+
s[i].group === t && (e.value[i] = s[i].defaultValue, o.value[i] = s[i].defaultValue);
|
|
49
|
+
m.value.updateCurrentFilters(e.value, { shouldEmit: !0 });
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
|
|
51
|
+
function A() {
|
|
52
|
+
o.value = T(e.value);
|
|
53
53
|
}
|
|
54
54
|
const E = S(() => {
|
|
55
|
-
var
|
|
56
|
-
const
|
|
57
|
-
for (const
|
|
58
|
-
const
|
|
59
|
-
(((
|
|
55
|
+
var i;
|
|
56
|
+
const t = {};
|
|
57
|
+
for (const a in s) {
|
|
58
|
+
const n = s[a], w = e.value[a];
|
|
59
|
+
(((i = n.isActive) == null ? void 0 : i.call(n, w)) || L(w)) && n.group && (t[n.group] = (t[n.group] ?? 0) + 1);
|
|
60
60
|
}
|
|
61
|
-
return
|
|
62
|
-
}),
|
|
63
|
-
var
|
|
64
|
-
let
|
|
65
|
-
for (const
|
|
66
|
-
const
|
|
67
|
-
(((
|
|
61
|
+
return t;
|
|
62
|
+
}), N = S(() => {
|
|
63
|
+
var i;
|
|
64
|
+
let t = 0;
|
|
65
|
+
for (const a in s) {
|
|
66
|
+
const n = s[a], w = e.value[a];
|
|
67
|
+
(((i = n.isActive) == null ? void 0 : i.call(n, w)) || L(w)) && (t += 1);
|
|
68
68
|
}
|
|
69
|
-
return
|
|
69
|
+
return t;
|
|
70
70
|
});
|
|
71
71
|
return {
|
|
72
|
-
applyFilters:
|
|
73
|
-
resetAllFilters:
|
|
72
|
+
applyFilters: h,
|
|
73
|
+
resetAllFilters: B,
|
|
74
74
|
// @ts-expect-error "could be instantiated with a different subtype": TODO: figure out how to resolve the types
|
|
75
|
-
resetFilterGroup:
|
|
76
|
-
undoWorkingFilters:
|
|
75
|
+
resetFilterGroup: y,
|
|
76
|
+
undoWorkingFilters: A,
|
|
77
77
|
activeFiltersCounts: E,
|
|
78
|
-
totalActiveFiltersCount:
|
|
78
|
+
totalActiveFiltersCount: N,
|
|
79
79
|
appliedFilters: e,
|
|
80
|
-
workingFilters:
|
|
80
|
+
workingFilters: o
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const te = {
|
|
84
84
|
key: 1,
|
|
85
85
|
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"
|
|
86
|
-
},
|
|
86
|
+
}, le = { class: "tw-hidden md:tw-block" }, re = { class: "tw-flex tw-gap-4" }, se = { class: "tw-inline-flex tw-items-center tw-gap-3" }, ae = { class: "tw-flex tw-flex-col-reverse tw-gap-gutter lg:tw-flex-row lg:tw-justify-end" }, $e = /* @__PURE__ */ W({
|
|
87
87
|
__name: "DataViewFilters",
|
|
88
88
|
props: {
|
|
89
|
-
filtersLabelText: { default:
|
|
89
|
+
filtersLabelText: { default: d("ll.filterBy") },
|
|
90
90
|
searchBarProps: { default: void 0 },
|
|
91
91
|
showSearch: { type: Boolean, default: !0 },
|
|
92
92
|
drawerStyle: { default: "nested" },
|
|
@@ -97,176 +97,179 @@ const ee = {
|
|
|
97
97
|
activeGroup: { default: "" }
|
|
98
98
|
},
|
|
99
99
|
emits: ["open-drawer", "dismiss", "previous", "reset-group", "reset-all"],
|
|
100
|
-
setup(
|
|
101
|
-
const e =
|
|
102
|
-
density:
|
|
103
|
-
isLoading:
|
|
104
|
-
isWithinModule:
|
|
105
|
-
currentSearch:
|
|
106
|
-
updateCurrentSearch:
|
|
107
|
-
} =
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
100
|
+
setup(s, { emit: D }) {
|
|
101
|
+
const e = s, o = D, m = j(), h = U(`(min-width: ${Z.lg})`), {
|
|
102
|
+
density: B,
|
|
103
|
+
isLoading: y,
|
|
104
|
+
isWithinModule: A,
|
|
105
|
+
currentSearch: E,
|
|
106
|
+
updateCurrentSearch: N
|
|
107
|
+
} = M(G.key, G.defaults);
|
|
108
|
+
O(ee.key, {
|
|
109
|
+
useFiltersInstance: e.useFiltersInstance,
|
|
110
|
+
drawerStyle: e.drawerStyle
|
|
111
|
+
});
|
|
112
|
+
const t = S(() => {
|
|
113
|
+
var l;
|
|
114
|
+
return ((l = e.useFiltersInstance) == null ? void 0 : l.totalActiveFiltersCount.value) ?? 0;
|
|
115
|
+
}), i = S(
|
|
113
116
|
() => {
|
|
114
|
-
var
|
|
115
|
-
return ((
|
|
117
|
+
var l;
|
|
118
|
+
return ((l = e.useFiltersInstance) == null ? void 0 : l.activeFiltersCounts.value[e.activeGroup]) ?? 0;
|
|
116
119
|
}
|
|
117
|
-
),
|
|
118
|
-
async function
|
|
119
|
-
var
|
|
120
|
-
const { preventDismiss:
|
|
121
|
-
|
|
120
|
+
), a = x(!1);
|
|
121
|
+
async function n() {
|
|
122
|
+
var c, F;
|
|
123
|
+
const { preventDismiss: l } = await ((c = e.onApply) == null ? void 0 : c.call(e)) || ((F = e.useFiltersInstance) == null ? void 0 : F.applyFilters()) || {};
|
|
124
|
+
l || (a.value = !1);
|
|
122
125
|
}
|
|
123
|
-
function
|
|
124
|
-
var
|
|
125
|
-
(
|
|
126
|
+
function w() {
|
|
127
|
+
var l;
|
|
128
|
+
(l = e.useFiltersInstance) == null || l.resetFilterGroup(e.activeGroup), o("reset-group"), a.value = !1;
|
|
126
129
|
}
|
|
127
|
-
function
|
|
128
|
-
var
|
|
129
|
-
(
|
|
130
|
+
function b() {
|
|
131
|
+
var l;
|
|
132
|
+
(l = e.useFiltersInstance) == null || l.resetAllFilters(), o("reset-all"), a.value = !1;
|
|
130
133
|
}
|
|
131
|
-
function
|
|
132
|
-
var
|
|
133
|
-
(
|
|
134
|
+
function R() {
|
|
135
|
+
var l;
|
|
136
|
+
(l = e.useFiltersInstance) == null || l.undoWorkingFilters(), a.value = !1, o("dismiss");
|
|
134
137
|
}
|
|
135
|
-
return
|
|
136
|
-
|
|
137
|
-
}), (
|
|
138
|
-
class:
|
|
139
|
-
radius:
|
|
138
|
+
return J(a, () => {
|
|
139
|
+
a.value && o("open-drawer");
|
|
140
|
+
}), (l, c) => (f(), v(q, {
|
|
141
|
+
class: z(["stash-data-view-filters tw-grid tw-grid-cols-12 tw-gap-6 tw-p-3", { "lg:tw-p-6": r(B) === "comfortable", "tw-mb-3": !r(A) }]),
|
|
142
|
+
radius: r(A) ? "none" : "rounded",
|
|
140
143
|
"data-test": "stash-data-view-filters",
|
|
141
144
|
"disable-padding": ""
|
|
142
145
|
}, {
|
|
143
|
-
default:
|
|
144
|
-
e.showSearch ? (
|
|
146
|
+
default: u(() => [
|
|
147
|
+
e.showSearch ? (f(), v(Y, P({
|
|
145
148
|
key: 0,
|
|
146
149
|
class: "tw-col-span-12 md:tw-col-span-6 lg:tw-col-span-4",
|
|
147
150
|
"data-test": "stash-data-view-filters|search-bar",
|
|
148
|
-
"is-loading":
|
|
149
|
-
label:
|
|
150
|
-
"model-value":
|
|
151
|
+
"is-loading": r(y),
|
|
152
|
+
label: r(d)("ll.search"),
|
|
153
|
+
"model-value": r(E)
|
|
151
154
|
}, e.searchBarProps, {
|
|
152
|
-
onSearch:
|
|
153
|
-
}), null, 16, ["is-loading", "label", "model-value"])) :
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
V(
|
|
157
|
-
I(
|
|
158
|
-
default:
|
|
159
|
-
|
|
155
|
+
onSearch: c[0] || (c[0] = (F) => r(N)(F, { shouldEmit: !0 }))
|
|
156
|
+
}), null, 16, ["is-loading", "label", "model-value"])) : p("", !0),
|
|
157
|
+
m.default ? (f(), Q("div", te, [
|
|
158
|
+
_("div", le, [
|
|
159
|
+
V(l.$slots, "filters-label", {}, () => [
|
|
160
|
+
I(K, null, {
|
|
161
|
+
default: u(() => [
|
|
162
|
+
k(g(e.filtersLabelText), 1)
|
|
160
163
|
]),
|
|
161
164
|
_: 1
|
|
162
165
|
})
|
|
163
166
|
])
|
|
164
167
|
]),
|
|
165
|
-
|
|
166
|
-
I(
|
|
168
|
+
_("div", re, [
|
|
169
|
+
I(H, {
|
|
167
170
|
secondary: "",
|
|
168
171
|
class: "!tw-flex tw-w-full tw-justify-center tw-gap-4 md:!tw-inline-flex md:tw-w-auto",
|
|
169
172
|
"data-test": "stash-data-view-filters|drawer-toggle-button",
|
|
170
|
-
"filter-count":
|
|
171
|
-
onClick:
|
|
173
|
+
"filter-count": t.value,
|
|
174
|
+
onClick: c[1] || (c[1] = (F) => a.value = !0)
|
|
172
175
|
}, {
|
|
173
|
-
default:
|
|
174
|
-
|
|
176
|
+
default: u(() => [
|
|
177
|
+
_("span", se, [
|
|
175
178
|
I($, {
|
|
176
179
|
name: "filter-line",
|
|
177
180
|
class: "tw-text-ice-700"
|
|
178
181
|
}),
|
|
179
|
-
|
|
182
|
+
_("span", null, g(r(d)("ll.filters")), 1)
|
|
180
183
|
])
|
|
181
184
|
]),
|
|
182
185
|
_: 1
|
|
183
186
|
}, 8, ["filter-count"]),
|
|
184
|
-
|
|
185
|
-
|
|
187
|
+
r(h) ? V(l.$slots, "default", { key: 0 }) : p("", !0),
|
|
188
|
+
t.value > 0 && r(h) ? (f(), v(C, {
|
|
186
189
|
key: 1,
|
|
187
190
|
inline: "",
|
|
188
|
-
onClick:
|
|
191
|
+
onClick: b
|
|
189
192
|
}, {
|
|
190
|
-
default:
|
|
191
|
-
|
|
193
|
+
default: u(() => [
|
|
194
|
+
k(g(r(d)("ll.resetAll")), 1)
|
|
192
195
|
]),
|
|
193
196
|
_: 1
|
|
194
|
-
})) :
|
|
197
|
+
})) : p("", !0)
|
|
195
198
|
])
|
|
196
|
-
])) :
|
|
197
|
-
|
|
199
|
+
])) : p("", !0),
|
|
200
|
+
m.drawer ? (f(), v(X, P({
|
|
198
201
|
key: 2,
|
|
199
202
|
"data-test": "stash-data-view-filters|drawer",
|
|
200
203
|
"disable-body-padding": "",
|
|
201
204
|
position: "right",
|
|
202
|
-
"is-open":
|
|
203
|
-
title:
|
|
204
|
-
}, e.drawerProps, { onDismiss:
|
|
205
|
-
headerAction:
|
|
206
|
-
e.showDrawerPreviousButton ? (
|
|
205
|
+
"is-open": a.value,
|
|
206
|
+
title: r(d)("ll.allFilters")
|
|
207
|
+
}, e.drawerProps, { onDismiss: R }), {
|
|
208
|
+
headerAction: u(() => [
|
|
209
|
+
e.showDrawerPreviousButton ? (f(), v(C, {
|
|
207
210
|
key: 0,
|
|
208
211
|
icon: "",
|
|
209
212
|
class: "tw-text-ice-100",
|
|
210
213
|
"data-test": "stash-data-view-filters|drawer-previous-button",
|
|
211
|
-
"aria-label":
|
|
212
|
-
title:
|
|
213
|
-
onClick:
|
|
214
|
+
"aria-label": r(d)("ll.previous"),
|
|
215
|
+
title: r(d)("ll.previous"),
|
|
216
|
+
onClick: c[2] || (c[2] = (F) => o("previous"))
|
|
214
217
|
}, {
|
|
215
|
-
default:
|
|
218
|
+
default: u(() => [
|
|
216
219
|
I($, { name: "chevron-left" })
|
|
217
220
|
]),
|
|
218
221
|
_: 1
|
|
219
|
-
}, 8, ["aria-label", "title"])) :
|
|
222
|
+
}, 8, ["aria-label", "title"])) : p("", !0)
|
|
220
223
|
]),
|
|
221
|
-
footer:
|
|
222
|
-
|
|
223
|
-
!e.showDrawerPreviousButton &&
|
|
224
|
+
footer: u(() => [
|
|
225
|
+
_("div", ae, [
|
|
226
|
+
!e.showDrawerPreviousButton && t.value > 0 ? (f(), v(C, {
|
|
224
227
|
key: 0,
|
|
225
228
|
secondary: "",
|
|
226
|
-
disabled:
|
|
227
|
-
onClick:
|
|
229
|
+
disabled: r(y),
|
|
230
|
+
onClick: b
|
|
228
231
|
}, {
|
|
229
|
-
default:
|
|
230
|
-
|
|
232
|
+
default: u(() => [
|
|
233
|
+
k(g(r(d)("ll.resetAll")), 1)
|
|
231
234
|
]),
|
|
232
235
|
_: 1
|
|
233
|
-
}, 8, ["disabled"])) :
|
|
234
|
-
(e.showDrawerPreviousButton || e.drawerStyle === "cascade") &&
|
|
236
|
+
}, 8, ["disabled"])) : p("", !0),
|
|
237
|
+
(e.showDrawerPreviousButton || e.drawerStyle === "cascade") && i.value > 0 ? (f(), v(C, {
|
|
235
238
|
key: 1,
|
|
236
239
|
secondary: "",
|
|
237
|
-
disabled:
|
|
238
|
-
onClick:
|
|
240
|
+
disabled: r(y),
|
|
241
|
+
onClick: w
|
|
239
242
|
}, {
|
|
240
|
-
default:
|
|
241
|
-
|
|
243
|
+
default: u(() => [
|
|
244
|
+
k(g(r(d)("ll.reset")), 1)
|
|
242
245
|
]),
|
|
243
246
|
_: 1
|
|
244
|
-
}, 8, ["disabled"])) :
|
|
245
|
-
e.showDrawerPreviousButton || e.drawerStyle === "cascade" ? (
|
|
247
|
+
}, 8, ["disabled"])) : p("", !0),
|
|
248
|
+
e.showDrawerPreviousButton || e.drawerStyle === "cascade" ? (f(), v(C, {
|
|
246
249
|
key: 2,
|
|
247
|
-
disabled:
|
|
248
|
-
onClick:
|
|
250
|
+
disabled: r(y),
|
|
251
|
+
onClick: n
|
|
249
252
|
}, {
|
|
250
|
-
default:
|
|
251
|
-
|
|
253
|
+
default: u(() => [
|
|
254
|
+
k(g(r(d)("ll.apply")), 1)
|
|
252
255
|
]),
|
|
253
256
|
_: 1
|
|
254
|
-
}, 8, ["disabled"])) :
|
|
257
|
+
}, 8, ["disabled"])) : p("", !0)
|
|
255
258
|
])
|
|
256
259
|
]),
|
|
257
|
-
default:
|
|
258
|
-
V(
|
|
260
|
+
default: u(() => [
|
|
261
|
+
V(l.$slots, "drawer")
|
|
259
262
|
]),
|
|
260
263
|
_: 3
|
|
261
|
-
}, 16, ["is-open", "title"])) :
|
|
264
|
+
}, 16, ["is-open", "title"])) : p("", !0)
|
|
262
265
|
]),
|
|
263
266
|
_: 3
|
|
264
267
|
}, 8, ["class", "radius"]));
|
|
265
268
|
}
|
|
266
269
|
});
|
|
267
270
|
export {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
+
ee as DATA_VIEW_FILTERS_UTILS_INJECTION,
|
|
272
|
+
$e as default,
|
|
273
|
+
Te as useFilters
|
|
271
274
|
};
|
|
272
275
|
//# sourceMappingURL=DataViewFilters.js.map
|