lkt-item-crud 2.0.18 → 2.0.20

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