@feedmepos/mf-menu 0.32.40 → 0.32.41-dev.2

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 (67) hide show
  1. package/dist/{App-DqpxV0zp.js → App-mCGGnjeS.js} +7 -7
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BQM40AWC.js → ApplyProduct.vue_vue_type_script_setup_true_lang-MWoYiClD.js} +3 -3
  3. package/dist/{Catalog-RdpK3RmL.js → Catalog-CM2wnQ4l.js} +44 -44
  4. package/dist/{Category-ar15UpWV.js → Category-Bp9tGWwJ.js} +24 -24
  5. package/dist/{Category-DbvCHZU4.js → Category-bsL9IQ5n.js} +24 -24
  6. package/dist/{CookingGuide-x2w_WTnE.js → CookingGuide-Cy0Kt6Ys.js} +105 -105
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-pRoVDEEM.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CX4s7NYy.js} +1 -1
  8. package/dist/{Group-D30WEl2L.js → Group-0hMArGNs.js} +1 -1
  9. package/dist/{Group-DevhimQn.js → Group-BKFZMvZg.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-BY3nr67e.js → Group.vue_vue_type_script_setup_true_lang-st4plK2R.js} +18 -18
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CPvumpiM.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-8zW2KIMn.js} +30 -30
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-hEPchEwW.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-UhuYuL-A.js} +4129 -4125
  13. package/dist/{Ingredient-CiJSeTgO.js → Ingredient-CvE0xujL.js} +20 -20
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-Cnq9QAeQ.js → InventoryBinding.vue_vue_type_script_setup_true_lang-iEhZ4_5G.js} +2 -2
  15. package/dist/{LinkProductSideSheet-CJxffg6I.js → LinkProductSideSheet-CbppLDSB.js} +45 -45
  16. package/dist/{MenuSetting-BMuUIgLN.js → MenuSetting-CQ9HnQKx.js} +47 -47
  17. package/dist/{PrintRoute-Uu2n0dAY.js → PrintRoute-Cc81zV6Q.js} +39 -39
  18. package/dist/{Product-e81DLAaw.js → Product-kFoTn7zI.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-1axfwskP.js → Product.vue_vue_type_script_setup_true_lang-BVF9SBEL.js} +128 -128
  20. package/dist/{ProductInternalTools-BiK5b7KA.js → ProductInternalTools-CwxPRqTy.js} +66 -66
  21. package/dist/Products-IBe-R8XN.js +334 -0
  22. package/dist/{Publish-d_T1ROxG.js → Publish-BE-PPNO8.js} +29 -29
  23. package/dist/{Recipe-QIACzb3h.js → Recipe-Ddts2It2.js} +24 -24
  24. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-01qpukRE.js → RuleView.vue_vue_type_script_setup_true_lang-DQjE4JRi.js} +369 -369
  25. package/dist/{Scheduler-VxoCoh9o.js → Scheduler-CqP0Ha2K.js} +11 -11
  26. package/dist/{ServingSequence-C7aNpyh4.js → ServingSequence-WpneAUiB.js} +44 -44
  27. package/dist/{Setting-BzoqHU2T.js → Setting-CNGZaUUT.js} +17 -17
  28. package/dist/{Subcategory-dyK9h6SV.js → Subcategory-BVN0OH_q.js} +51 -51
  29. package/dist/{Takeaway-C3UnFVOa.js → Takeaway-BtnGTcvW.js} +1 -1
  30. package/dist/{Takeaway-DxLGfrmv.js → Takeaway-LFslRotB.js} +13 -13
  31. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-zsgXKNRt.js → Takeaway.vue_vue_type_script_setup_true_lang-CJZfd5JB.js} +28 -28
  32. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-Ba0ZuCdS.js → Thumbnail.vue_vue_type_script_setup_true_lang-CI8eK98T.js} +27 -27
  33. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-Xfmvx9wx.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-CfA400oN.js} +4 -4
  34. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang--vNq7F0Z.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-SNBrW4Or.js} +13 -13
  35. package/dist/{Unit-Clc8AYHy.js → Unit-kL0Wjfb6.js} +8 -8
  36. package/dist/{Variant-DOGe2aJK.js → Variant-Cj82yGYE.js} +24 -24
  37. package/dist/{_id_-Bbc2mu9G.js → _id_-B-guZ25K.js} +28 -28
  38. package/dist/app-D4se7Sr4.js +1643 -0
  39. package/dist/{app-DQD4sPc8.js → app-DiVDYcc9.js} +1 -1
  40. package/dist/app.js +2 -2
  41. package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +2 -0
  42. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  43. package/dist/assets/{linked-status-DojmxFzq.js → linked-status-C4nECq-3.js} +5 -5
  44. package/dist/assets/{menu-export-rmsdV9dK.js → menu-export-PPICN1VA.js} +5 -3
  45. package/dist/assets/{override-menu-CVjWw9he.js → override-menu-BaYdZfDk.js} +5 -5
  46. package/dist/assets/{validate-menu-BB1XuZ9d.js → validate-menu-DCyVSa7R.js} +2 -2
  47. package/dist/{catalog-ku3nqGmL.js → catalog-BTsgJdVe.js} +1 -1
  48. package/dist/{catalogSetting-CpgLgy9o.js → catalogSetting-BNYPChMH.js} +1 -1
  49. package/dist/{currency-B58wqs-1.js → currency-2KuoTCt5.js} +1 -1
  50. package/dist/dayjs.min-BE8PtbAQ.js +7 -0
  51. package/dist/{index-BGm9S8Ih.js → index-GaHNc4iH.js} +43 -43
  52. package/dist/{index-CPY_DjD2.js → index-UthDVOpX.js} +31 -31
  53. package/dist/{index-ByMVMoTu.js → index-fLVJt8Pt.js} +1 -1
  54. package/dist/{index.vue_vue_type_script_setup_true_lang-IHmRgZTC.js → index.vue_vue_type_script_setup_true_lang-CsnEYmWv.js} +244 -269
  55. package/dist/{item-DotiWZRv.js → item-DYsNPLH9.js} +759 -754
  56. package/dist/{jszip.min-OZZMb1gD.js → jszip.min-CLQSAAHL.js} +7 -6
  57. package/dist/{menu-v_Cm5BNh.js → menu-Btb1sPTh.js} +1 -1
  58. package/dist/{menuV2-DsvYmLeh.js → menuV2-Bfj5ljzI.js} +129 -129
  59. package/dist/{priceTier-BQeJLJUu.js → priceTier-DHp_DiBo.js} +1 -1
  60. package/dist/{rules-D3qosTfl.js → rules-B5QEx6OC.js} +11 -11
  61. package/dist/{scheduler-B32ag1lR.js → scheduler-CI-LJfho.js} +29 -29
  62. package/dist/{toExcel-CIrCsrWL.js → toExcel-CHdQxEnw.js} +2 -2
  63. package/dist/{unit-y1on6-W3.js → unit-D53f5n16.js} +35 -35
  64. package/package.json +2 -1
  65. package/dist/Products-DOIcfgzd.js +0 -291
  66. package/dist/app-BSpY6Pgy.js +0 -363
  67. package/dist/dayjs.min-Dj2ONTtr.js +0 -6
@@ -1,291 +0,0 @@
1
- import { defineComponent as E, computed as g, ref as j, resolveComponent as M, createBlock as y, openBlock as m, unref as e, withCtx as c, createElementVNode as i, toDisplayString as q, createVNode as o, createCommentVNode as G, createElementBlock as A, Fragment as P } from "vue";
2
- import { D as F } from "./dayjs.min-Dj2ONTtr.js";
3
- import { J as oe, F as ne } from "./jszip.min-OZZMb1gD.js";
4
- import { u as J, G as W, B as R, H, A as K, D as ae, I as re, J as U, K as se } from "./index.vue_vue_type_script_setup_true_lang-IHmRgZTC.js";
5
- import { w as ie } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-hEPchEwW.js";
6
- import { useCoreStore as Z, useI18n as le } from "@feedmepos/mf-common";
7
- import { useDialog as Q, useDialogChild as ue, useSnackbar as X, useBreakpoints as ce, FmButtonVariant as V, FmButtonColorThemeVariant as h } from "@feedmepos/ui-library";
8
- import { _ as $ } 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-v_Cm5BNh.js";
12
- import { u as _e } from "./item-DotiWZRv.js";
13
- import { _ as L, a as ve } from "./Product.vue_vue_type_script_setup_true_lang-1axfwskP.js";
14
- import { L as O } from "./LinkProductSideSheet-CJxffg6I.js";
15
- import { _ as ge } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang--vNq7F0Z.js";
16
- import { u as be } from "./Thumbnail.vue_vue_type_script_setup_true_lang-Ba0ZuCdS.js";
17
- import { m as ye } from "./toExcel-CIrCsrWL.js";
18
- const ke = { class: "space-y-24 mb-24" }, xe = ["innerHTML"], he = { class: "flex justify-end gap-8" }, Se = /* @__PURE__ */ E({
19
- __name: "ConfirmActionDialog",
20
- props: {
21
- description: {},
22
- value: {},
23
- message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
24
- },
25
- setup(C) {
26
- const t = C, S = g(() => t.message.replace("[[value]]", t.value)), k = j(""), r = Q(), { emitAction: x } = ue();
27
- return (d, s) => {
28
- const p = M("FmTextField"), f = M("FmButton"), _ = M("FmForm");
29
- return m(), y(_, {
30
- "on-validation-success": () => e(x)("primary"),
31
- "blame-form-child-on-validation-failed": ""
32
- }, {
33
- default: c(() => [
34
- i("div", ke, [
35
- i("div", null, q(d.description), 1),
36
- i("div", { innerHTML: S.value }, null, 8, xe),
37
- i("div", null, [
38
- o(p, {
39
- modelValue: k.value,
40
- "onUpdate:modelValue": [
41
- s[0] || (s[0] = (l) => k.value = l),
42
- s[1] || (s[1] = () => {
43
- })
44
- ],
45
- placeholder: d.value,
46
- rules: [(l) => l === d.value || "Value does not match"]
47
- }, null, 8, ["modelValue", "placeholder", "rules"])
48
- ]),
49
- i("div", he, [
50
- o(f, {
51
- label: "Cancel",
52
- variant: "secondary",
53
- onClick: s[2] || (s[2] = (l) => e(r).close())
54
- }),
55
- o(f, {
56
- label: "Confirm",
57
- type: "submit"
58
- })
59
- ])
60
- ])
61
- ]),
62
- _: 1
63
- }, 8, ["on-validation-success"]);
64
- };
65
- }
66
- }), Me = /* @__PURE__ */ E({
67
- __name: "Migrate",
68
- setup(C) {
69
- const t = J(), S = Z(), k = X(), { minor: r } = W(k), x = j(!1), d = Q();
70
- async function s() {
71
- p.value || x.value || d.open({
72
- title: "Migrate to new version",
73
- contentComponent: Se,
74
- contentComponentProps: {
75
- value: "MIGRATE",
76
- description: "Do you want to migrate to new version? Once migrate it will unable to revert to the older version."
77
- }
78
- }).onPrimary(async () => {
79
- d.close(), await r(
80
- async () => {
81
- await t.migrate(), setTimeout(() => {
82
- window.location.reload();
83
- }, 2e3);
84
- },
85
- {
86
- isLoading: x,
87
- customId: t.state.menu._id,
88
- message: "Migrating menu",
89
- successMessage: "Migration completed"
90
- }
91
- );
92
- });
93
- }
94
- 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;
99
- });
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, _) => {
101
- const l = M("FmSnackbar");
102
- return !p.value && e(t).version !== e(K.F_MENU_VERSION).enum.v4 ? (m(), y(l, {
103
- key: 0,
104
- class: "!max-w-full",
105
- title: "New version of menu is out now!",
106
- 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.",
107
- variant: "info",
108
- action: "Migrate",
109
- "z-index": 0,
110
- onOnAction: s
111
- })) : G("", !0);
112
- };
113
- }
114
- }), we = "/assets/menu-export-rmsdV9dK.js", Ce = { class: "flex-1 flex justify-between gap-8 pl-8" }, Fe = { class: "flex items-center" }, Ve = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, $e = { class: "fm-typo-en-body-md-600 font-semibold" }, Ee = { class: "flex gap-8" }, Je = /* @__PURE__ */ E({
115
- __name: "Products",
116
- setup(C) {
117
- const { t } = le(), S = Z(), 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)),
119
- _id: r.state.menu._id,
120
- _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;
124
- });
125
- async function l(u, n) {
126
- const v = new oe();
127
- for (let w = 0; w < u.length; w++)
128
- v.file(`${n[w]}.xlsx`, u[w]);
129
- const a = await v.generateAsync({ type: "blob" });
130
- ne.saveAs(a, `books_${F().format("DD-MM-YYYY_HH-mm")}.zip`);
131
- }
132
- async function b() {
133
- await k.minor(
134
- async () => {
135
- if (await r.readMenu(), r.version === K.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(
141
- we,
142
- JSON.stringify({
143
- menu: u,
144
- attributeSettings: S.itemAttributeSettings.value
145
- })
146
- );
147
- await l(a, v);
148
- } else {
149
- const u = ye(f.value), n = `menu_${F().format("DD-MM-YYYY_HH-mm")}`;
150
- await ie(u, `${n}.xlsx`, {
151
- bookType: "xlsx",
152
- bookSST: !0,
153
- type: "array",
154
- compression: !0
155
- });
156
- }
157
- },
158
- { successMessage: "Menu exported", customId: r.state.menu._id }
159
- );
160
- }
161
- const {
162
- menuItems: T,
163
- categories: I,
164
- linkItemRules: D,
165
- handleSubmit: N,
166
- catalogManager: Y,
167
- schedulerManager: B
168
- } = be(!1), ee = ce(), te = g(() => ee.breakpoints.value.xs);
169
- return fe().resetOnMount(), (u, n) => {
170
- const v = M("fm-button");
171
- return m(), y(de, {
172
- heading: e(t)("menu.products.title")
173
- }, {
174
- default: c(() => [
175
- o(Me),
176
- o(ve)
177
- ]),
178
- "append-heading": c(() => [
179
- i("div", Ce, [
180
- i("div", Fe, [
181
- i("div", Ve, [
182
- i("p", $e, q(_.value), 1)
183
- ])
184
- ]),
185
- i("div", Ee, [
186
- te.value ? (m(), y(L, { key: 1 }, {
187
- default: c(({ trigger: a }) => [
188
- o(me, null, {
189
- default: c(() => [
190
- o(z, {
191
- label: e(t)("menu.products.actions.export"),
192
- onClick: b
193
- }, null, 8, ["label"]),
194
- o(z, {
195
- label: e(t)("menu.products.actions.import"),
196
- onClick: a
197
- }, null, 8, ["label", "onClick"])
198
- ]),
199
- _: 2
200
- }, 1024)
201
- ]),
202
- _: 1
203
- })) : (m(), A(P, { key: 0 }, [
204
- o(ge, null, {
205
- default: c(({ trigger: a }) => [
206
- o(v, {
207
- label: e(t)("menu.tree_editor.title"),
208
- "bg-color": e(h).NeutralGray100,
209
- "text-color": e(h).TypoSecondary,
210
- variant: e(V).Primary,
211
- onClick: a
212
- }, null, 8, ["label", "bg-color", "text-color", "variant", "onClick"])
213
- ]),
214
- _: 1
215
- }),
216
- o(v, {
217
- "bg-color": e(h).NeutralGray100,
218
- "text-color": e(h).TypoSecondary,
219
- variant: e(V).Primary,
220
- label: e(t)("menu.products.actions.export"),
221
- onClick: b
222
- }, null, 8, ["bg-color", "text-color", "variant", "label"]),
223
- o(L, null, {
224
- default: c(({ trigger: a }) => [
225
- o(v, {
226
- "bg-color": e(h).NeutralGray100,
227
- "text-color": e(h).TypoSecondary,
228
- variant: e(V).Primary,
229
- label: e(t)("menu.products.actions.import"),
230
- onClick: a
231
- }, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
232
- ]),
233
- _: 1
234
- })
235
- ], 64)),
236
- _.value > 0 ? (m(), A(P, { key: 2 }, [
237
- x.value.create ? (m(), y($, {
238
- key: 0,
239
- label: e(t)("menu.products.actions.add"),
240
- "prepend-icon": "add",
241
- onClick: n[0] || (n[0] = (a) => e(d).create(null))
242
- }, null, 8, ["label"])) : s.value ? (m(), y(O, {
243
- key: 1,
244
- "categorized-items": e(Y).linkableItems.value,
245
- "initial-value": e(Y).currentItems.value,
246
- "show-variant": !1,
247
- "menu-items": e(T),
248
- categories: e(I),
249
- "link-item-rules": e(D),
250
- "no-scheduler": s.value,
251
- onSubmit: e(N)
252
- }, {
253
- default: c(({ trigger: a }) => [
254
- o($, {
255
- label: e(t)("menu.products.actions.link"),
256
- "prepend-icon": "link",
257
- onClick: a
258
- }, null, 8, ["label", "onClick"])
259
- ]),
260
- _: 1
261
- }, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : (m(), y(O, {
262
- key: 2,
263
- "categorized-items": e(B).linkableItems.value,
264
- "initial-value": e(B).currentItems.value,
265
- "show-variant": !1,
266
- "menu-items": e(T),
267
- categories: e(I),
268
- "link-item-rules": e(D),
269
- "no-scheduler": s.value,
270
- onSubmit: e(N)
271
- }, {
272
- default: c(({ trigger: a }) => [
273
- o($, {
274
- label: e(t)("menu.products.actions.apply_scheduler"),
275
- onClick: a
276
- }, null, 8, ["label", "onClick"])
277
- ]),
278
- _: 1
279
- }, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"]))
280
- ], 64)) : G("", !0)
281
- ])
282
- ])
283
- ]),
284
- _: 1
285
- }, 8, ["heading"]);
286
- };
287
- }
288
- });
289
- export {
290
- Je as default
291
- };