@feedmepos/mf-menu 0.31.74 → 0.31.75-prod

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 (88) hide show
  1. package/dist/{App-B6Hn5Wwr.js → App-Cw2D3IXT.js} +528 -585
  2. package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-CFtcqy58.js +161 -0
  3. package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-CnCoRLDg.js +74 -0
  4. package/dist/{Catalog-D-2hDU2I.js → Catalog-B5kAKdVW.js} +9 -9
  5. package/dist/{Category-hSOIgBkH.js → Category-CAd9BTRX.js} +8 -8
  6. package/dist/{Category-DjTbuAvE.js → Category-DKjU47aW.js} +5 -5
  7. package/dist/{CookingGuide-D7ruB7eP.js → CookingGuide-BN739JkB.js} +7 -7
  8. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-mxVSGXAz.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-gii2CTYD.js} +3 -3
  9. package/dist/{Group-evJZbgZn.js → Group-DmII5Nwf.js} +4 -4
  10. package/dist/{Group-CjlhbhDV.js → Group-DnpVxZkN.js} +1 -1
  11. package/dist/{Group.vue_vue_type_script_setup_true_lang-DiKraPiw.js → Group.vue_vue_type_script_setup_true_lang-BEeCwmKt.js} +163 -163
  12. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BYku8MAc.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DB5B3PLx.js} +90 -90
  13. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DScxctPb.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BEISm7uc.js} +3046 -3046
  14. package/dist/{Ingredient-jNDx1pUw.js → Ingredient-CpuyDF4n.js} +30 -30
  15. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CuM_k-C3.js → InventoryBinding.vue_vue_type_script_setup_true_lang-GHiwD8VV.js} +1112 -1112
  16. package/dist/{LinkProductSideSheet-CAPIdf6P.js → LinkProductSideSheet-DrSKOBLg.js} +129 -129
  17. package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-Bm_hSelC.js +69 -0
  18. package/dist/{MenuSetting-C2MDgy57.js → MenuSetting-BNuIUnjz.js} +138 -138
  19. package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js → PageLayout.vue_vue_type_script_setup_true_lang-vFqWGM6P.js} +8 -8
  20. package/dist/{PrintRoute-SmWbKr9Y.js → PrintRoute-Dl0oWYju.js} +6 -6
  21. package/dist/{Product-BCm49V9T.js → Product-IQBP1vvY.js} +1 -1
  22. package/dist/{Product.vue_vue_type_script_setup_true_lang-CTOjLqbF.js → Product.vue_vue_type_script_setup_true_lang-Bdss6VRj.js} +607 -607
  23. package/dist/{ProductInternalTools-DGsvvnIs.js → ProductInternalTools-Dkhbg1WE.js} +11 -11
  24. package/dist/{Products-D4qeSEfO.js → Products-Dcafs3Lk.js} +59 -59
  25. package/dist/{Publish-3A3EEQ9x.js → Publish-BTuO4AlR.js} +6 -6
  26. package/dist/{Recipe-CS7TZGA6.js → Recipe-Dx2ZkHsk.js} +6 -6
  27. package/dist/{Scheduler-BIwTUJMJ.js → Scheduler-Dh_0J2g9.js} +5 -5
  28. package/dist/{ServingSequence-C0N8wJfr.js → ServingSequence-DXhx9dcu.js} +5 -5
  29. package/dist/{Setting-fA6tvQK2.js → Setting-4x_w46t_.js} +5 -5
  30. package/dist/{Subcategory-BAFAmflQ.js → Subcategory-vztBpQnB.js} +6 -6
  31. package/dist/{Takeaway-D4aO8zzN.js → Takeaway-CDgIyUrN.js} +5 -5
  32. package/dist/{Takeaway-CLZouw1j.js → Takeaway-Dz5PxJk_.js} +1 -1
  33. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-1oN-i9bo.js → Takeaway.vue_vue_type_script_setup_true_lang-BMMXiDFL.js} +6 -6
  34. package/dist/{TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js → TextChip.vue_vue_type_script_setup_true_lang-BJMcI3U2.js} +5 -5
  35. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-Dwol_Lkd.js → Thumbnail.vue_vue_type_script_setup_true_lang-DJ8JMV28.js} +74 -74
  36. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-cTzWxjM4.js +5996 -0
  37. package/dist/{Unit-ByqUb4Po.js → Unit-z7OVmlSq.js} +4 -4
  38. package/dist/{Variant-BmqrUfen.js → Variant-CFRgvlXf.js} +5 -5
  39. package/dist/{_id_-RUWzOB0B.js → _id_-B9q3j4_m.js} +11 -11
  40. package/dist/{app-B1N2F0j8.js → app-CdsS_tMb.js} +1 -1
  41. package/dist/app-CkCBPor3.js +363 -0
  42. package/dist/{app-5fxKLAzS.js → app-CzXxFrl1.js} +447 -447
  43. package/dist/app.js +1 -1
  44. package/dist/apps/mf-menu/src/app.d.ts +0 -1
  45. package/dist/apps/mf-menu/src/components/feature/CategoryManager/CategoriesSelector.vue.d.ts +1 -1
  46. package/dist/apps/mf-menu/src/components/feature/MenuSelector.vue.d.ts +1 -1
  47. package/dist/apps/mf-menu/src/components/feature/SubcategoryManager/SubcategorySelector.vue.d.ts +1 -1
  48. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  49. package/dist/assets/linked-status-B8qYyYR6.js +13 -0
  50. package/dist/assets/override-menu-nmSTTTn7.js +13 -0
  51. package/dist/assets/validate-menu-CF1XZECU.js +13 -0
  52. package/dist/{catalog-CarmtheV.js → catalog-DBBEUpMo.js} +1 -1
  53. package/dist/{catalogSetting-BqrTpBP8.js → catalogSetting-DKvBjleU.js} +1 -1
  54. package/dist/{category-5R83ypNS.js → category-DILExwHL.js} +1 -1
  55. package/dist/{currency-CUl4r9rT.js → currency-B7Xm1xZJ.js} +1 -1
  56. package/dist/customAttributes-DrA0YC82.js +180 -0
  57. package/dist/{index-Ttqt4iFV.js → index-2lrKSO_O.js} +20 -20
  58. package/dist/{index-DlwLw-BQ.js → index-BoVEGKz7.js} +91 -91
  59. package/dist/{index-DAWSNP3G.js → index-Bu5LuO1j.js} +4 -4
  60. package/dist/{index-DUfYYdZ-.js → index-SNNvjtFa.js} +56 -56
  61. package/dist/{index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js → index.vue_vue_type_script_setup_true_lang-B1_JqsYF.js} +16 -16
  62. package/dist/{item-B0UPYxsB.js → item-BnOnvN8x.js} +3091 -3174
  63. package/dist/{iteration-CfmAZiOO.js → iteration-Csz_aSxy.js} +3 -3
  64. package/dist/{jszip.min-zROpry0S.js → jszip.min-B0T3I-lE.js} +329 -329
  65. package/dist/{menu-DAac726D.js → menu-3XEn1C9F.js} +6402 -6332
  66. package/dist/{menu-DpYo8dYR.js → menu-DzbYSPGP.js} +1 -1
  67. package/dist/{menuV2-DZj_FPqR.js → menuV2-cXg54GYW.js} +93 -93
  68. package/dist/mf-menu.css +1 -1
  69. package/dist/packages/shared/src/components/form/SelectFilter.vue.d.ts +1 -1
  70. package/dist/{priceTier-BvDLl8v2.js → priceTier-DVd27LFd.js} +1 -1
  71. package/dist/{scheduler-pNUXG6En.js → scheduler-D8IgBrUX.js} +6 -6
  72. package/dist/{subcategory-DCDCQnAX.js → subcategory-BOpm3s8K.js} +2 -2
  73. package/dist/{toExcel-DqMa1Hn8.js → toExcel-BJM3fOB2.js} +2 -2
  74. package/dist/{unit-CuCXoWPG.js → unit-DF9d3piP.js} +151 -151
  75. package/dist/{vuedraggable-CK8z7qA8.js → vuedraggable-DnBIRDMr.js} +2 -2
  76. package/package.json +5 -5
  77. package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-CqGU3bJQ.js +0 -161
  78. package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js +0 -74
  79. package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +0 -69
  80. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CabQS55D.js +0 -6012
  81. package/dist/app-CHpw_EM1.js +0 -2101
  82. package/dist/apps/mf-menu/src/components/feature/RemyButton.vue.d.ts +0 -15
  83. package/dist/apps/mf-menu/src/components/feature/RemyDialog.vue.d.ts +0 -15
  84. package/dist/apps/mf-menu/src/helper/remy.d.ts +0 -5
  85. package/dist/assets/linked-status-CFdi7K3K.js +0 -13
  86. package/dist/assets/override-menu-CXOY8i3w.js +0 -13
  87. package/dist/assets/validate-menu-DLlrsx2f.js +0 -13
  88. package/dist/customAttributes-BkqKM_KW.js +0 -180
@@ -1,4 +1,4 @@
1
- import { u as h, z as n, J as d, ag as _ } from "./menu-DAac726D.js";
1
+ import { u as h, z as n, J as d, aj as _ } from "./menu-3XEn1C9F.js";
2
2
  import "@feedmepos/ui-library";
3
3
  class u {
4
4
  constructor(t, e, r, a) {
@@ -1,4 +1,4 @@
1
- import { z as u, H as i } from "./menu-DAac726D.js";
1
+ import { z as u, H as i } from "./menu-3XEn1C9F.js";
2
2
  var a = /* @__PURE__ */ ((e) => (e.AUTO = "auto", e.MANUAL = "manual", e))(a || {}), m = /* @__PURE__ */ ((e) => (e[e.Normal = 0] = "Normal", e[e.Rules = 1] = "Rules", e))(m || {});
3
3
  class s {
4
4
  static fromCatalog(r, n) {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as M, watch as _, ref as f, resolveComponent as g, createBlock as x, openBlock as C, unref as l, withCtx as V, createVNode as A } from "vue";
2
- import { J as s, z as u, u as F } from "./menu-DAac726D.js";
2
+ import { J as s, z as u, u as F } from "./menu-3XEn1C9F.js";
3
3
  import { useI18n as E } from "@feedmepos/mf-common";
4
4
  import { useDialogChild as O } from "@feedmepos/ui-library";
5
5
  const y = /* @__PURE__ */ M({
@@ -1,4 +1,4 @@
1
- import { A as e } from "./menu-DAac726D.js";
1
+ import { A as e } from "./menu-3XEn1C9F.js";
2
2
  function n(r, o = !0) {
3
3
  return e.Dinero.fromFdoDinero(r).toFormat(o).replaceAll(" ", "");
4
4
  }
@@ -0,0 +1,180 @@
1
+ import { defineComponent as b, createElementBlock as c, openBlock as u, normalizeClass as _, renderSlot as p, createCommentVNode as v, createVNode as x, createElementVNode as m, toDisplayString as f, withCtx as $, computed as d } from "vue";
2
+ import { I as h } from "./menu-3XEn1C9F.js";
3
+ import { x as A, N as T } from "./app-CzXxFrl1.js";
4
+ import { useCoreStore as E, EMPTY_RULE as I, isEmptyMongoQuery as N, isEmptyRule as C } from "@feedmepos/mf-common";
5
+ const S = /* @__PURE__ */ b({
6
+ __name: "FormColumn",
7
+ props: {
8
+ shrinkable: { type: Boolean }
9
+ },
10
+ setup(e) {
11
+ return (o, a) => (u(), c("div", {
12
+ class: _(["flex-1 flex flex-col space-y-24", { "min-h-0": e.shrinkable }])
13
+ }, [
14
+ p(o.$slots, "default")
15
+ ], 2));
16
+ }
17
+ }), w = {
18
+ key: 0,
19
+ class: "flex flex-row justify-between items-center"
20
+ }, M = { class: "space-y-4" }, V = { class: "fm-typo-en-title-sm-600" }, B = {
21
+ key: 0,
22
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
23
+ }, Y = /* @__PURE__ */ b({
24
+ __name: "FormSection",
25
+ props: {
26
+ title: {},
27
+ subTitle: {},
28
+ shrinkable: { type: Boolean }
29
+ },
30
+ setup(e) {
31
+ return (o, a) => (u(), c("div", {
32
+ class: _(["flex flex-col space-y-16", { "min-h-0": e.shrinkable }])
33
+ }, [
34
+ e.title ? (u(), c("div", w, [
35
+ m("div", M, [
36
+ m("p", V, f(e.title), 1),
37
+ e.subTitle ? (u(), c("p", B, f(e.subTitle), 1)) : v("", !0)
38
+ ]),
39
+ p(o.$slots, "append-title")
40
+ ])) : v("", !0),
41
+ x(S, { shrinkable: e.shrinkable }, {
42
+ default: $(() => [
43
+ p(o.$slots, "default")
44
+ ]),
45
+ _: 3
46
+ }, 8, ["shrinkable"])
47
+ ], 2));
48
+ }
49
+ }), D = { class: "space-y-8" }, F = { class: "flex items-center justify-between" }, Q = { class: "space-y-8" }, R = { class: "fm-typo-en-body-lg-600" }, j = {
50
+ key: 0,
51
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
52
+ }, H = /* @__PURE__ */ b({
53
+ __name: "FormItem",
54
+ props: {
55
+ label: {},
56
+ description: {}
57
+ },
58
+ setup(e) {
59
+ return (o, a) => (u(), c("div", D, [
60
+ m("div", F, [
61
+ m("div", Q, [
62
+ m("p", R, f(e.label), 1),
63
+ e.description ? (u(), c("p", j, f(e.description), 1)) : v("", !0)
64
+ ]),
65
+ p(o.$slots, "append")
66
+ ]),
67
+ p(o.$slots, "default")
68
+ ]));
69
+ }
70
+ });
71
+ function y(e) {
72
+ return Array.from(new Set(e));
73
+ }
74
+ function J() {
75
+ const e = E();
76
+ return {
77
+ restaurantAttributes: d(() => [
78
+ {
79
+ type: "string",
80
+ key: "name",
81
+ entity: "restaurant",
82
+ values: y(
83
+ e.restaurants.value.filter((a) => {
84
+ var i;
85
+ return !!((i = a.profile) != null && i.name);
86
+ }).map((a) => a.profile.name)
87
+ )
88
+ },
89
+ {
90
+ type: "string",
91
+ key: "code",
92
+ entity: "restaurant",
93
+ values: y(
94
+ e.restaurants.value.filter((a) => {
95
+ var i;
96
+ return !!((i = a.profile) != null && i.code);
97
+ }).map((a) => a.profile.code)
98
+ )
99
+ }
100
+ ])
101
+ };
102
+ }
103
+ function K(e = {}) {
104
+ const o = d(() => {
105
+ var t, l;
106
+ const n = ((t = e.menuItems) == null ? void 0 : t.value) || [], s = ((l = e.categories) == null ? void 0 : l.value) || [];
107
+ return [
108
+ {
109
+ type: "string",
110
+ key: "name",
111
+ entity: "item",
112
+ values: y(n.filter((r) => !!r.name).map((r) => r.name))
113
+ },
114
+ {
115
+ type: "string",
116
+ key: "code",
117
+ entity: "item",
118
+ values: y(n.filter((r) => !!r.code).map((r) => r.code))
119
+ },
120
+ {
121
+ type: "string",
122
+ key: "category",
123
+ entity: "item",
124
+ values: y(s.filter((r) => !!r.name).map((r) => r.name))
125
+ }
126
+ ];
127
+ }), a = d(() => {
128
+ var s;
129
+ const n = {};
130
+ return (s = e.categories) == null || s.value.forEach((t) => {
131
+ n[t.name] = t._id;
132
+ }), n;
133
+ }), i = d(() => {
134
+ var s;
135
+ const n = {};
136
+ return (s = e.categories) == null || s.value.forEach((t) => {
137
+ n[t._id] = t.name;
138
+ }), n;
139
+ });
140
+ function g(n) {
141
+ const s = h.cloneDeep(n);
142
+ return s != null && s.rules && (s.rules = s.rules.map((t) => {
143
+ if ("property" in t && t.property === "category" && Array.isArray(t.value)) {
144
+ const l = t.value.map((r) => i.value[r]);
145
+ return { ...t, value: l };
146
+ }
147
+ return t;
148
+ })), s;
149
+ }
150
+ function k(n) {
151
+ const s = h.cloneDeep(n);
152
+ return s != null && s.rules && (s.rules = s.rules.map((t) => {
153
+ if ("property" in t && t.property === "category" && Array.isArray(t.value)) {
154
+ const l = t.value.map((r) => a.value[r]);
155
+ return { ...t, value: l };
156
+ }
157
+ return t;
158
+ })), s;
159
+ }
160
+ return {
161
+ itemAttributes: o,
162
+ convertCategoryIdToName: g,
163
+ convertCategoryNameToId: k
164
+ };
165
+ }
166
+ function O(e) {
167
+ return N(e) ? I : A.build(e);
168
+ }
169
+ function W(e) {
170
+ return C(e) ? null : T.build(e);
171
+ }
172
+ export {
173
+ Y as _,
174
+ H as a,
175
+ S as b,
176
+ K as c,
177
+ W as f,
178
+ O as m,
179
+ J as u
180
+ };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as W, ref as A, resolveComponent as v, createElementBlock as E, openBlock as I, Fragment as B, createElementVNode as g, createVNode as c, normalizeClass as T, withCtx as _, toDisplayString as S, unref as i, h as G, watch as O, onMounted as K, nextTick as M, readonly as N, getCurrentInstance as U, getCurrentScope as L, onScopeDispose as $ } from "vue";
2
2
  import { useI18n as q, useCustomAttributes as H, useCoreStore as J } from "@feedmepos/mf-common";
3
3
  import { components as Q } from "@feedmepos/ui-library";
4
- import { u as X, _ as k } from "./customAttributes-BkqKM_KW.js";
4
+ import { u as X, _ as k } from "./customAttributes-DrA0YC82.js";
5
5
  const Y = {
6
6
  class: /* @__PURE__ */ T(["fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap", "text-fm-color-neutral-gray-400"])
7
7
  }, Z = {
@@ -38,8 +38,8 @@ const Y = {
38
38
  header: () => t("portalshell.customAttributes.form.value"),
39
39
  accessorKey: "values",
40
40
  enableSorting: !1,
41
- cell: (f) => {
42
- const s = f.row.original, u = s.values;
41
+ cell: (p) => {
42
+ const s = p.row.original, u = s.values;
43
43
  return G(Q.FmSelect, {
44
44
  modelValue: s.value,
45
45
  placeholder: t("portalshell.customAttributes.form.valuePlaceholder"),
@@ -53,22 +53,22 @@ const Y = {
53
53
  });
54
54
  }
55
55
  }], m = n;
56
- function b(f) {
57
- return f.reduce((s, u) => (u.value != null && (s[u.key] = u.value), s), {});
56
+ function b(p) {
57
+ return p.reduce((s, u) => (u.value != null && (s[u.key] = u.value), s), {});
58
58
  }
59
59
  const h = () => {
60
- const f = r.value.filter((l) => l.value != null), s = a.value.filter((l) => l.value != null), u = {
61
- restaurantCustomAttributes: b(f),
60
+ const p = r.value.filter((l) => l.value != null), s = a.value.filter((l) => l.value != null), u = {
61
+ restaurantCustomAttributes: b(p),
62
62
  restaurantAttributes: b(s)
63
63
  };
64
64
  m("confirm", u), C();
65
- }, p = A(!1);
65
+ }, f = A(!1);
66
66
  function w() {
67
67
  var u, l;
68
- p.value = !0;
69
- const f = ((u = o.currentRestaurantAttrParams) == null ? void 0 : u.restaurantCustomAttributes) ?? {};
68
+ f.value = !0;
69
+ const p = ((u = o.currentRestaurantAttrParams) == null ? void 0 : u.restaurantCustomAttributes) ?? {};
70
70
  r.value.forEach((d) => {
71
- d.value = f[d.key] ?? void 0;
71
+ d.value = p[d.key] ?? void 0;
72
72
  });
73
73
  const s = ((l = o.currentRestaurantAttrParams) == null ? void 0 : l.restaurantAttributes) ?? {};
74
74
  a.value.forEach((d) => {
@@ -76,15 +76,15 @@ const Y = {
76
76
  });
77
77
  }
78
78
  function C() {
79
- p.value = !1;
79
+ f.value = !1;
80
80
  }
81
- return (f, s) => {
81
+ return (p, s) => {
82
82
  const u = v("FmIcon"), l = v("FmChip"), d = v("FmTable"), V = v("FmSpacer"), F = v("fm-button"), j = v("FmDialog");
83
83
  return I(), E(B, null, [g("div", {
84
84
  class: "cursor-pointer",
85
85
  onClick: w
86
86
  }, [c(l, {
87
- class: T([f.fullWidth ? "w-full justify-between" : ""])
87
+ class: T([e.fullWidth ? "w-full justify-between" : ""])
88
88
  }, {
89
89
  default: _(() => [g("div", Y, S(i(t)("menu.catalog.form.restaurant_attributes_title")), 1), c(u, {
90
90
  color: "neutral-gray-400",
@@ -93,8 +93,8 @@ const Y = {
93
93
  })]),
94
94
  _: 1
95
95
  }, 8, ["class"])]), c(j, {
96
- modelValue: p.value,
97
- "onUpdate:modelValue": s[0] || (s[0] = (R) => p.value = R),
96
+ modelValue: f.value,
97
+ "onUpdate:modelValue": s[0] || (s[0] = (R) => f.value = R),
98
98
  overlay: !0,
99
99
  "min-width": "min(calc(100% - 48px), 560px)"
100
100
  }, {
@@ -165,11 +165,11 @@ function ne(e, n = {}) {
165
165
  };
166
166
  return (m) => {
167
167
  const b = x(e), h = x(n.maxWait);
168
- return o && a(o), b <= 0 || h !== void 0 && h <= 0 ? (t && (a(t), t = null), Promise.resolve(m())) : new Promise((p, w) => {
169
- r = n.rejectOnCancel ? w : p, h && !t && (t = setTimeout(() => {
170
- o && a(o), t = null, p(m());
168
+ return o && a(o), b <= 0 || h !== void 0 && h <= 0 ? (t && (a(t), t = null), Promise.resolve(m())) : new Promise((f, w) => {
169
+ r = n.rejectOnCancel ? w : f, h && !t && (t = setTimeout(() => {
170
+ o && a(o), t = null, f(m());
171
171
  }, h)), o = setTimeout(() => {
172
- t && a(t), t = null, p(m());
172
+ t && a(t), t = null, f(m());
173
173
  }, b);
174
174
  });
175
175
  };
@@ -1,14 +1,14 @@
1
- import { A as S, z as A, u as K, H as O, B as q, I as z } from "./menu-DAac726D.js";
2
- import { defineComponent as T, ref as f, computed as B, watch as L, onMounted as R, onBeforeUnmount as H, resolveComponent as F, createBlock as N, openBlock as M, withModifiers as C, withCtx as g, renderSlot as U, createElementBlock as P, Fragment as W, createVNode as c, unref as i, createElementVNode as D, createCommentVNode as j, toDisplayString as Y } from "vue";
1
+ import { A as S, z as A, u as K, H as O, B as q, I as z } from "./menu-3XEn1C9F.js";
2
+ import { defineComponent as T, ref as y, computed as B, watch as L, onMounted as R, onBeforeUnmount as H, resolveComponent as _, createBlock as N, openBlock as M, withModifiers as C, withCtx as g, renderSlot as U, createElementBlock as P, Fragment as W, createVNode as f, unref as i, createElementVNode as D, createCommentVNode as j, toDisplayString as Y } from "vue";
3
3
  import { useI18n as I } from "@feedmepos/mf-common";
4
4
  import { components as Z } from "@feedmepos/ui-library";
5
- import { _ as G } from "./customAttributes-BkqKM_KW.js";
5
+ import { _ as G } from "./customAttributes-DrA0YC82.js";
6
6
  import { u as J } from "./discardConfirm-BHni0LNu.js";
7
- import { _ as Q } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-CqGU3bJQ.js";
7
+ import { _ as Q } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-CFtcqy58.js";
8
8
  import { c as X } from "./check-C9mY6LiX.js";
9
- import { f as ee } from "./currency-CUl4r9rT.js";
10
- import { c as ae } from "./string-DpfFixWH.js";
11
- const te = /* @__PURE__ */ T({
9
+ import { f as ee } from "./currency-B7Xm1xZJ.js";
10
+ import { c as te } from "./string-DpfFixWH.js";
11
+ const ae = /* @__PURE__ */ T({
12
12
  __name: "CurrencyInput",
13
13
  props: {
14
14
  modelValue: {},
@@ -50,41 +50,41 @@ const te = /* @__PURE__ */ T({
50
50
  helperState: {}
51
51
  },
52
52
  emits: ["update:model-value"],
53
- setup(y, { emit: m }) {
54
- const a = y, { t: n } = I(), d = f(!1), v = f(!1), r = f(), x = B(() => a.modelValue ? (v.value && !d.value && (d.value = !0), S.Dinero.fromFdoDinero(a.modelValue).toUnit().toFixed(2)) : "");
53
+ setup(r, { emit: c }) {
54
+ const t = r, { t: n } = I(), m = y(!1), v = y(!1), u = y(), F = B(() => t.modelValue ? (v.value && !m.value && (m.value = !0), S.Dinero.fromFdoDinero(t.modelValue).toUnit().toFixed(2)) : "");
55
55
  L(
56
56
  () => v.value,
57
57
  (e) => {
58
- var t, l, o, E, w;
59
- e ? (l = (t = r.value) == null ? void 0 : t.inputEl) == null || l.select() : (d.value = !1, (o = r.value) != null && o.inputEl && k((w = (E = r.value) == null ? void 0 : E.inputEl) == null ? void 0 : w.value));
58
+ var a, o, l, E, w;
59
+ e ? (o = (a = u.value) == null ? void 0 : a.inputEl) == null || o.select() : (m.value = !1, (l = u.value) != null && l.inputEl && k((w = (E = u.value) == null ? void 0 : E.inputEl) == null ? void 0 : w.value));
60
60
  }
61
61
  );
62
- const V = m, u = B(() => typeof a.required == "string" ? a.required : n("menu.common.validation.field_required", {
63
- field: a.label ?? n("menu.currency.input.field")
62
+ const V = c, s = B(() => typeof t.required == "string" ? t.required : n("menu.common.validation.field_required", {
63
+ field: t.label ?? n("menu.currency.input.field")
64
64
  })), b = [
65
- (e) => a.required ? !!e || u.value : !0,
66
- (e) => a.min !== void 0 && e && parseFloat(e.toString()) < a.min ? n("menu.common.validation.min_value", { value: a.min }) : !0,
67
- (e) => a.max !== void 0 && e && parseFloat(e.toString()) > a.max ? n("menu.common.validation.max_value", { value: a.max }) : !0,
68
- ...a.rules ?? []
65
+ (e) => t.required ? !!e || s.value : !0,
66
+ (e) => t.min !== void 0 && e && parseFloat(e.toString()) < t.min ? n("menu.common.validation.min_value", { value: t.min }) : !0,
67
+ (e) => t.max !== void 0 && e && parseFloat(e.toString()) > t.max ? n("menu.common.validation.max_value", { value: t.max }) : !0,
68
+ ...t.rules ?? []
69
69
  ];
70
70
  function k(e) {
71
- if (typeof e != "number" && !e && a.nullable)
71
+ if (typeof e != "number" && !e && t.nullable)
72
72
  V("update:model-value", void 0);
73
73
  else {
74
74
  if (typeof e == "string" && e === "-")
75
75
  return;
76
- let t = parseFloat((e || "").toString());
77
- t = Number.isNaN(t) ? 0 : t, V("update:model-value", S.Dinero.fromNumber({ number: t }).toObject());
76
+ let a = parseFloat((e || "").toString());
77
+ a = Number.isNaN(a) ? 0 : a, V("update:model-value", S.Dinero.fromNumber({ number: a }).toObject());
78
78
  }
79
79
  }
80
- const s = B(() => typeof a.min == "number" && a.min >= 0), _ = (e) => {
81
- var t, l, o;
80
+ const d = B(() => typeof t.min == "number" && t.min >= 0), x = (e) => {
81
+ var a, o, l;
82
82
  if (!(e.ctrlKey || e.metaKey)) {
83
83
  if (e.key === "Enter") {
84
- (t = r.value) != null && t.inputEl && k((o = (l = r.value) == null ? void 0 : l.inputEl) == null ? void 0 : o.value);
84
+ (a = u.value) != null && a.inputEl && k((l = (o = u.value) == null ? void 0 : o.inputEl) == null ? void 0 : l.value);
85
85
  return;
86
86
  }
87
- if (e.key === "-" && s.value) {
87
+ if (e.key === "-" && d.value) {
88
88
  e.preventDefault();
89
89
  return;
90
90
  }
@@ -93,29 +93,29 @@ const te = /* @__PURE__ */ T({
93
93
  };
94
94
  return R(() => {
95
95
  var e;
96
- r.value && ((e = r.value.inputEl) == null || e.addEventListener("keydown", _));
96
+ u.value && ((e = u.value.inputEl) == null || e.addEventListener("keydown", x));
97
97
  }), H(() => {
98
98
  var e;
99
- r.value && ((e = r.value.inputEl) == null || e.removeEventListener("keydown", _));
100
- }), (e, t) => {
101
- const l = F("fm-text-field");
102
- return M(), N(l, {
99
+ u.value && ((e = u.value.inputEl) == null || e.removeEventListener("keydown", x));
100
+ }), (e, a) => {
101
+ const o = _("fm-text-field");
102
+ return M(), N(o, {
103
103
  ref_key: "inputRef",
104
- ref: r,
105
- autofocus: a.autofocus,
106
- disabled: a.disable,
107
- label: e.label,
108
- "model-value": x.value,
109
- placeholder: a.placeholder,
110
- "prepend-icon": e.showCurrency ? "attach_money" : void 0,
104
+ ref: u,
105
+ autofocus: t.autofocus,
106
+ disabled: t.disable,
107
+ label: r.label,
108
+ "model-value": F.value,
109
+ placeholder: t.placeholder,
110
+ "prepend-icon": r.showCurrency ? "attach_money" : void 0,
111
111
  rules: b,
112
112
  inputmode: "decimal",
113
- onFocusChanged: t[0] || (t[0] = (o) => v.value = o),
114
- onWheel: t[1] || (t[1] = C(() => {
113
+ onFocusChanged: a[0] || (a[0] = (l) => v.value = l),
114
+ onWheel: a[1] || (a[1] = C(() => {
115
115
  }, ["prevent"])),
116
- onTouchmove: t[2] || (t[2] = C(() => {
116
+ onTouchmove: a[2] || (a[2] = C(() => {
117
117
  }, ["prevent"])),
118
- onScroll: t[3] || (t[3] = C(() => {
118
+ onScroll: a[3] || (a[3] = C(() => {
119
119
  }, ["prevent"]))
120
120
  }, {
121
121
  append: g(() => [
@@ -126,15 +126,15 @@ const te = /* @__PURE__ */ T({
126
126
  };
127
127
  }
128
128
  });
129
- function be(y) {
130
- return y.map((m) => ({
129
+ function be(r) {
130
+ return r.map((c) => ({
131
131
  module: A.F_MENU_MODULE_V4_KEY.enum.item,
132
- id: m._id,
133
- discriminator: m.combinationKey,
132
+ id: c._id,
133
+ discriminator: c.combinationKey,
134
134
  data: void 0
135
135
  }));
136
136
  }
137
- const le = { class: "fm-typo-en-title-md-600" }, oe = { class: "space-y-32" }, ne = { class: "flex gap-8 items-center justify-start" }, ie = /* @__PURE__ */ T({
137
+ const le = { class: "fm-typo-en-title-md-600" }, ne = { class: "space-y-32" }, oe = { class: "flex gap-8 items-center justify-start" }, ie = /* @__PURE__ */ T({
138
138
  __name: "Form",
139
139
  props: {
140
140
  action: {},
@@ -144,86 +144,86 @@ const le = { class: "fm-typo-en-title-md-600" }, oe = { class: "space-y-32" }, n
144
144
  bindToVariant: { type: Boolean }
145
145
  },
146
146
  emits: ["update:takeaway"],
147
- setup(y, { expose: m, emit: a }) {
148
- const { t: n } = I(), d = y, v = a, r = K(), x = B(() => r.rules.takeaway), V = f(!1), u = f(!1), b = (l) => {
149
- X.isBoolean(l) ? u.value = l : u.value = !u.value;
147
+ setup(r, { expose: c, emit: t }) {
148
+ const { t: n } = I(), m = r, v = t, u = K(), F = B(() => u.rules.takeaway), V = y(!1), s = y(!1), b = (o) => {
149
+ X.isBoolean(o) ? s.value = o : s.value = !s.value;
150
150
  };
151
151
  function k() {
152
- var o;
153
- const l = {
152
+ var l;
153
+ const o = {
154
154
  ...q.generator.initMenuV4Takeaway(),
155
155
  usedBy: [],
156
- ...O(d.initialValue ?? {})
156
+ ...O(m.initialValue ?? {})
157
157
  };
158
- return (o = d.fallback) != null && o.price && (l.price = null), l;
158
+ return (l = m.fallback) != null && l.price && (o.price = null), o;
159
159
  }
160
- const s = f(k()), _ = B(() => d.action === "add" ? n("menu.takeaway.add") : n("menu.takeaway.update")), e = J(
160
+ const d = y(k()), x = B(() => m.action === "add" ? n("menu.takeaway.add") : n("menu.takeaway.update")), e = J(
161
161
  () => !z.isEqual(
162
- s.value,
163
- d.initialValue || {
162
+ d.value,
163
+ m.initialValue || {
164
164
  ...q.generator.initMenuV4Takeaway(),
165
165
  usedBy: []
166
166
  }
167
167
  ),
168
- () => u.value = !1
168
+ () => s.value = !1
169
169
  );
170
- function t() {
171
- v("update:takeaway", s.value), b(!1);
170
+ function a() {
171
+ v("update:takeaway", d.value), b(!1);
172
172
  }
173
173
  return L(
174
- () => u.value,
174
+ () => s.value,
175
175
  () => {
176
- u.value && (s.value = k());
176
+ s.value && (d.value = k());
177
177
  }
178
- ), m({
178
+ ), c({
179
179
  trigger: b,
180
- show: u
181
- }), (l, o) => {
182
- const E = F("fm-text-field"), w = F("fm-button"), $ = F("fm-side-sheet");
180
+ show: s
181
+ }), (o, l) => {
182
+ const E = _("fm-text-field"), w = _("fm-button"), $ = _("fm-side-sheet");
183
183
  return M(), P(W, null, [
184
- U(l.$slots, "default", { trigger: b }),
185
- c($, {
184
+ U(o.$slots, "default", { trigger: b }),
185
+ f($, {
186
186
  id: "group-form",
187
- modelValue: u.value,
188
- "onUpdate:modelValue": o[4] || (o[4] = (p) => u.value = p),
187
+ modelValue: s.value,
188
+ "onUpdate:modelValue": l[4] || (l[4] = (p) => s.value = p),
189
189
  "is-container": i(Z).FmForm,
190
190
  "is-container-props": {
191
- onValidationSuccess: t,
191
+ onValidationSuccess: a,
192
192
  blameFormChildOnValidationFailed: !0
193
193
  },
194
194
  "max-width": 560,
195
195
  "onOn:clickedAway": i(e)
196
196
  }, {
197
197
  "side-sheet-header": g(() => [
198
- D("p", le, Y(_.value), 1)
198
+ D("p", le, Y(x.value), 1)
199
199
  ]),
200
200
  "side-sheet-footer": g(() => [
201
- D("div", ne, [
202
- c(w, {
203
- label: i(ae)(i(n)(`menu.common.actions.${l.action}`)),
201
+ D("div", oe, [
202
+ f(w, {
203
+ label: i(te)(i(n)(`menu.common.actions.${r.action}`)),
204
204
  loading: V.value,
205
205
  size: "lg",
206
206
  type: "submit",
207
207
  variant: "primary"
208
208
  }, null, 8, ["label", "loading"]),
209
- c(w, {
209
+ f(w, {
210
210
  label: i(n)("menu.common.actions.cancel"),
211
211
  size: "lg",
212
212
  variant: "tertiary",
213
- onClick: o[3] || (o[3] = () => u.value = !1)
213
+ onClick: l[3] || (l[3] = () => s.value = !1)
214
214
  }, null, 8, ["label"])
215
215
  ])
216
216
  ]),
217
217
  default: g(() => [
218
- D("div", oe, [
219
- c(G, null, {
218
+ D("div", ne, [
219
+ f(G, null, {
220
220
  default: g(() => {
221
221
  var p;
222
222
  return [
223
- c(E, {
224
- modelValue: s.value.name,
225
- "onUpdate:modelValue": o[0] || (o[0] = (h) => s.value.name = h),
226
- disabled: !x.value.name,
223
+ f(E, {
224
+ modelValue: d.value.name,
225
+ "onUpdate:modelValue": l[0] || (l[0] = (h) => d.value.name = h),
226
+ disabled: !F.value.name,
227
227
  rules: [
228
228
  (h) => !!h || i(n)("menu.common.validation.required", {
229
229
  field: i(n)("menu.takeaway.columns.title").toLowerCase()
@@ -235,12 +235,12 @@ const le = { class: "fm-typo-en-title-md-600" }, oe = { class: "space-y-32" }, n
235
235
  required: "",
236
236
  title: i(n)("menu.takeaway.columns.title")
237
237
  }, null, 8, ["modelValue", "disabled", "rules", "label", "placeholder", "title"]),
238
- c(te, {
239
- modelValue: s.value.price,
240
- "onUpdate:modelValue": o[1] || (o[1] = (h) => s.value.price = h),
238
+ f(ae, {
239
+ modelValue: d.value.price,
240
+ "onUpdate:modelValue": l[1] || (l[1] = (h) => d.value.price = h),
241
241
  min: 0,
242
- nullable: !!l.fallback,
243
- placeholder: (p = l.fallback) != null && p.price ? i(ee)(l.fallback.price, !1) : void 0,
242
+ nullable: !!r.fallback,
243
+ placeholder: (p = r.fallback) != null && p.price ? i(ee)(r.fallback.price, !1) : void 0,
244
244
  label: i(n)("menu.takeaway.columns.price"),
245
245
  "show-currency": "",
246
246
  title: i(n)("menu.takeaway.columns.price")
@@ -249,11 +249,11 @@ const le = { class: "fm-typo-en-title-md-600" }, oe = { class: "space-y-32" }, n
249
249
  }),
250
250
  _: 1
251
251
  }),
252
- l.applyProduct ? (M(), N(Q, {
252
+ r.applyProduct ? (M(), N(Q, {
253
253
  key: 0,
254
- overrides: s.value.usedBy,
255
- "onUpdate:overrides": o[2] || (o[2] = (p) => s.value.usedBy = p),
256
- "select-variant": l.bindToVariant,
254
+ overrides: d.value.usedBy,
255
+ "onUpdate:overrides": l[2] || (l[2] = (p) => d.value.usedBy = p),
256
+ "select-variant": r.bindToVariant,
257
257
  editable: "",
258
258
  title: i(n)("menu.common.labels.product")
259
259
  }, null, 8, ["overrides", "select-variant", "title"])) : j("", !0)
@@ -267,7 +267,7 @@ const le = { class: "fm-typo-en-title-md-600" }, oe = { class: "space-y-32" }, n
267
267
  }), ke = ie;
268
268
  export {
269
269
  ke as T,
270
- te as _,
270
+ ae as _,
271
271
  ie as a,
272
272
  be as l
273
273
  };
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as G, computed as w, ref as E, watch as C, resolveComponent as g, createElementBlock as F, openBlock as V, Fragment as K, renderSlot as j, createVNode as s, unref as n, withCtx as m, createElementVNode as d, createBlock as M, createCommentVNode as U, normalizeClass as H, createSlots as J, toDisplayString as Q } from "vue";
2
- import { O as W, D as X, H as f, B, J as D, z as I, I as Z } from "./menu-DAac726D.js";
3
- import { d as ee } from "./vuedraggable-CK8z7qA8.js";
2
+ import { O as W, D as X, H as f, B, J as D, z as I, I as Z } from "./menu-3XEn1C9F.js";
3
+ import { d as ee } from "./vuedraggable-DnBIRDMr.js";
4
4
  import { useI18n as te } from "@feedmepos/mf-common";
5
5
  import { useSnackbar as ae, components as ne } from "@feedmepos/ui-library";
6
- import { _ as oe, a as le } from "./customAttributes-BkqKM_KW.js";
6
+ import { _ as oe, a as le } from "./customAttributes-DrA0YC82.js";
7
7
  import { u as ie } from "./discardConfirm-BHni0LNu.js";
8
- import { _ as se } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-CqGU3bJQ.js";
8
+ import { _ as se } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-CFtcqy58.js";
9
9
  import { c as re } from "./check-C9mY6LiX.js";
10
10
  const ue = { class: "fm-typo-en-title-md-600" }, me = { class: "py-16 space-y-32" }, de = ["data-not-allow-sort"], ce = {
11
11
  key: 1,