lkt-table 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/build.d.ts CHANGED
@@ -7,6 +7,7 @@ declare class F {
7
7
  editable: boolean;
8
8
  preferSlot: boolean;
9
9
  type: string;
10
+ link: string;
10
11
  isForRowKey: boolean;
11
12
  extractTitleFromColumn: string;
12
13
  slotData: {};
@@ -22,6 +23,7 @@ declare function Dl(t: any, n: any, i: any, a?: boolean): {
22
23
  editable: boolean;
23
24
  preferSlot: boolean;
24
25
  type: string;
26
+ link: string;
25
27
  isForRowKey: boolean;
26
28
  extractTitleFromColumn: string;
27
29
  slotData: {};
@@ -92,6 +94,7 @@ declare function Fl(t: any, n: any, i?: boolean): {
92
94
  editable: boolean;
93
95
  preferSlot: boolean;
94
96
  type: string;
97
+ link: string;
95
98
  isForRowKey: boolean;
96
99
  extractTitleFromColumn: string;
97
100
  slotData: {};
@@ -154,7 +157,7 @@ declare function Fl(t: any, n: any, i?: boolean): {
154
157
  getHref: (n: any) => any;
155
158
  doAction: (n: any) => any;
156
159
  };
157
- declare function Vl(t: any): {
160
+ declare function wl(t: any): {
158
161
  key: string;
159
162
  label: string;
160
163
  sortable: boolean;
@@ -162,6 +165,7 @@ declare function Vl(t: any): {
162
165
  editable: boolean;
163
166
  preferSlot: boolean;
164
167
  type: string;
168
+ link: string;
165
169
  isForRowKey: boolean;
166
170
  extractTitleFromColumn: string;
167
171
  slotData: {};
@@ -232,6 +236,7 @@ declare function Rl(t: any, n: any, i?: boolean): {
232
236
  editable: boolean;
233
237
  preferSlot: boolean;
234
238
  type: string;
239
+ link: string;
235
240
  isForRowKey: boolean;
236
241
  extractTitleFromColumn: string;
237
242
  slotData: {};
@@ -302,6 +307,7 @@ declare function Ul(t: any, n: any, i?: boolean): {
302
307
  editable: boolean;
303
308
  preferSlot: boolean;
304
309
  type: string;
310
+ link: string;
305
311
  isForRowKey: boolean;
306
312
  extractTitleFromColumn: string;
307
313
  slotData: {};
@@ -372,6 +378,7 @@ declare function $l(t: any, n: any, i?: boolean): {
372
378
  editable: boolean;
373
379
  preferSlot: boolean;
374
380
  type: string;
381
+ link: string;
375
382
  isForRowKey: boolean;
376
383
  extractTitleFromColumn: string;
377
384
  slotData: {};
@@ -442,6 +449,7 @@ declare function Al(t: any, n: any, i?: boolean): {
442
449
  editable: boolean;
443
450
  preferSlot: boolean;
444
451
  type: string;
452
+ link: string;
445
453
  isForRowKey: boolean;
446
454
  extractTitleFromColumn: string;
447
455
  slotData: {};
@@ -512,6 +520,7 @@ declare function Il(t: any, n: any, i?: boolean): {
512
520
  editable: boolean;
513
521
  preferSlot: boolean;
514
522
  type: string;
523
+ link: string;
515
524
  isForRowKey: boolean;
516
525
  extractTitleFromColumn: string;
517
526
  slotData: {};
@@ -582,6 +591,7 @@ declare function El(t: any, n: any, i: any, a?: boolean): {
582
591
  editable: boolean;
583
592
  preferSlot: boolean;
584
593
  type: string;
594
+ link: string;
585
595
  isForRowKey: boolean;
586
596
  extractTitleFromColumn: string;
587
597
  slotData: {};
@@ -652,6 +662,7 @@ declare function Nl(t: any, n: any, i: any, a?: boolean): {
652
662
  editable: boolean;
653
663
  preferSlot: boolean;
654
664
  type: string;
665
+ link: string;
655
666
  isForRowKey: boolean;
656
667
  extractTitleFromColumn: string;
657
668
  slotData: {};
@@ -722,6 +733,7 @@ declare function Ml(t: any, n: any, i?: boolean): {
722
733
  editable: boolean;
723
734
  preferSlot: boolean;
724
735
  type: string;
736
+ link: string;
725
737
  isForRowKey: boolean;
726
738
  extractTitleFromColumn: string;
727
739
  slotData: {};
@@ -792,6 +804,7 @@ declare function Ll(t: any, n: any, i?: boolean): {
792
804
  editable: boolean;
793
805
  preferSlot: boolean;
794
806
  type: string;
807
+ link: string;
795
808
  isForRowKey: boolean;
796
809
  extractTitleFromColumn: string;
797
810
  slotData: {};
@@ -862,6 +875,7 @@ declare function Tl(t: any, n: any, i?: boolean): {
862
875
  editable: boolean;
863
876
  preferSlot: boolean;
864
877
  type: string;
878
+ link: string;
865
879
  isForRowKey: boolean;
866
880
  extractTitleFromColumn: string;
867
881
  slotData: {};
@@ -932,4 +946,4 @@ declare function Kl(t: any): boolean;
932
946
  declare function ql(t: any): void;
933
947
  declare function Wl(t: any): boolean;
934
948
  import { Field as Pe } from "lkt-field";
935
- export { F as Column, Dl as createActionColumn, Fl as createCheckColumn, Vl as createColumn, Rl as createEmailColumn, Ul as createFileColumn, $l as createFloatColumn, Al as createHiddenColumn, Il as createIntegerColumn, El as createLinkColumn, Nl as createSelectColumn, Ml as createSwitchColumn, Ll as createTelColumn, Tl as createTextColumn, Pl as default, Hl as setTableCreateButtonSlot, Kl as setTableDropButtonSlot, ql as setTableEmptySlot, Wl as setTableNavButtonSlot };
949
+ export { F as Column, Dl as createActionColumn, Fl as createCheckColumn, wl as createColumn, Rl as createEmailColumn, Ul as createFileColumn, $l as createFloatColumn, Al as createHiddenColumn, Il as createIntegerColumn, El as createLinkColumn, Nl as createSelectColumn, Ml as createSwitchColumn, Ll as createTelColumn, Tl as createTextColumn, Pl as default, Hl as setTableCreateButtonSlot, Kl as setTableDropButtonSlot, ql as setTableEmptySlot, Wl as setTableNavButtonSlot };
package/dist/build.js CHANGED
@@ -3,14 +3,14 @@ import Ct, { Field as Pe } from "lkt-field";
3
3
  import { __ as re } from "lkt-i18n";
4
4
  import { replaceAll as qe, generateRandomString as St } from "lkt-string-tools";
5
5
  import { DataState as Bt } from "lkt-data-state";
6
- import wt from "sortablejs";
6
+ import Vt from "sortablejs";
7
7
  import { time as fe } from "lkt-date-tools";
8
- import Vt from "lkt-loader";
8
+ import wt from "lkt-loader";
9
9
  import Et from "lkt-button";
10
10
  import Dt from "lkt-paginator";
11
11
  class F {
12
12
  constructor(n = {}) {
13
- this.key = "", this.label = "", this.sortable = !0, this.hidden = !1, this.editable = !1, this.formatter = void 0, this.checkEmpty = void 0, this.colspan = void 0, this.preferSlot = !0, this.type = "", this.action = void 0, this.isForRowKey = !1, this.extractTitleFromColumn = "", this.slotData = {}, this.field = new Pe();
13
+ this.key = "", this.label = "", this.sortable = !0, this.hidden = !1, this.editable = !1, this.formatter = void 0, this.checkEmpty = void 0, this.colspan = void 0, this.preferSlot = !0, this.type = "", this.link = "", this.action = void 0, this.isForRowKey = !1, this.extractTitleFromColumn = "", this.slotData = {}, this.field = new Pe();
14
14
  for (let i in n)
15
15
  this[i] = n[i];
16
16
  this.field = new Pe(this.field);
@@ -24,8 +24,8 @@ class F {
24
24
  console.warn("No action defined");
25
25
  }
26
26
  }
27
- var w = /* @__PURE__ */ ((t) => (t.Text = "text", t.Number = "number", t.Check = "check", t.Switch = "switch", t.Select = "select", t.Email = "email", t.Tel = "tel", t.File = "file", t.Link = "link", t.Action = "action", t.Integer = "int", t.Float = "float", t))(w || {});
28
- const Vl = (t) => M(new F(t)), El = (t, n, i, a = !0) => M(new F({ key: t, label: n, sortable: a, type: w.Link, link: i })), Dl = (t, n, i, a = !0) => M(new F({ key: t, label: n, sortable: a, type: w.Action, action: i })), Tl = (t, n, i = !0) => M(new F({ key: t, label: n, type: w.Text, sortable: i })), Il = (t, n, i = !0) => M(new F({ key: t, label: n, type: w.Number, sortable: i })), $l = (t, n, i = !0) => M(new F({ key: t, label: n, type: w.Number, sortable: i })), Rl = (t, n, i = !0) => M(new F({ key: t, label: n, type: w.Email, sortable: i })), Ll = (t, n, i = !0) => M(new F({ key: t, label: n, type: w.Tel, sortable: i })), Fl = (t, n, i = !0) => M(new F({ key: t, label: n, type: w.Check, sortable: i })), Ml = (t, n, i = !0) => M(new F({ key: t, label: n, type: w.Switch, sortable: i })), Nl = (t, n, i, a = !0) => M(new F({ key: t, label: n, type: w.Select, sortable: a })), Ul = (t, n, i = !0) => M(new F({ key: t, label: n, type: w.File, sortable: i })), Al = (t, n, i = !0) => M(new F({ key: t, label: n, sortable: i, hidden: !0 })), We = (t, n, i, a) => {
27
+ var V = /* @__PURE__ */ ((t) => (t.Text = "text", t.Number = "number", t.Check = "check", t.Switch = "switch", t.Select = "select", t.Email = "email", t.Tel = "tel", t.File = "file", t.Link = "link", t.Action = "action", t.Integer = "int", t.Float = "float", t))(V || {});
28
+ const wl = (t) => M(new F(t)), El = (t, n, i, a = !0) => M(new F({ key: t, label: n, sortable: a, type: V.Link, link: i })), Dl = (t, n, i, a = !0) => M(new F({ key: t, label: n, sortable: a, type: V.Action, action: i })), Tl = (t, n, i = !0) => M(new F({ key: t, label: n, type: V.Text, sortable: i })), Il = (t, n, i = !0) => M(new F({ key: t, label: n, type: V.Number, sortable: i })), $l = (t, n, i = !0) => M(new F({ key: t, label: n, type: V.Number, sortable: i })), Rl = (t, n, i = !0) => M(new F({ key: t, label: n, type: V.Email, sortable: i })), Ll = (t, n, i = !0) => M(new F({ key: t, label: n, type: V.Tel, sortable: i })), Fl = (t, n, i = !0) => M(new F({ key: t, label: n, type: V.Check, sortable: i })), Ml = (t, n, i = !0) => M(new F({ key: t, label: n, type: V.Switch, sortable: i })), Nl = (t, n, i, a = !0) => M(new F({ key: t, label: n, type: V.Select, sortable: a })), Ul = (t, n, i = !0) => M(new F({ key: t, label: n, type: V.File, sortable: i })), Al = (t, n, i = !0) => M(new F({ key: t, label: n, sortable: i, hidden: !0 })), We = (t, n, i, a) => {
29
29
  if (!i) return 0;
30
30
  let o = t[i.key], l = n[i.key];
31
31
  if (a === "asc") {
@@ -95,17 +95,17 @@ const Vl = (t) => M(new F(t)), El = (t, n, i, a = !0) => M(new F({ key: t, label
95
95
  return o.value[W];
96
96
  }
97
97
  return (E = a.column.field) == null ? void 0 : E.modalKey;
98
- }), V = c(() => {
98
+ }), w = c(() => {
99
99
  var m, S, E;
100
100
  if (typeof ((m = a.column.field) == null ? void 0 : m.options) == "string" && ((S = a.column.field) != null && S.options.startsWith("prop:"))) {
101
101
  let W = (E = a.column.field) == null ? void 0 : E.options.substring(5);
102
102
  return o.value[W];
103
103
  }
104
104
  return a.column.field.options;
105
- }), s = c(() => [w.Integer, w.Float].includes(a.column.type) ? w.Number : a.column.type);
105
+ }), s = c(() => [V.Integer, V.Float].includes(a.column.type) ? V.Number : a.column.type);
106
106
  return (m, S) => {
107
107
  const E = q("lkt-anchor"), W = q("lkt-field");
108
- return m.column.type === g(w).Link ? (r(), b(E, {
108
+ return m.column.type === g(V).Link ? (r(), b(E, {
109
109
  key: 0,
110
110
  to: m.column.getHref(o.value)
111
111
  }, {
@@ -113,7 +113,7 @@ const Vl = (t) => M(new F(t)), El = (t, n, i, a = !0) => M(new F({ key: t, label
113
113
  le(J(g(te)(m.column, o.value, m.i)), 1)
114
114
  ]),
115
115
  _: 1
116
- }, 8, ["to"])) : m.column.type === g(w).Action ? (r(), d("a", {
116
+ }, 8, ["to"])) : m.column.type === g(V).Action ? (r(), d("a", {
117
117
  key: 1,
118
118
  href: "#",
119
119
  onClick: S[0] || (S[0] = (u) => m.column.doAction(o.value))
@@ -124,7 +124,7 @@ const Vl = (t) => M(new F(t)), El = (t, n, i, a = !0) => M(new F({ key: t, label
124
124
  "slot-data": C.value,
125
125
  label: m.column.type === "switch" || m.column.type === "check" ? m.column.label : "",
126
126
  "modal-key": k.value,
127
- options: V.value,
127
+ options: w.value,
128
128
  modelValue: l.value,
129
129
  "onUpdate:modelValue": S[1] || (S[1] = (u) => l.value = u)
130
130
  }), null, 16, ["type", "read-mode", "slot-data", "label", "modal-key", "options", "modelValue"])) : (r(), d($, { key: 3 }, [
@@ -248,7 +248,7 @@ const Ft = /* @__PURE__ */ X({
248
248
  }, k = c(() => {
249
249
  let u = [];
250
250
  return a.sortable && a.isDraggable && u.push("handle"), u.join(" ");
251
- }), V = c(() => T.navButtonSlot !== ""), s = c(() => T.navButtonSlot), m = () => {
251
+ }), w = c(() => T.navButtonSlot !== ""), s = c(() => T.navButtonSlot), m = () => {
252
252
  i("item-up", a.i);
253
253
  }, S = () => {
254
254
  i("item-down", a.i);
@@ -277,7 +277,7 @@ const Ft = /* @__PURE__ */ X({
277
277
  onClick: m
278
278
  }, {
279
279
  default: P(() => [
280
- V.value ? (r(), b(Q(s.value), {
280
+ w.value ? (r(), b(Q(s.value), {
281
281
  key: 0,
282
282
  direction: "up"
283
283
  })) : (r(), d($, { key: 1 }, [
@@ -293,7 +293,7 @@ const Ft = /* @__PURE__ */ X({
293
293
  onClick: S
294
294
  }, {
295
295
  default: P(() => [
296
- V.value ? (r(), b(Q(s.value), {
296
+ w.value ? (r(), b(Q(s.value), {
297
297
  key: 0,
298
298
  direction: "down"
299
299
  })) : (r(), d($, { key: 1 }, [
@@ -385,9 +385,9 @@ const Ft = /* @__PURE__ */ X({
385
385
  ], 8, Gt))), 256))
386
386
  ]),
387
387
  R("tr", { "data-i": v.i }, [
388
- (r(!0), d($, null, z(v.hiddenColumns, (k, V) => (r(), d("td", {
388
+ (r(!0), d($, null, z(v.hiddenColumns, (k, w) => (r(), d("td", {
389
389
  "data-column": k.key,
390
- title: g(te)(k, o.value, V, v.hiddenColumns),
390
+ title: g(te)(k, o.value, w, v.hiddenColumns),
391
391
  onClick: (s) => l(s, o.value)
392
392
  }, [
393
393
  v.$slots[k.key] ? A(v.$slots, k.key, {
@@ -395,14 +395,14 @@ const Ft = /* @__PURE__ */ X({
395
395
  value: o.value[k.key],
396
396
  item: o.value,
397
397
  column: k,
398
- i: V
398
+ i: w
399
399
  }) : (r(), b(je, {
400
400
  key: 1,
401
401
  column: k,
402
402
  columns: v.hiddenColumns,
403
403
  modelValue: o.value,
404
404
  "onUpdate:modelValue": C[0] || (C[0] = (s) => o.value = s),
405
- i: V
405
+ i: w
406
406
  }, null, 8, ["column", "columns", "modelValue", "i"]))
407
407
  ], 8, Jt))), 256))
408
408
  ], 8, Ot)
@@ -452,8 +452,8 @@ const Ft = /* @__PURE__ */ X({
452
452
  emits: ["click"],
453
453
  setup(t, { emit: n }) {
454
454
  const i = n, a = t, o = c(() => Tt(a.column, a.amountOfColumns, a.items)), l = c(() => a.column.sortable === !0), v = c(() => l.value && a.sortBy === a.column.key ? a.sortDirection : ""), C = c(() => a.column.label.startsWith("__:") ? re(a.column.label.substring(3)) : a.column.label), k = () => i("click", a.column);
455
- return (V, s) => (r(), d("th", {
456
- "data-column": V.column.key,
455
+ return (w, s) => (r(), d("th", {
456
+ "data-column": w.column.key,
457
457
  "data-sortable": l.value,
458
458
  "data-sort": v.value,
459
459
  colspan: o.value,
@@ -549,7 +549,7 @@ const Ft = /* @__PURE__ */ X({
549
549
  },
550
550
  emits: ["update:modelValue", "update:perms", "sort", "click", "save", "error", "before-save", "read-response", "click-create"],
551
551
  setup(t, { expose: n, emit: i }) {
552
- const a = i, o = ht(), l = t, v = {}, C = y(typeof l.sorter == "function" ? l.sorter : We), k = y(Rt(l.columns)), V = y("asc"), s = y(l.modelValue), m = y(v), S = y(null), E = y(l.columns), W = y(l.page), u = y(!1), B = y(!1), K = y(l.perms), I = y(null), ae = y({}), _ = y(new Bt({ items: s.value }, l.dataStateConfig)), L = y(l.editMode), oe = y(0), ze = (e) => {
552
+ const a = i, o = ht(), l = t, v = {}, C = y(typeof l.sorter == "function" ? l.sorter : We), k = y(Rt(l.columns)), w = y("asc"), s = y(l.modelValue), m = y(v), S = y(null), E = y(l.columns), W = y(l.page), u = y(!1), B = y(!1), K = y(l.perms), I = y(null), ae = y({}), _ = y(new Bt({ items: s.value }, l.dataStateConfig)), L = y(l.editMode), oe = y(0), ze = (e) => {
553
553
  Array.isArray(e) && (s.value = e), u.value = !1, B.value = !0, _.value.store({ items: s.value }).turnStoredIntoOriginal();
554
554
  }, Ge = (e) => {
555
555
  K.value = e;
@@ -579,7 +579,7 @@ const Ft = /* @__PURE__ */ X({
579
579
  }), Be = c(() => l.hiddenSave || u.value || !l.saveResource ? !1 : L.value && _.value.changed() ? !0 : L.value), xe = c(() => de.value && s.value.length >= l.requiredItemsForTopCreate || l.switchEditionEnabled ? !0 : Be.value || L.value && l.canCreate), et = c(() => l.saveDisabled || typeof l.saveValidator == "function" && !l.saveValidator(s.value) ? !1 : _.value.changed()), tt = c(() => s.value.length), lt = c(() => ({
580
580
  items: s.value,
581
581
  ...l.saveResourceData
582
- })), at = c(() => l.titleTag === "" ? "h2" : l.titleTag), ot = c(() => l.wrapContentTag === "" ? "div" : l.wrapContentTag), ve = c(() => l.title.startsWith("__:") ? re(l.title.substring(3)) : l.title), nt = c(() => l.saveText.startsWith("__:") ? re(l.saveText.substring(3)) : l.saveText), ut = c(() => l.editModeText.startsWith("__:") ? re(l.editModeText.substring(3)) : l.editModeText), we = c(() => K.value.includes("create")), rt = c(() => K.value.includes("read")), ke = c(() => K.value.includes("update")), ye = c(() => K.value.includes("drop")), it = (e) => {
582
+ })), at = c(() => l.titleTag === "" ? "h2" : l.titleTag), ot = c(() => l.wrapContentTag === "" ? "div" : l.wrapContentTag), ve = c(() => l.title.startsWith("__:") ? re(l.title.substring(3)) : l.title), nt = c(() => l.saveText.startsWith("__:") ? re(l.saveText.substring(3)) : l.saveText), ut = c(() => l.editModeText.startsWith("__:") ? re(l.editModeText.substring(3)) : l.editModeText), Ve = c(() => K.value.includes("create")), rt = c(() => K.value.includes("read")), ke = c(() => K.value.includes("update")), ye = c(() => K.value.includes("drop")), it = (e) => {
583
583
  let f = e.target;
584
584
  if (typeof f.dataset.column > "u")
585
585
  do
@@ -587,8 +587,8 @@ const Ft = /* @__PURE__ */ X({
587
587
  while (typeof f.dataset.column > "u" && f.tagName !== "TABLE" && f.tagName !== "body");
588
588
  if (f.tagName === "TD" && (f = f.parentNode, f = f.dataset.i, typeof f < "u"))
589
589
  return s.value[f];
590
- }, Ve = (e) => m.value["tr_" + e] === !0, Ee = (e) => {
591
- e && e.sortable && (s.value = s.value.sort((f, h) => C.value(f, h, e, V.value)), V.value = V.value === "asc" ? "desc" : "asc", k.value = e.key, a("sort", [k.value, V.value]));
590
+ }, we = (e) => m.value["tr_" + e] === !0, Ee = (e) => {
591
+ e && e.sortable && (s.value = s.value.sort((f, h) => C.value(f, h, e, w.value)), w.value = w.value === "asc" ? "desc" : "asc", k.value = e.key, a("sort", [k.value, w.value]));
592
592
  }, De = (e) => {
593
593
  a("click", e);
594
594
  }, Te = (e, f) => {
@@ -631,7 +631,7 @@ const Ft = /* @__PURE__ */ X({
631
631
  s.value.splice(e, 1), oe.value = fe();
632
632
  }, vt = () => {
633
633
  let e = document.getElementById("lkt-table-body-" + ie);
634
- ae.value = new wt(e, {
634
+ ae.value = new Vt(e, {
635
635
  direction: "vertical",
636
636
  handle: ".handle",
637
637
  animation: 150,
@@ -649,7 +649,7 @@ const Ft = /* @__PURE__ */ X({
649
649
  let O = String(e[G.key]).toLowerCase();
650
650
  O.length > 50 && (O = O.substring(0, 50)), O = qe(O, " ", "-"), N.push(O);
651
651
  }), N.join("-");
652
- }, Me = c(() => typeof l.createEnabledValidator == "function" ? l.createEnabledValidator({ items: s.value }) : !0), de = c(() => we.value ? l.canCreateWithoutEdition || l.canCreate && L.value : !1), Ne = (e) => typeof l.itemDisplayChecker == "function" ? l.itemDisplayChecker(e) : !0;
652
+ }, Me = c(() => typeof l.createEnabledValidator == "function" ? l.createEnabledValidator({ items: s.value }) : !0), de = c(() => Ve.value ? l.canCreateWithoutEdition || l.canCreate && L.value : !1), Ne = (e) => typeof l.itemDisplayChecker == "function" ? l.itemDisplayChecker(e) : !0;
653
653
  gt(() => {
654
654
  l.initialSorting && Ee(Lt(l.columns, k.value)), _.value.store({ items: s.value }).turnStoredIntoOriginal(), l.sortable && Ue(() => {
655
655
  vt();
@@ -662,7 +662,7 @@ const Ft = /* @__PURE__ */ X({
662
662
  });
663
663
  const kt = c(() => typeof T.defaultEmptySlot < "u"), yt = c(() => T.defaultEmptySlot);
664
664
  return (e, f) => {
665
- const h = q("lkt-button"), N = q("lkt-field-switch"), G = q("lkt-loader"), O = q("lkt-paginator");
665
+ const h = q("lkt-button"), N = q("lkt-field"), G = q("lkt-loader"), O = q("lkt-paginator");
666
666
  return r(), d("section", {
667
667
  class: "lkt-table-page",
668
668
  id: "lkt-table-page-" + g(ie)
@@ -722,6 +722,7 @@ const Ft = /* @__PURE__ */ X({
722
722
  }, null, 8, ["disabled", "text", "icon", "to"])) : p("", !0),
723
723
  R("div", el, [
724
724
  ne(ee(N, {
725
+ type: "switch",
725
726
  modelValue: L.value,
726
727
  "onUpdate:modelValue": f[0] || (f[0] = (D) => L.value = D),
727
728
  label: ut.value
@@ -755,7 +756,7 @@ const Ft = /* @__PURE__ */ X({
755
756
  A(e.$slots, "item", he({
756
757
  [e.slotItemVar || ""]: D,
757
758
  index: H,
758
- canCreate: we.value,
759
+ canCreate: Ve.value,
759
760
  canRead: rt.value,
760
761
  canUpdate: ke.value,
761
762
  canDrop: ye.value,
@@ -775,7 +776,7 @@ const Ft = /* @__PURE__ */ X({
775
776
  key: 0,
776
777
  column: D,
777
778
  "sort-by": k.value,
778
- "sort-direction": V.value,
779
+ "sort-direction": w.value,
779
780
  "amount-of-columns": e.columns.length,
780
781
  items: s.value,
781
782
  onClick: (H) => Ee(D)
@@ -801,7 +802,7 @@ const Ft = /* @__PURE__ */ X({
801
802
  "visible-columns": se.value,
802
803
  "empty-columns": me.value,
803
804
  "add-navigation": e.addNavigation,
804
- "hidden-is-visible": Ve(H),
805
+ "hidden-is-visible": we(H),
805
806
  "latest-row": H + 1 === tt.value,
806
807
  "can-drop": e.canDrop && ye.value && L.value,
807
808
  "drop-confirm": e.dropConfirm,
@@ -841,7 +842,7 @@ const Ft = /* @__PURE__ */ X({
841
842
  sortable: e.sortable,
842
843
  "visible-columns": se.value,
843
844
  "empty-columns": me.value,
844
- "hidden-is-visible": Ve(j),
845
+ "hidden-is-visible": we(j),
845
846
  onClick: De,
846
847
  onShow: Te
847
848
  }, Ae({ _: 2 }, [
@@ -903,7 +904,7 @@ const Ft = /* @__PURE__ */ X({
903
904
  }
904
905
  }), Pl = {
905
906
  install: (t) => {
906
- t.component("lkt-loader") === void 0 && t.use(Vt), t.component("lkt-button") === void 0 && t.use(Et), t.component("lkt-paginator") === void 0 && t.use(Dt), t.component("lkt-field") === void 0 && t.use(Ct), t.component("lkt-table") === void 0 && t.component("lkt-table", pl);
907
+ t.component("lkt-loader") === void 0 && t.use(wt), t.component("lkt-button") === void 0 && t.use(Et), t.component("lkt-paginator") === void 0 && t.use(Dt), t.component("lkt-field") === void 0 && t.use(Ct), t.component("lkt-table") === void 0 && t.component("lkt-table", pl);
907
908
  }
908
909
  }, Wl = (t) => (T.navButtonSlot = t, !0), Kl = (t) => (T.dropButtonSlot = t, !0), Hl = (t) => (T.createButtonSlot = t, !0), ql = (t) => {
909
910
  T.defaultEmptySlot = t;
@@ -912,7 +913,7 @@ export {
912
913
  F as Column,
913
914
  Dl as createActionColumn,
914
915
  Fl as createCheckColumn,
915
- Vl as createColumn,
916
+ wl as createColumn,
916
917
  Rl as createEmailColumn,
917
918
  Ul as createFileColumn,
918
919
  $l as createFloatColumn,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lkt-table",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "lkt",
@@ -20,7 +20,7 @@
20
20
  "./theme": "./theme/default.css",
21
21
  "./theme/default": "./theme/default.css"
22
22
  },
23
- "types": "./dist/index.d.ts",
23
+ "types": "./dist/build.d.ts",
24
24
  "files": [
25
25
  "dist/*",
26
26
  "src/**/*.vue",
@@ -50,7 +50,7 @@
50
50
  "lkt-button": "^1.1.16",
51
51
  "lkt-data-state": "^1.0.10",
52
52
  "lkt-date-tools": "^1.0.4",
53
- "lkt-field": "^0.0.11",
53
+ "lkt-field": "^0.0.14",
54
54
  "lkt-http-client": "^1.0.19",
55
55
  "lkt-i18n": "^1.0.4",
56
56
  "lkt-loader": "^1.0.2",
@@ -521,7 +521,8 @@ const hasEmptySlot = computed(() => {
521
521
  />
522
522
 
523
523
  <div class="switch-edition-mode">
524
- <lkt-field-switch
524
+ <lkt-field
525
+ type="switch"
525
526
  v-show="switchEditionEnabled"
526
527
  v-model="editModeEnabled"
527
528
  :label="computedEditModeText"/>