@webx-ui/module-media 0.7.1 → 0.7.2
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/index.js +99 -99
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as S, useModel as A, ref as R, watch as G, openBlock as
|
|
1
|
+
import { defineComponent as S, useModel as A, ref as R, watch as G, openBlock as w, createBlock as T, unref as e, mergeModels as q, computed as z, resolveDirective as Ge, withCtx as b, createElementBlock as L, Fragment as ce, renderList as me, withDirectives as Ye, createCommentVNode as D, createVNode as g, createTextVNode as O, toDisplayString as U, isRef as ve, useTemplateRef as oe, onMounted as Fe, nextTick as Je, createElementVNode as V, withKeys as Qe, normalizeClass as pe, createSlots as We, inject as Ze, normalizeStyle as fe, mergeProps as ge } from "vue";
|
|
2
2
|
import { useTranslate as H, useAdmin as se, useErrorText as et, adminKey as tt, WxListScreen as lt } from "@webx-ui/module-admin";
|
|
3
|
-
import { WxTree as at, WxSelectionArea as it, WxFileCard as Le, WxEmpty as nt, toast as J, WxAction as B, WxInput as Z, WxDropdown as Ve, WxDropdownItem as Te, WxActions as le, useModal as ye, WxDialog as he, WxSelect as ot, WxSpace as
|
|
4
|
-
function
|
|
3
|
+
import { WxTree as at, WxSelectionArea as it, WxFileCard as Le, WxEmpty as nt, toast as J, WxAction as B, WxInput as Z, WxDropdown as Ve, WxDropdownItem as Te, WxActions as le, useModal as ye, WxDialog as he, WxSelect as ot, WxSpace as we, WxButton as I, useElementWidth as st, createModal as ae, WxPagination as rt, WxDrawer as dt, confirm as ue, openImageEditor as ut, WxSortableList as ct, WxPopover as Re, WxPopconfirm as De, WxImage as mt, WxCard as pt } from "@webx-ui/core";
|
|
4
|
+
function be(a) {
|
|
5
5
|
const i = `${a.apiPath}/media`, n = (l) => l.data;
|
|
6
6
|
return {
|
|
7
7
|
directories: () => a.http.get(`${i}/directories`).then(n),
|
|
@@ -109,7 +109,7 @@ const ze = /* @__PURE__ */ S({
|
|
|
109
109
|
const k = u.zone === "inside" ? u.target : u.parent;
|
|
110
110
|
k && r("move", u.node.id, k.id);
|
|
111
111
|
}
|
|
112
|
-
return (u, k) => (
|
|
112
|
+
return (u, k) => (w(), T(e(at), {
|
|
113
113
|
selected: l.value,
|
|
114
114
|
"onUpdate:selected": k[0] || (k[0] = (h) => l.value = h),
|
|
115
115
|
expanded: t.value,
|
|
@@ -159,15 +159,15 @@ const ze = /* @__PURE__ */ S({
|
|
|
159
159
|
}
|
|
160
160
|
return (y, s) => {
|
|
161
161
|
const u = Ge("wx-select");
|
|
162
|
-
return a.files.length > 0 ? (
|
|
162
|
+
return a.files.length > 0 ? (w(), T(e(it), {
|
|
163
163
|
key: 0,
|
|
164
164
|
modelValue: l.value,
|
|
165
165
|
"onUpdate:modelValue": s[0] || (s[0] = (k) => l.value = k),
|
|
166
166
|
class: "wx-media-grid",
|
|
167
167
|
multiple: !a.single
|
|
168
168
|
}, {
|
|
169
|
-
default:
|
|
170
|
-
(
|
|
169
|
+
default: b(({ isSelected: k }) => [
|
|
170
|
+
(w(!0), L(ce, null, me(a.files, (h) => Ye((w(), T(e(Le), {
|
|
171
171
|
key: h.id,
|
|
172
172
|
class: "wx-media-grid__card",
|
|
173
173
|
name: h.name,
|
|
@@ -201,7 +201,7 @@ const ze = /* @__PURE__ */ S({
|
|
|
201
201
|
])), 128))
|
|
202
202
|
]),
|
|
203
203
|
_: 1
|
|
204
|
-
}, 8, ["modelValue", "multiple"])) : (
|
|
204
|
+
}, 8, ["modelValue", "multiple"])) : (w(), T(e(nt), {
|
|
205
205
|
key: 1,
|
|
206
206
|
description: v.value
|
|
207
207
|
}, null, 8, ["description"]));
|
|
@@ -237,8 +237,8 @@ const ze = /* @__PURE__ */ S({
|
|
|
237
237
|
{ value: "name", label: t("manager.sort-name") },
|
|
238
238
|
{ value: "-size", label: t("manager.sort-size") }
|
|
239
239
|
]), s = z(() => x.value.find((k) => k.value === r.value)?.label ?? ""), u = z(() => y.value.find((k) => k.value === d.value)?.label ?? "");
|
|
240
|
-
return (k, h) => (
|
|
241
|
-
a.compact ? (
|
|
240
|
+
return (k, h) => (w(), L("header", yt, [
|
|
241
|
+
a.compact ? (w(), T(e(B), {
|
|
242
242
|
key: 0,
|
|
243
243
|
icon: "sidebar",
|
|
244
244
|
title: e(t)("manager.folders"),
|
|
@@ -253,21 +253,21 @@ const ze = /* @__PURE__ */ S({
|
|
|
253
253
|
clearable: "",
|
|
254
254
|
size: "sm"
|
|
255
255
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
256
|
-
a.fixedType ? D("", !0) : (
|
|
257
|
-
trigger:
|
|
256
|
+
a.fixedType ? D("", !0) : (w(), T(e(Ve), { key: 1 }, {
|
|
257
|
+
trigger: b(() => [
|
|
258
258
|
g(e(B), {
|
|
259
259
|
icon: "filter",
|
|
260
260
|
title: `${e(t)("manager.all-types")}: ${s.value}`,
|
|
261
261
|
size: "sm"
|
|
262
262
|
}, null, 8, ["title"])
|
|
263
263
|
]),
|
|
264
|
-
default:
|
|
265
|
-
(
|
|
264
|
+
default: b(() => [
|
|
265
|
+
(w(!0), L(ce, null, me(x.value, (o) => (w(), T(e(Te), {
|
|
266
266
|
key: String(o.value),
|
|
267
267
|
active: o.value === r.value,
|
|
268
268
|
onClick: ($) => r.value = o.value
|
|
269
269
|
}, {
|
|
270
|
-
default:
|
|
270
|
+
default: b(() => [
|
|
271
271
|
O(U(o.label), 1)
|
|
272
272
|
]),
|
|
273
273
|
_: 2
|
|
@@ -276,20 +276,20 @@ const ze = /* @__PURE__ */ S({
|
|
|
276
276
|
_: 1
|
|
277
277
|
})),
|
|
278
278
|
g(e(Ve), null, {
|
|
279
|
-
trigger:
|
|
279
|
+
trigger: b(() => [
|
|
280
280
|
g(e(B), {
|
|
281
281
|
icon: "arrow-down",
|
|
282
282
|
title: u.value,
|
|
283
283
|
size: "sm"
|
|
284
284
|
}, null, 8, ["title"])
|
|
285
285
|
]),
|
|
286
|
-
default:
|
|
287
|
-
(
|
|
286
|
+
default: b(() => [
|
|
287
|
+
(w(!0), L(ce, null, me(y.value, (o) => (w(), T(e(Te), {
|
|
288
288
|
key: o.value,
|
|
289
289
|
active: o.value === d.value,
|
|
290
290
|
onClick: ($) => d.value = o.value
|
|
291
291
|
}, {
|
|
292
|
-
default:
|
|
292
|
+
default: b(() => [
|
|
293
293
|
O(U(o.label), 1)
|
|
294
294
|
]),
|
|
295
295
|
_: 2
|
|
@@ -297,18 +297,18 @@ const ze = /* @__PURE__ */ S({
|
|
|
297
297
|
]),
|
|
298
298
|
_: 1
|
|
299
299
|
}),
|
|
300
|
-
a.canUpload ? (
|
|
300
|
+
a.canUpload ? (w(), T(e(B), {
|
|
301
301
|
key: 2,
|
|
302
302
|
type: "upload",
|
|
303
303
|
title: e(t)("manager.upload"),
|
|
304
304
|
size: "sm",
|
|
305
305
|
onClick: h[2] || (h[2] = (o) => v("upload"))
|
|
306
306
|
}, null, 8, ["title"])) : D("", !0),
|
|
307
|
-
a.canManage ? (
|
|
307
|
+
a.canManage ? (w(), T(e(le), {
|
|
308
308
|
key: 3,
|
|
309
309
|
size: "sm"
|
|
310
310
|
}, {
|
|
311
|
-
default:
|
|
311
|
+
default: b(() => [
|
|
312
312
|
g(e(B), {
|
|
313
313
|
icon: "folder-move",
|
|
314
314
|
title: e(t)("manager.move"),
|
|
@@ -326,7 +326,7 @@ const ze = /* @__PURE__ */ S({
|
|
|
326
326
|
})) : D("", !0)
|
|
327
327
|
]));
|
|
328
328
|
}
|
|
329
|
-
}),
|
|
329
|
+
}), wt = /* @__PURE__ */ S({
|
|
330
330
|
__name: "MoveDialog",
|
|
331
331
|
props: {
|
|
332
332
|
directories: {},
|
|
@@ -347,20 +347,20 @@ const ze = /* @__PURE__ */ S({
|
|
|
347
347
|
...x(s.children ?? [])
|
|
348
348
|
]);
|
|
349
349
|
}
|
|
350
|
-
return (y, s) => (
|
|
350
|
+
return (y, s) => (w(), T(e(he), {
|
|
351
351
|
open: e(n),
|
|
352
352
|
"onUpdate:open": s[3] || (s[3] = (u) => ve(n) ? n.value = u : null),
|
|
353
353
|
title: e(d)("manager.move-to"),
|
|
354
354
|
width: 420
|
|
355
355
|
}, {
|
|
356
|
-
footer:
|
|
357
|
-
g(e(
|
|
358
|
-
default:
|
|
356
|
+
footer: b(() => [
|
|
357
|
+
g(e(we), { size: "sm" }, {
|
|
358
|
+
default: b(() => [
|
|
359
359
|
g(e(I), {
|
|
360
360
|
variant: "outline",
|
|
361
361
|
onClick: s[1] || (s[1] = (u) => e(r)())
|
|
362
362
|
}, {
|
|
363
|
-
default:
|
|
363
|
+
default: b(() => [
|
|
364
364
|
O(U(e(d)("manager.cancel")), 1)
|
|
365
365
|
]),
|
|
366
366
|
_: 1
|
|
@@ -370,7 +370,7 @@ const ze = /* @__PURE__ */ S({
|
|
|
370
370
|
disabled: t.value === null,
|
|
371
371
|
onClick: s[2] || (s[2] = (u) => e(l)(t.value))
|
|
372
372
|
}, {
|
|
373
|
-
default:
|
|
373
|
+
default: b(() => [
|
|
374
374
|
O(U(e(d)("manager.move")), 1)
|
|
375
375
|
]),
|
|
376
376
|
_: 1
|
|
@@ -379,7 +379,7 @@ const ze = /* @__PURE__ */ S({
|
|
|
379
379
|
_: 1
|
|
380
380
|
})
|
|
381
381
|
]),
|
|
382
|
-
default:
|
|
382
|
+
default: b(() => [
|
|
383
383
|
g(e(ot), {
|
|
384
384
|
modelValue: t.value,
|
|
385
385
|
"onUpdate:modelValue": s[0] || (s[0] = (u) => t.value = u),
|
|
@@ -389,7 +389,7 @@ const ze = /* @__PURE__ */ S({
|
|
|
389
389
|
_: 1
|
|
390
390
|
}, 8, ["open", "title"]));
|
|
391
391
|
}
|
|
392
|
-
}),
|
|
392
|
+
}), bt = /* @__PURE__ */ S({
|
|
393
393
|
__name: "NameDialog",
|
|
394
394
|
props: {
|
|
395
395
|
title: {},
|
|
@@ -406,20 +406,20 @@ const ze = /* @__PURE__ */ S({
|
|
|
406
406
|
const y = v.value.trim();
|
|
407
407
|
y !== "" && l(y);
|
|
408
408
|
}
|
|
409
|
-
return (y, s) => (
|
|
409
|
+
return (y, s) => (w(), T(e(he), {
|
|
410
410
|
open: e(n),
|
|
411
411
|
"onUpdate:open": s[2] || (s[2] = (u) => ve(n) ? n.value = u : null),
|
|
412
412
|
title: a.title,
|
|
413
413
|
width: 420
|
|
414
414
|
}, {
|
|
415
|
-
footer:
|
|
416
|
-
g(e(
|
|
417
|
-
default:
|
|
415
|
+
footer: b(() => [
|
|
416
|
+
g(e(we), { size: "sm" }, {
|
|
417
|
+
default: b(() => [
|
|
418
418
|
g(e(I), {
|
|
419
419
|
variant: "outline",
|
|
420
420
|
onClick: s[1] || (s[1] = (u) => e(r)())
|
|
421
421
|
}, {
|
|
422
|
-
default:
|
|
422
|
+
default: b(() => [
|
|
423
423
|
O(U(e(d)("manager.cancel")), 1)
|
|
424
424
|
]),
|
|
425
425
|
_: 1
|
|
@@ -429,7 +429,7 @@ const ze = /* @__PURE__ */ S({
|
|
|
429
429
|
disabled: v.value.trim() === "",
|
|
430
430
|
onClick: x
|
|
431
431
|
}, {
|
|
432
|
-
default:
|
|
432
|
+
default: b(() => [
|
|
433
433
|
O(U(a.confirmText ?? e(d)("manager.save")), 1)
|
|
434
434
|
]),
|
|
435
435
|
_: 1
|
|
@@ -438,7 +438,7 @@ const ze = /* @__PURE__ */ S({
|
|
|
438
438
|
_: 1
|
|
439
439
|
})
|
|
440
440
|
]),
|
|
441
|
-
default:
|
|
441
|
+
default: b(() => [
|
|
442
442
|
V("div", {
|
|
443
443
|
ref_key: "input",
|
|
444
444
|
ref: t
|
|
@@ -611,7 +611,7 @@ const kt = {
|
|
|
611
611
|
}),
|
|
612
612
|
emits: /* @__PURE__ */ q(["pick", "selection"], ["update:type"]),
|
|
613
613
|
setup(a, { expose: i, emit: n }) {
|
|
614
|
-
const l = a, r = n, d = se(), v =
|
|
614
|
+
const l = a, r = n, d = se(), v = be(d);
|
|
615
615
|
re();
|
|
616
616
|
const t = H("webx-media"), x = et();
|
|
617
617
|
function y() {
|
|
@@ -688,7 +688,7 @@ const kt = {
|
|
|
688
688
|
J.danger(x(P, t("errors.upload")));
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
|
-
const W = ae(
|
|
691
|
+
const W = ae(bt);
|
|
692
692
|
async function $e() {
|
|
693
693
|
const p = await W({
|
|
694
694
|
title: t("manager.new-folder"),
|
|
@@ -745,7 +745,7 @@ const kt = {
|
|
|
745
745
|
}
|
|
746
746
|
await c();
|
|
747
747
|
}
|
|
748
|
-
const Ee = ae(
|
|
748
|
+
const Ee = ae(wt);
|
|
749
749
|
async function Pe() {
|
|
750
750
|
const p = await Ee({
|
|
751
751
|
directories: h.value,
|
|
@@ -816,24 +816,24 @@ const kt = {
|
|
|
816
816
|
clearTimeout(_), _ = setTimeout(p, f);
|
|
817
817
|
};
|
|
818
818
|
}
|
|
819
|
-
return (p, f) => (
|
|
819
|
+
return (p, f) => (w(), L("div", {
|
|
820
820
|
ref_key: "root",
|
|
821
821
|
ref: s,
|
|
822
822
|
class: pe(["wx-media", { "wx-media--compact": k.value }])
|
|
823
823
|
}, [
|
|
824
|
-
k.value ? D("", !0) : (
|
|
824
|
+
k.value ? D("", !0) : (w(), L("aside", kt, [
|
|
825
825
|
g(ze, {
|
|
826
826
|
selected: o.value,
|
|
827
827
|
"onUpdate:selected": f[0] || (f[0] = (_) => o.value = _),
|
|
828
828
|
directories: h.value,
|
|
829
829
|
onMove: Me
|
|
830
830
|
}, null, 8, ["selected", "directories"]),
|
|
831
|
-
Q.value ? (
|
|
831
|
+
Q.value ? (w(), T(e(le), {
|
|
832
832
|
key: 0,
|
|
833
833
|
size: "sm",
|
|
834
834
|
align: "start"
|
|
835
835
|
}, {
|
|
836
|
-
default:
|
|
836
|
+
default: b(() => [
|
|
837
837
|
g(e(B), {
|
|
838
838
|
type: "add",
|
|
839
839
|
title: e(t)("manager.new-folder"),
|
|
@@ -896,10 +896,10 @@ const kt = {
|
|
|
896
896
|
}, null, 8, ["selected", "files", "api", "query", "single"]),
|
|
897
897
|
V("footer", Ct, [
|
|
898
898
|
V("span", null, U(e(t)("manager.status-files", { count: $.value?.stats.files ?? 0 })), 1),
|
|
899
|
-
F.value.length > 0 ? (
|
|
899
|
+
F.value.length > 0 ? (w(), L("span", Mt, U(e(t)("manager.status-selected", { count: F.value.length })), 1)) : D("", !0),
|
|
900
900
|
V("span", null, U(e(t)("manager.status-size", { size: e(Be)($.value?.stats.size ?? 0) })), 1)
|
|
901
901
|
]),
|
|
902
|
-
$.value && $.value.meta.last_page > 1 ? (
|
|
902
|
+
$.value && $.value.meta.last_page > 1 ? (w(), T(e(rt), {
|
|
903
903
|
key: 0,
|
|
904
904
|
page: $.value.meta.current_page,
|
|
905
905
|
"per-page": $.value.meta.per_page,
|
|
@@ -917,7 +917,7 @@ const kt = {
|
|
|
917
917
|
title: e(t)("manager.folders"),
|
|
918
918
|
size: 280
|
|
919
919
|
}, {
|
|
920
|
-
default:
|
|
920
|
+
default: b(() => [
|
|
921
921
|
V("div", Vt, [
|
|
922
922
|
g(ze, {
|
|
923
923
|
selected: o.value,
|
|
@@ -928,12 +928,12 @@ const kt = {
|
|
|
928
928
|
directories: h.value,
|
|
929
929
|
onMove: Me
|
|
930
930
|
}, null, 8, ["selected", "directories"]),
|
|
931
|
-
Q.value ? (
|
|
931
|
+
Q.value ? (w(), T(e(le), {
|
|
932
932
|
key: 0,
|
|
933
933
|
size: "sm",
|
|
934
934
|
align: "start"
|
|
935
935
|
}, {
|
|
936
|
-
default:
|
|
936
|
+
default: b(() => [
|
|
937
937
|
g(e(B), {
|
|
938
938
|
type: "add",
|
|
939
939
|
title: e(t)("manager.new-folder"),
|
|
@@ -974,13 +974,13 @@ const kt = {
|
|
|
974
974
|
},
|
|
975
975
|
setup(a) {
|
|
976
976
|
const { open: i, resolve: n, dismiss: l } = ye(), r = H("webx-media"), d = R([]);
|
|
977
|
-
return (v, t) => (
|
|
977
|
+
return (v, t) => (w(), T(e(he), {
|
|
978
978
|
open: e(i),
|
|
979
979
|
"onUpdate:open": t[4] || (t[4] = (x) => ve(i) ? i.value = x : null),
|
|
980
980
|
title: a.title ?? e(r)("module.title"),
|
|
981
981
|
width: 960
|
|
982
982
|
}, We({
|
|
983
|
-
default:
|
|
983
|
+
default: b(() => [
|
|
984
984
|
V("div", Tt, [
|
|
985
985
|
g(Se, {
|
|
986
986
|
picking: !a.manage,
|
|
@@ -996,15 +996,15 @@ const kt = {
|
|
|
996
996
|
}, [
|
|
997
997
|
a.multiple && !a.manage ? {
|
|
998
998
|
name: "footer",
|
|
999
|
-
fn:
|
|
1000
|
-
g(e(
|
|
1001
|
-
default:
|
|
1002
|
-
a.max !== null && a.max > 0 ? (
|
|
999
|
+
fn: b(() => [
|
|
1000
|
+
g(e(we), { size: "sm" }, {
|
|
1001
|
+
default: b(() => [
|
|
1002
|
+
a.max !== null && a.max > 0 ? (w(), L("span", zt, U(e(r)("manager.chosen", { count: d.value.length, max: a.max })), 1)) : D("", !0),
|
|
1003
1003
|
g(e(I), {
|
|
1004
1004
|
variant: "outline",
|
|
1005
1005
|
onClick: t[2] || (t[2] = (x) => e(l)())
|
|
1006
1006
|
}, {
|
|
1007
|
-
default:
|
|
1007
|
+
default: b(() => [
|
|
1008
1008
|
O(U(e(r)("manager.cancel")), 1)
|
|
1009
1009
|
]),
|
|
1010
1010
|
_: 1
|
|
@@ -1015,7 +1015,7 @@ const kt = {
|
|
|
1015
1015
|
disabled: d.value.length === 0,
|
|
1016
1016
|
onClick: t[3] || (t[3] = (x) => e(n)(d.value))
|
|
1017
1017
|
}, {
|
|
1018
|
-
default:
|
|
1018
|
+
default: b(() => [
|
|
1019
1019
|
O(U(e(r)("manager.pick", { count: d.value.length })), 1)
|
|
1020
1020
|
]),
|
|
1021
1021
|
_: 1
|
|
@@ -1066,7 +1066,7 @@ const kt = {
|
|
|
1066
1066
|
setup(a) {
|
|
1067
1067
|
const i = a, n = A(a, "modelValue");
|
|
1068
1068
|
re();
|
|
1069
|
-
const l = H("webx-media"), r = Ze(tt, null), d = r ?
|
|
1069
|
+
const l = H("webx-media"), r = Ze(tt, null), d = r ? be(r) : null, v = {
|
|
1070
1070
|
"16/9": "16 / 9",
|
|
1071
1071
|
"4/3": "4 / 3",
|
|
1072
1072
|
"1/1": "1 / 1"
|
|
@@ -1154,11 +1154,11 @@ const kt = {
|
|
|
1154
1154
|
const c = t.value.length;
|
|
1155
1155
|
return i.min && c < i.min ? l("field.at-least", { count: i.min }) : x.value === null ? "" : l("field.count", { count: c, max: x.value });
|
|
1156
1156
|
});
|
|
1157
|
-
return (c, m) => (
|
|
1157
|
+
return (c, m) => (w(), L("div", {
|
|
1158
1158
|
class: pe(["wx-media-list", [`wx-media-list--${a.layout}`, { "is-disabled": a.disabled }]]),
|
|
1159
1159
|
style: fe(E.value)
|
|
1160
1160
|
}, [
|
|
1161
|
-
a.label ? (
|
|
1161
|
+
a.label ? (w(), L("span", Lt, U(a.label), 1)) : D("", !0),
|
|
1162
1162
|
g(e(ct), {
|
|
1163
1163
|
modelValue: t.value,
|
|
1164
1164
|
"onUpdate:modelValue": m[1] || (m[1] = (M) => t.value = M),
|
|
@@ -1170,7 +1170,7 @@ const kt = {
|
|
|
1170
1170
|
"drag-label": e(l)("field.reorder"),
|
|
1171
1171
|
"empty-text": e(l)("field.empty")
|
|
1172
1172
|
}, {
|
|
1173
|
-
default:
|
|
1173
|
+
default: b(({ item: M, index: C }) => [
|
|
1174
1174
|
V("div", {
|
|
1175
1175
|
class: pe(["wx-media-list__cell", { "is-broken": $(M), "is-busy": N.value === C }])
|
|
1176
1176
|
}, [
|
|
@@ -1180,15 +1180,15 @@ const kt = {
|
|
|
1180
1180
|
type: o(M)?.mime,
|
|
1181
1181
|
size: a.layout === "rows" ? "sm" : "md"
|
|
1182
1182
|
}, {
|
|
1183
|
-
meta:
|
|
1184
|
-
$(M) ? (
|
|
1183
|
+
meta: b(() => [
|
|
1184
|
+
$(M) ? (w(), L("span", Rt, U(e(l)("field.missing")), 1)) : (w(), L("span", Dt, U(X(M)), 1))
|
|
1185
1185
|
]),
|
|
1186
1186
|
_: 2
|
|
1187
1187
|
}, 1032, ["name", "thumbnail", "type", "size"]),
|
|
1188
|
-
a.disabled ? D("", !0) : (
|
|
1188
|
+
a.disabled ? D("", !0) : (w(), L("div", Bt, [
|
|
1189
1189
|
g(e(le), { size: "sm" }, {
|
|
1190
|
-
default:
|
|
1191
|
-
a.captions ? (
|
|
1190
|
+
default: b(() => [
|
|
1191
|
+
a.captions ? (w(), T(e(Re), {
|
|
1192
1192
|
key: 0,
|
|
1193
1193
|
open: N.value === C,
|
|
1194
1194
|
title: e(l)("field.captions"),
|
|
@@ -1197,13 +1197,13 @@ const kt = {
|
|
|
1197
1197
|
teleport: "",
|
|
1198
1198
|
"onUpdate:open": (W) => N.value = W ? C : null
|
|
1199
1199
|
}, {
|
|
1200
|
-
trigger:
|
|
1200
|
+
trigger: b(() => [
|
|
1201
1201
|
g(e(B), {
|
|
1202
1202
|
type: "edit",
|
|
1203
1203
|
title: e(l)("field.captions")
|
|
1204
1204
|
}, null, 8, ["title"])
|
|
1205
1205
|
]),
|
|
1206
|
-
default:
|
|
1206
|
+
default: b(() => [
|
|
1207
1207
|
V("div", St, [
|
|
1208
1208
|
V("div", Et, [
|
|
1209
1209
|
m[2] || (m[2] = V("span", { class: "wx-media-list__caption-label" }, "alt", -1)),
|
|
@@ -1229,7 +1229,7 @@ const kt = {
|
|
|
1229
1229
|
type: "primary",
|
|
1230
1230
|
onClick: m[0] || (m[0] = (W) => N.value = null)
|
|
1231
1231
|
}, {
|
|
1232
|
-
default:
|
|
1232
|
+
default: b(() => [
|
|
1233
1233
|
O(U(e(l)("manager.save")), 1)
|
|
1234
1234
|
]),
|
|
1235
1235
|
_: 1
|
|
@@ -1239,7 +1239,7 @@ const kt = {
|
|
|
1239
1239
|
]),
|
|
1240
1240
|
_: 2
|
|
1241
1241
|
}, 1032, ["open", "title", "onUpdate:open"])) : D("", !0),
|
|
1242
|
-
$(M) ? D("", !0) : (
|
|
1242
|
+
$(M) ? D("", !0) : (w(), T(e(B), {
|
|
1243
1243
|
key: 1,
|
|
1244
1244
|
type: "goto",
|
|
1245
1245
|
title: e(l)("field.open"),
|
|
@@ -1254,7 +1254,7 @@ const kt = {
|
|
|
1254
1254
|
side: "top",
|
|
1255
1255
|
onConfirm: (W) => Q(C)
|
|
1256
1256
|
}, {
|
|
1257
|
-
trigger:
|
|
1257
|
+
trigger: b(() => [
|
|
1258
1258
|
g(e(B), {
|
|
1259
1259
|
type: "remove",
|
|
1260
1260
|
title: e(l)("field.remove-confirm")
|
|
@@ -1277,12 +1277,12 @@ const kt = {
|
|
|
1277
1277
|
disabled: a.disabled || y.value,
|
|
1278
1278
|
onClick: ie
|
|
1279
1279
|
}, {
|
|
1280
|
-
default:
|
|
1280
|
+
default: b(() => [
|
|
1281
1281
|
O(U(e(l)("field.add")), 1)
|
|
1282
1282
|
]),
|
|
1283
1283
|
_: 1
|
|
1284
1284
|
}, 8, ["disabled"]),
|
|
1285
|
-
ne.value ? (
|
|
1285
|
+
ne.value ? (w(), L("span", Nt, U(ne.value), 1)) : D("", !0)
|
|
1286
1286
|
])
|
|
1287
1287
|
], 6));
|
|
1288
1288
|
}
|
|
@@ -1302,7 +1302,7 @@ const kt = {
|
|
|
1302
1302
|
i.value = l[0] ?? null;
|
|
1303
1303
|
}
|
|
1304
1304
|
});
|
|
1305
|
-
return (l, r) => (
|
|
1305
|
+
return (l, r) => (w(), T(ke, ge(l.$attrs, {
|
|
1306
1306
|
modelValue: n.value,
|
|
1307
1307
|
"onUpdate:modelValue": r[0] || (r[0] = (d) => n.value = d),
|
|
1308
1308
|
layout: "rows",
|
|
@@ -1320,7 +1320,7 @@ const kt = {
|
|
|
1320
1320
|
emits: ["update:modelValue"],
|
|
1321
1321
|
setup(a) {
|
|
1322
1322
|
const i = A(a, "modelValue");
|
|
1323
|
-
return (n, l) => (
|
|
1323
|
+
return (n, l) => (w(), T(ke, ge(n.$attrs, {
|
|
1324
1324
|
modelValue: i.value,
|
|
1325
1325
|
"onUpdate:modelValue": l[0] || (l[0] = (r) => i.value = r),
|
|
1326
1326
|
layout: "rows"
|
|
@@ -1337,7 +1337,7 @@ const kt = {
|
|
|
1337
1337
|
emits: ["update:modelValue"],
|
|
1338
1338
|
setup(a) {
|
|
1339
1339
|
const i = A(a, "modelValue");
|
|
1340
|
-
return (n, l) => (
|
|
1340
|
+
return (n, l) => (w(), T(ke, ge(n.$attrs, {
|
|
1341
1341
|
modelValue: i.value,
|
|
1342
1342
|
"onUpdate:modelValue": l[0] || (l[0] = (r) => i.value = r),
|
|
1343
1343
|
layout: "grid",
|
|
@@ -1370,7 +1370,7 @@ const kt = {
|
|
|
1370
1370
|
setup(a) {
|
|
1371
1371
|
const i = a, n = A(a, "modelValue");
|
|
1372
1372
|
re();
|
|
1373
|
-
const l = H("webx-media"), r =
|
|
1373
|
+
const l = H("webx-media"), r = be(se()), d = {
|
|
1374
1374
|
"16/9": "16 / 9",
|
|
1375
1375
|
"4/3": "4 / 3",
|
|
1376
1376
|
"1/1": "1 / 1"
|
|
@@ -1404,9 +1404,9 @@ const kt = {
|
|
|
1404
1404
|
function h() {
|
|
1405
1405
|
n.value = null, v.value = !1;
|
|
1406
1406
|
}
|
|
1407
|
-
return (o, $) => (
|
|
1408
|
-
a.label ? (
|
|
1409
|
-
n.value ? (
|
|
1407
|
+
return (o, $) => (w(), L("div", Xt, [
|
|
1408
|
+
a.label ? (w(), L("span", Kt, U(a.label), 1)) : D("", !0),
|
|
1409
|
+
n.value ? (w(), L("div", {
|
|
1410
1410
|
key: 2,
|
|
1411
1411
|
class: "wx-media-field__frame",
|
|
1412
1412
|
style: fe(y.value)
|
|
@@ -1418,18 +1418,18 @@ const kt = {
|
|
|
1418
1418
|
title: e(l)("field.replace"),
|
|
1419
1419
|
onClick: k
|
|
1420
1420
|
}, [
|
|
1421
|
-
x.value ? (
|
|
1421
|
+
x.value ? (w(), T(e(mt), {
|
|
1422
1422
|
key: 0,
|
|
1423
1423
|
src: x.value,
|
|
1424
1424
|
fit: "contain",
|
|
1425
1425
|
width: "100%",
|
|
1426
1426
|
height: "100%"
|
|
1427
|
-
}, null, 8, ["src"])) : (
|
|
1427
|
+
}, null, 8, ["src"])) : (w(), L("span", Yt, U(e(l)("field.no-preview")), 1))
|
|
1428
1428
|
], 8, Gt),
|
|
1429
|
-
a.disabled ? D("", !0) : (
|
|
1429
|
+
a.disabled ? D("", !0) : (w(), L("div", Jt, [
|
|
1430
1430
|
g(e(le), { size: "sm" }, {
|
|
1431
|
-
default:
|
|
1432
|
-
a.captions ? (
|
|
1431
|
+
default: b(() => [
|
|
1432
|
+
a.captions ? (w(), T(e(Re), {
|
|
1433
1433
|
key: 0,
|
|
1434
1434
|
open: v.value,
|
|
1435
1435
|
"onUpdate:open": $[3] || ($[3] = (F) => v.value = F),
|
|
@@ -1438,13 +1438,13 @@ const kt = {
|
|
|
1438
1438
|
side: "top",
|
|
1439
1439
|
teleport: ""
|
|
1440
1440
|
}, {
|
|
1441
|
-
trigger:
|
|
1441
|
+
trigger: b(() => [
|
|
1442
1442
|
g(e(B), {
|
|
1443
1443
|
type: "edit",
|
|
1444
1444
|
title: e(l)("field.edit")
|
|
1445
1445
|
}, null, 8, ["title"])
|
|
1446
1446
|
]),
|
|
1447
|
-
default:
|
|
1447
|
+
default: b(() => [
|
|
1448
1448
|
V("div", Qt, [
|
|
1449
1449
|
V("div", Zt, [
|
|
1450
1450
|
$[4] || ($[4] = V("label", {
|
|
@@ -1478,7 +1478,7 @@ const kt = {
|
|
|
1478
1478
|
type: "primary",
|
|
1479
1479
|
onClick: $[2] || ($[2] = (F) => v.value = !1)
|
|
1480
1480
|
}, {
|
|
1481
|
-
default:
|
|
1481
|
+
default: b(() => [
|
|
1482
1482
|
O(U(e(l)("manager.save")), 1)
|
|
1483
1483
|
]),
|
|
1484
1484
|
_: 1
|
|
@@ -1497,7 +1497,7 @@ const kt = {
|
|
|
1497
1497
|
side: "top",
|
|
1498
1498
|
onConfirm: h
|
|
1499
1499
|
}, {
|
|
1500
|
-
trigger:
|
|
1500
|
+
trigger: b(() => [
|
|
1501
1501
|
g(e(B), {
|
|
1502
1502
|
type: "remove",
|
|
1503
1503
|
title: e(l)("field.clear-confirm")
|
|
@@ -1509,7 +1509,7 @@ const kt = {
|
|
|
1509
1509
|
_: 1
|
|
1510
1510
|
})
|
|
1511
1511
|
]))
|
|
1512
|
-
], 4)) : (
|
|
1512
|
+
], 4)) : (w(), L("div", {
|
|
1513
1513
|
key: 1,
|
|
1514
1514
|
class: "wx-media-field__frame is-empty",
|
|
1515
1515
|
style: fe(y.value)
|
|
@@ -1537,7 +1537,7 @@ const kt = {
|
|
|
1537
1537
|
label: n(`manager.${y}`)
|
|
1538
1538
|
}))
|
|
1539
1539
|
]);
|
|
1540
|
-
return (y, s) => (
|
|
1540
|
+
return (y, s) => (w(), T(e(lt), {
|
|
1541
1541
|
view: r.value,
|
|
1542
1542
|
"onUpdate:view": s[1] || (s[1] = (u) => r.value = u),
|
|
1543
1543
|
title: t.value,
|
|
@@ -1545,12 +1545,12 @@ const kt = {
|
|
|
1545
1545
|
card: !1,
|
|
1546
1546
|
fill: ""
|
|
1547
1547
|
}, We({
|
|
1548
|
-
default:
|
|
1548
|
+
default: b(() => [
|
|
1549
1549
|
g(e(pt), {
|
|
1550
1550
|
class: "wx-media-page",
|
|
1551
1551
|
padding: "md"
|
|
1552
1552
|
}, {
|
|
1553
|
-
default:
|
|
1553
|
+
default: b(() => [
|
|
1554
1554
|
g(Se, {
|
|
1555
1555
|
ref_key: "manager",
|
|
1556
1556
|
ref: l,
|
|
@@ -1565,13 +1565,13 @@ const kt = {
|
|
|
1565
1565
|
}, [
|
|
1566
1566
|
v.value ? {
|
|
1567
1567
|
name: "actions",
|
|
1568
|
-
fn:
|
|
1568
|
+
fn: b(() => [
|
|
1569
1569
|
g(e(I), {
|
|
1570
1570
|
type: "primary",
|
|
1571
1571
|
icon: "upload",
|
|
1572
1572
|
onClick: s[0] || (s[0] = (u) => l.value?.upload())
|
|
1573
1573
|
}, {
|
|
1574
|
-
default:
|
|
1574
|
+
default: b(() => [
|
|
1575
1575
|
O(U(e(n)("manager.upload")), 1)
|
|
1576
1576
|
]),
|
|
1577
1577
|
_: 1
|
|
@@ -1600,9 +1600,9 @@ function sl(a = {}) {
|
|
|
1600
1600
|
// `multiple: true` and `accept: document`".
|
|
1601
1601
|
types: {
|
|
1602
1602
|
"wx-media": { component: ll, kind: "field" },
|
|
1603
|
-
"wx-gallery": { component: Ht, kind: "field" },
|
|
1603
|
+
"wx-gallery": { component: Ht, kind: "field", wide: !0 },
|
|
1604
1604
|
"wx-file": { component: qt, kind: "field" },
|
|
1605
|
-
"wx-files": { component: It, kind: "field" }
|
|
1605
|
+
"wx-files": { component: It, kind: "field", wide: !0 }
|
|
1606
1606
|
}
|
|
1607
1607
|
};
|
|
1608
1608
|
}
|
|
@@ -1614,7 +1614,7 @@ export {
|
|
|
1614
1614
|
Se as WxMediaManager,
|
|
1615
1615
|
al as WxMediaPage,
|
|
1616
1616
|
xe as WxMediaPicker,
|
|
1617
|
-
|
|
1617
|
+
be as createMediaApi,
|
|
1618
1618
|
sl as media,
|
|
1619
1619
|
xt as mediaMessages,
|
|
1620
1620
|
Ft as openMediaFiles,
|