ablok-components 0.3.92 → 0.3.93
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/bulk-upload/bulk-upload.vue.d.ts +0 -18
- package/dist/components/molecules/bulk-upload/bulk-upload.vue.js +97 -111
- package/dist/components/molecules/file-upload/file-upload.vue.d.ts +0 -1
- package/dist/components/molecules/file-upload/file-upload.vue.js +37 -39
- package/package.json +19 -19
|
@@ -12,10 +12,6 @@ declare function __VLS_template(): {
|
|
|
12
12
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
13
13
|
declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js').DefineComponent<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<{
|
|
14
14
|
storeId: StringConstructor;
|
|
15
|
-
id: {
|
|
16
|
-
type: StringConstructor;
|
|
17
|
-
default: () => string;
|
|
18
|
-
};
|
|
19
15
|
modelValue: {
|
|
20
16
|
type: {
|
|
21
17
|
(arrayLength: number): {
|
|
@@ -112,18 +108,10 @@ declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js')
|
|
|
112
108
|
type: BooleanConstructor;
|
|
113
109
|
default: boolean;
|
|
114
110
|
};
|
|
115
|
-
maxFiles: {
|
|
116
|
-
type: NumberConstructor;
|
|
117
|
-
default: number;
|
|
118
|
-
};
|
|
119
111
|
}>, {}, {}, {}, {}, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, import('../../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, {
|
|
120
112
|
"update:modelValue": (...args: any[]) => void;
|
|
121
113
|
}, string, import('../../../../vue/dist/vue.esm-bundler.js').PublicProps, Readonly<import('../../../../vue/dist/vue.esm-bundler.js').ExtractPropTypes<{
|
|
122
114
|
storeId: StringConstructor;
|
|
123
|
-
id: {
|
|
124
|
-
type: StringConstructor;
|
|
125
|
-
default: () => string;
|
|
126
|
-
};
|
|
127
115
|
modelValue: {
|
|
128
116
|
type: {
|
|
129
117
|
(arrayLength: number): {
|
|
@@ -220,16 +208,11 @@ declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js')
|
|
|
220
208
|
type: BooleanConstructor;
|
|
221
209
|
default: boolean;
|
|
222
210
|
};
|
|
223
|
-
maxFiles: {
|
|
224
|
-
type: NumberConstructor;
|
|
225
|
-
default: number;
|
|
226
|
-
};
|
|
227
211
|
}>> & Readonly<{
|
|
228
212
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
229
213
|
}>, {
|
|
230
214
|
size: number;
|
|
231
215
|
title: string;
|
|
232
|
-
id: string;
|
|
233
216
|
modelValue: {
|
|
234
217
|
type?: string;
|
|
235
218
|
caption?: string;
|
|
@@ -244,7 +227,6 @@ declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js')
|
|
|
244
227
|
hasCaptions: boolean;
|
|
245
228
|
editCaptions: boolean;
|
|
246
229
|
allowDuplicateFiles: boolean;
|
|
247
|
-
maxFiles: number;
|
|
248
230
|
}, {}, {}, {}, string, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {
|
|
249
231
|
root: HTMLDivElement;
|
|
250
232
|
}, HTMLDivElement>;
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as D, computed as L, ref as _, resolveComponent as C, openBlock as i, createElementBlock as r, createElementVNode as o, unref as S, renderSlot as B, withModifiers as g, createVNode as p, createCommentVNode as c, toDisplayString as y, withCtx as w, Fragment as I, withDirectives as U, vModelText as N, nextTick as A } from "vue";
|
|
2
|
+
import E from "../file-upload/file-upload.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import { sanitizeHtml as
|
|
5
|
-
const
|
|
4
|
+
import { sanitizeHtml as R } from "../../../composables/useSanitize.js";
|
|
5
|
+
const K = { class: "container" }, j = { class: "row" }, q = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "col-12"
|
|
8
|
-
},
|
|
8
|
+
}, G = { class: "py-4 px-3 d-flex align-items-center border border-bottom-0" }, J = ["innerHTML"], O = { class: "col-12" }, P = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "grid place-items-center text-center text-muted py-5 border border-bottom-0"
|
|
11
|
-
},
|
|
11
|
+
}, Q = { class: "m-0" }, W = { class: "preview-item border-bottom p-3" }, X = { class: "d-flex gap-3" }, Y = { class: "col-2" }, Z = { class: "col d-flex flex-column" }, ee = { class: "file-meta text-muted small mb-2" }, te = { class: "fw-semibold" }, oe = { key: 0 }, le = { key: 1 }, se = ["onUpdate:modelValue", "id"], ne = ["innerHTML"], ae = { class: "col-auto d-flex flex-column gap-2" }, ie = ["onClick"], re = ["onClick"], de = { class: "d-flex align-items-end p-3" }, ue = { class: "btn btn-primary btn-sm ms-auto d-flex align-items-center gap-2" }, ce = ["innerHTML"], be = /* @__PURE__ */ D({
|
|
12
12
|
__name: "bulk-upload",
|
|
13
13
|
props: {
|
|
14
14
|
storeId: String,
|
|
15
|
-
id: {
|
|
16
|
-
type: String,
|
|
17
|
-
default: () => `bulk-upload-${Math.random().toString(36).substring(2, 9)}`
|
|
18
|
-
},
|
|
19
15
|
modelValue: {
|
|
20
16
|
type: Array,
|
|
21
17
|
default: []
|
|
@@ -54,18 +50,14 @@ const J = { class: "container" }, O = { class: "row" }, P = {
|
|
|
54
50
|
allowDuplicateFiles: {
|
|
55
51
|
type: Boolean,
|
|
56
52
|
default: !1
|
|
57
|
-
},
|
|
58
|
-
maxFiles: {
|
|
59
|
-
type: Number,
|
|
60
|
-
default: 0
|
|
61
53
|
}
|
|
62
54
|
},
|
|
63
55
|
emits: ["update:modelValue"],
|
|
64
|
-
setup(
|
|
65
|
-
const
|
|
56
|
+
setup(u, { emit: V }) {
|
|
57
|
+
const b = u, k = V, M = (e) => `${e.name ?? ""}|${e.size ?? 0}|${e.lastModified ?? 0}|${e.type ?? ""}`, m = L({
|
|
66
58
|
get: () => {
|
|
67
|
-
const e =
|
|
68
|
-
return
|
|
59
|
+
const e = b.modelValue || [];
|
|
60
|
+
return v.value = e.map((t) => t.caption || ""), e.map((t) => ({
|
|
69
61
|
type: t.type,
|
|
70
62
|
src: t.src,
|
|
71
63
|
...t.name ? { name: t.name } : {},
|
|
@@ -74,74 +66,73 @@ const J = { class: "container" }, O = { class: "row" }, P = {
|
|
|
74
66
|
}));
|
|
75
67
|
},
|
|
76
68
|
set: (e) => {
|
|
77
|
-
const t =
|
|
78
|
-
const
|
|
79
|
-
return !t.some((
|
|
80
|
-
})
|
|
81
|
-
if (!
|
|
69
|
+
const t = m.value || [], l = Array.isArray(e) ? e : [], a = b.allowDuplicateFiles ? l : l.filter((s) => {
|
|
70
|
+
const d = M(s);
|
|
71
|
+
return !t.some((x) => M(x) === d);
|
|
72
|
+
});
|
|
73
|
+
if (!b.allowDuplicateFiles && l.length > 0 && a.length === 0)
|
|
82
74
|
return;
|
|
83
|
-
const
|
|
84
|
-
h(
|
|
75
|
+
const n = a.length <= t.length && a.every((s) => t.some((d) => d.src === s.src));
|
|
76
|
+
h(n ? a : [...t, ...a]);
|
|
85
77
|
}
|
|
86
|
-
}),
|
|
87
|
-
function
|
|
88
|
-
const t = [...
|
|
89
|
-
t.splice(e, 1),
|
|
78
|
+
}), $ = _(null), f = _({}), v = _({});
|
|
79
|
+
function H(e) {
|
|
80
|
+
const t = [...b.modelValue || []];
|
|
81
|
+
t.splice(e, 1), k("update:modelValue", t);
|
|
90
82
|
}
|
|
91
|
-
async function
|
|
92
|
-
|
|
83
|
+
async function z(e) {
|
|
84
|
+
f.value[e] = !f.value[e], f.value[e] || h(), await A(), $.value?.querySelector(`#caption-${e}`)?.focus();
|
|
93
85
|
}
|
|
94
|
-
function
|
|
86
|
+
function F(e) {
|
|
95
87
|
if (e == null) return "";
|
|
96
88
|
const t = ["B", "KB", "MB", "GB", "TB"];
|
|
97
|
-
let
|
|
98
|
-
for (;
|
|
99
|
-
|
|
100
|
-
return `${
|
|
89
|
+
let l = e, a = t.shift();
|
|
90
|
+
for (; l >= 1024 && t.length; )
|
|
91
|
+
l /= 1024, a = t.shift();
|
|
92
|
+
return `${l.toFixed(1)} ${a}`;
|
|
101
93
|
}
|
|
102
|
-
function
|
|
94
|
+
function T(e) {
|
|
103
95
|
return e ? new Date(e).toLocaleDateString() : "";
|
|
104
96
|
}
|
|
105
97
|
function h(e) {
|
|
106
|
-
|
|
98
|
+
k("update:modelValue", (e || m.value).map((t, l) => ({
|
|
107
99
|
...t,
|
|
108
|
-
caption:
|
|
100
|
+
caption: v.value[l] || ""
|
|
109
101
|
})));
|
|
110
102
|
}
|
|
111
103
|
return (e, t) => {
|
|
112
|
-
const
|
|
113
|
-
return
|
|
104
|
+
const l = C("svg-icon"), a = C("base-image");
|
|
105
|
+
return i(), r("div", {
|
|
114
106
|
class: "bulk-upload",
|
|
115
107
|
ref_key: "root",
|
|
116
|
-
ref:
|
|
108
|
+
ref: $
|
|
117
109
|
}, [
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
110
|
+
o("div", K, [
|
|
111
|
+
o("div", j, [
|
|
112
|
+
u.hasHeader ? (i(), r("div", q, [
|
|
113
|
+
o("div", G, [
|
|
114
|
+
o("p", {
|
|
123
115
|
class: "fw-bold m-0",
|
|
124
|
-
innerHTML:
|
|
125
|
-
}, null, 8,
|
|
126
|
-
|
|
127
|
-
|
|
116
|
+
innerHTML: S(R)(u.title || e.$t("fileInput.bulkUploadHeadline"))
|
|
117
|
+
}, null, 8, J),
|
|
118
|
+
B(e.$slots, "bulk-remove", {}, () => [
|
|
119
|
+
u.hasBulkRemove ? (i(), r("button", {
|
|
128
120
|
key: 0,
|
|
129
|
-
onClick: t[0] || (t[0] =
|
|
121
|
+
onClick: t[0] || (t[0] = g((n) => m.value = [], ["prevent"])),
|
|
130
122
|
class: "btn btn--close ms-auto p-0"
|
|
131
123
|
}, [
|
|
132
|
-
|
|
133
|
-
])) :
|
|
124
|
+
p(l, { symbol: "x" })
|
|
125
|
+
])) : c("", !0)
|
|
134
126
|
])
|
|
135
127
|
])
|
|
136
|
-
])) :
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
128
|
+
])) : c("", !0),
|
|
129
|
+
o("div", O, [
|
|
130
|
+
m.value.length ? c("", !0) : (i(), r("div", P, [
|
|
131
|
+
o("p", Q, y(e.$t("fileInput.noFilesSelected")), 1)
|
|
140
132
|
])),
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
modelValue:
|
|
144
|
-
"onUpdate:modelValue": t[2] || (t[2] = (n) => r.value = n),
|
|
133
|
+
p(E, {
|
|
134
|
+
modelValue: m.value,
|
|
135
|
+
"onUpdate:modelValue": t[2] || (t[2] = (n) => m.value = n),
|
|
145
136
|
multiple: !0,
|
|
146
137
|
accept: "image/*",
|
|
147
138
|
"drop-files": !0,
|
|
@@ -149,82 +140,77 @@ const J = { class: "container" }, O = { class: "row" }, P = {
|
|
|
149
140
|
"local-url-format": "objectUrl",
|
|
150
141
|
class: "d-flex flex-column border"
|
|
151
142
|
}, {
|
|
152
|
-
"preview-item":
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
143
|
+
"preview-item": w(({ bind: { item: n, index: s } }) => [
|
|
144
|
+
o("div", W, [
|
|
145
|
+
o("div", X, [
|
|
146
|
+
o("div", Y, [
|
|
147
|
+
p(a, {
|
|
157
148
|
src: n.src,
|
|
158
149
|
alt: "",
|
|
159
150
|
class: "img-thumbnail"
|
|
160
151
|
}, null, 8, ["src"])
|
|
161
152
|
]),
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
n.size ? (
|
|
167
|
-
n.lastModified ? (
|
|
153
|
+
o("div", Z, [
|
|
154
|
+
o("div", ee, [
|
|
155
|
+
o("div", te, y(n.name || e.$t("fileInput.unknownFile")), 1),
|
|
156
|
+
o("div", null, [
|
|
157
|
+
n.size ? (i(), r("span", oe, y(F(n.size)), 1)) : c("", !0),
|
|
158
|
+
n.lastModified ? (i(), r("span", le, " · " + y(T(n.lastModified)), 1)) : c("", !0)
|
|
168
159
|
])
|
|
169
160
|
]),
|
|
170
|
-
|
|
171
|
-
|
|
161
|
+
u.hasCaptions ? (i(), r(I, { key: 0 }, [
|
|
162
|
+
f.value[s] && u.editCaptions ? U((i(), r("textarea", {
|
|
172
163
|
key: 0,
|
|
173
|
-
"onUpdate:modelValue": (
|
|
164
|
+
"onUpdate:modelValue": (d) => v.value[s] = d,
|
|
174
165
|
id: `caption-${s}`,
|
|
175
166
|
class: "form-control rounded-0 h-100",
|
|
176
|
-
onChangeCapture: t[1] || (t[1] = (
|
|
177
|
-
}, null, 40,
|
|
178
|
-
[
|
|
179
|
-
]) : (
|
|
167
|
+
onChangeCapture: t[1] || (t[1] = (d) => h())
|
|
168
|
+
}, null, 40, se)), [
|
|
169
|
+
[N, v.value[s]]
|
|
170
|
+
]) : (i(), r("p", {
|
|
180
171
|
key: 1,
|
|
181
172
|
class: "m-0",
|
|
182
|
-
innerHTML:
|
|
183
|
-
}, null, 8,
|
|
184
|
-
], 64)) :
|
|
173
|
+
innerHTML: v.value[s] || `<small>${e.$t("fileInput.noCaption")}</small>`
|
|
174
|
+
}, null, 8, ne))
|
|
175
|
+
], 64)) : c("", !0)
|
|
185
176
|
]),
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
onClick:
|
|
177
|
+
o("div", ae, [
|
|
178
|
+
o("button", {
|
|
179
|
+
onClick: g((d) => H(s), ["prevent"]),
|
|
189
180
|
class: "btn btn--close"
|
|
190
181
|
}, [
|
|
191
|
-
|
|
192
|
-
], 8,
|
|
193
|
-
|
|
182
|
+
p(l, { symbol: "x" })
|
|
183
|
+
], 8, ie),
|
|
184
|
+
u.editCaptions ? (i(), r("button", {
|
|
194
185
|
key: 0,
|
|
195
|
-
onClick:
|
|
186
|
+
onClick: g((d) => z(s), ["prevent"]),
|
|
196
187
|
class: "btn btn--close"
|
|
197
188
|
}, [
|
|
198
|
-
|
|
199
|
-
symbol:
|
|
189
|
+
p(l, {
|
|
190
|
+
symbol: f.value[s] ? "check" : "edit-3"
|
|
200
191
|
}, null, 8, ["symbol"])
|
|
201
|
-
], 8,
|
|
192
|
+
], 8, re)) : c("", !0)
|
|
202
193
|
])
|
|
203
194
|
])
|
|
204
195
|
])
|
|
205
196
|
]),
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
l
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
},
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}),
|
|
218
|
-
l("span", {
|
|
219
|
-
innerHTML: e.$t("common.selectFile")
|
|
220
|
-
}, null, 8, be)
|
|
221
|
-
], 10, ve)
|
|
197
|
+
button: w(() => [
|
|
198
|
+
B(e.$slots, "button", {}, () => [
|
|
199
|
+
o("span", de, [
|
|
200
|
+
o("span", ue, [
|
|
201
|
+
p(l, {
|
|
202
|
+
symbol: "upload",
|
|
203
|
+
size: "small"
|
|
204
|
+
}),
|
|
205
|
+
o("span", {
|
|
206
|
+
innerHTML: e.$t("common.selectFile")
|
|
207
|
+
}, null, 8, ce)
|
|
222
208
|
])
|
|
223
209
|
])
|
|
224
210
|
])
|
|
225
211
|
]),
|
|
226
212
|
_: 3
|
|
227
|
-
}, 8, ["
|
|
213
|
+
}, 8, ["modelValue"])
|
|
228
214
|
])
|
|
229
215
|
])
|
|
230
216
|
])
|
|
@@ -233,5 +219,5 @@ const J = { class: "container" }, O = { class: "row" }, P = {
|
|
|
233
219
|
}
|
|
234
220
|
});
|
|
235
221
|
export {
|
|
236
|
-
|
|
222
|
+
be as default
|
|
237
223
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as L, ref as y, toRef as M, computed as N, watch as
|
|
1
|
+
import { defineComponent as L, ref as y, toRef as M, computed as N, watch as b, openBlock as u, createElementBlock as d, normalizeClass as h, unref as v, Fragment as V, renderList as P, renderSlot as S, createElementVNode as c, withModifiers as w, createVNode as p, Transition as T, withCtx as H, createCommentVNode as W } from "vue";
|
|
2
2
|
import k from "../../atoms/svg-icon/svg-icon.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import q from "../../atoms/input-file/input-file.vue.js";
|
|
@@ -7,7 +7,7 @@ import { useUploadTransport as I } from "../../../composables/useUploadTransport
|
|
|
7
7
|
import { useLocalFileUrl as R } from "../../../composables/useLocalFileUrl.js";
|
|
8
8
|
import { sanitizeHtml as O } from "../../../composables/useSanitize.js";
|
|
9
9
|
import { uniqueId as F } from "../../../utilities/helpers.js";
|
|
10
|
-
const
|
|
10
|
+
const _ = ["src"], j = ["onClick"], x = ["onClick"], G = ["for"], J = ["innerHTML"], K = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "file-upload__loading-spinner"
|
|
13
13
|
}, ne = /* @__PURE__ */ L({
|
|
@@ -103,7 +103,7 @@ const j = ["src"], G = ["onClick"], J = ["onClick"], K = ["for"], Q = ["innerHTM
|
|
|
103
103
|
},
|
|
104
104
|
emits: ["update:modelValue", "update:src"],
|
|
105
105
|
setup(o, { emit: U }) {
|
|
106
|
-
const e = o, i = U,
|
|
106
|
+
const e = o, i = U, g = y(), m = y([]), n = y([]), { pending: $, uploadFile: B } = I(e), { toLocalUrl: D, revoke: z } = R(M(e, "localUrlFormat")), { isDragging: C } = E(g, {
|
|
107
107
|
enabled: () => e.dropFiles,
|
|
108
108
|
onDrop: (t) => {
|
|
109
109
|
m.value = t;
|
|
@@ -121,7 +121,7 @@ const j = ["src"], G = ["onClick"], J = ["onClick"], K = ["for"], Q = ["innerHTM
|
|
|
121
121
|
i("update:modelValue", e.multiple ? [] : void 0), i("update:src", "");
|
|
122
122
|
m.value.splice(l, 1);
|
|
123
123
|
}
|
|
124
|
-
return
|
|
124
|
+
return b(() => m.value, async (t) => {
|
|
125
125
|
const l = await Promise.all(
|
|
126
126
|
t.map(async (a) => ({
|
|
127
127
|
src: e.toDataUrl ? await D(a) : await B(a),
|
|
@@ -132,43 +132,43 @@ const j = ["src"], G = ["onClick"], J = ["onClick"], K = ["for"], Q = ["innerHTM
|
|
|
132
132
|
}))
|
|
133
133
|
);
|
|
134
134
|
n.value = l;
|
|
135
|
-
}, { deep: !0 }),
|
|
135
|
+
}, { deep: !0 }), b(() => n.value, async (t) => {
|
|
136
136
|
const l = e.multiple ? t : t[0];
|
|
137
137
|
i("update:modelValue", l), e.multiple || i("update:src", t[0] && t[0].src);
|
|
138
138
|
}, { deep: !0 }), (t, l) => (u(), d("div", {
|
|
139
139
|
ref_key: "root",
|
|
140
|
-
ref:
|
|
141
|
-
class:
|
|
140
|
+
ref: g,
|
|
141
|
+
class: h(["file-upload", {
|
|
142
142
|
"has-dragging": o.dropFiles,
|
|
143
143
|
"is-dragging": v(C)
|
|
144
144
|
}])
|
|
145
145
|
}, [
|
|
146
|
-
(u(!0), d(
|
|
146
|
+
(u(!0), d(V, null, P(A.value, (a, r) => (u(), d("div", {
|
|
147
147
|
key: a.src,
|
|
148
|
-
class:
|
|
148
|
+
class: h(o.enablePreview ? "file-upload__thumbnail" : "file-upload__reset")
|
|
149
149
|
}, [
|
|
150
|
-
|
|
150
|
+
S(t.$slots, "preview-item", {
|
|
151
151
|
bind: { item: a, index: r },
|
|
152
152
|
on: { removeFile: f }
|
|
153
153
|
}, () => [
|
|
154
|
-
o.enablePreview ? (u(), d(
|
|
154
|
+
o.enablePreview ? (u(), d(V, { key: 0 }, [
|
|
155
155
|
c("img", {
|
|
156
156
|
src: `${a.src}${o.previewWidth ? `?width=${o.previewWidth}` : ""}`,
|
|
157
157
|
class: "img-thumbnail rounded"
|
|
158
|
-
}, null, 8,
|
|
158
|
+
}, null, 8, _),
|
|
159
159
|
c("button", {
|
|
160
160
|
onClick: w((s) => f(r), ["prevent"]),
|
|
161
161
|
class: "btn btn--close"
|
|
162
162
|
}, [
|
|
163
163
|
p(k, { symbol: "x" })
|
|
164
|
-
], 8,
|
|
164
|
+
], 8, j)
|
|
165
165
|
], 64)) : (u(), d("button", {
|
|
166
166
|
key: 1,
|
|
167
167
|
onClick: w((s) => f(r), ["prevent"]),
|
|
168
168
|
class: "btn btn--close btn-outline-contrast"
|
|
169
169
|
}, [
|
|
170
170
|
p(k, { symbol: "x" })
|
|
171
|
-
], 8,
|
|
171
|
+
], 8, x))
|
|
172
172
|
])
|
|
173
173
|
], 2))), 128)),
|
|
174
174
|
p(q, {
|
|
@@ -181,32 +181,30 @@ const j = ["src"], G = ["onClick"], J = ["onClick"], K = ["for"], Q = ["innerHTM
|
|
|
181
181
|
multiple: o.multiple,
|
|
182
182
|
class: "d-none"
|
|
183
183
|
}, null, 8, ["modelValue", "id", "name", "accept", "max-file-size", "multiple"]),
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}, [
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
184
|
+
c("label", {
|
|
185
|
+
for: o.id,
|
|
186
|
+
class: "file-upload__label"
|
|
187
|
+
}, [
|
|
188
|
+
S(t.$slots, "button", {}, () => [
|
|
189
|
+
c("span", {
|
|
190
|
+
class: "btn btn-outline-contrast",
|
|
191
|
+
innerHTML: v(O)(o.label || t.$t("common.selectFile"))
|
|
192
|
+
}, null, 8, J)
|
|
193
|
+
]),
|
|
194
|
+
p(T, { name: "fade" }, {
|
|
195
|
+
default: H(() => [
|
|
196
|
+
v($) ? (u(), d("span", K, [...l[1] || (l[1] = [
|
|
197
|
+
c("span", {
|
|
198
|
+
class: "spinner-border",
|
|
199
|
+
role: "status"
|
|
200
|
+
}, [
|
|
201
|
+
c("span", { class: "visually-hidden" }, "Loading...")
|
|
202
|
+
], -1)
|
|
203
|
+
])])) : W("", !0)
|
|
194
204
|
]),
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
c("span", {
|
|
199
|
-
class: "spinner-border",
|
|
200
|
-
role: "status"
|
|
201
|
-
}, [
|
|
202
|
-
c("span", { class: "visually-hidden" }, "Loading...")
|
|
203
|
-
], -1)
|
|
204
|
-
])])) : W("", !0)
|
|
205
|
-
]),
|
|
206
|
-
_: 1
|
|
207
|
-
})
|
|
208
|
-
], 8, K)
|
|
209
|
-
])
|
|
205
|
+
_: 1
|
|
206
|
+
})
|
|
207
|
+
], 8, G)
|
|
210
208
|
], 2));
|
|
211
209
|
}
|
|
212
210
|
});
|
package/package.json
CHANGED
|
@@ -1,23 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ablok-components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.
|
|
5
|
-
"scripts": {
|
|
6
|
-
"dev": "vite --host",
|
|
7
|
-
"story:dev": "histoire dev",
|
|
8
|
-
"story:build": "histoire build",
|
|
9
|
-
"story:preview": "histoire preview",
|
|
10
|
-
"build": "vue-tsc --noEmit --project tsconfig.build.json && vite build",
|
|
11
|
-
"build:watch": "vue-tsc --noEmit --watch --project tsconfig.build.json & vite build --watch",
|
|
12
|
-
"preview": "vite preview",
|
|
13
|
-
"build-lib-bak": "vite build && vue-tsc --emitDeclarationOnly && mv dist/src dist/types",
|
|
14
|
-
"build-lib": "vite build && vue-tsc --emitDeclarationOnly",
|
|
15
|
-
"release": "bash ./scripts/release.sh",
|
|
16
|
-
"postrelease": "bash ./scripts/publish.sh",
|
|
17
|
-
"test": "vitest run",
|
|
18
|
-
"test:watch": "vitest",
|
|
19
|
-
"test:ui": "vitest --ui"
|
|
20
|
-
},
|
|
4
|
+
"version": "0.3.93",
|
|
21
5
|
"dependencies": {
|
|
22
6
|
"date-fns": "^3.0.0",
|
|
23
7
|
"dompurify": "^3.3.1",
|
|
@@ -136,5 +120,21 @@
|
|
|
136
120
|
"./package.json": "./package.json"
|
|
137
121
|
},
|
|
138
122
|
"types": "./dist/index.d.ts",
|
|
139
|
-
"sideEffects": false
|
|
140
|
-
|
|
123
|
+
"sideEffects": false,
|
|
124
|
+
"scripts": {
|
|
125
|
+
"dev": "vite --host",
|
|
126
|
+
"story:dev": "histoire dev",
|
|
127
|
+
"story:build": "histoire build",
|
|
128
|
+
"story:preview": "histoire preview",
|
|
129
|
+
"build": "vue-tsc --noEmit --project tsconfig.build.json && vite build",
|
|
130
|
+
"build:watch": "vue-tsc --noEmit --watch --project tsconfig.build.json & vite build --watch",
|
|
131
|
+
"preview": "vite preview",
|
|
132
|
+
"build-lib-bak": "vite build && vue-tsc --emitDeclarationOnly && mv dist/src dist/types",
|
|
133
|
+
"build-lib": "vite build && vue-tsc --emitDeclarationOnly",
|
|
134
|
+
"release": "bash ./scripts/release.sh",
|
|
135
|
+
"postrelease": "bash ./scripts/publish.sh",
|
|
136
|
+
"test": "vitest run",
|
|
137
|
+
"test:watch": "vitest",
|
|
138
|
+
"test:ui": "vitest --ui"
|
|
139
|
+
}
|
|
140
|
+
}
|