@feedmepos/mf-menu 0.32.31 → 0.32.32-dev.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-BBHS50eE.js → App-DOBu7IlK.js} +7 -7
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-3VFj-vml.js → ApplyProduct.vue_vue_type_script_setup_true_lang-COr56p31.js} +3 -3
  3. package/dist/{Catalog-CpbzW4W7.js → Catalog-CucFShSf.js} +6 -6
  4. package/dist/{Category-C-gBt7WU.js → Category-Bs5PTUZu.js} +4 -4
  5. package/dist/{Category-d5eerH-3.js → Category-_8gFdZMk.js} +6 -6
  6. package/dist/{CookingGuide-Cikiduqa.js → CookingGuide-Bde2ST6-.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CBUPA9Vc.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-B6z4WgA3.js} +1 -1
  8. package/dist/{Group-LtW0i-hk.js → Group-DMuVGTqi.js} +3 -3
  9. package/dist/{Group-BAnyyvsa.js → Group-RPn2wMxD.js} +1 -1
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-NH1TnQ6N.js → Group.vue_vue_type_script_setup_true_lang-BB7OY6Du.js} +109 -109
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-COoyjnhr.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D2UYKT1N.js} +5 -5
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CNSWXqtm.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CU6GqLk4.js} +1645 -1645
  13. package/dist/{Ingredient-CtvkzMyw.js → Ingredient-By0949Je.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-Czs8cv45.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CVSb0gqM.js} +2 -2
  15. package/dist/{LinkProductSideSheet-9mf8M9kO.js → LinkProductSideSheet--ItwDJiZ.js} +3 -3
  16. package/dist/{MenuSetting-06yPqAzj.js → MenuSetting-CMCQj26C.js} +5 -5
  17. package/dist/{PrintRoute-DR9yRn06.js → PrintRoute-C_ZWjfeI.js} +4 -4
  18. package/dist/{Product-CAs6JFtL.js → Product-DegN9uNX.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-BkXrsR9G.js → Product.vue_vue_type_script_setup_true_lang-DBZadrwW.js} +12 -12
  20. package/dist/{ProductInternalTools-C_T59ZLe.js → ProductInternalTools-DSoupEqQ.js} +6 -6
  21. package/dist/{Products-DbTbOUKr.js → Products-jGUKBHiT.js} +33 -33
  22. package/dist/{Publish-BTJ3xpbE.js → Publish-B6AwqZdD.js} +3 -3
  23. package/dist/{Recipe-DZdO2_Bj.js → Recipe-dI8ypw9y.js} +4 -4
  24. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-ebI_HGGu.js → RuleView.vue_vue_type_script_setup_true_lang-DaS-Kz6N.js} +369 -369
  25. package/dist/{Scheduler-ulqJs5EQ.js → Scheduler-CgCuTnBh.js} +3 -3
  26. package/dist/{ServingSequence-CxgXditd.js → ServingSequence-CvgnHQQG.js} +3 -3
  27. package/dist/{Setting-B5vgx9n4.js → Setting-CYJBeoFH.js} +5 -5
  28. package/dist/{Subcategory-TnQUpsqM.js → Subcategory-BbJjleAo.js} +4 -4
  29. package/dist/{Takeaway-Xw8kUWDj.js → Takeaway-Ca7lwQxn.js} +4 -4
  30. package/dist/{Takeaway-gSwLfoti.js → Takeaway-wEYMvssv.js} +1 -1
  31. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DzVOq82u.js → Takeaway.vue_vue_type_script_setup_true_lang-CMxeVmI2.js} +5 -5
  32. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-BWBP4cS0.js → Thumbnail.vue_vue_type_script_setup_true_lang-DXOFUF1u.js} +4 -4
  33. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-TlReanhW.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-gxCerNhJ.js} +14 -14
  34. package/dist/{Unit-DZhpz62N.js → Unit-B0EPqWsl.js} +2 -2
  35. package/dist/{Variant-KHnknIoU.js → Variant-DlMdI1ZR.js} +3 -3
  36. package/dist/{_id_-D-GqUYvK.js → _id_-BCkYDM3q.js} +9 -9
  37. package/dist/{app-Bh0TxBp9.js → app-BQiOwAg9.js} +1 -1
  38. package/dist/{app-CDrkrCta.js → app-x6_Wwa9v.js} +26 -26
  39. package/dist/app.js +1 -1
  40. package/dist/assets/{linked-status-BmOcfVPA.js → linked-status-B1O0FfM5.js} +2 -2
  41. package/dist/assets/{menu-export-Ct4UdWtm.js → menu-export-BRBeJxpu.js} +2 -2
  42. package/dist/assets/{override-menu-FGf49Q53.js → override-menu-BLGNASSG.js} +2 -2
  43. package/dist/assets/{validate-menu-DlTnRWIc.js → validate-menu-BwRDJxJF.js} +2 -2
  44. package/dist/{catalog-DaD1_emK.js → catalog-Cvg-TsEP.js} +1 -1
  45. package/dist/{catalogSetting-5jql8mtB.js → catalogSetting-xxH4HvY4.js} +1 -1
  46. package/dist/{category-B9E_Bt2z.js → category-DCOy_kvM.js} +1 -1
  47. package/dist/{currency-DeQWp8Xb.js → currency-DI1_hwtu.js} +1 -1
  48. package/dist/{dayjs.min-DXeiD4Sd.js → dayjs.min-B7Xnb1ht.js} +1 -1
  49. package/dist/{index-CseIZX4E.js → index-Bly9eByF.js} +1 -1
  50. package/dist/{index-CRpMUTmf.js → index-CD1nBuNB.js} +4 -4
  51. package/dist/{index-T03DUd8b.js → index-e8WaNy72.js} +3 -3
  52. package/dist/{index.vue_vue_type_script_setup_true_lang-Bx0ozgtL.js → index.vue_vue_type_script_setup_true_lang-CWMmOmP2.js} +6 -6
  53. package/dist/{item-CT-Xjgt9.js → item-4Fvqzfyb.js} +13 -13
  54. package/dist/{jszip.min-CK5hyEpR.js → jszip.min-moPARzcR.js} +2 -2
  55. package/dist/{menu-CfBvDD-Y.js → menu-iscmlOff.js} +1 -1
  56. package/dist/{menuV2-3d4R4nLt.js → menuV2-CTdQRo1T.js} +83 -83
  57. package/dist/{priceTier-Caduz5kC.js → priceTier-BDgeKSMZ.js} +1 -1
  58. package/dist/{scheduler-DN0vj_kg.js → scheduler-B2Y4zJ5g.js} +4 -4
  59. package/dist/{subcategory-BOdEb1YM.js → subcategory-D1A0yC9M.js} +2 -2
  60. package/dist/{toExcel-BtPQCa0b.js → toExcel-D3jesJC6.js} +2 -2
  61. package/dist/{unit-CtEAIQTM.js → unit-DNmyGjNq.js} +2 -2
  62. package/package.json +1 -1
@@ -1,20 +1,20 @@
1
1
  import { defineComponent as X, computed as g, resolveComponent as M, createBlock as I, openBlock as m, withCtx as x, createElementBlock as C, Fragment as T, renderList as oe, createElementVNode as d, normalizeClass as W, toDisplayString as G, createVNode as s, ref as E, renderSlot as Ne, unref as r, createCommentVNode as U, watch as Re, h as pe, mergeProps as Ee, createSlots as Se, withModifiers as Ue, isRef as J, nextTick as fe } from "vue";
2
- import { J as H, u as ne, Q as Ie, G as Te, A as v, D as $e, a5 as Ye, B as Le, M as ze } from "./index.vue_vue_type_script_setup_true_lang-Bx0ozgtL.js";
2
+ import { J as H, u as ne, Q as Ie, G as Te, A as v, D as $e, a5 as Ye, B as Le, M as ze } from "./index.vue_vue_type_script_setup_true_lang-CWMmOmP2.js";
3
3
  import { d as Be } from "./vuedraggable-CK8z7qA8.js";
4
4
  import { b as ve, H as je } from "./app-5fxKLAzS.js";
5
5
  import { useI18n as le, useCoreStore as Ke, useCustomAttributes as He } from "@feedmepos/mf-common";
6
6
  import { useBreakpoints as ye, components as _e, useSnackbar as qe, useDialog as Qe, FmButtonVariant as Je } from "@feedmepos/ui-library";
7
- import { _ as We, a as Xe } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-CBUPA9Vc.js";
8
- import { _ as Ze } from "./app-CDrkrCta.js";
7
+ import { _ as We, a as Xe } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-B6z4WgA3.js";
8
+ import { _ as Ze } from "./app-x6_Wwa9v.js";
9
9
  import { _ as et, a as tt } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
10
10
  import { c as ot } from "./object-DVUNCr7w.js";
11
11
  import { u as nt } from "./discardConfirm-BHni0LNu.js";
12
- import { _ as lt } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-3VFj-vml.js";
12
+ import { _ as lt } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-COr56p31.js";
13
13
  import { c as at } from "./check-C9mY6LiX.js";
14
- import { M as ge, x as rt, y as ut, A as st, e as it, i as ct, r as mt } from "./item-CT-Xjgt9.js";
14
+ import { M as ge, x as rt, y as ut, A as st, e as it, i as ct, r as mt } from "./item-4Fvqzfyb.js";
15
15
  import { u as dt } from "./search-BAPEUu1R.js";
16
- import { C as pt } from "./catalog-DaD1_emK.js";
17
- import { c as ft } from "./menuV2-3d4R4nLt.js";
16
+ import { C as pt } from "./catalog-Cvg-TsEP.js";
17
+ import { c as ft } from "./menuV2-CTdQRo1T.js";
18
18
  const vt = /* @__PURE__ */ X({
19
19
  __name: "ResponsiveContextMenu",
20
20
  props: {
@@ -23,12 +23,12 @@ const vt = /* @__PURE__ */ X({
23
23
  setup(L) {
24
24
  const S = ye(), u = g(() => S.breakpoints.value.xs);
25
25
  return (R, V) => {
26
- const h = M("FmButton"), f = M("FmMenuItem"), y = M("FmMenu");
26
+ const k = M("FmButton"), f = M("FmMenuItem"), y = M("FmMenu");
27
27
  return u.value ? (m(), I(et, { key: 0 }, {
28
28
  default: x(() => [
29
- (m(!0), C(T, null, oe(R.items, ({ icon: k, label: D, disabled: w, itemClass: A, onClick: _ }) => (m(), I(tt, {
29
+ (m(!0), C(T, null, oe(R.items, ({ icon: h, label: D, disabled: w, itemClass: A, onClick: _ }) => (m(), I(tt, {
30
30
  key: D,
31
- icon: k,
31
+ icon: h,
32
32
  label: D,
33
33
  disabled: w,
34
34
  itemClass: A,
@@ -44,7 +44,7 @@ const vt = /* @__PURE__ */ X({
44
44
  shift: !0
45
45
  }, {
46
46
  "menu-button": x(() => [
47
- s(h, {
47
+ s(k, {
48
48
  type: "button",
49
49
  variant: "tertiary",
50
50
  icon: "more_vert",
@@ -53,7 +53,7 @@ const vt = /* @__PURE__ */ X({
53
53
  })
54
54
  ]),
55
55
  default: x(() => [
56
- (m(!0), C(T, null, oe(R.items, ({ icon: k, label: D, disabled: w, itemClass: A, onClick: _ }) => (m(), I(f, {
56
+ (m(!0), C(T, null, oe(R.items, ({ icon: h, label: D, disabled: w, itemClass: A, onClick: _ }) => (m(), I(f, {
57
57
  key: D,
58
58
  disabled: w,
59
59
  onClick: () => {
@@ -83,13 +83,13 @@ const vt = /* @__PURE__ */ X({
83
83
  },
84
84
  emits: ["apply:product"],
85
85
  setup(L, { emit: S }) {
86
- const u = L, R = S, { t: V } = le(), h = u.initialValue.map((A) => ({ _id: A })), f = E(H.clone(h)), y = nt(
87
- () => !H.isEqual(f.value, h),
86
+ const u = L, R = S, { t: V } = le(), k = u.initialValue.map((A) => ({ _id: A })), f = E(H.clone(k)), y = nt(
87
+ () => !H.isEqual(f.value, k),
88
88
  () => {
89
- k.value = !1;
89
+ h.value = !1;
90
90
  }
91
- ), k = E(!1), D = (A) => {
92
- at.isBoolean(A) ? k.value = A : k.value = !k.value, k.value && (f.value = u.initialValue.map((_) => ({ _id: _ })));
91
+ ), h = E(!1), D = (A) => {
92
+ at.isBoolean(A) ? h.value = A : h.value = !h.value, h.value && (f.value = u.initialValue.map((_) => ({ _id: _ })));
93
93
  }, w = ne();
94
94
  return (A, _) => {
95
95
  const b = M("fm-button"), q = M("fm-side-sheet");
@@ -97,8 +97,8 @@ const vt = /* @__PURE__ */ X({
97
97
  Ne(A.$slots, "default", { trigger: D }),
98
98
  s(q, {
99
99
  id: "group-form",
100
- modelValue: k.value,
101
- "onUpdate:modelValue": _[1] || (_[1] = (N) => k.value = N),
100
+ modelValue: h.value,
101
+ "onUpdate:modelValue": _[1] || (_[1] = (N) => h.value = N),
102
102
  "is-container": r(_e).FmForm,
103
103
  "is-container-props": {
104
104
  onValidationSuccess: () => {
@@ -148,21 +148,21 @@ const vt = /* @__PURE__ */ X({
148
148
  }), bt = {
149
149
  key: 0,
150
150
  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" }, Ct = /* @__PURE__ */ X({
151
+ }, kt = { class: "text-fm-color-typo-secondary mb-2" }, ht = { class: "list-disc list-inside text-fm-color-typo-secondary ml-4 space-y-1" }, Ct = /* @__PURE__ */ X({
152
152
  __name: "DeleteGroupDialog",
153
153
  props: {
154
154
  group: {}
155
155
  },
156
156
  setup(L) {
157
- const S = L, { t: u } = le(), R = ne(), V = g(() => S.group.itemsLinked.map((h) => {
158
- const f = R.state.menu.modules.item.find((y) => y._id === h);
159
- return (f == null ? void 0 : f.name) || h;
157
+ const S = L, { t: u } = le(), R = ne(), V = g(() => S.group.itemsLinked.map((k) => {
158
+ const f = R.state.menu.modules.item.find((y) => y._id === k);
159
+ return (f == null ? void 0 : f.name) || k;
160
160
  }).filter(Boolean));
161
- return (h, f) => (m(), C("div", null, [
162
- d("div", null, G(r(u)("menu.group.dialogs.delete.message", { name: h.group.name })), 1),
161
+ return (k, f) => (m(), C("div", null, [
162
+ d("div", null, G(r(u)("menu.group.dialogs.delete.message", { name: k.group.name })), 1),
163
163
  V.value.length > 0 ? (m(), C("div", bt, [
164
- d("div", ht, G(r(u)("menu.group.dialogs.delete.unlink_warning", { count: V.value.length })), 1),
165
- d("ul", kt, [
164
+ d("div", kt, G(r(u)("menu.group.dialogs.delete.unlink_warning", { count: V.value.length })), 1),
165
+ d("ul", ht, [
166
166
  (m(!0), C(T, null, oe(V.value, (y) => (m(), C("li", {
167
167
  key: y,
168
168
  class: "text-sm"
@@ -207,7 +207,7 @@ const vt = /* @__PURE__ */ X({
207
207
  setup(L, {
208
208
  emit: S
209
209
  }) {
210
- const u = ne(), R = Ke(), V = qe(), h = Ie(Te(V)), f = Qe(), y = g(() => u.rules.group), k = g(() => new ge(u, h.updateMenu, f)), D = g(() => k.value.mapGroups(u.groups, !1)), {
210
+ const u = ne(), R = Ke(), V = qe(), k = Ie(Te(V)), f = Qe(), y = g(() => u.rules.group), h = g(() => new ge(u, k.updateMenu, f)), D = g(() => h.value.mapGroups(u.groups, !1)), {
211
211
  searchKey: w,
212
212
  filter: A
213
213
  } = dt(), _ = E(!1), b = E(null), {
@@ -218,7 +218,7 @@ const vt = /* @__PURE__ */ X({
218
218
  valueSource: D,
219
219
  entity: "group"
220
220
  }), z = g(() => {
221
- const t = (a) => A([a.name, ...Object.values(a.items).flatMap((l) => `${l.code} ${l.name} ${Le.Dinero.fromFdoDinero(l.price).toFormat()}`), a.type]), e = (a) => !a.customAttributes && !ae.value ? !0 : je(a.customAttributes ?? {}, ae.value);
221
+ const t = (a) => A([a.name, ...Object.values(a.items).flatMap((n) => `${n.code} ${n.name ?? n.fallbackName} ${Le.Dinero.fromFdoDinero(n.price).toFormat()}`), a.type]), e = (a) => !a.customAttributes && !ae.value ? !0 : je(a.customAttributes ?? {}, ae.value);
222
222
  return D.value.filter((a) => t(a) && e(a)).filter((a) => !b.value || a.type === b.value);
223
223
  }), be = S;
224
224
  Re(() => z.value.length, () => {
@@ -229,14 +229,14 @@ const vt = /* @__PURE__ */ X({
229
229
  const c = g(() => !!u.state.currentCatalogId || !!u.state.currentSchedulerId);
230
230
  function re(t) {
231
231
  var Y, o;
232
- const e = !u.state.currentCatalogId, a = !u.state.currentSchedulerId, l = ((Y = u.currentCatalog) == null ? void 0 : Y.priceTierRules) ?? ((o = u.currentCatalog) == null ? void 0 : o.usePriceTiers), i = u.rules.item.bindToVariant, F = u.rules.group.type, p = u.version === v.F_MENU_VERSION.enum.v3, P = u.rules.item.orderFromActiveOnly;
232
+ const e = !u.state.currentCatalogId, a = !u.state.currentSchedulerId, n = ((Y = u.currentCatalog) == null ? void 0 : Y.priceTierRules) ?? ((o = u.currentCatalog) == null ? void 0 : o.usePriceTiers), i = u.rules.item.bindToVariant, F = u.rules.group.type, p = u.version === v.F_MENU_VERSION.enum.v3, P = u.rules.item.orderFromActiveOnly;
233
233
  return {
234
234
  link: (O) => !c.value && (!O || i),
235
235
  name: (O) => !c.value && !O,
236
236
  isDefault: (O) => !c.value,
237
237
  type: F && !t._id && !c.value,
238
238
  price: !p || t.type !== v.F_ADDON_GROUP_TYPE.enum.DYNAMIC,
239
- priceEdit: !(l && l.length > 0 && !p && a),
239
+ priceEdit: !(n && n.length > 0 && !p && a),
240
240
  priceTier: !p && a && e,
241
241
  inventory: a ? p ? !c.value && t.type === v.F_ADDON_GROUP_TYPE.enum.NORMAL : !c.value : !1,
242
242
  orderFrom: (O) => a ? p ? t.type === v.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? c.value : !!c.value == !O : c.value : !1,
@@ -248,8 +248,8 @@ const vt = /* @__PURE__ */ X({
248
248
  isV4: !p
249
249
  };
250
250
  }
251
- const he = g(() => {
252
- const t = !u.state.currentSchedulerId, e = u.rules.group.type, a = u.version === v.F_MENU_VERSION.enum.v3, l = u.rules.item.orderFromActiveOnly, i = u.rules.item.bindToVariant;
251
+ const ke = g(() => {
252
+ const t = !u.state.currentSchedulerId, e = u.rules.group.type, a = u.version === v.F_MENU_VERSION.enum.v3, n = u.rules.item.orderFromActiveOnly, i = u.rules.item.bindToVariant;
253
253
  return function(p) {
254
254
  return {
255
255
  link: (P) => !c.value && (!P || i),
@@ -261,7 +261,7 @@ const vt = /* @__PURE__ */ X({
261
261
  priceTier: u.isV4,
262
262
  inventory: t ? a ? !c.value && p.type === v.F_ADDON_GROUP_TYPE.enum.NORMAL : !c.value : !1,
263
263
  orderFrom: (P) => t ? a ? p.type === v.F_ADDON_GROUP_TYPE.enum.DYNAMIC ? c.value : !!c.value == !P : c.value : !1,
264
- orderFromActiveOnly: l,
264
+ orderFromActiveOnly: n,
265
265
  showOrderFrom: t ? a ? c.value ? !0 : p.type === v.F_ADDON_GROUP_TYPE.enum.PRODUCT : c.value : !1,
266
266
  bindToVariant: i,
267
267
  isOverride: c.value,
@@ -269,36 +269,36 @@ const vt = /* @__PURE__ */ X({
269
269
  isV4: !a
270
270
  };
271
271
  };
272
- }), ke = g(() => ({
272
+ }), he = g(() => ({
273
273
  ...$e.generator.initMenuV4Group(),
274
274
  type: u.version === v.F_MENU_VERSION.enum.v4 ? v.F_ADDON_GROUP_TYPE.enum.PRODUCT : v.F_ADDON_GROUP_TYPE.enum.NORMAL,
275
275
  items: {},
276
276
  position: u.groups.length - 1,
277
277
  itemsLinked: []
278
- })), Z = g(() => he.value(ke.value).type);
278
+ })), Z = g(() => ke.value(he.value).type);
279
279
  function ue(t) {
280
- k.value.sortGroups(t);
280
+ h.value.sortGroups(t);
281
281
  }
282
282
  function Ce(t) {
283
283
  f.open({
284
- title: n("menu.group.actions.duplicate.title"),
285
- message: n("menu.group.actions.duplicate.message", {
284
+ title: l("menu.group.actions.duplicate.title"),
285
+ message: l("menu.group.actions.duplicate.message", {
286
286
  name: t.name
287
287
  }),
288
288
  primaryActions: {
289
- text: n("menu.common.actions.yes"),
289
+ text: l("menu.common.actions.yes"),
290
290
  close: !0
291
291
  },
292
292
  secondaryActions: {
293
- text: n("menu.common.actions.cancel"),
293
+ text: l("menu.common.actions.cancel"),
294
294
  close: !0
295
295
  }
296
- }).onPrimary(() => k.value.duplicateGroup(t));
296
+ }).onPrimary(() => h.value.duplicateGroup(t));
297
297
  }
298
- const ee = g(() => u.currentCatalog), B = g(() => u.currentScheduler), j = g(() => new pt(ee.value, u, h.updateMenu, f)), te = g(() => new rt(B.value, u, h.updateMenu, f)), we = (t) => {
298
+ const ee = g(() => u.currentCatalog), B = g(() => u.currentScheduler), j = g(() => new pt(ee.value, u, k.updateMenu, f)), te = g(() => new rt(B.value, u, k.updateMenu, f)), we = (t) => {
299
299
  let e = t;
300
- function a(l) {
301
- const F = u.state.menu.modules.group.find((o) => o._id === l._id), p = (l.items ?? []).reduce((o, O) => (o[O._id] = [...o[O._id] || [], O.combinationKey || ""], o), {}), Y = (F.items ?? []).filter((o) => {
300
+ function a(n) {
301
+ const F = u.state.menu.modules.group.find((o) => o._id === n._id), p = (n.items ?? []).reduce((o, O) => (o[O._id] = [...o[O._id] || [], O.combinationKey || ""], o), {}), Y = (F.items ?? []).filter((o) => {
302
302
  var O;
303
303
  return !((O = p[o._id]) != null && O.includes(o.combinationKey || ""));
304
304
  }).map((o) => ({
@@ -308,15 +308,15 @@ const vt = /* @__PURE__ */ X({
308
308
  })).filter((o) => !!u.mergedMenu.modules.item.find((O) => O._id === o._id));
309
309
  return {
310
310
  ...F,
311
- ...Object.fromEntries(Object.entries(l).filter(([, o]) => !!o)),
312
- items: [...l.items ?? [], ...Y]
311
+ ...Object.fromEntries(Object.entries(n).filter(([, o]) => !!o)),
312
+ items: [...n.items ?? [], ...Y]
313
313
  };
314
314
  }
315
315
  if (c.value) {
316
- let l;
317
- ee.value ? B.value ? l = j.value.getCatalogSchedulerGroup(t._id, B.value._id) : l = j.value.getCatalogGroup(t._id) : l = te.value.getSchedulerGroup(t._id);
318
- const i = a(l);
319
- e = new ge(u, h.updateMenu, f).mapGroups([i], !0)[0];
316
+ let n;
317
+ ee.value ? B.value ? n = j.value.getCatalogSchedulerGroup(t._id, B.value._id) : n = j.value.getCatalogGroup(t._id) : n = te.value.getSchedulerGroup(t._id);
318
+ const i = a(n);
319
+ e = new ge(u, k.updateMenu, f).mapGroups([i], !0)[0];
320
320
  }
321
321
  return {
322
322
  group: e,
@@ -326,22 +326,22 @@ const vt = /* @__PURE__ */ X({
326
326
  };
327
327
  function Oe(t) {
328
328
  f.open({
329
- title: n("menu.group.dialogs.delete.title"),
329
+ title: l("menu.group.dialogs.delete.title"),
330
330
  contentComponent: Ct,
331
331
  contentComponentProps: {
332
332
  group: t
333
333
  },
334
334
  primaryActions: {
335
- text: n("menu.common.actions.delete"),
335
+ text: l("menu.common.actions.delete"),
336
336
  close: !0,
337
337
  variant: Je.Destructive
338
338
  },
339
339
  secondaryActions: {
340
- text: n("menu.common.actions.cancel"),
340
+ text: l("menu.common.actions.cancel"),
341
341
  close: !0
342
342
  }
343
343
  }).onPrimary(async () => {
344
- await k.value.deleteGroup(t);
344
+ await h.value.deleteGroup(t);
345
345
  });
346
346
  }
347
347
  function se(t, e) {
@@ -351,20 +351,20 @@ const vt = /* @__PURE__ */ X({
351
351
  group: it(t),
352
352
  editable: y.value.applyProduct,
353
353
  "onApply:product": async (a) => {
354
- var l;
354
+ var n;
355
355
  for (const i of a)
356
356
  if (ft(u.state.menu, t._id, i._id)) {
357
- const F = (l = u.state.menu.modules.item.find((p) => p._id === i._id)) == null ? void 0 : l.name;
357
+ const F = (n = u.state.menu.modules.item.find((p) => p._id === i._id)) == null ? void 0 : n.name;
358
358
  V.open({
359
359
  type: "error",
360
- message: n("menu.product.form.group.circularError", {
360
+ message: l("menu.product.form.group.circularError", {
361
361
  groupName: t.name,
362
362
  productName: F
363
363
  })
364
364
  });
365
365
  return;
366
366
  }
367
- await k.value.applyItems(t, a.map((i) => i._id));
367
+ await h.value.applyItems(t, a.map((i) => i._id));
368
368
  }
369
369
  }, {
370
370
  default: e
@@ -373,21 +373,21 @@ const vt = /* @__PURE__ */ X({
373
373
  const ie = (t) => {
374
374
  const e = t.group;
375
375
  return se(e, ({
376
- trigger: l
376
+ trigger: n
377
377
  }) => {
378
378
  const i = [{
379
- label: n("menu.common.actions.edit"),
379
+ label: l("menu.common.actions.edit"),
380
380
  onClick: () => me(e)
381
381
  }, {
382
- label: n("menu.group.actions.apply_product"),
382
+ label: l("menu.group.actions.apply_product"),
383
383
  disable: !y.value.applyProduct,
384
- onClick: l
384
+ onClick: n
385
385
  }, {
386
- label: n("menu.group.actions.duplicate_action"),
386
+ label: l("menu.group.actions.duplicate_action"),
387
387
  disabled: !y.value.create,
388
388
  onClick: () => Ce(e)
389
389
  }, {
390
- label: n("menu.common.actions.delete"),
390
+ label: l("menu.common.actions.delete"),
391
391
  itemClass: "text-fm-color-typo-error",
392
392
  disabled: !y.value.delete,
393
393
  onClick: () => Oe(e)
@@ -399,34 +399,34 @@ const vt = /* @__PURE__ */ X({
399
399
  });
400
400
  }, xe = g(() => [{
401
401
  accessorKey: "name",
402
- header: () => n("menu.group.list.columns.name"),
402
+ header: () => l("menu.group.list.columns.name"),
403
403
  enableSorting: !1
404
404
  }, {
405
405
  accessorKey: "items",
406
- header: () => n("menu.group.list.columns.products"),
406
+ header: () => l("menu.group.list.columns.products"),
407
407
  enableSorting: !1,
408
408
  cell: (t) => {
409
- const e = t.getValue(), a = Object.values(e).map((l) => {
409
+ const e = t.getValue(), a = Object.values(e).map((n) => {
410
410
  var F;
411
- const i = [(l == null ? void 0 : l.code) || "", l.name || l.fallbackName].join(" ").trim();
412
- return (l.items || []).length > 1 ? `${i} (${n("menu.group.list.variants", {
413
- count: (F = l.items) == null ? void 0 : F.length
411
+ const i = [(n == null ? void 0 : n.code) || "", n.name || n.fallbackName].join(" ").trim();
412
+ return (n.items || []).length > 1 ? `${i} (${l("menu.group.list.variants", {
413
+ count: (F = n.items) == null ? void 0 : F.length
414
414
  })})` : i;
415
415
  });
416
- return a.length > 5 ? `${a.slice(0, 5).join(", ")} ${n("menu.group.list.more_items", {
416
+ return a.length > 5 ? `${a.slice(0, 5).join(", ")} ${l("menu.group.list.more_items", {
417
417
  count: a.length - 5
418
418
  })}` : a.join(", ");
419
419
  }
420
420
  }, {
421
421
  accessorKey: "type",
422
- header: () => n("menu.group.list.columns.type"),
422
+ header: () => l("menu.group.list.columns.type"),
423
423
  enableSorting: !1,
424
424
  cell: (t) => {
425
425
  const e = t.row.original;
426
426
  return {
427
- [v.F_ADDON_GROUP_TYPE.enum.NORMAL]: n("menu.group.list.types.normal"),
428
- [v.F_ADDON_GROUP_TYPE.enum.PRODUCT]: n("menu.group.list.types.product"),
429
- [v.F_ADDON_GROUP_TYPE.enum.DYNAMIC]: n("menu.group.list.types.dynamic")
427
+ [v.F_ADDON_GROUP_TYPE.enum.NORMAL]: l("menu.group.list.types.normal"),
428
+ [v.F_ADDON_GROUP_TYPE.enum.PRODUCT]: l("menu.group.list.types.product"),
429
+ [v.F_ADDON_GROUP_TYPE.enum.DYNAMIC]: l("menu.group.list.types.dynamic")
430
430
  }[e.type] || "-";
431
431
  },
432
432
  meta: {
@@ -435,7 +435,7 @@ const vt = /* @__PURE__ */ X({
435
435
  }, {
436
436
  id: "tagging",
437
437
  accessorKey: "tagging",
438
- header: () => n("menu.product.table.columns.tagging"),
438
+ header: () => l("menu.product.table.columns.tagging"),
439
439
  enableSorting: !1,
440
440
  size: 140,
441
441
  cell: (t) => {
@@ -448,18 +448,18 @@ const vt = /* @__PURE__ */ X({
448
448
  }
449
449
  }, {
450
450
  accessorKey: "itemsLinked",
451
- header: () => n("menu.group.list.columns.applied_products"),
451
+ header: () => l("menu.group.list.columns.applied_products"),
452
452
  enableSorting: !1,
453
453
  cell: (t) => {
454
- const e = t.getValue(), a = n("menu.group.list.items_linked", {
454
+ const e = t.getValue(), a = l("menu.group.list.items_linked", {
455
455
  count: e.length
456
456
  });
457
457
  return se(t.row.original, ({
458
- trigger: l
458
+ trigger: n
459
459
  }) => s("div", {
460
460
  class: "w-fit cursor-pointer border-b border-dashed border-fm-color-neutral-gray-300 hover:border-fm-color-neutral-gray-400",
461
461
  onClick: (i) => {
462
- i.stopPropagation(), l(i);
462
+ i.stopPropagation(), n(i);
463
463
  }
464
464
  }, [a]));
465
465
  }
@@ -484,21 +484,21 @@ const vt = /* @__PURE__ */ X({
484
484
  tagging: ((t = R.groupAttributeSettings) == null ? void 0 : t.value.length) > 0
485
485
  };
486
486
  }), Ae = async (t) => {
487
- const e = ct(t), a = e.group, l = mt(a, re(t));
487
+ const e = ct(t), a = e.group, n = mt(a, re(t));
488
488
  if (c.value)
489
- ee.value ? (B.value ? j.value.overrideCatalogSchedulerGroups([l], B.value._id) : j.value.overrideCatalogGroups([l]), await j.value.update()) : (te.value.overrideSchedulerGroups([l]), await te.value.update());
489
+ ee.value ? (B.value ? j.value.overrideCatalogSchedulerGroups([n], B.value._id) : j.value.overrideCatalogGroups([n]), await j.value.update()) : (te.value.overrideSchedulerGroups([n]), await te.value.update());
490
490
  else {
491
491
  const i = {
492
492
  module: v.F_MENU_MODULE_V4_KEY.enum.group,
493
493
  operation: ze.F_OPERATION_TYPE.update,
494
- data: l,
494
+ data: n,
495
495
  link: [{
496
496
  module: v.F_MENU_MODULE_V4_KEY.enum.item,
497
497
  id: "",
498
498
  data: e.linkItems
499
499
  }]
500
500
  };
501
- await h.updateMenu(i, l.name);
501
+ await k.updateMenu(i, n.name);
502
502
  }
503
503
  }, $ = E(null), ce = E(null), me = async (t) => {
504
504
  var e;
@@ -508,7 +508,7 @@ const vt = /* @__PURE__ */ X({
508
508
  me(t.original);
509
509
  }
510
510
  const Me = ye(), Ge = g(() => Me.breakpoints.value.xs), {
511
- t: n
511
+ t: l
512
512
  } = le(), Pe = g(() => {
513
513
  var t;
514
514
  return ((t = R.groupAttributeSettings) == null ? void 0 : t.value.length) > 0;
@@ -530,20 +530,20 @@ const vt = /* @__PURE__ */ X({
530
530
  }, null)]) : null
531
531
  }) : null;
532
532
  return (t, e) => {
533
- const a = M("fm-button"), l = M("fm-chip"), i = M("fm-menu-item"), F = M("fm-menu"), p = M("fm-search"), P = M("fm-table"), Y = M("fm-bottom-sheet");
533
+ const a = M("fm-button"), n = M("fm-chip"), i = M("fm-menu-item"), F = M("fm-menu"), p = M("fm-search"), P = M("fm-table"), Y = M("fm-bottom-sheet");
534
534
  return m(), C(T, null, [$.value ? (m(), I(ut, Ee({
535
535
  ref_key: "groupManagerFormRef",
536
536
  ref: ce,
537
537
  key: $.value._id
538
538
  }, we($.value), {
539
539
  action: "update",
540
- title: r(n)("menu.group.dialogs.update.title"),
540
+ title: r(l)("menu.group.dialogs.update.title"),
541
541
  group: $.value,
542
542
  "onUpdate:group": e[0] || (e[0] = (o) => $.value = o),
543
543
  "onSubmit:group": e[1] || (e[1] = (o) => Ae(o))
544
544
  }), null, 16, ["title", "group"])) : U("", !0), D.value.length === 0 ? (m(), C("div", wt, [s(Ye, {
545
- subtitle: r(n)("menu.group.empty.subtitle"),
546
- title: r(n)("menu.group.empty.title")
545
+ subtitle: r(l)("menu.group.empty.subtitle"),
546
+ title: r(l)("menu.group.empty.title")
547
547
  }, Se({
548
548
  _: 2
549
549
  }, [y.value.create ? {
@@ -553,7 +553,7 @@ const vt = /* @__PURE__ */ X({
553
553
  trigger: o
554
554
  }) => [s(a, {
555
555
  "prepend-icon": "add",
556
- label: r(n)("menu.group.actions.add"),
556
+ label: r(l)("menu.group.actions.add"),
557
557
  onClick: Ue(o, ["stop"])
558
558
  }, null, 8, ["label", "onClick"])]),
559
559
  _: 1
@@ -567,7 +567,7 @@ const vt = /* @__PURE__ */ X({
567
567
  autofocus: "",
568
568
  modelValue: r(w),
569
569
  "onUpdate:modelValue": e[9] || (e[9] = (o) => J(w) ? w.value = o : null),
570
- placeholder: r(n)("menu.group.search.placeholder")
570
+ placeholder: r(l)("menu.group.search.placeholder")
571
571
  }, null, 8, ["modelValue", "placeholder"])]), e[17] || (e[17] = d("div", {
572
572
  class: "bg-fm-color-neutral-gray-100 w-full h-px rounded-md"
573
573
  }, null, -1)), d("div", Mt, [s(de), Z.value ? (m(), I(Y, {
@@ -575,9 +575,9 @@ const vt = /* @__PURE__ */ X({
575
575
  modelValue: _.value,
576
576
  "onUpdate:modelValue": e[14] || (e[14] = (o) => _.value = o)
577
577
  }, {
578
- "bottom-sheet-button": x(() => [s(l, {
579
- label: r(n)("menu.group.type.title", {
580
- type: b.value ? r(H.capitalize)(b.value) : r(n)("menu.common.labels.all")
578
+ "bottom-sheet-button": x(() => [s(n, {
579
+ label: r(l)("menu.group.type.title", {
580
+ type: b.value ? r(H.capitalize)(b.value) : r(l)("menu.common.labels.all")
581
581
  }),
582
582
  class: "text-fm-color-typo-secondary",
583
583
  "right-icon": "keyboard_arrow_down"
@@ -585,16 +585,16 @@ const vt = /* @__PURE__ */ X({
585
585
  default: x(() => [d("div", null, [d("div", {
586
586
  class: "px-16 py-8",
587
587
  onClick: e[10] || (e[10] = (o) => b.value = null)
588
- }, G(r(n)("menu.group.type.all")), 1), d("div", {
588
+ }, G(r(l)("menu.group.type.all")), 1), d("div", {
589
589
  class: "px-16 py-8",
590
590
  onClick: e[11] || (e[11] = (o) => b.value = "NORMAL")
591
- }, G(r(n)("menu.group.type.normal")), 1), d("div", {
591
+ }, G(r(l)("menu.group.type.normal")), 1), d("div", {
592
592
  class: "px-16 py-8",
593
593
  onClick: e[12] || (e[12] = (o) => b.value = "PRODUCT")
594
- }, G(r(n)("menu.group.type.product")), 1), d("div", {
594
+ }, G(r(l)("menu.group.type.product")), 1), d("div", {
595
595
  class: "px-16 py-8",
596
596
  onClick: e[13] || (e[13] = (o) => b.value = "DYNAMIC")
597
- }, G(r(n)("menu.group.type.dynamic")), 1)])]),
597
+ }, G(r(l)("menu.group.type.dynamic")), 1)])]),
598
598
  _: 1
599
599
  }, 8, ["modelValue"])) : U("", !0)]), K.value ? (m(), C("div", Gt, [s(r(ve), {
600
600
  ref_key: "attributeFilterRef",
@@ -615,7 +615,7 @@ const vt = /* @__PURE__ */ X({
615
615
  }) => [(m(), C("div", {
616
616
  key: o._id,
617
617
  class: W(["py-12 px-16", "flex space-x-16", "items-center"])
618
- }, [d("div", Pt, [d("div", Vt, [d("p", Nt, G(o.name), 1), d("div", null, [Z.value ? (m(), C("p", Rt, G(r(H.capitalize)(o.type)) + " type ", 1)) : U("", !0), d("p", Et, G(r(n)("menu.group.list.products_linked", {
618
+ }, [d("div", Pt, [d("div", Vt, [d("p", Nt, G(o.name), 1), d("div", null, [Z.value ? (m(), C("p", Rt, G(r(H.capitalize)(o.type)) + " type ", 1)) : U("", !0), d("p", Et, G(r(l)("menu.group.list.products_linked", {
619
619
  count: o.itemsLinked.length
620
620
  })), 1)])]), s(ie, {
621
621
  group: o
@@ -624,28 +624,28 @@ const vt = /* @__PURE__ */ X({
624
624
  }, 8, ["model-value"])], 64)) : (m(), C("div", Ot, [d("div", xt, [s(de), Z.value ? (m(), I(F, {
625
625
  key: 0
626
626
  }, {
627
- "menu-button": x(() => [s(l, {
628
- label: r(n)("menu.group.type.title", {
629
- type: b.value ? r(H.capitalize)(b.value) : r(n)("menu.common.labels.all")
627
+ "menu-button": x(() => [s(n, {
628
+ label: r(l)("menu.group.type.title", {
629
+ type: b.value ? r(H.capitalize)(b.value) : r(l)("menu.common.labels.all")
630
630
  }),
631
631
  class: "text-fm-color-typo-secondary",
632
632
  "right-icon": "keyboard_arrow_down"
633
633
  }, null, 8, ["label"])]),
634
634
  default: x(() => [d("div", null, [s(i, {
635
635
  class: "px-16 py-8",
636
- label: r(n)("menu.group.type.all"),
636
+ label: r(l)("menu.group.type.all"),
637
637
  onClick: e[2] || (e[2] = (o) => b.value = null)
638
638
  }, null, 8, ["label"]), s(i, {
639
639
  class: "px-16 py-8",
640
- label: r(n)("menu.group.type.normal"),
640
+ label: r(l)("menu.group.type.normal"),
641
641
  onClick: e[3] || (e[3] = (o) => b.value = "NORMAL")
642
642
  }, null, 8, ["label"]), s(i, {
643
643
  class: "px-16 py-8",
644
- label: r(n)("menu.group.type.product"),
644
+ label: r(l)("menu.group.type.product"),
645
645
  onClick: e[4] || (e[4] = (o) => b.value = "PRODUCT")
646
646
  }, null, 8, ["label"]), s(i, {
647
647
  class: "px-16 py-8",
648
- label: r(n)("menu.group.type.dynamic"),
648
+ label: r(l)("menu.group.type.dynamic"),
649
649
  onClick: e[5] || (e[5] = (o) => b.value = "DYNAMIC")
650
650
  }, null, 8, ["label"])])]),
651
651
  _: 1
@@ -653,7 +653,7 @@ const vt = /* @__PURE__ */ X({
653
653
  autofocus: "",
654
654
  modelValue: r(w),
655
655
  "onUpdate:modelValue": e[6] || (e[6] = (o) => J(w) ? w.value = o : null),
656
- placeholder: r(n)("menu.group.search.placeholder")
656
+ placeholder: r(l)("menu.group.search.placeholder")
657
657
  }, null, 8, ["modelValue", "placeholder"])])]), K.value ? (m(), C("div", At, [s(r(ve), {
658
658
  ref_key: "attributeFilterRef",
659
659
  ref: Q,
@@ -664,7 +664,7 @@ const vt = /* @__PURE__ */ X({
664
664
  default: x(() => [s(P, {
665
665
  "column-defs": xe.value,
666
666
  "column-visibility": De.value,
667
- loading: r(h).checkMenuIsLoading(),
667
+ loading: r(k).checkMenuIsLoading(),
668
668
  "page-size": z.value.length,
669
669
  "row-data": z.value,
670
670
  "shrink-at": !1,
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as N, useModel as K, computed as B, resolveComponent as d, createBlock as P, openBlock as b, ref as L, watch as W, withCtx as _, createElementBlock as F, createElementVNode as I, Fragment as q, renderList as X, createVNode as u, unref as e, createCommentVNode as $, withModifiers as Q, onMounted as te, renderSlot as le, toDisplayString as h, createTextVNode as ae } from "vue";
2
2
  import { useI18n as z, useCustomAttributes as ue, useCoreStore as re, isEmptyRule as oe, EMPTY_RULE as w } from "@feedmepos/mf-common";
3
3
  import { _ as x } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
4
- import { u as D } from "./priceTier-Caduz5kC.js";
4
+ import { u as D } from "./priceTier-BDgeKSMZ.js";
5
5
  import { b as O } from "./app-5fxKLAzS.js";
6
6
  import { FmButtonVariant as Z, useDialog as ne, components as ie, FmButtonColorThemeVariant as j } from "@feedmepos/ui-library";
7
- import { m as G, f as Y, d as se, _ as me } from "./RuleView.vue_vue_type_script_setup_true_lang-ebI_HGGu.js";
8
- import { L as R } from "./catalogSetting-5jql8mtB.js";
9
- import { L as de } from "./LinkProductSideSheet-9mf8M9kO.js";
7
+ import { m as G, f as Y, d as se, _ as me } from "./RuleView.vue_vue_type_script_setup_true_lang-DaS-Kz6N.js";
8
+ import { L as R } from "./catalogSetting-xxH4HvY4.js";
9
+ import { L as de } from "./LinkProductSideSheet--ItwDJiZ.js";
10
10
  import { c as H } from "./check-C9mY6LiX.js";
11
- import { u as pe, I as J, ao as ce } from "./index.vue_vue_type_script_setup_true_lang-Bx0ozgtL.js";
11
+ import { u as pe, I as J, ao as ce } from "./index.vue_vue_type_script_setup_true_lang-CWMmOmP2.js";
12
12
  import { c as ve } from "./string-DpfFixWH.js";
13
13
  const fe = /* @__PURE__ */ N({
14
14
  __name: "LinkPriceTier",