@feedmepos/mf-menu 0.32.44 → 0.32.45
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-BXkiQoTM.js → App-CczmyQeJ.js} +1471 -1458
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BoSL4dm7.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BscsJpMV.js} +3 -3
- package/dist/{Catalog-CLFVLyor.js → Catalog-RU_6keJm.js} +6 -6
- package/dist/{Category-CNuVHuI3.js → Category-7Fg2kD0h.js} +79 -79
- package/dist/{Category-BdyouDU8.js → Category-CwEXbsDv.js} +4 -4
- package/dist/{CookingGuide-Bed7bUt1.js → CookingGuide-DFu5VStf.js} +4 -4
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CZDL2xJC.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CeNfLbfq.js} +1 -1
- package/dist/{Group-TUqCPmO3.js → Group-C6vQeBnj.js} +1 -1
- package/dist/{Group-D4UTsIxI.js → Group-l-YpAi6B.js} +3 -3
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BJPT8flL.js → Group.vue_vue_type_script_setup_true_lang-1UdOBdv-.js} +165 -165
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D83liryu.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-C309DrLU.js} +5 -5
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CRIRinHB.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C903fhuj.js} +6 -6
- package/dist/{Ingredient-CcxoeuDd.js → Ingredient-CHqDo-GY.js} +3 -3
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-58tyxdVh.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CXHHlrI0.js} +2 -2
- package/dist/{LinkProductSideSheet-DazOkwkd.js → LinkProductSideSheet-DY32g33Q.js} +3 -3
- package/dist/{MenuSetting-B3oLll4C.js → MenuSetting-DhbxlKuU.js} +5 -5
- package/dist/{PrintRoute-D878qPu8.js → PrintRoute-CToZ0ClG.js} +4 -4
- package/dist/{Product-DOC8y_mW.js → Product-Cpg32wpg.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-tZyBhWYT.js → Product.vue_vue_type_script_setup_true_lang-BC2KG1q4.js} +440 -438
- package/dist/{ProductInternalTools-9TgIc2bR.js → ProductInternalTools-wH9BN1NK.js} +5 -5
- package/dist/Products-CpINHaH6.js +291 -0
- package/dist/{Publish-BktK_PKq.js → Publish-CJS_836k.js} +3 -3
- package/dist/{Recipe-eA0xrGYk.js → Recipe-Cz7hivmM.js} +4 -4
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-t8M7z09s.js → RuleView.vue_vue_type_script_setup_true_lang-CRLzqgQe.js} +207 -207
- package/dist/{Scheduler-CKSqPZLQ.js → Scheduler-QuWCnEJw.js} +3 -3
- package/dist/{ServingSequence-Ea20baNj.js → ServingSequence-CqK5Sjmq.js} +3 -3
- package/dist/{Setting-u6lX_Dzg.js → Setting-C3tKUfsm.js} +5 -5
- package/dist/{Subcategory-C6s7OMOb.js → Subcategory-DCtTOPUj.js} +99 -100
- package/dist/{Takeaway-lWxS9oWe.js → Takeaway-BnB1OFnK.js} +1 -1
- package/dist/{Takeaway-B9kr-Nf4.js → Takeaway-Fi8SAH2t.js} +4 -4
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-oA0e9oI5.js → Takeaway.vue_vue_type_script_setup_true_lang-Cbz7Qt_g.js} +91 -91
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-T40ChY7j.js → Thumbnail.vue_vue_type_script_setup_true_lang-CPM_muXB.js} +4 -4
- package/dist/TranslationFieldSection.vue_vue_type_script_setup_true_lang-BpL8UrFY.js +278 -0
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-DtkzQeq4.js +140 -0
- package/dist/TranslationViewChip.vue_vue_type_script_setup_true_lang-CHT7Xozn.js +60 -0
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B1e3d-uX.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DoIgiwHh.js} +13 -13
- package/dist/{Unit-DkQlUg2l.js → Unit-5yE2-y9D.js} +2 -2
- package/dist/Variant-C7lIdRID.js +248 -0
- package/dist/{_id_-_oqk-OhC.js → _id_-08ykp97a.js} +9 -9
- package/dist/{app-CfCYl2pO.js → app-CA4g3v2n.js} +26 -26
- package/dist/{app-DIYHNWEw.js → app-DPovSnb_.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/components/translation/LanguageChip.vue.d.ts +18 -0
- package/dist/apps/mf-menu/src/components/translation/LanguageSelector.vue.d.ts +33 -0
- package/dist/apps/mf-menu/src/components/translation/LocaleIconBadge.vue.d.ts +29 -0
- package/dist/apps/mf-menu/src/components/translation/TranslationFieldRow.vue.d.ts +39 -0
- package/dist/apps/mf-menu/src/components/translation/TranslationViewChip.vue.d.ts +15 -0
- package/dist/apps/mf-menu/src/composable/translationLanguages.d.ts +16 -0
- package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
- package/dist/apps/mf-menu/src/utils/translation.d.ts +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-AoXjo9FF.js → linked-status-WT6deoPw.js} +2 -2
- package/dist/assets/{menu-export-BHcaWhM3.js → menu-export-DxtFXMED.js} +2 -2
- package/dist/assets/{override-menu-B9xQcjuJ.js → override-menu-BJGRdWWE.js} +2 -2
- package/dist/assets/{validate-menu-D-ezd4W8.js → validate-menu-B_tmkHe7.js} +2 -2
- package/dist/{catalog-CvN9Wu8V.js → catalog-D7Jjqj3-.js} +1 -1
- package/dist/{catalogSetting-qS5Np22q.js → catalogSetting-Bg_zMUrV.js} +1 -1
- package/dist/{currency-Nxod6uwl.js → currency-DDxFMjAI.js} +1 -1
- package/dist/{dayjs.min-B1AjAGva.js → dayjs.min-BVOO8wJG.js} +1 -1
- package/dist/{index-Cq-czJjU.js → index-BlLRjkMF.js} +8 -7
- package/dist/{index-nKlYiotY.js → index-CG7GFWlC.js} +1 -1
- package/dist/index-Cq2MVpMv.js +472 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-YXKayPEp.js → index.vue_vue_type_script_setup_true_lang-C6IVvAua.js} +169 -168
- package/dist/{item-CUZSonzT.js → item-Bq6SCc7D.js} +3250 -3386
- package/dist/{jszip.min-BnkZQ6lD.js → jszip.min-1MrCGuHF.js} +2 -2
- package/dist/{menu-BP_ArXCI.js → menu-CKA9uouu.js} +1 -1
- package/dist/{menuV2-BGEYgQ8-.js → menuV2-DBkrmeha.js} +71 -71
- package/dist/{priceTier-B-Qa0xaO.js → priceTier-Cxr9IcVP.js} +1 -1
- package/dist/{rules-Dchd_ilF.js → rules-DFWR7a3m.js} +4 -4
- package/dist/{scheduler-DN7ZGLk8.js → scheduler-HKff8Ty2.js} +4 -4
- package/dist/{toExcel-jHmkDqcm.js → toExcel-DopYrxBW.js} +2 -2
- package/dist/{unit-DgL56pkI.js → unit-5G600HMJ.js} +2 -2
- package/package.json +1 -1
- package/dist/Products-DfUGnHmD.js +0 -1568
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-CcIGCUwk.js +0 -194
- package/dist/Variant-BF5r2WLL.js +0 -247
- package/dist/index-C0Zw1cSS.js +0 -545
- package/dist/translation-Cdap0IVg.js +0 -79
- /package/dist/apps/mf-menu/src/components/{TranslationBadge.vue.d.ts → translation/TranslationBadge.vue.d.ts} +0 -0
- /package/dist/apps/mf-menu/src/components/{TranslationFieldSection.vue.d.ts → translation/TranslationFieldSection.vue.d.ts} +0 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { defineComponent as z, ref as p, watch as L, computed as k, resolveComponent as v, createBlock as w, openBlock as f, unref as n, withCtx as _, createElementVNode as i, createVNode as r, toDisplayString as h, createElementBlock as x, createCommentVNode as F, Fragment as I, renderList as A } from "vue";
|
|
2
|
+
import { J as S } from "./index.vue_vue_type_script_setup_true_lang-C6IVvAua.js";
|
|
3
|
+
import { useI18n as q } from "@feedmepos/mf-common";
|
|
4
|
+
import { u as J } from "./discardConfirm-BHni0LNu.js";
|
|
5
|
+
import { _ as G, a as H, b as K, c as M } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-BpL8UrFY.js";
|
|
6
|
+
const P = { class: "fm-typo-en-title-md-600" }, Q = { class: "pt-8 space-y-24" }, R = { class: "flex flex-col gap-16 border p-16 rounded-lg" }, W = { class: "flex items-center gap-16" }, X = { class: "fm-typo-en-body-lg-600" }, Y = { class: "flex flex-col gap-32 pl-32" }, Z = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "space-y-8"
|
|
9
|
+
}, ee = { class: "flex gap-8 items-center justify-start" }, se = /* @__PURE__ */ z({
|
|
10
|
+
__name: "TranslationSideSheet",
|
|
11
|
+
props: {
|
|
12
|
+
modelValue: { type: Boolean },
|
|
13
|
+
title: {},
|
|
14
|
+
name: {},
|
|
15
|
+
nameLocale: {}
|
|
16
|
+
},
|
|
17
|
+
emits: ["update:modelValue", "update:name", "update:nameLocale"],
|
|
18
|
+
setup(E, { emit: N }) {
|
|
19
|
+
const l = E, u = N, { t: s } = q(), o = p([]), g = p([]), c = p(l.name), V = p(l.name);
|
|
20
|
+
L(
|
|
21
|
+
() => l.name,
|
|
22
|
+
(e) => {
|
|
23
|
+
c.value = e;
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
function U() {
|
|
27
|
+
return !l.nameLocale || Object.keys(l.nameLocale).length === 0 ? [] : Object.entries(l.nameLocale).map(([e, a]) => ({
|
|
28
|
+
localeCode: e,
|
|
29
|
+
value: a
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
L(
|
|
33
|
+
() => [l.modelValue, l.nameLocale],
|
|
34
|
+
([e]) => {
|
|
35
|
+
e && (o.value = U(), g.value = S.clone(o.value), c.value = l.name, V.value = l.name);
|
|
36
|
+
},
|
|
37
|
+
{ immediate: !0 }
|
|
38
|
+
);
|
|
39
|
+
const y = k(() => o.value.map((e) => e.localeCode));
|
|
40
|
+
function T(e) {
|
|
41
|
+
const a = new Set(y.value), d = new Set(e);
|
|
42
|
+
for (const m of e)
|
|
43
|
+
a.has(m) || o.value.push({
|
|
44
|
+
localeCode: m,
|
|
45
|
+
value: ""
|
|
46
|
+
});
|
|
47
|
+
o.value = o.value.filter((m) => d.has(m.localeCode));
|
|
48
|
+
}
|
|
49
|
+
function B() {
|
|
50
|
+
const e = c.value !== V.value, a = !S.isEqual(o.value, g.value);
|
|
51
|
+
return e || a;
|
|
52
|
+
}
|
|
53
|
+
function D() {
|
|
54
|
+
c.value !== l.name && u("update:name", c.value);
|
|
55
|
+
const e = o.value.filter((a) => a.value.trim());
|
|
56
|
+
if (e.length === 0)
|
|
57
|
+
u("update:nameLocale", void 0);
|
|
58
|
+
else {
|
|
59
|
+
const a = {};
|
|
60
|
+
e.forEach((d) => {
|
|
61
|
+
a[d.localeCode] = d.value.trim();
|
|
62
|
+
}), u("update:nameLocale", a);
|
|
63
|
+
}
|
|
64
|
+
u("update:modelValue", !1);
|
|
65
|
+
}
|
|
66
|
+
function O() {
|
|
67
|
+
u("update:modelValue", !1);
|
|
68
|
+
}
|
|
69
|
+
const C = J(B, O), b = k({
|
|
70
|
+
get: () => l.modelValue,
|
|
71
|
+
set: (e) => u("update:modelValue", e)
|
|
72
|
+
});
|
|
73
|
+
return (e, a) => {
|
|
74
|
+
const d = v("FmIcon"), m = v("fm-button"), $ = v("fm-side-sheet");
|
|
75
|
+
return f(), w($, {
|
|
76
|
+
modelValue: b.value,
|
|
77
|
+
"onUpdate:modelValue": a[1] || (a[1] = (t) => b.value = t),
|
|
78
|
+
"max-width": 720,
|
|
79
|
+
"onOn:clickedAway": n(C)
|
|
80
|
+
}, {
|
|
81
|
+
"side-sheet-header": _(() => [
|
|
82
|
+
i("p", P, h(e.title) + " " + h(n(s)("menu.common.translation.title_suffix")), 1)
|
|
83
|
+
]),
|
|
84
|
+
"side-sheet-footer": _(() => [
|
|
85
|
+
i("div", ee, [
|
|
86
|
+
r(m, {
|
|
87
|
+
label: n(s)("common.save"),
|
|
88
|
+
size: "lg",
|
|
89
|
+
variant: "primary",
|
|
90
|
+
onClick: D
|
|
91
|
+
}, null, 8, ["label"]),
|
|
92
|
+
r(m, {
|
|
93
|
+
label: n(s)("common.cancel"),
|
|
94
|
+
size: "lg",
|
|
95
|
+
variant: "tertiary",
|
|
96
|
+
onClick: n(C)
|
|
97
|
+
}, null, 8, ["label", "onClick"])
|
|
98
|
+
])
|
|
99
|
+
]),
|
|
100
|
+
default: _(() => [
|
|
101
|
+
i("div", Q, [
|
|
102
|
+
r(G, {
|
|
103
|
+
"selected-locales": y.value,
|
|
104
|
+
"onUpdate:selectedLocales": T
|
|
105
|
+
}, null, 8, ["selected-locales"]),
|
|
106
|
+
i("div", R, [
|
|
107
|
+
i("div", W, [
|
|
108
|
+
r(d, { name: "keyboard_arrow_down" }),
|
|
109
|
+
i("p", X, h(n(s)("menu.common.translation.name_section", { entity: e.title })), 1)
|
|
110
|
+
]),
|
|
111
|
+
i("div", Y, [
|
|
112
|
+
r(H, {
|
|
113
|
+
label: n(s)("menu.common.translation.default"),
|
|
114
|
+
modelValue: c.value,
|
|
115
|
+
"onUpdate:modelValue": a[0] || (a[0] = (t) => c.value = t)
|
|
116
|
+
}, null, 8, ["label", "modelValue"]),
|
|
117
|
+
o.value.length > 0 ? (f(), x("div", Z, [
|
|
118
|
+
r(K, {
|
|
119
|
+
label: n(s)("menu.common.translation.translation_label")
|
|
120
|
+
}, null, 8, ["label"]),
|
|
121
|
+
(f(!0), x(I, null, A(o.value, (t) => (f(), w(M, {
|
|
122
|
+
key: t.localeCode,
|
|
123
|
+
"locale-code": t.localeCode,
|
|
124
|
+
modelValue: t.value,
|
|
125
|
+
"onUpdate:modelValue": (j) => t.value = j,
|
|
126
|
+
placeholder: n(s)("menu.group.translation.placeholder")
|
|
127
|
+
}, null, 8, ["locale-code", "modelValue", "onUpdate:modelValue", "placeholder"]))), 128))
|
|
128
|
+
])) : F("", !0)
|
|
129
|
+
])
|
|
130
|
+
])
|
|
131
|
+
])
|
|
132
|
+
]),
|
|
133
|
+
_: 1
|
|
134
|
+
}, 8, ["modelValue", "onOn:clickedAway"]);
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
export {
|
|
139
|
+
se as _
|
|
140
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { defineComponent as b, computed as a, resolveComponent as x, createElementBlock as o, openBlock as e, Fragment as p, renderList as v, createBlock as g, withCtx as m, createElementVNode as l, toDisplayString as t, createCommentVNode as k, createVNode as L } from "vue";
|
|
2
|
+
import { g as w } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-BpL8UrFY.js";
|
|
3
|
+
const N = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "flex gap-8"
|
|
6
|
+
}, j = {
|
|
7
|
+
class: "rounded-lg border border-fm-color-primary text-fm-color-primary flex items-center justify-center fm-typo-en-body-sm-600 px-8"
|
|
8
|
+
}, C = {
|
|
9
|
+
class: "p-4"
|
|
10
|
+
}, V = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "rounded-lg border border-fm-color-primary text-fm-color-primary flex items-center justify-center fm-typo-en-body-sm-600 px-8"
|
|
13
|
+
}, B = {
|
|
14
|
+
class: "rounded-lg border border-fm-color-primary text-fm-color-primary flex items-center justify-center fm-typo-en-body-sm-600 px-8"
|
|
15
|
+
}, F = {
|
|
16
|
+
key: 0
|
|
17
|
+
}, T = {
|
|
18
|
+
key: 1
|
|
19
|
+
}, z = {
|
|
20
|
+
class: "flex flex-col gap-8 p-4"
|
|
21
|
+
}, E = {
|
|
22
|
+
class: "flex flex-col space-y-1 pl-8"
|
|
23
|
+
}, D = /* @__PURE__ */ b({
|
|
24
|
+
__name: "TranslationViewChip",
|
|
25
|
+
props: {
|
|
26
|
+
nameLocale: {},
|
|
27
|
+
showNumber: {}
|
|
28
|
+
},
|
|
29
|
+
setup(h) {
|
|
30
|
+
const i = h, d = a(() => Object.keys(i.nameLocale)), n = a(() => d.value.map((r) => w(r))), u = a(() => i.showNumber ?? Object.keys(i.nameLocale).length), f = a(() => n.value.slice(u.value));
|
|
31
|
+
return (r, y) => {
|
|
32
|
+
const _ = x("FmTooltip");
|
|
33
|
+
return r.showNumber === void 0 ? (e(), o("div", N, [(e(!0), o(p, null, v(d.value, (s, c) => (e(), g(_, {
|
|
34
|
+
key: c,
|
|
35
|
+
placement: "top",
|
|
36
|
+
"z-index": 9999
|
|
37
|
+
}, {
|
|
38
|
+
content: m(() => [l("div", C, t(r.nameLocale[s]) + " (" + t(s) + ")", 1)]),
|
|
39
|
+
default: m(() => [l("div", j, t(n.value[c]), 1)]),
|
|
40
|
+
_: 2
|
|
41
|
+
}, 1024))), 128))])) : (e(), o(p, {
|
|
42
|
+
key: 1
|
|
43
|
+
}, [n.value.length > u.value ? (e(), o("div", V, t(n.value[0]), 1)) : k("", !0), L(_, {
|
|
44
|
+
placement: "top",
|
|
45
|
+
"z-index": 9999
|
|
46
|
+
}, {
|
|
47
|
+
content: m(() => [l("div", z, [y[0] || (y[0] = l("p", {
|
|
48
|
+
class: "fm-typo-en-body-sm-600"
|
|
49
|
+
}, "Product name", -1)), l("div", E, [(e(!0), o(p, null, v(d.value, (s, c) => (e(), o("li", {
|
|
50
|
+
key: c
|
|
51
|
+
}, t(r.nameLocale[s]) + " (" + t(s) + ") ", 1))), 128))])])]),
|
|
52
|
+
default: m(() => [l("div", B, [f.value.length > 0 ? (e(), o("p", F, "+" + t(f.value.length), 1)) : (e(), o("p", T, t(n.value[0]), 1))])]),
|
|
53
|
+
_: 1
|
|
54
|
+
})], 64));
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
export {
|
|
59
|
+
D as _
|
|
60
|
+
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { computed as V, shallowRef as Ht, ref as H, watch as Ee, nextTick as ot, getCurrentInstance as Xt, onMounted as Le, render as On, defineComponent as de, resolveComponent as W, createElementBlock as X, openBlock as P, createBlock as te, normalizeClass as he, createElementVNode as A, createVNode as y, unref as t, withCtx as K, toDisplayString as _e, mergeModels as Jt, useModel as Qt, createCommentVNode as Z, resolveDirective as Zt, Fragment as Ie, renderList as Ue, createTextVNode as Dn, withDirectives as tt, renderSlot as Ne, h as we, vShow as en, withModifiers as He, createSlots as Vn, onBeforeUnmount as Pt, watchEffect as $n, onUnmounted as Pn, normalizeStyle as ft, mergeProps as Un, normalizeProps as Mn, guardReactiveProps as Rn, Teleport as An, Transition as Nn, withKeys as Ln } from "vue";
|
|
2
|
-
import { g as Gn, o as Kn, _ as Bn, a as zn, f as Yn, b as jn, c as tn, n as nn, I as Wn, S as qn, d as Ut, e as Hn, C as Xn, h as on, i as St, j as rn, k as Jn, m as Qn, F as Zn, M as an, l as eo, r as to, p as ln, q as Kt, s as sn, t as no, P as oo, v as ro, w as un, u as ao, T as ze } from "./item-
|
|
3
|
-
import { _ as lo, T as io } from "./app-
|
|
4
|
-
import { B as ke, M as Se, A as ae, G as rt, N as so, O as uo, P as co, u as bt, Q as Mt, R as mo, D as Ge, T as po, I as ye, U as fo, J as Fe, V as yt, W as dn, X as go, Y as vo, Z as bo, $ as ht, a0 as Bt, a1 as _o, a2 as yo } from "./index.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { g as Gn, o as Kn, _ as Bn, a as zn, f as Yn, b as jn, c as tn, n as nn, I as Wn, S as qn, d as Ut, e as Hn, C as Xn, h as on, i as St, j as rn, k as Jn, m as Qn, F as Zn, M as an, l as eo, r as to, p as ln, q as Kt, s as sn, t as no, P as oo, v as ro, w as un, u as ao, T as ze } from "./item-Bq6SCc7D.js";
|
|
3
|
+
import { _ as lo, T as io } from "./app-CA4g3v2n.js";
|
|
4
|
+
import { B as ke, M as Se, A as ae, G as rt, N as so, O as uo, P as co, u as bt, Q as Mt, R as mo, D as Ge, T as po, I as ye, U as fo, J as Fe, V as yt, W as dn, X as go, Y as vo, Z as bo, $ as ht, a0 as Bt, a1 as _o, a2 as yo } from "./index.vue_vue_type_script_setup_true_lang-C6IVvAua.js";
|
|
5
5
|
import { useI18n as be, useCoreStore as at, CustomAttributesForm as cn } from "@feedmepos/mf-common";
|
|
6
6
|
import { useDialog as Ke, useDialogChild as Rt, useSnackbar as Be, FmButtonColorThemeVariant as Pe, components as Oe, FmButtonVariant as qe, useBreakpoints as ho } from "@feedmepos/ui-library";
|
|
7
7
|
import { u as At } from "./discardConfirm-BHni0LNu.js";
|
|
8
8
|
import { defineStore as wo } from "pinia";
|
|
9
|
-
import { _ as Ve, a as Co } from "./RuleView.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { u as ve, g as mn, m as ko } from "./menuV2-
|
|
9
|
+
import { _ as Ve, a as Co } from "./RuleView.vue_vue_type_script_setup_true_lang-CRLzqgQe.js";
|
|
10
|
+
import { u as ve, g as mn, m as ko } from "./menuV2-DBkrmeha.js";
|
|
11
11
|
import { s as Ft, _ as Io } from "./index-CisutoS9.js";
|
|
12
12
|
import { useAppStore as pn, RemyButton as fn } from "@feedmepos/mf-remy-panel";
|
|
13
13
|
import { _ as Ae } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
|
|
14
14
|
import { c as Eo } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
15
|
-
import { _ as To, a as xo, u as So } from "./Thumbnail.vue_vue_type_script_setup_true_lang-
|
|
15
|
+
import { _ as To, a as xo, u as So } from "./Thumbnail.vue_vue_type_script_setup_true_lang-CPM_muXB.js";
|
|
16
16
|
import { _ as Ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
import { _ as Ot } from "./tooltip-B5BiPMx9.js";
|
|
18
|
-
import { g as st } from "./
|
|
19
|
-
import { _ as Xe, T as Fo, l as Oo } from "./index-
|
|
20
|
-
import { L as Dt } from "./LinkProductSideSheet-
|
|
18
|
+
import { g as st } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-BpL8UrFY.js";
|
|
19
|
+
import { _ as Xe, T as Fo, l as Oo } from "./index-BlLRjkMF.js";
|
|
20
|
+
import { L as Dt } from "./LinkProductSideSheet-DY32g33Q.js";
|
|
21
21
|
import { u as Do } from "./search-BAPEUu1R.js";
|
|
22
22
|
import { c as Nt } from "./check-C9mY6LiX.js";
|
|
23
|
-
import { f as nt } from "./currency-
|
|
23
|
+
import { f as nt } from "./currency-DDxFMjAI.js";
|
|
24
24
|
import { c as Vo } from "./string-DpfFixWH.js";
|
|
25
25
|
import { useInventoryStore as $o, InventoryBindingSummary as Po } from "@feedmepos/mf-inventory-portal";
|
|
26
|
-
import { u as Uo } from "./priceTier-
|
|
26
|
+
import { u as Uo } from "./priceTier-Cxr9IcVP.js";
|
|
27
27
|
import { d as Lt } from "./vuedraggable-CK8z7qA8.js";
|
|
28
|
-
import { _ as Mo } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-
|
|
28
|
+
import { _ as Mo } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-BscsJpMV.js";
|
|
29
29
|
import "./app-5fxKLAzS.js";
|
|
30
30
|
/* empty css */
|
|
31
|
-
import { i as Ro, t as Gt, w as Ao, a as gn, b as vn, n as No, c as Lo, r as Go, _ as Ko } from "./index-
|
|
31
|
+
import { i as Ro, t as Gt, w as Ao, a as gn, b as vn, n as No, c as Lo, r as Go, _ as Ko } from "./index-CG7GFWlC.js";
|
|
32
32
|
import { c as gt } from "./object-DVUNCr7w.js";
|
|
33
33
|
import { _ as Bo } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
|
|
34
34
|
import { _ as zt } from "./MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js";
|
|
@@ -2,9 +2,9 @@ import { defineComponent as L, computed as d, ref as g, h as k, withModifiers as
|
|
|
2
2
|
import { useI18n as E } from "@feedmepos/mf-common";
|
|
3
3
|
import { useSnackbar as K, components as R, useBreakpoints as D, FmButtonVariant as G } from "@feedmepos/ui-library";
|
|
4
4
|
import { _ as I } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
-
import { G as q, u as A, a4 as H } from "./index.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { G as q, u as A, a4 as H } from "./index.vue_vue_type_script_setup_true_lang-C6IVvAua.js";
|
|
6
6
|
import { _ as J } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
7
|
-
import { u as O, U as P } from "./unit-
|
|
7
|
+
import { u as O, U as P } from "./unit-5G600HMJ.js";
|
|
8
8
|
const Q = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "h-[600px]"
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import { getCurrentInstance as $, defineComponent as T, computed as b, onMounted as U, h as u, resolveComponent as w, createBlock as j, openBlock as p, unref as o, withCtx as _, createElementBlock as y, Fragment as M, createElementVNode as i, createVNode as c, isRef as z, normalizeClass as F, renderList as R, toDisplayString as S, withModifiers as B, createCommentVNode as G } from "vue";
|
|
2
|
+
import { useI18n as N } from "@feedmepos/mf-common";
|
|
3
|
+
import { useDialog as Y, useSnackbar as A, FmButtonVariant as E, components as Q, useBreakpoints as q } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as H } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
5
|
+
import { _ as J } from "./app-CA4g3v2n.js";
|
|
6
|
+
import { G as D, u as K, Q as O, M as W, A as X, a4 as Z } from "./index.vue_vue_type_script_setup_true_lang-C6IVvAua.js";
|
|
7
|
+
import { V as L } from "./index-Cq2MVpMv.js";
|
|
8
|
+
import { _ as ee } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
9
|
+
import { _ as ae } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-CHT7Xozn.js";
|
|
10
|
+
import { u as oe } from "./search-BAPEUu1R.js";
|
|
11
|
+
import { defineStore as ne } from "pinia";
|
|
12
|
+
import { c as te } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
13
|
+
import { g as le } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-BpL8UrFY.js";
|
|
14
|
+
const se = ne("variant-manager", () => {
|
|
15
|
+
const I = Y(), t = A(), g = D(t), x = O(g);
|
|
16
|
+
K();
|
|
17
|
+
const f = $(), { t: m } = N(), k = (r) => {
|
|
18
|
+
var h, a;
|
|
19
|
+
const { vNode: V } = te(
|
|
20
|
+
L,
|
|
21
|
+
f,
|
|
22
|
+
r
|
|
23
|
+
);
|
|
24
|
+
(a = (h = V.component) == null ? void 0 : h.exposed) == null || a.trigger();
|
|
25
|
+
};
|
|
26
|
+
async function d(r) {
|
|
27
|
+
k({
|
|
28
|
+
initialValue: r
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
async function v(r) {
|
|
32
|
+
I.open({
|
|
33
|
+
title: m("menu.common.dialog.remove.variant.title"),
|
|
34
|
+
message: m("menu.common.dialog.remove.variant.message", { name: r.name }),
|
|
35
|
+
primaryActions: {
|
|
36
|
+
text: m("menu.common.actions.remove"),
|
|
37
|
+
close: !0,
|
|
38
|
+
variant: E.Destructive
|
|
39
|
+
},
|
|
40
|
+
secondaryActions: {
|
|
41
|
+
text: m("menu.common.actions.cancel"),
|
|
42
|
+
close: !0
|
|
43
|
+
}
|
|
44
|
+
}).onPrimary(async () => {
|
|
45
|
+
await x.updateMenu(
|
|
46
|
+
{
|
|
47
|
+
module: X.F_MENU_MODULE_V4_KEY.enum.variant,
|
|
48
|
+
operation: W.F_OPERATION_TYPE.delete,
|
|
49
|
+
data: r._id
|
|
50
|
+
},
|
|
51
|
+
r.name,
|
|
52
|
+
!0
|
|
53
|
+
);
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
deleteVariant: v,
|
|
58
|
+
updateVariant: d
|
|
59
|
+
};
|
|
60
|
+
}), re = {
|
|
61
|
+
key: 0,
|
|
62
|
+
class: "flex-1 flex flex-col overflow-hidden max-h-[calc(100vh-56px)] gap-8"
|
|
63
|
+
}, ie = {
|
|
64
|
+
class: "flex justify-end"
|
|
65
|
+
}, ce = {
|
|
66
|
+
class: "w-[320px]"
|
|
67
|
+
}, me = {
|
|
68
|
+
class: "px-16 py-8"
|
|
69
|
+
}, de = {
|
|
70
|
+
class: /* @__PURE__ */ F(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"])
|
|
71
|
+
}, ue = ["onClick"], pe = {
|
|
72
|
+
class: "flex-1 space-y-4"
|
|
73
|
+
}, fe = {
|
|
74
|
+
class: "fm-typo-en-body-lg-600"
|
|
75
|
+
}, _e = {
|
|
76
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
77
|
+
}, ye = {
|
|
78
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
79
|
+
}, ge = {
|
|
80
|
+
key: 1,
|
|
81
|
+
class: "xs:pt-16"
|
|
82
|
+
}, Ie = /* @__PURE__ */ T({
|
|
83
|
+
__name: "Variant",
|
|
84
|
+
setup(I) {
|
|
85
|
+
const {
|
|
86
|
+
t
|
|
87
|
+
} = N(), g = K(), x = O(D(A())), f = se(), m = b(() => g.variants.map((a) => ({
|
|
88
|
+
...a,
|
|
89
|
+
usedBy: g.items.filter((e) => {
|
|
90
|
+
var s;
|
|
91
|
+
return (s = e.variant) == null ? void 0 : s.variantGroupIds.includes(a._id);
|
|
92
|
+
}).map(({
|
|
93
|
+
_id: e
|
|
94
|
+
}) => ({
|
|
95
|
+
_id: e
|
|
96
|
+
}))
|
|
97
|
+
}))), {
|
|
98
|
+
filter: k,
|
|
99
|
+
searchKey: d
|
|
100
|
+
} = oe(), v = b(() => m.value.filter((a) => {
|
|
101
|
+
var e;
|
|
102
|
+
return k([a.name, ...((e = a.options) == null ? void 0 : e.map((s) => s.name)) ?? []]);
|
|
103
|
+
}));
|
|
104
|
+
U(() => g.selectCatalog(null));
|
|
105
|
+
const r = b(() => [{
|
|
106
|
+
accessorKey: "name",
|
|
107
|
+
header: () => t("menu.variant.columns.name"),
|
|
108
|
+
size: 360,
|
|
109
|
+
enableSorting: !1,
|
|
110
|
+
cell: (a) => {
|
|
111
|
+
const e = a.row.original, s = a.getValue();
|
|
112
|
+
return u("div", {
|
|
113
|
+
class: "flex items-center gap-8"
|
|
114
|
+
}, [u("span", {
|
|
115
|
+
class: "break-all"
|
|
116
|
+
}, s), e.name_locale ? u(ae, {
|
|
117
|
+
nameLocale: e.name_locale ?? {}
|
|
118
|
+
}) : null]);
|
|
119
|
+
}
|
|
120
|
+
}, {
|
|
121
|
+
accessorKey: "options",
|
|
122
|
+
header: () => t("menu.variant.columns.options"),
|
|
123
|
+
size: 560,
|
|
124
|
+
enableSorting: !1,
|
|
125
|
+
cell: (a) => {
|
|
126
|
+
const e = a.getValue() ?? [], s = e.some((l) => Object.keys(l.name_locale ?? {}).length > 0), C = Array.from(new Set(e.flatMap((l) => Object.keys(l.name_locale ?? {})))).map((l) => le(l));
|
|
127
|
+
return u("div", {
|
|
128
|
+
class: "flex items-center gap-8"
|
|
129
|
+
}, [u("span", {
|
|
130
|
+
class: "break-all"
|
|
131
|
+
}, e == null ? void 0 : e.map((l) => l.name).join(", ")), ...s ? C.map((l) => u("div", {
|
|
132
|
+
class: "rounded-lg border border-fm-color-primary text-fm-color-primary flex items-center justify-center fm-typo-en-body-sm-600 px-8"
|
|
133
|
+
}, l)) : []]);
|
|
134
|
+
}
|
|
135
|
+
}, {
|
|
136
|
+
accessorKey: "usedBy",
|
|
137
|
+
header: () => t("menu.variant.columns.applied_products"),
|
|
138
|
+
enableSorting: !1,
|
|
139
|
+
size: 180,
|
|
140
|
+
cell: (a) => t("menu.common.labels.items_linked", {
|
|
141
|
+
count: a.getValue().length
|
|
142
|
+
})
|
|
143
|
+
}, {
|
|
144
|
+
id: "action",
|
|
145
|
+
size: 52,
|
|
146
|
+
meta: {
|
|
147
|
+
cellClass: "pl-16",
|
|
148
|
+
headerContentClass: "-mx-16"
|
|
149
|
+
},
|
|
150
|
+
cell: (a) => u("div", {
|
|
151
|
+
class: "w-full flex justify-end items-center"
|
|
152
|
+
}, [u(Q.FmButton, {
|
|
153
|
+
prependIcon: "delete",
|
|
154
|
+
variant: E.Tertiary,
|
|
155
|
+
textColor: "neutral-gray-400",
|
|
156
|
+
onClick: (e) => {
|
|
157
|
+
e.stopPropagation(), f.deleteVariant(a.row.original);
|
|
158
|
+
}
|
|
159
|
+
})])
|
|
160
|
+
}]), V = q(), h = b(() => V.breakpoints.value.xs);
|
|
161
|
+
return (a, e) => {
|
|
162
|
+
const s = w("fm-search"), C = w("fm-table"), l = w("fm-button");
|
|
163
|
+
return p(), j(ee, {
|
|
164
|
+
heading: o(t)("menu.variant.title")
|
|
165
|
+
}, {
|
|
166
|
+
"append-heading": _(() => [m.value.length ? (p(), j(o(L), {
|
|
167
|
+
key: 0
|
|
168
|
+
}, {
|
|
169
|
+
default: _(({
|
|
170
|
+
trigger: n
|
|
171
|
+
}) => [c(H, {
|
|
172
|
+
class: "ml-auto",
|
|
173
|
+
label: o(t)("menu.variant.add"),
|
|
174
|
+
"prepend-icon": "add",
|
|
175
|
+
onClick: B(n, ["stop"])
|
|
176
|
+
}, null, 8, ["label", "onClick"])]),
|
|
177
|
+
_: 1
|
|
178
|
+
})) : G("", !0)]),
|
|
179
|
+
default: _(() => [m.value.length ? (p(), y(M, {
|
|
180
|
+
key: 0
|
|
181
|
+
}, [h.value ? (p(), y(M, {
|
|
182
|
+
key: 1
|
|
183
|
+
}, [i("div", me, [c(s, {
|
|
184
|
+
autofocus: "",
|
|
185
|
+
modelValue: o(d),
|
|
186
|
+
"onUpdate:modelValue": e[2] || (e[2] = (n) => z(d) ? d.value = n : null),
|
|
187
|
+
placeholder: o(t)("menu.common.labels.search_placeholder", {
|
|
188
|
+
type: "variants"
|
|
189
|
+
})
|
|
190
|
+
}, null, 8, ["modelValue", "placeholder"])]), i("div", de, [(p(!0), y(M, null, R(v.value, (n) => (p(), y("div", {
|
|
191
|
+
key: n._id,
|
|
192
|
+
class: F(["py-12 px-16", "flex space-x-8", "items-center", "cursor-pointer"]),
|
|
193
|
+
onClick: () => o(f).updateVariant(n)
|
|
194
|
+
}, [i("div", pe, [i("p", fe, S(n.name), 1), i("div", null, [i("p", _e, S(o(t)("menu.common.labels.items_linked", {
|
|
195
|
+
count: n.usedBy.length
|
|
196
|
+
})), 1), i("p", ye, S(o(t)("menu.variant.mobile.value", {
|
|
197
|
+
values: n.options.map((P) => P.name).join(", ")
|
|
198
|
+
})), 1)])]), c(l, {
|
|
199
|
+
variant: o(E).Tertiary,
|
|
200
|
+
"prepend-icon": "delete",
|
|
201
|
+
"text-color": "neutral-gray-400",
|
|
202
|
+
onClick: B(() => o(f).deleteVariant(n), ["stop"])
|
|
203
|
+
}, null, 8, ["variant", "onClick"])], 8, ue))), 128))])], 64)) : (p(), y("div", re, [i("div", ie, [i("div", ce, [c(s, {
|
|
204
|
+
autofocus: "",
|
|
205
|
+
modelValue: o(d),
|
|
206
|
+
"onUpdate:modelValue": e[0] || (e[0] = (n) => z(d) ? d.value = n : null),
|
|
207
|
+
placeholder: o(t)("menu.common.labels.search_placeholder", {
|
|
208
|
+
type: "variants"
|
|
209
|
+
})
|
|
210
|
+
}, null, 8, ["modelValue", "placeholder"])])]), c(J, null, {
|
|
211
|
+
default: _(() => [c(C, {
|
|
212
|
+
"column-defs": r.value,
|
|
213
|
+
loading: o(x).checkMenuIsLoading(),
|
|
214
|
+
"page-size": v.value.length,
|
|
215
|
+
"row-data": v.value,
|
|
216
|
+
"shrink-at": !1,
|
|
217
|
+
class: "flex-1 overflow-hidden",
|
|
218
|
+
"hide-footer": "",
|
|
219
|
+
"pin-header-row": "",
|
|
220
|
+
onRowClick: e[1] || (e[1] = (n) => {
|
|
221
|
+
o(f).updateVariant(n.original);
|
|
222
|
+
})
|
|
223
|
+
}, null, 8, ["column-defs", "loading", "page-size", "row-data"])]),
|
|
224
|
+
_: 1
|
|
225
|
+
})]))], 64)) : (p(), y("div", ge, [c(Z, {
|
|
226
|
+
subtitle: o(t)("menu.variant.empty.subtitle"),
|
|
227
|
+
title: o(t)("menu.variant.empty.title")
|
|
228
|
+
}, {
|
|
229
|
+
action: _(() => [c(o(L), null, {
|
|
230
|
+
default: _(({
|
|
231
|
+
trigger: n
|
|
232
|
+
}) => [c(l, {
|
|
233
|
+
"prepend-icon": "add",
|
|
234
|
+
label: o(t)("menu.variant.add"),
|
|
235
|
+
onClick: B(n, ["stop"])
|
|
236
|
+
}, null, 8, ["label", "onClick"])]),
|
|
237
|
+
_: 1
|
|
238
|
+
})]),
|
|
239
|
+
_: 1
|
|
240
|
+
}, 8, ["subtitle", "title"])]))]),
|
|
241
|
+
_: 1
|
|
242
|
+
}, 8, ["heading"]);
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
export {
|
|
247
|
+
Ie as default
|
|
248
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { defineComponent as F, computed as d, ref as p, watch as A, onMounted as H, resolveComponent as m, createElementBlock as K, openBlock as b, Fragment as Q, createVNode as n, withCtx as u, createElementVNode as i, toDisplayString as M, unref as e, createBlock as D } from "vue";
|
|
2
|
-
import { D as W } from "./dayjs.min-
|
|
2
|
+
import { D as W } from "./dayjs.min-BVOO8wJG.js";
|
|
3
3
|
import { useRoute as j, useRouter as J } from "vue-router";
|
|
4
|
-
import { _ as X, w as Z } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { G as ee, u as te, D as ae, I as oe, Q as ne } from "./index.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as X, w as Z } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-C903fhuj.js";
|
|
5
|
+
import { G as ee, u as te, D as ae, I as oe, Q as ne } from "./index.vue_vue_type_script_setup_true_lang-C6IVvAua.js";
|
|
6
6
|
import { useI18n as le } from "@feedmepos/mf-common";
|
|
7
7
|
import { useSnackbar as se } from "@feedmepos/ui-library";
|
|
8
8
|
import { _ as R } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
9
|
-
import { L as V } from "./LinkProductSideSheet-
|
|
9
|
+
import { L as V } from "./LinkProductSideSheet-DY32g33Q.js";
|
|
10
10
|
import { _ as ue } from "./index-CisutoS9.js";
|
|
11
11
|
import { _ as re } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
12
|
-
import { u as ie } from "./Thumbnail.vue_vue_type_script_setup_true_lang-
|
|
13
|
-
import { a as me } from "./menu-
|
|
14
|
-
import { m as ce } from "./toExcel-
|
|
15
|
-
import { _ as de, u as pe, c as _e } from "./scheduler-
|
|
16
|
-
import { R as r } from "./app-
|
|
12
|
+
import { u as ie } from "./Thumbnail.vue_vue_type_script_setup_true_lang-CPM_muXB.js";
|
|
13
|
+
import { a as me } from "./menu-CKA9uouu.js";
|
|
14
|
+
import { m as ce } from "./toExcel-DopYrxBW.js";
|
|
15
|
+
import { _ as de, u as pe, c as _e } from "./scheduler-HKff8Ty2.js";
|
|
16
|
+
import { R as r } from "./app-CA4g3v2n.js";
|
|
17
17
|
const fe = { class: "px-12 py-8" }, ve = { class: "px-12 py-8" }, ge = { class: "flex ml-auto space-x-8" }, be = { class: "flex-1 flex flex-col overflow-hidden" }, Ge = /* @__PURE__ */ F({
|
|
18
18
|
__name: "[id]",
|
|
19
19
|
setup(ke) {
|