@feedmepos/mf-menu 0.32.17 → 0.32.18-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/App-Cfl37TTw.js +152661 -0
  2. package/dist/{Catalog-ChlP8Cid.js → Catalog-Yxsb-D33.js} +47 -52
  3. package/dist/{Category-CHs96ibF.js → Category-0vJH8Ct0.js} +86 -92
  4. package/dist/{Category-B1tAJpNd.js → Category-qp0wI14I.js} +25 -26
  5. package/dist/{CookingGuide-mEvca-0v.js → CookingGuide-EpAr5F5U.js} +139 -143
  6. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bk26jQI7.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CkyD0sdI.js} +14 -16
  7. package/dist/{Group-Ye2IIY52.js → Group-B3W9iSbO.js} +5 -5
  8. package/dist/{Group-Co2Vf4Lw.js → Group-DLCh0fDU.js} +1 -1
  9. package/dist/{Group.vue_vue_type_script_setup_true_lang-BcxSbvJS.js → Group.vue_vue_type_script_setup_true_lang-Bzy_hXDv.js} +176 -186
  10. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D1f8VG-n.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BFaAXp7r.js} +81 -88
  11. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Jv6iJlg9.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CxP8lDD0.js} +2502 -2508
  12. package/dist/{Ingredient-BgnW8sWo.js → Ingredient-CVLMr_YB.js} +102 -105
  13. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-8ziHcUiK.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CdTC5ykI.js} +1058 -1059
  14. package/dist/{MenuSetting-GEngjeC8.js → MenuSetting-Blpi1vSd.js} +58 -61
  15. package/dist/{PrintRoute-BSlUQT7g.js → PrintRoute-BS7PPPkE.js} +49 -52
  16. package/dist/{Product-DNg_BUuV.js → Product-DDeNKQ7u.js} +1 -1
  17. package/dist/{Product.vue_vue_type_script_setup_true_lang-Cehy2oy-.js → Product.vue_vue_type_script_setup_true_lang-rmv8m4_D.js} +286 -298
  18. package/dist/{ProductInternalTools-B5A67yxH.js → ProductInternalTools-CVuothk9.js} +45 -46
  19. package/dist/{Products-DCsxmTPB.js → Products-BIvsHKEt.js} +111 -116
  20. package/dist/{Publish-Cst0Ll6T.js → Publish-CDADU3Pp.js} +154 -159
  21. package/dist/{Recipe-DupS3SQT.js → Recipe-CMhW7e_z.js} +40 -43
  22. package/dist/{Scheduler-BcThU1M6.js → Scheduler-BpxunKBV.js} +7 -7
  23. package/dist/{ServingSequence-CT3THBH6.js → ServingSequence-BQVuYyAB.js} +54 -58
  24. package/dist/{Setting-Dxh8E3no.js → Setting-Dj0yyP37.js} +63 -66
  25. package/dist/{Subcategory-DhJEzofz.js → Subcategory-BH4DDZM4.js} +72 -76
  26. package/dist/{Takeaway-DSC7U4Jk.js → Takeaway-CGJBZ_sJ.js} +1 -1
  27. package/dist/{Takeaway-B8BSSKNj.js → Takeaway-DifOudVE.js} +20 -21
  28. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BLpiJlk2.js → Takeaway.vue_vue_type_script_setup_true_lang-D-R5_S5G.js} +59 -64
  29. package/dist/{Unit-joU7vZZu.js → Unit-DXDox2Ut.js} +8 -8
  30. package/dist/{Variant-D8YjRJ6N.js → Variant-DbJVwgm5.js} +75 -78
  31. package/dist/{_id_-Bd9uo1WW.js → _id_-RFYwWjbM.js} +34 -38
  32. package/dist/{app-BNrAos5Z.js → app-Z0KWH9-d.js} +74 -335
  33. package/dist/app.js +4 -5
  34. package/dist/apps/mf-menu/src/app.d.ts +1 -2
  35. package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +1 -0
  36. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  37. package/dist/assets/{linked-status-DbjzbFTw.js → linked-status-CkmoJAm-.js} +2 -2
  38. package/dist/assets/{menu-export-D_oNY_wi.js → menu-export-DcINiK28.js} +3 -3
  39. package/dist/assets/{override-menu-CIU7U1_4.js → override-menu-PUKiu-df.js} +2 -2
  40. package/dist/assets/{validate-menu-kuOxuwG9.js → validate-menu-CcqiRhNT.js} +2 -2
  41. package/dist/{catalogSetting-BHgsBDTl.js → catalogSetting-Bf66H-j7.js} +1 -1
  42. package/dist/dayjs.min-DNPTnUFp.js +6 -0
  43. package/dist/{jszip.min-7SsHzD5O.js → jszip.min-CO2_Gf69.js} +545 -545
  44. package/dist/{menu-Cd4NbFVq.js → menu-Brxar171.js} +1 -1
  45. package/dist/mf-menu.css +1 -1
  46. package/dist/{scheduler-B6OokVIA.js → scheduler-CqdIiE8G.js} +56 -60
  47. package/dist/{toExcel-BZkbXlHv.js → toExcel-CRJIU0NC.js} +2 -2
  48. package/dist/{unit-D6QOkMoM.js → unit-wYPYkm33.js} +98 -105
  49. package/package.json +1 -1
  50. package/dist/App-BiSEuDkd.js +0 -13484
  51. package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-C_SjdLpO.js +0 -161
  52. package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
  53. package/dist/LinkProductSideSheet-DFDYEUBh.js +0 -687
  54. package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +0 -69
  55. package/dist/RuleView.vue_vue_type_script_setup_true_lang-BeesK2ym.js +0 -3285
  56. package/dist/TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js +0 -20
  57. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-C3qXnZlz.js +0 -399
  58. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CMe76XvZ.js +0 -6011
  59. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  60. package/dist/app-5fxKLAzS.js +0 -8163
  61. package/dist/app-nTzkERJW.js +0 -68
  62. package/dist/catalog-BO2nXwe5.js +0 -199
  63. package/dist/category-CuG3DsGL.js +0 -156
  64. package/dist/check-C9mY6LiX.js +0 -9
  65. package/dist/createComponentProgrammatically-Bt2rn1IQ.js +0 -11
  66. package/dist/currency-DxC5zyZB.js +0 -7
  67. package/dist/dayjs.min-BvFUSPWD.js +0 -6
  68. package/dist/discardConfirm-BHni0LNu.js +0 -28
  69. package/dist/index-B0nhvuxR.js +0 -273
  70. package/dist/index-C2zPvt64.js +0 -239
  71. package/dist/index-C36JQix-.js +0 -246
  72. package/dist/index-CisutoS9.js +0 -156
  73. package/dist/index.vue_vue_type_script_setup_true_lang-DCBYExNb.js +0 -109064
  74. package/dist/item-K01xd1Z0.js +0 -6868
  75. package/dist/menuV2-DKE-xanq.js +0 -1052
  76. package/dist/object-DVUNCr7w.js +0 -16
  77. package/dist/priceTier-Beavb91W.js +0 -87
  78. package/dist/search-BAPEUu1R.js +0 -15
  79. package/dist/string-DpfFixWH.js +0 -4
  80. package/dist/subcategory-DnslmmRD.js +0 -148
  81. package/dist/tooltip-B5BiPMx9.js +0 -32
  82. package/dist/vuedraggable-CK8z7qA8.js +0 -1728
@@ -1,22 +1,17 @@
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 Q } from "vue";
2
- import { G as H, u as J, Q as W, M as N, A as z, I as L, B as se, ao as q, a4 as re } from "./index.vue_vue_type_script_setup_true_lang-DCBYExNb.js";
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 ue } from "@feedmepos/ui-library";
5
- import { _ as me } from "./app-BNrAos5Z.js";
6
- import { a as ye, l as ee, T as pe } from "./index-B0nhvuxR.js";
7
- import { u as fe } from "./search-BAPEUu1R.js";
8
- import { f as F } from "./currency-DxC5zyZB.js";
9
- import { defineStore as _e } from "pinia";
10
- import { C as ke } from "./catalog-BO2nXwe5.js";
11
- import { c as ve } from "./createComponentProgrammatically-Bt2rn1IQ.js";
1
+ import { getCurrentInstance as te, defineComponent as ne, computed as h, watch as oe, h as R, resolveComponent as S, createElementBlock as C, openBlock as f, 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 G, toDisplayString as I, withModifiers as J } from "vue";
2
+ import { a as H, u as Q, d as W, m as N, e as z, h as se, aJ as re, c as L, a9 as le, M as X, i as ce, f as de, al as F, aK as q, _ as ue, T as me } from "./App-Cfl37TTw.js";
3
+ import { useI18n as Z, useCoreStore as ye } from "@feedmepos/mf-common";
4
+ import { useDialog as pe, useSnackbar as ee, FmButtonVariant as A, components as _e, useBreakpoints as fe } from "@feedmepos/ui-library";
5
+ import { _ as ke } from "./app-Z0KWH9-d.js";
6
+ import { defineStore as ve } from "pinia";
12
7
  function we(T, M, l, m) {
13
8
  var y, v, w, g;
14
9
  const i = L(T);
15
10
  i.override.takeaway[l._id] = {
16
11
  price: l.price || void 0
17
12
  };
18
- const f = [...l.usedBy, ...M.usedBy];
19
- for (const r of f) {
13
+ const _ = [...l.usedBy, ...M.usedBy];
14
+ for (const r of _) {
20
15
  const c = l.usedBy.some(
21
16
  (e) => e._id == r._id && e.combinationKey == r.combinationKey
22
17
  ) ? l._id : null, a = (i.override.items[r._id] || []).findIndex(
@@ -44,12 +39,12 @@ function we(T, M, l, m) {
44
39
  }
45
40
  return i;
46
41
  }
47
- const ge = _e("takeaway-manager", () => {
48
- const T = ce(), M = Z(), l = H(M), m = W(l), i = J(), f = te(), { t: y } = X(), v = (a) => {
42
+ const ge = ve("takeaway-manager", () => {
43
+ const T = pe(), M = ee(), l = H(M), m = W(l), i = Q(), _ = te(), { t: y } = Z(), v = (a) => {
49
44
  var e, u;
50
- const { vNode: d } = ve(
51
- ye,
52
- f,
45
+ const { vNode: d } = se(
46
+ re,
47
+ _,
53
48
  a
54
49
  );
55
50
  (u = (e = d.component) == null ? void 0 : e.exposed) == null || u.trigger();
@@ -64,8 +59,8 @@ const ge = _e("takeaway-manager", () => {
64
59
  fallback: e,
65
60
  action: "update",
66
61
  "onUpdate:takeaway": async (b) => {
67
- let o = L(i.currentCatalog);
68
- b.price ? o.override.takeaway[a._id] = { price: b.price } : delete o.override.takeaway[a._id], o = we(o, a, b, i.state.menu.modules.item), await new ke(o, i, m.updateMenu, T).update();
62
+ let n = L(i.currentCatalog);
63
+ b.price ? n.override.takeaway[a._id] = { price: b.price } : delete n.override.takeaway[a._id], n = we(n, a, b, i.state.menu.modules.item), await new le(n, i, m.updateMenu, T).update();
69
64
  }
70
65
  });
71
66
  }
@@ -81,7 +76,7 @@ const ge = _e("takeaway-manager", () => {
81
76
  module: z.F_MENU_MODULE_V4_KEY.enum.takeaway,
82
77
  operation: N.F_OPERATION_TYPE.update,
83
78
  data: d,
84
- link: ee(d.usedBy || [])
79
+ link: X(d.usedBy || [])
85
80
  },
86
81
  d.name
87
82
  );
@@ -142,23 +137,23 @@ const ge = _e("takeaway-manager", () => {
142
137
  }, Ie = {
143
138
  key: 1,
144
139
  class: "xs:pt-24"
145
- }, Re = /* @__PURE__ */ oe({
140
+ }, ze = /* @__PURE__ */ ne({
146
141
  __name: "Takeaway",
147
142
  emits: ["update:count"],
148
143
  setup(T, {
149
144
  emit: M
150
145
  }) {
151
- const l = J(), m = ge(), i = h(() => l.rules.item.bindToVariant), f = h(() => l.rules.takeaway), y = W(H(Z())), v = le(), w = h(() => se.Country.getCountry(v.currentCountry.value).currency), g = h(() => l.takeaways.map((o) => ({
152
- ...o,
146
+ const l = Q(), m = ge(), i = h(() => l.rules.item.bindToVariant), _ = h(() => l.rules.takeaway), y = W(H(ee())), v = ye(), w = h(() => ce.Country.getCountry(v.currentCountry.value).currency), g = h(() => l.takeaways.map((n) => ({
147
+ ...n,
153
148
  usedBy: l.items.reduce((s, p) => {
154
- var n, E, Y;
155
- const x = p.takeawayUsed === o._id;
156
- if ((!i.value || !((E = (n = p.variant) == null ? void 0 : n.variantGroupIds) != null && E.length)) && x)
149
+ var o, E, Y;
150
+ const x = p.takeawayUsed === n._id;
151
+ if ((!i.value || !((E = (o = p.variant) == null ? void 0 : o.variantGroupIds) != null && E.length)) && x)
157
152
  s.push({
158
153
  _id: p._id
159
154
  });
160
155
  else {
161
- const ae = (((Y = p.variant) == null ? void 0 : Y.variantCombinations) || []).filter((K) => K.takeawayUsed === o._id || !K.takeawayUsed && x).map((K) => ({
156
+ const ae = (((Y = p.variant) == null ? void 0 : Y.variantCombinations) || []).filter((K) => K.takeawayUsed === n._id || !K.takeawayUsed && x).map((K) => ({
162
157
  _id: p._id,
163
158
  combinationKey: K.combinationKey
164
159
  }));
@@ -169,15 +164,15 @@ const ge = _e("takeaway-manager", () => {
169
164
  }))), {
170
165
  filter: r,
171
166
  searchKey: c
172
- } = fe(), a = h(() => g.value.filter((o) => r([o.name, F(o.price, !1)]))), d = M;
173
- ne(() => a.value.length, (o) => {
174
- d("update:count", o);
167
+ } = de(), a = h(() => g.value.filter((n) => r([n.name, F(n.price, !1)]))), d = M;
168
+ oe(() => a.value.length, (n) => {
169
+ d("update:count", n);
175
170
  }, {
176
171
  immediate: !0
177
172
  });
178
173
  const {
179
174
  t: e
180
- } = X(), u = h(() => [{
175
+ } = Z(), u = h(() => [{
181
176
  accessorKey: "name",
182
177
  header: () => e("menu.takeaway.table.columns.name"),
183
178
  enableSorting: !1,
@@ -192,8 +187,8 @@ const ge = _e("takeaway-manager", () => {
192
187
  meta: {
193
188
  textAlign: "right"
194
189
  },
195
- cell: (o) => {
196
- const s = o.getValue();
190
+ cell: (n) => {
191
+ const s = n.getValue();
197
192
  return F(s, !1);
198
193
  }
199
194
  }, {
@@ -201,8 +196,8 @@ const ge = _e("takeaway-manager", () => {
201
196
  header: () => e("menu.takeaway.table.columns.products"),
202
197
  enableSorting: !1,
203
198
  size: 200,
204
- cell: (o) => {
205
- const s = o.getValue(), p = q(l.categorizedItems, s).flatMap((x) => x.items).length ?? 0;
199
+ cell: (n) => {
200
+ const s = n.getValue(), p = q(l.categorizedItems, s).flatMap((x) => x.items).length ?? 0;
206
201
  return e("menu.takeaway.table.items_linked", {
207
202
  count: p
208
203
  });
@@ -214,47 +209,47 @@ const ge = _e("takeaway-manager", () => {
214
209
  cellClass: "pl-16",
215
210
  headerContentClass: "-mx-16"
216
211
  },
217
- cell: (o) => R("div", {
212
+ cell: (n) => R("div", {
218
213
  class: "flex justify-end items-center"
219
- }, [f.value.delete ? R(de.FmButton, {
214
+ }, [_.value.delete ? R(_e.FmButton, {
220
215
  prependIcon: "delete",
221
216
  variant: A.Tertiary,
222
217
  textColor: "neutral-gray-400",
223
218
  onClick: (s) => {
224
- s.stopPropagation(), m.deleteTakeaway(o.row.original);
219
+ s.stopPropagation(), m.deleteTakeaway(n.row.original);
225
220
  }
226
221
  }) : null])
227
- }]), U = ue(), b = h(() => U.breakpoints.value.xs);
228
- return (o, s) => {
222
+ }]), U = fe(), b = h(() => U.breakpoints.value.xs);
223
+ return (n, s) => {
229
224
  const p = S("fm-search"), x = S("fm-table"), B = S("fm-button");
230
- return g.value.length ? (_(), C(O, {
225
+ return g.value.length ? (f(), C(O, {
231
226
  key: 0
232
- }, [b.value ? (_(), C(O, {
227
+ }, [b.value ? (f(), C(O, {
233
228
  key: 1
234
229
  }, [k("div", Ce, [V(p, {
235
230
  class: "w-full",
236
231
  autofocus: "",
237
232
  modelValue: t(c),
238
- "onUpdate:modelValue": s[2] || (s[2] = (n) => j(c) ? c.value = n : null),
233
+ "onUpdate:modelValue": s[2] || (s[2] = (o) => j(c) ? c.value = o : null),
239
234
  placeholder: t(e)("menu.takeaway.table.search.placeholder")
240
- }, null, 8, ["modelValue", "placeholder"])]), k("div", Ve, [(_(!0), C(O, null, ie(a.value, (n) => (_(), C("div", {
241
- key: n._id,
235
+ }, null, 8, ["modelValue", "placeholder"])]), k("div", Ve, [(f(!0), C(O, null, ie(a.value, (o) => (f(), C("div", {
236
+ key: o._id,
242
237
  class: D(["py-12 px-16", "flex space-x-8", "items-center"]),
243
238
  onClick: () => {
244
- f.value.edit && t(m).updateTakeaway(n);
239
+ _.value.edit && t(m).updateTakeaway(o);
245
240
  }
246
- }, [k("div", Me, [k("p", Ue, I(n.name), 1), k("p", Ee, I(`${t(q)(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, {
241
+ }, [k("div", Me, [k("p", Ue, I(o.name), 1), k("p", Ee, I(`${t(q)(t(l).categorizedItems, o.usedBy).flatMap((E) => E.items).length ?? 0} items linked`), 1), k("p", Ke, " Price: " + I(w.value.symbol) + I(t(F)(o.price, !1)), 1)]), _.value.delete ? (f(), $(B, {
247
242
  key: 0,
248
243
  variant: t(A).Tertiary,
249
244
  "text-color": "neutral-gray-400",
250
245
  "prepend-icon": "delete",
251
- onClick: Q(() => t(m).deleteTakeaway(n), ["stop"])
252
- }, null, 8, ["variant", "onClick"])) : $("", !0)], 8, Te))), 128))])], 64)) : (_(), C("div", be, [k("div", he, [k("div", xe, [V(p, {
246
+ onClick: J(() => t(m).deleteTakeaway(o), ["stop"])
247
+ }, null, 8, ["variant", "onClick"])) : G("", !0)], 8, Te))), 128))])], 64)) : (f(), C("div", be, [k("div", he, [k("div", xe, [V(p, {
253
248
  autofocus: "",
254
249
  modelValue: t(c),
255
- "onUpdate:modelValue": s[0] || (s[0] = (n) => j(c) ? c.value = n : null),
250
+ "onUpdate:modelValue": s[0] || (s[0] = (o) => j(c) ? c.value = o : null),
256
251
  placeholder: t(e)("menu.takeaway.table.search.placeholder")
257
- }, null, 8, ["modelValue", "placeholder"])])]), V(me, null, {
252
+ }, null, 8, ["modelValue", "placeholder"])])]), V(ke, null, {
258
253
  default: P(() => [V(x, {
259
254
  "column-defs": u.value,
260
255
  loading: t(y).checkMenuIsLoading(),
@@ -265,41 +260,41 @@ const ge = _e("takeaway-manager", () => {
265
260
  class: "flex-1 overflow-hidden",
266
261
  "hide-footer": "",
267
262
  "pin-header-row": "",
268
- onRowClick: s[1] || (s[1] = (n) => {
269
- f.value.edit && t(m).updateTakeaway(n.original);
263
+ onRowClick: s[1] || (s[1] = (o) => {
264
+ _.value.edit && t(m).updateTakeaway(o.original);
270
265
  })
271
266
  }, null, 8, ["column-defs", "loading", "page-size", "row-data", "search-value"])]),
272
267
  _: 1
273
- })]))], 64)) : (_(), C("div", Ie, [V(t(re), {
268
+ })]))], 64)) : (f(), C("div", Ie, [V(t(ue), {
274
269
  subtitle: t(e)("menu.takeaway.empty.subtitle"),
275
270
  title: t(e)("menu.takeaway.empty.title")
276
271
  }, {
277
- action: P(() => [f.value.create ? (_(), G(t(pe), {
272
+ action: P(() => [_.value.create ? (f(), $(t(me), {
278
273
  key: 0,
279
274
  "bind-to-variant": i.value,
280
275
  action: "add",
281
276
  "apply-product": "",
282
- "onUpdate:takeaway": s[3] || (s[3] = (n) => t(y).updateMenu({
277
+ "onUpdate:takeaway": s[3] || (s[3] = (o) => t(y).updateMenu({
283
278
  module: t(z.F_MENU_MODULE_V4_KEY).enum.takeaway,
284
279
  operation: t(N.F_OPERATION_TYPE).create,
285
- data: n,
286
- link: t(ee)(n.usedBy || [])
287
- }, n.name))
280
+ data: o,
281
+ link: t(X)(o.usedBy || [])
282
+ }, o.name))
288
283
  }, {
289
284
  default: P(({
290
- trigger: n
285
+ trigger: o
291
286
  }) => [V(B, {
292
287
  "prepend-icon": "add",
293
288
  label: t(e)("menu.takeaway.empty.action"),
294
- onClick: Q(n, ["stop"])
289
+ onClick: J(o, ["stop"])
295
290
  }, null, 8, ["label", "onClick"])]),
296
291
  _: 1
297
- }, 8, ["bind-to-variant"])) : $("", !0)]),
292
+ }, 8, ["bind-to-variant"])) : G("", !0)]),
298
293
  _: 1
299
294
  }, 8, ["subtitle", "title"])]));
300
295
  };
301
296
  }
302
297
  });
303
298
  export {
304
- Re as _
299
+ ze as _
305
300
  };
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as L, computed as d, ref as g, h as k, withModifiers as x, resolveComponent as p, createBlock as b, openBlock as a, unref as e, withCtx as h, createElementVNode as o, createVNode as r, toDisplayString as f, createCommentVNode as N, createElementBlock as u, Fragment as v, normalizeClass as C, renderList as T } from "vue";
2
2
  import { useI18n as E } from "@feedmepos/mf-common";
3
- import { useSnackbar as K, components as R, useBreakpoints as D, FmButtonVariant as G } from "@feedmepos/ui-library";
4
- import { _ as I } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
- import { G as q, u as A, a4 as H } from "./index.vue_vue_type_script_setup_true_lang-DCBYExNb.js";
3
+ import { useSnackbar as K, components as R, useBreakpoints as D, FmButtonVariant as I } from "@feedmepos/ui-library";
4
+ import { _ as q } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
+ import { a as A, u as G, _ as H } from "./App-Cfl37TTw.js";
6
6
  import { _ as J } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
- import { u as O, U as P } from "./unit-D6QOkMoM.js";
7
+ import { u as O, U as P } from "./unit-wYPYkm33.js";
8
8
  const Q = {
9
9
  key: 0,
10
10
  class: "h-[600px]"
@@ -32,8 +32,8 @@ const Q = {
32
32
  __name: "Unit",
33
33
  setup(re) {
34
34
  const w = K();
35
- q(w);
36
- const S = A(), i = O(), {
35
+ A(w);
36
+ const S = G(), i = O(), {
37
37
  t: n
38
38
  } = E(), m = d(() => S.units), _ = d(() => m.value.filter((s) => `${s.name} ${s.abbrev}`.toLowerCase().includes(c.value.toLowerCase()))), c = g(""), U = g([{
39
39
  accessorKey: "name",
@@ -101,7 +101,7 @@ const Q = {
101
101
  class: C(["py-12 px-16", "flex space-x-8", "items-center"]),
102
102
  onClick: () => e(i).updateUnit(t)
103
103
  }, [o("div", ee, [o("p", te, f(t.name), 1), o("p", ne, f(e(n)("menu.common.labels.symbol")) + ": " + f(t.abbrev), 1)]), r(j, {
104
- variant: e(G).Tertiary,
104
+ variant: e(I).Tertiary,
105
105
  "prepend-icon": "delete",
106
106
  "text-color": "neutral-gray-400",
107
107
  onClick: x(() => e(i).deleteUnit(t), ["stop"])
@@ -125,7 +125,7 @@ const Q = {
125
125
  "append-heading": h(() => [o("div", oe, [o("div", le, [o("div", ae, [o("p", se, f(F.value), 1)])]), r(z), r(e(P), null, {
126
126
  default: h(({
127
127
  trigger: t
128
- }) => [m.value.length > 0 ? (a(), b(I, {
128
+ }) => [m.value.length > 0 ? (a(), b(q, {
129
129
  key: 0,
130
130
  label: e(n)("menu.unit.add"),
131
131
  "prepend-icon": "add",
@@ -1,25 +1,22 @@
1
- import { getCurrentInstance as U, defineComponent as $, computed as g, onMounted as O, h as z, resolveComponent as k, createBlock as F, openBlock as u, unref as t, withCtx as p, createElementBlock as f, Fragment as V, createElementVNode as r, createVNode as i, isRef as I, normalizeClass as L, renderList as R, toDisplayString as C, withModifiers as w, createCommentVNode as G } from "vue";
1
+ import { getCurrentInstance as $, defineComponent as A, computed as g, onMounted as O, h as z, resolveComponent as k, createBlock as F, openBlock as d, unref as n, withCtx as p, createElementBlock as f, Fragment as V, createElementVNode as r, createVNode as i, isRef as I, normalizeClass as L, renderList as R, toDisplayString as C, withModifiers as w, createCommentVNode as Y } from "vue";
2
2
  import { useI18n as N } from "@feedmepos/mf-common";
3
- import { useDialog as Y, useSnackbar as D, FmButtonVariant as M, components as Q, useBreakpoints as q } from "@feedmepos/ui-library";
4
- import { _ as H } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
- import { _ as J } from "./app-BNrAos5Z.js";
6
- import { G as K, u as P, Q as j, M as W, A as X, a4 as Z } from "./index.vue_vue_type_script_setup_true_lang-DCBYExNb.js";
7
- import { V as S } from "./index-C2zPvt64.js";
8
- import { _ as ee } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
9
- import { u as te } from "./search-BAPEUu1R.js";
10
- import { defineStore as ne } from "pinia";
11
- import { c as oe } from "./createComponentProgrammatically-Bt2rn1IQ.js";
12
- const ae = ne("variant-manager", () => {
13
- const B = Y(), o = D(), _ = K(o), h = j(_);
3
+ import { useDialog as G, useSnackbar as D, FmButtonVariant as M, components as q, useBreakpoints as H } from "@feedmepos/ui-library";
4
+ import { _ as J } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
+ import { _ as Q } from "./app-Z0KWH9-d.js";
6
+ import { a as K, u as P, d as j, m as W, e as X, h as Z, V as S, f as ee, _ as ne } from "./App-Cfl37TTw.js";
7
+ import { _ as te } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
8
+ import { defineStore as ae } from "pinia";
9
+ const oe = ae("variant-manager", () => {
10
+ const B = G(), a = D(), _ = K(a), h = j(_);
14
11
  P();
15
- const d = U(), { t: c } = N(), x = (l) => {
16
- var y, a;
17
- const { vNode: b } = oe(
12
+ const u = $(), { t: c } = N(), x = (l) => {
13
+ var y, o;
14
+ const { vNode: b } = Z(
18
15
  S,
19
- d,
16
+ u,
20
17
  l
21
18
  );
22
- (a = (y = b.component) == null ? void 0 : y.exposed) == null || a.trigger();
19
+ (o = (y = b.component) == null ? void 0 : y.exposed) == null || o.trigger();
23
20
  };
24
21
  async function m(l) {
25
22
  x({
@@ -66,9 +63,9 @@ const ae = ne("variant-manager", () => {
66
63
  class: "px-16 py-8"
67
64
  }, ce = {
68
65
  class: /* @__PURE__ */ L(["flex-1", "overflow-scroll", "divide-y divide-fm-color-neutral-gray-100", "pb-64"])
69
- }, me = ["onClick"], ue = {
66
+ }, me = ["onClick"], de = {
70
67
  class: "flex-1 space-y-4"
71
- }, de = {
68
+ }, ue = {
72
69
  class: "fm-typo-en-body-lg-600"
73
70
  }, pe = {
74
71
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
@@ -77,16 +74,16 @@ const ae = ne("variant-manager", () => {
77
74
  }, _e = {
78
75
  key: 1,
79
76
  class: "xs:pt-16"
80
- }, Se = /* @__PURE__ */ $({
77
+ }, Ce = /* @__PURE__ */ A({
81
78
  __name: "Variant",
82
79
  setup(B) {
83
80
  const {
84
- t: o
85
- } = N(), _ = P(), h = j(K(D())), d = ae(), c = g(() => _.variants.map((a) => ({
86
- ...a,
81
+ t: a
82
+ } = N(), _ = P(), h = j(K(D())), u = oe(), c = g(() => _.variants.map((o) => ({
83
+ ...o,
87
84
  usedBy: _.items.filter((e) => {
88
85
  var s;
89
- return (s = e.variant) == null ? void 0 : s.variantGroupIds.includes(a._id);
86
+ return (s = e.variant) == null ? void 0 : s.variantGroupIds.includes(o._id);
90
87
  }).map(({
91
88
  _id: e
92
89
  }) => ({
@@ -95,32 +92,32 @@ const ae = ne("variant-manager", () => {
95
92
  }))), {
96
93
  filter: x,
97
94
  searchKey: m
98
- } = te(), v = g(() => c.value.filter((a) => {
95
+ } = ee(), v = g(() => c.value.filter((o) => {
99
96
  var e;
100
- return x([a.name, ...((e = a.options) == null ? void 0 : e.map((s) => s.name)) ?? []]);
97
+ return x([o.name, ...((e = o.options) == null ? void 0 : e.map((s) => s.name)) ?? []]);
101
98
  }));
102
99
  O(() => _.selectCatalog(null));
103
100
  const l = g(() => [{
104
101
  accessorKey: "name",
105
- header: () => o("menu.variant.columns.name"),
102
+ header: () => a("menu.variant.columns.name"),
106
103
  size: 360,
107
104
  enableSorting: !1
108
105
  }, {
109
106
  accessorKey: "options",
110
- header: () => o("menu.variant.columns.options"),
107
+ header: () => a("menu.variant.columns.options"),
111
108
  size: 560,
112
109
  enableSorting: !1,
113
- cell: (a) => {
110
+ cell: (o) => {
114
111
  var e;
115
- return (e = a.getValue()) == null ? void 0 : e.map((s) => s.name).join(", ");
112
+ return (e = o.getValue()) == null ? void 0 : e.map((s) => s.name).join(", ");
116
113
  }
117
114
  }, {
118
115
  accessorKey: "usedBy",
119
- header: () => o("menu.variant.columns.applied_products"),
116
+ header: () => a("menu.variant.columns.applied_products"),
120
117
  enableSorting: !1,
121
118
  size: 180,
122
- cell: (a) => o("menu.common.labels.items_linked", {
123
- count: a.getValue().length
119
+ cell: (o) => a("menu.common.labels.items_linked", {
120
+ count: o.getValue().length
124
121
  })
125
122
  }, {
126
123
  id: "action",
@@ -129,92 +126,92 @@ const ae = ne("variant-manager", () => {
129
126
  cellClass: "pl-16",
130
127
  headerContentClass: "-mx-16"
131
128
  },
132
- cell: (a) => z("div", {
129
+ cell: (o) => z("div", {
133
130
  class: "w-full flex justify-end items-center"
134
- }, [z(Q.FmButton, {
131
+ }, [z(q.FmButton, {
135
132
  prependIcon: "delete",
136
133
  variant: M.Tertiary,
137
134
  textColor: "neutral-gray-400",
138
135
  onClick: (e) => {
139
- e.stopPropagation(), d.deleteVariant(a.row.original);
136
+ e.stopPropagation(), u.deleteVariant(o.row.original);
140
137
  }
141
138
  })])
142
- }]), b = q(), y = g(() => b.breakpoints.value.xs);
143
- return (a, e) => {
144
- const s = k("fm-search"), A = k("fm-table"), E = k("fm-button");
145
- return u(), F(ee, {
146
- heading: t(o)("menu.variant.title")
139
+ }]), b = H(), y = g(() => b.breakpoints.value.xs);
140
+ return (o, e) => {
141
+ const s = k("fm-search"), T = k("fm-table"), E = k("fm-button");
142
+ return d(), F(te, {
143
+ heading: n(a)("menu.variant.title")
147
144
  }, {
148
- "append-heading": p(() => [c.value.length ? (u(), F(t(S), {
145
+ "append-heading": p(() => [c.value.length ? (d(), F(n(S), {
149
146
  key: 0
150
147
  }, {
151
148
  default: p(({
152
- trigger: n
153
- }) => [i(H, {
149
+ trigger: t
150
+ }) => [i(J, {
154
151
  class: "ml-auto",
155
- label: t(o)("menu.variant.add"),
152
+ label: n(a)("menu.variant.add"),
156
153
  "prepend-icon": "add",
157
- onClick: w(n, ["stop"])
154
+ onClick: w(t, ["stop"])
158
155
  }, null, 8, ["label", "onClick"])]),
159
156
  _: 1
160
- })) : G("", !0)]),
161
- default: p(() => [c.value.length ? (u(), f(V, {
157
+ })) : Y("", !0)]),
158
+ default: p(() => [c.value.length ? (d(), f(V, {
162
159
  key: 0
163
- }, [y.value ? (u(), f(V, {
160
+ }, [y.value ? (d(), f(V, {
164
161
  key: 1
165
162
  }, [r("div", ie, [i(s, {
166
163
  autofocus: "",
167
- modelValue: t(m),
168
- "onUpdate:modelValue": e[2] || (e[2] = (n) => I(m) ? m.value = n : null),
169
- placeholder: t(o)("menu.common.labels.search_placeholder", {
164
+ modelValue: n(m),
165
+ "onUpdate:modelValue": e[2] || (e[2] = (t) => I(m) ? m.value = t : null),
166
+ placeholder: n(a)("menu.common.labels.search_placeholder", {
170
167
  type: "variants"
171
168
  })
172
- }, null, 8, ["modelValue", "placeholder"])]), r("div", ce, [(u(!0), f(V, null, R(v.value, (n) => (u(), f("div", {
173
- key: n._id,
169
+ }, null, 8, ["modelValue", "placeholder"])]), r("div", ce, [(d(!0), f(V, null, R(v.value, (t) => (d(), f("div", {
170
+ key: t._id,
174
171
  class: L(["py-12 px-16", "flex space-x-8", "items-center", "cursor-pointer"]),
175
- onClick: () => t(d).updateVariant(n)
176
- }, [r("div", ue, [r("p", de, C(n.name), 1), r("div", null, [r("p", pe, C(t(o)("menu.common.labels.items_linked", {
177
- count: n.usedBy.length
178
- })), 1), r("p", fe, C(t(o)("menu.variant.mobile.value", {
179
- values: n.options.map((T) => T.name).join(", ")
172
+ onClick: () => n(u).updateVariant(t)
173
+ }, [r("div", de, [r("p", ue, C(t.name), 1), r("div", null, [r("p", pe, C(n(a)("menu.common.labels.items_linked", {
174
+ count: t.usedBy.length
175
+ })), 1), r("p", fe, C(n(a)("menu.variant.mobile.value", {
176
+ values: t.options.map((U) => U.name).join(", ")
180
177
  })), 1)])]), i(E, {
181
- variant: t(M).Tertiary,
178
+ variant: n(M).Tertiary,
182
179
  "prepend-icon": "delete",
183
180
  "text-color": "neutral-gray-400",
184
- onClick: w(() => t(d).deleteVariant(n), ["stop"])
185
- }, null, 8, ["variant", "onClick"])], 8, me))), 128))])], 64)) : (u(), f("div", le, [r("div", se, [r("div", re, [i(s, {
181
+ onClick: w(() => n(u).deleteVariant(t), ["stop"])
182
+ }, null, 8, ["variant", "onClick"])], 8, me))), 128))])], 64)) : (d(), f("div", le, [r("div", se, [r("div", re, [i(s, {
186
183
  autofocus: "",
187
- modelValue: t(m),
188
- "onUpdate:modelValue": e[0] || (e[0] = (n) => I(m) ? m.value = n : null),
189
- placeholder: t(o)("menu.common.labels.search_placeholder", {
184
+ modelValue: n(m),
185
+ "onUpdate:modelValue": e[0] || (e[0] = (t) => I(m) ? m.value = t : null),
186
+ placeholder: n(a)("menu.common.labels.search_placeholder", {
190
187
  type: "variants"
191
188
  })
192
- }, null, 8, ["modelValue", "placeholder"])])]), i(J, null, {
193
- default: p(() => [i(A, {
189
+ }, null, 8, ["modelValue", "placeholder"])])]), i(Q, null, {
190
+ default: p(() => [i(T, {
194
191
  "column-defs": l.value,
195
- loading: t(h).checkMenuIsLoading(),
192
+ loading: n(h).checkMenuIsLoading(),
196
193
  "page-size": v.value.length,
197
194
  "row-data": v.value,
198
195
  "shrink-at": !1,
199
196
  class: "flex-1 overflow-hidden",
200
197
  "hide-footer": "",
201
198
  "pin-header-row": "",
202
- onRowClick: e[1] || (e[1] = (n) => {
203
- t(d).updateVariant(n.original);
199
+ onRowClick: e[1] || (e[1] = (t) => {
200
+ n(u).updateVariant(t.original);
204
201
  })
205
202
  }, null, 8, ["column-defs", "loading", "page-size", "row-data"])]),
206
203
  _: 1
207
- })]))], 64)) : (u(), f("div", _e, [i(Z, {
208
- subtitle: t(o)("menu.variant.empty.subtitle"),
209
- title: t(o)("menu.variant.empty.title")
204
+ })]))], 64)) : (d(), f("div", _e, [i(ne, {
205
+ subtitle: n(a)("menu.variant.empty.subtitle"),
206
+ title: n(a)("menu.variant.empty.title")
210
207
  }, {
211
- action: p(() => [i(t(S), null, {
208
+ action: p(() => [i(n(S), null, {
212
209
  default: p(({
213
- trigger: n
210
+ trigger: t
214
211
  }) => [i(E, {
215
212
  "prepend-icon": "add",
216
- label: t(o)("menu.variant.add"),
217
- onClick: w(n, ["stop"])
213
+ label: n(a)("menu.variant.add"),
214
+ onClick: w(t, ["stop"])
218
215
  }, null, 8, ["label", "onClick"])]),
219
216
  _: 1
220
217
  })]),
@@ -226,5 +223,5 @@ const ae = ne("variant-manager", () => {
226
223
  }
227
224
  });
228
225
  export {
229
- Se as default
226
+ Ce as default
230
227
  };