@feedmepos/mf-menu 0.32.66-dev.4 → 0.32.66

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 (69) hide show
  1. package/dist/{App-DdmEswyc.js → App-CLFnWEv5.js} +8 -8
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-ChxM7qYy.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CVlLKIvY.js} +3 -3
  3. package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-bZiXME9Z.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-CifmNu2u.js} +3 -3
  4. package/dist/{Catalog-GcX5VX2M.js → Catalog-BC3jLsPs.js} +6 -6
  5. package/dist/{Category-BwH-wVv2.js → Category-Bmwlq6nL.js} +4 -4
  6. package/dist/{Category-B2Kv3yJp.js → Category-DMkvEdKc.js} +4 -4
  7. package/dist/{CookingGuide-CWDprGu6.js → CookingGuide-qy0LTm-D.js} +5 -5
  8. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CmACeNnV.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-JiZiBeEH.js} +1 -1
  9. package/dist/{Group-YNbaHa27.js → Group-BPwmyZZp.js} +1 -1
  10. package/dist/{Group-BavmrRXD.js → Group-D0Xv55no.js} +3 -3
  11. package/dist/{Group.vue_vue_type_script_setup_true_lang-9rGR3rec.js → Group.vue_vue_type_script_setup_true_lang-D8nAO7h0.js} +7 -7
  12. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D12xx6Vd.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CjEnnnQj.js} +5 -5
  13. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-NAKJ0sFP.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DMzqbxts.js} +7 -7
  14. package/dist/{Ingredient-DHjSUUIP.js → Ingredient-BqaX4rlX.js} +4 -4
  15. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-U5AkGUri.js → InventoryBinding.vue_vue_type_script_setup_true_lang-sKJRkcCq.js} +2 -2
  16. package/dist/{LinkProductSideSheet-BkNMJOiZ.js → LinkProductSideSheet-C6R0KLzF.js} +4 -4
  17. package/dist/{MenuSetting-Bm4O6MZ6.js → MenuSetting-BedGpIZE.js} +7 -7
  18. package/dist/{OrderPacing-DliNofLl.js → OrderPacing-C7i8LWNy.js} +5 -5
  19. package/dist/{PrintRoute-1Py1_tzI.js → PrintRoute-CIuQv57y.js} +5 -5
  20. package/dist/{Product-D3kyQmwQ.js → Product-DRcYcCoB.js} +1 -1
  21. package/dist/{Product.vue_vue_type_script_setup_true_lang-D-heQeQu.js → Product.vue_vue_type_script_setup_true_lang-C1jETJyk.js} +14 -14
  22. package/dist/{ProductInternalTools-87_B55Fr.js → ProductInternalTools-BKZ3Z3o8.js} +7 -7
  23. package/dist/{Products-B-J389Ks.js → Products-BOz9WFoU.js} +56 -56
  24. package/dist/{Publish-BlYboQl0.js → Publish-COiwVeUS.js} +4 -4
  25. package/dist/{Recipe-qb3ZdJGw.js → Recipe-DNFAMy0c.js} +5 -5
  26. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-CXqE4HLg.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-B8P0xkMT.js} +1 -1
  27. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CODY5qdL.js → RuleView.vue_vue_type_script_setup_true_lang-DxpvosGG.js} +462 -462
  28. package/dist/{Scheduler-CeM3y0Ha.js → Scheduler-DFc4fCB9.js} +3 -3
  29. package/dist/{ServingSequence-BCzXUO9n.js → ServingSequence-DjIUv0-b.js} +3 -3
  30. package/dist/{Setting-sy6vMuPB.js → Setting-DnTMpvqy.js} +5 -5
  31. package/dist/{Subcategory-BZti9kYo.js → Subcategory-B3HfpruL.js} +6 -6
  32. package/dist/{Takeaway-C9puqL8n.js → Takeaway-CCJDLPwz.js} +4 -4
  33. package/dist/{Takeaway-D5JlmD6u.js → Takeaway-DYoO1ATi.js} +1 -1
  34. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-j8d0lXOL.js → Takeaway.vue_vue_type_script_setup_true_lang-B8RUqBww.js} +5 -5
  35. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-DX_DRNF2.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-D1gjP1Yk.js} +1 -1
  36. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DesC2w1k.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-Cixm7NMC.js} +2 -2
  37. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CmuuSoGs.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CNs2BM3V.js} +15 -15
  38. package/dist/{Unit-Cc42yyN6.js → Unit-DTswZFER.js} +2 -2
  39. package/dist/{Variant-D19fCBB3.js → Variant-hqEsHL1u.js} +3 -3
  40. package/dist/{_id_-B9MKg_D-.js → _id_-CGEwOGPW.js} +10 -10
  41. package/dist/{app-kMpCkgGC.js → app-Bl1kXtqs.js} +1 -1
  42. package/dist/{app-BN0HgwNB.js → app-Da1XriaA.js} +32 -32
  43. package/dist/app.js +1 -1
  44. package/dist/assets/{linked-status-CfzY6n0e.js → linked-status-BvskCt3K.js} +2 -2
  45. package/dist/assets/{menu-export-CALDQ8k1.js → menu-export-Do1iuDTl.js} +3 -3
  46. package/dist/assets/{override-menu-CmqrughS.js → override-menu-6Z3zlZar.js} +2 -2
  47. package/dist/assets/{validate-menu-BgjAdwUE.js → validate-menu-B5dZxzSc.js} +2 -2
  48. package/dist/{catalog-BuKsorK6.js → catalog-UnHoIEYX.js} +1 -1
  49. package/dist/{catalogSetting-B5EtNHwb.js → catalogSetting-DNkG_w_s.js} +1 -1
  50. package/dist/{currency-BTbX6PWL.js → currency-DI_9wOEf.js} +1 -1
  51. package/dist/{dayjs.min-KeFRLajb.js → dayjs.min-B1nGfqJL.js} +2 -2
  52. package/dist/{discardConfirm-zfX1nuye.js → discardConfirm-C65bh13g.js} +1 -1
  53. package/dist/{index-DTakcRjO.js → index-CJoXwoxN.js} +5 -5
  54. package/dist/{index-DDJHOjwR.js → index-Uv8d5BUd.js} +1 -1
  55. package/dist/{index-DfoDRA0k.js → index-rj_-6l1M.js} +6 -6
  56. package/dist/{index.vue_vue_type_script_setup_true_lang-DybNA4Np.js → index.vue_vue_type_script_setup_true_lang-BRtju05_.js} +467 -467
  57. package/dist/{item-jpOmJGLW.js → item-Cl-8exj2.js} +20 -20
  58. package/dist/{jszip.min-DyvQ41lT.js → jszip.min-5yjRwCyp.js} +167 -167
  59. package/dist/{linkProducts-DFJMpL5n.js → linkProducts-CimT6rLW.js} +4 -4
  60. package/dist/{memberPricing-BZgeIGmU.js → memberPricing-CZwLOzMR.js} +1 -1
  61. package/dist/{menu-BupVgTY-.js → menu-C4c62Xvw.js} +1 -1
  62. package/dist/{menuV2-B9-ODrLW.js → menuV2-BxVmtfZ3.js} +96 -96
  63. package/dist/{order_pacing-Dfey1efO.js → order_pacing-C0bYumFm.js} +5 -5
  64. package/dist/{priceTier-eGLFeyfY.js → priceTier-C08rb71L.js} +1 -1
  65. package/dist/{rules-BS6BLc8X.js → rules-DEd-yB4f.js} +3 -3
  66. package/dist/{scheduler-3BGOjjCO.js → scheduler-B_-N10Gf.js} +5 -5
  67. package/dist/{toExcel-BmTqFf7v.js → toExcel-Ca_J-aHT.js} +2 -2
  68. package/dist/{unit-D2oVUlp4.js → unit-CDMOEbey.js} +3 -3
  69. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import { computed as m } from "vue";
2
- import { F, g as h, h as S, b as v, i as C, k as N, T, u as P, c as z } from "./index.vue_vue_type_script_setup_true_lang-DybNA4Np.js";
3
- import { u as R } from "./menuV2-B9-ODrLW.js";
4
- import { C as w, h as E } from "./catalog-BuKsorK6.js";
2
+ import { F, g as h, h as S, b as v, i as C, k as N, T, u as P, c as z } from "./index.vue_vue_type_script_setup_true_lang-BRtju05_.js";
3
+ import { u as R } from "./menuV2-BxVmtfZ3.js";
4
+ import { C as w, h as E } from "./catalog-UnHoIEYX.js";
5
5
  import { useSnackbar as O, useDialog as A } from "@feedmepos/ui-library";
6
- import { a as b } from "./LinkProductSideSheet-BkNMJOiZ.js";
6
+ import { a as b } from "./LinkProductSideSheet-C6R0KLzF.js";
7
7
  function D() {
8
8
  const e = R(), p = m(() => e.categorizedRawMenuItems.filter((o) => o.items.length > 0)), l = m(() => {
9
9
  const o = e.currentCatalog;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as d, ref as _, watch as S, resolveComponent as b, createBlock as f, openBlock as y, unref as M, computed as T } from "vue";
2
- import { u as h, b as w } from "./index.vue_vue_type_script_setup_true_lang-DybNA4Np.js";
2
+ import { u as h, b as w } from "./index.vue_vue_type_script_setup_true_lang-BRtju05_.js";
3
3
  import { useI18n as l } from "@feedmepos/mf-common";
4
4
  import { useDialogChild as x, useDialog as C, useSnackbar as P } from "@feedmepos/ui-library";
5
5
  const k = /* @__PURE__ */ d({
@@ -1,5 +1,5 @@
1
1
  import { computed as n, onMounted as d, onBeforeUnmount as m } from "vue";
2
- import { u as c } from "./index.vue_vue_type_script_setup_true_lang-DybNA4Np.js";
2
+ import { u as c } from "./index.vue_vue_type_script_setup_true_lang-BRtju05_.js";
3
3
  import "@feedmepos/mf-common";
4
4
  import "@feedmepos/ui-library";
5
5
  function p() {
@@ -1,10 +1,10 @@
1
1
  var We = Object.defineProperty;
2
2
  var Le = (e, t, n) => t in e ? We(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var ne = (e, t, n) => Le(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { l as ae } from "./discardConfirm-zfX1nuye.js";
4
+ import { l as ae } from "./discardConfirm-C65bh13g.js";
5
5
  import { defineStore as qe } from "pinia";
6
- import { shallowRef as N, ref as H, computed as S, shallowReactive as ze, effectScope as He, watch as Be } from "vue";
7
- import { d as C, f as ue, m as T, k as ie, aq as re, g as B, O as x, c as L, s as V, X as oe, ar as Ge, as as Je, a as Ye, Q as Qe, at as Xe, au as Ze, M as et } from "./index.vue_vue_type_script_setup_true_lang-DybNA4Np.js";
6
+ import { shallowRef as N, ref as B, computed as S, shallowReactive as ze, effectScope as Be, watch as He } from "vue";
7
+ import { d as C, f as ue, m as T, k as ie, aq as re, g as H, O as x, c as L, s as V, X as oe, ar as Ge, as as Je, a as Ye, Q as Ze, at as Qe, au as Xe, M as et } from "./index.vue_vue_type_script_setup_true_lang-BRtju05_.js";
8
8
  import { useCoreStore as se } from "@feedmepos/mf-common";
9
9
  import { useSnackbar as tt } from "@feedmepos/ui-library";
10
10
  function nt(e) {
@@ -16,14 +16,14 @@ function nt(e) {
16
16
  }
17
17
  return delete t.variant, delete t.thumbnail, delete t.images, [t, ...n || []];
18
18
  }
19
- const rt = "/assets/linked-status-CfzY6n0e.js", ot = "/assets/override-menu-CmqrughS.js";
19
+ const rt = "/assets/linked-status-BvskCt3K.js", ot = "/assets/override-menu-6Z3zlZar.js";
20
20
  function st(e, t, n, s) {
21
21
  const r = C(t), u = n ? r.modules.catalog.find((f) => f._id === n) : null, c = s ? r.modules.scheduler.find((f) => f._id === s) : null, a = u ? C(u) : void 0, d = n ? r.modules.catalog.filter((f) => f._id !== n) : [], l = c ? C(c) : void 0, g = e.reduce((f, v) => (f[v._id] = nt(v), f), {});
22
22
  function y(f = []) {
23
- const v = e.map((h) => h._id);
23
+ const v = e.map((p) => p._id);
24
24
  return [
25
- ...f.filter((h) => !v.includes(h._id)),
26
- ...Object.values(g).flatMap((h) => h)
25
+ ...f.filter((p) => !v.includes(p._id)),
26
+ ...Object.values(g).flatMap((p) => p)
27
27
  ];
28
28
  }
29
29
  return a && s ? (a.override.scheduler = {
@@ -65,8 +65,8 @@ function F(e, t, n) {
65
65
  const a = (l = e == null ? void 0 : e.groups) == null ? void 0 : l.find((f) => f._id === c._id);
66
66
  let d;
67
67
  return a ? d = ((g = c.items) == null ? void 0 : g.map((f) => {
68
- var h;
69
- const v = (h = a.items) == null ? void 0 : h.find(
68
+ var p;
69
+ const v = (p = a.items) == null ? void 0 : p.find(
70
70
  (b) => b._id === f._id && b.combinationKey === f.combinationKey
71
71
  );
72
72
  return F(v || f, t, n + 1);
@@ -230,9 +230,9 @@ async function Pt(e, t, n) {
230
230
  if (l) {
231
231
  const y = (a = d.items) == null ? void 0 : a.filter((v) => v._id === n && v.combinationKey), f = [l, ...y].map((v) => {
232
232
  var M, I;
233
- const h = v.combinationKey ? (I = (M = g == null ? void 0 : g.variant) == null ? void 0 : M.variantCombinations) == null ? void 0 : I.find(
234
- (E) => E.combinationKey === v.combinationKey
235
- ) : g, b = h && g ? u(g, h) : v;
233
+ const p = v.combinationKey ? (I = (M = g == null ? void 0 : g.variant) == null ? void 0 : M.variantCombinations) == null ? void 0 : I.find(
234
+ (k) => k.combinationKey === v.combinationKey
235
+ ) : g, b = p && g ? u(g, p) : v;
236
236
  return u(b, v);
237
237
  });
238
238
  r.push({
@@ -269,7 +269,7 @@ function O(e) {
269
269
  function $(e) {
270
270
  return e instanceof RegExp ? e.toString() : e;
271
271
  }
272
- function k(e) {
272
+ function E(e) {
273
273
  return typeof e == "object" && e !== null && !Array.isArray(e) && !(e instanceof Date) && !(e instanceof RegExp);
274
274
  }
275
275
  function P(e, t) {
@@ -285,7 +285,7 @@ function P(e, t) {
285
285
  if (!P(e[n], t[n])) return !1;
286
286
  return !0;
287
287
  }
288
- if (k(e) && k(t)) {
288
+ if (E(e) && E(t)) {
289
289
  const n = Object.keys(e), s = Object.keys(t);
290
290
  if (n.length !== s.length) return !1;
291
291
  for (const r of n)
@@ -319,32 +319,32 @@ function dt(e, t, n) {
319
319
  const s = { _t: "a" }, r = ((f = n == null ? void 0 : n.arrays) == null ? void 0 : f.detectMove) !== !1, u = ((v = n == null ? void 0 : n.arrays) == null ? void 0 : v.includeValueOnMove) === !0, c = n == null ? void 0 : n.objectHash;
320
320
  let a = r ? lt(e, t, c) : [];
321
321
  if (!c && e.length === t.length && e.length > 0 && a.length < e.length) {
322
- const h = k(e[0]) || Array.isArray(e[0]), b = a.length > 0;
323
- if (h || b) {
322
+ const p = E(e[0]) || Array.isArray(e[0]), b = a.length > 0;
323
+ if (p || b) {
324
324
  a = [];
325
325
  for (let M = 0; M < e.length; M++)
326
326
  a.push({ leftIndex: M, rightIndex: M });
327
327
  }
328
328
  }
329
- new Set(a.map((h) => h.leftIndex));
330
- const d = new Set(a.map((h) => h.rightIndex)), l = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
331
- for (const h of a)
332
- l.set(h.leftIndex, h.rightIndex), g.set(h.rightIndex, h.leftIndex);
333
- for (let h = 0; h < e.length; h++) {
334
- const b = l.get(h);
329
+ new Set(a.map((p) => p.leftIndex));
330
+ const d = new Set(a.map((p) => p.rightIndex)), l = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
331
+ for (const p of a)
332
+ l.set(p.leftIndex, p.rightIndex), g.set(p.rightIndex, p.leftIndex);
333
+ for (let p = 0; p < e.length; p++) {
334
+ const b = l.get(p);
335
335
  if (b !== void 0) {
336
- const M = J(e[h], t[b], n);
337
- if (M !== void 0 && (s[b] = M), r && b !== h) {
338
- const I = `_${h}`, E = u ? [e[h], b, K] : ["", b, K];
339
- s[I] = E;
336
+ const M = J(e[p], t[b], n);
337
+ if (M !== void 0 && (s[b] = M), r && b !== p) {
338
+ const I = `_${p}`, k = u ? [e[p], b, K] : ["", b, K];
339
+ s[I] = k;
340
340
  }
341
341
  } else {
342
- const M = `_${h}`;
343
- s[M] = [e[h], w, w];
342
+ const M = `_${p}`;
343
+ s[M] = [e[p], w, w];
344
344
  }
345
345
  }
346
- for (let h = 0; h < t.length; h++)
347
- d.has(h) || (s[h] = [t[h]]);
346
+ for (let p = 0; p < t.length; p++)
347
+ d.has(p) || (s[p] = [t[p]]);
348
348
  const y = Object.keys(s);
349
349
  if (!(y.length === 1 && y[0] === "_t"))
350
350
  return s;
@@ -378,7 +378,7 @@ function J(e, t, n) {
378
378
  }
379
379
  if (Array.isArray(e) && Array.isArray(t))
380
380
  return dt(e, t, n);
381
- if (k(e) && k(t))
381
+ if (E(e) && E(t))
382
382
  return mt(e, t, n);
383
383
  const u = n != null && n.cloneDiffValues ? O(e) : e, c = n != null && n.cloneDiffValues ? O(t) : t;
384
384
  return [$(u), $(c)];
@@ -442,7 +442,7 @@ function Y(e, t, n) {
442
442
  if (t.length === 3 && t[2] === w)
443
443
  return;
444
444
  }
445
- return k(t) && t._t === "a" ? vt(e, t) : k(t) && k(e) ? yt(e, t) : e;
445
+ return E(t) && t._t === "a" ? vt(e, t) : E(t) && E(e) ? yt(e, t) : e;
446
446
  }
447
447
  function le(e, t, n) {
448
448
  return Y(e, t);
@@ -466,26 +466,26 @@ function gt(e) {
466
466
  if (Array.isArray(r) && r.length === 1)
467
467
  t[`_${s}`] = [r[0], w, w];
468
468
  else {
469
- const u = Q(r);
469
+ const u = Z(r);
470
470
  u !== void 0 && (t[n] = u);
471
471
  }
472
472
  }
473
473
  return t;
474
474
  }
475
- function ht(e) {
475
+ function pt(e) {
476
476
  const t = {};
477
477
  for (const n in e) {
478
478
  const s = e[n];
479
479
  if (Array.isArray(s))
480
480
  s.length === 1 ? t[n] = [s[0], w, w] : s.length === 3 && s[2] === w ? t[n] = [s[0]] : s.length === 2 && (t[n] = [s[1], s[0]]);
481
481
  else {
482
- const r = Q(s);
482
+ const r = Z(s);
483
483
  r !== void 0 && (t[n] = r);
484
484
  }
485
485
  }
486
486
  return t;
487
487
  }
488
- function Q(e) {
488
+ function Z(e) {
489
489
  if (e !== void 0) {
490
490
  if (Array.isArray(e)) {
491
491
  if (e.length === 1)
@@ -497,13 +497,13 @@ function Q(e) {
497
497
  if (e.length === 3 && e[2] === K)
498
498
  return e;
499
499
  }
500
- return k(e) && e._t === "a" ? gt(e) : k(e) ? ht(e) : e;
500
+ return E(e) && e._t === "a" ? gt(e) : E(e) ? pt(e) : e;
501
501
  }
502
502
  }
503
503
  function de(e) {
504
- return Q(e);
504
+ return Z(e);
505
505
  }
506
- function pt(e, t, n) {
506
+ function ht(e, t, n) {
507
507
  const s = de(t);
508
508
  return le(e, s);
509
509
  }
@@ -522,7 +522,7 @@ class _t {
522
522
  return de(t);
523
523
  }
524
524
  unpatch(t, n) {
525
- return pt(t, n, this.options);
525
+ return ht(t, n, this.options);
526
526
  }
527
527
  clone(t) {
528
528
  return O(t);
@@ -541,14 +541,14 @@ function bt({
541
541
  includeValueOnMove: !1
542
542
  },
543
543
  cloneDiffValues: !1
544
- }), n = N(null), s = N([]), r = H(-1), u = N(null), c = S(() => r.value > 0), a = S(() => r.value < s.value.length - 1);
544
+ }), n = N(null), s = N([]), r = B(-1), u = N(null), c = S(() => r.value > 0), a = S(() => r.value < s.value.length - 1);
545
545
  function d(v) {
546
546
  if (n.value === null) {
547
547
  n.value = C(v), u.value = C(v), s.value = [{ delta: null }], r.value = 0;
548
548
  return;
549
549
  }
550
- const h = t.diff(u.value, v);
551
- if (r.value < s.value.length - 1 && (s.value = s.value.slice(0, r.value + 1)), s.value.push({ delta: h }), r.value++, u.value = C(v), s.value.length > e) {
550
+ const p = t.diff(u.value, v);
551
+ if (r.value < s.value.length - 1 && (s.value = s.value.slice(0, r.value + 1)), s.value.push({ delta: p }), r.value++, u.value = C(v), s.value.length > e) {
552
552
  const b = s.value[1].delta;
553
553
  b && n.value && (n.value = t.patch(C(n.value), b)), s.value.shift(), r.value--;
554
554
  }
@@ -556,12 +556,12 @@ function bt({
556
556
  function l(v) {
557
557
  if (!n.value || v < 0 || v >= s.value.length)
558
558
  return;
559
- let h = C(n.value);
559
+ let p = C(n.value);
560
560
  for (let b = 1; b <= v; b++) {
561
561
  const M = s.value[b];
562
- M.delta && (h = t.patch(h, M.delta));
562
+ M.delta && (p = t.patch(p, M.delta));
563
563
  }
564
- return h;
564
+ return p;
565
565
  }
566
566
  function g() {
567
567
  if (c.value) {
@@ -591,7 +591,7 @@ function bt({
591
591
  }
592
592
  const Mt = {
593
593
  async updateMenuModule(e, t) {
594
- const n = B.RequestRunner.operation(t, e.modules);
594
+ const n = H.RequestRunner.operation(t, e.modules);
595
595
  if (n.validateError.length > 0)
596
596
  throw new Error(n.validateError.join(`
597
597
  `));
@@ -667,19 +667,19 @@ const $t = qe(
667
667
  function g(o, i = !0) {
668
668
  e.menu = { ...o, _rev: e.menu._rev }, i && D.push(e.menu);
669
669
  }
670
- const y = N(me()), f = H(!1), v = H(1);
671
- async function h() {
670
+ const y = N(me()), f = B(!1), v = B(1);
671
+ async function p() {
672
672
  var m;
673
673
  f.value = !0;
674
674
  let o = e.menu.modules.catalog;
675
675
  if (a.value && ((m = a.value.linkItemRules) != null && m.length)) {
676
- const p = T.populateCatalog({
676
+ const h = T.populateCatalog({
677
677
  catalog: a.value,
678
678
  ruleGroupSettings: e.menu.ruleGroupSettings,
679
679
  items: e.menu.modules.item,
680
680
  ...e.currentRestaurantAttrParams ?? {}
681
681
  });
682
- o = e.menu.modules.catalog.map((_) => _._id === (p == null ? void 0 : p._id) ? p : _);
682
+ o = e.menu.modules.catalog.map((_) => _._id === (h == null ? void 0 : h._id) ? h : _);
683
683
  }
684
684
  const i = await ce(
685
685
  {
@@ -693,26 +693,26 @@ const $t = qe(
693
693
  e.currentSchedulerId
694
694
  );
695
695
  if (e.currentSchedulerId != null) {
696
- const p = e.menu.modules.catalog.find(
696
+ const h = e.menu.modules.catalog.find(
697
697
  (R) => R._id === e.currentCatalogId
698
- ), _ = p ? p.override.scheduler[e.currentSchedulerId] : e.menu.modules.scheduler.find(
698
+ ), _ = h ? h.override.scheduler[e.currentSchedulerId] : e.menu.modules.scheduler.find(
699
699
  (R) => R._id === e.currentSchedulerId
700
700
  ), A = new Set(((_ == null ? void 0 : _.items) || []).map((R) => R._id));
701
701
  i.modules.item = i.modules.item.filter((R) => A.has(R._id));
702
702
  }
703
703
  return y.value = i, f.value = !1, v.value = v.value + 1, i;
704
704
  }
705
- const M = ae.debounce(h, 200);
706
- let I = null, E = null;
707
- function X() {
708
- E && (E(), E = null), I && I.stop(), I = He(!0), E = I.run(() => Be(
705
+ const M = ae.debounce(p, 200);
706
+ let I = null, k = null;
707
+ function Q() {
708
+ k && (k(), k = null), I && I.stop(), I = Be(!0), k = I.run(() => He(
709
709
  () => [e.menu, e.currentCatalogId, e.currentSchedulerId],
710
710
  () => {
711
711
  f.value || M();
712
712
  }
713
713
  )) || null;
714
714
  }
715
- X();
715
+ Q();
716
716
  const fe = S(() => [
717
717
  {
718
718
  label: "Main",
@@ -722,7 +722,7 @@ const $t = qe(
722
722
  label: o.name,
723
723
  value: o._id
724
724
  }))
725
- ]), Z = S(() => {
725
+ ]), X = S(() => {
726
726
  const o = y.value.modules.category;
727
727
  return [
728
728
  ...U.value.item.addon ? [
@@ -742,9 +742,9 @@ const $t = qe(
742
742
  let o = y.value.modules.item;
743
743
  if (a.value) {
744
744
  const m = (i = a.value) == null ? void 0 : i.override.items;
745
- o = o.filter((p) => {
745
+ o = o.filter((h) => {
746
746
  var A;
747
- const _ = (A = m == null ? void 0 : m[p._id]) == null ? void 0 : A.find(
747
+ const _ = (A = m == null ? void 0 : m[h._id]) == null ? void 0 : A.find(
748
748
  (R) => !R.combinationKey
749
749
  );
750
750
  return (_ == null ? void 0 : _.orderFrom) !== ie.enum.NONE;
@@ -752,15 +752,15 @@ const $t = qe(
752
752
  }
753
753
  return V(o, (m) => m.code || m.name);
754
754
  }), ye = S(() => {
755
- const o = e.menu.modules.category, i = V(o, (p) => p.name).reduce(
756
- (p, _, A) => (p[_._id] = A, p),
755
+ const o = e.menu.modules.category, i = V(o, (h) => h.name).reduce(
756
+ (h, _, A) => (h[_._id] = A, h),
757
757
  { "": 0 }
758
758
  ), m = e.menu.modules.item;
759
759
  return V(
760
760
  m,
761
- (p) => p.code || p.name
762
- ).reduce((p, _, A) => (p[_._id] = A + i[_.category || ""], p), {});
763
- }), ge = S(() => oe(j.value, Z.value, ee.value)), he = S(() => {
761
+ (h) => h.code || h.name
762
+ ).reduce((h, _, A) => (h[_._id] = A + i[_.category || ""], h), {});
763
+ }), ge = S(() => oe(j.value, X.value, ee.value)), pe = S(() => {
764
764
  const o = U.value.item.addon ? [
765
765
  {
766
766
  _id: e.currentCatalogId ? "" : null,
@@ -778,9 +778,9 @@ const $t = qe(
778
778
  const o = y.value.modules.variant;
779
779
  return x(o, { selector: "name" });
780
780
  });
781
- function pe(o = []) {
782
- const i = o.map((p) => j.value.find((_) => _._id === p)).filter((p) => !!p);
783
- return T.fullVariantCombination(i).reduce((p, _) => (p[_.combinationKey] = _.selectionName.join(" / "), p), {});
781
+ function he(o = []) {
782
+ const i = o.map((h) => j.value.find((_) => _._id === h)).filter((h) => !!h);
783
+ return T.fullVariantCombination(i).reduce((h, _) => (h[_.combinationKey] = _.selectionName.join(" / "), h), {});
784
784
  }
785
785
  const _e = S(() => V(y.value.modules.group, (o) => o.name)), Se = S(() => x(y.value.modules.takeaway, { selector: "name" })), be = S(() => x(e.menu.modules.printDepartment || [], {
786
786
  selector: "name"
@@ -792,20 +792,20 @@ const $t = qe(
792
792
  }), Ie = S(() => {
793
793
  const o = /* @__PURE__ */ new Map();
794
794
  return e.menu.modules.item.forEach((i) => {
795
- var m, p;
796
- i.code && o.set(i.code, (o.get(i.code) || 0) + 1), (p = (m = i.variant) == null ? void 0 : m.variantCombinations) == null || p.forEach((_) => {
795
+ var m, h;
796
+ i.code && o.set(i.code, (o.get(i.code) || 0) + 1), (h = (m = i.variant) == null ? void 0 : m.variantCombinations) == null || h.forEach((_) => {
797
797
  _.code && o.set(_.code, (o.get(_.code) || 0) + 1);
798
798
  });
799
799
  }), o;
800
800
  }), U = S(() => {
801
- const o = !e.currentCatalogId, i = r.value === L.F_MENU_VERSION.v4, m = !e.currentSchedulerId, p = {
801
+ const o = !e.currentCatalogId, i = r.value === L.F_MENU_VERSION.v4, m = !e.currentSchedulerId, h = {
802
802
  create: o && m,
803
803
  edit: o && m,
804
804
  delete: o && m
805
805
  };
806
806
  return {
807
807
  item: {
808
- ...p,
808
+ ...h,
809
809
  edit: i || m,
810
810
  sort: i && o && m,
811
811
  addon: i,
@@ -841,12 +841,12 @@ const $t = qe(
841
841
  takeawayConfig: i
842
842
  },
843
843
  category: {
844
- ...p,
844
+ ...h,
845
845
  sort: o,
846
846
  overrideSequence: i
847
847
  },
848
848
  group: {
849
- ...p,
849
+ ...h,
850
850
  edit: i || m,
851
851
  sort: o,
852
852
  applyProduct: o,
@@ -860,7 +860,7 @@ const $t = qe(
860
860
  override: i
861
861
  },
862
862
  takeaway: {
863
- ...p,
863
+ ...h,
864
864
  edit: (i || o) && m,
865
865
  name: o
866
866
  },
@@ -874,26 +874,26 @@ const $t = qe(
874
874
  function W(o) {
875
875
  return `${o.systemCode}/${o.taxCode}`;
876
876
  }
877
- function Ee(o) {
877
+ function ke(o) {
878
878
  const [i, m] = o.split("/");
879
879
  return { systemCode: i, taxCode: m };
880
880
  }
881
- function ke(o, i, m) {
882
- return (o ?? i ?? []).map((p) => W(p)).find((p) => m.some((_) => _.value === p));
881
+ function Ee(o, i, m) {
882
+ return (o ?? i ?? []).map((h) => W(h)).find((h) => m.some((_) => _.value === h));
883
883
  }
884
884
  const Re = S(() => {
885
- var p;
885
+ var h;
886
886
  const o = ["SV5", "SV10"], i = Ye.Country.getCountryFlattenTaxes(
887
887
  se().currentCountry.value
888
888
  ), m = i.filter((_) => u.value || !o.includes(_.taxCode)).map((_) => ({
889
- label: `${_.name} (${Qe(_.rate)}%)`,
889
+ label: `${_.name} (${Ze(_.rate)}%)`,
890
890
  value: W(_),
891
891
  meta: {
892
892
  rate: _.rate
893
893
  }
894
894
  }));
895
895
  return m.sort((_, A) => _.label.localeCompare(A.label, void 0, { numeric: !0 })), {
896
- systemCode: (p = i[0]) == null ? void 0 : p.systemCode,
896
+ systemCode: (h = i[0]) == null ? void 0 : h.systemCode,
897
897
  countryTaxOptions: m
898
898
  };
899
899
  }), xe = async () => {
@@ -904,7 +904,7 @@ const $t = qe(
904
904
  e.restaurants = [];
905
905
  return;
906
906
  }
907
- const { fetchAllRestaurants: o } = Ze();
907
+ const { fetchAllRestaurants: o } = Xe();
908
908
  await o({
909
909
  onBatchEnd: (i) => {
910
910
  e.restaurants = i;
@@ -921,19 +921,19 @@ const $t = qe(
921
921
  }, Ke = async (o, i) => {
922
922
  const m = Array.isArray(o) ? o : [o];
923
923
  if (!m.length) return;
924
- const p = m.map((_) => ({
924
+ const h = m.map((_) => ({
925
925
  ..._,
926
926
  _id: e.menu._id,
927
927
  _rev: e.menu._rev
928
928
  }));
929
929
  try {
930
- if (i || p.some(
931
- (A) => [B.F_OPERATION_TYPE.delete, B.F_OPERATION_TYPE.deleteMany].includes(A.operation)
930
+ if (i || h.some(
931
+ (A) => [H.F_OPERATION_TYPE.delete, H.F_OPERATION_TYPE.deleteMany].includes(A.operation)
932
932
  )) {
933
- const A = await Xe(p, e.menu.modules);
933
+ const A = await Qe(h, e.menu.modules);
934
934
  if (A !== !0) throw new Error(A);
935
935
  }
936
- const _ = await Mt.updateMenuModule(e.menu, p);
936
+ const _ = await Mt.updateMenuModule(e.menu, h);
937
937
  return g(_.menu), _;
938
938
  } catch (_) {
939
939
  n.open({
@@ -975,13 +975,13 @@ const $t = qe(
975
975
  schedulers: d,
976
976
  currentScheduler: l,
977
977
  catalogOptions: fe,
978
- categories: Z,
978
+ categories: X,
979
979
  subcategories: ve,
980
980
  items: ee,
981
981
  sortedItems: ye,
982
982
  itemCodeMap: Ie,
983
983
  categorizedItems: ge,
984
- categorizedRawMenuItems: he,
984
+ categorizedRawMenuItems: pe,
985
985
  variants: j,
986
986
  groups: _e,
987
987
  takeaways: Se,
@@ -1002,12 +1002,12 @@ const $t = qe(
1002
1002
  setRestaurantAttrParams: Te,
1003
1003
  updateMenu: Ke,
1004
1004
  updateMenuSetting: Pe,
1005
- computeMergedMenu: h,
1005
+ computeMergedMenu: p,
1006
1006
  // helper
1007
1007
  encodeTax: W,
1008
- decodeTax: Ee,
1009
- getSelectedTax: ke,
1010
- mapVariant: pe,
1008
+ decodeTax: ke,
1009
+ getSelectedTax: Ee,
1010
+ mapVariant: he,
1011
1011
  // history
1012
1012
  canUndoHistory: $e,
1013
1013
  canRedoHistory: Fe,
@@ -1015,10 +1015,10 @@ const $t = qe(
1015
1015
  redoHistory: je,
1016
1016
  // cleanup
1017
1017
  $dispose: () => {
1018
- M.cancel(), E && (E(), E = null), I && (I.stop(), I = null), Ue();
1018
+ M.cancel(), k && (k(), k = null), I && (I.stop(), I = null), Ue();
1019
1019
  },
1020
1020
  $reinitialize: () => {
1021
- X();
1021
+ Q();
1022
1022
  }
1023
1023
  };
1024
1024
  }
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as q, ref as V, h as S, computed as N, resolveComponent as I, createBlock as X, openBlock as w, unref as l, withCtx as x, createElementVNode as k, createVNode as v, watch as Z, createElementBlock as L, Fragment as M, renderSlot as ee, renderList as H, toDisplayString as $, createCommentVNode as ae, getCurrentInstance as te, render as ne } from "vue";
2
- import { u as Y, i as oe, b as le, g as B, h as K } from "./index.vue_vue_type_script_setup_true_lang-DybNA4Np.js";
2
+ import { u as Y, i as oe, b as le, g as B, h as K } from "./index.vue_vue_type_script_setup_true_lang-BRtju05_.js";
3
3
  import { useI18n as R } from "@feedmepos/mf-common";
4
4
  import { components as A, FmButtonVariant as re, FmButtonColorThemeVariant as j, useSnackbar as ie } from "@feedmepos/ui-library";
5
- import { _ as J, u as se } from "./RuleView.vue_vue_type_script_setup_true_lang-CODY5qdL.js";
5
+ import { _ as J, u as se } from "./RuleView.vue_vue_type_script_setup_true_lang-DxpvosGG.js";
6
6
  import { c as de } from "./object-DVUNCr7w.js";
7
- import { _ as ue } from "./app-BN0HgwNB.js";
8
- import { L as ce } from "./LinkProductSideSheet-BkNMJOiZ.js";
7
+ import { _ as ue } from "./app-Da1XriaA.js";
8
+ import { L as ce } from "./LinkProductSideSheet-C6R0KLzF.js";
9
9
  import { u as me } from "./search-BAPEUu1R.js";
10
- import { _ as pe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-DesC2w1k.js";
10
+ import { _ as pe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-Cixm7NMC.js";
11
11
  import { c as ge } from "./check-C9mY6LiX.js";
12
12
  import { g as G } from "./translation-fNx6yEpy.js";
13
13
  import { c as _e } from "./createComponentProgrammatically-Bt2rn1IQ.js";
@@ -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, b as M } from "./index.vue_vue_type_script_setup_true_lang-DybNA4Np.js";
4
+ import { u as k, b as M } from "./index.vue_vue_type_script_setup_true_lang-BRtju05_.js";
5
5
  const b = /* @__PURE__ */ d({
6
6
  __name: "AddPriceGroupDialog",
7
7
  setup(s) {
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as I, watch as P, ref as E, computed as w, resolveComponent as _, createElementBlock as h, openBlock as F, Fragment as M, createVNode as f, unref as g, withCtx as b, createElementVNode as O, renderList as q, toDisplayString as S } from "vue";
2
- import { g as v, h as C, u as Y } from "./index.vue_vue_type_script_setup_true_lang-DybNA4Np.js";
2
+ import { g as v, h as C, u as Y } from "./index.vue_vue_type_script_setup_true_lang-BRtju05_.js";
3
3
  import { useI18n as D } from "@feedmepos/mf-common";
4
4
  import { useDialogChild as k } from "@feedmepos/ui-library";
5
- import { u as R } from "./menuV2-B9-ODrLW.js";
6
- import { _ as $ } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-DesC2w1k.js";
5
+ import { u as R } from "./menuV2-BxVmtfZ3.js";
6
+ import { _ as $ } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-Cixm7NMC.js";
7
7
  import { g as N } from "./translation-fNx6yEpy.js";
8
8
  const B = { class: "py-12 px-16 space-y-4" }, U = /* @__PURE__ */ I({
9
9
  __name: "AddSubcategoryDialogContentComponent",
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as re, computed as N, resolveComponent as v, createElementBlock as d, openBlock as u, createVNode as t, createCommentVNode as V, unref as n, toDisplayString as O, createElementVNode as _, withCtx as p, Fragment as R, renderList as I, createBlock as q, ref as B, Transition as de, createTextVNode as fe } from "vue";
2
- import { u as ye, l as _e } from "./discardConfirm-zfX1nuye.js";
3
- import { d as w, z as $, u as he, F as ge, A as L, g as se, h as ie, P as ce } from "./index.vue_vue_type_script_setup_true_lang-DybNA4Np.js";
2
+ import { u as ye, l as _e } from "./discardConfirm-C65bh13g.js";
3
+ import { d as w, z as $, u as he, F as ge, A as L, g as se, h as ie, P as ce } from "./index.vue_vue_type_script_setup_true_lang-BRtju05_.js";
4
4
  import { useI18n as me } from "@feedmepos/mf-common";
5
5
  import { components as Ve } from "@feedmepos/ui-library";
6
6
  import { _ as ke } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
7
- import { _ as ue } from "./RuleView.vue_vue_type_script_setup_true_lang-CODY5qdL.js";
8
- import { u as Fe } from "./menu-BupVgTY-.js";
9
- import { L as be } from "./LinkProductSideSheet-BkNMJOiZ.js";
7
+ import { _ as ue } from "./RuleView.vue_vue_type_script_setup_true_lang-DxpvosGG.js";
8
+ import { u as Fe } from "./menu-C4c62Xvw.js";
9
+ import { L as be } from "./LinkProductSideSheet-C6R0KLzF.js";
10
10
  const xe = { class: "space-y-8" }, Ce = {
11
11
  key: 0,
12
12
  class: "space-y-16"
@@ -1,5 +1,5 @@
1
- import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-NAKJ0sFP.js";
2
- import "./discardConfirm-zfX1nuye.js";
1
+ import { u as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-DMzqbxts.js";
2
+ import "./discardConfirm-C65bh13g.js";
3
3
  var Z = {
4
4
  defaultAmount: 0,
5
5
  defaultCurrency: "USD",
@@ -1,12 +1,12 @@
1
1
  import { defineStore as H } from "pinia";
2
2
  import { defineComponent as M, computed as x, ref as A, watch as S, resolveComponent as V, createBlock as J, openBlock as F, withCtx as w, createVNode as m, createElementVNode as f, normalizeClass as Q, createElementBlock as C, toDisplayString as k, unref as l, Fragment as N, renderSlot as X, renderList as Z, getCurrentInstance as ee } from "vue";
3
- import { D as O, E as te, B as P, d as E, i as $, b as j, m as h, C as ne, g as T, h as D, u as oe } from "./index.vue_vue_type_script_setup_true_lang-DybNA4Np.js";
3
+ import { D as O, E as te, B as P, d as E, i as $, b as j, m as h, C as ne, g as T, h as D, u as oe } from "./index.vue_vue_type_script_setup_true_lang-BRtju05_.js";
4
4
  import { useI18n as q } from "@feedmepos/mf-common";
5
5
  import { useSnackbar as I, components as ae, useDialog as le, FmButtonVariant as ue } from "@feedmepos/ui-library";
6
- import { u as ie, l as se } from "./discardConfirm-zfX1nuye.js";
6
+ import { u as ie, l as se } from "./discardConfirm-C65bh13g.js";
7
7
  import { c as re } from "./check-C9mY6LiX.js";
8
8
  import "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
9
- import "./menuV2-B9-ODrLW.js";
9
+ import "./menuV2-BxVmtfZ3.js";
10
10
  import "./app-5fxKLAzS.js";
11
11
  /* empty css */
12
12
  import { c as me } from "./createComponentProgrammatically-Bt2rn1IQ.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-menu",
3
- "version": "0.32.66-dev.4",
3
+ "version": "0.32.66",
4
4
  "files": [
5
5
  "dist"
6
6
  ],