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