@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.
Files changed (80) hide show
  1. package/dist/{App-BXkiQoTM.js → App-CczmyQeJ.js} +1471 -1458
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BoSL4dm7.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BscsJpMV.js} +3 -3
  3. package/dist/{Catalog-CLFVLyor.js → Catalog-RU_6keJm.js} +6 -6
  4. package/dist/{Category-CNuVHuI3.js → Category-7Fg2kD0h.js} +79 -79
  5. package/dist/{Category-BdyouDU8.js → Category-CwEXbsDv.js} +4 -4
  6. package/dist/{CookingGuide-Bed7bUt1.js → CookingGuide-DFu5VStf.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CZDL2xJC.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CeNfLbfq.js} +1 -1
  8. package/dist/{Group-TUqCPmO3.js → Group-C6vQeBnj.js} +1 -1
  9. package/dist/{Group-D4UTsIxI.js → Group-l-YpAi6B.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-BJPT8flL.js → Group.vue_vue_type_script_setup_true_lang-1UdOBdv-.js} +165 -165
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D83liryu.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-C309DrLU.js} +5 -5
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CRIRinHB.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C903fhuj.js} +6 -6
  13. package/dist/{Ingredient-CcxoeuDd.js → Ingredient-CHqDo-GY.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-58tyxdVh.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CXHHlrI0.js} +2 -2
  15. package/dist/{LinkProductSideSheet-DazOkwkd.js → LinkProductSideSheet-DY32g33Q.js} +3 -3
  16. package/dist/{MenuSetting-B3oLll4C.js → MenuSetting-DhbxlKuU.js} +5 -5
  17. package/dist/{PrintRoute-D878qPu8.js → PrintRoute-CToZ0ClG.js} +4 -4
  18. package/dist/{Product-DOC8y_mW.js → Product-Cpg32wpg.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-tZyBhWYT.js → Product.vue_vue_type_script_setup_true_lang-BC2KG1q4.js} +440 -438
  20. package/dist/{ProductInternalTools-9TgIc2bR.js → ProductInternalTools-wH9BN1NK.js} +5 -5
  21. package/dist/Products-CpINHaH6.js +291 -0
  22. package/dist/{Publish-BktK_PKq.js → Publish-CJS_836k.js} +3 -3
  23. package/dist/{Recipe-eA0xrGYk.js → Recipe-Cz7hivmM.js} +4 -4
  24. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-t8M7z09s.js → RuleView.vue_vue_type_script_setup_true_lang-CRLzqgQe.js} +207 -207
  25. package/dist/{Scheduler-CKSqPZLQ.js → Scheduler-QuWCnEJw.js} +3 -3
  26. package/dist/{ServingSequence-Ea20baNj.js → ServingSequence-CqK5Sjmq.js} +3 -3
  27. package/dist/{Setting-u6lX_Dzg.js → Setting-C3tKUfsm.js} +5 -5
  28. package/dist/{Subcategory-C6s7OMOb.js → Subcategory-DCtTOPUj.js} +99 -100
  29. package/dist/{Takeaway-lWxS9oWe.js → Takeaway-BnB1OFnK.js} +1 -1
  30. package/dist/{Takeaway-B9kr-Nf4.js → Takeaway-Fi8SAH2t.js} +4 -4
  31. 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
  32. 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
  33. package/dist/TranslationFieldSection.vue_vue_type_script_setup_true_lang-BpL8UrFY.js +278 -0
  34. package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-DtkzQeq4.js +140 -0
  35. package/dist/TranslationViewChip.vue_vue_type_script_setup_true_lang-CHT7Xozn.js +60 -0
  36. 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
  37. package/dist/{Unit-DkQlUg2l.js → Unit-5yE2-y9D.js} +2 -2
  38. package/dist/Variant-C7lIdRID.js +248 -0
  39. package/dist/{_id_-_oqk-OhC.js → _id_-08ykp97a.js} +9 -9
  40. package/dist/{app-CfCYl2pO.js → app-CA4g3v2n.js} +26 -26
  41. package/dist/{app-DIYHNWEw.js → app-DPovSnb_.js} +1 -1
  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-AoXjo9FF.js → linked-status-WT6deoPw.js} +2 -2
  53. package/dist/assets/{menu-export-BHcaWhM3.js → menu-export-DxtFXMED.js} +2 -2
  54. package/dist/assets/{override-menu-B9xQcjuJ.js → override-menu-BJGRdWWE.js} +2 -2
  55. package/dist/assets/{validate-menu-D-ezd4W8.js → validate-menu-B_tmkHe7.js} +2 -2
  56. package/dist/{catalog-CvN9Wu8V.js → catalog-D7Jjqj3-.js} +1 -1
  57. package/dist/{catalogSetting-qS5Np22q.js → catalogSetting-Bg_zMUrV.js} +1 -1
  58. package/dist/{currency-Nxod6uwl.js → currency-DDxFMjAI.js} +1 -1
  59. package/dist/{dayjs.min-B1AjAGva.js → dayjs.min-BVOO8wJG.js} +1 -1
  60. package/dist/{index-Cq-czJjU.js → index-BlLRjkMF.js} +8 -7
  61. package/dist/{index-nKlYiotY.js → index-CG7GFWlC.js} +1 -1
  62. package/dist/index-Cq2MVpMv.js +472 -0
  63. package/dist/{index.vue_vue_type_script_setup_true_lang-YXKayPEp.js → index.vue_vue_type_script_setup_true_lang-C6IVvAua.js} +169 -168
  64. package/dist/{item-CUZSonzT.js → item-Bq6SCc7D.js} +3250 -3386
  65. package/dist/{jszip.min-BnkZQ6lD.js → jszip.min-1MrCGuHF.js} +2 -2
  66. package/dist/{menu-BP_ArXCI.js → menu-CKA9uouu.js} +1 -1
  67. package/dist/{menuV2-BGEYgQ8-.js → menuV2-DBkrmeha.js} +71 -71
  68. package/dist/{priceTier-B-Qa0xaO.js → priceTier-Cxr9IcVP.js} +1 -1
  69. package/dist/{rules-Dchd_ilF.js → rules-DFWR7a3m.js} +4 -4
  70. package/dist/{scheduler-DN7ZGLk8.js → scheduler-HKff8Ty2.js} +4 -4
  71. package/dist/{toExcel-jHmkDqcm.js → toExcel-DopYrxBW.js} +2 -2
  72. package/dist/{unit-DgL56pkI.js → unit-5G600HMJ.js} +2 -2
  73. package/package.json +1 -1
  74. package/dist/Products-DfUGnHmD.js +0 -1568
  75. package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-CcIGCUwk.js +0 -194
  76. package/dist/Variant-BF5r2WLL.js +0 -247
  77. package/dist/index-C0Zw1cSS.js +0 -545
  78. package/dist/translation-Cdap0IVg.js +0 -79
  79. /package/dist/apps/mf-menu/src/components/{TranslationBadge.vue.d.ts → translation/TranslationBadge.vue.d.ts} +0 -0
  80. /package/dist/apps/mf-menu/src/components/{TranslationFieldSection.vue.d.ts → translation/TranslationFieldSection.vue.d.ts} +0 -0
@@ -1,15 +1,15 @@
1
- import { getCurrentInstance as te, defineComponent as ne, computed as T, watch as oe, h as U, resolveComponent as L, createElementBlock as V, openBlock as w, Fragment as O, normalizeClass as D, createElementVNode as g, createVNode as I, unref as i, isRef as j, withCtx as P, renderList as ie, createBlock as G, createCommentVNode as $, toDisplayString as B, withModifiers as q } from "vue";
2
- import { G as H, u as J, Q as W, M as N, A as z, I as Y, B as se, ap as Q, a4 as re } from "./index.vue_vue_type_script_setup_true_lang-YXKayPEp.js";
1
+ import { getCurrentInstance as te, defineComponent as ne, computed as C, watch as oe, h as M, resolveComponent as L, createElementBlock as V, openBlock as w, Fragment as P, normalizeClass as D, createElementVNode as g, createVNode as I, unref as i, isRef as $, withCtx as O, renderList as ie, createBlock as j, createCommentVNode as G, toDisplayString as S, withModifiers as q } from "vue";
2
+ import { G as H, u as J, Q as W, M as N, A as z, I as Y, B as se, ap as Q, a4 as re } from "./index.vue_vue_type_script_setup_true_lang-C6IVvAua.js";
3
3
  import { useI18n as X, useCoreStore as le } from "@feedmepos/mf-common";
4
4
  import { useDialog as ce, useSnackbar as Z, FmButtonVariant as A, components as de, useBreakpoints as ue } from "@feedmepos/ui-library";
5
- import { _ as me } from "./app-CfCYl2pO.js";
6
- import { a as ye, l as ee, T as pe } from "./index-Cq-czJjU.js";
7
- import { u as fe } from "./search-BAPEUu1R.js";
8
- import { f as F } from "./currency-Nxod6uwl.js";
9
- import { defineStore as _e } from "pinia";
10
- import { C as ke } from "./catalog-CvN9Wu8V.js";
11
- import { c as ve } from "./createComponentProgrammatically-Bt2rn1IQ.js";
12
- import { g as we } from "./translation-Cdap0IVg.js";
5
+ import { _ as me } from "./app-CA4g3v2n.js";
6
+ import { a as ye, l as ee, T as pe } from "./index-BlLRjkMF.js";
7
+ import { _ as fe } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-CHT7Xozn.js";
8
+ import { u as _e } from "./search-BAPEUu1R.js";
9
+ import { f as F } from "./currency-DDxFMjAI.js";
10
+ import { defineStore as ke } from "pinia";
11
+ import { C as ve } from "./catalog-D7Jjqj3-.js";
12
+ import { c as we } from "./createComponentProgrammatically-Bt2rn1IQ.js";
13
13
  function ge(b, _, l, u) {
14
14
  var y, p, k;
15
15
  if (u >= 0) {
@@ -24,39 +24,39 @@ function be(b, _, l, u) {
24
24
  const e = Y(b);
25
25
  e.override.takeaway[l._id] = { price: l.price || void 0 };
26
26
  const y = [...l.usedBy, ..._.usedBy];
27
- for (const o of y) {
27
+ for (const n of y) {
28
28
  const c = l.usedBy.some(
29
- (s) => s._id === o._id && s.combinationKey === o.combinationKey
30
- ) ? l._id : "", a = (e.override.items[o._id] || []).findIndex(
31
- (s) => s.combinationKey === o.combinationKey
32
- ), d = ge(e, o, u, a);
29
+ (s) => s._id === n._id && s.combinationKey === n.combinationKey
30
+ ) ? l._id : "", a = (e.override.items[n._id] || []).findIndex(
31
+ (s) => s.combinationKey === n.combinationKey
32
+ ), d = ge(e, n, u, a);
33
33
  if (a >= 0)
34
- e.override.items[o._id][a].takeawayUsed = c;
34
+ e.override.items[n._id][a].takeawayUsed = c;
35
35
  else if (d !== c) {
36
36
  const s = {
37
- _id: o._id,
38
- combinationKey: o.combinationKey,
37
+ _id: n._id,
38
+ combinationKey: n.combinationKey,
39
39
  takeawayUsed: c
40
40
  };
41
- e.override.items[o._id] = [...e.override.items[o._id] || [], s];
41
+ e.override.items[n._id] = [...e.override.items[n._id] || [], s];
42
42
  }
43
43
  }
44
- const p = [...new Set(y.map((o) => o._id))];
45
- for (const o of p) {
46
- const v = u.find((d) => d._id === o);
44
+ const p = [...new Set(y.map((n) => n._id))];
45
+ for (const n of p) {
46
+ const v = u.find((d) => d._id === n);
47
47
  if (!((m = (k = v == null ? void 0 : v.variant) == null ? void 0 : k.variantCombinations) != null && m.length)) continue;
48
- const c = (e.override.items[o] || []).findIndex(
48
+ const c = (e.override.items[n] || []).findIndex(
49
49
  (d) => !d.combinationKey
50
50
  );
51
51
  if (c < 0) continue;
52
- l.usedBy.some((d) => d._id === o) || (e.override.items[o][c].takeawayUsed = "");
52
+ l.usedBy.some((d) => d._id === n) || (e.override.items[n][c].takeawayUsed = "");
53
53
  }
54
54
  return e;
55
55
  }
56
- const he = _e("takeaway-manager", () => {
56
+ const he = ke("takeaway-manager", () => {
57
57
  const b = ce(), _ = Z(), l = H(_), u = W(l), e = J(), y = te(), { t: p } = X(), k = (a) => {
58
58
  var s, h;
59
- const { vNode: d } = ve(
59
+ const { vNode: d } = we(
60
60
  ye,
61
61
  y,
62
62
  a
@@ -64,8 +64,8 @@ const he = _e("takeaway-manager", () => {
64
64
  (h = (s = d.component) == null ? void 0 : s.exposed) == null || h.trigger();
65
65
  };
66
66
  async function m(a) {
67
- var h, E;
68
- const s = ((E = (h = e.currentCatalog) == null ? void 0 : h.override.takeaway[a._id]) == null ? void 0 : E.price) ? null : e.state.menu.modules.takeaway.find((x) => x._id === a._id);
67
+ var h, U;
68
+ const s = ((U = (h = e.currentCatalog) == null ? void 0 : h.override.takeaway[a._id]) == null ? void 0 : U.price) ? null : e.state.menu.modules.takeaway.find((x) => x._id === a._id);
69
69
  k({
70
70
  initialValue: a,
71
71
  applyProduct: !0,
@@ -73,12 +73,12 @@ const he = _e("takeaway-manager", () => {
73
73
  fallback: s,
74
74
  action: "update",
75
75
  "onUpdate:takeaway": async (x) => {
76
- let n = Y(e.currentCatalog);
77
- x.price ? n.override.takeaway[a._id] = { price: x.price } : delete n.override.takeaway[a._id], n = be(n, a, x, e.state.menu.modules.item), await new ke(n, e, u.updateMenu, b).update();
76
+ let t = Y(e.currentCatalog);
77
+ x.price ? t.override.takeaway[a._id] = { price: x.price } : delete t.override.takeaway[a._id], t = be(t, a, x, e.state.menu.modules.item), await new ve(t, e, u.updateMenu, b).update();
78
78
  }
79
79
  });
80
80
  }
81
- async function o(a) {
81
+ async function n(a) {
82
82
  k({
83
83
  initialValue: a,
84
84
  bindToVariant: e.rules.item.bindToVariant,
@@ -98,7 +98,7 @@ const he = _e("takeaway-manager", () => {
98
98
  });
99
99
  }
100
100
  async function v(a) {
101
- e.currentCatalog ? await m(a) : await o(a);
101
+ e.currentCatalog ? await m(a) : await n(a);
102
102
  }
103
103
  async function c(a) {
104
104
  b.open({
@@ -151,55 +151,55 @@ const he = _e("takeaway-manager", () => {
151
151
  }, Be = {
152
152
  key: 1,
153
153
  class: "xs:pt-24"
154
- }, $e = /* @__PURE__ */ ne({
154
+ }, Ge = /* @__PURE__ */ ne({
155
155
  __name: "Takeaway",
156
156
  emits: ["update:count"],
157
157
  setup(b, {
158
158
  emit: _
159
159
  }) {
160
- const l = J(), u = he(), e = T(() => l.rules.item.bindToVariant), y = T(() => l.rules.takeaway), p = W(H(Z())), k = le(), m = T(() => se.Country.getCountry(k.currentCountry.value).currency), o = T(() => l.takeaways.map((n) => ({
161
- ...n,
162
- usedBy: l.items.reduce((r, f) => {
163
- var t, K, R;
164
- const C = f.takeawayUsed === n._id;
165
- if ((!e.value || !((K = (t = f.variant) == null ? void 0 : t.variantGroupIds) != null && K.length)) && C)
166
- r.push({
160
+ const l = J(), u = he(), e = C(() => l.rules.item.bindToVariant), y = C(() => l.rules.takeaway), p = W(H(Z())), k = le(), m = C(() => se.Country.getCountry(k.currentCountry.value).currency), n = C(() => l.takeaways.map((t) => ({
161
+ ...t,
162
+ usedBy: l.items.reduce((o, f) => {
163
+ var r, E, R;
164
+ const T = f.takeawayUsed === t._id;
165
+ if ((!e.value || !((E = (r = f.variant) == null ? void 0 : r.variantGroupIds) != null && E.length)) && T)
166
+ o.push({
167
167
  _id: f._id
168
168
  });
169
169
  else {
170
- const ae = (((R = f.variant) == null ? void 0 : R.variantCombinations) || []).filter((S) => S.takeawayUsed === n._id || S.takeawayUsed == null && C).map((S) => ({
170
+ const ae = (((R = f.variant) == null ? void 0 : R.variantCombinations) || []).filter((K) => K.takeawayUsed === t._id || K.takeawayUsed == null && T).map((K) => ({
171
171
  _id: f._id,
172
- combinationKey: S.combinationKey
172
+ combinationKey: K.combinationKey
173
173
  }));
174
- r = [...r, ...ae];
174
+ o = [...o, ...ae];
175
175
  }
176
- return r;
176
+ return o;
177
177
  }, [])
178
178
  }))), {
179
179
  filter: v,
180
180
  searchKey: c
181
- } = fe(), a = T(() => o.value.filter((n) => v([n.name, F(n.price, !1)]))), d = _;
182
- oe(() => a.value.length, (n) => {
183
- d("update:count", n);
181
+ } = _e(), a = C(() => n.value.filter((t) => v([t.name, F(t.price, !1)]))), d = _;
182
+ oe(() => a.value.length, (t) => {
183
+ d("update:count", t);
184
184
  }, {
185
185
  immediate: !0
186
186
  });
187
187
  const {
188
188
  t: s
189
- } = X(), h = T(() => [{
189
+ } = X(), h = C(() => [{
190
190
  accessorKey: "name",
191
191
  header: () => s("menu.takeaway.table.columns.name"),
192
192
  enableSorting: !1,
193
193
  size: 700,
194
- cell: (n) => {
195
- const r = n.row.original, f = n.getValue(), M = Object.keys(r.name_locale ?? {}).map((t) => we(t));
196
- return U("div", {
194
+ cell: (t) => {
195
+ const o = t.row.original, f = t.getValue();
196
+ return M("div", {
197
197
  class: "flex items-center gap-8"
198
- }, [U("span", {
198
+ }, [M("span", {
199
199
  class: "break-all"
200
- }, f), ...M.map((t) => U("div", {
201
- 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"
202
- }, t))]);
200
+ }, f), o.name_locale ? M(fe, {
201
+ nameLocale: o.name_locale ?? {}
202
+ }) : null]);
203
203
  }
204
204
  }, {
205
205
  accessorKey: "price",
@@ -211,17 +211,17 @@ const he = _e("takeaway-manager", () => {
211
211
  meta: {
212
212
  textAlign: "right"
213
213
  },
214
- cell: (n) => {
215
- const r = n.getValue();
216
- return F(r, !1);
214
+ cell: (t) => {
215
+ const o = t.getValue();
216
+ return F(o, !1);
217
217
  }
218
218
  }, {
219
219
  accessorKey: "usedBy",
220
220
  header: () => s("menu.takeaway.table.columns.products"),
221
221
  enableSorting: !1,
222
222
  size: 200,
223
- cell: (n) => {
224
- const r = n.getValue(), f = Q(l.categorizedItems, r).flatMap((C) => C.items).length ?? 0;
223
+ cell: (t) => {
224
+ const o = t.getValue(), f = Q(l.categorizedItems, o).flatMap((T) => T.items).length ?? 0;
225
225
  return s("menu.takeaway.table.items_linked", {
226
226
  count: f
227
227
  });
@@ -233,48 +233,48 @@ const he = _e("takeaway-manager", () => {
233
233
  cellClass: "pl-16",
234
234
  headerContentClass: "-mx-16"
235
235
  },
236
- cell: (n) => U("div", {
236
+ cell: (t) => M("div", {
237
237
  class: "flex justify-end items-center"
238
- }, [y.value.delete ? U(de.FmButton, {
238
+ }, [y.value.delete ? M(de.FmButton, {
239
239
  prependIcon: "delete",
240
240
  variant: A.Tertiary,
241
241
  textColor: "neutral-gray-400",
242
- onClick: (r) => {
243
- r.stopPropagation(), u.deleteTakeaway(n.row.original);
242
+ onClick: (o) => {
243
+ o.stopPropagation(), u.deleteTakeaway(t.row.original);
244
244
  }
245
245
  }) : null])
246
- }]), E = ue(), x = T(() => E.breakpoints.value.xs);
247
- return (n, r) => {
248
- const f = L("fm-search"), C = L("fm-table"), M = L("fm-button");
249
- return o.value.length ? (w(), V(O, {
246
+ }]), U = ue(), x = C(() => U.breakpoints.value.xs);
247
+ return (t, o) => {
248
+ const f = L("fm-search"), T = L("fm-table"), B = L("fm-button");
249
+ return n.value.length ? (w(), V(P, {
250
250
  key: 0
251
- }, [x.value ? (w(), V(O, {
251
+ }, [x.value ? (w(), V(P, {
252
252
  key: 1
253
253
  }, [g("div", Ve, [I(f, {
254
254
  class: "w-full",
255
255
  autofocus: "",
256
256
  modelValue: i(c),
257
- "onUpdate:modelValue": r[2] || (r[2] = (t) => j(c) ? c.value = t : null),
257
+ "onUpdate:modelValue": o[2] || (o[2] = (r) => $(c) ? c.value = r : null),
258
258
  placeholder: i(s)("menu.takeaway.table.search.placeholder")
259
- }, null, 8, ["modelValue", "placeholder"])]), g("div", Ie, [(w(!0), V(O, null, ie(a.value, (t) => (w(), V("div", {
260
- key: t._id,
259
+ }, null, 8, ["modelValue", "placeholder"])]), g("div", Ie, [(w(!0), V(P, null, ie(a.value, (r) => (w(), V("div", {
260
+ key: r._id,
261
261
  class: D(["py-12 px-16", "flex space-x-8", "items-center"]),
262
262
  onClick: () => {
263
- y.value.edit && i(u).updateTakeaway(t);
263
+ y.value.edit && i(u).updateTakeaway(r);
264
264
  }
265
- }, [g("div", Ue, [g("p", Ee, B(t.name), 1), g("p", Ke, B(`${i(Q)(i(l).categorizedItems, t.usedBy).flatMap((K) => K.items).length ?? 0} items linked`), 1), g("p", Se, " Price: " + B(m.value.symbol) + B(i(F)(t.price, !1)), 1)]), y.value.delete ? (w(), G(M, {
265
+ }, [g("div", Ue, [g("p", Ee, S(r.name), 1), g("p", Ke, S(`${i(Q)(i(l).categorizedItems, r.usedBy).flatMap((E) => E.items).length ?? 0} items linked`), 1), g("p", Se, " Price: " + S(m.value.symbol) + S(i(F)(r.price, !1)), 1)]), y.value.delete ? (w(), j(B, {
266
266
  key: 0,
267
267
  variant: i(A).Tertiary,
268
268
  "text-color": "neutral-gray-400",
269
269
  "prepend-icon": "delete",
270
- onClick: q(() => i(u).deleteTakeaway(t), ["stop"])
271
- }, null, 8, ["variant", "onClick"])) : $("", !0)], 8, Me))), 128))])], 64)) : (w(), V("div", xe, [g("div", Ce, [g("div", Te, [I(f, {
270
+ onClick: q(() => i(u).deleteTakeaway(r), ["stop"])
271
+ }, null, 8, ["variant", "onClick"])) : G("", !0)], 8, Me))), 128))])], 64)) : (w(), V("div", xe, [g("div", Ce, [g("div", Te, [I(f, {
272
272
  autofocus: "",
273
273
  modelValue: i(c),
274
- "onUpdate:modelValue": r[0] || (r[0] = (t) => j(c) ? c.value = t : null),
274
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => $(c) ? c.value = r : null),
275
275
  placeholder: i(s)("menu.takeaway.table.search.placeholder")
276
276
  }, null, 8, ["modelValue", "placeholder"])])]), I(me, null, {
277
- default: P(() => [I(C, {
277
+ default: O(() => [I(T, {
278
278
  "column-defs": h.value,
279
279
  loading: i(p).checkMenuIsLoading(),
280
280
  "page-size": a.value.length,
@@ -284,8 +284,8 @@ const he = _e("takeaway-manager", () => {
284
284
  class: "flex-1 overflow-hidden",
285
285
  "hide-footer": "",
286
286
  "pin-header-row": "",
287
- onRowClick: r[1] || (r[1] = (t) => {
288
- y.value.edit && i(u).updateTakeaway(t.original);
287
+ onRowClick: o[1] || (o[1] = (r) => {
288
+ y.value.edit && i(u).updateTakeaway(r.original);
289
289
  })
290
290
  }, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
291
291
  _: 1
@@ -293,32 +293,32 @@ const he = _e("takeaway-manager", () => {
293
293
  subtitle: i(s)("menu.takeaway.empty.subtitle"),
294
294
  title: i(s)("menu.takeaway.empty.title")
295
295
  }, {
296
- action: P(() => [y.value.create ? (w(), G(i(pe), {
296
+ action: O(() => [y.value.create ? (w(), j(i(pe), {
297
297
  key: 0,
298
298
  "bind-to-variant": e.value,
299
299
  action: "add",
300
300
  "apply-product": "",
301
- "onUpdate:takeaway": r[3] || (r[3] = (t) => i(p).updateMenu({
301
+ "onUpdate:takeaway": o[3] || (o[3] = (r) => i(p).updateMenu({
302
302
  module: i(z.F_MENU_MODULE_V4_KEY).enum.takeaway,
303
303
  operation: i(N.F_OPERATION_TYPE).create,
304
- data: t,
305
- link: i(ee)(t.usedBy || [])
306
- }, t.name))
304
+ data: r,
305
+ link: i(ee)(r.usedBy || [])
306
+ }, r.name))
307
307
  }, {
308
- default: P(({
309
- trigger: t
310
- }) => [I(M, {
308
+ default: O(({
309
+ trigger: r
310
+ }) => [I(B, {
311
311
  "prepend-icon": "add",
312
312
  label: i(s)("menu.takeaway.empty.action"),
313
- onClick: q(t, ["stop"])
313
+ onClick: q(r, ["stop"])
314
314
  }, null, 8, ["label", "onClick"])]),
315
315
  _: 1
316
- }, 8, ["bind-to-variant"])) : $("", !0)]),
316
+ }, 8, ["bind-to-variant"])) : G("", !0)]),
317
317
  _: 1
318
318
  }, 8, ["subtitle", "title"])]));
319
319
  };
320
320
  }
321
321
  });
322
322
  export {
323
- $e as _
323
+ Ge as _
324
324
  };
@@ -1,9 +1,9 @@
1
1
  import { computed as d, defineComponent as x, ref as F, resolveComponent as b, createElementBlock as L, openBlock as w, normalizeClass as R, createVNode as K, normalizeStyle as $, withCtx as B, createBlock as U, createCommentVNode as j } from "vue";
2
- import { A as h, M as E, G as C, Q as O, al as Y, u as y, a as G } from "./index.vue_vue_type_script_setup_true_lang-YXKayPEp.js";
3
- import { u as S } from "./menuV2-BGEYgQ8-.js";
4
- import { C as v, h as N } from "./catalog-CvN9Wu8V.js";
2
+ import { A as h, M as E, G as C, Q as O, al as Y, u as y, a as G } from "./index.vue_vue_type_script_setup_true_lang-C6IVvAua.js";
3
+ import { u as S } from "./menuV2-DBkrmeha.js";
4
+ import { C as v, h as N } from "./catalog-D7Jjqj3-.js";
5
5
  import { useSnackbar as P, useDialog as z } from "@feedmepos/ui-library";
6
- import { a as T } from "./LinkProductSideSheet-DazOkwkd.js";
6
+ import { a as T } from "./LinkProductSideSheet-DY32g33Q.js";
7
7
  import { useI18n as Q } from "@feedmepos/mf-common";
8
8
  function q() {
9
9
  const t = S(), o = d(() => t.categorizedRawMenuItems.filter((u) => u.items.length > 0)), i = d(() => {
@@ -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-C6IVvAua.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
+ };