@feedmepos/mf-menu 0.31.33-beta.1 → 0.31.33-beta.6

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 (89) hide show
  1. package/dist/{App-B4rnpCXN.js → App-Dt6RQiUh.js} +6 -6
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-LtwWMoPW.js → ApplyProduct.vue_vue_type_script_setup_true_lang-B_SQpWg7.js} +2 -2
  3. package/dist/{Catalog-Cd7J8de0.js → Catalog-CFx7t_Nu.js} +79 -79
  4. package/dist/{Category-p8UUDEiv.js → Category-CPMx86rY.js} +23 -19
  5. package/dist/{Category-D3WDm9Fe.js → Category-OjK-v--G.js} +5 -5
  6. package/dist/{CookingGuide-hFtxmtGj.js → CookingGuide-ANnXKBjc.js} +3 -3
  7. package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-D-1OzZ-i.js +113 -0
  8. package/dist/{Group-Bv0dyi8v.js → Group--DJjkGab.js} +1 -1
  9. package/dist/{Group-BTrqZgFd.js → Group-K4925_bP.js} +3 -3
  10. package/dist/Group.vue_vue_type_script_setup_true_lang-36O78xv0.js +684 -0
  11. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BIX-gPUO.js +372 -0
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CxPaVLVu.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-C-z1m3jh.js} +13987 -13378
  13. package/dist/{Ingredient-BCostN4Y.js → Ingredient-G4Txx6_0.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-MAqpI7ZD.js → InventoryBinding.vue_vue_type_script_setup_true_lang-HgHBlflo.js} +2 -2
  15. package/dist/{LinkProductSideSheet-abzVzmo3.js → LinkProductSideSheet-CWNarCEs.js} +1 -1
  16. package/dist/{MenuSetting-TfAo82-E.js → MenuSetting-Cx-EHG-6.js} +4 -4
  17. package/dist/{PrintRoute-B43rP5A9.js → PrintRoute-IxHGvGzF.js} +3 -3
  18. package/dist/{Product-C7cYyDHH.js → Product-D1gqn5J6.js} +1 -1
  19. package/dist/Product.vue_vue_type_script_setup_true_lang-BCQd-ks4.js +1641 -0
  20. package/dist/{ProductInternalTools-CkswVuAF.js → ProductInternalTools-GJ2OE5gU.js} +5 -5
  21. package/dist/Products-DJqgSe-Y.js +270 -0
  22. package/dist/{Publish-DIKqaH2f.js → Publish-C86rd413.js} +3 -3
  23. package/dist/{Recipe-_ApT00c_.js → Recipe-BbQKou9p.js} +4 -4
  24. package/dist/{Scheduler-DWY1kKHO.js → Scheduler-DUeTkyGQ.js} +3 -3
  25. package/dist/{ServingSequence-Z1S9zOTO.js → ServingSequence-BROo5rC_.js} +3 -3
  26. package/dist/Setting-D-ueTlwO.js +259 -0
  27. package/dist/{Subcategory-Lqq6XHz2.js → Subcategory-DVewA8HX.js} +4 -4
  28. package/dist/{Takeaway-DiGzrarg.js → Takeaway-B4lDGQDh.js} +4 -4
  29. package/dist/{Takeaway-DGvM9SBP.js → Takeaway-DyPjHuCl.js} +1 -1
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BfWy217t.js → Takeaway.vue_vue_type_script_setup_true_lang-BTDlzYuX.js} +6 -6
  31. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B2wC_Mf0.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B5BAKDRP.js} +642 -642
  32. package/dist/{Unit-D11rRFAf.js → Unit-CVF0dom4.js} +2 -2
  33. package/dist/{Variant-LaKYPxDe.js → Variant-DmccAgFU.js} +3 -3
  34. package/dist/_id_-CWtK62Fy.js +178 -0
  35. package/dist/{app-C5UXrJGj.js → app-CV_q8OdE.js} +75 -75
  36. package/dist/{app-Br9mC24D.js → app-ClinzawZ.js} +1 -1
  37. package/dist/app-DvG3mOom.js +8024 -0
  38. package/dist/app.js +1 -1
  39. package/dist/apps/mf-menu/src/app.d.ts +60 -1
  40. package/dist/apps/mf-menu/src/components/feature/AttributesSelector.vue.d.ts +2 -0
  41. package/dist/apps/mf-menu/src/components/feature/LinkProduct/LinkProductUnifiedSideSheet.vue.d.ts +12 -0
  42. package/dist/apps/mf-menu/src/components/feature/PriceTier/LinkPriceTierSection.vue.d.ts +24 -0
  43. package/dist/apps/mf-menu/src/components/feature/PriceTier/PriceTierRuleEditor.vue.d.ts +30 -0
  44. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +77 -0
  45. package/dist/apps/mf-menu/src/composable/customAttributes.d.ts +88 -0
  46. package/dist/apps/mf-menu/src/helper/{menuImport.d.ts → import-export.d.ts} +204 -3
  47. package/dist/apps/mf-menu/src/helper/menu.d.ts +77 -0
  48. package/dist/apps/mf-menu/src/helper/setting/catalogSetting.d.ts +11 -2
  49. package/dist/apps/mf-menu/src/manager/menu/item.d.ts +77 -0
  50. package/dist/apps/mf-menu/src/stores/manager/catalog.d.ts +2 -0
  51. package/dist/apps/mf-menu/src/stores/menu.d.ts +79 -0
  52. package/dist/apps/mf-menu/src/views/Publish/UpdateCatalogDialog.vue.d.ts +82 -0
  53. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  54. package/dist/assets/linked-status-fZD691Js.js +24 -0
  55. package/dist/assets/override-menu-Cjy1BJuz.js +24 -0
  56. package/dist/assets/validate-menu-uwysUwDP.js +24 -0
  57. package/dist/{catalog-BDyG_i9q.js → catalog-Wx88K6iI.js} +1 -1
  58. package/dist/catalogSetting-DTEHDSAd.js +71 -0
  59. package/dist/{category-Bi6gpIYU.js → category-BRTw76Vf.js} +1 -1
  60. package/dist/{currency-DDseyYg1.js → currency-562bPc2l.js} +1 -1
  61. package/dist/customAttributes-CXzd5ud1.js +33 -0
  62. package/dist/{dayjs.min-DoQgN0KD.js → dayjs.min-Cnfm8bQm.js} +1 -1
  63. package/dist/{index-DxrEwDTr.js → index-4hf9vONw.js} +2 -2
  64. package/dist/{index-C-zLHAG1.js → index-Crs_eZ0i.js} +28 -28
  65. package/dist/{index-DTUmry92.js → index-DJXrJdeQ.js} +3 -3
  66. package/dist/{item-DqXzPUy9.js → item-CuIxc9FT.js} +377 -377
  67. package/dist/{jszip.min-iAC5WNVU.js → jszip.min-C9xLIvo4.js} +245 -245
  68. package/dist/menu-ILWxqJQe.js +133263 -0
  69. package/dist/{menu-D6df9rcz.js → menu-Mkzv9c8C.js} +4 -4
  70. package/dist/{priceTier-C56BYecC.js → priceTier-D4joq_kN.js} +1 -1
  71. package/dist/{scheduler-DCSpt65t.js → scheduler-DuxWoNVb.js} +3 -3
  72. package/dist/{subcategory-CydaPy_X.js → subcategory-CLLMagXY.js} +43 -43
  73. package/dist/{toExcel-Bil8CwJs.js → toExcel-hGfpS_Uo.js} +2 -2
  74. package/dist/{unit-8DyuBx-X.js → unit-9fycj1fu.js} +1 -1
  75. package/package.json +4 -4
  76. package/dist/CustomAttributeChip.vue_vue_type_script_setup_true_lang-Cf17Iy5i.js +0 -7949
  77. package/dist/Group.vue_vue_type_script_setup_true_lang-vk1J9IxK.js +0 -698
  78. package/dist/GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B1wrLnf6.js +0 -206
  79. package/dist/Product.vue_vue_type_script_setup_true_lang-BOq8wMzq.js +0 -1560
  80. package/dist/Products-C7BtAjhB.js +0 -659
  81. package/dist/Setting-Bfuf26Gc.js +0 -258
  82. package/dist/_id_-Q_Tyhr4U.js +0 -200
  83. package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +0 -123
  84. package/dist/apps/mf-menu/src/helper/menuExport.d.ts +0 -32
  85. package/dist/assets/linked-status-BhGrXd73.js +0 -24
  86. package/dist/assets/override-menu-CUNDHOWA.js +0 -24
  87. package/dist/assets/validate-menu-BqOizHsX.js +0 -24
  88. package/dist/catalogSetting-C33p_dck.js +0 -65
  89. package/dist/menu-Cir-22ei.js +0 -108039
@@ -2,10 +2,10 @@ import { defineComponent as L, computed as d, ref as g, h as k, withModifiers as
2
2
  import { useI18n as D } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as E, components as K, useBreakpoints as R, FmButtonVariant as I } from "@feedmepos/ui-library";
4
4
  import { _ as q } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
- import { D as A, u as G } from "./menu-Cir-22ei.js";
5
+ import { D as A, u as G } from "./menu-ILWxqJQe.js";
6
6
  import { _ as H } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
7
  import { _ as J } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
8
- import { u as O, U as P } from "./unit-8DyuBx-X.js";
8
+ import { u as O, U as P } from "./unit-9fycj1fu.js";
9
9
  const Q = {
10
10
  key: 0,
11
11
  class: "h-[600px]"
@@ -2,10 +2,10 @@ import { getCurrentInstance as U, defineComponent as $, computed as g, onMounted
2
2
  import { useI18n as D } from "@feedmepos/mf-common";
3
3
  import { useDialog as Y, useSnackbar as N, FmButtonVariant as M, components as J, useBreakpoints as q } from "@feedmepos/ui-library";
4
4
  import { _ as H } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
- import { _ as Q } from "./app-C5UXrJGj.js";
6
- import { D as K, u as P, O as j, J as W, G as X } from "./menu-Cir-22ei.js";
5
+ import { _ as Q } from "./app-CV_q8OdE.js";
6
+ import { D as K, u as P, O as j, J as W, G as X } from "./menu-ILWxqJQe.js";
7
7
  import { _ as Z } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
8
- import { V as S } from "./index-DxrEwDTr.js";
8
+ import { V as S } from "./index-4hf9vONw.js";
9
9
  import { _ as ee } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
10
10
  import { u as te } from "./search-BAPEUu1R.js";
11
11
  import { defineStore as ae } from "pinia";
@@ -0,0 +1,178 @@
1
+ import { defineComponent as Y, computed as v, ref as d, watch as T, onMounted as N, resolveComponent as c, createElementBlock as z, openBlock as b, Fragment as B, createVNode as o, withCtx as u, createElementVNode as m, toDisplayString as y, unref as s, createBlock as C } from "vue";
2
+ import { D as q } from "./dayjs.min-Cnfm8bQm.js";
3
+ import { useRoute as H, useRouter as F } from "vue-router";
4
+ import { _ as P, b as w, w as K } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-C-z1m3jh.js";
5
+ import { D as W, u as j, B as J, H as Q, O as X } from "./menu-ILWxqJQe.js";
6
+ import { useI18n as Z } from "@feedmepos/mf-common";
7
+ import { useDialog as ee, useSnackbar as te } from "@feedmepos/ui-library";
8
+ import { _ as A } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
9
+ import { _ as ae } from "./index-Crs_eZ0i.js";
10
+ import { _ as oe } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
11
+ import { a as ne } from "./menu-Mkzv9c8C.js";
12
+ import { m as le } from "./toExcel-hGfpS_Uo.js";
13
+ import { _ as se, u as ue, c as re } from "./scheduler-DuxWoNVb.js";
14
+ import { R as r } from "./app-CV_q8OdE.js";
15
+ const me = { class: "px-12 py-8" }, ce = { class: "px-12 py-8" }, ie = { class: "flex ml-auto space-x-8" }, de = { class: "flex-1 flex flex-col overflow-hidden" }, Re = /* @__PURE__ */ Y({
16
+ __name: "[id]",
17
+ setup(_e) {
18
+ const h = H(), _ = F();
19
+ ee();
20
+ const g = W(te()), D = X(g), t = j(), { t: n } = Z(), R = v(() => t.categorizedRawMenuItems), I = v(() => !t.state.currentSchedulerId), S = d();
21
+ async function V(a) {
22
+ const e = a._id ? ue(a) : re(a);
23
+ await D.updateMenu(e, a.name);
24
+ }
25
+ const x = [
26
+ {
27
+ label: n("menu.catalog.edit.tabs.product"),
28
+ value: r.EDIT_CATALOG_PRODUCT
29
+ },
30
+ {
31
+ label: n("menu.catalog.edit.tabs.category"),
32
+ value: r.EDIT_CATALOG_CATEGORY
33
+ },
34
+ {
35
+ label: n("menu.catalog.edit.tabs.group"),
36
+ value: r.EDIT_CATALOG_GROUP
37
+ },
38
+ {
39
+ label: n("menu.catalog.edit.tabs.takeaway"),
40
+ value: r.EDIT_CATALOG_TAKEAWAY
41
+ },
42
+ {
43
+ label: n("menu.catalog.edit.tabs.setting"),
44
+ value: r.EDIT_CATALOG_SETTING
45
+ }
46
+ ], i = d(x[0].value);
47
+ T(i, (a) => {
48
+ _.replace({
49
+ name: a
50
+ });
51
+ }), N(() => {
52
+ _.currentRoute.value.name !== r.EDIT_CATALOG && (i.value = _.currentRoute.value.name);
53
+ }), T(
54
+ () => t.state.menu._id,
55
+ (a) => {
56
+ const e = h.params.id;
57
+ a && e !== "main" && t.selectCatalog(e);
58
+ }
59
+ );
60
+ const E = v(() => ({
61
+ ...J.menuV4ToV3(Q(t.state.menu)),
62
+ _id: t.state.menu._id,
63
+ _rev: t.state.menu._rev
64
+ }));
65
+ async function M() {
66
+ await g.minor(
67
+ async () => {
68
+ await t.readMenu();
69
+ const a = await le(E.value), e = `menu_${q().format("DD-MM-YYYY_HH-mm")}`;
70
+ await K(a, `${e}.xlsx`, {
71
+ bookType: "xlsx",
72
+ bookSST: !1,
73
+ type: "array"
74
+ });
75
+ },
76
+ { successMessage: "Menu exported", customId: t.state.menu._id }
77
+ );
78
+ }
79
+ const p = d(!1), f = d(!1);
80
+ return ne().resetOnUnmount(), (a, e) => {
81
+ var k;
82
+ const O = c("fm-bottom-sheet"), G = c("fm-button"), L = c("router-link"), $ = c("fm-tabs"), U = c("router-view");
83
+ return b(), z(B, null, [
84
+ o(se, {
85
+ ref_key: "schedulerDialogRef",
86
+ ref: S,
87
+ "categorized-items": R.value,
88
+ onOnComplete: V
89
+ }, null, 8, ["categorized-items"]),
90
+ o(P, {
91
+ modelValue: p.value,
92
+ "onUpdate:modelValue": e[0] || (e[0] = (l) => p.value = l)
93
+ }, null, 8, ["modelValue"]),
94
+ o(O, {
95
+ modelValue: f.value,
96
+ "onUpdate:modelValue": e[2] || (e[2] = (l) => f.value = l),
97
+ "no-header": ""
98
+ }, {
99
+ default: u(() => [
100
+ m("div", me, [
101
+ m("p", {
102
+ class: "fm-typo-en-body-md-400",
103
+ onClick: M
104
+ }, y(s(n)("menu.catalog.edit.export")), 1)
105
+ ]),
106
+ m("div", ce, [
107
+ m("p", {
108
+ class: "fm-typo-en-body-md-400",
109
+ onClick: e[1] || (e[1] = () => {
110
+ p.value = !0, f.value = !1;
111
+ })
112
+ }, y(s(n)("menu.catalog.edit.import")), 1)
113
+ ])
114
+ ]),
115
+ _: 1
116
+ }, 8, ["modelValue"]),
117
+ o(oe, {
118
+ heading: ((k = s(t).currentCatalog) == null ? void 0 : k.name) ?? "Main",
119
+ class: "flex flex-col max-h-[calc(100vh-56px)] overflow-hidden"
120
+ }, {
121
+ "prepend-heading": u(() => [
122
+ o(L, {
123
+ to: { name: s(r).CATALOG },
124
+ class: "mr-8",
125
+ title: s(n)("menu.catalog.edit.back")
126
+ }, {
127
+ default: u(() => [
128
+ o(G, {
129
+ "prepend-icon": "arrow_back",
130
+ variant: "tertiary"
131
+ })
132
+ ]),
133
+ _: 1
134
+ }, 8, ["to", "title"])
135
+ ]),
136
+ "append-heading": u(() => [
137
+ m("div", ie, [
138
+ I.value ? (b(), C(w, { key: 0 }, {
139
+ default: u(({ trigger: l }) => [
140
+ o(A, {
141
+ label: s(n)("menu.catalog.edit.link_product"),
142
+ "prepend-icon": "link",
143
+ onClick: l
144
+ }, null, 8, ["label", "onClick"])
145
+ ]),
146
+ _: 1
147
+ })) : (b(), C(w, { key: 1 }, {
148
+ default: u(({ trigger: l }) => [
149
+ o(A, {
150
+ label: s(n)("menu.catalog.edit.apply_scheduler"),
151
+ onClick: l
152
+ }, null, 8, ["label", "onClick"])
153
+ ]),
154
+ _: 1
155
+ }))
156
+ ])
157
+ ]),
158
+ default: u(() => [
159
+ o($, {
160
+ modelValue: i.value,
161
+ "onUpdate:modelValue": e[3] || (e[3] = (l) => i.value = l),
162
+ items: x,
163
+ class: "mb-7 xs:mb-0 xs:px-32"
164
+ }, null, 8, ["modelValue"]),
165
+ m("div", de, [
166
+ o(ae, { "menu-store": s(t) }, null, 8, ["menu-store"]),
167
+ o(U)
168
+ ])
169
+ ]),
170
+ _: 1
171
+ }, 8, ["heading"])
172
+ ], 64);
173
+ };
174
+ }
175
+ });
176
+ export {
177
+ Re as default
178
+ };