@feedmepos/mf-menu 0.32.43 → 0.32.44
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-C9b4SjED.js → App-BXkiQoTM.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C1T4Ewek.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BoSL4dm7.js} +3 -3
- package/dist/{Catalog-BVrf3VaX.js → Catalog-CLFVLyor.js} +44 -44
- package/dist/{Category-BkReM5IG.js → Category-BdyouDU8.js} +24 -24
- package/dist/{Category-BMzIQqIE.js → Category-CNuVHuI3.js} +25 -25
- package/dist/{CookingGuide-CvctI1TH.js → CookingGuide-Bed7bUt1.js} +105 -105
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-bYSEp6Wb.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CZDL2xJC.js} +1 -1
- package/dist/{Group-CHkNuuHE.js → Group-D4UTsIxI.js} +3 -3
- package/dist/{Group-BQzmXagr.js → Group-TUqCPmO3.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BkruJTpL.js → Group.vue_vue_type_script_setup_true_lang-BJPT8flL.js} +19 -19
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CBz83Qd1.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D83liryu.js} +30 -30
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Dpx4meDa.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CRIRinHB.js} +10 -11
- package/dist/{Ingredient-BNsKYrQB.js → Ingredient-CcxoeuDd.js} +20 -20
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DzzwwdA_.js → InventoryBinding.vue_vue_type_script_setup_true_lang-58tyxdVh.js} +2 -2
- package/dist/{LinkProductSideSheet-C6-wef-M.js → LinkProductSideSheet-DazOkwkd.js} +45 -45
- package/dist/{MenuSetting-DRaw7b6m.js → MenuSetting-B3oLll4C.js} +47 -47
- package/dist/{PrintRoute-BKB-thVp.js → PrintRoute-D878qPu8.js} +39 -39
- package/dist/{Product-vviXmBR1.js → Product-DOC8y_mW.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-5h-k6zad.js → Product.vue_vue_type_script_setup_true_lang-tZyBhWYT.js} +140 -140
- package/dist/{ProductInternalTools-DtLk3xFR.js → ProductInternalTools-9TgIc2bR.js} +66 -66
- package/dist/Products-DfUGnHmD.js +1568 -0
- package/dist/{Publish-jx0_H_26.js → Publish-BktK_PKq.js} +29 -29
- package/dist/{Recipe-Dk04ge-_.js → Recipe-eA0xrGYk.js} +24 -24
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DaCVUn1i.js → RuleView.vue_vue_type_script_setup_true_lang-t8M7z09s.js} +2 -2
- package/dist/{Scheduler-vFTvCVcY.js → Scheduler-CKSqPZLQ.js} +11 -11
- package/dist/{ServingSequence-DiBqQ_iS.js → ServingSequence-Ea20baNj.js} +44 -44
- package/dist/{Setting-CtzJ_pVM.js → Setting-u6lX_Dzg.js} +17 -17
- package/dist/{Subcategory-Cmv2W67T.js → Subcategory-C6s7OMOb.js} +51 -51
- package/dist/{Takeaway-DBW4UPFZ.js → Takeaway-B9kr-Nf4.js} +13 -13
- package/dist/{Takeaway-ChaYk0Ix.js → Takeaway-lWxS9oWe.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-C7RL3ITP.js → Takeaway.vue_vue_type_script_setup_true_lang-oA0e9oI5.js} +54 -54
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-edwJ1203.js → Thumbnail.vue_vue_type_script_setup_true_lang-T40ChY7j.js} +27 -27
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-CcIGCUwk.js +194 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B1e3d-uX.js +6130 -0
- package/dist/{Unit-BgLqPMLe.js → Unit-DkQlUg2l.js} +8 -8
- package/dist/{Variant-B8yxF5mJ.js → Variant-BF5r2WLL.js} +25 -25
- package/dist/{_id_-CDN7as0K.js → _id_-_oqk-OhC.js} +28 -28
- package/dist/app-CfCYl2pO.js +363 -0
- package/dist/{app-0AQBxO0B.js → app-DIYHNWEw.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-DTIHdzDw.js → linked-status-AoXjo9FF.js} +2 -2
- package/dist/assets/{menu-export-CpcyYnR-.js → menu-export-BHcaWhM3.js} +2 -2
- package/dist/assets/{override-menu-CASoFjhZ.js → override-menu-B9xQcjuJ.js} +2 -2
- package/dist/assets/{validate-menu-C5AkexWv.js → validate-menu-D-ezd4W8.js} +2 -2
- package/dist/{catalog-BA1e4WAu.js → catalog-CvN9Wu8V.js} +1 -1
- package/dist/{catalogSetting-DE5rjVfj.js → catalogSetting-qS5Np22q.js} +1 -1
- package/dist/{currency-D5qYOpxI.js → currency-Nxod6uwl.js} +1 -1
- package/dist/dayjs.min-B1AjAGva.js +6 -0
- package/dist/index-C0Zw1cSS.js +545 -0
- package/dist/{index-vPs04fVf.js → index-Cq-czJjU.js} +31 -31
- package/dist/index-nKlYiotY.js +246 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-DSZsSghE.js → index.vue_vue_type_script_setup_true_lang-YXKayPEp.js} +103 -78
- package/dist/{item-Dp17qTYi.js → item-CUZSonzT.js} +2587 -2587
- package/dist/{jszip.min-DlpCmtaR.js → jszip.min-BnkZQ6lD.js} +6 -7
- package/dist/{menu-BOVrJ7di.js → menu-BP_ArXCI.js} +1 -1
- package/dist/{menuV2-BHnldQiM.js → menuV2-BGEYgQ8-.js} +59 -59
- package/dist/{priceTier-BRQz1GRF.js → priceTier-B-Qa0xaO.js} +1 -1
- package/dist/{rules-CO49kqfr.js → rules-Dchd_ilF.js} +12 -12
- package/dist/{scheduler-BDHjl8t7.js → scheduler-DN7ZGLk8.js} +29 -29
- package/dist/{toExcel-DGdZKSxT.js → toExcel-jHmkDqcm.js} +2 -2
- package/dist/{translation-BCZ1Ruvv.js → translation-Cdap0IVg.js} +21 -35
- package/dist/{unit-D7QVgTp_.js → unit-DgL56pkI.js} +35 -35
- package/package.json +1 -1
- package/dist/Products-BR3iBVFd.js +0 -307
- package/dist/RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-I6qrPmxY.js +0 -144
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-Cs6s_csi.js +0 -196
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DIbjlDVn.js +0 -5767
- package/dist/app-BU6wILmn.js +0 -2286
- package/dist/dayjs.min-BFDAHpA8.js +0 -7
- package/dist/index--nQbIQ0d.js +0 -545
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { defineComponent as K, ref as y, watch as E, computed as F, unref as a, resolveComponent as _, createBlock as T, openBlock as i, withCtx as v, createElementVNode as t, toDisplayString as m, createElementBlock as p, createCommentVNode as B, Fragment as x, renderList as C, createVNode as r } from "vue";
|
|
2
|
+
import { J as D } from "./index.vue_vue_type_script_setup_true_lang-YXKayPEp.js";
|
|
3
|
+
import { useI18n as P, useLocale as Q } from "@feedmepos/mf-common";
|
|
4
|
+
import { u as R } from "./discardConfirm-BHni0LNu.js";
|
|
5
|
+
import { g as V, a as I, _ as W, b as X } from "./translation-Cdap0IVg.js";
|
|
6
|
+
const Y = { class: "fm-typo-en-title-md-600" }, Z = { class: "pt-8 space-y-24" }, ee = { class: "flex flex-col gap-8" }, oe = { class: "text-fm-color-typo-primary fm-typo-en-body-lg-600" }, le = { class: "flex items-center gap-8 flex-wrap" }, te = { class: "w-24 h-24 rounded-full bg-fm-color-primary-oats text-fm-color-primary flex items-center justify-center fm-typo-en-body-sm-600" }, ae = { class: "fm-typo-en-body-md-600" }, ne = ["onClick"], se = { class: "flex items-center gap-8" }, ce = { class: "w-24 h-24 rounded-full bg-fm-color-opacity-sm flex items-center justify-center fm-typo-en-body-sm-600" }, me = { class: "fm-typo-en-body-md-400" }, ie = { class: "flex flex-col gap-16 border p-16 rounded-lg" }, de = { class: "flex items-center gap-16" }, re = { class: "fm-typo-en-body-lg-600" }, ue = { class: "flex flex-col gap-32 pl-32" }, pe = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "space-y-8"
|
|
9
|
+
}, fe = { class: "flex w-[100px] items-center gap-8" }, _e = { class: "w-24 h-24 rounded-full bg-fm-color-opacity-sm flex items-center justify-center fm-typo-en-body-sm-600" }, ve = { class: "fm-typo-en-body-md-400" }, he = { class: "flex-1" }, ye = { class: "flex gap-8 items-center justify-start" }, ke = /* @__PURE__ */ K({
|
|
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(O, { emit: S }) {
|
|
19
|
+
const s = O, f = S, { t: d } = P(), { localeList: h } = Q(), c = y([]), k = y([]), u = y(s.name), L = y(s.name);
|
|
20
|
+
E(
|
|
21
|
+
() => s.name,
|
|
22
|
+
(e) => {
|
|
23
|
+
u.value = e;
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
function U() {
|
|
27
|
+
return !s.nameLocale || Object.keys(s.nameLocale).length === 0 ? [] : Object.entries(s.nameLocale).map(([e, o]) => ({
|
|
28
|
+
localeCode: e,
|
|
29
|
+
value: o
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
E(
|
|
33
|
+
() => [s.modelValue, s.nameLocale],
|
|
34
|
+
([e]) => {
|
|
35
|
+
e && (c.value = U(), k.value = D.clone(c.value), u.value = s.name, L.value = s.name);
|
|
36
|
+
},
|
|
37
|
+
{ immediate: !0 }
|
|
38
|
+
);
|
|
39
|
+
const w = F(() => {
|
|
40
|
+
const e = new Set(c.value.map((n) => n.localeCode));
|
|
41
|
+
return a(h).filter((n) => !e.has(n.code)).map((n) => ({
|
|
42
|
+
code: n.code,
|
|
43
|
+
name: n.name,
|
|
44
|
+
icon: V(n.code)
|
|
45
|
+
}));
|
|
46
|
+
});
|
|
47
|
+
function $(e) {
|
|
48
|
+
const o = a(h).find((n) => n.code === e);
|
|
49
|
+
o && c.value.push({
|
|
50
|
+
localeCode: o.code,
|
|
51
|
+
value: ""
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function z(e) {
|
|
55
|
+
c.value = c.value.filter((o) => o.localeCode !== e);
|
|
56
|
+
}
|
|
57
|
+
function A() {
|
|
58
|
+
const e = u.value !== L.value, o = !D.isEqual(c.value, k.value);
|
|
59
|
+
return e || o;
|
|
60
|
+
}
|
|
61
|
+
function M() {
|
|
62
|
+
u.value !== s.name && f("update:name", u.value);
|
|
63
|
+
const e = c.value.filter((o) => o.value.trim());
|
|
64
|
+
if (e.length === 0)
|
|
65
|
+
f("update:nameLocale", void 0);
|
|
66
|
+
else {
|
|
67
|
+
const o = {};
|
|
68
|
+
e.forEach((n) => {
|
|
69
|
+
o[n.localeCode] = n.value.trim();
|
|
70
|
+
}), f("update:nameLocale", o);
|
|
71
|
+
}
|
|
72
|
+
f("update:modelValue", !1);
|
|
73
|
+
}
|
|
74
|
+
function q() {
|
|
75
|
+
f("update:modelValue", !1);
|
|
76
|
+
}
|
|
77
|
+
const N = R(A, q), j = F({
|
|
78
|
+
get: () => s.modelValue,
|
|
79
|
+
set: (e) => f("update:modelValue", e)
|
|
80
|
+
});
|
|
81
|
+
return (e, o) => {
|
|
82
|
+
const n = _("FmIcon"), g = _("fm-button"), J = _("FmMenu"), G = _("fm-text-field"), H = _("fm-side-sheet");
|
|
83
|
+
return i(), T(H, {
|
|
84
|
+
modelValue: j.value,
|
|
85
|
+
"onUpdate:modelValue": o[1] || (o[1] = (l) => j.value = l),
|
|
86
|
+
"max-width": 720,
|
|
87
|
+
"onOn:clickedAway": a(N)
|
|
88
|
+
}, {
|
|
89
|
+
"side-sheet-header": v(() => [
|
|
90
|
+
t("p", Y, m(e.title) + " " + m(a(d)("menu.common.translation.title_suffix")), 1)
|
|
91
|
+
]),
|
|
92
|
+
"side-sheet-footer": v(() => [
|
|
93
|
+
t("div", ye, [
|
|
94
|
+
r(g, {
|
|
95
|
+
label: a(d)("common.save"),
|
|
96
|
+
size: "lg",
|
|
97
|
+
variant: "primary",
|
|
98
|
+
onClick: M
|
|
99
|
+
}, null, 8, ["label"]),
|
|
100
|
+
r(g, {
|
|
101
|
+
label: a(d)("common.cancel"),
|
|
102
|
+
size: "lg",
|
|
103
|
+
variant: "tertiary",
|
|
104
|
+
onClick: a(N)
|
|
105
|
+
}, null, 8, ["label", "onClick"])
|
|
106
|
+
])
|
|
107
|
+
]),
|
|
108
|
+
default: v(() => [
|
|
109
|
+
t("div", Z, [
|
|
110
|
+
t("div", ee, [
|
|
111
|
+
t("p", oe, m(a(d)("menu.common.translation.language")), 1),
|
|
112
|
+
t("div", le, [
|
|
113
|
+
(i(!0), p(x, null, C(c.value, (l) => (i(), p("div", {
|
|
114
|
+
key: l.localeCode,
|
|
115
|
+
class: "flex items-center gap-8 p-8 border border-fm-color-primary text-fm-color-primary rounded-full"
|
|
116
|
+
}, [
|
|
117
|
+
t("div", te, m(a(V)(l.localeCode)), 1),
|
|
118
|
+
t("span", ae, m(a(I)(l.localeCode, a(h))), 1),
|
|
119
|
+
r(n, {
|
|
120
|
+
name: "close",
|
|
121
|
+
class: "cursor-pointer",
|
|
122
|
+
variant: "secondary",
|
|
123
|
+
onClick: (b) => z(l.localeCode)
|
|
124
|
+
}, null, 8, ["onClick"])
|
|
125
|
+
]))), 128)),
|
|
126
|
+
w.value.length > 0 ? (i(), T(J, { key: 0 }, {
|
|
127
|
+
"menu-button": v(() => [
|
|
128
|
+
r(g, {
|
|
129
|
+
variant: "secondary",
|
|
130
|
+
"border-color": "neutral-gray-300",
|
|
131
|
+
"text-color": "neutral-gray-400",
|
|
132
|
+
icon: "add"
|
|
133
|
+
})
|
|
134
|
+
]),
|
|
135
|
+
default: v(() => [
|
|
136
|
+
(i(!0), p(x, null, C(w.value, (l) => (i(), p("div", {
|
|
137
|
+
class: "p-12 cursor-pointer hover:bg-fm-color-opacity-md rounded-sm",
|
|
138
|
+
key: l.code,
|
|
139
|
+
onClick: (b) => $(l.code)
|
|
140
|
+
}, [
|
|
141
|
+
t("div", se, [
|
|
142
|
+
t("div", ce, m(l.icon), 1),
|
|
143
|
+
t("span", me, m(l.name), 1)
|
|
144
|
+
])
|
|
145
|
+
], 8, ne))), 128))
|
|
146
|
+
]),
|
|
147
|
+
_: 1
|
|
148
|
+
})) : B("", !0)
|
|
149
|
+
])
|
|
150
|
+
]),
|
|
151
|
+
t("div", ie, [
|
|
152
|
+
t("div", de, [
|
|
153
|
+
r(n, { name: "keyboard_arrow_down" }),
|
|
154
|
+
t("p", re, m(a(d)("menu.common.translation.name_section", { entity: e.title })), 1)
|
|
155
|
+
]),
|
|
156
|
+
t("div", ue, [
|
|
157
|
+
r(W, {
|
|
158
|
+
label: a(d)("menu.common.translation.default"),
|
|
159
|
+
modelValue: u.value,
|
|
160
|
+
"onUpdate:modelValue": o[0] || (o[0] = (l) => u.value = l)
|
|
161
|
+
}, null, 8, ["label", "modelValue"]),
|
|
162
|
+
c.value.length > 0 ? (i(), p("div", pe, [
|
|
163
|
+
r(X, {
|
|
164
|
+
label: a(d)("menu.common.translation.translation_label")
|
|
165
|
+
}, null, 8, ["label"]),
|
|
166
|
+
(i(!0), p(x, null, C(c.value, (l) => (i(), p("div", {
|
|
167
|
+
key: l.localeCode,
|
|
168
|
+
class: "flex items-center gap-16"
|
|
169
|
+
}, [
|
|
170
|
+
t("div", fe, [
|
|
171
|
+
t("div", _e, m(a(V)(l.localeCode)), 1),
|
|
172
|
+
t("span", ve, m(a(I)(l.localeCode, a(h))), 1)
|
|
173
|
+
]),
|
|
174
|
+
t("div", he, [
|
|
175
|
+
r(G, {
|
|
176
|
+
modelValue: l.value,
|
|
177
|
+
"onUpdate:modelValue": (b) => l.value = b,
|
|
178
|
+
placeholder: a(d)("menu.group.translation.placeholder")
|
|
179
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
180
|
+
])
|
|
181
|
+
]))), 128))
|
|
182
|
+
])) : B("", !0)
|
|
183
|
+
])
|
|
184
|
+
])
|
|
185
|
+
])
|
|
186
|
+
]),
|
|
187
|
+
_: 1
|
|
188
|
+
}, 8, ["modelValue", "onOn:clickedAway"]);
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
export {
|
|
193
|
+
ke as _
|
|
194
|
+
};
|