@feedmepos/mf-menu 0.23.10-prod.2 → 0.23.10-prod.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/{App-C8YvLeTF.js → App-CUdOF1lD.js} +3 -3
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CTFJvWM4.js → ApplyProduct.vue_vue_type_script_setup_true_lang-C0EsSY5o.js} +2 -2
  3. package/dist/{Catalog-ClzUdFxt.js → Catalog-DQ3qzamR.js} +20 -20
  4. package/dist/{Category-Cmfpovi8.js → Category-BEfmTsto.js} +5 -5
  5. package/dist/{CookingGuide-iOt0swkn.js → CookingGuide-BlGNp0gD.js} +4 -4
  6. package/dist/{Group-DAvakz4L.js → Group-B_TWCv5p.js} +3 -3
  7. package/dist/{Group-DYmn8IOl.js → Group-msc3rkCR.js} +1 -1
  8. package/dist/Group.vue_vue_type_script_setup_true_lang-BZongvdE.js +589 -0
  9. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BUxXXG6k.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DZ7YvsYT.js} +2 -2
  10. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BZrQQSZJ.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-B4HjTI4n.js} +29495 -26316
  11. package/dist/{Ingredient-C1f4ZN7_.js → Ingredient-D6c6GtL9.js} +15 -15
  12. package/dist/InventoryBinding.vue_vue_type_script_setup_true_lang-D07Mn484.js +21909 -0
  13. package/dist/{LinkProductSideSheet-DtdP_0BL.js → LinkProductSideSheet-FGQN0RjX.js} +2 -2
  14. package/dist/{MenuSetting-DI38_4FS.js → MenuSetting-CROJoPLL.js} +2 -2
  15. package/dist/{PrintRoute-GTCRYqGb.js → PrintRoute-BQkAmutA.js} +4 -4
  16. package/dist/{Product-Dkasmjmt.js → Product-BCOosmBf.js} +1 -1
  17. package/dist/{Product.vue_vue_type_script_setup_true_lang-mGnQ2LUs.js → Product.vue_vue_type_script_setup_true_lang-wBpGPDSk.js} +10 -10
  18. package/dist/Products-DeT0VXY4.js +327 -0
  19. package/dist/{Publish-H42TQv2L.js → Publish-DqiH_qtX.js} +30 -30
  20. package/dist/{Recipe-DUoZ7TTF.js → Recipe-DoH-Zx-x.js} +14 -14
  21. package/dist/{Scheduler-CdO9E38B.js → Scheduler-BXnsSB0J.js} +3 -3
  22. package/dist/{SchedulerSelector.vue_vue_type_script_setup_true_lang-CJPgvvv7.js → SchedulerSelector.vue_vue_type_script_setup_true_lang-Dodk0Sro.js} +1 -1
  23. package/dist/{ServingSequence-9PQmhk2e.js → ServingSequence-CTl_2Eav.js} +3 -3
  24. package/dist/{Setting-nYK5jgil.js → Setting-Da-WTI2Q.js} +4 -4
  25. package/dist/{Takeaway-QpAn57vg.js → Takeaway-C0gEPnF9.js} +1 -1
  26. package/dist/{Takeaway-CFVXJXbf.js → Takeaway-DkB3Fedy.js} +4 -4
  27. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BMJwiQr6.js → Takeaway.vue_vue_type_script_setup_true_lang-DA-1Dbck.js} +5 -5
  28. package/dist/{Unit-CYIhqZeX.js → Unit-DHYLncIX.js} +2 -2
  29. package/dist/{Variant-D4yWn2iM.js → Variant-CBO_rkOu.js} +3 -3
  30. package/dist/{_id_-DCKaeAgj.js → _id_-0m5rPhWo.js} +7 -7
  31. package/dist/{app-BUcYRyrl.js → app-B8Q4Y-Fy.js} +1 -1
  32. package/dist/{app-DQYJxThv.js → app-CzifZMeS.js} +515 -679
  33. package/dist/app.js +1 -1
  34. package/dist/apps/mf-menu/src/app.d.ts +2 -0
  35. package/dist/apps/mf-menu/src/components/import/PreviewAddonContent.vue.d.ts +71 -0
  36. package/dist/apps/mf-menu/src/components/import/PreviewContent2.vue.d.ts +7 -3
  37. package/dist/apps/mf-menu/src/helper/import-export.d.ts +176 -116
  38. package/dist/apps/mf-menu/src/manager/menu/item.d.ts +2 -0
  39. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  40. package/dist/assets/{linked-status-BVq3G91g.js → linked-status-DYP1aR1Y.js} +3 -3
  41. package/dist/assets/{override-menu-BSF4at2W.js → override-menu-kB69jb7a.js} +3 -3
  42. package/dist/assets/{validate-menu-CecOIaf7.js → validate-menu-BfPd18qC.js} +3 -3
  43. package/dist/{catalog-D7Ldv7BK.js → catalog-BceRoIR7.js} +1 -1
  44. package/dist/{catalogSetting-BYgjjocH.js → catalogSetting-C4uMnH59.js} +1 -1
  45. package/dist/{currency-CN3EG_m3.js → currency-DE-aZP97.js} +1 -1
  46. package/dist/{discardConfirm-BQpwWpH7.js → discardConfirm-BBQeyzO_.js} +1 -1
  47. package/dist/{index-BZ4Y7cEu.js → index-DIUiBgC4.js} +3 -3
  48. package/dist/{index-BhU6NNaY.js → index-DkT8pmkQ.js} +4 -4
  49. package/dist/{item-C2drLoa9.js → item-BDe4ci28.js} +2445 -2389
  50. package/dist/{menu-BeISDKAr.js → menu-Cm-vmC2P.js} +1 -1
  51. package/dist/{menu-Cij6u5dZ.js → menu-q1fS_eLt.js} +19 -19
  52. package/dist/{remy-BGM4_GGa.js → remy-jsi7Gg_X.js} +2 -2
  53. package/dist/{scheduler-1DH1E_Uz.js → scheduler-CiZNsD7o.js} +4 -4
  54. package/dist/style.css +1 -1
  55. package/dist/{toExcel-C1OFwAWV.js → toExcel-CxZ1LIqR.js} +2 -2
  56. package/dist/{unit-TjPR0QL1.js → unit-BxL1Pe1l.js} +5 -5
  57. package/package.json +7 -6
  58. package/dist/Group.vue_vue_type_script_setup_true_lang-eHQf10NK.js +0 -576
  59. package/dist/InventoryBinding.vue_vue_type_script_setup_true_lang-5-qX5lbB.js +0 -7393
  60. package/dist/Products-WjNex4as.js +0 -244
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as S, ref as p, computed as z, watch as F, resolveComponent as v, openBlock as V, createElementBlock as I, Fragment as D, renderSlot as E, createVNode as i, unref as n, withCtx as m, createBlock as O, createCommentVNode as L, createElementVNode as h, toDisplayString as N } from "vue";
2
- import { u as j, l as A } from "./discardConfirm-BQpwWpH7.js";
2
+ import { u as j, l as A } from "./discardConfirm-BBQeyzO_.js";
3
3
  import { useI18n as P, ItemSelector as U } from "@feedmepos/mf-common";
4
4
  import { components as q, FmButtonVariant as H } from "@feedmepos/ui-library";
5
5
  import { c as M } from "./check-C9mY6LiX.js";
6
- import { H as b } from "./menu-Cij6u5dZ.js";
6
+ import { H as b } from "./menu-q1fS_eLt.js";
7
7
  /* empty css */
8
8
  import { _ as T } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
9
  const $ = { class: "fm-typo-en-title-md-600 mr-auto" }, x = { class: "flex gap-8 items-center justify-start" }, G = /* @__PURE__ */ S({
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as B, ref as x, computed as L, watch as O, resolveComponent as r, openBlock as _, createBlock as w, unref as e, withCtx as v, createElementVNode as D, createVNode as i, createElementBlock as C, Fragment as E, renderList as $, createCommentVNode as z } from "vue";
2
- import { u as H, B as j, z as q, H as y } from "./menu-Cij6u5dZ.js";
2
+ import { u as H, B as j, z as q, H as y } from "./menu-q1fS_eLt.js";
3
3
  import { useI18n as G, useCoreStore as J } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as K } from "@feedmepos/ui-library";
5
5
  import { _ as h } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
6
6
  import { _ as P } from "./PageLayout.vue_vue_type_script_setup_true_lang-BJCuL4EK.js";
7
- import { C as p, a as c } from "./catalogSetting-BYgjjocH.js";
7
+ import { C as p, a as c } from "./catalogSetting-C4uMnH59.js";
8
8
  import { u as Q } from "./index-C2XY3lSz.js";
9
9
  const R = { class: "space-y-32 max-w-[750px] xs:p-16" }, W = {
10
10
  key: 0,
@@ -2,10 +2,10 @@ import { defineComponent as H, ref as k, computed as f, resolveComponent as g, o
2
2
  import { useI18n as Q } from "@feedmepos/mf-common";
3
3
  import { components as W, useSnackbar as ee, useDialog as te } from "@feedmepos/ui-library";
4
4
  import { _ as oe } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-CdVvtXw-.js";
5
- import { _ as ne } from "./app-DQYJxThv.js";
6
- import { H as j, G as C, J as B, u as ae, K as le, B as re } from "./menu-Cij6u5dZ.js";
7
- import { u as se, l as ie } from "./discardConfirm-BQpwWpH7.js";
8
- import { L as ue } from "./LinkProductSideSheet-DtdP_0BL.js";
5
+ import { _ as ne } from "./app-CzifZMeS.js";
6
+ import { H as j, G as C, J as B, u as ae, K as le, B as re } from "./menu-q1fS_eLt.js";
7
+ import { u as se, l as ie } from "./discardConfirm-BBQeyzO_.js";
8
+ import { L as ue } from "./LinkProductSideSheet-FGQN0RjX.js";
9
9
  import { _ as G } from "./FormSection.vue_vue_type_script_setup_true_lang-BWJUD8NZ.js";
10
10
  import { _ as de } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
11
11
  import { _ as ce } from "./PageLayout.vue_vue_type_script_setup_true_lang-BJCuL4EK.js";
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./Product.vue_vue_type_script_setup_true_lang-mGnQ2LUs.js";
1
+ import { _ as f } from "./Product.vue_vue_type_script_setup_true_lang-wBpGPDSk.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,22 +1,22 @@
1
1
  import { ref as ee, computed as re, defineComponent as Oe, resolveComponent as q, openBlock as A, createBlock as H, withCtx as pe, createElementVNode as E, createVNode as S, createElementBlock as z, toDisplayString as Be, unref as N, createCommentVNode as _e, withModifiers as yr, Fragment as je, renderList as yt, normalizeClass as Zn, mergeModels as Wr, useModel as fu, onMounted as Ki, watch as Pt, renderSlot as gr, mergeProps as My, createTextVNode as Ps, watchEffect as Us, nextTick as Pi, resolveDynamicComponent as Ms, h as Wt, normalizeStyle as Dy } from "vue";
2
- import { l as Qa } from "./discardConfirm-BQpwWpH7.js";
2
+ import { l as Qa } from "./discardConfirm-BBQeyzO_.js";
3
3
  import "./vuedraggable-WU01qJgi.js";
4
- import { u as ua, U as Xa, z as qn, H as zy, B as Ds, V as Ly, W as By, X as Fs, K as zs } from "./menu-Cij6u5dZ.js";
4
+ import { u as ua, T as Xa, z as qn, H as zy, B as Ds, U as Ly, V as By, W as Fs, K as zs } from "./menu-q1fS_eLt.js";
5
5
  import { useI18n as pu, useCoreStore as qi } from "@feedmepos/mf-common";
6
6
  import { useBreakpoints as mu, useDialog as Gi, useDialogChild as Wy, components as Kt, useSnackbar as Ls, FmButtonVariant as tn, FmButtonColorThemeVariant as Rt } from "@feedmepos/ui-library";
7
- import { u as tu } from "./menu-BeISDKAr.js";
7
+ import { u as tu } from "./menu-Cm-vmC2P.js";
8
8
  import { _ as Br } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
9
- import { L as Os } from "./LinkProductSideSheet-DtdP_0BL.js";
10
- import { _ as Is } from "./SchedulerSelector.vue_vue_type_script_setup_true_lang-CJPgvvv7.js";
9
+ import { L as Os } from "./LinkProductSideSheet-FGQN0RjX.js";
10
+ import { _ as Is } from "./SchedulerSelector.vue_vue_type_script_setup_true_lang-Dodk0Sro.js";
11
11
  import "./search-7ZYHUW7s.js";
12
- import { f as Ky, o as qy, g as Gy, a as Bs, u as Ws, m as Hy } from "./item-C2drLoa9.js";
13
- import { c as Ui, s as Jy, _ as Yy, a as Qy, u as Xy } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-BZrQQSZJ.js";
12
+ import { f as Ky, o as qy, g as Gy, a as Bs, u as Ws, m as Hy } from "./item-BDe4ci28.js";
13
+ import { d as Ui, s as Jy, _ as Yy, a as Qy, u as Xy } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-B4HjTI4n.js";
14
14
  import { F as e_ } from "./object-DNBFWMt7.js";
15
- import { _ as Hi, u as t_ } from "./app-DQYJxThv.js";
15
+ import { _ as Hi, u as t_ } from "./app-CzifZMeS.js";
16
16
  import { _ as eu } from "./TextChip.vue_vue_type_script_setup_true_lang-DoCbhCON.js";
17
- import { _ as n_ } from "./index-BhU6NNaY.js";
17
+ import { _ as n_ } from "./index-DkT8pmkQ.js";
18
18
  import { c as r_ } from "./check-C9mY6LiX.js";
19
- import { f as a_ } from "./currency-CN3EG_m3.js";
19
+ import { f as a_ } from "./currency-DE-aZP97.js";
20
20
  import { w as u_ } from "./tooltip-DpokWKto.js";
21
21
  import { r as i_ } from "./index-C2XY3lSz.js";
22
22
  function o_(l, r) {
@@ -0,0 +1,327 @@
1
+ import { defineComponent as D, computed as x, ref as R, resolveComponent as F, openBlock as g, createBlock as h, unref as a, withCtx as k, createElementVNode as y, toDisplayString as P, createVNode as f, createCommentVNode as z, createElementBlock as L, Fragment as j } from "vue";
2
+ import { c as E, u as q, B as G, z as U, D as Y, G as J, A as W, H, I as T } from "./menu-q1fS_eLt.js";
3
+ import { u as Q, a as ee, M as te, w as oe, J as ne, b as ae } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-B4HjTI4n.js";
4
+ import { l as re } from "./discardConfirm-BBQeyzO_.js";
5
+ import { useCoreStore as se, useI18n as ie } from "@feedmepos/mf-common";
6
+ import { useDialog as X, useDialogChild as le, useSnackbar as Z, useBreakpoints as ue, FmButtonColorThemeVariant as V, FmButtonVariant as B } from "@feedmepos/ui-library";
7
+ import { _ as A } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-CdVvtXw-.js";
8
+ import { _ as ce, a as O } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DPis3HVx.js";
9
+ import { _ as me } from "./PageLayout.vue_vue_type_script_setup_true_lang-BJCuL4EK.js";
10
+ import { u as de, a as pe } from "./menu-Cm-vmC2P.js";
11
+ import { u as fe } from "./item-BDe4ci28.js";
12
+ import { _ as ve, a as I } from "./Product.vue_vue_type_script_setup_true_lang-wBpGPDSk.js";
13
+ import { L as N } from "./LinkProductSideSheet-FGQN0RjX.js";
14
+ import { m as _e } from "./toExcel-CxZ1LIqR.js";
15
+ var K = { exports: {} };
16
+ (function(M, l) {
17
+ (function(b, s) {
18
+ s();
19
+ })(E, function() {
20
+ function b(e, t) {
21
+ return typeof t > "u" ? t = { autoBom: !1 } : typeof t != "object" && (console.warn("Deprecated: Expected third argument to be a object"), t = { autoBom: !t }), t.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
22
+ }
23
+ function s(e, t, r) {
24
+ var o = new XMLHttpRequest();
25
+ o.open("GET", e), o.responseType = "blob", o.onload = function() {
26
+ m(o.response, t, r);
27
+ }, o.onerror = function() {
28
+ console.error("could not download file");
29
+ }, o.send();
30
+ }
31
+ function w(e) {
32
+ var t = new XMLHttpRequest();
33
+ t.open("HEAD", e, !1);
34
+ try {
35
+ t.send();
36
+ } catch {
37
+ }
38
+ return 200 <= t.status && 299 >= t.status;
39
+ }
40
+ function v(e) {
41
+ try {
42
+ e.dispatchEvent(new MouseEvent("click"));
43
+ } catch {
44
+ var t = document.createEvent("MouseEvents");
45
+ t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
46
+ }
47
+ }
48
+ var i = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof E == "object" && E.global === E ? E : void 0, c = i.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), m = i.saveAs || (typeof window != "object" || window !== i ? function() {
49
+ } : "download" in HTMLAnchorElement.prototype && !c ? function(e, t, r) {
50
+ var o = i.URL || i.webkitURL, u = document.createElement("a");
51
+ t = t || e.name || "download", u.download = t, u.rel = "noopener", typeof e == "string" ? (u.href = e, u.origin === location.origin ? v(u) : w(u.href) ? s(e, t, r) : v(u, u.target = "_blank")) : (u.href = o.createObjectURL(e), setTimeout(function() {
52
+ o.revokeObjectURL(u.href);
53
+ }, 4e4), setTimeout(function() {
54
+ v(u);
55
+ }, 0));
56
+ } : "msSaveOrOpenBlob" in navigator ? function(e, t, r) {
57
+ if (t = t || e.name || "download", typeof e != "string") navigator.msSaveOrOpenBlob(b(e, r), t);
58
+ else if (w(e)) s(e, t, r);
59
+ else {
60
+ var o = document.createElement("a");
61
+ o.href = e, o.target = "_blank", setTimeout(function() {
62
+ v(o);
63
+ });
64
+ }
65
+ } : function(e, t, r, o) {
66
+ if (o = o || open("", "_blank"), o && (o.document.title = o.document.body.innerText = "downloading..."), typeof e == "string") return s(e, t, r);
67
+ var u = e.type === "application/octet-stream", $ = /constructor/i.test(i.HTMLElement) || i.safari, C = /CriOS\/[\d]+/.test(navigator.userAgent);
68
+ if ((C || u && $ || c) && typeof FileReader < "u") {
69
+ var p = new FileReader();
70
+ p.onloadend = function() {
71
+ var n = p.result;
72
+ n = C ? n : n.replace(/^data:[^;]*;/, "data:attachment/file;"), o ? o.location.href = n : location = n, o = null;
73
+ }, p.readAsDataURL(e);
74
+ } else {
75
+ var d = i.URL || i.webkitURL, _ = d.createObjectURL(e);
76
+ o ? o.location = _ : location.href = _, o = null, setTimeout(function() {
77
+ d.revokeObjectURL(_);
78
+ }, 4e4);
79
+ }
80
+ });
81
+ i.saveAs = m.saveAs = m, M.exports = m;
82
+ });
83
+ })(K);
84
+ var ye = K.exports;
85
+ const ge = { class: "space-y-24 mb-24" }, be = ["innerHTML"], we = { class: "flex justify-end gap-8" }, ke = /* @__PURE__ */ D({
86
+ __name: "ConfirmActionDialog",
87
+ props: {
88
+ description: {},
89
+ value: {},
90
+ message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
91
+ },
92
+ setup(M) {
93
+ const l = M, b = x(() => l.message.replace("[[value]]", l.value)), s = R(""), w = X(), { emitAction: v } = le();
94
+ return (i, c) => {
95
+ const m = F("FmTextField"), e = F("FmButton"), t = F("FmForm");
96
+ return g(), h(t, {
97
+ "on-validation-success": () => a(v)("primary"),
98
+ "blame-form-child-on-validation-failed": ""
99
+ }, {
100
+ default: k(() => [
101
+ y("div", ge, [
102
+ y("div", null, P(i.description), 1),
103
+ y("div", { innerHTML: b.value }, null, 8, be),
104
+ y("div", null, [
105
+ f(m, {
106
+ modelValue: s.value,
107
+ "onUpdate:modelValue": [
108
+ c[0] || (c[0] = (r) => s.value = r),
109
+ c[1] || (c[1] = () => {
110
+ })
111
+ ],
112
+ placeholder: i.value,
113
+ rules: [(r) => r === i.value || "Value does not match"]
114
+ }, null, 8, ["modelValue", "placeholder", "rules"])
115
+ ]),
116
+ y("div", we, [
117
+ f(e, {
118
+ label: "Cancel",
119
+ variant: "secondary",
120
+ onClick: c[2] || (c[2] = (r) => a(w).close())
121
+ }),
122
+ f(e, {
123
+ label: "Confirm",
124
+ type: "submit"
125
+ })
126
+ ])
127
+ ])
128
+ ]),
129
+ _: 1
130
+ }, 8, ["on-validation-success"]);
131
+ };
132
+ }
133
+ }), xe = /* @__PURE__ */ D({
134
+ __name: "Migrate",
135
+ setup(M) {
136
+ const l = q(), b = se(), s = Z(), { minor: w } = G(s), v = R(!1), i = X();
137
+ async function c() {
138
+ m.value || v.value || i.open({
139
+ title: "Migrate to new version",
140
+ contentComponent: ke,
141
+ contentComponentProps: {
142
+ value: "MIGRATE",
143
+ description: "Do you want to migrate to new version? Once migrate it will unable to revert to the older version."
144
+ }
145
+ }).onPrimary(async () => {
146
+ i.close(), await w(
147
+ async () => {
148
+ await l.migrate(), setTimeout(() => {
149
+ window.location.reload();
150
+ }, 2e3);
151
+ },
152
+ {
153
+ isLoading: v,
154
+ customId: l.state.menu._id,
155
+ message: "Migrating menu",
156
+ successMessage: "Migration completed"
157
+ }
158
+ );
159
+ });
160
+ }
161
+ const m = x(() => {
162
+ const e = b.restaurants.value;
163
+ if (!e.length) return "Required at least one restaurant to migrate";
164
+ const t = e.filter((o) => !o.posVersion || !U.Pos.canUse({ feature: Y.F_FEATURE.enum.menuV4, posVersion: o.posVersion }));
165
+ return t.length ? `Upgrade POS to V${U.Pos.minVersionToUse(Y.F_FEATURE.enum.menuV4)} to use new menu: ${t.map((o) => o.profile.name).join(", ")}` : null;
166
+ });
167
+ return x(() => m.value ? m.value : "Migrate your menu to new version to enjoy more features. Content of new menu will remain the same as current."), (e, t) => {
168
+ const r = F("FmSnackbar");
169
+ return !m.value && a(l).version !== a(J.F_MENU_VERSION).enum.v4 ? (g(), h(r, {
170
+ key: 0,
171
+ class: "!max-w-full",
172
+ title: "New version of menu is out now!",
173
+ description: "Migrate your current menu version to the latest to enjoy more features such as product sequential dispatch, serving sequence, scheduler and more! Your content and current setting will be preserved.",
174
+ variant: "info",
175
+ action: "Migrate",
176
+ "z-index": 0,
177
+ onOnAction: c
178
+ })) : z("", !0);
179
+ };
180
+ }
181
+ }), he = { class: "flex-1 flex justify-between gap-8 pl-8" }, Me = { class: "flex items-center" }, Se = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ee = { class: "fm-typo-en-body-md-600 font-semibold" }, Fe = { class: "flex gap-8" }, Ie = /* @__PURE__ */ D({
182
+ __name: "Products",
183
+ setup(M) {
184
+ const { t: l } = ie(), b = G(Z()), s = q(), w = x(() => s.rules.item), v = fe(), i = x(() => !s.state.currentSchedulerId), c = Q(), m = ee(), { selectedCategories: e } = de(), t = x(() => ({
185
+ ...W.menuV4ToV3(H(s.state.menu)),
186
+ _id: s.state.menu._id,
187
+ _rev: s.state.menu._rev
188
+ })), r = x(() => re.flatten(e.value.map((p) => p.items)).length);
189
+ async function o(p, d) {
190
+ const _ = new ne();
191
+ for (let n = 0; n < p.length; n++) {
192
+ const S = ae(p[n], {
193
+ bookType: "xlsx",
194
+ type: "array"
195
+ });
196
+ _.file(`${d[n]}.xlsx`, S);
197
+ }
198
+ _.generateAsync({ type: "blob" }).then((n) => {
199
+ ye.saveAs(n, `books_${T().format("DD-MM-YYYY_HH-mm")}.zip`);
200
+ });
201
+ }
202
+ async function u() {
203
+ await b.minor(
204
+ async () => {
205
+ if (await s.readMenu(), s.version === J.F_MENU_VERSION.enum.v4) {
206
+ const p = H(s.state.menu), d = new te(p).exportToExcel(), _ = [
207
+ `menu_${T().format("DD-MM-YYYY_HH-mm")}`,
208
+ `addonGroup_${T().format("DD-MM-YYYY_HH-mm")}`
209
+ ];
210
+ o(d, _);
211
+ } else {
212
+ const p = _e(t.value), d = `menu_${T().format("DD-MM-YYYY_HH-mm")}`;
213
+ await oe(p, `${d}.xlsx`, {
214
+ bookType: "xlsx",
215
+ bookSST: !1,
216
+ type: "array"
217
+ });
218
+ }
219
+ },
220
+ { successMessage: "Menu exported", customId: s.state.menu._id }
221
+ );
222
+ }
223
+ R(!1), R(!1);
224
+ const $ = ue(), C = x(() => $.breakpoints.value.xs);
225
+ return pe().resetOnMount(), (p, d) => {
226
+ const _ = F("fm-button");
227
+ return g(), h(me, {
228
+ heading: a(l)("menu.products.title")
229
+ }, {
230
+ default: k(() => [
231
+ f(xe),
232
+ f(ve)
233
+ ]),
234
+ "append-heading": k(() => [
235
+ y("div", he, [
236
+ y("div", Me, [
237
+ y("div", Se, [
238
+ y("p", Ee, P(r.value), 1)
239
+ ])
240
+ ]),
241
+ y("div", Fe, [
242
+ C.value ? (g(), h(I, { key: 1 }, {
243
+ default: k(({ trigger: n }) => [
244
+ f(ce, null, {
245
+ default: k(() => [
246
+ f(O, {
247
+ label: a(l)("menu.products.actions.export"),
248
+ onClick: u
249
+ }, null, 8, ["label"]),
250
+ f(O, {
251
+ label: a(l)("menu.products.actions.import"),
252
+ onClick: n
253
+ }, null, 8, ["label", "onClick"])
254
+ ]),
255
+ _: 2
256
+ }, 1024)
257
+ ]),
258
+ _: 1
259
+ })) : (g(), L(j, { key: 0 }, [
260
+ f(_, {
261
+ "bg-color": a(V).NeutralGray100,
262
+ "text-color": a(V).TypoSecondary,
263
+ variant: a(B).Primary,
264
+ label: a(l)("menu.products.actions.export"),
265
+ onClick: u
266
+ }, null, 8, ["bg-color", "text-color", "variant", "label"]),
267
+ f(I, null, {
268
+ default: k(({ trigger: n }) => [
269
+ f(_, {
270
+ "bg-color": a(V).NeutralGray100,
271
+ "text-color": a(V).TypoSecondary,
272
+ variant: a(B).Primary,
273
+ label: a(l)("menu.products.actions.import"),
274
+ onClick: n
275
+ }, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
276
+ ]),
277
+ _: 1
278
+ })
279
+ ], 64)),
280
+ r.value > 0 ? (g(), L(j, { key: 2 }, [
281
+ w.value.create ? (g(), h(A, {
282
+ key: 0,
283
+ label: a(l)("menu.products.actions.add"),
284
+ "prepend-icon": "add",
285
+ onClick: d[0] || (d[0] = (n) => a(v).create(null))
286
+ }, null, 8, ["label"])) : i.value ? (g(), h(N, {
287
+ key: 1,
288
+ "categorized-items": a(c).linkableItems.value,
289
+ "initial-value": a(c).currentItems.value,
290
+ "show-variant": !1,
291
+ onSubmit: d[1] || (d[1] = (n) => a(c).applyProduct(n.map((S) => S._id)))
292
+ }, {
293
+ default: k(({ trigger: n }) => [
294
+ f(A, {
295
+ label: a(l)("menu.products.actions.link"),
296
+ "prepend-icon": "link",
297
+ onClick: n
298
+ }, null, 8, ["label", "onClick"])
299
+ ]),
300
+ _: 1
301
+ }, 8, ["categorized-items", "initial-value"])) : (g(), h(N, {
302
+ key: 2,
303
+ "categorized-items": a(m).linkableItems.value,
304
+ "initial-value": a(m).currentItems.value,
305
+ "show-variant": !1,
306
+ onSubmit: d[2] || (d[2] = (n) => a(m).applyProduct(n.map((S) => S._id)))
307
+ }, {
308
+ default: k(({ trigger: n }) => [
309
+ f(A, {
310
+ label: a(l)("menu.products.actions.apply_scheduler"),
311
+ onClick: n
312
+ }, null, 8, ["label", "onClick"])
313
+ ]),
314
+ _: 1
315
+ }, 8, ["categorized-items", "initial-value"]))
316
+ ], 64)) : z("", !0)
317
+ ])
318
+ ])
319
+ ]),
320
+ _: 1
321
+ }, 8, ["heading"]);
322
+ };
323
+ }
324
+ });
325
+ export {
326
+ Ie as default
327
+ };
@@ -1,15 +1,15 @@
1
- import { defineComponent as j, ref as A, computed as V, onMounted as ne, resolveComponent as C, openBlock as h, createElementBlock as R, createVNode as n, createElementVNode as o, toDisplayString as F, unref as u, Fragment as P, renderList as Y, createBlock as B, withCtx as U, withModifiers as K, createCommentVNode as se, h as T } from "vue";
2
- import { I as Q, z as ue, D as ie, B as X, R as re, H as W, u as ce, G as de } from "./menu-Cij6u5dZ.js";
1
+ import { defineComponent as j, ref as A, computed as V, onMounted as ne, resolveComponent as C, openBlock as h, createElementBlock as M, createVNode as n, createElementVNode as o, toDisplayString as F, unref as u, Fragment as P, renderList as Y, createBlock as B, withCtx as U, withModifiers as K, createCommentVNode as se, h as T } from "vue";
2
+ import { I as J, z as ue, D as ie, B as X, Q as re, H as Q, u as ce, G as de } from "./menu-q1fS_eLt.js";
3
3
  import { useRouter as me } from "vue-router";
4
4
  import { useI18n as q, useCoreStore as pe, RestaurantSelector as ve } from "@feedmepos/mf-common";
5
- import { useSnackbar as Z, useDialogChild as ge, useDialog as be, components as J } from "@feedmepos/ui-library";
5
+ import { useSnackbar as Z, useDialogChild as ge, useDialog as be, components as W } from "@feedmepos/ui-library";
6
6
  import { _ as fe } from "./TextChip.vue_vue_type_script_setup_true_lang-DoCbhCON.js";
7
- import { _ as _e } from "./app-DQYJxThv.js";
7
+ import { _ as _e } from "./app-CzifZMeS.js";
8
8
  import { _ as he, w as ye } from "./tooltip-DpokWKto.js";
9
- import { u as Ce, l as ke } from "./discardConfirm-BQpwWpH7.js";
9
+ import { u as Ce, l as ke } from "./discardConfirm-BBQeyzO_.js";
10
10
  import { _ as we } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
11
11
  function ee(k) {
12
- return k ? Q(k).format("DD/MM/YY HH:mm") : "-";
12
+ return k ? J(k).format("DD/MM/YY HH:mm") : "-";
13
13
  }
14
14
  function xe(k, w, l) {
15
15
  const r = (i, m = !1) => {
@@ -93,12 +93,12 @@ const Ve = {
93
93
  });
94
94
  return ne(async () => y()), ge(), (c, _) => {
95
95
  const S = C("FmCircularProgress");
96
- return i.value ? (h(), R("div", Ve, [
96
+ return i.value ? (h(), M("div", Ve, [
97
97
  n(S, { size: "lg" })
98
- ])) : (h(), R("div", Fe, [
98
+ ])) : (h(), M("div", Fe, [
99
99
  o("div", Se, F(u(p)("menu.revert.description", { name: w.restaurant.name })), 1),
100
100
  o("div", Ie, [
101
- (h(!0), R(P, null, Y(t.value, (x) => (h(), B(he, {
101
+ (h(!0), M(P, null, Y(t.value, (x) => (h(), B(he, {
102
102
  key: x.label,
103
103
  name: x.label,
104
104
  value: x.value || "--"
@@ -107,7 +107,7 @@ const Ve = {
107
107
  ]));
108
108
  };
109
109
  }
110
- }), $e = { class: "fm-typo-en-title-md-600" }, Re = { class: "mt-40" }, Me = { class: "fm-typo-en-title-sm-600" }, Ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-4 mb-8" }, De = { class: "flex gap-8 items-center justify-start" }, Le = /* @__PURE__ */ j({
110
+ }), $e = { class: "fm-typo-en-title-md-600" }, Me = { class: "mt-40" }, Re = { class: "fm-typo-en-title-sm-600" }, Ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mt-4 mb-8" }, De = { class: "flex gap-8 items-center justify-start" }, Le = /* @__PURE__ */ j({
111
111
  __name: "UpdateCatalogDialog",
112
112
  props: {
113
113
  catalogs: {
@@ -152,7 +152,7 @@ const Ve = {
152
152
  }))
153
153
  ]), t = A(y()), c = A(!1), _ = A(void 0);
154
154
  function S(v) {
155
- _.value = v ? W(v) : y(), t.value = W(_.value), c.value = !0;
155
+ _.value = v ? Q(v) : y(), t.value = Q(_.value), c.value = !0;
156
156
  }
157
157
  function x() {
158
158
  c.value = !1;
@@ -167,7 +167,7 @@ const Ve = {
167
167
  x(), m("onComplete", t.value);
168
168
  }
169
169
  return (v, g) => {
170
- const $ = C("FmSelect"), E = C("FmCheckbox"), M = C("FmButton"), D = C("FmSideSheet");
170
+ const $ = C("FmSelect"), E = C("FmCheckbox"), R = C("FmButton"), D = C("FmSideSheet");
171
171
  return h(), B(D, {
172
172
  modelValue: c.value,
173
173
  "onUpdate:modelValue": g[5] || (g[5] = (b) => c.value = b),
@@ -179,13 +179,13 @@ const Ve = {
179
179
  ]),
180
180
  "side-sheet-footer": U(() => [
181
181
  o("div", De, [
182
- n(M, {
182
+ n(R, {
183
183
  label: u(r)("menu.publish.update_catalog_dialog.actions.update"),
184
184
  size: "lg",
185
185
  variant: "primary",
186
186
  onClick: g[4] || (g[4] = () => z())
187
187
  }, null, 8, ["label"]),
188
- n(M, {
188
+ n(R, {
189
189
  label: u(r)("menu.publish.update_catalog_dialog.actions.cancel"),
190
190
  size: "lg",
191
191
  variant: "tertiary",
@@ -214,10 +214,10 @@ const Ve = {
214
214
  items: p.value,
215
215
  label: u(r)("menu.publish.update_catalog_dialog.sections.pickup.label")
216
216
  }, null, 8, ["modelValue", "items", "label"]),
217
- o("div", Re, [
218
- o("div", Me, F(u(r)("menu.publish.update_catalog_dialog.sections.additional.title")), 1),
217
+ o("div", Me, [
218
+ o("div", Re, F(u(r)("menu.publish.update_catalog_dialog.sections.additional.title")), 1),
219
219
  o("div", Ue, F(u(r)("menu.publish.update_catalog_dialog.sections.additional.subtitle")), 1),
220
- (h(!0), R(P, null, Y(k.catalogs, (b) => (h(), R("div", {
220
+ (h(!0), M(P, null, Y(k.catalogs, (b) => (h(), M("div", {
221
221
  key: b._id
222
222
  }, [
223
223
  n(E, {
@@ -259,7 +259,7 @@ const Ve = {
259
259
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
260
260
  }, Ge = {
261
261
  class: "flex gap-8"
262
- }, We = {
262
+ }, Qe = {
263
263
  class: "xs:block hidden fixed bottom-72 right-16"
264
264
  }, sa = /* @__PURE__ */ j({
265
265
  __name: "Publish",
@@ -319,13 +319,13 @@ const Ve = {
319
319
  const a = e.row.original;
320
320
  return t.state.menu.updatedAt, a.updatedAt, T("div", {
321
321
  class: "flex justify-end gap-8"
322
- }, [_.value && a.revertConfig ? ye(T(J.FmButton, {
322
+ }, [_.value && a.revertConfig ? ye(T(W.FmButton, {
323
323
  prependIcon: "undo",
324
324
  variant: "secondary",
325
325
  onClick: K(async () => {
326
326
  await S(e.row.original);
327
327
  }, ["stop", "prevent"])
328
- }), l("menu.publish.actions.revert")) : null, T(J.FmButton, {
328
+ }), l("menu.publish.actions.revert")) : null, T(W.FmButton, {
329
329
  label: l("menu.publish.actions.publish"),
330
330
  icon: "ios_share",
331
331
  variant: "secondary",
@@ -355,7 +355,7 @@ const Ve = {
355
355
  close: !0
356
356
  }
357
357
  }).onPrimary(async () => {
358
- await M.minor(async () => {
358
+ await R.minor(async () => {
359
359
  await t.revertRestaurantMenu(e._id);
360
360
  }, {
361
361
  customId: e._id,
@@ -367,9 +367,9 @@ const Ve = {
367
367
  version: L(t.state.menu.updatedAt)
368
368
  }));
369
369
  function L(e) {
370
- return e ? Q(e).format("DD/MM/YYYY hh:mmA") : "";
370
+ return e ? J(e).format("DD/MM/YYYY hh:mmA") : "";
371
371
  }
372
- const z = V(() => t.state.menu.modules.catalog), v = V(() => M.queue.value.some((e) => e.id === t.state.menu._id));
372
+ const z = V(() => t.state.menu.modules.catalog), v = V(() => R.queue.value.some((e) => e.id === t.state.menu._id));
373
373
  function g(e) {
374
374
  var a;
375
375
  return e ? ((a = z.value.find((d) => d._id === e)) == null ? void 0 : a.name) ?? l("menu.publish.labels.catalog.invalid") : l("menu.publish.labels.catalog.main");
@@ -388,11 +388,11 @@ const Ve = {
388
388
  const a = $(e);
389
389
  (d = p.value) == null || d.show(a);
390
390
  }
391
- const M = X(Z());
391
+ const R = X(Z());
392
392
  async function D(e) {
393
393
  var d;
394
394
  const a = (d = I.value.find((N) => N._id === e.restaurantId)) == null ? void 0 : d.name;
395
- await M.minor(async () => await t.publishMenu(e), {
395
+ await R.minor(async () => await t.publishMenu(e), {
396
396
  customId: t.state.menu._id,
397
397
  message: `Publishing menu for ${a}`,
398
398
  successMessage: `Published to ${a}`
@@ -419,7 +419,7 @@ const Ve = {
419
419
  if (v.value) return;
420
420
  const e = Object.keys(m.value).map(Number).filter((a) => m.value[a]);
421
421
  if (e.length === 0 || e.length === I.value.length)
422
- await M.minor(async () => await t.publishAllMenu(), {
422
+ await R.minor(async () => await t.publishAllMenu(), {
423
423
  customId: t.state.menu._id
424
424
  });
425
425
  else
@@ -430,7 +430,7 @@ const Ve = {
430
430
  }
431
431
  return (e, a) => {
432
432
  const d = C("FmChip"), N = C("FmSpacer"), O = C("FmButton"), G = C("FmSearch"), te = C("FmTable"), le = C("FmListItem"), oe = C("FmList");
433
- return h(), R(P, null, [o("div", Pe, [o("div", Be, [o("div", ze, [o("div", Ee, F(u(l)("menu.publish.title")), 1), a[7] || (a[7] = o("div", {
433
+ return h(), M(P, null, [o("div", Pe, [o("div", Be, [o("div", ze, [o("div", Ee, F(u(l)("menu.publish.title")), 1), a[7] || (a[7] = o("div", {
434
434
  class: "hidden xs:block fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
435
435
  }, null, -1))]), n(d, {
436
436
  label: x.value,
@@ -462,7 +462,7 @@ const Ve = {
462
462
  autofocus: "",
463
463
  class: "w-full xs:block hidden",
464
464
  placeholder: u(l)("menu.publish.table.search.placeholder")
465
- }, null, 8, ["modelValue", "placeholder"])]), I.value.length > 0 ? (h(), R(P, {
465
+ }, null, 8, ["modelValue", "placeholder"])]), I.value.length > 0 ? (h(), M(P, {
466
466
  key: 0
467
467
  }, [n(_e, {
468
468
  class: "xs:hidden block"
@@ -486,7 +486,7 @@ const Ve = {
486
486
  class: "flex-col flex-1 min-h-0 overflow-auto xs:flex hidden w-full pb-64",
487
487
  separator: ""
488
488
  }, {
489
- default: U(() => [(h(!0), R(P, null, Y(ae.value, (s) => (h(), B(le, {
489
+ default: U(() => [(h(!0), M(P, null, Y(ae.value, (s) => (h(), B(le, {
490
490
  key: s._id,
491
491
  label: s.name,
492
492
  style: {
@@ -524,7 +524,7 @@ const Ve = {
524
524
  });
525
525
  }
526
526
  }
527
- }, null, 8, ["title", "subtitle", "action"]))]), o("div", We, [n(O, {
527
+ }, null, 8, ["title", "subtitle", "action"]))]), o("div", Qe, [n(O, {
528
528
  disabled: v.value,
529
529
  icon: "ios_share",
530
530
  label: u(l)("menu.publish.actions.publish_all"),