@feedmepos/mf-menu 0.32.83-dev.1 → 0.32.83-dev.2

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 (79) hide show
  1. package/dist/{App-BYdCC3TK.js → App-CJtpyTsA.js} +6 -6
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-CsMCfu1s.js → ApplyProduct.vue_vue_type_script_setup_true_lang-C01hHwqy.js} +3 -3
  3. package/dist/{ApplyProductDialog.vue_vue_type_script_setup_true_lang-CWH86f_J.js → ApplyProductDialog.vue_vue_type_script_setup_true_lang-4xmgAa5D.js} +3 -3
  4. package/dist/{Catalog-BPRRb4QE.js → Catalog-CTUtAc6s.js} +6 -6
  5. package/dist/{CatalogBinding-B2vhvUHz.js → CatalogBinding-DQf2xYH8.js} +13 -13
  6. package/dist/{Category-zKR2QaeE.js → Category-DP6UnoXf.js} +4 -4
  7. package/dist/{Category-DeeXKn4P.js → Category-Q9BCIS4J.js} +4 -4
  8. package/dist/{CookingGuide-Wm39wm7Q.js → CookingGuide-GbojUPLO.js} +5 -5
  9. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-CAHNxiEJ.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CBRNh-O-.js} +1 -1
  10. package/dist/{Group-BNcZYOU4.js → Group-CJqQLteU.js} +3 -3
  11. package/dist/{Group-E2HYqd9f.js → Group-Dsc8PGdX.js} +1 -1
  12. package/dist/{Group.vue_vue_type_script_setup_true_lang-DPk_cgPi.js → Group.vue_vue_type_script_setup_true_lang-FWqqHQ20.js} +7 -7
  13. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-B0X5brpK.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BcQa7V0d.js} +5 -5
  14. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DxowkX0c.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-Cb9tTsPG.js} +7 -7
  15. package/dist/{Ingredient-DcJrO6OE.js → Ingredient-DWEB328H.js} +4 -4
  16. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DfrJBP75.js → InventoryBinding.vue_vue_type_script_setup_true_lang-Dab9-l-S.js} +2 -2
  17. package/dist/{LinkProductSideSheet-DTzuEcF5.js → LinkProductSideSheet-BluWowSV.js} +4 -4
  18. package/dist/{MenuSetting-DICpAfNK.js → MenuSetting-C_ZsIERs.js} +7 -7
  19. package/dist/{OrderPacing-pD1pgJG5.js → OrderPacing-BZhIFo4P.js} +5 -5
  20. package/dist/{PrintRoute-BAY_gpJS.js → PrintRoute-C5ZJs7tz.js} +5 -5
  21. package/dist/{Product-B_YsLenC.js → Product-rESWzhq6.js} +1 -1
  22. package/dist/{Product.vue_vue_type_script_setup_true_lang-DEsNttgJ.js → Product.vue_vue_type_script_setup_true_lang-C-zJ0P53.js} +14 -14
  23. package/dist/{ProductInternalTools-CfA-6XtS.js → ProductInternalTools-tkLzH5hJ.js} +6 -6
  24. package/dist/{Products-arAA8I2u.js → Products-DxpE9Hhz.js} +49 -49
  25. package/dist/Publish-3z09Tj11.js +1608 -0
  26. package/dist/{Recipe-DRcrzXhA.js → Recipe-Dqtj2Ye9.js} +5 -5
  27. package/dist/{RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-CAVrU6RI.js → RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-CST9Gy_R.js} +1 -1
  28. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DYnnO3SQ.js → RuleView.vue_vue_type_script_setup_true_lang-_MGk1b10.js} +211 -211
  29. package/dist/{Scheduler-oxLqE74K.js → Scheduler-BgkBxTeC.js} +3 -3
  30. package/dist/{ServingSequence-DVkB7hDy.js → ServingSequence-D92cps_j.js} +3 -3
  31. package/dist/{Setting-DOsTp22X.js → Setting-JUioq6ZT.js} +5 -5
  32. package/dist/{Subcategory-BaclYZ5p.js → Subcategory-vjc6gzqd.js} +6 -6
  33. package/dist/{Takeaway-D2jvmsuu.js → Takeaway-BXMBCjFg.js} +1 -1
  34. package/dist/Takeaway-DSOy02ma.js +64 -0
  35. package/dist/Takeaway.vue_vue_type_script_setup_true_lang-539rI3Ek.js +331 -0
  36. package/dist/{TranslationFieldSection.vue_vue_type_script_setup_true_lang-M3Oh6Dr6.js → TranslationFieldSection.vue_vue_type_script_setup_true_lang-C37PZJuF.js} +1 -1
  37. package/dist/{TranslationSideSheet.vue_vue_type_script_setup_true_lang-DjswjUjQ.js → TranslationSideSheet.vue_vue_type_script_setup_true_lang-BjsExR0h.js} +2 -2
  38. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dcd1ek03.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-Dy-eMWb4.js} +602 -601
  39. package/dist/{Unit-Dx8HMvAE.js → Unit-_Eoj6ONR.js} +2 -2
  40. package/dist/{Variant-Dx6EWp55.js → Variant-D1iCI3U5.js} +3 -3
  41. package/dist/{_id_-DIsWlajV.js → _id_-BUrZucNq.js} +10 -10
  42. package/dist/{app-curMXZbh.js → app-B8GiVUrR.js} +1 -1
  43. package/dist/{app-BdtPzkjA.js → app-BJA5-4eB.js} +392 -392
  44. package/dist/app.js +1 -1
  45. package/dist/apps/mf-menu/src/app.d.ts +25 -0
  46. package/dist/apps/mf-menu/src/components/feature/TakeAwayManager/Form.vue.d.ts +3 -3
  47. package/dist/apps/mf-menu/src/helper/takeawayOverride.d.ts +12 -0
  48. package/dist/apps/mf-menu/src/manager/menu/takeaway.d.ts +14 -0
  49. package/dist/apps/mf-menu/src/views/Publish/publishError.d.ts +20 -0
  50. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  51. package/dist/assets/{linked-status-DsxqMxwe.js → linked-status-Bqmqi1JL.js} +2 -2
  52. package/dist/assets/{menu-export-DcW52Lu3.js → menu-export-CfrN-LuH.js} +2 -2
  53. package/dist/assets/{override-menu-DPPsvKsd.js → override-menu-Cy7YaK_1.js} +2 -2
  54. package/dist/assets/{validate-menu-Byl7hJI2.js → validate-menu-BPtUlI3H.js} +2 -2
  55. package/dist/{catalog-D4uhTN3P.js → catalog-B3YnChlG.js} +1 -1
  56. package/dist/{catalogSetting-_zy50XFm.js → catalogSetting-BeiJ3_Fx.js} +1 -1
  57. package/dist/{currency-8AD3AdtT.js → currency-BKZrZwjw.js} +1 -1
  58. package/dist/{dayjs.min-CSadJcjJ.js → dayjs.min-WGRuZAMu.js} +2 -2
  59. package/dist/{discardConfirm-egY5vwUU.js → discardConfirm-CuLDiWC_.js} +1 -1
  60. package/dist/{index-BPGZgTH-.js → index-BYh87zkc.js} +5 -5
  61. package/dist/{index-B0hyUFIc.js → index-C36SngVC.js} +1 -1
  62. package/dist/{index-BpoYrrVu.js → index-CUzEne2b.js} +137 -131
  63. package/dist/{index.vue_vue_type_script_setup_true_lang-qUahjdoy.js → index.vue_vue_type_script_setup_true_lang-BJZykcBx.js} +10600 -10590
  64. package/dist/{item-CGqK7sn4.js → item-BQYLe0DU.js} +1289 -1288
  65. package/dist/{jszip.min-Qb_fhEy6.js → jszip.min-kAXqpQrc.js} +384 -384
  66. package/dist/{linkProducts-DwBnfj3L.js → linkProducts-B3BYn9Cw.js} +4 -4
  67. package/dist/{memberPricing-CcXhcbV9.js → memberPricing-DzPTdmS5.js} +1 -1
  68. package/dist/{menu-Cmz90lOu.js → menu-DUOE-Q12.js} +1 -1
  69. package/dist/{menuV2-yXOZpuda.js → menuV2-BO3LtBSw.js} +48 -48
  70. package/dist/{order_pacing-Bp1Hpcp2.js → order_pacing-DqVag6W3.js} +5 -5
  71. package/dist/{priceTier-B14Zw5XH.js → priceTier-BFauU3rd.js} +1 -1
  72. package/dist/{rules-COZi7aRn.js → rules-B596A4CJ.js} +3 -3
  73. package/dist/{scheduler-eoUNmYqB.js → scheduler-KT6kOtgK.js} +5 -5
  74. package/dist/{toExcel-BkhEG-vD.js → toExcel-CgXzLIId.js} +2 -2
  75. package/dist/{unit-Bmje7das.js → unit-BJeua1T7.js} +3 -3
  76. package/package.json +2 -2
  77. package/dist/Publish-BORONVKG.js +0 -1582
  78. package/dist/Takeaway-BbcmF6t2.js +0 -64
  79. package/dist/Takeaway.vue_vue_type_script_setup_true_lang-BpswLmDw.js +0 -324
@@ -1,4 +1,4 @@
1
- import { u as p, F as m, l as c, h as g, i as h, W as v } from "./index.vue_vue_type_script_setup_true_lang-qUahjdoy.js";
1
+ import { u as p, F as m, l as c, h as g, i as h, W as v } from "./index.vue_vue_type_script_setup_true_lang-BJZykcBx.js";
2
2
  import "@feedmepos/ui-library";
3
3
  function E(s) {
4
4
  const t = Object.values(s.items).reduce((e, a) => (e.push({
@@ -1,4 +1,4 @@
1
- import { l as u, f as a } from "./index.vue_vue_type_script_setup_true_lang-qUahjdoy.js";
1
+ import { l as u, f as a } from "./index.vue_vue_type_script_setup_true_lang-BJZykcBx.js";
2
2
  var n = /* @__PURE__ */ ((e) => (e.AUTO = "auto", e.MANUAL = "manual", e))(n || {}), l = /* @__PURE__ */ ((e) => (e[e.Normal = 0] = "Normal", e[e.Rules = 1] = "Rules", e))(l || {});
3
3
  class t {
4
4
  static fromCatalog(r, s) {
@@ -1,4 +1,4 @@
1
- import { a as e } from "./index.vue_vue_type_script_setup_true_lang-qUahjdoy.js";
1
+ import { a as e } from "./index.vue_vue_type_script_setup_true_lang-BJZykcBx.js";
2
2
  function a(r, o = !0) {
3
3
  return e.Dinero.fromFdoDinero(r).toFormat(o).replaceAll(" ", "");
4
4
  }
@@ -1,5 +1,5 @@
1
- import { g as r } from "./app-BdtPzkjA.js";
2
- import { X as o } from "./index.vue_vue_type_script_setup_true_lang-qUahjdoy.js";
1
+ import { g as r } from "./app-BJA5-4eB.js";
2
+ import { X as o } from "./index.vue_vue_type_script_setup_true_lang-BJZykcBx.js";
3
3
  var a = o();
4
4
  const m = /* @__PURE__ */ r(a);
5
5
  export {
@@ -1,4 +1,4 @@
1
- import { c as jr } from "./app-BdtPzkjA.js";
1
+ import { c as jr } from "./app-BJA5-4eB.js";
2
2
  import { useI18n as ip } from "@feedmepos/mf-common";
3
3
  import { useDialog as up } from "@feedmepos/ui-library";
4
4
  var rr = { exports: {} };
@@ -1,13 +1,13 @@
1
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-egY5vwUU.js";
2
+ import { l as E, u as te } from "./discardConfirm-CuLDiWC_.js";
3
3
  import { d as re } from "./RuleConditionSelector.vue_vue_type_style_index_0_lang-CK8z7qA8.js";
4
- import { j as ue, b as de, f as D, m as W, h as X, i as Z } from "./index.vue_vue_type_script_setup_true_lang-qUahjdoy.js";
4
+ import { j as ue, b as de, f as D, m as W, h as X, i as Z } from "./index.vue_vue_type_script_setup_true_lang-BJZykcBx.js";
5
5
  import { useI18n as oe } from "@feedmepos/mf-common";
6
6
  import { useSnackbar as me, components as ce } from "@feedmepos/ui-library";
7
7
  import { _ as ve } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
8
- import { _ as pe } from "./RuleView.vue_vue_type_script_setup_true_lang-DYnnO3SQ.js";
9
- import { _ as fe } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-CsMCfu1s.js";
10
- import { _ as _e, a as ee, b as ae, c as ne } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-M3Oh6Dr6.js";
8
+ import { _ as pe } from "./RuleView.vue_vue_type_script_setup_true_lang-_MGk1b10.js";
9
+ import { _ as fe } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-C01hHwqy.js";
10
+ import { _ as _e, a as ee, b as ae, c as ne } from "./TranslationFieldSection.vue_vue_type_script_setup_true_lang-C37PZJuF.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,
@@ -1,4 +1,4 @@
1
- import { l as R } from "./discardConfirm-egY5vwUU.js";
1
+ import { l as R } from "./discardConfirm-CuLDiWC_.js";
2
2
  import { defineComponent as x, resolveComponent as p, createBlock as d, openBlock as c, Teleport as k, createVNode as g, Transition as N, withCtx as C, createCommentVNode as w, withKeys as $, normalizeStyle as I, normalizeClass as f, createElementVNode as h, renderSlot as S, createElementBlock as y, toDisplayString as z, Fragment as U, renderList as B, computed as m, unref as W, ref as P } from "vue";
3
3
  import { _ as V } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import { useI18n as F } from "@feedmepos/mf-common";
@@ -1,28 +1,28 @@
1
- import { a as I, i as G, u as Q, f as X, m as j } from "./index.vue_vue_type_script_setup_true_lang-qUahjdoy.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-egY5vwUU.js";
1
+ import { a as R, i as G, u as Q, f as X, m as z } from "./index.vue_vue_type_script_setup_true_lang-BJZykcBx.js";
2
+ import { defineComponent as j, computed as V, ref as g, watch as W, onMounted as ee, onBeforeUnmount as ae, resolveComponent as T, createBlock as H, openBlock as F, withModifiers as K, withCtx as h, renderSlot as J, createElementBlock as q, createCommentVNode as Y, toDisplayString as I, Fragment as A, createVNode as k, unref as i, createElementVNode as M, renderList as te } from "vue";
3
+ import { u as ne, l as le } from "./discardConfirm-CuLDiWC_.js";
4
4
  import { useCoreStore as oe, useI18n as Z } from "@feedmepos/mf-common";
5
5
  import { components as re } from "@feedmepos/ui-library";
6
- import { _ as ie } from "./RuleView.vue_vue_type_script_setup_true_lang-DYnnO3SQ.js";
7
- import { _ as ue } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-CsMCfu1s.js";
8
- import { _ as se } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-DjswjUjQ.js";
6
+ import { _ as ie } from "./RuleView.vue_vue_type_script_setup_true_lang-_MGk1b10.js";
7
+ import { _ as ue } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-C01hHwqy.js";
8
+ import { _ as se } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-BjsExR0h.js";
9
9
  import { c as me } from "./check-C9mY6LiX.js";
10
- import { f as de } from "./currency-8AD3AdtT.js";
10
+ import { f as de } from "./currency-BKZrZwjw.js";
11
11
  import { c as ce } from "./string-DpfFixWH.js";
12
- import { g as R } from "./translation-fNx6yEpy.js";
12
+ import { g as P } from "./translation-fNx6yEpy.js";
13
13
  function pe({
14
- showCurrency: V,
15
- country: f
14
+ showCurrency: u,
15
+ country: y
16
16
  }) {
17
- if (!V) return "";
18
- if (!f) return "$";
17
+ if (!u) return "";
18
+ if (!y) return "$";
19
19
  try {
20
- return I.Country.getCountry(f).currency.symbol || "$";
20
+ return R.Country.getCountry(y).currency.symbol || "$";
21
21
  } catch {
22
22
  return "$";
23
23
  }
24
24
  }
25
- const fe = { key: 0 }, ve = /* @__PURE__ */ P({
25
+ const fe = { key: 0 }, ye = /* @__PURE__ */ j({
26
26
  __name: "CurrencyInput",
27
27
  props: {
28
28
  modelValue: {},
@@ -64,41 +64,41 @@ const fe = { key: 0 }, ve = /* @__PURE__ */ P({
64
64
  helperState: {}
65
65
  },
66
66
  emits: ["update:model-value"],
67
- setup(V, { emit: f }) {
68
- const l = V, r = oe(), { t: m } = Z(), z = g(() => pe({
69
- showCurrency: l.showCurrency,
67
+ setup(u, { emit: y }) {
68
+ const n = u, r = oe(), { t: d } = Z(), O = V(() => pe({
69
+ showCurrency: n.showCurrency,
70
70
  country: r.currentCountry.value
71
- })), F = _(!1), S = _(!1), u = _(), s = g(() => l.modelValue ? I.Dinero.fromFdoDinero(l.modelValue).toUnit().toFixed(2) : "");
71
+ })), S = g(!1), D = g(!1), s = g(), m = V(() => n.modelValue ? R.Dinero.fromFdoDinero(n.modelValue).toUnit().toFixed(2) : "");
72
72
  W(
73
- () => S.value,
73
+ () => D.value,
74
74
  (e) => {
75
- var n, v, y, U, M;
76
- e ? (F.value || (F.value = !0), (v = (n = u.value) == null ? void 0 : n.inputEl) == null || v.select()) : (F.value = !1, (y = u.value) != null && y.inputEl && x((M = (U = u.value) == null ? void 0 : U.inputEl) == null ? void 0 : M.value));
75
+ var l, v, b, U, $;
76
+ e ? (S.value || (S.value = !0), (v = (l = s.value) == null ? void 0 : l.inputEl) == null || v.select()) : (S.value = !1, (b = s.value) != null && b.inputEl && x(($ = (U = s.value) == null ? void 0 : U.inputEl) == null ? void 0 : $.value));
77
77
  }
78
78
  );
79
- const C = f, d = g(() => typeof l.required == "string" ? l.required : m("menu.common.validation.field_required", {
80
- field: l.label ?? m("menu.currency.input.field")
79
+ const C = y, c = V(() => typeof n.required == "string" ? n.required : d("menu.common.validation.field_required", {
80
+ field: n.label ?? d("menu.currency.input.field")
81
81
  })), L = [
82
- (e) => l.required ? !!e || d.value : !0,
83
- (e) => l.min !== void 0 && e && parseFloat(e.toString()) < l.min ? m("menu.common.validation.min_value", { value: l.min }) : !0,
84
- (e) => l.max !== void 0 && e && parseFloat(e.toString()) > l.max ? m("menu.common.validation.max_value", { value: l.max }) : !0,
85
- ...l.rules ?? []
82
+ (e) => n.required ? !!e || c.value : !0,
83
+ (e) => n.min !== void 0 && e && parseFloat(e.toString()) < n.min ? d("menu.common.validation.min_value", { value: n.min }) : !0,
84
+ (e) => n.max !== void 0 && e && parseFloat(e.toString()) > n.max ? d("menu.common.validation.max_value", { value: n.max }) : !0,
85
+ ...n.rules ?? []
86
86
  ];
87
87
  function x(e) {
88
- if (typeof e != "number" && !e && l.nullable)
88
+ if (typeof e != "number" && !e && n.nullable)
89
89
  C("update:model-value", void 0);
90
90
  else {
91
91
  if (typeof e == "string" && e === "-")
92
92
  return;
93
- let n = parseFloat((e || "").toString());
94
- n = Number.isNaN(n) ? 0 : n, C("update:model-value", I.Dinero.fromNumber({ number: n }).toObject());
93
+ let l = parseFloat((e || "").toString());
94
+ l = Number.isNaN(l) ? 0 : l, C("update:model-value", R.Dinero.fromNumber({ number: l }).toObject());
95
95
  }
96
96
  }
97
- const o = g(() => typeof l.min == "number" && l.min >= 0), T = (e) => {
98
- var n, v, y;
97
+ const o = V(() => typeof n.min == "number" && n.min >= 0), N = (e) => {
98
+ var l, v, b;
99
99
  if (!(e.ctrlKey || e.metaKey)) {
100
100
  if (e.key === "Enter") {
101
- (n = u.value) != null && n.inputEl && x((y = (v = u.value) == null ? void 0 : v.inputEl) == null ? void 0 : y.value);
101
+ (l = s.value) != null && l.inputEl && x((b = (v = s.value) == null ? void 0 : v.inputEl) == null ? void 0 : b.value);
102
102
  return;
103
103
  }
104
104
  if (e.key === "-" && o.value) {
@@ -110,34 +110,34 @@ const fe = { key: 0 }, ve = /* @__PURE__ */ P({
110
110
  };
111
111
  return ee(() => {
112
112
  var e;
113
- u.value && ((e = u.value.inputEl) == null || e.addEventListener("keydown", T));
113
+ s.value && ((e = s.value.inputEl) == null || e.addEventListener("keydown", N));
114
114
  }), ae(() => {
115
115
  var e;
116
- u.value && ((e = u.value.inputEl) == null || e.removeEventListener("keydown", T));
117
- }), (e, n) => {
118
- const v = N("fm-text-field");
119
- return D(), H(v, {
116
+ s.value && ((e = s.value.inputEl) == null || e.removeEventListener("keydown", N));
117
+ }), (e, l) => {
118
+ const v = T("fm-text-field");
119
+ return F(), H(v, {
120
120
  ref_key: "inputRef",
121
- ref: u,
122
- autofocus: l.autofocus,
123
- disabled: l.disable,
121
+ ref: s,
122
+ autofocus: n.autofocus,
123
+ disabled: n.disable,
124
124
  label: e.label,
125
- "model-value": s.value,
126
- placeholder: l.placeholder,
125
+ "model-value": m.value,
126
+ placeholder: n.placeholder,
127
127
  rules: L,
128
128
  inputmode: "decimal",
129
- onFocusChanged: n[0] || (n[0] = (y) => S.value = y),
130
- onWheel: n[1] || (n[1] = K(() => {
129
+ onFocusChanged: l[0] || (l[0] = (b) => D.value = b),
130
+ onWheel: l[1] || (l[1] = K(() => {
131
131
  }, ["prevent"])),
132
- onTouchmove: n[2] || (n[2] = K(() => {
132
+ onTouchmove: l[2] || (l[2] = K(() => {
133
133
  }, ["prevent"])),
134
- onScroll: n[3] || (n[3] = K(() => {
134
+ onScroll: l[3] || (l[3] = K(() => {
135
135
  }, ["prevent"]))
136
136
  }, {
137
- prepend: k(() => [
138
- e.showCurrency ? (D(), q("span", fe, O(z.value), 1)) : Y("", !0)
137
+ prepend: h(() => [
138
+ e.showCurrency ? (F(), q("span", fe, I(O.value), 1)) : Y("", !0)
139
139
  ]),
140
- append: k(() => [
140
+ append: h(() => [
141
141
  J(e.$slots, "append")
142
142
  ]),
143
143
  _: 3
@@ -145,15 +145,20 @@ const fe = { key: 0 }, ve = /* @__PURE__ */ P({
145
145
  };
146
146
  }
147
147
  });
148
- function Te(V) {
149
- return V.map((f) => ({
148
+ function Ne(u) {
149
+ if (!u.price)
150
+ throw new Error(`Takeaway "${u.name}" has no price`);
151
+ return { ...u, price: u.price };
152
+ }
153
+ function Ue(u) {
154
+ return u.map((y) => ({
150
155
  module: G.enum.item,
151
- id: f._id,
152
- discriminator: f.combinationKey,
156
+ id: y._id,
157
+ discriminator: y.combinationKey,
153
158
  data: void 0
154
159
  }));
155
160
  }
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({
161
+ const ve = { 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__ */ j({
157
162
  __name: "Form",
158
163
  props: {
159
164
  action: {},
@@ -163,118 +168,118 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
163
168
  bindToVariant: { type: Boolean }
164
169
  },
165
170
  emits: ["update:takeaway"],
166
- setup(V, { expose: f, emit: l }) {
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
- me.isBoolean(a) ? s.value = a : s.value = !s.value;
171
+ setup(u, { expose: y, emit: n }) {
172
+ const { t: r } = Z(), d = u, O = n, S = Q(), D = V(() => S.rules.takeaway), s = g(!1), m = g(!1), C = g(!1), c = g(void 0), L = (a) => {
173
+ me.isBoolean(a) ? m.value = a : m.value = !m.value;
169
174
  };
170
175
  function x() {
171
176
  var t;
172
177
  const a = {
173
- ...j.generator.initMenuV4Takeaway(),
178
+ ...z.generator.initMenuV4Takeaway(),
174
179
  usedBy: [],
175
- ...X(m.initialValue ?? {})
180
+ ...X(d.initialValue ?? {})
176
181
  };
177
- return (t = m.fallback) != null && t.price && (a.price = I.Dinero.zero().toObject()), a;
182
+ return (t = d.fallback) != null && t.price && (a.price = null), a;
178
183
  }
179
- const o = _(x()), T = g(() => m.action === "add" ? r("menu.takeaway.add") : r("menu.takeaway.update")), e = g(() => !!o.value.name), n = g(() => {
184
+ const o = g(x()), N = V(() => d.action === "add" ? r("menu.takeaway.add") : r("menu.takeaway.update")), e = V(() => !!o.value.name), l = V(() => {
180
185
  var E;
181
- const a = [], t = "en-US", B = (E = d.value) == null ? void 0 : E[t];
186
+ const a = [], t = "en-US", B = (E = c.value) == null ? void 0 : E[t];
182
187
  return o.value.name && !B && a.push({
183
188
  locale: t,
184
189
  name: o.value.name,
185
- localeDisplay: R(t)
186
- }), d.value && Object.entries(d.value).filter(([c, h]) => h && h.trim()).sort(([c], [h]) => c.localeCompare(h)).forEach(([c, h]) => {
190
+ localeDisplay: P(t)
191
+ }), c.value && Object.entries(c.value).filter(([p, w]) => w && w.trim()).sort(([p], [w]) => p.localeCompare(w)).forEach(([p, w]) => {
187
192
  a.push({
188
- locale: c,
189
- name: h,
190
- localeDisplay: R(c)
193
+ locale: p,
194
+ name: w,
195
+ localeDisplay: P(p)
191
196
  });
192
197
  }), a;
193
198
  });
194
199
  function v(a) {
195
- d.value = a;
200
+ c.value = a;
196
201
  }
197
- function y(a) {
202
+ function b(a) {
198
203
  o.value.name = a;
199
204
  }
200
- const U = le(
205
+ const U = ne(
201
206
  () => {
202
- var c;
203
- const a = !ne.isEqual(
207
+ var p;
208
+ const a = !le.isEqual(
204
209
  o.value,
205
- m.initialValue || {
206
- ...j.generator.initMenuV4Takeaway(),
210
+ d.initialValue || {
211
+ ...z.generator.initMenuV4Takeaway(),
207
212
  usedBy: []
208
213
  }
209
- ), t = ((c = m.initialValue) == null ? void 0 : c.name_locale) || {}, B = d.value || {}, E = JSON.stringify(t) !== JSON.stringify(B);
214
+ ), t = ((p = d.initialValue) == null ? void 0 : p.name_locale) || {}, B = c.value || {}, E = JSON.stringify(t) !== JSON.stringify(B);
210
215
  return a || E;
211
216
  },
212
- () => s.value = !1
217
+ () => m.value = !1
213
218
  );
214
- function M() {
215
- const a = d.value;
216
- z("update:takeaway", {
219
+ function $() {
220
+ const a = c.value;
221
+ O("update:takeaway", {
217
222
  ...o.value,
218
223
  name_locale: a
219
224
  }), L(!1);
220
225
  }
221
226
  return W(
222
- () => s.value,
227
+ () => m.value,
223
228
  () => {
224
229
  var a;
225
- s.value && (o.value = x(), d.value = (a = m.initialValue) == null ? void 0 : a.name_locale);
230
+ m.value && (o.value = x(), c.value = (a = d.initialValue) == null ? void 0 : a.name_locale);
226
231
  }
227
- ), f({
232
+ ), y({
228
233
  trigger: L,
229
- show: s
234
+ show: m
230
235
  }), (a, t) => {
231
- const B = N("fm-button"), E = N("FmTooltip"), c = N("fm-text-field"), h = N("fm-side-sheet");
232
- return D(), q(A, null, [
236
+ const B = T("fm-button"), E = T("FmTooltip"), p = T("fm-text-field"), w = T("fm-side-sheet");
237
+ return F(), q(A, null, [
233
238
  J(a.$slots, "default", { trigger: L }),
234
- b(h, {
239
+ k(w, {
235
240
  id: "group-form",
236
- modelValue: s.value,
237
- "onUpdate:modelValue": t[5] || (t[5] = (w) => s.value = w),
241
+ modelValue: m.value,
242
+ "onUpdate:modelValue": t[5] || (t[5] = (_) => m.value = _),
238
243
  "is-container": i(re).FmForm,
239
244
  "is-container-props": {
240
- onValidationSuccess: M,
245
+ onValidationSuccess: $,
241
246
  blameFormChildOnValidationFailed: !0
242
247
  },
243
248
  "max-width": 560,
244
249
  "onOn:clickedAway": i(U)
245
250
  }, {
246
- "side-sheet-header": k(() => [
247
- $("p", ye, O(T.value), 1)
251
+ "side-sheet-header": h(() => [
252
+ M("p", ve, I(N.value), 1)
248
253
  ]),
249
- "side-sheet-footer": k(() => [
250
- $("div", he, [
251
- b(B, {
254
+ "side-sheet-footer": h(() => [
255
+ M("div", he, [
256
+ k(B, {
252
257
  label: i(ce)(i(r)(`menu.common.actions.${a.action}`)),
253
- loading: u.value,
258
+ loading: s.value,
254
259
  size: "lg",
255
260
  type: "submit",
256
261
  variant: "primary"
257
262
  }, null, 8, ["label", "loading"]),
258
- b(B, {
263
+ k(B, {
259
264
  label: i(r)("menu.common.actions.cancel"),
260
265
  size: "lg",
261
266
  variant: "tertiary",
262
- onClick: t[4] || (t[4] = () => s.value = !1)
267
+ onClick: t[4] || (t[4] = () => m.value = !1)
263
268
  }, null, 8, ["label"])
264
269
  ])
265
270
  ]),
266
- default: k(() => [
267
- $("div", be, [
268
- b(ie, null, {
269
- default: k(() => {
270
- var w;
271
+ default: h(() => [
272
+ M("div", be, [
273
+ k(ie, null, {
274
+ default: h(() => {
275
+ var _;
271
276
  return [
272
- b(c, {
277
+ k(p, {
273
278
  modelValue: o.value.name,
274
- "onUpdate:modelValue": t[1] || (t[1] = (p) => o.value.name = p),
275
- disabled: !S.value.name,
279
+ "onUpdate:modelValue": t[1] || (t[1] = (f) => o.value.name = f),
280
+ disabled: !D.value.name,
276
281
  rules: [
277
- (p) => !!p || i(r)("menu.common.validation.required", {
282
+ (f) => !!f || i(r)("menu.common.validation.required", {
278
283
  field: i(r)("menu.takeaway.columns.title").toLowerCase()
279
284
  })
280
285
  ],
@@ -284,25 +289,25 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
284
289
  required: "",
285
290
  title: i(r)("menu.takeaway.columns.title")
286
291
  }, {
287
- append: k(() => [
288
- b(E, {
292
+ append: h(() => [
293
+ k(E, {
289
294
  variant: "plain",
290
295
  placement: "top",
291
296
  "z-index": 999
292
297
  }, {
293
- content: k(() => [
294
- $("div", ke, [
295
- (D(!0), q(A, null, te(n.value, (p) => (D(), q("div", {
296
- key: p.locale
297
- }, O(p.name) + " (" + O(p.localeDisplay) + ") ", 1))), 128))
298
+ content: h(() => [
299
+ M("div", ke, [
300
+ (F(!0), q(A, null, te(l.value, (f) => (F(), q("div", {
301
+ key: f.locale
302
+ }, I(f.name) + " (" + I(f.localeDisplay) + ") ", 1))), 128))
298
303
  ])
299
304
  ]),
300
- default: k(() => [
301
- b(B, {
305
+ default: h(() => [
306
+ k(B, {
302
307
  variant: "tertiary",
303
308
  icon: "g_translate",
304
- onClick: t[0] || (t[0] = (p) => C.value = !0),
305
- disabled: !e.value || !S.value.name
309
+ onClick: t[0] || (t[0] = (f) => C.value = !0),
310
+ disabled: !e.value || !D.value.name
306
311
  }, null, 8, ["disabled"])
307
312
  ]),
308
313
  _: 1
@@ -310,12 +315,12 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
310
315
  ]),
311
316
  _: 1
312
317
  }, 8, ["modelValue", "disabled", "rules", "label", "placeholder", "title"]),
313
- b(ve, {
318
+ k(ye, {
314
319
  modelValue: o.value.price,
315
- "onUpdate:modelValue": t[2] || (t[2] = (p) => o.value.price = p),
320
+ "onUpdate:modelValue": t[2] || (t[2] = (f) => o.value.price = f),
316
321
  min: 0,
317
322
  nullable: !!a.fallback,
318
- placeholder: (w = a.fallback) != null && w.price ? i(de)(a.fallback.price, !1) : void 0,
323
+ placeholder: (_ = a.fallback) != null && _.price ? i(de)(a.fallback.price, !1) : void 0,
319
324
  label: i(r)("menu.takeaway.columns.price"),
320
325
  "show-currency": "",
321
326
  title: i(r)("menu.takeaway.columns.price")
@@ -324,10 +329,10 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
324
329
  }),
325
330
  _: 1
326
331
  }),
327
- a.applyProduct ? (D(), H(ue, {
332
+ a.applyProduct ? (F(), H(ue, {
328
333
  key: 0,
329
334
  overrides: o.value.usedBy,
330
- "onUpdate:overrides": t[3] || (t[3] = (w) => o.value.usedBy = w),
335
+ "onUpdate:overrides": t[3] || (t[3] = (_) => o.value.usedBy = _),
331
336
  "select-variant": a.bindToVariant,
332
337
  editable: "",
333
338
  title: i(r)("menu.common.labels.product")
@@ -336,22 +341,23 @@ const ye = { class: "fm-typo-en-title-md-600" }, be = { class: "space-y-32" }, k
336
341
  ]),
337
342
  _: 1
338
343
  }, 8, ["modelValue", "is-container", "is-container-props", "onOn:clickedAway"]),
339
- b(se, {
344
+ k(se, {
340
345
  modelValue: C.value,
341
- "onUpdate:modelValue": t[6] || (t[6] = (w) => C.value = w),
346
+ "onUpdate:modelValue": t[6] || (t[6] = (_) => C.value = _),
342
347
  title: i(r)("menu.takeaway.title"),
343
348
  name: o.value.name,
344
- "name-locale": d.value,
345
- "onUpdate:name": y,
349
+ "name-locale": c.value,
350
+ "onUpdate:name": b,
346
351
  "onUpdate:nameLocale": v
347
352
  }, null, 8, ["modelValue", "title", "name", "name-locale"])
348
353
  ], 64);
349
354
  };
350
355
  }
351
- }), Ue = we;
356
+ }), $e = we;
352
357
  export {
353
- Ue as T,
354
- ve as _,
358
+ $e as T,
359
+ ye as _,
355
360
  we as a,
356
- Te as l
361
+ Ue as l,
362
+ Ne as w
357
363
  };