lkt-table 2.0.5 → 2.0.7

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,57 +1,57 @@
1
- import { defineComponent as te, ref as h, watch as A, computed as s, resolveComponent as z, createBlock as S, createElementBlock as p, unref as b, openBlock as u, normalizeProps as oe, mergeProps as Q, withCtx as L, createTextVNode as ee, toDisplayString as ue, Fragment as P, withModifiers as rt, createCommentVNode as c, resolveDynamicComponent as Z, useSlots as it, normalizeClass as K, createElementVNode as U, createVNode as pe, renderSlot as T, renderList as J, withDirectives as be, vShow as ge, mergeDefaults as Kt, onMounted as zt, nextTick as Be, createSlots as nt } from "vue";
2
- import { __ as Wt } from "lkt-i18n";
3
- import { SortDirection as ne, Column as st, ColumnType as Se, TableRowType as de, extractI18nValue as dt, LktSettings as ke, ensureButtonConfig as Pe, TablePermission as X, PaginatorType as De, TableType as ye, getDefaultValues as Gt, Table as Jt, ButtonType as Ne } from "lkt-vue-kernel";
4
- import { Column as na, createColumn as ua } from "lkt-vue-kernel";
5
- import { replaceAll as pt, generateRandomString as Qt } from "lkt-string-tools";
6
- import { DataState as Xt } from "lkt-data-state";
7
- import Yt from "sortablejs";
1
+ import { defineComponent as te, ref as h, watch as F, computed as i, resolveComponent as z, createBlock as S, createElementBlock as p, unref as y, openBlock as u, normalizeProps as oe, mergeProps as Q, withCtx as L, createTextVNode as ee, toDisplayString as ue, Fragment as P, withModifiers as rt, createCommentVNode as f, resolveDynamicComponent as Z, useSlots as it, normalizeClass as K, createElementVNode as O, createVNode as pe, renderSlot as T, renderList as J, withDirectives as ge, vShow as ke, mergeDefaults as Wt, onMounted as Gt, nextTick as Be, createSlots as nt } from "vue";
2
+ import { __ as Jt } from "lkt-i18n";
3
+ import { SortDirection as ne, Column as st, ColumnType as Se, prepareResourceData as dt, TableRowType as de, extractI18nValue as pt, LktSettings as me, ensureButtonConfig as De, TablePermission as X, PaginatorType as Ie, TableType as be, getDefaultValues as Qt, Table as Xt, ButtonType as Ne } from "lkt-vue-kernel";
4
+ import { Column as ra, createColumn as ia } from "lkt-vue-kernel";
5
+ import { replaceAll as mt, generateRandomString as Yt } from "lkt-string-tools";
6
+ import { DataState as Zt } from "lkt-data-state";
7
+ import xt from "sortablejs";
8
8
  import { time as ae } from "lkt-date-tools";
9
- const Zt = (o, v, y, n) => {
10
- if (!y) return 0;
11
- let l = String(o[y.key]).toLowerCase(), t = String(v[y.key]).toLowerCase();
12
- if (n === ne.Asc) {
13
- if (l > t) return 1;
14
- if (t > l) return -1;
9
+ const el = (o, v, c, l) => {
10
+ if (!c) return 0;
11
+ let n = String(o[c.key]).toLowerCase(), t = String(v[c.key]).toLowerCase();
12
+ if (l === ne.Asc) {
13
+ if (n > t) return 1;
14
+ if (t > n) return -1;
15
15
  } else {
16
- if (l > t) return -1;
17
- if (t > l) return 1;
16
+ if (n > t) return -1;
17
+ if (t > n) return 1;
18
18
  }
19
19
  return 0;
20
- }, me = (o, v, y, n = []) => {
20
+ }, ve = (o, v, c, l = []) => {
21
21
  if (o.extractTitleFromColumn) {
22
- let l = n.find((t) => t.key === o.extractTitleFromColumn);
23
- if (l)
24
- return me(l, v, y, n);
22
+ let n = l.find((t) => t.key === o.extractTitleFromColumn);
23
+ if (n)
24
+ return ve(n, v, c, l);
25
25
  }
26
26
  if (o.formatter && typeof o.formatter == "function") {
27
- let l = o.formatter(v[o.key], v, o, y);
28
- return l.startsWith("__:") ? Wt(l.substring(3)) : l;
27
+ let n = o.formatter(v[o.key], v, o, c);
28
+ return n.startsWith("__:") ? Jt(n.substring(3)) : n;
29
29
  }
30
30
  return v[o.key];
31
- }, xt = (o, v, y) => {
31
+ }, tl = (o, v, c) => {
32
32
  if (!o.colspan) return -1;
33
- let n = v;
34
- return y.forEach((l) => {
35
- let t = Fe(o, l);
36
- t > 0 && t < n && (n = t);
37
- }), n;
38
- }, Fe = (o, v) => o.colspan === !1 ? !1 : typeof o.colspan == "function" ? o.colspan(v) : o.colspan, el = (o, v) => typeof o.preferSlot > "u" ? !0 : o.preferSlot === !1 ? !1 : typeof o.preferSlot == "function" ? o.preferSlot(v) : !0, tl = (o, v, y) => {
33
+ let l = v;
34
+ return c.forEach((n) => {
35
+ let t = Fe(o, n);
36
+ t > 0 && t < l && (l = t);
37
+ }), l;
38
+ }, Fe = (o, v) => o.colspan === !1 ? !1 : typeof o.colspan == "function" ? o.colspan(v) : o.colspan, ll = (o, v) => typeof o.preferSlot > "u" ? !0 : o.preferSlot === !1 ? !1 : typeof o.preferSlot == "function" ? o.preferSlot(v) : !0, al = (o, v, c) => {
39
39
  if (typeof o != "object" || !o.key || v.indexOf(o.key) > -1) return !1;
40
- let n = Fe(o, y);
41
- return typeof o.colspan > "u" ? !0 : (typeof o.colspan < "u" && (typeof o.colspan == "function" ? n = parseInt(o.colspan(y)) : n = parseInt(o.colspan)), n > 0);
42
- }, ll = (o = []) => {
40
+ let l = Fe(o, c);
41
+ return typeof o.colspan > "u" ? !0 : (typeof o.colspan < "u" && (typeof o.colspan == "function" ? l = parseInt(o.colspan(c)) : l = parseInt(o.colspan)), l > 0);
42
+ }, ol = (o = []) => {
43
43
  if (o.length > 0) {
44
44
  for (let v = 0; v < o.length; ++v)
45
45
  if (o[v].sortable) return o[v].key;
46
46
  }
47
47
  return "";
48
- }, al = (o, v) => {
48
+ }, nl = (o, v) => {
49
49
  if (o.length > 0) {
50
- for (let y = 0; y < o.length; ++y)
51
- if (o[y].key === v) return o[y];
50
+ for (let c = 0; c < o.length; ++c)
51
+ if (o[c].key === v) return o[c];
52
52
  }
53
53
  return null;
54
- }, mt = (o) => o.type ? `is-${o.type}` : "", vt = /* @__PURE__ */ te({
54
+ }, vt = (o) => o.type ? `is-${o.type}` : "", ft = /* @__PURE__ */ te({
55
55
  __name: "LktTableCell",
56
56
  props: {
57
57
  modelValue: { default: () => ({}) },
@@ -63,56 +63,56 @@ const Zt = (o, v, y, n) => {
63
63
  },
64
64
  emits: ["update:modelValue"],
65
65
  setup(o, { emit: v }) {
66
- const y = v, n = o, l = h(n.modelValue), t = h(l.value[n.column.key]), f = h(null);
67
- A(t, (i) => {
68
- const a = JSON.parse(JSON.stringify(l.value));
69
- a[n.column.key] = i, y("update:modelValue", a);
70
- }), A(() => n.modelValue, (i) => {
71
- l.value = i, t.value = l.value[n.column.key];
66
+ const c = v, l = o, n = h(l.modelValue), t = h(n.value[l.column.key]), b = h(null);
67
+ F(t, (s) => {
68
+ const a = JSON.parse(JSON.stringify(n.value));
69
+ a[l.column.key] = s, c("update:modelValue", a);
70
+ }), F(() => l.modelValue, (s) => {
71
+ n.value = s, t.value = n.value[l.column.key];
72
72
  });
73
- const D = s(() => ({ ...n.column.slotData, item: l.value })), k = s(() => {
74
- var i, a, N, j;
75
- if ((i = n.column.field) != null && i.modalData && typeof ((a = n.column.field) == null ? void 0 : a.modalData) == "object")
76
- for (let w in n.column.field.modalData)
77
- if (typeof ((N = n.column.field) == null ? void 0 : N.modalData[w]) == "string" && n.column.field.modalData[w].startsWith("prop:")) {
78
- let _ = n.column.field.modalData[w].substring(5);
79
- l.value[_];
73
+ const D = i(() => ({ ...l.column.slotData, item: n.value })), k = i(() => {
74
+ var s, a, U, _;
75
+ if ((s = l.column.field) != null && s.modalData && typeof ((a = l.column.field) == null ? void 0 : a.modalData) == "object")
76
+ for (let w in l.column.field.modalData)
77
+ if (typeof ((U = l.column.field) == null ? void 0 : U.modalData[w]) == "string" && l.column.field.modalData[w].startsWith("prop:")) {
78
+ let H = l.column.field.modalData[w].substring(5);
79
+ n.value[H];
80
80
  } else
81
- n.column.field.modalData[w];
82
- return (j = n.column.field) == null ? void 0 : j.modalData;
81
+ l.column.field.modalData[w];
82
+ return (_ = l.column.field) == null ? void 0 : _.modalData;
83
83
  });
84
- return (i, a) => {
85
- var _, I, le, V;
86
- const N = z("lkt-anchor"), j = z("lkt-button"), w = z("lkt-field");
87
- return i.column.type === b(Se).Anchor ? (u(), S(N, oe(Q({ key: 0 }, i.column.anchor)), {
84
+ return (s, a) => {
85
+ var H, I, le, V;
86
+ const U = z("lkt-anchor"), _ = z("lkt-button"), w = z("lkt-field");
87
+ return s.column.type === y(Se).Anchor ? (u(), S(U, oe(Q({ key: 0 }, s.column.anchor)), {
88
88
  default: L(() => [
89
- ee(ue(b(me)(i.column, l.value, i.i)), 1)
89
+ ee(ue(y(ve)(s.column, n.value, s.i)), 1)
90
90
  ]),
91
91
  _: 1
92
- }, 16)) : i.column.type === b(Se).Button ? (u(), S(j, Q({ key: 1 }, i.column.button, { prop: l.value }), {
92
+ }, 16)) : s.column.type === y(Se).Button ? (u(), S(_, Q({ key: 1 }, s.column.button, { prop: n.value }), {
93
93
  default: L(() => [
94
- ee(ue(b(me)(i.column, l.value, i.i)), 1)
94
+ ee(ue(y(ve)(s.column, n.value, s.i)), 1)
95
95
  ]),
96
96
  _: 1
97
- }, 16, ["prop"])) : i.column.type === b(Se).Field && i.hasInlineEditPerm ? (u(), S(w, Q({ key: 2 }, i.column.field, {
98
- "read-mode": !i.column.editable || !i.editModeEnabled,
99
- ref: (W) => f.value = W,
97
+ }, 16, ["prop"])) : s.column.type === y(Se).Field && s.hasInlineEditPerm ? (u(), S(w, Q({ key: 2 }, s.column.field, {
98
+ "read-mode": !s.column.editable || !s.editModeEnabled,
99
+ ref: (W) => b.value = W,
100
100
  "slot-data": D.value,
101
- label: ((_ = i.column.field) == null ? void 0 : _.type) === "switch" || ((I = i.column.field) == null ? void 0 : I.type) === "check" ? i.column.label : "",
101
+ label: ((H = s.column.field) == null ? void 0 : H.type) === "switch" || ((I = s.column.field) == null ? void 0 : I.type) === "check" ? s.column.label : "",
102
102
  "modal-data": k.value,
103
- prop: l.value,
103
+ prop: n.value,
104
104
  modelValue: t.value,
105
105
  "onUpdate:modelValue": a[0] || (a[0] = (W) => t.value = W)
106
- }), null, 16, ["read-mode", "slot-data", "label", "modal-data", "prop", "modelValue"])) : i.column.type === b(Se).Field ? (u(), S(w, Q({ key: 3 }, i.column.field, {
106
+ }), null, 16, ["read-mode", "slot-data", "label", "modal-data", "prop", "modelValue"])) : s.column.type === y(Se).Field ? (u(), S(w, Q({ key: 3 }, s.column.field, {
107
107
  "read-mode": "",
108
- ref: (W) => f.value = W,
108
+ ref: (W) => b.value = W,
109
109
  "slot-data": D.value,
110
- label: ((le = i.column.field) == null ? void 0 : le.type) === "switch" || ((V = i.column.field) == null ? void 0 : V.type) === "check" ? i.column.label : "",
110
+ label: ((le = s.column.field) == null ? void 0 : le.type) === "switch" || ((V = s.column.field) == null ? void 0 : V.type) === "check" ? s.column.label : "",
111
111
  "modal-data": k.value,
112
- prop: l.value,
112
+ prop: n.value,
113
113
  "model-value": t.value
114
114
  }), null, 16, ["slot-data", "label", "modal-data", "prop", "model-value"])) : (u(), p(P, { key: 4 }, [
115
- ee(ue(b(me)(i.column, l.value, i.i, i.columns)), 1)
115
+ ee(ue(y(ve)(s.column, n.value, s.i, s.columns)), 1)
116
116
  ], 64));
117
117
  };
118
118
  }
@@ -120,69 +120,67 @@ const Zt = (o, v, y, n) => {
120
120
  };
121
121
  Y.navButtonSlot = "", Y.dropButtonSlot = "", Y.editButtonSlot = "", Y.createButtonSlot = "", Y.defaultEmptySlot = void 0, Y.defaultSaveIcon = "", Y.defaultNoResultsMessage = "No results";
122
122
  let $ = Y;
123
- const ol = /* @__PURE__ */ te({
124
- __name: "DropButton",
123
+ const ul = /* @__PURE__ */ te({
124
+ __name: "DropButtonComponent",
125
125
  props: {
126
126
  config: {},
127
+ item: {},
127
128
  disabled: { type: Boolean, default: !1 }
128
129
  },
129
130
  emits: ["click"],
130
131
  setup(o, { emit: v }) {
131
- const y = v, n = o, l = s(() => $.dropButtonSlot !== ""), t = s(() => $.dropButtonSlot);
132
- return (f, D) => {
133
- var i, a;
134
- const k = z("lkt-button");
135
- return u(), S(k, Q({ palette: "table-delete" }, n.config, {
136
- icon: l.value ? "" : (i = f.config) == null ? void 0 : i.icon,
137
- text: l.value ? "" : (a = f.config) == null ? void 0 : a.text,
138
- disabled: f.disabled,
139
- onClick: D[0] || (D[0] = rt((N) => y("click"), ["prevent", "stop"]))
132
+ const c = v, l = o, n = i(() => $.dropButtonSlot !== ""), t = i(() => $.dropButtonSlot), b = i(() => dt(l.config.resourceData, l.item));
133
+ return (D, k) => {
134
+ const s = z("lkt-button");
135
+ return u(), S(s, Q({ palette: "table-delete" }, l.config, {
136
+ disabled: D.disabled,
137
+ "resource-data": b.value,
138
+ onClick: k[0] || (k[0] = rt((a) => c("click", a), ["prevent", "stop"]))
140
139
  }), {
141
140
  default: L(() => [
142
- l.value ? (u(), S(Z(t.value), { key: 0 })) : c("", !0)
141
+ n.value ? (u(), S(Z(t.value), { key: 0 })) : f("", !0)
143
142
  ]),
144
143
  _: 1
145
- }, 16, ["icon", "text", "disabled"]);
144
+ }, 16, ["disabled", "resource-data"]);
146
145
  };
147
146
  }
148
- }), nl = /* @__PURE__ */ te({
149
- __name: "EditButton",
147
+ }), rl = /* @__PURE__ */ te({
148
+ __name: "EditButtonComponent",
150
149
  props: {
151
150
  config: {},
151
+ item: {},
152
152
  disabled: { type: Boolean, default: !1 }
153
153
  },
154
154
  emits: ["click"],
155
155
  setup(o, { emit: v }) {
156
- const y = v, n = o, l = s(() => $.editButtonSlot !== ""), t = s(() => $.editButtonSlot);
157
- return (f, D) => {
158
- var i, a;
159
- const k = z("lkt-button");
160
- return u(), S(k, Q({ palette: "table-delete" }, n.config, {
161
- icon: l.value ? "" : (i = f.config) == null ? void 0 : i.icon,
162
- text: l.value ? "" : (a = f.config) == null ? void 0 : a.text,
163
- disabled: f.disabled,
164
- onClick: D[0] || (D[0] = rt((N) => y("click"), ["prevent", "stop"]))
156
+ const c = v, l = o, n = i(() => $.editButtonSlot !== ""), t = i(() => $.editButtonSlot), b = i(() => dt(l.config.resourceData, l.item));
157
+ return (D, k) => {
158
+ const s = z("lkt-button");
159
+ return u(), S(s, Q({ palette: "table-edit" }, l.config, {
160
+ disabled: D.disabled,
161
+ "resource-data": b.value,
162
+ onClick: k[0] || (k[0] = rt((a) => c("click"), ["prevent", "stop"]))
165
163
  }), {
166
164
  default: L(() => [
167
- l.value ? (u(), S(Z(t.value), { key: 0 })) : c("", !0)
165
+ n.value ? (u(), S(Z(t.value), { key: 0 })) : f("", !0)
168
166
  ]),
169
167
  _: 1
170
- }, 16, ["icon", "text", "disabled"]);
168
+ }, 16, ["disabled", "resource-data"]);
171
169
  };
172
170
  }
173
- }), ul = ["data-i", "data-draggable"], rl = ["data-i"], il = {
171
+ }), il = ["data-i", "data-draggable"], sl = ["data-i"], dl = {
174
172
  key: 1,
175
173
  "data-role": "invalid-drag-indicator"
176
- }, sl = {
174
+ }, pl = {
177
175
  key: 2,
178
176
  class: "lkt-table-nav-cell"
179
- }, dl = { class: "lkt-table-nav-container" }, pl = ["colspan"], ml = ["colspan"], vl = ["data-column", "colspan", "title"], fl = {
177
+ }, ml = { class: "lkt-table-nav-container" }, vl = ["colspan"], fl = ["colspan"], cl = ["data-column", "colspan", "title"], yl = {
180
178
  key: 7,
181
179
  class: "lkt-table-col-drop"
182
- }, cl = {
180
+ }, bl = {
183
181
  key: 8,
184
182
  class: "lkt-table-col-edit"
185
- }, yl = /* @__PURE__ */ te({
183
+ }, gl = /* @__PURE__ */ te({
186
184
  __name: "LktTableRow",
187
185
  props: {
188
186
  modelValue: { default: () => ({}) },
@@ -208,84 +206,84 @@ const ol = /* @__PURE__ */ te({
208
206
  emits: ["update:modelValue", "click", "show", "item-up", "item-down", "item-drop"],
209
207
  setup(o, { emit: v }) {
210
208
  var x;
211
- const y = it(), n = v, l = o, t = h(l.modelValue);
212
- let f = typeof l.rowDisplayType == "function" ? l.rowDisplayType(t.value, l.i) : l.rowDisplayType;
213
- f || (f = de.Auto);
214
- const D = [de.Auto, de.PreferCustomItem].includes(f), k = [de.Auto, de.PreferItem].includes(f), i = h((x = l.editButton.anchor) == null ? void 0 : x.to);
215
- for (let r in t.value) i.value = pt(i.value, ":" + r, t.value[r]);
216
- const a = (r) => n("click", r), N = (r, m) => {
217
- n("show", r, m);
218
- }, j = s(() => {
209
+ const c = it(), l = v, n = o, t = h(n.modelValue);
210
+ let b = typeof n.rowDisplayType == "function" ? n.rowDisplayType(t.value, n.i) : n.rowDisplayType;
211
+ b || (b = de.Auto);
212
+ const D = [de.Auto, de.PreferCustomItem].includes(b), k = [de.Auto, de.PreferItem].includes(b), s = h((x = n.editButton.anchor) == null ? void 0 : x.to);
213
+ for (let r in t.value) s.value = mt(s.value, ":" + r, t.value[r]);
214
+ const a = (r) => l("click", r), U = (r, m) => {
215
+ l("show", r, m);
216
+ }, _ = i(() => {
219
217
  let r = [], m = !1;
220
- return typeof l.disabledDrag == "function" ? m = l.disabledDrag(t.value) : m = Ie.value === !0, !m && l.sortable && l.isDraggable ? r.push("handle") : m && r.push("disabled"), r.join(" ");
221
- }), w = s(() => $.navButtonSlot !== ""), _ = s(() => $.navButtonSlot), I = () => {
222
- n("item-up", l.i);
218
+ return typeof n.disabledDrag == "function" ? m = n.disabledDrag(t.value) : m = Ve.value === !0, !m && n.sortable && n.isDraggable ? r.push("handle") : m && r.push("disabled"), r.join(" ");
219
+ }), w = i(() => $.navButtonSlot !== ""), H = i(() => $.navButtonSlot), I = () => {
220
+ l("item-up", n.i);
223
221
  }, le = () => {
224
- n("item-down", l.i);
222
+ l("item-down", n.i);
225
223
  }, V = () => {
226
- n("item-drop", l.i);
224
+ l("item-drop", n.i);
227
225
  }, W = () => {
228
226
  };
229
- A(() => l.modelValue, (r) => t.value = r), A(t, (r) => {
230
- n("update:modelValue", r);
227
+ F(() => n.modelValue, (r) => t.value = r), F(t, (r) => {
228
+ l("update:modelValue", r);
231
229
  }, { deep: !0 });
232
- const ve = s(() => typeof l.renderDrag == "function" ? l.renderDrag(t.value) : l.renderDrag === !0), Ie = s(() => typeof l.disabledDrag == "function" ? l.disabledDrag(t.value) : l.disabledDrag === !0);
230
+ const fe = i(() => typeof n.renderDrag == "function" ? n.renderDrag(t.value) : n.renderDrag === !0), Ve = i(() => typeof n.disabledDrag == "function" ? n.disabledDrag(t.value) : n.disabledDrag === !0);
233
231
  return (r, m) => {
234
- const H = z("lkt-button");
232
+ const j = z("lkt-button");
235
233
  return u(), p("tr", {
236
234
  "data-i": r.i,
237
235
  "data-draggable": r.isDraggable,
238
- class: K({ "type-custom-item": b(D), "type-item": b(k) })
236
+ class: K({ "type-custom-item": y(D), "type-item": y(k) })
239
237
  }, [
240
- r.sortable && r.isDraggable && r.editModeEnabled && ve.value ? (u(), p("td", {
238
+ r.sortable && r.isDraggable && r.editModeEnabled && fe.value ? (u(), p("td", {
241
239
  key: 0,
242
240
  "data-role": "drag-indicator",
243
- class: K(j.value),
241
+ class: K(_.value),
244
242
  "data-i": r.i
245
- }, null, 10, rl)) : r.sortable && r.editModeEnabled && ve.value ? (u(), p("td", il)) : c("", !0),
246
- r.addNavigation && r.editModeEnabled ? (u(), p("td", sl, [
247
- U("div", dl, [
248
- pe(H, {
243
+ }, null, 10, sl)) : r.sortable && r.editModeEnabled && fe.value ? (u(), p("td", dl)) : f("", !0),
244
+ r.addNavigation && r.editModeEnabled ? (u(), p("td", pl, [
245
+ O("div", ml, [
246
+ pe(j, {
249
247
  palette: "table-nav",
250
248
  disabled: r.i === 0,
251
249
  onClick: I
252
250
  }, {
253
251
  default: L(() => [
254
- w.value ? (u(), S(Z(_.value), {
252
+ w.value ? (u(), S(Z(H.value), {
255
253
  key: 0,
256
254
  direction: "up"
257
255
  })) : (u(), p(P, { key: 1 }, [
258
- m[3] || (m[3] = U("i", { class: "" }, null, -1)),
256
+ m[3] || (m[3] = O("i", { class: "" }, null, -1)),
259
257
  m[4] || (m[4] = ee(" UP "))
260
258
  ], 64))
261
259
  ]),
262
260
  _: 1
263
261
  }, 8, ["disabled"]),
264
- pe(H, {
262
+ pe(j, {
265
263
  palette: "table-nav",
266
264
  disabled: r.latestRow,
267
265
  onClick: le
268
266
  }, {
269
267
  default: L(() => [
270
- w.value ? (u(), S(Z(_.value), {
268
+ w.value ? (u(), S(Z(H.value), {
271
269
  key: 0,
272
270
  direction: "down"
273
271
  })) : (u(), p(P, { key: 1 }, [
274
- m[5] || (m[5] = U("i", { class: "" }, null, -1)),
272
+ m[5] || (m[5] = O("i", { class: "" }, null, -1)),
275
273
  m[6] || (m[6] = ee(" DOWN "))
276
274
  ], 64))
277
275
  ]),
278
276
  _: 1
279
277
  }, 8, ["disabled"])
280
278
  ])
281
- ])) : c("", !0),
279
+ ])) : f("", !0),
282
280
  r.displayHiddenColumnsIndicator ? (u(), p("td", {
283
281
  key: 3,
284
- onClick: m[0] || (m[0] = (E) => N(E, r.i)),
282
+ onClick: m[0] || (m[0] = (E) => U(E, r.i)),
285
283
  "data-role": "show-more",
286
284
  class: K(r.hiddenIsVisible ? "state-open" : "")
287
- }, null, 2)) : c("", !0),
288
- b(D) && b(y)[`item-${r.i}`] ? (u(), p("td", {
285
+ }, null, 2)) : f("", !0),
286
+ y(D) && y(c)[`item-${r.i}`] ? (u(), p("td", {
289
287
  key: "td" + r.i,
290
288
  colspan: r.visibleColumns.length
291
289
  }, [
@@ -293,7 +291,7 @@ const ol = /* @__PURE__ */ te({
293
291
  item: t.value,
294
292
  index: r.i
295
293
  })
296
- ], 8, pl)) : b(k) && b(y).item ? (u(), p("td", {
294
+ ], 8, vl)) : y(k) && y(c).item ? (u(), p("td", {
297
295
  key: "td" + r.i,
298
296
  colspan: r.visibleColumns.length
299
297
  }, [
@@ -301,49 +299,51 @@ const ol = /* @__PURE__ */ te({
301
299
  item: t.value,
302
300
  index: r.i
303
301
  })
304
- ], 8, ml)) : (u(!0), p(P, { key: 6 }, J(r.visibleColumns, (E) => (u(), p(P, null, [
305
- b(tl)(E, r.emptyColumns, t.value) ? (u(), p("td", {
302
+ ], 8, fl)) : (u(!0), p(P, { key: 6 }, J(r.visibleColumns, (E) => (u(), p(P, null, [
303
+ y(al)(E, r.emptyColumns, t.value) ? (u(), p("td", {
306
304
  key: "td" + r.i,
307
305
  "data-column": E.key,
308
- colspan: b(Fe)(E, t.value),
309
- title: b(me)(E, t.value, r.i, r.visibleColumns),
310
- class: K(b(mt)(E)),
311
- onClick: m[2] || (m[2] = (F) => a(F))
306
+ colspan: y(Fe)(E, t.value),
307
+ title: y(ve)(E, t.value, r.i, r.visibleColumns),
308
+ class: K(y(vt)(E)),
309
+ onClick: m[2] || (m[2] = (N) => a(N))
312
310
  }, [
313
- r.$slots[E.key] && b(el)(E, t.value) ? T(r.$slots, E.key, {
311
+ r.$slots[E.key] && y(ll)(E, t.value) ? T(r.$slots, E.key, {
314
312
  key: 0,
315
313
  value: t.value[E.key],
316
314
  item: t.value,
317
315
  column: E,
318
316
  i: r.i
319
- }) : t.value ? (u(), S(vt, {
317
+ }) : t.value ? (u(), S(ft, {
320
318
  key: 1,
321
319
  modelValue: t.value,
322
- "onUpdate:modelValue": m[1] || (m[1] = (F) => t.value = F),
320
+ "onUpdate:modelValue": m[1] || (m[1] = (N) => t.value = N),
323
321
  column: E,
324
322
  columns: r.visibleColumns,
325
323
  "edit-mode-enabled": r.editModeEnabled,
326
324
  "has-inline-edit-perm": r.hasInlineEditPerm,
327
325
  i: r.i
328
- }, null, 8, ["modelValue", "column", "columns", "edit-mode-enabled", "has-inline-edit-perm", "i"])) : c("", !0)
329
- ], 10, vl)) : c("", !0)
326
+ }, null, 8, ["modelValue", "column", "columns", "edit-mode-enabled", "has-inline-edit-perm", "i"])) : f("", !0)
327
+ ], 10, cl)) : f("", !0)
330
328
  ], 64))), 256)),
331
- r.canDrop && r.editModeEnabled ? (u(), p("td", fl, [
332
- pe(ol, {
329
+ r.canDrop && r.editModeEnabled ? (u(), p("td", yl, [
330
+ pe(ul, {
333
331
  config: r.dropButton,
332
+ item: t.value,
334
333
  onClick: V
335
- }, null, 8, ["config"])
336
- ])) : c("", !0),
337
- r.canEdit && r.editModeEnabled ? (u(), p("td", cl, [
338
- pe(nl, {
334
+ }, null, 8, ["config", "item"])
335
+ ])) : f("", !0),
336
+ r.canEdit && r.editModeEnabled ? (u(), p("td", bl, [
337
+ pe(rl, {
339
338
  config: r.editButton,
339
+ item: t.value,
340
340
  onClick: W
341
- }, null, 8, ["config"])
342
- ])) : c("", !0)
343
- ], 10, ul);
341
+ }, null, 8, ["config", "item"])
342
+ ])) : f("", !0)
343
+ ], 10, il);
344
344
  };
345
345
  }
346
- }), bl = { "data-role": "hidden-row" }, gl = ["colspan"], kl = ["data-column"], hl = ["data-i"], Cl = ["data-column", "title"], Bl = /* @__PURE__ */ te({
346
+ }), kl = { "data-role": "hidden-row" }, hl = ["colspan"], Cl = ["data-column"], Bl = ["data-i"], Sl = ["data-column", "title"], Dl = /* @__PURE__ */ te({
347
347
  __name: "LktHiddenRow",
348
348
  props: {
349
349
  modelValue: { default: () => ({}) },
@@ -360,45 +360,45 @@ const ol = /* @__PURE__ */ te({
360
360
  },
361
361
  emits: ["update:modelValue", "click"],
362
362
  setup(o, { emit: v }) {
363
- const y = v, n = o, l = h(n.modelValue), t = (f) => y("click", f);
364
- return A(() => n.modelValue, (f) => l.value = f), A(l, () => y("update:modelValue", l.value)), (f, D) => be((u(), p("tr", bl, [
365
- U("td", { colspan: f.hiddenColumnsColSpan }, [
366
- U("table", null, [
367
- U("tr", null, [
368
- (u(!0), p(P, null, J(f.hiddenColumns, (k) => (u(), p("th", {
363
+ const c = v, l = o, n = h(l.modelValue), t = (b) => c("click", b);
364
+ return F(() => l.modelValue, (b) => n.value = b), F(n, () => c("update:modelValue", n.value)), (b, D) => ge((u(), p("tr", kl, [
365
+ O("td", { colspan: b.hiddenColumnsColSpan }, [
366
+ O("table", null, [
367
+ O("tr", null, [
368
+ (u(!0), p(P, null, J(b.hiddenColumns, (k) => (u(), p("th", {
369
369
  "data-column": k.key
370
370
  }, [
371
- U("div", null, ue(k.label), 1)
372
- ], 8, kl))), 256))
371
+ O("div", null, ue(k.label), 1)
372
+ ], 8, Cl))), 256))
373
373
  ]),
374
- U("tr", { "data-i": f.i }, [
375
- (u(!0), p(P, null, J(f.hiddenColumns, (k, i) => (u(), p("td", {
374
+ O("tr", { "data-i": b.i }, [
375
+ (u(!0), p(P, null, J(b.hiddenColumns, (k, s) => (u(), p("td", {
376
376
  "data-column": k.key,
377
- title: b(me)(k, l.value, i, f.hiddenColumns),
377
+ title: y(ve)(k, n.value, s, b.hiddenColumns),
378
378
  onClick: D[1] || (D[1] = (a) => t(a))
379
379
  }, [
380
- f.$slots[k.key] ? T(f.$slots, k.key, {
380
+ b.$slots[k.key] ? T(b.$slots, k.key, {
381
381
  key: 0,
382
- value: l.value[k.key],
383
- item: l.value,
382
+ value: n.value[k.key],
383
+ item: n.value,
384
384
  column: k,
385
- i
386
- }) : (u(), S(vt, {
385
+ i: s
386
+ }) : (u(), S(ft, {
387
387
  key: 1,
388
388
  column: k,
389
- columns: f.hiddenColumns,
390
- modelValue: l.value,
391
- "onUpdate:modelValue": D[0] || (D[0] = (a) => l.value = a),
392
- i,
393
- "edit-mode-enabled": f.editModeEnabled,
394
- "has-inline-edit-perm": f.hasInlineEditPerm
389
+ columns: b.hiddenColumns,
390
+ modelValue: n.value,
391
+ "onUpdate:modelValue": D[0] || (D[0] = (a) => n.value = a),
392
+ i: s,
393
+ "edit-mode-enabled": b.editModeEnabled,
394
+ "has-inline-edit-perm": b.hasInlineEditPerm
395
395
  }, null, 8, ["column", "columns", "modelValue", "i", "edit-mode-enabled", "has-inline-edit-perm"]))
396
- ], 8, Cl))), 256))
397
- ], 8, hl)
396
+ ], 8, Sl))), 256))
397
+ ], 8, Bl)
398
398
  ])
399
- ], 8, gl)
399
+ ], 8, hl)
400
400
  ], 512)), [
401
- [ge, f.hiddenIsVisible]
401
+ [ke, b.hiddenIsVisible]
402
402
  ]);
403
403
  }
404
404
  }), ut = /* @__PURE__ */ te({
@@ -409,37 +409,37 @@ const ol = /* @__PURE__ */ te({
409
409
  },
410
410
  emits: ["click", "append"],
411
411
  setup(o, { emit: v }) {
412
- var i;
413
- const y = v, n = o, l = s(() => $.createButtonSlot !== ""), t = s(() => $.createButtonSlot), f = {
414
- ...(i = n.config) == null ? void 0 : i.modalData,
412
+ var s;
413
+ const c = v, l = o, n = i(() => $.createButtonSlot !== ""), t = i(() => $.createButtonSlot), b = {
414
+ ...(s = l.config) == null ? void 0 : s.modalData,
415
415
  beforeClose: (a) => {
416
- "itemCreated" in a && a.itemCreated === !0 && y("append", a.item);
416
+ "itemCreated" in a && a.itemCreated === !0 && c("append", a.item);
417
417
  }
418
418
  }, D = {
419
- ...n.config
419
+ ...l.config
420
420
  };
421
- D.modalData = f;
421
+ D.modalData = b;
422
422
  const k = () => {
423
423
  var a;
424
- if (!((a = n.config) != null && a.modal)) {
425
- y("click");
424
+ if (!((a = l.config) != null && a.modal)) {
425
+ c("click");
426
426
  return;
427
427
  }
428
428
  };
429
- return (a, N) => {
430
- const j = z("lkt-button");
431
- return u(), S(j, Q(D, {
429
+ return (a, U) => {
430
+ const _ = z("lkt-button");
431
+ return u(), S(_, Q(D, {
432
432
  disabled: a.disabled,
433
433
  onClick: k
434
434
  }), {
435
435
  default: L(() => [
436
- l.value ? (u(), S(Z(t.value), { key: 0 })) : c("", !0)
436
+ n.value ? (u(), S(Z(t.value), { key: 0 })) : f("", !0)
437
437
  ]),
438
438
  _: 1
439
439
  }, 16, ["disabled"]);
440
440
  };
441
441
  }
442
- }), Sl = ["data-column", "data-sortable", "data-sort", "colspan", "title"], Dl = /* @__PURE__ */ te({
442
+ }), Il = ["data-column", "data-sortable", "data-sort", "colspan", "title"], Vl = /* @__PURE__ */ te({
443
443
  __name: "TableHeader",
444
444
  props: {
445
445
  column: { default: () => new st() },
@@ -450,52 +450,52 @@ const ol = /* @__PURE__ */ te({
450
450
  },
451
451
  emits: ["click"],
452
452
  setup(o, { emit: v }) {
453
- const y = v, n = o, l = s(() => xt(n.column, n.amountOfColumns, n.items)), t = s(() => n.column.sortable === !0), f = s(() => t.value && n.sortBy === n.column.key ? n.sortDirection : ""), D = s(() => dt(n.column.label)), k = s(() => t.value && n.sortBy === n.column.key ? n.sortDirection === ne.Asc ? ke.defaultTableSortAscIcon : n.sortDirection === ne.Desc ? ke.defaultTableSortDescIcon : "" : ""), i = () => y("click", n.column);
454
- return (a, N) => (u(), p("th", {
453
+ const c = v, l = o, n = i(() => tl(l.column, l.amountOfColumns, l.items)), t = i(() => l.column.sortable === !0), b = i(() => t.value && l.sortBy === l.column.key ? l.sortDirection : ""), D = i(() => pt(l.column.label)), k = i(() => t.value && l.sortBy === l.column.key ? l.sortDirection === ne.Asc ? me.defaultTableSortAscIcon : l.sortDirection === ne.Desc ? me.defaultTableSortDescIcon : "" : ""), s = () => c("click", l.column);
454
+ return (a, U) => (u(), p("th", {
455
455
  "data-column": a.column.key,
456
456
  "data-sortable": t.value,
457
- "data-sort": f.value,
458
- colspan: l.value,
457
+ "data-sort": b.value,
458
+ colspan: n.value,
459
459
  title: D.value,
460
- class: K(b(mt)(a.column)),
461
- onClick: i
460
+ class: K(y(vt)(a.column)),
461
+ onClick: s
462
462
  }, [
463
- U("div", null, [
463
+ O("div", null, [
464
464
  ee(ue(D.value) + " ", 1),
465
465
  k.value ? (u(), p("i", {
466
466
  key: 0,
467
467
  class: K(k.value)
468
- }, null, 2)) : c("", !0)
468
+ }, null, 2)) : f("", !0)
469
469
  ])
470
- ], 10, Sl));
470
+ ], 10, Il));
471
471
  }
472
- }), Il = ["id"], Vl = {
472
+ }), wl = ["id"], El = {
473
473
  key: 0,
474
474
  class: "lkt-table-page-buttons"
475
- }, wl = { class: "switch-edition-mode" }, El = {
475
+ }, Tl = { class: "switch-edition-mode" }, $l = {
476
476
  key: 1,
477
477
  class: "lkt-table-page-buttons"
478
- }, Tl = {
478
+ }, Rl = {
479
479
  key: 2,
480
480
  class: "lkt-table-page-filters"
481
- }, $l = { class: "lkt-table" }, Ml = { key: 0 }, Rl = {
481
+ }, Ml = { class: "lkt-table" }, Ll = { key: 0 }, Pl = {
482
482
  key: 0,
483
483
  "data-role": "drag-indicator"
484
- }, Ll = { key: 1 }, Pl = { key: 2 }, Nl = {
484
+ }, Nl = { key: 1 }, Fl = { key: 2 }, Al = {
485
485
  key: 3,
486
486
  class: "lkt-table-col-drop"
487
- }, Fl = {
487
+ }, Ol = {
488
488
  key: 4,
489
489
  class: "lkt-table-col-edit"
490
- }, Al = ["id"], Ol = ["id"], Ul = ["data-i"], jl = ["data-i"], Hl = {
490
+ }, Ul = ["id"], _l = ["id"], jl = ["data-i"], Hl = ["data-i"], ql = {
491
491
  key: 3,
492
492
  class: "lkt-table-empty"
493
- }, _l = {
493
+ }, Kl = {
494
494
  key: 5,
495
495
  class: "lkt-table-page-buttons lkt-table-page-buttons-bottom"
496
- }, ql = /* @__PURE__ */ te({
496
+ }, zl = /* @__PURE__ */ te({
497
497
  __name: "LktTable",
498
- props: /* @__PURE__ */ Kt({
498
+ props: /* @__PURE__ */ Wt({
499
499
  modelValue: {},
500
500
  type: {},
501
501
  columns: {},
@@ -503,6 +503,7 @@ const ol = /* @__PURE__ */ te({
503
503
  hideEmptyColumns: { type: Boolean },
504
504
  itemDisplayChecker: { type: Function },
505
505
  rowDisplayType: { type: [Number, Function] },
506
+ slotItemVar: {},
506
507
  loading: { type: Boolean },
507
508
  page: {},
508
509
  perms: {},
@@ -513,6 +514,7 @@ const ol = /* @__PURE__ */ te({
513
514
  initialSorting: { type: Boolean },
514
515
  drag: {},
515
516
  paginator: {},
517
+ carousel: {},
516
518
  header: {},
517
519
  title: {},
518
520
  titleTag: {},
@@ -524,16 +526,15 @@ const ol = /* @__PURE__ */ te({
524
526
  dropButton: {},
525
527
  editButton: {},
526
528
  hiddenSave: { type: Boolean },
529
+ requiredItemsForTopCreate: {},
530
+ requiredItemsForBottomCreate: {},
531
+ addNavigation: { type: Boolean },
532
+ newValueGenerator: { type: Function },
527
533
  wrapContentTag: {},
528
534
  wrapContentClass: {},
529
535
  itemsContainerClass: {},
530
- addNavigation: { type: Boolean },
531
- newValueGenerator: { type: Function },
532
- requiredItemsForTopCreate: {},
533
- requiredItemsForBottomCreate: {},
534
- slotItemVar: {},
535
536
  createEnabledValidator: { type: Function }
536
- }, Gt(Jt)),
537
+ }, Qt(Xt)),
537
538
  emits: [
538
539
  "update:modelValue",
539
540
  "update:perms",
@@ -548,59 +549,59 @@ const ol = /* @__PURE__ */ te({
548
549
  "page",
549
550
  "drag-end"
550
551
  ],
551
- setup(o, { expose: v, emit: y }) {
552
+ setup(o, { expose: v, emit: c }) {
552
553
  var ot;
553
- const n = y, l = it(), t = o, f = {}, D = h(typeof t.sorter == "function" ? t.sorter : Zt), k = h(ll(t.columns)), i = h(ne.Asc), a = h(t.modelValue), N = h(f), j = h(null), w = h(t.columns), _ = h((ot = t.paginator) == null ? void 0 : ot.modelValue), I = h(t.loading), le = h(!1), V = h(t.perms), W = h(null), ve = h(null), Ie = h(null), x = h({}), r = h(new Xt({ items: a.value }, t.dataStateConfig)), m = h(t.editMode), H = h(0), E = h(null), F = h(Pe(t.saveButton, ke.defaultSaveButton)), Ae = h(Pe(t.createButton, ke.defaultCreateButton)), ft = h(Pe(t.editModeButton, ke.defaultEditModeButton)), re = h(!1);
554
- A(I, (e) => n("update:loading", e)), A(_, (e) => n("page", e));
555
- const ct = (e) => {
554
+ const l = c, n = it(), t = o, b = {}, D = h(typeof t.sorter == "function" ? t.sorter : el), k = h(ol(t.columns)), s = h(ne.Asc), a = h(t.modelValue), U = h(b), _ = h(null), w = h(t.columns), H = h((ot = t.paginator) == null ? void 0 : ot.modelValue), I = h(t.loading), le = h(!1), V = h(t.perms), W = h(null), fe = h(null), Ve = h(null), x = h({}), r = h(new Zt({ items: a.value }, t.dataStateConfig)), m = h(t.editMode), j = h(0), E = h(null), N = h(De(t.saveButton, me.defaultSaveButton)), Ae = h(De(t.createButton, me.defaultCreateButton)), ct = h(De(t.editModeButton, me.defaultEditModeButton)), yt = h(De(t.dropButton, me.defaultDropButton)), re = h(!1);
555
+ F(I, (e) => l("update:loading", e)), F(H, (e) => l("page", e));
556
+ const bt = (e) => {
556
557
  V.value = e;
557
- }, yt = (e) => {
558
+ }, gt = (e) => {
558
559
  var d;
559
- Array.isArray(e.data) && ((!t.paginator || ![De.LoadMore, De.Infinite].includes((d = t.paginator) == null ? void 0 : d.type)) && a.value.splice(0, a.value.length), a.value = [...a.value, ...e.data]), I.value = !1, le.value = !0, r.value.store({ items: a.value }).turnStoredIntoOriginal(), re.value = !1, Be(() => {
560
- H.value = ae(), Ee.value, n("read-response", e);
560
+ Array.isArray(e.data) && ((!t.paginator || ![Ie.LoadMore, Ie.Infinite].includes((d = t.paginator) == null ? void 0 : d.type)) && a.value.splice(0, a.value.length), a.value = [...a.value, ...e.data]), I.value = !1, le.value = !0, r.value.store({ items: a.value }).turnStoredIntoOriginal(), re.value = !1, Be(() => {
561
+ j.value = ae(), Te.value, l("read-response", e);
561
562
  });
562
- }, bt = () => Be(() => I.value = !0), gt = () => {
563
+ }, kt = () => Be(() => I.value = !0), ht = () => {
563
564
  W.value.doRefresh();
564
- }, fe = Qt(12), Ve = s(() => {
565
+ }, ce = Yt(12), we = i(() => {
565
566
  if (!t.hideEmptyColumns) return [];
566
567
  let e = [];
567
568
  return w.value.forEach((d) => {
568
- let C = d.key, M = !1;
569
- a.value.forEach((O) => {
570
- if (typeof O.checkEmpty == "function")
571
- return O.checkEmpty(O);
572
- O[C] && (M = !0);
573
- }), M || e.push(C);
569
+ let C = d.key, R = !1;
570
+ a.value.forEach((A) => {
571
+ if (typeof A.checkEmpty == "function")
572
+ return A.checkEmpty(A);
573
+ A[C] && (R = !0);
574
+ }), R || e.push(C);
574
575
  }), e;
575
- }), he = s(() => w.value.filter((e) => !e.hidden)), we = s(() => w.value.filter((e) => e.hidden)), kt = s(() => {
576
+ }), he = i(() => w.value.filter((e) => !e.hidden)), Ee = i(() => w.value.filter((e) => e.hidden)), Ct = i(() => {
576
577
  let e = he.value.length + 1;
577
578
  return t.sortable && ++e, e;
578
- }), ht = s(() => w.value.filter((e) => e.isForRowKey)), Oe = s(() => we.value.length > 0 && !t.sortable), Ct = s(() => w.value.map((e) => e.key)), Ue = s(() => {
579
+ }), Bt = i(() => w.value.filter((e) => e.isForRowKey)), Oe = i(() => Ee.value.length > 0 && !t.sortable), St = i(() => w.value.map((e) => e.key)), Ue = i(() => {
579
580
  let e = [];
580
- for (let d in l) Ct.value.indexOf(d) !== -1 && e.push(d);
581
+ for (let d in n) St.value.indexOf(d) !== -1 && e.push(d);
581
582
  return e;
582
- }), je = s(() => {
583
+ }), _e = i(() => {
583
584
  var e;
584
- return t.hiddenSave || I.value || !((e = F.value) != null && e.resource || F.value.type) ? !1 : m.value && re.value ? !0 : m.value;
585
- }), Bt = s(() => Ce.value && a.value.length >= t.requiredItemsForTopCreate || ze.value ? !0 : je.value || m.value && ce.value), Ee = s(() => {
585
+ return t.hiddenSave || I.value || !((e = N.value) != null && e.resource || N.value.type) ? !1 : m.value && re.value ? !0 : m.value;
586
+ }), Dt = i(() => Ce.value && a.value.length >= t.requiredItemsForTopCreate || ze.value ? !0 : _e.value || m.value && ye.value), Te = i(() => {
586
587
  var e, d;
587
- return H.value, typeof ((e = F.value) == null ? void 0 : e.disabled) == "function" ? F.value.disabled({
588
+ return j.value, typeof ((e = N.value) == null ? void 0 : e.disabled) == "function" ? N.value.disabled({
588
589
  value: a.value,
589
590
  dataState: r.value
590
- }) : typeof ((d = F.value) == null ? void 0 : d.disabled) == "boolean" ? F.value.disabled : !re.value;
591
- }), St = s(() => a.value.length), Dt = s(() => {
591
+ }) : typeof ((d = N.value) == null ? void 0 : d.disabled) == "boolean" ? N.value.disabled : !re.value;
592
+ }), It = i(() => a.value.length), Vt = i(() => {
592
593
  var e;
593
594
  return {
594
595
  items: a.value,
595
- ...(e = F.value) == null ? void 0 : e.resourceData
596
+ ...(e = N.value) == null ? void 0 : e.resourceData
596
597
  };
597
- }), It = s(() => t.titleTag === "" ? "h2" : t.titleTag), Vt = s(() => t.wrapContentTag === "" ? "div" : t.wrapContentTag), Te = s(() => dt(t.title)), $e = s(() => {
598
+ }), wt = i(() => t.titleTag === "" ? "h2" : t.titleTag), Et = i(() => t.wrapContentTag === "" ? "div" : t.wrapContentTag), $e = i(() => pt(t.title)), Re = i(() => {
598
599
  var e;
599
600
  return (e = t.drag) == null ? void 0 : e.enabled;
600
- }), ce = s(() => V.value.includes(X.Create)), He = s(() => V.value.includes("read")), ie = s(() => V.value.includes(X.Update)), _e = s(() => V.value.includes(X.Edit)), qe = s(() => V.value.includes(X.InlineEdit)), wt = s(() => V.value.includes(X.ModalCreate)), Et = s(() => V.value.includes(X.InlineCreate)), Ke = s(() => V.value.includes(X.InlineCreateEver)), se = s(() => V.value.includes(X.Drop)), Tt = s(() => V.value.includes(X.SwitchEditMode)), ze = s(() => !Tt.value || !ie.value && !se.value || !ie.value && se.value ? !1 : !I.value), $t = s(() => {
601
+ }), ye = i(() => V.value.includes(X.Create)), je = i(() => V.value.includes("read")), ie = i(() => V.value.includes(X.Update)), He = i(() => V.value.includes(X.Edit)), qe = i(() => V.value.includes(X.InlineEdit)), Tt = i(() => V.value.includes(X.ModalCreate)), $t = i(() => V.value.includes(X.InlineCreate)), Ke = i(() => V.value.includes(X.InlineCreateEver)), se = i(() => V.value.includes(X.Drop)), Rt = i(() => V.value.includes(X.SwitchEditMode)), ze = i(() => !Rt.value || !ie.value && !se.value || !ie.value && se.value ? !1 : !I.value), Mt = i(() => {
601
602
  var e;
602
- return (typeof ((e = t.paginator) == null ? void 0 : e.type) < "u" && [De.LoadMore, De.Infinite].includes(t.paginator.type) || !I.value) && a.value.length > 0;
603
- }), Mt = (e) => {
603
+ return (typeof ((e = t.paginator) == null ? void 0 : e.type) < "u" && [Ie.LoadMore, Ie.Infinite].includes(t.paginator.type) || !I.value) && a.value.length > 0;
604
+ }), Lt = (e) => {
604
605
  let d = e.target;
605
606
  if (typeof d.dataset.column > "u")
606
607
  do
@@ -608,34 +609,34 @@ const ol = /* @__PURE__ */ te({
608
609
  while (typeof d.dataset.column > "u" && d.tagName !== "TABLE" && d.tagName !== "body");
609
610
  if (d.tagName === "TD" && (d = d.parentNode, d = d.dataset.i, typeof d < "u"))
610
611
  return a.value[d];
611
- }, Rt = (e) => a.value[e], Lt = (e) => {
612
+ }, Pt = (e) => a.value[e], Nt = (e) => {
612
613
  var d;
613
- return (d = j.value) == null ? void 0 : d.querySelector(`[data-i="${e}"]`);
614
- }, We = (e) => N.value["tr_" + e] === !0, Ge = (e) => {
615
- e && e.sortable && (a.value = a.value.sort((d, C) => D.value(d, C, e, i.value)), i.value = i.value === ne.Asc ? ne.Desc : ne.Asc, k.value = e.key, H.value = ae(), n("sort", [k.value, i.value]));
614
+ return (d = _.value) == null ? void 0 : d.querySelector(`[data-i="${e}"]`);
615
+ }, We = (e) => U.value["tr_" + e] === !0, Ge = (e) => {
616
+ e && e.sortable && (a.value = a.value.sort((d, C) => D.value(d, C, e, s.value)), s.value = s.value === ne.Asc ? ne.Desc : ne.Asc, k.value = e.key, j.value = ae(), l("sort", [k.value, s.value]));
616
617
  }, Je = (e) => {
617
- n("click", e);
618
+ l("click", e);
618
619
  }, Qe = (e, d) => {
619
620
  let C = "tr_" + d;
620
- N.value[C] = typeof N.value[C] > "u" ? !0 : !N.value[C];
621
- }, Pt = (e) => {
622
- var C, M, O, q, B, g, R, G;
623
- let d = parseInt((q = (O = (M = (C = e == null ? void 0 : e.originalEvent) == null ? void 0 : C.toElement) == null ? void 0 : M.closest("tr")) == null ? void 0 : O.dataset) == null ? void 0 : q.i);
624
- return !(typeof ((B = t.drag) == null ? void 0 : B.isValid) == "function" && !((g = t.drag) != null && g.isValid(a.value[d])) || typeof ((R = t.drag) == null ? void 0 : R.isValid) == "boolean" && !((G = t.drag) != null && G.isValid));
621
+ U.value[C] = typeof U.value[C] > "u" ? !0 : !U.value[C];
622
+ }, Ft = (e) => {
623
+ var C, R, A, q, B, g, M, G;
624
+ let d = parseInt((q = (A = (R = (C = e == null ? void 0 : e.originalEvent) == null ? void 0 : C.toElement) == null ? void 0 : R.closest("tr")) == null ? void 0 : A.dataset) == null ? void 0 : q.i);
625
+ return !(typeof ((B = t.drag) == null ? void 0 : B.isValid) == "function" && !((g = t.drag) != null && g.isValid(a.value[d])) || typeof ((M = t.drag) == null ? void 0 : M.isValid) == "boolean" && !((G = t.drag) != null && G.isValid));
625
626
  }, Xe = (e) => {
626
627
  var d, C;
627
628
  return typeof ((d = t.drag) == null ? void 0 : d.isDraggable) == "function" ? (C = t.drag) == null ? void 0 : C.isDraggable(e) : !0;
628
629
  }, Ye = () => {
629
- if (ce.value) {
630
- n("click-create");
630
+ if (ye.value) {
631
+ l("click-create");
631
632
  return;
632
633
  }
633
634
  if (Ke.value)
634
- n("click-create");
635
+ l("click-create");
635
636
  else {
636
637
  if (typeof t.newValueGenerator == "function") {
637
638
  let e = t.newValueGenerator();
638
- if (typeof e == "object" || t.type !== ye.Table) {
639
+ if (typeof e == "object" || t.type !== be.Table) {
639
640
  a.value.push(e);
640
641
  return;
641
642
  }
@@ -644,118 +645,118 @@ const ol = /* @__PURE__ */ te({
644
645
  }
645
646
  }, Ze = (e) => {
646
647
  a.value.push(e);
647
- }, xe = () => I.value = !0, et = () => I.value = !1, Nt = (e, d) => {
648
- var C, M, O;
649
- if (!((C = F.value) != null && C.type && [
648
+ }, xe = () => I.value = !0, et = () => I.value = !1, At = (e, d) => {
649
+ var C, R, A;
650
+ if (!((C = N.value) != null && C.type && [
650
651
  Ne.Split,
651
652
  Ne.SplitEver,
652
653
  Ne.SplitLazy
653
- ].includes((M = F.value) == null ? void 0 : M.type))) {
654
- if (n("before-save"), (O = F.value) != null && O.resource && (I.value = !1, !d.success)) {
655
- n("error", d.httpStatus);
654
+ ].includes((R = N.value) == null ? void 0 : R.type))) {
655
+ if (l("before-save"), (A = N.value) != null && A.resource && (I.value = !1, !d.success)) {
656
+ l("error", d.httpStatus);
656
657
  return;
657
658
  }
658
- r.value.turnStoredIntoOriginal(), re.value = !1, n("save", d);
659
+ r.value.turnStoredIntoOriginal(), re.value = !1, l("save", d);
659
660
  }
660
661
  }, tt = (e, d, C) => {
661
662
  if (C >= e.length) {
662
- let M = C - e.length + 1;
663
- for (; M--; ) e.push(void 0);
663
+ let R = C - e.length + 1;
664
+ for (; R--; ) e.push(void 0);
664
665
  }
665
666
  return e.splice(C, 0, e.splice(d, 1)[0]), e;
666
- }, Ft = (e) => {
667
- tt(a.value, e, e - 1), H.value = ae();
668
- }, At = (e) => {
669
- tt(a.value, e, e + 1), H.value = ae();
667
+ }, Ot = (e) => {
668
+ tt(a.value, e, e - 1), j.value = ae();
669
+ }, Ut = (e) => {
670
+ tt(a.value, e, e + 1), j.value = ae();
670
671
  }, Me = (e) => {
671
- a.value.splice(e, 1), H.value = ae();
672
- }, Ot = () => {
672
+ a.value.splice(e, 1), j.value = ae();
673
+ }, _t = () => {
673
674
  var e;
674
675
  x.value && typeof ((e = x.value) == null ? void 0 : e.destroy) == "function" && (x.value.destroy(), x.value = {});
675
676
  }, lt = () => {
676
- E.value || (E.value = document.getElementById("lkt-table-body-" + fe)), x.value = new Yt(E.value, {
677
+ E.value || (E.value = document.getElementById("lkt-table-body-" + ce)), x.value = new xt(E.value, {
677
678
  direction: "vertical",
678
679
  handle: ".handle",
679
680
  animation: 150,
680
681
  onEnd: function(e) {
681
682
  let d = e.oldIndex, C = e.newIndex;
682
- a.value.splice(C, 0, a.value.splice(d, 1)[0]), H.value = ae(), n("drag-end", a.value[C]);
683
+ a.value.splice(C, 0, a.value.splice(d, 1)[0]), j.value = ae(), l("drag-end", a.value[C]);
683
684
  },
684
685
  onMove: function(e, d) {
685
- return Pt(e);
686
+ return Ft(e);
686
687
  }
687
688
  });
688
- }, Re = (e, d, C = !1) => {
689
- let M = [H.value, fe, "row", d];
690
- return C && M.push("hidden"), ht.value.forEach((O) => {
691
- let q = String(e[O.key]).toLowerCase();
692
- q.length > 50 && (q = q.substring(0, 50)), q = pt(q, " ", "-"), M.push(q);
693
- }), M.join("-");
694
- }, at = s(() => typeof t.createEnabledValidator == "function" ? t.createEnabledValidator({ items: a.value }) : !0), Ce = s(() => Ke.value || ce.value && m.value || Et.value && m.value || wt.value && m.value), Ut = s(() => [ye.Ol, ye.Ul].includes(t.type)), Le = (e, d) => typeof t.itemDisplayChecker == "function" ? t.itemDisplayChecker(e) : !0;
695
- zt(() => {
689
+ }, Le = (e, d, C = !1) => {
690
+ let R = [j.value, ce, "row", d];
691
+ return C && R.push("hidden"), Bt.value.forEach((A) => {
692
+ let q = String(e[A.key]).toLowerCase();
693
+ q.length > 50 && (q = q.substring(0, 50)), q = mt(q, " ", "-"), R.push(q);
694
+ }), R.join("-");
695
+ }, at = i(() => typeof t.createEnabledValidator == "function" ? t.createEnabledValidator({ items: a.value }) : !0), Ce = i(() => Ke.value || ye.value && m.value || $t.value && m.value || Tt.value && m.value), jt = i(() => [be.Ol, be.Ul].includes(t.type)), Pe = (e, d) => typeof t.itemDisplayChecker == "function" ? t.itemDisplayChecker(e) : !0;
696
+ Gt(() => {
696
697
  var e;
697
- t.initialSorting && Ge(al(t.columns, k.value)), r.value.store({ items: a.value }).turnStoredIntoOriginal(), re.value = !1, (e = t.drag) != null && e.enabled && Be(() => {
698
+ t.initialSorting && Ge(nl(t.columns, k.value)), r.value.store({ items: a.value }).turnStoredIntoOriginal(), re.value = !1, (e = t.drag) != null && e.enabled && Be(() => {
698
699
  lt();
699
700
  });
700
- }), A(() => {
701
+ }), F(() => {
701
702
  var e;
702
703
  return (e = t.drag) == null ? void 0 : e.enabled;
703
704
  }, (e) => {
704
- e ? lt() : Ot();
705
- }), A(() => t.perms, (e) => V.value = e), A(V, (e) => n("update:perms", e)), A(() => t.editMode, (e) => m.value = e), A(() => t.columns, (e) => w.value = e, { deep: !0 }), A(() => t.modelValue, (e) => a.value = e, { deep: !0 }), A(a, (e) => {
706
- r.value.increment({ items: e }), re.value = r.value.changed(), n("update:modelValue", e);
705
+ e ? lt() : _t();
706
+ }), F(() => t.perms, (e) => V.value = e), F(V, (e) => l("update:perms", e)), F(() => t.editMode, (e) => m.value = e), F(() => t.columns, (e) => w.value = e, { deep: !0 }), F(() => t.modelValue, (e) => a.value = e, { deep: !0 }), F(a, (e) => {
707
+ r.value.increment({ items: e }), re.value = r.value.changed(), l("update:modelValue", e);
707
708
  }, { deep: !0 }), v({
708
- getItemByEvent: Mt,
709
- getItemByIndex: Rt,
710
- getRowByIndex: Lt,
711
- doRefresh: gt,
712
- getHtml: () => ve.value,
709
+ getItemByEvent: Lt,
710
+ getItemByIndex: Pt,
711
+ getRowByIndex: Nt,
712
+ doRefresh: ht,
713
+ getHtml: () => fe.value,
713
714
  turnStoredIntoOriginal: () => {
714
715
  r.value.turnStoredIntoOriginal(), Be(() => {
715
- H.value = ae();
716
+ j.value = ae();
716
717
  });
717
718
  }
718
719
  });
719
- const jt = s(() => typeof $.defaultEmptySlot < "u"), Ht = s(() => $.defaultEmptySlot), _t = s(() => !t.drag || Object.keys(t.drag).length === 0 || !t.drag.enabled ? !1 : typeof t.drag.canRender > "u" ? !0 : t.drag.canRender), qt = s(() => !t.drag || Object.keys(t.drag).length === 0 || !t.drag.enabled || typeof t.drag.isDisabled > "u" ? !1 : t.drag.isDisabled);
720
+ const Ht = i(() => typeof $.defaultEmptySlot < "u"), qt = i(() => $.defaultEmptySlot), Kt = i(() => !t.drag || Object.keys(t.drag).length === 0 || !t.drag.enabled ? !1 : typeof t.drag.canRender > "u" ? !0 : t.drag.canRender), zt = i(() => !t.drag || Object.keys(t.drag).length === 0 || !t.drag.enabled || typeof t.drag.isDisabled > "u" ? !1 : t.drag.isDisabled);
720
721
  return (e, d) => {
721
- const C = z("lkt-button"), M = z("lkt-field"), O = z("lkt-loader"), q = z("lkt-paginator");
722
+ const C = z("lkt-button"), R = z("lkt-field"), A = z("lkt-loader"), q = z("lkt-paginator");
722
723
  return u(), p("section", {
723
724
  ref_key: "element",
724
- ref: ve,
725
+ ref: fe,
725
726
  class: "lkt-table-page",
726
- id: "lkt-table-page-" + b(fe)
727
+ id: "lkt-table-page-" + y(ce)
727
728
  }, [
728
- Te.value || b(l).title ? (u(), p("header", {
729
+ $e.value || y(n).title ? (u(), p("header", {
729
730
  key: 0,
730
731
  class: K(e.headerClass)
731
732
  }, [
732
- Te.value ? (u(), S(Z(It.value), { key: 0 }, {
733
+ $e.value ? (u(), S(Z(wt.value), { key: 0 }, {
733
734
  default: L(() => [
734
735
  e.titleIcon ? (u(), p("i", {
735
736
  key: 0,
736
737
  class: K(e.titleIcon)
737
- }, null, 2)) : c("", !0),
738
- ee(" " + ue(Te.value), 1)
738
+ }, null, 2)) : f("", !0),
739
+ ee(" " + ue($e.value), 1)
739
740
  ]),
740
741
  _: 1
741
- })) : c("", !0),
742
- b(l).title ? T(e.$slots, "title", { key: 1 }) : c("", !0)
743
- ], 2)) : c("", !0),
744
- (u(), S(Z(Vt.value), {
742
+ })) : f("", !0),
743
+ y(n).title ? T(e.$slots, "title", { key: 1 }) : f("", !0)
744
+ ], 2)) : f("", !0),
745
+ (u(), S(Z(Et.value), {
745
746
  class: K(["lkt-table-page-content-wrapper", e.wrapContentClass])
746
747
  }, {
747
748
  default: L(() => [
748
- Bt.value ? (u(), p("div", Vl, [
749
- be(pe(C, Q({
749
+ Dt.value ? (u(), p("div", El, [
750
+ ge(pe(C, Q({
750
751
  class: "lkt-table--save-button",
751
752
  ref_key: "saveButtonRef",
752
- ref: Ie
753
- }, F.value, {
754
- disabled: Ee.value,
755
- "modal-data": Dt.value,
753
+ ref: Ve
754
+ }, N.value, {
755
+ disabled: Te.value,
756
+ "modal-data": Vt.value,
756
757
  onLoading: xe,
757
758
  onLoaded: et,
758
- onClick: Nt
759
+ onClick: At
759
760
  }), {
760
761
  split: L(({ doClose: B, doRootClick: g }) => [
761
762
  T(e.$slots, "button-save-split", {
@@ -767,16 +768,16 @@ const ol = /* @__PURE__ */ te({
767
768
  })
768
769
  ]),
769
770
  default: L(() => [
770
- b(l)["button-save"] ? T(e.$slots, "button-save", {
771
+ y(n)["button-save"] ? T(e.$slots, "button-save", {
771
772
  key: 0,
772
773
  items: a.value,
773
774
  editMode: e.editMode,
774
- canUpdate: !Ee.value
775
- }) : c("", !0)
775
+ canUpdate: !Te.value
776
+ }) : f("", !0)
776
777
  ]),
777
778
  _: 3
778
779
  }, 16, ["disabled", "modal-data"]), [
779
- [ge, je.value]
780
+ [ke, _e.value]
780
781
  ]),
781
782
  Ce.value && a.value.length >= e.requiredItemsForTopCreate ? (u(), S(ut, {
782
783
  key: 0,
@@ -784,103 +785,103 @@ const ol = /* @__PURE__ */ te({
784
785
  disabled: !at.value,
785
786
  onClick: Ye,
786
787
  onAppend: Ze
787
- }, null, 8, ["config", "disabled"])) : c("", !0),
788
- U("div", wl, [
789
- be(pe(M, Q(ft.value, {
788
+ }, null, 8, ["config", "disabled"])) : f("", !0),
789
+ O("div", Tl, [
790
+ ge(pe(R, Q(ct.value, {
790
791
  modelValue: m.value,
791
792
  "onUpdate:modelValue": d[0] || (d[0] = (B) => m.value = B)
792
793
  }), null, 16, ["modelValue"]), [
793
- [ge, ze.value]
794
+ [ke, ze.value]
794
795
  ])
795
796
  ])
796
- ])) : c("", !0),
797
- b(l).buttons ? (u(), p("div", El, [
797
+ ])) : f("", !0),
798
+ y(n).buttons ? (u(), p("div", $l, [
798
799
  T(e.$slots, "buttons")
799
- ])) : c("", !0),
800
- le.value && b(l).filters ? (u(), p("div", Tl, [
800
+ ])) : f("", !0),
801
+ le.value && y(n).filters ? (u(), p("div", Rl, [
801
802
  T(e.$slots, "filters", {
802
803
  items: a.value,
803
804
  isLoading: I.value
804
805
  })
805
- ])) : c("", !0),
806
- be(U("div", $l, [
807
- e.type === b(ye).Table ? (u(), p("table", Ml, [
808
- U("thead", null, [
809
- U("tr", null, [
810
- $e.value && m.value ? (u(), p("th", Rl)) : c("", !0),
811
- e.addNavigation && m.value ? (u(), p("th", Ll)) : c("", !0),
812
- Oe.value ? (u(), p("th", Pl)) : c("", !0),
806
+ ])) : f("", !0),
807
+ ge(O("div", Ml, [
808
+ e.type === y(be).Table ? (u(), p("table", Ll, [
809
+ O("thead", null, [
810
+ O("tr", null, [
811
+ Re.value && m.value ? (u(), p("th", Pl)) : f("", !0),
812
+ e.addNavigation && m.value ? (u(), p("th", Nl)) : f("", !0),
813
+ Oe.value ? (u(), p("th", Fl)) : f("", !0),
813
814
  (u(!0), p(P, null, J(he.value, (B) => (u(), p(P, null, [
814
- Ve.value.indexOf(B.key) === -1 ? (u(), S(Dl, {
815
+ we.value.indexOf(B.key) === -1 ? (u(), S(Vl, {
815
816
  key: 0,
816
817
  column: B,
817
818
  "sort-by": k.value,
818
- "sort-direction": i.value,
819
+ "sort-direction": s.value,
819
820
  "amount-of-columns": e.columns.length,
820
821
  items: a.value,
821
822
  onClick: (g) => Ge(B)
822
- }, null, 8, ["column", "sort-by", "sort-direction", "amount-of-columns", "items", "onClick"])) : c("", !0)
823
+ }, null, 8, ["column", "sort-by", "sort-direction", "amount-of-columns", "items", "onClick"])) : f("", !0)
823
824
  ], 64))), 256)),
824
- se.value && m.value ? (u(), p("th", Nl)) : c("", !0),
825
- _e.value && ie.value && m.value ? (u(), p("th", Fl)) : c("", !0)
825
+ se.value && m.value ? (u(), p("th", Al)) : f("", !0),
826
+ He.value && ie.value && m.value ? (u(), p("th", Ol)) : f("", !0)
826
827
  ])
827
828
  ]),
828
- U("tbody", {
829
+ O("tbody", {
829
830
  ref_key: "tableBody",
830
- ref: j,
831
- id: "lkt-table-body-" + b(fe)
831
+ ref: _,
832
+ id: "lkt-table-body-" + y(ce)
832
833
  }, [
833
- (u(!0), p(P, null, J(a.value, (B, g) => be((u(), S(yl, {
834
+ (u(!0), p(P, null, J(a.value, (B, g) => ge((u(), S(gl, {
834
835
  modelValue: a.value[g],
835
- "onUpdate:modelValue": (R) => a.value[g] = R,
836
- key: Re(B, g),
836
+ "onUpdate:modelValue": (M) => a.value[g] = M,
837
+ key: Le(B, g),
837
838
  i: g,
838
- "drop-button": e.dropButton,
839
+ "drop-button": yt.value,
839
840
  "edit-button": e.editButton,
840
841
  "display-hidden-columns-indicator": Oe.value,
841
842
  "is-draggable": Xe(B),
842
- sortable: $e.value,
843
+ sortable: Re.value,
843
844
  "visible-columns": he.value,
844
- "empty-columns": Ve.value,
845
+ "empty-columns": we.value,
845
846
  "add-navigation": e.addNavigation,
846
847
  "hidden-is-visible": We(g),
847
- "latest-row": g + 1 === St.value,
848
+ "latest-row": g + 1 === It.value,
848
849
  "can-drop": se.value && m.value,
849
- "can-edit": _e.value && ie.value && m.value,
850
+ "can-edit": He.value && ie.value && m.value,
850
851
  "edit-mode-enabled": m.value,
851
852
  "has-inline-edit-perm": qe.value,
852
853
  "row-display-type": e.rowDisplayType,
853
- "render-drag": _t.value,
854
- "disabled-drag": qt.value,
854
+ "render-drag": Kt.value,
855
+ "disabled-drag": zt.value,
855
856
  onClick: Je,
856
857
  onShow: Qe,
857
- onItemUp: Ft,
858
- onItemDown: At,
858
+ onItemUp: Ot,
859
+ onItemDown: Ut,
859
860
  onItemDrop: Me
860
861
  }, nt({ _: 2 }, [
861
- b(l)[`item-${g}`] ? {
862
+ y(n)[`item-${g}`] ? {
862
863
  name: `item-${g}`,
863
- fn: L((R) => [
864
+ fn: L((M) => [
864
865
  T(e.$slots, `item-${g}`, oe({
865
- [e.slotItemVar || ""]: R.item,
866
+ [e.slotItemVar || ""]: M.item,
866
867
  index: g
867
868
  }))
868
869
  ]),
869
870
  key: "0"
870
- } : b(l).item ? {
871
+ } : y(n).item ? {
871
872
  name: "item",
872
- fn: L((R) => [
873
+ fn: L((M) => [
873
874
  T(e.$slots, "item", oe({
874
- [e.slotItemVar || ""]: R.item,
875
+ [e.slotItemVar || ""]: M.item,
875
876
  index: g
876
877
  }))
877
878
  ]),
878
879
  key: "1"
879
880
  } : void 0,
880
- J(Ue.value, (R) => ({
881
- name: R,
881
+ J(Ue.value, (M) => ({
882
+ name: M,
882
883
  fn: L((G) => [
883
- T(e.$slots, R, oe({
884
+ T(e.$slots, M, oe({
884
885
  [e.slotItemVar || ""]: G.item,
885
886
  value: G.value,
886
887
  column: G.column
@@ -888,70 +889,70 @@ const ol = /* @__PURE__ */ te({
888
889
  ])
889
890
  }))
890
891
  ]), 1032, ["modelValue", "onUpdate:modelValue", "i", "drop-button", "edit-button", "display-hidden-columns-indicator", "is-draggable", "sortable", "visible-columns", "empty-columns", "add-navigation", "hidden-is-visible", "latest-row", "can-drop", "can-edit", "edit-mode-enabled", "has-inline-edit-perm", "row-display-type", "render-drag", "disabled-drag"])), [
891
- [ge, Le(a.value[g])]
892
+ [ke, Pe(a.value[g])]
892
893
  ])), 128)),
893
- we.value.length > 0 ? (u(!0), p(P, { key: 0 }, J(a.value, (B, g) => (u(), S(Bl, {
894
+ Ee.value.length > 0 ? (u(!0), p(P, { key: 0 }, J(a.value, (B, g) => (u(), S(Dl, {
894
895
  modelValue: a.value[g],
895
- "onUpdate:modelValue": (R) => a.value[g] = R,
896
- key: Re(B, g, !0),
896
+ "onUpdate:modelValue": (M) => a.value[g] = M,
897
+ key: Le(B, g, !0),
897
898
  i: g,
898
- "hidden-columns": we.value,
899
- "hidden-columns-col-span": kt.value,
899
+ "hidden-columns": Ee.value,
900
+ "hidden-columns-col-span": Ct.value,
900
901
  "is-draggable": Xe(B),
901
- sortable: $e.value,
902
+ sortable: Re.value,
902
903
  "visible-columns": he.value,
903
- "empty-columns": Ve.value,
904
+ "empty-columns": we.value,
904
905
  "hidden-is-visible": We(g),
905
906
  "edit-mode-enabled": m.value,
906
907
  "has-inline-edit-perm": qe.value,
907
908
  onClick: Je,
908
909
  onShow: Qe
909
910
  }, nt({ _: 2 }, [
910
- J(Ue.value, (R) => ({
911
- name: R,
911
+ J(Ue.value, (M) => ({
912
+ name: M,
912
913
  fn: L((G) => [
913
- T(e.$slots, R, oe({
914
+ T(e.$slots, M, oe({
914
915
  [e.slotItemVar || ""]: G.item,
915
916
  value: G.value,
916
917
  column: G.column
917
918
  }))
918
919
  ])
919
920
  }))
920
- ]), 1032, ["modelValue", "onUpdate:modelValue", "i", "hidden-columns", "hidden-columns-col-span", "is-draggable", "sortable", "visible-columns", "empty-columns", "hidden-is-visible", "edit-mode-enabled", "has-inline-edit-perm"]))), 128)) : c("", !0)
921
- ], 8, Al)
922
- ])) : e.type === b(ye).Item ? (u(), p("div", {
921
+ ]), 1032, ["modelValue", "onUpdate:modelValue", "i", "hidden-columns", "hidden-columns-col-span", "is-draggable", "sortable", "visible-columns", "empty-columns", "hidden-is-visible", "edit-mode-enabled", "has-inline-edit-perm"]))), 128)) : f("", !0)
922
+ ], 8, Ul)
923
+ ])) : e.type === y(be).Item ? (u(), p("div", {
923
924
  key: 1,
924
925
  ref_key: "tableBody",
925
- ref: j,
926
- id: "lkt-table-body-" + b(fe),
926
+ ref: _,
927
+ id: "lkt-table-body-" + y(ce),
927
928
  class: K(["lkt-table-items-container", e.itemsContainerClass])
928
929
  }, [
929
930
  (u(!0), p(P, null, J(a.value, (B, g) => (u(), p(P, null, [
930
- Le(B) ? (u(), p("div", {
931
+ Pe(B) ? (u(), p("div", {
931
932
  class: "lkt-table-item",
932
933
  "data-i": g,
933
- key: Re(B, g)
934
+ key: Le(B, g)
934
935
  }, [
935
936
  T(e.$slots, "item", oe({
936
937
  [e.slotItemVar || ""]: B,
937
938
  index: g,
938
939
  editing: m.value,
939
- canCreate: ce.value,
940
- canRead: He.value,
940
+ canCreate: ye.value,
941
+ canRead: je.value,
941
942
  canUpdate: ie.value,
942
943
  canDrop: se.value,
943
944
  isLoading: I.value,
944
945
  doDrop: () => Me(g)
945
946
  }))
946
- ], 8, Ul)) : c("", !0)
947
+ ], 8, jl)) : f("", !0)
947
948
  ], 64))), 256))
948
- ], 10, Ol)) : Ut.value ? (u(), S(Z(e.type), {
949
+ ], 10, _l)) : jt.value ? (u(), S(Z(e.type), {
949
950
  key: 2,
950
951
  class: K(["lkt-table-items-container", e.itemsContainerClass])
951
952
  }, {
952
953
  default: L(() => [
953
954
  (u(!0), p(P, null, J(a.value, (B, g) => (u(), p(P, null, [
954
- Le(B) ? (u(), p("li", {
955
+ Pe(B) ? (u(), p("li", {
955
956
  key: 0,
956
957
  class: "lkt-table-item",
957
958
  "data-i": g
@@ -960,73 +961,73 @@ const ol = /* @__PURE__ */ te({
960
961
  [e.slotItemVar || ""]: B,
961
962
  index: g,
962
963
  editing: m.value,
963
- canCreate: ce.value,
964
- canRead: He.value,
964
+ canCreate: ye.value,
965
+ canRead: je.value,
965
966
  canUpdate: ie.value,
966
967
  canDrop: se.value,
967
968
  isLoading: I.value,
968
969
  doDrop: () => Me(g)
969
970
  }))
970
- ], 8, jl)) : c("", !0)
971
+ ], 8, Hl)) : f("", !0)
971
972
  ], 64))), 256))
972
973
  ]),
973
974
  _: 3
974
- }, 8, ["class"])) : c("", !0)
975
+ }, 8, ["class"])) : f("", !0)
975
976
  ], 512), [
976
- [ge, $t.value]
977
+ [ke, Mt.value]
977
978
  ]),
978
- !I.value && a.value.length === 0 ? (u(), p("div", Hl, [
979
- b(l).empty ? T(e.$slots, "empty", { key: 0 }) : jt.value ? (u(), S(Z(Ht.value), {
979
+ !I.value && a.value.length === 0 ? (u(), p("div", ql, [
980
+ y(n).empty ? T(e.$slots, "empty", { key: 0 }) : Ht.value ? (u(), S(Z(qt.value), {
980
981
  key: 1,
981
982
  message: e.noResultsText
982
983
  }, null, 8, ["message"])) : e.noResultsText ? (u(), p(P, { key: 2 }, [
983
984
  ee(ue(e.noResultsText), 1)
984
- ], 64)) : c("", !0)
985
- ])) : c("", !0),
986
- I.value ? (u(), S(O, { key: 4 })) : c("", !0),
987
- Ce.value || b(l).bottomButtons ? (u(), p("div", _l, [
985
+ ], 64)) : f("", !0)
986
+ ])) : f("", !0),
987
+ I.value ? (u(), S(A, { key: 4 })) : f("", !0),
988
+ Ce.value || y(n).bottomButtons ? (u(), p("div", Kl, [
988
989
  Ce.value && a.value.length >= e.requiredItemsForBottomCreate ? (u(), S(ut, {
989
990
  key: 0,
990
991
  config: Ae.value,
991
992
  disabled: !at.value,
992
993
  onClick: Ye,
993
994
  onAppend: Ze
994
- }, null, 8, ["config", "disabled"])) : c("", !0),
995
+ }, null, 8, ["config", "disabled"])) : f("", !0),
995
996
  T(e.$slots, "bottom-buttons")
996
- ])) : c("", !0),
997
+ ])) : f("", !0),
997
998
  e.paginator && Object.keys(e.paginator).length > 0 ? (u(), S(q, Q({
998
999
  key: 6,
999
1000
  ref_key: "paginatorRef",
1000
1001
  ref: W
1001
1002
  }, e.paginator, {
1002
- modelValue: _.value,
1003
- "onUpdate:modelValue": d[1] || (d[1] = (B) => _.value = B),
1004
- onLoading: bt,
1005
- onPerms: ct,
1006
- onResponse: yt
1007
- }), null, 16, ["modelValue"])) : c("", !0)
1003
+ modelValue: H.value,
1004
+ "onUpdate:modelValue": d[1] || (d[1] = (B) => H.value = B),
1005
+ onLoading: kt,
1006
+ onPerms: bt,
1007
+ onResponse: gt
1008
+ }), null, 16, ["modelValue"])) : f("", !0)
1008
1009
  ]),
1009
1010
  _: 3
1010
1011
  }, 8, ["class"]))
1011
- ], 8, Il);
1012
+ ], 8, wl);
1012
1013
  };
1013
1014
  }
1014
- }), Yl = {
1015
+ }), xl = {
1015
1016
  install: (o) => {
1016
- o.component("lkt-table") === void 0 && o.component("lkt-table", ql);
1017
+ o.component("lkt-table") === void 0 && o.component("lkt-table", zl);
1017
1018
  }
1018
- }, Zl = (o) => ($.navButtonSlot = o, !0), xl = (o) => ($.dropButtonSlot = o, !0), ea = (o) => ($.createButtonSlot = o, !0), ta = (o) => {
1019
+ }, ea = (o) => ($.navButtonSlot = o, !0), ta = (o) => ($.dropButtonSlot = o, !0), la = (o) => ($.createButtonSlot = o, !0), aa = (o) => {
1019
1020
  $.defaultEmptySlot = o;
1020
- }, la = (o) => {
1021
+ }, oa = (o) => {
1021
1022
  $.defaultSaveIcon = o;
1022
1023
  };
1023
1024
  export {
1024
- na as Column,
1025
- ua as createColumn,
1026
- Yl as default,
1027
- ea as setTableCreateButtonSlot,
1028
- xl as setTableDropButtonSlot,
1029
- ta as setTableEmptySlot,
1030
- Zl as setTableNavButtonSlot,
1031
- la as setTableSaveIcon
1025
+ ra as Column,
1026
+ ia as createColumn,
1027
+ xl as default,
1028
+ la as setTableCreateButtonSlot,
1029
+ ta as setTableDropButtonSlot,
1030
+ aa as setTableEmptySlot,
1031
+ ea as setTableNavButtonSlot,
1032
+ oa as setTableSaveIcon
1032
1033
  };