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