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