@feedmepos/mf-menu 1.0.1-dev.2 → 1.0.1-dev.4

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-CdIN4s5n.js → App-DhYTzDY0.js} +546 -533
  2. package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-CoHlJwpz.js → BindingTable.vue_vue_type_script_setup_true_lang-BUiZxX6w.js} +1 -1
  3. package/dist/{Catalog-DjAubC9s.js → Catalog-DWj_TPwj.js} +4 -4
  4. package/dist/{CatalogBinding-5JNRTbyZ.js → CatalogBinding-DCUFGwTy.js} +3 -3
  5. package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-BorOjk1k.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-BYeOydGv.js} +3 -3
  6. package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-CkF7O_V-.js → CatalogEditor.vue_vue_type_script_setup_true_lang-BeuAv0jC.js} +6 -6
  7. package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-3fL43MuR.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-EnajbZtY.js} +3 -3
  8. package/dist/{Category-COug7fz8.js → Category-B9jpP8pf.js} +2 -2
  9. package/dist/{Category-BbiN4hd7.js → Category-C9BtFwBO.js} +5 -5
  10. package/dist/{CategoryList.vue_vue_type_script_setup_true_lang-B_9aPMIN.js → CategoryList.vue_vue_type_script_setup_true_lang-C11l9kUD.js} +92 -91
  11. package/dist/{CookingGuide-Dg7kuF6l.js → CookingGuide-xx0mHc6j.js} +262 -256
  12. package/dist/{Group-BRpmTqyT.js → Group-BkyVQTHZ.js} +5 -5
  13. package/dist/{Group-C-hwlkgJ.js → Group-DaNj2hu9.js} +2 -2
  14. package/dist/{GroupList.vue_vue_type_script_setup_true_lang-DowoJ3WM.js → GroupList.vue_vue_type_script_setup_true_lang-By6udos1.js} +5 -5
  15. package/dist/{Ingredient-BQYnARdC.js → Ingredient-DbV2TbTY.js} +3 -3
  16. package/dist/{LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CgTDkHle.js → LinkProductSideSheet.vue_vue_type_script_setup_true_lang-DS7hUQpE.js} +1 -1
  17. package/dist/{MenuSetting-DsdM2_OW.js → MenuSetting-COJaCmJN.js} +3 -3
  18. package/dist/{OrderPacing-5x2YH-_l.js → OrderPacing-D6y9LBM_.js} +96 -93
  19. package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-DVGJjpiM.js → OrderPacingFields.vue_vue_type_script_setup_true_lang--J9nxeca.js} +1 -1
  20. package/dist/Preview-B19pRXmI.js +325 -0
  21. package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-vmxVZ2ya.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-DwwfXWL8.js} +1 -1
  22. package/dist/{PrintRoute-COkCv4gf.js → PrintRoute-DkZaQWrC.js} +158 -152
  23. package/dist/{Product-BJFb_J4h.js → Product-DkxV4IfT.js} +4 -4
  24. package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang-Tpp8MBYS.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-BuhTMFZF.js} +2 -2
  25. package/dist/{ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-C25Pwqme.js → ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-B_EmJhpN.js} +3 -3
  26. package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-BMAtAK9D.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CniqNe-9.js} +1 -1
  27. package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-Dl4Zr5tx.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-Be9Y5Cc1.js} +1181 -1174
  28. package/dist/ProductInternalTools-CW7gKvtC.js +2147 -0
  29. package/dist/{ProductInventoryDialog-C3ruRWU5.js → ProductInventoryDialog-DA1A9YlU.js} +1 -1
  30. package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-MpdIixqI.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-DDKjs88F.js} +1 -1
  31. package/dist/{ProductList.vue_vue_type_script_setup_true_lang-9_ohgfqE.js → ProductList.vue_vue_type_script_setup_true_lang-63u-Pxh-.js} +2328 -2298
  32. package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-Ctbz-8cd.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-DjrHHLkY.js} +1 -1
  33. package/dist/{Products-DMrjQFfu.js → Products-CFxCduVf.js} +3 -3
  34. package/dist/{Publish-f6g0dIao.js → Publish-C50PRaWB.js} +3 -3
  35. package/dist/{Recipe-p-wxadSN.js → Recipe-CGwAatcb.js} +3 -3
  36. package/dist/{Scheduler-CtebRafn.js → Scheduler-hIe_BdwS.js} +3 -3
  37. package/dist/{ServingSequence-CEd4ywOQ.js → ServingSequence-CIzDiSll.js} +103 -97
  38. package/dist/{Setting-bPKadRu-.js → Setting-Cr6u3Vok.js} +6 -6
  39. package/dist/{Subcategory-DBCnIP0b.js → Subcategory-BYg9Z56P.js} +141 -129
  40. package/dist/{Takeaway-GNRHR5kN.js → Takeaway-BIF4hGTc.js} +2 -2
  41. package/dist/{Takeaway-VBkdW1DM.js → Takeaway-I5kTW17E.js} +5 -5
  42. package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-DvX3k0Jg.js → TakeawayList.vue_vue_type_script_setup_true_lang-Ph6sSiyp.js} +117 -111
  43. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D1qaEVUu.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B3SRYt9b.js} +6 -6
  44. package/dist/{Unit-DbGKIprZ.js → Unit-CHVucFRl.js} +2 -2
  45. package/dist/{Variant-_edSAKif.js → Variant-CS0gRkGz.js} +114 -108
  46. package/dist/{_id_-BNVtBV3q.js → _id_-BpCfEGRx.js} +3 -3
  47. package/dist/{app-BlTv5xag.js → app-BcGXBcUK.js} +420 -409
  48. package/dist/app.js +1 -1
  49. package/dist/apps/mf-menu/src/components/ProductList.vue.d.ts +3 -3
  50. package/dist/apps/mf-menu/src/router/shared.d.ts +33 -0
  51. package/dist/apps/mf-menu/src/sdk/import-export.d.ts +8 -2
  52. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  53. package/dist/assets/{menu-compute-BzchkTYh.js → menu-compute-CFLJZpef.js} +2 -2
  54. package/dist/assets/{validate-menu-CTV_cJNG.js → validate-menu-DPQnAO0-.js} +2 -2
  55. package/dist/mf-menu.css +1 -1
  56. package/dist/{provide-dbE6Qt1z.js → provide-FZ08sGZH.js} +56332 -55258
  57. package/dist/{useActionFeedback-CdY_C_HX.js → useActionFeedback-BNYAkEZw.js} +1 -1
  58. package/package.json +1 -1
  59. package/dist/Preview-AdgGTYlQ.js +0 -321
  60. package/dist/ProductInternalTools-thlSvqbA.js +0 -2906
@@ -1,6 +1,6 @@
1
1
  import { useI18n as y } from "@feedmepos/mf-common";
2
2
  import { useSnackbar as k, SnackbarPosition as m } from "@feedmepos/ui-library";
3
- import { b as w } from "./provide-dbE6Qt1z.js";
3
+ import { b as w } from "./provide-FZ08sGZH.js";
4
4
  function h() {
5
5
  const t = k(), { t: l } = y(), i = w();
6
6
  function g(s, e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-menu",
3
- "version": "1.0.1-dev.2",
3
+ "version": "1.0.1-dev.4",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,321 +0,0 @@
1
- import { defineComponent as M, ref as K, computed as o, shallowRef as Q, watch as T, onBeforeUnmount as X, resolveComponent as L, openBlock as s, createBlock as p, unref as t, withCtx as Y, createElementBlock as U, Fragment as Z, createElementVNode as i, createCommentVNode as w, toDisplayString as h, createVNode as D, withDirectives as ee, vShow as te } from "vue";
2
- import { useI18n as le } from "@feedmepos/mf-common";
3
- import { _ as I } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
4
- import { _ as ae } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
5
- import { b as ue, u as ne, a as se } from "./provide-dbE6Qt1z.js";
6
- function oe(g, r) {
7
- const l = new URL(g);
8
- return l.searchParams.set("parent", r), { src: l.toString(), origin: l.origin };
9
- }
10
- function ie(g, r, l = window) {
11
- return {
12
- post(k) {
13
- var d, v;
14
- (v = (d = g()) == null ? void 0 : d.contentWindow) == null || v.postMessage(k, r);
15
- },
16
- subscribe(k) {
17
- const d = (v) => {
18
- var n;
19
- if (v.origin !== r) return;
20
- const f = (n = g()) == null ? void 0 : n.contentWindow;
21
- !f || v.source !== f || k(v.data);
22
- };
23
- return l.addEventListener("message", d), () => l.removeEventListener("message", d);
24
- }
25
- };
26
- }
27
- const re = { class: "flex flex-wrap items-end gap-16 pb-24" }, me = {
28
- key: 4,
29
- class: "flex flex-col gap-4"
30
- }, ce = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary" }, de = { class: "flex flex-wrap items-start gap-24" }, ve = { class: "relative flex min-w-0 flex-[999_1_480px] flex-col items-center rounded-lg bg-fm-color-neutral-gray-100 p-16" }, pe = ["src", "title"], _e = {
31
- key: 0,
32
- class: "absolute inset-0 flex flex-col items-center justify-center gap-8",
33
- "data-testid": "menu-preview-loading"
34
- }, fe = { class: "text-fm-color-typo-secondary" }, we = {
35
- key: 2,
36
- class: "pt-8 text-fm-color-typo-secondary",
37
- "data-testid": "menu-preview-summary"
38
- }, ge = ["aria-label"], be = { class: "fm-typo-en-body-lg-600" }, he = { class: "flex list-disc flex-col gap-4 pl-16" }, ke = /* @__PURE__ */ M({
39
- __name: "MenuPreview",
40
- props: {
41
- sdk: {},
42
- simulatorUrl: {},
43
- parentOrigin: {}
44
- },
45
- setup(g) {
46
- const r = g, { t: l, locale: k } = le(), d = ue(), v = K(null), f = o(
47
- () => r.simulatorUrl ? oe(
48
- r.simulatorUrl,
49
- r.parentOrigin ?? window.location.origin
50
- ) : null
51
- ), n = f.value ? r.sdk.preview.open({ appLocale: k.value }) : null, x = n ? ne(n.view) : Q({ status: "loading" }), u = o(
52
- () => x.value.status === "ready" ? x.value.value : null
53
- );
54
- let b = null;
55
- T(
56
- v,
57
- (e) => {
58
- b == null || b(), b = e && f.value && n ? n.attach(
59
- ie(() => v.value, f.value.origin)
60
- ) : null;
61
- },
62
- { flush: "post" }
63
- ), X(() => {
64
- b == null || b(), n == null || n.dispose();
65
- });
66
- const S = (e) => !!e && e.state !== "hidden", F = (e) => (e == null ? void 0 : e.state) === "disabled", R = o(
67
- () => {
68
- var e;
69
- return (((e = u.value) == null ? void 0 : e.restaurants) ?? []).map((a) => ({
70
- label: a.label,
71
- value: a.id
72
- }));
73
- }
74
- ), N = {
75
- default: "menu.menu_preview.usage.default",
76
- pickup: "menu.menu_preview.usage.pickup",
77
- takeaway: "menu.menu_preview.usage.takeaway",
78
- additional: "menu.menu_preview.usage.additional"
79
- }, $ = o(
80
- () => {
81
- var e;
82
- return (((e = u.value) == null ? void 0 : e.catalogs) ?? []).map((a) => ({
83
- label: a.name,
84
- value: a.id,
85
- ...a.usages.length > 0 ? {
86
- sublabel: a.usages.map((m) => l(N[m])).join(l("menu.common.labels.list_separator"))
87
- } : {}
88
- }));
89
- }
90
- ), j = o(
91
- () => {
92
- var e;
93
- return (((e = u.value) == null ? void 0 : e.schedulers) ?? []).map((a) => ({
94
- label: a.name,
95
- value: a.id
96
- }));
97
- }
98
- ), G = o(
99
- () => {
100
- var e;
101
- return (((e = u.value) == null ? void 0 : e.locales) ?? []).map((a) => ({
102
- label: a.name,
103
- value: a.code
104
- }));
105
- }
106
- ), O = {
107
- phone: "menu.menu_preview.device.phone",
108
- tablet: "menu.menu_preview.device.tablet",
109
- kiosk: "menu.menu_preview.device.kiosk"
110
- }, W = {
111
- phone: "smartphone",
112
- tablet: "tablet",
113
- kiosk: "tv"
114
- }, V = o(
115
- () => {
116
- var e;
117
- return (((e = u.value) == null ? void 0 : e.devices) ?? []).map((a) => ({
118
- device: a,
119
- item: {
120
- label: l(O[a]),
121
- icon: W[a]
122
- }
123
- }));
124
- }
125
- ), q = o(
126
- () => {
127
- var e;
128
- return ((e = V.value.find((a) => {
129
- var m;
130
- return a.device === ((m = u.value) == null ? void 0 : m.device);
131
- })) == null ? void 0 : e.item) ?? null;
132
- }
133
- );
134
- function z(e) {
135
- const a = V.value.find((m) => m.item === e);
136
- a && (n == null || n.selectDevice(a.device));
137
- }
138
- const y = o(() => {
139
- var e;
140
- return ((e = u.value) == null ? void 0 : e.simulator) ?? null;
141
- }), A = o(
142
- () => {
143
- var e, a;
144
- return ((e = y.value) == null ? void 0 : e.status) === "connecting" || ((a = y.value) == null ? void 0 : a.status) === "building";
145
- }
146
- ), C = o(
147
- () => {
148
- var e;
149
- return ((e = y.value) == null ? void 0 : e.status) === "failed" ? y.value : null;
150
- }
151
- ), B = o(() => {
152
- const e = y.value;
153
- return (e == null ? void 0 : e.status) !== "ready" ? null : l("menu.menu_preview.status.summary", {
154
- categories: l(
155
- "menu.menu_preview.status.categories",
156
- { count: e.categoryCount },
157
- e.categoryCount
158
- ),
159
- items: l(
160
- "menu.menu_preview.status.items",
161
- { count: e.itemCount },
162
- e.itemCount
163
- )
164
- });
165
- });
166
- function E() {
167
- n == null || n.retry();
168
- }
169
- return (e, a) => {
170
- const m = L("FmSelect"), H = L("FmButtonGroup"), J = L("FmCircularProgress");
171
- return s(), p(ae, {
172
- heading: t(l)("menu.menu_preview.title"),
173
- subheading: t(l)("menu.menu_preview.subtitle")
174
- }, {
175
- default: Y(() => {
176
- var P;
177
- return [
178
- f.value ? t(x).status === "error" ? (s(), p(t(I), {
179
- key: 1,
180
- title: t(l)("menu.menu_preview.load_failed.title"),
181
- subtitle: t(d)(t(x).error.message),
182
- action: {
183
- text: t(l)("menu.menu_preview.actions.retry"),
184
- icon: "refresh",
185
- callback: E
186
- }
187
- }, null, 8, ["title", "subtitle", "action"])) : t(x).status === "unavailable" ? (s(), p(t(I), {
188
- key: 2,
189
- title: t(l)("menu.menu_preview.title"),
190
- subtitle: t(d)(t(x).reason)
191
- }, null, 8, ["title", "subtitle"])) : (s(), U(Z, { key: 3 }, [
192
- i("div", re, [
193
- u.value && S(u.value.restaurantSelector) ? (s(), p(m, {
194
- key: 0,
195
- class: "w-[240px]",
196
- "data-testid": "menu-preview-restaurant",
197
- label: t(l)("menu.menu_preview.labels.restaurant"),
198
- items: R.value,
199
- "model-value": u.value.restaurantId,
200
- disabled: F(u.value.restaurantSelector),
201
- searchable: "",
202
- "onUpdate:modelValue": a[0] || (a[0] = (_) => {
203
- var c;
204
- return (c = t(n)) == null ? void 0 : c.selectRestaurant(_);
205
- })
206
- }, null, 8, ["label", "items", "model-value", "disabled"])) : w("", !0),
207
- u.value && S(u.value.catalogSelector) ? (s(), p(m, {
208
- key: 1,
209
- class: "w-[260px]",
210
- "data-testid": "menu-preview-catalog",
211
- label: t(l)("menu.menu_preview.labels.catalog"),
212
- placeholder: t(l)("menu.menu_preview.labels.no_catalog"),
213
- items: $.value,
214
- "model-value": u.value.catalogId,
215
- disabled: F(u.value.catalogSelector),
216
- "onUpdate:modelValue": a[1] || (a[1] = (_) => {
217
- var c;
218
- return (c = t(n)) == null ? void 0 : c.selectCatalog(_);
219
- })
220
- }, null, 8, ["label", "placeholder", "items", "model-value", "disabled"])) : w("", !0),
221
- u.value && S(u.value.schedulerSelector) ? (s(), p(m, {
222
- key: 2,
223
- class: "w-[200px]",
224
- "data-testid": "menu-preview-scheduler",
225
- label: t(l)("menu.menu_preview.labels.scheduler"),
226
- items: j.value,
227
- "model-value": u.value.schedulerId,
228
- disabled: F(u.value.schedulerSelector),
229
- "onUpdate:modelValue": a[2] || (a[2] = (_) => {
230
- var c;
231
- return (c = t(n)) == null ? void 0 : c.selectScheduler(_);
232
- })
233
- }, null, 8, ["label", "items", "model-value", "disabled"])) : w("", !0),
234
- u.value && S(u.value.localeSelector) ? (s(), p(m, {
235
- key: 3,
236
- class: "w-[180px]",
237
- "data-testid": "menu-preview-locale",
238
- label: t(l)("menu.menu_preview.labels.menu_language"),
239
- "label-info": t(l)("menu.menu_preview.labels.menu_language_info"),
240
- items: G.value,
241
- "model-value": u.value.locale,
242
- "onUpdate:modelValue": a[3] || (a[3] = (_) => {
243
- var c;
244
- return (c = t(n)) == null ? void 0 : c.selectLocale(_);
245
- })
246
- }, null, 8, ["label", "label-info", "items", "model-value"])) : w("", !0),
247
- u.value ? (s(), U("div", me, [
248
- i("span", ce, h(t(l)("menu.menu_preview.labels.device")), 1),
249
- D(H, {
250
- "data-testid": "menu-preview-device",
251
- items: V.value.map((_) => _.item),
252
- "model-value": q.value,
253
- "onUpdate:modelValue": z
254
- }, null, 8, ["items", "model-value"])
255
- ])) : w("", !0)
256
- ]),
257
- i("div", de, [
258
- i("div", ve, [
259
- ee(i("iframe", {
260
- ref_key: "frameElement",
261
- ref: v,
262
- class: "h-[880px] w-full border-0",
263
- "data-testid": "menu-preview-frame",
264
- src: f.value.src,
265
- title: t(l)("menu.menu_preview.frame_title")
266
- }, null, 8, pe), [
267
- [te, !C.value]
268
- ]),
269
- A.value ? (s(), U("div", _e, [
270
- D(J),
271
- i("span", fe, h(((P = y.value) == null ? void 0 : P.status) === "connecting" ? t(l)("menu.menu_preview.status.connecting") : t(l)("menu.menu_preview.status.building")), 1)
272
- ])) : w("", !0),
273
- C.value ? (s(), p(t(I), {
274
- key: 1,
275
- "data-testid": "menu-preview-failed",
276
- title: t(l)("menu.menu_preview.failed.title"),
277
- subtitle: t(d)(C.value.reason),
278
- action: C.value.retryable ? {
279
- text: t(l)("menu.menu_preview.actions.retry"),
280
- icon: "refresh",
281
- callback: E
282
- } : void 0
283
- }, null, 8, ["title", "subtitle", "action"])) : w("", !0),
284
- B.value ? (s(), U("p", we, h(B.value), 1)) : w("", !0)
285
- ]),
286
- i("section", {
287
- class: "flex flex-[1_1_280px] flex-col gap-8 rounded-lg border border-fm-color-neutral-gray-200 p-16",
288
- "aria-label": t(l)("menu.menu_preview.limits.title")
289
- }, [
290
- i("h2", be, h(t(l)("menu.menu_preview.limits.title")), 1),
291
- i("ul", he, [
292
- i("li", null, h(t(l)("menu.menu_preview.limits.stock")), 1),
293
- i("li", null, h(t(l)("menu.menu_preview.limits.pricing")), 1),
294
- i("li", null, h(t(l)("menu.menu_preview.limits.checkout")), 1)
295
- ])
296
- ], 8, ge)
297
- ])
298
- ], 64)) : (s(), p(t(I), {
299
- key: 0,
300
- title: t(l)("menu.menu_preview.not_configured.title"),
301
- subtitle: t(l)("menu.menu_preview.not_configured.subtitle")
302
- }, null, 8, ["title", "subtitle"]))
303
- ];
304
- }),
305
- _: 1
306
- }, 8, ["heading", "subheading"]);
307
- };
308
- }
309
- }), Ie = /* @__PURE__ */ M({
310
- __name: "Preview",
311
- setup(g) {
312
- const r = se(), l = "https://menu-simulator-dev.feedme-dev.workers.dev";
313
- return (k, d) => (s(), p(ke, {
314
- sdk: t(r),
315
- "simulator-url": t(l)
316
- }, null, 8, ["sdk", "simulator-url"]));
317
- }
318
- });
319
- export {
320
- Ie as default
321
- };