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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/{App-1TX8v7ZA.js → App-Cvgz2kQV.js} +22 -24
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CR7QrFUG.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Bq84uuiq.js} +22 -22
  3. package/dist/{Catalog-DWClc58s.js → Catalog-Ye-KpQ31.js} +74 -75
  4. package/dist/{Category-BqKFvFam.js → Category-BPChBqVR.js} +60 -60
  5. package/dist/{Category-IYMtMoT-.js → Category-CHcxix2b.js} +28 -28
  6. package/dist/{CookingGuide-BayJ6zj4.js → CookingGuide-DgygBSoB.js} +101 -103
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Ceq86b3d.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-ClV6LD2-.js} +1 -1
  8. package/dist/{Group-LqSX7ue6.js → Group-223G1Edd.js} +1 -1
  9. package/dist/{Group-RujTPTns.js → Group-B7EU1xmY.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-Dj9ZmkYe.js → Group.vue_vue_type_script_setup_true_lang-CAZuyOPy.js} +137 -138
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D5GWkh3G.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CdjRWC9z.js} +13 -13
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-C4IrA3es.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BRQm-UTk.js} +5067 -5049
  13. package/dist/{Ingredient-_tc8llr1.js → Ingredient-Dl1Z5Qt2.js} +64 -65
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DLFDf-VZ.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CxuQTH0k.js} +1061 -1063
  15. package/dist/{LinkProductSideSheet-C6rF-G1v.js → LinkProductSideSheet-Y-Z9_9Kp.js} +12 -14
  16. package/dist/{MenuSetting-xDHeeROY.js → MenuSetting-Be44fmVj.js} +26 -27
  17. package/dist/{PrintRoute-B_TFMn5e.js → PrintRoute-BURAEZ6X.js} +15 -17
  18. package/dist/{Product-DdEEqrtc.js → Product-DSlVHbgr.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-zcistmwh.js → Product.vue_vue_type_script_setup_true_lang-DtYarO0L.js} +256 -257
  20. package/dist/{ProductInternalTools-BcC7BF6W.js → ProductInternalTools-gW57aUAO.js} +45 -45
  21. package/dist/{Products-Cu0cJshV.js → Products-Czr-70M8.js} +72 -74
  22. package/dist/{Publish-Bm3Xiks1.js → Publish-XCowNW_z.js} +32 -34
  23. package/dist/{Recipe-DWK-luIZ.js → Recipe-6oNz21AB.js} +63 -65
  24. package/dist/{Scheduler-Cb1TeBhW.js → Scheduler-UYFuFk5E.js} +19 -19
  25. package/dist/{ServingSequence-evSIET_8.js → ServingSequence-w66ujU4D.js} +34 -34
  26. package/dist/{Setting-Cn3kwC9F.js → Setting-Dgn3lOx7.js} +53 -54
  27. package/dist/{Subcategory-q4m4qHsU.js → Subcategory-lnzuxCCH.js} +34 -34
  28. package/dist/{Takeaway-ClepHYGu.js → Takeaway-C5Up5Odr.js} +14 -14
  29. package/dist/{Takeaway-D-rdUZuh.js → Takeaway-DP1GJUPF.js} +1 -1
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-y9Yxstu2.js → Takeaway.vue_vue_type_script_setup_true_lang-B45keXn7.js} +40 -41
  31. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BSeLfoOA.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-yEIxG4F2.js} +1108 -1109
  32. package/dist/{Unit-IM8Naj82.js → Unit-Bt8aRidX.js} +12 -12
  33. package/dist/{Variant-fzGvwaMo.js → Variant-DXoOAa9M.js} +16 -16
  34. package/dist/{_id_-BsKNG9Qv.js → _id_-D9tvinax.js} +22 -22
  35. package/dist/{app-BzQRUMTK.js → app-Cnlv4rmj.js} +3 -3
  36. package/dist/{app-CoVUUCa_.js → app-DiizQWjo.js} +24 -24
  37. package/dist/app.js +1 -1
  38. package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProduct.vue.d.ts +88 -16
  39. package/dist/apps/mf-menu/src/components/feature/ApplyProduct/ApplyProductDialog.vue.d.ts +44 -8
  40. package/dist/apps/mf-menu/src/components/feature/ApplyProduct/index.d.ts +360 -184
  41. package/dist/apps/mf-menu/src/components/feature/GroupManager/OptionTable.vue.d.ts +80 -28
  42. package/dist/apps/mf-menu/src/components/feature/GroupManager/UpdateForm.vue.d.ts +44 -8
  43. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierButton.vue.d.ts +216 -148
  44. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierForm.vue.d.ts +216 -148
  45. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/category.d.ts +4 -4
  46. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/item.d.ts +218 -150
  47. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/scheduler.d.ts +142 -82
  48. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/useItemFormManagement.d.ts +108 -74
  49. package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/OptionTable.vue.d.ts +80 -28
  50. package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/UpdateForm.vue.d.ts +44 -8
  51. package/dist/apps/mf-menu/src/components/feature/TreeEditor/form/GroupManager/index.d.ts +176 -32
  52. package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ItemForm.vue.d.ts +324 -222
  53. package/dist/apps/mf-menu/src/components/feature/TreeEditor/menuUtils.d.ts +108 -74
  54. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +1374 -1040
  55. package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +216 -148
  56. package/dist/apps/mf-menu/src/helper/import-export.d.ts +1374 -1040
  57. package/dist/apps/mf-menu/src/helper/itemCategories.d.ts +108 -74
  58. package/dist/apps/mf-menu/src/helper/menu.d.ts +1523 -1155
  59. package/dist/apps/mf-menu/src/manager/menu/category.d.ts +4 -4
  60. package/dist/apps/mf-menu/src/manager/menu/item.d.ts +1374 -1040
  61. package/dist/apps/mf-menu/src/manager/menu/subcategory.d.ts +4 -4
  62. package/dist/apps/mf-menu/src/stores/manager/item.d.ts +324 -222
  63. package/dist/apps/mf-menu/src/stores/manager/recipe.d.ts +12 -12
  64. package/dist/apps/mf-menu/src/stores/manager/scheduler.d.ts +142 -82
  65. package/dist/apps/mf-menu/src/stores/manager/sku.d.ts +60 -60
  66. package/dist/apps/mf-menu/src/stores/manager/takeaway.d.ts +6 -6
  67. package/dist/apps/mf-menu/src/stores/manager/unit.d.ts +12 -12
  68. package/dist/apps/mf-menu/src/stores/menu.d.ts +1375 -1041
  69. package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +216 -148
  70. package/dist/apps/mf-menu/src/views/CookingGuide/CookingGuideDialog.vue.d.ts +4 -4
  71. package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +352 -132
  72. package/dist/apps/mf-menu/src/views/Scheduler/FilterForm.vue.d.ts +84 -32
  73. package/dist/apps/mf-menu/src/views/Scheduler/SchedulerDialog.vue.d.ts +84 -32
  74. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  75. package/dist/assets/linked-status-D7AwcSC5.js +24 -0
  76. package/dist/assets/override-menu-Y9T4wxEn.js +24 -0
  77. package/dist/assets/validate-menu-DiAW2jY1.js +24 -0
  78. package/dist/{catalog-CaXceaA2.js → catalog-DUSCax4J.js} +1 -1
  79. package/dist/{catalogSetting-BGvckFdh.js → catalogSetting-18FJ5pkA.js} +1 -1
  80. package/dist/{category-u5eo_Vjd.js → category-B9XvlPFy.js} +3 -5
  81. package/dist/currency-Sno8fZYc.js +7 -0
  82. package/dist/{dayjs.min-Bsr3tJCn.js → dayjs.min-BsfKOrNo.js} +1 -1
  83. package/dist/{index-tRQb7RN_.js → index-BDpkSKDX.js} +1 -1
  84. package/dist/{index-Bbx4iZ6n.js → index-Eomwf2OO.js} +27 -27
  85. package/dist/{index-DSAG0yWh.js → index-ltyOwsRO.js} +20 -22
  86. package/dist/{item-BAqzKh4O.js → item-5Kkzf_eF.js} +1069 -1071
  87. package/dist/{jszip.min-BKJtvCjM.js → jszip.min-CRfpGjN8.js} +545 -545
  88. package/dist/menu-Btcr0nsk.js +108040 -0
  89. package/dist/{menu-CDrsBjmr.js → menu-DYs_VNfB.js} +9 -11
  90. package/dist/mf-menu.css +1 -1
  91. package/dist/{priceTier-DfbHonGe.js → priceTier-DvUjWwCM.js} +4 -4
  92. package/dist/{scheduler-DTWaBudB.js → scheduler-C76blUlS.js} +11 -13
  93. package/dist/{subcategory-D-R5r1Tr.js → subcategory-C44qN5Vk.js} +133 -135
  94. package/dist/{toExcel-84VTtSA7.js → toExcel--vNjpF-b.js} +2 -2
  95. package/dist/{unit-B4zscxzo.js → unit-C4ghZU8x.js} +23 -24
  96. package/package.json +5 -5
  97. package/dist/assets/linked-status-eQqjvOq_.js +0 -24
  98. package/dist/assets/override-menu-C8NTBJgN.js +0 -24
  99. package/dist/assets/validate-menu-Dn-OO7Ed.js +0 -24
  100. package/dist/currency-BPHwez-E.js +0 -7
  101. package/dist/menu-CsIzrBEr.js +0 -74044
@@ -1,37 +1,37 @@
1
- import { defineComponent as B, ref as w, watch as W, resolveComponent as y, createElementBlock as V, openBlock as p, Fragment as P, renderSlot as X, createVNode as m, unref as t, withCtx as h, createElementVNode as s, toDisplayString as L, computed as F, h as U, withModifiers as R, getCurrentInstance as Z, renderList as ee, createBlock as M, createCommentVNode as te } from "vue";
1
+ import { defineComponent as L, ref as w, watch as W, resolveComponent as y, createElementBlock as V, openBlock as p, Fragment as P, renderSlot as X, createVNode as m, unref as t, withCtx as h, createElementVNode as s, toDisplayString as O, computed as F, h as A, withModifiers as R, getCurrentInstance as Z, renderList as ee, createBlock as S, createCommentVNode as te } from "vue";
2
2
  import { useI18n as T } from "@feedmepos/mf-common";
3
- import { useSnackbar as O, components as j, useDialog as Y, FmButtonVariant as z, useBreakpoints as ae, FmButtonColorThemeVariant as oe } from "@feedmepos/ui-library";
3
+ import { useSnackbar as B, components as j, useDialog as Y, FmButtonVariant as z, useBreakpoints as ae, FmButtonColorThemeVariant as oe } from "@feedmepos/ui-library";
4
4
  import { _ as ne } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
- import { A as D, u as N, M as A, H as K, B as q } from "./menu-CsIzrBEr.js";
5
+ import { D, u as N, O as U, J as K, G } from "./menu-Btcr0nsk.js";
6
6
  import { _ as le } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
- import { _ as se } from "./app-CoVUUCa_.js";
7
+ import { _ as se } from "./app-DiizQWjo.js";
8
8
  import { c as re } from "./createForm-BoUQeZTd.js";
9
9
  import { u as ie } from "./discardConfirm-BHni0LNu.js";
10
10
  import { c as I } from "./object-DVUNCr7w.js";
11
11
  import { r as ce } from "./rules-CIWTZQfh.js";
12
12
  import { c as ue } from "./check-C9mY6LiX.js";
13
- import { a as G } from "./subcategory-D-R5r1Tr.js";
13
+ import { a as q } from "./subcategory-C44qN5Vk.js";
14
14
  import { _ as de } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
15
- import { a as me } from "./menu-CDrsBjmr.js";
15
+ import { a as me } from "./menu-DYs_VNfB.js";
16
16
  const pe = {
17
17
  class: "fm-typo-en-title-md-600"
18
18
  }, _e = {
19
19
  class: "flex flex-col gap-32 h-full min-h-0 py-16"
20
20
  }, fe = {
21
21
  class: "flex gap-8 items-center justify-start"
22
- }, ge = /* @__PURE__ */ B({
22
+ }, ge = /* @__PURE__ */ L({
23
23
  __name: "Form",
24
24
  props: {
25
25
  initialValue: {}
26
26
  },
27
- setup(S, {
27
+ setup($, {
28
28
  expose: f
29
29
  }) {
30
- const _ = S, x = O(), g = D(x), k = A(g), d = N(), {
30
+ const _ = $, x = B(), g = D(x), k = U(g), d = N(), {
31
31
  t: a
32
32
  } = T(), v = w(!1), e = w(!1), b = (r) => {
33
33
  ue.isBoolean(r) ? e.value = r : e.value = !e.value;
34
- }, n = w(I(_.initialValue)), $ = ie(() => n.value.name !== _.initialValue.name, () => {
34
+ }, n = w(I(_.initialValue)), M = ie(() => n.value.name !== _.initialValue.name, () => {
35
35
  e.value = !1;
36
36
  });
37
37
  async function E() {
@@ -39,7 +39,7 @@ const pe = {
39
39
  updateMenu: c
40
40
  } = k;
41
41
  await c({
42
- module: q.F_MENU_MODULE_V4_KEY.enum.subCategory,
42
+ module: G.F_MENU_MODULE_V4_KEY.enum.subCategory,
43
43
  operation: K.F_OPERATION_TYPE.update,
44
44
  // @ts-ignore FIXME: The backend hasn't exported SubcategoryRequest yet. Fix this once it's available.
45
45
  data: {
@@ -67,9 +67,9 @@ const pe = {
67
67
  blameFormChildOnValidationFailed: !0
68
68
  },
69
69
  "max-width": 560,
70
- "onOn:clickedAway": t($)
70
+ "onOn:clickedAway": t(M)
71
71
  }, {
72
- "side-sheet-header": h(() => [s("p", pe, L(t(a)("menu.subcategory.title")), 1)]),
72
+ "side-sheet-header": h(() => [s("p", pe, O(t(a)("menu.subcategory.title")), 1)]),
73
73
  "side-sheet-footer": h(() => [s("div", fe, [m(o, {
74
74
  label: t(a)("menu.common.actions.update"),
75
75
  loading: v.value,
@@ -111,10 +111,10 @@ const pe = {
111
111
  class: "flex-1 space-y-4"
112
112
  }, Fe = {
113
113
  class: "fm-typo-en-body-lg-600"
114
- }, Me = /* @__PURE__ */ B({
114
+ }, Se = /* @__PURE__ */ L({
115
115
  __name: "SubcategoryTable",
116
- setup(S) {
117
- const f = Y(), _ = O(), x = D(_), g = A(x), k = G({
116
+ setup($) {
117
+ const f = Y(), _ = B(), x = D(_), g = U(x), k = q({
118
118
  dialog: f,
119
119
  menuLoader: g
120
120
  }), d = F(() => N().subcategories), a = w(""), v = F(() => d.value.filter((o) => o.name.toLowerCase().includes(a.value.toLowerCase()))), {
@@ -136,9 +136,9 @@ const pe = {
136
136
  header: "",
137
137
  cell: (o) => {
138
138
  const l = o.row.original;
139
- return U("div", {
139
+ return A("div", {
140
140
  class: "flex justify-end"
141
- }, [U(j.FmButton, {
141
+ }, [A(j.FmButton, {
142
142
  icon: "delete",
143
143
  disabled: !l._id,
144
144
  variant: "tertiary",
@@ -173,13 +173,13 @@ const pe = {
173
173
  }
174
174
  }).onPrimary(async () => {
175
175
  await g.updateMenu({
176
- module: q.F_MENU_MODULE_V4_KEY.enum.subCategory,
176
+ module: G.F_MENU_MODULE_V4_KEY.enum.subCategory,
177
177
  operation: K.F_OPERATION_TYPE.delete,
178
178
  data: o._id
179
179
  }, o.name, !0);
180
180
  });
181
181
  }
182
- async function $(o) {
182
+ async function M(o) {
183
183
  const l = o.map((u) => u._id).filter((u) => !!u);
184
184
  await k.rearrange(l);
185
185
  }
@@ -191,7 +191,7 @@ const pe = {
191
191
  }
192
192
  const c = ae(), C = F(() => c.breakpoints.value.xs);
193
193
  return (o, l) => {
194
- const u = y("FmSearch"), H = y("FmTable"), J = y("FmButton");
194
+ const u = y("FmSearch"), J = y("FmTable"), H = y("FmButton");
195
195
  return C.value ? (p(), V("div", xe, [s("div", ke, [m(u, {
196
196
  autofocus: "",
197
197
  modelValue: a.value,
@@ -204,7 +204,7 @@ const pe = {
204
204
  key: i._id || "",
205
205
  class: "flex flex-row py-12 px-16",
206
206
  onClick: (Q) => r(i)
207
- }, [s("div", we, [s("p", Fe, L(i.name), 1)]), m(J, {
207
+ }, [s("div", we, [s("p", Fe, O(i.name), 1)]), m(H, {
208
208
  "text-color": t(oe).NeutralGray400,
209
209
  variant: t(z).Tertiary,
210
210
  "prepend-icon": "delete",
@@ -219,7 +219,7 @@ const pe = {
219
219
  type: t(e)("menu.subcategory.title")
220
220
  })
221
221
  }, null, 8, ["modelValue", "placeholder"])])]), m(se, null, {
222
- default: h(() => [m(H, {
222
+ default: h(() => [m(J, {
223
223
  "column-defs": b.value,
224
224
  draggable: !0,
225
225
  "page-size": d.value.length,
@@ -228,26 +228,26 @@ const pe = {
228
228
  "shrink-at": !1,
229
229
  "hide-footer": "",
230
230
  "pin-header-row": "",
231
- onDndChanged: $,
231
+ onDndChanged: M,
232
232
  onRowClick: l[1] || (l[1] = (i) => r(i.original))
233
233
  }, null, 8, ["column-defs", "page-size", "row-data", "search-value"])]),
234
234
  _: 1
235
235
  })]));
236
236
  };
237
237
  }
238
- }), Se = { class: "flex-1 flex justify-between gap-8 pl-8" }, $e = { class: "flex items-center" }, Ee = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Be = { class: "fm-typo-en-body-md-600 font-semibold" }, Ge = /* @__PURE__ */ B({
238
+ }), $e = { class: "flex-1 flex justify-between gap-8 pl-8" }, Me = { class: "flex items-center" }, Ee = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Le = { class: "fm-typo-en-body-md-600 font-semibold" }, qe = /* @__PURE__ */ L({
239
239
  __name: "Subcategory",
240
- setup(S) {
241
- const f = Y(), _ = O(), x = D(_), g = A(x), k = G({ dialog: f, menuLoader: g }), d = F(() => N().subcategories), { t: a } = T();
240
+ setup($) {
241
+ const f = Y(), _ = B(), x = D(_), g = U(x), k = q({ dialog: f, menuLoader: g }), d = F(() => N().subcategories), { t: a } = T();
242
242
  function v() {
243
243
  k.create();
244
244
  }
245
245
  const e = F(() => d.value.length);
246
- return me().resetOnMount(), (b, n) => (p(), M(le, {
246
+ return me().resetOnMount(), (b, n) => (p(), S(le, {
247
247
  heading: t(a)("menu.subcategory.title")
248
248
  }, {
249
249
  default: h(() => [
250
- d.value.length > 0 ? (p(), M(Me, { key: 0 })) : (p(), M(t(de), {
250
+ d.value.length > 0 ? (p(), S(Se, { key: 0 })) : (p(), S(t(de), {
251
251
  key: 1,
252
252
  action: {
253
253
  text: t(a)("menu.subcategory.add"),
@@ -258,13 +258,13 @@ const pe = {
258
258
  }, null, 8, ["action", "subtitle", "title"]))
259
259
  ]),
260
260
  "append-heading": h(() => [
261
- s("div", Se, [
262
- s("div", $e, [
261
+ s("div", $e, [
262
+ s("div", Me, [
263
263
  s("div", Ee, [
264
- s("p", Be, L(e.value), 1)
264
+ s("p", Le, O(e.value), 1)
265
265
  ])
266
266
  ]),
267
- d.value.length > 0 ? (p(), M(ne, {
267
+ d.value.length > 0 ? (p(), S(ne, {
268
268
  key: 0,
269
269
  label: t(a)("menu.subcategory.add"),
270
270
  "prepend-icon": "add",
@@ -277,5 +277,5 @@ const pe = {
277
277
  }
278
278
  });
279
279
  export {
280
- Ge as default
280
+ qe as default
281
281
  };
@@ -1,17 +1,17 @@
1
1
  import { defineComponent as f, computed as y, ref as k, createBlock as i, openBlock as d, unref as a, withCtx as s, createElementVNode as t, toDisplayString as b, createCommentVNode as g, createVNode as m } from "vue";
2
- import { A as x, u as v, M as w, H as E, B as M } from "./menu-CsIzrBEr.js";
2
+ import { D as x, u as v, O as w, J as E, G as M } from "./menu-Btcr0nsk.js";
3
3
  import { useI18n as T } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as V } from "@feedmepos/ui-library";
5
5
  import { _ as h } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
6
6
  import { _ as C } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
- import { _ as N } from "./Takeaway.vue_vue_type_script_setup_true_lang-y9Yxstu2.js";
8
- import { T as S, l as B } from "./index-DSAG0yWh.js";
9
- import { a as L } from "./menu-CDrsBjmr.js";
10
- const O = { class: "flex-1 flex justify-between gap-8 pl-8" }, U = { class: "flex items-center" }, F = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, A = { class: "fm-typo-en-body-md-600 font-semibold" }, G = /* @__PURE__ */ f({
7
+ import { _ as N } from "./Takeaway.vue_vue_type_script_setup_true_lang-B45keXn7.js";
8
+ import { T as O, l as S } from "./index-ltyOwsRO.js";
9
+ import { a as L } from "./menu-DYs_VNfB.js";
10
+ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "flex items-center" }, D = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, F = { class: "fm-typo-en-body-md-600 font-semibold" }, z = /* @__PURE__ */ f({
11
11
  __name: "Takeaway",
12
- setup(D) {
12
+ setup(I) {
13
13
  const u = V(), l = x(u), p = v(), c = w(l), _ = y(() => p.rules.item.bindToVariant), n = k(0), { t: r } = T();
14
- return L().resetOnMount(), (I, o) => (d(), i(C, {
14
+ return L().resetOnMount(), (P, o) => (d(), i(C, {
15
15
  heading: a(r)("menu.takeaway.title")
16
16
  }, {
17
17
  default: s(() => [
@@ -20,14 +20,14 @@ const O = { class: "flex-1 flex justify-between gap-8 pl-8" }, U = { class: "fle
20
20
  })
21
21
  ]),
22
22
  "append-heading": s(() => [
23
- t("div", O, [
24
- t("div", U, [
25
- t("div", F, [
26
- t("p", A, b(n.value), 1)
23
+ t("div", U, [
24
+ t("div", B, [
25
+ t("div", D, [
26
+ t("p", F, b(n.value), 1)
27
27
  ])
28
28
  ]),
29
29
  t("div", null, [
30
- n.value > 0 ? (d(), i(a(S), {
30
+ n.value > 0 ? (d(), i(a(O), {
31
31
  key: 0,
32
32
  "bind-to-variant": _.value,
33
33
  action: "add",
@@ -37,7 +37,7 @@ const O = { class: "flex-1 flex justify-between gap-8 pl-8" }, U = { class: "fle
37
37
  module: a(M.F_MENU_MODULE_V4_KEY).enum.takeaway,
38
38
  operation: a(E.F_OPERATION_TYPE).create,
39
39
  data: e,
40
- link: a(B)(e.usedBy || [])
40
+ link: a(S)(e.usedBy || [])
41
41
  },
42
42
  e.name
43
43
  ))
@@ -60,5 +60,5 @@ const O = { class: "flex-1 flex justify-between gap-8 pl-8" }, U = { class: "fle
60
60
  }
61
61
  });
62
62
  export {
63
- G as default
63
+ z as default
64
64
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./Takeaway.vue_vue_type_script_setup_true_lang-y9Yxstu2.js";
1
+ import { _ as f } from "./Takeaway.vue_vue_type_script_setup_true_lang-B45keXn7.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,23 +1,22 @@
1
- import { getCurrentInstance as te, defineComponent as oe, computed as h, watch as ne, h as R, resolveComponent as S, createElementBlock as x, openBlock as _, Fragment as O, normalizeClass as D, createElementVNode as k, createVNode as V, unref as t, isRef as j, withCtx as P, renderList as ie, createBlock as $, createCommentVNode as q, toDisplayString as B, withModifiers as G } from "vue";
2
- import { Country as se } from "@feedmepos/core";
3
- import { A as J, u as Q, M as W, H as N, B as z, D as L, aq as H } from "./menu-CsIzrBEr.js";
1
+ import { getCurrentInstance as te, defineComponent as oe, computed as h, watch as ne, h as R, resolveComponent as S, createElementBlock as C, openBlock as _, Fragment as O, normalizeClass as D, createElementVNode as k, createVNode as V, unref as t, isRef as j, withCtx as P, renderList as ie, createBlock as G, createCommentVNode as $, toDisplayString as I, withModifiers as H } from "vue";
2
+ import { D as q, u as Q, O as W, J as N, G as z, H as L, A as se, au as J } from "./menu-Btcr0nsk.js";
4
3
  import { useI18n as X, useCoreStore as re } from "@feedmepos/mf-common";
5
4
  import { useDialog as le, useSnackbar as Z, FmButtonVariant as A, components as ce, useBreakpoints as de } from "@feedmepos/ui-library";
6
- import { _ as ue } from "./app-CoVUUCa_.js";
5
+ import { _ as ue } from "./app-DiizQWjo.js";
7
6
  import { _ as me } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
8
- import { a as ye, l as ee, T as pe } from "./index-DSAG0yWh.js";
7
+ import { a as ye, l as ee, T as pe } from "./index-ltyOwsRO.js";
9
8
  import { u as fe } from "./search-BAPEUu1R.js";
10
- import { f as F } from "./currency-BPHwez-E.js";
9
+ import { f as F } from "./currency-Sno8fZYc.js";
11
10
  import { defineStore as _e } from "pinia";
12
- import { C as ke } from "./catalog-CaXceaA2.js";
11
+ import { C as ke } from "./catalog-DUSCax4J.js";
13
12
  import { c as ve } from "./createComponentProgrammatically-Bt2rn1IQ.js";
14
- function we(T, M, l, m) {
13
+ function we(T, U, l, m) {
15
14
  var y, v, w, g;
16
15
  const i = L(T);
17
16
  i.override.takeaway[l._id] = {
18
17
  price: l.price || void 0
19
18
  };
20
- const f = [...l.usedBy, ...M.usedBy];
19
+ const f = [...l.usedBy, ...U.usedBy];
21
20
  for (const r of f) {
22
21
  const c = l.usedBy.some(
23
22
  (e) => e._id == r._id && e.combinationKey == r.combinationKey
@@ -47,7 +46,7 @@ function we(T, M, l, m) {
47
46
  return i;
48
47
  }
49
48
  const ge = _e("takeaway-manager", () => {
50
- const T = le(), M = Z(), l = J(M), m = W(l), i = Q(), f = te(), { t: y } = X(), v = (a) => {
49
+ const T = le(), U = Z(), l = q(U), m = W(l), i = Q(), f = te(), { t: y } = X(), v = (a) => {
51
50
  var e, u;
52
51
  const { vNode: d } = ve(
53
52
  ye,
@@ -57,8 +56,8 @@ const ge = _e("takeaway-manager", () => {
57
56
  (u = (e = d.component) == null ? void 0 : e.exposed) == null || u.trigger();
58
57
  };
59
58
  async function w(a) {
60
- var u, U;
61
- const e = ((U = (u = i.currentCatalog) == null ? void 0 : u.override.takeaway[a._id]) == null ? void 0 : U.price) ? null : i.state.menu.modules.takeaway.find((b) => b._id === a._id);
59
+ var u, M;
60
+ const e = ((M = (u = i.currentCatalog) == null ? void 0 : u.override.takeaway[a._id]) == null ? void 0 : M.price) ? null : i.state.menu.modules.takeaway.find((b) => b._id === a._id);
62
61
  v({
63
62
  initialValue: a,
64
63
  applyProduct: !0,
@@ -127,40 +126,40 @@ const ge = _e("takeaway-manager", () => {
127
126
  class: /* @__PURE__ */ D(["flex-1 overflow-hidden", "space-y-16", "flex flex-col", "overflow-hidden"])
128
127
  }, he = {
129
128
  class: "flex items-center space-x-8 justify-end"
130
- }, Ce = {
131
- class: "w-[320px]"
132
129
  }, xe = {
130
+ class: "w-[320px]"
131
+ }, Ce = {
133
132
  class: "px-16 pt-8"
134
133
  }, Ve = {
135
134
  class: /* @__PURE__ */ D(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100"])
136
- }, Te = ["onClick"], Me = {
135
+ }, Te = ["onClick"], Ue = {
137
136
  class: "flex-1"
138
- }, Ue = {
137
+ }, Me = {
139
138
  class: "fm-typo-en-body-lg-600 mb-4"
140
139
  }, Ee = {
141
140
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
142
141
  }, Ke = {
143
142
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
144
- }, Be = {
143
+ }, Ie = {
145
144
  key: 1,
146
145
  class: "xs:pt-24"
147
- }, $e = /* @__PURE__ */ oe({
146
+ }, je = /* @__PURE__ */ oe({
148
147
  __name: "Takeaway",
149
148
  emits: ["update:count"],
150
149
  setup(T, {
151
- emit: M
150
+ emit: U
152
151
  }) {
153
- const l = Q(), m = ge(), i = h(() => l.rules.item.bindToVariant), f = h(() => l.rules.takeaway), y = W(J(Z())), v = re(), w = h(() => se.getCountry(v.currentCountry.value).currency), g = h(() => l.takeaways.map((o) => ({
152
+ const l = Q(), m = ge(), i = h(() => l.rules.item.bindToVariant), f = h(() => l.rules.takeaway), y = W(q(Z())), v = re(), w = h(() => se.Country.getCountry(v.currentCountry.value).currency), g = h(() => l.takeaways.map((o) => ({
154
153
  ...o,
155
154
  usedBy: l.items.reduce((s, p) => {
156
155
  var n, E, Y;
157
- const C = p.takeawayUsed === o._id;
158
- if ((!i.value || !((E = (n = p.variant) == null ? void 0 : n.variantGroupIds) != null && E.length)) && C)
156
+ const x = p.takeawayUsed === o._id;
157
+ if ((!i.value || !((E = (n = p.variant) == null ? void 0 : n.variantGroupIds) != null && E.length)) && x)
159
158
  s.push({
160
159
  _id: p._id
161
160
  });
162
161
  else {
163
- const ae = (((Y = p.variant) == null ? void 0 : Y.variantCombinations) || []).filter((K) => K.takeawayUsed === o._id || !K.takeawayUsed && C).map((K) => ({
162
+ const ae = (((Y = p.variant) == null ? void 0 : Y.variantCombinations) || []).filter((K) => K.takeawayUsed === o._id || !K.takeawayUsed && x).map((K) => ({
164
163
  _id: p._id,
165
164
  combinationKey: K.combinationKey
166
165
  }));
@@ -171,7 +170,7 @@ const ge = _e("takeaway-manager", () => {
171
170
  }))), {
172
171
  filter: r,
173
172
  searchKey: c
174
- } = fe(), a = h(() => g.value.filter((o) => r([o.name, F(o.price, !1)]))), d = M;
173
+ } = fe(), a = h(() => g.value.filter((o) => r([o.name, F(o.price, !1)]))), d = U;
175
174
  ne(() => a.value.length, (o) => {
176
175
  d("update:count", o);
177
176
  }, {
@@ -204,7 +203,7 @@ const ge = _e("takeaway-manager", () => {
204
203
  enableSorting: !1,
205
204
  size: 200,
206
205
  cell: (o) => {
207
- const s = o.getValue(), p = H(l.categorizedItems, s).flatMap((C) => C.items).length ?? 0;
206
+ const s = o.getValue(), p = J(l.categorizedItems, s).flatMap((x) => x.items).length ?? 0;
208
207
  return e("menu.takeaway.table.items_linked", {
209
208
  count: p
210
209
  });
@@ -226,38 +225,38 @@ const ge = _e("takeaway-manager", () => {
226
225
  s.stopPropagation(), m.deleteTakeaway(o.row.original);
227
226
  }
228
227
  }) : null])
229
- }]), U = de(), b = h(() => U.breakpoints.value.xs);
228
+ }]), M = de(), b = h(() => M.breakpoints.value.xs);
230
229
  return (o, s) => {
231
- const p = S("fm-search"), C = S("fm-table"), I = S("fm-button");
232
- return g.value.length ? (_(), x(O, {
230
+ const p = S("fm-search"), x = S("fm-table"), B = S("fm-button");
231
+ return g.value.length ? (_(), C(O, {
233
232
  key: 0
234
- }, [b.value ? (_(), x(O, {
233
+ }, [b.value ? (_(), C(O, {
235
234
  key: 1
236
- }, [k("div", xe, [V(p, {
235
+ }, [k("div", Ce, [V(p, {
237
236
  class: "w-full",
238
237
  autofocus: "",
239
238
  modelValue: t(c),
240
239
  "onUpdate:modelValue": s[2] || (s[2] = (n) => j(c) ? c.value = n : null),
241
240
  placeholder: t(e)("menu.takeaway.table.search.placeholder")
242
- }, null, 8, ["modelValue", "placeholder"])]), k("div", Ve, [(_(!0), x(O, null, ie(a.value, (n) => (_(), x("div", {
241
+ }, null, 8, ["modelValue", "placeholder"])]), k("div", Ve, [(_(!0), C(O, null, ie(a.value, (n) => (_(), C("div", {
243
242
  key: n._id,
244
243
  class: D(["py-12 px-16", "flex space-x-8", "items-center"]),
245
244
  onClick: () => {
246
245
  f.value.edit && t(m).updateTakeaway(n);
247
246
  }
248
- }, [k("div", Me, [k("p", Ue, B(n.name), 1), k("p", Ee, B(`${t(H)(t(l).categorizedItems, n.usedBy).flatMap((E) => E.items).length ?? 0} items linked`), 1), k("p", Ke, " Price: " + B(w.value.symbol) + B(t(F)(n.price, !1)), 1)]), f.value.delete ? (_(), $(I, {
247
+ }, [k("div", Ue, [k("p", Me, I(n.name), 1), k("p", Ee, I(`${t(J)(t(l).categorizedItems, n.usedBy).flatMap((E) => E.items).length ?? 0} items linked`), 1), k("p", Ke, " Price: " + I(w.value.symbol) + I(t(F)(n.price, !1)), 1)]), f.value.delete ? (_(), G(B, {
249
248
  key: 0,
250
249
  variant: t(A).Tertiary,
251
250
  "text-color": "neutral-gray-400",
252
251
  "prepend-icon": "delete",
253
- onClick: G(() => t(m).deleteTakeaway(n), ["stop"])
254
- }, null, 8, ["variant", "onClick"])) : q("", !0)], 8, Te))), 128))])], 64)) : (_(), x("div", be, [k("div", he, [k("div", Ce, [V(p, {
252
+ onClick: H(() => t(m).deleteTakeaway(n), ["stop"])
253
+ }, null, 8, ["variant", "onClick"])) : $("", !0)], 8, Te))), 128))])], 64)) : (_(), C("div", be, [k("div", he, [k("div", xe, [V(p, {
255
254
  autofocus: "",
256
255
  modelValue: t(c),
257
256
  "onUpdate:modelValue": s[0] || (s[0] = (n) => j(c) ? c.value = n : null),
258
257
  placeholder: t(e)("menu.takeaway.table.search.placeholder")
259
258
  }, null, 8, ["modelValue", "placeholder"])])]), V(ue, null, {
260
- default: P(() => [V(C, {
259
+ default: P(() => [V(x, {
261
260
  "column-defs": u.value,
262
261
  loading: t(y).checkMenuIsLoading(),
263
262
  "page-size": a.value.length,
@@ -272,11 +271,11 @@ const ge = _e("takeaway-manager", () => {
272
271
  })
273
272
  }, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
274
273
  _: 1
275
- })]))], 64)) : (_(), x("div", Be, [V(t(me), {
274
+ })]))], 64)) : (_(), C("div", Ie, [V(t(me), {
276
275
  subtitle: t(e)("menu.takeaway.empty.subtitle"),
277
276
  title: t(e)("menu.takeaway.empty.title")
278
277
  }, {
279
- action: P(() => [f.value.create ? (_(), $(t(pe), {
278
+ action: P(() => [f.value.create ? (_(), G(t(pe), {
280
279
  key: 0,
281
280
  "bind-to-variant": i.value,
282
281
  action: "add",
@@ -290,18 +289,18 @@ const ge = _e("takeaway-manager", () => {
290
289
  }, {
291
290
  default: P(({
292
291
  trigger: n
293
- }) => [V(I, {
292
+ }) => [V(B, {
294
293
  "prepend-icon": "add",
295
294
  label: t(e)("menu.takeaway.empty.action"),
296
- onClick: G(n, ["stop"])
295
+ onClick: H(n, ["stop"])
297
296
  }, null, 8, ["label", "onClick"])]),
298
297
  _: 1
299
- }, 8, ["bind-to-variant"])) : q("", !0)]),
298
+ }, 8, ["bind-to-variant"])) : $("", !0)]),
300
299
  _: 1
301
300
  }, 8, ["subtitle", "title"])]));
302
301
  };
303
302
  }
304
303
  });
305
304
  export {
306
- $e as _
305
+ je as _
307
306
  };