@feedmepos/mf-menu 0.31.62-prod → 0.31.63-prod
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/{App-DlA3uekC.js → App-DdZ2oEAs.js} +8 -8
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CvYg6wUo.js → ApplyProduct.vue_vue_type_script_setup_true_lang-hgIaklws.js} +3 -3
- package/dist/{Catalog-pCWDkPMw.js → Catalog-BdStItBi.js} +6 -6
- package/dist/{Category-K5N2CBGJ.js → Category-BI8MuP1U.js} +6 -6
- package/dist/{Category-3439_r5Q.js → Category-DQHX1rHu.js} +4 -4
- package/dist/{CookingGuide-Cyyi7IeC.js → CookingGuide-7m8xMKhW.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Cnn9HS6e.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BFMtUSm2.js} +1 -1
- package/dist/{Group-DGuz80sx.js → Group-08qDreRT.js} +1 -1
- package/dist/{Group-BwZl7QvU.js → Group-Cri6NWP7.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-Dioi7hbp.js → Group.vue_vue_type_script_setup_true_lang-C0ufQsgj.js} +7 -7
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DrlPRHta.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CQeQ2QEJ.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CYk54quA.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C8dHUOS5.js} +7 -7
- package/dist/{Ingredient-C8R8JWkp.js → Ingredient-FiS5_yzS.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-B_ri8nAR.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BrwDkOc1.js} +1052 -1052
- package/dist/{LinkProductSideSheet-Bm8qMaT7.js → LinkProductSideSheet-DRZFUlZi.js} +3 -3
- package/dist/{MenuSetting-Cpbxj3Ni.js → MenuSetting-DrttWc91.js} +5 -5
- package/dist/{PrintRoute-BgmijxYc.js → PrintRoute-BT8xHemW.js} +4 -4
- package/dist/{Product-DiqN1fdt.js → Product-VPpsqPv7.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-DMWjdZTa.js → Product.vue_vue_type_script_setup_true_lang-CRA6uX3q.js} +13 -13
- package/dist/{ProductInternalTools-BZP_1J5b.js → ProductInternalTools-B2tmSi0_.js} +5 -5
- package/dist/{Products-Bu08ZHA6.js → Products-BMv8eyPx.js} +11 -11
- package/dist/{Publish-B8-JfEe6.js → Publish-Djel7vAP.js} +3 -3
- package/dist/{Recipe-BN_GjdSr.js → Recipe-UtJti2KL.js} +4 -4
- package/dist/{Scheduler-O6ZnPNiY.js → Scheduler-CNERzIh9.js} +3 -3
- package/dist/{ServingSequence-14vqMsck.js → ServingSequence-D7wc3N9l.js} +3 -3
- package/dist/{Setting-B3eolrlX.js → Setting-CZQTLkGw.js} +5 -5
- package/dist/{Subcategory-oKlgvt_O.js → Subcategory-DKW5SGrQ.js} +4 -4
- package/dist/{Takeaway-CUp7gM3P.js → Takeaway-Dgbg8uEK.js} +1 -1
- package/dist/{Takeaway-DffxlQXM.js → Takeaway-grGzGY1S.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DzdooZE-.js → Takeaway.vue_vue_type_script_setup_true_lang-DHNTa2g5.js} +5 -5
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-BrnUWSRw.js +399 -0
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CWz63sPG.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C-kpVC9N.js} +14 -14
- package/dist/{Unit-BS_4ijAX.js → Unit-CCB5fm7a.js} +2 -2
- package/dist/{Variant-B7K-0bVo.js → Variant-DRyxVBg8.js} +3 -3
- package/dist/{_id_-Ci5sMO0e.js → _id_-mDX318oW.js} +10 -10
- package/dist/{app-COwpNSVW.js → app-Dh3thmMV.js} +26 -26
- package/dist/{app-DgM8AcTU.js → app-mVaKnQIP.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/assets/{linked-status-PUg9o5oJ.js → linked-status-eZ_uOuIa.js} +2 -2
- package/dist/assets/{override-menu-DRvWZtmh.js → override-menu-rrnNKu8y.js} +2 -2
- package/dist/assets/{validate-menu-Csd9sYUc.js → validate-menu-BYm74Q9a.js} +2 -2
- package/dist/{catalog-bC-_KizS.js → catalog-t62hszII.js} +54 -54
- package/dist/{catalogSetting-yoKSQufN.js → catalogSetting-DbDHweNg.js} +1 -1
- package/dist/{category-BvOpmGjK.js → category-IkpXMGtG.js} +1 -1
- package/dist/{currency-HB9XCGKo.js → currency-CJxtxQ0A.js} +1 -1
- package/dist/{customAttributes-Cr8yjY6Y.js → customAttributes-cKBPhg8g.js} +1 -1
- package/dist/{dayjs.min-DirUy8Ue.js → dayjs.min--s0X1YKh.js} +1 -1
- package/dist/{index-DFxThJuR.js → index-CUArLbcE.js} +4 -4
- package/dist/{index-io3Jgy-r.js → index-DDqP1En5.js} +3 -3
- package/dist/{index-wXbWvFwK.js → index-DKdZmv6x.js} +1 -1
- package/dist/{index-BBof9t9B.js → index-DN5EHvBB.js} +1 -1
- package/dist/{item--StDZzCb.js → item-BBdeals1.js} +16 -16
- package/dist/{jszip.min-otrURh_M.js → jszip.min-CG2qSmh-.js} +245 -245
- package/dist/{menu-DssZNS7R.js → menu-CY9ZHgu5.js} +1 -1
- package/dist/{menu-1yBiTG7L.js → menu-WB63i3Ai.js} +4 -4
- package/dist/{menuV2-BSwBRb60.js → menuV2-szCpC02L.js} +31 -31
- package/dist/{priceTier-DlnE8t1n.js → priceTier-BbCsDoWH.js} +1 -1
- package/dist/{scheduler-DGgJqtoA.js → scheduler-CBKgNj8G.js} +4 -4
- package/dist/{subcategory-DTdhZ0HZ.js → subcategory-BY-BRWF_.js} +2 -2
- package/dist/{toExcel-CQdSIOf9.js → toExcel-AF7i8kK6.js} +2 -2
- package/dist/{unit-0vP2uHmy.js → unit-B6Fo2ltJ.js} +2 -2
- package/package.json +1 -1
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-CrgRP9X1.js +0 -411
|
@@ -1,411 +0,0 @@
|
|
|
1
|
-
import { computed as g, defineComponent as x, ref as P, resolveComponent as k, createElementBlock as b, openBlock as S, normalizeClass as O, createVNode as K, normalizeStyle as $, withCtx as B, createBlock as L, createCommentVNode as j } from "vue";
|
|
2
|
-
import { A as h, J as E, G as R, O as y, ag as A, u as C, c as G } from "./menu-1yBiTG7L.js";
|
|
3
|
-
import { u as v } from "./menuV2-BSwBRb60.js";
|
|
4
|
-
import { C as w, h as J } from "./catalog-bC-_KizS.js";
|
|
5
|
-
import { useSnackbar as N, useDialog as D } from "@feedmepos/ui-library";
|
|
6
|
-
import { a as U } from "./LinkProductSideSheet-Bm8qMaT7.js";
|
|
7
|
-
import { useI18n as q } from "@feedmepos/mf-common";
|
|
8
|
-
function H() {
|
|
9
|
-
const e = v(), o = g(() => e.categorizedRawMenuItems.filter((r) => r.items.length > 0)), c = g(() => {
|
|
10
|
-
const r = e.currentCatalog;
|
|
11
|
-
return r ? w.getItemAvailable(r).map((n) => ({ _id: n })) : [];
|
|
12
|
-
});
|
|
13
|
-
async function l(r) {
|
|
14
|
-
const n = e.currentCatalog;
|
|
15
|
-
if (!n) return;
|
|
16
|
-
const a = new Set(r), s = e.state.menu.modules.item.map((m) => m._id).reduce(
|
|
17
|
-
(m, d) => {
|
|
18
|
-
const f = n.override.items[d];
|
|
19
|
-
return m[d] = Y(
|
|
20
|
-
d,
|
|
21
|
-
f,
|
|
22
|
-
a.has(d),
|
|
23
|
-
e.version === h.F_MENU_VERSION.enum.v3
|
|
24
|
-
), m;
|
|
25
|
-
},
|
|
26
|
-
{}
|
|
27
|
-
), u = {
|
|
28
|
-
...n,
|
|
29
|
-
override: {
|
|
30
|
-
...n.override,
|
|
31
|
-
items: s
|
|
32
|
-
},
|
|
33
|
-
/**
|
|
34
|
-
* linkItemRules and items under override are two ways to manage linked items under catalog,
|
|
35
|
-
* if we changed items under override, we should clear linkItemRules to avoid conflict.
|
|
36
|
-
*/
|
|
37
|
-
linkItemRules: null
|
|
38
|
-
};
|
|
39
|
-
await e.updateMenu({
|
|
40
|
-
module: h.F_MENU_MODULE_V4_KEY.enum.catalog,
|
|
41
|
-
operation: E.F_OPERATION_TYPE.update,
|
|
42
|
-
data: u
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
async function i(r) {
|
|
46
|
-
await T(r, !0);
|
|
47
|
-
}
|
|
48
|
-
async function p(r) {
|
|
49
|
-
await T(r, !1);
|
|
50
|
-
}
|
|
51
|
-
async function _(r) {
|
|
52
|
-
const n = e.currentCatalog;
|
|
53
|
-
if (!n) return;
|
|
54
|
-
const a = {
|
|
55
|
-
...n,
|
|
56
|
-
linkItemRules: r
|
|
57
|
-
};
|
|
58
|
-
await e.updateMenu({
|
|
59
|
-
module: h.F_MENU_MODULE_V4_KEY.enum.catalog,
|
|
60
|
-
operation: E.F_OPERATION_TYPE.update,
|
|
61
|
-
data: a
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
return {
|
|
65
|
-
linkableItems: o,
|
|
66
|
-
currentItems: c,
|
|
67
|
-
applyProduct: l,
|
|
68
|
-
addProduct: i,
|
|
69
|
-
removeProduct: p,
|
|
70
|
-
saveLinkItemRules: _
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
async function T(e, o) {
|
|
74
|
-
var r;
|
|
75
|
-
const c = v(), l = c.currentCatalog;
|
|
76
|
-
if (!l || e.length === 0) return;
|
|
77
|
-
const i = c.version === h.F_MENU_VERSION.enum.v3, p = e.reduce(
|
|
78
|
-
(n, a) => {
|
|
79
|
-
const t = l.override.items[a];
|
|
80
|
-
return n[a] = Y(a, t, o, i), n;
|
|
81
|
-
},
|
|
82
|
-
{}
|
|
83
|
-
), _ = {
|
|
84
|
-
...l,
|
|
85
|
-
override: {
|
|
86
|
-
...l.override,
|
|
87
|
-
items: {
|
|
88
|
-
...((r = l.override) == null ? void 0 : r.items) || {},
|
|
89
|
-
...p
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
await c.updateMenu({
|
|
94
|
-
module: h.F_MENU_MODULE_V4_KEY.enum.catalog,
|
|
95
|
-
operation: E.F_OPERATION_TYPE.update,
|
|
96
|
-
data: _
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
function Y(e, o, c, l) {
|
|
100
|
-
const i = o == null ? void 0 : o.find((r) => !r.combinationKey), p = c ? null : h.F_ORDER_FROM.enum.NONE, _ = l ? c ? null : "" : i == null ? void 0 : i.category;
|
|
101
|
-
return [
|
|
102
|
-
{
|
|
103
|
-
...i ?? {},
|
|
104
|
-
orderFrom: p,
|
|
105
|
-
category: _,
|
|
106
|
-
_id: e
|
|
107
|
-
},
|
|
108
|
-
...(o == null ? void 0 : o.filter((r) => !!r.combinationKey)) ?? []
|
|
109
|
-
];
|
|
110
|
-
}
|
|
111
|
-
function Q() {
|
|
112
|
-
const e = v(), o = N(), c = D(), l = R(o), i = y(l), p = g(() => {
|
|
113
|
-
const n = e.categorizedRawMenuItems, a = new Set(
|
|
114
|
-
e.currentCatalog ? w.getItemAvailable(e.currentCatalog) : e.state.menu.modules.item.map((t) => t._id)
|
|
115
|
-
);
|
|
116
|
-
return n.map((t) => ({
|
|
117
|
-
...t,
|
|
118
|
-
items: t.items.filter((s) => a.has(s._id))
|
|
119
|
-
})).filter((t) => t.items.length > 0);
|
|
120
|
-
}), _ = g(() => {
|
|
121
|
-
var s;
|
|
122
|
-
const n = e.currentScheduler;
|
|
123
|
-
if (!n) return [];
|
|
124
|
-
const a = e.currentCatalog, t = a ? ((s = a.override.scheduler[n._id]) == null ? void 0 : s.items) ?? [] : n.items;
|
|
125
|
-
return [
|
|
126
|
-
...new Set(t.filter((u) => u.orderFrom != h.F_ORDER_FROM.enum.NONE).map((u) => u._id))
|
|
127
|
-
].map((u) => ({ _id: u }));
|
|
128
|
-
});
|
|
129
|
-
async function r(n) {
|
|
130
|
-
const a = e.currentScheduler;
|
|
131
|
-
if (!a) return;
|
|
132
|
-
const t = e.currentCatalog;
|
|
133
|
-
if (t && e.rules.scheduler.override) {
|
|
134
|
-
const s = new w(
|
|
135
|
-
t,
|
|
136
|
-
e,
|
|
137
|
-
i.updateMenu,
|
|
138
|
-
c
|
|
139
|
-
);
|
|
140
|
-
s.overrideCatalogSchedulerItems(n, a._id), await e.updateMenu({
|
|
141
|
-
module: h.F_MENU_MODULE_V4_KEY.enum.catalog,
|
|
142
|
-
operation: E.F_OPERATION_TYPE.update,
|
|
143
|
-
data: s.getCatalog()
|
|
144
|
-
});
|
|
145
|
-
} else {
|
|
146
|
-
const s = n.reduce(
|
|
147
|
-
(m, d) => {
|
|
148
|
-
const f = a.items.filter((I) => I._id == d) ?? [];
|
|
149
|
-
return m = m.concat(
|
|
150
|
-
A(d, f, (I) => ({
|
|
151
|
-
...I,
|
|
152
|
-
orderFrom: null
|
|
153
|
-
}))
|
|
154
|
-
), m;
|
|
155
|
-
},
|
|
156
|
-
[]
|
|
157
|
-
), u = {
|
|
158
|
-
...a,
|
|
159
|
-
items: s
|
|
160
|
-
};
|
|
161
|
-
await e.updateMenu({
|
|
162
|
-
module: h.F_MENU_MODULE_V4_KEY.enum.scheduler,
|
|
163
|
-
operation: E.F_OPERATION_TYPE.update,
|
|
164
|
-
data: u
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
return {
|
|
169
|
-
linkableItems: p,
|
|
170
|
-
currentItems: _,
|
|
171
|
-
applyProduct: r
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
const W = () => {
|
|
175
|
-
const e = C(), o = N(), c = R(o), l = y(c), i = g(() => e.categorizedRawMenuItems.filter((n) => n.items.length > 0)), p = g(() => {
|
|
176
|
-
const n = e.currentCatalog;
|
|
177
|
-
return n ? w.getItemAvailable(n).map((a) => ({ _id: a })) : [];
|
|
178
|
-
});
|
|
179
|
-
async function _(n) {
|
|
180
|
-
const a = e.currentCatalog;
|
|
181
|
-
if (!a) return;
|
|
182
|
-
const t = new Set(n), u = e.state.menu.modules.item.map((d) => d._id).reduce(
|
|
183
|
-
(d, f) => {
|
|
184
|
-
const I = a.override.items[f];
|
|
185
|
-
return d[f] = J(
|
|
186
|
-
f,
|
|
187
|
-
I,
|
|
188
|
-
t.has(f),
|
|
189
|
-
e.version === G.F_MENU_VERSION.v3
|
|
190
|
-
), d;
|
|
191
|
-
},
|
|
192
|
-
{}
|
|
193
|
-
), m = {
|
|
194
|
-
...a,
|
|
195
|
-
override: { ...a.override, items: u },
|
|
196
|
-
/**
|
|
197
|
-
* linkItemRules and items under override are two ways to manage linked items under catalog,
|
|
198
|
-
* if we changed items under override, we should clear linkItemRules to avoid conflict.
|
|
199
|
-
*/
|
|
200
|
-
linkItemRules: null
|
|
201
|
-
};
|
|
202
|
-
await l.updateMenu(
|
|
203
|
-
{
|
|
204
|
-
module: h.F_MENU_MODULE_V4_KEY.enum.catalog,
|
|
205
|
-
operation: E.F_OPERATION_TYPE.update,
|
|
206
|
-
data: m
|
|
207
|
-
},
|
|
208
|
-
m.name
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
async function r(n) {
|
|
212
|
-
const a = e.currentCatalog;
|
|
213
|
-
if (!a) return;
|
|
214
|
-
const t = {
|
|
215
|
-
...a,
|
|
216
|
-
linkItemRules: n
|
|
217
|
-
};
|
|
218
|
-
await l.updateMenu(
|
|
219
|
-
{
|
|
220
|
-
module: h.F_MENU_MODULE_V4_KEY.enum.catalog,
|
|
221
|
-
operation: E.F_OPERATION_TYPE.update,
|
|
222
|
-
data: t
|
|
223
|
-
},
|
|
224
|
-
t.name
|
|
225
|
-
);
|
|
226
|
-
}
|
|
227
|
-
return {
|
|
228
|
-
linkableItems: i,
|
|
229
|
-
currentItems: p,
|
|
230
|
-
applyProduct: _,
|
|
231
|
-
saveLinkItemRules: r
|
|
232
|
-
};
|
|
233
|
-
}, X = () => {
|
|
234
|
-
const e = C(), o = N(), c = D(), l = R(o), i = y(l), p = g(() => {
|
|
235
|
-
const n = e.categorizedRawMenuItems, a = new Set(
|
|
236
|
-
e.currentCatalog ? w.getItemAvailable(e.currentCatalog) : e.state.menu.modules.item.map((t) => t._id)
|
|
237
|
-
);
|
|
238
|
-
return n.map((t) => ({
|
|
239
|
-
...t,
|
|
240
|
-
items: t.items.filter((s) => a.has(s._id))
|
|
241
|
-
})).filter((t) => t.items.length > 0);
|
|
242
|
-
}), _ = g(() => {
|
|
243
|
-
var s;
|
|
244
|
-
const n = e.currentScheduler;
|
|
245
|
-
if (!n) return [];
|
|
246
|
-
const a = e.currentCatalog, t = a ? ((s = a.override.scheduler[n._id]) == null ? void 0 : s.items) ?? [] : n.items;
|
|
247
|
-
return [
|
|
248
|
-
...new Set(t.filter((u) => u.orderFrom != h.F_ORDER_FROM.enum.NONE).map((u) => u._id))
|
|
249
|
-
].map((u) => ({ _id: u }));
|
|
250
|
-
});
|
|
251
|
-
async function r(n) {
|
|
252
|
-
const a = e.currentScheduler;
|
|
253
|
-
if (!a) return;
|
|
254
|
-
const t = e.currentCatalog;
|
|
255
|
-
if (t && e.rules.scheduler.override) {
|
|
256
|
-
const s = new w(t, e, i.updateMenu, c);
|
|
257
|
-
s.overrideCatalogSchedulerItems(n, a._id), await s.update();
|
|
258
|
-
} else {
|
|
259
|
-
const s = n.reduce(
|
|
260
|
-
(m, d) => {
|
|
261
|
-
const f = a.items.filter((I) => I._id == d) ?? [];
|
|
262
|
-
return m = m.concat(
|
|
263
|
-
A(d, f, (I) => ({
|
|
264
|
-
...I,
|
|
265
|
-
orderFrom: null
|
|
266
|
-
}))
|
|
267
|
-
), m;
|
|
268
|
-
},
|
|
269
|
-
[]
|
|
270
|
-
), u = {
|
|
271
|
-
...a,
|
|
272
|
-
items: s
|
|
273
|
-
};
|
|
274
|
-
await i.updateMenu(
|
|
275
|
-
{
|
|
276
|
-
module: h.F_MENU_MODULE_V4_KEY.enum.scheduler,
|
|
277
|
-
operation: E.F_OPERATION_TYPE.update,
|
|
278
|
-
data: u
|
|
279
|
-
},
|
|
280
|
-
u.name
|
|
281
|
-
);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
return {
|
|
285
|
-
linkableItems: p,
|
|
286
|
-
currentItems: _,
|
|
287
|
-
applyProduct: r
|
|
288
|
-
};
|
|
289
|
-
};
|
|
290
|
-
function ue(e) {
|
|
291
|
-
const o = {
|
|
292
|
-
// Under FdoMenuV4Category _id is string, but here we need null for Addon, so we bypass the type checking
|
|
293
|
-
// @ts-ignore
|
|
294
|
-
_id: null,
|
|
295
|
-
name: "Addon",
|
|
296
|
-
position: 0
|
|
297
|
-
};
|
|
298
|
-
if (!e) {
|
|
299
|
-
const t = C(), s = g(() => t.state.menu.modules.item ?? []), u = g(() => {
|
|
300
|
-
var M;
|
|
301
|
-
return ((M = t.currentCatalog) == null ? void 0 : M.linkItemRules) ?? null;
|
|
302
|
-
}), m = X(), d = W(), f = g(() => !t.state.currentSchedulerId), I = (M) => {
|
|
303
|
-
if (M.mode === U.Rules)
|
|
304
|
-
d.saveLinkItemRules(M.linkItemRules);
|
|
305
|
-
else {
|
|
306
|
-
const F = M.items.map((V) => V._id);
|
|
307
|
-
f.value ? d.applyProduct(F) : m.applyProduct(F);
|
|
308
|
-
}
|
|
309
|
-
}, z = g(() => [o, ...t.state.menu.modules.category ?? []]);
|
|
310
|
-
return {
|
|
311
|
-
menuItems: s,
|
|
312
|
-
categories: z,
|
|
313
|
-
linkItemRules: u,
|
|
314
|
-
catalogManager: d,
|
|
315
|
-
schedulerManager: m,
|
|
316
|
-
noScheduler: f,
|
|
317
|
-
handleSubmit: I
|
|
318
|
-
};
|
|
319
|
-
}
|
|
320
|
-
const c = v(), l = g(() => c.state.menu.modules.item ?? []), i = g(() => {
|
|
321
|
-
var t;
|
|
322
|
-
return ((t = c.currentCatalog) == null ? void 0 : t.linkItemRules) ?? null;
|
|
323
|
-
}), p = Q(), _ = H(), r = g(() => !c.state.currentSchedulerId), n = (t) => {
|
|
324
|
-
if (t.mode === U.Rules)
|
|
325
|
-
_.saveLinkItemRules(t.linkItemRules);
|
|
326
|
-
else {
|
|
327
|
-
const s = t.items.map((u) => u._id);
|
|
328
|
-
r.value ? _.applyProduct(s) : p.applyProduct(s);
|
|
329
|
-
}
|
|
330
|
-
}, a = g(() => [o, ...c.state.menu.modules.category ?? []]);
|
|
331
|
-
return {
|
|
332
|
-
menuItems: l,
|
|
333
|
-
categories: a,
|
|
334
|
-
linkItemRules: i,
|
|
335
|
-
catalogManager: _,
|
|
336
|
-
schedulerManager: p,
|
|
337
|
-
noScheduler: r,
|
|
338
|
-
handleSubmit: n
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
const Z = ["alt", "src", "crossorigin"], ce = /* @__PURE__ */ x({
|
|
342
|
-
__name: "Thumbnail",
|
|
343
|
-
props: {
|
|
344
|
-
src: {},
|
|
345
|
-
alt: {},
|
|
346
|
-
className: {},
|
|
347
|
-
size: {},
|
|
348
|
-
crossorigin: { type: Boolean, default: !0 }
|
|
349
|
-
},
|
|
350
|
-
setup(e) {
|
|
351
|
-
const o = e, { t: c } = q(), l = P(!1), i = P(!o.src), p = () => {
|
|
352
|
-
l.value = !1, i.value = !0;
|
|
353
|
-
}, _ = () => {
|
|
354
|
-
l.value = !0, i.value = !0;
|
|
355
|
-
}, r = g(() => o.alt ? c("menu.thumbnail.alt.with_name", { name: o.alt }) : c("menu.thumbnail.alt.default")), n = g(() => typeof o.size == "number" ? {
|
|
356
|
-
width: o.size,
|
|
357
|
-
height: o.size
|
|
358
|
-
} : {
|
|
359
|
-
width: o.size.width,
|
|
360
|
-
height: o.size.height
|
|
361
|
-
}), a = g(() => {
|
|
362
|
-
if (!o.src) return null;
|
|
363
|
-
if (o.crossorigin) {
|
|
364
|
-
const t = o.src.includes("?") ? "&" : "?";
|
|
365
|
-
return `${o.src}${t}_cors=${Date.now()}`;
|
|
366
|
-
}
|
|
367
|
-
return o.src;
|
|
368
|
-
});
|
|
369
|
-
return (t, s) => {
|
|
370
|
-
const u = k("fm-icon"), m = k("fm-card");
|
|
371
|
-
return S(), b("div", {
|
|
372
|
-
class: O([t.className, "flex items-center justify-center"])
|
|
373
|
-
}, [
|
|
374
|
-
K(m, {
|
|
375
|
-
class: O(["flex items-center justify-center", "rounded-md"]),
|
|
376
|
-
style: $({ width: `${n.value.width}px`, height: `${n.value.height}px` }),
|
|
377
|
-
variant: "outlined"
|
|
378
|
-
}, {
|
|
379
|
-
default: B(() => [
|
|
380
|
-
a.value && !l.value ? (S(), b("img", {
|
|
381
|
-
key: 0,
|
|
382
|
-
alt: r.value,
|
|
383
|
-
class: O(["w-full h-full", "object-cover", i.value ? "" : "hidden"]),
|
|
384
|
-
src: a.value,
|
|
385
|
-
crossorigin: o.crossorigin ? "anonymous" : void 0,
|
|
386
|
-
onError: _,
|
|
387
|
-
onLoad: p
|
|
388
|
-
}, null, 42, Z)) : (S(), L(u, {
|
|
389
|
-
key: 1,
|
|
390
|
-
color: "neutral-gray-300",
|
|
391
|
-
name: "image",
|
|
392
|
-
outline: ""
|
|
393
|
-
})),
|
|
394
|
-
i.value ? j("", !0) : (S(), L(u, {
|
|
395
|
-
key: 2,
|
|
396
|
-
class: "animate-spin",
|
|
397
|
-
name: "progress_activity",
|
|
398
|
-
spin: ""
|
|
399
|
-
}))
|
|
400
|
-
]),
|
|
401
|
-
_: 1
|
|
402
|
-
}, 8, ["style"])
|
|
403
|
-
], 2);
|
|
404
|
-
};
|
|
405
|
-
}
|
|
406
|
-
});
|
|
407
|
-
export {
|
|
408
|
-
ce as _,
|
|
409
|
-
H as a,
|
|
410
|
-
ue as u
|
|
411
|
-
};
|