@feedmepos/mf-menu 0.31.30-beta.1 → 0.31.31-beta.1

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 (62) hide show
  1. package/dist/{App-CrQBq4gc.js → App-1TX8v7ZA.js} +10 -8
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-D00UOSsK.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CR7QrFUG.js} +12 -12
  3. package/dist/{Catalog-D4m8x_f2.js → Catalog-DWClc58s.js} +75 -74
  4. package/dist/{Category-sQll5ITQ.js → Category-BqKFvFam.js} +60 -60
  5. package/dist/{Category-Ql1kDDH-.js → Category-IYMtMoT-.js} +28 -28
  6. package/dist/{CookingGuide-CSutufcu.js → CookingGuide-BayJ6zj4.js} +103 -101
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BqhYFXNG.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Ceq86b3d.js} +1 -1
  8. package/dist/{Group-CnBE6CiB.js → Group-LqSX7ue6.js} +1 -1
  9. package/dist/{Group-YqVh5hC0.js → Group-RujTPTns.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-D9TSH4sS.js → Group.vue_vue_type_script_setup_true_lang-Dj9ZmkYe.js} +138 -137
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CqriuXVC.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D5GWkh3G.js} +16 -16
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CaIU0RsG.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C4IrA3es.js} +4616 -4610
  13. package/dist/{Ingredient-MhLxJzAU.js → Ingredient-_tc8llr1.js} +65 -64
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CIbExsMI.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DLFDf-VZ.js} +14 -12
  15. package/dist/{LinkProductSideSheet-D7vYZbFy.js → LinkProductSideSheet-C6rF-G1v.js} +14 -12
  16. package/dist/{MenuSetting-n0me5wY8.js → MenuSetting-xDHeeROY.js} +27 -26
  17. package/dist/{PrintRoute-CudZZYbe.js → PrintRoute-B_TFMn5e.js} +17 -15
  18. package/dist/{Product-DPZQgWET.js → Product-DdEEqrtc.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-CdaeZy_o.js → Product.vue_vue_type_script_setup_true_lang-zcistmwh.js} +257 -256
  20. package/dist/{ProductInternalTools-DgANHliV.js → ProductInternalTools-BcC7BF6W.js} +45 -45
  21. package/dist/{Products-Ez4R3jKW.js → Products-Cu0cJshV.js} +74 -72
  22. package/dist/{Publish-B4DEPe1I.js → Publish-Bm3Xiks1.js} +34 -32
  23. package/dist/{Recipe-Cripr-gY.js → Recipe-DWK-luIZ.js} +65 -63
  24. package/dist/{Scheduler-C-OV9d7d.js → Scheduler-Cb1TeBhW.js} +19 -19
  25. package/dist/{ServingSequence-DAumDXP1.js → ServingSequence-evSIET_8.js} +34 -34
  26. package/dist/{Setting-ByaHpIAN.js → Setting-Cn3kwC9F.js} +54 -53
  27. package/dist/{Subcategory-ro2aGt2H.js → Subcategory-q4m4qHsU.js} +34 -34
  28. package/dist/{Takeaway-CJb0ayDC.js → Takeaway-ClepHYGu.js} +14 -14
  29. package/dist/{Takeaway-AEg_0gKg.js → Takeaway-D-rdUZuh.js} +1 -1
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Cjj4bxoL.js → Takeaway.vue_vue_type_script_setup_true_lang-y9Yxstu2.js} +41 -40
  31. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Drf4n4rj.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BSeLfoOA.js} +1108 -1106
  32. package/dist/{Unit-1wzUBplb.js → Unit-IM8Naj82.js} +12 -12
  33. package/dist/{Variant-Dnz2v5u0.js → Variant-fzGvwaMo.js} +16 -16
  34. package/dist/{_id_-C3rBZ6zL.js → _id_-BsKNG9Qv.js} +22 -22
  35. package/dist/{app-sDPxNF11.js → app-BzQRUMTK.js} +3 -3
  36. package/dist/{app-CLY6CoaV.js → app-CoVUUCa_.js} +24 -24
  37. package/dist/app.js +1 -1
  38. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  39. package/dist/assets/{linked-status-BZ4FSJ_Z.js → linked-status-eQqjvOq_.js} +2 -2
  40. package/dist/assets/{override-menu-C-fWJdVd.js → override-menu-C8NTBJgN.js} +2 -2
  41. package/dist/assets/{validate-menu-BDEM_Odz.js → validate-menu-Dn-OO7Ed.js} +2 -2
  42. package/dist/{catalog-bkFntZNz.js → catalog-CaXceaA2.js} +1 -1
  43. package/dist/{catalogSetting-zrKwGJ_C.js → catalogSetting-BGvckFdh.js} +1 -1
  44. package/dist/{category-BuPYaEsy.js → category-u5eo_Vjd.js} +5 -3
  45. package/dist/currency-BPHwez-E.js +7 -0
  46. package/dist/{dayjs.min-CR2NIyKn.js → dayjs.min-Bsr3tJCn.js} +1 -1
  47. package/dist/{index-BNORpjos.js → index-Bbx4iZ6n.js} +27 -27
  48. package/dist/{index-Dp_vLFQp.js → index-DSAG0yWh.js} +22 -20
  49. package/dist/{index-D20u0bCl.js → index-tRQb7RN_.js} +1 -1
  50. package/dist/{item-D4DcBt7N.js → item-BAqzKh4O.js} +801 -799
  51. package/dist/{jszip.min-CRJ61J9H.js → jszip.min-BKJtvCjM.js} +353 -353
  52. package/dist/{menu-Dw-Hpy07.js → menu-CDrsBjmr.js} +11 -9
  53. package/dist/menu-CsIzrBEr.js +74044 -0
  54. package/dist/packages/shared/src/permission/posPermission.d.ts +6 -0
  55. package/dist/{priceTier-EDLTGEjz.js → priceTier-DfbHonGe.js} +4 -4
  56. package/dist/{scheduler-CpPn2BlK.js → scheduler-DTWaBudB.js} +13 -11
  57. package/dist/{subcategory-B_W6vbM8.js → subcategory-D-R5r1Tr.js} +86 -84
  58. package/dist/{toExcel-D02OlDJu.js → toExcel-84VTtSA7.js} +2 -2
  59. package/dist/{unit-fro9wz1K.js → unit-B4zscxzo.js} +24 -23
  60. package/package.json +1 -1
  61. package/dist/currency-BISImIgX.js +0 -7
  62. package/dist/menu-ibc-yXVt.js +0 -107745
@@ -1,49 +1,50 @@
1
- import { defineComponent as H, computed as f, resolveComponent as F, createBlock as U, openBlock as m, withCtx as C, createElementBlock as w, Fragment as T, renderList as ee, createElementVNode as p, normalizeClass as W, toDisplayString as M, createVNode as i, ref as S, renderSlot as Se, unref as u, createCommentVNode as I, watch as Ee, h as pe, mergeProps as Re, createSlots as Ie, withModifiers as Ue, isRef as de, nextTick as ve } from "vue";
2
- import { I as Q, u as te, O as Te, D as $e, G as g, B as Ye, A as Le, J as ze } from "./menu-ibc-yXVt.js";
3
- import { d as je } from "./vuedraggable-CK8z7qA8.js";
4
- import { _ as Be, h as fe, a as Ke, b as Qe } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-BqhYFXNG.js";
1
+ import { defineComponent as W, computed as f, resolveComponent as F, createBlock as I, openBlock as m, withCtx as O, createElementBlock as w, Fragment as T, renderList as ee, createElementVNode as p, normalizeClass as H, toDisplayString as M, createVNode as i, ref as S, renderSlot as Se, unref as u, createCommentVNode as U, watch as Ee, h as pe, mergeProps as Re, createSlots as Ue, withModifiers as Ie, isRef as de, nextTick as ve } from "vue";
2
+ import { G as Q, u as te, M as Te, A as $e, B as g, z as Ye, H as Le } from "./menu-CsIzrBEr.js";
3
+ import { d as ze } from "./vuedraggable-CK8z7qA8.js";
4
+ import { Dinero as je } from "@feedmepos/core";
5
+ import { _ as Be, h as fe, a as Ke, b as Qe } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-Ceq86b3d.js";
5
6
  import { useI18n as oe, useCoreStore as qe } from "@feedmepos/mf-common";
6
- import { useBreakpoints as ye, components as _e, useSnackbar as We, useDialog as He, FmButtonVariant as Je } from "@feedmepos/ui-library";
7
- import { _ as Xe } from "./app-CLY6CoaV.js";
7
+ import { useBreakpoints as ye, components as _e, useSnackbar as He, useDialog as We, FmButtonVariant as Je } from "@feedmepos/ui-library";
8
+ import { _ as Xe } from "./app-CoVUUCa_.js";
8
9
  import { _ as Ze, a as et } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
9
10
  import { c as tt } from "./object-DVUNCr7w.js";
10
11
  import { u as ot } from "./discardConfirm-BHni0LNu.js";
11
- import { _ as nt } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-D00UOSsK.js";
12
+ import { _ as nt } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-CR7QrFUG.js";
12
13
  import { c as lt } from "./check-C9mY6LiX.js";
13
- import { _ as at } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
14
- import { M as ge, x as rt, y as ut, A as st, e as it, j as ct, r as mt } from "./item-D4DcBt7N.js";
14
+ import { _ as rt } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
15
+ import { M as ge, x as at, y as ut, A as st, e as it, j as ct, r as mt } from "./item-BAqzKh4O.js";
15
16
  import { u as pt } from "./search-BAPEUu1R.js";
16
- import { C as dt } from "./catalog-bkFntZNz.js";
17
- import { c as vt } from "./subcategory-B_W6vbM8.js";
18
- const ft = /* @__PURE__ */ H({
17
+ import { C as dt } from "./catalog-CaXceaA2.js";
18
+ import { c as vt } from "./subcategory-D-R5r1Tr.js";
19
+ const ft = /* @__PURE__ */ W({
19
20
  __name: "ResponsiveContextMenu",
20
21
  props: {
21
22
  items: {}
22
23
  },
23
24
  setup(L) {
24
- const R = ye(), r = f(() => R.breakpoints.value.xs);
25
+ const R = ye(), a = f(() => R.breakpoints.value.xs);
25
26
  return (P, V) => {
26
27
  const h = F("FmButton"), v = F("FmMenuItem"), y = F("FmMenu");
27
- return r.value ? (m(), U(Ze, { key: 0 }, {
28
- default: C(() => [
29
- (m(!0), w(T, null, ee(P.items, ({ icon: k, label: A, disabled: O, itemClass: x, onClick: _ }) => (m(), U(et, {
28
+ return a.value ? (m(), I(Ze, { key: 0 }, {
29
+ default: O(() => [
30
+ (m(!0), w(T, null, ee(P.items, ({ icon: k, label: A, disabled: C, itemClass: x, onClick: _ }) => (m(), I(et, {
30
31
  key: A,
31
32
  icon: k,
32
33
  label: A,
33
- disabled: O,
34
+ disabled: C,
34
35
  itemClass: x,
35
36
  onClick: () => {
36
- !O && (_ == null || _());
37
+ !C && (_ == null || _());
37
38
  }
38
39
  }, null, 8, ["icon", "label", "disabled", "itemClass", "onClick"]))), 128))
39
40
  ]),
40
41
  _: 1
41
- })) : (m(), U(y, {
42
+ })) : (m(), I(y, {
42
43
  key: 1,
43
44
  "stop-click-propagation": "",
44
45
  shift: !0
45
46
  }, {
46
- "menu-button": C(() => [
47
+ "menu-button": O(() => [
47
48
  i(h, {
48
49
  type: "button",
49
50
  variant: "tertiary",
@@ -52,18 +53,18 @@ const ft = /* @__PURE__ */ H({
52
53
  size: "md"
53
54
  })
54
55
  ]),
55
- default: C(() => [
56
- (m(!0), w(T, null, ee(P.items, ({ icon: k, label: A, disabled: O, itemClass: x, onClick: _ }) => (m(), U(v, {
56
+ default: O(() => [
57
+ (m(!0), w(T, null, ee(P.items, ({ icon: k, label: A, disabled: C, itemClass: x, onClick: _ }) => (m(), I(v, {
57
58
  key: A,
58
- disabled: O,
59
+ disabled: C,
59
60
  onClick: () => {
60
- !O && (_ == null || _());
61
+ !C && (_ == null || _());
61
62
  },
62
63
  label: A
63
64
  }, {
64
- label: C(() => [
65
+ label: O(() => [
65
66
  p("span", {
66
- class: W(O ? "text-fm-color-typo-disabled" : x)
67
+ class: H(C ? "text-fm-color-typo-disabled" : x)
67
68
  }, M(A), 3)
68
69
  ]),
69
70
  _: 2
@@ -73,7 +74,7 @@ const ft = /* @__PURE__ */ H({
73
74
  }));
74
75
  };
75
76
  }
76
- }), gt = { class: "fm-typo-en-title-md-600" }, yt = { class: "flex gap-8 items-center justify-start" }, _t = /* @__PURE__ */ H({
77
+ }), gt = { class: "fm-typo-en-title-md-600" }, yt = { class: "flex gap-8 items-center justify-start" }, _t = /* @__PURE__ */ W({
77
78
  __name: "ApplyProductDialog",
78
79
  props: {
79
80
  title: {},
@@ -83,14 +84,14 @@ const ft = /* @__PURE__ */ H({
83
84
  },
84
85
  emits: ["apply:product"],
85
86
  setup(L, { emit: R }) {
86
- const r = L, P = R, { t: V } = oe(), h = r.initialValue.map((x) => ({ _id: x })), v = S(Q.clone(h)), y = ot(
87
+ const a = L, P = R, { t: V } = oe(), h = a.initialValue.map((x) => ({ _id: x })), v = S(Q.clone(h)), y = ot(
87
88
  () => !Q.isEqual(v.value, h),
88
89
  () => {
89
90
  k.value = !1;
90
91
  }
91
92
  ), k = S(!1), A = (x) => {
92
- lt.isBoolean(x) ? k.value = x : k.value = !k.value, k.value && (v.value = r.initialValue.map((_) => ({ _id: _ })));
93
- }, O = te();
93
+ lt.isBoolean(x) ? k.value = x : k.value = !k.value, k.value && (v.value = a.initialValue.map((_) => ({ _id: _ })));
94
+ }, C = te();
94
95
  return (x, _) => {
95
96
  const b = F("fm-button"), ne = F("fm-side-sheet");
96
97
  return m(), w(T, null, [
@@ -109,10 +110,10 @@ const ft = /* @__PURE__ */ H({
109
110
  "max-width": 560,
110
111
  "onOn:clickedAway": u(y)
111
112
  }, {
112
- "side-sheet-header": C(() => [
113
+ "side-sheet-header": O(() => [
113
114
  p("p", gt, M(x.title), 1)
114
115
  ]),
115
- "side-sheet-footer": C(() => [
116
+ "side-sheet-footer": O(() => [
116
117
  p("div", yt, [
117
118
  i(b, {
118
119
  label: u(V)("common.save"),
@@ -128,11 +129,11 @@ const ft = /* @__PURE__ */ H({
128
129
  })
129
130
  ])
130
131
  ]),
131
- default: C(() => [
132
+ default: O(() => [
132
133
  i(nt, {
133
134
  overrides: v.value,
134
135
  "onUpdate:overrides": _[0] || (_[0] = (N) => v.value = N),
135
- "categorized-items": u(O).categorizedItems,
136
+ "categorized-items": u(C).categorizedItems,
136
137
  editable: x.editable,
137
138
  "select-variant": !1,
138
139
  "show-variant": !1,
@@ -148,35 +149,35 @@ const ft = /* @__PURE__ */ H({
148
149
  }), bt = {
149
150
  key: 0,
150
151
  class: "mt-4"
151
- }, ht = { class: "text-fm-color-typo-secondary mb-2" }, kt = { class: "list-disc list-inside text-fm-color-typo-secondary ml-4 space-y-1" }, wt = /* @__PURE__ */ H({
152
+ }, ht = { class: "text-fm-color-typo-secondary mb-2" }, kt = { class: "list-disc list-inside text-fm-color-typo-secondary ml-4 space-y-1" }, wt = /* @__PURE__ */ W({
152
153
  __name: "DeleteGroupDialog",
153
154
  props: {
154
155
  group: {}
155
156
  },
156
157
  setup(L) {
157
- const R = L, { t: r } = oe(), P = te(), V = f(() => R.group.itemsLinked.map((h) => {
158
+ const R = L, { t: a } = oe(), P = te(), V = f(() => R.group.itemsLinked.map((h) => {
158
159
  const v = P.state.menu.modules.item.find((y) => y._id === h);
159
160
  return (v == null ? void 0 : v.name) || h;
160
161
  }).filter(Boolean));
161
162
  return (h, v) => (m(), w("div", null, [
162
- p("div", null, M(u(r)("menu.group.dialogs.delete.message", { name: h.group.name })), 1),
163
+ p("div", null, M(u(a)("menu.group.dialogs.delete.message", { name: h.group.name })), 1),
163
164
  V.value.length > 0 ? (m(), w("div", bt, [
164
- p("div", ht, M(u(r)("menu.group.dialogs.delete.unlink_warning", { count: V.value.length })), 1),
165
+ p("div", ht, M(u(a)("menu.group.dialogs.delete.unlink_warning", { count: V.value.length })), 1),
165
166
  p("ul", kt, [
166
167
  (m(!0), w(T, null, ee(V.value, (y) => (m(), w("li", {
167
168
  key: y,
168
169
  class: "text-sm"
169
170
  }, M(y), 1))), 128))
170
171
  ])
171
- ])) : I("", !0)
172
+ ])) : U("", !0)
172
173
  ]));
173
174
  }
174
- }), Ot = {
175
+ }), Ct = {
175
176
  key: 1,
176
177
  class: "xs:pt-24"
177
- }, Ct = {
178
+ }, Ot = {
178
179
  key: 0,
179
- class: /* @__PURE__ */ W(["flex-1 overflow-hidden", "space-y-8", "flex flex-col", "overflow-hidden"])
180
+ class: /* @__PURE__ */ H(["flex-1 overflow-hidden", "space-y-8", "flex flex-col", "overflow-hidden"])
180
181
  }, At = {
181
182
  class: "flex justify-between items-center space-x-8"
182
183
  }, xt = {
@@ -201,14 +202,14 @@ const ft = /* @__PURE__ */ H({
201
202
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
202
203
  }, Et = {
203
204
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
204
- }, Zt = /* @__PURE__ */ H({
205
+ }, eo = /* @__PURE__ */ W({
205
206
  __name: "Group",
206
207
  emits: ["update:count"],
207
208
  setup(L, {
208
209
  emit: R
209
210
  }) {
210
- const r = te(), P = qe(), V = We(), h = Te($e(V)), v = He(), y = f(() => r.rules.group), k = f(() => new ge(r, h.updateMenu, v)), A = f(() => k.value.mapGroups(r.groups, !1)), {
211
- searchKey: O,
211
+ const a = te(), P = qe(), V = He(), h = Te($e(V)), v = We(), y = f(() => a.rules.group), k = f(() => new ge(a, h.updateMenu, v)), A = f(() => k.value.mapGroups(a.groups, !1)), {
212
+ searchKey: C,
212
213
  filter: x
213
214
  } = pt(), _ = S(!1), b = S(null), N = S({
214
215
  logic: "AND",
@@ -231,7 +232,7 @@ const ft = /* @__PURE__ */ H({
231
232
  };
232
233
  });
233
234
  }), z = f(() => {
234
- const t = (l) => x([l.name, ...Object.values(l.items).flatMap((n) => `${n.code} ${n.name} ${Le.Dinero.fromFdoDinero(n.price).toFormat()}`), l.type]), e = (l) => !l.customAttributes && !N.value.rules.length ? !0 : Ke(l.customAttributes ?? {}, N.value);
235
+ const t = (l) => x([l.name, ...Object.values(l.items).flatMap((n) => `${n.code} ${n.name} ${je.fromFdoDinero(n.price).toFormat()}`), l.type]), e = (l) => !l.customAttributes && !N.value.rules.length ? !0 : Ke(l.customAttributes ?? {}, N.value);
235
236
  return A.value.filter((l) => t(l) && e(l)).filter((l) => !b.value || l.type === b.value);
236
237
  }), he = R;
237
238
  Ee(() => z.value.length, () => {
@@ -239,10 +240,10 @@ const ft = /* @__PURE__ */ H({
239
240
  }, {
240
241
  immediate: !0
241
242
  });
242
- const c = f(() => !!r.state.currentCatalogId || !!r.state.currentSchedulerId);
243
- function ae(t) {
243
+ const c = f(() => !!a.state.currentCatalogId || !!a.state.currentSchedulerId);
244
+ function re(t) {
244
245
  var Y;
245
- const e = !r.state.currentCatalogId, l = !r.state.currentSchedulerId, n = (Y = r.currentCatalog) == null ? void 0 : Y.usePriceTiers, s = r.rules.item.bindToVariant, D = r.rules.group.type, d = r.version === g.F_MENU_VERSION.enum.v3, G = r.rules.item.orderFromActiveOnly;
246
+ const e = !a.state.currentCatalogId, l = !a.state.currentSchedulerId, n = (Y = a.currentCatalog) == null ? void 0 : Y.usePriceTiers, s = a.rules.item.bindToVariant, D = a.rules.group.type, d = a.version === g.F_MENU_VERSION.enum.v3, G = a.rules.item.orderFromActiveOnly;
246
247
  return {
247
248
  link: (o) => !c.value && (!o || s),
248
249
  name: (o) => !c.value && !o,
@@ -262,7 +263,7 @@ const ft = /* @__PURE__ */ H({
262
263
  };
263
264
  }
264
265
  const ke = f(() => {
265
- const t = !r.state.currentSchedulerId, e = r.rules.group.type, l = r.version === g.F_MENU_VERSION.enum.v3, n = r.rules.item.orderFromActiveOnly, s = r.rules.item.bindToVariant;
266
+ const t = !a.state.currentSchedulerId, e = a.rules.group.type, l = a.version === g.F_MENU_VERSION.enum.v3, n = a.rules.item.orderFromActiveOnly, s = a.rules.item.bindToVariant;
266
267
  return function(d) {
267
268
  return {
268
269
  link: (G) => !c.value && (!G || s),
@@ -271,7 +272,7 @@ const ft = /* @__PURE__ */ H({
271
272
  type: e && !d._id && !c.value,
272
273
  price: d.type !== g.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
273
274
  priceEdit: !0,
274
- priceTier: r.isV4,
275
+ priceTier: a.isV4,
275
276
  inventory: t ? l ? !c.value && d.type === g.F_ADDON_GROUP_TYPE.enum.NORMAL : !c.value : !1,
276
277
  orderFrom: (G) => t ? l ? d.type === g.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? c.value : !!c.value == !G : c.value : !1,
277
278
  orderFromActiveOnly: n,
@@ -284,41 +285,41 @@ const ft = /* @__PURE__ */ H({
284
285
  };
285
286
  }), we = f(() => ({
286
287
  ...Ye.generator.initMenuV4Group(),
287
- type: r.version === g.F_MENU_VERSION.enum.v4 ? g.F_ADDON_GROUP_TYPE.enum.PRODUCT : g.F_ADDON_GROUP_TYPE.enum.NORMAL,
288
+ type: a.version === g.F_MENU_VERSION.enum.v4 ? g.F_ADDON_GROUP_TYPE.enum.PRODUCT : g.F_ADDON_GROUP_TYPE.enum.NORMAL,
288
289
  items: {},
289
- position: r.groups.length - 1,
290
+ position: a.groups.length - 1,
290
291
  itemsLinked: []
291
292
  })), J = f(() => ke.value(we.value).type);
292
- function re(t) {
293
+ function ae(t) {
293
294
  k.value.sortGroups(t);
294
295
  }
295
- function Oe(t) {
296
+ function Ce(t) {
296
297
  v.open({
297
- title: a("menu.group.actions.duplicate.title"),
298
- message: a("menu.group.actions.duplicate.message", {
298
+ title: r("menu.group.actions.duplicate.title"),
299
+ message: r("menu.group.actions.duplicate.message", {
299
300
  name: t.name
300
301
  }),
301
302
  primaryActions: {
302
- text: a("menu.common.actions.yes"),
303
+ text: r("menu.common.actions.yes"),
303
304
  close: !0
304
305
  },
305
306
  secondaryActions: {
306
- text: a("menu.common.actions.cancel"),
307
+ text: r("menu.common.actions.cancel"),
307
308
  close: !0
308
309
  }
309
310
  }).onPrimary(() => k.value.duplicateGroup(t));
310
311
  }
311
- const X = f(() => r.currentCatalog), j = f(() => r.currentScheduler), B = f(() => new dt(X.value, r, h.updateMenu, v)), Z = f(() => new rt(j.value, r, h.updateMenu, v)), Ce = (t) => {
312
+ const X = f(() => a.currentCatalog), j = f(() => a.currentScheduler), B = f(() => new dt(X.value, a, h.updateMenu, v)), Z = f(() => new at(j.value, a, h.updateMenu, v)), Oe = (t) => {
312
313
  let e = t;
313
314
  function l(n) {
314
- const D = r.state.menu.modules.group.find((o) => o._id === n._id), d = (n.items ?? []).reduce((o, E) => (o[E._id] = [...o[E._id] || [], E.combinationKey || ""], o), {}), Y = (D.items ?? []).filter((o) => {
315
+ const D = a.state.menu.modules.group.find((o) => o._id === n._id), d = (n.items ?? []).reduce((o, E) => (o[E._id] = [...o[E._id] || [], E.combinationKey || ""], o), {}), Y = (D.items ?? []).filter((o) => {
315
316
  var E;
316
317
  return !((E = d[o._id]) != null && E.includes(o.combinationKey || ""));
317
318
  }).map((o) => ({
318
319
  _id: o._id,
319
320
  combinationKey: o.combinationKey,
320
321
  selection: o.selection
321
- })).filter((o) => !!r.mergedMenu.modules.item.find((E) => E._id === o._id));
322
+ })).filter((o) => !!a.mergedMenu.modules.item.find((E) => E._id === o._id));
322
323
  return {
323
324
  ...D,
324
325
  ...Object.fromEntries(Object.entries(n).filter(([, o]) => !!o)),
@@ -329,28 +330,28 @@ const ft = /* @__PURE__ */ H({
329
330
  let n;
330
331
  X.value ? j.value ? n = B.value.getCatalogSchedulerGroup(t._id, j.value._id) : n = B.value.getCatalogGroup(t._id) : n = Z.value.getSchedulerGroup(t._id);
331
332
  const s = l(n);
332
- e = new ge(r, h.updateMenu, v).mapGroups([s], !0)[0];
333
+ e = new ge(a, h.updateMenu, v).mapGroups([s], !0)[0];
333
334
  }
334
335
  return {
335
336
  group: e,
336
- config: ae,
337
- categorizedItems: r.categorizedItems
337
+ config: re,
338
+ categorizedItems: a.categorizedItems
338
339
  };
339
340
  };
340
341
  function Ae(t) {
341
342
  v.open({
342
- title: a("menu.group.dialogs.delete.title"),
343
+ title: r("menu.group.dialogs.delete.title"),
343
344
  contentComponent: wt,
344
345
  contentComponentProps: {
345
346
  group: t
346
347
  },
347
348
  primaryActions: {
348
- text: a("menu.common.actions.delete"),
349
+ text: r("menu.common.actions.delete"),
349
350
  close: !0,
350
351
  variant: Je.Destructive
351
352
  },
352
353
  secondaryActions: {
353
- text: a("menu.common.actions.cancel"),
354
+ text: r("menu.common.actions.cancel"),
354
355
  close: !0
355
356
  }
356
357
  }).onPrimary(async () => {
@@ -366,11 +367,11 @@ const ft = /* @__PURE__ */ H({
366
367
  "onApply:product": async (l) => {
367
368
  var n;
368
369
  for (const s of l)
369
- if (vt(r.state.menu, t._id, s._id)) {
370
- const D = (n = r.state.menu.modules.item.find((d) => d._id === s._id)) == null ? void 0 : n.name;
370
+ if (vt(a.state.menu, t._id, s._id)) {
371
+ const D = (n = a.state.menu.modules.item.find((d) => d._id === s._id)) == null ? void 0 : n.name;
371
372
  V.open({
372
373
  type: "error",
373
- message: a("menu.product.form.group.circularError", {
374
+ message: r("menu.product.form.group.circularError", {
374
375
  groupName: t.name,
375
376
  productName: D
376
377
  })
@@ -389,18 +390,18 @@ const ft = /* @__PURE__ */ H({
389
390
  trigger: n
390
391
  }) => {
391
392
  const s = [{
392
- label: a("menu.common.actions.edit"),
393
+ label: r("menu.common.actions.edit"),
393
394
  onClick: () => ce(e)
394
395
  }, {
395
- label: a("menu.group.actions.apply_product"),
396
+ label: r("menu.group.actions.apply_product"),
396
397
  disable: !y.value.applyProduct,
397
398
  onClick: n
398
399
  }, {
399
- label: a("menu.group.actions.duplicate_action"),
400
+ label: r("menu.group.actions.duplicate_action"),
400
401
  disabled: !y.value.create,
401
- onClick: () => Oe(e)
402
+ onClick: () => Ce(e)
402
403
  }, {
403
- label: a("menu.common.actions.delete"),
404
+ label: r("menu.common.actions.delete"),
404
405
  itemClass: "text-fm-color-typo-error",
405
406
  disabled: !y.value.delete,
406
407
  onClick: () => Ae(e)
@@ -412,34 +413,34 @@ const ft = /* @__PURE__ */ H({
412
413
  });
413
414
  }, xe = f(() => [{
414
415
  accessorKey: "name",
415
- header: () => a("menu.group.list.columns.name"),
416
+ header: () => r("menu.group.list.columns.name"),
416
417
  enableSorting: !1
417
418
  }, {
418
419
  accessorKey: "items",
419
- header: () => a("menu.group.list.columns.products"),
420
+ header: () => r("menu.group.list.columns.products"),
420
421
  enableSorting: !1,
421
422
  cell: (t) => {
422
423
  const e = t.getValue(), l = Object.values(e).map((n) => {
423
424
  var D;
424
425
  const s = [(n == null ? void 0 : n.code) || "", n.name ?? n.fallbackName].join(" ").trim();
425
- return (n.items || []).length > 1 ? `${s} (${a("menu.group.list.variants", {
426
+ return (n.items || []).length > 1 ? `${s} (${r("menu.group.list.variants", {
426
427
  count: (D = n.items) == null ? void 0 : D.length
427
428
  })})` : s;
428
429
  });
429
- return l.length > 5 ? `${l.slice(0, 5).join(", ")} ${a("menu.group.list.more_items", {
430
+ return l.length > 5 ? `${l.slice(0, 5).join(", ")} ${r("menu.group.list.more_items", {
430
431
  count: l.length - 5
431
432
  })}` : l.join(", ");
432
433
  }
433
434
  }, {
434
435
  accessorKey: "type",
435
- header: () => a("menu.group.list.columns.type"),
436
+ header: () => r("menu.group.list.columns.type"),
436
437
  enableSorting: !1,
437
438
  cell: (t) => {
438
439
  const e = t.row.original;
439
440
  return {
440
- [g.F_ADDON_GROUP_TYPE.enum.NORMAL]: a("menu.group.list.types.normal"),
441
- [g.F_ADDON_GROUP_TYPE.enum.PRODUCT]: a("menu.group.list.types.product"),
442
- [g.F_ADDON_GROUP_TYPE.enum.DYNAMIC]: a("menu.group.list.types.dynamic")
441
+ [g.F_ADDON_GROUP_TYPE.enum.NORMAL]: r("menu.group.list.types.normal"),
442
+ [g.F_ADDON_GROUP_TYPE.enum.PRODUCT]: r("menu.group.list.types.product"),
443
+ [g.F_ADDON_GROUP_TYPE.enum.DYNAMIC]: r("menu.group.list.types.dynamic")
443
444
  }[e.type] || "-";
444
445
  },
445
446
  meta: {
@@ -448,7 +449,7 @@ const ft = /* @__PURE__ */ H({
448
449
  }, {
449
450
  id: "tagging",
450
451
  accessorKey: "tagging",
451
- header: () => a("menu.product.table.columns.tagging"),
452
+ header: () => r("menu.product.table.columns.tagging"),
452
453
  enableSorting: !1,
453
454
  size: 140,
454
455
  cell: (t) => {
@@ -461,10 +462,10 @@ const ft = /* @__PURE__ */ H({
461
462
  }
462
463
  }, {
463
464
  accessorKey: "itemsLinked",
464
- header: () => a("menu.group.list.columns.applied_products"),
465
+ header: () => r("menu.group.list.columns.applied_products"),
465
466
  enableSorting: !1,
466
467
  cell: (t) => {
467
- const e = t.getValue(), l = a("menu.group.list.items_linked", {
468
+ const e = t.getValue(), l = r("menu.group.list.items_linked", {
468
469
  count: e.length
469
470
  });
470
471
  return ue(t.row.original, ({
@@ -497,13 +498,13 @@ const ft = /* @__PURE__ */ H({
497
498
  tagging: ((t = P.groupAttributeSettings) == null ? void 0 : t.value.length) > 0
498
499
  };
499
500
  }), Fe = async (t) => {
500
- const e = ct(t), l = e.group, n = mt(l, ae(t));
501
+ const e = ct(t), l = e.group, n = mt(l, re(t));
501
502
  if (c.value)
502
503
  X.value ? (j.value ? B.value.overrideCatalogSchedulerGroups([n], j.value._id) : B.value.overrideCatalogGroups([n]), await B.value.update()) : (Z.value.overrideSchedulerGroups([n]), await Z.value.update());
503
504
  else {
504
505
  const s = {
505
506
  module: g.F_MENU_MODULE_V4_KEY.enum.group,
506
- operation: ze.F_OPERATION_TYPE.update,
507
+ operation: Le.F_OPERATION_TYPE.update,
507
508
  data: n,
508
509
  link: [{
509
510
  module: g.F_MENU_MODULE_V4_KEY.enum.item,
@@ -521,7 +522,7 @@ const ft = /* @__PURE__ */ H({
521
522
  ce(t.original);
522
523
  }
523
524
  const Ge = ye(), Pe = f(() => Ge.breakpoints.value.xs), {
524
- t: a
525
+ t: r
525
526
  } = oe(), Ve = f(() => {
526
527
  var t;
527
528
  return ((t = P.groupAttributeSettings) == null ? void 0 : t.value.length) > 0;
@@ -544,30 +545,30 @@ const ft = /* @__PURE__ */ H({
544
545
  }) : null;
545
546
  return (t, e) => {
546
547
  const l = F("fm-button"), n = F("fm-chip"), s = F("fm-menu-item"), D = F("fm-menu"), d = F("fm-search"), G = F("fm-table"), Y = F("fm-bottom-sheet");
547
- return m(), w(T, null, [$.value ? (m(), U(ut, Re({
548
+ return m(), w(T, null, [$.value ? (m(), I(ut, Re({
548
549
  ref_key: "groupManagerFormRef",
549
550
  ref: ie,
550
551
  key: $.value._id
551
- }, Ce($.value), {
552
+ }, Oe($.value), {
552
553
  action: "update",
553
- title: u(a)("menu.group.dialogs.update.title"),
554
+ title: u(r)("menu.group.dialogs.update.title"),
554
555
  group: $.value,
555
556
  "onUpdate:group": e[0] || (e[0] = (o) => $.value = o),
556
557
  "onSubmit:group": e[1] || (e[1] = (o) => Fe(o))
557
- }), null, 16, ["title", "group"])) : I("", !0), A.value.length === 0 ? (m(), w("div", Ot, [i(at, {
558
- subtitle: u(a)("menu.group.empty.subtitle"),
559
- title: u(a)("menu.group.empty.title")
560
- }, Ie({
558
+ }), null, 16, ["title", "group"])) : U("", !0), A.value.length === 0 ? (m(), w("div", Ct, [i(rt, {
559
+ subtitle: u(r)("menu.group.empty.subtitle"),
560
+ title: u(r)("menu.group.empty.title")
561
+ }, Ue({
561
562
  _: 2
562
563
  }, [y.value.create ? {
563
564
  name: "action",
564
- fn: C(() => [i(u(st), null, {
565
- default: C(({
565
+ fn: O(() => [i(u(st), null, {
566
+ default: O(({
566
567
  trigger: o
567
568
  }) => [i(l, {
568
569
  "prepend-icon": "add",
569
- label: u(a)("menu.group.actions.add"),
570
- onClick: Ue(o, ["stop"])
570
+ label: u(r)("menu.group.actions.add"),
571
+ onClick: Ie(o, ["stop"])
571
572
  }, null, 8, ["label", "onClick"])]),
572
573
  _: 1
573
574
  })]),
@@ -578,103 +579,103 @@ const ft = /* @__PURE__ */ H({
578
579
  key: 1
579
580
  }, [p("div", Ft, [i(d, {
580
581
  autofocus: "",
581
- modelValue: u(O),
582
- "onUpdate:modelValue": e[9] || (e[9] = (o) => de(O) ? O.value = o : null),
583
- placeholder: u(a)("menu.group.search.placeholder")
582
+ modelValue: u(C),
583
+ "onUpdate:modelValue": e[9] || (e[9] = (o) => de(C) ? C.value = o : null),
584
+ placeholder: u(r)("menu.group.search.placeholder")
584
585
  }, null, 8, ["modelValue", "placeholder"])]), e[17] || (e[17] = p("div", {
585
586
  class: "bg-fm-color-neutral-gray-100 w-full h-px rounded-md"
586
- }, null, -1)), p("div", Mt, [i(me), J.value ? (m(), U(Y, {
587
+ }, null, -1)), p("div", Mt, [i(me), J.value ? (m(), I(Y, {
587
588
  key: 0,
588
589
  modelValue: _.value,
589
590
  "onUpdate:modelValue": e[14] || (e[14] = (o) => _.value = o)
590
591
  }, {
591
- "bottom-sheet-button": C(() => [i(n, {
592
- label: u(a)("menu.group.type.title", {
593
- type: b.value ? u(Q.capitalize)(b.value) : u(a)("menu.common.labels.all")
592
+ "bottom-sheet-button": O(() => [i(n, {
593
+ label: u(r)("menu.group.type.title", {
594
+ type: b.value ? u(Q.capitalize)(b.value) : u(r)("menu.common.labels.all")
594
595
  }),
595
596
  class: "text-fm-color-typo-secondary",
596
597
  "right-icon": "keyboard_arrow_down"
597
598
  }, null, 8, ["label"])]),
598
- default: C(() => [p("div", null, [p("div", {
599
+ default: O(() => [p("div", null, [p("div", {
599
600
  class: "px-16 py-8",
600
601
  onClick: e[10] || (e[10] = (o) => b.value = null)
601
- }, M(u(a)("menu.group.type.all")), 1), p("div", {
602
+ }, M(u(r)("menu.group.type.all")), 1), p("div", {
602
603
  class: "px-16 py-8",
603
604
  onClick: e[11] || (e[11] = (o) => b.value = "NORMAL")
604
- }, M(u(a)("menu.group.type.normal")), 1), p("div", {
605
+ }, M(u(r)("menu.group.type.normal")), 1), p("div", {
605
606
  class: "px-16 py-8",
606
607
  onClick: e[12] || (e[12] = (o) => b.value = "PRODUCT")
607
- }, M(u(a)("menu.group.type.product")), 1), p("div", {
608
+ }, M(u(r)("menu.group.type.product")), 1), p("div", {
608
609
  class: "px-16 py-8",
609
610
  onClick: e[13] || (e[13] = (o) => b.value = "DYNAMIC")
610
- }, M(u(a)("menu.group.type.dynamic")), 1)])]),
611
+ }, M(u(r)("menu.group.type.dynamic")), 1)])]),
611
612
  _: 1
612
- }, 8, ["modelValue"])) : I("", !0)]), K.value ? (m(), w("div", Gt, [i(u(fe), {
613
+ }, 8, ["modelValue"])) : U("", !0)]), K.value ? (m(), w("div", Gt, [i(u(fe), {
613
614
  ref_key: "attributeFilterRef",
614
615
  ref: q,
615
616
  attributes: le.value,
616
617
  modelValue: N.value,
617
618
  "onUpdate:modelValue": e[15] || (e[15] = (o) => N.value = o)
618
- }, null, 8, ["attributes", "modelValue"])])) : I("", !0), i(u(je), {
619
- class: W(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"]),
619
+ }, null, 8, ["attributes", "modelValue"])])) : U("", !0), i(u(ze), {
620
+ class: H(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"]),
620
621
  "model-value": z.value,
621
622
  group: "categories",
622
623
  handle: ".handle",
623
624
  "item-key": "_id",
624
- "onUpdate:modelValue": e[16] || (e[16] = (o) => re(o))
625
+ "onUpdate:modelValue": e[16] || (e[16] = (o) => ae(o))
625
626
  }, {
626
- item: C(({
627
+ item: O(({
627
628
  element: o
628
629
  }) => [(m(), w("div", {
629
630
  key: o._id,
630
- class: W(["py-12 px-16", "flex space-x-16", "items-center"])
631
- }, [p("div", Pt, [p("div", Vt, [p("p", Nt, M(o.name), 1), p("div", null, [J.value ? (m(), w("p", St, M(u(Q.capitalize)(o.type)) + " type ", 1)) : I("", !0), p("p", Et, M(u(a)("menu.group.list.products_linked", {
631
+ class: H(["py-12 px-16", "flex space-x-16", "items-center"])
632
+ }, [p("div", Pt, [p("div", Vt, [p("p", Nt, M(o.name), 1), p("div", null, [J.value ? (m(), w("p", St, M(u(Q.capitalize)(o.type)) + " type ", 1)) : U("", !0), p("p", Et, M(u(r)("menu.group.list.products_linked", {
632
633
  count: o.itemsLinked.length
633
634
  })), 1)])]), i(se, {
634
635
  group: o
635
636
  }, null, 8, ["group"])])]))]),
636
637
  _: 1
637
- }, 8, ["model-value"])], 64)) : (m(), w("div", Ct, [p("div", At, [i(me), J.value ? (m(), U(D, {
638
+ }, 8, ["model-value"])], 64)) : (m(), w("div", Ot, [p("div", At, [i(me), J.value ? (m(), I(D, {
638
639
  key: 0
639
640
  }, {
640
- "menu-button": C(() => [i(n, {
641
- label: u(a)("menu.group.type.title", {
642
- type: b.value ? u(Q.capitalize)(b.value) : u(a)("menu.common.labels.all")
641
+ "menu-button": O(() => [i(n, {
642
+ label: u(r)("menu.group.type.title", {
643
+ type: b.value ? u(Q.capitalize)(b.value) : u(r)("menu.common.labels.all")
643
644
  }),
644
645
  class: "text-fm-color-typo-secondary",
645
646
  "right-icon": "keyboard_arrow_down"
646
647
  }, null, 8, ["label"])]),
647
- default: C(() => [p("div", null, [i(s, {
648
+ default: O(() => [p("div", null, [i(s, {
648
649
  class: "px-16 py-8",
649
- label: u(a)("menu.group.type.all"),
650
+ label: u(r)("menu.group.type.all"),
650
651
  onClick: e[2] || (e[2] = (o) => b.value = null)
651
652
  }, null, 8, ["label"]), i(s, {
652
653
  class: "px-16 py-8",
653
- label: u(a)("menu.group.type.normal"),
654
+ label: u(r)("menu.group.type.normal"),
654
655
  onClick: e[3] || (e[3] = (o) => b.value = "NORMAL")
655
656
  }, null, 8, ["label"]), i(s, {
656
657
  class: "px-16 py-8",
657
- label: u(a)("menu.group.type.product"),
658
+ label: u(r)("menu.group.type.product"),
658
659
  onClick: e[4] || (e[4] = (o) => b.value = "PRODUCT")
659
660
  }, null, 8, ["label"]), i(s, {
660
661
  class: "px-16 py-8",
661
- label: u(a)("menu.group.type.dynamic"),
662
+ label: u(r)("menu.group.type.dynamic"),
662
663
  onClick: e[5] || (e[5] = (o) => b.value = "DYNAMIC")
663
664
  }, null, 8, ["label"])])]),
664
665
  _: 1
665
- })) : I("", !0), p("div", xt, [i(d, {
666
+ })) : U("", !0), p("div", xt, [i(d, {
666
667
  autofocus: "",
667
- modelValue: u(O),
668
- "onUpdate:modelValue": e[6] || (e[6] = (o) => de(O) ? O.value = o : null),
669
- placeholder: u(a)("menu.group.search.placeholder")
668
+ modelValue: u(C),
669
+ "onUpdate:modelValue": e[6] || (e[6] = (o) => de(C) ? C.value = o : null),
670
+ placeholder: u(r)("menu.group.search.placeholder")
670
671
  }, null, 8, ["modelValue", "placeholder"])])]), K.value ? (m(), w("div", Dt, [i(u(fe), {
671
672
  ref_key: "attributeFilterRef",
672
673
  ref: q,
673
674
  attributes: le.value,
674
675
  modelValue: N.value,
675
676
  "onUpdate:modelValue": e[7] || (e[7] = (o) => N.value = o)
676
- }, null, 8, ["attributes", "modelValue"])])) : I("", !0), i(Xe, null, {
677
- default: C(() => [i(G, {
677
+ }, null, 8, ["attributes", "modelValue"])])) : U("", !0), i(Xe, null, {
678
+ default: O(() => [i(G, {
678
679
  "column-defs": xe.value,
679
680
  "column-visibility": De.value,
680
681
  loading: u(h).checkMenuIsLoading(),
@@ -686,7 +687,7 @@ const ft = /* @__PURE__ */ H({
686
687
  "hide-footer": "",
687
688
  "pin-header-row": "",
688
689
  onRowClick: Me,
689
- onDndChanged: e[8] || (e[8] = (o) => re(o))
690
+ onDndChanged: e[8] || (e[8] = (o) => ae(o))
690
691
  }, null, 8, ["column-defs", "column-visibility", "loading", "page-size", "row-data"])]),
691
692
  _: 1
692
693
  })]))], 64))], 64);
@@ -694,5 +695,5 @@ const ft = /* @__PURE__ */ H({
694
695
  }
695
696
  });
696
697
  export {
697
- Zt as _
698
+ eo as _
698
699
  };