lkt-table 1.2.25 → 1.2.26

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 CHANGED
@@ -1,22 +1,26 @@
1
- import { reactive as A, defineComponent as Q, ref as C, watch as $, nextTick as ke, computed as p, resolveComponent as M, openBlock as u, createBlock as b, withCtx as N, createTextVNode as te, toDisplayString as z, unref as V, createElementBlock as c, Fragment as B, withModifiers as We, resolveDynamicComponent as G, createCommentVNode as k, normalizeClass as _, createElementVNode as T, createVNode as x, renderList as q, renderSlot as O, withDirectives as ae, vShow as ne, useSlots as yt, onMounted as kt, createSlots as Oe, normalizeProps as ye } from "vue";
1
+ import { reactive as F, defineComponent as Q, ref as S, watch as $, nextTick as be, computed as p, resolveComponent as R, unref as b, openBlock as u, createBlock as k, withCtx as H, createTextVNode as te, toDisplayString as G, createElementBlock as c, Fragment as I, withModifiers as Ke, resolveDynamicComponent as J, createCommentVNode as h, normalizeClass as _, createElementVNode as T, createVNode as x, renderList as j, renderSlot as P, withDirectives as ae, vShow as ne, useSlots as kt, onMounted as yt, createSlots as Ne, normalizeProps as ye } from "vue";
2
2
  import { httpCall as bt } from "lkt-http-client";
3
- import { __ as J } from "lkt-i18n";
4
- import { createLktEvent as be } from "lkt-events";
5
- import { replaceAll as He, generateRandomString as gt } from "lkt-string-tools";
6
- import { DataState as Ct } from "lkt-data-state";
7
- import St from "sortablejs";
8
- import { time as de } from "lkt-date-tools";
3
+ import { __ as ue } from "lkt-i18n";
4
+ import { replaceAll as Oe, generateRandomString as gt } from "lkt-string-tools";
5
+ import { DataState as St } from "lkt-data-state";
6
+ import Ct from "sortablejs";
7
+ import { time as me } from "lkt-date-tools";
9
8
  import Vt from "lkt-loader";
10
9
  import Et from "lkt-button";
11
10
  import Dt from "lkt-paginator";
12
- import Bt from "lkt-field-text";
13
- import It from "lkt-field-textarea";
14
- import Tt from "lkt-field-select";
15
- import wt from "lkt-field-switch";
11
+ import It from "lkt-field-text";
12
+ import Bt from "lkt-field-textarea";
13
+ import wt from "lkt-field-select";
14
+ import Tt from "lkt-field-switch";
16
15
  import Lt from "lkt-field-file";
17
- class F {
18
- constructor(t = "", s = "") {
19
- this.preferSlot = !0, this.key = t, this.label = s, this.sortable = !0, this.hidden = !1, this.formatter = void 0, this.checkEmpty = void 0, this.colspan = void 0, this.preferSlot = !0, this.resource = "", this.resourceData = {}, this.isMultiple = !1, this.isLoading = !1, this.resourceLoaded = !1, this.valueSlot = "", this.editSlot = "", this.multipleDisplay = "", this.multipleDisplayEdition = "";
16
+ var C = /* @__PURE__ */ ((l) => (l.Text = "text", l.Number = "number", l.Check = "check", l.Switch = "switch", l.Select = "select", l.Email = "email", l.Tel = "tel", l.File = "file", l.Link = "link", l.Action = "action", l.Integer = "int", l.Float = "float", l))(C || {});
17
+ class U {
18
+ constructor(t = "", r = "") {
19
+ if (this.sortable = !0, this.hidden = !1, this.formatter = void 0, this.checkEmpty = void 0, this.colspan = void 0, this.preferSlot = !0, this.resource = "", this.resourceData = {}, this.isMultiple = !1, this.isLoading = !1, this.resourceLoaded = !1, this.valueSlot = "", this.editSlot = "", this.multipleDisplay = "", this.multipleDisplayEdition = "", typeof t == "object")
20
+ for (let a in t)
21
+ this[a] = t[a];
22
+ else
23
+ this.key = t, this.label = r;
20
24
  }
21
25
  setIsSortable(t = !0) {
22
26
  return this.sortable = t, this;
@@ -51,37 +55,37 @@ class F {
51
55
  console.warn("No action defined");
52
56
  }
53
57
  defineAsLink(t) {
54
- return this.type = "link", this.link = t, this;
58
+ return this.type = C.Link, this.link = t, this;
55
59
  }
56
60
  defineAsText() {
57
- return this.type = "text", this;
61
+ return this.type = C.Text, this;
58
62
  }
59
63
  defineAsEmail() {
60
- return this.type = "email", this;
64
+ return this.type = C.Email, this;
61
65
  }
62
66
  defineAsTel() {
63
- return this.type = "tel", this;
67
+ return this.type = C.Tel, this;
64
68
  }
65
69
  defineAsInteger() {
66
- return this.type = "int", this;
70
+ return this.type = C.Integer, this;
67
71
  }
68
72
  defineAsFloat() {
69
- return this.type = "float", this;
73
+ return this.type = C.Float, this;
70
74
  }
71
75
  defineAsCheck() {
72
- return this.type = "check", this;
76
+ return this.type = C.Check, this;
73
77
  }
74
78
  defineAsSwitch() {
75
- return this.type = "switch", this;
79
+ return this.type = C.Switch, this;
76
80
  }
77
81
  defineAsFile() {
78
- return this.type = "file", this;
82
+ return this.type = C.File, this;
79
83
  }
80
84
  defineAsAction(t) {
81
- return this.type = "action", this.action = t, this;
85
+ return this.type = C.Action, this.action = t, this;
82
86
  }
83
87
  defineAsSelect(t) {
84
- return this.type = "select", this.options = t, this;
88
+ return this.type = C.Select, this.options = t, this;
85
89
  }
86
90
  showLoading() {
87
91
  return this.resource !== "" && !this.resourceLoaded;
@@ -143,8 +147,8 @@ class F {
143
147
  setSlotData(t) {
144
148
  return this.slotData = t, this;
145
149
  }
146
- setAutoLoadSelectOptions(t = !0, s = "") {
147
- return this.autoLoadSelectOptions = t, this.autoLoadSelectOptionsKey = s, this;
150
+ setAutoLoadSelectOptions(t = !0, r = "") {
151
+ return this.autoLoadSelectOptions = t, this.autoLoadSelectOptionsKey = r, this;
148
152
  }
149
153
  setTagMode(t = !0) {
150
154
  return this.tags = t, this;
@@ -162,40 +166,40 @@ class F {
162
166
  return this.equivalentToSelectValue = t, this;
163
167
  }
164
168
  }
165
- const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n = !0) => A(new F(l, t).setIsSortable(n).defineAsLink(s)), Ul = (l, t, s, n = !0) => A(new F(l, t).setIsSortable(n).defineAsAction(s)), Ol = (l, t, s = !0) => A(new F(l, t).setIsSortable(s).defineAsText()), Nl = (l, t, s = !0) => A(new F(l, t).setIsSortable(s).defineAsInteger()), Pl = (l, t, s = !0) => A(new F(l, t).setIsSortable(s).defineAsFloat()), Wl = (l, t, s = !0) => A(new F(l, t).setIsSortable(s).defineAsEmail()), Hl = (l, t, s = !0) => A(new F(l, t).setIsSortable(s).defineAsTel()), Kl = (l, t, s = !0) => A(new F(l, t).setIsSortable(s).defineAsCheck()), ql = (l, t, s = !0) => A(new F(l, t).setIsSortable(s).defineAsSwitch()), jl = (l, t, s, n = !0) => A(new F(l, t).setIsSortable(n).defineAsSelect(s)), zl = (l, t, s = !0) => A(new F(l, t).setIsSortable(s).defineAsFile()), Gl = (l, t, s = !0) => A(new F(l, t).setIsSortable(s).setIsHidden(!0)), Ne = (l, t, s, n) => {
166
- if (!s) return 0;
167
- let r = l[s.key], o = t[s.key];
168
- if (n === "asc") {
169
- if (r > o) return 1;
170
- if (o > r) return -1;
169
+ const Al = (l, t, r = !0) => F(new U(l, t).setIsSortable(r)), $l = (l, t, r, a = !0) => F(new U(l, t).setIsSortable(a).defineAsLink(r)), Fl = (l, t, r, a = !0) => F(new U(l, t).setIsSortable(a).defineAsAction(r)), Ul = (l, t, r = !0) => F(new U(l, t).setIsSortable(r).defineAsText()), Nl = (l, t, r = !0) => F(new U(l, t).setIsSortable(r).defineAsInteger()), Pl = (l, t, r = !0) => F(new U(l, t).setIsSortable(r).defineAsFloat()), Hl = (l, t, r = !0) => F(new U(l, t).setIsSortable(r).defineAsEmail()), Kl = (l, t, r = !0) => F(new U(l, t).setIsSortable(r).defineAsTel()), Ol = (l, t, r = !0) => F(new U(l, t).setIsSortable(r).defineAsCheck()), Wl = (l, t, r = !0) => F(new U(l, t).setIsSortable(r).defineAsSwitch()), ql = (l, t, r, a = !0) => F(new U(l, t).setIsSortable(a).defineAsSelect(r)), jl = (l, t, r = !0) => F(new U(l, t).setIsSortable(r).defineAsFile()), zl = (l, t, r = !0) => F(new U(l, t).setIsSortable(r).setIsHidden(!0)), Pe = (l, t, r, a) => {
170
+ if (!r) return 0;
171
+ let s = l[r.key], o = t[r.key];
172
+ if (a === "asc") {
173
+ if (s > o) return 1;
174
+ if (o > s) return -1;
171
175
  } else {
172
- if (r > o) return -1;
173
- if (o > r) return 1;
176
+ if (s > o) return -1;
177
+ if (o > s) return 1;
174
178
  }
175
179
  return 0;
176
- }, ee = (l, t, s, n = []) => {
180
+ }, ee = (l, t, r, a = []) => {
177
181
  if (l.extractTitleFromColumn) {
178
- let r = n.find((o) => o.key === l.extractTitleFromColumn);
179
- if (r)
180
- return ee(r, t, s, n);
182
+ let s = a.find((o) => o.key === l.extractTitleFromColumn);
183
+ if (s)
184
+ return ee(s, t, r, a);
181
185
  }
182
186
  if (l.formatter && typeof l.formatter == "function") {
183
- let r = l.formatter(t[l.key], t, l, s);
184
- return r.startsWith("__:") ? J(r.substring(3)) : r;
187
+ let s = l.formatter(t[l.key], t, l, r);
188
+ return s.startsWith("__:") ? ue(s.substring(3)) : s;
185
189
  }
186
190
  return t[l.key];
187
- }, Mt = (l, t, s) => {
191
+ }, Mt = (l, t, r) => {
188
192
  if (!l.colspan) return -1;
189
- let n = t;
190
- return s.forEach((r) => {
191
- let o = ge(l, r);
192
- o > 0 && o < n && (n = o);
193
- }), n;
194
- }, ge = (l, t) => l.colspan === !1 ? !1 : typeof l.colspan == "function" ? l.colspan(t) : l.colspan, Rt = (l, t) => typeof l.preferSlot > "u" ? !0 : l.preferSlot === !1 ? !1 : typeof l.preferSlot == "function" ? l.preferSlot(t) : !0, $t = (l, t, s) => {
193
+ let a = t;
194
+ return r.forEach((s) => {
195
+ let o = ge(l, s);
196
+ o > 0 && o < a && (a = o);
197
+ }), a;
198
+ }, ge = (l, t) => l.colspan === !1 ? !1 : typeof l.colspan == "function" ? l.colspan(t) : l.colspan, Rt = (l, t) => typeof l.preferSlot > "u" ? !0 : l.preferSlot === !1 ? !1 : typeof l.preferSlot == "function" ? l.preferSlot(t) : !0, At = (l, t, r) => {
195
199
  if (typeof l != "object" || !l.key || t.indexOf(l.key) > -1) return !1;
196
- let n = ge(l, s);
197
- return typeof l.colspan > "u" ? !0 : (typeof l.colspan < "u" && (typeof l.colspan == "function" ? n = parseInt(l.colspan(s)) : n = parseInt(l.colspan)), n > 0);
198
- }, At = (l = []) => {
200
+ let a = ge(l, r);
201
+ return typeof l.colspan > "u" ? !0 : (typeof l.colspan < "u" && (typeof l.colspan == "function" ? a = parseInt(l.colspan(r)) : a = parseInt(l.colspan)), a > 0);
202
+ }, $t = (l = []) => {
199
203
  if (l.length > 0) {
200
204
  for (let t = 0; t < l.length; ++t)
201
205
  if (l[t].sortable) return l[t].key;
@@ -203,11 +207,11 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
203
207
  return "";
204
208
  }, Ft = (l, t) => {
205
209
  if (l.length > 0) {
206
- for (let s = 0; s < l.length; ++s)
207
- if (l[s].key === t) return l[s];
210
+ for (let r = 0; r < l.length; ++r)
211
+ if (l[r].key === t) return l[r];
208
212
  }
209
213
  return null;
210
- }, Ke = /* @__PURE__ */ Q({
214
+ }, We = /* @__PURE__ */ Q({
211
215
  __name: "LktTableCell",
212
216
  props: {
213
217
  modelValue: { default: () => ({}) },
@@ -218,121 +222,121 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
218
222
  },
219
223
  emits: ["update:modelValue"],
220
224
  setup(l, { emit: t }) {
221
- const s = t, n = l, r = C(n.modelValue), o = C(r.value[n.column.key]), h = C(null), y = C(n.column.showLoading());
222
- $(o, (a) => {
223
- const i = JSON.parse(JSON.stringify(r.value));
224
- i[n.column.key] = a, s("update:modelValue", i);
225
- }), $(() => n.modelValue, (a) => {
226
- r.value = a, o.value = r.value[n.column.key];
227
- }), $(() => n.column, () => {
228
- n.column.resourceLoaded && ke(() => y.value = !1);
229
- }, { deep: !0 }), n.column.hasToLoadResource() && n.column.loadResource();
230
- const v = p(() => ({ ...n.column.slotData, item: r.value }));
231
- return (a, i) => {
232
- const j = M("lkt-anchor"), H = M("lkt-field-text"), U = M("lkt-field-switch"), Y = M("lkt-field-file"), d = M("lkt-loader"), S = M("lkt-field-select");
233
- return a.column.type === "link" ? (u(), b(j, {
225
+ const r = t, a = l, s = S(a.modelValue), o = S(s.value[a.column.key]), v = S(null), E = S(a.column.showLoading());
226
+ $(o, (n) => {
227
+ const i = JSON.parse(JSON.stringify(s.value));
228
+ i[a.column.key] = n, r("update:modelValue", i);
229
+ }), $(() => a.modelValue, (n) => {
230
+ s.value = n, o.value = s.value[a.column.key];
231
+ }), $(() => a.column, () => {
232
+ a.column.resourceLoaded && be(() => E.value = !1);
233
+ }, { deep: !0 }), a.column.hasToLoadResource() && a.column.loadResource();
234
+ const y = p(() => ({ ...a.column.slotData, item: s.value }));
235
+ return (n, i) => {
236
+ const z = R("lkt-anchor"), W = R("lkt-field-text"), N = R("lkt-field-switch"), Y = R("lkt-field-file"), d = R("lkt-loader"), V = R("lkt-field-select");
237
+ return n.column.type === b(C).Link ? (u(), k(z, {
234
238
  key: 0,
235
- to: a.column.getHref(r.value)
239
+ to: n.column.getHref(s.value)
236
240
  }, {
237
- default: N(() => [
238
- te(z(V(ee)(a.column, r.value, a.i)), 1)
241
+ default: H(() => [
242
+ te(G(b(ee)(n.column, s.value, n.i)), 1)
239
243
  ]),
240
244
  _: 1
241
- }, 8, ["to"])) : a.column.type === "action" ? (u(), c("a", {
245
+ }, 8, ["to"])) : n.column.type === b(C).Action ? (u(), c("a", {
242
246
  key: 1,
243
247
  href: "#",
244
- onClick: i[0] || (i[0] = (m) => a.column.doAction(r.value))
245
- }, z(V(ee)(a.column, r.value, a.i)), 1)) : a.column.type === "text" ? (u(), b(H, {
248
+ onClick: i[0] || (i[0] = (m) => n.column.doAction(s.value))
249
+ }, G(b(ee)(n.column, s.value, n.i)), 1)) : n.column.type === b(C).Text ? (u(), k(W, {
246
250
  key: 2,
247
- "read-mode": !a.column.editable || !a.editModeEnabled,
248
- ref: (m) => h.value = m,
249
- "edit-slot": a.column.editSlot,
250
- "value-slot": a.column.valueSlot,
251
- "slot-data": v.value,
251
+ "read-mode": !n.column.editable || !n.editModeEnabled,
252
+ ref: (m) => v.value = m,
253
+ "edit-slot": n.column.editSlot,
254
+ "value-slot": n.column.valueSlot,
255
+ "slot-data": y.value,
252
256
  modelValue: o.value,
253
257
  "onUpdate:modelValue": i[1] || (i[1] = (m) => o.value = m)
254
- }, null, 8, ["read-mode", "edit-slot", "value-slot", "slot-data", "modelValue"])) : a.column.type === "email" ? (u(), b(H, {
258
+ }, null, 8, ["read-mode", "edit-slot", "value-slot", "slot-data", "modelValue"])) : n.column.type === b(C).Email ? (u(), k(W, {
255
259
  key: 3,
256
- "read-mode": !a.column.editable || !a.editModeEnabled,
257
- ref: (m) => h.value = m,
258
- "edit-slot": a.column.editSlot,
259
- "value-slot": a.column.valueSlot,
260
- "slot-data": v.value,
260
+ "read-mode": !n.column.editable || !n.editModeEnabled,
261
+ ref: (m) => v.value = m,
262
+ "edit-slot": n.column.editSlot,
263
+ "value-slot": n.column.valueSlot,
264
+ "slot-data": y.value,
261
265
  "is-email": "",
262
266
  modelValue: o.value,
263
267
  "onUpdate:modelValue": i[2] || (i[2] = (m) => o.value = m)
264
- }, null, 8, ["read-mode", "edit-slot", "value-slot", "slot-data", "modelValue"])) : a.column.type === "tel" ? (u(), b(H, {
268
+ }, null, 8, ["read-mode", "edit-slot", "value-slot", "slot-data", "modelValue"])) : n.column.type === b(C).Tel ? (u(), k(W, {
265
269
  key: 4,
266
- "read-mode": !a.column.editable || !a.editModeEnabled,
267
- ref: (m) => h.value = m,
268
- "edit-slot": a.column.editSlot,
269
- "value-slot": a.column.valueSlot,
270
- "slot-data": v.value,
270
+ "read-mode": !n.column.editable || !n.editModeEnabled,
271
+ ref: (m) => v.value = m,
272
+ "edit-slot": n.column.editSlot,
273
+ "value-slot": n.column.valueSlot,
274
+ "slot-data": y.value,
271
275
  "is-tel": "",
272
276
  modelValue: o.value,
273
277
  "onUpdate:modelValue": i[3] || (i[3] = (m) => o.value = m)
274
- }, null, 8, ["read-mode", "edit-slot", "value-slot", "slot-data", "modelValue"])) : a.column.type === "int" ? (u(), b(H, {
278
+ }, null, 8, ["read-mode", "edit-slot", "value-slot", "slot-data", "modelValue"])) : n.column.type === b(C).Integer ? (u(), k(W, {
275
279
  key: 5,
276
- "read-mode": !a.column.editable || !a.editModeEnabled,
277
- ref: (m) => h.value = m,
278
- "edit-slot": a.column.editSlot,
279
- "value-slot": a.column.valueSlot,
280
- "slot-data": v.value,
280
+ "read-mode": !n.column.editable || !n.editModeEnabled,
281
+ ref: (m) => v.value = m,
282
+ "edit-slot": n.column.editSlot,
283
+ "value-slot": n.column.valueSlot,
284
+ "slot-data": y.value,
281
285
  "is-number": "",
282
286
  modelValue: o.value,
283
287
  "onUpdate:modelValue": i[4] || (i[4] = (m) => o.value = m)
284
- }, null, 8, ["read-mode", "edit-slot", "value-slot", "slot-data", "modelValue"])) : a.column.type === "float" ? (u(), b(H, {
288
+ }, null, 8, ["read-mode", "edit-slot", "value-slot", "slot-data", "modelValue"])) : n.column.type === b(C).Float ? (u(), k(W, {
285
289
  key: 6,
286
- "read-mode": !a.column.editable || !a.editModeEnabled,
287
- ref: (m) => h.value = m,
288
- "edit-slot": a.column.editSlot,
289
- "value-slot": a.column.valueSlot,
290
- "slot-data": v.value,
290
+ "read-mode": !n.column.editable || !n.editModeEnabled,
291
+ ref: (m) => v.value = m,
292
+ "edit-slot": n.column.editSlot,
293
+ "value-slot": n.column.valueSlot,
294
+ "slot-data": y.value,
291
295
  "is-number": "",
292
296
  modelValue: o.value,
293
297
  "onUpdate:modelValue": i[5] || (i[5] = (m) => o.value = m)
294
- }, null, 8, ["read-mode", "edit-slot", "value-slot", "slot-data", "modelValue"])) : a.column.type === "check" ? (u(), b(U, {
298
+ }, null, 8, ["read-mode", "edit-slot", "value-slot", "slot-data", "modelValue"])) : n.column.type === b(C).Check ? (u(), k(N, {
295
299
  key: 7,
296
300
  "is-check": "",
297
- "read-mode": !a.column.editable || !a.editModeEnabled,
298
- ref: (m) => h.value = m,
301
+ "read-mode": !n.column.editable || !n.editModeEnabled,
302
+ ref: (m) => v.value = m,
299
303
  modelValue: o.value,
300
304
  "onUpdate:modelValue": i[6] || (i[6] = (m) => o.value = m)
301
- }, null, 8, ["read-mode", "modelValue"])) : a.column.type === "switch" ? (u(), b(U, {
305
+ }, null, 8, ["read-mode", "modelValue"])) : n.column.type === b(C).Switch ? (u(), k(N, {
302
306
  key: 8,
303
- "read-mode": !a.column.editable || !a.editModeEnabled,
304
- ref: (m) => h.value = m,
307
+ "read-mode": !n.column.editable || !n.editModeEnabled,
308
+ ref: (m) => v.value = m,
305
309
  modelValue: o.value,
306
310
  "onUpdate:modelValue": i[7] || (i[7] = (m) => o.value = m)
307
- }, null, 8, ["read-mode", "modelValue"])) : a.column.type === "file" ? (u(), b(Y, {
311
+ }, null, 8, ["read-mode", "modelValue"])) : n.column.type === b(C).File ? (u(), k(Y, {
308
312
  key: 9,
309
- "read-mode": !a.column.editable || !a.editModeEnabled,
310
- ref: (m) => h.value = m,
313
+ "read-mode": !n.column.editable || !n.editModeEnabled,
314
+ ref: (m) => v.value = m,
311
315
  modelValue: o.value,
312
316
  "onUpdate:modelValue": i[8] || (i[8] = (m) => o.value = m)
313
- }, null, 8, ["read-mode", "modelValue"])) : a.column.type === "select" ? (u(), c(B, { key: 10 }, [
314
- y.value ? (u(), b(d, { key: 0 })) : (u(), b(S, {
317
+ }, null, 8, ["read-mode", "modelValue"])) : n.column.type === b(C).Select ? (u(), c(I, { key: 10 }, [
318
+ E.value ? (u(), k(d, { key: 0 })) : (u(), k(V, {
315
319
  key: 1,
316
- "read-mode": !a.column.editable || !a.editModeEnabled,
317
- ref: (m) => h.value = m,
320
+ "read-mode": !n.column.editable || !n.editModeEnabled,
321
+ ref: (m) => v.value = m,
318
322
  modelValue: o.value,
319
323
  "onUpdate:modelValue": i[9] || (i[9] = (m) => o.value = m),
320
- "slot-data": v.value,
321
- resource: a.column.resource,
322
- "use-resource-slot": a.column.resourceSlot ? a.column.resourceSlot : a.column.resource,
323
- "resource-data": a.column.resourceData,
324
- options: a.column.options,
325
- multiple: a.column.isMultiple,
326
- tags: a.column.tags,
327
- "multiple-display": a.column.multipleDisplay,
328
- "multiple-display-edition": a.column.multipleDisplayEdition
324
+ "slot-data": y.value,
325
+ resource: n.column.resource,
326
+ "use-resource-slot": n.column.resourceSlot ? n.column.resourceSlot : n.column.resource,
327
+ "resource-data": n.column.resourceData,
328
+ options: n.column.options,
329
+ multiple: n.column.isMultiple,
330
+ tags: n.column.tags,
331
+ "multiple-display": n.column.multipleDisplay,
332
+ "multiple-display-edition": n.column.multipleDisplayEdition
329
333
  }, null, 8, ["read-mode", "modelValue", "slot-data", "resource", "use-resource-slot", "resource-data", "options", "multiple", "tags", "multiple-display", "multiple-display-edition"]))
330
- ], 64)) : (u(), c(B, { key: 11 }, [
331
- te(z(V(ee)(a.column, r.value, a.i, a.columns)), 1)
334
+ ], 64)) : (u(), c(I, { key: 11 }, [
335
+ te(G(b(ee)(n.column, s.value, n.i, n.columns)), 1)
332
336
  ], 64));
333
337
  };
334
338
  }
335
- }), R = {
339
+ }), A = {
336
340
  navButtonSlot: "",
337
341
  dropButtonSlot: "",
338
342
  editButtonSlot: "",
@@ -350,27 +354,27 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
350
354
  },
351
355
  emits: ["click"],
352
356
  setup(l, { emit: t }) {
353
- const s = t, n = l, r = p(() => R.dropButtonSlot !== ""), o = p(() => R.dropButtonSlot), h = p(() => n.text.startsWith("__:") ? J(n.text.substring(3)) : n.text);
354
- return (y, v) => {
355
- const a = M("lkt-button");
356
- return u(), b(a, {
357
+ const r = t, a = p(() => A.dropButtonSlot !== ""), s = p(() => A.dropButtonSlot);
358
+ return (o, v) => {
359
+ const E = R("lkt-button");
360
+ return u(), k(E, {
357
361
  palette: "table-delete",
358
- icon: r.value ? "" : y.icon,
359
- text: r.value ? "" : h.value,
360
- resource: y.resource,
361
- "resource-data": y.resourceData,
362
- "confirm-modal": y.confirm,
363
- disabled: y.disabled,
364
- onClick: v[0] || (v[0] = We((i) => s("click"), ["prevent", "stop"]))
362
+ icon: a.value ? "" : o.icon,
363
+ text: a.value ? "" : o.text,
364
+ resource: o.resource,
365
+ "resource-data": o.resourceData,
366
+ "confirm-modal": o.confirm,
367
+ disabled: o.disabled,
368
+ onClick: v[0] || (v[0] = Ke((y) => r("click"), ["prevent", "stop"]))
365
369
  }, {
366
- default: N(() => [
367
- r.value ? (u(), b(G(o.value), { key: 0 })) : k("", !0)
370
+ default: H(() => [
371
+ a.value ? (u(), k(J(s.value), { key: 0 })) : h("", !0)
368
372
  ]),
369
373
  _: 1
370
374
  }, 8, ["icon", "text", "resource", "resource-data", "confirm-modal", "disabled"]);
371
375
  };
372
376
  }
373
- }), Ot = /* @__PURE__ */ Q({
377
+ }), Nt = /* @__PURE__ */ Q({
374
378
  __name: "EditButton",
375
379
  props: {
376
380
  disabled: { type: Boolean, default: !1 },
@@ -383,35 +387,35 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
383
387
  },
384
388
  emits: ["click"],
385
389
  setup(l, { emit: t }) {
386
- const s = t, n = l, r = p(() => R.editButtonSlot !== ""), o = p(() => R.editButtonSlot), h = p(() => n.text.startsWith("__:") ? J(n.text.substring(3)) : n.text);
387
- return (y, v) => {
388
- const a = M("lkt-button");
389
- return u(), b(a, {
390
+ const r = t, a = p(() => A.editButtonSlot !== ""), s = p(() => A.editButtonSlot);
391
+ return (o, v) => {
392
+ const E = R("lkt-button");
393
+ return u(), k(E, {
390
394
  palette: "table-delete",
391
- icon: r.value ? "" : y.icon,
392
- text: r.value ? "" : h.value,
393
- "on-click-to": y.link,
394
- "is-anchor": y.link !== "",
395
- resource: y.resource,
396
- "resource-data": y.resourceData,
397
- "confirm-modal": y.confirm,
398
- disabled: y.disabled,
399
- onClick: v[0] || (v[0] = We((i) => s("click"), ["prevent", "stop"]))
395
+ icon: a.value ? "" : o.icon,
396
+ text: a.value ? "" : o.text,
397
+ "on-click-to": o.link,
398
+ "is-anchor": o.link !== "",
399
+ resource: o.resource,
400
+ "resource-data": o.resourceData,
401
+ "confirm-modal": o.confirm,
402
+ disabled: o.disabled,
403
+ onClick: v[0] || (v[0] = Ke((y) => r("click"), ["prevent", "stop"]))
400
404
  }, {
401
- default: N(() => [
402
- r.value ? (u(), b(G(o.value), { key: 0 })) : k("", !0)
405
+ default: H(() => [
406
+ a.value ? (u(), k(J(s.value), { key: 0 })) : h("", !0)
403
407
  ]),
404
408
  _: 1
405
409
  }, 8, ["icon", "text", "on-click-to", "is-anchor", "resource", "resource-data", "confirm-modal", "disabled"]);
406
410
  };
407
411
  }
408
- }), Nt = ["data-i", "data-draggable"], Pt = {
412
+ }), Pt = ["data-i", "data-draggable"], Ht = {
409
413
  key: 1,
410
414
  "data-role": "invalid-drag-indicator"
411
- }, Wt = {
415
+ }, Kt = {
412
416
  key: 2,
413
417
  class: "lkt-table-nav-cell"
414
- }, Ht = { class: "lkt-table-nav-container" }, Kt = ["data-column", "colspan", "title", "onClick"], qt = {
418
+ }, Ot = { class: "lkt-table-nav-container" }, Wt = ["data-column", "colspan", "title", "onClick"], qt = {
415
419
  key: 4,
416
420
  class: "lkt-table-col-drop"
417
421
  }, jt = {
@@ -443,27 +447,25 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
443
447
  },
444
448
  emits: ["update:modelValue", "click", "show", "item-up", "item-down", "item-drop"],
445
449
  setup(l, { emit: t }) {
446
- const s = t, n = l, r = C(n.modelValue), o = C(n.editLink);
447
- for (let d in r.value) o.value = He(o.value, ":" + d, r.value[d]);
448
- const h = (d, S, m) => {
449
- s("click", d, be("", { item: S, column: m }));
450
- }, y = (d, S) => {
451
- s("show", d, be("", { i: S }));
452
- }, v = p(() => {
450
+ const r = t, a = l, s = S(a.modelValue), o = S(a.editLink);
451
+ for (let d in s.value) o.value = Oe(o.value, ":" + d, s.value[d]);
452
+ const v = (d) => r("click", d), E = (d, V) => {
453
+ r("show", d, V);
454
+ }, y = p(() => {
453
455
  let d = [];
454
- return n.sortable && n.isDraggable && d.push("handle"), d.join(" ");
455
- }), a = p(() => R.navButtonSlot !== ""), i = p(() => R.navButtonSlot), j = () => {
456
- s("item-up", n.i);
457
- }, H = () => {
458
- s("item-down", n.i);
459
- }, U = () => {
460
- s("item-drop", n.i);
456
+ return a.sortable && a.isDraggable && d.push("handle"), d.join(" ");
457
+ }), n = p(() => A.navButtonSlot !== ""), i = p(() => A.navButtonSlot), z = () => {
458
+ r("item-up", a.i);
459
+ }, W = () => {
460
+ r("item-down", a.i);
461
+ }, N = () => {
462
+ r("item-drop", a.i);
461
463
  }, Y = () => {
462
464
  };
463
- return $(() => n.modelValue, (d) => r.value = d), $(r, (d) => {
464
- s("update:modelValue", d, n.i);
465
- }, { deep: !0 }), (d, S) => {
466
- const m = M("lkt-button");
465
+ return $(() => a.modelValue, (d) => s.value = d), $(s, (d) => {
466
+ r("update:modelValue", d, a.i);
467
+ }, { deep: !0 }), (d, V) => {
468
+ const m = R("lkt-button");
467
469
  return u(), c("tr", {
468
470
  "data-i": d.i,
469
471
  "data-draggable": d.isDraggable
@@ -471,22 +473,22 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
471
473
  d.sortable && d.isDraggable && d.editModeEnabled ? (u(), c("td", {
472
474
  key: 0,
473
475
  "data-role": "drag-indicator",
474
- class: _(v.value)
475
- }, null, 2)) : d.sortable && d.editModeEnabled ? (u(), c("td", Pt)) : k("", !0),
476
- d.addNavigation && d.editModeEnabled ? (u(), c("td", Wt, [
477
- T("div", Ht, [
476
+ class: _(y.value)
477
+ }, null, 2)) : d.sortable && d.editModeEnabled ? (u(), c("td", Ht)) : h("", !0),
478
+ d.addNavigation && d.editModeEnabled ? (u(), c("td", Kt, [
479
+ T("div", Ot, [
478
480
  x(m, {
479
481
  palette: "table-nav",
480
482
  disabled: d.i === 0,
481
- onClick: j
483
+ onClick: z
482
484
  }, {
483
- default: N(() => [
484
- a.value ? (u(), b(G(i.value), {
485
+ default: H(() => [
486
+ n.value ? (u(), k(J(i.value), {
485
487
  key: 0,
486
488
  direction: "up"
487
- })) : (u(), c(B, { key: 1 }, [
488
- S[2] || (S[2] = T("i", { class: "" }, null, -1)),
489
- S[3] || (S[3] = te(" UP "))
489
+ })) : (u(), c(I, { key: 1 }, [
490
+ V[2] || (V[2] = T("i", { class: "" }, null, -1)),
491
+ V[3] || (V[3] = te(" UP "))
490
492
  ], 64))
491
493
  ]),
492
494
  _: 1
@@ -494,72 +496,72 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
494
496
  x(m, {
495
497
  palette: "table-nav",
496
498
  disabled: d.latestRow,
497
- onClick: H
499
+ onClick: W
498
500
  }, {
499
- default: N(() => [
500
- a.value ? (u(), b(G(i.value), {
501
+ default: H(() => [
502
+ n.value ? (u(), k(J(i.value), {
501
503
  key: 0,
502
504
  direction: "down"
503
- })) : (u(), c(B, { key: 1 }, [
504
- S[4] || (S[4] = T("i", { class: "" }, null, -1)),
505
- S[5] || (S[5] = te(" DOWN "))
505
+ })) : (u(), c(I, { key: 1 }, [
506
+ V[4] || (V[4] = T("i", { class: "" }, null, -1)),
507
+ V[5] || (V[5] = te(" DOWN "))
506
508
  ], 64))
507
509
  ]),
508
510
  _: 1
509
511
  }, 8, ["disabled"])
510
512
  ])
511
- ])) : k("", !0),
513
+ ])) : h("", !0),
512
514
  d.displayHiddenColumnsIndicator ? (u(), c("td", {
513
515
  key: 3,
514
- onClick: S[0] || (S[0] = (E) => y(E, d.i)),
516
+ onClick: V[0] || (V[0] = (B) => E(B, d.i)),
515
517
  "data-role": "show-more",
516
518
  class: _(d.hiddenIsVisible ? "state-open" : "")
517
- }, null, 2)) : k("", !0),
518
- (u(!0), c(B, null, q(d.visibleColumns, (E) => (u(), c(B, null, [
519
- V($t)(E, d.emptyColumns, r.value) ? (u(), c("td", {
519
+ }, null, 2)) : h("", !0),
520
+ (u(!0), c(I, null, j(d.visibleColumns, (B) => (u(), c(I, null, [
521
+ b(At)(B, d.emptyColumns, s.value) ? (u(), c("td", {
520
522
  key: "td" + d.i,
521
- "data-column": E.key,
522
- colspan: V(ge)(E, r.value),
523
- title: V(ee)(E, r.value, d.i, d.visibleColumns),
524
- onClick: (le) => h(le, r.value, E)
523
+ "data-column": B.key,
524
+ colspan: b(ge)(B, s.value),
525
+ title: b(ee)(B, s.value, d.i, d.visibleColumns),
526
+ onClick: (le) => v(le, s.value)
525
527
  }, [
526
- d.$slots[E.key] && V(Rt)(E, r.value) ? O(d.$slots, E.key, {
528
+ d.$slots[B.key] && b(Rt)(B, s.value) ? P(d.$slots, B.key, {
527
529
  key: 0,
528
- value: r.value[E.key],
529
- item: r.value,
530
- column: E,
530
+ value: s.value[B.key],
531
+ item: s.value,
532
+ column: B,
531
533
  i: d.i
532
- }) : r.value ? (u(), b(Ke, {
534
+ }) : s.value ? (u(), k(We, {
533
535
  key: 1,
534
- modelValue: r.value,
535
- "onUpdate:modelValue": S[1] || (S[1] = (le) => r.value = le),
536
- column: E,
536
+ modelValue: s.value,
537
+ "onUpdate:modelValue": V[1] || (V[1] = (le) => s.value = le),
538
+ column: B,
537
539
  columns: d.visibleColumns,
538
540
  "edit-mode-enabled": d.editModeEnabled,
539
541
  i: d.i
540
- }, null, 8, ["modelValue", "column", "columns", "edit-mode-enabled", "i"])) : k("", !0)
541
- ], 8, Kt)) : k("", !0)
542
+ }, null, 8, ["modelValue", "column", "columns", "edit-mode-enabled", "i"])) : h("", !0)
543
+ ], 8, Wt)) : h("", !0)
542
544
  ], 64))), 256)),
543
545
  d.canDrop && d.editModeEnabled ? (u(), c("td", qt, [
544
546
  x(Ut, {
545
547
  resource: d.dropResource,
546
- "resource-data": r.value,
548
+ "resource-data": s.value,
547
549
  confirm: d.dropConfirm,
548
550
  text: d.dropText,
549
551
  icon: d.dropIcon,
550
- onClick: U
552
+ onClick: N
551
553
  }, null, 8, ["resource", "resource-data", "confirm", "text", "icon"])
552
- ])) : k("", !0),
554
+ ])) : h("", !0),
553
555
  d.canEdit && d.editModeEnabled ? (u(), c("td", jt, [
554
- x(Ot, {
555
- "resource-data": r.value,
556
+ x(Nt, {
557
+ "resource-data": s.value,
556
558
  text: d.editText,
557
559
  icon: d.editIcon,
558
560
  link: o.value,
559
561
  onClick: Y
560
562
  }, null, 8, ["resource-data", "text", "icon", "link"])
561
- ])) : k("", !0)
562
- ], 8, Nt);
563
+ ])) : h("", !0)
564
+ ], 8, Pt);
563
565
  };
564
566
  }
565
567
  }), Gt = { "data-role": "hidden-row" }, Jt = ["colspan"], Qt = ["data-column"], Xt = ["data-i"], Yt = ["data-column", "title", "onClick"], Zt = /* @__PURE__ */ Q({
@@ -577,48 +579,46 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
577
579
  },
578
580
  emits: ["update:modelValue", "click"],
579
581
  setup(l, { emit: t }) {
580
- const s = t, n = l, r = C(n.modelValue), o = (h, y, v) => {
581
- s("click", h, be("", { item: y, column: v }));
582
- };
583
- return $(() => n.modelValue, (h) => r.value = h), $(r, () => s("update:modelValue", r.value)), (h, y) => ae((u(), c("tr", Gt, [
584
- T("td", { colspan: h.hiddenColumnsColSpan }, [
582
+ const r = t, a = l, s = S(a.modelValue), o = (v) => r("click", v);
583
+ return $(() => a.modelValue, (v) => s.value = v), $(s, () => r("update:modelValue", s.value)), (v, E) => ae((u(), c("tr", Gt, [
584
+ T("td", { colspan: v.hiddenColumnsColSpan }, [
585
585
  T("table", null, [
586
586
  T("tr", null, [
587
- (u(!0), c(B, null, q(h.hiddenColumns, (v) => (u(), c("th", {
588
- "data-column": v.key
587
+ (u(!0), c(I, null, j(v.hiddenColumns, (y) => (u(), c("th", {
588
+ "data-column": y.key
589
589
  }, [
590
- T("div", null, z(v.label), 1)
590
+ T("div", null, G(y.label), 1)
591
591
  ], 8, Qt))), 256))
592
592
  ]),
593
- T("tr", { "data-i": h.i }, [
594
- (u(!0), c(B, null, q(h.hiddenColumns, (v, a) => (u(), c("td", {
595
- "data-column": v.key,
596
- title: V(ee)(v, r.value, a, h.hiddenColumns),
597
- onClick: (i) => o(i, r.value, v)
593
+ T("tr", { "data-i": v.i }, [
594
+ (u(!0), c(I, null, j(v.hiddenColumns, (y, n) => (u(), c("td", {
595
+ "data-column": y.key,
596
+ title: b(ee)(y, s.value, n, v.hiddenColumns),
597
+ onClick: (i) => o(i, s.value)
598
598
  }, [
599
- h.$slots[v.key] ? O(h.$slots, v.key, {
599
+ v.$slots[y.key] ? P(v.$slots, y.key, {
600
600
  key: 0,
601
- value: r.value[v.key],
602
- item: r.value,
603
- column: v,
604
- i: a
605
- }) : (u(), b(Ke, {
601
+ value: s.value[y.key],
602
+ item: s.value,
603
+ column: y,
604
+ i: n
605
+ }) : (u(), k(We, {
606
606
  key: 1,
607
- column: v,
608
- columns: h.hiddenColumns,
609
- modelValue: r.value,
610
- "onUpdate:modelValue": y[0] || (y[0] = (i) => r.value = i),
611
- i: a
607
+ column: y,
608
+ columns: v.hiddenColumns,
609
+ modelValue: s.value,
610
+ "onUpdate:modelValue": E[0] || (E[0] = (i) => s.value = i),
611
+ i: n
612
612
  }, null, 8, ["column", "columns", "modelValue", "i"]))
613
613
  ], 8, Yt))), 256))
614
614
  ], 8, Xt)
615
615
  ])
616
616
  ], 8, Jt)
617
617
  ], 512)), [
618
- [ne, h.hiddenIsVisible]
618
+ [ne, v.hiddenIsVisible]
619
619
  ]);
620
620
  }
621
- }), Pe = /* @__PURE__ */ Q({
621
+ }), He = /* @__PURE__ */ Q({
622
622
  __name: "CreateButton",
623
623
  props: {
624
624
  disabled: { type: Boolean, default: !1 },
@@ -628,19 +628,19 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
628
628
  },
629
629
  emits: ["click"],
630
630
  setup(l, { emit: t }) {
631
- const s = t, n = l, r = p(() => R.createButtonSlot !== ""), o = p(() => R.createButtonSlot), h = p(() => n.text.startsWith("__:") ? J(n.text.substring(3)) : n.text);
632
- return (y, v) => {
633
- const a = M("lkt-button");
634
- return u(), b(a, {
631
+ const r = t, a = p(() => A.createButtonSlot !== ""), s = p(() => A.createButtonSlot);
632
+ return (o, v) => {
633
+ const E = R("lkt-button");
634
+ return u(), k(E, {
635
635
  palette: "table-create",
636
- disabled: y.disabled,
637
- icon: r.value ? "" : y.icon,
638
- text: r.value ? "" : h.value,
639
- "on-click-to": y.to,
640
- onClick: v[0] || (v[0] = (i) => s("click"))
636
+ disabled: o.disabled,
637
+ icon: a.value ? "" : o.icon,
638
+ text: a.value ? "" : o.text,
639
+ "on-click-to": o.to,
640
+ onClick: v[0] || (v[0] = (y) => r("click"))
641
641
  }, {
642
- default: N(() => [
643
- r.value ? (u(), b(G(o.value), { key: 0 })) : k("", !0)
642
+ default: H(() => [
643
+ a.value ? (u(), k(J(s.value), { key: 0 })) : h("", !0)
644
644
  ]),
645
645
  _: 1
646
646
  }, 8, ["disabled", "icon", "text", "on-click-to"]);
@@ -657,18 +657,16 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
657
657
  },
658
658
  emits: ["click"],
659
659
  setup(l, { emit: t }) {
660
- const s = t, n = l, r = p(() => Mt(n.column, n.amountOfColumns, n.items)), o = p(() => n.column.sortable === !0), h = p(() => o.value && n.sortBy === n.column.key ? n.sortDirection : ""), y = p(() => n.column.label.startsWith("__:") ? J(n.column.label.substring(3)) : n.column.label), v = () => {
661
- s("click", n.column);
662
- };
663
- return (a, i) => (u(), c("th", {
664
- "data-column": a.column.key,
660
+ const r = t, a = l, s = p(() => Mt(a.column, a.amountOfColumns, a.items)), o = p(() => a.column.sortable === !0), v = p(() => o.value && a.sortBy === a.column.key ? a.sortDirection : ""), E = p(() => a.column.label.startsWith("__:") ? ue(a.column.label.substring(3)) : a.column.label), y = () => r("click", a.column);
661
+ return (n, i) => (u(), c("th", {
662
+ "data-column": n.column.key,
665
663
  "data-sortable": o.value,
666
- "data-sort": h.value,
667
- colspan: r.value,
668
- title: y.value,
669
- onClick: v
664
+ "data-sort": v.value,
665
+ colspan: s.value,
666
+ title: E.value,
667
+ onClick: y
670
668
  }, [
671
- T("div", null, z(y.value), 1)
669
+ T("div", null, G(E.value), 1)
672
670
  ], 8, _t));
673
671
  }
674
672
  }), el = ["id"], tl = { class: "lkt-table-page-buttons" }, ll = { key: 1 }, ol = { class: "switch-edition-mode" }, al = {
@@ -677,16 +675,16 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
677
675
  }, nl = {
678
676
  key: 1,
679
677
  class: "lkt-table-page-filters"
680
- }, ul = ["data-sortable"], rl = { key: 0 }, il = {
678
+ }, ul = ["data-sortable"], il = { key: 0 }, rl = {
681
679
  key: 0,
682
680
  "data-role": "drag-indicator"
683
681
  }, sl = { key: 1 }, dl = { key: 2 }, ml = {
684
682
  key: 3,
685
683
  class: "lkt-table-col-drop"
686
- }, fl = {
684
+ }, cl = {
687
685
  key: 4,
688
686
  class: "lkt-table-col-edit"
689
- }, cl = ["id"], pl = {
687
+ }, fl = ["id"], pl = {
690
688
  key: 0,
691
689
  class: "lkt-table-item"
692
690
  }, vl = {
@@ -695,12 +693,12 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
695
693
  }, hl = {
696
694
  key: 4,
697
695
  class: "lkt-table-page-buttons lkt-table-page-buttons-bottom"
698
- }, yl = /* @__PURE__ */ Q({
696
+ }, kl = /* @__PURE__ */ Q({
699
697
  __name: "LktTable",
700
698
  props: {
701
699
  modelValue: { default: () => [] },
702
700
  columns: { default: () => [] },
703
- sorter: { type: Function, default: Ne },
701
+ sorter: { type: Function, default: Pe },
704
702
  draggableChecker: { type: Function, default: (l) => !0 },
705
703
  checkValidDrag: { type: Function, default: void 0 },
706
704
  sortable: { type: Boolean, default: !1 },
@@ -756,38 +754,38 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
756
754
  slotItemVar: { default: "item" }
757
755
  },
758
756
  emits: ["update:modelValue", "update:perms", "sort", "click", "save", "error", "before-save", "read-response", "click-create"],
759
- setup(l, { expose: t, emit: s }) {
760
- const n = s, r = yt(), o = l, h = {}, y = C(typeof o.sorter == "function" ? o.sorter : Ne), v = C(At(o.columns)), a = C("asc"), i = C(o.modelValue), j = C(h), H = C(null), U = C(o.columns), Y = C(o.page), d = C(!1), S = C(!1), m = C(o.perms), E = C(null), le = C({}), Z = C(new Ct({ items: i.value }, o.dataStateConfig)), w = C(o.editMode), oe = C(0), qe = (e) => {
761
- Array.isArray(e) && (i.value = e), d.value = !1, S.value = !0, Z.value.store({ items: i.value }).turnStoredIntoOriginal();
757
+ setup(l, { expose: t, emit: r }) {
758
+ const a = r, s = kt(), o = l, v = {}, E = S(typeof o.sorter == "function" ? o.sorter : Pe), y = S($t(o.columns)), n = S("asc"), i = S(o.modelValue), z = S(v), W = S(null), N = S(o.columns), Y = S(o.page), d = S(!1), V = S(!1), m = S(o.perms), B = S(null), le = S({}), Z = S(new St({ items: i.value }, o.dataStateConfig)), L = S(o.editMode), oe = S(0), qe = (e) => {
759
+ Array.isArray(e) && (i.value = e), d.value = !1, V.value = !0, Z.value.store({ items: i.value }).turnStoredIntoOriginal();
762
760
  }, je = (e) => {
763
761
  m.value = e;
764
762
  }, ze = (e) => {
765
763
  }, Ge = (e) => {
766
- n("read-response", e);
767
- }, Je = () => ke(() => d.value = !0), Qe = () => {
768
- E.value.doRefresh();
769
- }, ue = gt(12), me = p(() => {
764
+ a("read-response", e);
765
+ }, Je = () => be(() => d.value = !0), Qe = () => {
766
+ B.value.doRefresh();
767
+ }, ie = gt(12), ce = p(() => {
770
768
  if (!o.hideEmptyColumns) return [];
771
769
  let e = [];
772
- return U.value.forEach((f) => {
773
- let g = f.key, I = !1;
774
- i.value.forEach((L) => {
775
- if (typeof L.checkEmpty == "function")
776
- return L.checkEmpty(L);
777
- L[g] && (I = !0);
778
- }), I || e.push(g);
770
+ return N.value.forEach((f) => {
771
+ let g = f.key, w = !1;
772
+ i.value.forEach((M) => {
773
+ if (typeof M.checkEmpty == "function")
774
+ return M.checkEmpty(M);
775
+ M[g] && (w = !0);
776
+ }), w || e.push(g);
779
777
  }), e;
780
- }), re = p(() => U.value.filter((e) => !e.hidden)), fe = p(() => U.value.filter((e) => e.hidden)), Xe = p(() => {
778
+ }), re = p(() => N.value.filter((e) => !e.hidden)), fe = p(() => N.value.filter((e) => e.hidden)), Xe = p(() => {
781
779
  let e = re.value.length + 1;
782
780
  return o.sortable && ++e, e;
783
- }), Ye = p(() => U.value.filter((e) => e.isForRowKey)), Ce = p(() => fe.value.length > 0 && !o.sortable), Ze = p(() => U.value.map((e) => e.key)), Se = p(() => {
781
+ }), Ye = p(() => N.value.filter((e) => e.isForRowKey)), Se = p(() => fe.value.length > 0 && !o.sortable), Ze = p(() => N.value.map((e) => e.key)), Ce = p(() => {
784
782
  let e = [];
785
- for (let f in r) Ze.value.indexOf(f) !== -1 && e.push(f);
783
+ for (let f in s) Ze.value.indexOf(f) !== -1 && e.push(f);
786
784
  return e;
787
- }), Ve = p(() => o.hiddenSave || d.value || !o.saveResource ? !1 : w.value && Z.value.changed() ? !0 : w.value), _e = p(() => ie.value && i.value.length >= o.requiredItemsForTopCreate || o.switchEditionEnabled ? !0 : Ve.value || w.value && o.canCreate), xe = p(() => o.saveDisabled || typeof o.saveValidator == "function" && !o.saveValidator(i.value) ? !1 : Z.value.changed()), et = p(() => i.value.length), tt = p(() => ({
785
+ }), Ve = p(() => o.hiddenSave || d.value || !o.saveResource ? !1 : L.value && Z.value.changed() ? !0 : L.value), _e = p(() => se.value && i.value.length >= o.requiredItemsForTopCreate || o.switchEditionEnabled ? !0 : Ve.value || L.value && o.canCreate), xe = p(() => o.saveDisabled || typeof o.saveValidator == "function" && !o.saveValidator(i.value) ? !1 : Z.value.changed()), et = p(() => i.value.length), tt = p(() => ({
788
786
  items: i.value,
789
787
  ...o.saveResourceData
790
- })), lt = p(() => o.titleTag === "" ? "h2" : o.titleTag), ot = p(() => o.wrapContentTag === "" ? "div" : o.wrapContentTag), ce = p(() => o.title.startsWith("__:") ? J(o.title.substring(3)) : o.title), at = p(() => o.saveText.startsWith("__:") ? J(o.saveText.substring(3)) : o.saveText), nt = p(() => o.editModeText.startsWith("__:") ? J(o.editModeText.substring(3)) : o.editModeText), Ee = p(() => m.value.includes("create")), ut = p(() => m.value.includes("read")), pe = p(() => m.value.includes("update")), ve = p(() => m.value.includes("drop")), rt = (e) => {
788
+ })), lt = p(() => o.titleTag === "" ? "h2" : o.titleTag), ot = p(() => o.wrapContentTag === "" ? "div" : o.wrapContentTag), pe = p(() => o.title.startsWith("__:") ? ue(o.title.substring(3)) : o.title), at = p(() => o.saveText.startsWith("__:") ? ue(o.saveText.substring(3)) : o.saveText), nt = p(() => o.editModeText.startsWith("__:") ? ue(o.editModeText.substring(3)) : o.editModeText), Ee = p(() => m.value.includes("create")), ut = p(() => m.value.includes("read")), ve = p(() => m.value.includes("update")), he = p(() => m.value.includes("drop")), it = (e) => {
791
789
  let f = e.target;
792
790
  if (typeof f.dataset.column > "u")
793
791
  do
@@ -795,29 +793,29 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
795
793
  while (typeof f.dataset.column > "u" && f.tagName !== "TABLE" && f.tagName !== "body");
796
794
  if (f.tagName === "TD" && (f = f.parentNode, f = f.dataset.i, typeof f < "u"))
797
795
  return i.value[f];
798
- }, De = (e) => j.value["tr_" + e] === !0, Be = (e) => {
799
- e && e.sortable && (i.value = i.value.sort((f, g) => y.value(f, g, e, a.value)), a.value = a.value === "asc" ? "desc" : "asc", v.value = e.key, n("sort", [v.value, a.value]));
800
- }, Ie = (e, f) => {
801
- n("click", e, f);
802
- }, Te = (e, f) => {
803
- let g = "tr_" + f.value.i;
804
- j.value[g] = typeof j.value[g] > "u" ? !0 : !j.value[g];
805
- }, we = () => {
806
- U.value.forEach((e) => {
796
+ }, De = (e) => z.value["tr_" + e] === !0, Ie = (e) => {
797
+ e && e.sortable && (i.value = i.value.sort((f, g) => E.value(f, g, e, n.value)), n.value = n.value === "asc" ? "desc" : "asc", y.value = e.key, a("sort", [y.value, n.value]));
798
+ }, Be = (e) => {
799
+ a("click", e);
800
+ }, we = (e, f) => {
801
+ let g = "tr_" + f;
802
+ z.value[g] = typeof z.value[g] > "u" ? !0 : !z.value[g];
803
+ }, Te = () => {
804
+ N.value.forEach((e) => {
807
805
  if (e.type === "select" && e.autoLoadSelectOptions) {
808
806
  let f = e.autoLoadSelectOptionsKey !== "" ? e.autoLoadSelectOptionsKey : e.key, g = [];
809
- i.value.forEach((L) => {
810
- Array.isArray(L[f]) && L[f].forEach((P) => g.push(P));
807
+ i.value.forEach((M) => {
808
+ Array.isArray(M[f]) && M[f].forEach((K) => g.push(K));
811
809
  });
812
- let I = {};
813
- g = g.filter(function(L) {
814
- return I[L.value] ? !1 : (I[L.value] = !0, !0);
810
+ let w = {};
811
+ g = g.filter(function(M) {
812
+ return w[M.value] ? !1 : (w[M.value] = !0, !0);
815
813
  }), e.setOptions(g);
816
814
  }
817
815
  });
818
- }, it = (e) => typeof o.checkValidDrag == "function" ? o.checkValidDrag(e) : !0, Le = (e) => typeof o.draggableChecker == "function" ? o.draggableChecker(e) : !0, Me = () => {
816
+ }, rt = (e) => typeof o.checkValidDrag == "function" ? o.checkValidDrag(e) : !0, Le = (e) => typeof o.draggableChecker == "function" ? o.draggableChecker(e) : !0, Me = () => {
819
817
  if (o.canCreateWithoutEdition)
820
- n("click-create");
818
+ a("click-create");
821
819
  else {
822
820
  if (typeof o.newValueGenerator == "function") {
823
821
  let e = o.newValueGenerator();
@@ -833,81 +831,81 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
833
831
  }, dt = () => {
834
832
  d.value = !1;
835
833
  }, mt = (e, f) => {
836
- if (n("before-save"), o.saveResource && (d.value = !1, !f.success)) {
837
- n("error", f.httpStatus);
834
+ if (a("before-save"), o.saveResource && (d.value = !1, !f.success)) {
835
+ a("error", f.httpStatus);
838
836
  return;
839
837
  }
840
- Z.value.turnStoredIntoOriginal(), n("save", f);
838
+ Z.value.turnStoredIntoOriginal(), a("save", f);
841
839
  }, Re = (e, f, g) => {
842
840
  if (g >= e.length) {
843
- let I = g - e.length + 1;
844
- for (; I--; ) e.push(void 0);
841
+ let w = g - e.length + 1;
842
+ for (; w--; ) e.push(void 0);
845
843
  }
846
844
  return e.splice(g, 0, e.splice(f, 1)[0]), e;
847
- }, ft = (e) => {
848
- Re(i.value, e, e - 1), oe.value = de();
849
845
  }, ct = (e) => {
850
- Re(i.value, e, e + 1), oe.value = de();
851
- }, $e = (e) => {
852
- i.value.splice(e, 1), oe.value = de();
846
+ Re(i.value, e, e - 1), oe.value = me();
847
+ }, ft = (e) => {
848
+ Re(i.value, e, e + 1), oe.value = me();
849
+ }, Ae = (e) => {
850
+ i.value.splice(e, 1), oe.value = me();
853
851
  }, pt = () => {
854
- let e = document.getElementById("lkt-table-body-" + ue);
855
- le.value = new St(e, {
852
+ let e = document.getElementById("lkt-table-body-" + ie);
853
+ le.value = new Ct(e, {
856
854
  direction: "vertical",
857
855
  handle: ".handle",
858
856
  animation: 150,
859
857
  onEnd: function(f) {
860
- let g = f.oldIndex, I = f.newIndex;
861
- i.value.splice(I, 0, i.value.splice(g, 1)[0]), oe.value = de();
858
+ let g = f.oldIndex, w = f.newIndex;
859
+ i.value.splice(w, 0, i.value.splice(g, 1)[0]), oe.value = me();
862
860
  },
863
861
  onMove: function(f, g) {
864
- return it(f);
862
+ return rt(f);
865
863
  }
866
864
  });
867
- }, Ae = (e, f, g = !1) => {
868
- let I = [oe.value, ue, "row", f];
869
- return g && I.push("hidden"), Ye.value.forEach((L) => {
870
- let P = String(e[L.key]).toLowerCase();
871
- P.length > 50 && (P = P.substring(0, 50)), P = He(P, " ", "-"), I.push(P);
872
- }), I.join("-");
873
- }, Fe = p(() => typeof o.createEnabledValidator == "function" ? o.createEnabledValidator({ items: i.value }) : !0), ie = p(() => Ee.value ? o.canCreateWithoutEdition || o.canCreate && w.value : !1), Ue = (e) => typeof o.itemDisplayChecker == "function" ? o.itemDisplayChecker(e) : !0;
874
- kt(() => {
875
- we(), o.initialSorting && Be(Ft(o.columns, v.value)), Z.value.store({ items: i.value }).turnStoredIntoOriginal(), o.sortable && ke(() => {
865
+ }, $e = (e, f, g = !1) => {
866
+ let w = [oe.value, ie, "row", f];
867
+ return g && w.push("hidden"), Ye.value.forEach((M) => {
868
+ let K = String(e[M.key]).toLowerCase();
869
+ K.length > 50 && (K = K.substring(0, 50)), K = Oe(K, " ", "-"), w.push(K);
870
+ }), w.join("-");
871
+ }, Fe = p(() => typeof o.createEnabledValidator == "function" ? o.createEnabledValidator({ items: i.value }) : !0), se = p(() => Ee.value ? o.canCreateWithoutEdition || o.canCreate && L.value : !1), Ue = (e) => typeof o.itemDisplayChecker == "function" ? o.itemDisplayChecker(e) : !0;
872
+ yt(() => {
873
+ Te(), o.initialSorting && Ie(Ft(o.columns, y.value)), Z.value.store({ items: i.value }).turnStoredIntoOriginal(), o.sortable && be(() => {
876
874
  pt();
877
875
  });
878
- }), $(() => o.perms, (e) => m.value = e), $(m, (e) => n("update:perms", e)), $(() => o.editMode, (e) => w.value = e), $(() => o.columns, (e) => U.value = e), $(() => o.modelValue, (e) => i.value = e), $(i, (e) => {
879
- we(), Z.value.increment({ items: e }), n("update:modelValue", e);
876
+ }), $(() => o.perms, (e) => m.value = e), $(m, (e) => a("update:perms", e)), $(() => o.editMode, (e) => L.value = e), $(() => o.columns, (e) => N.value = e), $(() => o.modelValue, (e) => i.value = e), $(i, (e) => {
877
+ Te(), Z.value.increment({ items: e }), a("update:modelValue", e);
880
878
  }, { deep: !0 }), t({
881
- getItemByEvent: rt,
879
+ getItemByEvent: it,
882
880
  doRefresh: Qe
883
881
  });
884
- const vt = p(() => typeof R.defaultEmptySlot < "u"), ht = p(() => R.defaultEmptySlot);
882
+ const vt = p(() => typeof A.defaultEmptySlot < "u"), ht = p(() => A.defaultEmptySlot);
885
883
  return (e, f) => {
886
- const g = M("lkt-button"), I = M("lkt-field-switch"), L = M("lkt-loader"), P = M("lkt-paginator");
884
+ const g = R("lkt-button"), w = R("lkt-field-switch"), M = R("lkt-loader"), K = R("lkt-paginator");
887
885
  return u(), c("section", {
888
886
  class: "lkt-table-page",
889
- id: "lkt-table-page-" + V(ue)
887
+ id: "lkt-table-page-" + b(ie)
890
888
  }, [
891
- ce.value || V(r).title ? (u(), c("header", {
889
+ pe.value || b(s).title ? (u(), c("header", {
892
890
  key: 0,
893
891
  class: _(e.headerClass)
894
892
  }, [
895
- ce.value ? (u(), b(G(lt.value), { key: 0 }, {
896
- default: N(() => [
893
+ pe.value ? (u(), k(J(lt.value), { key: 0 }, {
894
+ default: H(() => [
897
895
  e.titleIcon ? (u(), c("i", {
898
896
  key: 0,
899
897
  class: _(e.titleIcon)
900
- }, null, 2)) : k("", !0),
901
- te(" " + z(ce.value), 1)
898
+ }, null, 2)) : h("", !0),
899
+ te(" " + G(pe.value), 1)
902
900
  ]),
903
901
  _: 1
904
- })) : k("", !0),
905
- V(r).title ? O(e.$slots, "title", { key: 1 }) : k("", !0)
906
- ], 2)) : k("", !0),
907
- (u(), b(G(ot.value), {
902
+ })) : h("", !0),
903
+ b(s).title ? P(e.$slots, "title", { key: 1 }) : h("", !0)
904
+ ], 2)) : h("", !0),
905
+ (u(), k(J(ot.value), {
908
906
  class: _(["lkt-table-page-content-wrapper", e.wrapContentClass])
909
907
  }, {
910
- default: N(() => [
908
+ default: H(() => [
911
909
  ae(T("div", tl, [
912
910
  ae(x(g, {
913
911
  ref: "saveButton",
@@ -921,30 +919,30 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
921
919
  onLoaded: dt,
922
920
  onClick: mt
923
921
  }, {
924
- default: N(() => [
925
- V(r)["button-save"] ? O(e.$slots, "button-save", {
922
+ default: H(() => [
923
+ b(s)["button-save"] ? P(e.$slots, "button-save", {
926
924
  key: 0,
927
925
  items: i.value,
928
926
  editMode: e.editMode,
929
927
  canUpdate: !e.saveDisabled
930
- }) : (u(), c("span", ll, z(at.value), 1))
928
+ }) : (u(), c("span", ll, G(at.value), 1))
931
929
  ]),
932
930
  _: 3
933
931
  }, 8, ["disabled", "confirm-modal", "confirm-data", "resource", "resource-data"]), [
934
932
  [ne, Ve.value]
935
933
  ]),
936
- ie.value && i.value.length >= e.requiredItemsForTopCreate ? (u(), b(Pe, {
934
+ se.value && i.value.length >= e.requiredItemsForTopCreate ? (u(), k(He, {
937
935
  key: 0,
938
936
  disabled: !Fe.value || e.createDisabled,
939
937
  text: e.createText,
940
938
  icon: e.createIcon,
941
939
  to: e.createRoute,
942
940
  onClick: Me
943
- }, null, 8, ["disabled", "text", "icon", "to"])) : k("", !0),
941
+ }, null, 8, ["disabled", "text", "icon", "to"])) : h("", !0),
944
942
  T("div", ol, [
945
- ae(x(I, {
946
- modelValue: w.value,
947
- "onUpdate:modelValue": f[0] || (f[0] = (D) => w.value = D),
943
+ ae(x(w, {
944
+ modelValue: L.value,
945
+ "onUpdate:modelValue": f[0] || (f[0] = (D) => L.value = D),
948
946
  label: nt.value
949
947
  }, null, 8, ["modelValue", "label"]), [
950
948
  [ne, e.switchEditionEnabled]
@@ -953,16 +951,16 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
953
951
  ], 512), [
954
952
  [ne, _e.value]
955
953
  ]),
956
- V(r).buttons ? (u(), c("div", al, [
957
- O(e.$slots, "buttons")
958
- ])) : k("", !0),
959
- S.value && V(r).filters ? (u(), c("div", nl, [
960
- O(e.$slots, "filters", {
954
+ b(s).buttons ? (u(), c("div", al, [
955
+ P(e.$slots, "buttons")
956
+ ])) : h("", !0),
957
+ V.value && b(s).filters ? (u(), c("div", nl, [
958
+ P(e.$slots, "filters", {
961
959
  items: i.value,
962
960
  isLoading: d.value
963
961
  })
964
- ])) : k("", !0),
965
- d.value ? (u(), b(L, { key: 2 })) : k("", !0),
962
+ ])) : h("", !0),
963
+ d.value ? (u(), k(M, { key: 2 })) : h("", !0),
966
964
  ae(T("div", {
967
965
  class: "lkt-table",
968
966
  "data-sortable": e.sortable
@@ -971,141 +969,141 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
971
969
  key: 1,
972
970
  class: _(["lkt-table-items-container", e.itemsContainerClass])
973
971
  }, [
974
- (u(!0), c(B, null, q(i.value, (D, W) => (u(), c(B, null, [
972
+ (u(!0), c(I, null, j(i.value, (D, O) => (u(), c(I, null, [
975
973
  Ue(D) ? (u(), c("div", pl, [
976
- O(e.$slots, "item", ye({
974
+ P(e.$slots, "item", ye({
977
975
  [e.slotItemVar || ""]: D,
978
- index: W,
976
+ index: O,
979
977
  canCreate: Ee.value,
980
978
  canRead: ut.value,
981
- canUpdate: pe.value,
982
- canDrop: ve.value,
979
+ canUpdate: ve.value,
980
+ canDrop: he.value,
983
981
  isLoading: d.value,
984
- doDrop: () => $e(W)
982
+ doDrop: () => Ae(O)
985
983
  }))
986
- ])) : k("", !0)
984
+ ])) : h("", !0)
987
985
  ], 64))), 256))
988
- ], 2)) : (u(), c("table", rl, [
986
+ ], 2)) : (u(), c("table", il, [
989
987
  T("thead", null, [
990
988
  T("tr", null, [
991
- e.sortable && w.value ? (u(), c("th", il)) : k("", !0),
992
- e.addNavigation && w.value ? (u(), c("th", sl)) : k("", !0),
993
- Ce.value ? (u(), c("th", dl)) : k("", !0),
994
- (u(!0), c(B, null, q(re.value, (D) => (u(), c(B, null, [
995
- me.value.indexOf(D.key) === -1 ? (u(), b(xt, {
989
+ e.sortable && L.value ? (u(), c("th", rl)) : h("", !0),
990
+ e.addNavigation && L.value ? (u(), c("th", sl)) : h("", !0),
991
+ Se.value ? (u(), c("th", dl)) : h("", !0),
992
+ (u(!0), c(I, null, j(re.value, (D) => (u(), c(I, null, [
993
+ ce.value.indexOf(D.key) === -1 ? (u(), k(xt, {
996
994
  key: 0,
997
995
  column: D,
998
- "sort-by": v.value,
999
- "sort-direction": a.value,
996
+ "sort-by": y.value,
997
+ "sort-direction": n.value,
1000
998
  "amount-of-columns": e.columns.length,
1001
999
  items: i.value,
1002
- onClick: (W) => Be(D)
1003
- }, null, 8, ["column", "sort-by", "sort-direction", "amount-of-columns", "items", "onClick"])) : k("", !0)
1000
+ onClick: (O) => Ie(D)
1001
+ }, null, 8, ["column", "sort-by", "sort-direction", "amount-of-columns", "items", "onClick"])) : h("", !0)
1004
1002
  ], 64))), 256)),
1005
- e.canDrop && ve.value && w.value ? (u(), c("th", ml)) : k("", !0),
1006
- e.canEditButton && pe.value && w.value ? (u(), c("th", fl)) : k("", !0)
1003
+ e.canDrop && he.value && L.value ? (u(), c("th", ml)) : h("", !0),
1004
+ e.canEditButton && ve.value && L.value ? (u(), c("th", cl)) : h("", !0)
1007
1005
  ])
1008
1006
  ]),
1009
1007
  T("tbody", {
1010
- ref: (D) => H.value = D,
1011
- id: "lkt-table-body-" + V(ue)
1008
+ ref: (D) => W.value = D,
1009
+ id: "lkt-table-body-" + b(ie)
1012
1010
  }, [
1013
- (u(!0), c(B, null, q(i.value, (D, W) => (u(), c(B, null, [
1014
- Ue(D) ? (u(), b(zt, {
1015
- modelValue: i.value[W],
1016
- "onUpdate:modelValue": (X) => i.value[W] = X,
1017
- key: Ae(D, W),
1018
- i: W,
1019
- "display-hidden-columns-indicator": Ce.value,
1011
+ (u(!0), c(I, null, j(i.value, (D, O) => (u(), c(I, null, [
1012
+ Ue(D) ? (u(), k(zt, {
1013
+ modelValue: i.value[O],
1014
+ "onUpdate:modelValue": (X) => i.value[O] = X,
1015
+ key: $e(D, O),
1016
+ i: O,
1017
+ "display-hidden-columns-indicator": Se.value,
1020
1018
  "is-draggable": Le(D),
1021
1019
  sortable: e.sortable,
1022
1020
  "visible-columns": re.value,
1023
- "empty-columns": me.value,
1021
+ "empty-columns": ce.value,
1024
1022
  "add-navigation": e.addNavigation,
1025
- "hidden-is-visible": De(W),
1026
- "latest-row": W + 1 === et.value,
1027
- "can-drop": e.canDrop && ve.value && w.value,
1023
+ "hidden-is-visible": De(O),
1024
+ "latest-row": O + 1 === et.value,
1025
+ "can-drop": e.canDrop && he.value && L.value,
1028
1026
  "drop-confirm": e.dropConfirm,
1029
1027
  "drop-resource": e.dropResource,
1030
1028
  "drop-text": e.dropText,
1031
1029
  "drop-icon": e.dropIcon,
1032
- "can-edit": e.canEditButton && pe.value && w.value,
1030
+ "can-edit": e.canEditButton && ve.value && L.value,
1033
1031
  "edit-text": e.editText,
1034
1032
  "edit-icon": e.editIcon,
1035
1033
  "edit-link": e.editLink,
1036
- "edit-mode-enabled": w.value,
1037
- onClick: Ie,
1038
- onShow: Te,
1039
- onItemUp: ft,
1040
- onItemDown: ct,
1041
- onItemDrop: $e
1042
- }, Oe({ _: 2 }, [
1043
- q(Se.value, (X) => ({
1034
+ "edit-mode-enabled": L.value,
1035
+ onClick: Be,
1036
+ onShow: we,
1037
+ onItemUp: ct,
1038
+ onItemDown: ft,
1039
+ onItemDrop: Ae
1040
+ }, Ne({ _: 2 }, [
1041
+ j(Ce.value, (X) => ({
1044
1042
  name: X,
1045
- fn: N((K) => [
1046
- O(e.$slots, X, ye({
1047
- [e.slotItemVar || ""]: K.item,
1048
- value: K.value,
1049
- column: K.column
1043
+ fn: H((q) => [
1044
+ P(e.$slots, X, ye({
1045
+ [e.slotItemVar || ""]: q.item,
1046
+ value: q.value,
1047
+ column: q.column
1050
1048
  }))
1051
1049
  ])
1052
1050
  }))
1053
- ]), 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"])) : k("", !0),
1054
- fe.value.length > 0 ? (u(!0), c(B, { key: 1 }, q(i.value, (X, K) => (u(), b(Zt, {
1055
- modelValue: i.value[K],
1056
- "onUpdate:modelValue": (se) => i.value[K] = se,
1057
- key: Ae(X, K, !0),
1058
- i: K,
1051
+ ]), 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"])) : h("", !0),
1052
+ fe.value.length > 0 ? (u(!0), c(I, { key: 1 }, j(i.value, (X, q) => (u(), k(Zt, {
1053
+ modelValue: i.value[q],
1054
+ "onUpdate:modelValue": (de) => i.value[q] = de,
1055
+ key: $e(X, q, !0),
1056
+ i: q,
1059
1057
  "hidden-columns": fe.value,
1060
1058
  "hidden-columns-col-span": Xe.value,
1061
1059
  "is-draggable": Le(X),
1062
1060
  sortable: e.sortable,
1063
1061
  "visible-columns": re.value,
1064
- "empty-columns": me.value,
1065
- "hidden-is-visible": De(K),
1066
- onClick: Ie,
1067
- onShow: Te
1068
- }, Oe({ _: 2 }, [
1069
- q(Se.value, (se) => ({
1070
- name: se,
1071
- fn: N((he) => [
1072
- O(e.$slots, se, ye({
1073
- [e.slotItemVar || ""]: he.item,
1074
- value: he.value,
1075
- column: he.column
1062
+ "empty-columns": ce.value,
1063
+ "hidden-is-visible": De(q),
1064
+ onClick: Be,
1065
+ onShow: we
1066
+ }, Ne({ _: 2 }, [
1067
+ j(Ce.value, (de) => ({
1068
+ name: de,
1069
+ fn: H((ke) => [
1070
+ P(e.$slots, de, ye({
1071
+ [e.slotItemVar || ""]: ke.item,
1072
+ value: ke.value,
1073
+ column: ke.column
1076
1074
  }))
1077
1075
  ])
1078
1076
  }))
1079
- ]), 1032, ["modelValue", "onUpdate:modelValue", "i", "hidden-columns", "hidden-columns-col-span", "is-draggable", "sortable", "visible-columns", "empty-columns", "hidden-is-visible"]))), 128)) : k("", !0)
1077
+ ]), 1032, ["modelValue", "onUpdate:modelValue", "i", "hidden-columns", "hidden-columns-col-span", "is-draggable", "sortable", "visible-columns", "empty-columns", "hidden-is-visible"]))), 128)) : h("", !0)
1080
1078
  ], 64))), 256))
1081
- ], 8, cl)
1079
+ ], 8, fl)
1082
1080
  ]))
1083
1081
  ], 8, ul), [
1084
1082
  [ne, !d.value && i.value.length > 0]
1085
1083
  ]),
1086
1084
  !d.value && i.value.length === 0 ? (u(), c("div", vl, [
1087
- V(r).empty ? O(e.$slots, "empty", { key: 0 }) : vt.value ? (u(), b(G(ht.value), {
1085
+ b(s).empty ? P(e.$slots, "empty", { key: 0 }) : vt.value ? (u(), k(J(ht.value), {
1088
1086
  key: 1,
1089
1087
  message: e.noResultsText
1090
- }, null, 8, ["message"])) : e.noResultsText ? (u(), c(B, { key: 2 }, [
1091
- te(z(e.noResultsText), 1)
1092
- ], 64)) : k("", !0)
1093
- ])) : k("", !0),
1094
- ie.value || V(r).bottomButtons ? (u(), c("div", hl, [
1095
- ie.value && i.value.length >= e.requiredItemsForBottomCreate ? (u(), b(Pe, {
1088
+ }, null, 8, ["message"])) : e.noResultsText ? (u(), c(I, { key: 2 }, [
1089
+ te(G(e.noResultsText), 1)
1090
+ ], 64)) : h("", !0)
1091
+ ])) : h("", !0),
1092
+ se.value || b(s).bottomButtons ? (u(), c("div", hl, [
1093
+ se.value && i.value.length >= e.requiredItemsForBottomCreate ? (u(), k(He, {
1096
1094
  key: 0,
1097
1095
  disabled: !Fe.value || e.createDisabled,
1098
1096
  text: e.createText,
1099
1097
  icon: e.createIcon,
1100
1098
  to: e.createRoute,
1101
1099
  onClick: Me
1102
- }, null, 8, ["disabled", "text", "icon", "to"])) : k("", !0),
1103
- O(e.$slots, "bottom-buttons")
1104
- ])) : k("", !0),
1105
- e.resource.length > 0 ? (u(), b(P, {
1100
+ }, null, 8, ["disabled", "text", "icon", "to"])) : h("", !0),
1101
+ P(e.$slots, "bottom-buttons")
1102
+ ])) : h("", !0),
1103
+ e.resource.length > 0 ? (u(), k(K, {
1106
1104
  key: 5,
1107
1105
  ref_key: "paginator",
1108
- ref: E,
1106
+ ref: B,
1109
1107
  modelValue: Y.value,
1110
1108
  "onUpdate:modelValue": f[1] || (f[1] = (D) => Y.value = D),
1111
1109
  resource: e.resource,
@@ -1115,38 +1113,38 @@ const Al = (l, t, s = !0) => A(new F(l, t).setIsSortable(s)), Fl = (l, t, s, n =
1115
1113
  onPerms: je,
1116
1114
  onCustom: ze,
1117
1115
  onResponse: Ge
1118
- }, null, 8, ["modelValue", "resource", "filters"])) : k("", !0)
1116
+ }, null, 8, ["modelValue", "resource", "filters"])) : h("", !0)
1119
1117
  ]),
1120
1118
  _: 3
1121
1119
  }, 8, ["class"]))
1122
1120
  ], 8, el);
1123
1121
  };
1124
1122
  }
1125
- }), Jl = {
1123
+ }), Gl = {
1126
1124
  install: (l) => {
1127
- l.component("lkt-loader") === void 0 && l.use(Vt), l.component("lkt-button") === void 0 && l.use(Et), l.component("lkt-paginator") === void 0 && l.use(Dt), l.component("lkt-field-text") === void 0 && l.use(Bt), l.component("lkt-field-textarea") === void 0 && l.use(It), l.component("lkt-field-select") === void 0 && l.use(Tt), l.component("lkt-field-switch") === void 0 && l.use(wt), l.component("lkt-field-file") === void 0 && l.use(Lt), l.component("lkt-table") === void 0 && l.component("lkt-table", yl);
1125
+ l.component("lkt-loader") === void 0 && l.use(Vt), l.component("lkt-button") === void 0 && l.use(Et), l.component("lkt-paginator") === void 0 && l.use(Dt), l.component("lkt-field-text") === void 0 && l.use(It), l.component("lkt-field-textarea") === void 0 && l.use(Bt), l.component("lkt-field-select") === void 0 && l.use(wt), l.component("lkt-field-switch") === void 0 && l.use(Tt), l.component("lkt-field-file") === void 0 && l.use(Lt), l.component("lkt-table") === void 0 && l.component("lkt-table", kl);
1128
1126
  }
1129
- }, Ql = (l) => (R.navButtonSlot = l, !0), Xl = (l) => (R.dropButtonSlot = l, !0), Yl = (l) => (R.createButtonSlot = l, !0), Zl = (l) => {
1130
- R.defaultEmptySlot = l;
1127
+ }, Jl = (l) => (A.navButtonSlot = l, !0), Ql = (l) => (A.dropButtonSlot = l, !0), Xl = (l) => (A.createButtonSlot = l, !0), Yl = (l) => {
1128
+ A.defaultEmptySlot = l;
1131
1129
  };
1132
1130
  export {
1133
- F as LktTableColumn,
1134
- Ul as createActionColumn,
1135
- Kl as createCheckColumn,
1131
+ U as LktTableColumn,
1132
+ Fl as createActionColumn,
1133
+ Ol as createCheckColumn,
1136
1134
  Al as createColumn,
1137
- Wl as createEmailColumn,
1138
- zl as createFileColumn,
1135
+ Hl as createEmailColumn,
1136
+ jl as createFileColumn,
1139
1137
  Pl as createFloatColumn,
1140
- Gl as createHiddenColumn,
1138
+ zl as createHiddenColumn,
1141
1139
  Nl as createIntegerColumn,
1142
- Fl as createLinkColumn,
1143
- jl as createSelectColumn,
1144
- ql as createSwitchColumn,
1145
- Hl as createTelColumn,
1146
- Ol as createTextColumn,
1147
- Jl as default,
1148
- Yl as setTableCreateButtonSlot,
1149
- Xl as setTableDropButtonSlot,
1150
- Zl as setTableEmptySlot,
1151
- Ql as setTableNavButtonSlot
1140
+ $l as createLinkColumn,
1141
+ ql as createSelectColumn,
1142
+ Wl as createSwitchColumn,
1143
+ Kl as createTelColumn,
1144
+ Ul as createTextColumn,
1145
+ Gl as default,
1146
+ Xl as setTableCreateButtonSlot,
1147
+ Ql as setTableDropButtonSlot,
1148
+ Yl as setTableEmptySlot,
1149
+ Jl as setTableNavButtonSlot
1152
1150
  };