lkt-item-crud 2.0.10 → 2.0.12
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.d.ts +6 -6
- package/dist/build.js +462 -358
- package/dist/components/ButtonNav.vue.d.ts +458 -12
- package/dist/lib-components/LktItemCrud.vue.d.ts +3 -0
- package/package.json +1 -1
- package/src/components/ButtonNav.vue +166 -82
- package/src/lib-components/LktItemCrud.vue +13 -5
package/dist/build.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { httpCall as
|
|
3
|
-
import { DataState as
|
|
4
|
-
import { ensureButtonConfig as
|
|
5
|
-
import { closeModal as
|
|
6
|
-
import { __ as
|
|
7
|
-
import { openToast as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as Be, ref as p, watch as h, useSlots as ke, computed as k, resolveComponent as se, createElementBlock as E, createCommentVNode as l, openBlock as m, createBlock as A, mergeProps as N, withCtx as M, renderSlot as g, withDirectives as V, unref as n, createVNode as K, vShow as O, Fragment as Ue, mergeDefaults as Se, nextTick as Ie, onMounted as we, resolveDynamicComponent as Me, normalizeProps as Re, guardReactiveProps as Te, createElementVNode as Ee, toDisplayString as $e, createSlots as ce } from "vue";
|
|
2
|
+
import { httpCall as Le } from "lkt-http-client";
|
|
3
|
+
import { DataState as fe } from "lkt-data-state";
|
|
4
|
+
import { ensureButtonConfig as j, LktSettings as d, ItemCrudMode as w, ItemCrudButtonNavVisibility as me, TablePermission as ie, ItemCrudView as be, ItemCrudButtonNavPosition as ge, NotificationType as X, getDefaultValues as Ne, ItemCrud as Ve, ToastPositionX as W } from "lkt-vue-kernel";
|
|
5
|
+
import { closeModal as Oe } from "lkt-modal";
|
|
6
|
+
import { __ as je } from "lkt-i18n";
|
|
7
|
+
import { openToast as J } from "lkt-toast";
|
|
8
|
+
const x = class x {
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
let
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
},
|
|
10
|
+
x.debugEnabled = !1, x.defaultSaveIcon = "", x.defaultDropIcon = "";
|
|
11
|
+
let Q = x;
|
|
12
|
+
const B = (...C) => {
|
|
13
|
+
Q.debugEnabled && console.info("[LktItemCrud] ", ...C);
|
|
14
|
+
}, ot = (C = !0) => {
|
|
15
|
+
Q.debugEnabled = C;
|
|
16
|
+
}, Ae = {
|
|
17
17
|
key: 0,
|
|
18
18
|
class: "lkt-item-crud-buttons"
|
|
19
|
-
},
|
|
19
|
+
}, Pe = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "lkt-item-crud-buttons"
|
|
22
|
-
},
|
|
22
|
+
}, Xe = {
|
|
23
23
|
key: 1,
|
|
24
24
|
class: "lkt-item-crud-buttons"
|
|
25
|
-
},
|
|
26
|
-
key:
|
|
25
|
+
}, Fe = {
|
|
26
|
+
key: 2,
|
|
27
27
|
class: "lkt-item-crud-buttons"
|
|
28
|
-
},
|
|
28
|
+
}, ye = /* @__PURE__ */ Be({
|
|
29
29
|
__name: "ButtonNav",
|
|
30
30
|
props: {
|
|
31
31
|
item: { default: () => ({}) },
|
|
@@ -37,6 +37,7 @@ const g = (...B) => {
|
|
|
37
37
|
updateButton: { type: [Object, Boolean] },
|
|
38
38
|
dropButton: { type: [Object, Boolean] },
|
|
39
39
|
editModeButton: { type: [Object, Boolean] },
|
|
40
|
+
groupButton: { type: [Object, Boolean] },
|
|
40
41
|
dataChanged: { type: Boolean },
|
|
41
42
|
canUpdate: { type: Boolean },
|
|
42
43
|
canDrop: { type: Boolean },
|
|
@@ -52,172 +53,270 @@ const g = (...B) => {
|
|
|
52
53
|
"save",
|
|
53
54
|
"drop"
|
|
54
55
|
],
|
|
55
|
-
setup(
|
|
56
|
-
const o =
|
|
57
|
-
h(() => a.createButton, (
|
|
58
|
-
|
|
59
|
-
}, { deep: !0 }), h(() => a.updateButton, (
|
|
60
|
-
|
|
61
|
-
}, { deep: !0 }), h(() => a.dropButton, (
|
|
62
|
-
|
|
63
|
-
}, { deep: !0 }), h(() => a.editModeButton, (
|
|
64
|
-
|
|
56
|
+
setup(C, { expose: ee, emit: ue }) {
|
|
57
|
+
const o = ue, a = C, b = p(j(a.createButton, d.defaultCreateButton)), i = p(j(a.updateButton, d.defaultUpdateButton)), r = p(j(a.dropButton, d.defaultDropButton)), y = p(j(a.editModeButton, d.defaultEditModeButton)), R = p(j(a.groupButton, d.defaultGroupButton));
|
|
58
|
+
h(() => a.createButton, (e) => {
|
|
59
|
+
b.value = j(e, d.defaultCreateButton);
|
|
60
|
+
}, { deep: !0 }), h(() => a.updateButton, (e) => {
|
|
61
|
+
i.value = j(e, d.defaultUpdateButton);
|
|
62
|
+
}, { deep: !0 }), h(() => a.dropButton, (e) => {
|
|
63
|
+
r.value = j(e, d.defaultDropButton);
|
|
64
|
+
}, { deep: !0 }), h(() => a.editModeButton, (e) => {
|
|
65
|
+
y.value = j(e, d.defaultEditModeButton);
|
|
65
66
|
}, { deep: !0 });
|
|
66
|
-
const
|
|
67
|
-
h(() => a.loading, (
|
|
68
|
-
const
|
|
69
|
-
h(() => a.editing, (
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
typeof
|
|
76
|
-
},
|
|
77
|
-
typeof
|
|
78
|
-
},
|
|
79
|
-
typeof
|
|
67
|
+
const v = ke(), S = p(null), D = p(null), s = p(a.loading);
|
|
68
|
+
h(() => a.loading, (e) => s.value = e), h(s, (e) => o("update:loading", e));
|
|
69
|
+
const c = p(a.editing);
|
|
70
|
+
h(() => a.editing, (e) => c.value = e), h(c, (e) => o("update:editing", e));
|
|
71
|
+
const $ = () => {
|
|
72
|
+
s.value = !0;
|
|
73
|
+
}, U = () => {
|
|
74
|
+
s.value = !1;
|
|
75
|
+
}, G = (e, f) => {
|
|
76
|
+
typeof e > "u" || o("create", e, f);
|
|
77
|
+
}, Y = (e, f) => {
|
|
78
|
+
typeof e > "u" || o("save", e, f);
|
|
79
|
+
}, L = (e, f) => {
|
|
80
|
+
typeof e > "u" || o("drop", e, f);
|
|
80
81
|
};
|
|
81
|
-
|
|
82
|
+
ee({
|
|
82
83
|
doSave: () => {
|
|
83
|
-
|
|
84
|
+
S.value && typeof S.value.click == "function" && S.value.click();
|
|
84
85
|
},
|
|
85
86
|
doDrop: () => {
|
|
86
|
-
|
|
87
|
+
D.value && typeof D.value.click == "function" && D.value.click();
|
|
87
88
|
}
|
|
88
89
|
});
|
|
89
|
-
const
|
|
90
|
-
var
|
|
91
|
-
return a.mode !== w.Update || !a.canUpdate || !a.dataChanged ? !1 : typeof ((
|
|
92
|
-
}),
|
|
93
|
-
var
|
|
94
|
-
return a.mode !== w.Create || !a.dataChanged ? !1 : typeof ((
|
|
95
|
-
}),
|
|
96
|
-
var
|
|
97
|
-
return a.canDrop ? typeof ((
|
|
98
|
-
}),
|
|
99
|
-
return (
|
|
100
|
-
const
|
|
101
|
-
return
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
90
|
+
const Z = k(() => {
|
|
91
|
+
var e, f;
|
|
92
|
+
return a.mode !== w.Update || !a.canUpdate || !a.dataChanged ? !1 : typeof ((e = i.value) == null ? void 0 : e.disabled) == "function" ? !i.value.disabled(a.item) : typeof ((f = i.value) == null ? void 0 : f.disabled) == "boolean" ? !i.value.disabled : !0;
|
|
93
|
+
}), F = k(() => {
|
|
94
|
+
var e, f;
|
|
95
|
+
return a.mode !== w.Create || !a.dataChanged ? !1 : typeof ((e = b.value) == null ? void 0 : e.disabled) == "function" ? !b.value.disabled(a.item) : typeof ((f = b.value) == null ? void 0 : f.disabled) == "boolean" ? !b.value.disabled : !0;
|
|
96
|
+
}), q = k(() => {
|
|
97
|
+
var e, f;
|
|
98
|
+
return a.canDrop ? typeof ((e = r.value) == null ? void 0 : e.disabled) == "function" ? !r.value.disabled(a.item) : typeof ((f = r.value) == null ? void 0 : f.disabled) == "boolean" ? !r.value.disabled : !0 : !1;
|
|
99
|
+
}), z = k(() => !a.canDrop || a.dropButton === !1 ? !1 : !a.canUpdate && a.canDrop ? !0 : !s.value && a.editing && a.httpSuccessRead), P = k(() => a.mode === w.Create && a.createButton === !1 || a.mode === w.Update && a.updateButton === !1 || s.value ? !1 : a.editing && a.httpSuccessRead), H = k(() => a.editModeButton === !1 || !a.canSwitchEditMode || !a.canUpdate && !a.canDrop || !a.canUpdate && a.canDrop ? !1 : !s.value && a.mode !== w.Create && a.httpSuccessRead), oe = k(() => a.buttonNavVisibility === me.Always || v["prev-buttons-ever"] ? !0 : a.buttonNavVisibility === me.Never ? !1 : P.value || z.value || H.value);
|
|
100
|
+
return (e, f) => {
|
|
101
|
+
const T = se("lkt-button");
|
|
102
|
+
return oe.value ? (m(), E("div", Ae, [
|
|
103
|
+
e.groupButton !== !1 ? (m(), A(T, N({
|
|
104
|
+
key: 0,
|
|
105
|
+
ref: "groupButton"
|
|
106
|
+
}, R.value, { class: "lkt-item-crud-group-button" }), {
|
|
107
|
+
split: M(() => [
|
|
108
|
+
H.value ? (m(), A(T, N({ key: 0 }, y.value, {
|
|
109
|
+
checked: c.value,
|
|
110
|
+
"onUpdate:checked": f[0] || (f[0] = (_) => c.value = _),
|
|
111
|
+
class: "lkt-item-crud--switch-mode-button"
|
|
112
|
+
}), null, 16, ["checked"])) : l("", !0),
|
|
113
|
+
n(v)["prev-buttons-ever"] ? g(e.$slots, "prev-buttons-ever", {
|
|
114
|
+
key: 1,
|
|
115
|
+
canUpdate: e.canUpdate,
|
|
116
|
+
canDrop: e.canDrop,
|
|
117
|
+
perms: e.perms
|
|
118
|
+
}) : l("", !0),
|
|
119
|
+
n(v)["prev-buttons"] ? g(e.$slots, "prev-buttons", {
|
|
120
|
+
key: 2,
|
|
121
|
+
canUpdate: e.canUpdate,
|
|
122
|
+
canDrop: e.canDrop,
|
|
123
|
+
perms: e.perms
|
|
124
|
+
}) : l("", !0),
|
|
125
|
+
V(K(T, N({
|
|
126
|
+
ref_key: "saveButtonRef",
|
|
127
|
+
ref: S
|
|
128
|
+
}, i.value, {
|
|
129
|
+
disabled: !Z.value,
|
|
130
|
+
onLoading: $,
|
|
131
|
+
onLoaded: U,
|
|
132
|
+
onClick: Y
|
|
133
|
+
}), {
|
|
134
|
+
default: M(() => [
|
|
135
|
+
n(v)["button-save"] ? g(e.$slots, "button-save", {
|
|
136
|
+
key: 0,
|
|
137
|
+
item: e.item,
|
|
138
|
+
editMode: c.value,
|
|
139
|
+
isCreate: !1,
|
|
140
|
+
canUpdate: e.canUpdate,
|
|
141
|
+
canDrop: e.canDrop
|
|
142
|
+
}) : l("", !0)
|
|
143
|
+
]),
|
|
144
|
+
_: 3
|
|
145
|
+
}, 16, ["disabled"]), [
|
|
146
|
+
[O, e.mode === n(w).Update && P.value]
|
|
147
|
+
]),
|
|
148
|
+
V(K(T, N({
|
|
149
|
+
ref_key: "saveButtonRef",
|
|
150
|
+
ref: S
|
|
151
|
+
}, b.value, {
|
|
152
|
+
disabled: !F.value,
|
|
153
|
+
onLoading: $,
|
|
154
|
+
onLoaded: U,
|
|
155
|
+
onClick: G
|
|
156
|
+
}), {
|
|
157
|
+
default: M(() => [
|
|
158
|
+
n(v)["button-save"] ? g(e.$slots, "button-save", {
|
|
159
|
+
key: 0,
|
|
160
|
+
item: e.item,
|
|
161
|
+
editMode: c.value,
|
|
162
|
+
isCreate: !0,
|
|
163
|
+
canUpdate: e.canUpdate,
|
|
164
|
+
canDrop: e.canDrop
|
|
165
|
+
}) : l("", !0)
|
|
166
|
+
]),
|
|
167
|
+
_: 3
|
|
168
|
+
}, 16, ["disabled"]), [
|
|
169
|
+
[O, e.mode === n(w).Create && P.value]
|
|
170
|
+
]),
|
|
171
|
+
V(K(T, N({
|
|
172
|
+
ref_key: "dropButtonRef",
|
|
173
|
+
ref: D
|
|
174
|
+
}, r.value, {
|
|
175
|
+
disabled: !q.value,
|
|
176
|
+
onLoading: $,
|
|
177
|
+
onLoaded: U,
|
|
178
|
+
onClick: L
|
|
179
|
+
}), {
|
|
180
|
+
default: M(() => [
|
|
181
|
+
n(v)["button-drop"] ? g(e.$slots, "button-drop", {
|
|
182
|
+
key: 0,
|
|
183
|
+
item: e.item,
|
|
184
|
+
editMode: c.value,
|
|
185
|
+
isCreate: !1,
|
|
186
|
+
canUpdate: e.canUpdate,
|
|
187
|
+
canDrop: e.canDrop
|
|
188
|
+
}) : l("", !0)
|
|
189
|
+
]),
|
|
190
|
+
_: 3
|
|
191
|
+
}, 16, ["disabled"]), [
|
|
192
|
+
[O, z.value && e.mode !== n(w).Create]
|
|
193
|
+
]),
|
|
194
|
+
n(v).buttons ? g(e.$slots, "buttons", { key: 3 }) : l("", !0)
|
|
139
195
|
]),
|
|
140
196
|
_: 3
|
|
141
|
-
}, 16
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
197
|
+
}, 16)) : (m(), E(Ue, { key: 1 }, [
|
|
198
|
+
n(v)["prev-buttons-ever"] ? V((m(), E("div", Pe, [
|
|
199
|
+
g(e.$slots, "prev-buttons-ever", {
|
|
200
|
+
canUpdate: e.canUpdate,
|
|
201
|
+
canDrop: e.canDrop,
|
|
202
|
+
perms: e.perms
|
|
203
|
+
})
|
|
204
|
+
], 512)), [
|
|
205
|
+
[O, !s.value]
|
|
206
|
+
]) : l("", !0),
|
|
207
|
+
n(v)["prev-buttons"] ? V((m(), E("div", Xe, [
|
|
208
|
+
g(e.$slots, "prev-buttons", {
|
|
209
|
+
canUpdate: e.canUpdate,
|
|
210
|
+
canDrop: e.canDrop,
|
|
211
|
+
perms: e.perms
|
|
212
|
+
})
|
|
213
|
+
], 512)), [
|
|
214
|
+
[O, c.value && !s.value]
|
|
215
|
+
]) : l("", !0),
|
|
216
|
+
V(K(T, N({
|
|
217
|
+
ref_key: "saveButtonRef",
|
|
218
|
+
ref: S
|
|
219
|
+
}, i.value, {
|
|
220
|
+
disabled: !Z.value,
|
|
221
|
+
onLoading: $,
|
|
222
|
+
onLoaded: U,
|
|
223
|
+
onClick: Y
|
|
224
|
+
}), {
|
|
225
|
+
default: M(() => [
|
|
226
|
+
n(v)["button-save"] ? g(e.$slots, "button-save", {
|
|
227
|
+
key: 0,
|
|
228
|
+
item: e.item,
|
|
229
|
+
editMode: c.value,
|
|
230
|
+
isCreate: !1,
|
|
231
|
+
canUpdate: e.canUpdate,
|
|
232
|
+
canDrop: e.canDrop
|
|
233
|
+
}) : l("", !0)
|
|
234
|
+
]),
|
|
235
|
+
_: 3
|
|
236
|
+
}, 16, ["disabled"]), [
|
|
237
|
+
[O, e.mode === n(w).Update && P.value]
|
|
160
238
|
]),
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
239
|
+
V(K(T, N({
|
|
240
|
+
ref_key: "saveButtonRef",
|
|
241
|
+
ref: S
|
|
242
|
+
}, b.value, {
|
|
243
|
+
disabled: !F.value,
|
|
244
|
+
onLoading: $,
|
|
245
|
+
onLoaded: U,
|
|
246
|
+
onClick: G
|
|
247
|
+
}), {
|
|
248
|
+
default: M(() => [
|
|
249
|
+
n(v)["button-save"] ? g(e.$slots, "button-save", {
|
|
250
|
+
key: 0,
|
|
251
|
+
item: e.item,
|
|
252
|
+
editMode: c.value,
|
|
253
|
+
isCreate: !0,
|
|
254
|
+
canUpdate: e.canUpdate,
|
|
255
|
+
canDrop: e.canDrop
|
|
256
|
+
}) : l("", !0)
|
|
257
|
+
]),
|
|
258
|
+
_: 3
|
|
259
|
+
}, 16, ["disabled"]), [
|
|
260
|
+
[O, e.mode === n(w).Create && P.value]
|
|
182
261
|
]),
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
262
|
+
V(K(T, N({
|
|
263
|
+
ref_key: "dropButtonRef",
|
|
264
|
+
ref: D
|
|
265
|
+
}, r.value, {
|
|
266
|
+
disabled: !q.value,
|
|
267
|
+
onLoading: $,
|
|
268
|
+
onLoaded: U,
|
|
269
|
+
onClick: L
|
|
270
|
+
}), {
|
|
271
|
+
default: M(() => [
|
|
272
|
+
n(v)["button-drop"] ? g(e.$slots, "button-drop", {
|
|
273
|
+
key: 0,
|
|
274
|
+
item: e.item,
|
|
275
|
+
editMode: c.value,
|
|
276
|
+
isCreate: !1,
|
|
277
|
+
canUpdate: e.canUpdate,
|
|
278
|
+
canDrop: e.canDrop
|
|
279
|
+
}) : l("", !0)
|
|
280
|
+
]),
|
|
281
|
+
_: 3
|
|
282
|
+
}, 16, ["disabled"]), [
|
|
283
|
+
[O, z.value && e.mode !== n(w).Create]
|
|
284
|
+
]),
|
|
285
|
+
n(v).buttons ? V((m(), E("div", Fe, [
|
|
286
|
+
g(e.$slots, "buttons")
|
|
287
|
+
], 512)), [
|
|
288
|
+
[O, c.value && !s.value]
|
|
289
|
+
]) : l("", !0),
|
|
290
|
+
H.value ? (m(), A(T, N({ key: 3 }, y.value, {
|
|
291
|
+
checked: c.value,
|
|
292
|
+
"onUpdate:checked": f[1] || (f[1] = (_) => c.value = _),
|
|
293
|
+
class: "lkt-item-crud--switch-mode-button"
|
|
294
|
+
}), null, 16, ["checked"])) : l("", !0)
|
|
295
|
+
], 64))
|
|
296
|
+
])) : l("", !0);
|
|
198
297
|
};
|
|
199
298
|
}
|
|
200
|
-
}),
|
|
299
|
+
}), Ge = { class: "lkt-item-crud" }, qe = {
|
|
201
300
|
key: 0,
|
|
202
301
|
class: "lkt-item-crud_header"
|
|
203
302
|
}, ze = {
|
|
204
303
|
key: 0,
|
|
205
304
|
class: "lkt-item-crud_header-slot"
|
|
206
|
-
},
|
|
305
|
+
}, He = {
|
|
207
306
|
key: 1,
|
|
208
307
|
class: "lkt-item-crud_header-title"
|
|
209
|
-
},
|
|
308
|
+
}, Ke = {
|
|
210
309
|
key: 2,
|
|
211
310
|
class: "lkt-item-crud_header-slot"
|
|
212
|
-
},
|
|
311
|
+
}, We = {
|
|
213
312
|
key: 2,
|
|
214
313
|
class: "lkt-item-crud_content"
|
|
215
|
-
},
|
|
314
|
+
}, Je = {
|
|
216
315
|
key: 0,
|
|
217
316
|
class: "lkt-grid-1"
|
|
218
|
-
},
|
|
317
|
+
}, Qe = /* @__PURE__ */ Be({
|
|
219
318
|
__name: "LktItemCrud",
|
|
220
|
-
props: /* @__PURE__ */
|
|
319
|
+
props: /* @__PURE__ */ Se({
|
|
221
320
|
modelValue: {},
|
|
222
321
|
editing: { type: Boolean },
|
|
223
322
|
perms: {},
|
|
@@ -227,6 +326,7 @@ const g = (...B) => {
|
|
|
227
326
|
dropButton: { type: [Object, Boolean] },
|
|
228
327
|
createButton: { type: [Object, Boolean] },
|
|
229
328
|
updateButton: { type: [Object, Boolean] },
|
|
329
|
+
groupButton: { type: [Object, Boolean] },
|
|
230
330
|
buttonNavPosition: {},
|
|
231
331
|
buttonNavVisibility: {},
|
|
232
332
|
modalConfig: {},
|
|
@@ -237,7 +337,7 @@ const g = (...B) => {
|
|
|
237
337
|
title: {},
|
|
238
338
|
beforeEmitUpdate: { type: Function },
|
|
239
339
|
notificationType: {}
|
|
240
|
-
}, Ne(
|
|
340
|
+
}, Ne(Ve)),
|
|
241
341
|
emits: [
|
|
242
342
|
"update:modelValue",
|
|
243
343
|
"update:editing",
|
|
@@ -250,278 +350,282 @@ const g = (...B) => {
|
|
|
250
350
|
"error",
|
|
251
351
|
"modified-data"
|
|
252
352
|
],
|
|
253
|
-
setup(
|
|
254
|
-
const o =
|
|
255
|
-
|
|
353
|
+
setup(C, { expose: ee, emit: ue }) {
|
|
354
|
+
const o = C, a = ke(), b = ue, i = p(!0), r = p(o.modelValue), y = p(o.perms), R = p(o.editing), v = p(!1), S = p(!1), D = p(200), s = p(new fe(r.value, o.dataStateConfig)), c = p(!1), $ = p(new fe(o.readData)), U = p(o.mode === w.Create), G = p(!1), Y = p(!1), L = p(null), te = k(() => !U.value && Array.isArray(y.value) && y.value.includes(ie.Update)), ae = k(() => !U.value && Array.isArray(y.value) && y.value.includes(ie.Drop)), Z = k(() => !U.value && Array.isArray(y.value) && y.value.includes(ie.SwitchEditMode)), F = async () => {
|
|
355
|
+
B("fetchItem"), i.value = !0, D.value = -1, S.value = !1;
|
|
256
356
|
try {
|
|
257
|
-
const
|
|
258
|
-
if (
|
|
259
|
-
|
|
357
|
+
const t = await Le(o.readResource, o.readData);
|
|
358
|
+
if (B("fetchItem -> response", t), i.value = !1, D.value = t.httpStatus, !t.success) {
|
|
359
|
+
v.value = !1, D.value = t.httpStatus, b("error", t.httpStatus);
|
|
260
360
|
return;
|
|
261
361
|
}
|
|
262
|
-
|
|
362
|
+
v.value = !0, r.value = t.data, y.value = t.perms, s.value.increment(r.value).turnStoredIntoOriginal(), c.value = s.value.changed(), $.value.turnStoredIntoOriginal(), b("read", t);
|
|
263
363
|
} catch {
|
|
264
|
-
|
|
364
|
+
i.value = !1, v.value = !1, D.value = 404, b("error", 404);
|
|
265
365
|
return;
|
|
266
366
|
}
|
|
267
367
|
};
|
|
268
|
-
h(() => o.modelValue, (
|
|
269
|
-
|
|
270
|
-
}, { deep: !0 }), h(
|
|
271
|
-
if (
|
|
272
|
-
|
|
273
|
-
let u = o.beforeEmitUpdate(
|
|
274
|
-
|
|
368
|
+
h(() => o.modelValue, (t) => {
|
|
369
|
+
r.value = t, s.value.increment(t);
|
|
370
|
+
}, { deep: !0 }), h(r, (t) => {
|
|
371
|
+
if (G.value = !0, B("item updated ->", r.value), typeof o.beforeEmitUpdate == "function") {
|
|
372
|
+
B("item updated -> has beforeEmitUpdate");
|
|
373
|
+
let u = o.beforeEmitUpdate(r.value);
|
|
374
|
+
B("item updated -> override with: ", u), typeof u == "object" && (r.value = u);
|
|
275
375
|
}
|
|
276
|
-
|
|
277
|
-
}, { deep: !0 }), h(
|
|
278
|
-
|
|
279
|
-
}), h(() => o.readData, (
|
|
280
|
-
|
|
281
|
-
}), h(() => o.editing, (
|
|
282
|
-
|
|
283
|
-
}), h(
|
|
284
|
-
|
|
285
|
-
}),
|
|
286
|
-
o.readResource && !
|
|
376
|
+
b("update:modelValue", r.value), B("item updated -> update dataState"), s.value.increment(t), c.value = s.value.changed(), Ie(() => G.value = !1);
|
|
377
|
+
}, { deep: !0 }), h(y, () => b("perms", y.value)), h(c, (t) => {
|
|
378
|
+
b("modified-data", t);
|
|
379
|
+
}), h(() => o.readData, (t) => {
|
|
380
|
+
$.value.increment(t), $.value.changed() && F();
|
|
381
|
+
}), h(() => o.editing, (t) => {
|
|
382
|
+
B("editing updated -> updating editMode", t), R.value = t;
|
|
383
|
+
}), h(R, (t) => {
|
|
384
|
+
B("editMode updated -> emit update", t), b("update:editing", t);
|
|
385
|
+
}), we(() => {
|
|
386
|
+
o.readResource && !U.value ? F() : (U.value, v.value = !0, R.value = !0, i.value = !1, s.value.increment(r.value).turnStoredIntoOriginal(), c.value = s.value.changed());
|
|
287
387
|
});
|
|
288
|
-
const
|
|
388
|
+
const q = (t, u) => {
|
|
289
389
|
if (u) {
|
|
290
|
-
if (
|
|
291
|
-
return
|
|
292
|
-
|
|
390
|
+
if (i.value = !1, typeof t < "u" && (D.value = t.httpStatus, !t.success))
|
|
391
|
+
return S.value = !0, b("error", t.httpStatus), !1;
|
|
392
|
+
S.value = !0;
|
|
293
393
|
}
|
|
294
394
|
return !0;
|
|
295
|
-
},
|
|
296
|
-
!
|
|
297
|
-
},
|
|
298
|
-
if (
|
|
299
|
-
o.notificationType ===
|
|
300
|
-
text:
|
|
301
|
-
details:
|
|
302
|
-
icon:
|
|
303
|
-
positionX:
|
|
395
|
+
}, z = (t) => {
|
|
396
|
+
!de.value && typeof t < "u" && t.autoReloadId && (B("doAutoReloadId -> autoReloadId detected: ", t.autoReloadId), o.readData.id = t.autoReloadId, B("doAutoReloadId -> turning off create mode"), U.value = !1, F());
|
|
397
|
+
}, P = (t, u) => {
|
|
398
|
+
if (B("onCreate"), !q(u, o.createButton.resource)) {
|
|
399
|
+
o.notificationType === X.Toast && J({
|
|
400
|
+
text: d.defaultCreateErrorText,
|
|
401
|
+
details: d.defaultCreateErrorDetails,
|
|
402
|
+
icon: d.defaultCreateErrorIcon,
|
|
403
|
+
positionX: W.Right
|
|
304
404
|
});
|
|
305
405
|
return;
|
|
306
406
|
}
|
|
307
|
-
|
|
308
|
-
text:
|
|
309
|
-
details:
|
|
310
|
-
icon:
|
|
311
|
-
positionX:
|
|
312
|
-
}),
|
|
313
|
-
},
|
|
314
|
-
if (
|
|
315
|
-
o.notificationType ===
|
|
316
|
-
text:
|
|
317
|
-
details:
|
|
318
|
-
icon:
|
|
319
|
-
positionX:
|
|
407
|
+
Y.value = !0, B("onCreate -> turn stored data into original"), s.value.increment(r.value).turnStoredIntoOriginal(), o.notificationType === X.Toast && J({
|
|
408
|
+
text: d.defaultCreateSuccessText,
|
|
409
|
+
details: d.defaultCreateSuccessDetails,
|
|
410
|
+
icon: d.defaultCreateSuccessIcon,
|
|
411
|
+
positionX: W.Right
|
|
412
|
+
}), z(u), b("create", u);
|
|
413
|
+
}, H = (t, u) => {
|
|
414
|
+
if (B("onUpdate"), !q(u, o.updateButton.resource)) {
|
|
415
|
+
o.notificationType === X.Toast && J({
|
|
416
|
+
text: d.defaultUpdateErrorText,
|
|
417
|
+
details: d.defaultUpdateErrorDetails,
|
|
418
|
+
icon: d.defaultUpdateErrorIcon,
|
|
419
|
+
positionX: W.Right
|
|
320
420
|
});
|
|
321
421
|
return;
|
|
322
422
|
}
|
|
323
|
-
|
|
324
|
-
text:
|
|
325
|
-
details:
|
|
326
|
-
icon:
|
|
327
|
-
positionX:
|
|
328
|
-
}),
|
|
329
|
-
},
|
|
330
|
-
if (
|
|
331
|
-
o.notificationType ===
|
|
332
|
-
text:
|
|
333
|
-
details:
|
|
334
|
-
icon:
|
|
335
|
-
positionX:
|
|
423
|
+
B("onUpdate -> turn stored data into original"), s.value.turnStoredIntoOriginal(), o.notificationType === X.Toast && J({
|
|
424
|
+
text: d.defaultUpdateSuccessText,
|
|
425
|
+
details: d.defaultUpdateSuccessDetails,
|
|
426
|
+
icon: d.defaultUpdateSuccessIcon,
|
|
427
|
+
positionX: W.Right
|
|
428
|
+
}), z(u), b("update", u);
|
|
429
|
+
}, oe = (t, u) => {
|
|
430
|
+
if (B("onDrop"), !q(u, o.dropButton.resource)) {
|
|
431
|
+
o.notificationType === X.Toast && J({
|
|
432
|
+
text: d.defaultDropErrorText,
|
|
433
|
+
details: d.defaultDropErrorDetails,
|
|
434
|
+
icon: d.defaultDropErrorIcon,
|
|
435
|
+
positionX: W.Right
|
|
336
436
|
});
|
|
337
437
|
return;
|
|
338
438
|
}
|
|
339
|
-
o.notificationType ===
|
|
340
|
-
text:
|
|
341
|
-
details:
|
|
342
|
-
icon:
|
|
343
|
-
positionX:
|
|
344
|
-
}),
|
|
439
|
+
o.notificationType === X.Toast && J({
|
|
440
|
+
text: d.defaultDropSuccessText,
|
|
441
|
+
details: d.defaultDropSuccessDetails,
|
|
442
|
+
icon: d.defaultDropSuccessIcon,
|
|
443
|
+
positionX: W.Right
|
|
444
|
+
}), b("drop", u), o.view === be.Modal && (B("onDrop -> close modal"), Oe(o.modalConfig.modalName, o.modalConfig.modalKey));
|
|
345
445
|
};
|
|
346
|
-
|
|
446
|
+
ee({
|
|
347
447
|
doDrop: () => {
|
|
348
448
|
L.value && L.value.doDrop();
|
|
349
449
|
},
|
|
350
|
-
doRefresh:
|
|
450
|
+
doRefresh: F,
|
|
351
451
|
doSave: () => {
|
|
352
452
|
L.value && L.value.doSave();
|
|
353
453
|
},
|
|
354
|
-
hasModifiedData: () =>
|
|
454
|
+
hasModifiedData: () => s.value.changed()
|
|
355
455
|
});
|
|
356
|
-
const
|
|
357
|
-
var
|
|
358
|
-
return
|
|
359
|
-
}),
|
|
456
|
+
const T = k(() => {
|
|
457
|
+
var t;
|
|
458
|
+
return s.value.changed() ? (t = o.modalConfig) == null ? void 0 : t.closeConfirm : "";
|
|
459
|
+
}), _ = (t) => {
|
|
360
460
|
var u;
|
|
361
461
|
if (typeof ((u = o.modalConfig) == null ? void 0 : u.beforeClose) == "function")
|
|
362
462
|
return o.modalConfig.beforeClose({
|
|
363
|
-
...
|
|
364
|
-
itemCreated:
|
|
463
|
+
...t,
|
|
464
|
+
itemCreated: Y.value
|
|
365
465
|
});
|
|
366
|
-
},
|
|
466
|
+
}, ne = k(() => o.title.startsWith("__:") ? String(je(o.title.substring(3))) : o.title), he = k(() => i.value ? !1 : ne.value.length > 0 || !!a["post-title"]), de = k(() => o.view === be.Modal), pe = k(() => de.value ? "lkt-modal" : "section"), Ce = k(() => pe.value === "lkt-modal" ? {
|
|
367
467
|
title: o.title,
|
|
368
|
-
item:
|
|
468
|
+
item: r.value,
|
|
369
469
|
...o.modalConfig,
|
|
370
|
-
beforeClose:
|
|
371
|
-
closeConfirm:
|
|
470
|
+
beforeClose: _,
|
|
471
|
+
closeConfirm: T.value
|
|
372
472
|
} : {});
|
|
373
|
-
return (
|
|
374
|
-
const
|
|
375
|
-
return
|
|
376
|
-
default:
|
|
377
|
-
|
|
378
|
-
!
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
item:
|
|
382
|
-
loading:
|
|
473
|
+
return (t, u) => {
|
|
474
|
+
const ve = se("lkt-http-info"), De = se("lkt-loader");
|
|
475
|
+
return m(), A(Me(pe.value), Re(Te(Ce.value)), {
|
|
476
|
+
default: M(() => [
|
|
477
|
+
Ee("article", Ge, [
|
|
478
|
+
!de.value && he.value ? (m(), E("header", qe, [
|
|
479
|
+
n(a)["pre-title"] ? (m(), E("div", ze, [
|
|
480
|
+
g(t.$slots, "pre-title", {
|
|
481
|
+
item: r.value,
|
|
482
|
+
loading: i.value
|
|
383
483
|
})
|
|
384
|
-
])) :
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
item:
|
|
389
|
-
loading:
|
|
484
|
+
])) : l("", !0),
|
|
485
|
+
ne.value.length > 0 ? (m(), E("h1", He, $e(ne.value), 1)) : l("", !0),
|
|
486
|
+
n(a)["post-title"] ? (m(), E("div", Ke, [
|
|
487
|
+
g(t.$slots, "post-title", {
|
|
488
|
+
item: r.value,
|
|
489
|
+
loading: i.value
|
|
390
490
|
})
|
|
391
|
-
])) :
|
|
392
|
-
])) :
|
|
393
|
-
|
|
491
|
+
])) : l("", !0)
|
|
492
|
+
])) : l("", !0),
|
|
493
|
+
t.buttonNavPosition === n(ge).Top ? (m(), A(ye, {
|
|
394
494
|
key: 1,
|
|
395
495
|
ref_key: "buttonNav",
|
|
396
496
|
ref: L,
|
|
397
|
-
loading:
|
|
398
|
-
"onUpdate:loading": u[0] || (u[0] = (
|
|
399
|
-
editing:
|
|
400
|
-
"onUpdate:editing": u[1] || (u[1] = (
|
|
401
|
-
item:
|
|
402
|
-
mode:
|
|
403
|
-
view:
|
|
404
|
-
"button-nav-visibility":
|
|
405
|
-
"create-button":
|
|
406
|
-
"update-button":
|
|
407
|
-
"drop-button":
|
|
408
|
-
"edit-mode-button":
|
|
409
|
-
"
|
|
410
|
-
"
|
|
411
|
-
"
|
|
412
|
-
"can-
|
|
413
|
-
"can-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
497
|
+
loading: i.value,
|
|
498
|
+
"onUpdate:loading": u[0] || (u[0] = (I) => i.value = I),
|
|
499
|
+
editing: R.value,
|
|
500
|
+
"onUpdate:editing": u[1] || (u[1] = (I) => R.value = I),
|
|
501
|
+
item: r.value,
|
|
502
|
+
mode: t.mode,
|
|
503
|
+
view: t.view,
|
|
504
|
+
"button-nav-visibility": t.buttonNavVisibility,
|
|
505
|
+
"create-button": t.createButton,
|
|
506
|
+
"update-button": t.updateButton,
|
|
507
|
+
"drop-button": t.dropButton,
|
|
508
|
+
"edit-mode-button": t.editModeButton,
|
|
509
|
+
"group-button": t.groupButton,
|
|
510
|
+
"data-changed": c.value,
|
|
511
|
+
"http-success-read": v.value,
|
|
512
|
+
"can-update": te.value,
|
|
513
|
+
"can-drop": ae.value,
|
|
514
|
+
"can-switch-edit-mode": Z.value,
|
|
515
|
+
perms: y.value,
|
|
516
|
+
onCreate: P,
|
|
517
|
+
onSave: H,
|
|
518
|
+
onDrop: oe
|
|
519
|
+
}, ce({ _: 2 }, [
|
|
520
|
+
n(a)["prev-buttons-ever"] ? {
|
|
420
521
|
name: "prev-buttons-ever",
|
|
421
|
-
fn:
|
|
422
|
-
|
|
423
|
-
canUpdate:
|
|
424
|
-
canDrop:
|
|
425
|
-
perms:
|
|
522
|
+
fn: M(({ canUpdate: I, canDrop: re, perms: le }) => [
|
|
523
|
+
g(t.$slots, "prev-buttons-ever", {
|
|
524
|
+
canUpdate: I,
|
|
525
|
+
canDrop: re,
|
|
526
|
+
perms: le
|
|
426
527
|
})
|
|
427
528
|
]),
|
|
428
529
|
key: "0"
|
|
429
530
|
} : void 0,
|
|
430
|
-
|
|
431
|
-
name: "prev-buttons
|
|
432
|
-
fn:
|
|
433
|
-
|
|
434
|
-
canUpdate:
|
|
435
|
-
canDrop:
|
|
436
|
-
perms:
|
|
531
|
+
n(a)["prev-buttons"] ? {
|
|
532
|
+
name: "prev-buttons",
|
|
533
|
+
fn: M(({ canUpdate: I, canDrop: re, perms: le }) => [
|
|
534
|
+
g(t.$slots, "prev-buttons", {
|
|
535
|
+
canUpdate: I,
|
|
536
|
+
canDrop: re,
|
|
537
|
+
perms: le
|
|
437
538
|
})
|
|
438
539
|
]),
|
|
439
540
|
key: "1"
|
|
440
541
|
} : void 0
|
|
441
|
-
]), 1032, ["loading", "editing", "item", "mode", "view", "button-nav-visibility", "create-button", "update-button", "drop-button", "edit-mode-button", "data-changed", "http-success-read", "can-update", "can-drop", "can-switch-edit-mode", "perms"])) :
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
542
|
+
]), 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", "perms"])) : l("", !0),
|
|
543
|
+
i.value ? l("", !0) : (m(), E("div", We, [
|
|
544
|
+
v.value ? (m(), E("div", Je, [
|
|
545
|
+
S.value && t.notificationType === n(X).Inline ? (m(), A(ve, {
|
|
445
546
|
key: 0,
|
|
446
|
-
code:
|
|
447
|
-
palette:
|
|
547
|
+
code: D.value,
|
|
548
|
+
palette: D.value === 200 ? "success" : "danger",
|
|
448
549
|
quick: "",
|
|
449
550
|
"can-close": "",
|
|
450
|
-
onClose: u[2] || (u[2] = (
|
|
451
|
-
}, null, 8, ["code", "palette"])) :
|
|
452
|
-
|
|
453
|
-
item:
|
|
454
|
-
loading:
|
|
455
|
-
editMode:
|
|
456
|
-
isCreate:
|
|
457
|
-
canUpdate:
|
|
458
|
-
canDrop:
|
|
459
|
-
itemBeingEdited:
|
|
551
|
+
onClose: u[2] || (u[2] = (I) => S.value = !1)
|
|
552
|
+
}, null, 8, ["code", "palette"])) : l("", !0),
|
|
553
|
+
g(t.$slots, "item", {
|
|
554
|
+
item: r.value,
|
|
555
|
+
loading: i.value,
|
|
556
|
+
editMode: R.value,
|
|
557
|
+
isCreate: U.value,
|
|
558
|
+
canUpdate: te.value,
|
|
559
|
+
canDrop: ae.value,
|
|
560
|
+
itemBeingEdited: G.value,
|
|
561
|
+
perms: y.value
|
|
460
562
|
})
|
|
461
|
-
])) :
|
|
563
|
+
])) : t.notificationType === n(X).Inline ? (m(), A(ve, {
|
|
462
564
|
key: 1,
|
|
463
|
-
code:
|
|
464
|
-
}, null, 8, ["code"])) :
|
|
565
|
+
code: D.value
|
|
566
|
+
}, null, 8, ["code"])) : l("", !0)
|
|
465
567
|
])),
|
|
466
|
-
|
|
467
|
-
|
|
568
|
+
i.value ? (m(), A(De, { key: 3 })) : l("", !0),
|
|
569
|
+
t.buttonNavPosition === n(ge).Bottom ? (m(), A(ye, {
|
|
468
570
|
key: 4,
|
|
469
571
|
ref_key: "buttonNav",
|
|
470
572
|
ref: L,
|
|
471
|
-
loading:
|
|
472
|
-
"onUpdate:loading": u[3] || (u[3] = (
|
|
473
|
-
editing:
|
|
474
|
-
"onUpdate:editing": u[4] || (u[4] = (
|
|
475
|
-
item:
|
|
476
|
-
mode:
|
|
477
|
-
view:
|
|
478
|
-
"button-nav-visibility":
|
|
479
|
-
"create-button":
|
|
480
|
-
"update-button":
|
|
481
|
-
"drop-button":
|
|
482
|
-
"edit-mode-button":
|
|
483
|
-
"
|
|
484
|
-
"
|
|
485
|
-
"
|
|
486
|
-
"can-
|
|
487
|
-
"can-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
573
|
+
loading: i.value,
|
|
574
|
+
"onUpdate:loading": u[3] || (u[3] = (I) => i.value = I),
|
|
575
|
+
editing: R.value,
|
|
576
|
+
"onUpdate:editing": u[4] || (u[4] = (I) => R.value = I),
|
|
577
|
+
item: r.value,
|
|
578
|
+
mode: t.mode,
|
|
579
|
+
view: t.view,
|
|
580
|
+
"button-nav-visibility": t.buttonNavVisibility,
|
|
581
|
+
"create-button": t.createButton,
|
|
582
|
+
"update-button": t.updateButton,
|
|
583
|
+
"drop-button": t.dropButton,
|
|
584
|
+
"edit-mode-button": t.editModeButton,
|
|
585
|
+
"group-button": t.groupButton,
|
|
586
|
+
"data-changed": c.value,
|
|
587
|
+
"http-success-read": v.value,
|
|
588
|
+
"can-update": te.value,
|
|
589
|
+
"can-drop": ae.value,
|
|
590
|
+
"can-switch-edit-mode": Z.value,
|
|
591
|
+
perms: y.value,
|
|
592
|
+
onCreate: P,
|
|
593
|
+
onSave: H,
|
|
594
|
+
onDrop: oe
|
|
595
|
+
}, ce({ _: 2 }, [
|
|
596
|
+
n(a)["prev-buttons-ever"] ? {
|
|
493
597
|
name: "prev-buttons-ever",
|
|
494
|
-
fn:
|
|
495
|
-
|
|
598
|
+
fn: M(() => [
|
|
599
|
+
g(t.$slots, "prev-buttons-ever")
|
|
496
600
|
]),
|
|
497
601
|
key: "0"
|
|
498
602
|
} : void 0,
|
|
499
|
-
|
|
603
|
+
n(a)["prev-buttons"] ? {
|
|
500
604
|
name: "prev-buttons-ever",
|
|
501
|
-
fn:
|
|
502
|
-
|
|
605
|
+
fn: M(() => [
|
|
606
|
+
g(t.$slots, "prev-buttons")
|
|
503
607
|
]),
|
|
504
608
|
key: "1"
|
|
505
609
|
} : void 0
|
|
506
|
-
]), 1032, ["loading", "editing", "item", "mode", "view", "button-nav-visibility", "create-button", "update-button", "drop-button", "edit-mode-button", "data-changed", "http-success-read", "can-update", "can-drop", "can-switch-edit-mode"])) :
|
|
610
|
+
]), 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", "perms"])) : l("", !0)
|
|
507
611
|
])
|
|
508
612
|
]),
|
|
509
613
|
_: 3
|
|
510
614
|
}, 16);
|
|
511
615
|
};
|
|
512
616
|
}
|
|
513
|
-
}),
|
|
514
|
-
install: (
|
|
515
|
-
|
|
617
|
+
}), ut = {
|
|
618
|
+
install: (C, ee = {}) => {
|
|
619
|
+
C.component("lkt-item-crud") === void 0 && C.component("lkt-item-crud", Qe);
|
|
516
620
|
}
|
|
517
|
-
},
|
|
518
|
-
|
|
519
|
-
},
|
|
520
|
-
|
|
621
|
+
}, nt = (C) => {
|
|
622
|
+
Q.defaultSaveIcon = C;
|
|
623
|
+
}, dt = (C) => {
|
|
624
|
+
Q.defaultDropIcon = C;
|
|
521
625
|
};
|
|
522
626
|
export {
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
627
|
+
ot as debugLktItemCrud,
|
|
628
|
+
ut as default,
|
|
629
|
+
dt as setItemCrudDefaultDropIcon,
|
|
630
|
+
nt as setItemCrudDefaultSaveIcon
|
|
527
631
|
};
|