@feedmepos/mf-menu 0.31.33-beta.9 → 0.31.33-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 (60) hide show
  1. package/dist/{App-WQChaTIO.js → App-Ckk1s5Yi.js} +20 -20
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-t1K3plXk.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BgCJJKVy.js} +2 -2
  3. package/dist/{Catalog-BX_1g0ru.js → Catalog-CjVIJjh6.js} +6 -6
  4. package/dist/{Category-COTd0h8i.js → Category-BAD0RzNU.js} +4 -4
  5. package/dist/{Category-C6BSLYTZ.js → Category-CEheZjjx.js} +5 -5
  6. package/dist/{CookingGuide-DTTGVOtZ.js → CookingGuide-kaK5dxiM.js} +3 -3
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-UQQSF2Fv.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bd4IBeSK.js} +1 -1
  8. package/dist/{Group-tv4NRLFA.js → Group-Bl0YTPgr.js} +1 -1
  9. package/dist/{Group-BKhYr_XK.js → Group-Bvk50gsC.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-Cql0J4TN.js → Group.vue_vue_type_script_setup_true_lang-C9quQw7f.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DIUX09XZ.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Cf1_4Srx.js} +4 -4
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-azTd9oJY.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-oUoUXguS.js} +7 -7
  13. package/dist/{Ingredient-EhrV45jG.js → Ingredient-CY15AYC2.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DNLOCn6Z.js → InventoryBinding.vue_vue_type_script_setup_true_lang-C_ZH0ga3.js} +1052 -1052
  15. package/dist/{LinkProductSideSheet-CLUkYMJx.js → LinkProductSideSheet-CCW73uQb.js} +2 -2
  16. package/dist/{MenuSetting-DMYnqQqF.js → MenuSetting-DCIebynX.js} +4 -4
  17. package/dist/{PrintRoute-Ct0vYBI0.js → PrintRoute-DkksjGj8.js} +3 -3
  18. package/dist/{Product-CVOGBfGP.js → Product-DQ8dRTJW.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-3qo4KHwM.js → Product.vue_vue_type_script_setup_true_lang-B61A77iy.js} +12 -12
  20. package/dist/{ProductInternalTools-BD4pbpTq.js → ProductInternalTools-BtAJLyib.js} +6 -6
  21. package/dist/{Products-DiqJJi0G.js → Products-KtdrJG8K.js} +11 -11
  22. package/dist/{Publish-DNW7kAyt.js → Publish-D3uc61V1.js} +3 -3
  23. package/dist/{Recipe-DB59Oilo.js → Recipe-BLzezqGH.js} +4 -4
  24. package/dist/{Scheduler-CdvXOmD9.js → Scheduler-BLn2Uy9H.js} +3 -3
  25. package/dist/{ServingSequence-BJidBanx.js → ServingSequence-BtCpa6km.js} +3 -3
  26. package/dist/{Setting-CT0-ErCV.js → Setting-zO16rQvb.js} +5 -5
  27. package/dist/{Subcategory-Qss-q16J.js → Subcategory-BmNMReGL.js} +4 -4
  28. package/dist/{Takeaway-Cco68UWM.js → Takeaway-DIf1hfIp.js} +1 -1
  29. package/dist/{Takeaway-DJZrAOhK.js → Takeaway-Dt0oedp_.js} +4 -4
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-_UIxFm40.js → Takeaway.vue_vue_type_script_setup_true_lang-CnB08FG9.js} +5 -5
  31. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-DQ8A_b8N.js → Thumbnail.vue_vue_type_script_setup_true_lang-Cox2bpkp.js} +4 -4
  32. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C-GQNgOs.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-IYC4KukD.js} +13 -13
  33. package/dist/{Unit-jNMtjCqg.js → Unit-COwjhka0.js} +2 -2
  34. package/dist/{Variant-vgkCtn6k.js → Variant-BY1OZuk8.js} +3 -3
  35. package/dist/{_id_-VWD7FuB8.js → _id_-CNE0nt2C.js} +10 -10
  36. package/dist/{app-DCfZrw5q.js → app-BYTfYZ_L.js} +1 -1
  37. package/dist/{app-FT-17pdN.js → app-d86JiqNI.js} +24 -24
  38. package/dist/app.js +1 -1
  39. package/dist/assets/{linked-status-CgdauMC-.js → linked-status-ClGks19H.js} +8 -8
  40. package/dist/assets/{override-menu-BjjuzKpf.js → override-menu-DDzUoiJB.js} +8 -8
  41. package/dist/assets/{validate-menu-C0NftO2y.js → validate-menu-CvdVVGBq.js} +2 -2
  42. package/dist/{catalog-Cu3xX3Ij.js → catalog-D5llyR6I.js} +1 -1
  43. package/dist/{catalogSetting-MeAAWjBX.js → catalogSetting-C5DEsGFp.js} +1 -1
  44. package/dist/{category-D5yCmLTw.js → category-D_nwrQ4v.js} +1 -1
  45. package/dist/{currency-DQtVpVAB.js → currency-Bs7DX91b.js} +1 -1
  46. package/dist/{dayjs.min-B17nF95f.js → dayjs.min-CQ8q2Qks.js} +1 -1
  47. package/dist/{index-1CsXkVcJ.js → index-BImqd4SS.js} +1 -1
  48. package/dist/{index-CAsg0n3_.js → index-DSbd1qYp.js} +3 -3
  49. package/dist/{index-B6mBc4vZ.js → index-QioLRJ5c.js} +3 -3
  50. package/dist/{item-BXuPBp61.js → item-DJvTdIna.js} +16 -16
  51. package/dist/{jszip.min-Dzj1bdkj.js → jszip.min-jJP0SQy6.js} +246 -246
  52. package/dist/{menu-CpOCeOvo.js → menu-BHr0A_kn.js} +7 -7
  53. package/dist/{menu-CzQXSBCu.js → menu-CvdQTq54.js} +1 -1
  54. package/dist/{menuV2-Cw9jPRug.js → menuV2-C3Ade0y6.js} +85 -85
  55. package/dist/{priceTier-DmDrpMES.js → priceTier-BAw2NlRW.js} +1 -1
  56. package/dist/{scheduler-f8MIyGun.js → scheduler-DuUrXPi7.js} +3 -3
  57. package/dist/{subcategory-C3sMuoGj.js → subcategory-C5Ok0bI2.js} +2 -2
  58. package/dist/{toExcel-BoLqUKHC.js → toExcel-wKTHcPda.js} +2 -2
  59. package/dist/{unit-CAKmah7M.js → unit-D78XXPbI.js} +2 -2
  60. package/package.json +2 -2
@@ -1,20 +1,20 @@
1
- import { H as k, B as I, ao as L, G as J, ap as q, J as U, I as Y, a9 as M, c as x, X as E, aj as z, aq as we, ar as Ee, A as ke, ab as Ie, as as Re, at as Te, a8 as Fe } from "./menu-CpOCeOvo.js";
1
+ import { H as E, B as I, ao as L, G as J, ap as q, J as U, I as Y, a9 as w, c as x, X as k, aj as z, aq as Me, ar as ke, A as Ee, ab as Ie, as as Re, at as Te, a8 as Fe } from "./menu-BHr0A_kn.js";
2
2
  import { defineStore as Ae } from "pinia";
3
3
  import { shallowRef as X, ref as D, computed as h, shallowReactive as Ke, effectScope as Oe, watch as Ve } from "vue";
4
4
  import { useCoreStore as G } from "@feedmepos/mf-common";
5
5
  import { useSnackbar as Ne } from "@feedmepos/ui-library";
6
- const xe = "/assets/linked-status-CgdauMC-.js", $e = "/assets/override-menu-BjjuzKpf.js";
6
+ const xe = "/assets/linked-status-ClGks19H.js", $e = "/assets/override-menu-DDzUoiJB.js";
7
7
  function Pe(e) {
8
8
  var a;
9
- const n = k(e), o = (a = n.variant) == null ? void 0 : a.variantCombinations;
9
+ const n = E(e), o = (a = n.variant) == null ? void 0 : a.variantCombinations;
10
10
  return delete n.variant, delete n.thumbnail, [n, ...o || []];
11
11
  }
12
12
  function Ue(e, n, o, a) {
13
- const r = k(n), l = o ? r.modules.catalog.find((_) => _._id === o) : null, d = a ? r.modules.scheduler.find((_) => _._id === a) : null, i = l ? k(l) : void 0, c = o ? r.modules.catalog.filter((_) => _._id !== o) : [], m = d ? k(d) : void 0, f = e.reduce((_, y) => (_[y._id] = Pe(y), _), {});
14
- function v(_ = []) {
13
+ const r = E(n), l = o ? r.modules.catalog.find((g) => g._id === o) : null, d = a ? r.modules.scheduler.find((g) => g._id === a) : null, i = l ? E(l) : void 0, c = o ? r.modules.catalog.filter((g) => g._id !== o) : [], m = d ? E(d) : void 0, f = e.reduce((g, y) => (g[y._id] = Pe(y), g), {});
14
+ function v(g = []) {
15
15
  const y = e.map((b) => b._id);
16
16
  return [
17
- ..._.filter((b) => !y.includes(b._id)),
17
+ ...g.filter((b) => !y.includes(b._id)),
18
18
  ...Object.values(f).flatMap((b) => b)
19
19
  ];
20
20
  }
@@ -23,8 +23,8 @@ function Ue(e, n, o, a) {
23
23
  [a]: {
24
24
  ...i.override.scheduler[a],
25
25
  _id: a,
26
- items: v(m == null ? void 0 : m.items).map((_) => ({
27
- ..._,
26
+ items: v(m == null ? void 0 : m.items).map((g) => ({
27
+ ...g,
28
28
  orderFrom: J.F_ORDER_FROM.enum.ALL
29
29
  }))
30
30
  }
@@ -32,7 +32,7 @@ function Ue(e, n, o, a) {
32
32
  ...i.override.items,
33
33
  ...f
34
34
  }, r.modules.catalog = [...c, i], r) : m ? (m.items = v(m.items), r.modules.scheduler = [
35
- ...r.modules.scheduler.filter((_) => _._id !== a),
35
+ ...r.modules.scheduler.filter((g) => g._id !== a),
36
36
  m
37
37
  ], r) : {
38
38
  ...q(),
@@ -54,15 +54,15 @@ function T(e, n, o) {
54
54
  throw new Error(`_insertItemOverriders - Item not found - ${e._id}`);
55
55
  const r = (l = a.groups) == null ? void 0 : l.map((d) => {
56
56
  var m, f, v;
57
- const i = (m = e == null ? void 0 : e.groups) == null ? void 0 : m.find((_) => _._id === d._id);
57
+ const i = (m = e == null ? void 0 : e.groups) == null ? void 0 : m.find((g) => g._id === d._id);
58
58
  let c;
59
- return i ? c = ((f = d.items) == null ? void 0 : f.map((_) => {
59
+ return i ? c = ((f = d.items) == null ? void 0 : f.map((g) => {
60
60
  var b;
61
61
  const y = (b = i.items) == null ? void 0 : b.find(
62
- (R) => R._id === _._id && R.combinationKey === _.combinationKey
62
+ (R) => R._id === g._id && R.combinationKey === g.combinationKey
63
63
  );
64
- return T(y || _, n, o + 1);
65
- })) ?? [] : c = ((v = d.items) == null ? void 0 : v.map((_) => T(_, n, o + 1))) ?? [], {
64
+ return T(y || g, n, o + 1);
65
+ })) ?? [] : c = ((v = d.items) == null ? void 0 : v.map((g) => T(g, n, o + 1))) ?? [], {
66
66
  ...d,
67
67
  items: c
68
68
  };
@@ -80,7 +80,7 @@ function De(e, n) {
80
80
  const d = n.modules.group.find((c) => c._id === l._id), i = ((d == null ? void 0 : d.items) || []).map((c) => {
81
81
  var v;
82
82
  const m = (v = l.items) == null ? void 0 : v.find(
83
- (_) => _._id === c._id && _.combinationKey === c.combinationKey
83
+ (g) => g._id === c._id && g.combinationKey === c.combinationKey
84
84
  );
85
85
  if (m)
86
86
  return T(m, n, 1);
@@ -150,8 +150,8 @@ function He(e, n) {
150
150
  };
151
151
  }
152
152
  async function et(e, n, o, a, r, l = !0) {
153
- const d = k(o), i = l ? Ue(n, d, a, r) : d, c = n.reduce((v, _) => (v[_._id] = i.modules.item.find((y) => y._id === _._id), v), {}), m = n.reduce((v, _) => {
154
- const y = _._id;
153
+ const d = E(o), i = l ? Ue(n, d, a, r) : d, c = n.reduce((v, g) => (v[g._id] = i.modules.item.find((y) => y._id === g._id), v), {}), m = n.reduce((v, g) => {
154
+ const y = g._id;
155
155
  return v[y] = De(c[y], e), v;
156
156
  }, {}), f = I.getFallbackPrices({
157
157
  rawMenu: i,
@@ -160,7 +160,7 @@ async function et(e, n, o, a, r, l = !0) {
160
160
  schedulerId: r
161
161
  });
162
162
  return n.map((v) => {
163
- const _ = v._id, y = c[_];
163
+ const g = v._id, y = c[g];
164
164
  return {
165
165
  ...He(f, y),
166
166
  category: a || r ? y == null ? void 0 : y.category : null
@@ -232,7 +232,7 @@ function ot(e, n, o) {
232
232
  return r(n, o);
233
233
  }
234
234
  const P = /* @__PURE__ */ new Map();
235
- async function je(e, n, o) {
235
+ async function Be(e, n, o) {
236
236
  const a = `${e._id}-${e.updatedAt}-${n || "null"}-${o || "null"}`;
237
237
  if (P.has(a))
238
238
  return P.get(a);
@@ -241,8 +241,8 @@ async function je(e, n, o) {
241
241
  }
242
242
  async function st(e, n, o) {
243
243
  var d, i;
244
- const a = await je(e, n, null), r = [], l = (c, m) => {
245
- const f = k(c);
244
+ const a = await Be(e, n, null), r = [], l = (c, m) => {
245
+ const f = E(c);
246
246
  for (const v in m)
247
247
  m[v] && (f[v] = m[v]);
248
248
  return f;
@@ -250,7 +250,7 @@ async function st(e, n, o) {
250
250
  for (const c of a.modules.group) {
251
251
  const m = (d = c.items) == null ? void 0 : d.find((v) => v._id === o && !v.combinationKey), f = e.modules.item.find((v) => v._id === o);
252
252
  if (m) {
253
- const v = (i = c.items) == null ? void 0 : i.filter((y) => y._id === o && y.combinationKey), _ = [m, ...v].map((y) => {
253
+ const v = (i = c.items) == null ? void 0 : i.filter((y) => y._id === o && y.combinationKey), g = [m, ...v].map((y) => {
254
254
  var F, A;
255
255
  const b = y.combinationKey ? (A = (F = f == null ? void 0 : f.variant) == null ? void 0 : F.variantCombinations) == null ? void 0 : A.find(
256
256
  (K) => K.combinationKey === y.combinationKey
@@ -259,13 +259,13 @@ async function st(e, n, o) {
259
259
  });
260
260
  r.push({
261
261
  group: c,
262
- items: _
262
+ items: g
263
263
  });
264
264
  }
265
265
  }
266
266
  return r;
267
267
  }
268
- function Be({
268
+ function We({
269
269
  maxHistorySize: e = 50
270
270
  }) {
271
271
  const n = X([]), o = D(-1), a = h(() => o.value > 0), r = h(() => o.value < n.value.length - 1);
@@ -292,7 +292,7 @@ function Be({
292
292
  clear: c
293
293
  };
294
294
  }
295
- const We = {
295
+ const je = {
296
296
  async updateMenuModule(e, n) {
297
297
  const o = U.RequestRunner.operation(n, e.modules);
298
298
  if (o.validateError.length > 0)
@@ -342,14 +342,14 @@ function qe() {
342
342
  const at = Ae(
343
343
  "mf-menu-store-v2",
344
344
  () => {
345
- const e = Ke(qe()), n = G(), o = Ne(), a = h(() => e.menu.modules.serveSequence ? M(e.menu.modules.serveSequence, {
345
+ const e = Ke(qe()), n = G(), o = Ne(), a = h(() => e.menu.modules.serveSequence ? w(e.menu.modules.serveSequence, {
346
346
  selector: "position"
347
347
  }) : []), r = h(() => {
348
348
  var t;
349
349
  return ((t = n.currentBusiness.value) == null ? void 0 : t.menuVersion) || x.F_MENU_VERSION.v3;
350
350
  }), l = h(() => r.value === x.F_MENU_VERSION.v4), d = h(() => {
351
351
  const t = e.menu.modules.catalog;
352
- return M(t, { selector: "name" });
352
+ return w(t, { selector: "name" });
353
353
  }), i = h(() => {
354
354
  var s;
355
355
  let t = e.menu.modules.catalog.find(
@@ -360,16 +360,16 @@ const at = Ae(
360
360
  items: e.menu.modules.item,
361
361
  restaurantCustomAttributes: e.currentRestaurantCustomAttributes || {}
362
362
  })), t;
363
- }), c = h(() => M(v.value.modules.scheduler, { selector: "name" })), m = h(() => e.menu.modules.scheduler.find(
363
+ }), c = h(() => w(v.value.modules.scheduler, { selector: "name" })), m = h(() => e.menu.modules.scheduler.find(
364
364
  (t) => t._id === e.currentSchedulerId
365
365
  ));
366
366
  function f(t, s = !0) {
367
- e.menu = { ...t, _rev: e.menu._rev }, s && w.push(e.menu);
367
+ e.menu = { ...t, _rev: e.menu._rev }, s && M.push(e.menu);
368
368
  }
369
- const v = X(Z()), _ = D(!1), y = D(1);
369
+ const v = X(Z()), g = D(!1), y = D(1);
370
370
  async function b() {
371
371
  var u;
372
- _.value = !0;
372
+ g.value = !0;
373
373
  let t = e.menu.modules.catalog;
374
374
  if (i.value && ((u = i.value.linkItemRules) != null && u.length)) {
375
375
  const p = I.populateCatalog({
@@ -377,7 +377,7 @@ const at = Ae(
377
377
  items: e.menu.modules.item,
378
378
  restaurantCustomAttributes: e.currentRestaurantCustomAttributes || {}
379
379
  });
380
- t = e.menu.modules.catalog.map((g) => g._id === (p == null ? void 0 : p._id) ? p : g);
380
+ t = e.menu.modules.catalog.map((_) => _._id === (p == null ? void 0 : p._id) ? p : _);
381
381
  }
382
382
  const s = await Q(
383
383
  {
@@ -393,19 +393,19 @@ const at = Ae(
393
393
  if (e.currentSchedulerId != null) {
394
394
  const p = e.menu.modules.catalog.find(
395
395
  (S) => S._id === e.currentCatalogId
396
- ), g = p ? p.override.scheduler[e.currentSchedulerId] : e.menu.modules.scheduler.find(
396
+ ), _ = p ? p.override.scheduler[e.currentSchedulerId] : e.menu.modules.scheduler.find(
397
397
  (S) => S._id === e.currentSchedulerId
398
- ), C = new Set(((g == null ? void 0 : g.items) || []).map((S) => S._id));
398
+ ), C = new Set(((_ == null ? void 0 : _.items) || []).map((S) => S._id));
399
399
  s.modules.item = s.modules.item.filter((S) => C.has(S._id));
400
400
  }
401
- return v.value = s, _.value = !1, y.value = y.value + 1, s;
401
+ return v.value = s, g.value = !1, y.value = y.value + 1, s;
402
402
  }
403
403
  const F = Y.debounce(b, 200);
404
404
  Oe(!0).run(() => {
405
405
  Ve(
406
406
  () => [e.menu, e.currentCatalogId, e.currentSchedulerId],
407
407
  () => {
408
- _.value || F();
408
+ g.value || F();
409
409
  }
410
410
  );
411
411
  });
@@ -418,7 +418,7 @@ const at = Ae(
418
418
  label: t.name,
419
419
  value: t._id
420
420
  }))
421
- ]), j = h(() => {
421
+ ]), B = h(() => {
422
422
  const t = v.value.modules.category;
423
423
  return [
424
424
  ...V.value.item.addon ? [
@@ -428,35 +428,35 @@ const at = Ae(
428
428
  position: 0
429
429
  }
430
430
  ] : [],
431
- ...E(t, (s) => s.name)
431
+ ...k(t, (s) => s.name)
432
432
  ];
433
433
  }), ee = h(() => {
434
434
  const t = v.value.modules.subCategory || [];
435
- return E(t, (s) => s.name);
436
- }), B = h(() => {
435
+ return k(t, (s) => s.name);
436
+ }), W = h(() => {
437
437
  var s;
438
438
  let t = v.value.modules.item;
439
439
  if (i.value) {
440
440
  const u = (s = i.value) == null ? void 0 : s.override.items;
441
441
  t = t.filter((p) => {
442
442
  var C;
443
- const g = (C = u == null ? void 0 : u[p._id]) == null ? void 0 : C.find(
443
+ const _ = (C = u == null ? void 0 : u[p._id]) == null ? void 0 : C.find(
444
444
  (S) => !S.combinationKey
445
445
  );
446
- return (g == null ? void 0 : g.orderFrom) !== J.F_ORDER_FROM.enum.NONE;
446
+ return (_ == null ? void 0 : _.orderFrom) !== J.F_ORDER_FROM.enum.NONE;
447
447
  });
448
448
  }
449
- return E(t, (u) => u.code || u.name);
449
+ return k(t, (u) => u.code || u.name);
450
450
  }), te = h(() => {
451
- const t = e.menu.modules.category, s = E(t, (p) => p.name).reduce(
452
- (p, g, C) => (p[g._id] = C, p),
451
+ const t = e.menu.modules.category, s = k(t, (p) => p.name).reduce(
452
+ (p, _, C) => (p[_._id] = C, p),
453
453
  { "": 0 }
454
454
  ), u = e.menu.modules.item;
455
- return E(
455
+ return k(
456
456
  u,
457
457
  (p) => p.code || p.name
458
- ).reduce((p, g, C) => (p[g._id] = C + s[g.category || ""], p), {});
459
- }), ne = h(() => z(O.value, j.value, B.value)), re = h(() => {
458
+ ).reduce((p, _, C) => (p[_._id] = C + s[_.category || ""], p), {});
459
+ }), ne = h(() => z(O.value, B.value, W.value)), re = h(() => {
460
460
  const t = V.value.item.addon ? [
461
461
  {
462
462
  _id: e.currentCatalogId ? "" : null,
@@ -472,19 +472,19 @@ const at = Ae(
472
472
  );
473
473
  }), O = h(() => {
474
474
  const t = v.value.modules.variant;
475
- return M(t, { selector: "name" });
475
+ return w(t, { selector: "name" });
476
476
  });
477
477
  function oe(t = []) {
478
- const s = t.map((p) => O.value.find((g) => g._id === p)).filter((p) => !!p);
479
- return I.fullVariantCombination(s).reduce((p, g) => (p[g.combinationKey] = g.selectionName.join(" / "), p), {});
478
+ const s = t.map((p) => O.value.find((_) => _._id === p)).filter((p) => !!p);
479
+ return I.fullVariantCombination(s).reduce((p, _) => (p[_.combinationKey] = _.selectionName.join(" / "), p), {});
480
480
  }
481
- const se = h(() => E(v.value.modules.group, (t) => t.name)), ae = h(() => M(v.value.modules.takeaway, { selector: "name" })), ue = h(() => M(e.menu.modules.printDepartment || [], {
481
+ const se = h(() => k(v.value.modules.group, (t) => t.name)), ae = h(() => w(v.value.modules.takeaway, { selector: "name" })), ue = h(() => w(e.menu.modules.printDepartment || [], {
482
482
  selector: "name"
483
- })), ie = h(() => M(e.menu.modules.unit, { selector: "name" })), ce = h(() => M(we(e.menu.modules.recipe, e.menu.modules.sku), {
483
+ })), ie = h(() => w(e.menu.modules.unit, { selector: "name" })), ce = h(() => w(Me(e.menu.modules.recipe, e.menu.modules.sku), {
484
484
  selector: "name"
485
485
  })), le = h(() => e.menu.modules.cookingGuide), de = h(() => {
486
- const t = Ee(e.menu.modules.sku);
487
- return M(t, { selector: "code" });
486
+ const t = ke(e.menu.modules.sku);
487
+ return w(t, { selector: "code" });
488
488
  }), V = h(() => {
489
489
  const t = !e.currentCatalogId, s = r.value === x.F_MENU_VERSION.v4, u = !e.currentSchedulerId, p = {
490
490
  create: t && u,
@@ -520,7 +520,7 @@ const at = Ae(
520
520
  bindToVariant: s,
521
521
  print: t && u,
522
522
  toRoot: s && u,
523
- takeaway: (g) => !!g && (s || t) && u,
523
+ takeaway: (_) => !!_ && (s || t) && u,
524
524
  multiScheduler: s,
525
525
  canRearrange: s,
526
526
  printConfig: s
@@ -562,36 +562,36 @@ const at = Ae(
562
562
  return { systemCode: s, taxCode: u };
563
563
  }
564
564
  function fe(t, s, u) {
565
- return (t ?? s ?? []).map((p) => N(p)).find((p) => u.some((g) => g.value === p));
565
+ return (t ?? s ?? []).map((p) => N(p)).find((p) => u.some((_) => _.value === p));
566
566
  }
567
567
  const pe = h(() => {
568
568
  var p;
569
- const t = ["SV5", "SV10"], s = ke.Country.getCountryFlattenTaxes(
569
+ const t = ["SV5", "SV10"], s = Ee.Country.getCountryFlattenTaxes(
570
570
  G().currentCountry.value
571
- ), u = s.filter((g) => l.value || !t.includes(g.taxCode)).map((g) => ({
572
- label: `${g.name} (${Ie(g.rate)}%)`,
573
- value: N(g),
571
+ ), u = s.filter((_) => l.value || !t.includes(_.taxCode)).map((_) => ({
572
+ label: `${_.name} (${Ie(_.rate)}%)`,
573
+ value: N(_),
574
574
  meta: {
575
- rate: g.rate
575
+ rate: _.rate
576
576
  }
577
577
  }));
578
- return u.sort((g, C) => g.label.localeCompare(C.label, void 0, { numeric: !0 })), {
578
+ return u.sort((_, C) => _.label.localeCompare(C.label, void 0, { numeric: !0 })), {
579
579
  systemCode: (p = s[0]) == null ? void 0 : p.systemCode,
580
580
  countryTaxOptions: u
581
581
  };
582
582
  }), ve = async () => {
583
583
  const t = await Fe.readMenu();
584
- e.menu = t ?? e.menu, W(null);
585
- }, ge = async () => {
584
+ e.menu = t ?? e.menu, j(null);
585
+ }, _e = async () => {
586
586
  const { fetchAllRestaurants: t } = Te();
587
587
  await t({
588
588
  onBatchEnd: (s) => {
589
589
  e.restaurants = s;
590
590
  }
591
591
  });
592
- }, W = (t) => {
592
+ }, j = (t) => {
593
593
  e.currentCatalogId = t;
594
- }, _e = (t) => {
594
+ }, ge = (t) => {
595
595
  e.currentSchedulerId = t;
596
596
  }, ye = (t) => {
597
597
  e.currentCategoryIds = t;
@@ -600,8 +600,8 @@ const at = Ae(
600
600
  }, Ce = async (t, s) => {
601
601
  const u = Array.isArray(t) ? t : [t];
602
602
  if (!u.length) return;
603
- const p = u.map((g) => ({
604
- ...g,
603
+ const p = u.map((_) => ({
604
+ ..._,
605
605
  _id: e.menu._id,
606
606
  _rev: e.menu._rev
607
607
  }));
@@ -612,13 +612,13 @@ const at = Ae(
612
612
  const C = await Re(p, e.menu.modules);
613
613
  if (C !== !0) throw new Error(C);
614
614
  }
615
- const g = await We.updateMenuModule(e.menu, p);
616
- return f(g.menu), g;
617
- } catch (g) {
615
+ const _ = await je.updateMenuModule(e.menu, p);
616
+ return f(_.menu), _;
617
+ } catch (_) {
618
618
  o.open({
619
619
  type: "error",
620
620
  title: "Failed to update menu",
621
- message: g
621
+ message: _
622
622
  });
623
623
  }
624
624
  }, be = async (t) => {
@@ -629,11 +629,11 @@ const at = Ae(
629
629
  priceTierSettings: t.priceTierSettings
630
630
  };
631
631
  return f(s), s;
632
- }, w = Be({ maxHistorySize: 50 }), Se = h(() => w.canUndo.value), Me = h(() => w.canRedo.value);
632
+ }, M = We({ maxHistorySize: 50 }), Se = h(() => M.canUndo.value), we = h(() => M.canRedo.value);
633
633
  return {
634
634
  state: e,
635
635
  // loading state
636
- workerIsComputing: _,
636
+ workerIsComputing: g,
637
637
  mergedMenuChangeId: y,
638
638
  // async computed state
639
639
  mergedMenu: v,
@@ -646,9 +646,9 @@ const at = Ae(
646
646
  schedulers: c,
647
647
  currentScheduler: m,
648
648
  catalogOptions: K,
649
- categories: j,
649
+ categories: B,
650
650
  subcategories: ee,
651
- items: B,
651
+ items: W,
652
652
  sortedItems: te,
653
653
  categorizedItems: ne,
654
654
  categorizedRawMenuItems: re,
@@ -665,9 +665,9 @@ const at = Ae(
665
665
  // Action
666
666
  setMenu: f,
667
667
  readMenu: ve,
668
- readRestaurants: ge,
669
- selectCatalog: W,
670
- selectScheduler: _e,
668
+ readRestaurants: _e,
669
+ selectCatalog: j,
670
+ selectScheduler: ge,
671
671
  selectCategory: ye,
672
672
  setRestaurantCustomAttributes: he,
673
673
  updateMenu: Ce,
@@ -680,17 +680,17 @@ const at = Ae(
680
680
  mapVariant: oe,
681
681
  // history
682
682
  canUndoHistory: Se,
683
- canRedoHistory: Me,
683
+ canRedoHistory: we,
684
684
  undoHistory: () => {
685
- const t = w.undo();
685
+ const t = M.undo();
686
686
  t && f(t, !1);
687
687
  },
688
688
  redoHistory: () => {
689
- const t = w.redo();
689
+ const t = M.redo();
690
690
  t && f(t, !1);
691
691
  },
692
692
  clearHistory: () => {
693
- w.clear();
693
+ M.clear();
694
694
  }
695
695
  };
696
696
  }
@@ -702,6 +702,6 @@ export {
702
702
  st as f,
703
703
  tt as g,
704
704
  et as m,
705
- je as o,
705
+ Be as o,
706
706
  at as u
707
707
  };
@@ -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, D as M } from "./menu-CpOCeOvo.js";
4
+ import { u as k, D as M } from "./menu-BHr0A_kn.js";
5
5
  const v = /* @__PURE__ */ d({
6
6
  __name: "AddPriceGroupDialog",
7
7
  setup(s) {
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as ie, computed as Y, resolveComponent as _, createElementBlock as d, openBlock as u, createVNode as t, createCommentVNode as F, unref as n, toDisplayString as A, createElementVNode as h, withCtx as v, Fragment as N, renderList as M, createBlock as I, ref as H, Transition as se, createTextVNode as me } from "vue";
2
- import { H as S, G as r, u as pe, I as ve, J as ue } from "./menu-CpOCeOvo.js";
2
+ import { H as S, G as r, u as pe, I as ve, J as ue } from "./menu-BHr0A_kn.js";
3
3
  import { useI18n as de } from "@feedmepos/mf-common";
4
4
  import { components as _e } from "@feedmepos/ui-library";
5
- import { a as fe, L as ye } from "./LinkProductSideSheet-CLUkYMJx.js";
5
+ import { a as fe, L as ye } from "./LinkProductSideSheet-CCW73uQb.js";
6
6
  import { _ as ne } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
7
7
  import { u as he } from "./discardConfirm-BHni0LNu.js";
8
- import { u as ge } from "./menu-CzQXSBCu.js";
8
+ import { u as ge } from "./menu-CvdQTq54.js";
9
9
  const Ve = { class: "space-y-8" }, Fe = {
10
10
  key: 0,
11
11
  class: "space-y-16"
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as M, watch as _, ref as E, resolveComponent as f, createBlock as x, openBlock as C, unref as c, withCtx as V, createVNode as A } from "vue";
2
- import { J as l, G as d, u as F } from "./menu-CpOCeOvo.js";
2
+ import { J as l, G as d, u as F } from "./menu-BHr0A_kn.js";
3
3
  import { useI18n as b } from "@feedmepos/mf-common";
4
4
  import { useDialogChild as P } from "@feedmepos/ui-library";
5
- import { u as v } from "./menuV2-Cw9jPRug.js";
5
+ import { u as v } from "./menuV2-C3Ade0y6.js";
6
6
  const y = /* @__PURE__ */ M({
7
7
  __name: "AddSubcategoryDialogContentComponent",
8
8
  props: {
@@ -1,5 +1,5 @@
1
- import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-azTd9oJY.js";
2
- import "./menu-CpOCeOvo.js";
1
+ import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-oUoUXguS.js";
2
+ import "./menu-BHr0A_kn.js";
3
3
  var Z = {
4
4
  defaultAmount: 0,
5
5
  defaultCurrency: "USD",
@@ -1,13 +1,13 @@
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 { a6 as B, a7 as te, a4 as P, H as k, O as $, D as I, B as E, I as ne, a5 as ae, J as C, G as D, u as oe } from "./menu-CpOCeOvo.js";
3
+ import { a6 as B, a7 as te, a4 as P, H as k, O as $, D as I, B as E, I as ne, a5 as ae, J as C, G as D, u as oe } from "./menu-BHr0A_kn.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";
7
7
  import { c as re } from "./check-C9mY6LiX.js";
8
8
  import "./vuedraggable-CK8z7qA8.js";
9
9
  import "./LinkProductSideSheet.vue_vue_type_style_index_0_scoped_97fa9d58_lang-DvG3mOom.js";
10
- import "./menuV2-Cw9jPRug.js";
10
+ import "./menuV2-C3Ade0y6.js";
11
11
  import { c as me } from "./createComponentProgrammatically-Bt2rn1IQ.js";
12
12
  const de = ["value", "disabled"], ce = /* @__PURE__ */ O({
13
13
  __name: "NumberPrecisionInput",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-menu",
3
- "version": "0.31.33-beta.9",
3
+ "version": "0.31.33-prod",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -53,7 +53,7 @@
53
53
  "vue3-lottie": "^3.3.0",
54
54
  "vuedraggable": "^4.1.0",
55
55
  "xlsx": "^0.18.5",
56
- "@feedmepos/mf-common": "^1.27.1"
56
+ "@feedmepos/mf-common": "^1.27.2"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@rollup/plugin-commonjs": "^28.0.2",