@kuina-ui/vue 0.5.0 → 0.7.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/dist/blocks/pagination/Pagination.js +4 -0
- package/dist/blocks/pagination/Pagination.vue.d.ts +39 -0
- package/dist/blocks/pagination/Pagination.vue_vue_type_script_setup_true_lang.js +151 -0
- package/dist/blocks/pagination/index.d.ts +2 -0
- package/dist/blocks/pagination/pagination.theme.d.ts +12 -0
- package/dist/blocks/pagination/pagination.theme.js +12 -0
- package/dist/blocks/table/Table.js +4 -0
- package/dist/blocks/table/Table.vue.d.ts +149 -0
- package/dist/blocks/table/Table.vue_vue_type_script_setup_true_lang.js +933 -0
- package/dist/blocks/table/TableCellText.js +4 -0
- package/dist/blocks/table/TableCellText.vue.d.ts +8 -0
- package/dist/blocks/table/TableCellText.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/blocks/table/index.d.ts +2 -0
- package/dist/blocks/table/table.theme.d.ts +286 -0
- package/dist/blocks/table/table.theme.js +391 -0
- package/dist/blocks/table/useLoadMoreTrigger.d.ts +11 -0
- package/dist/blocks/table/useLoadMoreTrigger.js +31 -0
- package/dist/blocks/table/usePinnedColumnOffsets.d.ts +10 -0
- package/dist/blocks/table/usePinnedColumnOffsets.js +63 -0
- package/dist/blocks/table/useRowReorder.d.ts +18 -0
- package/dist/blocks/table/useRowReorder.js +92 -0
- package/dist/blocks/table/useRowVirtualizer.d.ts +17 -0
- package/dist/blocks/table/useRowVirtualizer.js +45 -0
- package/dist/blocks/table/useTableSections.d.ts +46 -0
- package/dist/blocks/table/useTableSections.js +86 -0
- package/dist/components/alert/Alert.js +4 -0
- package/dist/components/alert/Alert.vue.d.ts +2 -2
- package/dist/components/alert/Alert.vue_vue_type_script_setup_true_lang.js +87 -0
- package/dist/components/alert/alert.theme.js +93 -0
- package/dist/components/avatar-group/AvatarGroup.js +4 -0
- package/dist/components/avatar-group/AvatarGroup.vue.d.ts +1 -1
- package/dist/components/avatar-group/AvatarGroup.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/components/avatar-group/avatar-group.theme.js +22 -0
- package/dist/components/date-picker/DateCalendar.js +4 -0
- package/dist/components/date-picker/DateCalendar.vue_vue_type_script_setup_true_lang.js +194 -0
- package/dist/components/date-picker/DateCalendarMonth.js +4 -0
- package/dist/components/date-picker/DateCalendarMonth.vue_vue_type_script_setup_true_lang.js +106 -0
- package/dist/components/date-picker/DateCalendarPopover.js +4 -0
- package/dist/components/date-picker/DateCalendarPopover.vue_vue_type_script_setup_true_lang.js +161 -0
- package/dist/components/date-picker/DatePicker.js +4 -0
- package/dist/components/date-picker/DatePicker.vue.d.ts +6 -6
- package/dist/components/date-picker/DatePicker.vue_vue_type_script_setup_true_lang.js +224 -0
- package/dist/components/date-picker/DatePickerField.js +4 -0
- package/dist/components/date-picker/DatePickerField.vue.d.ts +6 -6
- package/dist/components/date-picker/DatePickerField.vue_vue_type_script_setup_true_lang.js +241 -0
- package/dist/components/date-picker/DatePickerPanel.js +4 -0
- package/dist/components/date-picker/DatePickerPanel.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/components/date-picker/DateRangePicker.js +4 -0
- package/dist/components/date-picker/DateRangePicker.vue.d.ts +6 -6
- package/dist/components/date-picker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +212 -0
- package/dist/components/date-picker/DateRangePickerField.js +4 -0
- package/dist/components/date-picker/DateRangePickerField.vue.d.ts +7 -7
- package/dist/components/date-picker/DateRangePickerField.vue_vue_type_script_setup_true_lang.js +228 -0
- package/dist/components/date-picker/date-calendar.theme.js +46 -0
- package/dist/components/date-picker/date-picker.theme.js +16 -0
- package/dist/components/date-picker/useDatePickerControl.js +47 -0
- package/dist/components/date-picker/useDatePickerPopover.js +39 -0
- package/dist/components/date-picker/useDateRangeSelection.js +50 -0
- package/dist/components/date-picker/useDateRangeTyping.js +59 -0
- package/dist/components/date-picker/useDateTypingFocus.js +37 -0
- package/dist/components/date-picker/useSingleDateSelection.js +11 -0
- package/dist/components/date-picker/useSingleDateTyping.js +31 -0
- package/dist/components/date-picker/useTypedDateInput.js +39 -0
- package/dist/components/menu/Menu.js +4 -0
- package/dist/components/menu/Menu.vue.d.ts +3 -2
- package/dist/components/menu/Menu.vue_vue_type_script_setup_true_lang.js +137 -0
- package/dist/components/menu/MenuItemRow.js +4 -0
- package/dist/components/menu/MenuItemRow.vue_vue_type_script_setup_true_lang.js +117 -0
- package/dist/components/menu/MenuPanel.js +4 -0
- package/dist/components/menu/MenuPanel.vue.d.ts +2 -1
- package/dist/components/menu/MenuPanel.vue_vue_type_script_setup_true_lang.js +249 -0
- package/dist/components/menu/menu.theme.d.ts +5 -0
- package/dist/components/menu/menu.theme.js +174 -0
- package/dist/components/menu/menuContext.js +9 -0
- package/dist/components/menu/menuEntries.js +25 -0
- package/dist/components/select/Select.js +4 -0
- package/dist/components/select/Select.vue.d.ts +2 -2
- package/dist/components/select/Select.vue_vue_type_script_setup_true_lang.js +262 -0
- package/dist/components/select/SelectField.js +4 -0
- package/dist/components/select/SelectField.vue.d.ts +2 -2
- package/dist/components/select/SelectField.vue_vue_type_script_setup_true_lang.js +271 -0
- package/dist/components/select/SelectOptionRow.js +4 -0
- package/dist/components/select/SelectOptionRow.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/components/select/SelectPanel.js +4 -0
- package/dist/components/select/SelectPanel.vue_vue_type_script_setup_true_lang.js +169 -0
- package/dist/components/select/select-panel.theme.js +44 -0
- package/dist/components/select/selectOptions.d.ts +0 -2
- package/dist/components/select/selectOptions.js +66 -0
- package/dist/components/select/useSelectControl.d.ts +3 -3
- package/dist/components/select/useSelectControl.js +62 -0
- package/dist/components/select/useSelectListbox.js +169 -0
- package/dist/components/slider/RangeSlider.js +4 -0
- package/dist/components/slider/RangeSlider.vue.d.ts +55 -0
- package/dist/components/slider/RangeSlider.vue_vue_type_script_setup_true_lang.js +214 -0
- package/dist/components/slider/Slider.js +4 -0
- package/dist/components/slider/Slider.vue.d.ts +49 -0
- package/dist/components/slider/Slider.vue_vue_type_script_setup_true_lang.js +151 -0
- package/dist/components/slider/SliderHeader.js +4 -0
- package/dist/components/slider/SliderHeader.vue.d.ts +30 -0
- package/dist/components/slider/SliderHeader.vue_vue_type_script_setup_true_lang.js +61 -0
- package/dist/components/slider/index.d.ts +5 -0
- package/dist/components/slider/slider.theme.d.ts +33 -0
- package/dist/components/slider/slider.theme.js +34 -0
- package/dist/components/text-field/TextField.js +4 -0
- package/dist/components/text-field/TextField.vue.d.ts +2 -2
- package/dist/components/text-field/TextField.vue_vue_type_script_setup_true_lang.js +122 -0
- package/dist/components/text-field/text-field.theme.js +379 -0
- package/dist/components/textarea/Textarea.js +4 -0
- package/dist/components/textarea/Textarea.vue.d.ts +1 -1
- package/dist/components/textarea/Textarea.vue_vue_type_script_setup_true_lang.js +93 -0
- package/dist/components/textarea/textarea.theme.js +222 -0
- package/dist/elements/avatar/Avatar.js +4 -0
- package/dist/elements/avatar/Avatar.vue.d.ts +3 -3
- package/dist/elements/avatar/Avatar.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/elements/avatar/avatar.theme.js +141 -0
- package/dist/elements/badge/Badge.js +4 -0
- package/dist/elements/badge/Badge.vue.d.ts +2 -2
- package/dist/elements/badge/Badge.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/elements/badge/badge.theme.js +111 -0
- package/dist/elements/button/Button.js +4 -0
- package/dist/elements/button/Button.vue.d.ts +3 -3
- package/dist/elements/button/Button.vue_vue_type_script_setup_true_lang.js +83 -0
- package/dist/elements/button/button.theme.js +424 -0
- package/dist/elements/checkbox/Checkbox.js +4 -0
- package/dist/elements/checkbox/Checkbox.vue.d.ts +3 -1
- package/dist/elements/checkbox/Checkbox.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/elements/checkbox/checkbox.theme.d.ts +1 -0
- package/dist/elements/checkbox/checkbox.theme.js +22 -0
- package/dist/elements/circular-progress/CircularProgress.js +4 -0
- package/dist/elements/circular-progress/CircularProgress.vue_vue_type_script_setup_true_lang.js +44 -0
- package/dist/elements/circular-progress/circular-progress.theme.js +8 -0
- package/dist/elements/input/Input.js +4 -0
- package/dist/elements/input/Input.vue.d.ts +62 -0
- package/dist/elements/input/Input.vue_vue_type_script_setup_true_lang.js +138 -0
- package/dist/elements/input/focusInputFromContainer.d.ts +2 -0
- package/dist/elements/input/focusInputFromContainer.js +28 -0
- package/dist/elements/input/index.d.ts +2 -0
- package/dist/elements/input/input.theme.d.ts +81 -0
- package/dist/elements/input/input.theme.js +391 -0
- package/dist/elements/loading-dots/LoadingDots.js +4 -0
- package/dist/elements/loading-dots/LoadingDots.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/elements/loading-dots/loading-dots.theme.js +4 -0
- package/dist/elements/loading-indicator/LoadingIndicator.js +4 -0
- package/dist/elements/loading-indicator/LoadingIndicator.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/elements/loading-indicator/loading-indicator.theme.js +4 -0
- package/dist/elements/popover/Popover.js +4 -0
- package/dist/elements/popover/Popover.vue.d.ts +60 -0
- package/dist/elements/popover/Popover.vue_vue_type_script_setup_true_lang.js +218 -0
- package/dist/elements/popover/index.d.ts +2 -0
- package/dist/elements/popover/popover.theme.d.ts +20 -0
- package/dist/elements/popover/popover.theme.js +17 -0
- package/dist/elements/popover/popoverLayers.d.ts +5 -0
- package/dist/elements/popover/popoverLayers.js +22 -0
- package/dist/elements/radio-group/RadioGroup.js +4 -0
- package/dist/elements/radio-group/RadioGroup.vue.d.ts +1 -1
- package/dist/elements/radio-group/RadioGroup.vue_vue_type_script_setup_true_lang.js +105 -0
- package/dist/elements/radio-group/radio-group.theme.js +126 -0
- package/dist/elements/segmented-control/SegmentedControl.js +4 -0
- package/dist/elements/segmented-control/SegmentedControl.vue.d.ts +1 -1
- package/dist/elements/segmented-control/SegmentedControl.vue_vue_type_script_setup_true_lang.js +98 -0
- package/dist/elements/segmented-control/segmented-control.theme.js +201 -0
- package/dist/elements/select-control/SelectControl.js +4 -0
- package/dist/elements/select-control/SelectControl.vue.d.ts +1 -1
- package/dist/elements/select-control/SelectControl.vue_vue_type_script_setup_true_lang.js +105 -0
- package/dist/elements/select-control/select-control.theme.js +360 -0
- package/dist/elements/select-field-control/SelectFieldControl.js +4 -0
- package/dist/elements/select-field-control/SelectFieldControl.vue.d.ts +1 -1
- package/dist/elements/select-field-control/SelectFieldControl.vue_vue_type_script_setup_true_lang.js +123 -0
- package/dist/elements/select-field-control/select-field-control.theme.js +299 -0
- package/dist/elements/slider-control/SliderControl.js +4 -0
- package/dist/elements/slider-control/SliderControl.vue.d.ts +35 -0
- package/dist/elements/slider-control/SliderControl.vue_vue_type_script_setup_true_lang.js +228 -0
- package/dist/elements/slider-control/index.d.ts +3 -0
- package/dist/elements/slider-control/slider-control.theme.d.ts +38 -0
- package/dist/elements/slider-control/slider-control.theme.js +35 -0
- package/dist/elements/slider-control/useSliderMarksLayout.d.ts +6 -0
- package/dist/elements/slider-control/useSliderMarksLayout.js +25 -0
- package/dist/elements/switch/Switch.js +4 -0
- package/dist/elements/switch/Switch.vue.d.ts +1 -1
- package/dist/elements/switch/Switch.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/elements/switch/switch.theme.js +37 -0
- package/dist/elements/text-link/TextLink.js +4 -0
- package/dist/elements/text-link/TextLink.vue_vue_type_script_setup_true_lang.js +64 -0
- package/dist/elements/text-link/text-link.theme.js +25 -0
- package/dist/elements/tooltip/Tooltip.js +4 -0
- package/dist/elements/tooltip/Tooltip.vue.d.ts +48 -0
- package/dist/elements/tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js +161 -0
- package/dist/elements/tooltip/index.d.ts +2 -0
- package/dist/elements/tooltip/tooltip.theme.d.ts +29 -0
- package/dist/elements/tooltip/tooltip.theme.js +46 -0
- package/dist/elements/tooltip/useTooltipOpenState.d.ts +17 -0
- package/dist/elements/tooltip/useTooltipOpenState.js +57 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +38 -1
- package/dist/nuxt.js +12 -13
- package/dist/shared/composables/useApplePlatform.js +10 -0
- package/dist/shared/composables/useCalendarLabels.js +13 -0
- package/dist/shared/composables/useCustomColor.js +10 -0
- package/dist/shared/composables/useDismissOnOutsidePointerDown.d.ts +1 -1
- package/dist/shared/composables/useDismissOnOutsidePointerDown.js +14 -0
- package/dist/shared/composables/useFieldDescription.js +16 -0
- package/dist/shared/composables/useFloatingPosition.d.ts +3 -2
- package/dist/shared/composables/useFloatingPosition.js +113 -0
- package/dist/shared/composables/useMask.js +32 -0
- package/dist/shared/composables/useMaskedFieldModel.d.ts +7 -0
- package/dist/shared/composables/useMaskedFieldModel.js +19 -0
- package/dist/shared/composables/useNumberFieldTyping.d.ts +21 -0
- package/dist/shared/composables/useNumberFieldTyping.js +70 -0
- package/dist/shared/composables/usePointerGraceArea.d.ts +11 -0
- package/dist/shared/composables/usePointerGraceArea.js +40 -0
- package/dist/shared/composables/useRowSelection.d.ts +17 -0
- package/dist/shared/composables/useRowSelection.js +40 -0
- package/dist/shared/composables/useShortcuts.js +21 -0
- package/dist/shared/composables/useSlidingThumb.js +65 -0
- package/dist/shared/composables/useTableRows.d.ts +26 -0
- package/dist/shared/composables/useTableRows.js +41 -0
- package/dist/shared/types/floating-position.d.ts +9 -0
- package/dist/shared/types/pointer-grace-area.d.ts +12 -0
- package/dist/shared/types/slider.d.ts +6 -0
- package/dist/shared/types/table.d.ts +59 -0
- package/dist/shared/types/value-path.d.ts +6 -0
- package/dist/shared/utils/calendarMonth.js +23 -0
- package/dist/shared/utils/computeFloatingPosition.js +32 -0
- package/dist/shared/utils/createDateFormatters.js +31 -0
- package/dist/shared/utils/createDateInputMask.js +103 -0
- package/dist/shared/utils/createDebouncedCallback.d.ts +5 -0
- package/dist/shared/utils/createDebouncedCallback.js +17 -0
- package/dist/shared/utils/createMask.js +65 -0
- package/dist/shared/utils/createShortcutHandler.js +60 -0
- package/dist/shared/utils/createTypeaheadSearch.js +16 -0
- package/dist/shared/utils/editableFieldGuard.js +11 -0
- package/dist/shared/utils/findFirstRenderedVNode.d.ts +3 -0
- package/dist/shared/utils/findFirstRenderedVNode.js +14 -0
- package/dist/shared/utils/flipFloatingPosition.js +28 -0
- package/dist/shared/utils/floatingPanelTransition.js +25 -0
- package/dist/shared/utils/formatShortcut.js +86 -0
- package/dist/shared/utils/isApplePlatform.js +5 -0
- package/dist/shared/utils/isExternalUrl.js +5 -0
- package/dist/shared/utils/isoDate.js +50 -0
- package/dist/shared/utils/normalizeSearchText.d.ts +2 -0
- package/dist/shared/utils/normalizeSearchText.js +6 -0
- package/dist/shared/utils/parseShortcut.js +48 -0
- package/dist/shared/utils/pointerGraceArea.d.ts +11 -0
- package/dist/shared/utils/pointerGraceArea.js +92 -0
- package/dist/shared/utils/readValueAtPath.d.ts +2 -0
- package/dist/shared/utils/readValueAtPath.js +7 -0
- package/dist/shared/utils/resolveFloatingAnchor.d.ts +4 -0
- package/dist/shared/utils/resolveFloatingAnchor.js +15 -0
- package/dist/shared/utils/resolvePressScale.js +5 -0
- package/dist/shared/utils/shiftFloatingPosition.d.ts +3 -0
- package/dist/shared/utils/shiftFloatingPosition.js +21 -0
- package/dist/shared/utils/sliderPosition.d.ts +11 -0
- package/dist/shared/utils/sliderPosition.js +27 -0
- package/dist/shared/utils/sliderThumbs.d.ts +13 -0
- package/dist/shared/utils/sliderThumbs.js +16 -0
- package/dist/shared/utils/steppedValue.d.ts +18 -0
- package/dist/shared/utils/steppedValue.js +21 -0
- package/dist/shared/utils/tableColumnTypes.d.ts +21 -0
- package/dist/shared/utils/tableColumnTypes.js +77 -0
- package/dist/shared/utils/tableColumns.d.ts +20 -0
- package/dist/shared/utils/tableColumns.js +77 -0
- package/dist/shared/utils/tableGroups.d.ts +10 -0
- package/dist/shared/utils/tableGroups.js +34 -0
- package/dist/shared/utils/tableRows.d.ts +25 -0
- package/dist/shared/utils/tableRows.js +80 -0
- package/dist/shared/utils/tableTree.d.ts +15 -0
- package/dist/shared/utils/tableTree.js +22 -0
- package/dist/shared/utils/toggleColumnSort.d.ts +5 -0
- package/dist/shared/utils/toggleColumnSort.js +27 -0
- package/dist/shared/utils/tv.js +1 -0
- package/dist/shared/utils/warnInDevelopment.d.ts +3 -0
- package/dist/shared/utils/warnInDevelopment.js +13 -0
- package/package.json +1 -1
- package/src/index.css +2 -0
- package/src/shared/styles/utilities/shake.css +21 -0
- package/src/shared/styles/utilities/slider-mark-position.css +8 -0
- package/dist/src-Bnn36nLV.js +0 -7856
|
@@ -0,0 +1,933 @@
|
|
|
1
|
+
import e from "../../components/menu/Menu.js";
|
|
2
|
+
import t from "../../elements/button/Button.js";
|
|
3
|
+
import n from "../../elements/checkbox/Checkbox.js";
|
|
4
|
+
import r from "../../elements/loading-indicator/LoadingIndicator.js";
|
|
5
|
+
import i from "../../elements/popover/Popover.js";
|
|
6
|
+
import a from "../../elements/tooltip/Tooltip.js";
|
|
7
|
+
import { useRowSelection as o } from "../../shared/composables/useRowSelection.js";
|
|
8
|
+
import { useTableRows as s } from "../../shared/composables/useTableRows.js";
|
|
9
|
+
import { formatCellValue as c, formatColumnValue as ee, readCellValue as te, readRowKey as ne, resolveColumnAlign as re, resolveTableColumnType as ie } from "../../shared/utils/tableColumns.js";
|
|
10
|
+
import { aggregateColumnValues as ae } from "../../shared/utils/tableGroups.js";
|
|
11
|
+
import { createRowMatcher as oe, createRowQueryKey as se, hasActiveRowFiltering as ce, sortTableRows as le } from "../../shared/utils/tableRows.js";
|
|
12
|
+
import { hasMatchingDescendant as ue, readRowChildren as de } from "../../shared/utils/tableTree.js";
|
|
13
|
+
import { toggleColumnSort as fe } from "../../shared/utils/toggleColumnSort.js";
|
|
14
|
+
import { isDevelopmentBuild as pe, warnInDevelopment as l } from "../../shared/utils/warnInDevelopment.js";
|
|
15
|
+
import { tableTheme as me } from "./table.theme.js";
|
|
16
|
+
import he from "./TableCellText.js";
|
|
17
|
+
import { useLoadMoreTrigger as ge } from "./useLoadMoreTrigger.js";
|
|
18
|
+
import { usePinnedColumnOffsets as _e } from "./usePinnedColumnOffsets.js";
|
|
19
|
+
import { useRowReorder as ve } from "./useRowReorder.js";
|
|
20
|
+
import { useRowVirtualizer as ye } from "./useRowVirtualizer.js";
|
|
21
|
+
import { useTableSections as be } from "./useTableSections.js";
|
|
22
|
+
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as xe, defineComponent as _, h as Se, mergeModels as Ce, normalizeClass as v, normalizeStyle as y, onMounted as we, openBlock as b, renderList as x, renderSlot as S, resolveDynamicComponent as Te, shallowRef as C, toDisplayString as w, unref as T, useId as Ee, useModel as E, useSlots as De, useTemplateRef as Oe, watch as ke, withCtx as Ae } from "vue";
|
|
23
|
+
import { ArrowDown as je, ArrowUp as Me, ArrowUpDown as Ne, Check as Pe, ChevronDown as Fe, ChevronRight as Ie, GripVertical as Le, Minus as Re } from "lucide-vue-next";
|
|
24
|
+
// src/blocks/table/Table.vue?vue&type=script&setup=true&lang.ts
|
|
25
|
+
var ze = ["aria-busy", "aria-rowcount"], Be = ["aria-sort"], Ve = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "sr-only"
|
|
28
|
+
}, He = {
|
|
29
|
+
key: 1,
|
|
30
|
+
class: "sr-only"
|
|
31
|
+
}, Ue = {
|
|
32
|
+
key: 2,
|
|
33
|
+
class: "sr-only"
|
|
34
|
+
}, We = {
|
|
35
|
+
key: 6,
|
|
36
|
+
class: "sr-only"
|
|
37
|
+
}, Ge = ["onClick"], Ke = { key: 1 }, qe = { key: 2 }, Je = ["colspan"], Ye = { key: 0 }, Xe = ["colspan"], Ze = ["colspan"], Qe = [
|
|
38
|
+
"data-row-key",
|
|
39
|
+
"aria-rowindex",
|
|
40
|
+
"onClick",
|
|
41
|
+
"onDblclick",
|
|
42
|
+
"onContextmenu",
|
|
43
|
+
"onPointerenter",
|
|
44
|
+
"onFocusin"
|
|
45
|
+
], $e = [
|
|
46
|
+
"rowspan",
|
|
47
|
+
"data-label",
|
|
48
|
+
"onClick"
|
|
49
|
+
], et = ["id"], tt = ["colspan"], nt = {
|
|
50
|
+
key: 1,
|
|
51
|
+
"aria-hidden": "true"
|
|
52
|
+
}, rt = ["colspan"], it = ["colspan"], at = ["data-label"], ot = { key: 1 }, st = {
|
|
53
|
+
role: "status",
|
|
54
|
+
class: "sr-only"
|
|
55
|
+
}, D = /*@__PURE__*/ _({
|
|
56
|
+
__name: "Table",
|
|
57
|
+
props: /*@__PURE__*/ Ce({
|
|
58
|
+
rows: { default: () => [] },
|
|
59
|
+
columns: {},
|
|
60
|
+
columnTypes: {},
|
|
61
|
+
rowKey: {},
|
|
62
|
+
locale: {},
|
|
63
|
+
caption: {},
|
|
64
|
+
showCaption: { type: Boolean },
|
|
65
|
+
searchQuery: {},
|
|
66
|
+
searchMatcher: {},
|
|
67
|
+
columnFilters: {},
|
|
68
|
+
rowsPerPage: {},
|
|
69
|
+
serverSide: { type: Boolean },
|
|
70
|
+
groupBy: {},
|
|
71
|
+
groupLabel: {},
|
|
72
|
+
childrenKey: { default: "children" },
|
|
73
|
+
pinnedRows: {},
|
|
74
|
+
reorderable: { type: Boolean },
|
|
75
|
+
rowMenu: {},
|
|
76
|
+
virtualize: { type: Boolean },
|
|
77
|
+
selectable: { type: Boolean },
|
|
78
|
+
isRowSelectable: {},
|
|
79
|
+
loading: { type: Boolean },
|
|
80
|
+
loadingMore: { type: Boolean },
|
|
81
|
+
loadingRowCount: { default: 4 },
|
|
82
|
+
emptyText: { default: "No results" },
|
|
83
|
+
variant: { default: "plain" },
|
|
84
|
+
dividers: { default: "rows" },
|
|
85
|
+
size: { default: "md" },
|
|
86
|
+
striped: { type: Boolean },
|
|
87
|
+
hoverable: { type: Boolean },
|
|
88
|
+
hideHeader: { type: Boolean },
|
|
89
|
+
sticky: { type: [Boolean, String] },
|
|
90
|
+
maxHeight: {},
|
|
91
|
+
surface: { default: "widget" },
|
|
92
|
+
responsive: { default: "scroll" },
|
|
93
|
+
lineNumbers: { type: Boolean },
|
|
94
|
+
rowHeight: {},
|
|
95
|
+
rowClass: {},
|
|
96
|
+
rowColor: {},
|
|
97
|
+
rowLabel: {},
|
|
98
|
+
selectAllLabel: { default: "Select all rows" },
|
|
99
|
+
selectRowLabel: {
|
|
100
|
+
type: Function,
|
|
101
|
+
default: (e) => `Select ${e}`
|
|
102
|
+
},
|
|
103
|
+
loadingLabel: { default: "Loading" },
|
|
104
|
+
detailsColumnLabel: { default: "Details" },
|
|
105
|
+
lineNumberColumnLabel: { default: "Row" },
|
|
106
|
+
reorderColumnLabel: { default: "Reorder" },
|
|
107
|
+
reorderRowLabel: {
|
|
108
|
+
type: Function,
|
|
109
|
+
default: (e) => `Reorder ${e}`
|
|
110
|
+
},
|
|
111
|
+
reorderHint: { default: "Use the up and down arrow keys to move the row." },
|
|
112
|
+
rowMovedAnnouncement: {
|
|
113
|
+
type: Function,
|
|
114
|
+
default: (e, t, n) => `${e} moved to position ${t} of ${n}`
|
|
115
|
+
},
|
|
116
|
+
rowMenuLabel: {
|
|
117
|
+
type: Function,
|
|
118
|
+
default: (e) => `Actions for ${e}`
|
|
119
|
+
},
|
|
120
|
+
rowPreviewLabel: {
|
|
121
|
+
type: Function,
|
|
122
|
+
default: (e) => `Details of ${e}`
|
|
123
|
+
},
|
|
124
|
+
loadingMoreLabel: { default: "Loading more…" },
|
|
125
|
+
toggleRowDetailsLabel: {
|
|
126
|
+
type: Function,
|
|
127
|
+
default: (e, t) => `${t ? "Hide" : "Show"} details for ${e}`
|
|
128
|
+
},
|
|
129
|
+
toggleRowChildrenLabel: {
|
|
130
|
+
type: Function,
|
|
131
|
+
default: (e, t) => `${t ? "Collapse" : "Expand"} ${e}`
|
|
132
|
+
},
|
|
133
|
+
toggleGroupLabel: {
|
|
134
|
+
type: Function,
|
|
135
|
+
default: (e, t) => `${t ? "Expand" : "Collapse"} ${e}`
|
|
136
|
+
},
|
|
137
|
+
ui: {},
|
|
138
|
+
class: { type: [
|
|
139
|
+
Array,
|
|
140
|
+
String,
|
|
141
|
+
null,
|
|
142
|
+
Number,
|
|
143
|
+
Boolean
|
|
144
|
+
] }
|
|
145
|
+
}, {
|
|
146
|
+
sort: { default: () => [] },
|
|
147
|
+
sortModifiers: {},
|
|
148
|
+
selectedRows: { default: () => [] },
|
|
149
|
+
selectedRowsModifiers: {},
|
|
150
|
+
page: { default: 1 },
|
|
151
|
+
pageModifiers: {},
|
|
152
|
+
matchingRowCount: { default: 0 },
|
|
153
|
+
matchingRowCountModifiers: {},
|
|
154
|
+
expandedRows: { default: () => [] },
|
|
155
|
+
expandedRowsModifiers: {},
|
|
156
|
+
collapsedGroups: { default: () => [] },
|
|
157
|
+
collapsedGroupsModifiers: {}
|
|
158
|
+
}),
|
|
159
|
+
emits: /*@__PURE__*/ Ce([
|
|
160
|
+
"rowClick",
|
|
161
|
+
"rowDblclick",
|
|
162
|
+
"cellClick",
|
|
163
|
+
"update:rows",
|
|
164
|
+
"reorder",
|
|
165
|
+
"loadMore"
|
|
166
|
+
], [
|
|
167
|
+
"update:sort",
|
|
168
|
+
"update:selectedRows",
|
|
169
|
+
"update:page",
|
|
170
|
+
"update:matchingRowCount",
|
|
171
|
+
"update:expandedRows",
|
|
172
|
+
"update:collapsedGroups"
|
|
173
|
+
]),
|
|
174
|
+
setup(_, { emit: Ce }) {
|
|
175
|
+
let D = _, O = Ce, k = De(), A = E(_, "sort"), ct = E(_, "selectedRows"), lt = E(_, "page"), ut = E(_, "matchingRowCount"), j = E(_, "expandedRows"), M = E(_, "collapsedGroups"), dt = Ee(), ft = [
|
|
176
|
+
"w-24",
|
|
177
|
+
"w-16",
|
|
178
|
+
"w-20"
|
|
179
|
+
], N = "__selection", pt = "__details", P = "__lineNumber", mt = "__reorder", F = d(() => D.rowKey ?? "id"), I = d(() => ({
|
|
180
|
+
columnTypes: D.columnTypes,
|
|
181
|
+
locale: D.locale
|
|
182
|
+
})), { resolvedColumns: ht, matchingRows: gt, visibleRows: _t, matchingRowCount: vt } = s(() => D.rows, {
|
|
183
|
+
columns: () => D.columns,
|
|
184
|
+
columnTypes: () => D.columnTypes,
|
|
185
|
+
locale: () => D.locale,
|
|
186
|
+
searchQuery: () => D.searchQuery,
|
|
187
|
+
get searchMatcher() {
|
|
188
|
+
return D.searchMatcher;
|
|
189
|
+
},
|
|
190
|
+
columnFilters: () => D.columnFilters,
|
|
191
|
+
sort: A,
|
|
192
|
+
page: lt,
|
|
193
|
+
rowsPerPage: () => D.rowsPerPage,
|
|
194
|
+
serverSide: () => D.serverSide,
|
|
195
|
+
childrenKey: () => D.childrenKey,
|
|
196
|
+
rowKey: F,
|
|
197
|
+
pinnedRows: () => D.pinnedRows
|
|
198
|
+
}), L = d(() => {
|
|
199
|
+
let e = ht.value.filter((e) => !e.hidden);
|
|
200
|
+
return [
|
|
201
|
+
...e.filter((e) => e.pinned === "start"),
|
|
202
|
+
...e.filter((e) => e.pinned !== "start" && e.pinned !== "end"),
|
|
203
|
+
...e.filter((e) => e.pinned === "end")
|
|
204
|
+
];
|
|
205
|
+
}), yt = d(() => ({
|
|
206
|
+
columns: ht.value,
|
|
207
|
+
...I.value,
|
|
208
|
+
searchQuery: D.searchQuery,
|
|
209
|
+
searchMatcher: D.searchMatcher,
|
|
210
|
+
columnFilters: D.columnFilters,
|
|
211
|
+
childrenKey: D.childrenKey
|
|
212
|
+
})), bt = d(() => !D.serverSide && St.value && ce(yt.value)), xt = d(() => oe(yt.value)), R = C(/* @__PURE__ */ new Set());
|
|
213
|
+
ke(() => se(D.searchQuery, D.columnFilters), () => {
|
|
214
|
+
R.value = /* @__PURE__ */ new Set();
|
|
215
|
+
});
|
|
216
|
+
let St = d(() => D.rows.some((e) => de(e, D.childrenKey).length > 0));
|
|
217
|
+
function Ct(e) {
|
|
218
|
+
return bt.value && !R.value.has(K(e)) && ue(e, D.childrenKey, xt.value);
|
|
219
|
+
}
|
|
220
|
+
function wt(e) {
|
|
221
|
+
return D.serverSide ? e : le(e, {
|
|
222
|
+
columns: ht.value,
|
|
223
|
+
...I.value,
|
|
224
|
+
sort: A.value
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
let z = Oe("tableElement"), B = Oe("scrollerElement"), Tt = d(() => !!D.reorderable && A.value.length === 0 && !D.groupBy && !D.pinnedRows?.length && !St.value && (D.serverSide || !ce(yt.value))), Et = C("");
|
|
228
|
+
function Dt(e, t) {
|
|
229
|
+
let [n] = _t.value, r = D.rows.indexOf(e), i = n === void 0 ? -1 : D.rows.indexOf(n);
|
|
230
|
+
if (r === -1 || i === -1) return;
|
|
231
|
+
let a = i + t, o = D.rows.filter((t) => t !== e), s = [
|
|
232
|
+
...o.slice(0, a),
|
|
233
|
+
e,
|
|
234
|
+
...o.slice(a)
|
|
235
|
+
];
|
|
236
|
+
O("update:rows", s), O("reorder", {
|
|
237
|
+
row: e,
|
|
238
|
+
fromIndex: r,
|
|
239
|
+
toIndex: a,
|
|
240
|
+
rows: s
|
|
241
|
+
}), Et.value = D.rowMovedAnnouncement(q(e), a + 1, D.rows.length);
|
|
242
|
+
}
|
|
243
|
+
let { draggedRowKey: Ot, isDragging: kt, rowsInPreviewOrder: At, startPointerDrag: jt, moveRowFromKeys: Mt } = ve({
|
|
244
|
+
tableElement: z,
|
|
245
|
+
scrollerElement: B,
|
|
246
|
+
shownRows: () => _t.value,
|
|
247
|
+
findRowKey: K,
|
|
248
|
+
isEnabled: () => Tt.value,
|
|
249
|
+
moveRow: Dt
|
|
250
|
+
}), V = d(() => !!D.virtualize && !D.groupBy && k.expanded === void 0), { tableSections: Nt, displayedRows: Pt } = be(At, {
|
|
251
|
+
columns: ht,
|
|
252
|
+
mergedColumns: () => V.value ? [] : L.value.filter((e) => e.mergeRepeated),
|
|
253
|
+
columnSettings: I,
|
|
254
|
+
groupBy: () => D.groupBy,
|
|
255
|
+
groupLabel: () => D.groupLabel,
|
|
256
|
+
childrenKey: () => D.childrenKey,
|
|
257
|
+
hasRowDetails: () => k.expanded !== void 0,
|
|
258
|
+
expandedRowKeys: j,
|
|
259
|
+
collapsedGroupKeys: M,
|
|
260
|
+
findRowKey: K,
|
|
261
|
+
isRowAutoExpanded: Ct,
|
|
262
|
+
orderChildRows: wt
|
|
263
|
+
}), { shownRowRange: Ft, topSpacerHeights: It, bottomSpacerHeight: Lt } = ye({
|
|
264
|
+
scrollerElement: B,
|
|
265
|
+
tableElement: z,
|
|
266
|
+
rowCount: () => V.value ? Nt.value[0]?.items.length ?? 0 : 0,
|
|
267
|
+
isEnabled: () => V.value,
|
|
268
|
+
estimatedRowHeight: () => D.rowHeight
|
|
269
|
+
});
|
|
270
|
+
function Rt(e) {
|
|
271
|
+
return V.value ? e.items.slice(Ft.value.startIndex, Ft.value.endIndex) : e.items;
|
|
272
|
+
}
|
|
273
|
+
let zt = Oe("loadMoreSentinel");
|
|
274
|
+
ge({
|
|
275
|
+
sentinelElement: zt,
|
|
276
|
+
scrollerElement: B,
|
|
277
|
+
rowCount: () => D.rows.length,
|
|
278
|
+
isPaused: () => !!(D.loading || D.loadingMore),
|
|
279
|
+
scrollAreaKey: () => D.maxHeight,
|
|
280
|
+
onReachEnd: () => O("loadMore")
|
|
281
|
+
}), ke(() => !!D.virtualize && !V.value, (e) => {
|
|
282
|
+
e && l("Virtualization needs rows of one height, so it is off with group-by and row details.");
|
|
283
|
+
}, { immediate: !0 }), we(() => {
|
|
284
|
+
let e = B.value;
|
|
285
|
+
V.value && e && getComputedStyle(e).maxHeight === "none" && l("Virtualization needs max-height, so the rows scroll inside the table.");
|
|
286
|
+
});
|
|
287
|
+
let { selectionState: Bt, isRowSelected: Vt, isRowSelectable: Ht, toggleRow: Ut, toggleAllRows: Wt } = o(Pt, ct, {
|
|
288
|
+
rowKey: F,
|
|
289
|
+
isRowSelectable: (e) => D.isRowSelectable?.(e) ?? !0
|
|
290
|
+
});
|
|
291
|
+
ke(vt, (e) => {
|
|
292
|
+
D.serverSide || (ut.value = e);
|
|
293
|
+
}, { immediate: !0 }), ke(() => D.rows, (e) => {
|
|
294
|
+
if (!pe()) return;
|
|
295
|
+
let t = /* @__PURE__ */ new Set();
|
|
296
|
+
for (let n of e) {
|
|
297
|
+
let e = ne(n, F.value);
|
|
298
|
+
if (e == null) {
|
|
299
|
+
l("A table row has no key. Give each row an `id`, or set `row-key`.");
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
if (t.has(e)) {
|
|
303
|
+
l(`Two table rows share the key "${e}". Each row needs its own key.`);
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
t.add(e);
|
|
307
|
+
}
|
|
308
|
+
}, { immediate: !0 });
|
|
309
|
+
let Gt = d(() => D.striped || D.hoverable || D.selectable || D.rowColor !== void 0 || D.rowMenu !== void 0 || k["row-preview"] !== void 0), Kt = d(() => D.variant === "card" ? "card" : D.dividers === "grid" || Gt.value ? "inset" : "flush"), qt = d(() => D.sticky === !0 || D.sticky === "header"), Jt = d(() => D.sticky === !0 || D.sticky === "footer"), Yt = d(() => D.responsive === "stack"), H = d(() => me({
|
|
310
|
+
variant: D.variant,
|
|
311
|
+
size: D.size,
|
|
312
|
+
dividers: D.dividers,
|
|
313
|
+
edgeSpacing: Kt.value,
|
|
314
|
+
surface: D.variant === "card" ? "widget" : D.surface,
|
|
315
|
+
responsive: D.responsive,
|
|
316
|
+
stickyHeader: qt.value,
|
|
317
|
+
stickyFooter: Jt.value,
|
|
318
|
+
hasFixedRowHeight: D.rowHeight !== void 0,
|
|
319
|
+
showsCaption: D.showCaption,
|
|
320
|
+
hidesHeader: D.hideHeader,
|
|
321
|
+
isLoading: D.loading,
|
|
322
|
+
striped: D.striped,
|
|
323
|
+
hoverable: D.hoverable,
|
|
324
|
+
isDragging: kt.value
|
|
325
|
+
})), Xt = d(() => L.value[0]?.pinned === "start" ? "start" : void 0), U = d(() => [...[
|
|
326
|
+
...D.reorderable ? [mt] : [],
|
|
327
|
+
...D.selectable ? [N] : [],
|
|
328
|
+
...k.expanded ? [pt] : [],
|
|
329
|
+
...D.lineNumbers ? [P] : []
|
|
330
|
+
].map((e) => ({
|
|
331
|
+
key: e,
|
|
332
|
+
pinned: Xt.value
|
|
333
|
+
})), ...L.value.map((e) => ({
|
|
334
|
+
key: e.key,
|
|
335
|
+
column: e,
|
|
336
|
+
pinned: e.pinned
|
|
337
|
+
}))]), { pinnedColumnStyles: W } = _e(z, () => U.value), G = d(() => {
|
|
338
|
+
let e = U.value.map((e) => e.pinned), t = e.lastIndexOf("start"), n = e.indexOf("end");
|
|
339
|
+
return U.value.map(({ key: e, column: r, pinned: i }, a) => {
|
|
340
|
+
let o = {
|
|
341
|
+
isFirstColumn: a === 0,
|
|
342
|
+
isLastColumn: a === U.value.length - 1,
|
|
343
|
+
isControlColumn: r === void 0,
|
|
344
|
+
align: r ? re(r, I.value) : "start"
|
|
345
|
+
}, s = {
|
|
346
|
+
pinned: i,
|
|
347
|
+
isPinnedEdge: a === t || a === n
|
|
348
|
+
}, c = {
|
|
349
|
+
...o,
|
|
350
|
+
...s,
|
|
351
|
+
isOpaque: i !== void 0,
|
|
352
|
+
wraps: !!r?.wrap && D.rowHeight === void 0,
|
|
353
|
+
usesTabularNumbers: r ? !!ie(r, I.value).tabularNumbers : e === P
|
|
354
|
+
}, ee = typeof r?.cellClass == "function" ? void 0 : r?.cellClass;
|
|
355
|
+
return {
|
|
356
|
+
key: e,
|
|
357
|
+
column: r,
|
|
358
|
+
cellVariants: c,
|
|
359
|
+
headerCellClass: H.value.headerCell({
|
|
360
|
+
...o,
|
|
361
|
+
...s,
|
|
362
|
+
isOpaque: qt.value || i !== void 0,
|
|
363
|
+
class: [D.ui?.headerCell, r?.headerClass]
|
|
364
|
+
}),
|
|
365
|
+
cellClass: H.value.cell({
|
|
366
|
+
...c,
|
|
367
|
+
class: [D.ui?.cell, ee]
|
|
368
|
+
}),
|
|
369
|
+
footerCellClass: H.value.footerCell({
|
|
370
|
+
...o,
|
|
371
|
+
...s,
|
|
372
|
+
isOpaque: Jt.value || i !== void 0,
|
|
373
|
+
class: D.ui?.footerCell
|
|
374
|
+
}),
|
|
375
|
+
skeletonCellClass: H.value.skeletonCell({
|
|
376
|
+
...o,
|
|
377
|
+
class: D.ui?.skeletonCell
|
|
378
|
+
}),
|
|
379
|
+
skeletonContentClass: H.value.skeletonContent({
|
|
380
|
+
align: o.align,
|
|
381
|
+
class: D.ui?.skeletonContent
|
|
382
|
+
})
|
|
383
|
+
};
|
|
384
|
+
});
|
|
385
|
+
}), Zt = d(() => H.value.emptyCell({
|
|
386
|
+
isFirstColumn: !0,
|
|
387
|
+
isLastColumn: !0,
|
|
388
|
+
class: D.ui?.emptyCell
|
|
389
|
+
})), Qt = d(() => U.value.filter(({ column: e }) => !e).length), $t = d(() => Qt.value + 1), en = d(() => G.value.slice($t.value)), tn = d(() => {
|
|
390
|
+
let e = G.value[$t.value - 1]?.cellVariants;
|
|
391
|
+
return H.value.cell({
|
|
392
|
+
isFirstColumn: !0,
|
|
393
|
+
isLastColumn: en.value.length === 0,
|
|
394
|
+
pinned: e?.pinned,
|
|
395
|
+
isPinnedEdge: e?.isPinnedEdge,
|
|
396
|
+
isOpaque: e?.isOpaque,
|
|
397
|
+
class: H.value.groupHeaderCell({ class: D.ui?.groupHeaderCell })
|
|
398
|
+
});
|
|
399
|
+
}), nn = d(() => en.value.map((e) => H.value.cell({
|
|
400
|
+
...e.cellVariants,
|
|
401
|
+
class: H.value.groupTotalCell({ class: D.ui?.groupTotalCell })
|
|
402
|
+
}))), rn = d(() => H.value.loadingMoreCell({
|
|
403
|
+
isFirstColumn: !0,
|
|
404
|
+
isLastColumn: !0,
|
|
405
|
+
class: D.ui?.loadingMoreCell
|
|
406
|
+
})), an = d(() => H.value.spacerCell({ class: D.ui?.spacerCell })), on = `${dt}-reorder-hint`, sn = d(() => H.value.cell({
|
|
407
|
+
isFirstColumn: !0,
|
|
408
|
+
isLastColumn: !0,
|
|
409
|
+
class: H.value.detailsCell({ class: D.ui?.detailsCell })
|
|
410
|
+
})), cn = d(() => D.loading && D.rows.length === 0), ln = d(() => D.rowsPerPage ? (lt.value - 1) * D.rowsPerPage : 0), un = d(() => L.value.some(fn)), dn = d(() => {
|
|
411
|
+
let e = {};
|
|
412
|
+
for (let t of L.value) {
|
|
413
|
+
let { footer: n } = t;
|
|
414
|
+
if (n === void 0) continue;
|
|
415
|
+
if (typeof n == "string") {
|
|
416
|
+
e[t.key] = {
|
|
417
|
+
value: n,
|
|
418
|
+
formattedValue: n
|
|
419
|
+
};
|
|
420
|
+
continue;
|
|
421
|
+
}
|
|
422
|
+
let r = typeof n == "function" ? n(gt.value) : n;
|
|
423
|
+
e[t.key] = {
|
|
424
|
+
value: r,
|
|
425
|
+
formattedValue: ee(r, t, I.value)
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
return e;
|
|
429
|
+
});
|
|
430
|
+
function fn(e) {
|
|
431
|
+
return e !== void 0 && (e.footer !== void 0 || k[`${e.key}-footer`] !== void 0);
|
|
432
|
+
}
|
|
433
|
+
let pn = d(() => D.rowHeight === void 0 ? void 0 : { height: `${D.rowHeight}px` });
|
|
434
|
+
function mn(e) {
|
|
435
|
+
return ft[e % ft.length];
|
|
436
|
+
}
|
|
437
|
+
function K(e) {
|
|
438
|
+
return ne(e, F.value);
|
|
439
|
+
}
|
|
440
|
+
function q(e) {
|
|
441
|
+
if (D.rowLabel) return D.rowLabel(e);
|
|
442
|
+
let [t] = L.value;
|
|
443
|
+
return t ? c(e, t, I.value) : String(K(e));
|
|
444
|
+
}
|
|
445
|
+
function J(e) {
|
|
446
|
+
let t = A.value.findIndex((t) => t.key === e.key);
|
|
447
|
+
return t === -1 ? void 0 : {
|
|
448
|
+
direction: A.value[t].direction,
|
|
449
|
+
priority: t + 1
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
function hn(e) {
|
|
453
|
+
return e === "ascending" ? Me : e === "descending" ? je : Ne;
|
|
454
|
+
}
|
|
455
|
+
function gn(e, t) {
|
|
456
|
+
A.value = fe(A.value, e, { keepsOtherColumns: t.shiftKey });
|
|
457
|
+
}
|
|
458
|
+
let Y = C(), X = C(!1), Z = C(), Q = C(!1), _n = !1;
|
|
459
|
+
function vn(e) {
|
|
460
|
+
return X.value && Y.value?.row === e || Q.value && Z.value?.row === e;
|
|
461
|
+
}
|
|
462
|
+
function yn(e) {
|
|
463
|
+
return Ot.value !== void 0 && K(e) === Ot.value;
|
|
464
|
+
}
|
|
465
|
+
function bn(e) {
|
|
466
|
+
return yn(e) || D.selectable && Vt(e) ? "selected" : D.rowColor?.(e) || (vn(e) ? "highlighted" : "none");
|
|
467
|
+
}
|
|
468
|
+
function xn(e) {
|
|
469
|
+
let t = bn(e), n = t !== "none";
|
|
470
|
+
return H.value.row({
|
|
471
|
+
isSelected: t === "selected",
|
|
472
|
+
isHighlighted: t === "highlighted",
|
|
473
|
+
rowColor: t === "selected" || t === "highlighted" || t === "none" ? void 0 : t,
|
|
474
|
+
striped: D.striped && !n,
|
|
475
|
+
hoverable: D.hoverable && !n,
|
|
476
|
+
class: [D.ui?.row, D.rowClass?.(e)]
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
function $(e) {
|
|
480
|
+
return k.expanded !== void 0 && j.value.includes(K(e));
|
|
481
|
+
}
|
|
482
|
+
function Sn(e, t) {
|
|
483
|
+
return t.mergedCells[e.key]?.rowSpan ?? 1;
|
|
484
|
+
}
|
|
485
|
+
function Cn(e, t) {
|
|
486
|
+
let { column: n } = e, { row: r } = t, i = t.mergedCells[e.key], a = (i?.rowSpan ?? 1) > 1, o = $(i?.lastRow ?? r), s = e.cellVariants.isOpaque ? bn(r) : "none";
|
|
487
|
+
if (typeof n?.cellClass != "function" && !o && !a && s === "none") return e.cellClass;
|
|
488
|
+
let c = typeof n?.cellClass == "function" ? n.cellClass(r) : n?.cellClass;
|
|
489
|
+
return H.value.cell({
|
|
490
|
+
...e.cellVariants,
|
|
491
|
+
isFollowedByDetails: o,
|
|
492
|
+
isMerged: a,
|
|
493
|
+
rowTint: s,
|
|
494
|
+
class: [D.ui?.cell, c]
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
function wn(e) {
|
|
498
|
+
return St.value && e.column !== void 0 && e.column === L.value[0];
|
|
499
|
+
}
|
|
500
|
+
function Tn(e) {
|
|
501
|
+
return `${dt}-${K(e)}-details`;
|
|
502
|
+
}
|
|
503
|
+
function En(e, t, n) {
|
|
504
|
+
let r = K(t), i = e.filter((e) => e !== r);
|
|
505
|
+
return n ? [...i, r] : i;
|
|
506
|
+
}
|
|
507
|
+
function Dn(e) {
|
|
508
|
+
j.value = En(j.value, e, !$(e));
|
|
509
|
+
}
|
|
510
|
+
function On(e) {
|
|
511
|
+
let t = K(e.row), n = new Set(R.value);
|
|
512
|
+
e.isExpanded ? n.add(t) : n.delete(t), R.value = n, j.value = En(j.value, e.row, !e.isExpanded);
|
|
513
|
+
}
|
|
514
|
+
function kn(e) {
|
|
515
|
+
M.value = M.value.includes(e) ? M.value.filter((t) => t !== e) : [...M.value, e];
|
|
516
|
+
}
|
|
517
|
+
function An(e, t) {
|
|
518
|
+
return t ? ee(ae(e, t, I.value), t, I.value) : "";
|
|
519
|
+
}
|
|
520
|
+
function jn(e) {
|
|
521
|
+
return e ? "rtl:-scale-x-100" : void 0;
|
|
522
|
+
}
|
|
523
|
+
let Mn = ({ sectionItem: e, column: t }) => {
|
|
524
|
+
let { row: n } = e.displayRow, r = te(n, t), i = c(n, t, I.value), a = k[`${t.key}-cell`];
|
|
525
|
+
return a ? a({
|
|
526
|
+
row: n,
|
|
527
|
+
column: t,
|
|
528
|
+
rowIndex: e.rowIndex,
|
|
529
|
+
value: r,
|
|
530
|
+
formattedValue: i
|
|
531
|
+
}) : t.type === "boolean" && !t.format ? [Se(r ? Pe : Re, {
|
|
532
|
+
"aria-hidden": "true",
|
|
533
|
+
class: H.value.booleanIcon({
|
|
534
|
+
isTruthy: !!r,
|
|
535
|
+
class: D.ui?.booleanIcon
|
|
536
|
+
})
|
|
537
|
+
}), Se("span", { class: "sr-only" }, i)] : t.maxWidth ? Se(he, {
|
|
538
|
+
text: i,
|
|
539
|
+
maxWidth: t.maxWidth,
|
|
540
|
+
textClass: H.value.cellText({ class: D.ui?.cellText })
|
|
541
|
+
}) : Se("bdi", i);
|
|
542
|
+
};
|
|
543
|
+
Mn.props = ["sectionItem", "column"];
|
|
544
|
+
function Nn(e) {
|
|
545
|
+
let t = e.target, n = e.currentTarget;
|
|
546
|
+
if (!(t instanceof Element) || !(n instanceof Element)) return !1;
|
|
547
|
+
let r = t.closest("a, button, input, select, textarea, label, [role=\"button\"], [role=\"menuitem\"]");
|
|
548
|
+
return r !== null && n.contains(r);
|
|
549
|
+
}
|
|
550
|
+
function Pn(e, t) {
|
|
551
|
+
Nn(t) || O("rowClick", e, t);
|
|
552
|
+
}
|
|
553
|
+
function Fn(e, t) {
|
|
554
|
+
Nn(t) || O("rowDblclick", e, t);
|
|
555
|
+
}
|
|
556
|
+
function In(e, t, n) {
|
|
557
|
+
t && O("cellClick", {
|
|
558
|
+
row: e,
|
|
559
|
+
column: t,
|
|
560
|
+
value: te(e, t)
|
|
561
|
+
}, n);
|
|
562
|
+
}
|
|
563
|
+
function Ln(e, t) {
|
|
564
|
+
let n = t.target;
|
|
565
|
+
if (!D.rowMenu || kt.value || n instanceof Element && n.closest("input:not([type=\"checkbox\"]):not([type=\"radio\"]), textarea, select, [contenteditable=\"true\"]")) return;
|
|
566
|
+
let r = D.rowMenu(e);
|
|
567
|
+
if (r.length === 0) return;
|
|
568
|
+
t.preventDefault();
|
|
569
|
+
let i = t.clientX === 0 && t.clientY === 0;
|
|
570
|
+
Y.value = {
|
|
571
|
+
row: e,
|
|
572
|
+
entries: r,
|
|
573
|
+
anchor: i && n instanceof HTMLElement ? n : {
|
|
574
|
+
x: t.clientX,
|
|
575
|
+
y: t.clientY
|
|
576
|
+
}
|
|
577
|
+
}, Q.value = !1, X.value = !0;
|
|
578
|
+
}
|
|
579
|
+
function Rn(e, t) {
|
|
580
|
+
let n = t.currentTarget;
|
|
581
|
+
k["row-preview"] !== void 0 && !kt.value && n instanceof HTMLElement && (Z.value?.element !== n || Z.value.row !== e) && (Z.value = {
|
|
582
|
+
row: e,
|
|
583
|
+
element: n,
|
|
584
|
+
contentInset: zn(n)
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
function zn(e) {
|
|
588
|
+
let t = e.querySelector("td");
|
|
589
|
+
return t && Number.parseFloat(getComputedStyle(t).paddingInlineStart) || 0;
|
|
590
|
+
}
|
|
591
|
+
function Bn() {
|
|
592
|
+
_n = !0;
|
|
593
|
+
}
|
|
594
|
+
function Vn(e, t) {
|
|
595
|
+
let n = !_n;
|
|
596
|
+
_n = !1, Rn(e, t), n && Z.value?.row === e && !X.value && (Q.value = !0);
|
|
597
|
+
}
|
|
598
|
+
function Hn() {
|
|
599
|
+
Q.value &&= !1;
|
|
600
|
+
}
|
|
601
|
+
function Un(e, t) {
|
|
602
|
+
Hn(), jt(e, t);
|
|
603
|
+
}
|
|
604
|
+
return (o, s) => (b(), m("div", { class: v(H.value.root({ class: [_.ui?.root, D.class] })) }, [
|
|
605
|
+
h("div", {
|
|
606
|
+
ref_key: "scrollerElement",
|
|
607
|
+
ref: B,
|
|
608
|
+
class: v(H.value.scroller({ class: _.ui?.scroller })),
|
|
609
|
+
style: y(_.maxHeight ? { maxHeight: _.maxHeight } : void 0),
|
|
610
|
+
onScrollPassive: Hn
|
|
611
|
+
}, [
|
|
612
|
+
h("table", {
|
|
613
|
+
ref_key: "tableElement",
|
|
614
|
+
ref: z,
|
|
615
|
+
class: v(H.value.table({ class: _.ui?.table })),
|
|
616
|
+
"aria-busy": _.loading || void 0,
|
|
617
|
+
"aria-rowcount": V.value ? T(Pt).length + 1 : void 0
|
|
618
|
+
}, [
|
|
619
|
+
_.caption || k.caption ? (b(), m("caption", {
|
|
620
|
+
key: 0,
|
|
621
|
+
class: v(H.value.caption({ class: _.ui?.caption }))
|
|
622
|
+
}, [S(o.$slots, "caption", {}, () => [g(w(_.caption), 1)])], 2)) : p("", !0),
|
|
623
|
+
h("thead", { class: v(H.value.header({ class: _.ui?.header })) }, [h("tr", null, [(b(!0), m(u, null, x(G.value, (e) => (b(), m("th", {
|
|
624
|
+
key: e.key,
|
|
625
|
+
scope: "col",
|
|
626
|
+
style: y([e.column?.width ? { width: e.column.width } : void 0, T(W)[e.key]]),
|
|
627
|
+
"aria-sort": e.column && J(e.column)?.priority === 1 ? J(e.column)?.direction : void 0,
|
|
628
|
+
class: v(e.headerCellClass)
|
|
629
|
+
}, [e.key === pt ? (b(), m("span", Ve, w(_.detailsColumnLabel), 1)) : e.key === P ? (b(), m("span", He, w(_.lineNumberColumnLabel), 1)) : e.key === mt ? (b(), m("span", Ue, w(_.reorderColumnLabel), 1)) : e.key === N ? (b(), f(T(n), {
|
|
630
|
+
key: 3,
|
|
631
|
+
label: _.selectAllLabel,
|
|
632
|
+
"model-value": T(Bt) === "all",
|
|
633
|
+
indeterminate: T(Bt) === "some",
|
|
634
|
+
"hide-label": "",
|
|
635
|
+
"onUpdate:modelValue": T(Wt)
|
|
636
|
+
}, null, 8, [
|
|
637
|
+
"label",
|
|
638
|
+
"model-value",
|
|
639
|
+
"indeterminate",
|
|
640
|
+
"onUpdate:modelValue"
|
|
641
|
+
])) : e.column ? k[`${e.key}-header`] ? S(o.$slots, `${e.key}-header`, {
|
|
642
|
+
column: e.column,
|
|
643
|
+
sortDirection: J(e.column)?.direction,
|
|
644
|
+
sortPriority: J(e.column)?.priority
|
|
645
|
+
}, void 0, void 0, 5) : e.column.hideLabel ? (b(), m("span", We, w(e.column.label), 1)) : e.column.sortable ? (b(), f(T(a), {
|
|
646
|
+
key: 7,
|
|
647
|
+
content: e.column.hint
|
|
648
|
+
}, {
|
|
649
|
+
default: Ae(() => [h("button", {
|
|
650
|
+
type: "button",
|
|
651
|
+
class: v(H.value.sortButton({
|
|
652
|
+
align: e.cellVariants.align,
|
|
653
|
+
class: _.ui?.sortButton
|
|
654
|
+
})),
|
|
655
|
+
onClick: (t) => gn(e.column, t)
|
|
656
|
+
}, [
|
|
657
|
+
g(w(e.column.label) + " ", 1),
|
|
658
|
+
(b(), f(Te(hn(J(e.column)?.direction)), { class: v(H.value.sortIcon({
|
|
659
|
+
isSorted: J(e.column) !== void 0,
|
|
660
|
+
class: _.ui?.sortIcon
|
|
661
|
+
})) }, null, 8, ["class"])),
|
|
662
|
+
A.value.length > 1 && J(e.column) ? (b(), m("span", {
|
|
663
|
+
key: 0,
|
|
664
|
+
"aria-hidden": "true",
|
|
665
|
+
class: v(H.value.sortPriority({ class: _.ui?.sortPriority }))
|
|
666
|
+
}, w(J(e.column)?.priority), 3)) : p("", !0)
|
|
667
|
+
], 10, Ge)]),
|
|
668
|
+
_: 2
|
|
669
|
+
}, 1032, ["content"])) : e.column.hint ? (b(), f(T(a), {
|
|
670
|
+
key: 8,
|
|
671
|
+
label: e.column.label,
|
|
672
|
+
content: e.column.hint,
|
|
673
|
+
side: "bottom",
|
|
674
|
+
align: e.cellVariants.align
|
|
675
|
+
}, null, 8, [
|
|
676
|
+
"label",
|
|
677
|
+
"content",
|
|
678
|
+
"align"
|
|
679
|
+
])) : (b(), m(u, { key: 9 }, [g(w(e.column.label), 1)], 64)) : (b(), m(u, { key: 4 }, [], 64))], 14, Be))), 128))])], 2),
|
|
680
|
+
cn.value ? (b(), m("tbody", Ke, [(b(!0), m(u, null, x(_.loadingRowCount, (e) => (b(), m("tr", { key: e }, [(b(!0), m(u, null, x(G.value, (t, n) => (b(), m("td", {
|
|
681
|
+
key: t.key,
|
|
682
|
+
class: v(t.skeletonCellClass)
|
|
683
|
+
}, [h("span", { class: v(t.skeletonContentClass) }, [t.key === N ? (b(), m("span", {
|
|
684
|
+
key: 0,
|
|
685
|
+
class: v(H.value.skeletonCheckbox({ class: _.ui?.skeletonCheckbox }))
|
|
686
|
+
}, null, 2)) : t.column ? (b(), m("span", {
|
|
687
|
+
key: 2,
|
|
688
|
+
class: v(H.value.skeletonBar({ class: [mn(e + n), _.ui?.skeletonBar] }))
|
|
689
|
+
}, null, 2)) : (b(), m(u, { key: 1 }, [], 64))], 2)], 2))), 128))]))), 128))])) : T(_t).length === 0 ? (b(), m("tbody", qe, [h("tr", null, [h("td", {
|
|
690
|
+
colspan: G.value.length,
|
|
691
|
+
class: v(Zt.value)
|
|
692
|
+
}, [S(o.$slots, "empty", {}, () => [g(w(_.emptyText), 1)])], 10, Je)])])) : (b(!0), m(u, { key: 3 }, x(T(Nt), (e) => (b(), m("tbody", {
|
|
693
|
+
key: e.sectionKey,
|
|
694
|
+
class: v(H.value.body({ class: _.ui?.body }))
|
|
695
|
+
}, [
|
|
696
|
+
e.group ? (b(), m("tr", Ye, [h("th", {
|
|
697
|
+
scope: "rowgroup",
|
|
698
|
+
colspan: $t.value,
|
|
699
|
+
style: y(T(W)[G.value[0]?.key ?? ""]),
|
|
700
|
+
class: v(tn.value)
|
|
701
|
+
}, [h("span", { class: v(H.value.groupHeader({ class: _.ui?.groupHeader })) }, [
|
|
702
|
+
xe(T(t), {
|
|
703
|
+
label: _.toggleGroupLabel(e.group.label, e.group.isCollapsed),
|
|
704
|
+
"leading-icon": e.group.isCollapsed ? T(Ie) : T(Fe),
|
|
705
|
+
"aria-expanded": !e.group.isCollapsed,
|
|
706
|
+
ui: { leadingIcon: jn(e.group.isCollapsed) },
|
|
707
|
+
variant: "ghost",
|
|
708
|
+
color: "gray",
|
|
709
|
+
size: "3xs",
|
|
710
|
+
square: "",
|
|
711
|
+
onClick: (t) => kn(e.group.groupKey)
|
|
712
|
+
}, null, 8, [
|
|
713
|
+
"label",
|
|
714
|
+
"leading-icon",
|
|
715
|
+
"aria-expanded",
|
|
716
|
+
"ui",
|
|
717
|
+
"onClick"
|
|
718
|
+
]),
|
|
719
|
+
g(" " + w(e.group.label) + " ", 1),
|
|
720
|
+
h("span", { class: v(H.value.groupCount({ class: _.ui?.groupCount })) }, w(e.group.rows.length), 3)
|
|
721
|
+
], 2)], 14, Xe), (b(!0), m(u, null, x(en.value, (t, n) => (b(), m("td", {
|
|
722
|
+
key: t.key,
|
|
723
|
+
style: y(T(W)[t.key]),
|
|
724
|
+
class: v(nn.value[n])
|
|
725
|
+
}, [h("bdi", null, w(An(e.group.rows, t.column)), 1)], 6))), 128))])) : p("", !0),
|
|
726
|
+
(b(!0), m(u, null, x(V.value ? T(It) : [], (e, t) => (b(), m("tr", {
|
|
727
|
+
key: `top-spacer-${t}`,
|
|
728
|
+
"aria-hidden": "true"
|
|
729
|
+
}, [h("td", {
|
|
730
|
+
colspan: G.value.length,
|
|
731
|
+
class: v(an.value),
|
|
732
|
+
style: y({ height: `${e}px` })
|
|
733
|
+
}, null, 14, Ze)]))), 128)),
|
|
734
|
+
(b(!0), m(u, null, x(Rt(e), (e) => (b(), m(u, { key: e.itemKey }, [e.kind === "row" ? (b(), m("tr", {
|
|
735
|
+
key: 0,
|
|
736
|
+
"data-row-key": String(K(e.row)),
|
|
737
|
+
"aria-rowindex": V.value ? e.rowIndex + 2 : void 0,
|
|
738
|
+
style: y(pn.value),
|
|
739
|
+
class: v(xn(e.row)),
|
|
740
|
+
onClick: (t) => Pn(e.row, t),
|
|
741
|
+
onDblclick: (t) => Fn(e.row, t),
|
|
742
|
+
onContextmenu: (t) => Ln(e.row, t),
|
|
743
|
+
onPointerenter: (t) => Rn(e.row, t),
|
|
744
|
+
onPointerdown: Bn,
|
|
745
|
+
onFocusin: (t) => Vn(e.row, t)
|
|
746
|
+
}, [(b(!0), m(u, null, x(G.value, (r) => (b(), m(u, { key: r.key }, [Sn(r, e) > 0 ? (b(), m("td", {
|
|
747
|
+
key: 0,
|
|
748
|
+
rowspan: Sn(r, e) > 1 ? Sn(r, e) : void 0,
|
|
749
|
+
"data-label": Yt.value && r.column ? r.column.label : void 0,
|
|
750
|
+
style: y(T(W)[r.key]),
|
|
751
|
+
class: v(Cn(r, e)),
|
|
752
|
+
onClick: (t) => In(e.row, r.column, t)
|
|
753
|
+
}, [r.key === mt ? (b(), f(T(t), {
|
|
754
|
+
key: 0,
|
|
755
|
+
label: _.reorderRowLabel(q(e.row)),
|
|
756
|
+
"leading-icon": T(Le),
|
|
757
|
+
selected: yn(e.row),
|
|
758
|
+
disabled: !Tt.value,
|
|
759
|
+
"aria-describedby": on,
|
|
760
|
+
class: v(H.value.reorderHandle({ class: _.ui?.reorderHandle })),
|
|
761
|
+
"data-reorder-handle": "",
|
|
762
|
+
variant: "ghost",
|
|
763
|
+
color: "gray",
|
|
764
|
+
size: "3xs",
|
|
765
|
+
square: "",
|
|
766
|
+
onPointerdown: (t) => Un(e.row, t),
|
|
767
|
+
onKeydown: (t) => T(Mt)(e.row, t)
|
|
768
|
+
}, null, 8, [
|
|
769
|
+
"label",
|
|
770
|
+
"leading-icon",
|
|
771
|
+
"selected",
|
|
772
|
+
"disabled",
|
|
773
|
+
"class",
|
|
774
|
+
"onPointerdown",
|
|
775
|
+
"onKeydown"
|
|
776
|
+
])) : r.key === N ? (b(), f(T(n), {
|
|
777
|
+
key: 1,
|
|
778
|
+
label: _.selectRowLabel(q(e.row)),
|
|
779
|
+
"model-value": T(Vt)(e.row),
|
|
780
|
+
disabled: !T(Ht)(e.row),
|
|
781
|
+
"hide-label": "",
|
|
782
|
+
"onUpdate:modelValue": (t) => T(Ut)(e.row, t)
|
|
783
|
+
}, null, 8, [
|
|
784
|
+
"label",
|
|
785
|
+
"model-value",
|
|
786
|
+
"disabled",
|
|
787
|
+
"onUpdate:modelValue"
|
|
788
|
+
])) : r.key === pt ? (b(), f(T(t), {
|
|
789
|
+
key: 2,
|
|
790
|
+
label: _.toggleRowDetailsLabel(q(e.row), $(e.row)),
|
|
791
|
+
"leading-icon": $(e.row) ? T(Fe) : T(Ie),
|
|
792
|
+
"aria-expanded": $(e.row),
|
|
793
|
+
"aria-controls": $(e.row) ? Tn(e.row) : void 0,
|
|
794
|
+
ui: { leadingIcon: jn(!$(e.row)) },
|
|
795
|
+
variant: "ghost",
|
|
796
|
+
color: "gray",
|
|
797
|
+
size: "3xs",
|
|
798
|
+
square: "",
|
|
799
|
+
onClick: (t) => Dn(e.row)
|
|
800
|
+
}, null, 8, [
|
|
801
|
+
"label",
|
|
802
|
+
"leading-icon",
|
|
803
|
+
"aria-expanded",
|
|
804
|
+
"aria-controls",
|
|
805
|
+
"ui",
|
|
806
|
+
"onClick"
|
|
807
|
+
])) : r.key === P ? (b(), m("span", {
|
|
808
|
+
key: 3,
|
|
809
|
+
class: v(H.value.lineNumber({ class: _.ui?.lineNumber }))
|
|
810
|
+
}, w(ln.value + e.rowIndex + 1), 3)) : r.column && wn(r) ? (b(), m("span", {
|
|
811
|
+
key: 4,
|
|
812
|
+
class: v(H.value.treeCell({ class: _.ui?.treeCell })),
|
|
813
|
+
style: y({ paddingInlineStart: `${e.displayRow.depth * 1.5}rem` })
|
|
814
|
+
}, [e.displayRow.hasChildren ? (b(), f(T(t), {
|
|
815
|
+
key: 0,
|
|
816
|
+
label: _.toggleRowChildrenLabel(q(e.row), e.displayRow.isExpanded),
|
|
817
|
+
"leading-icon": e.displayRow.isExpanded ? T(Fe) : T(Ie),
|
|
818
|
+
"aria-expanded": e.displayRow.isExpanded,
|
|
819
|
+
ui: { leadingIcon: jn(!e.displayRow.isExpanded) },
|
|
820
|
+
variant: "ghost",
|
|
821
|
+
color: "gray",
|
|
822
|
+
size: "3xs",
|
|
823
|
+
square: "",
|
|
824
|
+
onClick: (t) => On(e.displayRow)
|
|
825
|
+
}, null, 8, [
|
|
826
|
+
"label",
|
|
827
|
+
"leading-icon",
|
|
828
|
+
"aria-expanded",
|
|
829
|
+
"ui",
|
|
830
|
+
"onClick"
|
|
831
|
+
])) : (b(), m("span", {
|
|
832
|
+
key: 1,
|
|
833
|
+
class: v(H.value.treeSpacer({ class: _.ui?.treeSpacer }))
|
|
834
|
+
}, null, 2)), xe(Mn, {
|
|
835
|
+
"section-item": e,
|
|
836
|
+
column: r.column
|
|
837
|
+
}, null, 8, ["section-item", "column"])], 6)) : r.column ? (b(), f(Mn, {
|
|
838
|
+
key: 5,
|
|
839
|
+
"section-item": e,
|
|
840
|
+
column: r.column
|
|
841
|
+
}, null, 8, ["section-item", "column"])) : p("", !0)], 14, $e)) : p("", !0)], 64))), 128))], 46, Qe)) : (b(), m("tr", {
|
|
842
|
+
key: 1,
|
|
843
|
+
id: Tn(e.row)
|
|
844
|
+
}, [h("td", {
|
|
845
|
+
colspan: G.value.length,
|
|
846
|
+
class: v(sn.value)
|
|
847
|
+
}, [S(o.$slots, "expanded", { row: e.row })], 10, tt)], 8, et))], 64))), 128)),
|
|
848
|
+
V.value && T(Lt) > 0 ? (b(), m("tr", nt, [h("td", {
|
|
849
|
+
colspan: G.value.length,
|
|
850
|
+
class: v(an.value),
|
|
851
|
+
style: y({ height: `${T(Lt)}px` })
|
|
852
|
+
}, null, 14, rt)])) : p("", !0)
|
|
853
|
+
], 2))), 128)),
|
|
854
|
+
_.loadingMore && T(_t).length > 0 ? (b(), m("tbody", {
|
|
855
|
+
key: 4,
|
|
856
|
+
class: v(H.value.body({ class: _.ui?.body }))
|
|
857
|
+
}, [h("tr", null, [h("td", {
|
|
858
|
+
colspan: G.value.length,
|
|
859
|
+
class: v(rn.value)
|
|
860
|
+
}, [h("div", {
|
|
861
|
+
role: "status",
|
|
862
|
+
class: v(H.value.loadingMore({ class: _.ui?.loadingMore }))
|
|
863
|
+
}, [xe(T(r), { "aria-hidden": "true" }), g(" " + w(_.loadingMoreLabel), 1)], 2)], 10, it)])], 2)) : p("", !0),
|
|
864
|
+
un.value ? (b(), m("tfoot", {
|
|
865
|
+
key: 5,
|
|
866
|
+
class: v(H.value.footer({ class: _.ui?.footer }))
|
|
867
|
+
}, [h("tr", { class: v(H.value.footerRow({ class: _.ui?.footerRow })) }, [(b(!0), m(u, null, x(G.value, (e) => (b(), m("td", {
|
|
868
|
+
key: e.key,
|
|
869
|
+
"data-label": Yt.value && fn(e.column) ? e.column?.label : void 0,
|
|
870
|
+
style: y(T(W)[e.key]),
|
|
871
|
+
class: v(e.footerCellClass)
|
|
872
|
+
}, [e.column ? (b(), m(u, { key: 0 }, [k[`${e.key}-footer`] ? S(o.$slots, `${e.key}-footer`, {
|
|
873
|
+
column: e.column,
|
|
874
|
+
rows: T(gt),
|
|
875
|
+
value: dn.value[e.key]?.value,
|
|
876
|
+
formattedValue: dn.value[e.key]?.formattedValue ?? ""
|
|
877
|
+
}, void 0, void 0, 0) : dn.value[e.key] ? (b(), m("bdi", ot, w(dn.value[e.key]?.formattedValue), 1)) : p("", !0)], 64)) : p("", !0)], 14, at))), 128))], 2)], 2)) : p("", !0)
|
|
878
|
+
], 10, ze),
|
|
879
|
+
h("div", {
|
|
880
|
+
ref_key: "loadMoreSentinel",
|
|
881
|
+
ref: zt,
|
|
882
|
+
"aria-hidden": "true"
|
|
883
|
+
}, null, 512),
|
|
884
|
+
_.loading && !cn.value ? (b(), m("div", {
|
|
885
|
+
key: 0,
|
|
886
|
+
class: v(H.value.loadingOverlay({ class: _.ui?.loadingOverlay }))
|
|
887
|
+
}, [xe(T(r), {
|
|
888
|
+
label: _.loadingLabel,
|
|
889
|
+
class: v(H.value.loadingIndicator({ class: _.ui?.loadingIndicator }))
|
|
890
|
+
}, null, 8, ["label", "class"])], 2)) : p("", !0)
|
|
891
|
+
], 38),
|
|
892
|
+
_.reorderable ? (b(), m(u, { key: 0 }, [h("span", {
|
|
893
|
+
id: on,
|
|
894
|
+
class: "sr-only"
|
|
895
|
+
}, w(_.reorderHint), 1), h("div", st, w(Et.value), 1)], 64)) : p("", !0),
|
|
896
|
+
Y.value ? (b(), f(T(e), {
|
|
897
|
+
key: 1,
|
|
898
|
+
open: X.value,
|
|
899
|
+
"onUpdate:open": s[0] ||= (e) => X.value = e,
|
|
900
|
+
label: _.rowMenuLabel(q(Y.value.row)),
|
|
901
|
+
items: Y.value.entries,
|
|
902
|
+
anchor: Y.value.anchor,
|
|
903
|
+
width: "sm"
|
|
904
|
+
}, null, 8, [
|
|
905
|
+
"open",
|
|
906
|
+
"label",
|
|
907
|
+
"items",
|
|
908
|
+
"anchor"
|
|
909
|
+
])) : p("", !0),
|
|
910
|
+
k["row-preview"] && Z.value ? (b(), f(T(i), {
|
|
911
|
+
key: 2,
|
|
912
|
+
open: Q.value,
|
|
913
|
+
"onUpdate:open": s[1] ||= (e) => Q.value = e,
|
|
914
|
+
anchor: Z.value.element,
|
|
915
|
+
label: _.rowPreviewLabel(q(Z.value.row)),
|
|
916
|
+
"min-width": 260,
|
|
917
|
+
"align-offset": Z.value.contentInset + -5,
|
|
918
|
+
side: "bottom",
|
|
919
|
+
align: "start",
|
|
920
|
+
"show-on-hover": ""
|
|
921
|
+
}, {
|
|
922
|
+
content: Ae(() => [S(o.$slots, "row-preview", { row: Z.value.row })]),
|
|
923
|
+
_: 3
|
|
924
|
+
}, 8, [
|
|
925
|
+
"open",
|
|
926
|
+
"anchor",
|
|
927
|
+
"label",
|
|
928
|
+
"align-offset"
|
|
929
|
+
])) : p("", !0)
|
|
930
|
+
], 2));
|
|
931
|
+
}
|
|
932
|
+
});
|
|
933
|
+
export { D as default };
|