@feedmepos/mf-menu-portal 1.0.4-dev.3 → 1.0.4

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 (80) hide show
  1. package/dist/{App-nS46pByh.js → App-CgYpEYgp.js} +3 -3
  2. package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C9OSr8ft.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Hdsnu29V.js} +1 -1
  3. package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-DnvN5R5w.js → BindingTable.vue_vue_type_script_setup_true_lang-CWe5_Sm5.js} +1 -1
  4. package/dist/{Catalog-B4RS8T29.js → Catalog-BrHGEI3p.js} +4 -4
  5. package/dist/{CatalogBinding-6_783kbu.js → CatalogBinding-BjTeOA91.js} +3 -3
  6. package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-BawCLY5-.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-doB3hsWD.js} +3 -3
  7. package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-BjP8ZXyb.js → CatalogEditor.vue_vue_type_script_setup_true_lang-BpBR-N_x.js} +7 -7
  8. package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Diapahfp.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-P59vHZEn.js} +14 -14
  9. package/dist/{Category-CqneIGq4.js → Category-6-ppsSmZ.js} +5 -5
  10. package/dist/{Category-DNQH1CI7.js → Category-CdsbuUqi.js} +2 -2
  11. package/dist/CategoryList.vue_vue_type_script_setup_true_lang-DlNUOgyu.js +847 -0
  12. package/dist/{CookingGuide-DTAiFmEL.js → CookingGuide-CRyRlBeV.js} +5 -5
  13. package/dist/{Group-5xO2j3CL.js → Group-DVrUlq4i.js} +2 -2
  14. package/dist/{Group-DeUqUomY.js → Group-DqyBHSFx.js} +5 -5
  15. package/dist/GroupList.vue_vue_type_script_setup_true_lang-oGNs8e8f.js +1807 -0
  16. package/dist/Ingredient-CGLfhbvN.js +505 -0
  17. package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-C0rc1FRO.js +782 -0
  18. package/dist/{MenuSetting-DdekHsQy.js → MenuSetting-Oct3vbHj.js} +4 -4
  19. package/dist/OrderPacing-BDkzflgE.js +769 -0
  20. package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-C3SqQPSr.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-B259anSs.js} +2 -2
  21. package/dist/{Preview-DGTw0POk.js → Preview-V9cSpevb.js} +1 -1
  22. package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-DffhFv0Y.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-k5S4mGCN.js} +1 -1
  23. package/dist/PrintRoute-3UwiMoBU.js +518 -0
  24. package/dist/{Product-CsbcyIgD.js → Product-LaB-YRTQ.js} +4 -4
  25. package/dist/ProductAttributeFilter.vue_vue_type_script_setup_true_lang-B2KdolJS.js +7931 -0
  26. package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang--rBKdKV7.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-BBXGnZtc.js} +9 -9
  27. package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-BUC6qUnG.js +2011 -0
  28. package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-DtCzHjpN.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CjQRRqBx.js} +1 -1
  29. package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-aDx01-WW.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-3yzUcogQ.js} +630 -587
  30. package/dist/{ProductInternalTools-Ccd4dAmx.js → ProductInternalTools-DWCgC825.js} +2 -2
  31. package/dist/{ProductInventoryDialog-DYcKdKHi.js → ProductInventoryDialog-D0d5RywR.js} +1 -1
  32. package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-DySFcCJz.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-CmYKO0ZX.js} +1 -1
  33. package/dist/ProductList.vue_vue_type_script_setup_true_lang-DeX8Exly.js +2765 -0
  34. package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-Dw2xiPYX.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-BFD6_Sbb.js} +1 -1
  35. package/dist/{Products-phZwCZhU.js → Products-BLUhwFT-.js} +3 -3
  36. package/dist/Publish-Dkjnls7p.js +1337 -0
  37. package/dist/Recipe-BGfofjHT.js +388 -0
  38. package/dist/{Scheduler-C-A5m92O.js → Scheduler-BL7t8aS7.js} +314 -254
  39. package/dist/ServingSequence-CDFXMCiN.js +374 -0
  40. package/dist/{Setting-C24V-lps.js → Setting-gYZoZxQG.js} +6 -6
  41. package/dist/Subcategory-CnlrVwCy.js +459 -0
  42. package/dist/{Takeaway-BFP2ohJn.js → Takeaway-BWVzwWnh.js} +5 -5
  43. package/dist/{Takeaway-DywX5BiX.js → Takeaway-D8FzvC2w.js} +2 -2
  44. package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-B3QS7o1v.js → TakeawayList.vue_vue_type_script_setup_true_lang-igS-FXq5.js} +4 -4
  45. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B8nXazx6.js +1291 -0
  46. package/dist/Unit-Do7Tt8U8.js +424 -0
  47. package/dist/{Variant-BBfWhH-s.js → Variant-D1kLupxx.js} +5 -5
  48. package/dist/{_id_-BooM3FX1.js → _id_-DomaBHrh.js} +3 -3
  49. package/dist/{app-Bmgb8ACe.js → app-C_XNYz8_.js} +312 -312
  50. package/dist/app.js +1 -1
  51. package/dist/apps/mf-menu/src/app.d.ts +60 -0
  52. package/dist/apps/mf-menu/src/components/Product/BulkCategorySelect.vue.d.ts +37 -0
  53. package/dist/apps/mf-menu/src/components/Product/ProductAttributeFilter.vue.d.ts +11 -1
  54. package/dist/apps/mf-menu/src/components/ProductList.vue.d.ts +2 -2
  55. package/dist/apps/mf-menu/src/components/feature/NestedGroupManager/NestedGroupOverrideSheets.vue.d.ts +27 -0
  56. package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesFilter.vue.d.ts +20 -0
  57. package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
  58. package/dist/assets/{menu-compute-CG-fX5pi.js → menu-compute-Did75Kp9.js} +2 -2
  59. package/dist/assets/{validate-menu-BeGMWVns.js → validate-menu-DVMOLygB.js} +2 -2
  60. package/dist/mf-menu-portal.css +1 -1
  61. package/dist/{provide-CfF0FmUz.js → provide-Bwf3KcOV.js} +67991 -66892
  62. package/dist/{useActionFeedback-DyUCQl2x.js → useActionFeedback-CXx7dOVc.js} +1 -1
  63. package/dist/{FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js → vuedraggable-CBtQLb_S.js} +140 -139
  64. package/package.json +2 -2
  65. package/dist/CategoryList.vue_vue_type_script_setup_true_lang-Bt_onPrP.js +0 -797
  66. package/dist/GroupList.vue_vue_type_script_setup_true_lang-Dgya_JLB.js +0 -2183
  67. package/dist/Ingredient-BlDW3TfZ.js +0 -463
  68. package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-0tCpJlOf.js +0 -709
  69. package/dist/OrderPacing-Bb2n5wmI.js +0 -698
  70. package/dist/PrintRoute-CJB4gIP2.js +0 -473
  71. package/dist/ProductChipSummary.vue_vue_type_script_setup_true_lang-D8DygCBl.js +0 -110
  72. package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-J6LpJ5wT.js +0 -1257
  73. package/dist/ProductList.vue_vue_type_script_setup_true_lang-DTLslTpK.js +0 -10353
  74. package/dist/Publish-BeKIXu3z.js +0 -1261
  75. package/dist/Recipe-Fo4tBkBv.js +0 -350
  76. package/dist/ServingSequence-BrCwLSO7.js +0 -336
  77. package/dist/Subcategory-B0oZIKbw.js +0 -412
  78. package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D7mhnrXx.js +0 -1213
  79. package/dist/Unit-NhEwH-kr.js +0 -385
  80. package/dist/apps/mf-menu/src/views/MenuManagementEditor/RestaurantAttributesFilter.vue.d.ts +0 -2
@@ -1,2183 +0,0 @@
1
- import { defineComponent as Vl, ref as $, watch as Ye, resolveComponent as V, openBlock as c, createBlock as h, withCtx as m, createElementVNode as d, createVNode as o, normalizeClass as vl, toDisplayString as w, unref as t, createElementBlock as b, Fragment as j, renderList as Y, createCommentVNode as x, defineAsyncComponent as Jl, computed as k, shallowRef as U, h as i, withModifiers as R, onUnmounted as Wl, renderSlot as Te, withDirectives as Xl, mergeProps as gl } from "vue";
2
- import { useI18n as Ol, CustomAttributesForm as bl } from "@feedmepos/mf-common";
3
- import { useDialog as ea, useSnackbar as la, components as v, SnackbarPosition as aa, FmButtonVariant as fl } from "@feedmepos/ui-library";
4
- import { _ as ta } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-C9OSr8ft.js";
5
- import { _ as yl } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
6
- import { a as oa, b as _l, _ as q } from "./TranslationLanguageSelector.vue_vue_type_script_setup_true_lang-BJZ6VcrT.js";
7
- import { A as wl, _ as xl } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-0tCpJlOf.js";
8
- import { a as Re, _ as pe } from "./FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js";
9
- import { _ as je } from "./FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js";
10
- import { _ as kl, a as hl, c as Cl, F as Ke, b as na, d as sa } from "./ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-J6LpJ5wT.js";
11
- import { _ as ia } from "./ListCountTag.vue_vue_type_script_setup_true_lang-0bjk8Aly.js";
12
- import { _ as ra } from "./PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js";
13
- import { _ as ua } from "./ProductChipSummary.vue_vue_type_script_setup_true_lang-D8DygCBl.js";
14
- import { _ as da } from "./ProductFilterMenu.vue_vue_type_script_setup_true_lang-Cgc0Ms_n.js";
15
- import { _ as ma } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js";
16
- import { u as ca } from "./useActionFeedback-DyUCQl2x.js";
17
- import { u as pa } from "./useEditorValidation-Ctef5Bxt.js";
18
- import { b as va, u as Fl } from "./provide-CfF0FmUz.js";
19
- import { v as ga } from "./tableSemantics-C9WFO_I_.js";
20
- const ba = { class: "option-translation-sheet-marker sr-only" }, fa = { class: "fm-typo-en-title-md-600" }, ya = { class: "pt-8 space-y-24" }, _a = { class: "flex flex-col gap-16 border p-16 rounded-lg" }, wa = ["aria-expanded"], xa = { class: "fm-typo-en-body-lg-600" }, ka = {
21
- key: 0,
22
- class: "flex flex-col gap-32 pl-32"
23
- }, ha = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary border inline-block rounded-full px-8 py-4 mb-8" }, Ca = {
24
- key: 0,
25
- class: "space-y-8"
26
- }, Fa = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary border inline-block rounded-full px-8 py-4 mb-8" }, Va = { class: "flex w-[100px] items-center gap-8" }, Oa = { class: "fm-typo-en-body-md-400" }, $a = { class: "flex-1" }, Sa = { class: "flex flex-col gap-16 border p-16 rounded-lg" }, Pa = ["aria-expanded"], Ta = { class: "fm-typo-en-body-lg-600" }, Na = {
27
- key: 0,
28
- class: "flex flex-col gap-32 pl-32"
29
- }, Ua = { class: "fm-typo-en-body-md-600 text-fm-color-primary border border-fm-color-primary inline-block rounded-md px-8 py-4" }, Ea = { class: "space-y-32" }, Ia = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary border inline-block rounded-full px-8 py-4 mb-4" }, za = { class: "-mt-px" }, Aa = {
30
- key: 0,
31
- class: "space-y-8"
32
- }, Da = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary border inline-block rounded-full px-8 py-4 mb-4" }, La = { class: "flex w-[100px] items-center gap-8" }, Ma = { class: "fm-typo-en-body-md-400" }, Ba = { class: "flex-1" }, Ga = { class: "flex gap-8 items-center justify-start" }, Ra = /* @__PURE__ */ Vl({
33
- __name: "GroupTranslationSideSheet",
34
- props: {
35
- modelValue: { type: Boolean },
36
- view: {},
37
- session: {}
38
- },
39
- emits: ["save", "discard"],
40
- setup(Ne, { emit: Ue }) {
41
- const Ee = Ne, H = Ue, { t: g } = Ol(), l = $(!1), T = $(!0);
42
- return Ye(
43
- () => Ee.modelValue,
44
- (f) => {
45
- f && (l.value = !1, T.value = !0);
46
- },
47
- { immediate: !0 }
48
- ), (f, C) => {
49
- const I = V("FmIcon"), z = V("FmTextField"), ve = V("FmButton"), A = V("FmSideSheet");
50
- return c(), h(A, {
51
- "model-value": f.modelValue,
52
- "max-width": 720,
53
- "z-index": 200,
54
- "is-container-props": { class: "group-translation-sheet" },
55
- "onOn:clickedAway": C[6] || (C[6] = (u) => H("discard")),
56
- "onUpdate:modelValue": C[7] || (C[7] = (u) => !u && H("discard"))
57
- }, {
58
- "side-sheet-header": m(() => [
59
- d("span", ba, w(t(g)("menu.group.translation.translate_options")), 1),
60
- d("p", fa, w(t(g)("menu.group.translation.title")), 1)
61
- ]),
62
- "side-sheet-footer": m(() => [
63
- d("div", Ga, [
64
- o(ve, {
65
- label: t(g)("menu.common.actions.save"),
66
- size: "lg",
67
- variant: "primary",
68
- onClick: C[4] || (C[4] = (u) => H("save"))
69
- }, null, 8, ["label"]),
70
- o(ve, {
71
- label: t(g)("menu.common.actions.cancel"),
72
- size: "lg",
73
- variant: "tertiary",
74
- onClick: C[5] || (C[5] = (u) => H("discard"))
75
- }, null, 8, ["label"])
76
- ])
77
- ]),
78
- default: m(() => [
79
- d("div", ya, [
80
- o(oa, {
81
- selected: f.view.optionTranslationView.locales,
82
- available: f.view.optionTranslationView.availableLocales,
83
- "menu-z-index": 201,
84
- onAdd: C[0] || (C[0] = (u) => f.session.addOptionTranslationLocale(u)),
85
- onRemove: C[1] || (C[1] = (u) => f.session.removeOptionTranslationLocale(u))
86
- }, null, 8, ["selected", "available"]),
87
- d("div", _a, [
88
- d("button", {
89
- type: "button",
90
- class: "flex items-center gap-16 cursor-pointer appearance-none border-0 bg-transparent p-0 text-left",
91
- "aria-expanded": l.value,
92
- onClick: C[2] || (C[2] = (u) => l.value = !l.value)
93
- }, [
94
- o(I, {
95
- name: "keyboard_arrow_down",
96
- class: vl([
97
- "transition-transform",
98
- l.value ? "transform rotate-180" : ""
99
- ])
100
- }, null, 8, ["class"]),
101
- d("p", xa, w(t(g)("menu.group.translation.group_name")), 1)
102
- ], 8, wa),
103
- l.value ? (c(), b("div", ka, [
104
- d("div", null, [
105
- d("p", ha, w(t(g)("menu.group.translation.default")), 1),
106
- o(z, {
107
- "model-value": f.view.name,
108
- readonly: ""
109
- }, null, 8, ["model-value"])
110
- ]),
111
- f.view.optionTranslationView.groupNameTranslations.length > 0 ? (c(), b("div", Ca, [
112
- d("p", Fa, w(t(g)("menu.group.translation.translation")), 1),
113
- (c(!0), b(j, null, Y(f.view.optionTranslationView.groupNameTranslations, (u) => (c(), b("div", {
114
- key: u.code,
115
- class: "flex gap-16 items-center"
116
- }, [
117
- d("div", Va, [
118
- o(_l, {
119
- code: u.code
120
- }, null, 8, ["code"]),
121
- d("span", Oa, w(u.label), 1)
122
- ]),
123
- d("div", $a, [
124
- o(q, {
125
- "model-value": u.value,
126
- readonly: ""
127
- }, null, 8, ["model-value"])
128
- ])
129
- ]))), 128))
130
- ])) : x("", !0)
131
- ])) : x("", !0)
132
- ]),
133
- d("div", Sa, [
134
- d("button", {
135
- type: "button",
136
- class: "flex items-center gap-16 cursor-pointer appearance-none border-0 bg-transparent p-0 text-left",
137
- "aria-expanded": T.value,
138
- onClick: C[3] || (C[3] = (u) => T.value = !T.value)
139
- }, [
140
- o(I, {
141
- name: "keyboard_arrow_down",
142
- class: vl([
143
- "transition-transform",
144
- T.value ? "transform rotate-180" : ""
145
- ])
146
- }, null, 8, ["class"]),
147
- d("p", Ta, w(t(g)("menu.group.translation.product_name")), 1)
148
- ], 8, Pa),
149
- T.value ? (c(), b("div", Na, [
150
- (c(!0), b(j, null, Y(f.view.optionTranslationView.options, (u, ne) => (c(), b("div", {
151
- key: u.id,
152
- class: "space-y-8"
153
- }, [
154
- d("p", Ua, w(t(g)("menu.group.translation.option", { number: ne + 1 })), 1),
155
- d("div", Ea, [
156
- d("div", null, [
157
- d("p", Ia, w(t(g)("menu.group.translation.default")), 1),
158
- d("div", za, [
159
- o(q, {
160
- "model-value": u.name,
161
- placeholder: u.placeholder,
162
- "aria-label": t(g)("menu.group.translation.option_default", {
163
- number: ne + 1
164
- }),
165
- "onUpdate:modelValue": (O) => f.session.setOptionName(u.id, O, u.target)
166
- }, null, 8, ["model-value", "placeholder", "aria-label", "onUpdate:modelValue"])
167
- ])
168
- ]),
169
- f.view.optionTranslationLocales.length > 0 ? (c(), b("div", Aa, [
170
- d("p", Da, w(t(g)("menu.group.translation.translation")), 1),
171
- (c(!0), b(j, null, Y(u.translations, (O) => (c(), b("div", {
172
- key: O.code,
173
- class: "flex gap-16 items-center"
174
- }, [
175
- d("div", La, [
176
- o(_l, {
177
- code: O.code
178
- }, null, 8, ["code"]),
179
- d("span", Ma, w(O.label), 1)
180
- ]),
181
- d("div", Ba, [
182
- o(q, {
183
- "model-value": O.value,
184
- placeholder: u.name,
185
- "aria-label": t(g)("menu.group.translation.option_translation", {
186
- number: ne + 1,
187
- language: O.label
188
- }),
189
- "onUpdate:modelValue": (D) => f.session.setOptionTranslation(
190
- u.id,
191
- O.code,
192
- D
193
- )
194
- }, null, 8, ["model-value", "placeholder", "aria-label", "onUpdate:modelValue"])
195
- ])
196
- ]))), 128))
197
- ])) : x("", !0)
198
- ])
199
- ]))), 128))
200
- ])) : x("", !0)
201
- ])
202
- ])
203
- ]),
204
- _: 1
205
- }, 8, ["model-value"]);
206
- };
207
- }
208
- }), ja = {
209
- key: 0,
210
- class: "flex-1 flex justify-between gap-8 pl-8"
211
- }, Ka = { class: "flex items-center" }, Ya = {
212
- key: 1,
213
- class: "flex items-center gap-8 ml-auto"
214
- }, qa = {
215
- key: 0,
216
- class: "text-fm-color-typo-secondary",
217
- role: "alert"
218
- }, Ha = {
219
- key: 1,
220
- "data-menu-state": "unavailable"
221
- }, Qa = { class: "flex justify-between items-center gap-8 mt-16 mb-8" }, Za = {
222
- key: 1,
223
- "aria-hidden": "true"
224
- }, Ja = { class: "w-[320px]" }, Wa = { class: "fm-typo-en-title-md-600" }, Xa = { class: "space-y-32 pt-8" }, et = { key: 0 }, lt = { key: 1 }, at = { class: "xs:overflow-x-scroll" }, tt = { class: "xs:min-w-[640px]" }, ot = { class: "flex gap-8 items-center justify-start" }, nt = {
225
- key: 0,
226
- role: "alert"
227
- }, st = {
228
- key: 1,
229
- "data-menu-state": "unavailable"
230
- }, it = { class: "flex gap-8 items-center justify-start" }, rt = {
231
- key: 0,
232
- class: "group-list-nested-sheet-marker sr-only",
233
- "aria-hidden": "true"
234
- }, ut = { class: "mr-auto fm-typo-en-title-md-600" }, dt = { class: "space-y-24 pt-16" }, mt = { class: "rounded-md border border-fm-color-neutral-gray-200 px-16 py-12" }, ct = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, pt = { class: "fm-typo-en-title-sm-600" }, vt = { class: "space-y-16" }, gt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, bt = {
235
- key: 0,
236
- class: "nested-group-editor-sheet-marker sr-only"
237
- }, ft = { class: "fm-typo-en-title-md-600" }, yt = { class: "pt-8 space-y-32" }, _t = { class: "xs:overflow-x-scroll" }, wt = { class: "xs:min-w-[640px]" }, xt = { class: "flex gap-8" }, kt = { class: "fm-typo-en-title-md-600" }, ht = { class: "space-y-32 pt-8" }, Ct = { class: "xs:overflow-x-scroll" }, Ft = { class: "xs:min-w-[640px]" }, Vt = { class: "flex gap-8" }, Yt = /* @__PURE__ */ Vl({
238
- __name: "GroupList",
239
- props: {
240
- sdk: {},
241
- catalogPage: { type: Boolean, default: !1 },
242
- heading: { default: "" }
243
- },
244
- setup(Ne) {
245
- const Ue = Jl(
246
- () => import("./ProductInventoryDialog-DYcKdKHi.js")
247
- ), Ee = ["NORMAL", "PRODUCT", "DYNAMIC"], H = {
248
- NORMAL: "menu.group.type.normal",
249
- PRODUCT: "menu.group.type.product",
250
- DYNAMIC: "menu.group.type.dynamic"
251
- }, g = Ne, { t: l, n: T } = Ol(), f = va(), C = ea();
252
- function I(e) {
253
- if (!e) return "";
254
- const a = T(0, {
255
- useGrouping: !1,
256
- minimumFractionDigits: 0,
257
- maximumFractionDigits: 0
258
- });
259
- return T(0, {
260
- style: "currency",
261
- currency: e,
262
- currencyDisplay: "narrowSymbol",
263
- useGrouping: !1,
264
- minimumFractionDigits: 0,
265
- maximumFractionDigits: 0
266
- }).replace(a, "").trim() || e;
267
- }
268
- const { run: z } = ca(), ve = la(), A = Fl(g.sdk.group.list), u = k(
269
- () => A.value.status === "ready" ? A.value.value : null
270
- ), ne = k(() => {
271
- var e;
272
- return [
273
- { label: l("menu.common.labels.summary"), value: null },
274
- ...(((e = u.value) == null ? void 0 : e.scope.schedulerOptions) ?? []).map((a) => ({
275
- label: a.label,
276
- value: a.id
277
- }))
278
- ];
279
- }), O = $(!1), D = $(!1), Q = $(!1), Ie = $(!1), Z = $(!1), K = U(null), N = U({
280
- status: "loading"
281
- });
282
- let ze = () => {
283
- };
284
- const J = U(null), W = U(null), ge = $(""), X = $(!1), ee = $(!1), qe = Fl(
285
- g.sdk.linkProduct.catalogue
286
- ), He = k(
287
- () => qe.value.status === "ready" ? qe.value.value : null
288
- ), be = $(!1), le = $(!1), fe = U(null), ye = U({
289
- status: "loading"
290
- }), S = U(null), _e = U({
291
- status: "loading"
292
- });
293
- let Ae = () => {
294
- }, se = () => {
295
- };
296
- const p = U(g.sdk.group.editor()), ie = U(
297
- p.value.get()
298
- );
299
- let De = p.value.subscribe(
300
- (e) => ie.value = e
301
- );
302
- const r = k(
303
- () => ie.value.status === "ready" ? ie.value.value : null
304
- ), ae = pa(() => p.value), we = k(
305
- () => r.value ? ae.issue(r.value.fieldIssues, "name") ?? r.value.nameIssue : null
306
- ), Qe = k(() => {
307
- const e = r.value;
308
- return e ? [
309
- ...ae.issues(e.fieldIssues, "bounds"),
310
- ...ae.issues(e.fieldIssues, "options"),
311
- ...e.issues.filter(
312
- (a) => a.field !== "name" && a.field !== "bounds" && a.field !== "options"
313
- )
314
- ] : [];
315
- }), xe = $({}), Ze = k(() => {
316
- var e;
317
- return (((e = r.value) == null ? void 0 : e.options) ?? []).map((a) => ({
318
- ...a,
319
- subRows: a.variants
320
- }));
321
- }), L = k(
322
- () => N.value.status === "ready" ? N.value.value : null
323
- );
324
- Ye(
325
- () => N.value.status,
326
- (e) => {
327
- e !== "ready" && (Z.value = !1);
328
- }
329
- );
330
- const Je = k(
331
- () => ye.value.status === "ready" ? ye.value.value : null
332
- ), M = k(
333
- () => _e.value.status === "ready" ? _e.value.value : null
334
- ), ke = k(() => {
335
- var e;
336
- return [
337
- ...((e = M.value) == null ? void 0 : e.options) ?? []
338
- ];
339
- }), We = k(() => {
340
- var e;
341
- return [
342
- ...((e = Je.value) == null ? void 0 : e.groups) ?? []
343
- ];
344
- }), $l = k(() => [
345
- {
346
- accessorKey: "name",
347
- header: () => l("menu.group.list.columns.name"),
348
- enableSorting: !1
349
- },
350
- {
351
- id: "products",
352
- header: () => l("menu.group.list.columns.products"),
353
- enableSorting: !1,
354
- size: 200,
355
- cell: (e) => i(
356
- "div",
357
- { class: "line-clamp-2 break-all" },
358
- e.row.original.products.join(", ")
359
- )
360
- },
361
- {
362
- id: "actions",
363
- header: "",
364
- size: 52,
365
- enableSorting: !1,
366
- cell: (e) => i("div", { class: "flex justify-end" }, [
367
- i(v.FmButton, {
368
- "aria-label": l("menu.group.a11y.row", {
369
- label: l("menu.common.actions.edit"),
370
- index: e.row.index + 1
371
- }),
372
- prependIcon: "edit",
373
- textColor: "neutral-gray-400",
374
- variant: "tertiary",
375
- onClick: () => Gl(e.row.original.id)
376
- })
377
- ])
378
- }
379
- ]), Sl = k(
380
- () => [
381
- {
382
- id: "default",
383
- size: 35,
384
- header: () => l("menu.group.option.is_default"),
385
- enableSorting: !1,
386
- cell: (e) => i(v.FmCheckbox, {
387
- "aria-label": l("menu.group.a11y.row", {
388
- label: l("menu.group.option.is_default"),
389
- index: e.row.index + 1
390
- }),
391
- disabled: e.row.original.orderFrom === "NONE",
392
- modelValue: e.row.original.isDefault,
393
- value: e.row.original.id,
394
- "onUpdate:modelValue": (a) => {
395
- var s;
396
- return (s = S.value) == null ? void 0 : s.setOptionDefault(
397
- e.row.original.id,
398
- a
399
- );
400
- }
401
- })
402
- },
403
- {
404
- accessorKey: "code",
405
- size: 100,
406
- header: () => l("menu.group.option.code"),
407
- enableSorting: !1
408
- },
409
- {
410
- id: "title",
411
- header: () => i("div", { class: "flex items-center w-full gap-8" }, [
412
- i("span", l("menu.group.option.product_title")),
413
- // `groupConfig().name` is off for an override, which disables the
414
- // option translation trigger rather than removing it.
415
- i(v.FmButton, {
416
- disabled: !0,
417
- icon: "g_translate",
418
- textColor: "neutral-gray-400",
419
- variant: "tertiary"
420
- })
421
- ]),
422
- enableSorting: !1,
423
- cell: (e) => i(
424
- "div",
425
- i(q, {
426
- "aria-label": l("menu.group.a11y.row", {
427
- label: l("menu.group.option.product_title"),
428
- index: e.row.index + 1
429
- }),
430
- class: "min-w-[300px]",
431
- disabled: !0,
432
- modelValue: e.row.original.name
433
- })
434
- )
435
- },
436
- {
437
- id: "price",
438
- size: 400,
439
- header: () => {
440
- var e;
441
- return l("menu.group.option.price", {
442
- symbol: I((e = r.value) == null ? void 0 : e.currencyCode)
443
- });
444
- },
445
- enableSorting: !1,
446
- cell: (e) => {
447
- const a = e.row.original;
448
- return i("div", { class: "flex items-center gap-8" }, [
449
- i(kl, {
450
- class: "min-w-[88px]",
451
- commitOnInput: !0,
452
- disabled: a.orderFrom === "NONE",
453
- inputmode: "decimal",
454
- "aria-label": l("menu.group.a11y.row", {
455
- label: l("menu.group.option.price", {
456
- symbol: I(a.currency)
457
- }),
458
- index: e.row.index + 1
459
- }),
460
- modelValue: a.priceAmount,
461
- // Legacy's `formatCurrency(fallback)` strips Dinero's space after
462
- // the symbol, so the placeholder reads "RM5.00".
463
- placeholder: a.inheritedPriceAmount === null ? "" : T(a.inheritedPriceAmount, {
464
- style: "currency",
465
- currency: a.currency,
466
- currencyDisplay: "narrowSymbol"
467
- }).replaceAll(/\s/g, ""),
468
- "onUpdate:modelValue": (s) => {
469
- var y;
470
- return (y = S.value) == null ? void 0 : y.setOptionPrice(a.id, s);
471
- }
472
- }),
473
- ...a.editPricing.state === "hidden" ? [] : [
474
- i("div", { class: "flex items-center gap-4" }, [
475
- i(
476
- v.FmButton,
477
- {
478
- variant: "plain",
479
- label: l(
480
- "menu.product.form.member_price.configure.title"
481
- ),
482
- "aria-label": l("menu.group.a11y.row", {
483
- label: l(
484
- "menu.product.form.member_price.configure.title"
485
- ),
486
- index: e.row.index + 1
487
- }),
488
- disabled: a.editPricing.state !== "allowed",
489
- onClick: () => al(a, "members")
490
- },
491
- {
492
- default: () => i(
493
- "span",
494
- { class: "underline line-clamp-2 break-all" },
495
- a.memberPriceCount ? l(
496
- "menu.product.form.member_price.configure.title_with_tier",
497
- { num: a.memberPriceCount }
498
- ) : l(
499
- "menu.product.form.member_price.configure.title"
500
- )
501
- )
502
- }
503
- ),
504
- i(hl, { prices: a.memberPrices })
505
- ])
506
- ]
507
- ]);
508
- }
509
- },
510
- {
511
- id: "orderFrom",
512
- size: 100,
513
- header: () => l("menu.common.labels.order_from"),
514
- enableSorting: !1,
515
- cell: (e) => i(v.FmSelect, {
516
- "aria-label": l("menu.group.a11y.row", {
517
- label: l("menu.common.labels.order_from"),
518
- index: e.row.index + 1
519
- }),
520
- items: Xe.value,
521
- // FmSelect teleports its menu below this z-index-200 sheet unless
522
- // it is pinned one above it (as ProductGroupSheet does).
523
- menuZIndex: 201,
524
- modelValue: e.row.original.orderFrom,
525
- shiftMenu: !0,
526
- "onUpdate:modelValue": (a) => {
527
- var s;
528
- a && ((s = S.value) == null || s.setOptionOrderFrom(
529
- e.row.original.id,
530
- a
531
- ));
532
- }
533
- })
534
- },
535
- {
536
- id: "actions",
537
- size: 80,
538
- header: "",
539
- enableSorting: !1,
540
- meta: { cellClass: "" },
541
- cell: (e) => {
542
- const a = e.row.original;
543
- return i("div", { class: "flex items-center justify-end" }, [
544
- ...a.editPricing.state === "hidden" ? [] : [
545
- i(Cl, {
546
- configured: a.hasPriceTiers,
547
- disabled: a.editPricing.state !== "allowed",
548
- label: l("menu.group.a11y.row", {
549
- label: l("menu.price_tier.price_tier_config"),
550
- index: e.row.index + 1
551
- }),
552
- onOpen: () => al(a, "tiers")
553
- })
554
- ],
555
- i(v.FmButton, {
556
- "aria-label": l("menu.group.a11y.row", {
557
- label: l("menu.inventory.title"),
558
- index: e.row.index + 1
559
- }),
560
- disabled: a.orderFrom === "NONE",
561
- icon: "inventory_2",
562
- overwriteIconOutline: a.inventory.bindings.length ? "filled" : "outline",
563
- textColor: "neutral-gray-400",
564
- variant: "tertiary",
565
- onClick: () => Nl(a)
566
- }),
567
- // A deeper nesting level is outside the approved nested-override
568
- // scope, so the trigger stays in legacy's disabled state.
569
- i(v.FmButton, {
570
- "aria-label": l("menu.group.a11y.row", {
571
- label: l("menu.group.nested.title"),
572
- index: e.row.index + 1
573
- }),
574
- disabled: !0,
575
- icon: "arrow_split",
576
- textColor: "neutral-gray-400",
577
- variant: "tertiary"
578
- })
579
- ]);
580
- }
581
- }
582
- ]
583
- ), Xe = k(() => [
584
- { label: l("menu.order.from.options.all"), value: "ALL" },
585
- { label: l("menu.order.from.options.pos_only"), value: "POS_ONLY" },
586
- { label: l("menu.order.from.options.none"), value: "NONE" }
587
- ]);
588
- function el(e) {
589
- return Object.fromEntries(
590
- Object.entries(e).map(([a, s]) => [a, [...s]])
591
- );
592
- }
593
- function he() {
594
- var e;
595
- (e = J.value) == null || e.dispose(), J.value = null;
596
- }
597
- function ll(e, a) {
598
- he(), J.value = p.value.pricingEditor(
599
- e.id,
600
- a,
601
- e.target
602
- );
603
- }
604
- async function Pl(e) {
605
- return (await z(() => g.sdk.priceTier.create(e), {
606
- successMessage: l("menu.price_tier.add_price_group_success")
607
- })).kind === "success";
608
- }
609
- function Ce() {
610
- var e;
611
- (e = W.value) == null || e.dispose(), W.value = null, ge.value = "";
612
- }
613
- function Tl(e) {
614
- Ce(), ge.value = e.name || e.placeholder, W.value = p.value.inventoryEditor(e.id);
615
- }
616
- function al(e, a) {
617
- var s;
618
- he(), J.value = ((s = S.value) == null ? void 0 : s.pricingEditor(e.id, a)) ?? null;
619
- }
620
- function Nl(e) {
621
- var a;
622
- Ce(), ge.value = e.name, W.value = ((a = S.value) == null ? void 0 : a.inventoryEditor(e.id)) ?? null;
623
- }
624
- function Ul() {
625
- var e, a;
626
- ((a = (e = r.value) == null ? void 0 : e.translation) == null ? void 0 : a.state) === "allowed" && (p.value.beginOptionTranslationEdit(), X.value = !0);
627
- }
628
- function tl() {
629
- var e, a;
630
- ((a = (e = r.value) == null ? void 0 : e.translation) == null ? void 0 : a.state) === "allowed" && (p.value.beginGroupTranslationEdit(), ee.value = !0);
631
- }
632
- function El() {
633
- p.value.saveGroupTranslationEdit(), ee.value = !1;
634
- }
635
- function Fe() {
636
- p.value.discardGroupTranslationEdit(), ee.value = !1;
637
- }
638
- function Il() {
639
- p.value.saveOptionTranslationEdit(), X.value = !1;
640
- }
641
- function Le() {
642
- p.value.discardOptionTranslationEdit(), X.value = !1;
643
- }
644
- const Me = k(() => [
645
- {
646
- accessorKey: "isDefault",
647
- size: 35,
648
- header: () => l("menu.group.option.is_default"),
649
- enableSorting: !1,
650
- cell: (e) => i(v.FmCheckbox, {
651
- modelValue: e.row.original.isDefault,
652
- value: "default",
653
- disabled: e.row.original.edit.state !== "allowed",
654
- "aria-label": l("menu.group.a11y.row", {
655
- label: l("menu.group.option.is_default"),
656
- index: e.row.index + 1
657
- }),
658
- "onUpdate:modelValue": (a) => p.value.setOptionDefault(
659
- e.row.original.id,
660
- a,
661
- e.row.original.target
662
- )
663
- })
664
- },
665
- {
666
- accessorKey: "code",
667
- size: 100,
668
- header: () => l("menu.group.option.code"),
669
- enableSorting: !1,
670
- cell: (e) => i("div", { class: "break-all max-w-[100px]" }, e.row.original.code)
671
- },
672
- {
673
- accessorKey: "name",
674
- header: () => {
675
- var e, a;
676
- return i("div", { class: "flex items-center w-full gap-8" }, [
677
- i("span", l("menu.group.option.product_title")),
678
- i(v.FmButton, {
679
- "aria-label": l("menu.group.translation.translate_options"),
680
- disabled: ((a = (e = r.value) == null ? void 0 : e.translation) == null ? void 0 : a.state) !== "allowed",
681
- icon: "g_translate",
682
- textColor: "neutral-gray-400",
683
- variant: "tertiary",
684
- onClick: Ul
685
- })
686
- ]);
687
- },
688
- enableSorting: !1,
689
- cell: (e) => {
690
- const a = e.row.original, s = [a.code, a.name || a.placeholder].filter(Boolean).join(" "), y = e.row.getIsExpanded();
691
- return i("div", { class: "flex items-center gap-8" }, [
692
- ...e.row.getCanExpand() ? [
693
- i(v.FmButton, {
694
- icon: "keyboard_arrow_up",
695
- class: y ? "rotate-180" : "",
696
- "aria-label": y ? l("menu.apply_product.table.collapse_combinations", {
697
- name: s
698
- }) : l("menu.apply_product.table.expand_combinations", {
699
- name: s
700
- }),
701
- variant: "tertiary",
702
- onClick: e.row.getToggleExpandedHandler()
703
- })
704
- ] : [],
705
- i(v.FmTextField, {
706
- class: "min-w-[300px]",
707
- modelValue: a.name,
708
- placeholder: a.placeholder,
709
- disabled: a.edit.state !== "allowed",
710
- "aria-label": l("menu.group.a11y.row", {
711
- label: l("menu.group.option.product_title"),
712
- index: e.row.index + 1
713
- }),
714
- "onUpdate:modelValue": (F) => p.value.setOptionName(a.id, F, a.target)
715
- })
716
- ]);
717
- }
718
- },
719
- {
720
- accessorKey: "priceAmount",
721
- size: 400,
722
- header: () => {
723
- var e;
724
- return l("menu.group.option.price", {
725
- symbol: I((e = r.value) == null ? void 0 : e.currencyCode)
726
- });
727
- },
728
- enableSorting: !1,
729
- cell: (e) => i("div", { class: "flex items-center gap-8" }, [
730
- i(kl, {
731
- class: "min-w-[88px]",
732
- modelValue: e.row.original.priceAmount,
733
- disabled: e.row.original.edit.state !== "allowed",
734
- // Legacy exposes the first option price as the form's plain
735
- // "Price (RM)" field. Keep that stable semantic control for the
736
- // catalog editor, while later rows remain uniquely named.
737
- "aria-label": e.row.index === 0 ? l("menu.group.option.price", {
738
- symbol: I(e.row.original.currency)
739
- }) : l("menu.group.a11y.row", {
740
- label: l("menu.group.option.price", {
741
- symbol: I(e.row.original.currency)
742
- }),
743
- index: e.row.index + 1
744
- }),
745
- "onUpdate:modelValue": (a) => p.value.setOptionPrice(
746
- e.row.original.id,
747
- a,
748
- e.row.original.target
749
- )
750
- }),
751
- ...e.row.original.editPricing.state === "allowed" ? [
752
- i("div", { class: "flex items-center gap-4" }, [
753
- i(
754
- v.FmButton,
755
- {
756
- variant: "plain",
757
- label: l(
758
- "menu.product.form.member_price.configure.title"
759
- ),
760
- "aria-label": l("menu.group.a11y.row", {
761
- label: l(
762
- "menu.product.form.member_price.configure.title"
763
- ),
764
- index: e.row.index + 1
765
- }),
766
- onClick: () => ll(e.row.original, "members")
767
- },
768
- {
769
- default: () => i(
770
- "span",
771
- { class: "underline line-clamp-2 break-all" },
772
- e.row.original.memberPriceCount ? l(
773
- "menu.product.form.member_price.configure.title_with_tier",
774
- { num: e.row.original.memberPriceCount }
775
- ) : l(
776
- "menu.product.form.member_price.configure.title"
777
- )
778
- )
779
- }
780
- ),
781
- i(hl, {
782
- prices: e.row.original.memberPrices
783
- })
784
- ])
785
- ] : []
786
- ])
787
- },
788
- {
789
- accessorKey: "orderFrom",
790
- size: 100,
791
- header: () => l("menu.common.labels.order_from"),
792
- enableSorting: !1,
793
- cell: (e) => {
794
- const a = e.row.original.edit, s = i(v.FmSelect, {
795
- modelValue: e.row.original.orderFrom,
796
- items: Xe.value,
797
- disabled: a.state !== "allowed",
798
- "aria-label": l("menu.group.a11y.row", {
799
- label: l("menu.common.labels.order_from"),
800
- index: e.row.index + 1
801
- }),
802
- "onUpdate:modelValue": (F) => {
803
- F && p.value.setOptionOrderFrom(
804
- e.row.original.id,
805
- F,
806
- e.row.original.target
807
- );
808
- }
809
- }), y = e.row.original.unavailableInCatalog;
810
- return !y || a.state !== "disabled" ? s : i("div", { class: "flex items-center gap-4" }, [
811
- s,
812
- i(
813
- v.FmTooltip,
814
- {
815
- content: f(a.reason),
816
- placement: "top",
817
- zIndex: 999
818
- },
819
- () => i(v.FmIcon, {
820
- name: y === "NOT_FOR_SALE" ? "block" : "link_off",
821
- size: "sm",
822
- color: "system-warning-400"
823
- })
824
- )
825
- ]);
826
- }
827
- },
828
- {
829
- id: "actions",
830
- size: 80,
831
- header: "",
832
- enableSorting: !1,
833
- meta: { cellClass: "" },
834
- cell: (e) => i("div", { class: "flex items-center justify-end" }, [
835
- ...e.row.original.editPricing.state === "allowed" ? [
836
- i(Cl, {
837
- configured: e.row.original.hasPriceTiers,
838
- label: l("menu.group.a11y.row", {
839
- label: l("menu.price_tier.price_tier_config"),
840
- index: e.row.index + 1
841
- }),
842
- onOpen: () => ll(e.row.original, "tiers")
843
- })
844
- ] : [],
845
- i(v.FmButton, {
846
- icon: "inventory_2",
847
- overwriteIconOutline: e.row.original.inventory.bindings.length ? "filled" : "outline",
848
- variant: "tertiary",
849
- textColor: "neutral-gray-400",
850
- disabled: e.row.original.edit.state !== "allowed",
851
- "aria-label": l("menu.group.a11y.row", {
852
- label: l("menu.inventory.title"),
853
- index: e.row.index + 1
854
- }),
855
- onClick: () => Tl(e.row.original)
856
- }),
857
- ...e.row.original.nestedGroupCount ? [
858
- i(
859
- v.FmBadge,
860
- {
861
- class: "bg-fm-color-primary text-fm-color-neutral-white !right-0 !top-0",
862
- value: e.row.original.nestedGroupCount
863
- },
864
- {
865
- default: () => i(v.FmButton, {
866
- "aria-label": l("menu.group.a11y.row", {
867
- label: l("menu.group.nested.title"),
868
- index: e.row.index + 1
869
- }),
870
- icon: "arrow_split",
871
- textColor: "neutral-gray-400",
872
- variant: "tertiary",
873
- disabled: e.row.original.edit.state !== "allowed",
874
- onClick: () => Bl(
875
- e.row.original.id,
876
- e.row.original.target
877
- )
878
- })
879
- }
880
- )
881
- ] : [
882
- i(v.FmButton, {
883
- "aria-label": l("menu.group.a11y.row", {
884
- label: l("menu.group.nested.title"),
885
- index: e.row.index + 1
886
- }),
887
- disabled: !0,
888
- icon: "arrow_split",
889
- textColor: "neutral-gray-400",
890
- variant: "tertiary"
891
- })
892
- ],
893
- i(v.FmButton, {
894
- "aria-label": l("menu.group.a11y.row", {
895
- label: l("menu.common.actions.delete"),
896
- index: e.row.index + 1
897
- }),
898
- icon: "delete",
899
- variant: "tertiary",
900
- onClick: () => p.value.removeOption(e.row.original.id)
901
- })
902
- ])
903
- }
904
- ]), zl = k(
905
- () => {
906
- var e;
907
- return (e = r.value) != null && e.options.length ? Me.value : Me.value.slice(0, 4);
908
- }
909
- );
910
- function ol(e) {
911
- De(), p.value.dispose(), xe.value = {}, p.value = g.sdk.group.editor(e), ie.value = p.value.get(), De = p.value.subscribe(
912
- (a) => ie.value = a
913
- );
914
- }
915
- const Be = k(() => {
916
- var e;
917
- return ((e = u.value) == null ? void 0 : e.showType) === !0;
918
- });
919
- function nl() {
920
- var e;
921
- if (((e = u.value) == null ? void 0 : e.create.state) === "allowed") {
922
- if (Be.value) {
923
- D.value = !0;
924
- return;
925
- }
926
- ol(), D.value = !0;
927
- }
928
- }
929
- function sl(e) {
930
- e.update.state === "allowed" && (ol(e.id), O.value = !0);
931
- }
932
- function Al(e) {
933
- ve.open({
934
- type: "success",
935
- title: l("menu.product.manager.action.saved", { name: e }),
936
- position: aa.BOTTOM
937
- });
938
- }
939
- function Ve() {
940
- te(), ee.value && Fe(), X.value && Le(), O.value = !1, D.value = !1, Q.value = !1;
941
- }
942
- function re() {
943
- var e;
944
- ze(), ze = () => {
945
- }, (e = K.value) == null || e.dispose(), K.value = null, Ie.value = !1, Z.value = !1;
946
- }
947
- function Dl(e) {
948
- p.value.setOptionLinks(e), xe.value = {}, Q.value = !1;
949
- }
950
- function Ll(e) {
951
- var a;
952
- (a = K.value) == null || a.setLinkedProducts(e), Z.value = !1;
953
- }
954
- function il(e) {
955
- re();
956
- const a = g.sdk.group.applyProduct(e.id);
957
- a && (K.value = a, N.value = a.get(), ze = a.subscribe(
958
- (s) => N.value = s
959
- ), Ie.value = !0);
960
- }
961
- async function Ml() {
962
- var a;
963
- (await z(
964
- () => K.value.submit(),
965
- {
966
- successMessage: l("menu.variant.form.saved", {
967
- name: ((a = L.value) == null ? void 0 : a.groupName) ?? ""
968
- }),
969
- showLoading: () => {
970
- var s;
971
- return ((s = L.value) == null ? void 0 : s.status) === "submitting";
972
- }
973
- }
974
- )).kind === "success" && re();
975
- }
976
- function Oe() {
977
- var e, a;
978
- se(), se = () => {
979
- }, (e = S.value) == null || e.discard(), (a = S.value) == null || a.dispose(), S.value = null, le.value = !1;
980
- }
981
- function te() {
982
- var e;
983
- Oe(), Ae(), Ae = () => {
984
- }, (e = fe.value) == null || e.dispose(), fe.value = null, be.value = !1;
985
- }
986
- function Bl(e, a) {
987
- te();
988
- const s = p.value.nestedOverrides(e, a);
989
- s && (fe.value = s, ye.value = s.get(), Ae = s.subscribe((y) => ye.value = y), be.value = !0);
990
- }
991
- function Gl(e) {
992
- var s;
993
- Oe();
994
- const a = (s = fe.value) == null ? void 0 : s.editor(e);
995
- a && (S.value = a, _e.value = a.get(), se = a.subscribe(
996
- (y) => _e.value = y
997
- ), le.value = !0);
998
- }
999
- function Rl() {
1000
- var a;
1001
- const e = (a = S.value) == null ? void 0 : a.submit();
1002
- (e == null ? void 0 : e.kind) === "success" && jl();
1003
- }
1004
- function jl() {
1005
- var e;
1006
- se(), se = () => {
1007
- }, (e = S.value) == null || e.dispose(), S.value = null, le.value = !1;
1008
- }
1009
- async function rl() {
1010
- var y, F, B, Se;
1011
- const e = ((y = r.value) == null ? void 0 : y.name) ?? "", a = (F = u.value) != null && F.scope.schedulerId ? u.value.scope.schedulerLabel ?? e : g.catalogPage && (((B = u.value) == null ? void 0 : B.scope.catalogLabel) ?? g.heading) || e;
1012
- (await z(
1013
- () => ae.submit(() => p.value.submit()),
1014
- {
1015
- // A catalog's Group editor still writes the default-menu group, but the
1016
- // legacy shell attributes the completed action to the active catalog.
1017
- successMessage: g.catalogPage || (Se = u.value) != null && Se.scope.schedulerId ? l("menu.catalog.saved", { name: a }) : l("menu.variant.form.saved", { name: a }),
1018
- // submit() publishes `submitting` synchronously only when it will perform
1019
- // a write. Local required-name rejection must not flash a loading toast;
1020
- // the approved required-field baseline contains only the field issue.
1021
- showLoading: () => {
1022
- var Pe;
1023
- return ((Pe = r.value) == null ? void 0 : Pe.status) === "submitting";
1024
- }
1025
- }
1026
- )).kind === "success" && Ve();
1027
- }
1028
- function Kl(e) {
1029
- e.duplicate.state === "allowed" && C.open({
1030
- title: l("menu.group.actions.duplicate.title"),
1031
- message: l("menu.group.actions.duplicate.message", { name: e.name }),
1032
- primaryActions: {
1033
- text: l("menu.common.actions.yes"),
1034
- close: !0,
1035
- variant: fl.Primary
1036
- },
1037
- secondaryActions: {
1038
- text: l("menu.common.actions.cancel"),
1039
- close: !0
1040
- }
1041
- }).onPrimary(async () => {
1042
- await z(() => g.sdk.group.duplicate(e.id), {
1043
- // Legacy names the SOURCE group here, not the clone: `duplicateGroup`
1044
- // passes `res.group.name` to `updateMenu`, and only `req.data.name`
1045
- // carries the ` clone` suffix (portal manager/menu/group.ts:365 @
1046
- // 7dfeb122). Re-observed against the real portal on 2026-08-19 — the
1047
- // toast reads "Set saved" while the created row reads "Set clone" —
1048
- // and the baseline was refreshed with the user's approval after having
1049
- // frozen the row's name as the toast text.
1050
- //
1051
- // `row.name` is the row the user acted on, so this is not the domain
1052
- // rule the SDK owns; the clone's own name still comes back on the ref
1053
- // for any caller that needs the created entity.
1054
- successMessage: l("menu.variant.form.saved", { name: e.name })
1055
- });
1056
- });
1057
- }
1058
- function Yl(e) {
1059
- e.remove.state === "allowed" && C.open({
1060
- title: l("menu.group.dialogs.delete.title"),
1061
- // Mirrors the legacy dialog's structure rather than composing a
1062
- // sentence here: message, then — only when something is linked — the
1063
- // warning heading and the affected names as a list
1064
- // (`portal .../GroupManager/DeleteGroupDialog.vue` @ `7dfeb122`). Each
1065
- // t() returns a complete string, so nothing is interpolated or
1066
- // assembled by a template expression (ADR-0003 §3). The names are what
1067
- // the frozen `group/delete/linked-confirmation` text ends in ("… will
1068
- // be unlinked: Hot Pot"); concatenating the two keys instead left the
1069
- // sentence on a dangling colon.
1070
- //
1071
- // These are the APPLIED items — the menu items referencing this group,
1072
- // which the delete unlinks — not the group's own option products. The
1073
- // frozen text names one item for "Add on", a group holding three
1074
- // options, so the two are not interchangeable.
1075
- contentComponent: i("div", { class: "space-y-4" }, [
1076
- i("p", l("menu.group.dialogs.delete.message", { name: e.name })),
1077
- ...e.appliedItemNames.length ? [
1078
- i("div", [
1079
- i(
1080
- "p",
1081
- { class: "text-fm-color-typo-secondary mb-2" },
1082
- l("menu.group.dialogs.delete.unlink_warning", {
1083
- count: e.appliedItemNames.length
1084
- })
1085
- ),
1086
- // FmList/FmListItem, the ADR-0003 §1 component of record.
1087
- // An earlier revision of this slice hand-rolled a
1088
- // `list-disc` <ul> because legacy's hollow disc differs from
1089
- // FmListItem's filled `fiber_manual_record` prepend and the
1090
- // 431px cost failed `group/v3-delete/linked-confirmation`.
1091
- // ADR-0003 §5 refuses that reasoning outright — a diff that
1092
- // cannot be closed while complying with §§1-4 is a finding to
1093
- // report, never a licence to hand-roll — and the raw list
1094
- // also falsified the premise of the V4 case's own approved
1095
- // region, which reads "the list is now implemented with the
1096
- // required design-system FmList/FmListItem primitives".
1097
- // Restored to FmList; the marker variance against legacy's
1098
- // hollow disc is an approved difference on this dialog.
1099
- i(
1100
- v.FmList,
1101
- { class: "text-fm-color-typo-secondary ml-4" },
1102
- {
1103
- default: () => e.appliedItemNames.map(
1104
- (a) => i(
1105
- v.FmListItem,
1106
- {
1107
- key: a,
1108
- class: "!p-0 !gap-4",
1109
- clickable: !1
1110
- },
1111
- {
1112
- default: () => i(
1113
- "span",
1114
- {
1115
- class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
1116
- },
1117
- a
1118
- ),
1119
- prepend: () => i(v.FmIcon, {
1120
- color: "neutral-gray-400",
1121
- name: "fiber_manual_record",
1122
- size: "sm"
1123
- })
1124
- }
1125
- )
1126
- )
1127
- }
1128
- )
1129
- ])
1130
- ] : []
1131
- ]),
1132
- primaryActions: {
1133
- text: l("menu.common.actions.delete"),
1134
- close: !0,
1135
- variant: fl.Destructive
1136
- },
1137
- secondaryActions: {
1138
- text: l("menu.common.actions.cancel"),
1139
- close: !0
1140
- }
1141
- }).onPrimary(async () => {
1142
- await z(() => g.sdk.group.remove(e.id), {
1143
- // "saved", not "removed": legacy's `deleteGroup` calls
1144
- // `updateMenu(req, group.name)` without the `isDelete` flag, and
1145
- // `updateMenu` derives `action = isDelete ? "removed" : "saved"`
1146
- // (`portal helper/menu.ts:56-58`) — byte-identical at the V4 capture
1147
- // commit `7dfeb122` and the V3 pin `9dd9aa5`, with exactly one
1148
- // `deleteGroup` call path in the app. Both V3 frozen groups record
1149
- // `<name> saved` and the frozen golden
1150
- // `group/v3-delete/success` shows it. The V4 baseline had transcribed
1151
- // it as "Add on removed" with no image behind it, and this page was
1152
- // built to match; corrected on the owner's decision 2026-09-08, so
1153
- // `group/delete`'s parity is owed a re-run.
1154
- successMessage: l("menu.variant.form.saved", { name: e.name })
1155
- });
1156
- });
1157
- }
1158
- const $e = U([]);
1159
- Ye(
1160
- () => {
1161
- var e;
1162
- return (e = u.value) == null ? void 0 : e.rows;
1163
- },
1164
- (e) => {
1165
- e && ($e.value = [...e]);
1166
- },
1167
- { immediate: !0 }
1168
- );
1169
- const ql = k(
1170
- () => {
1171
- var e;
1172
- return (
1173
- // `showReorderHandle`, not `reorder.state`: the affordance's existence and
1174
- // the write's acceptance are two different questions, and the SDK answers
1175
- // both. Binding the handle to `reorder` deleted FmTable's 60px drag column
1176
- // whenever a filter narrowed the list — and again on every in-flight write
1177
- // — which moved every other column 110px; `group/list/search-ege` shipped
1178
- // that shift, and the V3 list's first legacy frame reported 4768 differing
1179
- // pixels. Reading `reorder.reason.code` to tell those refusals apart put
1180
- // the same rule in two places coupled by a message string; the rule is
1181
- // the SDK's.
1182
- (e = u.value) != null && e.showReorderHandle ? () => {
1183
- var a;
1184
- return ((a = u.value) == null ? void 0 : a.reorder.state) === "allowed";
1185
- } : !1
1186
- );
1187
- }
1188
- );
1189
- async function Hl(e) {
1190
- var y;
1191
- const a = $e.value;
1192
- (await z(
1193
- () => g.sdk.group.reorder(e.map((F) => F.id)),
1194
- {
1195
- successMessage: l("menu.group.reorder.success")
1196
- }
1197
- )).kind !== "success" && ($e.value = [...((y = u.value) == null ? void 0 : y.rows) ?? a]);
1198
- }
1199
- const Ql = k(() => {
1200
- var e;
1201
- return [
1202
- {
1203
- accessorKey: "name",
1204
- header: () => l("menu.group.list.columns.name"),
1205
- enableSorting: !1
1206
- },
1207
- {
1208
- accessorKey: "optionProducts",
1209
- header: () => l("menu.group.list.columns.products"),
1210
- enableSorting: !1,
1211
- // Legacy's own cell (`portal views/Catalog/Edit/Group.vue:427-437`): one
1212
- // entry per distinct item, suffixed `(N variant)` when that item
1213
- // contributes more than one variant row, and capped at five with an
1214
- // `& N more` tail. The SDK collapses and counts; the counted nouns are
1215
- // localized here, because this is the layer with an i18n instance
1216
- // (ADR-0003 §3) — nothing is assembled from a template expression.
1217
- cell: (a) => {
1218
- const s = a.row.original.optionProducts.map(
1219
- (F) => F.variantCount > 1 ? l("menu.group.list.product_variants", {
1220
- name: F.name,
1221
- variants: l("menu.group.list.variants", {
1222
- count: F.variantCount
1223
- })
1224
- }) : F.name
1225
- ), y = s.slice(0, 5).reduce(
1226
- (F, B) => F ? l("menu.group.list.join_products", { list: F, item: B }) : B,
1227
- ""
1228
- );
1229
- return s.length > 5 ? l("menu.group.list.products_more", {
1230
- products: y,
1231
- more: l("menu.group.list.more_items", {
1232
- count: s.length - 5
1233
- })
1234
- }) : y;
1235
- }
1236
- },
1237
- {
1238
- // V3 only. Legacy declares this column unconditionally and hides it
1239
- // through `columnVisibility.type = rule.group.type`
1240
- // (`portal views/Catalog/Edit/Group.vue:505-509`), which is the version
1241
- // flag, so a V4 business renders the same table without it. It sits
1242
- // between "Products" and "Applied products" because that is legacy's
1243
- // declaration order (`:406` name, `:424` items, `:441` type, `:458`
1244
- // tagging, `:473` itemsLinked) and carries legacy's own 80px width. A
1245
- // type that maps to nothing renders "-" (`:451`).
1246
- id: "type",
1247
- header: () => l("menu.group.list.columns.type"),
1248
- enableSorting: !1,
1249
- meta: { width: "80px" },
1250
- cell: (a) => {
1251
- const s = wl[a.row.original.type];
1252
- return l(s || "menu.common.labels.unknown");
1253
- }
1254
- },
1255
- ...(e = u.value) != null && e.attributeColumnVisible ? [
1256
- {
1257
- id: "tagging",
1258
- accessorKey: "attributeTags",
1259
- header: () => l("menu.product.table.columns.tagging"),
1260
- enableSorting: !1,
1261
- size: 140,
1262
- cell: (a) => i(ua, {
1263
- kind: "tagging",
1264
- chips: a.row.original.attributeTags
1265
- })
1266
- }
1267
- ] : [],
1268
- {
1269
- // Legacy's third column, and the one this table shipped without: the
1270
- // frozen visual baseline (human-approved-legacy-chrome) carries
1271
- // "Applied products" with an "N items linked" cell per row, and both keys
1272
- // were already in every locale — only the column def was missing, which
1273
- // is why the list diffed at 0.56% with the Products column wrapping into
1274
- // the space this should occupy.
1275
- //
1276
- // Legacy does not pluralise ("1 items linked"), and the count goes through
1277
- // the i18n layer rather than being assembled here (ADR-0003 §3).
1278
- id: "appliedProducts",
1279
- header: () => l("menu.group.list.columns.applied_products"),
1280
- enableSorting: !1,
1281
- cell: (a) => i(
1282
- v.FmButton,
1283
- {
1284
- // This is the design-system button equivalent of legacy's clickable
1285
- // dashed text trigger. Its compact neutral treatment preserves the
1286
- // table-cell geometry while retaining native button semantics.
1287
- class: "w-fit !min-h-0 !px-0 !py-0 !font-normal border-b border-dashed !border-fm-color-neutral-gray-300 hover:!border-fm-color-neutral-gray-400",
1288
- borderColor: "neutral-gray-300",
1289
- label: l("menu.group.list.items_linked", {
1290
- count: a.row.original.appliedItemNames.length
1291
- }),
1292
- // Keep the legacy rendered count while adding the row name to the
1293
- // accessible control name so equal counts remain distinguishable.
1294
- "aria-label": l("menu.common.labels.a11y_labelled_name", {
1295
- label: l("menu.group.list.items_linked", {
1296
- count: a.row.original.appliedItemNames.length
1297
- }),
1298
- name: a.row.original.name
1299
- }),
1300
- textColor: "typo-primary",
1301
- variant: "plain",
1302
- onClick: R(
1303
- () => il(a.row.original),
1304
- ["stop", "prevent"]
1305
- )
1306
- },
1307
- {
1308
- // FmButton's default label is body-lg 600. Legacy's compact table
1309
- // trigger is body-md 400, so use its supported content slot while
1310
- // retaining the library's button and accessibility behaviour.
1311
- default: () => i(
1312
- "span",
1313
- { class: "fm-typo-en-body-md-400" },
1314
- l("menu.group.list.items_linked", {
1315
- count: a.row.original.appliedItemNames.length
1316
- })
1317
- )
1318
- }
1319
- )
1320
- },
1321
- {
1322
- // Keep the legacy row-action shell: one overflow trigger containing the
1323
- // approved intents, including the now-observed apply-product path.
1324
- id: "actions",
1325
- header: "",
1326
- meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
1327
- cell: (a) => {
1328
- const s = a.row.original;
1329
- return i(
1330
- "div",
1331
- { class: "flex justify-end" },
1332
- i(
1333
- v.FmMenu,
1334
- {
1335
- closeOnClick: !0,
1336
- placement: "bottom-end",
1337
- stopClickPropagation: !0,
1338
- onClick: R(() => {
1339
- }, ["stop"])
1340
- },
1341
- {
1342
- "menu-button": () => i(v.FmButton, {
1343
- type: "button",
1344
- variant: "tertiary",
1345
- icon: "more_vert",
1346
- "aria-label": l("menu.common.labels.a11y_labelled_name", {
1347
- label: l("menu.group.a11y.actions"),
1348
- name: s.name
1349
- })
1350
- }),
1351
- default: () => [
1352
- i(v.FmMenuItem, {
1353
- label: l("menu.common.actions.edit"),
1354
- disabled: s.update.state !== "allowed",
1355
- onClick: R(
1356
- () => sl(s),
1357
- ["stop", "prevent"]
1358
- )
1359
- }),
1360
- i(v.FmMenuItem, {
1361
- label: l("menu.group.actions.apply_product"),
1362
- onClick: R(
1363
- () => il(s),
1364
- ["stop", "prevent"]
1365
- )
1366
- }),
1367
- i(v.FmMenuItem, {
1368
- label: l("menu.group.actions.duplicate_action"),
1369
- disabled: s.duplicate.state !== "allowed",
1370
- onClick: R(
1371
- () => Kl(s),
1372
- ["stop", "prevent"]
1373
- )
1374
- }),
1375
- i(v.FmMenuItem, {
1376
- label: l("menu.common.actions.delete"),
1377
- disabled: s.remove.state !== "allowed",
1378
- onClick: R(
1379
- () => Yl(s),
1380
- ["stop", "prevent"]
1381
- )
1382
- })
1383
- ]
1384
- }
1385
- )
1386
- );
1387
- }
1388
- }
1389
- ];
1390
- });
1391
- return Wl(() => {
1392
- re(), he(), Ce(), ee.value && Fe(), X.value && Le(), te(), De(), p.value.dispose();
1393
- }), (e, a) => {
1394
- const s = V("FmButton"), y = V("FmCircularProgress"), F = V("FmChip"), B = V("FmMenuItem"), Se = V("FmMenu"), Pe = V("FmSearch"), ue = V("FmTable"), ul = V("FmTooltip"), oe = V("FmStepperField"), de = V("FmFormGroup"), Ge = V("FmSwitch"), me = V("FmSideSheet"), Zl = V("FmHelperText");
1395
- return c(), h(ra, {
1396
- heading: e.heading || t(l)("menu.group.title")
1397
- }, {
1398
- "prepend-heading": m(() => [
1399
- Te(e.$slots, "prepend-heading")
1400
- ]),
1401
- "append-heading": m(() => {
1402
- var ce;
1403
- return [
1404
- e.catalogPage ? x("", !0) : (c(), b("div", ja, [
1405
- d("div", Ka, [
1406
- o(ia, {
1407
- value: t(T)(((ce = u.value) == null ? void 0 : ce.filteredCount) ?? 0)
1408
- }, null, 8, ["value"])
1409
- ]),
1410
- u.value && u.value.filteredCount > 0 ? (c(), h(s, {
1411
- key: 0,
1412
- disabled: u.value.create.state !== "allowed",
1413
- label: t(l)("menu.group.actions.add"),
1414
- "prepend-icon": "add",
1415
- onClick: nl
1416
- }, null, 8, ["disabled", "label"])) : x("", !0)
1417
- ])),
1418
- e.catalogPage ? (c(), b("div", Ya, [
1419
- Te(e.$slots, "append-heading")
1420
- ])) : Te(e.$slots, "append-heading", { key: 2 })
1421
- ];
1422
- }),
1423
- default: m(() => {
1424
- var ce, dl, ml, cl;
1425
- return [
1426
- Te(e.$slots, "navigation"),
1427
- t(A).status === "error" ? (c(), b("p", qa, w(t(f)(t(A).error.message)), 1)) : t(A).status === "unavailable" ? (c(), b("div", Ha, [
1428
- o(t(yl), {
1429
- title: t(l)("menu.group.empty.title"),
1430
- subtitle: t(l)("menu.group.empty.subtitle")
1431
- }, null, 8, ["title", "subtitle"])
1432
- ])) : t(A).status === "loading" ? (c(), h(y, { key: 2 })) : u.value && u.value.totalCount === 0 ? (c(), h(t(yl), {
1433
- key: 3,
1434
- action: u.value.create.state === "allowed" ? { text: t(l)("menu.group.actions.add"), callback: nl } : void 0,
1435
- title: t(l)("menu.group.empty.title"),
1436
- subtitle: t(l)("menu.group.empty.subtitle")
1437
- }, null, 8, ["action", "title", "subtitle"])) : u.value ? (c(), b(j, { key: 4 }, [
1438
- d("div", Qa, [
1439
- u.value.scope.schedulerSelector.state === "allowed" ? (c(), h(da, {
1440
- key: 0,
1441
- options: ne.value,
1442
- "model-value": u.value.scope.schedulerId,
1443
- title: t(l)("menu.common.labels.scheduler_title", {
1444
- label: u.value.scope.schedulerLabel ?? t(l)("menu.common.labels.summary")
1445
- }),
1446
- "onUpdate:modelValue": a[0] || (a[0] = (n) => e.sdk.item.selectScope({
1447
- catalogId: u.value.scope.catalogId,
1448
- schedulerId: n
1449
- }))
1450
- }, null, 8, ["options", "model-value", "title"])) : u.value.showType ? x("", !0) : (c(), b("div", Za)),
1451
- u.value.showType ? (c(), h(Se, {
1452
- key: 2,
1453
- "close-on-click": ""
1454
- }, {
1455
- "menu-button": m(() => [
1456
- o(F, {
1457
- class: "text-fm-color-typo-secondary",
1458
- label: t(l)("menu.group.type.title", {
1459
- type: u.value.typeFilter ? t(l)(t(wl)[u.value.typeFilter]) : t(l)("menu.common.labels.all")
1460
- }),
1461
- "right-icon": "keyboard_arrow_down"
1462
- }, null, 8, ["label"])
1463
- ]),
1464
- default: m(() => [
1465
- o(B, {
1466
- class: "px-16 py-8",
1467
- label: t(l)("menu.group.type.all"),
1468
- onClick: a[1] || (a[1] = (n) => g.sdk.group.setTypeFilter(null))
1469
- }, null, 8, ["label"]),
1470
- (c(), b(j, null, Y(Ee, (n) => o(B, {
1471
- key: n,
1472
- class: "px-16 py-8",
1473
- label: t(l)(H[n]),
1474
- onClick: (_) => g.sdk.group.setTypeFilter(n)
1475
- }, null, 8, ["label", "onClick"])), 64))
1476
- ]),
1477
- _: 1
1478
- })) : x("", !0),
1479
- d("div", Ja, [
1480
- o(Pe, {
1481
- autofocus: "",
1482
- "model-value": u.value.query,
1483
- placeholder: t(l)("menu.group.search.placeholder"),
1484
- "aria-label": t(l)("menu.common.labels.search_groups"),
1485
- "onUpdate:modelValue": g.sdk.group.search
1486
- }, null, 8, ["model-value", "placeholder", "aria-label", "onUpdate:modelValue"])
1487
- ])
1488
- ]),
1489
- Xl(o(ue, {
1490
- "column-defs": Ql.value,
1491
- "column-visibility": { type: u.value.showType },
1492
- draggable: ql.value,
1493
- "page-size": u.value.rows.length,
1494
- "row-data": $e.value,
1495
- "shrink-at": !1,
1496
- "hide-footer": "",
1497
- "pin-header-row": "",
1498
- onDndChanged: Hl,
1499
- onRowClick: a[2] || (a[2] = (n) => sl(n.original))
1500
- }, null, 8, ["column-defs", "column-visibility", "draggable", "page-size", "row-data"]), [
1501
- [t(ga), t(l)("menu.group.list.columns.name")]
1502
- ])
1503
- ], 64)) : x("", !0),
1504
- ((ce = r.value) == null ? void 0 : ce.mode) === "update" ? (c(), h(me, {
1505
- key: 5,
1506
- modelValue: O.value,
1507
- "onUpdate:modelValue": a[8] || (a[8] = (n) => O.value = n),
1508
- "is-container": t(v).FmForm,
1509
- "is-container-props": { onValidationSuccess: rl },
1510
- "max-width": 800
1511
- }, {
1512
- "side-sheet-header": m(() => [
1513
- d("p", Wa, w(t(l)("menu.group.update")), 1)
1514
- ]),
1515
- "side-sheet-footer": m(() => [
1516
- d("div", ot, [
1517
- o(s, {
1518
- disabled: r.value.submit.state !== "allowed",
1519
- label: t(l)("menu.common.actions.update"),
1520
- size: "lg",
1521
- type: "submit"
1522
- }, null, 8, ["disabled", "label"]),
1523
- o(s, {
1524
- label: t(l)("menu.common.actions.cancel"),
1525
- size: "lg",
1526
- variant: "tertiary",
1527
- onClick: Ve
1528
- }, null, 8, ["label"])
1529
- ])
1530
- ]),
1531
- default: m(() => [
1532
- d("div", Xa, [
1533
- o(Re, null, {
1534
- default: m(() => {
1535
- var n;
1536
- return [
1537
- o(q, gl({
1538
- autofocus: "",
1539
- "error-messages": we.value ? [t(f)(we.value)] : [],
1540
- label: t(l)("menu.common.labels.group_name"),
1541
- "model-value": r.value.name
1542
- }, t(ae).field("name", p.value.setName)), {
1543
- append: m(() => [
1544
- o(ul, {
1545
- placement: "top",
1546
- variant: "plain",
1547
- "z-index": 999
1548
- }, {
1549
- default: m(() => {
1550
- var _;
1551
- return [
1552
- o(s, {
1553
- "aria-label": t(l)("menu.group.translation.translate_name"),
1554
- disabled: ((_ = r.value.translation) == null ? void 0 : _.state) !== "allowed",
1555
- icon: "g_translate",
1556
- variant: "tertiary",
1557
- onClick: tl
1558
- }, null, 8, ["aria-label", "disabled"])
1559
- ];
1560
- }),
1561
- _: 1
1562
- })
1563
- ]),
1564
- _: 1
1565
- }, 16, ["error-messages", "label", "model-value"]),
1566
- o(de, {
1567
- "model-value": `${r.value.min} ${r.value.max}`
1568
- }, {
1569
- default: m(() => [
1570
- o(Ke, null, {
1571
- default: m(() => [
1572
- o(oe, {
1573
- class: "flex-1",
1574
- label: t(l)("menu.common.labels.min_select"),
1575
- min: 0,
1576
- "model-value": r.value.min,
1577
- "onUpdate:modelValue": p.value.setMin
1578
- }, null, 8, ["label", "model-value", "onUpdate:modelValue"]),
1579
- o(oe, {
1580
- class: "flex-1",
1581
- label: t(l)("menu.common.labels.max_select"),
1582
- min: r.value.min,
1583
- "model-value": r.value.max,
1584
- "onUpdate:modelValue": p.value.setMax
1585
- }, null, 8, ["label", "min", "model-value", "onUpdate:modelValue"])
1586
- ]),
1587
- _: 1
1588
- })
1589
- ]),
1590
- _: 1
1591
- }, 8, ["model-value"]),
1592
- o(je, {
1593
- label: t(l)("menu.common.labels.configuration")
1594
- }, {
1595
- default: m(() => [
1596
- o(Ge, {
1597
- label: t(l)("menu.common.labels.stackable"),
1598
- "label-placement": "right",
1599
- "model-value": r.value.stackable,
1600
- sublabel: t(l)("menu.common.labels.stackable_sublabel"),
1601
- "onUpdate:modelValue": p.value.setStackable
1602
- }, null, 8, ["label", "model-value", "sublabel", "onUpdate:modelValue"])
1603
- ]),
1604
- _: 1
1605
- }, 8, ["label"]),
1606
- (n = r.value.tagging) != null && n.visible ? (c(), h(pe, {
1607
- key: 0,
1608
- "sub-title": t(l)("menu.group.form.tagging.subtitle"),
1609
- title: t(l)("menu.group.form.tagging.title")
1610
- }, {
1611
- default: m(() => [
1612
- o(t(bl), {
1613
- entity: "group",
1614
- "model-value": r.value.customAttributes ?? {},
1615
- "value-options": el(r.value.attributeValueOptions),
1616
- "onUpdate:modelValue": a[3] || (a[3] = (_) => p.value.setCustomAttributes(_ ?? null))
1617
- }, null, 8, ["model-value", "value-options"])
1618
- ]),
1619
- _: 1
1620
- }, 8, ["sub-title", "title"])) : x("", !0)
1621
- ];
1622
- }),
1623
- _: 1
1624
- }),
1625
- o(de, {
1626
- tag: "div",
1627
- "helper-text": t(l)("menu.common.validation.default_items_tip", {
1628
- count: r.value.options.filter((n) => n.isDefault).length,
1629
- max: r.value.max
1630
- }),
1631
- "model-value": r.value.options
1632
- }, {
1633
- default: m(() => [
1634
- o(pe, {
1635
- class: "mb-8",
1636
- "sub-title": r.value.linkOptions.state !== "hidden" ? t(l)("menu.group.option.subtitle") : "",
1637
- title: t(l)("menu.group.option.title")
1638
- }, {
1639
- "append-title": m(() => [
1640
- r.value.linkOptions.state !== "hidden" ? (c(), b("div", et, [
1641
- o(s, {
1642
- disabled: r.value.linkOptions.state !== "allowed",
1643
- "border-color": "primary",
1644
- label: t(l)("menu.group.option.link_products"),
1645
- "prepend-icon": "link",
1646
- "text-color": "primary",
1647
- variant: "secondary",
1648
- onClick: a[4] || (a[4] = (n) => Q.value = !0)
1649
- }, null, 8, ["disabled", "label"])
1650
- ])) : r.value.addOption.state !== "hidden" ? (c(), b("div", lt, [
1651
- o(s, {
1652
- disabled: r.value.addOption.state !== "allowed",
1653
- "border-color": "primary",
1654
- label: t(l)("menu.group.option.add_option"),
1655
- "prepend-icon": "add",
1656
- "text-color": "primary",
1657
- variant: "secondary",
1658
- onClick: a[5] || (a[5] = (n) => p.value.addOption())
1659
- }, null, 8, ["disabled", "label"])
1660
- ])) : x("", !0)
1661
- ]),
1662
- default: m(() => [
1663
- d("div", at, [
1664
- d("div", tt, [
1665
- o(ue, {
1666
- "column-defs": Me.value,
1667
- draggable: Ze.value.length > 1,
1668
- "expanded-state": xe.value,
1669
- "get-row-can-expand": (n) => n.original.variants.length > 0,
1670
- "get-row-id": (n) => n.target === "base" ? n.id : `${n.id}:${n.target}`,
1671
- "page-size": Math.max(r.value.options.length, 1),
1672
- "row-data": Ze.value,
1673
- "shrink-at": !1,
1674
- "hide-footer": "",
1675
- "onUpdate:expandedState": a[6] || (a[6] = (n) => xe.value = n),
1676
- onDndChanged: a[7] || (a[7] = (n) => p.value.reorderOptions(
1677
- n.map((_) => _.id)
1678
- ))
1679
- }, null, 8, ["column-defs", "draggable", "expanded-state", "get-row-can-expand", "get-row-id", "page-size", "row-data"])
1680
- ])
1681
- ])
1682
- ]),
1683
- _: 1
1684
- }, 8, ["sub-title", "title"])
1685
- ]),
1686
- _: 1
1687
- }, 8, ["helper-text", "model-value"]),
1688
- (c(!0), b(j, null, Y(Qe.value, (n, _) => (c(), b("p", {
1689
- key: `${n.code}-${_}`,
1690
- class: "fm-typo-en-body-sm-400 text-fm-color-status-error",
1691
- role: "alert"
1692
- }, w(t(f)(n)), 1))), 128))
1693
- ])
1694
- ]),
1695
- _: 1
1696
- }, 8, ["modelValue", "is-container", "is-container-props"])) : x("", !0),
1697
- o(me, {
1698
- "model-value": Ie.value,
1699
- "is-container": t(v).FmForm,
1700
- "is-container-props": { onValidationSuccess: Ml },
1701
- "max-width": 560,
1702
- "onUpdate:modelValue": a[12] || (a[12] = (n) => !n && re())
1703
- }, {
1704
- "side-sheet-footer": m(() => {
1705
- var n;
1706
- return [
1707
- d("div", it, [
1708
- o(s, {
1709
- disabled: ((n = L.value) == null ? void 0 : n.submit.state) !== "allowed",
1710
- label: t(l)("menu.common.actions.save"),
1711
- size: "lg",
1712
- type: "submit"
1713
- }, null, 8, ["disabled", "label"]),
1714
- o(s, {
1715
- label: t(l)("menu.common.actions.cancel"),
1716
- size: "lg",
1717
- variant: "tertiary",
1718
- onClick: re
1719
- }, null, 8, ["label"])
1720
- ])
1721
- ];
1722
- }),
1723
- default: m(() => {
1724
- var n, _, E;
1725
- return [
1726
- N.value.status === "error" ? (c(), b("p", nt, w(t(f)(N.value.error.message)), 1)) : N.value.status === "unavailable" ? (c(), b("p", st, w(t(f)(N.value.reason)), 1)) : N.value.status === "loading" ? (c(), h(y, { key: 2 })) : L.value ? (c(), h(ta, {
1727
- key: 3,
1728
- "applied-count": ((n = L.value) == null ? void 0 : n.appliedProductCount) ?? 0,
1729
- groups: ((_ = L.value) == null ? void 0 : _.linkedGroups) ?? [],
1730
- query: ((E = L.value) == null ? void 0 : E.linkedProductQuery) ?? "",
1731
- title: t(l)("menu.group.option.title"),
1732
- onUnapply: a[10] || (a[10] = (P) => {
1733
- var G;
1734
- return (G = K.value) == null ? void 0 : G.unlinkProduct(P);
1735
- }),
1736
- "onUpdate:query": a[11] || (a[11] = (P) => {
1737
- var G;
1738
- return (G = K.value) == null ? void 0 : G.setLinkedProductQuery(P);
1739
- })
1740
- }, {
1741
- "append-title": m(() => [
1742
- o(s, {
1743
- label: t(l)("menu.group.actions.apply_product"),
1744
- "prepend-icon": "link",
1745
- variant: "secondary",
1746
- onClick: a[9] || (a[9] = (P) => Z.value = !0)
1747
- }, null, 8, ["label"])
1748
- ]),
1749
- _: 1
1750
- }, 8, ["applied-count", "groups", "query", "title"])) : x("", !0)
1751
- ];
1752
- }),
1753
- _: 1
1754
- }, 8, ["model-value", "is-container", "is-container-props"]),
1755
- N.value.status === "ready" ? (c(), h(xl, {
1756
- key: 6,
1757
- modelValue: Z.value,
1758
- "onUpdate:modelValue": a[13] || (a[13] = (n) => Z.value = n),
1759
- catalogue: He.value,
1760
- "selected-product-ids": ((dl = L.value) == null ? void 0 : dl.linkedProductIds) ?? [],
1761
- title: t(l)("menu.common.actions.link_product"),
1762
- onSubmit: Ll
1763
- }, null, 8, ["modelValue", "catalogue", "selected-product-ids", "title"])) : x("", !0),
1764
- o(xl, {
1765
- modelValue: Q.value,
1766
- "onUpdate:modelValue": a[14] || (a[14] = (n) => Q.value = n),
1767
- catalogue: He.value,
1768
- "selected-products": ((ml = r.value) == null ? void 0 : ml.optionLinks) ?? [],
1769
- "select-variant": !0,
1770
- title: t(l)("menu.group.option.link_products"),
1771
- onSubmitLinks: Dl
1772
- }, null, 8, ["modelValue", "catalogue", "selected-products", "title"]),
1773
- ee.value && r.value ? (c(), h(ma, {
1774
- key: 7,
1775
- dirty: r.value.translationDirty,
1776
- "model-value": !0,
1777
- name: r.value.name,
1778
- "name-locale": r.value.nameLocale,
1779
- "name-section-label": t(l)("menu.common.translation.name_section", {
1780
- entity: t(l)("menu.group.title")
1781
- }),
1782
- "supported-locales": r.value.supportedLocales,
1783
- title: t(l)("menu.group.translation.title"),
1784
- onDiscard: Fe,
1785
- onSave: El,
1786
- "onUpdate:modelValue": a[15] || (a[15] = (n) => !n && Fe()),
1787
- "onUpdate:name": a[16] || (a[16] = (n) => p.value.setName(n)),
1788
- "onUpdate:nameLocale": a[17] || (a[17] = (n) => p.value.setNameLocale(n))
1789
- }, null, 8, ["dirty", "name", "name-locale", "name-section-label", "supported-locales", "title"])) : x("", !0),
1790
- r.value ? (c(), h(Ra, {
1791
- key: 8,
1792
- "model-value": X.value,
1793
- session: p.value,
1794
- view: r.value,
1795
- onDiscard: Le,
1796
- onSave: Il
1797
- }, null, 8, ["model-value", "session", "view"])) : x("", !0),
1798
- J.value ? (c(), h(na, {
1799
- key: 9,
1800
- session: J.value,
1801
- "on-create-price-group": Pl,
1802
- onClose: he
1803
- }, null, 8, ["session"])) : x("", !0),
1804
- W.value ? (c(), h(t(Ue), {
1805
- key: 10,
1806
- "product-name": ge.value,
1807
- session: W.value,
1808
- onClose: Ce
1809
- }, null, 8, ["product-name", "session"])) : x("", !0),
1810
- o(me, {
1811
- "model-value": be.value,
1812
- "close-button": !1,
1813
- "max-width": 800,
1814
- "z-index": 100,
1815
- "dismiss-away": !le.value,
1816
- "onUpdate:modelValue": a[18] || (a[18] = (n) => !n && te())
1817
- }, {
1818
- "side-sheet-header": m(() => [
1819
- o(s, {
1820
- "aria-label": t(l)("menu.common.actions.back"),
1821
- icon: "arrow_back",
1822
- variant: "tertiary",
1823
- onClick: te
1824
- }, null, 8, ["aria-label"]),
1825
- be.value ? (c(), b("span", rt)) : x("", !0),
1826
- d("p", ut, w(t(l)("menu.group.nested.title")), 1)
1827
- ]),
1828
- "side-sheet-footer": m(() => [
1829
- o(s, {
1830
- label: t(l)("menu.common.actions.ok"),
1831
- size: "lg",
1832
- onClick: te
1833
- }, null, 8, ["label"])
1834
- ]),
1835
- default: m(() => {
1836
- var n;
1837
- return [
1838
- d("div", dt, [
1839
- d("div", mt, [
1840
- d("p", ct, w(t(l)("menu.group.nested.currently_configuring")), 1),
1841
- d("p", pt, w((n = Je.value) == null ? void 0 : n.optionName), 1)
1842
- ]),
1843
- d("div", vt, [
1844
- d("p", gt, w(t(l)("menu.group.nested.subtitle")), 1),
1845
- o(ue, {
1846
- "column-defs": $l.value,
1847
- "page-size": We.value.length,
1848
- "row-data": We.value,
1849
- "shrink-at": !1,
1850
- "hide-footer": "",
1851
- "pin-header-row": ""
1852
- }, null, 8, ["column-defs", "page-size", "row-data"])
1853
- ])
1854
- ])
1855
- ];
1856
- }),
1857
- _: 1
1858
- }, 8, ["model-value", "dismiss-away"]),
1859
- o(me, {
1860
- "model-value": le.value,
1861
- "max-width": 800,
1862
- "z-index": 200,
1863
- "onUpdate:modelValue": a[19] || (a[19] = (n) => !n && Oe())
1864
- }, {
1865
- "side-sheet-header": m(() => [
1866
- le.value ? (c(), b("span", bt, w(t(l)("menu.common.labels.nested_group_override")), 1)) : x("", !0),
1867
- d("p", ft, w(t(l)("menu.group.update")), 1)
1868
- ]),
1869
- "side-sheet-footer": m(() => [
1870
- d("div", xt, [
1871
- o(s, {
1872
- label: t(l)("menu.common.actions.update"),
1873
- size: "lg",
1874
- onClick: R(Rl, ["stop"])
1875
- }, null, 8, ["label"]),
1876
- o(s, {
1877
- label: t(l)("menu.common.actions.cancel"),
1878
- size: "lg",
1879
- variant: "tertiary",
1880
- onClick: R(Oe, ["stop"])
1881
- }, null, 8, ["label"])
1882
- ])
1883
- ]),
1884
- default: m(() => {
1885
- var n, _;
1886
- return [
1887
- d("div", yt, [
1888
- o(Re, null, {
1889
- default: m(() => {
1890
- var E;
1891
- return [
1892
- o(q, {
1893
- disabled: "",
1894
- label: t(l)("menu.common.labels.group_name"),
1895
- placeholder: ((E = M.value) == null ? void 0 : E.groupName) ?? ""
1896
- }, {
1897
- append: m(() => [
1898
- o(s, {
1899
- disabled: "",
1900
- icon: "g_translate",
1901
- variant: "tertiary"
1902
- })
1903
- ]),
1904
- _: 1
1905
- }, 8, ["label", "placeholder"]),
1906
- o(Ke, null, {
1907
- default: m(() => {
1908
- var P, G, pl;
1909
- return [
1910
- o(oe, {
1911
- class: "flex-1",
1912
- disabled: "",
1913
- label: t(l)("menu.common.labels.min_select"),
1914
- min: 0,
1915
- "model-value": ((P = M.value) == null ? void 0 : P.min) ?? 0
1916
- }, null, 8, ["label", "model-value"]),
1917
- o(oe, {
1918
- class: "flex-1",
1919
- disabled: "",
1920
- label: t(l)("menu.common.labels.max_select"),
1921
- min: ((G = M.value) == null ? void 0 : G.min) ?? 0,
1922
- "model-value": ((pl = M.value) == null ? void 0 : pl.max) ?? 0
1923
- }, null, 8, ["label", "min", "model-value"])
1924
- ];
1925
- }),
1926
- _: 1
1927
- }),
1928
- o(je, {
1929
- label: t(l)("menu.common.labels.configuration")
1930
- }, {
1931
- default: m(() => {
1932
- var P;
1933
- return [
1934
- o(Ge, {
1935
- disabled: "",
1936
- label: t(l)("menu.common.labels.stackable"),
1937
- "model-value": ((P = M.value) == null ? void 0 : P.stackable) ?? !1,
1938
- sublabel: t(l)("menu.common.labels.stackable_sublabel"),
1939
- "label-placement": "right"
1940
- }, null, 8, ["label", "model-value", "sublabel"])
1941
- ];
1942
- }),
1943
- _: 1
1944
- }, 8, ["label"])
1945
- ];
1946
- }),
1947
- _: 1
1948
- }),
1949
- o(de, {
1950
- class: "!gap-16",
1951
- tag: "div",
1952
- "helper-text": t(l)("menu.common.validation.default_items_tip", {
1953
- count: ke.value.filter((E) => E.isDefault).length,
1954
- max: ((n = M.value) == null ? void 0 : n.max) ?? 0
1955
- }),
1956
- "model-value": ke.value
1957
- }, {
1958
- default: m(() => [
1959
- o(pe, {
1960
- title: t(l)("menu.group.option.title")
1961
- }, {
1962
- default: m(() => [
1963
- d("div", _t, [
1964
- d("div", wt, [
1965
- o(ue, {
1966
- "column-defs": Sl.value,
1967
- "page-size": Math.max(ke.value.length, 1),
1968
- "row-data": ke.value,
1969
- "shrink-at": !1,
1970
- "hide-footer": ""
1971
- }, null, 8, ["column-defs", "page-size", "row-data"])
1972
- ])
1973
- ])
1974
- ]),
1975
- _: 1
1976
- }, 8, ["title"])
1977
- ]),
1978
- _: 1
1979
- }, 8, ["helper-text", "model-value"]),
1980
- (c(!0), b(j, null, Y(((_ = M.value) == null ? void 0 : _.issues) ?? [], (E, P) => (c(), h(Zl, {
1981
- key: `${E.code}-${P}`,
1982
- state: "error",
1983
- text: t(f)(E)
1984
- }, null, 8, ["text"]))), 128))
1985
- ])
1986
- ];
1987
- }),
1988
- _: 1
1989
- }, 8, ["model-value"]),
1990
- D.value && Be.value ? (c(), h(sa, {
1991
- key: 11,
1992
- sdk: g.sdk,
1993
- onClose: Ve,
1994
- onCreated: Al
1995
- }, null, 8, ["sdk"])) : x("", !0),
1996
- ((cl = r.value) == null ? void 0 : cl.mode) === "create" && !Be.value ? (c(), h(me, {
1997
- key: 12,
1998
- modelValue: D.value,
1999
- "onUpdate:modelValue": a[23] || (a[23] = (n) => D.value = n),
2000
- "is-container": t(v).FmForm,
2001
- "is-container-props": { onValidationSuccess: rl },
2002
- "max-width": 800
2003
- }, {
2004
- "side-sheet-header": m(() => [
2005
- d("p", kt, w(t(l)("menu.group.add")), 1)
2006
- ]),
2007
- "side-sheet-footer": m(() => [
2008
- d("div", Vt, [
2009
- o(s, {
2010
- disabled: r.value.submit.state !== "allowed",
2011
- label: t(l)("menu.common.actions.add"),
2012
- size: "lg",
2013
- type: "submit"
2014
- }, null, 8, ["disabled", "label"]),
2015
- o(s, {
2016
- label: t(l)("menu.common.actions.cancel"),
2017
- size: "lg",
2018
- variant: "tertiary",
2019
- onClick: Ve
2020
- }, null, 8, ["label"])
2021
- ])
2022
- ]),
2023
- default: m(() => [
2024
- d("div", ht, [
2025
- o(Re, null, {
2026
- default: m(() => {
2027
- var n;
2028
- return [
2029
- o(q, gl({
2030
- autofocus: "",
2031
- "error-messages": we.value ? [t(f)(we.value)] : [],
2032
- label: t(l)("menu.common.labels.group_name"),
2033
- "model-value": r.value.name
2034
- }, t(ae).field("name", p.value.setName)), {
2035
- append: m(() => [
2036
- o(ul, {
2037
- placement: "top",
2038
- variant: "plain",
2039
- "z-index": 999
2040
- }, {
2041
- default: m(() => {
2042
- var _;
2043
- return [
2044
- o(s, {
2045
- "aria-label": t(l)("menu.group.translation.translate_name"),
2046
- disabled: ((_ = r.value.translation) == null ? void 0 : _.state) !== "allowed",
2047
- icon: "g_translate",
2048
- variant: "tertiary",
2049
- onClick: tl
2050
- }, null, 8, ["aria-label", "disabled"])
2051
- ];
2052
- }),
2053
- _: 1
2054
- })
2055
- ]),
2056
- _: 1
2057
- }, 16, ["error-messages", "label", "model-value"]),
2058
- o(de, {
2059
- "model-value": `${r.value.min} ${r.value.max}`
2060
- }, {
2061
- default: m(() => [
2062
- o(Ke, null, {
2063
- default: m(() => [
2064
- o(oe, {
2065
- class: "flex-1",
2066
- label: t(l)("menu.common.labels.min_select"),
2067
- min: 0,
2068
- "model-value": r.value.min,
2069
- "onUpdate:modelValue": p.value.setMin
2070
- }, null, 8, ["label", "model-value", "onUpdate:modelValue"]),
2071
- o(oe, {
2072
- class: "flex-1",
2073
- label: t(l)("menu.common.labels.max_select"),
2074
- min: r.value.min,
2075
- "model-value": r.value.max,
2076
- "onUpdate:modelValue": p.value.setMax
2077
- }, null, 8, ["label", "min", "model-value", "onUpdate:modelValue"])
2078
- ]),
2079
- _: 1
2080
- })
2081
- ]),
2082
- _: 1
2083
- }, 8, ["model-value"]),
2084
- o(je, {
2085
- label: t(l)("menu.common.labels.configuration")
2086
- }, {
2087
- default: m(() => [
2088
- o(Ge, {
2089
- label: t(l)("menu.common.labels.stackable"),
2090
- "label-placement": "right",
2091
- "model-value": r.value.stackable,
2092
- sublabel: t(l)("menu.common.labels.stackable_sublabel"),
2093
- "onUpdate:modelValue": p.value.setStackable
2094
- }, null, 8, ["label", "model-value", "sublabel", "onUpdate:modelValue"])
2095
- ]),
2096
- _: 1
2097
- }, 8, ["label"]),
2098
- (n = r.value.tagging) != null && n.visible ? (c(), h(pe, {
2099
- key: 0,
2100
- "sub-title": t(l)("menu.group.form.tagging.subtitle"),
2101
- title: t(l)("menu.group.form.tagging.title")
2102
- }, {
2103
- default: m(() => [
2104
- o(t(bl), {
2105
- entity: "group",
2106
- "model-value": r.value.customAttributes ?? {},
2107
- "value-options": el(r.value.attributeValueOptions),
2108
- "onUpdate:modelValue": a[20] || (a[20] = (_) => p.value.setCustomAttributes(_ ?? null))
2109
- }, null, 8, ["model-value", "value-options"])
2110
- ]),
2111
- _: 1
2112
- }, 8, ["sub-title", "title"])) : x("", !0)
2113
- ];
2114
- }),
2115
- _: 1
2116
- }),
2117
- o(de, {
2118
- tag: "div",
2119
- "helper-text": t(l)("menu.common.validation.default_items_tip", {
2120
- count: r.value.options.filter((n) => n.isDefault).length,
2121
- max: r.value.max
2122
- }),
2123
- "model-value": r.value.options
2124
- }, {
2125
- default: m(() => [
2126
- o(pe, {
2127
- class: "mb-8",
2128
- "sub-title": t(l)("menu.group.option.subtitle"),
2129
- title: t(l)("menu.group.option.title")
2130
- }, {
2131
- "append-title": m(() => [
2132
- d("div", null, [
2133
- o(s, {
2134
- "border-color": "primary",
2135
- label: t(l)("menu.group.option.link_products"),
2136
- "prepend-icon": "link",
2137
- "text-color": "primary",
2138
- variant: "secondary",
2139
- onClick: a[21] || (a[21] = (n) => Q.value = !0)
2140
- }, null, 8, ["label"])
2141
- ])
2142
- ]),
2143
- default: m(() => [
2144
- d("div", Ct, [
2145
- d("div", Ft, [
2146
- o(ue, {
2147
- "column-defs": zl.value,
2148
- draggable: r.value.options.length > 1,
2149
- "page-size": Math.max(r.value.options.length, 1),
2150
- "row-data": [...r.value.options],
2151
- "shrink-at": !1,
2152
- "hide-footer": "",
2153
- onDndChanged: a[22] || (a[22] = (n) => p.value.reorderOptions(
2154
- n.map((_) => _.id)
2155
- ))
2156
- }, null, 8, ["column-defs", "draggable", "page-size", "row-data"])
2157
- ])
2158
- ])
2159
- ]),
2160
- _: 1
2161
- }, 8, ["sub-title", "title"])
2162
- ]),
2163
- _: 1
2164
- }, 8, ["helper-text", "model-value"]),
2165
- (c(!0), b(j, null, Y(Qe.value, (n, _) => (c(), b("p", {
2166
- key: `${n.code}-${_}`,
2167
- class: "fm-typo-en-body-sm-400 text-fm-color-status-error",
2168
- role: "alert"
2169
- }, w(t(f)(n)), 1))), 128))
2170
- ])
2171
- ]),
2172
- _: 1
2173
- }, 8, ["modelValue", "is-container", "is-container-props"])) : x("", !0)
2174
- ];
2175
- }),
2176
- _: 3
2177
- }, 8, ["heading"]);
2178
- };
2179
- }
2180
- });
2181
- export {
2182
- Yt as _
2183
- };