@feedmepos/mf-menu 0.32.45 → 0.32.46-dev.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 (72) hide show
  1. package/dist/{App-CczmyQeJ.js → App-npeQTqd2.js} +7 -7
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BscsJpMV.js → ApplyProduct.vue_vue_type_script_setup_true_lang--prlJD_G.js} +3 -3
  3. package/dist/{Catalog-RU_6keJm.js → Catalog-jPzJ-CrL.js} +44 -44
  4. package/dist/{Category-CwEXbsDv.js → Category-B7pQ08QL.js} +24 -24
  5. package/dist/{Category-7Fg2kD0h.js → Category-BWZpgiNC.js} +19 -19
  6. package/dist/{CookingGuide-DFu5VStf.js → CookingGuide-BFEE1EJc.js} +105 -105
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CeNfLbfq.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-D69zZiPR.js} +1 -1
  8. package/dist/{Group-C6vQeBnj.js → Group-DvZUfjSC.js} +1 -1
  9. package/dist/{Group-l-YpAi6B.js → Group-M4tXSj5P.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-1UdOBdv-.js → Group.vue_vue_type_script_setup_true_lang-DeVE8KLf.js} +19 -19
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-C309DrLU.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-pbZw9da3.js} +30 -30
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-C903fhuj.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Byzowjkm.js} +3105 -3104
  13. package/dist/{Ingredient-CHqDo-GY.js → Ingredient-BdHJVta5.js} +20 -20
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CXHHlrI0.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BSwR_wpJ.js} +2 -2
  15. package/dist/{LinkProductSideSheet-DY32g33Q.js → LinkProductSideSheet-B03Oabpv.js} +45 -45
  16. package/dist/{MenuSetting-DhbxlKuU.js → MenuSetting-DTWJOTMd.js} +47 -47
  17. package/dist/{PrintRoute-CToZ0ClG.js → PrintRoute-CPux5kB3.js} +39 -39
  18. package/dist/{Product-Cpg32wpg.js → Product-laMGJ8d-.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-BC2KG1q4.js → Product.vue_vue_type_script_setup_true_lang-41pkSI-X.js} +93 -93
  20. package/dist/{ProductInternalTools-wH9BN1NK.js → ProductInternalTools-zNNMVjtn.js} +66 -66
  21. package/dist/Products-BwKBLOcx.js +307 -0
  22. package/dist/{Publish-CJS_836k.js → Publish-DVWIjGI_.js} +29 -29
  23. package/dist/{Recipe-Cz7hivmM.js → Recipe-DfDGxruI.js} +24 -24
  24. package/dist/RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-Dqec903W.js +144 -0
  25. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CRLzqgQe.js → RuleView.vue_vue_type_script_setup_true_lang-COsEN8g1.js} +176 -176
  26. package/dist/{Scheduler-QuWCnEJw.js → Scheduler-Cai-wMn7.js} +11 -11
  27. package/dist/{ServingSequence-CqK5Sjmq.js → ServingSequence-Do-C3Sn4.js} +44 -44
  28. package/dist/{Setting-C3tKUfsm.js → Setting-DSjLtPBJ.js} +17 -17
  29. package/dist/{Subcategory-DCtTOPUj.js → Subcategory-DSeuxOGy.js} +54 -54
  30. package/dist/{Takeaway-BnB1OFnK.js → Takeaway-C1srIF8q.js} +1 -1
  31. package/dist/{Takeaway-Fi8SAH2t.js → Takeaway-DwSbGolk.js} +13 -13
  32. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-Cbz7Qt_g.js → Takeaway.vue_vue_type_script_setup_true_lang-Bx8gpmLd.js} +33 -33
  33. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-CPM_muXB.js → Thumbnail.vue_vue_type_script_setup_true_lang-DDjpVFJj.js} +27 -27
  34. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-BpL8UrFY.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-Cd4RGHXf.js} +1 -1
  35. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DtkzQeq4.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-Bwo49sg8.js} +5 -5
  36. package/dist/{TranslationViewChip.vue_vue_type_script_setup_true_lang-CHT7Xozn.js → TranslationViewChip.vue_vue_type_script_setup_true_lang-COt8eJR8.js} +1 -1
  37. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-BG9vXVnJ.js +5767 -0
  38. package/dist/{Unit-5yE2-y9D.js → Unit-CLIdovqU.js} +8 -8
  39. package/dist/{Variant-C7lIdRID.js → Variant-CbX_HaWr.js} +14 -14
  40. package/dist/{_id_-08ykp97a.js → _id_-CF6hSxMn.js} +28 -28
  41. package/dist/{app-DPovSnb_.js → app-DXWLC6wZ.js} +1 -1
  42. package/dist/app-jYjowude.js +2286 -0
  43. package/dist/app.js +1 -1
  44. package/dist/apps/mf-menu/src/api/index.d.ts +1 -1
  45. package/dist/apps/mf-menu/src/api/menu.d.ts +14 -5
  46. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  47. package/dist/assets/{linked-status-WT6deoPw.js → linked-status-Dz4kVy3U.js} +5 -5
  48. package/dist/assets/{menu-export-DxtFXMED.js → menu-export-Bjrlg38p.js} +2 -2
  49. package/dist/assets/{override-menu-BJGRdWWE.js → override-menu-h6635NTp.js} +5 -5
  50. package/dist/assets/{validate-menu-B_tmkHe7.js → validate-menu-ILBC_n35.js} +2 -2
  51. package/dist/{catalog-D7Jjqj3-.js → catalog-ByziW0k0.js} +1 -1
  52. package/dist/{catalogSetting-Bg_zMUrV.js → catalogSetting-DFtnnh_u.js} +1 -1
  53. package/dist/{currency-DDxFMjAI.js → currency-Dow_7SjH.js} +1 -1
  54. package/dist/dayjs.min-J4d4ye_W.js +7 -0
  55. package/dist/{index-BlLRjkMF.js → index-Bx_mNoGq.js} +31 -31
  56. package/dist/{index-Cq2MVpMv.js → index-Cud1HVR_.js} +30 -30
  57. package/dist/{index.vue_vue_type_script_setup_true_lang-C6IVvAua.js → index.vue_vue_type_script_setup_true_lang-BBIM8-iI.js} +6958 -6901
  58. package/dist/{item-Bq6SCc7D.js → item-CFhsU4ZX.js} +16 -16
  59. package/dist/{jszip.min-1MrCGuHF.js → jszip.min-C6M7_p-M.js} +7 -6
  60. package/dist/{menu-CKA9uouu.js → menu-ByysjB4i.js} +1 -1
  61. package/dist/{menuV2-DBkrmeha.js → menuV2-Clp-zydr.js} +164 -164
  62. package/dist/{priceTier-Cxr9IcVP.js → priceTier-DMPEyXYB.js} +1 -1
  63. package/dist/{rules-DFWR7a3m.js → rules-D7jis1av.js} +12 -12
  64. package/dist/{scheduler-HKff8Ty2.js → scheduler-Cdam4laD.js} +29 -29
  65. package/dist/{toExcel-DopYrxBW.js → toExcel-B2mXomTF.js} +2 -2
  66. package/dist/{unit-5G600HMJ.js → unit-BWhsHi2q.js} +35 -35
  67. package/package.json +1 -1
  68. package/dist/Products-CpINHaH6.js +0 -291
  69. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DoIgiwHh.js +0 -6130
  70. package/dist/app-CA4g3v2n.js +0 -363
  71. package/dist/dayjs.min-BVOO8wJG.js +0 -6
  72. package/dist/index-CG7GFWlC.js +0 -246
@@ -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-BVOO8wJG.js";
3
- import { J as oe, F as ne } from "./jszip.min-1MrCGuHF.js";
4
- import { u as J, G as W, B as R, H, A as Z, D as ae, I as re, J as U, K as se } from "./index.vue_vue_type_script_setup_true_lang-C6IVvAua.js";
5
- import { w as ie } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-C903fhuj.js";
6
- import { useCoreStore as K, useI18n as le } from "@feedmepos/mf-common";
7
- import { useDialog as X, useDialogChild as ue, useSnackbar as Q, useBreakpoints as ce, FmButtonVariant as $, FmButtonColorThemeVariant as h } from "@feedmepos/ui-library";
8
- import { _ as V } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
9
- import { _ as me, a as z } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
10
- import { _ as de } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
11
- import { u as pe, a as fe } from "./menu-CKA9uouu.js";
12
- import { u as _e } from "./item-Bq6SCc7D.js";
13
- import { _ as L, a as ve } from "./Product.vue_vue_type_script_setup_true_lang-BC2KG1q4.js";
14
- import { L as O } from "./LinkProductSideSheet-DY32g33Q.js";
15
- import { _ as ge } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DoIgiwHh.js";
16
- import { u as be } from "./Thumbnail.vue_vue_type_script_setup_true_lang-CPM_muXB.js";
17
- import { m as ye } from "./toExcel-DopYrxBW.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 = X(), { 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 = K(), k = Q(), { minor: r } = W(k), x = j(!1), d = X();
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(Z.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-DxtFXMED.js", Ce = { class: "flex-1 flex justify-between gap-8 pl-8" }, Fe = { class: "flex items-center" }, $e = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Ve = { class: "fm-typo-en-body-md-600 font-semibold" }, Ee = { class: "flex gap-8" }, Je = /* @__PURE__ */ E({
115
- __name: "Products",
116
- setup(C) {
117
- const { t } = le(), S = K(), k = W(Q()), 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 === Z.F_MENU_VERSION.enum.v4) {
136
- const u = r.state.menu, n = F().format("DD-MM-YYYY_HH-mm"), v = [
137
- `menu_${n}`,
138
- `addonGroup_${n}`,
139
- `itemLinkedAddon_${n}`
140
- ], a = await se(
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: D,
164
- linkItemRules: I,
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", $e, [
182
- i("p", Ve, 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($).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($).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($).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(V, {
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(D),
249
- "link-item-rules": e(I),
250
- "no-scheduler": s.value,
251
- onSubmit: e(N)
252
- }, {
253
- default: c(({ trigger: a }) => [
254
- o(V, {
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(D),
268
- "link-item-rules": e(I),
269
- "no-scheduler": s.value,
270
- onSubmit: e(N)
271
- }, {
272
- default: c(({ trigger: a }) => [
273
- o(V, {
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
- };