@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,15 +1,15 @@
1
- import { defineComponent as de, computed as S, ref as Le, shallowRef as B, h as k, withModifiers as ie, onUnmounted as Te, resolveComponent as _, openBlock as i, createBlock as f, unref as t, withCtx as p, createElementBlock as x, toDisplayString as L, Fragment as re, createElementVNode as d, normalizeClass as ue, createVNode as r, renderList as Ve, createCommentVNode as w, createSlots as Ie, nextTick as $e } from "vue";
1
+ import { defineComponent as de, computed as V, ref as Le, shallowRef as B, h as w, withModifiers as ie, onUnmounted as Te, resolveComponent as _, openBlock as i, createBlock as f, unref as t, withCtx as p, createElementBlock as C, toDisplayString as I, Fragment as re, createElementVNode as d, normalizeClass as ue, createVNode as r, renderList as Ve, createCommentVNode as F, createSlots as Ie, nextTick as $e } from "vue";
2
2
  import { _ as Oe, d as Pe } from "./FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js";
3
3
  import { useI18n as ze } from "@feedmepos/mf-common";
4
4
  import { useDialog as Ue, useBreakpoints as Me, components as ce, FmButtonVariant as Q } from "@feedmepos/ui-library";
5
5
  import { _ as Ee } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-C9OSr8ft.js";
6
6
  import { _ as Be } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
7
- import { _ as je } from "./ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-Ctbz-8cd.js";
8
- import { _ as Ae } from "./FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js";
9
- import { _ as Ne } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
7
+ import { _ as Ne } from "./ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-Dr0r1hYM.js";
8
+ import { _ as je } from "./FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js";
9
+ import { _ as Ae } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
10
10
  import { _ as me } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-CAkLEmSA.js";
11
- import { u as qe } from "./useActionFeedback-CdY_C_HX.js";
12
- import { b as De, u as He, a as Qe } from "./provide-dbE6Qt1z.js";
11
+ import { u as qe } from "./useActionFeedback-CfPMryOm.js";
12
+ import { b as De, u as He, a as Qe } from "./provide-UZbVvMqZ.js";
13
13
  const Re = {
14
14
  key: 0,
15
15
  class: "text-fm-color-typo-secondary",
@@ -30,42 +30,42 @@ const Re = {
30
30
  sdk: {}
31
31
  },
32
32
  setup(R) {
33
- const g = R, { t: a } = ze(), T = De(), G = Ue(), { breakpoints: pe } = Me(), { run: j } = qe(), y = He(g.sdk.variant.list), u = S(
34
- () => y.value.status === "ready" ? y.value.value : null
35
- ), K = S(() => {
33
+ const y = R, { t: a } = ze(), S = De(), G = Ue(), { breakpoints: pe } = Me(), { run: N } = qe(), g = He(y.sdk.variant.list), c = V(
34
+ () => g.value.status === "ready" ? g.value.value : null
35
+ ), K = V(() => {
36
36
  var e;
37
- return ((e = u.value) == null ? void 0 : e.query) ?? "";
38
- }), V = S(() => pe.value.xs), I = Le(!1), c = B(
39
- g.sdk.variant.editor()
40
- ), $ = B(
41
- c.value.get()
37
+ return ((e = c.value) == null ? void 0 : e.query) ?? "";
38
+ }), $ = V(() => pe.value.xs), O = Le(!1), u = B(
39
+ y.sdk.variant.editor()
40
+ ), P = B(
41
+ u.value.get()
42
42
  );
43
- let A = c.value.subscribe(
44
- (e) => $.value = e
43
+ let j = u.value.subscribe(
44
+ (e) => P.value = e
45
45
  );
46
- const l = S(
47
- () => $.value.status === "ready" ? $.value.value : null
48
- ), h = B(null), J = B("variant"), ve = S(() => {
46
+ const l = V(
47
+ () => P.value.status === "ready" ? P.value.value : null
48
+ ), h = B(null), J = B("variant"), ve = V(() => {
49
49
  var e;
50
50
  return ((e = l.value) == null ? void 0 : e.linkedGroups) ?? [];
51
- }), N = /* @__PURE__ */ new Map();
51
+ }), A = /* @__PURE__ */ new Map();
52
52
  function W(e) {
53
- U(), A(), c.value.dispose(), c.value = g.sdk.variant.editor(e), $.value = c.value.get(), A = c.value.subscribe(
54
- (n) => $.value = n
53
+ M(), j(), u.value.dispose(), u.value = y.sdk.variant.editor(e), P.value = u.value.get(), j = u.value.subscribe(
54
+ (n) => P.value = n
55
55
  );
56
56
  }
57
57
  function q() {
58
- u.value && u.value.create.state !== "allowed" || (W(), I.value = !0);
58
+ c.value && c.value.create.state !== "allowed" || (W(), O.value = !0);
59
59
  }
60
60
  function X(e) {
61
- W(e.id), I.value = !0;
61
+ W(e.id), O.value = !0;
62
62
  }
63
- function z() {
64
- I.value = !1;
63
+ function U() {
64
+ O.value = !1;
65
65
  }
66
66
  function Y() {
67
67
  var e;
68
- if (!((e = l.value) != null && e.dirty)) return z();
68
+ if (!((e = l.value) != null && e.dirty)) return U();
69
69
  G.open({
70
70
  title: a("menu.common.dialog.dismiss.title"),
71
71
  message: a("menu.common.dialog.dismiss.message"),
@@ -79,28 +79,28 @@ const Re = {
79
79
  close: !0,
80
80
  variant: Q.Tertiary
81
81
  }
82
- }).onPrimary(z);
82
+ }).onPrimary(U);
83
83
  }
84
84
  function fe(e) {
85
- e ? I.value = !0 : Y();
85
+ e ? O.value = !0 : Y();
86
86
  }
87
87
  function Z(e) {
88
88
  var n;
89
- (n = h.value) == null || n.dispose(), J.value = e, h.value = c.value.translationEditor();
89
+ (n = h.value) == null || n.dispose(), J.value = e, h.value = u.value.translationEditor();
90
90
  }
91
- function U() {
91
+ function M() {
92
92
  var e;
93
93
  (e = h.value) == null || e.dispose(), h.value = null;
94
94
  }
95
95
  async function _e() {
96
96
  const e = h.value;
97
97
  if (!e) return;
98
- (await j(async () => e.apply(), {
98
+ (await N(async () => e.apply(), {
99
99
  showLoading: !1
100
- })).kind === "success" && U();
100
+ })).kind === "success" && M();
101
101
  }
102
102
  function be(e) {
103
- c.value.reorderOptions(e.map((n) => n.id));
103
+ u.value.reorderOptions(e.map((n) => n.id));
104
104
  }
105
105
  function ye(e) {
106
106
  return e.draggedContext.futureIndex !== e.relatedContext.list.length - 1;
@@ -113,42 +113,42 @@ const Re = {
113
113
  function ge(e, n) {
114
114
  var m;
115
115
  const o = (m = l.value) == null ? void 0 : m.optionsIssue;
116
- return D(e, n) && o ? T(o) : "";
116
+ return D(e, n) && o ? S(o) : "";
117
117
  }
118
118
  function he(e, n) {
119
119
  if (!n || typeof n.focus != "function") {
120
- N.delete(e);
120
+ A.delete(e);
121
121
  return;
122
122
  }
123
123
  const o = n;
124
- N.set(e, o), o.inputEl instanceof HTMLInputElement && o.inputEl.setAttribute(
124
+ A.set(e, o), o.inputEl instanceof HTMLInputElement && o.inputEl.setAttribute(
125
125
  "aria-label",
126
126
  a("menu.variant.form.options.input", { number: e + 1 })
127
127
  );
128
128
  }
129
129
  function ke(e) {
130
130
  return e.reduce((n, o) => {
131
- for (const [m, C] of Object.entries(o.nameLocale ?? {}))
132
- n[m] ?? (n[m] = C);
131
+ for (const [m, L] of Object.entries(o.nameLocale ?? {}))
132
+ n[m] ?? (n[m] = L);
133
133
  return n;
134
134
  }, {});
135
135
  }
136
136
  async function xe() {
137
- var m, C, M;
137
+ var m, L, E;
138
138
  const e = ((m = l.value) == null ? void 0 : m.name) ?? "";
139
- (await j(() => c.value.submit(), {
139
+ (await N(() => u.value.submit(), {
140
140
  successMessage: a("menu.variant.form.saved", { name: e }),
141
141
  // `submit()` publishes `submitting` synchronously only when it will
142
142
  // perform a write. Local validation rejection must not flash loading.
143
143
  showLoading: () => {
144
- var F;
145
- return ((F = l.value) == null ? void 0 : F.status) === "submitting";
144
+ var T;
145
+ return ((T = l.value) == null ? void 0 : T.status) === "submitting";
146
146
  }
147
- })).kind === "success" && z();
148
- const o = (C = l.value) == null ? void 0 : C.options.findIndex(
149
- (F, H) => D(H, F)
147
+ })).kind === "success" && U();
148
+ const o = (L = l.value) == null ? void 0 : L.options.findIndex(
149
+ (T, H) => D(H, T)
150
150
  );
151
- o !== void 0 && o >= 0 && (await $e(), (M = N.get(o)) == null || M.focus());
151
+ o !== void 0 && o >= 0 && (await $e(), (E = A.get(o)) == null || E.focus());
152
152
  }
153
153
  function ee(e) {
154
154
  e.remove.state === "allowed" && G.open({
@@ -166,12 +166,12 @@ const Re = {
166
166
  close: !0
167
167
  }
168
168
  }).onPrimary(async () => {
169
- await j(() => g.sdk.variant.remove(e.id), {
169
+ await N(() => y.sdk.variant.remove(e.id), {
170
170
  successMessage: a("menu.variant.form.removed", { name: e.name })
171
171
  });
172
172
  });
173
173
  }
174
- const we = S(() => [
174
+ const we = V(() => [
175
175
  // Widths are the legacy ones (`Variant.vue:57,76,107`). They are not
176
176
  // cosmetic: they decide where the option-values column wraps, and a wrap
177
177
  // shifts every row below it out of visual parity.
@@ -180,10 +180,10 @@ const Re = {
180
180
  header: () => a("menu.variant.columns.name"),
181
181
  size: 360,
182
182
  enableSorting: !1,
183
- cell: (e) => k("div", { class: "flex items-center gap-8" }, [
184
- k("span", { class: "break-all" }, e.row.original.name),
183
+ cell: (e) => w("div", { class: "flex items-center gap-8" }, [
184
+ w("span", { class: "break-all" }, e.row.original.name),
185
185
  ...e.row.original.nameLocale && Object.keys(e.row.original.nameLocale).length ? [
186
- k(me, {
186
+ w(me, {
187
187
  nameLocale: e.row.original.nameLocale
188
188
  })
189
189
  ] : []
@@ -196,13 +196,13 @@ const Re = {
196
196
  enableSorting: !1,
197
197
  cell: (e) => {
198
198
  const n = ke(e.row.original.options);
199
- return k("div", { class: "flex items-center gap-8" }, [
200
- k(
199
+ return w("div", { class: "flex items-center gap-8" }, [
200
+ w(
201
201
  "span",
202
202
  { class: "break-all" },
203
203
  e.row.original.options.map((o) => o.name).join(", ")
204
204
  ),
205
- ...Object.keys(n).length ? [k(me, { nameLocale: n })] : []
205
+ ...Object.keys(n).length ? [w(me, { nameLocale: n })] : []
206
206
  ]);
207
207
  }
208
208
  },
@@ -220,7 +220,7 @@ const Re = {
220
220
  size: 52,
221
221
  meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
222
222
  header: "",
223
- cell: (e) => k(ce.FmButton, {
223
+ cell: (e) => w(ce.FmButton, {
224
224
  icon: "delete",
225
225
  variant: "tertiary",
226
226
  textColor: "neutral-gray-400",
@@ -236,48 +236,48 @@ const Re = {
236
236
  }
237
237
  ]);
238
238
  return Te(() => {
239
- U(), A(), c.value.dispose();
239
+ y.sdk.variant.search(""), M(), j(), u.value.dispose();
240
240
  }), (e, n) => {
241
- const o = _("FmButton"), m = _("FmCircularProgress"), C = _("FmSearch"), M = _("FmListItem"), F = _("FmList"), H = _("FmTable"), Ce = _("FmTooltip"), ae = _("FmTextField"), Fe = _("FmHelperText"), Se = _("FmSideSheet");
242
- return i(), f(Ne, {
241
+ const o = _("FmButton"), m = _("FmCircularProgress"), L = _("FmSearch"), E = _("FmListItem"), T = _("FmList"), H = _("FmTable"), Ce = _("FmTooltip"), ae = _("FmTextField"), Fe = _("FmHelperText"), Se = _("FmSideSheet");
242
+ return i(), f(Ae, {
243
243
  heading: t(a)("menu.variant.title")
244
244
  }, {
245
245
  "append-heading": p(() => [
246
- t(y).status === "ready" && u.value && u.value.totalCount > 0 && !V.value ? (i(), f(o, {
246
+ t(g).status === "ready" && c.value && c.value.totalCount > 0 && !$.value ? (i(), f(o, {
247
247
  key: 0,
248
248
  class: "ml-auto",
249
- disabled: u.value.create.state !== "allowed",
249
+ disabled: c.value.create.state !== "allowed",
250
250
  label: t(a)("menu.variant.add"),
251
251
  "prepend-icon": "add",
252
252
  onClick: q
253
- }, null, 8, ["disabled", "label"])) : w("", !0)
253
+ }, null, 8, ["disabled", "label"])) : F("", !0)
254
254
  ]),
255
255
  default: p(() => [
256
- t(y).status === "error" ? (i(), x("p", Re, L(t(T)(t(y).error.message)), 1)) : t(y).status === "unavailable" ? (i(), x("p", Ge, L(t(T)(t(y).reason)), 1)) : t(y).status === "loading" ? (i(), f(m, { key: 2 })) : u.value && u.value.rows.length === 0 && !K.value ? (i(), f(t(Be), {
256
+ t(g).status === "error" ? (i(), C("p", Re, I(t(S)(t(g).error.message)), 1)) : t(g).status === "unavailable" ? (i(), C("p", Ge, I(t(S)(t(g).reason)), 1)) : t(g).status === "loading" ? (i(), f(m, { key: 2 })) : c.value && c.value.rows.length === 0 && !K.value ? (i(), f(t(Be), {
257
257
  key: 3,
258
258
  action: { text: t(a)("menu.variant.add"), callback: q },
259
259
  title: t(a)("menu.variant.empty.title"),
260
260
  subtitle: t(a)("menu.variant.empty.subtitle")
261
- }, null, 8, ["action", "title", "subtitle"])) : u.value ? (i(), x(re, { key: 4 }, [
261
+ }, null, 8, ["action", "title", "subtitle"])) : c.value ? (i(), C(re, { key: 4 }, [
262
262
  d("div", Ke, [
263
263
  d("div", {
264
- class: ue(V.value ? "w-[calc(100%-32px)] mx-16 mt-8" : "w-[320px]")
264
+ class: ue($.value ? "w-[calc(100%-32px)] mx-16 mt-8" : "w-[320px]")
265
265
  }, [
266
- r(C, {
266
+ r(L, {
267
267
  autofocus: "",
268
- class: ue(V.value ? "mb-0" : "mb-8"),
268
+ class: ue($.value ? "mb-0" : "mb-8"),
269
269
  "model-value": K.value,
270
270
  placeholder: t(a)("menu.common.labels.search_variants"),
271
- "onUpdate:modelValue": g.sdk.variant.search
271
+ "onUpdate:modelValue": y.sdk.variant.search
272
272
  }, null, 8, ["class", "model-value", "placeholder", "onUpdate:modelValue"])
273
273
  ], 2)
274
274
  ]),
275
- V.value ? (i(), f(F, {
275
+ $.value ? (i(), f(T, {
276
276
  key: 0,
277
277
  class: "mt-8 pb-64"
278
278
  }, {
279
279
  default: p(() => [
280
- (i(!0), x(re, null, Ve(u.value.rows, (s) => (i(), f(M, {
280
+ (i(!0), C(re, null, Ve(c.value.rows, (s) => (i(), f(E, {
281
281
  key: s.id,
282
282
  class: "border-b border-fm-color-neutral-gray-100 !p-0",
283
283
  onClick: (b) => X(s)
@@ -285,12 +285,12 @@ const Re = {
285
285
  default: p(() => [
286
286
  d("div", Je, [
287
287
  d("div", We, [
288
- d("p", Xe, L(s.name), 1),
288
+ d("p", Xe, I(s.name), 1),
289
289
  d("div", null, [
290
- d("p", Ye, L(t(a)("menu.common.labels.items_linked", {
290
+ d("p", Ye, I(t(a)("menu.common.labels.items_linked", {
291
291
  count: s.linkedProductCount
292
292
  })), 1),
293
- d("p", Ze, L(t(a)("menu.variant.mobile.value", {
293
+ d("p", Ze, I(t(a)("menu.variant.mobile.value", {
294
294
  values: s.options.map((b) => b.name).join(", ")
295
295
  })), 1)
296
296
  ])
@@ -310,30 +310,30 @@ const Re = {
310
310
  }, 1032, ["onClick"]))), 128))
311
311
  ]),
312
312
  _: 1
313
- })) : (i(), x("div", ea, [
313
+ })) : (i(), C("div", ea, [
314
314
  r(H, {
315
315
  "column-defs": we.value,
316
316
  "hide-footer": "",
317
- "page-size": u.value.rows.length,
317
+ "page-size": c.value.rows.length,
318
318
  "pin-header-row": "",
319
- "row-data": [...u.value.rows],
319
+ "row-data": [...c.value.rows],
320
320
  "shrink-at": !1,
321
321
  onRowClick: n[0] || (n[0] = (s) => X(s.original))
322
322
  }, null, 8, ["column-defs", "page-size", "row-data"])
323
323
  ])),
324
- u.value.totalCount > 0 && V.value ? (i(), x("div", aa, [
324
+ c.value.totalCount > 0 && $.value ? (i(), C("div", aa, [
325
325
  r(o, {
326
326
  class: "w-full",
327
- disabled: u.value.create.state !== "allowed",
327
+ disabled: c.value.create.state !== "allowed",
328
328
  label: t(a)("menu.variant.add"),
329
329
  "prepend-icon": "add",
330
330
  variant: "fab",
331
331
  onClick: q
332
332
  }, null, 8, ["disabled", "label"])
333
- ])) : w("", !0)
334
- ], 64)) : w("", !0),
333
+ ])) : F("", !0)
334
+ ], 64)) : F("", !0),
335
335
  r(Se, {
336
- "model-value": I.value,
336
+ "model-value": O.value,
337
337
  "is-container": t(ce).FmForm,
338
338
  "is-container-props": { onValidationSuccess: xe },
339
339
  "max-width": 560,
@@ -343,7 +343,7 @@ const Re = {
343
343
  "side-sheet-header": p(() => {
344
344
  var s;
345
345
  return [
346
- d("p", ta, L(((s = l.value) == null ? void 0 : s.mode) === "update" ? t(a)("menu.variant.form.title.edit") : t(a)("menu.variant.form.title.add")), 1)
346
+ d("p", ta, I(((s = l.value) == null ? void 0 : s.mode) === "update" ? t(a)("menu.variant.form.title.edit") : t(a)("menu.variant.form.title.add")), 1)
347
347
  ];
348
348
  }),
349
349
  "side-sheet-footer": p(() => {
@@ -361,7 +361,7 @@ const Re = {
361
361
  label: t(a)("menu.common.actions.cancel"),
362
362
  size: "lg",
363
363
  variant: "tertiary",
364
- onClick: z
364
+ onClick: U
365
365
  }, null, 8, ["label"])
366
366
  ])
367
367
  ];
@@ -377,12 +377,18 @@ const Re = {
377
377
  var b, te, ne;
378
378
  return [
379
379
  r(ae, {
380
+ rules: [
381
+ (k) => {
382
+ const x = u.value.validateName(String(k ?? ""));
383
+ return x ? t(S)(x) : !0;
384
+ }
385
+ ],
380
386
  "helper-state": (b = l.value) != null && b.nameIssue ? "error" : "none",
381
- "helper-text": (te = l.value) != null && te.nameIssue ? t(T)(l.value.nameIssue) : t(a)("menu.variant.form.name.helper"),
387
+ "helper-text": (te = l.value) != null && te.nameIssue ? t(S)(l.value.nameIssue) : t(a)("menu.variant.form.name.helper"),
382
388
  label: t(a)("menu.variant.form.name.label"),
383
389
  "model-value": ((ne = l.value) == null ? void 0 : ne.name) ?? "",
384
390
  placeholder: t(a)("menu.variant.form.name.placeholder"),
385
- "onUpdate:modelValue": n[2] || (n[2] = (O) => c.value.setName(O))
391
+ "onUpdate:modelValue": n[2] || (n[2] = (k) => u.value.setName(k))
386
392
  }, {
387
393
  append: p(() => [
388
394
  r(Ce, {
@@ -396,22 +402,22 @@ const Re = {
396
402
  class: "!p-0",
397
403
  icon: "g_translate",
398
404
  variant: "tertiary",
399
- onClick: n[1] || (n[1] = (O) => Z("variant"))
405
+ onClick: n[1] || (n[1] = (k) => Z("variant"))
400
406
  }, null, 8, ["aria-label"])
401
407
  ]),
402
408
  _: 1
403
409
  })
404
410
  ]),
405
411
  _: 1
406
- }, 8, ["helper-state", "helper-text", "label", "model-value", "placeholder"]),
407
- r(Ae, {
412
+ }, 8, ["rules", "helper-state", "helper-text", "label", "model-value", "placeholder"]),
413
+ r(je, {
408
414
  label: t(a)("menu.variant.form.options.title")
409
415
  }, {
410
416
  default: p(() => {
411
- var O;
417
+ var k;
412
418
  return [
413
419
  r(t(Pe), {
414
- "model-value": [...((O = l.value) == null ? void 0 : O.options) ?? []],
420
+ "model-value": [...((k = l.value) == null ? void 0 : k.options) ?? []],
415
421
  move: ye,
416
422
  class: "space-y-16",
417
423
  "data-testid": "variant-options",
@@ -420,7 +426,7 @@ const Re = {
420
426
  "item-key": "id",
421
427
  "onUpdate:modelValue": be
422
428
  }, {
423
- item: p(({ element: E, index: v }) => {
429
+ item: p(({ element: x, index: v }) => {
424
430
  var oe, le, se;
425
431
  return [
426
432
  d("div", {
@@ -435,14 +441,14 @@ const Re = {
435
441
  class: "handle cursor-move !p-0",
436
442
  icon: "drag_handle",
437
443
  variant: "tertiary"
438
- }, null, 8, ["aria-label"])) : v > 0 ? (i(), x("div", la)) : w("", !0),
444
+ }, null, 8, ["aria-label"])) : v > 0 ? (i(), C("div", la)) : F("", !0),
439
445
  d("div", sa, [
440
446
  r(ae, {
441
- ref: (P) => he(v, P),
447
+ ref: (z) => he(v, z),
442
448
  class: "flex-1",
443
- "model-value": E.name,
449
+ "model-value": x.name,
444
450
  placeholder: t(a)("menu.variant.form.options.placeholder"),
445
- "onUpdate:modelValue": (P) => c.value.setOptionName(v, P)
451
+ "onUpdate:modelValue": (z) => u.value.setOptionName(v, z)
446
452
  }, Ie({ _: 2 }, [
447
453
  v !== (((se = l.value) == null ? void 0 : se.options.length) ?? 0) - 1 ? {
448
454
  name: "append",
@@ -455,28 +461,28 @@ const Re = {
455
461
  class: "!p-0",
456
462
  icon: "g_translate",
457
463
  variant: "tertiary",
458
- onClick: n[3] || (n[3] = (P) => Z("options"))
464
+ onClick: n[3] || (n[3] = (z) => Z("options"))
459
465
  }, null, 8, ["aria-label"]),
460
466
  r(o, {
461
467
  "aria-label": t(a)("menu.variant.form.options.remove", {
462
- number: E.name
468
+ number: x.name
463
469
  }),
464
470
  class: "!p-0",
465
471
  icon: "close",
466
472
  variant: "tertiary",
467
- onClick: (P) => c.value.removeOption(v)
473
+ onClick: (z) => u.value.removeOption(v)
468
474
  }, null, 8, ["aria-label", "onClick"])
469
475
  ])
470
476
  ]),
471
477
  key: "0"
472
478
  } : void 0
473
479
  ]), 1032, ["model-value", "placeholder", "onUpdate:modelValue"]),
474
- D(v, E) ? (i(), f(Fe, {
480
+ D(v, x) ? (i(), f(Fe, {
475
481
  key: 0,
476
482
  class: "mt-8",
477
- text: ge(v, E),
483
+ text: ge(v, x),
478
484
  state: "error"
479
- }, null, 8, ["text"])) : w("", !0)
485
+ }, null, 8, ["text"])) : F("", !0)
480
486
  ])
481
487
  ], 8, oa)
482
488
  ];
@@ -499,20 +505,20 @@ const Re = {
499
505
  "show-count": !1,
500
506
  title: t(a)("menu.variant.form.applied_product"),
501
507
  "read-only": "",
502
- "onUpdate:query": c.value.setLinkedProductQuery
503
- }, null, 8, ["applied-count", "groups", "query", "title", "onUpdate:query"])) : w("", !0)
508
+ "onUpdate:query": u.value.setLinkedProductQuery
509
+ }, null, 8, ["applied-count", "groups", "query", "title", "onUpdate:query"])) : F("", !0)
504
510
  ])
505
511
  ];
506
512
  }),
507
513
  _: 1
508
514
  }, 8, ["model-value", "is-container", "is-container-props"]),
509
- h.value ? (i(), f(je, {
515
+ h.value ? (i(), f(Ne, {
510
516
  key: 5,
511
517
  "expanded-section": J.value,
512
518
  session: h.value,
513
- onClose: U,
519
+ onClose: M,
514
520
  onSave: _e
515
- }, null, 8, ["expanded-section", "session"])) : w("", !0)
521
+ }, null, 8, ["expanded-section", "session"])) : F("", !0)
516
522
  ]),
517
523
  _: 1
518
524
  }, 8, ["heading"]);
@@ -521,8 +527,8 @@ const Re = {
521
527
  }), xa = /* @__PURE__ */ de({
522
528
  __name: "Variant",
523
529
  setup(R) {
524
- const g = Qe();
525
- return (a, T) => (i(), f(ua, { sdk: t(g) }, null, 8, ["sdk"]));
530
+ const y = Qe();
531
+ return (a, S) => (i(), f(ua, { sdk: t(y) }, null, 8, ["sdk"]));
526
532
  }
527
533
  });
528
534
  export {
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as i, watch as l, onUnmounted as m, openBlock as d, createBlock as p, unref as f } from "vue";
2
2
  import { useRoute as _, useRouter as g, RouterView as k } from "vue-router";
3
- import { a as R, u as w } from "./provide-dbE6Qt1z.js";
4
- import { u as h } from "./useActionFeedback-CdY_C_HX.js";
5
- import { R as y } from "./app-BlTv5xag.js";
3
+ import { a as R, u as w } from "./provide-UZbVvMqZ.js";
4
+ import { u as h } from "./useActionFeedback-CfPMryOm.js";
5
+ import { R as y } from "./app-DnIyFwTs.js";
6
6
  const M = /* @__PURE__ */ i({
7
7
  __name: "[id]",
8
8
  setup(x) {