@feedmepos/mf-menu 0.32.61-dev.3 → 0.32.63-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 (98) hide show
  1. package/dist/{App-TgWTfhbY.js → App-DhfTGlgM.js} +466 -461
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BeW-aCRL.js → ApplyProduct.vue_vue_type_script_setup_true_lang-C5-8qdJK.js} +3 -3
  3. package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-C8il14gy.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-CXm-0H18.js} +8 -8
  4. package/dist/{Catalog-hnhpn9Of.js → Catalog-WuZJfM6l.js} +78 -78
  5. package/dist/{Category-DIubPG8Y.js → Category-BeIo7XWY.js} +20 -20
  6. package/dist/{Category-wXfspM5v.js → Category-D-cQQCPS.js} +19 -19
  7. package/dist/{CookingGuide-CR1cBZ3S.js → CookingGuide-B-yvD9ZA.js} +88 -88
  8. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DlpZfbx-.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-2_yzXoa4.js} +1 -1
  9. package/dist/{Group-DbG3cLfp.js → Group-13i5igrS.js} +5 -5
  10. package/dist/{Group-DTzbprcr.js → Group-CY8lUzQG.js} +1 -1
  11. package/dist/{Group.vue_vue_type_script_setup_true_lang-CMEdW613.js → Group.vue_vue_type_script_setup_true_lang-DZhxy0tb.js} +95 -94
  12. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-aLcNgJLb.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CWqv-oUd.js} +13 -13
  13. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CnChdePY.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DTs4Vpdi.js} +219 -220
  14. package/dist/{Ingredient-BBGzGfS2.js → Ingredient-vrUOW6gk.js} +49 -49
  15. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-B9CfZ7oA.js → InventoryBinding.vue_vue_type_script_setup_true_lang-xcVjRjqD.js} +2 -2
  16. package/dist/{LinkProductSideSheet-CLd4LEy4.js → LinkProductSideSheet-DMbJG6wf.js} +8 -8
  17. package/dist/{MenuSetting-BuS9_e0y.js → MenuSetting-Di2xwm00.js} +10 -10
  18. package/dist/{OrderPacing-2QPouAql.js → OrderPacing-CCe-IcGO.js} +28 -28
  19. package/dist/{PrintRoute-D-SiyoaP.js → PrintRoute-CcfObcHY.js} +27 -27
  20. package/dist/{Product-nmlc3rrr.js → Product-ChUVnMgG.js} +1 -1
  21. package/dist/{Product.vue_vue_type_script_setup_true_lang-DYn_bqcn.js → Product.vue_vue_type_script_setup_true_lang-C9Qp50hL.js} +153 -152
  22. package/dist/{ProductInternalTools-BgDSe1XP.js → ProductInternalTools-D9HXhgo5.js} +80 -79
  23. package/dist/{Products-BPa6wC-o.js → Products-Bly2ktEC.js} +82 -81
  24. package/dist/{Publish-DbI1wemN.js → Publish-C8ubb8Qf.js} +113 -113
  25. package/dist/{Recipe-CAgscHCL.js → Recipe-BpMRLsyO.js} +32 -32
  26. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DNG5WX4W.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BD5OCDRn.js} +1 -1
  27. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DNk48PUl.js → RuleView.vue_vue_type_script_setup_true_lang-Ba3djmX1.js} +313 -312
  28. package/dist/{Scheduler-C8TXHcb2.js → Scheduler-CiB4b2Fn.js} +9 -9
  29. package/dist/{ServingSequence-CQzQWvUA.js → ServingSequence-BlcyW-dv.js} +18 -18
  30. package/dist/{Setting-gun4ZUQ4.js → Setting-DqkL6YYU.js} +31 -31
  31. package/dist/{Subcategory-CqcWpp94.js → Subcategory-B4Jg_wtT.js} +43 -43
  32. package/dist/{Takeaway-DV_ND3Ts.js → Takeaway-5G3f7jWT.js} +1 -1
  33. package/dist/{Takeaway-DsRU9wBO.js → Takeaway-5rFPYYNA.js} +16 -16
  34. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-GMA7-Hrb.js → Takeaway.vue_vue_type_script_setup_true_lang-CVsOhg_E.js} +23 -23
  35. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-DAwsbPs4.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-CPqxA6JD.js} +1 -1
  36. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DYVBVDBy.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-yrNuTD-3.js} +8 -9
  37. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-T71R68sq.js +5836 -0
  38. package/dist/{Unit-BcPn6opY.js → Unit-CAkdmQLg.js} +2 -2
  39. package/dist/{Variant-Wkd9mHWk.js → Variant-BbLQqbAK.js} +13 -13
  40. package/dist/{_id_-CuOgqnZ3.js → _id_-Dzacr40I.js} +13 -13
  41. package/dist/{app-BsNMWUZ9.js → app-4yWs09Fr.js} +495 -495
  42. package/dist/{app-kS8tUq_w.js → app-Deov1985.js} +3 -3
  43. package/dist/app.js +1 -1
  44. package/dist/apps/mf-menu/src/api/media.d.ts +161 -0
  45. package/dist/apps/mf-menu/src/app.d.ts +340 -0
  46. package/dist/apps/mf-menu/src/components/feature/CategoryManager/CategoriesSelector.vue.d.ts +1 -1
  47. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/productImages.d.ts +150 -0
  48. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/CustomDimensionDialog.vue.d.ts +17 -0
  49. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ImageUploadDialog.vue.d.ts +16 -1
  50. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ManageImageDrawer.vue.d.ts +42 -0
  51. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ProductImageField.vue.d.ts +75 -0
  52. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/RegenerateImageDialog.vue.d.ts +17 -0
  53. package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ProductDetail.vue.d.ts +3 -6
  54. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +1 -1
  55. package/dist/apps/mf-menu/src/composable/remyImageTarget.d.ts +5 -0
  56. package/dist/apps/mf-menu/src/helper/menu.d.ts +14 -1
  57. package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
  58. package/dist/apps/mf-menu/src/types/rule.d.ts +2 -0
  59. package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +3 -2
  60. package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/ProductDetail.vue.d.ts +8 -8
  61. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  62. package/dist/assets/{linked-status-CHvHJGH9.js → linked-status-B2WLhKkV.js} +4 -4
  63. package/dist/assets/{menu-export-Bd2A9o3e.js → menu-export-Dcw5a_dN.js} +3 -3
  64. package/dist/assets/{override-menu-cifFGmrk.js → override-menu-cBe2aMY6.js} +4 -4
  65. package/dist/assets/{validate-menu-B8cp1kCt.js → validate-menu-BM-5GK85.js} +3 -3
  66. package/dist/{catalog-BxfmkFrE.js → catalog-DKygS2Cs.js} +6 -6
  67. package/dist/{catalogSetting-ebS4mr1i.js → catalogSetting-Bn2TplvM.js} +1 -1
  68. package/dist/currency-DXgNHtK8.js +7 -0
  69. package/dist/dayjs.min-DpX65tgj.js +7 -0
  70. package/dist/discardConfirm-DZwzKO-Q.js +3704 -0
  71. package/dist/{index-CUrfs4iN.js → index-B48KLyqg.js} +61 -61
  72. package/dist/{index-BxvnAb0l.js → index-BEocaqRK.js} +30 -30
  73. package/dist/index-K-MBqJJo.js +222 -0
  74. package/dist/{index.vue_vue_type_script_setup_true_lang-C3c2B-qJ.js → index.vue_vue_type_script_setup_true_lang-Nl505vPi.js} +44918 -51563
  75. package/dist/item-Da3ArD-G.js +13213 -0
  76. package/dist/{jszip.min-DccvCJln.js → jszip.min-Cc2eR4Cq.js} +52 -52
  77. package/dist/linkProducts-GNuUxFEE.js +331 -0
  78. package/dist/{memberPricing-FatZi_6k.js → memberPricing-T-jr7tn1.js} +1 -1
  79. package/dist/{menu-DcPMF0nf.js → menu-DSDRAil-.js} +1 -1
  80. package/dist/{menuV2-CVo-19H-.js → menuV2-fTlJdjxi.js} +89 -87
  81. package/dist/mf-menu.css +1 -1
  82. package/dist/{order_pacing-CWDYwJcW.js → order_pacing-Dgo1fySS.js} +17 -17
  83. package/dist/packages/shared/src/helpers/agentCode.d.ts +9 -0
  84. package/dist/{priceTier-C58Ixr5m.js → priceTier-aT_gIfrN.js} +3 -3
  85. package/dist/{rules-DwomOoC9.js → rules-Cx2hkV20.js} +8 -8
  86. package/dist/{scheduler-CJcxPgeF.js → scheduler-Bd-q7yF8.js} +62 -62
  87. package/dist/{toExcel-DjWt9SEm.js → toExcel-qfjR83qT.js} +2 -2
  88. package/dist/{unit-KhTILQfe.js → unit-n1T9grbM.js} +64 -64
  89. package/package.json +3 -3
  90. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-C5hn1NYM.js +0 -399
  91. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BFUOqfDO.js +0 -6058
  92. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/thumbnailUpload.d.ts +0 -6
  93. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ImageUploadForm.vue.d.ts +0 -38
  94. package/dist/currency-BM5m7MDE.js +0 -7
  95. package/dist/dayjs.min-X4vHGjJn.js +0 -7
  96. package/dist/discardConfirm-BHni0LNu.js +0 -28
  97. package/dist/index-CisutoS9.js +0 -156
  98. package/dist/item-26-Gw7Ug.js +0 -9098
@@ -1,32 +1,33 @@
1
- import { defineComponent as oe, computed as f, resolveComponent as V, createBlock as R, openBlock as m, withCtx as x, createElementBlock as y, Fragment as E, renderList as ne, createElementVNode as p, normalizeClass as q, toDisplayString as A, createVNode as i, createCommentVNode as N, unref as u, ref as T, watch as $e, h as Y, mergeProps as De, createSlots as Pe, withModifiers as Te, isRef as Q, nextTick as pe } from "vue";
2
- import { u as ye, P as Ee, B as Le, y as ee, R as w, A as Ue, a5 as ze, H as te, z as Be, K as fe, J as Ke } from "./index.vue_vue_type_script_setup_true_lang-C3c2B-qJ.js";
3
- import { d as je } from "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
1
+ import { defineComponent as oe, computed as f, resolveComponent as F, createBlock as R, openBlock as m, withCtx as x, createElementBlock as y, Fragment as E, renderList as ne, createElementVNode as d, normalizeClass as q, toDisplayString as A, createVNode as i, createCommentVNode as N, unref as u, ref as P, watch as $e, h as Y, mergeProps as De, createSlots as Te, withModifiers as Pe, isRef as Q, nextTick as de } from "vue";
2
+ import { l as ee } from "./discardConfirm-DZwzKO-Q.js";
3
+ import { d as Ee } from "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
4
+ import { u as ye, i as Le, b as Ue, F as te, j as w, m as je, _ as ze, a as Be, h as fe, g as Ke } from "./index.vue_vue_type_script_setup_true_lang-Nl505vPi.js";
4
5
  import { b as ve, H as Ye } from "./app-5fxKLAzS.js";
5
6
  import { useI18n as _e, useCoreStore as He, useCustomAttributes as Qe } from "@feedmepos/mf-common";
6
- import { useBreakpoints as be, useSnackbar as qe, useDialog as Je, components as We, FmButtonVariant as Xe } from "@feedmepos/ui-library";
7
- import { _ as Ze, a as et } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-DlpZfbx-.js";
8
- import { _ as tt } from "./app-BsNMWUZ9.js";
7
+ import { useBreakpoints as be, useSnackbar as qe, useDialog as We, components as Je, FmButtonVariant as Xe } from "@feedmepos/ui-library";
8
+ import { _ as Ze, a as et } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-2_yzXoa4.js";
9
+ import { _ as tt } from "./app-4yWs09Fr.js";
9
10
  import { _ as nt, a as ot } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
10
11
  import { c as lt } from "./object-DVUNCr7w.js";
11
- import { _ as rt } from "./ApplyProductDialog.vue_vue_type_script_setup_true_lang-C8il14gy.js";
12
- import { M as ge, Q as at, R as ut, O as st, i as it, A as ct, w as mt, r as dt } from "./item-26-Gw7Ug.js";
13
- import { _ as pt } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-DiK3fi9J.js";
12
+ import { _ as rt } from "./ApplyProductDialog.vue_vue_type_script_setup_true_lang-CXm-0H18.js";
13
+ import { O as ge, au as at, av as ut, ap as st, Q as it, a6 as ct, a2 as mt, R as pt } from "./item-Da3ArD-G.js";
14
+ import { _ as dt } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-DiK3fi9J.js";
14
15
  import { u as ft } from "./search-BAPEUu1R.js";
15
- import { C as vt } from "./catalog-BxfmkFrE.js";
16
+ import { C as vt } from "./catalog-DKygS2Cs.js";
16
17
  const gt = /* @__PURE__ */ oe({
17
18
  __name: "ResponsiveContextMenu",
18
19
  props: {
19
20
  items: {}
20
21
  },
21
- setup(J) {
22
+ setup(W) {
22
23
  const L = be(), a = f(() => L.breakpoints.value.xs);
23
24
  return (I, O) => {
24
- const b = V("FmButton"), k = V("FmMenuItem"), v = V("FmMenu");
25
+ const b = F("FmButton"), k = F("FmMenuItem"), v = F("FmMenu");
25
26
  return a.value ? (m(), R(nt, { key: 0 }, {
26
27
  default: x(() => [
27
- (m(!0), y(E, null, ne(I.items, ({ icon: F, label: G, disabled: h, itemClass: U, onClick: S }) => (m(), R(ot, {
28
+ (m(!0), y(E, null, ne(I.items, ({ icon: V, label: G, disabled: h, itemClass: U, onClick: S }) => (m(), R(ot, {
28
29
  key: G,
29
- icon: F,
30
+ icon: V,
30
31
  label: G,
31
32
  disabled: h,
32
33
  itemClass: U,
@@ -51,7 +52,7 @@ const gt = /* @__PURE__ */ oe({
51
52
  })
52
53
  ]),
53
54
  default: x(() => [
54
- (m(!0), y(E, null, ne(I.items, ({ icon: F, label: G, disabled: h, itemClass: U, onClick: S }) => (m(), R(k, {
55
+ (m(!0), y(E, null, ne(I.items, ({ icon: V, label: G, disabled: h, itemClass: U, onClick: S }) => (m(), R(k, {
55
56
  key: G,
56
57
  disabled: h,
57
58
  onClick: () => {
@@ -60,7 +61,7 @@ const gt = /* @__PURE__ */ oe({
60
61
  label: G
61
62
  }, {
62
63
  label: x(() => [
63
- p("span", {
64
+ d("span", {
64
65
  class: q(h ? "text-fm-color-typo-disabled" : U)
65
66
  }, A(G), 3)
66
67
  ]),
@@ -79,16 +80,16 @@ const gt = /* @__PURE__ */ oe({
79
80
  props: {
80
81
  group: {}
81
82
  },
82
- setup(J) {
83
- const L = J, { t: a } = _e(), I = ye(), O = f(() => L.group.itemsLinked.map((b) => {
83
+ setup(W) {
84
+ const L = W, { t: a } = _e(), I = ye(), O = f(() => L.group.itemsLinked.map((b) => {
84
85
  const k = I.state.menu.modules.item.find((v) => v._id === b);
85
86
  return (k == null ? void 0 : k.name) || b;
86
87
  }).filter(Boolean));
87
88
  return (b, k) => (m(), y("div", null, [
88
- p("div", null, A(u(a)("menu.group.dialogs.delete.message", { name: b.group.name })), 1),
89
+ d("div", null, A(u(a)("menu.group.dialogs.delete.message", { name: b.group.name })), 1),
89
90
  O.value.length > 0 ? (m(), y("div", yt, [
90
- p("div", _t, A(u(a)("menu.group.dialogs.delete.unlink_warning", { count: O.value.length })), 1),
91
- p("ul", bt, [
91
+ d("div", _t, A(u(a)("menu.group.dialogs.delete.unlink_warning", { count: O.value.length })), 1),
92
+ d("ul", bt, [
92
93
  (m(!0), y(E, null, ne(O.value, (v) => (m(), y("li", {
93
94
  key: v,
94
95
  class: "text-sm"
@@ -116,9 +117,9 @@ const gt = /* @__PURE__ */ oe({
116
117
  }, St = {
117
118
  key: 0,
118
119
  class: "px-16 py-8"
119
- }, Vt = {
120
- class: "flex items-center flex-1"
121
120
  }, Ft = {
121
+ class: "flex items-center flex-1"
122
+ }, Vt = {
122
123
  class: "flex-1 space-y-4"
123
124
  }, It = {
124
125
  class: "fm-typo-en-body-lg-600"
@@ -127,68 +128,68 @@ const gt = /* @__PURE__ */ oe({
127
128
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
128
129
  }, Nt = {
129
130
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
130
- }, qt = /* @__PURE__ */ oe({
131
+ }, Wt = /* @__PURE__ */ oe({
131
132
  __name: "Group",
132
133
  emits: ["update:count"],
133
- setup(J, {
134
+ setup(W, {
134
135
  emit: L
135
136
  }) {
136
- const a = ye(), I = He(), O = qe(), b = Ee(Le(O)), k = Je(), v = f(() => a.rules.group), F = f(() => new ge(a, b.updateMenu, k)), G = f(() => F.value.mapGroups(a.groups, !1)), {
137
+ const a = ye(), I = He(), O = qe(), b = Le(Ue(O)), k = We(), v = f(() => a.rules.group), V = f(() => new ge(a, b.updateMenu, k)), G = f(() => V.value.mapGroups(a.groups, !1)), {
137
138
  searchKey: h,
138
139
  filter: U
139
- } = ft(), S = T(!1), _ = T(null), {
140
+ } = ft(), S = P(!1), _ = P(null), {
140
141
  attributes: le,
141
142
  filterRule: $,
142
143
  mongoQuery: re
143
144
  } = Qe({
144
145
  valueSource: G,
145
146
  entity: "group"
146
- }), z = f(() => {
147
+ }), j = f(() => {
147
148
  const t = (r) => U([r.name, ...Object.values(r.items).flatMap((o) => `${o.code} ${o.name ?? o.fallbackName} ${Be.Dinero.fromFdoDinero(o.price).toFormat()}`), r.type]), e = (r) => !r.customAttributes && !re.value ? !0 : Ye(r.customAttributes ?? {}, re.value);
148
149
  return G.value.filter((r) => t(r) && e(r)).filter((r) => !_.value || r.type === _.value);
149
150
  }), ke = L;
150
- $e(() => z.value.length, () => {
151
- ke("update:count", z.value.length);
151
+ $e(() => j.value.length, () => {
152
+ ke("update:count", j.value.length);
152
153
  }, {
153
154
  immediate: !0
154
155
  });
155
156
  const c = f(() => !!a.state.currentCatalogId || !!a.state.currentSchedulerId);
156
157
  function ae(t) {
157
- var P, n;
158
- const e = !a.state.currentCatalogId, r = !a.state.currentSchedulerId, o = ((P = a.currentCatalog) == null ? void 0 : P.priceTierRules) ?? ((n = a.currentCatalog) == null ? void 0 : n.usePriceTiers), s = a.rules.item.bindToVariant, C = a.rules.group.type, d = a.version === ee.enum.v3, M = a.rules.item.orderFromActiveOnly;
158
+ var T, n;
159
+ const e = !a.state.currentCatalogId, r = !a.state.currentSchedulerId, o = ((T = a.currentCatalog) == null ? void 0 : T.priceTierRules) ?? ((n = a.currentCatalog) == null ? void 0 : n.usePriceTiers), s = a.rules.item.bindToVariant, C = a.rules.group.type, p = a.version === te.enum.v3, M = a.rules.item.orderFromActiveOnly;
159
160
  return {
160
161
  link: (g) => !c.value && (!g || s),
161
162
  name: (g) => !c.value && !g,
162
163
  isDefault: (g) => !c.value,
163
164
  type: C && !t._id && !c.value,
164
- price: !d || t.type !== w.enum.DYNAMIC,
165
- priceEdit: !(o && o.length > 0 && !d && r),
166
- priceTier: !d && r && e,
167
- inventory: r ? d ? !c.value && t.type === w.enum.NORMAL : !c.value : !1,
168
- orderFrom: (g) => r ? d ? t.type === w.enum.DYNAMIC ? !a.state.currentSchedulerId : !!a.state.currentSchedulerId == !g : !a.state.currentSchedulerId : !1,
165
+ price: !p || t.type !== w.enum.DYNAMIC,
166
+ priceEdit: !(o && o.length > 0 && !p && r),
167
+ priceTier: !p && r && e,
168
+ inventory: r ? p ? !c.value && t.type === w.enum.NORMAL : !c.value : !1,
169
+ orderFrom: (g) => r ? p ? t.type === w.enum.DYNAMIC ? !a.state.currentSchedulerId : !!a.state.currentSchedulerId == !g : !a.state.currentSchedulerId : !1,
169
170
  orderFromActiveOnly: M,
170
- showOrderFrom: r ? d ? c.value ? !0 : t.type === w.enum.PRODUCT : !0 : !1,
171
+ showOrderFrom: r ? p ? c.value ? !0 : t.type === w.enum.PRODUCT : !0 : !1,
171
172
  bindToVariant: s,
172
173
  isOverride: c.value,
173
174
  isItemGroup: !1,
174
- isV4: !d
175
+ isV4: !p
175
176
  };
176
177
  }
177
178
  const he = f(() => {
178
- const t = !a.state.currentSchedulerId, e = a.rules.group.type, r = a.version === ee.enum.v3, o = a.rules.item.orderFromActiveOnly, s = a.rules.item.bindToVariant;
179
- return function(d) {
179
+ const t = !a.state.currentSchedulerId, e = a.rules.group.type, r = a.version === te.enum.v3, o = a.rules.item.orderFromActiveOnly, s = a.rules.item.bindToVariant;
180
+ return function(p) {
180
181
  return {
181
182
  link: (M) => !c.value && (!M || s),
182
183
  name: (M) => !c.value && !M,
183
184
  isDefault: (M) => !c.value,
184
- type: e && !d._id && !c.value,
185
- price: d.type !== w.enum.DYNAMIC,
185
+ type: e && !p._id && !c.value,
186
+ price: p.type !== w.enum.DYNAMIC,
186
187
  priceEdit: !0,
187
188
  priceTier: a.isV4,
188
- inventory: t ? r ? !c.value && d.type === w.enum.NORMAL : !c.value : !1,
189
- orderFrom: (M) => t ? r ? d.type === w.enum.DYNAMIC ? c.value : !!c.value == !M : c.value : !1,
189
+ inventory: t ? r ? !c.value && p.type === w.enum.NORMAL : !c.value : !1,
190
+ orderFrom: (M) => t ? r ? p.type === w.enum.DYNAMIC ? c.value : !!c.value == !M : c.value : !1,
190
191
  orderFromActiveOnly: o,
191
- showOrderFrom: t ? r ? c.value ? !0 : d.type === w.enum.PRODUCT : c.value : !1,
192
+ showOrderFrom: t ? r ? c.value ? !0 : p.type === w.enum.PRODUCT : c.value : !1,
192
193
  bindToVariant: s,
193
194
  isOverride: c.value,
194
195
  isItemGroup: !1,
@@ -196,14 +197,14 @@ const gt = /* @__PURE__ */ oe({
196
197
  };
197
198
  };
198
199
  }), we = f(() => ({
199
- ...Ue.generator.initMenuV4Group(),
200
- type: a.version === ee.enum.v4 ? w.enum.PRODUCT : w.enum.NORMAL,
200
+ ...je.generator.initMenuV4Group(),
201
+ type: a.version === te.enum.v4 ? w.enum.PRODUCT : w.enum.NORMAL,
201
202
  items: {},
202
203
  position: a.groups.length - 1,
203
204
  itemsLinked: []
204
- })), W = f(() => he.value(we.value).type);
205
+ })), J = f(() => he.value(we.value).type);
205
206
  function ue(t) {
206
- F.value.sortGroups(t);
207
+ V.value.sortGroups(t);
207
208
  }
208
209
  function Ce(t) {
209
210
  k.open({
@@ -219,14 +220,14 @@ const gt = /* @__PURE__ */ oe({
219
220
  text: l("menu.common.actions.cancel"),
220
221
  close: !0
221
222
  }
222
- }).onPrimary(() => F.value.duplicateGroup(t));
223
+ }).onPrimary(() => V.value.duplicateGroup(t));
223
224
  }
224
- const X = f(() => a.currentCatalog), B = f(() => a.currentScheduler), K = f(() => new vt(X.value, a, b.updateMenu, k)), Z = f(() => new at(B.value, a, b.updateMenu, k)), xe = (t) => {
225
+ const X = f(() => a.currentCatalog), z = f(() => a.currentScheduler), B = f(() => new vt(X.value, a, b.updateMenu, k)), Z = f(() => new at(z.value, a, b.updateMenu, k)), xe = (t) => {
225
226
  let e = t;
226
227
  function r(o) {
227
- const C = a.state.menu.modules.group.find((n) => n._id === o._id), d = (o.items ?? []).reduce((n, g) => (n[g._id] = [...n[g._id] || [], g.combinationKey || ""], n), {}), P = (C.items ?? []).filter((n) => {
228
+ const C = a.state.menu.modules.group.find((n) => n._id === o._id), p = (o.items ?? []).reduce((n, g) => (n[g._id] = [...n[g._id] || [], g.combinationKey || ""], n), {}), T = (C.items ?? []).filter((n) => {
228
229
  var g;
229
- return !((g = d[n._id]) != null && g.includes(n.combinationKey || ""));
230
+ return !((g = p[n._id]) != null && g.includes(n.combinationKey || ""));
230
231
  }).map((n) => ({
231
232
  _id: n._id,
232
233
  combinationKey: n.combinationKey,
@@ -235,12 +236,12 @@ const gt = /* @__PURE__ */ oe({
235
236
  return {
236
237
  ...C,
237
238
  ...Object.fromEntries(Object.entries(o).filter(([, n]) => !!n)),
238
- items: [...o.items ?? [], ...P]
239
+ items: [...o.items ?? [], ...T]
239
240
  };
240
241
  }
241
242
  if (c.value) {
242
243
  let o;
243
- X.value ? B.value ? o = K.value.getCatalogSchedulerGroup(t._id, B.value._id) : o = K.value.getCatalogGroup(t._id) : o = Z.value.getSchedulerGroup(t._id);
244
+ X.value ? z.value ? o = B.value.getCatalogSchedulerGroup(t._id, z.value._id) : o = B.value.getCatalogGroup(t._id) : o = Z.value.getSchedulerGroup(t._id);
244
245
  const s = r(o);
245
246
  e = new ge(a, b.updateMenu, k).mapGroups([s], !0)[0];
246
247
  }
@@ -267,7 +268,7 @@ const gt = /* @__PURE__ */ oe({
267
268
  close: !0
268
269
  }
269
270
  }).onPrimary(async () => {
270
- await F.value.deleteGroup(t);
271
+ await V.value.deleteGroup(t);
271
272
  });
272
273
  }
273
274
  function se(t, e) {
@@ -280,7 +281,7 @@ const gt = /* @__PURE__ */ oe({
280
281
  var o;
281
282
  for (const s of r)
282
283
  if (ct(a.state.menu, t._id, s._id)) {
283
- const C = (o = a.state.menu.modules.item.find((d) => d._id === s._id)) == null ? void 0 : o.name;
284
+ const C = (o = a.state.menu.modules.item.find((p) => p._id === s._id)) == null ? void 0 : o.name;
284
285
  O.open({
285
286
  type: "error",
286
287
  message: l("menu.product.form.group.circularError", {
@@ -290,7 +291,7 @@ const gt = /* @__PURE__ */ oe({
290
291
  });
291
292
  return;
292
293
  }
293
- await F.value.applyItems(t, r.map((s) => s._id));
294
+ await V.value.applyItems(t, r.map((s) => s._id));
294
295
  }
295
296
  }, {
296
297
  default: e
@@ -333,7 +334,7 @@ const gt = /* @__PURE__ */ oe({
333
334
  class: "flex items-center gap-8"
334
335
  }, [Y("span", {
335
336
  class: "break-all"
336
- }, r), e.name_locale ? Y(pt, {
337
+ }, r), e.name_locale ? Y(dt, {
337
338
  nameLocale: e.name_locale ?? {}
338
339
  }) : null]);
339
340
  }
@@ -420,9 +421,9 @@ const gt = /* @__PURE__ */ oe({
420
421
  tagging: ((t = I.groupAttributeSettings) == null ? void 0 : t.value.length) > 0
421
422
  };
422
423
  }), Se = async (t) => {
423
- const e = mt(t), r = e.group, o = dt(r, ae(t));
424
+ const e = mt(t), r = e.group, o = pt(r, ae(t));
424
425
  if (c.value)
425
- X.value ? (B.value ? K.value.overrideCatalogSchedulerGroups([o], B.value._id) : K.value.overrideCatalogGroups([o]), await K.value.update()) : (Z.value.overrideSchedulerGroups([o]), await Z.value.update());
426
+ X.value ? (z.value ? B.value.overrideCatalogSchedulerGroups([o], z.value._id) : B.value.overrideCatalogGroups([o]), await B.value.update()) : (Z.value.overrideSchedulerGroups([o]), await Z.value.update());
426
427
  else {
427
428
  const s = {
428
429
  module: fe.enum.group,
@@ -436,11 +437,11 @@ const gt = /* @__PURE__ */ oe({
436
437
  };
437
438
  await b.updateMenu(s, o.name);
438
439
  }
439
- }, D = T(null), Ve = f(() => xe(D.value)), ce = T(null), me = async (t) => {
440
+ }, D = P(null), Fe = f(() => xe(D.value)), ce = P(null), me = async (t) => {
440
441
  var e;
441
- D.value = lt(t), await pe(), (e = ce.value) == null || e.trigger(!0);
442
+ D.value = lt(t), await de(), (e = ce.value) == null || e.trigger(!0);
442
443
  };
443
- function Fe(t) {
444
+ function Ve(t) {
444
445
  me(t.original);
445
446
  }
446
447
  const Ie = be(), Oe = f(() => Ie.breakpoints.value.xs), {
@@ -448,17 +449,17 @@ const gt = /* @__PURE__ */ oe({
448
449
  } = _e(), Ne = f(() => {
449
450
  var t;
450
451
  return ((t = I.groupAttributeSettings) == null ? void 0 : t.value.length) > 0;
451
- }), j = T(!1), H = T(null);
452
+ }), K = P(!1), H = P(null);
452
453
  async function Re() {
453
- j.value = !j.value, j.value && (await pe(), H.value && H.value.toggleProperty(!0));
454
+ K.value = !K.value, K.value && (await de(), H.value && H.value.toggleProperty(!0));
454
455
  }
455
- const de = () => v.value.multiScheduler ? i(et, null, {
456
+ const pe = () => v.value.multiScheduler ? i(et, null, {
456
457
  append: () => Ne.value ? i("div", {
457
458
  class: "pl-8 flex items-center justify-center border-l border-fm-color-neutral-gray-200",
458
459
  onClick: (t) => {
459
460
  t.stopPropagation(), Re();
460
461
  }
461
- }, [i(We.FmIcon, {
462
+ }, [i(Je.FmIcon, {
462
463
  name: "filter_alt",
463
464
  outline: !0,
464
465
  color: "neutral-gray-400",
@@ -466,12 +467,12 @@ const gt = /* @__PURE__ */ oe({
466
467
  }, null)]) : null
467
468
  }) : null;
468
469
  return (t, e) => {
469
- const r = V("fm-button"), o = V("fm-chip"), s = V("fm-menu-item"), C = V("fm-menu"), d = V("fm-search"), M = V("fm-table"), P = V("fm-bottom-sheet");
470
+ const r = F("fm-button"), o = F("fm-chip"), s = F("fm-menu-item"), C = F("fm-menu"), p = F("fm-search"), M = F("fm-table"), T = F("fm-bottom-sheet");
470
471
  return m(), y(E, null, [D.value ? (m(), R(ut, De({
471
472
  ref_key: "groupManagerFormRef",
472
473
  ref: ce,
473
474
  key: D.value._id
474
- }, Ve.value, {
475
+ }, Fe.value, {
475
476
  action: "update",
476
477
  title: u(l)("menu.group.dialogs.update.title"),
477
478
  group: D.value,
@@ -480,7 +481,7 @@ const gt = /* @__PURE__ */ oe({
480
481
  }), null, 16, ["title", "group"])) : N("", !0), G.value.length === 0 ? (m(), y("div", ht, [i(ze, {
481
482
  subtitle: u(l)("menu.group.empty.subtitle"),
482
483
  title: u(l)("menu.group.empty.title")
483
- }, Pe({
484
+ }, Te({
484
485
  _: 2
485
486
  }, [v.value.create ? {
486
487
  name: "action",
@@ -490,7 +491,7 @@ const gt = /* @__PURE__ */ oe({
490
491
  }) => [i(r, {
491
492
  "prepend-icon": "add",
492
493
  label: u(l)("menu.group.actions.add"),
493
- onClick: Te(n, ["stop"])
494
+ onClick: Pe(n, ["stop"])
494
495
  }, null, 8, ["label", "onClick"])]),
495
496
  _: 1
496
497
  })]),
@@ -499,48 +500,48 @@ const gt = /* @__PURE__ */ oe({
499
500
  key: 2
500
501
  }, [Oe.value ? (m(), y(E, {
501
502
  key: 1
502
- }, [p("div", At, [i(d, {
503
+ }, [d("div", At, [i(p, {
503
504
  autofocus: "",
504
505
  modelValue: u(h),
505
506
  "onUpdate:modelValue": e[9] || (e[9] = (n) => Q(h) ? h.value = n : null),
506
507
  placeholder: u(l)("menu.group.search.placeholder")
507
- }, null, 8, ["modelValue", "placeholder"])]), e[17] || (e[17] = p("div", {
508
+ }, null, 8, ["modelValue", "placeholder"])]), e[17] || (e[17] = d("div", {
508
509
  class: "bg-fm-color-neutral-gray-100 w-full h-px rounded-md"
509
- }, null, -1)), p("div", Gt, [i(de), W.value ? (m(), R(P, {
510
+ }, null, -1)), d("div", Gt, [i(pe), J.value ? (m(), R(T, {
510
511
  key: 0,
511
512
  modelValue: S.value,
512
513
  "onUpdate:modelValue": e[14] || (e[14] = (n) => S.value = n)
513
514
  }, {
514
515
  "bottom-sheet-button": x(() => [i(o, {
515
516
  label: u(l)("menu.group.type.title", {
516
- type: _.value ? u(te.capitalize)(_.value) : u(l)("menu.common.labels.all")
517
+ type: _.value ? u(ee.capitalize)(_.value) : u(l)("menu.common.labels.all")
517
518
  }),
518
519
  class: "text-fm-color-typo-secondary",
519
520
  "right-icon": "keyboard_arrow_down"
520
521
  }, null, 8, ["label"])]),
521
- default: x(() => [p("div", null, [p("div", {
522
+ default: x(() => [d("div", null, [d("div", {
522
523
  class: "px-16 py-8",
523
524
  onClick: e[10] || (e[10] = (n) => _.value = null)
524
- }, A(u(l)("menu.group.type.all")), 1), p("div", {
525
+ }, A(u(l)("menu.group.type.all")), 1), d("div", {
525
526
  class: "px-16 py-8",
526
527
  onClick: e[11] || (e[11] = (n) => _.value = "NORMAL")
527
- }, A(u(l)("menu.group.type.normal")), 1), p("div", {
528
+ }, A(u(l)("menu.group.type.normal")), 1), d("div", {
528
529
  class: "px-16 py-8",
529
530
  onClick: e[12] || (e[12] = (n) => _.value = "PRODUCT")
530
- }, A(u(l)("menu.group.type.product")), 1), p("div", {
531
+ }, A(u(l)("menu.group.type.product")), 1), d("div", {
531
532
  class: "px-16 py-8",
532
533
  onClick: e[13] || (e[13] = (n) => _.value = "DYNAMIC")
533
534
  }, A(u(l)("menu.group.type.dynamic")), 1)])]),
534
535
  _: 1
535
- }, 8, ["modelValue"])) : N("", !0)]), j.value ? (m(), y("div", St, [i(u(ve), {
536
+ }, 8, ["modelValue"])) : N("", !0)]), K.value ? (m(), y("div", St, [i(u(ve), {
536
537
  ref_key: "attributeFilterRef",
537
538
  ref: H,
538
539
  attributes: u(le),
539
540
  modelValue: u($),
540
541
  "onUpdate:modelValue": e[15] || (e[15] = (n) => Q($) ? $.value = n : null)
541
- }, null, 8, ["attributes", "modelValue"])])) : N("", !0), i(u(je), {
542
+ }, null, 8, ["attributes", "modelValue"])])) : N("", !0), i(u(Ee), {
542
543
  class: q(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"]),
543
- "model-value": z.value,
544
+ "model-value": j.value,
544
545
  group: "categories",
545
546
  handle: ".handle",
546
547
  "item-key": "_id",
@@ -551,23 +552,23 @@ const gt = /* @__PURE__ */ oe({
551
552
  }) => [(m(), y("div", {
552
553
  key: n._id,
553
554
  class: q(["py-12 px-16", "flex space-x-16", "items-center"])
554
- }, [p("div", Vt, [p("div", Ft, [p("p", It, A(n.name), 1), p("div", null, [W.value ? (m(), y("p", Ot, A(u(te.capitalize)(n.type)) + " type ", 1)) : N("", !0), p("p", Nt, A(u(l)("menu.group.list.products_linked", {
555
+ }, [d("div", Ft, [d("div", Vt, [d("p", It, A(n.name), 1), d("div", null, [J.value ? (m(), y("p", Ot, A(u(ee.capitalize)(n.type)) + " type ", 1)) : N("", !0), d("p", Nt, A(u(l)("menu.group.list.products_linked", {
555
556
  count: n.itemsLinked.length
556
557
  })), 1)])]), i(ie, {
557
558
  group: n
558
559
  }, null, 8, ["group"])])]))]),
559
560
  _: 1
560
- }, 8, ["model-value"])], 64)) : (m(), y("div", wt, [p("div", Ct, [i(de), W.value ? (m(), R(C, {
561
+ }, 8, ["model-value"])], 64)) : (m(), y("div", wt, [d("div", Ct, [i(pe), J.value ? (m(), R(C, {
561
562
  key: 0
562
563
  }, {
563
564
  "menu-button": x(() => [i(o, {
564
565
  label: u(l)("menu.group.type.title", {
565
- type: _.value ? u(te.capitalize)(_.value) : u(l)("menu.common.labels.all")
566
+ type: _.value ? u(ee.capitalize)(_.value) : u(l)("menu.common.labels.all")
566
567
  }),
567
568
  class: "text-fm-color-typo-secondary",
568
569
  "right-icon": "keyboard_arrow_down"
569
570
  }, null, 8, ["label"])]),
570
- default: x(() => [p("div", null, [i(s, {
571
+ default: x(() => [d("div", null, [i(s, {
571
572
  class: "px-16 py-8",
572
573
  label: u(l)("menu.group.type.all"),
573
574
  onClick: e[2] || (e[2] = (n) => _.value = null)
@@ -585,12 +586,12 @@ const gt = /* @__PURE__ */ oe({
585
586
  onClick: e[5] || (e[5] = (n) => _.value = "DYNAMIC")
586
587
  }, null, 8, ["label"])])]),
587
588
  _: 1
588
- })) : N("", !0), p("div", xt, [i(d, {
589
+ })) : N("", !0), d("div", xt, [i(p, {
589
590
  autofocus: "",
590
591
  modelValue: u(h),
591
592
  "onUpdate:modelValue": e[6] || (e[6] = (n) => Q(h) ? h.value = n : null),
592
593
  placeholder: u(l)("menu.group.search.placeholder")
593
- }, null, 8, ["modelValue", "placeholder"])])]), j.value ? (m(), y("div", Mt, [i(u(ve), {
594
+ }, null, 8, ["modelValue", "placeholder"])])]), K.value ? (m(), y("div", Mt, [i(u(ve), {
594
595
  ref_key: "attributeFilterRef",
595
596
  ref: H,
596
597
  attributes: u(le),
@@ -601,14 +602,14 @@ const gt = /* @__PURE__ */ oe({
601
602
  "column-defs": Ae.value,
602
603
  "column-visibility": Ge.value,
603
604
  loading: u(b).checkMenuIsLoading(),
604
- "page-size": z.value.length,
605
- "row-data": z.value,
605
+ "page-size": j.value.length,
606
+ "row-data": j.value,
606
607
  "shrink-at": !1,
607
608
  class: "flex-1 overflow-hidden",
608
609
  draggable: "",
609
610
  "hide-footer": "",
610
611
  "pin-header-row": "",
611
- onRowClick: Fe,
612
+ onRowClick: Ve,
612
613
  onDndChanged: e[8] || (e[8] = (n) => ue(n))
613
614
  }, null, 8, ["column-defs", "column-visibility", "loading", "page-size", "row-data"])]),
614
615
  _: 1
@@ -617,5 +618,5 @@ const gt = /* @__PURE__ */ oe({
617
618
  }
618
619
  });
619
620
  export {
620
- qt as _
621
+ Wt as _
621
622
  };
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as N, useModel as K, computed as B, resolveComponent as d, createBlock as I, openBlock as b, ref as L, watch as W, withCtx as f, createElementBlock as F, createElementVNode as U, 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-C58Ixr5m.js";
5
- import { b as G } from "./app-5fxKLAzS.js";
6
- import { FmButtonVariant as Z, useDialog as ne, components as ie, FmButtonColorThemeVariant as O } from "@feedmepos/ui-library";
7
- import { m as j, f as Y, e as se, _ as me } from "./RuleView.vue_vue_type_script_setup_true_lang-DNk48PUl.js";
8
- import { L as R } from "./catalogSetting-ebS4mr1i.js";
9
- import { L as de } from "./LinkProductSideSheet-CLd4LEy4.js";
4
+ import { u as D } from "./priceTier-aT_gIfrN.js";
5
+ import { b as O } from "./app-5fxKLAzS.js";
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, e as se, _ as me } from "./RuleView.vue_vue_type_script_setup_true_lang-Ba3djmX1.js";
8
+ import { L as R } from "./catalogSetting-Bn2TplvM.js";
9
+ import { L as de } from "./LinkProductSideSheet-DMbJG6wf.js";
10
10
  import { c as H } from "./check-C9mY6LiX.js";
11
- import { u as pe, G as J, au as ce } from "./index.vue_vue_type_script_setup_true_lang-C3c2B-qJ.js";
11
+ import { u as pe, d as J, U as ce } from "./index.vue_vue_type_script_setup_true_lang-Nl505vPi.js";
12
12
  import { c as ve } from "./string-DpfFixWH.js";
13
13
  const _e = /* @__PURE__ */ N({
14
14
  __name: "LinkPriceTier",
@@ -53,8 +53,8 @@ const _e = /* @__PURE__ */ N({
53
53
  return {
54
54
  ...l,
55
55
  restaurantRule: {
56
- restaurantAttributes: j((p = l.restaurantRule) == null ? void 0 : p.restaurantAttributes),
57
- restaurantCustomAttributes: j((c = l.restaurantRule) == null ? void 0 : c.restaurantCustomAttributes)
56
+ restaurantAttributes: G((p = l.restaurantRule) == null ? void 0 : p.restaurantAttributes),
57
+ restaurantCustomAttributes: G((c = l.restaurantRule) == null ? void 0 : c.restaurantCustomAttributes)
58
58
  }
59
59
  };
60
60
  }));
@@ -119,7 +119,7 @@ const _e = /* @__PURE__ */ N({
119
119
  }, {
120
120
  default: f(() => {
121
121
  var _;
122
- return [u(e(G), {
122
+ return [u(e(O), {
123
123
  attributes: e(g),
124
124
  "model-value": (_ = M.restaurantRule) == null ? void 0 : _.restaurantAttributes,
125
125
  "onUpdate:modelValue": (C) => i(S, C, "restaurantAttributes")
@@ -131,7 +131,7 @@ const _e = /* @__PURE__ */ N({
131
131
  }, {
132
132
  default: f(() => {
133
133
  var _;
134
- return [u(e(G), {
134
+ return [u(e(O), {
135
135
  attributes: e(y),
136
136
  "model-value": (_ = M.restaurantRule) == null ? void 0 : _.restaurantCustomAttributes,
137
137
  "onUpdate:modelValue": (C) => i(S, C, "restaurantCustomAttributes")
@@ -372,8 +372,8 @@ const _e = /* @__PURE__ */ N({
372
372
  default: f(({ trigger: m }) => [
373
373
  V.value === 1 ? (b(), I(C, {
374
374
  key: 0,
375
- "text-color": e(O).ColorPrimary,
376
- "border-color": e(O).ColorPrimary,
375
+ "text-color": e(j).ColorPrimary,
376
+ "border-color": e(j).ColorPrimary,
377
377
  variant: e(Z).Secondary,
378
378
  label: e(a)("menu.markup.dialog.products.link"),
379
379
  "prepend-icon": "link",