@feedmepos/mf-menu 1.0.1-dev.2 → 1.0.1-dev.3

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 (58) hide show
  1. package/dist/{App-CdIN4s5n.js → App-DEoljb3M.js} +546 -533
  2. package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-CoHlJwpz.js → BindingTable.vue_vue_type_script_setup_true_lang-DACfW6SY.js} +1 -1
  3. package/dist/{Catalog-DjAubC9s.js → Catalog-B6mXH-Ez.js} +4 -4
  4. package/dist/{CatalogBinding-5JNRTbyZ.js → CatalogBinding-CZbbxQCa.js} +3 -3
  5. package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-BorOjk1k.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-CFjBkgkl.js} +3 -3
  6. package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-CkF7O_V-.js → CatalogEditor.vue_vue_type_script_setup_true_lang-owNQUf8y.js} +6 -6
  7. package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-3fL43MuR.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-DJLjbLGK.js} +3 -3
  8. package/dist/{Category-COug7fz8.js → Category-B37n9Row.js} +2 -2
  9. package/dist/{Category-BbiN4hd7.js → Category-DHGrowud.js} +5 -5
  10. package/dist/{CategoryList.vue_vue_type_script_setup_true_lang-B_9aPMIN.js → CategoryList.vue_vue_type_script_setup_true_lang-_Ux8uXwn.js} +92 -91
  11. package/dist/{CookingGuide-Dg7kuF6l.js → CookingGuide-4i1KsBxo.js} +262 -256
  12. package/dist/{Group-BRpmTqyT.js → Group-DVB_G6lM.js} +5 -5
  13. package/dist/{Group-C-hwlkgJ.js → Group-N5_9GK2v.js} +2 -2
  14. package/dist/{GroupList.vue_vue_type_script_setup_true_lang-DowoJ3WM.js → GroupList.vue_vue_type_script_setup_true_lang-BDWyiP8J.js} +5 -5
  15. package/dist/{Ingredient-BQYnARdC.js → Ingredient-C-puVgJK.js} +3 -3
  16. package/dist/{LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CgTDkHle.js → LinkProductSideSheet.vue_vue_type_script_setup_true_lang-ChDd6vJd.js} +1 -1
  17. package/dist/{MenuSetting-DsdM2_OW.js → MenuSetting-QhU37DTL.js} +3 -3
  18. package/dist/{OrderPacing-5x2YH-_l.js → OrderPacing-COY_HJ8I.js} +96 -93
  19. package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-DVGJjpiM.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-BAbojJnz.js} +1 -1
  20. package/dist/{Preview-AdgGTYlQ.js → Preview-DrbsRznu.js} +1 -1
  21. package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-vmxVZ2ya.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-BTJwvrlT.js} +1 -1
  22. package/dist/{PrintRoute-COkCv4gf.js → PrintRoute-DVJAvYq-.js} +158 -152
  23. package/dist/{Product-BJFb_J4h.js → Product-ClT1oFVA.js} +4 -4
  24. package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang-Tpp8MBYS.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-B4qpB-yA.js} +2 -2
  25. package/dist/{ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-C25Pwqme.js → ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-BWZwFal7.js} +3 -3
  26. package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-BMAtAK9D.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-yZSYrcYe.js} +1 -1
  27. package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-Dl4Zr5tx.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-3SaYTgCI.js} +1181 -1174
  28. package/dist/ProductInternalTools-DRcfn5DE.js +2147 -0
  29. package/dist/{ProductInventoryDialog-C3ruRWU5.js → ProductInventoryDialog-i48yqlp_.js} +1 -1
  30. package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-MpdIixqI.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-C7z4BHKp.js} +1 -1
  31. package/dist/{ProductList.vue_vue_type_script_setup_true_lang-9_ohgfqE.js → ProductList.vue_vue_type_script_setup_true_lang-DkIwQeby.js} +1990 -1967
  32. package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-Ctbz-8cd.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-Dr0r1hYM.js} +1 -1
  33. package/dist/{Products-DMrjQFfu.js → Products-B4yaF9Y5.js} +3 -3
  34. package/dist/{Publish-f6g0dIao.js → Publish-D8pKpnju.js} +3 -3
  35. package/dist/{Recipe-p-wxadSN.js → Recipe-Cz4s5W4k.js} +3 -3
  36. package/dist/{Scheduler-CtebRafn.js → Scheduler-xE_rjFjJ.js} +3 -3
  37. package/dist/{ServingSequence-CEd4ywOQ.js → ServingSequence-BjD1Xn6Q.js} +103 -97
  38. package/dist/{Setting-bPKadRu-.js → Setting-BrD0NB_a.js} +6 -6
  39. package/dist/{Subcategory-DBCnIP0b.js → Subcategory-wbHw1iCU.js} +141 -129
  40. package/dist/{Takeaway-VBkdW1DM.js → Takeaway-CIqSThUQ.js} +5 -5
  41. package/dist/{Takeaway-GNRHR5kN.js → Takeaway-DM7weBPk.js} +2 -2
  42. package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-DvX3k0Jg.js → TakeawayList.vue_vue_type_script_setup_true_lang-HZP5jmAy.js} +117 -111
  43. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D1qaEVUu.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CLeJxNfG.js} +6 -6
  44. package/dist/{Unit-DbGKIprZ.js → Unit-RHuHWCCg.js} +2 -2
  45. package/dist/{Variant-_edSAKif.js → Variant-MA-mdYxx.js} +114 -108
  46. package/dist/{_id_-BNVtBV3q.js → _id_-CO1c1eIn.js} +3 -3
  47. package/dist/{app-BlTv5xag.js → app-DnIyFwTs.js} +420 -406
  48. package/dist/app.js +1 -1
  49. package/dist/apps/mf-menu/src/router/shared.d.ts +33 -0
  50. package/dist/apps/mf-menu/src/sdk/import-export.d.ts +8 -2
  51. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  52. package/dist/assets/{menu-compute-BzchkTYh.js → menu-compute-BYzYhsd6.js} +2 -2
  53. package/dist/assets/{validate-menu-CTV_cJNG.js → validate-menu-oaYEuMiz.js} +2 -2
  54. package/dist/mf-menu.css +1 -1
  55. package/dist/{provide-dbE6Qt1z.js → provide-UZbVvMqZ.js} +56729 -55678
  56. package/dist/{useActionFeedback-CdY_C_HX.js → useActionFeedback-CfPMryOm.js} +1 -1
  57. package/package.json +1 -1
  58. package/dist/ProductInternalTools-thlSvqbA.js +0 -2906
@@ -1,78 +1,78 @@
1
- import { defineComponent as se, computed as w, ref as O, shallowRef as te, h as le, withModifiers as ye, onUnmounted as fe, resolveComponent as f, openBlock as u, createBlock as h, unref as e, withCtx as d, createElementBlock as b, toDisplayString as _, createVNode as i, Fragment as $, createElementVNode as c, createCommentVNode as F, renderList as oe } from "vue";
1
+ import { defineComponent as se, computed as C, ref as O, shallowRef as te, h as le, withModifiers as ye, onUnmounted as fe, resolveComponent as f, openBlock as r, createBlock as k, unref as e, withCtx as c, createElementBlock as g, toDisplayString as h, createVNode as d, Fragment as $, createElementVNode as p, createCommentVNode as F, renderList as oe } from "vue";
2
2
  import { useI18n as _e } from "@feedmepos/mf-common";
3
3
  import { useDialog as he, components as R, FmButtonVariant as ke } from "@feedmepos/ui-library";
4
4
  import { _ as ne } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
5
5
  import { _ as xe } from "./ListCountTag.vue_vue_type_script_setup_true_lang-0bjk8Aly.js";
6
6
  import { _ as we } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
7
- import { _ as Fe } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js";
8
- import { u as Ce } from "./useActionFeedback-CdY_C_HX.js";
9
- import { b as Se, u as Ve, a as Le } from "./provide-dbE6Qt1z.js";
7
+ import { _ as Ce } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js";
8
+ import { u as Fe } from "./useActionFeedback-CfPMryOm.js";
9
+ import { b as Se, u as Ve, a as Le } from "./provide-UZbVvMqZ.js";
10
10
  import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
- const De = { class: "flex-1 flex justify-between gap-8 pl-8" }, Te = { class: "flex items-center" }, ze = {
11
+ const De = { class: "flex-1 flex justify-between gap-8 pl-8" }, Te = { class: "flex items-center" }, Ne = {
12
12
  key: 0,
13
13
  class: "text-fm-color-typo-secondary",
14
14
  role: "alert"
15
- }, Ee = {
15
+ }, ze = {
16
16
  key: 1,
17
17
  "data-menu-state": "unavailable"
18
- }, Ie = { class: "flex justify-end items-center" }, Ne = { class: "w-[320px]" }, je = { class: "fm-typo-en-title-md-600" }, Be = { class: "flex flex-col gap-32 h-full min-h-0 py-16" }, Me = { "data-testid": "subcategory-translation-button" }, Oe = { class: "py-12 px-16 space-y-4" }, $e = { key: 0 }, Re = { class: "flex gap-8 items-center justify-start" }, Ae = { class: "fm-typo-en-title-sm-600" }, Pe = { class: "py-12 px-16 space-y-4" }, qe = { key: 0 }, Ke = { class: "flex w-full gap-8 items-center justify-end px-0 pb-0" }, Qe = /* @__PURE__ */ se({
18
+ }, Ee = { class: "flex justify-end items-center" }, Ie = { class: "w-[320px]" }, je = { class: "fm-typo-en-title-md-600" }, Be = { class: "flex flex-col gap-32 h-full min-h-0 py-16" }, Me = { "data-testid": "subcategory-translation-button" }, Oe = { class: "py-12 px-16 space-y-4" }, $e = { key: 0 }, Re = { class: "flex gap-8 items-center justify-start" }, Ae = { class: "fm-typo-en-title-sm-600" }, Pe = { class: "py-12 px-16 space-y-4" }, qe = { key: 0 }, Ke = { class: "flex w-full gap-8 items-center justify-end px-0 pb-0" }, Qe = /* @__PURE__ */ se({
19
19
  __name: "SubcategoryList",
20
20
  props: {
21
21
  sdk: {}
22
22
  },
23
23
  setup(A) {
24
- const g = A, { t: a, n: P } = _e(), j = Se(), ue = he(), { run: B } = Ce(), k = Ve(g.sdk.subCategory.list), s = w(
25
- () => k.value.status === "ready" ? k.value.value : null
26
- ), C = O(!1), S = O(!1), D = O(!1), q = w(() => {
24
+ const b = A, { t: a, n: P } = _e(), S = Se(), ue = he(), { run: B } = Fe(), x = Ve(b.sdk.subCategory.list), s = C(
25
+ () => x.value.status === "ready" ? x.value.value : null
26
+ ), V = O(!1), L = O(!1), N = O(!1), q = C(() => {
27
27
  var t;
28
28
  return ((t = s.value) == null ? void 0 : t.query) ?? "";
29
- }), r = te(
30
- g.sdk.subCategory.editor()
31
- ), V = te(
32
- r.value.get()
29
+ }), u = te(
30
+ b.sdk.subCategory.editor()
31
+ ), U = te(
32
+ u.value.get()
33
33
  );
34
- let M = r.value.subscribe(
35
- (t) => V.value = t
34
+ let M = u.value.subscribe(
35
+ (t) => U.value = t
36
36
  );
37
- const l = w(
38
- () => V.value.status === "ready" ? V.value.value : null
37
+ const l = C(
38
+ () => U.value.status === "ready" ? U.value.value : null
39
39
  );
40
40
  function K(t) {
41
- var o, m;
42
- return ((m = (o = l.value) == null ? void 0 : o.supportedLocales.find(
43
- (x) => x.code === t
44
- )) == null ? void 0 : m.name) ?? t;
41
+ var o, v;
42
+ return ((v = (o = l.value) == null ? void 0 : o.supportedLocales.find(
43
+ (w) => w.code === t
44
+ )) == null ? void 0 : v.name) ?? t;
45
45
  }
46
46
  function Q(t) {
47
- M(), r.value.dispose(), r.value = g.sdk.subCategory.editor(t), V.value = r.value.get(), M = r.value.subscribe(
48
- (o) => V.value = o
47
+ M(), u.value.dispose(), u.value = b.sdk.subCategory.editor(t), U.value = u.value.get(), M = u.value.subscribe(
48
+ (o) => U.value = o
49
49
  );
50
50
  }
51
51
  function G() {
52
- !s.value || s.value.create.state !== "allowed" || (Q(), D.value = !0);
52
+ !s.value || s.value.create.state !== "allowed" || (Q(), N.value = !0);
53
53
  }
54
54
  function re(t) {
55
- Q(t.id), C.value = !0;
55
+ Q(t.id), V.value = !0;
56
56
  }
57
- function T() {
58
- C.value = !1, D.value = !1, S.value = !1;
57
+ function z() {
58
+ V.value = !1, N.value = !1, L.value = !1;
59
59
  }
60
60
  function H() {
61
61
  var t;
62
- ((t = l.value) == null ? void 0 : t.translation.state) === "allowed" && (r.value.beginTranslationEdit(), S.value = !0);
62
+ ((t = l.value) == null ? void 0 : t.translation.state) === "allowed" && (u.value.beginTranslationEdit(), L.value = !0);
63
63
  }
64
64
  function ie() {
65
- r.value.saveTranslationEdit(), S.value = !1;
65
+ u.value.saveTranslationEdit(), L.value = !1;
66
66
  }
67
67
  function J() {
68
- r.value.discardTranslationEdit(), S.value = !1;
68
+ u.value.discardTranslationEdit(), L.value = !1;
69
69
  }
70
70
  async function W() {
71
- var x, z, E;
72
- const t = (x = l.value) == null ? void 0 : x.mode, o = ((E = (z = l.value) == null ? void 0 : z.name) == null ? void 0 : E.trim()) ?? "";
73
- t === "update" && T(), (await B(() => r.value.submit(), {
71
+ var w, E, I;
72
+ const t = (w = l.value) == null ? void 0 : w.mode, o = ((I = (E = l.value) == null ? void 0 : E.name) == null ? void 0 : I.trim()) ?? "";
73
+ t === "update" && z(), (await B(() => u.value.submit(), {
74
74
  successMessage: t === "update" ? a("menu.subcategory.manager.dialog.update.success", { name: o }) : a("menu.subcategory.manager.dialog.add.success", { name: o })
75
- })).kind === "success" ? T() : t === "update" && (C.value = !0);
75
+ })).kind === "success" ? z() : t === "update" && (V.value = !0);
76
76
  }
77
77
  function de(t) {
78
78
  t.remove.state === "allowed" && ue.open({
@@ -90,26 +90,26 @@ const De = { class: "flex-1 flex justify-between gap-8 pl-8" }, Te = { class: "f
90
90
  close: !0
91
91
  }
92
92
  }).onPrimary(async () => {
93
- await B(() => g.sdk.subCategory.remove(t.id), {
93
+ await B(() => b.sdk.subCategory.remove(t.id), {
94
94
  successMessage: a("menu.subcategory.dialog.remove.success", {
95
95
  name: t.name
96
96
  })
97
97
  });
98
98
  });
99
99
  }
100
- const ce = w(() => {
100
+ const ce = C(() => {
101
101
  var t;
102
102
  return [...((t = s.value) == null ? void 0 : t.rows) ?? []];
103
- }), me = w(() => !s.value || s.value.reorder.state !== "allowed" ? !1 : () => !0);
103
+ }), me = C(() => !s.value || s.value.reorder.state !== "allowed" ? !1 : () => !0);
104
104
  function pe(t) {
105
105
  !s.value || s.value.reorder.state !== "allowed" || B(
106
- () => g.sdk.subCategory.reorder(t.map((o) => o.id)),
106
+ () => b.sdk.subCategory.reorder(t.map((o) => o.id)),
107
107
  {
108
108
  successMessage: a("menu.subcategory.rearrange.success")
109
109
  }
110
110
  );
111
111
  }
112
- const ve = w(() => [
112
+ const ve = C(() => [
113
113
  {
114
114
  accessorKey: "name",
115
115
  header: () => a("menu.subcategory.columns.title"),
@@ -140,22 +140,22 @@ const De = { class: "flex-1 flex justify-between gap-8 pl-8" }, Te = { class: "f
140
140
  }
141
141
  ]);
142
142
  return fe(() => {
143
- M(), r.value.dispose();
143
+ b.sdk.subCategory.search(""), M(), u.value.dispose();
144
144
  }), (t, o) => {
145
- const m = f("FmButton"), x = f("FmCircularProgress"), z = f("FmSearch"), E = f("FmTable"), X = f("FmTooltip"), Y = f("FmTextField"), be = f("FmSideSheet"), ge = f("FmDialog");
146
- return u(), h(we, {
145
+ const v = f("FmButton"), w = f("FmCircularProgress"), E = f("FmSearch"), I = f("FmTable"), X = f("FmTooltip"), Y = f("FmTextField"), be = f("FmSideSheet"), ge = f("FmDialog");
146
+ return r(), k(we, {
147
147
  heading: e(a)("menu.subcategory.title")
148
148
  }, {
149
- "append-heading": d(() => {
150
- var L;
149
+ "append-heading": c(() => {
150
+ var D;
151
151
  return [
152
- c("div", De, [
153
- c("div", Te, [
154
- i(xe, {
155
- value: e(P)(((L = s.value) == null ? void 0 : L.totalCount) ?? 0)
152
+ p("div", De, [
153
+ p("div", Te, [
154
+ d(xe, {
155
+ value: e(P)(((D = s.value) == null ? void 0 : D.totalCount) ?? 0)
156
156
  }, null, 8, ["value"])
157
157
  ]),
158
- s.value && s.value.totalCount > 0 ? (u(), h(m, {
158
+ s.value && s.value.totalCount > 0 ? (r(), k(v, {
159
159
  key: 0,
160
160
  disabled: s.value.create.state !== "allowed",
161
161
  label: e(a)("menu.subcategory.add"),
@@ -165,34 +165,34 @@ const De = { class: "flex-1 flex justify-between gap-8 pl-8" }, Te = { class: "f
165
165
  ])
166
166
  ];
167
167
  }),
168
- default: d(() => {
169
- var L, Z, ee;
168
+ default: c(() => {
169
+ var D, Z, ee;
170
170
  return [
171
- e(k).status === "error" ? (u(), b("p", ze, _(e(j)(e(k).error.message)), 1)) : e(k).status === "unavailable" ? (u(), b("div", Ee, [
172
- i(e(ne), {
171
+ e(x).status === "error" ? (r(), g("p", Ne, h(e(S)(e(x).error.message)), 1)) : e(x).status === "unavailable" ? (r(), g("div", ze, [
172
+ d(e(ne), {
173
173
  title: e(a)("menu.subcategory.empty.title"),
174
174
  subtitle: e(a)("menu.subcategory.empty.subtitle")
175
175
  }, null, 8, ["title", "subtitle"])
176
- ])) : e(k).status === "loading" ? (u(), h(x, { key: 2 })) : s.value && s.value.rows.length === 0 && !q.value ? (u(), h(e(ne), {
176
+ ])) : e(x).status === "loading" ? (r(), k(w, { key: 2 })) : s.value && s.value.rows.length === 0 && !q.value ? (r(), k(e(ne), {
177
177
  key: 3,
178
178
  action: s.value.create.state === "allowed" ? { text: e(a)("menu.subcategory.add"), callback: G } : void 0,
179
179
  subtitle: e(a)("menu.subcategory.empty.subtitle"),
180
180
  title: e(a)("menu.subcategory.empty.title")
181
- }, null, 8, ["action", "subtitle", "title"])) : s.value ? (u(), b($, { key: 4 }, [
182
- c("div", Ie, [
183
- c("div", Ne, [
184
- i(z, {
181
+ }, null, 8, ["action", "subtitle", "title"])) : s.value ? (r(), g($, { key: 4 }, [
182
+ p("div", Ee, [
183
+ p("div", Ie, [
184
+ d(E, {
185
185
  autofocus: "",
186
186
  class: "mb-8",
187
187
  "model-value": q.value,
188
188
  placeholder: e(a)("menu.common.labels.search_placeholder", {
189
189
  type: e(a)("menu.subcategory.title")
190
190
  }),
191
- "onUpdate:modelValue": g.sdk.subCategory.search
191
+ "onUpdate:modelValue": b.sdk.subCategory.search
192
192
  }, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
193
193
  ])
194
194
  ]),
195
- i(E, {
195
+ d(I, {
196
196
  class: "subcategory-table",
197
197
  "column-defs": ve.value,
198
198
  draggable: me.value,
@@ -205,80 +205,86 @@ const De = { class: "flex-1 flex justify-between gap-8 pl-8" }, Te = { class: "f
205
205
  onRowClick: o[0] || (o[0] = (n) => re(n.original))
206
206
  }, null, 8, ["column-defs", "draggable", "page-size", "row-data"])
207
207
  ], 64)) : F("", !0),
208
- ((L = l.value) == null ? void 0 : L.mode) === "update" ? (u(), h(be, {
208
+ ((D = l.value) == null ? void 0 : D.mode) === "update" ? (r(), k(be, {
209
209
  key: 5,
210
- modelValue: C.value,
211
- "onUpdate:modelValue": o[2] || (o[2] = (n) => C.value = n),
210
+ modelValue: V.value,
211
+ "onUpdate:modelValue": o[2] || (o[2] = (n) => V.value = n),
212
212
  "is-container": e(R).FmForm,
213
213
  "is-container-props": { onValidationSuccess: W },
214
214
  "max-width": 560,
215
215
  "z-index": 100
216
216
  }, {
217
- "side-sheet-header": d(() => {
217
+ "side-sheet-header": c(() => {
218
218
  var n;
219
219
  return [
220
- c("p", je, _(((n = l.value) == null ? void 0 : n.mode) === "update" ? e(a)("menu.subcategory.title") : e(a)("menu.subcategory.manager.dialog.add.title")), 1)
220
+ p("p", je, h(((n = l.value) == null ? void 0 : n.mode) === "update" ? e(a)("menu.subcategory.title") : e(a)("menu.subcategory.manager.dialog.add.title")), 1)
221
221
  ];
222
222
  }),
223
- "side-sheet-footer": d(() => {
223
+ "side-sheet-footer": c(() => {
224
224
  var n, y;
225
225
  return [
226
- c("div", Re, [
227
- i(m, {
226
+ p("div", Re, [
227
+ d(v, {
228
228
  disabled: ((n = l.value) == null ? void 0 : n.submit.state) !== "allowed",
229
229
  label: ((y = l.value) == null ? void 0 : y.mode) === "update" ? e(a)("menu.subcategory.manager.dialog.update.action") : e(a)("menu.subcategory.manager.dialog.add.action"),
230
230
  size: "lg",
231
231
  type: "submit",
232
232
  variant: "primary"
233
233
  }, null, 8, ["disabled", "label"]),
234
- i(m, {
234
+ d(v, {
235
235
  label: e(a)("menu.common.actions.cancel"),
236
236
  size: "lg",
237
237
  variant: "tertiary",
238
- onClick: T
238
+ onClick: z
239
239
  }, null, 8, ["label"])
240
240
  ])
241
241
  ];
242
242
  }),
243
- default: d(() => {
244
- var n, y, U;
243
+ default: c(() => {
244
+ var n, y, T;
245
245
  return [
246
- c("div", Be, [
247
- i(Y, {
246
+ p("div", Be, [
247
+ d(Y, {
248
+ rules: [
249
+ (m) => {
250
+ const i = u.value.validateName(String(m ?? ""));
251
+ return i ? e(S)(i) : !0;
252
+ }
253
+ ],
248
254
  "helper-state": (n = l.value) != null && n.nameIssue ? "error" : "none",
249
- "helper-text": (y = l.value) != null && y.nameIssue ? e(j)(l.value.nameIssue) : "",
255
+ "helper-text": (y = l.value) != null && y.nameIssue ? e(S)(l.value.nameIssue) : "",
250
256
  label: e(a)("menu.subcategory.name"),
251
- "model-value": ((U = l.value) == null ? void 0 : U.name) ?? "",
257
+ "model-value": ((T = l.value) == null ? void 0 : T.name) ?? "",
252
258
  placeholder: e(a)("menu.subcategory.dialog.add.name.placeholder"),
253
- "onUpdate:modelValue": o[1] || (o[1] = (p) => r.value.setName(p))
259
+ "onUpdate:modelValue": o[1] || (o[1] = (m) => u.value.setName(m))
254
260
  }, {
255
- append: d(() => [
256
- c("div", Me, [
257
- i(X, {
261
+ append: c(() => [
262
+ p("div", Me, [
263
+ d(X, {
258
264
  variant: "plain",
259
265
  placement: "top",
260
266
  "z-index": 999
261
267
  }, {
262
- content: d(() => {
263
- var p, v;
268
+ content: c(() => {
269
+ var m, i;
264
270
  return [
265
- c("div", Oe, [
266
- Object.keys(((p = l.value) == null ? void 0 : p.nameLocale) ?? {}).length === 0 ? (u(), b("div", $e, _(e(a)("menu.common.translation.translation_label")), 1)) : F("", !0),
267
- (u(!0), b($, null, oe((v = l.value) == null ? void 0 : v.nameLocale, (I, N) => (u(), b("div", { key: N }, _(e(a)("menu.subcategory.translation.tooltip_value", {
268
- value: I,
269
- locale: K(N)
271
+ p("div", Oe, [
272
+ Object.keys(((m = l.value) == null ? void 0 : m.nameLocale) ?? {}).length === 0 ? (r(), g("div", $e, h(e(a)("menu.common.translation.translation_label")), 1)) : F("", !0),
273
+ (r(!0), g($, null, oe((i = l.value) == null ? void 0 : i.nameLocale, (_, j) => (r(), g("div", { key: j }, h(e(a)("menu.subcategory.translation.tooltip_value", {
274
+ value: _,
275
+ locale: K(j)
270
276
  })), 1))), 128))
271
277
  ])
272
278
  ];
273
279
  }),
274
- default: d(() => {
275
- var p;
280
+ default: c(() => {
281
+ var m;
276
282
  return [
277
- i(m, {
283
+ d(v, {
278
284
  icon: "g_translate",
279
285
  "aria-label": e(a)("menu.common.translation.translation_label"),
280
286
  variant: "tertiary",
281
- disabled: ((p = l.value) == null ? void 0 : p.translation.state) !== "allowed",
287
+ disabled: ((m = l.value) == null ? void 0 : m.translation.state) !== "allowed",
282
288
  onClick: H
283
289
  }, null, 8, ["aria-label", "disabled"])
284
290
  ];
@@ -288,46 +294,46 @@ const De = { class: "flex-1 flex justify-between gap-8 pl-8" }, Te = { class: "f
288
294
  ])
289
295
  ]),
290
296
  _: 1
291
- }, 8, ["helper-state", "helper-text", "label", "model-value", "placeholder"])
297
+ }, 8, ["rules", "helper-state", "helper-text", "label", "model-value", "placeholder"])
292
298
  ])
293
299
  ];
294
300
  }),
295
301
  _: 1
296
302
  }, 8, ["modelValue", "is-container", "is-container-props"])) : F("", !0),
297
- ((Z = l.value) == null ? void 0 : Z.mode) === "update" || ((ee = l.value) == null ? void 0 : ee.mode) === "create" ? (u(), h(Fe, {
303
+ ((Z = l.value) == null ? void 0 : Z.mode) === "update" || ((ee = l.value) == null ? void 0 : ee.mode) === "create" ? (r(), k(Ce, {
298
304
  key: 6,
299
- "model-value": S.value,
305
+ "model-value": L.value,
300
306
  "onUpdate:modelValue": o[3] || (o[3] = (n) => n || J()),
301
307
  name: l.value.name,
302
308
  "name-locale": l.value.nameLocale,
303
309
  "supported-locales": l.value.supportedLocales,
304
310
  dirty: l.value.translationDirty,
305
311
  "z-index": 200,
306
- "onUpdate:name": r.value.setName,
307
- "onUpdate:nameLocale": r.value.setNameLocale,
312
+ "onUpdate:name": u.value.setName,
313
+ "onUpdate:nameLocale": u.value.setNameLocale,
308
314
  onSave: ie,
309
315
  onDiscard: J
310
316
  }, null, 8, ["model-value", "name", "name-locale", "supported-locales", "dirty", "onUpdate:name", "onUpdate:nameLocale"])) : F("", !0),
311
- i(ge, {
312
- modelValue: D.value,
313
- "onUpdate:modelValue": o[5] || (o[5] = (n) => D.value = n),
317
+ d(ge, {
318
+ modelValue: N.value,
319
+ "onUpdate:modelValue": o[5] || (o[5] = (n) => N.value = n),
314
320
  "is-component": e(R).FmForm,
315
321
  "is-component-props": { onValidationSuccess: W },
316
322
  "max-width": 560
317
323
  }, {
318
- "dialog-header": d(() => [
319
- c("p", Ae, _(e(a)("menu.subcategory.manager.dialog.add.title")), 1)
324
+ "dialog-header": c(() => [
325
+ p("p", Ae, h(e(a)("menu.subcategory.manager.dialog.add.title")), 1)
320
326
  ]),
321
- "dialog-footer": d(() => {
327
+ "dialog-footer": c(() => {
322
328
  var n;
323
329
  return [
324
- c("div", Ke, [
325
- i(m, {
330
+ p("div", Ke, [
331
+ d(v, {
326
332
  label: e(a)("menu.common.actions.cancel"),
327
333
  variant: "tertiary",
328
- onClick: T
334
+ onClick: z
329
335
  }, null, 8, ["label"]),
330
- i(m, {
336
+ d(v, {
331
337
  disabled: ((n = l.value) == null ? void 0 : n.submit.state) !== "allowed",
332
338
  label: e(a)("menu.subcategory.manager.dialog.add.action"),
333
339
  type: "submit",
@@ -336,45 +342,51 @@ const De = { class: "flex-1 flex justify-between gap-8 pl-8" }, Te = { class: "f
336
342
  ])
337
343
  ];
338
344
  }),
339
- default: d(() => {
340
- var n, y, U, p;
345
+ default: c(() => {
346
+ var n, y, T, m;
341
347
  return [
342
- i(Y, {
348
+ d(Y, {
343
349
  autofocus: "",
344
350
  invalid: !!((n = l.value) != null && n.nameIssue),
351
+ rules: [
352
+ (i) => {
353
+ const _ = u.value.validateName(String(i ?? ""));
354
+ return _ ? e(S)(_) : !0;
355
+ }
356
+ ],
345
357
  "helper-state": (y = l.value) != null && y.nameIssue ? "error" : "none",
346
- "helper-text": (U = l.value) != null && U.nameIssue ? e(j)(l.value.nameIssue) : "",
358
+ "helper-text": (T = l.value) != null && T.nameIssue ? e(S)(l.value.nameIssue) : "",
347
359
  label: e(a)("menu.subcategory.name"),
348
- "model-value": ((p = l.value) == null ? void 0 : p.name) ?? "",
360
+ "model-value": ((m = l.value) == null ? void 0 : m.name) ?? "",
349
361
  placeholder: e(a)("menu.subcategory.dialog.add.name.placeholder"),
350
- "onUpdate:modelValue": o[4] || (o[4] = (v) => r.value.setName(v))
362
+ "onUpdate:modelValue": o[4] || (o[4] = (i) => u.value.setName(i))
351
363
  }, {
352
- append: d(() => [
353
- i(X, {
364
+ append: c(() => [
365
+ d(X, {
354
366
  variant: "plain",
355
367
  placement: "top",
356
368
  "z-index": 999
357
369
  }, {
358
- content: d(() => {
359
- var v, I;
370
+ content: c(() => {
371
+ var i, _;
360
372
  return [
361
- c("div", Pe, [
362
- Object.keys(((v = l.value) == null ? void 0 : v.nameLocale) ?? {}).length === 0 ? (u(), b("div", qe, _(e(a)("menu.common.translation.translation_label")), 1)) : F("", !0),
363
- (u(!0), b($, null, oe((I = l.value) == null ? void 0 : I.nameLocale, (N, ae) => (u(), b("div", { key: ae }, _(e(a)("menu.subcategory.translation.tooltip_value", {
364
- value: N,
373
+ p("div", Pe, [
374
+ Object.keys(((i = l.value) == null ? void 0 : i.nameLocale) ?? {}).length === 0 ? (r(), g("div", qe, h(e(a)("menu.common.translation.translation_label")), 1)) : F("", !0),
375
+ (r(!0), g($, null, oe((_ = l.value) == null ? void 0 : _.nameLocale, (j, ae) => (r(), g("div", { key: ae }, h(e(a)("menu.subcategory.translation.tooltip_value", {
376
+ value: j,
365
377
  locale: K(ae)
366
378
  })), 1))), 128))
367
379
  ])
368
380
  ];
369
381
  }),
370
- default: d(() => {
371
- var v;
382
+ default: c(() => {
383
+ var i;
372
384
  return [
373
- i(m, {
385
+ d(v, {
374
386
  icon: "g_translate",
375
387
  "aria-label": e(a)("menu.common.translation.translation_label"),
376
388
  variant: "tertiary",
377
- disabled: ((v = l.value) == null ? void 0 : v.translation.state) !== "allowed",
389
+ disabled: ((i = l.value) == null ? void 0 : i.translation.state) !== "allowed",
378
390
  onClick: H
379
391
  }, null, 8, ["aria-label", "disabled"])
380
392
  ];
@@ -383,7 +395,7 @@ const De = { class: "flex-1 flex justify-between gap-8 pl-8" }, Te = { class: "f
383
395
  })
384
396
  ]),
385
397
  _: 1
386
- }, 8, ["invalid", "helper-state", "helper-text", "label", "model-value", "placeholder"])
398
+ }, 8, ["invalid", "rules", "helper-state", "helper-text", "label", "model-value", "placeholder"])
387
399
  ];
388
400
  }),
389
401
  _: 1
@@ -394,11 +406,11 @@ const De = { class: "flex-1 flex justify-between gap-8 pl-8" }, Te = { class: "f
394
406
  }, 8, ["heading"]);
395
407
  };
396
408
  }
397
- }), Ge = /* @__PURE__ */ Ue(Qe, [["__scopeId", "data-v-d2f87493"]]), oa = /* @__PURE__ */ se({
409
+ }), Ge = /* @__PURE__ */ Ue(Qe, [["__scopeId", "data-v-f7188357"]]), oa = /* @__PURE__ */ se({
398
410
  __name: "Subcategory",
399
411
  setup(A) {
400
- const g = Le();
401
- return (a, P) => (u(), h(Ge, { sdk: e(g) }, null, 8, ["sdk"]));
412
+ const b = Le();
413
+ return (a, P) => (r(), k(Ge, { sdk: e(b) }, null, 8, ["sdk"]));
402
414
  }
403
415
  });
404
416
  export {
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as m, resolveComponent as i, openBlock as s, createBlock as c, unref as a, withCtx as t, createVNode as e } from "vue";
2
2
  import { RouterLink as p } from "vue-router";
3
3
  import { useI18n as _ } from "@feedmepos/mf-common";
4
- import { _ as l } from "./TakeawayList.vue_vue_type_script_setup_true_lang-DvX3k0Jg.js";
5
- import { _ as d } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-3fL43MuR.js";
6
- import { R as u } from "./app-BlTv5xag.js";
7
- import { a as f } from "./provide-dbE6Qt1z.js";
8
- import { _ as k } from "./CatalogEditTabs.vue_vue_type_script_setup_true_lang-BorOjk1k.js";
4
+ import { _ as l } from "./TakeawayList.vue_vue_type_script_setup_true_lang-HZP5jmAy.js";
5
+ import { _ as d } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-DJLjbLGK.js";
6
+ import { R as u } from "./app-DnIyFwTs.js";
7
+ import { a as f } from "./provide-UZbVvMqZ.js";
8
+ import { _ as k } from "./CatalogEditTabs.vue_vue_type_script_setup_true_lang-CFjBkgkl.js";
9
9
  const A = /* @__PURE__ */ m({
10
10
  __name: "Takeaway",
11
11
  setup(g) {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as o, openBlock as n, createBlock as r, unref as a } from "vue";
2
- import { _ as s } from "./TakeawayList.vue_vue_type_script_setup_true_lang-DvX3k0Jg.js";
3
- import { a as t } from "./provide-dbE6Qt1z.js";
2
+ import { _ as s } from "./TakeawayList.vue_vue_type_script_setup_true_lang-HZP5jmAy.js";
3
+ import { a as t } from "./provide-UZbVvMqZ.js";
4
4
  const k = /* @__PURE__ */ o({
5
5
  __name: "Takeaway",
6
6
  setup(_) {