lkt-item-crud 2.0.22 → 2.0.23

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
@@ -1,7 +1,7 @@
1
- declare function It(A?: boolean): void;
2
- declare namespace Rt {
3
- function install(A: any, ve?: {}): void;
1
+ declare function Et(A?: boolean): void;
2
+ declare namespace Ot {
3
+ function install(A: any, ce?: {}): void;
4
4
  }
5
- declare function Et(A: any): void;
6
- declare function At(A: any): void;
7
- export { It as debugLktItemCrud, Rt as default, Et as setItemCrudDefaultDropIcon, At as setItemCrudDefaultSaveIcon };
5
+ declare function Nt(A: any): void;
6
+ declare function Lt(A: any): void;
7
+ export { Et as debugLktItemCrud, Ot as default, Nt as setItemCrudDefaultDropIcon, Lt as setItemCrudDefaultSaveIcon };
package/dist/build.js CHANGED
@@ -1,29 +1,29 @@
1
- import { defineComponent as Xe, ref as d, watch as p, useSlots as We, computed as k, resolveComponent as ye, createElementBlock as H, createCommentVNode as v, openBlock as c, createBlock as R, Fragment as je, renderSlot as U, withDirectives as X, mergeProps as S, normalizeProps as Ve, unref as u, createVNode as z, vShow as W, withCtx as Q, mergeDefaults as Je, nextTick as Qe, onMounted as Ye, resolveDynamicComponent as Ze, createSlots as ge, createElementVNode as _e, toDisplayString as xe } from "vue";
2
- import { httpCall as et } from "lkt-http-client";
1
+ import { defineComponent as Xe, ref as d, watch as p, useSlots as Ke, computed as g, resolveComponent as ye, createElementBlock as W, createCommentVNode as v, openBlock as c, createBlock as R, Fragment as je, renderSlot as S, withDirectives as X, mergeProps as U, normalizeProps as Ve, unref as i, createVNode as J, vShow as K, withCtx as q, mergeDefaults as Qe, nextTick as Ye, onMounted as Ze, resolveDynamicComponent as _e, createSlots as pe, createElementVNode as xe, toDisplayString as et, renderList as tt } from "vue";
2
+ import { httpCall as ot } from "lkt-http-client";
3
3
  import { DataState as Te } from "lkt-data-state";
4
- import { ModificationView as y, ItemCrudMode as T, ItemCrudButtonNavVisibility as Fe, ButtonType as Ie, TablePermission as Re, ensureButtonConfig as J, LktSettings as s, getFormDataState as tt, ItemCrudView as Pe, ItemCrudButtonNavPosition as Ae, NotificationType as _, getDefaultValues as ot, ItemCrud as at, ToastPositionX as le } from "lkt-vue-kernel";
5
- import { closeModal as nt, updateModalKey as it } from "lkt-modal";
6
- import { __ as ut } from "lkt-i18n";
4
+ import { ModificationView as k, ItemCrudMode as T, ItemCrudButtonNavVisibility as Fe, ButtonType as Ie, TablePermission as Re, ensureButtonConfig as Q, LktSettings as s, getFormDataState as at, ItemCrudView as Pe, getFormSlotKeys as nt, ItemCrudButtonNavPosition as Ae, NotificationType as _, getDefaultValues as ut, ItemCrud as it, ToastPositionX as le } from "lkt-vue-kernel";
5
+ import { closeModal as lt, updateModalKey as dt } from "lkt-modal";
6
+ import { __ as rt } from "lkt-i18n";
7
7
  import { openToast as de } from "lkt-toast";
8
- import { useRouter as lt } from "vue-router";
9
- const pe = class pe {
8
+ import { useRouter as st } from "vue-router";
9
+ const ve = class ve {
10
10
  };
11
- pe.debugEnabled = !1, pe.defaultSaveIcon = "", pe.defaultDropIcon = "";
12
- let re = pe;
11
+ ve.debugEnabled = !1, ve.defaultSaveIcon = "", ve.defaultDropIcon = "";
12
+ let re = ve;
13
13
  const D = (...A) => {
14
14
  re.debugEnabled && console.info("[LktItemCrud] ", ...A);
15
- }, It = (A = !0) => {
15
+ }, Et = (A = !0) => {
16
16
  re.debugEnabled = A;
17
- }, dt = {
17
+ }, pt = {
18
18
  key: 0,
19
19
  class: "lkt-item-crud-buttons"
20
- }, rt = {
20
+ }, vt = {
21
21
  key: 0,
22
22
  class: "lkt-item-crud-buttons"
23
- }, st = {
23
+ }, ct = {
24
24
  key: 1,
25
25
  class: "lkt-item-crud-buttons"
26
- }, pt = {
26
+ }, ft = {
27
27
  key: 2,
28
28
  class: "lkt-item-crud-buttons"
29
29
  }, Ee = /* @__PURE__ */ Xe({
@@ -64,10 +64,10 @@ const D = (...A) => {
64
64
  "save",
65
65
  "drop"
66
66
  ],
67
- setup(A, { expose: ve, emit: ke }) {
67
+ setup(A, { expose: ce, emit: ke }) {
68
68
  const o = ke, n = A, C = d(n.pickedModificationView);
69
69
  p(() => n.pickedModificationView, (t) => C.value = t), p(C, (t) => o("update:pickedModificationView", t));
70
- const f = We(), r = d(null), l = d(null), m = d(n.loading);
70
+ const f = Ke(), r = d(null), l = d(null), m = d(n.loading);
71
71
  p(() => n.loading, (t) => m.value = t), p(m, (t) => o("update:loading", t));
72
72
  const E = d(n.editing);
73
73
  p(() => n.editing, (t) => E.value = t), p(E, (t) => o("update:editing", t));
@@ -81,8 +81,8 @@ const D = (...A) => {
81
81
  typeof t > "u" || o("save", t, w);
82
82
  }, L = (t, w) => {
83
83
  typeof t > "u" || o("drop", t, w);
84
- }, $ = k(() => n.editableView === y.Modifications ? n.modifications : n.item);
85
- ve({
84
+ }, $ = g(() => n.editableView === k.Modifications ? n.modifications : n.item);
85
+ ce({
86
86
  doSave: () => {
87
87
  r.value && typeof r.value.click == "function" && r.value.click();
88
88
  },
@@ -90,83 +90,83 @@ const D = (...A) => {
90
90
  l.value && typeof l.value.click == "function" && l.value.click();
91
91
  }
92
92
  });
93
- const G = k(() => !n.canDrop || n.dropButton === !1 ? !1 : !n.canUpdate && n.canDrop ? !0 : !m.value && n.editing && n.httpSuccessRead), h = k(() => n.mode === T.Create && n.createButton === !1 || n.mode === T.Update && n.updateButton === !1 || m.value ? !1 : n.editing && n.httpSuccessRead), Z = k(() => n.editModeButton === !1 || !n.canSwitchEditMode || !n.canUpdate && !n.canDrop || !n.canUpdate && n.canDrop ? !1 : !m.value && n.mode !== T.Create && n.httpSuccessRead), K = k(() => n.buttonNavVisibility === Fe.Always || f["prev-buttons-ever"] ? !0 : n.buttonNavVisibility === Fe.Never ? !1 : h.value || G.value || Z.value), j = k(() => n.modificationView === !1 ? [] : n.modificationView === !0 ? [
94
- y.Current,
95
- y.Modifications,
96
- y.SplitView,
97
- y.Differences
98
- ] : Array.isArray(n.modificationView) ? n.modificationView : []), ne = k(() => {
93
+ const G = g(() => !n.canDrop || n.dropButton === !1 ? !1 : !n.canUpdate && n.canDrop ? !0 : !m.value && n.editing && n.httpSuccessRead), h = g(() => n.mode === T.Create && n.createButton === !1 || n.mode === T.Update && n.updateButton === !1 || m.value ? !1 : n.editing && n.httpSuccessRead), Z = g(() => n.editModeButton === !1 || !n.canSwitchEditMode || !n.canUpdate && !n.canDrop || !n.canUpdate && n.canDrop ? !1 : !m.value && n.mode !== T.Create && n.httpSuccessRead), H = g(() => n.buttonNavVisibility === Fe.Always || f["prev-buttons-ever"] ? !0 : n.buttonNavVisibility === Fe.Never ? !1 : h.value || G.value || Z.value), j = g(() => n.modificationView === !1 ? [] : n.modificationView === !0 ? [
94
+ k.Current,
95
+ k.Modifications,
96
+ k.SplitView,
97
+ k.Differences
98
+ ] : Array.isArray(n.modificationView) ? n.modificationView : []), ue = g(() => {
99
99
  let t = [];
100
- return j.value.includes(y.Current) && t.push({
100
+ return j.value.includes(k.Current) && t.push({
101
101
  text: "Current",
102
102
  icon: "lkt-icn-see",
103
- disabled: C.value === y.Current,
103
+ disabled: C.value === k.Current,
104
104
  events: {
105
105
  click: () => {
106
- C.value = y.Current;
106
+ C.value = k.Current;
107
107
  }
108
108
  }
109
- }), j.value.includes(y.Modifications) && t.push({
109
+ }), j.value.includes(k.Modifications) && t.push({
110
110
  text: "Modifications",
111
111
  icon: "lkt-icn-edit",
112
- disabled: C.value === y.Modifications,
112
+ disabled: C.value === k.Modifications,
113
113
  events: {
114
114
  click: () => {
115
- C.value = y.Modifications;
115
+ C.value = k.Modifications;
116
116
  }
117
117
  }
118
- }), j.value.includes(y.SplitView) && t.push({
118
+ }), j.value.includes(k.SplitView) && t.push({
119
119
  text: "Split View",
120
120
  icon: "lkt-icn-columns",
121
- disabled: C.value === y.SplitView,
121
+ disabled: C.value === k.SplitView,
122
122
  events: {
123
123
  click: () => {
124
- C.value = y.SplitView;
124
+ C.value = k.SplitView;
125
125
  }
126
126
  }
127
- }), j.value.includes(y.Differences) && t.push({
127
+ }), j.value.includes(k.Differences) && t.push({
128
128
  text: "Differences",
129
129
  icon: "lkt-icn-balance",
130
- disabled: C.value === y.Differences,
130
+ disabled: C.value === k.Differences,
131
131
  events: {
132
132
  click: () => {
133
- C.value = y.Differences;
133
+ C.value = k.Differences;
134
134
  }
135
135
  }
136
136
  }), t;
137
137
  });
138
138
  return (t, w) => {
139
139
  var ie, N, F, P;
140
- const g = ye("lkt-button");
141
- return K.value ? (c(), H("div", dt, [
142
- t.grouped && t.groupButtonAsModalActions ? (c(), H(je, { key: 0 }, [
143
- Z.value ? (c(), R(g, S({ key: 0 }, t.editModeButton, {
140
+ const y = ye("lkt-button");
141
+ return H.value ? (c(), W("div", pt, [
142
+ t.grouped && t.groupButtonAsModalActions ? (c(), W(je, { key: 0 }, [
143
+ Z.value ? (c(), R(y, U({ key: 0 }, t.editModeButton, {
144
144
  checked: E.value,
145
145
  "onUpdate:checked": w[0] || (w[0] = (M) => E.value = M),
146
146
  class: "lkt-item-crud--switch-mode-button"
147
147
  }), null, 16, ["checked"])) : v("", !0),
148
- j.value.length > 0 ? (c(), R(g, Ve(S({ key: 1 }, {
149
- type: u(Ie).Tooltip,
148
+ j.value.length > 0 ? (c(), R(y, Ve(U({ key: 1 }, {
149
+ type: i(Ie).Tooltip,
150
150
  icon: "lkt-icn-cross-arrows",
151
151
  class: "lkt-item-crud--modifications-button",
152
- splitButtons: ne.value,
152
+ splitButtons: ue.value,
153
153
  tooltip: {
154
154
  contentClass: "lkt-flex-column"
155
155
  }
156
156
  })), null, 16)) : v("", !0),
157
- u(f)["prev-buttons-ever"] ? U(t.$slots, "prev-buttons-ever", {
157
+ i(f)["prev-buttons-ever"] ? S(t.$slots, "prev-buttons-ever", {
158
158
  key: 2,
159
159
  canUpdate: t.canUpdate,
160
160
  canDrop: t.canDrop,
161
161
  perms: t.perms
162
162
  }) : v("", !0),
163
- u(f)["prev-buttons"] ? U(t.$slots, "prev-buttons", {
163
+ i(f)["prev-buttons"] ? S(t.$slots, "prev-buttons", {
164
164
  key: 3,
165
165
  canUpdate: t.canUpdate,
166
166
  canDrop: t.canDrop,
167
167
  perms: t.perms
168
168
  }) : v("", !0),
169
- X(z(g, S({
169
+ X(J(y, U({
170
170
  ref_key: "saveButtonRef",
171
171
  ref: r
172
172
  }, {
@@ -181,9 +181,9 @@ const D = (...A) => {
181
181
  onLoaded: B,
182
182
  onClick: x
183
183
  }), null, 16), [
184
- [W, t.mode === u(T).Update && h.value]
184
+ [K, t.mode === i(T).Update && h.value]
185
185
  ]),
186
- X(z(g, S({
186
+ X(J(y, U({
187
187
  ref_key: "saveButtonRef",
188
188
  ref: r
189
189
  }, {
@@ -198,9 +198,9 @@ const D = (...A) => {
198
198
  onLoaded: B,
199
199
  onClick: Y
200
200
  }), null, 16), [
201
- [W, t.mode === u(T).Create && h.value]
201
+ [K, t.mode === i(T).Create && h.value]
202
202
  ]),
203
- X(z(g, S({
203
+ X(J(y, U({
204
204
  ref_key: "dropButtonRef",
205
205
  ref: l
206
206
  }, t.dropButton, {
@@ -209,43 +209,43 @@ const D = (...A) => {
209
209
  onLoaded: B,
210
210
  onClick: L
211
211
  }), null, 16, ["disabled"]), [
212
- [W, G.value && t.mode !== u(T).Create]
212
+ [K, G.value && t.mode !== i(T).Create]
213
213
  ]),
214
- u(f).buttons ? U(t.$slots, "buttons", { key: 4 }) : v("", !0)
215
- ], 64)) : t.grouped ? (c(), R(g, S({
214
+ i(f).buttons ? S(t.$slots, "buttons", { key: 4 }) : v("", !0)
215
+ ], 64)) : t.grouped ? (c(), R(y, U({
216
216
  key: 1,
217
217
  ref: "groupButton"
218
218
  }, t.groupButton, { class: "lkt-item-crud-group-button" }), {
219
- split: Q(() => {
219
+ split: q(() => {
220
220
  var M, ee;
221
221
  return [
222
- Z.value ? (c(), R(g, S({ key: 0 }, t.editModeButton, {
222
+ Z.value ? (c(), R(y, U({ key: 0 }, t.editModeButton, {
223
223
  checked: E.value,
224
224
  "onUpdate:checked": w[1] || (w[1] = (se) => E.value = se),
225
225
  class: "lkt-item-crud--switch-mode-button"
226
226
  }), null, 16, ["checked"])) : v("", !0),
227
- j.value.length > 0 ? (c(), R(g, Ve(S({ key: 1 }, {
228
- type: u(Ie).Tooltip,
227
+ j.value.length > 0 ? (c(), R(y, Ve(U({ key: 1 }, {
228
+ type: i(Ie).Tooltip,
229
229
  icon: "lkt-icn-cross-arrows",
230
230
  class: "lkt-item-crud--modifications-button",
231
- splitButtons: ne.value,
231
+ splitButtons: ue.value,
232
232
  tooltip: {
233
233
  contentClass: "lkt-flex-column"
234
234
  }
235
235
  })), null, 16)) : v("", !0),
236
- u(f)["prev-buttons-ever"] ? U(t.$slots, "prev-buttons-ever", {
236
+ i(f)["prev-buttons-ever"] ? S(t.$slots, "prev-buttons-ever", {
237
237
  key: 2,
238
238
  canUpdate: t.canUpdate,
239
239
  canDrop: t.canDrop,
240
240
  perms: t.perms
241
241
  }) : v("", !0),
242
- u(f)["prev-buttons"] ? U(t.$slots, "prev-buttons", {
242
+ i(f)["prev-buttons"] ? S(t.$slots, "prev-buttons", {
243
243
  key: 3,
244
244
  canUpdate: t.canUpdate,
245
245
  canDrop: t.canDrop,
246
246
  perms: t.perms
247
247
  }) : v("", !0),
248
- X(z(g, S({
248
+ X(J(y, U({
249
249
  ref_key: "saveButtonRef",
250
250
  ref: r
251
251
  }, {
@@ -260,9 +260,9 @@ const D = (...A) => {
260
260
  onLoaded: B,
261
261
  onClick: x
262
262
  }), null, 16), [
263
- [W, t.mode === u(T).Update && h.value]
263
+ [K, t.mode === i(T).Update && h.value]
264
264
  ]),
265
- X(z(g, S({
265
+ X(J(y, U({
266
266
  ref_key: "saveButtonRef",
267
267
  ref: r
268
268
  }, {
@@ -278,9 +278,9 @@ const D = (...A) => {
278
278
  onLoaded: B,
279
279
  onClick: Y
280
280
  }), null, 16, ["disabled"]), [
281
- [W, t.mode === u(T).Create && h.value]
281
+ [K, t.mode === i(T).Create && h.value]
282
282
  ]),
283
- X(z(g, S({
283
+ X(J(y, U({
284
284
  ref_key: "dropButtonRef",
285
285
  ref: l
286
286
  }, t.dropButton, {
@@ -289,32 +289,32 @@ const D = (...A) => {
289
289
  onLoaded: B,
290
290
  onClick: L
291
291
  }), null, 16, ["disabled"]), [
292
- [W, G.value && t.mode !== u(T).Create]
292
+ [K, G.value && t.mode !== i(T).Create]
293
293
  ]),
294
- u(f).buttons ? U(t.$slots, "buttons", { key: 4 }) : v("", !0)
294
+ i(f).buttons ? S(t.$slots, "buttons", { key: 4 }) : v("", !0)
295
295
  ];
296
296
  }),
297
297
  _: 3
298
- }, 16)) : (c(), H(je, { key: 2 }, [
299
- u(f)["prev-buttons-ever"] ? X((c(), H("div", rt, [
300
- U(t.$slots, "prev-buttons-ever", {
298
+ }, 16)) : (c(), W(je, { key: 2 }, [
299
+ i(f)["prev-buttons-ever"] ? X((c(), W("div", vt, [
300
+ S(t.$slots, "prev-buttons-ever", {
301
301
  canUpdate: t.canUpdate,
302
302
  canDrop: t.canDrop,
303
303
  perms: t.perms
304
304
  })
305
305
  ], 512)), [
306
- [W, !m.value]
306
+ [K, !m.value]
307
307
  ]) : v("", !0),
308
- u(f)["prev-buttons"] ? X((c(), H("div", st, [
309
- U(t.$slots, "prev-buttons", {
308
+ i(f)["prev-buttons"] ? X((c(), W("div", ct, [
309
+ S(t.$slots, "prev-buttons", {
310
310
  canUpdate: t.canUpdate,
311
311
  canDrop: t.canDrop,
312
312
  perms: t.perms
313
313
  })
314
314
  ], 512)), [
315
- [W, E.value && !m.value]
315
+ [K, E.value && !m.value]
316
316
  ]) : v("", !0),
317
- X(z(g, S({
317
+ X(J(y, U({
318
318
  ref_key: "saveButtonRef",
319
319
  ref: r
320
320
  }, {
@@ -329,9 +329,9 @@ const D = (...A) => {
329
329
  onLoaded: B,
330
330
  onClick: x
331
331
  }), null, 16), [
332
- [W, t.mode === u(T).Update && h.value]
332
+ [K, t.mode === i(T).Update && h.value]
333
333
  ]),
334
- X(z(g, S({
334
+ X(J(y, U({
335
335
  ref_key: "saveButtonRef",
336
336
  ref: r
337
337
  }, {
@@ -346,9 +346,9 @@ const D = (...A) => {
346
346
  onLoaded: B,
347
347
  onClick: Y
348
348
  }), null, 16), [
349
- [W, t.mode === u(T).Create && h.value]
349
+ [K, t.mode === i(T).Create && h.value]
350
350
  ]),
351
- X(z(g, S({
351
+ X(J(y, U({
352
352
  ref_key: "dropButtonRef",
353
353
  ref: l
354
354
  }, t.dropButton, {
@@ -357,23 +357,23 @@ const D = (...A) => {
357
357
  onLoaded: B,
358
358
  onClick: L
359
359
  }), null, 16, ["disabled"]), [
360
- [W, G.value && t.mode !== u(T).Create]
360
+ [K, G.value && t.mode !== i(T).Create]
361
361
  ]),
362
- u(f).buttons ? X((c(), H("div", pt, [
363
- U(t.$slots, "buttons")
362
+ i(f).buttons ? X((c(), W("div", ft, [
363
+ S(t.$slots, "buttons")
364
364
  ], 512)), [
365
- [W, E.value && !m.value]
365
+ [K, E.value && !m.value]
366
366
  ]) : v("", !0),
367
- j.value.length > 0 ? (c(), R(g, Ve(S({ key: 3 }, {
368
- type: u(Ie).Tooltip,
367
+ j.value.length > 0 ? (c(), R(y, Ve(U({ key: 3 }, {
368
+ type: i(Ie).Tooltip,
369
369
  icon: "lkt-icn-cross-arrows",
370
370
  class: "lkt-item-crud--modifications-button",
371
- splitButtons: ne.value,
371
+ splitButtons: ue.value,
372
372
  tooltip: {
373
373
  contentClass: "lkt-flex-column"
374
374
  }
375
375
  })), null, 16)) : v("", !0),
376
- Z.value ? (c(), R(g, S({ key: 4 }, t.editModeButton, {
376
+ Z.value ? (c(), R(y, U({ key: 4 }, t.editModeButton, {
377
377
  checked: E.value,
378
378
  "onUpdate:checked": w[2] || (w[2] = (M) => E.value = M),
379
379
  class: "lkt-item-crud--switch-mode-button"
@@ -382,27 +382,27 @@ const D = (...A) => {
382
382
  ])) : v("", !0);
383
383
  };
384
384
  }
385
- }), vt = { class: "lkt-item-crud" }, ct = {
385
+ }), mt = { class: "lkt-item-crud" }, bt = {
386
386
  key: 0,
387
387
  class: "lkt-item-crud_header"
388
- }, ft = {
388
+ }, gt = {
389
389
  key: 0,
390
390
  class: "lkt-item-crud_header-slot"
391
- }, mt = {
391
+ }, yt = {
392
392
  key: 1,
393
393
  class: "lkt-item-crud_header-title"
394
- }, bt = {
394
+ }, kt = {
395
395
  key: 2,
396
396
  class: "lkt-item-crud_header-slot"
397
- }, gt = {
397
+ }, Bt = {
398
398
  key: 2,
399
399
  class: "lkt-item-crud_content"
400
- }, yt = {
400
+ }, Ct = {
401
401
  key: 0,
402
402
  class: "lkt-grid-1"
403
- }, kt = /* @__PURE__ */ Xe({
403
+ }, Dt = /* @__PURE__ */ Xe({
404
404
  __name: "LktItemCrud",
405
- props: /* @__PURE__ */ Je({
405
+ props: /* @__PURE__ */ Qe({
406
406
  modelValue: {},
407
407
  modifications: {},
408
408
  editing: { type: Boolean },
@@ -435,7 +435,7 @@ const D = (...A) => {
435
435
  redirectOnDrop: { type: [String, Function] },
436
436
  differencesTableConfig: { type: [Object, Function] },
437
437
  events: {}
438
- }, ot(at)),
438
+ }, ut(it)),
439
439
  emits: [
440
440
  "update:modelValue",
441
441
  "update:editing",
@@ -452,14 +452,14 @@ const D = (...A) => {
452
452
  "error",
453
453
  "modified-data"
454
454
  ],
455
- setup(A, { expose: ve, emit: ke }) {
456
- const o = A, n = lt(), C = We(), f = ke, r = d(!0), l = d(o.modelValue), m = d(o.modifications), E = d(o.customData), b = d(o.perms), B = d(o.editing), Y = d(!1), x = d(!1), L = d(!1), $ = d(!1), q = d(200), I = d(new Te(l.value, o.dataStateConfig)), G = d(new Te(m.value, o.dataStateConfig)), h = d(!1), Z = d(new Te(o.readData)), K = d(o.mode === T.Create), j = d(!1), ne = d(!1), t = d(null), w = k(() => !K.value && Array.isArray(b.value) && b.value.includes(Re.Update)), g = k(() => !K.value && Array.isArray(b.value) && b.value.includes(Re.Drop)), ie = k(() => !K.value && Array.isArray(b.value) && b.value.includes(Re.SwitchEditMode)), N = d(o.visibleView);
455
+ setup(A, { expose: ce, emit: ke }) {
456
+ const o = A, n = st(), C = Ke(), f = ke, r = d(!0), l = d(o.modelValue), m = d(o.modifications), E = d(o.customData), b = d(o.perms), B = d(o.editing), Y = d(!1), x = d(!1), L = d(!1), $ = d(!1), z = d(200), I = d(new Te(l.value, o.dataStateConfig)), G = d(new Te(m.value, o.dataStateConfig)), h = d(!1), Z = d(new Te(o.readData)), H = d(o.mode === T.Create), j = d(!1), ue = d(!1), t = d(null), w = g(() => !H.value && Array.isArray(b.value) && b.value.includes(Re.Update)), y = g(() => !H.value && Array.isArray(b.value) && b.value.includes(Re.Drop)), ie = g(() => !H.value && Array.isArray(b.value) && b.value.includes(Re.SwitchEditMode)), N = d(o.visibleView);
457
457
  p(() => o.visibleView, (e) => {
458
458
  N.value = e;
459
459
  }), p(N, (e) => {
460
460
  f("update:modificationView", e);
461
461
  }), p(() => o.mode, (e) => {
462
- K.value = e === T.Create;
462
+ H.value = e === T.Create;
463
463
  }), p(() => o.perms, (e) => {
464
464
  b.value = e;
465
465
  }), p(b, (e) => {
@@ -471,39 +471,39 @@ const D = (...A) => {
471
471
  }), p(() => o.modifications, (e) => {
472
472
  G.value.increment(e), m.value = e;
473
473
  }, { deep: !0 }), p(m, (e) => {
474
- Le(), G.value.increment(e), te.value === y.Modifications && (h.value = G.value.changed()), f("update:modifications", e);
474
+ Le(), G.value.increment(e), oe.value === k.Modifications && (h.value = G.value.changed()), f("update:modifications", e);
475
475
  }, { deep: !0 });
476
- const F = d(J(o.createButton, s.defaultCreateButton)), P = d(J(o.updateButton, s.defaultUpdateButton)), M = d(J(o.dropButton, s.defaultDropButton)), ee = d(J(o.editModeButton, s.defaultEditModeButton)), se = d(J(o.groupButton, s.defaultGroupButton));
476
+ const F = d(Q(o.createButton, s.defaultCreateButton)), P = d(Q(o.updateButton, s.defaultUpdateButton)), M = d(Q(o.dropButton, s.defaultDropButton)), ee = d(Q(o.editModeButton, s.defaultEditModeButton)), se = d(Q(o.groupButton, s.defaultGroupButton));
477
477
  p(() => o.createButton, (e) => {
478
- F.value = J(e, s.defaultCreateButton);
478
+ F.value = Q(e, s.defaultCreateButton);
479
479
  }, { deep: !0 }), p(() => o.updateButton, (e) => {
480
- P.value = J(e, s.defaultUpdateButton);
480
+ P.value = Q(e, s.defaultUpdateButton);
481
481
  }, { deep: !0 }), p(() => o.dropButton, (e) => {
482
- M.value = J(e, s.defaultDropButton);
482
+ M.value = Q(e, s.defaultDropButton);
483
483
  }, { deep: !0 }), p(() => o.editModeButton, (e) => {
484
- ee.value = J(e, s.defaultEditModeButton);
484
+ ee.value = Q(e, s.defaultEditModeButton);
485
485
  }, { deep: !0 });
486
- const ce = async () => {
486
+ const fe = async () => {
487
487
  var e, a, O;
488
- D("fetchItem"), r.value = !0, q.value = -1, $.value = !1, typeof ((e = o.events) == null ? void 0 : e.httpStart) == "function" && o.events.httpStart();
488
+ D("fetchItem"), r.value = !0, z.value = -1, $.value = !1, typeof ((e = o.events) == null ? void 0 : e.httpStart) == "function" && o.events.httpStart();
489
489
  try {
490
- const V = await et(o.readResource, o.readData);
491
- if (D("fetchItem -> response", V), r.value = !1, q.value = V.httpStatus, E.value = V.custom, !V.success) {
492
- L.value = !1, q.value = V.httpStatus, typeof ((a = o.events) == null ? void 0 : a.httpEnd) == "function" && o.events.httpEnd({
490
+ const V = await ot(o.readResource, o.readData);
491
+ if (D("fetchItem -> response", V), r.value = !1, z.value = V.httpStatus, E.value = V.custom, !V.success) {
492
+ L.value = !1, z.value = V.httpStatus, typeof ((a = o.events) == null ? void 0 : a.httpEnd) == "function" && o.events.httpEnd({
493
493
  httpResponse: V
494
494
  }), f("error", V.httpStatus);
495
495
  return;
496
496
  }
497
- L.value = !0, l.value = V.data, m.value = Array.isArray(V.modifications) ? {} : V.modifications, b.value = V.perms, I.value.increment(l.value).turnStoredIntoOriginal(), G.value.increment(m.value).turnStoredIntoOriginal(), h.value = I.value.changed(), Z.value.turnStoredIntoOriginal(), Object.keys(m.value).length > 0 && (N.value = y.Modifications), typeof ((O = o.events) == null ? void 0 : O.httpEnd) == "function" && o.events.httpEnd({
497
+ L.value = !0, l.value = V.data, m.value = Array.isArray(V.modifications) ? {} : V.modifications, b.value = V.perms, I.value.increment(l.value).turnStoredIntoOriginal(), G.value.increment(m.value).turnStoredIntoOriginal(), h.value = I.value.changed(), Z.value.turnStoredIntoOriginal(), Object.keys(m.value).length > 0 && (N.value = k.Modifications), typeof ((O = o.events) == null ? void 0 : O.httpEnd) == "function" && o.events.httpEnd({
498
498
  httpResponse: V
499
499
  }), f("read", V);
500
500
  } catch {
501
- r.value = !1, L.value = !1, q.value = 404, f("error", 404);
501
+ r.value = !1, L.value = !1, z.value = 404, f("error", 404);
502
502
  return;
503
503
  }
504
504
  };
505
505
  p(j, (e) => {
506
- e && Qe(() => j.value = !1);
506
+ e && Ye(() => j.value = !1);
507
507
  }), p(() => o.modelValue, (e) => {
508
508
  l.value = e, I.value.increment(e);
509
509
  }, { deep: !0 }), p(l, (e) => {
@@ -512,25 +512,25 @@ const D = (...A) => {
512
512
  let a = o.beforeEmitUpdate(l.value);
513
513
  D("item updated -> override with: ", a), typeof a == "object" && (l.value = a);
514
514
  }
515
- ue.value && Le(), f("update:modelValue", l.value), D("item updated -> update dataState"), I.value.increment(e), te.value === y.Current && (h.value = I.value.changed()), j.value = !0;
515
+ te.value && Le(), f("update:modelValue", l.value), D("item updated -> update dataState"), I.value.increment(e), oe.value === k.Current && (h.value = I.value.changed()), j.value = !0;
516
516
  }, { deep: !0 }), p(b, () => f("perms", b.value)), p(h, (e) => {
517
517
  f("modified-data", e);
518
518
  }), p(() => o.readData, (e) => {
519
- Z.value.increment(e), Z.value.changed() && ce();
519
+ Z.value.increment(e), Z.value.changed() && fe();
520
520
  }), p(() => o.editing, (e) => {
521
521
  D("editing updated -> updating editMode", e), B.value = e;
522
522
  }), p(B, (e) => {
523
523
  D("editMode updated -> emit update", e), f("update:editing", e);
524
524
  });
525
525
  const Oe = d(void 0), Le = () => {
526
- ue.value && (Oe.value = tt(l.value, m.value, o.form));
526
+ te.value && (Oe.value = at(l.value, m.value, o.form));
527
527
  };
528
- Ye(() => {
529
- o.readResource && !K.value ? ce() : (K.value, L.value = !0, B.value = !0, r.value = !1, I.value.increment(l.value).turnStoredIntoOriginal(), h.value = I.value.changed());
528
+ Ze(() => {
529
+ o.readResource && !H.value ? fe() : (H.value, L.value = !0, B.value = !0, r.value = !1, I.value.increment(l.value).turnStoredIntoOriginal(), h.value = I.value.changed());
530
530
  });
531
531
  const Be = (e, a) => {
532
532
  if (a) {
533
- if (r.value = !1, typeof e < "u" && (q.value = e.httpStatus, !e.success))
533
+ if (r.value = !1, typeof e < "u" && (z.value = e.httpStatus, !e.success))
534
534
  return $.value = !0, f("error", e.httpStatus), !1;
535
535
  $.value = !0;
536
536
  }
@@ -540,7 +540,7 @@ const D = (...A) => {
540
540
  if (D("doAutoReloadId -> autoReloadId detected: ", e.autoReloadId), typeof a < "u") {
541
541
  let O = a;
542
542
  typeof a == "function" && (O = a(e.autoReloadId)), n.push(O);
543
- } else Se.value ? (D("doAutoReloadId -> insideModal: ", o), it(o.modalConfig.modalName, o.modalConfig.modalKey, e.autoReloadId)) : (D("doAutoReloadId -> outsideModal"), o.readData.id = e.autoReloadId, D("doAutoReloadId -> turning off create mode"), K.value = !1, ce());
543
+ } else Se.value ? (D("doAutoReloadId -> insideModal: ", o), dt(o.modalConfig.modalName, o.modalConfig.modalKey, e.autoReloadId)) : (D("doAutoReloadId -> outsideModal"), o.readData.id = e.autoReloadId, D("doAutoReloadId -> turning off create mode"), H.value = !1, fe());
544
544
  }, Ce = (e, a) => {
545
545
  if (D("onCreate"), !Be(a, F.value.resource)) {
546
546
  o.notificationType === _.Toast && de({
@@ -551,7 +551,7 @@ const D = (...A) => {
551
551
  });
552
552
  return;
553
553
  }
554
- ne.value = !0, D("onCreate -> turn stored data into original"), I.value.increment(l.value).turnStoredIntoOriginal(), o.notificationType === _.Toast && de({
554
+ ue.value = !0, D("onCreate -> turn stored data into original"), I.value.increment(l.value).turnStoredIntoOriginal(), o.notificationType === _.Toast && de({
555
555
  text: s.defaultCreateSuccessText,
556
556
  details: s.defaultCreateSuccessDetails,
557
557
  icon: s.defaultCreateSuccessIcon,
@@ -588,16 +588,16 @@ const D = (...A) => {
588
588
  details: s.defaultDropSuccessDetails,
589
589
  icon: s.defaultDropSuccessIcon,
590
590
  positionX: le.Right
591
- }), f("drop", a), o.view === Pe.Modal && (D("onDrop -> close modal"), nt(o.modalConfig.modalName, o.modalConfig.modalKey)), typeof o.redirectOnDrop < "u") {
591
+ }), f("drop", a), o.view === Pe.Modal && (D("onDrop -> close modal"), lt(o.modalConfig.modalName, o.modalConfig.modalKey)), typeof o.redirectOnDrop < "u") {
592
592
  let O = o.redirectOnDrop;
593
593
  typeof o.redirectOnDrop == "function" && (O = o.redirectOnDrop()), n.push(O);
594
594
  }
595
595
  };
596
- ve({
596
+ ce({
597
597
  doDrop: () => {
598
598
  t.value && t.value.doDrop();
599
599
  },
600
- doRefresh: ce,
600
+ doRefresh: fe,
601
601
  doSave: () => {
602
602
  t.value && t.value.doSave();
603
603
  },
@@ -606,71 +606,71 @@ const D = (...A) => {
606
606
  },
607
607
  hasModifiedData: () => I.value.changed()
608
608
  });
609
- const He = k(() => {
609
+ const We = g(() => {
610
610
  var e, a, O;
611
- return be.value ? ue.value ? x.value ? (e = o.modalConfig) == null ? void 0 : e.closeConfirm : "" : te.value === y.Modifications ? G.value.changed() ? (a = o.modalConfig) == null ? void 0 : a.closeConfirm : "" : I.value.changed() ? (O = o.modalConfig) == null ? void 0 : O.closeConfirm : "" : "";
612
- }), Ke = (e) => {
611
+ return ge.value ? te.value ? x.value ? (e = o.modalConfig) == null ? void 0 : e.closeConfirm : "" : oe.value === k.Modifications ? G.value.changed() ? (a = o.modalConfig) == null ? void 0 : a.closeConfirm : "" : I.value.changed() ? (O = o.modalConfig) == null ? void 0 : O.closeConfirm : "" : "";
612
+ }), He = (e) => {
613
613
  var a;
614
614
  if (typeof ((a = o.modalConfig) == null ? void 0 : a.beforeClose) == "function")
615
615
  return o.modalConfig.beforeClose({
616
616
  ...e,
617
- itemCreated: ne.value
617
+ itemCreated: ue.value
618
618
  });
619
- }, we = k(() => o.title.startsWith("__:") ? String(ut(o.title.substring(3))) : o.title), Ge = k(() => r.value ? !1 : we.value.length > 0 || !!C["post-title"]), Se = k(() => o.view === Pe.Modal), $e = k(() => Se.value ? "lkt-modal" : "section"), fe = k(() => {
619
+ }, we = g(() => o.title.startsWith("__:") ? String(rt(o.title.substring(3))) : o.title), Ge = g(() => r.value ? !1 : we.value.length > 0 || !!C["post-title"]), Se = g(() => o.view === Pe.Modal), $e = g(() => Se.value ? "lkt-modal" : "section"), me = g(() => {
620
620
  var e, a;
621
- return o.mode !== T.Update || !w.value || !o.enabledSaveWithoutChanges && !h.value || ue.value && !Y.value ? !1 : typeof ((e = P.value) == null ? void 0 : e.disabled) == "function" ? !P.value.disabled({
621
+ return o.mode !== T.Update || !w.value || !o.enabledSaveWithoutChanges && !h.value || te.value && !Y.value ? !1 : typeof ((e = P.value) == null ? void 0 : e.disabled) == "function" ? !P.value.disabled({
622
622
  prop: l.value
623
623
  }) : typeof ((a = P.value) == null ? void 0 : a.disabled) == "boolean" ? !P.value.disabled : !0;
624
- }), me = k(() => {
624
+ }), be = g(() => {
625
625
  var e, a;
626
- return o.mode !== T.Create || !o.enabledSaveWithoutChanges && !h.value || ue.value && !Y.value ? !1 : typeof ((e = F.value) == null ? void 0 : e.disabled) == "function" ? !F.value.disabled({
626
+ return o.mode !== T.Create || !o.enabledSaveWithoutChanges && !h.value || te.value && !Y.value ? !1 : typeof ((e = F.value) == null ? void 0 : e.disabled) == "function" ? !F.value.disabled({
627
627
  prop: l.value
628
628
  }) : typeof ((a = F.value) == null ? void 0 : a.disabled) == "boolean" ? !F.value.disabled : !0;
629
- }), Ue = k(() => {
629
+ }), Ue = g(() => {
630
630
  var e, a;
631
- return g.value ? typeof ((e = M.value) == null ? void 0 : e.disabled) == "function" ? !M.value.disabled({
631
+ return y.value ? typeof ((e = M.value) == null ? void 0 : e.disabled) == "function" ? !M.value.disabled({
632
632
  prop: l.value
633
633
  }) : typeof ((a = M.value) == null ? void 0 : a.disabled) == "boolean" ? !M.value.disabled : !0 : !1;
634
- }), qe = k(() => $e.value === "lkt-modal" ? {
634
+ }), qe = g(() => $e.value === "lkt-modal" ? {
635
635
  title: o.title,
636
636
  item: l.value,
637
637
  ...o.modalConfig,
638
- beforeClose: Ke,
639
- closeConfirm: He.value,
638
+ beforeClose: He,
639
+ closeConfirm: We.value,
640
640
  headerActionsButton: o.groupButton !== !1 ? {
641
- dot: me.value || fe.value
641
+ dot: be.value || me.value
642
642
  } : !1
643
- } : {}), ue = k(() => typeof o.form == "object" && Object.keys(o.form).length > 0), Me = k(() => Object.keys(m.value).length === 0 ? [] : o.modificationViews), te = k(() => Object.keys(m.value).length === 0 ? y.Current : y.Modifications), be = k(() => K.value || w.value || g.value);
643
+ } : {}), te = g(() => typeof o.form == "object" && Object.keys(o.form).length > 0), Me = g(() => Object.keys(m.value).length === 0 ? [] : o.modificationViews), oe = g(() => Object.keys(m.value).length === 0 ? k.Current : k.Modifications), ge = g(() => H.value || w.value || y.value), ze = g(() => te.value ? nt(o.form) : []);
644
644
  return (e, a) => {
645
- const O = ye("lkt-http-info"), V = ye("lkt-form"), ze = ye("lkt-loader");
646
- return c(), R(Ze($e.value), S(qe.value, { class: "lkt-item-crud" }), ge({
647
- default: Q(() => [
648
- _e("article", vt, [
649
- !Se.value && Ge.value ? (c(), H("header", ct, [
650
- u(C)["pre-title"] ? (c(), H("div", ft, [
651
- U(e.$slots, "pre-title", {
645
+ const O = ye("lkt-http-info"), V = ye("lkt-form"), Je = ye("lkt-loader");
646
+ return c(), R(_e($e.value), U(qe.value, { class: "lkt-item-crud" }), pe({
647
+ default: q(() => [
648
+ xe("article", mt, [
649
+ !Se.value && Ge.value ? (c(), W("header", bt, [
650
+ i(C)["pre-title"] ? (c(), W("div", gt, [
651
+ S(e.$slots, "pre-title", {
652
652
  item: l.value,
653
653
  loading: r.value
654
654
  })
655
655
  ])) : v("", !0),
656
- we.value.length > 0 ? (c(), H("h1", mt, xe(we.value), 1)) : v("", !0),
657
- u(C)["post-title"] ? (c(), H("div", bt, [
658
- U(e.$slots, "post-title", {
656
+ we.value.length > 0 ? (c(), W("h1", yt, et(we.value), 1)) : v("", !0),
657
+ i(C)["post-title"] ? (c(), W("div", kt, [
658
+ S(e.$slots, "post-title", {
659
659
  item: l.value,
660
660
  loading: r.value
661
661
  })
662
662
  ])) : v("", !0)
663
663
  ])) : v("", !0),
664
- e.buttonNavPosition === u(Ae).Top && (e.groupButton === !1 || !e.groupButtonAsModalActions) && be.value ? (c(), R(Ee, {
664
+ e.buttonNavPosition === i(Ae).Top && (e.groupButton === !1 || !e.groupButtonAsModalActions) && ge.value ? (c(), R(Ee, {
665
665
  key: 1,
666
666
  ref_key: "buttonNav",
667
667
  ref: t,
668
668
  loading: r.value,
669
- "onUpdate:loading": a[3] || (a[3] = (i) => r.value = i),
669
+ "onUpdate:loading": a[3] || (a[3] = (u) => r.value = u),
670
670
  editing: B.value,
671
- "onUpdate:editing": a[4] || (a[4] = (i) => B.value = i),
671
+ "onUpdate:editing": a[4] || (a[4] = (u) => B.value = u),
672
672
  "picked-modification-view": N.value,
673
- "onUpdate:pickedModificationView": a[5] || (a[5] = (i) => N.value = i),
673
+ "onUpdate:pickedModificationView": a[5] || (a[5] = (u) => N.value = u),
674
674
  item: l.value,
675
675
  modifications: m.value,
676
676
  mode: e.mode,
@@ -685,97 +685,104 @@ const D = (...A) => {
685
685
  "data-changed": h.value,
686
686
  "http-success-read": L.value,
687
687
  "can-update": w.value,
688
- "can-drop": g.value,
688
+ "can-drop": y.value,
689
689
  "can-switch-edit-mode": ie.value,
690
690
  "group-button-as-modal-actions": e.groupButtonAsModalActions,
691
- "able-to-create": me.value,
692
- "able-to-update": fe.value,
691
+ "able-to-create": be.value,
692
+ "able-to-update": me.value,
693
693
  "able-to-drop": Ue.value,
694
694
  perms: b.value,
695
695
  "modification-view": Me.value,
696
- "editable-view": te.value,
696
+ "editable-view": oe.value,
697
697
  onCreate: Ce,
698
698
  onSave: De,
699
699
  onDrop: he
700
- }, ge({ _: 2 }, [
701
- u(C)["prev-buttons-ever"] ? {
700
+ }, pe({ _: 2 }, [
701
+ i(C)["prev-buttons-ever"] ? {
702
702
  name: "prev-buttons-ever",
703
- fn: Q(({ canUpdate: i, canDrop: oe, perms: ae }) => [
704
- U(e.$slots, "prev-buttons-ever", {
705
- canUpdate: i,
706
- canDrop: oe,
707
- perms: ae
703
+ fn: q(({ canUpdate: u, canDrop: ae, perms: ne }) => [
704
+ S(e.$slots, "prev-buttons-ever", {
705
+ canUpdate: u,
706
+ canDrop: ae,
707
+ perms: ne
708
708
  })
709
709
  ]),
710
710
  key: "0"
711
711
  } : void 0,
712
- u(C)["prev-buttons"] ? {
712
+ i(C)["prev-buttons"] ? {
713
713
  name: "prev-buttons",
714
- fn: Q(({ canUpdate: i, canDrop: oe, perms: ae }) => [
715
- U(e.$slots, "prev-buttons", {
716
- canUpdate: i,
717
- canDrop: oe,
718
- perms: ae
714
+ fn: q(({ canUpdate: u, canDrop: ae, perms: ne }) => [
715
+ S(e.$slots, "prev-buttons", {
716
+ canUpdate: u,
717
+ canDrop: ae,
718
+ perms: ne
719
719
  })
720
720
  ]),
721
721
  key: "1"
722
722
  } : void 0
723
723
  ]), 1032, ["loading", "editing", "picked-modification-view", "item", "modifications", "mode", "view", "grouped", "button-nav-visibility", "create-button", "update-button", "drop-button", "edit-mode-button", "group-button", "data-changed", "http-success-read", "can-update", "can-drop", "can-switch-edit-mode", "group-button-as-modal-actions", "able-to-create", "able-to-update", "able-to-drop", "perms", "modification-view", "editable-view"])) : v("", !0),
724
- r.value ? v("", !0) : (c(), H("div", gt, [
725
- L.value ? (c(), H("div", yt, [
726
- $.value && e.notificationType === u(_).Inline ? (c(), R(O, {
724
+ r.value ? v("", !0) : (c(), W("div", Bt, [
725
+ L.value ? (c(), W("div", Ct, [
726
+ $.value && e.notificationType === i(_).Inline ? (c(), R(O, {
727
727
  key: 0,
728
- code: q.value,
729
- palette: q.value === 200 ? "success" : "danger",
728
+ code: z.value,
729
+ palette: z.value === 200 ? "success" : "danger",
730
730
  quick: "",
731
731
  "can-close": "",
732
- onClose: a[6] || (a[6] = (i) => $.value = !1)
732
+ onClose: a[6] || (a[6] = (u) => $.value = !1)
733
733
  }, null, 8, ["code", "palette"])) : v("", !0),
734
- ue.value ? (c(), R(V, S({
734
+ te.value ? (c(), R(V, U({
735
735
  key: 1,
736
736
  modelValue: l.value,
737
- "onUpdate:modelValue": a[7] || (a[7] = (i) => l.value = i),
737
+ "onUpdate:modelValue": a[7] || (a[7] = (u) => l.value = u),
738
738
  modifications: m.value,
739
- "onUpdate:modifications": a[8] || (a[8] = (i) => m.value = i),
739
+ "onUpdate:modifications": a[8] || (a[8] = (u) => m.value = u),
740
740
  valid: Y.value,
741
- "onUpdate:valid": a[9] || (a[9] = (i) => Y.value = i),
741
+ "onUpdate:valid": a[9] || (a[9] = (u) => Y.value = u),
742
742
  changed: x.value,
743
- "onUpdate:changed": a[10] || (a[10] = (i) => x.value = i)
743
+ "onUpdate:changed": a[10] || (a[10] = (u) => x.value = u)
744
744
  }, {
745
745
  ...e.formUiConfig,
746
746
  form: e.form,
747
747
  differencesTableConfig: e.differencesTableConfig,
748
748
  visibleView: N.value,
749
749
  modificationDataState: Oe.value,
750
- editableViews: [te.value],
750
+ editableViews: [oe.value],
751
751
  disabled: !B.value
752
- }), null, 16, ["modelValue", "modifications", "valid", "changed"])) : U(e.$slots, "item", {
752
+ }), pe({ _: 2 }, [
753
+ tt(ze.value, (u) => ({
754
+ name: u,
755
+ fn: q(({}) => [
756
+ S(e.$slots, u)
757
+ ])
758
+ }))
759
+ ]), 1040, ["modelValue", "modifications", "valid", "changed"])) : S(e.$slots, "item", {
753
760
  key: 2,
754
761
  item: l.value,
755
762
  loading: r.value,
756
763
  editMode: B.value,
757
- isCreate: K.value,
764
+ isCreate: H.value,
758
765
  canUpdate: w.value,
759
- canDrop: g.value,
766
+ canDrop: y.value,
760
767
  itemBeingEdited: j.value,
761
768
  perms: b.value
762
769
  })
763
- ])) : e.notificationType === u(_).Inline ? (c(), R(O, {
770
+ ])) : e.notificationType === i(_).Inline ? (c(), R(O, {
764
771
  key: 1,
765
- code: q.value
772
+ code: z.value
766
773
  }, null, 8, ["code"])) : v("", !0)
767
774
  ])),
768
- r.value ? (c(), R(ze, { key: 3 })) : v("", !0),
769
- e.buttonNavPosition === u(Ae).Bottom && (e.groupButton === !1 || !e.groupButtonAsModalActions) && be.value ? (c(), R(Ee, {
775
+ r.value ? (c(), R(Je, { key: 3 })) : v("", !0),
776
+ e.buttonNavPosition === i(Ae).Bottom && (e.groupButton === !1 || !e.groupButtonAsModalActions) && ge.value ? (c(), R(Ee, {
770
777
  key: 4,
771
778
  ref_key: "buttonNav",
772
779
  ref: t,
773
780
  loading: r.value,
774
- "onUpdate:loading": a[11] || (a[11] = (i) => r.value = i),
781
+ "onUpdate:loading": a[11] || (a[11] = (u) => r.value = u),
775
782
  editing: B.value,
776
- "onUpdate:editing": a[12] || (a[12] = (i) => B.value = i),
783
+ "onUpdate:editing": a[12] || (a[12] = (u) => B.value = u),
777
784
  "picked-modification-view": N.value,
778
- "onUpdate:pickedModificationView": a[13] || (a[13] = (i) => N.value = i),
785
+ "onUpdate:pickedModificationView": a[13] || (a[13] = (u) => N.value = u),
779
786
  item: l.value,
780
787
  modifications: m.value,
781
788
  mode: e.mode,
@@ -790,30 +797,30 @@ const D = (...A) => {
790
797
  "data-changed": h.value,
791
798
  "http-success-read": L.value,
792
799
  "can-update": w.value,
793
- "can-drop": g.value,
800
+ "can-drop": y.value,
794
801
  "can-switch-edit-mode": ie.value,
795
802
  "group-button-as-modal-actions": e.groupButtonAsModalActions,
796
- "able-to-create": me.value,
797
- "able-to-update": fe.value,
803
+ "able-to-create": be.value,
804
+ "able-to-update": me.value,
798
805
  "able-to-drop": Ue.value,
799
806
  perms: b.value,
800
807
  "modification-view": Me.value,
801
- "editable-view": te.value,
808
+ "editable-view": oe.value,
802
809
  onCreate: Ce,
803
810
  onSave: De,
804
811
  onDrop: he
805
- }, ge({ _: 2 }, [
806
- u(C)["prev-buttons-ever"] ? {
812
+ }, pe({ _: 2 }, [
813
+ i(C)["prev-buttons-ever"] ? {
807
814
  name: "prev-buttons-ever",
808
- fn: Q(() => [
809
- U(e.$slots, "prev-buttons-ever")
815
+ fn: q(() => [
816
+ S(e.$slots, "prev-buttons-ever")
810
817
  ]),
811
818
  key: "0"
812
819
  } : void 0,
813
- u(C)["prev-buttons"] ? {
820
+ i(C)["prev-buttons"] ? {
814
821
  name: "prev-buttons-ever",
815
- fn: Q(() => [
816
- U(e.$slots, "prev-buttons")
822
+ fn: q(() => [
823
+ S(e.$slots, "prev-buttons")
817
824
  ]),
818
825
  key: "1"
819
826
  } : void 0
@@ -822,19 +829,19 @@ const D = (...A) => {
822
829
  ]),
823
830
  _: 2
824
831
  }, [
825
- e.groupButton !== !1 && e.groupButtonAsModalActions && be.value ? {
832
+ e.groupButton !== !1 && e.groupButtonAsModalActions && ge.value ? {
826
833
  name: "header-actions",
827
- fn: Q(() => [
828
- e.buttonNavPosition === u(Ae).Top ? (c(), R(Ee, {
834
+ fn: q(() => [
835
+ e.buttonNavPosition === i(Ae).Top ? (c(), R(Ee, {
829
836
  key: 0,
830
837
  ref_key: "buttonNav",
831
838
  ref: t,
832
839
  loading: r.value,
833
- "onUpdate:loading": a[0] || (a[0] = (i) => r.value = i),
840
+ "onUpdate:loading": a[0] || (a[0] = (u) => r.value = u),
834
841
  editing: B.value,
835
- "onUpdate:editing": a[1] || (a[1] = (i) => B.value = i),
842
+ "onUpdate:editing": a[1] || (a[1] = (u) => B.value = u),
836
843
  "picked-modification-view": N.value,
837
- "onUpdate:pickedModificationView": a[2] || (a[2] = (i) => N.value = i),
844
+ "onUpdate:pickedModificationView": a[2] || (a[2] = (u) => N.value = u),
838
845
  item: l.value,
839
846
  modifications: m.value,
840
847
  mode: e.mode,
@@ -849,37 +856,37 @@ const D = (...A) => {
849
856
  "data-changed": h.value,
850
857
  "http-success-read": L.value,
851
858
  "can-update": w.value,
852
- "can-drop": g.value,
859
+ "can-drop": y.value,
853
860
  "can-switch-edit-mode": ie.value,
854
861
  "group-button-as-modal-actions": e.groupButtonAsModalActions,
855
- "able-to-create": me.value,
856
- "able-to-update": fe.value,
862
+ "able-to-create": be.value,
863
+ "able-to-update": me.value,
857
864
  "able-to-drop": Ue.value,
858
865
  perms: b.value,
859
866
  "modification-view": Me.value,
860
- "editable-view": te.value,
867
+ "editable-view": oe.value,
861
868
  onCreate: Ce,
862
869
  onSave: De,
863
870
  onDrop: he
864
- }, ge({ _: 2 }, [
865
- u(C)["prev-buttons-ever"] ? {
871
+ }, pe({ _: 2 }, [
872
+ i(C)["prev-buttons-ever"] ? {
866
873
  name: "prev-buttons-ever",
867
- fn: Q(({ canUpdate: i, canDrop: oe, perms: ae }) => [
868
- U(e.$slots, "prev-buttons-ever", {
869
- canUpdate: i,
870
- canDrop: oe,
871
- perms: ae
874
+ fn: q(({ canUpdate: u, canDrop: ae, perms: ne }) => [
875
+ S(e.$slots, "prev-buttons-ever", {
876
+ canUpdate: u,
877
+ canDrop: ae,
878
+ perms: ne
872
879
  })
873
880
  ]),
874
881
  key: "0"
875
882
  } : void 0,
876
- u(C)["prev-buttons"] ? {
883
+ i(C)["prev-buttons"] ? {
877
884
  name: "prev-buttons",
878
- fn: Q(({ canUpdate: i, canDrop: oe, perms: ae }) => [
879
- U(e.$slots, "prev-buttons", {
880
- canUpdate: i,
881
- canDrop: oe,
882
- perms: ae
885
+ fn: q(({ canUpdate: u, canDrop: ae, perms: ne }) => [
886
+ S(e.$slots, "prev-buttons", {
887
+ canUpdate: u,
888
+ canDrop: ae,
889
+ perms: ne
883
890
  })
884
891
  ]),
885
892
  key: "1"
@@ -891,18 +898,18 @@ const D = (...A) => {
891
898
  ]), 1040);
892
899
  };
893
900
  }
894
- }), Rt = {
895
- install: (A, ve = {}) => {
896
- A.component("lkt-item-crud") === void 0 && A.component("lkt-item-crud", kt);
901
+ }), Ot = {
902
+ install: (A, ce = {}) => {
903
+ A.component("lkt-item-crud") === void 0 && A.component("lkt-item-crud", Dt);
897
904
  }
898
- }, At = (A) => {
905
+ }, Lt = (A) => {
899
906
  re.defaultSaveIcon = A;
900
- }, Et = (A) => {
907
+ }, Nt = (A) => {
901
908
  re.defaultDropIcon = A;
902
909
  };
903
910
  export {
904
- It as debugLktItemCrud,
905
- Rt as default,
906
- Et as setItemCrudDefaultDropIcon,
907
- At as setItemCrudDefaultSaveIcon
911
+ Et as debugLktItemCrud,
912
+ Ot as default,
913
+ Nt as setItemCrudDefaultDropIcon,
914
+ Lt as setItemCrudDefaultSaveIcon
908
915
  };
@@ -21,7 +21,7 @@ declare var __VLS_17: {
21
21
  canUpdate: boolean | undefined;
22
22
  canDrop: boolean | undefined;
23
23
  perms: string[] | undefined;
24
- }, __VLS_52: {
24
+ }, __VLS_53: string, __VLS_54: {}, __VLS_56: {
25
25
  item: LktObject;
26
26
  loading: false;
27
27
  editMode: boolean;
@@ -30,8 +30,10 @@ declare var __VLS_17: {
30
30
  canDrop: boolean;
31
31
  itemBeingEdited: boolean;
32
32
  perms: string[];
33
- }, __VLS_73: {}, __VLS_75: {};
33
+ }, __VLS_77: {}, __VLS_79: {};
34
34
  type __VLS_Slots = {} & {
35
+ [K in NonNullable<typeof __VLS_53>]?: (props: typeof __VLS_54) => any;
36
+ } & {
35
37
  'prev-buttons-ever'?: (props: typeof __VLS_17) => any;
36
38
  } & {
37
39
  'prev-buttons'?: (props: typeof __VLS_19) => any;
@@ -44,11 +46,11 @@ type __VLS_Slots = {} & {
44
46
  } & {
45
47
  'prev-buttons'?: (props: typeof __VLS_38) => any;
46
48
  } & {
47
- item?: (props: typeof __VLS_52) => any;
49
+ item?: (props: typeof __VLS_56) => any;
48
50
  } & {
49
- 'prev-buttons-ever'?: (props: typeof __VLS_73) => any;
51
+ 'prev-buttons-ever'?: (props: typeof __VLS_77) => any;
50
52
  } & {
51
- 'prev-buttons'?: (props: typeof __VLS_75) => any;
53
+ 'prev-buttons'?: (props: typeof __VLS_79) => any;
52
54
  };
53
55
  declare const __VLS_component: import("vue").DefineComponent<ItemCrudConfig, {
54
56
  doDrop: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lkt-item-crud",
3
- "version": "2.0.22",
3
+ "version": "2.0.23",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "module": "./dist/build.js",
@@ -7,7 +7,7 @@
7
7
  ButtonConfig,
8
8
  ensureButtonConfig, FormUiConfig,
9
9
  getDefaultValues,
10
- getFormDataState,
10
+ getFormDataState, getFormSlotKeys,
11
11
  ItemCrud,
12
12
  ItemCrudButtonNavPosition,
13
13
  ItemCrudConfig,
@@ -520,6 +520,13 @@
520
520
  const computedHasButtons = computed(() => {
521
521
  return createMode.value || canUpdate.value || canDrop.value;
522
522
  })
523
+
524
+ const computedFormSlots = computed(() => {
525
+ if (computedHasForm.value) {
526
+ return getFormSlotKeys(props.form);
527
+ }
528
+ return [];
529
+ })
523
530
  </script>
524
531
 
525
532
  <template>
@@ -664,7 +671,11 @@
664
671
  editableViews: [computedEditableView],
665
672
  disabled: !editMode,
666
673
  }"
667
- />
674
+ >
675
+ <template v-for="formSlot in computedFormSlots" v-slot:[formSlot]="{}">
676
+ <slot :name="formSlot"/>
677
+ </template>
678
+ </lkt-form>
668
679
  </template>
669
680
 
670
681
  <template v-else>