@feedmepos/mf-menu 0.32.16 → 0.32.17-dev

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 (64) hide show
  1. package/dist/{App-Cp6hAf4r.js → App-CS86owo3.js} +5 -5
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-Bq8Ai6ir.js → ApplyProduct.vue_vue_type_script_setup_true_lang-DaUTgTs_.js} +3 -3
  3. package/dist/{Catalog-DZlT5Kv0.js → Catalog-DRNhdGGD.js} +6 -6
  4. package/dist/{Category-DrZWC1TQ.js → Category-BNhbD0VA.js} +6 -6
  5. package/dist/{Category-CgRn_W4_.js → Category-mS09ECzt.js} +4 -4
  6. package/dist/{CookingGuide-DkXKDRwI.js → CookingGuide-CtE-ueBG.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-BLpFpC3r.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-DCbTamf9.js} +1 -1
  8. package/dist/{Group-CoNa29qN.js → Group-CsurQlC9.js} +1 -1
  9. package/dist/{Group-jthvxhWq.js → Group-D2RLkrxZ.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-edBI3IhG.js → Group.vue_vue_type_script_setup_true_lang-Chq5Pcnw.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Bpu5NPdL.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-Ch9xYGvB.js} +5 -5
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-CFoEsqQW.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DTKmyt73.js} +5056 -5055
  13. package/dist/{Ingredient-87kh0Zeg.js → Ingredient-Civo_6ts.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DA12Hppy.js → InventoryBinding.vue_vue_type_script_setup_true_lang-LDadxBhp.js} +2 -2
  15. package/dist/{LinkProductSideSheet-q_E0OxBI.js → LinkProductSideSheet-8NK_5ryH.js} +3 -3
  16. package/dist/{MenuSetting-DrSVmJrv.js → MenuSetting-BnPspVfy.js} +5 -5
  17. package/dist/{PrintRoute-Ag3VVqG5.js → PrintRoute-WToP4QnZ.js} +4 -4
  18. package/dist/{Product-M4UF0g_r.js → Product-D2pWNPhP.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-BuXgUwkf.js → Product.vue_vue_type_script_setup_true_lang-Cq42j791.js} +12 -12
  20. package/dist/{ProductInternalTools-COwLVN9M.js → ProductInternalTools-DzzhanaE.js} +5 -5
  21. package/dist/{Products-1nOux6aQ.js → Products-J9XiGz-3.js} +103 -104
  22. package/dist/{Publish-DND24UOM.js → Publish-B0KcuZAD.js} +3 -3
  23. package/dist/{Recipe-BahCl2QF.js → Recipe-C0hVFbp4.js} +4 -4
  24. package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DxCclyLW.js → RuleView.vue_vue_type_script_setup_true_lang-CpNKX-sg.js} +2 -2
  25. package/dist/{Scheduler-CxW9mXnC.js → Scheduler-DsWzD3qp.js} +3 -3
  26. package/dist/{ServingSequence-DBtmKTWP.js → ServingSequence-BvBJtPsT.js} +3 -3
  27. package/dist/{Setting-D2CdAkIV.js → Setting-lZyb72vf.js} +5 -5
  28. package/dist/{Subcategory-B4TkrH7w.js → Subcategory-BdPHqNYT.js} +4 -4
  29. package/dist/{Takeaway-R8sKp9dk.js → Takeaway-1-_pOBc_.js} +4 -4
  30. package/dist/{Takeaway-BReaJjqu.js → Takeaway-BGGKoWV5.js} +1 -1
  31. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DPphTwY2.js → Takeaway.vue_vue_type_script_setup_true_lang-yDE3yWDr.js} +5 -5
  32. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-CA-t0MP_.js → Thumbnail.vue_vue_type_script_setup_true_lang-h9yZ2fAu.js} +4 -4
  33. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DVJGepyS.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-C3q_7RGw.js} +146 -141
  34. package/dist/{Unit-DaupB3J7.js → Unit-DnWI2GGt.js} +2 -2
  35. package/dist/{Variant-CesYb5do.js → Variant-CBIO_Py6.js} +3 -3
  36. package/dist/{_id_-CN8RH43s.js → _id_-CWZxFATG.js} +9 -9
  37. package/dist/{app-d97Ud4fA.js → app-BoMEYIIR.js} +26 -26
  38. package/dist/{app-s52udDOz.js → app-DQFmgarT.js} +1 -1
  39. package/dist/app.js +1 -1
  40. package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +1 -0
  41. package/dist/assets/{linked-status-KQPs_XUH.js → linked-status-HhBW6D7W.js} +2 -2
  42. package/dist/assets/{menu-export-KHAdCiC5.js → menu-export-qkOR6zu5.js} +3 -3
  43. package/dist/assets/{override-menu-CsUVrV3Q.js → override-menu-ClYLJDqA.js} +2 -2
  44. package/dist/assets/{validate-menu-BEJZow8d.js → validate-menu-WQ3U3WZa.js} +2 -2
  45. package/dist/{catalog-9_jtmYlm.js → catalog-DDqEdble.js} +1 -1
  46. package/dist/{catalogSetting-Btjwav-1.js → catalogSetting-CCmJsXTh.js} +1 -1
  47. package/dist/{category-DRwNEBe8.js → category-Dx7d5TEa.js} +1 -1
  48. package/dist/{currency-Do-UYAXP.js → currency-CM1RnQcP.js} +1 -1
  49. package/dist/{dayjs.min-BaRcKvRp.js → dayjs.min-Dk58BsuL.js} +1 -1
  50. package/dist/{index-D1GAORV_.js → index-CEen9P1H.js} +4 -4
  51. package/dist/{index-BFWW3J1P.js → index-Mlze1KnJ.js} +1 -1
  52. package/dist/{index-CuCfLbb2.js → index-mCZY4RLs.js} +3 -3
  53. package/dist/{index.vue_vue_type_script_setup_true_lang-_DMs_swc.js → index.vue_vue_type_script_setup_true_lang-CvDwvRNY.js} +6 -6
  54. package/dist/{item-Ge1k1cYH.js → item-va1GmngO.js} +95 -90
  55. package/dist/{jszip.min-BSs0LVJA.js → jszip.min-BwKJLdao.js} +545 -545
  56. package/dist/{menu-DL-wM6sR.js → menu-C8VGzuie.js} +1 -1
  57. package/dist/{menuV2-DMWng1KE.js → menuV2-t3v9Mt48.js} +137 -137
  58. package/dist/mf-menu.css +1 -1
  59. package/dist/{priceTier-BHOMDhXP.js → priceTier-CfMNR5R4.js} +1 -1
  60. package/dist/{scheduler-B_ztjqQh.js → scheduler-Br2nYK4b.js} +4 -4
  61. package/dist/{subcategory-53vsxcNn.js → subcategory-D9UJvB3z.js} +2 -2
  62. package/dist/{toExcel-B5cp0vaL.js → toExcel-BdhvLkrS.js} +2 -2
  63. package/dist/{unit-VmVDMUZb.js → unit-DfSNL7du.js} +2 -2
  64. package/package.json +1 -1
@@ -1,33 +1,33 @@
1
- import { computed as V, shallowRef as Wt, ref as q, watch as we, nextTick as tt, getCurrentInstance as Sn, onMounted as Ae, defineComponent as le, resolveComponent as j, createElementBlock as Z, openBlock as P, createBlock as J, normalizeClass as ve, createElementVNode as A, createVNode as C, unref as n, withCtx as B, toDisplayString as be, mergeModels as qt, useModel as Ht, createCommentVNode as Q, resolveDirective as Xt, withDirectives as pt, createTextVNode as Fn, renderSlot as Re, h as _e, Fragment as Oe, renderList as Ne, vShow as Jt, withModifiers as qe, createSlots as On, onBeforeUnmount as Ot, watchEffect as Dn, onUnmounted as Vn, normalizeStyle as dt, mergeProps as $n, normalizeProps as Pn, guardReactiveProps as Un, Teleport as Mn, Transition as Rn, withKeys as An } from "vue";
2
- import { g as Nn, o as Ln, f as Gn, a as Kn, b as Qt, n as Zt, I as Bn, S as zn, _ as Dt, C as Yn, c as en, d as Et, e as tn, h as jn, m as Wn, F as qn, M as nn, i as Hn, r as Xn, j as on, k as Nt, l as rn, p as Jn, P as Qn, q as Zn, s as an, u as eo, T as Be } from "./item-Ge1k1cYH.js";
3
- import { _ as to, T as no } from "./app-d97Ud4fA.js";
4
- import { B as ye, M as he, A as oe, G as nt, N as oo, O as ro, P as ao, u as ft, Q as Vt, R as lo, D as Le, T as io, I as fe, U as so, V as $t, J as Ie, W as vt, X as uo, Y as co, Z as bt, $ as Lt, a0 as mo, a1 as po } from "./index.vue_vue_type_script_setup_true_lang-_DMs_swc.js";
1
+ import { computed as V, shallowRef as Wt, ref as H, watch as we, nextTick as tt, getCurrentInstance as Sn, onMounted as Ae, defineComponent as le, resolveComponent as j, createElementBlock as Z, openBlock as P, createBlock as J, normalizeClass as ve, createElementVNode as A, createVNode as C, unref as n, withCtx as B, toDisplayString as be, mergeModels as qt, useModel as Ht, createCommentVNode as Q, resolveDirective as Xt, withDirectives as pt, createTextVNode as Fn, renderSlot as Re, h as _e, Fragment as Oe, renderList as Ne, vShow as Jt, withModifiers as qe, createSlots as On, onBeforeUnmount as Ot, watchEffect as Dn, onUnmounted as Vn, normalizeStyle as dt, mergeProps as $n, normalizeProps as Pn, guardReactiveProps as Un, Teleport as Mn, Transition as Rn, withKeys as An } from "vue";
2
+ import { g as Nn, o as Ln, f as Gn, a as Kn, b as Qt, n as Zt, I as Bn, S as zn, _ as Dt, C as Yn, c as en, d as Et, e as tn, h as jn, m as Wn, F as qn, M as nn, i as Hn, r as Xn, j as on, k as Nt, l as rn, p as Jn, P as Qn, q as Zn, s as an, u as eo, T as Be } from "./item-va1GmngO.js";
3
+ import { _ as to, T as no } from "./app-BoMEYIIR.js";
4
+ import { B as ye, M as he, A as oe, G as nt, N as oo, O as ro, P as ao, u as ft, Q as Vt, R as lo, D as Le, T as io, I as fe, U as so, V as $t, J as Ie, W as vt, X as uo, Y as co, Z as bt, $ as Lt, a0 as mo, a1 as po } from "./index.vue_vue_type_script_setup_true_lang-CvDwvRNY.js";
5
5
  import { useI18n as me, useCoreStore as ot, CustomAttributesForm as ln } from "@feedmepos/mf-common";
6
6
  import { useDialog as Ge, useDialogChild as Pt, useSnackbar as Me, FmButtonColorThemeVariant as Fe, components as ke, FmButtonVariant as We, useBreakpoints as fo } from "@feedmepos/ui-library";
7
7
  import { u as Ut } from "./discardConfirm-BHni0LNu.js";
8
8
  import { defineStore as go } from "pinia";
9
- import { _ as De, a as vo } from "./RuleView.vue_vue_type_script_setup_true_lang-DxCclyLW.js";
10
- import { u as ue, g as sn, m as bo } from "./menuV2-DMWng1KE.js";
9
+ import { _ as De, a as vo } from "./RuleView.vue_vue_type_script_setup_true_lang-CpNKX-sg.js";
10
+ import { u as ue, g as sn, m as bo } from "./menuV2-t3v9Mt48.js";
11
11
  import { s as Tt, _ as _o } from "./index-CisutoS9.js";
12
12
  import { useAppStore as un, RemyButton as dn } from "@feedmepos/mf-remy-panel";
13
13
  import { _ as Ue } from "./FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js";
14
- import { _ as Gt } from "./category-DRwNEBe8.js";
15
- import { _ as yo, a as ho, u as wo } from "./Thumbnail.vue_vue_type_script_setup_true_lang-CA-t0MP_.js";
14
+ import { _ as Gt } from "./category-Dx7d5TEa.js";
15
+ import { _ as yo, a as ho, u as wo } from "./Thumbnail.vue_vue_type_script_setup_true_lang-h9yZ2fAu.js";
16
16
  import { _ as Qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
17
17
  import { _ as cn } from "./tooltip-B5BiPMx9.js";
18
- import { _ as He, T as Co, l as ko } from "./index-D1GAORV_.js";
19
- import { L as xt } from "./LinkProductSideSheet-q_E0OxBI.js";
18
+ import { _ as He, T as Co, l as ko } from "./index-CEen9P1H.js";
19
+ import { L as xt } from "./LinkProductSideSheet-8NK_5ryH.js";
20
20
  import { u as Io } from "./search-BAPEUu1R.js";
21
21
  import { c as Mt } from "./check-C9mY6LiX.js";
22
- import { f as et } from "./currency-Do-UYAXP.js";
22
+ import { f as et } from "./currency-CM1RnQcP.js";
23
23
  import { c as Eo } from "./string-DpfFixWH.js";
24
24
  import { useInventoryStore as To, InventoryBindingSummary as xo } from "@feedmepos/mf-inventory-portal";
25
- import { u as So } from "./priceTier-BHOMDhXP.js";
25
+ import { u as So } from "./priceTier-CfMNR5R4.js";
26
26
  import { d as Rt } from "./vuedraggable-CK8z7qA8.js";
27
- import { _ as Fo } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-Bq8Ai6ir.js";
27
+ import { _ as Fo } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-DaUTgTs_.js";
28
28
  import "./app-5fxKLAzS.js";
29
29
  /* empty css */
30
- import { i as Oo, t as At, w as Do, a as mn, b as pn, n as Vo, c as $o, r as Po, _ as Uo } from "./index-BFWW3J1P.js";
30
+ import { i as Oo, t as At, w as Do, a as mn, b as pn, n as Vo, c as $o, r as Po, _ as Uo } from "./index-Mlze1KnJ.js";
31
31
  import { c as ct } from "./object-DVUNCr7w.js";
32
32
  import { _ as Mo } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
33
33
  import { _ as Kt } from "./MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js";
@@ -61,7 +61,7 @@ function Bt(...t) {
61
61
  return pn(_), _;
62
62
  }
63
63
  function Ro() {
64
- const t = q(!1), r = Sn();
64
+ const t = H(!1), r = Sn();
65
65
  return r && Ae(() => {
66
66
  t.value = !0;
67
67
  }, r), t;
@@ -129,7 +129,7 @@ function zo(t, r, e, o = {}) {
129
129
  console.error(l);
130
130
  },
131
131
  initOnMounted: I
132
- } = o, S = (w ? Wt : q)(typeof r == "function" ? r() : r);
132
+ } = o, S = (w ? Wt : H)(typeof r == "function" ? r() : r);
133
133
  if (!e)
134
134
  try {
135
135
  e = Go("getDefaultStorage", () => {
@@ -231,7 +231,7 @@ function jo(t, r = { width: 0, height: 0 }, e = {}) {
231
231
  const { window: o = Xe, box: s = "content-box" } = e, i = V(() => {
232
232
  var v, g;
233
233
  return (g = (v = ze(t)) == null ? void 0 : v.namespaceURI) == null ? void 0 : g.includes("svg");
234
- }), p = q(r.width), h = q(r.height), { stop: b } = Yo(
234
+ }), p = H(r.width), h = H(r.height), { stop: b } = Yo(
235
235
  t,
236
236
  ([v]) => {
237
237
  const g = s === "border-box" ? v.borderBoxSize : s === "content-box" ? v.contentBoxSize : v.devicePixelContentBoxSize;
@@ -288,8 +288,8 @@ function qo(t, r) {
288
288
  };
289
289
  }
290
290
  function fn(t) {
291
- const r = q(null), e = jo(r), o = q([]), s = Wt(t);
292
- return { state: q({ start: 0, end: 10 }), source: s, currentList: o, size: e, containerRef: r };
291
+ const r = H(null), e = jo(r), o = H([]), s = Wt(t);
292
+ return { state: H({ start: 0, end: 10 }), source: s, currentList: o, size: e, containerRef: r };
293
293
  }
294
294
  function gn(t, r, e) {
295
295
  return (o) => {
@@ -496,7 +496,7 @@ function or(t) {
496
496
  }), r;
497
497
  }
498
498
  const rt = go("mf-menu-tree", () => {
499
- const t = q(), r = q([]), e = q(null), o = q([]);
499
+ const t = H(), r = H([]), e = H(null), o = H([]);
500
500
  function s(g) {
501
501
  r.value = g, w.value = nr(g);
502
502
  }
@@ -526,7 +526,7 @@ const rt = go("mf-menu-tree", () => {
526
526
  a(I);
527
527
  o.value = g;
528
528
  }
529
- const w = q(/* @__PURE__ */ new Map());
529
+ const w = H(/* @__PURE__ */ new Map());
530
530
  function v(g) {
531
531
  return w.value.get(g);
532
532
  }
@@ -645,7 +645,7 @@ function ir(t, r, e, o) {
645
645
  return Ln(i, s);
646
646
  }
647
647
  function sr(t) {
648
- const r = q(null), e = V(() => r.value ? !t.state.currentCatalogId && !t.state.currentSchedulerId ? t.state.menu.modules.item.find(
648
+ const r = H(null), e = V(() => r.value ? !t.state.currentCatalogId && !t.state.currentSchedulerId ? t.state.menu.modules.item.find(
649
649
  (s) => s._id === r.value
650
650
  ) : ir(
651
651
  t.state.menu,
@@ -748,7 +748,7 @@ const gt = () => {
748
748
  }, pr = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fr = /* @__PURE__ */ le({
749
749
  __name: "ImageUploadDialog",
750
750
  setup(t) {
751
- const { t: r } = me(), e = q(), o = q(!1);
751
+ const { t: r } = me(), e = H(), o = H(!1);
752
752
  async function s([_]) {
753
753
  if (!_) return;
754
754
  o.value = !0;
@@ -847,7 +847,7 @@ const vr = {
847
847
  const {
848
848
  t: r
849
849
  } = me(), e = t, o = Ht(t, "modelValue");
850
- q(!1);
850
+ H(!1);
851
851
  const s = Ge(), i = () => {
852
852
  o.value = null;
853
853
  }, p = () => {
@@ -992,8 +992,8 @@ const $r = /* @__PURE__ */ le({
992
992
  },
993
993
  set(f = []) {
994
994
  const [c, ...$] = f.map((G) => {
995
- const H = S.value[G];
996
- return H || {
995
+ const X = S.value[G];
996
+ return X || {
997
997
  _id: G,
998
998
  position: null
999
999
  };
@@ -1004,7 +1004,7 @@ const $r = /* @__PURE__ */ le({
1004
1004
  }
1005
1005
  b("update:form", "category", c._id), b("update:form", "additionalCategories", $);
1006
1006
  }
1007
- }), E = q(), m = ({
1007
+ }), E = H(), m = ({
1008
1008
  multiple: f = !0
1009
1009
  } = {}) => e.isAddon ? null : C(Yn, {
1010
1010
  ref: E,
@@ -1038,9 +1038,9 @@ const $r = /* @__PURE__ */ le({
1038
1038
  const f = e.form.name || ((c = e.fallback) == null ? void 0 : c.name);
1039
1039
  return f ? s.items.filter(($) => !!$.category && $._id !== e.form._id && $.name === f).length : 0;
1040
1040
  }), U = V(() => {
1041
- var H, ee, ie;
1041
+ var X, ee, ie;
1042
1042
  if (!o.state.featureFlags.uniqueProductCode) return 0;
1043
- const c = e.form.code || ((H = e.fallback) == null ? void 0 : H.code);
1043
+ const c = e.form.code || ((X = e.fallback) == null ? void 0 : X.code);
1044
1044
  if (!c) return 0;
1045
1045
  let $ = s.itemCodeMap.get(c) || 0;
1046
1046
  const G = s.items.find((pe) => pe._id === e.form._id);
@@ -1049,10 +1049,10 @@ const $r = /* @__PURE__ */ le({
1049
1049
  }), $;
1050
1050
  }), R = V(() => e.isAddon ? Pe.ADD_ON : Pe.PRODUCT);
1051
1051
  function O(f) {
1052
- var $, G, H;
1052
+ var $, G, X;
1053
1053
  if (R.value === f) return;
1054
1054
  const c = f == Pe.ADD_ON;
1055
- b("update:form", "category", e.isOverride ? c ? "" : (($ = e.fallback) == null ? void 0 : $.category) ?? ((G = v.value.find((ee) => !!ee.value)) == null ? void 0 : G.value) : c ? null : (H = v.value.find((ee) => !!ee.value)) == null ? void 0 : H.value), c && b("update:form", "additionalCategories", []);
1055
+ b("update:form", "category", e.isOverride ? c ? "" : (($ = e.fallback) == null ? void 0 : $.category) ?? ((G = v.value.find((ee) => !!ee.value)) == null ? void 0 : G.value) : c ? null : (X = v.value.find((ee) => !!ee.value)) == null ? void 0 : X.value), c && b("update:form", "additionalCategories", []);
1056
1056
  }
1057
1057
  const M = un();
1058
1058
  Qt("apply-description", (f) => {
@@ -1088,7 +1088,7 @@ const $r = /* @__PURE__ */ le({
1088
1088
  t: y
1089
1089
  } = me();
1090
1090
  return (f, c) => {
1091
- const $ = j("fm-text-field"), G = j("fm-textarea"), H = j("fm-radio"), ee = j("FmSnackbar"), ie = j("FmButton"), pe = j("fm-radio-group"), d = j("FmFormGroup"), D = j("fm-stepper-field"), N = Xt("tooltip");
1091
+ const $ = j("fm-text-field"), G = j("fm-textarea"), X = j("fm-radio"), ee = j("FmSnackbar"), ie = j("FmButton"), pe = j("fm-radio-group"), d = j("FmFormGroup"), D = j("fm-stepper-field"), N = Xt("tooltip");
1092
1092
  return P(), J(De, {
1093
1093
  title: n(y)("menu.product.form.detail.title")
1094
1094
  }, {
@@ -1098,10 +1098,10 @@ const $r = /* @__PURE__ */ le({
1098
1098
  "model-value": f.form.code,
1099
1099
  placeholder: ((W = f.fallback) == null ? void 0 : W.code) || n(y)("menu.product.form.detail.fields.code.placeholder"),
1100
1100
  label: n(y)("menu.product.form.detail.fields.code.label"),
1101
- rules: [(X) => U.value === 0 || n(y)("menu.product.form.detail.fields.code.duplicate_warning", {
1101
+ rules: [(q) => U.value === 0 || n(y)("menu.product.form.detail.fields.code.duplicate_warning", {
1102
1102
  count: U.value
1103
1103
  })],
1104
- "onUpdate:modelValue": c[0] || (c[0] = (X) => b("update:form", "code", n(Zt)(X, f.isOverride)))
1104
+ "onUpdate:modelValue": c[0] || (c[0] = (q) => b("update:form", "code", n(Zt)(q, f.isOverride)))
1105
1105
  }, null, 8, ["model-value", "placeholder", "label", "rules"])]), A("div", Ir, [C($, {
1106
1106
  id: "product-name",
1107
1107
  disabled: !_.value.name,
@@ -1110,15 +1110,15 @@ const $r = /* @__PURE__ */ le({
1110
1110
  }) : void 0,
1111
1111
  "model-value": f.form.name,
1112
1112
  placeholder: (L = f.fallback) == null ? void 0 : L.name,
1113
- rules: _.value.name ? [(X) => !!X || n(y)("menu.product.form.detail.fields.name.required")] : void 0,
1113
+ rules: _.value.name ? [(q) => !!q || n(y)("menu.product.form.detail.fields.name.required")] : void 0,
1114
1114
  "label-mark": "required",
1115
1115
  label: n(y)("menu.product.form.detail.fields.name.label"),
1116
- "onUpdate:modelValue": c[1] || (c[1] = (X) => b("update:form", "name", X))
1116
+ "onUpdate:modelValue": c[1] || (c[1] = (q) => b("update:form", "name", q))
1117
1117
  }, null, 8, ["disabled", "helper-text", "model-value", "placeholder", "rules", "label"])])]), A("div", Er, [C(G, {
1118
1118
  disabled: !_.value.description,
1119
1119
  "model-value": f.form.description || "",
1120
1120
  placeholder: n(y)("menu.product.form.detail.fields.description.placeholder"),
1121
- "onUpdate:modelValue": c[2] || (c[2] = (X) => b("update:form", "description", X.trim())),
1121
+ "onUpdate:modelValue": c[2] || (c[2] = (q) => b("update:form", "description", q.trim())),
1122
1122
  class: "description"
1123
1123
  }, {
1124
1124
  label: B(() => [A("p", Tr, [Fn(be(n(y)("menu.product.form.detail.fields.description.label")) + " ", 1), A("span", xr, be(n(y)("menu.product.form.detail.fields.description.optional")), 1)])]),
@@ -1130,7 +1130,7 @@ const $r = /* @__PURE__ */ le({
1130
1130
  disabled: !_.value.thumbnail,
1131
1131
  "item-id": f.form._id || "",
1132
1132
  "model-value": f.form.thumbnail || ((K = f.fallback) == null ? void 0 : K.thumbnail) || null,
1133
- "onUpdate:modelValue": c[3] || (c[3] = (X) => b("update:form", "thumbnail", X))
1133
+ "onUpdate:modelValue": c[3] || (c[3] = (q) => b("update:form", "thumbnail", q))
1134
1134
  }, null, 8, ["disabled", "item-id", "model-value"])]), C(Ue, {
1135
1135
  label: n(s).isV4 ? n(y)("menu.product.form.detail.category.label") : n(y)("menu.product.form.detail.category.label_singular")
1136
1136
  }, {
@@ -1138,9 +1138,9 @@ const $r = /* @__PURE__ */ le({
1138
1138
  key: 0,
1139
1139
  disabled: !_.value.category,
1140
1140
  "model-value": f.isAddon ? Pe.ADD_ON : Pe.PRODUCT,
1141
- "onUpdate:modelValue": c[4] || (c[4] = (X) => O(X))
1141
+ "onUpdate:modelValue": c[4] || (c[4] = (q) => O(q))
1142
1142
  }, {
1143
- default: B(() => [A("div", Sr, [A("div", Fr, [C(H, {
1143
+ default: B(() => [A("div", Sr, [A("div", Fr, [C(X, {
1144
1144
  disabled: a.value,
1145
1145
  value: Pe.PRODUCT,
1146
1146
  label: n(y)("menu.product.form.detail.category.options.product.label"),
@@ -1158,7 +1158,7 @@ const $r = /* @__PURE__ */ le({
1158
1158
  "prepend-icon": "add",
1159
1159
  variant: "secondary",
1160
1160
  onClick: n(i).create
1161
- }, null, 8, ["label", "onClick"])])) : Q("", !0), C(H, {
1161
+ }, null, 8, ["label", "onClick"])])) : Q("", !0), C(X, {
1162
1162
  value: Pe.ADD_ON,
1163
1163
  disabled: !1,
1164
1164
  label: n(y)("menu.product.form.detail.category.options.addon.label"),
@@ -1168,7 +1168,7 @@ const $r = /* @__PURE__ */ le({
1168
1168
  }, 8, ["disabled", "model-value"])) : Q("", !0), n(s).isV4 ? Q("", !0) : (P(), J(d, {
1169
1169
  key: 1,
1170
1170
  "model-value": f.form.category,
1171
- rules: [(X) => !X && !f.isOverride ? "Category is required" : !0]
1171
+ rules: [(q) => !q && !f.isOverride ? "Category is required" : !0]
1172
1172
  }, {
1173
1173
  default: B(() => [C(m, {
1174
1174
  multiple: !1
@@ -1182,7 +1182,7 @@ const $r = /* @__PURE__ */ le({
1182
1182
  }, {
1183
1183
  default: B(() => [A("div", Dr, [C(zn, {
1184
1184
  modelValue: u.value,
1185
- "onUpdate:modelValue": c[5] || (c[5] = (X) => u.value = X),
1185
+ "onUpdate:modelValue": c[5] || (c[5] = (q) => u.value = q),
1186
1186
  items: l.value,
1187
1187
  placeholder: n(y)("menu.product.form.detail.path.placeholder"),
1188
1188
  disabled: !_.value.category,
@@ -1192,22 +1192,27 @@ const $r = /* @__PURE__ */ le({
1192
1192
  }, 8, ["label"])) : Q("", !0), A("div", Vr, [C(D, {
1193
1193
  label: "Shelf Life (mins)",
1194
1194
  "model-value": f.form.shelfLife ?? null,
1195
- "onUpdate:modelValue": c[6] || (c[6] = (X) => X && b("update:form", "shelfLife", X))
1196
- }, null, 8, ["model-value"])]), C(Dt, {
1195
+ rules: [(q) => q == null || q > 0 || n(y)("menu.common.validation.min_value", {
1196
+ value: 1
1197
+ })],
1198
+ "onUpdate:modelValue": c[6] || (c[6] = (q) => {
1199
+ (q == null || q > 0) && b("update:form", "shelfLife", q);
1200
+ })
1201
+ }, null, 8, ["model-value", "rules"])]), C(Dt, {
1197
1202
  disabled: !_.value.orderFrom,
1198
1203
  "model-value": f.form.orderFrom,
1199
1204
  "order-from-none": _.value.orderFromNone,
1200
1205
  required: _.value.orderFrom,
1201
1206
  "default-label": n(y)("menu.product.form.detail.order_from.default"),
1202
1207
  label: n(y)("menu.product.form.detail.order_from.label"),
1203
- "onUpdate:modelValue": c[7] || (c[7] = (X) => X && b("update:form", "orderFrom", X))
1208
+ "onUpdate:modelValue": c[7] || (c[7] = (q) => q && b("update:form", "orderFrom", q))
1204
1209
  }, null, 8, ["disabled", "model-value", "order-from-none", "required", "default-label", "label"])];
1205
1210
  }),
1206
1211
  _: 1
1207
1212
  }, 8, ["title"]);
1208
1213
  };
1209
1214
  }
1210
- }), Pr = /* @__PURE__ */ Qe($r, [["__scopeId", "data-v-5f4e20f6"]]), Ur = /* @__PURE__ */ le({
1215
+ }), Pr = /* @__PURE__ */ Qe($r, [["__scopeId", "data-v-06c9411a"]]), Ur = /* @__PURE__ */ le({
1211
1216
  __name: "AddForm",
1212
1217
  setup(t) {
1213
1218
  const r = ue(), e = V(() => r.rules.group), o = V(() => !!r.state.currentCatalogId || !!r.state.currentSchedulerId), s = V(() => {
@@ -1237,7 +1242,7 @@ const $r = /* @__PURE__ */ le({
1237
1242
  items: {},
1238
1243
  position: r.groups.length - 1,
1239
1244
  itemsLinked: []
1240
- }), p = q(i()), { t: h } = me();
1245
+ }), p = H(i()), { t: h } = me();
1241
1246
  return (b, _) => e.value.create ? (P(), J(n(qr), {
1242
1247
  key: 0,
1243
1248
  "categorized-items": n(r).categorizedItems,
@@ -1278,7 +1283,7 @@ const $r = /* @__PURE__ */ le({
1278
1283
  setup(t, {
1279
1284
  emit: r
1280
1285
  }) {
1281
- const e = t, o = r, s = Me(), i = ot(), p = ue(), h = V(() => ye.Country.getCountry(i.currentCountry.value)), b = q(!1), _ = V(() => e.config.isV4 || e.group.type === oe.F_ADDON_GROUP_TYPE.enum.PRODUCT), w = V(() => _.value), v = V(() => _.value), g = V(() => Object.values(e.group.items).flatMap((d) => [{
1286
+ const e = t, o = r, s = Me(), i = ot(), p = ue(), h = V(() => ye.Country.getCountry(i.currentCountry.value)), b = H(!1), _ = V(() => e.config.isV4 || e.group.type === oe.F_ADDON_GROUP_TYPE.enum.PRODUCT), w = V(() => _.value), v = V(() => _.value), g = V(() => Object.values(e.group.items).flatMap((d) => [{
1282
1287
  _id: d._id,
1283
1288
  combinationKey: void 0
1284
1289
  }, ...(d.items ?? []).map((D) => ({
@@ -1299,9 +1304,9 @@ const $r = /* @__PURE__ */ le({
1299
1304
  }), E = V(() => !0), m = (d) => d ? et(d, !1) : "", T = (d) => {
1300
1305
  var D;
1301
1306
  return d == null ? "" : (D = io()[d]) == null ? void 0 : D.label;
1302
- }, U = V(() => Object.values(S.value)), R = q({}), {
1307
+ }, U = V(() => Object.values(S.value)), R = H({}), {
1303
1308
  t: O
1304
- } = me(), M = q([{
1309
+ } = me(), M = H([{
1305
1310
  accessorKey: "isDefault",
1306
1311
  header: () => O("menu.group.option.is_default"),
1307
1312
  enableSorting: !1,
@@ -1315,14 +1320,14 @@ const $r = /* @__PURE__ */ le({
1315
1320
  value: "default",
1316
1321
  modelValue: W,
1317
1322
  disabled: !F(N.combinationKey).isDefault,
1318
- "onUpdate:modelValue": (X) => {
1323
+ "onUpdate:modelValue": (q) => {
1319
1324
  var re;
1320
1325
  if (D) {
1321
1326
  const ne = (re = d.row.getParentRow()) == null ? void 0 : re.original;
1322
1327
  if (!ne) return;
1323
- u(ne._id, N.combinationKey ?? "", "isDefault", X);
1328
+ u(ne._id, N.combinationKey ?? "", "isDefault", q);
1324
1329
  } else
1325
- l(N._id, "isDefault", X);
1330
+ l(N._id, "isDefault", q);
1326
1331
  }
1327
1332
  }, null);
1328
1333
  }
@@ -1355,9 +1360,9 @@ const $r = /* @__PURE__ */ le({
1355
1360
  disabled: !F(N.combinationKey).name,
1356
1361
  rules: L ? void 0 : [(K) => K.length > 0 || O("menu.group.option.product_title_required")],
1357
1362
  "onUpdate:modelValue": (K) => {
1358
- var X;
1363
+ var q;
1359
1364
  if (W) {
1360
- const re = (X = d.row.getParentRow()) == null ? void 0 : X.original;
1365
+ const re = (q = d.row.getParentRow()) == null ? void 0 : q.original;
1361
1366
  if (!re) return;
1362
1367
  u(re._id, N.combinationKey ?? "", "name", K);
1363
1368
  } else
@@ -1366,8 +1371,8 @@ const $r = /* @__PURE__ */ le({
1366
1371
  class: "min-w-[300px]"
1367
1372
  }, {
1368
1373
  append: () => {
1369
- var K, X;
1370
- return (X = (K = d.row.original) == null ? void 0 : K.items) != null && X.length ? _e(ke.FmIcon, {
1374
+ var K, q;
1375
+ return (q = (K = d.row.original) == null ? void 0 : K.items) != null && q.length ? _e(ke.FmIcon, {
1371
1376
  name: "keyboard_arrow_up",
1372
1377
  onClick: d.row.getToggleExpandedHandler(),
1373
1378
  class: ["cursor-pointer", "transition-transform", d.row.getIsExpanded() ? "transform rotate-180" : ""],
@@ -1395,7 +1400,7 @@ const $r = /* @__PURE__ */ le({
1395
1400
  required: !L && !W,
1396
1401
  nullable: !!L,
1397
1402
  min: E.value ? void 0 : 0,
1398
- "onUpdate:modelValue": (X) => {
1403
+ "onUpdate:modelValue": (q) => {
1399
1404
  var re;
1400
1405
  if (K) {
1401
1406
  const ne = (re = d.row.getParentRow()) == null ? void 0 : re.original;
@@ -1405,10 +1410,10 @@ const $r = /* @__PURE__ */ le({
1405
1410
  N.combinationKey ?? "",
1406
1411
  // @ts-ignore
1407
1412
  "price",
1408
- X
1413
+ q
1409
1414
  );
1410
1415
  } else
1411
- l(N._id, "price", X);
1416
+ l(N._id, "price", q);
1412
1417
  },
1413
1418
  showCurrency: !1,
1414
1419
  class: "min-w-[88px]"
@@ -1428,9 +1433,9 @@ const $r = /* @__PURE__ */ le({
1428
1433
  required: !0,
1429
1434
  editActiveOnly: F(N.combinationKey).orderFromActiveOnly,
1430
1435
  "onUpdate:modelValue": (K) => {
1431
- var X;
1436
+ var q;
1432
1437
  if (L) {
1433
- const re = (X = d.row.getParentRow()) == null ? void 0 : X.original;
1438
+ const re = (q = d.row.getParentRow()) == null ? void 0 : q.original;
1434
1439
  if (!re) return;
1435
1440
  u(
1436
1441
  re._id,
@@ -1581,11 +1586,11 @@ const $r = /* @__PURE__ */ le({
1581
1586
  var re, ne;
1582
1587
  const L = fe(e.group), K = (re = L.items[d].items) == null ? void 0 : re.findIndex((ge) => ge.combinationKey === D);
1583
1588
  if (!Mt.isSet(K)) return;
1584
- let X = (ne = L.items[d].items) == null ? void 0 : ne[K];
1585
- X && (X = {
1586
- ...X,
1589
+ let q = (ne = L.items[d].items) == null ? void 0 : ne[K];
1590
+ q && (q = {
1591
+ ...q,
1587
1592
  [N]: W
1588
- }, L.items[d].items[K] = X, o("update:group", L));
1593
+ }, L.items[d].items[K] = q, o("update:group", L));
1589
1594
  }
1590
1595
  function y(d) {
1591
1596
  const D = fe(e.group);
@@ -1603,8 +1608,8 @@ const $r = /* @__PURE__ */ le({
1603
1608
  }, d;
1604
1609
  }, {})), $ = (d) => {
1605
1610
  var L, K;
1606
- const N = p.state.menu.modules.item.find((X) => X._id === d._id), W = d.combinationKey ? {
1607
- ...(L = N == null ? void 0 : N.variant) == null ? void 0 : L.variantCombinations.find((X) => X.combinationKey === d.combinationKey),
1611
+ const N = p.state.menu.modules.item.find((q) => q._id === d._id), W = d.combinationKey ? {
1612
+ ...(L = N == null ? void 0 : N.variant) == null ? void 0 : L.variantCombinations.find((q) => q.combinationKey === d.combinationKey),
1608
1613
  name: $t(ue().variants, ((K = N == null ? void 0 : N.variant) == null ? void 0 : K.variantGroupIds) || [])[d.combinationKey]
1609
1614
  } : N;
1610
1615
  return W == null ? void 0 : W.name;
@@ -1622,7 +1627,7 @@ const $r = /* @__PURE__ */ le({
1622
1627
  };
1623
1628
  })
1624
1629
  }, o("update:unmap-group", D);
1625
- }, H = (d) => d.items;
1630
+ }, X = (d) => d.items;
1626
1631
  function ee(d) {
1627
1632
  const D = fe(e.group);
1628
1633
  D.items = d.reduce((N, W) => ({
@@ -1673,7 +1678,7 @@ const $r = /* @__PURE__ */ le({
1673
1678
  "column-visibility": x.value,
1674
1679
  draggable: !pe.value && F(null).name,
1675
1680
  "expanded-state": b.value ? {} : R.value,
1676
- "get-sub-row": H,
1681
+ "get-sub-row": X,
1677
1682
  "page-size": 999,
1678
1683
  "row-data": U.value,
1679
1684
  "search-value": n(a),
@@ -1705,7 +1710,7 @@ const $r = /* @__PURE__ */ le({
1705
1710
  let o = t;
1706
1711
  const s = e, i = ue(), p = ot(), h = Ge(), b = Vt(nt(Me())), { countDefaultItems: _, validateGroupItems: w, minMaxValidationRules: v } = jn(
1707
1712
  () => o.group
1708
- ), g = q(!1), a = q(!1), I = (c) => {
1713
+ ), g = H(!1), a = H(!1), I = (c) => {
1709
1714
  Mt.isBoolean(c) ? a.value = c : a.value = !a.value;
1710
1715
  }, S = V(() => o.group ? o.config(o.group) : null), F = V(() => Wn(S.value)), E = (c) => F.value.includes(c), m = V(() => [
1711
1716
  {
@@ -1751,7 +1756,7 @@ const $r = /* @__PURE__ */ le({
1751
1756
  S.value.isOverride
1752
1757
  )[0];
1753
1758
  }
1754
- const O = q(Ie.clone(o.group)), M = Ut(
1759
+ const O = H(Ie.clone(o.group)), M = Ut(
1755
1760
  () => !Ie.isEqual(o.group, O.value),
1756
1761
  () => {
1757
1762
  a.value = !1;
@@ -1788,8 +1793,8 @@ const $r = /* @__PURE__ */ le({
1788
1793
  const c = {};
1789
1794
  return i.state.menu.modules.group.forEach(($) => {
1790
1795
  var G;
1791
- for (const [H, ee] of Object.entries($.customAttributes || {}))
1792
- typeof ee == "string" && ee && !((G = c[H]) != null && G.includes(ee)) && (c[H] = [...c[H] || [], ee]);
1796
+ for (const [X, ee] of Object.entries($.customAttributes || {}))
1797
+ typeof ee == "string" && ee && !((G = c[X]) != null && G.includes(ee)) && (c[X] = [...c[X] || [], ee]);
1793
1798
  }), c;
1794
1799
  }), y = (c) => {
1795
1800
  o.group && T({
@@ -1803,7 +1808,7 @@ const $r = /* @__PURE__ */ le({
1803
1808
  });
1804
1809
  const { t: f } = me();
1805
1810
  return (c, $) => {
1806
- const G = j("fm-text-field"), H = j("fm-stepper-field"), ee = j("FmFormGroup"), ie = j("fm-radio"), pe = j("fm-radio-group"), d = j("fm-switch"), D = j("FormSection"), N = j("fm-button"), W = j("fm-side-sheet");
1811
+ const G = j("fm-text-field"), X = j("fm-stepper-field"), ee = j("FmFormGroup"), ie = j("fm-radio"), pe = j("fm-radio-group"), d = j("fm-switch"), D = j("FormSection"), N = j("fm-button"), W = j("fm-side-sheet");
1807
1812
  return P(), Z(Oe, null, [
1808
1813
  Re(c.$slots, "default", { trigger: I }),
1809
1814
  C(W, {
@@ -1862,7 +1867,7 @@ const $r = /* @__PURE__ */ le({
1862
1867
  default: B(() => [
1863
1868
  C(qn, null, {
1864
1869
  default: B(() => [
1865
- C(H, {
1870
+ C(X, {
1866
1871
  modelValue: c.group.min,
1867
1872
  "onUpdate:modelValue": $[1] || ($[1] = (L) => c.group.min = L),
1868
1873
  disabled: E("min"),
@@ -1870,7 +1875,7 @@ const $r = /* @__PURE__ */ le({
1870
1875
  class: "flex-1",
1871
1876
  label: n(f)("menu.common.labels.min_select")
1872
1877
  }, null, 8, ["modelValue", "disabled", "label"]),
1873
- C(H, {
1878
+ C(X, {
1874
1879
  modelValue: c.group.max,
1875
1880
  "onUpdate:modelValue": $[2] || ($[2] = (L) => c.group.max = L),
1876
1881
  disabled: E("max"),
@@ -1977,7 +1982,7 @@ const $r = /* @__PURE__ */ le({
1977
1982
  emits: ["update:combinations"],
1978
1983
  setup(t, { expose: r, emit: e }) {
1979
1984
  var U, R;
1980
- const o = t, s = e, i = ue(), p = Ge(), h = Vt(nt(Me())), b = q([]), _ = q(o.combinations[0].combinationKey || ""), w = V(
1985
+ const o = t, s = e, i = ue(), p = Ge(), h = Vt(nt(Me())), b = H([]), _ = H(o.combinations[0].combinationKey || ""), w = V(
1981
1986
  () => b.value.findIndex((O) => O.combinationKey == _.value)
1982
1987
  ), v = V(
1983
1988
  () => o.combinations.map((O) => ({
@@ -2055,14 +2060,14 @@ const $r = /* @__PURE__ */ le({
2055
2060
  });
2056
2061
  s("update:combinations", O);
2057
2062
  }
2058
- const E = q(!1);
2063
+ const E = H(!1);
2059
2064
  we(
2060
2065
  () => E.value,
2061
2066
  (O) => {
2062
2067
  O && (b.value = fe(o.combinations), _.value = o.combinations[0].combinationKey || "");
2063
2068
  }
2064
2069
  );
2065
- const m = q();
2070
+ const m = H();
2066
2071
  r({
2067
2072
  show: (U = m.value) == null ? void 0 : U.show,
2068
2073
  trigger: (R = m.value) == null ? void 0 : R.trigger
@@ -2177,7 +2182,7 @@ const $r = /* @__PURE__ */ le({
2177
2182
  position: i.groups.length - 1,
2178
2183
  itemsLinked: []
2179
2184
  }));
2180
- const g = q(fe(r.groupIds || [])), a = q(""), { t: I } = me(), S = () => {
2185
+ const g = H(fe(r.groupIds || [])), a = H(""), { t: I } = me(), S = () => {
2181
2186
  o(g.value), s("primary"), e.close();
2182
2187
  };
2183
2188
  return (F, E) => {
@@ -2297,7 +2302,7 @@ const $r = /* @__PURE__ */ le({
2297
2302
  return u.items.forEach((c) => {
2298
2303
  if (c.combinationKey)
2299
2304
  return;
2300
- const $ = o.items.find((H) => H._id === c._id), G = u.items.filter((H) => H._id === c._id && H.combinationKey).length;
2305
+ const $ = o.items.find((X) => X._id === c._id), G = u.items.filter((X) => X._id === c._id && X.combinationKey).length;
2301
2306
  y.push({
2302
2307
  code: c.code || ($ == null ? void 0 : $.code),
2303
2308
  name: c.name || ($ == null ? void 0 : $.name),
@@ -2576,7 +2581,7 @@ const $r = /* @__PURE__ */ le({
2576
2581
  };
2577
2582
  s("replace:form", E);
2578
2583
  }
2579
- q([{
2584
+ H([{
2580
2585
  accessorKey: "name",
2581
2586
  header: () => _.value || e("menu.inventory.columns.product_name"),
2582
2587
  enableSorting: !1
@@ -2629,7 +2634,7 @@ const $r = /* @__PURE__ */ le({
2629
2634
  })]) : null;
2630
2635
  }
2631
2636
  }]);
2632
- const g = q([]);
2637
+ const g = H([]);
2633
2638
  async function a({
2634
2639
  _id: S
2635
2640
  }) {
@@ -3137,7 +3142,7 @@ const $r = /* @__PURE__ */ le({
3137
3142
  }, ...o.takeaways.map((v) => ({
3138
3143
  label: v.name,
3139
3144
  value: v._id
3140
- }))]), w = q([{
3145
+ }))]), w = H([{
3141
3146
  accessorKey: "name",
3142
3147
  enableSorting: !1,
3143
3148
  header: () => h.value ? i("menu.product.form.takeaway.columns.variant") : i("menu.product.form.takeaway.columns.product")
@@ -3227,7 +3232,7 @@ const $r = /* @__PURE__ */ le({
3227
3232
  }), U;
3228
3233
  } else
3229
3234
  return { ...Le.generator.initMenuV4VariantGroup(), usedBy: [] };
3230
- }, w = q(_()), v = q(!1), g = q(!1);
3235
+ }, w = H(_()), v = H(!1), g = H(!1);
3231
3236
  function a(U) {
3232
3237
  w.value.options = U;
3233
3238
  }
@@ -3451,7 +3456,7 @@ const Ra = {
3451
3456
  label: g.name,
3452
3457
  value: g._id,
3453
3458
  disabled: !1
3454
- }))), b = q(fe(p.selectedVariants)), _ = q(""), { createVariant: w } = Ma(), v = () => {
3459
+ }))), b = H(fe(p.selectedVariants)), _ = H(""), { createVariant: w } = Ma(), v = () => {
3455
3460
  e(b.value), o("primary"), r.close();
3456
3461
  };
3457
3462
  return (g, a) => {
@@ -3581,8 +3586,8 @@ const Ra = {
3581
3586
  });
3582
3587
  }
3583
3588
  function E(l) {
3584
- var G, H;
3585
- const u = ((G = e.form.variant) == null ? void 0 : G.variantGroupIds) || [], y = (H = e.form.variant) == null ? void 0 : H.variantCombinations, $ = l.split(/(?=variant)/g).map((ee) => ee.replace(/\/*$/, "")).filter((ee) => u.some((ie) => ee.includes(ie))).join("/");
3589
+ var G, X;
3590
+ const u = ((G = e.form.variant) == null ? void 0 : G.variantGroupIds) || [], y = (X = e.form.variant) == null ? void 0 : X.variantCombinations, $ = l.split(/(?=variant)/g).map((ee) => ee.replace(/\/*$/, "")).filter((ee) => u.some((ie) => ee.includes(ie))).join("/");
3586
3591
  return y == null ? void 0 : y.find((ee) => ee.combinationKey === $);
3587
3592
  }
3588
3593
  const m = (l) => {
@@ -3612,14 +3617,14 @@ const Ra = {
3612
3617
  const y = l.filter(($) => !!$);
3613
3618
  let f;
3614
3619
  if (y.length) {
3615
- const $ = y.map((H) => s.variants.find((ee) => ee._id === H)), G = Le.fullVariantCombination($).map(({
3616
- combinationKey: H
3620
+ const $ = y.map((X) => s.variants.find((ee) => ee._id === X)), G = Le.fullVariantCombination($).map(({
3621
+ combinationKey: X
3617
3622
  }) => {
3618
3623
  var ie;
3619
- const ee = (ie = e.form.variant) == null ? void 0 : ie.variantCombinations.find((pe) => pe.combinationKey === H);
3624
+ const ee = (ie = e.form.variant) == null ? void 0 : ie.variantCombinations.find((pe) => pe.combinationKey === X);
3620
3625
  return u(ee || {
3621
3626
  _id: e.form._id,
3622
- combinationKey: H
3627
+ combinationKey: X
3623
3628
  });
3624
3629
  });
3625
3630
  if (G.length > 100) {
@@ -3639,7 +3644,7 @@ const Ra = {
3639
3644
  takeawayUsed: null
3640
3645
  };
3641
3646
  } else {
3642
- const $ = (c = e.form.variant) == null ? void 0 : c.variantCombinations.map((H) => H.takeawayUsed), G = [...new Set($)];
3647
+ const $ = (c = e.form.variant) == null ? void 0 : c.variantCombinations.map((X) => X.takeawayUsed), G = [...new Set($)];
3643
3648
  I([{
3644
3649
  key: "variant",
3645
3650
  value: void 0
@@ -3674,8 +3679,8 @@ const Ra = {
3674
3679
  header: () => b("menu.product.form.variant.columns.code"),
3675
3680
  enableSorting: !1,
3676
3681
  cell: (l) => {
3677
- var G, H;
3678
- const u = l.getValue(), y = l.row.original, c = ((G = y.fallback) == null ? void 0 : G.code) ?? e.form.code ?? ((H = e.fallback) == null ? void 0 : H.code), $ = o.state.featureFlags.uniqueProductCode;
3682
+ var G, X;
3683
+ const u = l.getValue(), y = l.row.original, c = ((G = y.fallback) == null ? void 0 : G.code) ?? e.form.code ?? ((X = e.fallback) == null ? void 0 : X.code), $ = o.state.featureFlags.uniqueProductCode;
3679
3684
  return _e(ke.FmTextField, {
3680
3685
  modelValue: u,
3681
3686
  placeholder: c || b("menu.product.form.variant.placeholders.no_code"),
@@ -3722,7 +3727,7 @@ const Ra = {
3722
3727
  header: () => b("menu.product.form.variant.columns.price"),
3723
3728
  enableSorting: !1,
3724
3729
  cell: (l) => {
3725
- var $, G, H;
3730
+ var $, G, X;
3726
3731
  const u = l.getValue(), y = l.row.original, c = (($ = y.fallback) == null ? void 0 : $.price) ?? e.form.price ?? ((G = e.fallback) == null ? void 0 : G.price);
3727
3732
  return C("div", {
3728
3733
  id: mt(Se.VARIANT, y.combinationKey ?? ""),
@@ -3740,7 +3745,7 @@ const Ra = {
3740
3745
  }, null), s.isV4 && !e.isOverride && C(en, {
3741
3746
  "menu-store": s,
3742
3747
  "price-tiers": y.priceTiers,
3743
- fallback: (H = y.fallback) == null ? void 0 : H.priceTiers,
3748
+ fallback: (X = y.fallback) == null ? void 0 : X.priceTiers,
3744
3749
  "onUpdate:price-tiers": (ee) => R(l.row.index, "priceTiers", ee)
3745
3750
  }, null)]);
3746
3751
  }
@@ -3749,12 +3754,12 @@ const Ra = {
3749
3754
  header: () => b("menu.product.form.variant.columns.min_price"),
3750
3755
  enableSorting: !1,
3751
3756
  cell: (l) => {
3752
- var $, G, H;
3757
+ var $, G, X;
3753
3758
  const u = l.getValue(), y = l.row.original, c = (($ = y.fallback) == null ? void 0 : $.minPrice) ?? e.form.minPrice ?? ((G = e.fallback) == null ? void 0 : G.minPrice);
3754
3759
  return _e(He, {
3755
3760
  placeholder: c ? et(c) : void 0,
3756
3761
  modelValue: u,
3757
- max: ye.Dinero.fromFdoDinero(y.price ?? ((H = y.fallback) == null ? void 0 : H.price) ?? ye.Dinero.zero().toObject()).toUnit(),
3762
+ max: ye.Dinero.fromFdoDinero(y.price ?? ((X = y.fallback) == null ? void 0 : X.price) ?? ye.Dinero.zero().toObject()).toUnit(),
3758
3763
  "onUpdate:modelValue": (ee) => {
3759
3764
  R(l.row.index, "minPrice", ee);
3760
3765
  },
@@ -3791,9 +3796,9 @@ const Ra = {
3791
3796
  rules: [k]
3792
3797
  }, {
3793
3798
  default: B(() => {
3794
- var H;
3799
+ var X;
3795
3800
  return [C(n(Rt), {
3796
- "model-value": ((H = l.form.variant) == null ? void 0 : H.variantGroupIds) ?? [],
3801
+ "model-value": ((X = l.form.variant) == null ? void 0 : X.variantGroupIds) ?? [],
3797
3802
  class: "space-y-16",
3798
3803
  group: "variants",
3799
3804
  handle: ".handle",
@@ -3890,12 +3895,12 @@ const Ra = {
3890
3895
  route: ""
3891
3896
  }), ae = ae.parent;
3892
3897
  return Y.reverse();
3893
- }), w = q(null);
3898
+ }), w = H(null);
3894
3899
  Ae(() => {
3895
3900
  var z;
3896
3901
  (z = w.value) == null || z.setSelectedItemIndex(_.value.length - 1);
3897
3902
  });
3898
- const v = V(() => p.rules.item), g = q(), a = q(
3903
+ const v = V(() => p.rules.item), g = H(), a = H(
3899
3904
  o.initialForm ? fe(o.initialForm) : {
3900
3905
  ...Le.generator.initMenuV4Item(),
3901
3906
  category: o.categoryId
@@ -3928,7 +3933,7 @@ const Ra = {
3928
3933
  ), T = V(() => {
3929
3934
  var z;
3930
3935
  return m.value ? a.value.category == "" || a.value.category == null && ((z = g.value) == null ? void 0 : z.category) == null : kn(o.menu) && a.value.category == null;
3931
- }), U = V(() => i.itemAttributeSettings.value.length > 0 && !m.value), R = q(
3936
+ }), U = V(() => i.itemAttributeSettings.value.length > 0 && !m.value), R = H(
3932
3937
  a.value.category != null || !!a.value.code || !!a.value.orderFrom
3933
3938
  );
3934
3939
  function O(z) {
@@ -3947,7 +3952,7 @@ const Ra = {
3947
3952
  for (const [de, se] of Object.entries(Y.customAttributes || {}))
3948
3953
  typeof se == "string" && se && !((ae = z[de]) != null && ae.includes(se)) && (z[de] = [...z[de] || [], se]);
3949
3954
  }), z;
3950
- }), x = q(!!a.value.price || !!a.value.minPrice || !!a.value.costing);
3955
+ }), x = H(!!a.value.price || !!a.value.minPrice || !!a.value.costing);
3951
3956
  function k(z) {
3952
3957
  z || (a.value = {
3953
3958
  ...a.value,
@@ -3956,7 +3961,7 @@ const Ra = {
3956
3961
  price: void 0
3957
3962
  }, d());
3958
3963
  }
3959
- const l = q(
3964
+ const l = H(
3960
3965
  (((re = a.value.variant) == null ? void 0 : re.variantCombinations) || []).some(
3961
3966
  (z) => !!z.price || !!z.orderFrom || !!z.code
3962
3967
  )
@@ -3976,7 +3981,7 @@ const Ra = {
3976
3981
  }
3977
3982
  }, d());
3978
3983
  }
3979
- const y = q(
3984
+ const y = H(
3980
3985
  !!a.value.inventoryBindings || (((ne = a.value.variant) == null ? void 0 : ne.variantCombinations) || []).some((z) => !!z.inventoryBindings) || !1
3981
3986
  );
3982
3987
  function f(z) {
@@ -3993,7 +3998,7 @@ const Ra = {
3993
3998
  } : void 0
3994
3999
  }, d());
3995
4000
  }
3996
- const c = q(
4001
+ const c = H(
3997
4002
  a.value.takeawayUsed != null || (((ge = a.value.variant) == null ? void 0 : ge.variantCombinations) || []).some((z) => z.takeawayUsed != null) || !1
3998
4003
  );
3999
4004
  function $(z) {
@@ -4010,11 +4015,11 @@ const Ra = {
4010
4015
  }
4011
4016
  }, d());
4012
4017
  }
4013
- const G = q(!!a.value.print);
4014
- function H(z) {
4018
+ const G = H(!!a.value.print);
4019
+ function X(z) {
4015
4020
  z || (a.value = { ...a.value, print: void 0 }, d());
4016
4021
  }
4017
- const ee = q(
4022
+ const ee = H(
4018
4023
  !!((Ee = a.value.groups) != null && Ee.length) != null || (((Ve = a.value.variant) == null ? void 0 : Ve.variantCombinations) || []).some((z) => {
4019
4024
  var Y;
4020
4025
  return !!((Y = z.groups) != null && Y.length);
@@ -4067,7 +4072,7 @@ const Ra = {
4067
4072
  function d() {
4068
4073
  s("update:editingState", Ie.cloneDeep(a.value));
4069
4074
  }
4070
- const D = q(null);
4075
+ const D = H(null);
4071
4076
  function N() {
4072
4077
  return !Ie.isEqual(a.value, o.initialForm);
4073
4078
  }
@@ -4090,11 +4095,11 @@ const Ra = {
4090
4095
  } else
4091
4096
  console.warn(`Element with id ${z} not found`);
4092
4097
  }
4093
- function X(z) {
4098
+ function q(z) {
4094
4099
  z.type === "general" ? K(Se.GENERAL) : z.type === "price" ? K(Se.PRICE, !0) : z.type === "variant" ? K(mt(Se.VARIANT, z.id), !0) : z.type === "group" && K(mt(Se.GROUP, z.id), !0);
4095
4100
  }
4096
4101
  return Dn(() => {
4097
- o.focused && X(o.focused);
4102
+ o.focused && q(o.focused);
4098
4103
  }), r({
4099
4104
  validate: W,
4100
4105
  getData: L,
@@ -4186,7 +4191,7 @@ const Ra = {
4186
4191
  toggle: G.value,
4187
4192
  "onUpdate:toggle": [
4188
4193
  Y[6] || (Y[6] = (te) => G.value = te),
4189
- Y[7] || (Y[7] = (te) => H(te))
4194
+ Y[7] || (Y[7] = (te) => X(te))
4190
4195
  ],
4191
4196
  description: "Use a different print setting",
4192
4197
  disabled: "",
@@ -4312,7 +4317,7 @@ const Ra = {
4312
4317
  }
4313
4318
  });
4314
4319
  function al(t) {
4315
- const { storageKey: r, defaultWidth: e, minWidth: o, maxWidth: s } = t, i = Wo(r, e), p = q(!1), h = q(null);
4320
+ const { storageKey: r, defaultWidth: e, minWidth: o, maxWidth: s } = t, i = Wo(r, e), p = H(!1), h = H(null);
4316
4321
  function b(v) {
4317
4322
  v.preventDefault(), p.value = !0, document.addEventListener("mousemove", _), document.addEventListener("mouseup", w), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
4318
4323
  }
@@ -4576,8 +4581,8 @@ function vl() {
4576
4581
  return a.map(w);
4577
4582
  }
4578
4583
  async function g({ eventEmitter: a }) {
4579
- var H, ee, ie, pe;
4580
- const I = r.state.menu, S = !r.state.currentCatalogId, F = !r.state.currentSchedulerId, E = (((ee = (H = r.currentCatalog) == null ? void 0 : H.linkItemRules) == null ? void 0 : ee.length) ?? 0) > 0, m = ho(), T = r.mergedMenu;
4584
+ var X, ee, ie, pe;
4585
+ const I = r.state.menu, S = !r.state.currentCatalogId, F = !r.state.currentSchedulerId, E = (((ee = (X = r.currentCatalog) == null ? void 0 : X.linkItemRules) == null ? void 0 : ee.length) ?? 0) > 0, m = ho(), T = r.mergedMenu;
4581
4586
  st.clear(), ut.clear();
4582
4587
  for (const d of I.modules.item)
4583
4588
  st.set(d._id, d);
@@ -4601,7 +4606,7 @@ function vl() {
4601
4606
  );
4602
4607
  if (!W)
4603
4608
  throw new Error(`Item ${d._id} has unknown group ${N._id}`);
4604
- return (L = W.items) == null ? void 0 : L.map((K, X) => {
4609
+ return (L = W.items) == null ? void 0 : L.map((K, q) => {
4605
4610
  var Te, te;
4606
4611
  const re = !!K.combinationKey, ne = (Te = N.items) == null ? void 0 : Te.find(
4607
4612
  (ce) => ce._id === K._id && ce.combinationKey === K.combinationKey
@@ -4656,7 +4661,7 @@ function vl() {
4656
4661
  variant: de ? Je.PRIMARY : Je.PLAIN
4657
4662
  };
4658
4663
  return {
4659
- id: `item-${d._id}-variant-${D == null ? void 0 : D.combinationKey}-group-${N._id}-${K._id}-${K.combinationKey}-${X}`,
4664
+ id: `item-${d._id}-variant-${D == null ? void 0 : D.combinationKey}-group-${N._id}-${K._id}-${K.combinationKey}-${q}`,
4660
4665
  icon: K.combinationKey ? $e.VARIANT : $e.ITEM,
4661
4666
  label: Yt(z(), Ve()),
4662
4667
  rightLabel: se,
@@ -4678,15 +4683,15 @@ function vl() {
4678
4683
  re.push(...d.groups || []);
4679
4684
  return re;
4680
4685
  }
4681
- const K = L(), X = bt(
4686
+ const K = L(), q = bt(
4682
4687
  K.map((re) => {
4683
4688
  const ne = ut.get(re._id);
4684
4689
  return { ...re, position: ne == null ? void 0 : ne.position, name: (ne == null ? void 0 : ne.name) || "" };
4685
4690
  }),
4686
4691
  (re) => re.name
4687
4692
  );
4688
- if (X)
4689
- for (const re of X) {
4693
+ if (q)
4694
+ for (const re of q) {
4690
4695
  const ne = ut.get(re._id);
4691
4696
  if (!ne)
4692
4697
  throw new Error(`Item ${d._id} has unknown group ${re._id}`);
@@ -4717,7 +4722,7 @@ function vl() {
4717
4722
  D.push(...K);
4718
4723
  }
4719
4724
  if (W) {
4720
- const K = (ne, ge) => `item-${ne}-variant-${ge}`, X = $t(
4725
+ const K = (ne, ge) => `item-${ne}-variant-${ge}`, q = $t(
4721
4726
  I.modules.variant,
4722
4727
  d.variant.variantGroupIds
4723
4728
  ), re = d.variant.variantCombinations.map(
@@ -4729,7 +4734,7 @@ function vl() {
4729
4734
  id: K(d._id, ne.combinationKey),
4730
4735
  icon: $e.VARIANT,
4731
4736
  label: Yt(
4732
- ar(X, ne.combinationKey),
4737
+ ar(q, ne.combinationKey),
4733
4738
  ne.code
4734
4739
  ),
4735
4740
  children: M(d, ne),
@@ -4825,14 +4830,14 @@ function vl() {
4825
4830
  const c = (d, D) => `item-${D ?? "addon"}-${d}`;
4826
4831
  for (const d of T.modules.item)
4827
4832
  Lt(d).forEach(({ _id: N }) => {
4828
- var L, K, X, re, ne, ge, Ee, Ve;
4833
+ var L, K, q, re, ne, ge, Ee, Ve;
4829
4834
  const W = N ? l.find((z) => z.id === k(N)) : f;
4830
4835
  if (W) {
4831
4836
  const z = _t(
4832
4837
  ((L = d.groups) == null ? void 0 : L.length) ?? 0,
4833
4838
  t("menu.tree_editor.labels.groups", { count: (K = d.groups) == null ? void 0 : K.length })
4834
4839
  ), Y = _t(
4835
- ((re = (X = d.variant) == null ? void 0 : X.variantCombinations) == null ? void 0 : re.length) ?? 0,
4840
+ ((re = (q = d.variant) == null ? void 0 : q.variantCombinations) == null ? void 0 : re.length) ?? 0,
4836
4841
  t("menu.tree_editor.labels.variants", {
4837
4842
  count: (ge = (ne = d.variant) == null ? void 0 : ne.variantCombinations) == null ? void 0 : ge.length
4838
4843
  })
@@ -4998,8 +5003,8 @@ function bl() {
4998
5003
  const f = I(x), c = I(k);
4999
5004
  return (f == null ? void 0 : f.id) === (c == null ? void 0 : c.id) ? !0 : !((f == null ? void 0 : f.id) !== (c == null ? void 0 : c.id) && a(c).some(
5000
5005
  ($) => {
5001
- var G, H;
5002
- return ((G = $.meta) == null ? void 0 : G.rawId) === ((H = x.meta) == null ? void 0 : H.rawId);
5006
+ var G, X;
5007
+ return ((G = $.meta) == null ? void 0 : G.rawId) === ((X = x.meta) == null ? void 0 : X.rawId);
5003
5008
  }
5004
5009
  ));
5005
5010
  }
@@ -5021,8 +5026,8 @@ function bl() {
5021
5026
  let f = u.findIndex((G) => G.id === k.id);
5022
5027
  l === "after" && f++;
5023
5028
  const c = u.map((G) => {
5024
- var H;
5025
- return (H = G.meta) == null ? void 0 : H.rawId;
5029
+ var X;
5030
+ return (X = G.meta) == null ? void 0 : X.rawId;
5026
5031
  }).filter(Boolean), $ = wt(c, y, f);
5027
5032
  await e.rearrange($);
5028
5033
  }
@@ -5048,7 +5053,7 @@ function bl() {
5048
5053
  }
5049
5054
  async function T(x, k, l, u) {
5050
5055
  var G;
5051
- const y = w(k), f = ((G = k.children) == null ? void 0 : G.findIndex((H) => H.id === x.id)) ?? -1;
5056
+ const y = w(k), f = ((G = k.children) == null ? void 0 : G.findIndex((X) => X.id === x.id)) ?? -1;
5052
5057
  if (f === -1) throw new Error("Source index not found");
5053
5058
  const c = wt(y, f, l), $ = _(k);
5054
5059
  await r.rearrangeWithSubCategory(c, u, $);
@@ -5115,8 +5120,8 @@ function bl() {
5115
5120
  if (f === -1 || c === -1)
5116
5121
  throw new Error("Source or target index not found");
5117
5122
  l === "after" && c++;
5118
- const $ = wt(y, f, c), G = b(u), H = _(u);
5119
- await r.rearrangeWithSubCategory($, G, H);
5123
+ const $ = wt(y, f, c), G = b(u), X = _(u);
5124
+ await r.rearrangeWithSubCategory($, G, X);
5120
5125
  }
5121
5126
  async function M(x) {
5122
5127
  const k = o.getNodeById(x.draggedNodeId), l = o.getNodeById(x.targetNodeId);
@@ -5187,7 +5192,7 @@ const St = /* @__PURE__ */ le({
5187
5192
  }
5188
5193
  }), Tn = 300;
5189
5194
  function _l(t) {
5190
- const { itemHeight: r, emit: e, getFlattenedItems: o, getContainerRef: s, canDropFn: i } = t, p = q(!1), h = q(null), b = q(null), _ = q(null), w = q(0), v = q({ x: 0, y: 0 }), g = q(/* @__PURE__ */ new Map());
5195
+ const { itemHeight: r, emit: e, getFlattenedItems: o, getContainerRef: s, canDropFn: i } = t, p = H(!1), h = H(null), b = H(null), _ = H(null), w = H(0), v = H({ x: 0, y: 0 }), g = H(/* @__PURE__ */ new Map());
5191
5196
  function a(E, m) {
5192
5197
  m.button === 0 && (v.value = { x: m.clientX, y: m.clientY }, h.value = E, w.value = m.clientY, g.value = or(o()), setTimeout(() => {
5193
5198
  h.value === E && (p.value = !0, v.value = { x: m.clientX, y: m.clientY }, e("updateDragState", E, null, null), document.addEventListener("mousemove", I), document.addEventListener("mouseup", S));
@@ -5467,7 +5472,7 @@ const hl = { key: 0 }, wl = ["innerHTML"], Cl = /* @__PURE__ */ le({
5467
5472
  }
5468
5473
  return M(s.nodes), O;
5469
5474
  });
5470
- q(null);
5475
+ H(null);
5471
5476
  const {
5472
5477
  list: _,
5473
5478
  scrollTo: w,
@@ -5786,7 +5791,7 @@ const hl = { key: 0 }, wl = ["innerHTML"], Cl = /* @__PURE__ */ le({
5786
5791
  },
5787
5792
  emits: ["tree-event"],
5788
5793
  setup(t, { emit: r }) {
5789
- const e = r, o = q({
5794
+ const e = r, o = H({
5790
5795
  catalogId: null,
5791
5796
  schedulerId: null,
5792
5797
  searchKey: ""
@@ -5831,7 +5836,7 @@ const hl = { key: 0 }, wl = ["innerHTML"], Cl = /* @__PURE__ */ le({
5831
5836
  }), Ot(() => {
5832
5837
  o.$dispose(), s.setExpandedNodeIds([]), s.setSelectedNodeId(null);
5833
5838
  });
5834
- const i = q(null), { currentItemId: p, initialForm: h, itemFormKey: b } = sr(o), { saveItemFormEditingStateDebounced: _ } = rr(i, o), w = q(null);
5839
+ const i = H(null), { currentItemId: p, initialForm: h, itemFormKey: b } = sr(o), { saveItemFormEditingStateDebounced: _ } = rr(i, o), w = H(null);
5835
5840
  async function v(a) {
5836
5841
  if (a.type === Ce.SELECT_ITEM || a.type === Ce.SELECT_PRICE || a.type === Ce.SELECT_GROUP || a.type === Ce.SELECT_VARIANT) {
5837
5842
  if (!g(a.itemId))
@@ -5910,7 +5915,7 @@ const hl = { key: 0 }, wl = ["innerHTML"], Cl = /* @__PURE__ */ le({
5910
5915
  p("update:show", !1);
5911
5916
  }, b = ft(), _ = ue();
5912
5917
  _.selectCatalog(null), _.selectScheduler(null);
5913
- const w = q(!1), v = () => {
5918
+ const w = H(!1), v = () => {
5914
5919
  s(
5915
5920
  async () => {
5916
5921
  Cn(), await tt();