@feedmepos/mf-media 1.0.1-dev.1 → 1.0.1-dev.3
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/{AiStudio-a685be4a.js → AiStudio-4e54cdff.js} +21 -21
- package/dist/{AssetLibrary-bb6b1fb8.js → AssetLibrary-e042670f.js} +42 -42
- package/dist/app.js +2 -2
- package/dist/{media-picker-9b94d32f.js → media-picker-40af065f.js} +1707 -1644
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as V, computed as S, resolveComponent as E, openBlock as m, createElementBlock as h, createElementVNode as s, normalizeStyle as ee, createVNode as k, toDisplayString as u, unref as a, createCommentVNode as U, normalizeClass as j, createTextVNode as ae, createBlock as G, Fragment as D, renderList as N, mergeModels as H, useModel as q, renderSlot as ne, withCtx as te, ref as B, withDirectives as ie, vModelText as le, onMounted as re } from "vue";
|
|
2
2
|
import { defineStore as de, storeToRefs as ce } from "pinia";
|
|
3
3
|
import { useI18n as L, useCoreStore as ue } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialog as me, useSnackbar as fe } from "@feedmepos/ui-library";
|
|
5
|
-
import { i as W,
|
|
5
|
+
import { i as W, u as pe, p as ve, j as xe } from "./media-picker-40af065f.js";
|
|
6
6
|
const ge = { class: "rounded-xl border border-fm-color-neutral-gray-200 bg-white overflow-hidden" }, ye = ["src", "alt"], be = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "absolute inset-0 flex flex-col items-center justify-center gap-4 p-12 text-center"
|
|
@@ -18,7 +18,7 @@ const ge = { class: "rounded-xl border border-fm-color-neutral-gray-200 bg-white
|
|
|
18
18
|
}, Ce = { class: "flex-1 text-xs text-fm-color-typo-secondary truncate" }, Fe = ["title"], Se = ["title"], Re = ["title"], Ee = {
|
|
19
19
|
key: 1,
|
|
20
20
|
class: "flex justify-end px-8 py-8"
|
|
21
|
-
}, K = "w-32 h-32 rounded-md flex items-center justify-center text-fm-color-typo-secondary hover:bg-fm-color-neutral-gray-100", Be = /* @__PURE__ */
|
|
21
|
+
}, K = "w-32 h-32 rounded-md flex items-center justify-center text-fm-color-typo-secondary hover:bg-fm-color-neutral-gray-100", Be = /* @__PURE__ */ V({
|
|
22
22
|
__name: "StudioImageCard",
|
|
23
23
|
props: {
|
|
24
24
|
item: {},
|
|
@@ -61,7 +61,7 @@ const ge = { class: "rounded-xl border border-fm-color-neutral-gray-200 bg-white
|
|
|
61
61
|
s("span", Ce, u(n.value), 1),
|
|
62
62
|
s("button", {
|
|
63
63
|
type: "button",
|
|
64
|
-
class:
|
|
64
|
+
class: j(K),
|
|
65
65
|
title: a(r)("media.studio.preview"),
|
|
66
66
|
onClick: b[0] || (b[0] = (f) => l("preview"))
|
|
67
67
|
}, [
|
|
@@ -72,7 +72,7 @@ const ge = { class: "rounded-xl border border-fm-color-neutral-gray-200 bg-white
|
|
|
72
72
|
], 8, Fe),
|
|
73
73
|
s("button", {
|
|
74
74
|
type: "button",
|
|
75
|
-
class:
|
|
75
|
+
class: j(K),
|
|
76
76
|
title: a(r)("media.studio.variant"),
|
|
77
77
|
onClick: b[1] || (b[1] = (f) => l("variant"))
|
|
78
78
|
}, [
|
|
@@ -83,7 +83,7 @@ const ge = { class: "rounded-xl border border-fm-color-neutral-gray-200 bg-white
|
|
|
83
83
|
], 8, Se),
|
|
84
84
|
s("button", {
|
|
85
85
|
type: "button",
|
|
86
|
-
class:
|
|
86
|
+
class: j(K),
|
|
87
87
|
title: a(r)("media.studio.discard"),
|
|
88
88
|
onClick: b[2] || (b[2] = (f) => l("discard"))
|
|
89
89
|
}, [
|
|
@@ -113,7 +113,7 @@ const ge = { class: "rounded-xl border border-fm-color-neutral-gray-200 bg-white
|
|
|
113
113
|
}), ze = { class: "flex flex-col gap-12" }, Pe = { class: "flex items-center gap-12" }, Ue = { class: "flex-1 min-w-0 flex flex-col gap-4" }, Oe = { class: "text-sm font-semibold line-clamp-2" }, Ae = { class: "text-xs text-fm-color-typo-secondary" }, De = {
|
|
114
114
|
key: 0,
|
|
115
115
|
class: "flex items-center gap-4 text-xs font-semibold"
|
|
116
|
-
}, Me = { class: "grid gap-16 grid-cols-[repeat(auto-fill,minmax(min(240px,100%),1fr))]" }, Ne = /* @__PURE__ */
|
|
116
|
+
}, Me = { class: "grid gap-16 grid-cols-[repeat(auto-fill,minmax(min(240px,100%),1fr))]" }, Ne = /* @__PURE__ */ V({
|
|
117
117
|
__name: "StudioBatch",
|
|
118
118
|
props: {
|
|
119
119
|
batch: {}
|
|
@@ -167,14 +167,14 @@ const ge = { class: "rounded-xl border border-fm-color-neutral-gray-200 bg-white
|
|
|
167
167
|
]);
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
}),
|
|
170
|
+
}), je = [
|
|
171
171
|
"none",
|
|
172
172
|
"photo",
|
|
173
173
|
"flatlay",
|
|
174
174
|
"studio",
|
|
175
175
|
"warm",
|
|
176
176
|
"illus"
|
|
177
|
-
],
|
|
177
|
+
], Ve = ["1x1", "4x3", "3x4", "16x9"], Le = [1, 2, 4];
|
|
178
178
|
function J(e) {
|
|
179
179
|
return `/media-v1/businesses/${e}/generations`;
|
|
180
180
|
}
|
|
@@ -207,7 +207,7 @@ async function Ye(e, x) {
|
|
|
207
207
|
const Ke = { class: "w-[320px] max-h-screen overflow-auto flex flex-col gap-16 p-16 rounded-xl border border-fm-color-neutral-gray-200 bg-white sticky top-0 self-start" }, We = { class: "flex flex-col gap-8" }, Je = { class: "flex items-baseline gap-8" }, Qe = { class: "text-sm font-semibold" }, Xe = { class: "text-xs text-fm-color-typo-tertiary" }, Ze = { class: "grid grid-cols-2 gap-8" }, et = ["onClick"], tt = { class: "flex items-center gap-8" }, st = { class: "text-sm font-semibold" }, ot = { class: "text-xs text-fm-color-typo-secondary" }, at = { class: "flex flex-col gap-8" }, nt = {
|
|
208
208
|
key: 0,
|
|
209
209
|
class: "flex items-center gap-8 px-8 py-8 rounded-lg bg-[#FFF7F0]"
|
|
210
|
-
}, it = { class: "text-xs" }, lt = { class: "flex flex-col gap-8" }, rt = { class: "text-sm font-semibold" }, dt = { class: "flex flex-wrap gap-4" }, ct = { class: "flex flex-col gap-8" }, ut = { class: "text-sm font-semibold" }, mt = { class: "grid grid-cols-2 gap-8" }, ft = ["onClick"], pt = { class: "text-fm-color-typo-secondary" }, vt = { class: "flex flex-col gap-8" }, xt = { class: "text-sm font-semibold" }, gt = { class: "flex gap-8" }, yt = ["onClick"], bt = { class: "flex flex-col gap-8 sticky bottom-0 bg-white pt-12" }, ht = { class: "text-xs text-fm-color-typo-tertiary text-center" }, _t = "border-[--fm-color-brand-primary,#FF7823] bg-[#FFF7F0]", $t = "border-fm-color-neutral-gray-200 bg-white", kt = /* @__PURE__ */
|
|
210
|
+
}, it = { class: "text-xs" }, lt = { class: "flex flex-col gap-8" }, rt = { class: "text-sm font-semibold" }, dt = { class: "flex flex-wrap gap-4" }, ct = { class: "flex flex-col gap-8" }, ut = { class: "text-sm font-semibold" }, mt = { class: "grid grid-cols-2 gap-8" }, ft = ["onClick"], pt = { class: "text-fm-color-typo-secondary" }, vt = { class: "flex flex-col gap-8" }, xt = { class: "text-sm font-semibold" }, gt = { class: "flex gap-8" }, yt = ["onClick"], bt = { class: "flex flex-col gap-8 sticky bottom-0 bg-white pt-12" }, ht = { class: "text-xs text-fm-color-typo-tertiary text-center" }, _t = "border-[--fm-color-brand-primary,#FF7823] bg-[#FFF7F0]", $t = "border-fm-color-neutral-gray-200 bg-white", kt = /* @__PURE__ */ V({
|
|
211
211
|
__name: "StudioControls",
|
|
212
212
|
props: /* @__PURE__ */ H({
|
|
213
213
|
busy: { type: Boolean },
|
|
@@ -258,7 +258,7 @@ const Ke = { class: "w-[320px] max-h-screen overflow-auto flex flex-col gap-16 p
|
|
|
258
258
|
(m(!0), h(D, null, N(C.value, (d) => (m(), h("button", {
|
|
259
259
|
key: d.key,
|
|
260
260
|
type: "button",
|
|
261
|
-
class:
|
|
261
|
+
class: j(["flex flex-col items-start gap-4 p-12 rounded-lg border text-left", i(T.value === d.key)]),
|
|
262
262
|
onClick: (M) => l.value = d.prompt
|
|
263
263
|
}, [
|
|
264
264
|
s("span", tt, [
|
|
@@ -293,7 +293,7 @@ const Ke = { class: "w-[320px] max-h-screen overflow-auto flex flex-col gap-16 p
|
|
|
293
293
|
s("div", lt, [
|
|
294
294
|
s("span", rt, u(a(n)("media.studio.style")), 1),
|
|
295
295
|
s("div", dt, [
|
|
296
|
-
(m(!0), h(D, null, N(a(
|
|
296
|
+
(m(!0), h(D, null, N(a(je), (d) => (m(), G(O, {
|
|
297
297
|
key: d,
|
|
298
298
|
label: a(n)(`media.studio.styles.${d}`),
|
|
299
299
|
selected: r.value === d,
|
|
@@ -306,10 +306,10 @@ const Ke = { class: "w-[320px] max-h-screen overflow-auto flex flex-col gap-16 p
|
|
|
306
306
|
s("div", ct, [
|
|
307
307
|
s("span", ut, u(a(n)("media.studio.ratio")), 1),
|
|
308
308
|
s("div", mt, [
|
|
309
|
-
(m(!0), h(D, null, N(a(
|
|
309
|
+
(m(!0), h(D, null, N(a(Ve), (d) => (m(), h("button", {
|
|
310
310
|
key: d,
|
|
311
311
|
type: "button",
|
|
312
|
-
class:
|
|
312
|
+
class: j(["flex items-center justify-center gap-4 h-40 rounded-lg border text-xs font-semibold", i(v.value === d)]),
|
|
313
313
|
onClick: (M) => v.value = d
|
|
314
314
|
}, [
|
|
315
315
|
s("span", null, u(d), 1),
|
|
@@ -323,7 +323,7 @@ const Ke = { class: "w-[320px] max-h-screen overflow-auto flex flex-col gap-16 p
|
|
|
323
323
|
(m(!0), h(D, null, N(a(Le), (d) => (m(), h("button", {
|
|
324
324
|
key: d,
|
|
325
325
|
type: "button",
|
|
326
|
-
class:
|
|
326
|
+
class: j(["flex-1 h-40 rounded-lg border text-sm font-semibold", i(g.value === d)]),
|
|
327
327
|
onClick: (M) => g.value = d
|
|
328
328
|
}, " × " + u(d), 11, yt))), 128))
|
|
329
329
|
])
|
|
@@ -345,7 +345,7 @@ const Ke = { class: "w-[320px] max-h-screen overflow-auto flex flex-col gap-16 p
|
|
|
345
345
|
}), It = {
|
|
346
346
|
key: 0,
|
|
347
347
|
class: "flex h-[560px]"
|
|
348
|
-
}, wt = { class: "flex-1 min-w-0 flex items-center justify-center bg-black p-16" }, Tt = ["src", "alt"], Ct = { class: "w-[300px] flex-shrink-0 flex flex-col gap-12 p-16 overflow-y-auto" }, Ft = { class: "flex items-start justify-between gap-8" }, St = { class: "fm-typo-en-title-sm-600" }, Rt = ["title"], Et = { class: "text-sm font-semibold break-words" }, Bt = { class: "text-xs text-fm-color-typo-secondary" }, zt = /* @__PURE__ */
|
|
348
|
+
}, wt = { class: "flex-1 min-w-0 flex items-center justify-center bg-black p-16" }, Tt = ["src", "alt"], Ct = { class: "w-[300px] flex-shrink-0 flex flex-col gap-12 p-16 overflow-y-auto" }, Ft = { class: "flex items-start justify-between gap-8" }, St = { class: "fm-typo-en-title-sm-600" }, Rt = ["title"], Et = { class: "text-sm font-semibold break-words" }, Bt = { class: "text-xs text-fm-color-typo-secondary" }, zt = /* @__PURE__ */ V({
|
|
349
349
|
__name: "StudioPreviewDialog",
|
|
350
350
|
props: {
|
|
351
351
|
item: {},
|
|
@@ -414,13 +414,13 @@ const Ke = { class: "w-[320px] max-h-screen overflow-auto flex flex-col gap-16 p
|
|
|
414
414
|
}), Pt = { class: "flex flex-col gap-8" }, Ut = { class: "flex items-baseline gap-8" }, Ot = { class: "text-sm font-semibold" }, At = { class: "text-xs text-fm-color-typo-tertiary" }, Dt = {
|
|
415
415
|
key: 0,
|
|
416
416
|
class: "flex items-center gap-8 p-8 rounded-lg border border-fm-color-neutral-gray-200"
|
|
417
|
-
}, Mt = ["src"], Nt = { class: "flex-1 text-xs truncate" },
|
|
417
|
+
}, Mt = ["src"], Nt = { class: "flex-1 text-xs truncate" }, jt = { class: "flex gap-8" }, Vt = { class: "text-xs text-fm-color-typo-tertiary" }, Lt = {
|
|
418
418
|
key: 2,
|
|
419
419
|
class: "text-xs text-[--fm-color-typo-critical,#FF3B30]"
|
|
420
420
|
}, qt = {
|
|
421
421
|
key: 3,
|
|
422
422
|
class: "flex flex-col gap-4"
|
|
423
|
-
}, Gt = { class: "flex items-baseline gap-8" }, Ht = { class: "text-xs font-semibold" }, Yt = { class: "text-xs font-semibold" }, Kt = { class: "text-xs text-fm-color-typo-secondary" }, Wt = /* @__PURE__ */
|
|
423
|
+
}, Gt = { class: "flex items-baseline gap-8" }, Ht = { class: "text-xs font-semibold" }, Yt = { class: "text-xs font-semibold" }, Kt = { class: "text-xs text-fm-color-typo-secondary" }, Wt = /* @__PURE__ */ V({
|
|
424
424
|
__name: "StudioRefPicker",
|
|
425
425
|
props: /* @__PURE__ */ H({
|
|
426
426
|
businessId: {},
|
|
@@ -483,7 +483,7 @@ const Ke = { class: "w-[320px] max-h-screen overflow-auto flex flex-col gap-16 p
|
|
|
483
483
|
onClick: f
|
|
484
484
|
}, null, 8, ["label"])
|
|
485
485
|
])) : (m(), h(D, { key: 1 }, [
|
|
486
|
-
s("div",
|
|
486
|
+
s("div", jt, [
|
|
487
487
|
k(y, {
|
|
488
488
|
label: a(v)("media.studio.refPick"),
|
|
489
489
|
variant: "tertiary",
|
|
@@ -511,7 +511,7 @@ const Ke = { class: "w-[320px] max-h-screen overflow-auto flex flex-col gap-16 p
|
|
|
511
511
|
onChange: F
|
|
512
512
|
}, null, 544)
|
|
513
513
|
]),
|
|
514
|
-
s("span",
|
|
514
|
+
s("span", Vt, u(a(v)("media.studio.refUploadHint")), 1)
|
|
515
515
|
], 64)),
|
|
516
516
|
n.value ? (m(), h("span", Lt, u(n.value), 1)) : U("", !0),
|
|
517
517
|
$.value ? (m(), h("div", qt, [
|
|
@@ -650,7 +650,7 @@ const ts = 3e3, ss = de("mediaGeneration", () => {
|
|
|
650
650
|
}), os = { class: "flex items-start gap-24 p-24" }, as = { class: "flex-1 min-w-0 flex flex-col gap-24" }, ns = {
|
|
651
651
|
key: 0,
|
|
652
652
|
class: "min-h-[340px] flex flex-col items-center justify-center gap-12 border-2 border-dashed border-fm-color-neutral-gray-300 rounded-2xl"
|
|
653
|
-
}, is = { class: "text-lg font-semibold" }, ls = { class: "text-sm text-fm-color-typo-secondary" }, fs = /* @__PURE__ */
|
|
653
|
+
}, is = { class: "text-lg font-semibold" }, ls = { class: "text-sm text-fm-color-typo-secondary" }, fs = /* @__PURE__ */ V({
|
|
654
654
|
__name: "AiStudio",
|
|
655
655
|
setup(e) {
|
|
656
656
|
const x = ue(), { t } = L(), l = me(), r = fe(), v = S(() => {
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { defineComponent as de, computed as C, ref as n, onMounted as ce, watch as
|
|
1
|
+
import { defineComponent as de, computed as C, ref as n, onMounted as ce, watch as U, resolveComponent as k, openBlock as w, createElementBlock as S, createElementVNode as c, toDisplayString as _, unref as t, createVNode as u, createBlock as ve, createCommentVNode as J, withCtx as N } from "vue";
|
|
2
2
|
import { useCoreStore as me, useI18n as fe } from "@feedmepos/mf-common";
|
|
3
3
|
import { useDialog as pe } from "@feedmepos/ui-library";
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
4
|
+
import { o as ge, I as ye, g as be, f as we, c as O, m as _e, e as xe, d as he, U as Be, h as Ce, a as ke, E as Se, T as K, b as Ie } from "./media-picker-40af065f.js";
|
|
5
|
+
const Ve = { class: "p-24 relative min-h-full" }, De = { class: "flex items-center justify-between mb-8" }, Te = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2" }, ze = { class: "flex gap-8" }, Pe = { class: "flex flex-col gap-12 mb-16" }, Ae = { class: "flex items-center gap-12" }, Fe = { class: "flex-1 text-xs text-fm-color-typo-secondary" }, Re = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "text-fm-color-typo-primary font-semibold"
|
|
8
|
-
},
|
|
8
|
+
}, Ue = { key: 1 }, Ne = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "fixed bottom-24 left-1/2 -translate-x-1/2 flex items-center gap-12 bg-white border rounded-lg shadow-lg px-16 py-8 z-30"
|
|
11
|
-
},
|
|
11
|
+
}, Oe = { class: "text-sm font-semibold" }, Me = { class: "flex justify-end gap-8 w-full" }, qe = /* @__PURE__ */ de({
|
|
12
12
|
__name: "AssetLibrary",
|
|
13
|
-
setup(
|
|
13
|
+
setup(Ee) {
|
|
14
14
|
const M = me(), { t: l } = fe(), r = C(() => {
|
|
15
15
|
var e;
|
|
16
16
|
return ((e = M.currentBusiness.value) == null ? void 0 : e.id) ?? "";
|
|
17
|
-
}),
|
|
17
|
+
}), E = C(() => {
|
|
18
18
|
var e;
|
|
19
19
|
return (e = M.currentRestaurant.value) == null ? void 0 : e._id;
|
|
20
|
-
}), x = pe(), h = n(""), g = n([]), p = n([]), y = n([]),
|
|
20
|
+
}), x = pe(), h = n(""), g = n([]), p = n([]), y = n([]), I = n(!1), v = n(1), V = n(0), D = n(0), T = n(!1), $ = n("recent"), Q = {
|
|
21
21
|
recent: { sortBy: "createdAt", descending: !0 },
|
|
22
22
|
name: { sortBy: "fileName", descending: !1 },
|
|
23
23
|
size: { sortBy: "fileSizeBytes", descending: !0 }
|
|
24
24
|
}, j = [{ icon: "grid_view" }, { icon: "view_list" }], z = n(j[0]), W = C(() => z.value.icon === "grid_view" ? "grid" : "list"), P = ge(() => r.value);
|
|
25
25
|
async function m() {
|
|
26
26
|
if (r.value) {
|
|
27
|
-
p.value.length === 0 && (
|
|
27
|
+
p.value.length === 0 && (I.value = !0), T.value = !0;
|
|
28
28
|
try {
|
|
29
29
|
const [e, a] = await Promise.all([
|
|
30
30
|
he({
|
|
31
31
|
businessId: r.value,
|
|
32
|
-
restaurantId:
|
|
32
|
+
restaurantId: E.value,
|
|
33
33
|
search: h.value || void 0,
|
|
34
34
|
tags: g.value.length ? g.value : void 0,
|
|
35
35
|
// AI-composed images are assets from the moment their bytes land — they have to be, or
|
|
36
36
|
// their URL could not render — so the library hides them until "save to the asset
|
|
37
37
|
// centre" removes this tag.
|
|
38
38
|
excludeTags: [Be],
|
|
39
|
-
skip: Ce(v.value,
|
|
40
|
-
limit:
|
|
39
|
+
skip: Ce(v.value, O),
|
|
40
|
+
limit: O,
|
|
41
41
|
...Q[$.value]
|
|
42
42
|
}),
|
|
43
43
|
ke(r.value)
|
|
44
44
|
]);
|
|
45
|
-
p.value = e.resources,
|
|
45
|
+
p.value = e.resources, V.value = e.meta.totalResources, D.value = e.meta.totalPages, y.value = a, await P.load(
|
|
46
46
|
e.resources.filter((s) => !Se(s)).map((s) => s.refId).filter((s) => !!s)
|
|
47
47
|
);
|
|
48
48
|
} finally {
|
|
49
|
-
|
|
49
|
+
I.value = !1, T.value = !1;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -55,16 +55,16 @@ const De = { class: "p-24 relative min-h-full" }, Ie = { class: "flex items-cent
|
|
|
55
55
|
}
|
|
56
56
|
async function F() {
|
|
57
57
|
await m();
|
|
58
|
-
const e =
|
|
58
|
+
const e = Ie(v.value, D.value);
|
|
59
59
|
e !== v.value && (v.value = e, await m());
|
|
60
60
|
}
|
|
61
61
|
async function X(e) {
|
|
62
62
|
e !== v.value && (v.value = e, B(), await m());
|
|
63
63
|
}
|
|
64
|
-
ce(m),
|
|
65
|
-
let
|
|
66
|
-
|
|
67
|
-
clearTimeout(
|
|
64
|
+
ce(m), U(r, A), U([g, $], A);
|
|
65
|
+
let G;
|
|
66
|
+
U(h, () => {
|
|
67
|
+
clearTimeout(G), G = setTimeout(A, 250);
|
|
68
68
|
});
|
|
69
69
|
const i = n(/* @__PURE__ */ new Set());
|
|
70
70
|
function Y(e) {
|
|
@@ -114,7 +114,7 @@ const De = { class: "p-24 relative min-h-full" }, Ie = { class: "flex items-cent
|
|
|
114
114
|
function te(e) {
|
|
115
115
|
d.value = e;
|
|
116
116
|
}
|
|
117
|
-
async function
|
|
117
|
+
async function L() {
|
|
118
118
|
await m(), d.value && (d.value = p.value.find((e) => {
|
|
119
119
|
var a;
|
|
120
120
|
return e.id === ((a = d.value) == null ? void 0 : a.id);
|
|
@@ -134,8 +134,8 @@ const De = { class: "p-24 relative min-h-full" }, Ie = { class: "flex items-cent
|
|
|
134
134
|
}
|
|
135
135
|
return (e, a) => {
|
|
136
136
|
const s = k("FmButton"), R = k("FmSearch"), oe = k("FmButtonGroup"), ue = k("FmDialog");
|
|
137
|
-
return w(), S("div",
|
|
138
|
-
c("div",
|
|
137
|
+
return w(), S("div", Ve, [
|
|
138
|
+
c("div", De, [
|
|
139
139
|
c("h1", Te, _(t(l)("media.title")), 1),
|
|
140
140
|
c("div", ze, [
|
|
141
141
|
u(s, {
|
|
@@ -158,10 +158,10 @@ const De = { class: "p-24 relative min-h-full" }, Ie = { class: "flex items-cent
|
|
|
158
158
|
modelValue: g.value,
|
|
159
159
|
"onUpdate:modelValue": a[1] || (a[1] = (o) => g.value = o),
|
|
160
160
|
tags: y.value
|
|
161
|
-
}, null, 8, ["modelValue", "tags"])) :
|
|
161
|
+
}, null, 8, ["modelValue", "tags"])) : J("", !0),
|
|
162
162
|
c("div", Ae, [
|
|
163
163
|
c("div", Fe, [
|
|
164
|
-
i.value.size > 0 ? (w(), S("span", Re, _(t(l)("media.library.selectedCount", { count: i.value.size })), 1)) : (w(), S("span",
|
|
164
|
+
i.value.size > 0 ? (w(), S("span", Re, _(t(l)("media.library.selectedCount", { count: i.value.size })), 1)) : (w(), S("span", Ue, _(t(l)("media.library.totalSummary", { count: V.value })), 1))
|
|
165
165
|
]),
|
|
166
166
|
u(s, {
|
|
167
167
|
label: t(l)("media.library.selectAllButton"),
|
|
@@ -178,7 +178,7 @@ const De = { class: "p-24 relative min-h-full" }, Ie = { class: "flex items-cent
|
|
|
178
178
|
]),
|
|
179
179
|
u(t(be), {
|
|
180
180
|
assets: p.value,
|
|
181
|
-
loading:
|
|
181
|
+
loading: I.value,
|
|
182
182
|
view: W.value,
|
|
183
183
|
selectable: "",
|
|
184
184
|
"selected-ids": i.value,
|
|
@@ -189,14 +189,14 @@ const De = { class: "p-24 relative min-h-full" }, Ie = { class: "flex items-cent
|
|
|
189
189
|
}, null, 8, ["assets", "loading", "view", "selected-ids", "variants-by-ref-id"]),
|
|
190
190
|
u(t(we), {
|
|
191
191
|
page: v.value,
|
|
192
|
-
"page-size": t(
|
|
193
|
-
"total-resources":
|
|
194
|
-
"total-pages":
|
|
192
|
+
"page-size": t(O),
|
|
193
|
+
"total-resources": V.value,
|
|
194
|
+
"total-pages": D.value,
|
|
195
195
|
disabled: T.value,
|
|
196
196
|
"onUpdate:page": X
|
|
197
197
|
}, null, 8, ["page", "page-size", "total-resources", "total-pages", "disabled"]),
|
|
198
|
-
i.value.size > 0 ? (w(), S("div",
|
|
199
|
-
c("span",
|
|
198
|
+
i.value.size > 0 ? (w(), S("div", Ne, [
|
|
199
|
+
c("span", Oe, _(t(l)("media.library.selectedCount", { count: i.value.size })), 1),
|
|
200
200
|
u(s, {
|
|
201
201
|
label: t(l)("media.library.cancelButton"),
|
|
202
202
|
variant: "tertiary",
|
|
@@ -210,26 +210,26 @@ const De = { class: "p-24 relative min-h-full" }, Ie = { class: "flex items-cent
|
|
|
210
210
|
"prepend-icon": "delete",
|
|
211
211
|
onClick: ee
|
|
212
212
|
}, null, 8, ["label"])
|
|
213
|
-
])) :
|
|
213
|
+
])) : J("", !0),
|
|
214
214
|
u(t(_e), {
|
|
215
215
|
asset: d.value,
|
|
216
216
|
image: le.value,
|
|
217
217
|
"business-id": r.value,
|
|
218
218
|
onClose: a[3] || (a[3] = (o) => d.value = null),
|
|
219
|
-
onRenamed:
|
|
219
|
+
onRenamed: L,
|
|
220
220
|
onDeleted: se,
|
|
221
|
-
onChanged:
|
|
221
|
+
onChanged: L
|
|
222
222
|
}, null, 8, ["asset", "image", "business-id"]),
|
|
223
223
|
u(ue, {
|
|
224
224
|
modelValue: b.value,
|
|
225
225
|
"onUpdate:modelValue": a[7] || (a[7] = (o) => b.value = o),
|
|
226
226
|
"max-width": 480
|
|
227
227
|
}, {
|
|
228
|
-
"dialog-header":
|
|
228
|
+
"dialog-header": N(() => [
|
|
229
229
|
c("div", null, _(t(l)("media.library.uploadDialogTitle")), 1)
|
|
230
230
|
]),
|
|
231
|
-
"dialog-footer":
|
|
232
|
-
var o,
|
|
231
|
+
"dialog-footer": N(() => {
|
|
232
|
+
var o, q;
|
|
233
233
|
return [
|
|
234
234
|
c("div", Me, [
|
|
235
235
|
u(s, {
|
|
@@ -240,21 +240,21 @@ const De = { class: "p-24 relative min-h-full" }, Ie = { class: "flex items-cent
|
|
|
240
240
|
u(s, {
|
|
241
241
|
label: t(l)("media.library.uploadSubmitButton", { count: ((o = f.value) == null ? void 0 : o.stagedCount) ?? 0 }),
|
|
242
242
|
variant: "primary",
|
|
243
|
-
disabled: !((
|
|
243
|
+
disabled: !((q = f.value) != null && q.stagedCount) || f.value.uploading,
|
|
244
244
|
onClick: a[6] || (a[6] = (re) => {
|
|
245
|
-
var
|
|
246
|
-
return (
|
|
245
|
+
var H;
|
|
246
|
+
return (H = f.value) == null ? void 0 : H.upload();
|
|
247
247
|
})
|
|
248
248
|
}, null, 8, ["label", "disabled"])
|
|
249
249
|
])
|
|
250
250
|
];
|
|
251
251
|
}),
|
|
252
|
-
default:
|
|
252
|
+
default: N(() => [
|
|
253
253
|
u(t(xe), {
|
|
254
254
|
ref_key: "uploadPanelRef",
|
|
255
255
|
ref: f,
|
|
256
256
|
"business-id": r.value,
|
|
257
|
-
"restaurant-id":
|
|
257
|
+
"restaurant-id": E.value,
|
|
258
258
|
"available-tags": y.value,
|
|
259
259
|
onTagCreated: a[4] || (a[4] = (o) => y.value.push(o)),
|
|
260
260
|
onUploaded: ie
|
|
@@ -267,5 +267,5 @@ const De = { class: "p-24 relative min-h-full" }, Ie = { class: "flex items-cent
|
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
269
|
export {
|
|
270
|
-
|
|
270
|
+
qe as default
|
|
271
271
|
};
|
package/dist/app.js
CHANGED
|
@@ -2531,7 +2531,7 @@ const ka = [
|
|
|
2531
2531
|
{
|
|
2532
2532
|
path: "/library",
|
|
2533
2533
|
name: "$media-library",
|
|
2534
|
-
component: Ae(S(() => import("./AssetLibrary-
|
|
2534
|
+
component: Ae(S(() => import("./AssetLibrary-e042670f.js"))),
|
|
2535
2535
|
meta: {
|
|
2536
2536
|
validationManifest: {
|
|
2537
2537
|
requiredCaslPermissions: [
|
|
@@ -2546,7 +2546,7 @@ const ka = [
|
|
|
2546
2546
|
{
|
|
2547
2547
|
path: "/studio",
|
|
2548
2548
|
name: "$media-studio",
|
|
2549
|
-
component: Ae(S(() => import("./AiStudio-
|
|
2549
|
+
component: Ae(S(() => import("./AiStudio-4e54cdff.js"))),
|
|
2550
2550
|
meta: {
|
|
2551
2551
|
validationManifest: {
|
|
2552
2552
|
requiredCaslPermissions: [
|