@feedmepos/mf-menu 0.32.17-prod → 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 (81) hide show
  1. package/dist/App-Cfl37TTw.js +152661 -0
  2. package/dist/{Catalog-B02NvTIp.js → Catalog-Yxsb-D33.js} +47 -52
  3. package/dist/{Category-Ci6XGCQE.js → Category-0vJH8Ct0.js} +86 -92
  4. package/dist/{Category-COGQxaeR.js → Category-qp0wI14I.js} +25 -26
  5. package/dist/{CookingGuide-BWyPV6ad.js → CookingGuide-EpAr5F5U.js} +139 -143
  6. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-DkCAw-nl.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CkyD0sdI.js} +14 -16
  7. package/dist/{Group-DRporusW.js → Group-B3W9iSbO.js} +5 -5
  8. package/dist/{Group-D_eyMiHS.js → Group-DLCh0fDU.js} +1 -1
  9. package/dist/{Group.vue_vue_type_script_setup_true_lang-CJ_QkBFJ.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-DAMFUDli.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BFaAXp7r.js} +81 -88
  11. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BFDGNXtA.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CxP8lDD0.js} +230 -237
  12. package/dist/{Ingredient-CCOAtq6x.js → Ingredient-CVLMr_YB.js} +102 -105
  13. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-w9G4LRB7.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CdTC5ykI.js} +1058 -1059
  14. package/dist/{MenuSetting-C-t8hg1m.js → MenuSetting-Blpi1vSd.js} +58 -61
  15. package/dist/{PrintRoute-C2TWkEwm.js → PrintRoute-BS7PPPkE.js} +49 -52
  16. package/dist/{Product-CvDDiB1Q.js → Product-DDeNKQ7u.js} +1 -1
  17. package/dist/{Product.vue_vue_type_script_setup_true_lang-COmQsVeB.js → Product.vue_vue_type_script_setup_true_lang-rmv8m4_D.js} +286 -298
  18. package/dist/{ProductInternalTools-zA3vMBzV.js → ProductInternalTools-CVuothk9.js} +45 -46
  19. package/dist/{Products-DlxGLmkD.js → Products-BIvsHKEt.js} +71 -75
  20. package/dist/{Publish-qnmEJJ7J.js → Publish-CDADU3Pp.js} +154 -159
  21. package/dist/{Recipe-KARGNDXh.js → Recipe-CMhW7e_z.js} +40 -43
  22. package/dist/{Scheduler-Bo-Hv4fw.js → Scheduler-BpxunKBV.js} +7 -7
  23. package/dist/{ServingSequence-CbTYSCvC.js → ServingSequence-BQVuYyAB.js} +54 -58
  24. package/dist/{Setting-7FtAEnGE.js → Setting-Dj0yyP37.js} +63 -66
  25. package/dist/{Subcategory-DtUkoShD.js → Subcategory-BH4DDZM4.js} +72 -76
  26. package/dist/{Takeaway-BhTFixal.js → Takeaway-CGJBZ_sJ.js} +1 -1
  27. package/dist/{Takeaway-Gr9GCre8.js → Takeaway-DifOudVE.js} +20 -21
  28. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-OwmHTwdG.js → Takeaway.vue_vue_type_script_setup_true_lang-D-R5_S5G.js} +59 -64
  29. package/dist/{Unit-Dn_3GaCR.js → Unit-DXDox2Ut.js} +8 -8
  30. package/dist/{Variant-CwQ7f-ii.js → Variant-DbJVwgm5.js} +75 -78
  31. package/dist/{_id_-jxkngK66.js → _id_-RFYwWjbM.js} +34 -38
  32. package/dist/{app-DTr3CMpl.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/tsconfig.app.tsbuildinfo +1 -1
  36. package/dist/assets/{linked-status-DKTsXZ56.js → linked-status-CkmoJAm-.js} +2 -2
  37. package/dist/assets/{menu-export-D47qne53.js → menu-export-DcINiK28.js} +2 -2
  38. package/dist/assets/{override-menu-CUL3ygMK.js → override-menu-PUKiu-df.js} +2 -2
  39. package/dist/assets/{validate-menu-8wWvKEyO.js → validate-menu-CcqiRhNT.js} +2 -2
  40. package/dist/{catalogSetting-DziPWl8O.js → catalogSetting-Bf66H-j7.js} +1 -1
  41. package/dist/dayjs.min-DNPTnUFp.js +6 -0
  42. package/dist/{jszip.min-DiZSWmVy.js → jszip.min-CO2_Gf69.js} +245 -245
  43. package/dist/{menu-Bv2G2XDC.js → menu-Brxar171.js} +1 -1
  44. package/dist/mf-menu.css +1 -1
  45. package/dist/{scheduler-C15D-Ptm.js → scheduler-CqdIiE8G.js} +56 -60
  46. package/dist/{toExcel-CqpUcIAd.js → toExcel-CRJIU0NC.js} +2 -2
  47. package/dist/{unit-Cby_WUJC.js → unit-wYPYkm33.js} +98 -105
  48. package/package.json +1 -1
  49. package/dist/App-BLdG3yG_.js +0 -13484
  50. package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-BG5DdrV6.js +0 -161
  51. package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
  52. package/dist/LinkProductSideSheet-CnGdSkv6.js +0 -687
  53. package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +0 -69
  54. package/dist/RuleView.vue_vue_type_script_setup_true_lang-U6qSmI1-.js +0 -3285
  55. package/dist/TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js +0 -20
  56. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-BtKnlI5c.js +0 -399
  57. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Cp1E7qhU.js +0 -6016
  58. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  59. package/dist/app-5fxKLAzS.js +0 -8163
  60. package/dist/app-Dew0eGCF.js +0 -68
  61. package/dist/catalog-K52JHxqj.js +0 -199
  62. package/dist/category-YEpzAad_.js +0 -156
  63. package/dist/check-C9mY6LiX.js +0 -9
  64. package/dist/createComponentProgrammatically-Bt2rn1IQ.js +0 -11
  65. package/dist/currency-OxLDRHHy.js +0 -7
  66. package/dist/dayjs.min-Dwou9E9z.js +0 -6
  67. package/dist/discardConfirm-BHni0LNu.js +0 -28
  68. package/dist/index-BCDII2vQ.js +0 -273
  69. package/dist/index-BcUg07mo.js +0 -246
  70. package/dist/index-CisutoS9.js +0 -156
  71. package/dist/index-elG5LP03.js +0 -239
  72. package/dist/index.vue_vue_type_script_setup_true_lang-CSGbbn37.js +0 -109064
  73. package/dist/item-WEDSI-Pw.js +0 -6873
  74. package/dist/menuV2-Qbwwp3h5.js +0 -1052
  75. package/dist/object-DVUNCr7w.js +0 -16
  76. package/dist/priceTier-gEMtbmDv.js +0 -87
  77. package/dist/search-BAPEUu1R.js +0 -15
  78. package/dist/string-DpfFixWH.js +0 -4
  79. package/dist/subcategory-BF1n3a2C.js +0 -148
  80. package/dist/tooltip-B5BiPMx9.js +0 -32
  81. package/dist/vuedraggable-CK8z7qA8.js +0 -1728
@@ -1,12 +1,11 @@
1
- import { defineComponent as Z, ref as v, computed as $, resolveComponent as G, createElementBlock as c, openBlock as r, createElementVNode as s, createVNode as I, unref as h, createCommentVNode as T, normalizeClass as E, toDisplayString as U, createStaticVNode as B, Fragment as P, renderList as O, createBlock as oe, withCtx as R } from "vue";
2
- import { J as A, F as ne } from "./jszip.min-DiZSWmVy.js";
3
- import { G as le, u as ie, J as D, a1 as re, N as ce, O as de, P as me } from "./index.vue_vue_type_script_setup_true_lang-CSGbbn37.js";
4
- import { useI18n as ue } from "@feedmepos/mf-common";
5
- import { FmButtonVariant as z, useSnackbar as V, useDialog as ge, FmButtonColorThemeVariant as M } from "@feedmepos/ui-library";
6
- import { _ as pe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
- import { u as fe, a as he } from "./menu-Bv2G2XDC.js";
8
- import { a as ye } from "./Product.vue_vue_type_script_setup_true_lang-COmQsVeB.js";
9
- import { t as be, v as ve, w as _e } from "./item-WEDSI-Pw.js";
1
+ import { defineComponent as Z, ref as v, computed as $, resolveComponent as W, createElementBlock as c, openBlock as r, createElementVNode as s, createVNode as I, unref as h, createCommentVNode as T, normalizeClass as E, toDisplayString as U, createStaticVNode as B, Fragment as P, renderList as R, createBlock as oe, withCtx as A } from "vue";
2
+ import { J as O, F as ne } from "./jszip.min-CO2_Gf69.js";
3
+ import { a as le, u as ie, n as D, r as re, s as ce, t as de, v as me, w as ue, x as ge, y as pe } from "./App-Cfl37TTw.js";
4
+ import { useI18n as fe } from "@feedmepos/mf-common";
5
+ import { FmButtonVariant as z, useSnackbar as V, useDialog as he, FmButtonColorThemeVariant as M } from "@feedmepos/ui-library";
6
+ import { _ as ye } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
+ import { u as be, a as ve } from "./menu-Brxar171.js";
8
+ import { a as _e } from "./Product.vue_vue_type_script_setup_true_lang-rmv8m4_D.js";
10
9
  const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center justify-between p-16 border-b border-gray-200" }, Ie = { class: "flex gap-8" }, ke = { class: "border-b border-gray-200" }, Ce = { class: "flex" }, Ue = { class: "flex-1 overflow-hidden" }, je = {
11
10
  key: 0,
12
11
  class: "h-full flex flex-col"
@@ -19,16 +18,16 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
19
18
  }, Me = { class: "space-y-12" }, $e = { class: "fm-typo-en-body-sm font-medium" }, ze = { class: "flex" }, Pe = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden flex items-center justify-center" }, Le = ["src", "alt"], Ne = {
20
19
  key: 1,
21
20
  class: "text-gray-400 text-xs"
22
- }, Te = { class: "flex" }, Ee = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, Be = ["src", "alt"], Oe = {
21
+ }, Te = { class: "flex" }, Ee = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, Be = ["src", "alt"], Re = {
23
22
  key: 1,
24
23
  class: "h-full flex flex-col"
25
- }, Re = {
24
+ }, Ae = {
26
25
  key: 0,
27
26
  class: "flex-1 flex items-center justify-center"
28
- }, Ae = {
27
+ }, Oe = {
29
28
  key: 1,
30
29
  class: "flex-1 overflow-y-auto p-16"
31
- }, De = { class: "space-y-12" }, Ve = { class: "fm-typo-en-body-sm font-medium break-all" }, Ze = { class: "flex" }, Ge = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, Je = ["src", "alt"], We = /* @__PURE__ */ Z({
30
+ }, De = { class: "space-y-12" }, Ve = { class: "fm-typo-en-body-sm font-medium break-all" }, Ze = { class: "flex" }, We = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, qe = ["src", "alt"], Ge = /* @__PURE__ */ Z({
32
31
  __name: "ImageUpdatePreview",
33
32
  props: {
34
33
  matchedImages: {},
@@ -44,7 +43,7 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
44
43
  F("update", u.matchedImages);
45
44
  }
46
45
  return (w, l) => {
47
- const x = G("fm-button");
46
+ const x = W("fm-button");
48
47
  return r(), c("div", we, [
49
48
  s("div", xe, [
50
49
  l[2] || (l[2] = s("h2", { class: "fm-typo-en-headline-sm font-semibold" }, "Update Product Images", -1)),
@@ -92,7 +91,7 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
92
91
  s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "New Image")
93
92
  ], -1)),
94
93
  s("div", Me, [
95
- (r(!0), c(P, null, O(u.matchedImages, (m, C) => (r(), c("div", {
94
+ (r(!0), c(P, null, R(u.matchedImages, (m, C) => (r(), c("div", {
96
95
  key: C,
97
96
  class: "grid grid-cols-3 gap-16 py-12 border-b border-gray-100 items-center"
98
97
  }, [
@@ -119,27 +118,27 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
119
118
  ]))), 128))
120
119
  ])
121
120
  ]))
122
- ])) : y.value === "unmatched" ? (r(), c("div", Oe, [
123
- k.value === 0 ? (r(), c("div", Re, l[5] || (l[5] = [
121
+ ])) : y.value === "unmatched" ? (r(), c("div", Re, [
122
+ k.value === 0 ? (r(), c("div", Ae, l[5] || (l[5] = [
124
123
  B('<div class="text-center text-gray-500"><svg class="mx-auto h-48 w-48 text-gray-400 mb-16" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg><p class="fm-typo-en-body-lg text-gray-500">All images matched!</p><p class="fm-typo-en-body-sm text-gray-400 mt-4">No unmatched images found</p></div>', 1)
125
- ]))) : (r(), c("div", Ae, [
124
+ ]))) : (r(), c("div", Oe, [
126
125
  l[6] || (l[6] = s("div", { class: "grid grid-cols-2 gap-16 pb-12 border-b border-gray-200 mb-16" }, [
127
126
  s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Filename"),
128
127
  s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Image")
129
128
  ], -1)),
130
129
  s("div", De, [
131
- (r(!0), c(P, null, O(u.unmatchedImages, (m, C) => (r(), c("div", {
130
+ (r(!0), c(P, null, R(u.unmatchedImages, (m, C) => (r(), c("div", {
132
131
  key: C,
133
132
  class: "grid grid-cols-2 gap-16 py-12 border-b border-gray-100 items-center"
134
133
  }, [
135
134
  s("div", Ve, U(m.filename), 1),
136
135
  s("div", Ze, [
137
- s("div", Ge, [
136
+ s("div", We, [
138
137
  s("img", {
139
138
  src: m.imageUrl,
140
139
  alt: m.filename,
141
140
  class: "w-full h-full object-cover"
142
- }, null, 8, Je)
141
+ }, null, 8, qe)
143
142
  ])
144
143
  ])
145
144
  ]))), 128))
@@ -151,32 +150,32 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
151
150
  };
152
151
  }
153
152
  });
154
- var qe = { firebase: { storageBucket: "image.feedme.cc" } };
153
+ var Je = { firebase: { storageBucket: "image.feedmedev.cc" } };
155
154
  const He = {
156
155
  key: 0,
157
156
  class: "h-screen"
158
- }, Xe = { class: "flex-1 flex justify-between gap-8 pl-8" }, Ke = { class: "flex items-center" }, Qe = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ye = { class: "fm-typo-en-body-md-600 font-semibold" }, et = { class: "flex gap-8" }, dt = /* @__PURE__ */ Z({
157
+ }, Xe = { class: "flex-1 flex justify-between gap-8 pl-8" }, Ke = { class: "flex items-center" }, Qe = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ye = { class: "fm-typo-en-body-md-600 font-semibold" }, et = { class: "flex gap-8" }, ct = /* @__PURE__ */ Z({
159
158
  __name: "ProductInternalTools",
160
159
  setup(L) {
161
- const { t: j } = ue(), u = le(V()), F = V(), y = ge(), b = ie(), { selectedCategories: k } = fe(), _ = v(!1), S = v(), w = v([]), l = v([]), x = $(() => {
160
+ const { t: j } = fe(), u = le(V()), F = V(), y = he(), b = ie(), { selectedCategories: k } = be(), _ = v(!1), S = v(), w = v([]), l = v([]), x = $(() => {
162
161
  const e = D.flatten(k.value.map((a) => a.items));
163
162
  return D.uniqBy(e, (a) => a._id);
164
163
  }), m = $(() => x.value.length);
165
164
  async function C(e, a) {
166
- return await _e(e, {
165
+ return await me(e, {
167
166
  withTimestamp: !0,
168
167
  filename: a
169
168
  });
170
169
  }
171
- async function J(e, a = "images.zip") {
172
- const o = new A();
170
+ async function q(e, a = "images.zip") {
171
+ const o = new O();
173
172
  e.forEach(({ blob: d, filename: n }) => {
174
173
  d && o.file(n, d);
175
174
  });
176
175
  const g = await o.generateAsync({ type: "blob" });
177
176
  ne.saveAs(g, a);
178
177
  }
179
- async function W() {
178
+ async function G() {
180
179
  const e = x.value.filter((a) => a.thumbnail);
181
180
  if (e.length === 0) {
182
181
  F.open({ type: "error", title: "No downloadable images found" });
@@ -206,7 +205,7 @@ const He = {
206
205
  };
207
206
  });
208
207
  a.value = `Starting download of ${o.length} images...`;
209
- const d = (await be(o, C, {
208
+ const d = (await re(o, C, {
210
209
  batchSize: 5,
211
210
  // Download 5 images at a time
212
211
  batchDelay: 200,
@@ -215,7 +214,7 @@ const He = {
215
214
  })).filter((n) => n !== null);
216
215
  if (a.value = "Creating ZIP file...", d.length > 0) {
217
216
  const n = `images_${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.zip`;
218
- await J(d, n);
217
+ await q(d, n);
219
218
  } else
220
219
  throw new Error("Failed to fetch any images");
221
220
  },
@@ -227,8 +226,8 @@ const He = {
227
226
  );
228
227
  });
229
228
  }
230
- async function q(e) {
231
- const o = await new A().loadAsync(e), g = [];
229
+ async function J(e) {
230
+ const o = await new O().loadAsync(e), g = [];
232
231
  for (const [d, n] of Object.entries(o.files)) {
233
232
  if (n.dir || d.includes("__MACOSX/") || !N(d))
234
233
  continue;
@@ -262,7 +261,7 @@ const He = {
262
261
  const a = [];
263
262
  for (const t of e)
264
263
  if (t.type === "application/zip" || t.name.toLowerCase().endsWith(".zip")) {
265
- const i = await q(t);
264
+ const i = await J(t);
266
265
  a.push(...i);
267
266
  } else N(t.name) && a.push(t);
268
267
  const o = /* @__PURE__ */ new Map();
@@ -308,12 +307,12 @@ const He = {
308
307
  await u.minor(
309
308
  async () => {
310
309
  const o = async (t) => {
311
- const i = ce(t.productId);
310
+ const i = ue(t.productId);
312
311
  let f = "";
313
- return t.newImage && (await de.update(i, t.newImage, qe.firebase.storageBucket), f = me(i)), { productId: t.productId, newImageUrl: f };
312
+ return t.newImage && (await ge.update(i, t.newImage, Je.firebase.storageBucket), f = pe(i)), { productId: t.productId, newImageUrl: f };
314
313
  };
315
314
  a.value = `Starting upload of ${e.length} product images...`;
316
- const g = await ve({
315
+ const g = await ce({
317
316
  items: e,
318
317
  processor: o,
319
318
  batchSize: 5,
@@ -325,7 +324,7 @@ const He = {
325
324
  }
326
325
  });
327
326
  a.value = "Updating product data...";
328
- const d = b.state.menu, n = re(d), p = new Map(g.map((t) => [t == null ? void 0 : t.productId, t]));
327
+ const d = b.state.menu, n = de(d), p = new Map(g.map((t) => [t == null ? void 0 : t.productId, t]));
329
328
  n.modules.item = n.modules.item.map((t) => {
330
329
  const i = p.get(t._id);
331
330
  return i && i.newImageUrl ? { ...t, thumbnail: i.newImageUrl } : t;
@@ -353,24 +352,24 @@ const He = {
353
352
  }
354
353
  a.value = "";
355
354
  }
356
- return he().resetOnMount(), (e, a) => {
357
- const o = G("fm-button");
355
+ return ve().resetOnMount(), (e, a) => {
356
+ const o = W("fm-button");
358
357
  return r(), c(P, null, [
359
358
  _.value ? (r(), c("div", He, [
360
- I(We, {
359
+ I(Ge, {
361
360
  "matched-images": w.value,
362
361
  "unmatched-images": l.value,
363
362
  onCancel: te,
364
363
  onUpdate: ee
365
364
  }, null, 8, ["matched-images", "unmatched-images"])
366
- ])) : (r(), oe(pe, {
365
+ ])) : (r(), oe(ye, {
367
366
  key: 1,
368
367
  heading: h(j)("menu.productInternalTools.title")
369
368
  }, {
370
- default: R(() => [
371
- I(ye)
369
+ default: A(() => [
370
+ I(_e)
372
371
  ]),
373
- "append-heading": R(() => [
372
+ "append-heading": A(() => [
374
373
  s("div", Xe, [
375
374
  s("div", Ke, [
376
375
  s("div", Qe, [
@@ -383,7 +382,7 @@ const He = {
383
382
  "text-color": h(M).TypoSecondary,
384
383
  variant: h(z).Primary,
385
384
  label: "Download Images",
386
- onClick: W
385
+ onClick: G
387
386
  }, null, 8, ["bg-color", "text-color", "variant"]),
388
387
  I(o, {
389
388
  "bg-color": h(M).NeutralGray100,
@@ -411,5 +410,5 @@ const He = {
411
410
  }
412
411
  });
413
412
  export {
414
- dt as default
413
+ ct as default
415
414
  };
@@ -1,20 +1,16 @@
1
- import { defineComponent as E, computed as g, ref as O, resolveComponent as M, createBlock as y, openBlock as m, unref as e, withCtx as c, createElementVNode as i, toDisplayString as j, createVNode as o, createCommentVNode as G, createElementBlock as A, Fragment as P } from "vue";
2
- import { D as F } from "./dayjs.min-Dwou9E9z.js";
3
- import { J as oe, F as ne } from "./jszip.min-DiZSWmVy.js";
4
- import { u as J, G as W, B as R, H, A as Z, D as ae, I as re, J as U, K as se } from "./index.vue_vue_type_script_setup_true_lang-CSGbbn37.js";
5
- import { w as ie } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-BFDGNXtA.js";
6
- import { useCoreStore as K, useI18n as le } from "@feedmepos/mf-common";
7
- import { useDialog as Q, useDialogChild as ue, useSnackbar as X, useBreakpoints as ce, FmButtonVariant as $, FmButtonColorThemeVariant as h } from "@feedmepos/ui-library";
1
+ import { defineComponent as E, computed as g, ref as q, resolveComponent as M, createBlock as y, openBlock as m, unref as e, withCtx as c, createElementVNode as i, toDisplayString as O, createVNode as n, createCommentVNode as G, createElementBlock as P, Fragment as A } from "vue";
2
+ import { D as F } from "./dayjs.min-DNPTnUFp.js";
3
+ import { J as ne, F as oe } from "./jszip.min-CO2_Gf69.js";
4
+ import { u as J, a as W, i as R, j as U, e as Z, k as ae, l as re, c as se, n as z, o as ie, p as le, L as H, q as ue } from "./App-Cfl37TTw.js";
5
+ import { w as ce } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-CxP8lDD0.js";
6
+ import { useCoreStore as K, useI18n as me } from "@feedmepos/mf-common";
7
+ import { useDialog as Q, useDialogChild as de, useSnackbar as X, useBreakpoints as pe, FmButtonVariant as $, FmButtonColorThemeVariant as h } from "@feedmepos/ui-library";
8
8
  import { _ as V } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
9
- import { _ as me, a as z } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
10
- import { _ as de } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
11
- import { u as pe, a as fe } from "./menu-Bv2G2XDC.js";
12
- import { u as _e } from "./item-WEDSI-Pw.js";
13
- import { _ as L, a as ve } from "./Product.vue_vue_type_script_setup_true_lang-COmQsVeB.js";
14
- import { L as q } from "./LinkProductSideSheet-CnGdSkv6.js";
15
- import { _ as ge } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Cp1E7qhU.js";
16
- import { u as be } from "./Thumbnail.vue_vue_type_script_setup_true_lang-BtKnlI5c.js";
17
- import { m as ye } from "./toExcel-CqpUcIAd.js";
9
+ import { _ as _e, a as L } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
10
+ import { _ as fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
11
+ import { u as ve, a as ge } from "./menu-Brxar171.js";
12
+ import { _ as j, a as be } from "./Product.vue_vue_type_script_setup_true_lang-rmv8m4_D.js";
13
+ import { m as ye } from "./toExcel-CRJIU0NC.js";
18
14
  const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "flex justify-end gap-8" }, Se = /* @__PURE__ */ E({
19
15
  __name: "ConfirmActionDialog",
20
16
  props: {
@@ -23,19 +19,19 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
23
19
  message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
24
20
  },
25
21
  setup(C) {
26
- const t = C, S = g(() => t.message.replace("[[value]]", t.value)), k = O(""), r = Q(), { emitAction: x } = ue();
22
+ const t = C, S = g(() => t.message.replace("[[value]]", t.value)), k = q(""), r = Q(), { emitAction: x } = de();
27
23
  return (d, s) => {
28
- const p = M("FmTextField"), f = M("FmButton"), _ = M("FmForm");
29
- return m(), y(_, {
24
+ const p = M("FmTextField"), _ = M("FmButton"), f = M("FmForm");
25
+ return m(), y(f, {
30
26
  "on-validation-success": () => e(x)("primary"),
31
27
  "blame-form-child-on-validation-failed": ""
32
28
  }, {
33
29
  default: c(() => [
34
30
  i("div", ke, [
35
- i("div", null, j(d.description), 1),
31
+ i("div", null, O(d.description), 1),
36
32
  i("div", { innerHTML: S.value }, null, 8, xe),
37
33
  i("div", null, [
38
- o(p, {
34
+ n(p, {
39
35
  modelValue: k.value,
40
36
  "onUpdate:modelValue": [
41
37
  s[0] || (s[0] = (l) => k.value = l),
@@ -47,12 +43,12 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
47
43
  }, null, 8, ["modelValue", "placeholder", "rules"])
48
44
  ]),
49
45
  i("div", he, [
50
- o(f, {
46
+ n(_, {
51
47
  label: "Cancel",
52
48
  variant: "secondary",
53
49
  onClick: s[2] || (s[2] = (l) => e(r).close())
54
50
  }),
55
- o(f, {
51
+ n(_, {
56
52
  label: "Confirm",
57
53
  type: "submit"
58
54
  })
@@ -66,7 +62,7 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
66
62
  }), Me = /* @__PURE__ */ E({
67
63
  __name: "Migrate",
68
64
  setup(C) {
69
- const t = J(), S = K(), k = X(), { minor: r } = W(k), x = O(!1), d = Q();
65
+ const t = J(), S = K(), k = X(), { minor: r } = W(k), x = q(!1), d = Q();
70
66
  async function s() {
71
67
  p.value || x.value || d.open({
72
68
  title: "Migrate to new version",
@@ -92,12 +88,12 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
92
88
  });
93
89
  }
94
90
  const p = g(() => {
95
- const f = S.restaurants.value;
96
- if (!f.length) return "Required at least one restaurant to migrate";
97
- const _ = f.filter((b) => !b.posVersion || !R.Pos.canUse({ feature: H.F_FEATURE.enum.menuV4, posVersion: b.posVersion }));
98
- return _.length ? `Upgrade POS to V${R.Pos.minVersionToUse(H.F_FEATURE.enum.menuV4)} to use new menu: ${_.map((b) => b.profile.name).join(", ")}` : null;
91
+ const _ = S.restaurants.value;
92
+ if (!_.length) return "Required at least one restaurant to migrate";
93
+ const f = _.filter((b) => !b.posVersion || !R.Pos.canUse({ feature: U.F_FEATURE.enum.menuV4, posVersion: b.posVersion }));
94
+ return f.length ? `Upgrade POS to V${R.Pos.minVersionToUse(U.F_FEATURE.enum.menuV4)} to use new menu: ${f.map((b) => b.profile.name).join(", ")}` : null;
99
95
  });
100
- return g(() => p.value ? p.value : "Migrate your menu to new version to enjoy more features. Content of new menu will remain the same as current."), (f, _) => {
96
+ return g(() => p.value ? p.value : "Migrate your menu to new version to enjoy more features. Content of new menu will remain the same as current."), (_, f) => {
101
97
  const l = M("FmSnackbar");
102
98
  return !p.value && e(t).version !== e(Z.F_MENU_VERSION).enum.v4 ? (m(), y(l, {
103
99
  key: 0,
@@ -111,33 +107,33 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
111
107
  })) : G("", !0);
112
108
  };
113
109
  }
114
- }), we = "/assets/menu-export-D47qne53.js", Ce = { class: "flex-1 flex justify-between gap-8 pl-8" }, Fe = { class: "flex items-center" }, $e = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ve = { class: "fm-typo-en-body-md-600 font-semibold" }, Ee = { class: "flex gap-8" }, Je = /* @__PURE__ */ E({
110
+ }), we = "/assets/menu-export-DcINiK28.js", Ce = { class: "flex-1 flex justify-between gap-8 pl-8" }, Fe = { class: "flex items-center" }, $e = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ve = { class: "fm-typo-en-body-md-600 font-semibold" }, Ee = { class: "flex gap-8" }, je = /* @__PURE__ */ E({
115
111
  __name: "Products",
116
112
  setup(C) {
117
- const { t } = le(), S = K(), k = W(X()), r = J(), x = g(() => r.rules.item), d = _e(), s = g(() => !r.state.currentSchedulerId), { selectedCategories: p } = pe(), f = g(() => ({
118
- ...ae.menuV4ToV3(re(r.state.menu)),
113
+ const { t } = me(), S = K(), k = W(X()), r = J(), x = g(() => r.rules.item), d = ae(), s = g(() => !r.state.currentSchedulerId), { selectedCategories: p } = ve(), _ = g(() => ({
114
+ ...re.menuV4ToV3(se(r.state.menu)),
119
115
  _id: r.state.menu._id,
120
116
  _rev: r.state.menu._rev
121
- })), _ = g(() => {
122
- const u = U.flatten(p.value.map((n) => n.items));
123
- return U.uniqBy(u, (n) => n._id).length;
117
+ })), f = g(() => {
118
+ const u = z.flatten(p.value.map((o) => o.items));
119
+ return z.uniqBy(u, (o) => o._id).length;
124
120
  });
125
- async function l(u, n) {
126
- const v = new oe();
121
+ async function l(u, o) {
122
+ const v = new ne();
127
123
  for (let w = 0; w < u.length; w++)
128
- v.file(`${n[w]}.xlsx`, u[w]);
124
+ v.file(`${o[w]}.xlsx`, u[w]);
129
125
  const a = await v.generateAsync({ type: "blob" });
130
- ne.saveAs(a, `books_${F().format("DD-MM-YYYY_HH-mm")}.zip`);
126
+ oe.saveAs(a, `books_${F().format("DD-MM-YYYY_HH-mm")}.zip`);
131
127
  }
132
128
  async function b() {
133
129
  await k.minor(
134
130
  async () => {
135
131
  if (await r.readMenu(), r.version === Z.F_MENU_VERSION.enum.v4) {
136
- const u = r.state.menu, n = F().format("DD-MM-YYYY_HH-mm"), v = [
137
- `menu_${n}`,
138
- `addonGroup_${n}`,
139
- `itemLinkedAddon_${n}`
140
- ], a = await se(
132
+ const u = r.state.menu, o = F().format("DD-MM-YYYY_HH-mm"), v = [
133
+ `menu_${o}`,
134
+ `addonGroup_${o}`,
135
+ `itemLinkedAddon_${o}`
136
+ ], a = await ue(
141
137
  we,
142
138
  JSON.stringify({
143
139
  menu: u,
@@ -146,8 +142,8 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
146
142
  );
147
143
  await l(a, v);
148
144
  } else {
149
- const u = ye(f.value), n = `menu_${F().format("DD-MM-YYYY_HH-mm")}`;
150
- await ie(u, `${n}.xlsx`, {
145
+ const u = ye(_.value), o = `menu_${F().format("DD-MM-YYYY_HH-mm")}`;
146
+ await ce(u, `${o}.xlsx`, {
151
147
  bookType: "xlsx",
152
148
  bookSST: !0,
153
149
  type: "array",
@@ -160,38 +156,38 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
160
156
  }
161
157
  const {
162
158
  menuItems: T,
163
- categories: D,
164
- linkItemRules: I,
159
+ categories: I,
160
+ linkItemRules: D,
165
161
  handleSubmit: N,
166
162
  catalogManager: Y,
167
163
  schedulerManager: B
168
- } = be(!1), ee = ce(), te = g(() => ee.breakpoints.value.xs);
169
- return fe().resetOnMount(), (u, n) => {
164
+ } = ie(!1), ee = pe(), te = g(() => ee.breakpoints.value.xs);
165
+ return ge().resetOnMount(), (u, o) => {
170
166
  const v = M("fm-button");
171
- return m(), y(de, {
167
+ return m(), y(fe, {
172
168
  heading: e(t)("menu.products.title")
173
169
  }, {
174
170
  default: c(() => [
175
- o(Me),
176
- o(ve)
171
+ n(Me),
172
+ n(be)
177
173
  ]),
178
174
  "append-heading": c(() => [
179
175
  i("div", Ce, [
180
176
  i("div", Fe, [
181
177
  i("div", $e, [
182
- i("p", Ve, j(_.value), 1)
178
+ i("p", Ve, O(f.value), 1)
183
179
  ])
184
180
  ]),
185
181
  i("div", Ee, [
186
- te.value ? (m(), y(L, { key: 1 }, {
182
+ te.value ? (m(), y(j, { key: 1 }, {
187
183
  default: c(({ trigger: a }) => [
188
- o(me, null, {
184
+ n(_e, null, {
189
185
  default: c(() => [
190
- o(z, {
186
+ n(L, {
191
187
  label: e(t)("menu.products.actions.export"),
192
188
  onClick: b
193
189
  }, null, 8, ["label"]),
194
- o(z, {
190
+ n(L, {
195
191
  label: e(t)("menu.products.actions.import"),
196
192
  onClick: a
197
193
  }, null, 8, ["label", "onClick"])
@@ -200,10 +196,10 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
200
196
  }, 1024)
201
197
  ]),
202
198
  _: 1
203
- })) : (m(), A(P, { key: 0 }, [
204
- o(ge, null, {
199
+ })) : (m(), P(A, { key: 0 }, [
200
+ n(le, null, {
205
201
  default: c(({ trigger: a }) => [
206
- o(v, {
202
+ n(v, {
207
203
  label: e(t)("menu.tree_editor.title"),
208
204
  "bg-color": e(h).NeutralGray100,
209
205
  "text-color": e(h).TypoSecondary,
@@ -213,16 +209,16 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
213
209
  ]),
214
210
  _: 1
215
211
  }),
216
- o(v, {
212
+ n(v, {
217
213
  "bg-color": e(h).NeutralGray100,
218
214
  "text-color": e(h).TypoSecondary,
219
215
  variant: e($).Primary,
220
216
  label: e(t)("menu.products.actions.export"),
221
217
  onClick: b
222
218
  }, null, 8, ["bg-color", "text-color", "variant", "label"]),
223
- o(L, null, {
219
+ n(j, null, {
224
220
  default: c(({ trigger: a }) => [
225
- o(v, {
221
+ n(v, {
226
222
  "bg-color": e(h).NeutralGray100,
227
223
  "text-color": e(h).TypoSecondary,
228
224
  variant: e($).Primary,
@@ -233,44 +229,44 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
233
229
  _: 1
234
230
  })
235
231
  ], 64)),
236
- _.value > 0 ? (m(), A(P, { key: 2 }, [
232
+ f.value > 0 ? (m(), P(A, { key: 2 }, [
237
233
  x.value.create ? (m(), y(V, {
238
234
  key: 0,
239
235
  label: e(t)("menu.products.actions.add"),
240
236
  "prepend-icon": "add",
241
- onClick: n[0] || (n[0] = (a) => e(d).create(null))
242
- }, null, 8, ["label"])) : s.value ? (m(), y(q, {
237
+ onClick: o[0] || (o[0] = (a) => e(d).create(null))
238
+ }, null, 8, ["label"])) : s.value ? (m(), y(H, {
243
239
  key: 1,
244
240
  "categorized-items": e(Y).linkableItems.value,
245
241
  "initial-value": e(Y).currentItems.value,
246
242
  "show-variant": !1,
247
243
  "menu-items": e(T),
248
- categories: e(D),
249
- "link-item-rules": e(I),
244
+ categories: e(I),
245
+ "link-item-rules": e(D),
250
246
  "no-scheduler": s.value,
251
247
  onSubmit: e(N)
252
248
  }, {
253
249
  default: c(({ trigger: a }) => [
254
- o(V, {
250
+ n(V, {
255
251
  label: e(t)("menu.products.actions.link"),
256
252
  "prepend-icon": "link",
257
253
  onClick: a
258
254
  }, null, 8, ["label", "onClick"])
259
255
  ]),
260
256
  _: 1
261
- }, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : (m(), y(q, {
257
+ }, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : (m(), y(H, {
262
258
  key: 2,
263
259
  "categorized-items": e(B).linkableItems.value,
264
260
  "initial-value": e(B).currentItems.value,
265
261
  "show-variant": !1,
266
262
  "menu-items": e(T),
267
- categories: e(D),
268
- "link-item-rules": e(I),
263
+ categories: e(I),
264
+ "link-item-rules": e(D),
269
265
  "no-scheduler": s.value,
270
266
  onSubmit: e(N)
271
267
  }, {
272
268
  default: c(({ trigger: a }) => [
273
- o(V, {
269
+ n(V, {
274
270
  label: e(t)("menu.products.actions.apply_scheduler"),
275
271
  onClick: a
276
272
  }, null, 8, ["label", "onClick"])
@@ -287,5 +283,5 @@ const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "fle
287
283
  }
288
284
  });
289
285
  export {
290
- Je as default
286
+ je as default
291
287
  };