@feedmepos/mf-menu 0.31.11-beta.2 → 0.31.11-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-DRRZ1WHh.js → App-Dfi0zOsF.js} +6 -6
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-zXYoe3Ty.js → ApplyProduct.vue_vue_type_script_setup_true_lang-dWRraNPC.js} +2 -2
  3. package/dist/{Catalog-QAFbKQ2M.js → Catalog-dJ_2wE-J.js} +5 -5
  4. package/dist/{Category-CoYev_Ai.js → Category-BcBmkyFo.js} +4 -4
  5. package/dist/{Category-Br-vkH6P.js → Category-DvzBTtSt.js} +5 -5
  6. package/dist/{CookingGuide-CXNGGjb_.js → CookingGuide-BnxJTlou.js} +3 -3
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BFWlw8yZ.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CLAYCioZ.js} +1 -1
  8. package/dist/{Group-D4_3s4v3.js → Group-BFbPDjW1.js} +3 -3
  9. package/dist/{Group-mzz2lh2H.js → Group-YAUoZc4h.js} +1 -1
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-CUWljFnD.js → Group.vue_vue_type_script_setup_true_lang-CQl3CWqY.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DW-_pYe-.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Doek0-j6.js} +3 -3
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BddwlzDD.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BfQlsQ7c.js} +1459 -1459
  13. package/dist/{Ingredient-DNCYxsjn.js → Ingredient-D4EXC9Bf.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BIciUh4c.js → InventoryBinding.vue_vue_type_script_setup_true_lang-C66-kUAs.js} +1052 -1052
  15. package/dist/{LinkProductSideSheet-B2bXjJqF.js → LinkProductSideSheet-CDhJgOvy.js} +1 -1
  16. package/dist/{MenuSetting-C_jm2qoZ.js → MenuSetting-CeQAtyFu.js} +4 -4
  17. package/dist/{PrintRoute-C5QZG-31.js → PrintRoute-C7AhzUYZ.js} +3 -3
  18. package/dist/{Product-Dk6cy_V0.js → Product-CWqg0N2A.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-BSNmJ3Yf.js → Product.vue_vue_type_script_setup_true_lang-BN2-Tp1i.js} +11 -11
  20. package/dist/{Products-aBeczu6x.js → Products-Ds4vfE7z.js} +521 -521
  21. package/dist/{Publish-B5LexRE6.js → Publish-DaY3YcVq.js} +3 -3
  22. package/dist/{Recipe-BpOtX192.js → Recipe-BXPZcplq.js} +4 -4
  23. package/dist/{Scheduler-BNf1qb5H.js → Scheduler-DaqJcXDr.js} +3 -3
  24. package/dist/{ServingSequence-C05Q0AMR.js → ServingSequence-eNtOX2KS.js} +3 -3
  25. package/dist/{Setting-CNA3Etg8.js → Setting-b6cKOlzO.js} +4 -4
  26. package/dist/{Subcategory-DSTJu7FH.js → Subcategory-9crl-RxJ.js} +4 -4
  27. package/dist/{Takeaway-CDSRRGT-.js → Takeaway-BVLXs79x.js} +4 -4
  28. package/dist/{Takeaway-Bndv_oGq.js → Takeaway-Dn83ULVR.js} +1 -1
  29. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DApBhmU6.js → Takeaway.vue_vue_type_script_setup_true_lang-CFCvnaPR.js} +5 -5
  30. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-l4GlMIzt.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BlZZVcjm.js} +13 -13
  31. package/dist/{Unit-CrvYcgeK.js → Unit-DLoy6lAQ.js} +2 -2
  32. package/dist/{Variant-BExRRfbz.js → Variant-IfKi-Sc8.js} +3 -3
  33. package/dist/{_id_-Byuyh8d3.js → _id_-BxFQNyZX.js} +9 -9
  34. package/dist/{app-CScLTMfF.js → app-Buz7Hr7K.js} +23 -23
  35. package/dist/{app-BD5sAb3I.js → app-DAVxohO7.js} +1 -1
  36. package/dist/app.js +1 -1
  37. package/dist/assets/{linked-status-CfKjNYtL.js → linked-status-DJdzo5PV.js} +2 -2
  38. package/dist/assets/{override-menu-RMlXA80E.js → override-menu-D3_blPtq.js} +2 -2
  39. package/dist/assets/{validate-menu-CQDG5C3W.js → validate-menu-D_K9_jhy.js} +2 -2
  40. package/dist/{catalog-nOIqg2v3.js → catalog-DywMNhqu.js} +1 -1
  41. package/dist/{catalogSetting-C8r7VzRg.js → catalogSetting-DAzjpMy_.js} +1 -1
  42. package/dist/{category-D7nlamKW.js → category-scszBlCD.js} +1 -1
  43. package/dist/{currency-B1XnwrNV.js → currency-D5HsYV_o.js} +1 -1
  44. package/dist/{dayjs.min-DZCyV2Kg.js → dayjs.min-CuZlmzqU.js} +1 -1
  45. package/dist/{index-DaSLjmqs.js → index-CSnuNvkE.js} +3 -3
  46. package/dist/{index-UbMt1YPM.js → index-Dd4zgUww.js} +2 -2
  47. package/dist/{index-DfBCibHM.js → index-DwaW__Il.js} +1 -1
  48. package/dist/{item-DUVgA-Nq.js → item-BJwsv9wH.js} +932 -932
  49. package/dist/{menu-Db4oG8xS.js → menu-Cy7Z9Uon.js} +1 -1
  50. package/dist/{menu-U0EGqBYv.js → menu-TxdbkYDV.js} +132 -132
  51. package/dist/{priceTier-BO2S3DMB.js → priceTier-BWQr4Tp_.js} +1 -1
  52. package/dist/{scheduler-oKs5uLni.js → scheduler-Cz7gGSkk.js} +3 -3
  53. package/dist/{subcategory-D-na0XG9.js → subcategory-anzAD_yZ.js} +80 -80
  54. package/dist/{toExcel-BH2-pUeJ.js → toExcel-CLb9bvrO.js} +2 -2
  55. package/dist/{unit-D7PbgOML.js → unit-Dkqxq0ey.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-U0EGqBYv.js";
4
+ import { u as k, G as M } from "./menu-TxdbkYDV.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-U0EGqBYv.js";
2
+ import { J as b, I as d, u as ie, K as de, M as X } from "./menu-TxdbkYDV.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-Db4oG8xS.js";
9
- import { L as _e } from "./LinkProductSideSheet-B2bXjJqF.js";
8
+ import { u as pe } from "./menu-Cy7Z9Uon.js";
9
+ import { L as _e } from "./LinkProductSideSheet-CDhJgOvy.js";
10
10
  const ve = { class: "space-y-8" }, fe = {
11
11
  key: 0,
12
12
  class: "space-y-16"
@@ -1,9 +1,9 @@
1
- import { shallowRef as Q, ref as T, computed as h, shallowReactive as Fe, watch as Y, defineComponent as Re, resolveComponent as z, createBlock as Te, openBlock as Ne, unref as P, withCtx as Ve, createVNode as Oe } from "vue";
2
- import { J as k, A as x, aj as Z, I, ak as B, M as E, K as ee, a9 as C, c as $, $ as w, ai as L, al as Pe, am as xe, z as Ae, ab as Ke, an as Ue, a8 as G, u as $e } from "./menu-U0EGqBYv.js";
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 O, withCtx as Pe, createVNode as Ne } from "vue";
2
+ import { J as k, A as x, aj as Z, I, ak as B, M as S, K as ee, a9 as C, c as D, $ as w, ai as G, al as Oe, am as xe, z as Ae, ab as Ke, an as Ue, a8 as L, u as De } from "./menu-TxdbkYDV.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 Ye } from "pinia";
6
- const He = "/assets/linked-status-CfKjNYtL.js", We = "/assets/override-menu-RMlXA80E.js";
4
+ import { useSnackbar as $e, useDialogChild as qe } from "@feedmepos/ui-library";
5
+ import { defineStore as He } from "pinia";
6
+ const Ye = "/assets/linked-status-DJdzo5PV.js", We = "/assets/override-menu-D3_blPtq.js";
7
7
  function je(e) {
8
8
  var o;
9
9
  const n = k(e), a = (o = n.variant) == null ? void 0 : o.variantCombinations;
@@ -46,7 +46,7 @@ function ze(e, n, a, o) {
46
46
  _id: r._id
47
47
  };
48
48
  }
49
- function R(e, n, a) {
49
+ function T(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);
@@ -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 === _._id && F.combinationKey === _.combinationKey
63
63
  );
64
- return R(y || _, n, a + 1);
65
- })) ?? [] : m = ((p = d.items) == null ? void 0 : p.map((_) => R(_, n, a + 1))) ?? [], {
64
+ return T(y || _, n, a + 1);
65
+ })) ?? [] : m = ((p = d.items) == null ? void 0 : p.map((_) => T(_, n, a + 1))) ?? [], {
66
66
  ...d,
67
67
  items: m
68
68
  };
@@ -83,16 +83,16 @@ function Be(e, n) {
83
83
  (_) => _._id === m._id && _.combinationKey === m.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
  ...x.generator.initMenuV4ItemOverrider(),
89
89
  _id: m._id,
90
90
  combinationKey: m.combinationKey
91
91
  };
92
- return R(s, n, 1);
92
+ return T(s, n, 1);
93
93
  });
94
94
  return { ...f, items: i };
95
- }), o = e.variant ? e.variant.variantCombinations.map((f) => R(f, n, 1)) : [], r = {
95
+ }), o = e.variant ? e.variant.variantCombinations.map((f) => T(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 H(e, n) {
104
+ function Y(e, n) {
105
105
  var o;
106
106
  if (!n)
107
107
  return e;
@@ -114,11 +114,11 @@ function H(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 H(m, u);
117
+ return Y(m, u);
118
118
  }), r;
119
119
  }), a;
120
120
  }
121
- function Le(e, n) {
121
+ function Ge(e, n) {
122
122
  const a = e.items[n._id];
123
123
  n.variant && (n.variant = {
124
124
  ...n.variant,
@@ -128,7 +128,7 @@ function Le(e, n) {
128
128
  );
129
129
  if (!f)
130
130
  throw new Error(`Item overrider not found - ${r._id} - ${r.combinationKey}`);
131
- return H(f, r);
131
+ return Y(f, r);
132
132
  })
133
133
  });
134
134
  const o = a.find((r) => !r.combinationKey);
@@ -142,7 +142,7 @@ function Le(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 H(i, m);
145
+ return Y(i, m);
146
146
  }), r;
147
147
  }), {
148
148
  ...n,
@@ -162,7 +162,7 @@ async function it(e, n, a, o, r, f = !0) {
162
162
  return n.map((p) => {
163
163
  const _ = p._id, y = m[_];
164
164
  return {
165
- ...Le(s, y),
165
+ ...Ge(s, y),
166
166
  category: o || r ? y == null ? void 0 : y.category : null
167
167
  };
168
168
  });
@@ -180,19 +180,19 @@ function ct(e, n) {
180
180
  return r;
181
181
  }, [])) || []).join(" / ");
182
182
  }
183
- const D = /* @__PURE__ */ new Map();
183
+ const $ = /* @__PURE__ */ new Map();
184
184
  async function lt(e, n) {
185
185
  const a = `${e._id}-${e.updatedAt}-${n}`;
186
- if (D.has(a))
187
- return D.get(a);
186
+ if ($.has(a))
187
+ return $.get(a);
188
188
  const o = await Z(
189
- He,
189
+ Ye,
190
190
  JSON.stringify({
191
191
  menu: e,
192
192
  itemId: n
193
193
  })
194
194
  );
195
- return D.set(a, o), o;
195
+ return $.set(a, o), o;
196
196
  }
197
197
  async function ne(e, n, a) {
198
198
  return await Z(We, {
@@ -232,7 +232,7 @@ function mt(e, n, a) {
232
232
  return r(n, a);
233
233
  }
234
234
  const q = /* @__PURE__ */ new Map();
235
- async function Ge(e, n, a) {
235
+ async function Le(e, n, a) {
236
236
  const o = `${e._id}-${e.updatedAt}-${n || "null"}-${a || "null"}`;
237
237
  if (q.has(o))
238
238
  return q.get(o);
@@ -241,7 +241,7 @@ async function Ge(e, n, a) {
241
241
  }
242
242
  async function ft(e, n, a) {
243
243
  var d, i;
244
- const o = await Ge(e, n, null), r = [], f = (m, u) => {
244
+ const o = await Le(e, n, null), r = [], f = (m, u) => {
245
245
  const s = k(m);
246
246
  for (const p in u)
247
247
  u[p] && (s[p] = u[p]);
@@ -251,9 +251,9 @@ async function ft(e, n, a) {
251
251
  const u = (d = m.items) == null ? void 0 : d.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 = m.items) == null ? void 0 : i.filter((y) => y._id === a && y.combinationKey), _ = [u, ...p].map((y) => {
254
- var N, V;
255
- const b = y.combinationKey ? (V = (N = s == null ? void 0 : s.variant) == null ? void 0 : N.variantCombinations) == null ? void 0 : V.find(
256
- (O) => O.combinationKey === y.combinationKey
254
+ var V, P;
255
+ const b = y.combinationKey ? (P = (V = s == null ? void 0 : s.variant) == null ? void 0 : V.variantCombinations) == null ? void 0 : P.find(
256
+ (N) => N.combinationKey === y.combinationKey
257
257
  ) : s, F = b && s ? f(s, b) : y;
258
258
  return f(F, y);
259
259
  });
@@ -268,7 +268,7 @@ async function ft(e, n, a) {
268
268
  function Je({
269
269
  maxHistorySize: e = 50
270
270
  }) {
271
- const n = Q([]), a = T(-1), o = h(() => a.value > 0), r = h(() => a.value < n.value.length - 1);
271
+ const n = X([]), a = R(-1), o = h(() => a.value > 0), r = h(() => a.value < n.value.length - 1);
272
272
  function f(u) {
273
273
  n.value.push(u), a.value++, n.value.length > e && (n.value.shift(), a.value--);
274
274
  }
@@ -292,9 +292,9 @@ function Je({
292
292
  clear: m
293
293
  };
294
294
  }
295
- const Xe = {
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
  `));
@@ -329,7 +329,7 @@ function oe() {
329
329
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
330
330
  };
331
331
  }
332
- function Qe() {
332
+ function Xe() {
333
333
  return {
334
334
  restaurants: [],
335
335
  menu: { ...oe(), _rev: "" },
@@ -338,24 +338,24 @@ function Qe() {
338
338
  currentSchedulerId: ""
339
339
  };
340
340
  }
341
- const Ze = Ye(
341
+ const Ze = He(
342
342
  "mf-menu-store-v2",
343
343
  () => {
344
- const e = Fe(Qe()), n = J(), a = De(), o = h(() => e.menu.modules.serveSequence ? C(e.menu.modules.serveSequence, {
344
+ const e = Fe(Xe()), n = J(), a = $e(), o = h(() => e.menu.modules.serveSequence ? C(e.menu.modules.serveSequence, {
345
345
  selector: "position"
346
346
  }) : []), r = h(() => {
347
347
  var t;
348
- return ((t = n.currentBusiness.value) == null ? void 0 : t.menuVersion) || $.F_MENU_VERSION.v3;
349
- }), f = h(() => r.value === $.F_MENU_VERSION.v4), d = h(() => {
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), d = h(() => {
350
350
  const t = e.menu.modules.catalog;
351
351
  return C(t, { selector: "name" });
352
352
  }), i = h(() => e.menu.modules.catalog.find((t) => t._id === e.currentCatalogId)), m = h(() => C(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, 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
- const p = Q(oe()), _ = T(!1), y = T(1);
358
+ const p = X(oe()), _ = R(!1), y = R(1);
359
359
  async function b() {
360
360
  _.value = !0;
361
361
  const t = await ne(
@@ -373,14 +373,14 @@ const Ze = Ye(
373
373
  }
374
374
  return p.value = t, _.value = !1, y.value = y.value + 1, t;
375
375
  }
376
- const N = ee.debounce(b, 200);
377
- Y(
376
+ const V = ee.debounce(b, 200);
377
+ H(
378
378
  () => [e.menu, e.currentCatalogId, e.currentSchedulerId],
379
379
  () => {
380
- _.value || N();
380
+ _.value || V();
381
381
  }
382
382
  );
383
- const V = h(() => [
383
+ const P = h(() => [
384
384
  {
385
385
  label: "Main",
386
386
  value: null
@@ -389,7 +389,7 @@ const Ze = Ye(
389
389
  label: t.name,
390
390
  value: t._id
391
391
  }))
392
- ]), O = h(() => {
392
+ ]), N = h(() => {
393
393
  const t = p.value.modules.category;
394
394
  return [
395
395
  ...K.value.item.addon ? [
@@ -427,7 +427,7 @@ const Ze = Ye(
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(() => L(A.value, O.value, W.value)), ue = h(() => {
430
+ }), se = h(() => G(A.value, N.value, W.value)), ue = h(() => {
431
431
  const t = K.value.item.addon ? [
432
432
  {
433
433
  _id: e.currentCatalogId ? "" : null,
@@ -436,7 +436,7 @@ const Ze = Ye(
436
436
  },
437
437
  ...e.menu.modules.category
438
438
  ] : e.menu.modules.category;
439
- return L(
439
+ return G(
440
440
  e.menu.modules.variant,
441
441
  t,
442
442
  e.menu.modules.item
@@ -451,13 +451,13 @@ const Ze = Ye(
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 || [], {
453
453
  selector: "name"
454
- })), me = h(() => C(e.menu.modules.unit, { selector: "name" })), fe = h(() => C(Pe(e.menu.modules.recipe, e.menu.modules.sku), {
454
+ })), me = h(() => C(e.menu.modules.unit, { selector: "name" })), fe = h(() => C(Oe(e.menu.modules.recipe, e.menu.modules.sku), {
455
455
  selector: "name"
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
459
  }), K = h(() => {
460
- const t = !e.currentCatalogId, l = r.value === $.F_MENU_VERSION.v4, c = !e.currentSchedulerId, g = {
460
+ const t = !e.currentCatalogId, l = r.value === D.F_MENU_VERSION.v4, c = !e.currentSchedulerId, g = {
461
461
  create: t && c,
462
462
  edit: t && c,
463
463
  delete: t && c
@@ -551,10 +551,10 @@ const Ze = Ye(
551
551
  }))
552
552
  };
553
553
  }), he = async () => {
554
- const t = await G.readMenu();
554
+ const t = await L.readMenu();
555
555
  e.menu = t ?? e.menu, j(null);
556
556
  }, be = async () => {
557
- const t = await G.readRestaurantsWithMenu();
557
+ const t = await L.readRestaurantsWithMenu();
558
558
  e.restaurants = C(t, { selector: "name" });
559
559
  }, j = (t) => {
560
560
  e.currentCatalogId = t;
@@ -562,7 +562,7 @@ const Ze = Ye(
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,12 +572,12 @@ const Ze = Ye(
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);
579
579
  }
580
- const v = await Xe.updateMenuModule(e.menu, g);
580
+ const v = await Qe.updateMenuModule(e.menu, g);
581
581
  return s(v.menu), v;
582
582
  } catch (v) {
583
583
  a.open({
@@ -586,7 +586,7 @@ const Ze = Ye(
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 = Ye(
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
@@ -610,8 +610,8 @@ const Ze = Ye(
610
610
  currentCatalog: i,
611
611
  schedulers: m,
612
612
  currentScheduler: u,
613
- catalogOptions: V,
614
- categories: O,
613
+ catalogOptions: P,
614
+ categories: N,
615
615
  subcategories: re,
616
616
  items: W,
617
617
  sortedItems: ae,
@@ -634,8 +634,8 @@ const Ze = Ye(
634
634
  selectCatalog: j,
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 = Ye(
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
- ), X = /* @__PURE__ */ Re({
661
+ ), Q = /* @__PURE__ */ Te({
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
- Y(
668
+ H(
669
669
  () => n.initialValue,
670
670
  (d) => {
671
671
  o.value = d ?? "";
672
672
  }
673
673
  );
674
- const o = T(n.initialValue), { emitData: r, emitAction: f } = qe();
675
- return Y(
674
+ const o = R(n.initialValue), { emitData: r, emitAction: f } = qe();
675
+ return H(
676
676
  o,
677
677
  (d) => {
678
678
  r(d);
@@ -682,17 +682,17 @@ const Ze = Ye(
682
682
  }
683
683
  ), (d, i) => {
684
684
  const m = z("fm-text-field"), u = z("FmForm");
685
- return Ne(), Te(u, {
686
- onValidationSuccess: i[1] || (i[1] = (s) => P(f)("primary"))
685
+ return Ve(), Re(u, {
686
+ onValidationSuccess: i[1] || (i[1] = (s) => O(f)("primary"))
687
687
  }, {
688
- default: Ve(() => [
689
- Oe(m, {
688
+ default: Pe(() => [
689
+ Ne(m, {
690
690
  modelValue: o.value,
691
691
  "onUpdate:modelValue": i[0] || (i[0] = (s) => o.value = s),
692
- rules: [(s) => !!s || P(a)("menu.subcategory.dialog.add.name.required")],
692
+ rules: [(s) => !!s || O(a)("menu.subcategory.dialog.add.name.required")],
693
693
  autofocus: "",
694
- label: P(a)("menu.subcategory.dialog.add.name.label"),
695
- placeholder: P(a)("menu.subcategory.dialog.add.name.placeholder")
694
+ label: O(a)("menu.subcategory.dialog.add.name.label"),
695
+ placeholder: O(a)("menu.subcategory.dialog.add.name.placeholder")
696
696
  }, null, 8, ["modelValue", "rules", "label", "placeholder"])
697
697
  ]),
698
698
  _: 1
@@ -706,10 +706,10 @@ const Ze = Ye(
706
706
  }) => {
707
707
  const { t: o } = te(), r = Ze().updateMenu;
708
708
  function f() {
709
- const u = T(!1);
709
+ const u = R(!1);
710
710
  e.open({
711
711
  title: o("menu.subcategory.manager.dialog.add.title"),
712
- contentComponent: X,
712
+ contentComponent: Q,
713
713
  primaryActions: {
714
714
  text: o("menu.subcategory.manager.dialog.add.action"),
715
715
  close: !1,
@@ -725,10 +725,10 @@ const Ze = Ye(
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
- position: $e().subcategories.length
731
+ position: De().subcategories.length
732
732
  }
733
733
  };
734
734
  a ? await r(p) : await n.updateMenu(p, s), e.close();
@@ -740,7 +740,7 @@ const Ze = Ye(
740
740
  function d(u) {
741
741
  e.open({
742
742
  title: o("menu.subcategory.manager.dialog.update.title"),
743
- contentComponent: X,
743
+ contentComponent: Q,
744
744
  contentComponentProps: {
745
745
  initialValue: u.name
746
746
  },
@@ -756,7 +756,7 @@ const Ze = Ye(
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 = Ye(
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 = Ye(
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");
@@ -806,6 +806,6 @@ export {
806
806
  ft as f,
807
807
  ct as g,
808
808
  it as m,
809
- Ge as o,
809
+ Le as o,
810
810
  Ze as u
811
811
  };
@@ -1,5 +1,5 @@
1
- import { c as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-BddwlzDD.js";
2
- import "./menu-U0EGqBYv.js";
1
+ import { c as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-BfQlsQ7c.js";
2
+ import "./menu-TxdbkYDV.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-U0EGqBYv.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-TxdbkYDV.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.11-beta.2",
3
+ "version": "0.31.11-prod",
4
4
  "files": [
5
5
  "dist"
6
6
  ],