lkt-table 1.3.16 → 1.3.17
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/build.js +69 -69
- package/package.json +1 -1
- package/src/lib-components/LktTable.vue +1 -1
package/dist/build.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { reactive as W, defineComponent as le, ref as h, watch as M, computed as c, resolveComponent as G, unref as f, openBlock as n, createBlock as C, withCtx as H, createTextVNode as ie, toDisplayString as ee, createElementBlock as d, mergeProps as Qe, Fragment as $, withModifiers as _e, resolveDynamicComponent as te, createCommentVNode as p, useSlots as xe, normalizeClass as K, createElementVNode as F, createVNode as ue, renderSlot as N, renderList as q, withDirectives as
|
|
1
|
+
import { reactive as W, defineComponent as le, ref as h, watch as M, computed as c, resolveComponent as G, unref as f, openBlock as n, createBlock as C, withCtx as H, createTextVNode as ie, toDisplayString as ee, createElementBlock as d, mergeProps as Qe, Fragment as $, withModifiers as _e, resolveDynamicComponent as te, createCommentVNode as p, useSlots as xe, normalizeClass as K, createElementVNode as F, createVNode as ue, renderSlot as N, renderList as q, withDirectives as fe, vShow as pe, onMounted as Nt, nextTick as Re, createSlots as Xe, normalizeProps as oe } from "vue";
|
|
2
2
|
import { Field as Ye } from "lkt-field";
|
|
3
|
-
import { __ as
|
|
3
|
+
import { __ as ye } from "lkt-i18n";
|
|
4
4
|
import { replaceAll as et, generateRandomString as Lt } from "lkt-string-tools";
|
|
5
5
|
import { DataState as Mt } from "lkt-data-state";
|
|
6
6
|
import Ft from "sortablejs";
|
|
@@ -41,7 +41,7 @@ const Fl = (t) => W(new A(t)), Al = (t, r, s, a = !0) => W(new A({ key: t, label
|
|
|
41
41
|
}
|
|
42
42
|
if (t.formatter && typeof t.formatter == "function") {
|
|
43
43
|
let u = t.formatter(r[t.key], r, t, s);
|
|
44
|
-
return u.startsWith("__:") ?
|
|
44
|
+
return u.startsWith("__:") ? ye(u.substring(3)) : u;
|
|
45
45
|
}
|
|
46
46
|
return r[t.key];
|
|
47
47
|
}, At = (t, r, s) => {
|
|
@@ -136,10 +136,10 @@ const Fl = (t) => W(new A(t)), Al = (t, r, s, a = !0) => W(new A({ key: t, label
|
|
|
136
136
|
], 64));
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
}),
|
|
139
|
+
}), X = class X {
|
|
140
140
|
};
|
|
141
|
-
|
|
142
|
-
let V =
|
|
141
|
+
X.navButtonSlot = "", X.dropButtonSlot = "", X.editButtonSlot = "", X.createButtonSlot = "", X.defaultEmptySlot = void 0, X.defaultSaveIcon = "", X.defaultNoResultsMessage = "No results";
|
|
142
|
+
let V = X;
|
|
143
143
|
const qt = /* @__PURE__ */ le({
|
|
144
144
|
__name: "DropButton",
|
|
145
145
|
props: {
|
|
@@ -261,16 +261,16 @@ const jt = ["data-i", "data-draggable"], zt = {
|
|
|
261
261
|
return u.sortable && u.isDraggable && i.push("handle"), i.join(" ");
|
|
262
262
|
}), L = c(() => V.navButtonSlot !== ""), w = c(() => V.navButtonSlot), D = () => {
|
|
263
263
|
a("item-up", u.i);
|
|
264
|
-
},
|
|
264
|
+
}, ke = () => {
|
|
265
265
|
a("item-down", u.i);
|
|
266
266
|
}, U = () => {
|
|
267
267
|
a("item-drop", u.i);
|
|
268
|
-
},
|
|
268
|
+
}, be = () => {
|
|
269
269
|
};
|
|
270
270
|
return M(() => u.modelValue, (i) => l.value = i), M(l, (i) => {
|
|
271
271
|
a("update:modelValue", i);
|
|
272
272
|
}, { deep: !0 }), (i, I) => {
|
|
273
|
-
const
|
|
273
|
+
const Y = G("lkt-button");
|
|
274
274
|
return n(), d("tr", {
|
|
275
275
|
"data-i": i.i,
|
|
276
276
|
"data-draggable": i.isDraggable,
|
|
@@ -283,7 +283,7 @@ const jt = ["data-i", "data-draggable"], zt = {
|
|
|
283
283
|
}, null, 2)) : i.sortable && i.editModeEnabled ? (n(), d("td", zt)) : p("", !0),
|
|
284
284
|
i.addNavigation && i.editModeEnabled ? (n(), d("td", Gt, [
|
|
285
285
|
F("div", Jt, [
|
|
286
|
-
ue(
|
|
286
|
+
ue(Y, {
|
|
287
287
|
palette: "table-nav",
|
|
288
288
|
disabled: i.i === 0,
|
|
289
289
|
onClick: D
|
|
@@ -299,10 +299,10 @@ const jt = ["data-i", "data-draggable"], zt = {
|
|
|
299
299
|
]),
|
|
300
300
|
_: 1
|
|
301
301
|
}, 8, ["disabled"]),
|
|
302
|
-
ue(
|
|
302
|
+
ue(Y, {
|
|
303
303
|
palette: "table-nav",
|
|
304
304
|
disabled: i.latestRow,
|
|
305
|
-
onClick:
|
|
305
|
+
onClick: ke
|
|
306
306
|
}, {
|
|
307
307
|
default: H(() => [
|
|
308
308
|
L.value ? (n(), C(te(w.value), {
|
|
@@ -382,7 +382,7 @@ const jt = ["data-i", "data-draggable"], zt = {
|
|
|
382
382
|
text: i.editText,
|
|
383
383
|
icon: i.editIcon,
|
|
384
384
|
link: B.value,
|
|
385
|
-
onClick:
|
|
385
|
+
onClick: be
|
|
386
386
|
}, null, 8, ["resource-data", "text", "icon", "link"])
|
|
387
387
|
])) : p("", !0)
|
|
388
388
|
], 10, jt);
|
|
@@ -404,7 +404,7 @@ const jt = ["data-i", "data-draggable"], zt = {
|
|
|
404
404
|
emits: ["update:modelValue", "click"],
|
|
405
405
|
setup(t, { emit: r }) {
|
|
406
406
|
const s = r, a = t, u = h(a.modelValue), l = (v) => s("click", v);
|
|
407
|
-
return M(() => a.modelValue, (v) => u.value = v), M(u, () => s("update:modelValue", u.value)), (v, S) =>
|
|
407
|
+
return M(() => a.modelValue, (v) => u.value = v), M(u, () => s("update:modelValue", u.value)), (v, S) => fe((n(), d("tr", xt, [
|
|
408
408
|
F("td", { colspan: v.hiddenColumnsColSpan }, [
|
|
409
409
|
F("table", null, [
|
|
410
410
|
F("tr", null, [
|
|
@@ -439,7 +439,7 @@ const jt = ["data-i", "data-draggable"], zt = {
|
|
|
439
439
|
])
|
|
440
440
|
], 8, el)
|
|
441
441
|
], 512)), [
|
|
442
|
-
[
|
|
442
|
+
[pe, v.hiddenIsVisible]
|
|
443
443
|
]);
|
|
444
444
|
}
|
|
445
445
|
}), Oe = /* @__PURE__ */ le({
|
|
@@ -481,7 +481,7 @@ const jt = ["data-i", "data-draggable"], zt = {
|
|
|
481
481
|
},
|
|
482
482
|
emits: ["click"],
|
|
483
483
|
setup(t, { emit: r }) {
|
|
484
|
-
const s = r, a = t, u = c(() => At(a.column, a.amountOfColumns, a.items)), l = c(() => a.column.sortable === !0), v = c(() => l.value && a.sortBy === a.column.key ? a.sortDirection : ""), S = c(() => a.column.label.startsWith("__:") ?
|
|
484
|
+
const s = r, a = t, u = c(() => At(a.column, a.amountOfColumns, a.items)), l = c(() => a.column.sortable === !0), v = c(() => l.value && a.sortBy === a.column.key ? a.sortDirection : ""), S = c(() => a.column.label.startsWith("__:") ? ye(a.column.label.substring(3)) : a.column.label), b = () => s("click", a.column);
|
|
485
485
|
return (B, o) => (n(), d("th", {
|
|
486
486
|
"data-column": B.column.key,
|
|
487
487
|
"data-sortable": l.value,
|
|
@@ -495,7 +495,7 @@ const jt = ["data-i", "data-draggable"], zt = {
|
|
|
495
495
|
], 10, nl));
|
|
496
496
|
}
|
|
497
497
|
});
|
|
498
|
-
var
|
|
498
|
+
var Q = /* @__PURE__ */ ((t) => (t.Table = "table", t.Item = "item", t.Ul = "ul", t.Ol = "ol", t))(Q || {}), _ = /* @__PURE__ */ ((t) => (t.Create = "create", t.Update = "update", t.Edit = "edit", t.Drop = "drop", t.Sort = "sort", t.InlineEdit = "inline-edit", t.InlineCreate = "inline-create", t.InlineCreateEver = "inline-create-ever", t))(_ || {}), ve = /* @__PURE__ */ ((t) => (t.Asc = "asc", t.Desc = "desc", t))(ve || {});
|
|
499
499
|
const rl = ["id"], il = {
|
|
500
500
|
key: 0,
|
|
501
501
|
class: "lkt-table-page-buttons"
|
|
@@ -524,7 +524,7 @@ const rl = ["id"], il = {
|
|
|
524
524
|
__name: "LktTable",
|
|
525
525
|
props: {
|
|
526
526
|
modelValue: { default: () => [] },
|
|
527
|
-
type: { default:
|
|
527
|
+
type: { default: Q.Table },
|
|
528
528
|
columns: { default: () => [] },
|
|
529
529
|
sorter: { type: Function, default: Ze },
|
|
530
530
|
draggableChecker: { type: Function, default: (t) => !0 },
|
|
@@ -594,27 +594,27 @@ const rl = ["id"], il = {
|
|
|
594
594
|
"drag-end"
|
|
595
595
|
],
|
|
596
596
|
setup(t, { expose: r, emit: s }) {
|
|
597
|
-
const a = s, u = xe(), l = t, v = {}, S = h(typeof l.sorter == "function" ? l.sorter : Ze), b = h(Ht(l.columns)), B = h(
|
|
597
|
+
const a = s, u = xe(), l = t, v = {}, S = h(typeof l.sorter == "function" ? l.sorter : Ze), b = h(Ht(l.columns)), B = h(ve.Asc), o = h(l.modelValue), R = h(v), j = h(null), L = h(l.columns), w = h(l.page), D = h(l.loading), ke = h(!1), U = h(l.perms), be = h(null), i = h(null), I = h({}), Y = h(new Mt({ items: o.value }, l.dataStateConfig)), k = h(l.editMode), J = h(0), Ve = h(null), ne = h(!1);
|
|
598
598
|
M(D, (e) => a("update:loading", e)), M(w, (e) => a("page", e));
|
|
599
|
-
const
|
|
600
|
-
l.itemMode &&
|
|
599
|
+
const se = h(l.type);
|
|
600
|
+
l.itemMode && se.value === Q.Table && (se.value = Q.Item);
|
|
601
601
|
const at = (e) => {
|
|
602
602
|
U.value = e;
|
|
603
603
|
}, ot = (e) => {
|
|
604
|
-
Array.isArray(e.data) && (o.value = e.data), D.value = !1,
|
|
604
|
+
Array.isArray(e.data) && (o.value = e.data), D.value = !1, ke.value = !0, Y.value.store({ items: o.value }).turnStoredIntoOriginal(), ne.value = !1, Re(() => {
|
|
605
605
|
a("read-response", e);
|
|
606
606
|
});
|
|
607
607
|
}, nt = () => Re(() => D.value = !0), ut = () => {
|
|
608
|
-
|
|
609
|
-
},
|
|
608
|
+
be.value.doRefresh();
|
|
609
|
+
}, de = Lt(12), we = c(() => {
|
|
610
610
|
if (!l.hideEmptyColumns) return [];
|
|
611
611
|
let e = [];
|
|
612
612
|
return L.value.forEach((m) => {
|
|
613
613
|
let E = m.key, z = !1;
|
|
614
|
-
o.value.forEach((
|
|
615
|
-
if (typeof
|
|
616
|
-
return
|
|
617
|
-
|
|
614
|
+
o.value.forEach((Z) => {
|
|
615
|
+
if (typeof Z.checkEmpty == "function")
|
|
616
|
+
return Z.checkEmpty(Z);
|
|
617
|
+
Z[E] && (z = !0);
|
|
618
618
|
}), z || e.push(E);
|
|
619
619
|
}), e;
|
|
620
620
|
}), he = c(() => L.value.filter((e) => !e.hidden)), De = c(() => L.value.filter((e) => e.hidden)), rt = c(() => {
|
|
@@ -627,7 +627,7 @@ const rl = ["id"], il = {
|
|
|
627
627
|
}), Fe = c(() => l.hiddenSave || D.value || !l.saveResource ? !1 : k.value && ne.value ? !0 : k.value), dt = c(() => Se.value && o.value.length >= l.requiredItemsForTopCreate || l.switchEditionEnabled ? !0 : Fe.value || k.value && ge.value), ct = c(() => l.saveDisabled || typeof l.saveValidator == "function" && !l.saveValidator(o.value) ? !1 : ne.value), mt = c(() => o.value.length), ft = c(() => ({
|
|
628
628
|
items: o.value,
|
|
629
629
|
...l.saveResourceData
|
|
630
|
-
})), pt = c(() => l.titleTag === "" ? "h2" : l.titleTag), vt = c(() => l.wrapContentTag === "" ? "div" : l.wrapContentTag), Ee = c(() => l.title.startsWith("__:") ?
|
|
630
|
+
})), pt = c(() => l.titleTag === "" ? "h2" : l.titleTag), vt = c(() => l.wrapContentTag === "" ? "div" : l.wrapContentTag), Ee = c(() => l.title.startsWith("__:") ? ye(l.title.substring(3)) : l.title), yt = c(() => l.saveText.startsWith("__:") ? ye(l.saveText.substring(3)) : l.saveText), kt = c(() => l.editModeText.startsWith("__:") ? ye(l.editModeText.substring(3)) : l.editModeText), ge = c(() => U.value.includes(_.Create)), $e = c(() => U.value.includes("read")), ce = c(() => U.value.includes(_.Update)), Ae = c(() => U.value.includes(_.Edit)), bt = c(() => U.value.includes(_.InlineEdit)), ht = c(() => U.value.includes(_.InlineCreate)), Ue = c(() => U.value.includes(_.InlineCreateEver)), me = c(() => U.value.includes(_.Drop)), gt = (e) => {
|
|
631
631
|
let m = e.target;
|
|
632
632
|
if (typeof m.dataset.column > "u")
|
|
633
633
|
do
|
|
@@ -639,7 +639,7 @@ const rl = ["id"], il = {
|
|
|
639
639
|
var m;
|
|
640
640
|
return (m = j.value) == null ? void 0 : m.querySelector(`[data-i="${e}"]`);
|
|
641
641
|
}, Pe = (e) => R.value["tr_" + e] === !0, He = (e) => {
|
|
642
|
-
e && e.sortable && (o.value = o.value.sort((m, E) => S.value(m, E, e, B.value)), B.value = B.value ===
|
|
642
|
+
e && e.sortable && (o.value = o.value.sort((m, E) => S.value(m, E, e, B.value)), B.value = B.value === ve.Asc ? ve.Desc : ve.Asc, b.value = e.key, a("sort", [b.value, B.value]));
|
|
643
643
|
}, We = (e) => {
|
|
644
644
|
a("click", e);
|
|
645
645
|
}, qe = (e, m) => {
|
|
@@ -651,7 +651,7 @@ const rl = ["id"], il = {
|
|
|
651
651
|
else {
|
|
652
652
|
if (typeof l.newValueGenerator == "function") {
|
|
653
653
|
let e = l.newValueGenerator();
|
|
654
|
-
if (typeof e == "object") {
|
|
654
|
+
if (typeof e == "object" || se.value !== Q.Table) {
|
|
655
655
|
o.value.push(e);
|
|
656
656
|
return;
|
|
657
657
|
}
|
|
@@ -667,7 +667,7 @@ const rl = ["id"], il = {
|
|
|
667
667
|
a("error", m.httpStatus);
|
|
668
668
|
return;
|
|
669
669
|
}
|
|
670
|
-
|
|
670
|
+
Y.value.turnStoredIntoOriginal(), ne.value = !1, a("save", m);
|
|
671
671
|
}, ze = (e, m, E) => {
|
|
672
672
|
if (E >= e.length) {
|
|
673
673
|
let z = E - e.length + 1;
|
|
@@ -683,7 +683,7 @@ const rl = ["id"], il = {
|
|
|
683
683
|
}, $t = () => {
|
|
684
684
|
I.value && (I.value.destroy(), I.value = {});
|
|
685
685
|
}, Ge = () => {
|
|
686
|
-
Ve.value || (Ve.value = document.getElementById("lkt-table-body-" +
|
|
686
|
+
Ve.value || (Ve.value = document.getElementById("lkt-table-body-" + de)), I.value = new Ft(Ve.value, {
|
|
687
687
|
direction: "vertical",
|
|
688
688
|
handle: ".handle",
|
|
689
689
|
animation: 150,
|
|
@@ -696,20 +696,20 @@ const rl = ["id"], il = {
|
|
|
696
696
|
}
|
|
697
697
|
});
|
|
698
698
|
}, Te = (e, m, E = !1) => {
|
|
699
|
-
let z = [J.value,
|
|
700
|
-
return E && z.push("hidden"), it.value.forEach((
|
|
701
|
-
let
|
|
702
|
-
|
|
699
|
+
let z = [J.value, de, "row", m];
|
|
700
|
+
return E && z.push("hidden"), it.value.forEach((Z) => {
|
|
701
|
+
let O = String(e[Z.key]).toLowerCase();
|
|
702
|
+
O.length > 50 && (O = O.substring(0, 50)), O = et(O, " ", "-"), z.push(O);
|
|
703
703
|
}), z.join("-");
|
|
704
704
|
}, Je = c(() => typeof l.createEnabledValidator == "function" ? l.createEnabledValidator({ items: o.value }) : !0), Se = c(() => Ue.value || ht.value && k.value), Ie = (e, m) => typeof l.itemDisplayChecker == "function" ? l.itemDisplayChecker(e) : !0;
|
|
705
705
|
Nt(() => {
|
|
706
|
-
l.initialSorting && He(Wt(l.columns, b.value)),
|
|
706
|
+
l.initialSorting && He(Wt(l.columns, b.value)), Y.value.store({ items: o.value }).turnStoredIntoOriginal(), ne.value = !1, l.sortable && Re(() => {
|
|
707
707
|
Ge();
|
|
708
708
|
});
|
|
709
709
|
}), M(() => l.sortable, (e) => {
|
|
710
710
|
e ? Ge() : $t();
|
|
711
711
|
}), M(() => l.perms, (e) => U.value = e), M(U, (e) => a("update:perms", e)), M(() => l.editMode, (e) => k.value = e), M(() => l.columns, (e) => L.value = e, { deep: !0 }), M(() => l.modelValue, (e) => o.value = e, { deep: !0 }), M(o, (e) => {
|
|
712
|
-
|
|
712
|
+
Y.value.increment({ items: e }), ne.value = Y.value.changed(), a("update:modelValue", e);
|
|
713
713
|
}, { deep: !0 }), r({
|
|
714
714
|
getItemByEvent: gt,
|
|
715
715
|
getItemByIndex: Ct,
|
|
@@ -719,12 +719,12 @@ const rl = ["id"], il = {
|
|
|
719
719
|
});
|
|
720
720
|
const Tt = c(() => typeof V.defaultEmptySlot < "u"), Rt = c(() => V.defaultEmptySlot);
|
|
721
721
|
return (e, m) => {
|
|
722
|
-
const E = G("lkt-button"), z = G("lkt-field"),
|
|
722
|
+
const E = G("lkt-button"), z = G("lkt-field"), Z = G("lkt-loader"), O = G("lkt-paginator");
|
|
723
723
|
return n(), d("section", {
|
|
724
724
|
ref_key: "element",
|
|
725
725
|
ref: i,
|
|
726
726
|
class: "lkt-table-page",
|
|
727
|
-
id: "lkt-table-page-" + f(
|
|
727
|
+
id: "lkt-table-page-" + f(de)
|
|
728
728
|
}, [
|
|
729
729
|
Ee.value || f(u).title ? (n(), d("header", {
|
|
730
730
|
key: 0,
|
|
@@ -747,7 +747,7 @@ const rl = ["id"], il = {
|
|
|
747
747
|
}, {
|
|
748
748
|
default: H(() => [
|
|
749
749
|
dt.value ? (n(), d("div", il, [
|
|
750
|
-
|
|
750
|
+
fe(ue(E, {
|
|
751
751
|
class: "lkt-table--save-button",
|
|
752
752
|
ref: "saveButton",
|
|
753
753
|
icon: f(V).defaultSaveIcon,
|
|
@@ -770,7 +770,7 @@ const rl = ["id"], il = {
|
|
|
770
770
|
]),
|
|
771
771
|
_: 3
|
|
772
772
|
}, 8, ["icon", "disabled", "confirm-modal", "confirm-data", "resource", "resource-data"]), [
|
|
773
|
-
[
|
|
773
|
+
[pe, Fe.value]
|
|
774
774
|
]),
|
|
775
775
|
Se.value && o.value.length >= e.requiredItemsForTopCreate ? (n(), C(Oe, {
|
|
776
776
|
key: 0,
|
|
@@ -781,31 +781,31 @@ const rl = ["id"], il = {
|
|
|
781
781
|
onClick: je
|
|
782
782
|
}, null, 8, ["disabled", "text", "icon", "to"])) : p("", !0),
|
|
783
783
|
F("div", dl, [
|
|
784
|
-
|
|
784
|
+
fe(ue(z, {
|
|
785
785
|
type: "switch",
|
|
786
786
|
modelValue: k.value,
|
|
787
787
|
"onUpdate:modelValue": m[0] || (m[0] = (g) => k.value = g),
|
|
788
788
|
label: kt.value
|
|
789
789
|
}, null, 8, ["modelValue", "label"]), [
|
|
790
|
-
[
|
|
790
|
+
[pe, e.switchEditionEnabled]
|
|
791
791
|
])
|
|
792
792
|
])
|
|
793
793
|
])) : p("", !0),
|
|
794
794
|
f(u).buttons ? (n(), d("div", cl, [
|
|
795
795
|
N(e.$slots, "buttons")
|
|
796
796
|
])) : p("", !0),
|
|
797
|
-
|
|
797
|
+
ke.value && f(u).filters ? (n(), d("div", ml, [
|
|
798
798
|
N(e.$slots, "filters", {
|
|
799
799
|
items: o.value,
|
|
800
800
|
isLoading: D.value
|
|
801
801
|
})
|
|
802
802
|
])) : p("", !0),
|
|
803
|
-
D.value ? (n(), C(
|
|
804
|
-
|
|
803
|
+
D.value ? (n(), C(Z, { key: 3 })) : p("", !0),
|
|
804
|
+
fe(F("div", {
|
|
805
805
|
class: "lkt-table",
|
|
806
806
|
"data-sortable": e.sortable
|
|
807
807
|
}, [
|
|
808
|
-
|
|
808
|
+
se.value === f(Q).Table ? (n(), d("table", pl, [
|
|
809
809
|
F("thead", null, [
|
|
810
810
|
F("tr", null, [
|
|
811
811
|
e.sortable && k.value ? (n(), d("th", vl)) : p("", !0),
|
|
@@ -822,16 +822,16 @@ const rl = ["id"], il = {
|
|
|
822
822
|
onClick: (y) => He(g)
|
|
823
823
|
}, null, 8, ["column", "sort-by", "sort-direction", "amount-of-columns", "items", "onClick"])) : p("", !0)
|
|
824
824
|
], 64))), 256)),
|
|
825
|
-
|
|
826
|
-
Ae.value &&
|
|
825
|
+
me.value && k.value ? (n(), d("th", bl)) : p("", !0),
|
|
826
|
+
Ae.value && ce.value && k.value ? (n(), d("th", hl)) : p("", !0)
|
|
827
827
|
])
|
|
828
828
|
]),
|
|
829
829
|
F("tbody", {
|
|
830
830
|
ref_key: "tableBody",
|
|
831
831
|
ref: j,
|
|
832
|
-
id: "lkt-table-body-" + f(
|
|
832
|
+
id: "lkt-table-body-" + f(de)
|
|
833
833
|
}, [
|
|
834
|
-
(n(!0), d($, null, q(o.value, (g, y) =>
|
|
834
|
+
(n(!0), d($, null, q(o.value, (g, y) => fe((n(), C(_t, {
|
|
835
835
|
modelValue: o.value[y],
|
|
836
836
|
"onUpdate:modelValue": (P) => o.value[y] = P,
|
|
837
837
|
key: Te(g, y),
|
|
@@ -844,12 +844,12 @@ const rl = ["id"], il = {
|
|
|
844
844
|
"add-navigation": e.addNavigation,
|
|
845
845
|
"hidden-is-visible": Pe(y),
|
|
846
846
|
"latest-row": y + 1 === mt.value,
|
|
847
|
-
"can-drop":
|
|
847
|
+
"can-drop": me.value && k.value,
|
|
848
848
|
"drop-confirm": e.dropConfirm,
|
|
849
849
|
"drop-resource": e.dropResource,
|
|
850
850
|
"drop-text": e.dropText,
|
|
851
851
|
"drop-icon": e.dropIcon,
|
|
852
|
-
"can-edit": Ae.value &&
|
|
852
|
+
"can-edit": Ae.value && ce.value && k.value,
|
|
853
853
|
"edit-text": e.editText,
|
|
854
854
|
"edit-icon": e.editIcon,
|
|
855
855
|
"edit-link": e.editLink,
|
|
@@ -892,7 +892,7 @@ const rl = ["id"], il = {
|
|
|
892
892
|
])
|
|
893
893
|
}))
|
|
894
894
|
]), 1032, ["modelValue", "onUpdate:modelValue", "i", "display-hidden-columns-indicator", "is-draggable", "sortable", "visible-columns", "empty-columns", "add-navigation", "hidden-is-visible", "latest-row", "can-drop", "drop-confirm", "drop-resource", "drop-text", "drop-icon", "can-edit", "edit-text", "edit-icon", "edit-link", "edit-mode-enabled", "has-inline-edit-perm", "row-display-type"])), [
|
|
895
|
-
[
|
|
895
|
+
[pe, Ie(o.value[y])]
|
|
896
896
|
])), 128)),
|
|
897
897
|
De.value.length > 0 ? (n(!0), d($, { key: 0 }, q(o.value, (g, y) => (n(), C(ol, {
|
|
898
898
|
modelValue: o.value[y],
|
|
@@ -921,11 +921,11 @@ const rl = ["id"], il = {
|
|
|
921
921
|
}))
|
|
922
922
|
]), 1032, ["modelValue", "onUpdate:modelValue", "i", "hidden-columns", "hidden-columns-col-span", "is-draggable", "sortable", "visible-columns", "empty-columns", "hidden-is-visible"]))), 128)) : p("", !0)
|
|
923
923
|
], 8, gl)
|
|
924
|
-
])) :
|
|
924
|
+
])) : se.value === f(Q).Item ? (n(), d("div", {
|
|
925
925
|
key: 1,
|
|
926
926
|
ref_key: "tableBody",
|
|
927
927
|
ref: j,
|
|
928
|
-
id: "lkt-table-body-" + f(
|
|
928
|
+
id: "lkt-table-body-" + f(de),
|
|
929
929
|
class: K(["lkt-table-items-container", e.itemsContainerClass])
|
|
930
930
|
}, [
|
|
931
931
|
(n(!0), d($, null, q(o.value, (g, y) => (n(), d($, null, [
|
|
@@ -940,14 +940,14 @@ const rl = ["id"], il = {
|
|
|
940
940
|
editing: k.value,
|
|
941
941
|
canCreate: ge.value,
|
|
942
942
|
canRead: $e.value,
|
|
943
|
-
canUpdate:
|
|
944
|
-
canDrop:
|
|
943
|
+
canUpdate: ce.value,
|
|
944
|
+
canDrop: me.value,
|
|
945
945
|
isLoading: D.value,
|
|
946
946
|
doDrop: () => Ce(y)
|
|
947
947
|
}))
|
|
948
948
|
], 8, Sl)) : p("", !0)
|
|
949
949
|
], 64))), 256))
|
|
950
|
-
], 10, Cl)) : f(
|
|
950
|
+
], 10, Cl)) : f(Q).Ul ? (n(), d("ul", {
|
|
951
951
|
key: 2,
|
|
952
952
|
class: K(["lkt-table-items-container", e.itemsContainerClass])
|
|
953
953
|
}, [
|
|
@@ -963,14 +963,14 @@ const rl = ["id"], il = {
|
|
|
963
963
|
editing: k.value,
|
|
964
964
|
canCreate: ge.value,
|
|
965
965
|
canRead: $e.value,
|
|
966
|
-
canUpdate:
|
|
967
|
-
canDrop:
|
|
966
|
+
canUpdate: ce.value,
|
|
967
|
+
canDrop: me.value,
|
|
968
968
|
isLoading: D.value,
|
|
969
969
|
doDrop: () => Ce(y)
|
|
970
970
|
}))
|
|
971
971
|
], 8, Il)) : p("", !0)
|
|
972
972
|
], 64))), 256))
|
|
973
|
-
], 2)) : f(
|
|
973
|
+
], 2)) : f(Q).Ul ? (n(), d("ol", {
|
|
974
974
|
key: 3,
|
|
975
975
|
class: K(["lkt-table-items-container", e.itemsContainerClass])
|
|
976
976
|
}, [
|
|
@@ -986,8 +986,8 @@ const rl = ["id"], il = {
|
|
|
986
986
|
editing: k.value,
|
|
987
987
|
canCreate: ge.value,
|
|
988
988
|
canRead: $e.value,
|
|
989
|
-
canUpdate:
|
|
990
|
-
canDrop:
|
|
989
|
+
canUpdate: ce.value,
|
|
990
|
+
canDrop: me.value,
|
|
991
991
|
isLoading: D.value,
|
|
992
992
|
doDrop: () => Ce(y)
|
|
993
993
|
}))
|
|
@@ -995,7 +995,7 @@ const rl = ["id"], il = {
|
|
|
995
995
|
], 64))), 256))
|
|
996
996
|
], 2)) : p("", !0)
|
|
997
997
|
], 8, fl), [
|
|
998
|
-
[
|
|
998
|
+
[pe, !D.value && o.value.length > 0]
|
|
999
999
|
]),
|
|
1000
1000
|
!D.value && o.value.length === 0 ? (n(), d("div", Vl, [
|
|
1001
1001
|
f(u).empty ? N(e.$slots, "empty", { key: 0 }) : Tt.value ? (n(), C(te(Rt.value), {
|
|
@@ -1016,10 +1016,10 @@ const rl = ["id"], il = {
|
|
|
1016
1016
|
}, null, 8, ["disabled", "text", "icon", "to"])) : p("", !0),
|
|
1017
1017
|
N(e.$slots, "bottom-buttons")
|
|
1018
1018
|
])) : p("", !0),
|
|
1019
|
-
e.resource.length > 0 ? (n(), C(
|
|
1019
|
+
e.resource.length > 0 ? (n(), C(O, {
|
|
1020
1020
|
key: 6,
|
|
1021
1021
|
ref_key: "paginator",
|
|
1022
|
-
ref:
|
|
1022
|
+
ref: be,
|
|
1023
1023
|
modelValue: w.value,
|
|
1024
1024
|
"onUpdate:modelValue": m[1] || (m[1] = (g) => w.value = g),
|
|
1025
1025
|
resource: e.resource,
|
package/package.json
CHANGED
|
@@ -376,7 +376,7 @@ const getItemByEvent = (e: any) => {
|
|
|
376
376
|
if (typeof props.newValueGenerator === 'function') {
|
|
377
377
|
let newValue = props.newValueGenerator();
|
|
378
378
|
|
|
379
|
-
if (typeof newValue === 'object') {
|
|
379
|
+
if (typeof newValue === 'object' || Type.value !== TypeOfTable.Table) {
|
|
380
380
|
Items.value.push(newValue);
|
|
381
381
|
return;
|
|
382
382
|
}
|