lkt-item-crud 2.0.25 → 2.0.27

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 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";
1
+ import { defineComponent as He, ref as p, watch as b, useSlots as Ge, computed as w, resolveComponent as ke, createElementBlock as h, createCommentVNode as B, openBlock as n, createBlock as g, Fragment as F, renderSlot as T, withDirectives as C, mergeProps as f, normalizeProps as Re, unref as d, renderList as K, vShow as D, createVNode as x, withCtx as Q, mergeDefaults as _e, nextTick as Xe, onMounted as xe, resolveDynamicComponent as et, createSlots as fe, createElementVNode as tt, toDisplayString as at } from "vue";
2
+ import { httpCall as ot } from "lkt-http-client";
3
+ import { DataState as Ae } from "lkt-data-state";
4
+ import { ModificationView as S, ItemCrudMode as A, ItemCrudButtonNavVisibility as Ke, ButtonType as Oe, TablePermission as Le, ensureButtonConfig as ee, LktSettings as m, getFormDataState as nt, ItemCrudView as We, getFormSlotKeys as ut, ItemCrudButtonNavPosition as Ne, NotificationType as ne, getDefaultValues as it, ItemCrud as lt, ToastPositionX as se } from "lkt-vue-kernel";
5
+ import { closeModal as rt, updateModalKey as dt } from "lkt-modal";
6
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 {
7
+ import { openToast as ve } from "lkt-toast";
8
+ import { useRouter as vt } from "vue-router";
9
+ const ce = class ce {
10
10
  };
11
- ve.debugEnabled = !1, ve.defaultSaveIcon = "", ve.defaultDropIcon = "";
12
- let se = ve;
13
- const D = (...A) => {
14
- se.debugEnabled && console.info("[LktItemCrud] ", ...A);
15
- }, Ot = (A = !0) => {
16
- se.debugEnabled = A;
17
- }, vt = {
11
+ ce.debugEnabled = !1, ce.defaultSaveIcon = "", ce.defaultDropIcon = "";
12
+ let pe = ce;
13
+ const V = (...N) => {
14
+ pe.debugEnabled && console.info("[LktItemCrud] ", ...N);
15
+ }, Ot = (N = !0) => {
16
+ pe.debugEnabled = N;
17
+ }, pt = {
18
18
  key: 0,
19
19
  class: "lkt-item-crud-buttons"
20
- }, ct = {
20
+ }, ft = {
21
21
  key: 0,
22
22
  class: "lkt-item-crud-buttons"
23
- }, ft = {
23
+ }, ct = {
24
24
  key: 1,
25
25
  class: "lkt-item-crud-buttons"
26
26
  }, mt = {
27
27
  key: 2,
28
28
  class: "lkt-item-crud-buttons"
29
- }, Le = /* @__PURE__ */ We({
29
+ }, $e = /* @__PURE__ */ He({
30
30
  __name: "ButtonNav",
31
31
  props: {
32
32
  item: { default: () => ({}) },
@@ -54,7 +54,11 @@ const D = (...A) => {
54
54
  buttonNavVisibility: {},
55
55
  modificationView: { type: [Boolean, Array] },
56
56
  pickedModificationView: {},
57
- editableView: {}
57
+ editableView: {},
58
+ navStartButtons: {},
59
+ navStartButtonsEditing: {},
60
+ navEndButtons: {},
61
+ navEndButtonsEditing: {}
58
62
  },
59
63
  emits: [
60
64
  "update:loading",
@@ -64,334 +68,370 @@ const D = (...A) => {
64
68
  "save",
65
69
  "drop"
66
70
  ],
67
- setup(A, { expose: ce, emit: ke }) {
68
- const o = ke, n = A, C = d(n.pickedModificationView);
69
- p(() => n.pickedModificationView, (t) => C.value = t), p(C, (t) => o("update:pickedModificationView", t));
70
- const f = He(), r = d(null), l = d(null), m = d(n.loading);
71
- p(() => n.loading, (t) => m.value = t), p(m, (t) => o("update:loading", t));
72
- const E = d(n.editing);
73
- p(() => n.editing, (t) => E.value = t), p(E, (t) => o("update:editing", t));
74
- const b = () => {
75
- m.value = !0;
76
- }, B = () => {
77
- m.value = !1;
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({
71
+ setup(N, { expose: me, emit: Ce }) {
72
+ const a = Ce, u = N, E = p(u.pickedModificationView);
73
+ b(() => u.pickedModificationView, (t) => E.value = t), b(E, (t) => a("update:pickedModificationView", t));
74
+ const y = Ge(), c = p(null), s = p(null), i = p(u.loading);
75
+ b(() => u.loading, (t) => i.value = t), b(i, (t) => a("update:loading", t));
76
+ const M = p(u.editing);
77
+ b(() => u.editing, (t) => M.value = t), b(M, (t) => a("update:editing", t));
78
+ const k = () => {
79
+ i.value = !0;
80
+ }, U = () => {
81
+ i.value = !1;
82
+ }, te = (t, L) => {
83
+ typeof t > "u" || a("create", t, L);
84
+ }, Y = (t, L) => {
85
+ typeof t > "u" || a("save", t, L);
86
+ }, P = (t, L) => {
87
+ typeof t > "u" || a("drop", t, L);
88
+ }, W = w(() => u.editableView === S.Modifications ? u.modifications : u.item);
89
+ me({
86
90
  doSave: () => {
87
- r.value && typeof r.value.click == "function" && r.value.click();
91
+ c.value && typeof c.value.click == "function" && c.value.click();
88
92
  },
89
93
  doDrop: () => {
90
- l.value && typeof l.value.click == "function" && l.value.click();
94
+ s.value && typeof s.value.click == "function" && s.value.click();
91
95
  }
92
96
  });
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(() => {
97
+ const H = w(() => !u.canDrop || u.dropButton === !1 ? !1 : !u.canUpdate && u.canDrop ? !0 : !i.value && u.editing && u.httpSuccessRead), I = w(() => u.mode === A.Create && u.createButton === !1 || u.mode === A.Update && u.updateButton === !1 || i.value ? !1 : u.editing && u.httpSuccessRead), ae = w(() => u.editModeButton === !1 || !u.canSwitchEditMode || !u.canUpdate && !u.canDrop || !u.canUpdate && u.canDrop ? !1 : !i.value && u.mode !== A.Create && u.httpSuccessRead), J = w(() => u.buttonNavVisibility === Ke.Always || y["prev-buttons-ever"] ? !0 : u.buttonNavVisibility === Ke.Never ? !1 : I.value || H.value || ae.value), G = w(() => u.modificationView === !1 ? [] : u.modificationView === !0 ? [
98
+ S.Current,
99
+ S.Modifications,
100
+ S.SplitView,
101
+ S.Differences
102
+ ] : Array.isArray(u.modificationView) ? u.modificationView : []), re = w(() => {
99
103
  let t = [];
100
- return F.value.includes(k.Current) && t.push({
104
+ return G.value.includes(S.Current) && t.push({
101
105
  text: "Current",
102
106
  icon: "lkt-icn-see",
103
- disabled: C.value === k.Current,
107
+ disabled: E.value === S.Current,
104
108
  events: {
105
109
  click: () => {
106
- C.value = k.Current;
110
+ E.value = S.Current;
107
111
  }
108
112
  }
109
- }), F.value.includes(k.Modifications) && t.push({
113
+ }), G.value.includes(S.Modifications) && t.push({
110
114
  text: "Modifications",
111
115
  icon: "lkt-icn-edit",
112
- disabled: C.value === k.Modifications,
116
+ disabled: E.value === S.Modifications,
113
117
  events: {
114
118
  click: () => {
115
- C.value = k.Modifications;
119
+ E.value = S.Modifications;
116
120
  }
117
121
  }
118
- }), F.value.includes(k.SplitView) && t.push({
122
+ }), G.value.includes(S.SplitView) && t.push({
119
123
  text: "Split View",
120
124
  icon: "lkt-icn-columns",
121
- disabled: C.value === k.SplitView,
125
+ disabled: E.value === S.SplitView,
122
126
  events: {
123
127
  click: () => {
124
- C.value = k.SplitView;
128
+ E.value = S.SplitView;
125
129
  }
126
130
  }
127
- }), F.value.includes(k.Differences) && t.push({
131
+ }), G.value.includes(S.Differences) && t.push({
128
132
  text: "Differences",
129
133
  icon: "lkt-icn-balance",
130
- disabled: C.value === k.Differences,
134
+ disabled: E.value === S.Differences,
131
135
  events: {
132
136
  click: () => {
133
- C.value = k.Differences;
137
+ E.value = S.Differences;
134
138
  }
135
139
  }
136
140
  }), t;
137
141
  });
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
- checked: E.value,
145
- "onUpdate:checked": T[0] || (T[0] = (U) => E.value = U),
142
+ return (t, L) => {
143
+ var _, de, X, q;
144
+ const r = ke("lkt-button");
145
+ return J.value ? (n(), h("div", pt, [
146
+ t.grouped && t.groupButtonAsModalActions ? (n(), h(F, { key: 0 }, [
147
+ ae.value ? (n(), g(r, f({ key: 0 }, t.editModeButton, {
148
+ checked: M.value,
149
+ "onUpdate:checked": L[0] || (L[0] = (v) => M.value = v),
146
150
  class: "lkt-item-crud--switch-mode-button"
147
- }), null, 16, ["checked"])) : v("", !0),
148
- F.value.length > 0 ? (c(), R(y, Te(S({ key: 1 }, {
149
- type: i(Ae).Tooltip,
151
+ }), null, 16, ["checked"])) : B("", !0),
152
+ G.value.length > 0 ? (n(), g(r, Re(f({ key: 1 }, {
153
+ type: d(Oe).Tooltip,
150
154
  icon: "lkt-icn-cross-arrows",
151
155
  class: "lkt-item-crud--modifications-button",
152
- splitButtons: ue.value,
156
+ splitButtons: re.value,
153
157
  tooltip: {
154
158
  contentClass: "lkt-flex-column"
155
159
  }
156
- })), null, 16)) : v("", !0),
157
- i(f)["prev-buttons-ever"] ? w(t.$slots, "prev-buttons-ever", {
160
+ })), null, 16)) : B("", !0),
161
+ (n(!0), h(F, null, K(t.navStartButtons, (v) => C((n(), g(r, f({ ref_for: !0 }, v), null, 16)), [
162
+ [D, !i.value]
163
+ ])), 256)),
164
+ d(y)["prev-buttons-ever"] ? T(t.$slots, "prev-buttons-ever", {
158
165
  key: 2,
159
166
  canUpdate: t.canUpdate,
160
167
  canDrop: t.canDrop,
161
168
  perms: t.perms
162
- }) : v("", !0),
163
- i(f)["prev-buttons"] ? w(t.$slots, "prev-buttons", {
169
+ }) : B("", !0),
170
+ (n(!0), h(F, null, K(t.navStartButtonsEditing, (v) => C((n(), g(r, f({ ref_for: !0 }, v), null, 16)), [
171
+ [D, M.value && !i.value]
172
+ ])), 256)),
173
+ d(y)["prev-buttons"] ? T(t.$slots, "prev-buttons", {
164
174
  key: 3,
165
175
  canUpdate: t.canUpdate,
166
176
  canDrop: t.canDrop,
167
177
  perms: t.perms
168
- }) : v("", !0),
169
- K(Y(y, S({
178
+ }) : B("", !0),
179
+ C(x(r, f({
170
180
  ref_key: "saveButtonRef",
171
- ref: r
181
+ ref: c
172
182
  }, {
173
183
  ...t.updateButton,
174
184
  resourceData: {
175
- ...(Q = t.updateButton) == null ? void 0 : Q.resourceData,
176
- ...$.value
185
+ ...(_ = t.updateButton) == null ? void 0 : _.resourceData,
186
+ ...W.value
177
187
  },
178
188
  disabled: !t.ableToUpdate
179
189
  }, {
180
- onLoading: b,
181
- onLoaded: B,
182
- onClick: z
190
+ onLoading: k,
191
+ onLoaded: U,
192
+ onClick: Y
183
193
  }), null, 16), [
184
- [W, t.mode === i(V).Update && h.value]
194
+ [D, t.mode === d(A).Update && I.value]
185
195
  ]),
186
- K(Y(y, S({
196
+ C(x(r, f({
187
197
  ref_key: "saveButtonRef",
188
- ref: r
198
+ ref: c
189
199
  }, {
190
200
  ...t.createButton,
191
201
  resourceData: {
192
- ...(ie = t.createButton) == null ? void 0 : ie.resourceData,
193
- ...$.value
202
+ ...(de = t.createButton) == null ? void 0 : de.resourceData,
203
+ ...W.value
194
204
  },
195
205
  disabled: !t.ableToCreate
196
206
  }, {
197
- onLoading: b,
198
- onLoaded: B,
199
- onClick: _
207
+ onLoading: k,
208
+ onLoaded: U,
209
+ onClick: te
200
210
  }), null, 16), [
201
- [W, t.mode === i(V).Create && h.value]
211
+ [D, t.mode === d(A).Create && I.value]
202
212
  ]),
203
- K(Y(y, S({
213
+ C(x(r, f({
204
214
  ref_key: "dropButtonRef",
205
- ref: l
215
+ ref: s
206
216
  }, t.dropButton, {
207
217
  disabled: !t.ableToDrop,
208
- onLoading: b,
209
- onLoaded: B,
210
- onClick: L
218
+ onLoading: k,
219
+ onLoaded: U,
220
+ onClick: P
211
221
  }), null, 16, ["disabled"]), [
212
- [W, j.value && t.mode !== i(V).Create]
222
+ [D, H.value && t.mode !== d(A).Create]
213
223
  ]),
214
- i(f).buttons ? w(t.$slots, "buttons", { key: 4 }) : v("", !0)
215
- ], 64)) : t.grouped ? (c(), R(y, S({
224
+ d(y).buttons ? T(t.$slots, "buttons", { key: 4 }) : B("", !0),
225
+ (n(!0), h(F, null, K(t.navEndButtons, (v) => C((n(), g(r, f({ ref_for: !0 }, v), null, 16)), [
226
+ [D, !i.value]
227
+ ])), 256)),
228
+ (n(!0), h(F, null, K(t.navEndButtonsEditing, (v) => C((n(), g(r, f({ ref_for: !0 }, v), null, 16)), [
229
+ [D, M.value && !i.value]
230
+ ])), 256))
231
+ ], 64)) : t.grouped ? (n(), g(r, f({
216
232
  key: 1,
217
233
  ref: "groupButton"
218
234
  }, t.groupButton, { class: "lkt-item-crud-group-button" }), {
219
- split: q(() => {
220
- var U, X;
235
+ split: Q(() => {
236
+ var v, z;
221
237
  return [
222
- x.value ? (c(), R(y, S({ key: 0 }, t.editModeButton, {
223
- checked: E.value,
224
- "onUpdate:checked": T[1] || (T[1] = (le) => E.value = le),
238
+ ae.value ? (n(), g(r, f({ key: 0 }, t.editModeButton, {
239
+ checked: M.value,
240
+ "onUpdate:checked": L[1] || (L[1] = ($) => M.value = $),
225
241
  class: "lkt-item-crud--switch-mode-button"
226
- }), null, 16, ["checked"])) : v("", !0),
227
- F.value.length > 0 ? (c(), R(y, Te(S({ key: 1 }, {
228
- type: i(Ae).Tooltip,
242
+ }), null, 16, ["checked"])) : B("", !0),
243
+ G.value.length > 0 ? (n(), g(r, Re(f({ key: 1 }, {
244
+ type: d(Oe).Tooltip,
229
245
  icon: "lkt-icn-cross-arrows",
230
246
  class: "lkt-item-crud--modifications-button",
231
- splitButtons: ue.value,
247
+ splitButtons: re.value,
232
248
  tooltip: {
233
249
  contentClass: "lkt-flex-column"
234
250
  }
235
- })), null, 16)) : v("", !0),
236
- i(f)["prev-buttons-ever"] ? w(t.$slots, "prev-buttons-ever", {
251
+ })), null, 16)) : B("", !0),
252
+ (n(!0), h(F, null, K(t.navStartButtons, ($) => C((n(), g(r, f({ ref_for: !0 }, $), null, 16)), [
253
+ [D, !i.value]
254
+ ])), 256)),
255
+ d(y)["prev-buttons-ever"] ? T(t.$slots, "prev-buttons-ever", {
237
256
  key: 2,
238
257
  canUpdate: t.canUpdate,
239
258
  canDrop: t.canDrop,
240
259
  perms: t.perms
241
- }) : v("", !0),
242
- i(f)["prev-buttons"] ? w(t.$slots, "prev-buttons", {
260
+ }) : B("", !0),
261
+ (n(!0), h(F, null, K(t.navStartButtonsEditing, ($) => C((n(), g(r, f({ ref_for: !0 }, $), null, 16)), [
262
+ [D, M.value && !i.value]
263
+ ])), 256)),
264
+ d(y)["prev-buttons"] ? T(t.$slots, "prev-buttons", {
243
265
  key: 3,
244
266
  canUpdate: t.canUpdate,
245
267
  canDrop: t.canDrop,
246
268
  perms: t.perms
247
- }) : v("", !0),
248
- K(Y(y, S({
269
+ }) : B("", !0),
270
+ C(x(r, f({
249
271
  ref_key: "saveButtonRef",
250
- ref: r
272
+ ref: c
251
273
  }, {
252
274
  ...t.updateButton,
253
275
  resourceData: {
254
- ...(U = t.updateButton) == null ? void 0 : U.resourceData,
255
- ...$.value
276
+ ...(v = t.updateButton) == null ? void 0 : v.resourceData,
277
+ ...W.value
256
278
  },
257
279
  disabled: !t.ableToUpdate
258
280
  }, {
259
- onLoading: b,
260
- onLoaded: B,
261
- onClick: z
281
+ onLoading: k,
282
+ onLoaded: U,
283
+ onClick: Y
262
284
  }), null, 16), [
263
- [W, t.mode === i(V).Update && h.value]
285
+ [D, t.mode === d(A).Update && I.value]
264
286
  ]),
265
- K(Y(y, S({
287
+ C(x(r, f({
266
288
  ref_key: "saveButtonRef",
267
- ref: r
289
+ ref: c
268
290
  }, {
269
291
  ...t.createButton,
270
292
  resourceData: {
271
- ...(X = t.createButton) == null ? void 0 : X.resourceData,
272
- ...$.value
293
+ ...(z = t.createButton) == null ? void 0 : z.resourceData,
294
+ ...W.value
273
295
  },
274
296
  disabled: !t.ableToCreate
275
297
  }, {
276
298
  disabled: !t.ableToCreate,
277
- onLoading: b,
278
- onLoaded: B,
279
- onClick: _
299
+ onLoading: k,
300
+ onLoaded: U,
301
+ onClick: te
280
302
  }), null, 16, ["disabled"]), [
281
- [W, t.mode === i(V).Create && h.value]
303
+ [D, t.mode === d(A).Create && I.value]
282
304
  ]),
283
- K(Y(y, S({
305
+ C(x(r, f({
284
306
  ref_key: "dropButtonRef",
285
- ref: l
307
+ ref: s
286
308
  }, t.dropButton, {
287
309
  disabled: !t.ableToDrop,
288
- onLoading: b,
289
- onLoaded: B,
290
- onClick: L
310
+ onLoading: k,
311
+ onLoaded: U,
312
+ onClick: P
291
313
  }), null, 16, ["disabled"]), [
292
- [W, j.value && t.mode !== i(V).Create]
314
+ [D, H.value && t.mode !== d(A).Create]
293
315
  ]),
294
- i(f).buttons ? w(t.$slots, "buttons", { key: 4 }) : v("", !0)
316
+ d(y).buttons ? T(t.$slots, "buttons", { key: 4 }) : B("", !0),
317
+ (n(!0), h(F, null, K(t.navEndButtons, ($) => C((n(), g(r, f({ ref_for: !0 }, $), null, 16)), [
318
+ [D, !i.value]
319
+ ])), 256)),
320
+ (n(!0), h(F, null, K(t.navEndButtonsEditing, ($) => C((n(), g(r, f({ ref_for: !0 }, $), null, 16)), [
321
+ [D, M.value && !i.value]
322
+ ])), 256))
295
323
  ];
296
324
  }),
297
325
  _: 3
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", {
326
+ }, 16)) : (n(), h(F, { key: 2 }, [
327
+ (n(!0), h(F, null, K(t.navStartButtons, (v) => C((n(), g(r, f({ ref_for: !0 }, v), null, 16)), [
328
+ [D, !i.value]
329
+ ])), 256)),
330
+ d(y)["prev-buttons-ever"] ? C((n(), h("div", ft, [
331
+ T(t.$slots, "prev-buttons-ever", {
301
332
  canUpdate: t.canUpdate,
302
333
  canDrop: t.canDrop,
303
334
  perms: t.perms
304
335
  })
305
336
  ], 512)), [
306
- [W, !m.value]
307
- ]) : v("", !0),
308
- i(f)["prev-buttons"] ? K((c(), H("div", ft, [
309
- w(t.$slots, "prev-buttons", {
337
+ [D, !i.value]
338
+ ]) : B("", !0),
339
+ (n(!0), h(F, null, K(t.navStartButtonsEditing, (v) => C((n(), g(r, f({ ref_for: !0 }, v), null, 16)), [
340
+ [D, M.value && !i.value]
341
+ ])), 256)),
342
+ d(y)["prev-buttons"] ? C((n(), h("div", ct, [
343
+ T(t.$slots, "prev-buttons", {
310
344
  canUpdate: t.canUpdate,
311
345
  canDrop: t.canDrop,
312
346
  perms: t.perms
313
347
  })
314
348
  ], 512)), [
315
- [W, E.value && !m.value]
316
- ]) : v("", !0),
317
- K(Y(y, S({
349
+ [D, M.value && !i.value]
350
+ ]) : B("", !0),
351
+ C(x(r, f({
318
352
  ref_key: "saveButtonRef",
319
- ref: r
353
+ ref: c
320
354
  }, {
321
355
  ...t.updateButton,
322
356
  resourceData: {
323
- ...(N = t.updateButton) == null ? void 0 : N.resourceData,
324
- ...$.value
357
+ ...(X = t.updateButton) == null ? void 0 : X.resourceData,
358
+ ...W.value
325
359
  },
326
360
  disabled: !t.ableToUpdate
327
361
  }, {
328
- onLoading: b,
329
- onLoaded: B,
330
- onClick: z
362
+ onLoading: k,
363
+ onLoaded: U,
364
+ onClick: Y
331
365
  }), null, 16), [
332
- [W, t.mode === i(V).Update && h.value]
366
+ [D, t.mode === d(A).Update && I.value]
333
367
  ]),
334
- K(Y(y, S({
368
+ C(x(r, f({
335
369
  ref_key: "saveButtonRef",
336
- ref: r
370
+ ref: c
337
371
  }, {
338
372
  ...t.createButton,
339
373
  resourceData: {
340
- ...(P = t.createButton) == null ? void 0 : P.resourceData,
341
- ...$.value
374
+ ...(q = t.createButton) == null ? void 0 : q.resourceData,
375
+ ...W.value
342
376
  },
343
377
  disabled: !t.ableToCreate
344
378
  }, {
345
- onLoading: b,
346
- onLoaded: B,
347
- onClick: _
379
+ onLoading: k,
380
+ onLoaded: U,
381
+ onClick: te
348
382
  }), null, 16), [
349
- [W, t.mode === i(V).Create && h.value]
383
+ [D, t.mode === d(A).Create && I.value]
350
384
  ]),
351
- K(Y(y, S({
385
+ C(x(r, f({
352
386
  ref_key: "dropButtonRef",
353
- ref: l
387
+ ref: s
354
388
  }, t.dropButton, {
355
389
  disabled: !t.ableToDrop,
356
- onLoading: b,
357
- onLoaded: B,
358
- onClick: L
390
+ onLoading: k,
391
+ onLoaded: U,
392
+ onClick: P
359
393
  }), null, 16, ["disabled"]), [
360
- [W, j.value && t.mode !== i(V).Create]
394
+ [D, H.value && t.mode !== d(A).Create]
361
395
  ]),
362
- i(f).buttons ? K((c(), H("div", mt, [
363
- w(t.$slots, "buttons")
396
+ d(y).buttons ? C((n(), h("div", mt, [
397
+ T(t.$slots, "buttons")
364
398
  ], 512)), [
365
- [W, E.value && !m.value]
366
- ]) : v("", !0),
367
- F.value.length > 0 ? (c(), R(y, Te(S({ key: 3 }, {
368
- type: i(Ae).Tooltip,
399
+ [D, M.value && !i.value]
400
+ ]) : B("", !0),
401
+ (n(!0), h(F, null, K(t.navEndButtons, (v) => C((n(), g(r, f({ ref_for: !0 }, v), null, 16)), [
402
+ [D, !i.value]
403
+ ])), 256)),
404
+ (n(!0), h(F, null, K(t.navEndButtonsEditing, (v) => C((n(), g(r, f({ ref_for: !0 }, v), null, 16)), [
405
+ [D, M.value && !i.value]
406
+ ])), 256)),
407
+ G.value.length > 0 ? (n(), g(r, Re(f({ key: 3 }, {
408
+ type: d(Oe).Tooltip,
369
409
  icon: "lkt-icn-cross-arrows",
370
410
  class: "lkt-item-crud--modifications-button",
371
- splitButtons: ue.value,
411
+ splitButtons: re.value,
372
412
  tooltip: {
373
413
  contentClass: "lkt-flex-column"
374
414
  }
375
- })), null, 16)) : v("", !0),
376
- x.value ? (c(), R(y, S({ key: 4 }, t.editModeButton, {
377
- checked: E.value,
378
- "onUpdate:checked": T[2] || (T[2] = (U) => E.value = U),
415
+ })), null, 16)) : B("", !0),
416
+ ae.value ? (n(), g(r, f({ key: 4 }, t.editModeButton, {
417
+ checked: M.value,
418
+ "onUpdate:checked": L[2] || (L[2] = (v) => M.value = v),
379
419
  class: "lkt-item-crud--switch-mode-button"
380
- }), null, 16, ["checked"])) : v("", !0)
420
+ }), null, 16, ["checked"])) : B("", !0)
381
421
  ], 64))
382
- ])) : v("", !0);
422
+ ])) : B("", !0);
383
423
  };
384
424
  }
385
425
  }), bt = { class: "lkt-item-crud" }, gt = {
386
426
  key: 0,
387
427
  class: "lkt-item-crud_header"
388
- }, yt = {
428
+ }, Bt = {
389
429
  key: 0,
390
430
  class: "lkt-item-crud_header-slot"
391
- }, kt = {
431
+ }, yt = {
392
432
  key: 1,
393
433
  class: "lkt-item-crud_header-title"
394
- }, Bt = {
434
+ }, kt = {
395
435
  key: 2,
396
436
  class: "lkt-item-crud_header-slot"
397
437
  }, Ct = {
@@ -400,9 +440,9 @@ const D = (...A) => {
400
440
  }, Dt = {
401
441
  key: 0,
402
442
  class: "lkt-grid-1"
403
- }, ht = /* @__PURE__ */ We({
443
+ }, ht = /* @__PURE__ */ He({
404
444
  __name: "LktItemCrud",
405
- props: /* @__PURE__ */ Ze({
445
+ props: /* @__PURE__ */ _e({
406
446
  modelValue: {},
407
447
  modifications: {},
408
448
  editing: { type: Boolean },
@@ -434,6 +474,10 @@ const D = (...A) => {
434
474
  redirectOnCreate: { type: [String, Function] },
435
475
  redirectOnDrop: { type: [String, Function] },
436
476
  differencesTableConfig: { type: [Object, Function] },
477
+ navStartButtons: {},
478
+ navStartButtonsEditing: {},
479
+ navEndButtons: {},
480
+ navEndButtonsEditing: {},
437
481
  events: {}
438
482
  }, it(lt)),
439
483
  emits: [
@@ -442,7 +486,7 @@ const D = (...A) => {
442
486
  "update:perms",
443
487
  "update:customData",
444
488
  "update:modifications",
445
- "update:modificationView",
489
+ "update:visibleView",
446
490
  "read",
447
491
  "create",
448
492
  "update",
@@ -452,450 +496,462 @@ const D = (...A) => {
452
496
  "error",
453
497
  "modified-data"
454
498
  ],
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 && o.updateButton !== !1 && Array.isArray(b.value) && b.value.includes(Ee.Update)), Q = g(() => !G.value && o.dropButton !== !1 && Array.isArray(b.value) && b.value.includes(Ee.Drop)), ie = g(() => o.editModeButton !== !1 && !G.value && Array.isArray(b.value) && b.value.includes(Ee.SwitchEditMode)), N = d(o.visibleView);
457
- p(() => o.visibleView, (e) => {
458
- N.value = e;
459
- }), p(N, (e) => {
460
- f("update:modificationView", e);
461
- }), p(() => o.mode, (e) => {
462
- G.value = e === V.Create;
463
- }), p(() => o.perms, (e) => {
464
- b.value = e;
465
- }), p(b, (e) => {
466
- f("update:perms", e);
467
- }), p(() => o.customData, (e) => {
468
- E.value = e;
469
- }), p(E, (e) => {
470
- f("update:customData", e);
471
- }), p(() => o.modifications, (e) => {
472
- j.value.increment(e), m.value = e;
473
- }, { deep: !0 }), p(m, (e) => {
474
- Ce(), j.value.increment(e), oe.value === k.Modifications && (h.value = j.value.changed()), f("update:modifications", e);
499
+ setup(N, { expose: me, emit: Ce }) {
500
+ const a = N, u = vt(), E = Ge(), y = Ce, c = p(!0), s = p(a.modelValue), i = p(a.modifications), M = p(a.customData), k = p(a.perms), U = p(a.editing), te = p(!1), Y = p(!1), P = p(!1), W = p(!1), Z = p(200), O = p(new Ae(s.value, a.dataStateConfig)), H = p(new Ae(i.value, a.dataStateConfig)), I = p(!1), ae = p(new Ae(a.readData)), J = p(a.mode === A.Create), G = p(!1), re = p(!1), t = p(null), L = p(null), r = w(() => !J.value && a.updateButton !== !1 && Array.isArray(k.value) && k.value.includes(Le.Update)), _ = w(() => !J.value && a.dropButton !== !1 && Array.isArray(k.value) && k.value.includes(Le.Drop)), de = w(() => a.editModeButton !== !1 && !J.value && Array.isArray(k.value) && k.value.includes(Le.SwitchEditMode)), X = p(a.visibleView);
501
+ b(() => a.visibleView, (e) => {
502
+ X.value = e;
503
+ }), b(X, (e) => {
504
+ y("update:visibleView", e);
505
+ }), b(() => a.mode, (e) => {
506
+ J.value = e === A.Create;
507
+ }), b(() => a.perms, (e) => {
508
+ k.value = e;
509
+ }), b(k, (e) => {
510
+ y("update:perms", e);
511
+ }), b(() => a.customData, (e) => {
512
+ M.value = e;
513
+ }), b(M, (e) => {
514
+ y("update:customData", e);
515
+ }), b(() => a.modifications, (e) => {
516
+ H.value.increment(e), i.value = e;
517
+ }, { deep: !0 }), b(i, (e) => {
518
+ he(), H.value.increment(e), ue.value === S.Modifications && (I.value = H.value.changed()), y("update:modifications", e);
475
519
  }, { deep: !0 });
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
- p(() => o.createButton, (e) => {
478
- P.value = Z(e, s.defaultCreateButton);
479
- }, { deep: !0 }), p(() => o.updateButton, (e) => {
480
- U.value = Z(e, s.defaultUpdateButton);
481
- }, { deep: !0 }), p(() => o.dropButton, (e) => {
482
- X.value = Z(e, s.defaultDropButton);
483
- }, { deep: !0 }), p(() => o.editModeButton, (e) => {
484
- le.value = Z(e, s.defaultEditModeButton);
520
+ const q = p(ee(a.createButton, m.defaultCreateButton)), v = p(ee(a.updateButton, m.defaultUpdateButton)), z = p(ee(a.dropButton, m.defaultDropButton)), $ = p(ee(a.editModeButton, m.defaultEditModeButton)), De = p(ee(a.groupButton, m.defaultGroupButton));
521
+ b(() => a.createButton, (e) => {
522
+ q.value = ee(e, m.defaultCreateButton);
523
+ }, { deep: !0 }), b(() => a.updateButton, (e) => {
524
+ v.value = ee(e, m.defaultUpdateButton);
525
+ }, { deep: !0 }), b(() => a.dropButton, (e) => {
526
+ z.value = ee(e, m.defaultDropButton);
527
+ }, { deep: !0 }), b(() => a.editModeButton, (e) => {
528
+ $.value = ee(e, m.defaultEditModeButton);
485
529
  }, { deep: !0 });
486
- const fe = async () => {
487
- var e, a, O;
488
- D("fetchItem"), r.value = !0, J.value = -1, $.value = !1, typeof ((e = o.events) == null ? void 0 : e.httpStart) == "function" && o.events.httpStart();
530
+ const be = async () => {
531
+ var e, o, j;
532
+ V("fetchItem"), c.value = !0, Z.value = -1, W.value = !1, typeof ((e = a.events) == null ? void 0 : e.httpStart) == "function" && a.events.httpStart();
489
533
  try {
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);
534
+ const R = await ot(a.readResource, a.readData);
535
+ if (V("fetchItem -> response", R), c.value = !1, Z.value = R.httpStatus, M.value = R.custom, !R.success) {
536
+ P.value = !1, Z.value = R.httpStatus, typeof ((o = a.events) == null ? void 0 : o.httpEnd) == "function" && a.events.httpEnd({
537
+ httpResponse: R
538
+ }), y("error", R.httpStatus);
495
539
  return;
496
540
  }
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);
541
+ P.value = !0, s.value = R.data, i.value = Array.isArray(R.modifications) ? {} : R.modifications, k.value = R.perms, O.value.increment(s.value).turnStoredIntoOriginal(), H.value.increment(i.value).turnStoredIntoOriginal(), I.value = O.value.changed(), ae.value.turnStoredIntoOriginal(), Object.keys(i.value).length > 0 && (X.value = S.Modifications), oe.value && (he(), Xe(() => {
542
+ L.value.turnStoredIntoOriginal();
543
+ })), typeof ((j = a.events) == null ? void 0 : j.httpEnd) == "function" && a.events.httpEnd({
544
+ httpResponse: R
545
+ }), y("read", R);
502
546
  } catch {
503
- r.value = !1, L.value = !1, J.value = 404, f("error", 404);
547
+ c.value = !1, P.value = !1, Z.value = 404, y("error", 404);
504
548
  return;
505
549
  }
506
550
  };
507
- p(F, (e) => {
508
- e && Pe(() => F.value = !1);
509
- }), p(() => o.modelValue, (e) => {
510
- l.value = e, I.value.increment(e);
511
- }, { deep: !0 }), p(l, (e) => {
512
- if (D("item updated ->", l.value), typeof o.beforeEmitUpdate == "function") {
513
- D("item updated -> has beforeEmitUpdate");
514
- let a = o.beforeEmitUpdate(l.value);
515
- D("item updated -> override with: ", a), typeof a == "object" && (l.value = a);
551
+ b(G, (e) => {
552
+ e && Xe(() => G.value = !1);
553
+ }), b(() => a.modelValue, (e) => {
554
+ s.value = e, O.value.increment(e);
555
+ }, { deep: !0 }), b(s, (e) => {
556
+ if (V("item updated ->", s.value), typeof a.beforeEmitUpdate == "function") {
557
+ V("item updated -> has beforeEmitUpdate");
558
+ let o = a.beforeEmitUpdate(s.value);
559
+ V("item updated -> override with: ", o), typeof o == "object" && (s.value = o);
516
560
  }
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;
518
- }, { deep: !0 }), p(b, () => f("perms", b.value)), p(h, (e) => {
519
- f("modified-data", e);
520
- }), p(() => o.readData, (e) => {
521
- x.value.increment(e), x.value.changed() && fe();
522
- }), p(() => o.editing, (e) => {
523
- D("editing updated -> updating editMode", e), B.value = e;
524
- }), p(B, (e) => {
525
- D("editMode updated -> emit update", e), f("update:editing", e);
561
+ oe.value && he(), y("update:modelValue", s.value), V("item updated -> update dataState"), O.value.increment(e), ue.value === S.Current && (I.value = O.value.changed()), G.value = !0;
562
+ }, { deep: !0 }), b(k, () => y("perms", k.value)), b(I, (e) => {
563
+ y("modified-data", e);
564
+ }), b(() => a.readData, (e) => {
565
+ ae.value.increment(e), ae.value.changed() && be();
566
+ }), b(() => a.editing, (e) => {
567
+ V("editing updated -> updating editMode", e), U.value = e;
568
+ }), b(U, (e) => {
569
+ V("editMode updated -> emit update", e), y("update:editing", e);
526
570
  });
527
- const Ne = d(void 0), Ce = () => {
528
- ee.value && (Ne.value = nt(l.value, m.value, o.form));
571
+ const je = p(void 0), he = () => {
572
+ oe.value && (je.value = nt(s.value, i.value, a.form));
529
573
  };
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());
574
+ xe(() => {
575
+ a.readResource && !J.value ? be() : (J.value, P.value = !0, U.value = !0, c.value = !1, O.value.increment(s.value).turnStoredIntoOriginal(), I.value = O.value.changed());
532
576
  });
533
- const De = (e, a) => {
534
- if (a) {
535
- if (r.value = !1, typeof e < "u" && (J.value = e.httpStatus, !e.success))
536
- return $.value = !0, f("error", e.httpStatus), !1;
537
- $.value = !0;
577
+ const we = (e, o) => {
578
+ if (o) {
579
+ if (c.value = !1, typeof e < "u" && (Z.value = e.httpStatus, !e.success))
580
+ return W.value = !0, y("error", e.httpStatus), !1;
581
+ W.value = !0;
538
582
  }
539
583
  return !0;
540
- }, $e = (e, a) => {
541
- if (D("doAutoReloadId -> enter: ", e), typeof e < "u" && e.autoReloadId)
542
- if (D("doAutoReloadId -> autoReloadId detected: ", e.autoReloadId), typeof a < "u") {
543
- let O = a;
544
- typeof a == "function" && (O = a(e.autoReloadId)), n.push(O);
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({
549
- text: s.defaultCreateErrorText,
550
- details: s.defaultCreateErrorDetails,
551
- icon: s.defaultCreateErrorIcon,
552
- positionX: de.Right
584
+ }, Fe = (e, o) => {
585
+ if (V("doAutoReloadId -> enter: ", e), typeof e < "u" && e.autoReloadId)
586
+ if (V("doAutoReloadId -> autoReloadId detected: ", e.autoReloadId), typeof o < "u") {
587
+ let j = o;
588
+ typeof o == "function" && (j = o(e.autoReloadId)), u.push(j);
589
+ } else Ve.value ? (V("doAutoReloadId -> insideModal: ", a), dt(a.modalConfig.modalName, a.modalConfig.modalKey, e.autoReloadId)) : (V("doAutoReloadId -> outsideModal"), a.readData.id = e.autoReloadId, V("doAutoReloadId -> turning off create mode"), J.value = !1, be());
590
+ }, Se = (e, o) => {
591
+ if (V("onCreate"), !we(o, q.value.resource)) {
592
+ a.notificationType === ne.Toast && ve({
593
+ text: m.defaultCreateErrorText,
594
+ details: m.defaultCreateErrorDetails,
595
+ icon: m.defaultCreateErrorIcon,
596
+ positionX: se.Right
553
597
  });
554
598
  return;
555
599
  }
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({
557
- text: s.defaultCreateSuccessText,
558
- details: s.defaultCreateSuccessDetails,
559
- icon: s.defaultCreateSuccessIcon,
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({
565
- text: s.defaultUpdateErrorText,
566
- details: s.defaultUpdateErrorDetails,
567
- icon: s.defaultUpdateErrorIcon,
568
- positionX: de.Right
600
+ re.value = !0, V("onCreate -> turn stored data into original"), O.value.increment(s.value).turnStoredIntoOriginal(), H.value.turnStoredIntoOriginal(), a.notificationType === ne.Toast && ve({
601
+ text: m.defaultCreateSuccessText,
602
+ details: m.defaultCreateSuccessDetails,
603
+ icon: m.defaultCreateSuccessIcon,
604
+ positionX: se.Right
605
+ }), Fe(o, a.redirectOnCreate), V("onCreate -> beforeEmitCreate"), y("create", o);
606
+ }, Ue = (e, o) => {
607
+ if (V("onUpdate"), !we(o, v.value.resource)) {
608
+ a.notificationType === ne.Toast && ve({
609
+ text: m.defaultUpdateErrorText,
610
+ details: m.defaultUpdateErrorDetails,
611
+ icon: m.defaultUpdateErrorIcon,
612
+ positionX: se.Right
569
613
  });
570
614
  return;
571
615
  }
572
- D("onUpdate -> turn stored data into original"), I.value.turnStoredIntoOriginal(), j.value.turnStoredIntoOriginal(), o.notificationType === te.Toast && re({
573
- text: s.defaultUpdateSuccessText,
574
- details: s.defaultUpdateSuccessDetails,
575
- icon: s.defaultUpdateSuccessIcon,
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({
581
- text: s.defaultDropErrorText,
582
- details: s.defaultDropErrorDetails,
583
- icon: s.defaultDropErrorIcon,
584
- positionX: de.Right
616
+ V("onUpdate -> turn stored data into original"), O.value.turnStoredIntoOriginal(), H.value.turnStoredIntoOriginal(), a.notificationType === ne.Toast && ve({
617
+ text: m.defaultUpdateSuccessText,
618
+ details: m.defaultUpdateSuccessDetails,
619
+ icon: m.defaultUpdateSuccessIcon,
620
+ positionX: se.Right
621
+ }), Fe(o), y("update", o);
622
+ }, Ee = (e, o) => {
623
+ if (V("onDrop"), !we(o, z.value.resource)) {
624
+ a.notificationType === ne.Toast && ve({
625
+ text: m.defaultDropErrorText,
626
+ details: m.defaultDropErrorDetails,
627
+ icon: m.defaultDropErrorIcon,
628
+ positionX: se.Right
585
629
  });
586
630
  return;
587
631
  }
588
- if (o.notificationType === te.Toast && re({
589
- text: s.defaultDropSuccessText,
590
- details: s.defaultDropSuccessDetails,
591
- icon: s.defaultDropSuccessIcon,
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") {
594
- let O = o.redirectOnDrop;
595
- typeof o.redirectOnDrop == "function" && (O = o.redirectOnDrop()), n.push(O);
632
+ if (a.notificationType === ne.Toast && ve({
633
+ text: m.defaultDropSuccessText,
634
+ details: m.defaultDropSuccessDetails,
635
+ icon: m.defaultDropSuccessIcon,
636
+ positionX: se.Right
637
+ }), y("drop", o), a.view === We.Modal && (V("onDrop -> close modal"), rt(a.modalConfig.modalName, a.modalConfig.modalKey)), typeof a.redirectOnDrop < "u") {
638
+ let j = a.redirectOnDrop;
639
+ typeof a.redirectOnDrop == "function" && (j = a.redirectOnDrop()), u.push(j);
596
640
  }
597
641
  };
598
- ce({
642
+ me({
599
643
  doDrop: () => {
600
644
  t.value && t.value.doDrop();
601
645
  },
602
- doRefresh: fe,
646
+ doRefresh: be,
603
647
  doSave: () => {
604
648
  t.value && t.value.doSave();
605
649
  },
606
650
  turnStoredDataIntoOriginal: () => {
607
- I.value.increment(l.value).turnStoredIntoOriginal();
651
+ O.value.increment(s.value).turnStoredIntoOriginal();
608
652
  },
609
- hasModifiedData: () => I.value.changed()
653
+ hasModifiedData: () => O.value.changed()
610
654
  });
611
- const Ge = g(() => {
612
- var e, a, O;
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) => {
615
- var a;
616
- if (typeof ((a = o.modalConfig) == null ? void 0 : a.beforeClose) == "function")
617
- return o.modalConfig.beforeClose({
655
+ const qe = w(() => {
656
+ var e, o, j;
657
+ return ye.value ? oe.value ? Y.value ? (e = a.modalConfig) == null ? void 0 : e.closeConfirm : "" : ue.value === S.Modifications ? H.value.changed() ? (o = a.modalConfig) == null ? void 0 : o.closeConfirm : "" : O.value.changed() ? (j = a.modalConfig) == null ? void 0 : j.closeConfirm : "" : "";
658
+ }), ze = (e) => {
659
+ var o;
660
+ if (typeof ((o = a.modalConfig) == null ? void 0 : o.beforeClose) == "function")
661
+ return a.modalConfig.beforeClose({
618
662
  ...e,
619
- itemCreated: ue.value
663
+ itemCreated: re.value
620
664
  });
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(() => {
622
- var e, a;
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({
624
- prop: l.value
625
- }) : typeof ((a = U.value) == null ? void 0 : a.disabled) == "boolean" ? !U.value.disabled : !0;
626
- }), be = g(() => {
627
- var e, a;
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({
629
- prop: l.value
630
- }) : typeof ((a = P.value) == null ? void 0 : a.disabled) == "boolean" ? !P.value.disabled : !0;
631
- }), Ve = g(() => {
632
- var e, a;
633
- return Q.value ? typeof ((e = X.value) == null ? void 0 : e.disabled) == "function" ? !X.value.disabled({
634
- prop: l.value
635
- }) : typeof ((a = X.value) == null ? void 0 : a.disabled) == "boolean" ? !X.value.disabled : !0 : !1;
636
- }), Je = g(() => je.value === "lkt-modal" ? {
637
- title: o.title,
638
- item: l.value,
639
- ...o.modalConfig,
640
- beforeClose: qe,
641
- closeConfirm: Ge.value,
642
- headerActionsButton: o.groupButton !== !1 ? {
643
- dot: be.value || me.value
665
+ }, Me = w(() => a.title.startsWith("__:") ? String(st(a.title.substring(3))) : a.title), Je = w(() => c.value ? !1 : Me.value.length > 0 || !!E["post-title"]), Ve = w(() => a.view === We.Modal), Pe = w(() => Ve.value ? "lkt-modal" : "section"), ge = w(() => {
666
+ var e, o;
667
+ return a.mode !== A.Update || !r.value || !a.enabledSaveWithoutChanges && !I.value || oe.value && (!te.value || !Y.value) ? !1 : typeof ((e = v.value) == null ? void 0 : e.disabled) == "function" ? !v.value.disabled({
668
+ prop: s.value
669
+ }) : typeof ((o = v.value) == null ? void 0 : o.disabled) == "boolean" ? !v.value.disabled : !0;
670
+ }), Be = w(() => {
671
+ var e, o;
672
+ return a.mode !== A.Create || !a.enabledSaveWithoutChanges && !I.value || oe.value && !te.value && !Y.value ? !1 : typeof ((e = q.value) == null ? void 0 : e.disabled) == "function" ? !q.value.disabled({
673
+ prop: s.value
674
+ }) : typeof ((o = q.value) == null ? void 0 : o.disabled) == "boolean" ? !q.value.disabled : !0;
675
+ }), Ie = w(() => {
676
+ var e, o;
677
+ return _.value ? typeof ((e = z.value) == null ? void 0 : e.disabled) == "function" ? !z.value.disabled({
678
+ prop: s.value
679
+ }) : typeof ((o = z.value) == null ? void 0 : o.disabled) == "boolean" ? !z.value.disabled : !0 : !1;
680
+ }), Qe = w(() => Pe.value === "lkt-modal" ? {
681
+ title: a.title,
682
+ item: s.value,
683
+ ...a.modalConfig,
684
+ beforeClose: ze,
685
+ closeConfirm: qe.value,
686
+ headerActionsButton: a.groupButton !== !1 ? {
687
+ dot: Be.value || ge.value
644
688
  } : !1
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) : []);
646
- return (e, a) => {
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", {
654
- item: l.value,
655
- loading: r.value
689
+ } : {}), oe = w(() => typeof a.form == "object" && Object.keys(a.form).length > 0), Te = w(() => Object.keys(i.value).length === 0 ? [] : a.modificationViews), ue = w(() => Object.keys(i.value).length === 0 ? S.Current : S.Modifications), ye = w(() => J.value || r.value || _.value), Ye = w(() => oe.value ? ut(a.form) : []);
690
+ return (e, o) => {
691
+ const j = ke("lkt-http-info"), R = ke("lkt-form"), Ze = ke("lkt-loader");
692
+ return n(), g(et(Pe.value), f(Qe.value, { class: "lkt-item-crud" }), fe({
693
+ default: Q(() => [
694
+ tt("article", bt, [
695
+ !Ve.value && Je.value ? (n(), h("header", gt, [
696
+ d(E)["pre-title"] ? (n(), h("div", Bt, [
697
+ T(e.$slots, "pre-title", {
698
+ item: s.value,
699
+ loading: c.value
656
700
  })
657
- ])) : v("", !0),
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", {
661
- item: l.value,
662
- loading: r.value
701
+ ])) : B("", !0),
702
+ Me.value.length > 0 ? (n(), h("h1", yt, at(Me.value), 1)) : B("", !0),
703
+ d(E)["post-title"] ? (n(), h("div", kt, [
704
+ T(e.$slots, "post-title", {
705
+ item: s.value,
706
+ loading: c.value
663
707
  })
664
- ])) : v("", !0)
665
- ])) : v("", !0),
666
- e.buttonNavPosition === i(Oe).Top && (e.groupButton === !1 || !e.groupButtonAsModalActions) && ge.value ? (c(), R(Le, {
708
+ ])) : B("", !0)
709
+ ])) : B("", !0),
710
+ e.buttonNavPosition === d(Ne).Top && (e.groupButton === !1 || !e.groupButtonAsModalActions) && ye.value ? (n(), g($e, {
667
711
  key: 1,
668
712
  ref_key: "buttonNav",
669
713
  ref: t,
670
- loading: r.value,
671
- "onUpdate:loading": a[3] || (a[3] = (u) => r.value = u),
672
- editing: B.value,
673
- "onUpdate:editing": a[4] || (a[4] = (u) => B.value = u),
674
- "picked-modification-view": N.value,
675
- "onUpdate:pickedModificationView": a[5] || (a[5] = (u) => N.value = u),
676
- item: l.value,
677
- modifications: m.value,
714
+ loading: c.value,
715
+ "onUpdate:loading": o[3] || (o[3] = (l) => c.value = l),
716
+ editing: U.value,
717
+ "onUpdate:editing": o[4] || (o[4] = (l) => U.value = l),
718
+ "picked-modification-view": X.value,
719
+ "onUpdate:pickedModificationView": o[5] || (o[5] = (l) => X.value = l),
720
+ item: s.value,
721
+ modifications: i.value,
678
722
  mode: e.mode,
679
723
  view: e.view,
680
724
  grouped: e.groupButton !== !1,
681
725
  "button-nav-visibility": e.buttonNavVisibility,
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,
687
- "data-changed": h.value,
688
- "http-success-read": L.value,
689
- "can-update": y.value,
690
- "can-drop": Q.value,
691
- "can-switch-edit-mode": ie.value,
726
+ "create-button": q.value,
727
+ "update-button": v.value,
728
+ "drop-button": z.value,
729
+ "edit-mode-button": $.value,
730
+ "group-button": De.value,
731
+ "data-changed": I.value,
732
+ "http-success-read": P.value,
733
+ "can-update": r.value,
734
+ "can-drop": _.value,
735
+ "can-switch-edit-mode": de.value,
692
736
  "group-button-as-modal-actions": e.groupButtonAsModalActions,
693
- "able-to-create": be.value,
694
- "able-to-update": me.value,
695
- "able-to-drop": Ve.value,
696
- perms: b.value,
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"] ? {
737
+ "able-to-create": Be.value,
738
+ "able-to-update": ge.value,
739
+ "able-to-drop": Ie.value,
740
+ perms: k.value,
741
+ "modification-view": Te.value,
742
+ "editable-view": ue.value,
743
+ "nav-start-buttons": e.navStartButtons,
744
+ "nav-start-buttons-editing": e.navStartButtonsEditing,
745
+ "nav-end-buttons": e.navEndButtons,
746
+ "nav-end-buttons-editing": e.navEndButtonsEditing,
747
+ onCreate: Se,
748
+ onSave: Ue,
749
+ onDrop: Ee
750
+ }, fe({ _: 2 }, [
751
+ d(E)["prev-buttons-ever"] ? {
704
752
  name: "prev-buttons-ever",
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
753
+ fn: Q(({ canUpdate: l, canDrop: ie, perms: le }) => [
754
+ T(e.$slots, "prev-buttons-ever", {
755
+ canUpdate: l,
756
+ canDrop: ie,
757
+ perms: le
710
758
  })
711
759
  ]),
712
760
  key: "0"
713
761
  } : void 0,
714
- i(C)["prev-buttons"] ? {
762
+ d(E)["prev-buttons"] ? {
715
763
  name: "prev-buttons",
716
- fn: q(({ canUpdate: u, canDrop: ae, perms: ne }) => [
717
- w(e.$slots, "prev-buttons", {
718
- canUpdate: u,
719
- canDrop: ae,
720
- perms: ne
764
+ fn: Q(({ canUpdate: l, canDrop: ie, perms: le }) => [
765
+ T(e.$slots, "prev-buttons", {
766
+ canUpdate: l,
767
+ canDrop: ie,
768
+ perms: le
721
769
  })
722
770
  ]),
723
771
  key: "1"
724
772
  } : void 0
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),
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, {
773
+ ]), 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", "nav-start-buttons", "nav-start-buttons-editing", "nav-end-buttons", "nav-end-buttons-editing"])) : B("", !0),
774
+ c.value ? B("", !0) : (n(), h("div", Ct, [
775
+ P.value ? (n(), h("div", Dt, [
776
+ W.value && e.notificationType === d(ne).Inline ? (n(), g(j, {
729
777
  key: 0,
730
- code: J.value,
731
- palette: J.value === 200 ? "success" : "danger",
778
+ code: Z.value,
779
+ palette: Z.value === 200 ? "success" : "danger",
732
780
  quick: "",
733
781
  "can-close": "",
734
- onClose: a[6] || (a[6] = (u) => $.value = !1)
735
- }, null, 8, ["code", "palette"])) : v("", !0),
736
- ee.value ? (c(), R(M, S({
782
+ onClose: o[6] || (o[6] = (l) => W.value = !1)
783
+ }, null, 8, ["code", "palette"])) : B("", !0),
784
+ oe.value ? (n(), g(R, f({
737
785
  key: 1,
738
786
  ref_key: "formRef",
739
- ref: T,
740
- modelValue: l.value,
741
- "onUpdate:modelValue": a[7] || (a[7] = (u) => l.value = u),
742
- modifications: m.value,
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)
787
+ ref: L,
788
+ modelValue: s.value,
789
+ "onUpdate:modelValue": o[7] || (o[7] = (l) => s.value = l),
790
+ modifications: i.value,
791
+ "onUpdate:modifications": o[8] || (o[8] = (l) => i.value = l),
792
+ valid: te.value,
793
+ "onUpdate:valid": o[9] || (o[9] = (l) => te.value = l),
794
+ changed: Y.value,
795
+ "onUpdate:changed": o[10] || (o[10] = (l) => Y.value = l)
748
796
  }, {
749
797
  ...e.formUiConfig,
750
798
  form: e.form,
751
799
  differencesTableConfig: e.differencesTableConfig,
752
- visibleView: N.value,
753
- modificationDataState: Ne.value,
754
- editableViews: [oe.value],
755
- disabled: !B.value
756
- }), pe({ _: 2 }, [
757
- ot(Qe.value, (u) => ({
758
- name: u,
759
- fn: q(({}) => [
760
- w(e.$slots, u)
800
+ visibleView: X.value,
801
+ modificationDataState: je.value,
802
+ editableViews: [ue.value],
803
+ disabled: !U.value
804
+ }), fe({ _: 2 }, [
805
+ K(Ye.value, (l) => ({
806
+ name: l,
807
+ fn: Q(({}) => [
808
+ T(e.$slots, l)
761
809
  ])
762
810
  }))
763
- ]), 1040, ["modelValue", "modifications", "valid", "changed"])) : w(e.$slots, "item", {
811
+ ]), 1040, ["modelValue", "modifications", "valid", "changed"])) : T(e.$slots, "item", {
764
812
  key: 2,
765
- item: l.value,
766
- loading: r.value,
767
- editMode: B.value,
768
- isCreate: G.value,
769
- canUpdate: y.value,
770
- canDrop: Q.value,
771
- itemBeingEdited: F.value,
772
- perms: b.value
813
+ item: s.value,
814
+ loading: c.value,
815
+ editMode: U.value,
816
+ isCreate: J.value,
817
+ canUpdate: r.value,
818
+ canDrop: _.value,
819
+ itemBeingEdited: G.value,
820
+ perms: k.value
773
821
  })
774
- ])) : e.notificationType === i(te).Inline ? (c(), R(O, {
822
+ ])) : e.notificationType === d(ne).Inline ? (n(), g(j, {
775
823
  key: 1,
776
- code: J.value
777
- }, null, 8, ["code"])) : v("", !0)
824
+ code: Z.value
825
+ }, null, 8, ["code"])) : B("", !0)
778
826
  ])),
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, {
827
+ c.value ? (n(), g(Ze, { key: 3 })) : B("", !0),
828
+ e.buttonNavPosition === d(Ne).Bottom && (e.groupButton === !1 || !e.groupButtonAsModalActions) && ye.value ? (n(), g($e, {
781
829
  key: 4,
782
830
  ref_key: "buttonNav",
783
831
  ref: t,
784
- loading: r.value,
785
- "onUpdate:loading": a[11] || (a[11] = (u) => r.value = u),
786
- editing: B.value,
787
- "onUpdate:editing": a[12] || (a[12] = (u) => B.value = u),
788
- "picked-modification-view": N.value,
789
- "onUpdate:pickedModificationView": a[13] || (a[13] = (u) => N.value = u),
790
- item: l.value,
791
- modifications: m.value,
832
+ loading: c.value,
833
+ "onUpdate:loading": o[11] || (o[11] = (l) => c.value = l),
834
+ editing: U.value,
835
+ "onUpdate:editing": o[12] || (o[12] = (l) => U.value = l),
836
+ "picked-modification-view": X.value,
837
+ "onUpdate:pickedModificationView": o[13] || (o[13] = (l) => X.value = l),
838
+ item: s.value,
839
+ modifications: i.value,
792
840
  mode: e.mode,
793
841
  view: e.view,
794
842
  grouped: e.groupButton !== !1,
795
843
  "button-nav-visibility": e.buttonNavVisibility,
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,
801
- "data-changed": h.value,
802
- "http-success-read": L.value,
803
- "can-update": y.value,
804
- "can-drop": Q.value,
805
- "can-switch-edit-mode": ie.value,
844
+ "create-button": q.value,
845
+ "update-button": v.value,
846
+ "drop-button": z.value,
847
+ "edit-mode-button": $.value,
848
+ "group-button": De.value,
849
+ "data-changed": I.value,
850
+ "http-success-read": P.value,
851
+ "can-update": r.value,
852
+ "can-drop": _.value,
853
+ "can-switch-edit-mode": de.value,
806
854
  "group-button-as-modal-actions": e.groupButtonAsModalActions,
807
- "able-to-create": be.value,
808
- "able-to-update": me.value,
809
- "able-to-drop": Ve.value,
810
- perms: b.value,
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"] ? {
855
+ "able-to-create": Be.value,
856
+ "able-to-update": ge.value,
857
+ "able-to-drop": Ie.value,
858
+ perms: k.value,
859
+ "modification-view": Te.value,
860
+ "editable-view": ue.value,
861
+ "nav-start-buttons": e.navStartButtons,
862
+ "nav-start-buttons-editing": e.navStartButtonsEditing,
863
+ "nav-end-buttons": e.navEndButtons,
864
+ "nav-end-buttons-editing": e.navEndButtonsEditing,
865
+ onCreate: Se,
866
+ onSave: Ue,
867
+ onDrop: Ee
868
+ }, fe({ _: 2 }, [
869
+ d(E)["prev-buttons-ever"] ? {
818
870
  name: "prev-buttons-ever",
819
- fn: q(() => [
820
- w(e.$slots, "prev-buttons-ever")
871
+ fn: Q(() => [
872
+ T(e.$slots, "prev-buttons-ever")
821
873
  ]),
822
874
  key: "0"
823
875
  } : void 0,
824
- i(C)["prev-buttons"] ? {
876
+ d(E)["prev-buttons"] ? {
825
877
  name: "prev-buttons-ever",
826
- fn: q(() => [
827
- w(e.$slots, "prev-buttons")
878
+ fn: Q(() => [
879
+ T(e.$slots, "prev-buttons")
828
880
  ]),
829
881
  key: "1"
830
882
  } : void 0
831
- ]), 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)
883
+ ]), 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", "nav-start-buttons", "nav-start-buttons-editing", "nav-end-buttons", "nav-end-buttons-editing"])) : B("", !0)
832
884
  ])
833
885
  ]),
834
886
  _: 2
835
887
  }, [
836
- e.groupButton !== !1 && e.groupButtonAsModalActions && ge.value ? {
888
+ e.groupButton !== !1 && e.groupButtonAsModalActions && ye.value ? {
837
889
  name: "header-actions",
838
- fn: q(() => [
839
- e.buttonNavPosition === i(Oe).Top ? (c(), R(Le, {
890
+ fn: Q(() => [
891
+ e.buttonNavPosition === d(Ne).Top ? (n(), g($e, {
840
892
  key: 0,
841
893
  ref_key: "buttonNav",
842
894
  ref: t,
843
- loading: r.value,
844
- "onUpdate:loading": a[0] || (a[0] = (u) => r.value = u),
845
- editing: B.value,
846
- "onUpdate:editing": a[1] || (a[1] = (u) => B.value = u),
847
- "picked-modification-view": N.value,
848
- "onUpdate:pickedModificationView": a[2] || (a[2] = (u) => N.value = u),
849
- item: l.value,
850
- modifications: m.value,
895
+ loading: c.value,
896
+ "onUpdate:loading": o[0] || (o[0] = (l) => c.value = l),
897
+ editing: U.value,
898
+ "onUpdate:editing": o[1] || (o[1] = (l) => U.value = l),
899
+ "picked-modification-view": X.value,
900
+ "onUpdate:pickedModificationView": o[2] || (o[2] = (l) => X.value = l),
901
+ item: s.value,
902
+ modifications: i.value,
851
903
  mode: e.mode,
852
904
  view: e.view,
853
905
  grouped: !0,
854
906
  "button-nav-visibility": e.buttonNavVisibility,
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,
860
- "data-changed": h.value,
861
- "http-success-read": L.value,
862
- "can-update": y.value,
863
- "can-drop": Q.value,
864
- "can-switch-edit-mode": ie.value,
907
+ "create-button": q.value,
908
+ "update-button": v.value,
909
+ "drop-button": z.value,
910
+ "edit-mode-button": $.value,
911
+ "group-button": De.value,
912
+ "data-changed": I.value,
913
+ "http-success-read": P.value,
914
+ "can-update": r.value,
915
+ "can-drop": _.value,
916
+ "can-switch-edit-mode": de.value,
865
917
  "group-button-as-modal-actions": e.groupButtonAsModalActions,
866
- "able-to-create": be.value,
867
- "able-to-update": me.value,
868
- "able-to-drop": Ve.value,
869
- perms: b.value,
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"] ? {
918
+ "able-to-create": Be.value,
919
+ "able-to-update": ge.value,
920
+ "able-to-drop": Ie.value,
921
+ perms: k.value,
922
+ "modification-view": Te.value,
923
+ "editable-view": ue.value,
924
+ "nav-start-buttons": e.navStartButtons,
925
+ "nav-start-buttons-editing": e.navStartButtonsEditing,
926
+ "nav-end-buttons": e.navEndButtons,
927
+ "nav-end-buttons-editing": e.navEndButtonsEditing,
928
+ onCreate: Se,
929
+ onSave: Ue,
930
+ onDrop: Ee
931
+ }, fe({ _: 2 }, [
932
+ d(E)["prev-buttons-ever"] ? {
877
933
  name: "prev-buttons-ever",
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
934
+ fn: Q(({ canUpdate: l, canDrop: ie, perms: le }) => [
935
+ T(e.$slots, "prev-buttons-ever", {
936
+ canUpdate: l,
937
+ canDrop: ie,
938
+ perms: le
883
939
  })
884
940
  ]),
885
941
  key: "0"
886
942
  } : void 0,
887
- i(C)["prev-buttons"] ? {
943
+ d(E)["prev-buttons"] ? {
888
944
  name: "prev-buttons",
889
- fn: q(({ canUpdate: u, canDrop: ae, perms: ne }) => [
890
- w(e.$slots, "prev-buttons", {
891
- canUpdate: u,
892
- canDrop: ae,
893
- perms: ne
945
+ fn: Q(({ canUpdate: l, canDrop: ie, perms: le }) => [
946
+ T(e.$slots, "prev-buttons", {
947
+ canUpdate: l,
948
+ canDrop: ie,
949
+ perms: le
894
950
  })
895
951
  ]),
896
952
  key: "1"
897
953
  } : void 0
898
- ]), 1032, ["loading", "editing", "picked-modification-view", "item", "modifications", "mode", "view", "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)
954
+ ]), 1032, ["loading", "editing", "picked-modification-view", "item", "modifications", "mode", "view", "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", "nav-start-buttons", "nav-start-buttons-editing", "nav-end-buttons", "nav-end-buttons-editing"])) : B("", !0)
899
955
  ]),
900
956
  key: "0"
901
957
  } : void 0
@@ -903,13 +959,13 @@ const D = (...A) => {
903
959
  };
904
960
  }
905
961
  }), Lt = {
906
- install: (A, ce = {}) => {
907
- A.component("lkt-item-crud") === void 0 && A.component("lkt-item-crud", ht);
962
+ install: (N, me = {}) => {
963
+ N.component("lkt-item-crud") === void 0 && N.component("lkt-item-crud", ht);
908
964
  }
909
- }, Nt = (A) => {
910
- se.defaultSaveIcon = A;
911
- }, $t = (A) => {
912
- se.defaultDropIcon = A;
965
+ }, Nt = (N) => {
966
+ pe.defaultSaveIcon = N;
967
+ }, $t = (N) => {
968
+ pe.defaultDropIcon = N;
913
969
  };
914
970
  export {
915
971
  Ot as debugLktItemCrud,