@wirecore/wirelayer-vue 0.9.2 → 0.11.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/components/Affix/Affix.vue.d.ts +4 -0
- package/dist/components/Affix/Affix.vue.d.ts.map +1 -1
- package/dist/components/NotificationCenter/NotificationCenter.vue.d.ts +2 -2
- package/dist/components/NotificationCenter/NotificationCenter.vue.d.ts.map +1 -1
- package/dist/components/NotificationCenter/NotificationList.vue.d.ts.map +1 -1
- package/dist/components/NotificationCenter/types.d.ts +2 -0
- package/dist/components/NotificationCenter/types.d.ts.map +1 -1
- package/dist/components/SidebarNav/SidebarNav.vue.d.ts +8 -0
- package/dist/components/SidebarNav/SidebarNav.vue.d.ts.map +1 -1
- package/dist/components/SidebarNav/SidebarNavItems.vue.d.ts +4 -1
- package/dist/components/SidebarNav/SidebarNavItems.vue.d.ts.map +1 -1
- package/dist/components/SidebarNav/types.d.ts +7 -2
- package/dist/components/SidebarNav/types.d.ts.map +1 -1
- package/dist/data-table/DataTable.vue.d.ts +10 -2
- package/dist/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/data-table/index.d.ts +1 -1
- package/dist/data-table/index.d.ts.map +1 -1
- package/dist/data-table/types.d.ts +13 -1
- package/dist/data-table/types.d.ts.map +1 -1
- package/dist/data-table.js +483 -470
- package/dist/index.js +376 -345
- package/llms-full.txt +63 -2
- package/llms.txt +1 -0
- package/package.json +3 -3
package/dist/data-table.js
CHANGED
|
@@ -603,6 +603,7 @@ var Rn = In({
|
|
|
603
603
|
wrapHeaders: { type: Boolean },
|
|
604
604
|
verticalHeaders: { type: Boolean },
|
|
605
605
|
editMode: { default: "cell" },
|
|
606
|
+
editTrigger: { default: "click" },
|
|
606
607
|
size: { default: void 0 },
|
|
607
608
|
densityToggle: { type: Boolean },
|
|
608
609
|
gridlines: { type: Boolean },
|
|
@@ -618,7 +619,7 @@ var Rn = In({
|
|
|
618
619
|
stateExclude: { default: () => ["selection"] },
|
|
619
620
|
classes: {}
|
|
620
621
|
},
|
|
621
|
-
emits: /* @__PURE__ */ "update:page.update:first.update:showFilters.update:allSelection.selectedRowsChange.update:selectedRows.rowClick.update:pageSize.update:sorting.update:selection.update:expanded.update:globalFilter.update:advancedFilterValue.update:filters.update:hiddenColumns.update:columnOrder.update:pinnedColumns.update:groupBy.update:size.cellEdit.rowEdit.rowReorder.rowAction.loadMore.scrollEnd.cellSelectionChange.cellPaste.save".split("."),
|
|
622
|
+
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("."),
|
|
622
623
|
setup(a, { expose: o, emit: s }) {
|
|
623
624
|
let l = e(), S = t(), C = a, ce = n("dataTable", ot, () => C.classes), le = n("menu", Ft), F = s, Be = ge(), I = ve(), tt = _e(), L = l.dataTable, ct = Object.assign({}, ...C.features ?? []);
|
|
624
625
|
pe(zn, ct);
|
|
@@ -1059,12 +1060,12 @@ var Rn = In({
|
|
|
1059
1060
|
break;
|
|
1060
1061
|
case "hide": {
|
|
1061
1062
|
e.toggleVisibility(!1), await T();
|
|
1062
|
-
let t =
|
|
1063
|
+
let t = ko.value?.querySelectorAll("[data-column-menu]");
|
|
1063
1064
|
t?.[Math.min(r, t.length - 1)]?.focus();
|
|
1064
1065
|
return;
|
|
1065
1066
|
}
|
|
1066
1067
|
}
|
|
1067
|
-
await T(),
|
|
1068
|
+
await T(), ko.value?.querySelector(`[data-column-menu="${e.id}"]`)?.focus();
|
|
1068
1069
|
}
|
|
1069
1070
|
let Ui = k(null), Wi = k(null);
|
|
1070
1071
|
function Gi(e, t) {
|
|
@@ -1136,7 +1137,7 @@ var Rn = In({
|
|
|
1136
1137
|
let da = (e, t) => {
|
|
1137
1138
|
let n = aa(e);
|
|
1138
1139
|
return Array.isArray(n) ? n[t] : null;
|
|
1139
|
-
}, fa = h(() => C.selectionMode !== "single"), pa = h(() => C.selectAllMode === "all" && Mn.value), ma = (e) => pa.value && Rr.value ? e.getCanSelect() && !Rr.value.except.includes(e.id) : e.getIsSelected(), ha = h(() => pa.value ? Rr.value ? !Rr.value.except.length || "indeterminate" :
|
|
1140
|
+
}, fa = h(() => C.selectionMode !== "single"), pa = h(() => C.selectAllMode === "all" && Mn.value), ma = (e) => pa.value && Rr.value ? e.getCanSelect() && !Rr.value.except.includes(e.id) : e.getIsSelected(), ha = h(() => pa.value ? Rr.value ? !Rr.value.except.length || "indeterminate" : lc.value ? "indeterminate" : !1 : K.getIsAllPageRowsSelected() ? !0 : K.getIsSomePageRowsSelected() ? "indeterminate" : !1);
|
|
1140
1141
|
function ga(e) {
|
|
1141
1142
|
pa.value ? (ti({}), ni(Rr.value || !e ? null : {
|
|
1142
1143
|
mode: "all",
|
|
@@ -1194,7 +1195,7 @@ var Rn = In({
|
|
|
1194
1195
|
}] : []])), ka = h(() => C.pageSize && !Mn.value ? H.value.pageIndex * H.value.pageSize : 0), Aa = h(() => {
|
|
1195
1196
|
let e = /* @__PURE__ */ new Map();
|
|
1196
1197
|
return Z.value.filter((e) => e.kind === "row").forEach((t, n) => e.set(t.row.id, ka.value + n + 1)), e;
|
|
1197
|
-
}), ja = (e) => `${tt}-details-${e.id}`, Ma = h(() => K.getIsAllRowsExpanded()), Na = h(() => In.value.some((e) => e.aggregate)), Pa = h(() => In.value.some((e) => e.aggregate || e.footer));
|
|
1198
|
+
}), ja = (e) => `${tt}-details-${e.id}`, Ma = h(() => K.getIsAllRowsExpanded()), Na = h(() => In.value.some((e) => e.aggregate)), Pa = h(() => In.value.some((e) => e.aggregate || e.footer || I[`footer-${e.id}`]));
|
|
1198
1199
|
function Fa(e, t, n) {
|
|
1199
1200
|
return t == null ? "" : e.format && n ? e.format(t, n) : typeof t == "number" ? new Intl.NumberFormat(S.value.locale, { maximumFractionDigits: 2 }).format(t) : kt(t);
|
|
1200
1201
|
}
|
|
@@ -1209,49 +1210,57 @@ var Rn = In({
|
|
|
1209
1210
|
let t = Ia(e, K.getFilteredRowModel().flatRows);
|
|
1210
1211
|
return typeof e.aggregate == "string" ? L.aggregates[e.aggregate]?.(t) ?? t : t;
|
|
1211
1212
|
}
|
|
1212
|
-
|
|
1213
|
-
|
|
1213
|
+
function Ra(e) {
|
|
1214
|
+
let t = K.getFilteredRowModel().flatRows.filter((e) => !e.getIsGrouped());
|
|
1215
|
+
return {
|
|
1216
|
+
value: e.aggregate ? Je(t.map((t) => Ar(e, t.original)), e.aggregate) : void 0,
|
|
1217
|
+
text: La(e),
|
|
1218
|
+
rows: t.map((e) => e.original)
|
|
1219
|
+
};
|
|
1220
|
+
}
|
|
1221
|
+
let za = (e) => typeof C.rowActions == "function" ? C.rowActions(e.original) : C.rowActions ?? [], Ba = he(null);
|
|
1222
|
+
function Va(e) {
|
|
1214
1223
|
let t = e.target.closest("[data-row-id]");
|
|
1215
|
-
|
|
1224
|
+
Ba.value = t ? K.getRow(t.dataset.rowId, !0) ?? null : null;
|
|
1216
1225
|
}
|
|
1217
|
-
function
|
|
1226
|
+
function Ha(e, t) {
|
|
1218
1227
|
e && F("rowAction", {
|
|
1219
1228
|
value: t,
|
|
1220
1229
|
row: e.original,
|
|
1221
1230
|
rowId: e.id
|
|
1222
1231
|
});
|
|
1223
1232
|
}
|
|
1224
|
-
let
|
|
1233
|
+
let Ua = (e, { slots: t, emit: n }) => e.enabled ? se(c, {
|
|
1225
1234
|
items: e.items,
|
|
1226
1235
|
label: e.label,
|
|
1227
1236
|
onSelect: (e) => n("select", e)
|
|
1228
1237
|
}, t) : t.default?.();
|
|
1229
|
-
|
|
1238
|
+
Ua.props = [
|
|
1230
1239
|
"enabled",
|
|
1231
1240
|
"items",
|
|
1232
1241
|
"label"
|
|
1233
|
-
],
|
|
1234
|
-
let
|
|
1235
|
-
function
|
|
1242
|
+
], Ua.emits = ["select"];
|
|
1243
|
+
let Wa = (e, { slots: t }) => t.default?.();
|
|
1244
|
+
function Ga(e) {
|
|
1236
1245
|
try {
|
|
1237
1246
|
return K.getRow(e, !0) ?? void 0;
|
|
1238
1247
|
} catch {
|
|
1239
1248
|
return;
|
|
1240
1249
|
}
|
|
1241
1250
|
}
|
|
1242
|
-
let
|
|
1251
|
+
let Ka = k(null), qa = k(null), Ja = k(null), Ya = null, Xa = h(() => !!C.getSubRows), Za = h(() => U.value.length > 0), Qa = (e) => U.value.map((t) => Tt(e.getValue(t))).join("\0"), $a = (e) => U.value.map((t) => {
|
|
1243
1252
|
let n = B.value.get(t);
|
|
1244
1253
|
return `${n?.header ?? t}: ${V(n, e.getValue(t), e.original)}`;
|
|
1245
|
-
}).join(", "),
|
|
1246
|
-
function
|
|
1254
|
+
}).join(", "), eo = () => Z.value.filter((e) => e.kind === "row" && (Za.value || e.row.depth === 0)).map((e) => e.row);
|
|
1255
|
+
function to() {
|
|
1247
1256
|
let e = (t) => t.map((t) => ({
|
|
1248
1257
|
id: t.id,
|
|
1249
1258
|
...C.getSubRows?.(t.original) ? { children: e(t.subRows) } : {}
|
|
1250
1259
|
}));
|
|
1251
1260
|
return e(K.getCoreRowModel().rows);
|
|
1252
1261
|
}
|
|
1253
|
-
function
|
|
1254
|
-
let r = (e, t) => e < t ? t - 1 : t, i = e.index, a = r(i, t.index + +!!n), o =
|
|
1262
|
+
function no(e, t, n) {
|
|
1263
|
+
let r = (e, t) => e < t ? t - 1 : t, i = e.index, a = r(i, t.index + +!!n), o = Za.value && Qa(e) !== Qa(t);
|
|
1255
1264
|
if (i === a && !o) return;
|
|
1256
1265
|
let s = o ? Object.fromEntries(U.value.map((e) => [e, t.getValue(e)])) : void 0;
|
|
1257
1266
|
F("rowReorder", {
|
|
@@ -1261,12 +1270,12 @@ var Rn = In({
|
|
|
1261
1270
|
to: a,
|
|
1262
1271
|
...s ? { group: s } : {}
|
|
1263
1272
|
});
|
|
1264
|
-
let c =
|
|
1265
|
-
Li(o ? L.rowMovedToGroup(u,
|
|
1273
|
+
let c = eo().filter((n) => n.id !== e.id && (!Za.value || Qa(n) === Qa(t))).map((e) => e.id), l = c.indexOf(t.id) + +!!n + 1, u = G(e.original, e.index);
|
|
1274
|
+
Li(o ? L.rowMovedToGroup(u, $a(t), l, c.length + 1) : L.rowMoved(u, l, c.length + 1));
|
|
1266
1275
|
}
|
|
1267
|
-
function
|
|
1276
|
+
function ro(e, t) {
|
|
1268
1277
|
if (!t) return;
|
|
1269
|
-
let n =
|
|
1278
|
+
let n = to(), r = t.parentId ? Ga(t.parentId) : void 0, i = t.parentId ? Dt(n, t.parentId)?.node.children ?? [] : n;
|
|
1270
1279
|
F("rowReorder", {
|
|
1271
1280
|
row: e.original,
|
|
1272
1281
|
rowId: e.id,
|
|
@@ -1276,87 +1285,87 @@ var Rn = In({
|
|
|
1276
1285
|
index: t.index
|
|
1277
1286
|
}), r && !r.getIsExpanded() && r.toggleExpanded(!0), Li(L.rowMovedInTree(G(e.original, e.index), r ? G(r.original, r.index) : null, t.index + 1, i.filter((t) => t.id !== e.id).length + 1));
|
|
1278
1287
|
}
|
|
1279
|
-
function
|
|
1280
|
-
if (
|
|
1288
|
+
function io(e, t) {
|
|
1289
|
+
if (Xa.value) {
|
|
1281
1290
|
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;
|
|
1282
1291
|
if (!r) return;
|
|
1283
|
-
t.preventDefault(),
|
|
1292
|
+
t.preventDefault(), Ya = e.id, ro(e, pn(to(), e.id, r));
|
|
1284
1293
|
return;
|
|
1285
1294
|
}
|
|
1286
1295
|
if (t.key !== "ArrowUp" && t.key !== "ArrowDown") return;
|
|
1287
1296
|
t.preventDefault();
|
|
1288
|
-
let n =
|
|
1289
|
-
if (
|
|
1297
|
+
let n = eo();
|
|
1298
|
+
if (Za.value) {
|
|
1290
1299
|
let r = vt(n.map((e) => ({
|
|
1291
1300
|
id: e.id,
|
|
1292
|
-
group:
|
|
1293
|
-
})), e.id, t.key === "ArrowUp" ? "up" : "down"), i = r &&
|
|
1301
|
+
group: Qa(e)
|
|
1302
|
+
})), e.id, t.key === "ArrowUp" ? "up" : "down"), i = r && Ga(r.targetId);
|
|
1294
1303
|
if (!r || !i) return;
|
|
1295
|
-
|
|
1304
|
+
Ya = e.id, no(e, i, r.after);
|
|
1296
1305
|
return;
|
|
1297
1306
|
}
|
|
1298
1307
|
let r = n[n.indexOf(e) + (t.key === "ArrowUp" ? -1 : 1)];
|
|
1299
|
-
r && (
|
|
1308
|
+
r && (Ya = e.id, no(e, r, t.key === "ArrowDown"));
|
|
1300
1309
|
}
|
|
1301
1310
|
be(An, async () => {
|
|
1302
|
-
if (!
|
|
1303
|
-
let e =
|
|
1304
|
-
|
|
1311
|
+
if (!Ya) return;
|
|
1312
|
+
let e = Ya;
|
|
1313
|
+
Ya = null, await T(), ko.value?.querySelector(`[data-drag-handle="${CSS.escape(e)}"]`)?.focus();
|
|
1305
1314
|
});
|
|
1306
|
-
function io(e, t) {
|
|
1307
|
-
if (Ka.value !== e.id) return t.preventDefault();
|
|
1308
|
-
Ga.value = e.id, t.dataTransfer?.setData("text/plain", e.id), t.dataTransfer && (t.dataTransfer.effectAllowed = "move");
|
|
1309
|
-
}
|
|
1310
1315
|
function ao(e, t) {
|
|
1311
|
-
if (
|
|
1316
|
+
if (qa.value !== e.id) return t.preventDefault();
|
|
1317
|
+
Ka.value = e.id, t.dataTransfer?.setData("text/plain", e.id), t.dataTransfer && (t.dataTransfer.effectAllowed = "move");
|
|
1318
|
+
}
|
|
1319
|
+
function oo(e, t) {
|
|
1320
|
+
if (!Ka.value || Ka.value === e.id) return;
|
|
1312
1321
|
let n = t.currentTarget.getBoundingClientRect(), r = (t.clientY - n.top) / n.height;
|
|
1313
|
-
if (
|
|
1322
|
+
if (Xa.value) {
|
|
1314
1323
|
let n = C.getSubRows?.(e.original) ? r < .25 ? "before" : r > .75 ? "after" : "inside" : r < .5 ? "before" : "after";
|
|
1315
|
-
if (!dn(
|
|
1316
|
-
|
|
1324
|
+
if (!dn(to(), Ka.value, e.id, n)) {
|
|
1325
|
+
Ja.value = null;
|
|
1317
1326
|
return;
|
|
1318
1327
|
}
|
|
1319
|
-
t.preventDefault(),
|
|
1328
|
+
t.preventDefault(), Ja.value = {
|
|
1320
1329
|
id: e.id,
|
|
1321
1330
|
position: n
|
|
1322
1331
|
};
|
|
1323
|
-
} else t.preventDefault(),
|
|
1332
|
+
} else t.preventDefault(), Ja.value = {
|
|
1324
1333
|
id: e.id,
|
|
1325
1334
|
position: r > .5 ? "after" : "before"
|
|
1326
1335
|
};
|
|
1327
1336
|
}
|
|
1328
|
-
function
|
|
1329
|
-
|
|
1337
|
+
function so(e, t) {
|
|
1338
|
+
Ka.value && (t.preventDefault(), Ja.value = {
|
|
1330
1339
|
id: e.id,
|
|
1331
1340
|
position: "inside"
|
|
1332
1341
|
});
|
|
1333
1342
|
}
|
|
1334
|
-
function
|
|
1343
|
+
function co(e) {
|
|
1335
1344
|
e.preventDefault();
|
|
1336
|
-
let t =
|
|
1345
|
+
let t = Ka.value ? Ga(Ka.value) : void 0, n = Ja.value ? Ga(Ja.value.id) : void 0, r = Ja.value?.position;
|
|
1337
1346
|
if (t && n && r) {
|
|
1338
|
-
if (
|
|
1347
|
+
if (Xa.value) ro(t, dn(to(), t.id, n.id, r));
|
|
1339
1348
|
else if (n.getIsGrouped()) {
|
|
1340
1349
|
let e = n.getLeafRows().filter((e) => !e.getIsGrouped() && e.id !== t.id).at(-1);
|
|
1341
|
-
e &&
|
|
1342
|
-
} else
|
|
1350
|
+
e && no(t, e, !0);
|
|
1351
|
+
} else no(t, n, r === "after");
|
|
1343
1352
|
}
|
|
1344
|
-
|
|
1353
|
+
lo();
|
|
1345
1354
|
}
|
|
1346
|
-
function
|
|
1347
|
-
|
|
1355
|
+
function lo() {
|
|
1356
|
+
Ka.value = null, Ja.value = null, qa.value = null;
|
|
1348
1357
|
}
|
|
1349
|
-
let
|
|
1358
|
+
let uo = (e) => Ja.value?.id === e ? Ja.value.position : void 0, fo = he({});
|
|
1350
1359
|
function Q(e, t) {
|
|
1351
|
-
let n = Kt(
|
|
1360
|
+
let n = Kt(fo.value, e.id, t);
|
|
1352
1361
|
return n ? n.value : e.getValue(t);
|
|
1353
1362
|
}
|
|
1354
|
-
let
|
|
1355
|
-
function
|
|
1363
|
+
let po = h(() => !!C.cellSelection || C.editMode === "batch"), mo = new qe(), ho = k(0), go = h(() => ho.value >= 0 && mo.canUndo), _o = h(() => ho.value >= 0 && mo.canRedo);
|
|
1364
|
+
function vo(e, t = !0, n = !1) {
|
|
1356
1365
|
if (e.length) {
|
|
1357
|
-
if (C.editMode === "batch")
|
|
1366
|
+
if (C.editMode === "batch") fo.value = Ye(fo.value, e, n);
|
|
1358
1367
|
else for (let t of n ? [...e].reverse() : e) {
|
|
1359
|
-
let e =
|
|
1368
|
+
let e = Ga(t.rowId);
|
|
1360
1369
|
e && F("cellEdit", {
|
|
1361
1370
|
row: e.original,
|
|
1362
1371
|
rowId: e.id,
|
|
@@ -1365,7 +1374,7 @@ var Rn = In({
|
|
|
1365
1374
|
});
|
|
1366
1375
|
}
|
|
1367
1376
|
if (C.editMode === "row") for (let { rowId: t, values: r } of Ze(e, n)) {
|
|
1368
|
-
let e =
|
|
1377
|
+
let e = Ga(t);
|
|
1369
1378
|
if (!e) continue;
|
|
1370
1379
|
let n = In.value.filter((e) => e.editable).map((t) => [t.id, Q(e, t.id)]);
|
|
1371
1380
|
F("rowEdit", {
|
|
@@ -1377,29 +1386,29 @@ var Rn = In({
|
|
|
1377
1386
|
}
|
|
1378
1387
|
});
|
|
1379
1388
|
}
|
|
1380
|
-
t &&
|
|
1389
|
+
t && po.value && (mo.push(e), ho.value++);
|
|
1381
1390
|
}
|
|
1382
1391
|
}
|
|
1383
|
-
function vo() {
|
|
1384
|
-
let e = po.undo();
|
|
1385
|
-
e && (_o(e, !1, !0), mo.value++, Li(L.undone(e.length)));
|
|
1386
|
-
}
|
|
1387
1392
|
function yo() {
|
|
1388
|
-
let e =
|
|
1389
|
-
e && (
|
|
1393
|
+
let e = mo.undo();
|
|
1394
|
+
e && (vo(e, !1, !0), ho.value++, Li(L.undone(e.length)));
|
|
1395
|
+
}
|
|
1396
|
+
function bo() {
|
|
1397
|
+
let e = mo.redo();
|
|
1398
|
+
e && (vo(e, !1), ho.value++, Li(L.redone(e.length)));
|
|
1390
1399
|
}
|
|
1391
|
-
let
|
|
1392
|
-
async function
|
|
1400
|
+
let xo = h(() => Object.keys(fo.value).length);
|
|
1401
|
+
async function So() {
|
|
1393
1402
|
await T();
|
|
1394
|
-
let e =
|
|
1403
|
+
let e = Tc.value;
|
|
1395
1404
|
(e?.querySelector("[tabindex=\"0\"]") ?? e)?.focus();
|
|
1396
1405
|
}
|
|
1397
|
-
function
|
|
1398
|
-
let e = Object.values(
|
|
1406
|
+
function Co() {
|
|
1407
|
+
let e = Object.values(fo.value);
|
|
1399
1408
|
if (!e.length) return;
|
|
1400
1409
|
let t = [], n = /* @__PURE__ */ new Map();
|
|
1401
1410
|
for (let r of e) {
|
|
1402
|
-
let e =
|
|
1411
|
+
let e = Ga(r.rowId);
|
|
1403
1412
|
if (!e) continue;
|
|
1404
1413
|
t.push({
|
|
1405
1414
|
row: e.original,
|
|
@@ -1418,120 +1427,123 @@ var Rn = In({
|
|
|
1418
1427
|
F("save", {
|
|
1419
1428
|
changes: t,
|
|
1420
1429
|
rows: [...n.values()]
|
|
1421
|
-
}),
|
|
1430
|
+
}), fo.value = {}, mo.clear(), ho.value++, Li(L.changesSaved(t.length)), So();
|
|
1422
1431
|
}
|
|
1423
|
-
function
|
|
1424
|
-
Object.keys(
|
|
1432
|
+
function wo() {
|
|
1433
|
+
Object.keys(fo.value).length && (fo.value = {}, mo.clear(), ho.value++, Li(L.changesDiscarded), So());
|
|
1425
1434
|
}
|
|
1426
|
-
let
|
|
1435
|
+
let To = k(null), Eo = k(null), Do = k({}), Oo = k({}), ko = ye("root"), Ao = (e) => e.editor ?? "text", jo = (e, t) => `${e}:${t}`, Mo = (e, t) => `${tt}-error-${e}-${t}`, No = () => Z.value.filter((e) => e.kind === "row").flatMap((e) => Y.value.filter((e) => B.value.get(e.id)?.editable).map((t) => ({
|
|
1427
1436
|
rowId: e.row.id,
|
|
1428
1437
|
columnId: t.id
|
|
1429
1438
|
})));
|
|
1430
|
-
function
|
|
1431
|
-
let t =
|
|
1439
|
+
function Po(e) {
|
|
1440
|
+
let t = ko.value?.querySelector(e);
|
|
1432
1441
|
(q.value ? t?.closest("td") ?? t : t)?.focus();
|
|
1433
1442
|
}
|
|
1434
|
-
async function
|
|
1435
|
-
await T(),
|
|
1443
|
+
async function Fo() {
|
|
1444
|
+
await T(), ko.value?.querySelector("[data-editor] :is(input, button, [role=combobox], [tabindex=\"0\"])")?.focus();
|
|
1445
|
+
}
|
|
1446
|
+
function Io(e, t, n) {
|
|
1447
|
+
(C.editTrigger !== "dblclick" || n.detail !== 1) && Lo(e, t);
|
|
1436
1448
|
}
|
|
1437
|
-
function
|
|
1438
|
-
|
|
1449
|
+
function Lo(e, t) {
|
|
1450
|
+
To.value = {
|
|
1439
1451
|
rowId: e.id,
|
|
1440
1452
|
columnId: t
|
|
1441
|
-
},
|
|
1453
|
+
}, Do.value = { [t]: Q(e, t) }, Oo.value = {}, Fo();
|
|
1442
1454
|
}
|
|
1443
|
-
let
|
|
1444
|
-
function
|
|
1445
|
-
let n = $e(t.map((t) => [t, () => B.value.get(t)?.validate?.(
|
|
1446
|
-
return n instanceof Promise ? (
|
|
1455
|
+
let Ro = k(!1);
|
|
1456
|
+
function zo(e, t) {
|
|
1457
|
+
let n = $e(t.map((t) => [t, () => B.value.get(t)?.validate?.(Do.value[t], e.original)])), r = (e) => (Oo.value = e, Object.keys(e).length === 0);
|
|
1458
|
+
return n instanceof Promise ? (Ro.value = !0, n.then(r).finally(() => Ro.value = !1)) : r(n);
|
|
1447
1459
|
}
|
|
1448
|
-
function
|
|
1449
|
-
if (!
|
|
1450
|
-
let r =
|
|
1460
|
+
function Bo(e, t, n) {
|
|
1461
|
+
if (!To.value || Ro.value) return;
|
|
1462
|
+
let r = zo(e, [t]);
|
|
1451
1463
|
return r instanceof Promise ? r.then((r) => {
|
|
1452
|
-
if (
|
|
1453
|
-
}) : r ?
|
|
1464
|
+
if (To.value?.rowId === e.id && To.value.columnId === t) return r ? Vo(e, t, n) : Fo();
|
|
1465
|
+
}) : r ? Vo(e, t, n) : Fo();
|
|
1454
1466
|
}
|
|
1455
|
-
async function
|
|
1456
|
-
let r =
|
|
1457
|
-
|
|
1467
|
+
async function Vo(e, t, n) {
|
|
1468
|
+
let r = Do.value[t];
|
|
1469
|
+
To.value = null;
|
|
1458
1470
|
let i = Q(e, t);
|
|
1459
|
-
if ((C.editMode === "batch" ? !rn(r, i) : r !== e.getValue(t)) &&
|
|
1471
|
+
if ((C.editMode === "batch" ? !rn(r, i) : r !== e.getValue(t)) && vo([{
|
|
1460
1472
|
rowId: e.id,
|
|
1461
1473
|
columnId: t,
|
|
1462
1474
|
before: i,
|
|
1463
1475
|
after: r
|
|
1464
1476
|
}]), n) {
|
|
1465
|
-
let r =
|
|
1466
|
-
if (i && a) return
|
|
1477
|
+
let r = No(), i = r[r.findIndex((n) => n.rowId === e.id && n.columnId === t) + n], a = i && K.getRow(i.rowId, !0);
|
|
1478
|
+
if (i && a) return Lo(a, i.columnId);
|
|
1467
1479
|
}
|
|
1468
|
-
await T(),
|
|
1480
|
+
await T(), Po(`[data-edit="${CSS.escape(jo(e.id, t))}"]`);
|
|
1469
1481
|
}
|
|
1470
|
-
async function
|
|
1471
|
-
|
|
1482
|
+
async function Ho(e, t) {
|
|
1483
|
+
To.value = null, Oo.value = {}, await T(), Po(`[data-edit="${CSS.escape(jo(e.id, t))}"]`);
|
|
1472
1484
|
}
|
|
1473
|
-
function
|
|
1474
|
-
n.defaultPrevented || (n.key === "Escape" ? (n.preventDefault(),
|
|
1485
|
+
function Uo(e, t, n) {
|
|
1486
|
+
n.defaultPrevented || (n.key === "Escape" ? (n.preventDefault(), Ho(e, t)) : n.key === "Enter" && (n.target.matches("textarea") ? n.ctrlKey || n.metaKey : !n.target.matches("button, [role=combobox]")) ? (n.preventDefault(), Bo(e, t)) : n.key === "Tab" && (n.preventDefault(), Bo(e, t, n.shiftKey ? -1 : 1)));
|
|
1475
1487
|
}
|
|
1476
|
-
function
|
|
1488
|
+
function Wo(e, t, n) {
|
|
1477
1489
|
let r = n.relatedTarget, i = n.currentTarget;
|
|
1478
|
-
r && (i.contains(r) || !
|
|
1490
|
+
r && (i.contains(r) || !ko.value?.contains(r) && r.closest("[data-scope]")) || Bo(e, t);
|
|
1479
1491
|
}
|
|
1480
|
-
let
|
|
1492
|
+
let Go = /* @__PURE__ */ new Set([
|
|
1481
1493
|
"select",
|
|
1482
1494
|
"date",
|
|
1483
1495
|
"checkbox"
|
|
1484
1496
|
]);
|
|
1485
|
-
function
|
|
1486
|
-
|
|
1487
|
-
...
|
|
1497
|
+
function Ko(e, t, n) {
|
|
1498
|
+
Do.value = {
|
|
1499
|
+
...Do.value,
|
|
1488
1500
|
[t.id]: n
|
|
1489
|
-
}, mi.value &&
|
|
1501
|
+
}, mi.value && Go.has(Ao(t)) && !I[`editor-${t.id}`] && Bo(e, t.id);
|
|
1490
1502
|
}
|
|
1491
|
-
function
|
|
1503
|
+
function qo(e, t) {
|
|
1492
1504
|
return {
|
|
1493
|
-
value:
|
|
1494
|
-
setValue: (e) =>
|
|
1495
|
-
...
|
|
1505
|
+
value: Do.value[t.id],
|
|
1506
|
+
setValue: (e) => Do.value = {
|
|
1507
|
+
...Do.value,
|
|
1496
1508
|
[t.id]: e
|
|
1497
1509
|
},
|
|
1498
1510
|
row: e.original,
|
|
1499
|
-
commit: () => void (mi.value ?
|
|
1500
|
-
cancel: () => void (mi.value ?
|
|
1501
|
-
invalid: !!
|
|
1511
|
+
commit: () => void (mi.value ? Bo(e, t.id) : Yo(e, !0)),
|
|
1512
|
+
cancel: () => void (mi.value ? Ho(e, t.id) : Yo(e, !1)),
|
|
1513
|
+
invalid: !!Oo.value[t.id]
|
|
1502
1514
|
};
|
|
1503
1515
|
}
|
|
1504
|
-
function
|
|
1505
|
-
|
|
1516
|
+
function Jo(e) {
|
|
1517
|
+
Eo.value = e.id, Oo.value = {}, Do.value = Object.fromEntries(In.value.filter((e) => e.editable).map((t) => [t.id, e.getValue(t.id)])), Fo();
|
|
1506
1518
|
}
|
|
1507
|
-
async function
|
|
1508
|
-
if (!
|
|
1519
|
+
async function Yo(e, t) {
|
|
1520
|
+
if (!Ro.value) {
|
|
1509
1521
|
if (t) {
|
|
1510
|
-
if (!await
|
|
1511
|
-
if (
|
|
1522
|
+
if (!await zo(e, In.value.filter((e) => e.editable).map((e) => e.id))) return Fo();
|
|
1523
|
+
if (Eo.value !== e.id) return;
|
|
1512
1524
|
F("rowEdit", {
|
|
1513
1525
|
row: e.original,
|
|
1514
1526
|
rowId: e.id,
|
|
1515
|
-
values: { ...
|
|
1527
|
+
values: { ...Do.value }
|
|
1516
1528
|
});
|
|
1517
1529
|
}
|
|
1518
|
-
|
|
1530
|
+
Eo.value = null, Oo.value = {}, await T(), Po(`[data-row-edit="${CSS.escape(e.id)}"]`);
|
|
1519
1531
|
}
|
|
1520
1532
|
}
|
|
1521
|
-
function
|
|
1522
|
-
t.defaultPrevented || (t.key === "Escape" ? (t.preventDefault(),
|
|
1533
|
+
function Xo(e, t) {
|
|
1534
|
+
t.defaultPrevented || (t.key === "Escape" ? (t.preventDefault(), Yo(e, !1)) : t.key === "Enter" && t.target.matches("input") && (t.preventDefault(), Yo(e, !0)));
|
|
1523
1535
|
}
|
|
1524
|
-
let
|
|
1525
|
-
function
|
|
1526
|
-
let n =
|
|
1536
|
+
let Zo = he(null), Qo = h(() => Z.value.filter((e) => e.kind === "row").map((e) => e.row.id)), $o = h(() => Y.value.map((e) => e.id)), es = h(() => C.cellSelection ? $t(Zo.value, Qo.value, $o.value) : null), ts = h(() => new Map(Qo.value.map((e, t) => [e, t]))), ns = h(() => new Map($o.value.map((e, t) => [e, t])));
|
|
1537
|
+
function rs(e, t) {
|
|
1538
|
+
let n = es.value;
|
|
1527
1539
|
if (!n) return !1;
|
|
1528
|
-
let r =
|
|
1540
|
+
let r = ts.value.get(e) ?? -1, i = ns.value.get(t) ?? -1;
|
|
1529
1541
|
return r >= n.top && r <= n.bottom && i >= n.left && i <= n.right;
|
|
1530
1542
|
}
|
|
1531
|
-
function
|
|
1532
|
-
let t = $t(e,
|
|
1543
|
+
function is(e) {
|
|
1544
|
+
let t = $t(e, Qo.value, $o.value);
|
|
1533
1545
|
if (!t) return null;
|
|
1534
|
-
let n =
|
|
1546
|
+
let n = Qo.value.slice(t.top, t.bottom + 1), r = $o.value.slice(t.left, t.right + 1), i = n.flatMap((e) => Ga(e) ?? []);
|
|
1535
1547
|
return {
|
|
1536
1548
|
rowIds: n,
|
|
1537
1549
|
columnIds: r,
|
|
@@ -1539,40 +1551,40 @@ var Rn = In({
|
|
|
1539
1551
|
values: i.map((e) => r.map((t) => Q(e, t)))
|
|
1540
1552
|
};
|
|
1541
1553
|
}
|
|
1542
|
-
function
|
|
1543
|
-
let t =
|
|
1544
|
-
e && t && e.anchor.rowId === t.anchor.rowId && e.anchor.columnId === t.anchor.columnId && e.focus.rowId === t.focus.rowId && e.focus.columnId === t.focus.columnId || !e && !t || (
|
|
1554
|
+
function as(e) {
|
|
1555
|
+
let t = Zo.value;
|
|
1556
|
+
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 || (Zo.value = e, F("cellSelectionChange", is(e)));
|
|
1545
1557
|
}
|
|
1546
|
-
let
|
|
1547
|
-
de(() => window.addEventListener("pointerup",
|
|
1548
|
-
function
|
|
1558
|
+
let os = !1, ss = !1, cs = !1, ls = () => os = !1;
|
|
1559
|
+
de(() => window.addEventListener("pointerup", ls)), ue(() => window.removeEventListener("pointerup", ls));
|
|
1560
|
+
function us(e, t, n) {
|
|
1549
1561
|
if (!C.cellSelection || n.button !== 0 || n.target.closest("[data-editor]")) return;
|
|
1550
1562
|
let r = {
|
|
1551
1563
|
rowId: e,
|
|
1552
1564
|
columnId: t
|
|
1553
|
-
}, i =
|
|
1554
|
-
|
|
1565
|
+
}, i = Zo.value, a = n.shiftKey && i;
|
|
1566
|
+
as(a ? {
|
|
1555
1567
|
anchor: i.anchor,
|
|
1556
1568
|
focus: r
|
|
1557
1569
|
} : {
|
|
1558
1570
|
anchor: r,
|
|
1559
1571
|
focus: r
|
|
1560
|
-
}),
|
|
1572
|
+
}), os = !0, cs = !!a, a && window.getSelection()?.removeAllRanges();
|
|
1561
1573
|
}
|
|
1562
|
-
function
|
|
1563
|
-
|
|
1564
|
-
anchor:
|
|
1574
|
+
function ds(e, t, n) {
|
|
1575
|
+
os && Zo.value && n.buttons & 1 && (as({
|
|
1576
|
+
anchor: Zo.value.anchor,
|
|
1565
1577
|
focus: {
|
|
1566
1578
|
rowId: e,
|
|
1567
1579
|
columnId: t
|
|
1568
1580
|
}
|
|
1569
1581
|
}), window.getSelection()?.removeAllRanges());
|
|
1570
1582
|
}
|
|
1571
|
-
function us(e) {
|
|
1572
|
-
os && (os = !1, e.preventDefault(), e.stopPropagation());
|
|
1573
|
-
}
|
|
1574
|
-
let ds = (e, t) => Cc.value?.querySelector(`tr[data-row-id="${CSS.escape(e)}"] > [data-column-id="${CSS.escape(t)}"]`) ?? null;
|
|
1575
1583
|
function fs(e) {
|
|
1584
|
+
cs && (cs = !1, e.preventDefault(), e.stopPropagation());
|
|
1585
|
+
}
|
|
1586
|
+
let ps = (e, t) => Tc.value?.querySelector(`tr[data-row-id="${CSS.escape(e)}"] > [data-column-id="${CSS.escape(t)}"]`) ?? null;
|
|
1587
|
+
function ms(e) {
|
|
1576
1588
|
let t = e.target, n = e.key;
|
|
1577
1589
|
if (!C.cellSelection || !q.value || !e.shiftKey || e.altKey || ![
|
|
1578
1590
|
"ArrowUp",
|
|
@@ -1584,7 +1596,7 @@ var Rn = In({
|
|
|
1584
1596
|
].includes(n)) return !1;
|
|
1585
1597
|
let r = t.closest("tr")?.dataset.rowId, i = t.dataset.columnId;
|
|
1586
1598
|
if (!r || !i || !t.matches("td")) return !1;
|
|
1587
|
-
let a = getComputedStyle(t).direction === "rtl", o = n === "ArrowUp" ? "up" : n === "ArrowDown" ? "down" : n === "Home" ? "home" : n === "End" ? "end" : n === "ArrowRight" === a ? "previous" : "next", s =
|
|
1599
|
+
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 = Zo.value && rs(r, i) ? Zo.value : {
|
|
1588
1600
|
anchor: {
|
|
1589
1601
|
rowId: r,
|
|
1590
1602
|
columnId: i
|
|
@@ -1593,53 +1605,53 @@ var Rn = In({
|
|
|
1593
1605
|
rowId: r,
|
|
1594
1606
|
columnId: i
|
|
1595
1607
|
}
|
|
1596
|
-
}, c = pt(s,
|
|
1597
|
-
e.preventDefault(),
|
|
1608
|
+
}, c = pt(s, Qo.value, $o.value, o, e.ctrlKey || e.metaKey);
|
|
1609
|
+
e.preventDefault(), as(c);
|
|
1598
1610
|
let l = () => {
|
|
1599
|
-
let e =
|
|
1600
|
-
return e ? (
|
|
1611
|
+
let e = ps(c.focus.rowId, c.focus.columnId);
|
|
1612
|
+
return e ? (ss = !0, e.focus(), ss = !1, e.scrollIntoView?.({
|
|
1601
1613
|
block: "nearest",
|
|
1602
1614
|
inline: "nearest"
|
|
1603
1615
|
}), !0) : !1;
|
|
1604
1616
|
};
|
|
1605
1617
|
return T(() => {
|
|
1606
|
-
!l() && $.value && (
|
|
1618
|
+
!l() && $.value && (mc?.value.scrollToIndex(Z.value.findIndex((e) => e.kind === "row" && e.row.id === c.focus.rowId)), requestAnimationFrame(() => requestAnimationFrame(() => void l())));
|
|
1607
1619
|
}), !0;
|
|
1608
1620
|
}
|
|
1609
|
-
let
|
|
1610
|
-
function
|
|
1611
|
-
let e =
|
|
1621
|
+
let hs = (e, t) => V(B.value.get(t), Q(e, t), e.original);
|
|
1622
|
+
function gs() {
|
|
1623
|
+
let e = is(Zo.value);
|
|
1612
1624
|
if (e) {
|
|
1613
|
-
let t = e.rowIds.flatMap((e) =>
|
|
1625
|
+
let t = e.rowIds.flatMap((e) => Ga(e) ?? []);
|
|
1614
1626
|
return {
|
|
1615
|
-
text: un(t.map((t) => e.columnIds.map((e) =>
|
|
1627
|
+
text: un(t.map((t) => e.columnIds.map((e) => hs(t, e)))),
|
|
1616
1628
|
count: t.length * e.columnIds.length
|
|
1617
1629
|
};
|
|
1618
1630
|
}
|
|
1619
1631
|
let t = Z.value.filter((e) => e.kind === "row" && ma(e.row)).map((e) => e.row);
|
|
1620
1632
|
return t.length ? {
|
|
1621
|
-
text: un(t.map((e) =>
|
|
1622
|
-
count: t.length *
|
|
1633
|
+
text: un(t.map((e) => $o.value.map((t) => hs(e, t)))),
|
|
1634
|
+
count: t.length * $o.value.length
|
|
1623
1635
|
} : null;
|
|
1624
1636
|
}
|
|
1625
|
-
function
|
|
1637
|
+
function _s() {
|
|
1626
1638
|
let e = document.activeElement;
|
|
1627
|
-
return !!C.cellSelection && !!e && !!
|
|
1639
|
+
return !!C.cellSelection && !!e && !!Tc.value?.contains(e) && !e.closest(Or);
|
|
1628
1640
|
}
|
|
1629
|
-
function
|
|
1630
|
-
if (!
|
|
1631
|
-
let t =
|
|
1641
|
+
function vs(e) {
|
|
1642
|
+
if (!_s() || window.getSelection()?.toString()) return;
|
|
1643
|
+
let t = gs();
|
|
1632
1644
|
t && e.clipboardData && (e.clipboardData.setData("text/plain", t.text), e.preventDefault(), Li(L.cellsCopied(t.count)));
|
|
1633
1645
|
}
|
|
1634
|
-
async function
|
|
1635
|
-
let t = Wt(e), n = $t(
|
|
1646
|
+
async function ys(e) {
|
|
1647
|
+
let t = Wt(e), n = $t(Zo.value, Qo.value, $o.value);
|
|
1636
1648
|
if (!t.length || !n) return;
|
|
1637
1649
|
let r = Gt(t, {
|
|
1638
1650
|
row: n.top,
|
|
1639
1651
|
column: n.left
|
|
1640
|
-
},
|
|
1652
|
+
}, Qo.value, $o.value, n), i = [], a = [];
|
|
1641
1653
|
for (let e of r) {
|
|
1642
|
-
let t = B.value.get(e.columnId), n =
|
|
1654
|
+
let t = B.value.get(e.columnId), n = Ga(e.rowId);
|
|
1643
1655
|
if (!t || !n) continue;
|
|
1644
1656
|
if (!t.editable) {
|
|
1645
1657
|
i.push({
|
|
@@ -1648,7 +1660,7 @@ var Rn = In({
|
|
|
1648
1660
|
});
|
|
1649
1661
|
continue;
|
|
1650
1662
|
}
|
|
1651
|
-
let r = Ut(e.text,
|
|
1663
|
+
let r = Ut(e.text, Ao(t), {
|
|
1652
1664
|
locale: S.value.locale,
|
|
1653
1665
|
choices: t.editOptions
|
|
1654
1666
|
});
|
|
@@ -1694,81 +1706,81 @@ var Rn = In({
|
|
|
1694
1706
|
c.defaultPrevented = !0;
|
|
1695
1707
|
}
|
|
1696
1708
|
};
|
|
1697
|
-
F("cellPaste", c), !c.defaultPrevented && (
|
|
1709
|
+
F("cellPaste", c), !c.defaultPrevented && (vo(s.map(({ change: e }) => e)), as(Qt(r, Qo.value, $o.value)), Li(L.cellsPasted(s.length, i.length)));
|
|
1698
1710
|
}
|
|
1699
|
-
function
|
|
1700
|
-
if (!
|
|
1711
|
+
function bs(e) {
|
|
1712
|
+
if (!_s()) return;
|
|
1701
1713
|
let t = e.clipboardData?.getData("text/plain");
|
|
1702
|
-
t && (e.preventDefault(),
|
|
1714
|
+
t && (e.preventDefault(), ys(t));
|
|
1703
1715
|
}
|
|
1704
1716
|
de(() => {
|
|
1705
|
-
document.addEventListener("copy",
|
|
1717
|
+
document.addEventListener("copy", vs), document.addEventListener("paste", bs);
|
|
1706
1718
|
}), ue(() => {
|
|
1707
|
-
document.removeEventListener("copy",
|
|
1719
|
+
document.removeEventListener("copy", vs), document.removeEventListener("paste", bs);
|
|
1708
1720
|
});
|
|
1709
|
-
function
|
|
1710
|
-
if (!
|
|
1721
|
+
function xs(e) {
|
|
1722
|
+
if (!po.value || e.target.closest(Or)) return !1;
|
|
1711
1723
|
let t = yt(e);
|
|
1712
|
-
return t ? (e.preventDefault(), t === "undo" ?
|
|
1724
|
+
return t ? (e.preventDefault(), t === "undo" ? yo() : bo(), !0) : !1;
|
|
1713
1725
|
}
|
|
1714
|
-
let
|
|
1726
|
+
let Ss = k(!1), Cs = k(""), ws = k(0), Ts = h(() => !!C.find && Ss.value && !!Cs.value.trim()), Es = h(() => Ts.value ? (Fc.value && !Mn.value ? K.getPrePaginatedRowModel().rows : K.getRowModel().rows).filter((e) => !e.getIsGrouped()) : []), Ds = h(() => Ts.value ? mt(Es.value.map((e) => ({
|
|
1715
1727
|
id: e.id,
|
|
1716
1728
|
cells: Y.value.map((t) => ({
|
|
1717
1729
|
columnId: t.id,
|
|
1718
|
-
text:
|
|
1730
|
+
text: hs(e, t.id)
|
|
1719
1731
|
}))
|
|
1720
|
-
})),
|
|
1721
|
-
function
|
|
1722
|
-
return
|
|
1732
|
+
})), Cs.value, S.value.locale) : []), Os = h(() => Ds.value.length ? Ds.value[Math.min(ws.value, Ds.value.length - 1)] : void 0), ks = h(() => new Set(Ds.value.map((e) => `${e.rowId}\u0000${e.columnId}`)));
|
|
1733
|
+
function As(e, t) {
|
|
1734
|
+
return Ts.value ? Os.value?.rowId === e && Os.value.columnId === t ? J.value.findCurrent() : ks.value.has(`${e}\u0000${t}`) ? J.value.findMatch() : "" : "";
|
|
1723
1735
|
}
|
|
1724
|
-
async function
|
|
1736
|
+
async function js() {
|
|
1725
1737
|
await T();
|
|
1726
|
-
let e =
|
|
1738
|
+
let e = Os.value;
|
|
1727
1739
|
if (!e) return;
|
|
1728
|
-
let t = () =>
|
|
1740
|
+
let t = () => ps(e.rowId, e.columnId)?.scrollIntoView?.({
|
|
1729
1741
|
block: "nearest",
|
|
1730
1742
|
inline: "nearest"
|
|
1731
1743
|
}), n = Z.value.findIndex((t) => t.kind === "row" && t.row.id === e.rowId);
|
|
1732
|
-
$.value && n >= 0 ? (
|
|
1744
|
+
$.value && n >= 0 ? (mc?.value.scrollToIndex(n, { align: "center" }), requestAnimationFrame(() => requestAnimationFrame(t))) : t();
|
|
1733
1745
|
}
|
|
1734
|
-
function
|
|
1735
|
-
let t =
|
|
1746
|
+
function Ms(e) {
|
|
1747
|
+
let t = Ds.value;
|
|
1736
1748
|
if (!t.length) return;
|
|
1737
1749
|
let n = (e + t.length) % t.length;
|
|
1738
|
-
|
|
1750
|
+
ws.value = n;
|
|
1739
1751
|
let r = t[n];
|
|
1740
|
-
if (
|
|
1741
|
-
let e =
|
|
1752
|
+
if (Fc.value && !Mn.value) {
|
|
1753
|
+
let e = Es.value.findIndex((e) => e.id === r.rowId), t = Math.floor(e / H.value.pageSize);
|
|
1742
1754
|
e >= 0 && t !== H.value.pageIndex && K.setPageIndex(t);
|
|
1743
1755
|
}
|
|
1744
|
-
|
|
1756
|
+
js();
|
|
1745
1757
|
}
|
|
1746
|
-
async function
|
|
1747
|
-
|
|
1758
|
+
async function Ns() {
|
|
1759
|
+
Ss.value = !Ss.value, await T(), ko.value?.querySelector(Ss.value ? "[data-find-input] input, input[data-find-input]" : "[data-find-toggle]")?.focus();
|
|
1748
1760
|
}
|
|
1749
|
-
function
|
|
1750
|
-
e.key === "Enter" ? (e.preventDefault(),
|
|
1761
|
+
function Ps(e) {
|
|
1762
|
+
e.key === "Enter" ? (e.preventDefault(), Ms(ws.value + (e.shiftKey ? -1 : 1))) : e.key === "Escape" && (e.preventDefault(), Ns());
|
|
1751
1763
|
}
|
|
1752
|
-
function
|
|
1753
|
-
|
|
1764
|
+
function Fs(e) {
|
|
1765
|
+
Cs.value = e, ws.value = 0, js();
|
|
1754
1766
|
}
|
|
1755
|
-
let
|
|
1756
|
-
if (!
|
|
1757
|
-
let e = Z.value, t = Y.value, n = e.map((e) => e.kind === "row" ? en(t.map((t) => B.value.get(t.id)?.colSpan?.(e.row.original) ?? 1)) : t.map(() => 1)), r = e.map((t, n) => t.kind !== "row" || e[n - 1]?.kind !== "row"), i = t.map((e) => B.value.get(e.id)?.rowSpan === "auto"), a = (t, r) => e.map((e, i) => e.kind === "row" && n[i][r] === 1 ?
|
|
1767
|
+
let Is = h(() => !$.value && In.value.some((e) => e.rowSpan === "auto" || e.colSpan)), Ls = (e) => `${tt}-head-${e}`, Rs = h(() => {
|
|
1768
|
+
if (!Is.value) return;
|
|
1769
|
+
let e = Z.value, t = Y.value, n = e.map((e) => e.kind === "row" ? en(t.map((t) => B.value.get(t.id)?.colSpan?.(e.row.original) ?? 1)) : t.map(() => 1)), r = e.map((t, n) => t.kind !== "row" || e[n - 1]?.kind !== "row"), i = t.map((e) => B.value.get(e.id)?.rowSpan === "auto"), a = (t, r) => e.map((e, i) => e.kind === "row" && n[i][r] === 1 ? hs(e.row, t) : null), o = Xe(t.flatMap((e, t) => i[t] ? [a(e.id, t)] : []), r), s = 0;
|
|
1758
1770
|
return {
|
|
1759
1771
|
columnSpans: n,
|
|
1760
1772
|
rowSpans: i.map((e) => e ? o[s++] : void 0)
|
|
1761
1773
|
};
|
|
1762
|
-
}),
|
|
1763
|
-
rowSpan:
|
|
1764
|
-
colSpan:
|
|
1765
|
-
}),
|
|
1766
|
-
if (!
|
|
1767
|
-
let n =
|
|
1774
|
+
}), zs = (e, t) => ({
|
|
1775
|
+
rowSpan: Rs.value?.rowSpans[t]?.[e] ?? 1,
|
|
1776
|
+
colSpan: Rs.value?.columnSpans[e]?.[t] ?? 1
|
|
1777
|
+
}), Bs = (e, t) => {
|
|
1778
|
+
if (!Is.value) return !0;
|
|
1779
|
+
let n = zs(e, t);
|
|
1768
1780
|
return n.rowSpan > 0 && n.colSpan > 0;
|
|
1769
1781
|
};
|
|
1770
|
-
function
|
|
1771
|
-
let i = !!C.cellSelection &&
|
|
1782
|
+
function Vs(e, t, n, r) {
|
|
1783
|
+
let i = !!C.cellSelection && rs(e.id, t), a = C.editMode === "batch" && !!Kt(fo.value, e.id, t), o = Is.value ? zs(n, r) : {
|
|
1772
1784
|
rowSpan: 1,
|
|
1773
1785
|
colSpan: 1
|
|
1774
1786
|
};
|
|
@@ -1776,35 +1788,35 @@ var Rn = In({
|
|
|
1776
1788
|
className: [
|
|
1777
1789
|
i ? J.value.cellSelected() : "",
|
|
1778
1790
|
a ? J.value.cellChanged() : "",
|
|
1779
|
-
|
|
1791
|
+
As(e.id, t)
|
|
1780
1792
|
],
|
|
1781
1793
|
attributes: {
|
|
1782
1794
|
...C.cellSelection || C.find ? { "data-column-id": t } : {},
|
|
1783
1795
|
...C.cellSelection && q.value ? { "aria-selected": i } : {},
|
|
1784
1796
|
...a ? { "data-changed": "" } : {},
|
|
1785
|
-
...
|
|
1797
|
+
...Is.value ? {
|
|
1786
1798
|
...o.rowSpan > 1 ? { rowspan: o.rowSpan } : {},
|
|
1787
1799
|
...o.colSpan > 1 ? { colspan: o.colSpan } : {},
|
|
1788
|
-
headers: Y.value.slice(r, r + o.colSpan).map((e) =>
|
|
1800
|
+
headers: Y.value.slice(r, r + o.colSpan).map((e) => Ls(e.id)).join(" ")
|
|
1789
1801
|
} : {},
|
|
1790
1802
|
...C.cellSelection ? {
|
|
1791
|
-
onPointerdown: (n) =>
|
|
1792
|
-
onPointerenter: (n) =>
|
|
1793
|
-
onClickCapture:
|
|
1803
|
+
onPointerdown: (n) => us(e.id, t, n),
|
|
1804
|
+
onPointerenter: (n) => ds(e.id, t, n),
|
|
1805
|
+
onClickCapture: fs
|
|
1794
1806
|
} : {}
|
|
1795
1807
|
}
|
|
1796
1808
|
};
|
|
1797
1809
|
}
|
|
1798
|
-
let
|
|
1799
|
-
function
|
|
1810
|
+
let Hs = (e, t) => C.editMode === "batch" && !!Kt(fo.value, e.id, t);
|
|
1811
|
+
function Us(e = {}) {
|
|
1800
1812
|
let t = K.getVisibleLeafColumns().map((e) => B.value.get(e.id)).filter((e) => e.exportable !== !1), n = (e.selectionOnly ? K.getSelectedRowModel().flatRows : K.getSortedRowModel().flatRows).filter((e) => !e.getIsGrouped()).map((e) => t.map((t) => t.exportValue ? t.exportValue(e.original) : V(t, e.getValue(t.id), e.original))), r = e.separator ?? C.csvSeparator ?? it(S.value.locale), i = cn([t.map((e) => e.exportHeader ?? e.header), ...n], r);
|
|
1801
1813
|
return e.bom === !1 ? i.slice(1) : i;
|
|
1802
1814
|
}
|
|
1803
|
-
function
|
|
1815
|
+
function Ws(e = !1) {
|
|
1804
1816
|
let t = typeof e == "boolean" ? { selectionOnly: e } : e;
|
|
1805
|
-
ut(`${t.filename ?? C.exportFilename ?? "export"}.csv`,
|
|
1817
|
+
ut(`${t.filename ?? C.exportFilename ?? "export"}.csv`, Us(t));
|
|
1806
1818
|
}
|
|
1807
|
-
function
|
|
1819
|
+
function Gs(e = !1) {
|
|
1808
1820
|
if (e) return K.getSelectedRowModel().flatRows.filter((e) => !e.getIsGrouped()).map((e) => ({
|
|
1809
1821
|
row: e,
|
|
1810
1822
|
group: !1,
|
|
@@ -1817,33 +1829,33 @@ var Rn = In({
|
|
|
1817
1829
|
}, ...e.subRows.flatMap(t)];
|
|
1818
1830
|
return K.getSortedRowModel().rows.flatMap(t);
|
|
1819
1831
|
}
|
|
1820
|
-
function
|
|
1832
|
+
function Ks(e) {
|
|
1821
1833
|
let t = B.value.get(e.groupingColumnId), n = e.getLeafRows().filter((e) => !e.getIsGrouped()).length;
|
|
1822
1834
|
return `${t?.header ?? ""}: ${V(t, e.groupingValue, e.original)} (${n})`;
|
|
1823
1835
|
}
|
|
1824
|
-
let
|
|
1825
|
-
function
|
|
1836
|
+
let qs = (e) => e.editor === "datetime" ? "datetime" : e.filter === "date" || e.editor === "date" ? "date" : void 0;
|
|
1837
|
+
function Js(e, t, n) {
|
|
1826
1838
|
if (e == null || e === "") return null;
|
|
1827
1839
|
if (typeof e == "number") return Number.isFinite(e) ? e : null;
|
|
1828
1840
|
if (e instanceof Date) return {
|
|
1829
1841
|
date: e,
|
|
1830
|
-
time:
|
|
1842
|
+
time: qs(t) === "datetime"
|
|
1831
1843
|
};
|
|
1832
|
-
let r =
|
|
1844
|
+
let r = qs(t);
|
|
1833
1845
|
return r && typeof e == "string" ? {
|
|
1834
1846
|
date: e,
|
|
1835
1847
|
time: r === "datetime"
|
|
1836
1848
|
} : typeof e == "boolean" && !t.format ? e : n ? V(t, e, n) : kt(e);
|
|
1837
1849
|
}
|
|
1838
|
-
function
|
|
1839
|
-
let t = K.getVisibleLeafColumns().map((e) => B.value.get(e.id)).filter((e) => e.exportable !== !1), n =
|
|
1850
|
+
function Ys(e = {}) {
|
|
1851
|
+
let t = K.getVisibleLeafColumns().map((e) => B.value.get(e.id)).filter((e) => e.exportable !== !1), n = Gs(e.selectionOnly).filter((t) => !t.group || e.groups !== !1).map(({ row: n, group: r, depth: i }) => {
|
|
1840
1852
|
if (r) {
|
|
1841
1853
|
let e = n.getLeafRows().filter((e) => !e.getIsGrouped());
|
|
1842
1854
|
return {
|
|
1843
1855
|
kind: "group",
|
|
1844
1856
|
level: i,
|
|
1845
1857
|
cells: t.map((t, r) => {
|
|
1846
|
-
if (r === 0) return
|
|
1858
|
+
if (r === 0) return Ks(n);
|
|
1847
1859
|
if (!t.aggregate) return null;
|
|
1848
1860
|
let i = Je(e.map((e) => Ar(t, e.original)), t.aggregate);
|
|
1849
1861
|
return typeof i == "number" ? i : kt(i);
|
|
@@ -1857,7 +1869,7 @@ var Rn = In({
|
|
|
1857
1869
|
let t = e.exportValue(n.original);
|
|
1858
1870
|
return typeof t == "number" || typeof t == "boolean" ? t : t instanceof Date ? { date: t } : kt(t);
|
|
1859
1871
|
}
|
|
1860
|
-
return
|
|
1872
|
+
return Js(n.getValue(e.id), e, n.original);
|
|
1861
1873
|
})
|
|
1862
1874
|
};
|
|
1863
1875
|
});
|
|
@@ -1879,26 +1891,26 @@ var Rn = In({
|
|
|
1879
1891
|
rows: n
|
|
1880
1892
|
});
|
|
1881
1893
|
}
|
|
1882
|
-
function
|
|
1883
|
-
lt(`${e.filename ?? C.exportFilename ?? "export"}.xlsx`,
|
|
1894
|
+
function Xs(e = {}) {
|
|
1895
|
+
lt(`${e.filename ?? C.exportFilename ?? "export"}.xlsx`, Ys(e));
|
|
1884
1896
|
}
|
|
1885
|
-
function
|
|
1886
|
-
e === "xlsx" ?
|
|
1897
|
+
function Zs(e, t) {
|
|
1898
|
+
e === "xlsx" ? Xs({ selectionOnly: t }) : Ws(t);
|
|
1887
1899
|
}
|
|
1888
|
-
function
|
|
1900
|
+
function Qs(e = {}) {
|
|
1889
1901
|
let t = Y.value.map((e) => B.value.get(e.id)), n = ki.value.map((e) => e.map((e) => ({
|
|
1890
1902
|
text: X(e.header.column),
|
|
1891
1903
|
colSpan: e.group ? e.header.colSpan : 1,
|
|
1892
1904
|
rowSpan: e.rowSpan,
|
|
1893
1905
|
align: e.group ? void 0 : B.value.get(e.header.column.id)?.align
|
|
1894
|
-
}))), r =
|
|
1906
|
+
}))), r = Gs(e.selectionOnly).map(({ row: e, group: n }) => n ? {
|
|
1895
1907
|
kind: "group",
|
|
1896
1908
|
cells: [{
|
|
1897
|
-
text:
|
|
1909
|
+
text: Ks(e),
|
|
1898
1910
|
colSpan: t.length
|
|
1899
1911
|
}]
|
|
1900
1912
|
} : { cells: t.map((t) => ({
|
|
1901
|
-
text:
|
|
1913
|
+
text: hs(e, t.id),
|
|
1902
1914
|
align: t.align
|
|
1903
1915
|
})) }), i = Pa.value ? t.map((e) => ({
|
|
1904
1916
|
text: La(e),
|
|
@@ -1908,17 +1920,17 @@ var Rn = In({
|
|
|
1908
1920
|
title: e.title ?? C.caption,
|
|
1909
1921
|
caption: C.caption,
|
|
1910
1922
|
lang: S.value.locale,
|
|
1911
|
-
dir: getComputedStyle(
|
|
1923
|
+
dir: getComputedStyle(ko.value ?? document.body).direction === "rtl" ? "rtl" : "ltr",
|
|
1912
1924
|
head: n,
|
|
1913
1925
|
body: r,
|
|
1914
1926
|
foot: i
|
|
1915
1927
|
}));
|
|
1916
1928
|
}
|
|
1917
|
-
async function
|
|
1929
|
+
async function $s() {
|
|
1918
1930
|
await xn?.refresh();
|
|
1919
1931
|
}
|
|
1920
|
-
let
|
|
1921
|
-
let e = !!C.selectable &&
|
|
1932
|
+
let ec = h(() => C.exportFormats?.length ? C.exportFormats : ["csv"]), tc = h(() => {
|
|
1933
|
+
let e = !!C.selectable && lc.value > 0, t = ec.value;
|
|
1922
1934
|
return t.length === 1 && t[0] === "csv" ? e ? [{
|
|
1923
1935
|
value: "all",
|
|
1924
1936
|
label: L.exportAll
|
|
@@ -1935,51 +1947,51 @@ var Rn = In({
|
|
|
1935
1947
|
value: `${n}:all`,
|
|
1936
1948
|
label: L.exportAs(n, !1)
|
|
1937
1949
|
}] : []);
|
|
1938
|
-
}),
|
|
1939
|
-
function
|
|
1950
|
+
}), nc = h(() => ec.value.length > 1 ? L.exportMenu : ec.value[0] === "xlsx" ? L.exportXlsx : L.export);
|
|
1951
|
+
function rc(e) {
|
|
1940
1952
|
let [t, n] = e.includes(":") ? e.split(":") : ["csv", e];
|
|
1941
|
-
|
|
1953
|
+
Zs(t, n === "selection");
|
|
1942
1954
|
}
|
|
1943
|
-
let
|
|
1955
|
+
let ic = (e) => e.columns ? e.columns.flatMap(ic) : [e.id], ac = h(() => {
|
|
1944
1956
|
if (!jn.value.some((e) => e.columns)) return;
|
|
1945
1957
|
let e = K.getAllLeafColumns(), t = (t) => e.findIndex((e) => e.id === t);
|
|
1946
1958
|
return jn.value.map((n) => ({
|
|
1947
1959
|
def: n,
|
|
1948
|
-
leaves:
|
|
1960
|
+
leaves: ic(n).map((n) => e[t(n)]).filter(Boolean).sort((e, n) => t(e.id) - t(n.id))
|
|
1949
1961
|
})).sort((e, n) => t(e.leaves[0]?.id ?? "") - t(n.leaves[0]?.id ?? ""));
|
|
1950
|
-
}),
|
|
1962
|
+
}), oc = h(() => ac.value ?? [{
|
|
1951
1963
|
def: void 0,
|
|
1952
1964
|
leaves: K.getAllLeafColumns()
|
|
1953
1965
|
}]);
|
|
1954
|
-
function
|
|
1966
|
+
function sc(e, t) {
|
|
1955
1967
|
K.setColumnVisibility({
|
|
1956
1968
|
...Hr.value,
|
|
1957
1969
|
...Object.fromEntries(e.filter((e) => e.getCanHide()).map((e) => [e.id, t]))
|
|
1958
1970
|
});
|
|
1959
1971
|
}
|
|
1960
|
-
function
|
|
1972
|
+
function cc(e, t) {
|
|
1961
1973
|
let n = jn.value.map((e) => ({
|
|
1962
1974
|
id: e.id,
|
|
1963
|
-
leaves:
|
|
1975
|
+
leaves: ic(e)
|
|
1964
1976
|
})), r = It(K.getAllLeafColumns().map((e) => e.id), n, e, t);
|
|
1965
1977
|
if (!r) return;
|
|
1966
1978
|
K.setColumnOrder(r);
|
|
1967
1979
|
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));
|
|
1968
1980
|
Li(L.columnMoved(B.value.get(e)?.header ?? e, a.indexOf(e) + 1, a.length));
|
|
1969
1981
|
}
|
|
1970
|
-
let
|
|
1971
|
-
async function
|
|
1972
|
-
if (ci.value = !ci.value, await T(), ci.value) for (let e of document.body.children) e !==
|
|
1973
|
-
else
|
|
1974
|
-
|
|
1982
|
+
let lc = h(() => pa.value && Rr.value ? Math.max(0, (Nn.value ?? An.value.length) - Rr.value.except.length) : Object.values(Lr.value).filter(Boolean).length), uc = [];
|
|
1983
|
+
async function dc() {
|
|
1984
|
+
if (ci.value = !ci.value, await T(), ci.value) for (let e of document.body.children) e !== ko.value && e instanceof HTMLElement && !e.inert && (e.inert = !0, uc.push(e));
|
|
1985
|
+
else uc.splice(0).forEach((e) => e.inert = !1);
|
|
1986
|
+
ko.value?.querySelector("[data-fullscreen-toggle]")?.focus();
|
|
1975
1987
|
}
|
|
1976
|
-
function
|
|
1977
|
-
ci.value && e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(),
|
|
1988
|
+
function fc(e) {
|
|
1989
|
+
ci.value && e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(), dc());
|
|
1978
1990
|
}
|
|
1979
|
-
ue(() =>
|
|
1980
|
-
let
|
|
1991
|
+
ue(() => uc.splice(0).forEach((e) => e.inert = !1));
|
|
1992
|
+
let pc = ye("scroll"), mc = ct.useVirtualizer?.(h(() => ({
|
|
1981
1993
|
count: C.virtual && C.scrollHeight ? Z.value.length : 0,
|
|
1982
|
-
getScrollElement: () =>
|
|
1994
|
+
getScrollElement: () => pc.value,
|
|
1983
1995
|
estimateSize: () => C.rowHeight,
|
|
1984
1996
|
overscan: 8,
|
|
1985
1997
|
getItemKey: (e) => Z.value[e]?.key ?? e,
|
|
@@ -1988,34 +2000,35 @@ var Rn = In({
|
|
|
1988
2000
|
height: Number.parseInt(C.scrollHeight ?? "", 10) || 400
|
|
1989
2001
|
}
|
|
1990
2002
|
})));
|
|
1991
|
-
C.virtual && !
|
|
1992
|
-
let $ = h(() => !!C.virtual && !!C.scrollHeight && !!
|
|
2003
|
+
C.virtual && !mc && mn("DataTable: `virtual` needs the feature virtualRows from @wirecore/wirelayer-vue/virtual (`:features=\"[virtualRows]\"`) – all rows are rendered");
|
|
2004
|
+
let $ = h(() => !!C.virtual && !!C.scrollHeight && !!mc), hc = h(() => $.value ? mc?.value.getVirtualItems() ?? [] : []), gc = h(() => $.value ? hc.value.map((e) => ({
|
|
1993
2005
|
...Z.value[e.index],
|
|
1994
2006
|
index: e.index
|
|
1995
2007
|
})) : Z.value.map((e, t) => ({
|
|
1996
2008
|
...e,
|
|
1997
2009
|
index: t
|
|
1998
|
-
}))),
|
|
1999
|
-
$.value && e instanceof Element &&
|
|
2000
|
-
},
|
|
2001
|
-
be(() => An.value.length, () =>
|
|
2002
|
-
function
|
|
2010
|
+
}))), _c = h(() => $.value ? hc.value[0]?.start ?? 0 : 0), vc = h(() => $.value ? (mc?.value.getTotalSize() ?? 0) - (hc.value.at(-1)?.end ?? 0) : 0), yc = (e) => {
|
|
2011
|
+
$.value && e instanceof Element && mc?.value.measureElement(e);
|
|
2012
|
+
}, bc = !1;
|
|
2013
|
+
be(() => An.value.length, () => bc = !1);
|
|
2014
|
+
function xc(e) {
|
|
2015
|
+
if (F("scroll", e), !C.scrollHeight) return;
|
|
2003
2016
|
let t = e.currentTarget;
|
|
2004
|
-
|
|
2017
|
+
bc || t.scrollTop + t.clientHeight < t.scrollHeight - 80 || (bc = !0, F("loadMore"), F("scrollEnd"));
|
|
2005
2018
|
}
|
|
2006
|
-
let
|
|
2019
|
+
let Sc = k(0), Cc, wc = ye("head");
|
|
2007
2020
|
de(() => {
|
|
2008
|
-
|
|
2009
|
-
}), ue(() =>
|
|
2010
|
-
let
|
|
2011
|
-
de(
|
|
2012
|
-
function
|
|
2021
|
+
wc.value && typeof ResizeObserver < "u" && (Cc = new ResizeObserver(() => Sc.value = wc.value?.offsetHeight ?? 0), Cc.observe(wc.value));
|
|
2022
|
+
}), ue(() => Cc?.disconnect());
|
|
2023
|
+
let Tc = ye("tableElement"), Ec = () => q.value && Tc.value && sn(Tc.value);
|
|
2024
|
+
de(Ec), fe(Ec);
|
|
2025
|
+
function Dc(e) {
|
|
2013
2026
|
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.defaultPrevented) return !1;
|
|
2014
2027
|
let t = e.target, n = t.closest("td"), r = n?.parentElement?.dataset.rowId;
|
|
2015
2028
|
if (!n || !r || n.cellIndex !== gi.value.length || t.closest(Or)) return !1;
|
|
2016
2029
|
let i = K.getRow(r, !0);
|
|
2017
2030
|
if (!i) return !1;
|
|
2018
|
-
let a = getComputedStyle(
|
|
2031
|
+
let a = getComputedStyle(Tc.value).direction === "rtl", o = {
|
|
2019
2032
|
expandable: i.getCanExpand(),
|
|
2020
2033
|
expanded: i.getIsExpanded(),
|
|
2021
2034
|
level: i.depth + 1
|
|
@@ -2023,25 +2036,25 @@ var Rn = In({
|
|
|
2023
2036
|
if (!s) return !1;
|
|
2024
2037
|
if (e.preventDefault(), s === "parent") {
|
|
2025
2038
|
let e = i.getParentRow();
|
|
2026
|
-
|
|
2039
|
+
Tc.value?.querySelector(`tr[data-row-id="${CSS.escape(e?.id ?? "")}"] > td:nth-child(${gi.value.length + 1})`)?.focus();
|
|
2027
2040
|
} else i.toggleExpanded(s === "expand");
|
|
2028
2041
|
return !0;
|
|
2029
2042
|
}
|
|
2030
|
-
function
|
|
2031
|
-
q.value &&
|
|
2043
|
+
function Oc(e) {
|
|
2044
|
+
q.value && Tc.value && (li.value && Dc(e) || _t(e, Tc.value, {
|
|
2032
2045
|
itemCount: Z.value.length,
|
|
2033
|
-
scrollToItem: $.value ? (e) =>
|
|
2034
|
-
pageRows:
|
|
2046
|
+
scrollToItem: $.value ? (e) => mc?.value.scrollToIndex(e) : void 0,
|
|
2047
|
+
pageRows: pc.value && C.scrollHeight ? Math.max(1, Math.floor(pc.value.clientHeight / C.rowHeight) - 1) : 10,
|
|
2035
2048
|
onSelectRow: (e) => {
|
|
2036
2049
|
let t = K.getRow(e, !0);
|
|
2037
2050
|
t?.getCanSelect() && xa(t, !fa.value || !ma(t));
|
|
2038
2051
|
}
|
|
2039
2052
|
}));
|
|
2040
2053
|
}
|
|
2041
|
-
function
|
|
2042
|
-
q.value &&
|
|
2054
|
+
function kc(e) {
|
|
2055
|
+
q.value && Tc.value && gt(Tc.value, e.target);
|
|
2043
2056
|
let t = e.target, n = t.closest("tr")?.dataset.rowId, r = t.dataset.columnId;
|
|
2044
|
-
C.cellSelection && q.value && !
|
|
2057
|
+
C.cellSelection && q.value && !os && !ss && n && r && t.matches("td") && as({
|
|
2045
2058
|
anchor: {
|
|
2046
2059
|
rowId: n,
|
|
2047
2060
|
columnId: r
|
|
@@ -2052,10 +2065,10 @@ var Rn = In({
|
|
|
2052
2065
|
}
|
|
2053
2066
|
});
|
|
2054
2067
|
}
|
|
2055
|
-
function
|
|
2056
|
-
|
|
2068
|
+
function Ac(e) {
|
|
2069
|
+
xs(e) || ms(e) || Oc(e);
|
|
2057
2070
|
}
|
|
2058
|
-
let
|
|
2071
|
+
let jc = h(() => ({
|
|
2059
2072
|
sorting: Nr.value,
|
|
2060
2073
|
filters: Rt(Vr.value),
|
|
2061
2074
|
globalFilter: W.value,
|
|
@@ -2076,24 +2089,24 @@ var Rn = In({
|
|
|
2076
2089
|
t && (t.sorting && Zr(t.sorting), t.filters && K.setColumnFilters(tn(t.filters)), t.globalFilter !== void 0 && K.setGlobalFilter(t.globalFilter), t.columnSizing && (Gr.value = t.columnSizing), t.columnOrder && K.setColumnOrder(t.columnOrder), t.hiddenColumns && K.setColumnVisibility(ln(t.hiddenColumns, !1)), t.pinnedColumns && K.setColumnPinning(t.pinnedColumns), t.expanded && t.expanded.length && ai(ln(t.expanded)), t.selection && ti(hn(t.selection)), t.density && oi(t.density), t.showFilters !== void 0 && t.showFilters !== zr.value && ri(t.showFilters), (t.page || t.pageSize) && Qr({
|
|
2077
2090
|
pageIndex: (t.page ?? 1) - 1,
|
|
2078
2091
|
pageSize: t.pageSize ?? H.value.pageSize
|
|
2079
|
-
})), be(
|
|
2092
|
+
})), be(jc, (e) => on(C.stateKey, Vt(e, C.stateExclude), C.stateStorage), { deep: !0 });
|
|
2080
2093
|
});
|
|
2081
|
-
function
|
|
2094
|
+
function Mc() {
|
|
2082
2095
|
C.stateKey && Qe(C.stateKey, C.stateStorage);
|
|
2083
2096
|
}
|
|
2084
|
-
function
|
|
2097
|
+
function Nc() {
|
|
2085
2098
|
Vr.value.length && K.setColumnFilters([]), W.value && K.setGlobalFilter(""), Dn.value && On(dt("and", "root")), H.value.pageIndex && Qr({
|
|
2086
2099
|
...H.value,
|
|
2087
2100
|
pageIndex: 0
|
|
2088
2101
|
});
|
|
2089
2102
|
}
|
|
2090
|
-
function
|
|
2091
|
-
|
|
2103
|
+
function Pc() {
|
|
2104
|
+
Nc(), Zr(Lt(C.defaultSorting)), Object.keys(Lr.value).length && ti({}), Rr.value && ni(null), T(Mc);
|
|
2092
2105
|
}
|
|
2093
|
-
let
|
|
2106
|
+
let Fc = h(() => !!C.pageSize), Ic = h(() => Mn.value ? Nn.value ?? An.value.length : K.getPrePaginatedRowModel().rows.length), Lc = h(() => (C.pageSizeOptions ?? []).map((e) => ({
|
|
2094
2107
|
value: String(e),
|
|
2095
2108
|
label: String(e)
|
|
2096
|
-
}))),
|
|
2109
|
+
}))), Rc = h(() => !!C.find || !!C.search || !!C.columnToggle || !!C.exportFilename || !!C.densityToggle || !!C.fullscreenToggle || !!C.filterToggle || !!C.filterReset || kn.value || !!I.toolbar || !!I.toolbarStart || !!I.toolbarEnd), zc = h(() => C.highlightSearch ? W.value : ""), Bc = h(() => Ts.value ? Cs.value.trim() : zc.value), Vc = h(() => Ii.value ? Ii.value : C.dataSource ? Pn.value ? "" : at(bn.value, l, S.value.locale) : na.value ? L.results(K.getFilteredRowModel().rows.length) : ""), Hc = h(() => Fn.value && C.loadingVariant === "skeleton"), Uc = h(() => Math.min(Z.value.length || C.pageSize || 5, 50)), Wc = h(() => na.value && (Mn.value || An.value.length > 0) && (!!I.noResults || C.noResultsText !== void 0)), Gc = h(() => {
|
|
2097
2110
|
if (!C.statusBar) return [];
|
|
2098
2111
|
let e = K.getSelectedRowModel().flatRows.filter((e) => !e.getIsGrouped());
|
|
2099
2112
|
return e.length ? Y.value.flatMap((t) => {
|
|
@@ -2105,7 +2118,7 @@ var Rn = In({
|
|
|
2105
2118
|
text: `${n.header}: ${L.aggregates.sum(Fa(n, r.sum, i))} · ${L.aggregates.avg(Fa(n, r.avg, i))}`
|
|
2106
2119
|
}];
|
|
2107
2120
|
}) : [];
|
|
2108
|
-
}),
|
|
2121
|
+
}), Kc = h(() => Mn.value ? Nn.value ?? An.value.length : K.getCoreRowModel().rows.length), qc = h(() => ({
|
|
2109
2122
|
page: H.value.pageIndex + 1,
|
|
2110
2123
|
pageSize: C.pageSize ? H.value.pageSize : 0,
|
|
2111
2124
|
sorting: Nr.value.map((e) => ({
|
|
@@ -2116,12 +2129,12 @@ var Rn = In({
|
|
|
2116
2129
|
search: W.value,
|
|
2117
2130
|
groupBy: U.value,
|
|
2118
2131
|
...Dn.value ? { condition: wn.value } : {}
|
|
2119
|
-
})),
|
|
2120
|
-
...
|
|
2132
|
+
})), Jc = h(() => Zt(qc.value)), Yc = h(() => Zt({
|
|
2133
|
+
...qc.value,
|
|
2121
2134
|
page: void 0,
|
|
2122
2135
|
pageSize: void 0
|
|
2123
|
-
})),
|
|
2124
|
-
function
|
|
2136
|
+
})), Xc = W.value;
|
|
2137
|
+
function Zc(e, t, n) {
|
|
2125
2138
|
let r = Sn();
|
|
2126
2139
|
if (!r) return;
|
|
2127
2140
|
if (n !== void 0 && n !== t && H.value.pageIndex !== 0) {
|
|
@@ -2131,27 +2144,27 @@ var Rn = In({
|
|
|
2131
2144
|
});
|
|
2132
2145
|
return;
|
|
2133
2146
|
}
|
|
2134
|
-
let i =
|
|
2135
|
-
|
|
2147
|
+
let i = Xc !== W.value;
|
|
2148
|
+
Xc = W.value, r.load(JSON.parse(e), { debounce: i });
|
|
2136
2149
|
}
|
|
2137
|
-
de(() =>
|
|
2138
|
-
|
|
2139
|
-
|
|
2150
|
+
de(() => Zc(Jc.value, Yc.value, void 0)), be([
|
|
2151
|
+
Jc,
|
|
2152
|
+
Yc,
|
|
2140
2153
|
() => !!C.dataSource
|
|
2141
|
-
], ([e, t], [, n]) =>
|
|
2142
|
-
exportCsv:
|
|
2143
|
-
generateCsv:
|
|
2144
|
-
clearState:
|
|
2145
|
-
resetFilters:
|
|
2146
|
-
resetState:
|
|
2147
|
-
exportXlsx:
|
|
2148
|
-
generateXlsx:
|
|
2149
|
-
print:
|
|
2150
|
-
refresh:
|
|
2151
|
-
undo:
|
|
2152
|
-
redo:
|
|
2154
|
+
], ([e, t], [, n]) => Zc(e, t, n)), o({
|
|
2155
|
+
exportCsv: Ws,
|
|
2156
|
+
generateCsv: Us,
|
|
2157
|
+
clearState: Mc,
|
|
2158
|
+
resetFilters: Nc,
|
|
2159
|
+
resetState: Pc,
|
|
2160
|
+
exportXlsx: Xs,
|
|
2161
|
+
generateXlsx: Ys,
|
|
2162
|
+
print: Qs,
|
|
2163
|
+
refresh: $s,
|
|
2164
|
+
undo: yo,
|
|
2165
|
+
redo: bo
|
|
2153
2166
|
});
|
|
2154
|
-
let
|
|
2167
|
+
let Qc = {
|
|
2155
2168
|
placement: "bottom-end",
|
|
2156
2169
|
gutter: 4
|
|
2157
2170
|
};
|
|
@@ -2160,7 +2173,7 @@ var Rn = In({
|
|
|
2160
2173
|
disabled: !ci.value
|
|
2161
2174
|
}, [y("div", w({
|
|
2162
2175
|
ref_key: "root",
|
|
2163
|
-
ref:
|
|
2176
|
+
ref: ko
|
|
2164
2177
|
}, {
|
|
2165
2178
|
...N(Be),
|
|
2166
2179
|
class: J.value.base({ class: E(N(Be).class) })
|
|
@@ -2168,9 +2181,9 @@ var Rn = In({
|
|
|
2168
2181
|
role: ci.value ? "dialog" : void 0,
|
|
2169
2182
|
"aria-modal": ci.value || void 0,
|
|
2170
2183
|
"aria-label": ci.value ? a.caption : void 0,
|
|
2171
|
-
onKeydown:
|
|
2184
|
+
onKeydown: fc
|
|
2172
2185
|
}), [
|
|
2173
|
-
|
|
2186
|
+
Rc.value ? (O(), v("div", {
|
|
2174
2187
|
key: 0,
|
|
2175
2188
|
class: E(J.value.toolbar())
|
|
2176
2189
|
}, [
|
|
@@ -2202,8 +2215,8 @@ var Rn = In({
|
|
|
2202
2215
|
label: N(L).find,
|
|
2203
2216
|
variant: "outline",
|
|
2204
2217
|
size: "sm",
|
|
2205
|
-
"aria-expanded":
|
|
2206
|
-
onClick:
|
|
2218
|
+
"aria-expanded": Ss.value,
|
|
2219
|
+
onClick: Ns
|
|
2207
2220
|
}, null, 8, [
|
|
2208
2221
|
"icon",
|
|
2209
2222
|
"label",
|
|
@@ -2245,7 +2258,7 @@ var Rn = In({
|
|
|
2245
2258
|
variant: "outline",
|
|
2246
2259
|
size: "sm",
|
|
2247
2260
|
disabled: !na.value,
|
|
2248
|
-
onClick:
|
|
2261
|
+
onClick: Nc
|
|
2249
2262
|
}, null, 8, [
|
|
2250
2263
|
"icon",
|
|
2251
2264
|
"label",
|
|
@@ -2253,7 +2266,7 @@ var Rn = In({
|
|
|
2253
2266
|
])) : _("", !0),
|
|
2254
2267
|
a.densityToggle ? (O(), g(N(R).Root, {
|
|
2255
2268
|
key: 4,
|
|
2256
|
-
positioning:
|
|
2269
|
+
positioning: Qc,
|
|
2257
2270
|
"lazy-mount": "",
|
|
2258
2271
|
"unmount-on-exit": ""
|
|
2259
2272
|
}, {
|
|
@@ -2302,7 +2315,7 @@ var Rn = In({
|
|
|
2302
2315
|
})) : _("", !0),
|
|
2303
2316
|
a.columnToggle ? (O(), g(N(R).Root, {
|
|
2304
2317
|
key: 5,
|
|
2305
|
-
positioning:
|
|
2318
|
+
positioning: Qc,
|
|
2306
2319
|
"lazy-mount": "",
|
|
2307
2320
|
"unmount-on-exit": ""
|
|
2308
2321
|
}, {
|
|
@@ -2318,7 +2331,7 @@ var Rn = In({
|
|
|
2318
2331
|
_: 1
|
|
2319
2332
|
}), (O(), g(ae, { to: "body" }, [x(N(R).Positioner, null, {
|
|
2320
2333
|
default: P(() => [x(N(R).Content, { class: E(N(ui).content()) }, {
|
|
2321
|
-
default: P(() => [(O(!0), v(m, null, A(
|
|
2334
|
+
default: P(() => [(O(!0), v(m, null, A(oc.value, (e, t) => (O(), v(m, { key: e.def ? `group:${e.def.id}` : "columns" }, [
|
|
2322
2335
|
e.def?.columns ? (O(), g(N(R).CheckboxItem, {
|
|
2323
2336
|
key: 0,
|
|
2324
2337
|
value: `group:${e.def.id}`,
|
|
@@ -2326,7 +2339,7 @@ var Rn = In({
|
|
|
2326
2339
|
disabled: !e.leaves.some((e) => e.getCanHide()),
|
|
2327
2340
|
"close-on-select": !1,
|
|
2328
2341
|
class: E(N(ui).item()),
|
|
2329
|
-
"onUpdate:checked": (t) =>
|
|
2342
|
+
"onUpdate:checked": (t) => sc(e.leaves, t)
|
|
2330
2343
|
}, {
|
|
2331
2344
|
default: P(() => [x(N(R).ItemIndicator, null, {
|
|
2332
2345
|
default: P(() => [x(N(we), {
|
|
@@ -2374,10 +2387,10 @@ var Rn = In({
|
|
|
2374
2387
|
e.def?.columns && a.reorderableColumns ? (O(), v(m, { key: 1 }, A([-1, 1], (n) => x(N(R).Item, {
|
|
2375
2388
|
key: n,
|
|
2376
2389
|
value: `group-${n < 0 ? "earlier" : "later"}:${e.def.id}`,
|
|
2377
|
-
disabled: n < 0 ? t === 0 : t ===
|
|
2390
|
+
disabled: n < 0 ? t === 0 : t === oc.value.length - 1,
|
|
2378
2391
|
"close-on-select": !1,
|
|
2379
2392
|
class: E(N(ui).item({ class: J.value.columnGroupItem() })),
|
|
2380
|
-
onSelect: (t) =>
|
|
2393
|
+
onSelect: (t) => cc(e.def.id, n)
|
|
2381
2394
|
}, {
|
|
2382
2395
|
default: P(() => [x(N(R).ItemText, { class: E(N(ui).label()) }, {
|
|
2383
2396
|
default: P(() => [b(M(n < 0 ? N(L).columnGroupEarlier(e.def.header) : N(L).columnGroupLater(e.def.header)), 1)]),
|
|
@@ -2397,17 +2410,17 @@ var Rn = In({
|
|
|
2397
2410
|
})]))]),
|
|
2398
2411
|
_: 1
|
|
2399
2412
|
})) : _("", !0),
|
|
2400
|
-
a.exportFilename ? (O(), v(m, { key: 6 }, [
|
|
2413
|
+
a.exportFilename ? (O(), v(m, { key: 6 }, [tc.value.length > 1 ? (O(), g(u, {
|
|
2401
2414
|
key: 0,
|
|
2402
|
-
items:
|
|
2403
|
-
onSelect:
|
|
2415
|
+
items: tc.value,
|
|
2416
|
+
onSelect: rc
|
|
2404
2417
|
}, {
|
|
2405
2418
|
default: P(() => [x(d, {
|
|
2406
2419
|
variant: "outline",
|
|
2407
2420
|
size: "sm",
|
|
2408
2421
|
"leading-icon": N(je)
|
|
2409
2422
|
}, {
|
|
2410
|
-
default: P(() => [b(M(
|
|
2423
|
+
default: P(() => [b(M(nc.value), 1)]),
|
|
2411
2424
|
_: 1
|
|
2412
2425
|
}, 8, ["leading-icon"])]),
|
|
2413
2426
|
_: 1
|
|
@@ -2416,9 +2429,9 @@ var Rn = In({
|
|
|
2416
2429
|
variant: "outline",
|
|
2417
2430
|
size: "sm",
|
|
2418
2431
|
"leading-icon": N(je),
|
|
2419
|
-
onClick: t[3] ||= (e) =>
|
|
2432
|
+
onClick: t[3] ||= (e) => Zs(ec.value[0], !1)
|
|
2420
2433
|
}, {
|
|
2421
|
-
default: P(() => [b(M(
|
|
2434
|
+
default: P(() => [b(M(nc.value), 1)]),
|
|
2422
2435
|
_: 1
|
|
2423
2436
|
}, 8, ["leading-icon"]))], 64)) : _("", !0),
|
|
2424
2437
|
a.fullscreenToggle ? (O(), g(f, {
|
|
@@ -2428,7 +2441,7 @@ var Rn = In({
|
|
|
2428
2441
|
label: ci.value ? N(L).exitFullscreen : N(L).fullscreen,
|
|
2429
2442
|
variant: "outline",
|
|
2430
2443
|
size: "sm",
|
|
2431
|
-
onClick:
|
|
2444
|
+
onClick: dc
|
|
2432
2445
|
}, null, 8, ["icon", "label"])) : _("", !0)
|
|
2433
2446
|
], 2)
|
|
2434
2447
|
], 2)) : _("", !0),
|
|
@@ -2442,7 +2455,7 @@ var Rn = In({
|
|
|
2442
2455
|
setValue: On,
|
|
2443
2456
|
label: N(l).conditionBuilder.advanced
|
|
2444
2457
|
})], 10, Un)) : _("", !0),
|
|
2445
|
-
a.find &&
|
|
2458
|
+
a.find && Ss.value ? (O(), v("div", {
|
|
2446
2459
|
key: 2,
|
|
2447
2460
|
class: E(J.value.findBar()),
|
|
2448
2461
|
role: "search",
|
|
@@ -2456,9 +2469,9 @@ var Rn = In({
|
|
|
2456
2469
|
class: E(J.value.findInput()),
|
|
2457
2470
|
placeholder: N(L).searchPlaceholder,
|
|
2458
2471
|
"aria-label": N(L).find,
|
|
2459
|
-
"model-value":
|
|
2460
|
-
"onUpdate:modelValue": t[4] ||= (e) =>
|
|
2461
|
-
onKeydown:
|
|
2472
|
+
"model-value": Cs.value,
|
|
2473
|
+
"onUpdate:modelValue": t[4] ||= (e) => Fs(e ?? ""),
|
|
2474
|
+
onKeydown: Ps
|
|
2462
2475
|
}, null, 8, [
|
|
2463
2476
|
"leading-icon",
|
|
2464
2477
|
"class",
|
|
@@ -2469,14 +2482,14 @@ var Rn = In({
|
|
|
2469
2482
|
y("span", {
|
|
2470
2483
|
class: E(J.value.findCount()),
|
|
2471
2484
|
"aria-live": "polite"
|
|
2472
|
-
}, M(
|
|
2485
|
+
}, M(Cs.value.trim() ? N(L).findMatches(Ds.value.length ? Math.min(ws.value, Ds.value.length - 1) + 1 : 0, Ds.value.length) : ""), 3),
|
|
2473
2486
|
x(f, {
|
|
2474
2487
|
icon: N(De),
|
|
2475
2488
|
label: N(L).findPrevious,
|
|
2476
2489
|
variant: "text",
|
|
2477
2490
|
size: "sm",
|
|
2478
|
-
disabled: !
|
|
2479
|
-
onClick: t[5] ||= (e) =>
|
|
2491
|
+
disabled: !Ds.value.length,
|
|
2492
|
+
onClick: t[5] ||= (e) => Ms(ws.value - 1)
|
|
2480
2493
|
}, null, 8, [
|
|
2481
2494
|
"icon",
|
|
2482
2495
|
"label",
|
|
@@ -2487,8 +2500,8 @@ var Rn = In({
|
|
|
2487
2500
|
label: N(L).findNext,
|
|
2488
2501
|
variant: "text",
|
|
2489
2502
|
size: "sm",
|
|
2490
|
-
disabled: !
|
|
2491
|
-
onClick: t[6] ||= (e) =>
|
|
2503
|
+
disabled: !Ds.value.length,
|
|
2504
|
+
onClick: t[6] ||= (e) => Ms(ws.value + 1)
|
|
2492
2505
|
}, null, 8, [
|
|
2493
2506
|
"icon",
|
|
2494
2507
|
"label",
|
|
@@ -2499,20 +2512,20 @@ var Rn = In({
|
|
|
2499
2512
|
label: N(L).findClose,
|
|
2500
2513
|
variant: "text",
|
|
2501
2514
|
size: "sm",
|
|
2502
|
-
onClick:
|
|
2515
|
+
onClick: Ns
|
|
2503
2516
|
}, null, 8, ["icon", "label"])
|
|
2504
2517
|
], 10, Wn)) : _("", !0),
|
|
2505
2518
|
a.editMode === "batch" ? (O(), v("div", {
|
|
2506
2519
|
key: 3,
|
|
2507
2520
|
class: E(J.value.batchBar())
|
|
2508
2521
|
}, [
|
|
2509
|
-
y("span", { class: E(J.value.batchCount()) }, M(N(L).changes(
|
|
2522
|
+
y("span", { class: E(J.value.batchCount()) }, M(N(L).changes(xo.value)), 3),
|
|
2510
2523
|
x(d, {
|
|
2511
2524
|
variant: "text",
|
|
2512
2525
|
size: "sm",
|
|
2513
2526
|
"leading-icon": N(Ge),
|
|
2514
|
-
disabled: !
|
|
2515
|
-
onClick:
|
|
2527
|
+
disabled: !go.value,
|
|
2528
|
+
onClick: yo
|
|
2516
2529
|
}, {
|
|
2517
2530
|
default: P(() => [b(M(N(L).undo), 1)]),
|
|
2518
2531
|
_: 1
|
|
@@ -2521,8 +2534,8 @@ var Rn = In({
|
|
|
2521
2534
|
variant: "text",
|
|
2522
2535
|
size: "sm",
|
|
2523
2536
|
"leading-icon": N(Ve),
|
|
2524
|
-
disabled: !
|
|
2525
|
-
onClick:
|
|
2537
|
+
disabled: !_o.value,
|
|
2538
|
+
onClick: bo
|
|
2526
2539
|
}, {
|
|
2527
2540
|
default: P(() => [b(M(N(L).redo), 1)]),
|
|
2528
2541
|
_: 1
|
|
@@ -2530,16 +2543,16 @@ var Rn = In({
|
|
|
2530
2543
|
x(d, {
|
|
2531
2544
|
variant: "outline",
|
|
2532
2545
|
size: "sm",
|
|
2533
|
-
disabled: !
|
|
2534
|
-
onClick:
|
|
2546
|
+
disabled: !xo.value,
|
|
2547
|
+
onClick: wo
|
|
2535
2548
|
}, {
|
|
2536
2549
|
default: P(() => [b(M(N(L).discardChanges), 1)]),
|
|
2537
2550
|
_: 1
|
|
2538
2551
|
}, 8, ["disabled"]),
|
|
2539
2552
|
x(d, {
|
|
2540
2553
|
size: "sm",
|
|
2541
|
-
disabled: !
|
|
2542
|
-
onClick:
|
|
2554
|
+
disabled: !xo.value,
|
|
2555
|
+
onClick: Co
|
|
2543
2556
|
}, {
|
|
2544
2557
|
default: P(() => [b(M(N(L).saveChanges), 1)]),
|
|
2545
2558
|
_: 1
|
|
@@ -2548,17 +2561,17 @@ var Rn = In({
|
|
|
2548
2561
|
y("p", {
|
|
2549
2562
|
role: "status",
|
|
2550
2563
|
class: E(J.value.status())
|
|
2551
|
-
}, M(
|
|
2552
|
-
|
|
2564
|
+
}, M(Vc.value), 3),
|
|
2565
|
+
Fc.value && a.paginatorPosition === "top" ? (O(), v("div", {
|
|
2553
2566
|
key: 4,
|
|
2554
2567
|
class: E(J.value.footer())
|
|
2555
|
-
}, [
|
|
2568
|
+
}, [Lc.value.length ? (O(), v("div", {
|
|
2556
2569
|
key: 0,
|
|
2557
2570
|
class: E(J.value.pageSize())
|
|
2558
2571
|
}, [y("span", Gn, M(N(L).rowsPerPage), 1), x(ne, {
|
|
2559
2572
|
class: E(J.value.pageSizeSelect()),
|
|
2560
2573
|
"aria-label": N(L).rowsPerPage,
|
|
2561
|
-
items:
|
|
2574
|
+
items: Lc.value,
|
|
2562
2575
|
"model-value": String(H.value.pageSize),
|
|
2563
2576
|
"onUpdate:modelValue": t[7] ||= (e) => N(K).setPageSize(Number(e))
|
|
2564
2577
|
}, null, 8, [
|
|
@@ -2567,7 +2580,7 @@ var Rn = In({
|
|
|
2567
2580
|
"items",
|
|
2568
2581
|
"model-value"
|
|
2569
2582
|
])], 2)) : _("", !0), x(r, {
|
|
2570
|
-
count:
|
|
2583
|
+
count: Ic.value,
|
|
2571
2584
|
"page-size": H.value.pageSize,
|
|
2572
2585
|
page: H.value.pageIndex + 1,
|
|
2573
2586
|
translations: { rootLabel: `${a.caption}: ${N(l).pagination.rootLabel}` },
|
|
@@ -2584,10 +2597,10 @@ var Rn = In({
|
|
|
2584
2597
|
ref: "scroll",
|
|
2585
2598
|
class: E(J.value.scroll()),
|
|
2586
2599
|
style: D(a.scrollHeight ? { maxHeight: a.scrollHeight } : void 0),
|
|
2587
|
-
onScroll:
|
|
2600
|
+
onScroll: xc
|
|
2588
2601
|
}, [y("table", {
|
|
2589
2602
|
ref_key: "tableElement",
|
|
2590
|
-
ref:
|
|
2603
|
+
ref: Tc,
|
|
2591
2604
|
class: E(J.value.table({ class: yi.value ? J.value.fixedLayout() : void 0 })),
|
|
2592
2605
|
style: D(yi.value ? { minWidth: `${N(K).getTotalSize() + Si.value + Ci.value}px` } : void 0),
|
|
2593
2606
|
"aria-busy": Fn.value || void 0,
|
|
@@ -2595,13 +2608,13 @@ var Rn = In({
|
|
|
2595
2608
|
role: q.value ? li.value ? "treegrid" : "grid" : void 0,
|
|
2596
2609
|
"aria-multiselectable": q.value && (a.selectable && fa.value || a.cellSelection) ? "true" : void 0,
|
|
2597
2610
|
tabindex: (a.cellSelection || a.editMode === "batch") && !q.value ? -1 : void 0,
|
|
2598
|
-
onKeydown:
|
|
2599
|
-
onFocusin:
|
|
2611
|
+
onKeydown: Ac,
|
|
2612
|
+
onFocusin: kc
|
|
2600
2613
|
}, [
|
|
2601
2614
|
y("caption", { class: E(J.value.caption()) }, M(a.caption), 3),
|
|
2602
2615
|
y("thead", {
|
|
2603
2616
|
ref_key: "head",
|
|
2604
|
-
ref:
|
|
2617
|
+
ref: wc,
|
|
2605
2618
|
class: E(J.value.head())
|
|
2606
2619
|
}, [(O(!0), v(m, null, A(ki.value, (n, r) => (O(), v("tr", {
|
|
2607
2620
|
key: r,
|
|
@@ -2647,7 +2660,7 @@ var Rn = In({
|
|
|
2647
2660
|
class: E(J.value.th({ class: J.value.groupTh() }))
|
|
2648
2661
|
}, M(X(n.header.column)), 11, Yn)) : (O(), v("th", {
|
|
2649
2662
|
key: 1,
|
|
2650
|
-
id:
|
|
2663
|
+
id: Is.value ? Ls(n.header.column.id) : void 0,
|
|
2651
2664
|
scope: "col",
|
|
2652
2665
|
rowspan: n.rowSpan > 1 ? n.rowSpan : void 0,
|
|
2653
2666
|
class: E(di(n.header.column.id).th({ class: [
|
|
@@ -2829,7 +2842,7 @@ var Rn = In({
|
|
|
2829
2842
|
Oa.value.length ? (O(), v("tbody", {
|
|
2830
2843
|
key: 0,
|
|
2831
2844
|
class: E(J.value.frozenBody()),
|
|
2832
|
-
style: D(a.scrollHeight ? { top: `${
|
|
2845
|
+
style: D(a.scrollHeight ? { top: `${Sc.value}px` } : void 0)
|
|
2833
2846
|
}, [(O(!0), v(m, null, A(Oa.value, (t) => (O(), v("tr", {
|
|
2834
2847
|
key: t.id,
|
|
2835
2848
|
class: E(J.value.row({ class: a.rowClass?.(t.original) })),
|
|
@@ -2846,21 +2859,21 @@ var Rn = In({
|
|
|
2846
2859
|
key: n.id,
|
|
2847
2860
|
class: E(di(n.column.id).td({ class: [wi(n.column.id, !1), fi(n.column.id, t)] })),
|
|
2848
2861
|
style: D(Ti(n.column.id, !1))
|
|
2849
|
-
}, [B.value.get(n.column.id)?.editable && (mi.value &&
|
|
2862
|
+
}, [B.value.get(n.column.id)?.editable && (mi.value && To.value?.rowId === t.id && To.value.columnId === n.column.id || a.editMode === "row" && Eo.value === t.id) ? (O(), v("div", {
|
|
2850
2863
|
key: 0,
|
|
2851
2864
|
"data-editor": "",
|
|
2852
2865
|
class: E(J.value.editor()),
|
|
2853
|
-
"aria-busy":
|
|
2854
|
-
onKeydown: (e) => mi.value ?
|
|
2855
|
-
onFocusout: (e) => mi.value ?
|
|
2856
|
-
}, [N(I)[`editor-${n.column.id}`] ? j(e.$slots, `editor-${n.column.id}`, w({ ref_for: !0 },
|
|
2866
|
+
"aria-busy": Ro.value || void 0,
|
|
2867
|
+
onKeydown: (e) => mi.value ? Uo(t, n.column.id, e) : Xo(t, e),
|
|
2868
|
+
onFocusout: (e) => mi.value ? Wo(t, n.column.id, e) : void 0
|
|
2869
|
+
}, [N(I)[`editor-${n.column.id}`] ? j(e.$slots, `editor-${n.column.id}`, w({ ref_for: !0 }, qo(t, B.value.get(n.column.id))), void 0, void 0, 0) : (O(), g(Bn, {
|
|
2857
2870
|
key: 1,
|
|
2858
|
-
type:
|
|
2871
|
+
type: Ao(B.value.get(n.column.id)),
|
|
2859
2872
|
label: X(n.column),
|
|
2860
2873
|
options: B.value.get(n.column.id).editOptions,
|
|
2861
|
-
invalid: !!
|
|
2862
|
-
"model-value":
|
|
2863
|
-
"onUpdate:modelValue": (e) =>
|
|
2874
|
+
invalid: !!Oo.value[n.column.id],
|
|
2875
|
+
"model-value": Do.value[n.column.id],
|
|
2876
|
+
"onUpdate:modelValue": (e) => Ko(t, B.value.get(n.column.id), e)
|
|
2864
2877
|
}, oe({ _: 2 }, [N(I)[`option-${n.column.id}`] ? {
|
|
2865
2878
|
name: "option",
|
|
2866
2879
|
fn: P((t) => [j(e.$slots, `option-${n.column.id}`, w({ ref_for: !0 }, t))]),
|
|
@@ -2872,18 +2885,18 @@ var Rn = In({
|
|
|
2872
2885
|
"invalid",
|
|
2873
2886
|
"model-value",
|
|
2874
2887
|
"onUpdate:modelValue"
|
|
2875
|
-
])),
|
|
2888
|
+
])), Oo.value[n.column.id] ? (O(), v("span", {
|
|
2876
2889
|
key: 2,
|
|
2877
|
-
id:
|
|
2890
|
+
id: Mo(t.id, n.column.id),
|
|
2878
2891
|
role: "alert",
|
|
2879
2892
|
class: E(J.value.editError())
|
|
2880
|
-
}, M(
|
|
2893
|
+
}, M(Oo.value[n.column.id]), 11, rr)) : _("", !0)], 42, nr)) : mi.value && B.value.get(n.column.id)?.editable ? (O(), v("button", {
|
|
2881
2894
|
key: 1,
|
|
2882
2895
|
type: "button",
|
|
2883
2896
|
class: E(di(n.column.id).editButton()),
|
|
2884
|
-
"data-edit":
|
|
2885
|
-
"aria-label": `${N(L).edit(X(n.column), V(B.value.get(n.column.id), Q(t, n.column.id), t.original))}${
|
|
2886
|
-
onClick: (e) =>
|
|
2897
|
+
"data-edit": jo(t.id, n.column.id),
|
|
2898
|
+
"aria-label": `${N(L).edit(X(n.column), V(B.value.get(n.column.id), Q(t, n.column.id), t.original))}${Hs(t, n.column.id) ? `, ${N(L).changed}` : ""}`,
|
|
2899
|
+
onClick: (e) => Io(t, n.column.id, e)
|
|
2887
2900
|
}, [j(e.$slots, `cell-${n.column.id}`, {
|
|
2888
2901
|
row: t.original,
|
|
2889
2902
|
value: Q(t, n.column.id)
|
|
@@ -2907,12 +2920,12 @@ var Rn = In({
|
|
|
2907
2920
|
}, [a.editMode === "row" && pi.value ? (O(), v("div", {
|
|
2908
2921
|
key: 0,
|
|
2909
2922
|
class: E(J.value.editActions())
|
|
2910
|
-
}, [
|
|
2923
|
+
}, [Eo.value === t.id ? (O(), v(m, { key: 0 }, [x(f, {
|
|
2911
2924
|
icon: N(we),
|
|
2912
2925
|
label: N(L).saveRow(G(t.original, t.index)),
|
|
2913
2926
|
variant: "text",
|
|
2914
2927
|
size: "sm",
|
|
2915
|
-
onClick: (e) =>
|
|
2928
|
+
onClick: (e) => Yo(t, !0)
|
|
2916
2929
|
}, null, 8, [
|
|
2917
2930
|
"icon",
|
|
2918
2931
|
"label",
|
|
@@ -2922,7 +2935,7 @@ var Rn = In({
|
|
|
2922
2935
|
label: N(L).cancelEdit(G(t.original, t.index)),
|
|
2923
2936
|
variant: "text",
|
|
2924
2937
|
size: "sm",
|
|
2925
|
-
onClick: (e) =>
|
|
2938
|
+
onClick: (e) => Yo(t, !1)
|
|
2926
2939
|
}, null, 8, [
|
|
2927
2940
|
"icon",
|
|
2928
2941
|
"label",
|
|
@@ -2934,7 +2947,7 @@ var Rn = In({
|
|
|
2934
2947
|
label: N(L).editRow(G(t.original, t.index)),
|
|
2935
2948
|
variant: "text",
|
|
2936
2949
|
size: "sm",
|
|
2937
|
-
onClick: (e) =>
|
|
2950
|
+
onClick: (e) => Jo(t)
|
|
2938
2951
|
}, null, 8, [
|
|
2939
2952
|
"data-row-edit",
|
|
2940
2953
|
"icon",
|
|
@@ -2942,14 +2955,14 @@ var Rn = In({
|
|
|
2942
2955
|
"onClick"
|
|
2943
2956
|
]))], 2)) : _("", !0)], 6)) : _("", !0)
|
|
2944
2957
|
], 10, tr))), 128))], 6)) : _("", !0),
|
|
2945
|
-
x(
|
|
2958
|
+
x(Ua, {
|
|
2946
2959
|
enabled: !!a.contextMenu && !!a.rowActions,
|
|
2947
|
-
items:
|
|
2948
|
-
label:
|
|
2949
|
-
onSelect: t[16] ||= (e) =>
|
|
2960
|
+
items: Ba.value ? za(Ba.value) : [],
|
|
2961
|
+
label: Ba.value ? N(L).rowActions(G(Ba.value.original, Ba.value.index)) : void 0,
|
|
2962
|
+
onSelect: t[16] ||= (e) => Ha(Ba.value, e)
|
|
2950
2963
|
}, {
|
|
2951
|
-
default: P(() => [y("tbody", { onContextmenuCapture:
|
|
2952
|
-
Z.value.length === 0 && !
|
|
2964
|
+
default: P(() => [y("tbody", { onContextmenuCapture: Va }, [
|
|
2965
|
+
Z.value.length === 0 && !Hc.value ? (O(), v("tr", ar, [y("td", {
|
|
2953
2966
|
colspan: vi.value,
|
|
2954
2967
|
class: E(J.value.message())
|
|
2955
2968
|
}, [Pn.value ? (O(), v("span", {
|
|
@@ -2958,15 +2971,15 @@ var Rn = In({
|
|
|
2958
2971
|
}, [y("span", sr, M(N(l).dataSource.error), 1), x(d, {
|
|
2959
2972
|
variant: "outline",
|
|
2960
2973
|
size: "sm",
|
|
2961
|
-
onClick:
|
|
2974
|
+
onClick: $s
|
|
2962
2975
|
}, {
|
|
2963
2976
|
default: P(() => [b(M(N(l).dataSource.retry), 1)]),
|
|
2964
2977
|
_: 1
|
|
2965
2978
|
})], 2)) : Fn.value ? j(e.$slots, "loadingContent", {}, () => [y("span", { class: E(J.value.messageContent()) }, [x(te, {
|
|
2966
2979
|
size: "sm",
|
|
2967
2980
|
label: a.loadingText ?? N(l).common.loading
|
|
2968
|
-
}, null, 8, ["label"]), b(M(a.loadingText ?? N(l).common.loading), 1)], 2)], void 0, 1) :
|
|
2969
|
-
|
|
2981
|
+
}, null, 8, ["label"]), b(M(a.loadingText ?? N(l).common.loading), 1)], 2)], void 0, 1) : Wc.value ? j(e.$slots, "noResults", {}, () => [b(M(a.noResultsText ?? a.emptyText ?? N(l).common.empty), 1)], void 0, 2) : j(e.$slots, "empty", {}, () => [b(M(a.emptyText ?? N(l).common.empty), 1)], void 0, 3)], 10, or)])) : _("", !0),
|
|
2982
|
+
Hc.value ? (O(!0), v(m, { key: 1 }, A(Uc.value, (e) => (O(), v("tr", {
|
|
2970
2983
|
key: `skeleton-${e}`,
|
|
2971
2984
|
class: E(J.value.row())
|
|
2972
2985
|
}, [
|
|
@@ -2986,26 +2999,26 @@ var Rn = In({
|
|
|
2986
2999
|
style: D(Oi("actions"))
|
|
2987
3000
|
}, null, 6)) : _("", !0)
|
|
2988
3001
|
], 2))), 128)) : _("", !0),
|
|
2989
|
-
|
|
3002
|
+
_c.value > 0 && !Hc.value ? (O(), v("tr", {
|
|
2990
3003
|
key: 2,
|
|
2991
3004
|
class: E(J.value.spacer()),
|
|
2992
3005
|
"aria-hidden": "true"
|
|
2993
3006
|
}, [y("td", {
|
|
2994
3007
|
colspan: vi.value,
|
|
2995
3008
|
class: E(J.value.spacerCell()),
|
|
2996
|
-
style: D({ height: `${
|
|
3009
|
+
style: D({ height: `${_c.value}px` })
|
|
2997
3010
|
}, null, 14, cr)], 2)) : _("", !0),
|
|
2998
|
-
(O(!0), v(m, null, A(
|
|
3011
|
+
(O(!0), v(m, null, A(Hc.value ? [] : gc.value, (n) => (O(), v(m, { key: n.key }, [n.kind === "group" ? (O(), v("tr", {
|
|
2999
3012
|
key: 0,
|
|
3000
3013
|
ref_for: !0,
|
|
3001
|
-
ref:
|
|
3002
|
-
class: E(J.value.groupRow(
|
|
3014
|
+
ref: yc,
|
|
3015
|
+
class: E(J.value.groupRow(Ka.value ? { class: [J.value.dropTarget(), J.value.dropInside()] } : {})),
|
|
3003
3016
|
"data-index": n.index,
|
|
3004
3017
|
"aria-rowindex": $.value ? n.index + ki.value.length + 1 : void 0,
|
|
3005
|
-
"data-drop":
|
|
3006
|
-
onDragover: (e) => a.reorderableRows ?
|
|
3007
|
-
onDragleave: t[12] ||= (e) => a.reorderableRows ?
|
|
3008
|
-
onDrop: t[13] ||= (e) => a.reorderableRows ?
|
|
3018
|
+
"data-drop": Ka.value ? uo(n.row.id) : void 0,
|
|
3019
|
+
onDragover: (e) => a.reorderableRows ? so(n.row, e) : void 0,
|
|
3020
|
+
onDragleave: t[12] ||= (e) => a.reorderableRows ? Ja.value = null : void 0,
|
|
3021
|
+
onDrop: t[13] ||= (e) => a.reorderableRows ? co(e) : void 0
|
|
3009
3022
|
}, [y("td", {
|
|
3010
3023
|
colspan: Na.value ? gi.value.length + 1 : vi.value,
|
|
3011
3024
|
class: E(J.value.groupCell())
|
|
@@ -3036,7 +3049,7 @@ var Rn = In({
|
|
|
3036
3049
|
key: 1,
|
|
3037
3050
|
id: ja(n.row),
|
|
3038
3051
|
ref_for: !0,
|
|
3039
|
-
ref:
|
|
3052
|
+
ref: yc,
|
|
3040
3053
|
class: E(J.value.expansionRow()),
|
|
3041
3054
|
"data-index": n.index,
|
|
3042
3055
|
"aria-rowindex": $.value ? n.index + ki.value.length + 1 : void 0
|
|
@@ -3049,10 +3062,10 @@ var Rn = In({
|
|
|
3049
3062
|
})], 10, pr)], 10, fr)) : (O(), v("tr", {
|
|
3050
3063
|
key: 2,
|
|
3051
3064
|
ref_for: !0,
|
|
3052
|
-
ref:
|
|
3065
|
+
ref: yc,
|
|
3053
3066
|
class: E(J.value.row({ class: [
|
|
3054
3067
|
a.reorderableRows ? J.value.dropTarget() : "",
|
|
3055
|
-
a.reorderableRows &&
|
|
3068
|
+
a.reorderableRows && Xa.value && Ka.value ? J.value.dropInside() : "",
|
|
3056
3069
|
a.rowHref?.(n.row.original) ? J.value.linkRow() : "",
|
|
3057
3070
|
a.rowClass?.(n.row.original)
|
|
3058
3071
|
] })),
|
|
@@ -3063,16 +3076,16 @@ var Rn = In({
|
|
|
3063
3076
|
"aria-rowindex": $.value ? n.index + ki.value.length + 1 : void 0,
|
|
3064
3077
|
"aria-level": li.value ? n.row.depth + 1 : void 0,
|
|
3065
3078
|
"aria-expanded": li.value && n.row.getCanExpand() ? n.row.getIsExpanded() : void 0,
|
|
3066
|
-
draggable:
|
|
3067
|
-
"data-drop":
|
|
3068
|
-
"data-dragging":
|
|
3079
|
+
draggable: qa.value === n.row.id ? "true" : void 0,
|
|
3080
|
+
"data-drop": uo(n.row.id),
|
|
3081
|
+
"data-dragging": Ka.value === n.row.id || void 0,
|
|
3069
3082
|
onClick: (e) => Ca(n.row, e),
|
|
3070
3083
|
onAuxclick: (e) => wa(n.row, e),
|
|
3071
|
-
onDragstart: (e) =>
|
|
3072
|
-
onDragover: (e) =>
|
|
3073
|
-
onDragleave: t[15] ||= (e) =>
|
|
3074
|
-
onDrop:
|
|
3075
|
-
onDragend:
|
|
3084
|
+
onDragstart: (e) => ao(n.row, e),
|
|
3085
|
+
onDragover: (e) => oo(n.row, e),
|
|
3086
|
+
onDragleave: t[15] ||= (e) => Ja.value = null,
|
|
3087
|
+
onDrop: co,
|
|
3088
|
+
onDragend: lo
|
|
3076
3089
|
}, [
|
|
3077
3090
|
(O(!0), v(m, null, A(gi.value, (e) => (O(), v("td", {
|
|
3078
3091
|
key: e,
|
|
@@ -3084,10 +3097,10 @@ var Rn = In({
|
|
|
3084
3097
|
class: E(J.value.dragHandle()),
|
|
3085
3098
|
"data-drag-handle": n.row.id,
|
|
3086
3099
|
"aria-label": N(L).moveRow(G(n.row.original, n.row.index)),
|
|
3087
|
-
"aria-keyshortcuts":
|
|
3088
|
-
onKeydown: (e) =>
|
|
3089
|
-
onPointerdown: (e) =>
|
|
3090
|
-
onPointerup: t[14] ||= (e) =>
|
|
3100
|
+
"aria-keyshortcuts": Xa.value ? "ArrowUp ArrowDown ArrowLeft ArrowRight" : "ArrowUp ArrowDown",
|
|
3101
|
+
onKeydown: (e) => io(n.row, e),
|
|
3102
|
+
onPointerdown: (e) => qa.value = n.row.id,
|
|
3103
|
+
onPointerup: t[14] ||= (e) => qa.value = Ka.value ? qa.value : null
|
|
3091
3104
|
}, [x(N(Fe), {
|
|
3092
3105
|
class: E(J.value.dragIcon()),
|
|
3093
3106
|
"aria-hidden": "true"
|
|
@@ -3133,15 +3146,15 @@ var Rn = In({
|
|
|
3133
3146
|
key: 5,
|
|
3134
3147
|
class: E(J.value.rowNumber())
|
|
3135
3148
|
}, M(Aa.value.get(n.row.id)), 3))], 6))), 128)),
|
|
3136
|
-
(O(!0), v(m, null, A(n.row.getVisibleCells(), (t, r) => (O(), v(m, { key: t.id }, [
|
|
3149
|
+
(O(!0), v(m, null, A(n.row.getVisibleCells(), (t, r) => (O(), v(m, { key: t.id }, [Bs(n.index, r) ? (O(), v("td", w({
|
|
3137
3150
|
key: 0,
|
|
3138
3151
|
class: di(t.column.id).td({ class: [
|
|
3139
3152
|
wi(t.column.id, !1),
|
|
3140
3153
|
fi(t.column.id, n.row),
|
|
3141
|
-
...
|
|
3154
|
+
...Vs(n.row, t.column.id, n.index, r).className
|
|
3142
3155
|
] }),
|
|
3143
3156
|
style: Ti(t.column.id, !1)
|
|
3144
|
-
}, { ref_for: !0 },
|
|
3157
|
+
}, { ref_for: !0 }, Vs(n.row, t.column.id, n.index, r).attributes), [(O(), g(me((a.getSubRows || U.value.length) && r === 0 ? "div" : Wa), w({ ref_for: !0 }, (a.getSubRows || U.value.length) && r === 0 ? {
|
|
3145
3158
|
class: J.value.treeCell(),
|
|
3146
3159
|
style: { paddingInlineStart: `${n.row.depth * 20}px` }
|
|
3147
3160
|
} : {}), {
|
|
@@ -3159,21 +3172,21 @@ var Rn = In({
|
|
|
3159
3172
|
}, null, 8, ["class", "data-state"])], 10, vr)) : (O(), v("span", {
|
|
3160
3173
|
key: 1,
|
|
3161
3174
|
class: E(J.value.expanderSpacer())
|
|
3162
|
-
}, null, 2))], 64)) : _("", !0), B.value.get(t.column.id)?.editable && (mi.value &&
|
|
3175
|
+
}, null, 2))], 64)) : _("", !0), B.value.get(t.column.id)?.editable && (mi.value && To.value?.rowId === n.row.id && To.value.columnId === t.column.id || a.editMode === "row" && Eo.value === n.row.id) ? (O(), v("div", {
|
|
3163
3176
|
key: 1,
|
|
3164
3177
|
"data-editor": "",
|
|
3165
3178
|
class: E(J.value.editor()),
|
|
3166
|
-
"aria-busy":
|
|
3167
|
-
onKeydown: (e) => mi.value ?
|
|
3168
|
-
onFocusout: (e) => mi.value ?
|
|
3169
|
-
}, [N(I)[`editor-${t.column.id}`] ? j(e.$slots, `editor-${t.column.id}`, w({ ref_for: !0 },
|
|
3179
|
+
"aria-busy": Ro.value || void 0,
|
|
3180
|
+
onKeydown: (e) => mi.value ? Uo(n.row, t.column.id, e) : Xo(n.row, e),
|
|
3181
|
+
onFocusout: (e) => mi.value ? Wo(n.row, t.column.id, e) : void 0
|
|
3182
|
+
}, [N(I)[`editor-${t.column.id}`] ? j(e.$slots, `editor-${t.column.id}`, w({ ref_for: !0 }, qo(n.row, B.value.get(t.column.id))), void 0, void 0, 0) : (O(), g(Bn, {
|
|
3170
3183
|
key: 1,
|
|
3171
|
-
type:
|
|
3184
|
+
type: Ao(B.value.get(t.column.id)),
|
|
3172
3185
|
label: X(t.column),
|
|
3173
3186
|
options: B.value.get(t.column.id).editOptions,
|
|
3174
|
-
invalid: !!
|
|
3175
|
-
"model-value":
|
|
3176
|
-
"onUpdate:modelValue": (e) =>
|
|
3187
|
+
invalid: !!Oo.value[t.column.id],
|
|
3188
|
+
"model-value": Do.value[t.column.id],
|
|
3189
|
+
"onUpdate:modelValue": (e) => Ko(n.row, B.value.get(t.column.id), e)
|
|
3177
3190
|
}, oe({ _: 2 }, [N(I)[`option-${t.column.id}`] ? {
|
|
3178
3191
|
name: "option",
|
|
3179
3192
|
fn: P((n) => [j(e.$slots, `option-${t.column.id}`, w({ ref_for: !0 }, n))]),
|
|
@@ -3185,18 +3198,18 @@ var Rn = In({
|
|
|
3185
3198
|
"invalid",
|
|
3186
3199
|
"model-value",
|
|
3187
3200
|
"onUpdate:modelValue"
|
|
3188
|
-
])),
|
|
3201
|
+
])), Oo.value[t.column.id] ? (O(), v("span", {
|
|
3189
3202
|
key: 2,
|
|
3190
|
-
id:
|
|
3203
|
+
id: Mo(n.row.id, t.column.id),
|
|
3191
3204
|
role: "alert",
|
|
3192
3205
|
class: E(J.value.editError())
|
|
3193
|
-
}, M(
|
|
3206
|
+
}, M(Oo.value[t.column.id]), 11, br)) : _("", !0)], 42, yr)) : mi.value && B.value.get(t.column.id)?.editable ? (O(), v("button", {
|
|
3194
3207
|
key: 2,
|
|
3195
3208
|
type: "button",
|
|
3196
3209
|
class: E(di(t.column.id).editButton()),
|
|
3197
|
-
"data-edit":
|
|
3198
|
-
"aria-label": `${N(L).edit(X(t.column), V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original))}${
|
|
3199
|
-
onClick: (e) =>
|
|
3210
|
+
"data-edit": jo(n.row.id, t.column.id),
|
|
3211
|
+
"aria-label": `${N(L).edit(X(t.column), V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original))}${Hs(n.row, t.column.id) ? `, ${N(L).changed}` : ""}`,
|
|
3212
|
+
onClick: (e) => Io(n.row, t.column.id, e)
|
|
3200
3213
|
}, [j(e.$slots, `cell-${t.column.id}`, {
|
|
3201
3214
|
row: n.row.original,
|
|
3202
3215
|
value: Q(n.row, t.column.id)
|
|
@@ -3209,7 +3222,7 @@ var Rn = In({
|
|
|
3209
3222
|
}, () => [b(M(V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original)), 1)]), x(ie, {
|
|
3210
3223
|
value: V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original),
|
|
3211
3224
|
label: N(L).copy(X(t.column), V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original))
|
|
3212
|
-
}, null, 8, ["value", "label"])], 2)) : (O(), g(me(Ea(n.row, t.column.id) ? "a" :
|
|
3225
|
+
}, null, 8, ["value", "label"])], 2)) : (O(), g(me(Ea(n.row, t.column.id) ? "a" : Wa), w({
|
|
3213
3226
|
key: 4,
|
|
3214
3227
|
ref_for: !0
|
|
3215
3228
|
}, Ea(n.row, t.column.id) ? {
|
|
@@ -3220,10 +3233,10 @@ var Rn = In({
|
|
|
3220
3233
|
default: P(() => [j(e.$slots, `cell-${t.column.id}`, {
|
|
3221
3234
|
row: n.row.original,
|
|
3222
3235
|
value: Q(n.row, t.column.id)
|
|
3223
|
-
}, () => [
|
|
3236
|
+
}, () => [Bc.value ? (O(), g(re, {
|
|
3224
3237
|
key: 0,
|
|
3225
3238
|
text: V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original),
|
|
3226
|
-
query:
|
|
3239
|
+
query: Bc.value
|
|
3227
3240
|
}, null, 8, ["text", "query"])) : (O(), v(m, { key: 1 }, [b(M(V(B.value.get(t.column.id), Q(n.row, t.column.id), n.row.original)), 1)], 64))])]),
|
|
3228
3241
|
_: 2
|
|
3229
3242
|
}, 1040))]),
|
|
@@ -3233,12 +3246,12 @@ var Rn = In({
|
|
|
3233
3246
|
key: 0,
|
|
3234
3247
|
class: E(J.value.td({ class: Di("actions", !1) })),
|
|
3235
3248
|
style: D(Oi("actions"))
|
|
3236
|
-
}, [y("div", { class: E(J.value.editActions()) }, [a.editMode === "row" && pi.value ? (O(), v(m, { key: 0 }, [
|
|
3249
|
+
}, [y("div", { class: E(J.value.editActions()) }, [a.editMode === "row" && pi.value ? (O(), v(m, { key: 0 }, [Eo.value === n.row.id ? (O(), v(m, { key: 0 }, [x(f, {
|
|
3237
3250
|
icon: N(we),
|
|
3238
3251
|
label: N(L).saveRow(G(n.row.original, n.row.index)),
|
|
3239
3252
|
variant: "text",
|
|
3240
3253
|
size: "sm",
|
|
3241
|
-
onClick: (e) =>
|
|
3254
|
+
onClick: (e) => Yo(n.row, !0)
|
|
3242
3255
|
}, null, 8, [
|
|
3243
3256
|
"icon",
|
|
3244
3257
|
"label",
|
|
@@ -3248,7 +3261,7 @@ var Rn = In({
|
|
|
3248
3261
|
label: N(L).cancelEdit(G(n.row.original, n.row.index)),
|
|
3249
3262
|
variant: "text",
|
|
3250
3263
|
size: "sm",
|
|
3251
|
-
onClick: (e) =>
|
|
3264
|
+
onClick: (e) => Yo(n.row, !1)
|
|
3252
3265
|
}, null, 8, [
|
|
3253
3266
|
"icon",
|
|
3254
3267
|
"label",
|
|
@@ -3260,16 +3273,16 @@ var Rn = In({
|
|
|
3260
3273
|
label: N(L).editRow(G(n.row.original, n.row.index)),
|
|
3261
3274
|
variant: "text",
|
|
3262
3275
|
size: "sm",
|
|
3263
|
-
onClick: (e) =>
|
|
3276
|
+
onClick: (e) => Jo(n.row)
|
|
3264
3277
|
}, null, 8, [
|
|
3265
3278
|
"data-row-edit",
|
|
3266
3279
|
"icon",
|
|
3267
3280
|
"label",
|
|
3268
3281
|
"onClick"
|
|
3269
|
-
]))], 64)) : _("", !0), a.rowActions &&
|
|
3282
|
+
]))], 64)) : _("", !0), a.rowActions && Eo.value !== n.row.id ? (O(), g(u, {
|
|
3270
3283
|
key: 1,
|
|
3271
|
-
items:
|
|
3272
|
-
onSelect: (e) =>
|
|
3284
|
+
items: za(n.row),
|
|
3285
|
+
onSelect: (e) => Ha(n.row, e)
|
|
3273
3286
|
}, {
|
|
3274
3287
|
default: P(() => [x(f, {
|
|
3275
3288
|
icon: N(Me),
|
|
@@ -3280,14 +3293,14 @@ var Rn = In({
|
|
|
3280
3293
|
_: 2
|
|
3281
3294
|
}, 1032, ["items", "onSelect"])) : _("", !0)], 2)], 6)) : _("", !0)
|
|
3282
3295
|
], 42, mr))], 64))), 128)),
|
|
3283
|
-
|
|
3296
|
+
vc.value > 0 ? (O(), v("tr", {
|
|
3284
3297
|
key: 3,
|
|
3285
3298
|
class: E(J.value.spacer()),
|
|
3286
3299
|
"aria-hidden": "true"
|
|
3287
3300
|
}, [y("td", {
|
|
3288
3301
|
colspan: vi.value,
|
|
3289
3302
|
class: E(J.value.spacerCell()),
|
|
3290
|
-
style: D({ height: `${
|
|
3303
|
+
style: D({ height: `${vc.value}px` })
|
|
3291
3304
|
}, null, 14, Sr)], 2)) : _("", !0)
|
|
3292
3305
|
], 32)]),
|
|
3293
3306
|
_: 3
|
|
@@ -3305,11 +3318,11 @@ var Rn = In({
|
|
|
3305
3318
|
class: E(J.value.footCell({ class: Di(e, !1) })),
|
|
3306
3319
|
style: D(Oi(e))
|
|
3307
3320
|
}, null, 6))), 128)),
|
|
3308
|
-
(O(!0), v(m, null, A(Y.value, (
|
|
3309
|
-
key:
|
|
3310
|
-
class: E(di(
|
|
3311
|
-
style: D(Ti(
|
|
3312
|
-
}, M(La(B.value.get(
|
|
3321
|
+
(O(!0), v(m, null, A(Y.value, (t) => (O(), v("td", {
|
|
3322
|
+
key: t.id,
|
|
3323
|
+
class: E(di(t.id).footCell({ class: [wi(t.id, !1), fi(t.id)] })),
|
|
3324
|
+
style: D(Ti(t.id, !1))
|
|
3325
|
+
}, [e.$slots[`footer-${t.id}`] ? j(e.$slots, `footer-${t.id}`, w({ ref_for: !0 }, Ra(B.value.get(t.id))), void 0, void 0, 0) : (O(), v(m, { key: 1 }, [b(M(La(B.value.get(t.id))), 1)], 64))], 6))), 128)),
|
|
3313
3326
|
_i.value.length ? (O(), v("td", {
|
|
3314
3327
|
key: 0,
|
|
3315
3328
|
class: E(J.value.footCell({ class: Di("actions", !1) })),
|
|
@@ -3321,35 +3334,35 @@ var Rn = In({
|
|
|
3321
3334
|
key: 5,
|
|
3322
3335
|
class: E(J.value.statusBar())
|
|
3323
3336
|
}, [
|
|
3324
|
-
y("span", null, M(N(L).rowCount(
|
|
3337
|
+
y("span", null, M(N(L).rowCount(Kc.value)), 1),
|
|
3325
3338
|
na.value ? (O(), v("span", Cr, M(N(L).filteredCount(N(K).getFilteredRowModel().rows.length)), 1)) : _("", !0),
|
|
3326
|
-
a.selectable ? (O(), v("span", wr, M(N(l).common.selectedCount(
|
|
3327
|
-
(O(!0), v(m, null, A(
|
|
3339
|
+
a.selectable ? (O(), v("span", wr, M(N(l).common.selectedCount(lc.value)), 1)) : _("", !0),
|
|
3340
|
+
(O(!0), v(m, null, A(Gc.value, (e) => (O(), v("span", { key: e.id }, M(e.text), 1))), 128))
|
|
3328
3341
|
], 2)) : _("", !0),
|
|
3329
|
-
|
|
3342
|
+
Fc.value && a.paginatorPosition === "bottom" ? (O(), v("div", {
|
|
3330
3343
|
key: 6,
|
|
3331
3344
|
class: E(J.value.footer())
|
|
3332
|
-
}, [
|
|
3345
|
+
}, [Lc.value.length ? (O(), v("div", {
|
|
3333
3346
|
key: 0,
|
|
3334
3347
|
class: E(J.value.pageSize())
|
|
3335
3348
|
}, [y("span", Tr, M(N(L).rowsPerPage), 1), x(ne, {
|
|
3336
3349
|
class: E(J.value.pageSizeSelect()),
|
|
3337
3350
|
"aria-label": N(L).rowsPerPage,
|
|
3338
|
-
items:
|
|
3351
|
+
items: Lc.value,
|
|
3339
3352
|
"model-value": String(H.value.pageSize),
|
|
3340
|
-
"onUpdate:modelValue": t[
|
|
3353
|
+
"onUpdate:modelValue": t[17] ||= (e) => N(K).setPageSize(Number(e))
|
|
3341
3354
|
}, null, 8, [
|
|
3342
3355
|
"class",
|
|
3343
3356
|
"aria-label",
|
|
3344
3357
|
"items",
|
|
3345
3358
|
"model-value"
|
|
3346
3359
|
])], 2)) : _("", !0), x(r, {
|
|
3347
|
-
count:
|
|
3360
|
+
count: Ic.value,
|
|
3348
3361
|
"page-size": H.value.pageSize,
|
|
3349
3362
|
page: H.value.pageIndex + 1,
|
|
3350
3363
|
translations: { rootLabel: `${a.caption}: ${N(l).pagination.rootLabel}` },
|
|
3351
3364
|
"with-edges": a.paginatorEdges,
|
|
3352
|
-
"onUpdate:page": t[
|
|
3365
|
+
"onUpdate:page": t[18] ||= (e) => N(K).setPageIndex(e - 1)
|
|
3353
3366
|
}, null, 8, [
|
|
3354
3367
|
"count",
|
|
3355
3368
|
"page-size",
|