@feedmepos/mf-menu 0.31.33-beta.6 → 0.31.33-beta.8
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-Dt6RQiUh.js → App-BAMi-a9P.js} +6 -6
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-B_SQpWg7.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BWgnvXjy.js} +20 -20
- package/dist/{Catalog-CFx7t_Nu.js → Catalog-DiPY42vz.js} +6 -6
- package/dist/{Category-CPMx86rY.js → Category-B9jnFDvG.js} +14 -14
- package/dist/{Category-OjK-v--G.js → Category-ClrACB2e.js} +19 -19
- package/dist/{CookingGuide-ANnXKBjc.js → CookingGuide-1553FWRH.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-D-1OzZ-i.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DWNx15iJ.js} +1 -1
- package/dist/{Group-K4925_bP.js → Group-DLahX8qi.js} +3 -3
- package/dist/{Group--DJjkGab.js → Group-l_-qZSyF.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-36O78xv0.js → Group.vue_vue_type_script_setup_true_lang-PNpEgEGB.js} +9 -9
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DoVyIdTN.js +364 -0
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-C-z1m3jh.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DSspLK4i.js} +12597 -12946
- package/dist/{Ingredient-G4Txx6_0.js → Ingredient-SsBtwYjB.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-HgHBlflo.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DqnVkfjW.js} +2 -2
- package/dist/LinkProductSideSheet-CncbzDh3.js +335 -0
- package/dist/{MenuSetting-Cx-EHG-6.js → MenuSetting-D28a3uD4.js} +4 -4
- package/dist/{PrintRoute-IxHGvGzF.js → PrintRoute-BdlT0DDr.js} +89 -88
- package/dist/{Product-D1gqn5J6.js → Product-s5Q4wV8i.js} +1 -1
- package/dist/Product.vue_vue_type_script_setup_true_lang-C6iDgQEU.js +1575 -0
- package/dist/{ProductInternalTools-GJ2OE5gU.js → ProductInternalTools-DjSkvzw2.js} +5 -5
- package/dist/Products-B3tF_gCa.js +283 -0
- package/dist/{Publish-C86rd413.js → Publish-G4bwUpme.js} +3 -3
- package/dist/{Recipe-BbQKou9p.js → Recipe-BxgHUzb5.js} +4 -4
- package/dist/{Scheduler-DUeTkyGQ.js → Scheduler-DJSKWS-9.js} +3 -3
- package/dist/{ServingSequence-BROo5rC_.js → ServingSequence-_cmuGKlV.js} +3 -3
- package/dist/{Setting-D-ueTlwO.js → Setting-Dx7ycxAn.js} +5 -5
- package/dist/{Subcategory-DVewA8HX.js → Subcategory-25AzJQYt.js} +4 -4
- package/dist/{Takeaway-DyPjHuCl.js → Takeaway-Bmm9d5PO.js} +1 -1
- package/dist/{Takeaway-B4lDGQDh.js → Takeaway-CcFK-Y2z.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BTDlzYuX.js → Takeaway.vue_vue_type_script_setup_true_lang-Bl5OAG3c.js} +5 -5
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-B3-ypwE7.js +431 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D2gzS8Q_.js +5990 -0
- package/dist/{Unit-CVF0dom4.js → Unit-Cs1EOuyg.js} +2 -2
- package/dist/{Variant-DmccAgFU.js → Variant-BTCkw4RC.js} +3 -3
- package/dist/_id_-C9b2WHzy.js +202 -0
- package/dist/{app-ClinzawZ.js → app-BhI1mPRh.js} +1 -1
- package/dist/{app-CV_q8OdE.js → app-CU2frfPB.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesSelector.vue.d.ts +33 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/catalog.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +3 -1
- package/dist/apps/mf-menu/src/composable/customAttributes.d.ts +8 -0
- package/dist/apps/mf-menu/src/composable/linkProducts.d.ts +1276 -0
- package/dist/apps/mf-menu/src/types/linkProducts.d.ts +21 -0
- package/dist/apps/mf-menu/src/views/PrintRoute/PrintDepartmentDialog.vue.d.ts +5 -3
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-fZD691Js.js → linked-status-r8YcmOs7.js} +12 -12
- package/dist/assets/{override-menu-Cjy1BJuz.js → override-menu-CDLCS1zK.js} +12 -12
- package/dist/assets/{validate-menu-uwysUwDP.js → validate-menu-B-FxrVmM.js} +12 -12
- package/dist/{catalog-Wx88K6iI.js → catalog-BudDGPc1.js} +1 -1
- package/dist/{catalogSetting-DTEHDSAd.js → catalogSetting-Bk1QEBg5.js} +1 -1
- package/dist/{category-BRTw76Vf.js → category-UDpJb7Yh.js} +1 -1
- package/dist/{currency-562bPc2l.js → currency-BQIQArxm.js} +1 -1
- package/dist/{dayjs.min-Cnfm8bQm.js → dayjs.min-D0EjAkx4.js} +1 -1
- package/dist/{index-Crs_eZ0i.js → index-B_V5s58T.js} +1 -1
- package/dist/{index-DJXrJdeQ.js → index-CirrSmpA.js} +3 -3
- package/dist/index-DRuDRGm-.js +213 -0
- package/dist/{index-4hf9vONw.js → index-Dy-u7imh.js} +3 -3
- package/dist/{item-CuIxc9FT.js → item-C45Oe5Un.js} +196 -194
- package/dist/{jszip.min-C9xLIvo4.js → jszip.min-BR_8QNuk.js} +545 -545
- package/dist/{menu-Mkzv9c8C.js → menu-D52oU1sw.js} +1 -1
- package/dist/{menu-ILWxqJQe.js → menu-DTlhFcnq.js} +6882 -6858
- package/dist/menuV2-DQtEtGVV.js +707 -0
- package/dist/mf-menu.css +1 -1
- package/dist/{priceTier-D4joq_kN.js → priceTier-CDyccedV.js} +1 -1
- package/dist/{scheduler-DuxWoNVb.js → scheduler-DHjrtU8G.js} +16 -17
- package/dist/subcategory-0ajMWsb2.js +148 -0
- package/dist/{toExcel-hGfpS_Uo.js → toExcel-BNKDwOzQ.js} +2 -2
- package/dist/{unit-9fycj1fu.js → unit-CBe6cpyB.js} +5 -4
- package/package.json +3 -3
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
- package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BIX-gPUO.js +0 -372
- package/dist/LinkProductSideSheet-CWNarCEs.js +0 -112
- package/dist/Product.vue_vue_type_script_setup_true_lang-BCQd-ks4.js +0 -1641
- package/dist/Products-DJqgSe-Y.js +0 -270
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-DzQ8_6Bi.js +0 -71
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B5BAKDRP.js +0 -6149
- package/dist/_id_-CWtK62Fy.js +0 -178
- package/dist/apps/mf-menu/src/components/feature/AttributesSelector.vue.d.ts +0 -2
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductSideSheet.vue.d.ts +0 -70
- package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductUnifiedSideSheet.vue.d.ts +0 -12
- package/dist/customAttributes-CXzd5ud1.js +0 -33
- package/dist/index-Ce4v8o7D.js +0 -106
- package/dist/subcategory-CLLMagXY.js +0 -817
- /package/dist/{app-DvG3mOom.js → LinkProductSideSheet.vue_vue_type_style_index_0_scoped_7d7fe73f_lang-DvG3mOom.js} +0 -0
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Y, computed as g, ref as z, resolveComponent as h, createBlock as y, openBlock as d, unref as e, withCtx as m, createElementVNode as u, toDisplayString as U, createVNode as a, createCommentVNode as L, createElementBlock as D, Fragment as T } from "vue";
|
|
2
|
-
import { D as C } from "./dayjs.min-Cnfm8bQm.js";
|
|
3
|
-
import { u as W, a as X, M as ee, w as te } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-C-z1m3jh.js";
|
|
4
|
-
import { J as oe, F as ne } from "./jszip.min-C9xLIvo4.js";
|
|
5
|
-
import { u as q, D as G, A as I, e as H, G as O, B as ae, H as N, I as B } from "./menu-ILWxqJQe.js";
|
|
6
|
-
import { useCoreStore as re, useI18n as se } from "@feedmepos/mf-common";
|
|
7
|
-
import { useDialog as j, useDialogChild as ie, useSnackbar as J, useBreakpoints as le, FmButtonVariant as $, FmButtonColorThemeVariant as M } from "@feedmepos/ui-library";
|
|
8
|
-
import { _ as V } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
9
|
-
import { _ as ue, a as P } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
10
|
-
import { _ as ce } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
11
|
-
import { u as me, a as de } from "./menu-Mkzv9c8C.js";
|
|
12
|
-
import { u as pe } from "./item-CuIxc9FT.js";
|
|
13
|
-
import { _ as A, a as fe } from "./Product.vue_vue_type_script_setup_true_lang-BCQd-ks4.js";
|
|
14
|
-
import { L as R } from "./LinkProductSideSheet-CWNarCEs.js";
|
|
15
|
-
import { _ as _e } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B5BAKDRP.js";
|
|
16
|
-
import { m as ve } from "./toExcel-hGfpS_Uo.js";
|
|
17
|
-
const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "flex justify-end gap-8" }, xe = /* @__PURE__ */ Y({
|
|
18
|
-
__name: "ConfirmActionDialog",
|
|
19
|
-
props: {
|
|
20
|
-
description: {},
|
|
21
|
-
value: {},
|
|
22
|
-
message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
|
|
23
|
-
},
|
|
24
|
-
setup(F) {
|
|
25
|
-
const t = F, S = g(() => t.message.replace("[[value]]", t.value)), r = z(""), w = j(), { emitAction: x } = ie();
|
|
26
|
-
return (p, s) => {
|
|
27
|
-
const i = h("FmTextField"), f = h("FmButton"), b = h("FmForm");
|
|
28
|
-
return d(), y(b, {
|
|
29
|
-
"on-validation-success": () => e(x)("primary"),
|
|
30
|
-
"blame-form-child-on-validation-failed": ""
|
|
31
|
-
}, {
|
|
32
|
-
default: m(() => [
|
|
33
|
-
u("div", ge, [
|
|
34
|
-
u("div", null, U(p.description), 1),
|
|
35
|
-
u("div", { innerHTML: S.value }, null, 8, be),
|
|
36
|
-
u("div", null, [
|
|
37
|
-
a(i, {
|
|
38
|
-
modelValue: r.value,
|
|
39
|
-
"onUpdate:modelValue": [
|
|
40
|
-
s[0] || (s[0] = (l) => r.value = l),
|
|
41
|
-
s[1] || (s[1] = () => {
|
|
42
|
-
})
|
|
43
|
-
],
|
|
44
|
-
placeholder: p.value,
|
|
45
|
-
rules: [(l) => l === p.value || "Value does not match"]
|
|
46
|
-
}, null, 8, ["modelValue", "placeholder", "rules"])
|
|
47
|
-
]),
|
|
48
|
-
u("div", ye, [
|
|
49
|
-
a(f, {
|
|
50
|
-
label: "Cancel",
|
|
51
|
-
variant: "secondary",
|
|
52
|
-
onClick: s[2] || (s[2] = (l) => e(w).close())
|
|
53
|
-
}),
|
|
54
|
-
a(f, {
|
|
55
|
-
label: "Confirm",
|
|
56
|
-
type: "submit"
|
|
57
|
-
})
|
|
58
|
-
])
|
|
59
|
-
])
|
|
60
|
-
]),
|
|
61
|
-
_: 1
|
|
62
|
-
}, 8, ["on-validation-success"]);
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
}), ke = /* @__PURE__ */ Y({
|
|
66
|
-
__name: "Migrate",
|
|
67
|
-
setup(F) {
|
|
68
|
-
const t = q(), S = re(), r = J(), { minor: w } = G(r), x = z(!1), p = j();
|
|
69
|
-
async function s() {
|
|
70
|
-
i.value || x.value || p.open({
|
|
71
|
-
title: "Migrate to new version",
|
|
72
|
-
contentComponent: xe,
|
|
73
|
-
contentComponentProps: {
|
|
74
|
-
value: "MIGRATE",
|
|
75
|
-
description: "Do you want to migrate to new version? Once migrate it will unable to revert to the older version."
|
|
76
|
-
}
|
|
77
|
-
}).onPrimary(async () => {
|
|
78
|
-
p.close(), await w(
|
|
79
|
-
async () => {
|
|
80
|
-
await t.migrate(), setTimeout(() => {
|
|
81
|
-
window.location.reload();
|
|
82
|
-
}, 2e3);
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
isLoading: x,
|
|
86
|
-
customId: t.state.menu._id,
|
|
87
|
-
message: "Migrating menu",
|
|
88
|
-
successMessage: "Migration completed"
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
const i = g(() => {
|
|
94
|
-
const f = S.restaurants.value;
|
|
95
|
-
if (!f.length) return "Required at least one restaurant to migrate";
|
|
96
|
-
const b = f.filter((k) => !k.posVersion || !I.Pos.canUse({ feature: H.F_FEATURE.enum.menuV4, posVersion: k.posVersion }));
|
|
97
|
-
return b.length ? `Upgrade POS to V${I.Pos.minVersionToUse(H.F_FEATURE.enum.menuV4)} to use new menu: ${b.map((k) => k.profile.name).join(", ")}` : null;
|
|
98
|
-
});
|
|
99
|
-
return g(() => i.value ? i.value : "Migrate your menu to new version to enjoy more features. Content of new menu will remain the same as current."), (f, b) => {
|
|
100
|
-
const l = h("FmSnackbar");
|
|
101
|
-
return !i.value && e(t).version !== e(O.F_MENU_VERSION).enum.v4 ? (d(), y(l, {
|
|
102
|
-
key: 0,
|
|
103
|
-
class: "!max-w-full",
|
|
104
|
-
title: "New version of menu is out now!",
|
|
105
|
-
description: "Migrate your current menu version to the latest to enjoy more features such as product sequential dispatch, serving sequence, scheduler and more! Your content and current setting will be preserved.",
|
|
106
|
-
variant: "info",
|
|
107
|
-
action: "Migrate",
|
|
108
|
-
"z-index": 0,
|
|
109
|
-
onOnAction: s
|
|
110
|
-
})) : L("", !0);
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
}), Me = { class: "flex-1 flex justify-between gap-8 pl-8" }, Se = { class: "flex items-center" }, we = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ce = { class: "fm-typo-en-body-md-600 font-semibold" }, he = { class: "flex gap-8" }, Le = /* @__PURE__ */ Y({
|
|
114
|
-
__name: "Products",
|
|
115
|
-
setup(F) {
|
|
116
|
-
const { t } = se(), S = G(J()), r = q(), w = g(() => r.rules.item), x = pe(), p = g(() => !r.state.currentSchedulerId), s = W(), i = X(), { selectedCategories: f } = me(), b = g(() => ({
|
|
117
|
-
...ae.menuV4ToV3(N(r.state.menu)),
|
|
118
|
-
_id: r.state.menu._id,
|
|
119
|
-
_rev: r.state.menu._rev
|
|
120
|
-
})), l = g(() => {
|
|
121
|
-
const c = B.flatten(f.value.map((o) => o.items));
|
|
122
|
-
return B.uniqBy(c, (o) => o._id).length;
|
|
123
|
-
});
|
|
124
|
-
async function k(c, o) {
|
|
125
|
-
const _ = new oe();
|
|
126
|
-
for (let v = 0; v < c.length; v++) {
|
|
127
|
-
const Q = await c[v].xlsx.writeBuffer();
|
|
128
|
-
_.file(`${o[v]}.xlsx`, Q);
|
|
129
|
-
}
|
|
130
|
-
const n = await _.generateAsync({ type: "blob" });
|
|
131
|
-
ne.saveAs(n, `books_${C().format("DD-MM-YYYY_HH-mm")}.zip`);
|
|
132
|
-
}
|
|
133
|
-
async function E() {
|
|
134
|
-
await S.minor(
|
|
135
|
-
async () => {
|
|
136
|
-
if (await r.readMenu(), r.version === O.F_MENU_VERSION.enum.v4) {
|
|
137
|
-
const c = N(r.state.menu), o = new ee(c).exportToExcel(), _ = [
|
|
138
|
-
`menu_${C().format("DD-MM-YYYY_HH-mm")}`,
|
|
139
|
-
`addonGroup_${C().format("DD-MM-YYYY_HH-mm")}`,
|
|
140
|
-
`itemLinkedAddon${C().format("DD-MM-YYYY_HH-mm")}`
|
|
141
|
-
];
|
|
142
|
-
k(o, _);
|
|
143
|
-
} else {
|
|
144
|
-
const c = ve(b.value), o = `menu_${C().format("DD-MM-YYYY_HH-mm")}`;
|
|
145
|
-
await te(c, `${o}.xlsx`, {
|
|
146
|
-
bookType: "xlsx",
|
|
147
|
-
bookSST: !1,
|
|
148
|
-
type: "array"
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
{ successMessage: "Menu exported", customId: r.state.menu._id }
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
const Z = le(), K = g(() => Z.breakpoints.value.xs);
|
|
156
|
-
return de().resetOnMount(), (c, o) => {
|
|
157
|
-
const _ = h("fm-button");
|
|
158
|
-
return d(), y(ce, {
|
|
159
|
-
heading: e(t)("menu.products.title")
|
|
160
|
-
}, {
|
|
161
|
-
default: m(() => [
|
|
162
|
-
a(ke),
|
|
163
|
-
a(fe)
|
|
164
|
-
]),
|
|
165
|
-
"append-heading": m(() => [
|
|
166
|
-
u("div", Me, [
|
|
167
|
-
u("div", Se, [
|
|
168
|
-
u("div", we, [
|
|
169
|
-
u("p", Ce, U(l.value), 1)
|
|
170
|
-
])
|
|
171
|
-
]),
|
|
172
|
-
u("div", he, [
|
|
173
|
-
K.value ? (d(), y(A, { key: 1 }, {
|
|
174
|
-
default: m(({ trigger: n }) => [
|
|
175
|
-
a(ue, null, {
|
|
176
|
-
default: m(() => [
|
|
177
|
-
a(P, {
|
|
178
|
-
label: e(t)("menu.products.actions.export"),
|
|
179
|
-
onClick: E
|
|
180
|
-
}, null, 8, ["label"]),
|
|
181
|
-
a(P, {
|
|
182
|
-
label: e(t)("menu.products.actions.import"),
|
|
183
|
-
onClick: n
|
|
184
|
-
}, null, 8, ["label", "onClick"])
|
|
185
|
-
]),
|
|
186
|
-
_: 2
|
|
187
|
-
}, 1024)
|
|
188
|
-
]),
|
|
189
|
-
_: 1
|
|
190
|
-
})) : (d(), D(T, { key: 0 }, [
|
|
191
|
-
a(_e, null, {
|
|
192
|
-
default: m(({ trigger: n }) => [
|
|
193
|
-
a(_, {
|
|
194
|
-
label: e(t)("menu.tree_editor.title"),
|
|
195
|
-
"bg-color": e(M).NeutralGray100,
|
|
196
|
-
"text-color": e(M).TypoSecondary,
|
|
197
|
-
variant: e($).Primary,
|
|
198
|
-
onClick: n
|
|
199
|
-
}, null, 8, ["label", "bg-color", "text-color", "variant", "onClick"])
|
|
200
|
-
]),
|
|
201
|
-
_: 1
|
|
202
|
-
}),
|
|
203
|
-
a(_, {
|
|
204
|
-
"bg-color": e(M).NeutralGray100,
|
|
205
|
-
"text-color": e(M).TypoSecondary,
|
|
206
|
-
variant: e($).Primary,
|
|
207
|
-
label: e(t)("menu.products.actions.export"),
|
|
208
|
-
onClick: E
|
|
209
|
-
}, null, 8, ["bg-color", "text-color", "variant", "label"]),
|
|
210
|
-
a(A, null, {
|
|
211
|
-
default: m(({ trigger: n }) => [
|
|
212
|
-
a(_, {
|
|
213
|
-
"bg-color": e(M).NeutralGray100,
|
|
214
|
-
"text-color": e(M).TypoSecondary,
|
|
215
|
-
variant: e($).Primary,
|
|
216
|
-
label: e(t)("menu.products.actions.import"),
|
|
217
|
-
onClick: n
|
|
218
|
-
}, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
|
|
219
|
-
]),
|
|
220
|
-
_: 1
|
|
221
|
-
})
|
|
222
|
-
], 64)),
|
|
223
|
-
l.value > 0 ? (d(), D(T, { key: 2 }, [
|
|
224
|
-
w.value.create ? (d(), y(V, {
|
|
225
|
-
key: 0,
|
|
226
|
-
label: e(t)("menu.products.actions.add"),
|
|
227
|
-
"prepend-icon": "add",
|
|
228
|
-
onClick: o[0] || (o[0] = (n) => e(x).create(null))
|
|
229
|
-
}, null, 8, ["label"])) : p.value ? (d(), y(R, {
|
|
230
|
-
key: 1,
|
|
231
|
-
"categorized-items": e(s).linkableItems.value,
|
|
232
|
-
"initial-value": e(s).currentItems.value,
|
|
233
|
-
"show-variant": !1,
|
|
234
|
-
onSubmit: o[1] || (o[1] = (n) => e(s).applyProduct(n.map((v) => v._id)))
|
|
235
|
-
}, {
|
|
236
|
-
default: m(({ trigger: n }) => [
|
|
237
|
-
a(V, {
|
|
238
|
-
label: e(t)("menu.products.actions.link"),
|
|
239
|
-
"prepend-icon": "link",
|
|
240
|
-
onClick: n
|
|
241
|
-
}, null, 8, ["label", "onClick"])
|
|
242
|
-
]),
|
|
243
|
-
_: 1
|
|
244
|
-
}, 8, ["categorized-items", "initial-value"])) : (d(), y(R, {
|
|
245
|
-
key: 2,
|
|
246
|
-
"categorized-items": e(i).linkableItems.value,
|
|
247
|
-
"initial-value": e(i).currentItems.value,
|
|
248
|
-
"show-variant": !1,
|
|
249
|
-
onSubmit: o[2] || (o[2] = (n) => e(i).applyProduct(n.map((v) => v._id)))
|
|
250
|
-
}, {
|
|
251
|
-
default: m(({ trigger: n }) => [
|
|
252
|
-
a(V, {
|
|
253
|
-
label: e(t)("menu.products.actions.apply_scheduler"),
|
|
254
|
-
onClick: n
|
|
255
|
-
}, null, 8, ["label", "onClick"])
|
|
256
|
-
]),
|
|
257
|
-
_: 1
|
|
258
|
-
}, 8, ["categorized-items", "initial-value"]))
|
|
259
|
-
], 64)) : L("", !0)
|
|
260
|
-
])
|
|
261
|
-
])
|
|
262
|
-
]),
|
|
263
|
-
_: 1
|
|
264
|
-
}, 8, ["heading"]);
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
export {
|
|
269
|
-
Le as default
|
|
270
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { defineComponent as w, ref as m, computed as r, resolveComponent as d, createElementBlock as h, openBlock as n, normalizeClass as a, createVNode as z, normalizeStyle as x, withCtx as k, createBlock as f, createCommentVNode as b } from "vue";
|
|
2
|
-
import { useI18n as C } from "@feedmepos/mf-common";
|
|
3
|
-
const $ = ["alt", "src", "crossorigin"], E = /* @__PURE__ */ w({
|
|
4
|
-
__name: "Thumbnail",
|
|
5
|
-
props: {
|
|
6
|
-
src: {},
|
|
7
|
-
alt: {},
|
|
8
|
-
className: {},
|
|
9
|
-
size: {},
|
|
10
|
-
crossorigin: { type: Boolean, default: !0 }
|
|
11
|
-
},
|
|
12
|
-
setup(p) {
|
|
13
|
-
const e = p, { t: l } = C(), o = m(!1), t = m(!e.src), _ = () => {
|
|
14
|
-
o.value = !1, t.value = !0;
|
|
15
|
-
}, v = () => {
|
|
16
|
-
o.value = !0, t.value = !0;
|
|
17
|
-
}, g = r(() => e.alt ? l("menu.thumbnail.alt.with_name", { name: e.alt }) : l("menu.thumbnail.alt.default")), i = r(() => typeof e.size == "number" ? {
|
|
18
|
-
width: e.size,
|
|
19
|
-
height: e.size
|
|
20
|
-
} : {
|
|
21
|
-
width: e.size.width,
|
|
22
|
-
height: e.size.height
|
|
23
|
-
}), c = r(() => {
|
|
24
|
-
if (!e.src) return null;
|
|
25
|
-
if (e.crossorigin) {
|
|
26
|
-
const s = e.src.includes("?") ? "&" : "?";
|
|
27
|
-
return `${e.src}${s}_cors=${Date.now()}`;
|
|
28
|
-
}
|
|
29
|
-
return e.src;
|
|
30
|
-
});
|
|
31
|
-
return (s, B) => {
|
|
32
|
-
const u = d("fm-icon"), y = d("fm-card");
|
|
33
|
-
return n(), h("div", {
|
|
34
|
-
class: a([s.className, "flex items-center justify-center"])
|
|
35
|
-
}, [
|
|
36
|
-
z(y, {
|
|
37
|
-
class: a(["flex items-center justify-center", "rounded-md"]),
|
|
38
|
-
style: x({ width: `${i.value.width}px`, height: `${i.value.height}px` }),
|
|
39
|
-
variant: "outlined"
|
|
40
|
-
}, {
|
|
41
|
-
default: k(() => [
|
|
42
|
-
c.value && !o.value ? (n(), h("img", {
|
|
43
|
-
key: 0,
|
|
44
|
-
alt: g.value,
|
|
45
|
-
class: a(["w-full h-full", "object-cover", t.value ? "" : "hidden"]),
|
|
46
|
-
src: c.value,
|
|
47
|
-
crossorigin: e.crossorigin ? "anonymous" : void 0,
|
|
48
|
-
onError: v,
|
|
49
|
-
onLoad: _
|
|
50
|
-
}, null, 42, $)) : (n(), f(u, {
|
|
51
|
-
key: 1,
|
|
52
|
-
color: "neutral-gray-300",
|
|
53
|
-
name: "image",
|
|
54
|
-
outline: ""
|
|
55
|
-
})),
|
|
56
|
-
t.value ? b("", !0) : (n(), f(u, {
|
|
57
|
-
key: 2,
|
|
58
|
-
class: "animate-spin",
|
|
59
|
-
name: "progress_activity",
|
|
60
|
-
spin: ""
|
|
61
|
-
}))
|
|
62
|
-
]),
|
|
63
|
-
_: 1
|
|
64
|
-
}, 8, ["style"])
|
|
65
|
-
], 2);
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
export {
|
|
70
|
-
E as _
|
|
71
|
-
};
|