@feedmepos/mf-menu 0.31.10-beta.3 → 0.31.10-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 (56) hide show
  1. package/dist/{App-31z41zyc.js → App-BT1TFoYK.js} +6 -6
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-qZF_wNYj.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CdblAni_.js} +2 -2
  3. package/dist/{Catalog-CO4mNUbz.js → Catalog-BZ1vTBvo.js} +5 -5
  4. package/dist/{Category-BxIDqbiY.js → Category-CKY7yTEE.js} +5 -5
  5. package/dist/{Category-7gej2iQO.js → Category-CgPtntD6.js} +4 -4
  6. package/dist/{CookingGuide-3uzrTMvJ.js → CookingGuide-aI9Vl3u3.js} +3 -3
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-B4RIRM55.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DhgzR0nK.js} +1 -1
  8. package/dist/{Group-spYeqRde.js → Group-RXdG0cCj.js} +1 -1
  9. package/dist/{Group-DNNzMClt.js → Group-zsrgbAFX.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-r2aC1vpb.js → Group.vue_vue_type_script_setup_true_lang-krHMmK8E.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-NvHIKmMR.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-kTIm9xhC.js} +3 -3
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DOL1THOF.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DNXzTmh2.js} +1459 -1459
  13. package/dist/{Ingredient-BGPgmbqm.js → Ingredient-C3VgBz5w.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-Br8rGZJr.js → InventoryBinding.vue_vue_type_script_setup_true_lang-D4Rx4mRi.js} +2 -2
  15. package/dist/{LinkProductSideSheet-JR51MLZh.js → LinkProductSideSheet-iMU1KvJX.js} +1 -1
  16. package/dist/{MenuSetting-C9JcbeYW.js → MenuSetting-Cy3sqhCM.js} +4 -4
  17. package/dist/{PrintRoute-BiV0DUl-.js → PrintRoute-BGCv9aJ1.js} +3 -3
  18. package/dist/{Product-Bhr4Yi4f.js → Product-B3g-oH8x.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-BpCk81mf.js → Product.vue_vue_type_script_setup_true_lang-BSW-4pwk.js} +12 -12
  20. package/dist/{Products-Br2r0-7e.js → Products-DlVYzd53.js} +59 -59
  21. package/dist/{Publish-B0Du1xZD.js → Publish-CeH-gl9b.js} +3 -3
  22. package/dist/{Recipe-oTzCvAwA.js → Recipe-C1dUPLkk.js} +4 -4
  23. package/dist/{Scheduler-DozY_WXF.js → Scheduler-BLcfkRA1.js} +3 -3
  24. package/dist/{ServingSequence-CVdeGU2M.js → ServingSequence-B0jNatHo.js} +3 -3
  25. package/dist/{Setting-BvQqPMyj.js → Setting-QRszSbBR.js} +4 -4
  26. package/dist/{Subcategory-mdolwam3.js → Subcategory-CWHNmrQE.js} +4 -4
  27. package/dist/{Takeaway-ClmWL4g3.js → Takeaway-D7DmH15s.js} +1 -1
  28. package/dist/{Takeaway-DLzzbxdL.js → Takeaway-DRS6Vz-5.js} +4 -4
  29. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DKNpXni9.js → Takeaway.vue_vue_type_script_setup_true_lang-IWTTcs2f.js} +5 -5
  30. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DZkEfRcR.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BdWx5fdf.js} +13 -13
  31. package/dist/{Unit-BZEYv2it.js → Unit-CIv-PqCt.js} +2 -2
  32. package/dist/{Variant-fvUpuwwB.js → Variant-DjGvYuzh.js} +3 -3
  33. package/dist/{_id_-1Na4HHVS.js → _id_-DnVVmOCe.js} +9 -9
  34. package/dist/{app-WHhoNarD.js → app-B2RQcPjC.js} +1 -1
  35. package/dist/{app-_bGcYfeW.js → app-Bg99M05B.js} +23 -23
  36. package/dist/app.js +1 -1
  37. package/dist/assets/{linked-status-0QyZiaF8.js → linked-status-Vp0TQYKf.js} +2 -2
  38. package/dist/assets/{override-menu-Eq5XH_Q1.js → override-menu-BHiYT11B.js} +2 -2
  39. package/dist/assets/{validate-menu-jO7zxFHX.js → validate-menu-CduiPk11.js} +2 -2
  40. package/dist/{catalog-OonGFP8E.js → catalog-Bm09LCrm.js} +1 -1
  41. package/dist/{catalogSetting-OjK_zxWd.js → catalogSetting-vPZUe0xY.js} +1 -1
  42. package/dist/{category-79_mDU4r.js → category-CIMek6Dw.js} +1 -1
  43. package/dist/{currency-CsZ_-JV2.js → currency-DCJtEa6B.js} +1 -1
  44. package/dist/{dayjs.min-BpMdlctT.js → dayjs.min-m6NoqWj6.js} +1 -1
  45. package/dist/{index-KQwT4PoU.js → index-1JUdOzJ9.js} +1 -1
  46. package/dist/{index-wtNwobxp.js → index-BrCtR-Hd.js} +2 -2
  47. package/dist/{index-BV3RZ1Ew.js → index-Wik8mJjL.js} +3 -3
  48. package/dist/{item-9zBWNOIC.js → item-CYFoV9HF.js} +932 -932
  49. package/dist/{menu-BWmbWU7X.js → menu-CllScy8p.js} +1 -1
  50. package/dist/{menu-BK0JbwdA.js → menu-Tfvz3TZW.js} +133 -133
  51. package/dist/{priceTier-DxEbdJqo.js → priceTier-D15kaHnA.js} +1 -1
  52. package/dist/{scheduler-CTNOblQT.js → scheduler-CDOBpsHB.js} +3 -3
  53. package/dist/{subcategory-DOyDelcX.js → subcategory-KC674Rqg.js} +67 -67
  54. package/dist/{toExcel-D9DYWYj6.js → toExcel-RNwSGsFf.js} +2 -2
  55. package/dist/{unit-BS-vTS76.js → unit-CT1mqXgg.js} +1 -1
  56. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as d, ref as g, watch as _, resolveComponent as S, createBlock as T, openBlock as f, unref as y, computed as h } from "vue";
2
2
  import { useI18n as m } from "@feedmepos/mf-common";
3
3
  import { useDialogChild as w, useDialog as x, useSnackbar as C } from "@feedmepos/ui-library";
4
- import { u as k, G as M } from "./menu-BK0JbwdA.js";
4
+ import { u as k, G as M } from "./menu-Tfvz3TZW.js";
5
5
  const v = /* @__PURE__ */ d({
6
6
  __name: "AddPriceGroupDialog",
7
7
  setup(s) {
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as le, computed as Y, resolveComponent as v, createElementBlock as i, openBlock as u, createVNode as l, createCommentVNode as g, unref as a, toDisplayString as P, createElementVNode as y, withCtx as _, Fragment as D, renderList as A, createBlock as N, ref as T, Transition as ee, createTextVNode as se } from "vue";
2
- import { J as b, I as d, u as ie, K as de, M as X } from "./menu-BK0JbwdA.js";
2
+ import { J as b, I as d, u as ie, K as de, M as X } from "./menu-Tfvz3TZW.js";
3
3
  import { useI18n as te } from "@feedmepos/mf-common";
4
4
  import { components as re } from "@feedmepos/ui-library";
5
5
  import { _ as ce } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
6
6
  import { _ as W } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
7
7
  import { u as me } from "./discardConfirm-BHni0LNu.js";
8
- import { u as pe } from "./menu-BWmbWU7X.js";
9
- import { L as _e } from "./LinkProductSideSheet-JR51MLZh.js";
8
+ import { u as pe } from "./menu-CllScy8p.js";
9
+ import { L as _e } from "./LinkProductSideSheet-iMU1KvJX.js";
10
10
  const ve = { class: "space-y-8" }, fe = {
11
11
  key: 0,
12
12
  class: "space-y-16"
@@ -1,16 +1,16 @@
1
- import { shallowRef as X, ref as R, computed as h, shallowReactive as Fe, watch as H, defineComponent as Te, resolveComponent as z, createBlock as Re, openBlock as Ve, unref as P, withCtx as Ne, createVNode as Oe } from "vue";
2
- import { J as k, A as x, ah as Z, I, ai as B, M as E, K as ee, a9 as C, c as $, $ as w, ag as G, aj as Pe, ak as xe, z as Ae, aa as Ke, al as Ue, a8 as L, u as $e } from "./menu-BK0JbwdA.js";
1
+ import { shallowRef as X, ref as R, computed as h, shallowReactive as Te, watch as q, defineComponent as Fe, resolveComponent as j, createBlock as Re, openBlock as Ve, unref as P, withCtx as Ne, createVNode as Oe } from "vue";
2
+ import { J as k, A as x, ah as Z, I, ai as z, M as S, K as ee, a9 as C, c as $, $ as w, ag as G, aj as Pe, ak as xe, z as Ke, aa as Ae, al as Ue, a8 as L, u as $e } from "./menu-Tfvz3TZW.js";
3
3
  import { useCoreStore as J, useI18n as te } from "@feedmepos/mf-common";
4
- import { useSnackbar as De, useDialogChild as qe } from "@feedmepos/ui-library";
5
- import { defineStore as He } from "pinia";
6
- const Ye = "/assets/linked-status-0QyZiaF8.js", We = "/assets/override-menu-Eq5XH_Q1.js";
7
- function je(e) {
4
+ import { useSnackbar as De, useDialogChild as Ye } from "@feedmepos/ui-library";
5
+ import { defineStore as qe } from "pinia";
6
+ const He = "/assets/linked-status-Vp0TQYKf.js", We = "/assets/override-menu-BHiYT11B.js";
7
+ function Be(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
- function ze(e, n, a, o) {
13
- const r = k(n), f = a ? r.modules.catalog.find((_) => _._id === a) : null, d = o ? r.modules.scheduler.find((_) => _._id === o) : null, i = f ? k(f) : void 0, m = a ? r.modules.catalog.filter((_) => _._id !== a) : [], u = d ? k(d) : void 0, s = e.reduce((_, y) => (_[y._id] = je(y), _), {});
12
+ function je(e, n, a, o) {
13
+ const r = k(n), f = a ? r.modules.catalog.find((_) => _._id === a) : null, d = o ? r.modules.scheduler.find((_) => _._id === o) : null, i = f ? k(f) : void 0, m = a ? r.modules.catalog.filter((_) => _._id !== a) : [], u = d ? k(d) : void 0, s = e.reduce((_, y) => (_[y._id] = Be(y), _), {});
14
14
  function p(_ = []) {
15
15
  const y = e.map((b) => b._id);
16
16
  return [
@@ -35,9 +35,9 @@ function ze(e, n, a, o) {
35
35
  ...r.modules.scheduler.filter((_) => _._id !== o),
36
36
  u
37
37
  ], r) : {
38
- ...B(),
38
+ ...z(),
39
39
  modules: {
40
- ...B().modules,
40
+ ...z().modules,
41
41
  catalog: r.modules.catalog,
42
42
  item: r.modules.item,
43
43
  group: r.modules.group,
@@ -46,7 +46,7 @@ function ze(e, n, a, o) {
46
46
  _id: r._id
47
47
  };
48
48
  }
49
- function T(e, n, a) {
49
+ function F(e, n, a) {
50
50
  var f;
51
51
  if (a >= 3) return e;
52
52
  const o = n.modules.item.find((d) => d._id === e._id);
@@ -59,10 +59,10 @@ function T(e, n, a) {
59
59
  return i ? m = ((s = d.items) == null ? void 0 : s.map((_) => {
60
60
  var b;
61
61
  const y = (b = i.items) == null ? void 0 : b.find(
62
- (F) => F._id === _._id && F.combinationKey === _.combinationKey
62
+ (T) => T._id === _._id && T.combinationKey === _.combinationKey
63
63
  );
64
- return T(y || _, n, a + 1);
65
- })) ?? [] : m = ((p = d.items) == null ? void 0 : p.map((_) => T(_, n, a + 1))) ?? [], {
64
+ return F(y || _, n, a + 1);
65
+ })) ?? [] : m = ((p = d.items) == null ? void 0 : p.map((_) => F(_, n, a + 1))) ?? [], {
66
66
  ...d,
67
67
  items: m
68
68
  };
@@ -75,7 +75,7 @@ function T(e, n, a) {
75
75
  groups: r
76
76
  };
77
77
  }
78
- function Be(e, n) {
78
+ function ze(e, n) {
79
79
  const a = e.groups.map((f) => {
80
80
  const d = n.modules.group.find((m) => m._id === f._id), i = ((d == null ? void 0 : d.items) || []).map((m) => {
81
81
  var p;
@@ -83,16 +83,16 @@ function Be(e, n) {
83
83
  (_) => _._id === m._id && _.combinationKey === m.combinationKey
84
84
  );
85
85
  if (u)
86
- return T(u, n, 1);
86
+ return F(u, n, 1);
87
87
  const s = {
88
88
  ...x.generator.initMenuV4ItemOverrider(),
89
89
  _id: m._id,
90
90
  combinationKey: m.combinationKey
91
91
  };
92
- return T(s, n, 1);
92
+ return F(s, n, 1);
93
93
  });
94
94
  return { ...f, items: i };
95
- }), o = e.variant ? e.variant.variantCombinations.map((f) => T(f, n, 1)) : [], r = {
95
+ }), o = e.variant ? e.variant.variantCombinations.map((f) => F(f, n, 1)) : [], r = {
96
96
  ...x.generator.initMenuV4ItemOverrider(),
97
97
  _id: e._id,
98
98
  name: e.name,
@@ -101,7 +101,7 @@ function Be(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;
@@ -114,7 +114,7 @@ function Y(e, n) {
114
114
  const u = (s = f == null ? void 0 : f.items) == null ? void 0 : s.find(
115
115
  (p) => p._id === m._id && p.combinationKey === m.combinationKey
116
116
  );
117
- return Y(m, u);
117
+ return H(m, u);
118
118
  }), r;
119
119
  }), a;
120
120
  }
@@ -128,7 +128,7 @@ function Ge(e, n) {
128
128
  );
129
129
  if (!f)
130
130
  throw new Error(`Item overrider not found - ${r._id} - ${r.combinationKey}`);
131
- return Y(f, r);
131
+ return H(f, r);
132
132
  })
133
133
  });
134
134
  const o = a.find((r) => !r.combinationKey);
@@ -142,7 +142,7 @@ function Ge(e, n) {
142
142
  const m = (u = f == null ? void 0 : f.items) == null ? void 0 : u.find(
143
143
  (s) => s._id === i._id && s.combinationKey === i.combinationKey
144
144
  );
145
- return Y(i, m);
145
+ return H(i, m);
146
146
  }), r;
147
147
  }), {
148
148
  ...n,
@@ -150,9 +150,9 @@ function Ge(e, n) {
150
150
  };
151
151
  }
152
152
  async function it(e, n, a, o, r, f = !0) {
153
- const d = k(a), i = f ? ze(n, d, o, r) : d, m = n.reduce((p, _) => (p[_._id] = i.modules.item.find((y) => y._id === _._id), p), {}), u = n.reduce((p, _) => {
153
+ const d = k(a), i = f ? je(n, d, o, r) : d, m = n.reduce((p, _) => (p[_._id] = i.modules.item.find((y) => y._id === _._id), p), {}), u = n.reduce((p, _) => {
154
154
  const y = _._id;
155
- return p[y] = Be(m[y], e), p;
155
+ return p[y] = ze(m[y], e), p;
156
156
  }, {}), s = x.getFallbackPrices({
157
157
  rawMenu: i,
158
158
  items: u,
@@ -186,7 +186,7 @@ async function lt(e, n) {
186
186
  if (D.has(a))
187
187
  return D.get(a);
188
188
  const o = await Z(
189
- Ye,
189
+ He,
190
190
  JSON.stringify({
191
191
  menu: e,
192
192
  itemId: n
@@ -231,13 +231,13 @@ function mt(e, n, a) {
231
231
  }
232
232
  return r(n, a);
233
233
  }
234
- const q = /* @__PURE__ */ new Map();
234
+ const Y = /* @__PURE__ */ new Map();
235
235
  async function Le(e, n, a) {
236
236
  const o = `${e._id}-${e.updatedAt}-${n || "null"}-${a || "null"}`;
237
- if (q.has(o))
238
- return q.get(o);
237
+ if (Y.has(o))
238
+ return Y.get(o);
239
239
  const r = await ne(e, n, a);
240
- return q.set(o, r), r;
240
+ return Y.set(o, r), r;
241
241
  }
242
242
  async function ft(e, n, a) {
243
243
  var d, i;
@@ -254,8 +254,8 @@ async function ft(e, n, a) {
254
254
  var V, N;
255
255
  const b = y.combinationKey ? (N = (V = s == null ? void 0 : s.variant) == null ? void 0 : V.variantCombinations) == null ? void 0 : N.find(
256
256
  (O) => O.combinationKey === y.combinationKey
257
- ) : s, F = b && s ? f(s, b) : y;
258
- return f(F, y);
257
+ ) : s, T = b && s ? f(s, b) : y;
258
+ return f(T, y);
259
259
  });
260
260
  r.push({
261
261
  group: m,
@@ -294,7 +294,7 @@ function Je({
294
294
  }
295
295
  const Qe = {
296
296
  async updateMenuModule(e, n) {
297
- const a = E.RequestRunner.operation(n, e.modules);
297
+ const a = S.RequestRunner.operation(n, e.modules);
298
298
  if (a.validateError.length > 0)
299
299
  throw new Error(a.validateError.join(`
300
300
  `));
@@ -338,10 +338,10 @@ function Xe() {
338
338
  currentSchedulerId: ""
339
339
  };
340
340
  }
341
- const Ze = He(
341
+ const Ze = qe(
342
342
  "mf-menu-store-v2",
343
343
  () => {
344
- const e = Fe(Xe()), n = J(), a = De(), o = h(() => e.menu.modules.serveSequence ? C(e.menu.modules.serveSequence, {
344
+ const e = Te(Xe()), n = J(), a = De(), o = h(() => e.menu.modules.serveSequence ? C(e.menu.modules.serveSequence, {
345
345
  selector: "position"
346
346
  }) : []), r = h(() => {
347
347
  var t;
@@ -353,7 +353,7 @@ const Ze = He(
353
353
  (t) => t._id === e.currentSchedulerId
354
354
  ));
355
355
  function s(t, l = !0) {
356
- e.menu = { ...t, _rev: e.menu._rev }, l && S.push(e.menu);
356
+ e.menu = { ...t, _rev: e.menu._rev }, l && E.push(e.menu);
357
357
  }
358
358
  const p = X(oe()), _ = R(!1), y = R(1);
359
359
  async function b() {
@@ -374,7 +374,7 @@ const Ze = He(
374
374
  return p.value = t, _.value = !1, y.value = y.value + 1, t;
375
375
  }
376
376
  const V = ee.debounce(b, 200);
377
- H(
377
+ q(
378
378
  () => [e.menu, e.currentCatalogId, e.currentSchedulerId],
379
379
  () => {
380
380
  _.value || V();
@@ -392,7 +392,7 @@ const Ze = He(
392
392
  ]), O = h(() => {
393
393
  const t = p.value.modules.category;
394
394
  return [
395
- ...K.value.item.addon ? [
395
+ ...A.value.item.addon ? [
396
396
  {
397
397
  _id: e.currentCatalogId ? "" : null,
398
398
  name: "Addon",
@@ -427,8 +427,8 @@ const Ze = He(
427
427
  c,
428
428
  (g) => g.code || g.name
429
429
  ).reduce((g, v, M) => (g[v._id] = M + l[v.category || ""], g), {});
430
- }), se = h(() => G(A.value, O.value, W.value)), ue = h(() => {
431
- const t = K.value.item.addon ? [
430
+ }), se = h(() => G(K.value, O.value, W.value)), ue = h(() => {
431
+ const t = A.value.item.addon ? [
432
432
  {
433
433
  _id: e.currentCatalogId ? "" : null,
434
434
  name: "Addon",
@@ -441,12 +441,12 @@ const Ze = He(
441
441
  t,
442
442
  e.menu.modules.item
443
443
  );
444
- }), A = h(() => {
444
+ }), K = h(() => {
445
445
  const t = p.value.modules.variant;
446
446
  return C(t, { selector: "name" });
447
447
  });
448
448
  function ie(t = []) {
449
- const l = t.map((g) => A.value.find((v) => v._id === g)).filter((g) => !!g);
449
+ const l = t.map((g) => K.value.find((v) => v._id === g)).filter((g) => !!g);
450
450
  return x.fullVariantCombination(l).reduce((g, v) => (g[v.combinationKey] = v.selectionName.join(" / "), g), {});
451
451
  }
452
452
  const ce = h(() => w(p.value.modules.group, (t) => t.name)), le = h(() => C(p.value.modules.takeaway, { selector: "name" })), de = h(() => C(e.menu.modules.printDepartment || [], {
@@ -456,7 +456,7 @@ const Ze = He(
456
456
  })), pe = h(() => e.menu.modules.cookingGuide), _e = h(() => {
457
457
  const t = xe(e.menu.modules.sku);
458
458
  return C(t, { selector: "code" });
459
- }), K = h(() => {
459
+ }), A = h(() => {
460
460
  const t = !e.currentCatalogId, l = r.value === $.F_MENU_VERSION.v4, c = !e.currentSchedulerId, g = {
461
461
  create: t && c,
462
462
  edit: t && c,
@@ -537,13 +537,13 @@ const Ze = He(
537
537
  }
538
538
  const ye = h(() => {
539
539
  var l;
540
- const t = Ae.Country.getCountryFlattenTaxes(
540
+ const t = Ke.Country.getCountryFlattenTaxes(
541
541
  J().currentCountry.value
542
542
  );
543
543
  return {
544
544
  systemCode: (l = t[0]) == null ? void 0 : l.systemCode,
545
545
  countryTaxOptions: t.map((c) => ({
546
- label: `${c.name} (${Ke(c.rate)}%)`,
546
+ label: `${c.name} (${Ae(c.rate)}%)`,
547
547
  value: U(c),
548
548
  meta: {
549
549
  rate: c.rate
@@ -552,17 +552,17 @@ const Ze = He(
552
552
  };
553
553
  }), he = async () => {
554
554
  const t = await L.readMenu();
555
- e.menu = t ?? e.menu, j(null);
555
+ e.menu = t ?? e.menu, B(null);
556
556
  }, be = async () => {
557
557
  const t = await L.readRestaurantsWithMenu();
558
558
  e.restaurants = C(t, { selector: "name" });
559
- }, j = (t) => {
559
+ }, B = (t) => {
560
560
  e.currentCatalogId = t;
561
561
  }, Me = (t) => {
562
562
  e.currentSchedulerId = t;
563
563
  }, Ce = (t) => {
564
564
  e.currentCategoryIds = t;
565
- }, Ee = async (t, l) => {
565
+ }, Se = async (t, l) => {
566
566
  const c = Array.isArray(t) ? t : [t];
567
567
  if (!c.length) return;
568
568
  const g = c.map((v) => ({
@@ -572,7 +572,7 @@ const Ze = He(
572
572
  }));
573
573
  try {
574
574
  if (l || g.some(
575
- (M) => [E.F_OPERATION_TYPE.delete, E.F_OPERATION_TYPE.deleteMany].includes(M.operation)
575
+ (M) => [S.F_OPERATION_TYPE.delete, S.F_OPERATION_TYPE.deleteMany].includes(M.operation)
576
576
  )) {
577
577
  const M = await Ue(g, e.menu.modules);
578
578
  if (M !== !0) throw new Error(M);
@@ -586,7 +586,7 @@ const Ze = He(
586
586
  message: v
587
587
  });
588
588
  }
589
- }, Se = async (t) => {
589
+ }, Ee = async (t) => {
590
590
  const l = {
591
591
  ...e.menu,
592
592
  masterCatalogSetting: t.masterCatalogSetting,
@@ -594,7 +594,7 @@ const Ze = He(
594
594
  priceTierSettings: t.priceTierSettings
595
595
  };
596
596
  return s(l), l;
597
- }, S = Je({ maxHistorySize: 50 }), we = h(() => S.canUndo.value), Ie = h(() => S.canRedo.value);
597
+ }, E = Je({ maxHistorySize: 50 }), we = h(() => E.canUndo.value), Ie = h(() => E.canRedo.value);
598
598
  return {
599
599
  state: e,
600
600
  // loading state
@@ -617,7 +617,7 @@ const Ze = He(
617
617
  sortedItems: ae,
618
618
  categorizedItems: se,
619
619
  categorizedRawMenuItems: ue,
620
- variants: A,
620
+ variants: K,
621
621
  groups: ce,
622
622
  takeaways: le,
623
623
  printDepartments: de,
@@ -625,17 +625,17 @@ const Ze = He(
625
625
  recipes: fe,
626
626
  cookingGuide: pe,
627
627
  skus: _e,
628
- rules: K,
628
+ rules: A,
629
629
  taxSetting: ye,
630
630
  // Action
631
631
  setMenu: s,
632
632
  readMenu: he,
633
633
  readRestaurants: be,
634
- selectCatalog: j,
634
+ selectCatalog: B,
635
635
  selectScheduler: Me,
636
636
  selectCategory: Ce,
637
- updateMenu: Ee,
638
- updateMenuSetting: Se,
637
+ updateMenu: Se,
638
+ updateMenuSetting: Ee,
639
639
  computeMergedMenu: b,
640
640
  // helper
641
641
  encodeTax: U,
@@ -646,33 +646,33 @@ const Ze = He(
646
646
  canUndoHistory: we,
647
647
  canRedoHistory: Ie,
648
648
  undoHistory: () => {
649
- const t = S.undo();
649
+ const t = E.undo();
650
650
  t && s(t, !1);
651
651
  },
652
652
  redoHistory: () => {
653
- const t = S.redo();
653
+ const t = E.redo();
654
654
  t && s(t, !1);
655
655
  },
656
656
  clearHistory: () => {
657
- S.clear();
657
+ E.clear();
658
658
  }
659
659
  };
660
660
  }
661
- ), Q = /* @__PURE__ */ Te({
661
+ ), Q = /* @__PURE__ */ Fe({
662
662
  __name: "AddSubcategoryDialogContentComponent",
663
663
  props: {
664
664
  initialValue: {}
665
665
  },
666
666
  setup(e) {
667
667
  const n = e, { t: a } = te();
668
- H(
668
+ q(
669
669
  () => n.initialValue,
670
670
  (d) => {
671
671
  o.value = d ?? "";
672
672
  }
673
673
  );
674
- const o = R(n.initialValue), { emitData: r, emitAction: f } = qe();
675
- return H(
674
+ const o = R(n.initialValue), { emitData: r, emitAction: f } = Ye();
675
+ return q(
676
676
  o,
677
677
  (d) => {
678
678
  r(d);
@@ -681,7 +681,7 @@ const Ze = He(
681
681
  immediate: !0
682
682
  }
683
683
  ), (d, i) => {
684
- const m = z("fm-text-field"), u = z("FmForm");
684
+ const m = j("fm-text-field"), u = j("FmForm");
685
685
  return Ve(), Re(u, {
686
686
  onValidationSuccess: i[1] || (i[1] = (s) => P(f)("primary"))
687
687
  }, {
@@ -725,7 +725,7 @@ const Ze = He(
725
725
  u.value = !0;
726
726
  const p = {
727
727
  module: I.F_MENU_MODULE_V4_KEY.enum.subCategory,
728
- operation: E.F_OPERATION_TYPE.create,
728
+ operation: S.F_OPERATION_TYPE.create,
729
729
  data: {
730
730
  name: s,
731
731
  position: $e().subcategories.length
@@ -756,7 +756,7 @@ const Ze = He(
756
756
  if (!s) return;
757
757
  const p = {
758
758
  module: I.F_MENU_MODULE_V4_KEY.enum.subCategory,
759
- operation: E.F_OPERATION_TYPE.update,
759
+ operation: S.F_OPERATION_TYPE.update,
760
760
  data: { ...u, name: s ?? u.name }
761
761
  };
762
762
  a ? await r(p) : await n.updateMenu(p, s), e.close();
@@ -777,7 +777,7 @@ const Ze = He(
777
777
  }).onPrimary(async () => {
778
778
  const s = {
779
779
  module: I.F_MENU_MODULE_V4_KEY.enum.subCategory,
780
- operation: E.F_OPERATION_TYPE.delete,
780
+ operation: S.F_OPERATION_TYPE.delete,
781
781
  data: u._id
782
782
  };
783
783
  a ? await r(s) : await n.updateMenu(s, u.name, !0), e.close();
@@ -786,7 +786,7 @@ const Ze = He(
786
786
  async function m(u) {
787
787
  const s = {
788
788
  module: I.F_MENU_MODULE_V4_KEY.enum.subCategory,
789
- operation: E.F_OPERATION_TYPE.rearrange,
789
+ operation: S.F_OPERATION_TYPE.rearrange,
790
790
  data: u
791
791
  };
792
792
  a ? await r(s) : await n.updateMenu(s, "Subcategories");
@@ -1,5 +1,5 @@
1
- import { c as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-DOL1THOF.js";
2
- import "./menu-BK0JbwdA.js";
1
+ import { c as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-DNXzTmh2.js";
2
+ import "./menu-Tfvz3TZW.js";
3
3
  var Z = {
4
4
  defaultAmount: 0,
5
5
  defaultCurrency: "USD",
@@ -1,6 +1,6 @@
1
1
  import { defineStore as Q } from "pinia";
2
2
  import { defineComponent as T, computed as U, ref as h, watch as L, resolveComponent as V, createBlock as W, openBlock as F, withCtx as w, createVNode as m, createElementVNode as f, normalizeClass as H, 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 { a6 as P, a7 as te, a4 as B, J as k, Q as $, G as I, A as E, K as ne, a5 as ae, M as C, I as D, u as oe } from "./menu-BK0JbwdA.js";
3
+ import { a6 as P, a7 as te, a4 as B, J as k, Q as $, G as I, A as E, K as ne, a5 as ae, M as C, I as D, u as oe } from "./menu-Tfvz3TZW.js";
4
4
  import { useI18n as N } 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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-menu",
3
- "version": "0.31.10-beta.3",
3
+ "version": "0.31.10-prod",
4
4
  "files": [
5
5
  "dist"
6
6
  ],