@feedmepos/mf-menu 0.31.35-beta.1 → 0.31.36-beta

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 (63) hide show
  1. package/dist/{App-BkDEqZHN.js → App-Cui-XStB.js} +30 -53
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-YeaxfcJN.js → ApplyProduct.vue_vue_type_script_setup_true_lang-cUYW6sW5.js} +2 -2
  3. package/dist/{Catalog-6pOytZU3.js → Catalog-MktLa55D.js} +68 -68
  4. package/dist/{Category-PtVyxTJZ.js → Category-C-s_lW3M.js} +14 -14
  5. package/dist/{Category-CXk98gto.js → Category-CEMqueNk.js} +29 -29
  6. package/dist/{CookingGuide-Cy8w8cd9.js → CookingGuide-eWdk6mho.js} +65 -65
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bxn29Ylq.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CcKt1abw.js} +1 -1
  8. package/dist/{Group-D_fipwz6.js → Group-Bg2Ylu9p.js} +1 -1
  9. package/dist/{Group-DmNtEt9J.js → Group-VircdSF_.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-C8W8uPvN.js → Group.vue_vue_type_script_setup_true_lang-CyW8Gh6c.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DfgXJWUw.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-yQjS-X1R.js} +4 -4
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-KFWive_R.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-26ogJPxR.js} +7 -7
  13. package/dist/{Ingredient-BbGs11gS.js → Ingredient-CegrU_cQ.js} +23 -23
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-fNVMd9PS.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CzhbZPKE.js} +2 -2
  15. package/dist/{LinkProductSideSheet-CIUQw7oo.js → LinkProductSideSheet-BJlrPykg.js} +24 -24
  16. package/dist/{MenuSetting-BXSAAPma.js → MenuSetting-D70NMQWp.js} +20 -20
  17. package/dist/{PrintRoute-Bb25Wqx5.js → PrintRoute-bAS3UL9d.js} +18 -18
  18. package/dist/{Product-qNa1EPNM.js → Product-Cu2f-ZSs.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-DI0d2huN.js → Product.vue_vue_type_script_setup_true_lang-CYfDGs7M.js} +65 -65
  20. package/dist/{ProductInternalTools-CyiAzThW.js → ProductInternalTools-6X6XUdH6.js} +16 -16
  21. package/dist/{Products-oCEkdzLE.js → Products-DYgr_65I.js} +11 -11
  22. package/dist/{Publish-CWGdR3nh.js → Publish-DhdYNYH2.js} +3 -3
  23. package/dist/{Recipe-DWlzfgXY.js → Recipe-Bb5gqrsE.js} +13 -13
  24. package/dist/{Scheduler-BGhRV9Yi.js → Scheduler-Tk0cPXz4.js} +7 -7
  25. package/dist/{ServingSequence-Dj6eZp3x.js → ServingSequence-DUghx8CU.js} +24 -24
  26. package/dist/{Setting-Di_Rn61o.js → Setting-DIl9WhmE.js} +11 -11
  27. package/dist/{Subcategory-CGinXMy8.js → Subcategory-C8Igjkze.js} +10 -10
  28. package/dist/{Takeaway-C1KdbLMw.js → Takeaway-ZfBLSZMG.js} +1 -1
  29. package/dist/{Takeaway-BSWrXSGI.js → Takeaway-xHGsoah-.js} +9 -9
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-wONUlNNM.js → Takeaway.vue_vue_type_script_setup_true_lang-DItRiL8J.js} +11 -11
  31. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-_pWcSpCk.js → Thumbnail.vue_vue_type_script_setup_true_lang-Dmk-5eGV.js} +7 -7
  32. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-ncoMfO1b.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-OJ0A70lo.js} +13 -13
  33. package/dist/{Unit-B71wMP-S.js → Unit-CfmYi7kG.js} +13 -13
  34. package/dist/{Variant-B14TfXg7.js → Variant-D6hyic1A.js} +14 -14
  35. package/dist/{_id_-CjlhUxyd.js → _id_-DT2EQjcY.js} +32 -32
  36. package/dist/{app-C0_ZxHle.js → app-Do8sOqMh.js} +362 -367
  37. package/dist/{app-NhsMLypF.js → app-jvyTuOVi.js} +1 -1
  38. package/dist/app.js +1 -1
  39. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +1 -1
  40. package/dist/apps/mf-menu/src/router/shared.d.ts +1 -3
  41. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  42. package/dist/assets/{linked-status-DaKKqv0U.js → linked-status-DQ161R27.js} +2 -2
  43. package/dist/assets/{override-menu-BzQzJzDM.js → override-menu-VGwIGccm.js} +2 -2
  44. package/dist/assets/{validate-menu-DH8daaxV.js → validate-menu-Dx9kwuMh.js} +2 -2
  45. package/dist/{catalog-DDA5CEEW.js → catalog-BL6h_DDN.js} +1 -1
  46. package/dist/{catalogSetting-B2UCaWJL.js → catalogSetting-DEabwfXZ.js} +1 -1
  47. package/dist/{category-B29E8Z6Z.js → category-CKujA-NM.js} +5 -5
  48. package/dist/{currency-D8F5PN67.js → currency-BFai41BQ.js} +1 -1
  49. package/dist/{dayjs.min-C5O_Xdlu.js → dayjs.min-B5ost3s4.js} +1 -1
  50. package/dist/{index-Chaiecso.js → index-D70F0uL_.js} +14 -14
  51. package/dist/{index-DzWK9GfE.js → index-D9PdlnOv.js} +14 -14
  52. package/dist/{index-D6qeYZH_.js → index-nSRvCNb9.js} +1 -1
  53. package/dist/{item-CRYbpxtN.js → item-DqdhjOW8.js} +15 -15
  54. package/dist/{jszip.min-CEFKmniH.js → jszip.min-_LmXapMc.js} +2 -2
  55. package/dist/{menu-CyVBU_ww.js → menu-Cj3d6im1.js} +9 -9
  56. package/dist/{menu-Bi0HvP-T.js → menu-S1W5eNCT.js} +1 -1
  57. package/dist/{menuV2-DUplflZy.js → menuV2-K6oaeFE4.js} +70 -70
  58. package/dist/{priceTier-BKUDkpVL.js → priceTier-Cnci8Hf5.js} +1 -1
  59. package/dist/{scheduler-BQnvljfv.js → scheduler-D7qY3sLN.js} +30 -30
  60. package/dist/{subcategory-DI_tttwh.js → subcategory-CHsH67ID.js} +6 -6
  61. package/dist/{toExcel-Cld55eZa.js → toExcel-DhVG55bK.js} +2 -2
  62. package/dist/{unit-DCXUBn-h.js → unit-C3zaQSoS.js} +6 -6
  63. package/package.json +2 -2
@@ -1,36 +1,36 @@
1
- import { defineComponent as oe, computed as T, resolveComponent as y, createBlock as V, openBlock as p, createVNode as o, ref as w, createElementBlock as M, Fragment as P, renderSlot as ye, unref as e, withCtx as g, createElementVNode as f, createCommentVNode as K, renderList as q, createTextVNode as be, toDisplayString as N, h as J, withModifiers as W, normalizeClass as xe } from "vue";
1
+ import { defineComponent as oe, computed as V, resolveComponent as y, createBlock as D, openBlock as p, createVNode as o, ref as B, createElementBlock as M, Fragment as P, renderSlot as ye, unref as e, withCtx as g, createElementVNode as f, createCommentVNode as K, renderList as q, createTextVNode as be, toDisplayString as w, h as J, withModifiers as W, normalizeClass as xe } from "vue";
2
2
  import { useRouter as Ce } from "vue-router";
3
- import { u as de, A as F, O as pe, G as fe, D as ue, B as ke, H as ee, J as ge, a9 as re } from "./menu-CyVBU_ww.js";
3
+ import { u as de, G as F, O as pe, D as fe, B as ue, A as ke, H as ee, J as ge, a9 as re } from "./menu-Cj3d6im1.js";
4
4
  import { useI18n as ne, useCoreStore as ve } from "@feedmepos/mf-common";
5
5
  import { useSnackbar as _e, components as te, FmButtonVariant as j, FmButtonColorThemeVariant as Q, useDialog as he, useBreakpoints as Oe } from "@feedmepos/ui-library";
6
- import { _ as Fe, R as ie } from "./app-C0_ZxHle.js";
6
+ import { _ as Fe, R as ie } from "./app-Do8sOqMh.js";
7
7
  import { _ as Me } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
8
- import { a as ae } from "./LinkProductSideSheet-CIUQw7oo.js";
8
+ import { a as ae } from "./LinkProductSideSheet-BJlrPykg.js";
9
9
  import { _ as Ve } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
10
- import { _ as ce, a as De } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DfgXJWUw.js";
10
+ import { _ as ce, a as De } from "./GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-yQjS-X1R.js";
11
11
  import { c as Se } from "./check-C9mY6LiX.js";
12
- import { C as I, a as B } from "./catalogSetting-B2UCaWJL.js";
12
+ import { C as $, a as I } from "./catalogSetting-DEabwfXZ.js";
13
13
  import { _ as Te } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
14
14
  import { _ as Ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
15
- import { C as Ee } from "./catalog-DDA5CEEW.js";
15
+ import { C as Ee } from "./catalog-BL6h_DDN.js";
16
16
  const Ae = /* @__PURE__ */ oe({
17
17
  __name: "CatalogUsageTable",
18
18
  props: {
19
19
  catalog: {}
20
20
  },
21
21
  setup(X) {
22
- const D = X, {
22
+ const S = X, {
23
23
  t: d
24
- } = ne(), S = T(() => D.catalog.restaurants.length === 0 ? [{
24
+ } = ne(), T = V(() => S.catalog.restaurants.length === 0 ? [{
25
25
  name: "--",
26
26
  usage: []
27
- }] : D.catalog.restaurants), L = [{
27
+ }] : S.catalog.restaurants), N = [{
28
28
  accessorKey: "name",
29
29
  header: () => o("div", {
30
30
  class: "flex flex-col"
31
- }, [o("p", null, [D.catalog.name]), o("p", {
31
+ }, [o("p", null, [S.catalog.name]), o("p", {
32
32
  class: "text-fm-color-typo-secondary fm-typo-en-body-md-400"
33
- }, [d("menu.catalog.usage.tax_calculation") + `: ${D.catalog.taxMode}`])]),
33
+ }, [d("menu.catalog.usage.tax_calculation") + `: ${S.catalog.taxMode}`])]),
34
34
  cell: ({
35
35
  row: b
36
36
  }) => o("div", {
@@ -47,7 +47,7 @@ const Ae = /* @__PURE__ */ oe({
47
47
  class: "w-full flex justify-between"
48
48
  }, [o("p", null, [d("menu.catalog.usage.usage")]), o(Me, {
49
49
  label: `${d("menu.catalog.usage.products", {
50
- count: D.catalog.totalProducts
50
+ count: S.catalog.totalProducts
51
51
  })}`,
52
52
  variant: "info",
53
53
  class: "px-8 py-4"
@@ -68,10 +68,10 @@ const Ae = /* @__PURE__ */ oe({
68
68
  }];
69
69
  return (b, C) => {
70
70
  const E = y("FmTable");
71
- return p(), V(E, {
72
- "column-defs": L,
73
- "row-data": S.value,
74
- "page-size": S.value.length,
71
+ return p(), D(E, {
72
+ "column-defs": N,
73
+ "row-data": T.value,
74
+ "page-size": T.value.length,
75
75
  "hide-footer": !0,
76
76
  "shrink-at": !1
77
77
  }, null, 8, ["row-data", "page-size"]);
@@ -82,23 +82,23 @@ const Ae = /* @__PURE__ */ oe({
82
82
  class: "pl-32 space-x-8"
83
83
  }, Le = { class: "pl-[60px] space-y-16" }, Re = { class: "space-x-16 flex items-center" }, $e = { class: "flex-1 space-y-4" }, Ie = { class: "fm-typo-en-body-lg-400" }, Be = { class: "fm-typo-en-body-md-400" }, Pe = { class: "flex gap-8 items-center justify-start" }, ze = /* @__PURE__ */ oe({
84
84
  __name: "Form",
85
- setup(X, { expose: D }) {
86
- const d = w(!1), S = w(!1), L = (i, n) => {
87
- Se.isBoolean(i) ? d.value = i : d.value = !d.value, d.value && (u.value = I.fromCatalog(
85
+ setup(X, { expose: S }) {
86
+ const d = B(!1), T = B(!1), N = (i, n) => {
87
+ Se.isBoolean(i) ? d.value = i : d.value = !d.value, d.value && (u.value = $.fromCatalog(
88
88
  n ?? ue.generator.initMenuV4Catalog(),
89
89
  b.value
90
90
  ));
91
- }, b = T(() => C.version === F.F_MENU_VERSION.enum.v4), C = de(), E = ve(), m = pe(fe(_e())), u = w(
92
- I.fromCatalog(ue.generator.initMenuV4Catalog(), b.value)
93
- ), Z = T(() => C.catalogs.map((i) => i.name)), A = T({
91
+ }, b = V(() => C.version === F.F_MENU_VERSION.enum.v4), C = de(), E = ve(), m = pe(fe(_e())), u = B(
92
+ $.fromCatalog(ue.generator.initMenuV4Catalog(), b.value)
93
+ ), Z = V(() => C.catalogs.map((i) => i.name)), A = V({
94
94
  get: () => u.value.taxSetting,
95
95
  set: (i) => {
96
96
  u.value.taxSetting = i;
97
97
  }
98
- }), k = T(() => {
98
+ }), k = V(() => {
99
99
  var v, h;
100
100
  if (!E.currentCountry.value) return [];
101
- const i = ((v = u.value.taxSetting) == null ? void 0 : v.mode) === B.MANUAL ? ((h = u.value.taxSetting) == null ? void 0 : h.inclusive) ?? [] : [];
101
+ const i = ((v = u.value.taxSetting) == null ? void 0 : v.mode) === I.MANUAL ? ((h = u.value.taxSetting) == null ? void 0 : h.inclusive) ?? [] : [];
102
102
  return ke.Country.getCountry(E.currentCountry.value).taxSystems.map((U) => {
103
103
  const s = i.find((l) => l.systemCode === U.code);
104
104
  return {
@@ -108,7 +108,7 @@ const Ae = /* @__PURE__ */ oe({
108
108
  });
109
109
  });
110
110
  function Y(i) {
111
- const n = u.value.taxSetting, v = n.mode === B.AUTO ? I.manualTax(k.value) : ee(n);
111
+ const n = u.value.taxSetting, v = n.mode === I.AUTO ? $.manualTax(k.value) : ee(n);
112
112
  v.inclusive ?? (v.inclusive = []);
113
113
  const h = v.inclusive.findIndex((U) => U.systemCode === i.systemCode);
114
114
  h < 0 ? v.inclusive.push(i) : v.inclusive.splice(h, 1, i), A.value = v;
@@ -122,10 +122,10 @@ const Ae = /* @__PURE__ */ oe({
122
122
  n.markupOptions && (n.markupOptions.splice(i, 1), u.value = n);
123
123
  }
124
124
  async function H() {
125
- S.value = !0;
125
+ T.value = !0;
126
126
  const i = {
127
127
  ...u.value,
128
- ...I.toCatalog(u.value)
128
+ ...$.toCatalog(u.value)
129
129
  };
130
130
  try {
131
131
  await m.updateMenu(
@@ -137,15 +137,15 @@ const Ae = /* @__PURE__ */ oe({
137
137
  i.name
138
138
  ), d.value = !1;
139
139
  } finally {
140
- S.value = !1;
140
+ T.value = !1;
141
141
  }
142
142
  }
143
143
  const { t: r } = ne();
144
- return D({ trigger: L }), (i, n) => {
145
- const v = y("fm-text-field"), h = y("fm-radio"), U = y("fm-radio-group"), s = y("fm-checkbox"), l = y("fm-switch"), t = y("fm-select"), x = y("fm-button"), R = y("fm-chip"), O = y("fm-card"), $ = y("fm-side-sheet");
144
+ return S({ trigger: N }), (i, n) => {
145
+ const v = y("fm-text-field"), h = y("fm-radio"), U = y("fm-radio-group"), s = y("fm-checkbox"), l = y("fm-switch"), t = y("fm-select"), x = y("fm-button"), L = y("fm-chip"), O = y("fm-card"), R = y("fm-side-sheet");
146
146
  return p(), M(P, null, [
147
- ye(i.$slots, "default", { trigger: L }),
148
- o($, {
147
+ ye(i.$slots, "default", { trigger: N }),
148
+ o(R, {
149
149
  modelValue: d.value,
150
150
  "onUpdate:modelValue": n[8] || (n[8] = (a) => d.value = a),
151
151
  "is-container": e(te).FmForm,
@@ -158,7 +158,7 @@ const Ae = /* @__PURE__ */ oe({
158
158
  "side-sheet-footer": g(() => [
159
159
  f("div", Pe, [
160
160
  o(x, {
161
- loading: S.value,
161
+ loading: T.value,
162
162
  label: e(r)("menu.common.actions.add"),
163
163
  size: "lg",
164
164
  type: "submit",
@@ -197,25 +197,25 @@ const Ae = /* @__PURE__ */ oe({
197
197
  o(U, {
198
198
  "model-value": (a = u.value.taxSetting) == null ? void 0 : a.mode,
199
199
  "onUpdate:modelValue": n[1] || (n[1] = (c) => {
200
- c === e(B).AUTO ? A.value = e(I).autoTax() : A.value = e(I).manualTax(k.value);
200
+ c === e(I).AUTO ? A.value = e($).autoTax() : A.value = e($).manualTax(k.value);
201
201
  })
202
202
  }, {
203
203
  default: g(() => [
204
204
  o(h, {
205
- value: e(B).AUTO,
205
+ value: e(I).AUTO,
206
206
  label: e(r)("menu.catalog.form.tax.auto.label"),
207
207
  sublabel: e(r)("menu.catalog.form.tax.auto.sublabel")
208
208
  }, null, 8, ["value", "label", "sublabel"]),
209
209
  o(h, {
210
- value: e(B).MANUAL,
210
+ value: e(I).MANUAL,
211
211
  label: e(r)("menu.catalog.form.tax.manual.label"),
212
212
  sublabel: e(r)("menu.catalog.form.tax.manual.sublabel")
213
213
  }, null, 8, ["value", "label", "sublabel"])
214
214
  ]),
215
215
  _: 1
216
216
  }, 8, ["model-value"]),
217
- ((_ = u.value.taxSetting) == null ? void 0 : _.mode) === e(B).MANUAL ? (p(), M("div", Ne, [
218
- (p(!0), M(P, null, q(k.value, (c) => (p(), V(s, {
217
+ ((_ = u.value.taxSetting) == null ? void 0 : _.mode) === e(I).MANUAL ? (p(), M("div", Ne, [
218
+ (p(!0), M(P, null, q(k.value, (c) => (p(), D(s, {
219
219
  key: c.systemCode,
220
220
  "model-value": c.inclusive,
221
221
  value: !0,
@@ -235,7 +235,7 @@ const Ae = /* @__PURE__ */ oe({
235
235
  ]),
236
236
  _: 1
237
237
  }, 8, ["title"]),
238
- b.value ? (p(), V(ae, {
238
+ b.value ? (p(), D(ae, {
239
239
  key: 0,
240
240
  label: e(r)("menu.catalog.form.link.title")
241
241
  }, {
@@ -247,7 +247,7 @@ const Ae = /* @__PURE__ */ oe({
247
247
  sublabel: e(r)("menu.catalog.form.link.auto_link.sublabel"),
248
248
  "onUpdate:modelValue": n[2] || (n[2] = (a) => u.value.orderFrom = a ? e(F.F_ORDER_FROM).enum.ALL : e(F.F_ORDER_FROM).enum.NONE)
249
249
  }, null, 8, ["model-value", "label", "sublabel"]),
250
- u.value.orderFrom !== e(F.F_ORDER_FROM).enum.NONE ? (p(), V(t, {
250
+ u.value.orderFrom !== e(F.F_ORDER_FROM).enum.NONE ? (p(), D(t, {
251
251
  key: 0,
252
252
  class: "ml-[60px]",
253
253
  items: [
@@ -266,7 +266,7 @@ const Ae = /* @__PURE__ */ oe({
266
266
  ]),
267
267
  _: 1
268
268
  }, 8, ["label"])) : K("", !0),
269
- b.value ? (p(), V(ae, {
269
+ b.value ? (p(), D(ae, {
270
270
  key: 1,
271
271
  label: e(r)("menu.catalog.form.markup.title")
272
272
  }, {
@@ -297,7 +297,7 @@ const Ae = /* @__PURE__ */ oe({
297
297
  ]),
298
298
  _: 1
299
299
  }, 8, ["categories", "items"]),
300
- (p(!0), M(P, null, q(u.value.markupOptions, (a, _) => (p(), V(ce, {
300
+ (p(!0), M(P, null, q(u.value.markupOptions, (a, _) => (p(), D(ce, {
301
301
  key: _,
302
302
  categories: e(C).categories,
303
303
  items: e(C).items,
@@ -315,14 +315,14 @@ const Ae = /* @__PURE__ */ oe({
315
315
  default: g(() => [
316
316
  f("div", Re, [
317
317
  f("div", $e, [
318
- o(R, { class: "text-fm-color-typo-info bg-fm-color-system-info-100 font-semibold" }, {
318
+ o(L, { class: "text-fm-color-typo-info bg-fm-color-system-info-100 font-semibold" }, {
319
319
  default: g(() => [
320
- be(N(e(r)("menu.catalog.form.markup.percentage", { value: a.percentage })), 1)
320
+ be(w(e(r)("menu.catalog.form.markup.percentage", { value: a.percentage })), 1)
321
321
  ]),
322
322
  _: 2
323
323
  }, 1024),
324
- f("p", Ie, N(e(r)("menu.catalog.form.markup.config", { number: _ + 1 })), 1),
325
- f("p", Be, N(a.includeItems ? e(r)("menu.catalog.form.markup.products", {
324
+ f("p", Ie, w(e(r)("menu.catalog.form.markup.config", { number: _ + 1 })), 1),
325
+ f("p", Be, w(a.includeItems ? e(r)("menu.catalog.form.markup.products", {
326
326
  count: a.includeItems.length
327
327
  }) : e(r)("menu.catalog.form.markup.all_items")), 1)
328
328
  ]),
@@ -385,12 +385,12 @@ const Ae = /* @__PURE__ */ oe({
385
385
  }, le = "main", ya = /* @__PURE__ */ oe({
386
386
  __name: "Catalog",
387
387
  setup(X) {
388
- const D = ve(), d = de(), S = _e(), L = fe(S), b = he(), C = pe(L), E = Ce(), {
388
+ const S = ve(), d = de(), T = _e(), N = fe(T), b = he(), C = pe(N), E = Ce(), {
389
389
  t: m
390
390
  } = ne();
391
391
  function u(s, l) {
392
- var O, $, a, _;
393
- const t = D.restaurants.value.find(({
392
+ var O, R, a, _;
393
+ const t = S.restaurants.value.find(({
394
394
  _id: c
395
395
  }) => c === l._id), x = [...l.linkedDeliveryCatalogs.map((c) => ({
396
396
  label: `Delivery (${c.name})`,
@@ -400,7 +400,7 @@ const Ae = /* @__PURE__ */ oe({
400
400
  selector: (O = t == null ? void 0 : t.foodpandaDelivery) == null ? void 0 : O.catalogId
401
401
  }, {
402
402
  label: "Delivery (GrabFood integration)",
403
- selector: ($ = t == null ? void 0 : t.grabfoodDelivery) == null ? void 0 : $.catalogId
403
+ selector: (R = t == null ? void 0 : t.grabfoodDelivery) == null ? void 0 : R.catalogId
404
404
  }, {
405
405
  label: "Delivery (ShopeeFood integration)",
406
406
  selector: (a = t == null ? void 0 : t.shopeefoodDelivery) == null ? void 0 : a.catalogId
@@ -434,7 +434,7 @@ const Ae = /* @__PURE__ */ oe({
434
434
  usage: u(s, l)
435
435
  })).filter((l) => l.usage.length > 0);
436
436
  }
437
- const A = w(!1), k = w(""), Y = T(() => {
437
+ const A = B(!1), k = B(""), Y = V(() => {
438
438
  var l;
439
439
  return [{
440
440
  id: le,
@@ -452,7 +452,7 @@ const Ae = /* @__PURE__ */ oe({
452
452
  defaultOrderFrom: t.defaultOrderFrom
453
453
  }))].map((t) => {
454
454
  var O;
455
- const x = Z(((O = t.doc) == null ? void 0 : O._id) || null), R = t.doc ? Ee.getSellingItem(t.doc, d.state.menu) : d.state.menu.modules.item;
455
+ const x = Z(((O = t.doc) == null ? void 0 : O._id) || null), L = t.doc ? Ee.getSellingItem(t.doc, d.state.menu) : d.state.menu.modules.item;
456
456
  return {
457
457
  ...t,
458
458
  taxMode: t.taxes ? "Manual" : "Automatic",
@@ -460,18 +460,18 @@ const Ae = /* @__PURE__ */ oe({
460
460
  restaurants: re(x, {
461
461
  selector: "name"
462
462
  }),
463
- totalProducts: R.length,
463
+ totalProducts: L.length,
464
464
  disableDelete: t.disableDelete
465
465
  };
466
466
  });
467
- }), z = T(() => Y.value.filter((s) => s.id !== le)), G = T(() => z.value.filter((s) => s.name.toLowerCase().includes(k.value.toLowerCase()))), H = (s) => {
467
+ }), z = V(() => Y.value.filter((s) => s.id !== le)), G = V(() => z.value.filter((s) => s.name.toLowerCase().includes(k.value.toLowerCase()))), H = (s) => {
468
468
  d.selectCatalog(s === le ? null : s), E.push({
469
469
  name: ie.EDIT_CATALOG_PRODUCT,
470
470
  params: {
471
471
  id: s
472
472
  }
473
473
  });
474
- }, r = w(null);
474
+ }, r = B(null);
475
475
  function i(s) {
476
476
  var l;
477
477
  (l = r.value) == null || l.trigger(null, {
@@ -481,7 +481,7 @@ const Ae = /* @__PURE__ */ oe({
481
481
  }
482
482
  async function n(s) {
483
483
  const l = d.state.restaurants.filter((t) => [...t.additionalCatalogs, t.inHouseDelivery, ...t.linkedDeliveryCatalogs.map((x) => x.catalog), t.pickupCatalog, t.takeawayCatalog, t.catalogId].includes(s.id)).map((t) => t.name);
484
- l.length > 0 ? S.open({
484
+ l.length > 0 ? T.open({
485
485
  type: "error",
486
486
  message: m("menu.catalog.dialogs.remove.error", {
487
487
  restaurants: l
@@ -510,7 +510,7 @@ const Ae = /* @__PURE__ */ oe({
510
510
  });
511
511
  });
512
512
  }
513
- const v = w([{
513
+ const v = V(() => [{
514
514
  accessorKey: "name",
515
515
  header: () => m("menu.catalog.table.columns.title"),
516
516
  enableSorting: !1
@@ -558,13 +558,13 @@ const Ae = /* @__PURE__ */ oe({
558
558
  }, ["stop", "prevent"])
559
559
  })]);
560
560
  }
561
- }]), h = Oe(), U = T(() => h.breakpoints.value.xs);
561
+ }]), h = Oe(), U = V(() => h.breakpoints.value.xs);
562
562
  return (s, l) => {
563
- const t = y("fm-button"), x = y("FmSearch"), R = y("FmTable"), O = y("FmButton"), $ = y("fm-side-sheet");
564
- return p(), V(Ue, {
563
+ const t = y("fm-button"), x = y("FmSearch"), L = y("FmTable"), O = y("FmButton"), R = y("fm-side-sheet");
564
+ return p(), D(Ue, {
565
565
  heading: e(m)("menu.catalog.title")
566
566
  }, {
567
- "append-heading": g(() => [z.value.length > 0 ? (p(), V(e(me), {
567
+ "append-heading": g(() => [z.value.length > 0 ? (p(), D(e(me), {
568
568
  key: 0,
569
569
  ref_key: "createCatalogManagerFormRef",
570
570
  ref: r
@@ -584,7 +584,7 @@ const Ae = /* @__PURE__ */ oe({
584
584
  }, null, 8, ["label", "onClick"])])]),
585
585
  _: 1
586
586
  }, 512)) : K("", !0)]),
587
- default: g(() => [z.value.length === 0 ? (p(), V(e(Te), {
587
+ default: g(() => [z.value.length === 0 ? (p(), D(e(Te), {
588
588
  key: 0,
589
589
  subtitle: e(m)("menu.catalog.empty.subtitle"),
590
590
  title: e(m)("menu.catalog.empty.title")
@@ -614,7 +614,7 @@ const Ae = /* @__PURE__ */ oe({
614
614
  key: a.id,
615
615
  class: "flex flex-row py-12 px-16 items-center",
616
616
  onClick: (_) => H(a.id)
617
- }, [f("div", qe, [f("p", Qe, " Tax calculation: " + N(a.taxMode), 1), f("p", Xe, " Auto link product: " + N(a.autoLink), 1), f("p", Ze, N(a.name), 1)]), f("div", ea, [o(O, {
617
+ }, [f("div", qe, [f("p", Qe, " Tax calculation: " + w(a.taxMode), 1), f("p", Xe, " Auto link product: " + w(a.autoLink), 1), f("p", Ze, w(a.name), 1)]), f("div", ea, [o(O, {
618
618
  "text-color": e(Q).NeutralGray400,
619
619
  variant: e(j).Tertiary,
620
620
  "prepend-icon": "file_copy",
@@ -633,7 +633,7 @@ const Ae = /* @__PURE__ */ oe({
633
633
  type: e(m)("menu.catalog.title")
634
634
  })
635
635
  }, null, 8, ["modelValue", "placeholder"])])]), o(Fe, null, {
636
- default: g(() => [o(R, {
636
+ default: g(() => [o(L, {
637
637
  "column-defs": v.value,
638
638
  "row-data": G.value,
639
639
  "page-size": G.value.length,
@@ -643,14 +643,14 @@ const Ae = /* @__PURE__ */ oe({
643
643
  onRowClick: l[2] || (l[2] = (a) => H(a.original.id))
644
644
  }, null, 8, ["column-defs", "row-data", "page-size", "search-value"])]),
645
645
  _: 1
646
- })])), o($, {
646
+ })])), o(R, {
647
647
  modelValue: A.value,
648
648
  "onUpdate:modelValue": l[4] || (l[4] = (a) => A.value = a),
649
649
  "max-width": 1e3,
650
650
  "dismiss-away": ""
651
651
  }, {
652
- "side-sheet-header": g(() => [f("p", aa, N(e(m)("menu.catalog.usage.title")), 1)]),
653
- default: g(() => [f("div", la, [(p(!0), M(P, null, q(Y.value, (a, _) => (p(), V(Ae, {
652
+ "side-sheet-header": g(() => [f("p", aa, w(e(m)("menu.catalog.usage.title")), 1)]),
653
+ default: g(() => [f("div", la, [(p(!0), M(P, null, q(Y.value, (a, _) => (p(), D(Ae, {
654
654
  key: _,
655
655
  catalog: a
656
656
  }, null, 8, ["catalog"]))), 128))])]),
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as S, computed as k, ref as C, resolveComponent as w, createElementBlock as _, openBlock as u, createElementVNode as i, createVNode as g, unref as n, withCtx as K, Fragment as P, renderList as U, toDisplayString as E, createBlock as V } from "vue";
2
2
  import { useI18n as L } from "@feedmepos/mf-common";
3
- import { useSnackbar as M, useBreakpoints as $, useDialog as A } from "@feedmepos/ui-library";
4
- import { G as F, u as I, X as Y, O, J as j, A as G } from "./menu-CyVBU_ww.js";
5
- import { _ as J } from "./app-C0_ZxHle.js";
6
- import { u as T } from "./menu-Bi0HvP-T.js";
3
+ import { useSnackbar as M, useBreakpoints as $, useDialog as I } from "@feedmepos/ui-library";
4
+ import { D as F, u as Y, X as j, O as D, J as A, G } from "./menu-Cj3d6im1.js";
5
+ import { _ as J } from "./app-Do8sOqMh.js";
6
+ import { u as O } from "./menu-S1W5eNCT.js";
7
7
  import { _ as R } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
8
- import { u as X } from "./category-B29E8Z6Z.js";
8
+ import { u as X } from "./category-CKujA-NM.js";
9
9
  const q = {
10
10
  key: 0
11
11
  }, H = {
@@ -27,10 +27,10 @@ const q = {
27
27
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
28
28
  }, ne = /* @__PURE__ */ S({
29
29
  __name: "CategoryTable",
30
- setup(B) {
31
- const f = M(), y = F(f), h = O(y), p = I(), {
30
+ setup(T) {
31
+ const f = M(), y = F(f), h = D(y), p = Y(), {
32
32
  categories: v
33
- } = T(), b = k(() => {
33
+ } = O(), b = k(() => {
34
34
  var r, t;
35
35
  const l = ((t = (r = p.currentCatalog) == null ? void 0 : r.override) == null ? void 0 : t.category) ?? {}, o = v.value.map((e, c) => {
36
36
  var m;
@@ -40,7 +40,7 @@ const q = {
40
40
  position: e.id ? ((m = l[e.id]) == null ? void 0 : m.position) ?? c + 1 : null
41
41
  };
42
42
  });
43
- return Y(o, (e) => e.name);
43
+ return j(o, (e) => e.name);
44
44
  }), a = C(""), d = k(() => b.value.filter((l) => l.name.toLowerCase().includes(a.value.toLowerCase()))), {
45
45
  t: s
46
46
  } = L(), x = C([{
@@ -62,7 +62,7 @@ const q = {
62
62
  });
63
63
  }
64
64
  }]);
65
- async function D(l) {
65
+ async function B(l) {
66
66
  var e;
67
67
  const o = p.currentCatalog;
68
68
  if (!o)
@@ -77,7 +77,7 @@ const q = {
77
77
  });
78
78
  }), await r({
79
79
  module: G.F_MENU_MODULE_V4_KEY.enum.catalog,
80
- operation: j.F_OPERATION_TYPE.update,
80
+ operation: A.F_OPERATION_TYPE.update,
81
81
  data: {
82
82
  ...o,
83
83
  override: {
@@ -121,7 +121,7 @@ const q = {
121
121
  "shrink-at": !1,
122
122
  "hide-footer": "",
123
123
  "pin-header-row": "",
124
- onDndChanged: D
124
+ onDndChanged: B
125
125
  }, null, 8, ["column-defs", "page-size", "row-data", "search-value"])]),
126
126
  _: 1
127
127
  })]));
@@ -129,8 +129,8 @@ const q = {
129
129
  }
130
130
  }), pe = /* @__PURE__ */ S({
131
131
  __name: "Category",
132
- setup(B) {
133
- const f = A(), y = M(), h = F(y), p = O(h), v = X({ dialog: f, menuLoader: p }), { categories: b } = T(), { t: a } = L();
132
+ setup(T) {
133
+ const f = I(), y = M(), h = F(y), p = D(h), v = X({ dialog: f, menuLoader: p }), { categories: b } = O(), { t: a } = L();
134
134
  function d() {
135
135
  v.create();
136
136
  }
@@ -1,19 +1,19 @@
1
- import { defineComponent as K, ref as F, computed as B, watch as se, resolveComponent as p, createElementBlock as E, openBlock as f, Fragment as Q, renderSlot as re, createVNode as d, unref as e, withCtx as g, createElementVNode as n, toDisplayString as T, h as L, withModifiers as D, getCurrentInstance as ie, renderList as ce, createBlock as U, createCommentVNode as ue } from "vue";
1
+ import { defineComponent as A, ref as F, computed as B, watch as se, resolveComponent as p, createElementBlock as E, openBlock as f, Fragment as Q, renderSlot as re, createVNode as d, unref as e, withCtx as g, createElementVNode as n, toDisplayString as T, h as L, withModifiers as z, getCurrentInstance as ie, renderList as ce, createBlock as U, createCommentVNode as ue } from "vue";
2
2
  import { useI18n as j } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as Y, components as R, useDialog as ee, FmButtonVariant as X, useBreakpoints as de, FmButtonColorThemeVariant as me } from "@feedmepos/ui-library";
4
4
  import { _ as pe } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
5
- import { G, u as ge, Z as fe, X as _e, A, a3 as ye, O as q, J as te } from "./menu-CyVBU_ww.js";
5
+ import { D as G, u as ge, Z as fe, X as _e, G as K, a3 as ye, O as q, J as te } from "./menu-Cj3d6im1.js";
6
6
  import { _ as ve } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
7
- import { _ as he } from "./app-C0_ZxHle.js";
7
+ import { _ as he } from "./app-Do8sOqMh.js";
8
8
  import { c as be } from "./createForm-BoUQeZTd.js";
9
9
  import { _ as Z } from "./FormSection.vue_vue_type_script_setup_true_lang-CO4YGYLB.js";
10
10
  import { u as xe } from "./discardConfirm-BHni0LNu.js";
11
11
  import { c as H } from "./object-DVUNCr7w.js";
12
12
  import { r as Ce } from "./rules-CIWTZQfh.js";
13
- import { u as J, a as ke } from "./menu-Bi0HvP-T.js";
13
+ import { u as J, a as ke } from "./menu-S1W5eNCT.js";
14
14
  import { c as we } from "./check-C9mY6LiX.js";
15
- import { u as Fe } from "./item-CRYbpxtN.js";
16
- import { u as oe } from "./category-B29E8Z6Z.js";
15
+ import { u as Fe } from "./item-DqdhjOW8.js";
16
+ import { u as oe } from "./category-CKujA-NM.js";
17
17
  import { _ as Ve } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
18
18
  const $e = {
19
19
  class: "fm-typo-en-title-md-600"
@@ -29,7 +29,7 @@ const $e = {
29
29
  class: "flex-1 overflow-hidden min-h-[300px]"
30
30
  }, Oe = {
31
31
  class: "flex gap-8 items-center justify-start"
32
- }, Ue = /* @__PURE__ */ K({
32
+ }, Ue = /* @__PURE__ */ A({
33
33
  __name: "Form",
34
34
  props: {
35
35
  initialValue: {}
@@ -72,7 +72,7 @@ const $e = {
72
72
  outline: !0,
73
73
  variant: "tertiary",
74
74
  textColor: "neutral-gray-400",
75
- onClick: D(async () => {
75
+ onClick: z(async () => {
76
76
  await s(a);
77
77
  }, ["stop", "prevent"])
78
78
  })]);
@@ -84,12 +84,12 @@ const $e = {
84
84
  async function s(o) {
85
85
  await r.update(o._id);
86
86
  }
87
- const y = B(() => m.version === A.F_MENU_VERSION.enum.v4);
88
- async function I(o) {
87
+ const y = B(() => m.version === K.F_MENU_VERSION.enum.v4);
88
+ async function D(o) {
89
89
  const a = ye(o, i.value.id);
90
90
  await r.updateMany(a);
91
91
  }
92
- const z = xe(() => i.value.name !== _.initialValue.name, () => {
92
+ const I = xe(() => i.value.name !== _.initialValue.name, () => {
93
93
  u.value = !1;
94
94
  });
95
95
  async function c() {
@@ -97,7 +97,7 @@ const $e = {
97
97
  updateMenu: a
98
98
  } = $;
99
99
  await a({
100
- module: A.F_MENU_MODULE_V4_KEY.enum.category,
100
+ module: K.F_MENU_MODULE_V4_KEY.enum.category,
101
101
  operation: te.F_OPERATION_TYPE.update,
102
102
  data: {
103
103
  ...o,
@@ -124,7 +124,7 @@ const $e = {
124
124
  blameFormChildOnValidationFailed: !0
125
125
  },
126
126
  "max-width": 560,
127
- "onOn:clickedAway": e(z)
127
+ "onOn:clickedAway": e(I)
128
128
  }, {
129
129
  "side-sheet-header": g(() => [n("p", $e, T(e(t)("menu.category.title")), 1)]),
130
130
  "side-sheet-footer": g(() => [n("div", Oe, [d(W, {
@@ -179,7 +179,7 @@ const $e = {
179
179
  "shrink-at": !1,
180
180
  "hide-footer": "",
181
181
  "pin-header-row": "",
182
- onDndChanged: I,
182
+ onDndChanged: D,
183
183
  onRowClick: a[2] || (a[2] = (v) => s(v.original))
184
184
  }, null, 8, ["draggable", "page-size", "row-data", "search-value"])])]),
185
185
  _: 1
@@ -192,22 +192,22 @@ const $e = {
192
192
  key: 0
193
193
  }, Pe = {
194
194
  class: "flex justify-end items-center"
195
- }, Ie = {
195
+ }, De = {
196
196
  class: "w-[320px]"
197
- }, ze = {
197
+ }, Ie = {
198
198
  key: 1,
199
199
  class: "flex-1 flex flex-col min-h-0"
200
- }, De = {
200
+ }, ze = {
201
201
  class: "p-8"
202
202
  }, Re = {
203
203
  class: "flex flex-1 flex-col min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
204
- }, Ae = ["onClick"], Ke = {
204
+ }, Ke = ["onClick"], Ae = {
205
205
  class: "flex-1 space-y-4"
206
206
  }, je = {
207
207
  class: "fm-typo-en-body-lg-600"
208
208
  }, Ye = {
209
209
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
210
- }, Ge = /* @__PURE__ */ K({
210
+ }, Ge = /* @__PURE__ */ A({
211
211
  __name: "CategoryTable",
212
212
  setup(N) {
213
213
  const h = ee(), _ = Y(), V = G(_), b = q(V), $ = oe({
@@ -252,7 +252,7 @@ const $e = {
252
252
  disabled: !s.id,
253
253
  variant: "tertiary",
254
254
  textColor: "neutral-gray-400",
255
- onClick: D(async () => {
255
+ onClick: z(async () => {
256
256
  await u(s);
257
257
  }, ["stop", "prevent"])
258
258
  })]);
@@ -282,7 +282,7 @@ const $e = {
282
282
  }
283
283
  }).onPrimary(async () => {
284
284
  await b.updateMenu({
285
- module: A.F_MENU_MODULE_V4_KEY.enum.category,
285
+ module: K.F_MENU_MODULE_V4_KEY.enum.category,
286
286
  operation: te.F_OPERATION_TYPE.delete,
287
287
  // `category.id` is guaranteed to be defined due to the earlier check in `deleteCategory`.
288
288
  data: l.id
@@ -301,8 +301,8 @@ const $e = {
301
301
  }
302
302
  const S = de(), P = B(() => S.breakpoints.value.xs);
303
303
  return (l, s) => {
304
- const y = p("FmSearch"), I = p("FmTable"), z = p("FmButton");
305
- return P.value ? (f(), E("div", ze, [n("div", De, [d(y, {
304
+ const y = p("FmSearch"), D = p("FmTable"), I = p("FmButton");
305
+ return P.value ? (f(), E("div", Ie, [n("div", ze, [d(y, {
306
306
  autofocus: "",
307
307
  modelValue: r.value,
308
308
  "onUpdate:modelValue": s[2] || (s[2] = (c) => r.value = c),
@@ -314,15 +314,15 @@ const $e = {
314
314
  key: c.id || "",
315
315
  class: "flex flex-row py-12 px-16",
316
316
  onClick: (o) => C(c)
317
- }, [n("div", Ke, [n("p", je, T(c.name), 1), n("p", Ye, T(e(t)(c.items.length > 1 ? "menu.common.labels.product_linked_plural" : "menu.common.labels.product_linked_singular", {
317
+ }, [n("div", Ae, [n("p", je, T(c.name), 1), n("p", Ye, T(e(t)(c.items.length > 1 ? "menu.common.labels.product_linked_plural" : "menu.common.labels.product_linked_singular", {
318
318
  count: c.items.length
319
- })), 1)]), d(z, {
319
+ })), 1)]), d(I, {
320
320
  "text-color": e(me).NeutralGray400,
321
321
  variant: e(X).Tertiary,
322
322
  "prepend-icon": "delete",
323
323
  disabled: !c.id,
324
- onClick: D((o) => u(c), ["stop"])
325
- }, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8, Ae))), 128))])])) : (f(), E("div", Ne, [n("div", Pe, [n("div", Ie, [d(y, {
324
+ onClick: z((o) => u(c), ["stop"])
325
+ }, null, 8, ["text-color", "variant", "disabled", "onClick"])], 8, Ke))), 128))])])) : (f(), E("div", Ne, [n("div", Pe, [n("div", De, [d(y, {
326
326
  modelValue: r.value,
327
327
  "onUpdate:modelValue": s[0] || (s[0] = (c) => r.value = c),
328
328
  autofocus: "",
@@ -331,7 +331,7 @@ const $e = {
331
331
  type: e(t)("menu.category.title")
332
332
  })
333
333
  }, null, 8, ["modelValue", "placeholder"])])]), d(he, null, {
334
- default: g(() => [d(I, {
334
+ default: g(() => [d(D, {
335
335
  "column-defs": O.value,
336
336
  draggable: !0,
337
337
  "page-size": e(m).length,
@@ -347,7 +347,7 @@ const $e = {
347
347
  })]));
348
348
  };
349
349
  }
350
- }), qe = { class: "flex-1 flex justify-between gap-8 pl-8" }, Je = { class: "flex items-center" }, We = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Xe = { class: "fm-typo-en-body-md-600 font-semibold" }, gt = /* @__PURE__ */ K({
350
+ }), qe = { class: "flex-1 flex justify-between gap-8 pl-8" }, Je = { class: "flex items-center" }, We = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, Xe = { class: "fm-typo-en-body-md-600 font-semibold" }, gt = /* @__PURE__ */ A({
351
351
  __name: "Category",
352
352
  setup(N) {
353
353
  const h = ee(), _ = Y(), V = G(_), b = q(V), $ = oe({ dialog: h, menuLoader: b }), { categories: m } = J(), { t: r } = j();