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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/{App-CrQBq4gc.js → App-1TX8v7ZA.js} +10 -8
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-D00UOSsK.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CR7QrFUG.js} +12 -12
  3. package/dist/{Catalog-D4m8x_f2.js → Catalog-DWClc58s.js} +75 -74
  4. package/dist/{Category-sQll5ITQ.js → Category-BqKFvFam.js} +60 -60
  5. package/dist/{Category-Ql1kDDH-.js → Category-IYMtMoT-.js} +28 -28
  6. package/dist/{CookingGuide-CSutufcu.js → CookingGuide-BayJ6zj4.js} +103 -101
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BqhYFXNG.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Ceq86b3d.js} +1 -1
  8. package/dist/{Group-CnBE6CiB.js → Group-LqSX7ue6.js} +1 -1
  9. package/dist/{Group-YqVh5hC0.js → Group-RujTPTns.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-D9TSH4sS.js → Group.vue_vue_type_script_setup_true_lang-Dj9ZmkYe.js} +138 -137
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CqriuXVC.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D5GWkh3G.js} +16 -16
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CaIU0RsG.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C4IrA3es.js} +4616 -4610
  13. package/dist/{Ingredient-MhLxJzAU.js → Ingredient-_tc8llr1.js} +65 -64
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CIbExsMI.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DLFDf-VZ.js} +14 -12
  15. package/dist/{LinkProductSideSheet-D7vYZbFy.js → LinkProductSideSheet-C6rF-G1v.js} +14 -12
  16. package/dist/{MenuSetting-n0me5wY8.js → MenuSetting-xDHeeROY.js} +27 -26
  17. package/dist/{PrintRoute-CudZZYbe.js → PrintRoute-B_TFMn5e.js} +17 -15
  18. package/dist/{Product-DPZQgWET.js → Product-DdEEqrtc.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-CdaeZy_o.js → Product.vue_vue_type_script_setup_true_lang-zcistmwh.js} +257 -256
  20. package/dist/{ProductInternalTools-DgANHliV.js → ProductInternalTools-BcC7BF6W.js} +45 -45
  21. package/dist/{Products-Ez4R3jKW.js → Products-Cu0cJshV.js} +74 -72
  22. package/dist/{Publish-B4DEPe1I.js → Publish-Bm3Xiks1.js} +34 -32
  23. package/dist/{Recipe-Cripr-gY.js → Recipe-DWK-luIZ.js} +65 -63
  24. package/dist/{Scheduler-C-OV9d7d.js → Scheduler-Cb1TeBhW.js} +19 -19
  25. package/dist/{ServingSequence-DAumDXP1.js → ServingSequence-evSIET_8.js} +34 -34
  26. package/dist/{Setting-ByaHpIAN.js → Setting-Cn3kwC9F.js} +54 -53
  27. package/dist/{Subcategory-ro2aGt2H.js → Subcategory-q4m4qHsU.js} +34 -34
  28. package/dist/{Takeaway-CJb0ayDC.js → Takeaway-ClepHYGu.js} +14 -14
  29. package/dist/{Takeaway-AEg_0gKg.js → Takeaway-D-rdUZuh.js} +1 -1
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Cjj4bxoL.js → Takeaway.vue_vue_type_script_setup_true_lang-y9Yxstu2.js} +41 -40
  31. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Drf4n4rj.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BSeLfoOA.js} +1108 -1106
  32. package/dist/{Unit-1wzUBplb.js → Unit-IM8Naj82.js} +12 -12
  33. package/dist/{Variant-Dnz2v5u0.js → Variant-fzGvwaMo.js} +16 -16
  34. package/dist/{_id_-C3rBZ6zL.js → _id_-BsKNG9Qv.js} +22 -22
  35. package/dist/{app-sDPxNF11.js → app-BzQRUMTK.js} +3 -3
  36. package/dist/{app-CLY6CoaV.js → app-CoVUUCa_.js} +24 -24
  37. package/dist/app.js +1 -1
  38. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  39. package/dist/assets/{linked-status-BZ4FSJ_Z.js → linked-status-eQqjvOq_.js} +2 -2
  40. package/dist/assets/{override-menu-C-fWJdVd.js → override-menu-C8NTBJgN.js} +2 -2
  41. package/dist/assets/{validate-menu-BDEM_Odz.js → validate-menu-Dn-OO7Ed.js} +2 -2
  42. package/dist/{catalog-bkFntZNz.js → catalog-CaXceaA2.js} +1 -1
  43. package/dist/{catalogSetting-zrKwGJ_C.js → catalogSetting-BGvckFdh.js} +1 -1
  44. package/dist/{category-BuPYaEsy.js → category-u5eo_Vjd.js} +5 -3
  45. package/dist/currency-BPHwez-E.js +7 -0
  46. package/dist/{dayjs.min-CR2NIyKn.js → dayjs.min-Bsr3tJCn.js} +1 -1
  47. package/dist/{index-BNORpjos.js → index-Bbx4iZ6n.js} +27 -27
  48. package/dist/{index-Dp_vLFQp.js → index-DSAG0yWh.js} +22 -20
  49. package/dist/{index-D20u0bCl.js → index-tRQb7RN_.js} +1 -1
  50. package/dist/{item-D4DcBt7N.js → item-BAqzKh4O.js} +801 -799
  51. package/dist/{jszip.min-CRJ61J9H.js → jszip.min-BKJtvCjM.js} +353 -353
  52. package/dist/{menu-Dw-Hpy07.js → menu-CDrsBjmr.js} +11 -9
  53. package/dist/menu-CsIzrBEr.js +74044 -0
  54. package/dist/packages/shared/src/permission/posPermission.d.ts +6 -0
  55. package/dist/{priceTier-EDLTGEjz.js → priceTier-DfbHonGe.js} +4 -4
  56. package/dist/{scheduler-CpPn2BlK.js → scheduler-DTWaBudB.js} +13 -11
  57. package/dist/{subcategory-B_W6vbM8.js → subcategory-D-R5r1Tr.js} +86 -84
  58. package/dist/{toExcel-D02OlDJu.js → toExcel-84VTtSA7.js} +2 -2
  59. package/dist/{unit-fro9wz1K.js → unit-B4zscxzo.js} +24 -23
  60. package/package.json +1 -1
  61. package/dist/currency-BISImIgX.js +0 -7
  62. package/dist/menu-ibc-yXVt.js +0 -107745
@@ -1,37 +1,37 @@
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";
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";
2
2
  import { useI18n as T } from "@feedmepos/mf-common";
3
- import { useSnackbar as B, components as j, useDialog as Y, FmButtonVariant as z, useBreakpoints as ae, FmButtonColorThemeVariant as oe } from "@feedmepos/ui-library";
3
+ import { useSnackbar as O, 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 { D, u as N, O as U, J as K, G } from "./menu-ibc-yXVt.js";
5
+ import { A as D, u as N, M as A, H as K, B as q } from "./menu-CsIzrBEr.js";
6
6
  import { _ as le } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
- import { _ as se } from "./app-CLY6CoaV.js";
7
+ import { _ as se } from "./app-CoVUUCa_.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 q } from "./subcategory-B_W6vbM8.js";
13
+ import { a as G } from "./subcategory-D-R5r1Tr.js";
14
14
  import { _ as de } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
15
- import { a as me } from "./menu-Dw-Hpy07.js";
15
+ import { a as me } from "./menu-CDrsBjmr.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__ */ L({
22
+ }, ge = /* @__PURE__ */ B({
23
23
  __name: "Form",
24
24
  props: {
25
25
  initialValue: {}
26
26
  },
27
- setup($, {
27
+ setup(S, {
28
28
  expose: f
29
29
  }) {
30
- const _ = $, x = B(), g = D(x), k = U(g), d = N(), {
30
+ const _ = S, x = O(), g = D(x), k = A(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)), M = ie(() => n.value.name !== _.initialValue.name, () => {
34
+ }, n = w(I(_.initialValue)), $ = 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: G.F_MENU_MODULE_V4_KEY.enum.subCategory,
42
+ module: q.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(M)
70
+ "onOn:clickedAway": t($)
71
71
  }, {
72
- "side-sheet-header": h(() => [s("p", pe, O(t(a)("menu.subcategory.title")), 1)]),
72
+ "side-sheet-header": h(() => [s("p", pe, L(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
- }, Se = /* @__PURE__ */ L({
114
+ }, Me = /* @__PURE__ */ B({
115
115
  __name: "SubcategoryTable",
116
- setup($) {
117
- const f = Y(), _ = B(), x = D(_), g = U(x), k = q({
116
+ setup(S) {
117
+ const f = Y(), _ = O(), x = D(_), g = A(x), k = G({
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 A("div", {
139
+ return U("div", {
140
140
  class: "flex justify-end"
141
- }, [A(j.FmButton, {
141
+ }, [U(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: G.F_MENU_MODULE_V4_KEY.enum.subCategory,
176
+ module: q.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 M(o) {
182
+ async function $(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"), J = y("FmTable"), H = y("FmButton");
194
+ const u = y("FmSearch"), H = y("FmTable"), J = 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, O(i.name), 1)]), m(H, {
207
+ }, [s("div", we, [s("p", Fe, L(i.name), 1)]), m(J, {
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(J, {
222
+ default: h(() => [m(H, {
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: M,
231
+ onDndChanged: $,
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
- }), $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({
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({
239
239
  __name: "Subcategory",
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();
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();
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(), S(le, {
246
+ return me().resetOnMount(), (b, n) => (p(), M(le, {
247
247
  heading: t(a)("menu.subcategory.title")
248
248
  }, {
249
249
  default: h(() => [
250
- d.value.length > 0 ? (p(), S(Se, { key: 0 })) : (p(), S(t(de), {
250
+ d.value.length > 0 ? (p(), M(Me, { key: 0 })) : (p(), M(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", $e, [
262
- s("div", Me, [
261
+ s("div", Se, [
262
+ s("div", $e, [
263
263
  s("div", Ee, [
264
- s("p", Le, O(e.value), 1)
264
+ s("p", Be, L(e.value), 1)
265
265
  ])
266
266
  ]),
267
- d.value.length > 0 ? (p(), S(ne, {
267
+ d.value.length > 0 ? (p(), M(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
- qe as default
280
+ Ge 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 { D as x, u as v, O as w, J as E, G as M } from "./menu-ibc-yXVt.js";
2
+ import { A as x, u as v, M as w, H as E, B as M } from "./menu-CsIzrBEr.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-Cjj4bxoL.js";
8
- import { T as O, l as S } from "./index-Dp_vLFQp.js";
9
- import { a as L } from "./menu-Dw-Hpy07.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({
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({
11
11
  __name: "Takeaway",
12
- setup(I) {
12
+ setup(D) {
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(), (P, o) => (d(), i(C, {
14
+ return L().resetOnMount(), (I, o) => (d(), i(C, {
15
15
  heading: a(r)("menu.takeaway.title")
16
16
  }, {
17
17
  default: s(() => [
@@ -20,14 +20,14 @@ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "fle
20
20
  })
21
21
  ]),
22
22
  "append-heading": s(() => [
23
- t("div", U, [
24
- t("div", B, [
25
- t("div", D, [
26
- t("p", F, b(n.value), 1)
23
+ t("div", O, [
24
+ t("div", U, [
25
+ t("div", F, [
26
+ t("p", A, b(n.value), 1)
27
27
  ])
28
28
  ]),
29
29
  t("div", null, [
30
- n.value > 0 ? (d(), i(a(O), {
30
+ n.value > 0 ? (d(), i(a(S), {
31
31
  key: 0,
32
32
  "bind-to-variant": _.value,
33
33
  action: "add",
@@ -37,7 +37,7 @@ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { 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(S)(e.usedBy || [])
40
+ link: a(B)(e.usedBy || [])
41
41
  },
42
42
  e.name
43
43
  ))
@@ -60,5 +60,5 @@ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { class: "fle
60
60
  }
61
61
  });
62
62
  export {
63
- z as default
63
+ G as default
64
64
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./Takeaway.vue_vue_type_script_setup_true_lang-Cjj4bxoL.js";
1
+ import { _ as f } from "./Takeaway.vue_vue_type_script_setup_true_lang-y9Yxstu2.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,22 +1,23 @@
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, at as J } from "./menu-ibc-yXVt.js";
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";
3
4
  import { useI18n as X, useCoreStore as re } from "@feedmepos/mf-common";
4
5
  import { useDialog as le, useSnackbar as Z, FmButtonVariant as A, components as ce, useBreakpoints as de } from "@feedmepos/ui-library";
5
- import { _ as ue } from "./app-CLY6CoaV.js";
6
+ import { _ as ue } from "./app-CoVUUCa_.js";
6
7
  import { _ as me } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
7
- import { a as ye, l as ee, T as pe } from "./index-Dp_vLFQp.js";
8
+ import { a as ye, l as ee, T as pe } from "./index-DSAG0yWh.js";
8
9
  import { u as fe } from "./search-BAPEUu1R.js";
9
- import { f as F } from "./currency-BISImIgX.js";
10
+ import { f as F } from "./currency-BPHwez-E.js";
10
11
  import { defineStore as _e } from "pinia";
11
- import { C as ke } from "./catalog-bkFntZNz.js";
12
+ import { C as ke } from "./catalog-CaXceaA2.js";
12
13
  import { c as ve } from "./createComponentProgrammatically-Bt2rn1IQ.js";
13
- function we(T, U, l, m) {
14
+ function we(T, M, l, m) {
14
15
  var y, v, w, g;
15
16
  const i = L(T);
16
17
  i.override.takeaway[l._id] = {
17
18
  price: l.price || void 0
18
19
  };
19
- const f = [...l.usedBy, ...U.usedBy];
20
+ const f = [...l.usedBy, ...M.usedBy];
20
21
  for (const r of f) {
21
22
  const c = l.usedBy.some(
22
23
  (e) => e._id == r._id && e.combinationKey == r.combinationKey
@@ -46,7 +47,7 @@ function we(T, U, l, m) {
46
47
  return i;
47
48
  }
48
49
  const ge = _e("takeaway-manager", () => {
49
- const T = le(), U = Z(), l = q(U), m = W(l), i = Q(), f = te(), { t: y } = X(), v = (a) => {
50
+ const T = le(), M = Z(), l = J(M), m = W(l), i = Q(), f = te(), { t: y } = X(), v = (a) => {
50
51
  var e, u;
51
52
  const { vNode: d } = ve(
52
53
  ye,
@@ -56,8 +57,8 @@ const ge = _e("takeaway-manager", () => {
56
57
  (u = (e = d.component) == null ? void 0 : e.exposed) == null || u.trigger();
57
58
  };
58
59
  async function w(a) {
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);
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);
61
62
  v({
62
63
  initialValue: a,
63
64
  applyProduct: !0,
@@ -126,40 +127,40 @@ const ge = _e("takeaway-manager", () => {
126
127
  class: /* @__PURE__ */ D(["flex-1 overflow-hidden", "space-y-16", "flex flex-col", "overflow-hidden"])
127
128
  }, he = {
128
129
  class: "flex items-center space-x-8 justify-end"
129
- }, xe = {
130
- class: "w-[320px]"
131
130
  }, Ce = {
131
+ class: "w-[320px]"
132
+ }, xe = {
132
133
  class: "px-16 pt-8"
133
134
  }, Ve = {
134
135
  class: /* @__PURE__ */ D(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100"])
135
- }, Te = ["onClick"], Ue = {
136
+ }, Te = ["onClick"], Me = {
136
137
  class: "flex-1"
137
- }, Me = {
138
+ }, Ue = {
138
139
  class: "fm-typo-en-body-lg-600 mb-4"
139
140
  }, Ee = {
140
141
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
141
142
  }, Ke = {
142
143
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
143
- }, Ie = {
144
+ }, Be = {
144
145
  key: 1,
145
146
  class: "xs:pt-24"
146
- }, je = /* @__PURE__ */ oe({
147
+ }, $e = /* @__PURE__ */ oe({
147
148
  __name: "Takeaway",
148
149
  emits: ["update:count"],
149
150
  setup(T, {
150
- emit: U
151
+ emit: M
151
152
  }) {
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) => ({
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) => ({
153
154
  ...o,
154
155
  usedBy: l.items.reduce((s, p) => {
155
156
  var n, E, Y;
156
- const x = p.takeawayUsed === o._id;
157
- if ((!i.value || !((E = (n = p.variant) == null ? void 0 : n.variantGroupIds) != null && E.length)) && x)
157
+ const C = p.takeawayUsed === o._id;
158
+ if ((!i.value || !((E = (n = p.variant) == null ? void 0 : n.variantGroupIds) != null && E.length)) && C)
158
159
  s.push({
159
160
  _id: p._id
160
161
  });
161
162
  else {
162
- const ae = (((Y = p.variant) == null ? void 0 : Y.variantCombinations) || []).filter((K) => K.takeawayUsed === o._id || !K.takeawayUsed && x).map((K) => ({
163
+ const ae = (((Y = p.variant) == null ? void 0 : Y.variantCombinations) || []).filter((K) => K.takeawayUsed === o._id || !K.takeawayUsed && C).map((K) => ({
163
164
  _id: p._id,
164
165
  combinationKey: K.combinationKey
165
166
  }));
@@ -170,7 +171,7 @@ const ge = _e("takeaway-manager", () => {
170
171
  }))), {
171
172
  filter: r,
172
173
  searchKey: c
173
- } = fe(), a = h(() => g.value.filter((o) => r([o.name, F(o.price, !1)]))), d = U;
174
+ } = fe(), a = h(() => g.value.filter((o) => r([o.name, F(o.price, !1)]))), d = M;
174
175
  ne(() => a.value.length, (o) => {
175
176
  d("update:count", o);
176
177
  }, {
@@ -203,7 +204,7 @@ const ge = _e("takeaway-manager", () => {
203
204
  enableSorting: !1,
204
205
  size: 200,
205
206
  cell: (o) => {
206
- const s = o.getValue(), p = J(l.categorizedItems, s).flatMap((x) => x.items).length ?? 0;
207
+ const s = o.getValue(), p = H(l.categorizedItems, s).flatMap((C) => C.items).length ?? 0;
207
208
  return e("menu.takeaway.table.items_linked", {
208
209
  count: p
209
210
  });
@@ -225,38 +226,38 @@ const ge = _e("takeaway-manager", () => {
225
226
  s.stopPropagation(), m.deleteTakeaway(o.row.original);
226
227
  }
227
228
  }) : null])
228
- }]), M = de(), b = h(() => M.breakpoints.value.xs);
229
+ }]), U = de(), b = h(() => U.breakpoints.value.xs);
229
230
  return (o, s) => {
230
- const p = S("fm-search"), x = S("fm-table"), B = S("fm-button");
231
- return g.value.length ? (_(), C(O, {
231
+ const p = S("fm-search"), C = S("fm-table"), I = S("fm-button");
232
+ return g.value.length ? (_(), x(O, {
232
233
  key: 0
233
- }, [b.value ? (_(), C(O, {
234
+ }, [b.value ? (_(), x(O, {
234
235
  key: 1
235
- }, [k("div", Ce, [V(p, {
236
+ }, [k("div", xe, [V(p, {
236
237
  class: "w-full",
237
238
  autofocus: "",
238
239
  modelValue: t(c),
239
240
  "onUpdate:modelValue": s[2] || (s[2] = (n) => j(c) ? c.value = n : null),
240
241
  placeholder: t(e)("menu.takeaway.table.search.placeholder")
241
- }, null, 8, ["modelValue", "placeholder"])]), k("div", Ve, [(_(!0), C(O, null, ie(a.value, (n) => (_(), C("div", {
242
+ }, null, 8, ["modelValue", "placeholder"])]), k("div", Ve, [(_(!0), x(O, null, ie(a.value, (n) => (_(), x("div", {
242
243
  key: n._id,
243
244
  class: D(["py-12 px-16", "flex space-x-8", "items-center"]),
244
245
  onClick: () => {
245
246
  f.value.edit && t(m).updateTakeaway(n);
246
247
  }
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, {
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, {
248
249
  key: 0,
249
250
  variant: t(A).Tertiary,
250
251
  "text-color": "neutral-gray-400",
251
252
  "prepend-icon": "delete",
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, {
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, {
254
255
  autofocus: "",
255
256
  modelValue: t(c),
256
257
  "onUpdate:modelValue": s[0] || (s[0] = (n) => j(c) ? c.value = n : null),
257
258
  placeholder: t(e)("menu.takeaway.table.search.placeholder")
258
259
  }, null, 8, ["modelValue", "placeholder"])])]), V(ue, null, {
259
- default: P(() => [V(x, {
260
+ default: P(() => [V(C, {
260
261
  "column-defs": u.value,
261
262
  loading: t(y).checkMenuIsLoading(),
262
263
  "page-size": a.value.length,
@@ -271,11 +272,11 @@ const ge = _e("takeaway-manager", () => {
271
272
  })
272
273
  }, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
273
274
  _: 1
274
- })]))], 64)) : (_(), C("div", Ie, [V(t(me), {
275
+ })]))], 64)) : (_(), x("div", Be, [V(t(me), {
275
276
  subtitle: t(e)("menu.takeaway.empty.subtitle"),
276
277
  title: t(e)("menu.takeaway.empty.title")
277
278
  }, {
278
- action: P(() => [f.value.create ? (_(), G(t(pe), {
279
+ action: P(() => [f.value.create ? (_(), $(t(pe), {
279
280
  key: 0,
280
281
  "bind-to-variant": i.value,
281
282
  action: "add",
@@ -289,18 +290,18 @@ const ge = _e("takeaway-manager", () => {
289
290
  }, {
290
291
  default: P(({
291
292
  trigger: n
292
- }) => [V(B, {
293
+ }) => [V(I, {
293
294
  "prepend-icon": "add",
294
295
  label: t(e)("menu.takeaway.empty.action"),
295
- onClick: H(n, ["stop"])
296
+ onClick: G(n, ["stop"])
296
297
  }, null, 8, ["label", "onClick"])]),
297
298
  _: 1
298
- }, 8, ["bind-to-variant"])) : $("", !0)]),
299
+ }, 8, ["bind-to-variant"])) : q("", !0)]),
299
300
  _: 1
300
301
  }, 8, ["subtitle", "title"])]));
301
302
  };
302
303
  }
303
304
  });
304
305
  export {
305
- je as _
306
+ $e as _
306
307
  };