lkt-item-crud 2.0.19 → 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 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 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
- 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 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
- }, Ye = {
20
+ }, lt = {
21
21
  key: 0,
22
22
  class: "lkt-item-crud-buttons"
23
- }, Ze = {
23
+ }, dt = {
24
24
  key: 1,
25
25
  class: "lkt-item-crud-buttons"
26
- }, _e = {
26
+ }, rt = {
27
27
  key: 2,
28
28
  class: "lkt-item-crud-buttons"
29
- }, he = /* @__PURE__ */ we({
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,355 +51,390 @@ 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, 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;
76
+ }, g = () => {
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
- 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 = 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
- $(q(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: 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
+ ...T.value
177
+ },
178
+ disabled: !t.ableToUpdate
179
+ }, {
180
+ onLoading: b,
181
+ onLoaded: g,
182
+ onClick: E
183
+ }), null, 16), [
184
+ [X, t.mode === i(V).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
+ ...T.value
194
+ },
195
+ disabled: !t.ableToCreate
196
+ }, {
197
+ onLoading: b,
198
+ onLoaded: g,
199
+ onClick: x
200
+ }), null, 16), [
201
+ [X, t.mode === i(V).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: g,
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 ? (m(), O(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
- 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 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(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
+ ...(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(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: 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, M.value && e.mode !== u(S).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)) : (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(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"] ? $((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
+ 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, 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
+ ...T.value
325
+ },
326
+ disabled: !t.ableToUpdate
327
+ }, {
328
+ onLoading: b,
329
+ onLoaded: g,
330
+ onClick: E
331
+ }), null, 16), [
332
+ [X, t.mode === i(V).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
+ ...T.value
342
+ },
343
+ disabled: !t.ableToCreate
344
+ }, {
345
+ onLoading: b,
346
+ onLoaded: g,
347
+ onClick: x
348
+ }), null, 16), [
349
+ [X, t.mode === i(V).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: g,
358
+ onClick: Q
359
+ }), null, 16, ["disabled"]), [
360
+ [X, M.value && t.mode !== i(V).Create]
359
361
  ]),
360
- u(l).buttons ? $((m(), N("div", _e, [
361
- s(e.$slots, "buttons")
362
+ i(c).buttons ? F((v(), J("div", rt, [
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, 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
- }), xe = { class: "lkt-item-crud" }, et = {
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
- }, tt = {
410
+ }, ct = {
378
411
  key: 0,
379
412
  class: "lkt-item-crud_header-slot"
380
- }, at = {
413
+ }, ft = {
381
414
  key: 1,
382
415
  class: "lkt-item-crud_header-title"
383
- }, ot = {
416
+ }, mt = {
384
417
  key: 2,
385
418
  class: "lkt-item-crud_header-slot"
386
- }, ut = {
419
+ }, bt = {
387
420
  key: 2,
388
421
  class: "lkt-item-crud_content"
389
- }, nt = {
422
+ }, gt = {
390
423
  key: 0,
391
424
  class: "lkt-grid-1"
392
- }, dt = /* @__PURE__ */ we({
425
+ }, yt = /* @__PURE__ */ Pe({
393
426
  __name: "LktItemCrud",
394
- props: /* @__PURE__ */ Ne({
427
+ props: /* @__PURE__ */ qe({
395
428
  modelValue: {},
429
+ modifications: {},
396
430
  editing: { type: Boolean },
397
431
  perms: {},
398
432
  customData: {},
399
433
  form: {},
400
434
  mode: {},
401
435
  view: {},
436
+ visibleView: {},
437
+ modificationViews: { type: [Boolean, Array] },
402
438
  editModeButton: { type: [Object, Boolean] },
403
439
  dropButton: { type: [Object, Boolean] },
404
440
  createButton: { type: [Object, Boolean] },
@@ -418,14 +454,16 @@ const k = (...T) => {
418
454
  enabledSaveWithoutChanges: { type: Boolean },
419
455
  redirectOnCreate: { type: [String, Function] },
420
456
  redirectOnDrop: { type: [String, Function] },
457
+ differencesTableConfig: { type: [Object, Function] },
421
458
  events: {}
422
- }, Ke(Ge)),
459
+ }, et(tt)),
423
460
  emits: [
424
461
  "update:modelValue",
425
462
  "update:editing",
426
463
  "update:perms",
427
464
  "update:customData",
428
- "update:form",
465
+ "update:modifications",
466
+ "update:modificationView",
429
467
  "read",
430
468
  "create",
431
469
  "update",
@@ -435,418 +473,452 @@ const k = (...T) => {
435
473
  "error",
436
474
  "modified-data"
437
475
  ],
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);
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);
460
506
  }, { 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();
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();
464
510
  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);
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);
470
516
  return;
471
517
  }
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);
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);
475
521
  } catch {
476
- v.value = !1, A.value = !1, W.value = 404, b("error", 404);
522
+ r.value = !1, E.value = !1, T.value = 404, c("error", 404);
477
523
  return;
478
524
  }
479
525
  };
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);
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);
487
533
  }
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());
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);
499
543
  });
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;
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());
549
+ });
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;
505
555
  }
506
556
  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
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
520
570
  });
521
571
  return;
522
572
  }
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
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
536
586
  });
537
587
  return;
538
588
  }
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
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
552
602
  });
553
603
  return;
554
604
  }
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);
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);
563
613
  }
564
614
  };
565
- ae({
615
+ K({
566
616
  doDrop: () => {
567
- B.value && B.value.doDrop();
617
+ G.value && G.value.doDrop();
568
618
  },
569
- doRefresh: ue,
619
+ doRefresh: ie,
570
620
  doSave: () => {
571
- B.value && B.value.doSave();
621
+ G.value && G.value.doSave();
572
622
  },
573
623
  turnStoredDataIntoOriginal: () => {
574
- I.value.increment(n.value).turnStoredIntoOriginal();
624
+ I.value.increment(u.value).turnStoredIntoOriginal();
575
625
  },
576
626
  hasModifiedData: () => I.value.changed()
577
627
  });
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
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
587
637
  });
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
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
611
661
  } : !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
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
623
673
  })
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
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
630
680
  })
631
- ])) : d("", !0)
632
- ])) : d("", !0),
633
- t.buttonNavPosition === u(De).Top && (t.groupButton === !1 || !t.groupButtonAsModalActions) ? (m(), O(he, {
681
+ ])) : p("", !0)
682
+ ])) : p("", !0),
683
+ e.buttonNavPosition === i(Ie).Top && (e.groupButton === !1 || !e.groupButtonAsModalActions) ? (v(), A(Re, {
634
684
  key: 1,
635
685
  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,
686
+ ref: G,
687
+ loading: r.value,
688
+ "onUpdate:loading": a[3] || (a[3] = (l) => r.value = l),
689
+ editing: g.value,
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,
651
704
  "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"] ? {
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"] ? {
666
721
  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
722
+ fn: _(({ canUpdate: l, canDrop: oe, perms: ae }) => [
723
+ U(e.$slots, "prev-buttons-ever", {
724
+ canUpdate: l,
725
+ canDrop: oe,
726
+ perms: ae
672
727
  })
673
728
  ]),
674
729
  key: "0"
675
730
  } : void 0,
676
- u(l)["prev-buttons"] ? {
731
+ i(D)["prev-buttons"] ? {
677
732
  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
733
+ fn: _(({ canUpdate: l, canDrop: oe, perms: ae }) => [
734
+ U(e.$slots, "prev-buttons", {
735
+ canUpdate: l,
736
+ canDrop: oe,
737
+ perms: ae
683
738
  })
684
739
  ]),
685
740
  key: "1"
686
741
  } : 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, {
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, {
691
746
  key: 0,
692
- code: W.value,
693
- palette: W.value === 200 ? "success" : "danger",
747
+ code: T.value,
748
+ palette: T.value === 200 ? "success" : "danger",
694
749
  quick: "",
695
750
  "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, {
751
+ onClose: a[6] || (a[6] = (l) => Q.value = !1)
752
+ }, null, 8, ["code", "palette"])) : p("", !0),
753
+ me.value ? (v(), A(R, S({
699
754
  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", {
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", {
707
769
  key: 2,
708
- item: n.value,
709
- loading: v.value,
710
- editMode: y.value,
711
- isCreate: E.value,
712
- canUpdate: h.value,
713
- canDrop: j.value,
714
- itemBeingEdited: ee.value,
715
- perms: f.value
770
+ item: u.value,
771
+ loading: r.value,
772
+ editMode: g.value,
773
+ isCreate: N.value,
774
+ canUpdate: t.value,
775
+ canDrop: w.value,
776
+ itemBeingEdited: pe.value,
777
+ perms: b.value
716
778
  })
717
- ])) : t.notificationType === u(J).Inline ? (m(), O(P, {
779
+ ])) : e.notificationType === i(ee).Inline ? (v(), A(q, {
718
780
  key: 1,
719
- code: W.value
720
- }, null, 8, ["code"])) : d("", !0)
781
+ code: T.value
782
+ }, null, 8, ["code"])) : p("", !0)
721
783
  ])),
722
- v.value ? (m(), O(Oe, { key: 3 })) : d("", !0),
723
- t.buttonNavPosition === u(De).Bottom && (t.groupButton === !1 || !t.groupButtonAsModalActions) ? (m(), O(he, {
784
+ r.value ? (v(), A(He, { key: 3 })) : p("", !0),
785
+ e.buttonNavPosition === i(Ie).Bottom && (e.groupButton === !1 || !e.groupButtonAsModalActions) ? (v(), A(Re, {
724
786
  key: 4,
725
787
  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,
788
+ ref: G,
789
+ loading: r.value,
790
+ "onUpdate:loading": a[10] || (a[10] = (l) => r.value = l),
791
+ editing: g.value,
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,
741
806
  "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"] ? {
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"] ? {
756
823
  name: "prev-buttons-ever",
757
- fn: C(() => [
758
- s(t.$slots, "prev-buttons-ever")
824
+ fn: _(() => [
825
+ U(e.$slots, "prev-buttons-ever")
759
826
  ]),
760
827
  key: "0"
761
828
  } : void 0,
762
- u(l)["prev-buttons"] ? {
829
+ i(D)["prev-buttons"] ? {
763
830
  name: "prev-buttons-ever",
764
- fn: C(() => [
765
- s(t.$slots, "prev-buttons")
831
+ fn: _(() => [
832
+ U(e.$slots, "prev-buttons")
766
833
  ]),
767
834
  key: "1"
768
835
  } : 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)
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)
770
837
  ])
771
838
  ]),
772
839
  _: 2
773
840
  }, [
774
- t.groupButton !== !1 && t.groupButtonAsModalActions ? {
841
+ e.groupButton !== !1 && e.groupButtonAsModalActions ? {
775
842
  name: "header-actions",
776
- fn: C(() => [
777
- t.buttonNavPosition === u(De).Top ? (m(), O(he, {
843
+ fn: _(() => [
844
+ e.buttonNavPosition === i(Ie).Top ? (v(), A(Re, {
778
845
  key: 0,
779
846
  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,
847
+ ref: G,
848
+ loading: r.value,
849
+ "onUpdate:loading": a[0] || (a[0] = (l) => r.value = l),
850
+ editing: g.value,
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,
788
858
  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,
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,
795
865
  "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"] ? {
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"] ? {
810
882
  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
883
+ fn: _(({ canUpdate: l, canDrop: oe, perms: ae }) => [
884
+ U(e.$slots, "prev-buttons-ever", {
885
+ canUpdate: l,
886
+ canDrop: oe,
887
+ perms: ae
816
888
  })
817
889
  ]),
818
890
  key: "0"
819
891
  } : void 0,
820
- u(l)["prev-buttons"] ? {
892
+ i(D)["prev-buttons"] ? {
821
893
  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
894
+ fn: _(({ canUpdate: l, canDrop: oe, perms: ae }) => [
895
+ U(e.$slots, "prev-buttons", {
896
+ canUpdate: l,
897
+ canDrop: oe,
898
+ perms: ae
827
899
  })
828
900
  ]),
829
901
  key: "1"
830
902
  } : 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)
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)
832
904
  ]),
833
905
  key: "0"
834
906
  } : void 0
835
907
  ]), 1040);
836
908
  };
837
909
  }
838
- }), yt = {
839
- install: (T, ae = {}) => {
840
- T.component("lkt-item-crud") === void 0 && T.component("lkt-item-crud", dt);
910
+ }), It = {
911
+ install: (B, K = {}) => {
912
+ B.component("lkt-item-crud") === void 0 && B.component("lkt-item-crud", yt);
841
913
  }
842
- }, Bt = (T) => {
843
- x.defaultSaveIcon = T;
844
- }, kt = (T) => {
845
- x.defaultDropIcon = T;
914
+ }, Rt = (B) => {
915
+ re.defaultSaveIcon = B;
916
+ }, At = (B) => {
917
+ re.defaultDropIcon = B;
846
918
  };
847
919
  export {
848
- gt as debugLktItemCrud,
849
- yt as default,
850
- kt as setItemCrudDefaultDropIcon,
851
- Bt as setItemCrudDefaultSaveIcon
920
+ Tt as debugLktItemCrud,
921
+ It as default,
922
+ At as setItemCrudDefaultDropIcon,
923
+ Rt as setItemCrudDefaultSaveIcon
852
924
  };