@feedmepos/mf-menu 0.32.46-dev.2 → 0.32.46

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 (66) hide show
  1. package/dist/{App-DnmPW7GQ.js → App-CNSCmSlO.js} +7 -7
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BN_pomak.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Dfp2ANHQ.js} +3 -3
  3. package/dist/{Catalog-gxj-MZB8.js → Catalog-beKeWiZH.js} +6 -6
  4. package/dist/{Category-CqWHFR6I.js → Category-BFLuZkJe.js} +5 -5
  5. package/dist/{Category-JHb56PfQ.js → Category-DUbQ4H7b.js} +4 -4
  6. package/dist/{CookingGuide-DNMfIDDf.js → CookingGuide-DFfSrALI.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BYdToHa3.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bdwyjy4v.js} +1 -1
  8. package/dist/{Group-DXEgfQ_e.js → Group-DOwOFlWe.js} +3 -3
  9. package/dist/{Group-bxjyN23A.js → Group-Dd2aZOB4.js} +1 -1
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-DPhYCl15.js → Group.vue_vue_type_script_setup_true_lang-_KWjLLDJ.js} +8 -8
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DAsxXqGu.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-C8eQ7e1r.js} +5 -5
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BuD8TeFi.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Ckv9GH8J.js} +3208 -3208
  13. package/dist/{Ingredient-BAnjcaO0.js → Ingredient-DmMRcId1.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CppjxcTA.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BCYTY2mq.js} +2 -2
  15. package/dist/{LinkProductSideSheet-CvWcioxX.js → LinkProductSideSheet-ClQgUxuK.js} +3 -3
  16. package/dist/{MenuSetting-DCQM7rh6.js → MenuSetting-BvcvlLdQ.js} +5 -5
  17. package/dist/{PrintRoute-Be0WG4oQ.js → PrintRoute-CkBY25oP.js} +4 -4
  18. package/dist/{Product-DfYmo4vJ.js → Product-BaBnkf6b.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-BsRZ0VVW.js → Product.vue_vue_type_script_setup_true_lang-Cp6mMmyN.js} +13 -13
  20. package/dist/{ProductInternalTools-D2QTAjE7.js → ProductInternalTools-DSUvws12.js} +6 -6
  21. package/dist/Products-DFIdy__F.js +307 -0
  22. package/dist/{Publish-BfEtLeeh.js → Publish-DHdq__q3.js} +3 -3
  23. package/dist/{Recipe-ssNUNy2j.js → Recipe-BMRmhxa7.js} +4 -4
  24. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-DHnuxBck.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BG9ShMmO.js} +1 -1
  25. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-CkpwtUSB.js → RuleView.vue_vue_type_script_setup_true_lang-DvlHPa_5.js} +366 -366
  26. package/dist/{Scheduler-CAUHWrZs.js → Scheduler-BJvpYBQS.js} +3 -3
  27. package/dist/{ServingSequence-D12rqxa8.js → ServingSequence-BIt86YO4.js} +3 -3
  28. package/dist/{Setting-pJ06C7wS.js → Setting-DrfwhTG3.js} +5 -5
  29. package/dist/{Subcategory-Dfd-qx6m.js → Subcategory-wVEIoIa-.js} +7 -7
  30. package/dist/{Takeaway-Bnat0taD.js → Takeaway-3yve0nwN.js} +4 -4
  31. package/dist/{Takeaway-Cv-kA3M_.js → Takeaway-DpG5pggY.js} +1 -1
  32. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-9aZi7wvY.js → Takeaway.vue_vue_type_script_setup_true_lang-CDrDWuLP.js} +6 -6
  33. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-C3Sk0LVd.js → Thumbnail.vue_vue_type_script_setup_true_lang-DgKx0aBJ.js} +4 -4
  34. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-5RV7_0Wc.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-DGzGvWli.js} +1 -1
  35. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-BBXAoJje.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-Cg1_gsJZ.js} +2 -2
  36. package/dist/{TranslationViewChip.vue_vue_type_script_setup_true_lang-CIGgeuKb.js → TranslationViewChip.vue_vue_type_script_setup_true_lang-w63nUs1m.js} +1 -1
  37. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D9EEpjV6.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D4q-luQO.js} +14 -14
  38. package/dist/{Unit-DeegDDRz.js → Unit-BTKfmyIp.js} +2 -2
  39. package/dist/{Variant-D8WwGu3E.js → Variant-w-2yYwaD.js} +5 -5
  40. package/dist/{_id_-BfOGbmqs.js → _id_-CDuA4GHw.js} +9 -9
  41. package/dist/{app-DhZxk0zL.js → app-CK_a6mY6.js} +1 -1
  42. package/dist/{app-BmAr9vNI.js → app-D8o1IXBC.js} +35 -32
  43. package/dist/app.js +1 -1
  44. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  45. package/dist/assets/{linked-status-CxpcEFX9.js → linked-status-DbomyNrO.js} +5 -5
  46. package/dist/assets/{menu-export-C09ZbTRq.js → menu-export-CW4q2pkh.js} +2 -2
  47. package/dist/assets/{override-menu-0rFjySh6.js → override-menu-B_mBG1eT.js} +5 -5
  48. package/dist/assets/{validate-menu-cO19zy8y.js → validate-menu-DbDPxacI.js} +2 -2
  49. package/dist/{catalog-tNpB0Dhn.js → catalog-DldA6Q9b.js} +1 -1
  50. package/dist/{catalogSetting-BRnA4v49.js → catalogSetting-B-_kbwka.js} +1 -1
  51. package/dist/{currency-CyKauaRc.js → currency-BykSseoo.js} +1 -1
  52. package/dist/{dayjs.min-ipgoM27T.js → dayjs.min-DHfnEad1.js} +2 -2
  53. package/dist/{index-CXquA22H.js → index-CcpNd77G.js} +4 -4
  54. package/dist/{index-BGm2uHNk.js → index-DvCo6KWo.js} +6 -6
  55. package/dist/{index.vue_vue_type_script_setup_true_lang-D6HyeIid.js → index.vue_vue_type_script_setup_true_lang-BaJS8yWr.js} +169 -169
  56. package/dist/{item-Cik-YX-L.js → item-0l56gmoR.js} +16 -16
  57. package/dist/{jszip.min-D22BefT1.js → jszip.min-D-L87l7W.js} +384 -384
  58. package/dist/{menu-ag-37Ofg.js → menu-PgW6AVCf.js} +1 -1
  59. package/dist/{menuV2-DZDWxmas.js → menuV2-Ddb0Onkc.js} +81 -81
  60. package/dist/{priceTier-BmDl3J-3.js → priceTier-DuXEtDOE.js} +1 -1
  61. package/dist/{rules-pJdF9REd.js → rules-BU13b5QQ.js} +4 -4
  62. package/dist/{scheduler-DRHXK6kX.js → scheduler-CGODPah6.js} +4 -4
  63. package/dist/{toExcel-5kDfvPVG.js → toExcel-YqRbHTty.js} +2 -2
  64. package/dist/{unit-CIlgFZ50.js → unit-CumoTkJV.js} +2 -2
  65. package/package.json +1 -1
  66. package/dist/Products-BhY4Cwaz.js +0 -291
@@ -1,291 +0,0 @@
1
- import { defineComponent as E, computed as g, ref as O, resolveComponent as M, createBlock as y, openBlock as m, unref as e, withCtx as c, createElementVNode as i, toDisplayString as j, createVNode as o, createCommentVNode as G, createElementBlock as A, Fragment as P } from "vue";
2
- import { D as F } from "./dayjs.min-ipgoM27T.js";
3
- import { J as oe, F as ne } from "./jszip.min-D22BefT1.js";
4
- import { u as J, B as W, z as R, D as z, y as Z, A as ae, G as re, H, I as se } from "./index.vue_vue_type_script_setup_true_lang-D6HyeIid.js";
5
- import { w as ie } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-BuD8TeFi.js";
6
- import { useCoreStore as K, useI18n as le } from "@feedmepos/mf-common";
7
- import { useDialog as Q, useDialogChild as ue, useSnackbar as X, 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 U } 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-ag-37Ofg.js";
12
- import { u as _e } from "./item-Cik-YX-L.js";
13
- import { _ as L, a as ve } from "./Product.vue_vue_type_script_setup_true_lang-BsRZ0VVW.js";
14
- import { L as q } from "./LinkProductSideSheet-CvWcioxX.js";
15
- import { _ as ge } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D9EEpjV6.js";
16
- import { u as be } from "./Thumbnail.vue_vue_type_script_setup_true_lang-C3Sk0LVd.js";
17
- import { m as ye } from "./toExcel-5kDfvPVG.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(w) {
26
- const t = w, S = g(() => t.message.replace("[[value]]", t.value)), k = O(""), 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, j(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(w) {
69
- const t = J(), S = K(), k = X(), { minor: r } = W(k), x = O(!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: z.F_FEATURE.enum.menuV4, posVersion: b.posVersion }));
98
- return _.length ? `Upgrade POS to V${R.Pos.minVersionToUse(z.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
- }), Ce = "/assets/menu-export-C09ZbTRq.js", we = { 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(w) {
117
- const { t } = le(), S = K(), 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 = H.flatten(p.value.map((n) => n.items));
123
- return H.uniqBy(u, (n) => n._id).length;
124
- });
125
- async function l(u, n) {
126
- const v = new oe();
127
- for (let C = 0; C < u.length; C++)
128
- v.file(`${n[C]}.xlsx`, u[C]);
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
- Ce,
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", we, [
180
- i("div", Fe, [
181
- i("div", $e, [
182
- i("p", Ve, j(_.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(U, {
191
- label: e(t)("menu.products.actions.export"),
192
- onClick: b
193
- }, null, 8, ["label"]),
194
- o(U, {
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(q, {
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(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(q, {
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(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
- };