ablok-components 0.3.69 → 0.3.72

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.
@@ -112,7 +112,7 @@ declare const _default: import('../../../../vue/dist/vue.esm-bundler.js').Define
112
112
  fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
113
113
  readonly [Symbol.species]: ArrayConstructor;
114
114
  };
115
- default: () => never[];
115
+ default: () => string[];
116
116
  };
117
117
  }>, {}, {}, {}, {}, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, {
118
118
  "update:modelValue": (...args: any[]) => void;
@@ -230,7 +230,7 @@ declare const _default: import('../../../../vue/dist/vue.esm-bundler.js').Define
230
230
  fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
231
231
  readonly [Symbol.species]: ArrayConstructor;
232
232
  };
233
- default: () => never[];
233
+ default: () => string[];
234
234
  };
235
235
  }>> & Readonly<{
236
236
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -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 c, createElementBlock as f, unref as oe, createCommentVNode as O, createElementVNode as m, createVNode as d, withCtx as p, createBlock as h, normalizeStyle as v, withModifiers as N, Fragment as A, createTextVNode as L, renderList as le } from "vue";
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 R from "../../molecules/file-upload/file-upload.vue.js";
6
+ import j from "../../molecules/file-upload/file-upload.vue.js";
7
7
  /* empty css */
8
- import j from "../../molecules/image-upload/image-upload.vue.js";
8
+ import A from "../../molecules/image-upload/image-upload.vue.js";
9
9
  /* empty css */
10
- import I from "../../molecules/input-dropdown/input-dropdown.vue.js";
10
+ import z from "../../molecules/input-dropdown/input-dropdown.vue.js";
11
11
  /* empty css */
12
- import r from "../../atoms/svg-icon/svg-icon.vue.js";
12
+ import b from "../../atoms/svg-icon/svg-icon.vue.js";
13
13
  /* empty css */
14
- import C from "../../templates/popover-dialog/popover-dialog.vue.js";
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 = ["src"], ue = ["onClick"], pe = ["popovertarget"], re = { class: "preset-uploader__popover p-2 d-flex flex-column gap-2" }, be = {
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" }, 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
- }, fe = {
19
+ }, ge = {
20
20
  role: "button",
21
21
  class: "btn btn-sm w-100 d-inline-flex align-items-center"
22
- }, he = {
22
+ }, ve = {
23
23
  key: 1,
24
24
  class: "preset-group border border-2 rounded d-flex gap-1 p-1"
25
- }, ye = ["src"], ge = ["onClick"], ve = ["popovertarget"], Ve = { class: "preset-uploader__popover p-2" }, $e = {
25
+ }, $e = ["popovertarget"], Ve = ["src"], ke = ["src"], we = ["onClick"], Te = { class: "preset-uploader__popover p-2 d-flex gap-2" }, Ue = ["popovertarget"], Se = ["src"], ze = { class: "d-flex flex-column gap-2" }, Ie = {
26
26
  role: "button",
27
- class: "btn img-thumbnail d-flex justify-content-center align-items-center"
28
- }, ke = {
27
+ class: "img-thumbnail text-dark d-flex justify-content-center align-items-center"
28
+ }, Fe = {
29
29
  role: "button",
30
- class: "btn img-thumbnail d-flex justify-content-center align-items-center"
31
- }, we = { class: "preset-uploader__popover p-2" }, Te = ["onClick"], Ue = {
30
+ class: "img-thumbnail text-dark d-flex justify-content-center align-items-center"
31
+ }, Pe = { class: "preset-uploader__popover p-2" }, Oe = ["onClick"], Ne = {
32
32
  role: "button",
33
33
  class: "img-thumbnail d-flex justify-content-center align-items-center"
34
- }, Se = {
34
+ }, je = {
35
35
  role: "button",
36
- class: "img-thumbnail d-flex justify-content-center align-items-center"
37
- }, He = /* @__PURE__ */ _({
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: {
@@ -120,12 +120,12 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
120
120
  },
121
121
  typeOptions: {
122
122
  type: Array,
123
- default: () => []
123
+ default: () => ["background", "overlay", "object"]
124
124
  }
125
125
  },
126
126
  emits: ["update:modelValue"],
127
127
  setup(e, { emit: q }) {
128
- const i = e, b = q;
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 i.mediaTypeMap[o] ?? "";
136
+ return m.mediaTypeMap[o] ?? "";
137
137
  }
138
- const B = ee({
138
+ const C = ee({
139
139
  get() {
140
- return i.modelValue;
140
+ return m.modelValue;
141
141
  },
142
142
  set(t) {
143
- b("update:modelValue", t);
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: `${i.name}-${i.modelValue.length}`,
150
+ name: `${m.name}-${m.modelValue.length}`,
151
151
  mediaType: T(t)
152
152
  };
153
- i.type && (n.type = i.type), b("update:modelValue", [...i.modelValue, n]), await ae(), g.value = "";
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 V = y({}), $ = y({}), U = y({}), k = y({}), S = y({}), w = y({}), M = y({});
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 V[a], delete $[a];
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 W(t, o) {
171
- o && (V[t] = 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 z(t) {
177
- const o = [...i.modelValue];
178
- o.splice(t, 1), b("update:modelValue", o);
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
- b("update:modelValue", i.modelValue.map(
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 = i.modelValue[t];
187
- b("update:modelValue", i.modelValue.map(
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
- $[t] = o, Q(t);
192
+ V[t] = o, Q(t);
193
193
  }
194
194
  function Q(t) {
195
- const o = i.modelValue[t], n = o.type || i.type || "item", a = V[t], l = $[t], s = {
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 V[t], delete $[t], S[t] = !1, b("update:modelValue", i.modelValue.map(
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 = i.modelValue[t], l = {
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, b("update:modelValue", i.modelValue.map(
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 = i.modelValue[t], a = Object.keys(n.items).filter((l) => l !== o);
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: `${i.name}-${t}`,
243
+ name: `${m.name}-${t}`,
244
244
  type: s.type,
245
245
  mediaType: s.mediaType
246
246
  };
247
- b("update:modelValue", i.modelValue.map(
247
+ r("update:modelValue", m.modelValue.map(
248
248
  (F, x) => x === t ? u : F
249
249
  ));
250
250
  } else
251
- z(t);
251
+ I(t);
252
252
  } else {
253
253
  const l = { ...n.items };
254
- delete l[o], b("update:modelValue", i.modelValue.map(
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) => (c(), f("div", ie, [
260
- e.label ? (c(), f("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
- m("div", de, [
265
- d(se, {
266
- modelValue: B.value,
267
- "onUpdate:modelValue": o[2] || (o[2] = (n) => B.value = 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) ? (c(), f("div", he, [
273
- (c(!0), f(A, null, le(n.items, (l, s) => (c(), f("div", {
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
- m("img", {
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, ye),
282
- m("button", {
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
- d(r, { symbol: "x" })
287
- ], 8, ge),
288
- e.showTypeDropdown ? (c(), f(A, { key: 0 }, [
289
- m("button", {
290
- class: "btn btn--action",
291
- popovertarget: `${e.name}-si-${a}-${s}`
292
- }, [
293
- d(r, { symbol: "settings" })
294
- ], 8, ve),
295
- d(C, {
296
- id: `${e.name}-si-${a}-${s}`,
297
- modelValue: M[`${a}-${s}`],
298
- "onUpdate:modelValue": (u) => M[`${a}-${s}`] = u,
299
- class: "preset-uploader__anchor-popover",
300
- style: v({ positionAnchor: `--${e.name}-si-${a}-${s}` })
301
- }, {
302
- default: p(() => [
303
- m("div", Ve, [
304
- d(I, {
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
- _: 2
314
- }, 1032, ["id", "modelValue", "onUpdate:modelValue", "style"])
315
- ], 64)) : O("", !0)
327
+ ])
328
+ ]),
329
+ _: 2
330
+ }, 1032, ["id", "modelValue", "onUpdate:modelValue", "style"])) : O("", !0)
316
331
  ], 4))), 128)),
317
- m("div", {
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 ? (c(), h(j, {
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
- m("span", $e, [
339
- d(r, { symbol: "plus" })
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"])) : (c(), h(R, {
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
- m("span", ke, [
359
- d(r, { symbol: "plus" })
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
- d(C, {
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,8 @@ 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
- m("div", we, [
373
- d(I, {
387
+ i("div", Pe, [
388
+ c(z, {
374
389
  name: `${e.name}-add-type-${a}`,
375
390
  options: e.typeOptions,
376
391
  "model-value": k[a] || null,
@@ -382,104 +397,115 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
382
397
  _: 2
383
398
  }, 1032, ["id", "modelValue", "onUpdate:modelValue", "style"])
384
399
  ], 4),
385
- m("button", {
386
- onClick: N((l) => z(a), ["prevent"]),
400
+ i("button", {
401
+ onClick: N((l) => I(a), ["prevent"]),
387
402
  class: "btn btn--close btn--close-preset"
388
403
  }, [
389
- d(r, { symbol: "x" })
390
- ], 8, Te)
391
- ])) : (c(), f("div", {
404
+ c(b, { symbol: "x" })
405
+ ], 8, Oe)
406
+ ])) : (d(), h("div", {
392
407
  key: 0,
393
408
  class: "img-container",
394
409
  style: v({ anchorName: `--${e.name}-pp-${a}` })
395
410
  }, [
396
- m("img", {
397
- src: n.thumbnail || n.src,
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",
411
+ i("button", {
412
+ class: "img-trigger",
408
413
  popovertarget: `${e.name}-pp-${a}`
409
414
  }, [
410
- d(r, { symbol: "settings" })
415
+ i("img", {
416
+ src: n.thumbnail || n.src,
417
+ class: "img-thumbnail"
418
+ }, null, 8, ue)
419
+ ], 8, ce),
420
+ i("button", {
421
+ onClick: N((l) => I(a), ["prevent"]),
422
+ class: "btn btn--close"
423
+ }, [
424
+ c(b, { symbol: "x" })
411
425
  ], 8, pe),
412
- d(C, {
426
+ c(R, {
413
427
  id: `${e.name}-pp-${a}`,
414
428
  modelValue: S[a],
415
429
  "onUpdate:modelValue": (l) => S[a] = l,
416
- class: "preset-uploader__anchor-popover",
430
+ class: "preset-uploader__item-popover",
417
431
  style: v({ positionAnchor: `--${e.name}-pp-${a}` })
418
432
  }, {
419
433
  default: p(() => [
420
- m("div", re, [
421
- e.showTypeDropdown ? (c(), h(I, {
422
- key: 0,
423
- name: `${e.name}-type-${a}`,
424
- options: e.typeOptions,
425
- "model-value": n.type || null,
426
- placeholder: "item type",
427
- "onUpdate:modelValue": (l) => K(a, l)
428
- }, null, 8, ["name", "options", "model-value", "onUpdate:modelValue"])) : O("", !0),
429
- V[a] ? (c(), h(I, {
430
- key: 2,
431
- name: `${e.name}-promote-type-${a}`,
432
- options: e.typeOptions,
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(A, { key: 1 }, [
437
- e.useImageUpload ? (c(), h(j, {
434
+ i("div", re, [
435
+ i("button", {
436
+ class: "img-trigger",
437
+ popovertarget: `${e.name}-pp-${a}`,
438
+ popovertargetaction: "hide"
439
+ }, [
440
+ i("img", {
441
+ src: n.thumbnail || n.src,
442
+ class: "img-thumbnail"
443
+ }, null, 8, fe)
444
+ ], 8, he),
445
+ i("div", be, [
446
+ e.showTypeDropdown ? (d(), f(z, {
438
447
  key: 0,
439
- src: "",
440
- endpoint: e.endpoint,
441
- "custom-fetch": e.customFetch,
442
- "to-data-url": !e.endpoint,
443
- "auth-token": e.authToken,
444
- disabled: e.disabled,
445
- "base-response-path": e.baseResponsePath,
446
- accept: e.accept,
447
- "max-file-size": e.maxFileSize,
448
- "max-image-width": e.maxImageWidth,
449
- "enable-preview": !1,
450
- "aspect-ratio": e.aspectRatio,
451
- "onUpdate:src": (l) => W(a, l)
452
- }, {
453
- button: p(() => [
454
- m("span", be, [
455
- d(r, { symbol: "plus" }),
456
- o[3] || (o[3] = L(" Add layer", -1))
457
- ])
458
- ]),
459
- _: 1
460
- }, 8, ["endpoint", "custom-fetch", "to-data-url", "auth-token", "disabled", "base-response-path", "accept", "max-file-size", "max-image-width", "aspect-ratio", "onUpdate:src"])) : (c(), h(R, {
461
- key: 1,
462
- src: "",
463
- multiple: !1,
464
- endpoint: e.endpoint,
465
- "custom-fetch": e.customFetch,
466
- "to-data-url": !e.endpoint,
467
- "auth-token": e.authToken,
468
- disabled: e.disabled,
469
- "base-response-path": e.baseResponsePath,
470
- accept: e.accept,
471
- "max-file-size": e.maxFileSize,
472
- "onUpdate:src": (l) => W(a, l)
473
- }, {
474
- button: p(() => [
475
- m("span", fe, [
476
- d(r, { symbol: "plus" }),
477
- o[4] || (o[4] = L(" Add layer", -1))
478
- ])
479
- ]),
480
- _: 1
481
- }, 8, ["endpoint", "custom-fetch", "to-data-url", "auth-token", "disabled", "base-response-path", "accept", "max-file-size", "onUpdate:src"]))
482
- ], 64))
448
+ name: `${e.name}-type-${a}`,
449
+ options: e.typeOptions,
450
+ "model-value": n.type || null,
451
+ placeholder: "item type",
452
+ "onUpdate:modelValue": (l) => K(a, l)
453
+ }, null, 8, ["name", "options", "model-value", "onUpdate:modelValue"])) : O("", !0),
454
+ $[a] ? (d(), f(z, {
455
+ key: 2,
456
+ name: `${e.name}-promote-type-${a}`,
457
+ options: e.typeOptions,
458
+ "model-value": V[a] || null,
459
+ placeholder: "new layer type",
460
+ "onUpdate:modelValue": (l) => J(a, l)
461
+ }, null, 8, ["name", "options", "model-value", "onUpdate:modelValue"])) : (d(), h(W, { key: 1 }, [
462
+ e.useImageUpload ? (d(), f(A, {
463
+ key: 0,
464
+ src: "",
465
+ endpoint: e.endpoint,
466
+ "custom-fetch": e.customFetch,
467
+ "to-data-url": !e.endpoint,
468
+ "auth-token": e.authToken,
469
+ disabled: e.disabled,
470
+ "base-response-path": e.baseResponsePath,
471
+ accept: e.accept,
472
+ "max-file-size": e.maxFileSize,
473
+ "max-image-width": e.maxImageWidth,
474
+ "enable-preview": !1,
475
+ "aspect-ratio": e.aspectRatio,
476
+ "onUpdate:src": (l) => M(a, l)
477
+ }, {
478
+ button: p(() => [
479
+ i("span", ye, [
480
+ c(b, { symbol: "plus" }),
481
+ o[3] || (o[3] = L(" Add layer", -1))
482
+ ])
483
+ ]),
484
+ _: 1
485
+ }, 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, {
486
+ key: 1,
487
+ src: "",
488
+ multiple: !1,
489
+ endpoint: e.endpoint,
490
+ "custom-fetch": e.customFetch,
491
+ "to-data-url": !e.endpoint,
492
+ "auth-token": e.authToken,
493
+ disabled: e.disabled,
494
+ "base-response-path": e.baseResponsePath,
495
+ accept: e.accept,
496
+ "max-file-size": e.maxFileSize,
497
+ "onUpdate:src": (l) => M(a, l)
498
+ }, {
499
+ button: p(() => [
500
+ i("span", ge, [
501
+ c(b, { symbol: "plus" }),
502
+ o[4] || (o[4] = L(" Add layer", -1))
503
+ ])
504
+ ]),
505
+ _: 1
506
+ }, 8, ["endpoint", "custom-fetch", "to-data-url", "auth-token", "disabled", "base-response-path", "accept", "max-file-size", "onUpdate:src"]))
507
+ ], 64))
508
+ ])
483
509
  ])
484
510
  ]),
485
511
  _: 2
@@ -487,7 +513,7 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
487
513
  ], 4))
488
514
  ]),
489
515
  "list-append": p(() => [
490
- e.useImageUpload ? (c(), h(j, {
516
+ e.useImageUpload ? (d(), f(A, {
491
517
  key: 0,
492
518
  src: g.value,
493
519
  "onUpdate:src": o[0] || (o[0] = (n) => g.value = n),
@@ -504,12 +530,12 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
504
530
  "aspect-ratio": e.aspectRatio
505
531
  }, {
506
532
  button: p(() => [
507
- m("span", Ue, [
508
- d(r, { symbol: "plus" })
533
+ i("span", Ne, [
534
+ c(b, { symbol: "plus" })
509
535
  ])
510
536
  ]),
511
537
  _: 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"])) : (c(), h(R, {
538
+ }, 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
539
  key: 1,
514
540
  src: g.value,
515
541
  "onUpdate:src": o[1] || (o[1] = (n) => g.value = n),
@@ -524,8 +550,8 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
524
550
  "max-file-size": e.maxFileSize
525
551
  }, {
526
552
  button: p(() => [
527
- m("span", Se, [
528
- d(r, { symbol: "plus" })
553
+ i("span", je, [
554
+ c(b, { symbol: "plus" })
529
555
  ])
530
556
  ]),
531
557
  _: 1
@@ -538,5 +564,5 @@ const ie = { class: "preset-uploader" }, me = ["innerHTML"], de = { class: "pres
538
564
  }
539
565
  });
540
566
  export {
541
- He as default
567
+ Xe as default
542
568
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ablok-components",
3
3
  "private": false,
4
- "version": "0.3.69",
4
+ "version": "0.3.72",
5
5
  "dependencies": {
6
6
  "date-fns": "^3.0.0",
7
7
  "dompurify": "^3.3.1",