@feedmepos/mf-menu 0.31.47-prod → 0.31.48-prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/{App-8_Vr3J1_.js → App-D-dcqNRb.js} +8 -8
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-BXLO4wRK.js → ApplyProduct.vue_vue_type_script_setup_true_lang-na_OOlYX.js} +20 -20
  3. package/dist/{Catalog-CtxYDf8U.js → Catalog-BT_NvH4H.js} +6 -6
  4. package/dist/{Category-eJPVt-__.js → Category-CIlVNPov.js} +4 -4
  5. package/dist/{Category-t5USmy5W.js → Category-bsYxspvu.js} +6 -6
  6. package/dist/{CookingGuide-C8WASY_U.js → CookingGuide-C7IxQzTM.js} +4 -4
  7. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-gkkLbJmk.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CJnE543q.js} +1 -1
  8. package/dist/{Group-CvCCFBQd.js → Group-B5882UFx.js} +1 -1
  9. package/dist/{Group-DHpRTZYX.js → Group-CuQ0gDgC.js} +3 -3
  10. package/dist/{Group.vue_vue_type_script_setup_true_lang-IAO1fyPW.js → Group.vue_vue_type_script_setup_true_lang-Btk8J3Tp.js} +7 -7
  11. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CzSyXGSd.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-yIXsPtY4.js} +9 -9
  12. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-BsQYL-bI.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-DFSHCb9I.js} +7 -7
  13. package/dist/{Ingredient-CQlggbtt.js → Ingredient-24hSAj8Z.js} +3 -3
  14. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-BbWRtnQ8.js → InventoryBinding.vue_vue_type_script_setup_true_lang-BVcdOrDO.js} +2 -2
  15. package/dist/{LinkProductSideSheet-qWebf6C7.js → LinkProductSideSheet-CD9mIEpc.js} +3 -3
  16. package/dist/{MenuSetting-Cr0V03uO.js → MenuSetting-CVySuMK8.js} +5 -5
  17. package/dist/{PrintRoute-Be-cJqee.js → PrintRoute-CT0-6o2w.js} +4 -4
  18. package/dist/{Product-D9PJsQWT.js → Product-C2CtWFM5.js} +1 -1
  19. package/dist/{Product.vue_vue_type_script_setup_true_lang-Caq2QMeN.js → Product.vue_vue_type_script_setup_true_lang-Ts0KnCTU.js} +499 -488
  20. package/dist/{ProductInternalTools-Z6roJxjy.js → ProductInternalTools-CyKeO24R.js} +32 -31
  21. package/dist/{Products-VEZuFeYe.js → Products-wRIs1LNY.js} +11 -11
  22. package/dist/{Publish-VtjhyJMe.js → Publish-BKRVvye3.js} +16 -16
  23. package/dist/{Recipe-6lpED5Jo.js → Recipe-BQvRhIeZ.js} +4 -4
  24. package/dist/{Scheduler-C8ADLbDO.js → Scheduler-CaQu66-9.js} +3 -3
  25. package/dist/{ServingSequence-blQqZaDi.js → ServingSequence-BlUi0Hzb.js} +3 -3
  26. package/dist/{Setting-w3lilAhR.js → Setting-DFsZYxSB.js} +5 -5
  27. package/dist/{Subcategory-CKtwfQrk.js → Subcategory-BYnb9L7M.js} +4 -4
  28. package/dist/{Takeaway-PatPZog3.js → Takeaway-BQINJijW.js} +4 -4
  29. package/dist/{Takeaway-BIs7qdXT.js → Takeaway-DYiN0Yws.js} +1 -1
  30. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-DQJ1E-nv.js → Takeaway.vue_vue_type_script_setup_true_lang-CnMEeZrd.js} +5 -5
  31. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-D3szwli1.js → Thumbnail.vue_vue_type_script_setup_true_lang-Bp40RcvB.js} +4 -4
  32. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CzK37ydr.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-jzJLp-Ac.js} +15 -15
  33. package/dist/{Unit-D9K8aQkO.js → Unit-rT9SjnsI.js} +2 -2
  34. package/dist/{Variant-Mlc7mOFQ.js → Variant-B7aqcbez.js} +3 -3
  35. package/dist/{_id_-DSnUrneJ.js → _id_-DY1Fitul.js} +10 -10
  36. package/dist/{app-CFcEoZ6g.js → app-BO6bn7uh.js} +26 -26
  37. package/dist/{app-DAW9YGKu.js → app-RULuHy55.js} +1 -1
  38. package/dist/app.js +1 -1
  39. package/dist/apps/mf-menu/src/components/feature/TreeEditor/store/menuV2.d.ts +1 -1
  40. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  41. package/dist/assets/{linked-status-CcbwR1Re.js → linked-status-DRWIBDK1.js} +2 -2
  42. package/dist/assets/{override-menu-dSXkmmTm.js → override-menu-BLjzPUsy.js} +2 -2
  43. package/dist/assets/{validate-menu-8ibnWZpF.js → validate-menu-5sybvnwS.js} +2 -2
  44. package/dist/{catalog-CyBWoMx9.js → catalog-bwlWW8PZ.js} +4 -4
  45. package/dist/{catalogSetting-BEuK6iSU.js → catalogSetting-DzX172wP.js} +1 -1
  46. package/dist/{category-CH86FpDF.js → category-B28CLR_r.js} +1 -1
  47. package/dist/{currency-B7e3Bn-5.js → currency-SjGU_s1p.js} +1 -1
  48. package/dist/{customAttributes-C5SxhXst.js → customAttributes-D8y8beXk.js} +1 -1
  49. package/dist/{dayjs.min-0wOo37zY.js → dayjs.min-CUujDjy2.js} +1 -1
  50. package/dist/{index-BQRQtKtb.js → index-BjlPBJit.js} +4 -4
  51. package/dist/{index-wQFnsXZM.js → index-Dc0tIOma.js} +1 -1
  52. package/dist/{index-C4wpev23.js → index-KiKL6590.js} +1 -1
  53. package/dist/{index-CcWwRY7j.js → index-TqIfnnRh.js} +3 -3
  54. package/dist/{item-YOVwd-Jf.js → item-Bk4ePGsA.js} +25 -25
  55. package/dist/{jszip.min-DdVRNxeR.js → jszip.min-Cb0oLCRU.js} +2 -2
  56. package/dist/{menu-DPDGA5BU.js → menu-CKvTLOA7.js} +2613 -2659
  57. package/dist/{menu-5V5zXzja.js → menu-J976EXhb.js} +1 -1
  58. package/dist/{menuV2-DrMICNsd.js → menuV2-BWSBAnVp.js} +53 -53
  59. package/dist/packages/shared/src/composable/filterSelector.d.ts +1 -1
  60. package/dist/{priceTier-ZWgpadCg.js → priceTier-BpWKl-29.js} +1 -1
  61. package/dist/{scheduler-BhONdYht.js → scheduler-CnU_uh6T.js} +4 -4
  62. package/dist/{subcategory-BWp35Kp3.js → subcategory-Bn1Jr1uy.js} +2 -2
  63. package/dist/{toExcel-D0K9W29E.js → toExcel-DxAn19PY.js} +2 -2
  64. package/dist/tooltip-CQW9YRO5.js +60 -0
  65. package/dist/{unit-DkmcIwvs.js → unit-BzHG0aHZ.js} +2 -2
  66. package/package.json +2 -2
  67. package/dist/tooltip-B5BiPMx9.js +0 -32
@@ -1,38 +1,48 @@
1
- import { ref as V, computed as h, defineComponent as K, resolveComponent as z, createBlock as I, openBlock as m, withCtx as T, createElementVNode as g, createVNode as d, unref as a, createElementBlock as C, Fragment as pe, renderList as we, createCommentVNode as U, normalizeClass as ve, toDisplayString as B, withModifiers as fe, mergeModels as Je, useModel as Xe, renderSlot as _e, watch as de, createTextVNode as et, watchEffect as tt, nextTick as Ae, resolveDynamicComponent as lt, onMounted as at, h as L, isRef as je, normalizeStyle as ft } from "vue";
2
- import { u as Ve, Q as Ce, B as me, H as Re, I as ge, U as gt, aa as bt, ab as _t, ac as Pe, ad as yt, P as ht, ae as Ee } from "./menu-DPDGA5BU.js";
3
- import { useI18n as Ie, useCoreStore as Oe, useCustomAttributes as xt } from "@feedmepos/mf-common";
4
- import { u as Se } from "./menu-5V5zXzja.js";
1
+ import { ref as F, computed as h, defineComponent as N, resolveComponent as O, createBlock as I, openBlock as m, withCtx as T, createElementVNode as g, createVNode as d, unref as a, createElementBlock as k, Fragment as pe, renderList as we, createCommentVNode as U, normalizeClass as ve, toDisplayString as K, withModifiers as fe, mergeModels as Je, useModel as Xe, renderSlot as _e, watch as de, createTextVNode as et, watchEffect as tt, nextTick as Ae, resolveDynamicComponent as lt, onMounted as at, h as q, isRef as je, normalizeStyle as ft } from "vue";
2
+ import { u as Fe, Q as Ce, B as me, H as Re, I as ge, U as gt, a9 as bt, aa as _t, ab as Pe, ac as yt, P as ht, ad as Ee } from "./menu-CKvTLOA7.js";
3
+ import { useI18n as Ie, useCoreStore as ze, useCustomAttributes as xt } from "@feedmepos/mf-common";
4
+ import { u as Se } from "./menu-J976EXhb.js";
5
5
  import { _ as be } from "./index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js";
6
- import { L as Ge } from "./LinkProductSideSheet-qWebf6C7.js";
7
- import { r as Ct, _ as Le } from "./index-C4wpev23.js";
8
- import { _ as Ue, a as qe } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-gkkLbJmk.js";
9
- import { _ as Me, u as kt } from "./Thumbnail.vue_vue_type_script_setup_true_lang-D3szwli1.js";
10
- import { f as wt, o as St, a as Ft, m as Vt } from "./menuV2-DrMICNsd.js";
11
- import { u as ot, C as It } from "./item-YOVwd-Jf.js";
6
+ import { L as Ge } from "./LinkProductSideSheet-CD9mIEpc.js";
7
+ import { r as Ct, _ as Le } from "./index-KiKL6590.js";
8
+ import { _ as Ue, a as qe } from "./CustomAttributeChip.vue_vue_type_script_setup_true_lang-CJnE543q.js";
9
+ import { _ as Me, u as kt } from "./Thumbnail.vue_vue_type_script_setup_true_lang-Bp40RcvB.js";
10
+ import { f as wt, o as St, a as Vt, m as Ft } from "./menuV2-BWSBAnVp.js";
11
+ import { u as ot, C as It } from "./item-Bk4ePGsA.js";
12
12
  import { b as We, H as $t } from "./app-CiBqmBzO.js";
13
- import { useBreakpoints as rt, components as te, useDialog as Tt, FmButtonColorThemeVariant as q, FmButtonVariant as ee } from "@feedmepos/ui-library";
14
- import { F as Pt } from "./index-wQFnsXZM.js";
15
- import { _ as ze, a as At } from "./app-CFcEoZ6g.js";
13
+ import { useBreakpoints as rt, components as te, useDialog as Tt, FmButtonColorThemeVariant as W, FmButtonVariant as ee } from "@feedmepos/ui-library";
14
+ import { F as Pt } from "./index-Dc0tIOma.js";
15
+ import { _ as De, a as At } from "./app-BO6bn7uh.js";
16
16
  import { _ as ke } from "./TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js";
17
- import { _ as Rt } from "./index-BQRQtKtb.js";
18
- import { r as Ut, _ as Mt } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-BsQYL-bI.js";
19
- import { c as Ot } from "./check-C9mY6LiX.js";
20
- import { f as zt } from "./currency-B7e3Bn-5.js";
21
- import { w as Dt } from "./tooltip-B5BiPMx9.js";
22
- function Bt(k, e) {
23
- const n = V(!0), i = h(() => {
24
- var s, f;
25
- return !n.value && (!e.value || ((s = e.value) == null ? void 0 : s.length) === ((f = k.value) == null ? void 0 : f.length));
26
- }), l = h(() => {
27
- var s, f, p, b;
28
- return !!((s = e.value) != null && s.length && ((f = e.value) == null ? void 0 : f.length) > 0 && ((p = e.value) == null ? void 0 : p.length) < ((b = k.value) == null ? void 0 : b.length));
17
+ import { _ as Rt } from "./index-BjlPBJit.js";
18
+ import { r as Ut, _ as Mt } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-DFSHCb9I.js";
19
+ import { c as zt } from "./check-C9mY6LiX.js";
20
+ import { f as Dt } from "./currency-SjGU_s1p.js";
21
+ import { w as Ot } from "./tooltip-CQW9YRO5.js";
22
+ function Bt(C, e, i = C) {
23
+ const n = F(!0), t = h(() => {
24
+ if (!n.value && !e.value)
25
+ return !0;
26
+ if (e.value && e.value.length > 0) {
27
+ const f = i.value.map((s) => s.value);
28
+ return e.value.length === f.length && e.value.every((s) => f.includes(s));
29
+ }
30
+ return !1;
31
+ }), u = h(() => {
32
+ var f, s, b, y;
33
+ return !!((f = e.value) != null && f.length && ((s = e.value) == null ? void 0 : s.length) > 0 && ((b = e.value) == null ? void 0 : b.length) < ((y = C.value) == null ? void 0 : y.length));
29
34
  });
30
- return { allCleared: n, allSelected: i, indeterminate: l, toggleAll: () => {
31
- e.value = void 0, n.value = !n.value;
32
- }, toggleOption: (s) => {
33
- var p, b, y;
34
- let f;
35
- e.value === void 0 && n.value ? f = [s] : e.value === void 0 && !n.value ? f = (p = k.value.map((w) => w.value)) == null ? void 0 : p.filter((w) => w !== s) : (b = e.value) != null && b.includes(s) ? f = (y = e.value) == null ? void 0 : y.filter((w) => w !== s) : f = [...e.value || [], s], f.length === 0 ? (e.value = void 0, n.value = !0) : f.length === k.value.length ? (e.value = void 0, n.value = !1) : e.value = f;
35
+ return { allCleared: n, allSelected: t, indeterminate: u, toggleAll: () => {
36
+ if (t.value) {
37
+ e.value = void 0, n.value = !0;
38
+ return;
39
+ }
40
+ const f = i.value.map((s) => s.value);
41
+ f.length === C.value.length ? (e.value = void 0, n.value = !1) : (e.value = f, n.value = !1);
42
+ }, toggleOption: (f) => {
43
+ var b, y, w;
44
+ let s;
45
+ e.value === void 0 && n.value ? s = [f] : e.value === void 0 && !n.value ? s = (b = C.value.map((z) => z.value)) == null ? void 0 : b.filter((z) => z !== f) : (y = e.value) != null && y.includes(f) ? s = (w = e.value) == null ? void 0 : w.filter((z) => z !== f) : s = [...e.value || [], f], s.length === 0 ? (e.value = void 0, n.value = !0) : s.length === C.value.length ? (e.value = void 0, n.value = !1) : e.value = s;
36
46
  } };
37
47
  }
38
48
  const Kt = { class: "inline-flex items-center" }, Nt = {
@@ -41,31 +51,32 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
41
51
  "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap",
42
52
  "text-fm-color-neutral-gray-400"
43
53
  ])
44
- }, jt = { class: "p-4" }, Et = { class: "flex-1 overflow-y-auto min-h-0" }, He = /* @__PURE__ */ K({
54
+ }, jt = { class: "p-4" }, Et = { class: "flex-1 overflow-y-auto min-h-0" }, He = /* @__PURE__ */ N({
45
55
  __name: "CategorySelector",
46
56
  emits: ["toggleAttributeFilter"],
47
- setup(k, { emit: e }) {
48
- const n = e, i = Ve(), { categories: l, selectedCategories: u } = Se(), t = h(() => i.state.currentCategoryIds), s = h(
49
- () => l.value.map((D) => ({ label: D.name, value: D.id }))
50
- ), f = h(() => s.value.filter(
51
- (D) => D.label.toLowerCase().includes(y.value.toLowerCase())
52
- )), { t: p } = Ie(), b = h(() => {
53
- var D, O, H;
54
- return l.value.length === ((D = u.value) == null ? void 0 : D.length) ? p("menu.category.selector.all") : ((O = u.value) == null ? void 0 : O.length) === 1 ? u.value[0].name : `${(H = u.value) == null ? void 0 : H.length}`;
55
- }), y = V(""), w = h({
56
- get: () => t.value,
57
- set: (D) => {
58
- i.selectCategory(D);
57
+ setup(C, { emit: e }) {
58
+ const i = e, n = Fe(), { categories: t, selectedCategories: u } = Se(), l = h(() => n.state.currentCategoryIds), v = h(
59
+ () => t.value.map((B) => ({ label: B.name, value: B.id }))
60
+ ), f = h(() => v.value.filter(
61
+ (B) => B.label.toLowerCase().includes(y.value.toLowerCase())
62
+ )), { t: s } = Ie(), b = h(() => {
63
+ var B, D, H;
64
+ return t.value.length === ((B = u.value) == null ? void 0 : B.length) ? s("menu.category.selector.all") : ((D = u.value) == null ? void 0 : D.length) === 1 ? u.value[0].name : `${(H = u.value) == null ? void 0 : H.length}`;
65
+ }), y = F(""), w = h({
66
+ get: () => l.value,
67
+ set: (B) => {
68
+ n.selectCategory(B);
59
69
  }
60
- }), { allSelected: W, toggleAll: Y, toggleOption: S, indeterminate: oe } = Bt(
61
- s,
62
- w
63
- ), Z = Oe(), re = h(() => Z.itemAttributeSettings.value.length > 0);
64
- function E() {
65
- n("toggleAttributeFilter");
70
+ }), { allSelected: z, toggleAll: Y, toggleOption: S, indeterminate: oe } = Bt(
71
+ v,
72
+ w,
73
+ f
74
+ ), Z = ze(), re = h(() => Z.itemAttributeSettings.value.length > 0);
75
+ function G() {
76
+ i("toggleAttributeFilter");
66
77
  }
67
- return (D, O) => {
68
- const H = z("FmIcon"), J = z("FmChip"), ne = z("FmSearch"), Q = z("FmMenuItem"), se = z("FmMenu");
78
+ return (B, D) => {
79
+ const H = O("FmIcon"), J = O("FmChip"), ne = O("FmSearch"), Q = O("FmMenuItem"), se = O("FmMenu");
69
80
  return m(), I(se, {
70
81
  "close-on-click": !1,
71
82
  width: 220
@@ -74,23 +85,23 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
74
85
  g("div", Kt, [
75
86
  d(J, null, {
76
87
  default: T(() => [
77
- b.value ? (m(), C("div", Nt, B(a(p)("menu.category.selector.title", { label: b.value })), 1)) : U("", !0),
88
+ b.value ? (m(), k("div", Nt, K(a(s)("menu.category.selector.title", { label: b.value })), 1)) : U("", !0),
78
89
  d(H, {
79
90
  color: "neutral-gray-400",
80
91
  name: "expand_more",
81
92
  size: "sm"
82
93
  }),
83
- re.value ? (m(), C("div", {
94
+ re.value ? (m(), k("div", {
84
95
  key: 1,
85
96
  class: "pl-8 flex items-center justify-center border-l border-fm-color-neutral-gray-200",
86
- onClick: fe(E, ["stop"])
97
+ onClick: fe(G, ["stop"])
87
98
  }, [
88
99
  d(H, {
89
100
  name: "filter_alt",
90
101
  outline: "",
91
102
  color: "neutral-gray-400",
92
103
  size: "sm",
93
- onClick: O[0] || (O[0] = fe(() => {
104
+ onClick: D[0] || (D[0] = fe(() => {
94
105
  }, ["prevent"]))
95
106
  })
96
107
  ])) : U("", !0)
@@ -104,25 +115,25 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
104
115
  d(ne, {
105
116
  autofocus: "",
106
117
  modelValue: y.value,
107
- "onUpdate:modelValue": O[1] || (O[1] = (R) => y.value = R),
108
- placeholder: a(p)("menu.common.actions.search")
118
+ "onUpdate:modelValue": D[1] || (D[1] = (R) => y.value = R),
119
+ placeholder: a(s)("menu.common.actions.search")
109
120
  }, null, 8, ["modelValue", "placeholder"])
110
121
  ]),
111
122
  g("div", Et, [
112
123
  d(Q, {
113
124
  label: "All",
114
125
  "has-checkbox": "",
115
- "model-value": a(W),
126
+ "model-value": a(z),
116
127
  indeterminate: a(oe),
117
128
  onClick: a(Y)
118
129
  }, null, 8, ["model-value", "indeterminate", "onClick"]),
119
- (m(!0), C(pe, null, we(f.value, (R) => {
130
+ (m(!0), k(pe, null, we(f.value, (R) => {
120
131
  var $;
121
132
  return m(), I(Q, {
122
133
  key: R.value || "",
123
134
  label: R.label,
124
135
  "has-checkbox": "",
125
- "model-value": a(W) || (($ = w.value) == null ? void 0 : $.includes(R.value)),
136
+ "model-value": a(z) || (($ = w.value) == null ? void 0 : $.includes(R.value)),
126
137
  onClick: (P) => a(S)(R.value)
127
138
  }, null, 8, ["label", "model-value", "onClick"]);
128
139
  }), 128))
@@ -138,33 +149,33 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
138
149
  }, Qt = { key: 0 }, Yt = {
139
150
  key: 1,
140
151
  class: "inline-block w-8"
141
- }, Zt = { key: 0 }, Jt = { key: 1 }, Qe = /* @__PURE__ */ K({
152
+ }, Zt = { key: 0 }, Jt = { key: 1 }, Qe = /* @__PURE__ */ N({
142
153
  __name: "CategoriesChip",
143
154
  props: {
144
155
  categories: { default: () => [] },
145
156
  ellipsis: { type: Boolean, default: !0 }
146
157
  },
147
- setup(k) {
148
- const e = k, { t: n } = Ie(), i = rt(), l = h(() => i.breakpoints.value.xs), u = h(() => e.ellipsis ? l.value ? 1 : 2 : 1 / 0), t = h(() => e.categories.length <= u.value ? e.categories : e.categories.slice(0, u.value)), s = V(!0), f = h(() => {
149
- if (s.value) {
150
- const b = t.value.join(", ");
158
+ setup(C) {
159
+ const e = C, { t: i } = Ie(), n = rt(), t = h(() => n.breakpoints.value.xs), u = h(() => e.ellipsis ? t.value ? 1 : 2 : 1 / 0), l = h(() => e.categories.length <= u.value ? e.categories : e.categories.slice(0, u.value)), v = F(!0), f = h(() => {
160
+ if (v.value) {
161
+ const b = l.value.join(", ");
151
162
  return b.length > 20 ? b.slice(0, 20) + "..." : b;
152
163
  }
153
164
  return e.categories.join(", ");
154
165
  });
155
- return (p, b) => {
156
- const y = z("FmTooltip");
157
- return l.value ? (m(), C(pe, { key: 1 }, [
158
- p.categories.length > 0 ? (m(), C("p", Ht, [
159
- g("span", null, B(a(n)("menu.product.table.columns.category")) + ": ", 1),
160
- g("span", null, B(f.value), 1),
161
- s.value ? (m(), C("span", Yt)) : (m(), C("br", Qt)),
162
- p.categories.length > u.value ? (m(), C("span", {
166
+ return (s, b) => {
167
+ const y = O("FmTooltip");
168
+ return t.value ? (m(), k(pe, { key: 1 }, [
169
+ s.categories.length > 0 ? (m(), k("p", Ht, [
170
+ g("span", null, K(a(i)("menu.product.table.columns.category")) + ": ", 1),
171
+ g("span", null, K(f.value), 1),
172
+ v.value ? (m(), k("span", Yt)) : (m(), k("br", Qt)),
173
+ s.categories.length > u.value ? (m(), k("span", {
163
174
  key: 2,
164
175
  class: "fm-typo-en-body-md-400 text-fm-color-primary cursor-pointer",
165
- onClick: b[0] || (b[0] = fe((w) => s.value = !s.value, ["stop", "prevent"]))
176
+ onClick: b[0] || (b[0] = fe((w) => v.value = !v.value, ["stop", "prevent"]))
166
177
  }, [
167
- s.value ? (m(), C("span", Zt, B(a(n)("menu.product.table.category.expand", { count: p.categories.length - u.value })), 1)) : (m(), C("span", Jt, B(a(n)("menu.product.table.category.collapse")), 1))
178
+ v.value ? (m(), k("span", Zt, K(a(i)("menu.product.table.category.expand", { count: s.categories.length - u.value })), 1)) : (m(), k("span", Jt, K(a(i)("menu.product.table.category.collapse")), 1))
168
179
  ])) : U("", !0)
169
180
  ])) : U("", !0)
170
181
  ], 64)) : (m(), I(y, {
@@ -176,9 +187,9 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
176
187
  }, {
177
188
  content: T(() => [
178
189
  g("div", Lt, [
179
- g("p", qt, B(a(n)("menu.product.table.category.all")), 1),
190
+ g("p", qt, K(a(i)("menu.product.table.category.all")), 1),
180
191
  g("div", Wt, [
181
- (m(!0), C(pe, null, we(e.categories, (w) => (m(), I(ke, {
192
+ (m(!0), k(pe, null, we(e.categories, (w) => (m(), I(ke, {
182
193
  key: w,
183
194
  label: w,
184
195
  variant: "neutral"
@@ -188,12 +199,12 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
188
199
  ]),
189
200
  default: T(() => [
190
201
  g("div", Gt, [
191
- (m(!0), C(pe, null, we(t.value, (w) => (m(), I(ke, {
202
+ (m(!0), k(pe, null, we(l.value, (w) => (m(), I(ke, {
192
203
  key: w,
193
204
  label: w,
194
205
  variant: "neutral"
195
206
  }, null, 8, ["label"]))), 128)),
196
- p.categories.length > u.value ? (m(), I(ke, {
207
+ s.categories.length > u.value ? (m(), I(ke, {
197
208
  key: 0,
198
209
  label: "...",
199
210
  variant: "neutral"
@@ -204,7 +215,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
204
215
  }));
205
216
  };
206
217
  }
207
- }), Xt = /* @__PURE__ */ K({
218
+ }), Xt = /* @__PURE__ */ N({
208
219
  __name: "ProductSearcher",
209
220
  props: /* @__PURE__ */ Je({
210
221
  label: {},
@@ -215,29 +226,29 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
215
226
  modelModifiers: {}
216
227
  }),
217
228
  emits: ["update:modelValue"],
218
- setup(k) {
219
- const e = k, n = Xe(k, "modelValue"), i = h(() => e.menu.modules.item.map((l) => ({
220
- label: l.code ? `${l.code} ${l.name}` : l.name,
221
- value: l._id
229
+ setup(C) {
230
+ const e = C, i = Xe(C, "modelValue"), n = h(() => e.menu.modules.item.map((t) => ({
231
+ label: t.code ? `${t.code} ${t.name}` : t.name,
232
+ value: t._id
222
233
  })));
223
- return (l, u) => {
224
- const t = z("FmSelect");
225
- return m(), I(t, {
226
- modelValue: n.value,
227
- "onUpdate:modelValue": u[0] || (u[0] = (s) => n.value = s),
228
- items: i.value,
234
+ return (t, u) => {
235
+ const l = O("FmSelect");
236
+ return m(), I(l, {
237
+ modelValue: i.value,
238
+ "onUpdate:modelValue": u[0] || (u[0] = (v) => i.value = v),
239
+ items: n.value,
229
240
  searchable: !0,
230
241
  "search-target": "label",
231
242
  placeholder: "Search by product name or code",
232
- label: l.label,
233
- "helper-text": l.helperText
243
+ label: t.label,
244
+ "helper-text": t.helperText
234
245
  }, null, 8, ["modelValue", "items", "label", "helper-text"]);
235
246
  };
236
247
  }
237
248
  }), el = { class: "flex" }, tl = { class: "w-[260px] space-y-16 h-full" }, ll = { class: "flex items-center gap-4 px-8" }, al = { class: "fm-typo-en-title-sm-600" }, ol = {
238
249
  key: 0,
239
250
  class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4"
240
- }, rl = { class: "fm-typo-en-body-md-600" }, nl = { class: "flex-1" }, nt = /* @__PURE__ */ K({
251
+ }, rl = { class: "fm-typo-en-body-md-600" }, nl = { class: "flex-1" }, nt = /* @__PURE__ */ N({
241
252
  __name: "ViewLayout",
242
253
  props: /* @__PURE__ */ Je({
243
254
  title: {},
@@ -248,144 +259,144 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
248
259
  modelModifiers: {}
249
260
  }),
250
261
  emits: ["update:modelValue"],
251
- setup(k) {
252
- const e = Xe(k, "modelValue");
253
- return (n, i) => {
254
- const l = z("FmCollapsibleTabs");
255
- return m(), C("div", el, [
262
+ setup(C) {
263
+ const e = Xe(C, "modelValue");
264
+ return (i, n) => {
265
+ const t = O("FmCollapsibleTabs");
266
+ return m(), k("div", el, [
256
267
  g("div", tl, [
257
268
  g("div", ll, [
258
- g("p", al, B(n.title), 1),
259
- n.titleBadge !== void 0 ? (m(), C("div", ol, [
260
- g("p", rl, B(n.titleBadge), 1)
269
+ g("p", al, K(i.title), 1),
270
+ i.titleBadge !== void 0 ? (m(), k("div", ol, [
271
+ g("p", rl, K(i.titleBadge), 1)
261
272
  ])) : U("", !0)
262
273
  ]),
263
- d(ze, null, {
274
+ d(De, null, {
264
275
  default: T(() => [
265
- d(l, {
276
+ d(t, {
266
277
  modelValue: e.value,
267
- "onUpdate:modelValue": i[0] || (i[0] = (u) => e.value = u),
268
- items: n.items
278
+ "onUpdate:modelValue": n[0] || (n[0] = (u) => e.value = u),
279
+ items: i.items
269
280
  }, null, 8, ["modelValue", "items"])
270
281
  ]),
271
282
  _: 1
272
283
  })
273
284
  ]),
274
- i[1] || (i[1] = g("div", { class: "w-[1px] min-h-full ml-4 mr-12 bg-fm-color-neutral-gray-100 self-stretch" }, null, -1)),
285
+ n[1] || (n[1] = g("div", { class: "w-[1px] min-h-full ml-4 mr-12 bg-fm-color-neutral-gray-100 self-stretch" }, null, -1)),
275
286
  g("div", nl, [
276
- _e(n.$slots, "default")
287
+ _e(i.$slots, "default")
277
288
  ])
278
289
  ]);
279
290
  };
280
291
  }
281
- }), Fe = /* @__PURE__ */ K({
292
+ }), Ve = /* @__PURE__ */ N({
282
293
  __name: "OrderFromChip",
283
294
  props: {
284
295
  orderFrom: {}
285
296
  },
286
- setup(k) {
287
- const e = k, n = Ce();
288
- return (i, l) => {
289
- var u, t;
297
+ setup(C) {
298
+ const e = C, i = Ce();
299
+ return (n, t) => {
300
+ var u, l;
290
301
  return m(), I(ke, {
291
- label: ((u = a(n)[e.orderFrom]) == null ? void 0 : u.label) || e.orderFrom,
292
- variant: (t = a(n)[e.orderFrom]) == null ? void 0 : t.variant
302
+ label: ((u = a(i)[e.orderFrom]) == null ? void 0 : u.label) || e.orderFrom,
303
+ variant: (l = a(i)[e.orderFrom]) == null ? void 0 : l.variant
293
304
  }, null, 8, ["label", "variant"]);
294
305
  };
295
306
  }
296
- }), sl = /* @__PURE__ */ K({
307
+ }), sl = /* @__PURE__ */ N({
297
308
  __name: "GroupViewTable",
298
309
  props: {
299
310
  data: {}
300
311
  },
301
- setup(k) {
302
- const e = k, n = [{
312
+ setup(C) {
313
+ const e = C, i = [{
303
314
  accessorKey: "code",
304
315
  header: () => "Code",
305
316
  enableSorting: !1,
306
317
  cell: ({
307
- row: t
318
+ row: l
308
319
  }) => {
309
- const s = t.original;
310
- return s.subRows ? d("div", {
320
+ const v = l.original;
321
+ return v.subRows ? d("div", {
311
322
  class: "flex items-center gap-2 fm-typo-en-body-md-600 text-fm-color-typo-secondary"
312
323
  }, [d(te.FmButton, {
313
324
  icon: "keyboard_arrow_up",
314
325
  variant: "tertiary",
315
- class: ["cursor-pointer", "transition-transform", t.getIsExpanded() ? "transform rotate-180" : ""],
316
- onClick: t.getToggleExpandedHandler()
317
- }, null), et("Found in group: "), s.groupName]) : s.code;
326
+ class: ["cursor-pointer", "transition-transform", l.getIsExpanded() ? "transform rotate-180" : ""],
327
+ onClick: l.getToggleExpandedHandler()
328
+ }, null), et("Found in group: "), v.groupName]) : v.code;
318
329
  },
319
330
  meta: {
320
- colspan: (t) => t.original.subRows ? 5 : 1
331
+ colspan: (l) => l.original.subRows ? 5 : 1
321
332
  }
322
333
  }, {
323
334
  accessorKey: "productName",
324
335
  header: () => "Product name",
325
336
  enableSorting: !1,
326
337
  meta: {
327
- colspan: (t) => t.original.subRows ? 0 : 1
338
+ colspan: (l) => l.original.subRows ? 0 : 1
328
339
  }
329
340
  }, {
330
341
  accessorKey: "variant",
331
342
  header: () => "Variant",
332
343
  enableSorting: !1,
333
344
  meta: {
334
- colspan: (t) => t.original.subRows ? 0 : 1
345
+ colspan: (l) => l.original.subRows ? 0 : 1
335
346
  }
336
347
  }, {
337
348
  accessorKey: "price",
338
349
  header: () => "Price",
339
350
  enableSorting: !1,
340
351
  meta: {
341
- colspan: (t) => t.original.subRows ? 0 : 1
352
+ colspan: (l) => l.original.subRows ? 0 : 1
342
353
  }
343
354
  }, {
344
355
  accessorKey: "orderFrom",
345
356
  header: () => "Order from",
346
357
  enableSorting: !1,
347
- cell: (t) => {
348
- const s = t.row.original;
349
- return d(Fe, {
350
- orderFrom: s.orderFrom ?? ""
358
+ cell: (l) => {
359
+ const v = l.row.original;
360
+ return d(Ve, {
361
+ orderFrom: v.orderFrom ?? ""
351
362
  }, null);
352
363
  },
353
364
  meta: {
354
- colspan: (t) => t.original.subRows ? 0 : 1
365
+ colspan: (l) => l.original.subRows ? 0 : 1
355
366
  }
356
- }], i = V({}), l = (t) => t.subRows;
367
+ }], n = F({}), t = (l) => l.subRows;
357
368
  function u() {
358
- i.value = Object.fromEntries(e.data.map((t, s) => [s, !0]));
369
+ n.value = Object.fromEntries(e.data.map((l, v) => [v, !0]));
359
370
  }
360
371
  return de(() => e.data, () => {
361
372
  u();
362
- }), (t, s) => {
363
- const f = z("FmTable");
364
- return m(), I(ze, null, {
373
+ }), (l, v) => {
374
+ const f = O("FmTable");
375
+ return m(), I(De, null, {
365
376
  default: T(() => [d(f, {
366
- "column-defs": n,
367
- "row-data": t.data,
377
+ "column-defs": i,
378
+ "row-data": l.data,
368
379
  "hide-footer": !0,
369
380
  "page-size": 1e6,
370
- "get-sub-row": l,
371
- "expanded-state": i.value,
381
+ "get-sub-row": t,
382
+ "expanded-state": n.value,
372
383
  "shrink-at": !1,
373
- "onUpdate:expandedState": s[0] || (s[0] = (p) => i.value = p)
384
+ "onUpdate:expandedState": v[0] || (v[0] = (s) => n.value = s)
374
385
  }, null, 8, ["row-data", "expanded-state"])]),
375
386
  _: 1
376
387
  });
377
388
  };
378
389
  }
379
- }), ul = /* @__PURE__ */ K({
390
+ }), ul = /* @__PURE__ */ N({
380
391
  __name: "GroupView",
381
392
  props: {
382
393
  itemId: {},
383
394
  menu: {}
384
395
  },
385
- setup(k) {
386
- const e = k, n = V(""), i = h(() => l.value.reduce((p, b) => p + (typeof b.badge == "number" ? b.badge ?? 1 : 0), 0)), l = V([]), u = h(() => {
387
- const p = l.value.find((y) => y.value === n.value);
388
- return ((p == null ? void 0 : p.itemInGroup) || []).map((y) => ({
396
+ setup(C) {
397
+ const e = C, i = F(""), n = h(() => t.value.reduce((s, b) => s + (typeof b.badge == "number" ? b.badge ?? 1 : 0), 0)), t = F([]), u = h(() => {
398
+ const s = t.value.find((y) => y.value === i.value);
399
+ return ((s == null ? void 0 : s.itemInGroup) || []).map((y) => ({
389
400
  groupName: y.group.name,
390
401
  subRows: y.items.map((w) => ({
391
402
  // @ts-ignore
@@ -397,7 +408,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
397
408
  }))
398
409
  }));
399
410
  });
400
- function t() {
411
+ function l() {
401
412
  return [{
402
413
  label: "Master product",
403
414
  value: "",
@@ -416,32 +427,32 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
416
427
  itemInGroup: []
417
428
  }))];
418
429
  }
419
- h(() => l.value.find((p) => p.value === n.value));
420
- async function s(p) {
421
- const b = l.value.find((y) => y.catalogId === p);
430
+ h(() => t.value.find((s) => s.value === i.value));
431
+ async function v(s) {
432
+ const b = t.value.find((y) => y.catalogId === s);
422
433
  if (b) {
423
434
  b.badge = () => d(te.FmCircularProgress, {
424
435
  size: "md"
425
436
  }, null);
426
- const y = await wt(Re(e.menu), p, e.itemId);
437
+ const y = await wt(Re(e.menu), s, e.itemId);
427
438
  b.badge = y.length, b.disabled = y.length <= 0, b.itemInGroup = y;
428
439
  }
429
440
  }
430
441
  function f() {
431
- l.value = t(), l.value.forEach((p) => {
432
- s(p.catalogId);
442
+ t.value = l(), t.value.forEach((s) => {
443
+ v(s.catalogId);
433
444
  });
434
445
  }
435
446
  return de([() => e.menu, () => e.itemId], () => {
436
447
  e.menu && e.itemId && f();
437
448
  }, {
438
449
  immediate: !0
439
- }), (p, b) => (m(), I(nt, {
440
- modelValue: n.value,
441
- "onUpdate:modelValue": b[0] || (b[0] = (y) => n.value = y),
442
- items: l.value,
450
+ }), (s, b) => (m(), I(nt, {
451
+ modelValue: i.value,
452
+ "onUpdate:modelValue": b[0] || (b[0] = (y) => i.value = y),
453
+ items: t.value,
443
454
  title: "Catalog",
444
- "title-badge": i.value
455
+ "title-badge": n.value
445
456
  }, {
446
457
  default: T(() => [d(sl, {
447
458
  data: u.value
@@ -451,7 +462,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
451
462
  }
452
463
  }), il = {
453
464
  class: "scroll-x-auto"
454
- }, cl = /* @__PURE__ */ K({
465
+ }, cl = /* @__PURE__ */ N({
455
466
  __name: "ProductViewTable",
456
467
  props: {
457
468
  itemId: {},
@@ -459,18 +470,18 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
459
470
  catalogId: {},
460
471
  schedulerIds: {}
461
472
  },
462
- setup(k) {
463
- const e = k, n = [{
473
+ setup(C) {
474
+ const e = C, i = [{
464
475
  accessorKey: "scheduler",
465
476
  header: () => "Scheduler",
466
477
  enableSorting: !1,
467
478
  cell: (u) => {
468
- const t = u.row.original, s = t.loading ? d(te.FmCircularProgress, {
479
+ const l = u.row.original, v = l.loading ? d(te.FmCircularProgress, {
469
480
  size: "md"
470
481
  }, null) : null;
471
482
  return d("div", {
472
483
  class: "flex items-center gap-2"
473
- }, [t.scheduler, s]);
484
+ }, [l.scheduler, v]);
474
485
  }
475
486
  }, {
476
487
  accessorKey: "code",
@@ -488,18 +499,18 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
488
499
  accessorKey: "orderFrom",
489
500
  header: () => "Order from",
490
501
  cell: (u) => {
491
- const t = u.row.original;
492
- return d(Fe, {
493
- orderFrom: t.orderFrom
502
+ const l = u.row.original;
503
+ return d(Ve, {
504
+ orderFrom: l.orderFrom
494
505
  }, null);
495
506
  },
496
507
  enableSorting: !1
497
- }], i = V([]);
498
- function l(u, t) {
508
+ }], n = F([]);
509
+ function t(u, l) {
499
510
  return {
500
511
  loading: !0,
501
512
  schedulerId: u,
502
- scheduler: t,
513
+ scheduler: l,
503
514
  code: "--",
504
515
  productName: "--",
505
516
  price: "--",
@@ -507,55 +518,55 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
507
518
  };
508
519
  }
509
520
  return de([() => e.menu, () => e.catalogId, () => e.schedulerIds], async () => {
510
- i.value = [l(null, "All day"), ...e.schedulerIds.map((u) => {
511
- var t;
512
- return l(u, ((t = e.menu.modules.scheduler.find((s) => s._id === u)) == null ? void 0 : t.name) || "Unknown");
513
- })], i.value.forEach(async (u) => {
514
- const s = (await St(Re(e.menu), e.catalogId, u.schedulerId)).modules.item.find((p) => p._id === e.itemId), f = i.value.findIndex((p) => p.schedulerId === u.schedulerId);
515
- if (s) {
516
- const p = Re(i.value);
517
- p[f].loading = !1, p[f].code = s.code || "--", p[f].productName = s.name || "--", p[f].price = me.Dinero.fromFdoDinero(s.price).toFormat(), p[f].orderFrom = s.orderFrom || "--", i.value = p;
521
+ n.value = [t(null, "All day"), ...e.schedulerIds.map((u) => {
522
+ var l;
523
+ return t(u, ((l = e.menu.modules.scheduler.find((v) => v._id === u)) == null ? void 0 : l.name) || "Unknown");
524
+ })], n.value.forEach(async (u) => {
525
+ const v = (await St(Re(e.menu), e.catalogId, u.schedulerId)).modules.item.find((s) => s._id === e.itemId), f = n.value.findIndex((s) => s.schedulerId === u.schedulerId);
526
+ if (v) {
527
+ const s = Re(n.value);
528
+ s[f].loading = !1, s[f].code = v.code || "--", s[f].productName = v.name || "--", s[f].price = me.Dinero.fromFdoDinero(v.price).toFormat(), s[f].orderFrom = v.orderFrom || "--", n.value = s;
518
529
  }
519
530
  });
520
- }), (u, t) => {
521
- const s = z("FmTable");
522
- return m(), I(ze, null, {
523
- default: T(() => [g("div", il, [d(s, {
531
+ }), (u, l) => {
532
+ const v = O("FmTable");
533
+ return m(), I(De, null, {
534
+ default: T(() => [g("div", il, [d(v, {
524
535
  class: "min-w-[800px]",
525
- "column-defs": n,
526
- "row-data": i.value,
536
+ "column-defs": i,
537
+ "row-data": n.value,
527
538
  "hide-footer": !0,
528
- "page-size": i.value.length,
539
+ "page-size": n.value.length,
529
540
  "shrink-at": !1
530
541
  }, null, 8, ["row-data", "page-size"])])]),
531
542
  _: 1
532
543
  });
533
544
  };
534
545
  }
535
- }), dl = /* @__PURE__ */ K({
546
+ }), dl = /* @__PURE__ */ N({
536
547
  __name: "ProductView",
537
548
  props: {
538
549
  itemId: {},
539
550
  menu: {}
540
551
  },
541
- setup(k) {
542
- const e = k, n = V(null);
552
+ setup(C) {
553
+ const e = C, i = F(null);
543
554
  tt(async () => {
544
- n.value = await Ft(e.menu, e.itemId), await Ae(), i.value = l.value[0].value;
555
+ i.value = await Vt(e.menu, e.itemId), await Ae(), n.value = t.value[0].value;
545
556
  });
546
- const i = V(""), l = h(() => {
547
- var f, p;
548
- const t = {
557
+ const n = F(""), t = h(() => {
558
+ var f, s;
559
+ const l = {
549
560
  label: "Master product",
550
561
  value: "",
551
562
  catalogId: null,
552
- badge: (((f = n.value) == null ? void 0 : f.schedulers.length) || 0) + 1,
553
- schedulerIds: (p = n.value) == null ? void 0 : p.schedulers
563
+ badge: (((f = i.value) == null ? void 0 : f.schedulers.length) || 0) + 1,
564
+ schedulerIds: (s = i.value) == null ? void 0 : s.schedulers
554
565
  };
555
- if (!n.value)
556
- return [t];
557
- const s = e.menu.modules.catalog.map((b) => {
558
- const y = n.value.catalogs[b._id];
566
+ if (!i.value)
567
+ return [l];
568
+ const v = e.menu.modules.catalog.map((b) => {
569
+ const y = i.value.catalogs[b._id];
559
570
  return {
560
571
  label: b.name,
561
572
  value: b._id,
@@ -565,23 +576,23 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
565
576
  schedulerIds: y == null ? void 0 : y.schedulers
566
577
  };
567
578
  });
568
- return [t, ...s];
569
- }), u = h(() => l.value.find((t) => t.value === i.value));
570
- return (t, s) => (m(), I(nt, {
571
- modelValue: i.value,
572
- "onUpdate:modelValue": s[0] || (s[0] = (f) => i.value = f),
573
- items: l.value,
579
+ return [l, ...v];
580
+ }), u = h(() => t.value.find((l) => l.value === n.value));
581
+ return (l, v) => (m(), I(nt, {
582
+ modelValue: n.value,
583
+ "onUpdate:modelValue": v[0] || (v[0] = (f) => n.value = f),
584
+ items: t.value,
574
585
  title: "Catalog",
575
- "title-badge": l.value.filter((f) => !f.disabled).length
586
+ "title-badge": t.value.filter((f) => !f.disabled).length
576
587
  }, {
577
588
  default: T(() => {
578
- var f, p;
589
+ var f, s;
579
590
  return [
580
591
  d(cl, {
581
- menu: t.menu,
582
- "item-id": t.itemId,
592
+ menu: l.menu,
593
+ "item-id": l.itemId,
583
594
  "catalog-id": ((f = u.value) == null ? void 0 : f.catalogId) || null,
584
- "scheduler-ids": ((p = u.value) == null ? void 0 : p.schedulerIds) || []
595
+ "scheduler-ids": ((s = u.value) == null ? void 0 : s.schedulerIds) || []
585
596
  }, null, 8, ["menu", "item-id", "catalog-id", "scheduler-ids"])
586
597
  ];
587
598
  }),
@@ -591,38 +602,38 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
591
602
  }), ml = { class: "flex items-center gap-8" }, pl = { class: "space-y-4" }, vl = { class: "fm-typo-en-title-md-600" }, fl = { key: 0 }, gl = { class: "text-fm-color-typo-secondary" }, bl = {
592
603
  key: 0,
593
604
  class: "text-fm-color-typo-secondary"
594
- }, _l = { class: "flex items-center gap-4" }, yl = /* @__PURE__ */ K({
605
+ }, _l = { class: "flex items-center gap-4" }, yl = /* @__PURE__ */ N({
595
606
  __name: "ProductBaseInfo",
596
607
  props: {
597
608
  itemId: {},
598
609
  menu: {}
599
610
  },
600
- setup(k) {
601
- const e = k, n = h(() => e.menu.modules.item.find((l) => l._id === e.itemId)), i = h(() => {
602
- var l;
603
- return me.Dinero.fromFdoDinero((l = n.value) == null ? void 0 : l.price).toFormat(!0);
611
+ setup(C) {
612
+ const e = C, i = h(() => e.menu.modules.item.find((t) => t._id === e.itemId)), n = h(() => {
613
+ var t;
614
+ return me.Dinero.fromFdoDinero((t = i.value) == null ? void 0 : t.price).toFormat(!0);
604
615
  });
605
- return (l, u) => {
606
- var t, s, f, p, b, y, w;
607
- return m(), C("div", ml, [
616
+ return (t, u) => {
617
+ var l, v, f, s, b, y, w;
618
+ return m(), k("div", ml, [
608
619
  d(Me, {
609
- alt: ((t = n.value) == null ? void 0 : t.name) ?? null,
620
+ alt: ((l = i.value) == null ? void 0 : l.name) ?? null,
610
621
  size: 72,
611
- src: (s = n.value) == null ? void 0 : s.thumbnail,
622
+ src: (v = i.value) == null ? void 0 : v.thumbnail,
612
623
  crossorigin: !1
613
624
  }, null, 8, ["alt", "src"]),
614
625
  g("div", pl, [
615
626
  g("p", vl, [
616
- (f = n.value) != null && f.code ? (m(), C("span", fl, B((p = n.value) == null ? void 0 : p.code) + ", ", 1)) : U("", !0),
617
- g("span", null, B((b = n.value) == null ? void 0 : b.name), 1)
627
+ (f = i.value) != null && f.code ? (m(), k("span", fl, K((s = i.value) == null ? void 0 : s.code) + ", ", 1)) : U("", !0),
628
+ g("span", null, K((b = i.value) == null ? void 0 : b.name), 1)
618
629
  ]),
619
- g("p", gl, "Base price: " + B(i.value), 1),
620
- (y = n.value) != null && y.customAttributes ? (m(), C("div", bl, [
630
+ g("p", gl, "Base price: " + K(n.value), 1),
631
+ (y = i.value) != null && y.customAttributes ? (m(), k("div", bl, [
621
632
  g("div", _l, [
622
633
  u[0] || (u[0] = g("span", null, "Tagging:", -1)),
623
634
  d(Ue, {
624
635
  ellipsis: !1,
625
- "custom-attributes": (w = n.value) == null ? void 0 : w.customAttributes
636
+ "custom-attributes": (w = i.value) == null ? void 0 : w.customAttributes
626
637
  }, null, 8, ["custom-attributes"])
627
638
  ])
628
639
  ])) : U("", !0)
@@ -630,14 +641,14 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
630
641
  ]);
631
642
  };
632
643
  }
633
- }), hl = { class: "space-y-16" }, xl = /* @__PURE__ */ K({
644
+ }), hl = { class: "space-y-16" }, xl = /* @__PURE__ */ N({
634
645
  __name: "ProductViewer",
635
646
  props: {
636
647
  itemId: {},
637
648
  menu: {}
638
649
  },
639
- setup(k) {
640
- const e = V("product"), n = h(() => [
650
+ setup(C) {
651
+ const e = F("product"), i = h(() => [
641
652
  {
642
653
  value: "product",
643
654
  label: "Product",
@@ -649,75 +660,75 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
649
660
  component: ul
650
661
  }
651
662
  ]);
652
- return (i, l) => {
653
- var t;
654
- const u = z("FmTabs");
655
- return m(), C("div", hl, [
663
+ return (n, t) => {
664
+ var l;
665
+ const u = O("FmTabs");
666
+ return m(), k("div", hl, [
656
667
  d(yl, {
657
- "item-id": i.itemId,
658
- menu: i.menu
668
+ "item-id": n.itemId,
669
+ menu: n.menu
659
670
  }, null, 8, ["item-id", "menu"]),
660
671
  g("div", null, [
661
672
  d(u, {
662
673
  modelValue: e.value,
663
- "onUpdate:modelValue": l[0] || (l[0] = (s) => e.value = s),
664
- items: n.value
674
+ "onUpdate:modelValue": t[0] || (t[0] = (v) => e.value = v),
675
+ items: i.value
665
676
  }, null, 8, ["modelValue", "items"])
666
677
  ]),
667
678
  g("div", null, [
668
- (m(), I(lt((t = n.value.find((s) => s.value === e.value)) == null ? void 0 : t.component), {
669
- "item-id": i.itemId,
670
- menu: i.menu
679
+ (m(), I(lt((l = i.value.find((v) => v.value === e.value)) == null ? void 0 : l.component), {
680
+ "item-id": n.itemId,
681
+ menu: n.menu
671
682
  }, null, 8, ["item-id", "menu"]))
672
683
  ])
673
684
  ]);
674
685
  };
675
686
  }
676
- }), Cl = { class: "space-y-24" }, kl = { key: 0 }, wl = /* @__PURE__ */ K({
687
+ }), Cl = { class: "space-y-24" }, kl = { key: 0 }, wl = /* @__PURE__ */ N({
677
688
  __name: "ProductOverview",
678
689
  props: {
679
690
  itemId: {},
680
691
  showSearch: { type: Boolean, default: !1 }
681
692
  },
682
- setup(k) {
683
- const e = k, n = Ve(), i = V(null);
693
+ setup(C) {
694
+ const e = C, i = Fe(), n = F(null);
684
695
  return at(() => {
685
- i.value = e.itemId;
686
- }), (l, u) => (m(), C("div", Cl, [
687
- l.showSearch ? (m(), C("div", kl, [
696
+ n.value = e.itemId;
697
+ }), (t, u) => (m(), k("div", Cl, [
698
+ t.showSearch ? (m(), k("div", kl, [
688
699
  d(Xt, {
689
- modelValue: i.value,
690
- "onUpdate:modelValue": u[0] || (u[0] = (t) => i.value = t),
700
+ modelValue: n.value,
701
+ "onUpdate:modelValue": u[0] || (u[0] = (l) => n.value = l),
691
702
  class: "w-1/2",
692
703
  label: "Search and compare prices",
693
704
  "helper-text": "Quickly find products and view their prices across different catalogs and schedules.",
694
- menu: a(n).state.menu
705
+ menu: a(i).state.menu
695
706
  }, null, 8, ["modelValue", "menu"])
696
707
  ])) : U("", !0),
697
708
  g("div", null, [
698
- i.value ? (m(), I(xl, {
709
+ n.value ? (m(), I(xl, {
699
710
  key: 0,
700
- "item-id": i.value,
701
- menu: a(n).state.menu
711
+ "item-id": n.value,
712
+ menu: a(i).state.menu
702
713
  }, null, 8, ["item-id", "menu"])) : U("", !0)
703
714
  ])
704
715
  ]));
705
716
  }
706
- }), Sl = /* @__PURE__ */ K({
717
+ }), Sl = /* @__PURE__ */ N({
707
718
  __name: "OverviewSheet",
708
- setup(k) {
709
- const e = V(null), n = V(!1);
710
- function i(l) {
711
- n.value = !n.value, l && (e.value = l);
719
+ setup(C) {
720
+ const e = F(null), i = F(!1);
721
+ function n(t) {
722
+ i.value = !i.value, t && (e.value = t);
712
723
  }
713
- return (l, u) => {
714
- const t = z("FmSideSheet");
715
- return m(), C(pe, null, [
716
- _e(l.$slots, "default", { trigger: i }),
717
- d(t, {
724
+ return (t, u) => {
725
+ const l = O("FmSideSheet");
726
+ return m(), k(pe, null, [
727
+ _e(t.$slots, "default", { trigger: n }),
728
+ d(l, {
718
729
  id: "product-overview",
719
- modelValue: n.value,
720
- "onUpdate:modelValue": u[0] || (u[0] = (s) => n.value = s),
730
+ modelValue: i.value,
731
+ "onUpdate:modelValue": u[0] || (u[0] = (v) => i.value = v),
721
732
  "max-width": 1200,
722
733
  "dismiss-away": ""
723
734
  }, {
@@ -726,7 +737,7 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
726
737
  ])),
727
738
  default: T(() => [
728
739
  g("div", null, [
729
- n.value && e.value ? (m(), I(wl, {
740
+ i.value && e.value ? (m(), I(wl, {
730
741
  key: 0,
731
742
  "item-id": e.value
732
743
  }, null, 8, ["item-id"])) : U("", !0)
@@ -738,34 +749,34 @@ const Kt = { class: "inline-flex items-center" }, Nt = {
738
749
  };
739
750
  }
740
751
  });
741
- var Fl = Ut();
742
- const Ye = /* @__PURE__ */ K({
752
+ var Vl = Ut();
753
+ const Ye = /* @__PURE__ */ N({
743
754
  __name: "ImportButton",
744
- setup(k) {
745
- const e = V(!1);
746
- function n() {
755
+ setup(C) {
756
+ const e = F(!1);
757
+ function i() {
747
758
  e.value = !e.value;
748
759
  }
749
- const i = Oe();
760
+ const n = ze();
750
761
  return at(() => {
751
- const l = i.currentCountry.value;
752
- if (l)
762
+ const t = n.currentCountry.value;
763
+ if (t)
753
764
  try {
754
- Fl.setCountryConfig(l);
765
+ Vl.setCountryConfig(t);
755
766
  } catch (u) {
756
767
  console.log("Unable to set country config", u);
757
768
  }
758
- }), (l, u) => (m(), C(pe, null, [
769
+ }), (t, u) => (m(), k(pe, null, [
759
770
  d(Mt, {
760
771
  modelValue: e.value,
761
- "onUpdate:modelValue": u[0] || (u[0] = (t) => e.value = t)
772
+ "onUpdate:modelValue": u[0] || (u[0] = (l) => e.value = l)
762
773
  }, null, 8, ["modelValue"]),
763
- _e(l.$slots, "default", { trigger: n })
774
+ _e(t.$slots, "default", { trigger: i })
764
775
  ], 64));
765
776
  }
766
- }), Ze = (k) => d("div", {
777
+ }), Ze = (C) => d("div", {
767
778
  class: "flex flex-1 justify-end"
768
- }, [d("span", null, [k, et(" ")])]), Vl = {
779
+ }, [d("span", null, [C, et(" ")])]), Fl = {
769
780
  class: "flex justify-between items-center space-x-8"
770
781
  }, Il = {
771
782
  class: "flex space-x-8 items-center"
@@ -786,12 +797,12 @@ const Ye = /* @__PURE__ */ K({
786
797
  class: "px-16 py-4 space-x-8 flex justify-end"
787
798
  }, Ml = {
788
799
  key: 2
789
- }, Ol = {
790
- class: "flex space-x-8"
791
800
  }, zl = {
801
+ class: "flex space-x-8"
802
+ }, Dl = {
792
803
  key: 1,
793
804
  class: "pt-8 flex flex-col flex-1 overflow-hidden"
794
- }, Dl = {
805
+ }, Ol = {
795
806
  class: "space-y-8 pb-8"
796
807
  }, Bl = {
797
808
  class: "w-full px-8"
@@ -821,7 +832,7 @@ const Ye = /* @__PURE__ */ K({
821
832
  key: 1
822
833
  }, Jl = {
823
834
  class: "flex space-x-8"
824
- }, Xl = /* @__PURE__ */ K({
835
+ }, Xl = /* @__PURE__ */ N({
825
836
  __name: "ProductTable",
826
837
  props: {
827
838
  modelValue: {},
@@ -831,62 +842,62 @@ const Ye = /* @__PURE__ */ K({
831
842
  }
832
843
  },
833
844
  emits: ["update:model-value", "reset:model-value", "update:editing", "update:search-key"],
834
- setup(k, {
845
+ setup(C, {
835
846
  expose: e,
836
- emit: n
847
+ emit: i
837
848
  }) {
838
- const i = k, {
839
- t: l
840
- } = Ie(), u = Oe(), t = Ve(), s = Tt(), f = ot(), p = u.currentCountry, b = h(() => p.value ? me.Country.getCountry(p.value) : null), y = h(() => t.rules.item), {
849
+ const n = C, {
850
+ t
851
+ } = Ie(), u = ze(), l = Fe(), v = Tt(), f = ot(), s = u.currentCountry, b = h(() => s.value ? me.Country.getCountry(s.value) : null), y = h(() => l.rules.item), {
841
852
  selectedCategories: w
842
- } = Se(), W = h(() => {
853
+ } = Se(), z = h(() => {
843
854
  const o = ge.flatten(w.value.map((r) => r.items));
844
855
  return ge.uniqBy(o, (r) => r._id);
845
- }), Y = n, S = V(!1);
856
+ }), Y = i, S = F(!1);
846
857
  de(() => S.value, (o) => {
847
858
  Y("update:editing", o);
848
859
  });
849
860
  const oe = (o) => {
850
- Ot.isBoolean(o) ? S.value = o : S.value = !S.value;
851
- }, Z = V(!1), re = V(null);
852
- async function E() {
861
+ zt.isBoolean(o) ? S.value = o : S.value = !S.value;
862
+ }, Z = F(!1), re = F(null);
863
+ async function G() {
853
864
  Z.value = !Z.value, Z.value && (await Ae(), re.value && re.value.toggleProperty(!0));
854
865
  }
855
866
  e({
856
- toggleAttributeFilter: E
867
+ toggleAttributeFilter: G
857
868
  });
858
869
  const {
859
- attributes: D,
860
- filterRule: O,
870
+ attributes: B,
871
+ filterRule: D,
861
872
  mongoQuery: H
862
873
  } = xt({
863
- valueSource: W,
874
+ valueSource: z,
864
875
  entity: "item"
865
- }), J = V(""), ne = Ct(J, 300), Q = h(() => {
876
+ }), J = F(""), ne = Ct(J, 300), Q = h(() => {
866
877
  const o = (c) => {
867
878
  var x;
868
879
  return !ne.value || !ne.value.trim() ? !0 : [c.code, c.name, Be(c), ...Pe(se.value, c), (x = Ce()[c.orderFrom]) == null ? void 0 : x.label, Object.values(c.customAttributes ?? {}).join(" ")].join(" ").toLowerCase().includes(ne.value.toLowerCase());
869
880
  }, r = (c) => H.value ? $t(c.customAttributes, H.value) : !0;
870
- return W.value.filter((c) => o(c) && r(c));
881
+ return z.value.filter((c) => o(c) && r(c));
871
882
  }), {
872
883
  categories: se
873
- } = Se(), R = h(() => t.categories.map((o) => ({
884
+ } = Se(), R = h(() => l.categories.map((o) => ({
874
885
  label: o.name,
875
886
  value: o._id || null
876
887
  }))), $ = (o, r, c) => {
877
- let v = ge.clone(i.modelValue);
878
- const x = v[o];
879
- x && (typeof r == "object" && r !== null ? v[o] = {
888
+ let p = ge.clone(n.modelValue);
889
+ const x = p[o];
890
+ x && (typeof r == "object" && r !== null ? p[o] = {
880
891
  ...x,
881
892
  ...r
882
- } : v[o] = {
893
+ } : p[o] = {
883
894
  ...x,
884
895
  [r]: c
885
- }, Y("update:model-value", v));
886
- }, P = bt(() => i.originalValue, () => i.modelValue), A = ge.debounce($, 300), ue = (o) => (r) => !!r || l("menu.product.table.validation.name_required", {
896
+ }, Y("update:model-value", p));
897
+ }, P = bt(() => n.originalValue, () => n.modelValue), A = ge.debounce($, 300), ue = (o) => (r) => !!r || t("menu.product.table.validation.name_required", {
887
898
  field: o
888
- }), G = (o) => o >= 0 || l("menu.product.table.validation.price_min"), N = [ue("Name")], M = () => [(o) => G(typeof o == "number" ? o : Number(o) ?? 0)], ie = Ce(), j = h(() => {
889
- const o = t.isV4;
899
+ }), L = (o) => o >= 0 || t("menu.product.table.validation.price_min"), j = [ue("Name")], M = () => [(o) => L(typeof o == "number" ? o : Number(o) ?? 0)], ie = Ce(), E = h(() => {
900
+ const o = l.isV4;
890
901
  return gt.setCoreStore(u).taxSetting(o);
891
902
  }), ce = h(() => [{
892
903
  accessorKey: "thumbnail",
@@ -898,7 +909,7 @@ const Ye = /* @__PURE__ */ K({
898
909
  },
899
910
  cell: (o) => {
900
911
  var r, c;
901
- return L(Me, {
912
+ return q(Me, {
902
913
  src: o.getValue(),
903
914
  alt: (c = (r = o == null ? void 0 : o.row) == null ? void 0 : r.original) == null ? void 0 : c.name,
904
915
  className: "my-8 mx-12",
@@ -909,7 +920,7 @@ const Ye = /* @__PURE__ */ K({
909
920
  enableSorting: !1
910
921
  }, {
911
922
  accessorKey: "code",
912
- header: () => l("menu.product.table.columns.code"),
923
+ header: () => t("menu.product.table.columns.code"),
913
924
  enableSorting: !1,
914
925
  size: 100,
915
926
  cell: (o) => {
@@ -917,11 +928,11 @@ const Ye = /* @__PURE__ */ K({
917
928
  if (!S.value) return d("span", {
918
929
  class: "break-all"
919
930
  }, [c]);
920
- const v = Te(r._id);
921
- return L(te.FmTextField, {
931
+ const p = Te(r._id);
932
+ return q(te.FmTextField, {
922
933
  disabled: !y.value.code,
923
- modelValue: P(r._id, "code") ?? (v == null ? void 0 : v.code),
924
- placeholder: i.modelValue[r._id].fallbackCode,
934
+ modelValue: P(r._id, "code") ?? (p == null ? void 0 : p.code),
935
+ placeholder: n.modelValue[r._id].fallbackCode,
925
936
  "onUpdate:modelValue": (x) => {
926
937
  A(r._id, "code", x);
927
938
  }
@@ -929,18 +940,18 @@ const Ye = /* @__PURE__ */ K({
929
940
  }
930
941
  }, {
931
942
  accessorKey: "name",
932
- header: () => l("menu.product.table.columns.name"),
943
+ header: () => t("menu.product.table.columns.name"),
933
944
  enableSorting: !1,
934
945
  size: 200,
935
946
  cell: (o) => {
936
947
  const r = o.row.original, c = o.getValue();
937
- return S.value ? L(te.FmTextField, {
948
+ return S.value ? q(te.FmTextField, {
938
949
  disabled: !y.value.name,
939
950
  modelValue: P(r._id, "name") ?? r.name,
940
- "onUpdate:modelValue": (v) => {
941
- A(r._id, "name", v);
951
+ "onUpdate:modelValue": (p) => {
952
+ A(r._id, "name", p);
942
953
  },
943
- rules: N,
954
+ rules: j,
944
955
  placeholder: r.fallbackName
945
956
  }) : c;
946
957
  }
@@ -948,7 +959,7 @@ const Ye = /* @__PURE__ */ K({
948
959
  accessorKey: "price",
949
960
  header: () => {
950
961
  var o;
951
- return Ze(l("menu.product.table.columns.price", {
962
+ return Ze(t("menu.product.table.columns.price", {
952
963
  currency: (o = b.value) == null ? void 0 : o.currency.symbol
953
964
  }));
954
965
  },
@@ -961,63 +972,63 @@ const Ye = /* @__PURE__ */ K({
961
972
  var x;
962
973
  const r = o.getValue();
963
974
  if (!S.value) return me.Dinero.fromFdoDinero(r).toFormat();
964
- const c = i.modelValue[o.row.original._id], v = c.fallbackPrice;
965
- return L(Rt, {
975
+ const c = n.modelValue[o.row.original._id], p = c.fallbackPrice;
976
+ return q(Rt, {
966
977
  min: 0,
967
978
  disabled: !c.editPrice,
968
979
  // @ts-ignore
969
- placeholder: v ? zt(v, !1) : void 0,
980
+ placeholder: p ? Dt(p, !1) : void 0,
970
981
  modelValue: P(c._id, "price") ?? ((x = Te(c._id)) == null ? void 0 : x.price),
971
982
  // @ts-ignore
972
- "onUpdate:modelValue": (F) => {
973
- $(c._id, "price", F);
983
+ "onUpdate:modelValue": (V) => {
984
+ $(c._id, "price", V);
974
985
  },
975
986
  rules: M()
976
987
  });
977
988
  }
978
989
  }, {
979
990
  accessorKey: "taxes",
980
- header: () => Ze(j.value.systemCode),
991
+ header: () => Ze(E.value.systemCode),
981
992
  size: S.value ? 120 : 80,
982
993
  enableSorting: !1,
983
994
  meta: {
984
995
  textAlign: "right"
985
996
  },
986
997
  cell: (o) => {
987
- const r = o.getValue(), c = o.row.original, v = t.taxSetting.countryTaxOptions, x = t.getSelectedTax(r, c.fallbackTaxes, t.taxSetting.countryTaxOptions), F = v.find((ae) => ae.value === x);
998
+ const r = o.getValue(), c = o.row.original, p = l.taxSetting.countryTaxOptions, x = l.getSelectedTax(r, c.fallbackTaxes, l.taxSetting.countryTaxOptions), V = p.find((ae) => ae.value === x);
988
999
  if (!S.value)
989
- return `${F != null && F.meta.rate ? _t(F.meta.rate) : 0}%`;
990
- const _ = t.getSelectedTax(P(c._id, "taxes") ?? r, c.fallbackTaxes, t.taxSetting.countryTaxOptions);
991
- return L(te.FmSelect, {
1000
+ return `${V != null && V.meta.rate ? _t(V.meta.rate) : 0}%`;
1001
+ const _ = l.getSelectedTax(P(c._id, "taxes") ?? r, c.fallbackTaxes, l.taxSetting.countryTaxOptions);
1002
+ return q(te.FmSelect, {
992
1003
  disabled: !y.value.tax,
993
- items: t.taxSetting.countryTaxOptions,
1004
+ items: l.taxSetting.countryTaxOptions,
994
1005
  modelValue: _,
995
1006
  "onUpdate:modelValue": async (ae) => {
996
- const xe = t.decodeTax(ae);
1007
+ const xe = l.decodeTax(ae);
997
1008
  A(c._id, "taxes", [xe]);
998
1009
  }
999
1010
  });
1000
1011
  }
1001
1012
  }, {
1002
1013
  accessorKey: "category",
1003
- header: () => l("menu.product.table.columns.category"),
1014
+ header: () => t("menu.product.table.columns.category"),
1004
1015
  enableSorting: !1,
1005
1016
  size: 140,
1006
1017
  cell: (o) => {
1007
1018
  const r = o.row.original;
1008
1019
  if (!S.value)
1009
- return L(Qe, {
1020
+ return q(Qe, {
1010
1021
  categories: Pe(se.value, r)
1011
1022
  });
1012
- const c = yt(i.originalValue, i.modelValue, r._id) ?? ht(r), v = (c == null ? void 0 : c.map((F) => F._id)) ?? [], x = c == null ? void 0 : c.reduce((F, _) => (F[_._id] = _, F), {});
1013
- return L(It, {
1023
+ const c = yt(n.originalValue, n.modelValue, r._id) ?? ht(r), p = (c == null ? void 0 : c.map((V) => V._id)) ?? [], x = c == null ? void 0 : c.reduce((V, _) => (V[_._id] = _, V), {});
1024
+ return q(It, {
1014
1025
  shouldShowChips: !1,
1015
1026
  shouldShowSelectedItemsWithinPlaceholder: !0,
1016
- modelValue: v.length > 0 ? v : [null],
1027
+ modelValue: p.length > 0 ? p : [null],
1017
1028
  items: R.value,
1018
- disabled: !!(t.state.currentCatalogId || t.state.currentSchedulerId),
1019
- "onUpdate:modelValue": async (F) => {
1020
- const [_, ...ae] = F;
1029
+ disabled: !!(l.state.currentCatalogId || l.state.currentSchedulerId),
1030
+ "onUpdate:modelValue": async (V) => {
1031
+ const [_, ...ae] = V;
1021
1032
  A(r._id, {
1022
1033
  category: _,
1023
1034
  additionalCategories: ae.map((xe) => {
@@ -1034,34 +1045,34 @@ const Ye = /* @__PURE__ */ K({
1034
1045
  }, {
1035
1046
  id: "tagging",
1036
1047
  accessorKey: "tagging",
1037
- header: () => l("menu.product.table.columns.tagging"),
1048
+ header: () => t("menu.product.table.columns.tagging"),
1038
1049
  enableSorting: !1,
1039
1050
  size: 140,
1040
1051
  cell: (o) => {
1041
1052
  const r = o.row.original;
1042
- return L(Ue, {
1053
+ return q(Ue, {
1043
1054
  customAttributes: r.customAttributes
1044
1055
  });
1045
1056
  }
1046
1057
  }, {
1047
1058
  accessorKey: "orderFrom",
1048
- header: () => l("menu.product.table.columns.order_from"),
1059
+ header: () => t("menu.product.table.columns.order_from"),
1049
1060
  enableSorting: !0,
1050
1061
  sortingFn: (o, r) => {
1051
- const [c, v] = [o, r].map((x) => ie[x.original.orderFrom].sortingIndex);
1052
- return c - v;
1062
+ const [c, p] = [o, r].map((x) => ie[x.original.orderFrom].sortingIndex);
1063
+ return c - p;
1053
1064
  },
1054
1065
  size: 140,
1055
1066
  cell: (o) => {
1056
1067
  const r = o.getValue(), c = o.row.original;
1057
- return S.value ? L(te.FmSelect, {
1068
+ return S.value ? q(te.FmSelect, {
1058
1069
  disabled: !y.value.orderFrom,
1059
1070
  items: Object.values(Ce()),
1060
1071
  modelValue: P(c._id, "orderFrom") ?? r,
1061
- "onUpdate:modelValue": async (v) => {
1062
- $(c._id, "orderFrom", v);
1072
+ "onUpdate:modelValue": async (p) => {
1073
+ $(c._id, "orderFrom", p);
1063
1074
  }
1064
- }) : L(Fe, {
1075
+ }) : q(Ve, {
1065
1076
  orderFrom: r
1066
1077
  });
1067
1078
  }
@@ -1073,11 +1084,11 @@ const Ye = /* @__PURE__ */ K({
1073
1084
  headerClass: "py-4",
1074
1085
  textAlign: "right"
1075
1086
  },
1076
- header: () => L("div", {
1087
+ header: () => q("div", {
1077
1088
  class: "w-full px-4 flex justify-end"
1078
- }, [Dt(L(te.FmButton, {
1089
+ }, [Ot(q(te.FmButton, {
1079
1090
  variant: ee.Tertiary,
1080
- textColor: q.NeutralGray400,
1091
+ textColor: W.NeutralGray400,
1081
1092
  prependIcon: "edit",
1082
1093
  class: "flex justify-end",
1083
1094
  onClick: oe,
@@ -1093,7 +1104,7 @@ const Ye = /* @__PURE__ */ K({
1093
1104
  }) => d(te.FmButton, {
1094
1105
  icon: "overview",
1095
1106
  variant: "tertiary",
1096
- textColor: q.NeutralGray400,
1107
+ textColor: W.NeutralGray400,
1097
1108
  onClick: fe(() => {
1098
1109
  c(r._id);
1099
1110
  }, ["stop", "prevent"])
@@ -1101,7 +1112,7 @@ const Ye = /* @__PURE__ */ K({
1101
1112
  }), d(te.FmButton, {
1102
1113
  icon: "delete",
1103
1114
  variant: "tertiary",
1104
- textColor: q.NeutralGray400,
1115
+ textColor: W.NeutralGray400,
1105
1116
  onClick: fe(async () => {
1106
1117
  await f.deleteItem([{
1107
1118
  _id: r._id,
@@ -1112,15 +1123,15 @@ const Ye = /* @__PURE__ */ K({
1112
1123
  }, null)]);
1113
1124
  }
1114
1125
  }]);
1115
- t.taxSetting.systemCode || ce.value.splice(4, 1);
1116
- const le = V({}), X = V([]);
1126
+ l.taxSetting.systemCode || ce.value.splice(4, 1);
1127
+ const le = F({}), X = F([]);
1117
1128
  de([() => le.value, () => Q.value], (o) => {
1118
1129
  let r = [];
1119
1130
  Object.keys(o[0]).forEach((c) => {
1120
- const v = o[0][c], x = Q.value[parseInt(c)];
1121
- x && (v ? r.push(x) : X.value = r.filter((F) => F !== x));
1131
+ const p = o[0][c], x = Q.value[parseInt(c)];
1132
+ x && (p ? r.push(x) : X.value = r.filter((V) => V !== x));
1122
1133
  }), X.value = r;
1123
- }), de(() => W.value, () => {
1134
+ }), de(() => z.value, () => {
1124
1135
  le.value = {}, X.value = [];
1125
1136
  }), de(() => S.value, () => {
1126
1137
  le.value = {}, X.value = [];
@@ -1128,20 +1139,20 @@ const Ye = /* @__PURE__ */ K({
1128
1139
  const ye = () => {
1129
1140
  le.value = {};
1130
1141
  };
1131
- async function De() {
1142
+ async function Oe() {
1132
1143
  await Ae();
1133
- const o = () => !!t.currentCatalog || !!t.state.currentSchedulerId, r = (v) => v === "" || v === null ? o() ? "" : null : v, c = Object.values(i.modelValue).filter((v) => {
1134
- const x = Object.values(i.originalValue).find((F) => F._id === v._id);
1135
- return Ee(x, v);
1136
- }).map((v) => ({
1137
- _id: v._id,
1138
- name: v.name,
1139
- code: v.code,
1140
- price: v.price,
1141
- orderFrom: v.orderFrom ?? null,
1142
- taxes: v.taxes,
1143
- category: r(v.category || null),
1144
- additionalCategories: v.additionalCategories
1144
+ const o = () => !!l.currentCatalog || !!l.state.currentSchedulerId, r = (p) => p === "" || p === null ? o() ? "" : null : p, c = Object.values(n.modelValue).filter((p) => {
1145
+ const x = Object.values(n.originalValue).find((V) => V._id === p._id);
1146
+ return Ee(x, p);
1147
+ }).map((p) => ({
1148
+ _id: p._id,
1149
+ name: p.name,
1150
+ code: p.code,
1151
+ price: p.price,
1152
+ orderFrom: p.orderFrom ?? null,
1153
+ taxes: p.taxes,
1154
+ category: r(p.category || null),
1155
+ additionalCategories: p.additionalCategories
1145
1156
  }));
1146
1157
  await f.updateMany(c), oe(!1);
1147
1158
  }
@@ -1154,7 +1165,7 @@ const Ye = /* @__PURE__ */ K({
1154
1165
  }, he = () => {
1155
1166
  Y("reset:model-value");
1156
1167
  }, $e = () => {
1157
- Object.entries(i.modelValue).some(([r, c]) => Ee(c, i.originalValue[r])) ? s.open({
1168
+ Object.entries(n.modelValue).some(([r, c]) => Ee(c, n.originalValue[r])) ? v.open({
1158
1169
  title: "You have unsaved changes!",
1159
1170
  message: "Are you sure you want to discard? You will lose all the changes if discard edit.",
1160
1171
  primaryActions: {
@@ -1188,47 +1199,47 @@ const Ye = /* @__PURE__ */ K({
1188
1199
  // @ts-ignore
1189
1200
  o.fallbackPrice ?? me.Dinero.fromNumber({
1190
1201
  number: 0
1191
- }).toObject(), c = o.taxes, v = t.taxSetting.countryTaxOptions, x = me.Dinero.fromFdoDinero(r).toFormat(), F = (_ = b.value) == null ? void 0 : _.currency.symbol;
1192
- return t.getSelectedTax(
1202
+ }).toObject(), c = o.taxes, p = l.taxSetting.countryTaxOptions, x = me.Dinero.fromFdoDinero(r).toFormat(), V = (_ = b.value) == null ? void 0 : _.currency.symbol;
1203
+ return l.getSelectedTax(
1193
1204
  c,
1194
1205
  // TODO: fix type error
1195
1206
  // @ts-ignore
1196
1207
  o.fallbackTaxes,
1197
- v
1198
- ), `${F == null ? void 0 : F.toUpperCase()}${x}`;
1208
+ p
1209
+ ), `${V == null ? void 0 : V.toUpperCase()}${x}`;
1199
1210
  }
1200
1211
  function Te(o) {
1201
- var v;
1202
- const r = t.currentCatalog, c = t.state.currentSchedulerId;
1212
+ var p;
1213
+ const r = l.currentCatalog, c = l.state.currentSchedulerId;
1203
1214
  if (r && c) {
1204
- const x = r.override.scheduler[c] ?? {}, F = (v = x == null ? void 0 : x.items) == null ? void 0 : v.filter((_) => _._id === o);
1205
- return F == null ? void 0 : F[0];
1206
- } else return r ? r.override.items[o][0] : c ? t.schedulers.find((_) => _._id === c).items.filter((_) => _._id === o)[0] : W.value.find((x) => x._id === o);
1215
+ const x = r.override.scheduler[c] ?? {}, V = (p = x == null ? void 0 : x.items) == null ? void 0 : p.filter((_) => _._id === o);
1216
+ return V == null ? void 0 : V[0];
1217
+ } else return r ? r.override.items[o][0] : c ? l.schedulers.find((_) => _._id === c).items.filter((_) => _._id === o)[0] : z.value.find((x) => x._id === o);
1207
1218
  }
1208
- const dt = rt(), mt = h(() => dt.breakpoints.value.xs), Ke = V(null), pt = At(Ke, Z), vt = h(() => {
1219
+ const dt = rt(), mt = h(() => dt.breakpoints.value.xs), Ke = F(null), pt = At(Ke, Z), vt = h(() => {
1209
1220
  var r;
1210
1221
  return {
1211
1222
  height: `calc(100vh - ${((r = pt.value) == null ? void 0 : r.top) + 24}px)`
1212
1223
  };
1213
1224
  });
1214
1225
  return (o, r) => {
1215
- const c = z("fm-search"), v = z("fm-button"), x = z("fm-table"), F = z("fm-form");
1216
- return mt.value ? (m(), C("div", zl, [g("div", Dl, [g("div", Bl, [d(c, {
1226
+ const c = O("fm-search"), p = O("fm-button"), x = O("fm-table"), V = O("fm-form");
1227
+ return mt.value ? (m(), k("div", Dl, [g("div", Ol, [g("div", Bl, [d(c, {
1217
1228
  "model-value": J.value,
1218
1229
  "onUpdate:modelValue": r[5] || (r[5] = (_) => J.value = _),
1219
1230
  autofocus: "",
1220
- placeholder: a(l)("menu.product.table.search.placeholder")
1231
+ placeholder: a(t)("menu.product.table.search.placeholder")
1221
1232
  }, null, 8, ["model-value", "placeholder"])]), r[8] || (r[8] = g("div", {
1222
1233
  class: "w-full h-[1px] bg-fm-color-neutral-gray-100"
1223
- }, null, -1)), g("div", Kl, [_e(o.$slots, "filter")]), Z.value ? (m(), C("div", Nl, [d(a(We), {
1234
+ }, null, -1)), g("div", Kl, [_e(o.$slots, "filter")]), Z.value ? (m(), k("div", Nl, [d(a(We), {
1224
1235
  ref_key: "attributeFilterRef",
1225
1236
  ref: re,
1226
- attributes: a(D),
1227
- modelValue: a(O),
1228
- "onUpdate:modelValue": r[6] || (r[6] = (_) => je(O) ? O.value = _ : null)
1229
- }, null, 8, ["attributes", "modelValue"])])) : U("", !0)]), W.value.length ? (m(), C("div", jl, [(m(!0), C(pe, null, we(Q.value, (_) => {
1237
+ attributes: a(B),
1238
+ modelValue: a(D),
1239
+ "onUpdate:modelValue": r[6] || (r[6] = (_) => je(D) ? D.value = _ : null)
1240
+ }, null, 8, ["attributes", "modelValue"])])) : U("", !0)]), z.value.length ? (m(), k("div", jl, [(m(!0), k(pe, null, we(Q.value, (_) => {
1230
1241
  var ae;
1231
- return m(), C("div", {
1242
+ return m(), k("div", {
1232
1243
  key: _._id,
1233
1244
  class: "max-w-full py-12 px-16 space-x-16 flex items-center",
1234
1245
  onClick: () => it(_)
@@ -1236,14 +1247,14 @@ const Ye = /* @__PURE__ */ K({
1236
1247
  alt: _.name,
1237
1248
  size: 72,
1238
1249
  src: _.thumbnail
1239
- }, null, 8, ["alt", "src"]), g("div", Ll, [g("div", ql, [g("p", Wl, B(_.name), 1), d(Fe, {
1250
+ }, null, 8, ["alt", "src"]), g("div", Ll, [g("div", ql, [g("p", Wl, K(_.name), 1), d(Ve, {
1240
1251
  "order-from": _.orderFrom
1241
- }, null, 8, ["order-from"])]), g("p", Hl, B(Be(_)), 1), g("p", Ql, B(a(l)("menu.product.table.columns.code")) + ": " + B(((ae = Te(_._id)) == null ? void 0 : ae.code) || "--"), 1), g("p", Yl, [d(Qe, {
1252
+ }, null, 8, ["order-from"])]), g("p", Hl, K(Be(_)), 1), g("p", Ql, K(a(t)("menu.product.table.columns.code")) + ": " + K(((ae = Te(_._id)) == null ? void 0 : ae.code) || "--"), 1), g("p", Yl, [d(Qe, {
1242
1253
  categories: a(Pe)(a(se), _)
1243
1254
  }, null, 8, ["categories"])]), d(Ue, {
1244
1255
  "custom-attributes": _.customAttributes
1245
- }, null, 8, ["custom-attributes"])])]), d(v, {
1246
- "text-color": a(q).NeutralGray400,
1256
+ }, null, 8, ["custom-attributes"])])]), d(p, {
1257
+ "text-color": a(W).NeutralGray400,
1247
1258
  variant: a(ee).Tertiary,
1248
1259
  "prepend-icon": "delete",
1249
1260
  onClick: fe(() => a(f).deleteItem([{
@@ -1252,95 +1263,95 @@ const Ye = /* @__PURE__ */ K({
1252
1263
  thumbnail: _.thumbnail
1253
1264
  }]), ["stop"])
1254
1265
  }, null, 8, ["text-color", "variant", "onClick"])], 8, El);
1255
- }), 128))])) : (m(), C("div", Zl, [d(be, {
1256
- subtitle: a(l)("menu.product.table.empty.subtitle"),
1257
- title: a(l)("menu.product.table.empty.title")
1266
+ }), 128))])) : (m(), k("div", Zl, [d(be, {
1267
+ subtitle: a(t)("menu.product.table.empty.subtitle"),
1268
+ title: a(t)("menu.product.table.empty.title")
1258
1269
  }, {
1259
- action: T(() => [g("div", Jl, [d(v, {
1270
+ action: T(() => [g("div", Jl, [d(p, {
1260
1271
  variant: a(ee).Primary,
1261
- label: a(l)("menu.product.table.empty.actions.add"),
1272
+ label: a(t)("menu.product.table.empty.actions.add"),
1262
1273
  "prepend-icon": "add",
1263
1274
  onClick: r[7] || (r[7] = (_) => a(f).create(null))
1264
1275
  }, null, 8, ["variant", "label"]), d(Ye, null, {
1265
1276
  default: T(({
1266
1277
  trigger: _
1267
- }) => [d(v, {
1268
- "bg-color": a(q).NeutralGray100,
1269
- "text-color": a(q).NeutralGray400,
1278
+ }) => [d(p, {
1279
+ "bg-color": a(W).NeutralGray100,
1280
+ "text-color": a(W).NeutralGray400,
1270
1281
  variant: a(ee).Primary,
1271
- label: a(l)("menu.product.table.empty.actions.import"),
1282
+ label: a(t)("menu.product.table.empty.actions.import"),
1272
1283
  "prepend-icon": "download",
1273
1284
  onClick: _
1274
1285
  }, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])]),
1275
1286
  _: 1
1276
1287
  })])]),
1277
1288
  _: 1
1278
- }, 8, ["subtitle", "title"])]))])) : (m(), I(F, {
1289
+ }, 8, ["subtitle", "title"])]))])) : (m(), I(V, {
1279
1290
  key: 0,
1280
1291
  "blame-form-child-on-validation-failed": "",
1281
1292
  class: "flex flex-col flex-1 space-y-8 overflow-hidden",
1282
- onValidationSuccess: De
1293
+ onValidationSuccess: Oe
1283
1294
  }, {
1284
- default: T(() => [g("div", Vl, [g("div", Il, [_e(o.$slots, "filter")]), g("div", $l, [d(c, {
1295
+ default: T(() => [g("div", Fl, [g("div", Il, [_e(o.$slots, "filter")]), g("div", $l, [d(c, {
1285
1296
  "model-value": J.value,
1286
1297
  "onUpdate:modelValue": r[0] || (r[0] = (_) => J.value = _),
1287
1298
  autofocus: "",
1288
- placeholder: a(l)("menu.product.table.search.placeholder")
1289
- }, null, 8, ["model-value", "placeholder"])])]), Z.value ? (m(), C("div", Tl, [d(a(We), {
1299
+ placeholder: a(t)("menu.product.table.search.placeholder")
1300
+ }, null, 8, ["model-value", "placeholder"])])]), Z.value ? (m(), k("div", Tl, [d(a(We), {
1290
1301
  ref_key: "attributeFilterRef",
1291
1302
  ref: re,
1292
- attributes: a(D),
1293
- modelValue: a(O),
1294
- "onUpdate:modelValue": r[1] || (r[1] = (_) => je(O) ? O.value = _ : null)
1295
- }, null, 8, ["attributes", "modelValue"])])) : U("", !0), W.value.length ? (m(), C("div", Pl, [X.value.length && !S.value ? (m(), C("div", Al, [g("p", Rl, B(a(l)("menu.product.table.selection.count", {
1303
+ attributes: a(B),
1304
+ modelValue: a(D),
1305
+ "onUpdate:modelValue": r[1] || (r[1] = (_) => je(D) ? D.value = _ : null)
1306
+ }, null, 8, ["attributes", "modelValue"])])) : U("", !0), z.value.length ? (m(), k("div", Pl, [X.value.length && !S.value ? (m(), k("div", Al, [g("p", Rl, K(a(t)("menu.product.table.selection.count", {
1296
1307
  count: X.value.length
1297
- })), 1), d(v, {
1298
- label: a(l)("menu.product.table.selection.actions.deselect_all"),
1308
+ })), 1), d(p, {
1309
+ label: a(t)("menu.product.table.selection.actions.deselect_all"),
1299
1310
  type: "button",
1300
1311
  variant: "plain",
1301
1312
  onClick: ye
1302
- }, null, 8, ["label"]), d(v, {
1303
- "border-color": a(q).SystemError300,
1304
- "text-color": a(q).SystemError300,
1313
+ }, null, 8, ["label"]), d(p, {
1314
+ "border-color": a(W).SystemError300,
1315
+ "text-color": a(W).SystemError300,
1305
1316
  class: "ml-auto",
1306
- label: a(l)("menu.product.table.selection.actions.remove"),
1317
+ label: a(t)("menu.product.table.selection.actions.remove"),
1307
1318
  "prepend-icon": "delete",
1308
1319
  variant: "secondary",
1309
1320
  onClick: st
1310
- }, null, 8, ["border-color", "text-color", "label"])])) : U("", !0), S.value ? (m(), C("div", Ul, [d(v, {
1321
+ }, null, 8, ["border-color", "text-color", "label"])])) : U("", !0), S.value ? (m(), k("div", Ul, [d(p, {
1311
1322
  variant: a(ee).Tertiary,
1312
- label: a(l)("menu.product.table.bulk_edit.actions.reset_all"),
1323
+ label: a(t)("menu.product.table.bulk_edit.actions.reset_all"),
1313
1324
  onClick: he
1314
- }, null, 8, ["variant", "label"]), d(v, {
1325
+ }, null, 8, ["variant", "label"]), d(p, {
1315
1326
  variant: a(ee).Tertiary,
1316
- label: a(l)("menu.common.actions.cancel"),
1327
+ label: a(t)("menu.common.actions.cancel"),
1317
1328
  onClick: $e
1318
- }, null, 8, ["variant", "label"]), d(v, {
1319
- borderColor: a(q).ColorPrimary,
1320
- textColor: a(q).ColorPrimary,
1329
+ }, null, 8, ["variant", "label"]), d(p, {
1330
+ borderColor: a(W).ColorPrimary,
1331
+ textColor: a(W).ColorPrimary,
1321
1332
  variant: a(ee).Secondary,
1322
- label: a(l)("menu.product.table.bulk_edit.actions.save"),
1333
+ label: a(t)("menu.product.table.bulk_edit.actions.save"),
1323
1334
  type: "submit"
1324
1335
  }, null, 8, ["borderColor", "textColor", "variant", "label"])])) : U("", !0), g("div", {
1325
1336
  ref_key: "tableWrapper",
1326
1337
  ref: Ke
1327
1338
  }, [(m(), I(lt(S.value ? Pt : "div"), {
1328
1339
  ref: "fullWrapper",
1329
- title: S.value ? a(l)("menu.product.table.bulk_edit.title") : "",
1340
+ title: S.value ? a(t)("menu.product.table.bulk_edit.title") : "",
1330
1341
  show: S.value,
1331
1342
  "primary-action": {
1332
- label: a(l)("menu.product.table.bulk_edit.actions.save")
1343
+ label: a(t)("menu.product.table.bulk_edit.actions.save")
1333
1344
  },
1334
1345
  "secondary-actions": [{
1335
- label: a(l)("menu.product.table.bulk_edit.actions.reset_all"),
1346
+ label: a(t)("menu.product.table.bulk_edit.actions.reset_all"),
1336
1347
  click: he
1337
1348
  }, {
1338
- label: a(l)("menu.common.actions.cancel"),
1349
+ label: a(t)("menu.common.actions.cancel"),
1339
1350
  click: $e
1340
1351
  }],
1341
1352
  class: "overflow-x-scroll",
1342
1353
  style: ft(vt.value),
1343
- onOnPrimary: De,
1354
+ onOnPrimary: Oe,
1344
1355
  onOnCancel: $e
1345
1356
  }, {
1346
1357
  default: T(() => [d(x, {
@@ -1364,23 +1375,23 @@ const Ye = /* @__PURE__ */ K({
1364
1375
  onRowClick: r[3] || (r[3] = (_) => S.value ? void 0 : ct(_))
1365
1376
  }, null, 8, ["class", "modelValue", "column-defs", "column-visibility", "loading", "page-size", "row-data", "selection", "virtual-row-height"])]),
1366
1377
  _: 1
1367
- }, 40, ["title", "show", "primary-action", "secondary-actions", "style"]))], 512)])) : (m(), C("div", Ml, [d(be, {
1368
- subtitle: a(l)("menu.product.table.empty.subtitle"),
1369
- title: a(l)("menu.product.table.empty.title")
1378
+ }, 40, ["title", "show", "primary-action", "secondary-actions", "style"]))], 512)])) : (m(), k("div", Ml, [d(be, {
1379
+ subtitle: a(t)("menu.product.table.empty.subtitle"),
1380
+ title: a(t)("menu.product.table.empty.title")
1370
1381
  }, {
1371
- action: T(() => [g("div", Ol, [d(v, {
1382
+ action: T(() => [g("div", zl, [d(p, {
1372
1383
  variant: a(ee).Primary,
1373
- label: a(l)("menu.product.table.empty.actions.add"),
1384
+ label: a(t)("menu.product.table.empty.actions.add"),
1374
1385
  "prepend-icon": "add",
1375
1386
  onClick: r[4] || (r[4] = (_) => a(f).create(null))
1376
1387
  }, null, 8, ["variant", "label"]), d(Ye, null, {
1377
1388
  default: T(({
1378
1389
  trigger: _
1379
- }) => [d(v, {
1380
- "bg-color": a(q).NeutralGray100,
1381
- "text-color": a(q).NeutralGray400,
1390
+ }) => [d(p, {
1391
+ "bg-color": a(W).NeutralGray100,
1392
+ "text-color": a(W).NeutralGray400,
1382
1393
  variant: a(ee).Primary,
1383
- label: a(l)("menu.product.table.empty.actions.import"),
1394
+ label: a(t)("menu.product.table.empty.actions.import"),
1384
1395
  "prepend-icon": "download",
1385
1396
  onClick: _
1386
1397
  }, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])]),
@@ -1400,41 +1411,41 @@ const Ye = /* @__PURE__ */ K({
1400
1411
  }, la = { class: "flex flex-col flex-1 overflow-hidden" }, aa = {
1401
1412
  key: 1,
1402
1413
  class: "pt-16 xs:pt-8 space-y-24"
1403
- }, oa = { class: "flex items-center gap-8 px-16" }, Fa = /* @__PURE__ */ K({
1414
+ }, oa = { class: "flex items-center gap-8 px-16" }, Va = /* @__PURE__ */ N({
1404
1415
  __name: "Product",
1405
- setup(k) {
1406
- const e = Ve(), n = h(() => e.rules.item), i = ot(), l = h(() => !e.state.currentCatalogId), u = h(() => e.rules.item), t = h(() => !e.state.currentSchedulerId), s = V(!1), f = V(!1), p = h(() => {
1416
+ setup(C) {
1417
+ const e = Fe(), i = h(() => e.rules.item), n = ot(), t = h(() => !e.state.currentCatalogId), u = h(() => e.rules.item), l = h(() => !e.state.currentSchedulerId), v = F(!1), f = F(!1), s = h(() => {
1407
1418
  var $, P, A, ue;
1408
- if (l.value && t.value) return;
1409
- if (t.value) {
1410
- const G = ($ = e.currentCatalog) == null ? void 0 : $.override.items;
1411
- return G ? Object.entries(G).reduce((N, [M, ie]) => {
1412
- const j = ie.find((ce) => !ce.combinationKey);
1413
- return j && (N[M] = j), N;
1419
+ if (t.value && l.value) return;
1420
+ if (l.value) {
1421
+ const L = ($ = e.currentCatalog) == null ? void 0 : $.override.items;
1422
+ return L ? Object.entries(L).reduce((j, [M, ie]) => {
1423
+ const E = ie.find((ce) => !ce.combinationKey);
1424
+ return E && (j[M] = E), j;
1414
1425
  }, {}) : {};
1415
1426
  }
1416
- return ((l.value ? (P = e.currentScheduler) == null ? void 0 : P.items : (ue = (A = e.currentCatalog) == null ? void 0 : A.override.scheduler[e.state.currentSchedulerId]) == null ? void 0 : ue.items) ?? []).reduce((G, N) => (N.combinationKey || (G[N._id] = N), G), {});
1417
- }), b = V({}), y = V({}), w = async () => {
1418
- var ue, G;
1427
+ return ((t.value ? (P = e.currentScheduler) == null ? void 0 : P.items : (ue = (A = e.currentCatalog) == null ? void 0 : A.override.scheduler[e.state.currentSchedulerId]) == null ? void 0 : ue.items) ?? []).reduce((L, j) => (j.combinationKey || (L[j._id] = j), L), {});
1428
+ }), b = F({}), y = F({}), w = async () => {
1429
+ var ue, L;
1419
1430
  f.value = !0;
1420
- const R = !!p.value, $ = ge.flatten(Y.value.map((N) => N.items)), P = R && s.value ? await Vt(
1431
+ const R = !!s.value, $ = ge.flatten(Y.value.map((j) => j.items)), P = R && v.value ? await Ft(
1421
1432
  e.mergedMenu,
1422
1433
  $,
1423
1434
  e.state.menu,
1424
1435
  (ue = e.currentCatalog) == null ? void 0 : ue._id,
1425
- (G = e.currentScheduler) == null ? void 0 : G._id,
1436
+ (L = e.currentScheduler) == null ? void 0 : L._id,
1426
1437
  !1
1427
- ) : void 0, A = $.reduce((N, M, ie) => {
1438
+ ) : void 0, A = $.reduce((j, M, ie) => {
1428
1439
  var ce, le, X, ye;
1429
- const j = (ce = p.value) == null ? void 0 : ce[M._id];
1430
- return N[M._id] = {
1440
+ const E = (ce = s.value) == null ? void 0 : ce[M._id];
1441
+ return j[M._id] = {
1431
1442
  _id: M._id,
1432
1443
  name: M.name,
1433
- code: R ? j == null ? void 0 : j.code : M == null ? void 0 : M.code,
1444
+ code: R ? E == null ? void 0 : E.code : M == null ? void 0 : M.code,
1434
1445
  category: M.category,
1435
1446
  additionalCategories: M.additionalCategories,
1436
- price: R && u.value.editPrice ? j == null ? void 0 : j.price : M.price,
1437
- orderFrom: R ? j == null ? void 0 : j.orderFrom : M.orderFrom,
1447
+ price: R && u.value.editPrice ? E == null ? void 0 : E.price : M.price,
1448
+ orderFrom: R ? E == null ? void 0 : E.orderFrom : M.orderFrom,
1438
1449
  taxes: R ? null : M.taxes,
1439
1450
  thumbnail: M.thumbnail,
1440
1451
  fallbackPrice: (le = P == null ? void 0 : P[ie]) == null ? void 0 : le.price,
@@ -1442,10 +1453,10 @@ const Ye = /* @__PURE__ */ K({
1442
1453
  fallbackCode: (X = P == null ? void 0 : P[ie]) == null ? void 0 : X.code,
1443
1454
  fallbackOrder: (ye = P == null ? void 0 : P[ie]) == null ? void 0 : ye.orderFrom,
1444
1455
  fallbackTaxes: R ? M.taxes : null
1445
- }, N;
1456
+ }, j;
1446
1457
  }, {});
1447
1458
  b.value = A, y.value = { ...A }, f.value = !1;
1448
- }, { categories: W, selectedCategories: Y } = Se(), S = V(null);
1459
+ }, { categories: z, selectedCategories: Y } = Se(), S = F(null);
1449
1460
  function oe() {
1450
1461
  S.value && S.value.toggleAttributeFilter();
1451
1462
  }
@@ -1453,15 +1464,15 @@ const Ye = /* @__PURE__ */ K({
1453
1464
  Y.value && await w();
1454
1465
  });
1455
1466
  function Z() {
1456
- i.create(null);
1467
+ n.create(null);
1457
1468
  }
1458
1469
  const re = () => {
1459
1470
  Y.value && w();
1460
- }, { t: E } = Ie(), D = h(() => {
1471
+ }, { t: G } = Ie(), B = h(() => {
1461
1472
  var R, $;
1462
1473
  return ($ = (R = e.currentCatalog) == null ? void 0 : R.linkItemRules) == null ? void 0 : $.length;
1463
1474
  }), {
1464
- menuItems: O,
1475
+ menuItems: D,
1465
1476
  categories: H,
1466
1477
  linkItemRules: J,
1467
1478
  handleSubmit: ne,
@@ -1469,8 +1480,8 @@ const Ye = /* @__PURE__ */ K({
1469
1480
  schedulerManager: se
1470
1481
  } = kt(!1);
1471
1482
  return (R, $) => {
1472
- const P = z("fm-button");
1473
- return a(W).length ? (m(), C("div", ea, [
1483
+ const P = O("fm-button");
1484
+ return a(z).length ? (m(), k("div", ea, [
1474
1485
  g("div", ta, [
1475
1486
  g("div", la, [
1476
1487
  a(Y) ? (m(), I(Xl, {
@@ -1482,12 +1493,12 @@ const Ye = /* @__PURE__ */ K({
1482
1493
  "original-value": y.value,
1483
1494
  "onUpdate:modelValue": $[1] || ($[1] = (A) => b.value = A),
1484
1495
  "onReset:modelValue": re,
1485
- "onUpdate:editing": $[2] || ($[2] = (A) => s.value = A)
1496
+ "onUpdate:editing": $[2] || ($[2] = (A) => v.value = A)
1486
1497
  }, {
1487
1498
  filter: T(() => [
1488
1499
  d(He, { onToggleAttributeFilter: oe }),
1489
1500
  u.value.multiScheduler ? (m(), I(qe, { key: 0 })) : U("", !0),
1490
- D.value ? (m(), I(Le, {
1501
+ B.value ? (m(), I(Le, {
1491
1502
  key: 1,
1492
1503
  "current-restaurant-attr-params": a(e).state.currentRestaurantAttrParams,
1493
1504
  onConfirm: $[0] || ($[0] = (A) => a(e).setRestaurantAttrParams(A))
@@ -1497,44 +1508,44 @@ const Ye = /* @__PURE__ */ K({
1497
1508
  }, 8, ["is-calculating", "model-value", "original-value"])) : U("", !0)
1498
1509
  ])
1499
1510
  ])
1500
- ])) : (m(), C("div", aa, [
1511
+ ])) : (m(), k("div", aa, [
1501
1512
  g("div", oa, [
1502
1513
  d(He),
1503
1514
  u.value.multiScheduler ? (m(), I(qe, { key: 0 })) : U("", !0),
1504
- D.value ? (m(), I(Le, {
1515
+ B.value ? (m(), I(Le, {
1505
1516
  key: 1,
1506
1517
  "current-restaurant-attr-params": a(e).state.currentRestaurantAttrParams,
1507
1518
  onConfirm: $[3] || ($[3] = (A) => a(e).setRestaurantAttrParams(A))
1508
1519
  }, null, 8, ["current-restaurant-attr-params"])) : U("", !0)
1509
1520
  ]),
1510
- n.value.create ? (m(), I(be, {
1521
+ i.value.create ? (m(), I(be, {
1511
1522
  key: 0,
1512
1523
  action: {
1513
- text: a(E)("menu.product.empty.with_create.action"),
1524
+ text: a(G)("menu.product.empty.with_create.action"),
1514
1525
  callback: Z
1515
1526
  },
1516
- subtitle: a(E)("menu.product.empty.with_create.subtitle"),
1517
- title: a(E)("menu.product.empty.with_create.title")
1518
- }, null, 8, ["action", "subtitle", "title"])) : t.value ? (m(), I(be, {
1527
+ subtitle: a(G)("menu.product.empty.with_create.subtitle"),
1528
+ title: a(G)("menu.product.empty.with_create.title")
1529
+ }, null, 8, ["action", "subtitle", "title"])) : l.value ? (m(), I(be, {
1519
1530
  key: 1,
1520
- subtitle: a(E)("menu.product.empty.no_scheduler.subtitle"),
1521
- title: a(E)("menu.product.empty.no_scheduler.title")
1531
+ subtitle: a(G)("menu.product.empty.no_scheduler.subtitle"),
1532
+ title: a(G)("menu.product.empty.no_scheduler.title")
1522
1533
  }, {
1523
1534
  action: T(() => [
1524
1535
  d(Ge, {
1525
1536
  "categorized-items": a(Q).linkableItems.value,
1526
1537
  "initial-value": a(Q).currentItems.value,
1527
1538
  "show-variant": !1,
1528
- "menu-items": a(O),
1539
+ "menu-items": a(D),
1529
1540
  categories: a(H),
1530
1541
  "link-item-rules": a(J),
1531
- "no-scheduler": t.value,
1542
+ "no-scheduler": l.value,
1532
1543
  "is-local-only": !0,
1533
1544
  onSubmit: a(ne)
1534
1545
  }, {
1535
1546
  default: T(({ trigger: A }) => [
1536
1547
  d(P, {
1537
- label: a(E)("menu.common.actions.link_product"),
1548
+ label: a(G)("menu.common.actions.link_product"),
1538
1549
  "prepend-icon": "link",
1539
1550
  onClick: A
1540
1551
  }, null, 8, ["label", "onClick"])
@@ -1545,24 +1556,24 @@ const Ye = /* @__PURE__ */ K({
1545
1556
  _: 1
1546
1557
  }, 8, ["subtitle", "title"])) : (m(), I(be, {
1547
1558
  key: 2,
1548
- subtitle: a(E)("menu.product.empty.with_scheduler.subtitle"),
1549
- title: a(E)("menu.product.empty.with_scheduler.title")
1559
+ subtitle: a(G)("menu.product.empty.with_scheduler.subtitle"),
1560
+ title: a(G)("menu.product.empty.with_scheduler.title")
1550
1561
  }, {
1551
1562
  action: T(() => [
1552
1563
  d(Ge, {
1553
1564
  "categorized-items": a(se).linkableItems.value,
1554
1565
  "initial-value": a(se).currentItems.value,
1555
1566
  "show-variant": !1,
1556
- "menu-items": a(O),
1567
+ "menu-items": a(D),
1557
1568
  categories: a(H),
1558
1569
  "link-item-rules": a(J),
1559
- "no-scheduler": t.value,
1570
+ "no-scheduler": l.value,
1560
1571
  "is-local-only": !0,
1561
1572
  onSubmit: a(ne)
1562
1573
  }, {
1563
1574
  default: T(({ trigger: A }) => [
1564
1575
  d(P, {
1565
- label: a(E)("menu.common.actions.apply_product"),
1576
+ label: a(G)("menu.common.actions.apply_product"),
1566
1577
  onClick: A
1567
1578
  }, null, 8, ["label", "onClick"])
1568
1579
  ]),
@@ -1577,5 +1588,5 @@ const Ye = /* @__PURE__ */ K({
1577
1588
  });
1578
1589
  export {
1579
1590
  Ye as _,
1580
- Fa as a
1591
+ Va as a
1581
1592
  };