@feedmepos/mf-menu-portal 1.0.4-dev.4 → 1.0.5-dev.1

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 (78) hide show
  1. package/dist/{App-CrpoLCjA.js → App-B2xq1U4S.js} +699 -687
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-Hdsnu29V.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CPh1GBw9.js} +11 -10
  3. package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-D3CmOOPY.js → BindingTable.vue_vue_type_script_setup_true_lang-DCgMQJE-.js} +50 -46
  4. package/dist/Catalog-BEI73S_k.js +433 -0
  5. package/dist/{CatalogBinding-BNATtZEY.js → CatalogBinding-3rhuTWDD.js} +30 -29
  6. package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-BmG-xpW4.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-CraEwqCY.js} +30 -29
  7. package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-BFsRDFpj.js → CatalogEditor.vue_vue_type_script_setup_true_lang-Dc72SNpI.js} +314 -304
  8. package/dist/CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-CMyubLvP.js +127 -0
  9. package/dist/{Category-DMoXTsfG.js → Category-BVCdkA5K.js} +14 -13
  10. package/dist/{Category-DxjdQ-NN.js → Category-P5DYjIeF.js} +2 -2
  11. package/dist/{CategoryList.vue_vue_type_script_setup_true_lang-B3Ts1O-9.js → CategoryList.vue_vue_type_script_setup_true_lang-DyhW52Df.js} +274 -262
  12. package/dist/{CookingGuide-DiZZDYD-.js → CookingGuide-Y-c1NLP5.js} +144 -140
  13. package/dist/{Group-rzfh_o6r.js → Group-D6wA3jCF.js} +2 -2
  14. package/dist/{Group-DFR8q-tt.js → Group-qqr5SUIc.js} +17 -15
  15. package/dist/GroupList.vue_vue_type_script_setup_true_lang-DNTVfY2d.js +1996 -0
  16. package/dist/{Ingredient-DpjGIuH9.js → Ingredient-CJHkJZ0y.js} +94 -93
  17. package/dist/{LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CnI80Ojd.js → LinkProductSideSheet.vue_vue_type_script_setup_true_lang-Cb6nO43H.js} +1 -1
  18. package/dist/{MenuSetting-DR-pDSF_.js → MenuSetting-YcEGo51l.js} +462 -446
  19. package/dist/{OrderPacing-JcTuweqF.js → OrderPacing-DwQU7c0Y.js} +207 -204
  20. package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-HwwJ2mGv.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-2Cdz70u-.js} +1 -2
  21. package/dist/PageLayout.vue_vue_type_script_setup_true_lang-DrhsROXo.js +44 -0
  22. package/dist/PhoneFab.vue_vue_type_script_setup_true_lang-CipbTqbp.js +12 -0
  23. package/dist/{Preview-BZyun5lZ.js → Preview-DLeXy5V-.js} +2 -2
  24. package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-DquqNbE1.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-D_OV9Z_4.js} +1 -1
  25. package/dist/{PrintRoute-CzEx2dCt.js → PrintRoute-R38w0-U2.js} +151 -150
  26. package/dist/{Product-CQb0n06E.js → Product-sbMCaVhM.js} +8 -7
  27. package/dist/ProductAttributeFilter.vue_vue_type_script_setup_true_lang-DoHQeOHy.js +7826 -0
  28. package/dist/ProductChipSummary.vue_vue_type_script_setup_true_lang-D9v88xZs.js +111 -0
  29. package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang-CBlDEjqF.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-DsIGLKNS.js} +17 -17
  30. package/dist/{ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-D8NQTCLx.js → ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-CEliG36Z.js} +726 -726
  31. package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-cG47Pu-6.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-B3bShTjM.js} +127 -124
  32. package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-0UwUcA2L.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-BzctosMW.js} +820 -807
  33. package/dist/{ProductInternalTools-QrBR1nFp.js → ProductInternalTools-jE3Ovo4l.js} +3 -3
  34. package/dist/{ProductInventoryDialog-fV38GO1a.js → ProductInventoryDialog-EDlrXupB.js} +1 -1
  35. package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-Bzb3RrMg.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-LOwSpoiA.js} +1 -1
  36. package/dist/{ProductList.vue_vue_type_script_setup_true_lang-BwKQESr3.js → ProductList.vue_vue_type_script_setup_true_lang-rczFAWVa.js} +1135 -1098
  37. package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-CDYcHXo1.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-C4iK-sAd.js} +1 -1
  38. package/dist/{Products-B8tysOAL.js → Products-DUE10OyS.js} +51 -49
  39. package/dist/Publish-BlMxKniP.js +1300 -0
  40. package/dist/{Recipe-Ddx31csF.js → Recipe-BhjPAidT.js} +83 -82
  41. package/dist/{Scheduler-CST5L_cw.js → Scheduler-wKG3_D1f.js} +137 -136
  42. package/dist/{ServingSequence-DYyEZI2S.js → ServingSequence-B26BETQs.js} +63 -61
  43. package/dist/Setting-DBdNl3WL.js +185 -0
  44. package/dist/{Subcategory-BIgjzVta.js → Subcategory-B06yMcuE.js} +147 -144
  45. package/dist/{Takeaway-CekhGM-m.js → Takeaway-CFATfy-6.js} +2 -2
  46. package/dist/{Takeaway-aXsPg4JT.js → Takeaway-DFqOtls7.js} +17 -16
  47. package/dist/TakeawayList.vue_vue_type_script_setup_true_lang-CUHB-g9I.js +616 -0
  48. package/dist/TextChip.vue_vue_type_script_setup_true_lang-YkUjMTXo.js +32 -0
  49. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CshqYpc9.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DoS4Btzj.js} +281 -308
  50. package/dist/{Unit-BMW8u0Us.js → Unit-B5wKBmIT.js} +90 -89
  51. package/dist/{Variant-CZsrYRMU.js → Variant-C5ePu0za.js} +167 -174
  52. package/dist/{_id_-D4swrvNa.js → _id_-HRDqt6oD.js} +3 -3
  53. package/dist/{app-BWwwHsWi.js → app-CxJjx2ma.js} +39 -39
  54. package/dist/app.js +1 -1
  55. package/dist/apps/mf-menu/src/app.d.ts +35 -0
  56. package/dist/apps/mf-menu/src/components/GroupList.vue.d.ts +8 -0
  57. package/dist/apps/mf-menu/src/components/Product/OrderFromChip.vue.d.ts +6 -0
  58. package/dist/apps/mf-menu/src/components/Product/ProductThumbnail.vue.d.ts +6 -0
  59. package/dist/apps/mf-menu/src/components/ProductList.vue.d.ts +4 -2
  60. package/dist/apps/mf-menu/src/components/PublishList.vue.d.ts +1 -1
  61. package/dist/apps/mf-menu/src/components/layout/MobileXScrollable.vue.d.ts +9 -0
  62. package/dist/apps/mf-menu/src/components/layout/PageLayout.vue.d.ts +7 -0
  63. package/dist/apps/mf-menu/src/components/layout/PhoneFab.vue.d.ts +9 -0
  64. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  65. package/dist/assets/{menu-compute-D7TdiHt4.js → menu-compute-CQdeCEBO.js} +19 -19
  66. package/dist/assets/{validate-menu-DXppWUVq.js → validate-menu-BVo4fNWG.js} +14 -14
  67. package/dist/mf-menu-portal.css +1 -1
  68. package/dist/{provide-CDmXzkhz.js → provide-BGLSDsuJ.js} +99816 -99564
  69. package/dist/{useActionFeedback-Dm2HDa_2.js → useActionFeedback-CElXij1W.js} +1 -1
  70. package/package.json +1 -1
  71. package/dist/Catalog-VU3HhNro.js +0 -374
  72. package/dist/CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Bk4FqVmx.js +0 -117
  73. package/dist/GroupList.vue_vue_type_script_setup_true_lang-DiN-wQXX.js +0 -1807
  74. package/dist/PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js +0 -41
  75. package/dist/ProductAttributeFilter.vue_vue_type_script_setup_true_lang-B2KdolJS.js +0 -7931
  76. package/dist/Publish-DTvOvFNa.js +0 -1337
  77. package/dist/Setting-Ip0pGjks.js +0 -179
  78. package/dist/TakeawayList.vue_vue_type_script_setup_true_lang-CaRR4_j3.js +0 -554
@@ -0,0 +1,433 @@
1
+ import { defineComponent as G, computed as _, h as r, resolveComponent as w, openBlock as n, createBlock as y, ref as Q, shallowRef as ne, withModifiers as M, onUnmounted as re, unref as o, withCtx as k, createElementBlock as g, toDisplayString as L, createVNode as d, createElementVNode as m, withDirectives as z, Fragment as E, renderList as X, createCommentVNode as U, normalizeClass as ce } from "vue";
2
+ import { useRouter as ie } from "vue-router";
3
+ import { useI18n as Y } from "@feedmepos/mf-common";
4
+ import { components as j, useDialog as ue, useBreakpoints as de, FmButtonVariant as P } from "@feedmepos/ui-library";
5
+ import { _ as me } from "./PageLayout.vue_vue_type_script_setup_true_lang-DrhsROXo.js";
6
+ import { R as q, _ as pe } from "./app-CxJjx2ma.js";
7
+ import { _ as ve } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
8
+ import { _ as ge } from "./CatalogEditor.vue_vue_type_script_setup_true_lang-Dc72SNpI.js";
9
+ import { b as Z, u as fe, a as ye } from "./provide-BGLSDsuJ.js";
10
+ import { u as _e } from "./useActionFeedback-CElXij1W.js";
11
+ const be = /* @__PURE__ */ G({
12
+ __name: "CatalogUsage",
13
+ props: {
14
+ catalog: {}
15
+ },
16
+ setup(A) {
17
+ const i = A, { t: u } = Y(), f = Z(), x = _(
18
+ () => i.catalog.restaurants.length ? i.catalog.restaurants : [{ id: "", name: u("menu.catalog.empty_value"), methods: [] }]
19
+ ), C = _(() => [...x.value]), V = _(() => [
20
+ {
21
+ accessorKey: "name",
22
+ enableSorting: !1,
23
+ meta: { headerClass: "px-16 py-4" },
24
+ header: () => r("div", { class: "flex flex-col" }, [
25
+ r(
26
+ "p",
27
+ i.catalog.nameMessage ? f(i.catalog.nameMessage) : i.catalog.name
28
+ ),
29
+ r(
30
+ "p",
31
+ { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" },
32
+ u("menu.catalog.usage.tax_label", {
33
+ mode: f(i.catalog.taxMode)
34
+ })
35
+ )
36
+ ]),
37
+ cell: (p) => r("div", { class: "space-y-4" }, [
38
+ r("p", p.row.original.name),
39
+ r(
40
+ "p",
41
+ { class: "text-fm-color-typo-secondary" },
42
+ p.row.original.id
43
+ )
44
+ ])
45
+ },
46
+ {
47
+ id: "usage",
48
+ enableSorting: !1,
49
+ meta: { headerClass: "px-16 py-4" },
50
+ header: () => r("div", { class: "w-full flex justify-between" }, [
51
+ r("p", u("menu.catalog.usage.usage")),
52
+ r(
53
+ j.FmChip,
54
+ {
55
+ class: "px-8 py-4 text-fm-color-typo-info bg-fm-color-system-info-100"
56
+ },
57
+ () => u("menu.catalog.usage.products", {
58
+ count: i.catalog.totalProducts
59
+ })
60
+ )
61
+ ]),
62
+ cell: (p) => r(
63
+ "p",
64
+ { class: "flex py-8" },
65
+ p.row.original.methods.map(f).join(u("menu.catalog.list_separator")) || u("menu.catalog.empty_value")
66
+ )
67
+ }
68
+ ]);
69
+ return (p, b) => {
70
+ const t = w("FmTable");
71
+ return n(), y(t, {
72
+ "column-defs": V.value,
73
+ "row-data": C.value,
74
+ "page-size": x.value.length,
75
+ virtual: !0,
76
+ "hide-footer": !0,
77
+ "shrink-at": !1
78
+ }, null, 8, ["column-defs", "row-data", "page-size"]);
79
+ };
80
+ }
81
+ }), he = {
82
+ key: 0,
83
+ role: "status"
84
+ }, ke = {
85
+ key: 3,
86
+ class: "flex-1 flex flex-col min-h-0"
87
+ }, we = { class: "p-8" }, xe = { class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64" }, Ce = ["onClick"], Se = { class: "flex-1 space-y-4" }, Fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Le = { class: "fm-typo-en-body-lg-600" }, Ae = { class: "flex flex-row" }, Te = { class: "flex justify-end items-center" }, Re = { class: "w-[320px]" }, $e = { class: "fm-typo-en-title-md-600" }, Ue = {
88
+ key: 0,
89
+ class: "space-y-24"
90
+ }, Ve = /* @__PURE__ */ G({
91
+ __name: "CatalogList",
92
+ props: {
93
+ sdk: {}
94
+ },
95
+ setup(A) {
96
+ const i = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), x = {
97
+ mounted: (e, a) => {
98
+ u.set(e, a.value);
99
+ const c = new MutationObserver(
100
+ () => C(e, u.get(e) ?? a.value)
101
+ );
102
+ c.observe(e, {
103
+ attributes: !0,
104
+ attributeFilter: ["aria-label"]
105
+ }), i.set(e, c), C(e, a.value);
106
+ },
107
+ updated: (e, a) => {
108
+ u.set(e, a.value), C(e, a.value);
109
+ },
110
+ beforeUnmount: (e) => {
111
+ var a;
112
+ return (a = i.get(e)) == null ? void 0 : a.disconnect();
113
+ }
114
+ };
115
+ function C(e, a) {
116
+ (() => {
117
+ var v;
118
+ e.removeAttribute("aria-label"), (v = e.querySelector("input")) == null || v.setAttribute("aria-label", a);
119
+ })();
120
+ }
121
+ const V = {
122
+ mounted: (e) => {
123
+ const a = new MutationObserver(
124
+ () => p(e)
125
+ );
126
+ a.observe(e, { childList: !0, subtree: !0 }), f.set(e, a), p(e);
127
+ },
128
+ updated: (e) => p(e),
129
+ beforeUnmount: (e) => {
130
+ var a;
131
+ return (a = f.get(e)) == null ? void 0 : a.disconnect();
132
+ }
133
+ };
134
+ function p(e) {
135
+ e.querySelectorAll(".virtual-list > div").forEach((a) => {
136
+ a.setAttribute("role", "row");
137
+ });
138
+ }
139
+ const b = A, { t } = Y(), S = Z(), D = ie(), ee = ue(), { run: N } = _e(), h = fe(b.sdk.catalog.list), l = _(
140
+ () => h.value.status === "ready" ? h.value.value : null
141
+ ), ae = _(() => {
142
+ var e;
143
+ return [...((e = l.value) == null ? void 0 : e.rows) ?? []];
144
+ }), T = Q(!1), { breakpoints: te } = de(), I = _(() => te.value.xs), K = Q(0), F = ne(null);
145
+ function O() {
146
+ var e;
147
+ (e = F.value) == null || e.dispose(), F.value = null;
148
+ }
149
+ function R(e) {
150
+ O(), K.value++, F.value = b.sdk.catalog.editor(e);
151
+ }
152
+ async function B(e) {
153
+ const a = await N(async () => b.sdk.catalog.open(e.id), {
154
+ showLoading: !1
155
+ });
156
+ a.kind === "success" && await D.push({
157
+ name: q.EDIT_CATALOG_PRODUCT,
158
+ params: { id: a.value.id }
159
+ });
160
+ }
161
+ async function W(e) {
162
+ const a = await N(
163
+ async () => b.sdk.catalog.prepareRemove(e.id),
164
+ { showLoading: !1 }
165
+ );
166
+ a.kind === "success" && ee.open({
167
+ title: t("menu.catalog.dialogs.remove.title"),
168
+ message: t("menu.catalog.dialogs.remove.message", {
169
+ name: a.value.name
170
+ }),
171
+ primaryActions: {
172
+ text: t("menu.common.actions.remove"),
173
+ close: !0,
174
+ variant: P.Destructive
175
+ },
176
+ secondaryActions: {
177
+ text: t("menu.common.actions.cancel"),
178
+ close: !0
179
+ }
180
+ }).onPrimary(async () => {
181
+ (await N(() => b.sdk.catalog.remove(e.id), {
182
+ showLoading: () => {
183
+ var v;
184
+ return ((v = l.value) == null ? void 0 : v.busy) === !0;
185
+ },
186
+ successMessage: (v) => t("menu.catalog.removed", { name: v.name })
187
+ })).kind === "success" && await D.push({ name: q.CATALOG });
188
+ });
189
+ }
190
+ const oe = _(() => [
191
+ {
192
+ accessorKey: "name",
193
+ header: () => t("menu.catalog.table.columns.title"),
194
+ cell: (e) => r(
195
+ "a",
196
+ {
197
+ href: D.resolve({
198
+ name: q.EDIT_CATALOG_PRODUCT,
199
+ params: { id: e.row.original.id }
200
+ }).href,
201
+ class: "text-inherit no-underline",
202
+ onClick: M(
203
+ () => B(e.row.original),
204
+ ["prevent", "stop"]
205
+ )
206
+ },
207
+ e.row.original.name
208
+ ),
209
+ enableSorting: !1
210
+ },
211
+ {
212
+ id: "taxMode",
213
+ header: () => t("menu.catalog.table.columns.tax_calculation"),
214
+ cell: (e) => S(e.row.original.taxMode),
215
+ enableSorting: !1
216
+ },
217
+ {
218
+ id: "autoLink",
219
+ header: () => t("menu.catalog.table.columns.auto_link"),
220
+ cell: (e) => S(e.row.original.autoLink),
221
+ enableSorting: !1
222
+ },
223
+ {
224
+ id: "actions",
225
+ header: "",
226
+ size: 52,
227
+ meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
228
+ cell: (e) => {
229
+ var a, c;
230
+ return r("div", { class: "flex justify-end" }, [
231
+ r(j.FmButton, {
232
+ icon: "file_copy",
233
+ variant: P.Tertiary,
234
+ textColor: "neutral-gray-400",
235
+ disabled: (a = l.value) == null ? void 0 : a.busy,
236
+ "aria-label": t("menu.catalog.actions.duplicate"),
237
+ onClick: M(
238
+ () => R(e.row.original.id),
239
+ ["stop", "prevent"]
240
+ )
241
+ }),
242
+ r(j.FmButton, {
243
+ icon: "delete",
244
+ variant: P.Tertiary,
245
+ textColor: "neutral-gray-400",
246
+ disabled: (c = l.value) == null ? void 0 : c.busy,
247
+ "aria-label": t("menu.catalog.dialogs.remove.title"),
248
+ onClick: M(
249
+ () => W(e.row.original),
250
+ ["stop", "prevent"]
251
+ )
252
+ })
253
+ ]);
254
+ }
255
+ }
256
+ ]);
257
+ return re(O), (e, a) => {
258
+ const c = w("FmButton"), v = w("FmLinearProgress"), H = w("FmSearch"), le = w("FmTable"), se = w("FmSideSheet");
259
+ return n(), y(me, {
260
+ heading: o(t)("menu.catalog.title")
261
+ }, {
262
+ "append-heading": k(() => [
263
+ l.value && l.value.totalCount > 0 ? (n(), g("div", {
264
+ key: 0,
265
+ class: ce(["flex flex-row gap-8", I.value ? "fixed z-10 bottom-[68px] right-16" : "ml-auto"]),
266
+ "data-test": "catalog-actions"
267
+ }, [
268
+ d(c, {
269
+ label: o(t)("menu.catalog.actions.view_usage"),
270
+ variant: "secondary",
271
+ onClick: a[0] || (a[0] = ($) => T.value = !0)
272
+ }, null, 8, ["label"]),
273
+ d(c, {
274
+ label: o(t)("menu.catalog.actions.add"),
275
+ "prepend-icon": "add",
276
+ disabled: l.value ? l.value.create.state !== "allowed" : !1,
277
+ onClick: a[1] || (a[1] = ($) => R())
278
+ }, null, 8, ["label", "disabled"])
279
+ ], 2)) : U("", !0)
280
+ ]),
281
+ default: k(() => {
282
+ var $;
283
+ return [
284
+ o(h).status === "unavailable" ? (n(), g("p", he, L(o(S)(o(h).reason)), 1)) : !l.value && o(h).status !== "error" ? (n(), y(v, { key: 1 })) : o(h).status === "error" || (($ = l.value) == null ? void 0 : $.totalCount) === 0 ? (n(), y(o(ve), {
285
+ key: 2,
286
+ title: o(t)("menu.catalog.empty.title"),
287
+ subtitle: o(t)("menu.catalog.empty.subtitle")
288
+ }, {
289
+ action: k(() => [
290
+ d(c, {
291
+ label: o(t)("menu.catalog.actions.add"),
292
+ "prepend-icon": "add",
293
+ disabled: l.value ? l.value.create.state !== "allowed" : !1,
294
+ onClick: a[2] || (a[2] = (s) => R())
295
+ }, null, 8, ["label", "disabled"])
296
+ ]),
297
+ _: 1
298
+ }, 8, ["title", "subtitle"])) : l.value && I.value ? (n(), g("div", ke, [
299
+ m("div", we, [
300
+ z(d(H, {
301
+ autofocus: "",
302
+ class: "w-full",
303
+ "model-value": l.value.query,
304
+ placeholder: o(t)("menu.common.labels.search_placeholder", {
305
+ type: o(t)("menu.catalog.title")
306
+ }),
307
+ "onUpdate:modelValue": e.sdk.catalog.search
308
+ }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]), [
309
+ [
310
+ x,
311
+ o(t)("menu.common.labels.search_placeholder", {
312
+ type: o(t)("menu.catalog.title")
313
+ })
314
+ ]
315
+ ])
316
+ ]),
317
+ m("div", xe, [
318
+ (n(!0), g(E, null, X(l.value.rows, (s) => (n(), g("div", {
319
+ key: s.id,
320
+ class: "flex flex-row py-12 px-16 items-center",
321
+ "data-test": "catalog-phone-row",
322
+ onClick: (J) => B(s)
323
+ }, [
324
+ m("div", Se, [
325
+ m("p", Fe, L(o(t)("menu.catalog.card.tax_calculation", {
326
+ mode: o(S)(s.taxMode)
327
+ })), 1),
328
+ m("p", Me, L(o(t)("menu.catalog.card.auto_link", {
329
+ status: o(S)(s.autoLink)
330
+ })), 1),
331
+ m("p", Le, L(s.name), 1)
332
+ ]),
333
+ m("div", Ae, [
334
+ d(c, {
335
+ "aria-label": o(t)("menu.catalog.actions.duplicate"),
336
+ disabled: l.value.busy,
337
+ "prepend-icon": "file_copy",
338
+ "text-color": "neutral-gray-400",
339
+ variant: "tertiary",
340
+ onClick: M((J) => R(s.id), ["stop"])
341
+ }, null, 8, ["aria-label", "disabled", "onClick"]),
342
+ d(c, {
343
+ "aria-label": o(t)("menu.catalog.dialogs.remove.title"),
344
+ disabled: l.value.busy,
345
+ "prepend-icon": "delete",
346
+ "text-color": "neutral-gray-400",
347
+ variant: "tertiary",
348
+ onClick: M((J) => W(s), ["stop"])
349
+ }, null, 8, ["aria-label", "disabled", "onClick"])
350
+ ])
351
+ ], 8, Ce))), 128))
352
+ ])
353
+ ])) : l.value ? (n(), g(E, { key: 4 }, [
354
+ m("div", Te, [
355
+ m("div", Re, [
356
+ z(d(H, {
357
+ autofocus: "",
358
+ class: "mb-8",
359
+ "model-value": l.value.query,
360
+ placeholder: o(t)("menu.common.labels.search_placeholder", {
361
+ type: o(t)("menu.catalog.title")
362
+ }),
363
+ "onUpdate:modelValue": e.sdk.catalog.search
364
+ }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"]), [
365
+ [
366
+ x,
367
+ o(t)("menu.common.labels.search_placeholder", {
368
+ type: o(t)("menu.catalog.title")
369
+ })
370
+ ]
371
+ ])
372
+ ])
373
+ ]),
374
+ d(pe, null, {
375
+ default: k(() => [
376
+ z(d(le, {
377
+ "column-defs": oe.value,
378
+ "row-data": ae.value,
379
+ "page-size": l.value.rows.length,
380
+ "hide-footer": !0,
381
+ "shrink-at": !1,
382
+ virtual: !0,
383
+ "search-value": l.value.query,
384
+ onRowClick: a[3] || (a[3] = (s) => B(s.original))
385
+ }, null, 8, ["column-defs", "row-data", "page-size", "search-value"]), [
386
+ [V]
387
+ ])
388
+ ]),
389
+ _: 1
390
+ })
391
+ ], 64)) : U("", !0),
392
+ d(se, {
393
+ modelValue: T.value,
394
+ "onUpdate:modelValue": a[4] || (a[4] = (s) => T.value = s),
395
+ "max-width": 1e3,
396
+ "dismiss-away": ""
397
+ }, {
398
+ "side-sheet-header": k(() => [
399
+ m("p", $e, L(o(t)("menu.catalog.usage.title")), 1)
400
+ ]),
401
+ default: k(() => [
402
+ T.value && l.value ? (n(), g("div", Ue, [
403
+ (n(!0), g(E, null, X(l.value.usage, (s) => (n(), y(be, {
404
+ key: s.id,
405
+ catalog: s
406
+ }, null, 8, ["catalog"]))), 128))
407
+ ])) : U("", !0)
408
+ ]),
409
+ _: 1
410
+ }, 8, ["modelValue"]),
411
+ F.value ? (n(), y(ge, {
412
+ key: K.value,
413
+ sdk: e.sdk,
414
+ editor: F.value,
415
+ picker: e.sdk.linkProduct.catalogue,
416
+ onClose: O
417
+ }, null, 8, ["sdk", "editor", "picker"])) : U("", !0)
418
+ ];
419
+ }),
420
+ _: 1
421
+ }, 8, ["heading"]);
422
+ };
423
+ }
424
+ }), Ie = /* @__PURE__ */ G({
425
+ __name: "Catalog",
426
+ setup(A) {
427
+ const i = ye();
428
+ return (u, f) => (n(), y(Ve, { sdk: o(i) }, null, 8, ["sdk"]));
429
+ }
430
+ });
431
+ export {
432
+ Ie as default
433
+ };
@@ -1,12 +1,12 @@
1
- import { defineComponent as N, computed as p, h as P, withModifiers as R, watch as T, shallowRef as M, onUnmounted as ee, resolveComponent as v, openBlock as i, createBlock as y, unref as t, withCtx as _, createElementVNode as d, toDisplayString as o, createElementBlock as x, Fragment as U, createVNode as s, renderList as ae, createCommentVNode as le, createSlots as te } from "vue";
1
+ import { defineComponent as N, computed as f, h as P, withModifiers as R, watch as T, shallowRef as M, onUnmounted as ee, resolveComponent as v, openBlock as i, createBlock as y, unref as t, withCtx as _, createElementVNode as d, toDisplayString as o, createElementBlock as x, Fragment as U, createVNode as s, renderList as ae, createCommentVNode as le, createSlots as te } from "vue";
2
2
  import { useI18n as ne } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as oe, useDialog as se, components as ie } from "@feedmepos/ui-library";
4
4
  import { _ as D } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
5
- import { _ as ue } from "./app-BWwwHsWi.js";
6
- import { _ as de } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
7
- import { u as ce } from "./useActionFeedback-Dm2HDa_2.js";
8
- import { b as me, u as re, a as ge } from "./provide-CDmXzkhz.js";
9
- const be = { class: "fm-typo-en-body-md-400 mb-16 text-fm-color-typo-secondary" }, fe = { class: "flex grow flex-col gap-4" }, pe = { class: "fm-typo-en-body-lg-600" }, ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _e = { class: "fm-typo-en-title-md-600" }, ye = {
5
+ import { _ as ue } from "./app-CxJjx2ma.js";
6
+ import { _ as de } from "./PageLayout.vue_vue_type_script_setup_true_lang-DrhsROXo.js";
7
+ import { u as ce } from "./useActionFeedback-CElXij1W.js";
8
+ import { b as me, u as re, a as ge } from "./provide-BGLSDsuJ.js";
9
+ const pe = { class: "fm-typo-en-body-md-400 mb-16 text-fm-color-typo-secondary" }, be = { class: "flex grow flex-col gap-4" }, fe = { class: "fm-typo-en-body-lg-600" }, ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _e = { class: "fm-typo-en-title-md-600" }, ye = {
10
10
  key: 1,
11
11
  class: "text-fm-color-typo-secondary",
12
12
  role: "status"
@@ -16,18 +16,18 @@ const be = { class: "fm-typo-en-body-md-400 mb-16 text-fm-color-typo-secondary"
16
16
  sdk: {}
17
17
  },
18
18
  setup(K) {
19
- const k = K, { t: a } = ne(), h = me(), O = oe(), j = se(), { run: E } = ce(), f = re(
19
+ const k = K, { t: a } = ne(), h = me(), O = oe(), j = se(), { run: E } = ce(), b = re(
20
20
  k.sdk.catalogBinding.binding
21
- ), $ = p(
22
- () => f.value.status === "ready" ? f.value.value : null
23
- ), z = p(() => f.value.status === "loading"), F = p(() => {
21
+ ), $ = f(
22
+ () => b.value.status === "ready" ? b.value.value : null
23
+ ), z = f(() => b.value.status === "loading"), F = f(() => {
24
24
  var e;
25
25
  return ((e = $.value) == null ? void 0 : e.edit.state) === "allowed";
26
26
  });
27
27
  function S(e) {
28
28
  return e.kind === "main" ? a("menu.catalog_binding.catalog.main") : e.kind === "missing" ? a("menu.catalog_binding.catalog.invalid") : e.name;
29
29
  }
30
- const B = p(
30
+ const B = f(
31
31
  () => {
32
32
  var e;
33
33
  return (((e = $.value) == null ? void 0 : e.rows) ?? []).map((l) => ({
@@ -38,7 +38,7 @@ const be = { class: "fm-typo-en-body-md-400 mb-16 text-fm-color-typo-secondary"
38
38
  pickupCatalog: S(l.pickupCatalog)
39
39
  }));
40
40
  }
41
- ), q = p(() => [
41
+ ), q = f(() => [
42
42
  {
43
43
  accessorKey: "restaurant",
44
44
  header: () => a("menu.catalog_binding.table.columns.restaurant"),
@@ -78,7 +78,7 @@ const be = { class: "fm-typo-en-body-md-400 mb-16 text-fm-color-typo-secondary"
78
78
  }
79
79
  ]);
80
80
  T(
81
- () => f.value,
81
+ () => b.value,
82
82
  (e, l) => {
83
83
  e.status === "error" && (l == null ? void 0 : l.status) !== "error" && O.open({
84
84
  type: "error",
@@ -108,12 +108,12 @@ const be = { class: "fm-typo-en-body-md-400 mb-16 text-fm-color-typo-secondary"
108
108
  T(c, (e) => {
109
109
  e || V();
110
110
  }), ee(V);
111
- const g = p(
111
+ const g = f(
112
112
  () => {
113
113
  var e;
114
114
  return ((e = r.value) == null ? void 0 : e.status) === "ready" ? r.value.value : null;
115
115
  }
116
- ), I = p(
116
+ ), I = f(
117
117
  () => {
118
118
  var e;
119
119
  return (((e = g.value) == null ? void 0 : e.options) ?? []).map((l) => ({
@@ -161,10 +161,11 @@ const be = { class: "fm-typo-en-body-md-400 mb-16 text-fm-color-typo-secondary"
161
161
  return (e, l) => {
162
162
  const Q = v("FmTable"), L = v("FmButton"), W = v("FmListItem"), X = v("FmList"), A = v("FmSelect"), Y = v("FmCircularProgress"), Z = v("FmSideSheet");
163
163
  return i(), y(de, {
164
- heading: t(a)("menu.catalog_binding.title")
164
+ heading: t(a)("menu.catalog_binding.title"),
165
+ "phone-padding": ""
165
166
  }, {
166
167
  default: _(() => [
167
- d("p", be, o(t(a)("menu.catalog_binding.subtitle")), 1),
168
+ d("p", pe, o(t(a)("menu.catalog_binding.subtitle")), 1),
168
169
  B.value.length > 0 || z.value ? (i(), x(U, { key: 0 }, [
169
170
  s(ue, { class: "block xs:hidden" }, {
170
171
  default: _(() => [
@@ -190,12 +191,12 @@ const be = { class: "fm-typo-en-body-md-400 mb-16 text-fm-color-typo-secondary"
190
191
  (i(!0), x(U, null, ae(B.value, (n) => (i(), y(W, {
191
192
  key: n.id,
192
193
  label: n.restaurant,
193
- class: "py-12",
194
+ class: "!px-0 !py-12",
194
195
  onClick: w
195
196
  }, {
196
197
  default: _(() => [
197
- d("div", fe, [
198
- d("div", pe, o(n.restaurant), 1),
198
+ d("div", be, [
199
+ d("div", fe, o(n.restaurant), 1),
199
200
  d("div", ve, [
200
201
  d("div", null, o(t(a)("menu.catalog_binding.table.columns.default")) + ": " + o(n.defaultCatalog), 1),
201
202
  d("div", null, o(t(a)("menu.catalog_binding.table.columns.pos_takeaway")) + ": " + o(n.takeawayCatalog), 1),
@@ -215,7 +216,7 @@ const be = { class: "fm-typo-en-body-md-400 mb-16 text-fm-color-typo-secondary"
215
216
  ]),
216
217
  _: 1
217
218
  })
218
- ], 64)) : t(f).status === "error" ? (i(), y(t(D), {
219
+ ], 64)) : t(b).status === "error" ? (i(), y(t(D), {
219
220
  key: 1,
220
221
  title: t(a)("menu.catalog_binding.load_failed.title"),
221
222
  subtitle: t(a)("menu.catalog_binding.load_failed.subtitle"),
@@ -224,10 +225,10 @@ const be = { class: "fm-typo-en-body-md-400 mb-16 text-fm-color-typo-secondary"
224
225
  icon: "refresh",
225
226
  callback: G
226
227
  }
227
- }, null, 8, ["title", "subtitle", "action"])) : t(f).status === "unavailable" ? (i(), y(t(D), {
228
+ }, null, 8, ["title", "subtitle", "action"])) : t(b).status === "unavailable" ? (i(), y(t(D), {
228
229
  key: 2,
229
230
  title: t(a)("menu.catalog_binding.empty.title"),
230
- subtitle: t(h)(t(f).reason)
231
+ subtitle: t(h)(t(b).reason)
231
232
  }, null, 8, ["title", "subtitle"])) : le("", !0),
232
233
  s(Z, {
233
234
  modelValue: c.value,
@@ -248,8 +249,8 @@ const be = { class: "fm-typo-en-body-md-400 mb-16 text-fm-color-typo-secondary"
248
249
  label: t(a)("menu.catalog_binding.dialog.default"),
249
250
  "model-value": g.value.defaultCatalogId,
250
251
  "onUpdate:modelValue": l[0] || (l[0] = (C) => {
251
- var b;
252
- return (b = m.value) == null ? void 0 : b.setDefaultCatalog(C ?? null);
252
+ var p;
253
+ return (p = m.value) == null ? void 0 : p.setDefaultCatalog(C ?? null);
253
254
  })
254
255
  }, null, 8, ["items", "label", "model-value"]),
255
256
  s(A, {
@@ -258,8 +259,8 @@ const be = { class: "fm-typo-en-body-md-400 mb-16 text-fm-color-typo-secondary"
258
259
  label: t(a)("menu.catalog_binding.dialog.pos_takeaway"),
259
260
  "model-value": g.value.takeawayCatalogId,
260
261
  "onUpdate:modelValue": l[1] || (l[1] = (C) => {
261
- var b;
262
- return (b = m.value) == null ? void 0 : b.setTakeawayCatalog(C ?? null);
262
+ var p;
263
+ return (p = m.value) == null ? void 0 : p.setTakeawayCatalog(C ?? null);
263
264
  })
264
265
  }, null, 8, ["items", "label", "model-value"]),
265
266
  s(A, {
@@ -267,8 +268,8 @@ const be = { class: "fm-typo-en-body-md-400 mb-16 text-fm-color-typo-secondary"
267
268
  label: t(a)("menu.catalog_binding.dialog.pickup"),
268
269
  "model-value": g.value.pickupCatalogId,
269
270
  "onUpdate:modelValue": l[2] || (l[2] = (C) => {
270
- var b;
271
- return (b = m.value) == null ? void 0 : b.setPickupCatalog(C ?? null);
271
+ var p;
272
+ return (p = m.value) == null ? void 0 : p.setPickupCatalog(C ?? null);
272
273
  })
273
274
  }, null, 8, ["items", "label", "model-value"])
274
275
  ], 64)) : ((n = r.value) == null ? void 0 : n.status) === "unavailable" ? (i(), x("p", ye, o(t(h)(r.value.reason)), 1)) : (i(), y(Y, { key: 2 }))