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