@feedmepos/mf-menu 0.31.13-beta.2 → 0.31.13-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-CnIFv9W-.js → App-DzwIYXCC.js} +6 -6
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BzYz2Gld.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DwjRVBt4.js} +2 -2
  3. package/dist/{Catalog-DE4eTgT7.js → Catalog-BvavQk6R.js} +5 -5
  4. package/dist/{Category-AvC4-3ow.js → Category-CKOPnQAc.js} +5 -5
  5. package/dist/{Category-CtGfDmB1.js → Category-Cj02s0bD.js} +4 -4
  6. package/dist/{CookingGuide-DbYxrWXO.js → CookingGuide-CyEginT_.js} +3 -3
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-C5fTudO_.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-BpFu-GUR.js} +1 -1
  8. package/dist/{Group-CGmbKnWG.js → Group-YFFFxGCq.js} +1 -1
  9. package/dist/{Group-BJuc2oO3.js → Group-plIUz6mQ.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-DlCAHcie.js → Group.vue_vue_type_script_setup_true_lang-BHYcr3kC.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Dod14rLl.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DzF0Sycs.js} +3 -3
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CpusE5If.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DlY_fspL.js} +1459 -1459
  13. package/dist/{Ingredient-Bg9fZInZ.js → Ingredient-C_RIAZ8k.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-C16mX0sk.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CLSojPHv.js} +2 -2
  15. package/dist/{LinkProductSideSheet-Bo4Qht-K.js → LinkProductSideSheet-B5GODfkw.js} +1 -1
  16. package/dist/{MenuSetting-DMdRwPBS.js → MenuSetting-FywYOgmI.js} +4 -4
  17. package/dist/{PrintRoute-DKLo4dGh.js → PrintRoute-BO3-UkwS.js} +3 -3
  18. package/dist/{Product-C94ERV0k.js → Product-BrlvooGG.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-C8NyhVy0.js → Product.vue_vue_type_script_setup_true_lang-BNA1nx-k.js} +11 -11
  20. package/dist/{Products-C7aqiTI_.js → Products-BPwLcwaE.js} +521 -521
  21. package/dist/{Publish-Hx9iQgBb.js → Publish-CqP2L3H8.js} +3 -3
  22. package/dist/{Recipe-BzUaIWeY.js → Recipe-DO4yCnFG.js} +4 -4
  23. package/dist/{Scheduler-CWi0GT2z.js → Scheduler-CkFIeXN3.js} +3 -3
  24. package/dist/{ServingSequence-bjRRWsf0.js → ServingSequence-B_-BOp8C.js} +3 -3
  25. package/dist/{Setting-DsC_r9LQ.js → Setting-CY1-d04h.js} +4 -4
  26. package/dist/{Subcategory-S4fAHIu9.js → Subcategory-H3rxT2CG.js} +4 -4
  27. package/dist/{Takeaway-DnmBmhS0.js → Takeaway-BJVacqXp.js} +1 -1
  28. package/dist/{Takeaway-Bxuh6fBm.js → Takeaway-C6Z2ScCk.js} +4 -4
  29. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-GQMYFutp.js → Takeaway.vue_vue_type_script_setup_true_lang-vky_OjQ5.js} +5 -5
  30. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B3M8vApZ.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BEsR-cqN.js} +13 -13
  31. package/dist/{Unit-7AeLpgHP.js → Unit-CT9vH-Li.js} +2 -2
  32. package/dist/{Variant-yBI_Av9k.js → Variant-DYxv7P2H.js} +3 -3
  33. package/dist/{_id_-DOlk8PB3.js → _id_-Dl-tTOCU.js} +9 -9
  34. package/dist/{app-CR9yeXNw.js → app-D349wgRv.js} +23 -23
  35. package/dist/{app-C61GeIIX.js → app-DXaQ2A8_.js} +1 -1
  36. package/dist/app.js +1 -1
  37. package/dist/assets/{linked-status-VN_s-Aqg.js → linked-status-DV0r63qX.js} +2 -2
  38. package/dist/assets/{override-menu-CATU9l9K.js → override-menu-B1Il9Mtm.js} +2 -2
  39. package/dist/assets/{validate-menu-ORBT0TT3.js → validate-menu-u8H0BvHJ.js} +2 -2
  40. package/dist/{catalog-Dh9BxkEc.js → catalog-Co0S8ONG.js} +1 -1
  41. package/dist/{catalogSetting-Bg10aFfA.js → catalogSetting-BpL871DP.js} +1 -1
  42. package/dist/{category-BsDDtaai.js → category-pMoaKhVM.js} +1 -1
  43. package/dist/{currency-BQGq995C.js → currency-CbR9kSDS.js} +1 -1
  44. package/dist/{dayjs.min-DU-TDKq_.js → dayjs.min-Revise9-.js} +1 -1
  45. package/dist/{index-CgjVfaAg.js → index-CcgWvTsC.js} +1 -1
  46. package/dist/{index-DWxknPN-.js → index-CiBy1MJE.js} +3 -3
  47. package/dist/{index-DOqbJuea.js → index-wErO3lhN.js} +2 -2
  48. package/dist/{item-BJvS_Vse.js → item-BZ-coUuR.js} +932 -932
  49. package/dist/{menu-BYRt1yan.js → menu-BhmpEsRJ.js} +7 -7
  50. package/dist/{menu-BlUt3siN.js → menu-DHMpoZLf.js} +1 -1
  51. package/dist/{priceTier-BbY78xPj.js → priceTier-DMoWzxYK.js} +1 -1
  52. package/dist/{scheduler-1uazbBbo.js → scheduler-D7gjxSfM.js} +3 -3
  53. package/dist/{subcategory-BSLtallh.js → subcategory-R7C4OaTS.js} +39 -39
  54. package/dist/{toExcel-sl3iROJJ.js → toExcel-DiGrUwFp.js} +2 -2
  55. package/dist/{unit-DBTz28Pz.js → unit-B_lUkXXv.js} +1 -1
  56. package/package.json +1 -1
@@ -1,16 +1,16 @@
1
- import { shallowRef as Z, ref as R, computed as h, shallowReactive as Te, effectScope as Re, watch as H, defineComponent as Ve, resolveComponent as B, createBlock as Ne, openBlock as Oe, unref as N, withCtx as Pe, createVNode as Ae } from "vue";
2
- import { J as k, A as O, aj as ee, I, ak as G, M as S, K as te, a9 as C, c as $, $ as E, ai as L, al as xe, am as Ke, z as Ue, ab as $e, an as De, a8 as J, u as qe } from "./menu-BYRt1yan.js";
3
- import { useCoreStore as Q, useI18n as ne } from "@feedmepos/mf-common";
1
+ import { shallowRef as Z, ref as R, computed as h, shallowReactive as Te, effectScope as Re, watch as H, defineComponent as Ve, resolveComponent as z, createBlock as Ne, openBlock as Oe, unref as N, withCtx as Pe, createVNode as xe } from "vue";
2
+ import { J as k, A as O, aj as ee, I, ak as G, M as S, K as te, a9 as C, c as D, $ as E, ai as L, al as Ae, am as Ke, z as Ue, ab as De, an as $e, a8 as J, u as qe } from "./menu-BhmpEsRJ.js";
3
+ import { useCoreStore as X, useI18n as ne } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as He, useDialogChild as Ye } from "@feedmepos/ui-library";
5
5
  import { defineStore as We } from "pinia";
6
- const je = "/assets/linked-status-VN_s-Aqg.js", ze = "/assets/override-menu-CATU9l9K.js";
7
- function Be(e) {
6
+ const je = "/assets/linked-status-DV0r63qX.js", Be = "/assets/override-menu-B1Il9Mtm.js";
7
+ function ze(e) {
8
8
  var o;
9
9
  const n = k(e), a = (o = n.variant) == null ? void 0 : o.variantCombinations;
10
10
  return delete n.variant, delete n.thumbnail, [n, ...a || []];
11
11
  }
12
12
  function Ge(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), _), {});
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] = ze(y), _), {});
14
14
  function p(_ = []) {
15
15
  const y = e.map((b) => b._id);
16
16
  return [
@@ -180,11 +180,11 @@ function dt(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 mt(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 ee(
189
189
  je,
190
190
  JSON.stringify({
@@ -192,10 +192,10 @@ async function mt(e, n) {
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 oe(e, n, a) {
198
- return await ee(ze, {
198
+ return await ee(Be, {
199
199
  menu: e,
200
200
  catalogId: n,
201
201
  schedulerId: a
@@ -232,7 +232,7 @@ function pt(e, n, a) {
232
232
  return r(n, a);
233
233
  }
234
234
  const q = /* @__PURE__ */ new Map();
235
- async function Qe(e, n, a) {
235
+ async function Xe(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 Qe(e, n, a) {
241
241
  }
242
242
  async function _t(e, n, a) {
243
243
  var d, i;
244
- const o = await Qe(e, n, null), r = [], f = (m, u) => {
244
+ const o = await Xe(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]);
@@ -253,7 +253,7 @@ async function _t(e, n, a) {
253
253
  const p = (i = m.items) == null ? void 0 : i.filter((y) => y._id === a && y.combinationKey), _ = [u, ...p].map((y) => {
254
254
  var V, P;
255
255
  const b = y.combinationKey ? (P = (V = s == null ? void 0 : s.variant) == null ? void 0 : V.variantCombinations) == null ? void 0 : P.find(
256
- (A) => A.combinationKey === y.combinationKey
256
+ (x) => x.combinationKey === y.combinationKey
257
257
  ) : s, F = b && s ? f(s, b) : y;
258
258
  return f(F, y);
259
259
  });
@@ -265,7 +265,7 @@ async function _t(e, n, a) {
265
265
  }
266
266
  return r;
267
267
  }
268
- function Xe({
268
+ function Qe({
269
269
  maxHistorySize: e = 50
270
270
  }) {
271
271
  const n = Z([]), a = R(-1), o = h(() => a.value > 0), r = h(() => a.value < n.value.length - 1);
@@ -341,12 +341,12 @@ function et() {
341
341
  const tt = We(
342
342
  "mf-menu-store-v2",
343
343
  () => {
344
- const e = Te(et()), n = Q(), a = He(), o = h(() => e.menu.modules.serveSequence ? C(e.menu.modules.serveSequence, {
344
+ const e = Te(et()), n = X(), a = He(), 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(
@@ -382,7 +382,7 @@ const tt = We(
382
382
  }
383
383
  );
384
384
  });
385
- const A = h(() => [
385
+ const x = h(() => [
386
386
  {
387
387
  label: "Main",
388
388
  value: null
@@ -429,7 +429,7 @@ const tt = We(
429
429
  c,
430
430
  (g) => g.code || g.name
431
431
  ).reduce((g, v, M) => (g[v._id] = M + l[v.category || ""], g), {});
432
- }), ue = h(() => L(x.value, W.value, j.value)), ie = h(() => {
432
+ }), ue = h(() => L(A.value, W.value, j.value)), ie = h(() => {
433
433
  const t = K.value.item.addon ? [
434
434
  {
435
435
  _id: e.currentCatalogId ? "" : null,
@@ -443,23 +443,23 @@ const tt = We(
443
443
  t,
444
444
  e.menu.modules.item
445
445
  );
446
- }), x = h(() => {
446
+ }), A = h(() => {
447
447
  const t = p.value.modules.variant;
448
448
  return C(t, { selector: "name" });
449
449
  });
450
450
  function ce(t = []) {
451
- const l = t.map((g) => x.value.find((v) => v._id === g)).filter((g) => !!g);
451
+ const l = t.map((g) => A.value.find((v) => v._id === g)).filter((g) => !!g);
452
452
  return O.fullVariantCombination(l).reduce((g, v) => (g[v.combinationKey] = v.selectionName.join(" / "), g), {});
453
453
  }
454
454
  const le = h(() => E(p.value.modules.group, (t) => t.name)), de = h(() => C(p.value.modules.takeaway, { selector: "name" })), me = h(() => C(e.menu.modules.printDepartment || [], {
455
455
  selector: "name"
456
- })), fe = h(() => C(e.menu.modules.unit, { selector: "name" })), pe = h(() => C(xe(e.menu.modules.recipe, e.menu.modules.sku), {
456
+ })), fe = h(() => C(e.menu.modules.unit, { selector: "name" })), pe = h(() => C(Ae(e.menu.modules.recipe, e.menu.modules.sku), {
457
457
  selector: "name"
458
458
  })), _e = h(() => e.menu.modules.cookingGuide), ge = h(() => {
459
459
  const t = Ke(e.menu.modules.sku);
460
460
  return C(t, { selector: "code" });
461
461
  }), K = h(() => {
462
- const t = !e.currentCatalogId, l = r.value === $.F_MENU_VERSION.v4, c = !e.currentSchedulerId, g = {
462
+ const t = !e.currentCatalogId, l = r.value === D.F_MENU_VERSION.v4, c = !e.currentSchedulerId, g = {
463
463
  create: t && c,
464
464
  edit: t && c,
465
465
  delete: t && c
@@ -540,12 +540,12 @@ const tt = We(
540
540
  const he = h(() => {
541
541
  var l;
542
542
  const t = Ue.Country.getCountryFlattenTaxes(
543
- Q().currentCountry.value
543
+ X().currentCountry.value
544
544
  );
545
545
  return {
546
546
  systemCode: (l = t[0]) == null ? void 0 : l.systemCode,
547
547
  countryTaxOptions: t.map((c) => ({
548
- label: `${c.name} (${$e(c.rate)}%)`,
548
+ label: `${c.name} (${De(c.rate)}%)`,
549
549
  value: U(c),
550
550
  meta: {
551
551
  rate: c.rate
@@ -554,11 +554,11 @@ const tt = We(
554
554
  };
555
555
  }), be = async () => {
556
556
  const t = await J.readMenu();
557
- e.menu = t ?? e.menu, z(null);
557
+ e.menu = t ?? e.menu, B(null);
558
558
  }, Me = async () => {
559
559
  const t = await J.readRestaurantsWithMenu();
560
560
  e.restaurants = C(t, { selector: "name" });
561
- }, z = (t) => {
561
+ }, B = (t) => {
562
562
  e.currentCatalogId = t;
563
563
  }, Ce = (t) => {
564
564
  e.currentSchedulerId = t;
@@ -576,7 +576,7 @@ const tt = We(
576
576
  if (l || g.some(
577
577
  (M) => [S.F_OPERATION_TYPE.delete, S.F_OPERATION_TYPE.deleteMany].includes(M.operation)
578
578
  )) {
579
- const M = await De(g, e.menu.modules);
579
+ const M = await $e(g, e.menu.modules);
580
580
  if (M !== !0) throw new Error(M);
581
581
  }
582
582
  const v = await Ze.updateMenuModule(e.menu, g);
@@ -596,7 +596,7 @@ const tt = We(
596
596
  priceTierSettings: t.priceTierSettings
597
597
  };
598
598
  return s(l), l;
599
- }, w = Xe({ maxHistorySize: 50 }), Ie = h(() => w.canUndo.value), ke = h(() => w.canRedo.value);
599
+ }, w = Qe({ maxHistorySize: 50 }), Ie = h(() => w.canUndo.value), ke = h(() => w.canRedo.value);
600
600
  return {
601
601
  state: e,
602
602
  // loading state
@@ -612,14 +612,14 @@ const tt = We(
612
612
  currentCatalog: i,
613
613
  schedulers: m,
614
614
  currentScheduler: u,
615
- catalogOptions: A,
615
+ catalogOptions: x,
616
616
  categories: W,
617
617
  subcategories: ae,
618
618
  items: j,
619
619
  sortedItems: se,
620
620
  categorizedItems: ue,
621
621
  categorizedRawMenuItems: ie,
622
- variants: x,
622
+ variants: A,
623
623
  groups: le,
624
624
  takeaways: de,
625
625
  printDepartments: me,
@@ -633,7 +633,7 @@ const tt = We(
633
633
  setMenu: s,
634
634
  readMenu: be,
635
635
  readRestaurants: Me,
636
- selectCatalog: z,
636
+ selectCatalog: B,
637
637
  selectScheduler: Ce,
638
638
  selectCategory: Se,
639
639
  updateMenu: we,
@@ -660,7 +660,7 @@ const tt = We(
660
660
  }
661
661
  };
662
662
  }
663
- ), X = /* @__PURE__ */ Ve({
663
+ ), Q = /* @__PURE__ */ Ve({
664
664
  __name: "AddSubcategoryDialogContentComponent",
665
665
  props: {
666
666
  initialValue: {}
@@ -683,12 +683,12 @@ const tt = We(
683
683
  immediate: !0
684
684
  }
685
685
  ), (d, i) => {
686
- const m = B("fm-text-field"), u = B("FmForm");
686
+ const m = z("fm-text-field"), u = z("FmForm");
687
687
  return Oe(), Ne(u, {
688
688
  onValidationSuccess: i[1] || (i[1] = (s) => N(f)("primary"))
689
689
  }, {
690
690
  default: Pe(() => [
691
- Ae(m, {
691
+ xe(m, {
692
692
  modelValue: o.value,
693
693
  "onUpdate:modelValue": i[0] || (i[0] = (s) => o.value = s),
694
694
  rules: [(s) => !!s || N(a)("menu.subcategory.dialog.add.name.required")],
@@ -711,7 +711,7 @@ const tt = We(
711
711
  const u = R(!1);
712
712
  e.open({
713
713
  title: o("menu.subcategory.manager.dialog.add.title"),
714
- contentComponent: X,
714
+ contentComponent: Q,
715
715
  primaryActions: {
716
716
  text: o("menu.subcategory.manager.dialog.add.action"),
717
717
  close: !1,
@@ -742,7 +742,7 @@ const tt = We(
742
742
  function d(u) {
743
743
  e.open({
744
744
  title: o("menu.subcategory.manager.dialog.update.title"),
745
- contentComponent: X,
745
+ contentComponent: Q,
746
746
  contentComponentProps: {
747
747
  initialValue: u.name
748
748
  },
@@ -808,6 +808,6 @@ export {
808
808
  _t as f,
809
809
  dt as g,
810
810
  lt as m,
811
- Qe as o,
811
+ Xe as o,
812
812
  tt as u
813
813
  };
@@ -1,5 +1,5 @@
1
- import { c as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-CpusE5If.js";
2
- import "./menu-BYRt1yan.js";
1
+ import { c as C } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-DlY_fspL.js";
2
+ import "./menu-BhmpEsRJ.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-BYRt1yan.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-BhmpEsRJ.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.13-beta.2",
3
+ "version": "0.31.13-prod",
4
4
  "files": [
5
5
  "dist"
6
6
  ],