@feedmepos/mf-menu 0.32.43-dev.1 → 0.32.44

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 (71) hide show
  1. package/dist/{App-CiqMdAvF.js → App-BXkiQoTM.js} +7 -7
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CVs7MfmX.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BoSL4dm7.js} +3 -3
  3. package/dist/{Catalog-KzftKfOt.js → Catalog-CLFVLyor.js} +44 -44
  4. package/dist/{Category-pNQdkIvn.js → Category-BdyouDU8.js} +24 -24
  5. package/dist/{Category-em6K5yk3.js → Category-CNuVHuI3.js} +25 -25
  6. package/dist/{CookingGuide-Bp9CvTAi.js → CookingGuide-Bed7bUt1.js} +105 -105
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BbsxEs6O.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CZDL2xJC.js} +1 -1
  8. package/dist/{Group-mIwdwq58.js → Group-D4UTsIxI.js} +3 -3
  9. package/dist/{Group-eE_snSRq.js → Group-TUqCPmO3.js} +1 -1
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-C5l4ycJB.js → Group.vue_vue_type_script_setup_true_lang-BJPT8flL.js} +19 -19
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B4PznWDZ.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D83liryu.js} +30 -30
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-eS8pMvVG.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CRIRinHB.js} +1651 -1652
  13. package/dist/{Ingredient-BNvYYdb5.js → Ingredient-CcxoeuDd.js} +20 -20
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CzQIddna.js → InventoryBinding.vue_vue_type_script_setup_true_lang-58tyxdVh.js} +2 -2
  15. package/dist/{LinkProductSideSheet-BQQtUuCr.js → LinkProductSideSheet-DazOkwkd.js} +45 -45
  16. package/dist/{MenuSetting-s9syqMsT.js → MenuSetting-B3oLll4C.js} +47 -47
  17. package/dist/{PrintRoute-BqMxtnus.js → PrintRoute-D878qPu8.js} +39 -39
  18. package/dist/{Product-CHhpb-2E.js → Product-DOC8y_mW.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-DHny0uGc.js → Product.vue_vue_type_script_setup_true_lang-tZyBhWYT.js} +140 -140
  20. package/dist/{ProductInternalTools-DEB8Xhnv.js → ProductInternalTools-9TgIc2bR.js} +66 -66
  21. package/dist/Products-DfUGnHmD.js +1568 -0
  22. package/dist/{Publish-tnJY6n8r.js → Publish-BktK_PKq.js} +29 -29
  23. package/dist/{Recipe-DDPXv3AU.js → Recipe-eA0xrGYk.js} +24 -24
  24. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-roEHTZnU.js → RuleView.vue_vue_type_script_setup_true_lang-t8M7z09s.js} +366 -366
  25. package/dist/{Scheduler-CMKwUkNN.js → Scheduler-CKSqPZLQ.js} +11 -11
  26. package/dist/{ServingSequence-NA0yeDMF.js → ServingSequence-Ea20baNj.js} +44 -44
  27. package/dist/{Setting-BRfi_hxY.js → Setting-u6lX_Dzg.js} +17 -17
  28. package/dist/{Subcategory-W9faZY7n.js → Subcategory-C6s7OMOb.js} +51 -51
  29. package/dist/{Takeaway-fijUedLA.js → Takeaway-B9kr-Nf4.js} +13 -13
  30. package/dist/{Takeaway-5DKxdpZ3.js → Takeaway-lWxS9oWe.js} +1 -1
  31. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BhiFnON_.js → Takeaway.vue_vue_type_script_setup_true_lang-oA0e9oI5.js} +54 -54
  32. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-BUNPf1OD.js → Thumbnail.vue_vue_type_script_setup_true_lang-T40ChY7j.js} +27 -27
  33. package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-CcIGCUwk.js +194 -0
  34. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B1e3d-uX.js +6130 -0
  35. package/dist/{Unit-582FVjPq.js → Unit-DkQlUg2l.js} +8 -8
  36. package/dist/{Variant-Cb02SmoL.js → Variant-BF5r2WLL.js} +25 -25
  37. package/dist/{_id_-BYU1xwzB.js → _id_-_oqk-OhC.js} +28 -28
  38. package/dist/app-CfCYl2pO.js +363 -0
  39. package/dist/{app-CcPyLfvj.js → app-DIYHNWEw.js} +1 -1
  40. package/dist/app.js +1 -1
  41. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  42. package/dist/assets/{linked-status-C1DHqpkR.js → linked-status-AoXjo9FF.js} +5 -5
  43. package/dist/assets/{menu-export-Ci-MXpn1.js → menu-export-BHcaWhM3.js} +2 -2
  44. package/dist/assets/{override-menu-CajXgOdO.js → override-menu-B9xQcjuJ.js} +5 -5
  45. package/dist/assets/{validate-menu-DDPswAia.js → validate-menu-D-ezd4W8.js} +2 -2
  46. package/dist/{catalog-Bs3SNL7n.js → catalog-CvN9Wu8V.js} +1 -1
  47. package/dist/{catalogSetting-BN4d_FvT.js → catalogSetting-qS5Np22q.js} +1 -1
  48. package/dist/{currency-Cma3AX0v.js → currency-Nxod6uwl.js} +1 -1
  49. package/dist/dayjs.min-B1AjAGva.js +6 -0
  50. package/dist/index-C0Zw1cSS.js +545 -0
  51. package/dist/{index-3wsuY29D.js → index-Cq-czJjU.js} +31 -31
  52. package/dist/index-nKlYiotY.js +246 -0
  53. package/dist/{index.vue_vue_type_script_setup_true_lang-DotsunNI.js → index.vue_vue_type_script_setup_true_lang-YXKayPEp.js} +269 -244
  54. package/dist/{item-DOcT7NVT.js → item-CUZSonzT.js} +2587 -2587
  55. package/dist/{jszip.min-h2cXUF_-.js → jszip.min-BnkZQ6lD.js} +6 -7
  56. package/dist/{menu-CAmS3pcT.js → menu-BP_ArXCI.js} +1 -1
  57. package/dist/{menuV2-COwLB3e1.js → menuV2-BGEYgQ8-.js} +128 -128
  58. package/dist/{priceTier-DrrQcFCh.js → priceTier-B-Qa0xaO.js} +1 -1
  59. package/dist/{rules-DGRdKiV6.js → rules-Dchd_ilF.js} +12 -12
  60. package/dist/{scheduler-BpEV0N8K.js → scheduler-DN7ZGLk8.js} +29 -29
  61. package/dist/{toExcel-eN1zgiqN.js → toExcel-jHmkDqcm.js} +2 -2
  62. package/dist/{translation-BCZ1Ruvv.js → translation-Cdap0IVg.js} +21 -35
  63. package/dist/{unit-BAcozp9s.js → unit-DgL56pkI.js} +35 -35
  64. package/package.json +2 -2
  65. package/dist/Products-C7UtJMGZ.js +0 -307
  66. package/dist/RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-PFRwBb1c.js +0 -144
  67. package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-DZp38dX4.js +0 -196
  68. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DC4naR16.js +0 -5767
  69. package/dist/app-0m01R0SM.js +0 -2286
  70. package/dist/dayjs.min-D-HR3H5W.js +0 -7
  71. package/dist/index-DXY5zcNA.js +0 -545
@@ -1,18 +1,18 @@
1
- import { defineComponent as A, ref as x, computed as V, watch as te, resolveComponent as C, createElementBlock as k, openBlock as p, Fragment as I, renderSlot as oe, createVNode as m, unref as n, withCtx as y, createElementVNode as c, renderList as Q, toDisplayString as M, h as T, withModifiers as q, getCurrentInstance as ne, createBlock as U, createCommentVNode as le } from "vue";
1
+ import { defineComponent as z, ref as x, computed as V, watch as te, resolveComponent as C, createElementBlock as k, openBlock as p, Fragment as A, renderSlot as oe, createVNode as m, unref as n, withCtx as y, createElementVNode as c, renderList as H, toDisplayString as T, h as N, withModifiers as J, getCurrentInstance as ne, createBlock as U, createCommentVNode as le } from "vue";
2
2
  import { useI18n as R } from "@feedmepos/mf-common";
3
- import { useSnackbar as P, components as W, useDialog as X, FmButtonVariant as G, useBreakpoints as se, FmButtonColorThemeVariant as ie } from "@feedmepos/ui-library";
3
+ import { useSnackbar as P, components as W, useDialog as X, FmButtonVariant as q, useBreakpoints as se, FmButtonColorThemeVariant as ie } from "@feedmepos/ui-library";
4
4
  import { _ as re } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
- import { B as Y, u as J, O as K, J as Z, y as ee, a2 as ce } from "./index.vue_vue_type_script_setup_true_lang-DotsunNI.js";
5
+ import { G as Y, u as K, Q as G, M as Z, A as ee, a4 as ce } from "./index.vue_vue_type_script_setup_true_lang-YXKayPEp.js";
6
6
  import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
- import { _ as me } from "./app-0m01R0SM.js";
7
+ import { _ as me } from "./app-CfCYl2pO.js";
8
8
  import { c as de } from "./createForm-BoUQeZTd.js";
9
9
  import { u as pe } from "./discardConfirm-BHni0LNu.js";
10
- import { c as H } from "./object-DVUNCr7w.js";
11
- import { r as _e, u as ae } from "./rules-DGRdKiV6.js";
12
- import { _ as fe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-DZp38dX4.js";
10
+ import { c as Q } from "./object-DVUNCr7w.js";
11
+ import { r as _e, u as ae } from "./rules-Dchd_ilF.js";
12
+ import { _ as fe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-CcIGCUwk.js";
13
13
  import { c as ve } from "./check-C9mY6LiX.js";
14
- import { g as z } from "./translation-BCZ1Ruvv.js";
15
- import { a as ge } from "./menu-CAmS3pcT.js";
14
+ import { g as I } from "./translation-Cdap0IVg.js";
15
+ import { a as ge } from "./menu-BP_ArXCI.js";
16
16
  const ye = {
17
17
  class: "fm-typo-en-title-md-600"
18
18
  }, be = {
@@ -21,30 +21,30 @@ const ye = {
21
21
  class: "py-12 px-16 space-y-4"
22
22
  }, xe = {
23
23
  class: "flex gap-8 items-center justify-start"
24
- }, Ce = /* @__PURE__ */ A({
24
+ }, Ce = /* @__PURE__ */ z({
25
25
  __name: "Form",
26
26
  props: {
27
27
  initialValue: {}
28
28
  },
29
- setup(B, {
29
+ setup(D, {
30
30
  expose: w
31
31
  }) {
32
- const h = B, S = P(), F = Y(S), E = K(F), d = J(), {
32
+ const h = D, S = P(), F = Y(S), E = G(F), d = K(), {
33
33
  t: l
34
- } = R(), L = x(!1), o = x(!1), $ = x(!1), u = x(void 0), N = (e) => {
34
+ } = R(), L = x(!1), o = x(!1), $ = x(!1), u = x(void 0), M = (e) => {
35
35
  ve.isBoolean(e) ? o.value = e : o.value = !o.value;
36
- }, s = x(H(h.initialValue)), O = V(() => !!s.value.name), D = V(() => {
36
+ }, s = x(Q(h.initialValue)), O = V(() => !!s.value.name), B = V(() => {
37
37
  var b;
38
38
  const e = [], t = "en-US", a = (b = u.value) == null ? void 0 : b[t];
39
39
  return s.value.name && !a && e.push({
40
40
  locale: t,
41
41
  name: s.value.name,
42
- localeDisplay: z(t)
42
+ localeDisplay: I(t)
43
43
  }), u.value && Object.entries(u.value).filter(([g, f]) => f && f.trim()).sort(([g], [f]) => g.localeCompare(f)).forEach(([g, f]) => {
44
44
  e.push({
45
45
  locale: g,
46
46
  name: f,
47
- localeDisplay: z(g)
47
+ localeDisplay: I(g)
48
48
  });
49
49
  }), e;
50
50
  });
@@ -75,20 +75,20 @@ const ye = {
75
75
  name_locale: u.value
76
76
  }
77
77
  }
78
- }, s.value.name), N(!1);
78
+ }, s.value.name), M(!1);
79
79
  }
80
80
  return te(() => o.value, () => {
81
81
  if (!o.value) return;
82
- s.value = H(h.initialValue);
82
+ s.value = Q(h.initialValue);
83
83
  const e = d.subcategories.find((t) => t._id === s.value._id);
84
84
  u.value = e == null ? void 0 : e.name_locale;
85
85
  }), w({
86
- trigger: N,
86
+ trigger: M,
87
87
  show: o
88
88
  }), (e, t) => {
89
89
  const a = C("fm-button"), b = C("FmTooltip"), g = C("FmTextField"), f = C("fm-side-sheet");
90
- return p(), k(I, null, [oe(e.$slots, "default", {
91
- trigger: N
90
+ return p(), k(A, null, [oe(e.$slots, "default", {
91
+ trigger: M
92
92
  }), m(f, {
93
93
  id: "group-form",
94
94
  modelValue: o.value,
@@ -101,7 +101,7 @@ const ye = {
101
101
  "max-width": 560,
102
102
  "onOn:clickedAway": n(r)
103
103
  }, {
104
- "side-sheet-header": y(() => [c("p", ye, M(n(l)("menu.subcategory.title")), 1)]),
104
+ "side-sheet-header": y(() => [c("p", ye, T(n(l)("menu.subcategory.title")), 1)]),
105
105
  "side-sheet-footer": y(() => [c("div", xe, [m(a, {
106
106
  label: n(l)("menu.common.actions.update"),
107
107
  loading: L.value,
@@ -127,9 +127,9 @@ const ye = {
127
127
  placement: "top",
128
128
  "z-index": 999
129
129
  }, {
130
- content: y(() => [c("div", he, [(p(!0), k(I, null, Q(D.value, (v) => (p(), k("div", {
130
+ content: y(() => [c("div", he, [(p(!0), k(A, null, H(B.value, (v) => (p(), k("div", {
131
131
  key: v.locale
132
- }, M(v.name) + " (" + M(v.localeDisplay) + ") ", 1))), 128))])]),
132
+ }, T(v.name) + " (" + T(v.localeDisplay) + ") ", 1))), 128))])]),
133
133
  default: y(() => [m(a, {
134
134
  variant: "tertiary",
135
135
  icon: "g_translate",
@@ -165,17 +165,17 @@ const ye = {
165
165
  class: "p-8"
166
166
  }, Se = {
167
167
  class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
168
- }, Ee = ["onClick"], Ne = {
168
+ }, Ee = ["onClick"], Me = {
169
169
  class: "flex-1 space-y-4"
170
- }, Te = {
170
+ }, Ne = {
171
171
  class: "fm-typo-en-body-lg-600"
172
- }, Me = /* @__PURE__ */ A({
172
+ }, Te = /* @__PURE__ */ z({
173
173
  __name: "SubcategoryTable",
174
- setup(B) {
175
- const w = X(), h = P(), S = Y(h), F = K(S), E = ae({
174
+ setup(D) {
175
+ const w = X(), h = P(), S = Y(h), F = G(S), E = ae({
176
176
  dialog: w,
177
177
  menuLoader: F
178
- }), d = V(() => J().subcategories), l = x(""), L = V(() => d.value.filter((i) => i.name.toLowerCase().includes(l.value.toLowerCase()))), {
178
+ }), d = V(() => K().subcategories), l = x(""), L = V(() => d.value.filter((i) => i.name.toLowerCase().includes(l.value.toLowerCase()))), {
179
179
  t: o
180
180
  } = R(), $ = x([{
181
181
  accessorKey: "name",
@@ -185,12 +185,12 @@ const ye = {
185
185
  width: "auto"
186
186
  },
187
187
  cell: (i) => {
188
- const r = i.row.original, _ = i.getValue(), t = Object.keys(r.name_locale ?? {}).map((a) => z(a));
189
- return T("div", {
188
+ const r = i.row.original, _ = i.getValue(), t = Object.keys(r.name_locale ?? {}).map((a) => I(a));
189
+ return N("div", {
190
190
  class: "flex items-center gap-8"
191
- }, [T("span", {
191
+ }, [N("span", {
192
192
  class: "break-all"
193
- }, _), ...t.map((a) => T("div", {
193
+ }, _), ...t.map((a) => N("div", {
194
194
  class: "rounded-lg border border-fm-color-primary text-fm-color-primary flex items-center justify-center fm-typo-en-body-sm-600 px-8"
195
195
  }, a))]);
196
196
  }
@@ -204,14 +204,14 @@ const ye = {
204
204
  header: "",
205
205
  cell: (i) => {
206
206
  const r = i.row.original;
207
- return T("div", {
207
+ return N("div", {
208
208
  class: "flex justify-end"
209
- }, [T(W.FmButton, {
209
+ }, [N(W.FmButton, {
210
210
  icon: "delete",
211
211
  disabled: !r._id,
212
212
  variant: "tertiary",
213
213
  textColor: "neutral-gray-400",
214
- onClick: q(async () => {
214
+ onClick: J(async () => {
215
215
  await u(r);
216
216
  }, ["stop", "prevent"])
217
217
  })]);
@@ -233,7 +233,7 @@ const ye = {
233
233
  primaryActions: {
234
234
  text: "Remove",
235
235
  close: !0,
236
- variant: G.Destructive
236
+ variant: q.Destructive
237
237
  },
238
238
  secondaryActions: {
239
239
  text: "Cancel",
@@ -247,7 +247,7 @@ const ye = {
247
247
  }, i.name, !0);
248
248
  });
249
249
  }
250
- async function N(i) {
250
+ async function M(i) {
251
251
  const r = i.map((_) => _._id).filter((_) => !!_);
252
252
  await E.rearrange(r);
253
253
  }
@@ -257,7 +257,7 @@ const ye = {
257
257
  initialValue: i
258
258
  });
259
259
  }
260
- const D = se(), j = V(() => D.breakpoints.value.xs);
260
+ const B = se(), j = V(() => B.breakpoints.value.xs);
261
261
  return (i, r) => {
262
262
  const _ = C("FmSearch"), e = C("FmTable"), t = C("FmButton");
263
263
  return j.value ? (p(), k("div", Le, [c("div", $e, [m(_, {
@@ -268,16 +268,16 @@ const ye = {
268
268
  placeholder: n(o)("menu.common.labels.search_placeholder", {
269
269
  type: "categories"
270
270
  })
271
- }, null, 8, ["modelValue", "placeholder"])]), c("div", Se, [(p(!0), k(I, null, Q(L.value, (a) => (p(), k("div", {
271
+ }, null, 8, ["modelValue", "placeholder"])]), c("div", Se, [(p(!0), k(A, null, H(L.value, (a) => (p(), k("div", {
272
272
  key: a._id || "",
273
273
  class: "flex flex-row py-12 px-16",
274
274
  onClick: (b) => O(a)
275
- }, [c("div", Ne, [c("p", Te, M(a.name), 1)]), m(t, {
275
+ }, [c("div", Me, [c("p", Ne, T(a.name), 1)]), m(t, {
276
276
  "text-color": n(ie).NeutralGray400,
277
- variant: n(G).Tertiary,
277
+ variant: n(q).Tertiary,
278
278
  "prepend-icon": "delete",
279
279
  disabled: !a._id,
280
- onClick: q((b) => u(a), ["stop"])
280
+ onClick: J((b) => u(a), ["stop"])
281
281
  }, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8, Ee))), 128))])])) : (p(), k("div", Ve, [c("div", we, [c("div", Fe, [m(_, {
282
282
  modelValue: l.value,
283
283
  "onUpdate:modelValue": r[0] || (r[0] = (a) => l.value = a),
@@ -296,17 +296,17 @@ const ye = {
296
296
  "shrink-at": !1,
297
297
  "hide-footer": "",
298
298
  "pin-header-row": "",
299
- onDndChanged: N,
299
+ onDndChanged: M,
300
300
  onRowClick: r[1] || (r[1] = (a) => O(a.original))
301
301
  }, null, 8, ["column-defs", "page-size", "row-data", "search-value"])]),
302
302
  _: 1
303
303
  })]));
304
304
  };
305
305
  }
306
- }), Oe = { class: "flex-1 flex justify-between gap-8 pl-8" }, Ue = { class: "flex items-center" }, Be = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, De = { class: "fm-typo-en-body-md-600 font-semibold" }, Ze = /* @__PURE__ */ A({
306
+ }), Oe = { class: "flex-1 flex justify-between gap-8 pl-8" }, Ue = { class: "flex items-center" }, De = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Be = { class: "fm-typo-en-body-md-600 font-semibold" }, Ze = /* @__PURE__ */ z({
307
307
  __name: "Subcategory",
308
- setup(B) {
309
- const w = X(), h = P(), S = Y(h), F = K(S), E = ae({ dialog: w, menuLoader: F }), d = V(() => J().subcategories), { t: l } = R();
308
+ setup(D) {
309
+ const w = X(), h = P(), S = Y(h), F = G(S), E = ae({ dialog: w, menuLoader: F }), d = V(() => K().subcategories), { t: l } = R();
310
310
  function L() {
311
311
  E.create();
312
312
  }
@@ -315,7 +315,7 @@ const ye = {
315
315
  heading: n(l)("menu.subcategory.title")
316
316
  }, {
317
317
  default: y(() => [
318
- d.value.length > 0 ? (p(), U(Me, { key: 0 })) : (p(), U(n(ce), {
318
+ d.value.length > 0 ? (p(), U(Te, { key: 0 })) : (p(), U(n(ce), {
319
319
  key: 1,
320
320
  action: {
321
321
  text: n(l)("menu.subcategory.add"),
@@ -328,8 +328,8 @@ const ye = {
328
328
  "append-heading": y(() => [
329
329
  c("div", Oe, [
330
330
  c("div", Ue, [
331
- c("div", Be, [
332
- c("p", De, M(o.value), 1)
331
+ c("div", De, [
332
+ c("p", Be, T(o.value), 1)
333
333
  ])
334
334
  ]),
335
335
  d.value.length > 0 ? (p(), U(re, {
@@ -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 { B as x, u as v, O as w, J as E, y as M } from "./index.vue_vue_type_script_setup_true_lang-DotsunNI.js";
2
+ import { G as x, u as v, Q as w, M as E, A as M } from "./index.vue_vue_type_script_setup_true_lang-YXKayPEp.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-BhiFnON_.js";
8
- import { T as O, l as S } from "./index-3wsuY29D.js";
9
- import { a as B } from "./menu-CAmS3pcT.js";
10
- const L = { 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" }, D = { 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-oA0e9oI5.js";
8
+ import { T as S, l as L } from "./index-Cq-czJjU.js";
9
+ import { a as O } from "./menu-BP_ArXCI.js";
10
+ const U = { class: "flex-1 flex justify-between gap-8 pl-8" }, B = { 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" }, z = /* @__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 B().resetOnMount(), (P, o) => (d(), i(C, {
14
+ return O().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 L = { 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", L, [
24
- t("div", U, [
23
+ t("div", U, [
24
+ t("div", B, [
25
25
  t("div", F, [
26
- t("p", D, b(n.value), 1)
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 L = { 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(S)(e.usedBy || [])
40
+ link: a(L)(e.usedBy || [])
41
41
  },
42
42
  e.name
43
43
  ))
@@ -60,5 +60,5 @@ const L = { 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-BhiFnON_.js";
1
+ import { _ as f } from "./Takeaway.vue_vue_type_script_setup_true_lang-oA0e9oI5.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,26 +1,26 @@
1
- import { getCurrentInstance as te, defineComponent as ne, computed as T, watch as oe, h as M, resolveComponent as O, createElementBlock as V, openBlock as w, Fragment as L, normalizeClass as D, createElementVNode as g, createVNode as I, unref as i, isRef as j, withCtx as P, renderList as ie, createBlock as G, createCommentVNode as $, toDisplayString as B, withModifiers as q } from "vue";
2
- import { B as H, u as Q, O as W, J as z, y as N, G as Y, z as se, am as J, a2 as re } from "./index.vue_vue_type_script_setup_true_lang-DotsunNI.js";
1
+ import { getCurrentInstance as te, defineComponent as ne, computed as T, watch as oe, h as U, resolveComponent as L, createElementBlock as V, openBlock as w, Fragment as O, normalizeClass as D, createElementVNode as g, createVNode as I, unref as i, isRef as j, withCtx as P, renderList as ie, createBlock as G, createCommentVNode as $, toDisplayString as B, withModifiers as q } from "vue";
2
+ import { G as H, u as J, Q as W, M as N, A as z, I as Y, B as se, ap as Q, a4 as re } from "./index.vue_vue_type_script_setup_true_lang-YXKayPEp.js";
3
3
  import { useI18n as X, useCoreStore as le } from "@feedmepos/mf-common";
4
- import { useDialog as ce, useSnackbar as Z, FmButtonVariant as A, components as de, useBreakpoints as me } from "@feedmepos/ui-library";
5
- import { _ as ue } from "./app-0m01R0SM.js";
6
- import { a as ye, l as ee, T as pe } from "./index-3wsuY29D.js";
4
+ import { useDialog as ce, useSnackbar as Z, FmButtonVariant as A, components as de, useBreakpoints as ue } from "@feedmepos/ui-library";
5
+ import { _ as me } from "./app-CfCYl2pO.js";
6
+ import { a as ye, l as ee, T as pe } from "./index-Cq-czJjU.js";
7
7
  import { u as fe } from "./search-BAPEUu1R.js";
8
- import { f as F } from "./currency-Cma3AX0v.js";
8
+ import { f as F } from "./currency-Nxod6uwl.js";
9
9
  import { defineStore as _e } from "pinia";
10
- import { C as ke } from "./catalog-Bs3SNL7n.js";
10
+ import { C as ke } from "./catalog-CvN9Wu8V.js";
11
11
  import { c as ve } from "./createComponentProgrammatically-Bt2rn1IQ.js";
12
- import { g as we } from "./translation-BCZ1Ruvv.js";
13
- function ge(b, _, l, m) {
12
+ import { g as we } from "./translation-Cdap0IVg.js";
13
+ function ge(b, _, l, u) {
14
14
  var y, p, k;
15
- if (m >= 0) {
16
- const u = (y = b.override.items[_._id][m]) == null ? void 0 : y.takeawayUsed;
17
- return u == null ? void 0 : Y(u);
15
+ if (u >= 0) {
16
+ const m = (y = b.override.items[_._id][u]) == null ? void 0 : y.takeawayUsed;
17
+ return m == null ? void 0 : Y(m);
18
18
  }
19
- const e = l.find((u) => u._id === _._id);
20
- return _.combinationKey ? ((k = (p = e == null ? void 0 : e.variant) == null ? void 0 : p.variantCombinations.find((u) => u.combinationKey === _.combinationKey)) == null ? void 0 : k.takeawayUsed) ?? (e == null ? void 0 : e.takeawayUsed) : e == null ? void 0 : e.takeawayUsed;
19
+ const e = l.find((m) => m._id === _._id);
20
+ return _.combinationKey ? ((k = (p = e == null ? void 0 : e.variant) == null ? void 0 : p.variantCombinations.find((m) => m.combinationKey === _.combinationKey)) == null ? void 0 : k.takeawayUsed) ?? (e == null ? void 0 : e.takeawayUsed) : e == null ? void 0 : e.takeawayUsed;
21
21
  }
22
- function be(b, _, l, m) {
23
- var k, u;
22
+ function be(b, _, l, u) {
23
+ var k, m;
24
24
  const e = Y(b);
25
25
  e.override.takeaway[l._id] = { price: l.price || void 0 };
26
26
  const y = [...l.usedBy, ..._.usedBy];
@@ -29,7 +29,7 @@ function be(b, _, l, m) {
29
29
  (s) => s._id === o._id && s.combinationKey === o.combinationKey
30
30
  ) ? l._id : "", a = (e.override.items[o._id] || []).findIndex(
31
31
  (s) => s.combinationKey === o.combinationKey
32
- ), d = ge(e, o, m, a);
32
+ ), d = ge(e, o, u, a);
33
33
  if (a >= 0)
34
34
  e.override.items[o._id][a].takeawayUsed = c;
35
35
  else if (d !== c) {
@@ -43,8 +43,8 @@ function be(b, _, l, m) {
43
43
  }
44
44
  const p = [...new Set(y.map((o) => o._id))];
45
45
  for (const o of p) {
46
- const v = m.find((d) => d._id === o);
47
- if (!((u = (k = v == null ? void 0 : v.variant) == null ? void 0 : k.variantCombinations) != null && u.length)) continue;
46
+ const v = u.find((d) => d._id === o);
47
+ if (!((m = (k = v == null ? void 0 : v.variant) == null ? void 0 : k.variantCombinations) != null && m.length)) continue;
48
48
  const c = (e.override.items[o] || []).findIndex(
49
49
  (d) => !d.combinationKey
50
50
  );
@@ -54,7 +54,7 @@ function be(b, _, l, m) {
54
54
  return e;
55
55
  }
56
56
  const he = _e("takeaway-manager", () => {
57
- const b = ce(), _ = Z(), l = H(_), m = W(l), e = Q(), y = te(), { t: p } = X(), k = (a) => {
57
+ const b = ce(), _ = Z(), l = H(_), u = W(l), e = J(), y = te(), { t: p } = X(), k = (a) => {
58
58
  var s, h;
59
59
  const { vNode: d } = ve(
60
60
  ye,
@@ -63,7 +63,7 @@ const he = _e("takeaway-manager", () => {
63
63
  );
64
64
  (h = (s = d.component) == null ? void 0 : s.exposed) == null || h.trigger();
65
65
  };
66
- async function u(a) {
66
+ async function m(a) {
67
67
  var h, E;
68
68
  const s = ((E = (h = e.currentCatalog) == null ? void 0 : h.override.takeaway[a._id]) == null ? void 0 : E.price) ? null : e.state.menu.modules.takeaway.find((x) => x._id === a._id);
69
69
  k({
@@ -74,7 +74,7 @@ const he = _e("takeaway-manager", () => {
74
74
  action: "update",
75
75
  "onUpdate:takeaway": async (x) => {
76
76
  let n = Y(e.currentCatalog);
77
- x.price ? n.override.takeaway[a._id] = { price: x.price } : delete n.override.takeaway[a._id], n = be(n, a, x, e.state.menu.modules.item), await new ke(n, e, m.updateMenu, b).update();
77
+ x.price ? n.override.takeaway[a._id] = { price: x.price } : delete n.override.takeaway[a._id], n = be(n, a, x, e.state.menu.modules.item), await new ke(n, e, u.updateMenu, b).update();
78
78
  }
79
79
  });
80
80
  }
@@ -85,10 +85,10 @@ const he = _e("takeaway-manager", () => {
85
85
  applyProduct: !0,
86
86
  action: "update",
87
87
  "onUpdate:takeaway": async (d) => {
88
- await m.updateMenu(
88
+ await u.updateMenu(
89
89
  {
90
- module: N.F_MENU_MODULE_V4_KEY.enum.takeaway,
91
- operation: z.F_OPERATION_TYPE.update,
90
+ module: z.F_MENU_MODULE_V4_KEY.enum.takeaway,
91
+ operation: N.F_OPERATION_TYPE.update,
92
92
  data: d,
93
93
  link: ee(d.usedBy || [])
94
94
  },
@@ -98,7 +98,7 @@ const he = _e("takeaway-manager", () => {
98
98
  });
99
99
  }
100
100
  async function v(a) {
101
- e.currentCatalog ? await u(a) : await o(a);
101
+ e.currentCatalog ? await m(a) : await o(a);
102
102
  }
103
103
  async function c(a) {
104
104
  b.open({
@@ -114,10 +114,10 @@ const he = _e("takeaway-manager", () => {
114
114
  close: !0
115
115
  }
116
116
  }).onPrimary(async () => {
117
- await m.updateMenu(
117
+ await u.updateMenu(
118
118
  {
119
- module: N.F_MENU_MODULE_V4_KEY.enum.takeaway,
120
- operation: z.F_OPERATION_TYPE.delete,
119
+ module: z.F_MENU_MODULE_V4_KEY.enum.takeaway,
120
+ operation: N.F_OPERATION_TYPE.delete,
121
121
  data: a._id
122
122
  },
123
123
  a.name,
@@ -140,7 +140,7 @@ const he = _e("takeaway-manager", () => {
140
140
  class: "px-16 pt-8"
141
141
  }, Ie = {
142
142
  class: /* @__PURE__ */ D(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100"])
143
- }, Ue = ["onClick"], Me = {
143
+ }, Me = ["onClick"], Ue = {
144
144
  class: "flex-1"
145
145
  }, Ee = {
146
146
  class: "fm-typo-en-body-lg-600 mb-4"
@@ -157,7 +157,7 @@ const he = _e("takeaway-manager", () => {
157
157
  setup(b, {
158
158
  emit: _
159
159
  }) {
160
- const l = Q(), m = he(), e = T(() => l.rules.item.bindToVariant), y = T(() => l.rules.takeaway), p = W(H(Z())), k = le(), u = T(() => se.Country.getCountry(k.currentCountry.value).currency), o = T(() => l.takeaways.map((n) => ({
160
+ const l = J(), u = he(), e = T(() => l.rules.item.bindToVariant), y = T(() => l.rules.takeaway), p = W(H(Z())), k = le(), m = T(() => se.Country.getCountry(k.currentCountry.value).currency), o = T(() => l.takeaways.map((n) => ({
161
161
  ...n,
162
162
  usedBy: l.items.reduce((r, f) => {
163
163
  var t, K, R;
@@ -192,19 +192,19 @@ const he = _e("takeaway-manager", () => {
192
192
  enableSorting: !1,
193
193
  size: 700,
194
194
  cell: (n) => {
195
- const r = n.row.original, f = n.getValue(), U = Object.keys(r.name_locale ?? {}).map((t) => we(t));
196
- return M("div", {
195
+ const r = n.row.original, f = n.getValue(), M = Object.keys(r.name_locale ?? {}).map((t) => we(t));
196
+ return U("div", {
197
197
  class: "flex items-center gap-8"
198
- }, [M("span", {
198
+ }, [U("span", {
199
199
  class: "break-all"
200
- }, f), ...U.map((t) => M("div", {
200
+ }, f), ...M.map((t) => U("div", {
201
201
  class: "rounded-lg border border-fm-color-primary text-fm-color-primary flex items-center justify-center fm-typo-en-body-sm-600 px-8"
202
202
  }, t))]);
203
203
  }
204
204
  }, {
205
205
  accessorKey: "price",
206
206
  header: () => s("menu.takeaway.table.columns.price", {
207
- symbol: u.value.symbol
207
+ symbol: m.value.symbol
208
208
  }),
209
209
  enableSorting: !1,
210
210
  size: 200,
@@ -221,7 +221,7 @@ const he = _e("takeaway-manager", () => {
221
221
  enableSorting: !1,
222
222
  size: 200,
223
223
  cell: (n) => {
224
- const r = n.getValue(), f = J(l.categorizedItems, r).flatMap((C) => C.items).length ?? 0;
224
+ const r = n.getValue(), f = Q(l.categorizedItems, r).flatMap((C) => C.items).length ?? 0;
225
225
  return s("menu.takeaway.table.items_linked", {
226
226
  count: f
227
227
  });
@@ -233,22 +233,22 @@ const he = _e("takeaway-manager", () => {
233
233
  cellClass: "pl-16",
234
234
  headerContentClass: "-mx-16"
235
235
  },
236
- cell: (n) => M("div", {
236
+ cell: (n) => U("div", {
237
237
  class: "flex justify-end items-center"
238
- }, [y.value.delete ? M(de.FmButton, {
238
+ }, [y.value.delete ? U(de.FmButton, {
239
239
  prependIcon: "delete",
240
240
  variant: A.Tertiary,
241
241
  textColor: "neutral-gray-400",
242
242
  onClick: (r) => {
243
- r.stopPropagation(), m.deleteTakeaway(n.row.original);
243
+ r.stopPropagation(), u.deleteTakeaway(n.row.original);
244
244
  }
245
245
  }) : null])
246
- }]), E = me(), x = T(() => E.breakpoints.value.xs);
246
+ }]), E = ue(), x = T(() => E.breakpoints.value.xs);
247
247
  return (n, r) => {
248
- const f = O("fm-search"), C = O("fm-table"), U = O("fm-button");
249
- return o.value.length ? (w(), V(L, {
248
+ const f = L("fm-search"), C = L("fm-table"), M = L("fm-button");
249
+ return o.value.length ? (w(), V(O, {
250
250
  key: 0
251
- }, [x.value ? (w(), V(L, {
251
+ }, [x.value ? (w(), V(O, {
252
252
  key: 1
253
253
  }, [g("div", Ve, [I(f, {
254
254
  class: "w-full",
@@ -256,24 +256,24 @@ const he = _e("takeaway-manager", () => {
256
256
  modelValue: i(c),
257
257
  "onUpdate:modelValue": r[2] || (r[2] = (t) => j(c) ? c.value = t : null),
258
258
  placeholder: i(s)("menu.takeaway.table.search.placeholder")
259
- }, null, 8, ["modelValue", "placeholder"])]), g("div", Ie, [(w(!0), V(L, null, ie(a.value, (t) => (w(), V("div", {
259
+ }, null, 8, ["modelValue", "placeholder"])]), g("div", Ie, [(w(!0), V(O, null, ie(a.value, (t) => (w(), V("div", {
260
260
  key: t._id,
261
261
  class: D(["py-12 px-16", "flex space-x-8", "items-center"]),
262
262
  onClick: () => {
263
- y.value.edit && i(m).updateTakeaway(t);
263
+ y.value.edit && i(u).updateTakeaway(t);
264
264
  }
265
- }, [g("div", Me, [g("p", Ee, B(t.name), 1), g("p", Ke, B(`${i(J)(i(l).categorizedItems, t.usedBy).flatMap((K) => K.items).length ?? 0} items linked`), 1), g("p", Se, " Price: " + B(u.value.symbol) + B(i(F)(t.price, !1)), 1)]), y.value.delete ? (w(), G(U, {
265
+ }, [g("div", Ue, [g("p", Ee, B(t.name), 1), g("p", Ke, B(`${i(Q)(i(l).categorizedItems, t.usedBy).flatMap((K) => K.items).length ?? 0} items linked`), 1), g("p", Se, " Price: " + B(m.value.symbol) + B(i(F)(t.price, !1)), 1)]), y.value.delete ? (w(), G(M, {
266
266
  key: 0,
267
267
  variant: i(A).Tertiary,
268
268
  "text-color": "neutral-gray-400",
269
269
  "prepend-icon": "delete",
270
- onClick: q(() => i(m).deleteTakeaway(t), ["stop"])
271
- }, null, 8, ["variant", "onClick"])) : $("", !0)], 8, Ue))), 128))])], 64)) : (w(), V("div", xe, [g("div", Ce, [g("div", Te, [I(f, {
270
+ onClick: q(() => i(u).deleteTakeaway(t), ["stop"])
271
+ }, null, 8, ["variant", "onClick"])) : $("", !0)], 8, Me))), 128))])], 64)) : (w(), V("div", xe, [g("div", Ce, [g("div", Te, [I(f, {
272
272
  autofocus: "",
273
273
  modelValue: i(c),
274
274
  "onUpdate:modelValue": r[0] || (r[0] = (t) => j(c) ? c.value = t : null),
275
275
  placeholder: i(s)("menu.takeaway.table.search.placeholder")
276
- }, null, 8, ["modelValue", "placeholder"])])]), I(ue, null, {
276
+ }, null, 8, ["modelValue", "placeholder"])])]), I(me, null, {
277
277
  default: P(() => [I(C, {
278
278
  "column-defs": h.value,
279
279
  loading: i(p).checkMenuIsLoading(),
@@ -285,7 +285,7 @@ const he = _e("takeaway-manager", () => {
285
285
  "hide-footer": "",
286
286
  "pin-header-row": "",
287
287
  onRowClick: r[1] || (r[1] = (t) => {
288
- y.value.edit && i(m).updateTakeaway(t.original);
288
+ y.value.edit && i(u).updateTakeaway(t.original);
289
289
  })
290
290
  }, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
291
291
  _: 1
@@ -299,15 +299,15 @@ const he = _e("takeaway-manager", () => {
299
299
  action: "add",
300
300
  "apply-product": "",
301
301
  "onUpdate:takeaway": r[3] || (r[3] = (t) => i(p).updateMenu({
302
- module: i(N.F_MENU_MODULE_V4_KEY).enum.takeaway,
303
- operation: i(z.F_OPERATION_TYPE).create,
302
+ module: i(z.F_MENU_MODULE_V4_KEY).enum.takeaway,
303
+ operation: i(N.F_OPERATION_TYPE).create,
304
304
  data: t,
305
305
  link: i(ee)(t.usedBy || [])
306
306
  }, t.name))
307
307
  }, {
308
308
  default: P(({
309
309
  trigger: t
310
- }) => [I(U, {
310
+ }) => [I(M, {
311
311
  "prepend-icon": "add",
312
312
  label: i(s)("menu.takeaway.empty.action"),
313
313
  onClick: q(t, ["stop"])