lkt-item-crud 2.0.19 → 2.0.21

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