@feedmepos/mf-menu 0.31.74 → 0.31.75-prod

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/{App-B6Hn5Wwr.js → App-Cw2D3IXT.js} +528 -585
  2. package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-CFtcqy58.js +161 -0
  3. package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-CnCoRLDg.js +74 -0
  4. package/dist/{Catalog-D-2hDU2I.js → Catalog-B5kAKdVW.js} +9 -9
  5. package/dist/{Category-hSOIgBkH.js → Category-CAd9BTRX.js} +8 -8
  6. package/dist/{Category-DjTbuAvE.js → Category-DKjU47aW.js} +5 -5
  7. package/dist/{CookingGuide-D7ruB7eP.js → CookingGuide-BN739JkB.js} +7 -7
  8. package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-mxVSGXAz.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-gii2CTYD.js} +3 -3
  9. package/dist/{Group-evJZbgZn.js → Group-DmII5Nwf.js} +4 -4
  10. package/dist/{Group-CjlhbhDV.js → Group-DnpVxZkN.js} +1 -1
  11. package/dist/{Group.vue_vue_type_script_setup_true_lang-DiKraPiw.js → Group.vue_vue_type_script_setup_true_lang-BEeCwmKt.js} +163 -163
  12. package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BYku8MAc.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-DB5B3PLx.js} +90 -90
  13. package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-DScxctPb.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-BEISm7uc.js} +3046 -3046
  14. package/dist/{Ingredient-jNDx1pUw.js → Ingredient-CpuyDF4n.js} +30 -30
  15. package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-CuM_k-C3.js → InventoryBinding.vue_vue_type_script_setup_true_lang-GHiwD8VV.js} +1112 -1112
  16. package/dist/{LinkProductSideSheet-CAPIdf6P.js → LinkProductSideSheet-DrSKOBLg.js} +129 -129
  17. package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-Bm_hSelC.js +69 -0
  18. package/dist/{MenuSetting-C2MDgy57.js → MenuSetting-BNuIUnjz.js} +138 -138
  19. package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js → PageLayout.vue_vue_type_script_setup_true_lang-vFqWGM6P.js} +8 -8
  20. package/dist/{PrintRoute-SmWbKr9Y.js → PrintRoute-Dl0oWYju.js} +6 -6
  21. package/dist/{Product-BCm49V9T.js → Product-IQBP1vvY.js} +1 -1
  22. package/dist/{Product.vue_vue_type_script_setup_true_lang-CTOjLqbF.js → Product.vue_vue_type_script_setup_true_lang-Bdss6VRj.js} +607 -607
  23. package/dist/{ProductInternalTools-DGsvvnIs.js → ProductInternalTools-Dkhbg1WE.js} +11 -11
  24. package/dist/{Products-D4qeSEfO.js → Products-Dcafs3Lk.js} +59 -59
  25. package/dist/{Publish-3A3EEQ9x.js → Publish-BTuO4AlR.js} +6 -6
  26. package/dist/{Recipe-CS7TZGA6.js → Recipe-Dx2ZkHsk.js} +6 -6
  27. package/dist/{Scheduler-BIwTUJMJ.js → Scheduler-Dh_0J2g9.js} +5 -5
  28. package/dist/{ServingSequence-C0N8wJfr.js → ServingSequence-DXhx9dcu.js} +5 -5
  29. package/dist/{Setting-fA6tvQK2.js → Setting-4x_w46t_.js} +5 -5
  30. package/dist/{Subcategory-BAFAmflQ.js → Subcategory-vztBpQnB.js} +6 -6
  31. package/dist/{Takeaway-D4aO8zzN.js → Takeaway-CDgIyUrN.js} +5 -5
  32. package/dist/{Takeaway-CLZouw1j.js → Takeaway-Dz5PxJk_.js} +1 -1
  33. package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-1oN-i9bo.js → Takeaway.vue_vue_type_script_setup_true_lang-BMMXiDFL.js} +6 -6
  34. package/dist/{TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js → TextChip.vue_vue_type_script_setup_true_lang-BJMcI3U2.js} +5 -5
  35. package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-Dwol_Lkd.js → Thumbnail.vue_vue_type_script_setup_true_lang-DJ8JMV28.js} +74 -74
  36. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-cTzWxjM4.js +5996 -0
  37. package/dist/{Unit-ByqUb4Po.js → Unit-z7OVmlSq.js} +4 -4
  38. package/dist/{Variant-BmqrUfen.js → Variant-CFRgvlXf.js} +5 -5
  39. package/dist/{_id_-RUWzOB0B.js → _id_-B9q3j4_m.js} +11 -11
  40. package/dist/{app-B1N2F0j8.js → app-CdsS_tMb.js} +1 -1
  41. package/dist/app-CkCBPor3.js +363 -0
  42. package/dist/{app-5fxKLAzS.js → app-CzXxFrl1.js} +447 -447
  43. package/dist/app.js +1 -1
  44. package/dist/apps/mf-menu/src/app.d.ts +0 -1
  45. package/dist/apps/mf-menu/src/components/feature/CategoryManager/CategoriesSelector.vue.d.ts +1 -1
  46. package/dist/apps/mf-menu/src/components/feature/MenuSelector.vue.d.ts +1 -1
  47. package/dist/apps/mf-menu/src/components/feature/SubcategoryManager/SubcategorySelector.vue.d.ts +1 -1
  48. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  49. package/dist/assets/linked-status-B8qYyYR6.js +13 -0
  50. package/dist/assets/override-menu-nmSTTTn7.js +13 -0
  51. package/dist/assets/validate-menu-CF1XZECU.js +13 -0
  52. package/dist/{catalog-CarmtheV.js → catalog-DBBEUpMo.js} +1 -1
  53. package/dist/{catalogSetting-BqrTpBP8.js → catalogSetting-DKvBjleU.js} +1 -1
  54. package/dist/{category-5R83ypNS.js → category-DILExwHL.js} +1 -1
  55. package/dist/{currency-CUl4r9rT.js → currency-B7Xm1xZJ.js} +1 -1
  56. package/dist/customAttributes-DrA0YC82.js +180 -0
  57. package/dist/{index-Ttqt4iFV.js → index-2lrKSO_O.js} +20 -20
  58. package/dist/{index-DlwLw-BQ.js → index-BoVEGKz7.js} +91 -91
  59. package/dist/{index-DAWSNP3G.js → index-Bu5LuO1j.js} +4 -4
  60. package/dist/{index-DUfYYdZ-.js → index-SNNvjtFa.js} +56 -56
  61. package/dist/{index.vue_vue_type_script_setup_true_lang-BgqsTzLI.js → index.vue_vue_type_script_setup_true_lang-B1_JqsYF.js} +16 -16
  62. package/dist/{item-B0UPYxsB.js → item-BnOnvN8x.js} +3091 -3174
  63. package/dist/{iteration-CfmAZiOO.js → iteration-Csz_aSxy.js} +3 -3
  64. package/dist/{jszip.min-zROpry0S.js → jszip.min-B0T3I-lE.js} +329 -329
  65. package/dist/{menu-DAac726D.js → menu-3XEn1C9F.js} +6402 -6332
  66. package/dist/{menu-DpYo8dYR.js → menu-DzbYSPGP.js} +1 -1
  67. package/dist/{menuV2-DZj_FPqR.js → menuV2-cXg54GYW.js} +93 -93
  68. package/dist/mf-menu.css +1 -1
  69. package/dist/packages/shared/src/components/form/SelectFilter.vue.d.ts +1 -1
  70. package/dist/{priceTier-BvDLl8v2.js → priceTier-DVd27LFd.js} +1 -1
  71. package/dist/{scheduler-pNUXG6En.js → scheduler-D8IgBrUX.js} +6 -6
  72. package/dist/{subcategory-DCDCQnAX.js → subcategory-BOpm3s8K.js} +2 -2
  73. package/dist/{toExcel-DqMa1Hn8.js → toExcel-BJM3fOB2.js} +2 -2
  74. package/dist/{unit-CuCXoWPG.js → unit-DF9d3piP.js} +151 -151
  75. package/dist/{vuedraggable-CK8z7qA8.js → vuedraggable-DnBIRDMr.js} +2 -2
  76. package/package.json +5 -5
  77. package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-CqGU3bJQ.js +0 -161
  78. package/dist/BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js +0 -74
  79. package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +0 -69
  80. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CabQS55D.js +0 -6012
  81. package/dist/app-CHpw_EM1.js +0 -2101
  82. package/dist/apps/mf-menu/src/components/feature/RemyButton.vue.d.ts +0 -15
  83. package/dist/apps/mf-menu/src/components/feature/RemyDialog.vue.d.ts +0 -15
  84. package/dist/apps/mf-menu/src/helper/remy.d.ts +0 -5
  85. package/dist/assets/linked-status-CFdi7K3K.js +0 -13
  86. package/dist/assets/override-menu-CXOY8i3w.js +0 -13
  87. package/dist/assets/validate-menu-DLlrsx2f.js +0 -13
  88. package/dist/customAttributes-BkqKM_KW.js +0 -180
@@ -1,24 +1,24 @@
1
- import { defineComponent as be, ref as g, computed as A, watch as ve, resolveComponent as I, createElementBlock as S, openBlock as v, Fragment as M, renderSlot as _e, createVNode as u, unref as l, withCtx as p, createBlock as T, createCommentVNode as z, createElementVNode as _, toDisplayString as Y, renderList as Re } from "vue";
2
- import { H as F, Q as ye, u as q, z as Ae, I as J } from "./menu-DAac726D.js";
3
- import { b as U } from "./app-5fxKLAzS.js";
1
+ import { defineComponent as be, ref as g, computed as A, watch as ve, resolveComponent as I, createElementBlock as S, openBlock as v, Fragment as L, renderSlot as _e, createVNode as u, unref as l, withCtx as p, createBlock as M, createCommentVNode as T, createElementVNode as _, toDisplayString as Y, renderList as Re } from "vue";
2
+ import { H as F, Q as ye, u as q, z as Ae, I as J } from "./menu-3XEn1C9F.js";
3
+ import { b as U } from "./app-CzXxFrl1.js";
4
4
  import { useI18n as ke, useCustomAttributes as K, useCoreStore as Ce, ItemSelector as he, EMPTY_RULE as B, isEmptyRule as W } from "@feedmepos/mf-common";
5
5
  import { components as Ve, FmButtonVariant as X } from "@feedmepos/ui-library";
6
- import { c as ge, u as Ie, a as h, m as O, f as E } from "./customAttributes-BkqKM_KW.js";
6
+ import { c as ge, u as Ie, a as h, m as O, f as E } from "./customAttributes-DrA0YC82.js";
7
7
  import { u as Se } from "./discardConfirm-BHni0LNu.js";
8
- import { u as we } from "./menuV2-DZj_FPqR.js";
8
+ import { u as we } from "./menuV2-cXg54GYW.js";
9
9
  import { c as Fe } from "./check-C9mY6LiX.js";
10
10
  /* empty css */
11
- const Ue = (c, N) => {
12
- const s = c.__vccOpts || c;
13
- for (const [w, i] of N)
14
- s[w] = i;
15
- return s;
11
+ const Ue = (s, N) => {
12
+ const o = s.__vccOpts || s;
13
+ for (const [w, m] of N)
14
+ o[w] = m;
15
+ return o;
16
16
  };
17
- var d = /* @__PURE__ */ ((c) => (c[c.Normal = 0] = "Normal", c[c.Rules = 1] = "Rules", c))(d || {});
17
+ var c = /* @__PURE__ */ ((s) => (s[s.Normal = 0] = "Normal", s[s.Rules = 1] = "Rules", s))(c || {});
18
18
  const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
19
19
  key: 1,
20
20
  class: "flex items-center gap-12"
21
- }, Ee = { class: "flex items-center gap-8" }, Ne = { class: "text-neutral-600 fm-typo-body-sm" }, Le = { class: "grid md:grid-cols-3 gap-16" }, Me = { class: "md:col-span-2 space-y-16" }, Te = { class: "flex justify-end" }, ze = { class: "flex gap-8 items-center justify-start" }, De = /* @__PURE__ */ be({
21
+ }, Ee = { class: "flex items-center gap-8" }, Ne = { class: "text-neutral-600 fm-typo-body-sm" }, xe = { class: "grid md:grid-cols-3 gap-16" }, Le = { class: "md:col-span-2 space-y-16" }, Me = { class: "flex justify-end" }, Te = { class: "flex gap-8 items-center justify-start" }, ze = /* @__PURE__ */ be({
22
22
  __name: "LinkProductSideSheet",
23
23
  props: {
24
24
  initialValue: { default: () => [] },
@@ -35,103 +35,103 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
35
35
  useCloseBtn: { type: Boolean }
36
36
  },
37
37
  emits: ["submit"],
38
- setup(c, { emit: N }) {
39
- const s = c, w = N, { t: i } = ke(), k = g(d.Normal);
40
- function Z(e) {
41
- k.value = e;
38
+ setup(s, { emit: N }) {
39
+ const o = s, w = N, { t: m } = ke(), k = g(c.Normal);
40
+ function Z(t) {
41
+ k.value = t;
42
42
  }
43
- const f = g(!1), D = (e) => {
44
- Fe.isBoolean(e) ? f.value = e : f.value = !f.value;
43
+ const f = g(!1), z = (t) => {
44
+ Fe.isBoolean(t) ? f.value = t : f.value = !f.value;
45
45
  };
46
- function L(e) {
47
- return e.reduce((t, a) => (t[a._id] = [...t[a._id] ?? [], a], t), {});
46
+ function x(t) {
47
+ return t.reduce((e, a) => (e[a._id] = [...e[a._id] ?? [], a], e), {});
48
48
  }
49
- const ee = s.initialValue, V = g(L(F(ee))), Q = A(() => Object.values(V.value).flatMap((e) => e)), { itemAttributes: te, convertCategoryIdToName: le, convertCategoryNameToId: ae } = ge({
50
- menuItems: A(() => s.menuItems || []),
51
- categories: A(() => s.categories || [])
52
- }), j = g(
53
- F(s.linkItemRules)
54
- ), r = g();
55
- function x() {
56
- var e;
57
- return (e = j.value) == null ? void 0 : e.map((t) => {
58
- var a, n, b, R;
49
+ const ee = o.initialValue, V = g(x(F(ee))), D = A(() => Object.values(V.value).flatMap((t) => t)), { itemAttributes: te, convertCategoryIdToName: le, convertCategoryNameToId: ae } = ge({
50
+ menuItems: A(() => o.menuItems || []),
51
+ categories: A(() => o.categories || [])
52
+ }), Q = g(
53
+ F(o.linkItemRules)
54
+ ), n = g();
55
+ function j() {
56
+ var t;
57
+ return (t = Q.value) == null ? void 0 : t.map((e) => {
58
+ var a, i, b, R;
59
59
  return {
60
- ...t,
60
+ ...e,
61
61
  restaurantRule: {
62
- restaurantAttributes: O((a = t.restaurantRule) == null ? void 0 : a.restaurantAttributes),
63
- restaurantCustomAttributes: O((n = t.restaurantRule) == null ? void 0 : n.restaurantCustomAttributes)
62
+ restaurantAttributes: O((a = e.restaurantRule) == null ? void 0 : a.restaurantAttributes),
63
+ restaurantCustomAttributes: O((i = e.restaurantRule) == null ? void 0 : i.restaurantCustomAttributes)
64
64
  },
65
65
  itemRule: {
66
- itemAttributes: le(O((b = t.itemRule) == null ? void 0 : b.itemAttributes)),
67
- itemCustomAttributes: O((R = t.itemRule) == null ? void 0 : R.itemCustomAttributes)
66
+ itemAttributes: le(O((b = e.itemRule) == null ? void 0 : b.itemAttributes)),
67
+ itemCustomAttributes: O((R = e.itemRule) == null ? void 0 : R.itemCustomAttributes)
68
68
  }
69
69
  };
70
70
  });
71
71
  }
72
- r.value = x();
72
+ n.value = j();
73
73
  function G() {
74
- var e;
75
- return (e = r.value) == null ? void 0 : e.map((t) => {
76
- var a, n, b, R;
74
+ var t;
75
+ return (t = n.value) == null ? void 0 : t.map((e) => {
76
+ var a, i, b, R;
77
77
  return {
78
- ...t,
78
+ ...e,
79
79
  restaurantRule: {
80
- restaurantAttributes: E((a = t.restaurantRule) == null ? void 0 : a.restaurantAttributes),
81
- restaurantCustomAttributes: E((n = t.restaurantRule) == null ? void 0 : n.restaurantCustomAttributes)
80
+ restaurantAttributes: E((a = e.restaurantRule) == null ? void 0 : a.restaurantAttributes),
81
+ restaurantCustomAttributes: E((i = e.restaurantRule) == null ? void 0 : i.restaurantCustomAttributes)
82
82
  },
83
83
  itemRule: {
84
- itemAttributes: E(ae((b = t.itemRule) == null ? void 0 : b.itemAttributes)),
85
- itemCustomAttributes: E((R = t.itemRule) == null ? void 0 : R.itemCustomAttributes)
84
+ itemAttributes: E(ae((b = e.itemRule) == null ? void 0 : b.itemAttributes)),
85
+ itemCustomAttributes: E((R = e.itemRule) == null ? void 0 : R.itemCustomAttributes)
86
86
  }
87
87
  };
88
88
  });
89
89
  }
90
90
  const ue = Se(
91
91
  () => {
92
- const e = G() ?? null;
93
- return !J.isEqual(L(s.initialValue), V.value) || !J.isEqual(s.linkItemRules, e);
92
+ const t = G() ?? null;
93
+ return !J.isEqual(x(o.initialValue), V.value) || !J.isEqual(o.linkItemRules, t);
94
94
  },
95
95
  () => {
96
96
  f.value = !1;
97
97
  }
98
98
  );
99
99
  function se() {
100
- k.value === d.Rules ? w("submit", {
101
- mode: d.Rules,
100
+ k.value === c.Rules ? w("submit", {
101
+ mode: c.Rules,
102
102
  linkItemRules: G() ?? []
103
103
  }) : w("submit", {
104
- mode: d.Normal,
105
- items: Q.value
104
+ mode: c.Normal,
105
+ items: D.value
106
106
  }), f.value = !1;
107
107
  }
108
108
  ve(
109
109
  () => f.value,
110
110
  () => {
111
- V.value = L(F(s.initialValue)), j.value = F(s.linkItemRules), r.value = x(), k.value = s.noScheduler && s.linkItemRules && s.linkItemRules.length > 0 ? d.Rules : d.Normal;
111
+ V.value = x(F(o.initialValue)), Q.value = F(o.linkItemRules), n.value = j(), k.value = o.noScheduler && o.linkItemRules && o.linkItemRules.length > 0 ? c.Rules : c.Normal;
112
112
  }
113
113
  );
114
114
  const oe = A(() => {
115
- const e = ye();
116
- return Object.values(e).sort((t, a) => a.sortingIndex - t.sortingIndex).map((t) => ({ label: t.label, value: t.value }));
115
+ const t = ye();
116
+ return Object.values(t).sort((e, a) => a.sortingIndex - e.sortingIndex).map((e) => ({ label: e.label, value: e.value }));
117
117
  }), re = A(
118
118
  () => {
119
- var e;
120
- return (((e = q().state.menu.ruleGroupSettings) == null ? void 0 : e.groups) || []).map((t) => ({
121
- label: t.name,
122
- value: t._id
119
+ var t;
120
+ return (((t = q().state.menu.ruleGroupSettings) == null ? void 0 : t.groups) || []).map((e) => ({
121
+ label: e.name,
122
+ value: e._id
123
123
  }));
124
124
  }
125
125
  ), { attributes: ne } = K({
126
126
  valueSource: Ce().restaurants,
127
127
  entity: "restaurant"
128
- }), { restaurantAttributes: ie } = Ie(), me = A(() => s.menuItems || []), { attributes: de } = K({
128
+ }), { restaurantAttributes: ie } = Ie(), me = A(() => o.menuItems || []), { attributes: de } = K({
129
129
  valueSource: me,
130
130
  entity: "item"
131
131
  });
132
132
  function ce() {
133
- const e = [
134
- ...r.value || [],
133
+ const t = [
134
+ ...n.value || [],
135
135
  {
136
136
  orderFrom: Ae.F_ORDER_FROM.enum.ALL,
137
137
  restaurantRule: {
@@ -144,36 +144,36 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
144
144
  }
145
145
  }
146
146
  ];
147
- r.value = e;
147
+ n.value = t;
148
148
  }
149
- function pe(e) {
150
- if (!r.value) return;
151
- const t = [...r.value];
152
- t.splice(e, 1), r.value = t.length ? t : [];
149
+ function pe(t) {
150
+ if (!n.value) return;
151
+ const e = [...n.value];
152
+ e.splice(t, 1), n.value = e.length ? e : [];
153
153
  }
154
- function $(e, t, a) {
155
- if (!r.value) return;
156
- const n = [...r.value];
157
- W(t) ? n[e].restaurantRule[a] = null : n[e].restaurantRule[a] = t, r.value = n;
154
+ function $(t, e, a) {
155
+ if (!n.value) return;
156
+ const i = [...n.value];
157
+ W(e) ? i[t].restaurantRule[a] = null : i[t].restaurantRule[a] = e, n.value = i;
158
158
  }
159
- function P(e, t, a) {
160
- if (!r.value) return;
161
- const n = [...r.value];
162
- W(t) ? n[e].itemRule[a] = null : n[e].itemRule[a] = t, r.value = n;
159
+ function P(t, e, a) {
160
+ if (!n.value) return;
161
+ const i = [...n.value];
162
+ W(e) ? i[t].itemRule[a] = null : i[t].itemRule[a] = e, n.value = i;
163
163
  }
164
164
  const H = A(() => {
165
- const e = s.isLocalOnly ? we() : q();
166
- return s.noScheduler && e.currentCatalog;
165
+ const t = o.isLocalOnly ? we() : q();
166
+ return o.noScheduler && t.currentCatalog;
167
167
  });
168
- return (e, t) => {
169
- const a = I("fm-button"), n = I("fm-switch"), b = I("FmSelect"), R = I("FmCard"), fe = I("fm-side-sheet");
170
- return v(), S(M, null, [
171
- _e(e.$slots, "default", { trigger: D }, void 0, !0),
168
+ return (t, e) => {
169
+ const a = I("fm-button"), i = I("fm-switch"), b = I("FmSelect"), R = I("FmCard"), fe = I("fm-side-sheet");
170
+ return v(), S(L, null, [
171
+ _e(t.$slots, "default", { trigger: z }, void 0, !0),
172
172
  u(fe, {
173
173
  id: "group-form",
174
174
  modelValue: f.value,
175
- "onUpdate:modelValue": t[3] || (t[3] = (m) => f.value = m),
176
- "close-button": e.useCloseBtn,
175
+ "onUpdate:modelValue": e[3] || (e[3] = (d) => f.value = d),
176
+ "close-button": s.useCloseBtn,
177
177
  "is-container": l(Ve).FmForm,
178
178
  "is-container-props": {
179
179
  onValidationSuccess: se,
@@ -183,37 +183,37 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
183
183
  "onOn:clickedAway": l(ue)
184
184
  }, {
185
185
  "side-sheet-header": p(() => [
186
- e.useCloseBtn ? z("", !0) : (v(), T(a, {
186
+ s.useCloseBtn ? T("", !0) : (v(), M(a, {
187
187
  key: 0,
188
188
  variant: l(X).Tertiary,
189
189
  class: "cursor-pointer mr-4",
190
190
  "prepend-icon": "arrow_back",
191
- onClick: D
191
+ onClick: z
192
192
  }, null, 8, ["variant"])),
193
- _("p", Be, Y(e.title || l(i)("menu.link_product.title")), 1),
193
+ _("p", Be, Y(s.title || l(m)("menu.link_product.title")), 1),
194
194
  H.value ? (v(), S("div", Oe, [
195
195
  _("div", Ee, [
196
- u(n, {
197
- label: l(i)("menu.link_product.rules.section_title"),
198
- "model-value": k.value === l(d).Rules,
199
- "onUpdate:modelValue": t[0] || (t[0] = (m) => Z(m ? l(d).Rules : l(d).Normal))
196
+ u(i, {
197
+ label: l(m)("menu.link_product.rules.section_title"),
198
+ "model-value": k.value === l(c).Rules,
199
+ "onUpdate:modelValue": e[0] || (e[0] = (d) => Z(d ? l(c).Rules : l(c).Normal))
200
200
  }, null, 8, ["label", "model-value"])
201
201
  ])
202
- ])) : z("", !0)
202
+ ])) : T("", !0)
203
203
  ]),
204
204
  "side-sheet-footer": p(() => [
205
- _("div", ze, [
205
+ _("div", Te, [
206
206
  u(a, {
207
- label: l(i)("menu.common.actions.confirm"),
207
+ label: l(m)("menu.common.actions.confirm"),
208
208
  size: "lg",
209
209
  type: "submit",
210
210
  variant: "primary"
211
211
  }, null, 8, ["label"]),
212
212
  u(a, {
213
- label: l(i)("menu.common.actions.cancel"),
213
+ label: l(m)("menu.common.actions.cancel"),
214
214
  size: "lg",
215
215
  variant: "tertiary",
216
- onClick: t[2] || (t[2] = () => f.value = !1)
216
+ onClick: e[2] || (e[2] = () => f.value = !1)
217
217
  }, null, 8, ["label"])
218
218
  ])
219
219
  ]),
@@ -222,60 +222,60 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
222
222
  class: "py-8 px-8 overflow-y-auto space-y-24",
223
223
  key: k.value
224
224
  }, [
225
- k.value === l(d).Normal ? (v(), T(l(he), {
225
+ k.value === l(c).Normal ? (v(), M(l(he), {
226
226
  key: 0,
227
227
  "auto-focus-search": !0,
228
- "categorized-items": e.categorizedItems,
228
+ "categorized-items": s.categorizedItems,
229
229
  data: V.value,
230
- "select-variant": e.selectVariant,
231
- "selected-items": Q.value,
232
- "show-variant": e.showVariant,
233
- "show-addon": e.showAddon,
234
- "onUpdate:data": t[1] || (t[1] = (m) => V.value = m)
235
- }, null, 8, ["categorized-items", "data", "select-variant", "selected-items", "show-variant", "show-addon"])) : H.value ? (v(), S(M, { key: 1 }, [
236
- _("p", Ne, Y(l(i)("menu.link_product.rules.hint")), 1),
237
- (v(!0), S(M, null, Re(r.value, (m, C) => (v(), T(R, {
230
+ "select-variant": s.selectVariant,
231
+ "selected-items": D.value,
232
+ "show-variant": s.showVariant,
233
+ "show-addon": s.showAddon,
234
+ "onUpdate:data": e[1] || (e[1] = (d) => V.value = d)
235
+ }, null, 8, ["categorized-items", "data", "select-variant", "selected-items", "show-variant", "show-addon"])) : H.value ? (v(), S(L, { key: 1 }, [
236
+ _("p", Ne, Y(l(m)("menu.link_product.rules.hint")), 1),
237
+ (v(!0), S(L, null, Re(n.value, (d, C) => (v(), M(R, {
238
238
  key: C,
239
239
  class: "p-16 space-y-16",
240
240
  variant: "outlined"
241
241
  }, {
242
242
  default: p(() => [
243
- _("div", Le, [
243
+ _("div", xe, [
244
244
  u(h, {
245
- label: l(i)("menu.link_product.rules.order_from")
245
+ label: l(m)("menu.link_product.rules.order_from")
246
246
  }, {
247
247
  default: p(() => [
248
248
  u(b, {
249
249
  items: oe.value,
250
- modelValue: m.orderFrom,
251
- "onUpdate:modelValue": (o) => m.orderFrom = o
250
+ modelValue: d.orderFrom,
251
+ "onUpdate:modelValue": (r) => d.orderFrom = r
252
252
  }, null, 8, ["items", "modelValue", "onUpdate:modelValue"])
253
253
  ]),
254
254
  _: 2
255
255
  }, 1032, ["label"]),
256
256
  u(h, {
257
- label: l(i)("menu.rule_groups.title")
257
+ label: l(m)("menu.rule_groups.title")
258
258
  }, {
259
259
  default: p(() => [
260
260
  u(b, {
261
261
  items: re.value,
262
262
  multiselect: "",
263
- "model-value": m.ruleGroupIds || [],
264
- "onUpdate:modelValue": (o) => m.ruleGroupIds = o
263
+ "model-value": d.ruleGroupIds || [],
264
+ "onUpdate:modelValue": (r) => d.ruleGroupIds = r
265
265
  }, null, 8, ["items", "model-value", "onUpdate:modelValue"])
266
266
  ]),
267
267
  _: 2
268
268
  }, 1032, ["label"]),
269
- _("div", Me, [
269
+ _("div", Le, [
270
270
  u(h, {
271
- label: l(i)("menu.link_product.rules.restaurant_filter")
271
+ label: l(m)("menu.link_product.rules.restaurant_filter")
272
272
  }, {
273
273
  default: p(() => {
274
- var o;
274
+ var r;
275
275
  return [
276
276
  u(l(U), {
277
277
  attributes: l(ie),
278
- "model-value": ((o = m.restaurantRule) == null ? void 0 : o.restaurantAttributes) || l(B),
278
+ "model-value": ((r = d.restaurantRule) == null ? void 0 : r.restaurantAttributes) || l(B),
279
279
  "onUpdate:modelValue": (y) => $(C, y, "restaurantAttributes")
280
280
  }, null, 8, ["attributes", "model-value", "onUpdate:modelValue"])
281
281
  ];
@@ -283,14 +283,14 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
283
283
  _: 2
284
284
  }, 1032, ["label"]),
285
285
  u(h, {
286
- label: l(i)("menu.link_product.rules.restaurant_custom_attributes_filter")
286
+ label: l(m)("menu.link_product.rules.restaurant_custom_attributes_filter")
287
287
  }, {
288
288
  default: p(() => {
289
- var o;
289
+ var r;
290
290
  return [
291
291
  u(l(U), {
292
292
  attributes: l(ne),
293
- "model-value": ((o = m.restaurantRule) == null ? void 0 : o.restaurantCustomAttributes) || l(B),
293
+ "model-value": ((r = d.restaurantRule) == null ? void 0 : r.restaurantCustomAttributes) || l(B),
294
294
  "onUpdate:modelValue": (y) => $(C, y, "restaurantCustomAttributes")
295
295
  }, null, 8, ["attributes", "model-value", "onUpdate:modelValue"])
296
296
  ];
@@ -298,14 +298,14 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
298
298
  _: 2
299
299
  }, 1032, ["label"]),
300
300
  u(h, {
301
- label: l(i)("menu.link_product.rules.item_filter")
301
+ label: l(m)("menu.link_product.rules.item_filter")
302
302
  }, {
303
303
  default: p(() => {
304
- var o;
304
+ var r;
305
305
  return [
306
306
  u(l(U), {
307
307
  attributes: l(te),
308
- "model-value": ((o = m.itemRule) == null ? void 0 : o.itemAttributes) || l(B),
308
+ "model-value": ((r = d.itemRule) == null ? void 0 : r.itemAttributes) || l(B),
309
309
  "onUpdate:modelValue": (y) => P(C, y, "itemAttributes")
310
310
  }, null, 8, ["attributes", "model-value", "onUpdate:modelValue"])
311
311
  ];
@@ -313,14 +313,14 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
313
313
  _: 2
314
314
  }, 1032, ["label"]),
315
315
  u(h, {
316
- label: l(i)("menu.link_product.rules.item_custom_attributes_filter")
316
+ label: l(m)("menu.link_product.rules.item_custom_attributes_filter")
317
317
  }, {
318
318
  default: p(() => {
319
- var o;
319
+ var r;
320
320
  return [
321
321
  u(l(U), {
322
322
  attributes: l(de),
323
- "model-value": ((o = m.itemRule) == null ? void 0 : o.itemCustomAttributes) || l(B),
323
+ "model-value": ((r = d.itemRule) == null ? void 0 : r.itemCustomAttributes) || l(B),
324
324
  "onUpdate:modelValue": (y) => P(C, y, "itemCustomAttributes")
325
325
  }, null, 8, ["attributes", "model-value", "onUpdate:modelValue"])
326
326
  ];
@@ -329,11 +329,11 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
329
329
  }, 1032, ["label"])
330
330
  ])
331
331
  ]),
332
- _("div", Te, [
332
+ _("div", Me, [
333
333
  u(a, {
334
334
  variant: l(X).Tertiary,
335
335
  "prepend-icon": "delete",
336
- onClick: (o) => pe(C)
336
+ onClick: (r) => pe(C)
337
337
  }, null, 8, ["variant", "onClick"])
338
338
  ])
339
339
  ]),
@@ -341,11 +341,11 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
341
341
  }, 1024))), 128)),
342
342
  _("div", null, [
343
343
  u(a, {
344
- label: l(i)("menu.link_product.rules.add_rule"),
344
+ label: l(m)("menu.link_product.rules.add_rule"),
345
345
  onClick: ce
346
346
  }, null, 8, ["label"])
347
347
  ])
348
- ], 64)) : z("", !0)
348
+ ], 64)) : T("", !0)
349
349
  ]))
350
350
  ]),
351
351
  _: 1
@@ -353,9 +353,9 @@ const Be = { class: "fm-typo-en-title-md-600 mr-auto" }, Oe = {
353
353
  ], 64);
354
354
  };
355
355
  }
356
- }), Ke = /* @__PURE__ */ Ue(De, [["__scopeId", "data-v-469403ff"]]);
356
+ }), Ke = /* @__PURE__ */ Ue(ze, [["__scopeId", "data-v-469403ff"]]);
357
357
  export {
358
358
  Ke as L,
359
359
  Ue as _,
360
- d as a
360
+ c as a
361
361
  };
@@ -0,0 +1,69 @@
1
+ import { defineComponent as k, computed as i, ref as x, resolveComponent as t, createBlock as p, openBlock as s, withCtx as u, createElementVNode as c, createVNode as r, createElementBlock as I, Fragment as L, renderList as M, renderSlot as S, toDisplayString as g } from "vue";
2
+ import { useI18n as B } from "@feedmepos/mf-common";
3
+ const E = { class: "w-full flex items-center justify-between" }, N = { class: "p-4" }, P = { class: "flex-1 overflow-y-auto min-h-0" }, K = /* @__PURE__ */ k({
4
+ __name: "MenuSelector",
5
+ props: {
6
+ modelValue: {},
7
+ items: {},
8
+ placeholder: { default: "" },
9
+ searchPlaceholder: { default: "" },
10
+ title: { default: "" },
11
+ customLabel: {}
12
+ },
13
+ emits: ["update:modelValue"],
14
+ setup(l, { emit: f }) {
15
+ const o = l, h = f, { t: $ } = B(), d = i(() => {
16
+ const e = o.items.find((n) => n.value === o.modelValue);
17
+ return e ? e.label : o.placeholder;
18
+ }), _ = i(() => o.items.filter(
19
+ (e) => e.label.toLowerCase().includes(m.value.toLowerCase())
20
+ )), m = x("");
21
+ function v(e) {
22
+ h("update:modelValue", e);
23
+ }
24
+ return (e, n) => {
25
+ const b = t("FmIcon"), F = t("FmChip"), C = t("FmSearch"), V = t("FmMenuItem"), w = t("FmMenu");
26
+ return s(), p(w, { width: 220 }, {
27
+ "menu-button": u(() => [
28
+ r(F, {
29
+ label: d.value,
30
+ class: "w-full fm-typo-en-body-md-600 text-fm-color-neutral-gray-400"
31
+ }, {
32
+ default: u(() => [
33
+ c("div", E, [
34
+ c("p", null, g(l.customLabel || l.title || d.value), 1),
35
+ r(b, {
36
+ name: "expand_more",
37
+ size: "sm"
38
+ }),
39
+ S(e.$slots, "append")
40
+ ])
41
+ ]),
42
+ _: 3
43
+ }, 8, ["label"])
44
+ ]),
45
+ default: u(() => [
46
+ c("div", N, [
47
+ r(C, {
48
+ autofocus: "",
49
+ modelValue: m.value,
50
+ "onUpdate:modelValue": n[0] || (n[0] = (a) => m.value = a),
51
+ placeholder: l.searchPlaceholder
52
+ }, null, 8, ["modelValue", "placeholder"])
53
+ ]),
54
+ c("div", P, [
55
+ (s(!0), I(L, null, M(_.value, (a, y) => (s(), p(V, {
56
+ key: y,
57
+ label: a.label,
58
+ onClick: (j) => v(a.value)
59
+ }, null, 8, ["label", "onClick"]))), 128))
60
+ ])
61
+ ]),
62
+ _: 3
63
+ });
64
+ };
65
+ }
66
+ });
67
+ export {
68
+ K as _
69
+ };