@feedmepos/mf-menu 0.32.43 → 0.32.45-dev

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.
Files changed (84) hide show
  1. package/dist/{App-C9b4SjED.js → App-u5AOIdU4.js} +1472 -1459
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C1T4Ewek.js → ApplyProduct.vue_vue_type_script_setup_true_lang-RTdI8EVk.js} +3 -3
  3. package/dist/{Catalog-BVrf3VaX.js → Catalog-DDMz6wD9.js} +44 -44
  4. package/dist/{Category-BkReM5IG.js → Category-BE0d0_de.js} +24 -24
  5. package/dist/{Category-BMzIQqIE.js → Category-DoIleKPb.js} +78 -78
  6. package/dist/{CookingGuide-CvctI1TH.js → CookingGuide-iP5hFtlB.js} +105 -105
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-bYSEp6Wb.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CSaMT7Gr.js} +1 -1
  8. package/dist/{Group-CHkNuuHE.js → Group-AXDRjsKC.js} +3 -3
  9. package/dist/{Group-BQzmXagr.js → Group-xjimyqnO.js} +1 -1
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-BkruJTpL.js → Group.vue_vue_type_script_setup_true_lang-DB_X7ws3.js} +173 -173
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CBz83Qd1.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D_IUSYDa.js} +30 -30
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Dpx4meDa.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Suib7m8i.js} +1750 -1751
  13. package/dist/{Ingredient-BNsKYrQB.js → Ingredient-yr2DWIMw.js} +20 -20
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DzzwwdA_.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BpiU1gRP.js} +2 -2
  15. package/dist/{LinkProductSideSheet-C6-wef-M.js → LinkProductSideSheet-2MbaATTn.js} +45 -45
  16. package/dist/{MenuSetting-DRaw7b6m.js → MenuSetting-BhkjzPiN.js} +47 -47
  17. package/dist/{PrintRoute-BKB-thVp.js → PrintRoute-ChqpbVo4.js} +39 -39
  18. package/dist/{Product-vviXmBR1.js → Product-BpnGnMzm.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-5h-k6zad.js → Product.vue_vue_type_script_setup_true_lang-COkk299w.js} +465 -463
  20. package/dist/{ProductInternalTools-DtLk3xFR.js → ProductInternalTools-BEwLYcEn.js} +66 -66
  21. package/dist/Products-lONe7x_i.js +291 -0
  22. package/dist/{Publish-jx0_H_26.js → Publish-CXRgBz-S.js} +29 -29
  23. package/dist/{Recipe-Dk04ge-_.js → Recipe-Bbt3hG6N.js} +24 -24
  24. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DaCVUn1i.js → RuleView.vue_vue_type_script_setup_true_lang-DXisBADc.js} +366 -366
  25. package/dist/{Scheduler-vFTvCVcY.js → Scheduler-DJsgP_Hi.js} +11 -11
  26. package/dist/{ServingSequence-DiBqQ_iS.js → ServingSequence-DALjVV2I.js} +44 -44
  27. package/dist/{Setting-CtzJ_pVM.js → Setting-B23o5SoS.js} +17 -17
  28. package/dist/{Subcategory-Cmv2W67T.js → Subcategory-CS4MEgtM.js} +109 -110
  29. package/dist/{Takeaway-DBW4UPFZ.js → Takeaway-CI2Y-_LF.js} +13 -13
  30. package/dist/{Takeaway-ChaYk0Ix.js → Takeaway-D27iA6M6.js} +1 -1
  31. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-C7RL3ITP.js → Takeaway.vue_vue_type_script_setup_true_lang-Ca3qK9zO.js} +111 -111
  32. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-edwJ1203.js → Thumbnail.vue_vue_type_script_setup_true_lang-Da2jQE45.js} +27 -27
  33. package/dist/TranslationFieldSection.vue_vue_type_script_setup_true_lang-DUScE-82.js +278 -0
  34. package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-E3-hgVdd.js +140 -0
  35. package/dist/TranslationViewChip.vue_vue_type_script_setup_true_lang-BlACWsDs.js +60 -0
  36. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DnuNFxC7.js +6130 -0
  37. package/dist/{Unit-BgLqPMLe.js → Unit-5pv3oxSc.js} +8 -8
  38. package/dist/Variant-CTAI6p6r.js +248 -0
  39. package/dist/{_id_-CDN7as0K.js → _id_-D09xegPQ.js} +28 -28
  40. package/dist/{app-0AQBxO0B.js → app-8-JCz9b5.js} +1 -1
  41. package/dist/app-Bk0DN7oZ.js +363 -0
  42. package/dist/app.js +1 -1
  43. package/dist/apps/mf-menu/src/components/translation/LanguageChip.vue.d.ts +18 -0
  44. package/dist/apps/mf-menu/src/components/translation/LanguageSelector.vue.d.ts +33 -0
  45. package/dist/apps/mf-menu/src/components/translation/LocaleIconBadge.vue.d.ts +29 -0
  46. package/dist/apps/mf-menu/src/components/translation/TranslationFieldRow.vue.d.ts +39 -0
  47. package/dist/apps/mf-menu/src/components/translation/TranslationViewChip.vue.d.ts +15 -0
  48. package/dist/apps/mf-menu/src/composable/translationLanguages.d.ts +16 -0
  49. package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
  50. package/dist/apps/mf-menu/src/utils/translation.d.ts +1 -1
  51. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  52. package/dist/assets/{linked-status-DTIHdzDw.js → linked-status-dENy3aw3.js} +5 -5
  53. package/dist/assets/{menu-export-CpcyYnR-.js → menu-export-E9V7bg-T.js} +2 -2
  54. package/dist/assets/{override-menu-CASoFjhZ.js → override-menu-HaI7O9Fu.js} +5 -5
  55. package/dist/assets/{validate-menu-C5AkexWv.js → validate-menu-C8LhbVSM.js} +2 -2
  56. package/dist/{catalog-BA1e4WAu.js → catalog-DhXoYsFF.js} +1 -1
  57. package/dist/{catalogSetting-DE5rjVfj.js → catalogSetting-DyRqWzdW.js} +1 -1
  58. package/dist/{currency-D5qYOpxI.js → currency-BkmIftYM.js} +1 -1
  59. package/dist/dayjs.min-nQqVHQcC.js +6 -0
  60. package/dist/index-28XF3UnN.js +246 -0
  61. package/dist/{index-vPs04fVf.js → index-BQ95VVc6.js} +33 -32
  62. package/dist/index-BXWquw9Z.js +472 -0
  63. package/dist/{index.vue_vue_type_script_setup_true_lang-DSZsSghE.js → index.vue_vue_type_script_setup_true_lang-CJO2XWIn.js} +270 -244
  64. package/dist/{item-Dp17qTYi.js → item-DmTvGVsp.js} +3270 -3406
  65. package/dist/{jszip.min-DlpCmtaR.js → jszip.min-8Z5To_Pk.js} +6 -7
  66. package/dist/{menu-BOVrJ7di.js → menu-Csu9X1_I.js} +1 -1
  67. package/dist/{menuV2-BHnldQiM.js → menuV2-CC-vGiv5.js} +71 -71
  68. package/dist/{priceTier-BRQz1GRF.js → priceTier-Bj9Y6SSr.js} +1 -1
  69. package/dist/{rules-CO49kqfr.js → rules-Dod2cBHH.js} +12 -12
  70. package/dist/{scheduler-BDHjl8t7.js → scheduler-B3M-715v.js} +29 -29
  71. package/dist/{toExcel-DGdZKSxT.js → toExcel-67ufpOxx.js} +2 -2
  72. package/dist/{unit-D7QVgTp_.js → unit-BQrnccs6.js} +35 -35
  73. package/package.json +1 -1
  74. package/dist/Products-BR3iBVFd.js +0 -307
  75. package/dist/RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-I6qrPmxY.js +0 -144
  76. package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-Cs6s_csi.js +0 -196
  77. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DIbjlDVn.js +0 -5767
  78. package/dist/Variant-B8yxF5mJ.js +0 -247
  79. package/dist/app-BU6wILmn.js +0 -2286
  80. package/dist/dayjs.min-BFDAHpA8.js +0 -7
  81. package/dist/index--nQbIQ0d.js +0 -545
  82. package/dist/translation-BCZ1Ruvv.js +0 -93
  83. /package/dist/apps/mf-menu/src/components/{TranslationBadge.vue.d.ts → translation/TranslationBadge.vue.d.ts} +0 -0
  84. /package/dist/apps/mf-menu/src/components/{TranslationFieldSection.vue.d.ts → translation/TranslationFieldSection.vue.d.ts} +0 -0
@@ -0,0 +1,278 @@
1
+ import { defineComponent as v, createElementBlock as c, openBlock as t, normalizeClass as h, toDisplayString as y, unref as i, resolveComponent as u, createVNode as _, createElementVNode as d, computed as b, createBlock as g, createCommentVNode as B, Fragment as k, renderList as F, withCtx as x } from "vue";
2
+ import { useI18n as N } from "@feedmepos/mf-common";
3
+ import { u as S } from "./index.vue_vue_type_script_setup_true_lang-CJO2XWIn.js";
4
+ const T = {
5
+ "en-US": {
6
+ icon: "EN",
7
+ name: "English"
8
+ },
9
+ "zh-CN": {
10
+ icon: "简",
11
+ name: "简体中文"
12
+ },
13
+ "th-TH": {
14
+ icon: "TH",
15
+ name: "ไทย"
16
+ },
17
+ "ja-JP": {
18
+ icon: "JP",
19
+ name: "日本語"
20
+ },
21
+ "zh-Hant": {
22
+ icon: "繁",
23
+ name: "繁體中文"
24
+ },
25
+ "id-ID": {
26
+ icon: "ID",
27
+ name: "Bahasa Indonesia"
28
+ },
29
+ "vi-VN": {
30
+ icon: "VN",
31
+ name: "Tiếng Việt"
32
+ },
33
+ "ms-MY": {
34
+ icon: "MY",
35
+ name: "Bahasa Melayu"
36
+ },
37
+ "ph-PH": {
38
+ icon: "PH",
39
+ name: "Filipino"
40
+ },
41
+ "ko-KR": {
42
+ icon: "KR",
43
+ name: "한국어"
44
+ },
45
+ "fr-MA": {
46
+ icon: "MA",
47
+ name: "Français (Maroc)"
48
+ }
49
+ };
50
+ function w(n) {
51
+ var o, e;
52
+ const l = ((o = n.split("-")[1]) == null ? void 0 : o.toUpperCase()) ?? "";
53
+ return ((e = T[n]) == null ? void 0 : e.icon) || l;
54
+ }
55
+ function L(n) {
56
+ var l;
57
+ return ((l = T[n]) == null ? void 0 : l.name) || n;
58
+ }
59
+ const C = /* @__PURE__ */ v({
60
+ __name: "LocaleIconBadge",
61
+ props: {
62
+ localeCode: {},
63
+ variant: { default: "neutral" }
64
+ },
65
+ setup(n) {
66
+ const l = {
67
+ primary: "bg-fm-color-primary-oats text-fm-color-primary",
68
+ secondary: "bg-fm-color-opacity-sm text-fm-color-typo-primary",
69
+ neutral: "bg-fm-color-opacity-sm text-fm-color-typo-primary"
70
+ };
71
+ return (o, e) => (t(), c("div", {
72
+ class: h([
73
+ "w-24 h-24 rounded-full flex items-center justify-center fm-typo-en-body-sm-600",
74
+ l[o.variant]
75
+ ])
76
+ }, y(i(w)(o.localeCode)), 3));
77
+ }
78
+ }), U = { class: "flex items-center gap-8 p-8 border border-fm-color-primary text-fm-color-primary rounded-full" }, E = { class: "fm-typo-en-body-md-600" }, H = /* @__PURE__ */ v({
79
+ __name: "LanguageChip",
80
+ props: {
81
+ localeCode: {}
82
+ },
83
+ emits: ["remove"],
84
+ setup(n, { emit: l }) {
85
+ const o = l;
86
+ return (e, a) => {
87
+ const s = u("FmIcon");
88
+ return t(), c("div", U, [
89
+ _(C, {
90
+ "locale-code": e.localeCode,
91
+ variant: "primary"
92
+ }, null, 8, ["locale-code"]),
93
+ d("span", E, y(i(L)(e.localeCode)), 1),
94
+ _(s, {
95
+ name: "close",
96
+ class: "cursor-pointer",
97
+ variant: "secondary",
98
+ onClick: a[0] || (a[0] = (m) => o("remove", e.localeCode))
99
+ })
100
+ ]);
101
+ };
102
+ }
103
+ });
104
+ function P(n) {
105
+ const l = S(), o = b(() => l.state.featureFlags.supportedLocales.map((a) => ({
106
+ code: a,
107
+ name: L(a)
108
+ }))), e = b(() => {
109
+ const a = new Set(n.value);
110
+ return o.value.filter((s) => !a.has(s.code));
111
+ });
112
+ return {
113
+ localeList: o,
114
+ availableLocales: e
115
+ };
116
+ }
117
+ const R = { class: "flex flex-col gap-8" }, A = { class: "text-fm-color-typo-primary fm-typo-en-body-lg-600" }, z = { class: "flex items-center gap-8 flex-wrap" }, D = ["onClick"], j = { class: "flex items-center gap-8" }, J = { class: "fm-typo-en-body-md-400" }, X = /* @__PURE__ */ v({
118
+ __name: "LanguageSelector",
119
+ props: {
120
+ selectedLocales: {},
121
+ label: { default: "" }
122
+ },
123
+ emits: ["update:selectedLocales"],
124
+ setup(n, { emit: l }) {
125
+ const o = n, e = l, { t: a } = N(), s = b(() => o.selectedLocales), { availableLocales: m } = P(s);
126
+ function r(f) {
127
+ e("update:selectedLocales", [...o.selectedLocales, f]);
128
+ }
129
+ function $(f) {
130
+ e(
131
+ "update:selectedLocales",
132
+ o.selectedLocales.filter((V) => V !== f)
133
+ );
134
+ }
135
+ return (f, V) => {
136
+ const I = u("fm-button"), M = u("FmMenu");
137
+ return t(), c("div", R, [
138
+ d("p", A, y(f.label || i(a)("menu.common.translation.language")), 1),
139
+ d("div", z, [
140
+ (t(!0), c(k, null, F(f.selectedLocales, (p) => (t(), g(H, {
141
+ key: p,
142
+ "locale-code": p,
143
+ onRemove: $
144
+ }, null, 8, ["locale-code"]))), 128)),
145
+ i(m).length > 0 ? (t(), g(M, { key: 0 }, {
146
+ "menu-button": x(() => [
147
+ _(I, {
148
+ variant: "secondary",
149
+ "border-color": "neutral-gray-300",
150
+ "text-color": "neutral-gray-400",
151
+ icon: "add"
152
+ })
153
+ ]),
154
+ default: x(() => [
155
+ (t(!0), c(k, null, F(i(m), (p) => (t(), c("div", {
156
+ class: "p-12 cursor-pointer hover:bg-fm-color-opacity-md rounded-sm",
157
+ key: p.code,
158
+ onClick: (q) => r(p.code)
159
+ }, [
160
+ d("div", j, [
161
+ _(C, {
162
+ "locale-code": p.code,
163
+ variant: "secondary"
164
+ }, null, 8, ["locale-code"]),
165
+ d("span", J, y(p.name), 1)
166
+ ])
167
+ ], 8, D))), 128))
168
+ ]),
169
+ _: 1
170
+ })) : B("", !0)
171
+ ])
172
+ ]);
173
+ };
174
+ }
175
+ }), K = /* @__PURE__ */ v({
176
+ __name: "TranslationBadge",
177
+ props: {
178
+ label: {},
179
+ spacing: { default: "md" }
180
+ },
181
+ setup(n) {
182
+ const o = n.spacing === "sm" ? "mb-4" : "mb-8";
183
+ return (e, a) => (t(), c("p", {
184
+ class: h([
185
+ "fm-typo-en-body-sm-600 text-fm-color-typo-secondary border inline-block rounded-full px-8 py-4",
186
+ i(o)
187
+ ])
188
+ }, y(e.label), 3));
189
+ }
190
+ }), O = { class: "fm-typo-en-body-md-400" }, Y = { class: "flex-1" }, Z = /* @__PURE__ */ v({
191
+ __name: "TranslationFieldRow",
192
+ props: {
193
+ localeCode: {},
194
+ modelValue: {},
195
+ placeholder: {},
196
+ readonly: { type: Boolean, default: !1 },
197
+ inputType: { default: "text" }
198
+ },
199
+ emits: ["update:modelValue"],
200
+ setup(n, { emit: l }) {
201
+ const o = l;
202
+ return (e, a) => {
203
+ const s = u("fm-text-field"), m = u("fm-textarea");
204
+ return t(), c("div", {
205
+ class: h(["flex gap-16", e.inputType === "textarea" ? "items-start" : "items-center"])
206
+ }, [
207
+ d("div", {
208
+ class: h(["flex w-[100px] items-center gap-8", e.inputType === "textarea" ? "pt-12" : ""])
209
+ }, [
210
+ _(C, {
211
+ "locale-code": e.localeCode,
212
+ variant: "secondary"
213
+ }, null, 8, ["locale-code"]),
214
+ d("span", O, y(i(L)(e.localeCode)), 1)
215
+ ], 2),
216
+ d("div", Y, [
217
+ e.inputType === "text" ? (t(), g(s, {
218
+ key: 0,
219
+ "model-value": e.modelValue,
220
+ placeholder: e.placeholder,
221
+ readonly: e.readonly,
222
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => o("update:modelValue", r))
223
+ }, null, 8, ["model-value", "placeholder", "readonly"])) : (t(), g(m, {
224
+ key: 1,
225
+ "model-value": e.modelValue,
226
+ placeholder: e.placeholder,
227
+ readonly: e.readonly,
228
+ "onUpdate:modelValue": a[1] || (a[1] = (r) => o("update:modelValue", r))
229
+ }, null, 8, ["model-value", "placeholder", "readonly"]))
230
+ ])
231
+ ], 2);
232
+ };
233
+ }
234
+ }), ee = /* @__PURE__ */ v({
235
+ __name: "TranslationFieldSection",
236
+ props: {
237
+ label: {},
238
+ modelValue: {},
239
+ type: { default: "text" },
240
+ spacing: { default: "md" },
241
+ placeholder: {},
242
+ readonly: { type: Boolean, default: !1 }
243
+ },
244
+ emits: ["update:modelValue"],
245
+ setup(n, { emit: l }) {
246
+ const o = l;
247
+ return (e, a) => {
248
+ const s = u("FmTextField"), m = u("fm-textarea");
249
+ return t(), c("div", null, [
250
+ _(K, {
251
+ label: e.label,
252
+ spacing: e.spacing
253
+ }, null, 8, ["label", "spacing"]),
254
+ e.type === "text" ? (t(), g(s, {
255
+ key: 0,
256
+ "model-value": e.modelValue,
257
+ placeholder: e.placeholder,
258
+ readonly: e.readonly,
259
+ "onUpdate:modelValue": a[0] || (a[0] = (r) => o("update:modelValue", r))
260
+ }, null, 8, ["model-value", "placeholder", "readonly"])) : (t(), g(m, {
261
+ key: 1,
262
+ "model-value": e.modelValue,
263
+ placeholder: e.placeholder,
264
+ readonly: e.readonly,
265
+ "onUpdate:modelValue": a[1] || (a[1] = (r) => o("update:modelValue", r))
266
+ }, null, 8, ["model-value", "placeholder", "readonly"]))
267
+ ]);
268
+ };
269
+ }
270
+ });
271
+ export {
272
+ X as _,
273
+ ee as a,
274
+ K as b,
275
+ Z as c,
276
+ L as d,
277
+ w as g
278
+ };
@@ -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-CJO2XWIn.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-DUScE-82.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-DUScE-82.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
+ };