@wirecore/wirelayer-vue 0.15.1 → 0.17.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/{RecipesProvider-z4RUE-Pk.js → RecipesProvider-BsuOKVkQ.js} +78 -72
- package/dist/{Tree-BD13Var1.js → Tree-8KjrR3Z-.js} +67 -61
- package/dist/components/Banner/Banner.vue.d.ts +6 -1
- package/dist/components/Banner/Banner.vue.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.vue.d.ts.map +1 -1
- package/dist/components/Tabs/TabsContent.vue.d.ts.map +1 -1
- package/dist/components/Tabs/context.d.ts +5 -0
- package/dist/components/Tabs/context.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.vue.d.ts.map +1 -1
- package/dist/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/data-table/types.d.ts +9 -0
- package/dist/data-table/types.d.ts.map +1 -1
- package/dist/data-table.js +1025 -1024
- package/dist/index.js +5 -3
- package/dist/pdf.js +1 -1
- package/llms-full.txt +29 -1
- package/llms.txt +1 -0
- package/package.json +2 -2
package/dist/data-table.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e, n as t, o as n, r } from "./recipes-CD2Ibsv9.js";
|
|
2
|
-
import { a as i, b as a, i as o, n as s, o as c, r as l, t as u, v as ee, x as d, y as te } from "./RecipesProvider-
|
|
2
|
+
import { a as i, b as a, i as o, n as s, o as c, r as l, t as u, v as ee, x as d, y as te } from "./RecipesProvider-BsuOKVkQ.js";
|
|
3
3
|
import { t as ne } from "./Button-WA6BonwF.js";
|
|
4
4
|
import { t as re } from "./Checkbox-DILwucBG.js";
|
|
5
5
|
import { r as ie } from "./InputStatus-BdHg-ibH.js";
|
|
@@ -9,53 +9,53 @@ import { t as ce } from "./Highlight-BM-J3Jj0.js";
|
|
|
9
9
|
import { t as le } from "./CopyButton-BVRwSCRj.js";
|
|
10
10
|
import { Fragment as p, Teleport as ue, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createSlots as de, createTextVNode as y, createVNode as b, defineComponent as x, guardReactiveProps as fe, h as pe, inject as me, mergeProps as S, nextTick as C, normalizeClass as w, normalizeProps as he, normalizeStyle as T, onBeforeUnmount as ge, onMounted as _e, onUpdated as ve, openBlock as E, provide as ye, ref as D, renderList as O, renderSlot as k, resolveDynamicComponent as be, shallowRef as xe, toDisplayString as A, unref as j, useAttrs as Se, useId as Ce, useSlots as we, useTemplateRef as Te, watch as Ee, withCtx as M, withModifiers as De } from "vue";
|
|
11
11
|
import { ArrowDown as Oe, ArrowUp as ke, ArrowUpDown as Ae, Check as je, ChevronDown as Me, ChevronRight as Ne, ChevronUp as Pe, ChevronsDownUp as Fe, ChevronsUpDown as Ie, Columns3 as Le, Download as Re, EllipsisVertical as ze, Filter as Be, FilterX as Ve, GripVertical as He, ListFilter as Ue, Maximize2 as We, Minimize2 as Ge, Pencil as Ke, Plus as N, Redo2 as qe, Rows3 as Je, Search as Ye, TextSearch as Xe, Trash2 as Ze, Undo2 as Qe, X as $e } from "@lucide/vue";
|
|
12
|
-
import { EditHistory as et, aggregateValues as tt, applyPending as nt, autoRowSpans as rt, changesByRow as it, clearTableState as at, collectErrors as ot, conditionFieldsFromColumns as st, createDataController as P, createDataController as ct, createXlsx as lt, csvSeparator as ut, dataAnnouncement as dt, dataSourceToRows as ft, dataTable as pt, dataTableMatchModes as mt, defineMatchMode as F, downloadBytes as ht, downloadText as gt, emptyConditionGroup as _t, emptyFilterRule as vt, extendRange as yt, findMatches as bt, fitColumnWidth as xt, gridFocusIn as St, gridKeydown as Ct, groupedRowMove as wt, historyKey as Tt, idRange as Et, inlineArrowStep as Dt, isActiveCondition as Ot, isActiveFilter as kt, isRangeMatchMode as At, listValueKey as jt, loadTableState as Mt, locateTreeNode as Nt, matchModeDefinition as Pt, matchModeLabel as Ft, matchModesFor as It, matchesColumnFilter as Lt, matchesCondition as Rt, matchesRowKeywords as zt, matchesSearch as Bt, menu as Vt, moveColumnBlock as Ht, moveItem as Ut, moveTreeRow as Wt, nextSorting as Gt, numberSummary as Kt, omitTableState as qt, paginatorAlignKey as Jt, parseCellText as Yt, parseTsv as Xt, pasteTargets as Zt, pendingValue as Qt, pivotTable as $t, pivotView as en, printHtml as tn, printTableHtml as nn, queryKey as rn, rangeAround as an, rangeBounds as on, rowColumnSpans as sn, rowsToDataSource as cn, rowsToDataSource as ln, sameCellValue as un, sameTableValue as dn, saveTableState as fn, sizeOverrides as pn, syncGrid as mn,
|
|
12
|
+
import { EditHistory as et, aggregateValues as tt, applyPending as nt, autoRowSpans as rt, changesByRow as it, clearTableState as at, collectErrors as ot, conditionFieldsFromColumns as st, createDataController as P, createDataController as ct, createXlsx as lt, csvSeparator as ut, dataAnnouncement as dt, dataSourceToRows as ft, dataTable as pt, dataTableMatchModes as mt, defineMatchMode as F, downloadBytes as ht, downloadText as gt, emptyConditionGroup as _t, emptyFilterRule as vt, extendRange as yt, findMatches as bt, fitColumnWidth as xt, gridFocusIn as St, gridKeydown as Ct, groupedRowMove as wt, historyKey as Tt, idRange as Et, inlineArrowStep as Dt, isActiveCondition as Ot, isActiveFilter as kt, isRangeMatchMode as At, listValueKey as jt, loadTableState as Mt, locateTreeNode as Nt, matchModeDefinition as Pt, matchModeLabel as Ft, matchModesFor as It, matchesColumnFilter as Lt, matchesCondition as Rt, matchesRowKeywords as zt, matchesSearch as Bt, menu as Vt, moveColumnBlock as Ht, moveItem as Ut, moveTreeRow as Wt, nextSorting as Gt, numberSummary as Kt, omitTableState as qt, paginatorAlignKey as Jt, parseCellText as Yt, parseTsv as Xt, pasteTargets as Zt, pendingValue as Qt, pivotTable as $t, pivotView as en, printHtml as tn, printTableHtml as nn, queryKey as rn, rangeAround as an, rangeBounds as on, rowColumnSpans as sn, rowsToDataSource as cn, rowsToDataSource as ln, sameCellValue as un, sameTableValue as dn, saveTableState as fn, sizeOverrides as pn, syncGrid as mn, tableExportColumns as hn, toCsv as gn, toFilterRule as _n, toTsv as vn, treeDropMove as yn, treeGridKeyAction as bn, treeKeyboardMove as xn, warnInDevelopment as Sn } from "@wirecore/wirelayer-recipes";
|
|
13
13
|
import { Menu as I } from "@ark-ui/vue/menu";
|
|
14
|
-
import { Popover as
|
|
15
|
-
import { columnFilteringFeature as
|
|
14
|
+
import { Popover as Cn } from "@ark-ui/vue/popover";
|
|
15
|
+
import { columnFilteringFeature as wn, columnGroupingFeature as L, columnOrderingFeature as Tn, columnPinningFeature as En, columnResizingFeature as Dn, columnSizingFeature as On, columnVisibilityFeature as kn, constructSortFn as An, createExpandedRowModel as jn, createFilteredRowModel as Mn, createGroupedRowModel as Nn, createPaginatedRowModel as Pn, createSortedRowModel as Fn, filterFn_equalsString as In, filterFn_includesString as Ln, globalFilteringFeature as Rn, rowExpandingFeature as zn, rowPaginationFeature as Bn, rowPinningFeature as Vn, rowSelectionFeature as Hn, rowSortingFeature as Un, sortFn_alphanumericCaseSensitive as Wn, sortFn_basic as Gn, sortFn_datetime as R, sortFn_textCaseSensitive as Kn, tableFeatures as z, useTable as qn } from "@tanstack/vue-table";
|
|
16
16
|
//#region src/data-table/features.ts
|
|
17
|
-
var
|
|
18
|
-
let t = e.table.options.meta?.locale ?? "", n =
|
|
17
|
+
var Jn = /* @__PURE__ */ new Map(), Yn = (e) => {
|
|
18
|
+
let t = e.table.options.meta?.locale ?? "", n = Jn.get(t);
|
|
19
19
|
return n || (n = new Intl.Collator(t || void 0, {
|
|
20
20
|
numeric: !0,
|
|
21
21
|
sensitivity: "base"
|
|
22
|
-
}),
|
|
23
|
-
}, B =
|
|
22
|
+
}), Jn.set(t, n)), n;
|
|
23
|
+
}, B = An({
|
|
24
24
|
resolveDataValue: (e) => typeof e == "string" ? e : typeof e == "number" && Number.isFinite(e) ? String(e) : "",
|
|
25
|
-
sort: (e, t, n) =>
|
|
26
|
-
}),
|
|
25
|
+
sort: (e, t, n) => Yn(n).compare(e, t)
|
|
26
|
+
}), Xn = z({
|
|
27
27
|
tableMeta: {},
|
|
28
|
-
rowSortingFeature:
|
|
29
|
-
sortedRowModel:
|
|
28
|
+
rowSortingFeature: Un,
|
|
29
|
+
sortedRowModel: Fn(),
|
|
30
30
|
sortFns: {
|
|
31
31
|
text: B,
|
|
32
32
|
alphanumeric: B,
|
|
33
|
-
textCaseSensitive:
|
|
34
|
-
alphanumericCaseSensitive:
|
|
33
|
+
textCaseSensitive: Kn,
|
|
34
|
+
alphanumericCaseSensitive: Wn,
|
|
35
35
|
datetime: R,
|
|
36
|
-
basic:
|
|
36
|
+
basic: Gn
|
|
37
37
|
},
|
|
38
|
-
rowPaginationFeature:
|
|
39
|
-
paginatedRowModel:
|
|
40
|
-
rowSelectionFeature:
|
|
41
|
-
rowPinningFeature:
|
|
42
|
-
rowExpandingFeature:
|
|
43
|
-
expandedRowModel:
|
|
38
|
+
rowPaginationFeature: Bn,
|
|
39
|
+
paginatedRowModel: Pn(),
|
|
40
|
+
rowSelectionFeature: Hn,
|
|
41
|
+
rowPinningFeature: Vn,
|
|
42
|
+
rowExpandingFeature: zn,
|
|
43
|
+
expandedRowModel: jn(),
|
|
44
44
|
columnGroupingFeature: L,
|
|
45
|
-
groupedRowModel:
|
|
46
|
-
columnFilteringFeature:
|
|
47
|
-
globalFilteringFeature:
|
|
48
|
-
filteredRowModel:
|
|
45
|
+
groupedRowModel: Nn(),
|
|
46
|
+
columnFilteringFeature: wn,
|
|
47
|
+
globalFilteringFeature: Rn,
|
|
48
|
+
filteredRowModel: Mn(),
|
|
49
49
|
filterFns: {
|
|
50
|
-
includesString:
|
|
51
|
-
equalsString:
|
|
50
|
+
includesString: Ln,
|
|
51
|
+
equalsString: In
|
|
52
52
|
},
|
|
53
|
-
columnVisibilityFeature:
|
|
54
|
-
columnOrderingFeature:
|
|
55
|
-
columnPinningFeature:
|
|
56
|
-
columnSizingFeature:
|
|
57
|
-
columnResizingFeature:
|
|
58
|
-
}),
|
|
53
|
+
columnVisibilityFeature: kn,
|
|
54
|
+
columnOrderingFeature: Tn,
|
|
55
|
+
columnPinningFeature: En,
|
|
56
|
+
columnSizingFeature: On,
|
|
57
|
+
columnResizingFeature: Dn
|
|
58
|
+
}), Zn = Symbol("wirecore-data-table-features"), Qn = /* @__PURE__ */ x({
|
|
59
59
|
__name: "ValueInput",
|
|
60
60
|
props: {
|
|
61
61
|
type: {},
|
|
@@ -71,7 +71,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
71
71
|
},
|
|
72
72
|
emits: ["update:modelValue"],
|
|
73
73
|
setup(e, { emit: t }) {
|
|
74
|
-
let r = e, o = t, s = n().dataTable, c = n(), l = me(
|
|
74
|
+
let r = e, o = t, s = n().dataTable, c = n(), l = me(Zn, {}), u = m(() => (r.options ?? []).some((e) => typeof e != "string")), ee = m(() => [...r.any && r.type !== "multiSelect" ? [{
|
|
75
75
|
value: "",
|
|
76
76
|
label: s.filterAll
|
|
77
77
|
}] : [], ...r.type === "boolean" ? [{
|
|
@@ -260,7 +260,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
260
260
|
"model-value"
|
|
261
261
|
]));
|
|
262
262
|
}
|
|
263
|
-
}),
|
|
263
|
+
}), $n = /* @__PURE__ */ x({
|
|
264
264
|
__name: "FilterMenu",
|
|
265
265
|
props: {
|
|
266
266
|
header: {},
|
|
@@ -276,9 +276,9 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
276
276
|
let a = r, o = t("dataTable", pt), s = i, c = n().dataTable, l = e(), u = o(), ee = D(!1), d = D(vt(a.type)), te = m(() => kt(a.modelValue)), re = m(() => It(a.type, a.matchModes)), ie = m(() => re.value.map((e) => ({
|
|
277
277
|
value: e,
|
|
278
278
|
label: Ft(e, c.matchModes, l.value.locale)
|
|
279
|
-
}))), ae = (e) => Pt(e)?.input ?? a.type, oe = me(
|
|
279
|
+
}))), ae = (e) => Pt(e)?.input ?? a.type, oe = me(Zn, {}), ce = (e) => !!oe.dateRangeInput && ["date", "datetime"].includes(ae(e)), le = (e) => JSON.parse(JSON.stringify(e));
|
|
280
280
|
function x(e) {
|
|
281
|
-
e && (d.value = le(
|
|
281
|
+
e && (d.value = le(_n(a.modelValue ?? vt(a.type), a.type))), ee.value = e;
|
|
282
282
|
}
|
|
283
283
|
function fe(e, t) {
|
|
284
284
|
let n = d.value.constraints[e];
|
|
@@ -298,14 +298,14 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
298
298
|
placement: "bottom-end",
|
|
299
299
|
gutter: 4
|
|
300
300
|
};
|
|
301
|
-
return (e, t) => (E(), h(j(
|
|
301
|
+
return (e, t) => (E(), h(j(Cn).Root, {
|
|
302
302
|
open: ee.value,
|
|
303
303
|
positioning: T,
|
|
304
304
|
"lazy-mount": "",
|
|
305
305
|
"unmount-on-exit": "",
|
|
306
306
|
onOpenChange: t[2] ||= (e) => x(e.open)
|
|
307
307
|
}, {
|
|
308
|
-
default: M(() => [b(j(
|
|
308
|
+
default: M(() => [b(j(Cn).Trigger, {
|
|
309
309
|
class: w(j(u).headButton()),
|
|
310
310
|
"aria-label": j(c).filterMenu(r.header, te.value),
|
|
311
311
|
"data-active": te.value || void 0
|
|
@@ -319,8 +319,8 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
319
319
|
"class",
|
|
320
320
|
"aria-label",
|
|
321
321
|
"data-active"
|
|
322
|
-
]), (E(), h(ue, { to: "body" }, [b(j(
|
|
323
|
-
default: M(() => [b(j(
|
|
322
|
+
]), (E(), h(ue, { to: "body" }, [b(j(Cn).Positioner, null, {
|
|
323
|
+
default: M(() => [b(j(Cn).Content, {
|
|
324
324
|
class: w(j(u).filterPanel()),
|
|
325
325
|
"aria-label": j(c).filterMenu(r.header, !1)
|
|
326
326
|
}, {
|
|
@@ -375,7 +375,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
375
375
|
])) : g("", !0)], 2), e.$slots.value ? k(e.$slots, "value", S({ ref_for: !0 }, {
|
|
376
376
|
value: t.value,
|
|
377
377
|
setValue: (e) => t.value = e
|
|
378
|
-
}), void 0, void 0, 0) : j(At)(t.matchMode) && ce(t.matchMode) ? (E(), h(
|
|
378
|
+
}), void 0, void 0, 0) : j(At)(t.matchMode) && ce(t.matchMode) ? (E(), h(Qn, {
|
|
379
379
|
key: 1,
|
|
380
380
|
range: "",
|
|
381
381
|
type: ae(t.matchMode),
|
|
@@ -392,7 +392,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
392
392
|
])) : j(At)(t.matchMode) ? (E(), _("div", {
|
|
393
393
|
key: 2,
|
|
394
394
|
class: w(j(u).filterRange())
|
|
395
|
-
}, [b(
|
|
395
|
+
}, [b(Qn, {
|
|
396
396
|
type: ae(t.matchMode),
|
|
397
397
|
label: `${j(c).value(n)}, ${j(c).from}`,
|
|
398
398
|
options: r.options,
|
|
@@ -406,7 +406,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
406
406
|
"input-props",
|
|
407
407
|
"model-value",
|
|
408
408
|
"onUpdate:modelValue"
|
|
409
|
-
]), b(
|
|
409
|
+
]), b(Qn, {
|
|
410
410
|
type: ae(t.matchMode),
|
|
411
411
|
label: `${j(c).value(n)}, ${j(c).to}`,
|
|
412
412
|
options: r.options,
|
|
@@ -420,7 +420,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
420
420
|
"input-props",
|
|
421
421
|
"model-value",
|
|
422
422
|
"onUpdate:modelValue"
|
|
423
|
-
])], 2)) : (E(), h(
|
|
423
|
+
])], 2)) : (E(), h(Qn, {
|
|
424
424
|
key: 3,
|
|
425
425
|
type: ae(t.matchMode),
|
|
426
426
|
label: j(c).value(n),
|
|
@@ -477,17 +477,17 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
477
477
|
_: 3
|
|
478
478
|
}, 8, ["open"]));
|
|
479
479
|
}
|
|
480
|
-
}),
|
|
480
|
+
}), er = [
|
|
481
481
|
"role",
|
|
482
482
|
"aria-modal",
|
|
483
483
|
"aria-label"
|
|
484
|
-
],
|
|
484
|
+
], tr = ["id"], nr = ["aria-label"], rr = { "aria-hidden": "true" }, ir = [
|
|
485
485
|
"aria-busy",
|
|
486
486
|
"aria-rowcount",
|
|
487
487
|
"role",
|
|
488
488
|
"aria-multiselectable",
|
|
489
489
|
"tabindex"
|
|
490
|
-
],
|
|
490
|
+
], ar = ["rowspan"], or = ["aria-label"], sr = ["colspan", "rowspan"], cr = [
|
|
491
491
|
"id",
|
|
492
492
|
"rowspan",
|
|
493
493
|
"aria-sort",
|
|
@@ -497,7 +497,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
497
497
|
"data-dragging",
|
|
498
498
|
"onDragstart",
|
|
499
499
|
"onDragover"
|
|
500
|
-
],
|
|
500
|
+
], lr = ["onClick"], ur = ["id"], dr = ["data-column-menu", "aria-label"], fr = [
|
|
501
501
|
"aria-label",
|
|
502
502
|
"aria-valuenow",
|
|
503
503
|
"data-resizing",
|
|
@@ -505,37 +505,37 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
505
505
|
"onTouchstart",
|
|
506
506
|
"onKeydown",
|
|
507
507
|
"onDblclick"
|
|
508
|
-
],
|
|
508
|
+
], pr = ["rowspan"], mr = {
|
|
509
509
|
key: 1,
|
|
510
510
|
"data-totals": ""
|
|
511
|
-
},
|
|
511
|
+
}, hr = [
|
|
512
512
|
"data-state",
|
|
513
513
|
"aria-selected",
|
|
514
514
|
"data-row-id",
|
|
515
515
|
"data-stripe"
|
|
516
|
-
],
|
|
516
|
+
], gr = [
|
|
517
517
|
"aria-busy",
|
|
518
518
|
"onKeydownCapture",
|
|
519
519
|
"onKeydown",
|
|
520
520
|
"onFocusout"
|
|
521
|
-
],
|
|
521
|
+
], _r = ["id"], vr = [
|
|
522
522
|
"data-edit",
|
|
523
523
|
"aria-label",
|
|
524
524
|
"onClick"
|
|
525
|
-
],
|
|
525
|
+
], yr = { key: 0 }, br = ["colspan"], xr = { role: "alert" }, Sr = ["colspan"], Cr = [
|
|
526
526
|
"data-index",
|
|
527
527
|
"aria-rowindex",
|
|
528
528
|
"data-drop",
|
|
529
529
|
"onDragover"
|
|
530
|
-
],
|
|
530
|
+
], wr = ["colspan"], Tr = [
|
|
531
531
|
"aria-expanded",
|
|
532
532
|
"aria-label",
|
|
533
533
|
"onClick"
|
|
534
|
-
],
|
|
534
|
+
], Er = [
|
|
535
535
|
"id",
|
|
536
536
|
"data-index",
|
|
537
537
|
"aria-rowindex"
|
|
538
|
-
],
|
|
538
|
+
], Dr = ["colspan"], Or = [
|
|
539
539
|
"data-state",
|
|
540
540
|
"aria-selected",
|
|
541
541
|
"data-row-id",
|
|
@@ -551,36 +551,36 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
551
551
|
"onAuxclick",
|
|
552
552
|
"onDragstart",
|
|
553
553
|
"onDragover"
|
|
554
|
-
],
|
|
554
|
+
], kr = [
|
|
555
555
|
"data-drag-handle",
|
|
556
556
|
"aria-label",
|
|
557
557
|
"aria-keyshortcuts",
|
|
558
558
|
"onKeydown",
|
|
559
559
|
"onPointerdown"
|
|
560
|
-
],
|
|
560
|
+
], Ar = [
|
|
561
561
|
"checked",
|
|
562
562
|
"disabled",
|
|
563
563
|
"aria-label",
|
|
564
564
|
"onChange"
|
|
565
|
-
],
|
|
565
|
+
], jr = [
|
|
566
566
|
"aria-expanded",
|
|
567
567
|
"aria-controls",
|
|
568
568
|
"aria-label",
|
|
569
569
|
"onClick"
|
|
570
|
-
],
|
|
570
|
+
], Mr = [
|
|
571
571
|
"aria-expanded",
|
|
572
572
|
"aria-label",
|
|
573
573
|
"onClick"
|
|
574
|
-
],
|
|
574
|
+
], Nr = [
|
|
575
575
|
"aria-busy",
|
|
576
576
|
"onKeydownCapture",
|
|
577
577
|
"onKeydown",
|
|
578
578
|
"onFocusout"
|
|
579
|
-
],
|
|
579
|
+
], Pr = ["id"], Fr = [
|
|
580
580
|
"data-edit",
|
|
581
581
|
"aria-label",
|
|
582
582
|
"onClick"
|
|
583
|
-
],
|
|
583
|
+
], Ir = ["colspan"], Lr = { key: 0 }, Rr = { key: 1 }, zr = { "aria-hidden": "true" }, Br = 60, Vr = 16, Hr = "input, textarea, select, [contenteditable=\"\"], [contenteditable=\"true\"], [data-editor]", Ur = "button, a, input, select, textarea, label, [role=checkbox], [role=combobox], [contenteditable]", Wr = /* @__PURE__ */ x({
|
|
584
584
|
inheritAttrs: !1,
|
|
585
585
|
__name: "DataTable",
|
|
586
586
|
props: {
|
|
@@ -729,43 +729,43 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
729
729
|
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.scroll.cellSelectionChange.cellPaste.save".split("."),
|
|
730
730
|
setup(i, { expose: a, emit: o }) {
|
|
731
731
|
let c = n(), l = e(), x = i, fe = t("dataTable", pt, () => x.classes), me = r("dataTable", pt), he = (e) => x[e] ?? !!me()[e], De = t("menu", Vt), N = o, Ze = Se(), P = we(), ft = Ce(), F = c.dataTable, vt = Object.assign({}, ...x.features ?? []);
|
|
732
|
-
ye(
|
|
733
|
-
let Ft = (e, t) => typeof e == "function" ? e(t) : e, It = (e) => e == null ? "" : String(e), Ut = (e) => e === void 0 ? [] : Array.isArray(e) ? e : [e], Wt = (e) => e ? Array.isArray(e) ? e : [e] : [], cn = (e) => Object.fromEntries(e.filter((e) => kt(e.value)).map((e) => [e.id, e.value])),
|
|
732
|
+
ye(Zn, vt);
|
|
733
|
+
let Ft = (e, t) => typeof e == "function" ? e(t) : e, It = (e) => e == null ? "" : String(e), Ut = (e) => e === void 0 ? [] : Array.isArray(e) ? e : [e], Wt = (e) => e ? Array.isArray(e) ? e : [e] : [], cn = (e) => Object.fromEntries(e.filter((e) => kt(e.value)).map((e) => [e.id, e.value])), _n = (e) => Object.entries(e).filter(([, e]) => kt(e)).map(([e, t]) => ({
|
|
734
734
|
id: e,
|
|
735
735
|
value: t
|
|
736
|
-
})),
|
|
736
|
+
})), Cn = (e, t = !0) => Object.fromEntries(e.map((e) => [e, t])), wn = (e) => Object.fromEntries(e.map((e) => [e, !0])), L = (e, t) => Ee(e, (e, n) => {
|
|
737
737
|
dn(e, n) || t(e);
|
|
738
|
-
}),
|
|
738
|
+
}), Tn = (e, t, n) => {
|
|
739
739
|
let r = { ...e };
|
|
740
740
|
for (let e of t) n ? r[e] = !0 : delete r[e];
|
|
741
741
|
return r;
|
|
742
|
-
},
|
|
742
|
+
}, En = {
|
|
743
743
|
drag: 40,
|
|
744
744
|
select: 48,
|
|
745
745
|
expand: 40,
|
|
746
746
|
number: 56,
|
|
747
747
|
actions: 88
|
|
748
|
-
},
|
|
748
|
+
}, Dn = [], On = (e) => "getRows" in e ? ln(e.getRows) : e, kn = xe({
|
|
749
749
|
status: "idle",
|
|
750
750
|
items: []
|
|
751
|
-
}),
|
|
752
|
-
source: { getItems: (e) =>
|
|
753
|
-
onChange: (e) =>
|
|
754
|
-
}),
|
|
751
|
+
}), An = null, jn = () => x.dataSource ? (An ??= ct({
|
|
752
|
+
source: { getItems: (e) => On(x.dataSource).getItems(e) },
|
|
753
|
+
onChange: (e) => kn.value = e
|
|
754
|
+
}), An.configure({
|
|
755
755
|
ttl: x.cacheTime,
|
|
756
756
|
debounce: x.searchDebounce
|
|
757
|
-
}),
|
|
758
|
-
ge(() =>
|
|
759
|
-
let
|
|
757
|
+
}), An) : null;
|
|
758
|
+
ge(() => An?.dispose());
|
|
759
|
+
let Mn = m(() => {
|
|
760
760
|
let e = x.pivot;
|
|
761
761
|
if (!e) return null;
|
|
762
762
|
let t = /* @__PURE__ */ new Map(), n = (e) => e.forEach((e) => e.columns ? n(e.columns) : t.set(e.id, e));
|
|
763
763
|
n(x.columns);
|
|
764
764
|
let r = (e, n) => {
|
|
765
765
|
let r = t.get(n);
|
|
766
|
-
return r ?
|
|
766
|
+
return r ? Kn(r, e) : e[n];
|
|
767
767
|
}, i = new Intl.NumberFormat(l.value.locale, { maximumFractionDigits: 2 });
|
|
768
|
-
return en($t(x.data ??
|
|
768
|
+
return en($t(x.data ?? Dn, e, r, (e, n, r) => {
|
|
769
769
|
let i = t.get(n)?.format;
|
|
770
770
|
return i ? i(r, e) : It(r);
|
|
771
771
|
}), e, {
|
|
@@ -773,159 +773,159 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
773
773
|
totalLabel: F.total,
|
|
774
774
|
format: (e) => typeof e == "number" ? i.format(e) : It(e)
|
|
775
775
|
});
|
|
776
|
-
}),
|
|
777
|
-
L(() => x.advancedFilterValue, (e) => e && (
|
|
778
|
-
let
|
|
779
|
-
function
|
|
780
|
-
|
|
776
|
+
}), Nn = D(x.advancedFilterValue ?? _t("and", "root"));
|
|
777
|
+
L(() => x.advancedFilterValue, (e) => e && (Nn.value = e));
|
|
778
|
+
let Pn = D(!1), Fn = m(() => Array.isArray(x.advancedFilter) ? x.advancedFilter : x.advancedFilter ? st(x.columns, x.data ?? Dn) : []), In = m(() => !!x.advancedFilter && Ot(Nn.value, Fn.value));
|
|
779
|
+
function Ln(e) {
|
|
780
|
+
Nn.value = e, N("update:advancedFilterValue", e);
|
|
781
781
|
}
|
|
782
|
-
let
|
|
782
|
+
let Rn = m(() => !!x.advancedFilter && !!P.advancedFilter);
|
|
783
783
|
_e(() => {
|
|
784
|
-
x.advancedFilter && !P.advancedFilter &&
|
|
784
|
+
x.advancedFilter && !P.advancedFilter && Sn("DataTable: `advancedFilter` has no editor, so the toolbar button is hidden – fill the `#advancedFilter` slot with ConditionBuilder from @wirecore/wirelayer-blocks-vue");
|
|
785
785
|
});
|
|
786
|
-
let
|
|
786
|
+
let zn = m(() => Mn.value ? Mn.value.rows : x.dataSource ? kn.value.items : In.value && !x.manual ? (x.data ?? Dn).filter((e) => Rt(e, Nn.value, Fn.value, l.value.locale)) : x.data ?? Dn), Bn = m(() => Mn.value ? Mn.value.columns : x.columns), Vn = m(() => !!x.manual || !!x.dataSource), Hn = m(() => x.dataSource ? kn.value.totalCount ?? kn.value.items.length : x.rowCount), Un = m(() => !!x.dataSource && kn.value.status === "error"), Wn = m(() => !!x.loading || !!x.dataSource && kn.value.status === "loading"), Gn = m(() => {
|
|
787
787
|
let e = (t) => t.flatMap((t) => t.columns ? e(t.columns) : [t]);
|
|
788
|
-
return e(
|
|
788
|
+
return e(Bn.value);
|
|
789
789
|
}), R = m(() => {
|
|
790
790
|
let e = /* @__PURE__ */ new Map(), t = (n) => n.forEach((n) => {
|
|
791
791
|
e.set(n.id, n), n.columns && t(n.columns);
|
|
792
792
|
});
|
|
793
|
-
return t(
|
|
794
|
-
}),
|
|
793
|
+
return t(Bn.value), e;
|
|
794
|
+
}), Kn = (e, t) => typeof e.accessor == "function" ? e.accessor(t) : t[e.accessor ?? e.id], z = (e, t, n) => e?.format ? e.format(t, n) : It(t), Jn = (e) => (e.filterOptions ?? []).some((e) => typeof e != "string"), Yn = (e) => !e.filter || e.filter === "text" || e.filter === "select" || e.filter === "multiSelect", B = D(Wt(x.sorting === void 0 ? x.defaultSorting : x.sorting));
|
|
795
795
|
L(() => x.sorting, (e) => e !== void 0 && (B.value = Wt(e)));
|
|
796
|
-
let
|
|
797
|
-
pageIndex:
|
|
796
|
+
let Wr = (e, t, n) => t === void 0 ? e ? e - 1 : void 0 : Math.floor(t / n), V = D({
|
|
797
|
+
pageIndex: Wr(x.page, x.first, x.pageSize ?? 10) ?? 0,
|
|
798
798
|
pageSize: x.pageSize ?? 10
|
|
799
799
|
});
|
|
800
800
|
L(() => x.pageSize, (e) => e !== void 0 && (V.value = {
|
|
801
801
|
...V.value,
|
|
802
802
|
pageSize: e
|
|
803
803
|
})), L(() => [x.page, x.first], ([e, t]) => {
|
|
804
|
-
let n =
|
|
804
|
+
let n = Wr(e, t, V.value.pageSize);
|
|
805
805
|
n !== void 0 && (V.value = {
|
|
806
806
|
...V.value,
|
|
807
807
|
pageIndex: n
|
|
808
808
|
});
|
|
809
809
|
});
|
|
810
|
-
function
|
|
810
|
+
function Gr(e) {
|
|
811
811
|
let t = (x.data ?? []).indexOf(e);
|
|
812
812
|
return x.getRowId ? x.getRowId(e, t) : t >= 0 ? String(t) : void 0;
|
|
813
813
|
}
|
|
814
|
-
let
|
|
815
|
-
L(() => x.selection, (e) => e && (
|
|
816
|
-
e && (
|
|
814
|
+
let Kr = (e) => e.map(Gr).filter((e) => e !== void 0), qr = D(wn(x.selection ?? (x.selectedRows ? Kr(x.selectedRows) : [])));
|
|
815
|
+
L(() => x.selection, (e) => e && (qr.value = wn(e))), L(() => x.selectedRows, (e) => {
|
|
816
|
+
e && (di(e), qr.value = wn(Kr(e)));
|
|
817
817
|
});
|
|
818
|
-
let
|
|
819
|
-
L(() => x.allSelection, (e) => e !== void 0 && (
|
|
820
|
-
let
|
|
821
|
-
L(() => x.showFilters, (e) => e !== void 0 && (
|
|
818
|
+
let Jr = D(x.allSelection ?? null);
|
|
819
|
+
L(() => x.allSelection, (e) => e !== void 0 && (Jr.value = e));
|
|
820
|
+
let Yr = D(x.showFilters ?? me().showFilters ?? !0), Xr = m(() => x.sortMode ? x.sortMode === "multiple" : !!me().multiSort);
|
|
821
|
+
L(() => x.showFilters, (e) => e !== void 0 && (Yr.value = e));
|
|
822
822
|
let H = D(Ut(x.groupBy));
|
|
823
823
|
L(() => x.groupBy, (e) => H.value = Ut(e));
|
|
824
|
-
let
|
|
825
|
-
L(() => x.expanded, (e) => e && (
|
|
824
|
+
let Zr = D(x.expanded || x.defaultExpanded ? Cn(x.expanded ?? x.defaultExpanded) : H.value.length && !P.expansion ? !0 : {});
|
|
825
|
+
L(() => x.expanded, (e) => e && (Zr.value = Cn(e)));
|
|
826
826
|
let U = D(x.globalFilter ?? "");
|
|
827
827
|
L(() => x.globalFilter, (e) => e !== void 0 && (U.value = e));
|
|
828
|
-
let
|
|
829
|
-
L(() => x.filters, (e) => e && (
|
|
830
|
-
let
|
|
831
|
-
L(() => x.hiddenColumns, (e) => e && (
|
|
832
|
-
let
|
|
833
|
-
L(() => x.columnOrder, (e) => e && (
|
|
834
|
-
let
|
|
835
|
-
start:
|
|
836
|
-
end:
|
|
828
|
+
let Qr = D(_n(x.filters ?? {}));
|
|
829
|
+
L(() => x.filters, (e) => e && (Qr.value = _n(e)));
|
|
830
|
+
let $r = D(Cn(x.hiddenColumns ?? [], !1));
|
|
831
|
+
L(() => x.hiddenColumns, (e) => e && ($r.value = Cn(e, !1)));
|
|
832
|
+
let ei = D(x.columnOrder ?? []);
|
|
833
|
+
L(() => x.columnOrder, (e) => e && (ei.value = e));
|
|
834
|
+
let ti = D(x.pinnedColumns ?? {
|
|
835
|
+
start: Gn.value.filter((e) => e.pinned === "start").map((e) => e.id),
|
|
836
|
+
end: Gn.value.filter((e) => e.pinned === "end").map((e) => e.id)
|
|
837
837
|
});
|
|
838
|
-
L(() => x.pinnedColumns, (e) => e && (
|
|
839
|
-
let
|
|
840
|
-
L(() => x.size, (e) => e && (
|
|
841
|
-
let
|
|
838
|
+
L(() => x.pinnedColumns, (e) => e && (ti.value = e));
|
|
839
|
+
let ni = D({}), ri = D(x.size ?? "md");
|
|
840
|
+
L(() => x.size, (e) => e && (ri.value = e));
|
|
841
|
+
let ii = m(() => ({
|
|
842
842
|
top: [...x.frozenRows ?? []],
|
|
843
843
|
bottom: []
|
|
844
|
-
})), W = (e, t) => x.rowLabel?.(e, t) ?? F.row(t),
|
|
845
|
-
function
|
|
844
|
+
})), W = (e, t) => x.rowLabel?.(e, t) ?? F.row(t), ai = (e, t) => x.expandLabel?.(e, t) ?? F.subRows(W(e, t));
|
|
845
|
+
function oi(e) {
|
|
846
846
|
return e.columns ? {
|
|
847
847
|
id: e.id,
|
|
848
848
|
header: e.header,
|
|
849
|
-
columns: e.columns.map(
|
|
849
|
+
columns: e.columns.map(oi)
|
|
850
850
|
} : {
|
|
851
851
|
id: e.id,
|
|
852
852
|
header: e.header,
|
|
853
|
-
accessorFn: (t) =>
|
|
853
|
+
accessorFn: (t) => Kn(e, t),
|
|
854
854
|
enableSorting: !0,
|
|
855
855
|
sortDescFirst: !1,
|
|
856
856
|
sortUndefined: "last",
|
|
857
857
|
...e.sortFn ? { sortFn: (t, n) => e.sortFn(t.original, n.original) } : {},
|
|
858
858
|
filterFn: (t, n, r) => Lt({
|
|
859
859
|
value: t.getValue(n),
|
|
860
|
-
text:
|
|
860
|
+
text: Yn(e) ? z(e, t.getValue(n), t.original) : "",
|
|
861
861
|
row: t.original,
|
|
862
862
|
type: e.filter,
|
|
863
863
|
locale: l.value.locale,
|
|
864
864
|
filterFn: e.filterFn,
|
|
865
|
-
byValue:
|
|
865
|
+
byValue: Jn(e)
|
|
866
866
|
}, r),
|
|
867
867
|
enableGlobalFilter: !!x.rowKeywords || e.searchable !== !1,
|
|
868
868
|
enableHiding: e.hideable !== !1,
|
|
869
869
|
enableGrouping: !0,
|
|
870
870
|
...e.width ? { size: e.width } : {},
|
|
871
|
-
minSize:
|
|
871
|
+
minSize: Br
|
|
872
872
|
};
|
|
873
873
|
}
|
|
874
|
-
let
|
|
875
|
-
features:
|
|
876
|
-
columns:
|
|
877
|
-
data:
|
|
874
|
+
let si = m(() => Bn.value.map(oi)), G = qn({
|
|
875
|
+
features: Xn,
|
|
876
|
+
columns: si,
|
|
877
|
+
data: zn,
|
|
878
878
|
meta: m(() => ({ locale: l.value.locale })),
|
|
879
|
-
getRowId: (e, t) =>
|
|
879
|
+
getRowId: (e, t) => Mn.value ? e.id : x.getRowId?.(e, t) ?? String(t),
|
|
880
880
|
state: m(() => ({
|
|
881
881
|
sorting: B.value,
|
|
882
882
|
pagination: V.value,
|
|
883
|
-
rowSelection:
|
|
884
|
-
expanded:
|
|
883
|
+
rowSelection: qr.value,
|
|
884
|
+
expanded: Zr.value,
|
|
885
885
|
globalFilter: U.value,
|
|
886
|
-
columnFilters:
|
|
887
|
-
columnVisibility:
|
|
888
|
-
columnOrder:
|
|
889
|
-
columnPinning:
|
|
890
|
-
columnSizing:
|
|
886
|
+
columnFilters: Qr.value,
|
|
887
|
+
columnVisibility: $r.value,
|
|
888
|
+
columnOrder: ei.value,
|
|
889
|
+
columnPinning: ti.value,
|
|
890
|
+
columnSizing: ni.value,
|
|
891
891
|
grouping: H.value,
|
|
892
|
-
rowPinning:
|
|
892
|
+
rowPinning: ii.value
|
|
893
893
|
})),
|
|
894
894
|
getSubRows: x.getSubRows,
|
|
895
895
|
filterFromLeafRows: m(() => x.treeFilterMode === "lenient"),
|
|
896
896
|
getRowCanExpand: (e) => !!P.expansion && (x.rowExpandable?.(e.original) ?? !0) || !!e.subRows?.length,
|
|
897
897
|
autoResetExpanded: m(() => x.reorderableRows || x.cellSelection ? !1 : void 0),
|
|
898
|
-
onExpandedChange: (e) =>
|
|
899
|
-
onSortingChange: (e) =>
|
|
900
|
-
onPaginationChange: (e) =>
|
|
901
|
-
onRowSelectionChange: (e) =>
|
|
898
|
+
onExpandedChange: (e) => gi(Ft(e, Zr.value)),
|
|
899
|
+
onSortingChange: (e) => ci(Ft(e, B.value)),
|
|
900
|
+
onPaginationChange: (e) => li(Ft(e, V.value)),
|
|
901
|
+
onRowSelectionChange: (e) => fi(Ft(e, qr.value)),
|
|
902
902
|
onGlobalFilterChange: (e) => {
|
|
903
903
|
U.value = Ft(e, U.value) ?? "", N("update:globalFilter", U.value);
|
|
904
904
|
},
|
|
905
905
|
onColumnFiltersChange: (e) => {
|
|
906
|
-
|
|
906
|
+
Qr.value = Ft(e, Qr.value), N("update:filters", cn(Qr.value));
|
|
907
907
|
},
|
|
908
908
|
onColumnVisibilityChange: (e) => {
|
|
909
|
-
|
|
909
|
+
$r.value = Ft(e, $r.value), N("update:hiddenColumns", Object.keys($r.value).filter((e) => $r.value[e] === !1));
|
|
910
910
|
},
|
|
911
911
|
onColumnOrderChange: (e) => {
|
|
912
|
-
|
|
912
|
+
ei.value = Ft(e, ei.value), N("update:columnOrder", ei.value);
|
|
913
913
|
},
|
|
914
914
|
onColumnPinningChange: (e) => {
|
|
915
|
-
|
|
916
|
-
start: [...
|
|
917
|
-
end: [...
|
|
915
|
+
ti.value = Ft(e, ti.value), N("update:pinnedColumns", {
|
|
916
|
+
start: [...ti.value.start],
|
|
917
|
+
end: [...ti.value.end]
|
|
918
918
|
});
|
|
919
919
|
},
|
|
920
920
|
onColumnSizingChange: (e) => {
|
|
921
|
-
|
|
921
|
+
ni.value = Ft(e, ni.value);
|
|
922
922
|
},
|
|
923
923
|
onGroupingChange: (e) => {
|
|
924
924
|
H.value = Ft(e, H.value), N("update:groupBy", H.value);
|
|
925
925
|
},
|
|
926
926
|
globalFilterFn: (e, t, n) => {
|
|
927
927
|
let r = R.value.get(t), i = l.value.locale;
|
|
928
|
-
return x.rowKeywords && !
|
|
928
|
+
return x.rowKeywords && !Mn.value && zt(x.rowKeywords(e.original), n, i) ? !0 : r?.searchable !== !1 && Bt([z(r, e.getValue(t), e.original)], n, i);
|
|
929
929
|
},
|
|
930
930
|
getColumnCanGlobalFilter: (e) => !!x.rowKeywords || R.value.get(e.id)?.searchable !== !1,
|
|
931
931
|
enableColumnResizing: m(() => !!x.resizable),
|
|
@@ -934,51 +934,51 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
934
934
|
keepPinnedRows: !0,
|
|
935
935
|
enableRowSelection: (e) => !!x.selectable && !e.getIsGrouped() && (x.isRowSelectable?.(e.original) ?? !0),
|
|
936
936
|
enableMultiRowSelection: m(() => x.selectionMode !== "single"),
|
|
937
|
-
manualSorting:
|
|
938
|
-
manualFiltering:
|
|
939
|
-
manualPagination: m(() =>
|
|
940
|
-
rowCount: m(() =>
|
|
937
|
+
manualSorting: Vn,
|
|
938
|
+
manualFiltering: Vn,
|
|
939
|
+
manualPagination: m(() => Vn.value || !x.pageSize),
|
|
940
|
+
rowCount: m(() => Vn.value ? Hn.value : void 0)
|
|
941
941
|
});
|
|
942
|
-
function si(e) {
|
|
943
|
-
B.value = e, N("update:sorting", Yr.value ? [...e] : e[0] ?? null);
|
|
944
|
-
}
|
|
945
942
|
function ci(e) {
|
|
943
|
+
B.value = e, N("update:sorting", Xr.value ? [...e] : e[0] ?? null);
|
|
944
|
+
}
|
|
945
|
+
function li(e) {
|
|
946
946
|
let t = e.pageSize !== V.value.pageSize;
|
|
947
947
|
V.value = e, t && N("update:pageSize", e.pageSize), N("update:page", e.pageIndex + 1), N("update:first", e.pageIndex * e.pageSize);
|
|
948
948
|
}
|
|
949
|
-
let
|
|
950
|
-
function
|
|
949
|
+
let ui = /* @__PURE__ */ new Map();
|
|
950
|
+
function di(e) {
|
|
951
951
|
for (let t of e) {
|
|
952
|
-
let e =
|
|
953
|
-
e !== void 0 &&
|
|
952
|
+
let e = Gr(t);
|
|
953
|
+
e !== void 0 && ui.set(e, t);
|
|
954
954
|
}
|
|
955
955
|
}
|
|
956
|
-
|
|
957
|
-
function
|
|
958
|
-
|
|
956
|
+
di(x.selectedRows ?? []);
|
|
957
|
+
function fi(e) {
|
|
958
|
+
qr.value = e;
|
|
959
959
|
let t = Object.keys(e).filter((t) => e[t]);
|
|
960
960
|
N("update:selection", t);
|
|
961
961
|
let n = G.getCoreRowModel().rowsById;
|
|
962
|
-
for (let t of [...
|
|
963
|
-
for (let e of t) n[e] &&
|
|
964
|
-
let r = t.flatMap((e) =>
|
|
962
|
+
for (let t of [...ui.keys()]) e[t] || ui.delete(t);
|
|
963
|
+
for (let e of t) n[e] && ui.set(e, n[e].original);
|
|
964
|
+
let r = t.flatMap((e) => ui.has(e) ? [ui.get(e)] : []);
|
|
965
965
|
N("selectedRowsChange", r), N("update:selectedRows", r);
|
|
966
966
|
}
|
|
967
|
-
function fi(e) {
|
|
968
|
-
qr.value = e, N("update:allSelection", e);
|
|
969
|
-
}
|
|
970
967
|
function pi(e) {
|
|
971
|
-
Jr.value = e, N("update:
|
|
968
|
+
Jr.value = e, N("update:allSelection", e);
|
|
972
969
|
}
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
Xr.value = e, N("update:expanded", e === !0 ? [] : Object.keys(e).filter((t) => e[t]));
|
|
970
|
+
function mi(e) {
|
|
971
|
+
Yr.value = e, N("update:showFilters", e);
|
|
976
972
|
}
|
|
973
|
+
let hi = () => mi(!Yr.value);
|
|
977
974
|
function gi(e) {
|
|
978
|
-
|
|
975
|
+
Zr.value = e, N("update:expanded", e === !0 ? [] : Object.keys(e).filter((t) => e[t]));
|
|
976
|
+
}
|
|
977
|
+
function _i(e) {
|
|
978
|
+
ri.value = e, N("update:size", e);
|
|
979
979
|
}
|
|
980
|
-
let
|
|
981
|
-
size:
|
|
980
|
+
let vi = m(() => ({
|
|
981
|
+
size: ri.value,
|
|
982
982
|
gridlines: he("gridlines"),
|
|
983
983
|
bordered: he("bordered"),
|
|
984
984
|
paginatorAlign: Jt(x.paginatorAlign),
|
|
@@ -988,62 +988,62 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
988
988
|
wrapHeaders: he("wrapHeaders"),
|
|
989
989
|
verticalHeaders: he("verticalHeaders"),
|
|
990
990
|
footerTop: x.footerPosition === "top"
|
|
991
|
-
})),
|
|
992
|
-
...
|
|
993
|
-
fullscreen:
|
|
991
|
+
})), yi = D(!1), K = m(() => x.navigation === "grid"), bi = m(() => K.value && !!x.getSubRows), xi = m(() => !!x.search && (x.searchAlign ? x.searchAlign === "center" : !!me().searchCentered)), q = m(() => fe({
|
|
992
|
+
...vi.value,
|
|
993
|
+
fullscreen: yi.value,
|
|
994
994
|
grid: K.value,
|
|
995
|
-
searchCentered:
|
|
996
|
-
})),
|
|
995
|
+
searchCentered: xi.value
|
|
996
|
+
})), Si = De(), Ci = (e) => {
|
|
997
997
|
let t = R.value.get(e);
|
|
998
998
|
return fe({
|
|
999
|
-
...
|
|
999
|
+
...vi.value,
|
|
1000
1000
|
align: t?.align,
|
|
1001
1001
|
hideBelow: t?.hideBelow ? `hide-${t.hideBelow}` : void 0
|
|
1002
1002
|
});
|
|
1003
1003
|
};
|
|
1004
|
-
function
|
|
1004
|
+
function wi(e, t) {
|
|
1005
1005
|
let n = R.value.get(e)?.cellClass;
|
|
1006
1006
|
return typeof n == "function" ? t && !t.getIsGrouped() ? n(t.original) : void 0 : n;
|
|
1007
1007
|
}
|
|
1008
|
-
let
|
|
1008
|
+
let Ti = m(() => Gn.value.some((e) => e.editable)), Ei = (e, t) => typeof e?.editable == "function" ? e.editable(t.original) : !!e?.editable, Di = m(() => x.editMode !== "row"), Oi = m(() => !!x.rowActions || x.editMode === "row" && Ti.value), J = m(() => {
|
|
1009
1009
|
let e = [];
|
|
1010
1010
|
return x.reorderableRows && e.push("drag"), x.selectable && e.push("select"), P.expansion && e.push("expand"), x.rowNumbers && e.push("number"), e;
|
|
1011
|
-
}),
|
|
1012
|
-
function
|
|
1011
|
+
}), ki = m(() => Oi.value ? ["actions"] : []), Y = m(() => G.getVisibleLeafColumns()), Ai = m(() => Y.value.length + J.value.length + ki.value.length), ji = (e) => !ki.value.length && Y.value.at(-1)?.id === e, Mi = m(() => !!x.resizable || Gn.value.some((e) => e.width) || ti.value.start.length > 0 || ti.value.end.length > 0), Ni = m(() => ti.value.start.length > 0), Pi = m(() => ti.value.end.length > 0), Fi = m(() => J.value.reduce((e, t) => e + En[t], 0)), Ii = m(() => ki.value.reduce((e, t) => e + En[t], 0));
|
|
1012
|
+
function Li(e, t) {
|
|
1013
1013
|
let n = G.getColumn(e), r = n?.getIsPinned();
|
|
1014
1014
|
if (!n || !r) return "";
|
|
1015
1015
|
let i = r === "start" ? G.getStartVisibleLeafColumns().at(-1)?.id === e && q.value.pinnedStartEdge() : G.getEndVisibleLeafColumns()[0]?.id === e && q.value.pinnedEndEdge();
|
|
1016
1016
|
return [t ? q.value.pinnedHead() : q.value.pinned(), i].filter(Boolean).join(" ");
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1018
|
+
function Ri(e, t) {
|
|
1019
1019
|
let n = G.getColumn(e);
|
|
1020
|
-
if (!n || !
|
|
1020
|
+
if (!n || !Mi.value) return;
|
|
1021
1021
|
let r = n.getIsPinned();
|
|
1022
1022
|
return {
|
|
1023
1023
|
...t ? { width: `${n.getSize()}px` } : {},
|
|
1024
|
-
...r === "start" ? { insetInlineStart: `${
|
|
1025
|
-
...r === "end" ? { insetInlineEnd: `${
|
|
1024
|
+
...r === "start" ? { insetInlineStart: `${Fi.value + n.getStart("start")}px` } : {},
|
|
1025
|
+
...r === "end" ? { insetInlineEnd: `${Ii.value + n.getAfter("end")}px` } : {}
|
|
1026
1026
|
};
|
|
1027
1027
|
}
|
|
1028
|
-
let
|
|
1028
|
+
let zi = (e) => ki.value.includes(e) ? Pi.value : Ni.value;
|
|
1029
1029
|
function X(e, t) {
|
|
1030
|
-
return [e === "select" ? q.value.selectCell() : q.value.utilityCell(),
|
|
1030
|
+
return [e === "select" ? q.value.selectCell() : q.value.utilityCell(), zi(e) ? t ? q.value.pinnedHead() : q.value.pinned() : ""].filter(Boolean).join(" ");
|
|
1031
1031
|
}
|
|
1032
|
-
function
|
|
1033
|
-
if (!
|
|
1034
|
-
let t = { width: `${
|
|
1035
|
-
if (!
|
|
1036
|
-
if (
|
|
1032
|
+
function Bi(e) {
|
|
1033
|
+
if (!Mi.value) return;
|
|
1034
|
+
let t = { width: `${En[e]}px` };
|
|
1035
|
+
if (!zi(e)) return t;
|
|
1036
|
+
if (ki.value.includes(e)) return {
|
|
1037
1037
|
...t,
|
|
1038
1038
|
insetInlineEnd: "0px"
|
|
1039
1039
|
};
|
|
1040
1040
|
let n = J.value.slice(0, J.value.indexOf(e));
|
|
1041
1041
|
return {
|
|
1042
1042
|
...t,
|
|
1043
|
-
insetInlineStart: `${n.reduce((e, t) => e +
|
|
1043
|
+
insetInlineStart: `${n.reduce((e, t) => e + En[t], 0)}px`
|
|
1044
1044
|
};
|
|
1045
1045
|
}
|
|
1046
|
-
let
|
|
1046
|
+
let Vi = m(() => {
|
|
1047
1047
|
let e = G.getHeaderGroups(), t = /* @__PURE__ */ new Map();
|
|
1048
1048
|
e.forEach((e, n) => e.headers.forEach((e) => {
|
|
1049
1049
|
e.isPlaceholder || t.set(e.column.id, n);
|
|
@@ -1062,29 +1062,29 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1062
1062
|
group: o.subHeaders.length > 0
|
|
1063
1063
|
}];
|
|
1064
1064
|
}));
|
|
1065
|
-
}), Z = (e) => R.value.get(e.id)?.header ?? e.id,
|
|
1065
|
+
}), Z = (e) => R.value.get(e.id)?.header ?? e.id, Hi = (e) => R.value.get(e.id)?.headerHidden ? q.value.srOnly() : q.value.headLabel(), Ui = (e) => {
|
|
1066
1066
|
let t = R.value.get(e);
|
|
1067
|
-
return !!t && (t.sortable ?? ((x.sortable ?? !!me().sortable) &&
|
|
1068
|
-
}, Ui = (e) => {
|
|
1069
|
-
let t = Rn.value[0];
|
|
1070
|
-
return !!e.sortFn || e.accessor !== void 0 || !!t && e.id in t;
|
|
1067
|
+
return !!t && (t.sortable ?? ((x.sortable ?? !!me().sortable) && Wi(t)));
|
|
1071
1068
|
}, Wi = (e) => {
|
|
1069
|
+
let t = zn.value[0];
|
|
1070
|
+
return !!e.sortFn || e.accessor !== void 0 || !!t && e.id in t;
|
|
1071
|
+
}, Gi = (e) => {
|
|
1072
1072
|
let t = B.value[0];
|
|
1073
|
-
return t?.id === e ? t.desc ? "descending" : "ascending" :
|
|
1074
|
-
},
|
|
1075
|
-
function
|
|
1076
|
-
|
|
1077
|
-
}
|
|
1078
|
-
let
|
|
1079
|
-
|
|
1080
|
-
},
|
|
1081
|
-
function
|
|
1073
|
+
return t?.id === e ? t.desc ? "descending" : "ascending" : Ui(e) ? "none" : void 0;
|
|
1074
|
+
}, Ki = (e) => B.value.findIndex((t) => t.id === e) + 1;
|
|
1075
|
+
function qi(e, t) {
|
|
1076
|
+
ci(Gt(B.value, e, Xr.value && t.shiftKey));
|
|
1077
|
+
}
|
|
1078
|
+
let Ji = m(() => !!x.columnMenu || !!x.reorderableColumns), Yi = D(""), Xi = (e) => {
|
|
1079
|
+
Yi.value = "", C(() => Yi.value = e);
|
|
1080
|
+
}, Zi = () => G.getAllLeafColumns().map((e) => e.id);
|
|
1081
|
+
function Qi(e) {
|
|
1082
1082
|
return !!x.reorderableColumns && R.value.get(e)?.reorderable !== !1;
|
|
1083
1083
|
}
|
|
1084
|
-
function
|
|
1084
|
+
function $i(e) {
|
|
1085
1085
|
let t = R.value.get(e.id), n = e.getIsSorted(), r = e.getIsPinned(), i = Y.value.map((e) => e.id), a = i.indexOf(e.id);
|
|
1086
1086
|
return [
|
|
1087
|
-
|
|
1087
|
+
Ui(e.id) ? [
|
|
1088
1088
|
{
|
|
1089
1089
|
value: "sort-asc",
|
|
1090
1090
|
label: F.sortAscending,
|
|
@@ -1116,7 +1116,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1116
1116
|
label: F.unpin
|
|
1117
1117
|
}] : []
|
|
1118
1118
|
],
|
|
1119
|
-
|
|
1119
|
+
Qi(e.id) ? [{
|
|
1120
1120
|
value: "move-earlier",
|
|
1121
1121
|
label: F.moveEarlier,
|
|
1122
1122
|
disabled: a <= 0
|
|
@@ -1137,13 +1137,13 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1137
1137
|
}] : []]
|
|
1138
1138
|
].filter((e) => e.length).flatMap((e, t) => t ? [{ type: "separator" }, ...e] : e);
|
|
1139
1139
|
}
|
|
1140
|
-
function
|
|
1141
|
-
let r =
|
|
1140
|
+
function ea(e, t, n) {
|
|
1141
|
+
let r = Zi().filter((t) => t !== e);
|
|
1142
1142
|
r.splice(r.indexOf(t) + +!!n, 0, e), G.setColumnOrder(r);
|
|
1143
1143
|
let i = Y.value.map((e) => e.id).filter((t) => t !== e);
|
|
1144
|
-
i.splice(i.indexOf(t) + +!!n, 0, e),
|
|
1144
|
+
i.splice(i.indexOf(t) + +!!n, 0, e), Xi(F.columnMoved(R.value.get(e)?.header ?? e, i.indexOf(e) + 1, i.length));
|
|
1145
1145
|
}
|
|
1146
|
-
async function
|
|
1146
|
+
async function ta(e, t) {
|
|
1147
1147
|
let n = Y.value.map((e) => e.id), r = n.indexOf(e.id);
|
|
1148
1148
|
switch (t) {
|
|
1149
1149
|
case "sort-asc":
|
|
@@ -1152,11 +1152,11 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1152
1152
|
id: e.id,
|
|
1153
1153
|
desc: t === "sort-desc"
|
|
1154
1154
|
};
|
|
1155
|
-
|
|
1155
|
+
Xr.value ? Ki(e.id) ? ci(B.value.map((t) => t.id === e.id ? n : t)) : ci([...B.value, n]) : ci([n]);
|
|
1156
1156
|
break;
|
|
1157
1157
|
}
|
|
1158
1158
|
case "sort-clear":
|
|
1159
|
-
|
|
1159
|
+
ci(B.value.filter((t) => t.id !== e.id));
|
|
1160
1160
|
break;
|
|
1161
1161
|
case "pin-start":
|
|
1162
1162
|
case "pin-end":
|
|
@@ -1164,10 +1164,10 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1164
1164
|
e.pin(t === "unpin" ? !1 : t === "pin-start" ? "start" : "end");
|
|
1165
1165
|
break;
|
|
1166
1166
|
case "move-earlier":
|
|
1167
|
-
|
|
1167
|
+
ea(e.id, n[r - 1], !1);
|
|
1168
1168
|
break;
|
|
1169
1169
|
case "move-later":
|
|
1170
|
-
|
|
1170
|
+
ea(e.id, n[r + 1], !0);
|
|
1171
1171
|
break;
|
|
1172
1172
|
case "group":
|
|
1173
1173
|
G.setGrouping([...H.value, e.id]);
|
|
@@ -1177,108 +1177,108 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1177
1177
|
break;
|
|
1178
1178
|
case "hide": {
|
|
1179
1179
|
e.toggleVisibility(!1), await C();
|
|
1180
|
-
let t =
|
|
1180
|
+
let t = Wo.value?.querySelectorAll("[data-column-menu]");
|
|
1181
1181
|
t?.[Math.min(r, t.length - 1)]?.focus();
|
|
1182
1182
|
return;
|
|
1183
1183
|
}
|
|
1184
1184
|
}
|
|
1185
|
-
await C(),
|
|
1186
|
-
}
|
|
1187
|
-
let ta = D(null), na = D(null);
|
|
1188
|
-
function ra(e, t) {
|
|
1189
|
-
ta.value = e, t.dataTransfer?.setData("text/plain", e), t.dataTransfer && (t.dataTransfer.effectAllowed = "move");
|
|
1185
|
+
await C(), Wo.value?.querySelector(`[data-column-menu="${e.id}"]`)?.focus();
|
|
1190
1186
|
}
|
|
1187
|
+
let na = D(null), ra = D(null);
|
|
1191
1188
|
function ia(e, t) {
|
|
1192
|
-
|
|
1189
|
+
na.value = e, t.dataTransfer?.setData("text/plain", e), t.dataTransfer && (t.dataTransfer.effectAllowed = "move");
|
|
1190
|
+
}
|
|
1191
|
+
function aa(e, t) {
|
|
1192
|
+
if (!na.value || na.value === e || !Qi(e)) return;
|
|
1193
1193
|
t.preventDefault();
|
|
1194
1194
|
let n = t.currentTarget, r = n.getBoundingClientRect(), i = getComputedStyle(n).direction === "rtl", a = t.clientX > r.left + r.width / 2;
|
|
1195
|
-
|
|
1195
|
+
ra.value = {
|
|
1196
1196
|
id: e,
|
|
1197
1197
|
after: i ? !a : a
|
|
1198
1198
|
};
|
|
1199
1199
|
}
|
|
1200
|
-
function
|
|
1201
|
-
e.preventDefault(),
|
|
1200
|
+
function oa(e) {
|
|
1201
|
+
e.preventDefault(), na.value && ra.value && ea(na.value, ra.value.id, ra.value.after), sa();
|
|
1202
1202
|
}
|
|
1203
|
-
function
|
|
1204
|
-
|
|
1203
|
+
function sa() {
|
|
1204
|
+
na.value = null, ra.value = null;
|
|
1205
1205
|
}
|
|
1206
|
-
let
|
|
1207
|
-
function
|
|
1206
|
+
let ca = (e) => ra.value?.id === e ? ra.value.after ? "after" : "before" : void 0;
|
|
1207
|
+
function la(e, t) {
|
|
1208
1208
|
let n = t.currentTarget.closest("th"), r = n?.closest("table");
|
|
1209
1209
|
if (!n || !r) return;
|
|
1210
|
-
let i = R.value.get(e), a =
|
|
1210
|
+
let i = R.value.get(e), a = Nc.value && i ? G.getRowModel().rows.map((t) => z(i, t.getValue(e), t.original)) : void 0, o = xt(r, n, a);
|
|
1211
1211
|
o && G.setColumnSizing((t) => ({
|
|
1212
1212
|
...t,
|
|
1213
|
-
[e]: Math.min(1200, Math.max(
|
|
1213
|
+
[e]: Math.min(1200, Math.max(Br, o))
|
|
1214
1214
|
}));
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1217
|
-
if (t.key === "Enter") return t.preventDefault(),
|
|
1218
|
-
let n = Dt(t.key, t.currentTarget) *
|
|
1216
|
+
function ua(e, t) {
|
|
1217
|
+
if (t.key === "Enter") return t.preventDefault(), la(e, t);
|
|
1218
|
+
let n = Dt(t.key, t.currentTarget) * Vr;
|
|
1219
1219
|
if (!n) return;
|
|
1220
1220
|
t.preventDefault();
|
|
1221
1221
|
let r = G.getColumn(e);
|
|
1222
1222
|
G.setColumnSizing((t) => ({
|
|
1223
1223
|
...t,
|
|
1224
|
-
[e]: Math.max(
|
|
1224
|
+
[e]: Math.max(Br, r.getSize() + n)
|
|
1225
1225
|
}));
|
|
1226
1226
|
}
|
|
1227
|
-
let
|
|
1228
|
-
function ga(e) {
|
|
1229
|
-
return e.filterOptions ?? [...new Set(Rn.value.map((t) => z(e, Gn(e, t), t)))].filter(Boolean).sort();
|
|
1230
|
-
}
|
|
1227
|
+
let da = (e) => !!P[`filter-${e}`], fa = (e) => !!e && (!!e.filter || da(e.id)), pa = m(() => x.filterDisplay === "row" && Yr.value && Gn.value.some((e) => fa(e))), ma = m(() => x.filterDisplay === "menu" && Yr.value), ha = m(() => !!U.value || Qr.value.length > 0 || In.value), ga = (e) => Qr.value.find((t) => t.id === e)?.value;
|
|
1231
1228
|
function _a(e) {
|
|
1232
|
-
|
|
1229
|
+
return e.filterOptions ?? [...new Set(zn.value.map((t) => z(e, Kn(e, t), t)))].filter(Boolean).sort();
|
|
1230
|
+
}
|
|
1231
|
+
function va(e) {
|
|
1232
|
+
let t = ga(e.id);
|
|
1233
1233
|
return t === void 0 ? e.filter === "multiSelect" ? [] : null : typeof t == "string" ? t : t.constraints[0]?.value ?? null;
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1235
|
+
function ya(e, t) {
|
|
1236
1236
|
G.getColumn(e)?.setFilterValue(t !== void 0 && kt(t) ? t : void 0);
|
|
1237
1237
|
}
|
|
1238
|
-
let
|
|
1239
|
-
function
|
|
1238
|
+
let ba = (e) => e.filterMatchMode ?? (Jn(e) && e.filter === "multiSelect" ? "in" : mt[e.filter ?? "text"][0]), xa = (e) => Pt(ba(e))?.input ?? e.filter ?? "text";
|
|
1239
|
+
function Sa(e, t) {
|
|
1240
1240
|
let n = e.filter ?? "text";
|
|
1241
|
-
if ((n === "text" || n === "select") && !e.filterMatchMode && !
|
|
1242
|
-
|
|
1241
|
+
if ((n === "text" || n === "select") && !e.filterMatchMode && !Jn(e) && !da(e.id)) return ya(e.id, It(t));
|
|
1242
|
+
ya(e.id, {
|
|
1243
1243
|
operator: "and",
|
|
1244
1244
|
constraints: [{
|
|
1245
|
-
matchMode:
|
|
1245
|
+
matchMode: ba(e),
|
|
1246
1246
|
value: t
|
|
1247
1247
|
}]
|
|
1248
1248
|
});
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1251
|
-
let r =
|
|
1252
|
-
i[t] = n,
|
|
1250
|
+
function Ca(e, t, n) {
|
|
1251
|
+
let r = va(e), i = Array.isArray(r) ? [...r] : [null, null];
|
|
1252
|
+
i[t] = n, Sa(e, i);
|
|
1253
1253
|
}
|
|
1254
|
-
let
|
|
1255
|
-
let n =
|
|
1254
|
+
let wa = (e) => !!vt.dateRangeInput && ["date", "datetime"].includes(xa(e)), Ta = (e, t) => {
|
|
1255
|
+
let n = va(e);
|
|
1256
1256
|
return Array.isArray(n) ? n[t] : null;
|
|
1257
|
-
},
|
|
1258
|
-
function
|
|
1259
|
-
|
|
1257
|
+
}, Ea = m(() => x.selectionMode !== "single"), Da = m(() => x.selectAllMode === "all" && Vn.value), Oa = (e) => Da.value && Jr.value ? e.getCanSelect() && !Jr.value.except.includes(e.id) : e.getIsSelected(), ka = m(() => Da.value ? Jr.value ? !Jr.value.except.length || "indeterminate" : Dc.value ? "indeterminate" : !1 : G.getIsAllPageRowsSelected() ? !0 : G.getIsSomePageRowsSelected() ? "indeterminate" : !1);
|
|
1258
|
+
function Aa(e) {
|
|
1259
|
+
Da.value ? (fi({}), pi(Jr.value || !e ? null : {
|
|
1260
1260
|
mode: "all",
|
|
1261
1261
|
except: []
|
|
1262
1262
|
})) : x.selectAllMode === "all" ? G.toggleAllRowsSelected(e) : G.toggleAllPageRowsSelected(e);
|
|
1263
1263
|
}
|
|
1264
|
-
let
|
|
1265
|
-
function
|
|
1266
|
-
if (
|
|
1267
|
-
let r = new Set(
|
|
1268
|
-
for (let i of n &&
|
|
1269
|
-
|
|
1264
|
+
let ja = `${ft}-select`, Ma = null, Na = !1, Pa = () => G.getRowModel().rows.filter((e) => e.getCanSelect()).map((e) => e.id);
|
|
1265
|
+
function Fa(e, t, n = !1) {
|
|
1266
|
+
if (Da.value && Jr.value) {
|
|
1267
|
+
let r = new Set(Jr.value.except);
|
|
1268
|
+
for (let i of n && Ma ? Et(Pa(), Ma, e.id) : [e.id]) t ? r.delete(i) : r.add(i);
|
|
1269
|
+
pi({
|
|
1270
1270
|
mode: "all",
|
|
1271
1271
|
except: [...r]
|
|
1272
1272
|
});
|
|
1273
|
-
} else
|
|
1274
|
-
|
|
1273
|
+
} else Ea.value ? fi(Tn(qr.value, n && Ma ? Et(Pa(), Ma, e.id) : [e.id], t)) : fi(t ? wn([e.id]) : {});
|
|
1274
|
+
Ma = e.id;
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1277
|
-
|
|
1276
|
+
function Ia(e) {
|
|
1277
|
+
Na = e.shiftKey;
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1279
|
+
function La(e, t) {
|
|
1280
1280
|
let n = t.target, r = !!n.closest("[data-row-link]");
|
|
1281
|
-
if (!r && n.closest(
|
|
1281
|
+
if (!r && n.closest(Ur)) return;
|
|
1282
1282
|
let i = x.rowHref?.(e.original);
|
|
1283
1283
|
if (N("rowClick", {
|
|
1284
1284
|
row: e.original,
|
|
@@ -1288,16 +1288,16 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1288
1288
|
}), i) {
|
|
1289
1289
|
if (r || t.defaultPrevented) return;
|
|
1290
1290
|
t.ctrlKey || t.metaKey || t.shiftKey ? window.open(i, "_blank", "noopener") : window.location.assign(i);
|
|
1291
|
-
} else x.selectOnRowClick && e.getCanSelect() &&
|
|
1291
|
+
} else x.selectOnRowClick && e.getCanSelect() && Fa(e, !Ea.value || !Oa(e), Ea.value && t.shiftKey);
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1293
|
+
function Ra(e, t) {
|
|
1294
1294
|
let n = x.rowHref?.(e.original), r = t.target;
|
|
1295
|
-
t.button === 1 && n && !r.closest(
|
|
1295
|
+
t.button === 1 && n && !r.closest(Ur) && window.open(n, "_blank", "noopener");
|
|
1296
1296
|
}
|
|
1297
|
-
let
|
|
1297
|
+
let za = m(() => x.rowHref ? Y.value.find((e) => {
|
|
1298
1298
|
let t = R.value.get(e.id);
|
|
1299
|
-
return !t?.copyable && !(
|
|
1300
|
-
})?.id : void 0),
|
|
1299
|
+
return !t?.copyable && !(Di.value && t?.editable);
|
|
1300
|
+
})?.id : void 0), Ba = (e, t) => t === za.value ? x.rowHref?.(e.original) : void 0, Va = m(() => x.frozenRows?.length ? G.getCenterRows() : G.getRowModel().rows), Ha = m(() => x.frozenRows?.length ? G.getTopRows() : []), Q = m(() => (Un.value ? Dn : Va.value).flatMap((e) => e.getIsGrouped() ? [{
|
|
1301
1301
|
kind: "group",
|
|
1302
1302
|
row: e,
|
|
1303
1303
|
key: e.id
|
|
@@ -1309,75 +1309,75 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1309
1309
|
kind: "expansion",
|
|
1310
1310
|
row: e,
|
|
1311
1311
|
key: `${e.id}:details`
|
|
1312
|
-
}] : []])),
|
|
1312
|
+
}] : []])), Ua = m(() => x.pageSize && !Vn.value ? V.value.pageIndex * V.value.pageSize : 0), Wa = m(() => {
|
|
1313
1313
|
let e = /* @__PURE__ */ new Map();
|
|
1314
|
-
return Q.value.filter((e) => e.kind === "row").forEach((t, n) => e.set(t.row.id,
|
|
1315
|
-
}),
|
|
1316
|
-
function
|
|
1314
|
+
return Q.value.filter((e) => e.kind === "row").forEach((t, n) => e.set(t.row.id, Ua.value + n + 1)), e;
|
|
1315
|
+
}), Ga = (e) => he("striped") ? String(((Wa.value.get(e.id) ?? 0) - Ua.value) % 2 == 0) : void 0, Ka = (e) => `${ft}-details-${e.id}`, qa = m(() => G.getIsAllRowsExpanded()), Ja = m(() => Gn.value.some((e) => e.aggregate)), Ya = m(() => Gn.value.some((e) => e.aggregate || e.footer || P[`footer-${e.id}`]));
|
|
1316
|
+
function Xa(e, t, n) {
|
|
1317
1317
|
return t == null ? "" : e.format && n ? e.format(t, n) : typeof t == "number" ? new Intl.NumberFormat(l.value.locale, { maximumFractionDigits: 2 }).format(t) : It(t);
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function Za(e, t) {
|
|
1320
1320
|
if (!e.aggregate) return "";
|
|
1321
1321
|
let n = t.filter((e) => !e.getIsGrouped());
|
|
1322
|
-
return
|
|
1322
|
+
return Xa(e, tt(n.map((t) => Kn(e, t.original)), e.aggregate), e.aggregate === "count" ? void 0 : n[0]?.original);
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1324
|
+
function Qa(e) {
|
|
1325
1325
|
if (e.footer !== void 0) return e.footer;
|
|
1326
1326
|
if (!e.aggregate) return "";
|
|
1327
|
-
let t =
|
|
1327
|
+
let t = Za(e, G.getFilteredRowModel().flatRows);
|
|
1328
1328
|
return typeof e.aggregate == "string" ? F.aggregates[e.aggregate]?.(t) ?? t : t;
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function $a(e) {
|
|
1331
1331
|
let t = G.getFilteredRowModel().flatRows.filter((e) => !e.getIsGrouped());
|
|
1332
1332
|
return {
|
|
1333
|
-
value: e.aggregate ? tt(t.map((t) =>
|
|
1334
|
-
text:
|
|
1333
|
+
value: e.aggregate ? tt(t.map((t) => Kn(e, t.original)), e.aggregate) : void 0,
|
|
1334
|
+
text: Qa(e),
|
|
1335
1335
|
rows: t.map((e) => e.original)
|
|
1336
1336
|
};
|
|
1337
1337
|
}
|
|
1338
|
-
let
|
|
1339
|
-
function
|
|
1338
|
+
let eo = (e) => typeof x.rowActions == "function" ? x.rowActions(e.original) : x.rowActions ?? [], to = xe(null);
|
|
1339
|
+
function no(e) {
|
|
1340
1340
|
let t = e.target.closest("[data-row-id]");
|
|
1341
|
-
|
|
1341
|
+
to.value = t ? G.getRow(t.dataset.rowId, !0) ?? null : null;
|
|
1342
1342
|
}
|
|
1343
|
-
function
|
|
1343
|
+
function ro(e, t) {
|
|
1344
1344
|
e && N("rowAction", {
|
|
1345
1345
|
value: t,
|
|
1346
1346
|
row: e.original,
|
|
1347
1347
|
rowId: e.id
|
|
1348
1348
|
});
|
|
1349
1349
|
}
|
|
1350
|
-
let
|
|
1350
|
+
let io = (e, { slots: t, emit: n }) => e.enabled ? pe(s, {
|
|
1351
1351
|
items: e.items,
|
|
1352
1352
|
label: e.label,
|
|
1353
1353
|
onSelect: (e) => n("select", e)
|
|
1354
1354
|
}, t) : t.default?.();
|
|
1355
|
-
|
|
1355
|
+
io.props = [
|
|
1356
1356
|
"enabled",
|
|
1357
1357
|
"items",
|
|
1358
1358
|
"label"
|
|
1359
|
-
],
|
|
1360
|
-
let
|
|
1361
|
-
function
|
|
1359
|
+
], io.emits = ["select"];
|
|
1360
|
+
let ao = (e, { slots: t }) => t.default?.();
|
|
1361
|
+
function oo(e) {
|
|
1362
1362
|
try {
|
|
1363
1363
|
return G.getRow(e, !0) ?? void 0;
|
|
1364
1364
|
} catch {
|
|
1365
1365
|
return;
|
|
1366
1366
|
}
|
|
1367
1367
|
}
|
|
1368
|
-
let
|
|
1368
|
+
let so = D(null), co = D(null), lo = D(null), uo = null, fo = m(() => !!x.getSubRows), po = m(() => H.value.length > 0), mo = (e) => H.value.map((t) => jt(e.getValue(t))).join("\0"), ho = (e) => H.value.map((t) => {
|
|
1369
1369
|
let n = R.value.get(t);
|
|
1370
1370
|
return `${n?.header ?? t}: ${z(n, e.getValue(t), e.original)}`;
|
|
1371
|
-
}).join(", "),
|
|
1372
|
-
function
|
|
1371
|
+
}).join(", "), go = () => Q.value.filter((e) => e.kind === "row" && (po.value || e.row.depth === 0)).map((e) => e.row);
|
|
1372
|
+
function _o() {
|
|
1373
1373
|
let e = (t) => t.map((t) => ({
|
|
1374
1374
|
id: t.id,
|
|
1375
1375
|
...x.getSubRows?.(t.original) ? { children: e(t.subRows) } : {}
|
|
1376
1376
|
}));
|
|
1377
1377
|
return e(G.getCoreRowModel().rows);
|
|
1378
1378
|
}
|
|
1379
|
-
function
|
|
1380
|
-
let r = (e, t) => e < t ? t - 1 : t, i = e.index, a = r(i, t.index + +!!n), o =
|
|
1379
|
+
function vo(e, t, n) {
|
|
1380
|
+
let r = (e, t) => e < t ? t - 1 : t, i = e.index, a = r(i, t.index + +!!n), o = po.value && mo(e) !== mo(t);
|
|
1381
1381
|
if (i === a && !o) return;
|
|
1382
1382
|
let s = o ? Object.fromEntries(H.value.map((e) => [e, t.getValue(e)])) : void 0;
|
|
1383
1383
|
N("rowReorder", {
|
|
@@ -1387,12 +1387,12 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1387
1387
|
to: a,
|
|
1388
1388
|
...s ? { group: s } : {}
|
|
1389
1389
|
});
|
|
1390
|
-
let c =
|
|
1391
|
-
|
|
1390
|
+
let c = go().filter((n) => n.id !== e.id && (!po.value || mo(n) === mo(t))).map((e) => e.id), l = c.indexOf(t.id) + +!!n + 1, u = W(e.original, e.index);
|
|
1391
|
+
Xi(o ? F.rowMovedToGroup(u, ho(t), l, c.length + 1) : F.rowMoved(u, l, c.length + 1));
|
|
1392
1392
|
}
|
|
1393
|
-
function
|
|
1393
|
+
function yo(e, t) {
|
|
1394
1394
|
if (!t) return;
|
|
1395
|
-
let n =
|
|
1395
|
+
let n = _o(), r = t.parentId ? oo(t.parentId) : void 0, i = t.parentId ? Nt(n, t.parentId)?.node.children ?? [] : n;
|
|
1396
1396
|
N("rowReorder", {
|
|
1397
1397
|
row: e.original,
|
|
1398
1398
|
rowId: e.id,
|
|
@@ -1400,89 +1400,89 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1400
1400
|
to: t.index,
|
|
1401
1401
|
parentId: t.parentId,
|
|
1402
1402
|
index: t.index
|
|
1403
|
-
}), r && !r.getIsExpanded() && r.toggleExpanded(!0),
|
|
1403
|
+
}), r && !r.getIsExpanded() && r.toggleExpanded(!0), Xi(F.rowMovedInTree(W(e.original, e.index), r ? W(r.original, r.index) : null, t.index + 1, i.filter((t) => t.id !== e.id).length + 1));
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1406
|
-
if (
|
|
1405
|
+
function bo(e, t) {
|
|
1406
|
+
if (fo.value) {
|
|
1407
1407
|
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;
|
|
1408
1408
|
if (!r) return;
|
|
1409
|
-
t.preventDefault(),
|
|
1409
|
+
t.preventDefault(), uo = e.id, yo(e, xn(_o(), e.id, r));
|
|
1410
1410
|
return;
|
|
1411
1411
|
}
|
|
1412
1412
|
if (t.key !== "ArrowUp" && t.key !== "ArrowDown") return;
|
|
1413
1413
|
t.preventDefault();
|
|
1414
|
-
let n =
|
|
1415
|
-
if (
|
|
1414
|
+
let n = go();
|
|
1415
|
+
if (po.value) {
|
|
1416
1416
|
let r = wt(n.map((e) => ({
|
|
1417
1417
|
id: e.id,
|
|
1418
|
-
group:
|
|
1419
|
-
})), e.id, t.key === "ArrowUp" ? "up" : "down"), i = r &&
|
|
1418
|
+
group: mo(e)
|
|
1419
|
+
})), e.id, t.key === "ArrowUp" ? "up" : "down"), i = r && oo(r.targetId);
|
|
1420
1420
|
if (!r || !i) return;
|
|
1421
|
-
|
|
1421
|
+
uo = e.id, vo(e, i, r.after);
|
|
1422
1422
|
return;
|
|
1423
1423
|
}
|
|
1424
1424
|
let r = n[n.indexOf(e) + (t.key === "ArrowUp" ? -1 : 1)];
|
|
1425
|
-
r && (
|
|
1425
|
+
r && (uo = e.id, vo(e, r, t.key === "ArrowDown"));
|
|
1426
1426
|
}
|
|
1427
|
-
Ee(
|
|
1428
|
-
if (!
|
|
1429
|
-
let e =
|
|
1430
|
-
|
|
1427
|
+
Ee(zn, async () => {
|
|
1428
|
+
if (!uo) return;
|
|
1429
|
+
let e = uo;
|
|
1430
|
+
uo = null, await C(), Wo.value?.querySelector(`[data-drag-handle="${CSS.escape(e)}"]`)?.focus();
|
|
1431
1431
|
});
|
|
1432
|
-
function bo(e, t) {
|
|
1433
|
-
if (so.value !== e.id) return t.preventDefault();
|
|
1434
|
-
oo.value = e.id, t.dataTransfer?.setData("text/plain", e.id), t.dataTransfer && (t.dataTransfer.effectAllowed = "move");
|
|
1435
|
-
}
|
|
1436
1432
|
function xo(e, t) {
|
|
1437
|
-
if (
|
|
1433
|
+
if (co.value !== e.id) return t.preventDefault();
|
|
1434
|
+
so.value = e.id, t.dataTransfer?.setData("text/plain", e.id), t.dataTransfer && (t.dataTransfer.effectAllowed = "move");
|
|
1435
|
+
}
|
|
1436
|
+
function So(e, t) {
|
|
1437
|
+
if (!so.value || so.value === e.id) return;
|
|
1438
1438
|
let n = t.currentTarget.getBoundingClientRect(), r = (t.clientY - n.top) / n.height;
|
|
1439
|
-
if (
|
|
1439
|
+
if (fo.value) {
|
|
1440
1440
|
let n = x.getSubRows?.(e.original) ? r < .25 ? "before" : r > .75 ? "after" : "inside" : r < .5 ? "before" : "after";
|
|
1441
|
-
if (!
|
|
1442
|
-
|
|
1441
|
+
if (!yn(_o(), so.value, e.id, n)) {
|
|
1442
|
+
lo.value = null;
|
|
1443
1443
|
return;
|
|
1444
1444
|
}
|
|
1445
|
-
t.preventDefault(),
|
|
1445
|
+
t.preventDefault(), lo.value = {
|
|
1446
1446
|
id: e.id,
|
|
1447
1447
|
position: n
|
|
1448
1448
|
};
|
|
1449
|
-
} else t.preventDefault(),
|
|
1449
|
+
} else t.preventDefault(), lo.value = {
|
|
1450
1450
|
id: e.id,
|
|
1451
1451
|
position: r > .5 ? "after" : "before"
|
|
1452
1452
|
};
|
|
1453
1453
|
}
|
|
1454
|
-
function
|
|
1455
|
-
|
|
1454
|
+
function Co(e, t) {
|
|
1455
|
+
so.value && (t.preventDefault(), lo.value = {
|
|
1456
1456
|
id: e.id,
|
|
1457
1457
|
position: "inside"
|
|
1458
1458
|
});
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1460
|
+
function wo(e) {
|
|
1461
1461
|
e.preventDefault();
|
|
1462
|
-
let t =
|
|
1462
|
+
let t = so.value ? oo(so.value) : void 0, n = lo.value ? oo(lo.value.id) : void 0, r = lo.value?.position;
|
|
1463
1463
|
if (t && n && r) {
|
|
1464
|
-
if (
|
|
1464
|
+
if (fo.value) yo(t, yn(_o(), t.id, n.id, r));
|
|
1465
1465
|
else if (n.getIsGrouped()) {
|
|
1466
1466
|
let e = n.getLeafRows().filter((e) => !e.getIsGrouped() && e.id !== t.id).at(-1);
|
|
1467
|
-
e &&
|
|
1468
|
-
} else
|
|
1467
|
+
e && vo(t, e, !0);
|
|
1468
|
+
} else vo(t, n, r === "after");
|
|
1469
1469
|
}
|
|
1470
|
-
|
|
1470
|
+
To();
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1473
|
-
|
|
1472
|
+
function To() {
|
|
1473
|
+
so.value = null, lo.value = null, co.value = null;
|
|
1474
1474
|
}
|
|
1475
|
-
let
|
|
1475
|
+
let Eo = (e) => lo.value?.id === e ? lo.value.position : void 0, Do = xe({});
|
|
1476
1476
|
function $(e, t) {
|
|
1477
|
-
let n = Qt(
|
|
1477
|
+
let n = Qt(Do.value, e.id, t);
|
|
1478
1478
|
return n ? n.value : e.getValue(t);
|
|
1479
1479
|
}
|
|
1480
|
-
let
|
|
1481
|
-
function
|
|
1480
|
+
let Oo = m(() => !!x.cellSelection || x.editMode === "batch"), ko = new et(), Ao = D(0), jo = m(() => Ao.value >= 0 && ko.canUndo), Mo = m(() => Ao.value >= 0 && ko.canRedo);
|
|
1481
|
+
function No(e, t = !0, n = !1) {
|
|
1482
1482
|
if (e.length) {
|
|
1483
|
-
if (x.editMode === "batch")
|
|
1483
|
+
if (x.editMode === "batch") Do.value = nt(Do.value, e, n);
|
|
1484
1484
|
else for (let t of n ? [...e].reverse() : e) {
|
|
1485
|
-
let e =
|
|
1485
|
+
let e = oo(t.rowId);
|
|
1486
1486
|
e && N("cellEdit", {
|
|
1487
1487
|
row: e.original,
|
|
1488
1488
|
rowId: e.id,
|
|
@@ -1491,9 +1491,9 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1491
1491
|
});
|
|
1492
1492
|
}
|
|
1493
1493
|
if (x.editMode === "row") for (let { rowId: t, values: r } of it(e, n)) {
|
|
1494
|
-
let e =
|
|
1494
|
+
let e = oo(t);
|
|
1495
1495
|
if (!e) continue;
|
|
1496
|
-
let n =
|
|
1496
|
+
let n = Gn.value.filter((e) => e.editable).map((t) => [t.id, $(e, t.id)]);
|
|
1497
1497
|
N("rowEdit", {
|
|
1498
1498
|
row: e.original,
|
|
1499
1499
|
rowId: t,
|
|
@@ -1503,29 +1503,29 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1503
1503
|
}
|
|
1504
1504
|
});
|
|
1505
1505
|
}
|
|
1506
|
-
t &&
|
|
1506
|
+
t && Oo.value && (ko.push(e), Ao.value++);
|
|
1507
1507
|
}
|
|
1508
1508
|
}
|
|
1509
|
-
function No() {
|
|
1510
|
-
let e = Oo.undo();
|
|
1511
|
-
e && (Mo(e, !1, !0), ko.value++, Yi(F.undone(e.length)));
|
|
1512
|
-
}
|
|
1513
1509
|
function Po() {
|
|
1514
|
-
let e =
|
|
1515
|
-
e && (
|
|
1510
|
+
let e = ko.undo();
|
|
1511
|
+
e && (No(e, !1, !0), Ao.value++, Xi(F.undone(e.length)));
|
|
1512
|
+
}
|
|
1513
|
+
function Fo() {
|
|
1514
|
+
let e = ko.redo();
|
|
1515
|
+
e && (No(e, !1), Ao.value++, Xi(F.redone(e.length)));
|
|
1516
1516
|
}
|
|
1517
|
-
let
|
|
1518
|
-
async function
|
|
1517
|
+
let Io = m(() => Object.keys(Do.value).length);
|
|
1518
|
+
async function Lo() {
|
|
1519
1519
|
await C();
|
|
1520
|
-
let e =
|
|
1520
|
+
let e = Gc.value;
|
|
1521
1521
|
(e?.querySelector("[tabindex=\"0\"]") ?? e)?.focus();
|
|
1522
1522
|
}
|
|
1523
|
-
function
|
|
1524
|
-
let e = Object.values(
|
|
1523
|
+
function Ro() {
|
|
1524
|
+
let e = Object.values(Do.value);
|
|
1525
1525
|
if (!e.length) return;
|
|
1526
1526
|
let t = [], n = /* @__PURE__ */ new Map();
|
|
1527
1527
|
for (let r of e) {
|
|
1528
|
-
let e =
|
|
1528
|
+
let e = oo(r.rowId);
|
|
1529
1529
|
if (!e) continue;
|
|
1530
1530
|
t.push({
|
|
1531
1531
|
row: e.original,
|
|
@@ -1544,126 +1544,126 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1544
1544
|
N("save", {
|
|
1545
1545
|
changes: t,
|
|
1546
1546
|
rows: [...n.values()]
|
|
1547
|
-
}),
|
|
1547
|
+
}), Do.value = {}, ko.clear(), Ao.value++, Xi(F.changesSaved(t.length)), Lo();
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1550
|
-
Object.keys(
|
|
1549
|
+
function zo() {
|
|
1550
|
+
Object.keys(Do.value).length && (Do.value = {}, ko.clear(), Ao.value++, Xi(F.changesDiscarded), Lo());
|
|
1551
1551
|
}
|
|
1552
|
-
let
|
|
1552
|
+
let Bo = D(null), Vo = D(null), Ho = D({}), Uo = D({}), Wo = Te("root"), Go = (e) => e.editor ?? "text", Ko = (e, t) => `${e}:${t}`, qo = (e, t) => `${ft}-error-${e}-${t}`, Jo = () => Q.value.filter((e) => e.kind === "row").flatMap((e) => Y.value.filter((t) => Ei(R.value.get(t.id), e.row)).map((t) => ({
|
|
1553
1553
|
rowId: e.row.id,
|
|
1554
1554
|
columnId: t.id
|
|
1555
1555
|
})));
|
|
1556
|
-
function
|
|
1557
|
-
let t =
|
|
1556
|
+
function Yo(e) {
|
|
1557
|
+
let t = Wo.value?.querySelector(e);
|
|
1558
1558
|
(K.value ? t?.closest("td") ?? t : t)?.focus();
|
|
1559
1559
|
}
|
|
1560
|
-
async function
|
|
1561
|
-
await C(),
|
|
1560
|
+
async function Xo() {
|
|
1561
|
+
await C(), Wo.value?.querySelector("[data-editor] :is(input, button, [role=combobox], [tabindex=\"0\"])")?.focus();
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1564
|
-
(x.editTrigger !== "dblclick" || n.detail !== 1) &&
|
|
1563
|
+
function Zo(e, t, n) {
|
|
1564
|
+
(x.editTrigger !== "dblclick" || n.detail !== 1) && Qo(e, t);
|
|
1565
1565
|
}
|
|
1566
|
-
function
|
|
1567
|
-
|
|
1566
|
+
function Qo(e, t) {
|
|
1567
|
+
Bo.value = {
|
|
1568
1568
|
rowId: e.id,
|
|
1569
1569
|
columnId: t
|
|
1570
|
-
},
|
|
1570
|
+
}, Ho.value = { [t]: $(e, t) }, Uo.value = {}, Xo();
|
|
1571
1571
|
}
|
|
1572
|
-
let
|
|
1573
|
-
function
|
|
1574
|
-
let n = ot(t.map((t) => [t, () => R.value.get(t)?.validate?.(
|
|
1575
|
-
return n instanceof Promise ? (
|
|
1572
|
+
let $o = D(!1);
|
|
1573
|
+
function es(e, t) {
|
|
1574
|
+
let n = ot(t.map((t) => [t, () => R.value.get(t)?.validate?.(Ho.value[t], e.original)])), r = (e) => (Uo.value = e, Object.keys(e).length === 0);
|
|
1575
|
+
return n instanceof Promise ? ($o.value = !0, n.then(r).finally(() => $o.value = !1)) : r(n);
|
|
1576
1576
|
}
|
|
1577
|
-
function
|
|
1578
|
-
if (!
|
|
1579
|
-
let r =
|
|
1577
|
+
function ts(e, t, n) {
|
|
1578
|
+
if (!Bo.value || $o.value) return;
|
|
1579
|
+
let r = es(e, [t]);
|
|
1580
1580
|
return r instanceof Promise ? r.then((r) => {
|
|
1581
|
-
if (
|
|
1582
|
-
}) : r ?
|
|
1581
|
+
if (Bo.value?.rowId === e.id && Bo.value.columnId === t) return r ? ns(e, t, n) : Xo();
|
|
1582
|
+
}) : r ? ns(e, t, n) : Xo();
|
|
1583
1583
|
}
|
|
1584
|
-
async function
|
|
1585
|
-
let r =
|
|
1586
|
-
|
|
1584
|
+
async function ns(e, t, n) {
|
|
1585
|
+
let r = Ho.value[t];
|
|
1586
|
+
Bo.value = null;
|
|
1587
1587
|
let i = $(e, t);
|
|
1588
|
-
if ((x.editMode === "batch" ? !un(r, i) : r !== e.getValue(t)) &&
|
|
1588
|
+
if ((x.editMode === "batch" ? !un(r, i) : r !== e.getValue(t)) && No([{
|
|
1589
1589
|
rowId: e.id,
|
|
1590
1590
|
columnId: t,
|
|
1591
1591
|
before: i,
|
|
1592
1592
|
after: r
|
|
1593
1593
|
}]), n) {
|
|
1594
|
-
let r =
|
|
1595
|
-
if (i && a) return
|
|
1594
|
+
let r = Jo(), i = r[r.findIndex((n) => n.rowId === e.id && n.columnId === t) + n], a = i && G.getRow(i.rowId, !0);
|
|
1595
|
+
if (i && a) return Qo(a, i.columnId);
|
|
1596
1596
|
}
|
|
1597
|
-
await C(),
|
|
1598
|
-
}
|
|
1599
|
-
async function ns(e, t) {
|
|
1600
|
-
zo.value = null, Ho.value = {}, await C(), Jo(`[data-edit="${CSS.escape(Go(e.id, t))}"]`);
|
|
1597
|
+
await C(), Yo(`[data-edit="${CSS.escape(Ko(e.id, t))}"]`);
|
|
1601
1598
|
}
|
|
1602
|
-
function rs(e, t
|
|
1603
|
-
|
|
1599
|
+
async function rs(e, t) {
|
|
1600
|
+
Bo.value = null, Uo.value = {}, await C(), Yo(`[data-edit="${CSS.escape(Ko(e.id, t))}"]`);
|
|
1604
1601
|
}
|
|
1605
1602
|
function is(e, t, n) {
|
|
1603
|
+
n.defaultPrevented || (n.key === "Escape" ? (n.preventDefault(), rs(e, t)) : n.key === "Enter" && (n.target.matches("textarea") ? n.ctrlKey || n.metaKey : !n.target.matches("button, [role=combobox]")) ? (n.preventDefault(), ts(e, t)) : n.key === "Tab" && (n.preventDefault(), ts(e, t, n.shiftKey ? -1 : 1)));
|
|
1604
|
+
}
|
|
1605
|
+
function as(e, t, n) {
|
|
1606
1606
|
let r = n.relatedTarget, i = n.currentTarget;
|
|
1607
|
-
r && (i.contains(r) || !
|
|
1607
|
+
r && (i.contains(r) || !Wo.value?.contains(r) && r.closest("[data-scope]")) || ts(e, t);
|
|
1608
1608
|
}
|
|
1609
|
-
let
|
|
1609
|
+
let os = /* @__PURE__ */ new Set([
|
|
1610
1610
|
"select",
|
|
1611
1611
|
"date",
|
|
1612
1612
|
"checkbox"
|
|
1613
|
-
]),
|
|
1614
|
-
function
|
|
1615
|
-
|
|
1616
|
-
...
|
|
1613
|
+
]), ss = (e) => !!e && Go(e) === "select" && e.editInputProps?.commit === "confirm";
|
|
1614
|
+
function cs(e, t, n) {
|
|
1615
|
+
Ho.value = {
|
|
1616
|
+
...Ho.value,
|
|
1617
1617
|
[t.id]: n
|
|
1618
|
-
},
|
|
1618
|
+
}, Di.value && os.has(Go(t)) && !ss(t) && !P[`editor-${t.id}`] && ts(e, t.id);
|
|
1619
1619
|
}
|
|
1620
|
-
function
|
|
1621
|
-
n.key === "Enter" &&
|
|
1620
|
+
function ls(e, t, n) {
|
|
1621
|
+
n.key === "Enter" && Di.value && ss(R.value.get(t)) && n.target.matches("[role=combobox][aria-expanded=false]") && (n.preventDefault(), n.stopPropagation(), ts(e, t));
|
|
1622
1622
|
}
|
|
1623
|
-
function
|
|
1623
|
+
function us(e, t) {
|
|
1624
1624
|
return {
|
|
1625
|
-
value:
|
|
1626
|
-
setValue: (e) =>
|
|
1627
|
-
...
|
|
1625
|
+
value: Ho.value[t.id],
|
|
1626
|
+
setValue: (e) => Ho.value = {
|
|
1627
|
+
...Ho.value,
|
|
1628
1628
|
[t.id]: e
|
|
1629
1629
|
},
|
|
1630
1630
|
row: e.original,
|
|
1631
|
-
commit: () => void (
|
|
1632
|
-
cancel: () => void (
|
|
1633
|
-
invalid: !!
|
|
1631
|
+
commit: () => void (Di.value ? ts(e, t.id) : fs(e, !0)),
|
|
1632
|
+
cancel: () => void (Di.value ? rs(e, t.id) : fs(e, !1)),
|
|
1633
|
+
invalid: !!Uo.value[t.id]
|
|
1634
1634
|
};
|
|
1635
1635
|
}
|
|
1636
|
-
function
|
|
1637
|
-
|
|
1636
|
+
function ds(e) {
|
|
1637
|
+
Vo.value = e.id, Uo.value = {}, Ho.value = Object.fromEntries(Gn.value.filter((t) => Ei(t, e)).map((t) => [t.id, e.getValue(t.id)])), Xo();
|
|
1638
1638
|
}
|
|
1639
|
-
async function
|
|
1640
|
-
if (
|
|
1639
|
+
async function fs(e, t) {
|
|
1640
|
+
if (!$o.value) {
|
|
1641
1641
|
if (t) {
|
|
1642
|
-
if (!await
|
|
1643
|
-
if (
|
|
1642
|
+
if (!await es(e, Gn.value.filter((t) => Ei(t, e)).map((e) => e.id))) return Xo();
|
|
1643
|
+
if (Vo.value !== e.id) return;
|
|
1644
1644
|
N("rowEdit", {
|
|
1645
1645
|
row: e.original,
|
|
1646
1646
|
rowId: e.id,
|
|
1647
|
-
values: { ...
|
|
1647
|
+
values: { ...Ho.value }
|
|
1648
1648
|
});
|
|
1649
1649
|
}
|
|
1650
|
-
|
|
1650
|
+
Vo.value = null, Uo.value = {}, await C(), Yo(`[data-row-edit="${CSS.escape(e.id)}"]`);
|
|
1651
1651
|
}
|
|
1652
1652
|
}
|
|
1653
|
-
function
|
|
1654
|
-
t.defaultPrevented || (t.key === "Escape" ? (t.preventDefault(),
|
|
1653
|
+
function ps(e, t) {
|
|
1654
|
+
t.defaultPrevented || (t.key === "Escape" ? (t.preventDefault(), fs(e, !1)) : t.key === "Enter" && t.target.matches("input") && (t.preventDefault(), fs(e, !0)));
|
|
1655
1655
|
}
|
|
1656
|
-
let
|
|
1657
|
-
function
|
|
1658
|
-
let n =
|
|
1656
|
+
let ms = xe(null), hs = m(() => Q.value.filter((e) => e.kind === "row").map((e) => e.row.id)), gs = m(() => Y.value.map((e) => e.id)), _s = m(() => x.cellSelection ? on(ms.value, hs.value, gs.value) : null), vs = m(() => new Map(hs.value.map((e, t) => [e, t]))), ys = m(() => new Map(gs.value.map((e, t) => [e, t])));
|
|
1657
|
+
function bs(e, t) {
|
|
1658
|
+
let n = _s.value;
|
|
1659
1659
|
if (!n) return !1;
|
|
1660
|
-
let r =
|
|
1660
|
+
let r = vs.value.get(e) ?? -1, i = ys.value.get(t) ?? -1;
|
|
1661
1661
|
return r >= n.top && r <= n.bottom && i >= n.left && i <= n.right;
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1664
|
-
let t = on(e,
|
|
1663
|
+
function xs(e) {
|
|
1664
|
+
let t = on(e, hs.value, gs.value);
|
|
1665
1665
|
if (!t) return null;
|
|
1666
|
-
let n =
|
|
1666
|
+
let n = hs.value.slice(t.top, t.bottom + 1), r = gs.value.slice(t.left, t.right + 1), i = n.flatMap((e) => oo(e) ?? []);
|
|
1667
1667
|
return {
|
|
1668
1668
|
rowIds: n,
|
|
1669
1669
|
columnIds: r,
|
|
@@ -1671,40 +1671,40 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1671
1671
|
values: i.map((e) => r.map((t) => $(e, t)))
|
|
1672
1672
|
};
|
|
1673
1673
|
}
|
|
1674
|
-
function
|
|
1675
|
-
let t =
|
|
1676
|
-
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 || (
|
|
1674
|
+
function Ss(e) {
|
|
1675
|
+
let t = ms.value;
|
|
1676
|
+
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 || (ms.value = e, N("cellSelectionChange", xs(e)));
|
|
1677
1677
|
}
|
|
1678
|
-
let
|
|
1679
|
-
_e(() => window.addEventListener("pointerup",
|
|
1680
|
-
function
|
|
1678
|
+
let Cs = !1, ws = !1, Ts = !1, Es = () => Cs = !1;
|
|
1679
|
+
_e(() => window.addEventListener("pointerup", Es)), ge(() => window.removeEventListener("pointerup", Es));
|
|
1680
|
+
function Ds(e, t, n) {
|
|
1681
1681
|
if (!x.cellSelection || n.button !== 0 || n.target.closest("[data-editor]")) return;
|
|
1682
1682
|
let r = {
|
|
1683
1683
|
rowId: e,
|
|
1684
1684
|
columnId: t
|
|
1685
|
-
}, i =
|
|
1686
|
-
|
|
1685
|
+
}, i = ms.value, a = n.shiftKey && i;
|
|
1686
|
+
Ss(a ? {
|
|
1687
1687
|
anchor: i.anchor,
|
|
1688
1688
|
focus: r
|
|
1689
1689
|
} : {
|
|
1690
1690
|
anchor: r,
|
|
1691
1691
|
focus: r
|
|
1692
|
-
}),
|
|
1692
|
+
}), Cs = !0, Ts = !!a, a && window.getSelection()?.removeAllRanges();
|
|
1693
1693
|
}
|
|
1694
|
-
function
|
|
1695
|
-
|
|
1696
|
-
anchor:
|
|
1694
|
+
function Os(e, t, n) {
|
|
1695
|
+
Cs && ms.value && n.buttons & 1 && (Ss({
|
|
1696
|
+
anchor: ms.value.anchor,
|
|
1697
1697
|
focus: {
|
|
1698
1698
|
rowId: e,
|
|
1699
1699
|
columnId: t
|
|
1700
1700
|
}
|
|
1701
1701
|
}), window.getSelection()?.removeAllRanges());
|
|
1702
1702
|
}
|
|
1703
|
-
function
|
|
1704
|
-
|
|
1703
|
+
function ks(e) {
|
|
1704
|
+
Ts && (Ts = !1, e.preventDefault(), e.stopPropagation());
|
|
1705
1705
|
}
|
|
1706
|
-
let
|
|
1707
|
-
function
|
|
1706
|
+
let As = (e, t) => Gc.value?.querySelector(`tr[data-row-id="${CSS.escape(e)}"] > [data-column-id="${CSS.escape(t)}"]`) ?? null;
|
|
1707
|
+
function js(e) {
|
|
1708
1708
|
let t = e.target, n = e.key;
|
|
1709
1709
|
if (!x.cellSelection || !K.value || !e.shiftKey || e.altKey || ![
|
|
1710
1710
|
"ArrowUp",
|
|
@@ -1716,7 +1716,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1716
1716
|
].includes(n)) return !1;
|
|
1717
1717
|
let r = t.closest("tr")?.dataset.rowId, i = t.dataset.columnId;
|
|
1718
1718
|
if (!r || !i || !t.matches("td")) return !1;
|
|
1719
|
-
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 =
|
|
1719
|
+
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 = ms.value && bs(r, i) ? ms.value : {
|
|
1720
1720
|
anchor: {
|
|
1721
1721
|
rowId: r,
|
|
1722
1722
|
columnId: i
|
|
@@ -1725,62 +1725,62 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1725
1725
|
rowId: r,
|
|
1726
1726
|
columnId: i
|
|
1727
1727
|
}
|
|
1728
|
-
}, c = yt(s,
|
|
1729
|
-
e.preventDefault(),
|
|
1728
|
+
}, c = yt(s, hs.value, gs.value, o, e.ctrlKey || e.metaKey);
|
|
1729
|
+
e.preventDefault(), Ss(c);
|
|
1730
1730
|
let l = () => {
|
|
1731
|
-
let e =
|
|
1732
|
-
return e ? (
|
|
1731
|
+
let e = As(c.focus.rowId, c.focus.columnId);
|
|
1732
|
+
return e ? (ws = !0, e.focus(), ws = !1, e.scrollIntoView?.({
|
|
1733
1733
|
block: "nearest",
|
|
1734
1734
|
inline: "nearest"
|
|
1735
1735
|
}), !0) : !1;
|
|
1736
1736
|
};
|
|
1737
1737
|
return C(() => {
|
|
1738
|
-
!l() &&
|
|
1738
|
+
!l() && Nc.value && (Mc?.value.scrollToIndex(Q.value.findIndex((e) => e.kind === "row" && e.row.id === c.focus.rowId)), requestAnimationFrame(() => requestAnimationFrame(() => void l())));
|
|
1739
1739
|
}), !0;
|
|
1740
1740
|
}
|
|
1741
|
-
let
|
|
1742
|
-
function
|
|
1743
|
-
let e =
|
|
1741
|
+
let Ms = (e, t) => z(R.value.get(t), $(e, t), e.original);
|
|
1742
|
+
function Ns() {
|
|
1743
|
+
let e = xs(ms.value);
|
|
1744
1744
|
if (e) {
|
|
1745
|
-
let t = e.rowIds.flatMap((e) =>
|
|
1745
|
+
let t = e.rowIds.flatMap((e) => oo(e) ?? []);
|
|
1746
1746
|
return {
|
|
1747
|
-
text:
|
|
1747
|
+
text: vn(t.map((t) => e.columnIds.map((e) => Ms(t, e)))),
|
|
1748
1748
|
count: t.length * e.columnIds.length
|
|
1749
1749
|
};
|
|
1750
1750
|
}
|
|
1751
|
-
let t = Q.value.filter((e) => e.kind === "row" &&
|
|
1751
|
+
let t = Q.value.filter((e) => e.kind === "row" && Oa(e.row)).map((e) => e.row);
|
|
1752
1752
|
return t.length ? {
|
|
1753
|
-
text:
|
|
1754
|
-
count: t.length *
|
|
1753
|
+
text: vn(t.map((e) => gs.value.map((t) => Ms(e, t)))),
|
|
1754
|
+
count: t.length * gs.value.length
|
|
1755
1755
|
} : null;
|
|
1756
1756
|
}
|
|
1757
|
-
function
|
|
1757
|
+
function Ps() {
|
|
1758
1758
|
let e = document.activeElement;
|
|
1759
|
-
return !!x.cellSelection && !!e && !!
|
|
1759
|
+
return !!x.cellSelection && !!e && !!Gc.value?.contains(e) && !e.closest(Hr);
|
|
1760
1760
|
}
|
|
1761
|
-
function
|
|
1762
|
-
if (!
|
|
1763
|
-
let t =
|
|
1764
|
-
t && e.clipboardData && (e.clipboardData.setData("text/plain", t.text), e.preventDefault(),
|
|
1761
|
+
function Fs(e) {
|
|
1762
|
+
if (!Ps() || window.getSelection()?.toString()) return;
|
|
1763
|
+
let t = Ns();
|
|
1764
|
+
t && e.clipboardData && (e.clipboardData.setData("text/plain", t.text), e.preventDefault(), Xi(F.cellsCopied(t.count)));
|
|
1765
1765
|
}
|
|
1766
|
-
async function
|
|
1767
|
-
let t = Xt(e), n = on(
|
|
1766
|
+
async function Is(e) {
|
|
1767
|
+
let t = Xt(e), n = on(ms.value, hs.value, gs.value);
|
|
1768
1768
|
if (!t.length || !n) return;
|
|
1769
1769
|
let r = Zt(t, {
|
|
1770
1770
|
row: n.top,
|
|
1771
1771
|
column: n.left
|
|
1772
|
-
},
|
|
1772
|
+
}, hs.value, gs.value, n), i = [], a = [];
|
|
1773
1773
|
for (let e of r) {
|
|
1774
|
-
let t = R.value.get(e.columnId), n =
|
|
1774
|
+
let t = R.value.get(e.columnId), n = oo(e.rowId);
|
|
1775
1775
|
if (!t || !n) continue;
|
|
1776
|
-
if (!
|
|
1776
|
+
if (!Ei(t, n)) {
|
|
1777
1777
|
i.push({
|
|
1778
1778
|
...e,
|
|
1779
1779
|
message: F.pasteErrors.readonly
|
|
1780
1780
|
});
|
|
1781
1781
|
continue;
|
|
1782
1782
|
}
|
|
1783
|
-
let r = Yt(e.text,
|
|
1783
|
+
let r = Yt(e.text, Go(t), {
|
|
1784
1784
|
locale: l.value.locale,
|
|
1785
1785
|
choices: t.editOptions
|
|
1786
1786
|
});
|
|
@@ -1826,81 +1826,81 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1826
1826
|
c.defaultPrevented = !0;
|
|
1827
1827
|
}
|
|
1828
1828
|
};
|
|
1829
|
-
N("cellPaste", c), !c.defaultPrevented && (
|
|
1829
|
+
N("cellPaste", c), !c.defaultPrevented && (No(s.map(({ change: e }) => e)), Ss(an(r, hs.value, gs.value)), Xi(F.cellsPasted(s.length, i.length)));
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1832
|
-
if (!
|
|
1831
|
+
function Ls(e) {
|
|
1832
|
+
if (!Ps()) return;
|
|
1833
1833
|
let t = e.clipboardData?.getData("text/plain");
|
|
1834
|
-
t && (e.preventDefault(),
|
|
1834
|
+
t && (e.preventDefault(), Is(t));
|
|
1835
1835
|
}
|
|
1836
1836
|
_e(() => {
|
|
1837
|
-
document.addEventListener("copy",
|
|
1837
|
+
document.addEventListener("copy", Fs), document.addEventListener("paste", Ls);
|
|
1838
1838
|
}), ge(() => {
|
|
1839
|
-
document.removeEventListener("copy",
|
|
1839
|
+
document.removeEventListener("copy", Fs), document.removeEventListener("paste", Ls);
|
|
1840
1840
|
});
|
|
1841
|
-
function
|
|
1842
|
-
if (!
|
|
1841
|
+
function Rs(e) {
|
|
1842
|
+
if (!Oo.value || e.target.closest(Hr)) return !1;
|
|
1843
1843
|
let t = Tt(e);
|
|
1844
|
-
return t ? (e.preventDefault(), t === "undo" ?
|
|
1844
|
+
return t ? (e.preventDefault(), t === "undo" ? Po() : Fo(), !0) : !1;
|
|
1845
1845
|
}
|
|
1846
|
-
let
|
|
1846
|
+
let zs = D(!1), Bs = D(""), Vs = D(0), Hs = m(() => !!x.find && zs.value && !!Bs.value.trim()), Us = m(() => Hs.value ? (tl.value && !Vn.value ? G.getPrePaginatedRowModel().rows : G.getRowModel().rows).filter((e) => !e.getIsGrouped()) : []), Ws = m(() => Hs.value ? bt(Us.value.map((e) => ({
|
|
1847
1847
|
id: e.id,
|
|
1848
1848
|
cells: Y.value.map((t) => ({
|
|
1849
1849
|
columnId: t.id,
|
|
1850
|
-
text:
|
|
1850
|
+
text: Ms(e, t.id)
|
|
1851
1851
|
}))
|
|
1852
|
-
})),
|
|
1853
|
-
function
|
|
1854
|
-
return
|
|
1852
|
+
})), Bs.value, l.value.locale) : []), Gs = m(() => Ws.value.length ? Ws.value[Math.min(Vs.value, Ws.value.length - 1)] : void 0), Ks = m(() => new Set(Ws.value.map((e) => `${e.rowId}\u0000${e.columnId}`)));
|
|
1853
|
+
function qs(e, t) {
|
|
1854
|
+
return Hs.value ? Gs.value?.rowId === e && Gs.value.columnId === t ? q.value.findCurrent() : Ks.value.has(`${e}\u0000${t}`) ? q.value.findMatch() : "" : "";
|
|
1855
1855
|
}
|
|
1856
|
-
async function
|
|
1856
|
+
async function Js() {
|
|
1857
1857
|
await C();
|
|
1858
|
-
let e =
|
|
1858
|
+
let e = Gs.value;
|
|
1859
1859
|
if (!e) return;
|
|
1860
|
-
let t = () =>
|
|
1860
|
+
let t = () => As(e.rowId, e.columnId)?.scrollIntoView?.({
|
|
1861
1861
|
block: "nearest",
|
|
1862
1862
|
inline: "nearest"
|
|
1863
1863
|
}), n = Q.value.findIndex((t) => t.kind === "row" && t.row.id === e.rowId);
|
|
1864
|
-
|
|
1864
|
+
Nc.value && n >= 0 ? (Mc?.value.scrollToIndex(n, { align: "center" }), requestAnimationFrame(() => requestAnimationFrame(t))) : t();
|
|
1865
1865
|
}
|
|
1866
|
-
function
|
|
1867
|
-
let t =
|
|
1866
|
+
function Ys(e) {
|
|
1867
|
+
let t = Ws.value;
|
|
1868
1868
|
if (!t.length) return;
|
|
1869
1869
|
let n = (e + t.length) % t.length;
|
|
1870
|
-
|
|
1870
|
+
Vs.value = n;
|
|
1871
1871
|
let r = t[n];
|
|
1872
|
-
if (
|
|
1873
|
-
let e =
|
|
1872
|
+
if (tl.value && !Vn.value) {
|
|
1873
|
+
let e = Us.value.findIndex((e) => e.id === r.rowId), t = Math.floor(e / V.value.pageSize);
|
|
1874
1874
|
e >= 0 && t !== V.value.pageIndex && G.setPageIndex(t);
|
|
1875
1875
|
}
|
|
1876
|
-
|
|
1876
|
+
Js();
|
|
1877
1877
|
}
|
|
1878
|
-
async function
|
|
1879
|
-
|
|
1880
|
-
}
|
|
1881
|
-
function Xs(e) {
|
|
1882
|
-
e.key === "Enter" ? (e.preventDefault(), Js(Bs.value + (e.shiftKey ? -1 : 1))) : e.key === "Escape" && (e.preventDefault(), Ys());
|
|
1878
|
+
async function Xs() {
|
|
1879
|
+
zs.value = !zs.value, await C(), Wo.value?.querySelector(zs.value ? "[data-find-input] input, input[data-find-input]" : "[data-find-toggle]")?.focus();
|
|
1883
1880
|
}
|
|
1884
1881
|
function Zs(e) {
|
|
1885
|
-
|
|
1882
|
+
e.key === "Enter" ? (e.preventDefault(), Ys(Vs.value + (e.shiftKey ? -1 : 1))) : e.key === "Escape" && (e.preventDefault(), Xs());
|
|
1883
|
+
}
|
|
1884
|
+
function Qs(e) {
|
|
1885
|
+
Bs.value = e, Vs.value = 0, Js();
|
|
1886
1886
|
}
|
|
1887
|
-
let
|
|
1888
|
-
if (
|
|
1889
|
-
let e = Q.value, t = Y.value, n = e.map((e) => e.kind === "row" ? sn(t.map((t) => R.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) => R.value.get(e.id)?.rowSpan === "auto"), a = (t, r) => e.map((e, i) => e.kind === "row" && n[i][r] === 1 ?
|
|
1887
|
+
let $s = m(() => !Nc.value && Gn.value.some((e) => e.rowSpan === "auto" || e.colSpan)), ec = (e) => `${ft}-head-${e}`, tc = (e) => `${ft}-hint-${e}`, nc = m(() => {
|
|
1888
|
+
if (!$s.value) return;
|
|
1889
|
+
let e = Q.value, t = Y.value, n = e.map((e) => e.kind === "row" ? sn(t.map((t) => R.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) => R.value.get(e.id)?.rowSpan === "auto"), a = (t, r) => e.map((e, i) => e.kind === "row" && n[i][r] === 1 ? Ms(e.row, t) : null), o = rt(t.flatMap((e, t) => i[t] ? [a(e.id, t)] : []), r), s = 0;
|
|
1890
1890
|
return {
|
|
1891
1891
|
columnSpans: n,
|
|
1892
1892
|
rowSpans: i.map((e) => e ? o[s++] : void 0)
|
|
1893
1893
|
};
|
|
1894
|
-
}),
|
|
1895
|
-
rowSpan:
|
|
1896
|
-
colSpan:
|
|
1897
|
-
}),
|
|
1898
|
-
if (
|
|
1899
|
-
let n =
|
|
1894
|
+
}), rc = (e, t) => ({
|
|
1895
|
+
rowSpan: nc.value?.rowSpans[t]?.[e] ?? 1,
|
|
1896
|
+
colSpan: nc.value?.columnSpans[e]?.[t] ?? 1
|
|
1897
|
+
}), ic = (e, t) => {
|
|
1898
|
+
if (!$s.value) return !0;
|
|
1899
|
+
let n = rc(e, t);
|
|
1900
1900
|
return n.rowSpan > 0 && n.colSpan > 0;
|
|
1901
1901
|
};
|
|
1902
|
-
function
|
|
1903
|
-
let i = !!x.cellSelection &&
|
|
1902
|
+
function ac(e, t, n, r) {
|
|
1903
|
+
let i = !!x.cellSelection && bs(e.id, t), a = x.editMode === "batch" && !!Qt(Do.value, e.id, t), o = $s.value ? rc(n, r) : {
|
|
1904
1904
|
rowSpan: 1,
|
|
1905
1905
|
colSpan: 1
|
|
1906
1906
|
};
|
|
@@ -1908,35 +1908,35 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1908
1908
|
className: [
|
|
1909
1909
|
i ? q.value.cellSelected() : "",
|
|
1910
1910
|
a ? q.value.cellChanged() : "",
|
|
1911
|
-
|
|
1911
|
+
qs(e.id, t)
|
|
1912
1912
|
],
|
|
1913
1913
|
attributes: {
|
|
1914
1914
|
...x.cellSelection || x.find ? { "data-column-id": t } : {},
|
|
1915
1915
|
...x.cellSelection && K.value ? { "aria-selected": i } : {},
|
|
1916
1916
|
...a ? { "data-changed": "" } : {},
|
|
1917
|
-
|
|
1917
|
+
...$s.value ? {
|
|
1918
1918
|
...o.rowSpan > 1 ? { rowspan: o.rowSpan } : {},
|
|
1919
1919
|
...o.colSpan > 1 ? { colspan: o.colSpan } : {},
|
|
1920
|
-
headers: Y.value.slice(r, r + o.colSpan).map((e) =>
|
|
1920
|
+
headers: Y.value.slice(r, r + o.colSpan).map((e) => ec(e.id)).join(" ")
|
|
1921
1921
|
} : {},
|
|
1922
1922
|
...x.cellSelection ? {
|
|
1923
|
-
onPointerdown: (n) =>
|
|
1924
|
-
onPointerenter: (n) =>
|
|
1925
|
-
onClickCapture:
|
|
1923
|
+
onPointerdown: (n) => Ds(e.id, t, n),
|
|
1924
|
+
onPointerenter: (n) => Os(e.id, t, n),
|
|
1925
|
+
onClickCapture: ks
|
|
1926
1926
|
} : {}
|
|
1927
1927
|
}
|
|
1928
1928
|
};
|
|
1929
1929
|
}
|
|
1930
|
-
let
|
|
1931
|
-
function
|
|
1932
|
-
let t = G.getVisibleLeafColumns().map((e) => R.value.get(e.id)).filter((e) => e.exportable !== !1), n = (e.selectionOnly ? G.getSelectedRowModel().flatRows : G.getSortedRowModel().flatRows).filter((e) => !e.getIsGrouped()).map((e) =>
|
|
1933
|
-
return e.bom === !1 ?
|
|
1930
|
+
let oc = (e, t) => x.editMode === "batch" && !!Qt(Do.value, e.id, t);
|
|
1931
|
+
function sc(e = {}) {
|
|
1932
|
+
let t = G.getVisibleLeafColumns().map((e) => R.value.get(e.id)).filter((e) => e.exportable !== !1), n = hn(t), r = (e.selectionOnly ? G.getSelectedRowModel().flatRows : G.getSortedRowModel().flatRows).filter((e) => !e.getIsGrouped()).map((e) => n.map(({ column: t, value: n }) => n ? n(e.original) : z(t, e.getValue(t.id), e.original))), i = e.separator ?? x.csvSeparator ?? ut(l.value.locale), a = gn([n.map((e) => e.header), ...r], i);
|
|
1933
|
+
return e.bom === !1 ? a.slice(1) : a;
|
|
1934
1934
|
}
|
|
1935
|
-
function
|
|
1935
|
+
function cc(e = !1) {
|
|
1936
1936
|
let t = typeof e == "boolean" ? { selectionOnly: e } : e;
|
|
1937
|
-
gt(`${t.filename ?? x.exportFilename ?? "export"}.csv`,
|
|
1937
|
+
gt(`${t.filename ?? x.exportFilename ?? "export"}.csv`, sc(t));
|
|
1938
1938
|
}
|
|
1939
|
-
function
|
|
1939
|
+
function lc(e = !1) {
|
|
1940
1940
|
if (e) return G.getSelectedRowModel().flatRows.filter((e) => !e.getIsGrouped()).map((e) => ({
|
|
1941
1941
|
row: e,
|
|
1942
1942
|
group: !1,
|
|
@@ -1949,108 +1949,109 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
1949
1949
|
}, ...e.subRows.flatMap(t)];
|
|
1950
1950
|
return G.getSortedRowModel().rows.flatMap(t);
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1952
|
+
function uc(e) {
|
|
1953
1953
|
let t = R.value.get(e.groupingColumnId), n = e.getLeafRows().filter((e) => !e.getIsGrouped()).length;
|
|
1954
1954
|
return `${t?.header ?? ""}: ${z(t, e.groupingValue, e.original)} (${n})`;
|
|
1955
1955
|
}
|
|
1956
|
-
let
|
|
1957
|
-
function
|
|
1956
|
+
let dc = (e) => e.editor === "datetime" ? "datetime" : e.filter === "date" || e.editor === "date" ? "date" : void 0;
|
|
1957
|
+
function fc(e, t, n) {
|
|
1958
1958
|
if (e == null || e === "") return null;
|
|
1959
1959
|
if (typeof e == "number") return Number.isFinite(e) ? e : null;
|
|
1960
1960
|
if (e instanceof Date) return {
|
|
1961
1961
|
date: e,
|
|
1962
|
-
time:
|
|
1962
|
+
time: dc(t) === "datetime"
|
|
1963
1963
|
};
|
|
1964
|
-
let r =
|
|
1964
|
+
let r = dc(t);
|
|
1965
1965
|
return r && typeof e == "string" ? {
|
|
1966
1966
|
date: e,
|
|
1967
1967
|
time: r === "datetime"
|
|
1968
1968
|
} : typeof e == "boolean" && !t.format ? e : n ? z(t, e, n) : It(e);
|
|
1969
1969
|
}
|
|
1970
|
-
function
|
|
1971
|
-
let t = G.getVisibleLeafColumns().map((e) => R.value.get(e.id)).filter((e) => e.exportable !== !1), n =
|
|
1970
|
+
function pc(e = {}) {
|
|
1971
|
+
let t = G.getVisibleLeafColumns().map((e) => R.value.get(e.id)).filter((e) => e.exportable !== !1), n = hn(t), r = lc(e.selectionOnly).filter((t) => !t.group || e.groups !== !1).map(({ row: t, group: r, depth: i }) => {
|
|
1972
1972
|
if (r) {
|
|
1973
|
-
let e =
|
|
1973
|
+
let e = t.getLeafRows().filter((e) => !e.getIsGrouped());
|
|
1974
1974
|
return {
|
|
1975
1975
|
kind: "group",
|
|
1976
1976
|
level: i,
|
|
1977
|
-
cells:
|
|
1978
|
-
if (
|
|
1979
|
-
if (!
|
|
1980
|
-
let
|
|
1981
|
-
return typeof
|
|
1977
|
+
cells: n.map(({ column: n, first: r }, i) => {
|
|
1978
|
+
if (i === 0) return uc(t);
|
|
1979
|
+
if (!r || !n.aggregate) return null;
|
|
1980
|
+
let a = tt(e.map((e) => Kn(n, e.original)), n.aggregate);
|
|
1981
|
+
return typeof a == "number" ? a : It(a);
|
|
1982
1982
|
})
|
|
1983
1983
|
};
|
|
1984
1984
|
}
|
|
1985
1985
|
return {
|
|
1986
1986
|
level: e.groups === !1 ? 0 : i,
|
|
1987
|
-
cells:
|
|
1988
|
-
if (
|
|
1989
|
-
let
|
|
1990
|
-
return typeof
|
|
1987
|
+
cells: n.map(({ column: e, value: n }) => {
|
|
1988
|
+
if (n) {
|
|
1989
|
+
let e = n(t.original);
|
|
1990
|
+
return typeof e == "number" || typeof e == "boolean" ? e : e instanceof Date ? { date: e } : It(e);
|
|
1991
1991
|
}
|
|
1992
|
-
return
|
|
1992
|
+
return fc(t.getValue(e.id), e, t.original);
|
|
1993
1993
|
})
|
|
1994
1994
|
};
|
|
1995
1995
|
});
|
|
1996
|
-
if (e.totals !== !1 &&
|
|
1997
|
-
let e = G.getFilteredRowModel().flatRows.filter((e) => !e.getIsGrouped()),
|
|
1996
|
+
if (e.totals !== !1 && n.some(({ column: e }) => e.aggregate || e.footer)) {
|
|
1997
|
+
let e = G.getFilteredRowModel().flatRows.filter((e) => !e.getIsGrouped()), t = n.map(({ column: t, first: n }) => {
|
|
1998
|
+
if (!n) return null;
|
|
1998
1999
|
if (t.footer !== void 0) return t.footer;
|
|
1999
2000
|
if (!t.aggregate) return null;
|
|
2000
|
-
let
|
|
2001
|
-
return typeof
|
|
2001
|
+
let r = tt(e.map((e) => Kn(t, e.original)), t.aggregate);
|
|
2002
|
+
return typeof r == "number" ? r : It(r);
|
|
2002
2003
|
});
|
|
2003
|
-
|
|
2004
|
+
t[0] === null && (t[0] = F.total), r.push({
|
|
2004
2005
|
kind: "total",
|
|
2005
|
-
cells:
|
|
2006
|
+
cells: t
|
|
2006
2007
|
});
|
|
2007
2008
|
}
|
|
2008
2009
|
return lt({
|
|
2009
2010
|
name: e.sheetName ?? x.caption,
|
|
2010
|
-
columns:
|
|
2011
|
-
rows:
|
|
2011
|
+
columns: n.map((e) => ({ header: e.header })),
|
|
2012
|
+
rows: r
|
|
2012
2013
|
});
|
|
2013
2014
|
}
|
|
2014
|
-
function
|
|
2015
|
-
ht(`${e.filename ?? x.exportFilename ?? "export"}.xlsx`,
|
|
2015
|
+
function mc(e = {}) {
|
|
2016
|
+
ht(`${e.filename ?? x.exportFilename ?? "export"}.xlsx`, pc(e));
|
|
2016
2017
|
}
|
|
2017
|
-
function
|
|
2018
|
-
e === "xlsx" ?
|
|
2018
|
+
function hc(e, t) {
|
|
2019
|
+
e === "xlsx" ? mc({ selectionOnly: t }) : cc(t);
|
|
2019
2020
|
}
|
|
2020
|
-
function
|
|
2021
|
-
let t = Y.value.map((e) => R.value.get(e.id)), n =
|
|
2021
|
+
function gc(e = {}) {
|
|
2022
|
+
let t = Y.value.map((e) => R.value.get(e.id)), n = Vi.value.map((e) => e.map((e) => ({
|
|
2022
2023
|
text: Z(e.header.column),
|
|
2023
2024
|
colSpan: e.group ? e.header.colSpan : 1,
|
|
2024
2025
|
rowSpan: e.rowSpan,
|
|
2025
2026
|
align: e.group ? void 0 : R.value.get(e.header.column.id)?.align
|
|
2026
|
-
}))), r =
|
|
2027
|
+
}))), r = lc(e.selectionOnly).map(({ row: e, group: n }) => n ? {
|
|
2027
2028
|
kind: "group",
|
|
2028
2029
|
cells: [{
|
|
2029
|
-
text:
|
|
2030
|
+
text: uc(e),
|
|
2030
2031
|
colSpan: t.length
|
|
2031
2032
|
}]
|
|
2032
2033
|
} : { cells: t.map((t) => ({
|
|
2033
|
-
text:
|
|
2034
|
+
text: Ms(e, t.id),
|
|
2034
2035
|
align: t.align
|
|
2035
|
-
})) }), i =
|
|
2036
|
-
text:
|
|
2036
|
+
})) }), i = Ya.value ? t.map((e) => ({
|
|
2037
|
+
text: Qa(e),
|
|
2037
2038
|
align: e.align
|
|
2038
2039
|
})) : void 0;
|
|
2039
2040
|
tn(nn({
|
|
2040
2041
|
title: e.title ?? x.caption,
|
|
2041
2042
|
caption: x.caption,
|
|
2042
2043
|
lang: l.value.locale,
|
|
2043
|
-
dir: getComputedStyle(
|
|
2044
|
+
dir: getComputedStyle(Wo.value ?? document.body).direction === "rtl" ? "rtl" : "ltr",
|
|
2044
2045
|
head: n,
|
|
2045
2046
|
body: r,
|
|
2046
2047
|
foot: i
|
|
2047
2048
|
}));
|
|
2048
2049
|
}
|
|
2049
|
-
async function
|
|
2050
|
-
await
|
|
2050
|
+
async function _c() {
|
|
2051
|
+
await An?.refresh();
|
|
2051
2052
|
}
|
|
2052
|
-
let
|
|
2053
|
-
let e = !!x.selectable &&
|
|
2053
|
+
let vc = m(() => x.exportFormats?.length ? x.exportFormats : ["csv"]), yc = m(() => {
|
|
2054
|
+
let e = !!x.selectable && Dc.value > 0, t = vc.value;
|
|
2054
2055
|
return t.length === 1 && t[0] === "csv" ? e ? [{
|
|
2055
2056
|
value: "all",
|
|
2056
2057
|
label: F.exportAll
|
|
@@ -2067,51 +2068,51 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2067
2068
|
value: `${n}:all`,
|
|
2068
2069
|
label: F.exportAs(n, !1)
|
|
2069
2070
|
}] : []);
|
|
2070
|
-
}),
|
|
2071
|
-
function
|
|
2071
|
+
}), bc = m(() => vc.value.length > 1 ? F.exportMenu : vc.value[0] === "xlsx" ? F.exportXlsx : F.export);
|
|
2072
|
+
function xc(e) {
|
|
2072
2073
|
let [t, n] = e.includes(":") ? e.split(":") : ["csv", e];
|
|
2073
|
-
|
|
2074
|
+
hc(t, n === "selection");
|
|
2074
2075
|
}
|
|
2075
|
-
let
|
|
2076
|
-
if (!
|
|
2076
|
+
let Sc = (e) => e.columns ? e.columns.flatMap(Sc) : [e.id], Cc = m(() => {
|
|
2077
|
+
if (!Bn.value.some((e) => e.columns)) return;
|
|
2077
2078
|
let e = G.getAllLeafColumns(), t = (t) => e.findIndex((e) => e.id === t);
|
|
2078
|
-
return
|
|
2079
|
+
return Bn.value.map((n) => ({
|
|
2079
2080
|
def: n,
|
|
2080
|
-
leaves:
|
|
2081
|
+
leaves: Sc(n).map((n) => e[t(n)]).filter(Boolean).sort((e, n) => t(e.id) - t(n.id))
|
|
2081
2082
|
})).sort((e, n) => t(e.leaves[0]?.id ?? "") - t(n.leaves[0]?.id ?? ""));
|
|
2082
|
-
}),
|
|
2083
|
+
}), wc = m(() => Cc.value ?? [{
|
|
2083
2084
|
def: void 0,
|
|
2084
2085
|
leaves: G.getAllLeafColumns()
|
|
2085
2086
|
}]);
|
|
2086
|
-
function
|
|
2087
|
+
function Tc(e, t) {
|
|
2087
2088
|
G.setColumnVisibility({
|
|
2088
|
-
|
|
2089
|
+
...$r.value,
|
|
2089
2090
|
...Object.fromEntries(e.filter((e) => e.getCanHide()).map((e) => [e.id, t]))
|
|
2090
2091
|
});
|
|
2091
2092
|
}
|
|
2092
|
-
function
|
|
2093
|
-
let n =
|
|
2093
|
+
function Ec(e, t) {
|
|
2094
|
+
let n = Bn.value.map((e) => ({
|
|
2094
2095
|
id: e.id,
|
|
2095
|
-
leaves:
|
|
2096
|
+
leaves: Sc(e)
|
|
2096
2097
|
})), r = Ht(G.getAllLeafColumns().map((e) => e.id), n, e, t);
|
|
2097
2098
|
if (!r) return;
|
|
2098
2099
|
G.setColumnOrder(r);
|
|
2099
2100
|
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));
|
|
2100
|
-
|
|
2101
|
+
Xi(F.columnMoved(R.value.get(e)?.header ?? e, a.indexOf(e) + 1, a.length));
|
|
2101
2102
|
}
|
|
2102
|
-
let
|
|
2103
|
-
async function
|
|
2104
|
-
if (
|
|
2105
|
-
else
|
|
2106
|
-
|
|
2103
|
+
let Dc = m(() => Da.value && Jr.value ? Math.max(0, (Hn.value ?? zn.value.length) - Jr.value.except.length) : Object.values(qr.value).filter(Boolean).length), Oc = [];
|
|
2104
|
+
async function kc() {
|
|
2105
|
+
if (yi.value = !yi.value, await C(), yi.value) for (let e of document.body.children) e !== Wo.value && e instanceof HTMLElement && !e.inert && (e.inert = !0, Oc.push(e));
|
|
2106
|
+
else Oc.splice(0).forEach((e) => e.inert = !1);
|
|
2107
|
+
Wo.value?.querySelector("[data-fullscreen-toggle]")?.focus();
|
|
2107
2108
|
}
|
|
2108
|
-
function
|
|
2109
|
-
|
|
2109
|
+
function Ac(e) {
|
|
2110
|
+
yi.value && e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(), kc());
|
|
2110
2111
|
}
|
|
2111
|
-
ge(() =>
|
|
2112
|
-
let
|
|
2112
|
+
ge(() => Oc.splice(0).forEach((e) => e.inert = !1));
|
|
2113
|
+
let jc = Te("scroll"), Mc = vt.useVirtualizer?.(m(() => ({
|
|
2113
2114
|
count: x.virtual && x.scrollHeight ? Q.value.length : 0,
|
|
2114
|
-
getScrollElement: () =>
|
|
2115
|
+
getScrollElement: () => jc.value,
|
|
2115
2116
|
estimateSize: () => x.rowHeight,
|
|
2116
2117
|
overscan: 8,
|
|
2117
2118
|
getItemKey: (e) => Q.value[e]?.key ?? e,
|
|
@@ -2120,61 +2121,61 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2120
2121
|
height: Number.parseInt(x.scrollHeight ?? "", 10) || 400
|
|
2121
2122
|
}
|
|
2122
2123
|
})));
|
|
2123
|
-
x.virtual && !
|
|
2124
|
-
let
|
|
2124
|
+
x.virtual && !Mc && Sn("DataTable: `virtual` needs the feature virtualRows from @wirecore/wirelayer-vue/virtual (`:features=\"[virtualRows]\"`) – all rows are rendered");
|
|
2125
|
+
let Nc = m(() => !!x.virtual && !!x.scrollHeight && !!Mc), Pc = m(() => x.scrollHeight === "fill" ? x.minScrollHeight ? { minHeight: x.minScrollHeight } : void 0 : x.scrollHeight ? { maxHeight: x.scrollHeight } : void 0), Fc = m(() => Nc.value ? Mc?.value.getVirtualItems() ?? [] : []), Ic = m(() => Nc.value ? Fc.value.map((e) => ({
|
|
2125
2126
|
...Q.value[e.index],
|
|
2126
2127
|
index: e.index
|
|
2127
2128
|
})) : Q.value.map((e, t) => ({
|
|
2128
2129
|
...e,
|
|
2129
2130
|
index: t
|
|
2130
|
-
}))),
|
|
2131
|
-
|
|
2132
|
-
},
|
|
2133
|
-
Ee(() =>
|
|
2134
|
-
function
|
|
2131
|
+
}))), Lc = m(() => Nc.value ? Fc.value[0]?.start ?? 0 : 0), Rc = m(() => Nc.value ? (Mc?.value.getTotalSize() ?? 0) - (Fc.value.at(-1)?.end ?? 0) : 0), zc = (e) => {
|
|
2132
|
+
Nc.value && e instanceof Element && Mc?.value.measureElement(e);
|
|
2133
|
+
}, Bc = !1;
|
|
2134
|
+
Ee(() => zn.value.length, () => Bc = !1);
|
|
2135
|
+
function Vc(e) {
|
|
2135
2136
|
if (N("scroll", e), !x.scrollHeight) return;
|
|
2136
2137
|
let t = e.currentTarget;
|
|
2137
|
-
|
|
2138
|
+
Bc || t.scrollTop + t.clientHeight < t.scrollHeight - 80 || (Bc = !0, N("loadMore"), N("scrollEnd"));
|
|
2138
2139
|
}
|
|
2139
|
-
let
|
|
2140
|
+
let Hc = D(0), Uc, Wc = Te("head");
|
|
2140
2141
|
_e(() => {
|
|
2141
|
-
|
|
2142
|
-
}), ge(() =>
|
|
2143
|
-
let
|
|
2144
|
-
_e(
|
|
2145
|
-
function
|
|
2142
|
+
Wc.value && typeof ResizeObserver < "u" && (Uc = new ResizeObserver(() => Hc.value = Wc.value?.offsetHeight ?? 0), Uc.observe(Wc.value));
|
|
2143
|
+
}), ge(() => Uc?.disconnect());
|
|
2144
|
+
let Gc = Te("tableElement"), Kc = () => K.value && Gc.value && mn(Gc.value);
|
|
2145
|
+
_e(Kc), ve(Kc);
|
|
2146
|
+
function qc(e) {
|
|
2146
2147
|
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.defaultPrevented) return !1;
|
|
2147
2148
|
let t = e.target, n = t.closest("td"), r = n?.parentElement?.dataset.rowId;
|
|
2148
|
-
if (!n || !r || n.cellIndex !== J.value.length || t.closest(
|
|
2149
|
+
if (!n || !r || n.cellIndex !== J.value.length || t.closest(Hr)) return !1;
|
|
2149
2150
|
let i = G.getRow(r, !0);
|
|
2150
2151
|
if (!i) return !1;
|
|
2151
|
-
let a = getComputedStyle(
|
|
2152
|
+
let a = getComputedStyle(Gc.value).direction === "rtl", o = {
|
|
2152
2153
|
expandable: i.getCanExpand(),
|
|
2153
2154
|
expanded: i.getIsExpanded(),
|
|
2154
2155
|
level: i.depth + 1
|
|
2155
|
-
}, s =
|
|
2156
|
+
}, s = bn(e.key, o, a);
|
|
2156
2157
|
if (!s) return !1;
|
|
2157
2158
|
if (e.preventDefault(), s === "parent") {
|
|
2158
2159
|
let e = i.getParentRow();
|
|
2159
|
-
|
|
2160
|
+
Gc.value?.querySelector(`tr[data-row-id="${CSS.escape(e?.id ?? "")}"] > td:nth-child(${J.value.length + 1})`)?.focus();
|
|
2160
2161
|
} else i.toggleExpanded(s === "expand");
|
|
2161
2162
|
return !0;
|
|
2162
2163
|
}
|
|
2163
|
-
function
|
|
2164
|
-
K.value &&
|
|
2164
|
+
function Jc(e) {
|
|
2165
|
+
K.value && Gc.value && (bi.value && qc(e) || Ct(e, Gc.value, {
|
|
2165
2166
|
itemCount: Q.value.length,
|
|
2166
|
-
scrollToItem:
|
|
2167
|
-
pageRows:
|
|
2167
|
+
scrollToItem: Nc.value ? (e) => Mc?.value.scrollToIndex(e) : void 0,
|
|
2168
|
+
pageRows: jc.value && x.scrollHeight ? Math.max(1, Math.floor(jc.value.clientHeight / x.rowHeight) - 1) : 10,
|
|
2168
2169
|
onSelectRow: (e) => {
|
|
2169
2170
|
let t = G.getRow(e, !0);
|
|
2170
|
-
t?.getCanSelect() &&
|
|
2171
|
+
t?.getCanSelect() && Fa(t, !Ea.value || !Oa(t));
|
|
2171
2172
|
}
|
|
2172
2173
|
}));
|
|
2173
2174
|
}
|
|
2174
|
-
function
|
|
2175
|
-
K.value &&
|
|
2175
|
+
function Yc(e) {
|
|
2176
|
+
K.value && Gc.value && St(Gc.value, e.target);
|
|
2176
2177
|
let t = e.target, n = t.closest("tr")?.dataset.rowId, r = t.dataset.columnId;
|
|
2177
|
-
x.cellSelection && K.value && !
|
|
2178
|
+
x.cellSelection && K.value && !Cs && !ws && n && r && t.matches("td") && Ss({
|
|
2178
2179
|
anchor: {
|
|
2179
2180
|
rowId: n,
|
|
2180
2181
|
columnId: r
|
|
@@ -2185,140 +2186,140 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2185
2186
|
}
|
|
2186
2187
|
});
|
|
2187
2188
|
}
|
|
2188
|
-
function
|
|
2189
|
-
|
|
2189
|
+
function Xc(e) {
|
|
2190
|
+
Rs(e) || js(e) || Jc(e);
|
|
2190
2191
|
}
|
|
2191
|
-
let
|
|
2192
|
+
let Zc = m(() => ({
|
|
2192
2193
|
sorting: B.value,
|
|
2193
|
-
filters: cn(
|
|
2194
|
+
filters: cn(Qr.value),
|
|
2194
2195
|
globalFilter: U.value,
|
|
2195
2196
|
page: V.value.pageIndex + 1,
|
|
2196
2197
|
pageSize: V.value.pageSize,
|
|
2197
|
-
columnSizing:
|
|
2198
|
-
columnOrder:
|
|
2199
|
-
hiddenColumns: Object.keys(
|
|
2200
|
-
pinnedColumns:
|
|
2201
|
-
expanded:
|
|
2202
|
-
selection: Object.keys(
|
|
2203
|
-
density:
|
|
2204
|
-
showFilters:
|
|
2198
|
+
columnSizing: ni.value,
|
|
2199
|
+
columnOrder: ei.value,
|
|
2200
|
+
hiddenColumns: Object.keys($r.value).filter((e) => $r.value[e] === !1),
|
|
2201
|
+
pinnedColumns: ti.value,
|
|
2202
|
+
expanded: Zr.value === !0 ? [] : Object.keys(Zr.value).filter((e) => Zr.value[e]),
|
|
2203
|
+
selection: Object.keys(qr.value).filter((e) => qr.value[e]),
|
|
2204
|
+
density: ri.value,
|
|
2205
|
+
showFilters: Yr.value
|
|
2205
2206
|
}));
|
|
2206
2207
|
_e(() => {
|
|
2207
2208
|
if (!x.stateKey) return;
|
|
2208
2209
|
let e = Mt(x.stateKey, x.stateStorage), t = e && qt(e, x.stateExclude);
|
|
2209
|
-
t && (t.sorting &&
|
|
2210
|
+
t && (t.sorting && ci(t.sorting), t.filters && G.setColumnFilters(_n(t.filters)), t.globalFilter !== void 0 && G.setGlobalFilter(t.globalFilter), t.columnSizing && (ni.value = t.columnSizing), t.columnOrder && G.setColumnOrder(t.columnOrder), t.hiddenColumns && G.setColumnVisibility(Cn(t.hiddenColumns, !1)), t.pinnedColumns && G.setColumnPinning(t.pinnedColumns), t.expanded && t.expanded.length && gi(Cn(t.expanded)), t.selection && fi(wn(t.selection)), t.density && _i(t.density), t.showFilters !== void 0 && t.showFilters !== Yr.value && mi(t.showFilters), (t.page || t.pageSize) && li({
|
|
2210
2211
|
pageIndex: (t.page ?? 1) - 1,
|
|
2211
2212
|
pageSize: t.pageSize ?? V.value.pageSize
|
|
2212
|
-
})), Ee(
|
|
2213
|
+
})), Ee(Zc, (e) => fn(x.stateKey, qt(e, x.stateExclude), x.stateStorage), { deep: !0 });
|
|
2213
2214
|
});
|
|
2214
|
-
function
|
|
2215
|
+
function Qc() {
|
|
2215
2216
|
x.stateKey && at(x.stateKey, x.stateStorage);
|
|
2216
2217
|
}
|
|
2217
|
-
function
|
|
2218
|
-
|
|
2218
|
+
function $c() {
|
|
2219
|
+
Qr.value.length && G.setColumnFilters([]), U.value && G.setGlobalFilter(""), In.value && Ln(_t("and", "root")), V.value.pageIndex && li({
|
|
2219
2220
|
...V.value,
|
|
2220
2221
|
pageIndex: 0
|
|
2221
2222
|
});
|
|
2222
2223
|
}
|
|
2223
|
-
function
|
|
2224
|
-
|
|
2224
|
+
function el() {
|
|
2225
|
+
$c(), ci(Wt(x.defaultSorting)), Object.keys(qr.value).length && fi({}), Jr.value && pi(null), C(Qc);
|
|
2225
2226
|
}
|
|
2226
|
-
let
|
|
2227
|
+
let tl = m(() => !!x.pageSize), nl = m(() => Vn.value ? Hn.value ?? zn.value.length : G.getPrePaginatedRowModel().rows.length), rl = m(() => (x.pageSizeOptions ?? []).map((e) => ({
|
|
2227
2228
|
value: String(e),
|
|
2228
2229
|
label: String(e)
|
|
2229
|
-
}))),
|
|
2230
|
+
}))), il = m(() => !!x.find || !!x.search || !!x.columnToggle || !!x.exportFilename || !!x.densityToggle || !!x.fullscreenToggle || !!x.filterToggle || !!x.filterReset || Rn.value || !!P.toolbar || !!P.toolbarStart || !!P.toolbarEnd), al = m(() => x.highlightSearch ? U.value : ""), ol = m(() => Hs.value ? Bs.value.trim() : al.value), sl = m(() => Yi.value ? Yi.value : x.dataSource ? Un.value ? "" : dt(kn.value, c, l.value.locale) : ha.value ? F.results(G.getFilteredRowModel().rows.length) : ""), cl = m(() => Wn.value && x.loadingVariant === "skeleton"), ll = m(() => Math.min(Q.value.length || x.pageSize || 5, 50)), ul = m(() => ha.value && (Vn.value || zn.value.length > 0) && (!!P.noResults || x.noResultsText !== void 0)), dl = m(() => {
|
|
2230
2231
|
if (!x.statusBar) return [];
|
|
2231
2232
|
let e = G.getSelectedRowModel().flatRows.filter((e) => !e.getIsGrouped());
|
|
2232
2233
|
return e.length ? Y.value.flatMap((t) => {
|
|
2233
|
-
let n = R.value.get(t.id), r = Kt(e.map((e) =>
|
|
2234
|
+
let n = R.value.get(t.id), r = Kt(e.map((e) => Kn(n, e.original)));
|
|
2234
2235
|
if (!r) return [];
|
|
2235
2236
|
let i = e[0].original;
|
|
2236
2237
|
return [{
|
|
2237
2238
|
id: t.id,
|
|
2238
|
-
text: `${n.header}: ${F.aggregates.sum(
|
|
2239
|
+
text: `${n.header}: ${F.aggregates.sum(Xa(n, r.sum, i))} · ${F.aggregates.avg(Xa(n, r.avg, i))}`
|
|
2239
2240
|
}];
|
|
2240
2241
|
}) : [];
|
|
2241
|
-
}),
|
|
2242
|
+
}), fl = m(() => Vn.value ? Hn.value ?? zn.value.length : G.getCoreRowModel().rows.length), pl = m(() => ({
|
|
2242
2243
|
page: V.value.pageIndex + 1,
|
|
2243
2244
|
pageSize: x.pageSize ? V.value.pageSize : 0,
|
|
2244
2245
|
sorting: B.value.map((e) => ({
|
|
2245
2246
|
id: e.id,
|
|
2246
2247
|
desc: e.desc
|
|
2247
2248
|
})),
|
|
2248
|
-
filters: cn(
|
|
2249
|
+
filters: cn(Qr.value),
|
|
2249
2250
|
search: U.value,
|
|
2250
2251
|
groupBy: H.value,
|
|
2251
|
-
...
|
|
2252
|
-
})),
|
|
2253
|
-
...
|
|
2252
|
+
...In.value ? { condition: Nn.value } : {}
|
|
2253
|
+
})), ml = m(() => rn(pl.value)), hl = m(() => rn({
|
|
2254
|
+
...pl.value,
|
|
2254
2255
|
page: void 0,
|
|
2255
2256
|
pageSize: void 0
|
|
2256
|
-
})),
|
|
2257
|
-
function
|
|
2258
|
-
let r =
|
|
2257
|
+
})), gl = U.value;
|
|
2258
|
+
function _l(e, t, n) {
|
|
2259
|
+
let r = jn();
|
|
2259
2260
|
if (!r) return;
|
|
2260
2261
|
if (n !== void 0 && n !== t && V.value.pageIndex !== 0) {
|
|
2261
|
-
|
|
2262
|
+
li({
|
|
2262
2263
|
...V.value,
|
|
2263
2264
|
pageIndex: 0
|
|
2264
2265
|
});
|
|
2265
2266
|
return;
|
|
2266
2267
|
}
|
|
2267
|
-
let i =
|
|
2268
|
-
|
|
2268
|
+
let i = gl !== U.value;
|
|
2269
|
+
gl = U.value, r.load(JSON.parse(e), { debounce: i });
|
|
2269
2270
|
}
|
|
2270
|
-
_e(() =>
|
|
2271
|
-
pl,
|
|
2271
|
+
_e(() => _l(ml.value, hl.value, void 0)), Ee([
|
|
2272
2272
|
ml,
|
|
2273
|
+
hl,
|
|
2273
2274
|
() => !!x.dataSource
|
|
2274
|
-
], ([e, t], [, n]) =>
|
|
2275
|
-
exportCsv:
|
|
2276
|
-
generateCsv:
|
|
2277
|
-
clearState:
|
|
2278
|
-
resetFilters:
|
|
2279
|
-
resetState:
|
|
2280
|
-
exportXlsx:
|
|
2281
|
-
generateXlsx:
|
|
2282
|
-
print:
|
|
2283
|
-
refresh:
|
|
2284
|
-
undo:
|
|
2285
|
-
redo:
|
|
2275
|
+
], ([e, t], [, n]) => _l(e, t, n)), a({
|
|
2276
|
+
exportCsv: cc,
|
|
2277
|
+
generateCsv: sc,
|
|
2278
|
+
clearState: Qc,
|
|
2279
|
+
resetFilters: $c,
|
|
2280
|
+
resetState: el,
|
|
2281
|
+
exportXlsx: mc,
|
|
2282
|
+
generateXlsx: pc,
|
|
2283
|
+
print: gc,
|
|
2284
|
+
refresh: _c,
|
|
2285
|
+
undo: Po,
|
|
2286
|
+
redo: Fo
|
|
2286
2287
|
});
|
|
2287
|
-
let
|
|
2288
|
+
let vl = {
|
|
2288
2289
|
placement: "bottom-end",
|
|
2289
2290
|
gutter: 4
|
|
2290
|
-
},
|
|
2291
|
+
}, yl = pn("sm");
|
|
2291
2292
|
return (e, t) => (E(), h(ue, {
|
|
2292
2293
|
to: "body",
|
|
2293
|
-
disabled: !
|
|
2294
|
+
disabled: !yi.value
|
|
2294
2295
|
}, [v("div", S({
|
|
2295
2296
|
ref_key: "root",
|
|
2296
|
-
ref:
|
|
2297
|
+
ref: Wo
|
|
2297
2298
|
}, {
|
|
2298
2299
|
...j(Ze),
|
|
2299
2300
|
class: q.value.base({ class: w(j(Ze).class) })
|
|
2300
2301
|
}, {
|
|
2301
|
-
role:
|
|
2302
|
-
"aria-modal":
|
|
2303
|
-
"aria-label":
|
|
2304
|
-
onKeydown:
|
|
2302
|
+
role: yi.value ? "dialog" : void 0,
|
|
2303
|
+
"aria-modal": yi.value || void 0,
|
|
2304
|
+
"aria-label": yi.value ? i.caption : void 0,
|
|
2305
|
+
onKeydown: Ac
|
|
2305
2306
|
}), [
|
|
2306
|
-
|
|
2307
|
+
il.value ? (E(), _("div", {
|
|
2307
2308
|
key: 0,
|
|
2308
2309
|
class: w(q.value.toolbar())
|
|
2309
2310
|
}, [
|
|
2310
|
-
|
|
2311
|
+
xi.value ? (E(), _("div", {
|
|
2311
2312
|
key: 0,
|
|
2312
2313
|
class: w(q.value.toolbarStart())
|
|
2313
2314
|
}, [e.$slots.toolbarStart ? (E(), h(u, {
|
|
2314
2315
|
key: 0,
|
|
2315
|
-
recipes: j(
|
|
2316
|
+
recipes: j(yl)
|
|
2316
2317
|
}, {
|
|
2317
2318
|
default: M(() => [k(e.$slots, "toolbarStart")]),
|
|
2318
2319
|
_: 3
|
|
2319
2320
|
}, 8, ["recipes"])) : g("", !0)], 2)) : e.$slots.toolbarStart ? (E(), h(u, {
|
|
2320
2321
|
key: 1,
|
|
2321
|
-
recipes: j(
|
|
2322
|
+
recipes: j(yl)
|
|
2322
2323
|
}, {
|
|
2323
2324
|
default: M(() => [k(e.$slots, "toolbarStart")]),
|
|
2324
2325
|
_: 3
|
|
@@ -2339,24 +2340,24 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2339
2340
|
"aria-label",
|
|
2340
2341
|
"model-value"
|
|
2341
2342
|
])) : g("", !0),
|
|
2342
|
-
e.$slots.toolbar && !
|
|
2343
|
+
e.$slots.toolbar && !xi.value ? (E(), h(u, {
|
|
2343
2344
|
key: 3,
|
|
2344
|
-
recipes: j(
|
|
2345
|
+
recipes: j(yl)
|
|
2345
2346
|
}, {
|
|
2346
2347
|
default: M(() => [k(e.$slots, "toolbar")]),
|
|
2347
2348
|
_: 3
|
|
2348
2349
|
}, 8, ["recipes"])) : g("", !0),
|
|
2349
2350
|
v("div", { class: w(q.value.toolbarEnd()) }, [
|
|
2350
|
-
e.$slots.toolbar &&
|
|
2351
|
+
e.$slots.toolbar && xi.value ? (E(), h(u, {
|
|
2351
2352
|
key: 0,
|
|
2352
|
-
recipes: j(
|
|
2353
|
+
recipes: j(yl)
|
|
2353
2354
|
}, {
|
|
2354
2355
|
default: M(() => [k(e.$slots, "toolbar")]),
|
|
2355
2356
|
_: 3
|
|
2356
2357
|
}, 8, ["recipes"])) : g("", !0),
|
|
2357
2358
|
e.$slots.toolbarEnd ? (E(), h(u, {
|
|
2358
2359
|
key: 1,
|
|
2359
|
-
recipes: j(
|
|
2360
|
+
recipes: j(yl)
|
|
2360
2361
|
}, {
|
|
2361
2362
|
default: M(() => [k(e.$slots, "toolbarEnd")]),
|
|
2362
2363
|
_: 3
|
|
@@ -2368,21 +2369,21 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2368
2369
|
label: j(F).find,
|
|
2369
2370
|
variant: "outline",
|
|
2370
2371
|
size: "sm",
|
|
2371
|
-
"aria-expanded":
|
|
2372
|
-
onClick:
|
|
2372
|
+
"aria-expanded": zs.value,
|
|
2373
|
+
onClick: Xs
|
|
2373
2374
|
}, null, 8, [
|
|
2374
2375
|
"icon",
|
|
2375
2376
|
"label",
|
|
2376
2377
|
"aria-expanded"
|
|
2377
2378
|
])) : g("", !0),
|
|
2378
|
-
|
|
2379
|
+
Rn.value ? (E(), h(ne, {
|
|
2379
2380
|
key: 3,
|
|
2380
2381
|
variant: "outline",
|
|
2381
2382
|
size: "sm",
|
|
2382
2383
|
"leading-icon": j(Ue),
|
|
2383
|
-
"aria-expanded":
|
|
2384
|
+
"aria-expanded": Pn.value,
|
|
2384
2385
|
"aria-controls": `${j(ft)}-advanced`,
|
|
2385
|
-
onClick: t[1] ||= (e) =>
|
|
2386
|
+
onClick: t[1] ||= (e) => Pn.value = !Pn.value
|
|
2386
2387
|
}, {
|
|
2387
2388
|
default: M(() => [y(A(j(c).conditionBuilder.advanced), 1)]),
|
|
2388
2389
|
_: 1
|
|
@@ -2397,8 +2398,8 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2397
2398
|
label: j(F).filterToggle,
|
|
2398
2399
|
variant: "outline",
|
|
2399
2400
|
size: "sm",
|
|
2400
|
-
"aria-pressed":
|
|
2401
|
-
onClick:
|
|
2401
|
+
"aria-pressed": Yr.value,
|
|
2402
|
+
onClick: hi
|
|
2402
2403
|
}, null, 8, [
|
|
2403
2404
|
"icon",
|
|
2404
2405
|
"label",
|
|
@@ -2410,8 +2411,8 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2410
2411
|
label: j(F).resetFilters,
|
|
2411
2412
|
variant: "outline",
|
|
2412
2413
|
size: "sm",
|
|
2413
|
-
disabled: !
|
|
2414
|
-
onClick:
|
|
2414
|
+
disabled: !ha.value,
|
|
2415
|
+
onClick: $c
|
|
2415
2416
|
}, null, 8, [
|
|
2416
2417
|
"icon",
|
|
2417
2418
|
"label",
|
|
@@ -2419,7 +2420,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2419
2420
|
])) : g("", !0),
|
|
2420
2421
|
i.densityToggle ? (E(), h(j(I).Root, {
|
|
2421
2422
|
key: 6,
|
|
2422
|
-
positioning:
|
|
2423
|
+
positioning: vl,
|
|
2423
2424
|
"lazy-mount": "",
|
|
2424
2425
|
"unmount-on-exit": ""
|
|
2425
2426
|
}, {
|
|
@@ -2432,10 +2433,10 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2432
2433
|
}, null, 8, ["icon", "label"])]),
|
|
2433
2434
|
_: 1
|
|
2434
2435
|
}), (E(), h(ue, { to: "body" }, [b(j(I).Positioner, null, {
|
|
2435
|
-
default: M(() => [b(j(I).Content, { class: w(j(
|
|
2436
|
+
default: M(() => [b(j(I).Content, { class: w(j(Si).content()) }, {
|
|
2436
2437
|
default: M(() => [b(j(I).RadioItemGroup, {
|
|
2437
|
-
"model-value":
|
|
2438
|
-
"onUpdate:modelValue": t[2] ||= (e) =>
|
|
2438
|
+
"model-value": ri.value,
|
|
2439
|
+
"onUpdate:modelValue": t[2] ||= (e) => _i(e)
|
|
2439
2440
|
}, {
|
|
2440
2441
|
default: M(() => [(E(), _(p, null, O([
|
|
2441
2442
|
"sm",
|
|
@@ -2444,7 +2445,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2444
2445
|
], (e) => b(j(I).RadioItem, {
|
|
2445
2446
|
key: e,
|
|
2446
2447
|
value: e,
|
|
2447
|
-
class: w(j(
|
|
2448
|
+
class: w(j(Si).item())
|
|
2448
2449
|
}, {
|
|
2449
2450
|
default: M(() => [b(j(I).ItemIndicator, null, {
|
|
2450
2451
|
default: M(() => [b(j(je), {
|
|
@@ -2452,7 +2453,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2452
2453
|
"aria-hidden": "true"
|
|
2453
2454
|
}, null, 8, ["class"])]),
|
|
2454
2455
|
_: 1
|
|
2455
|
-
}), b(j(I).ItemText, { class: w(j(
|
|
2456
|
+
}), b(j(I).ItemText, { class: w(j(Si).label()) }, {
|
|
2456
2457
|
default: M(() => [y(A(j(F).densities[e]), 1)]),
|
|
2457
2458
|
_: 2
|
|
2458
2459
|
}, 1032, ["class"])]),
|
|
@@ -2468,7 +2469,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2468
2469
|
})) : g("", !0),
|
|
2469
2470
|
i.columnToggle ? (E(), h(j(I).Root, {
|
|
2470
2471
|
key: 7,
|
|
2471
|
-
positioning:
|
|
2472
|
+
positioning: vl,
|
|
2472
2473
|
"lazy-mount": "",
|
|
2473
2474
|
"unmount-on-exit": ""
|
|
2474
2475
|
}, {
|
|
@@ -2483,16 +2484,16 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2483
2484
|
}, 8, ["leading-icon"])]),
|
|
2484
2485
|
_: 1
|
|
2485
2486
|
}), (E(), h(ue, { to: "body" }, [b(j(I).Positioner, null, {
|
|
2486
|
-
default: M(() => [b(j(I).Content, { class: w(j(
|
|
2487
|
-
default: M(() => [(E(!0), _(p, null, O(
|
|
2487
|
+
default: M(() => [b(j(I).Content, { class: w(j(Si).content()) }, {
|
|
2488
|
+
default: M(() => [(E(!0), _(p, null, O(wc.value, (e, t) => (E(), _(p, { key: e.def ? `group:${e.def.id}` : "columns" }, [
|
|
2488
2489
|
e.def?.columns ? (E(), h(j(I).CheckboxItem, {
|
|
2489
2490
|
key: 0,
|
|
2490
2491
|
value: `group:${e.def.id}`,
|
|
2491
2492
|
checked: e.leaves.filter((e) => e.getCanHide()).every((e) => e.getIsVisible()),
|
|
2492
2493
|
disabled: !e.leaves.some((e) => e.getCanHide()),
|
|
2493
2494
|
"close-on-select": !1,
|
|
2494
|
-
class: w(j(
|
|
2495
|
-
"onUpdate:checked": (t) =>
|
|
2495
|
+
class: w(j(Si).item()),
|
|
2496
|
+
"onUpdate:checked": (t) => Tc(e.leaves, t)
|
|
2496
2497
|
}, {
|
|
2497
2498
|
default: M(() => [b(j(I).ItemIndicator, null, {
|
|
2498
2499
|
default: M(() => [b(j(je), {
|
|
@@ -2500,7 +2501,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2500
2501
|
"aria-hidden": "true"
|
|
2501
2502
|
}, null, 8, ["class"])]),
|
|
2502
2503
|
_: 1
|
|
2503
|
-
}), b(j(I).ItemText, { class: w(j(
|
|
2504
|
+
}), b(j(I).ItemText, { class: w(j(Si).label()) }, {
|
|
2504
2505
|
default: M(() => [y(A(e.def.header), 1)]),
|
|
2505
2506
|
_: 2
|
|
2506
2507
|
}, 1032, ["class"])]),
|
|
@@ -2517,7 +2518,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2517
2518
|
value: t.id,
|
|
2518
2519
|
checked: t.getIsVisible(),
|
|
2519
2520
|
"close-on-select": !1,
|
|
2520
|
-
class: w(j(
|
|
2521
|
+
class: w(j(Si).item(e.def?.columns ? { class: q.value.columnGroupItem() } : {})),
|
|
2521
2522
|
"onUpdate:checked": (e) => t.toggleVisibility(e)
|
|
2522
2523
|
}, {
|
|
2523
2524
|
default: M(() => [b(j(I).ItemIndicator, null, {
|
|
@@ -2526,7 +2527,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2526
2527
|
"aria-hidden": "true"
|
|
2527
2528
|
}, null, 8, ["class"])]),
|
|
2528
2529
|
_: 1
|
|
2529
|
-
}), b(j(I).ItemText, { class: w(j(
|
|
2530
|
+
}), b(j(I).ItemText, { class: w(j(Si).label()) }, {
|
|
2530
2531
|
default: M(() => [y(A(Z(t)), 1)]),
|
|
2531
2532
|
_: 2
|
|
2532
2533
|
}, 1032, ["class"])]),
|
|
@@ -2540,12 +2541,12 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2540
2541
|
e.def?.columns && i.reorderableColumns ? (E(), _(p, { key: 1 }, O([-1, 1], (n) => b(j(I).Item, {
|
|
2541
2542
|
key: n,
|
|
2542
2543
|
value: `group-${n < 0 ? "earlier" : "later"}:${e.def.id}`,
|
|
2543
|
-
disabled: n < 0 ? t === 0 : t ===
|
|
2544
|
+
disabled: n < 0 ? t === 0 : t === wc.value.length - 1,
|
|
2544
2545
|
"close-on-select": !1,
|
|
2545
|
-
class: w(j(
|
|
2546
|
-
onSelect: (t) =>
|
|
2546
|
+
class: w(j(Si).item({ class: q.value.columnGroupItem() })),
|
|
2547
|
+
onSelect: (t) => Ec(e.def.id, n)
|
|
2547
2548
|
}, {
|
|
2548
|
-
default: M(() => [b(j(I).ItemText, { class: w(j(
|
|
2549
|
+
default: M(() => [b(j(I).ItemText, { class: w(j(Si).label()) }, {
|
|
2549
2550
|
default: M(() => [y(A(n < 0 ? j(F).columnGroupEarlier(e.def.header) : j(F).columnGroupLater(e.def.header)), 1)]),
|
|
2550
2551
|
_: 2
|
|
2551
2552
|
}, 1032, ["class"])]),
|
|
@@ -2563,17 +2564,17 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2563
2564
|
})]))]),
|
|
2564
2565
|
_: 1
|
|
2565
2566
|
})) : g("", !0),
|
|
2566
|
-
i.exportFilename ? (E(), _(p, { key: 8 }, [
|
|
2567
|
+
i.exportFilename ? (E(), _(p, { key: 8 }, [yc.value.length > 1 ? (E(), h(d, {
|
|
2567
2568
|
key: 0,
|
|
2568
|
-
items:
|
|
2569
|
-
onSelect:
|
|
2569
|
+
items: yc.value,
|
|
2570
|
+
onSelect: xc
|
|
2570
2571
|
}, {
|
|
2571
2572
|
default: M(() => [b(ne, {
|
|
2572
2573
|
variant: "outline",
|
|
2573
2574
|
size: "sm",
|
|
2574
2575
|
"leading-icon": j(Re)
|
|
2575
2576
|
}, {
|
|
2576
|
-
default: M(() => [y(A(
|
|
2577
|
+
default: M(() => [y(A(bc.value), 1)]),
|
|
2577
2578
|
_: 1
|
|
2578
2579
|
}, 8, ["leading-icon"])]),
|
|
2579
2580
|
_: 1
|
|
@@ -2582,33 +2583,33 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2582
2583
|
variant: "outline",
|
|
2583
2584
|
size: "sm",
|
|
2584
2585
|
"leading-icon": j(Re),
|
|
2585
|
-
onClick: t[3] ||= (e) =>
|
|
2586
|
+
onClick: t[3] ||= (e) => hc(vc.value[0], !1)
|
|
2586
2587
|
}, {
|
|
2587
|
-
default: M(() => [y(A(
|
|
2588
|
+
default: M(() => [y(A(bc.value), 1)]),
|
|
2588
2589
|
_: 1
|
|
2589
2590
|
}, 8, ["leading-icon"]))], 64)) : g("", !0),
|
|
2590
2591
|
i.fullscreenToggle ? (E(), h(f, {
|
|
2591
2592
|
key: 9,
|
|
2592
2593
|
"data-fullscreen-toggle": "",
|
|
2593
|
-
icon:
|
|
2594
|
-
label:
|
|
2594
|
+
icon: yi.value ? j(Ge) : j(We),
|
|
2595
|
+
label: yi.value ? j(F).exitFullscreen : j(F).fullscreen,
|
|
2595
2596
|
variant: "outline",
|
|
2596
2597
|
size: "sm",
|
|
2597
|
-
onClick:
|
|
2598
|
+
onClick: kc
|
|
2598
2599
|
}, null, 8, ["icon", "label"])) : g("", !0)
|
|
2599
2600
|
], 2)
|
|
2600
2601
|
], 2)) : g("", !0),
|
|
2601
|
-
|
|
2602
|
+
Rn.value && Pn.value ? (E(), _("div", {
|
|
2602
2603
|
key: 1,
|
|
2603
2604
|
id: `${j(ft)}-advanced`,
|
|
2604
2605
|
class: w(q.value.advancedFilter())
|
|
2605
2606
|
}, [k(e.$slots, "advancedFilter", {
|
|
2606
|
-
fields:
|
|
2607
|
-
value:
|
|
2608
|
-
setValue:
|
|
2607
|
+
fields: Fn.value,
|
|
2608
|
+
value: Nn.value,
|
|
2609
|
+
setValue: Ln,
|
|
2609
2610
|
label: j(c).conditionBuilder.advanced
|
|
2610
|
-
})], 10,
|
|
2611
|
-
i.find &&
|
|
2611
|
+
})], 10, tr)) : g("", !0),
|
|
2612
|
+
i.find && zs.value ? (E(), _("div", {
|
|
2612
2613
|
key: 2,
|
|
2613
2614
|
class: w(q.value.findBar()),
|
|
2614
2615
|
role: "search",
|
|
@@ -2622,9 +2623,9 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2622
2623
|
class: w(q.value.findInput()),
|
|
2623
2624
|
placeholder: j(F).searchPlaceholder,
|
|
2624
2625
|
"aria-label": j(F).find,
|
|
2625
|
-
"model-value":
|
|
2626
|
-
"onUpdate:modelValue": t[4] ||= (e) =>
|
|
2627
|
-
onKeydown:
|
|
2626
|
+
"model-value": Bs.value,
|
|
2627
|
+
"onUpdate:modelValue": t[4] ||= (e) => Qs(e ?? ""),
|
|
2628
|
+
onKeydown: Zs
|
|
2628
2629
|
}, null, 8, [
|
|
2629
2630
|
"leading-icon",
|
|
2630
2631
|
"class",
|
|
@@ -2635,14 +2636,14 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2635
2636
|
v("span", {
|
|
2636
2637
|
class: w(q.value.findCount()),
|
|
2637
2638
|
"aria-live": "polite"
|
|
2638
|
-
}, A(
|
|
2639
|
+
}, A(Bs.value.trim() ? j(F).findMatches(Ws.value.length ? Math.min(Vs.value, Ws.value.length - 1) + 1 : 0, Ws.value.length) : ""), 3),
|
|
2639
2640
|
b(f, {
|
|
2640
2641
|
icon: j(Pe),
|
|
2641
2642
|
label: j(F).findPrevious,
|
|
2642
2643
|
variant: "text",
|
|
2643
2644
|
size: "sm",
|
|
2644
|
-
disabled: !
|
|
2645
|
-
onClick: t[5] ||= (e) =>
|
|
2645
|
+
disabled: !Ws.value.length,
|
|
2646
|
+
onClick: t[5] ||= (e) => Ys(Vs.value - 1)
|
|
2646
2647
|
}, null, 8, [
|
|
2647
2648
|
"icon",
|
|
2648
2649
|
"label",
|
|
@@ -2653,8 +2654,8 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2653
2654
|
label: j(F).findNext,
|
|
2654
2655
|
variant: "text",
|
|
2655
2656
|
size: "sm",
|
|
2656
|
-
disabled: !
|
|
2657
|
-
onClick: t[6] ||= (e) =>
|
|
2657
|
+
disabled: !Ws.value.length,
|
|
2658
|
+
onClick: t[6] ||= (e) => Ys(Vs.value + 1)
|
|
2658
2659
|
}, null, 8, [
|
|
2659
2660
|
"icon",
|
|
2660
2661
|
"label",
|
|
@@ -2665,20 +2666,20 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2665
2666
|
label: j(F).findClose,
|
|
2666
2667
|
variant: "text",
|
|
2667
2668
|
size: "sm",
|
|
2668
|
-
onClick:
|
|
2669
|
+
onClick: Xs
|
|
2669
2670
|
}, null, 8, ["icon", "label"])
|
|
2670
|
-
], 10,
|
|
2671
|
+
], 10, nr)) : g("", !0),
|
|
2671
2672
|
i.editMode === "batch" ? (E(), _("div", {
|
|
2672
2673
|
key: 3,
|
|
2673
2674
|
class: w(q.value.batchBar())
|
|
2674
2675
|
}, [
|
|
2675
|
-
v("span", { class: w(q.value.batchCount()) }, A(j(F).changes(
|
|
2676
|
+
v("span", { class: w(q.value.batchCount()) }, A(j(F).changes(Io.value)), 3),
|
|
2676
2677
|
b(ne, {
|
|
2677
2678
|
variant: "text",
|
|
2678
2679
|
size: "sm",
|
|
2679
2680
|
"leading-icon": j(Qe),
|
|
2680
|
-
disabled: !
|
|
2681
|
-
onClick:
|
|
2681
|
+
disabled: !jo.value,
|
|
2682
|
+
onClick: Po
|
|
2682
2683
|
}, {
|
|
2683
2684
|
default: M(() => [y(A(j(F).undo), 1)]),
|
|
2684
2685
|
_: 1
|
|
@@ -2687,8 +2688,8 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2687
2688
|
variant: "text",
|
|
2688
2689
|
size: "sm",
|
|
2689
2690
|
"leading-icon": j(qe),
|
|
2690
|
-
disabled: !
|
|
2691
|
-
onClick:
|
|
2691
|
+
disabled: !Mo.value,
|
|
2692
|
+
onClick: Fo
|
|
2692
2693
|
}, {
|
|
2693
2694
|
default: M(() => [y(A(j(F).redo), 1)]),
|
|
2694
2695
|
_: 1
|
|
@@ -2696,16 +2697,16 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2696
2697
|
b(ne, {
|
|
2697
2698
|
variant: "outline",
|
|
2698
2699
|
size: "sm",
|
|
2699
|
-
disabled: !
|
|
2700
|
-
onClick:
|
|
2700
|
+
disabled: !Io.value,
|
|
2701
|
+
onClick: zo
|
|
2701
2702
|
}, {
|
|
2702
2703
|
default: M(() => [y(A(j(F).discardChanges), 1)]),
|
|
2703
2704
|
_: 1
|
|
2704
2705
|
}, 8, ["disabled"]),
|
|
2705
2706
|
b(ne, {
|
|
2706
2707
|
size: "sm",
|
|
2707
|
-
disabled: !
|
|
2708
|
-
onClick:
|
|
2708
|
+
disabled: !Io.value,
|
|
2709
|
+
onClick: Ro
|
|
2709
2710
|
}, {
|
|
2710
2711
|
default: M(() => [y(A(j(F).saveChanges), 1)]),
|
|
2711
2712
|
_: 1
|
|
@@ -2714,17 +2715,17 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2714
2715
|
v("p", {
|
|
2715
2716
|
role: "status",
|
|
2716
2717
|
class: w(q.value.status())
|
|
2717
|
-
}, A(
|
|
2718
|
-
|
|
2718
|
+
}, A(sl.value), 3),
|
|
2719
|
+
tl.value && i.paginatorPosition === "top" ? (E(), _("div", {
|
|
2719
2720
|
key: 4,
|
|
2720
2721
|
class: w(q.value.footer())
|
|
2721
|
-
}, [
|
|
2722
|
+
}, [rl.value.length ? (E(), _("div", {
|
|
2722
2723
|
key: 0,
|
|
2723
2724
|
class: w(q.value.pageSize())
|
|
2724
|
-
}, [v("span",
|
|
2725
|
+
}, [v("span", rr, A(j(F).rowsPerPage), 1), b(se, {
|
|
2725
2726
|
class: w(q.value.pageSizeSelect()),
|
|
2726
2727
|
"aria-label": j(F).rowsPerPage,
|
|
2727
|
-
items:
|
|
2728
|
+
items: rl.value,
|
|
2728
2729
|
"model-value": String(V.value.pageSize),
|
|
2729
2730
|
"onUpdate:modelValue": t[7] ||= (e) => j(G).setPageSize(Number(e))
|
|
2730
2731
|
}, null, 8, [
|
|
@@ -2733,7 +2734,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2733
2734
|
"items",
|
|
2734
2735
|
"model-value"
|
|
2735
2736
|
])], 2)) : g("", !0), b(te, {
|
|
2736
|
-
count:
|
|
2737
|
+
count: nl.value,
|
|
2737
2738
|
"page-size": V.value.pageSize,
|
|
2738
2739
|
page: V.value.pageIndex + 1,
|
|
2739
2740
|
translations: { rootLabel: `${i.caption}: ${j(c).pagination.rootLabel}` },
|
|
@@ -2749,42 +2750,42 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2749
2750
|
v("div", {
|
|
2750
2751
|
ref: "scroll",
|
|
2751
2752
|
class: w(q.value.scroll()),
|
|
2752
|
-
style: T(
|
|
2753
|
-
onScroll:
|
|
2753
|
+
style: T(Pc.value),
|
|
2754
|
+
onScroll: Vc
|
|
2754
2755
|
}, [v("table", {
|
|
2755
2756
|
ref_key: "tableElement",
|
|
2756
|
-
ref:
|
|
2757
|
-
class: w(q.value.table({ class:
|
|
2758
|
-
style: T(
|
|
2759
|
-
"aria-busy":
|
|
2760
|
-
"aria-rowcount":
|
|
2761
|
-
role: K.value ?
|
|
2762
|
-
"aria-multiselectable": K.value && (i.selectable &&
|
|
2757
|
+
ref: Gc,
|
|
2758
|
+
class: w(q.value.table({ class: Mi.value ? q.value.fixedLayout() : void 0 })),
|
|
2759
|
+
style: T(Mi.value ? { minWidth: `${j(G).getTotalSize() + Fi.value + Ii.value}px` } : void 0),
|
|
2760
|
+
"aria-busy": Wn.value || void 0,
|
|
2761
|
+
"aria-rowcount": Nc.value ? Q.value.length + Vi.value.length : void 0,
|
|
2762
|
+
role: K.value ? bi.value ? "treegrid" : "grid" : void 0,
|
|
2763
|
+
"aria-multiselectable": K.value && (i.selectable && Ea.value || i.cellSelection) ? "true" : void 0,
|
|
2763
2764
|
tabindex: (i.cellSelection || i.editMode === "batch") && !K.value ? -1 : void 0,
|
|
2764
|
-
onKeydown:
|
|
2765
|
-
onFocusin:
|
|
2765
|
+
onKeydown: Xc,
|
|
2766
|
+
onFocusin: Yc
|
|
2766
2767
|
}, [
|
|
2767
2768
|
v("caption", { class: w(q.value.caption()) }, A(i.caption), 3),
|
|
2768
2769
|
v("thead", {
|
|
2769
2770
|
ref_key: "head",
|
|
2770
|
-
ref:
|
|
2771
|
+
ref: Wc,
|
|
2771
2772
|
class: w(q.value.head())
|
|
2772
2773
|
}, [
|
|
2773
|
-
(E(!0), _(p, null, O(
|
|
2774
|
+
(E(!0), _(p, null, O(Vi.value, (n, r) => (E(), _("tr", {
|
|
2774
2775
|
key: r,
|
|
2775
2776
|
class: w(q.value.headRow())
|
|
2776
2777
|
}, [
|
|
2777
2778
|
r === 0 ? (E(!0), _(p, { key: 0 }, O(J.value, (e) => (E(), _("th", {
|
|
2778
2779
|
key: e,
|
|
2779
2780
|
scope: "col",
|
|
2780
|
-
rowspan:
|
|
2781
|
+
rowspan: Vi.value.length,
|
|
2781
2782
|
class: w(q.value.th({ class: X(e, !0) })),
|
|
2782
|
-
style: T(
|
|
2783
|
-
}, [e === "select" &&
|
|
2783
|
+
style: T(Bi(e))
|
|
2784
|
+
}, [e === "select" && Ea.value ? (E(), h(re, {
|
|
2784
2785
|
key: 0,
|
|
2785
|
-
checked:
|
|
2786
|
+
checked: ka.value,
|
|
2786
2787
|
"aria-label": i.selectAllLabel ?? (i.selectAllMode === "all" ? j(F).selectAllRows : j(F).selectAll),
|
|
2787
|
-
"onUpdate:checked": t[9] ||= (e) =>
|
|
2788
|
+
"onUpdate:checked": t[9] ||= (e) => Aa(e === !0)
|
|
2788
2789
|
}, null, 8, ["checked", "aria-label"])) : e === "select" ? (E(), _("span", {
|
|
2789
2790
|
key: 1,
|
|
2790
2791
|
class: w(q.value.srOnly())
|
|
@@ -2792,9 +2793,9 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2792
2793
|
key: 2,
|
|
2793
2794
|
type: "button",
|
|
2794
2795
|
class: w(q.value.expander()),
|
|
2795
|
-
"aria-label":
|
|
2796
|
-
onClick: t[10] ||= (e) => j(G).toggleAllRowsExpanded(!
|
|
2797
|
-
}, [
|
|
2796
|
+
"aria-label": qa.value ? j(F).collapseAll : j(F).expandAll,
|
|
2797
|
+
onClick: t[10] ||= (e) => j(G).toggleAllRowsExpanded(!qa.value)
|
|
2798
|
+
}, [qa.value ? (E(), h(j(Fe), {
|
|
2798
2799
|
key: 0,
|
|
2799
2800
|
class: w(q.value.expanderIcon()),
|
|
2800
2801
|
"aria-hidden": "true"
|
|
@@ -2802,45 +2803,45 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2802
2803
|
key: 1,
|
|
2803
2804
|
class: w(q.value.expanderIcon()),
|
|
2804
2805
|
"aria-hidden": "true"
|
|
2805
|
-
}, null, 8, ["class"]))], 10,
|
|
2806
|
+
}, null, 8, ["class"]))], 10, or)) : e === "number" ? (E(), _(p, { key: 3 }, [y(A(j(F).rowNumber), 1)], 64)) : (E(), _("span", {
|
|
2806
2807
|
key: 4,
|
|
2807
2808
|
class: w(q.value.srOnly())
|
|
2808
|
-
}, A(j(F).reorder), 3))], 14,
|
|
2809
|
+
}, A(j(F).reorder), 3))], 14, ar))), 128)) : g("", !0),
|
|
2809
2810
|
(E(!0), _(p, null, O(n, (n) => (E(), _(p, { key: n.header.id }, [n.group ? (E(), _("th", {
|
|
2810
2811
|
key: 0,
|
|
2811
2812
|
scope: "colgroup",
|
|
2812
2813
|
colspan: n.header.colSpan,
|
|
2813
2814
|
rowspan: n.rowSpan > 1 ? n.rowSpan : void 0,
|
|
2814
2815
|
class: w(q.value.th({ class: q.value.groupTh() }))
|
|
2815
|
-
}, A(Z(n.header.column)), 11,
|
|
2816
|
+
}, A(Z(n.header.column)), 11, sr)) : (E(), _("th", {
|
|
2816
2817
|
key: 1,
|
|
2817
|
-
id:
|
|
2818
|
+
id: $s.value ? ec(n.header.column.id) : void 0,
|
|
2818
2819
|
scope: "col",
|
|
2819
2820
|
rowspan: n.rowSpan > 1 ? n.rowSpan : void 0,
|
|
2820
|
-
class: w(
|
|
2821
|
-
|
|
2821
|
+
class: w(Ci(n.header.column.id).th({ class: [
|
|
2822
|
+
Li(n.header.column.id, !0),
|
|
2822
2823
|
i.reorderableColumns ? q.value.dropTargetColumn() : "",
|
|
2823
2824
|
R.value.get(n.header.column.id)?.headerClass
|
|
2824
2825
|
] })),
|
|
2825
|
-
style: T(
|
|
2826
|
-
"aria-sort":
|
|
2827
|
-
"aria-describedby": R.value.get(n.header.column.id)?.headerHint ?
|
|
2828
|
-
draggable:
|
|
2829
|
-
"data-drop":
|
|
2830
|
-
"data-dragging":
|
|
2831
|
-
onDragstart: (e) =>
|
|
2832
|
-
onDragover: (e) =>
|
|
2833
|
-
onDragleave: t[11] ||= (e) =>
|
|
2834
|
-
onDrop:
|
|
2835
|
-
onDragend:
|
|
2836
|
-
}, [v("div", { class: w(
|
|
2837
|
-
|
|
2826
|
+
style: T(Ri(n.header.column.id, !0)),
|
|
2827
|
+
"aria-sort": Gi(n.header.column.id),
|
|
2828
|
+
"aria-describedby": R.value.get(n.header.column.id)?.headerHint ? tc(n.header.column.id) : void 0,
|
|
2829
|
+
draggable: Qi(n.header.column.id) && !n.header.column.getIsPinned() ? "true" : void 0,
|
|
2830
|
+
"data-drop": ca(n.header.column.id),
|
|
2831
|
+
"data-dragging": na.value === n.header.column.id || void 0,
|
|
2832
|
+
onDragstart: (e) => ia(n.header.column.id, e),
|
|
2833
|
+
onDragover: (e) => aa(n.header.column.id, e),
|
|
2834
|
+
onDragleave: t[11] ||= (e) => ra.value = null,
|
|
2835
|
+
onDrop: oa,
|
|
2836
|
+
onDragend: sa
|
|
2837
|
+
}, [v("div", { class: w(Ci(n.header.column.id).headContent()) }, [
|
|
2838
|
+
Ui(n.header.column.id) ? (E(), _("button", {
|
|
2838
2839
|
key: 0,
|
|
2839
2840
|
type: "button",
|
|
2840
2841
|
class: w(q.value.sortButton()),
|
|
2841
|
-
onClick: (e) =>
|
|
2842
|
+
onClick: (e) => qi(n.header.column.id, e)
|
|
2842
2843
|
}, [
|
|
2843
|
-
v("span", { class: w(
|
|
2844
|
+
v("span", { class: w(Hi(n.header.column)) }, A(Z(n.header.column)), 3),
|
|
2844
2845
|
n.header.column.getIsSorted() === "asc" ? (E(), h(j(ke), {
|
|
2845
2846
|
key: 0,
|
|
2846
2847
|
class: w(q.value.sortIcon()),
|
|
@@ -2854,13 +2855,13 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2854
2855
|
class: w(q.value.sortIcon()),
|
|
2855
2856
|
"aria-hidden": "true"
|
|
2856
2857
|
}, null, 8, ["class"])),
|
|
2857
|
-
B.value.length > 1 &&
|
|
2858
|
+
B.value.length > 1 && Ki(n.header.column.id) ? (E(), _(p, { key: 3 }, [v("span", {
|
|
2858
2859
|
class: w(q.value.sortBadge()),
|
|
2859
2860
|
"aria-hidden": "true"
|
|
2860
|
-
}, A(
|
|
2861
|
-
], 10,
|
|
2861
|
+
}, A(Ki(n.header.column.id)), 3), v("span", { class: w(q.value.srOnly()) }, A(j(F).sortPriority(Ki(n.header.column.id), n.header.column.getIsSorted() === "desc")), 3)], 64)) : g("", !0)
|
|
2862
|
+
], 10, lr)) : (E(), _("span", {
|
|
2862
2863
|
key: 1,
|
|
2863
|
-
class: w(
|
|
2864
|
+
class: w(Hi(n.header.column))
|
|
2864
2865
|
}, A(Z(n.header.column)), 3)),
|
|
2865
2866
|
R.value.get(n.header.column.id)?.headerHint ? (E(), _(p, { key: 2 }, [b(ie, {
|
|
2866
2867
|
label: Z(n.header.column),
|
|
@@ -2872,24 +2873,24 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2872
2873
|
default: M(() => [y(A(R.value.get(n.header.column.id).headerHint), 1)]),
|
|
2873
2874
|
_: 2
|
|
2874
2875
|
}, 1032, ["label", "classes"]), v("span", {
|
|
2875
|
-
id:
|
|
2876
|
+
id: tc(n.header.column.id),
|
|
2876
2877
|
hidden: ""
|
|
2877
|
-
}, A(R.value.get(n.header.column.id).headerHint), 9,
|
|
2878
|
-
|
|
2878
|
+
}, A(R.value.get(n.header.column.id).headerHint), 9, ur)], 64)) : g("", !0),
|
|
2879
|
+
ma.value && fa(R.value.get(n.header.column.id)) ? (E(), h($n, {
|
|
2879
2880
|
key: 3,
|
|
2880
2881
|
header: Z(n.header.column),
|
|
2881
2882
|
type: R.value.get(n.header.column.id).filter ?? "text",
|
|
2882
|
-
"model-value":
|
|
2883
|
-
options:
|
|
2883
|
+
"model-value": ga(n.header.column.id),
|
|
2884
|
+
options: _a(R.value.get(n.header.column.id)),
|
|
2884
2885
|
"match-modes": R.value.get(n.header.column.id).matchModes,
|
|
2885
2886
|
"input-props": R.value.get(n.header.column.id).filterInputProps,
|
|
2886
2887
|
"max-constraints": i.maxConstraints,
|
|
2887
|
-
"onUpdate:modelValue": (e) =>
|
|
2888
|
+
"onUpdate:modelValue": (e) => ya(n.header.column.id, e)
|
|
2888
2889
|
}, de({ _: 2 }, [j(P)[`option-${n.header.column.id}`] ? {
|
|
2889
2890
|
name: "option",
|
|
2890
2891
|
fn: M((t) => [k(e.$slots, `option-${n.header.column.id}`, S({ ref_for: !0 }, t))]),
|
|
2891
2892
|
key: "0"
|
|
2892
|
-
} : void 0,
|
|
2893
|
+
} : void 0, da(n.header.column.id) ? {
|
|
2893
2894
|
name: "value",
|
|
2894
2895
|
fn: M((t) => [k(e.$slots, `filter-${n.header.column.id}`, S({ ref_for: !0 }, {
|
|
2895
2896
|
...t,
|
|
@@ -2906,10 +2907,10 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2906
2907
|
"max-constraints",
|
|
2907
2908
|
"onUpdate:modelValue"
|
|
2908
2909
|
])) : g("", !0),
|
|
2909
|
-
|
|
2910
|
+
Ji.value ? (E(), h(d, {
|
|
2910
2911
|
key: 4,
|
|
2911
|
-
items:
|
|
2912
|
-
onSelect: (e) =>
|
|
2912
|
+
items: $i(n.header.column),
|
|
2913
|
+
onSelect: (e) => ta(n.header.column, e)
|
|
2913
2914
|
}, {
|
|
2914
2915
|
default: M(() => [v("button", {
|
|
2915
2916
|
type: "button",
|
|
@@ -2919,7 +2920,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2919
2920
|
}, [b(j(ze), {
|
|
2920
2921
|
class: w(q.value.headButtonIcon()),
|
|
2921
2922
|
"aria-hidden": "true"
|
|
2922
|
-
}, null, 8, ["class"])], 10,
|
|
2923
|
+
}, null, 8, ["class"])], 10, dr)]),
|
|
2923
2924
|
_: 2
|
|
2924
2925
|
}, 1032, ["items", "onSelect"])) : g("", !0)
|
|
2925
2926
|
], 2), i.resizable ? (E(), _("div", {
|
|
@@ -2928,66 +2929,66 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2928
2929
|
"aria-orientation": "vertical",
|
|
2929
2930
|
"aria-label": j(F).resize(Z(n.header.column)),
|
|
2930
2931
|
"aria-valuenow": n.header.column.getSize(),
|
|
2931
|
-
"aria-valuemin":
|
|
2932
|
+
"aria-valuemin": Br,
|
|
2932
2933
|
"aria-valuemax": 1200,
|
|
2933
2934
|
tabindex: "0",
|
|
2934
|
-
class: w(q.value.resizer({ edge:
|
|
2935
|
+
class: w(q.value.resizer({ edge: ji(n.header.column.id) })),
|
|
2935
2936
|
"data-resizing": n.header.column.getIsResizing() || void 0,
|
|
2936
2937
|
onMousedown: (e) => n.header.getResizeHandler()(e),
|
|
2937
2938
|
onTouchstart: (e) => n.header.getResizeHandler()(e),
|
|
2938
|
-
onKeydown: (e) =>
|
|
2939
|
-
onDblclick: (e) =>
|
|
2940
|
-
}, null, 42,
|
|
2941
|
-
r === 0 &&
|
|
2939
|
+
onKeydown: (e) => ua(n.header.column.id, e),
|
|
2940
|
+
onDblclick: (e) => la(n.header.column.id, e)
|
|
2941
|
+
}, null, 42, fr)) : g("", !0)], 46, cr))], 64))), 128)),
|
|
2942
|
+
r === 0 && ki.value.length ? (E(), _("th", {
|
|
2942
2943
|
key: 1,
|
|
2943
2944
|
scope: "col",
|
|
2944
|
-
rowspan:
|
|
2945
|
+
rowspan: Vi.value.length,
|
|
2945
2946
|
class: w(q.value.th({ class: X("actions", !0) })),
|
|
2946
|
-
style: T(
|
|
2947
|
-
}, [v("span", { class: w(q.value.srOnly()) }, A(j(F).actions), 3)], 14,
|
|
2947
|
+
style: T(Bi("actions"))
|
|
2948
|
+
}, [v("span", { class: w(q.value.srOnly()) }, A(j(F).actions), 3)], 14, pr)) : g("", !0)
|
|
2948
2949
|
], 2))), 128)),
|
|
2949
|
-
|
|
2950
|
+
pa.value ? (E(), _("tr", {
|
|
2950
2951
|
key: 0,
|
|
2951
2952
|
class: w(q.value.filterRow())
|
|
2952
2953
|
}, [
|
|
2953
2954
|
(E(!0), _(p, null, O(J.value, (e) => (E(), _("td", {
|
|
2954
2955
|
key: e,
|
|
2955
2956
|
class: w(X(e, !0)),
|
|
2956
|
-
style: T(
|
|
2957
|
+
style: T(Bi(e))
|
|
2957
2958
|
}, null, 6))), 128)),
|
|
2958
2959
|
(E(!0), _(p, null, O(Y.value, (t) => (E(), _("td", {
|
|
2959
2960
|
key: t.id,
|
|
2960
|
-
class: w(
|
|
2961
|
-
style: T(
|
|
2962
|
-
}, [
|
|
2963
|
-
value:
|
|
2964
|
-
setValue: (e) =>
|
|
2961
|
+
class: w(Ci(t.id).filterCell({ class: Li(t.id, !0) })),
|
|
2962
|
+
style: T(Ri(t.id, !0))
|
|
2963
|
+
}, [fa(R.value.get(t.id)) ? (E(), _(p, { key: 0 }, [da(t.id) ? k(e.$slots, `filter-${t.id}`, S({ ref_for: !0 }, {
|
|
2964
|
+
value: va(R.value.get(t.id)),
|
|
2965
|
+
setValue: (e) => Sa(R.value.get(t.id), e),
|
|
2965
2966
|
column: R.value.get(t.id)
|
|
2966
|
-
}), void 0, void 0, 0) : j(At)(
|
|
2967
|
+
}), void 0, void 0, 0) : j(At)(ba(R.value.get(t.id))) && wa(R.value.get(t.id)) ? (E(), h(Qn, {
|
|
2967
2968
|
key: 1,
|
|
2968
2969
|
range: "",
|
|
2969
|
-
type:
|
|
2970
|
+
type: xa(R.value.get(t.id)),
|
|
2970
2971
|
label: j(F).filter(Z(t)),
|
|
2971
2972
|
"input-props": R.value.get(t.id).filterInputProps,
|
|
2972
|
-
"model-value":
|
|
2973
|
-
"onUpdate:modelValue": (e) =>
|
|
2973
|
+
"model-value": va(R.value.get(t.id)),
|
|
2974
|
+
"onUpdate:modelValue": (e) => Sa(R.value.get(t.id), e)
|
|
2974
2975
|
}, null, 8, [
|
|
2975
2976
|
"type",
|
|
2976
2977
|
"label",
|
|
2977
2978
|
"input-props",
|
|
2978
2979
|
"model-value",
|
|
2979
2980
|
"onUpdate:modelValue"
|
|
2980
|
-
])) : j(At)(
|
|
2981
|
+
])) : j(At)(ba(R.value.get(t.id))) ? (E(), _("div", {
|
|
2981
2982
|
key: 2,
|
|
2982
2983
|
class: w(q.value.filterRowRange())
|
|
2983
|
-
}, [(E(), _(p, null, O([0, 1], (e) => b(
|
|
2984
|
+
}, [(E(), _(p, null, O([0, 1], (e) => b(Qn, {
|
|
2984
2985
|
key: e,
|
|
2985
|
-
type:
|
|
2986
|
+
type: xa(R.value.get(t.id)),
|
|
2986
2987
|
label: `${j(F).filter(Z(t))}, ${e ? j(F).to : j(F).from}`,
|
|
2987
|
-
options:
|
|
2988
|
+
options: _a(R.value.get(t.id)),
|
|
2988
2989
|
"input-props": R.value.get(t.id).filterInputProps,
|
|
2989
|
-
"model-value":
|
|
2990
|
-
"onUpdate:modelValue": (n) =>
|
|
2990
|
+
"model-value": Ta(R.value.get(t.id), e),
|
|
2991
|
+
"onUpdate:modelValue": (n) => Ca(R.value.get(t.id), e, n)
|
|
2991
2992
|
}, null, 8, [
|
|
2992
2993
|
"type",
|
|
2993
2994
|
"label",
|
|
@@ -2995,16 +2996,16 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
2995
2996
|
"input-props",
|
|
2996
2997
|
"model-value",
|
|
2997
2998
|
"onUpdate:modelValue"
|
|
2998
|
-
])), 64))], 2)) : (E(), h(
|
|
2999
|
+
])), 64))], 2)) : (E(), h(Qn, {
|
|
2999
3000
|
key: 3,
|
|
3000
|
-
type:
|
|
3001
|
+
type: xa(R.value.get(t.id)),
|
|
3001
3002
|
label: j(F).filter(Z(t)),
|
|
3002
|
-
options:
|
|
3003
|
+
options: _a(R.value.get(t.id)),
|
|
3003
3004
|
"input-props": R.value.get(t.id).filterInputProps,
|
|
3004
3005
|
any: "",
|
|
3005
3006
|
filter: "",
|
|
3006
|
-
"model-value":
|
|
3007
|
-
"onUpdate:modelValue": (e) =>
|
|
3007
|
+
"model-value": va(R.value.get(t.id)),
|
|
3008
|
+
"onUpdate:modelValue": (e) => Sa(R.value.get(t.id), e)
|
|
3008
3009
|
}, de({ _: 2 }, [j(P)[`option-${t.id}`] ? {
|
|
3009
3010
|
name: "option",
|
|
3010
3011
|
fn: M((n) => [k(e.$slots, `option-${t.id}`, S({ ref_for: !0 }, n))]),
|
|
@@ -3017,69 +3018,69 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
3017
3018
|
"model-value",
|
|
3018
3019
|
"onUpdate:modelValue"
|
|
3019
3020
|
]))], 64)) : g("", !0)], 6))), 128)),
|
|
3020
|
-
|
|
3021
|
+
ki.value.length ? (E(), _("td", {
|
|
3021
3022
|
key: 0,
|
|
3022
3023
|
class: w(X("actions", !0)),
|
|
3023
|
-
style: T(
|
|
3024
|
+
style: T(Bi("actions"))
|
|
3024
3025
|
}, null, 6)) : g("", !0)
|
|
3025
3026
|
], 2)) : g("", !0),
|
|
3026
|
-
|
|
3027
|
+
Ya.value && i.footerPosition === "top" ? (E(), _("tr", mr, [
|
|
3027
3028
|
(E(!0), _(p, null, O(J.value, (e) => (E(), _("td", {
|
|
3028
3029
|
key: e,
|
|
3029
3030
|
class: w(q.value.footCell({ class: X(e, !1) })),
|
|
3030
|
-
style: T(
|
|
3031
|
+
style: T(Bi(e))
|
|
3031
3032
|
}, null, 6))), 128)),
|
|
3032
3033
|
(E(!0), _(p, null, O(Y.value, (t) => (E(), _("td", {
|
|
3033
3034
|
key: t.id,
|
|
3034
|
-
class: w(
|
|
3035
|
-
style: T(
|
|
3036
|
-
}, [e.$slots[`footer-${t.id}`] ? k(e.$slots, `footer-${t.id}`, S({ ref_for: !0 },
|
|
3037
|
-
|
|
3035
|
+
class: w(Ci(t.id).footCell({ class: [Li(t.id, !1), wi(t.id)] })),
|
|
3036
|
+
style: T(Ri(t.id, !1))
|
|
3037
|
+
}, [e.$slots[`footer-${t.id}`] ? k(e.$slots, `footer-${t.id}`, S({ ref_for: !0 }, $a(R.value.get(t.id))), void 0, void 0, 0) : (E(), _(p, { key: 1 }, [y(A(Qa(R.value.get(t.id))), 1)], 64))], 6))), 128)),
|
|
3038
|
+
ki.value.length ? (E(), _("td", {
|
|
3038
3039
|
key: 0,
|
|
3039
3040
|
class: w(q.value.footCell({ class: X("actions", !1) })),
|
|
3040
|
-
style: T(
|
|
3041
|
+
style: T(Bi("actions"))
|
|
3041
3042
|
}, null, 6)) : g("", !0)
|
|
3042
3043
|
])) : g("", !0)
|
|
3043
3044
|
], 2),
|
|
3044
|
-
|
|
3045
|
+
Ha.value.length ? (E(), _("tbody", {
|
|
3045
3046
|
key: 0,
|
|
3046
3047
|
class: w(q.value.frozenBody()),
|
|
3047
|
-
style: T(i.scrollHeight ? { top: `${
|
|
3048
|
-
}, [(E(!0), _(p, null, O(
|
|
3048
|
+
style: T(i.scrollHeight ? { top: `${Hc.value}px` } : void 0)
|
|
3049
|
+
}, [(E(!0), _(p, null, O(Ha.value, (t, n) => (E(), _("tr", {
|
|
3049
3050
|
key: t.id,
|
|
3050
3051
|
class: w(q.value.row({ class: i.rowClass?.(t.original) })),
|
|
3051
|
-
"data-state":
|
|
3052
|
-
"aria-selected": K.value && i.selectable ?
|
|
3052
|
+
"data-state": Oa(t) ? "selected" : void 0,
|
|
3053
|
+
"aria-selected": K.value && i.selectable ? Oa(t) : void 0,
|
|
3053
3054
|
"data-row-id": t.id,
|
|
3054
3055
|
"data-stripe": he("striped") ? String(n % 2 == 1) : void 0
|
|
3055
3056
|
}, [
|
|
3056
3057
|
(E(!0), _(p, null, O(J.value, (e) => (E(), _("td", {
|
|
3057
3058
|
key: e,
|
|
3058
3059
|
class: w(q.value.td({ class: X(e, !1) })),
|
|
3059
|
-
style: T(
|
|
3060
|
+
style: T(Bi(e))
|
|
3060
3061
|
}, null, 6))), 128)),
|
|
3061
3062
|
(E(!0), _(p, null, O(t.getVisibleCells(), (n) => (E(), _("td", {
|
|
3062
3063
|
key: n.id,
|
|
3063
|
-
class: w(
|
|
3064
|
-
style: T(
|
|
3065
|
-
}, [
|
|
3064
|
+
class: w(Ci(n.column.id).td({ class: [Li(n.column.id, !1), wi(n.column.id, t)] })),
|
|
3065
|
+
style: T(Ri(n.column.id, !1))
|
|
3066
|
+
}, [Ei(R.value.get(n.column.id), t) && (Di.value && Bo.value?.rowId === t.id && Bo.value.columnId === n.column.id || i.editMode === "row" && Vo.value === t.id) ? (E(), _("div", {
|
|
3066
3067
|
key: 0,
|
|
3067
3068
|
"data-editor": "",
|
|
3068
3069
|
class: w(q.value.editor()),
|
|
3069
|
-
"aria-busy":
|
|
3070
|
-
onKeydownCapture: (e) =>
|
|
3071
|
-
onKeydown: (e) =>
|
|
3072
|
-
onFocusout: (e) =>
|
|
3073
|
-
}, [j(P)[`editor-${n.column.id}`] ? k(e.$slots, `editor-${n.column.id}`, S({ ref_for: !0 },
|
|
3070
|
+
"aria-busy": $o.value || void 0,
|
|
3071
|
+
onKeydownCapture: (e) => ls(t, n.column.id, e),
|
|
3072
|
+
onKeydown: (e) => Di.value ? is(t, n.column.id, e) : ps(t, e),
|
|
3073
|
+
onFocusout: (e) => Di.value ? as(t, n.column.id, e) : void 0
|
|
3074
|
+
}, [j(P)[`editor-${n.column.id}`] ? k(e.$slots, `editor-${n.column.id}`, S({ ref_for: !0 }, us(t, R.value.get(n.column.id))), void 0, void 0, 0) : (E(), h(Qn, {
|
|
3074
3075
|
key: 1,
|
|
3075
|
-
type:
|
|
3076
|
+
type: Go(R.value.get(n.column.id)),
|
|
3076
3077
|
label: Z(n.column),
|
|
3077
3078
|
options: R.value.get(n.column.id).editOptions,
|
|
3078
3079
|
"input-props": R.value.get(n.column.id).editInputProps,
|
|
3079
3080
|
edit: "",
|
|
3080
|
-
invalid: !!
|
|
3081
|
-
"model-value":
|
|
3082
|
-
"onUpdate:modelValue": (e) =>
|
|
3081
|
+
invalid: !!Uo.value[n.column.id],
|
|
3082
|
+
"model-value": Ho.value[n.column.id],
|
|
3083
|
+
"onUpdate:modelValue": (e) => cs(t, R.value.get(n.column.id), e)
|
|
3083
3084
|
}, de({ _: 2 }, [j(P)[`option-${n.column.id}`] ? {
|
|
3084
3085
|
name: "option",
|
|
3085
3086
|
fn: M((t) => [k(e.$slots, `option-${n.column.id}`, S({ ref_for: !0 }, t))]),
|
|
@@ -3092,22 +3093,22 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
3092
3093
|
"invalid",
|
|
3093
3094
|
"model-value",
|
|
3094
3095
|
"onUpdate:modelValue"
|
|
3095
|
-
])),
|
|
3096
|
+
])), Uo.value[n.column.id] ? (E(), _("span", {
|
|
3096
3097
|
key: 2,
|
|
3097
|
-
id:
|
|
3098
|
+
id: qo(t.id, n.column.id),
|
|
3098
3099
|
role: "alert",
|
|
3099
3100
|
class: w(q.value.editError())
|
|
3100
|
-
}, A(
|
|
3101
|
+
}, A(Uo.value[n.column.id]), 11, _r)) : g("", !0)], 42, gr)) : Di.value && Ei(R.value.get(n.column.id), t) ? (E(), _("button", {
|
|
3101
3102
|
key: 1,
|
|
3102
3103
|
type: "button",
|
|
3103
|
-
class: w(
|
|
3104
|
-
"data-edit":
|
|
3105
|
-
"aria-label": `${j(F).edit(Z(n.column), z(R.value.get(n.column.id), $(t, n.column.id), t.original))}${
|
|
3106
|
-
onClick: (e) =>
|
|
3104
|
+
class: w(Ci(n.column.id).editButton()),
|
|
3105
|
+
"data-edit": Ko(t.id, n.column.id),
|
|
3106
|
+
"aria-label": `${j(F).edit(Z(n.column), z(R.value.get(n.column.id), $(t, n.column.id), t.original))}${oc(t, n.column.id) ? `, ${j(F).changed}` : ""}`,
|
|
3107
|
+
onClick: (e) => Zo(t, n.column.id, e)
|
|
3107
3108
|
}, [k(e.$slots, `cell-${n.column.id}`, {
|
|
3108
3109
|
row: t.original,
|
|
3109
3110
|
value: $(t, n.column.id)
|
|
3110
|
-
}, () => [y(A(z(R.value.get(n.column.id), $(t, n.column.id), t.original)), 1)])], 10,
|
|
3111
|
+
}, () => [y(A(z(R.value.get(n.column.id), $(t, n.column.id), t.original)), 1)])], 10, vr)) : R.value.get(n.column.id)?.copyable ? (E(), _("span", {
|
|
3111
3112
|
key: 2,
|
|
3112
3113
|
class: w(q.value.copyCell())
|
|
3113
3114
|
}, [k(e.$slots, `cell-${n.column.id}`, {
|
|
@@ -3120,19 +3121,19 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
3120
3121
|
row: t.original,
|
|
3121
3122
|
value: n.getValue()
|
|
3122
3123
|
}, () => [y(A(z(R.value.get(n.column.id), n.getValue(), t.original)), 1)], void 0, 3)], 6))), 128)),
|
|
3123
|
-
|
|
3124
|
+
ki.value.length ? (E(), _("td", {
|
|
3124
3125
|
key: 0,
|
|
3125
3126
|
class: w(q.value.td({ class: X("actions", !1) })),
|
|
3126
|
-
style: T(
|
|
3127
|
-
}, [i.editMode === "row" &&
|
|
3127
|
+
style: T(Bi("actions"))
|
|
3128
|
+
}, [i.editMode === "row" && Ti.value ? (E(), _("div", {
|
|
3128
3129
|
key: 0,
|
|
3129
3130
|
class: w(q.value.editActions())
|
|
3130
|
-
}, [
|
|
3131
|
+
}, [Vo.value === t.id ? (E(), _(p, { key: 0 }, [b(f, {
|
|
3131
3132
|
icon: j(je),
|
|
3132
3133
|
label: j(F).saveRow(W(t.original, t.index)),
|
|
3133
3134
|
variant: "text",
|
|
3134
3135
|
size: "sm",
|
|
3135
|
-
onClick: (e) =>
|
|
3136
|
+
onClick: (e) => fs(t, !0)
|
|
3136
3137
|
}, null, 8, [
|
|
3137
3138
|
"icon",
|
|
3138
3139
|
"label",
|
|
@@ -3142,7 +3143,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
3142
3143
|
label: j(F).cancelEdit(W(t.original, t.index)),
|
|
3143
3144
|
variant: "text",
|
|
3144
3145
|
size: "sm",
|
|
3145
|
-
onClick: (e) =>
|
|
3146
|
+
onClick: (e) => fs(t, !1)
|
|
3146
3147
|
}, null, 8, [
|
|
3147
3148
|
"icon",
|
|
3148
3149
|
"label",
|
|
@@ -3154,80 +3155,80 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
3154
3155
|
label: j(F).editRow(W(t.original, t.index)),
|
|
3155
3156
|
variant: "text",
|
|
3156
3157
|
size: "sm",
|
|
3157
|
-
onClick: (e) =>
|
|
3158
|
+
onClick: (e) => ds(t)
|
|
3158
3159
|
}, null, 8, [
|
|
3159
3160
|
"data-row-edit",
|
|
3160
3161
|
"icon",
|
|
3161
3162
|
"label",
|
|
3162
3163
|
"onClick"
|
|
3163
3164
|
]))], 2)) : g("", !0)], 6)) : g("", !0)
|
|
3164
|
-
], 10,
|
|
3165
|
-
b(
|
|
3165
|
+
], 10, hr))), 128))], 6)) : g("", !0),
|
|
3166
|
+
b(io, {
|
|
3166
3167
|
enabled: !!i.contextMenu && !!i.rowActions,
|
|
3167
|
-
items:
|
|
3168
|
-
label:
|
|
3169
|
-
onSelect: t[16] ||= (e) =>
|
|
3168
|
+
items: to.value ? eo(to.value) : [],
|
|
3169
|
+
label: to.value ? j(F).rowActions(W(to.value.original, to.value.index)) : void 0,
|
|
3170
|
+
onSelect: t[16] ||= (e) => ro(to.value, e)
|
|
3170
3171
|
}, {
|
|
3171
|
-
default: M(() => [v("tbody", { onContextmenuCapture:
|
|
3172
|
-
Q.value.length === 0 && !
|
|
3173
|
-
colspan:
|
|
3172
|
+
default: M(() => [v("tbody", { onContextmenuCapture: no }, [
|
|
3173
|
+
Q.value.length === 0 && !cl.value ? (E(), _("tr", yr, [v("td", {
|
|
3174
|
+
colspan: Ai.value,
|
|
3174
3175
|
class: w(q.value.message())
|
|
3175
|
-
}, [
|
|
3176
|
+
}, [Un.value ? (E(), _("span", {
|
|
3176
3177
|
key: 0,
|
|
3177
3178
|
class: w(q.value.errorContent())
|
|
3178
|
-
}, [v("span",
|
|
3179
|
+
}, [v("span", xr, A(j(c).dataSource.error), 1), b(ne, {
|
|
3179
3180
|
variant: "outline",
|
|
3180
3181
|
size: "sm",
|
|
3181
|
-
onClick:
|
|
3182
|
+
onClick: _c
|
|
3182
3183
|
}, {
|
|
3183
3184
|
default: M(() => [y(A(j(c).dataSource.retry), 1)]),
|
|
3184
3185
|
_: 1
|
|
3185
|
-
})], 2)) :
|
|
3186
|
+
})], 2)) : Wn.value ? k(e.$slots, "loadingContent", {}, () => [v("span", { class: w(q.value.messageContent()) }, [b(oe, {
|
|
3186
3187
|
size: "sm",
|
|
3187
3188
|
label: i.loadingText ?? j(c).common.loading
|
|
3188
|
-
}, null, 8, ["label"]), y(A(i.loadingText ?? j(c).common.loading), 1)], 2)], void 0, 1) :
|
|
3189
|
-
|
|
3189
|
+
}, null, 8, ["label"]), y(A(i.loadingText ?? j(c).common.loading), 1)], 2)], void 0, 1) : ul.value ? k(e.$slots, "noResults", {}, () => [y(A(i.noResultsText ?? i.emptyText ?? j(c).common.empty), 1)], void 0, 2) : k(e.$slots, "empty", {}, () => [y(A(i.emptyText ?? j(c).common.empty), 1)], void 0, 3)], 10, br)])) : g("", !0),
|
|
3190
|
+
cl.value ? (E(!0), _(p, { key: 1 }, O(ll.value, (e) => (E(), _("tr", {
|
|
3190
3191
|
key: `skeleton-${e}`,
|
|
3191
3192
|
class: w(q.value.row())
|
|
3192
3193
|
}, [
|
|
3193
3194
|
(E(!0), _(p, null, O(J.value, (e) => (E(), _("td", {
|
|
3194
3195
|
key: e,
|
|
3195
3196
|
class: w(q.value.td({ class: X(e, !1) })),
|
|
3196
|
-
style: T(
|
|
3197
|
+
style: T(Bi(e))
|
|
3197
3198
|
}, null, 6))), 128)),
|
|
3198
3199
|
(E(!0), _(p, null, O(Y.value, (e) => (E(), _("td", {
|
|
3199
3200
|
key: e.id,
|
|
3200
|
-
class: w(
|
|
3201
|
-
style: T(
|
|
3201
|
+
class: w(Ci(e.id).td({ class: Li(e.id, !1) })),
|
|
3202
|
+
style: T(Ri(e.id, !1))
|
|
3202
3203
|
}, [b(ee)], 6))), 128)),
|
|
3203
|
-
|
|
3204
|
+
ki.value.length ? (E(), _("td", {
|
|
3204
3205
|
key: 0,
|
|
3205
3206
|
class: w(q.value.td({ class: X("actions", !1) })),
|
|
3206
|
-
style: T(
|
|
3207
|
+
style: T(Bi("actions"))
|
|
3207
3208
|
}, null, 6)) : g("", !0)
|
|
3208
3209
|
], 2))), 128)) : g("", !0),
|
|
3209
|
-
|
|
3210
|
+
Lc.value > 0 && !cl.value ? (E(), _("tr", {
|
|
3210
3211
|
key: 2,
|
|
3211
3212
|
class: w(q.value.spacer()),
|
|
3212
3213
|
"aria-hidden": "true"
|
|
3213
3214
|
}, [v("td", {
|
|
3214
|
-
colspan:
|
|
3215
|
+
colspan: Ai.value,
|
|
3215
3216
|
class: w(q.value.spacerCell()),
|
|
3216
|
-
style: T({ height: `${
|
|
3217
|
-
}, null, 14,
|
|
3218
|
-
(E(!0), _(p, null, O(
|
|
3217
|
+
style: T({ height: `${Lc.value}px` })
|
|
3218
|
+
}, null, 14, Sr)], 2)) : g("", !0),
|
|
3219
|
+
(E(!0), _(p, null, O(cl.value ? [] : Ic.value, (n) => (E(), _(p, { key: n.key }, [n.kind === "group" ? (E(), _("tr", {
|
|
3219
3220
|
key: 0,
|
|
3220
3221
|
ref_for: !0,
|
|
3221
|
-
ref:
|
|
3222
|
-
class: w(q.value.groupRow(
|
|
3222
|
+
ref: zc,
|
|
3223
|
+
class: w(q.value.groupRow(so.value ? { class: [q.value.dropTarget(), q.value.dropInside()] } : {})),
|
|
3223
3224
|
"data-index": n.index,
|
|
3224
|
-
"aria-rowindex":
|
|
3225
|
-
"data-drop":
|
|
3226
|
-
onDragover: (e) => i.reorderableRows ?
|
|
3227
|
-
onDragleave: t[12] ||= (e) => i.reorderableRows ?
|
|
3228
|
-
onDrop: t[13] ||= (e) => i.reorderableRows ?
|
|
3225
|
+
"aria-rowindex": Nc.value ? n.index + Vi.value.length + 1 : void 0,
|
|
3226
|
+
"data-drop": so.value ? Eo(n.row.id) : void 0,
|
|
3227
|
+
onDragover: (e) => i.reorderableRows ? Co(n.row, e) : void 0,
|
|
3228
|
+
onDragleave: t[12] ||= (e) => i.reorderableRows ? lo.value = null : void 0,
|
|
3229
|
+
onDrop: t[13] ||= (e) => i.reorderableRows ? wo(e) : void 0
|
|
3229
3230
|
}, [v("td", {
|
|
3230
|
-
colspan:
|
|
3231
|
+
colspan: Ja.value ? J.value.length + 1 : Ai.value,
|
|
3231
3232
|
class: w(q.value.groupCell())
|
|
3232
3233
|
}, [v("div", {
|
|
3233
3234
|
class: w(q.value.treeCell()),
|
|
@@ -3243,84 +3244,84 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
3243
3244
|
class: w(q.value.expanderIcon()),
|
|
3244
3245
|
"data-state": n.row.getIsExpanded() ? "open" : "closed",
|
|
3245
3246
|
"aria-hidden": "true"
|
|
3246
|
-
}, null, 8, ["class", "data-state"])], 10,
|
|
3247
|
+
}, null, 8, ["class", "data-state"])], 10, Tr),
|
|
3247
3248
|
v("span", { class: w(q.value.groupLabel()) }, A(z(R.value.get(n.row.groupingColumnId), n.row.groupingValue, n.row.original)), 3),
|
|
3248
3249
|
v("span", { class: w(q.value.groupCount()) }, "(" + A(n.row.getLeafRows().length) + ")", 3)
|
|
3249
|
-
], 6)], 10,
|
|
3250
|
+
], 6)], 10, wr), Ja.value ? (E(), _(p, { key: 0 }, [(E(!0), _(p, null, O(Y.value.slice(1), (e) => (E(), _("td", {
|
|
3250
3251
|
key: e.id,
|
|
3251
|
-
class: w(
|
|
3252
|
-
}, A(
|
|
3252
|
+
class: w(Ci(e.id).groupAggregate())
|
|
3253
|
+
}, A(Za(R.value.get(e.id), n.row.getLeafRows())), 3))), 128)), ki.value.length ? (E(), _("td", {
|
|
3253
3254
|
key: 0,
|
|
3254
3255
|
class: w(q.value.groupAggregate())
|
|
3255
|
-
}, null, 2)) : g("", !0)], 64)) : g("", !0)], 42,
|
|
3256
|
+
}, null, 2)) : g("", !0)], 64)) : g("", !0)], 42, Cr)) : n.kind === "expansion" ? (E(), _("tr", {
|
|
3256
3257
|
key: 1,
|
|
3257
|
-
id:
|
|
3258
|
+
id: Ka(n.row),
|
|
3258
3259
|
ref_for: !0,
|
|
3259
|
-
ref:
|
|
3260
|
+
ref: zc,
|
|
3260
3261
|
class: w(q.value.expansionRow()),
|
|
3261
3262
|
"data-index": n.index,
|
|
3262
|
-
"aria-rowindex":
|
|
3263
|
+
"aria-rowindex": Nc.value ? n.index + Vi.value.length + 1 : void 0
|
|
3263
3264
|
}, [v("td", {
|
|
3264
|
-
colspan:
|
|
3265
|
+
colspan: Ai.value,
|
|
3265
3266
|
class: w(q.value.expansionCell())
|
|
3266
3267
|
}, [k(e.$slots, "expansion", {
|
|
3267
3268
|
row: n.row.original,
|
|
3268
3269
|
rowId: n.row.id
|
|
3269
|
-
})], 10,
|
|
3270
|
+
})], 10, Dr)], 10, Er)) : (E(), _("tr", {
|
|
3270
3271
|
key: 2,
|
|
3271
3272
|
ref_for: !0,
|
|
3272
|
-
ref:
|
|
3273
|
+
ref: zc,
|
|
3273
3274
|
class: w(q.value.row({ class: [
|
|
3274
3275
|
i.reorderableRows ? q.value.dropTarget() : "",
|
|
3275
|
-
i.reorderableRows &&
|
|
3276
|
+
i.reorderableRows && fo.value && so.value ? q.value.dropInside() : "",
|
|
3276
3277
|
i.rowHref?.(n.row.original) ? q.value.linkRow() : "",
|
|
3277
3278
|
i.rowClass?.(n.row.original)
|
|
3278
3279
|
] })),
|
|
3279
|
-
"data-state":
|
|
3280
|
-
"aria-selected": K.value && i.selectable ?
|
|
3280
|
+
"data-state": Oa(n.row) ? "selected" : void 0,
|
|
3281
|
+
"aria-selected": K.value && i.selectable ? Oa(n.row) : void 0,
|
|
3281
3282
|
"data-row-id": n.row.id,
|
|
3282
|
-
"data-stripe":
|
|
3283
|
+
"data-stripe": Ga(n.row),
|
|
3283
3284
|
"data-index": n.index,
|
|
3284
|
-
"aria-rowindex":
|
|
3285
|
-
"aria-level":
|
|
3286
|
-
"aria-expanded":
|
|
3287
|
-
draggable:
|
|
3288
|
-
"data-drop":
|
|
3289
|
-
"data-dragging":
|
|
3290
|
-
onClick: (e) =>
|
|
3291
|
-
onAuxclick: (e) =>
|
|
3292
|
-
onDragstart: (e) =>
|
|
3293
|
-
onDragover: (e) =>
|
|
3294
|
-
onDragleave: t[15] ||= (e) =>
|
|
3295
|
-
onDrop:
|
|
3296
|
-
onDragend:
|
|
3285
|
+
"aria-rowindex": Nc.value ? n.index + Vi.value.length + 1 : void 0,
|
|
3286
|
+
"aria-level": bi.value ? n.row.depth + 1 : void 0,
|
|
3287
|
+
"aria-expanded": bi.value && n.row.getCanExpand() ? n.row.getIsExpanded() : void 0,
|
|
3288
|
+
draggable: co.value === n.row.id ? "true" : void 0,
|
|
3289
|
+
"data-drop": Eo(n.row.id),
|
|
3290
|
+
"data-dragging": so.value === n.row.id || void 0,
|
|
3291
|
+
onClick: (e) => La(n.row, e),
|
|
3292
|
+
onAuxclick: (e) => Ra(n.row, e),
|
|
3293
|
+
onDragstart: (e) => xo(n.row, e),
|
|
3294
|
+
onDragover: (e) => So(n.row, e),
|
|
3295
|
+
onDragleave: t[15] ||= (e) => lo.value = null,
|
|
3296
|
+
onDrop: wo,
|
|
3297
|
+
onDragend: To
|
|
3297
3298
|
}, [
|
|
3298
3299
|
(E(!0), _(p, null, O(J.value, (e) => (E(), _("td", {
|
|
3299
3300
|
key: e,
|
|
3300
3301
|
class: w(q.value.td({ class: X(e, !1) })),
|
|
3301
|
-
style: T(
|
|
3302
|
+
style: T(Bi(e))
|
|
3302
3303
|
}, [e === "drag" ? (E(), _("button", {
|
|
3303
3304
|
key: 0,
|
|
3304
3305
|
type: "button",
|
|
3305
3306
|
class: w(q.value.dragHandle()),
|
|
3306
3307
|
"data-drag-handle": n.row.id,
|
|
3307
3308
|
"aria-label": j(F).moveRow(W(n.row.original, n.row.index)),
|
|
3308
|
-
"aria-keyshortcuts":
|
|
3309
|
-
onKeydown: (e) =>
|
|
3310
|
-
onPointerdown: (e) =>
|
|
3311
|
-
onPointerup: t[14] ||= (e) =>
|
|
3309
|
+
"aria-keyshortcuts": fo.value ? "ArrowUp ArrowDown ArrowLeft ArrowRight" : "ArrowUp ArrowDown",
|
|
3310
|
+
onKeydown: (e) => bo(n.row, e),
|
|
3311
|
+
onPointerdown: (e) => co.value = n.row.id,
|
|
3312
|
+
onPointerup: t[14] ||= (e) => co.value = so.value ? co.value : null
|
|
3312
3313
|
}, [b(j(He), {
|
|
3313
3314
|
class: w(q.value.dragIcon()),
|
|
3314
3315
|
"aria-hidden": "true"
|
|
3315
|
-
}, null, 8, ["class"])], 42,
|
|
3316
|
+
}, null, 8, ["class"])], 42, kr)) : e === "select" && Ea.value ? (E(), _("span", {
|
|
3316
3317
|
key: 1,
|
|
3317
|
-
onClickCapture:
|
|
3318
|
-
onKeydownCapture:
|
|
3318
|
+
onClickCapture: Ia,
|
|
3319
|
+
onKeydownCapture: Ia
|
|
3319
3320
|
}, [b(re, {
|
|
3320
|
-
checked:
|
|
3321
|
+
checked: Oa(n.row),
|
|
3321
3322
|
disabled: !n.row.getCanSelect(),
|
|
3322
3323
|
"aria-label": j(F).selectRow(W(n.row.original, n.row.index)),
|
|
3323
|
-
"onUpdate:checked": (e) =>
|
|
3324
|
+
"onUpdate:checked": (e) => Fa(n.row, e === !0, j(Na))
|
|
3324
3325
|
}, null, 8, [
|
|
3325
3326
|
"checked",
|
|
3326
3327
|
"disabled",
|
|
@@ -3329,40 +3330,40 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
3329
3330
|
])], 32)) : e === "select" ? (E(), _("input", {
|
|
3330
3331
|
key: 2,
|
|
3331
3332
|
type: "radio",
|
|
3332
|
-
name:
|
|
3333
|
+
name: ja,
|
|
3333
3334
|
class: w(q.value.radio()),
|
|
3334
|
-
checked:
|
|
3335
|
+
checked: Oa(n.row),
|
|
3335
3336
|
disabled: !n.row.getCanSelect(),
|
|
3336
3337
|
"aria-label": j(F).selectRow(W(n.row.original, n.row.index)),
|
|
3337
|
-
onChange: (e) =>
|
|
3338
|
-
}, null, 42,
|
|
3338
|
+
onChange: (e) => Fa(n.row, !0)
|
|
3339
|
+
}, null, 42, Ar)) : e === "expand" && n.row.getCanExpand() ? (E(), _("button", {
|
|
3339
3340
|
key: 3,
|
|
3340
3341
|
type: "button",
|
|
3341
3342
|
class: w(q.value.expander()),
|
|
3342
3343
|
"aria-expanded": n.row.getIsExpanded(),
|
|
3343
|
-
"aria-controls": n.row.getIsExpanded() ?
|
|
3344
|
+
"aria-controls": n.row.getIsExpanded() ? Ka(n.row) : void 0,
|
|
3344
3345
|
"aria-label": j(F).details(W(n.row.original, n.row.index)),
|
|
3345
3346
|
onClick: (e) => n.row.toggleExpanded()
|
|
3346
3347
|
}, [b(j(Ne), {
|
|
3347
3348
|
class: w(q.value.expanderIcon()),
|
|
3348
3349
|
"data-state": n.row.getIsExpanded() ? "open" : "closed",
|
|
3349
3350
|
"aria-hidden": "true"
|
|
3350
|
-
}, null, 8, ["class", "data-state"])], 10,
|
|
3351
|
+
}, null, 8, ["class", "data-state"])], 10, jr)) : e === "expand" ? (E(), _("span", {
|
|
3351
3352
|
key: 4,
|
|
3352
3353
|
class: w(q.value.expanderSpacer())
|
|
3353
3354
|
}, null, 2)) : (E(), _("span", {
|
|
3354
3355
|
key: 5,
|
|
3355
3356
|
class: w(q.value.rowNumber())
|
|
3356
|
-
}, A(
|
|
3357
|
-
(E(!0), _(p, null, O(n.row.getVisibleCells(), (t, r) => (E(), _(p, { key: t.id }, [
|
|
3357
|
+
}, A(Wa.value.get(n.row.id)), 3))], 6))), 128)),
|
|
3358
|
+
(E(!0), _(p, null, O(n.row.getVisibleCells(), (t, r) => (E(), _(p, { key: t.id }, [ic(n.index, r) ? (E(), _("td", S({
|
|
3358
3359
|
key: 0,
|
|
3359
|
-
class:
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
...
|
|
3360
|
+
class: Ci(t.column.id).td({ class: [
|
|
3361
|
+
Li(t.column.id, !1),
|
|
3362
|
+
wi(t.column.id, n.row),
|
|
3363
|
+
...ac(n.row, t.column.id, n.index, r).className
|
|
3363
3364
|
] }),
|
|
3364
|
-
style:
|
|
3365
|
-
}, { ref_for: !0 },
|
|
3365
|
+
style: Ri(t.column.id, !1)
|
|
3366
|
+
}, { ref_for: !0 }, ac(n.row, t.column.id, n.index, r).attributes), [(E(), h(be((i.getSubRows || H.value.length) && r === 0 ? "div" : ao), S({ ref_for: !0 }, (i.getSubRows || H.value.length) && r === 0 ? {
|
|
3366
3367
|
class: q.value.treeCell(),
|
|
3367
3368
|
style: { paddingInlineStart: `${n.row.depth * 20}px` }
|
|
3368
3369
|
} : {}), {
|
|
@@ -3371,33 +3372,33 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
3371
3372
|
type: "button",
|
|
3372
3373
|
class: w(q.value.expander()),
|
|
3373
3374
|
"aria-expanded": n.row.getIsExpanded(),
|
|
3374
|
-
"aria-label":
|
|
3375
|
+
"aria-label": ai(n.row.original, n.row.index),
|
|
3375
3376
|
onClick: (e) => n.row.getToggleExpandedHandler()()
|
|
3376
3377
|
}, [b(j(Ne), {
|
|
3377
3378
|
class: w(q.value.expanderIcon()),
|
|
3378
3379
|
"data-state": n.row.getIsExpanded() ? "open" : "closed",
|
|
3379
3380
|
"aria-hidden": "true"
|
|
3380
|
-
}, null, 8, ["class", "data-state"])], 10,
|
|
3381
|
+
}, null, 8, ["class", "data-state"])], 10, Mr)) : (E(), _("span", {
|
|
3381
3382
|
key: 1,
|
|
3382
3383
|
class: w(q.value.expanderSpacer())
|
|
3383
|
-
}, null, 2))], 64)) : g("", !0),
|
|
3384
|
+
}, null, 2))], 64)) : g("", !0), Ei(R.value.get(t.column.id), n.row) && (Di.value && Bo.value?.rowId === n.row.id && Bo.value.columnId === t.column.id || i.editMode === "row" && Vo.value === n.row.id) ? (E(), _("div", {
|
|
3384
3385
|
key: 1,
|
|
3385
3386
|
"data-editor": "",
|
|
3386
3387
|
class: w(q.value.editor()),
|
|
3387
|
-
"aria-busy":
|
|
3388
|
-
onKeydownCapture: (e) =>
|
|
3389
|
-
onKeydown: (e) =>
|
|
3390
|
-
onFocusout: (e) =>
|
|
3391
|
-
}, [j(P)[`editor-${t.column.id}`] ? k(e.$slots, `editor-${t.column.id}`, S({ ref_for: !0 },
|
|
3388
|
+
"aria-busy": $o.value || void 0,
|
|
3389
|
+
onKeydownCapture: (e) => ls(n.row, t.column.id, e),
|
|
3390
|
+
onKeydown: (e) => Di.value ? is(n.row, t.column.id, e) : ps(n.row, e),
|
|
3391
|
+
onFocusout: (e) => Di.value ? as(n.row, t.column.id, e) : void 0
|
|
3392
|
+
}, [j(P)[`editor-${t.column.id}`] ? k(e.$slots, `editor-${t.column.id}`, S({ ref_for: !0 }, us(n.row, R.value.get(t.column.id))), void 0, void 0, 0) : (E(), h(Qn, {
|
|
3392
3393
|
key: 1,
|
|
3393
|
-
type:
|
|
3394
|
+
type: Go(R.value.get(t.column.id)),
|
|
3394
3395
|
label: Z(t.column),
|
|
3395
3396
|
options: R.value.get(t.column.id).editOptions,
|
|
3396
3397
|
"input-props": R.value.get(t.column.id).editInputProps,
|
|
3397
3398
|
edit: "",
|
|
3398
|
-
invalid: !!
|
|
3399
|
-
"model-value":
|
|
3400
|
-
"onUpdate:modelValue": (e) =>
|
|
3399
|
+
invalid: !!Uo.value[t.column.id],
|
|
3400
|
+
"model-value": Ho.value[t.column.id],
|
|
3401
|
+
"onUpdate:modelValue": (e) => cs(n.row, R.value.get(t.column.id), e)
|
|
3401
3402
|
}, de({ _: 2 }, [j(P)[`option-${t.column.id}`] ? {
|
|
3402
3403
|
name: "option",
|
|
3403
3404
|
fn: M((n) => [k(e.$slots, `option-${t.column.id}`, S({ ref_for: !0 }, n))]),
|
|
@@ -3410,22 +3411,22 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
3410
3411
|
"invalid",
|
|
3411
3412
|
"model-value",
|
|
3412
3413
|
"onUpdate:modelValue"
|
|
3413
|
-
])),
|
|
3414
|
+
])), Uo.value[t.column.id] ? (E(), _("span", {
|
|
3414
3415
|
key: 2,
|
|
3415
|
-
id:
|
|
3416
|
+
id: qo(n.row.id, t.column.id),
|
|
3416
3417
|
role: "alert",
|
|
3417
3418
|
class: w(q.value.editError())
|
|
3418
|
-
}, A(
|
|
3419
|
+
}, A(Uo.value[t.column.id]), 11, Pr)) : g("", !0)], 42, Nr)) : Di.value && Ei(R.value.get(t.column.id), n.row) ? (E(), _("button", {
|
|
3419
3420
|
key: 2,
|
|
3420
3421
|
type: "button",
|
|
3421
|
-
class: w(
|
|
3422
|
-
"data-edit":
|
|
3423
|
-
"aria-label": `${j(F).edit(Z(t.column), z(R.value.get(t.column.id), $(n.row, t.column.id), n.row.original))}${
|
|
3424
|
-
onClick: (e) =>
|
|
3422
|
+
class: w(Ci(t.column.id).editButton()),
|
|
3423
|
+
"data-edit": Ko(n.row.id, t.column.id),
|
|
3424
|
+
"aria-label": `${j(F).edit(Z(t.column), z(R.value.get(t.column.id), $(n.row, t.column.id), n.row.original))}${oc(n.row, t.column.id) ? `, ${j(F).changed}` : ""}`,
|
|
3425
|
+
onClick: (e) => Zo(n.row, t.column.id, e)
|
|
3425
3426
|
}, [k(e.$slots, `cell-${t.column.id}`, {
|
|
3426
3427
|
row: n.row.original,
|
|
3427
3428
|
value: $(n.row, t.column.id)
|
|
3428
|
-
}, () => [y(A(z(R.value.get(t.column.id), $(n.row, t.column.id), n.row.original)), 1)])], 10,
|
|
3429
|
+
}, () => [y(A(z(R.value.get(t.column.id), $(n.row, t.column.id), n.row.original)), 1)])], 10, Fr)) : R.value.get(t.column.id)?.copyable ? (E(), _("span", {
|
|
3429
3430
|
key: 3,
|
|
3430
3431
|
class: w(q.value.copyCell())
|
|
3431
3432
|
}, [k(e.$slots, `cell-${t.column.id}`, {
|
|
@@ -3434,36 +3435,36 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
3434
3435
|
}, () => [y(A(z(R.value.get(t.column.id), $(n.row, t.column.id), n.row.original)), 1)]), b(le, {
|
|
3435
3436
|
value: z(R.value.get(t.column.id), $(n.row, t.column.id), n.row.original),
|
|
3436
3437
|
label: j(F).copy(Z(t.column), z(R.value.get(t.column.id), $(n.row, t.column.id), n.row.original))
|
|
3437
|
-
}, null, 8, ["value", "label"])], 2)) : (E(), h(be(
|
|
3438
|
+
}, null, 8, ["value", "label"])], 2)) : (E(), h(be(Ba(n.row, t.column.id) ? "a" : ao), S({
|
|
3438
3439
|
key: 4,
|
|
3439
3440
|
ref_for: !0
|
|
3440
|
-
},
|
|
3441
|
-
href:
|
|
3441
|
+
}, Ba(n.row, t.column.id) ? {
|
|
3442
|
+
href: Ba(n.row, t.column.id),
|
|
3442
3443
|
class: q.value.rowLink(),
|
|
3443
3444
|
"data-row-link": ""
|
|
3444
3445
|
} : {}), {
|
|
3445
3446
|
default: M(() => [k(e.$slots, `cell-${t.column.id}`, {
|
|
3446
3447
|
row: n.row.original,
|
|
3447
3448
|
value: $(n.row, t.column.id)
|
|
3448
|
-
}, () => [
|
|
3449
|
+
}, () => [ol.value ? (E(), h(ce, {
|
|
3449
3450
|
key: 0,
|
|
3450
3451
|
text: z(R.value.get(t.column.id), $(n.row, t.column.id), n.row.original),
|
|
3451
|
-
query:
|
|
3452
|
+
query: ol.value
|
|
3452
3453
|
}, null, 8, ["text", "query"])) : (E(), _(p, { key: 1 }, [y(A(z(R.value.get(t.column.id), $(n.row, t.column.id), n.row.original)), 1)], 64))])]),
|
|
3453
3454
|
_: 2
|
|
3454
3455
|
}, 1040))]),
|
|
3455
3456
|
_: 2
|
|
3456
3457
|
}, 1040))], 16)) : g("", !0)], 64))), 128)),
|
|
3457
|
-
|
|
3458
|
+
ki.value.length ? (E(), _("td", {
|
|
3458
3459
|
key: 0,
|
|
3459
3460
|
class: w(q.value.td({ class: X("actions", !1) })),
|
|
3460
|
-
style: T(
|
|
3461
|
-
}, [v("div", { class: w(q.value.editActions()) }, [i.editMode === "row" &&
|
|
3461
|
+
style: T(Bi("actions"))
|
|
3462
|
+
}, [v("div", { class: w(q.value.editActions()) }, [i.editMode === "row" && Ti.value ? (E(), _(p, { key: 0 }, [Vo.value === n.row.id ? (E(), _(p, { key: 0 }, [b(f, {
|
|
3462
3463
|
icon: j(je),
|
|
3463
3464
|
label: j(F).saveRow(W(n.row.original, n.row.index)),
|
|
3464
3465
|
variant: "text",
|
|
3465
3466
|
size: "sm",
|
|
3466
|
-
onClick: (e) =>
|
|
3467
|
+
onClick: (e) => fs(n.row, !0)
|
|
3467
3468
|
}, null, 8, [
|
|
3468
3469
|
"icon",
|
|
3469
3470
|
"label",
|
|
@@ -3473,7 +3474,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
3473
3474
|
label: j(F).cancelEdit(W(n.row.original, n.row.index)),
|
|
3474
3475
|
variant: "text",
|
|
3475
3476
|
size: "sm",
|
|
3476
|
-
onClick: (e) =>
|
|
3477
|
+
onClick: (e) => fs(n.row, !1)
|
|
3477
3478
|
}, null, 8, [
|
|
3478
3479
|
"icon",
|
|
3479
3480
|
"label",
|
|
@@ -3485,16 +3486,16 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
3485
3486
|
label: j(F).editRow(W(n.row.original, n.row.index)),
|
|
3486
3487
|
variant: "text",
|
|
3487
3488
|
size: "sm",
|
|
3488
|
-
onClick: (e) =>
|
|
3489
|
+
onClick: (e) => ds(n.row)
|
|
3489
3490
|
}, null, 8, [
|
|
3490
3491
|
"data-row-edit",
|
|
3491
3492
|
"icon",
|
|
3492
3493
|
"label",
|
|
3493
3494
|
"onClick"
|
|
3494
|
-
]))], 64)) : g("", !0), i.rowActions &&
|
|
3495
|
+
]))], 64)) : g("", !0), i.rowActions && Vo.value !== n.row.id ? (E(), h(d, {
|
|
3495
3496
|
key: 1,
|
|
3496
|
-
items:
|
|
3497
|
-
onSelect: (e) =>
|
|
3497
|
+
items: eo(n.row),
|
|
3498
|
+
onSelect: (e) => ro(n.row, e)
|
|
3498
3499
|
}, {
|
|
3499
3500
|
default: M(() => [b(f, {
|
|
3500
3501
|
icon: j(ze),
|
|
@@ -3504,16 +3505,16 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
3504
3505
|
}, null, 8, ["icon", "label"])]),
|
|
3505
3506
|
_: 2
|
|
3506
3507
|
}, 1032, ["items", "onSelect"])) : g("", !0)], 2)], 6)) : g("", !0)
|
|
3507
|
-
], 42,
|
|
3508
|
-
|
|
3508
|
+
], 42, Or))], 64))), 128)),
|
|
3509
|
+
Rc.value > 0 ? (E(), _("tr", {
|
|
3509
3510
|
key: 3,
|
|
3510
3511
|
class: w(q.value.spacer()),
|
|
3511
3512
|
"aria-hidden": "true"
|
|
3512
3513
|
}, [v("td", {
|
|
3513
|
-
colspan:
|
|
3514
|
+
colspan: Ai.value,
|
|
3514
3515
|
class: w(q.value.spacerCell()),
|
|
3515
|
-
style: T({ height: `${
|
|
3516
|
-
}, null, 14,
|
|
3516
|
+
style: T({ height: `${Rc.value}px` })
|
|
3517
|
+
}, null, 14, Ir)], 2)) : g("", !0)
|
|
3517
3518
|
], 32)]),
|
|
3518
3519
|
_: 3
|
|
3519
3520
|
}, 8, [
|
|
@@ -3521,46 +3522,46 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
3521
3522
|
"items",
|
|
3522
3523
|
"label"
|
|
3523
3524
|
]),
|
|
3524
|
-
|
|
3525
|
+
Ya.value && i.footerPosition !== "top" ? (E(), _("tfoot", {
|
|
3525
3526
|
key: 1,
|
|
3526
3527
|
class: w(q.value.foot())
|
|
3527
3528
|
}, [v("tr", null, [
|
|
3528
3529
|
(E(!0), _(p, null, O(J.value, (e) => (E(), _("td", {
|
|
3529
3530
|
key: e,
|
|
3530
3531
|
class: w(q.value.footCell({ class: X(e, !1) })),
|
|
3531
|
-
style: T(
|
|
3532
|
+
style: T(Bi(e))
|
|
3532
3533
|
}, null, 6))), 128)),
|
|
3533
3534
|
(E(!0), _(p, null, O(Y.value, (t) => (E(), _("td", {
|
|
3534
3535
|
key: t.id,
|
|
3535
|
-
class: w(
|
|
3536
|
-
style: T(
|
|
3537
|
-
}, [e.$slots[`footer-${t.id}`] ? k(e.$slots, `footer-${t.id}`, S({ ref_for: !0 },
|
|
3538
|
-
|
|
3536
|
+
class: w(Ci(t.id).footCell({ class: [Li(t.id, !1), wi(t.id)] })),
|
|
3537
|
+
style: T(Ri(t.id, !1))
|
|
3538
|
+
}, [e.$slots[`footer-${t.id}`] ? k(e.$slots, `footer-${t.id}`, S({ ref_for: !0 }, $a(R.value.get(t.id))), void 0, void 0, 0) : (E(), _(p, { key: 1 }, [y(A(Qa(R.value.get(t.id))), 1)], 64))], 6))), 128)),
|
|
3539
|
+
ki.value.length ? (E(), _("td", {
|
|
3539
3540
|
key: 0,
|
|
3540
3541
|
class: w(q.value.footCell({ class: X("actions", !1) })),
|
|
3541
|
-
style: T(
|
|
3542
|
+
style: T(Bi("actions"))
|
|
3542
3543
|
}, null, 6)) : g("", !0)
|
|
3543
3544
|
])], 2)) : g("", !0)
|
|
3544
|
-
], 46,
|
|
3545
|
+
], 46, ir)], 38),
|
|
3545
3546
|
i.statusBar ? (E(), _("div", {
|
|
3546
3547
|
key: 5,
|
|
3547
3548
|
class: w(q.value.statusBar())
|
|
3548
3549
|
}, [
|
|
3549
|
-
v("span", null, A(j(F).rowCount(
|
|
3550
|
-
|
|
3551
|
-
i.selectable ? (E(), _("span",
|
|
3552
|
-
(E(!0), _(p, null, O(
|
|
3550
|
+
v("span", null, A(j(F).rowCount(fl.value)), 1),
|
|
3551
|
+
ha.value ? (E(), _("span", Lr, A(j(F).filteredCount(j(G).getFilteredRowModel().rows.length)), 1)) : g("", !0),
|
|
3552
|
+
i.selectable ? (E(), _("span", Rr, A(j(c).common.selectedCount(Dc.value)), 1)) : g("", !0),
|
|
3553
|
+
(E(!0), _(p, null, O(dl.value, (e) => (E(), _("span", { key: e.id }, A(e.text), 1))), 128))
|
|
3553
3554
|
], 2)) : g("", !0),
|
|
3554
|
-
|
|
3555
|
+
tl.value && i.paginatorPosition === "bottom" ? (E(), _("div", {
|
|
3555
3556
|
key: 6,
|
|
3556
3557
|
class: w(q.value.footer())
|
|
3557
|
-
}, [
|
|
3558
|
+
}, [rl.value.length ? (E(), _("div", {
|
|
3558
3559
|
key: 0,
|
|
3559
3560
|
class: w(q.value.pageSize())
|
|
3560
|
-
}, [v("span",
|
|
3561
|
+
}, [v("span", zr, A(j(F).rowsPerPage), 1), b(se, {
|
|
3561
3562
|
class: w(q.value.pageSizeSelect()),
|
|
3562
3563
|
"aria-label": j(F).rowsPerPage,
|
|
3563
|
-
items:
|
|
3564
|
+
items: rl.value,
|
|
3564
3565
|
"model-value": String(V.value.pageSize),
|
|
3565
3566
|
"onUpdate:modelValue": t[17] ||= (e) => j(G).setPageSize(Number(e))
|
|
3566
3567
|
}, null, 8, [
|
|
@@ -3569,7 +3570,7 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
3569
3570
|
"items",
|
|
3570
3571
|
"model-value"
|
|
3571
3572
|
])], 2)) : g("", !0), b(te, {
|
|
3572
|
-
count:
|
|
3573
|
+
count: nl.value,
|
|
3573
3574
|
"page-size": V.value.pageSize,
|
|
3574
3575
|
page: V.value.pageIndex + 1,
|
|
3575
3576
|
translations: { rootLabel: `${i.caption}: ${j(c).pagination.rootLabel}` },
|
|
@@ -3582,8 +3583,8 @@ var qn = /* @__PURE__ */ new Map(), Jn = (e) => {
|
|
|
3582
3583
|
"translations",
|
|
3583
3584
|
"with-edges"
|
|
3584
3585
|
])], 2)) : g("", !0)
|
|
3585
|
-
], 16,
|
|
3586
|
+
], 16, er)], 8, ["disabled"]));
|
|
3586
3587
|
}
|
|
3587
|
-
}), V = { dateInput: c },
|
|
3588
|
+
}), V = { dateInput: c }, Gr = { numberInput: o }, Kr = { dateRangeInput: l };
|
|
3588
3589
|
//#endregion
|
|
3589
|
-
export {
|
|
3590
|
+
export { Wr as DataTable, P as createDataController, ft as dataSourceToRows, V as dateInput, Kr as dateRangeInput, F as defineMatchMode, Ut as moveItem, Wt as moveTreeRow, Gr as numberInput, cn as rowsToDataSource };
|