lkt-table 1.3.0 → 1.3.2
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.d.ts +65 -51
- package/dist/build.js +471 -446
- package/package.json +3 -3
- package/src/components/LktTableCell.vue +34 -0
- package/src/lib-components/LktTable.vue +2 -1
package/dist/build.js
CHANGED
|
@@ -1,134 +1,158 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
import
|
|
1
|
+
import { reactive as L, defineComponent as Q, ref as g, watch as N, computed as d, resolveComponent as K, unref as B, openBlock as r, createBlock as C, withCtx as W, createTextVNode as le, toDisplayString as O, createElementBlock as c, mergeProps as bt, Fragment as I, withModifiers as He, resolveDynamicComponent as J, createCommentVNode as v, normalizeClass as x, createElementVNode as $, createVNode as ee, renderList as j, renderSlot as U, withDirectives as ne, vShow as ue, useSlots as ht, onMounted as gt, nextTick as Ue, createSlots as We, normalizeProps as he } from "vue";
|
|
2
|
+
import { Field as Ae } from "lkt-field";
|
|
3
3
|
import { __ as re } from "lkt-i18n";
|
|
4
|
-
import { replaceAll as
|
|
5
|
-
import { DataState as
|
|
6
|
-
import
|
|
4
|
+
import { replaceAll as je, generateRandomString as Ct } from "lkt-string-tools";
|
|
5
|
+
import { DataState as St } from "lkt-data-state";
|
|
6
|
+
import Bt from "sortablejs";
|
|
7
7
|
import { time as fe } from "lkt-date-tools";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
this.
|
|
14
|
-
for (let i in n)
|
|
15
|
-
this[i] = n[i];
|
|
16
|
-
this.field = new Pe(this.field);
|
|
8
|
+
class M {
|
|
9
|
+
constructor(u = {}) {
|
|
10
|
+
this.key = "", this.label = "", this.sortable = !0, this.hidden = !1, this.editable = !1, this.formatter = void 0, this.checkEmpty = void 0, this.colspan = void 0, this.preferSlot = !0, this.type = "", this.link = "", this.action = void 0, this.isForRowKey = !1, this.extractTitleFromColumn = "", this.slotData = {}, this.field = new Ae();
|
|
11
|
+
for (let i in u)
|
|
12
|
+
this[i] = u[i];
|
|
13
|
+
this.field = new Ae(this.field);
|
|
17
14
|
}
|
|
18
|
-
getHref(
|
|
19
|
-
return typeof this.link == "function" ? this.link(
|
|
15
|
+
getHref(u) {
|
|
16
|
+
return typeof this.link == "function" ? this.link(u) : this.link;
|
|
20
17
|
}
|
|
21
|
-
doAction(
|
|
18
|
+
doAction(u) {
|
|
22
19
|
if (typeof this.action == "function")
|
|
23
|
-
return this.action(
|
|
20
|
+
return this.action(u);
|
|
24
21
|
console.warn("No action defined");
|
|
25
22
|
}
|
|
26
23
|
}
|
|
27
|
-
var
|
|
28
|
-
const
|
|
24
|
+
var D = /* @__PURE__ */ ((t) => (t.Text = "text", t.Number = "number", t.Check = "check", t.Switch = "switch", t.Select = "select", t.Email = "email", t.Tel = "tel", t.File = "file", t.Link = "link", t.Action = "action", t.Integer = "int", t.Float = "float", t))(D || {});
|
|
25
|
+
const bl = (t) => L(new M(t)), hl = (t, u, i, a = !0) => L(new M({ key: t, label: u, sortable: a, type: D.Link, link: i })), gl = (t, u, i, a = !0) => L(new M({ key: t, label: u, sortable: a, type: D.Action, action: i })), Cl = (t, u, i = !0) => L(new M({ key: t, label: u, type: D.Text, sortable: i })), Sl = (t, u, i = !0) => L(new M({ key: t, label: u, type: D.Number, sortable: i })), Bl = (t, u, i = !0) => L(new M({ key: t, label: u, type: D.Number, sortable: i })), wl = (t, u, i = !0) => L(new M({ key: t, label: u, type: D.Email, sortable: i })), Dl = (t, u, i = !0) => L(new M({ key: t, label: u, type: D.Tel, sortable: i })), Vl = (t, u, i = !0) => L(new M({ key: t, label: u, type: D.Check, sortable: i })), El = (t, u, i = !0) => L(new M({ key: t, label: u, type: D.Switch, sortable: i })), Tl = (t, u, i, a = !0) => L(new M({ key: t, label: u, type: D.Select, sortable: a })), Il = (t, u, i = !0) => L(new M({ key: t, label: u, type: D.File, sortable: i })), $l = (t, u, i = !0) => L(new M({ key: t, label: u, sortable: i, hidden: !0 })), Pe = (t, u, i, a) => {
|
|
29
26
|
if (!i) return 0;
|
|
30
|
-
let
|
|
27
|
+
let n = t[i.key], l = u[i.key];
|
|
31
28
|
if (a === "asc") {
|
|
32
|
-
if (
|
|
33
|
-
if (l >
|
|
29
|
+
if (n > l) return 1;
|
|
30
|
+
if (l > n) return -1;
|
|
34
31
|
} else {
|
|
35
|
-
if (
|
|
36
|
-
if (l >
|
|
32
|
+
if (n > l) return -1;
|
|
33
|
+
if (l > n) return 1;
|
|
37
34
|
}
|
|
38
35
|
return 0;
|
|
39
|
-
}, te = (t,
|
|
36
|
+
}, te = (t, u, i, a = []) => {
|
|
40
37
|
if (t.extractTitleFromColumn) {
|
|
41
|
-
let
|
|
42
|
-
if (
|
|
43
|
-
return te(
|
|
38
|
+
let n = a.find((l) => l.key === t.extractTitleFromColumn);
|
|
39
|
+
if (n)
|
|
40
|
+
return te(n, u, i, a);
|
|
44
41
|
}
|
|
45
42
|
if (t.formatter && typeof t.formatter == "function") {
|
|
46
|
-
let
|
|
47
|
-
return
|
|
43
|
+
let n = t.formatter(u[t.key], u, t, i);
|
|
44
|
+
return n.startsWith("__:") ? re(n.substring(3)) : n;
|
|
48
45
|
}
|
|
49
|
-
return
|
|
50
|
-
},
|
|
46
|
+
return u[t.key];
|
|
47
|
+
}, wt = (t, u, i) => {
|
|
51
48
|
if (!t.colspan) return -1;
|
|
52
|
-
let a =
|
|
53
|
-
return i.forEach((
|
|
54
|
-
let l = ge(t,
|
|
49
|
+
let a = u;
|
|
50
|
+
return i.forEach((n) => {
|
|
51
|
+
let l = ge(t, n);
|
|
55
52
|
l > 0 && l < a && (a = l);
|
|
56
53
|
}), a;
|
|
57
|
-
}, ge = (t,
|
|
58
|
-
if (typeof t != "object" || !t.key ||
|
|
54
|
+
}, ge = (t, u) => t.colspan === !1 ? !1 : typeof t.colspan == "function" ? t.colspan(u) : t.colspan, Dt = (t, u) => typeof t.preferSlot > "u" ? !0 : t.preferSlot === !1 ? !1 : typeof t.preferSlot == "function" ? t.preferSlot(u) : !0, Vt = (t, u, i) => {
|
|
55
|
+
if (typeof t != "object" || !t.key || u.indexOf(t.key) > -1) return !1;
|
|
59
56
|
let a = ge(t, i);
|
|
60
57
|
return typeof t.colspan > "u" ? !0 : (typeof t.colspan < "u" && (typeof t.colspan == "function" ? a = parseInt(t.colspan(i)) : a = parseInt(t.colspan)), a > 0);
|
|
61
|
-
},
|
|
58
|
+
}, Et = (t = []) => {
|
|
62
59
|
if (t.length > 0) {
|
|
63
|
-
for (let
|
|
64
|
-
if (t[
|
|
60
|
+
for (let u = 0; u < t.length; ++u)
|
|
61
|
+
if (t[u].sortable) return t[u].key;
|
|
65
62
|
}
|
|
66
63
|
return "";
|
|
67
|
-
},
|
|
64
|
+
}, Tt = (t, u) => {
|
|
68
65
|
if (t.length > 0) {
|
|
69
66
|
for (let i = 0; i < t.length; ++i)
|
|
70
|
-
if (t[i].key ===
|
|
67
|
+
if (t[i].key === u) return t[i];
|
|
71
68
|
}
|
|
72
69
|
return null;
|
|
73
|
-
},
|
|
70
|
+
}, qe = /* @__PURE__ */ Q({
|
|
74
71
|
__name: "LktTableCell",
|
|
75
72
|
props: {
|
|
76
73
|
modelValue: { default: () => ({}) },
|
|
77
|
-
column: { default: () => new
|
|
74
|
+
column: { default: () => new M() },
|
|
78
75
|
columns: { default: () => [] },
|
|
79
76
|
i: { default: 0 },
|
|
80
77
|
editModeEnabled: { type: Boolean, default: !1 }
|
|
81
78
|
},
|
|
82
79
|
emits: ["update:modelValue"],
|
|
83
|
-
setup(t, { emit:
|
|
84
|
-
const i =
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
}),
|
|
89
|
-
|
|
80
|
+
setup(t, { emit: u }) {
|
|
81
|
+
const i = u, a = t, n = g(a.modelValue), l = g(n.value[a.column.key]), k = g(null);
|
|
82
|
+
N(l, (f) => {
|
|
83
|
+
const o = JSON.parse(JSON.stringify(n.value));
|
|
84
|
+
o[a.column.key] = f, i("update:modelValue", o);
|
|
85
|
+
}), N(() => a.modelValue, (f) => {
|
|
86
|
+
n.value = f, l.value = n.value[a.column.key];
|
|
90
87
|
});
|
|
91
|
-
const
|
|
92
|
-
var
|
|
93
|
-
if ((
|
|
94
|
-
let
|
|
95
|
-
|
|
88
|
+
const w = d(() => ({ ...a.column.slotData, item: n.value })), h = d(() => {
|
|
89
|
+
var f, o, p, b;
|
|
90
|
+
if ((f = a.column.field) != null && f.modalData && typeof ((o = a.column.field) == null ? void 0 : o.modalData) == "object")
|
|
91
|
+
for (let y in a.column.field.modalData)
|
|
92
|
+
if (typeof ((p = a.column.field) == null ? void 0 : p.modalData[y]) == "string" && a.column.field.modalData[y].startsWith("prop:")) {
|
|
93
|
+
let X = a.column.field.modalData[y].substring(5);
|
|
94
|
+
n.value[X];
|
|
95
|
+
} else
|
|
96
|
+
a.column.field.modalData[y];
|
|
97
|
+
return (b = a.column.field) == null ? void 0 : b.modalData;
|
|
98
|
+
}), V = d(() => {
|
|
99
|
+
var f, o, p;
|
|
100
|
+
if ((f = a.column.field) != null && f.modalKey.startsWith("prop:")) {
|
|
101
|
+
let b = (o = a.column.field) == null ? void 0 : o.modalKey.substring(5);
|
|
102
|
+
return n.value[b];
|
|
96
103
|
}
|
|
97
|
-
return (
|
|
98
|
-
}),
|
|
99
|
-
var
|
|
100
|
-
if (typeof ((
|
|
101
|
-
let
|
|
102
|
-
return
|
|
104
|
+
return (p = a.column.field) == null ? void 0 : p.modalKey;
|
|
105
|
+
}), s = d(() => {
|
|
106
|
+
var f, o, p, b;
|
|
107
|
+
if (typeof ((f = a.column.field) == null ? void 0 : f.icon) == "string" && ((o = a.column.field) != null && o.icon.startsWith("prop:"))) {
|
|
108
|
+
let y = (p = a.column.field) == null ? void 0 : p.icon.substring(5);
|
|
109
|
+
return n.value[y];
|
|
110
|
+
}
|
|
111
|
+
return (b = a.column.field) == null ? void 0 : b.icon;
|
|
112
|
+
}), q = d(() => {
|
|
113
|
+
var f, o, p, b;
|
|
114
|
+
if (typeof ((f = a.column.field) == null ? void 0 : f.download) == "string" && ((o = a.column.field) != null && o.download.startsWith("prop:"))) {
|
|
115
|
+
let y = (p = a.column.field) == null ? void 0 : p.download.substring(5);
|
|
116
|
+
return n.value[y];
|
|
117
|
+
}
|
|
118
|
+
return (b = a.column.field) == null ? void 0 : b.download;
|
|
119
|
+
}), ae = d(() => {
|
|
120
|
+
var f, o, p;
|
|
121
|
+
if (typeof ((f = a.column.field) == null ? void 0 : f.options) == "string" && ((o = a.column.field) != null && o.options.startsWith("prop:"))) {
|
|
122
|
+
let b = (p = a.column.field) == null ? void 0 : p.options.substring(5);
|
|
123
|
+
return n.value[b];
|
|
103
124
|
}
|
|
104
125
|
return a.column.field.options;
|
|
105
|
-
}),
|
|
106
|
-
return (
|
|
107
|
-
const
|
|
108
|
-
return
|
|
126
|
+
}), A = d(() => [D.Integer, D.Float].includes(a.column.type) ? D.Number : a.column.type);
|
|
127
|
+
return (f, o) => {
|
|
128
|
+
const p = K("lkt-anchor"), b = K("lkt-field");
|
|
129
|
+
return f.column.type === B(D).Link ? (r(), C(p, {
|
|
109
130
|
key: 0,
|
|
110
|
-
to:
|
|
131
|
+
to: f.column.getHref(n.value)
|
|
111
132
|
}, {
|
|
112
|
-
default:
|
|
113
|
-
le(
|
|
133
|
+
default: W(() => [
|
|
134
|
+
le(O(B(te)(f.column, n.value, f.i)), 1)
|
|
114
135
|
]),
|
|
115
136
|
_: 1
|
|
116
|
-
}, 8, ["to"])) :
|
|
137
|
+
}, 8, ["to"])) : f.column.type === B(D).Action ? (r(), c("a", {
|
|
117
138
|
key: 1,
|
|
118
139
|
href: "#",
|
|
119
|
-
onClick:
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
"
|
|
127
|
-
|
|
140
|
+
onClick: o[0] || (o[0] = (y) => f.column.doAction(n.value))
|
|
141
|
+
}, O(B(te)(f.column, n.value, f.i)), 1)) : f.column.type !== "" ? (r(), C(b, bt({ key: 2 }, f.column.field, {
|
|
142
|
+
icon: s.value,
|
|
143
|
+
download: q.value,
|
|
144
|
+
type: A.value,
|
|
145
|
+
"read-mode": !f.column.editable || !f.editModeEnabled,
|
|
146
|
+
ref: (y) => k.value = y,
|
|
147
|
+
"slot-data": w.value,
|
|
148
|
+
label: f.column.type === "switch" || f.column.type === "check" ? f.column.label : "",
|
|
149
|
+
"modal-key": V.value,
|
|
150
|
+
"modal-data": h.value,
|
|
151
|
+
options: ae.value,
|
|
128
152
|
modelValue: l.value,
|
|
129
|
-
"onUpdate:modelValue":
|
|
130
|
-
}), null, 16, ["type", "read-mode", "slot-data", "label", "modal-key", "options", "modelValue"])) : (r(),
|
|
131
|
-
le(
|
|
153
|
+
"onUpdate:modelValue": o[1] || (o[1] = (y) => l.value = y)
|
|
154
|
+
}), null, 16, ["icon", "download", "type", "read-mode", "slot-data", "label", "modal-key", "modal-data", "options", "modelValue"])) : (r(), c(I, { key: 3 }, [
|
|
155
|
+
le(O(B(te)(f.column, n.value, f.i, f.columns)), 1)
|
|
132
156
|
], 64));
|
|
133
157
|
};
|
|
134
158
|
}
|
|
@@ -136,7 +160,7 @@ const Vl = (t) => M(new F(t)), El = (t, n, i, a = !0) => M(new F({ key: t, label
|
|
|
136
160
|
};
|
|
137
161
|
Z.navButtonSlot = "", Z.dropButtonSlot = "", Z.editButtonSlot = "", Z.createButtonSlot = "", Z.defaultEmptySlot = void 0;
|
|
138
162
|
let T = Z;
|
|
139
|
-
const
|
|
163
|
+
const It = /* @__PURE__ */ Q({
|
|
140
164
|
__name: "DropButton",
|
|
141
165
|
props: {
|
|
142
166
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -147,11 +171,11 @@ const Ft = /* @__PURE__ */ X({
|
|
|
147
171
|
resourceData: { default: () => ({}) }
|
|
148
172
|
},
|
|
149
173
|
emits: ["click"],
|
|
150
|
-
setup(t, { emit:
|
|
151
|
-
const i =
|
|
152
|
-
return (l,
|
|
153
|
-
const
|
|
154
|
-
return r(),
|
|
174
|
+
setup(t, { emit: u }) {
|
|
175
|
+
const i = u, a = d(() => T.dropButtonSlot !== ""), n = d(() => T.dropButtonSlot);
|
|
176
|
+
return (l, k) => {
|
|
177
|
+
const w = K("lkt-button");
|
|
178
|
+
return r(), C(w, {
|
|
155
179
|
palette: "table-delete",
|
|
156
180
|
icon: a.value ? "" : l.icon,
|
|
157
181
|
text: a.value ? "" : l.text,
|
|
@@ -159,16 +183,16 @@ const Ft = /* @__PURE__ */ X({
|
|
|
159
183
|
"resource-data": l.resourceData,
|
|
160
184
|
"confirm-modal": l.confirm,
|
|
161
185
|
disabled: l.disabled,
|
|
162
|
-
onClick:
|
|
186
|
+
onClick: k[0] || (k[0] = He((h) => i("click"), ["prevent", "stop"]))
|
|
163
187
|
}, {
|
|
164
|
-
default:
|
|
165
|
-
a.value ? (r(),
|
|
188
|
+
default: W(() => [
|
|
189
|
+
a.value ? (r(), C(J(n.value), { key: 0 })) : v("", !0)
|
|
166
190
|
]),
|
|
167
191
|
_: 1
|
|
168
192
|
}, 8, ["icon", "text", "resource", "resource-data", "confirm-modal", "disabled"]);
|
|
169
193
|
};
|
|
170
194
|
}
|
|
171
|
-
}),
|
|
195
|
+
}), $t = /* @__PURE__ */ Q({
|
|
172
196
|
__name: "EditButton",
|
|
173
197
|
props: {
|
|
174
198
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -180,11 +204,11 @@ const Ft = /* @__PURE__ */ X({
|
|
|
180
204
|
resourceData: { default: () => ({}) }
|
|
181
205
|
},
|
|
182
206
|
emits: ["click"],
|
|
183
|
-
setup(t, { emit:
|
|
184
|
-
const i =
|
|
185
|
-
return (l,
|
|
186
|
-
const
|
|
187
|
-
return r(),
|
|
207
|
+
setup(t, { emit: u }) {
|
|
208
|
+
const i = u, a = d(() => T.editButtonSlot !== ""), n = d(() => T.editButtonSlot);
|
|
209
|
+
return (l, k) => {
|
|
210
|
+
const w = K("lkt-button");
|
|
211
|
+
return r(), C(w, {
|
|
188
212
|
palette: "table-delete",
|
|
189
213
|
icon: a.value ? "" : l.icon,
|
|
190
214
|
text: a.value ? "" : l.text,
|
|
@@ -194,28 +218,28 @@ const Ft = /* @__PURE__ */ X({
|
|
|
194
218
|
"resource-data": l.resourceData,
|
|
195
219
|
"confirm-modal": l.confirm,
|
|
196
220
|
disabled: l.disabled,
|
|
197
|
-
onClick:
|
|
221
|
+
onClick: k[0] || (k[0] = He((h) => i("click"), ["prevent", "stop"]))
|
|
198
222
|
}, {
|
|
199
|
-
default:
|
|
200
|
-
a.value ? (r(),
|
|
223
|
+
default: W(() => [
|
|
224
|
+
a.value ? (r(), C(J(n.value), { key: 0 })) : v("", !0)
|
|
201
225
|
]),
|
|
202
226
|
_: 1
|
|
203
227
|
}, 8, ["icon", "text", "on-click-to", "is-anchor", "resource", "resource-data", "confirm-modal", "disabled"]);
|
|
204
228
|
};
|
|
205
229
|
}
|
|
206
|
-
}),
|
|
230
|
+
}), Rt = ["data-i", "data-draggable"], Mt = {
|
|
207
231
|
key: 1,
|
|
208
232
|
"data-role": "invalid-drag-indicator"
|
|
209
|
-
},
|
|
233
|
+
}, Lt = {
|
|
210
234
|
key: 2,
|
|
211
235
|
class: "lkt-table-nav-cell"
|
|
212
|
-
},
|
|
236
|
+
}, Ft = { class: "lkt-table-nav-container" }, Nt = ["data-column", "colspan", "title", "onClick"], Ut = {
|
|
213
237
|
key: 4,
|
|
214
238
|
class: "lkt-table-col-drop"
|
|
215
|
-
},
|
|
239
|
+
}, Wt = {
|
|
216
240
|
key: 5,
|
|
217
241
|
class: "lkt-table-col-edit"
|
|
218
|
-
},
|
|
242
|
+
}, At = /* @__PURE__ */ Q({
|
|
219
243
|
__name: "LktTableRow",
|
|
220
244
|
props: {
|
|
221
245
|
modelValue: { default: () => ({}) },
|
|
@@ -240,125 +264,125 @@ const Ft = /* @__PURE__ */ X({
|
|
|
240
264
|
editLink: { default: "" }
|
|
241
265
|
},
|
|
242
266
|
emits: ["update:modelValue", "click", "show", "item-up", "item-down", "item-drop"],
|
|
243
|
-
setup(t, { emit:
|
|
244
|
-
const i =
|
|
245
|
-
for (let
|
|
246
|
-
const
|
|
247
|
-
i("show",
|
|
248
|
-
},
|
|
249
|
-
let
|
|
250
|
-
return a.sortable && a.isDraggable &&
|
|
251
|
-
}), V =
|
|
267
|
+
setup(t, { emit: u }) {
|
|
268
|
+
const i = u, a = t, n = g(a.modelValue), l = g(a.editLink);
|
|
269
|
+
for (let o in n.value) l.value = je(l.value, ":" + o, n.value[o]);
|
|
270
|
+
const k = (o) => i("click", o), w = (o, p) => {
|
|
271
|
+
i("show", o, p);
|
|
272
|
+
}, h = d(() => {
|
|
273
|
+
let o = [];
|
|
274
|
+
return a.sortable && a.isDraggable && o.push("handle"), o.join(" ");
|
|
275
|
+
}), V = d(() => T.navButtonSlot !== ""), s = d(() => T.navButtonSlot), q = () => {
|
|
252
276
|
i("item-up", a.i);
|
|
253
|
-
},
|
|
277
|
+
}, ae = () => {
|
|
254
278
|
i("item-down", a.i);
|
|
255
|
-
},
|
|
279
|
+
}, A = () => {
|
|
256
280
|
i("item-drop", a.i);
|
|
257
|
-
},
|
|
281
|
+
}, f = () => {
|
|
258
282
|
};
|
|
259
|
-
return
|
|
260
|
-
i("update:modelValue",
|
|
261
|
-
}, { deep: !0 }), (
|
|
262
|
-
const
|
|
263
|
-
return r(),
|
|
264
|
-
"data-i":
|
|
265
|
-
"data-draggable":
|
|
283
|
+
return N(() => a.modelValue, (o) => n.value = o), N(n, (o) => {
|
|
284
|
+
i("update:modelValue", o, a.i);
|
|
285
|
+
}, { deep: !0 }), (o, p) => {
|
|
286
|
+
const b = K("lkt-button");
|
|
287
|
+
return r(), c("tr", {
|
|
288
|
+
"data-i": o.i,
|
|
289
|
+
"data-draggable": o.isDraggable
|
|
266
290
|
}, [
|
|
267
|
-
|
|
291
|
+
o.sortable && o.isDraggable && o.editModeEnabled ? (r(), c("td", {
|
|
268
292
|
key: 0,
|
|
269
293
|
"data-role": "drag-indicator",
|
|
270
|
-
class: x(
|
|
271
|
-
}, null, 2)) :
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
ee(
|
|
294
|
+
class: x(h.value)
|
|
295
|
+
}, null, 2)) : o.sortable && o.editModeEnabled ? (r(), c("td", Mt)) : v("", !0),
|
|
296
|
+
o.addNavigation && o.editModeEnabled ? (r(), c("td", Lt, [
|
|
297
|
+
$("div", Ft, [
|
|
298
|
+
ee(b, {
|
|
275
299
|
palette: "table-nav",
|
|
276
|
-
disabled:
|
|
277
|
-
onClick:
|
|
300
|
+
disabled: o.i === 0,
|
|
301
|
+
onClick: q
|
|
278
302
|
}, {
|
|
279
|
-
default:
|
|
280
|
-
V.value ? (r(),
|
|
303
|
+
default: W(() => [
|
|
304
|
+
V.value ? (r(), C(J(s.value), {
|
|
281
305
|
key: 0,
|
|
282
306
|
direction: "up"
|
|
283
|
-
})) : (r(),
|
|
284
|
-
|
|
285
|
-
|
|
307
|
+
})) : (r(), c(I, { key: 1 }, [
|
|
308
|
+
p[2] || (p[2] = $("i", { class: "" }, null, -1)),
|
|
309
|
+
p[3] || (p[3] = le(" UP "))
|
|
286
310
|
], 64))
|
|
287
311
|
]),
|
|
288
312
|
_: 1
|
|
289
313
|
}, 8, ["disabled"]),
|
|
290
|
-
ee(
|
|
314
|
+
ee(b, {
|
|
291
315
|
palette: "table-nav",
|
|
292
|
-
disabled:
|
|
293
|
-
onClick:
|
|
316
|
+
disabled: o.latestRow,
|
|
317
|
+
onClick: ae
|
|
294
318
|
}, {
|
|
295
|
-
default:
|
|
296
|
-
V.value ? (r(),
|
|
319
|
+
default: W(() => [
|
|
320
|
+
V.value ? (r(), C(J(s.value), {
|
|
297
321
|
key: 0,
|
|
298
322
|
direction: "down"
|
|
299
|
-
})) : (r(),
|
|
300
|
-
|
|
301
|
-
|
|
323
|
+
})) : (r(), c(I, { key: 1 }, [
|
|
324
|
+
p[4] || (p[4] = $("i", { class: "" }, null, -1)),
|
|
325
|
+
p[5] || (p[5] = le(" DOWN "))
|
|
302
326
|
], 64))
|
|
303
327
|
]),
|
|
304
328
|
_: 1
|
|
305
329
|
}, 8, ["disabled"])
|
|
306
330
|
])
|
|
307
|
-
])) :
|
|
308
|
-
|
|
331
|
+
])) : v("", !0),
|
|
332
|
+
o.displayHiddenColumnsIndicator ? (r(), c("td", {
|
|
309
333
|
key: 3,
|
|
310
|
-
onClick:
|
|
334
|
+
onClick: p[0] || (p[0] = (y) => w(y, o.i)),
|
|
311
335
|
"data-role": "show-more",
|
|
312
|
-
class: x(
|
|
313
|
-
}, null, 2)) :
|
|
314
|
-
(r(!0),
|
|
315
|
-
|
|
316
|
-
key: "td" +
|
|
317
|
-
"data-column":
|
|
318
|
-
colspan:
|
|
319
|
-
title:
|
|
320
|
-
onClick: (
|
|
336
|
+
class: x(o.hiddenIsVisible ? "state-open" : "")
|
|
337
|
+
}, null, 2)) : v("", !0),
|
|
338
|
+
(r(!0), c(I, null, j(o.visibleColumns, (y) => (r(), c(I, null, [
|
|
339
|
+
B(Vt)(y, o.emptyColumns, n.value) ? (r(), c("td", {
|
|
340
|
+
key: "td" + o.i,
|
|
341
|
+
"data-column": y.key,
|
|
342
|
+
colspan: B(ge)(y, n.value),
|
|
343
|
+
title: B(te)(y, n.value, o.i, o.visibleColumns),
|
|
344
|
+
onClick: (X) => k(X, n.value)
|
|
321
345
|
}, [
|
|
322
|
-
|
|
346
|
+
o.$slots[y.key] && B(Dt)(y, n.value) ? U(o.$slots, y.key, {
|
|
323
347
|
key: 0,
|
|
324
|
-
value:
|
|
325
|
-
item:
|
|
326
|
-
column:
|
|
327
|
-
i:
|
|
328
|
-
}) :
|
|
348
|
+
value: n.value[y.key],
|
|
349
|
+
item: n.value,
|
|
350
|
+
column: y,
|
|
351
|
+
i: o.i
|
|
352
|
+
}) : n.value ? (r(), C(qe, {
|
|
329
353
|
key: 1,
|
|
330
|
-
modelValue:
|
|
331
|
-
"onUpdate:modelValue":
|
|
332
|
-
column:
|
|
333
|
-
columns:
|
|
334
|
-
"edit-mode-enabled":
|
|
335
|
-
i:
|
|
336
|
-
}, null, 8, ["modelValue", "column", "columns", "edit-mode-enabled", "i"])) :
|
|
337
|
-
], 8,
|
|
354
|
+
modelValue: n.value,
|
|
355
|
+
"onUpdate:modelValue": p[1] || (p[1] = (X) => n.value = X),
|
|
356
|
+
column: y,
|
|
357
|
+
columns: o.visibleColumns,
|
|
358
|
+
"edit-mode-enabled": o.editModeEnabled,
|
|
359
|
+
i: o.i
|
|
360
|
+
}, null, 8, ["modelValue", "column", "columns", "edit-mode-enabled", "i"])) : v("", !0)
|
|
361
|
+
], 8, Nt)) : v("", !0)
|
|
338
362
|
], 64))), 256)),
|
|
339
|
-
|
|
340
|
-
ee(
|
|
341
|
-
resource:
|
|
342
|
-
"resource-data":
|
|
343
|
-
confirm:
|
|
344
|
-
text:
|
|
345
|
-
icon:
|
|
346
|
-
onClick:
|
|
363
|
+
o.canDrop && o.editModeEnabled ? (r(), c("td", Ut, [
|
|
364
|
+
ee(It, {
|
|
365
|
+
resource: o.dropResource,
|
|
366
|
+
"resource-data": n.value,
|
|
367
|
+
confirm: o.dropConfirm,
|
|
368
|
+
text: o.dropText,
|
|
369
|
+
icon: o.dropIcon,
|
|
370
|
+
onClick: A
|
|
347
371
|
}, null, 8, ["resource", "resource-data", "confirm", "text", "icon"])
|
|
348
|
-
])) :
|
|
349
|
-
|
|
350
|
-
ee(
|
|
351
|
-
"resource-data":
|
|
352
|
-
text:
|
|
353
|
-
icon:
|
|
372
|
+
])) : v("", !0),
|
|
373
|
+
o.canEdit && o.editModeEnabled ? (r(), c("td", Wt, [
|
|
374
|
+
ee($t, {
|
|
375
|
+
"resource-data": n.value,
|
|
376
|
+
text: o.editText,
|
|
377
|
+
icon: o.editIcon,
|
|
354
378
|
link: l.value,
|
|
355
|
-
onClick:
|
|
379
|
+
onClick: f
|
|
356
380
|
}, null, 8, ["resource-data", "text", "icon", "link"])
|
|
357
|
-
])) :
|
|
358
|
-
], 8,
|
|
381
|
+
])) : v("", !0)
|
|
382
|
+
], 8, Rt);
|
|
359
383
|
};
|
|
360
384
|
}
|
|
361
|
-
}),
|
|
385
|
+
}), Pt = { "data-role": "hidden-row" }, Kt = ["colspan"], Ht = ["data-column"], jt = ["data-i"], qt = ["data-column", "title", "onClick"], zt = /* @__PURE__ */ Q({
|
|
362
386
|
__name: "LktHiddenRow",
|
|
363
387
|
props: {
|
|
364
388
|
modelValue: { default: () => ({}) },
|
|
@@ -372,47 +396,47 @@ const Ft = /* @__PURE__ */ X({
|
|
|
372
396
|
emptyColumns: { default: () => [] }
|
|
373
397
|
},
|
|
374
398
|
emits: ["update:modelValue", "click"],
|
|
375
|
-
setup(t, { emit:
|
|
376
|
-
const i =
|
|
377
|
-
return
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
(r(!0),
|
|
382
|
-
"data-column":
|
|
399
|
+
setup(t, { emit: u }) {
|
|
400
|
+
const i = u, a = t, n = g(a.modelValue), l = (k) => i("click", k);
|
|
401
|
+
return N(() => a.modelValue, (k) => n.value = k), N(n, () => i("update:modelValue", n.value)), (k, w) => ne((r(), c("tr", Pt, [
|
|
402
|
+
$("td", { colspan: k.hiddenColumnsColSpan }, [
|
|
403
|
+
$("table", null, [
|
|
404
|
+
$("tr", null, [
|
|
405
|
+
(r(!0), c(I, null, j(k.hiddenColumns, (h) => (r(), c("th", {
|
|
406
|
+
"data-column": h.key
|
|
383
407
|
}, [
|
|
384
|
-
|
|
385
|
-
], 8,
|
|
408
|
+
$("div", null, O(h.label), 1)
|
|
409
|
+
], 8, Ht))), 256))
|
|
386
410
|
]),
|
|
387
|
-
|
|
388
|
-
(r(!0),
|
|
389
|
-
"data-column":
|
|
390
|
-
title:
|
|
391
|
-
onClick: (s) => l(s,
|
|
411
|
+
$("tr", { "data-i": k.i }, [
|
|
412
|
+
(r(!0), c(I, null, j(k.hiddenColumns, (h, V) => (r(), c("td", {
|
|
413
|
+
"data-column": h.key,
|
|
414
|
+
title: B(te)(h, n.value, V, k.hiddenColumns),
|
|
415
|
+
onClick: (s) => l(s, n.value)
|
|
392
416
|
}, [
|
|
393
|
-
|
|
417
|
+
k.$slots[h.key] ? U(k.$slots, h.key, {
|
|
394
418
|
key: 0,
|
|
395
|
-
value:
|
|
396
|
-
item:
|
|
397
|
-
column:
|
|
419
|
+
value: n.value[h.key],
|
|
420
|
+
item: n.value,
|
|
421
|
+
column: h,
|
|
398
422
|
i: V
|
|
399
|
-
}) : (r(),
|
|
423
|
+
}) : (r(), C(qe, {
|
|
400
424
|
key: 1,
|
|
401
|
-
column:
|
|
402
|
-
columns:
|
|
403
|
-
modelValue:
|
|
404
|
-
"onUpdate:modelValue":
|
|
425
|
+
column: h,
|
|
426
|
+
columns: k.hiddenColumns,
|
|
427
|
+
modelValue: n.value,
|
|
428
|
+
"onUpdate:modelValue": w[0] || (w[0] = (s) => n.value = s),
|
|
405
429
|
i: V
|
|
406
430
|
}, null, 8, ["column", "columns", "modelValue", "i"]))
|
|
407
|
-
], 8,
|
|
408
|
-
], 8,
|
|
431
|
+
], 8, qt))), 256))
|
|
432
|
+
], 8, jt)
|
|
409
433
|
])
|
|
410
|
-
], 8,
|
|
434
|
+
], 8, Kt)
|
|
411
435
|
], 512)), [
|
|
412
|
-
[ue,
|
|
436
|
+
[ue, k.hiddenIsVisible]
|
|
413
437
|
]);
|
|
414
438
|
}
|
|
415
|
-
}), Ke = /* @__PURE__ */
|
|
439
|
+
}), Ke = /* @__PURE__ */ Q({
|
|
416
440
|
__name: "CreateButton",
|
|
417
441
|
props: {
|
|
418
442
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -421,26 +445,26 @@ const Ft = /* @__PURE__ */ X({
|
|
|
421
445
|
to: { default: "" }
|
|
422
446
|
},
|
|
423
447
|
emits: ["click"],
|
|
424
|
-
setup(t, { emit:
|
|
425
|
-
const i =
|
|
426
|
-
return (l,
|
|
427
|
-
const
|
|
428
|
-
return r(),
|
|
448
|
+
setup(t, { emit: u }) {
|
|
449
|
+
const i = u, a = d(() => T.createButtonSlot !== ""), n = d(() => T.createButtonSlot);
|
|
450
|
+
return (l, k) => {
|
|
451
|
+
const w = K("lkt-button");
|
|
452
|
+
return r(), C(w, {
|
|
429
453
|
palette: "table-create",
|
|
430
454
|
disabled: l.disabled,
|
|
431
455
|
icon: a.value ? "" : l.icon,
|
|
432
456
|
text: a.value ? "" : l.text,
|
|
433
457
|
"on-click-to": l.to,
|
|
434
|
-
onClick:
|
|
458
|
+
onClick: k[0] || (k[0] = (h) => i("click"))
|
|
435
459
|
}, {
|
|
436
|
-
default:
|
|
437
|
-
a.value ? (r(),
|
|
460
|
+
default: W(() => [
|
|
461
|
+
a.value ? (r(), C(J(n.value), { key: 0 })) : v("", !0)
|
|
438
462
|
]),
|
|
439
463
|
_: 1
|
|
440
464
|
}, 8, ["disabled", "icon", "text", "on-click-to"]);
|
|
441
465
|
};
|
|
442
466
|
}
|
|
443
|
-
}),
|
|
467
|
+
}), Gt = ["data-column", "data-sortable", "data-sort", "colspan", "title"], Ot = /* @__PURE__ */ Q({
|
|
444
468
|
__name: "TableHeader",
|
|
445
469
|
props: {
|
|
446
470
|
column: { default: () => ({}) },
|
|
@@ -450,49 +474,49 @@ const Ft = /* @__PURE__ */ X({
|
|
|
450
474
|
items: { default: () => [] }
|
|
451
475
|
},
|
|
452
476
|
emits: ["click"],
|
|
453
|
-
setup(t, { emit:
|
|
454
|
-
const i =
|
|
455
|
-
return (V, s) => (r(),
|
|
477
|
+
setup(t, { emit: u }) {
|
|
478
|
+
const i = u, a = t, n = d(() => wt(a.column, a.amountOfColumns, a.items)), l = d(() => a.column.sortable === !0), k = d(() => l.value && a.sortBy === a.column.key ? a.sortDirection : ""), w = d(() => a.column.label.startsWith("__:") ? re(a.column.label.substring(3)) : a.column.label), h = () => i("click", a.column);
|
|
479
|
+
return (V, s) => (r(), c("th", {
|
|
456
480
|
"data-column": V.column.key,
|
|
457
481
|
"data-sortable": l.value,
|
|
458
|
-
"data-sort":
|
|
459
|
-
colspan:
|
|
460
|
-
title:
|
|
461
|
-
onClick:
|
|
482
|
+
"data-sort": k.value,
|
|
483
|
+
colspan: n.value,
|
|
484
|
+
title: w.value,
|
|
485
|
+
onClick: h
|
|
462
486
|
}, [
|
|
463
|
-
|
|
464
|
-
], 8,
|
|
487
|
+
$("div", null, O(w.value), 1)
|
|
488
|
+
], 8, Gt));
|
|
465
489
|
}
|
|
466
|
-
}),
|
|
490
|
+
}), Jt = ["id"], Qt = { class: "lkt-table-page-buttons" }, Xt = { key: 1 }, Yt = { class: "switch-edition-mode" }, Zt = {
|
|
467
491
|
key: 0,
|
|
468
492
|
class: "lkt-table-page-buttons"
|
|
469
|
-
},
|
|
493
|
+
}, _t = {
|
|
470
494
|
key: 1,
|
|
471
495
|
class: "lkt-table-page-filters"
|
|
472
|
-
},
|
|
496
|
+
}, xt = ["data-sortable"], el = { key: 0 }, tl = {
|
|
473
497
|
key: 0,
|
|
474
498
|
"data-role": "drag-indicator"
|
|
475
|
-
},
|
|
499
|
+
}, ll = { key: 1 }, al = { key: 2 }, ol = {
|
|
476
500
|
key: 3,
|
|
477
501
|
class: "lkt-table-col-drop"
|
|
478
|
-
},
|
|
502
|
+
}, nl = {
|
|
479
503
|
key: 4,
|
|
480
504
|
class: "lkt-table-col-edit"
|
|
481
|
-
},
|
|
505
|
+
}, ul = ["id"], rl = {
|
|
482
506
|
key: 0,
|
|
483
507
|
class: "lkt-table-item"
|
|
484
|
-
},
|
|
508
|
+
}, il = {
|
|
485
509
|
key: 3,
|
|
486
510
|
class: "lkt-table-empty"
|
|
487
|
-
},
|
|
511
|
+
}, sl = {
|
|
488
512
|
key: 4,
|
|
489
513
|
class: "lkt-table-page-buttons lkt-table-page-buttons-bottom"
|
|
490
|
-
},
|
|
514
|
+
}, dl = /* @__PURE__ */ Q({
|
|
491
515
|
__name: "LktTable",
|
|
492
516
|
props: {
|
|
493
517
|
modelValue: { default: () => [] },
|
|
494
518
|
columns: { default: () => [] },
|
|
495
|
-
sorter: { type: Function, default:
|
|
519
|
+
sorter: { type: Function, default: Pe },
|
|
496
520
|
draggableChecker: { type: Function, default: (t) => !0 },
|
|
497
521
|
checkValidDrag: { type: Function, default: void 0 },
|
|
498
522
|
sortable: { type: Boolean, default: !1 },
|
|
@@ -548,52 +572,52 @@ const Ft = /* @__PURE__ */ X({
|
|
|
548
572
|
slotItemVar: { default: "item" }
|
|
549
573
|
},
|
|
550
574
|
emits: ["update:modelValue", "update:perms", "sort", "click", "save", "error", "before-save", "read-response", "click-create"],
|
|
551
|
-
setup(t, { expose:
|
|
552
|
-
const a = i,
|
|
553
|
-
Array.isArray(e) && (s.value = e),
|
|
575
|
+
setup(t, { expose: u, emit: i }) {
|
|
576
|
+
const a = i, n = ht(), l = t, k = {}, w = g(typeof l.sorter == "function" ? l.sorter : Pe), h = g(Et(l.columns)), V = g("asc"), s = g(l.modelValue), q = g(k), ae = g(null), A = g(l.columns), f = g(l.page), o = g(!1), p = g(!1), b = g(l.perms), y = g(null), X = g({}), _ = g(new St({ items: s.value }, l.dataStateConfig)), R = g(l.editMode), oe = g(0), ze = (e) => {
|
|
577
|
+
Array.isArray(e) && (s.value = e), o.value = !1, p.value = !0, _.value.store({ items: s.value }).turnStoredIntoOriginal();
|
|
554
578
|
}, Ge = (e) => {
|
|
555
|
-
|
|
579
|
+
b.value = e;
|
|
556
580
|
}, Oe = (e) => {
|
|
557
581
|
}, Je = (e) => {
|
|
558
582
|
a("read-response", e);
|
|
559
|
-
}, Qe = () => Ue(() =>
|
|
560
|
-
|
|
561
|
-
}, ie =
|
|
583
|
+
}, Qe = () => Ue(() => o.value = !0), Xe = () => {
|
|
584
|
+
y.value.doRefresh();
|
|
585
|
+
}, ie = Ct(12), me = d(() => {
|
|
562
586
|
if (!l.hideEmptyColumns) return [];
|
|
563
587
|
let e = [];
|
|
564
|
-
return
|
|
565
|
-
let
|
|
566
|
-
s.value.forEach((
|
|
567
|
-
if (typeof
|
|
568
|
-
return
|
|
569
|
-
|
|
570
|
-
}),
|
|
588
|
+
return A.value.forEach((m) => {
|
|
589
|
+
let S = m.key, F = !1;
|
|
590
|
+
s.value.forEach((z) => {
|
|
591
|
+
if (typeof z.checkEmpty == "function")
|
|
592
|
+
return z.checkEmpty(z);
|
|
593
|
+
z[S] && (F = !0);
|
|
594
|
+
}), F || e.push(S);
|
|
571
595
|
}), e;
|
|
572
|
-
}), se =
|
|
596
|
+
}), se = d(() => A.value.filter((e) => !e.hidden)), pe = d(() => A.value.filter((e) => e.hidden)), Ye = d(() => {
|
|
573
597
|
let e = se.value.length + 1;
|
|
574
598
|
return l.sortable && ++e, e;
|
|
575
|
-
}), Ze =
|
|
599
|
+
}), Ze = d(() => A.value.filter((e) => e.isForRowKey)), Ce = d(() => pe.value.length > 0 && !l.sortable), _e = d(() => A.value.map((e) => e.key)), Se = d(() => {
|
|
576
600
|
let e = [];
|
|
577
|
-
for (let
|
|
601
|
+
for (let m in n) _e.value.indexOf(m) !== -1 && e.push(m);
|
|
578
602
|
return e;
|
|
579
|
-
}), Be =
|
|
603
|
+
}), Be = d(() => l.hiddenSave || o.value || !l.saveResource ? !1 : R.value && _.value.changed() ? !0 : R.value), xe = d(() => de.value && s.value.length >= l.requiredItemsForTopCreate || l.switchEditionEnabled ? !0 : Be.value || R.value && l.canCreate), et = d(() => l.saveDisabled || typeof l.saveValidator == "function" && !l.saveValidator(s.value) ? !1 : _.value.changed()), tt = d(() => s.value.length), lt = d(() => ({
|
|
580
604
|
items: s.value,
|
|
581
605
|
...l.saveResourceData
|
|
582
|
-
})), at =
|
|
583
|
-
let
|
|
584
|
-
if (typeof
|
|
606
|
+
})), at = d(() => l.titleTag === "" ? "h2" : l.titleTag), ot = d(() => l.wrapContentTag === "" ? "div" : l.wrapContentTag), ve = d(() => l.title.startsWith("__:") ? re(l.title.substring(3)) : l.title), nt = d(() => l.saveText.startsWith("__:") ? re(l.saveText.substring(3)) : l.saveText), ut = d(() => l.editModeText.startsWith("__:") ? re(l.editModeText.substring(3)) : l.editModeText), we = d(() => b.value.includes("create")), rt = d(() => b.value.includes("read")), ke = d(() => b.value.includes("update")), ye = d(() => b.value.includes("drop")), it = (e) => {
|
|
607
|
+
let m = e.target;
|
|
608
|
+
if (typeof m.dataset.column > "u")
|
|
585
609
|
do
|
|
586
|
-
|
|
587
|
-
while (typeof
|
|
588
|
-
if (
|
|
589
|
-
return s.value[
|
|
590
|
-
},
|
|
591
|
-
e && e.sortable && (s.value = s.value.sort((
|
|
592
|
-
},
|
|
610
|
+
m = m.parentNode;
|
|
611
|
+
while (typeof m.dataset.column > "u" && m.tagName !== "TABLE" && m.tagName !== "body");
|
|
612
|
+
if (m.tagName === "TD" && (m = m.parentNode, m = m.dataset.i, typeof m < "u"))
|
|
613
|
+
return s.value[m];
|
|
614
|
+
}, De = (e) => q.value["tr_" + e] === !0, Ve = (e) => {
|
|
615
|
+
e && e.sortable && (s.value = s.value.sort((m, S) => w.value(m, S, e, V.value)), V.value = V.value === "asc" ? "desc" : "asc", h.value = e.key, a("sort", [h.value, V.value]));
|
|
616
|
+
}, Ee = (e) => {
|
|
593
617
|
a("click", e);
|
|
594
|
-
}, Te = (e,
|
|
595
|
-
let
|
|
596
|
-
|
|
618
|
+
}, Te = (e, m) => {
|
|
619
|
+
let S = "tr_" + m;
|
|
620
|
+
q.value[S] = typeof q.value[S] > "u" ? !0 : !q.value[S];
|
|
597
621
|
}, st = (e) => typeof l.checkValidDrag == "function" ? l.checkValidDrag(e) : !0, Ie = (e) => typeof l.draggableChecker == "function" ? l.draggableChecker(e) : !0, $e = () => {
|
|
598
622
|
if (l.canCreateWithoutEdition)
|
|
599
623
|
a("click-create");
|
|
@@ -608,87 +632,87 @@ const Ft = /* @__PURE__ */ X({
|
|
|
608
632
|
s.value.push({});
|
|
609
633
|
}
|
|
610
634
|
}, dt = () => {
|
|
611
|
-
|
|
635
|
+
o.value = !0;
|
|
612
636
|
}, ct = () => {
|
|
613
|
-
|
|
614
|
-
}, ft = (e,
|
|
615
|
-
if (a("before-save"), l.saveResource && (
|
|
616
|
-
a("error",
|
|
637
|
+
o.value = !1;
|
|
638
|
+
}, ft = (e, m) => {
|
|
639
|
+
if (a("before-save"), l.saveResource && (o.value = !1, !m.success)) {
|
|
640
|
+
a("error", m.httpStatus);
|
|
617
641
|
return;
|
|
618
642
|
}
|
|
619
|
-
_.value.turnStoredIntoOriginal(), a("save",
|
|
620
|
-
}, Re = (e,
|
|
621
|
-
if (
|
|
622
|
-
let
|
|
623
|
-
for (;
|
|
643
|
+
_.value.turnStoredIntoOriginal(), a("save", m);
|
|
644
|
+
}, Re = (e, m, S) => {
|
|
645
|
+
if (S >= e.length) {
|
|
646
|
+
let F = S - e.length + 1;
|
|
647
|
+
for (; F--; ) e.push(void 0);
|
|
624
648
|
}
|
|
625
|
-
return e.splice(
|
|
649
|
+
return e.splice(S, 0, e.splice(m, 1)[0]), e;
|
|
626
650
|
}, mt = (e) => {
|
|
627
651
|
Re(s.value, e, e - 1), oe.value = fe();
|
|
628
652
|
}, pt = (e) => {
|
|
629
653
|
Re(s.value, e, e + 1), oe.value = fe();
|
|
630
|
-
},
|
|
654
|
+
}, Me = (e) => {
|
|
631
655
|
s.value.splice(e, 1), oe.value = fe();
|
|
632
656
|
}, vt = () => {
|
|
633
657
|
let e = document.getElementById("lkt-table-body-" + ie);
|
|
634
|
-
|
|
658
|
+
X.value = new Bt(e, {
|
|
635
659
|
direction: "vertical",
|
|
636
660
|
handle: ".handle",
|
|
637
661
|
animation: 150,
|
|
638
|
-
onEnd: function(
|
|
639
|
-
let
|
|
640
|
-
s.value.splice(
|
|
662
|
+
onEnd: function(m) {
|
|
663
|
+
let S = m.oldIndex, F = m.newIndex;
|
|
664
|
+
s.value.splice(F, 0, s.value.splice(S, 1)[0]), oe.value = fe();
|
|
641
665
|
},
|
|
642
|
-
onMove: function(
|
|
643
|
-
return st(
|
|
666
|
+
onMove: function(m, S) {
|
|
667
|
+
return st(m);
|
|
644
668
|
}
|
|
645
669
|
});
|
|
646
|
-
},
|
|
647
|
-
let
|
|
648
|
-
return
|
|
649
|
-
let
|
|
650
|
-
|
|
651
|
-
}),
|
|
652
|
-
},
|
|
670
|
+
}, Le = (e, m, S = !1) => {
|
|
671
|
+
let F = [oe.value, ie, "row", m];
|
|
672
|
+
return S && F.push("hidden"), Ze.value.forEach((z) => {
|
|
673
|
+
let G = String(e[z.key]).toLowerCase();
|
|
674
|
+
G.length > 50 && (G = G.substring(0, 50)), G = je(G, " ", "-"), F.push(G);
|
|
675
|
+
}), F.join("-");
|
|
676
|
+
}, Fe = d(() => typeof l.createEnabledValidator == "function" ? l.createEnabledValidator({ items: s.value }) : !0), de = d(() => we.value ? l.canCreateWithoutEdition || l.canCreate && R.value : !1), Ne = (e) => typeof l.itemDisplayChecker == "function" ? l.itemDisplayChecker(e) : !0;
|
|
653
677
|
gt(() => {
|
|
654
|
-
l.initialSorting &&
|
|
678
|
+
l.initialSorting && Ve(Tt(l.columns, h.value)), _.value.store({ items: s.value }).turnStoredIntoOriginal(), l.sortable && Ue(() => {
|
|
655
679
|
vt();
|
|
656
680
|
});
|
|
657
|
-
}),
|
|
681
|
+
}), N(() => l.perms, (e) => b.value = e), N(b, (e) => a("update:perms", e)), N(() => l.editMode, (e) => R.value = e), N(() => l.columns, (e) => A.value = e), N(() => l.modelValue, (e) => s.value = e), N(s, (e) => {
|
|
658
682
|
_.value.increment({ items: e }), a("update:modelValue", e);
|
|
659
|
-
}, { deep: !0 }),
|
|
683
|
+
}, { deep: !0 }), u({
|
|
660
684
|
getItemByEvent: it,
|
|
661
685
|
doRefresh: Xe
|
|
662
686
|
});
|
|
663
|
-
const kt =
|
|
664
|
-
return (e,
|
|
665
|
-
const
|
|
666
|
-
return r(),
|
|
687
|
+
const kt = d(() => typeof T.defaultEmptySlot < "u"), yt = d(() => T.defaultEmptySlot);
|
|
688
|
+
return (e, m) => {
|
|
689
|
+
const S = K("lkt-button"), F = K("lkt-field"), z = K("lkt-loader"), G = K("lkt-paginator");
|
|
690
|
+
return r(), c("section", {
|
|
667
691
|
class: "lkt-table-page",
|
|
668
|
-
id: "lkt-table-page-" +
|
|
692
|
+
id: "lkt-table-page-" + B(ie)
|
|
669
693
|
}, [
|
|
670
|
-
ve.value ||
|
|
694
|
+
ve.value || B(n).title ? (r(), c("header", {
|
|
671
695
|
key: 0,
|
|
672
696
|
class: x(e.headerClass)
|
|
673
697
|
}, [
|
|
674
|
-
ve.value ? (r(),
|
|
675
|
-
default:
|
|
676
|
-
e.titleIcon ? (r(),
|
|
698
|
+
ve.value ? (r(), C(J(at.value), { key: 0 }, {
|
|
699
|
+
default: W(() => [
|
|
700
|
+
e.titleIcon ? (r(), c("i", {
|
|
677
701
|
key: 0,
|
|
678
702
|
class: x(e.titleIcon)
|
|
679
|
-
}, null, 2)) :
|
|
680
|
-
le(" " +
|
|
703
|
+
}, null, 2)) : v("", !0),
|
|
704
|
+
le(" " + O(ve.value), 1)
|
|
681
705
|
]),
|
|
682
706
|
_: 1
|
|
683
|
-
})) :
|
|
684
|
-
|
|
685
|
-
], 2)) :
|
|
686
|
-
(r(),
|
|
707
|
+
})) : v("", !0),
|
|
708
|
+
B(n).title ? U(e.$slots, "title", { key: 1 }) : v("", !0)
|
|
709
|
+
], 2)) : v("", !0),
|
|
710
|
+
(r(), C(J(ot.value), {
|
|
687
711
|
class: x(["lkt-table-page-content-wrapper", e.wrapContentClass])
|
|
688
712
|
}, {
|
|
689
|
-
default:
|
|
690
|
-
ne(
|
|
691
|
-
ne(ee(
|
|
713
|
+
default: W(() => [
|
|
714
|
+
ne($("div", Qt, [
|
|
715
|
+
ne(ee(S, {
|
|
692
716
|
ref: "saveButton",
|
|
693
717
|
palette: "success",
|
|
694
718
|
disabled: !et.value,
|
|
@@ -700,30 +724,31 @@ const Ft = /* @__PURE__ */ X({
|
|
|
700
724
|
onLoaded: ct,
|
|
701
725
|
onClick: ft
|
|
702
726
|
}, {
|
|
703
|
-
default:
|
|
704
|
-
|
|
727
|
+
default: W(() => [
|
|
728
|
+
B(n)["button-save"] ? U(e.$slots, "button-save", {
|
|
705
729
|
key: 0,
|
|
706
730
|
items: s.value,
|
|
707
731
|
editMode: e.editMode,
|
|
708
732
|
canUpdate: !e.saveDisabled
|
|
709
|
-
}) : (r(),
|
|
733
|
+
}) : (r(), c("span", Xt, O(nt.value), 1))
|
|
710
734
|
]),
|
|
711
735
|
_: 3
|
|
712
736
|
}, 8, ["disabled", "confirm-modal", "confirm-data", "resource", "resource-data"]), [
|
|
713
737
|
[ue, Be.value]
|
|
714
738
|
]),
|
|
715
|
-
de.value && s.value.length >= e.requiredItemsForTopCreate ? (r(),
|
|
739
|
+
de.value && s.value.length >= e.requiredItemsForTopCreate ? (r(), C(Ke, {
|
|
716
740
|
key: 0,
|
|
717
|
-
disabled: !
|
|
741
|
+
disabled: !Fe.value || e.createDisabled,
|
|
718
742
|
text: e.createText,
|
|
719
743
|
icon: e.createIcon,
|
|
720
744
|
to: e.createRoute,
|
|
721
745
|
onClick: $e
|
|
722
|
-
}, null, 8, ["disabled", "text", "icon", "to"])) :
|
|
723
|
-
|
|
724
|
-
ne(ee(
|
|
725
|
-
|
|
726
|
-
|
|
746
|
+
}, null, 8, ["disabled", "text", "icon", "to"])) : v("", !0),
|
|
747
|
+
$("div", Yt, [
|
|
748
|
+
ne(ee(F, {
|
|
749
|
+
type: "switch",
|
|
750
|
+
modelValue: R.value,
|
|
751
|
+
"onUpdate:modelValue": m[0] || (m[0] = (E) => R.value = E),
|
|
727
752
|
label: ut.value
|
|
728
753
|
}, null, 8, ["modelValue", "label"]), [
|
|
729
754
|
[ue, e.switchEditionEnabled]
|
|
@@ -732,161 +757,161 @@ const Ft = /* @__PURE__ */ X({
|
|
|
732
757
|
], 512), [
|
|
733
758
|
[ue, xe.value]
|
|
734
759
|
]),
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
])) :
|
|
738
|
-
|
|
739
|
-
|
|
760
|
+
B(n).buttons ? (r(), c("div", Zt, [
|
|
761
|
+
U(e.$slots, "buttons")
|
|
762
|
+
])) : v("", !0),
|
|
763
|
+
p.value && B(n).filters ? (r(), c("div", _t, [
|
|
764
|
+
U(e.$slots, "filters", {
|
|
740
765
|
items: s.value,
|
|
741
|
-
isLoading:
|
|
766
|
+
isLoading: o.value
|
|
742
767
|
})
|
|
743
|
-
])) :
|
|
744
|
-
|
|
745
|
-
ne(
|
|
768
|
+
])) : v("", !0),
|
|
769
|
+
o.value ? (r(), C(z, { key: 2 })) : v("", !0),
|
|
770
|
+
ne($("div", {
|
|
746
771
|
class: "lkt-table",
|
|
747
772
|
"data-sortable": e.sortable
|
|
748
773
|
}, [
|
|
749
|
-
e.itemMode ? (r(),
|
|
774
|
+
e.itemMode ? (r(), c("div", {
|
|
750
775
|
key: 1,
|
|
751
776
|
class: x(["lkt-table-items-container", e.itemsContainerClass])
|
|
752
777
|
}, [
|
|
753
|
-
(r(!0),
|
|
754
|
-
Ne(
|
|
755
|
-
|
|
756
|
-
[e.slotItemVar || ""]:
|
|
757
|
-
index:
|
|
778
|
+
(r(!0), c(I, null, j(s.value, (E, P) => (r(), c(I, null, [
|
|
779
|
+
Ne(E) ? (r(), c("div", rl, [
|
|
780
|
+
U(e.$slots, "item", he({
|
|
781
|
+
[e.slotItemVar || ""]: E,
|
|
782
|
+
index: P,
|
|
758
783
|
canCreate: we.value,
|
|
759
784
|
canRead: rt.value,
|
|
760
785
|
canUpdate: ke.value,
|
|
761
786
|
canDrop: ye.value,
|
|
762
|
-
isLoading:
|
|
763
|
-
doDrop: () =>
|
|
787
|
+
isLoading: o.value,
|
|
788
|
+
doDrop: () => Me(P)
|
|
764
789
|
}))
|
|
765
|
-
])) :
|
|
790
|
+
])) : v("", !0)
|
|
766
791
|
], 64))), 256))
|
|
767
|
-
], 2)) : (r(),
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
e.sortable &&
|
|
771
|
-
e.addNavigation &&
|
|
772
|
-
Ce.value ? (r(),
|
|
773
|
-
(r(!0),
|
|
774
|
-
me.value.indexOf(
|
|
792
|
+
], 2)) : (r(), c("table", el, [
|
|
793
|
+
$("thead", null, [
|
|
794
|
+
$("tr", null, [
|
|
795
|
+
e.sortable && R.value ? (r(), c("th", tl)) : v("", !0),
|
|
796
|
+
e.addNavigation && R.value ? (r(), c("th", ll)) : v("", !0),
|
|
797
|
+
Ce.value ? (r(), c("th", al)) : v("", !0),
|
|
798
|
+
(r(!0), c(I, null, j(se.value, (E) => (r(), c(I, null, [
|
|
799
|
+
me.value.indexOf(E.key) === -1 ? (r(), C(Ot, {
|
|
775
800
|
key: 0,
|
|
776
|
-
column:
|
|
777
|
-
"sort-by":
|
|
801
|
+
column: E,
|
|
802
|
+
"sort-by": h.value,
|
|
778
803
|
"sort-direction": V.value,
|
|
779
804
|
"amount-of-columns": e.columns.length,
|
|
780
805
|
items: s.value,
|
|
781
|
-
onClick: (
|
|
782
|
-
}, null, 8, ["column", "sort-by", "sort-direction", "amount-of-columns", "items", "onClick"])) :
|
|
806
|
+
onClick: (P) => Ve(E)
|
|
807
|
+
}, null, 8, ["column", "sort-by", "sort-direction", "amount-of-columns", "items", "onClick"])) : v("", !0)
|
|
783
808
|
], 64))), 256)),
|
|
784
|
-
e.canDrop && ye.value &&
|
|
785
|
-
e.canEditButton && ke.value &&
|
|
809
|
+
e.canDrop && ye.value && R.value ? (r(), c("th", ol)) : v("", !0),
|
|
810
|
+
e.canEditButton && ke.value && R.value ? (r(), c("th", nl)) : v("", !0)
|
|
786
811
|
])
|
|
787
812
|
]),
|
|
788
|
-
|
|
789
|
-
ref: (
|
|
790
|
-
id: "lkt-table-body-" +
|
|
813
|
+
$("tbody", {
|
|
814
|
+
ref: (E) => ae.value = E,
|
|
815
|
+
id: "lkt-table-body-" + B(ie)
|
|
791
816
|
}, [
|
|
792
|
-
(r(!0),
|
|
793
|
-
Ne(
|
|
794
|
-
modelValue: s.value[
|
|
795
|
-
"onUpdate:modelValue": (Y) => s.value[
|
|
796
|
-
key:
|
|
797
|
-
i:
|
|
817
|
+
(r(!0), c(I, null, j(s.value, (E, P) => (r(), c(I, null, [
|
|
818
|
+
Ne(E) ? (r(), C(At, {
|
|
819
|
+
modelValue: s.value[P],
|
|
820
|
+
"onUpdate:modelValue": (Y) => s.value[P] = Y,
|
|
821
|
+
key: Le(E, P),
|
|
822
|
+
i: P,
|
|
798
823
|
"display-hidden-columns-indicator": Ce.value,
|
|
799
|
-
"is-draggable": Ie(
|
|
824
|
+
"is-draggable": Ie(E),
|
|
800
825
|
sortable: e.sortable,
|
|
801
826
|
"visible-columns": se.value,
|
|
802
827
|
"empty-columns": me.value,
|
|
803
828
|
"add-navigation": e.addNavigation,
|
|
804
|
-
"hidden-is-visible":
|
|
805
|
-
"latest-row":
|
|
806
|
-
"can-drop": e.canDrop && ye.value &&
|
|
829
|
+
"hidden-is-visible": De(P),
|
|
830
|
+
"latest-row": P + 1 === tt.value,
|
|
831
|
+
"can-drop": e.canDrop && ye.value && R.value,
|
|
807
832
|
"drop-confirm": e.dropConfirm,
|
|
808
833
|
"drop-resource": e.dropResource,
|
|
809
834
|
"drop-text": e.dropText,
|
|
810
835
|
"drop-icon": e.dropIcon,
|
|
811
|
-
"can-edit": e.canEditButton && ke.value &&
|
|
836
|
+
"can-edit": e.canEditButton && ke.value && R.value,
|
|
812
837
|
"edit-text": e.editText,
|
|
813
838
|
"edit-icon": e.editIcon,
|
|
814
839
|
"edit-link": e.editLink,
|
|
815
|
-
"edit-mode-enabled":
|
|
816
|
-
onClick:
|
|
840
|
+
"edit-mode-enabled": R.value,
|
|
841
|
+
onClick: Ee,
|
|
817
842
|
onShow: Te,
|
|
818
843
|
onItemUp: mt,
|
|
819
844
|
onItemDown: pt,
|
|
820
|
-
onItemDrop:
|
|
821
|
-
},
|
|
822
|
-
|
|
845
|
+
onItemDrop: Me
|
|
846
|
+
}, We({ _: 2 }, [
|
|
847
|
+
j(Se.value, (Y) => ({
|
|
823
848
|
name: Y,
|
|
824
|
-
fn:
|
|
825
|
-
|
|
826
|
-
[e.slotItemVar || ""]:
|
|
827
|
-
value:
|
|
828
|
-
column:
|
|
849
|
+
fn: W((H) => [
|
|
850
|
+
U(e.$slots, Y, he({
|
|
851
|
+
[e.slotItemVar || ""]: H.item,
|
|
852
|
+
value: H.value,
|
|
853
|
+
column: H.column
|
|
829
854
|
}))
|
|
830
855
|
])
|
|
831
856
|
}))
|
|
832
|
-
]), 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"])) :
|
|
833
|
-
pe.value.length > 0 ? (r(!0),
|
|
834
|
-
modelValue: s.value[
|
|
835
|
-
"onUpdate:modelValue": (ce) => s.value[
|
|
836
|
-
key:
|
|
837
|
-
i:
|
|
857
|
+
]), 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"])) : v("", !0),
|
|
858
|
+
pe.value.length > 0 ? (r(!0), c(I, { key: 1 }, j(s.value, (Y, H) => (r(), C(zt, {
|
|
859
|
+
modelValue: s.value[H],
|
|
860
|
+
"onUpdate:modelValue": (ce) => s.value[H] = ce,
|
|
861
|
+
key: Le(Y, H, !0),
|
|
862
|
+
i: H,
|
|
838
863
|
"hidden-columns": pe.value,
|
|
839
864
|
"hidden-columns-col-span": Ye.value,
|
|
840
865
|
"is-draggable": Ie(Y),
|
|
841
866
|
sortable: e.sortable,
|
|
842
867
|
"visible-columns": se.value,
|
|
843
868
|
"empty-columns": me.value,
|
|
844
|
-
"hidden-is-visible":
|
|
845
|
-
onClick:
|
|
869
|
+
"hidden-is-visible": De(H),
|
|
870
|
+
onClick: Ee,
|
|
846
871
|
onShow: Te
|
|
847
|
-
},
|
|
848
|
-
|
|
872
|
+
}, We({ _: 2 }, [
|
|
873
|
+
j(Se.value, (ce) => ({
|
|
849
874
|
name: ce,
|
|
850
|
-
fn:
|
|
851
|
-
|
|
875
|
+
fn: W((be) => [
|
|
876
|
+
U(e.$slots, ce, he({
|
|
852
877
|
[e.slotItemVar || ""]: be.item,
|
|
853
878
|
value: be.value,
|
|
854
879
|
column: be.column
|
|
855
880
|
}))
|
|
856
881
|
])
|
|
857
882
|
}))
|
|
858
|
-
]), 1032, ["modelValue", "onUpdate:modelValue", "i", "hidden-columns", "hidden-columns-col-span", "is-draggable", "sortable", "visible-columns", "empty-columns", "hidden-is-visible"]))), 128)) :
|
|
883
|
+
]), 1032, ["modelValue", "onUpdate:modelValue", "i", "hidden-columns", "hidden-columns-col-span", "is-draggable", "sortable", "visible-columns", "empty-columns", "hidden-is-visible"]))), 128)) : v("", !0)
|
|
859
884
|
], 64))), 256))
|
|
860
|
-
], 8,
|
|
885
|
+
], 8, ul)
|
|
861
886
|
]))
|
|
862
|
-
], 8,
|
|
863
|
-
[ue, !
|
|
887
|
+
], 8, xt), [
|
|
888
|
+
[ue, !o.value && s.value.length > 0]
|
|
864
889
|
]),
|
|
865
|
-
!
|
|
866
|
-
|
|
890
|
+
!o.value && s.value.length === 0 ? (r(), c("div", il, [
|
|
891
|
+
B(n).empty ? U(e.$slots, "empty", { key: 0 }) : kt.value ? (r(), C(J(yt.value), {
|
|
867
892
|
key: 1,
|
|
868
893
|
message: e.noResultsText
|
|
869
|
-
}, null, 8, ["message"])) : e.noResultsText ? (r(),
|
|
870
|
-
le(
|
|
871
|
-
], 64)) :
|
|
872
|
-
])) :
|
|
873
|
-
de.value ||
|
|
874
|
-
de.value && s.value.length >= e.requiredItemsForBottomCreate ? (r(),
|
|
894
|
+
}, null, 8, ["message"])) : e.noResultsText ? (r(), c(I, { key: 2 }, [
|
|
895
|
+
le(O(e.noResultsText), 1)
|
|
896
|
+
], 64)) : v("", !0)
|
|
897
|
+
])) : v("", !0),
|
|
898
|
+
de.value || B(n).bottomButtons ? (r(), c("div", sl, [
|
|
899
|
+
de.value && s.value.length >= e.requiredItemsForBottomCreate ? (r(), C(Ke, {
|
|
875
900
|
key: 0,
|
|
876
|
-
disabled: !
|
|
901
|
+
disabled: !Fe.value || e.createDisabled,
|
|
877
902
|
text: e.createText,
|
|
878
903
|
icon: e.createIcon,
|
|
879
904
|
to: e.createRoute,
|
|
880
905
|
onClick: $e
|
|
881
|
-
}, null, 8, ["disabled", "text", "icon", "to"])) :
|
|
882
|
-
|
|
883
|
-
])) :
|
|
884
|
-
e.resource.length > 0 ? (r(),
|
|
906
|
+
}, null, 8, ["disabled", "text", "icon", "to"])) : v("", !0),
|
|
907
|
+
U(e.$slots, "bottom-buttons")
|
|
908
|
+
])) : v("", !0),
|
|
909
|
+
e.resource.length > 0 ? (r(), C(G, {
|
|
885
910
|
key: 5,
|
|
886
911
|
ref_key: "paginator",
|
|
887
|
-
ref:
|
|
888
|
-
modelValue:
|
|
889
|
-
"onUpdate:modelValue":
|
|
912
|
+
ref: y,
|
|
913
|
+
modelValue: f.value,
|
|
914
|
+
"onUpdate:modelValue": m[1] || (m[1] = (E) => f.value = E),
|
|
890
915
|
resource: e.resource,
|
|
891
916
|
filters: e.filters,
|
|
892
917
|
onResults: ze,
|
|
@@ -894,38 +919,38 @@ const Ft = /* @__PURE__ */ X({
|
|
|
894
919
|
onPerms: Ge,
|
|
895
920
|
onCustom: Oe,
|
|
896
921
|
onResponse: Je
|
|
897
|
-
}, null, 8, ["modelValue", "resource", "filters"])) :
|
|
922
|
+
}, null, 8, ["modelValue", "resource", "filters"])) : v("", !0)
|
|
898
923
|
]),
|
|
899
924
|
_: 3
|
|
900
925
|
}, 8, ["class"]))
|
|
901
|
-
], 8,
|
|
926
|
+
], 8, Jt);
|
|
902
927
|
};
|
|
903
928
|
}
|
|
904
|
-
}),
|
|
929
|
+
}), Rl = {
|
|
905
930
|
install: (t) => {
|
|
906
|
-
t.component("lkt-
|
|
931
|
+
t.component("lkt-table") === void 0 && t.component("lkt-table", dl);
|
|
907
932
|
}
|
|
908
|
-
},
|
|
933
|
+
}, Ml = (t) => (T.navButtonSlot = t, !0), Ll = (t) => (T.dropButtonSlot = t, !0), Fl = (t) => (T.createButtonSlot = t, !0), Nl = (t) => {
|
|
909
934
|
T.defaultEmptySlot = t;
|
|
910
935
|
};
|
|
911
936
|
export {
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
937
|
+
M as Column,
|
|
938
|
+
gl as createActionColumn,
|
|
939
|
+
Vl as createCheckColumn,
|
|
940
|
+
bl as createColumn,
|
|
941
|
+
wl as createEmailColumn,
|
|
942
|
+
Il as createFileColumn,
|
|
943
|
+
Bl as createFloatColumn,
|
|
944
|
+
$l as createHiddenColumn,
|
|
945
|
+
Sl as createIntegerColumn,
|
|
946
|
+
hl as createLinkColumn,
|
|
947
|
+
Tl as createSelectColumn,
|
|
948
|
+
El as createSwitchColumn,
|
|
949
|
+
Dl as createTelColumn,
|
|
950
|
+
Cl as createTextColumn,
|
|
951
|
+
Rl as default,
|
|
952
|
+
Fl as setTableCreateButtonSlot,
|
|
953
|
+
Ll as setTableDropButtonSlot,
|
|
954
|
+
Nl as setTableEmptySlot,
|
|
955
|
+
Ml as setTableNavButtonSlot
|
|
931
956
|
};
|