@feedmepos/mf-menu-portal 1.0.4-dev.4 → 1.0.5-dev.1

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 (78) hide show
  1. package/dist/{App-CrpoLCjA.js → App-B2xq1U4S.js} +699 -687
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-Hdsnu29V.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CPh1GBw9.js} +11 -10
  3. package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-D3CmOOPY.js → BindingTable.vue_vue_type_script_setup_true_lang-DCgMQJE-.js} +50 -46
  4. package/dist/Catalog-BEI73S_k.js +433 -0
  5. package/dist/{CatalogBinding-BNATtZEY.js → CatalogBinding-3rhuTWDD.js} +30 -29
  6. package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-BmG-xpW4.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-CraEwqCY.js} +30 -29
  7. package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-BFsRDFpj.js → CatalogEditor.vue_vue_type_script_setup_true_lang-Dc72SNpI.js} +314 -304
  8. package/dist/CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-CMyubLvP.js +127 -0
  9. package/dist/{Category-DMoXTsfG.js → Category-BVCdkA5K.js} +14 -13
  10. package/dist/{Category-DxjdQ-NN.js → Category-P5DYjIeF.js} +2 -2
  11. package/dist/{CategoryList.vue_vue_type_script_setup_true_lang-B3Ts1O-9.js → CategoryList.vue_vue_type_script_setup_true_lang-DyhW52Df.js} +274 -262
  12. package/dist/{CookingGuide-DiZZDYD-.js → CookingGuide-Y-c1NLP5.js} +144 -140
  13. package/dist/{Group-rzfh_o6r.js → Group-D6wA3jCF.js} +2 -2
  14. package/dist/{Group-DFR8q-tt.js → Group-qqr5SUIc.js} +17 -15
  15. package/dist/GroupList.vue_vue_type_script_setup_true_lang-DNTVfY2d.js +1996 -0
  16. package/dist/{Ingredient-DpjGIuH9.js → Ingredient-CJHkJZ0y.js} +94 -93
  17. package/dist/{LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CnI80Ojd.js → LinkProductSideSheet.vue_vue_type_script_setup_true_lang-Cb6nO43H.js} +1 -1
  18. package/dist/{MenuSetting-DR-pDSF_.js → MenuSetting-YcEGo51l.js} +462 -446
  19. package/dist/{OrderPacing-JcTuweqF.js → OrderPacing-DwQU7c0Y.js} +207 -204
  20. package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-HwwJ2mGv.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-2Cdz70u-.js} +1 -2
  21. package/dist/PageLayout.vue_vue_type_script_setup_true_lang-DrhsROXo.js +44 -0
  22. package/dist/PhoneFab.vue_vue_type_script_setup_true_lang-CipbTqbp.js +12 -0
  23. package/dist/{Preview-BZyun5lZ.js → Preview-DLeXy5V-.js} +2 -2
  24. package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-DquqNbE1.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-D_OV9Z_4.js} +1 -1
  25. package/dist/{PrintRoute-CzEx2dCt.js → PrintRoute-R38w0-U2.js} +151 -150
  26. package/dist/{Product-CQb0n06E.js → Product-sbMCaVhM.js} +8 -7
  27. package/dist/ProductAttributeFilter.vue_vue_type_script_setup_true_lang-DoHQeOHy.js +7826 -0
  28. package/dist/ProductChipSummary.vue_vue_type_script_setup_true_lang-D9v88xZs.js +111 -0
  29. package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang-CBlDEjqF.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-DsIGLKNS.js} +17 -17
  30. package/dist/{ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-D8NQTCLx.js → ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-CEliG36Z.js} +726 -726
  31. package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-cG47Pu-6.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-B3bShTjM.js} +127 -124
  32. package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-0UwUcA2L.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-BzctosMW.js} +820 -807
  33. package/dist/{ProductInternalTools-QrBR1nFp.js → ProductInternalTools-jE3Ovo4l.js} +3 -3
  34. package/dist/{ProductInventoryDialog-fV38GO1a.js → ProductInventoryDialog-EDlrXupB.js} +1 -1
  35. package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-Bzb3RrMg.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-LOwSpoiA.js} +1 -1
  36. package/dist/{ProductList.vue_vue_type_script_setup_true_lang-BwKQESr3.js → ProductList.vue_vue_type_script_setup_true_lang-rczFAWVa.js} +1135 -1098
  37. package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-CDYcHXo1.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-C4iK-sAd.js} +1 -1
  38. package/dist/{Products-B8tysOAL.js → Products-DUE10OyS.js} +51 -49
  39. package/dist/Publish-BlMxKniP.js +1300 -0
  40. package/dist/{Recipe-Ddx31csF.js → Recipe-BhjPAidT.js} +83 -82
  41. package/dist/{Scheduler-CST5L_cw.js → Scheduler-wKG3_D1f.js} +137 -136
  42. package/dist/{ServingSequence-DYyEZI2S.js → ServingSequence-B26BETQs.js} +63 -61
  43. package/dist/Setting-DBdNl3WL.js +185 -0
  44. package/dist/{Subcategory-BIgjzVta.js → Subcategory-B06yMcuE.js} +147 -144
  45. package/dist/{Takeaway-CekhGM-m.js → Takeaway-CFATfy-6.js} +2 -2
  46. package/dist/{Takeaway-aXsPg4JT.js → Takeaway-DFqOtls7.js} +17 -16
  47. package/dist/TakeawayList.vue_vue_type_script_setup_true_lang-CUHB-g9I.js +616 -0
  48. package/dist/TextChip.vue_vue_type_script_setup_true_lang-YkUjMTXo.js +32 -0
  49. package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CshqYpc9.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DoS4Btzj.js} +281 -308
  50. package/dist/{Unit-BMW8u0Us.js → Unit-B5wKBmIT.js} +90 -89
  51. package/dist/{Variant-CZsrYRMU.js → Variant-C5ePu0za.js} +167 -174
  52. package/dist/{_id_-D4swrvNa.js → _id_-HRDqt6oD.js} +3 -3
  53. package/dist/{app-BWwwHsWi.js → app-CxJjx2ma.js} +39 -39
  54. package/dist/app.js +1 -1
  55. package/dist/apps/mf-menu/src/app.d.ts +35 -0
  56. package/dist/apps/mf-menu/src/components/GroupList.vue.d.ts +8 -0
  57. package/dist/apps/mf-menu/src/components/Product/OrderFromChip.vue.d.ts +6 -0
  58. package/dist/apps/mf-menu/src/components/Product/ProductThumbnail.vue.d.ts +6 -0
  59. package/dist/apps/mf-menu/src/components/ProductList.vue.d.ts +4 -2
  60. package/dist/apps/mf-menu/src/components/PublishList.vue.d.ts +1 -1
  61. package/dist/apps/mf-menu/src/components/layout/MobileXScrollable.vue.d.ts +9 -0
  62. package/dist/apps/mf-menu/src/components/layout/PageLayout.vue.d.ts +7 -0
  63. package/dist/apps/mf-menu/src/components/layout/PhoneFab.vue.d.ts +9 -0
  64. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  65. package/dist/assets/{menu-compute-D7TdiHt4.js → menu-compute-CQdeCEBO.js} +19 -19
  66. package/dist/assets/{validate-menu-DXppWUVq.js → validate-menu-BVo4fNWG.js} +14 -14
  67. package/dist/mf-menu-portal.css +1 -1
  68. package/dist/{provide-CDmXzkhz.js → provide-BGLSDsuJ.js} +99816 -99564
  69. package/dist/{useActionFeedback-Dm2HDa_2.js → useActionFeedback-CElXij1W.js} +1 -1
  70. package/package.json +1 -1
  71. package/dist/Catalog-VU3HhNro.js +0 -374
  72. package/dist/CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Bk4FqVmx.js +0 -117
  73. package/dist/GroupList.vue_vue_type_script_setup_true_lang-DiN-wQXX.js +0 -1807
  74. package/dist/PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js +0 -41
  75. package/dist/ProductAttributeFilter.vue_vue_type_script_setup_true_lang-B2KdolJS.js +0 -7931
  76. package/dist/Publish-DTvOvFNa.js +0 -1337
  77. package/dist/Setting-Ip0pGjks.js +0 -179
  78. package/dist/TakeawayList.vue_vue_type_script_setup_true_lang-CaRR4_j3.js +0 -554
@@ -1,69 +1,70 @@
1
- import { defineComponent as fe, computed as h, ref as Pe, shallowRef as B, h as x, withModifiers as ue, onUnmounted as Te, resolveComponent as b, openBlock as i, createBlock as f, unref as t, withCtx as p, createElementBlock as C, toDisplayString as S, Fragment as ce, createElementVNode as d, normalizeClass as me, createVNode as r, renderList as Ve, createCommentVNode as L, mergeProps as de, createSlots as $e, nextTick as Ee } from "vue";
2
- import { _ as Oe, d as ze } from "./vuedraggable-CBtQLb_S.js";
3
- import { useI18n as Me } from "@feedmepos/mf-common";
4
- import { useDialog as je, useBreakpoints as Be, components as pe, FmButtonVariant as H } from "@feedmepos/ui-library";
5
- import { _ as Ue } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-Hdsnu29V.js";
6
- import { _ as Ae } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
7
- import { _ as Ne } from "./ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-CDYcHXo1.js";
8
- import { _ as qe } from "./FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js";
9
- import { _ as De } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
1
+ import { defineComponent as pe, computed as k, ref as $e, shallowRef as B, h as x, withModifiers as re, onUnmounted as Le, resolveComponent as C, openBlock as i, createBlock as b, unref as t, withCtx as v, createElementBlock as h, toDisplayString as S, Fragment as ue, createElementVNode as d, normalizeClass as ce, createVNode as r, renderList as Pe, createCommentVNode as $, mergeProps as me, createSlots as Te, nextTick as Ve } from "vue";
2
+ import { _ as Ee, d as Oe } from "./vuedraggable-CBtQLb_S.js";
3
+ import { useI18n as Ie } from "@feedmepos/mf-common";
4
+ import { useDialog as ze, useBreakpoints as Me, components as de, FmButtonVariant as H } from "@feedmepos/ui-library";
5
+ import { _ as je } from "./PhoneFab.vue_vue_type_script_setup_true_lang-CipbTqbp.js";
6
+ import { _ as Be } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-CPh1GBw9.js";
7
+ import { _ as Ue } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
8
+ import { _ as Ae } from "./ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-C4iK-sAd.js";
9
+ import { _ as Ne } from "./FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js";
10
+ import { _ as qe } from "./PageLayout.vue_vue_type_script_setup_true_lang-DrhsROXo.js";
10
11
  import { _ as ve } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-CAkLEmSA.js";
11
- import { u as Re } from "./useActionFeedback-Dm2HDa_2.js";
12
- import { u as Qe } from "./useEditorValidation-Ctef5Bxt.js";
13
- import { b as Ge, u as He, a as Ke } from "./provide-CDmXzkhz.js";
14
- const Je = {
12
+ import { u as De } from "./useActionFeedback-CElXij1W.js";
13
+ import { u as Re } from "./useEditorValidation-Ctef5Bxt.js";
14
+ import { b as Qe, u as Ge, a as He } from "./provide-BGLSDsuJ.js";
15
+ const Ke = {
15
16
  key: 0,
16
17
  class: "text-fm-color-typo-secondary",
17
18
  role: "alert"
18
- }, We = {
19
+ }, Je = {
19
20
  key: 1,
20
21
  class: "text-fm-color-typo-secondary",
21
22
  "data-menu-state": "unavailable"
22
- }, Xe = { class: "flex justify-end items-center" }, Ye = { class: "min-w-0 flex flex-1 items-center gap-8 px-16 py-12" }, Ze = { class: "min-w-0 flex-1 flex flex-col gap-4" }, ea = { class: "fm-typo-en-body-lg-600 break-words" }, aa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ta = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary break-words" }, na = { key: 1 }, oa = {
23
- key: 2,
24
- class: "fixed right-16 bottom-[72px] z-[100] w-[154px]"
25
- }, la = { class: "fm-typo-en-title-md-600" }, sa = { class: "py-16 space-y-32" }, ia = ["data-not-allow-sort"], ra = {
23
+ }, We = { class: "flex justify-end items-center" }, Xe = {
24
+ key: 0,
25
+ class: "mt-8 flex-1 min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
26
+ }, Ye = ["onClick"], Ze = { class: "min-w-0 flex-1 space-y-4" }, ea = { class: "fm-typo-en-body-lg-600 break-words" }, aa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ta = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary break-words" }, na = { key: 1 }, oa = { class: "fm-typo-en-title-md-600" }, la = { class: "py-16 space-y-32" }, sa = ["data-not-allow-sort"], ia = {
26
27
  key: 1,
27
28
  class: "w-24"
28
- }, ua = { class: "flex-1" }, ca = { class: "flex items-center gap-8" }, ma = { class: "flex gap-8 items-center justify-start" }, da = /* @__PURE__ */ fe({
29
+ }, ra = { class: "flex-1" }, ua = { class: "flex items-center gap-8" }, ca = { class: "flex gap-8 items-center justify-start" }, ma = /* @__PURE__ */ pe({
29
30
  __name: "VariantList",
30
31
  props: {
31
32
  sdk: {}
32
33
  },
33
34
  setup(K) {
34
- const g = K, { t: a } = Me(), I = Ge(), J = je(), { breakpoints: _e } = Be(), { run: U } = Re(), y = He(g.sdk.variant.list), c = h(
35
- () => y.value.status === "ready" ? y.value.value : null
36
- ), W = h(() => {
35
+ const y = K, { t: a } = Ie(), L = Qe(), J = ze(), { breakpoints: fe } = Me(), { run: U } = De(), g = Ge(y.sdk.variant.list), c = k(
36
+ () => g.value.status === "ready" ? g.value.value : null
37
+ ), W = k(() => {
37
38
  var e;
38
39
  return ((e = c.value) == null ? void 0 : e.query) ?? "";
39
- }), P = h(() => _e.value.xs), T = Pe(!1), u = B(
40
- g.sdk.variant.editor()
40
+ }), P = k(() => fe.value.xs), T = $e(!1), u = B(
41
+ y.sdk.variant.editor()
41
42
  ), V = B(
42
43
  u.value.get()
43
44
  );
44
45
  let A = u.value.subscribe(
45
46
  (e) => V.value = e
46
47
  );
47
- const l = h(
48
+ const l = k(
48
49
  () => V.value.status === "ready" ? V.value.value : null
49
- ), $ = Qe(() => u.value), X = h(
50
- () => l.value ? $.issue(l.value.fieldIssues, "name") ?? l.value.nameIssue : null
51
- ), Y = h(
52
- () => l.value ? $.issue(l.value.fieldIssues, "options") ?? l.value.optionsIssue : null
50
+ ), E = Re(() => u.value), X = k(
51
+ () => l.value ? E.issue(l.value.fieldIssues, "name") ?? l.value.nameIssue : null
52
+ ), Y = k(
53
+ () => l.value ? E.issue(l.value.fieldIssues, "options") ?? l.value.optionsIssue : null
53
54
  );
54
- function be(e) {
55
- const { ref: n, ...o } = $.field(
55
+ function _e(e) {
56
+ const { ref: n, ...o } = E.field(
56
57
  "options",
57
58
  (m) => u.value.setOptionName(e, m)
58
59
  );
59
60
  return o;
60
61
  }
61
- const w = B(null), Z = B("variant"), ge = h(() => {
62
+ const w = B(null), Z = B("variant"), be = k(() => {
62
63
  var e;
63
64
  return ((e = l.value) == null ? void 0 : e.linkedGroups) ?? [];
64
65
  }), N = /* @__PURE__ */ new Map();
65
66
  function ee(e) {
66
- O(), A(), u.value.dispose(), u.value = g.sdk.variant.editor(e), V.value = u.value.get(), A = u.value.subscribe(
67
+ I(), A(), u.value.dispose(), u.value = y.sdk.variant.editor(e), V.value = u.value.get(), A = u.value.subscribe(
67
68
  (n) => V.value = n
68
69
  );
69
70
  }
@@ -73,12 +74,12 @@ const Je = {
73
74
  function ae(e) {
74
75
  ee(e.id), T.value = !0;
75
76
  }
76
- function E() {
77
+ function O() {
77
78
  T.value = !1;
78
79
  }
79
80
  function te() {
80
81
  var e;
81
- if (!((e = l.value) != null && e.dirty)) return E();
82
+ if (!((e = l.value) != null && e.dirty)) return O();
82
83
  J.open({
83
84
  title: a("menu.common.dialog.dismiss.title"),
84
85
  message: a("menu.common.dialog.dismiss.message"),
@@ -92,7 +93,7 @@ const Je = {
92
93
  close: !0,
93
94
  variant: H.Tertiary
94
95
  }
95
- }).onPrimary(E);
96
+ }).onPrimary(O);
96
97
  }
97
98
  function ye(e) {
98
99
  e ? T.value = !0 : te();
@@ -101,21 +102,21 @@ const Je = {
101
102
  var n;
102
103
  (n = w.value) == null || n.dispose(), Z.value = e, w.value = u.value.translationEditor();
103
104
  }
104
- function O() {
105
+ function I() {
105
106
  var e;
106
107
  (e = w.value) == null || e.dispose(), w.value = null;
107
108
  }
108
- async function ke() {
109
+ async function ge() {
109
110
  const e = w.value;
110
111
  if (!e) return;
111
112
  (await U(async () => e.apply(), {
112
113
  showLoading: !1
113
- })).kind === "success" && O();
114
+ })).kind === "success" && I();
114
115
  }
115
- function he(e) {
116
+ function ke(e) {
116
117
  u.value.reorderOptions(e.map((n) => n.id));
117
118
  }
118
- function we(e) {
119
+ function he(e) {
119
120
  return e.draggedContext.futureIndex !== e.relatedContext.list.length - 1;
120
121
  }
121
122
  function D(e, n) {
@@ -123,11 +124,11 @@ const Je = {
123
124
  const o = l.value;
124
125
  return ((m = Y.value) == null ? void 0 : m.code) === "menu.variant.form.options.name_required" && !!o && e !== o.options.length - 1 && !n.name.trim();
125
126
  }
126
- function xe(e, n) {
127
+ function we(e, n) {
127
128
  const o = Y.value;
128
- return D(e, n) && o ? I(o) : "";
129
+ return D(e, n) && o ? L(o) : "";
129
130
  }
130
- function Ce(e, n) {
131
+ function xe(e, n) {
131
132
  if (!n || typeof n.focus != "function") {
132
133
  N.delete(e);
133
134
  return;
@@ -138,32 +139,32 @@ const Je = {
138
139
  a("menu.variant.form.options.input", { number: e + 1 })
139
140
  );
140
141
  }
141
- function Fe(e) {
142
+ function Ce(e) {
142
143
  return e.reduce((n, o) => {
143
144
  for (const [m, F] of Object.entries(o.nameLocale ?? {}))
144
145
  n[m] ?? (n[m] = F);
145
146
  return n;
146
147
  }, {});
147
148
  }
148
- async function Se() {
149
+ async function Fe() {
149
150
  var F, z, M;
150
151
  const e = ((F = l.value) == null ? void 0 : F.name) ?? "", n = await U(
151
- () => $.submit(() => u.value.submit()),
152
+ () => E.submit(() => u.value.submit()),
152
153
  {
153
154
  successMessage: a("menu.variant.form.saved", { name: e }),
154
155
  // `submit()` publishes `submitting` synchronously only when it will
155
156
  // perform a write. Local validation rejection must not flash loading.
156
157
  showLoading: () => {
157
- var k;
158
- return ((k = l.value) == null ? void 0 : k.status) === "submitting";
158
+ var f;
159
+ return ((f = l.value) == null ? void 0 : f.status) === "submitting";
159
160
  }
160
161
  }
161
162
  );
162
- n.kind === "success" && E();
163
- const o = n.kind === "rejected" && n.issues.some((k) => k.field === "options"), m = (z = l.value) == null ? void 0 : z.options.findIndex(
164
- (k, R) => D(R, k)
163
+ n.kind === "success" && O();
164
+ const o = n.kind === "rejected" && n.issues.some((f) => f.field === "options"), m = (z = l.value) == null ? void 0 : z.options.findIndex(
165
+ (f, R) => D(R, f)
165
166
  );
166
- o && m !== void 0 && m >= 0 && (await Ee(), (M = N.get(m)) == null || M.focus());
167
+ o && m !== void 0 && m >= 0 && (await Ve(), (M = N.get(m)) == null || M.focus());
167
168
  }
168
169
  function oe(e) {
169
170
  e.remove.state === "allowed" && J.open({
@@ -181,12 +182,12 @@ const Je = {
181
182
  close: !0
182
183
  }
183
184
  }).onPrimary(async () => {
184
- await U(() => g.sdk.variant.remove(e.id), {
185
+ await U(() => y.sdk.variant.remove(e.id), {
185
186
  successMessage: a("menu.variant.form.removed", { name: e.name })
186
187
  });
187
188
  });
188
189
  }
189
- const Le = h(() => [
190
+ const Se = k(() => [
190
191
  // Widths are the legacy ones (`Variant.vue:57,76,107`). They are not
191
192
  // cosmetic: they decide where the option-values column wraps, and a wrap
192
193
  // shifts every row below it out of visual parity.
@@ -210,7 +211,7 @@ const Je = {
210
211
  size: 560,
211
212
  enableSorting: !1,
212
213
  cell: (e) => {
213
- const n = Fe(e.row.original.options);
214
+ const n = Ce(e.row.original.options);
214
215
  return x("div", { class: "flex items-center gap-8" }, [
215
216
  x(
216
217
  "span",
@@ -235,7 +236,7 @@ const Je = {
235
236
  size: 52,
236
237
  meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
237
238
  header: "",
238
- cell: (e) => x(pe.FmButton, {
239
+ cell: (e) => x(de.FmButton, {
239
240
  icon: "delete",
240
241
  variant: "tertiary",
241
242
  textColor: "neutral-gray-400",
@@ -243,91 +244,81 @@ const Je = {
243
244
  "aria-label": a("menu.variant.actions.remove", {
244
245
  name: e.row.original.name
245
246
  }),
246
- onClick: ue(
247
+ onClick: re(
247
248
  () => oe(e.row.original),
248
249
  ["stop", "prevent"]
249
250
  )
250
251
  })
251
252
  }
252
253
  ]);
253
- return Te(() => {
254
- g.sdk.variant.search(""), O(), A(), u.value.dispose();
254
+ return Le(() => {
255
+ y.sdk.variant.search(""), I(), A(), u.value.dispose();
255
256
  }), (e, n) => {
256
- const o = b("FmButton"), m = b("FmCircularProgress"), F = b("FmSearch"), z = b("FmListItem"), M = b("FmList"), k = b("FmTable"), R = b("FmTooltip"), le = b("FmTextField"), Ie = b("FmSideSheet");
257
- return i(), f(De, {
257
+ const o = C("FmButton"), m = C("FmCircularProgress"), F = C("FmSearch"), z = C("FmTable"), M = C("FmTooltip"), f = C("FmTextField"), R = C("FmSideSheet");
258
+ return i(), b(qe, {
258
259
  heading: t(a)("menu.variant.title")
259
260
  }, {
260
- "append-heading": p(() => [
261
- t(y).status === "ready" && c.value && c.value.totalCount > 0 && !P.value ? (i(), f(o, {
261
+ "append-heading": v(() => [
262
+ t(g).status === "ready" && c.value && c.value.totalCount > 0 && !P.value ? (i(), b(o, {
262
263
  key: 0,
263
264
  class: "ml-auto",
264
265
  disabled: c.value.create.state !== "allowed",
265
266
  label: t(a)("menu.variant.add"),
266
267
  "prepend-icon": "add",
267
268
  onClick: q
268
- }, null, 8, ["disabled", "label"])) : L("", !0)
269
+ }, null, 8, ["disabled", "label"])) : $("", !0)
269
270
  ]),
270
- default: p(() => [
271
- t(y).status === "error" ? (i(), C("p", Je, S(t(I)(t(y).error.message)), 1)) : t(y).status === "unavailable" ? (i(), C("p", We, S(t(I)(t(y).reason)), 1)) : t(y).status === "loading" ? (i(), f(m, { key: 2 })) : c.value && c.value.rows.length === 0 && !W.value ? (i(), f(t(Ae), {
271
+ default: v(() => [
272
+ t(g).status === "error" ? (i(), h("p", Ke, S(t(L)(t(g).error.message)), 1)) : t(g).status === "unavailable" ? (i(), h("p", Je, S(t(L)(t(g).reason)), 1)) : t(g).status === "loading" ? (i(), b(m, { key: 2 })) : c.value && c.value.rows.length === 0 && !W.value ? (i(), b(t(Ue), {
272
273
  key: 3,
274
+ class: "xs:pt-16",
273
275
  action: { text: t(a)("menu.variant.add"), callback: q },
274
276
  title: t(a)("menu.variant.empty.title"),
275
277
  subtitle: t(a)("menu.variant.empty.subtitle")
276
- }, null, 8, ["action", "title", "subtitle"])) : c.value ? (i(), C(ce, { key: 4 }, [
277
- d("div", Xe, [
278
+ }, null, 8, ["action", "title", "subtitle"])) : c.value ? (i(), h(ue, { key: 4 }, [
279
+ d("div", We, [
278
280
  d("div", {
279
- class: me(P.value ? "w-[calc(100%-32px)] mx-16 mt-8" : "w-[320px]")
281
+ class: ce(P.value ? "w-[calc(100%-32px)] mx-16 mt-8" : "w-[320px]")
280
282
  }, [
281
283
  r(F, {
282
284
  autofocus: "",
283
- class: me(P.value ? "mb-0" : "mb-8"),
285
+ class: ce(P.value ? "mb-0" : "mb-8"),
284
286
  "model-value": W.value,
285
287
  placeholder: t(a)("menu.common.labels.search_variants"),
286
- "onUpdate:modelValue": g.sdk.variant.search
288
+ "onUpdate:modelValue": y.sdk.variant.search
287
289
  }, null, 8, ["class", "model-value", "placeholder", "onUpdate:modelValue"])
288
290
  ], 2)
289
291
  ]),
290
- P.value ? (i(), f(M, {
291
- key: 0,
292
- class: "mt-8 pb-64"
293
- }, {
294
- default: p(() => [
295
- (i(!0), C(ce, null, Ve(c.value.rows, (s) => (i(), f(z, {
296
- key: s.id,
297
- class: "border-b border-fm-color-neutral-gray-100 !p-0",
298
- onClick: (_) => ae(s)
299
- }, {
300
- default: p(() => [
301
- d("div", Ye, [
302
- d("div", Ze, [
303
- d("p", ea, S(s.name), 1),
304
- d("div", null, [
305
- d("p", aa, S(t(a)("menu.common.labels.items_linked", {
306
- count: s.linkedProductCount
307
- })), 1),
308
- d("p", ta, S(t(a)("menu.variant.mobile.value", {
309
- values: s.options.map((_) => _.name).join(", ")
310
- })), 1)
311
- ])
312
- ]),
313
- r(o, {
314
- class: "shrink-0",
315
- disabled: s.remove.state !== "allowed",
316
- "aria-label": t(a)("menu.variant.actions.remove", { name: s.name }),
317
- "prepend-icon": "delete",
318
- "text-color": "neutral-gray-400",
319
- variant: "tertiary",
320
- onClick: ue((_) => oe(s), ["stop"])
321
- }, null, 8, ["disabled", "aria-label", "onClick"])
322
- ])
323
- ]),
324
- _: 2
325
- }, 1032, ["onClick"]))), 128))
326
- ]),
327
- _: 1
328
- })) : (i(), C("div", na, [
329
- r(k, {
330
- "column-defs": Le.value,
292
+ P.value ? (i(), h("div", Xe, [
293
+ (i(!0), h(ue, null, Pe(c.value.rows, (s) => (i(), h("div", {
294
+ key: s.id,
295
+ class: "py-12 px-16 flex space-x-8 items-center cursor-pointer",
296
+ onClick: (_) => ae(s)
297
+ }, [
298
+ d("div", Ze, [
299
+ d("p", ea, S(s.name), 1),
300
+ d("div", null, [
301
+ d("p", aa, S(t(a)("menu.common.labels.items_linked", {
302
+ count: s.linkedProductCount
303
+ })), 1),
304
+ d("p", ta, S(t(a)("menu.variant.mobile.value", {
305
+ values: s.options.map((_) => _.name).join(", ")
306
+ })), 1)
307
+ ])
308
+ ]),
309
+ r(o, {
310
+ class: "shrink-0",
311
+ disabled: s.remove.state !== "allowed",
312
+ "aria-label": t(a)("menu.variant.actions.remove", { name: s.name }),
313
+ "prepend-icon": "delete",
314
+ "text-color": "neutral-gray-400",
315
+ variant: "tertiary",
316
+ onClick: re((_) => oe(s), ["stop"])
317
+ }, null, 8, ["disabled", "aria-label", "onClick"])
318
+ ], 8, Ye))), 128))
319
+ ])) : (i(), h("div", na, [
320
+ r(z, {
321
+ "column-defs": Se.value,
331
322
  "hide-footer": "",
332
323
  "page-size": c.value.rows.length,
333
324
  "pin-header-row": "",
@@ -336,35 +327,37 @@ const Je = {
336
327
  onRowClick: n[0] || (n[0] = (s) => ae(s.original))
337
328
  }, null, 8, ["column-defs", "page-size", "row-data"])
338
329
  ])),
339
- c.value.totalCount > 0 && P.value ? (i(), C("div", oa, [
340
- r(o, {
341
- class: "w-full",
342
- disabled: c.value.create.state !== "allowed",
343
- label: t(a)("menu.variant.add"),
344
- "prepend-icon": "add",
345
- variant: "fab",
346
- onClick: q
347
- }, null, 8, ["disabled", "label"])
348
- ])) : L("", !0)
349
- ], 64)) : L("", !0),
350
- r(Ie, {
330
+ c.value.totalCount > 0 && P.value ? (i(), b(je, { key: 2 }, {
331
+ default: v(() => [
332
+ r(o, {
333
+ disabled: c.value.create.state !== "allowed",
334
+ label: t(a)("menu.variant.add"),
335
+ "prepend-icon": "add",
336
+ variant: "fab",
337
+ onClick: q
338
+ }, null, 8, ["disabled", "label"])
339
+ ]),
340
+ _: 1
341
+ })) : $("", !0)
342
+ ], 64)) : $("", !0),
343
+ r(R, {
351
344
  "model-value": T.value,
352
- "is-container": t(pe).FmForm,
353
- "is-container-props": { onValidationSuccess: Se },
345
+ "is-container": t(de).FmForm,
346
+ "is-container-props": { onValidationSuccess: Fe },
354
347
  "max-width": 560,
355
348
  "onOn:clickedAway": te,
356
349
  "onUpdate:modelValue": ye
357
350
  }, {
358
- "side-sheet-header": p(() => {
351
+ "side-sheet-header": v(() => {
359
352
  var s;
360
353
  return [
361
- d("p", la, S(((s = l.value) == null ? void 0 : s.mode) === "update" ? t(a)("menu.variant.form.title.edit") : t(a)("menu.variant.form.title.add")), 1)
354
+ d("p", oa, S(((s = l.value) == null ? void 0 : s.mode) === "update" ? t(a)("menu.variant.form.title.edit") : t(a)("menu.variant.form.title.add")), 1)
362
355
  ];
363
356
  }),
364
- "side-sheet-footer": p(() => {
357
+ "side-sheet-footer": v(() => {
365
358
  var s, _;
366
359
  return [
367
- d("div", ma, [
360
+ d("div", ca, [
368
361
  r(o, {
369
362
  disabled: ((s = l.value) == null ? void 0 : s.submit.state) !== "allowed",
370
363
  label: ((_ = l.value) == null ? void 0 : _.mode) === "update" ? t(a)("menu.common.actions.update") : t(a)("menu.common.actions.add"),
@@ -376,35 +369,35 @@ const Je = {
376
369
  label: t(a)("menu.common.actions.cancel"),
377
370
  size: "lg",
378
371
  variant: "tertiary",
379
- onClick: E
372
+ onClick: O
380
373
  }, null, 8, ["label"])
381
374
  ])
382
375
  ];
383
376
  }),
384
- default: p(() => {
377
+ default: v(() => {
385
378
  var s;
386
379
  return [
387
- d("div", sa, [
388
- r(Oe, {
380
+ d("div", la, [
381
+ r(Ee, {
389
382
  title: t(a)("menu.variant.form.detail")
390
383
  }, {
391
- default: p(() => {
384
+ default: v(() => {
392
385
  var _;
393
386
  return [
394
- r(le, de({
395
- "error-messages": X.value ? [t(I)(X.value)] : [],
387
+ r(f, me({
388
+ "error-messages": X.value ? [t(L)(X.value)] : [],
396
389
  "helper-text": t(a)("menu.variant.form.name.helper"),
397
390
  label: t(a)("menu.variant.form.name.label"),
398
391
  "model-value": ((_ = l.value) == null ? void 0 : _.name) ?? "",
399
392
  placeholder: t(a)("menu.variant.form.name.placeholder")
400
- }, t($).field("name", u.value.setName)), {
401
- append: p(() => [
402
- r(R, {
393
+ }, t(E).field("name", u.value.setName)), {
394
+ append: v(() => [
395
+ r(M, {
403
396
  placement: "top",
404
397
  variant: "plain",
405
398
  "z-index": 999
406
399
  }, {
407
- default: p(() => [
400
+ default: v(() => [
408
401
  r(o, {
409
402
  "aria-label": t(a)("menu.variant.form.translation.button"),
410
403
  class: "!p-0",
@@ -418,53 +411,53 @@ const Je = {
418
411
  ]),
419
412
  _: 1
420
413
  }, 16, ["error-messages", "helper-text", "label", "model-value", "placeholder"]),
421
- r(qe, {
414
+ r(Ne, {
422
415
  label: t(a)("menu.variant.form.options.title")
423
416
  }, {
424
- default: p(() => {
417
+ default: v(() => {
425
418
  var Q;
426
419
  return [
427
- r(t(ze), {
420
+ r(t(Oe), {
428
421
  "model-value": [...((Q = l.value) == null ? void 0 : Q.options) ?? []],
429
- move: we,
422
+ move: he,
430
423
  class: "space-y-16",
431
424
  "data-testid": "variant-options",
432
425
  group: "variants",
433
426
  handle: ".handle",
434
427
  "item-key": "id",
435
- "onUpdate:modelValue": he
428
+ "onUpdate:modelValue": ke
436
429
  }, {
437
- item: p(({ element: j, index: v }) => {
438
- var se, ie, re;
430
+ item: v(({ element: j, index: p }) => {
431
+ var le, se, ie;
439
432
  return [
440
433
  d("div", {
441
434
  class: "flex items-center gap-8",
442
- "data-not-allow-sort": v === (((se = l.value) == null ? void 0 : se.options.length) ?? 0) - 1
435
+ "data-not-allow-sort": p === (((le = l.value) == null ? void 0 : le.options.length) ?? 0) - 1
443
436
  }, [
444
- v !== (((ie = l.value) == null ? void 0 : ie.options.length) ?? 0) - 1 ? (i(), f(o, {
437
+ p !== (((se = l.value) == null ? void 0 : se.options.length) ?? 0) - 1 ? (i(), b(o, {
445
438
  key: 0,
446
439
  "aria-label": t(a)("menu.variant.form.options.move", {
447
- number: v + 1
440
+ number: p + 1
448
441
  }),
449
442
  class: "handle cursor-move !p-0",
450
443
  icon: "drag_handle",
451
444
  variant: "tertiary"
452
- }, null, 8, ["aria-label"])) : v > 0 ? (i(), C("div", ra)) : L("", !0),
453
- d("div", ua, [
454
- r(le, de({
455
- ref: (G) => Ce(v, G),
445
+ }, null, 8, ["aria-label"])) : p > 0 ? (i(), h("div", ia)) : $("", !0),
446
+ d("div", ra, [
447
+ r(f, me({
448
+ ref: (G) => xe(p, G),
456
449
  class: "flex-1",
457
- "error-messages": D(v, j) ? [xe(v, j)] : [],
450
+ "error-messages": D(p, j) ? [we(p, j)] : [],
458
451
  "model-value": j.name,
459
452
  placeholder: t(a)("menu.variant.form.options.placeholder")
460
- }, be(v)), $e({ _: 2 }, [
461
- v !== (((re = l.value) == null ? void 0 : re.options.length) ?? 0) - 1 ? {
453
+ }, _e(p)), Te({ _: 2 }, [
454
+ p !== (((ie = l.value) == null ? void 0 : ie.options.length) ?? 0) - 1 ? {
462
455
  name: "append",
463
- fn: p(() => [
464
- d("div", ca, [
456
+ fn: v(() => [
457
+ d("div", ua, [
465
458
  r(o, {
466
459
  "aria-label": t(a)("menu.variant.form.options.translation", {
467
- number: v + 1
460
+ number: p + 1
468
461
  }),
469
462
  class: "!p-0",
470
463
  icon: "g_translate",
@@ -478,7 +471,7 @@ const Je = {
478
471
  class: "!p-0",
479
472
  icon: "close",
480
473
  variant: "tertiary",
481
- onClick: (G) => u.value.removeOption(v)
474
+ onClick: (G) => u.value.removeOption(p)
482
475
  }, null, 8, ["aria-label", "onClick"])
483
476
  ])
484
477
  ]),
@@ -486,7 +479,7 @@ const Je = {
486
479
  } : void 0
487
480
  ]), 1040, ["error-messages", "model-value", "placeholder"])
488
481
  ])
489
- ], 8, ia)
482
+ ], 8, sa)
490
483
  ];
491
484
  }),
492
485
  _: 1
@@ -499,38 +492,38 @@ const Je = {
499
492
  }),
500
493
  _: 1
501
494
  }, 8, ["title"]),
502
- ((s = l.value) == null ? void 0 : s.mode) === "update" && l.value.linkedProductCount > 0 ? (i(), f(Ue, {
495
+ ((s = l.value) == null ? void 0 : s.mode) === "update" && l.value.linkedProductCount > 0 ? (i(), b(Be, {
503
496
  key: 0,
504
497
  "applied-count": l.value.linkedProductCount,
505
- groups: ge.value,
498
+ groups: be.value,
506
499
  query: l.value.linkedProductQuery,
507
500
  "show-count": !1,
508
501
  title: t(a)("menu.variant.form.applied_product"),
509
502
  "read-only": "",
510
503
  "onUpdate:query": u.value.setLinkedProductQuery
511
- }, null, 8, ["applied-count", "groups", "query", "title", "onUpdate:query"])) : L("", !0)
504
+ }, null, 8, ["applied-count", "groups", "query", "title", "onUpdate:query"])) : $("", !0)
512
505
  ])
513
506
  ];
514
507
  }),
515
508
  _: 1
516
509
  }, 8, ["model-value", "is-container", "is-container-props"]),
517
- w.value ? (i(), f(Ne, {
510
+ w.value ? (i(), b(Ae, {
518
511
  key: 5,
519
512
  "expanded-section": Z.value,
520
513
  session: w.value,
521
- onClose: O,
522
- onSave: ke
523
- }, null, 8, ["expanded-section", "session"])) : L("", !0)
514
+ onClose: I,
515
+ onSave: ge
516
+ }, null, 8, ["expanded-section", "session"])) : $("", !0)
524
517
  ]),
525
518
  _: 1
526
519
  }, 8, ["heading"]);
527
520
  };
528
521
  }
529
- }), Sa = /* @__PURE__ */ fe({
522
+ }), Sa = /* @__PURE__ */ pe({
530
523
  __name: "Variant",
531
524
  setup(K) {
532
- const g = Ke();
533
- return (a, I) => (i(), f(da, { sdk: t(g) }, null, 8, ["sdk"]));
525
+ const y = He();
526
+ return (a, L) => (i(), b(ma, { sdk: t(y) }, null, 8, ["sdk"]));
534
527
  }
535
528
  });
536
529
  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-CDmXzkhz.js";
4
- import { u as h } from "./useActionFeedback-Dm2HDa_2.js";
5
- import { R as y } from "./app-BWwwHsWi.js";
3
+ import { a as R, u as w } from "./provide-BGLSDsuJ.js";
4
+ import { u as h } from "./useActionFeedback-CElXij1W.js";
5
+ import { R as y } from "./app-CxJjx2ma.js";
6
6
  const M = /* @__PURE__ */ i({
7
7
  __name: "[id]",
8
8
  setup(x) {