ablok-components 0.3.70 → 0.3.73
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.
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { defineComponent as _, computed as ee, ref as te, watch as P, nextTick as ae, reactive as y, openBlock as
|
|
1
|
+
import { defineComponent as _, computed as ee, ref as te, watch as P, nextTick as ae, reactive as y, openBlock as d, createElementBlock as h, unref as oe, createCommentVNode as O, createElementVNode as i, createVNode as c, withCtx as p, createBlock as f, normalizeStyle as v, withModifiers as N, Fragment as W, createTextVNode as L, renderList as le } from "vue";
|
|
2
2
|
import { uniqueId as H } from "../../../utilities/helpers.js";
|
|
3
3
|
import { sanitizeHtml as ne } from "../../../composables/useSanitize.js";
|
|
4
4
|
import se from "../../templates/sortable-list/sortable-list.vue.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import
|
|
6
|
+
import j from "../../molecules/file-upload/file-upload.vue.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import
|
|
8
|
+
import A from "../../molecules/image-upload/image-upload.vue.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import
|
|
10
|
+
import z from "../../molecules/input-dropdown/input-dropdown.vue.js";
|
|
11
11
|
/* empty css */
|
|
12
|
-
import
|
|
12
|
+
import b from "../../atoms/svg-icon/svg-icon.vue.js";
|
|
13
13
|
/* empty css */
|
|
14
|
-
import
|
|
14
|
+
import R from "../../templates/popover-dialog/popover-dialog.vue.js";
|
|
15
15
|
/* empty css */
|
|
16
|
-
const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "preset-uploader__list" }, ce = ["
|
|
16
|
+
const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "preset-uploader__list" }, ce = ["popovertarget"], ue = ["src"], pe = ["onClick"], re = { class: "preset-uploader__popover p-2 d-flex gap-2 align-items-start" }, he = ["popovertarget"], fe = ["src"], be = { class: "d-flex flex-column gap-2" }, ye = {
|
|
17
17
|
role: "button",
|
|
18
18
|
class: "btn btn-sm w-100 d-inline-flex align-items-center"
|
|
19
|
-
},
|
|
19
|
+
}, ge = {
|
|
20
20
|
role: "button",
|
|
21
21
|
class: "btn btn-sm w-100 d-inline-flex align-items-center"
|
|
22
|
-
},
|
|
22
|
+
}, ve = {
|
|
23
23
|
key: 1,
|
|
24
24
|
class: "preset-group border border-2 rounded d-flex gap-1 p-1"
|
|
25
|
-
},
|
|
25
|
+
}, $e = ["popovertarget"], Ve = ["src"], ke = ["src"], we = ["onClick"], Te = { class: "preset-uploader__popover p-2 d-flex gap-2 align-items-start" }, Ue = ["popovertarget"], Se = ["src"], ze = { class: "d-flex flex-column gap-2" }, Ie = {
|
|
26
26
|
role: "button",
|
|
27
|
-
class: "
|
|
28
|
-
},
|
|
27
|
+
class: "img-thumbnail text-dark d-flex justify-content-center align-items-center"
|
|
28
|
+
}, Fe = {
|
|
29
29
|
role: "button",
|
|
30
|
-
class: "
|
|
31
|
-
},
|
|
30
|
+
class: "img-thumbnail text-dark d-flex justify-content-center align-items-center"
|
|
31
|
+
}, Pe = { class: "preset-uploader__popover p-2 d-flex gap-2 align-items-start" }, Oe = ["onClick"], Ne = {
|
|
32
32
|
role: "button",
|
|
33
33
|
class: "img-thumbnail d-flex justify-content-center align-items-center"
|
|
34
|
-
},
|
|
34
|
+
}, je = {
|
|
35
35
|
role: "button",
|
|
36
|
-
class: "img-thumbnail d-flex justify-content-center align-items-center"
|
|
37
|
-
},
|
|
36
|
+
class: "img-thumbnail text-dark d-flex justify-content-center align-items-center"
|
|
37
|
+
}, Xe = /* @__PURE__ */ _({
|
|
38
38
|
__name: "preset-uploader",
|
|
39
39
|
props: {
|
|
40
40
|
modelValue: {
|
|
@@ -125,7 +125,7 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
|
|
|
125
125
|
},
|
|
126
126
|
emits: ["update:modelValue"],
|
|
127
127
|
setup(e, { emit: q }) {
|
|
128
|
-
const
|
|
128
|
+
const m = e, r = q;
|
|
129
129
|
function E(t) {
|
|
130
130
|
return t?.type === "preset";
|
|
131
131
|
}
|
|
@@ -133,32 +133,32 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
|
|
|
133
133
|
if (t.includes("data:image"))
|
|
134
134
|
return t.includes("data:image/svg") ? "Svg" : "Image";
|
|
135
135
|
const o = t.split(".").pop()?.split("?")[0]?.toLowerCase() ?? "";
|
|
136
|
-
return
|
|
136
|
+
return m.mediaTypeMap[o] ?? "";
|
|
137
137
|
}
|
|
138
|
-
const
|
|
138
|
+
const C = ee({
|
|
139
139
|
get() {
|
|
140
|
-
return
|
|
140
|
+
return m.modelValue;
|
|
141
141
|
},
|
|
142
142
|
set(t) {
|
|
143
|
-
|
|
143
|
+
r("update:modelValue", t);
|
|
144
144
|
}
|
|
145
145
|
}), g = te("");
|
|
146
146
|
P(g, async (t, o) => {
|
|
147
147
|
if (t && o !== t) {
|
|
148
148
|
const n = {
|
|
149
149
|
src: t,
|
|
150
|
-
name: `${
|
|
150
|
+
name: `${m.name}-${m.modelValue.length}`,
|
|
151
151
|
mediaType: T(t)
|
|
152
152
|
};
|
|
153
|
-
|
|
153
|
+
m.type && m.typeOptions.includes(m.type) && (n.type = m.type), r("update:modelValue", [...m.modelValue, n]), await ae(), g.value = "";
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
|
-
const
|
|
156
|
+
const $ = y({}), V = y({}), U = y({}), k = y({}), S = y({}), w = y({}), B = y({});
|
|
157
157
|
P(S, (t) => {
|
|
158
158
|
for (const [o, n] of Object.entries(t))
|
|
159
159
|
if (!n) {
|
|
160
160
|
const a = Number(o);
|
|
161
|
-
delete
|
|
161
|
+
delete $[a], delete V[a];
|
|
162
162
|
}
|
|
163
163
|
}, { deep: !0 }), P(w, (t) => {
|
|
164
164
|
for (const [o, n] of Object.entries(t))
|
|
@@ -167,32 +167,32 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
|
|
|
167
167
|
delete U[a], delete k[a];
|
|
168
168
|
}
|
|
169
169
|
}, { deep: !0 });
|
|
170
|
-
function
|
|
171
|
-
o && (
|
|
170
|
+
function M(t, o) {
|
|
171
|
+
o && ($[t] = o);
|
|
172
172
|
}
|
|
173
173
|
function D(t, o) {
|
|
174
174
|
o && (U[t] = o, w[t] = !0);
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
const o = [...
|
|
178
|
-
o.splice(t, 1),
|
|
176
|
+
function I(t) {
|
|
177
|
+
const o = [...m.modelValue];
|
|
178
|
+
o.splice(t, 1), r("update:modelValue", o);
|
|
179
179
|
}
|
|
180
180
|
function K(t, o) {
|
|
181
|
-
|
|
181
|
+
r("update:modelValue", m.modelValue.map(
|
|
182
182
|
(n, a) => a === t ? { ...n, type: o } : n
|
|
183
183
|
));
|
|
184
184
|
}
|
|
185
185
|
function G(t, o, n) {
|
|
186
|
-
const a =
|
|
187
|
-
|
|
186
|
+
const a = m.modelValue[t];
|
|
187
|
+
r("update:modelValue", m.modelValue.map(
|
|
188
188
|
(l, s) => s === t ? { ...l, items: { ...l.items, [o]: { ...a.items[o], type: n } } } : l
|
|
189
189
|
));
|
|
190
190
|
}
|
|
191
191
|
function J(t, o) {
|
|
192
|
-
|
|
192
|
+
V[t] = o, Q(t);
|
|
193
193
|
}
|
|
194
194
|
function Q(t) {
|
|
195
|
-
const o =
|
|
195
|
+
const o = m.modelValue[t], n = o.type || m.type || "item", a = $[t], l = V[t], s = {
|
|
196
196
|
type: "preset",
|
|
197
197
|
items: {
|
|
198
198
|
[n]: {
|
|
@@ -209,7 +209,7 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
|
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
};
|
|
212
|
-
delete
|
|
212
|
+
delete $[t], delete V[t], S[t] = !1, r("update:modelValue", m.modelValue.map(
|
|
213
213
|
(u, F) => F === t ? s : u
|
|
214
214
|
));
|
|
215
215
|
}
|
|
@@ -217,7 +217,7 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
|
|
|
217
217
|
k[t] = o, Y(t);
|
|
218
218
|
}
|
|
219
219
|
function Y(t) {
|
|
220
|
-
const o = U[t], n = k[t], a =
|
|
220
|
+
const o = U[t], n = k[t], a = m.modelValue[t], l = {
|
|
221
221
|
...a,
|
|
222
222
|
items: {
|
|
223
223
|
...a.items,
|
|
@@ -229,79 +229,94 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
|
-
delete U[t], delete k[t], w[t] = !1,
|
|
232
|
+
delete U[t], delete k[t], w[t] = !1, r("update:modelValue", m.modelValue.map(
|
|
233
233
|
(s, u) => u === t ? l : s
|
|
234
234
|
));
|
|
235
235
|
}
|
|
236
236
|
function Z(t, o) {
|
|
237
|
-
const n =
|
|
237
|
+
const n = m.modelValue[t], a = Object.keys(n.items).filter((l) => l !== o);
|
|
238
238
|
if (a.length <= 1) {
|
|
239
239
|
const l = a[0], s = l ? n.items[l] : null;
|
|
240
240
|
if (s) {
|
|
241
241
|
const u = {
|
|
242
242
|
src: s.src,
|
|
243
|
-
name: `${
|
|
243
|
+
name: `${m.name}-${t}`,
|
|
244
244
|
type: s.type,
|
|
245
245
|
mediaType: s.mediaType
|
|
246
246
|
};
|
|
247
|
-
|
|
247
|
+
r("update:modelValue", m.modelValue.map(
|
|
248
248
|
(F, x) => x === t ? u : F
|
|
249
249
|
));
|
|
250
250
|
} else
|
|
251
|
-
|
|
251
|
+
I(t);
|
|
252
252
|
} else {
|
|
253
253
|
const l = { ...n.items };
|
|
254
|
-
delete l[o],
|
|
254
|
+
delete l[o], r("update:modelValue", m.modelValue.map(
|
|
255
255
|
(s, u) => u === t ? { ...n, items: l } : s
|
|
256
256
|
));
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
return (t, o) => (
|
|
260
|
-
e.label ? (
|
|
259
|
+
return (t, o) => (d(), h("div", ie, [
|
|
260
|
+
e.label ? (d(), h("label", {
|
|
261
261
|
key: 0,
|
|
262
262
|
innerHTML: oe(ne)(e.label)
|
|
263
263
|
}, null, 8, me)) : O("", !0),
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
modelValue:
|
|
267
|
-
"onUpdate:modelValue": o[2] || (o[2] = (n) =>
|
|
264
|
+
i("div", de, [
|
|
265
|
+
c(se, {
|
|
266
|
+
modelValue: C.value,
|
|
267
|
+
"onUpdate:modelValue": o[2] || (o[2] = (n) => C.value = n),
|
|
268
268
|
vertical: !1,
|
|
269
269
|
class: "mb-3"
|
|
270
270
|
}, {
|
|
271
271
|
"list-item": p(({ item: n, index: a }) => [
|
|
272
|
-
E(n) ? (
|
|
273
|
-
(
|
|
272
|
+
E(n) ? (d(), h("div", ve, [
|
|
273
|
+
(d(!0), h(W, null, le(n.items, (l, s) => (d(), h("div", {
|
|
274
274
|
key: s,
|
|
275
275
|
class: "img-container",
|
|
276
276
|
style: v(e.showTypeDropdown ? { anchorName: `--${e.name}-si-${a}-${s}` } : {})
|
|
277
277
|
}, [
|
|
278
|
-
|
|
278
|
+
e.showTypeDropdown ? (d(), h("button", {
|
|
279
|
+
key: 0,
|
|
280
|
+
class: "img-trigger",
|
|
281
|
+
popovertarget: `${e.name}-si-${a}-${s}`
|
|
282
|
+
}, [
|
|
283
|
+
i("img", {
|
|
284
|
+
src: l.thumbnail || l.src,
|
|
285
|
+
class: "img-thumbnail border-0 p-0"
|
|
286
|
+
}, null, 8, Ve)
|
|
287
|
+
], 8, $e)) : (d(), h("img", {
|
|
288
|
+
key: 1,
|
|
279
289
|
src: l.thumbnail || l.src,
|
|
280
290
|
class: "img-thumbnail border-0 p-0"
|
|
281
|
-
}, null, 8,
|
|
282
|
-
|
|
291
|
+
}, null, 8, ke)),
|
|
292
|
+
i("button", {
|
|
283
293
|
onClick: N((u) => Z(a, String(s)), ["prevent"]),
|
|
284
294
|
class: "btn btn--close"
|
|
285
295
|
}, [
|
|
286
|
-
|
|
287
|
-
], 8,
|
|
288
|
-
e.showTypeDropdown ? (
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
},
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
296
|
+
c(b, { symbol: "x" })
|
|
297
|
+
], 8, we),
|
|
298
|
+
e.showTypeDropdown ? (d(), f(R, {
|
|
299
|
+
key: 2,
|
|
300
|
+
id: `${e.name}-si-${a}-${s}`,
|
|
301
|
+
modelValue: B[`${a}-${s}`],
|
|
302
|
+
"onUpdate:modelValue": (u) => B[`${a}-${s}`] = u,
|
|
303
|
+
class: "preset-uploader__item-popover",
|
|
304
|
+
style: v({ positionAnchor: `--${e.name}-si-${a}-${s}` })
|
|
305
|
+
}, {
|
|
306
|
+
default: p(() => [
|
|
307
|
+
i("div", Te, [
|
|
308
|
+
i("button", {
|
|
309
|
+
class: "img-trigger",
|
|
310
|
+
popovertarget: `${e.name}-si-${a}-${s}`,
|
|
311
|
+
popovertargetaction: "hide"
|
|
312
|
+
}, [
|
|
313
|
+
i("img", {
|
|
314
|
+
src: l.thumbnail || l.src,
|
|
315
|
+
class: "img-thumbnail"
|
|
316
|
+
}, null, 8, Se)
|
|
317
|
+
], 8, Ue),
|
|
318
|
+
i("div", ze, [
|
|
319
|
+
c(z, {
|
|
305
320
|
name: `${e.name}-si-type-${a}-${s}`,
|
|
306
321
|
options: e.typeOptions,
|
|
307
322
|
"model-value": l.type || null,
|
|
@@ -309,16 +324,16 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
|
|
|
309
324
|
"onUpdate:modelValue": (u) => G(a, String(s), u)
|
|
310
325
|
}, null, 8, ["name", "options", "model-value", "onUpdate:modelValue"])
|
|
311
326
|
])
|
|
312
|
-
])
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
327
|
+
])
|
|
328
|
+
]),
|
|
329
|
+
_: 2
|
|
330
|
+
}, 1032, ["id", "modelValue", "onUpdate:modelValue", "style"])) : O("", !0)
|
|
316
331
|
], 4))), 128)),
|
|
317
|
-
|
|
332
|
+
i("div", {
|
|
318
333
|
class: "img-container img-container--add",
|
|
319
334
|
style: v({ anchorName: `--${e.name}-ap-${a}` })
|
|
320
335
|
}, [
|
|
321
|
-
e.useImageUpload ? (
|
|
336
|
+
e.useImageUpload ? (d(), f(A, {
|
|
322
337
|
key: 0,
|
|
323
338
|
src: "",
|
|
324
339
|
endpoint: e.endpoint,
|
|
@@ -335,12 +350,12 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
|
|
|
335
350
|
"onUpdate:src": (l) => D(a, l)
|
|
336
351
|
}, {
|
|
337
352
|
button: p(() => [
|
|
338
|
-
|
|
339
|
-
|
|
353
|
+
i("span", Ie, [
|
|
354
|
+
c(b, { symbol: "plus" })
|
|
340
355
|
])
|
|
341
356
|
]),
|
|
342
357
|
_: 1
|
|
343
|
-
}, 8, ["endpoint", "custom-fetch", "to-data-url", "auth-token", "disabled", "base-response-path", "accept", "max-file-size", "max-image-width", "aspect-ratio", "onUpdate:src"])) : (
|
|
358
|
+
}, 8, ["endpoint", "custom-fetch", "to-data-url", "auth-token", "disabled", "base-response-path", "accept", "max-file-size", "max-image-width", "aspect-ratio", "onUpdate:src"])) : (d(), f(j, {
|
|
344
359
|
key: 1,
|
|
345
360
|
src: "",
|
|
346
361
|
multiple: !1,
|
|
@@ -355,13 +370,13 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
|
|
|
355
370
|
"onUpdate:src": (l) => D(a, l)
|
|
356
371
|
}, {
|
|
357
372
|
button: p(() => [
|
|
358
|
-
|
|
359
|
-
|
|
373
|
+
i("span", Fe, [
|
|
374
|
+
c(b, { symbol: "plus" })
|
|
360
375
|
])
|
|
361
376
|
]),
|
|
362
377
|
_: 1
|
|
363
378
|
}, 8, ["endpoint", "custom-fetch", "to-data-url", "auth-token", "disabled", "base-response-path", "accept", "max-file-size", "onUpdate:src"])),
|
|
364
|
-
|
|
379
|
+
c(R, {
|
|
365
380
|
id: `${e.name}-ap-${a}`,
|
|
366
381
|
modelValue: w[a],
|
|
367
382
|
"onUpdate:modelValue": (l) => w[a] = l,
|
|
@@ -369,8 +384,9 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
|
|
|
369
384
|
style: v({ positionAnchor: `--${e.name}-ap-${a}` })
|
|
370
385
|
}, {
|
|
371
386
|
default: p(() => [
|
|
372
|
-
|
|
373
|
-
|
|
387
|
+
i("div", Pe, [
|
|
388
|
+
c(z, {
|
|
389
|
+
class: "mb-0",
|
|
374
390
|
name: `${e.name}-add-type-${a}`,
|
|
375
391
|
options: e.typeOptions,
|
|
376
392
|
"model-value": k[a] || null,
|
|
@@ -382,104 +398,115 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
|
|
|
382
398
|
_: 2
|
|
383
399
|
}, 1032, ["id", "modelValue", "onUpdate:modelValue", "style"])
|
|
384
400
|
], 4),
|
|
385
|
-
|
|
386
|
-
onClick: N((l) =>
|
|
401
|
+
i("button", {
|
|
402
|
+
onClick: N((l) => I(a), ["prevent"]),
|
|
387
403
|
class: "btn btn--close btn--close-preset"
|
|
388
404
|
}, [
|
|
389
|
-
|
|
390
|
-
], 8,
|
|
391
|
-
])) : (
|
|
405
|
+
c(b, { symbol: "x" })
|
|
406
|
+
], 8, Oe)
|
|
407
|
+
])) : (d(), h("div", {
|
|
392
408
|
key: 0,
|
|
393
409
|
class: "img-container",
|
|
394
410
|
style: v({ anchorName: `--${e.name}-pp-${a}` })
|
|
395
411
|
}, [
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
class: "img-thumbnail"
|
|
399
|
-
}, null, 8, ce),
|
|
400
|
-
m("button", {
|
|
401
|
-
onClick: N((l) => z(a), ["prevent"]),
|
|
402
|
-
class: "btn btn--close"
|
|
403
|
-
}, [
|
|
404
|
-
d(r, { symbol: "x" })
|
|
405
|
-
], 8, ue),
|
|
406
|
-
m("button", {
|
|
407
|
-
class: "btn btn--action",
|
|
412
|
+
i("button", {
|
|
413
|
+
class: "img-trigger",
|
|
408
414
|
popovertarget: `${e.name}-pp-${a}`
|
|
409
415
|
}, [
|
|
410
|
-
|
|
416
|
+
i("img", {
|
|
417
|
+
src: n.thumbnail || n.src,
|
|
418
|
+
class: "img-thumbnail"
|
|
419
|
+
}, null, 8, ue)
|
|
420
|
+
], 8, ce),
|
|
421
|
+
i("button", {
|
|
422
|
+
onClick: N((l) => I(a), ["prevent"]),
|
|
423
|
+
class: "btn btn--close"
|
|
424
|
+
}, [
|
|
425
|
+
c(b, { symbol: "x" })
|
|
411
426
|
], 8, pe),
|
|
412
|
-
|
|
427
|
+
c(R, {
|
|
413
428
|
id: `${e.name}-pp-${a}`,
|
|
414
429
|
modelValue: S[a],
|
|
415
430
|
"onUpdate:modelValue": (l) => S[a] = l,
|
|
416
|
-
class: "preset-
|
|
431
|
+
class: "preset-uploader__item-popover",
|
|
417
432
|
style: v({ positionAnchor: `--${e.name}-pp-${a}` })
|
|
418
433
|
}, {
|
|
419
434
|
default: p(() => [
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
"model-value": $[a] || null,
|
|
434
|
-
placeholder: "new layer type",
|
|
435
|
-
"onUpdate:modelValue": (l) => J(a, l)
|
|
436
|
-
}, null, 8, ["name", "options", "model-value", "onUpdate:modelValue"])) : (c(), f(j, { key: 1 }, [
|
|
437
|
-
e.useImageUpload ? (c(), h(R, {
|
|
435
|
+
i("div", re, [
|
|
436
|
+
i("button", {
|
|
437
|
+
class: "img-trigger",
|
|
438
|
+
popovertarget: `${e.name}-pp-${a}`,
|
|
439
|
+
popovertargetaction: "hide"
|
|
440
|
+
}, [
|
|
441
|
+
i("img", {
|
|
442
|
+
src: n.thumbnail || n.src,
|
|
443
|
+
class: "img-thumbnail"
|
|
444
|
+
}, null, 8, fe)
|
|
445
|
+
], 8, he),
|
|
446
|
+
i("div", be, [
|
|
447
|
+
e.showTypeDropdown ? (d(), f(z, {
|
|
438
448
|
key: 0,
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
"
|
|
442
|
-
"
|
|
443
|
-
"
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
"
|
|
450
|
-
"
|
|
451
|
-
"onUpdate:
|
|
452
|
-
}, {
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
449
|
+
name: `${e.name}-type-${a}`,
|
|
450
|
+
options: e.typeOptions,
|
|
451
|
+
"model-value": n.type || null,
|
|
452
|
+
placeholder: "item type",
|
|
453
|
+
"onUpdate:modelValue": (l) => K(a, l)
|
|
454
|
+
}, null, 8, ["name", "options", "model-value", "onUpdate:modelValue"])) : O("", !0),
|
|
455
|
+
$[a] ? (d(), f(z, {
|
|
456
|
+
key: 2,
|
|
457
|
+
name: `${e.name}-promote-type-${a}`,
|
|
458
|
+
options: e.typeOptions,
|
|
459
|
+
"model-value": V[a] || null,
|
|
460
|
+
placeholder: "new layer type",
|
|
461
|
+
"onUpdate:modelValue": (l) => J(a, l)
|
|
462
|
+
}, null, 8, ["name", "options", "model-value", "onUpdate:modelValue"])) : (d(), h(W, { key: 1 }, [
|
|
463
|
+
e.useImageUpload ? (d(), f(A, {
|
|
464
|
+
key: 0,
|
|
465
|
+
src: "",
|
|
466
|
+
endpoint: e.endpoint,
|
|
467
|
+
"custom-fetch": e.customFetch,
|
|
468
|
+
"to-data-url": !e.endpoint,
|
|
469
|
+
"auth-token": e.authToken,
|
|
470
|
+
disabled: e.disabled,
|
|
471
|
+
"base-response-path": e.baseResponsePath,
|
|
472
|
+
accept: e.accept,
|
|
473
|
+
"max-file-size": e.maxFileSize,
|
|
474
|
+
"max-image-width": e.maxImageWidth,
|
|
475
|
+
"enable-preview": !1,
|
|
476
|
+
"aspect-ratio": e.aspectRatio,
|
|
477
|
+
"onUpdate:src": (l) => M(a, l)
|
|
478
|
+
}, {
|
|
479
|
+
button: p(() => [
|
|
480
|
+
i("span", ye, [
|
|
481
|
+
c(b, { symbol: "plus" }),
|
|
482
|
+
o[3] || (o[3] = L(" Add layer", -1))
|
|
483
|
+
])
|
|
484
|
+
]),
|
|
485
|
+
_: 1
|
|
486
|
+
}, 8, ["endpoint", "custom-fetch", "to-data-url", "auth-token", "disabled", "base-response-path", "accept", "max-file-size", "max-image-width", "aspect-ratio", "onUpdate:src"])) : (d(), f(j, {
|
|
487
|
+
key: 1,
|
|
488
|
+
src: "",
|
|
489
|
+
multiple: !1,
|
|
490
|
+
endpoint: e.endpoint,
|
|
491
|
+
"custom-fetch": e.customFetch,
|
|
492
|
+
"to-data-url": !e.endpoint,
|
|
493
|
+
"auth-token": e.authToken,
|
|
494
|
+
disabled: e.disabled,
|
|
495
|
+
"base-response-path": e.baseResponsePath,
|
|
496
|
+
accept: e.accept,
|
|
497
|
+
"max-file-size": e.maxFileSize,
|
|
498
|
+
"onUpdate:src": (l) => M(a, l)
|
|
499
|
+
}, {
|
|
500
|
+
button: p(() => [
|
|
501
|
+
i("span", ge, [
|
|
502
|
+
c(b, { symbol: "plus" }),
|
|
503
|
+
o[4] || (o[4] = L(" Add layer", -1))
|
|
504
|
+
])
|
|
505
|
+
]),
|
|
506
|
+
_: 1
|
|
507
|
+
}, 8, ["endpoint", "custom-fetch", "to-data-url", "auth-token", "disabled", "base-response-path", "accept", "max-file-size", "onUpdate:src"]))
|
|
508
|
+
], 64))
|
|
509
|
+
])
|
|
483
510
|
])
|
|
484
511
|
]),
|
|
485
512
|
_: 2
|
|
@@ -487,7 +514,7 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
|
|
|
487
514
|
], 4))
|
|
488
515
|
]),
|
|
489
516
|
"list-append": p(() => [
|
|
490
|
-
e.useImageUpload ? (
|
|
517
|
+
e.useImageUpload ? (d(), f(A, {
|
|
491
518
|
key: 0,
|
|
492
519
|
src: g.value,
|
|
493
520
|
"onUpdate:src": o[0] || (o[0] = (n) => g.value = n),
|
|
@@ -504,12 +531,12 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
|
|
|
504
531
|
"aspect-ratio": e.aspectRatio
|
|
505
532
|
}, {
|
|
506
533
|
button: p(() => [
|
|
507
|
-
|
|
508
|
-
|
|
534
|
+
i("span", Ne, [
|
|
535
|
+
c(b, { symbol: "plus" })
|
|
509
536
|
])
|
|
510
537
|
]),
|
|
511
538
|
_: 1
|
|
512
|
-
}, 8, ["src", "endpoint", "custom-fetch", "to-data-url", "auth-token", "disabled", "base-response-path", "accept", "max-file-size", "max-image-width", "aspect-ratio"])) : (
|
|
539
|
+
}, 8, ["src", "endpoint", "custom-fetch", "to-data-url", "auth-token", "disabled", "base-response-path", "accept", "max-file-size", "max-image-width", "aspect-ratio"])) : (d(), f(j, {
|
|
513
540
|
key: 1,
|
|
514
541
|
src: g.value,
|
|
515
542
|
"onUpdate:src": o[1] || (o[1] = (n) => g.value = n),
|
|
@@ -524,8 +551,8 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
|
|
|
524
551
|
"max-file-size": e.maxFileSize
|
|
525
552
|
}, {
|
|
526
553
|
button: p(() => [
|
|
527
|
-
|
|
528
|
-
|
|
554
|
+
i("span", je, [
|
|
555
|
+
c(b, { symbol: "plus" })
|
|
529
556
|
])
|
|
530
557
|
]),
|
|
531
558
|
_: 1
|
|
@@ -538,5 +565,5 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
|
|
|
538
565
|
}
|
|
539
566
|
});
|
|
540
567
|
export {
|
|
541
|
-
|
|
568
|
+
Xe as default
|
|
542
569
|
};
|