@wirecore/wirelayer-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/{Button-DZ_ZGl7X.js → Button-BpMOPs8b.js} +7 -8
- package/dist/{Checkbox-D9f77jtl.js → Checkbox-D175nhKK.js} +26 -22
- package/dist/ContextMenu-BEOEyUa6.js +2235 -0
- package/dist/{Field-BdIPugFP.js → Field-B1EsNF84.js} +20 -17
- package/dist/{Highlight-DvGcm2QR.js → Highlight-uwptdaUw.js} +35 -32
- package/dist/{Input-C59NJK4m.js → Input-Cn5q0yVE.js} +50 -36
- package/dist/{InputStatus-CUyF9-GR.js → InputStatus-D7kBGlew.js} +4 -1
- package/dist/{Select-BlEjQWBP.js → Select-Bd2Vpr7G.js} +175 -164
- package/dist/Slider-Cpv7Vj3B.js +143 -0
- package/dist/{Tree-B39xwNbU.js → Tree-fd9LXqgZ.js} +184 -181
- package/dist/chart/Chart.vue.d.ts +10 -4
- package/dist/chart/Chart.vue.d.ts.map +1 -1
- package/dist/chart/index.d.ts +2 -0
- package/dist/chart/index.d.ts.map +1 -1
- package/dist/chart.js +30 -24
- package/dist/code.js +1 -1
- package/dist/components/AngleSlider/AngleSlider.vue.d.ts +2 -0
- package/dist/components/AngleSlider/AngleSlider.vue.d.ts.map +1 -1
- package/dist/components/Autocomplete/Autocomplete.vue.d.ts +2 -0
- package/dist/components/Autocomplete/Autocomplete.vue.d.ts.map +1 -1
- package/dist/components/Badge/Badge.vue.d.ts +2 -0
- package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
- package/dist/components/Button/Button.vue.d.ts +5 -0
- package/dist/components/Button/Button.vue.d.ts.map +1 -1
- package/dist/components/Carousel/Carousel.vue.d.ts +2 -0
- package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
- package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts +2 -0
- package/dist/components/CascadeSelect/CascadeSelect.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.vue.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/ChipGroup/ChipGroup.vue.d.ts +1 -1
- package/dist/components/ChipGroup/ChipGroup.vue.d.ts.map +1 -1
- package/dist/components/ColorInput/ColorInput.vue.d.ts.map +1 -1
- package/dist/components/ColorPicker/ColorPicker.vue.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.vue.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.vue.d.ts +8 -1
- package/dist/components/Combobox/Combobox.vue.d.ts.map +1 -1
- package/dist/components/Confirm/ConfirmDialog.vue.d.ts +5 -0
- package/dist/components/Confirm/ConfirmDialog.vue.d.ts.map +1 -1
- package/dist/components/Confirm/confirm.d.ts +7 -0
- package/dist/components/Confirm/confirm.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.vue.d.ts +4 -0
- package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePickerBase.vue.d.ts +4 -0
- package/dist/components/DatePicker/DatePickerBase.vue.d.ts.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.vue.d.ts +4 -0
- package/dist/components/DateRangePicker/DateRangePicker.vue.d.ts.map +1 -1
- package/dist/components/Dialog/DialogContent.vue.d.ts +12 -6
- package/dist/components/Dialog/DialogContent.vue.d.ts.map +1 -1
- package/dist/components/Drawer/DrawerContent.vue.d.ts +7 -5
- package/dist/components/Drawer/DrawerContent.vue.d.ts.map +1 -1
- package/dist/components/DurationInput/DurationInput.vue.d.ts +2 -0
- package/dist/components/DurationInput/DurationInput.vue.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.vue.d.ts +5 -5
- package/dist/components/EmptyState/EmptyState.vue.d.ts.map +1 -1
- package/dist/components/Field/Field.vue.d.ts +12 -2
- package/dist/components/Field/Field.vue.d.ts.map +1 -1
- package/dist/components/Field/context.d.ts +3 -1
- package/dist/components/Field/context.d.ts.map +1 -1
- package/dist/components/FileUpload/FileUpload.vue.d.ts +11 -0
- package/dist/components/FileUpload/FileUpload.vue.d.ts.map +1 -1
- package/dist/components/IconButton/IconButton.vue.d.ts +4 -0
- package/dist/components/IconButton/IconButton.vue.d.ts.map +1 -1
- package/dist/components/Knob/Knob.vue.d.ts +2 -0
- package/dist/components/Knob/Knob.vue.d.ts.map +1 -1
- package/dist/components/Listbox/Listbox.vue.d.ts +2 -0
- package/dist/components/Listbox/Listbox.vue.d.ts.map +1 -1
- package/dist/components/LocaleProvider/LocaleProvider.vue.d.ts +1 -0
- package/dist/components/LocaleProvider/LocaleProvider.vue.d.ts.map +1 -1
- package/dist/components/MonthPicker/MonthPicker.vue.d.ts +4 -0
- package/dist/components/MonthPicker/MonthPicker.vue.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts +8 -1
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts.map +1 -1
- package/dist/components/NumberInput/NumberInput.vue.d.ts +2 -0
- package/dist/components/NumberInput/NumberInput.vue.d.ts.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.vue.d.ts +2 -0
- package/dist/components/PasswordInput/PasswordInput.vue.d.ts.map +1 -1
- package/dist/components/PinInput/PinInput.vue.d.ts +2 -0
- package/dist/components/PinInput/PinInput.vue.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.vue.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
- package/dist/components/Rating/Rating.vue.d.ts +2 -0
- package/dist/components/Rating/Rating.vue.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +2 -2
- package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
- package/dist/components/Select/Select.vue.d.ts +8 -1
- package/dist/components/Select/Select.vue.d.ts.map +1 -1
- package/dist/components/Select/types.d.ts +2 -0
- package/dist/components/Select/types.d.ts.map +1 -1
- package/dist/components/SelectionCard/CheckboxCard.vue.d.ts +2 -0
- package/dist/components/SelectionCard/CheckboxCard.vue.d.ts.map +1 -1
- package/dist/components/Slider/Slider.vue.d.ts +2 -0
- package/dist/components/Slider/Slider.vue.d.ts.map +1 -1
- package/dist/components/Switch/Switch.vue.d.ts +2 -0
- package/dist/components/Switch/Switch.vue.d.ts.map +1 -1
- package/dist/components/TagsInput/TagsInput.vue.d.ts +2 -0
- package/dist/components/TagsInput/TagsInput.vue.d.ts.map +1 -1
- package/dist/components/TimePicker/TimePicker.vue.d.ts +2 -0
- package/dist/components/TimePicker/TimePicker.vue.d.ts.map +1 -1
- package/dist/components/TimeRangePicker/TimeRangePicker.vue.d.ts +2 -0
- package/dist/components/TimeRangePicker/TimeRangePicker.vue.d.ts.map +1 -1
- package/dist/components/Toast/Toaster.vue.d.ts +12 -2
- package/dist/components/Toast/Toaster.vue.d.ts.map +1 -1
- package/dist/components/ToggleButton/ToggleButton.vue.d.ts +9 -2
- package/dist/components/ToggleButton/ToggleButton.vue.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.vue.d.ts +3 -0
- package/dist/components/Tooltip/Tooltip.vue.d.ts.map +1 -1
- package/dist/components/TreeSelect/TreeSelect.vue.d.ts +2 -0
- package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
- package/dist/components/YearPicker/YearPicker.vue.d.ts +4 -0
- package/dist/components/YearPicker/YearPicker.vue.d.ts.map +1 -1
- package/dist/data-table/DataTable.vue.d.ts +36 -2
- package/dist/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/data-table/FilterMenu.vue.d.ts +10 -0
- package/dist/data-table/FilterMenu.vue.d.ts.map +1 -1
- package/dist/data-table/ValueInput.vue.d.ts +19 -1
- package/dist/data-table/ValueInput.vue.d.ts.map +1 -1
- package/dist/data-table/index.d.ts +1 -1
- package/dist/data-table/index.d.ts.map +1 -1
- package/dist/data-table/types.d.ts +23 -1
- package/dist/data-table/types.d.ts.map +1 -1
- package/dist/data-table.js +1475 -1341
- package/dist/editor.js +2 -2
- package/dist/form/FormField.vue.d.ts +13 -5
- package/dist/form/FormField.vue.d.ts.map +1 -1
- package/dist/form.js +128 -109
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6470 -6251
- package/dist/label-for-eQvYjsM5.js +8 -0
- package/dist/pdf.js +4 -4
- package/dist/sources/ActionBar.css +1 -0
- package/dist/sources/AppShell.css +1 -0
- package/dist/sources/ChatPrompt.css +1 -0
- package/dist/sources/Gallery.css +1 -0
- package/dist/sources/IconButton.css +1 -0
- package/dist/sources/Image.css +1 -0
- package/dist/sources/ImageCropper.css +1 -0
- package/dist/sources/InlineEdit.css +1 -0
- package/dist/sources/Marquee.css +1 -0
- package/dist/sources/MegaMenu.css +1 -0
- package/dist/sources/Menubar.css +1 -0
- package/dist/sources/OrderList.css +1 -0
- package/dist/sources/PickList.css +1 -0
- package/dist/sources/ScrollTop.css +1 -0
- package/dist/{useTree-Dt7NO7cp.js → useTree-UhG1TMeM.js} +2 -2
- package/dist/utils/label-for.d.ts +3 -0
- package/dist/utils/label-for.d.ts.map +1 -0
- package/dist/utils/list.d.ts +5 -0
- package/dist/utils/list.d.ts.map +1 -1
- package/dist/virtual/VirtualSelect.vue.d.ts +2 -0
- package/dist/virtual/VirtualSelect.vue.d.ts.map +1 -1
- package/dist/virtual.js +207 -197
- package/fonts.css +2 -0
- package/llms-full.txt +699 -373
- package/llms.txt +4 -1
- package/package.json +7 -3
- package/theme.css +14 -0
- package/dist/ContextMenu-R23YbbaS.js +0 -2188
- package/dist/Slider-CyoZc5A8.js +0 -135
package/dist/data-table.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { a as e, i as t, n } from "./recipes-BlM9aKyt.js";
|
|
2
|
-
import { _ as r, g as i, i as a, n as o, r as s, t as c, v as l, y as u } from "./ContextMenu-
|
|
3
|
-
import { t as d } from "./Button-
|
|
4
|
-
import { t as ee } from "./Checkbox-
|
|
5
|
-
import { n as f, t as p } from "./Input-
|
|
6
|
-
import { i as te, t as ne } from "./Select-
|
|
7
|
-
import { t as re } from "./Highlight-
|
|
2
|
+
import { _ as r, g as i, i as a, n as o, r as s, t as c, v as l, y as u } from "./ContextMenu-BEOEyUa6.js";
|
|
3
|
+
import { t as d } from "./Button-BpMOPs8b.js";
|
|
4
|
+
import { t as ee } from "./Checkbox-D175nhKK.js";
|
|
5
|
+
import { n as f, t as p } from "./Input-Cn5q0yVE.js";
|
|
6
|
+
import { i as te, t as ne } from "./Select-Bd2Vpr7G.js";
|
|
7
|
+
import { t as re } from "./Highlight-uwptdaUw.js";
|
|
8
8
|
import { t as ie } from "./CopyButton-GmqpUNLf.js";
|
|
9
|
-
import { Fragment as m, Teleport as ae, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createSlots as oe, createTextVNode as b, createVNode as x, defineComponent as S, h as se, inject as
|
|
10
|
-
import { ArrowDown as
|
|
11
|
-
import { EditHistory as
|
|
9
|
+
import { Fragment as m, Teleport as ae, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createSlots as oe, createTextVNode as b, createVNode as x, defineComponent as S, guardReactiveProps as C, h as se, inject as ce, mergeProps as w, nextTick as T, normalizeClass as E, normalizeProps as le, normalizeStyle as D, onBeforeUnmount as ue, onMounted as de, onUpdated as fe, openBlock as O, provide as pe, ref as k, renderList as A, renderSlot as j, resolveDynamicComponent as me, shallowRef as he, toDisplayString as M, unref as N, useAttrs as ge, useId as _e, useSlots as ve, useTemplateRef as ye, watch as be, withCtx as P, withModifiers as F } from "vue";
|
|
10
|
+
import { ArrowDown as xe, ArrowUp as Se, ArrowUpDown as Ce, Check as we, ChevronDown as Te, ChevronRight as Ee, ChevronUp as De, ChevronsDownUp as Oe, ChevronsUpDown as ke, Columns3 as Ae, Download as je, EllipsisVertical as Me, Filter as Ne, FilterX as Pe, GripVertical as Fe, ListFilter as Ie, Maximize2 as Le, Minimize2 as Re, Pencil as ze, Plus as Be, Redo2 as Ve, Rows3 as He, Search as Ue, TextSearch as We, Trash2 as I, Undo2 as Ge, X as Ke } from "@lucide/vue";
|
|
11
|
+
import { EditHistory as qe, aggregateValues as Je, applyPending as Ye, autoRowSpans as Xe, changesByRow as Ze, clearTableState as Qe, collectErrors as $e, conditionFieldsFromColumns as et, createDataController as tt, createDataController as nt, createXlsx as rt, csvSeparator as it, dataAnnouncement as at, dataSourceToRows as L, dataTable as ot, dataTableMatchModes as st, defineMatchMode as ct, downloadBytes as lt, downloadText as ut, emptyConditionGroup as dt, emptyFilterRule as ft, extendRange as pt, findMatches as mt, fitColumnWidth as ht, gridFocusIn as gt, gridKeydown as _t, groupedRowMove as vt, historyKey as yt, idRange as bt, inlineArrowStep as xt, isActiveCondition as St, isActiveFilter as Ct, isRangeMatchMode as wt, listValueKey as Tt, loadTableState as Et, locateTreeNode as Dt, matchModeDefinition as Ot, matchModeLabel as kt, matchModesFor as At, matchesColumnFilter as jt, matchesCondition as Mt, matchesRowKeywords as Nt, matchesSearch as Pt, menu as Ft, moveColumnBlock as It, moveItem as Lt, moveTreeRow as Rt, nextSorting as zt, numberSummary as Bt, omitTableState as Vt, paginatorAlignKey as Ht, parseCellText as Ut, parseTsv as Wt, pasteTargets as Gt, pendingValue as Kt, pivotTable as qt, pivotView as Jt, printHtml as Yt, printTableHtml as Xt, queryKey as Zt, rangeAround as Qt, rangeBounds as $t, rowColumnSpans as en, rowsToDataSource as tn, rowsToDataSource as nn, sameCellValue as rn, sameTableValue as an, saveTableState as on, syncGrid as sn, toCsv as cn, toFilterRule as ln, toTsv as un, treeDropMove as dn, treeGridKeyAction as fn, treeKeyboardMove as pn, warnInDevelopment as mn } from "@wirecore/wirelayer-recipes";
|
|
12
12
|
import { Menu as R } from "@ark-ui/vue/menu";
|
|
13
|
-
import { Popover as
|
|
14
|
-
import { columnFilteringFeature as
|
|
13
|
+
import { Popover as hn } from "@ark-ui/vue/popover";
|
|
14
|
+
import { columnFilteringFeature as z, columnGroupingFeature as gn, columnOrderingFeature as _n, columnPinningFeature as vn, columnResizingFeature as yn, columnSizingFeature as bn, columnVisibilityFeature as xn, createExpandedRowModel as Sn, createFilteredRowModel as Cn, createGroupedRowModel as wn, createPaginatedRowModel as Tn, createSortedRowModel as En, filterFn_equalsString as Dn, filterFn_includesString as On, globalFilteringFeature as kn, rowExpandingFeature as An, rowPaginationFeature as jn, rowPinningFeature as Mn, rowSelectionFeature as Nn, rowSortingFeature as Pn, sortFn_alphanumeric as Fn, tableFeatures as In, useTable as Ln } from "@tanstack/vue-table";
|
|
15
15
|
//#region src/data-table/features.ts
|
|
16
|
-
var
|
|
17
|
-
rowSortingFeature:
|
|
18
|
-
sortedRowModel:
|
|
19
|
-
sortFns: { alphanumeric:
|
|
20
|
-
rowPaginationFeature:
|
|
21
|
-
paginatedRowModel:
|
|
22
|
-
rowSelectionFeature:
|
|
23
|
-
rowPinningFeature:
|
|
24
|
-
rowExpandingFeature:
|
|
25
|
-
expandedRowModel:
|
|
26
|
-
columnGroupingFeature:
|
|
27
|
-
groupedRowModel:
|
|
28
|
-
columnFilteringFeature:
|
|
29
|
-
globalFilteringFeature:
|
|
30
|
-
filteredRowModel:
|
|
16
|
+
var Rn = In({
|
|
17
|
+
rowSortingFeature: Pn,
|
|
18
|
+
sortedRowModel: En(),
|
|
19
|
+
sortFns: { alphanumeric: Fn },
|
|
20
|
+
rowPaginationFeature: jn,
|
|
21
|
+
paginatedRowModel: Tn(),
|
|
22
|
+
rowSelectionFeature: Nn,
|
|
23
|
+
rowPinningFeature: Mn,
|
|
24
|
+
rowExpandingFeature: An,
|
|
25
|
+
expandedRowModel: Sn(),
|
|
26
|
+
columnGroupingFeature: gn,
|
|
27
|
+
groupedRowModel: wn(),
|
|
28
|
+
columnFilteringFeature: z,
|
|
29
|
+
globalFilteringFeature: kn,
|
|
30
|
+
filteredRowModel: Cn(),
|
|
31
31
|
filterFns: {
|
|
32
|
-
includesString:
|
|
33
|
-
equalsString:
|
|
32
|
+
includesString: On,
|
|
33
|
+
equalsString: Dn
|
|
34
34
|
},
|
|
35
|
-
columnVisibilityFeature:
|
|
36
|
-
columnOrderingFeature:
|
|
37
|
-
columnPinningFeature:
|
|
38
|
-
columnSizingFeature:
|
|
39
|
-
columnResizingFeature:
|
|
40
|
-
}),
|
|
35
|
+
columnVisibilityFeature: xn,
|
|
36
|
+
columnOrderingFeature: _n,
|
|
37
|
+
columnPinningFeature: vn,
|
|
38
|
+
columnSizingFeature: bn,
|
|
39
|
+
columnResizingFeature: yn
|
|
40
|
+
}), zn = Symbol("wirecore-data-table-features"), Bn = /* @__PURE__ */ S({
|
|
41
41
|
__name: "ValueInput",
|
|
42
42
|
props: {
|
|
43
43
|
type: {},
|
|
@@ -45,11 +45,12 @@ var Mn = An({
|
|
|
45
45
|
label: {},
|
|
46
46
|
options: {},
|
|
47
47
|
any: { type: Boolean },
|
|
48
|
-
invalid: { type: Boolean }
|
|
48
|
+
invalid: { type: Boolean },
|
|
49
|
+
inputProps: {}
|
|
49
50
|
},
|
|
50
51
|
emits: ["update:modelValue"],
|
|
51
52
|
setup(t, { emit: n }) {
|
|
52
|
-
let r = t, i = n, a = e().dataTable, o = e(), c =
|
|
53
|
+
let r = t, i = n, a = e().dataTable, o = e(), c = ce(zn, {}), u = h(() => (r.options ?? []).some((e) => typeof e != "string")), d = h(() => [...r.any ? [{
|
|
53
54
|
value: "",
|
|
54
55
|
label: a.filterAll
|
|
55
56
|
}] : [], ...r.type === "boolean" ? [{
|
|
@@ -62,18 +63,20 @@ var Mn = An({
|
|
|
62
63
|
value: e,
|
|
63
64
|
label: e
|
|
64
65
|
} : e)]), f = h(() => r.modelValue === null || r.modelValue === void 0 ? "" : String(r.modelValue)), te = (e) => e && Number.isFinite(Number(e)) ? Number(e) : null, re = h(() => u.value ? r.modelValue ?? (r.any ? "" : null) : f.value);
|
|
65
|
-
return (e, n) => t.type === "text" ? (
|
|
66
|
+
return (e, n) => t.type === "text" ? (O(), g(p, {
|
|
66
67
|
key: 0,
|
|
67
68
|
size: "sm",
|
|
68
69
|
"aria-label": t.label,
|
|
69
70
|
invalid: t.invalid,
|
|
71
|
+
placeholder: t.inputProps?.placeholder,
|
|
70
72
|
"model-value": f.value,
|
|
71
73
|
"onUpdate:modelValue": n[0] ||= (e) => i("update:modelValue", e ?? "")
|
|
72
74
|
}, null, 8, [
|
|
73
75
|
"aria-label",
|
|
74
76
|
"invalid",
|
|
77
|
+
"placeholder",
|
|
75
78
|
"model-value"
|
|
76
|
-
])) : t.type === "textarea" ? (
|
|
79
|
+
])) : t.type === "textarea" ? (O(), g(l, {
|
|
77
80
|
key: 1,
|
|
78
81
|
size: "sm",
|
|
79
82
|
"auto-resize": "",
|
|
@@ -85,42 +88,48 @@ var Mn = An({
|
|
|
85
88
|
"aria-label",
|
|
86
89
|
"invalid",
|
|
87
90
|
"model-value"
|
|
88
|
-
])) : t.type === "number" &&
|
|
91
|
+
])) : t.type === "number" && N(c).numberInput ? (O(), g(me(N(c).numberInput), {
|
|
89
92
|
key: 2,
|
|
90
93
|
size: "sm",
|
|
91
94
|
"aria-label": t.label,
|
|
92
95
|
invalid: t.invalid,
|
|
96
|
+
placeholder: t.inputProps?.placeholder,
|
|
93
97
|
"model-value": typeof t.modelValue == "number" ? t.modelValue : null,
|
|
94
98
|
"onUpdate:modelValue": n[2] ||= (e) => i("update:modelValue", e)
|
|
95
99
|
}, null, 8, [
|
|
96
100
|
"aria-label",
|
|
97
101
|
"invalid",
|
|
102
|
+
"placeholder",
|
|
98
103
|
"model-value"
|
|
99
|
-
])) : t.type === "number" ? (
|
|
104
|
+
])) : t.type === "number" ? (O(), g(p, {
|
|
100
105
|
key: 3,
|
|
101
106
|
type: "number",
|
|
102
107
|
size: "sm",
|
|
103
108
|
"aria-label": t.label,
|
|
104
109
|
invalid: t.invalid,
|
|
110
|
+
placeholder: t.inputProps?.placeholder,
|
|
105
111
|
"model-value": typeof t.modelValue == "number" ? String(t.modelValue) : "",
|
|
106
112
|
"onUpdate:modelValue": n[3] ||= (e) => i("update:modelValue", te(e))
|
|
107
113
|
}, null, 8, [
|
|
108
114
|
"aria-label",
|
|
109
115
|
"invalid",
|
|
116
|
+
"placeholder",
|
|
110
117
|
"model-value"
|
|
111
|
-
])) : (t.type === "date" || t.type === "datetime") &&
|
|
118
|
+
])) : (t.type === "date" || t.type === "datetime") && N(c).dateInput ? (O(), g(me(N(c).dateInput), {
|
|
112
119
|
key: 4,
|
|
113
120
|
"aria-label": t.label,
|
|
114
121
|
invalid: t.invalid,
|
|
122
|
+
placeholder: t.inputProps?.placeholder,
|
|
115
123
|
"with-time": t.type === "datetime",
|
|
116
124
|
"model-value": f.value || null,
|
|
117
125
|
"onUpdate:modelValue": n[4] ||= (e) => i("update:modelValue", e)
|
|
118
126
|
}, null, 8, [
|
|
119
127
|
"aria-label",
|
|
120
128
|
"invalid",
|
|
129
|
+
"placeholder",
|
|
121
130
|
"with-time",
|
|
122
131
|
"model-value"
|
|
123
|
-
])) : t.type === "date" || t.type === "datetime" ? (
|
|
132
|
+
])) : t.type === "date" || t.type === "datetime" ? (O(), g(p, {
|
|
124
133
|
key: 5,
|
|
125
134
|
type: t.type === "date" ? "date" : "datetime-local",
|
|
126
135
|
size: "sm",
|
|
@@ -133,21 +142,31 @@ var Mn = An({
|
|
|
133
142
|
"aria-label",
|
|
134
143
|
"invalid",
|
|
135
144
|
"model-value"
|
|
136
|
-
])) : t.type === "multiSelect" ? (
|
|
145
|
+
])) : t.type === "multiSelect" ? (O(), g(s, {
|
|
137
146
|
key: 6,
|
|
138
147
|
"aria-label": t.label,
|
|
139
148
|
items: d.value,
|
|
140
149
|
invalid: t.invalid,
|
|
141
|
-
placeholder:
|
|
150
|
+
placeholder: t.inputProps?.placeholder ?? N(a).filterAll,
|
|
151
|
+
filter: t.inputProps?.filter,
|
|
152
|
+
"max-shown": t.inputProps?.maxShown,
|
|
153
|
+
clearable: t.inputProps?.clearable,
|
|
142
154
|
"model-value": Array.isArray(t.modelValue) ? t.modelValue : [],
|
|
143
155
|
"onUpdate:modelValue": n[6] ||= (e) => i("update:modelValue", e)
|
|
144
|
-
},
|
|
156
|
+
}, oe({ _: 2 }, [e.$slots.option ? {
|
|
157
|
+
name: "item",
|
|
158
|
+
fn: P((t) => [j(e.$slots, "option", le(C(t)))]),
|
|
159
|
+
key: "0"
|
|
160
|
+
} : void 0]), 1032, [
|
|
145
161
|
"aria-label",
|
|
146
162
|
"items",
|
|
147
163
|
"invalid",
|
|
148
164
|
"placeholder",
|
|
165
|
+
"filter",
|
|
166
|
+
"max-shown",
|
|
167
|
+
"clearable",
|
|
149
168
|
"model-value"
|
|
150
|
-
])) : t.type === "checkbox" ? (
|
|
169
|
+
])) : t.type === "checkbox" ? (O(), g(ee, {
|
|
151
170
|
key: 7,
|
|
152
171
|
"aria-label": t.label,
|
|
153
172
|
invalid: t.invalid,
|
|
@@ -157,23 +176,31 @@ var Mn = An({
|
|
|
157
176
|
"aria-label",
|
|
158
177
|
"invalid",
|
|
159
178
|
"checked"
|
|
160
|
-
])) : (
|
|
179
|
+
])) : (O(), g(ne, {
|
|
161
180
|
key: 8,
|
|
162
181
|
"aria-label": t.label,
|
|
163
182
|
items: d.value,
|
|
164
183
|
invalid: t.invalid,
|
|
165
|
-
placeholder:
|
|
184
|
+
placeholder: t.inputProps?.placeholder ?? N(o).common.placeholder,
|
|
185
|
+
filter: t.inputProps?.filter,
|
|
186
|
+
clearable: t.inputProps?.clearable,
|
|
166
187
|
"model-value": re.value,
|
|
167
188
|
"onUpdate:modelValue": n[8] ||= (e) => i("update:modelValue", e ?? "")
|
|
168
|
-
},
|
|
189
|
+
}, oe({ _: 2 }, [e.$slots.option ? {
|
|
190
|
+
name: "item",
|
|
191
|
+
fn: P((t) => [j(e.$slots, "option", le(C(t)))]),
|
|
192
|
+
key: "0"
|
|
193
|
+
} : void 0]), 1032, [
|
|
169
194
|
"aria-label",
|
|
170
195
|
"items",
|
|
171
196
|
"invalid",
|
|
172
197
|
"placeholder",
|
|
198
|
+
"filter",
|
|
199
|
+
"clearable",
|
|
173
200
|
"model-value"
|
|
174
201
|
]));
|
|
175
202
|
}
|
|
176
|
-
}),
|
|
203
|
+
}), Vn = /* @__PURE__ */ S({
|
|
177
204
|
__name: "FilterMenu",
|
|
178
205
|
props: {
|
|
179
206
|
header: {},
|
|
@@ -181,49 +208,50 @@ var Mn = An({
|
|
|
181
208
|
modelValue: {},
|
|
182
209
|
options: {},
|
|
183
210
|
matchModes: {},
|
|
184
|
-
maxConstraints: {}
|
|
211
|
+
maxConstraints: {},
|
|
212
|
+
inputProps: {}
|
|
185
213
|
},
|
|
186
214
|
emits: ["update:modelValue"],
|
|
187
215
|
setup(r, { emit: i }) {
|
|
188
|
-
let a = r, o = n("dataTable",
|
|
216
|
+
let a = r, o = n("dataTable", ot), s = i, c = e().dataTable, l = t(), u = o(), ee = k(!1), p = k(ft(a.type)), te = h(() => Ct(a.modelValue)), re = h(() => At(a.type, a.matchModes)), ie = h(() => re.value.map((e) => ({
|
|
189
217
|
value: e,
|
|
190
|
-
label:
|
|
191
|
-
}))),
|
|
218
|
+
label: kt(e, c.matchModes, l.value.locale)
|
|
219
|
+
}))), S = (e) => Ot(e)?.input ?? a.type, C = (e) => JSON.parse(JSON.stringify(e));
|
|
192
220
|
function se(e) {
|
|
193
|
-
e && (p.value =
|
|
221
|
+
e && (p.value = C(ln(a.modelValue ?? ft(a.type), a.type))), ee.value = e;
|
|
194
222
|
}
|
|
195
|
-
function
|
|
223
|
+
function ce(e, t) {
|
|
196
224
|
let n = p.value.constraints[e];
|
|
197
|
-
|
|
225
|
+
wt(t) !== wt(n.matchMode) && (n.value = wt(t) ? [null, null] : null), n.matchMode = t;
|
|
198
226
|
}
|
|
199
|
-
function
|
|
227
|
+
function T(e, t, n) {
|
|
200
228
|
let r = p.value.constraints[e], i = Array.isArray(r.value) ? [...r.value] : [null, null];
|
|
201
229
|
i[t] = n, r.value = i;
|
|
202
230
|
}
|
|
203
|
-
function E() {
|
|
204
|
-
s("update:modelValue", bt(p.value) ? S(p.value) : void 0), ee.value = !1;
|
|
205
|
-
}
|
|
206
231
|
function le() {
|
|
232
|
+
s("update:modelValue", Ct(p.value) ? C(p.value) : void 0), ee.value = !1;
|
|
233
|
+
}
|
|
234
|
+
function D() {
|
|
207
235
|
s("update:modelValue", void 0), ee.value = !1;
|
|
208
236
|
}
|
|
209
237
|
let ue = {
|
|
210
238
|
placement: "bottom-end",
|
|
211
239
|
gutter: 4
|
|
212
240
|
};
|
|
213
|
-
return (e, t) => (
|
|
241
|
+
return (e, t) => (O(), g(N(hn).Root, {
|
|
214
242
|
open: ee.value,
|
|
215
243
|
positioning: ue,
|
|
216
244
|
"lazy-mount": "",
|
|
217
245
|
"unmount-on-exit": "",
|
|
218
246
|
onOpenChange: t[2] ||= (e) => se(e.open)
|
|
219
247
|
}, {
|
|
220
|
-
default: P(() => [x(
|
|
221
|
-
class:
|
|
222
|
-
"aria-label":
|
|
248
|
+
default: P(() => [x(N(hn).Trigger, {
|
|
249
|
+
class: E(N(u).headButton()),
|
|
250
|
+
"aria-label": N(c).filterMenu(r.header, te.value),
|
|
223
251
|
"data-active": te.value || void 0
|
|
224
252
|
}, {
|
|
225
|
-
default: P(() => [x(
|
|
226
|
-
class:
|
|
253
|
+
default: P(() => [x(N(Ne), {
|
|
254
|
+
class: E(N(u).headButtonIcon()),
|
|
227
255
|
"aria-hidden": "true"
|
|
228
256
|
}, null, 8, ["class"])]),
|
|
229
257
|
_: 1
|
|
@@ -231,24 +259,24 @@ var Mn = An({
|
|
|
231
259
|
"class",
|
|
232
260
|
"aria-label",
|
|
233
261
|
"data-active"
|
|
234
|
-
]), (
|
|
235
|
-
default: P(() => [x(
|
|
236
|
-
class:
|
|
237
|
-
"aria-label":
|
|
262
|
+
]), (O(), g(ae, { to: "body" }, [x(N(hn).Positioner, null, {
|
|
263
|
+
default: P(() => [x(N(hn).Content, {
|
|
264
|
+
class: E(N(u).filterPanel()),
|
|
265
|
+
"aria-label": N(c).filterMenu(r.header, !1)
|
|
238
266
|
}, {
|
|
239
267
|
default: P(() => [y("form", {
|
|
240
|
-
class:
|
|
241
|
-
onSubmit:
|
|
268
|
+
class: E(N(u).filterForm()),
|
|
269
|
+
onSubmit: F(le, ["prevent"])
|
|
242
270
|
}, [
|
|
243
|
-
p.value.constraints.length > 1 ? (
|
|
271
|
+
p.value.constraints.length > 1 ? (O(), g(ne, {
|
|
244
272
|
key: 0,
|
|
245
|
-
"aria-label":
|
|
273
|
+
"aria-label": N(c).operator,
|
|
246
274
|
items: [{
|
|
247
275
|
value: "and",
|
|
248
|
-
label:
|
|
276
|
+
label: N(c).matchAll
|
|
249
277
|
}, {
|
|
250
278
|
value: "or",
|
|
251
|
-
label:
|
|
279
|
+
label: N(c).matchAny
|
|
252
280
|
}],
|
|
253
281
|
"model-value": p.value.operator,
|
|
254
282
|
"onUpdate:modelValue": t[0] ||= (e) => p.value.operator = e === "or" ? "or" : "and"
|
|
@@ -257,26 +285,26 @@ var Mn = An({
|
|
|
257
285
|
"items",
|
|
258
286
|
"model-value"
|
|
259
287
|
])) : _("", !0),
|
|
260
|
-
(
|
|
288
|
+
(O(!0), v(m, null, A(p.value.constraints, (t, n) => (O(), v("div", {
|
|
261
289
|
key: n,
|
|
262
|
-
class:
|
|
263
|
-
}, [y("div", { class:
|
|
290
|
+
class: E(N(u).filterRule())
|
|
291
|
+
}, [y("div", { class: E(N(u).filterRuleHead()) }, [re.value.length > 1 ? (O(), g(ne, {
|
|
264
292
|
key: 0,
|
|
265
|
-
class:
|
|
266
|
-
"aria-label":
|
|
293
|
+
class: E(N(u).filterMode()),
|
|
294
|
+
"aria-label": N(c).matchMode(n),
|
|
267
295
|
items: ie.value,
|
|
268
296
|
"model-value": t.matchMode,
|
|
269
|
-
"onUpdate:modelValue": (e) =>
|
|
297
|
+
"onUpdate:modelValue": (e) => ce(n, e ?? re.value[0])
|
|
270
298
|
}, null, 8, [
|
|
271
299
|
"class",
|
|
272
300
|
"aria-label",
|
|
273
301
|
"items",
|
|
274
302
|
"model-value",
|
|
275
303
|
"onUpdate:modelValue"
|
|
276
|
-
])) : _("", !0), p.value.constraints.length > 1 ? (
|
|
304
|
+
])) : _("", !0), p.value.constraints.length > 1 ? (O(), g(f, {
|
|
277
305
|
key: 1,
|
|
278
|
-
icon:
|
|
279
|
-
label:
|
|
306
|
+
icon: N(I),
|
|
307
|
+
label: N(c).removeRule(n),
|
|
280
308
|
variant: "text",
|
|
281
309
|
size: "sm",
|
|
282
310
|
onClick: (e) => p.value.constraints.splice(n, 1)
|
|
@@ -284,76 +312,86 @@ var Mn = An({
|
|
|
284
312
|
"icon",
|
|
285
313
|
"label",
|
|
286
314
|
"onClick"
|
|
287
|
-
])) : _("", !0)], 2), e.$slots.value ?
|
|
315
|
+
])) : _("", !0)], 2), e.$slots.value ? j(e.$slots, "value", w({ ref_for: !0 }, {
|
|
288
316
|
value: t.value,
|
|
289
317
|
setValue: (e) => t.value = e
|
|
290
|
-
}), void 0, void 0, 0) :
|
|
318
|
+
}), void 0, void 0, 0) : N(wt)(t.matchMode) ? (O(), v("div", {
|
|
291
319
|
key: 1,
|
|
292
|
-
class:
|
|
293
|
-
}, [x(
|
|
294
|
-
type:
|
|
295
|
-
label: `${
|
|
320
|
+
class: E(N(u).filterRange())
|
|
321
|
+
}, [x(Bn, {
|
|
322
|
+
type: S(t.matchMode),
|
|
323
|
+
label: `${N(c).value(n)}, ${N(c).from}`,
|
|
296
324
|
options: r.options,
|
|
325
|
+
"input-props": r.inputProps,
|
|
297
326
|
"model-value": Array.isArray(t.value) ? t.value[0] : null,
|
|
298
|
-
"onUpdate:modelValue": (e) =>
|
|
327
|
+
"onUpdate:modelValue": (e) => T(n, 0, e)
|
|
299
328
|
}, null, 8, [
|
|
300
329
|
"type",
|
|
301
330
|
"label",
|
|
302
331
|
"options",
|
|
332
|
+
"input-props",
|
|
303
333
|
"model-value",
|
|
304
334
|
"onUpdate:modelValue"
|
|
305
|
-
]), x(
|
|
306
|
-
type:
|
|
307
|
-
label: `${
|
|
335
|
+
]), x(Bn, {
|
|
336
|
+
type: S(t.matchMode),
|
|
337
|
+
label: `${N(c).value(n)}, ${N(c).to}`,
|
|
308
338
|
options: r.options,
|
|
339
|
+
"input-props": r.inputProps,
|
|
309
340
|
"model-value": Array.isArray(t.value) ? t.value[1] : null,
|
|
310
|
-
"onUpdate:modelValue": (e) =>
|
|
341
|
+
"onUpdate:modelValue": (e) => T(n, 1, e)
|
|
311
342
|
}, null, 8, [
|
|
312
343
|
"type",
|
|
313
344
|
"label",
|
|
314
345
|
"options",
|
|
346
|
+
"input-props",
|
|
315
347
|
"model-value",
|
|
316
348
|
"onUpdate:modelValue"
|
|
317
|
-
])], 2)) : (
|
|
349
|
+
])], 2)) : (O(), g(Bn, {
|
|
318
350
|
key: 2,
|
|
319
|
-
type:
|
|
320
|
-
label:
|
|
351
|
+
type: S(t.matchMode),
|
|
352
|
+
label: N(c).value(n),
|
|
321
353
|
options: r.options,
|
|
354
|
+
"input-props": r.inputProps,
|
|
322
355
|
"model-value": t.value,
|
|
323
356
|
"onUpdate:modelValue": (e) => t.value = e
|
|
324
|
-
},
|
|
357
|
+
}, oe({ _: 2 }, [e.$slots.option ? {
|
|
358
|
+
name: "option",
|
|
359
|
+
fn: P((t) => [j(e.$slots, "option", w({ ref_for: !0 }, t))]),
|
|
360
|
+
key: "0"
|
|
361
|
+
} : void 0]), 1032, [
|
|
325
362
|
"type",
|
|
326
363
|
"label",
|
|
327
364
|
"options",
|
|
365
|
+
"input-props",
|
|
328
366
|
"model-value",
|
|
329
367
|
"onUpdate:modelValue"
|
|
330
368
|
]))], 2))), 128)),
|
|
331
|
-
p.value.constraints.length < r.maxConstraints ? (
|
|
369
|
+
p.value.constraints.length < r.maxConstraints ? (O(), g(d, {
|
|
332
370
|
key: 1,
|
|
333
371
|
variant: "text",
|
|
334
372
|
size: "sm",
|
|
335
|
-
class:
|
|
336
|
-
"leading-icon":
|
|
373
|
+
class: E(N(u).filterAdd()),
|
|
374
|
+
"leading-icon": N(Be),
|
|
337
375
|
onClick: t[1] ||= (e) => p.value.constraints.push({
|
|
338
376
|
matchMode: re.value[0],
|
|
339
377
|
value: null
|
|
340
378
|
})
|
|
341
379
|
}, {
|
|
342
|
-
default: P(() => [b(
|
|
380
|
+
default: P(() => [b(M(N(c).addRule), 1)]),
|
|
343
381
|
_: 1
|
|
344
382
|
}, 8, ["class", "leading-icon"])) : _("", !0),
|
|
345
|
-
y("div", { class:
|
|
383
|
+
y("div", { class: E(N(u).filterActions()) }, [x(d, {
|
|
346
384
|
variant: "outline",
|
|
347
385
|
size: "sm",
|
|
348
|
-
onClick:
|
|
386
|
+
onClick: D
|
|
349
387
|
}, {
|
|
350
|
-
default: P(() => [b(
|
|
388
|
+
default: P(() => [b(M(N(c).clear), 1)]),
|
|
351
389
|
_: 1
|
|
352
390
|
}), x(d, {
|
|
353
391
|
type: "submit",
|
|
354
392
|
size: "sm"
|
|
355
393
|
}, {
|
|
356
|
-
default: P(() => [b(
|
|
394
|
+
default: P(() => [b(M(N(c).apply), 1)]),
|
|
357
395
|
_: 1
|
|
358
396
|
})], 2)
|
|
359
397
|
], 34)]),
|
|
@@ -364,17 +402,17 @@ var Mn = An({
|
|
|
364
402
|
_: 3
|
|
365
403
|
}, 8, ["open"]));
|
|
366
404
|
}
|
|
367
|
-
}),
|
|
405
|
+
}), Hn = [
|
|
368
406
|
"role",
|
|
369
407
|
"aria-modal",
|
|
370
408
|
"aria-label"
|
|
371
|
-
],
|
|
409
|
+
], Un = ["id"], Wn = ["aria-label"], Gn = { "aria-hidden": "true" }, Kn = [
|
|
372
410
|
"aria-busy",
|
|
373
411
|
"aria-rowcount",
|
|
374
412
|
"role",
|
|
375
413
|
"aria-multiselectable",
|
|
376
414
|
"tabindex"
|
|
377
|
-
],
|
|
415
|
+
], qn = ["rowspan"], Jn = ["aria-label"], Yn = ["colspan", "rowspan"], Xn = [
|
|
378
416
|
"id",
|
|
379
417
|
"rowspan",
|
|
380
418
|
"aria-sort",
|
|
@@ -383,7 +421,7 @@ var Mn = An({
|
|
|
383
421
|
"data-dragging",
|
|
384
422
|
"onDragstart",
|
|
385
423
|
"onDragover"
|
|
386
|
-
],
|
|
424
|
+
], Zn = ["onClick"], Qn = ["data-column-menu", "aria-label"], $n = [
|
|
387
425
|
"aria-label",
|
|
388
426
|
"aria-valuenow",
|
|
389
427
|
"data-resizing",
|
|
@@ -391,32 +429,32 @@ var Mn = An({
|
|
|
391
429
|
"onTouchstart",
|
|
392
430
|
"onKeydown",
|
|
393
431
|
"onDblclick"
|
|
394
|
-
],
|
|
432
|
+
], er = ["rowspan"], tr = [
|
|
395
433
|
"data-state",
|
|
396
434
|
"aria-selected",
|
|
397
435
|
"data-row-id"
|
|
398
|
-
],
|
|
436
|
+
], nr = [
|
|
399
437
|
"aria-busy",
|
|
400
438
|
"onKeydown",
|
|
401
439
|
"onFocusout"
|
|
402
|
-
],
|
|
440
|
+
], rr = ["id"], ir = [
|
|
403
441
|
"data-edit",
|
|
404
442
|
"aria-label",
|
|
405
443
|
"onClick"
|
|
406
|
-
],
|
|
444
|
+
], ar = { key: 0 }, or = ["colspan"], sr = { role: "alert" }, cr = ["colspan"], lr = [
|
|
407
445
|
"data-index",
|
|
408
446
|
"aria-rowindex",
|
|
409
447
|
"data-drop",
|
|
410
448
|
"onDragover"
|
|
411
|
-
],
|
|
449
|
+
], ur = ["colspan"], dr = [
|
|
412
450
|
"aria-expanded",
|
|
413
451
|
"aria-label",
|
|
414
452
|
"onClick"
|
|
415
|
-
],
|
|
453
|
+
], fr = [
|
|
416
454
|
"id",
|
|
417
455
|
"data-index",
|
|
418
456
|
"aria-rowindex"
|
|
419
|
-
],
|
|
457
|
+
], pr = ["colspan"], mr = [
|
|
420
458
|
"data-state",
|
|
421
459
|
"aria-selected",
|
|
422
460
|
"data-row-id",
|
|
@@ -431,35 +469,35 @@ var Mn = An({
|
|
|
431
469
|
"onAuxclick",
|
|
432
470
|
"onDragstart",
|
|
433
471
|
"onDragover"
|
|
434
|
-
],
|
|
472
|
+
], hr = [
|
|
435
473
|
"data-drag-handle",
|
|
436
474
|
"aria-label",
|
|
437
475
|
"aria-keyshortcuts",
|
|
438
476
|
"onKeydown",
|
|
439
477
|
"onPointerdown"
|
|
440
|
-
],
|
|
478
|
+
], gr = [
|
|
441
479
|
"checked",
|
|
442
480
|
"disabled",
|
|
443
481
|
"aria-label",
|
|
444
482
|
"onChange"
|
|
445
|
-
],
|
|
483
|
+
], _r = [
|
|
446
484
|
"aria-expanded",
|
|
447
485
|
"aria-controls",
|
|
448
486
|
"aria-label",
|
|
449
487
|
"onClick"
|
|
450
|
-
],
|
|
488
|
+
], vr = [
|
|
451
489
|
"aria-expanded",
|
|
452
490
|
"aria-label",
|
|
453
491
|
"onClick"
|
|
454
|
-
],
|
|
492
|
+
], yr = [
|
|
455
493
|
"aria-busy",
|
|
456
494
|
"onKeydown",
|
|
457
495
|
"onFocusout"
|
|
458
|
-
],
|
|
496
|
+
], br = ["id"], xr = [
|
|
459
497
|
"data-edit",
|
|
460
498
|
"aria-label",
|
|
461
499
|
"onClick"
|
|
462
|
-
],
|
|
500
|
+
], Sr = ["colspan"], Cr = { key: 0 }, wr = { key: 1 }, Tr = { "aria-hidden": "true" }, Er = 60, Dr = 16, Or = "input, textarea, select, [contenteditable=\"\"], [contenteditable=\"true\"], [data-editor]", kr = "button, a, input, select, textarea, label, [role=checkbox], [role=combobox], [contenteditable]", B = /* @__PURE__ */ S({
|
|
463
501
|
inheritAttrs: !1,
|
|
464
502
|
__name: "DataTable",
|
|
465
503
|
props: {
|
|
@@ -476,6 +514,8 @@ var Mn = An({
|
|
|
476
514
|
page: {},
|
|
477
515
|
first: { default: void 0 },
|
|
478
516
|
paginatorPosition: { default: "bottom" },
|
|
517
|
+
paginatorEdges: { type: Boolean },
|
|
518
|
+
paginatorAlign: {},
|
|
479
519
|
sorting: { default: void 0 },
|
|
480
520
|
defaultSorting: { default: void 0 },
|
|
481
521
|
sortMode: { default: "single" },
|
|
@@ -484,6 +524,7 @@ var Mn = An({
|
|
|
484
524
|
selectable: { type: Boolean },
|
|
485
525
|
selectionMode: { default: "multiple" },
|
|
486
526
|
selection: { default: void 0 },
|
|
527
|
+
selectedRows: { default: void 0 },
|
|
487
528
|
selectOnRowClick: { type: Boolean },
|
|
488
529
|
isRowSelectable: {
|
|
489
530
|
type: Function,
|
|
@@ -509,10 +550,15 @@ var Mn = An({
|
|
|
509
550
|
type: Function,
|
|
510
551
|
default: void 0
|
|
511
552
|
},
|
|
553
|
+
rowExpandable: {},
|
|
512
554
|
advancedFilter: { type: [Boolean, Array] },
|
|
513
555
|
advancedFilterValue: {},
|
|
514
556
|
search: { type: Boolean },
|
|
515
557
|
globalFilter: { default: void 0 },
|
|
558
|
+
rowKeywords: {
|
|
559
|
+
type: Function,
|
|
560
|
+
default: void 0
|
|
561
|
+
},
|
|
516
562
|
highlightSearch: { type: Boolean },
|
|
517
563
|
filters: { default: void 0 },
|
|
518
564
|
filterDisplay: { default: "row" },
|
|
@@ -521,6 +567,7 @@ var Mn = An({
|
|
|
521
567
|
default: void 0
|
|
522
568
|
},
|
|
523
569
|
filterToggle: { type: Boolean },
|
|
570
|
+
filterReset: { type: Boolean },
|
|
524
571
|
maxConstraints: { default: 2 },
|
|
525
572
|
resizable: { type: Boolean },
|
|
526
573
|
columnToggle: { type: Boolean },
|
|
@@ -559,6 +606,7 @@ var Mn = An({
|
|
|
559
606
|
size: { default: void 0 },
|
|
560
607
|
densityToggle: { type: Boolean },
|
|
561
608
|
gridlines: { type: Boolean },
|
|
609
|
+
bordered: { type: Boolean },
|
|
562
610
|
striped: { type: Boolean },
|
|
563
611
|
fullscreenToggle: { type: Boolean },
|
|
564
612
|
scrollHeight: {},
|
|
@@ -567,299 +615,323 @@ var Mn = An({
|
|
|
567
615
|
rowHeight: { default: 41 },
|
|
568
616
|
stateKey: {},
|
|
569
617
|
stateStorage: { default: "session" },
|
|
618
|
+
stateExclude: { default: () => ["selection"] },
|
|
570
619
|
classes: {}
|
|
571
620
|
},
|
|
572
|
-
emits: /* @__PURE__ */ "update:page.update:first.update:showFilters.update:allSelection.selectedRowsChange.rowClick.update:pageSize.update:sorting.update:selection.update:expanded.update:globalFilter.update:advancedFilterValue.update:filters.update:hiddenColumns.update:columnOrder.update:pinnedColumns.update:groupBy.update:size.cellEdit.rowEdit.rowReorder.rowAction.loadMore.scrollEnd.cellSelectionChange.cellPaste.save".split("."),
|
|
621
|
+
emits: /* @__PURE__ */ "update:page.update:first.update:showFilters.update:allSelection.selectedRowsChange.update:selectedRows.rowClick.update:pageSize.update:sorting.update:selection.update:expanded.update:globalFilter.update:advancedFilterValue.update:filters.update:hiddenColumns.update:columnOrder.update:pinnedColumns.update:groupBy.update:size.cellEdit.rowEdit.rowReorder.rowAction.loadMore.scrollEnd.cellSelectionChange.cellPaste.save".split("."),
|
|
573
622
|
setup(a, { expose: o, emit: s }) {
|
|
574
|
-
let l = e(), S = t(), C = a,
|
|
575
|
-
|
|
576
|
-
let
|
|
623
|
+
let l = e(), S = t(), C = a, ce = n("dataTable", ot, () => C.classes), le = n("menu", Ft), F = s, Be = ge(), I = ve(), tt = _e(), L = l.dataTable, ct = Object.assign({}, ...C.features ?? []);
|
|
624
|
+
pe(zn, ct);
|
|
625
|
+
let ft = (e, t) => typeof e == "function" ? e(t) : e, kt = (e) => e == null ? "" : String(e), At = (e) => e === void 0 ? [] : Array.isArray(e) ? e : [e], Lt = (e) => e ? Array.isArray(e) ? e : [e] : [], Rt = (e) => Object.fromEntries(e.filter((e) => Ct(e.value)).map((e) => [e.id, e.value])), tn = (e) => Object.entries(e).filter(([, e]) => Ct(e)).map(([e, t]) => ({
|
|
577
626
|
id: e,
|
|
578
627
|
value: t
|
|
579
|
-
})), ln = (e, t = !0) => Object.fromEntries(e.map((e) => [e, t])),
|
|
628
|
+
})), ln = (e, t = !0) => Object.fromEntries(e.map((e) => [e, t])), hn = (e) => Object.fromEntries(e.map((e) => [e, !0])), z = (e, t) => be(e, (e, n) => {
|
|
629
|
+
an(e, n) || t(e);
|
|
630
|
+
}), gn = (e, t, n) => {
|
|
580
631
|
let r = { ...e };
|
|
581
632
|
for (let e of t) n ? r[e] = !0 : delete r[e];
|
|
582
633
|
return r;
|
|
583
|
-
},
|
|
634
|
+
}, _n = {
|
|
584
635
|
drag: 40,
|
|
585
636
|
select: 48,
|
|
586
637
|
expand: 40,
|
|
587
638
|
number: 56,
|
|
588
639
|
actions: 88
|
|
589
|
-
},
|
|
640
|
+
}, vn = [], yn = (e) => "getRows" in e ? nn(e.getRows) : e, bn = he({
|
|
590
641
|
status: "idle",
|
|
591
642
|
items: []
|
|
592
|
-
}),
|
|
593
|
-
source: { getItems: (e) =>
|
|
594
|
-
onChange: (e) =>
|
|
595
|
-
}),
|
|
643
|
+
}), xn = null, Sn = () => C.dataSource ? (xn ??= nt({
|
|
644
|
+
source: { getItems: (e) => yn(C.dataSource).getItems(e) },
|
|
645
|
+
onChange: (e) => bn.value = e
|
|
646
|
+
}), xn.configure({
|
|
596
647
|
ttl: C.cacheTime,
|
|
597
648
|
debounce: C.searchDebounce
|
|
598
|
-
}),
|
|
599
|
-
|
|
600
|
-
let
|
|
649
|
+
}), xn) : null;
|
|
650
|
+
ue(() => xn?.dispose());
|
|
651
|
+
let Cn = h(() => {
|
|
601
652
|
let e = C.pivot;
|
|
602
653
|
if (!e) return null;
|
|
603
654
|
let t = /* @__PURE__ */ new Map(), n = (e) => e.forEach((e) => e.columns ? n(e.columns) : t.set(e.id, e));
|
|
604
655
|
n(C.columns);
|
|
605
656
|
let r = (e, n) => {
|
|
606
657
|
let r = t.get(n);
|
|
607
|
-
return r ?
|
|
658
|
+
return r ? Ar(r, e) : e[n];
|
|
608
659
|
}, i = new Intl.NumberFormat(S.value.locale, { maximumFractionDigits: 2 });
|
|
609
|
-
return
|
|
660
|
+
return Jt(qt(C.data ?? vn, e, r, (e, n, r) => {
|
|
610
661
|
let i = t.get(n)?.format;
|
|
611
|
-
return i ? i(r, e) :
|
|
662
|
+
return i ? i(r, e) : kt(r);
|
|
612
663
|
}), e, {
|
|
613
664
|
header: (e) => t.get(e)?.header ?? e,
|
|
614
665
|
totalLabel: L.total,
|
|
615
|
-
format: (e) => typeof e == "number" ? i.format(e) :
|
|
666
|
+
format: (e) => typeof e == "number" ? i.format(e) : kt(e)
|
|
616
667
|
});
|
|
617
|
-
}),
|
|
618
|
-
|
|
619
|
-
let
|
|
620
|
-
function
|
|
621
|
-
|
|
622
|
-
}
|
|
623
|
-
let
|
|
624
|
-
|
|
625
|
-
C.advancedFilter && !I.advancedFilter &&
|
|
668
|
+
}), wn = k(C.advancedFilterValue ?? dt("and", "root"));
|
|
669
|
+
z(() => C.advancedFilterValue, (e) => e && (wn.value = e));
|
|
670
|
+
let Tn = k(!1), En = h(() => Array.isArray(C.advancedFilter) ? C.advancedFilter : C.advancedFilter ? et(C.columns, C.data ?? vn) : []), Dn = h(() => !!C.advancedFilter && St(wn.value, En.value));
|
|
671
|
+
function On(e) {
|
|
672
|
+
wn.value = e, F("update:advancedFilterValue", e);
|
|
673
|
+
}
|
|
674
|
+
let kn = h(() => !!C.advancedFilter && !!I.advancedFilter);
|
|
675
|
+
de(() => {
|
|
676
|
+
C.advancedFilter && !I.advancedFilter && mn("DataTable: `advancedFilter` has no editor, so the toolbar button is hidden – fill the `#advancedFilter` slot with ConditionBuilder from @wirecore/wirelayer-blocks-vue");
|
|
626
677
|
});
|
|
627
|
-
let
|
|
678
|
+
let An = h(() => Cn.value ? Cn.value.rows : C.dataSource ? bn.value.items : Dn.value && !C.manual ? (C.data ?? vn).filter((e) => Mt(e, wn.value, En.value, S.value.locale)) : C.data ?? vn), jn = h(() => Cn.value ? Cn.value.columns : C.columns), Mn = h(() => !!C.manual || !!C.dataSource), Nn = h(() => C.dataSource ? bn.value.totalCount ?? bn.value.items.length : C.rowCount), Pn = h(() => !!C.dataSource && bn.value.status === "error"), Fn = h(() => !!C.loading || !!C.dataSource && bn.value.status === "loading"), In = h(() => {
|
|
628
679
|
let e = (t) => t.flatMap((t) => t.columns ? e(t.columns) : [t]);
|
|
629
|
-
return e(
|
|
630
|
-
}),
|
|
680
|
+
return e(jn.value);
|
|
681
|
+
}), B = h(() => {
|
|
631
682
|
let e = /* @__PURE__ */ new Map(), t = (n) => n.forEach((n) => {
|
|
632
683
|
e.set(n.id, n), n.columns && t(n.columns);
|
|
633
684
|
});
|
|
634
|
-
return t(
|
|
635
|
-
}),
|
|
636
|
-
|
|
637
|
-
let
|
|
638
|
-
pageIndex:
|
|
685
|
+
return t(jn.value), e;
|
|
686
|
+
}), Ar = (e, t) => typeof e.accessor == "function" ? e.accessor(t) : t[e.accessor ?? e.id], V = (e, t, n) => e?.format ? e.format(t, n) : kt(t), jr = (e) => (e.filterOptions ?? []).some((e) => typeof e != "string"), Mr = (e) => !e.filter || e.filter === "text" || e.filter === "select" || e.filter === "multiSelect", Nr = k(Lt(C.sorting === void 0 ? C.defaultSorting : C.sorting));
|
|
687
|
+
z(() => C.sorting, (e) => e !== void 0 && (Nr.value = Lt(e)));
|
|
688
|
+
let Pr = (e, t, n) => t === void 0 ? e ? e - 1 : void 0 : Math.floor(t / n), H = k({
|
|
689
|
+
pageIndex: Pr(C.page, C.first, C.pageSize ?? 10) ?? 0,
|
|
639
690
|
pageSize: C.pageSize ?? 10
|
|
640
691
|
});
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
pageIndex:
|
|
649
|
-
|
|
650
|
-
|
|
692
|
+
z(() => C.pageSize, (e) => e !== void 0 && (H.value = {
|
|
693
|
+
...H.value,
|
|
694
|
+
pageSize: e
|
|
695
|
+
})), z(() => [C.page, C.first], ([e, t]) => {
|
|
696
|
+
let n = Pr(e, t, H.value.pageSize);
|
|
697
|
+
n !== void 0 && (H.value = {
|
|
698
|
+
...H.value,
|
|
699
|
+
pageIndex: n
|
|
700
|
+
});
|
|
701
|
+
});
|
|
702
|
+
function Fr(e) {
|
|
703
|
+
let t = (C.data ?? []).indexOf(e);
|
|
704
|
+
return C.getRowId ? C.getRowId(e, t) : t >= 0 ? String(t) : void 0;
|
|
705
|
+
}
|
|
706
|
+
let Ir = (e) => e.map(Fr).filter((e) => e !== void 0), Lr = k(hn(C.selection ?? (C.selectedRows ? Ir(C.selectedRows) : [])));
|
|
707
|
+
z(() => C.selection, (e) => e && (Lr.value = hn(e))), z(() => C.selectedRows, (e) => {
|
|
708
|
+
e && (ei(e), Lr.value = hn(Ir(e)));
|
|
651
709
|
});
|
|
652
|
-
let
|
|
653
|
-
|
|
654
|
-
let
|
|
655
|
-
|
|
656
|
-
let
|
|
657
|
-
|
|
658
|
-
let
|
|
659
|
-
|
|
660
|
-
let
|
|
661
|
-
|
|
662
|
-
let
|
|
663
|
-
|
|
664
|
-
let
|
|
665
|
-
|
|
666
|
-
let
|
|
667
|
-
|
|
668
|
-
let
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
start: wr.value.filter((e) => e.pinned === "start").map((e) => e.id),
|
|
672
|
-
end: wr.value.filter((e) => e.pinned === "end").map((e) => e.id)
|
|
710
|
+
let Rr = k(C.allSelection ?? null);
|
|
711
|
+
z(() => C.allSelection, (e) => e !== void 0 && (Rr.value = e));
|
|
712
|
+
let zr = k(C.showFilters ?? !0);
|
|
713
|
+
z(() => C.showFilters, (e) => e !== void 0 && (zr.value = e));
|
|
714
|
+
let U = k(At(C.groupBy));
|
|
715
|
+
z(() => C.groupBy, (e) => U.value = At(e));
|
|
716
|
+
let Br = k(C.expanded || C.defaultExpanded ? ln(C.expanded ?? C.defaultExpanded) : U.value.length && !I.expansion ? !0 : {});
|
|
717
|
+
z(() => C.expanded, (e) => e && (Br.value = ln(e)));
|
|
718
|
+
let W = k(C.globalFilter ?? "");
|
|
719
|
+
z(() => C.globalFilter, (e) => e !== void 0 && (W.value = e));
|
|
720
|
+
let Vr = k(tn(C.filters ?? {}));
|
|
721
|
+
z(() => C.filters, (e) => e && (Vr.value = tn(e)));
|
|
722
|
+
let Hr = k(ln(C.hiddenColumns ?? [], !1));
|
|
723
|
+
z(() => C.hiddenColumns, (e) => e && (Hr.value = ln(e, !1)));
|
|
724
|
+
let Ur = k(C.columnOrder ?? []);
|
|
725
|
+
z(() => C.columnOrder, (e) => e && (Ur.value = e));
|
|
726
|
+
let Wr = k(C.pinnedColumns ?? {
|
|
727
|
+
start: In.value.filter((e) => e.pinned === "start").map((e) => e.id),
|
|
728
|
+
end: In.value.filter((e) => e.pinned === "end").map((e) => e.id)
|
|
673
729
|
});
|
|
674
|
-
|
|
675
|
-
let
|
|
676
|
-
|
|
677
|
-
let
|
|
730
|
+
z(() => C.pinnedColumns, (e) => e && (Wr.value = e));
|
|
731
|
+
let Gr = k({}), Kr = k(C.size ?? "md");
|
|
732
|
+
z(() => C.size, (e) => e && (Kr.value = e));
|
|
733
|
+
let qr = h(() => ({
|
|
678
734
|
top: [...C.frozenRows ?? []],
|
|
679
735
|
bottom: []
|
|
680
|
-
})), G = (e, t) => C.rowLabel?.(e, t) ?? L.row(t),
|
|
681
|
-
function
|
|
736
|
+
})), G = (e, t) => C.rowLabel?.(e, t) ?? L.row(t), Jr = (e, t) => C.expandLabel?.(e, t) ?? L.subRows(G(e, t));
|
|
737
|
+
function Yr(e) {
|
|
682
738
|
return e.columns ? {
|
|
683
739
|
id: e.id,
|
|
684
740
|
header: e.header,
|
|
685
|
-
columns: e.columns.map(
|
|
741
|
+
columns: e.columns.map(Yr)
|
|
686
742
|
} : {
|
|
687
743
|
id: e.id,
|
|
688
744
|
header: e.header,
|
|
689
|
-
accessorFn: (t) =>
|
|
690
|
-
enableSorting:
|
|
745
|
+
accessorFn: (t) => Ar(e, t),
|
|
746
|
+
enableSorting: !0,
|
|
691
747
|
sortDescFirst: !1,
|
|
692
748
|
sortUndefined: "last",
|
|
693
749
|
...e.sortFn ? { sortFn: (t, n) => e.sortFn(t.original, n.original) } : {},
|
|
694
|
-
filterFn: (t, n, r) =>
|
|
750
|
+
filterFn: (t, n, r) => jt({
|
|
695
751
|
value: t.getValue(n),
|
|
696
|
-
text:
|
|
752
|
+
text: Mr(e) ? V(e, t.getValue(n), t.original) : "",
|
|
697
753
|
row: t.original,
|
|
698
754
|
type: e.filter,
|
|
699
755
|
locale: S.value.locale,
|
|
700
756
|
filterFn: e.filterFn,
|
|
701
|
-
byValue:
|
|
757
|
+
byValue: jr(e)
|
|
702
758
|
}, r),
|
|
703
|
-
enableGlobalFilter: e.searchable !== !1,
|
|
759
|
+
enableGlobalFilter: !!C.rowKeywords || e.searchable !== !1,
|
|
704
760
|
enableHiding: e.hideable !== !1,
|
|
705
761
|
enableGrouping: !0,
|
|
706
762
|
...e.width ? { size: e.width } : {},
|
|
707
|
-
minSize:
|
|
763
|
+
minSize: Er
|
|
708
764
|
};
|
|
709
765
|
}
|
|
710
|
-
let
|
|
711
|
-
features:
|
|
712
|
-
columns:
|
|
713
|
-
data:
|
|
714
|
-
getRowId: (e, t) =>
|
|
766
|
+
let Xr = h(() => jn.value.map(Yr)), K = Ln({
|
|
767
|
+
features: Rn,
|
|
768
|
+
columns: Xr,
|
|
769
|
+
data: An,
|
|
770
|
+
getRowId: (e, t) => Cn.value ? e.id : C.getRowId?.(e, t) ?? String(t),
|
|
715
771
|
state: h(() => ({
|
|
716
|
-
sorting:
|
|
772
|
+
sorting: Nr.value,
|
|
717
773
|
pagination: H.value,
|
|
718
|
-
rowSelection:
|
|
719
|
-
expanded:
|
|
774
|
+
rowSelection: Lr.value,
|
|
775
|
+
expanded: Br.value,
|
|
720
776
|
globalFilter: W.value,
|
|
721
|
-
columnFilters:
|
|
722
|
-
columnVisibility:
|
|
723
|
-
columnOrder:
|
|
724
|
-
columnPinning:
|
|
725
|
-
columnSizing:
|
|
777
|
+
columnFilters: Vr.value,
|
|
778
|
+
columnVisibility: Hr.value,
|
|
779
|
+
columnOrder: Ur.value,
|
|
780
|
+
columnPinning: Wr.value,
|
|
781
|
+
columnSizing: Gr.value,
|
|
726
782
|
grouping: U.value,
|
|
727
|
-
rowPinning:
|
|
783
|
+
rowPinning: qr.value
|
|
728
784
|
})),
|
|
729
785
|
getSubRows: C.getSubRows,
|
|
730
786
|
filterFromLeafRows: h(() => C.treeFilterMode === "lenient"),
|
|
731
|
-
getRowCanExpand: (e) => !!I.expansion || !!e.subRows?.length,
|
|
787
|
+
getRowCanExpand: (e) => !!I.expansion && (C.rowExpandable?.(e.original) ?? !0) || !!e.subRows?.length,
|
|
732
788
|
autoResetExpanded: h(() => C.reorderableRows || C.cellSelection ? !1 : void 0),
|
|
733
|
-
onExpandedChange: (e) =>
|
|
734
|
-
onSortingChange: (e) =>
|
|
735
|
-
onPaginationChange: (e) =>
|
|
736
|
-
onRowSelectionChange: (e) =>
|
|
789
|
+
onExpandedChange: (e) => ai(ft(e, Br.value)),
|
|
790
|
+
onSortingChange: (e) => Zr(ft(e, Nr.value)),
|
|
791
|
+
onPaginationChange: (e) => Qr(ft(e, H.value)),
|
|
792
|
+
onRowSelectionChange: (e) => ti(ft(e, Lr.value)),
|
|
737
793
|
onGlobalFilterChange: (e) => {
|
|
738
|
-
W.value =
|
|
794
|
+
W.value = ft(e, W.value) ?? "", F("update:globalFilter", W.value);
|
|
739
795
|
},
|
|
740
796
|
onColumnFiltersChange: (e) => {
|
|
741
|
-
|
|
797
|
+
Vr.value = ft(e, Vr.value), F("update:filters", Rt(Vr.value));
|
|
742
798
|
},
|
|
743
799
|
onColumnVisibilityChange: (e) => {
|
|
744
|
-
|
|
800
|
+
Hr.value = ft(e, Hr.value), F("update:hiddenColumns", Object.keys(Hr.value).filter((e) => Hr.value[e] === !1));
|
|
745
801
|
},
|
|
746
802
|
onColumnOrderChange: (e) => {
|
|
747
|
-
|
|
803
|
+
Ur.value = ft(e, Ur.value), F("update:columnOrder", Ur.value);
|
|
748
804
|
},
|
|
749
805
|
onColumnPinningChange: (e) => {
|
|
750
|
-
|
|
751
|
-
start: [...
|
|
752
|
-
end: [...
|
|
806
|
+
Wr.value = ft(e, Wr.value), F("update:pinnedColumns", {
|
|
807
|
+
start: [...Wr.value.start],
|
|
808
|
+
end: [...Wr.value.end]
|
|
753
809
|
});
|
|
754
810
|
},
|
|
755
811
|
onColumnSizingChange: (e) => {
|
|
756
|
-
|
|
812
|
+
Gr.value = ft(e, Gr.value);
|
|
757
813
|
},
|
|
758
814
|
onGroupingChange: (e) => {
|
|
759
|
-
U.value =
|
|
815
|
+
U.value = ft(e, U.value), F("update:groupBy", U.value);
|
|
760
816
|
},
|
|
761
817
|
globalFilterFn: (e, t, n) => {
|
|
762
|
-
let r =
|
|
763
|
-
return
|
|
818
|
+
let r = B.value.get(t), i = S.value.locale;
|
|
819
|
+
return C.rowKeywords && !Cn.value && Nt(C.rowKeywords(e.original), n, i) ? !0 : r?.searchable !== !1 && Pt([V(r, e.getValue(t), e.original)], n, i);
|
|
764
820
|
},
|
|
765
|
-
getColumnCanGlobalFilter: (e) =>
|
|
821
|
+
getColumnCanGlobalFilter: (e) => !!C.rowKeywords || B.value.get(e.id)?.searchable !== !1,
|
|
766
822
|
enableColumnResizing: h(() => !!C.resizable),
|
|
767
823
|
columnResizeMode: "onChange",
|
|
768
824
|
groupedColumnMode: !1,
|
|
769
825
|
keepPinnedRows: !0,
|
|
770
826
|
enableRowSelection: (e) => !!C.selectable && !e.getIsGrouped() && (C.isRowSelectable?.(e.original) ?? !0),
|
|
771
827
|
enableMultiRowSelection: h(() => C.selectionMode !== "single"),
|
|
772
|
-
manualSorting:
|
|
773
|
-
manualFiltering:
|
|
774
|
-
manualPagination: h(() =>
|
|
775
|
-
rowCount: h(() =>
|
|
828
|
+
manualSorting: Mn,
|
|
829
|
+
manualFiltering: Mn,
|
|
830
|
+
manualPagination: h(() => Mn.value || !C.pageSize),
|
|
831
|
+
rowCount: h(() => Mn.value ? Nn.value : void 0)
|
|
776
832
|
});
|
|
777
|
-
function
|
|
778
|
-
|
|
833
|
+
function Zr(e) {
|
|
834
|
+
Nr.value = e, F("update:sorting", C.sortMode === "multiple" ? [...e] : e[0] ?? null);
|
|
779
835
|
}
|
|
780
|
-
function
|
|
836
|
+
function Qr(e) {
|
|
781
837
|
let t = e.pageSize !== H.value.pageSize;
|
|
782
838
|
H.value = e, t && F("update:pageSize", e.pageSize), F("update:page", e.pageIndex + 1), F("update:first", e.pageIndex * e.pageSize);
|
|
783
839
|
}
|
|
784
|
-
let
|
|
785
|
-
function
|
|
786
|
-
|
|
840
|
+
let $r = /* @__PURE__ */ new Map();
|
|
841
|
+
function ei(e) {
|
|
842
|
+
for (let t of e) {
|
|
843
|
+
let e = Fr(t);
|
|
844
|
+
e !== void 0 && $r.set(e, t);
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
ei(C.selectedRows ?? []);
|
|
848
|
+
function ti(e) {
|
|
849
|
+
Lr.value = e;
|
|
787
850
|
let t = Object.keys(e).filter((t) => e[t]);
|
|
788
851
|
F("update:selection", t);
|
|
789
852
|
let n = K.getCoreRowModel().rowsById;
|
|
790
|
-
for (let t of [
|
|
791
|
-
for (let e of t) n[e] &&
|
|
792
|
-
|
|
853
|
+
for (let t of [...$r.keys()]) e[t] || $r.delete(t);
|
|
854
|
+
for (let e of t) n[e] && $r.set(e, n[e].original);
|
|
855
|
+
let r = t.flatMap((e) => $r.has(e) ? [$r.get(e)] : []);
|
|
856
|
+
F("selectedRowsChange", r), F("update:selectedRows", r);
|
|
793
857
|
}
|
|
794
|
-
function
|
|
795
|
-
|
|
858
|
+
function ni(e) {
|
|
859
|
+
Rr.value = e, F("update:allSelection", e);
|
|
796
860
|
}
|
|
797
|
-
function
|
|
798
|
-
|
|
861
|
+
function ri(e) {
|
|
862
|
+
zr.value = e, F("update:showFilters", e);
|
|
799
863
|
}
|
|
800
|
-
|
|
801
|
-
|
|
864
|
+
let ii = () => ri(!zr.value);
|
|
865
|
+
function ai(e) {
|
|
866
|
+
Br.value = e, F("update:expanded", e === !0 ? [] : Object.keys(e).filter((t) => e[t]));
|
|
802
867
|
}
|
|
803
|
-
function
|
|
804
|
-
|
|
868
|
+
function oi(e) {
|
|
869
|
+
Kr.value = e, F("update:size", e);
|
|
805
870
|
}
|
|
806
|
-
let
|
|
807
|
-
size:
|
|
871
|
+
let si = h(() => ({
|
|
872
|
+
size: Kr.value,
|
|
808
873
|
gridlines: !!C.gridlines,
|
|
874
|
+
bordered: !!C.bordered,
|
|
875
|
+
paginatorAlign: Ht(C.paginatorAlign),
|
|
809
876
|
striped: !!C.striped,
|
|
810
877
|
scrollable: !!C.scrollHeight,
|
|
811
878
|
wrapHeaders: !!C.wrapHeaders,
|
|
812
879
|
verticalHeaders: !!C.verticalHeaders
|
|
813
|
-
})),
|
|
814
|
-
...
|
|
815
|
-
fullscreen:
|
|
880
|
+
})), ci = k(!1), q = h(() => C.navigation === "grid"), li = h(() => q.value && !!C.getSubRows), J = h(() => ce({
|
|
881
|
+
...si.value,
|
|
882
|
+
fullscreen: ci.value,
|
|
816
883
|
grid: q.value
|
|
817
|
-
})),
|
|
818
|
-
let t =
|
|
819
|
-
return
|
|
820
|
-
...
|
|
884
|
+
})), ui = le(), di = (e) => {
|
|
885
|
+
let t = B.value.get(e);
|
|
886
|
+
return ce({
|
|
887
|
+
...si.value,
|
|
821
888
|
align: t?.align,
|
|
822
889
|
hideBelow: t?.hideBelow ? `hide-${t.hideBelow}` : void 0
|
|
823
890
|
});
|
|
824
|
-
}
|
|
891
|
+
};
|
|
892
|
+
function fi(e, t) {
|
|
893
|
+
let n = B.value.get(e)?.cellClass;
|
|
894
|
+
return typeof n == "function" ? t && !t.getIsGrouped() ? n(t.original) : void 0 : n;
|
|
895
|
+
}
|
|
896
|
+
let pi = h(() => In.value.some((e) => e.editable)), mi = h(() => C.editMode !== "row"), hi = h(() => !!C.rowActions || C.editMode === "row" && pi.value), gi = h(() => {
|
|
825
897
|
let e = [];
|
|
826
898
|
return C.reorderableRows && e.push("drag"), C.selectable && e.push("select"), I.expansion && e.push("expand"), C.rowNumbers && e.push("number"), e;
|
|
827
|
-
}),
|
|
828
|
-
function
|
|
899
|
+
}), _i = h(() => hi.value ? ["actions"] : []), Y = h(() => K.getVisibleLeafColumns()), vi = h(() => Y.value.length + gi.value.length + _i.value.length), yi = h(() => !!C.resizable || In.value.some((e) => e.width) || Wr.value.start.length > 0 || Wr.value.end.length > 0), bi = h(() => Wr.value.start.length > 0), xi = h(() => Wr.value.end.length > 0), Si = h(() => gi.value.reduce((e, t) => e + _n[t], 0)), Ci = h(() => _i.value.reduce((e, t) => e + _n[t], 0));
|
|
900
|
+
function wi(e, t) {
|
|
829
901
|
let n = K.getColumn(e), r = n?.getIsPinned();
|
|
830
902
|
if (!n || !r) return "";
|
|
831
903
|
let i = r === "start" ? K.getStartVisibleLeafColumns().at(-1)?.id === e && J.value.pinnedStartEdge() : K.getEndVisibleLeafColumns()[0]?.id === e && J.value.pinnedEndEdge();
|
|
832
904
|
return [t ? J.value.pinnedHead() : J.value.pinned(), i].filter(Boolean).join(" ");
|
|
833
905
|
}
|
|
834
|
-
function
|
|
906
|
+
function Ti(e, t) {
|
|
835
907
|
let n = K.getColumn(e);
|
|
836
|
-
if (!n || !
|
|
908
|
+
if (!n || !yi.value) return;
|
|
837
909
|
let r = n.getIsPinned();
|
|
838
910
|
return {
|
|
839
911
|
...t ? { width: `${n.getSize()}px` } : {},
|
|
840
|
-
...r === "start" ? { insetInlineStart: `${
|
|
841
|
-
...r === "end" ? { insetInlineEnd: `${
|
|
912
|
+
...r === "start" ? { insetInlineStart: `${Si.value + n.getStart("start")}px` } : {},
|
|
913
|
+
...r === "end" ? { insetInlineEnd: `${Ci.value + n.getAfter("end")}px` } : {}
|
|
842
914
|
};
|
|
843
915
|
}
|
|
844
|
-
let
|
|
845
|
-
function
|
|
846
|
-
return [e === "select" ? J.value.selectCell() : J.value.utilityCell(),
|
|
916
|
+
let Ei = (e) => _i.value.includes(e) ? xi.value : bi.value;
|
|
917
|
+
function Di(e, t) {
|
|
918
|
+
return [e === "select" ? J.value.selectCell() : J.value.utilityCell(), Ei(e) ? t ? J.value.pinnedHead() : J.value.pinned() : ""].filter(Boolean).join(" ");
|
|
847
919
|
}
|
|
848
|
-
function
|
|
849
|
-
if (!
|
|
850
|
-
let t = { width: `${
|
|
851
|
-
if (!
|
|
852
|
-
if (
|
|
920
|
+
function Oi(e) {
|
|
921
|
+
if (!yi.value) return;
|
|
922
|
+
let t = { width: `${_n[e]}px` };
|
|
923
|
+
if (!Ei(e)) return t;
|
|
924
|
+
if (_i.value.includes(e)) return {
|
|
853
925
|
...t,
|
|
854
926
|
insetInlineEnd: "0px"
|
|
855
927
|
};
|
|
856
|
-
let n =
|
|
928
|
+
let n = gi.value.slice(0, gi.value.indexOf(e));
|
|
857
929
|
return {
|
|
858
930
|
...t,
|
|
859
|
-
insetInlineStart: `${n.reduce((e, t) => e +
|
|
931
|
+
insetInlineStart: `${n.reduce((e, t) => e + _n[t], 0)}px`
|
|
860
932
|
};
|
|
861
933
|
}
|
|
862
|
-
let
|
|
934
|
+
let ki = h(() => {
|
|
863
935
|
let e = K.getHeaderGroups(), t = /* @__PURE__ */ new Map();
|
|
864
936
|
e.forEach((e, n) => e.headers.forEach((e) => {
|
|
865
937
|
e.isPlaceholder || t.set(e.column.id, n);
|
|
@@ -878,33 +950,33 @@ var Mn = An({
|
|
|
878
950
|
group: o.subHeaders.length > 0
|
|
879
951
|
}];
|
|
880
952
|
}));
|
|
881
|
-
}), X = (e) =>
|
|
882
|
-
let t =
|
|
883
|
-
return t?.id === e ? t.desc ? "descending" : "ascending" :
|
|
884
|
-
},
|
|
885
|
-
function
|
|
886
|
-
|
|
887
|
-
}
|
|
888
|
-
let
|
|
889
|
-
|
|
890
|
-
},
|
|
891
|
-
function
|
|
892
|
-
return !!C.reorderableColumns &&
|
|
893
|
-
}
|
|
894
|
-
function
|
|
895
|
-
let t =
|
|
953
|
+
}), X = (e) => B.value.get(e.id)?.header ?? e.id, Ai = (e) => B.value.get(e.id)?.headerHidden ? J.value.srOnly() : J.value.headLabel(), ji = (e) => !!B.value.get(e)?.sortable, Mi = (e) => {
|
|
954
|
+
let t = Nr.value[0];
|
|
955
|
+
return t?.id === e ? t.desc ? "descending" : "ascending" : ji(e) ? "none" : void 0;
|
|
956
|
+
}, Ni = (e) => Nr.value.findIndex((t) => t.id === e) + 1;
|
|
957
|
+
function Pi(e, t) {
|
|
958
|
+
Zr(zt(Nr.value, e, C.sortMode === "multiple" && t.shiftKey));
|
|
959
|
+
}
|
|
960
|
+
let Fi = h(() => !!C.columnMenu || !!C.reorderableColumns), Ii = k(""), Li = (e) => {
|
|
961
|
+
Ii.value = "", T(() => Ii.value = e);
|
|
962
|
+
}, Ri = () => K.getAllLeafColumns().map((e) => e.id);
|
|
963
|
+
function zi(e) {
|
|
964
|
+
return !!C.reorderableColumns && B.value.get(e)?.reorderable !== !1;
|
|
965
|
+
}
|
|
966
|
+
function Bi(e) {
|
|
967
|
+
let t = B.value.get(e.id), n = e.getIsSorted(), r = e.getIsPinned(), i = Y.value.map((e) => e.id), a = i.indexOf(e.id);
|
|
896
968
|
return [
|
|
897
|
-
e.
|
|
969
|
+
ji(e.id) ? [
|
|
898
970
|
{
|
|
899
971
|
value: "sort-asc",
|
|
900
972
|
label: L.sortAscending,
|
|
901
|
-
icon:
|
|
973
|
+
icon: Se,
|
|
902
974
|
disabled: n === "asc"
|
|
903
975
|
},
|
|
904
976
|
{
|
|
905
977
|
value: "sort-desc",
|
|
906
978
|
label: L.sortDescending,
|
|
907
|
-
icon:
|
|
979
|
+
icon: xe,
|
|
908
980
|
disabled: n === "desc"
|
|
909
981
|
},
|
|
910
982
|
...n ? [{
|
|
@@ -926,7 +998,7 @@ var Mn = An({
|
|
|
926
998
|
label: L.unpin
|
|
927
999
|
}] : []
|
|
928
1000
|
],
|
|
929
|
-
|
|
1001
|
+
zi(e.id) ? [{
|
|
930
1002
|
value: "move-earlier",
|
|
931
1003
|
label: L.moveEarlier,
|
|
932
1004
|
disabled: a <= 0
|
|
@@ -947,13 +1019,13 @@ var Mn = An({
|
|
|
947
1019
|
}] : []]
|
|
948
1020
|
].filter((e) => e.length).flatMap((e, t) => t ? [{ type: "separator" }, ...e] : e);
|
|
949
1021
|
}
|
|
950
|
-
function
|
|
951
|
-
let r =
|
|
1022
|
+
function Vi(e, t, n) {
|
|
1023
|
+
let r = Ri().filter((t) => t !== e);
|
|
952
1024
|
r.splice(r.indexOf(t) + +!!n, 0, e), K.setColumnOrder(r);
|
|
953
1025
|
let i = Y.value.map((e) => e.id).filter((t) => t !== e);
|
|
954
|
-
i.splice(i.indexOf(t) + +!!n, 0, e),
|
|
1026
|
+
i.splice(i.indexOf(t) + +!!n, 0, e), Li(L.columnMoved(B.value.get(e)?.header ?? e, i.indexOf(e) + 1, i.length));
|
|
955
1027
|
}
|
|
956
|
-
async function
|
|
1028
|
+
async function Hi(e, t) {
|
|
957
1029
|
let n = Y.value.map((e) => e.id), r = n.indexOf(e.id);
|
|
958
1030
|
switch (t) {
|
|
959
1031
|
case "sort-asc":
|
|
@@ -962,11 +1034,11 @@ var Mn = An({
|
|
|
962
1034
|
id: e.id,
|
|
963
1035
|
desc: t === "sort-desc"
|
|
964
1036
|
};
|
|
965
|
-
C.sortMode === "multiple" ?
|
|
1037
|
+
C.sortMode === "multiple" ? Ni(e.id) ? Zr(Nr.value.map((t) => t.id === e.id ? n : t)) : Zr([...Nr.value, n]) : Zr([n]);
|
|
966
1038
|
break;
|
|
967
1039
|
}
|
|
968
1040
|
case "sort-clear":
|
|
969
|
-
|
|
1041
|
+
Zr(Nr.value.filter((t) => t.id !== e.id));
|
|
970
1042
|
break;
|
|
971
1043
|
case "pin-start":
|
|
972
1044
|
case "pin-end":
|
|
@@ -974,10 +1046,10 @@ var Mn = An({
|
|
|
974
1046
|
e.pin(t === "unpin" ? !1 : t === "pin-start" ? "start" : "end");
|
|
975
1047
|
break;
|
|
976
1048
|
case "move-earlier":
|
|
977
|
-
|
|
1049
|
+
Vi(e.id, n[r - 1], !1);
|
|
978
1050
|
break;
|
|
979
1051
|
case "move-later":
|
|
980
|
-
|
|
1052
|
+
Vi(e.id, n[r + 1], !0);
|
|
981
1053
|
break;
|
|
982
1054
|
case "group":
|
|
983
1055
|
K.setGrouping([...U.value, e.id]);
|
|
@@ -986,109 +1058,109 @@ var Mn = An({
|
|
|
986
1058
|
K.setGrouping(U.value.filter((t) => t !== e.id));
|
|
987
1059
|
break;
|
|
988
1060
|
case "hide": {
|
|
989
|
-
e.toggleVisibility(!1), await
|
|
990
|
-
let t =
|
|
1061
|
+
e.toggleVisibility(!1), await T();
|
|
1062
|
+
let t = Oo.value?.querySelectorAll("[data-column-menu]");
|
|
991
1063
|
t?.[Math.min(r, t.length - 1)]?.focus();
|
|
992
1064
|
return;
|
|
993
1065
|
}
|
|
994
1066
|
}
|
|
995
|
-
await
|
|
1067
|
+
await T(), Oo.value?.querySelector(`[data-column-menu="${e.id}"]`)?.focus();
|
|
996
1068
|
}
|
|
997
|
-
let
|
|
998
|
-
function
|
|
999
|
-
|
|
1069
|
+
let Ui = k(null), Wi = k(null);
|
|
1070
|
+
function Gi(e, t) {
|
|
1071
|
+
Ui.value = e, t.dataTransfer?.setData("text/plain", e), t.dataTransfer && (t.dataTransfer.effectAllowed = "move");
|
|
1000
1072
|
}
|
|
1001
|
-
function
|
|
1002
|
-
if (!
|
|
1073
|
+
function Ki(e, t) {
|
|
1074
|
+
if (!Ui.value || Ui.value === e || !zi(e)) return;
|
|
1003
1075
|
t.preventDefault();
|
|
1004
1076
|
let n = t.currentTarget, r = n.getBoundingClientRect(), i = getComputedStyle(n).direction === "rtl", a = t.clientX > r.left + r.width / 2;
|
|
1005
|
-
|
|
1077
|
+
Wi.value = {
|
|
1006
1078
|
id: e,
|
|
1007
1079
|
after: i ? !a : a
|
|
1008
1080
|
};
|
|
1009
1081
|
}
|
|
1010
|
-
function
|
|
1011
|
-
e.preventDefault(),
|
|
1082
|
+
function qi(e) {
|
|
1083
|
+
e.preventDefault(), Ui.value && Wi.value && Vi(Ui.value, Wi.value.id, Wi.value.after), Ji();
|
|
1012
1084
|
}
|
|
1013
|
-
function
|
|
1014
|
-
|
|
1085
|
+
function Ji() {
|
|
1086
|
+
Ui.value = null, Wi.value = null;
|
|
1015
1087
|
}
|
|
1016
|
-
let
|
|
1017
|
-
function
|
|
1088
|
+
let Yi = (e) => Wi.value?.id === e ? Wi.value.after ? "after" : "before" : void 0;
|
|
1089
|
+
function Xi(e, t) {
|
|
1018
1090
|
let n = t.currentTarget.closest("th"), r = n?.closest("table");
|
|
1019
1091
|
if (!n || !r) return;
|
|
1020
|
-
let i =
|
|
1092
|
+
let i = B.value.get(e), a = $.value && i ? K.getRowModel().rows.map((t) => V(i, t.getValue(e), t.original)) : void 0, o = ht(r, n, a);
|
|
1021
1093
|
o && K.setColumnSizing((t) => ({
|
|
1022
1094
|
...t,
|
|
1023
|
-
[e]: Math.min(1200, Math.max(
|
|
1095
|
+
[e]: Math.min(1200, Math.max(Er, o))
|
|
1024
1096
|
}));
|
|
1025
1097
|
}
|
|
1026
|
-
function
|
|
1027
|
-
if (t.key === "Enter") return t.preventDefault(),
|
|
1028
|
-
let n =
|
|
1098
|
+
function Zi(e, t) {
|
|
1099
|
+
if (t.key === "Enter") return t.preventDefault(), Xi(e, t);
|
|
1100
|
+
let n = xt(t.key, t.currentTarget) * Dr;
|
|
1029
1101
|
if (!n) return;
|
|
1030
1102
|
t.preventDefault();
|
|
1031
1103
|
let r = K.getColumn(e);
|
|
1032
1104
|
K.setColumnSizing((t) => ({
|
|
1033
1105
|
...t,
|
|
1034
|
-
[e]: Math.max(
|
|
1106
|
+
[e]: Math.max(Er, r.getSize() + n)
|
|
1035
1107
|
}));
|
|
1036
1108
|
}
|
|
1037
|
-
let
|
|
1038
|
-
function
|
|
1039
|
-
return e.filterOptions ?? [...new Set(
|
|
1109
|
+
let Qi = (e) => !!I[`filter-${e}`], $i = (e) => !!e && (!!e.filter || Qi(e.id)), ea = h(() => C.filterDisplay === "row" && zr.value && In.value.some((e) => $i(e))), ta = h(() => C.filterDisplay === "menu" && zr.value), na = h(() => !!W.value || Vr.value.length > 0 || Dn.value), ra = (e) => Vr.value.find((t) => t.id === e)?.value;
|
|
1110
|
+
function ia(e) {
|
|
1111
|
+
return e.filterOptions ?? [...new Set(An.value.map((t) => V(e, Ar(e, t), t)))].filter(Boolean).sort();
|
|
1040
1112
|
}
|
|
1041
|
-
function
|
|
1042
|
-
let t =
|
|
1113
|
+
function aa(e) {
|
|
1114
|
+
let t = ra(e.id);
|
|
1043
1115
|
return t === void 0 ? e.filter === "multiSelect" ? [] : null : typeof t == "string" ? t : t.constraints[0]?.value ?? null;
|
|
1044
1116
|
}
|
|
1045
|
-
function
|
|
1046
|
-
K.getColumn(e)?.setFilterValue(t !== void 0 &&
|
|
1117
|
+
function oa(e, t) {
|
|
1118
|
+
K.getColumn(e)?.setFilterValue(t !== void 0 && Ct(t) ? t : void 0);
|
|
1047
1119
|
}
|
|
1048
|
-
let
|
|
1049
|
-
function
|
|
1120
|
+
let sa = (e) => e.filterMatchMode ?? (jr(e) && e.filter === "multiSelect" ? "in" : st[e.filter ?? "text"][0]), ca = (e) => Ot(sa(e))?.input ?? e.filter ?? "text";
|
|
1121
|
+
function la(e, t) {
|
|
1050
1122
|
let n = e.filter ?? "text";
|
|
1051
|
-
if ((n === "text" || n === "select") && !e.filterMatchMode && !
|
|
1052
|
-
|
|
1123
|
+
if ((n === "text" || n === "select") && !e.filterMatchMode && !jr(e) && !Qi(e.id)) return oa(e.id, kt(t));
|
|
1124
|
+
oa(e.id, {
|
|
1053
1125
|
operator: "and",
|
|
1054
1126
|
constraints: [{
|
|
1055
|
-
matchMode:
|
|
1127
|
+
matchMode: sa(e),
|
|
1056
1128
|
value: t
|
|
1057
1129
|
}]
|
|
1058
1130
|
});
|
|
1059
1131
|
}
|
|
1060
|
-
function
|
|
1061
|
-
let r =
|
|
1062
|
-
i[t] = n,
|
|
1132
|
+
function ua(e, t, n) {
|
|
1133
|
+
let r = aa(e), i = Array.isArray(r) ? [...r] : [null, null];
|
|
1134
|
+
i[t] = n, la(e, i);
|
|
1063
1135
|
}
|
|
1064
|
-
let
|
|
1065
|
-
let n =
|
|
1136
|
+
let da = (e, t) => {
|
|
1137
|
+
let n = aa(e);
|
|
1066
1138
|
return Array.isArray(n) ? n[t] : null;
|
|
1067
|
-
},
|
|
1068
|
-
function
|
|
1069
|
-
|
|
1139
|
+
}, fa = h(() => C.selectionMode !== "single"), pa = h(() => C.selectAllMode === "all" && Mn.value), ma = (e) => pa.value && Rr.value ? e.getCanSelect() && !Rr.value.except.includes(e.id) : e.getIsSelected(), ha = h(() => pa.value ? Rr.value ? !Rr.value.except.length || "indeterminate" : sc.value ? "indeterminate" : !1 : K.getIsAllPageRowsSelected() ? !0 : K.getIsSomePageRowsSelected() ? "indeterminate" : !1);
|
|
1140
|
+
function ga(e) {
|
|
1141
|
+
pa.value ? (ti({}), ni(Rr.value || !e ? null : {
|
|
1070
1142
|
mode: "all",
|
|
1071
1143
|
except: []
|
|
1072
1144
|
})) : C.selectAllMode === "all" ? K.toggleAllRowsSelected(e) : K.toggleAllPageRowsSelected(e);
|
|
1073
1145
|
}
|
|
1074
|
-
let
|
|
1075
|
-
function
|
|
1076
|
-
if (
|
|
1077
|
-
let r = new Set(
|
|
1078
|
-
for (let i of n &&
|
|
1079
|
-
|
|
1146
|
+
let _a = `${tt}-select`, va = null, ya = !1, ba = () => K.getRowModel().rows.filter((e) => e.getCanSelect()).map((e) => e.id);
|
|
1147
|
+
function xa(e, t, n = !1) {
|
|
1148
|
+
if (pa.value && Rr.value) {
|
|
1149
|
+
let r = new Set(Rr.value.except);
|
|
1150
|
+
for (let i of n && va ? bt(ba(), va, e.id) : [e.id]) t ? r.delete(i) : r.add(i);
|
|
1151
|
+
ni({
|
|
1080
1152
|
mode: "all",
|
|
1081
1153
|
except: [...r]
|
|
1082
1154
|
});
|
|
1083
|
-
} else
|
|
1084
|
-
|
|
1155
|
+
} else fa.value ? ti(gn(Lr.value, n && va ? bt(ba(), va, e.id) : [e.id], t)) : ti(t ? hn([e.id]) : {});
|
|
1156
|
+
va = e.id;
|
|
1085
1157
|
}
|
|
1086
|
-
function
|
|
1087
|
-
|
|
1158
|
+
function Sa(e) {
|
|
1159
|
+
ya = e.shiftKey;
|
|
1088
1160
|
}
|
|
1089
|
-
function
|
|
1161
|
+
function Ca(e, t) {
|
|
1090
1162
|
let n = t.target, r = !!n.closest("[data-row-link]");
|
|
1091
|
-
if (!r && n.closest(
|
|
1163
|
+
if (!r && n.closest(kr)) return;
|
|
1092
1164
|
let i = C.rowHref?.(e.original);
|
|
1093
1165
|
if (F("rowClick", {
|
|
1094
1166
|
row: e.original,
|
|
@@ -1098,16 +1170,16 @@ var Mn = An({
|
|
|
1098
1170
|
}), i) {
|
|
1099
1171
|
if (r || t.defaultPrevented) return;
|
|
1100
1172
|
t.ctrlKey || t.metaKey || t.shiftKey ? window.open(i, "_blank", "noopener") : window.location.assign(i);
|
|
1101
|
-
} else C.selectOnRowClick && e.getCanSelect() &&
|
|
1173
|
+
} else C.selectOnRowClick && e.getCanSelect() && xa(e, !fa.value || !ma(e), fa.value && t.shiftKey);
|
|
1102
1174
|
}
|
|
1103
|
-
function
|
|
1175
|
+
function wa(e, t) {
|
|
1104
1176
|
let n = C.rowHref?.(e.original), r = t.target;
|
|
1105
|
-
t.button === 1 && n && !r.closest(
|
|
1177
|
+
t.button === 1 && n && !r.closest(kr) && window.open(n, "_blank", "noopener");
|
|
1106
1178
|
}
|
|
1107
|
-
let
|
|
1108
|
-
let t =
|
|
1109
|
-
return !t?.copyable && !(
|
|
1110
|
-
})?.id : void 0),
|
|
1179
|
+
let Ta = h(() => C.rowHref ? Y.value.find((e) => {
|
|
1180
|
+
let t = B.value.get(e.id);
|
|
1181
|
+
return !t?.copyable && !(mi.value && t?.editable);
|
|
1182
|
+
})?.id : void 0), Ea = (e, t) => t === Ta.value ? C.rowHref?.(e.original) : void 0, Da = h(() => C.frozenRows?.length ? K.getCenterRows() : K.getRowModel().rows), Oa = h(() => C.frozenRows?.length ? K.getTopRows() : []), Z = h(() => (Pn.value ? vn : Da.value).flatMap((e) => e.getIsGrouped() ? [{
|
|
1111
1183
|
kind: "group",
|
|
1112
1184
|
row: e,
|
|
1113
1185
|
key: e.id
|
|
@@ -1115,71 +1187,71 @@ var Mn = An({
|
|
|
1115
1187
|
kind: "row",
|
|
1116
1188
|
row: e,
|
|
1117
1189
|
key: e.id
|
|
1118
|
-
}, ...I.expansion && e.getIsExpanded() ? [{
|
|
1190
|
+
}, ...I.expansion && e.getCanExpand() && e.getIsExpanded() ? [{
|
|
1119
1191
|
kind: "expansion",
|
|
1120
1192
|
row: e,
|
|
1121
1193
|
key: `${e.id}:details`
|
|
1122
|
-
}] : []])),
|
|
1194
|
+
}] : []])), ka = h(() => C.pageSize && !Mn.value ? H.value.pageIndex * H.value.pageSize : 0), Aa = h(() => {
|
|
1123
1195
|
let e = /* @__PURE__ */ new Map();
|
|
1124
|
-
return Z.value.filter((e) => e.kind === "row").forEach((t, n) => e.set(t.row.id,
|
|
1125
|
-
}),
|
|
1126
|
-
function
|
|
1127
|
-
return t == null ? "" : e.format && n ? e.format(t, n) : typeof t == "number" ? new Intl.NumberFormat(S.value.locale, { maximumFractionDigits: 2 }).format(t) :
|
|
1196
|
+
return Z.value.filter((e) => e.kind === "row").forEach((t, n) => e.set(t.row.id, ka.value + n + 1)), e;
|
|
1197
|
+
}), ja = (e) => `${tt}-details-${e.id}`, Ma = h(() => K.getIsAllRowsExpanded()), Na = h(() => In.value.some((e) => e.aggregate)), Pa = h(() => In.value.some((e) => e.aggregate || e.footer));
|
|
1198
|
+
function Fa(e, t, n) {
|
|
1199
|
+
return t == null ? "" : e.format && n ? e.format(t, n) : typeof t == "number" ? new Intl.NumberFormat(S.value.locale, { maximumFractionDigits: 2 }).format(t) : kt(t);
|
|
1128
1200
|
}
|
|
1129
|
-
function
|
|
1201
|
+
function Ia(e, t) {
|
|
1130
1202
|
if (!e.aggregate) return "";
|
|
1131
1203
|
let n = t.filter((e) => !e.getIsGrouped());
|
|
1132
|
-
return
|
|
1204
|
+
return Fa(e, Je(n.map((t) => Ar(e, t.original)), e.aggregate), e.aggregate === "count" ? void 0 : n[0]?.original);
|
|
1133
1205
|
}
|
|
1134
|
-
function
|
|
1206
|
+
function La(e) {
|
|
1135
1207
|
if (e.footer !== void 0) return e.footer;
|
|
1136
1208
|
if (!e.aggregate) return "";
|
|
1137
|
-
let t =
|
|
1209
|
+
let t = Ia(e, K.getFilteredRowModel().flatRows);
|
|
1138
1210
|
return typeof e.aggregate == "string" ? L.aggregates[e.aggregate]?.(t) ?? t : t;
|
|
1139
1211
|
}
|
|
1140
|
-
let
|
|
1141
|
-
function
|
|
1212
|
+
let Ra = (e) => typeof C.rowActions == "function" ? C.rowActions(e.original) : C.rowActions ?? [], za = he(null);
|
|
1213
|
+
function Ba(e) {
|
|
1142
1214
|
let t = e.target.closest("[data-row-id]");
|
|
1143
|
-
|
|
1215
|
+
za.value = t ? K.getRow(t.dataset.rowId, !0) ?? null : null;
|
|
1144
1216
|
}
|
|
1145
|
-
function
|
|
1217
|
+
function Va(e, t) {
|
|
1146
1218
|
e && F("rowAction", {
|
|
1147
1219
|
value: t,
|
|
1148
1220
|
row: e.original,
|
|
1149
1221
|
rowId: e.id
|
|
1150
1222
|
});
|
|
1151
1223
|
}
|
|
1152
|
-
let
|
|
1224
|
+
let Ha = (e, { slots: t, emit: n }) => e.enabled ? se(c, {
|
|
1153
1225
|
items: e.items,
|
|
1154
1226
|
label: e.label,
|
|
1155
1227
|
onSelect: (e) => n("select", e)
|
|
1156
1228
|
}, t) : t.default?.();
|
|
1157
|
-
|
|
1229
|
+
Ha.props = [
|
|
1158
1230
|
"enabled",
|
|
1159
1231
|
"items",
|
|
1160
1232
|
"label"
|
|
1161
|
-
],
|
|
1162
|
-
let
|
|
1163
|
-
function
|
|
1233
|
+
], Ha.emits = ["select"];
|
|
1234
|
+
let Ua = (e, { slots: t }) => t.default?.();
|
|
1235
|
+
function Wa(e) {
|
|
1164
1236
|
try {
|
|
1165
1237
|
return K.getRow(e, !0) ?? void 0;
|
|
1166
1238
|
} catch {
|
|
1167
1239
|
return;
|
|
1168
1240
|
}
|
|
1169
1241
|
}
|
|
1170
|
-
let
|
|
1171
|
-
let n =
|
|
1172
|
-
return `${n?.header ?? t}: ${
|
|
1173
|
-
}).join(", "),
|
|
1174
|
-
function
|
|
1242
|
+
let Ga = k(null), Ka = k(null), qa = k(null), Ja = null, Ya = h(() => !!C.getSubRows), Xa = h(() => U.value.length > 0), Za = (e) => U.value.map((t) => Tt(e.getValue(t))).join("\0"), Qa = (e) => U.value.map((t) => {
|
|
1243
|
+
let n = B.value.get(t);
|
|
1244
|
+
return `${n?.header ?? t}: ${V(n, e.getValue(t), e.original)}`;
|
|
1245
|
+
}).join(", "), $a = () => Z.value.filter((e) => e.kind === "row" && (Xa.value || e.row.depth === 0)).map((e) => e.row);
|
|
1246
|
+
function eo() {
|
|
1175
1247
|
let e = (t) => t.map((t) => ({
|
|
1176
1248
|
id: t.id,
|
|
1177
1249
|
...C.getSubRows?.(t.original) ? { children: e(t.subRows) } : {}
|
|
1178
1250
|
}));
|
|
1179
1251
|
return e(K.getCoreRowModel().rows);
|
|
1180
1252
|
}
|
|
1181
|
-
function
|
|
1182
|
-
let r = (e, t) => e < t ? t - 1 : t, i = e.index, a = r(i, t.index + +!!n), o =
|
|
1253
|
+
function to(e, t, n) {
|
|
1254
|
+
let r = (e, t) => e < t ? t - 1 : t, i = e.index, a = r(i, t.index + +!!n), o = Xa.value && Za(e) !== Za(t);
|
|
1183
1255
|
if (i === a && !o) return;
|
|
1184
1256
|
let s = o ? Object.fromEntries(U.value.map((e) => [e, t.getValue(e)])) : void 0;
|
|
1185
1257
|
F("rowReorder", {
|
|
@@ -1189,12 +1261,12 @@ var Mn = An({
|
|
|
1189
1261
|
to: a,
|
|
1190
1262
|
...s ? { group: s } : {}
|
|
1191
1263
|
});
|
|
1192
|
-
let c =
|
|
1193
|
-
|
|
1264
|
+
let c = $a().filter((n) => n.id !== e.id && (!Xa.value || Za(n) === Za(t))).map((e) => e.id), l = c.indexOf(t.id) + +!!n + 1, u = G(e.original, e.index);
|
|
1265
|
+
Li(o ? L.rowMovedToGroup(u, Qa(t), l, c.length + 1) : L.rowMoved(u, l, c.length + 1));
|
|
1194
1266
|
}
|
|
1195
|
-
function
|
|
1267
|
+
function no(e, t) {
|
|
1196
1268
|
if (!t) return;
|
|
1197
|
-
let n =
|
|
1269
|
+
let n = eo(), r = t.parentId ? Wa(t.parentId) : void 0, i = t.parentId ? Dt(n, t.parentId)?.node.children ?? [] : n;
|
|
1198
1270
|
F("rowReorder", {
|
|
1199
1271
|
row: e.original,
|
|
1200
1272
|
rowId: e.id,
|
|
@@ -1202,89 +1274,89 @@ var Mn = An({
|
|
|
1202
1274
|
to: t.index,
|
|
1203
1275
|
parentId: t.parentId,
|
|
1204
1276
|
index: t.index
|
|
1205
|
-
}), r && !r.getIsExpanded() && r.toggleExpanded(!0),
|
|
1277
|
+
}), r && !r.getIsExpanded() && r.toggleExpanded(!0), Li(L.rowMovedInTree(G(e.original, e.index), r ? G(r.original, r.index) : null, t.index + 1, i.filter((t) => t.id !== e.id).length + 1));
|
|
1206
1278
|
}
|
|
1207
|
-
function
|
|
1208
|
-
if (
|
|
1279
|
+
function ro(e, t) {
|
|
1280
|
+
if (Ya.value) {
|
|
1209
1281
|
let n = getComputedStyle(t.currentTarget).direction === "rtl", r = t.key === "ArrowUp" ? "up" : t.key === "ArrowDown" ? "down" : t.key === "ArrowRight" ? n ? "out" : "in" : t.key === "ArrowLeft" ? n ? "in" : "out" : void 0;
|
|
1210
1282
|
if (!r) return;
|
|
1211
|
-
t.preventDefault(),
|
|
1283
|
+
t.preventDefault(), Ja = e.id, no(e, pn(eo(), e.id, r));
|
|
1212
1284
|
return;
|
|
1213
1285
|
}
|
|
1214
1286
|
if (t.key !== "ArrowUp" && t.key !== "ArrowDown") return;
|
|
1215
1287
|
t.preventDefault();
|
|
1216
|
-
let n =
|
|
1217
|
-
if (
|
|
1218
|
-
let r =
|
|
1288
|
+
let n = $a();
|
|
1289
|
+
if (Xa.value) {
|
|
1290
|
+
let r = vt(n.map((e) => ({
|
|
1219
1291
|
id: e.id,
|
|
1220
|
-
group:
|
|
1221
|
-
})), e.id, t.key === "ArrowUp" ? "up" : "down"), i = r &&
|
|
1292
|
+
group: Za(e)
|
|
1293
|
+
})), e.id, t.key === "ArrowUp" ? "up" : "down"), i = r && Wa(r.targetId);
|
|
1222
1294
|
if (!r || !i) return;
|
|
1223
|
-
|
|
1295
|
+
Ja = e.id, to(e, i, r.after);
|
|
1224
1296
|
return;
|
|
1225
1297
|
}
|
|
1226
1298
|
let r = n[n.indexOf(e) + (t.key === "ArrowUp" ? -1 : 1)];
|
|
1227
|
-
r && (
|
|
1299
|
+
r && (Ja = e.id, to(e, r, t.key === "ArrowDown"));
|
|
1228
1300
|
}
|
|
1229
|
-
|
|
1230
|
-
if (!
|
|
1231
|
-
let e =
|
|
1232
|
-
|
|
1301
|
+
be(An, async () => {
|
|
1302
|
+
if (!Ja) return;
|
|
1303
|
+
let e = Ja;
|
|
1304
|
+
Ja = null, await T(), Oo.value?.querySelector(`[data-drag-handle="${CSS.escape(e)}"]`)?.focus();
|
|
1233
1305
|
});
|
|
1234
|
-
function
|
|
1235
|
-
if (
|
|
1236
|
-
|
|
1306
|
+
function io(e, t) {
|
|
1307
|
+
if (Ka.value !== e.id) return t.preventDefault();
|
|
1308
|
+
Ga.value = e.id, t.dataTransfer?.setData("text/plain", e.id), t.dataTransfer && (t.dataTransfer.effectAllowed = "move");
|
|
1237
1309
|
}
|
|
1238
|
-
function
|
|
1239
|
-
if (!
|
|
1310
|
+
function ao(e, t) {
|
|
1311
|
+
if (!Ga.value || Ga.value === e.id) return;
|
|
1240
1312
|
let n = t.currentTarget.getBoundingClientRect(), r = (t.clientY - n.top) / n.height;
|
|
1241
|
-
if (
|
|
1313
|
+
if (Ya.value) {
|
|
1242
1314
|
let n = C.getSubRows?.(e.original) ? r < .25 ? "before" : r > .75 ? "after" : "inside" : r < .5 ? "before" : "after";
|
|
1243
|
-
if (!
|
|
1244
|
-
|
|
1315
|
+
if (!dn(eo(), Ga.value, e.id, n)) {
|
|
1316
|
+
qa.value = null;
|
|
1245
1317
|
return;
|
|
1246
1318
|
}
|
|
1247
|
-
t.preventDefault(),
|
|
1319
|
+
t.preventDefault(), qa.value = {
|
|
1248
1320
|
id: e.id,
|
|
1249
1321
|
position: n
|
|
1250
1322
|
};
|
|
1251
|
-
} else t.preventDefault(),
|
|
1323
|
+
} else t.preventDefault(), qa.value = {
|
|
1252
1324
|
id: e.id,
|
|
1253
1325
|
position: r > .5 ? "after" : "before"
|
|
1254
1326
|
};
|
|
1255
1327
|
}
|
|
1256
|
-
function
|
|
1257
|
-
|
|
1328
|
+
function oo(e, t) {
|
|
1329
|
+
Ga.value && (t.preventDefault(), qa.value = {
|
|
1258
1330
|
id: e.id,
|
|
1259
1331
|
position: "inside"
|
|
1260
1332
|
});
|
|
1261
1333
|
}
|
|
1262
|
-
function
|
|
1334
|
+
function so(e) {
|
|
1263
1335
|
e.preventDefault();
|
|
1264
|
-
let t =
|
|
1336
|
+
let t = Ga.value ? Wa(Ga.value) : void 0, n = qa.value ? Wa(qa.value.id) : void 0, r = qa.value?.position;
|
|
1265
1337
|
if (t && n && r) {
|
|
1266
|
-
if (
|
|
1338
|
+
if (Ya.value) no(t, dn(eo(), t.id, n.id, r));
|
|
1267
1339
|
else if (n.getIsGrouped()) {
|
|
1268
1340
|
let e = n.getLeafRows().filter((e) => !e.getIsGrouped() && e.id !== t.id).at(-1);
|
|
1269
|
-
e &&
|
|
1270
|
-
} else
|
|
1341
|
+
e && to(t, e, !0);
|
|
1342
|
+
} else to(t, n, r === "after");
|
|
1271
1343
|
}
|
|
1272
|
-
|
|
1344
|
+
co();
|
|
1273
1345
|
}
|
|
1274
|
-
function
|
|
1275
|
-
|
|
1346
|
+
function co() {
|
|
1347
|
+
Ga.value = null, qa.value = null, Ka.value = null;
|
|
1276
1348
|
}
|
|
1277
|
-
let
|
|
1349
|
+
let lo = (e) => qa.value?.id === e ? qa.value.position : void 0, uo = he({});
|
|
1278
1350
|
function Q(e, t) {
|
|
1279
|
-
let n =
|
|
1351
|
+
let n = Kt(uo.value, e.id, t);
|
|
1280
1352
|
return n ? n.value : e.getValue(t);
|
|
1281
1353
|
}
|
|
1282
|
-
let
|
|
1283
|
-
function
|
|
1354
|
+
let fo = h(() => !!C.cellSelection || C.editMode === "batch"), po = new qe(), mo = k(0), ho = h(() => mo.value >= 0 && po.canUndo), go = h(() => mo.value >= 0 && po.canRedo);
|
|
1355
|
+
function _o(e, t = !0, n = !1) {
|
|
1284
1356
|
if (e.length) {
|
|
1285
|
-
if (C.editMode === "batch")
|
|
1357
|
+
if (C.editMode === "batch") uo.value = Ye(uo.value, e, n);
|
|
1286
1358
|
else for (let t of n ? [...e].reverse() : e) {
|
|
1287
|
-
let e =
|
|
1359
|
+
let e = Wa(t.rowId);
|
|
1288
1360
|
e && F("cellEdit", {
|
|
1289
1361
|
row: e.original,
|
|
1290
1362
|
rowId: e.id,
|
|
@@ -1292,10 +1364,10 @@ var Mn = An({
|
|
|
1292
1364
|
value: n ? t.before : t.after
|
|
1293
1365
|
});
|
|
1294
1366
|
}
|
|
1295
|
-
if (C.editMode === "row") for (let { rowId: t, values: r } of
|
|
1296
|
-
let e =
|
|
1367
|
+
if (C.editMode === "row") for (let { rowId: t, values: r } of Ze(e, n)) {
|
|
1368
|
+
let e = Wa(t);
|
|
1297
1369
|
if (!e) continue;
|
|
1298
|
-
let n =
|
|
1370
|
+
let n = In.value.filter((e) => e.editable).map((t) => [t.id, Q(e, t.id)]);
|
|
1299
1371
|
F("rowEdit", {
|
|
1300
1372
|
row: e.original,
|
|
1301
1373
|
rowId: t,
|
|
@@ -1305,29 +1377,29 @@ var Mn = An({
|
|
|
1305
1377
|
}
|
|
1306
1378
|
});
|
|
1307
1379
|
}
|
|
1308
|
-
t &&
|
|
1380
|
+
t && fo.value && (po.push(e), mo.value++);
|
|
1309
1381
|
}
|
|
1310
1382
|
}
|
|
1311
|
-
function
|
|
1312
|
-
let e =
|
|
1313
|
-
e && (
|
|
1383
|
+
function vo() {
|
|
1384
|
+
let e = po.undo();
|
|
1385
|
+
e && (_o(e, !1, !0), mo.value++, Li(L.undone(e.length)));
|
|
1314
1386
|
}
|
|
1315
|
-
function
|
|
1316
|
-
let e =
|
|
1317
|
-
e && (
|
|
1387
|
+
function yo() {
|
|
1388
|
+
let e = po.redo();
|
|
1389
|
+
e && (_o(e, !1), mo.value++, Li(L.redone(e.length)));
|
|
1318
1390
|
}
|
|
1319
|
-
let
|
|
1320
|
-
async function
|
|
1321
|
-
await
|
|
1322
|
-
let e =
|
|
1391
|
+
let bo = h(() => Object.keys(uo.value).length);
|
|
1392
|
+
async function xo() {
|
|
1393
|
+
await T();
|
|
1394
|
+
let e = Cc.value;
|
|
1323
1395
|
(e?.querySelector("[tabindex=\"0\"]") ?? e)?.focus();
|
|
1324
1396
|
}
|
|
1325
|
-
function
|
|
1326
|
-
let e = Object.values(
|
|
1397
|
+
function So() {
|
|
1398
|
+
let e = Object.values(uo.value);
|
|
1327
1399
|
if (!e.length) return;
|
|
1328
1400
|
let t = [], n = /* @__PURE__ */ new Map();
|
|
1329
1401
|
for (let r of e) {
|
|
1330
|
-
let e =
|
|
1402
|
+
let e = Wa(r.rowId);
|
|
1331
1403
|
if (!e) continue;
|
|
1332
1404
|
t.push({
|
|
1333
1405
|
row: e.original,
|
|
@@ -1346,120 +1418,120 @@ var Mn = An({
|
|
|
1346
1418
|
F("save", {
|
|
1347
1419
|
changes: t,
|
|
1348
1420
|
rows: [...n.values()]
|
|
1349
|
-
}),
|
|
1421
|
+
}), uo.value = {}, po.clear(), mo.value++, Li(L.changesSaved(t.length)), xo();
|
|
1350
1422
|
}
|
|
1351
|
-
function
|
|
1352
|
-
Object.keys(
|
|
1423
|
+
function Co() {
|
|
1424
|
+
Object.keys(uo.value).length && (uo.value = {}, po.clear(), mo.value++, Li(L.changesDiscarded), xo());
|
|
1353
1425
|
}
|
|
1354
|
-
let
|
|
1426
|
+
let wo = k(null), To = k(null), Eo = k({}), Do = k({}), Oo = ye("root"), ko = (e) => e.editor ?? "text", Ao = (e, t) => `${e}:${t}`, jo = (e, t) => `${tt}-error-${e}-${t}`, Mo = () => Z.value.filter((e) => e.kind === "row").flatMap((e) => Y.value.filter((e) => B.value.get(e.id)?.editable).map((t) => ({
|
|
1355
1427
|
rowId: e.row.id,
|
|
1356
1428
|
columnId: t.id
|
|
1357
1429
|
})));
|
|
1358
|
-
function
|
|
1359
|
-
let t =
|
|
1430
|
+
function No(e) {
|
|
1431
|
+
let t = Oo.value?.querySelector(e);
|
|
1360
1432
|
(q.value ? t?.closest("td") ?? t : t)?.focus();
|
|
1361
1433
|
}
|
|
1362
|
-
async function
|
|
1363
|
-
await
|
|
1434
|
+
async function Po() {
|
|
1435
|
+
await T(), Oo.value?.querySelector("[data-editor] :is(input, button, [role=combobox], [tabindex=\"0\"])")?.focus();
|
|
1364
1436
|
}
|
|
1365
|
-
function
|
|
1366
|
-
|
|
1437
|
+
function Fo(e, t) {
|
|
1438
|
+
wo.value = {
|
|
1367
1439
|
rowId: e.id,
|
|
1368
1440
|
columnId: t
|
|
1369
|
-
},
|
|
1441
|
+
}, Eo.value = { [t]: Q(e, t) }, Do.value = {}, Po();
|
|
1370
1442
|
}
|
|
1371
|
-
let
|
|
1372
|
-
function
|
|
1373
|
-
let n =
|
|
1374
|
-
return n instanceof Promise ? (
|
|
1443
|
+
let Io = k(!1);
|
|
1444
|
+
function Lo(e, t) {
|
|
1445
|
+
let n = $e(t.map((t) => [t, () => B.value.get(t)?.validate?.(Eo.value[t], e.original)])), r = (e) => (Do.value = e, Object.keys(e).length === 0);
|
|
1446
|
+
return n instanceof Promise ? (Io.value = !0, n.then(r).finally(() => Io.value = !1)) : r(n);
|
|
1375
1447
|
}
|
|
1376
|
-
function
|
|
1377
|
-
if (!
|
|
1378
|
-
let r =
|
|
1448
|
+
function Ro(e, t, n) {
|
|
1449
|
+
if (!wo.value || Io.value) return;
|
|
1450
|
+
let r = Lo(e, [t]);
|
|
1379
1451
|
return r instanceof Promise ? r.then((r) => {
|
|
1380
|
-
if (
|
|
1381
|
-
}) : r ?
|
|
1452
|
+
if (wo.value?.rowId === e.id && wo.value.columnId === t) return r ? zo(e, t, n) : Po();
|
|
1453
|
+
}) : r ? zo(e, t, n) : Po();
|
|
1382
1454
|
}
|
|
1383
|
-
async function
|
|
1384
|
-
let r =
|
|
1385
|
-
|
|
1455
|
+
async function zo(e, t, n) {
|
|
1456
|
+
let r = Eo.value[t];
|
|
1457
|
+
wo.value = null;
|
|
1386
1458
|
let i = Q(e, t);
|
|
1387
|
-
if ((C.editMode === "batch" ? !
|
|
1459
|
+
if ((C.editMode === "batch" ? !rn(r, i) : r !== e.getValue(t)) && _o([{
|
|
1388
1460
|
rowId: e.id,
|
|
1389
1461
|
columnId: t,
|
|
1390
1462
|
before: i,
|
|
1391
1463
|
after: r
|
|
1392
1464
|
}]), n) {
|
|
1393
|
-
let r =
|
|
1394
|
-
if (i && a) return
|
|
1465
|
+
let r = Mo(), i = r[r.findIndex((n) => n.rowId === e.id && n.columnId === t) + n], a = i && K.getRow(i.rowId, !0);
|
|
1466
|
+
if (i && a) return Fo(a, i.columnId);
|
|
1395
1467
|
}
|
|
1396
|
-
await
|
|
1468
|
+
await T(), No(`[data-edit="${CSS.escape(Ao(e.id, t))}"]`);
|
|
1397
1469
|
}
|
|
1398
|
-
async function
|
|
1399
|
-
|
|
1470
|
+
async function Bo(e, t) {
|
|
1471
|
+
wo.value = null, Do.value = {}, await T(), No(`[data-edit="${CSS.escape(Ao(e.id, t))}"]`);
|
|
1400
1472
|
}
|
|
1401
|
-
function
|
|
1402
|
-
n.defaultPrevented || (n.key === "Escape" ? (n.preventDefault(),
|
|
1473
|
+
function Vo(e, t, n) {
|
|
1474
|
+
n.defaultPrevented || (n.key === "Escape" ? (n.preventDefault(), Bo(e, t)) : n.key === "Enter" && (n.target.matches("textarea") ? n.ctrlKey || n.metaKey : !n.target.matches("button, [role=combobox]")) ? (n.preventDefault(), Ro(e, t)) : n.key === "Tab" && (n.preventDefault(), Ro(e, t, n.shiftKey ? -1 : 1)));
|
|
1403
1475
|
}
|
|
1404
|
-
function
|
|
1476
|
+
function Ho(e, t, n) {
|
|
1405
1477
|
let r = n.relatedTarget, i = n.currentTarget;
|
|
1406
|
-
r && (i.contains(r) || !
|
|
1478
|
+
r && (i.contains(r) || !Oo.value?.contains(r) && r.closest("[data-scope]")) || Ro(e, t);
|
|
1407
1479
|
}
|
|
1408
|
-
let
|
|
1480
|
+
let Uo = /* @__PURE__ */ new Set([
|
|
1409
1481
|
"select",
|
|
1410
1482
|
"date",
|
|
1411
1483
|
"checkbox"
|
|
1412
1484
|
]);
|
|
1413
|
-
function
|
|
1414
|
-
|
|
1415
|
-
...
|
|
1485
|
+
function Wo(e, t, n) {
|
|
1486
|
+
Eo.value = {
|
|
1487
|
+
...Eo.value,
|
|
1416
1488
|
[t.id]: n
|
|
1417
|
-
},
|
|
1489
|
+
}, mi.value && Uo.has(ko(t)) && !I[`editor-${t.id}`] && Ro(e, t.id);
|
|
1418
1490
|
}
|
|
1419
|
-
function
|
|
1491
|
+
function Go(e, t) {
|
|
1420
1492
|
return {
|
|
1421
|
-
value:
|
|
1422
|
-
setValue: (e) =>
|
|
1423
|
-
...
|
|
1493
|
+
value: Eo.value[t.id],
|
|
1494
|
+
setValue: (e) => Eo.value = {
|
|
1495
|
+
...Eo.value,
|
|
1424
1496
|
[t.id]: e
|
|
1425
1497
|
},
|
|
1426
1498
|
row: e.original,
|
|
1427
|
-
commit: () => void (
|
|
1428
|
-
cancel: () => void (
|
|
1429
|
-
invalid: !!
|
|
1499
|
+
commit: () => void (mi.value ? Ro(e, t.id) : qo(e, !0)),
|
|
1500
|
+
cancel: () => void (mi.value ? Bo(e, t.id) : qo(e, !1)),
|
|
1501
|
+
invalid: !!Do.value[t.id]
|
|
1430
1502
|
};
|
|
1431
1503
|
}
|
|
1432
|
-
function
|
|
1433
|
-
|
|
1504
|
+
function Ko(e) {
|
|
1505
|
+
To.value = e.id, Do.value = {}, Eo.value = Object.fromEntries(In.value.filter((e) => e.editable).map((t) => [t.id, e.getValue(t.id)])), Po();
|
|
1434
1506
|
}
|
|
1435
|
-
async function
|
|
1436
|
-
if (!
|
|
1507
|
+
async function qo(e, t) {
|
|
1508
|
+
if (!Io.value) {
|
|
1437
1509
|
if (t) {
|
|
1438
|
-
if (!await
|
|
1439
|
-
if (
|
|
1510
|
+
if (!await Lo(e, In.value.filter((e) => e.editable).map((e) => e.id))) return Po();
|
|
1511
|
+
if (To.value !== e.id) return;
|
|
1440
1512
|
F("rowEdit", {
|
|
1441
1513
|
row: e.original,
|
|
1442
1514
|
rowId: e.id,
|
|
1443
|
-
values: { ...
|
|
1515
|
+
values: { ...Eo.value }
|
|
1444
1516
|
});
|
|
1445
1517
|
}
|
|
1446
|
-
|
|
1518
|
+
To.value = null, Do.value = {}, await T(), No(`[data-row-edit="${CSS.escape(e.id)}"]`);
|
|
1447
1519
|
}
|
|
1448
1520
|
}
|
|
1449
|
-
function
|
|
1450
|
-
t.defaultPrevented || (t.key === "Escape" ? (t.preventDefault(),
|
|
1521
|
+
function Jo(e, t) {
|
|
1522
|
+
t.defaultPrevented || (t.key === "Escape" ? (t.preventDefault(), qo(e, !1)) : t.key === "Enter" && t.target.matches("input") && (t.preventDefault(), qo(e, !0)));
|
|
1451
1523
|
}
|
|
1452
|
-
let
|
|
1453
|
-
function
|
|
1454
|
-
let n =
|
|
1524
|
+
let Yo = he(null), Xo = h(() => Z.value.filter((e) => e.kind === "row").map((e) => e.row.id)), Zo = h(() => Y.value.map((e) => e.id)), Qo = h(() => C.cellSelection ? $t(Yo.value, Xo.value, Zo.value) : null), $o = h(() => new Map(Xo.value.map((e, t) => [e, t]))), es = h(() => new Map(Zo.value.map((e, t) => [e, t])));
|
|
1525
|
+
function ts(e, t) {
|
|
1526
|
+
let n = Qo.value;
|
|
1455
1527
|
if (!n) return !1;
|
|
1456
|
-
let r =
|
|
1528
|
+
let r = $o.value.get(e) ?? -1, i = es.value.get(t) ?? -1;
|
|
1457
1529
|
return r >= n.top && r <= n.bottom && i >= n.left && i <= n.right;
|
|
1458
1530
|
}
|
|
1459
|
-
function
|
|
1460
|
-
let t =
|
|
1531
|
+
function ns(e) {
|
|
1532
|
+
let t = $t(e, Xo.value, Zo.value);
|
|
1461
1533
|
if (!t) return null;
|
|
1462
|
-
let n =
|
|
1534
|
+
let n = Xo.value.slice(t.top, t.bottom + 1), r = Zo.value.slice(t.left, t.right + 1), i = n.flatMap((e) => Wa(e) ?? []);
|
|
1463
1535
|
return {
|
|
1464
1536
|
rowIds: n,
|
|
1465
1537
|
columnIds: r,
|
|
@@ -1467,40 +1539,40 @@ var Mn = An({
|
|
|
1467
1539
|
values: i.map((e) => r.map((t) => Q(e, t)))
|
|
1468
1540
|
};
|
|
1469
1541
|
}
|
|
1470
|
-
function
|
|
1471
|
-
let t =
|
|
1472
|
-
e && t && e.anchor.rowId === t.anchor.rowId && e.anchor.columnId === t.anchor.columnId && e.focus.rowId === t.focus.rowId && e.focus.columnId === t.focus.columnId || !e && !t || (
|
|
1542
|
+
function rs(e) {
|
|
1543
|
+
let t = Yo.value;
|
|
1544
|
+
e && t && e.anchor.rowId === t.anchor.rowId && e.anchor.columnId === t.anchor.columnId && e.focus.rowId === t.focus.rowId && e.focus.columnId === t.focus.columnId || !e && !t || (Yo.value = e, F("cellSelectionChange", ns(e)));
|
|
1473
1545
|
}
|
|
1474
|
-
let
|
|
1475
|
-
|
|
1476
|
-
function
|
|
1546
|
+
let is = !1, as = !1, os = !1, ss = () => is = !1;
|
|
1547
|
+
de(() => window.addEventListener("pointerup", ss)), ue(() => window.removeEventListener("pointerup", ss));
|
|
1548
|
+
function cs(e, t, n) {
|
|
1477
1549
|
if (!C.cellSelection || n.button !== 0 || n.target.closest("[data-editor]")) return;
|
|
1478
1550
|
let r = {
|
|
1479
1551
|
rowId: e,
|
|
1480
1552
|
columnId: t
|
|
1481
|
-
}, i =
|
|
1482
|
-
|
|
1553
|
+
}, i = Yo.value, a = n.shiftKey && i;
|
|
1554
|
+
rs(a ? {
|
|
1483
1555
|
anchor: i.anchor,
|
|
1484
1556
|
focus: r
|
|
1485
1557
|
} : {
|
|
1486
1558
|
anchor: r,
|
|
1487
1559
|
focus: r
|
|
1488
|
-
}),
|
|
1560
|
+
}), is = !0, os = !!a, a && window.getSelection()?.removeAllRanges();
|
|
1489
1561
|
}
|
|
1490
|
-
function
|
|
1491
|
-
|
|
1492
|
-
anchor:
|
|
1562
|
+
function ls(e, t, n) {
|
|
1563
|
+
is && Yo.value && n.buttons & 1 && (rs({
|
|
1564
|
+
anchor: Yo.value.anchor,
|
|
1493
1565
|
focus: {
|
|
1494
1566
|
rowId: e,
|
|
1495
1567
|
columnId: t
|
|
1496
1568
|
}
|
|
1497
1569
|
}), window.getSelection()?.removeAllRanges());
|
|
1498
1570
|
}
|
|
1499
|
-
function
|
|
1500
|
-
|
|
1571
|
+
function us(e) {
|
|
1572
|
+
os && (os = !1, e.preventDefault(), e.stopPropagation());
|
|
1501
1573
|
}
|
|
1502
|
-
let
|
|
1503
|
-
function
|
|
1574
|
+
let ds = (e, t) => Cc.value?.querySelector(`tr[data-row-id="${CSS.escape(e)}"] > [data-column-id="${CSS.escape(t)}"]`) ?? null;
|
|
1575
|
+
function fs(e) {
|
|
1504
1576
|
let t = e.target, n = e.key;
|
|
1505
1577
|
if (!C.cellSelection || !q.value || !e.shiftKey || e.altKey || ![
|
|
1506
1578
|
"ArrowUp",
|
|
@@ -1512,7 +1584,7 @@ var Mn = An({
|
|
|
1512
1584
|
].includes(n)) return !1;
|
|
1513
1585
|
let r = t.closest("tr")?.dataset.rowId, i = t.dataset.columnId;
|
|
1514
1586
|
if (!r || !i || !t.matches("td")) return !1;
|
|
1515
|
-
let a = getComputedStyle(t).direction === "rtl", o = n === "ArrowUp" ? "up" : n === "ArrowDown" ? "down" : n === "Home" ? "home" : n === "End" ? "end" : n === "ArrowRight" === a ? "previous" : "next", s =
|
|
1587
|
+
let a = getComputedStyle(t).direction === "rtl", o = n === "ArrowUp" ? "up" : n === "ArrowDown" ? "down" : n === "Home" ? "home" : n === "End" ? "end" : n === "ArrowRight" === a ? "previous" : "next", s = Yo.value && ts(r, i) ? Yo.value : {
|
|
1516
1588
|
anchor: {
|
|
1517
1589
|
rowId: r,
|
|
1518
1590
|
columnId: i
|
|
@@ -1521,53 +1593,53 @@ var Mn = An({
|
|
|
1521
1593
|
rowId: r,
|
|
1522
1594
|
columnId: i
|
|
1523
1595
|
}
|
|
1524
|
-
}, c =
|
|
1525
|
-
e.preventDefault(),
|
|
1596
|
+
}, c = pt(s, Xo.value, Zo.value, o, e.ctrlKey || e.metaKey);
|
|
1597
|
+
e.preventDefault(), rs(c);
|
|
1526
1598
|
let l = () => {
|
|
1527
|
-
let e =
|
|
1528
|
-
return e ? (
|
|
1599
|
+
let e = ds(c.focus.rowId, c.focus.columnId);
|
|
1600
|
+
return e ? (as = !0, e.focus(), as = !1, e.scrollIntoView?.({
|
|
1529
1601
|
block: "nearest",
|
|
1530
1602
|
inline: "nearest"
|
|
1531
1603
|
}), !0) : !1;
|
|
1532
1604
|
};
|
|
1533
|
-
return
|
|
1534
|
-
!l() && $.value && (
|
|
1605
|
+
return T(() => {
|
|
1606
|
+
!l() && $.value && (fc?.value.scrollToIndex(Z.value.findIndex((e) => e.kind === "row" && e.row.id === c.focus.rowId)), requestAnimationFrame(() => requestAnimationFrame(() => void l())));
|
|
1535
1607
|
}), !0;
|
|
1536
1608
|
}
|
|
1537
|
-
let
|
|
1538
|
-
function
|
|
1539
|
-
let e =
|
|
1609
|
+
let ps = (e, t) => V(B.value.get(t), Q(e, t), e.original);
|
|
1610
|
+
function ms() {
|
|
1611
|
+
let e = ns(Yo.value);
|
|
1540
1612
|
if (e) {
|
|
1541
|
-
let t = e.rowIds.flatMap((e) =>
|
|
1613
|
+
let t = e.rowIds.flatMap((e) => Wa(e) ?? []);
|
|
1542
1614
|
return {
|
|
1543
|
-
text:
|
|
1615
|
+
text: un(t.map((t) => e.columnIds.map((e) => ps(t, e)))),
|
|
1544
1616
|
count: t.length * e.columnIds.length
|
|
1545
1617
|
};
|
|
1546
1618
|
}
|
|
1547
|
-
let t = Z.value.filter((e) => e.kind === "row" &&
|
|
1619
|
+
let t = Z.value.filter((e) => e.kind === "row" && ma(e.row)).map((e) => e.row);
|
|
1548
1620
|
return t.length ? {
|
|
1549
|
-
text:
|
|
1550
|
-
count: t.length *
|
|
1621
|
+
text: un(t.map((e) => Zo.value.map((t) => ps(e, t)))),
|
|
1622
|
+
count: t.length * Zo.value.length
|
|
1551
1623
|
} : null;
|
|
1552
1624
|
}
|
|
1553
|
-
function
|
|
1625
|
+
function hs() {
|
|
1554
1626
|
let e = document.activeElement;
|
|
1555
|
-
return !!C.cellSelection && !!e && !!
|
|
1627
|
+
return !!C.cellSelection && !!e && !!Cc.value?.contains(e) && !e.closest(Or);
|
|
1556
1628
|
}
|
|
1557
|
-
function
|
|
1558
|
-
if (!
|
|
1559
|
-
let t =
|
|
1560
|
-
t && e.clipboardData && (e.clipboardData.setData("text/plain", t.text), e.preventDefault(),
|
|
1629
|
+
function gs(e) {
|
|
1630
|
+
if (!hs() || window.getSelection()?.toString()) return;
|
|
1631
|
+
let t = ms();
|
|
1632
|
+
t && e.clipboardData && (e.clipboardData.setData("text/plain", t.text), e.preventDefault(), Li(L.cellsCopied(t.count)));
|
|
1561
1633
|
}
|
|
1562
|
-
async function
|
|
1563
|
-
let t =
|
|
1634
|
+
async function _s(e) {
|
|
1635
|
+
let t = Wt(e), n = $t(Yo.value, Xo.value, Zo.value);
|
|
1564
1636
|
if (!t.length || !n) return;
|
|
1565
|
-
let r =
|
|
1637
|
+
let r = Gt(t, {
|
|
1566
1638
|
row: n.top,
|
|
1567
1639
|
column: n.left
|
|
1568
|
-
},
|
|
1640
|
+
}, Xo.value, Zo.value, n), i = [], a = [];
|
|
1569
1641
|
for (let e of r) {
|
|
1570
|
-
let t =
|
|
1642
|
+
let t = B.value.get(e.columnId), n = Wa(e.rowId);
|
|
1571
1643
|
if (!t || !n) continue;
|
|
1572
1644
|
if (!t.editable) {
|
|
1573
1645
|
i.push({
|
|
@@ -1576,7 +1648,7 @@ var Mn = An({
|
|
|
1576
1648
|
});
|
|
1577
1649
|
continue;
|
|
1578
1650
|
}
|
|
1579
|
-
let r =
|
|
1651
|
+
let r = Ut(e.text, ko(t), {
|
|
1580
1652
|
locale: S.value.locale,
|
|
1581
1653
|
choices: t.editOptions
|
|
1582
1654
|
});
|
|
@@ -1588,7 +1660,7 @@ var Mn = An({
|
|
|
1588
1660
|
continue;
|
|
1589
1661
|
}
|
|
1590
1662
|
let o = Q(n, e.columnId);
|
|
1591
|
-
|
|
1663
|
+
rn(r.value, o) || a.push({
|
|
1592
1664
|
change: {
|
|
1593
1665
|
rowId: n.id,
|
|
1594
1666
|
columnId: t.id,
|
|
@@ -1600,7 +1672,7 @@ var Mn = An({
|
|
|
1600
1672
|
text: e.text
|
|
1601
1673
|
});
|
|
1602
1674
|
}
|
|
1603
|
-
let o = await
|
|
1675
|
+
let o = await $e(a.map(({ change: e, row: t, def: n }, r) => [String(r), () => n.validate?.(e.after, t.original)])), s = a.filter((e, t) => {
|
|
1604
1676
|
let n = o[String(t)];
|
|
1605
1677
|
return n && i.push({
|
|
1606
1678
|
rowId: e.change.rowId,
|
|
@@ -1622,81 +1694,81 @@ var Mn = An({
|
|
|
1622
1694
|
c.defaultPrevented = !0;
|
|
1623
1695
|
}
|
|
1624
1696
|
};
|
|
1625
|
-
F("cellPaste", c), !c.defaultPrevented && (
|
|
1697
|
+
F("cellPaste", c), !c.defaultPrevented && (_o(s.map(({ change: e }) => e)), rs(Qt(r, Xo.value, Zo.value)), Li(L.cellsPasted(s.length, i.length)));
|
|
1626
1698
|
}
|
|
1627
|
-
function
|
|
1628
|
-
if (!
|
|
1699
|
+
function vs(e) {
|
|
1700
|
+
if (!hs()) return;
|
|
1629
1701
|
let t = e.clipboardData?.getData("text/plain");
|
|
1630
|
-
t && (e.preventDefault(),
|
|
1702
|
+
t && (e.preventDefault(), _s(t));
|
|
1631
1703
|
}
|
|
1632
|
-
|
|
1633
|
-
document.addEventListener("copy",
|
|
1634
|
-
}),
|
|
1635
|
-
document.removeEventListener("copy",
|
|
1704
|
+
de(() => {
|
|
1705
|
+
document.addEventListener("copy", gs), document.addEventListener("paste", vs);
|
|
1706
|
+
}), ue(() => {
|
|
1707
|
+
document.removeEventListener("copy", gs), document.removeEventListener("paste", vs);
|
|
1636
1708
|
});
|
|
1637
|
-
function
|
|
1638
|
-
if (!
|
|
1639
|
-
let t =
|
|
1640
|
-
return t ? (e.preventDefault(), t === "undo" ?
|
|
1709
|
+
function ys(e) {
|
|
1710
|
+
if (!fo.value || e.target.closest(Or)) return !1;
|
|
1711
|
+
let t = yt(e);
|
|
1712
|
+
return t ? (e.preventDefault(), t === "undo" ? vo() : yo(), !0) : !1;
|
|
1641
1713
|
}
|
|
1642
|
-
let
|
|
1714
|
+
let bs = k(!1), xs = k(""), Ss = k(0), Cs = h(() => !!C.find && bs.value && !!xs.value.trim()), ws = h(() => Cs.value ? (Nc.value && !Mn.value ? K.getPrePaginatedRowModel().rows : K.getRowModel().rows).filter((e) => !e.getIsGrouped()) : []), Ts = h(() => Cs.value ? mt(ws.value.map((e) => ({
|
|
1643
1715
|
id: e.id,
|
|
1644
1716
|
cells: Y.value.map((t) => ({
|
|
1645
1717
|
columnId: t.id,
|
|
1646
|
-
text:
|
|
1718
|
+
text: ps(e, t.id)
|
|
1647
1719
|
}))
|
|
1648
|
-
})),
|
|
1649
|
-
function
|
|
1650
|
-
return
|
|
1720
|
+
})), xs.value, S.value.locale) : []), Es = h(() => Ts.value.length ? Ts.value[Math.min(Ss.value, Ts.value.length - 1)] : void 0), Ds = h(() => new Set(Ts.value.map((e) => `${e.rowId}\u0000${e.columnId}`)));
|
|
1721
|
+
function Os(e, t) {
|
|
1722
|
+
return Cs.value ? Es.value?.rowId === e && Es.value.columnId === t ? J.value.findCurrent() : Ds.value.has(`${e}\u0000${t}`) ? J.value.findMatch() : "" : "";
|
|
1651
1723
|
}
|
|
1652
|
-
async function
|
|
1653
|
-
await
|
|
1654
|
-
let e =
|
|
1724
|
+
async function ks() {
|
|
1725
|
+
await T();
|
|
1726
|
+
let e = Es.value;
|
|
1655
1727
|
if (!e) return;
|
|
1656
|
-
let t = () =>
|
|
1728
|
+
let t = () => ds(e.rowId, e.columnId)?.scrollIntoView?.({
|
|
1657
1729
|
block: "nearest",
|
|
1658
1730
|
inline: "nearest"
|
|
1659
1731
|
}), n = Z.value.findIndex((t) => t.kind === "row" && t.row.id === e.rowId);
|
|
1660
|
-
$.value && n >= 0 ? (
|
|
1732
|
+
$.value && n >= 0 ? (fc?.value.scrollToIndex(n, { align: "center" }), requestAnimationFrame(() => requestAnimationFrame(t))) : t();
|
|
1661
1733
|
}
|
|
1662
|
-
function
|
|
1663
|
-
let t =
|
|
1734
|
+
function As(e) {
|
|
1735
|
+
let t = Ts.value;
|
|
1664
1736
|
if (!t.length) return;
|
|
1665
1737
|
let n = (e + t.length) % t.length;
|
|
1666
|
-
|
|
1738
|
+
Ss.value = n;
|
|
1667
1739
|
let r = t[n];
|
|
1668
|
-
if (
|
|
1669
|
-
let e =
|
|
1740
|
+
if (Nc.value && !Mn.value) {
|
|
1741
|
+
let e = ws.value.findIndex((e) => e.id === r.rowId), t = Math.floor(e / H.value.pageSize);
|
|
1670
1742
|
e >= 0 && t !== H.value.pageIndex && K.setPageIndex(t);
|
|
1671
1743
|
}
|
|
1672
|
-
|
|
1744
|
+
ks();
|
|
1673
1745
|
}
|
|
1674
|
-
async function
|
|
1675
|
-
|
|
1746
|
+
async function js() {
|
|
1747
|
+
bs.value = !bs.value, await T(), Oo.value?.querySelector(bs.value ? "[data-find-input] input, input[data-find-input]" : "[data-find-toggle]")?.focus();
|
|
1676
1748
|
}
|
|
1677
|
-
function
|
|
1678
|
-
e.key === "Enter" ? (e.preventDefault(),
|
|
1749
|
+
function Ms(e) {
|
|
1750
|
+
e.key === "Enter" ? (e.preventDefault(), As(Ss.value + (e.shiftKey ? -1 : 1))) : e.key === "Escape" && (e.preventDefault(), js());
|
|
1679
1751
|
}
|
|
1680
|
-
function
|
|
1681
|
-
|
|
1752
|
+
function Ns(e) {
|
|
1753
|
+
xs.value = e, Ss.value = 0, ks();
|
|
1682
1754
|
}
|
|
1683
|
-
let
|
|
1684
|
-
if (!
|
|
1685
|
-
let e = Z.value, t = Y.value, n = e.map((e) => e.kind === "row" ?
|
|
1755
|
+
let Ps = h(() => !$.value && In.value.some((e) => e.rowSpan === "auto" || e.colSpan)), Fs = (e) => `${tt}-head-${e}`, Is = h(() => {
|
|
1756
|
+
if (!Ps.value) return;
|
|
1757
|
+
let e = Z.value, t = Y.value, n = e.map((e) => e.kind === "row" ? en(t.map((t) => B.value.get(t.id)?.colSpan?.(e.row.original) ?? 1)) : t.map(() => 1)), r = e.map((t, n) => t.kind !== "row" || e[n - 1]?.kind !== "row"), i = t.map((e) => B.value.get(e.id)?.rowSpan === "auto"), a = (t, r) => e.map((e, i) => e.kind === "row" && n[i][r] === 1 ? ps(e.row, t) : null), o = Xe(t.flatMap((e, t) => i[t] ? [a(e.id, t)] : []), r), s = 0;
|
|
1686
1758
|
return {
|
|
1687
1759
|
columnSpans: n,
|
|
1688
1760
|
rowSpans: i.map((e) => e ? o[s++] : void 0)
|
|
1689
1761
|
};
|
|
1690
|
-
}),
|
|
1691
|
-
rowSpan:
|
|
1692
|
-
colSpan:
|
|
1693
|
-
}),
|
|
1694
|
-
if (!
|
|
1695
|
-
let n =
|
|
1762
|
+
}), Ls = (e, t) => ({
|
|
1763
|
+
rowSpan: Is.value?.rowSpans[t]?.[e] ?? 1,
|
|
1764
|
+
colSpan: Is.value?.columnSpans[e]?.[t] ?? 1
|
|
1765
|
+
}), Rs = (e, t) => {
|
|
1766
|
+
if (!Ps.value) return !0;
|
|
1767
|
+
let n = Ls(e, t);
|
|
1696
1768
|
return n.rowSpan > 0 && n.colSpan > 0;
|
|
1697
1769
|
};
|
|
1698
|
-
function
|
|
1699
|
-
let i = !!C.cellSelection &&
|
|
1770
|
+
function zs(e, t, n, r) {
|
|
1771
|
+
let i = !!C.cellSelection && ts(e.id, t), a = C.editMode === "batch" && !!Kt(uo.value, e.id, t), o = Ps.value ? Ls(n, r) : {
|
|
1700
1772
|
rowSpan: 1,
|
|
1701
1773
|
colSpan: 1
|
|
1702
1774
|
};
|
|
@@ -1704,35 +1776,35 @@ var Mn = An({
|
|
|
1704
1776
|
className: [
|
|
1705
1777
|
i ? J.value.cellSelected() : "",
|
|
1706
1778
|
a ? J.value.cellChanged() : "",
|
|
1707
|
-
|
|
1779
|
+
Os(e.id, t)
|
|
1708
1780
|
],
|
|
1709
1781
|
attributes: {
|
|
1710
1782
|
...C.cellSelection || C.find ? { "data-column-id": t } : {},
|
|
1711
1783
|
...C.cellSelection && q.value ? { "aria-selected": i } : {},
|
|
1712
1784
|
...a ? { "data-changed": "" } : {},
|
|
1713
|
-
...
|
|
1785
|
+
...Ps.value ? {
|
|
1714
1786
|
...o.rowSpan > 1 ? { rowspan: o.rowSpan } : {},
|
|
1715
1787
|
...o.colSpan > 1 ? { colspan: o.colSpan } : {},
|
|
1716
|
-
headers: Y.value.slice(r, r + o.colSpan).map((e) =>
|
|
1788
|
+
headers: Y.value.slice(r, r + o.colSpan).map((e) => Fs(e.id)).join(" ")
|
|
1717
1789
|
} : {},
|
|
1718
1790
|
...C.cellSelection ? {
|
|
1719
|
-
onPointerdown: (n) =>
|
|
1720
|
-
onPointerenter: (n) =>
|
|
1721
|
-
onClickCapture:
|
|
1791
|
+
onPointerdown: (n) => cs(e.id, t, n),
|
|
1792
|
+
onPointerenter: (n) => ls(e.id, t, n),
|
|
1793
|
+
onClickCapture: us
|
|
1722
1794
|
} : {}
|
|
1723
1795
|
}
|
|
1724
1796
|
};
|
|
1725
1797
|
}
|
|
1726
|
-
let
|
|
1727
|
-
function
|
|
1728
|
-
let t = K.getVisibleLeafColumns().map((e) =>
|
|
1798
|
+
let Bs = (e, t) => C.editMode === "batch" && !!Kt(uo.value, e.id, t);
|
|
1799
|
+
function Vs(e = {}) {
|
|
1800
|
+
let t = K.getVisibleLeafColumns().map((e) => B.value.get(e.id)).filter((e) => e.exportable !== !1), n = (e.selectionOnly ? K.getSelectedRowModel().flatRows : K.getSortedRowModel().flatRows).filter((e) => !e.getIsGrouped()).map((e) => t.map((t) => t.exportValue ? t.exportValue(e.original) : V(t, e.getValue(t.id), e.original))), r = e.separator ?? C.csvSeparator ?? it(S.value.locale), i = cn([t.map((e) => e.exportHeader ?? e.header), ...n], r);
|
|
1729
1801
|
return e.bom === !1 ? i.slice(1) : i;
|
|
1730
1802
|
}
|
|
1731
|
-
function
|
|
1803
|
+
function Hs(e = !1) {
|
|
1732
1804
|
let t = typeof e == "boolean" ? { selectionOnly: e } : e;
|
|
1733
|
-
|
|
1805
|
+
ut(`${t.filename ?? C.exportFilename ?? "export"}.csv`, Vs(t));
|
|
1734
1806
|
}
|
|
1735
|
-
function
|
|
1807
|
+
function Us(e = !1) {
|
|
1736
1808
|
if (e) return K.getSelectedRowModel().flatRows.filter((e) => !e.getIsGrouped()).map((e) => ({
|
|
1737
1809
|
row: e,
|
|
1738
1810
|
group: !1,
|
|
@@ -1745,36 +1817,36 @@ var Mn = An({
|
|
|
1745
1817
|
}, ...e.subRows.flatMap(t)];
|
|
1746
1818
|
return K.getSortedRowModel().rows.flatMap(t);
|
|
1747
1819
|
}
|
|
1748
|
-
function
|
|
1749
|
-
let t =
|
|
1750
|
-
return `${t?.header ?? ""}: ${
|
|
1820
|
+
function Ws(e) {
|
|
1821
|
+
let t = B.value.get(e.groupingColumnId), n = e.getLeafRows().filter((e) => !e.getIsGrouped()).length;
|
|
1822
|
+
return `${t?.header ?? ""}: ${V(t, e.groupingValue, e.original)} (${n})`;
|
|
1751
1823
|
}
|
|
1752
|
-
let
|
|
1753
|
-
function
|
|
1824
|
+
let Gs = (e) => e.editor === "datetime" ? "datetime" : e.filter === "date" || e.editor === "date" ? "date" : void 0;
|
|
1825
|
+
function Ks(e, t, n) {
|
|
1754
1826
|
if (e == null || e === "") return null;
|
|
1755
1827
|
if (typeof e == "number") return Number.isFinite(e) ? e : null;
|
|
1756
1828
|
if (e instanceof Date) return {
|
|
1757
1829
|
date: e,
|
|
1758
|
-
time:
|
|
1830
|
+
time: Gs(t) === "datetime"
|
|
1759
1831
|
};
|
|
1760
|
-
let r =
|
|
1832
|
+
let r = Gs(t);
|
|
1761
1833
|
return r && typeof e == "string" ? {
|
|
1762
1834
|
date: e,
|
|
1763
1835
|
time: r === "datetime"
|
|
1764
|
-
} : typeof e == "boolean" && !t.format ? e : n ?
|
|
1836
|
+
} : typeof e == "boolean" && !t.format ? e : n ? V(t, e, n) : kt(e);
|
|
1765
1837
|
}
|
|
1766
|
-
function
|
|
1767
|
-
let t = K.getVisibleLeafColumns().map((e) =>
|
|
1838
|
+
function qs(e = {}) {
|
|
1839
|
+
let t = K.getVisibleLeafColumns().map((e) => B.value.get(e.id)).filter((e) => e.exportable !== !1), n = Us(e.selectionOnly).filter((t) => !t.group || e.groups !== !1).map(({ row: n, group: r, depth: i }) => {
|
|
1768
1840
|
if (r) {
|
|
1769
1841
|
let e = n.getLeafRows().filter((e) => !e.getIsGrouped());
|
|
1770
1842
|
return {
|
|
1771
1843
|
kind: "group",
|
|
1772
1844
|
level: i,
|
|
1773
1845
|
cells: t.map((t, r) => {
|
|
1774
|
-
if (r === 0) return
|
|
1846
|
+
if (r === 0) return Ws(n);
|
|
1775
1847
|
if (!t.aggregate) return null;
|
|
1776
|
-
let i =
|
|
1777
|
-
return typeof i == "number" ? i :
|
|
1848
|
+
let i = Je(e.map((e) => Ar(t, e.original)), t.aggregate);
|
|
1849
|
+
return typeof i == "number" ? i : kt(i);
|
|
1778
1850
|
})
|
|
1779
1851
|
};
|
|
1780
1852
|
}
|
|
@@ -1783,9 +1855,9 @@ var Mn = An({
|
|
|
1783
1855
|
cells: t.map((e) => {
|
|
1784
1856
|
if (e.exportValue) {
|
|
1785
1857
|
let t = e.exportValue(n.original);
|
|
1786
|
-
return typeof t == "number" || typeof t == "boolean" ? t : t instanceof Date ? { date: t } :
|
|
1858
|
+
return typeof t == "number" || typeof t == "boolean" ? t : t instanceof Date ? { date: t } : kt(t);
|
|
1787
1859
|
}
|
|
1788
|
-
return
|
|
1860
|
+
return Ks(n.getValue(e.id), e, n.original);
|
|
1789
1861
|
})
|
|
1790
1862
|
};
|
|
1791
1863
|
});
|
|
@@ -1793,60 +1865,60 @@ var Mn = An({
|
|
|
1793
1865
|
let e = K.getFilteredRowModel().flatRows.filter((e) => !e.getIsGrouped()), r = t.map((t) => {
|
|
1794
1866
|
if (t.footer !== void 0) return t.footer;
|
|
1795
1867
|
if (!t.aggregate) return null;
|
|
1796
|
-
let n =
|
|
1797
|
-
return typeof n == "number" ? n :
|
|
1868
|
+
let n = Je(e.map((e) => Ar(t, e.original)), t.aggregate);
|
|
1869
|
+
return typeof n == "number" ? n : kt(n);
|
|
1798
1870
|
});
|
|
1799
1871
|
r[0] === null && (r[0] = L.total), n.push({
|
|
1800
1872
|
kind: "total",
|
|
1801
1873
|
cells: r
|
|
1802
1874
|
});
|
|
1803
1875
|
}
|
|
1804
|
-
return
|
|
1876
|
+
return rt({
|
|
1805
1877
|
name: e.sheetName ?? C.caption,
|
|
1806
1878
|
columns: t.map((e) => ({ header: e.exportHeader ?? e.header })),
|
|
1807
1879
|
rows: n
|
|
1808
1880
|
});
|
|
1809
1881
|
}
|
|
1810
|
-
function
|
|
1811
|
-
|
|
1882
|
+
function Js(e = {}) {
|
|
1883
|
+
lt(`${e.filename ?? C.exportFilename ?? "export"}.xlsx`, qs(e));
|
|
1812
1884
|
}
|
|
1813
|
-
function
|
|
1814
|
-
e === "xlsx" ?
|
|
1885
|
+
function Ys(e, t) {
|
|
1886
|
+
e === "xlsx" ? Js({ selectionOnly: t }) : Hs(t);
|
|
1815
1887
|
}
|
|
1816
|
-
function
|
|
1817
|
-
let t = Y.value.map((e) =>
|
|
1888
|
+
function Xs(e = {}) {
|
|
1889
|
+
let t = Y.value.map((e) => B.value.get(e.id)), n = ki.value.map((e) => e.map((e) => ({
|
|
1818
1890
|
text: X(e.header.column),
|
|
1819
1891
|
colSpan: e.group ? e.header.colSpan : 1,
|
|
1820
1892
|
rowSpan: e.rowSpan,
|
|
1821
|
-
align: e.group ? void 0 :
|
|
1822
|
-
}))), r =
|
|
1893
|
+
align: e.group ? void 0 : B.value.get(e.header.column.id)?.align
|
|
1894
|
+
}))), r = Us(e.selectionOnly).map(({ row: e, group: n }) => n ? {
|
|
1823
1895
|
kind: "group",
|
|
1824
1896
|
cells: [{
|
|
1825
|
-
text:
|
|
1897
|
+
text: Ws(e),
|
|
1826
1898
|
colSpan: t.length
|
|
1827
1899
|
}]
|
|
1828
1900
|
} : { cells: t.map((t) => ({
|
|
1829
|
-
text:
|
|
1901
|
+
text: ps(e, t.id),
|
|
1830
1902
|
align: t.align
|
|
1831
|
-
})) }), i =
|
|
1832
|
-
text:
|
|
1903
|
+
})) }), i = Pa.value ? t.map((e) => ({
|
|
1904
|
+
text: La(e),
|
|
1833
1905
|
align: e.align
|
|
1834
1906
|
})) : void 0;
|
|
1835
|
-
|
|
1907
|
+
Yt(Xt({
|
|
1836
1908
|
title: e.title ?? C.caption,
|
|
1837
1909
|
caption: C.caption,
|
|
1838
1910
|
lang: S.value.locale,
|
|
1839
|
-
dir: getComputedStyle(
|
|
1911
|
+
dir: getComputedStyle(Oo.value ?? document.body).direction === "rtl" ? "rtl" : "ltr",
|
|
1840
1912
|
head: n,
|
|
1841
1913
|
body: r,
|
|
1842
1914
|
foot: i
|
|
1843
1915
|
}));
|
|
1844
1916
|
}
|
|
1845
|
-
async function
|
|
1846
|
-
await
|
|
1917
|
+
async function Zs() {
|
|
1918
|
+
await xn?.refresh();
|
|
1847
1919
|
}
|
|
1848
|
-
let
|
|
1849
|
-
let e = !!C.selectable &&
|
|
1920
|
+
let Qs = h(() => C.exportFormats?.length ? C.exportFormats : ["csv"]), $s = h(() => {
|
|
1921
|
+
let e = !!C.selectable && sc.value > 0, t = Qs.value;
|
|
1850
1922
|
return t.length === 1 && t[0] === "csv" ? e ? [{
|
|
1851
1923
|
value: "all",
|
|
1852
1924
|
label: L.exportAll
|
|
@@ -1863,51 +1935,51 @@ var Mn = An({
|
|
|
1863
1935
|
value: `${n}:all`,
|
|
1864
1936
|
label: L.exportAs(n, !1)
|
|
1865
1937
|
}] : []);
|
|
1866
|
-
}),
|
|
1867
|
-
function
|
|
1938
|
+
}), ec = h(() => Qs.value.length > 1 ? L.exportMenu : Qs.value[0] === "xlsx" ? L.exportXlsx : L.export);
|
|
1939
|
+
function tc(e) {
|
|
1868
1940
|
let [t, n] = e.includes(":") ? e.split(":") : ["csv", e];
|
|
1869
|
-
|
|
1941
|
+
Ys(t, n === "selection");
|
|
1870
1942
|
}
|
|
1871
|
-
let
|
|
1872
|
-
if (!
|
|
1943
|
+
let nc = (e) => e.columns ? e.columns.flatMap(nc) : [e.id], rc = h(() => {
|
|
1944
|
+
if (!jn.value.some((e) => e.columns)) return;
|
|
1873
1945
|
let e = K.getAllLeafColumns(), t = (t) => e.findIndex((e) => e.id === t);
|
|
1874
|
-
return
|
|
1946
|
+
return jn.value.map((n) => ({
|
|
1875
1947
|
def: n,
|
|
1876
|
-
leaves:
|
|
1948
|
+
leaves: nc(n).map((n) => e[t(n)]).filter(Boolean).sort((e, n) => t(e.id) - t(n.id))
|
|
1877
1949
|
})).sort((e, n) => t(e.leaves[0]?.id ?? "") - t(n.leaves[0]?.id ?? ""));
|
|
1878
|
-
}),
|
|
1950
|
+
}), ic = h(() => rc.value ?? [{
|
|
1879
1951
|
def: void 0,
|
|
1880
1952
|
leaves: K.getAllLeafColumns()
|
|
1881
1953
|
}]);
|
|
1882
|
-
function
|
|
1954
|
+
function ac(e, t) {
|
|
1883
1955
|
K.setColumnVisibility({
|
|
1884
|
-
...
|
|
1956
|
+
...Hr.value,
|
|
1885
1957
|
...Object.fromEntries(e.filter((e) => e.getCanHide()).map((e) => [e.id, t]))
|
|
1886
1958
|
});
|
|
1887
1959
|
}
|
|
1888
|
-
function
|
|
1889
|
-
let n =
|
|
1960
|
+
function oc(e, t) {
|
|
1961
|
+
let n = jn.value.map((e) => ({
|
|
1890
1962
|
id: e.id,
|
|
1891
|
-
leaves:
|
|
1892
|
-
})), r =
|
|
1963
|
+
leaves: nc(e)
|
|
1964
|
+
})), r = It(K.getAllLeafColumns().map((e) => e.id), n, e, t);
|
|
1893
1965
|
if (!r) return;
|
|
1894
1966
|
K.setColumnOrder(r);
|
|
1895
1967
|
let i = (e) => r.indexOf(n.find((t) => t.id === e).leaves[0]), a = n.map((e) => e.id).sort((e, t) => i(e) - i(t));
|
|
1896
|
-
|
|
1968
|
+
Li(L.columnMoved(B.value.get(e)?.header ?? e, a.indexOf(e) + 1, a.length));
|
|
1897
1969
|
}
|
|
1898
|
-
let
|
|
1899
|
-
async function
|
|
1900
|
-
if (
|
|
1901
|
-
else
|
|
1902
|
-
|
|
1970
|
+
let sc = h(() => pa.value && Rr.value ? Math.max(0, (Nn.value ?? An.value.length) - Rr.value.except.length) : Object.values(Lr.value).filter(Boolean).length), cc = [];
|
|
1971
|
+
async function lc() {
|
|
1972
|
+
if (ci.value = !ci.value, await T(), ci.value) for (let e of document.body.children) e !== Oo.value && e instanceof HTMLElement && !e.inert && (e.inert = !0, cc.push(e));
|
|
1973
|
+
else cc.splice(0).forEach((e) => e.inert = !1);
|
|
1974
|
+
Oo.value?.querySelector("[data-fullscreen-toggle]")?.focus();
|
|
1903
1975
|
}
|
|
1904
|
-
function
|
|
1905
|
-
|
|
1976
|
+
function uc(e) {
|
|
1977
|
+
ci.value && e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(), lc());
|
|
1906
1978
|
}
|
|
1907
|
-
|
|
1908
|
-
let
|
|
1979
|
+
ue(() => cc.splice(0).forEach((e) => e.inert = !1));
|
|
1980
|
+
let dc = ye("scroll"), fc = ct.useVirtualizer?.(h(() => ({
|
|
1909
1981
|
count: C.virtual && C.scrollHeight ? Z.value.length : 0,
|
|
1910
|
-
getScrollElement: () =>
|
|
1982
|
+
getScrollElement: () => dc.value,
|
|
1911
1983
|
estimateSize: () => C.rowHeight,
|
|
1912
1984
|
overscan: 8,
|
|
1913
1985
|
getItemKey: (e) => Z.value[e]?.key ?? e,
|
|
@@ -1916,60 +1988,60 @@ var Mn = An({
|
|
|
1916
1988
|
height: Number.parseInt(C.scrollHeight ?? "", 10) || 400
|
|
1917
1989
|
}
|
|
1918
1990
|
})));
|
|
1919
|
-
C.virtual &&
|
|
1920
|
-
let $ = h(() => !!C.virtual && !!C.scrollHeight &&
|
|
1991
|
+
C.virtual && !fc && mn("DataTable: `virtual` needs the feature virtualRows from @wirecore/wirelayer-vue/virtual (`:features=\"[virtualRows]\"`) – all rows are rendered");
|
|
1992
|
+
let $ = h(() => !!C.virtual && !!C.scrollHeight && !!fc), pc = h(() => $.value ? fc?.value.getVirtualItems() ?? [] : []), mc = h(() => $.value ? pc.value.map((e) => ({
|
|
1921
1993
|
...Z.value[e.index],
|
|
1922
1994
|
index: e.index
|
|
1923
1995
|
})) : Z.value.map((e, t) => ({
|
|
1924
1996
|
...e,
|
|
1925
1997
|
index: t
|
|
1926
|
-
}))),
|
|
1927
|
-
$.value && e instanceof Element &&
|
|
1928
|
-
},
|
|
1929
|
-
|
|
1930
|
-
function
|
|
1998
|
+
}))), hc = h(() => $.value ? pc.value[0]?.start ?? 0 : 0), gc = h(() => $.value ? (fc?.value.getTotalSize() ?? 0) - (pc.value.at(-1)?.end ?? 0) : 0), _c = (e) => {
|
|
1999
|
+
$.value && e instanceof Element && fc?.value.measureElement(e);
|
|
2000
|
+
}, vc = !1;
|
|
2001
|
+
be(() => An.value.length, () => vc = !1);
|
|
2002
|
+
function yc(e) {
|
|
1931
2003
|
let t = e.currentTarget;
|
|
1932
|
-
|
|
1933
|
-
}
|
|
1934
|
-
let
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
}),
|
|
1938
|
-
let
|
|
1939
|
-
|
|
1940
|
-
function
|
|
2004
|
+
vc || t.scrollTop + t.clientHeight < t.scrollHeight - 80 || (vc = !0, F("loadMore"), F("scrollEnd"));
|
|
2005
|
+
}
|
|
2006
|
+
let bc = k(0), xc, Sc = ye("head");
|
|
2007
|
+
de(() => {
|
|
2008
|
+
Sc.value && typeof ResizeObserver < "u" && (xc = new ResizeObserver(() => bc.value = Sc.value?.offsetHeight ?? 0), xc.observe(Sc.value));
|
|
2009
|
+
}), ue(() => xc?.disconnect());
|
|
2010
|
+
let Cc = ye("tableElement"), wc = () => q.value && Cc.value && sn(Cc.value);
|
|
2011
|
+
de(wc), fe(wc);
|
|
2012
|
+
function Tc(e) {
|
|
1941
2013
|
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.defaultPrevented) return !1;
|
|
1942
2014
|
let t = e.target, n = t.closest("td"), r = n?.parentElement?.dataset.rowId;
|
|
1943
|
-
if (!n || !r || n.cellIndex !==
|
|
2015
|
+
if (!n || !r || n.cellIndex !== gi.value.length || t.closest(Or)) return !1;
|
|
1944
2016
|
let i = K.getRow(r, !0);
|
|
1945
2017
|
if (!i) return !1;
|
|
1946
|
-
let a = getComputedStyle(
|
|
2018
|
+
let a = getComputedStyle(Cc.value).direction === "rtl", o = {
|
|
1947
2019
|
expandable: i.getCanExpand(),
|
|
1948
2020
|
expanded: i.getIsExpanded(),
|
|
1949
2021
|
level: i.depth + 1
|
|
1950
|
-
}, s =
|
|
2022
|
+
}, s = fn(e.key, o, a);
|
|
1951
2023
|
if (!s) return !1;
|
|
1952
2024
|
if (e.preventDefault(), s === "parent") {
|
|
1953
2025
|
let e = i.getParentRow();
|
|
1954
|
-
|
|
2026
|
+
Cc.value?.querySelector(`tr[data-row-id="${CSS.escape(e?.id ?? "")}"] > td:nth-child(${gi.value.length + 1})`)?.focus();
|
|
1955
2027
|
} else i.toggleExpanded(s === "expand");
|
|
1956
2028
|
return !0;
|
|
1957
2029
|
}
|
|
1958
|
-
function
|
|
1959
|
-
q.value &&
|
|
2030
|
+
function Ec(e) {
|
|
2031
|
+
q.value && Cc.value && (li.value && Tc(e) || _t(e, Cc.value, {
|
|
1960
2032
|
itemCount: Z.value.length,
|
|
1961
|
-
scrollToItem: $.value ? (e) =>
|
|
1962
|
-
pageRows:
|
|
2033
|
+
scrollToItem: $.value ? (e) => fc?.value.scrollToIndex(e) : void 0,
|
|
2034
|
+
pageRows: dc.value && C.scrollHeight ? Math.max(1, Math.floor(dc.value.clientHeight / C.rowHeight) - 1) : 10,
|
|
1963
2035
|
onSelectRow: (e) => {
|
|
1964
2036
|
let t = K.getRow(e, !0);
|
|
1965
|
-
t?.getCanSelect() &&
|
|
2037
|
+
t?.getCanSelect() && xa(t, !fa.value || !ma(t));
|
|
1966
2038
|
}
|
|
1967
2039
|
}));
|
|
1968
2040
|
}
|
|
1969
|
-
function
|
|
1970
|
-
q.value &&
|
|
2041
|
+
function Dc(e) {
|
|
2042
|
+
q.value && Cc.value && gt(Cc.value, e.target);
|
|
1971
2043
|
let t = e.target, n = t.closest("tr")?.dataset.rowId, r = t.dataset.columnId;
|
|
1972
|
-
C.cellSelection && q.value && !
|
|
2044
|
+
C.cellSelection && q.value && !is && !as && n && r && t.matches("td") && rs({
|
|
1973
2045
|
anchor: {
|
|
1974
2046
|
rowId: n,
|
|
1975
2047
|
columnId: r
|
|
@@ -1980,127 +2052,139 @@ var Mn = An({
|
|
|
1980
2052
|
}
|
|
1981
2053
|
});
|
|
1982
2054
|
}
|
|
1983
|
-
function
|
|
1984
|
-
|
|
2055
|
+
function Oc(e) {
|
|
2056
|
+
ys(e) || fs(e) || Ec(e);
|
|
1985
2057
|
}
|
|
1986
|
-
let
|
|
1987
|
-
sorting:
|
|
1988
|
-
filters:
|
|
2058
|
+
let kc = h(() => ({
|
|
2059
|
+
sorting: Nr.value,
|
|
2060
|
+
filters: Rt(Vr.value),
|
|
1989
2061
|
globalFilter: W.value,
|
|
1990
2062
|
page: H.value.pageIndex + 1,
|
|
1991
2063
|
pageSize: H.value.pageSize,
|
|
1992
|
-
columnSizing:
|
|
1993
|
-
columnOrder:
|
|
1994
|
-
hiddenColumns: Object.keys(
|
|
1995
|
-
pinnedColumns:
|
|
1996
|
-
expanded:
|
|
1997
|
-
selection: Object.keys(
|
|
1998
|
-
density:
|
|
2064
|
+
columnSizing: Gr.value,
|
|
2065
|
+
columnOrder: Ur.value,
|
|
2066
|
+
hiddenColumns: Object.keys(Hr.value).filter((e) => Hr.value[e] === !1),
|
|
2067
|
+
pinnedColumns: Wr.value,
|
|
2068
|
+
expanded: Br.value === !0 ? [] : Object.keys(Br.value).filter((e) => Br.value[e]),
|
|
2069
|
+
selection: Object.keys(Lr.value).filter((e) => Lr.value[e]),
|
|
2070
|
+
density: Kr.value,
|
|
2071
|
+
showFilters: zr.value
|
|
1999
2072
|
}));
|
|
2000
|
-
|
|
2073
|
+
de(() => {
|
|
2001
2074
|
if (!C.stateKey) return;
|
|
2002
|
-
let e =
|
|
2003
|
-
|
|
2004
|
-
pageIndex: (
|
|
2005
|
-
pageSize:
|
|
2006
|
-
})),
|
|
2075
|
+
let e = Et(C.stateKey, C.stateStorage), t = e && Vt(e, C.stateExclude);
|
|
2076
|
+
t && (t.sorting && Zr(t.sorting), t.filters && K.setColumnFilters(tn(t.filters)), t.globalFilter !== void 0 && K.setGlobalFilter(t.globalFilter), t.columnSizing && (Gr.value = t.columnSizing), t.columnOrder && K.setColumnOrder(t.columnOrder), t.hiddenColumns && K.setColumnVisibility(ln(t.hiddenColumns, !1)), t.pinnedColumns && K.setColumnPinning(t.pinnedColumns), t.expanded && t.expanded.length && ai(ln(t.expanded)), t.selection && ti(hn(t.selection)), t.density && oi(t.density), t.showFilters !== void 0 && t.showFilters !== zr.value && ri(t.showFilters), (t.page || t.pageSize) && Qr({
|
|
2077
|
+
pageIndex: (t.page ?? 1) - 1,
|
|
2078
|
+
pageSize: t.pageSize ?? H.value.pageSize
|
|
2079
|
+
})), be(kc, (e) => on(C.stateKey, Vt(e, C.stateExclude), C.stateStorage), { deep: !0 });
|
|
2007
2080
|
});
|
|
2008
|
-
function
|
|
2009
|
-
C.stateKey &&
|
|
2081
|
+
function Ac() {
|
|
2082
|
+
C.stateKey && Qe(C.stateKey, C.stateStorage);
|
|
2010
2083
|
}
|
|
2011
|
-
|
|
2084
|
+
function jc() {
|
|
2085
|
+
Vr.value.length && K.setColumnFilters([]), W.value && K.setGlobalFilter(""), Dn.value && On(dt("and", "root")), H.value.pageIndex && Qr({
|
|
2086
|
+
...H.value,
|
|
2087
|
+
pageIndex: 0
|
|
2088
|
+
});
|
|
2089
|
+
}
|
|
2090
|
+
function Mc() {
|
|
2091
|
+
jc(), Zr(Lt(C.defaultSorting)), Object.keys(Lr.value).length && ti({}), Rr.value && ni(null), T(Ac);
|
|
2092
|
+
}
|
|
2093
|
+
let Nc = h(() => !!C.pageSize), Pc = h(() => Mn.value ? Nn.value ?? An.value.length : K.getPrePaginatedRowModel().rows.length), Fc = h(() => (C.pageSizeOptions ?? []).map((e) => ({
|
|
2012
2094
|
value: String(e),
|
|
2013
2095
|
label: String(e)
|
|
2014
|
-
}))),
|
|
2096
|
+
}))), Ic = h(() => !!C.find || !!C.search || !!C.columnToggle || !!C.exportFilename || !!C.densityToggle || !!C.fullscreenToggle || !!C.filterToggle || !!C.filterReset || kn.value || !!I.toolbar || !!I.toolbarStart || !!I.toolbarEnd), Lc = h(() => C.highlightSearch ? W.value : ""), Rc = h(() => Cs.value ? xs.value.trim() : Lc.value), zc = h(() => Ii.value ? Ii.value : C.dataSource ? Pn.value ? "" : at(bn.value, l, S.value.locale) : na.value ? L.results(K.getFilteredRowModel().rows.length) : ""), Bc = h(() => Fn.value && C.loadingVariant === "skeleton"), Vc = h(() => Math.min(Z.value.length || C.pageSize || 5, 50)), Hc = h(() => na.value && (Mn.value || An.value.length > 0) && (!!I.noResults || C.noResultsText !== void 0)), Uc = h(() => {
|
|
2015
2097
|
if (!C.statusBar) return [];
|
|
2016
2098
|
let e = K.getSelectedRowModel().flatRows.filter((e) => !e.getIsGrouped());
|
|
2017
2099
|
return e.length ? Y.value.flatMap((t) => {
|
|
2018
|
-
let n =
|
|
2100
|
+
let n = B.value.get(t.id), r = Bt(e.map((e) => Ar(n, e.original)));
|
|
2019
2101
|
if (!r) return [];
|
|
2020
2102
|
let i = e[0].original;
|
|
2021
2103
|
return [{
|
|
2022
2104
|
id: t.id,
|
|
2023
|
-
text: `${n.header}: ${L.aggregates.sum(
|
|
2105
|
+
text: `${n.header}: ${L.aggregates.sum(Fa(n, r.sum, i))} · ${L.aggregates.avg(Fa(n, r.avg, i))}`
|
|
2024
2106
|
}];
|
|
2025
2107
|
}) : [];
|
|
2026
|
-
}),
|
|
2108
|
+
}), Wc = h(() => Mn.value ? Nn.value ?? An.value.length : K.getCoreRowModel().rows.length), Gc = h(() => ({
|
|
2027
2109
|
page: H.value.pageIndex + 1,
|
|
2028
2110
|
pageSize: C.pageSize ? H.value.pageSize : 0,
|
|
2029
|
-
sorting:
|
|
2111
|
+
sorting: Nr.value.map((e) => ({
|
|
2030
2112
|
id: e.id,
|
|
2031
2113
|
desc: e.desc
|
|
2032
2114
|
})),
|
|
2033
|
-
filters:
|
|
2115
|
+
filters: Rt(Vr.value),
|
|
2034
2116
|
search: W.value,
|
|
2035
2117
|
groupBy: U.value,
|
|
2036
|
-
...
|
|
2037
|
-
})),
|
|
2038
|
-
...
|
|
2118
|
+
...Dn.value ? { condition: wn.value } : {}
|
|
2119
|
+
})), Kc = h(() => Zt(Gc.value)), qc = h(() => Zt({
|
|
2120
|
+
...Gc.value,
|
|
2039
2121
|
page: void 0,
|
|
2040
2122
|
pageSize: void 0
|
|
2041
|
-
})),
|
|
2042
|
-
function
|
|
2043
|
-
let r =
|
|
2123
|
+
})), Jc = W.value;
|
|
2124
|
+
function Yc(e, t, n) {
|
|
2125
|
+
let r = Sn();
|
|
2044
2126
|
if (!r) return;
|
|
2045
2127
|
if (n !== void 0 && n !== t && H.value.pageIndex !== 0) {
|
|
2046
|
-
|
|
2128
|
+
Qr({
|
|
2047
2129
|
...H.value,
|
|
2048
2130
|
pageIndex: 0
|
|
2049
2131
|
});
|
|
2050
2132
|
return;
|
|
2051
2133
|
}
|
|
2052
|
-
let i =
|
|
2053
|
-
|
|
2134
|
+
let i = Jc !== W.value;
|
|
2135
|
+
Jc = W.value, r.load(JSON.parse(e), { debounce: i });
|
|
2054
2136
|
}
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2137
|
+
de(() => Yc(Kc.value, qc.value, void 0)), be([
|
|
2138
|
+
Kc,
|
|
2139
|
+
qc,
|
|
2058
2140
|
() => !!C.dataSource
|
|
2059
|
-
], ([e, t], [, n]) =>
|
|
2060
|
-
exportCsv:
|
|
2061
|
-
generateCsv:
|
|
2062
|
-
clearState:
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2141
|
+
], ([e, t], [, n]) => Yc(e, t, n)), o({
|
|
2142
|
+
exportCsv: Hs,
|
|
2143
|
+
generateCsv: Vs,
|
|
2144
|
+
clearState: Ac,
|
|
2145
|
+
resetFilters: jc,
|
|
2146
|
+
resetState: Mc,
|
|
2147
|
+
exportXlsx: Js,
|
|
2148
|
+
generateXlsx: qs,
|
|
2149
|
+
print: Xs,
|
|
2150
|
+
refresh: Zs,
|
|
2151
|
+
undo: vo,
|
|
2152
|
+
redo: yo
|
|
2069
2153
|
});
|
|
2070
|
-
let
|
|
2154
|
+
let Xc = {
|
|
2071
2155
|
placement: "bottom-end",
|
|
2072
2156
|
gutter: 4
|
|
2073
2157
|
};
|
|
2074
|
-
return (e, t) => (
|
|
2158
|
+
return (e, t) => (O(), g(ae, {
|
|
2075
2159
|
to: "body",
|
|
2076
|
-
disabled: !
|
|
2077
|
-
}, [y("div",
|
|
2160
|
+
disabled: !ci.value
|
|
2161
|
+
}, [y("div", w({
|
|
2078
2162
|
ref_key: "root",
|
|
2079
|
-
ref:
|
|
2163
|
+
ref: Oo
|
|
2080
2164
|
}, {
|
|
2081
|
-
...
|
|
2082
|
-
class: J.value.base({ class:
|
|
2165
|
+
...N(Be),
|
|
2166
|
+
class: J.value.base({ class: E(N(Be).class) })
|
|
2083
2167
|
}, {
|
|
2084
|
-
role:
|
|
2085
|
-
"aria-modal":
|
|
2086
|
-
"aria-label":
|
|
2087
|
-
onKeydown:
|
|
2168
|
+
role: ci.value ? "dialog" : void 0,
|
|
2169
|
+
"aria-modal": ci.value || void 0,
|
|
2170
|
+
"aria-label": ci.value ? a.caption : void 0,
|
|
2171
|
+
onKeydown: uc
|
|
2088
2172
|
}), [
|
|
2089
|
-
|
|
2173
|
+
Ic.value ? (O(), v("div", {
|
|
2090
2174
|
key: 0,
|
|
2091
|
-
class:
|
|
2175
|
+
class: E(J.value.toolbar())
|
|
2092
2176
|
}, [
|
|
2093
|
-
|
|
2094
|
-
a.search ? (
|
|
2177
|
+
j(e.$slots, "toolbarStart"),
|
|
2178
|
+
a.search ? (O(), g(p, {
|
|
2095
2179
|
key: 0,
|
|
2096
2180
|
type: "search",
|
|
2097
2181
|
size: "sm",
|
|
2098
|
-
"leading-icon":
|
|
2099
|
-
class:
|
|
2100
|
-
placeholder:
|
|
2101
|
-
"aria-label":
|
|
2182
|
+
"leading-icon": N(Ue),
|
|
2183
|
+
class: E(J.value.search()),
|
|
2184
|
+
placeholder: N(L).searchPlaceholder,
|
|
2185
|
+
"aria-label": N(L).search(a.caption),
|
|
2102
2186
|
"model-value": W.value,
|
|
2103
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
2187
|
+
"onUpdate:modelValue": t[0] ||= (e) => N(K).setGlobalFilter(e ?? "")
|
|
2104
2188
|
}, null, 8, [
|
|
2105
2189
|
"leading-icon",
|
|
2106
2190
|
"class",
|
|
@@ -2108,89 +2192,102 @@ var Mn = An({
|
|
|
2108
2192
|
"aria-label",
|
|
2109
2193
|
"model-value"
|
|
2110
2194
|
])) : _("", !0),
|
|
2111
|
-
|
|
2112
|
-
y("div", { class:
|
|
2113
|
-
|
|
2114
|
-
a.find ? (
|
|
2195
|
+
j(e.$slots, "toolbar"),
|
|
2196
|
+
y("div", { class: E(J.value.toolbarEnd()) }, [
|
|
2197
|
+
j(e.$slots, "toolbarEnd"),
|
|
2198
|
+
a.find ? (O(), g(f, {
|
|
2115
2199
|
key: 0,
|
|
2116
2200
|
"data-find-toggle": "",
|
|
2117
|
-
icon:
|
|
2118
|
-
label:
|
|
2201
|
+
icon: N(We),
|
|
2202
|
+
label: N(L).find,
|
|
2119
2203
|
variant: "outline",
|
|
2120
2204
|
size: "sm",
|
|
2121
|
-
"aria-expanded":
|
|
2122
|
-
onClick:
|
|
2205
|
+
"aria-expanded": bs.value,
|
|
2206
|
+
onClick: js
|
|
2123
2207
|
}, null, 8, [
|
|
2124
2208
|
"icon",
|
|
2125
2209
|
"label",
|
|
2126
2210
|
"aria-expanded"
|
|
2127
2211
|
])) : _("", !0),
|
|
2128
|
-
|
|
2212
|
+
kn.value ? (O(), g(d, {
|
|
2129
2213
|
key: 1,
|
|
2130
2214
|
variant: "outline",
|
|
2131
2215
|
size: "sm",
|
|
2132
|
-
"leading-icon":
|
|
2133
|
-
"aria-expanded":
|
|
2134
|
-
"aria-controls": `${
|
|
2135
|
-
onClick: t[1] ||= (e) =>
|
|
2216
|
+
"leading-icon": N(Ie),
|
|
2217
|
+
"aria-expanded": Tn.value,
|
|
2218
|
+
"aria-controls": `${N(tt)}-advanced`,
|
|
2219
|
+
onClick: t[1] ||= (e) => Tn.value = !Tn.value
|
|
2136
2220
|
}, {
|
|
2137
|
-
default: P(() => [b(
|
|
2221
|
+
default: P(() => [b(M(N(l).conditionBuilder.advanced), 1)]),
|
|
2138
2222
|
_: 1
|
|
2139
2223
|
}, 8, [
|
|
2140
2224
|
"leading-icon",
|
|
2141
2225
|
"aria-expanded",
|
|
2142
2226
|
"aria-controls"
|
|
2143
2227
|
])) : _("", !0),
|
|
2144
|
-
a.filterToggle ? (
|
|
2228
|
+
a.filterToggle ? (O(), g(f, {
|
|
2145
2229
|
key: 2,
|
|
2146
|
-
icon:
|
|
2147
|
-
label:
|
|
2230
|
+
icon: N(Ne),
|
|
2231
|
+
label: N(L).filterToggle,
|
|
2148
2232
|
variant: "outline",
|
|
2149
2233
|
size: "sm",
|
|
2150
|
-
"aria-pressed":
|
|
2151
|
-
onClick:
|
|
2234
|
+
"aria-pressed": zr.value,
|
|
2235
|
+
onClick: ii
|
|
2152
2236
|
}, null, 8, [
|
|
2153
2237
|
"icon",
|
|
2154
2238
|
"label",
|
|
2155
2239
|
"aria-pressed"
|
|
2156
2240
|
])) : _("", !0),
|
|
2157
|
-
a.
|
|
2241
|
+
a.filterReset ? (O(), g(f, {
|
|
2158
2242
|
key: 3,
|
|
2159
|
-
|
|
2243
|
+
icon: N(Pe),
|
|
2244
|
+
label: N(L).resetFilters,
|
|
2245
|
+
variant: "outline",
|
|
2246
|
+
size: "sm",
|
|
2247
|
+
disabled: !na.value,
|
|
2248
|
+
onClick: jc
|
|
2249
|
+
}, null, 8, [
|
|
2250
|
+
"icon",
|
|
2251
|
+
"label",
|
|
2252
|
+
"disabled"
|
|
2253
|
+
])) : _("", !0),
|
|
2254
|
+
a.densityToggle ? (O(), g(N(R).Root, {
|
|
2255
|
+
key: 4,
|
|
2256
|
+
positioning: Xc,
|
|
2160
2257
|
"lazy-mount": "",
|
|
2161
2258
|
"unmount-on-exit": ""
|
|
2162
2259
|
}, {
|
|
2163
|
-
default: P(() => [x(
|
|
2260
|
+
default: P(() => [x(N(R).Trigger, { "as-child": "" }, {
|
|
2164
2261
|
default: P(() => [x(f, {
|
|
2165
|
-
icon:
|
|
2166
|
-
label:
|
|
2262
|
+
icon: N(He),
|
|
2263
|
+
label: N(L).density,
|
|
2167
2264
|
variant: "outline",
|
|
2168
2265
|
size: "sm"
|
|
2169
2266
|
}, null, 8, ["icon", "label"])]),
|
|
2170
2267
|
_: 1
|
|
2171
|
-
}), (
|
|
2172
|
-
default: P(() => [x(
|
|
2173
|
-
default: P(() => [x(
|
|
2174
|
-
"model-value":
|
|
2175
|
-
"onUpdate:modelValue": t[2] ||= (e) =>
|
|
2268
|
+
}), (O(), g(ae, { to: "body" }, [x(N(R).Positioner, null, {
|
|
2269
|
+
default: P(() => [x(N(R).Content, { class: E(N(ui).content()) }, {
|
|
2270
|
+
default: P(() => [x(N(R).RadioItemGroup, {
|
|
2271
|
+
"model-value": Kr.value,
|
|
2272
|
+
"onUpdate:modelValue": t[2] ||= (e) => oi(e)
|
|
2176
2273
|
}, {
|
|
2177
|
-
default: P(() => [(
|
|
2274
|
+
default: P(() => [(O(), v(m, null, A([
|
|
2178
2275
|
"sm",
|
|
2179
2276
|
"md",
|
|
2180
2277
|
"lg"
|
|
2181
|
-
], (e) => x(
|
|
2278
|
+
], (e) => x(N(R).RadioItem, {
|
|
2182
2279
|
key: e,
|
|
2183
2280
|
value: e,
|
|
2184
|
-
class:
|
|
2281
|
+
class: E(N(ui).item())
|
|
2185
2282
|
}, {
|
|
2186
|
-
default: P(() => [x(
|
|
2187
|
-
default: P(() => [x(
|
|
2188
|
-
class:
|
|
2283
|
+
default: P(() => [x(N(R).ItemIndicator, null, {
|
|
2284
|
+
default: P(() => [x(N(we), {
|
|
2285
|
+
class: E(J.value.menuCheck()),
|
|
2189
2286
|
"aria-hidden": "true"
|
|
2190
2287
|
}, null, 8, ["class"])]),
|
|
2191
2288
|
_: 1
|
|
2192
|
-
}), x(
|
|
2193
|
-
default: P(() => [b(
|
|
2289
|
+
}), x(N(R).ItemText, { class: E(N(ui).label()) }, {
|
|
2290
|
+
default: P(() => [b(M(N(L).densities[e]), 1)]),
|
|
2194
2291
|
_: 2
|
|
2195
2292
|
}, 1032, ["class"])]),
|
|
2196
2293
|
_: 2
|
|
@@ -2203,42 +2300,42 @@ var Mn = An({
|
|
|
2203
2300
|
})]))]),
|
|
2204
2301
|
_: 1
|
|
2205
2302
|
})) : _("", !0),
|
|
2206
|
-
a.columnToggle ? (
|
|
2207
|
-
key:
|
|
2208
|
-
positioning:
|
|
2303
|
+
a.columnToggle ? (O(), g(N(R).Root, {
|
|
2304
|
+
key: 5,
|
|
2305
|
+
positioning: Xc,
|
|
2209
2306
|
"lazy-mount": "",
|
|
2210
2307
|
"unmount-on-exit": ""
|
|
2211
2308
|
}, {
|
|
2212
|
-
default: P(() => [x(
|
|
2309
|
+
default: P(() => [x(N(R).Trigger, { "as-child": "" }, {
|
|
2213
2310
|
default: P(() => [x(d, {
|
|
2214
2311
|
variant: "outline",
|
|
2215
2312
|
size: "sm",
|
|
2216
|
-
"leading-icon":
|
|
2313
|
+
"leading-icon": N(Ae)
|
|
2217
2314
|
}, {
|
|
2218
|
-
default: P(() => [b(
|
|
2315
|
+
default: P(() => [b(M(N(L).columns), 1)]),
|
|
2219
2316
|
_: 1
|
|
2220
2317
|
}, 8, ["leading-icon"])]),
|
|
2221
2318
|
_: 1
|
|
2222
|
-
}), (
|
|
2223
|
-
default: P(() => [x(
|
|
2224
|
-
default: P(() => [(
|
|
2225
|
-
e.def?.columns ? (
|
|
2319
|
+
}), (O(), g(ae, { to: "body" }, [x(N(R).Positioner, null, {
|
|
2320
|
+
default: P(() => [x(N(R).Content, { class: E(N(ui).content()) }, {
|
|
2321
|
+
default: P(() => [(O(!0), v(m, null, A(ic.value, (e, t) => (O(), v(m, { key: e.def ? `group:${e.def.id}` : "columns" }, [
|
|
2322
|
+
e.def?.columns ? (O(), g(N(R).CheckboxItem, {
|
|
2226
2323
|
key: 0,
|
|
2227
2324
|
value: `group:${e.def.id}`,
|
|
2228
2325
|
checked: e.leaves.filter((e) => e.getCanHide()).every((e) => e.getIsVisible()),
|
|
2229
2326
|
disabled: !e.leaves.some((e) => e.getCanHide()),
|
|
2230
2327
|
"close-on-select": !1,
|
|
2231
|
-
class:
|
|
2232
|
-
"onUpdate:checked": (t) =>
|
|
2328
|
+
class: E(N(ui).item()),
|
|
2329
|
+
"onUpdate:checked": (t) => ac(e.leaves, t)
|
|
2233
2330
|
}, {
|
|
2234
|
-
default: P(() => [x(
|
|
2235
|
-
default: P(() => [x(
|
|
2236
|
-
class:
|
|
2331
|
+
default: P(() => [x(N(R).ItemIndicator, null, {
|
|
2332
|
+
default: P(() => [x(N(we), {
|
|
2333
|
+
class: E(J.value.menuCheck()),
|
|
2237
2334
|
"aria-hidden": "true"
|
|
2238
2335
|
}, null, 8, ["class"])]),
|
|
2239
2336
|
_: 1
|
|
2240
|
-
}), x(
|
|
2241
|
-
default: P(() => [b(
|
|
2337
|
+
}), x(N(R).ItemText, { class: E(N(ui).label()) }, {
|
|
2338
|
+
default: P(() => [b(M(e.def.header), 1)]),
|
|
2242
2339
|
_: 2
|
|
2243
2340
|
}, 1032, ["class"])]),
|
|
2244
2341
|
_: 2
|
|
@@ -2249,22 +2346,22 @@ var Mn = An({
|
|
|
2249
2346
|
"class",
|
|
2250
2347
|
"onUpdate:checked"
|
|
2251
2348
|
])) : _("", !0),
|
|
2252
|
-
(
|
|
2349
|
+
(O(!0), v(m, null, A(e.leaves.filter((e) => e.getCanHide()), (t) => (O(), g(N(R).CheckboxItem, {
|
|
2253
2350
|
key: t.id,
|
|
2254
2351
|
value: t.id,
|
|
2255
2352
|
checked: t.getIsVisible(),
|
|
2256
2353
|
"close-on-select": !1,
|
|
2257
|
-
class:
|
|
2354
|
+
class: E(N(ui).item(e.def?.columns ? { class: J.value.columnGroupItem() } : {})),
|
|
2258
2355
|
"onUpdate:checked": (e) => t.toggleVisibility(e)
|
|
2259
2356
|
}, {
|
|
2260
|
-
default: P(() => [x(
|
|
2261
|
-
default: P(() => [x(
|
|
2262
|
-
class:
|
|
2357
|
+
default: P(() => [x(N(R).ItemIndicator, null, {
|
|
2358
|
+
default: P(() => [x(N(we), {
|
|
2359
|
+
class: E(J.value.menuCheck()),
|
|
2263
2360
|
"aria-hidden": "true"
|
|
2264
2361
|
}, null, 8, ["class"])]),
|
|
2265
2362
|
_: 1
|
|
2266
|
-
}), x(
|
|
2267
|
-
default: P(() => [b(
|
|
2363
|
+
}), x(N(R).ItemText, { class: E(N(ui).label()) }, {
|
|
2364
|
+
default: P(() => [b(M(X(t)), 1)]),
|
|
2268
2365
|
_: 2
|
|
2269
2366
|
}, 1032, ["class"])]),
|
|
2270
2367
|
_: 2
|
|
@@ -2274,16 +2371,16 @@ var Mn = An({
|
|
|
2274
2371
|
"class",
|
|
2275
2372
|
"onUpdate:checked"
|
|
2276
2373
|
]))), 128)),
|
|
2277
|
-
e.def?.columns && a.reorderableColumns ? (
|
|
2374
|
+
e.def?.columns && a.reorderableColumns ? (O(), v(m, { key: 1 }, A([-1, 1], (n) => x(N(R).Item, {
|
|
2278
2375
|
key: n,
|
|
2279
2376
|
value: `group-${n < 0 ? "earlier" : "later"}:${e.def.id}`,
|
|
2280
|
-
disabled: n < 0 ? t === 0 : t ===
|
|
2377
|
+
disabled: n < 0 ? t === 0 : t === ic.value.length - 1,
|
|
2281
2378
|
"close-on-select": !1,
|
|
2282
|
-
class:
|
|
2283
|
-
onSelect: (t) =>
|
|
2379
|
+
class: E(N(ui).item({ class: J.value.columnGroupItem() })),
|
|
2380
|
+
onSelect: (t) => oc(e.def.id, n)
|
|
2284
2381
|
}, {
|
|
2285
|
-
default: P(() => [x(
|
|
2286
|
-
default: P(() => [b(
|
|
2382
|
+
default: P(() => [x(N(R).ItemText, { class: E(N(ui).label()) }, {
|
|
2383
|
+
default: P(() => [b(M(n < 0 ? N(L).columnGroupEarlier(e.def.header) : N(L).columnGroupLater(e.def.header)), 1)]),
|
|
2287
2384
|
_: 2
|
|
2288
2385
|
}, 1032, ["class"])]),
|
|
2289
2386
|
_: 2
|
|
@@ -2300,68 +2397,68 @@ var Mn = An({
|
|
|
2300
2397
|
})]))]),
|
|
2301
2398
|
_: 1
|
|
2302
2399
|
})) : _("", !0),
|
|
2303
|
-
a.exportFilename ? (
|
|
2400
|
+
a.exportFilename ? (O(), v(m, { key: 6 }, [$s.value.length > 1 ? (O(), g(u, {
|
|
2304
2401
|
key: 0,
|
|
2305
|
-
items:
|
|
2306
|
-
onSelect:
|
|
2402
|
+
items: $s.value,
|
|
2403
|
+
onSelect: tc
|
|
2307
2404
|
}, {
|
|
2308
2405
|
default: P(() => [x(d, {
|
|
2309
2406
|
variant: "outline",
|
|
2310
2407
|
size: "sm",
|
|
2311
|
-
"leading-icon":
|
|
2408
|
+
"leading-icon": N(je)
|
|
2312
2409
|
}, {
|
|
2313
|
-
default: P(() => [b(
|
|
2410
|
+
default: P(() => [b(M(ec.value), 1)]),
|
|
2314
2411
|
_: 1
|
|
2315
2412
|
}, 8, ["leading-icon"])]),
|
|
2316
2413
|
_: 1
|
|
2317
|
-
}, 8, ["items"])) : (
|
|
2414
|
+
}, 8, ["items"])) : (O(), g(d, {
|
|
2318
2415
|
key: 1,
|
|
2319
2416
|
variant: "outline",
|
|
2320
2417
|
size: "sm",
|
|
2321
|
-
"leading-icon":
|
|
2322
|
-
onClick: t[3] ||= (e) =>
|
|
2418
|
+
"leading-icon": N(je),
|
|
2419
|
+
onClick: t[3] ||= (e) => Ys(Qs.value[0], !1)
|
|
2323
2420
|
}, {
|
|
2324
|
-
default: P(() => [b(
|
|
2421
|
+
default: P(() => [b(M(ec.value), 1)]),
|
|
2325
2422
|
_: 1
|
|
2326
2423
|
}, 8, ["leading-icon"]))], 64)) : _("", !0),
|
|
2327
|
-
a.fullscreenToggle ? (
|
|
2328
|
-
key:
|
|
2424
|
+
a.fullscreenToggle ? (O(), g(f, {
|
|
2425
|
+
key: 7,
|
|
2329
2426
|
"data-fullscreen-toggle": "",
|
|
2330
|
-
icon:
|
|
2331
|
-
label:
|
|
2427
|
+
icon: ci.value ? N(Re) : N(Le),
|
|
2428
|
+
label: ci.value ? N(L).exitFullscreen : N(L).fullscreen,
|
|
2332
2429
|
variant: "outline",
|
|
2333
2430
|
size: "sm",
|
|
2334
|
-
onClick:
|
|
2431
|
+
onClick: lc
|
|
2335
2432
|
}, null, 8, ["icon", "label"])) : _("", !0)
|
|
2336
2433
|
], 2)
|
|
2337
2434
|
], 2)) : _("", !0),
|
|
2338
|
-
|
|
2435
|
+
kn.value && Tn.value ? (O(), v("div", {
|
|
2339
2436
|
key: 1,
|
|
2340
|
-
id: `${
|
|
2341
|
-
class:
|
|
2342
|
-
}, [
|
|
2343
|
-
fields:
|
|
2344
|
-
value:
|
|
2345
|
-
setValue:
|
|
2346
|
-
label:
|
|
2347
|
-
})], 10,
|
|
2348
|
-
a.find &&
|
|
2437
|
+
id: `${N(tt)}-advanced`,
|
|
2438
|
+
class: E(J.value.advancedFilter())
|
|
2439
|
+
}, [j(e.$slots, "advancedFilter", {
|
|
2440
|
+
fields: En.value,
|
|
2441
|
+
value: wn.value,
|
|
2442
|
+
setValue: On,
|
|
2443
|
+
label: N(l).conditionBuilder.advanced
|
|
2444
|
+
})], 10, Un)) : _("", !0),
|
|
2445
|
+
a.find && bs.value ? (O(), v("div", {
|
|
2349
2446
|
key: 2,
|
|
2350
|
-
class:
|
|
2447
|
+
class: E(J.value.findBar()),
|
|
2351
2448
|
role: "search",
|
|
2352
|
-
"aria-label":
|
|
2449
|
+
"aria-label": N(L).find
|
|
2353
2450
|
}, [
|
|
2354
2451
|
x(p, {
|
|
2355
2452
|
type: "search",
|
|
2356
2453
|
size: "sm",
|
|
2357
2454
|
"data-find-input": "",
|
|
2358
|
-
"leading-icon":
|
|
2359
|
-
class:
|
|
2360
|
-
placeholder:
|
|
2361
|
-
"aria-label":
|
|
2362
|
-
"model-value":
|
|
2363
|
-
"onUpdate:modelValue": t[4] ||= (e) =>
|
|
2364
|
-
onKeydown:
|
|
2455
|
+
"leading-icon": N(We),
|
|
2456
|
+
class: E(J.value.findInput()),
|
|
2457
|
+
placeholder: N(L).searchPlaceholder,
|
|
2458
|
+
"aria-label": N(L).find,
|
|
2459
|
+
"model-value": xs.value,
|
|
2460
|
+
"onUpdate:modelValue": t[4] ||= (e) => Ns(e ?? ""),
|
|
2461
|
+
onKeydown: Ms
|
|
2365
2462
|
}, null, 8, [
|
|
2366
2463
|
"leading-icon",
|
|
2367
2464
|
"class",
|
|
@@ -2370,793 +2467,828 @@ var Mn = An({
|
|
|
2370
2467
|
"model-value"
|
|
2371
2468
|
]),
|
|
2372
2469
|
y("span", {
|
|
2373
|
-
class:
|
|
2470
|
+
class: E(J.value.findCount()),
|
|
2374
2471
|
"aria-live": "polite"
|
|
2375
|
-
},
|
|
2472
|
+
}, M(xs.value.trim() ? N(L).findMatches(Ts.value.length ? Math.min(Ss.value, Ts.value.length - 1) + 1 : 0, Ts.value.length) : ""), 3),
|
|
2376
2473
|
x(f, {
|
|
2377
|
-
icon:
|
|
2378
|
-
label:
|
|
2474
|
+
icon: N(De),
|
|
2475
|
+
label: N(L).findPrevious,
|
|
2379
2476
|
variant: "text",
|
|
2380
2477
|
size: "sm",
|
|
2381
|
-
disabled: !
|
|
2382
|
-
onClick: t[5] ||= (e) =>
|
|
2478
|
+
disabled: !Ts.value.length,
|
|
2479
|
+
onClick: t[5] ||= (e) => As(Ss.value - 1)
|
|
2383
2480
|
}, null, 8, [
|
|
2384
2481
|
"icon",
|
|
2385
2482
|
"label",
|
|
2386
2483
|
"disabled"
|
|
2387
2484
|
]),
|
|
2388
2485
|
x(f, {
|
|
2389
|
-
icon:
|
|
2390
|
-
label:
|
|
2486
|
+
icon: N(Te),
|
|
2487
|
+
label: N(L).findNext,
|
|
2391
2488
|
variant: "text",
|
|
2392
2489
|
size: "sm",
|
|
2393
|
-
disabled: !
|
|
2394
|
-
onClick: t[6] ||= (e) =>
|
|
2490
|
+
disabled: !Ts.value.length,
|
|
2491
|
+
onClick: t[6] ||= (e) => As(Ss.value + 1)
|
|
2395
2492
|
}, null, 8, [
|
|
2396
2493
|
"icon",
|
|
2397
2494
|
"label",
|
|
2398
2495
|
"disabled"
|
|
2399
2496
|
]),
|
|
2400
2497
|
x(f, {
|
|
2401
|
-
icon:
|
|
2402
|
-
label:
|
|
2498
|
+
icon: N(Ke),
|
|
2499
|
+
label: N(L).findClose,
|
|
2403
2500
|
variant: "text",
|
|
2404
2501
|
size: "sm",
|
|
2405
|
-
onClick:
|
|
2502
|
+
onClick: js
|
|
2406
2503
|
}, null, 8, ["icon", "label"])
|
|
2407
|
-
], 10,
|
|
2408
|
-
a.editMode === "batch" ? (
|
|
2504
|
+
], 10, Wn)) : _("", !0),
|
|
2505
|
+
a.editMode === "batch" ? (O(), v("div", {
|
|
2409
2506
|
key: 3,
|
|
2410
|
-
class:
|
|
2507
|
+
class: E(J.value.batchBar())
|
|
2411
2508
|
}, [
|
|
2412
|
-
y("span", { class:
|
|
2509
|
+
y("span", { class: E(J.value.batchCount()) }, M(N(L).changes(bo.value)), 3),
|
|
2413
2510
|
x(d, {
|
|
2414
2511
|
variant: "text",
|
|
2415
2512
|
size: "sm",
|
|
2416
|
-
"leading-icon":
|
|
2417
|
-
disabled: !
|
|
2418
|
-
onClick:
|
|
2513
|
+
"leading-icon": N(Ge),
|
|
2514
|
+
disabled: !ho.value,
|
|
2515
|
+
onClick: vo
|
|
2419
2516
|
}, {
|
|
2420
|
-
default: P(() => [b(
|
|
2517
|
+
default: P(() => [b(M(N(L).undo), 1)]),
|
|
2421
2518
|
_: 1
|
|
2422
2519
|
}, 8, ["leading-icon", "disabled"]),
|
|
2423
2520
|
x(d, {
|
|
2424
2521
|
variant: "text",
|
|
2425
2522
|
size: "sm",
|
|
2426
|
-
"leading-icon":
|
|
2427
|
-
disabled: !
|
|
2428
|
-
onClick:
|
|
2523
|
+
"leading-icon": N(Ve),
|
|
2524
|
+
disabled: !go.value,
|
|
2525
|
+
onClick: yo
|
|
2429
2526
|
}, {
|
|
2430
|
-
default: P(() => [b(
|
|
2527
|
+
default: P(() => [b(M(N(L).redo), 1)]),
|
|
2431
2528
|
_: 1
|
|
2432
2529
|
}, 8, ["leading-icon", "disabled"]),
|
|
2433
2530
|
x(d, {
|
|
2434
2531
|
variant: "outline",
|
|
2435
2532
|
size: "sm",
|
|
2436
|
-
disabled: !
|
|
2437
|
-
onClick:
|
|
2533
|
+
disabled: !bo.value,
|
|
2534
|
+
onClick: Co
|
|
2438
2535
|
}, {
|
|
2439
|
-
default: P(() => [b(
|
|
2536
|
+
default: P(() => [b(M(N(L).discardChanges), 1)]),
|
|
2440
2537
|
_: 1
|
|
2441
2538
|
}, 8, ["disabled"]),
|
|
2442
2539
|
x(d, {
|
|
2443
2540
|
size: "sm",
|
|
2444
|
-
disabled: !
|
|
2445
|
-
onClick:
|
|
2541
|
+
disabled: !bo.value,
|
|
2542
|
+
onClick: So
|
|
2446
2543
|
}, {
|
|
2447
|
-
default: P(() => [b(
|
|
2544
|
+
default: P(() => [b(M(N(L).saveChanges), 1)]),
|
|
2448
2545
|
_: 1
|
|
2449
2546
|
}, 8, ["disabled"])
|
|
2450
2547
|
], 2)) : _("", !0),
|
|
2451
2548
|
y("p", {
|
|
2452
2549
|
role: "status",
|
|
2453
|
-
class:
|
|
2454
|
-
},
|
|
2455
|
-
|
|
2550
|
+
class: E(J.value.status())
|
|
2551
|
+
}, M(zc.value), 3),
|
|
2552
|
+
Nc.value && a.paginatorPosition === "top" ? (O(), v("div", {
|
|
2456
2553
|
key: 4,
|
|
2457
|
-
class:
|
|
2458
|
-
}, [
|
|
2554
|
+
class: E(J.value.footer())
|
|
2555
|
+
}, [Fc.value.length ? (O(), v("div", {
|
|
2459
2556
|
key: 0,
|
|
2460
|
-
class:
|
|
2461
|
-
}, [y("span",
|
|
2462
|
-
class:
|
|
2463
|
-
"aria-label":
|
|
2464
|
-
items:
|
|
2557
|
+
class: E(J.value.pageSize())
|
|
2558
|
+
}, [y("span", Gn, M(N(L).rowsPerPage), 1), x(ne, {
|
|
2559
|
+
class: E(J.value.pageSizeSelect()),
|
|
2560
|
+
"aria-label": N(L).rowsPerPage,
|
|
2561
|
+
items: Fc.value,
|
|
2465
2562
|
"model-value": String(H.value.pageSize),
|
|
2466
|
-
"onUpdate:modelValue": t[7] ||= (e) =>
|
|
2563
|
+
"onUpdate:modelValue": t[7] ||= (e) => N(K).setPageSize(Number(e))
|
|
2467
2564
|
}, null, 8, [
|
|
2468
2565
|
"class",
|
|
2469
2566
|
"aria-label",
|
|
2470
2567
|
"items",
|
|
2471
2568
|
"model-value"
|
|
2472
2569
|
])], 2)) : _("", !0), x(r, {
|
|
2473
|
-
count:
|
|
2570
|
+
count: Pc.value,
|
|
2474
2571
|
"page-size": H.value.pageSize,
|
|
2475
2572
|
page: H.value.pageIndex + 1,
|
|
2476
|
-
translations: { rootLabel: `${a.caption}: ${
|
|
2477
|
-
"
|
|
2573
|
+
translations: { rootLabel: `${a.caption}: ${N(l).pagination.rootLabel}` },
|
|
2574
|
+
"with-edges": a.paginatorEdges,
|
|
2575
|
+
"onUpdate:page": t[8] ||= (e) => N(K).setPageIndex(e - 1)
|
|
2478
2576
|
}, null, 8, [
|
|
2479
2577
|
"count",
|
|
2480
2578
|
"page-size",
|
|
2481
2579
|
"page",
|
|
2482
|
-
"translations"
|
|
2580
|
+
"translations",
|
|
2581
|
+
"with-edges"
|
|
2483
2582
|
])], 2)) : _("", !0),
|
|
2484
2583
|
y("div", {
|
|
2485
2584
|
ref: "scroll",
|
|
2486
|
-
class:
|
|
2487
|
-
style:
|
|
2488
|
-
onScroll: t[17] ||= (e) => a.scrollHeight ?
|
|
2585
|
+
class: E(J.value.scroll()),
|
|
2586
|
+
style: D(a.scrollHeight ? { maxHeight: a.scrollHeight } : void 0),
|
|
2587
|
+
onScroll: t[17] ||= (e) => a.scrollHeight ? yc(e) : void 0
|
|
2489
2588
|
}, [y("table", {
|
|
2490
2589
|
ref_key: "tableElement",
|
|
2491
|
-
ref:
|
|
2492
|
-
class:
|
|
2493
|
-
style:
|
|
2494
|
-
"aria-busy":
|
|
2495
|
-
"aria-rowcount": $.value ? Z.value.length +
|
|
2496
|
-
role: q.value ?
|
|
2497
|
-
"aria-multiselectable": q.value && (a.selectable &&
|
|
2590
|
+
ref: Cc,
|
|
2591
|
+
class: E(J.value.table({ class: yi.value ? J.value.fixedLayout() : void 0 })),
|
|
2592
|
+
style: D(yi.value ? { minWidth: `${N(K).getTotalSize() + Si.value + Ci.value}px` } : void 0),
|
|
2593
|
+
"aria-busy": Fn.value || void 0,
|
|
2594
|
+
"aria-rowcount": $.value ? Z.value.length + ki.value.length : void 0,
|
|
2595
|
+
role: q.value ? li.value ? "treegrid" : "grid" : void 0,
|
|
2596
|
+
"aria-multiselectable": q.value && (a.selectable && fa.value || a.cellSelection) ? "true" : void 0,
|
|
2498
2597
|
tabindex: (a.cellSelection || a.editMode === "batch") && !q.value ? -1 : void 0,
|
|
2499
|
-
onKeydown:
|
|
2500
|
-
onFocusin:
|
|
2598
|
+
onKeydown: Oc,
|
|
2599
|
+
onFocusin: Dc
|
|
2501
2600
|
}, [
|
|
2502
|
-
y("caption", { class:
|
|
2601
|
+
y("caption", { class: E(J.value.caption()) }, M(a.caption), 3),
|
|
2503
2602
|
y("thead", {
|
|
2504
2603
|
ref_key: "head",
|
|
2505
|
-
ref:
|
|
2506
|
-
class:
|
|
2507
|
-
}, [(
|
|
2604
|
+
ref: Sc,
|
|
2605
|
+
class: E(J.value.head())
|
|
2606
|
+
}, [(O(!0), v(m, null, A(ki.value, (n, r) => (O(), v("tr", {
|
|
2508
2607
|
key: r,
|
|
2509
|
-
class:
|
|
2608
|
+
class: E(J.value.headRow())
|
|
2510
2609
|
}, [
|
|
2511
|
-
r === 0 ? (
|
|
2610
|
+
r === 0 ? (O(!0), v(m, { key: 0 }, A(gi.value, (e) => (O(), v("th", {
|
|
2512
2611
|
key: e,
|
|
2513
2612
|
scope: "col",
|
|
2514
|
-
rowspan:
|
|
2515
|
-
class:
|
|
2516
|
-
style:
|
|
2517
|
-
}, [e === "select" &&
|
|
2613
|
+
rowspan: ki.value.length,
|
|
2614
|
+
class: E(J.value.th({ class: Di(e, !0) })),
|
|
2615
|
+
style: D(Oi(e))
|
|
2616
|
+
}, [e === "select" && fa.value ? (O(), g(ee, {
|
|
2518
2617
|
key: 0,
|
|
2519
|
-
checked:
|
|
2520
|
-
"aria-label": a.selectAllLabel ?? (a.selectAllMode === "all" ?
|
|
2521
|
-
"onUpdate:checked": t[9] ||= (e) =>
|
|
2522
|
-
}, null, 8, ["checked", "aria-label"])) : e === "select" ? (
|
|
2618
|
+
checked: ha.value,
|
|
2619
|
+
"aria-label": a.selectAllLabel ?? (a.selectAllMode === "all" ? N(L).selectAllRows : N(L).selectAll),
|
|
2620
|
+
"onUpdate:checked": t[9] ||= (e) => ga(e === !0)
|
|
2621
|
+
}, null, 8, ["checked", "aria-label"])) : e === "select" ? (O(), v("span", {
|
|
2523
2622
|
key: 1,
|
|
2524
|
-
class:
|
|
2525
|
-
},
|
|
2623
|
+
class: E(J.value.srOnly())
|
|
2624
|
+
}, M(N(L).select), 3)) : e === "expand" ? (O(), v("button", {
|
|
2526
2625
|
key: 2,
|
|
2527
2626
|
type: "button",
|
|
2528
|
-
class:
|
|
2529
|
-
"aria-label":
|
|
2530
|
-
onClick: t[10] ||= (e) =>
|
|
2531
|
-
}, [
|
|
2627
|
+
class: E(J.value.expander()),
|
|
2628
|
+
"aria-label": Ma.value ? N(L).collapseAll : N(L).expandAll,
|
|
2629
|
+
onClick: t[10] ||= (e) => N(K).toggleAllRowsExpanded(!Ma.value)
|
|
2630
|
+
}, [Ma.value ? (O(), g(N(Oe), {
|
|
2532
2631
|
key: 0,
|
|
2533
|
-
class:
|
|
2632
|
+
class: E(J.value.expanderIcon()),
|
|
2534
2633
|
"aria-hidden": "true"
|
|
2535
|
-
}, null, 8, ["class"])) : (
|
|
2634
|
+
}, null, 8, ["class"])) : (O(), g(N(ke), {
|
|
2536
2635
|
key: 1,
|
|
2537
|
-
class:
|
|
2636
|
+
class: E(J.value.expanderIcon()),
|
|
2538
2637
|
"aria-hidden": "true"
|
|
2539
|
-
}, null, 8, ["class"]))], 10,
|
|
2638
|
+
}, null, 8, ["class"]))], 10, Jn)) : e === "number" ? (O(), v(m, { key: 3 }, [b(M(N(L).rowNumber), 1)], 64)) : (O(), v("span", {
|
|
2540
2639
|
key: 4,
|
|
2541
|
-
class:
|
|
2542
|
-
},
|
|
2543
|
-
(
|
|
2640
|
+
class: E(J.value.srOnly())
|
|
2641
|
+
}, M(N(L).reorder), 3))], 14, qn))), 128)) : _("", !0),
|
|
2642
|
+
(O(!0), v(m, null, A(n, (n) => (O(), v(m, { key: n.header.id }, [n.group ? (O(), v("th", {
|
|
2544
2643
|
key: 0,
|
|
2545
2644
|
scope: "colgroup",
|
|
2546
2645
|
colspan: n.header.colSpan,
|
|
2547
2646
|
rowspan: n.rowSpan > 1 ? n.rowSpan : void 0,
|
|
2548
|
-
class:
|
|
2549
|
-
},
|
|
2647
|
+
class: E(J.value.th({ class: J.value.groupTh() }))
|
|
2648
|
+
}, M(X(n.header.column)), 11, Yn)) : (O(), v("th", {
|
|
2550
2649
|
key: 1,
|
|
2551
|
-
id:
|
|
2650
|
+
id: Ps.value ? Fs(n.header.column.id) : void 0,
|
|
2552
2651
|
scope: "col",
|
|
2553
2652
|
rowspan: n.rowSpan > 1 ? n.rowSpan : void 0,
|
|
2554
|
-
class:
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2653
|
+
class: E(di(n.header.column.id).th({ class: [
|
|
2654
|
+
wi(n.header.column.id, !0),
|
|
2655
|
+
a.reorderableColumns ? J.value.dropTargetColumn() : "",
|
|
2656
|
+
B.value.get(n.header.column.id)?.headerClass
|
|
2657
|
+
] })),
|
|
2658
|
+
style: D(Ti(n.header.column.id, !0)),
|
|
2659
|
+
"aria-sort": Mi(n.header.column.id),
|
|
2660
|
+
draggable: zi(n.header.column.id) && !n.header.column.getIsPinned() ? "true" : void 0,
|
|
2661
|
+
"data-drop": Yi(n.header.column.id),
|
|
2662
|
+
"data-dragging": Ui.value === n.header.column.id || void 0,
|
|
2663
|
+
onDragstart: (e) => Gi(n.header.column.id, e),
|
|
2664
|
+
onDragover: (e) => Ki(n.header.column.id, e),
|
|
2665
|
+
onDragleave: t[11] ||= (e) => Wi.value = null,
|
|
2666
|
+
onDrop: qi,
|
|
2667
|
+
onDragend: Ji
|
|
2668
|
+
}, [y("div", { class: E(di(n.header.column.id).headContent()) }, [
|
|
2669
|
+
ji(n.header.column.id) ? (O(), v("button", {
|
|
2567
2670
|
key: 0,
|
|
2568
2671
|
type: "button",
|
|
2569
|
-
class:
|
|
2570
|
-
onClick: (e) =>
|
|
2672
|
+
class: E(J.value.sortButton()),
|
|
2673
|
+
onClick: (e) => Pi(n.header.column.id, e)
|
|
2571
2674
|
}, [
|
|
2572
|
-
y("span", { class:
|
|
2573
|
-
n.header.column.getIsSorted() === "asc" ? (
|
|
2675
|
+
y("span", { class: E(Ai(n.header.column)) }, M(X(n.header.column)), 3),
|
|
2676
|
+
n.header.column.getIsSorted() === "asc" ? (O(), g(N(Se), {
|
|
2574
2677
|
key: 0,
|
|
2575
|
-
class:
|
|
2678
|
+
class: E(J.value.sortIcon()),
|
|
2576
2679
|
"aria-hidden": "true"
|
|
2577
|
-
}, null, 8, ["class"])) : n.header.column.getIsSorted() === "desc" ? (
|
|
2680
|
+
}, null, 8, ["class"])) : n.header.column.getIsSorted() === "desc" ? (O(), g(N(xe), {
|
|
2578
2681
|
key: 1,
|
|
2579
|
-
class:
|
|
2682
|
+
class: E(J.value.sortIcon()),
|
|
2580
2683
|
"aria-hidden": "true"
|
|
2581
|
-
}, null, 8, ["class"])) : (
|
|
2684
|
+
}, null, 8, ["class"])) : (O(), g(N(Ce), {
|
|
2582
2685
|
key: 2,
|
|
2583
|
-
class:
|
|
2686
|
+
class: E(J.value.sortIcon()),
|
|
2584
2687
|
"aria-hidden": "true"
|
|
2585
2688
|
}, null, 8, ["class"])),
|
|
2586
|
-
|
|
2587
|
-
class:
|
|
2689
|
+
Nr.value.length > 1 && Ni(n.header.column.id) ? (O(), v(m, { key: 3 }, [y("span", {
|
|
2690
|
+
class: E(J.value.sortBadge()),
|
|
2588
2691
|
"aria-hidden": "true"
|
|
2589
|
-
},
|
|
2590
|
-
], 10,
|
|
2692
|
+
}, M(Ni(n.header.column.id)), 3), y("span", { class: E(J.value.srOnly()) }, M(N(L).sortPriority(Ni(n.header.column.id), n.header.column.getIsSorted() === "desc")), 3)], 64)) : _("", !0)
|
|
2693
|
+
], 10, Zn)) : (O(), v("span", {
|
|
2591
2694
|
key: 1,
|
|
2592
|
-
class:
|
|
2593
|
-
},
|
|
2594
|
-
|
|
2695
|
+
class: E(Ai(n.header.column))
|
|
2696
|
+
}, M(X(n.header.column)), 3)),
|
|
2697
|
+
ta.value && $i(B.value.get(n.header.column.id)) ? (O(), g(Vn, {
|
|
2595
2698
|
key: 2,
|
|
2596
2699
|
header: X(n.header.column),
|
|
2597
|
-
type:
|
|
2598
|
-
"model-value":
|
|
2599
|
-
options:
|
|
2600
|
-
"match-modes":
|
|
2700
|
+
type: B.value.get(n.header.column.id).filter ?? "text",
|
|
2701
|
+
"model-value": ra(n.header.column.id),
|
|
2702
|
+
options: ia(B.value.get(n.header.column.id)),
|
|
2703
|
+
"match-modes": B.value.get(n.header.column.id).matchModes,
|
|
2704
|
+
"input-props": B.value.get(n.header.column.id).filterInputProps,
|
|
2601
2705
|
"max-constraints": a.maxConstraints,
|
|
2602
|
-
"onUpdate:modelValue": (e) =>
|
|
2603
|
-
}, oe({ _: 2 }, [
|
|
2706
|
+
"onUpdate:modelValue": (e) => oa(n.header.column.id, e)
|
|
2707
|
+
}, oe({ _: 2 }, [N(I)[`option-${n.header.column.id}`] ? {
|
|
2708
|
+
name: "option",
|
|
2709
|
+
fn: P((t) => [j(e.$slots, `option-${n.header.column.id}`, w({ ref_for: !0 }, t))]),
|
|
2710
|
+
key: "0"
|
|
2711
|
+
} : void 0, Qi(n.header.column.id) ? {
|
|
2604
2712
|
name: "value",
|
|
2605
|
-
fn: P((t) => [
|
|
2713
|
+
fn: P((t) => [j(e.$slots, `filter-${n.header.column.id}`, w({ ref_for: !0 }, {
|
|
2606
2714
|
...t,
|
|
2607
|
-
column:
|
|
2715
|
+
column: B.value.get(n.header.column.id)
|
|
2608
2716
|
}))]),
|
|
2609
|
-
key: "
|
|
2717
|
+
key: "1"
|
|
2610
2718
|
} : void 0]), 1032, [
|
|
2611
2719
|
"header",
|
|
2612
2720
|
"type",
|
|
2613
2721
|
"model-value",
|
|
2614
2722
|
"options",
|
|
2615
2723
|
"match-modes",
|
|
2724
|
+
"input-props",
|
|
2616
2725
|
"max-constraints",
|
|
2617
2726
|
"onUpdate:modelValue"
|
|
2618
2727
|
])) : _("", !0),
|
|
2619
|
-
|
|
2728
|
+
Fi.value ? (O(), g(u, {
|
|
2620
2729
|
key: 3,
|
|
2621
|
-
items:
|
|
2622
|
-
onSelect: (e) =>
|
|
2730
|
+
items: Bi(n.header.column),
|
|
2731
|
+
onSelect: (e) => Hi(n.header.column, e)
|
|
2623
2732
|
}, {
|
|
2624
2733
|
default: P(() => [y("button", {
|
|
2625
2734
|
type: "button",
|
|
2626
|
-
class:
|
|
2735
|
+
class: E(J.value.headButton()),
|
|
2627
2736
|
"data-column-menu": n.header.column.id,
|
|
2628
|
-
"aria-label":
|
|
2629
|
-
}, [x(
|
|
2630
|
-
class:
|
|
2737
|
+
"aria-label": N(L).columnMenu(X(n.header.column))
|
|
2738
|
+
}, [x(N(Me), {
|
|
2739
|
+
class: E(J.value.headButtonIcon()),
|
|
2631
2740
|
"aria-hidden": "true"
|
|
2632
|
-
}, null, 8, ["class"])], 10,
|
|
2741
|
+
}, null, 8, ["class"])], 10, Qn)]),
|
|
2633
2742
|
_: 2
|
|
2634
2743
|
}, 1032, ["items", "onSelect"])) : _("", !0)
|
|
2635
|
-
], 2), a.resizable ? (
|
|
2744
|
+
], 2), a.resizable ? (O(), v("div", {
|
|
2636
2745
|
key: 0,
|
|
2637
2746
|
role: "separator",
|
|
2638
2747
|
"aria-orientation": "vertical",
|
|
2639
|
-
"aria-label":
|
|
2748
|
+
"aria-label": N(L).resize(X(n.header.column)),
|
|
2640
2749
|
"aria-valuenow": n.header.column.getSize(),
|
|
2641
|
-
"aria-valuemin":
|
|
2750
|
+
"aria-valuemin": Er,
|
|
2642
2751
|
"aria-valuemax": 1200,
|
|
2643
2752
|
tabindex: "0",
|
|
2644
|
-
class:
|
|
2753
|
+
class: E(J.value.resizer()),
|
|
2645
2754
|
"data-resizing": n.header.column.getIsResizing() || void 0,
|
|
2646
2755
|
onMousedown: (e) => n.header.getResizeHandler()(e),
|
|
2647
2756
|
onTouchstart: (e) => n.header.getResizeHandler()(e),
|
|
2648
|
-
onKeydown: (e) =>
|
|
2649
|
-
onDblclick: (e) =>
|
|
2650
|
-
}, null, 42,
|
|
2651
|
-
r === 0 &&
|
|
2757
|
+
onKeydown: (e) => Zi(n.header.column.id, e),
|
|
2758
|
+
onDblclick: (e) => Xi(n.header.column.id, e)
|
|
2759
|
+
}, null, 42, $n)) : _("", !0)], 46, Xn))], 64))), 128)),
|
|
2760
|
+
r === 0 && _i.value.length ? (O(), v("th", {
|
|
2652
2761
|
key: 1,
|
|
2653
2762
|
scope: "col",
|
|
2654
|
-
rowspan:
|
|
2655
|
-
class:
|
|
2656
|
-
style:
|
|
2657
|
-
}, [y("span", { class:
|
|
2658
|
-
], 2))), 128)),
|
|
2763
|
+
rowspan: ki.value.length,
|
|
2764
|
+
class: E(J.value.th({ class: Di("actions", !0) })),
|
|
2765
|
+
style: D(Oi("actions"))
|
|
2766
|
+
}, [y("span", { class: E(J.value.srOnly()) }, M(N(L).actions), 3)], 14, er)) : _("", !0)
|
|
2767
|
+
], 2))), 128)), ea.value ? (O(), v("tr", {
|
|
2659
2768
|
key: 0,
|
|
2660
|
-
class:
|
|
2769
|
+
class: E(J.value.filterRow())
|
|
2661
2770
|
}, [
|
|
2662
|
-
(
|
|
2771
|
+
(O(!0), v(m, null, A(gi.value, (e) => (O(), v("td", {
|
|
2663
2772
|
key: e,
|
|
2664
|
-
class:
|
|
2665
|
-
style:
|
|
2773
|
+
class: E(Di(e, !0)),
|
|
2774
|
+
style: D(Oi(e))
|
|
2666
2775
|
}, null, 6))), 128)),
|
|
2667
|
-
(
|
|
2776
|
+
(O(!0), v(m, null, A(Y.value, (t) => (O(), v("td", {
|
|
2668
2777
|
key: t.id,
|
|
2669
|
-
class:
|
|
2670
|
-
style:
|
|
2671
|
-
}, [
|
|
2672
|
-
value:
|
|
2673
|
-
setValue: (e) =>
|
|
2674
|
-
column:
|
|
2675
|
-
}), void 0, void 0, 0) :
|
|
2778
|
+
class: E(di(t.id).filterCell({ class: wi(t.id, !0) })),
|
|
2779
|
+
style: D(Ti(t.id, !0))
|
|
2780
|
+
}, [$i(B.value.get(t.id)) ? (O(), v(m, { key: 0 }, [Qi(t.id) ? j(e.$slots, `filter-${t.id}`, w({ ref_for: !0 }, {
|
|
2781
|
+
value: aa(B.value.get(t.id)),
|
|
2782
|
+
setValue: (e) => la(B.value.get(t.id), e),
|
|
2783
|
+
column: B.value.get(t.id)
|
|
2784
|
+
}), void 0, void 0, 0) : N(wt)(sa(B.value.get(t.id))) ? (O(), v("div", {
|
|
2676
2785
|
key: 1,
|
|
2677
|
-
class:
|
|
2678
|
-
}, [(
|
|
2786
|
+
class: E(J.value.filterRowRange())
|
|
2787
|
+
}, [(O(), v(m, null, A([0, 1], (e) => x(Bn, {
|
|
2679
2788
|
key: e,
|
|
2680
|
-
type:
|
|
2681
|
-
label: `${
|
|
2682
|
-
options:
|
|
2683
|
-
"
|
|
2684
|
-
"
|
|
2789
|
+
type: ca(B.value.get(t.id)),
|
|
2790
|
+
label: `${N(L).filter(X(t))}, ${e ? N(L).to : N(L).from}`,
|
|
2791
|
+
options: ia(B.value.get(t.id)),
|
|
2792
|
+
"input-props": B.value.get(t.id).filterInputProps,
|
|
2793
|
+
"model-value": da(B.value.get(t.id), e),
|
|
2794
|
+
"onUpdate:modelValue": (n) => ua(B.value.get(t.id), e, n)
|
|
2685
2795
|
}, null, 8, [
|
|
2686
2796
|
"type",
|
|
2687
2797
|
"label",
|
|
2688
2798
|
"options",
|
|
2799
|
+
"input-props",
|
|
2689
2800
|
"model-value",
|
|
2690
2801
|
"onUpdate:modelValue"
|
|
2691
|
-
])), 64))], 2)) : (
|
|
2802
|
+
])), 64))], 2)) : (O(), g(Bn, {
|
|
2692
2803
|
key: 2,
|
|
2693
|
-
type:
|
|
2694
|
-
label:
|
|
2695
|
-
options:
|
|
2804
|
+
type: ca(B.value.get(t.id)),
|
|
2805
|
+
label: N(L).filter(X(t)),
|
|
2806
|
+
options: ia(B.value.get(t.id)),
|
|
2807
|
+
"input-props": B.value.get(t.id).filterInputProps,
|
|
2696
2808
|
any: "",
|
|
2697
|
-
"model-value":
|
|
2698
|
-
"onUpdate:modelValue": (e) =>
|
|
2699
|
-
},
|
|
2809
|
+
"model-value": aa(B.value.get(t.id)),
|
|
2810
|
+
"onUpdate:modelValue": (e) => la(B.value.get(t.id), e)
|
|
2811
|
+
}, oe({ _: 2 }, [N(I)[`option-${t.id}`] ? {
|
|
2812
|
+
name: "option",
|
|
2813
|
+
fn: P((n) => [j(e.$slots, `option-${t.id}`, w({ ref_for: !0 }, n))]),
|
|
2814
|
+
key: "0"
|
|
2815
|
+
} : void 0]), 1032, [
|
|
2700
2816
|
"type",
|
|
2701
2817
|
"label",
|
|
2702
2818
|
"options",
|
|
2819
|
+
"input-props",
|
|
2703
2820
|
"model-value",
|
|
2704
2821
|
"onUpdate:modelValue"
|
|
2705
2822
|
]))], 64)) : _("", !0)], 6))), 128)),
|
|
2706
|
-
|
|
2823
|
+
_i.value.length ? (O(), v("td", {
|
|
2707
2824
|
key: 0,
|
|
2708
|
-
class:
|
|
2709
|
-
style:
|
|
2825
|
+
class: E(Di("actions", !0)),
|
|
2826
|
+
style: D(Oi("actions"))
|
|
2710
2827
|
}, null, 6)) : _("", !0)
|
|
2711
2828
|
], 2)) : _("", !0)], 2),
|
|
2712
|
-
|
|
2829
|
+
Oa.value.length ? (O(), v("tbody", {
|
|
2713
2830
|
key: 0,
|
|
2714
|
-
class:
|
|
2715
|
-
style:
|
|
2716
|
-
}, [(
|
|
2831
|
+
class: E(J.value.frozenBody()),
|
|
2832
|
+
style: D(a.scrollHeight ? { top: `${bc.value}px` } : void 0)
|
|
2833
|
+
}, [(O(!0), v(m, null, A(Oa.value, (t) => (O(), v("tr", {
|
|
2717
2834
|
key: t.id,
|
|
2718
|
-
class:
|
|
2719
|
-
"data-state":
|
|
2720
|
-
"aria-selected": q.value && a.selectable ?
|
|
2835
|
+
class: E(J.value.row({ class: a.rowClass?.(t.original) })),
|
|
2836
|
+
"data-state": ma(t) ? "selected" : void 0,
|
|
2837
|
+
"aria-selected": q.value && a.selectable ? ma(t) : void 0,
|
|
2721
2838
|
"data-row-id": t.id
|
|
2722
2839
|
}, [
|
|
2723
|
-
(
|
|
2840
|
+
(O(!0), v(m, null, A(gi.value, (e) => (O(), v("td", {
|
|
2724
2841
|
key: e,
|
|
2725
|
-
class:
|
|
2726
|
-
style:
|
|
2842
|
+
class: E(J.value.td({ class: Di(e, !1) })),
|
|
2843
|
+
style: D(Oi(e))
|
|
2727
2844
|
}, null, 6))), 128)),
|
|
2728
|
-
(
|
|
2845
|
+
(O(!0), v(m, null, A(t.getVisibleCells(), (n) => (O(), v("td", {
|
|
2729
2846
|
key: n.id,
|
|
2730
|
-
class:
|
|
2731
|
-
style:
|
|
2732
|
-
}, [
|
|
2847
|
+
class: E(di(n.column.id).td({ class: [wi(n.column.id, !1), fi(n.column.id, t)] })),
|
|
2848
|
+
style: D(Ti(n.column.id, !1))
|
|
2849
|
+
}, [B.value.get(n.column.id)?.editable && (mi.value && wo.value?.rowId === t.id && wo.value.columnId === n.column.id || a.editMode === "row" && To.value === t.id) ? (O(), v("div", {
|
|
2733
2850
|
key: 0,
|
|
2734
2851
|
"data-editor": "",
|
|
2735
|
-
class:
|
|
2736
|
-
"aria-busy":
|
|
2737
|
-
onKeydown: (e) =>
|
|
2738
|
-
onFocusout: (e) =>
|
|
2739
|
-
}, [
|
|
2852
|
+
class: E(J.value.editor()),
|
|
2853
|
+
"aria-busy": Io.value || void 0,
|
|
2854
|
+
onKeydown: (e) => mi.value ? Vo(t, n.column.id, e) : Jo(t, e),
|
|
2855
|
+
onFocusout: (e) => mi.value ? Ho(t, n.column.id, e) : void 0
|
|
2856
|
+
}, [N(I)[`editor-${n.column.id}`] ? j(e.$slots, `editor-${n.column.id}`, w({ ref_for: !0 }, Go(t, B.value.get(n.column.id))), void 0, void 0, 0) : (O(), g(Bn, {
|
|
2740
2857
|
key: 1,
|
|
2741
|
-
type:
|
|
2858
|
+
type: ko(B.value.get(n.column.id)),
|
|
2742
2859
|
label: X(n.column),
|
|
2743
|
-
options:
|
|
2744
|
-
invalid: !!
|
|
2745
|
-
"model-value":
|
|
2746
|
-
"onUpdate:modelValue": (e) =>
|
|
2747
|
-
},
|
|
2860
|
+
options: B.value.get(n.column.id).editOptions,
|
|
2861
|
+
invalid: !!Do.value[n.column.id],
|
|
2862
|
+
"model-value": Eo.value[n.column.id],
|
|
2863
|
+
"onUpdate:modelValue": (e) => Wo(t, B.value.get(n.column.id), e)
|
|
2864
|
+
}, oe({ _: 2 }, [N(I)[`option-${n.column.id}`] ? {
|
|
2865
|
+
name: "option",
|
|
2866
|
+
fn: P((t) => [j(e.$slots, `option-${n.column.id}`, w({ ref_for: !0 }, t))]),
|
|
2867
|
+
key: "0"
|
|
2868
|
+
} : void 0]), 1032, [
|
|
2748
2869
|
"type",
|
|
2749
2870
|
"label",
|
|
2750
2871
|
"options",
|
|
2751
2872
|
"invalid",
|
|
2752
2873
|
"model-value",
|
|
2753
2874
|
"onUpdate:modelValue"
|
|
2754
|
-
])),
|
|
2875
|
+
])), Do.value[n.column.id] ? (O(), v("span", {
|
|
2755
2876
|
key: 2,
|
|
2756
|
-
id:
|
|
2877
|
+
id: jo(t.id, n.column.id),
|
|
2757
2878
|
role: "alert",
|
|
2758
|
-
class:
|
|
2759
|
-
},
|
|
2879
|
+
class: E(J.value.editError())
|
|
2880
|
+
}, M(Do.value[n.column.id]), 11, rr)) : _("", !0)], 42, nr)) : mi.value && B.value.get(n.column.id)?.editable ? (O(), v("button", {
|
|
2760
2881
|
key: 1,
|
|
2761
2882
|
type: "button",
|
|
2762
|
-
class:
|
|
2763
|
-
"data-edit":
|
|
2764
|
-
"aria-label": `${
|
|
2765
|
-
onClick: (e) =>
|
|
2766
|
-
}, [
|
|
2883
|
+
class: E(di(n.column.id).editButton()),
|
|
2884
|
+
"data-edit": Ao(t.id, n.column.id),
|
|
2885
|
+
"aria-label": `${N(L).edit(X(n.column), V(B.value.get(n.column.id), Q(t, n.column.id), t.original))}${Bs(t, n.column.id) ? `, ${N(L).changed}` : ""}`,
|
|
2886
|
+
onClick: (e) => Fo(t, n.column.id)
|
|
2887
|
+
}, [j(e.$slots, `cell-${n.column.id}`, {
|
|
2767
2888
|
row: t.original,
|
|
2768
2889
|
value: Q(t, n.column.id)
|
|
2769
|
-
}, () => [b(
|
|
2890
|
+
}, () => [b(M(V(B.value.get(n.column.id), Q(t, n.column.id), t.original)), 1)])], 10, ir)) : B.value.get(n.column.id)?.copyable ? (O(), v("span", {
|
|
2770
2891
|
key: 2,
|
|
2771
|
-
class:
|
|
2772
|
-
}, [
|
|
2892
|
+
class: E(J.value.copyCell())
|
|
2893
|
+
}, [j(e.$slots, `cell-${n.column.id}`, {
|
|
2773
2894
|
row: t.original,
|
|
2774
2895
|
value: n.getValue()
|
|
2775
|
-
}, () => [b(
|
|
2776
|
-
value: B
|
|
2777
|
-
label:
|
|
2778
|
-
}, null, 8, ["value", "label"])], 2)) :
|
|
2896
|
+
}, () => [b(M(V(B.value.get(n.column.id), n.getValue(), t.original)), 1)]), x(ie, {
|
|
2897
|
+
value: V(B.value.get(n.column.id), n.getValue(), t.original),
|
|
2898
|
+
label: N(L).copy(X(n.column), V(B.value.get(n.column.id), n.getValue(), t.original))
|
|
2899
|
+
}, null, 8, ["value", "label"])], 2)) : j(e.$slots, `cell-${n.column.id}`, {
|
|
2779
2900
|
row: t.original,
|
|
2780
2901
|
value: n.getValue()
|
|
2781
|
-
}, () => [b(
|
|
2782
|
-
|
|
2902
|
+
}, () => [b(M(V(B.value.get(n.column.id), n.getValue(), t.original)), 1)], void 0, 3)], 6))), 128)),
|
|
2903
|
+
_i.value.length ? (O(), v("td", {
|
|
2783
2904
|
key: 0,
|
|
2784
|
-
class:
|
|
2785
|
-
style:
|
|
2786
|
-
}, [a.editMode === "row" &&
|
|
2905
|
+
class: E(J.value.td({ class: Di("actions", !1) })),
|
|
2906
|
+
style: D(Oi("actions"))
|
|
2907
|
+
}, [a.editMode === "row" && pi.value ? (O(), v("div", {
|
|
2787
2908
|
key: 0,
|
|
2788
|
-
class:
|
|
2789
|
-
}, [
|
|
2790
|
-
icon:
|
|
2791
|
-
label:
|
|
2909
|
+
class: E(J.value.editActions())
|
|
2910
|
+
}, [To.value === t.id ? (O(), v(m, { key: 0 }, [x(f, {
|
|
2911
|
+
icon: N(we),
|
|
2912
|
+
label: N(L).saveRow(G(t.original, t.index)),
|
|
2792
2913
|
variant: "text",
|
|
2793
2914
|
size: "sm",
|
|
2794
|
-
onClick: (e) =>
|
|
2915
|
+
onClick: (e) => qo(t, !0)
|
|
2795
2916
|
}, null, 8, [
|
|
2796
2917
|
"icon",
|
|
2797
2918
|
"label",
|
|
2798
2919
|
"onClick"
|
|
2799
2920
|
]), x(f, {
|
|
2800
|
-
icon:
|
|
2801
|
-
label:
|
|
2921
|
+
icon: N(Ke),
|
|
2922
|
+
label: N(L).cancelEdit(G(t.original, t.index)),
|
|
2802
2923
|
variant: "text",
|
|
2803
2924
|
size: "sm",
|
|
2804
|
-
onClick: (e) =>
|
|
2925
|
+
onClick: (e) => qo(t, !1)
|
|
2805
2926
|
}, null, 8, [
|
|
2806
2927
|
"icon",
|
|
2807
2928
|
"label",
|
|
2808
2929
|
"onClick"
|
|
2809
|
-
])], 64)) : (
|
|
2930
|
+
])], 64)) : (O(), g(f, {
|
|
2810
2931
|
key: 1,
|
|
2811
2932
|
"data-row-edit": t.id,
|
|
2812
|
-
icon:
|
|
2813
|
-
label:
|
|
2933
|
+
icon: N(ze),
|
|
2934
|
+
label: N(L).editRow(G(t.original, t.index)),
|
|
2814
2935
|
variant: "text",
|
|
2815
2936
|
size: "sm",
|
|
2816
|
-
onClick: (e) =>
|
|
2937
|
+
onClick: (e) => Ko(t)
|
|
2817
2938
|
}, null, 8, [
|
|
2818
2939
|
"data-row-edit",
|
|
2819
2940
|
"icon",
|
|
2820
2941
|
"label",
|
|
2821
2942
|
"onClick"
|
|
2822
2943
|
]))], 2)) : _("", !0)], 6)) : _("", !0)
|
|
2823
|
-
], 10,
|
|
2824
|
-
x(
|
|
2944
|
+
], 10, tr))), 128))], 6)) : _("", !0),
|
|
2945
|
+
x(Ha, {
|
|
2825
2946
|
enabled: !!a.contextMenu && !!a.rowActions,
|
|
2826
|
-
items:
|
|
2827
|
-
label:
|
|
2828
|
-
onSelect: t[16] ||= (e) =>
|
|
2947
|
+
items: za.value ? Ra(za.value) : [],
|
|
2948
|
+
label: za.value ? N(L).rowActions(G(za.value.original, za.value.index)) : void 0,
|
|
2949
|
+
onSelect: t[16] ||= (e) => Va(za.value, e)
|
|
2829
2950
|
}, {
|
|
2830
|
-
default: P(() => [y("tbody", { onContextmenuCapture:
|
|
2831
|
-
Z.value.length === 0 && !
|
|
2832
|
-
colspan:
|
|
2833
|
-
class:
|
|
2834
|
-
}, [
|
|
2951
|
+
default: P(() => [y("tbody", { onContextmenuCapture: Ba }, [
|
|
2952
|
+
Z.value.length === 0 && !Bc.value ? (O(), v("tr", ar, [y("td", {
|
|
2953
|
+
colspan: vi.value,
|
|
2954
|
+
class: E(J.value.message())
|
|
2955
|
+
}, [Pn.value ? (O(), v("span", {
|
|
2835
2956
|
key: 0,
|
|
2836
|
-
class:
|
|
2837
|
-
}, [y("span",
|
|
2957
|
+
class: E(J.value.errorContent())
|
|
2958
|
+
}, [y("span", sr, M(N(l).dataSource.error), 1), x(d, {
|
|
2838
2959
|
variant: "outline",
|
|
2839
2960
|
size: "sm",
|
|
2840
|
-
onClick:
|
|
2961
|
+
onClick: Zs
|
|
2841
2962
|
}, {
|
|
2842
|
-
default: P(() => [b(
|
|
2963
|
+
default: P(() => [b(M(N(l).dataSource.retry), 1)]),
|
|
2843
2964
|
_: 1
|
|
2844
|
-
})], 2)) :
|
|
2965
|
+
})], 2)) : Fn.value ? j(e.$slots, "loadingContent", {}, () => [y("span", { class: E(J.value.messageContent()) }, [x(te, {
|
|
2845
2966
|
size: "sm",
|
|
2846
|
-
label: a.loadingText ??
|
|
2847
|
-
}, null, 8, ["label"]), b(
|
|
2848
|
-
|
|
2967
|
+
label: a.loadingText ?? N(l).common.loading
|
|
2968
|
+
}, null, 8, ["label"]), b(M(a.loadingText ?? N(l).common.loading), 1)], 2)], void 0, 1) : Hc.value ? j(e.$slots, "noResults", {}, () => [b(M(a.noResultsText ?? a.emptyText ?? N(l).common.empty), 1)], void 0, 2) : j(e.$slots, "empty", {}, () => [b(M(a.emptyText ?? N(l).common.empty), 1)], void 0, 3)], 10, or)])) : _("", !0),
|
|
2969
|
+
Bc.value ? (O(!0), v(m, { key: 1 }, A(Vc.value, (e) => (O(), v("tr", {
|
|
2849
2970
|
key: `skeleton-${e}`,
|
|
2850
|
-
class:
|
|
2971
|
+
class: E(J.value.row())
|
|
2851
2972
|
}, [
|
|
2852
|
-
(
|
|
2973
|
+
(O(!0), v(m, null, A(gi.value, (e) => (O(), v("td", {
|
|
2853
2974
|
key: e,
|
|
2854
|
-
class:
|
|
2855
|
-
style:
|
|
2975
|
+
class: E(J.value.td({ class: Di(e, !1) })),
|
|
2976
|
+
style: D(Oi(e))
|
|
2856
2977
|
}, null, 6))), 128)),
|
|
2857
|
-
(
|
|
2978
|
+
(O(!0), v(m, null, A(Y.value, (e) => (O(), v("td", {
|
|
2858
2979
|
key: e.id,
|
|
2859
|
-
class:
|
|
2860
|
-
style:
|
|
2980
|
+
class: E(di(e.id).td({ class: wi(e.id, !1) })),
|
|
2981
|
+
style: D(Ti(e.id, !1))
|
|
2861
2982
|
}, [x(i)], 6))), 128)),
|
|
2862
|
-
|
|
2983
|
+
_i.value.length ? (O(), v("td", {
|
|
2863
2984
|
key: 0,
|
|
2864
|
-
class:
|
|
2865
|
-
style:
|
|
2985
|
+
class: E(J.value.td({ class: Di("actions", !1) })),
|
|
2986
|
+
style: D(Oi("actions"))
|
|
2866
2987
|
}, null, 6)) : _("", !0)
|
|
2867
2988
|
], 2))), 128)) : _("", !0),
|
|
2868
|
-
|
|
2989
|
+
hc.value > 0 && !Bc.value ? (O(), v("tr", {
|
|
2869
2990
|
key: 2,
|
|
2870
|
-
class:
|
|
2991
|
+
class: E(J.value.spacer()),
|
|
2871
2992
|
"aria-hidden": "true"
|
|
2872
2993
|
}, [y("td", {
|
|
2873
|
-
colspan:
|
|
2874
|
-
class:
|
|
2875
|
-
style:
|
|
2876
|
-
}, null, 14,
|
|
2877
|
-
(
|
|
2994
|
+
colspan: vi.value,
|
|
2995
|
+
class: E(J.value.spacerCell()),
|
|
2996
|
+
style: D({ height: `${hc.value}px` })
|
|
2997
|
+
}, null, 14, cr)], 2)) : _("", !0),
|
|
2998
|
+
(O(!0), v(m, null, A(Bc.value ? [] : mc.value, (n) => (O(), v(m, { key: n.key }, [n.kind === "group" ? (O(), v("tr", {
|
|
2878
2999
|
key: 0,
|
|
2879
3000
|
ref_for: !0,
|
|
2880
|
-
ref:
|
|
2881
|
-
class:
|
|
3001
|
+
ref: _c,
|
|
3002
|
+
class: E(J.value.groupRow(Ga.value ? { class: [J.value.dropTarget(), J.value.dropInside()] } : {})),
|
|
2882
3003
|
"data-index": n.index,
|
|
2883
|
-
"aria-rowindex": $.value ? n.index +
|
|
2884
|
-
"data-drop":
|
|
2885
|
-
onDragover: (e) => a.reorderableRows ?
|
|
2886
|
-
onDragleave: t[12] ||= (e) => a.reorderableRows ?
|
|
2887
|
-
onDrop: t[13] ||= (e) => a.reorderableRows ?
|
|
3004
|
+
"aria-rowindex": $.value ? n.index + ki.value.length + 1 : void 0,
|
|
3005
|
+
"data-drop": Ga.value ? lo(n.row.id) : void 0,
|
|
3006
|
+
onDragover: (e) => a.reorderableRows ? oo(n.row, e) : void 0,
|
|
3007
|
+
onDragleave: t[12] ||= (e) => a.reorderableRows ? qa.value = null : void 0,
|
|
3008
|
+
onDrop: t[13] ||= (e) => a.reorderableRows ? so(e) : void 0
|
|
2888
3009
|
}, [y("td", {
|
|
2889
|
-
colspan:
|
|
2890
|
-
class:
|
|
3010
|
+
colspan: Na.value ? gi.value.length + 1 : vi.value,
|
|
3011
|
+
class: E(J.value.groupCell())
|
|
2891
3012
|
}, [y("div", {
|
|
2892
|
-
class:
|
|
2893
|
-
style:
|
|
3013
|
+
class: E(J.value.treeCell()),
|
|
3014
|
+
style: D({ paddingInlineStart: `${n.row.depth * 20}px` })
|
|
2894
3015
|
}, [
|
|
2895
3016
|
y("button", {
|
|
2896
3017
|
type: "button",
|
|
2897
|
-
class:
|
|
3018
|
+
class: E(J.value.expander()),
|
|
2898
3019
|
"aria-expanded": n.row.getIsExpanded(),
|
|
2899
|
-
"aria-label":
|
|
3020
|
+
"aria-label": N(L).group(B.value.get(n.row.groupingColumnId)?.header ?? "", V(B.value.get(n.row.groupingColumnId), n.row.groupingValue, n.row.original), n.row.getLeafRows().length),
|
|
2900
3021
|
onClick: (e) => n.row.getToggleExpandedHandler()()
|
|
2901
|
-
}, [x(
|
|
2902
|
-
class:
|
|
3022
|
+
}, [x(N(Ee), {
|
|
3023
|
+
class: E(J.value.expanderIcon()),
|
|
2903
3024
|
"data-state": n.row.getIsExpanded() ? "open" : "closed",
|
|
2904
3025
|
"aria-hidden": "true"
|
|
2905
|
-
}, null, 8, ["class", "data-state"])], 10,
|
|
2906
|
-
y("span", { class:
|
|
2907
|
-
y("span", { class:
|
|
2908
|
-
], 6)], 10,
|
|
3026
|
+
}, null, 8, ["class", "data-state"])], 10, dr),
|
|
3027
|
+
y("span", { class: E(J.value.groupLabel()) }, M(V(B.value.get(n.row.groupingColumnId), n.row.groupingValue, n.row.original)), 3),
|
|
3028
|
+
y("span", { class: E(J.value.groupCount()) }, "(" + M(n.row.getLeafRows().length) + ")", 3)
|
|
3029
|
+
], 6)], 10, ur), Na.value ? (O(), v(m, { key: 0 }, [(O(!0), v(m, null, A(Y.value.slice(1), (e) => (O(), v("td", {
|
|
2909
3030
|
key: e.id,
|
|
2910
|
-
class:
|
|
2911
|
-
},
|
|
3031
|
+
class: E(di(e.id).groupAggregate())
|
|
3032
|
+
}, M(Ia(B.value.get(e.id), n.row.getLeafRows())), 3))), 128)), _i.value.length ? (O(), v("td", {
|
|
2912
3033
|
key: 0,
|
|
2913
|
-
class:
|
|
2914
|
-
}, null, 2)) : _("", !0)], 64)) : _("", !0)], 42,
|
|
3034
|
+
class: E(J.value.groupAggregate())
|
|
3035
|
+
}, null, 2)) : _("", !0)], 64)) : _("", !0)], 42, lr)) : n.kind === "expansion" ? (O(), v("tr", {
|
|
2915
3036
|
key: 1,
|
|
2916
|
-
id:
|
|
3037
|
+
id: ja(n.row),
|
|
2917
3038
|
ref_for: !0,
|
|
2918
|
-
ref:
|
|
2919
|
-
class:
|
|
3039
|
+
ref: _c,
|
|
3040
|
+
class: E(J.value.expansionRow()),
|
|
2920
3041
|
"data-index": n.index,
|
|
2921
|
-
"aria-rowindex": $.value ? n.index +
|
|
3042
|
+
"aria-rowindex": $.value ? n.index + ki.value.length + 1 : void 0
|
|
2922
3043
|
}, [y("td", {
|
|
2923
|
-
colspan:
|
|
2924
|
-
class:
|
|
2925
|
-
}, [
|
|
3044
|
+
colspan: vi.value,
|
|
3045
|
+
class: E(J.value.expansionCell())
|
|
3046
|
+
}, [j(e.$slots, "expansion", {
|
|
2926
3047
|
row: n.row.original,
|
|
2927
3048
|
rowId: n.row.id
|
|
2928
|
-
})], 10,
|
|
3049
|
+
})], 10, pr)], 10, fr)) : (O(), v("tr", {
|
|
2929
3050
|
key: 2,
|
|
2930
3051
|
ref_for: !0,
|
|
2931
|
-
ref:
|
|
2932
|
-
class:
|
|
3052
|
+
ref: _c,
|
|
3053
|
+
class: E(J.value.row({ class: [
|
|
2933
3054
|
a.reorderableRows ? J.value.dropTarget() : "",
|
|
2934
|
-
a.reorderableRows &&
|
|
3055
|
+
a.reorderableRows && Ya.value && Ga.value ? J.value.dropInside() : "",
|
|
2935
3056
|
a.rowHref?.(n.row.original) ? J.value.linkRow() : "",
|
|
2936
3057
|
a.rowClass?.(n.row.original)
|
|
2937
3058
|
] })),
|
|
2938
|
-
"data-state":
|
|
2939
|
-
"aria-selected": q.value && a.selectable ?
|
|
3059
|
+
"data-state": ma(n.row) ? "selected" : void 0,
|
|
3060
|
+
"aria-selected": q.value && a.selectable ? ma(n.row) : void 0,
|
|
2940
3061
|
"data-row-id": n.row.id,
|
|
2941
3062
|
"data-index": n.index,
|
|
2942
|
-
"aria-rowindex": $.value ? n.index +
|
|
2943
|
-
"aria-level":
|
|
2944
|
-
"aria-expanded":
|
|
2945
|
-
draggable:
|
|
2946
|
-
"data-drop":
|
|
2947
|
-
"data-dragging":
|
|
2948
|
-
onClick: (e) =>
|
|
2949
|
-
onAuxclick: (e) =>
|
|
2950
|
-
onDragstart: (e) =>
|
|
2951
|
-
onDragover: (e) =>
|
|
2952
|
-
onDragleave: t[15] ||= (e) =>
|
|
2953
|
-
onDrop:
|
|
2954
|
-
onDragend:
|
|
3063
|
+
"aria-rowindex": $.value ? n.index + ki.value.length + 1 : void 0,
|
|
3064
|
+
"aria-level": li.value ? n.row.depth + 1 : void 0,
|
|
3065
|
+
"aria-expanded": li.value && n.row.getCanExpand() ? n.row.getIsExpanded() : void 0,
|
|
3066
|
+
draggable: Ka.value === n.row.id ? "true" : void 0,
|
|
3067
|
+
"data-drop": lo(n.row.id),
|
|
3068
|
+
"data-dragging": Ga.value === n.row.id || void 0,
|
|
3069
|
+
onClick: (e) => Ca(n.row, e),
|
|
3070
|
+
onAuxclick: (e) => wa(n.row, e),
|
|
3071
|
+
onDragstart: (e) => io(n.row, e),
|
|
3072
|
+
onDragover: (e) => ao(n.row, e),
|
|
3073
|
+
onDragleave: t[15] ||= (e) => qa.value = null,
|
|
3074
|
+
onDrop: so,
|
|
3075
|
+
onDragend: co
|
|
2955
3076
|
}, [
|
|
2956
|
-
(
|
|
3077
|
+
(O(!0), v(m, null, A(gi.value, (e) => (O(), v("td", {
|
|
2957
3078
|
key: e,
|
|
2958
|
-
class:
|
|
2959
|
-
style:
|
|
2960
|
-
}, [e === "drag" ? (
|
|
3079
|
+
class: E(J.value.td({ class: Di(e, !1) })),
|
|
3080
|
+
style: D(Oi(e))
|
|
3081
|
+
}, [e === "drag" ? (O(), v("button", {
|
|
2961
3082
|
key: 0,
|
|
2962
3083
|
type: "button",
|
|
2963
|
-
class:
|
|
3084
|
+
class: E(J.value.dragHandle()),
|
|
2964
3085
|
"data-drag-handle": n.row.id,
|
|
2965
|
-
"aria-label":
|
|
2966
|
-
"aria-keyshortcuts":
|
|
2967
|
-
onKeydown: (e) =>
|
|
2968
|
-
onPointerdown: (e) =>
|
|
2969
|
-
onPointerup: t[14] ||= (e) =>
|
|
2970
|
-
}, [x(
|
|
2971
|
-
class:
|
|
3086
|
+
"aria-label": N(L).moveRow(G(n.row.original, n.row.index)),
|
|
3087
|
+
"aria-keyshortcuts": Ya.value ? "ArrowUp ArrowDown ArrowLeft ArrowRight" : "ArrowUp ArrowDown",
|
|
3088
|
+
onKeydown: (e) => ro(n.row, e),
|
|
3089
|
+
onPointerdown: (e) => Ka.value = n.row.id,
|
|
3090
|
+
onPointerup: t[14] ||= (e) => Ka.value = Ga.value ? Ka.value : null
|
|
3091
|
+
}, [x(N(Fe), {
|
|
3092
|
+
class: E(J.value.dragIcon()),
|
|
2972
3093
|
"aria-hidden": "true"
|
|
2973
|
-
}, null, 8, ["class"])], 42,
|
|
3094
|
+
}, null, 8, ["class"])], 42, hr)) : e === "select" && fa.value ? (O(), v("span", {
|
|
2974
3095
|
key: 1,
|
|
2975
|
-
onClickCapture:
|
|
2976
|
-
onKeydownCapture:
|
|
3096
|
+
onClickCapture: Sa,
|
|
3097
|
+
onKeydownCapture: Sa
|
|
2977
3098
|
}, [x(ee, {
|
|
2978
|
-
checked:
|
|
3099
|
+
checked: ma(n.row),
|
|
2979
3100
|
disabled: !n.row.getCanSelect(),
|
|
2980
|
-
"aria-label":
|
|
2981
|
-
"onUpdate:checked": (e) =>
|
|
3101
|
+
"aria-label": N(L).selectRow(G(n.row.original, n.row.index)),
|
|
3102
|
+
"onUpdate:checked": (e) => xa(n.row, e === !0, N(ya))
|
|
2982
3103
|
}, null, 8, [
|
|
2983
3104
|
"checked",
|
|
2984
3105
|
"disabled",
|
|
2985
3106
|
"aria-label",
|
|
2986
3107
|
"onUpdate:checked"
|
|
2987
|
-
])], 32)) : e === "select" ? (
|
|
3108
|
+
])], 32)) : e === "select" ? (O(), v("input", {
|
|
2988
3109
|
key: 2,
|
|
2989
3110
|
type: "radio",
|
|
2990
|
-
name:
|
|
2991
|
-
class:
|
|
2992
|
-
checked:
|
|
3111
|
+
name: _a,
|
|
3112
|
+
class: E(J.value.radio()),
|
|
3113
|
+
checked: ma(n.row),
|
|
2993
3114
|
disabled: !n.row.getCanSelect(),
|
|
2994
|
-
"aria-label":
|
|
2995
|
-
onChange: (e) =>
|
|
2996
|
-
}, null, 42,
|
|
3115
|
+
"aria-label": N(L).selectRow(G(n.row.original, n.row.index)),
|
|
3116
|
+
onChange: (e) => xa(n.row, !0)
|
|
3117
|
+
}, null, 42, gr)) : e === "expand" && n.row.getCanExpand() ? (O(), v("button", {
|
|
2997
3118
|
key: 3,
|
|
2998
3119
|
type: "button",
|
|
2999
|
-
class:
|
|
3120
|
+
class: E(J.value.expander()),
|
|
3000
3121
|
"aria-expanded": n.row.getIsExpanded(),
|
|
3001
|
-
"aria-controls": n.row.getIsExpanded() ?
|
|
3002
|
-
"aria-label":
|
|
3122
|
+
"aria-controls": n.row.getIsExpanded() ? ja(n.row) : void 0,
|
|
3123
|
+
"aria-label": N(L).details(G(n.row.original, n.row.index)),
|
|
3003
3124
|
onClick: (e) => n.row.toggleExpanded()
|
|
3004
|
-
}, [x(
|
|
3005
|
-
class:
|
|
3125
|
+
}, [x(N(Ee), {
|
|
3126
|
+
class: E(J.value.expanderIcon()),
|
|
3006
3127
|
"data-state": n.row.getIsExpanded() ? "open" : "closed",
|
|
3007
3128
|
"aria-hidden": "true"
|
|
3008
|
-
}, null, 8, ["class", "data-state"])], 10,
|
|
3129
|
+
}, null, 8, ["class", "data-state"])], 10, _r)) : e === "expand" ? (O(), v("span", {
|
|
3009
3130
|
key: 4,
|
|
3010
|
-
class:
|
|
3011
|
-
},
|
|
3012
|
-
|
|
3131
|
+
class: E(J.value.expanderSpacer())
|
|
3132
|
+
}, null, 2)) : (O(), v("span", {
|
|
3133
|
+
key: 5,
|
|
3134
|
+
class: E(J.value.rowNumber())
|
|
3135
|
+
}, M(Aa.value.get(n.row.id)), 3))], 6))), 128)),
|
|
3136
|
+
(O(!0), v(m, null, A(n.row.getVisibleCells(), (t, r) => (O(), v(m, { key: t.id }, [Rs(n.index, r) ? (O(), v("td", w({
|
|
3013
3137
|
key: 0,
|
|
3014
|
-
class:
|
|
3015
|
-
|
|
3016
|
-
|
|
3138
|
+
class: di(t.column.id).td({ class: [
|
|
3139
|
+
wi(t.column.id, !1),
|
|
3140
|
+
fi(t.column.id, n.row),
|
|
3141
|
+
...zs(n.row, t.column.id, n.index, r).className
|
|
3142
|
+
] }),
|
|
3143
|
+
style: Ti(t.column.id, !1)
|
|
3144
|
+
}, { ref_for: !0 }, zs(n.row, t.column.id, n.index, r).attributes), [(O(), g(me((a.getSubRows || U.value.length) && r === 0 ? "div" : Ua), w({ ref_for: !0 }, (a.getSubRows || U.value.length) && r === 0 ? {
|
|
3017
3145
|
class: J.value.treeCell(),
|
|
3018
3146
|
style: { paddingInlineStart: `${n.row.depth * 20}px` }
|
|
3019
3147
|
} : {}), {
|
|
3020
|
-
default: P(() => [(a.getSubRows || U.value.length) && r === 0 ? (
|
|
3148
|
+
default: P(() => [(a.getSubRows || U.value.length) && r === 0 ? (O(), v(m, { key: 0 }, [a.getSubRows && n.row.getCanExpand() ? (O(), v("button", {
|
|
3021
3149
|
key: 0,
|
|
3022
3150
|
type: "button",
|
|
3023
|
-
class:
|
|
3151
|
+
class: E(J.value.expander()),
|
|
3024
3152
|
"aria-expanded": n.row.getIsExpanded(),
|
|
3025
|
-
"aria-label":
|
|
3153
|
+
"aria-label": Jr(n.row.original, n.row.index),
|
|
3026
3154
|
onClick: (e) => n.row.getToggleExpandedHandler()()
|
|
3027
|
-
}, [x(
|
|
3028
|
-
class:
|
|
3155
|
+
}, [x(N(Ee), {
|
|
3156
|
+
class: E(J.value.expanderIcon()),
|
|
3029
3157
|
"data-state": n.row.getIsExpanded() ? "open" : "closed",
|
|
3030
3158
|
"aria-hidden": "true"
|
|
3031
|
-
}, null, 8, ["class", "data-state"])], 10,
|
|
3159
|
+
}, null, 8, ["class", "data-state"])], 10, vr)) : (O(), v("span", {
|
|
3032
3160
|
key: 1,
|
|
3033
|
-
class:
|
|
3034
|
-
}, null, 2))], 64)) : _("", !0),
|
|
3161
|
+
class: E(J.value.expanderSpacer())
|
|
3162
|
+
}, null, 2))], 64)) : _("", !0), B.value.get(t.column.id)?.editable && (mi.value && wo.value?.rowId === n.row.id && wo.value.columnId === t.column.id || a.editMode === "row" && To.value === n.row.id) ? (O(), v("div", {
|
|
3035
3163
|
key: 1,
|
|
3036
3164
|
"data-editor": "",
|
|
3037
|
-
class:
|
|
3038
|
-
"aria-busy":
|
|
3039
|
-
onKeydown: (e) =>
|
|
3040
|
-
onFocusout: (e) =>
|
|
3041
|
-
}, [
|
|
3165
|
+
class: E(J.value.editor()),
|
|
3166
|
+
"aria-busy": Io.value || void 0,
|
|
3167
|
+
onKeydown: (e) => mi.value ? Vo(n.row, t.column.id, e) : Jo(n.row, e),
|
|
3168
|
+
onFocusout: (e) => mi.value ? Ho(n.row, t.column.id, e) : void 0
|
|
3169
|
+
}, [N(I)[`editor-${t.column.id}`] ? j(e.$slots, `editor-${t.column.id}`, w({ ref_for: !0 }, Go(n.row, B.value.get(t.column.id))), void 0, void 0, 0) : (O(), g(Bn, {
|
|
3042
3170
|
key: 1,
|
|
3043
|
-
type:
|
|
3171
|
+
type: ko(B.value.get(t.column.id)),
|
|
3044
3172
|
label: X(t.column),
|
|
3045
|
-
options:
|
|
3046
|
-
invalid: !!
|
|
3047
|
-
"model-value":
|
|
3048
|
-
"onUpdate:modelValue": (e) =>
|
|
3049
|
-
},
|
|
3173
|
+
options: B.value.get(t.column.id).editOptions,
|
|
3174
|
+
invalid: !!Do.value[t.column.id],
|
|
3175
|
+
"model-value": Eo.value[t.column.id],
|
|
3176
|
+
"onUpdate:modelValue": (e) => Wo(n.row, B.value.get(t.column.id), e)
|
|
3177
|
+
}, oe({ _: 2 }, [N(I)[`option-${t.column.id}`] ? {
|
|
3178
|
+
name: "option",
|
|
3179
|
+
fn: P((n) => [j(e.$slots, `option-${t.column.id}`, w({ ref_for: !0 }, n))]),
|
|
3180
|
+
key: "0"
|
|
3181
|
+
} : void 0]), 1032, [
|
|
3050
3182
|
"type",
|
|
3051
3183
|
"label",
|
|
3052
3184
|
"options",
|
|
3053
3185
|
"invalid",
|
|
3054
3186
|
"model-value",
|
|
3055
3187
|
"onUpdate:modelValue"
|
|
3056
|
-
])),
|
|
3188
|
+
])), Do.value[t.column.id] ? (O(), v("span", {
|
|
3057
3189
|
key: 2,
|
|
3058
|
-
id:
|
|
3190
|
+
id: jo(n.row.id, t.column.id),
|
|
3059
3191
|
role: "alert",
|
|
3060
|
-
class:
|
|
3061
|
-
},
|
|
3192
|
+
class: E(J.value.editError())
|
|
3193
|
+
}, M(Do.value[t.column.id]), 11, br)) : _("", !0)], 42, yr)) : mi.value && B.value.get(t.column.id)?.editable ? (O(), v("button", {
|
|
3062
3194
|
key: 2,
|
|
3063
3195
|
type: "button",
|
|
3064
|
-
class:
|
|
3065
|
-
"data-edit":
|
|
3066
|
-
"aria-label": `${
|
|
3067
|
-
onClick: (e) =>
|
|
3068
|
-
}, [
|
|
3196
|
+
class: E(di(t.column.id).editButton()),
|
|
3197
|
+
"data-edit": Ao(n.row.id, t.column.id),
|
|
3198
|
+
"aria-label": `${N(L).edit(X(t.column), V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original))}${Bs(n.row, t.column.id) ? `, ${N(L).changed}` : ""}`,
|
|
3199
|
+
onClick: (e) => Fo(n.row, t.column.id)
|
|
3200
|
+
}, [j(e.$slots, `cell-${t.column.id}`, {
|
|
3069
3201
|
row: n.row.original,
|
|
3070
3202
|
value: Q(n.row, t.column.id)
|
|
3071
|
-
}, () => [b(
|
|
3203
|
+
}, () => [b(M(V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original)), 1)])], 10, xr)) : B.value.get(t.column.id)?.copyable ? (O(), v("span", {
|
|
3072
3204
|
key: 3,
|
|
3073
|
-
class:
|
|
3074
|
-
}, [
|
|
3205
|
+
class: E(J.value.copyCell())
|
|
3206
|
+
}, [j(e.$slots, `cell-${t.column.id}`, {
|
|
3075
3207
|
row: n.row.original,
|
|
3076
3208
|
value: Q(n.row, t.column.id)
|
|
3077
|
-
}, () => [b(
|
|
3078
|
-
value: B
|
|
3079
|
-
label:
|
|
3080
|
-
}, null, 8, ["value", "label"])], 2)) : (
|
|
3209
|
+
}, () => [b(M(V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original)), 1)]), x(ie, {
|
|
3210
|
+
value: V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original),
|
|
3211
|
+
label: N(L).copy(X(t.column), V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original))
|
|
3212
|
+
}, null, 8, ["value", "label"])], 2)) : (O(), g(me(Ea(n.row, t.column.id) ? "a" : Ua), w({
|
|
3081
3213
|
key: 4,
|
|
3082
3214
|
ref_for: !0
|
|
3083
|
-
},
|
|
3084
|
-
href:
|
|
3215
|
+
}, Ea(n.row, t.column.id) ? {
|
|
3216
|
+
href: Ea(n.row, t.column.id),
|
|
3085
3217
|
class: J.value.rowLink(),
|
|
3086
3218
|
"data-row-link": ""
|
|
3087
3219
|
} : {}), {
|
|
3088
|
-
default: P(() => [
|
|
3220
|
+
default: P(() => [j(e.$slots, `cell-${t.column.id}`, {
|
|
3089
3221
|
row: n.row.original,
|
|
3090
3222
|
value: Q(n.row, t.column.id)
|
|
3091
|
-
}, () => [
|
|
3223
|
+
}, () => [Rc.value ? (O(), g(re, {
|
|
3092
3224
|
key: 0,
|
|
3093
|
-
text: B
|
|
3094
|
-
query:
|
|
3095
|
-
}, null, 8, ["text", "query"])) : (
|
|
3225
|
+
text: V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original),
|
|
3226
|
+
query: Rc.value
|
|
3227
|
+
}, null, 8, ["text", "query"])) : (O(), v(m, { key: 1 }, [b(M(V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original)), 1)], 64))])]),
|
|
3096
3228
|
_: 2
|
|
3097
3229
|
}, 1040))]),
|
|
3098
3230
|
_: 2
|
|
3099
3231
|
}, 1040))], 16)) : _("", !0)], 64))), 128)),
|
|
3100
|
-
|
|
3232
|
+
_i.value.length ? (O(), v("td", {
|
|
3101
3233
|
key: 0,
|
|
3102
|
-
class:
|
|
3103
|
-
style:
|
|
3104
|
-
}, [y("div", { class:
|
|
3105
|
-
icon:
|
|
3106
|
-
label:
|
|
3234
|
+
class: E(J.value.td({ class: Di("actions", !1) })),
|
|
3235
|
+
style: D(Oi("actions"))
|
|
3236
|
+
}, [y("div", { class: E(J.value.editActions()) }, [a.editMode === "row" && pi.value ? (O(), v(m, { key: 0 }, [To.value === n.row.id ? (O(), v(m, { key: 0 }, [x(f, {
|
|
3237
|
+
icon: N(we),
|
|
3238
|
+
label: N(L).saveRow(G(n.row.original, n.row.index)),
|
|
3107
3239
|
variant: "text",
|
|
3108
3240
|
size: "sm",
|
|
3109
|
-
onClick: (e) =>
|
|
3241
|
+
onClick: (e) => qo(n.row, !0)
|
|
3110
3242
|
}, null, 8, [
|
|
3111
3243
|
"icon",
|
|
3112
3244
|
"label",
|
|
3113
3245
|
"onClick"
|
|
3114
3246
|
]), x(f, {
|
|
3115
|
-
icon:
|
|
3116
|
-
label:
|
|
3247
|
+
icon: N(Ke),
|
|
3248
|
+
label: N(L).cancelEdit(G(n.row.original, n.row.index)),
|
|
3117
3249
|
variant: "text",
|
|
3118
3250
|
size: "sm",
|
|
3119
|
-
onClick: (e) =>
|
|
3251
|
+
onClick: (e) => qo(n.row, !1)
|
|
3120
3252
|
}, null, 8, [
|
|
3121
3253
|
"icon",
|
|
3122
3254
|
"label",
|
|
3123
3255
|
"onClick"
|
|
3124
|
-
])], 64)) : (
|
|
3256
|
+
])], 64)) : (O(), g(f, {
|
|
3125
3257
|
key: 1,
|
|
3126
3258
|
"data-row-edit": n.row.id,
|
|
3127
|
-
icon:
|
|
3128
|
-
label:
|
|
3259
|
+
icon: N(ze),
|
|
3260
|
+
label: N(L).editRow(G(n.row.original, n.row.index)),
|
|
3129
3261
|
variant: "text",
|
|
3130
3262
|
size: "sm",
|
|
3131
|
-
onClick: (e) =>
|
|
3263
|
+
onClick: (e) => Ko(n.row)
|
|
3132
3264
|
}, null, 8, [
|
|
3133
3265
|
"data-row-edit",
|
|
3134
3266
|
"icon",
|
|
3135
3267
|
"label",
|
|
3136
3268
|
"onClick"
|
|
3137
|
-
]))], 64)) : _("", !0), a.rowActions &&
|
|
3269
|
+
]))], 64)) : _("", !0), a.rowActions && To.value !== n.row.id ? (O(), g(u, {
|
|
3138
3270
|
key: 1,
|
|
3139
|
-
items:
|
|
3140
|
-
onSelect: (e) =>
|
|
3271
|
+
items: Ra(n.row),
|
|
3272
|
+
onSelect: (e) => Va(n.row, e)
|
|
3141
3273
|
}, {
|
|
3142
3274
|
default: P(() => [x(f, {
|
|
3143
|
-
icon:
|
|
3144
|
-
label:
|
|
3275
|
+
icon: N(Me),
|
|
3276
|
+
label: N(L).rowActions(G(n.row.original, n.row.index)),
|
|
3145
3277
|
variant: "text",
|
|
3146
3278
|
size: "sm"
|
|
3147
3279
|
}, null, 8, ["icon", "label"])]),
|
|
3148
3280
|
_: 2
|
|
3149
3281
|
}, 1032, ["items", "onSelect"])) : _("", !0)], 2)], 6)) : _("", !0)
|
|
3150
|
-
], 42,
|
|
3151
|
-
|
|
3282
|
+
], 42, mr))], 64))), 128)),
|
|
3283
|
+
gc.value > 0 ? (O(), v("tr", {
|
|
3152
3284
|
key: 3,
|
|
3153
|
-
class:
|
|
3285
|
+
class: E(J.value.spacer()),
|
|
3154
3286
|
"aria-hidden": "true"
|
|
3155
3287
|
}, [y("td", {
|
|
3156
|
-
colspan:
|
|
3157
|
-
class:
|
|
3158
|
-
style:
|
|
3159
|
-
}, null, 14,
|
|
3288
|
+
colspan: vi.value,
|
|
3289
|
+
class: E(J.value.spacerCell()),
|
|
3290
|
+
style: D({ height: `${gc.value}px` })
|
|
3291
|
+
}, null, 14, Sr)], 2)) : _("", !0)
|
|
3160
3292
|
], 32)]),
|
|
3161
3293
|
_: 3
|
|
3162
3294
|
}, 8, [
|
|
@@ -3164,67 +3296,69 @@ var Mn = An({
|
|
|
3164
3296
|
"items",
|
|
3165
3297
|
"label"
|
|
3166
3298
|
]),
|
|
3167
|
-
|
|
3299
|
+
Pa.value ? (O(), v("tfoot", {
|
|
3168
3300
|
key: 1,
|
|
3169
|
-
class:
|
|
3301
|
+
class: E(J.value.foot())
|
|
3170
3302
|
}, [y("tr", null, [
|
|
3171
|
-
(
|
|
3303
|
+
(O(!0), v(m, null, A(gi.value, (e) => (O(), v("td", {
|
|
3172
3304
|
key: e,
|
|
3173
|
-
class:
|
|
3174
|
-
style:
|
|
3305
|
+
class: E(J.value.footCell({ class: Di(e, !1) })),
|
|
3306
|
+
style: D(Oi(e))
|
|
3175
3307
|
}, null, 6))), 128)),
|
|
3176
|
-
(
|
|
3308
|
+
(O(!0), v(m, null, A(Y.value, (e) => (O(), v("td", {
|
|
3177
3309
|
key: e.id,
|
|
3178
|
-
class:
|
|
3179
|
-
style:
|
|
3180
|
-
},
|
|
3181
|
-
|
|
3310
|
+
class: E(di(e.id).footCell({ class: [wi(e.id, !1), fi(e.id)] })),
|
|
3311
|
+
style: D(Ti(e.id, !1))
|
|
3312
|
+
}, M(La(B.value.get(e.id))), 7))), 128)),
|
|
3313
|
+
_i.value.length ? (O(), v("td", {
|
|
3182
3314
|
key: 0,
|
|
3183
|
-
class:
|
|
3184
|
-
style:
|
|
3315
|
+
class: E(J.value.footCell({ class: Di("actions", !1) })),
|
|
3316
|
+
style: D(Oi("actions"))
|
|
3185
3317
|
}, null, 6)) : _("", !0)
|
|
3186
3318
|
])], 2)) : _("", !0)
|
|
3187
|
-
], 46,
|
|
3188
|
-
a.statusBar ? (
|
|
3319
|
+
], 46, Kn)], 38),
|
|
3320
|
+
a.statusBar ? (O(), v("div", {
|
|
3189
3321
|
key: 5,
|
|
3190
|
-
class:
|
|
3322
|
+
class: E(J.value.statusBar())
|
|
3191
3323
|
}, [
|
|
3192
|
-
y("span", null,
|
|
3193
|
-
|
|
3194
|
-
a.selectable ? (
|
|
3195
|
-
(
|
|
3324
|
+
y("span", null, M(N(L).rowCount(Wc.value)), 1),
|
|
3325
|
+
na.value ? (O(), v("span", Cr, M(N(L).filteredCount(N(K).getFilteredRowModel().rows.length)), 1)) : _("", !0),
|
|
3326
|
+
a.selectable ? (O(), v("span", wr, M(N(l).common.selectedCount(sc.value)), 1)) : _("", !0),
|
|
3327
|
+
(O(!0), v(m, null, A(Uc.value, (e) => (O(), v("span", { key: e.id }, M(e.text), 1))), 128))
|
|
3196
3328
|
], 2)) : _("", !0),
|
|
3197
|
-
|
|
3329
|
+
Nc.value && a.paginatorPosition === "bottom" ? (O(), v("div", {
|
|
3198
3330
|
key: 6,
|
|
3199
|
-
class:
|
|
3200
|
-
}, [
|
|
3331
|
+
class: E(J.value.footer())
|
|
3332
|
+
}, [Fc.value.length ? (O(), v("div", {
|
|
3201
3333
|
key: 0,
|
|
3202
|
-
class:
|
|
3203
|
-
}, [y("span",
|
|
3204
|
-
class:
|
|
3205
|
-
"aria-label":
|
|
3206
|
-
items:
|
|
3334
|
+
class: E(J.value.pageSize())
|
|
3335
|
+
}, [y("span", Tr, M(N(L).rowsPerPage), 1), x(ne, {
|
|
3336
|
+
class: E(J.value.pageSizeSelect()),
|
|
3337
|
+
"aria-label": N(L).rowsPerPage,
|
|
3338
|
+
items: Fc.value,
|
|
3207
3339
|
"model-value": String(H.value.pageSize),
|
|
3208
|
-
"onUpdate:modelValue": t[18] ||= (e) =>
|
|
3340
|
+
"onUpdate:modelValue": t[18] ||= (e) => N(K).setPageSize(Number(e))
|
|
3209
3341
|
}, null, 8, [
|
|
3210
3342
|
"class",
|
|
3211
3343
|
"aria-label",
|
|
3212
3344
|
"items",
|
|
3213
3345
|
"model-value"
|
|
3214
3346
|
])], 2)) : _("", !0), x(r, {
|
|
3215
|
-
count:
|
|
3347
|
+
count: Pc.value,
|
|
3216
3348
|
"page-size": H.value.pageSize,
|
|
3217
3349
|
page: H.value.pageIndex + 1,
|
|
3218
|
-
translations: { rootLabel: `${a.caption}: ${
|
|
3219
|
-
"
|
|
3350
|
+
translations: { rootLabel: `${a.caption}: ${N(l).pagination.rootLabel}` },
|
|
3351
|
+
"with-edges": a.paginatorEdges,
|
|
3352
|
+
"onUpdate:page": t[19] ||= (e) => N(K).setPageIndex(e - 1)
|
|
3220
3353
|
}, null, 8, [
|
|
3221
3354
|
"count",
|
|
3222
3355
|
"page-size",
|
|
3223
3356
|
"page",
|
|
3224
|
-
"translations"
|
|
3357
|
+
"translations",
|
|
3358
|
+
"with-edges"
|
|
3225
3359
|
])], 2)) : _("", !0)
|
|
3226
|
-
], 16,
|
|
3360
|
+
], 16, Hn)], 8, ["disabled"]));
|
|
3227
3361
|
}
|
|
3228
|
-
}),
|
|
3362
|
+
}), Ar = { dateInput: a }, V = { numberInput: o };
|
|
3229
3363
|
//#endregion
|
|
3230
|
-
export {
|
|
3364
|
+
export { B as DataTable, tt as createDataController, L as dataSourceToRows, Ar as dateInput, ct as defineMatchMode, Lt as moveItem, Rt as moveTreeRow, V as numberInput, tn as rowsToDataSource };
|