lkt-item-crud 2.0.22 → 2.0.24

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,32 +1,32 @@
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";
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";
7
- import { openToast as de } from "lkt-toast";
8
- import { useRouter as lt } from "vue-router";
9
- const pe = class pe {
1
+ import { defineComponent as We, ref as d, watch as p, useSlots as He, computed as g, resolveComponent as ye, createElementBlock as H, createCommentVNode as v, openBlock as c, createBlock as R, Fragment as Fe, renderSlot as w, withDirectives as K, mergeProps as S, normalizeProps as Te, unref as i, createVNode as Y, vShow as W, withCtx as q, mergeDefaults as Ze, nextTick as Pe, onMounted as _e, resolveDynamicComponent as xe, createSlots as pe, createElementVNode as et, toDisplayString as tt, renderList as ot } from "vue";
2
+ import { httpCall as at } from "lkt-http-client";
3
+ import { DataState as Re } from "lkt-data-state";
4
+ import { ModificationView as k, ItemCrudMode as V, ItemCrudButtonNavVisibility as Xe, ButtonType as Ae, TablePermission as Ee, ensureButtonConfig as Z, LktSettings as s, getFormDataState as nt, ItemCrudView as Ke, getFormSlotKeys as ut, ItemCrudButtonNavPosition as Oe, NotificationType as te, getDefaultValues as it, ItemCrud as lt, ToastPositionX as de } from "lkt-vue-kernel";
5
+ import { closeModal as dt, updateModalKey as rt } from "lkt-modal";
6
+ import { __ as st } from "lkt-i18n";
7
+ import { openToast as re } from "lkt-toast";
8
+ import { useRouter as pt } 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 se = ve;
13
13
  const D = (...A) => {
14
- re.debugEnabled && console.info("[LktItemCrud] ", ...A);
15
- }, It = (A = !0) => {
16
- re.debugEnabled = A;
17
- }, dt = {
14
+ se.debugEnabled && console.info("[LktItemCrud] ", ...A);
15
+ }, Ot = (A = !0) => {
16
+ se.debugEnabled = A;
17
+ }, vt = {
18
18
  key: 0,
19
19
  class: "lkt-item-crud-buttons"
20
- }, rt = {
20
+ }, ct = {
21
21
  key: 0,
22
22
  class: "lkt-item-crud-buttons"
23
- }, st = {
23
+ }, ft = {
24
24
  key: 1,
25
25
  class: "lkt-item-crud-buttons"
26
- }, pt = {
26
+ }, mt = {
27
27
  key: 2,
28
28
  class: "lkt-item-crud-buttons"
29
- }, Ee = /* @__PURE__ */ Xe({
29
+ }, Le = /* @__PURE__ */ We({
30
30
  __name: "ButtonNav",
31
31
  props: {
32
32
  item: { default: () => ({}) },
@@ -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 = He(), 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));
@@ -75,14 +75,14 @@ const D = (...A) => {
75
75
  m.value = !0;
76
76
  }, B = () => {
77
77
  m.value = !1;
78
- }, Y = (t, w) => {
79
- typeof t > "u" || o("create", t, w);
80
- }, x = (t, w) => {
81
- typeof t > "u" || o("save", t, w);
82
- }, L = (t, w) => {
83
- typeof t > "u" || o("drop", t, w);
84
- }, $ = k(() => n.editableView === y.Modifications ? n.modifications : n.item);
85
- ve({
78
+ }, _ = (t, T) => {
79
+ typeof t > "u" || o("create", t, T);
80
+ }, z = (t, T) => {
81
+ typeof t > "u" || o("save", t, T);
82
+ }, L = (t, T) => {
83
+ typeof t > "u" || o("drop", t, T);
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,117 +90,117 @@ 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 j = g(() => !n.canDrop || n.dropButton === !1 ? !1 : !n.canUpdate && n.canDrop ? !0 : !m.value && n.editing && n.httpSuccessRead), h = g(() => n.mode === V.Create && n.createButton === !1 || n.mode === V.Update && n.updateButton === !1 || m.value ? !1 : n.editing && n.httpSuccessRead), x = g(() => n.editModeButton === !1 || !n.canSwitchEditMode || !n.canUpdate && !n.canDrop || !n.canUpdate && n.canDrop ? !1 : !m.value && n.mode !== V.Create && n.httpSuccessRead), G = g(() => n.buttonNavVisibility === Xe.Always || f["prev-buttons-ever"] ? !0 : n.buttonNavVisibility === Xe.Never ? !1 : h.value || j.value || x.value), F = 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 F.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
+ }), F.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
+ }), F.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
+ }), F.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
- return (t, w) => {
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, {
138
+ return (t, T) => {
139
+ var Q, ie, N, P;
140
+ const y = ye("lkt-button");
141
+ return G.value ? (c(), H("div", vt, [
142
+ t.grouped && t.groupButtonAsModalActions ? (c(), H(Fe, { key: 0 }, [
143
+ x.value ? (c(), R(y, S({ key: 0 }, t.editModeButton, {
144
144
  checked: E.value,
145
- "onUpdate:checked": w[0] || (w[0] = (M) => E.value = M),
145
+ "onUpdate:checked": T[0] || (T[0] = (U) => E.value = U),
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
+ F.value.length > 0 ? (c(), R(y, Te(S({ key: 1 }, {
149
+ type: i(Ae).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"] ? w(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"] ? w(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
+ K(Y(y, S({
170
170
  ref_key: "saveButtonRef",
171
171
  ref: r
172
172
  }, {
173
173
  ...t.updateButton,
174
174
  resourceData: {
175
- ...(ie = t.updateButton) == null ? void 0 : ie.resourceData,
175
+ ...(Q = t.updateButton) == null ? void 0 : Q.resourceData,
176
176
  ...$.value
177
177
  },
178
178
  disabled: !t.ableToUpdate
179
179
  }, {
180
180
  onLoading: b,
181
181
  onLoaded: B,
182
- onClick: x
182
+ onClick: z
183
183
  }), null, 16), [
184
- [W, t.mode === u(T).Update && h.value]
184
+ [W, t.mode === i(V).Update && h.value]
185
185
  ]),
186
- X(z(g, S({
186
+ K(Y(y, S({
187
187
  ref_key: "saveButtonRef",
188
188
  ref: r
189
189
  }, {
190
190
  ...t.createButton,
191
191
  resourceData: {
192
- ...(N = t.createButton) == null ? void 0 : N.resourceData,
192
+ ...(ie = t.createButton) == null ? void 0 : ie.resourceData,
193
193
  ...$.value
194
194
  },
195
195
  disabled: !t.ableToCreate
196
196
  }, {
197
197
  onLoading: b,
198
198
  onLoaded: B,
199
- onClick: Y
199
+ onClick: _
200
200
  }), null, 16), [
201
- [W, t.mode === u(T).Create && h.value]
201
+ [W, t.mode === i(V).Create && h.value]
202
202
  ]),
203
- X(z(g, S({
203
+ K(Y(y, S({
204
204
  ref_key: "dropButtonRef",
205
205
  ref: l
206
206
  }, t.dropButton, {
@@ -209,66 +209,66 @@ 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
+ [W, j.value && t.mode !== i(V).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 ? w(t.$slots, "buttons", { key: 4 }) : v("", !0)
215
+ ], 64)) : t.grouped ? (c(), R(y, S({
216
216
  key: 1,
217
217
  ref: "groupButton"
218
218
  }, t.groupButton, { class: "lkt-item-crud-group-button" }), {
219
- split: Q(() => {
220
- var M, ee;
219
+ split: q(() => {
220
+ var U, X;
221
221
  return [
222
- Z.value ? (c(), R(g, S({ key: 0 }, t.editModeButton, {
222
+ x.value ? (c(), R(y, S({ key: 0 }, t.editModeButton, {
223
223
  checked: E.value,
224
- "onUpdate:checked": w[1] || (w[1] = (se) => E.value = se),
224
+ "onUpdate:checked": T[1] || (T[1] = (le) => E.value = le),
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
+ F.value.length > 0 ? (c(), R(y, Te(S({ key: 1 }, {
228
+ type: i(Ae).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"] ? w(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"] ? w(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
+ K(Y(y, S({
249
249
  ref_key: "saveButtonRef",
250
250
  ref: r
251
251
  }, {
252
252
  ...t.updateButton,
253
253
  resourceData: {
254
- ...(M = t.updateButton) == null ? void 0 : M.resourceData,
254
+ ...(U = t.updateButton) == null ? void 0 : U.resourceData,
255
255
  ...$.value
256
256
  },
257
257
  disabled: !t.ableToUpdate
258
258
  }, {
259
259
  onLoading: b,
260
260
  onLoaded: B,
261
- onClick: x
261
+ onClick: z
262
262
  }), null, 16), [
263
- [W, t.mode === u(T).Update && h.value]
263
+ [W, t.mode === i(V).Update && h.value]
264
264
  ]),
265
- X(z(g, S({
265
+ K(Y(y, S({
266
266
  ref_key: "saveButtonRef",
267
267
  ref: r
268
268
  }, {
269
269
  ...t.createButton,
270
270
  resourceData: {
271
- ...(ee = t.createButton) == null ? void 0 : ee.resourceData,
271
+ ...(X = t.createButton) == null ? void 0 : X.resourceData,
272
272
  ...$.value
273
273
  },
274
274
  disabled: !t.ableToCreate
@@ -276,11 +276,11 @@ const D = (...A) => {
276
276
  disabled: !t.ableToCreate,
277
277
  onLoading: b,
278
278
  onLoaded: B,
279
- onClick: Y
279
+ onClick: _
280
280
  }), null, 16, ["disabled"]), [
281
- [W, t.mode === u(T).Create && h.value]
281
+ [W, t.mode === i(V).Create && h.value]
282
282
  ]),
283
- X(z(g, S({
283
+ K(Y(y, S({
284
284
  ref_key: "dropButtonRef",
285
285
  ref: l
286
286
  }, t.dropButton, {
@@ -289,15 +289,15 @@ 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
+ [W, j.value && t.mode !== i(V).Create]
293
293
  ]),
294
- u(f).buttons ? U(t.$slots, "buttons", { key: 4 }) : v("", !0)
294
+ i(f).buttons ? w(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(), H(Fe, { key: 2 }, [
299
+ i(f)["prev-buttons-ever"] ? K((c(), H("div", ct, [
300
+ w(t.$slots, "prev-buttons-ever", {
301
301
  canUpdate: t.canUpdate,
302
302
  canDrop: t.canDrop,
303
303
  perms: t.perms
@@ -305,8 +305,8 @@ const D = (...A) => {
305
305
  ], 512)), [
306
306
  [W, !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"] ? K((c(), H("div", ft, [
309
+ w(t.$slots, "prev-buttons", {
310
310
  canUpdate: t.canUpdate,
311
311
  canDrop: t.canDrop,
312
312
  perms: t.perms
@@ -314,24 +314,24 @@ const D = (...A) => {
314
314
  ], 512)), [
315
315
  [W, E.value && !m.value]
316
316
  ]) : v("", !0),
317
- X(z(g, S({
317
+ K(Y(y, S({
318
318
  ref_key: "saveButtonRef",
319
319
  ref: r
320
320
  }, {
321
321
  ...t.updateButton,
322
322
  resourceData: {
323
- ...(F = t.updateButton) == null ? void 0 : F.resourceData,
323
+ ...(N = t.updateButton) == null ? void 0 : N.resourceData,
324
324
  ...$.value
325
325
  },
326
326
  disabled: !t.ableToUpdate
327
327
  }, {
328
328
  onLoading: b,
329
329
  onLoaded: B,
330
- onClick: x
330
+ onClick: z
331
331
  }), null, 16), [
332
- [W, t.mode === u(T).Update && h.value]
332
+ [W, t.mode === i(V).Update && h.value]
333
333
  ]),
334
- X(z(g, S({
334
+ K(Y(y, S({
335
335
  ref_key: "saveButtonRef",
336
336
  ref: r
337
337
  }, {
@@ -344,11 +344,11 @@ const D = (...A) => {
344
344
  }, {
345
345
  onLoading: b,
346
346
  onLoaded: B,
347
- onClick: Y
347
+ onClick: _
348
348
  }), null, 16), [
349
- [W, t.mode === u(T).Create && h.value]
349
+ [W, t.mode === i(V).Create && h.value]
350
350
  ]),
351
- X(z(g, S({
351
+ K(Y(y, S({
352
352
  ref_key: "dropButtonRef",
353
353
  ref: l
354
354
  }, t.dropButton, {
@@ -357,52 +357,52 @@ 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
+ [W, j.value && t.mode !== i(V).Create]
361
361
  ]),
362
- u(f).buttons ? X((c(), H("div", pt, [
363
- U(t.$slots, "buttons")
362
+ i(f).buttons ? K((c(), H("div", mt, [
363
+ w(t.$slots, "buttons")
364
364
  ], 512)), [
365
365
  [W, 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
+ F.value.length > 0 ? (c(), R(y, Te(S({ key: 3 }, {
368
+ type: i(Ae).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
+ x.value ? (c(), R(y, S({ key: 4 }, t.editModeButton, {
377
377
  checked: E.value,
378
- "onUpdate:checked": w[2] || (w[2] = (M) => E.value = M),
378
+ "onUpdate:checked": T[2] || (T[2] = (U) => E.value = U),
379
379
  class: "lkt-item-crud--switch-mode-button"
380
380
  }), null, 16, ["checked"])) : v("", !0)
381
381
  ], 64))
382
382
  ])) : v("", !0);
383
383
  };
384
384
  }
385
- }), vt = { class: "lkt-item-crud" }, ct = {
385
+ }), bt = { class: "lkt-item-crud" }, gt = {
386
386
  key: 0,
387
387
  class: "lkt-item-crud_header"
388
- }, ft = {
388
+ }, yt = {
389
389
  key: 0,
390
390
  class: "lkt-item-crud_header-slot"
391
- }, mt = {
391
+ }, kt = {
392
392
  key: 1,
393
393
  class: "lkt-item-crud_header-title"
394
- }, bt = {
394
+ }, Bt = {
395
395
  key: 2,
396
396
  class: "lkt-item-crud_header-slot"
397
- }, gt = {
397
+ }, Ct = {
398
398
  key: 2,
399
399
  class: "lkt-item-crud_content"
400
- }, yt = {
400
+ }, Dt = {
401
401
  key: 0,
402
402
  class: "lkt-grid-1"
403
- }, kt = /* @__PURE__ */ Xe({
403
+ }, ht = /* @__PURE__ */ We({
404
404
  __name: "LktItemCrud",
405
- props: /* @__PURE__ */ Je({
405
+ props: /* @__PURE__ */ Ze({
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
+ }, it(lt)),
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 = pt(), C = He(), 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), _ = d(!1), z = d(!1), L = d(!1), $ = d(!1), J = d(200), I = d(new Re(l.value, o.dataStateConfig)), j = d(new Re(m.value, o.dataStateConfig)), h = d(!1), x = d(new Re(o.readData)), G = d(o.mode === V.Create), F = d(!1), ue = d(!1), t = d(null), T = d(null), y = g(() => !G.value && Array.isArray(b.value) && b.value.includes(Ee.Update)), Q = g(() => !G.value && Array.isArray(b.value) && b.value.includes(Ee.Drop)), ie = g(() => !G.value && Array.isArray(b.value) && b.value.includes(Ee.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
+ G.value = e === V.Create;
463
463
  }), p(() => o.perms, (e) => {
464
464
  b.value = e;
465
465
  }), p(b, (e) => {
@@ -469,41 +469,43 @@ const D = (...A) => {
469
469
  }), p(E, (e) => {
470
470
  f("update:customData", e);
471
471
  }), p(() => o.modifications, (e) => {
472
- G.value.increment(e), m.value = e;
472
+ j.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
+ Ce(), j.value.increment(e), oe.value === k.Modifications && (h.value = j.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 P = d(Z(o.createButton, s.defaultCreateButton)), U = d(Z(o.updateButton, s.defaultUpdateButton)), X = d(Z(o.dropButton, s.defaultDropButton)), le = d(Z(o.editModeButton, s.defaultEditModeButton)), Be = d(Z(o.groupButton, s.defaultGroupButton));
477
477
  p(() => o.createButton, (e) => {
478
- F.value = J(e, s.defaultCreateButton);
478
+ P.value = Z(e, s.defaultCreateButton);
479
479
  }, { deep: !0 }), p(() => o.updateButton, (e) => {
480
- P.value = J(e, s.defaultUpdateButton);
480
+ U.value = Z(e, s.defaultUpdateButton);
481
481
  }, { deep: !0 }), p(() => o.dropButton, (e) => {
482
- M.value = J(e, s.defaultDropButton);
482
+ X.value = Z(e, s.defaultDropButton);
483
483
  }, { deep: !0 }), p(() => o.editModeButton, (e) => {
484
- ee.value = J(e, s.defaultEditModeButton);
484
+ le.value = Z(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, J.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({
493
- httpResponse: V
494
- }), f("error", V.httpStatus);
490
+ const M = await at(o.readResource, o.readData);
491
+ if (D("fetchItem -> response", M), r.value = !1, J.value = M.httpStatus, E.value = M.custom, !M.success) {
492
+ L.value = !1, J.value = M.httpStatus, typeof ((a = o.events) == null ? void 0 : a.httpEnd) == "function" && o.events.httpEnd({
493
+ httpResponse: M
494
+ }), f("error", M.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({
498
- httpResponse: V
499
- }), f("read", V);
497
+ L.value = !0, l.value = M.data, m.value = Array.isArray(M.modifications) ? {} : M.modifications, b.value = M.perms, I.value.increment(l.value).turnStoredIntoOriginal(), j.value.increment(m.value).turnStoredIntoOriginal(), h.value = I.value.changed(), x.value.turnStoredIntoOriginal(), Object.keys(m.value).length > 0 && (N.value = k.Modifications), ee.value && (Ce(), Pe(() => {
498
+ T.value.turnStoredIntoOriginal();
499
+ })), typeof ((O = o.events) == null ? void 0 : O.httpEnd) == "function" && o.events.httpEnd({
500
+ httpResponse: M
501
+ }), f("read", M);
500
502
  } catch {
501
- r.value = !1, L.value = !1, q.value = 404, f("error", 404);
503
+ r.value = !1, L.value = !1, J.value = 404, f("error", 404);
502
504
  return;
503
505
  }
504
506
  };
505
- p(j, (e) => {
506
- e && Qe(() => j.value = !1);
507
+ p(F, (e) => {
508
+ e && Pe(() => F.value = !1);
507
509
  }), p(() => o.modelValue, (e) => {
508
510
  l.value = e, I.value.increment(e);
509
511
  }, { deep: !0 }), p(l, (e) => {
@@ -512,92 +514,92 @@ const D = (...A) => {
512
514
  let a = o.beforeEmitUpdate(l.value);
513
515
  D("item updated -> override with: ", a), typeof a == "object" && (l.value = a);
514
516
  }
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;
517
+ ee.value && Ce(), f("update:modelValue", l.value), D("item updated -> update dataState"), I.value.increment(e), oe.value === k.Current && (h.value = I.value.changed()), F.value = !0;
516
518
  }, { deep: !0 }), p(b, () => f("perms", b.value)), p(h, (e) => {
517
519
  f("modified-data", e);
518
520
  }), p(() => o.readData, (e) => {
519
- Z.value.increment(e), Z.value.changed() && ce();
521
+ x.value.increment(e), x.value.changed() && fe();
520
522
  }), p(() => o.editing, (e) => {
521
523
  D("editing updated -> updating editMode", e), B.value = e;
522
524
  }), p(B, (e) => {
523
525
  D("editMode updated -> emit update", e), f("update:editing", e);
524
526
  });
525
- const Oe = d(void 0), Le = () => {
526
- ue.value && (Oe.value = tt(l.value, m.value, o.form));
527
+ const Ne = d(void 0), Ce = () => {
528
+ ee.value && (Ne.value = nt(l.value, m.value, o.form));
527
529
  };
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());
530
+ _e(() => {
531
+ o.readResource && !G.value ? fe() : (G.value, L.value = !0, B.value = !0, r.value = !1, I.value.increment(l.value).turnStoredIntoOriginal(), h.value = I.value.changed());
530
532
  });
531
- const Be = (e, a) => {
533
+ const De = (e, a) => {
532
534
  if (a) {
533
- if (r.value = !1, typeof e < "u" && (q.value = e.httpStatus, !e.success))
535
+ if (r.value = !1, typeof e < "u" && (J.value = e.httpStatus, !e.success))
534
536
  return $.value = !0, f("error", e.httpStatus), !1;
535
537
  $.value = !0;
536
538
  }
537
539
  return !0;
538
- }, Ne = (e, a) => {
540
+ }, $e = (e, a) => {
539
541
  if (D("doAutoReloadId -> enter: ", e), typeof e < "u" && e.autoReloadId)
540
542
  if (D("doAutoReloadId -> autoReloadId detected: ", e.autoReloadId), typeof a < "u") {
541
543
  let O = a;
542
544
  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());
544
- }, Ce = (e, a) => {
545
- if (D("onCreate"), !Be(a, F.value.resource)) {
546
- o.notificationType === _.Toast && de({
545
+ } else Me.value ? (D("doAutoReloadId -> insideModal: ", o), rt(o.modalConfig.modalName, o.modalConfig.modalKey, e.autoReloadId)) : (D("doAutoReloadId -> outsideModal"), o.readData.id = e.autoReloadId, D("doAutoReloadId -> turning off create mode"), G.value = !1, fe());
546
+ }, he = (e, a) => {
547
+ if (D("onCreate"), !De(a, P.value.resource)) {
548
+ o.notificationType === te.Toast && re({
547
549
  text: s.defaultCreateErrorText,
548
550
  details: s.defaultCreateErrorDetails,
549
551
  icon: s.defaultCreateErrorIcon,
550
- positionX: le.Right
552
+ positionX: de.Right
551
553
  });
552
554
  return;
553
555
  }
554
- ne.value = !0, D("onCreate -> turn stored data into original"), I.value.increment(l.value).turnStoredIntoOriginal(), o.notificationType === _.Toast && de({
556
+ ue.value = !0, D("onCreate -> turn stored data into original"), I.value.increment(l.value).turnStoredIntoOriginal(), j.value.turnStoredIntoOriginal(), o.notificationType === te.Toast && re({
555
557
  text: s.defaultCreateSuccessText,
556
558
  details: s.defaultCreateSuccessDetails,
557
559
  icon: s.defaultCreateSuccessIcon,
558
- positionX: le.Right
559
- }), Ne(a, o.redirectOnCreate), D("onCreate -> beforeEmitCreate"), f("create", a);
560
- }, De = (e, a) => {
561
- if (D("onUpdate"), !Be(a, P.value.resource)) {
562
- o.notificationType === _.Toast && de({
560
+ positionX: de.Right
561
+ }), $e(a, o.redirectOnCreate), D("onCreate -> beforeEmitCreate"), f("create", a);
562
+ }, we = (e, a) => {
563
+ if (D("onUpdate"), !De(a, U.value.resource)) {
564
+ o.notificationType === te.Toast && re({
563
565
  text: s.defaultUpdateErrorText,
564
566
  details: s.defaultUpdateErrorDetails,
565
567
  icon: s.defaultUpdateErrorIcon,
566
- positionX: le.Right
568
+ positionX: de.Right
567
569
  });
568
570
  return;
569
571
  }
570
- D("onUpdate -> turn stored data into original"), I.value.turnStoredIntoOriginal(), o.notificationType === _.Toast && de({
572
+ D("onUpdate -> turn stored data into original"), I.value.turnStoredIntoOriginal(), j.value.turnStoredIntoOriginal(), o.notificationType === te.Toast && re({
571
573
  text: s.defaultUpdateSuccessText,
572
574
  details: s.defaultUpdateSuccessDetails,
573
575
  icon: s.defaultUpdateSuccessIcon,
574
- positionX: le.Right
575
- }), Ne(a), f("update", a);
576
- }, he = (e, a) => {
577
- if (D("onDrop"), !Be(a, M.value.resource)) {
578
- o.notificationType === _.Toast && de({
576
+ positionX: de.Right
577
+ }), $e(a), f("update", a);
578
+ }, Se = (e, a) => {
579
+ if (D("onDrop"), !De(a, X.value.resource)) {
580
+ o.notificationType === te.Toast && re({
579
581
  text: s.defaultDropErrorText,
580
582
  details: s.defaultDropErrorDetails,
581
583
  icon: s.defaultDropErrorIcon,
582
- positionX: le.Right
584
+ positionX: de.Right
583
585
  });
584
586
  return;
585
587
  }
586
- if (o.notificationType === _.Toast && de({
588
+ if (o.notificationType === te.Toast && re({
587
589
  text: s.defaultDropSuccessText,
588
590
  details: s.defaultDropSuccessDetails,
589
591
  icon: s.defaultDropSuccessIcon,
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") {
592
+ positionX: de.Right
593
+ }), f("drop", a), o.view === Ke.Modal && (D("onDrop -> close modal"), dt(o.modalConfig.modalName, o.modalConfig.modalKey)), typeof o.redirectOnDrop < "u") {
592
594
  let O = o.redirectOnDrop;
593
595
  typeof o.redirectOnDrop == "function" && (O = o.redirectOnDrop()), n.push(O);
594
596
  }
595
597
  };
596
- ve({
598
+ ce({
597
599
  doDrop: () => {
598
600
  t.value && t.value.doDrop();
599
601
  },
600
- doRefresh: ce,
602
+ doRefresh: fe,
601
603
  doSave: () => {
602
604
  t.value && t.value.doSave();
603
605
  },
@@ -606,214 +608,223 @@ const D = (...A) => {
606
608
  },
607
609
  hasModifiedData: () => I.value.changed()
608
610
  });
609
- const He = k(() => {
611
+ const Ge = g(() => {
610
612
  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) => {
613
+ return ge.value ? ee.value ? z.value ? (e = o.modalConfig) == null ? void 0 : e.closeConfirm : "" : oe.value === k.Modifications ? j.value.changed() ? (a = o.modalConfig) == null ? void 0 : a.closeConfirm : "" : I.value.changed() ? (O = o.modalConfig) == null ? void 0 : O.closeConfirm : "" : "";
614
+ }), qe = (e) => {
613
615
  var a;
614
616
  if (typeof ((a = o.modalConfig) == null ? void 0 : a.beforeClose) == "function")
615
617
  return o.modalConfig.beforeClose({
616
618
  ...e,
617
- itemCreated: ne.value
619
+ itemCreated: ue.value
618
620
  });
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(() => {
621
+ }, Ue = g(() => o.title.startsWith("__:") ? String(st(o.title.substring(3))) : o.title), ze = g(() => r.value ? !1 : Ue.value.length > 0 || !!C["post-title"]), Me = g(() => o.view === Ke.Modal), je = g(() => Me.value ? "lkt-modal" : "section"), me = g(() => {
620
622
  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({
623
+ return o.mode !== V.Update || !y.value || !o.enabledSaveWithoutChanges && !h.value || ee.value && (!_.value || !z.value) ? !1 : typeof ((e = U.value) == null ? void 0 : e.disabled) == "function" ? !U.value.disabled({
622
624
  prop: l.value
623
- }) : typeof ((a = P.value) == null ? void 0 : a.disabled) == "boolean" ? !P.value.disabled : !0;
624
- }), me = k(() => {
625
+ }) : typeof ((a = U.value) == null ? void 0 : a.disabled) == "boolean" ? !U.value.disabled : !0;
626
+ }), be = g(() => {
625
627
  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({
628
+ return o.mode !== V.Create || !o.enabledSaveWithoutChanges && !h.value || ee.value && !_.value && !z.value ? !1 : typeof ((e = P.value) == null ? void 0 : e.disabled) == "function" ? !P.value.disabled({
627
629
  prop: l.value
628
- }) : typeof ((a = F.value) == null ? void 0 : a.disabled) == "boolean" ? !F.value.disabled : !0;
629
- }), Ue = k(() => {
630
+ }) : typeof ((a = P.value) == null ? void 0 : a.disabled) == "boolean" ? !P.value.disabled : !0;
631
+ }), Ve = g(() => {
630
632
  var e, a;
631
- return g.value ? typeof ((e = M.value) == null ? void 0 : e.disabled) == "function" ? !M.value.disabled({
633
+ return Q.value ? typeof ((e = X.value) == null ? void 0 : e.disabled) == "function" ? !X.value.disabled({
632
634
  prop: l.value
633
- }) : typeof ((a = M.value) == null ? void 0 : a.disabled) == "boolean" ? !M.value.disabled : !0 : !1;
634
- }), qe = k(() => $e.value === "lkt-modal" ? {
635
+ }) : typeof ((a = X.value) == null ? void 0 : a.disabled) == "boolean" ? !X.value.disabled : !0 : !1;
636
+ }), Je = g(() => je.value === "lkt-modal" ? {
635
637
  title: o.title,
636
638
  item: l.value,
637
639
  ...o.modalConfig,
638
- beforeClose: Ke,
639
- closeConfirm: He.value,
640
+ beforeClose: qe,
641
+ closeConfirm: Ge.value,
640
642
  headerActionsButton: o.groupButton !== !1 ? {
641
- dot: me.value || fe.value
643
+ dot: be.value || me.value
642
644
  } : !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);
645
+ } : {}), ee = g(() => typeof o.form == "object" && Object.keys(o.form).length > 0), Ie = g(() => Object.keys(m.value).length === 0 ? [] : o.modificationViews), oe = g(() => Object.keys(m.value).length === 0 ? k.Current : k.Modifications), ge = g(() => G.value || y.value || Q.value), Qe = g(() => ee.value ? ut(o.form) : []);
644
646
  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", {
647
+ const O = ye("lkt-http-info"), M = ye("lkt-form"), Ye = ye("lkt-loader");
648
+ return c(), R(xe(je.value), S(Je.value, { class: "lkt-item-crud" }), pe({
649
+ default: q(() => [
650
+ et("article", bt, [
651
+ !Me.value && ze.value ? (c(), H("header", gt, [
652
+ i(C)["pre-title"] ? (c(), H("div", yt, [
653
+ w(e.$slots, "pre-title", {
652
654
  item: l.value,
653
655
  loading: r.value
654
656
  })
655
657
  ])) : 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", {
658
+ Ue.value.length > 0 ? (c(), H("h1", kt, tt(Ue.value), 1)) : v("", !0),
659
+ i(C)["post-title"] ? (c(), H("div", Bt, [
660
+ w(e.$slots, "post-title", {
659
661
  item: l.value,
660
662
  loading: r.value
661
663
  })
662
664
  ])) : v("", !0)
663
665
  ])) : v("", !0),
664
- e.buttonNavPosition === u(Ae).Top && (e.groupButton === !1 || !e.groupButtonAsModalActions) && be.value ? (c(), R(Ee, {
666
+ e.buttonNavPosition === i(Oe).Top && (e.groupButton === !1 || !e.groupButtonAsModalActions) && ge.value ? (c(), R(Le, {
665
667
  key: 1,
666
668
  ref_key: "buttonNav",
667
669
  ref: t,
668
670
  loading: r.value,
669
- "onUpdate:loading": a[3] || (a[3] = (i) => r.value = i),
671
+ "onUpdate:loading": a[3] || (a[3] = (u) => r.value = u),
670
672
  editing: B.value,
671
- "onUpdate:editing": a[4] || (a[4] = (i) => B.value = i),
673
+ "onUpdate:editing": a[4] || (a[4] = (u) => B.value = u),
672
674
  "picked-modification-view": N.value,
673
- "onUpdate:pickedModificationView": a[5] || (a[5] = (i) => N.value = i),
675
+ "onUpdate:pickedModificationView": a[5] || (a[5] = (u) => N.value = u),
674
676
  item: l.value,
675
677
  modifications: m.value,
676
678
  mode: e.mode,
677
679
  view: e.view,
678
680
  grouped: e.groupButton !== !1,
679
681
  "button-nav-visibility": e.buttonNavVisibility,
680
- "create-button": F.value,
681
- "update-button": P.value,
682
- "drop-button": M.value,
683
- "edit-mode-button": ee.value,
684
- "group-button": se.value,
682
+ "create-button": P.value,
683
+ "update-button": U.value,
684
+ "drop-button": X.value,
685
+ "edit-mode-button": le.value,
686
+ "group-button": Be.value,
685
687
  "data-changed": h.value,
686
688
  "http-success-read": L.value,
687
- "can-update": w.value,
688
- "can-drop": g.value,
689
+ "can-update": y.value,
690
+ "can-drop": Q.value,
689
691
  "can-switch-edit-mode": ie.value,
690
692
  "group-button-as-modal-actions": e.groupButtonAsModalActions,
691
- "able-to-create": me.value,
692
- "able-to-update": fe.value,
693
- "able-to-drop": Ue.value,
693
+ "able-to-create": be.value,
694
+ "able-to-update": me.value,
695
+ "able-to-drop": Ve.value,
694
696
  perms: b.value,
695
- "modification-view": Me.value,
696
- "editable-view": te.value,
697
- onCreate: Ce,
698
- onSave: De,
699
- onDrop: he
700
- }, ge({ _: 2 }, [
701
- u(C)["prev-buttons-ever"] ? {
697
+ "modification-view": Ie.value,
698
+ "editable-view": oe.value,
699
+ onCreate: he,
700
+ onSave: we,
701
+ onDrop: Se
702
+ }, pe({ _: 2 }, [
703
+ i(C)["prev-buttons-ever"] ? {
702
704
  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
705
+ fn: q(({ canUpdate: u, canDrop: ae, perms: ne }) => [
706
+ w(e.$slots, "prev-buttons-ever", {
707
+ canUpdate: u,
708
+ canDrop: ae,
709
+ perms: ne
708
710
  })
709
711
  ]),
710
712
  key: "0"
711
713
  } : void 0,
712
- u(C)["prev-buttons"] ? {
714
+ i(C)["prev-buttons"] ? {
713
715
  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
716
+ fn: q(({ canUpdate: u, canDrop: ae, perms: ne }) => [
717
+ w(e.$slots, "prev-buttons", {
718
+ canUpdate: u,
719
+ canDrop: ae,
720
+ perms: ne
719
721
  })
720
722
  ]),
721
723
  key: "1"
722
724
  } : void 0
723
725
  ]), 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, {
726
+ r.value ? v("", !0) : (c(), H("div", Ct, [
727
+ L.value ? (c(), H("div", Dt, [
728
+ $.value && e.notificationType === i(te).Inline ? (c(), R(O, {
727
729
  key: 0,
728
- code: q.value,
729
- palette: q.value === 200 ? "success" : "danger",
730
+ code: J.value,
731
+ palette: J.value === 200 ? "success" : "danger",
730
732
  quick: "",
731
733
  "can-close": "",
732
- onClose: a[6] || (a[6] = (i) => $.value = !1)
734
+ onClose: a[6] || (a[6] = (u) => $.value = !1)
733
735
  }, null, 8, ["code", "palette"])) : v("", !0),
734
- ue.value ? (c(), R(V, S({
736
+ ee.value ? (c(), R(M, S({
735
737
  key: 1,
738
+ ref_key: "formRef",
739
+ ref: T,
736
740
  modelValue: l.value,
737
- "onUpdate:modelValue": a[7] || (a[7] = (i) => l.value = i),
741
+ "onUpdate:modelValue": a[7] || (a[7] = (u) => l.value = u),
738
742
  modifications: m.value,
739
- "onUpdate:modifications": a[8] || (a[8] = (i) => m.value = i),
740
- valid: Y.value,
741
- "onUpdate:valid": a[9] || (a[9] = (i) => Y.value = i),
742
- changed: x.value,
743
- "onUpdate:changed": a[10] || (a[10] = (i) => x.value = i)
743
+ "onUpdate:modifications": a[8] || (a[8] = (u) => m.value = u),
744
+ valid: _.value,
745
+ "onUpdate:valid": a[9] || (a[9] = (u) => _.value = u),
746
+ changed: z.value,
747
+ "onUpdate:changed": a[10] || (a[10] = (u) => z.value = u)
744
748
  }, {
745
749
  ...e.formUiConfig,
746
750
  form: e.form,
747
751
  differencesTableConfig: e.differencesTableConfig,
748
752
  visibleView: N.value,
749
- modificationDataState: Oe.value,
750
- editableViews: [te.value],
753
+ modificationDataState: Ne.value,
754
+ editableViews: [oe.value],
751
755
  disabled: !B.value
752
- }), null, 16, ["modelValue", "modifications", "valid", "changed"])) : U(e.$slots, "item", {
756
+ }), pe({ _: 2 }, [
757
+ ot(Qe.value, (u) => ({
758
+ name: u,
759
+ fn: q(({}) => [
760
+ w(e.$slots, u)
761
+ ])
762
+ }))
763
+ ]), 1040, ["modelValue", "modifications", "valid", "changed"])) : w(e.$slots, "item", {
753
764
  key: 2,
754
765
  item: l.value,
755
766
  loading: r.value,
756
767
  editMode: B.value,
757
- isCreate: K.value,
758
- canUpdate: w.value,
759
- canDrop: g.value,
760
- itemBeingEdited: j.value,
768
+ isCreate: G.value,
769
+ canUpdate: y.value,
770
+ canDrop: Q.value,
771
+ itemBeingEdited: F.value,
761
772
  perms: b.value
762
773
  })
763
- ])) : e.notificationType === u(_).Inline ? (c(), R(O, {
774
+ ])) : e.notificationType === i(te).Inline ? (c(), R(O, {
764
775
  key: 1,
765
- code: q.value
776
+ code: J.value
766
777
  }, null, 8, ["code"])) : v("", !0)
767
778
  ])),
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, {
779
+ r.value ? (c(), R(Ye, { key: 3 })) : v("", !0),
780
+ e.buttonNavPosition === i(Oe).Bottom && (e.groupButton === !1 || !e.groupButtonAsModalActions) && ge.value ? (c(), R(Le, {
770
781
  key: 4,
771
782
  ref_key: "buttonNav",
772
783
  ref: t,
773
784
  loading: r.value,
774
- "onUpdate:loading": a[11] || (a[11] = (i) => r.value = i),
785
+ "onUpdate:loading": a[11] || (a[11] = (u) => r.value = u),
775
786
  editing: B.value,
776
- "onUpdate:editing": a[12] || (a[12] = (i) => B.value = i),
787
+ "onUpdate:editing": a[12] || (a[12] = (u) => B.value = u),
777
788
  "picked-modification-view": N.value,
778
- "onUpdate:pickedModificationView": a[13] || (a[13] = (i) => N.value = i),
789
+ "onUpdate:pickedModificationView": a[13] || (a[13] = (u) => N.value = u),
779
790
  item: l.value,
780
791
  modifications: m.value,
781
792
  mode: e.mode,
782
793
  view: e.view,
783
794
  grouped: e.groupButton !== !1,
784
795
  "button-nav-visibility": e.buttonNavVisibility,
785
- "create-button": F.value,
786
- "update-button": P.value,
787
- "drop-button": M.value,
788
- "edit-mode-button": ee.value,
789
- "group-button": se.value,
796
+ "create-button": P.value,
797
+ "update-button": U.value,
798
+ "drop-button": X.value,
799
+ "edit-mode-button": le.value,
800
+ "group-button": Be.value,
790
801
  "data-changed": h.value,
791
802
  "http-success-read": L.value,
792
- "can-update": w.value,
793
- "can-drop": g.value,
803
+ "can-update": y.value,
804
+ "can-drop": Q.value,
794
805
  "can-switch-edit-mode": ie.value,
795
806
  "group-button-as-modal-actions": e.groupButtonAsModalActions,
796
- "able-to-create": me.value,
797
- "able-to-update": fe.value,
798
- "able-to-drop": Ue.value,
807
+ "able-to-create": be.value,
808
+ "able-to-update": me.value,
809
+ "able-to-drop": Ve.value,
799
810
  perms: b.value,
800
- "modification-view": Me.value,
801
- "editable-view": te.value,
802
- onCreate: Ce,
803
- onSave: De,
804
- onDrop: he
805
- }, ge({ _: 2 }, [
806
- u(C)["prev-buttons-ever"] ? {
811
+ "modification-view": Ie.value,
812
+ "editable-view": oe.value,
813
+ onCreate: he,
814
+ onSave: we,
815
+ onDrop: Se
816
+ }, pe({ _: 2 }, [
817
+ i(C)["prev-buttons-ever"] ? {
807
818
  name: "prev-buttons-ever",
808
- fn: Q(() => [
809
- U(e.$slots, "prev-buttons-ever")
819
+ fn: q(() => [
820
+ w(e.$slots, "prev-buttons-ever")
810
821
  ]),
811
822
  key: "0"
812
823
  } : void 0,
813
- u(C)["prev-buttons"] ? {
824
+ i(C)["prev-buttons"] ? {
814
825
  name: "prev-buttons-ever",
815
- fn: Q(() => [
816
- U(e.$slots, "prev-buttons")
826
+ fn: q(() => [
827
+ w(e.$slots, "prev-buttons")
817
828
  ]),
818
829
  key: "1"
819
830
  } : void 0
@@ -822,64 +833,64 @@ const D = (...A) => {
822
833
  ]),
823
834
  _: 2
824
835
  }, [
825
- e.groupButton !== !1 && e.groupButtonAsModalActions && be.value ? {
836
+ e.groupButton !== !1 && e.groupButtonAsModalActions && ge.value ? {
826
837
  name: "header-actions",
827
- fn: Q(() => [
828
- e.buttonNavPosition === u(Ae).Top ? (c(), R(Ee, {
838
+ fn: q(() => [
839
+ e.buttonNavPosition === i(Oe).Top ? (c(), R(Le, {
829
840
  key: 0,
830
841
  ref_key: "buttonNav",
831
842
  ref: t,
832
843
  loading: r.value,
833
- "onUpdate:loading": a[0] || (a[0] = (i) => r.value = i),
844
+ "onUpdate:loading": a[0] || (a[0] = (u) => r.value = u),
834
845
  editing: B.value,
835
- "onUpdate:editing": a[1] || (a[1] = (i) => B.value = i),
846
+ "onUpdate:editing": a[1] || (a[1] = (u) => B.value = u),
836
847
  "picked-modification-view": N.value,
837
- "onUpdate:pickedModificationView": a[2] || (a[2] = (i) => N.value = i),
848
+ "onUpdate:pickedModificationView": a[2] || (a[2] = (u) => N.value = u),
838
849
  item: l.value,
839
850
  modifications: m.value,
840
851
  mode: e.mode,
841
852
  view: e.view,
842
853
  grouped: !0,
843
854
  "button-nav-visibility": e.buttonNavVisibility,
844
- "create-button": F.value,
845
- "update-button": P.value,
846
- "drop-button": M.value,
847
- "edit-mode-button": ee.value,
848
- "group-button": se.value,
855
+ "create-button": P.value,
856
+ "update-button": U.value,
857
+ "drop-button": X.value,
858
+ "edit-mode-button": le.value,
859
+ "group-button": Be.value,
849
860
  "data-changed": h.value,
850
861
  "http-success-read": L.value,
851
- "can-update": w.value,
852
- "can-drop": g.value,
862
+ "can-update": y.value,
863
+ "can-drop": Q.value,
853
864
  "can-switch-edit-mode": ie.value,
854
865
  "group-button-as-modal-actions": e.groupButtonAsModalActions,
855
- "able-to-create": me.value,
856
- "able-to-update": fe.value,
857
- "able-to-drop": Ue.value,
866
+ "able-to-create": be.value,
867
+ "able-to-update": me.value,
868
+ "able-to-drop": Ve.value,
858
869
  perms: b.value,
859
- "modification-view": Me.value,
860
- "editable-view": te.value,
861
- onCreate: Ce,
862
- onSave: De,
863
- onDrop: he
864
- }, ge({ _: 2 }, [
865
- u(C)["prev-buttons-ever"] ? {
870
+ "modification-view": Ie.value,
871
+ "editable-view": oe.value,
872
+ onCreate: he,
873
+ onSave: we,
874
+ onDrop: Se
875
+ }, pe({ _: 2 }, [
876
+ i(C)["prev-buttons-ever"] ? {
866
877
  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
878
+ fn: q(({ canUpdate: u, canDrop: ae, perms: ne }) => [
879
+ w(e.$slots, "prev-buttons-ever", {
880
+ canUpdate: u,
881
+ canDrop: ae,
882
+ perms: ne
872
883
  })
873
884
  ]),
874
885
  key: "0"
875
886
  } : void 0,
876
- u(C)["prev-buttons"] ? {
887
+ i(C)["prev-buttons"] ? {
877
888
  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
889
+ fn: q(({ canUpdate: u, canDrop: ae, perms: ne }) => [
890
+ w(e.$slots, "prev-buttons", {
891
+ canUpdate: u,
892
+ canDrop: ae,
893
+ perms: ne
883
894
  })
884
895
  ]),
885
896
  key: "1"
@@ -891,18 +902,18 @@ const D = (...A) => {
891
902
  ]), 1040);
892
903
  };
893
904
  }
894
- }), Rt = {
895
- install: (A, ve = {}) => {
896
- A.component("lkt-item-crud") === void 0 && A.component("lkt-item-crud", kt);
905
+ }), Lt = {
906
+ install: (A, ce = {}) => {
907
+ A.component("lkt-item-crud") === void 0 && A.component("lkt-item-crud", ht);
897
908
  }
898
- }, At = (A) => {
899
- re.defaultSaveIcon = A;
900
- }, Et = (A) => {
901
- re.defaultDropIcon = A;
909
+ }, Nt = (A) => {
910
+ se.defaultSaveIcon = A;
911
+ }, $t = (A) => {
912
+ se.defaultDropIcon = A;
902
913
  };
903
914
  export {
904
- It as debugLktItemCrud,
905
- Rt as default,
906
- Et as setItemCrudDefaultDropIcon,
907
- At as setItemCrudDefaultSaveIcon
915
+ Ot as debugLktItemCrud,
916
+ Lt as default,
917
+ $t as setItemCrudDefaultDropIcon,
918
+ Nt as setItemCrudDefaultSaveIcon
908
919
  };