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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/{App-CrQBq4gc.js → App-1TX8v7ZA.js} +10 -8
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-D00UOSsK.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CR7QrFUG.js} +12 -12
  3. package/dist/{Catalog-D4m8x_f2.js → Catalog-DWClc58s.js} +75 -74
  4. package/dist/{Category-sQll5ITQ.js → Category-BqKFvFam.js} +60 -60
  5. package/dist/{Category-Ql1kDDH-.js → Category-IYMtMoT-.js} +28 -28
  6. package/dist/{CookingGuide-CSutufcu.js → CookingGuide-BayJ6zj4.js} +103 -101
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BqhYFXNG.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Ceq86b3d.js} +1 -1
  8. package/dist/{Group-CnBE6CiB.js → Group-LqSX7ue6.js} +1 -1
  9. package/dist/{Group-YqVh5hC0.js → Group-RujTPTns.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-D9TSH4sS.js → Group.vue_vue_type_script_setup_true_lang-Dj9ZmkYe.js} +138 -137
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CqriuXVC.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D5GWkh3G.js} +16 -16
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CaIU0RsG.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C4IrA3es.js} +4616 -4610
  13. package/dist/{Ingredient-MhLxJzAU.js → Ingredient-_tc8llr1.js} +65 -64
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CIbExsMI.js → InventoryBinding.vue_vue_type_script_setup_true_lang-DLFDf-VZ.js} +14 -12
  15. package/dist/{LinkProductSideSheet-D7vYZbFy.js → LinkProductSideSheet-C6rF-G1v.js} +14 -12
  16. package/dist/{MenuSetting-n0me5wY8.js → MenuSetting-xDHeeROY.js} +27 -26
  17. package/dist/{PrintRoute-CudZZYbe.js → PrintRoute-B_TFMn5e.js} +17 -15
  18. package/dist/{Product-DPZQgWET.js → Product-DdEEqrtc.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-CdaeZy_o.js → Product.vue_vue_type_script_setup_true_lang-zcistmwh.js} +257 -256
  20. package/dist/{ProductInternalTools-DgANHliV.js → ProductInternalTools-BcC7BF6W.js} +45 -45
  21. package/dist/{Products-Ez4R3jKW.js → Products-Cu0cJshV.js} +74 -72
  22. package/dist/{Publish-B4DEPe1I.js → Publish-Bm3Xiks1.js} +34 -32
  23. package/dist/{Recipe-Cripr-gY.js → Recipe-DWK-luIZ.js} +65 -63
  24. package/dist/{Scheduler-C-OV9d7d.js → Scheduler-Cb1TeBhW.js} +19 -19
  25. package/dist/{ServingSequence-DAumDXP1.js → ServingSequence-evSIET_8.js} +34 -34
  26. package/dist/{Setting-ByaHpIAN.js → Setting-Cn3kwC9F.js} +54 -53
  27. package/dist/{Subcategory-ro2aGt2H.js → Subcategory-q4m4qHsU.js} +34 -34
  28. package/dist/{Takeaway-CJb0ayDC.js → Takeaway-ClepHYGu.js} +14 -14
  29. package/dist/{Takeaway-AEg_0gKg.js → Takeaway-D-rdUZuh.js} +1 -1
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Cjj4bxoL.js → Takeaway.vue_vue_type_script_setup_true_lang-y9Yxstu2.js} +41 -40
  31. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Drf4n4rj.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BSeLfoOA.js} +1108 -1106
  32. package/dist/{Unit-1wzUBplb.js → Unit-IM8Naj82.js} +12 -12
  33. package/dist/{Variant-Dnz2v5u0.js → Variant-fzGvwaMo.js} +16 -16
  34. package/dist/{_id_-C3rBZ6zL.js → _id_-BsKNG9Qv.js} +22 -22
  35. package/dist/{app-sDPxNF11.js → app-BzQRUMTK.js} +3 -3
  36. package/dist/{app-CLY6CoaV.js → app-CoVUUCa_.js} +24 -24
  37. package/dist/app.js +1 -1
  38. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  39. package/dist/assets/{linked-status-BZ4FSJ_Z.js → linked-status-eQqjvOq_.js} +2 -2
  40. package/dist/assets/{override-menu-C-fWJdVd.js → override-menu-C8NTBJgN.js} +2 -2
  41. package/dist/assets/{validate-menu-BDEM_Odz.js → validate-menu-Dn-OO7Ed.js} +2 -2
  42. package/dist/{catalog-bkFntZNz.js → catalog-CaXceaA2.js} +1 -1
  43. package/dist/{catalogSetting-zrKwGJ_C.js → catalogSetting-BGvckFdh.js} +1 -1
  44. package/dist/{category-BuPYaEsy.js → category-u5eo_Vjd.js} +5 -3
  45. package/dist/currency-BPHwez-E.js +7 -0
  46. package/dist/{dayjs.min-CR2NIyKn.js → dayjs.min-Bsr3tJCn.js} +1 -1
  47. package/dist/{index-BNORpjos.js → index-Bbx4iZ6n.js} +27 -27
  48. package/dist/{index-Dp_vLFQp.js → index-DSAG0yWh.js} +22 -20
  49. package/dist/{index-D20u0bCl.js → index-tRQb7RN_.js} +1 -1
  50. package/dist/{item-D4DcBt7N.js → item-BAqzKh4O.js} +801 -799
  51. package/dist/{jszip.min-CRJ61J9H.js → jszip.min-BKJtvCjM.js} +353 -353
  52. package/dist/{menu-Dw-Hpy07.js → menu-CDrsBjmr.js} +11 -9
  53. package/dist/menu-CsIzrBEr.js +74044 -0
  54. package/dist/packages/shared/src/permission/posPermission.d.ts +6 -0
  55. package/dist/{priceTier-EDLTGEjz.js → priceTier-DfbHonGe.js} +4 -4
  56. package/dist/{scheduler-CpPn2BlK.js → scheduler-DTWaBudB.js} +13 -11
  57. package/dist/{subcategory-B_W6vbM8.js → subcategory-D-R5r1Tr.js} +86 -84
  58. package/dist/{toExcel-D02OlDJu.js → toExcel-84VTtSA7.js} +2 -2
  59. package/dist/{unit-fro9wz1K.js → unit-B4zscxzo.js} +24 -23
  60. package/package.json +1 -1
  61. package/dist/currency-BISImIgX.js +0 -7
  62. package/dist/menu-ibc-yXVt.js +0 -107745
@@ -1,34 +1,34 @@
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-CRJ61J9H.js";
3
- import { D as le, u as ie, I as D, a1 as re, a0 as ce, K as de, M as me, N as ue } from "./menu-ibc-yXVt.js";
1
+ import { defineComponent as Z, ref as v, computed as M, 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 A, createBlock as oe, withCtx as R } from "vue";
2
+ import { J as O, F as ne } from "./jszip.min-BKJtvCjM.js";
3
+ import { A as le, u as ie, G as D, $ as re, Z as ce, I as de, J as me, K as ue } from "./menu-CsIzrBEr.js";
4
4
  import { useI18n as ge } from "@feedmepos/mf-common";
5
- import { FmButtonVariant as z, useSnackbar as V, useDialog as pe, FmButtonColorThemeVariant as S } from "@feedmepos/ui-library";
5
+ import { FmButtonVariant as z, useSnackbar as V, useDialog as pe, FmButtonColorThemeVariant as $ } from "@feedmepos/ui-library";
6
6
  import { _ as fe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
- import { u as he, a as ye } from "./menu-Dw-Hpy07.js";
8
- import { a as be } from "./Product.vue_vue_type_script_setup_true_lang-CdaeZy_o.js";
9
- import { v as ve, w as _e } from "./item-D4DcBt7N.js";
7
+ import { u as he, a as ye } from "./menu-CDrsBjmr.js";
8
+ import { a as be } from "./Product.vue_vue_type_script_setup_true_lang-zcistmwh.js";
9
+ import { v as ve, w as _e } from "./item-BAqzKh4O.js";
10
10
  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
11
  key: 0,
12
12
  class: "h-full flex flex-col"
13
13
  }, Fe = {
14
14
  key: 0,
15
15
  class: "flex-1 flex items-center justify-center"
16
- }, Me = {
16
+ }, Se = {
17
17
  key: 1,
18
18
  class: "flex-1 overflow-y-auto p-16"
19
- }, Se = { 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 = {
19
+ }, $e = { class: "space-y-12" }, Me = { 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
20
  key: 1,
21
21
  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"], Re = {
22
+ }, Te = { class: "flex" }, Ee = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, Be = ["src", "alt"], Ae = {
23
23
  key: 1,
24
24
  class: "h-full flex flex-col"
25
- }, Ae = {
25
+ }, Re = {
26
26
  key: 0,
27
27
  class: "flex-1 flex items-center justify-center"
28
28
  }, Oe = {
29
29
  key: 1,
30
30
  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" }, We = { class: "w-64 h-64 bg-gray-100 rounded-8 overflow-hidden" }, qe = ["src", "alt"], Ge = /* @__PURE__ */ Z({
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({
32
32
  __name: "ImageUpdatePreview",
33
33
  props: {
34
34
  matchedImages: {},
@@ -36,15 +36,15 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
36
36
  },
37
37
  emits: ["cancel", "update"],
38
38
  setup(L, { emit: j }) {
39
- const u = L, F = j, y = v("matched"), b = $(() => u.matchedImages.length), k = $(() => u.unmatchedImages.length);
39
+ const u = L, F = j, y = v("matched"), b = M(() => u.matchedImages.length), k = M(() => u.unmatchedImages.length);
40
40
  function _() {
41
41
  F("cancel");
42
42
  }
43
- function M() {
43
+ function S() {
44
44
  F("update", u.matchedImages);
45
45
  }
46
46
  return (w, l) => {
47
- const x = W("fm-button");
47
+ const x = G("fm-button");
48
48
  return r(), c("div", we, [
49
49
  s("div", xe, [
50
50
  l[2] || (l[2] = s("h2", { class: "fm-typo-en-headline-sm font-semibold" }, "Update Product Images", -1)),
@@ -58,7 +58,7 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
58
58
  variant: h(z).Primary,
59
59
  label: "Update",
60
60
  disabled: b.value === 0,
61
- onClick: M
61
+ onClick: S
62
62
  }, null, 8, ["variant", "disabled"])
63
63
  ])
64
64
  ]),
@@ -85,18 +85,18 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
85
85
  y.value === "matched" ? (r(), c("div", je, [
86
86
  b.value === 0 ? (r(), c("div", Fe, l[3] || (l[3] = [
87
87
  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="M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"></path></svg><p class="fm-typo-en-body-lg text-gray-500">No matched images found</p><p class="fm-typo-en-body-sm text-gray-400 mt-4"> Make sure your image filenames match product names </p></div>', 1)
88
- ]))) : (r(), c("div", Me, [
88
+ ]))) : (r(), c("div", Se, [
89
89
  l[4] || (l[4] = s("div", { class: "grid grid-cols-3 gap-16 pb-12 border-b border-gray-200 mb-16" }, [
90
90
  s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Product Name"),
91
91
  s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Current Image"),
92
92
  s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "New Image")
93
93
  ], -1)),
94
- s("div", Se, [
95
- (r(!0), c(P, null, R(u.matchedImages, (m, C) => (r(), c("div", {
94
+ s("div", $e, [
95
+ (r(!0), c(P, null, A(u.matchedImages, (m, C) => (r(), c("div", {
96
96
  key: C,
97
97
  class: "grid grid-cols-3 gap-16 py-12 border-b border-gray-100 items-center"
98
98
  }, [
99
- s("div", $e, U(m.productName), 1),
99
+ s("div", Me, U(m.productName), 1),
100
100
  s("div", ze, [
101
101
  s("div", Pe, [
102
102
  m.originalThumbnail ? (r(), c("img", {
@@ -119,8 +119,8 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
119
119
  ]))), 128))
120
120
  ])
121
121
  ]))
122
- ])) : y.value === "unmatched" ? (r(), c("div", Re, [
123
- k.value === 0 ? (r(), c("div", Ae, l[5] || (l[5] = [
122
+ ])) : y.value === "unmatched" ? (r(), c("div", Ae, [
123
+ k.value === 0 ? (r(), c("div", Re, l[5] || (l[5] = [
124
124
  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
125
  ]))) : (r(), c("div", Oe, [
126
126
  l[6] || (l[6] = s("div", { class: "grid grid-cols-2 gap-16 pb-12 border-b border-gray-200 mb-16" }, [
@@ -128,18 +128,18 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
128
128
  s("div", { class: "fm-typo-en-body-sm-600 font-semibold text-gray-700" }, "Image")
129
129
  ], -1)),
130
130
  s("div", De, [
131
- (r(!0), c(P, null, R(u.unmatchedImages, (m, C) => (r(), c("div", {
131
+ (r(!0), c(P, null, A(u.unmatchedImages, (m, C) => (r(), c("div", {
132
132
  key: C,
133
133
  class: "grid grid-cols-2 gap-16 py-12 border-b border-gray-100 items-center"
134
134
  }, [
135
135
  s("div", Ve, U(m.filename), 1),
136
136
  s("div", Ze, [
137
- s("div", We, [
137
+ s("div", Ge, [
138
138
  s("img", {
139
139
  src: m.imageUrl,
140
140
  alt: m.filename,
141
141
  class: "w-full h-full object-cover"
142
- }, null, 8, qe)
142
+ }, null, 8, Je)
143
143
  ])
144
144
  ])
145
145
  ]))), 128))
@@ -151,24 +151,24 @@ const we = { class: "h-full flex flex-col" }, xe = { class: "flex items-center j
151
151
  };
152
152
  }
153
153
  });
154
- var Je = { firebase: { storageBucket: "image.feedmedev.cc" } };
154
+ var qe = { firebase: { storageBucket: "image.feedmedev.cc" } };
155
155
  const He = {
156
156
  key: 0,
157
157
  class: "h-screen"
158
158
  }, Ke = { class: "flex-1 flex justify-between gap-8 pl-8" }, Xe = { 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({
159
159
  __name: "ProductInternalTools",
160
160
  setup(L) {
161
- const { t: j } = ge(), u = le(V()), F = V(), y = pe(), b = ie(), { selectedCategories: k } = he(), _ = v(!1), M = v(), w = v([]), l = v([]), x = $(() => {
161
+ const { t: j } = ge(), u = le(V()), F = V(), y = pe(), b = ie(), { selectedCategories: k } = he(), _ = v(!1), S = v(), w = v([]), l = v([]), x = M(() => {
162
162
  const e = D.flatten(k.value.map((a) => a.items));
163
163
  return D.uniqBy(e, (a) => a._id);
164
- }), m = $(() => x.value.length);
164
+ }), m = M(() => x.value.length);
165
165
  async function C(e, a) {
166
166
  return await _e(e, {
167
167
  withTimestamp: !0,
168
168
  filename: a
169
169
  });
170
170
  }
171
- async function q(e, a = "images.zip") {
171
+ async function J(e, a = "images.zip") {
172
172
  const o = new O();
173
173
  e.forEach(({ blob: d, filename: n }) => {
174
174
  d && o.file(n, d);
@@ -176,7 +176,7 @@ const He = {
176
176
  const g = await o.generateAsync({ type: "blob" });
177
177
  ne.saveAs(g, a);
178
178
  }
179
- async function G() {
179
+ async function W() {
180
180
  const e = x.value.filter((a) => a.thumbnail);
181
181
  if (e.length === 0) {
182
182
  F.open({ type: "error", title: "No downloadable images found" });
@@ -215,7 +215,7 @@ const He = {
215
215
  })).filter((n) => n !== null);
216
216
  if (a.value = "Creating ZIP file...", d.length > 0) {
217
217
  const n = `images_${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.zip`;
218
- await q(d, n);
218
+ await J(d, n);
219
219
  } else
220
220
  throw new Error("Failed to fetch any images");
221
221
  },
@@ -227,7 +227,7 @@ const He = {
227
227
  );
228
228
  });
229
229
  }
230
- async function J(e) {
230
+ async function q(e) {
231
231
  const o = await new O().loadAsync(e), g = [];
232
232
  for (const [d, n] of Object.entries(o.files)) {
233
233
  if (n.dir || d.includes("__MACOSX/") || !N(d))
@@ -262,7 +262,7 @@ const He = {
262
262
  const a = [];
263
263
  for (const t of e)
264
264
  if (t.type === "application/zip" || t.name.toLowerCase().endsWith(".zip")) {
265
- const i = await J(t);
265
+ const i = await q(t);
266
266
  a.push(...i);
267
267
  } else N(t.name) && a.push(t);
268
268
  const o = /* @__PURE__ */ new Map();
@@ -310,7 +310,7 @@ const He = {
310
310
  const o = async (t) => {
311
311
  const i = de(t.productId);
312
312
  let f = "";
313
- return t.newImage && (await me.update(i, t.newImage, Je.firebase.storageBucket), f = ue(i)), { productId: t.productId, newImageUrl: f };
313
+ return t.newImage && (await me.update(i, t.newImage, qe.firebase.storageBucket), f = ue(i)), { productId: t.productId, newImageUrl: f };
314
314
  };
315
315
  a.value = `Starting upload of ${e.length} product images...`;
316
316
  const g = await re({
@@ -343,7 +343,7 @@ const He = {
343
343
  }
344
344
  function ae() {
345
345
  var e;
346
- (e = M.value) == null || e.click();
346
+ (e = S.value) == null || e.click();
347
347
  }
348
348
  function se(e) {
349
349
  const a = e.target;
@@ -354,10 +354,10 @@ const He = {
354
354
  a.value = "";
355
355
  }
356
356
  return ye().resetOnMount(), (e, a) => {
357
- const o = W("fm-button");
357
+ const o = G("fm-button");
358
358
  return r(), c(P, null, [
359
359
  _.value ? (r(), c("div", He, [
360
- I(Ge, {
360
+ I(We, {
361
361
  "matched-images": w.value,
362
362
  "unmatched-images": l.value,
363
363
  onCancel: te,
@@ -367,10 +367,10 @@ const He = {
367
367
  key: 1,
368
368
  heading: h(j)("menu.productInternalTools.title")
369
369
  }, {
370
- default: A(() => [
370
+ default: R(() => [
371
371
  I(be)
372
372
  ]),
373
- "append-heading": A(() => [
373
+ "append-heading": R(() => [
374
374
  s("div", Ke, [
375
375
  s("div", Xe, [
376
376
  s("div", Qe, [
@@ -379,15 +379,15 @@ const He = {
379
379
  ]),
380
380
  s("div", et, [
381
381
  I(o, {
382
- "bg-color": h(S).NeutralGray100,
383
- "text-color": h(S).TypoSecondary,
382
+ "bg-color": h($).NeutralGray100,
383
+ "text-color": h($).TypoSecondary,
384
384
  variant: h(z).Primary,
385
385
  label: "Download Images",
386
- onClick: G
386
+ onClick: W
387
387
  }, null, 8, ["bg-color", "text-color", "variant"]),
388
388
  I(o, {
389
- "bg-color": h(S).NeutralGray100,
390
- "text-color": h(S).TypoSecondary,
389
+ "bg-color": h($).NeutralGray100,
390
+ "text-color": h($).TypoSecondary,
391
391
  variant: h(z).Primary,
392
392
  label: "Update Images",
393
393
  onClick: ae
@@ -399,7 +399,7 @@ const He = {
399
399
  }, 8, ["heading"])),
400
400
  s("input", {
401
401
  ref_key: "fileInput",
402
- ref: M,
402
+ ref: S,
403
403
  type: "file",
404
404
  multiple: "",
405
405
  accept: "image/*,.zip",
@@ -1,20 +1,22 @@
1
- import { defineComponent as Y, computed as g, ref as z, resolveComponent as h, createBlock as y, openBlock as d, unref as e, withCtx as m, createElementVNode as u, toDisplayString as U, createVNode as a, createCommentVNode as L, createElementBlock as D, Fragment as T } from "vue";
2
- import { D as C } from "./dayjs.min-CR2NIyKn.js";
3
- import { u as W, a as X, M as ee, w as te } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-CaIU0RsG.js";
4
- import { J as oe, F as ne } from "./jszip.min-CRJ61J9H.js";
5
- import { u as q, D as G, A as I, e as H, G as O, B as ae, H as N, I as B } from "./menu-ibc-yXVt.js";
1
+ import { defineComponent as Y, computed as g, ref as R, resolveComponent as h, createBlock as y, openBlock as d, unref as e, withCtx as c, createElementVNode as u, toDisplayString as L, createVNode as a, createCommentVNode as U, createElementBlock as T, Fragment as E } from "vue";
2
+ import { D as C } from "./dayjs.min-Bsr3tJCn.js";
3
+ import { u as W, a as X, M as ee, w as te } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-C4IrA3es.js";
4
+ import { J as oe, F as ne } from "./jszip.min-BKJtvCjM.js";
5
+ import { u as q, A as G, B as O, z as ae, D as I, G as N } from "./menu-CsIzrBEr.js";
6
6
  import { useCoreStore as re, useI18n as se } from "@feedmepos/mf-common";
7
- import { useDialog as j, useDialogChild as ie, useSnackbar as J, useBreakpoints as le, FmButtonVariant as $, FmButtonColorThemeVariant as M } from "@feedmepos/ui-library";
8
- import { _ as V } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
9
- import { _ as ue, a as P } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
10
- import { _ as ce } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
11
- import { u as me, a as de } from "./menu-Dw-Hpy07.js";
12
- import { u as pe } from "./item-D4DcBt7N.js";
13
- import { _ as A, a as fe } from "./Product.vue_vue_type_script_setup_true_lang-CdaeZy_o.js";
14
- import { L as R } from "./LinkProductSideSheet-D7vYZbFy.js";
15
- import { _ as _e } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Drf4n4rj.js";
16
- import { m as ve } from "./toExcel-D02OlDJu.js";
17
- const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "flex justify-end gap-8" }, xe = /* @__PURE__ */ Y({
7
+ import { useDialog as j, useDialogChild as ie, useSnackbar as J, useBreakpoints as le, FmButtonVariant as V, FmButtonColorThemeVariant as M } from "@feedmepos/ui-library";
8
+ import { _ as $ } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
9
+ import { _ as ue, a as B } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
10
+ import { _ as me } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
11
+ import { u as ce, a as de } from "./menu-CDrsBjmr.js";
12
+ import { u as pe } from "./item-BAqzKh4O.js";
13
+ import { _ as H, a as fe } from "./Product.vue_vue_type_script_setup_true_lang-zcistmwh.js";
14
+ import { L as P } from "./LinkProductSideSheet-C6rF-G1v.js";
15
+ import { _ as _e } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BSeLfoOA.js";
16
+ import { Pos as z } from "@feedmepos/core";
17
+ import { F_FEATURE as A } from "@feedmepos/core/entity";
18
+ import { m as ve } from "./toExcel-84VTtSA7.js";
19
+ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "flex justify-end gap-8" }, ke = /* @__PURE__ */ Y({
18
20
  __name: "ConfirmActionDialog",
19
21
  props: {
20
22
  description: {},
@@ -22,16 +24,16 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
22
24
  message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
23
25
  },
24
26
  setup(F) {
25
- const t = F, S = g(() => t.message.replace("[[value]]", t.value)), r = z(""), w = j(), { emitAction: x } = ie();
27
+ const t = F, S = g(() => t.message.replace("[[value]]", t.value)), r = R(""), w = j(), { emitAction: k } = ie();
26
28
  return (p, s) => {
27
29
  const i = h("FmTextField"), f = h("FmButton"), b = h("FmForm");
28
30
  return d(), y(b, {
29
- "on-validation-success": () => e(x)("primary"),
31
+ "on-validation-success": () => e(k)("primary"),
30
32
  "blame-form-child-on-validation-failed": ""
31
33
  }, {
32
- default: m(() => [
34
+ default: c(() => [
33
35
  u("div", ge, [
34
- u("div", null, U(p.description), 1),
36
+ u("div", null, L(p.description), 1),
35
37
  u("div", { innerHTML: S.value }, null, 8, be),
36
38
  u("div", null, [
37
39
  a(i, {
@@ -62,14 +64,14 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
62
64
  }, 8, ["on-validation-success"]);
63
65
  };
64
66
  }
65
- }), ke = /* @__PURE__ */ Y({
67
+ }), xe = /* @__PURE__ */ Y({
66
68
  __name: "Migrate",
67
69
  setup(F) {
68
- const t = q(), S = re(), r = J(), { minor: w } = G(r), x = z(!1), p = j();
70
+ const t = q(), S = re(), r = J(), { minor: w } = G(r), k = R(!1), p = j();
69
71
  async function s() {
70
- i.value || x.value || p.open({
72
+ i.value || k.value || p.open({
71
73
  title: "Migrate to new version",
72
- contentComponent: xe,
74
+ contentComponent: ke,
73
75
  contentComponentProps: {
74
76
  value: "MIGRATE",
75
77
  description: "Do you want to migrate to new version? Once migrate it will unable to revert to the older version."
@@ -82,7 +84,7 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
82
84
  }, 2e3);
83
85
  },
84
86
  {
85
- isLoading: x,
87
+ isLoading: k,
86
88
  customId: t.state.menu._id,
87
89
  message: "Migrating menu",
88
90
  successMessage: "Migration completed"
@@ -93,8 +95,8 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
93
95
  const i = g(() => {
94
96
  const f = S.restaurants.value;
95
97
  if (!f.length) return "Required at least one restaurant to migrate";
96
- const b = f.filter((k) => !k.posVersion || !I.Pos.canUse({ feature: H.F_FEATURE.enum.menuV4, posVersion: k.posVersion }));
97
- return b.length ? `Upgrade POS to V${I.Pos.minVersionToUse(H.F_FEATURE.enum.menuV4)} to use new menu: ${b.map((k) => k.profile.name).join(", ")}` : null;
98
+ const b = f.filter((x) => !x.posVersion || !z.canUse({ feature: A.enum.menuV4, posVersion: x.posVersion }));
99
+ return b.length ? `Upgrade POS to V${z.minVersionToUse(A.enum.menuV4)} to use new menu: ${b.map((x) => x.profile.name).join(", ")}` : null;
98
100
  });
99
101
  return g(() => i.value ? i.value : "Migrate your menu to new version to enjoy more features. Content of new menu will remain the same as current."), (f, b) => {
100
102
  const l = h("FmSnackbar");
@@ -107,42 +109,42 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
107
109
  action: "Migrate",
108
110
  "z-index": 0,
109
111
  onOnAction: s
110
- })) : L("", !0);
112
+ })) : U("", !0);
111
113
  };
112
114
  }
113
- }), Me = { class: "flex-1 flex justify-between gap-8 pl-8" }, Se = { class: "flex items-center" }, we = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ce = { class: "fm-typo-en-body-md-600 font-semibold" }, he = { class: "flex gap-8" }, Le = /* @__PURE__ */ Y({
115
+ }), Me = { class: "flex-1 flex justify-between gap-8 pl-8" }, Se = { class: "flex items-center" }, we = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ce = { class: "fm-typo-en-body-md-600 font-semibold" }, he = { class: "flex gap-8" }, Ge = /* @__PURE__ */ Y({
114
116
  __name: "Products",
115
117
  setup(F) {
116
- const { t } = se(), S = G(J()), r = q(), w = g(() => r.rules.item), x = pe(), p = g(() => !r.state.currentSchedulerId), s = W(), i = X(), { selectedCategories: f } = me(), b = g(() => ({
117
- ...ae.menuV4ToV3(N(r.state.menu)),
118
+ const { t } = se(), S = G(J()), r = q(), w = g(() => r.rules.item), k = pe(), p = g(() => !r.state.currentSchedulerId), s = W(), i = X(), { selectedCategories: f } = ce(), b = g(() => ({
119
+ ...ae.menuV4ToV3(I(r.state.menu)),
118
120
  _id: r.state.menu._id,
119
121
  _rev: r.state.menu._rev
120
122
  })), l = g(() => {
121
- const c = B.flatten(f.value.map((o) => o.items));
122
- return B.uniqBy(c, (o) => o._id).length;
123
+ const m = N.flatten(f.value.map((o) => o.items));
124
+ return N.uniqBy(m, (o) => o._id).length;
123
125
  });
124
- async function k(c, o) {
126
+ async function x(m, o) {
125
127
  const _ = new oe();
126
- for (let v = 0; v < c.length; v++) {
127
- const Q = await c[v].xlsx.writeBuffer();
128
+ for (let v = 0; v < m.length; v++) {
129
+ const Q = await m[v].xlsx.writeBuffer();
128
130
  _.file(`${o[v]}.xlsx`, Q);
129
131
  }
130
132
  const n = await _.generateAsync({ type: "blob" });
131
133
  ne.saveAs(n, `books_${C().format("DD-MM-YYYY_HH-mm")}.zip`);
132
134
  }
133
- async function E() {
135
+ async function D() {
134
136
  await S.minor(
135
137
  async () => {
136
138
  if (await r.readMenu(), r.version === O.F_MENU_VERSION.enum.v4) {
137
- const c = N(r.state.menu), o = new ee(c).exportToExcel(), _ = [
139
+ const m = I(r.state.menu), o = new ee(m).exportToExcel(), _ = [
138
140
  `menu_${C().format("DD-MM-YYYY_HH-mm")}`,
139
141
  `addonGroup_${C().format("DD-MM-YYYY_HH-mm")}`,
140
142
  `itemLinkedAddon${C().format("DD-MM-YYYY_HH-mm")}`
141
143
  ];
142
- k(o, _);
144
+ x(o, _);
143
145
  } else {
144
- const c = ve(b.value), o = `menu_${C().format("DD-MM-YYYY_HH-mm")}`;
145
- await te(c, `${o}.xlsx`, {
146
+ const m = ve(b.value), o = `menu_${C().format("DD-MM-YYYY_HH-mm")}`;
147
+ await te(m, `${o}.xlsx`, {
146
148
  bookType: "xlsx",
147
149
  bookSST: !1,
148
150
  type: "array"
@@ -153,32 +155,32 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
153
155
  );
154
156
  }
155
157
  const Z = le(), K = g(() => Z.breakpoints.value.xs);
156
- return de().resetOnMount(), (c, o) => {
158
+ return de().resetOnMount(), (m, o) => {
157
159
  const _ = h("fm-button");
158
- return d(), y(ce, {
160
+ return d(), y(me, {
159
161
  heading: e(t)("menu.products.title")
160
162
  }, {
161
- default: m(() => [
162
- a(ke),
163
+ default: c(() => [
164
+ a(xe),
163
165
  a(fe)
164
166
  ]),
165
- "append-heading": m(() => [
167
+ "append-heading": c(() => [
166
168
  u("div", Me, [
167
169
  u("div", Se, [
168
170
  u("div", we, [
169
- u("p", Ce, U(l.value), 1)
171
+ u("p", Ce, L(l.value), 1)
170
172
  ])
171
173
  ]),
172
174
  u("div", he, [
173
- K.value ? (d(), y(A, { key: 1 }, {
174
- default: m(({ trigger: n }) => [
175
+ K.value ? (d(), y(H, { key: 1 }, {
176
+ default: c(({ trigger: n }) => [
175
177
  a(ue, null, {
176
- default: m(() => [
177
- a(P, {
178
+ default: c(() => [
179
+ a(B, {
178
180
  label: e(t)("menu.products.actions.export"),
179
- onClick: E
181
+ onClick: D
180
182
  }, null, 8, ["label"]),
181
- a(P, {
183
+ a(B, {
182
184
  label: e(t)("menu.products.actions.import"),
183
185
  onClick: n
184
186
  }, null, 8, ["label", "onClick"])
@@ -187,14 +189,14 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
187
189
  }, 1024)
188
190
  ]),
189
191
  _: 1
190
- })) : (d(), D(T, { key: 0 }, [
192
+ })) : (d(), T(E, { key: 0 }, [
191
193
  a(_e, null, {
192
- default: m(({ trigger: n }) => [
194
+ default: c(({ trigger: n }) => [
193
195
  a(_, {
194
196
  label: e(t)("menu.tree_editor.title"),
195
197
  "bg-color": e(M).NeutralGray100,
196
198
  "text-color": e(M).TypoSecondary,
197
- variant: e($).Primary,
199
+ variant: e(V).Primary,
198
200
  onClick: n
199
201
  }, null, 8, ["label", "bg-color", "text-color", "variant", "onClick"])
200
202
  ]),
@@ -203,16 +205,16 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
203
205
  a(_, {
204
206
  "bg-color": e(M).NeutralGray100,
205
207
  "text-color": e(M).TypoSecondary,
206
- variant: e($).Primary,
208
+ variant: e(V).Primary,
207
209
  label: e(t)("menu.products.actions.export"),
208
- onClick: E
210
+ onClick: D
209
211
  }, null, 8, ["bg-color", "text-color", "variant", "label"]),
210
- a(A, null, {
211
- default: m(({ trigger: n }) => [
212
+ a(H, null, {
213
+ default: c(({ trigger: n }) => [
212
214
  a(_, {
213
215
  "bg-color": e(M).NeutralGray100,
214
216
  "text-color": e(M).TypoSecondary,
215
- variant: e($).Primary,
217
+ variant: e(V).Primary,
216
218
  label: e(t)("menu.products.actions.import"),
217
219
  onClick: n
218
220
  }, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
@@ -220,43 +222,43 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
220
222
  _: 1
221
223
  })
222
224
  ], 64)),
223
- l.value > 0 ? (d(), D(T, { key: 2 }, [
224
- w.value.create ? (d(), y(V, {
225
+ l.value > 0 ? (d(), T(E, { key: 2 }, [
226
+ w.value.create ? (d(), y($, {
225
227
  key: 0,
226
228
  label: e(t)("menu.products.actions.add"),
227
229
  "prepend-icon": "add",
228
- onClick: o[0] || (o[0] = (n) => e(x).create(null))
229
- }, null, 8, ["label"])) : p.value ? (d(), y(R, {
230
+ onClick: o[0] || (o[0] = (n) => e(k).create(null))
231
+ }, null, 8, ["label"])) : p.value ? (d(), y(P, {
230
232
  key: 1,
231
233
  "categorized-items": e(s).linkableItems.value,
232
234
  "initial-value": e(s).currentItems.value,
233
235
  "show-variant": !1,
234
236
  onSubmit: o[1] || (o[1] = (n) => e(s).applyProduct(n.map((v) => v._id)))
235
237
  }, {
236
- default: m(({ trigger: n }) => [
237
- a(V, {
238
+ default: c(({ trigger: n }) => [
239
+ a($, {
238
240
  label: e(t)("menu.products.actions.link"),
239
241
  "prepend-icon": "link",
240
242
  onClick: n
241
243
  }, null, 8, ["label", "onClick"])
242
244
  ]),
243
245
  _: 1
244
- }, 8, ["categorized-items", "initial-value"])) : (d(), y(R, {
246
+ }, 8, ["categorized-items", "initial-value"])) : (d(), y(P, {
245
247
  key: 2,
246
248
  "categorized-items": e(i).linkableItems.value,
247
249
  "initial-value": e(i).currentItems.value,
248
250
  "show-variant": !1,
249
251
  onSubmit: o[2] || (o[2] = (n) => e(i).applyProduct(n.map((v) => v._id)))
250
252
  }, {
251
- default: m(({ trigger: n }) => [
252
- a(V, {
253
+ default: c(({ trigger: n }) => [
254
+ a($, {
253
255
  label: e(t)("menu.products.actions.apply_scheduler"),
254
256
  onClick: n
255
257
  }, null, 8, ["label", "onClick"])
256
258
  ]),
257
259
  _: 1
258
260
  }, 8, ["categorized-items", "initial-value"]))
259
- ], 64)) : L("", !0)
261
+ ], 64)) : U("", !0)
260
262
  ])
261
263
  ])
262
264
  ]),
@@ -266,5 +268,5 @@ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], ye = { class: "fle
266
268
  }
267
269
  });
268
270
  export {
269
- Le as default
271
+ Ge as default
270
272
  };