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