@feedmepos/mf-menu 0.31.31-beta.2 → 0.31.31-prod

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 (99) hide show
  1. package/dist/{App-CFN6krN7.js → App-Cvgz2kQV.js} +20 -20
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-5uxqnJ7n.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Bq84uuiq.js} +14 -14
  3. package/dist/{Catalog-XEHo6uLB.js → Catalog-Ye-KpQ31.js} +5 -5
  4. package/dist/{Category-B7RcIka7.js → Category-BPChBqVR.js} +5 -5
  5. package/dist/{Category-BGGrhvcJ.js → Category-CHcxix2b.js} +4 -4
  6. package/dist/{CookingGuide--ZLmpGgv.js → CookingGuide-DgygBSoB.js} +3 -3
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-ETB8_iXH.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-ClV6LD2-.js} +1 -1
  8. package/dist/{Group-Cskfwet-.js → Group-223G1Edd.js} +1 -1
  9. package/dist/{Group-Bo11CUp1.js → Group-B7EU1xmY.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-DUQ1DmSi.js → Group.vue_vue_type_script_setup_true_lang-CAZuyOPy.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-TJyEt8dI.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CdjRWC9z.js} +10 -10
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DxbfScyk.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BRQm-UTk.js} +1484 -1460
  13. package/dist/{Ingredient-Bs0BhD3V.js → Ingredient-Dl1Z5Qt2.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-GWnYgk10.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CxuQTH0k.js} +2 -2
  15. package/dist/{LinkProductSideSheet-CqQwpGvH.js → LinkProductSideSheet-Y-Z9_9Kp.js} +1 -1
  16. package/dist/{MenuSetting-12DckDBV.js → MenuSetting-Be44fmVj.js} +4 -4
  17. package/dist/{PrintRoute-C2jxIZTn.js → PrintRoute-BURAEZ6X.js} +3 -3
  18. package/dist/{Product-ewAj_Gy0.js → Product-DSlVHbgr.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-BnazxQhs.js → Product.vue_vue_type_script_setup_true_lang-DtYarO0L.js} +11 -11
  20. package/dist/{ProductInternalTools-CxcZtyiY.js → ProductInternalTools-gW57aUAO.js} +6 -6
  21. package/dist/{Products-OkSamcz5.js → Products-Czr-70M8.js} +10 -10
  22. package/dist/{Publish-BZJgSVln.js → Publish-XCowNW_z.js} +3 -3
  23. package/dist/{Recipe-BPUcYg5J.js → Recipe-6oNz21AB.js} +4 -4
  24. package/dist/{Scheduler-VhRBuKrz.js → Scheduler-UYFuFk5E.js} +3 -3
  25. package/dist/{ServingSequence-CcDP6CND.js → ServingSequence-w66ujU4D.js} +3 -3
  26. package/dist/{Setting-I66_H5cX.js → Setting-Dgn3lOx7.js} +4 -4
  27. package/dist/{Subcategory-CoUgRD2W.js → Subcategory-lnzuxCCH.js} +4 -4
  28. package/dist/{Takeaway-BvKRs26V.js → Takeaway-C5Up5Odr.js} +4 -4
  29. package/dist/{Takeaway-7-0pz07X.js → Takeaway-DP1GJUPF.js} +1 -1
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DD2WkL48.js → Takeaway.vue_vue_type_script_setup_true_lang-B45keXn7.js} +5 -5
  31. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-nWEHS4np.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-yEIxG4F2.js} +16 -15
  32. package/dist/{Unit-CmbEL7jV.js → Unit-Bt8aRidX.js} +2 -2
  33. package/dist/{Variant-BQfUpbnH.js → Variant-DXoOAa9M.js} +3 -3
  34. package/dist/{_id_-Bjhl9XqO.js → _id_-D9tvinax.js} +9 -9
  35. package/dist/{app-iNjBiZyA.js → app-Cnlv4rmj.js} +1 -1
  36. package/dist/{app-_kRCd-IX.js → app-DiizQWjo.js} +24 -24
  37. package/dist/app.js +1 -1
  38. package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProduct.vue.d.ts +88 -16
  39. package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProductDialog.vue.d.ts +44 -8
  40. package/dist/apps/mf-menu/src/components/feature/ApplyProduct/index.d.ts +360 -184
  41. package/dist/apps/mf-menu/src/components/feature/GroupManager/OptionTable.vue.d.ts +80 -28
  42. package/dist/apps/mf-menu/src/components/feature/GroupManager/UpdateForm.vue.d.ts +44 -8
  43. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierButton.vue.d.ts +216 -148
  44. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierForm.vue.d.ts +216 -148
  45. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/category.d.ts +4 -4
  46. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/item.d.ts +218 -150
  47. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/scheduler.d.ts +142 -82
  48. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/useItemFormManagement.d.ts +108 -74
  49. package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/OptionTable.vue.d.ts +80 -28
  50. package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/UpdateForm.vue.d.ts +44 -8
  51. package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/index.d.ts +176 -32
  52. package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ItemForm.vue.d.ts +324 -222
  53. package/dist/apps/mf-menu/src/components/feature/TreeEditor/menuUtils.d.ts +108 -74
  54. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +1374 -1040
  55. package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +216 -148
  56. package/dist/apps/mf-menu/src/helper/import-export.d.ts +1374 -1040
  57. package/dist/apps/mf-menu/src/helper/itemCategories.d.ts +108 -74
  58. package/dist/apps/mf-menu/src/helper/menu.d.ts +1523 -1155
  59. package/dist/apps/mf-menu/src/manager/menu/category.d.ts +4 -4
  60. package/dist/apps/mf-menu/src/manager/menu/item.d.ts +1374 -1040
  61. package/dist/apps/mf-menu/src/manager/menu/subcategory.d.ts +4 -4
  62. package/dist/apps/mf-menu/src/stores/manager/item.d.ts +324 -222
  63. package/dist/apps/mf-menu/src/stores/manager/recipe.d.ts +12 -12
  64. package/dist/apps/mf-menu/src/stores/manager/scheduler.d.ts +142 -82
  65. package/dist/apps/mf-menu/src/stores/manager/sku.d.ts +60 -60
  66. package/dist/apps/mf-menu/src/stores/manager/takeaway.d.ts +6 -6
  67. package/dist/apps/mf-menu/src/stores/manager/unit.d.ts +12 -12
  68. package/dist/apps/mf-menu/src/stores/menu.d.ts +1375 -1041
  69. package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +216 -148
  70. package/dist/apps/mf-menu/src/views/CookingGuide/CookingGuideDialog.vue.d.ts +4 -4
  71. package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +352 -132
  72. package/dist/apps/mf-menu/src/views/Scheduler/FilterForm.vue.d.ts +84 -32
  73. package/dist/apps/mf-menu/src/views/Scheduler/SchedulerDialog.vue.d.ts +84 -32
  74. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  75. package/dist/assets/linked-status-D7AwcSC5.js +24 -0
  76. package/dist/assets/override-menu-Y9T4wxEn.js +24 -0
  77. package/dist/assets/validate-menu-DiAW2jY1.js +24 -0
  78. package/dist/{catalog-CyBHP_L_.js → catalog-DUSCax4J.js} +1 -1
  79. package/dist/{catalogSetting-NkN4bAq3.js → catalogSetting-18FJ5pkA.js} +1 -1
  80. package/dist/{category-BGrejYFK.js → category-B9XvlPFy.js} +1 -1
  81. package/dist/{currency-Dpgduyri.js → currency-Sno8fZYc.js} +1 -1
  82. package/dist/{dayjs.min-DSlfqo_R.js → dayjs.min-BsfKOrNo.js} +1 -1
  83. package/dist/{index-CrGqMOug.js → index-BDpkSKDX.js} +1 -1
  84. package/dist/{index-B0Mpmrk_.js → index-Eomwf2OO.js} +2 -2
  85. package/dist/{index-BAQtaHWs.js → index-ltyOwsRO.js} +3 -3
  86. package/dist/{item-BBA8_hXu.js → item-5Kkzf_eF.js} +374 -374
  87. package/dist/{jszip.min-D0uzeLZI.js → jszip.min-CRfpGjN8.js} +2 -2
  88. package/dist/{menu-yKL30VN9.js → menu-Btcr0nsk.js} +40426 -33787
  89. package/dist/{menu-ZCbLLneg.js → menu-DYs_VNfB.js} +1 -1
  90. package/dist/mf-menu.css +1 -1
  91. package/dist/{priceTier-CG3R0X1h.js → priceTier-DvUjWwCM.js} +1 -1
  92. package/dist/{scheduler-C2ckHlRj.js → scheduler-C76blUlS.js} +3 -3
  93. package/dist/{subcategory-BWwm_7Zd.js → subcategory-C44qN5Vk.js} +135 -135
  94. package/dist/{toExcel-DhgXuJB9.js → toExcel--vNjpF-b.js} +2 -2
  95. package/dist/{unit-B0OvvAMx.js → unit-C4ghZU8x.js} +1 -1
  96. package/package.json +5 -5
  97. package/dist/assets/linked-status-Dq0jtAIg.js +0 -24
  98. package/dist/assets/override-menu-CiMDOEka.js +0 -24
  99. package/dist/assets/validate-menu-BinXLcWb.js +0 -24
@@ -1,16 +1,16 @@
1
- import { shallowRef as X, ref as T, computed as h, shallowReactive as Fe, effectScope as Re, watch as H, defineComponent as Te, resolveComponent as z, createBlock as Ve, openBlock as Oe, unref as O, withCtx as Ne, createVNode as xe } from "vue";
2
- import { H as k, B as N, ak as Z, G as I, al as G, J as S, I as ee, aa as M, c as D, Y as w, aj as L, am as Pe, an as Ae, A as Ue, ac as Ke, ao as De, ap as $e, a9 as qe, u as He } from "./menu-yKL30VN9.js";
1
+ import { shallowRef as X, ref as R, computed as h, shallowReactive as Fe, effectScope as Te, watch as Y, defineComponent as Re, resolveComponent as z, createBlock as Ve, openBlock as xe, unref as x, withCtx as Ne, createVNode as Oe } from "vue";
2
+ import { H as k, B as N, al as Z, G as I, am as G, J as S, I as ee, aa as M, c as D, Y as E, ak as L, an as Pe, ao as Ae, A as Ue, ac as Ke, ap as De, aq as $e, a9 as qe, u as Ye } from "./menu-Btcr0nsk.js";
3
3
  import { useCoreStore as J, useI18n as te } from "@feedmepos/mf-common";
4
- import { useSnackbar as Ye, useDialogChild as Be } from "@feedmepos/ui-library";
5
- import { defineStore as je } from "pinia";
6
- const We = "/assets/linked-status-Dq0jtAIg.js", ze = "/assets/override-menu-CiMDOEka.js";
4
+ import { useSnackbar as He, useDialogChild as Be } from "@feedmepos/ui-library";
5
+ import { defineStore as We } from "pinia";
6
+ const je = "/assets/linked-status-D7AwcSC5.js", ze = "/assets/override-menu-Y9T4wxEn.js";
7
7
  function Ge(e) {
8
8
  var o;
9
9
  const n = k(e), a = (o = n.variant) == null ? void 0 : o.variantCombinations;
10
10
  return delete n.variant, delete n.thumbnail, [n, ...a || []];
11
11
  }
12
12
  function Le(e, n, a, o) {
13
- const r = k(n), f = a ? r.modules.catalog.find((g) => g._id === a) : null, l = o ? r.modules.scheduler.find((g) => g._id === o) : null, i = f ? k(f) : void 0, d = a ? r.modules.catalog.filter((g) => g._id !== a) : [], u = l ? k(l) : void 0, s = e.reduce((g, y) => (g[y._id] = Ge(y), g), {});
13
+ const r = k(n), m = a ? r.modules.catalog.find((g) => g._id === a) : null, l = o ? r.modules.scheduler.find((g) => g._id === o) : null, i = m ? k(m) : void 0, d = a ? r.modules.catalog.filter((g) => g._id !== a) : [], u = l ? k(l) : void 0, s = e.reduce((g, y) => (g[y._id] = Ge(y), g), {});
14
14
  function p(g = []) {
15
15
  const y = e.map((b) => b._id);
16
16
  return [
@@ -46,13 +46,13 @@ function Le(e, n, a, o) {
46
46
  _id: r._id
47
47
  };
48
48
  }
49
- function R(e, n, a) {
50
- var f;
49
+ function T(e, n, a) {
50
+ var m;
51
51
  if (a >= 3) return e;
52
52
  const o = n.modules.item.find((l) => l._id === e._id);
53
53
  if (!o)
54
54
  throw new Error(`_insertItemOverriders - Item not found - ${e._id}`);
55
- const r = (f = o.groups) == null ? void 0 : f.map((l) => {
55
+ const r = (m = o.groups) == null ? void 0 : m.map((l) => {
56
56
  var u, s, p;
57
57
  const i = (u = e == null ? void 0 : e.groups) == null ? void 0 : u.find((g) => g._id === l._id);
58
58
  let d;
@@ -61,8 +61,8 @@ function R(e, n, a) {
61
61
  const y = (b = i.items) == null ? void 0 : b.find(
62
62
  (F) => F._id === g._id && F.combinationKey === g.combinationKey
63
63
  );
64
- return R(y || g, n, a + 1);
65
- })) ?? [] : d = ((p = l.items) == null ? void 0 : p.map((g) => R(g, n, a + 1))) ?? [], {
64
+ return T(y || g, n, a + 1);
65
+ })) ?? [] : d = ((p = l.items) == null ? void 0 : p.map((g) => T(g, n, a + 1))) ?? [], {
66
66
  ...l,
67
67
  items: d
68
68
  };
@@ -76,23 +76,23 @@ function R(e, n, a) {
76
76
  };
77
77
  }
78
78
  function Je(e, n) {
79
- const a = e.groups.map((f) => {
80
- const l = n.modules.group.find((d) => d._id === f._id), i = ((l == null ? void 0 : l.items) || []).map((d) => {
79
+ const a = e.groups.map((m) => {
80
+ const l = n.modules.group.find((d) => d._id === m._id), i = ((l == null ? void 0 : l.items) || []).map((d) => {
81
81
  var p;
82
- const u = (p = f.items) == null ? void 0 : p.find(
82
+ const u = (p = m.items) == null ? void 0 : p.find(
83
83
  (g) => g._id === d._id && g.combinationKey === d.combinationKey
84
84
  );
85
85
  if (u)
86
- return R(u, n, 1);
86
+ return T(u, n, 1);
87
87
  const s = {
88
88
  ...N.generator.initMenuV4ItemOverrider(),
89
89
  _id: d._id,
90
90
  combinationKey: d.combinationKey
91
91
  };
92
- return R(s, n, 1);
92
+ return T(s, n, 1);
93
93
  });
94
- return { ...f, items: i };
95
- }), o = e.variant ? e.variant.variantCombinations.map((f) => R(f, n, 1)) : [], r = {
94
+ return { ...m, items: i };
95
+ }), o = e.variant ? e.variant.variantCombinations.map((m) => T(m, n, 1)) : [], r = {
96
96
  ...N.generator.initMenuV4ItemOverrider(),
97
97
  _id: e._id,
98
98
  name: e.name,
@@ -101,20 +101,20 @@ function Je(e, n) {
101
101
  };
102
102
  return [...o, r];
103
103
  }
104
- function Y(e, n) {
104
+ function H(e, n) {
105
105
  var o;
106
106
  if (!n)
107
107
  return e;
108
108
  const a = { ...e, code: n.code };
109
109
  return a.groups = (o = a.groups) == null ? void 0 : o.map((r) => {
110
110
  var l, i;
111
- const f = (l = n.groups) == null ? void 0 : l.find((d) => d._id === r._id);
111
+ const m = (l = n.groups) == null ? void 0 : l.find((d) => d._id === r._id);
112
112
  return r.items = (i = r.items) == null ? void 0 : i.map((d) => {
113
113
  var s;
114
- const u = (s = f == null ? void 0 : f.items) == null ? void 0 : s.find(
114
+ const u = (s = m == null ? void 0 : m.items) == null ? void 0 : s.find(
115
115
  (p) => p._id === d._id && p.combinationKey === d.combinationKey
116
116
  );
117
- return Y(d, u);
117
+ return H(d, u);
118
118
  }), r;
119
119
  }), a;
120
120
  }
@@ -123,12 +123,12 @@ function Qe(e, n) {
123
123
  n.variant && (n.variant = {
124
124
  ...n.variant,
125
125
  variantCombinations: n.variant.variantCombinations.map((r) => {
126
- const f = a.find(
126
+ const m = a.find(
127
127
  (l) => l._id === r._id && l.combinationKey === r.combinationKey
128
128
  );
129
- if (!f)
129
+ if (!m)
130
130
  throw new Error(`Item overrider not found - ${r._id} - ${r.combinationKey}`);
131
- return Y(f, r);
131
+ return H(m, r);
132
132
  })
133
133
  });
134
134
  const o = a.find((r) => !r.combinationKey);
@@ -136,21 +136,21 @@ function Qe(e, n) {
136
136
  throw new Error(`Base item overrider not found - ${n._id}`);
137
137
  return n.groups = (o.groups || []).map((r) => {
138
138
  var l;
139
- const f = n.groups.find((i) => i._id === r._id);
139
+ const m = n.groups.find((i) => i._id === r._id);
140
140
  return r.items = (l = r.items) == null ? void 0 : l.map((i) => {
141
141
  var u;
142
- const d = (u = f == null ? void 0 : f.items) == null ? void 0 : u.find(
142
+ const d = (u = m == null ? void 0 : m.items) == null ? void 0 : u.find(
143
143
  (s) => s._id === i._id && s.combinationKey === i.combinationKey
144
144
  );
145
- return Y(i, d);
145
+ return H(i, d);
146
146
  }), r;
147
147
  }), {
148
148
  ...n,
149
149
  price: (o == null ? void 0 : o.price) || n.price
150
150
  };
151
151
  }
152
- async function dt(e, n, a, o, r, f = !0) {
153
- const l = k(a), i = f ? Le(n, l, o, r) : l, d = n.reduce((p, g) => (p[g._id] = i.modules.item.find((y) => y._id === g._id), p), {}), u = n.reduce((p, g) => {
152
+ async function dt(e, n, a, o, r, m = !0) {
153
+ const l = k(a), i = m ? Le(n, l, o, r) : l, d = n.reduce((p, g) => (p[g._id] = i.modules.item.find((y) => y._id === g._id), p), {}), u = n.reduce((p, g) => {
154
154
  const y = g._id;
155
155
  return p[y] = Je(d[y], e), p;
156
156
  }, {}), s = N.getFallbackPrices({
@@ -170,9 +170,9 @@ async function dt(e, n, a, o, r, f = !0) {
170
170
  function mt(e, n) {
171
171
  if (e.length === 0) return "";
172
172
  const a = e == null ? void 0 : e.split("variant");
173
- return ((a == null ? void 0 : a.reduce((r, f) => {
174
- if (f && f.length > 0) {
175
- const l = `variant${f.split("/")[0]}`, i = f.split("/")[1], u = n.find(
173
+ return ((a == null ? void 0 : a.reduce((r, m) => {
174
+ if (m && m.length > 0) {
175
+ const l = `variant${m.split("/")[0]}`, i = m.split("/")[1], u = n.find(
176
176
  ({ _id: s }) => s === l
177
177
  ).options.find(({ _id: s }) => s === i);
178
178
  r.push(((u == null ? void 0 : u.name) || "").trim());
@@ -186,7 +186,7 @@ async function ft(e, n) {
186
186
  if ($.has(a))
187
187
  return $.get(a);
188
188
  const o = await Z(
189
- We,
189
+ je,
190
190
  JSON.stringify({
191
191
  menu: e,
192
192
  itemId: n
@@ -203,14 +203,14 @@ async function ne(e, n, a) {
203
203
  }
204
204
  function pt(e, n, a) {
205
205
  const o = /* @__PURE__ */ new Set();
206
- function r(f, l) {
207
- if (!e || !f || !l || o.has(l)) return !1;
206
+ function r(m, l) {
207
+ if (!e || !m || !l || o.has(l)) return !1;
208
208
  o.add(l);
209
209
  const i = e.modules.item.find((d) => d._id === l);
210
- return !i || !i.groups ? !1 : i.groups.some((d) => d._id === f) ? !0 : i.groups.some((d) => {
210
+ return !i || !i.groups ? !1 : i.groups.some((d) => d._id === m) ? !0 : i.groups.some((d) => {
211
211
  const u = e.modules.group.find((s) => s._id === d._id);
212
212
  for (const s of (u == null ? void 0 : u.items) || [])
213
- if (r(f, s._id)) return !0;
213
+ if (r(m, s._id)) return !0;
214
214
  return !1;
215
215
  });
216
216
  }
@@ -218,10 +218,10 @@ function pt(e, n, a) {
218
218
  }
219
219
  function _t(e, n, a) {
220
220
  const o = /* @__PURE__ */ new Set();
221
- function r(f, l) {
222
- if (!e || !f || !l || o.has(f)) return !1;
223
- o.add(f);
224
- const i = e.modules.group.find((d) => d._id === f);
221
+ function r(m, l) {
222
+ if (!e || !m || !l || o.has(m)) return !1;
223
+ o.add(m);
224
+ const i = e.modules.group.find((d) => d._id === m);
225
225
  return !i || !i.items ? !1 : i.items.some((d) => d._id === l) ? !0 : i.items.some((d) => {
226
226
  const u = e.modules.item.find((s) => s._id === d._id);
227
227
  for (const s of (u == null ? void 0 : u.groups) || [])
@@ -241,7 +241,7 @@ async function Xe(e, n, a) {
241
241
  }
242
242
  async function gt(e, n, a) {
243
243
  var l, i;
244
- const o = await Xe(e, n, null), r = [], f = (d, u) => {
244
+ const o = await Xe(e, n, null), r = [], m = (d, u) => {
245
245
  const s = k(d);
246
246
  for (const p in u)
247
247
  u[p] && (s[p] = u[p]);
@@ -251,11 +251,11 @@ async function gt(e, n, a) {
251
251
  const u = (l = d.items) == null ? void 0 : l.find((p) => p._id === a && !p.combinationKey), s = e.modules.item.find((p) => p._id === a);
252
252
  if (u) {
253
253
  const p = (i = d.items) == null ? void 0 : i.filter((y) => y._id === a && y.combinationKey), g = [u, ...p].map((y) => {
254
- var V, x;
255
- const b = y.combinationKey ? (x = (V = s == null ? void 0 : s.variant) == null ? void 0 : V.variantCombinations) == null ? void 0 : x.find(
254
+ var V, O;
255
+ const b = y.combinationKey ? (O = (V = s == null ? void 0 : s.variant) == null ? void 0 : V.variantCombinations) == null ? void 0 : O.find(
256
256
  (P) => P.combinationKey === y.combinationKey
257
- ) : s, F = b && s ? f(s, b) : y;
258
- return f(F, y);
257
+ ) : s, F = b && s ? m(s, b) : y;
258
+ return m(F, y);
259
259
  });
260
260
  r.push({
261
261
  group: d,
@@ -268,8 +268,8 @@ async function gt(e, n, a) {
268
268
  function Ze({
269
269
  maxHistorySize: e = 50
270
270
  }) {
271
- const n = X([]), a = T(-1), o = h(() => a.value > 0), r = h(() => a.value < n.value.length - 1);
272
- function f(u) {
271
+ const n = X([]), a = R(-1), o = h(() => a.value > 0), r = h(() => a.value < n.value.length - 1);
272
+ function m(u) {
273
273
  n.value.push(u), a.value++, n.value.length > e && (n.value.shift(), a.value--);
274
274
  }
275
275
  function l() {
@@ -284,7 +284,7 @@ function Ze({
284
284
  n.value = [], a.value = -1;
285
285
  }
286
286
  return {
287
- push: f,
287
+ push: m,
288
288
  canUndo: o,
289
289
  canRedo: r,
290
290
  undo: l,
@@ -338,24 +338,24 @@ function tt() {
338
338
  currentSchedulerId: ""
339
339
  };
340
340
  }
341
- const nt = je(
341
+ const nt = We(
342
342
  "mf-menu-store-v2",
343
343
  () => {
344
- const e = Fe(tt()), n = J(), a = Ye(), o = h(() => e.menu.modules.serveSequence ? M(e.menu.modules.serveSequence, {
344
+ const e = Fe(tt()), n = J(), a = He(), o = h(() => e.menu.modules.serveSequence ? M(e.menu.modules.serveSequence, {
345
345
  selector: "position"
346
346
  }) : []), r = h(() => {
347
347
  var t;
348
348
  return ((t = n.currentBusiness.value) == null ? void 0 : t.menuVersion) || D.F_MENU_VERSION.v3;
349
- }), f = h(() => r.value === D.F_MENU_VERSION.v4), l = h(() => {
349
+ }), m = h(() => r.value === D.F_MENU_VERSION.v4), l = h(() => {
350
350
  const t = e.menu.modules.catalog;
351
351
  return M(t, { selector: "name" });
352
352
  }), i = h(() => e.menu.modules.catalog.find((t) => t._id === e.currentCatalogId)), d = h(() => M(p.value.modules.scheduler, { selector: "name" })), u = h(() => e.menu.modules.scheduler.find(
353
353
  (t) => t._id === e.currentSchedulerId
354
354
  ));
355
355
  function s(t, c = !0) {
356
- e.menu = { ...t, _rev: e.menu._rev }, c && E.push(e.menu);
356
+ e.menu = { ...t, _rev: e.menu._rev }, c && w.push(e.menu);
357
357
  }
358
- const p = X(oe()), g = T(!1), y = T(1);
358
+ const p = X(oe()), g = R(!1), y = R(1);
359
359
  async function b() {
360
360
  g.value = !0;
361
361
  const t = await ne(
@@ -366,16 +366,16 @@ const nt = je(
366
366
  if (e.currentSchedulerId != null) {
367
367
  const c = e.menu.modules.catalog.find(
368
368
  (_) => _._id === e.currentCatalogId
369
- ), m = c ? c.override.scheduler[e.currentSchedulerId] : e.menu.modules.scheduler.find(
369
+ ), f = c ? c.override.scheduler[e.currentSchedulerId] : e.menu.modules.scheduler.find(
370
370
  (_) => _._id === e.currentSchedulerId
371
- ), v = new Set(((m == null ? void 0 : m.items) || []).map((_) => _._id));
371
+ ), v = new Set(((f == null ? void 0 : f.items) || []).map((_) => _._id));
372
372
  t.modules.item = t.modules.item.filter((_) => v.has(_._id));
373
373
  }
374
374
  return p.value = t, g.value = !1, y.value = y.value + 1, t;
375
375
  }
376
376
  const V = ee.debounce(b, 200);
377
- Re(!0).run(() => {
378
- H(
377
+ Te(!0).run(() => {
378
+ Y(
379
379
  () => [e.menu, e.currentCatalogId, e.currentSchedulerId],
380
380
  () => {
381
381
  g.value || V();
@@ -401,35 +401,35 @@ const nt = je(
401
401
  position: 0
402
402
  }
403
403
  ] : [],
404
- ...w(t, (c) => c.name)
404
+ ...E(t, (c) => c.name)
405
405
  ];
406
406
  }), re = h(() => {
407
407
  const t = p.value.modules.subCategory || [];
408
- return w(t, (c) => c.name);
409
- }), j = h(() => {
408
+ return E(t, (c) => c.name);
409
+ }), W = h(() => {
410
410
  var c;
411
411
  let t = p.value.modules.item;
412
412
  if (i.value) {
413
- const m = (c = i.value) == null ? void 0 : c.override.items;
413
+ const f = (c = i.value) == null ? void 0 : c.override.items;
414
414
  t = t.filter((v) => {
415
415
  var C;
416
- const _ = (C = m == null ? void 0 : m[v._id]) == null ? void 0 : C.find(
416
+ const _ = (C = f == null ? void 0 : f[v._id]) == null ? void 0 : C.find(
417
417
  (ke) => !ke.combinationKey
418
418
  );
419
419
  return (_ == null ? void 0 : _.orderFrom) !== I.F_ORDER_FROM.enum.NONE;
420
420
  });
421
421
  }
422
- return w(t, (m) => m.code || m.name);
422
+ return E(t, (f) => f.code || f.name);
423
423
  }), ae = h(() => {
424
- const t = e.menu.modules.category, c = w(t, (v) => v.name).reduce(
424
+ const t = e.menu.modules.category, c = E(t, (v) => v.name).reduce(
425
425
  (v, _, C) => (v[_._id] = C, v),
426
426
  { "": 0 }
427
- ), m = e.menu.modules.item;
428
- return w(
429
- m,
427
+ ), f = e.menu.modules.item;
428
+ return E(
429
+ f,
430
430
  (v) => v.code || v.name
431
431
  ).reduce((v, _, C) => (v[_._id] = C + c[_.category || ""], v), {});
432
- }), se = h(() => L(A.value, B.value, j.value)), ue = h(() => {
432
+ }), se = h(() => L(A.value, B.value, W.value)), ue = h(() => {
433
433
  const t = U.value.item.addon ? [
434
434
  {
435
435
  _id: e.currentCatalogId ? "" : null,
@@ -451,7 +451,7 @@ const nt = je(
451
451
  const c = t.map((v) => A.value.find((_) => _._id === v)).filter((v) => !!v);
452
452
  return N.fullVariantCombination(c).reduce((v, _) => (v[_.combinationKey] = _.selectionName.join(" / "), v), {});
453
453
  }
454
- const ce = h(() => w(p.value.modules.group, (t) => t.name)), le = h(() => M(p.value.modules.takeaway, { selector: "name" })), de = h(() => M(e.menu.modules.printDepartment || [], {
454
+ const ce = h(() => E(p.value.modules.group, (t) => t.name)), le = h(() => M(p.value.modules.takeaway, { selector: "name" })), de = h(() => M(e.menu.modules.printDepartment || [], {
455
455
  selector: "name"
456
456
  })), me = h(() => M(e.menu.modules.unit, { selector: "name" })), fe = h(() => M(Pe(e.menu.modules.recipe, e.menu.modules.sku), {
457
457
  selector: "name"
@@ -459,55 +459,55 @@ const nt = je(
459
459
  const t = Ae(e.menu.modules.sku);
460
460
  return M(t, { selector: "code" });
461
461
  }), U = h(() => {
462
- const t = !e.currentCatalogId, c = r.value === D.F_MENU_VERSION.v4, m = !e.currentSchedulerId, v = {
463
- create: t && m,
464
- edit: t && m,
465
- delete: t && m
462
+ const t = !e.currentCatalogId, c = r.value === D.F_MENU_VERSION.v4, f = !e.currentSchedulerId, v = {
463
+ create: t && f,
464
+ edit: t && f,
465
+ delete: t && f
466
466
  };
467
467
  return {
468
468
  item: {
469
469
  ...v,
470
- edit: c || m,
471
- sort: c && t && m,
470
+ edit: c || f,
471
+ sort: c && t && f,
472
472
  addon: c,
473
- code: m,
474
- name: t && m,
475
- description: t && m,
476
- category: t && m,
477
- thumbnail: t && m,
478
- orderFrom: (c || t) && m,
473
+ code: f,
474
+ name: t && f,
475
+ description: t && f,
476
+ category: f,
477
+ thumbnail: t && f,
478
+ orderFrom: (c || t) && f,
479
479
  orderFromNone: t,
480
480
  orderFromActiveOnly: !c,
481
- openPrice: t && m,
482
- unit: t && m,
481
+ openPrice: t && f,
482
+ unit: t && f,
483
483
  price: t,
484
484
  editPrice: t,
485
- minPrice: c && m,
486
- costing: c && t && m,
487
- tax: t && m,
488
- variant: t && m,
485
+ minPrice: c && f,
486
+ costing: c && t && f,
487
+ tax: t && f,
488
+ variant: t && f,
489
489
  maxVariant: c ? 4 : 2,
490
- group: t && m,
491
- overrideProductGroup: c && m,
492
- inventory: (c || t) && m,
490
+ group: t && f,
491
+ overrideProductGroup: c && f,
492
+ inventory: (c || t) && f,
493
493
  bindToVariant: c,
494
- print: t && m,
495
- toRoot: c && m,
496
- takeaway: (_) => !!_ && (c || t) && m,
494
+ print: t && f,
495
+ toRoot: c && f,
496
+ takeaway: (_) => !!_ && (c || t) && f,
497
497
  multiScheduler: c,
498
498
  canRearrange: c,
499
499
  printConfig: c
500
500
  },
501
501
  category: {
502
502
  ...v,
503
- sort: t && m
503
+ sort: t
504
504
  },
505
505
  group: {
506
506
  ...v,
507
- edit: c || m,
507
+ edit: c || f,
508
508
  sort: t,
509
509
  applyProduct: t,
510
- showAppliedProduct: m,
510
+ showAppliedProduct: f,
511
511
  type: !c,
512
512
  insertRawItems: !c,
513
513
  multiScheduler: c
@@ -517,7 +517,7 @@ const nt = je(
517
517
  },
518
518
  takeaway: {
519
519
  ...v,
520
- edit: (c || t) && m,
520
+ edit: (c || t) && f,
521
521
  name: t
522
522
  },
523
523
  catalog: {
@@ -531,30 +531,30 @@ const nt = je(
531
531
  return `${t.systemCode}/${t.taxCode}`;
532
532
  }
533
533
  function ge(t) {
534
- const [c, m] = t.split("/");
535
- return { systemCode: c, taxCode: m };
534
+ const [c, f] = t.split("/");
535
+ return { systemCode: c, taxCode: f };
536
536
  }
537
- function ve(t, c, m) {
538
- return (t ?? c ?? []).map((v) => K(v)).find((v) => m.some((_) => _.value === v));
537
+ function ve(t, c, f) {
538
+ return (t ?? c ?? []).map((v) => K(v)).find((v) => f.some((_) => _.value === v));
539
539
  }
540
540
  const ye = h(() => {
541
541
  var v;
542
542
  const t = ["SV5", "SV10"], c = Ue.Country.getCountryFlattenTaxes(
543
543
  J().currentCountry.value
544
- ), m = c.filter((_) => f.value || !t.includes(_.taxCode)).map((_) => ({
544
+ ), f = c.filter((_) => m.value || !t.includes(_.taxCode)).map((_) => ({
545
545
  label: `${_.name} (${Ke(_.rate)}%)`,
546
546
  value: K(_),
547
547
  meta: {
548
548
  rate: _.rate
549
549
  }
550
550
  }));
551
- return m.sort((_, C) => _.label.localeCompare(C.label, void 0, { numeric: !0 })), {
551
+ return f.sort((_, C) => _.label.localeCompare(C.label, void 0, { numeric: !0 })), {
552
552
  systemCode: (v = c[0]) == null ? void 0 : v.systemCode,
553
- countryTaxOptions: m
553
+ countryTaxOptions: f
554
554
  };
555
555
  }), he = async () => {
556
556
  const t = await qe.readMenu();
557
- e.menu = t ?? e.menu, W(null);
557
+ e.menu = t ?? e.menu, j(null);
558
558
  }, be = async () => {
559
559
  const { fetchAllRestaurants: t } = $e();
560
560
  await t({
@@ -562,16 +562,16 @@ const nt = je(
562
562
  e.restaurants = c;
563
563
  }
564
564
  });
565
- }, W = (t) => {
565
+ }, j = (t) => {
566
566
  e.currentCatalogId = t;
567
567
  }, Ce = (t) => {
568
568
  e.currentSchedulerId = t;
569
569
  }, Me = (t) => {
570
570
  e.currentCategoryIds = t;
571
571
  }, Se = async (t, c) => {
572
- const m = Array.isArray(t) ? t : [t];
573
- if (!m.length) return;
574
- const v = m.map((_) => ({
572
+ const f = Array.isArray(t) ? t : [t];
573
+ if (!f.length) return;
574
+ const v = f.map((_) => ({
575
575
  ..._,
576
576
  _id: e.menu._id,
577
577
  _rev: e.menu._rev
@@ -592,7 +592,7 @@ const nt = je(
592
592
  message: _
593
593
  });
594
594
  }
595
- }, Ee = async (t) => {
595
+ }, we = async (t) => {
596
596
  const c = {
597
597
  ...e.menu,
598
598
  masterCatalogSetting: t.masterCatalogSetting,
@@ -600,7 +600,7 @@ const nt = je(
600
600
  priceTierSettings: t.priceTierSettings
601
601
  };
602
602
  return s(c), c;
603
- }, E = Ze({ maxHistorySize: 50 }), we = h(() => E.canUndo.value), Ie = h(() => E.canRedo.value);
603
+ }, w = Ze({ maxHistorySize: 50 }), Ee = h(() => w.canUndo.value), Ie = h(() => w.canRedo.value);
604
604
  return {
605
605
  state: e,
606
606
  // loading state
@@ -610,7 +610,7 @@ const nt = je(
610
610
  mergedMenu: p,
611
611
  // Computed
612
612
  version: r,
613
- isV4: f,
613
+ isV4: m,
614
614
  serveSequence: o,
615
615
  catalogs: l,
616
616
  currentCatalog: i,
@@ -619,7 +619,7 @@ const nt = je(
619
619
  catalogOptions: P,
620
620
  categories: B,
621
621
  subcategories: re,
622
- items: j,
622
+ items: W,
623
623
  sortedItems: ae,
624
624
  categorizedItems: se,
625
625
  categorizedRawMenuItems: ue,
@@ -637,11 +637,11 @@ const nt = je(
637
637
  setMenu: s,
638
638
  readMenu: he,
639
639
  readRestaurants: be,
640
- selectCatalog: W,
640
+ selectCatalog: j,
641
641
  selectScheduler: Ce,
642
642
  selectCategory: Me,
643
643
  updateMenu: Se,
644
- updateMenuSetting: Ee,
644
+ updateMenuSetting: we,
645
645
  computeMergedMenu: b,
646
646
  // helper
647
647
  encodeTax: K,
@@ -649,36 +649,36 @@ const nt = je(
649
649
  getSelectedTax: ve,
650
650
  mapVariant: ie,
651
651
  // history
652
- canUndoHistory: we,
652
+ canUndoHistory: Ee,
653
653
  canRedoHistory: Ie,
654
654
  undoHistory: () => {
655
- const t = E.undo();
655
+ const t = w.undo();
656
656
  t && s(t, !1);
657
657
  },
658
658
  redoHistory: () => {
659
- const t = E.redo();
659
+ const t = w.redo();
660
660
  t && s(t, !1);
661
661
  },
662
662
  clearHistory: () => {
663
- E.clear();
663
+ w.clear();
664
664
  }
665
665
  };
666
666
  }
667
- ), Q = /* @__PURE__ */ Te({
667
+ ), Q = /* @__PURE__ */ Re({
668
668
  __name: "AddSubcategoryDialogContentComponent",
669
669
  props: {
670
670
  initialValue: {}
671
671
  },
672
672
  setup(e) {
673
673
  const n = e, { t: a } = te();
674
- H(
674
+ Y(
675
675
  () => n.initialValue,
676
676
  (l) => {
677
677
  o.value = l ?? "";
678
678
  }
679
679
  );
680
- const o = T(n.initialValue), { emitData: r, emitAction: f } = Be();
681
- return H(
680
+ const o = R(n.initialValue), { emitData: r, emitAction: m } = Be();
681
+ return Y(
682
682
  o,
683
683
  (l) => {
684
684
  r(l);
@@ -688,17 +688,17 @@ const nt = je(
688
688
  }
689
689
  ), (l, i) => {
690
690
  const d = z("fm-text-field"), u = z("FmForm");
691
- return Oe(), Ve(u, {
692
- onValidationSuccess: i[1] || (i[1] = (s) => O(f)("primary"))
691
+ return xe(), Ve(u, {
692
+ onValidationSuccess: i[1] || (i[1] = (s) => x(m)("primary"))
693
693
  }, {
694
694
  default: Ne(() => [
695
- xe(d, {
695
+ Oe(d, {
696
696
  modelValue: o.value,
697
697
  "onUpdate:modelValue": i[0] || (i[0] = (s) => o.value = s),
698
- rules: [(s) => !!s || O(a)("menu.subcategory.dialog.add.name.required")],
698
+ rules: [(s) => !!s || x(a)("menu.subcategory.dialog.add.name.required")],
699
699
  autofocus: "",
700
- label: O(a)("menu.subcategory.dialog.add.name.label"),
701
- placeholder: O(a)("menu.subcategory.dialog.add.name.placeholder")
700
+ label: x(a)("menu.subcategory.dialog.add.name.label"),
701
+ placeholder: x(a)("menu.subcategory.dialog.add.name.placeholder")
702
702
  }, null, 8, ["modelValue", "rules", "label", "placeholder"])
703
703
  ]),
704
704
  _: 1
@@ -711,8 +711,8 @@ const nt = je(
711
711
  isLocalOnly: a = !1
712
712
  }) => {
713
713
  const { t: o } = te(), r = nt().updateMenu;
714
- function f() {
715
- const u = T(!1);
714
+ function m() {
715
+ const u = R(!1);
716
716
  e.open({
717
717
  title: o("menu.subcategory.manager.dialog.add.title"),
718
718
  contentComponent: Q,
@@ -734,7 +734,7 @@ const nt = je(
734
734
  operation: S.F_OPERATION_TYPE.create,
735
735
  data: {
736
736
  name: s,
737
- position: He().subcategories.length
737
+ position: Ye().subcategories.length
738
738
  }
739
739
  };
740
740
  a ? await r(p) : await n.updateMenu(p, s), e.close();
@@ -798,7 +798,7 @@ const nt = je(
798
798
  a ? await r(s) : await n.updateMenu(s, "Subcategories");
799
799
  }
800
800
  return {
801
- create: f,
801
+ create: m,
802
802
  update: l,
803
803
  deleteSubcategory: i,
804
804
  rearrange: d
@@ -1,5 +1,5 @@
1
- import { b as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-DxbfScyk.js";
2
- import "./menu-yKL30VN9.js";
1
+ import { b as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-BRQm-UTk.js";
2
+ import "./menu-Btcr0nsk.js";
3
3
  var Z = {
4
4
  defaultAmount: 0,
5
5
  defaultCurrency: "USD",
@@ -1,6 +1,6 @@
1
1
  import { defineStore as J } from "pinia";
2
2
  import { defineComponent as O, computed as U, ref as h, watch as T, resolveComponent as V, createBlock as W, openBlock as F, withCtx as w, createVNode as m, createElementVNode as f, normalizeClass as Q, createElementBlock as A, toDisplayString as M, unref as l, Fragment as q, renderSlot as X, renderList as Z, getCurrentInstance as ee } from "vue";
3
- import { a7 as B, a8 as te, a5 as P, H as k, O as $, D as I, B as E, I as ne, a6 as ae, J as C, G as D, u as oe } from "./menu-yKL30VN9.js";
3
+ import { a7 as B, a8 as te, a5 as P, H as k, O as $, D as I, B as E, I as ne, a6 as ae, J as C, G as D, u as oe } from "./menu-Btcr0nsk.js";
4
4
  import { useI18n as L } from "@feedmepos/mf-common";
5
5
  import { useSnackbar as j, components as le, useDialog as ue, FmButtonVariant as ie } from "@feedmepos/ui-library";
6
6
  import { u as se } from "./discardConfirm-BHni0LNu.js";