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