@feedmepos/mf-menu 0.32.62 → 0.32.63-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 (98) hide show
  1. package/dist/{App-CE4fZP2_.js → App-DhfTGlgM.js} +467 -462
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-PpYjjdOP.js → ApplyProduct.vue_vue_type_script_setup_true_lang-C5-8qdJK.js} +3 -3
  3. package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-C_JKiJRD.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-CXm-0H18.js} +8 -8
  4. package/dist/{Catalog-C2MyXkps.js → Catalog-WuZJfM6l.js} +78 -78
  5. package/dist/{Category-B7Uxbyug.js → Category-BeIo7XWY.js} +20 -20
  6. package/dist/{Category-BoV0MYQp.js → Category-D-cQQCPS.js} +19 -19
  7. package/dist/{CookingGuide-Bdyj8XMv.js → CookingGuide-B-yvD9ZA.js} +88 -88
  8. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-EDbgLHTU.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-2_yzXoa4.js} +1 -1
  9. package/dist/{Group-BuFbi0Z-.js → Group-13i5igrS.js} +5 -5
  10. package/dist/{Group-DYpxc5ui.js → Group-CY8lUzQG.js} +1 -1
  11. package/dist/{Group.vue_vue_type_script_setup_true_lang-B5Uw2Rzm.js → Group.vue_vue_type_script_setup_true_lang-DZhxy0tb.js} +95 -94
  12. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-COYg8e7h.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CWqv-oUd.js} +13 -13
  13. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-YY25YW4B.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DTs4Vpdi.js} +219 -220
  14. package/dist/{Ingredient-Ddw06I0B.js → Ingredient-vrUOW6gk.js} +49 -49
  15. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CsWdL5Lz.js → InventoryBinding.vue_vue_type_script_setup_true_lang-xcVjRjqD.js} +2 -2
  16. package/dist/{LinkProductSideSheet-COAMZqOM.js → LinkProductSideSheet-DMbJG6wf.js} +8 -8
  17. package/dist/{MenuSetting--G1_lGoV.js → MenuSetting-Di2xwm00.js} +10 -10
  18. package/dist/{OrderPacing-DnvLJh5M.js → OrderPacing-CCe-IcGO.js} +28 -28
  19. package/dist/{PrintRoute-CP-3JGP3.js → PrintRoute-CcfObcHY.js} +27 -27
  20. package/dist/{Product-D-q15-Qw.js → Product-ChUVnMgG.js} +1 -1
  21. package/dist/{Product.vue_vue_type_script_setup_true_lang-BaOg60Q6.js → Product.vue_vue_type_script_setup_true_lang-C9Qp50hL.js} +153 -152
  22. package/dist/{ProductInternalTools-wYn0bzml.js → ProductInternalTools-D9HXhgo5.js} +80 -79
  23. package/dist/{Products-CxEsB-7l.js → Products-Bly2ktEC.js} +75 -74
  24. package/dist/{Publish-BCljLztW.js → Publish-C8ubb8Qf.js} +113 -113
  25. package/dist/{Recipe-DgfobgnQ.js → Recipe-BpMRLsyO.js} +32 -32
  26. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BgDVFKRI.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-BD5OCDRn.js} +1 -1
  27. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DCbrAMxd.js → RuleView.vue_vue_type_script_setup_true_lang-Ba3djmX1.js} +474 -473
  28. package/dist/{Scheduler-C-LJs7Gl.js → Scheduler-CiB4b2Fn.js} +9 -9
  29. package/dist/{ServingSequence-BoaDRfsc.js → ServingSequence-BlcyW-dv.js} +18 -18
  30. package/dist/{Setting-BfFqBD9u.js → Setting-DqkL6YYU.js} +31 -31
  31. package/dist/{Subcategory-BsnC9ZSS.js → Subcategory-B4Jg_wtT.js} +43 -43
  32. package/dist/{Takeaway-PilRifJP.js → Takeaway-5G3f7jWT.js} +1 -1
  33. package/dist/{Takeaway-dSEAc70g.js → Takeaway-5rFPYYNA.js} +16 -16
  34. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-CgioM0sV.js → Takeaway.vue_vue_type_script_setup_true_lang-CVsOhg_E.js} +23 -23
  35. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-CHf3g1ia.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-CPqxA6JD.js} +1 -1
  36. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-A43XxqyC.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-yrNuTD-3.js} +8 -9
  37. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-T71R68sq.js +5836 -0
  38. package/dist/{Unit-DW1dFJas.js → Unit-CAkdmQLg.js} +2 -2
  39. package/dist/{Variant-CzLzrt2N.js → Variant-BbLQqbAK.js} +13 -13
  40. package/dist/{_id_-qfASfKMD.js → _id_-Dzacr40I.js} +13 -13
  41. package/dist/{app-BB33yKM6.js → app-4yWs09Fr.js} +495 -495
  42. package/dist/{app-CJnEQz-U.js → app-Deov1985.js} +3 -3
  43. package/dist/app.js +1 -1
  44. package/dist/apps/mf-menu/src/api/media.d.ts +161 -0
  45. package/dist/apps/mf-menu/src/app.d.ts +340 -0
  46. package/dist/apps/mf-menu/src/components/feature/CategoryManager/CategoriesSelector.vue.d.ts +1 -1
  47. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/productImages.d.ts +150 -0
  48. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/CustomDimensionDialog.vue.d.ts +17 -0
  49. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ImageUploadDialog.vue.d.ts +16 -1
  50. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ManageImageDrawer.vue.d.ts +42 -0
  51. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ProductImageField.vue.d.ts +75 -0
  52. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/RegenerateImageDialog.vue.d.ts +17 -0
  53. package/dist/apps/mf-menu/src/components/feature/TreeEditor/item/ProductDetail.vue.d.ts +3 -6
  54. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +1 -1
  55. package/dist/apps/mf-menu/src/composable/remyImageTarget.d.ts +5 -0
  56. package/dist/apps/mf-menu/src/helper/menu.d.ts +14 -1
  57. package/dist/apps/mf-menu/src/stores/menu.d.ts +1 -0
  58. package/dist/apps/mf-menu/src/types/rule.d.ts +2 -0
  59. package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/Form.vue.d.ts +3 -2
  60. package/dist/apps/mf-menu/src/views/Catalog/Edit/AddProductPopup/ProductDetail.vue.d.ts +8 -8
  61. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  62. package/dist/assets/{linked-status-VaVE9Pyh.js → linked-status-B2WLhKkV.js} +3 -3
  63. package/dist/assets/{menu-export-DD9Zt6XH.js → menu-export-Dcw5a_dN.js} +3 -3
  64. package/dist/assets/{override-menu-DZCgrhuF.js → override-menu-cBe2aMY6.js} +3 -3
  65. package/dist/assets/{validate-menu-BFsQlikL.js → validate-menu-BM-5GK85.js} +2 -2
  66. package/dist/{catalog-Cvn1ZMGp.js → catalog-DKygS2Cs.js} +6 -6
  67. package/dist/{catalogSetting-D2bOCGW7.js → catalogSetting-Bn2TplvM.js} +1 -1
  68. package/dist/currency-DXgNHtK8.js +7 -0
  69. package/dist/dayjs.min-DpX65tgj.js +7 -0
  70. package/dist/discardConfirm-DZwzKO-Q.js +3704 -0
  71. package/dist/{index-B2fxLO4K.js → index-B48KLyqg.js} +61 -61
  72. package/dist/{index-CizrxT_e.js → index-BEocaqRK.js} +30 -30
  73. package/dist/index-K-MBqJJo.js +222 -0
  74. package/dist/{index.vue_vue_type_script_setup_true_lang-gaRM4vfS.js → index.vue_vue_type_script_setup_true_lang-Nl505vPi.js} +44918 -51563
  75. package/dist/item-Da3ArD-G.js +13213 -0
  76. package/dist/{jszip.min-BXLegUsz.js → jszip.min-Cc2eR4Cq.js} +119 -119
  77. package/dist/linkProducts-GNuUxFEE.js +331 -0
  78. package/dist/{memberPricing-CizI1rUM.js → memberPricing-T-jr7tn1.js} +1 -1
  79. package/dist/{menu-BCed1YCE.js → menu-DSDRAil-.js} +1 -1
  80. package/dist/{menuV2-Bo9AHrdr.js → menuV2-fTlJdjxi.js} +162 -160
  81. package/dist/mf-menu.css +1 -1
  82. package/dist/{order_pacing-BkfQeNeC.js → order_pacing-Dgo1fySS.js} +17 -17
  83. package/dist/packages/shared/src/helpers/agentCode.d.ts +9 -0
  84. package/dist/{priceTier-rjuK-b6U.js → priceTier-aT_gIfrN.js} +3 -3
  85. package/dist/{rules-DHX_hK6G.js → rules-Cx2hkV20.js} +8 -8
  86. package/dist/{scheduler-BsfPbtM2.js → scheduler-Bd-q7yF8.js} +62 -62
  87. package/dist/{toExcel-DJHljg_L.js → toExcel-qfjR83qT.js} +2 -2
  88. package/dist/{unit-BxTWR1dZ.js → unit-n1T9grbM.js} +64 -64
  89. package/package.json +3 -3
  90. package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-DGqao47l.js +0 -399
  91. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DY1umres.js +0 -6058
  92. package/dist/apps/mf-menu/src/components/feature/TreeEditor/composable/thumbnailUpload.d.ts +0 -6
  93. package/dist/apps/mf-menu/src/components/feature/TreeEditor/image/ImageUploadForm.vue.d.ts +0 -38
  94. package/dist/currency-DQDsuXB5.js +0 -7
  95. package/dist/dayjs.min-CzUkrXIR.js +0 -7
  96. package/dist/discardConfirm-BHni0LNu.js +0 -28
  97. package/dist/index-CisutoS9.js +0 -156
  98. package/dist/item-DOHVD6CN.js +0 -9098
@@ -1,13 +1,13 @@
1
- import { defineComponent as le, ref as f, computed as q, watch as J, resolveComponent as C, createBlock as I, openBlock as h, unref as s, withCtx as k, createElementVNode as p, createVNode as m, createElementBlock as O, createCommentVNode as T, normalizeClass as Q, toDisplayString as F, Fragment as M, renderList as H, renderSlot as se, createSlots as ie } from "vue";
2
- import { H as E, P as re, B as ue, G as D, A as W, J as X, K as Z } from "./index.vue_vue_type_script_setup_true_lang-gaRM4vfS.js";
3
- import { d as de } from "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
4
- import { useI18n as te } from "@feedmepos/mf-common";
5
- import { useSnackbar as ce, components as me } from "@feedmepos/ui-library";
1
+ import { defineComponent as le, ref as f, computed as q, watch as J, resolveComponent as C, createBlock as I, openBlock as h, unref as s, withCtx as k, createElementVNode as p, createVNode as c, createElementBlock as O, createCommentVNode as T, normalizeClass as Q, toDisplayString as F, Fragment as M, renderList as H, renderSlot as se, createSlots as ie } from "vue";
2
+ import { l as E, u as te } from "./discardConfirm-DZwzKO-Q.js";
3
+ import { d as re } from "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
4
+ import { i as ue, b as de, d as D, m as W, g as X, h as Z } from "./index.vue_vue_type_script_setup_true_lang-Nl505vPi.js";
5
+ import { useI18n as oe } from "@feedmepos/mf-common";
6
+ import { useSnackbar as me, components as ce } from "@feedmepos/ui-library";
6
7
  import { _ as ve } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
7
- import { _ as pe } from "./RuleView.vue_vue_type_script_setup_true_lang-DCbrAMxd.js";
8
- import { u as oe } from "./discardConfirm-BHni0LNu.js";
9
- import { _ as fe } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-PpYjjdOP.js";
10
- import { _ as _e, a as ee, b as ae, c as ne } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-CHf3g1ia.js";
8
+ import { _ as pe } from "./RuleView.vue_vue_type_script_setup_true_lang-Ba3djmX1.js";
9
+ import { _ as fe } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-C5-8qdJK.js";
10
+ import { _ as _e, a as ee, b as ae, c as ne } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-CPqxA6JD.js";
11
11
  import { c as he } from "./check-C9mY6LiX.js";
12
12
  const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24" }, Ve = { class: "flex flex-col gap-16 border p-16 rounded-lg" }, be = { class: "fm-typo-en-body-lg-600" }, xe = {
13
13
  key: 0,
@@ -30,7 +30,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
30
30
  },
31
31
  emits: ["update:modelValue", "update:variant"],
32
32
  setup(A, { emit: z }) {
33
- const d = A, S = z, { t } = te(), w = f(!1), $ = f(!1), g = f([]), l = f([]), y = f({}), b = f({}), x = f(""), N = f(""), _ = f({}), j = f({}), U = f({}), L = f({}), P = q(() => d.variant.options.map((n, o) => ({
33
+ const d = A, S = z, { t } = oe(), w = f(!1), $ = f(!1), g = f([]), l = f([]), y = f({}), b = f({}), x = f(""), N = f(""), _ = f({}), j = f({}), U = f({}), L = f({}), P = q(() => d.variant.options.map((n, o) => ({
34
34
  ...n,
35
35
  optionIndex: o + 1
36
36
  })).filter((n) => n.name.trim() !== ""));
@@ -41,10 +41,10 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
41
41
  });
42
42
  const o = Array.from(n);
43
43
  g.value = o;
44
- const c = {};
44
+ const m = {};
45
45
  d.variant.name_locale && Object.entries(d.variant.name_locale).forEach(([e, u]) => {
46
- c[e] = u;
47
- }), y.value = c, x.value = d.variant.name;
46
+ m[e] = u;
47
+ }), y.value = m, x.value = d.variant.name;
48
48
  const r = {}, v = {};
49
49
  d.variant.options.forEach((e) => {
50
50
  r[e._id] = {}, e.name_locale && Object.entries(e.name_locale).forEach(([u, V]) => {
@@ -59,49 +59,49 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
59
59
  },
60
60
  { immediate: !0, deep: !0 }
61
61
  );
62
- function G(n) {
63
- const o = new Set(g.value), c = new Set(n);
62
+ function R(n) {
63
+ const o = new Set(g.value), m = new Set(n);
64
64
  for (const r of n)
65
65
  o.has(r) || (y.value[r] || (y.value[r] = ""), Object.keys(_.value).forEach((v) => {
66
66
  _.value[v][r] || (_.value[v][r] = "");
67
67
  }));
68
68
  for (const r of o)
69
- c.has(r) || (delete y.value[r], Object.keys(_.value).forEach((v) => {
69
+ m.has(r) || (delete y.value[r], Object.keys(_.value).forEach((v) => {
70
70
  delete _.value[v][r];
71
71
  }));
72
72
  g.value = n;
73
73
  }
74
- function R() {
74
+ function Y() {
75
75
  return !E.isEqual(g.value, l.value) || !E.isEqual(y.value, b.value) || x.value !== N.value || !E.isEqual(_.value, j.value) || !E.isEqual(U.value, L.value);
76
76
  }
77
- function Y() {
77
+ function G() {
78
78
  const n = E.clone(d.variant);
79
79
  x.value !== void 0 && (n.name = x.value);
80
80
  const o = {};
81
- Object.entries(y.value).forEach(([c, r]) => {
82
- r && r.trim() && (o[c] = r.trim());
83
- }), Object.keys(o).length > 0 ? n.name_locale = o : delete n.name_locale, n.options.forEach((c) => {
84
- const r = U.value[c._id];
85
- r !== void 0 && (c.name = r);
86
- const v = _.value[c._id];
81
+ Object.entries(y.value).forEach(([m, r]) => {
82
+ r && r.trim() && (o[m] = r.trim());
83
+ }), Object.keys(o).length > 0 ? n.name_locale = o : delete n.name_locale, n.options.forEach((m) => {
84
+ const r = U.value[m._id];
85
+ r !== void 0 && (m.name = r);
86
+ const v = _.value[m._id];
87
87
  if (v && Object.keys(v).length > 0) {
88
88
  const e = {};
89
89
  Object.entries(v).forEach(([u, V]) => {
90
90
  V && V.trim() && (e[u] = V.trim());
91
- }), Object.keys(e).length > 0 ? c.name_locale = e : delete c.name_locale;
91
+ }), Object.keys(e).length > 0 ? m.name_locale = e : delete m.name_locale;
92
92
  } else
93
- delete c.name_locale;
93
+ delete m.name_locale;
94
94
  }), S("update:variant", n), S("update:modelValue", !1);
95
95
  }
96
96
  function K() {
97
97
  S("update:modelValue", !1);
98
98
  }
99
- const a = oe(R, K), i = q({
99
+ const a = te(Y, K), i = q({
100
100
  get: () => d.modelValue,
101
101
  set: (n) => S("update:modelValue", n)
102
102
  });
103
103
  return (n, o) => {
104
- const c = C("FmIcon"), r = C("fm-button"), v = C("fm-side-sheet");
104
+ const m = C("FmIcon"), r = C("fm-button"), v = C("fm-side-sheet");
105
105
  return h(), I(v, {
106
106
  modelValue: i.value,
107
107
  "onUpdate:modelValue": o[3] || (o[3] = (e) => i.value = e),
@@ -113,13 +113,13 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
113
113
  ]),
114
114
  "side-sheet-footer": k(() => [
115
115
  p("div", Ce, [
116
- m(r, {
116
+ c(r, {
117
117
  label: s(t)("common.save"),
118
118
  size: "lg",
119
119
  variant: "primary",
120
- onClick: Y
120
+ onClick: G
121
121
  }, null, 8, ["label"]),
122
- m(r, {
122
+ c(r, {
123
123
  label: s(t)("common.cancel"),
124
124
  size: "lg",
125
125
  variant: "tertiary",
@@ -129,30 +129,30 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
129
129
  ]),
130
130
  default: k(() => [
131
131
  p("div", ye, [
132
- m(_e, {
132
+ c(_e, {
133
133
  "selected-locales": g.value,
134
134
  label: s(t)("menu.variant.form.translation.language"),
135
- "onUpdate:selectedLocales": G
135
+ "onUpdate:selectedLocales": R
136
136
  }, null, 8, ["selected-locales", "label"]),
137
137
  p("div", Ve, [
138
138
  p("div", {
139
139
  class: "flex items-center gap-16 cursor-pointer",
140
140
  onClick: o[0] || (o[0] = (e) => w.value = !w.value)
141
141
  }, [
142
- m(c, {
142
+ c(m, {
143
143
  name: "keyboard_arrow_down",
144
144
  class: Q(["transition-transform", w.value ? "transform rotate-180" : ""])
145
145
  }, null, 8, ["class"]),
146
146
  p("p", be, F(s(t)("menu.variant.form.translation.variant_name")), 1)
147
147
  ]),
148
148
  w.value ? (h(), O("div", xe, [
149
- m(ee, {
149
+ c(ee, {
150
150
  label: s(t)("menu.variant.form.translation.default"),
151
151
  modelValue: x.value,
152
152
  "onUpdate:modelValue": o[1] || (o[1] = (e) => x.value = e)
153
153
  }, null, 8, ["label", "modelValue"]),
154
154
  g.value.length > 0 ? (h(), O("div", ke, [
155
- m(ae, {
155
+ c(ae, {
156
156
  label: s(t)("menu.variant.form.translation.translation")
157
157
  }, null, 8, ["label"]),
158
158
  (h(!0), O(M, null, H(g.value, (e) => (h(), I(ne, {
@@ -170,7 +170,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
170
170
  class: "flex items-center gap-16 cursor-pointer",
171
171
  onClick: o[2] || (o[2] = (e) => $.value = !$.value)
172
172
  }, [
173
- m(c, {
173
+ c(m, {
174
174
  name: "keyboard_arrow_down",
175
175
  class: Q(["transition-transform", $.value ? "transform rotate-180" : ""])
176
176
  }, null, 8, ["class"]),
@@ -183,14 +183,14 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
183
183
  }, [
184
184
  p("p", $e, F(s(t)("menu.variant.form.translation.option", { number: e.optionIndex })), 1),
185
185
  p("div", Ue, [
186
- m(ee, {
186
+ c(ee, {
187
187
  label: s(t)("menu.variant.form.translation.default"),
188
188
  modelValue: U.value[e._id],
189
189
  "onUpdate:modelValue": (u) => U.value[e._id] = u,
190
190
  spacing: "sm"
191
191
  }, null, 8, ["label", "modelValue", "onUpdate:modelValue"]),
192
192
  g.value.length > 0 ? (h(), O("div", Se, [
193
- m(ae, {
193
+ c(ae, {
194
194
  label: s(t)("menu.variant.form.translation.translation"),
195
195
  spacing: "sm"
196
196
  }, null, 8, ["label"]),
@@ -221,7 +221,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
221
221
  initialValue: {}
222
222
  },
223
223
  setup(A, { expose: z }) {
224
- const d = A, S = re(ue(ce())), { t } = te(), w = q(
224
+ const d = A, S = ue(de(me())), { t } = oe(), w = q(
225
225
  () => d.initialValue ? t("menu.variant.form.title.edit") : t("menu.variant.form.title.add")
226
226
  ), $ = q(
227
227
  () => d.initialValue ? t("menu.common.actions.update") : t("menu.common.actions.add")
@@ -247,7 +247,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
247
247
  l.value.options = a;
248
248
  }
249
249
  function P(a, i) {
250
- const n = D(l.value.options), o = n.findIndex((c) => c._id == a);
250
+ const n = D(l.value.options), o = n.findIndex((m) => m._id == a);
251
251
  n[o].name = i, l.value.options = n, o === l.value.options.length - 1 && B();
252
252
  }
253
253
  function B() {
@@ -260,7 +260,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
260
260
  }
261
261
  ];
262
262
  }
263
- function G(a) {
263
+ function R(a) {
264
264
  const i = D(l.value.options);
265
265
  l.value.options = i.filter((n) => n._id !== a);
266
266
  }
@@ -273,11 +273,11 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
273
273
  immediate: !0
274
274
  }
275
275
  );
276
- function R(a) {
276
+ function Y(a) {
277
277
  const i = a.draggedContext.futureIndex, n = a.relatedContext.list;
278
278
  return i !== n.length - 1;
279
279
  }
280
- const Y = oe(
280
+ const G = te(
281
281
  () => {
282
282
  if (d.initialValue) {
283
283
  const a = l.value.options.filter((i) => !!i.name.trim());
@@ -320,34 +320,34 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
320
320
  show: b,
321
321
  trigger: _
322
322
  }), (a, i) => {
323
- const n = C("fm-icon"), o = C("fm-text-field"), c = C("fm-button"), r = C("fm-side-sheet");
323
+ const n = C("fm-icon"), o = C("fm-text-field"), m = C("fm-button"), r = C("fm-side-sheet");
324
324
  return h(), O(M, null, [
325
325
  se(a.$slots, "default", { trigger: _ }),
326
- m(r, {
326
+ c(r, {
327
327
  id: "variant-form",
328
328
  modelValue: b.value,
329
329
  "onUpdate:modelValue": i[4] || (i[4] = (v) => b.value = v),
330
- "is-container": s(me).FmForm,
330
+ "is-container": s(ce).FmForm,
331
331
  "is-container-props": {
332
332
  onValidationSuccess: K,
333
333
  blameFormChildOnValidationFailed: !0
334
334
  },
335
335
  "max-width": 560,
336
- "onOn:clickedAway": s(Y)
336
+ "onOn:clickedAway": s(G)
337
337
  }, {
338
338
  "side-sheet-header": k(() => [
339
339
  p("p", Ne, F(w.value), 1)
340
340
  ]),
341
341
  "side-sheet-footer": k(() => [
342
342
  p("div", Be, [
343
- m(c, {
343
+ c(m, {
344
344
  label: $.value,
345
345
  loading: y.value,
346
346
  size: "lg",
347
347
  type: "submit",
348
348
  variant: "primary"
349
349
  }, null, 8, ["label", "loading"]),
350
- m(c, {
350
+ c(m, {
351
351
  label: s(t)("menu.common.actions.cancel"),
352
352
  size: "lg",
353
353
  variant: "tertiary",
@@ -359,11 +359,11 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
359
359
  var v;
360
360
  return [
361
361
  p("div", je, [
362
- m(pe, {
362
+ c(pe, {
363
363
  title: s(t)("menu.variant.form.detail")
364
364
  }, {
365
365
  default: k(() => [
366
- m(o, {
366
+ c(o, {
367
367
  autofocus: "",
368
368
  label: s(t)("menu.variant.form.name.label"),
369
369
  "helper-text": s(t)("menu.variant.form.name.helper"),
@@ -373,7 +373,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
373
373
  placeholder: s(t)("menu.variant.form.name.placeholder")
374
374
  }, {
375
375
  append: k(() => [
376
- m(n, {
376
+ c(n, {
377
377
  name: "g_translate",
378
378
  class: "cursor-pointer",
379
379
  onClick: i[0] || (i[0] = (e) => j("variant"))
@@ -381,14 +381,14 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
381
381
  ]),
382
382
  _: 1
383
383
  }, 8, ["label", "helper-text", "modelValue", "rules", "placeholder"]),
384
- m(ve, {
384
+ c(ve, {
385
385
  label: s(t)("menu.variant.form.options.title")
386
386
  }, {
387
387
  default: k(() => [
388
388
  p("div", null, [
389
- m(s(de), {
389
+ c(s(re), {
390
390
  "model-value": l.value.options,
391
- move: R,
391
+ move: Y,
392
392
  class: "space-y-16",
393
393
  group: "categories",
394
394
  handle: ".handle",
@@ -406,7 +406,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
406
406
  name: "drag_handle"
407
407
  })) : u > 0 ? (h(), O("div", Fe)) : T("", !0),
408
408
  p("div", Ie, [
409
- m(o, {
409
+ c(o, {
410
410
  "model-value": e.name,
411
411
  rules: [
412
412
  () => !!l.value.options.length || s(t)("menu.variant.form.options.min_required"),
@@ -420,14 +420,14 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
420
420
  name: "append",
421
421
  fn: k(() => [
422
422
  p("div", Le, [
423
- m(n, {
423
+ c(n, {
424
424
  name: "g_translate",
425
425
  class: "cursor-pointer",
426
426
  onClick: i[2] || (i[2] = (V) => j("options"))
427
427
  }),
428
- m(n, {
428
+ c(n, {
429
429
  name: "close",
430
- onClick: (V) => G(e._id)
430
+ onClick: (V) => R(e._id)
431
431
  }, null, 8, ["onClick"])
432
432
  ])
433
433
  ]),
@@ -458,7 +458,7 @@ const ge = { class: "fm-typo-en-title-md-600" }, ye = { class: "pt-8 space-y-24"
458
458
  }),
459
459
  _: 1
460
460
  }, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]),
461
- m(Te, {
461
+ c(Te, {
462
462
  modelValue: x.value,
463
463
  "onUpdate:modelValue": i[5] || (i[5] = (v) => x.value = v),
464
464
  variant: l.value,
@@ -1,13 +1,13 @@
1
- import { z as I, K as Z, u as Q, G as X, A, H as ee } from "./index.vue_vue_type_script_setup_true_lang-gaRM4vfS.js";
2
- import { defineComponent as H, computed as g, ref as _, watch as P, onMounted as ae, onBeforeUnmount as te, resolveComponent as N, createBlock as W, openBlock as D, withModifiers as K, withCtx as k, renderSlot as J, createElementBlock as q, createCommentVNode as G, toDisplayString as O, Fragment as j, createVNode as b, unref as i, createElementVNode as $, renderList as le } from "vue";
3
- import { useCoreStore as ne, useI18n as Y } from "@feedmepos/mf-common";
4
- import { components as oe } from "@feedmepos/ui-library";
5
- import { _ as re } from "./RuleView.vue_vue_type_script_setup_true_lang-DCbrAMxd.js";
6
- import { u as ie } from "./discardConfirm-BHni0LNu.js";
7
- import { _ as ue } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-PpYjjdOP.js";
8
- import { _ as se } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-A43XxqyC.js";
1
+ import { a as I, h as G, u as Q, d as X, m as j } from "./index.vue_vue_type_script_setup_true_lang-Nl505vPi.js";
2
+ import { defineComponent as P, computed as g, ref as _, watch as W, onMounted as ee, onBeforeUnmount as ae, resolveComponent as N, createBlock as H, openBlock as D, withModifiers as K, withCtx as k, renderSlot as J, createElementBlock as q, createCommentVNode as Y, toDisplayString as O, Fragment as A, createVNode as b, unref as i, createElementVNode as $, renderList as te } from "vue";
3
+ import { u as le, l as ne } from "./discardConfirm-DZwzKO-Q.js";
4
+ import { useCoreStore as oe, useI18n as Z } from "@feedmepos/mf-common";
5
+ import { components as re } from "@feedmepos/ui-library";
6
+ import { _ as ie } from "./RuleView.vue_vue_type_script_setup_true_lang-Ba3djmX1.js";
7
+ import { _ as ue } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-C5-8qdJK.js";
8
+ import { _ as se } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-yrNuTD-3.js";
9
9
  import { c as me } from "./check-C9mY6LiX.js";
10
- import { f as de } from "./currency-DQDsuXB5.js";
10
+ import { f as de } from "./currency-DXgNHtK8.js";
11
11
  import { c as ce } from "./string-DpfFixWH.js";
12
12
  import { g as R } from "./translation-fNx6yEpy.js";
13
13
  function pe({
@@ -22,7 +22,7 @@ function pe({
22
22
  return "$";
23
23
  }
24
24
  }
25
- const fe = { key: 0 }, ve = /* @__PURE__ */ H({
25
+ const fe = { key: 0 }, ve = /* @__PURE__ */ P({
26
26
  __name: "CurrencyInput",
27
27
  props: {
28
28
  modelValue: {},
@@ -65,11 +65,11 @@ const fe = { key: 0 }, ve = /* @__PURE__ */ H({
65
65
  },
66
66
  emits: ["update:model-value"],
67
67
  setup(V, { emit: f }) {
68
- const l = V, r = ne(), { t: m } = Y(), z = g(() => pe({
68
+ const l = V, r = oe(), { t: m } = Z(), z = g(() => pe({
69
69
  showCurrency: l.showCurrency,
70
70
  country: r.currentCountry.value
71
71
  })), F = _(!1), S = _(!1), u = _(), s = g(() => l.modelValue ? I.Dinero.fromFdoDinero(l.modelValue).toUnit().toFixed(2) : "");
72
- P(
72
+ W(
73
73
  () => S.value,
74
74
  (e) => {
75
75
  var n, v, y, U, M;
@@ -108,15 +108,15 @@ const fe = { key: 0 }, ve = /* @__PURE__ */ H({
108
108
  e.key >= "0" && e.key <= "9" || e.key === "." || e.key === "," || e.key === "-" || e.key === "Backspace" || e.key === "ArrowLeft" || e.key === "ArrowRight" || e.key === "Tab" || e.preventDefault();
109
109
  }
110
110
  };
111
- return ae(() => {
111
+ return ee(() => {
112
112
  var e;
113
113
  u.value && ((e = u.value.inputEl) == null || e.addEventListener("keydown", T));
114
- }), te(() => {
114
+ }), ae(() => {
115
115
  var e;
116
116
  u.value && ((e = u.value.inputEl) == null || e.removeEventListener("keydown", T));
117
117
  }), (e, n) => {
118
118
  const v = N("fm-text-field");
119
- return D(), W(v, {
119
+ return D(), H(v, {
120
120
  ref_key: "inputRef",
121
121
  ref: u,
122
122
  autofocus: l.autofocus,
@@ -135,7 +135,7 @@ const fe = { key: 0 }, ve = /* @__PURE__ */ H({
135
135
  }, ["prevent"]))
136
136
  }, {
137
137
  prepend: k(() => [
138
- e.showCurrency ? (D(), q("span", fe, O(z.value), 1)) : G("", !0)
138
+ e.showCurrency ? (D(), q("span", fe, O(z.value), 1)) : Y("", !0)
139
139
  ]),
140
140
  append: k(() => [
141
141
  J(e.$slots, "append")
@@ -147,13 +147,13 @@ const fe = { key: 0 }, ve = /* @__PURE__ */ H({
147
147
  });
148
148
  function Te(V) {
149
149
  return V.map((f) => ({
150
- module: Z.enum.item,
150
+ module: G.enum.item,
151
151
  id: f._id,
152
152
  discriminator: f.combinationKey,
153
153
  data: void 0
154
154
  }));
155
155
  }
156
- const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, ke = { class: "py-12 px-16 space-y-4" }, he = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__ */ H({
156
+ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, ke = { class: "py-12 px-16 space-y-4" }, he = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__ */ P({
157
157
  __name: "Form",
158
158
  props: {
159
159
  action: {},
@@ -164,13 +164,13 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
164
164
  },
165
165
  emits: ["update:takeaway"],
166
166
  setup(V, { expose: f, emit: l }) {
167
- const { t: r } = Y(), m = V, z = l, F = Q(), S = g(() => F.rules.takeaway), u = _(!1), s = _(!1), C = _(!1), d = _(void 0), L = (a) => {
167
+ const { t: r } = Z(), m = V, z = l, F = Q(), S = g(() => F.rules.takeaway), u = _(!1), s = _(!1), C = _(!1), d = _(void 0), L = (a) => {
168
168
  me.isBoolean(a) ? s.value = a : s.value = !s.value;
169
169
  };
170
170
  function x() {
171
171
  var t;
172
172
  const a = {
173
- ...A.generator.initMenuV4Takeaway(),
173
+ ...j.generator.initMenuV4Takeaway(),
174
174
  usedBy: [],
175
175
  ...X(m.initialValue ?? {})
176
176
  };
@@ -197,13 +197,13 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
197
197
  function y(a) {
198
198
  o.value.name = a;
199
199
  }
200
- const U = ie(
200
+ const U = le(
201
201
  () => {
202
202
  var c;
203
- const a = !ee.isEqual(
203
+ const a = !ne.isEqual(
204
204
  o.value,
205
205
  m.initialValue || {
206
- ...A.generator.initMenuV4Takeaway(),
206
+ ...j.generator.initMenuV4Takeaway(),
207
207
  usedBy: []
208
208
  }
209
209
  ), t = ((c = m.initialValue) == null ? void 0 : c.name_locale) || {}, B = d.value || {}, E = JSON.stringify(t) !== JSON.stringify(B);
@@ -218,7 +218,7 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
218
218
  name_locale: a
219
219
  }), L(!1);
220
220
  }
221
- return P(
221
+ return W(
222
222
  () => s.value,
223
223
  () => {
224
224
  var a;
@@ -229,13 +229,13 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
229
229
  show: s
230
230
  }), (a, t) => {
231
231
  const B = N("fm-button"), E = N("FmTooltip"), c = N("fm-text-field"), h = N("fm-side-sheet");
232
- return D(), q(j, null, [
232
+ return D(), q(A, null, [
233
233
  J(a.$slots, "default", { trigger: L }),
234
234
  b(h, {
235
235
  id: "group-form",
236
236
  modelValue: s.value,
237
237
  "onUpdate:modelValue": t[5] || (t[5] = (w) => s.value = w),
238
- "is-container": i(oe).FmForm,
238
+ "is-container": i(re).FmForm,
239
239
  "is-container-props": {
240
240
  onValidationSuccess: M,
241
241
  blameFormChildOnValidationFailed: !0
@@ -265,7 +265,7 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
265
265
  ]),
266
266
  default: k(() => [
267
267
  $("div", be, [
268
- b(re, null, {
268
+ b(ie, null, {
269
269
  default: k(() => {
270
270
  var w;
271
271
  return [
@@ -292,7 +292,7 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
292
292
  }, {
293
293
  content: k(() => [
294
294
  $("div", ke, [
295
- (D(!0), q(j, null, le(n.value, (p) => (D(), q("div", {
295
+ (D(!0), q(A, null, te(n.value, (p) => (D(), q("div", {
296
296
  key: p.locale
297
297
  }, O(p.name) + " (" + O(p.localeDisplay) + ") ", 1))), 128))
298
298
  ])
@@ -324,14 +324,14 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
324
324
  }),
325
325
  _: 1
326
326
  }),
327
- a.applyProduct ? (D(), W(ue, {
327
+ a.applyProduct ? (D(), H(ue, {
328
328
  key: 0,
329
329
  overrides: o.value.usedBy,
330
330
  "onUpdate:overrides": t[3] || (t[3] = (w) => o.value.usedBy = w),
331
331
  "select-variant": a.bindToVariant,
332
332
  editable: "",
333
333
  title: i(r)("menu.common.labels.product")
334
- }, null, 8, ["overrides", "select-variant", "title"])) : G("", !0)
334
+ }, null, 8, ["overrides", "select-variant", "title"])) : Y("", !0)
335
335
  ])
336
336
  ]),
337
337
  _: 1