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