ablok-components 0.3.86 → 0.3.87
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/ablok-components.umd.js +2 -2
- package/dist/components/molecules/base-camera/base-camera.vue.js +147 -146
- package/dist/components/molecules/base-map/base-map.vue.js +49 -49
- package/dist/components/molecules/bulk-upload/bulk-upload.vue.d.ts +39 -0
- package/dist/components/molecules/bulk-upload/bulk-upload.vue.js +88 -64
- package/dist/components/molecules/file-upload/file-upload.vue.d.ts +42 -0
- package/dist/components/molecules/file-upload/file-upload.vue.js +47 -44
- package/package.json +19 -19
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as q, shallowRef as G, ref as C, onMounted as H, markRaw as m, watch as S, computed as
|
|
1
|
+
import { defineComponent as q, shallowRef as G, ref as C, onMounted as H, markRaw as m, watch as S, computed as f, nextTick as J, openBlock as u, createElementBlock as k, renderSlot as K, toDisplayString as w, createCommentVNode as y, createElementVNode as Q, normalizeStyle as X, normalizeClass as ee, createBlock as d, resolveDynamicComponent as p, withCtx as h, Fragment as te, renderList as ae, createTextVNode as U } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
3
|
const le = { class: "base-map" }, ne = {
|
|
4
4
|
key: 0,
|
|
@@ -149,29 +149,29 @@ const le = { class: "base-map" }, ne = {
|
|
|
149
149
|
url: "https://{s}.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}{r}.png",
|
|
150
150
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>'
|
|
151
151
|
}
|
|
152
|
-
}, a = n,
|
|
152
|
+
}, a = n, c = $, s = G(null), L = C(null), M = C(null), z = C(a.zoom), r = C(o(a.modelValue));
|
|
153
153
|
H(async () => {
|
|
154
154
|
if (typeof window > "u")
|
|
155
155
|
return;
|
|
156
156
|
const [e, t] = await Promise.all([
|
|
157
157
|
import("@vue-leaflet/vue-leaflet"),
|
|
158
158
|
import("leaflet")
|
|
159
|
-
]);
|
|
160
|
-
|
|
161
|
-
LCircle: m(
|
|
162
|
-
LMap: m(
|
|
163
|
-
LMarker: m(
|
|
164
|
-
LPopup: m(
|
|
165
|
-
LPolyline: m(
|
|
166
|
-
LTileLayer: m(
|
|
159
|
+
]), l = e.default ?? e, i = t.default ?? t;
|
|
160
|
+
s.value = m({
|
|
161
|
+
LCircle: m(l.LCircle),
|
|
162
|
+
LMap: m(l.LMap),
|
|
163
|
+
LMarker: m(l.LMarker),
|
|
164
|
+
LPopup: m(l.LPopup),
|
|
165
|
+
LPolyline: m(l.LPolyline),
|
|
166
|
+
LTileLayer: m(l.LTileLayer)
|
|
167
167
|
}), L.value = {
|
|
168
|
-
list: v("list",
|
|
169
|
-
selected: v("selected",
|
|
170
|
-
search: v("search",
|
|
171
|
-
user: v("user",
|
|
168
|
+
list: v("list", i.divIcon),
|
|
169
|
+
selected: v("selected", i.divIcon),
|
|
170
|
+
search: v("search", i.divIcon),
|
|
171
|
+
user: v("user", i.divIcon)
|
|
172
172
|
};
|
|
173
173
|
}), S(() => a.zoom, (e) => {
|
|
174
|
-
|
|
174
|
+
z.value = e;
|
|
175
175
|
}), S(() => a.modelValue, (e) => {
|
|
176
176
|
r.value = o(e);
|
|
177
177
|
}), S(() => a.center, (e) => {
|
|
@@ -194,7 +194,7 @@ const le = { class: "base-map" }, ne = {
|
|
|
194
194
|
},
|
|
195
195
|
{ flush: "post" }
|
|
196
196
|
);
|
|
197
|
-
const b =
|
|
197
|
+
const b = f(() => o(a.userLocation)), R = f(() => o(a.selectionRadiusCenter) || r.value), B = f(() => {
|
|
198
198
|
const e = (a.markers || []).map((t) => {
|
|
199
199
|
const l = o(t);
|
|
200
200
|
return l ? {
|
|
@@ -209,15 +209,15 @@ const le = { class: "base-map" }, ne = {
|
|
|
209
209
|
type: "search",
|
|
210
210
|
...r.value
|
|
211
211
|
}), e;
|
|
212
|
-
}), T =
|
|
212
|
+
}), T = f(() => (a.routeCoordinates || []).map((e) => W(e)).filter((e) => !!e)), E = f(() => {
|
|
213
213
|
const e = o(a.center) || r.value || o(a.markers[0]) || N;
|
|
214
214
|
return [e.lat, e.lng];
|
|
215
|
-
}), I =
|
|
215
|
+
}), I = f(() => {
|
|
216
216
|
if (a.tileLayerUrl.trim())
|
|
217
217
|
return a.tileLayerUrl;
|
|
218
218
|
const e = a.mapStyle === "custom" ? "streets" : a.mapStyle;
|
|
219
219
|
return x[e].url;
|
|
220
|
-
}), j =
|
|
220
|
+
}), j = f(() => {
|
|
221
221
|
if (a.tileLayerAttribution.trim())
|
|
222
222
|
return a.tileLayerAttribution;
|
|
223
223
|
const e = a.mapStyle === "custom" ? "streets" : a.mapStyle;
|
|
@@ -247,31 +247,31 @@ const le = { class: "base-map" }, ne = {
|
|
|
247
247
|
}
|
|
248
248
|
function W(e) {
|
|
249
249
|
if (Array.isArray(e)) {
|
|
250
|
-
const l = Number(e[0]),
|
|
251
|
-
return Number.isFinite(l) && Number.isFinite(
|
|
250
|
+
const l = Number(e[0]), i = Number(e[1]);
|
|
251
|
+
return Number.isFinite(l) && Number.isFinite(i) ? [l, i] : null;
|
|
252
252
|
}
|
|
253
253
|
const t = o(e);
|
|
254
254
|
return t ? [t.lat, t.lng] : null;
|
|
255
255
|
}
|
|
256
256
|
function P(e, t) {
|
|
257
|
-
const l = o(e),
|
|
258
|
-
return !l || !
|
|
257
|
+
const l = o(e), i = o(t);
|
|
258
|
+
return !l || !i ? !1 : Math.abs(l.lat - i.lat) < 1e-6 && Math.abs(l.lng - i.lng) < 1e-6;
|
|
259
259
|
}
|
|
260
260
|
async function V() {
|
|
261
|
-
await J(),
|
|
261
|
+
await J(), M.value?.invalidateSize();
|
|
262
262
|
}
|
|
263
263
|
function g(e) {
|
|
264
|
-
|
|
264
|
+
M.value?.panTo([e.lat, e.lng]);
|
|
265
265
|
}
|
|
266
266
|
function D(e) {
|
|
267
|
-
|
|
267
|
+
M.value = e, g(o(a.center) || r.value || N), V();
|
|
268
268
|
}
|
|
269
269
|
function Z(e) {
|
|
270
|
-
|
|
270
|
+
z.value = e, c("update:zoom", e);
|
|
271
271
|
}
|
|
272
272
|
function Y(e) {
|
|
273
273
|
const t = o(e);
|
|
274
|
-
t && (g(t),
|
|
274
|
+
t && (g(t), c("update:center", t));
|
|
275
275
|
}
|
|
276
276
|
function _(e) {
|
|
277
277
|
if (!a.interactive || a.disabled)
|
|
@@ -280,17 +280,17 @@ const le = { class: "base-map" }, ne = {
|
|
|
280
280
|
lat: Number(e.latlng.lat.toFixed(6)),
|
|
281
281
|
lng: Number(e.latlng.lng.toFixed(6))
|
|
282
282
|
};
|
|
283
|
-
r.value = t, g(t),
|
|
283
|
+
r.value = t, g(t), c("update:modelValue", t), c("update:center", t), c("map-click", t);
|
|
284
284
|
}
|
|
285
285
|
function F(e) {
|
|
286
286
|
r.value = {
|
|
287
287
|
lat: Number(e.lat),
|
|
288
288
|
lng: Number(e.lng)
|
|
289
|
-
}, g(r.value),
|
|
289
|
+
}, g(r.value), c("update:modelValue", r.value), c("update:center", r.value), c("marker-click", e);
|
|
290
290
|
}
|
|
291
|
-
return (e, t) => (
|
|
291
|
+
return (e, t) => (u(), k("div", le, [
|
|
292
292
|
K(e.$slots, "label", {}, () => [
|
|
293
|
-
n.label ? (
|
|
293
|
+
n.label ? (u(), k("label", ne, w(n.label), 1)) : y("", !0)
|
|
294
294
|
]),
|
|
295
295
|
Q("div", {
|
|
296
296
|
class: ee(["base-map__frame", {
|
|
@@ -300,11 +300,11 @@ const le = { class: "base-map" }, ne = {
|
|
|
300
300
|
style: X({ height: n.height }),
|
|
301
301
|
"data-testid": "base-map"
|
|
302
302
|
}, [
|
|
303
|
-
|
|
303
|
+
s.value ? (u(), d(p(s.value?.LMap), {
|
|
304
304
|
key: 0,
|
|
305
305
|
class: "base-map__canvas",
|
|
306
306
|
"use-global-leaflet": !1,
|
|
307
|
-
zoom:
|
|
307
|
+
zoom: z.value,
|
|
308
308
|
center: E.value,
|
|
309
309
|
onReady: D,
|
|
310
310
|
onClick: _,
|
|
@@ -312,46 +312,46 @@ const le = { class: "base-map" }, ne = {
|
|
|
312
312
|
"onUpdate:center": Y
|
|
313
313
|
}, {
|
|
314
314
|
default: h(() => [
|
|
315
|
-
(
|
|
315
|
+
(u(), d(p(s.value.LTileLayer), {
|
|
316
316
|
url: I.value,
|
|
317
317
|
attribution: j.value,
|
|
318
318
|
"layer-type": "base",
|
|
319
319
|
name: "OpenStreetMap"
|
|
320
320
|
}, null, 8, ["url", "attribution"])),
|
|
321
|
-
T.value.length > 1 ? (
|
|
321
|
+
T.value.length > 1 ? (u(), d(p(s.value.LPolyline), {
|
|
322
322
|
key: 0,
|
|
323
323
|
"lat-lngs": T.value,
|
|
324
324
|
color: n.routeColor,
|
|
325
325
|
weight: n.routeWeight
|
|
326
|
-
}, null, 8, ["lat-lngs", "color", "weight"])) :
|
|
327
|
-
|
|
326
|
+
}, null, 8, ["lat-lngs", "color", "weight"])) : y("", !0),
|
|
327
|
+
R.value && n.selectionRadius > 0 ? (u(), d(p(s.value.LCircle), {
|
|
328
328
|
key: 1,
|
|
329
|
-
"lat-lng": [
|
|
329
|
+
"lat-lng": [R.value.lat, R.value.lng],
|
|
330
330
|
radius: n.selectionRadius,
|
|
331
331
|
color: n.selectionRadiusColor,
|
|
332
332
|
"fill-color": n.selectionRadiusFillColor,
|
|
333
333
|
"fill-opacity": n.selectionRadiusFillOpacity,
|
|
334
334
|
opacity: n.selectionRadiusOpacity,
|
|
335
335
|
weight: n.selectionRadiusStrokeWeight
|
|
336
|
-
}, null, 8, ["lat-lng", "radius", "color", "fill-color", "fill-opacity", "opacity", "weight"])) :
|
|
337
|
-
(
|
|
338
|
-
key: l.id ?? `${l.lat}-${l.lng}-${
|
|
336
|
+
}, null, 8, ["lat-lng", "radius", "color", "fill-color", "fill-opacity", "opacity", "weight"])) : y("", !0),
|
|
337
|
+
(u(!0), k(te, null, ae(B.value, (l, i) => (u(), d(p(s.value.LMarker), {
|
|
338
|
+
key: l.id ?? `${l.lat}-${l.lng}-${i}`,
|
|
339
339
|
"lat-lng": [l.lat, l.lng],
|
|
340
340
|
icon: O(l.type),
|
|
341
341
|
"z-index-offset": A(l.type),
|
|
342
342
|
onClick: (oe) => F(l)
|
|
343
343
|
}, {
|
|
344
344
|
default: h(() => [
|
|
345
|
-
l.label ? (
|
|
345
|
+
l.label ? (u(), d(p(s.value.LPopup), { key: 0 }, {
|
|
346
346
|
default: h(() => [
|
|
347
347
|
U(w(l.label), 1)
|
|
348
348
|
]),
|
|
349
349
|
_: 2
|
|
350
|
-
}, 1024)) :
|
|
350
|
+
}, 1024)) : y("", !0)
|
|
351
351
|
]),
|
|
352
352
|
_: 2
|
|
353
353
|
}, 1032, ["lat-lng", "icon", "z-index-offset", "onClick"]))), 128)),
|
|
354
|
-
b.value ? (
|
|
354
|
+
b.value ? (u(), d(p(s.value.LMarker), {
|
|
355
355
|
key: `user-${b.value.lat}-${b.value.lng}`,
|
|
356
356
|
"lat-lng": [b.value.lat, b.value.lng],
|
|
357
357
|
icon: O("user"),
|
|
@@ -364,7 +364,7 @@ const le = { class: "base-map" }, ne = {
|
|
|
364
364
|
}))
|
|
365
365
|
}, {
|
|
366
366
|
default: h(() => [
|
|
367
|
-
(
|
|
367
|
+
(u(), d(p(s.value.LPopup), null, {
|
|
368
368
|
default: h(() => [
|
|
369
369
|
U(w(n.userLocationLabel), 1)
|
|
370
370
|
]),
|
|
@@ -372,12 +372,12 @@ const le = { class: "base-map" }, ne = {
|
|
|
372
372
|
}))
|
|
373
373
|
]),
|
|
374
374
|
_: 1
|
|
375
|
-
}, 8, ["lat-lng", "icon", "z-index-offset"])) :
|
|
375
|
+
}, 8, ["lat-lng", "icon", "z-index-offset"])) : y("", !0)
|
|
376
376
|
]),
|
|
377
377
|
_: 1
|
|
378
|
-
}, 40, ["zoom", "center"])) :
|
|
378
|
+
}, 40, ["zoom", "center"])) : y("", !0)
|
|
379
379
|
], 6),
|
|
380
|
-
n.interactive && n.helperText ? (
|
|
380
|
+
n.interactive && n.helperText ? (u(), k("p", re, w(n.helperText), 1)) : y("", !0)
|
|
381
381
|
]));
|
|
382
382
|
}
|
|
383
383
|
});
|
|
@@ -6,29 +6,47 @@ declare const _default: import('../../../../vue/dist/vue.esm-bundler.js').Define
|
|
|
6
6
|
type?: string;
|
|
7
7
|
caption?: string;
|
|
8
8
|
src?: any;
|
|
9
|
+
name?: string;
|
|
10
|
+
size?: number;
|
|
11
|
+
lastModified?: number;
|
|
9
12
|
}[];
|
|
10
13
|
(...items: {
|
|
11
14
|
type?: string;
|
|
12
15
|
caption?: string;
|
|
13
16
|
src?: any;
|
|
17
|
+
name?: string;
|
|
18
|
+
size?: number;
|
|
19
|
+
lastModified?: number;
|
|
14
20
|
}[]): {
|
|
15
21
|
type?: string;
|
|
16
22
|
caption?: string;
|
|
17
23
|
src?: any;
|
|
24
|
+
name?: string;
|
|
25
|
+
size?: number;
|
|
26
|
+
lastModified?: number;
|
|
18
27
|
}[];
|
|
19
28
|
new (arrayLength: number): {
|
|
20
29
|
type?: string;
|
|
21
30
|
caption?: string;
|
|
22
31
|
src?: any;
|
|
32
|
+
name?: string;
|
|
33
|
+
size?: number;
|
|
34
|
+
lastModified?: number;
|
|
23
35
|
}[];
|
|
24
36
|
new (...items: {
|
|
25
37
|
type?: string;
|
|
26
38
|
caption?: string;
|
|
27
39
|
src?: any;
|
|
40
|
+
name?: string;
|
|
41
|
+
size?: number;
|
|
42
|
+
lastModified?: number;
|
|
28
43
|
}[]): {
|
|
29
44
|
type?: string;
|
|
30
45
|
caption?: string;
|
|
31
46
|
src?: any;
|
|
47
|
+
name?: string;
|
|
48
|
+
size?: number;
|
|
49
|
+
lastModified?: number;
|
|
32
50
|
}[];
|
|
33
51
|
isArray(arg: any): arg is any[];
|
|
34
52
|
readonly prototype: any[];
|
|
@@ -64,29 +82,47 @@ declare const _default: import('../../../../vue/dist/vue.esm-bundler.js').Define
|
|
|
64
82
|
type?: string;
|
|
65
83
|
caption?: string;
|
|
66
84
|
src?: any;
|
|
85
|
+
name?: string;
|
|
86
|
+
size?: number;
|
|
87
|
+
lastModified?: number;
|
|
67
88
|
}[];
|
|
68
89
|
(...items: {
|
|
69
90
|
type?: string;
|
|
70
91
|
caption?: string;
|
|
71
92
|
src?: any;
|
|
93
|
+
name?: string;
|
|
94
|
+
size?: number;
|
|
95
|
+
lastModified?: number;
|
|
72
96
|
}[]): {
|
|
73
97
|
type?: string;
|
|
74
98
|
caption?: string;
|
|
75
99
|
src?: any;
|
|
100
|
+
name?: string;
|
|
101
|
+
size?: number;
|
|
102
|
+
lastModified?: number;
|
|
76
103
|
}[];
|
|
77
104
|
new (arrayLength: number): {
|
|
78
105
|
type?: string;
|
|
79
106
|
caption?: string;
|
|
80
107
|
src?: any;
|
|
108
|
+
name?: string;
|
|
109
|
+
size?: number;
|
|
110
|
+
lastModified?: number;
|
|
81
111
|
}[];
|
|
82
112
|
new (...items: {
|
|
83
113
|
type?: string;
|
|
84
114
|
caption?: string;
|
|
85
115
|
src?: any;
|
|
116
|
+
name?: string;
|
|
117
|
+
size?: number;
|
|
118
|
+
lastModified?: number;
|
|
86
119
|
}[]): {
|
|
87
120
|
type?: string;
|
|
88
121
|
caption?: string;
|
|
89
122
|
src?: any;
|
|
123
|
+
name?: string;
|
|
124
|
+
size?: number;
|
|
125
|
+
lastModified?: number;
|
|
90
126
|
}[];
|
|
91
127
|
isArray(arg: any): arg is any[];
|
|
92
128
|
readonly prototype: any[];
|
|
@@ -120,6 +156,9 @@ declare const _default: import('../../../../vue/dist/vue.esm-bundler.js').Define
|
|
|
120
156
|
type?: string;
|
|
121
157
|
caption?: string;
|
|
122
158
|
src?: any;
|
|
159
|
+
name?: string;
|
|
160
|
+
size?: number;
|
|
161
|
+
lastModified?: number;
|
|
123
162
|
}[];
|
|
124
163
|
disabled: boolean;
|
|
125
164
|
}, {}, {}, {}, string, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as x, computed as D, ref as v, resolveComponent as M, openBlock as i, createElementBlock as c, createElementVNode as o, toDisplayString as f, createCommentVNode as h, createVNode as m, withCtx as k, withDirectives as I, vModelText as L, withModifiers as V, nextTick as S } from "vue";
|
|
2
|
+
import U from "../file-upload/file-upload.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
const
|
|
4
|
+
const F = { class: "container" }, H = { class: "row" }, N = { class: "col-12" }, A = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "grid place-items-center text-center text-muted py-5 border border-bottom-0"
|
|
7
|
-
},
|
|
7
|
+
}, E = { class: "m-0" }, j = { class: "preview-item border-bottom p-3" }, q = { class: "d-flex gap-3" }, G = { class: "col-2" }, K = { class: "col" }, R = { class: "file-meta text-muted small mb-2" }, J = { class: "fw-semibold" }, O = { key: 0 }, P = { key: 1 }, Q = ["onUpdate:modelValue", "id"], W = ["innerHTML"], X = { class: "col-auto d-flex flex-column gap-2" }, Y = ["onClick"], Z = ["onClick"], ee = { class: "d-flex align-items-end p-3" }, te = { class: "btn btn-primary btn-sm ms-auto d-flex align-items-center gap-2" }, oe = ["innerHTML"], ae = /* @__PURE__ */ x({
|
|
8
8
|
__name: "bulk-upload",
|
|
9
9
|
props: {
|
|
10
10
|
storeId: String,
|
|
@@ -25,46 +25,63 @@ const S = { class: "container" }, A = { class: "row" }, B = { class: "col-12" },
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
emits: ["update:modelValue"],
|
|
28
|
-
setup(
|
|
29
|
-
const
|
|
28
|
+
setup($, { emit: w }) {
|
|
29
|
+
const b = $, y = w, d = D({
|
|
30
30
|
get: () => {
|
|
31
|
-
const
|
|
32
|
-
return
|
|
31
|
+
const t = b.modelValue || [];
|
|
32
|
+
return u.value = t.map((e) => e.caption || ""), t.map((e) => ({
|
|
33
|
+
type: e.type,
|
|
34
|
+
src: e.src,
|
|
35
|
+
...e.name ? { name: e.name } : {},
|
|
36
|
+
...e.size ? { size: e.size } : {},
|
|
37
|
+
...e.lastModified ? { lastModified: e.lastModified } : {}
|
|
38
|
+
}));
|
|
33
39
|
},
|
|
34
|
-
set: (
|
|
35
|
-
const
|
|
36
|
-
|
|
40
|
+
set: (t) => {
|
|
41
|
+
const e = d.value || [], s = Array.isArray(t) ? t : [], a = s.length <= e.length && s.every((l) => e.some((n) => n.src === l.src));
|
|
42
|
+
p(a ? s : [...e, ...s]);
|
|
37
43
|
}
|
|
38
|
-
}),
|
|
39
|
-
function C(
|
|
40
|
-
const
|
|
41
|
-
|
|
44
|
+
}), g = v(null), r = v({}), u = v({});
|
|
45
|
+
function C(t) {
|
|
46
|
+
const e = [...b.modelValue || []];
|
|
47
|
+
e.splice(t, 1), y("update:modelValue", e);
|
|
42
48
|
}
|
|
43
|
-
async function
|
|
44
|
-
|
|
49
|
+
async function B(t) {
|
|
50
|
+
r.value[t] = !r.value[t], r.value[t] || p(), await S(), g.value?.querySelector(`#caption-${t}`)?.focus();
|
|
45
51
|
}
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
function z(t) {
|
|
53
|
+
if (t == null) return "";
|
|
54
|
+
const e = ["B", "KB", "MB", "GB", "TB"];
|
|
55
|
+
let s = t, a = e.shift();
|
|
56
|
+
for (; s >= 1024 && e.length; )
|
|
57
|
+
s /= 1024, a = e.shift();
|
|
58
|
+
return `${s.toFixed(1)} ${a}`;
|
|
59
|
+
}
|
|
60
|
+
function T(t) {
|
|
61
|
+
return t ? new Date(t).toLocaleDateString() : "";
|
|
62
|
+
}
|
|
63
|
+
function p(t) {
|
|
64
|
+
y("update:modelValue", (t || d.value).map((e, s) => ({
|
|
65
|
+
...e,
|
|
66
|
+
caption: u.value[s] || ""
|
|
50
67
|
})));
|
|
51
68
|
}
|
|
52
|
-
return (
|
|
53
|
-
const s =
|
|
54
|
-
return
|
|
69
|
+
return (t, e) => {
|
|
70
|
+
const s = M("base-image"), a = M("svg-icon");
|
|
71
|
+
return i(), c("div", {
|
|
55
72
|
class: "bulk-upload",
|
|
56
73
|
ref_key: "root",
|
|
57
|
-
ref:
|
|
74
|
+
ref: g
|
|
58
75
|
}, [
|
|
59
|
-
o("div",
|
|
60
|
-
o("div",
|
|
61
|
-
o("div",
|
|
62
|
-
|
|
63
|
-
o("p",
|
|
76
|
+
o("div", F, [
|
|
77
|
+
o("div", H, [
|
|
78
|
+
o("div", N, [
|
|
79
|
+
d.value.length ? h("", !0) : (i(), c("div", A, [
|
|
80
|
+
o("p", E, f(t.$t("fileInput.noFilesSelected")), 1)
|
|
64
81
|
])),
|
|
65
|
-
|
|
66
|
-
modelValue:
|
|
67
|
-
"onUpdate:modelValue":
|
|
82
|
+
m(U, {
|
|
83
|
+
modelValue: d.value,
|
|
84
|
+
"onUpdate:modelValue": e[1] || (e[1] = (l) => d.value = l),
|
|
68
85
|
multiple: !0,
|
|
69
86
|
accept: "image/*",
|
|
70
87
|
"drop-files": !0,
|
|
@@ -72,60 +89,67 @@ const S = { class: "container" }, A = { class: "row" }, B = { class: "col-12" },
|
|
|
72
89
|
"local-url-format": "objectUrl",
|
|
73
90
|
class: "d-flex flex-column border"
|
|
74
91
|
}, {
|
|
75
|
-
"preview-item":
|
|
76
|
-
o("div",
|
|
77
|
-
o("div",
|
|
78
|
-
o("div",
|
|
79
|
-
|
|
80
|
-
src:
|
|
92
|
+
"preview-item": k(({ bind: { item: l, index: n } }) => [
|
|
93
|
+
o("div", j, [
|
|
94
|
+
o("div", q, [
|
|
95
|
+
o("div", G, [
|
|
96
|
+
m(s, {
|
|
97
|
+
src: l.src,
|
|
81
98
|
alt: "",
|
|
82
99
|
class: "img-thumbnail"
|
|
83
100
|
}, null, 8, ["src"])
|
|
84
101
|
]),
|
|
85
|
-
o("div",
|
|
86
|
-
|
|
102
|
+
o("div", K, [
|
|
103
|
+
o("div", R, [
|
|
104
|
+
o("div", J, f(l.name || t.$t("fileInput.unknownFile")), 1),
|
|
105
|
+
o("div", null, [
|
|
106
|
+
l.size ? (i(), c("span", O, f(z(l.size)), 1)) : h("", !0),
|
|
107
|
+
l.lastModified ? (i(), c("span", P, " · " + f(T(l.lastModified)), 1)) : h("", !0)
|
|
108
|
+
])
|
|
109
|
+
]),
|
|
110
|
+
r.value[n] ? I((i(), c("textarea", {
|
|
87
111
|
key: 0,
|
|
88
|
-
"onUpdate:modelValue": (
|
|
89
|
-
id: `caption-${
|
|
112
|
+
"onUpdate:modelValue": (_) => u.value[n] = _,
|
|
113
|
+
id: `caption-${n}`,
|
|
90
114
|
class: "form-control rounded-0 h-100",
|
|
91
|
-
onChangeCapture:
|
|
92
|
-
}, null, 40,
|
|
93
|
-
[
|
|
94
|
-
]) : (
|
|
115
|
+
onChangeCapture: e[0] || (e[0] = (_) => p())
|
|
116
|
+
}, null, 40, Q)), [
|
|
117
|
+
[L, u.value[n]]
|
|
118
|
+
]) : (i(), c("p", {
|
|
95
119
|
key: 1,
|
|
96
120
|
class: "m-0",
|
|
97
|
-
innerHTML:
|
|
98
|
-
}, null, 8,
|
|
121
|
+
innerHTML: u.value[n] || `<small>${t.$t("fileInput.noCaption")}</small>`
|
|
122
|
+
}, null, 8, W))
|
|
99
123
|
]),
|
|
100
|
-
o("div",
|
|
124
|
+
o("div", X, [
|
|
101
125
|
o("button", {
|
|
102
|
-
onClick: V((
|
|
126
|
+
onClick: V((_) => C(n), ["prevent"]),
|
|
103
127
|
class: "btn btn--close"
|
|
104
128
|
}, [
|
|
105
|
-
|
|
106
|
-
], 8,
|
|
129
|
+
m(a, { symbol: "x" })
|
|
130
|
+
], 8, Y),
|
|
107
131
|
o("button", {
|
|
108
|
-
onClick: V((
|
|
132
|
+
onClick: V((_) => B(n), ["prevent"]),
|
|
109
133
|
class: "btn btn--close"
|
|
110
134
|
}, [
|
|
111
|
-
|
|
112
|
-
symbol:
|
|
135
|
+
m(a, {
|
|
136
|
+
symbol: r.value[n] ? "check" : "edit-3"
|
|
113
137
|
}, null, 8, ["symbol"])
|
|
114
|
-
], 8,
|
|
138
|
+
], 8, Z)
|
|
115
139
|
])
|
|
116
140
|
])
|
|
117
141
|
])
|
|
118
142
|
]),
|
|
119
|
-
button:
|
|
120
|
-
o("span",
|
|
121
|
-
o("span",
|
|
122
|
-
|
|
143
|
+
button: k(() => [
|
|
144
|
+
o("span", ee, [
|
|
145
|
+
o("span", te, [
|
|
146
|
+
m(a, {
|
|
123
147
|
symbol: "upload",
|
|
124
148
|
size: "small"
|
|
125
149
|
}),
|
|
126
150
|
o("span", {
|
|
127
|
-
innerHTML:
|
|
128
|
-
}, null, 8,
|
|
151
|
+
innerHTML: t.$t("common.selectFile")
|
|
152
|
+
}, null, 8, oe)
|
|
129
153
|
])
|
|
130
154
|
])
|
|
131
155
|
]),
|
|
@@ -139,5 +163,5 @@ const S = { class: "container" }, A = { class: "row" }, B = { class: "col-12" },
|
|
|
139
163
|
}
|
|
140
164
|
});
|
|
141
165
|
export {
|
|
142
|
-
|
|
166
|
+
ae as default
|
|
143
167
|
};
|
|
@@ -9,6 +9,9 @@ declare function __VLS_template(): {
|
|
|
9
9
|
item: {
|
|
10
10
|
type?: string;
|
|
11
11
|
src?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
size?: number;
|
|
14
|
+
lastModified?: number;
|
|
12
15
|
};
|
|
13
16
|
index: number;
|
|
14
17
|
};
|
|
@@ -30,24 +33,42 @@ declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js')
|
|
|
30
33
|
(arrayLength: number): {
|
|
31
34
|
type?: string;
|
|
32
35
|
src?: string;
|
|
36
|
+
name?: string;
|
|
37
|
+
size?: number;
|
|
38
|
+
lastModified?: number;
|
|
33
39
|
}[];
|
|
34
40
|
(...items: {
|
|
35
41
|
type?: string;
|
|
36
42
|
src?: string;
|
|
43
|
+
name?: string;
|
|
44
|
+
size?: number;
|
|
45
|
+
lastModified?: number;
|
|
37
46
|
}[]): {
|
|
38
47
|
type?: string;
|
|
39
48
|
src?: string;
|
|
49
|
+
name?: string;
|
|
50
|
+
size?: number;
|
|
51
|
+
lastModified?: number;
|
|
40
52
|
}[];
|
|
41
53
|
new (arrayLength: number): {
|
|
42
54
|
type?: string;
|
|
43
55
|
src?: string;
|
|
56
|
+
name?: string;
|
|
57
|
+
size?: number;
|
|
58
|
+
lastModified?: number;
|
|
44
59
|
}[];
|
|
45
60
|
new (...items: {
|
|
46
61
|
type?: string;
|
|
47
62
|
src?: string;
|
|
63
|
+
name?: string;
|
|
64
|
+
size?: number;
|
|
65
|
+
lastModified?: number;
|
|
48
66
|
}[]): {
|
|
49
67
|
type?: string;
|
|
50
68
|
src?: string;
|
|
69
|
+
name?: string;
|
|
70
|
+
size?: number;
|
|
71
|
+
lastModified?: number;
|
|
51
72
|
}[];
|
|
52
73
|
isArray(arg: any): arg is any[];
|
|
53
74
|
readonly prototype: any[];
|
|
@@ -154,24 +175,42 @@ declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js')
|
|
|
154
175
|
(arrayLength: number): {
|
|
155
176
|
type?: string;
|
|
156
177
|
src?: string;
|
|
178
|
+
name?: string;
|
|
179
|
+
size?: number;
|
|
180
|
+
lastModified?: number;
|
|
157
181
|
}[];
|
|
158
182
|
(...items: {
|
|
159
183
|
type?: string;
|
|
160
184
|
src?: string;
|
|
185
|
+
name?: string;
|
|
186
|
+
size?: number;
|
|
187
|
+
lastModified?: number;
|
|
161
188
|
}[]): {
|
|
162
189
|
type?: string;
|
|
163
190
|
src?: string;
|
|
191
|
+
name?: string;
|
|
192
|
+
size?: number;
|
|
193
|
+
lastModified?: number;
|
|
164
194
|
}[];
|
|
165
195
|
new (arrayLength: number): {
|
|
166
196
|
type?: string;
|
|
167
197
|
src?: string;
|
|
198
|
+
name?: string;
|
|
199
|
+
size?: number;
|
|
200
|
+
lastModified?: number;
|
|
168
201
|
}[];
|
|
169
202
|
new (...items: {
|
|
170
203
|
type?: string;
|
|
171
204
|
src?: string;
|
|
205
|
+
name?: string;
|
|
206
|
+
size?: number;
|
|
207
|
+
lastModified?: number;
|
|
172
208
|
}[]): {
|
|
173
209
|
type?: string;
|
|
174
210
|
src?: string;
|
|
211
|
+
name?: string;
|
|
212
|
+
size?: number;
|
|
213
|
+
lastModified?: number;
|
|
175
214
|
}[];
|
|
176
215
|
isArray(arg: any): arg is any[];
|
|
177
216
|
readonly prototype: any[];
|
|
@@ -281,6 +320,9 @@ declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js')
|
|
|
281
320
|
modelValue: {
|
|
282
321
|
type?: string;
|
|
283
322
|
src?: string;
|
|
323
|
+
name?: string;
|
|
324
|
+
size?: number;
|
|
325
|
+
lastModified?: number;
|
|
284
326
|
}[];
|
|
285
327
|
name: string;
|
|
286
328
|
placeholder: string;
|