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