lkt-item-crud 1.1.24 → 1.1.25

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 CHANGED
@@ -1,5 +1,5 @@
1
- declare function $e(l?: boolean): void;
2
- declare namespace Fe {
3
- function install(l: any, p?: {}): void;
1
+ declare function Oe(l?: boolean): void;
2
+ declare namespace Te {
3
+ function install(l: any, f?: {}): void;
4
4
  }
5
- export { $e as debugLktItemCrud, Fe as default };
5
+ export { Oe as debugLktItemCrud, Te as default };
package/dist/build.js CHANGED
@@ -1,48 +1,50 @@
1
- import { defineComponent as ve, useSlots as fe, ref as s, computed as i, watch as h, nextTick as pe, resolveComponent as I, openBlock as f, createElementBlock as M, createElementVNode as K, toDisplayString as j, renderSlot as V, createCommentVNode as w, withDirectives as N, createBlock as L, withCtx as Y, unref as Z, vShow as O, createVNode as ee } from "vue";
1
+ import { defineComponent as ce, useSlots as ve, ref as i, computed as s, watch as m, nextTick as fe, resolveComponent as V, openBlock as h, createElementBlock as N, createElementVNode as x, toDisplayString as pe, renderSlot as L, createCommentVNode as y, withDirectives as O, createBlock as T, unref as _, withCtx as Y, vShow as $, createVNode as Z } from "vue";
2
2
  import { httpCall as me } from "lkt-http-client";
3
- import { DataState as ae } from "lkt-data-state";
4
- import { execModal as he, refreshModal as ke, closeModal as Ce, openModal as be, reOpenModal as De } from "lkt-modal";
5
- const H = class H {
3
+ import { DataState as ee } from "lkt-data-state";
4
+ import { execModal as he, refreshModal as be, closeModal as ke, openModal as Ce, reOpenModal as De } from "lkt-modal";
5
+ const q = class q {
6
6
  };
7
- H.debugEnabled = !1;
8
- let T = H;
7
+ q.debugEnabled = !1;
8
+ let F = q;
9
9
  const u = (...l) => {
10
- T.debugEnabled && console.info("[LktItemCrud] ", ...l);
11
- }, $e = (l = !0) => {
12
- T.debugEnabled = l;
13
- }, q = (l) => {
10
+ F.debugEnabled && console.info("[LktItemCrud] ", ...l);
11
+ }, Oe = (l = !0) => {
12
+ F.debugEnabled = l;
13
+ }, j = (l) => {
14
14
  u("runModalCallback -> init", l);
15
- let p = l.modalKey ? l.modalKey : "_", S = l.args ? l.args : {};
15
+ let f = l.modalKey ? l.modalKey : "_", g = l.args ? l.args : {};
16
16
  switch (l.action) {
17
17
  case "reOpen":
18
- return De(l.modalName, p, S);
18
+ return De(l.modalName, f, g);
19
19
  case "open":
20
- return be(l.modalName, p, S);
20
+ return Ce(l.modalName, f, g);
21
21
  case "close":
22
- return Ce(l.modalName, p);
22
+ return ke(l.modalName, f);
23
23
  case "refresh":
24
- return ke(l.modalName, p, S);
24
+ return be(l.modalName, f, g);
25
25
  case "exec":
26
26
  let e = l.method;
27
- return e ? he(l.modalName, p, e, S) : void 0;
27
+ return e ? he(l.modalName, f, e, g) : void 0;
28
28
  }
29
29
  }, Se = { class: "lkt-item-crud" }, ye = {
30
30
  key: 0,
31
31
  class: "lkt-item-crud_header"
32
- }, ge = { class: "lkt-item-crud_header-title" }, Me = { class: "lkt-item-crud_header-slot" }, _e = { class: "lkt-item-crud-buttons" }, Be = { key: 1 }, we = { key: 1 }, Ee = {
32
+ }, ge = { class: "lkt-item-crud_header-title" }, Me = { class: "lkt-item-crud_header-slot" }, Be = { class: "lkt-item-crud-buttons" }, _e = {
33
33
  key: 1,
34
34
  class: "lkt-item-crud_content"
35
- }, Ue = {
35
+ }, we = {
36
36
  key: 0,
37
37
  class: "lkt-grid-1"
38
- }, Re = /* @__PURE__ */ ve({
38
+ }, Ie = /* @__PURE__ */ ce({
39
39
  __name: "LktItemCrud",
40
40
  props: {
41
41
  modelValue: { default: () => ({}) },
42
42
  title: { default: "" },
43
43
  editModeText: { default: "Edition Mode" },
44
44
  saveText: { default: "Save" },
45
+ saveIcon: {},
45
46
  dropText: { default: "Delete" },
47
+ dropIcon: {},
46
48
  hiddenSave: { type: Boolean, default: !1 },
47
49
  hiddenDrop: { type: Boolean, default: !1 },
48
50
  hiddenButtons: { type: Boolean, default: !1 },
@@ -77,69 +79,69 @@ const u = (...l) => {
77
79
  editing: { type: Boolean, default: !1 }
78
80
  },
79
81
  emits: ["update:modelValue", "update:isCreate", "update:editing", "read", "create", "update", "drop", "before-save", "perms", "error", "modified-data"],
80
- setup(l, { expose: p, emit: S }) {
81
- const e = l, $ = fe(), n = S;
82
- let te = [];
83
- const d = s(!0), r = s(e.modelValue), _ = s(te), c = s(e.editing), m = s(!1), k = s(!1), v = s(200), E = s(null), U = s(null), y = s(new ae(r.value, e.dataStateConfig)), F = s(new ae(e.readData)), o = s(e.isCreate), J = s(!1), le = i(() => o.value ? e.createConfirm : e.updateConfirm), oe = i(() => o.value ? e.createConfirmData : e.updateConfirmData), P = i(() => o.value ? e.createResource : e.updateResource), ue = i(() => o.value ? { ...e.createData, ...JSON.parse(JSON.stringify(r.value)) } : { ...e.updateData, ...JSON.parse(JSON.stringify(r.value)) }), de = i(() => o.value ? e.createDisabled : e.updateDisabled), C = i(() => !o.value && _.value.includes("update")), b = i(() => !o.value && _.value.includes("drop")), R = async () => {
82
+ setup(l, { expose: f, emit: g }) {
83
+ const e = l, b = ve(), n = g;
84
+ let ae = [];
85
+ const d = i(!0), r = i(e.modelValue), w = i(ae), c = i(e.editing), p = i(!1), k = i(!1), v = i(200), E = i(null), U = i(null), M = i(new ee(r.value, e.dataStateConfig)), J = i(new ee(e.readData)), o = i(e.isCreate), K = i(!1), te = s(() => o.value ? e.createConfirm : e.updateConfirm), le = s(() => o.value ? e.createConfirmData : e.updateConfirmData), H = s(() => o.value ? e.createResource : e.updateResource), oe = s(() => o.value ? { ...e.createData, ...JSON.parse(JSON.stringify(r.value)) } : { ...e.updateData, ...JSON.parse(JSON.stringify(r.value)) }), ue = s(() => o.value ? e.createDisabled : e.updateDisabled), C = s(() => !o.value && w.value.includes("update")), D = s(() => !o.value && w.value.includes("drop")), R = async () => {
84
86
  u("fetchItem"), d.value = !0, v.value = -1, k.value = !1;
85
87
  try {
86
88
  const a = await me(e.readResource, e.readData);
87
89
  if (u("fetchItem -> response", a), d.value = !1, v.value = a.httpStatus, !a.success) {
88
- m.value = !1, v.value = a.httpStatus, n("error", a.httpStatus);
90
+ p.value = !1, v.value = a.httpStatus, n("error", a.httpStatus);
89
91
  return;
90
92
  }
91
- m.value = !0, r.value = a.data, _.value = a.perms, y.value.increment(r.value).turnStoredIntoOriginal(), F.value.turnStoredIntoOriginal(), n("read", a);
93
+ p.value = !0, r.value = a.data, w.value = a.perms, M.value.increment(r.value).turnStoredIntoOriginal(), J.value.turnStoredIntoOriginal(), n("read", a);
92
94
  } catch {
93
- d.value = !1, m.value = !1, v.value = 404, n("error", 404);
95
+ d.value = !1, p.value = !1, v.value = 404, n("error", 404);
94
96
  return;
95
97
  }
96
- }, re = i(() => d.value ? !1 : e.title || !!$["post-title"]);
97
- h(() => e.modelValue, (a) => {
98
- r.value = a, y.value.increment(a);
99
- }, { deep: !0 }), h(r, (a) => {
100
- if (J.value = !0, u("item updated ->", r.value), typeof e.beforeEmitUpdate == "function") {
98
+ }, de = s(() => d.value ? !1 : e.title || !!b["post-title"]);
99
+ m(() => e.modelValue, (a) => {
100
+ r.value = a, M.value.increment(a);
101
+ }, { deep: !0 }), m(r, (a) => {
102
+ if (K.value = !0, u("item updated ->", r.value), typeof e.beforeEmitUpdate == "function") {
101
103
  u("item updated -> has beforeEmitUpdate");
102
104
  let t = e.beforeEmitUpdate(r.value);
103
105
  u("item updated -> override with: ", t), typeof t == "object" && (r.value = t);
104
106
  }
105
- n("update:modelValue", r.value), u("item updated -> update dataState"), y.value.increment(a), pe(() => J.value = !1);
106
- }, { deep: !0 }), h(_, () => n("perms", _.value));
107
- const x = i(() => de.value || !o.value && !C.value || typeof e.saveValidator == "function" && !e.saveValidator(r.value) ? !1 : y.value.changed());
108
- h(x, (a) => n("modified-data", a)), h(o, (a) => n("update:isCreate", a)), h(() => e.readData, (a) => {
109
- F.value.increment(a), F.value.changed() && R();
110
- }), h(() => e.editing, (a) => {
107
+ n("update:modelValue", r.value), u("item updated -> update dataState"), M.value.increment(a), fe(() => K.value = !1);
108
+ }, { deep: !0 }), m(w, () => n("perms", w.value));
109
+ const P = s(() => ue.value || !o.value && !C.value || typeof e.saveValidator == "function" && !e.saveValidator(r.value) ? !1 : M.value.changed());
110
+ m(P, (a) => n("modified-data", a)), m(o, (a) => n("update:isCreate", a)), m(() => e.readData, (a) => {
111
+ J.value.increment(a), J.value.changed() && R();
112
+ }), m(() => e.editing, (a) => {
111
113
  u("editing updated -> updating editMode", a), c.value = a;
112
- }), h(c, (a) => {
114
+ }), m(c, (a) => {
113
115
  u("editMode updated -> emit update", a), n("update:editing", a);
114
- }), e.readResource && !o.value ? R() : o.value && (m.value = !0, c.value = !0, d.value = !1);
115
- const ne = (a, t) => {
116
+ }), e.readResource && !o.value ? R() : o.value && (p.value = !0, c.value = !0, d.value = !1);
117
+ const re = (a, t) => {
116
118
  if (d.value = !1, v.value = t.httpStatus, !t.success) {
117
119
  k.value = !0, n("error", t.httpStatus);
118
120
  return;
119
121
  }
120
- k.value = !0, e.onDropModalCallbacks.length > 0 && (u("onDrop -> has onDropModalCallbacks"), e.onDropModalCallbacks.forEach((D) => {
121
- q(D);
122
+ k.value = !0, e.onDropModalCallbacks.length > 0 && (u("onDrop -> has onDropModalCallbacks"), e.onDropModalCallbacks.forEach((S) => {
123
+ j(S);
122
124
  })), n("drop", t);
123
- }, se = (a, t) => {
124
- if (u("onSave -> received response:", t), n("before-save"), P.value) {
125
+ }, ne = (a, t) => {
126
+ if (u("onSave -> received response:", t), n("before-save"), H.value) {
125
127
  if (d.value = !1, v.value = t.httpStatus, !t.success) {
126
128
  k.value = !0, n("error", t.httpStatus);
127
129
  return;
128
130
  }
129
131
  k.value = !0;
130
132
  }
131
- let D = o.value ? "create" : "update";
132
- o.value || (u("onSave -> turn stored data into original"), y.value.turnStoredIntoOriginal()), D === "create" ? typeof e.onCreate == "function" && (u("onSave -> trigger onCreate callback"), e.onCreate(t), e.onCreateModalCallbacks.length > 0 && (u("onSave -> has onCreateModalCallbacks"), e.onCreateModalCallbacks.forEach((B) => {
133
- q(B);
134
- }))) : typeof e.onUpdate == "function" && (u("onSave -> trigger onUpdate callback"), e.onUpdate(t), e.onUpdateModalCallbacks.length > 0 && (u("onSave -> has onUpdateModalCallbacks"), e.onUpdateModalCallbacks.forEach((B) => {
135
- q(B);
136
- }))), !e.insideModal && t.autoReloadId && (u("onSave -> autoReloadId detected: ", t.autoReloadId), e.readData.id = t.autoReloadId, u("onSave -> turning off create mode"), o.value = !1, R()), n(D, t);
133
+ let S = o.value ? "create" : "update";
134
+ o.value || (u("onSave -> turn stored data into original"), M.value.turnStoredIntoOriginal()), S === "create" ? typeof e.onCreate == "function" && (u("onSave -> trigger onCreate callback"), e.onCreate(t), e.onCreateModalCallbacks.length > 0 && (u("onSave -> has onCreateModalCallbacks"), e.onCreateModalCallbacks.forEach((I) => {
135
+ j(I);
136
+ }))) : typeof e.onUpdate == "function" && (u("onSave -> trigger onUpdate callback"), e.onUpdate(t), e.onUpdateModalCallbacks.length > 0 && (u("onSave -> has onUpdateModalCallbacks"), e.onUpdateModalCallbacks.forEach((I) => {
137
+ j(I);
138
+ }))), !e.insideModal && t.autoReloadId && (u("onSave -> autoReloadId detected: ", t.autoReloadId), e.readData.id = t.autoReloadId, u("onSave -> turning off create mode"), o.value = !1, R()), n(S, t);
137
139
  }, z = () => {
138
140
  d.value = !0, v.value = -1;
139
141
  }, A = () => {
140
142
  d.value = !1;
141
143
  };
142
- p({
144
+ f({
143
145
  doDrop: () => {
144
146
  U.value && typeof U.value.click == "function" && U.value.click();
145
147
  },
@@ -148,117 +150,121 @@ const u = (...l) => {
148
150
  E.value && typeof E.value.click == "function" && E.value.click();
149
151
  }
150
152
  });
151
- const G = i(() => !C.value && b.value ? !0 : !e.hiddenDrop && !d.value && c.value && m.value), Q = i(() => y.value.changed() ? !0 : d.value ? !1 : o.value ? !0 : !e.hiddenSave && c.value && m.value), W = i(() => e.hideSwitchEdition || !C.value && !b.value || !C.value && b.value ? !1 : !d.value && !o.value && m.value && !(e.dropDisabled && e.updateDisabled)), ie = i(() => !e.hiddenButtons && (Q.value || G.value || W.value));
153
+ const G = s(() => !C.value && D.value ? !0 : !e.hiddenDrop && !d.value && c.value && p.value), Q = s(() => M.value.changed() ? !0 : d.value ? !1 : o.value ? !0 : !e.hiddenSave && c.value && p.value), W = s(() => e.hideSwitchEdition || !C.value && !D.value || !C.value && D.value ? !1 : !d.value && !o.value && p.value && !(e.dropDisabled && e.updateDisabled)), ie = s(() => !e.hiddenButtons && (Q.value || G.value || W.value));
152
154
  return (a, t) => {
153
- const D = I("lkt-button"), B = I("lkt-field-switch"), X = I("lkt-http-info"), ce = I("lkt-loader");
154
- return f(), M("article", Se, [
155
- re.value ? (f(), M("header", ye, [
156
- K("h1", ge, j(a.title), 1),
157
- K("div", Me, [
158
- V(a.$slots, "post-title", {
155
+ const S = V("lkt-button"), I = V("lkt-field-switch"), X = V("lkt-http-info"), se = V("lkt-loader");
156
+ return h(), N("article", Se, [
157
+ de.value ? (h(), N("header", ye, [
158
+ x("h1", ge, pe(a.title), 1),
159
+ x("div", Me, [
160
+ L(a.$slots, "post-title", {
159
161
  item: r.value,
160
162
  loading: d.value
161
163
  })
162
164
  ])
163
- ])) : w("", !0),
164
- N(K("div", _e, [
165
- o.value ? w("", !0) : N((f(), L(D, {
165
+ ])) : y("", !0),
166
+ O(x("div", Be, [
167
+ o.value ? y("", !0) : O((h(), T(S, {
166
168
  key: 0,
167
- ref: (g) => U.value = g,
169
+ ref: (B) => U.value = B,
168
170
  palette: "danger",
169
- disabled: a.dropDisabled || !b.value,
171
+ disabled: a.dropDisabled || !D.value,
170
172
  "confirm-modal": a.dropConfirm,
171
173
  "confirm-data": a.dropConfirmData,
172
174
  resource: a.dropResource,
173
175
  "resource-data": a.dropData,
176
+ text: _(b)["button-drop"] ? "" : a.dropText,
177
+ icon: _(b)["button-drop"] ? "" : a.dropIcon,
174
178
  onLoading: z,
175
179
  onLoaded: A,
176
- onClick: ne
180
+ onClick: re
177
181
  }, {
178
182
  default: Y(() => [
179
- Z($)["button-drop"] ? V(a.$slots, "button-drop", {
183
+ _(b)["button-drop"] ? L(a.$slots, "button-drop", {
180
184
  key: 0,
181
185
  item: r.value,
182
186
  editMode: c.value,
183
187
  isCreate: o.value,
184
188
  canUpdate: C.value,
185
- canDrop: b.value
186
- }) : (f(), M("span", Be, j(a.dropText), 1))
189
+ canDrop: D.value
190
+ }) : y("", !0)
187
191
  ]),
188
192
  _: 3
189
- }, 8, ["disabled", "confirm-modal", "confirm-data", "resource", "resource-data"])), [
190
- [O, G.value]
193
+ }, 8, ["disabled", "confirm-modal", "confirm-data", "resource", "resource-data", "text", "icon"])), [
194
+ [$, G.value]
191
195
  ]),
192
- N(ee(D, {
193
- ref: (g) => E.value = g,
196
+ O(Z(S, {
197
+ ref: (B) => E.value = B,
194
198
  palette: "success",
195
- disabled: !x.value,
196
- "confirm-modal": le.value,
197
- "confirm-data": oe.value,
198
- resource: P.value,
199
- "resource-data": ue.value,
199
+ disabled: !P.value,
200
+ "confirm-modal": te.value,
201
+ "confirm-data": le.value,
202
+ resource: H.value,
203
+ "resource-data": oe.value,
204
+ text: _(b)["button-save"] ? "" : a.saveText,
205
+ icon: _(b)["button-save"] ? "" : a.saveIcon,
200
206
  onLoading: z,
201
207
  onLoaded: A,
202
- onClick: se
208
+ onClick: ne
203
209
  }, {
204
210
  default: Y(() => [
205
- Z($)["button-save"] ? V(a.$slots, "button-save", {
211
+ _(b)["button-save"] ? L(a.$slots, "button-save", {
206
212
  key: 0,
207
213
  item: r.value,
208
214
  editMode: c.value,
209
215
  isCreate: o.value,
210
216
  canUpdate: C.value,
211
- canDrop: b.value
212
- }) : (f(), M("span", we, j(a.saveText), 1))
217
+ canDrop: D.value
218
+ }) : y("", !0)
213
219
  ]),
214
220
  _: 3
215
- }, 8, ["disabled", "confirm-modal", "confirm-data", "resource", "resource-data"]), [
216
- [O, Q.value]
221
+ }, 8, ["disabled", "confirm-modal", "confirm-data", "resource", "resource-data", "text", "icon"]), [
222
+ [$, Q.value]
217
223
  ]),
218
- N(ee(B, {
224
+ O(Z(I, {
219
225
  modelValue: c.value,
220
- "onUpdate:modelValue": t[0] || (t[0] = (g) => c.value = g),
226
+ "onUpdate:modelValue": t[0] || (t[0] = (B) => c.value = B),
221
227
  label: a.editModeText
222
228
  }, null, 8, ["modelValue", "label"]), [
223
- [O, W.value]
229
+ [$, W.value]
224
230
  ])
225
231
  ], 512), [
226
- [O, ie.value]
232
+ [$, ie.value]
227
233
  ]),
228
- d.value ? w("", !0) : (f(), M("div", Ee, [
229
- m.value ? (f(), M("div", Ue, [
230
- k.value ? (f(), L(X, {
234
+ d.value ? y("", !0) : (h(), N("div", _e, [
235
+ p.value ? (h(), N("div", we, [
236
+ k.value ? (h(), T(X, {
231
237
  key: 0,
232
238
  code: v.value,
233
239
  quick: "",
234
240
  palette: v.value === 200 ? "success" : "danger",
235
241
  "can-close": "",
236
- onClose: t[1] || (t[1] = (g) => k.value = !1)
237
- }, null, 8, ["code", "palette"])) : w("", !0),
238
- V(a.$slots, "item", {
242
+ onClose: t[1] || (t[1] = (B) => k.value = !1)
243
+ }, null, 8, ["code", "palette"])) : y("", !0),
244
+ L(a.$slots, "item", {
239
245
  item: r.value,
240
246
  loading: d.value,
241
247
  editMode: c.value,
242
248
  isCreate: o.value,
243
249
  canUpdate: C.value,
244
- canDrop: b.value,
245
- itemBeingEdited: J.value
250
+ canDrop: D.value,
251
+ itemBeingEdited: K.value
246
252
  })
247
- ])) : (f(), L(X, {
253
+ ])) : (h(), T(X, {
248
254
  key: 1,
249
255
  code: v.value
250
256
  }, null, 8, ["code"]))
251
257
  ])),
252
- d.value ? (f(), L(ce, { key: 2 })) : w("", !0)
258
+ d.value ? (h(), T(se, { key: 2 })) : y("", !0)
253
259
  ]);
254
260
  };
255
261
  }
256
- }), Fe = {
257
- install: (l, p = {}) => {
258
- l.component("lkt-item-crud") === void 0 && l.component("lkt-item-crud", Re);
262
+ }), Te = {
263
+ install: (l, f = {}) => {
264
+ l.component("lkt-item-crud") === void 0 && l.component("lkt-item-crud", Ie);
259
265
  }
260
266
  };
261
267
  export {
262
- $e as debugLktItemCrud,
263
- Fe as default
268
+ Oe as debugLktItemCrud,
269
+ Te as default
264
270
  };
@@ -5,7 +5,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
5
5
  title: string;
6
6
  editModeText: string;
7
7
  saveText: string;
8
+ saveIcon: string;
8
9
  dropText: string;
10
+ dropIcon: string;
9
11
  hiddenSave: boolean;
10
12
  hiddenDrop: boolean;
11
13
  hiddenButtons: boolean;
@@ -97,7 +99,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
97
99
  title: string;
98
100
  editModeText: string;
99
101
  saveText: string;
102
+ saveIcon: string;
100
103
  dropText: string;
104
+ dropIcon: string;
101
105
  hiddenSave: boolean;
102
106
  hiddenDrop: boolean;
103
107
  hiddenButtons: boolean;
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .lkt-item-crud{display:flex;flex-direction:column;gap:var(--gap)}.lkt-item-crud_content{display:flex;flex-direction:column;gap:15px}.lkt-item-crud-buttons{position:sticky;top:calc(-1 * var(--gap));display:flex;align-items:center;gap:var(--gap);transition:all linear .15s;background:transparent;z-index:2}.lkt-item-crud-buttons>:last-child{margin-left:auto}
1
+ .lkt-item-crud{display:flex;flex-direction:column;gap:var(--lkt-item-crud-gap)}.lkt-item-crud_content{display:flex;flex-direction:column;gap:15px}.lkt-item-crud-buttons{position:sticky;top:calc(-1 * var(--lkt-item-crud-gap));display:flex;align-items:center;gap:var(--lkt-item-crud-gap-buttons);transition:all linear .15s;background:transparent;z-index:2}.lkt-item-crud-buttons>:last-child{margin-left:auto}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lkt-item-crud",
3
- "version": "1.1.24",
3
+ "version": "1.1.25",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "module": "./dist/build.js",
@@ -12,7 +12,9 @@ const props = withDefaults(defineProps<{
12
12
  title: string
13
13
  editModeText: string
14
14
  saveText: string
15
+ saveIcon: string
15
16
  dropText: string
17
+ dropIcon: string
16
18
  hiddenSave: boolean
17
19
  hiddenDrop: boolean
18
20
  hiddenButtons: boolean
@@ -370,6 +372,8 @@ const showDropButton = computed(() => {
370
372
  v-bind:confirm-data="dropConfirmData"
371
373
  v-bind:resource="dropResource"
372
374
  v-bind:resource-data="dropData"
375
+ :text="slots['button-drop'] ? '' : dropText"
376
+ :icon="slots['button-drop'] ? '' : dropIcon"
373
377
  v-on:loading="onButtonLoading"
374
378
  v-on:loaded="onButtonLoaded"
375
379
  v-on:click="onDrop">
@@ -378,7 +382,6 @@ const showDropButton = computed(() => {
378
382
  v-bind:is-create="createMode"
379
383
  v-bind:can-update="canUpdate"
380
384
  v-bind:can-drop="canDrop"></slot>
381
- <span v-else>{{ dropText }}</span>
382
385
  </lkt-button>
383
386
 
384
387
  <lkt-button
@@ -390,6 +393,8 @@ const showDropButton = computed(() => {
390
393
  v-bind:confirm-data="confirmData"
391
394
  v-bind:resource="saveResource"
392
395
  v-bind:resource-data="saveData"
396
+ :text="slots['button-save'] ? '' : saveText"
397
+ :icon="slots['button-save'] ? '' : saveIcon"
393
398
  v-on:loading="onButtonLoading"
394
399
  v-on:loaded="onButtonLoaded"
395
400
  v-on:click="onSave">
@@ -398,7 +403,6 @@ const showDropButton = computed(() => {
398
403
  v-bind:is-create="createMode"
399
404
  v-bind:can-update="canUpdate"
400
405
  v-bind:can-drop="canDrop"></slot>
401
- <span v-else>{{ saveText }}</span>
402
406
  </lkt-button>
403
407
 
404
408
  <lkt-field-switch