@feedmepos/mf-menu-portal 1.0.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-CgYpEYgp.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-CWe5_Sm5.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-BjTeOA91.js → CatalogBinding-3rhuTWDD.js} +30 -29
  6. package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-doB3hsWD.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-CraEwqCY.js} +30 -29
  7. package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-BpBR-N_x.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-6-ppsSmZ.js → Category-BVCdkA5K.js} +14 -13
  10. package/dist/{Category-CdsbuUqi.js → Category-P5DYjIeF.js} +2 -2
  11. package/dist/{CategoryList.vue_vue_type_script_setup_true_lang-DlNUOgyu.js → CategoryList.vue_vue_type_script_setup_true_lang-DyhW52Df.js} +274 -262
  12. package/dist/{CookingGuide-CRyRlBeV.js → CookingGuide-Y-c1NLP5.js} +144 -140
  13. package/dist/{Group-DVrUlq4i.js → Group-D6wA3jCF.js} +2 -2
  14. package/dist/{Group-DqyBHSFx.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-CGLfhbvN.js → Ingredient-CJHkJZ0y.js} +94 -93
  17. package/dist/{LinkProductSideSheet.vue_vue_type_script_setup_true_lang-C0rc1FRO.js → LinkProductSideSheet.vue_vue_type_script_setup_true_lang-Cb6nO43H.js} +1 -1
  18. package/dist/{MenuSetting-Oct3vbHj.js → MenuSetting-YcEGo51l.js} +462 -446
  19. package/dist/{OrderPacing-BDkzflgE.js → OrderPacing-DwQU7c0Y.js} +207 -204
  20. package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-B259anSs.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-V9cSpevb.js → Preview-DLeXy5V-.js} +2 -2
  24. package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-k5S4mGCN.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-D_OV9Z_4.js} +1 -1
  25. package/dist/{PrintRoute-3UwiMoBU.js → PrintRoute-R38w0-U2.js} +151 -150
  26. package/dist/{Product-LaB-YRTQ.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-BBXGnZtc.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-DsIGLKNS.js} +17 -17
  30. package/dist/{ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-BUC6qUnG.js → ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-CEliG36Z.js} +726 -726
  31. package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CjQRRqBx.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-B3bShTjM.js} +127 -124
  32. package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-3yzUcogQ.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-BzctosMW.js} +820 -807
  33. package/dist/{ProductInternalTools-DWCgC825.js → ProductInternalTools-jE3Ovo4l.js} +3 -3
  34. package/dist/{ProductInventoryDialog-D0d5RywR.js → ProductInventoryDialog-EDlrXupB.js} +1 -1
  35. package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-CmYKO0ZX.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-LOwSpoiA.js} +1 -1
  36. package/dist/{ProductList.vue_vue_type_script_setup_true_lang-DeX8Exly.js → ProductList.vue_vue_type_script_setup_true_lang-rczFAWVa.js} +1135 -1098
  37. package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-BFD6_Sbb.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-C4iK-sAd.js} +1 -1
  38. package/dist/{Products-BLUhwFT-.js → Products-DUE10OyS.js} +51 -49
  39. package/dist/Publish-BlMxKniP.js +1300 -0
  40. package/dist/{Recipe-BGfofjHT.js → Recipe-BhjPAidT.js} +83 -82
  41. package/dist/{Scheduler-BL7t8aS7.js → Scheduler-wKG3_D1f.js} +137 -136
  42. package/dist/{ServingSequence-CDFXMCiN.js → ServingSequence-B26BETQs.js} +63 -61
  43. package/dist/Setting-DBdNl3WL.js +185 -0
  44. package/dist/{Subcategory-CnlrVwCy.js → Subcategory-B06yMcuE.js} +147 -144
  45. package/dist/{Takeaway-D8FzvC2w.js → Takeaway-CFATfy-6.js} +2 -2
  46. package/dist/{Takeaway-BWVzwWnh.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-B8nXazx6.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DoS4Btzj.js} +281 -308
  50. package/dist/{Unit-Do7Tt8U8.js → Unit-B5wKBmIT.js} +90 -89
  51. package/dist/{Variant-D1kLupxx.js → Variant-C5ePu0za.js} +167 -174
  52. package/dist/{_id_-DomaBHrh.js → _id_-HRDqt6oD.js} +3 -3
  53. package/dist/{app-C_XNYz8_.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-Did75Kp9.js → menu-compute-CQdeCEBO.js} +19 -19
  66. package/dist/assets/{validate-menu-DVMOLygB.js → validate-menu-BVo4fNWG.js} +14 -14
  67. package/dist/mf-menu-portal.css +1 -1
  68. package/dist/{provide-Bwf3KcOV.js → provide-BGLSDsuJ.js} +99817 -99565
  69. package/dist/{useActionFeedback-CXx7dOVc.js → useActionFeedback-CElXij1W.js} +1 -1
  70. package/package.json +1 -1
  71. package/dist/Catalog-BrHGEI3p.js +0 -374
  72. package/dist/CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-P59vHZEn.js +0 -117
  73. package/dist/GroupList.vue_vue_type_script_setup_true_lang-oGNs8e8f.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-Dkjnls7p.js +0 -1337
  77. package/dist/Setting-gYZoZxQG.js +0 -179
  78. package/dist/TakeawayList.vue_vue_type_script_setup_true_lang-igS-FXq5.js +0 -554
@@ -1,27 +1,28 @@
1
- import { defineComponent as W, computed as F, ref as j, resolveComponent as D, openBlock as p, createElementBlock as R, createVNode as d, withKeys as ie, withModifiers as H, unref as e, normalizeClass as X, withCtx as $, createElementVNode as V, toDisplayString as K, createCommentVNode as U, h as ve, shallowRef as Q, watch as ee, onBeforeUnmount as le, createBlock as B, Fragment as Z, onUnmounted as fe, mergeProps as ge, renderList as oe, onMounted as me, nextTick as ye, renderSlot as be } from "vue";
1
+ import { defineComponent as q, computed as F, ref as j, resolveComponent as L, openBlock as v, createElementBlock as R, createVNode as d, withKeys as ie, withModifiers as K, unref as e, normalizeClass as X, withCtx as I, createElementVNode as V, toDisplayString as H, createCommentVNode as U, h as ve, shallowRef as Q, watch as ee, onBeforeUnmount as le, createBlock as B, Fragment as Z, onUnmounted as fe, mergeProps as ge, renderList as oe, onMounted as me, nextTick as ye, renderSlot as be } from "vue";
2
2
  import { useI18n as Y } from "@feedmepos/mf-common";
3
- import { components as _e, useSnackbar as ke, useDialog as we } from "@feedmepos/ui-library";
4
- import { _ as he } from "./ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CjQRRqBx.js";
5
- import { u as xe } from "./useActionFeedback-CXx7dOVc.js";
6
- import { e as te, u as J, b as pe, N as ue, f as Ce, a as Fe } from "./provide-Bwf3KcOV.js";
7
- import { _ as $e, b as Ie } from "./ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-3yzUcogQ.js";
3
+ import { components as _e, useSnackbar as ke, useDialog as he } from "@feedmepos/ui-library";
4
+ import { _ as we } from "./ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-B3bShTjM.js";
5
+ import { u as Ce } from "./useActionFeedback-CElXij1W.js";
6
+ import { e as te, u as J, b as pe, N as ue, f as Fe, a as $e } from "./provide-BGLSDsuJ.js";
7
+ import { P as Ie, _ as xe } from "./ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-BzctosMW.js";
8
8
  import { _ as de } from "./vuedraggable-CBtQLb_S.js";
9
9
  import { _ as ce } from "./ProductFilterMenu.vue_vue_type_script_setup_true_lang-Cgc0Ms_n.js";
10
10
  import { _ as Se } from "./TranslationLanguageSelector.vue_vue_type_script_setup_true_lang-BJZ6VcrT.js";
11
11
  import { _ as ze } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js";
12
12
  import { u as Te } from "./useEditorValidation-Ctef5Bxt.js";
13
- import { O as Ee } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-C0rc1FRO.js";
14
- import { _ as Re } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-P59vHZEn.js";
15
- const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, De = { class: "fm-typo-en-title-sm-600" }, Me = { class: "max-h-[60vh] min-h-0 flex-1 overflow-y-auto" }, Ve = /* @__PURE__ */ W({
13
+ import { _ as ne } from "./TextChip.vue_vue_type_script_setup_true_lang-YkUjMTXo.js";
14
+ import { O as Ee } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-Cb6nO43H.js";
15
+ import { _ as Re } from "./CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-CMyubLvP.js";
16
+ const Be = { key: 0 }, De = { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, Le = { class: "fm-typo-en-title-sm-600" }, Me = { class: "max-h-[60vh] min-h-0 flex-1 overflow-y-auto" }, Ve = /* @__PURE__ */ q({
16
17
  __name: "RestaurantAttributesFilter",
17
18
  props: {
18
19
  filter: {},
19
20
  fullWidth: { type: Boolean, default: !1 }
20
21
  },
21
22
  emits: ["confirm"],
22
- setup(A, { emit: _ }) {
23
- const o = A, l = _, { t } = Y(), c = F(() => o.filter ?? null), m = j(!1), r = j({}), y = j({});
24
- function x() {
23
+ setup(O, { emit: $ }) {
24
+ const o = O, l = $, { t } = Y(), c = F(() => o.filter ?? null), m = j(!1), r = j({}), y = j({});
25
+ function w() {
25
26
  var b;
26
27
  (b = c.value) != null && b.available && (r.value = { ...c.value.selectedCustom }, y.value = { ...c.value.selectedStandard }, m.value = !0);
27
28
  }
@@ -34,12 +35,12 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
34
35
  const S = F(
35
36
  () => {
36
37
  var b;
37
- return (((b = c.value) == null ? void 0 : b.custom) ?? []).map((v) => ({ ...v, kind: "custom" }));
38
+ return (((b = c.value) == null ? void 0 : b.custom) ?? []).map((p) => ({ ...p, kind: "custom" }));
38
39
  }
39
40
  ), E = F(
40
41
  () => {
41
42
  var b;
42
- return (((b = c.value) == null ? void 0 : b.standard) ?? []).map((v) => ({ ...v, kind: "standard" }));
43
+ return (((b = c.value) == null ? void 0 : b.standard) ?? []).map((p) => ({ ...p, kind: "standard" }));
43
44
  }
44
45
  ), f = [
45
46
  {
@@ -52,48 +53,48 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
52
53
  accessorKey: "values",
53
54
  enableSorting: !1,
54
55
  cell: (b) => {
55
- const v = b.row.original, M = v.kind === "custom" ? r : y, a = t("menu.common.labels.a11y_labelled_name", {
56
+ const p = b.row.original, M = p.kind === "custom" ? r : y, a = t("menu.common.labels.a11y_labelled_name", {
56
57
  label: t(
57
- v.kind === "custom" ? "menu.link_product.rules.restaurant_custom_attributes_filter" : "menu.link_product.rules.restaurant_filter"
58
+ p.kind === "custom" ? "menu.link_product.rules.restaurant_custom_attributes_filter" : "menu.link_product.rules.restaurant_filter"
58
59
  ),
59
- name: v.key
60
- }), g = (k) => {
61
- var O;
62
- k.el instanceof HTMLElement && ((O = k.el.querySelector("input")) == null || O.setAttribute("aria-label", a));
60
+ name: p.key
61
+ }), g = (_) => {
62
+ var A;
63
+ _.el instanceof HTMLElement && ((A = _.el.querySelector("input")) == null || A.setAttribute("aria-label", a));
63
64
  };
64
65
  return ve(_e.FmSelect, {
65
66
  "aria-label": a,
66
- modelValue: M.value[v.key] ?? null,
67
+ modelValue: M.value[p.key] ?? null,
67
68
  onVnodeMounted: g,
68
69
  onVnodeUpdated: g,
69
70
  placeholder: t("portalshell.customAttributes.form.valuePlaceholder"),
70
- items: v.values.map((k) => ({ label: k, value: k })),
71
+ items: p.values.map((_) => ({ label: _, value: _ })),
71
72
  clearable: !0,
72
73
  searchable: !0,
73
- "onUpdate:modelValue": (k) => {
74
- M.value = { ...M.value, [v.key]: k ?? "" };
74
+ "onUpdate:modelValue": (_) => {
75
+ M.value = { ...M.value, [p.key]: _ ?? "" };
75
76
  }
76
77
  });
77
78
  }
78
79
  }
79
80
  ];
80
- return (b, v) => {
81
+ return (b, p) => {
81
82
  var i;
82
- const M = D("FmIcon"), a = D("FmChip"), g = D("FmTable"), k = D("FmSpacer"), O = D("FmButton"), n = D("FmDialog");
83
- return (i = c.value) != null && i.available ? (p(), R("div", Be, [
83
+ const M = L("FmIcon"), a = L("FmChip"), g = L("FmTable"), _ = L("FmSpacer"), A = L("FmButton"), n = L("FmDialog");
84
+ return (i = c.value) != null && i.available ? (v(), R("div", Be, [
84
85
  d(a, {
85
86
  class: X(["cursor-pointer", b.fullWidth ? "w-full justify-between" : ""]),
86
87
  role: "button",
87
88
  tabindex: "0",
88
89
  "aria-label": e(t)("menu.catalog.form.restaurant_attributes_title"),
89
- onClick: x,
90
+ onClick: w,
90
91
  onKeydown: [
91
- ie(H(x, ["prevent"]), ["enter"]),
92
- ie(H(x, ["prevent"]), ["space"])
92
+ ie(K(w, ["prevent"]), ["enter"]),
93
+ ie(K(w, ["prevent"]), ["space"])
93
94
  ]
94
95
  }, {
95
- default: $(() => [
96
- V("span", Le, K(e(t)("menu.catalog.form.restaurant_attributes_title")), 1),
96
+ default: I(() => [
97
+ V("span", De, H(e(t)("menu.catalog.form.restaurant_attributes_title")), 1),
97
98
  d(M, {
98
99
  color: "neutral-gray-400",
99
100
  name: "launch",
@@ -104,35 +105,35 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
104
105
  }, 8, ["class", "aria-label", "onKeydown"]),
105
106
  d(n, {
106
107
  modelValue: m.value,
107
- "onUpdate:modelValue": v[1] || (v[1] = (z) => m.value = z),
108
+ "onUpdate:modelValue": p[1] || (p[1] = (z) => m.value = z),
108
109
  overlay: !0,
109
110
  "min-width": "min(calc(100% - 48px), 560px)"
110
111
  }, {
111
- "dialog-header": $(() => [
112
- V("div", De, K(e(t)("menu.catalog.form.restaurant_attributes_title")), 1)
112
+ "dialog-header": I(() => [
113
+ V("div", Le, H(e(t)("menu.catalog.form.restaurant_attributes_title")), 1)
113
114
  ]),
114
- "dialog-footer": $(() => [
115
- d(k),
116
- d(O, {
115
+ "dialog-footer": I(() => [
116
+ d(_),
117
+ d(A, {
117
118
  label: e(t)("menu.common.actions.confirm"),
118
119
  size: "lg",
119
120
  type: "submit",
120
121
  variant: "primary",
121
122
  onClick: T
122
123
  }, null, 8, ["label"]),
123
- d(O, {
124
+ d(A, {
124
125
  label: e(t)("menu.common.actions.cancel"),
125
126
  size: "lg",
126
127
  variant: "tertiary",
127
- onClick: v[0] || (v[0] = (z) => m.value = !1)
128
+ onClick: p[0] || (p[0] = (z) => m.value = !1)
128
129
  }, null, 8, ["label"])
129
130
  ]),
130
- default: $(() => [
131
+ default: I(() => [
131
132
  V("div", Me, [
132
133
  d(de, {
133
134
  title: e(t)("menu.link_product.rules.restaurant_custom_attributes_filter")
134
135
  }, {
135
- default: $(() => [
136
+ default: I(() => [
136
137
  d(g, {
137
138
  "column-defs": f,
138
139
  "row-data": S.value,
@@ -146,7 +147,7 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
146
147
  d(de, {
147
148
  title: e(t)("menu.link_product.rules.restaurant_filter")
148
149
  }, {
149
- default: $(() => [
150
+ default: I(() => [
150
151
  d(g, {
151
152
  "column-defs": f,
152
153
  "row-data": E.value,
@@ -167,14 +168,14 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
167
168
  }), Ue = { class: "h-full overflow-auto pl-[25px]" }, Ae = {
168
169
  key: 1,
169
170
  class: "fm-typo-en-body-md-400 p-24 text-center text-fm-color-neutral-gray-400"
170
- }, Oe = /* @__PURE__ */ W({
171
+ }, Ne = /* @__PURE__ */ q({
171
172
  __name: "DetailPane",
172
173
  props: {
173
174
  selected: {}
174
175
  },
175
- setup(A, { expose: _ }) {
176
- const o = A, l = te(), { t } = Y(), c = Q(null), m = Q(null), r = Q({ status: "loading" });
177
- let y = null, x = null;
176
+ setup(O, { expose: $ }) {
177
+ const o = O, l = te(), { t } = Y(), c = Q(null), m = Q(null), r = Q({ status: "loading" });
178
+ let y = null, w = null;
178
179
  const T = F(
179
180
  () => r.value.status === "ready" ? r.value.value : null
180
181
  );
@@ -183,57 +184,57 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
183
184
  (a = c.value) == null || a.open("category");
184
185
  }
185
186
  function E() {
186
- var g, k;
187
- const a = (k = (g = o.selected) == null ? void 0 : g.selection) == null ? void 0 : k.itemId;
188
- f(), a && v(a);
187
+ var g, _;
188
+ const a = (_ = (g = o.selected) == null ? void 0 : g.selection) == null ? void 0 : _.itemId;
189
+ f(), a && p(a);
189
190
  }
190
- _({ openCategoryCreate: S, refreshSelected: E });
191
+ $({ openCategoryCreate: S, refreshSelected: E });
191
192
  function f() {
192
193
  var a;
193
194
  y == null || y(), y = null, (a = m.value) == null || a.dispose(), m.value = null, r.value = { status: "loading" };
194
195
  }
195
196
  function b() {
196
- f(), x == null || x.dispose(), x = null;
197
+ f(), w == null || w.dispose(), w = null;
197
198
  }
198
- function v(a) {
199
- x ?? (x = l.item.editorScope());
199
+ function p(a) {
200
+ w ?? (w = l.item.editorScope());
200
201
  const g = l.item.editor(a);
201
- m.value = g, r.value = g.get(), y = g.subscribe((k) => {
202
- r.value = k;
202
+ m.value = g, r.value = g.get(), y = g.subscribe((_) => {
203
+ r.value = _;
203
204
  });
204
205
  }
205
206
  function M(a) {
206
- var k;
207
- const g = ((k = T.value) == null ? void 0 : k.itemId) ?? null;
208
- f(), x == null || x.select(a), g && v(g);
207
+ var _;
208
+ const g = ((_ = T.value) == null ? void 0 : _.itemId) ?? null;
209
+ f(), w == null || w.select(a), g && p(g);
209
210
  }
210
211
  return ee(
211
212
  () => o.selected,
212
213
  (a) => {
213
- var k;
214
+ var _;
214
215
  if (a && !a.selectable) return;
215
216
  const g = a == null ? void 0 : a.selection;
216
- (g == null ? void 0 : g.itemId) !== ((k = T.value) == null ? void 0 : k.itemId) && (f(), g && v(g.itemId));
217
+ (g == null ? void 0 : g.itemId) !== ((_ = T.value) == null ? void 0 : _.itemId) && (f(), g && p(g.itemId));
217
218
  },
218
219
  { immediate: !0 }
219
220
  ), le(b), (a, g) => {
220
- var k, O, n;
221
- return p(), R("div", Ue, [
222
- T.value && m.value ? (p(), B($e, {
221
+ var _, A, n;
222
+ return v(), R("div", Ue, [
223
+ T.value && m.value ? (v(), B(Ie, {
223
224
  key: 0,
224
225
  sdk: e(l),
225
226
  session: m.value,
226
227
  view: T.value,
227
- "tree-selection": (k = a.selected) == null ? void 0 : k.selection,
228
- "item-breadcrumb": (O = a.selected) == null ? void 0 : O.itemBreadcrumb,
228
+ "tree-selection": (_ = a.selected) == null ? void 0 : _.selection,
229
+ "item-breadcrumb": (A = a.selected) == null ? void 0 : A.itemBreadcrumb,
229
230
  presentation: "tree",
230
231
  onCreateEntity: g[0] || (g[0] = (i) => {
231
232
  var z;
232
233
  return (z = c.value) == null ? void 0 : z.open(i);
233
234
  }),
234
235
  onSelectScope: g[1] || (g[1] = (i) => M(i))
235
- }, null, 8, ["sdk", "session", "view", "tree-selection", "item-breadcrumb"])) : (p(), R("p", Ae, K(e(t)("menu.tree_editor.labels.please_select_a_product_to_edit")), 1)),
236
- d(Ie, {
236
+ }, null, 8, ["sdk", "session", "view", "tree-selection", "item-breadcrumb"])) : (v(), R("p", Ae, H(e(t)("menu.tree_editor.labels.please_select_a_product_to_edit")), 1)),
237
+ d(xe, {
237
238
  ref_key: "inlineCreate",
238
239
  ref: c,
239
240
  "item-id": ((n = T.value) == null ? void 0 : n.itemId) ?? null,
@@ -243,7 +244,7 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
243
244
  ]);
244
245
  };
245
246
  }
246
- }), Ne = /* @__PURE__ */ W({
247
+ }), Oe = /* @__PURE__ */ q({
247
248
  __name: "EditorHistoryControls",
248
249
  props: {
249
250
  canUndo: { type: Boolean },
@@ -251,11 +252,11 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
251
252
  committing: { type: Boolean }
252
253
  },
253
254
  emits: ["undo", "redo"],
254
- setup(A, { emit: _ }) {
255
- const o = _, { t: l } = Y();
255
+ setup(O, { emit: $ }) {
256
+ const o = $, { t: l } = Y();
256
257
  return (t, c) => {
257
- const m = D("FmButton");
258
- return p(), R(Z, null, [
258
+ const m = L("FmButton");
259
+ return v(), R(Z, null, [
259
260
  d(m, {
260
261
  "aria-label": e(l)("menu.tree_editor.actions.undo"),
261
262
  disabled: !t.canUndo || t.committing,
@@ -273,10 +274,10 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
273
274
  ], 64);
274
275
  };
275
276
  }
276
- }), Pe = { class: "space-y-8" }, je = /* @__PURE__ */ W({
277
+ }), Pe = { class: "space-y-8" }, je = /* @__PURE__ */ q({
277
278
  __name: "ScopeSwitcher",
278
- setup(A) {
279
- const _ = te(), { t: o } = Y(), l = J(_.context.current), t = J(_.catalog.list), c = J(_.scheduler.list), m = J(_.tree.view), r = F(
279
+ setup(O) {
280
+ const $ = te(), { t: o } = Y(), l = J($.context.current), t = J($.catalog.list), c = J($.scheduler.list), m = J($.tree.view), r = F(
280
281
  () => l.value.status === "ready" ? l.value.value : { catalogId: null, schedulerId: null }
281
282
  ), y = F(() => [
282
283
  { label: o("menu.tree_editor.labels.main_catalog"), value: null },
@@ -284,7 +285,7 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
284
285
  label: f.name,
285
286
  value: f.id
286
287
  })) : []
287
- ]), x = F(() => [
288
+ ]), w = F(() => [
288
289
  { label: o("menu.tree_editor.labels.all_time"), value: null },
289
290
  ...c.value.status === "ready" ? c.value.value.rows.map((f) => ({
290
291
  label: f.name,
@@ -299,7 +300,7 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
299
300
  name: (f == null ? void 0 : f.label) ?? o("menu.tree_editor.labels.main_catalog")
300
301
  });
301
302
  }), S = F(() => {
302
- const f = x.value.find(
303
+ const f = w.value.find(
303
304
  (b) => b.value === r.value.schedulerId
304
305
  );
305
306
  return o("menu.common.labels.a11y_labelled_name", {
@@ -309,46 +310,46 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
309
310
  }), E = F(
310
311
  () => m.value.status === "ready" && m.value.value.schedulerScopeAvailable
311
312
  );
312
- return (f, b) => (p(), R("div", Pe, [
313
+ return (f, b) => (v(), R("div", Pe, [
313
314
  d(ce, {
314
315
  "model-value": r.value.catalogId,
315
316
  options: y.value,
316
317
  title: T.value,
317
318
  "full-width": "",
318
- "onUpdate:modelValue": b[0] || (b[0] = (v) => e(_).context.select({ catalogId: v }))
319
+ "onUpdate:modelValue": b[0] || (b[0] = (p) => e($).context.select({ catalogId: p }))
319
320
  }, null, 8, ["model-value", "options", "title"]),
320
- E.value ? (p(), B(ce, {
321
+ E.value ? (v(), B(ce, {
321
322
  key: 0,
322
323
  "model-value": r.value.schedulerId,
323
- options: x.value,
324
+ options: w.value,
324
325
  title: S.value,
325
326
  "full-width": "",
326
- "onUpdate:modelValue": b[1] || (b[1] = (v) => e(_).context.select({ schedulerId: v }))
327
+ "onUpdate:modelValue": b[1] || (b[1] = (p) => e($).context.select({ schedulerId: p }))
327
328
  }, null, 8, ["model-value", "options", "title"])) : U("", !0)
328
329
  ]));
329
330
  }
330
- }), Ke = { class: "space-y-8" }, He = /* @__PURE__ */ W({
331
+ }), Ke = { class: "space-y-8" }, He = /* @__PURE__ */ q({
331
332
  __name: "TreeFilter",
332
- setup(A) {
333
- const _ = te(), { t: o } = Y(), l = J(_.tree.view), t = F(
333
+ setup(O) {
334
+ const $ = te(), { t: o } = Y(), l = J($.tree.view), t = F(
334
335
  () => l.value.status === "ready" ? l.value.value.restaurantFilter : null
335
336
  ), c = j("");
336
337
  let m;
337
338
  return ee(c, (r) => {
338
- m && clearTimeout(m), m = setTimeout(() => _.tree.setQuery(r), 300);
339
+ m && clearTimeout(m), m = setTimeout(() => $.tree.setQuery(r), 300);
339
340
  }), fe(() => {
340
341
  m && clearTimeout(m);
341
342
  }), (r, y) => {
342
- const x = D("FmSearch");
343
- return p(), R("div", Ke, [
343
+ const w = L("FmSearch");
344
+ return v(), R("div", Ke, [
344
345
  d(je),
345
346
  d(Ve, {
346
347
  filter: t.value,
347
348
  "full-width": "",
348
- onConfirm: y[0] || (y[0] = (T) => e(_).tree.setRestaurantFilter(T))
349
+ onConfirm: y[0] || (y[0] = (T) => e($).tree.setRestaurantFilter(T))
349
350
  }, null, 8, ["filter"]),
350
351
  y[2] || (y[2] = V("div", { class: "h-[1px] bg-fm-color-neutral-gray-100" }, null, -1)),
351
- d(x, {
352
+ d(w, {
352
353
  modelValue: c.value,
353
354
  "onUpdate:modelValue": y[1] || (y[1] = (T) => c.value = T),
354
355
  placeholder: e(o)("menu.tree_editor.labels.search")
@@ -356,94 +357,94 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
356
357
  ]);
357
358
  };
358
359
  }
359
- }), We = { class: "fm-typo-en-title-sm-600" }, qe = /* @__PURE__ */ W({
360
+ }), We = { class: "fm-typo-en-title-sm-600" }, qe = /* @__PURE__ */ q({
360
361
  __name: "CategoryRenameDialog",
361
362
  props: {
362
363
  categoryId: {}
363
364
  },
364
365
  emits: ["close"],
365
- setup(A, { emit: _ }) {
366
- const o = A, l = _, t = te(), { t: c } = Y(), m = pe(), r = Q(null), y = Q({
366
+ setup(O, { emit: $ }) {
367
+ const o = O, l = $, t = te(), { t: c } = Y(), m = pe(), r = Q(null), y = Q({
367
368
  status: "loading"
368
- }), x = F(
369
+ }), w = F(
369
370
  () => y.value.status === "ready" ? y.value.value : null
370
371
  ), T = Te(() => r.value), S = F(
371
- () => x.value ? T.issue(x.value.fieldIssues, "name") ?? x.value.nameIssue : null
372
+ () => w.value ? T.issue(w.value.fieldIssues, "name") ?? w.value.nameIssue : null
372
373
  );
373
374
  let E = null;
374
375
  const f = Q(null), b = Q(
375
376
  null
376
- ), v = F(
377
+ ), p = F(
377
378
  () => {
378
- var w;
379
- return ((w = b.value) == null ? void 0 : w.status) === "ready" ? b.value.value : null;
379
+ var k;
380
+ return ((k = b.value) == null ? void 0 : k.status) === "ready" ? b.value.value : null;
380
381
  }
381
382
  ), M = Q(!1);
382
383
  let a = null;
383
- function g(w) {
384
+ function g(k) {
384
385
  var C;
385
- a == null || a(), a = null, w && ((C = f.value) == null || C.dispose()), f.value = null, b.value = null, M.value = !1;
386
+ a == null || a(), a = null, k && ((C = f.value) == null || C.dispose()), f.value = null, b.value = null, M.value = !1;
386
387
  }
387
- function k(w) {
388
+ function _(k) {
388
389
  var C, h;
389
- g(!0), E == null || E(), E = null, w ? (C = r.value) == null || C.discard() : (h = r.value) == null || h.dispose(), r.value = null, y.value = { status: "loading" };
390
+ g(!0), E == null || E(), E = null, k ? (C = r.value) == null || C.discard() : (h = r.value) == null || h.dispose(), r.value = null, y.value = { status: "loading" };
390
391
  }
391
392
  ee(
392
393
  () => o.categoryId,
393
- (w) => {
394
- if (r.value && k(!0), !w) return;
395
- const C = t.category.editor(w);
394
+ (k) => {
395
+ if (r.value && _(!0), !k) return;
396
+ const C = t.category.editor(k);
396
397
  r.value = C, y.value = C.get(), E = C.subscribe((h) => {
397
398
  y.value = h;
398
399
  });
399
400
  },
400
401
  { immediate: !0 }
401
- ), le(() => k(!0));
402
- async function O() {
403
- const w = r.value;
404
- !w || (await T.submit(() => w.submit())).kind !== "success" || (k(!1), l("close"));
402
+ ), le(() => _(!0));
403
+ async function A() {
404
+ const k = r.value;
405
+ !k || (await T.submit(() => k.submit())).kind !== "success" || (_(!1), l("close"));
405
406
  }
406
407
  function n() {
407
- k(!0), l("close");
408
+ _(!0), l("close");
408
409
  }
409
410
  function i() {
410
411
  var h;
411
- const w = r.value;
412
- if (!w || ((h = x.value) == null ? void 0 : h.translation.state) !== "allowed") return;
412
+ const k = r.value;
413
+ if (!k || ((h = w.value) == null ? void 0 : h.translation.state) !== "allowed") return;
413
414
  g(!0);
414
- const C = w.translationEditor();
415
- f.value = C, b.value = C.get(), a = C.subscribe((I) => {
416
- b.value = I;
415
+ const C = k.translationEditor();
416
+ f.value = C, b.value = C.get(), a = C.subscribe((x) => {
417
+ b.value = x;
417
418
  }), M.value = !0;
418
419
  }
419
- function z(w) {
420
- var I;
421
- const C = f.value, h = (I = v.value) == null ? void 0 : I.nameLocale;
420
+ function z(k) {
421
+ var x;
422
+ const C = f.value, h = (x = p.value) == null ? void 0 : x.nameLocale;
422
423
  if (!(!C || !h)) {
423
- for (const q of Object.keys(h))
424
- q in w || C.removeLocale(q);
425
- for (const [q, u] of Object.entries(w))
426
- q in h || C.addLocale(q), C.setNameLocale(q, u);
424
+ for (const W of Object.keys(h))
425
+ W in k || C.removeLocale(W);
426
+ for (const [W, u] of Object.entries(k))
427
+ W in h || C.addLocale(W), C.setNameLocale(W, u);
427
428
  }
428
429
  }
429
430
  function P() {
430
- const w = f.value;
431
- w && w.apply().kind === "success" && g(!1);
431
+ const k = f.value;
432
+ k && k.apply().kind === "success" && g(!1);
432
433
  }
433
- return (w, C) => {
434
- const h = D("FmButton"), I = D("FmForm"), q = D("FmSpacer"), u = D("FmDialog");
435
- return p(), R(Z, null, [
434
+ return (k, C) => {
435
+ const h = L("FmButton"), x = L("FmForm"), W = L("FmSpacer"), u = L("FmDialog");
436
+ return v(), R(Z, null, [
436
437
  d(u, {
437
- "model-value": w.categoryId !== null,
438
+ "model-value": k.categoryId !== null,
438
439
  overlay: !0,
439
440
  "min-width": "min(calc(100% - 48px), 480px)",
440
441
  "onUpdate:modelValue": C[0] || (C[0] = (s) => !s && n())
441
442
  }, {
442
- "dialog-header": $(() => [
443
- V("div", We, K(e(c)("menu.category.manager.dialog.update.title")), 1)
443
+ "dialog-header": I(() => [
444
+ V("div", We, H(e(c)("menu.category.manager.dialog.update.title")), 1)
444
445
  ]),
445
- "dialog-footer": $(() => [
446
- d(q),
446
+ "dialog-footer": I(() => [
447
+ d(W),
447
448
  d(h, {
448
449
  label: e(c)("menu.common.actions.cancel"),
449
450
  size: "md",
@@ -456,9 +457,9 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
456
457
  variant: "primary"
457
458
  }, null, 8, ["label"])
458
459
  ]),
459
- default: $(() => [
460
- d(I, { onValidationSuccess: O }, {
461
- default: $(() => {
460
+ default: I(() => [
461
+ d(x, { onValidationSuccess: A }, {
462
+ default: I(() => {
462
463
  var s;
463
464
  return [
464
465
  d(Se, ge(
@@ -467,19 +468,19 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
467
468
  "error-messages": S.value ? [e(m)(S.value)] : [],
468
469
  label: e(c)("menu.category.dialog.add.name.label"),
469
470
  placeholder: e(c)("menu.category.dialog.add.name.placeholder"),
470
- "model-value": ((s = x.value) == null ? void 0 : s.name) ?? ""
471
+ "model-value": ((s = w.value) == null ? void 0 : s.name) ?? ""
471
472
  },
472
- e(T).field("name", (L) => {
473
+ e(T).field("name", (D) => {
473
474
  var G;
474
- return (G = r.value) == null ? void 0 : G.setName(L);
475
+ return (G = r.value) == null ? void 0 : G.setName(D);
475
476
  })
476
477
  ), {
477
- append: $(() => {
478
- var L;
478
+ append: I(() => {
479
+ var D;
479
480
  return [
480
481
  d(h, {
481
482
  "aria-label": e(c)("menu.common.translation.translation_label"),
482
- disabled: ((L = x.value) == null ? void 0 : L.translation.state) !== "allowed",
483
+ disabled: ((D = w.value) == null ? void 0 : D.translation.state) !== "allowed",
483
484
  icon: "g_translate",
484
485
  variant: "tertiary",
485
486
  onClick: i
@@ -495,13 +496,13 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
495
496
  ]),
496
497
  _: 1
497
498
  }, 8, ["model-value"]),
498
- v.value ? (p(), B(ze, {
499
+ p.value ? (v(), B(ze, {
499
500
  key: 0,
500
501
  "model-value": M.value,
501
- dirty: v.value.dirty,
502
- name: v.value.name,
503
- "name-locale": v.value.nameLocale,
504
- "supported-locales": v.value.supportedLocales,
502
+ dirty: p.value.dirty,
503
+ name: p.value.name,
504
+ "name-locale": p.value.nameLocale,
505
+ "supported-locales": p.value.supportedLocales,
505
506
  title: e(c)("menu.common.translation.sheet_title", {
506
507
  entity: e(c)("menu.category.entity")
507
508
  }),
@@ -513,48 +514,21 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
513
514
  onSave: P,
514
515
  "onUpdate:modelValue": C[2] || (C[2] = (s) => !s && g(!0)),
515
516
  "onUpdate:name": C[3] || (C[3] = (s) => {
516
- var L;
517
- return (L = f.value) == null ? void 0 : L.setName(s);
517
+ var D;
518
+ return (D = f.value) == null ? void 0 : D.setName(s);
518
519
  }),
519
520
  "onUpdate:nameLocale": z
520
521
  }, null, 8, ["model-value", "dirty", "name", "name-locale", "supported-locales", "title", "name-section-label"])) : U("", !0)
521
522
  ], 64);
522
523
  };
523
524
  }
524
- }), ne = /* @__PURE__ */ W({
525
- __name: "TextChip",
526
- props: {
527
- label: {},
528
- variant: {},
529
- border: { type: Boolean },
530
- bold: { type: Boolean, default: !0 },
531
- size: { default: "md" }
532
- },
533
- setup(A) {
534
- const _ = A, o = {
535
- neutral: "text-fm-color-typo-neutral bg-fm-color-neutral-gray-100",
536
- primary: "text-fm-color-typo-primary bg-fm-color-system-primary-100",
537
- secondary: "text-fm-color-typo-secondary bg-fm-color-system-secondary-100",
538
- success: "text-fm-color-typo-success bg-fm-color-system-success-100",
539
- warning: "text-fm-color-primary bg-fm-color-system-warning-100",
540
- error: "text-fm-color-typo-error bg-fm-color-system-error-100",
541
- info: "text-fm-color-typo-info bg-fm-color-system-info-100"
542
- }, l = F(() => _.size === "xs" ? "text-[8px] tracking-wide leading-[10px] no-underline" : _.size === "sm" ? _.bold ? "fm-typo-en-body-sm-600" : "fm-typo-en-body-sm-400" : _.bold ? "fm-typo-en-body-md-600" : "fm-typo-en-body-md-400");
543
- return (t, c) => (p(), R("span", {
544
- class: X(["inline-block fm-corner-radius-md px-4 py-[2px] text-nowrap max-w-full", [
545
- l.value,
546
- o[t.variant],
547
- t.border ? "border border-fm-color-neutral-gray-400" : ""
548
- ]])
549
- }, K(t.label), 3));
550
- }
551
525
  }), Qe = ["aria-selected", "aria-expanded", "aria-label"], Ye = ["draggable", "data-node-id", "data-testid"], Ge = { class: "flex min-w-0 flex-1 items-center gap-4" }, Je = { class: "flex min-w-0 items-center gap-4" }, Xe = {
552
526
  key: 2,
553
527
  class: "w-24 shrink-0"
554
528
  }, Ze = { class: "flex shrink-0 items-center gap-4" }, et = { class: "tree-right-area relative flex shrink-0 items-center gap-4" }, tt = { class: "absolute right-full flex items-center opacity-0 group-hover:static group-hover:opacity-100 focus-within:static focus-within:opacity-100" }, at = {
555
529
  key: 0,
556
530
  role: "group"
557
- }, nt = /* @__PURE__ */ W({
531
+ }, nt = /* @__PURE__ */ q({
558
532
  __name: "TreeRow",
559
533
  props: {
560
534
  node: {},
@@ -565,8 +539,8 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
565
539
  currencySymbol: {}
566
540
  },
567
541
  emits: ["toggle", "select", "remove", "add-item", "rename", "catalog-link", "drag-start", "drag-end", "drop"],
568
- setup(A, { emit: _ }) {
569
- const o = A, l = _, { t, n: c } = Y(), m = F(() => o.expanded.has(o.node.id)), r = F(() => o.node.remove.state === "allowed"), y = F(() => o.node.kind === "item"), x = F(() => o.node.addItem.state === "allowed"), T = F(() => {
542
+ setup(O, { emit: $ }) {
543
+ const o = O, l = $, { t, n: c } = Y(), m = F(() => o.expanded.has(o.node.id)), r = F(() => o.node.remove.state === "allowed"), y = F(() => o.node.kind === "item"), w = F(() => o.node.addItem.state === "allowed"), T = F(() => {
570
544
  var n;
571
545
  return ((n = o.node.rename) == null ? void 0 : n.state) === "allowed";
572
546
  }), S = F(
@@ -583,31 +557,31 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
583
557
  function b(n) {
584
558
  l("catalog-link", { node: o.node, linked: n }), y.value && o.node.selectable && l("select", o.node);
585
559
  }
586
- const v = F(
560
+ const p = F(
587
561
  () => o.node.labelMessage ? t(o.node.labelMessage.code) : o.node.label
588
562
  ), M = F(() => {
589
563
  const n = o.node.highlight.filter(Boolean);
590
- if (!n.length) return [{ text: v.value, highlighted: !1 }];
564
+ if (!n.length) return [{ text: p.value, highlighted: !1 }];
591
565
  const i = n.map((z) => z.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
592
- return v.value.split(new RegExp(`(${i})`, "gi")).map((z, P) => ({
566
+ return p.value.split(new RegExp(`(${i})`, "gi")).map((z, P) => ({
593
567
  text: z,
594
568
  highlighted: P % 2 === 1
595
569
  }));
596
- }), a = F(() => v.value.trim()), g = F(
570
+ }), a = F(() => p.value.trim()), g = F(
597
571
  () => ["pl-12", "pl-32", "pl-[52px]", "pl-72", "pl-[92px]", "pl-112"][Math.min(o.depth, 5)]
598
- ), k = F(() => o.node.kind === "category" || o.node.kind === "subCategory" ? "view_list" : o.node.kind === "group" ? "database" : o.node.kind === "variant" ? "lunch_dining" : "fastfood");
599
- function O(n) {
572
+ ), _ = F(() => o.node.kind === "category" || o.node.kind === "subCategory" ? "view_list" : o.node.kind === "group" ? "database" : o.node.kind === "variant" ? "lunch_dining" : "fastfood");
573
+ function A(n) {
600
574
  const i = n.currentTarget.getBoundingClientRect(), z = (n.clientY - i.top) / i.height;
601
575
  return z < 0.25 ? "before" : z > 0.75 ? "after" : f.value || o.node.kind !== "item" ? "inside" : "after";
602
576
  }
603
577
  return (n, i) => {
604
- const z = D("FmIcon"), P = D("FmButton"), w = D("FmTooltip"), C = D("TreeRow", !0);
605
- return p(), R("li", {
578
+ const z = L("FmIcon"), P = L("FmButton"), k = L("FmTooltip"), C = L("TreeRow", !0);
579
+ return v(), R("li", {
606
580
  role: "treeitem",
607
581
  "aria-selected": n.node.selectable ? n.selectedId === n.node.id : void 0,
608
582
  "aria-expanded": f.value ? m.value : void 0,
609
583
  "aria-label": a.value,
610
- onClick: i[19] || (i[19] = H((h) => n.node.selectable && l("select", n.node), ["stop"]))
584
+ onClick: i[19] || (i[19] = K((h) => n.node.selectable && l("select", n.node), ["stop"]))
611
585
  }, [
612
586
  V("div", {
613
587
  class: X(["tree-row group relative flex max-w-full select-none items-center gap-4 rounded min-h-[32px] py-4 pr-8 hover:bg-fm-color-opacity-sm", [
@@ -620,20 +594,20 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
620
594
  "data-testid": `tree-row-${n.node.id}`,
621
595
  onDragstart: i[6] || (i[6] = (h) => l("drag-start", n.node)),
622
596
  onDragend: i[7] || (i[7] = (h) => l("drag-end")),
623
- onDragover: i[8] || (i[8] = H(() => {
597
+ onDragover: i[8] || (i[8] = K(() => {
624
598
  }, ["prevent"])),
625
- onDrop: i[9] || (i[9] = H((h) => l("drop", { node: n.node, position: O(h) }), ["prevent"]))
599
+ onDrop: i[9] || (i[9] = K((h) => l("drop", { node: n.node, position: A(h) }), ["prevent"]))
626
600
  }, [
627
601
  V("div", Ge, [
628
602
  V("div", Je, [
629
- n.node.draggable ? (p(), B(z, {
603
+ n.node.draggable ? (v(), B(z, {
630
604
  key: 0,
631
605
  class: "invisible absolute left-0 shrink-0 text-fm-color-neutral-gray-400 group-hover:visible",
632
606
  name: "drag_indicator",
633
607
  outline: "",
634
608
  size: "sm"
635
609
  })) : U("", !0),
636
- f.value ? (p(), B(P, {
610
+ f.value ? (v(), B(P, {
637
611
  key: 1,
638
612
  class: "shrink-0 !h-24 !w-24 !p-4",
639
613
  label: a.value,
@@ -643,9 +617,9 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
643
617
  }),
644
618
  size: "md",
645
619
  variant: "tertiary",
646
- onClick: i[0] || (i[0] = H((h) => l("toggle", n.node.id), ["stop"]))
620
+ onClick: i[0] || (i[0] = K((h) => l("toggle", n.node.id), ["stop"]))
647
621
  }, {
648
- default: $(() => [
622
+ default: I(() => [
649
623
  d(z, {
650
624
  name: m.value ? "expand_more" : "chevron_right",
651
625
  color: "neutral-gray-400",
@@ -654,9 +628,9 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
654
628
  }, null, 8, ["name"])
655
629
  ]),
656
630
  _: 1
657
- }, 8, ["label", "aria-label"])) : (p(), R("span", Xe)),
631
+ }, 8, ["label", "aria-label"])) : (v(), R("span", Xe)),
658
632
  d(z, {
659
- name: k.value,
633
+ name: _.value,
660
634
  class: "shrink-0 text-fm-color-neutral-gray-400",
661
635
  outline: "",
662
636
  size: "sm"
@@ -667,30 +641,30 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
667
641
  n.selectedId === n.node.id ? "text-fm-color-primary" : void 0
668
642
  ])
669
643
  }, [
670
- (p(!0), R(Z, null, oe(M.value, (h, I) => (p(), R("span", {
671
- key: I,
644
+ (v(!0), R(Z, null, oe(M.value, (h, x) => (v(), R("span", {
645
+ key: x,
672
646
  class: X(
673
647
  h.highlighted ? "bg-fm-color-system-warning-100" : void 0
674
648
  )
675
- }, K(h.text), 3))), 128))
649
+ }, H(h.text), 3))), 128))
676
650
  ], 2)
677
651
  ]),
678
652
  V("div", Ze, [
679
- n.node.kind === "category" && n.node.itemCount > 0 ? (p(), B(ne, {
653
+ n.node.kind === "category" && n.node.itemCount > 0 ? (v(), B(ne, {
680
654
  key: 0,
681
655
  label: e(t)("menu.tree_editor.labels.products", { count: n.node.itemCount }),
682
656
  class: "shrink-0",
683
657
  size: "xs",
684
658
  variant: "neutral"
685
659
  }, null, 8, ["label"])) : U("", !0),
686
- y.value && n.node.groupCount > 0 ? (p(), B(ne, {
660
+ y.value && n.node.groupCount > 0 ? (v(), B(ne, {
687
661
  key: 1,
688
662
  label: e(t)("menu.tree_editor.labels.groups", { count: n.node.groupCount }),
689
663
  class: "shrink-0",
690
664
  size: "xs",
691
665
  variant: "neutral"
692
666
  }, null, 8, ["label"])) : U("", !0),
693
- y.value && n.node.variantCount > 0 ? (p(), B(ne, {
667
+ y.value && n.node.variantCount > 0 ? (v(), B(ne, {
694
668
  key: 2,
695
669
  label: e(t)("menu.tree_editor.labels.variants", {
696
670
  count: n.node.variantCount
@@ -699,7 +673,7 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
699
673
  size: "xs",
700
674
  variant: "neutral"
701
675
  }, null, 8, ["label"])) : U("", !0),
702
- n.node.orderFrom ? (p(), B(ne, {
676
+ n.node.orderFrom ? (v(), B(ne, {
703
677
  key: 3,
704
678
  label: e(t)(e(Ee)[n.node.orderFrom]),
705
679
  border: "",
@@ -711,14 +685,14 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
711
685
  ]),
712
686
  V("div", et, [
713
687
  V("div", tt, [
714
- x.value ? (p(), B(w, {
688
+ w.value ? (v(), B(k, {
715
689
  key: 0,
716
690
  class: "shrink-0",
717
691
  content: e(t)("menu.tree_editor.actions.add_product"),
718
692
  placement: "top",
719
693
  "z-index": 999
720
694
  }, {
721
- default: $(() => [
695
+ default: I(() => [
722
696
  d(P, {
723
697
  "aria-label": e(t)("menu.common.labels.a11y_labelled_name", {
724
698
  label: e(t)("menu.tree_editor.actions.add_product"),
@@ -728,9 +702,9 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
728
702
  label: a.value,
729
703
  size: "md",
730
704
  variant: "tertiary",
731
- onClick: i[1] || (i[1] = H((h) => l("add-item", n.node), ["stop"]))
705
+ onClick: i[1] || (i[1] = K((h) => l("add-item", n.node), ["stop"]))
732
706
  }, {
733
- default: $(() => [
707
+ default: I(() => [
734
708
  d(z, {
735
709
  name: "add",
736
710
  color: "neutral-gray-400",
@@ -743,14 +717,14 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
743
717
  ]),
744
718
  _: 1
745
719
  }, 8, ["content"])) : U("", !0),
746
- T.value ? (p(), B(w, {
720
+ T.value ? (v(), B(k, {
747
721
  key: 1,
748
722
  class: "shrink-0",
749
723
  content: e(t)("menu.tree_editor.actions.edit_category"),
750
724
  placement: "top",
751
725
  "z-index": 999
752
726
  }, {
753
- default: $(() => [
727
+ default: I(() => [
754
728
  d(P, {
755
729
  "aria-label": e(t)("menu.common.labels.a11y_labelled_name", {
756
730
  label: e(t)("menu.tree_editor.actions.edit_category"),
@@ -760,9 +734,9 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
760
734
  label: a.value,
761
735
  size: "md",
762
736
  variant: "tertiary",
763
- onClick: i[2] || (i[2] = H((h) => l("rename", n.node), ["stop"]))
737
+ onClick: i[2] || (i[2] = K((h) => l("rename", n.node), ["stop"]))
764
738
  }, {
765
- default: $(() => [
739
+ default: I(() => [
766
740
  d(z, {
767
741
  name: "edit",
768
742
  color: "neutral-gray-400",
@@ -775,14 +749,14 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
775
749
  ]),
776
750
  _: 1
777
751
  }, 8, ["content"])) : U("", !0),
778
- r.value ? (p(), B(w, {
752
+ r.value ? (v(), B(k, {
779
753
  key: 2,
780
754
  class: "shrink-0",
781
755
  content: y.value ? e(t)("menu.tree_editor.actions.delete_product") : e(t)("menu.tree_editor.actions.delete_category"),
782
756
  placement: "top",
783
757
  "z-index": 999
784
758
  }, {
785
- default: $(() => [
759
+ default: I(() => [
786
760
  d(P, {
787
761
  "aria-label": e(t)("menu.common.labels.a11y_labelled_name", {
788
762
  label: y.value ? e(t)("menu.tree_editor.actions.delete_product") : e(t)("menu.tree_editor.actions.delete_category"),
@@ -792,9 +766,9 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
792
766
  label: a.value,
793
767
  size: "md",
794
768
  variant: "tertiary",
795
- onClick: i[3] || (i[3] = H((h) => l("remove", n.node), ["stop"]))
769
+ onClick: i[3] || (i[3] = K((h) => l("remove", n.node), ["stop"]))
796
770
  }, {
797
- default: $(() => [
771
+ default: I(() => [
798
772
  d(z, {
799
773
  name: "delete",
800
774
  color: "neutral-gray-400",
@@ -807,14 +781,14 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
807
781
  ]),
808
782
  _: 1
809
783
  }, 8, ["content"])) : U("", !0),
810
- S.value ? (p(), B(w, {
784
+ S.value ? (v(), B(k, {
811
785
  key: 3,
812
786
  class: "shrink-0",
813
787
  content: y.value ? e(t)("menu.tree_editor.actions.link_product_to_catalog") : e(t)("menu.tree_editor.actions.link_category_to_catalog"),
814
788
  placement: "top",
815
789
  "z-index": 999
816
790
  }, {
817
- default: $(() => [
791
+ default: I(() => [
818
792
  d(P, {
819
793
  "aria-label": e(t)("menu.common.labels.a11y_labelled_name", {
820
794
  label: y.value ? e(t)("menu.tree_editor.actions.link_product_to_catalog") : e(t)("menu.tree_editor.actions.link_category_to_catalog"),
@@ -824,9 +798,9 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
824
798
  label: a.value,
825
799
  size: "md",
826
800
  variant: "tertiary",
827
- onClick: i[4] || (i[4] = H((h) => b(!0), ["stop"]))
801
+ onClick: i[4] || (i[4] = K((h) => b(!0), ["stop"]))
828
802
  }, {
829
- default: $(() => [
803
+ default: I(() => [
830
804
  d(z, {
831
805
  name: "add_link",
832
806
  color: "neutral-gray-400",
@@ -839,14 +813,14 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
839
813
  ]),
840
814
  _: 1
841
815
  }, 8, ["content"])) : U("", !0),
842
- E.value ? (p(), B(w, {
816
+ E.value ? (v(), B(k, {
843
817
  key: 4,
844
818
  class: "shrink-0",
845
819
  content: e(t)("menu.tree_editor.actions.unlink_product_from_catalog"),
846
820
  placement: "top",
847
821
  "z-index": 999
848
822
  }, {
849
- default: $(() => [
823
+ default: I(() => [
850
824
  d(P, {
851
825
  "aria-label": e(t)("menu.common.labels.a11y_labelled_name", {
852
826
  label: e(t)(
@@ -858,9 +832,9 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
858
832
  label: a.value,
859
833
  size: "md",
860
834
  variant: "tertiary",
861
- onClick: i[5] || (i[5] = H((h) => b(!1), ["stop"]))
835
+ onClick: i[5] || (i[5] = K((h) => b(!1), ["stop"]))
862
836
  }, {
863
- default: $(() => [
837
+ default: I(() => [
864
838
  d(z, {
865
839
  name: "link_off",
866
840
  color: "neutral-gray-400",
@@ -874,20 +848,20 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
874
848
  _: 1
875
849
  }, 8, ["content"])) : U("", !0)
876
850
  ]),
877
- n.node.price ? (p(), R("span", {
851
+ n.node.price ? (v(), R("span", {
878
852
  key: 0,
879
853
  class: X([
880
854
  "fm-typo-en-body-md-400 shrink-0",
881
855
  n.node.priceTone === "primary" ? "text-fm-color-primary" : "text-fm-color-typo-secondary"
882
856
  ])
883
- }, K(n.currencySymbol) + K(e(c)(n.node.price.amount, {
857
+ }, H(n.currencySymbol) + H(e(c)(n.node.price.amount, {
884
858
  minimumFractionDigits: n.node.price.precision,
885
859
  maximumFractionDigits: n.node.price.precision
886
860
  })), 3)) : U("", !0)
887
861
  ])
888
862
  ], 42, Ye),
889
- m.value && f.value ? (p(), R("ul", at, [
890
- (p(!0), R(Z, null, oe(n.node.children, (h) => (p(), B(C, {
863
+ m.value && f.value ? (v(), R("ul", at, [
864
+ (v(!0), R(Z, null, oe(n.node.children, (h) => (v(), B(C, {
891
865
  key: h.id,
892
866
  depth: n.depth + 1,
893
867
  "dragging-id": n.draggingId,
@@ -895,15 +869,15 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
895
869
  "currency-symbol": n.currencySymbol,
896
870
  node: h,
897
871
  "selected-id": n.selectedId,
898
- onAddItem: i[10] || (i[10] = (I) => l("add-item", I)),
899
- onRename: i[11] || (i[11] = (I) => l("rename", I)),
900
- onCatalogLink: i[12] || (i[12] = (I) => l("catalog-link", I)),
901
- onRemove: i[13] || (i[13] = (I) => l("remove", I)),
902
- onDragEnd: i[14] || (i[14] = (I) => l("drag-end")),
903
- onDragStart: i[15] || (i[15] = (I) => l("drag-start", I)),
904
- onDrop: i[16] || (i[16] = (I) => l("drop", I)),
905
- onSelect: i[17] || (i[17] = (I) => l("select", I)),
906
- onToggle: i[18] || (i[18] = (I) => l("toggle", I))
872
+ onAddItem: i[10] || (i[10] = (x) => l("add-item", x)),
873
+ onRename: i[11] || (i[11] = (x) => l("rename", x)),
874
+ onCatalogLink: i[12] || (i[12] = (x) => l("catalog-link", x)),
875
+ onRemove: i[13] || (i[13] = (x) => l("remove", x)),
876
+ onDragEnd: i[14] || (i[14] = (x) => l("drag-end")),
877
+ onDragStart: i[15] || (i[15] = (x) => l("drag-start", x)),
878
+ onDrop: i[16] || (i[16] = (x) => l("drop", x)),
879
+ onSelect: i[17] || (i[17] = (x) => l("select", x)),
880
+ onToggle: i[18] || (i[18] = (x) => l("toggle", x))
907
881
  }, null, 8, ["depth", "dragging-id", "expanded", "currency-symbol", "node", "selected-id"]))), 128))
908
882
  ])) : U("", !0)
909
883
  ], 8, Qe);
@@ -923,38 +897,38 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
923
897
  }, ct = ["aria-label"], mt = {
924
898
  key: 0,
925
899
  class: "tree-overlay absolute inset-0 flex items-center justify-center bg-white/50"
926
- }, pt = /* @__PURE__ */ W({
900
+ }, pt = /* @__PURE__ */ q({
927
901
  __name: "TreePanel",
928
902
  emits: ["select", "create-category"],
929
- setup(A, { emit: _ }) {
930
- const o = te(), { t: l } = Y(), t = ke(), c = pe(), m = _, r = J(o.tree.view), y = J(o.category.list), x = F(
903
+ setup(O, { emit: $ }) {
904
+ const o = te(), { t: l } = Y(), t = ke(), c = pe(), m = $, r = J(o.tree.view), y = J(o.category.list), w = F(
931
905
  () => r.value.status === "ready" ? r.value.value : null
932
906
  ), T = F(
933
907
  () => y.value.status === "ready" && y.value.value.create.state === "allowed"
934
- ), S = j(/* @__PURE__ */ new Set()), E = j(null), f = j(null), b = j(null), v = j(null), M = j(!1);
908
+ ), S = j(/* @__PURE__ */ new Set()), E = j(null), f = j(null), b = j(null), p = j(null), M = j(!1);
935
909
  let a = null, g = null;
936
- function k() {
937
- const u = v.value;
910
+ function _() {
911
+ const u = p.value;
938
912
  M.value = !!u && u.scrollHeight > u.clientHeight + 1;
939
913
  }
940
- function O() {
914
+ function A() {
941
915
  var s;
942
- const u = ((s = v.value) == null ? void 0 : s.querySelector('ul[role="tree"]')) ?? null;
943
- u !== g && (g && (a == null || a.unobserve(g)), u && (a == null || a.observe(u)), g = u), k();
916
+ const u = ((s = p.value) == null ? void 0 : s.querySelector('ul[role="tree"]')) ?? null;
917
+ u !== g && (g && (a == null || a.unobserve(g)), u && (a == null || a.observe(u)), g = u), _();
944
918
  }
945
919
  me(() => {
946
- a = new ResizeObserver(O), v.value && a.observe(v.value), O();
947
- }), le(() => a == null ? void 0 : a.disconnect()), ee([x, S], async () => {
948
- await ye(), O();
920
+ a = new ResizeObserver(A), p.value && a.observe(p.value), A();
921
+ }), le(() => a == null ? void 0 : a.disconnect()), ee([w, S], async () => {
922
+ await ye(), A();
949
923
  }), ee(
950
924
  () => {
951
925
  var u;
952
- return (u = x.value) == null ? void 0 : u.autoExpandIds;
926
+ return (u = w.value) == null ? void 0 : u.autoExpandIds;
953
927
  },
954
928
  (u) => {
955
929
  if (!(u != null && u.length)) return;
956
930
  const s = new Set(S.value);
957
- for (const L of u) s.add(L);
931
+ for (const D of u) s.add(D);
958
932
  S.value = s;
959
933
  },
960
934
  // The first published view can already carry a query's matches, so this has
@@ -967,7 +941,7 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
967
941
  }
968
942
  function i() {
969
943
  var u;
970
- S.value = new Set(((u = x.value) == null ? void 0 : u.expandableIds) ?? []);
944
+ S.value = new Set(((u = w.value) == null ? void 0 : u.expandableIds) ?? []);
971
945
  }
972
946
  function z() {
973
947
  S.value = /* @__PURE__ */ new Set();
@@ -975,7 +949,7 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
975
949
  function P(u) {
976
950
  u.selectable && (E.value = u.id, m("select", u));
977
951
  }
978
- function w(u) {
952
+ function k(u) {
979
953
  const s = u.kind === "rejected" ? c(u.issues[0]) : u.kind === "failure" ? c(u.error.message) : null;
980
954
  s !== null && t.open({
981
955
  type: "error",
@@ -986,20 +960,20 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
986
960
  async function C(u) {
987
961
  if (!u.entityId) return;
988
962
  const s = u.kind === "item" ? await o.item.remove(u.entityId) : await o.category.remove(u.entityId);
989
- w(s);
963
+ k(s);
990
964
  }
991
965
  async function h(u) {
992
- w(
966
+ k(
993
967
  await o.tree.setCatalogLink(u.node.id, u.linked)
994
968
  );
995
969
  }
996
- async function I(u) {
970
+ async function x(u) {
997
971
  if (!u.entityId) return;
998
972
  const s = o.item.editor(void 0, { loadInventoryCatalogue: !1 });
999
973
  try {
1000
974
  s.setName(ue), s.setCategory(u.entityId);
1001
- const L = await s.submit();
1002
- if (L.kind === "success") {
975
+ const D = await s.submit();
976
+ if (D.kind === "success") {
1003
977
  const G = new Set(S.value);
1004
978
  G.add(u.id), S.value = G, t.open({
1005
979
  type: "success",
@@ -1009,27 +983,27 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
1009
983
  });
1010
984
  return;
1011
985
  }
1012
- w(L);
986
+ k(D);
1013
987
  } finally {
1014
988
  s.dispose();
1015
989
  }
1016
990
  }
1017
- async function q(u) {
991
+ async function W(u) {
1018
992
  const s = f.value;
1019
993
  if (f.value = null, !s || s === u.node.id) return;
1020
- const L = await o.tree.rearrange({
994
+ const D = await o.tree.rearrange({
1021
995
  draggedNodeId: s,
1022
996
  targetNodeId: u.node.id,
1023
997
  position: u.position
1024
998
  });
1025
- L.kind === "rejected" ? t.open({ message: l(L.issues[0].code), type: "warning" }) : w(L);
999
+ D.kind === "rejected" ? t.open({ message: l(D.issues[0].code), type: "warning" }) : k(D);
1026
1000
  }
1027
1001
  return (u, s) => {
1028
- const L = D("FmButton"), G = D("FmIcon"), re = D("FmTooltip"), se = D("FmCircularProgress");
1029
- return p(), R("div", lt, [
1002
+ const D = L("FmButton"), G = L("FmIcon"), re = L("FmTooltip"), se = L("FmCircularProgress");
1003
+ return v(), R("div", lt, [
1030
1004
  d(He),
1031
1005
  V("div", ot, [
1032
- T.value ? (p(), B(L, {
1006
+ T.value ? (v(), B(D, {
1033
1007
  key: 0,
1034
1008
  label: e(l)("menu.tree_editor.actions.add_category"),
1035
1009
  "prepend-icon": "add",
@@ -1038,11 +1012,11 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
1038
1012
  variant: "plain",
1039
1013
  onClick: s[0] || (s[0] = (ae) => m("create-category"))
1040
1014
  }, {
1041
- default: $(() => [
1042
- V("span", rt, K(e(l)("menu.tree_editor.actions.add_category")), 1)
1015
+ default: I(() => [
1016
+ V("span", rt, H(e(l)("menu.tree_editor.actions.add_category")), 1)
1043
1017
  ]),
1044
1018
  _: 1
1045
- }, 8, ["label"])) : (p(), B(Re, {
1019
+ }, 8, ["label"])) : (v(), B(Re, {
1046
1020
  key: 1,
1047
1021
  sdk: e(o),
1048
1022
  presentation: "tree"
@@ -1053,15 +1027,15 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
1053
1027
  placement: "top",
1054
1028
  "z-index": 999
1055
1029
  }, {
1056
- default: $(() => [
1057
- d(L, {
1030
+ default: I(() => [
1031
+ d(D, {
1058
1032
  "aria-label": e(l)("menu.tree_editor.actions.expand_all"),
1059
1033
  label: e(l)("menu.tree_editor.actions.expand_all"),
1060
1034
  class: "shrink-0 !h-24 !w-24 !p-4",
1061
1035
  variant: "tertiary",
1062
1036
  onClick: i
1063
1037
  }, {
1064
- default: $(() => [
1038
+ default: I(() => [
1065
1039
  d(G, {
1066
1040
  name: "expand_all",
1067
1041
  color: "neutral-gray-400",
@@ -1079,15 +1053,15 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
1079
1053
  placement: "top",
1080
1054
  "z-index": 999
1081
1055
  }, {
1082
- default: $(() => [
1083
- d(L, {
1056
+ default: I(() => [
1057
+ d(D, {
1084
1058
  "aria-label": e(l)("menu.tree_editor.actions.collapse_all"),
1085
1059
  label: e(l)("menu.tree_editor.actions.collapse_all"),
1086
1060
  class: "shrink-0 !h-24 !w-24 !p-4",
1087
1061
  variant: "tertiary",
1088
1062
  onClick: z
1089
1063
  }, {
1090
- default: $(() => [
1064
+ default: I(() => [
1091
1065
  d(G, {
1092
1066
  name: "collapse_all",
1093
1067
  color: "neutral-gray-400",
@@ -1104,18 +1078,18 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
1104
1078
  ]),
1105
1079
  V("div", {
1106
1080
  ref_key: "scrollElement",
1107
- ref: v,
1081
+ ref: p,
1108
1082
  class: X(["menu-tree-scroll min-h-0 flex-1 overflow-auto", M.value ? "pr-[14px]" : void 0])
1109
1083
  }, [
1110
- e(r).status === "loading" ? (p(), B(se, {
1084
+ e(r).status === "loading" ? (v(), B(se, {
1111
1085
  key: 0,
1112
1086
  size: "lg"
1113
- })) : e(r).status === "error" ? (p(), R("p", it, K(e(c)(e(r).error.message)), 1)) : e(r).status === "unavailable" ? (p(), R("p", ut, K(e(c)(e(r).reason)), 1)) : e(r).status === "ready" && e(r).value.nodes.length === 0 ? (p(), R("p", dt, K(e(l)("menu.tree_editor.labels.no_items")), 1)) : e(r).status === "ready" ? (p(), R("ul", {
1087
+ })) : e(r).status === "error" ? (v(), R("p", it, H(e(c)(e(r).error.message)), 1)) : e(r).status === "unavailable" ? (v(), R("p", ut, H(e(c)(e(r).reason)), 1)) : e(r).status === "ready" && e(r).value.nodes.length === 0 ? (v(), R("p", dt, H(e(l)("menu.tree_editor.labels.no_items")), 1)) : e(r).status === "ready" ? (v(), R("ul", {
1114
1088
  key: 4,
1115
1089
  "aria-label": e(l)("menu.tree_editor.labels.tree"),
1116
1090
  role: "tree"
1117
1091
  }, [
1118
- (p(!0), R(Z, null, oe(e(r).value.nodes, (ae) => (p(), B(nt, {
1092
+ (v(!0), R(Z, null, oe(e(r).value.nodes, (ae) => (v(), B(nt, {
1119
1093
  key: ae.id,
1120
1094
  depth: 0,
1121
1095
  "dragging-id": f.value,
@@ -1123,19 +1097,19 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
1123
1097
  node: ae,
1124
1098
  "currency-symbol": e(r).value.currencySymbol,
1125
1099
  "selected-id": E.value,
1126
- onAddItem: s[1] || (s[1] = (N) => I(N)),
1100
+ onAddItem: s[1] || (s[1] = (N) => x(N)),
1127
1101
  onRename: s[2] || (s[2] = (N) => b.value = N.entityId),
1128
1102
  onCatalogLink: s[3] || (s[3] = (N) => h(N)),
1129
1103
  onRemove: s[4] || (s[4] = (N) => C(N)),
1130
1104
  onDragEnd: s[5] || (s[5] = (N) => f.value = null),
1131
1105
  onDragStart: s[6] || (s[6] = (N) => f.value = N.id),
1132
- onDrop: s[7] || (s[7] = (N) => q(N)),
1106
+ onDrop: s[7] || (s[7] = (N) => W(N)),
1133
1107
  onSelect: s[8] || (s[8] = (N) => P(N)),
1134
1108
  onToggle: s[9] || (s[9] = (N) => n(N))
1135
1109
  }, null, 8, ["dragging-id", "expanded", "node", "currency-symbol", "selected-id"]))), 128))
1136
1110
  ], 8, ct)) : U("", !0)
1137
1111
  ], 2),
1138
- e(r).status === "ready" && e(r).stale ? (p(), R("div", mt, [
1112
+ e(r).status === "ready" && e(r).stale ? (v(), R("div", mt, [
1139
1113
  d(se, { size: "lg" })
1140
1114
  ])) : U("", !0),
1141
1115
  d(qe, {
@@ -1145,19 +1119,19 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
1145
1119
  ]);
1146
1120
  };
1147
1121
  }
1148
- }), vt = { class: "-mx-24 flex min-h-0 flex-1" }, ft = ["aria-label"], gt = ["aria-label"], yt = /* @__PURE__ */ W({
1122
+ }), vt = { class: "-mx-24 flex min-h-0 flex-1" }, ft = ["aria-label"], gt = ["aria-label"], yt = /* @__PURE__ */ q({
1149
1123
  __name: "MenuManagementEditor",
1150
1124
  props: {
1151
1125
  draft: {}
1152
1126
  },
1153
1127
  emits: ["close"],
1154
- setup(A, { emit: _ }) {
1155
- const o = A, l = _, { t } = Y(), { run: c } = xe(), m = j(null), r = j(null);
1128
+ setup(O, { emit: $ }) {
1129
+ const o = O, l = $, { t } = Y(), { run: c } = Ce(), m = j(null), r = j(null);
1156
1130
  function y() {
1157
1131
  var a;
1158
1132
  (a = r.value) == null || a.openCategoryCreate();
1159
1133
  }
1160
- function x() {
1134
+ function w() {
1161
1135
  var a;
1162
1136
  o.draft.undo(), (a = r.value) == null || a.refreshSelected();
1163
1137
  }
@@ -1165,7 +1139,7 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
1165
1139
  var a;
1166
1140
  o.draft.redo(), (a = r.value) == null || a.refreshSelected();
1167
1141
  }
1168
- Ce(o.draft);
1142
+ Fe(o.draft);
1169
1143
  const S = J(o.draft.state), E = F(
1170
1144
  () => S.value.status === "ready" ? S.value.value : {
1171
1145
  dirty: !1,
@@ -1174,20 +1148,20 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
1174
1148
  committing: !1,
1175
1149
  invalidated: !0
1176
1150
  }
1177
- ), f = we();
1151
+ ), f = he();
1178
1152
  async function b() {
1179
1153
  (await c(() => o.draft.commit(), {
1180
1154
  loadingTitle: t("menu.tree_editor.feedback.saving"),
1181
1155
  successMessage: t("menu.tree_editor.feedback.saved")
1182
1156
  })).kind === "success" && l("close");
1183
1157
  }
1184
- async function v() {
1158
+ async function p() {
1185
1159
  (await c(() => o.draft.discard(), {
1186
1160
  showLoading: !1
1187
1161
  })).kind === "success" && l("close");
1188
1162
  }
1189
1163
  function M() {
1190
- if (!E.value.dirty) return void v();
1164
+ if (!E.value.dirty) return void p();
1191
1165
  f.open({
1192
1166
  title: t("menu.tree_editor.actions.confirm_discard_title"),
1193
1167
  message: t("menu.tree_editor.actions.confirm_discard_message"),
@@ -1201,9 +1175,9 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
1201
1175
  variant: "tertiary",
1202
1176
  close: !0
1203
1177
  }
1204
- }).onPrimary(() => void v());
1178
+ }).onPrimary(() => void p());
1205
1179
  }
1206
- return (a, g) => (p(), B(he, {
1180
+ return (a, g) => (v(), B(we, {
1207
1181
  "primary-action": {
1208
1182
  label: e(t)("menu.tree_editor.actions.save"),
1209
1183
  disabled: E.value.committing
@@ -1216,16 +1190,16 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
1216
1190
  onOnCancel: M,
1217
1191
  onOnPrimary: b
1218
1192
  }, {
1219
- "append-title": $(() => [
1220
- d(Ne, {
1193
+ "append-title": I(() => [
1194
+ d(Oe, {
1221
1195
  "can-redo": E.value.canRedo,
1222
1196
  "can-undo": E.value.canUndo,
1223
1197
  committing: E.value.committing,
1224
1198
  onRedo: T,
1225
- onUndo: x
1199
+ onUndo: w
1226
1200
  }, null, 8, ["can-redo", "can-undo", "committing"])
1227
1201
  ]),
1228
- default: $(() => [
1202
+ default: I(() => [
1229
1203
  V("div", vt, [
1230
1204
  V("aside", {
1231
1205
  "aria-label": e(t)("menu.tree_editor.labels.tree"),
@@ -1233,7 +1207,7 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
1233
1207
  }, [
1234
1208
  d(pt, {
1235
1209
  onCreateCategory: y,
1236
- onSelect: g[0] || (g[0] = (k) => m.value = k)
1210
+ onSelect: g[0] || (g[0] = (_) => m.value = _)
1237
1211
  })
1238
1212
  ], 8, ft),
1239
1213
  V("section", {
@@ -1241,7 +1215,7 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
1241
1215
  class: "min-h-0 min-w-0 flex-1 overflow-hidden pr-24",
1242
1216
  "data-testid": "menu-management-editor-detail-host"
1243
1217
  }, [
1244
- d(Oe, {
1218
+ d(Ne, {
1245
1219
  ref_key: "detailPane",
1246
1220
  ref: r,
1247
1221
  selected: m.value
@@ -1252,31 +1226,31 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
1252
1226
  _: 1
1253
1227
  }, 8, ["primary-action", "secondary-actions", "title"]));
1254
1228
  }
1255
- }), bt = "treeEditorOpen", Bt = /* @__PURE__ */ W({
1229
+ }), bt = "treeEditorOpen", Dt = /* @__PURE__ */ q({
1256
1230
  __name: "TreeEditorOpenner",
1257
1231
  props: {
1258
1232
  canOpen: { type: Boolean },
1259
1233
  listenForMessage: { type: Boolean, default: !0 }
1260
1234
  },
1261
- setup(A) {
1262
- const _ = A, o = Fe(), l = Q(null);
1235
+ setup(O) {
1236
+ const $ = O, o = $e(), l = Q(null);
1263
1237
  function t() {
1264
- if (!_.canOpen || l.value) return;
1238
+ if (!$.canOpen || l.value) return;
1265
1239
  const m = o.drafts.open();
1266
1240
  m.kind === "success" && (l.value = m.value);
1267
1241
  }
1268
1242
  function c(m) {
1269
1243
  var r;
1270
- _.canOpen && ((r = m.data) == null ? void 0 : r.type) === bt && t();
1244
+ $.canOpen && ((r = m.data) == null ? void 0 : r.type) === bt && t();
1271
1245
  }
1272
1246
  return me(() => {
1273
- _.listenForMessage && window.addEventListener("message", c);
1247
+ $.listenForMessage && window.addEventListener("message", c);
1274
1248
  }), le(() => {
1275
1249
  var m;
1276
- _.listenForMessage && window.removeEventListener("message", c), (m = l.value) == null || m.dispose();
1277
- }), (m, r) => (p(), R(Z, null, [
1250
+ $.listenForMessage && window.removeEventListener("message", c), (m = l.value) == null || m.dispose();
1251
+ }), (m, r) => (v(), R(Z, null, [
1278
1252
  be(m.$slots, "default", { trigger: t }),
1279
- l.value ? (p(), B(yt, {
1253
+ l.value ? (v(), B(yt, {
1280
1254
  key: 0,
1281
1255
  draft: l.value,
1282
1256
  onClose: r[0] || (r[0] = (y) => l.value = null)
@@ -1285,7 +1259,6 @@ const Be = { key: 0 }, Le = { class: "fm-typo-en-body-md-600 text-fm-color-neutr
1285
1259
  }
1286
1260
  });
1287
1261
  export {
1288
- Bt as _,
1289
- ne as a,
1290
- Ve as b
1262
+ Dt as _,
1263
+ Ve as a
1291
1264
  };