@leaflink/stash 51.11.0 → 51.12.0
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/README.md +41 -12
- package/dist/Accordion.js.map +1 -1
- package/dist/Accordion.vue.d.ts +37 -6
- package/dist/ActionsDropdown.js +2 -2
- package/dist/ActionsDropdown.js.map +1 -1
- package/dist/ActionsDropdown.vue.d.ts +74 -0
- package/dist/AddressSelect.js +60 -56
- package/dist/AddressSelect.js.map +1 -1
- package/dist/AddressSelect.vue.d.ts +65 -8
- package/dist/Alert.js.map +1 -1
- package/dist/Alert.vue.d.ts +41 -4
- package/dist/AppNavigationItem.js.map +1 -1
- package/dist/AppNavigationItem.vue.d.ts +31 -4
- package/dist/AppSidebar.js.map +1 -1
- package/dist/AppSidebar.vue.d.ts +35 -8
- package/dist/AppTopbar.js +1 -1
- package/dist/AppTopbar.js.map +1 -1
- package/dist/AppTopbar.vue.d.ts +33 -4
- package/dist/Avatar.js.map +1 -1
- package/dist/Avatar.vue.d.ts +44 -5
- package/dist/Backdrop.js.map +1 -1
- package/dist/Backdrop.vue.d.ts +1 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Badge.vue.d.ts +55 -6
- package/dist/Box.vue.d.ts +36 -3
- package/dist/Box.vue_vue_type_script_setup_true_lang-rFnvwLVY.js.map +1 -1
- package/dist/Button.js.map +1 -1
- package/dist/Button.vue.d.ts +50 -5
- package/dist/ButtonGroup.js +37 -33
- package/dist/ButtonGroup.js.map +1 -1
- package/dist/ButtonGroup.vue.d.ts +39 -6
- package/dist/Card.js.map +1 -1
- package/dist/Card.vue.d.ts +32 -5
- package/dist/CardContent.js.map +1 -1
- package/dist/CardContent.vue.d.ts +1 -1
- package/dist/CardFooter.js.map +1 -1
- package/dist/CardFooter.vue.d.ts +1 -1
- package/dist/CardHeader.js.map +1 -1
- package/dist/CardHeader.vue.d.ts +15 -2
- package/dist/CardMedia.js.map +1 -1
- package/dist/CardMedia.vue.d.ts +15 -2
- package/dist/Carousel.js +72 -66
- package/dist/Carousel.js.map +1 -1
- package/dist/Carousel.vue.d.ts +10 -10
- package/dist/Checkbox.js.map +1 -1
- package/dist/Checkbox.vue.d.ts +53 -8
- package/dist/ChevronToggle.vue.d.ts +34 -7
- package/dist/ChevronToggle.vue_vue_type_script_setup_true_lang-Ce_qOXfR.js.map +1 -1
- package/dist/Chip.js.map +1 -1
- package/dist/Chip.vue.d.ts +52 -10
- package/dist/ConfirmationCodeInput.js +44 -40
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ConfirmationCodeInput.vue.d.ts +43 -8
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/ContextSwitcher.vue.d.ts +41 -6
- package/dist/Copy.js.map +1 -1
- package/dist/Copy.vue.d.ts +34 -3
- package/dist/CurrencyInput.js +21 -20
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/CurrencyInput.vue.d.ts +46 -125
- package/dist/DataView.js +96 -94
- package/dist/DataView.js.map +1 -1
- package/dist/DataView.vue.d.ts +57 -12
- package/dist/DataViewFilters.js +139 -127
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewFilters.vue.d.ts +54 -9
- package/dist/DataViewSortButton.js +2 -2
- package/dist/DataViewSortButton.js.map +1 -1
- package/dist/DataViewSortButton.vue.d.ts +30 -3
- package/dist/DataViewToolbar.js +81 -148
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DataViewToolbar.vue.d.ts +40 -106
- package/dist/DatePicker.js +4640 -4528
- package/dist/DatePicker.js.map +1 -1
- package/dist/DatePicker.vue.d.ts +79 -30
- package/dist/DescriptionList.js.map +1 -1
- package/dist/DescriptionList.vue.d.ts +32 -3
- package/dist/DescriptionListDetail.js.map +1 -1
- package/dist/DescriptionListDetail.vue.d.ts +1 -1
- package/dist/DescriptionListGroup.js.map +1 -1
- package/dist/DescriptionListGroup.vue.d.ts +1 -1
- package/dist/DescriptionListTerm.js.map +1 -1
- package/dist/DescriptionListTerm.vue.d.ts +1 -1
- package/dist/Dialog.js.map +1 -1
- package/dist/Dialog.vue.d.ts +53 -10
- package/dist/Divider.js.map +1 -1
- package/dist/Dropdown.js +95 -89
- package/dist/Dropdown.js.map +1 -1
- package/dist/Dropdown.vue.d.ts +48 -12
- package/dist/EmptyState.js +1 -1
- package/dist/EmptyState.js.map +1 -1
- package/dist/EmptyState.vue.d.ts +62 -5
- package/dist/Expand.vue.d.ts +40 -10
- package/dist/Expand.vue_vue_type_script_setup_true_lang-CiONJfAp.js.map +1 -1
- package/dist/Field.vue.d.ts +53 -4
- package/dist/Field.vue_vue_type_script_setup_true_lang-DI6z3AE9.js.map +1 -1
- package/dist/FileUpload.js +74 -72
- package/dist/FileUpload.js.map +1 -1
- package/dist/FileUpload.vue.d.ts +44 -10
- package/dist/FilterChip.js.map +1 -1
- package/dist/FilterChip.vue.d.ts +41 -6
- package/dist/FilterDrawerItem.js +21 -21
- package/dist/FilterDrawerItem.js.map +1 -1
- package/dist/FilterDrawerItem.vue.d.ts +23 -6
- package/dist/FilterDropdown.js +69 -63
- package/dist/FilterDropdown.js.map +1 -1
- package/dist/FilterDropdown.vue.d.ts +35 -122
- package/dist/FilterSelect.js.map +1 -1
- package/dist/FilterSelect.vue.d.ts +31 -4
- package/dist/Filters.js +164 -157
- package/dist/Filters.js.map +1 -1
- package/dist/Filters.vue.d.ts +2190 -0
- package/dist/HttpError.js +7 -7
- package/dist/HttpError.js.map +1 -1
- package/dist/HttpError.vue.d.ts +41 -4
- package/dist/Icon.js +17 -17
- package/dist/Icon.js.map +1 -1
- package/dist/Icon.vue.d.ts +36 -3
- package/dist/IconLabel.js.map +1 -1
- package/dist/IconLabel.vue.d.ts +40 -5
- package/dist/Illustration.js +2 -2
- package/dist/Illustration.vue.d.ts +42 -3
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-BVzzNsRt.js → Illustration.vue_vue_type_script_setup_true_lang-BrqEF8xe.js} +11 -11
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-BVzzNsRt.js.map → Illustration.vue_vue_type_script_setup_true_lang-BrqEF8xe.js.map} +1 -1
- package/dist/Image.js +2 -2
- package/dist/Image.vue.d.ts +40 -5
- package/dist/{Image.vue_vue_type_script_setup_true_lang-Dg2Zk2r2.js → Image.vue_vue_type_script_setup_true_lang-D5u4av0_.js} +41 -37
- package/dist/{Image.vue_vue_type_script_setup_true_lang-Dg2Zk2r2.js.map → Image.vue_vue_type_script_setup_true_lang-D5u4av0_.js.map} +1 -1
- package/dist/InlineEdit.js.map +1 -1
- package/dist/InlineEdit.vue.d.ts +47 -126
- package/dist/Input.js.map +1 -1
- package/dist/Input.vue.d.ts +45 -12
- package/dist/InputOptions.js +69 -66
- package/dist/InputOptions.js.map +1 -1
- package/dist/InputOptions.vue.d.ts +55 -10
- package/dist/IntegrationIcon.js +7 -7
- package/dist/IntegrationIcon.js.map +1 -1
- package/dist/IntegrationIcon.vue.d.ts +36 -3
- package/dist/Label.vue.d.ts +42 -3
- package/dist/Label.vue_vue_type_script_setup_true_lang-CNquF3AP.js.map +1 -1
- package/dist/LicenseChip.js.map +1 -1
- package/dist/LicenseChip.vue.d.ts +30 -3
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItem.vue.d.ts +294 -0
- package/dist/ListItemCell.js.map +1 -1
- package/dist/ListItemCell.vue.d.ts +21 -0
- package/dist/ListView.js +7 -4
- package/dist/ListView.js.map +1 -1
- package/dist/ListView.types.d.ts +29 -0
- package/dist/ListView.vue.d.ts +5496 -0
- package/dist/Loading.js +2 -2
- package/dist/Loading.js.map +1 -1
- package/dist/Loading.vue.d.ts +1 -1
- package/dist/Logo.js +1 -1
- package/dist/Logo.vue.d.ts +41 -6
- package/dist/{Logo.vue_vue_type_script_setup_true_lang-Y3iE9utm.js → Logo.vue_vue_type_script_setup_true_lang-Dz8c98sc.js} +17 -17
- package/dist/Logo.vue_vue_type_script_setup_true_lang-Dz8c98sc.js.map +1 -0
- package/dist/Menu.js.map +1 -1
- package/dist/Menu.vue.d.ts +1 -1
- package/dist/MenuItem.js.map +1 -1
- package/dist/MenuItem.vue.d.ts +1 -1
- package/dist/MenusPlugin-Bk6UW6o9.js +12 -0
- package/dist/{MenusPlugin-B4jpNe7x.js.map → MenusPlugin-Bk6UW6o9.js.map} +1 -1
- package/dist/Metric.js.map +1 -1
- package/dist/Metric.vue.d.ts +34 -3
- package/dist/Modal.js +64 -62
- package/dist/Modal.js.map +1 -1
- package/dist/Modal.vue.d.ts +60 -13
- package/dist/Modals.js +18 -17
- package/dist/Modals.js.map +1 -1
- package/dist/ModalsPlugin.js +11 -11
- package/dist/ModalsPlugin.js.map +1 -1
- package/dist/Module.js.map +1 -1
- package/dist/Module.vue.d.ts +29 -2
- package/dist/ModuleContent.js.map +1 -1
- package/dist/ModuleContent.vue.d.ts +3 -3
- package/dist/ModuleFooter.js.map +1 -1
- package/dist/ModuleFooter.vue.d.ts +1 -1
- package/dist/ModuleHeader.js.map +1 -1
- package/dist/ModuleHeader.vue.d.ts +39 -5
- package/dist/MoreActions.js +125 -123
- package/dist/MoreActions.js.map +1 -1
- package/dist/MoreActions.vue.d.ts +46 -123
- package/dist/ObfuscateText.js.map +1 -1
- package/dist/ObfuscateText.vue.d.ts +40 -3
- package/dist/PageContent.js.map +1 -1
- package/dist/PageContent.vue.d.ts +30 -3
- package/dist/PageHeader.js.map +1 -1
- package/dist/PageHeader.vue.d.ts +35 -6
- package/dist/PageNavigation.js +50 -50
- package/dist/PageNavigation.js.map +1 -1
- package/dist/PageNavigation.vue.d.ts +36 -7
- package/dist/Paginate.js.map +1 -1
- package/dist/Paginate.vue.d.ts +40 -5
- package/dist/PlaidLink.js.map +1 -1
- package/dist/PlaidLink.vue.d.ts +49 -12
- package/dist/QuickAction.js.map +1 -1
- package/dist/QuickAction.vue.d.ts +15 -2
- package/dist/Radio.js.map +1 -1
- package/dist/Radio.vue.d.ts +93 -0
- package/dist/RadioGroup.js +101 -94
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioGroup.vue.d.ts +42 -116
- package/dist/RadioNew.js +99 -96
- package/dist/RadioNew.js.map +1 -1
- package/dist/RadioNew.vue.d.ts +48 -7
- package/dist/RangeInput.js.map +1 -1
- package/dist/RangeInput.vue.d.ts +1 -1
- package/dist/SearchBar.js +39 -38
- package/dist/SearchBar.js.map +1 -1
- package/dist/SearchBar.vue.d.ts +44 -127
- package/dist/SectionHeader.js.map +1 -1
- package/dist/SectionHeader.vue.d.ts +36 -5
- package/dist/Select.js +183 -171
- package/dist/Select.js.map +1 -1
- package/dist/Select.vue.d.ts +102 -23
- package/dist/SelectStatus.js +38 -38
- package/dist/SelectStatus.js.map +1 -1
- package/dist/SelectStatus.vue.d.ts +46 -226
- package/dist/Skeleton.js.map +1 -1
- package/dist/Skeleton.vue.d.ts +34 -3
- package/dist/Step.js +44 -44
- package/dist/Step.js.map +1 -1
- package/dist/Step.vue.d.ts +43 -4
- package/dist/Stepper.js.map +1 -1
- package/dist/Stepper.vue.d.ts +44 -9
- package/dist/Switch.js.map +1 -1
- package/dist/Switch.vue.d.ts +47 -8
- package/dist/Tab.js +9 -9
- package/dist/Tab.js.map +1 -1
- package/dist/Tab.vue.d.ts +15 -2
- package/dist/TabPanel.js.map +1 -1
- package/dist/TabPanel.vue.d.ts +30 -3
- package/dist/Table.js +59 -53
- package/dist/Table.js.map +1 -1
- package/dist/Table.vue.d.ts +50 -3
- package/dist/TableCell.js +1 -1
- package/dist/TableCell.js.map +1 -1
- package/dist/TableCell.vue.d.ts +32 -3
- package/dist/TableHeaderCell.js +1 -1
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableHeaderCell.vue.d.ts +30 -3
- package/dist/TableHeaderRow.js +1 -1
- package/dist/TableHeaderRow.js.map +1 -1
- package/dist/TableHeaderRow.vue.d.ts +34 -5
- package/dist/TableRow.js +44 -43
- package/dist/TableRow.js.map +1 -1
- package/dist/TableRow.vue.d.ts +48 -7
- package/dist/Tabs.js +2 -2
- package/dist/Tabs.vue.d.ts +31 -4
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-CmnBP4i1.js +159 -0
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-CmnBP4i1.js.map +1 -0
- package/dist/TextEditor.js +2422 -2416
- package/dist/TextEditor.js.map +1 -1
- package/dist/TextEditor.vue.d.ts +39 -8
- package/dist/Textarea.js +32 -29
- package/dist/Textarea.js.map +1 -1
- package/dist/Textarea.vue.d.ts +44 -9
- package/dist/Thumbnail.js +1 -1
- package/dist/Thumbnail.js.map +1 -1
- package/dist/Thumbnail.vue.d.ts +4 -4
- package/dist/ThumbnailEmpty.js.map +1 -1
- package/dist/ThumbnailEmpty.vue.d.ts +1 -1
- package/dist/ThumbnailGroup.js.map +1 -1
- package/dist/ThumbnailGroup.vue.d.ts +22 -26
- package/dist/Timeline.js.map +1 -1
- package/dist/Timeline.vue.d.ts +32 -3
- package/dist/TimelineItem.js.map +1 -1
- package/dist/TimelineItem.vue.d.ts +1 -1
- package/dist/Toast.js.map +1 -1
- package/dist/Toast.vue.d.ts +30 -3
- package/dist/Toasts.js.map +1 -1
- package/dist/ToastsPlugin.js +11 -11
- package/dist/ToastsPlugin.js.map +1 -1
- package/dist/Tooltip.js +30 -29
- package/dist/Tooltip.js.map +1 -1
- package/dist/Tooltip.vue.d.ts +43 -11
- package/dist/components.css +1 -1
- package/dist/directives/observe.js +8 -8
- package/dist/directives/observe.js.map +1 -1
- package/dist/directives/tooltip.js +3 -3
- package/dist/directives/tooltip.js.map +1 -1
- package/dist/directives/viewable.js +44 -39
- package/dist/directives/viewable.js.map +1 -1
- package/dist/floating-ui.vue-DLFiymOf.js +1093 -0
- package/dist/floating-ui.vue-DLFiymOf.js.map +1 -0
- package/dist/formatDateTime-Dz8bXV0R.js +1418 -0
- package/dist/formatDateTime-Dz8bXV0R.js.map +1 -0
- package/dist/index-D6bxWkZ1.js.map +1 -1
- package/dist/{index-XZqpB2_R.js → index-DA_ft08e.js} +9 -9
- package/dist/index-DA_ft08e.js.map +1 -0
- package/dist/index.js +106 -101
- package/dist/index.js.map +1 -1
- package/dist/isValid-DN-HkCoi.js.map +1 -1
- package/dist/obfuscateText.d.ts +1 -1
- package/dist/parseISO-wlfIB_QJ.js.map +1 -1
- package/dist/searchFuzzy-B3TsUO-V.js +409 -0
- package/dist/searchFuzzy-B3TsUO-V.js.map +1 -0
- package/dist/toTimeZone-Coq1oPTt.js.map +1 -1
- package/dist/useDialog.d.ts +2 -2
- package/dist/useDialog.js +25 -21
- package/dist/useDialog.js.map +1 -1
- package/dist/useGoogleMaps.js +110 -108
- package/dist/useGoogleMaps.js.map +1 -1
- package/dist/useMediaQuery.d.ts +6 -0
- package/dist/useMediaQuery.js +15 -11
- package/dist/useMediaQuery.js.map +1 -1
- package/dist/useModals.d.ts +1 -1
- package/dist/usePlaidLink.js +27 -20
- package/dist/usePlaidLink.js.map +1 -1
- package/dist/useSearch.js +13 -13
- package/dist/useSearch.js.map +1 -1
- package/dist/useSelection.js +56 -56
- package/dist/useSelection.js.map +1 -1
- package/dist/useSortable.js +63 -54
- package/dist/useSortable.js.map +1 -1
- package/dist/useStepper.d.ts +2 -2
- package/dist/useStepper.js +40 -36
- package/dist/useStepper.js.map +1 -1
- package/dist/useToasts.js +23 -23
- package/dist/useToasts.js.map +1 -1
- package/dist/useValidation.js +100 -96
- package/dist/useValidation.js.map +1 -1
- package/dist/utils/calculateElementOverflow.js +4 -4
- package/dist/utils/calculateElementOverflow.js.map +1 -1
- package/dist/utils/formatDateTime.js +1 -1
- package/dist/utils/obfuscateText.js +6 -6
- package/dist/utils/obfuscateText.js.map +1 -1
- package/dist/utils/searchFuzzy.js +1 -1
- package/dist/utils/storage.js +23 -23
- package/dist/utils/storage.js.map +1 -1
- package/package.json +32 -19
- package/dist/Logo.vue_vue_type_script_setup_true_lang-Y3iE9utm.js.map +0 -1
- package/dist/MenusPlugin-B4jpNe7x.js +0 -12
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-BlJVDr7o.js +0 -78
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-BlJVDr7o.js.map +0 -1
- package/dist/floating-ui.vue-CL01Y9ER.js +0 -1075
- package/dist/floating-ui.vue-CL01Y9ER.js.map +0 -1
- package/dist/formatDateTime-DG7kBc2T.js +0 -1414
- package/dist/formatDateTime-DG7kBc2T.js.map +0 -1
- package/dist/index-XZqpB2_R.js.map +0 -1
- package/dist/searchFuzzy-DBDE6jkd.js +0 -408
- package/dist/searchFuzzy-DBDE6jkd.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataViewSortButton.js","sources":["../src/components/DataViewSortButton/DataViewSortButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { inject, useCssModule } from 'vue';\n\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.vue';\n import Dropdown from '../Dropdown/Dropdown.vue';\n import Icon from '../Icon/Icon.vue';\n import IconLabel from '../IconLabel/IconLabel.vue';\n import { SortOption } from './DataViewSortButton.types';\n\n export interface DataViewToolbarProps {\n /**\n * An array of sort options to display in the dropdown.\n */\n sortOptions?: SortOption[];\n }\n\n const props = withDefaults(defineProps<DataViewToolbarProps>(), {\n sortOptions: () => [],\n });\n const classes = useCssModule();\n\n const { currentSortId, currentSortOrder, updateCurrentSort } = inject(\n DATA_VIEW_INJECTION.key,\n DATA_VIEW_INJECTION.defaults,\n );\n</script>\n\n<template>\n <Dropdown\n v-if=\"props.sortOptions.length\"\n align=\"left\"\n class=\"stash-data-view-sort-button\"\n data-test=\"stash-data-view-sort-button\"\n >\n <template #toggle=\"{ isActive, toggle }\">\n <Button\n icon-label\n :aria-expanded=\"isActive.toString()\"\n class=\"tw-text-blue-500\"\n data-test=\"stash-data-view-sort-button|sort-menu-button\"\n @click=\"toggle\"\n >\n <IconLabel icon=\"sort\" stacked>\n {{ t('ll.sort') }}\n </IconLabel>\n </Button>\n </template>\n <ul class=\"dropdown__list\" data-test=\"stash-data-view-sort-button|sort-menu\">\n <template v-for=\"sortOption in props.sortOptions\" :key=\"sortOption.id\">\n <li\n class=\"dropdown__item tw-rounded\"\n :class=\"[\n classes.dropdown__item,\n { 'tw-bg-blue-100 tw-text-ice-700': sortOption.id === currentSortId && currentSortOrder === 'asc' },\n ]\"\n @click=\"() => updateCurrentSort(sortOption.id, { sortOrder: 'asc', shouldEmit: true })\"\n >\n <Button inline class=\"tw-h-9\">\n {{ sortOption.labelAsc }}\n <Icon\n v-if=\"sortOption.id === currentSortId && currentSortOrder === 'asc'\"\n name=\"check\"\n class=\"tw-ml-auto tw-text-blue-500\"\n />\n </Button>\n </li>\n <li\n class=\"dropdown__item tw-rounded\"\n :class=\"[\n classes.dropdown__item,\n { 'tw-bg-blue-100 tw-text-ice-700': sortOption.id === currentSortId && currentSortOrder === 'desc' },\n ]\"\n @click=\"() => updateCurrentSort(sortOption.id, { sortOrder: 'desc', shouldEmit: true })\"\n >\n <Button inline class=\"tw-h-9\">\n {{ sortOption.labelDesc }}\n <Icon\n v-if=\"sortOption.id === currentSortId && currentSortOrder === 'desc'\"\n name=\"check\"\n class=\"tw-ml-auto tw-text-blue-500\"\n />\n </Button>\n </li>\n </template>\n </ul>\n </Dropdown>\n</template>\n\n<style module>\n .dropdown__item > button {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","currentSortId","currentSortOrder","updateCurrentSort","inject","DATA_VIEW_INJECTION"
|
|
1
|
+
{"version":3,"file":"DataViewSortButton.js","sources":["../src/components/DataViewSortButton/DataViewSortButton.vue"],"sourcesContent":["<script lang=\"ts\" setup>\n import { inject, useCssModule } from 'vue';\n\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.vue';\n import Dropdown from '../Dropdown/Dropdown.vue';\n import Icon from '../Icon/Icon.vue';\n import IconLabel from '../IconLabel/IconLabel.vue';\n import { SortOption } from './DataViewSortButton.types';\n\n export interface DataViewToolbarProps {\n /**\n * An array of sort options to display in the dropdown.\n */\n sortOptions?: SortOption[];\n }\n\n const props = withDefaults(defineProps<DataViewToolbarProps>(), {\n sortOptions: () => [],\n });\n const classes = useCssModule();\n\n const { currentSortId, currentSortOrder, updateCurrentSort } = inject(\n DATA_VIEW_INJECTION.key,\n DATA_VIEW_INJECTION.defaults,\n );\n</script>\n\n<template>\n <Dropdown\n v-if=\"props.sortOptions.length\"\n align=\"left\"\n class=\"stash-data-view-sort-button\"\n data-test=\"stash-data-view-sort-button\"\n >\n <template #toggle=\"{ isActive, toggle }\">\n <Button\n icon-label\n :aria-expanded=\"isActive.toString()\"\n class=\"tw-text-blue-500\"\n data-test=\"stash-data-view-sort-button|sort-menu-button\"\n @click=\"toggle\"\n >\n <IconLabel icon=\"sort\" stacked>\n {{ t('ll.sort') }}\n </IconLabel>\n </Button>\n </template>\n <ul class=\"dropdown__list\" data-test=\"stash-data-view-sort-button|sort-menu\">\n <template v-for=\"sortOption in props.sortOptions\" :key=\"sortOption.id\">\n <li\n class=\"dropdown__item tw-rounded\"\n :class=\"[\n classes.dropdown__item,\n { 'tw-bg-blue-100 tw-text-ice-700': sortOption.id === currentSortId && currentSortOrder === 'asc' },\n ]\"\n @click=\"() => updateCurrentSort(sortOption.id, { sortOrder: 'asc', shouldEmit: true })\"\n >\n <Button inline class=\"tw-h-9\">\n {{ sortOption.labelAsc }}\n <Icon\n v-if=\"sortOption.id === currentSortId && currentSortOrder === 'asc'\"\n name=\"check\"\n class=\"tw-ml-auto tw-text-blue-500\"\n />\n </Button>\n </li>\n <li\n class=\"dropdown__item tw-rounded\"\n :class=\"[\n classes.dropdown__item,\n { 'tw-bg-blue-100 tw-text-ice-700': sortOption.id === currentSortId && currentSortOrder === 'desc' },\n ]\"\n @click=\"() => updateCurrentSort(sortOption.id, { sortOrder: 'desc', shouldEmit: true })\"\n >\n <Button inline class=\"tw-h-9\">\n {{ sortOption.labelDesc }}\n <Icon\n v-if=\"sortOption.id === currentSortId && currentSortOrder === 'desc'\"\n name=\"check\"\n class=\"tw-ml-auto tw-text-blue-500\"\n />\n </Button>\n </li>\n </template>\n </ul>\n </Dropdown>\n</template>\n\n<style module>\n .dropdown__item > button {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","currentSortId","currentSortOrder","updateCurrentSort","inject","DATA_VIEW_INJECTION"],"mappings":";;;;;;;;;;;;;;;;;;AAkBE,UAAMA,IAAQC,GAGRC,IAAUC,EAAA,GAEV,EAAE,eAAAC,GAAe,kBAAAC,GAAkB,mBAAAC,EAAA,IAAsBC;AAAA,MAC7DC,EAAoB;AAAA,MACpBA,EAAoB;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,18 +1,45 @@
|
|
|
1
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
2
|
import { ComponentProvideOptions } from 'vue';
|
|
3
3
|
import { DefineComponent } from 'vue';
|
|
4
|
+
import { ExtractPropTypes } from 'vue';
|
|
5
|
+
import { PropType } from 'vue';
|
|
4
6
|
import { PublicProps } from 'vue';
|
|
5
7
|
|
|
6
|
-
declare
|
|
8
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
|
+
|
|
10
|
+
declare type __VLS_Prettify<T> = {
|
|
11
|
+
[K in keyof T]: T[K];
|
|
12
|
+
} & {};
|
|
13
|
+
|
|
14
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
15
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
16
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
17
|
+
} : {
|
|
18
|
+
type: PropType<T[K]>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
24
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
25
|
+
default: D[K];
|
|
26
|
+
}> : P[K];
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export declare interface DataViewToolbarProps {
|
|
7
30
|
/**
|
|
8
31
|
* An array of sort options to display in the dropdown.
|
|
9
32
|
*/
|
|
10
33
|
sortOptions?: SortOption[];
|
|
11
34
|
}
|
|
12
35
|
|
|
13
|
-
declare const _default: DefineComponent<
|
|
36
|
+
declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DataViewToolbarProps>, {
|
|
37
|
+
sortOptions: () => never[];
|
|
38
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DataViewToolbarProps>, {
|
|
39
|
+
sortOptions: () => never[];
|
|
40
|
+
}>>> & Readonly<{}>, {
|
|
14
41
|
sortOptions: SortOption[];
|
|
15
|
-
}, {}, {}, {}, string, ComponentProvideOptions,
|
|
42
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
16
43
|
export default _default;
|
|
17
44
|
|
|
18
45
|
declare interface SortOption {
|
package/dist/DataViewToolbar.js
CHANGED
|
@@ -1,55 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as
|
|
3
|
-
import { t as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { defineComponent as j, useCssModule as U, inject as W, ref as F, computed as J, onBeforeMount as K, createElementBlock as s, openBlock as a, normalizeClass as v, unref as e, createElementVNode as h, createCommentVNode as l, createBlock as L, renderSlot as O, toDisplayString as q, Fragment as G, createVNode as n, withCtx as _ } from "vue";
|
|
2
|
+
import { u as H } from "./usePaginationStats-d_q39naC.js";
|
|
3
|
+
import { t as i } from "./locale.js";
|
|
4
|
+
import x from "./Button.js";
|
|
5
|
+
import Q from "./Checkbox.js";
|
|
6
6
|
import "lodash-es/cloneDeep";
|
|
7
|
-
import
|
|
8
|
-
import { D as
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
function se(E) {
|
|
12
|
-
const { toolbarEl: o, paginationEl: t, checkboxEl: b, isPaginationEnabled: f, isSelectable: w, isEmpty: g } = E, i = M(null);
|
|
13
|
-
let a = null;
|
|
14
|
-
const n = () => {
|
|
15
|
-
if (!o.value) return;
|
|
16
|
-
const y = o.value.getBoundingClientRect().width;
|
|
17
|
-
let c = 0, u = 0;
|
|
18
|
-
f?.value && t.value && (c = t.value.getBoundingClientRect().width), w?.value && !g?.value && b.value?.$el && (u = b.value.$el.getBoundingClientRect().width);
|
|
19
|
-
const p = window.getComputedStyle(o.value), R = parseFloat(p.paddingLeft) || 0, S = parseFloat(p.paddingRight) || 0, C = Math.max(0, y - c - u - R - S);
|
|
20
|
-
i.value = `${C}px`;
|
|
21
|
-
}, d = () => {
|
|
22
|
-
o.value && (a = new ResizeObserver(() => {
|
|
23
|
-
P(() => {
|
|
24
|
-
n();
|
|
25
|
-
});
|
|
26
|
-
}), a.observe(o.value));
|
|
27
|
-
}, h = () => {
|
|
28
|
-
a && (a.disconnect(), a = null);
|
|
29
|
-
};
|
|
30
|
-
return U(() => {
|
|
31
|
-
P(() => {
|
|
32
|
-
n(), d();
|
|
33
|
-
});
|
|
34
|
-
}), j(() => {
|
|
35
|
-
h();
|
|
36
|
-
}), J([f, w, g], () => {
|
|
37
|
-
P(() => {
|
|
38
|
-
n();
|
|
39
|
-
});
|
|
40
|
-
}), {
|
|
41
|
-
actionsWidth: i,
|
|
42
|
-
updateActionsWidth: n
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
const re = { class: "tw-flex tw-place-items-center" }, de = {
|
|
7
|
+
import y from "./Icon.js";
|
|
8
|
+
import { D as k } from "./DataView.keys-aSOnA4AD.js";
|
|
9
|
+
import { _ as X } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
+
const Y = { class: "tw-flex tw-place-items-center" }, Z = {
|
|
46
11
|
key: 0,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, ce = {
|
|
12
|
+
class: "stash-data-view-toolbar__pagination tw-flex tw-items-center"
|
|
13
|
+
}, ee = {
|
|
50
14
|
key: 0,
|
|
51
|
-
class: "tw-
|
|
52
|
-
},
|
|
15
|
+
class: "tw-mr-1.5"
|
|
16
|
+
}, te = /* @__PURE__ */ j({
|
|
53
17
|
__name: "DataViewToolbar",
|
|
54
18
|
props: {
|
|
55
19
|
allRowsSelected: { type: Boolean, default: !1 },
|
|
@@ -59,134 +23,103 @@ const re = { class: "tw-flex tw-place-items-center" }, de = {
|
|
|
59
23
|
hasTabsAbove: { type: Boolean, default: !1 }
|
|
60
24
|
},
|
|
61
25
|
emits: ["select"],
|
|
62
|
-
setup(
|
|
63
|
-
const t =
|
|
64
|
-
isWithinModule:
|
|
65
|
-
variant:
|
|
66
|
-
density:
|
|
26
|
+
setup(S, { emit: C }) {
|
|
27
|
+
const t = S, B = U(), P = C, {
|
|
28
|
+
isWithinModule: r,
|
|
29
|
+
variant: m,
|
|
30
|
+
density: w,
|
|
67
31
|
currentPage: d,
|
|
68
|
-
hasToolbar:
|
|
69
|
-
isPaginateNextDisabled:
|
|
70
|
-
isPaginationEnabled:
|
|
71
|
-
isSelectable:
|
|
72
|
-
pageCount:
|
|
73
|
-
pageSize:
|
|
74
|
-
totalDataCount:
|
|
75
|
-
goPrevPage:
|
|
76
|
-
goNextPage:
|
|
32
|
+
hasToolbar: p,
|
|
33
|
+
isPaginateNextDisabled: E,
|
|
34
|
+
isPaginationEnabled: V,
|
|
35
|
+
isSelectable: D,
|
|
36
|
+
pageCount: f,
|
|
37
|
+
pageSize: N,
|
|
38
|
+
totalDataCount: T,
|
|
39
|
+
goPrevPage: R,
|
|
40
|
+
goNextPage: z,
|
|
77
41
|
isEmpty: A,
|
|
78
|
-
isLoading:
|
|
79
|
-
} =
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
checkboxEl: g,
|
|
83
|
-
isPaginationEnabled: c,
|
|
84
|
-
isSelectable: u,
|
|
85
|
-
isEmpty: A
|
|
86
|
-
}), _ = G(() => t.radius ? t.radius : i.value ? "none" : a.value === "table" ? t.hasTabsAbove ? "rounded-top-right" : "rounded-top" : "rounded"), L = oe({ currentPage: d, pageSize: R, totalItems: S });
|
|
87
|
-
function V() {
|
|
88
|
-
b("select"), N.value++;
|
|
42
|
+
isLoading: c
|
|
43
|
+
} = W(k.key, k.defaults), b = F(0), u = J(() => t.radius ? t.radius : r.value ? "none" : m.value === "table" ? t.hasTabsAbove ? "rounded-top-right" : "rounded-top" : "rounded"), I = H({ currentPage: d, pageSize: N, totalItems: T });
|
|
44
|
+
function g() {
|
|
45
|
+
P("select"), b.value++;
|
|
89
46
|
}
|
|
90
|
-
return
|
|
91
|
-
|
|
92
|
-
}), (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"tw-
|
|
96
|
-
"tw-rounded
|
|
97
|
-
"tw-rounded":
|
|
98
|
-
"tw-
|
|
99
|
-
"tw-
|
|
100
|
-
"tw-px-3": e(
|
|
101
|
-
"tw-px-3 lg:tw-px-6": e(n) === "comfortable"
|
|
47
|
+
return K(() => {
|
|
48
|
+
p && (p.value = !0);
|
|
49
|
+
}), (M, o) => (a(), s("div", {
|
|
50
|
+
class: v(["stash-data-view-toolbar tw-flex tw-min-h-15 tw-items-center tw-justify-between tw-bg-white tw-py-1.5 tw-shadow", {
|
|
51
|
+
"tw-border-t tw-border-ice-200": e(r),
|
|
52
|
+
"tw-rounded-tr": u.value === "rounded-top-right",
|
|
53
|
+
"tw-rounded": u.value === "rounded",
|
|
54
|
+
"tw-rounded-t": u.value === "rounded-top",
|
|
55
|
+
"tw-mb-3": e(m) !== "table" && !e(r),
|
|
56
|
+
"tw-px-3": e(w) === "compact",
|
|
57
|
+
"tw-px-3 lg:tw-px-6": e(w) === "comfortable"
|
|
102
58
|
}]),
|
|
103
59
|
"data-test": "stash-data-view-toolbar"
|
|
104
60
|
}, [
|
|
105
|
-
|
|
106
|
-
e(
|
|
107
|
-
|
|
108
|
-
|
|
61
|
+
h("div", Y, [
|
|
62
|
+
e(D) && !e(A) ? (a(), L(Q, {
|
|
63
|
+
key: b.value,
|
|
64
|
+
class: "tw-mr-2",
|
|
109
65
|
checked: t.allRowsSelected,
|
|
110
66
|
indeterminate: t.someRowsSelected && !t.allRowsSelected,
|
|
111
|
-
title: e(
|
|
112
|
-
disabled: e(
|
|
113
|
-
"onUpdate:indeterminate":
|
|
114
|
-
"onUpdate:checked":
|
|
115
|
-
}, null, 8, ["checked", "indeterminate", "title", "disabled"])) :
|
|
116
|
-
|
|
117
|
-
"
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}, {
|
|
122
|
-
toggle: r(({ toggle: z }) => [
|
|
123
|
-
l(T, {
|
|
124
|
-
"icon-label": "",
|
|
125
|
-
class: "tw-text-blue-500",
|
|
126
|
-
"data-test": "stash-data-view-sort-button|sort-menu-button",
|
|
127
|
-
onClick: z
|
|
128
|
-
}, {
|
|
129
|
-
default: r(() => [
|
|
130
|
-
l(le, {
|
|
131
|
-
icon: "ellipsis",
|
|
132
|
-
stacked: ""
|
|
133
|
-
}, {
|
|
134
|
-
default: r(() => [...s[2] || (s[2] = [
|
|
135
|
-
ee(" More ", -1)
|
|
136
|
-
])]),
|
|
137
|
-
_: 1
|
|
138
|
-
})
|
|
139
|
-
]),
|
|
140
|
-
_: 1
|
|
141
|
-
}, 8, ["onClick"])
|
|
142
|
-
]),
|
|
143
|
-
actions: r(() => [
|
|
144
|
-
Z(F.$slots, "default")
|
|
145
|
-
]),
|
|
146
|
-
_: 3
|
|
147
|
-
}, 8, ["width"])
|
|
67
|
+
title: e(i)("ll.selectAll"),
|
|
68
|
+
disabled: e(c),
|
|
69
|
+
"onUpdate:indeterminate": g,
|
|
70
|
+
"onUpdate:checked": g
|
|
71
|
+
}, null, 8, ["checked", "indeterminate", "title", "disabled"])) : l("", !0),
|
|
72
|
+
h("div", {
|
|
73
|
+
class: v([e(B).actions, "stash-data-view-toolbar__actions tw-flex tw-items-center tw-gap-x-2 lg:tw-gap-x-4"])
|
|
74
|
+
}, [
|
|
75
|
+
O(M.$slots, "default")
|
|
76
|
+
], 2)
|
|
148
77
|
]),
|
|
149
|
-
e(
|
|
150
|
-
t.hidePageStats ?
|
|
151
|
-
e(
|
|
152
|
-
|
|
78
|
+
e(V) ? (a(), s("div", Z, [
|
|
79
|
+
t.hidePageStats ? l("", !0) : (a(), s("span", ee, q(e(i)("ll.pageStats", e(I))), 1)),
|
|
80
|
+
e(f) > 1 ? (a(), s(G, { key: 1 }, [
|
|
81
|
+
n(x, {
|
|
153
82
|
icon: "",
|
|
154
|
-
"aria-label": e(
|
|
155
|
-
class: "tw-
|
|
83
|
+
"aria-label": e(i)("ll.previous"),
|
|
84
|
+
class: "tw-ml-1.5 tw-w-auto tw-min-w-auto tw-px-1.5",
|
|
156
85
|
"data-test": "button|prev-page",
|
|
157
|
-
disabled: e(
|
|
158
|
-
onClick:
|
|
86
|
+
disabled: e(c) || e(d) === 1,
|
|
87
|
+
onClick: o[0] || (o[0] = ($) => e(R)({ shouldEmit: !0 }))
|
|
159
88
|
}, {
|
|
160
|
-
default:
|
|
161
|
-
|
|
89
|
+
default: _(() => [
|
|
90
|
+
n(y, {
|
|
162
91
|
name: "chevron-left",
|
|
163
92
|
size: "dense"
|
|
164
93
|
})
|
|
165
94
|
]),
|
|
166
95
|
_: 1
|
|
167
96
|
}, 8, ["aria-label", "disabled"]),
|
|
168
|
-
|
|
97
|
+
n(x, {
|
|
169
98
|
icon: "",
|
|
170
|
-
"aria-label": e(
|
|
171
|
-
class: "tw-
|
|
99
|
+
"aria-label": e(i)("ll.next"),
|
|
100
|
+
class: "-tw-mr-4 tw-w-auto tw-min-w-auto tw-p-1.5",
|
|
172
101
|
"data-test": "button|next-page",
|
|
173
|
-
disabled: e(
|
|
174
|
-
onClick:
|
|
102
|
+
disabled: e(c) || e(E) || e(d) === e(f),
|
|
103
|
+
onClick: o[1] || (o[1] = ($) => e(z)({ shouldEmit: !0 }))
|
|
175
104
|
}, {
|
|
176
|
-
default:
|
|
177
|
-
|
|
105
|
+
default: _(() => [
|
|
106
|
+
n(y, {
|
|
178
107
|
name: "chevron-right",
|
|
179
108
|
size: "dense"
|
|
180
109
|
})
|
|
181
110
|
]),
|
|
182
111
|
_: 1
|
|
183
112
|
}, 8, ["aria-label", "disabled"])
|
|
184
|
-
], 64)) :
|
|
185
|
-
]
|
|
113
|
+
], 64)) : l("", !0)
|
|
114
|
+
])) : l("", !0)
|
|
186
115
|
], 2));
|
|
187
116
|
}
|
|
188
|
-
})
|
|
117
|
+
}), ae = "_actions_k8z80_2", oe = {
|
|
118
|
+
actions: ae
|
|
119
|
+
}, se = {
|
|
120
|
+
$style: oe
|
|
121
|
+
}, pe = /* @__PURE__ */ X(te, [["__cssModules", se]]);
|
|
189
122
|
export {
|
|
190
|
-
|
|
123
|
+
pe as default
|
|
191
124
|
};
|
|
192
125
|
//# sourceMappingURL=DataViewToolbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataViewToolbar.js","sources":["../src/components/DataViewToolbar/useActionsWidth.ts","../src/components/DataViewToolbar/DataViewToolbar.vue"],"sourcesContent":["import { ComputedRef, nextTick, onBeforeUnmount, onMounted, Ref, ref, ShallowRef, watch } from 'vue';\n\nexport interface UseActionsWidthOptions {\n toolbarEl: ShallowRef<HTMLElement | null>;\n paginationEl: ShallowRef<HTMLElement | null>;\n checkboxEl: ShallowRef<{ $el: HTMLElement } | null>;\n isPaginationEnabled: ComputedRef<boolean> | undefined;\n isSelectable: Ref<boolean> | undefined;\n isEmpty: ComputedRef<boolean> | undefined;\n}\n\nexport function useActionsWidth(options: UseActionsWidthOptions) {\n const { toolbarEl, paginationEl, checkboxEl, isPaginationEnabled, isSelectable, isEmpty } = options;\n\n const actionsWidth = ref<string | null>(null);\n let resizeObserver: ResizeObserver | null = null;\n\n const updateActionsWidth = () => {\n if (!toolbarEl.value) return;\n\n const toolbarWidth = toolbarEl.value.getBoundingClientRect().width;\n let paginationWidth = 0;\n let checkboxWidth = 0;\n\n // Calculate pagination width if pagination is enabled\n if (isPaginationEnabled?.value && paginationEl.value) {\n paginationWidth = paginationEl.value.getBoundingClientRect().width;\n }\n\n // Calculate checkbox width if selectable and not empty\n if (isSelectable?.value && !isEmpty?.value && checkboxEl.value?.$el) {\n checkboxWidth = checkboxEl.value.$el.getBoundingClientRect().width;\n }\n\n // Get computed styles to calculate padding\n const computedStyle = window.getComputedStyle(toolbarEl.value);\n const paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;\n const paddingRight = parseFloat(computedStyle.paddingRight) || 0;\n\n const availableWidth = Math.max(0, toolbarWidth - paginationWidth - checkboxWidth - paddingLeft - paddingRight);\n actionsWidth.value = `${availableWidth}px`;\n };\n\n const setupResizeObserver = () => {\n if (!toolbarEl.value) return;\n\n resizeObserver = new ResizeObserver(() => {\n nextTick(() => {\n updateActionsWidth();\n });\n });\n\n resizeObserver.observe(toolbarEl.value);\n };\n\n const cleanupResizeObserver = () => {\n if (resizeObserver) {\n resizeObserver.disconnect();\n resizeObserver = null;\n }\n };\n\n onMounted(() => {\n // Initial width calculation with nextTick to ensure DOM is ready\n nextTick(() => {\n updateActionsWidth();\n setupResizeObserver();\n });\n });\n\n onBeforeUnmount(() => {\n cleanupResizeObserver();\n });\n\n // Watch for changes in conditions that affect element visibility\n watch([isPaginationEnabled, isSelectable, isEmpty], () => {\n nextTick(() => {\n updateActionsWidth();\n });\n });\n\n return {\n actionsWidth,\n updateActionsWidth,\n };\n}\n","<script setup lang=\"ts\">\n import { computed, inject, onBeforeMount, ref, useTemplateRef } from 'vue';\n\n import usePaginationStats from '../../composables/usePaginationStats/usePaginationStats';\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Checkbox from '../Checkbox/Checkbox.vue';\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.vue';\n import Icon from '../Icon/Icon.vue';\n import IconLabel from '../IconLabel/IconLabel.vue';\n import MoreActions from '../MoreActions/MoreActions.vue';\n import { ToolbarRadiuses } from './DataViewToolbar.types';\n import { useActionsWidth } from './useActionsWidth';\n\n export interface DataViewToolbarProps {\n /**\n * When DataView has `variant=\"table\"` and Table has `is-selectable` enabled, it provides a way to flag\n * a checkbox whenever all rows are selected, just like the standalone version on TableHeaderRow.\n */\n allRowsSelected?: boolean;\n\n /**\n * Hides the page statistics (ex: \"1 - 12 of 20\") in the toolbar\n */\n hidePageStats?: boolean;\n\n /**\n * Controls the corners of DataViewToolbar with the \"border-radius\" CSS property. The default value is \"rounded\".\n */\n radius?: ToolbarRadiuses;\n\n /**\n * When DataView has variant=\"table\" and Table has `is-selectable` enabled, it provides a way to flag\n * a checkbox whenever one or more, but not all rows are selected, just like the standalone\n * version on TableHeaderRow.\n */\n someRowsSelected?: boolean;\n\n /**\n * When DataView has tabs above it, we need to remove the top left rounded corner\n */\n hasTabsAbove?: boolean;\n }\n\n const props = withDefaults(defineProps<DataViewToolbarProps>(), {\n allRowsSelected: false,\n hidePageStats: false,\n radius: undefined,\n someRowsSelected: false,\n hasTabsAbove: false,\n });\n\n const emit = defineEmits<{\n (e: 'select'): void;\n }>();\n\n // Refs for width calculation\n const toolbarRef = useTemplateRef('toolbarEl');\n const paginationRef = useTemplateRef('paginationEl');\n const checkboxRef = useTemplateRef('checkboxEl');\n\n const {\n isWithinModule,\n variant: dataViewVariant,\n density,\n currentPage,\n hasToolbar,\n isPaginateNextDisabled,\n isPaginationEnabled,\n isSelectable,\n pageCount,\n pageSize,\n totalDataCount,\n goPrevPage,\n goNextPage,\n isEmpty,\n isLoading,\n } = inject(DATA_VIEW_INJECTION.key, DATA_VIEW_INJECTION.defaults);\n\n const checkboxKey = ref(0);\n\n const { actionsWidth } = useActionsWidth({\n toolbarEl: toolbarRef,\n paginationEl: paginationRef,\n checkboxEl: checkboxRef,\n isPaginationEnabled,\n isSelectable,\n isEmpty,\n });\n\n const computedRadius = computed<ToolbarRadiuses>(() => {\n if (props.radius) {\n return props.radius;\n }\n\n if (isWithinModule.value) {\n return 'none';\n }\n\n if (dataViewVariant.value === 'table') {\n if (props.hasTabsAbove) {\n return 'rounded-top-right';\n }\n\n return 'rounded-top';\n }\n\n return 'rounded';\n });\n\n const pageStats = usePaginationStats({ currentPage, pageSize, totalItems: totalDataCount });\n\n function onSelect() {\n emit('select');\n\n /**\n * In Vue (as of this writing), if a user checks a native checkbox but the v-model is `false` and does not change from `false`, then the checkbox will display as checked even though the v-model is still `false`.\n * Forcing a re-render with a `key` change allows the checkbox to stay unchecked if its v-model is still `false` and its v-model not been changed.\n * To verify that this is necessary, test the \"select all\" checkbox in the SelectionWithSomeDisabled story in Table.story.ts with and without the `key` attribute.\n */\n checkboxKey.value++;\n }\n\n onBeforeMount(() => {\n if (hasToolbar) {\n hasToolbar.value = true;\n }\n });\n</script>\n\n<template>\n <div\n ref=\"toolbarEl\"\n class=\"stash-data-view-toolbar tw-flex tw-min-h-15 tw-items-center tw-justify-between tw-bg-white tw-py-1.5 tw-shadow\"\n :class=\"{\n 'tw-border-t tw-border-ice-200': isWithinModule,\n 'tw-rounded-tr': computedRadius === 'rounded-top-right',\n 'tw-rounded': computedRadius === 'rounded',\n 'tw-rounded-t': computedRadius === 'rounded-top',\n 'tw-mb-3': dataViewVariant !== 'table' && !isWithinModule,\n 'tw-px-3': density === 'compact',\n 'tw-px-3 lg:tw-px-6': density === 'comfortable',\n }\"\n data-test=\"stash-data-view-toolbar\"\n >\n <div class=\"tw-flex tw-place-items-center\">\n <Checkbox\n v-if=\"isSelectable && !isEmpty\"\n ref=\"checkboxEl\"\n :key=\"checkboxKey\"\n :checked=\"props.allRowsSelected\"\n :indeterminate=\"props.someRowsSelected && !props.allRowsSelected\"\n :title=\"t('ll.selectAll')\"\n :disabled=\"isLoading\"\n @update:indeterminate=\"onSelect\"\n @update:checked=\"onSelect\"\n />\n <MoreActions\n more-button-align=\"together\"\n :width=\"actionsWidth || undefined\"\n actions-container-class=\"tw-flex tw-items-center tw-gap-x-2 lg:tw-mr-6 lg:tw-gap-x-6\"\n item-in-dropdown-class=\"tw-text-center\"\n >\n <template #toggle=\"{ toggle }\">\n <Button\n icon-label\n class=\"tw-text-blue-500\"\n data-test=\"stash-data-view-sort-button|sort-menu-button\"\n @click=\"toggle\"\n >\n <IconLabel icon=\"ellipsis\" stacked> More </IconLabel>\n </Button>\n </template>\n <template #actions>\n <slot></slot>\n </template>\n </MoreActions>\n </div>\n\n <!-- Pagination -->\n <div v-if=\"isPaginationEnabled\" ref=\"paginationEl\" class=\"tw-flex tw-shrink-0 tw-items-center\">\n <span v-if=\"!props.hidePageStats\" class=\"tw-mx-1.5 tw-hidden md:tw-block\">\n {{ t('ll.pageStats', pageStats) }}\n </span>\n <template v-if=\"pageCount > 1\">\n <Button\n icon\n :aria-label=\"t('ll.previous')\"\n class=\"tw-size-9 tw-p-1.5\"\n data-test=\"button|prev-page\"\n :disabled=\"isLoading || currentPage === 1\"\n @click=\"goPrevPage({ shouldEmit: true })\"\n >\n <Icon name=\"chevron-left\" size=\"dense\" />\n </Button>\n <Button\n icon\n :aria-label=\"t('ll.next')\"\n class=\"tw-size-9 tw-p-1.5\"\n data-test=\"button|next-page\"\n :disabled=\"isLoading || isPaginateNextDisabled || currentPage === pageCount\"\n @click=\"goNextPage({ shouldEmit: true })\"\n >\n <Icon name=\"chevron-right\" size=\"dense\" />\n </Button>\n </template>\n </div>\n </div>\n</template>\n"],"names":["useActionsWidth","options","toolbarEl","paginationEl","checkboxEl","isPaginationEnabled","isSelectable","isEmpty","actionsWidth","ref","resizeObserver","updateActionsWidth","toolbarWidth","paginationWidth","checkboxWidth","computedStyle","paddingLeft","paddingRight","availableWidth","setupResizeObserver","nextTick","cleanupResizeObserver","onMounted","onBeforeUnmount","watch","props","__props","emit","__emit","toolbarRef","useTemplateRef","paginationRef","checkboxRef","isWithinModule","dataViewVariant","density","currentPage","hasToolbar","isPaginateNextDisabled","pageCount","pageSize","totalDataCount","goPrevPage","goNextPage","isLoading","inject","DATA_VIEW_INJECTION","checkboxKey","computedRadius","computed","pageStats","usePaginationStats","onSelect","onBeforeMount","_createElementBlock","_unref","_createElementVNode","_hoisted_1","_createBlock","Checkbox","t","_createVNode","MoreActions","_withCtx","toggle","Button","IconLabel","_cache","_renderSlot","_ctx","_openBlock","_hoisted_2","_hoisted_3","_toDisplayString","_Fragment","Icon"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"DataViewToolbar.js","sources":["../src/components/DataViewToolbar/DataViewToolbar.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, inject, onBeforeMount, ref, useCssModule } from 'vue';\n\n import usePaginationStats from '../../composables/usePaginationStats/usePaginationStats';\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Checkbox from '../Checkbox/Checkbox.vue';\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.vue';\n import Icon from '../Icon/Icon.vue';\n import { ToolbarRadiuses } from './DataViewToolbar.types';\n\n export interface DataViewToolbarProps {\n /**\n * When DataView has `variant=\"table\"` and Table has `is-selectable` enabled, it provides a way to flag\n * a checkbox whenever all rows are selected, just like the standalone version on TableHeaderRow.\n */\n allRowsSelected?: boolean;\n\n /**\n * Hides the page statistics (ex: \"1 - 12 of 20\") in the toolbar\n */\n hidePageStats?: boolean;\n\n /**\n * Controls the corners of DataViewToolbar with the \"border-radius\" CSS property. The default value is \"rounded\".\n */\n radius?: ToolbarRadiuses;\n\n /**\n * When DataView has variant=\"table\" and Table has `is-selectable` enabled, it provides a way to flag\n * a checkbox whenever one or more, but not all rows are selected, just like the standalone\n * version on TableHeaderRow.\n */\n someRowsSelected?: boolean;\n\n /**\n * When DataView has tabs above it, we need to remove the top left rounded corner\n */\n hasTabsAbove?: boolean;\n }\n\n const props = withDefaults(defineProps<DataViewToolbarProps>(), {\n allRowsSelected: false,\n hidePageStats: false,\n radius: undefined,\n someRowsSelected: false,\n hasTabsAbove: false,\n });\n const classes = useCssModule();\n\n const emit = defineEmits<{\n (e: 'select'): void;\n }>();\n\n const {\n isWithinModule,\n variant: dataViewVariant,\n density,\n currentPage,\n hasToolbar,\n isPaginateNextDisabled,\n isPaginationEnabled,\n isSelectable,\n pageCount,\n pageSize,\n totalDataCount,\n goPrevPage,\n goNextPage,\n isEmpty,\n isLoading,\n } = inject(DATA_VIEW_INJECTION.key, DATA_VIEW_INJECTION.defaults);\n\n const checkboxKey = ref(0);\n\n const computedRadius = computed<ToolbarRadiuses>(() => {\n if (props.radius) {\n return props.radius;\n }\n\n if (isWithinModule.value) {\n return 'none';\n }\n\n if (dataViewVariant.value === 'table') {\n if (props.hasTabsAbove) {\n return 'rounded-top-right';\n }\n\n return 'rounded-top';\n }\n\n return 'rounded';\n });\n\n const pageStats = usePaginationStats({ currentPage, pageSize, totalItems: totalDataCount });\n\n function onSelect() {\n emit('select');\n\n /**\n * In Vue (as of this writing), if a user checks a native checkbox but the v-model is `false` and does not change from `false`, then the checkbox will display as checked even though the v-model is still `false`.\n * Forcing a re-render with a `key` change allows the checkbox to stay unchecked if its v-model is still `false` and its v-model not been changed.\n * To verify that this is necessary, test the \"select all\" checkbox in the SelectionWithSomeDisabled story in Table.story.ts with and without the `key` attribute.\n */\n checkboxKey.value++;\n }\n\n onBeforeMount(() => {\n if (hasToolbar) {\n hasToolbar.value = true;\n }\n });\n</script>\n\n<template>\n <div\n class=\"stash-data-view-toolbar tw-flex tw-min-h-15 tw-items-center tw-justify-between tw-bg-white tw-py-1.5 tw-shadow\"\n :class=\"{\n 'tw-border-t tw-border-ice-200': isWithinModule,\n 'tw-rounded-tr': computedRadius === 'rounded-top-right',\n 'tw-rounded': computedRadius === 'rounded',\n 'tw-rounded-t': computedRadius === 'rounded-top',\n 'tw-mb-3': dataViewVariant !== 'table' && !isWithinModule,\n 'tw-px-3': density === 'compact',\n 'tw-px-3 lg:tw-px-6': density === 'comfortable',\n }\"\n data-test=\"stash-data-view-toolbar\"\n >\n <div class=\"tw-flex tw-place-items-center\">\n <Checkbox\n v-if=\"isSelectable && !isEmpty\"\n :key=\"checkboxKey\"\n class=\"tw-mr-2\"\n :checked=\"props.allRowsSelected\"\n :indeterminate=\"props.someRowsSelected && !props.allRowsSelected\"\n :title=\"t('ll.selectAll')\"\n :disabled=\"isLoading\"\n @update:indeterminate=\"onSelect\"\n @update:checked=\"onSelect\"\n />\n <div\n :class=\"classes.actions\"\n class=\"stash-data-view-toolbar__actions tw-flex tw-items-center tw-gap-x-2 lg:tw-gap-x-4\"\n >\n <!-- @slot default -->\n <slot></slot>\n </div>\n </div>\n\n <!-- Pagination -->\n <div v-if=\"isPaginationEnabled\" class=\"stash-data-view-toolbar__pagination tw-flex tw-items-center\">\n <span v-if=\"!props.hidePageStats\" class=\"tw-mr-1.5\">\n {{ t('ll.pageStats', pageStats) }}\n </span>\n <template v-if=\"pageCount > 1\">\n <Button\n icon\n :aria-label=\"t('ll.previous')\"\n class=\"tw-ml-1.5 tw-w-auto tw-min-w-auto tw-px-1.5\"\n data-test=\"button|prev-page\"\n :disabled=\"isLoading || currentPage === 1\"\n @click=\"goPrevPage({ shouldEmit: true })\"\n >\n <Icon name=\"chevron-left\" size=\"dense\" />\n </Button>\n <Button\n icon\n :aria-label=\"t('ll.next')\"\n class=\"-tw-mr-4 tw-w-auto tw-min-w-auto tw-p-1.5\"\n data-test=\"button|next-page\"\n :disabled=\"isLoading || isPaginateNextDisabled || currentPage === pageCount\"\n @click=\"goNextPage({ shouldEmit: true })\"\n >\n <Icon name=\"chevron-right\" size=\"dense\" />\n </Button>\n </template>\n </div>\n </div>\n</template>\n\n<style module>\n .actions :global(.stash-button) {\n min-width: auto;\n padding: 0 0.5rem;\n\n &:first-child {\n margin-left: -0.5rem;\n }\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","emit","__emit","isWithinModule","dataViewVariant","density","currentPage","hasToolbar","isPaginateNextDisabled","isPaginationEnabled","isSelectable","pageCount","pageSize","totalDataCount","goPrevPage","goNextPage","isEmpty","isLoading","inject","DATA_VIEW_INJECTION","checkboxKey","ref","computedRadius","computed","pageStats","usePaginationStats","onSelect","onBeforeMount"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAyCE,UAAMA,IAAQC,GAORC,IAAUC,EAAA,GAEVC,IAAOC,GAIP;AAAA,MACJ,gBAAAC;AAAA,MACA,SAASC;AAAA,MACT,SAAAC;AAAA,MACA,aAAAC;AAAA,MACA,YAAAC;AAAA,MACA,wBAAAC;AAAA,MACA,qBAAAC;AAAA,MACA,cAAAC;AAAA,MACA,WAAAC;AAAA,MACA,UAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,YAAAC;AAAA,MACA,YAAAC;AAAA,MACA,SAAAC;AAAA,MACA,WAAAC;AAAA,IAAA,IACEC,EAAOC,EAAoB,KAAKA,EAAoB,QAAQ,GAE1DC,IAAcC,EAAI,CAAC,GAEnBC,IAAiBC,EAA0B,MAC3C1B,EAAM,SACDA,EAAM,SAGXM,EAAe,QACV,SAGLC,EAAgB,UAAU,UACxBP,EAAM,eACD,sBAGF,gBAGF,SACR,GAEK2B,IAAYC,EAAmB,EAAE,aAAAnB,GAAa,UAAAM,GAAU,YAAYC,GAAgB;AAE1F,aAASa,IAAW;AAClB,MAAAzB,EAAK,QAAQ,GAObmB,EAAY;AAAA,IACd;AAEA,WAAAO,EAAc,MAAM;AAClB,MAAIpB,MACFA,EAAW,QAAQ;AAAA,IAEvB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,24 +1,30 @@
|
|
|
1
|
-
import { AllowedComponentProps } from 'vue';
|
|
2
|
-
import { CheckboxProps } from '../Checkbox/Checkbox.vue';
|
|
3
|
-
import { ComponentCustomProperties } from 'vue';
|
|
4
|
-
import { ComponentCustomProps } from 'vue';
|
|
5
|
-
import { ComponentInternalInstance } from 'vue';
|
|
6
|
-
import { ComponentOptionsBase } from 'vue';
|
|
7
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
8
2
|
import { ComponentProvideOptions } from 'vue';
|
|
9
|
-
import { ComponentPublicInstance } from 'vue';
|
|
10
|
-
import { DebuggerEvent } from 'vue';
|
|
11
3
|
import { DefineComponent } from 'vue';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { nextTick } from 'vue';
|
|
15
|
-
import { OnCleanup } from '@vue/reactivity';
|
|
4
|
+
import { ExtractPropTypes } from 'vue';
|
|
5
|
+
import { PropType } from 'vue';
|
|
16
6
|
import { PublicProps } from 'vue';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
|
|
8
|
+
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
|
+
|
|
10
|
+
declare type __VLS_Prettify<T> = {
|
|
11
|
+
[K in keyof T]: T[K];
|
|
12
|
+
} & {};
|
|
13
|
+
|
|
14
|
+
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
15
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
16
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
17
|
+
} : {
|
|
18
|
+
type: PropType<T[K]>;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
declare type __VLS_WithDefaults<P, D> = {
|
|
24
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
25
|
+
default: D[K];
|
|
26
|
+
}> : P[K];
|
|
27
|
+
};
|
|
22
28
|
|
|
23
29
|
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
30
|
new (): {
|
|
@@ -26,7 +32,7 @@ declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
|
26
32
|
};
|
|
27
33
|
};
|
|
28
34
|
|
|
29
|
-
declare interface DataViewToolbarProps {
|
|
35
|
+
export declare interface DataViewToolbarProps {
|
|
30
36
|
/**
|
|
31
37
|
* When DataView has `variant="table"` and Table has `is-selectable` enabled, it provides a way to flag
|
|
32
38
|
* a checkbox whenever all rows are selected, just like the standalone version on TableHeaderRow.
|
|
@@ -52,9 +58,21 @@ declare interface DataViewToolbarProps {
|
|
|
52
58
|
hasTabsAbove?: boolean;
|
|
53
59
|
}
|
|
54
60
|
|
|
55
|
-
declare const _default: __VLS_WithTemplateSlots<DefineComponent<DataViewToolbarProps
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DataViewToolbarProps>, {
|
|
62
|
+
allRowsSelected: boolean;
|
|
63
|
+
hidePageStats: boolean;
|
|
64
|
+
radius: undefined;
|
|
65
|
+
someRowsSelected: boolean;
|
|
66
|
+
hasTabsAbove: boolean;
|
|
67
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
68
|
+
select: () => void;
|
|
69
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DataViewToolbarProps>, {
|
|
70
|
+
allRowsSelected: boolean;
|
|
71
|
+
hidePageStats: boolean;
|
|
72
|
+
radius: undefined;
|
|
73
|
+
someRowsSelected: boolean;
|
|
74
|
+
hasTabsAbove: boolean;
|
|
75
|
+
}>>> & Readonly<{
|
|
58
76
|
onSelect?: (() => any) | undefined;
|
|
59
77
|
}>, {
|
|
60
78
|
radius: "none" | "rounded" | "rounded-top" | "rounded-top-right";
|
|
@@ -62,91 +80,7 @@ allRowsSelected: boolean;
|
|
|
62
80
|
hidePageStats: boolean;
|
|
63
81
|
someRowsSelected: boolean;
|
|
64
82
|
hasTabsAbove: boolean;
|
|
65
|
-
}, {}, {}, {}, string, ComponentProvideOptions,
|
|
66
|
-
toolbarEl: HTMLDivElement;
|
|
67
|
-
checkboxEl: ({
|
|
68
|
-
$: ComponentInternalInstance;
|
|
69
|
-
$data: {};
|
|
70
|
-
$props: {
|
|
71
|
-
readonly checked: boolean | (string | number)[];
|
|
72
|
-
readonly hasError?: boolean | undefined;
|
|
73
|
-
readonly id?: string | undefined;
|
|
74
|
-
readonly label?: string | undefined;
|
|
75
|
-
readonly errorText?: string | undefined;
|
|
76
|
-
readonly hintText?: string | undefined;
|
|
77
|
-
readonly modelValue?: boolean | (string | number)[] | undefined;
|
|
78
|
-
readonly value?: string | number | undefined;
|
|
79
|
-
readonly disabled?: boolean | undefined;
|
|
80
|
-
readonly "onUpdate:checked"?: ((value: boolean | (string | number)[]) => any) | undefined;
|
|
81
|
-
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
82
|
-
$attrs: {
|
|
83
|
-
[x: string]: unknown;
|
|
84
|
-
};
|
|
85
|
-
$refs: {
|
|
86
|
-
[x: string]: unknown;
|
|
87
|
-
};
|
|
88
|
-
$slots: Readonly<{
|
|
89
|
-
[name: string]: Slot<any> | undefined;
|
|
90
|
-
}>;
|
|
91
|
-
$root: ComponentPublicInstance< {}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null;
|
|
92
|
-
$parent: ComponentPublicInstance< {}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null;
|
|
93
|
-
$host: Element | null;
|
|
94
|
-
$emit: (event: "update:checked", value: boolean | (string | number)[]) => void;
|
|
95
|
-
$el: any;
|
|
96
|
-
$options: ComponentOptionsBase<Readonly<CheckboxProps> & Readonly<{
|
|
97
|
-
"onUpdate:checked"?: ((value: boolean | (string | number)[]) => any) | undefined;
|
|
98
|
-
}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
99
|
-
"update:checked": (value: boolean | (string | number)[]) => any;
|
|
100
|
-
}, string, {
|
|
101
|
-
id: string;
|
|
102
|
-
label: string;
|
|
103
|
-
value: string | number;
|
|
104
|
-
disabled: boolean;
|
|
105
|
-
hasError: boolean;
|
|
106
|
-
errorText: string;
|
|
107
|
-
hintText: string;
|
|
108
|
-
modelValue: boolean | (string | number)[];
|
|
109
|
-
checked: boolean | (string | number)[];
|
|
110
|
-
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
111
|
-
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
112
|
-
created?: ((() => void) | (() => void)[]) | undefined;
|
|
113
|
-
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
114
|
-
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
115
|
-
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
116
|
-
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
117
|
-
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
118
|
-
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
119
|
-
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
120
|
-
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
121
|
-
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
122
|
-
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
123
|
-
renderTracked?: (((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]) | undefined;
|
|
124
|
-
renderTriggered?: (((e: DebuggerEvent) => void) | ((e: DebuggerEvent) => void)[]) | undefined;
|
|
125
|
-
errorCaptured?: (((err: unknown, instance: ComponentPublicInstance< {}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void) | ((err: unknown, instance: ComponentPublicInstance< {}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, ComponentProvideOptions>, {}, {}, "", {}, any> | null, info: string) => boolean | void)[]) | undefined;
|
|
126
|
-
};
|
|
127
|
-
$forceUpdate: () => void;
|
|
128
|
-
$nextTick: nextTick;
|
|
129
|
-
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R, args_2: OnCleanup) => any : (args_0: any, args_1: any, args_2: OnCleanup) => any, options?: WatchOptions<boolean> | undefined): WatchStopHandle;
|
|
130
|
-
} & Readonly<{
|
|
131
|
-
id: string;
|
|
132
|
-
label: string;
|
|
133
|
-
value: string | number;
|
|
134
|
-
disabled: boolean;
|
|
135
|
-
hasError: boolean;
|
|
136
|
-
errorText: string;
|
|
137
|
-
hintText: string;
|
|
138
|
-
modelValue: boolean | (string | number)[];
|
|
139
|
-
checked: boolean | (string | number)[];
|
|
140
|
-
}> & Omit<Readonly<CheckboxProps> & Readonly<{
|
|
141
|
-
"onUpdate:checked"?: ((value: boolean | (string | number)[]) => any) | undefined;
|
|
142
|
-
}>, "id" | "label" | "value" | "disabled" | "hasError" | "errorText" | "hintText" | "modelValue" | "checked"> & ShallowUnwrapRef< {}> & {} & ComponentCustomProperties & {} & {
|
|
143
|
-
$slots: {
|
|
144
|
-
default?(_: {}): any;
|
|
145
|
-
hint?(_: {}): any;
|
|
146
|
-
};
|
|
147
|
-
}) | null;
|
|
148
|
-
paginationEl: HTMLDivElement;
|
|
149
|
-
}, HTMLDivElement>, {
|
|
83
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
150
84
|
default?(_: {}): any;
|
|
151
85
|
}>;
|
|
152
86
|
export default _default;
|