@feedmepos/mf-menu 0.32.41 → 0.32.42-dev.3

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 (68) hide show
  1. package/dist/{App-Bt5lFavE.js → App-1oMjfIcc.js} +7 -7
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-DpyJ5gr2.js → ApplyProduct.vue_vue_type_script_setup_true_lang-AIw0Zgzf.js} +3 -3
  3. package/dist/{Catalog-DJyGxDRP.js → Catalog-CvQo24ck.js} +44 -44
  4. package/dist/{Category-BlIUSUxn.js → Category-C8bM8EwO.js} +24 -24
  5. package/dist/{Category-CNTOOIJE.js → Category-DmIaxrrK.js} +24 -24
  6. package/dist/{CookingGuide-CpZfKE5H.js → CookingGuide-CKEbyk4o.js} +105 -105
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-QzZR2W1U.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Ci4gwgnH.js} +1 -1
  8. package/dist/{Group-B88fbCOf.js → Group-CoYyRvcx.js} +1 -1
  9. package/dist/{Group-Bhnov3p8.js → Group-EnJDk54z.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-CRAX3mIt.js → Group.vue_vue_type_script_setup_true_lang-tH2U82rV.js} +18 -18
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Bqh6a0oO.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BDxjuWcY.js} +30 -30
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DPAxkce6.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-gVXNoAaN.js} +1457 -1456
  13. package/dist/{Ingredient-BORYH8yl.js → Ingredient-7PPPp7Yf.js} +20 -20
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-Ci-CaBED.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DQPjpqtv.js} +2 -2
  15. package/dist/{LinkProductSideSheet-DQN59t0a.js → LinkProductSideSheet-BS-MEIOG.js} +45 -45
  16. package/dist/{MenuSetting-cI0j1omE.js → MenuSetting-BNVyT0oG.js} +47 -47
  17. package/dist/{PrintRoute-CXSuomGR.js → PrintRoute-BMdk0zDv.js} +39 -39
  18. package/dist/{Product-DgbQeeKt.js → Product-DbIK7Eog.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-D0cnQC3i.js → Product.vue_vue_type_script_setup_true_lang-FnX_M8lJ.js} +139 -139
  20. package/dist/{ProductInternalTools-B1zpNBze.js → ProductInternalTools-BC8jWpQd.js} +66 -66
  21. package/dist/Products-CPi2vuUO.js +307 -0
  22. package/dist/{Publish-Cqdk3SjG.js → Publish-BcxHXZ1J.js} +29 -29
  23. package/dist/{Recipe-anT6QBZT.js → Recipe-egyxyFfA.js} +24 -24
  24. package/dist/RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-CP1NjxzF.js +144 -0
  25. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-Cc_k57qi.js → RuleView.vue_vue_type_script_setup_true_lang-CPMCeAK9.js} +366 -366
  26. package/dist/{Scheduler-Z64VCw-y.js → Scheduler-Cb-IJtj8.js} +11 -11
  27. package/dist/{ServingSequence-B7ZbvY1v.js → ServingSequence-B46n34xA.js} +44 -44
  28. package/dist/{Setting-DnVCq2hY.js → Setting-B_dZG5ZC.js} +17 -17
  29. package/dist/{Subcategory-dpz-Um56.js → Subcategory-DbjLfXvf.js} +51 -51
  30. package/dist/{Takeaway-DiyOBq1g.js → Takeaway-D4axornr.js} +13 -13
  31. package/dist/{Takeaway-mwLXbT9q.js → Takeaway-DNu6jYFC.js} +1 -1
  32. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-tg3AJE3_.js → Takeaway.vue_vue_type_script_setup_true_lang-Dvm8Lfp3.js} +28 -28
  33. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-FRH0zCh6.js → Thumbnail.vue_vue_type_script_setup_true_lang-BjPOOURv.js} +27 -27
  34. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-nGzNSAX9.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-CXGsdChM.js} +4 -4
  35. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C9eskCL4.js +5767 -0
  36. package/dist/{Unit-CmF2olR8.js → Unit-jV5Bee8E.js} +8 -8
  37. package/dist/{Variant-C9-_-SLX.js → Variant-jGcgA-W8.js} +24 -24
  38. package/dist/{_id_-C4Zpr6wS.js → _id_-CtvQ64EN.js} +28 -28
  39. package/dist/app-B6laFmet.js +2286 -0
  40. package/dist/{app-CrcPPLl1.js → app-eq7TaFfk.js} +1 -1
  41. package/dist/app.js +1 -1
  42. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  43. package/dist/assets/{linked-status-68qGGp41.js → linked-status-Db18QnYH.js} +5 -5
  44. package/dist/assets/{menu-export-CRtF4W1I.js → menu-export-24uzPEwW.js} +2 -2
  45. package/dist/assets/{override-menu-DB0DJf_x.js → override-menu-DreGPEa-.js} +5 -5
  46. package/dist/assets/{validate-menu-oi_J1ue-.js → validate-menu-BSFHH8O3.js} +2 -2
  47. package/dist/{catalog-Cp4kVRAL.js → catalog-CXcQ-QmP.js} +1 -1
  48. package/dist/{catalogSetting-Cr0DX5kw.js → catalogSetting-DnUHD0I1.js} +1 -1
  49. package/dist/{currency-C_IuOt0j.js → currency-CwtLEvAZ.js} +1 -1
  50. package/dist/dayjs.min-BgQgGKeN.js +7 -0
  51. package/dist/{index-CXzIkkUH.js → index-Cx1Nqii7.js} +31 -31
  52. package/dist/{index-DzLNqNMt.js → index-D-Saeea8.js} +43 -43
  53. package/dist/{index.vue_vue_type_script_setup_true_lang-DyiwvQnC.js → index.vue_vue_type_script_setup_true_lang-CA1qH7Vf.js} +244 -269
  54. package/dist/{item-C3_GKsNy.js → item-CKRLnCIs.js} +15 -15
  55. package/dist/{jszip.min-BiRK-xY3.js → jszip.min-DOHC0a7i.js} +388 -387
  56. package/dist/{menu-CYrjppCV.js → menu-BduvULfe.js} +1 -1
  57. package/dist/{menuV2-DWQ093x3.js → menuV2-Da1zBhkS.js} +83 -83
  58. package/dist/{priceTier-CD3j-Ccs.js → priceTier-tObdSj6z.js} +1 -1
  59. package/dist/{rules-BTZh0AjD.js → rules-DD816lrT.js} +11 -11
  60. package/dist/{scheduler-PVlNN-pB.js → scheduler-CDhxmmVX.js} +29 -29
  61. package/dist/{toExcel-lSyQhZQ9.js → toExcel-tz6MIiQY.js} +2 -2
  62. package/dist/{unit-1MnbZYm8.js → unit-NGl3h7Qh.js} +35 -35
  63. package/package.json +2 -1
  64. package/dist/Products-JodXj4IG.js +0 -291
  65. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BzwlZ9jW.js +0 -6130
  66. package/dist/app-BC-PDZ1J.js +0 -363
  67. package/dist/dayjs.min-fN9Ef6y1.js +0 -6
  68. package/dist/index-vqNnqeRW.js +0 -246
@@ -1,18 +1,18 @@
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";
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";
2
2
  import { useI18n as R } from "@feedmepos/mf-common";
3
- import { useSnackbar as P, components as W, useDialog as X, FmButtonVariant as q, useBreakpoints as se, FmButtonColorThemeVariant as ie } from "@feedmepos/ui-library";
3
+ import { useSnackbar as P, components as W, useDialog as X, FmButtonVariant as G, 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 { 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-DyiwvQnC.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-CA1qH7Vf.js";
6
6
  import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
- import { _ as me } from "./app-BC-PDZ1J.js";
7
+ import { _ as me } from "./app-B6laFmet.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 Q } from "./object-DVUNCr7w.js";
11
- import { r as _e, u as ae } from "./rules-BTZh0AjD.js";
12
- import { _ as fe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-nGzNSAX9.js";
10
+ import { c as H } from "./object-DVUNCr7w.js";
11
+ import { r as _e, u as ae } from "./rules-DD816lrT.js";
12
+ import { _ as fe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-CXGsdChM.js";
13
13
  import { c as ve } from "./check-C9mY6LiX.js";
14
- import { g as I } from "./translation-Cdap0IVg.js";
15
- import { a as ge } from "./menu-CYrjppCV.js";
14
+ import { g as z } from "./translation-Cdap0IVg.js";
15
+ import { a as ge } from "./menu-BduvULfe.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__ */ z({
24
+ }, Ce = /* @__PURE__ */ A({
25
25
  __name: "Form",
26
26
  props: {
27
27
  initialValue: {}
28
28
  },
29
- setup(D, {
29
+ setup(B, {
30
30
  expose: w
31
31
  }) {
32
- const h = D, S = P(), F = Y(S), E = G(F), d = K(), {
32
+ const h = B, S = P(), F = Y(S), E = K(F), d = J(), {
33
33
  t: l
34
- } = R(), L = x(!1), o = x(!1), $ = x(!1), u = x(void 0), M = (e) => {
34
+ } = R(), L = x(!1), o = x(!1), $ = x(!1), u = x(void 0), N = (e) => {
35
35
  ve.isBoolean(e) ? o.value = e : o.value = !o.value;
36
- }, s = x(Q(h.initialValue)), O = V(() => !!s.value.name), B = V(() => {
36
+ }, s = x(H(h.initialValue)), O = V(() => !!s.value.name), D = 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: I(t)
42
+ localeDisplay: z(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: I(g)
47
+ localeDisplay: z(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), M(!1);
78
+ }, s.value.name), N(!1);
79
79
  }
80
80
  return te(() => o.value, () => {
81
81
  if (!o.value) return;
82
- s.value = Q(h.initialValue);
82
+ s.value = H(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: M,
86
+ trigger: N,
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(A, null, [oe(e.$slots, "default", {
91
- trigger: M
90
+ return p(), k(I, null, [oe(e.$slots, "default", {
91
+ trigger: N
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, T(n(l)("menu.subcategory.title")), 1)]),
104
+ "side-sheet-header": y(() => [c("p", ye, M(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(A, null, H(B.value, (v) => (p(), k("div", {
130
+ content: y(() => [c("div", he, [(p(!0), k(I, null, Q(D.value, (v) => (p(), k("div", {
131
131
  key: v.locale
132
- }, T(v.name) + " (" + T(v.localeDisplay) + ") ", 1))), 128))])]),
132
+ }, M(v.name) + " (" + M(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"], Me = {
168
+ }, Ee = ["onClick"], Ne = {
169
169
  class: "flex-1 space-y-4"
170
- }, Ne = {
170
+ }, Te = {
171
171
  class: "fm-typo-en-body-lg-600"
172
- }, Te = /* @__PURE__ */ z({
172
+ }, Me = /* @__PURE__ */ A({
173
173
  __name: "SubcategoryTable",
174
- setup(D) {
175
- const w = X(), h = P(), S = Y(h), F = G(S), E = ae({
174
+ setup(B) {
175
+ const w = X(), h = P(), S = Y(h), F = K(S), E = ae({
176
176
  dialog: w,
177
177
  menuLoader: F
178
- }), d = V(() => K().subcategories), l = x(""), L = V(() => d.value.filter((i) => i.name.toLowerCase().includes(l.value.toLowerCase()))), {
178
+ }), d = V(() => J().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) => I(a));
189
- return N("div", {
188
+ const r = i.row.original, _ = i.getValue(), t = Object.keys(r.name_locale ?? {}).map((a) => z(a));
189
+ return T("div", {
190
190
  class: "flex items-center gap-8"
191
- }, [N("span", {
191
+ }, [T("span", {
192
192
  class: "break-all"
193
- }, _), ...t.map((a) => N("div", {
193
+ }, _), ...t.map((a) => T("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 N("div", {
207
+ return T("div", {
208
208
  class: "flex justify-end"
209
- }, [N(W.FmButton, {
209
+ }, [T(W.FmButton, {
210
210
  icon: "delete",
211
211
  disabled: !r._id,
212
212
  variant: "tertiary",
213
213
  textColor: "neutral-gray-400",
214
- onClick: J(async () => {
214
+ onClick: q(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: q.Destructive
236
+ variant: G.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 M(i) {
250
+ async function N(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 B = se(), j = V(() => B.breakpoints.value.xs);
260
+ const D = se(), j = V(() => D.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(A, null, H(L.value, (a) => (p(), k("div", {
271
+ }, null, 8, ["modelValue", "placeholder"])]), c("div", Se, [(p(!0), k(I, null, Q(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", Me, [c("p", Ne, T(a.name), 1)]), m(t, {
275
+ }, [c("div", Ne, [c("p", Te, M(a.name), 1)]), m(t, {
276
276
  "text-color": n(ie).NeutralGray400,
277
- variant: n(q).Tertiary,
277
+ variant: n(G).Tertiary,
278
278
  "prepend-icon": "delete",
279
279
  disabled: !a._id,
280
- onClick: J((b) => u(a), ["stop"])
280
+ onClick: q((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: M,
299
+ onDndChanged: N,
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" }, 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({
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({
307
307
  __name: "Subcategory",
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();
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();
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(Te, { key: 0 })) : (p(), U(n(ce), {
318
+ d.value.length > 0 ? (p(), U(Me, { 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", De, [
332
- c("p", Be, T(o.value), 1)
331
+ c("div", Be, [
332
+ c("p", De, M(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 { G as x, u as v, Q as w, M as E, A as M } from "./index.vue_vue_type_script_setup_true_lang-DyiwvQnC.js";
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-CA1qH7Vf.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-tg3AJE3_.js";
8
- import { T as S, l as L } from "./index-CXzIkkUH.js";
9
- import { a as O } from "./menu-CYrjppCV.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({
7
+ import { _ as N } from "./Takeaway.vue_vue_type_script_setup_true_lang-Dvm8Lfp3.js";
8
+ import { T as O, l as S } from "./index-Cx1Nqii7.js";
9
+ import { a as B } from "./menu-BduvULfe.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({
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 O().resetOnMount(), (I, o) => (d(), i(C, {
14
+ return B().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 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, [
23
+ t("div", L, [
24
+ t("div", U, [
25
25
  t("div", F, [
26
- t("p", A, b(n.value), 1)
26
+ t("p", D, 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 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(L)(e.usedBy || [])
40
+ link: a(S)(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-tg3AJE3_.js";
1
+ import { _ as f } from "./Takeaway.vue_vue_type_script_setup_true_lang-Dvm8Lfp3.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,22 +1,22 @@
1
- import { getCurrentInstance as te, defineComponent as oe, computed as x, watch as ne, h as E, resolveComponent as O, createElementBlock as C, openBlock as _, Fragment as P, normalizeClass as Y, createElementVNode as k, createVNode as V, unref as n, isRef as j, withCtx as F, renderList as ie, createBlock as G, createCommentVNode as $, toDisplayString as S, withModifiers as Q } from "vue";
2
- import { G as H, u as J, Q as W, M as N, A as z, I as A, B as se, ap as q, a4 as re } from "./index.vue_vue_type_script_setup_true_lang-DyiwvQnC.js";
1
+ import { getCurrentInstance as te, defineComponent as oe, computed as x, watch as ne, h as E, resolveComponent as S, createElementBlock as C, openBlock as _, Fragment as P, normalizeClass as Y, createElementVNode as k, createVNode as V, unref as n, isRef as j, withCtx as F, renderList as ie, createBlock as G, createCommentVNode as $, toDisplayString as O, withModifiers as J } from "vue";
2
+ import { B as H, u as Q, O as W, J as L, y as N, G as A, z as se, am as q, a2 as re } from "./index.vue_vue_type_script_setup_true_lang-CA1qH7Vf.js";
3
3
  import { useI18n as X, useCoreStore as le } from "@feedmepos/mf-common";
4
4
  import { useDialog as ce, useSnackbar as Z, FmButtonVariant as D, components as de, useBreakpoints as me } from "@feedmepos/ui-library";
5
- import { _ as ue } from "./app-BC-PDZ1J.js";
6
- import { a as pe, l as ee, T as ye } from "./index-CXzIkkUH.js";
5
+ import { _ as ue } from "./app-B6laFmet.js";
6
+ import { a as pe, l as ee, T as ye } from "./index-Cx1Nqii7.js";
7
7
  import { u as fe } from "./search-BAPEUu1R.js";
8
- import { f as L } from "./currency-C_IuOt0j.js";
8
+ import { f as z } from "./currency-CwtLEvAZ.js";
9
9
  import { defineStore as _e } from "pinia";
10
- import { C as ke } from "./catalog-Cp4kVRAL.js";
10
+ import { C as ke } from "./catalog-CXcQ-QmP.js";
11
11
  import { c as ve } from "./createComponentProgrammatically-Bt2rn1IQ.js";
12
12
  import { g as we } from "./translation-Cdap0IVg.js";
13
- function ge(T, M, l, p) {
13
+ function ge(T, U, l, p) {
14
14
  var y, v, w, g;
15
15
  const s = A(T);
16
16
  s.override.takeaway[l._id] = {
17
17
  price: l.price || void 0
18
18
  };
19
- const f = [...l.usedBy, ...M.usedBy];
19
+ const f = [...l.usedBy, ...U.usedBy];
20
20
  for (const r of f) {
21
21
  const c = l.usedBy.some(
22
22
  (e) => e._id == r._id && e.combinationKey == r.combinationKey
@@ -46,7 +46,7 @@ function ge(T, M, l, p) {
46
46
  return s;
47
47
  }
48
48
  const be = _e("takeaway-manager", () => {
49
- const T = ce(), M = Z(), l = H(M), p = W(l), s = J(), f = te(), { t: y } = X(), v = (a) => {
49
+ const T = ce(), U = Z(), l = H(U), p = W(l), s = Q(), f = te(), { t: y } = X(), v = (a) => {
50
50
  var e, u;
51
51
  const { vNode: d } = ve(
52
52
  pe,
@@ -79,8 +79,8 @@ const be = _e("takeaway-manager", () => {
79
79
  "onUpdate:takeaway": async (d) => {
80
80
  await p.updateMenu(
81
81
  {
82
- module: z.F_MENU_MODULE_V4_KEY.enum.takeaway,
83
- operation: N.F_OPERATION_TYPE.update,
82
+ module: N.F_MENU_MODULE_V4_KEY.enum.takeaway,
83
+ operation: L.F_OPERATION_TYPE.update,
84
84
  data: d,
85
85
  link: ee(d.usedBy || [])
86
86
  },
@@ -108,8 +108,8 @@ const be = _e("takeaway-manager", () => {
108
108
  }).onPrimary(async () => {
109
109
  await p.updateMenu(
110
110
  {
111
- module: z.F_MENU_MODULE_V4_KEY.enum.takeaway,
112
- operation: N.F_OPERATION_TYPE.delete,
111
+ module: N.F_MENU_MODULE_V4_KEY.enum.takeaway,
112
+ operation: L.F_OPERATION_TYPE.delete,
113
113
  data: a._id
114
114
  },
115
115
  a.name,
@@ -132,7 +132,7 @@ const be = _e("takeaway-manager", () => {
132
132
  class: "px-16 pt-8"
133
133
  }, Te = {
134
134
  class: /* @__PURE__ */ Y(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100"])
135
- }, Me = ["onClick"], Ue = {
135
+ }, Ue = ["onClick"], Me = {
136
136
  class: "flex-1"
137
137
  }, Ee = {
138
138
  class: "fm-typo-en-body-lg-600 mb-4"
@@ -147,9 +147,9 @@ const be = _e("takeaway-manager", () => {
147
147
  __name: "Takeaway",
148
148
  emits: ["update:count"],
149
149
  setup(T, {
150
- emit: M
150
+ emit: U
151
151
  }) {
152
- const l = J(), p = be(), s = x(() => l.rules.item.bindToVariant), f = x(() => l.rules.takeaway), y = W(H(Z())), v = le(), w = x(() => se.Country.getCountry(v.currentCountry.value).currency), g = x(() => l.takeaways.map((o) => ({
152
+ const l = Q(), p = be(), s = x(() => l.rules.item.bindToVariant), f = x(() => l.rules.takeaway), y = W(H(Z())), v = le(), w = x(() => se.Country.getCountry(v.currentCountry.value).currency), g = x(() => l.takeaways.map((o) => ({
153
153
  ...o,
154
154
  usedBy: l.items.reduce((i, m) => {
155
155
  var t, I, R;
@@ -170,7 +170,7 @@ const be = _e("takeaway-manager", () => {
170
170
  }))), {
171
171
  filter: r,
172
172
  searchKey: c
173
- } = fe(), a = x(() => g.value.filter((o) => r([o.name, L(o.price, !1)]))), d = M;
173
+ } = fe(), a = x(() => g.value.filter((o) => r([o.name, z(o.price, !1)]))), d = U;
174
174
  ne(() => a.value.length, (o) => {
175
175
  d("update:count", o);
176
176
  }, {
@@ -184,12 +184,12 @@ const be = _e("takeaway-manager", () => {
184
184
  enableSorting: !1,
185
185
  size: 700,
186
186
  cell: (o) => {
187
- const i = o.row.original, m = o.getValue(), U = Object.keys(i.name_locale ?? {}).map((t) => we(t));
187
+ const i = o.row.original, m = o.getValue(), M = Object.keys(i.name_locale ?? {}).map((t) => we(t));
188
188
  return E("div", {
189
189
  class: "flex items-center gap-8"
190
190
  }, [E("span", {
191
191
  class: "break-all"
192
- }, m), ...U.map((t) => E("div", {
192
+ }, m), ...M.map((t) => E("div", {
193
193
  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"
194
194
  }, t))]);
195
195
  }
@@ -205,7 +205,7 @@ const be = _e("takeaway-manager", () => {
205
205
  },
206
206
  cell: (o) => {
207
207
  const i = o.getValue();
208
- return L(i, !1);
208
+ return z(i, !1);
209
209
  }
210
210
  }, {
211
211
  accessorKey: "usedBy",
@@ -237,7 +237,7 @@ const be = _e("takeaway-manager", () => {
237
237
  }) : null])
238
238
  }]), K = me(), b = x(() => K.breakpoints.value.xs);
239
239
  return (o, i) => {
240
- const m = O("fm-search"), h = O("fm-table"), U = O("fm-button");
240
+ const m = S("fm-search"), h = S("fm-table"), M = S("fm-button");
241
241
  return g.value.length ? (_(), C(P, {
242
242
  key: 0
243
243
  }, [b.value ? (_(), C(P, {
@@ -254,13 +254,13 @@ const be = _e("takeaway-manager", () => {
254
254
  onClick: () => {
255
255
  f.value.edit && n(p).updateTakeaway(t);
256
256
  }
257
- }, [k("div", Ue, [k("p", Ee, S(t.name), 1), k("p", Ke, S(`${n(q)(n(l).categorizedItems, t.usedBy).flatMap((I) => I.items).length ?? 0} items linked`), 1), k("p", Ie, " Price: " + S(w.value.symbol) + S(n(L)(t.price, !1)), 1)]), f.value.delete ? (_(), G(U, {
257
+ }, [k("div", Me, [k("p", Ee, O(t.name), 1), k("p", Ke, O(`${n(q)(n(l).categorizedItems, t.usedBy).flatMap((I) => I.items).length ?? 0} items linked`), 1), k("p", Ie, " Price: " + O(w.value.symbol) + O(n(z)(t.price, !1)), 1)]), f.value.delete ? (_(), G(M, {
258
258
  key: 0,
259
259
  variant: n(D).Tertiary,
260
260
  "text-color": "neutral-gray-400",
261
261
  "prepend-icon": "delete",
262
- onClick: Q(() => n(p).deleteTakeaway(t), ["stop"])
263
- }, null, 8, ["variant", "onClick"])) : $("", !0)], 8, Me))), 128))])], 64)) : (_(), C("div", he, [k("div", xe, [k("div", Ce, [V(m, {
262
+ onClick: J(() => n(p).deleteTakeaway(t), ["stop"])
263
+ }, null, 8, ["variant", "onClick"])) : $("", !0)], 8, Ue))), 128))])], 64)) : (_(), C("div", he, [k("div", xe, [k("div", Ce, [V(m, {
264
264
  autofocus: "",
265
265
  modelValue: n(c),
266
266
  "onUpdate:modelValue": i[0] || (i[0] = (t) => j(c) ? c.value = t : null),
@@ -291,18 +291,18 @@ const be = _e("takeaway-manager", () => {
291
291
  action: "add",
292
292
  "apply-product": "",
293
293
  "onUpdate:takeaway": i[3] || (i[3] = (t) => n(y).updateMenu({
294
- module: n(z.F_MENU_MODULE_V4_KEY).enum.takeaway,
295
- operation: n(N.F_OPERATION_TYPE).create,
294
+ module: n(N.F_MENU_MODULE_V4_KEY).enum.takeaway,
295
+ operation: n(L.F_OPERATION_TYPE).create,
296
296
  data: t,
297
297
  link: n(ee)(t.usedBy || [])
298
298
  }, t.name))
299
299
  }, {
300
300
  default: F(({
301
301
  trigger: t
302
- }) => [V(U, {
302
+ }) => [V(M, {
303
303
  "prepend-icon": "add",
304
304
  label: n(e)("menu.takeaway.empty.action"),
305
- onClick: Q(t, ["stop"])
305
+ onClick: J(t, ["stop"])
306
306
  }, null, 8, ["label", "onClick"])]),
307
307
  _: 1
308
308
  }, 8, ["bind-to-variant"])) : $("", !0)]),
@@ -1,11 +1,11 @@
1
- import { computed as d, defineComponent as x, ref as F, resolveComponent as b, createElementBlock as L, openBlock as w, normalizeClass as R, createVNode as K, normalizeStyle as $, withCtx as B, createBlock as U, createCommentVNode as j } from "vue";
2
- import { A as h, M as E, G as C, Q as O, al as Y, u as y, a as G } from "./index.vue_vue_type_script_setup_true_lang-DyiwvQnC.js";
3
- import { u as S } from "./menuV2-DWQ093x3.js";
4
- import { C as v, h as N } from "./catalog-Cp4kVRAL.js";
5
- import { useSnackbar as P, useDialog as z } from "@feedmepos/ui-library";
6
- import { a as T } from "./LinkProductSideSheet-DQN59t0a.js";
7
- import { useI18n as Q } from "@feedmepos/mf-common";
8
- function q() {
1
+ import { computed as d, defineComponent as x, ref as F, resolveComponent as b, createElementBlock as L, openBlock as w, normalizeClass as O, createVNode as K, normalizeStyle as B, withCtx as $, createBlock as U, createCommentVNode as j } from "vue";
2
+ import { y as h, J as E, B as R, O as C, ai as z, u as y, c as J } from "./index.vue_vue_type_script_setup_true_lang-CA1qH7Vf.js";
3
+ import { u as S } from "./menuV2-Da1zBhkS.js";
4
+ import { C as v, h as N } from "./catalog-CXcQ-QmP.js";
5
+ import { useSnackbar as P, useDialog as A } from "@feedmepos/ui-library";
6
+ import { a as T } from "./LinkProductSideSheet-BS-MEIOG.js";
7
+ import { useI18n as q } from "@feedmepos/mf-common";
8
+ function G() {
9
9
  const t = S(), o = d(() => t.categorizedRawMenuItems.filter((u) => u.items.length > 0)), i = d(() => {
10
10
  const u = t.currentCatalog;
11
11
  return u ? v.getItemAvailable(u).map((n) => ({ _id: n })) : [];
@@ -43,10 +43,10 @@ function q() {
43
43
  });
44
44
  }
45
45
  async function g(u) {
46
- await A(u, !0);
46
+ await Y(u, !0);
47
47
  }
48
48
  async function p(u) {
49
- await A(u, !1);
49
+ await Y(u, !1);
50
50
  }
51
51
  async function _(u) {
52
52
  const n = t.currentCatalog;
@@ -70,7 +70,7 @@ function q() {
70
70
  saveLinkItemRules: _
71
71
  };
72
72
  }
73
- async function A(t, o) {
73
+ async function Y(t, o) {
74
74
  var u;
75
75
  const i = S(), c = i.currentCatalog;
76
76
  if (!c || t.length === 0) return;
@@ -97,7 +97,7 @@ async function A(t, o) {
97
97
  });
98
98
  }
99
99
  function H() {
100
- const t = S(), o = P(), i = z(), c = C(o), g = O(c), p = d(() => {
100
+ const t = S(), o = P(), i = A(), c = R(o), g = C(c), p = d(() => {
101
101
  const n = t.categorizedRawMenuItems, a = new Set(
102
102
  t.currentCatalog ? v.getItemAvailable(t.currentCatalog) : t.state.menu.modules.item.map((e) => e._id)
103
103
  );
@@ -135,7 +135,7 @@ function H() {
135
135
  (l, m) => {
136
136
  const f = a.items.filter((I) => I._id == m) ?? [];
137
137
  return l = l.concat(
138
- Y(m, f, (I) => ({
138
+ z(m, f, (I) => ({
139
139
  ...I,
140
140
  orderFrom: null
141
141
  }))
@@ -159,8 +159,8 @@ function H() {
159
159
  applyProduct: u
160
160
  };
161
161
  }
162
- const J = () => {
163
- const t = y(), o = P(), i = C(o), c = O(i), g = d(() => t.categorizedRawMenuItems.filter((n) => n.items.length > 0)), p = d(() => {
162
+ const Q = () => {
163
+ const t = y(), o = P(), i = R(o), c = C(i), g = d(() => t.categorizedRawMenuItems.filter((n) => n.items.length > 0)), p = d(() => {
164
164
  const n = t.currentCatalog;
165
165
  return n ? v.getItemAvailable(n).map((a) => ({ _id: a })) : [];
166
166
  });
@@ -174,7 +174,7 @@ const J = () => {
174
174
  f,
175
175
  I,
176
176
  e.has(f),
177
- t.version === G.F_MENU_VERSION.v3
177
+ t.version === J.F_MENU_VERSION.v3
178
178
  ), m;
179
179
  },
180
180
  {}
@@ -219,7 +219,7 @@ const J = () => {
219
219
  saveLinkItemRules: u
220
220
  };
221
221
  }, W = () => {
222
- const t = y(), o = P(), i = z(), c = C(o), g = O(c), p = d(() => {
222
+ const t = y(), o = P(), i = A(), c = R(o), g = C(c), p = d(() => {
223
223
  const n = t.categorizedRawMenuItems, a = new Set(
224
224
  t.currentCatalog ? v.getItemAvailable(t.currentCatalog) : t.state.menu.modules.item.map((e) => e._id)
225
225
  );
@@ -248,7 +248,7 @@ const J = () => {
248
248
  (l, m) => {
249
249
  const f = a.items.filter((I) => I._id == m) ?? [];
250
250
  return l = l.concat(
251
- Y(m, f, (I) => ({
251
+ z(m, f, (I) => ({
252
252
  ...I,
253
253
  orderFrom: null
254
254
  }))
@@ -287,7 +287,7 @@ function se(t) {
287
287
  const e = y(), r = d(() => e.state.menu.modules.item ?? []), s = d(() => {
288
288
  var M;
289
289
  return ((M = e.currentCatalog) == null ? void 0 : M.linkItemRules) ?? null;
290
- }), l = W(), m = J(), f = d(() => !e.state.currentSchedulerId), I = (M) => {
290
+ }), l = W(), m = Q(), f = d(() => !e.state.currentSchedulerId), I = (M) => {
291
291
  if (M.mode === T.Rules)
292
292
  m.saveLinkItemRules(M.linkItemRules);
293
293
  else {
@@ -308,7 +308,7 @@ function se(t) {
308
308
  const i = S(), c = d(() => i.state.menu.modules.item ?? []), g = d(() => {
309
309
  var e;
310
310
  return ((e = i.currentCatalog) == null ? void 0 : e.linkItemRules) ?? null;
311
- }), p = H(), _ = q(), u = d(() => !i.state.currentSchedulerId), n = (e) => {
311
+ }), p = H(), _ = G(), u = d(() => !i.state.currentSchedulerId), n = (e) => {
312
312
  if (e.mode === T.Rules)
313
313
  _.saveLinkItemRules(e.linkItemRules);
314
314
  else {
@@ -336,7 +336,7 @@ const X = ["alt", "src", "crossorigin"], ue = /* @__PURE__ */ x({
336
336
  crossorigin: { type: Boolean, default: !0 }
337
337
  },
338
338
  setup(t) {
339
- const o = t, { t: i } = Q(), c = F(!1), g = F(!o.src), p = () => {
339
+ const o = t, { t: i } = q(), c = F(!1), g = F(!o.src), p = () => {
340
340
  c.value = !1, g.value = !0;
341
341
  }, _ = () => {
342
342
  c.value = !0, g.value = !0;
@@ -357,18 +357,18 @@ const X = ["alt", "src", "crossorigin"], ue = /* @__PURE__ */ x({
357
357
  return (e, r) => {
358
358
  const s = b("fm-icon"), l = b("fm-card");
359
359
  return w(), L("div", {
360
- class: R([e.className, "flex items-center justify-center"])
360
+ class: O([e.className, "flex items-center justify-center"])
361
361
  }, [
362
362
  K(l, {
363
- class: R(["flex items-center justify-center", "rounded-md"]),
364
- style: $({ width: `${n.value.width}px`, height: `${n.value.height}px` }),
363
+ class: O(["flex items-center justify-center", "rounded-md"]),
364
+ style: B({ width: `${n.value.width}px`, height: `${n.value.height}px` }),
365
365
  variant: "outlined"
366
366
  }, {
367
- default: B(() => [
367
+ default: $(() => [
368
368
  a.value && !c.value ? (w(), L("img", {
369
369
  key: 0,
370
370
  alt: u.value,
371
- class: R(["w-full h-full", "object-cover", g.value ? "" : "hidden"]),
371
+ class: O(["w-full h-full", "object-cover", g.value ? "" : "hidden"]),
372
372
  src: a.value,
373
373
  crossorigin: o.crossorigin ? "anonymous" : void 0,
374
374
  onError: _,
@@ -394,6 +394,6 @@ const X = ["alt", "src", "crossorigin"], ue = /* @__PURE__ */ x({
394
394
  });
395
395
  export {
396
396
  ue as _,
397
- q as a,
397
+ G as a,
398
398
  se as u
399
399
  };