@feedmepos/mf-menu-portal 1.0.4-dev.3 → 1.0.4-dev.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.
- package/dist/{App-nS46pByh.js → App-CrpoLCjA.js} +3 -3
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C9OSr8ft.js → ApplyProduct.vue_vue_type_script_setup_true_lang-Hdsnu29V.js} +1 -1
- package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-DnvN5R5w.js → BindingTable.vue_vue_type_script_setup_true_lang-D3CmOOPY.js} +1 -1
- package/dist/{Catalog-B4RS8T29.js → Catalog-VU3HhNro.js} +4 -4
- package/dist/{CatalogBinding-6_783kbu.js → CatalogBinding-BNATtZEY.js} +3 -3
- package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-BawCLY5-.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-BmG-xpW4.js} +3 -3
- package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-BjP8ZXyb.js → CatalogEditor.vue_vue_type_script_setup_true_lang-BFsRDFpj.js} +7 -7
- package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Diapahfp.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Bk4FqVmx.js} +14 -14
- package/dist/{Category-CqneIGq4.js → Category-DMoXTsfG.js} +5 -5
- package/dist/{Category-DNQH1CI7.js → Category-DxjdQ-NN.js} +2 -2
- package/dist/CategoryList.vue_vue_type_script_setup_true_lang-B3Ts1O-9.js +847 -0
- package/dist/{CookingGuide-DTAiFmEL.js → CookingGuide-DiZZDYD-.js} +5 -5
- package/dist/{Group-DeUqUomY.js → Group-DFR8q-tt.js} +5 -5
- package/dist/{Group-5xO2j3CL.js → Group-rzfh_o6r.js} +2 -2
- package/dist/GroupList.vue_vue_type_script_setup_true_lang-DiN-wQXX.js +1807 -0
- package/dist/Ingredient-DpjGIuH9.js +505 -0
- package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CnI80Ojd.js +782 -0
- package/dist/{MenuSetting-DdekHsQy.js → MenuSetting-DR-pDSF_.js} +4 -4
- package/dist/OrderPacing-JcTuweqF.js +769 -0
- package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-C3SqQPSr.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-HwwJ2mGv.js} +2 -2
- package/dist/{Preview-DGTw0POk.js → Preview-BZyun5lZ.js} +1 -1
- package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-DffhFv0Y.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-DquqNbE1.js} +1 -1
- package/dist/PrintRoute-CzEx2dCt.js +518 -0
- package/dist/{Product-CsbcyIgD.js → Product-CQb0n06E.js} +4 -4
- package/dist/ProductAttributeFilter.vue_vue_type_script_setup_true_lang-B2KdolJS.js +7931 -0
- package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang--rBKdKV7.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-CBlDEjqF.js} +9 -9
- package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-D8NQTCLx.js +2011 -0
- package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-DtCzHjpN.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-cG47Pu-6.js} +1 -1
- package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-aDx01-WW.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-0UwUcA2L.js} +630 -587
- package/dist/{ProductInternalTools-Ccd4dAmx.js → ProductInternalTools-QrBR1nFp.js} +2 -2
- package/dist/{ProductInventoryDialog-DYcKdKHi.js → ProductInventoryDialog-fV38GO1a.js} +1 -1
- package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-DySFcCJz.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-Bzb3RrMg.js} +1 -1
- package/dist/ProductList.vue_vue_type_script_setup_true_lang-BwKQESr3.js +2765 -0
- package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-Dw2xiPYX.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-CDYcHXo1.js} +1 -1
- package/dist/{Products-phZwCZhU.js → Products-B8tysOAL.js} +3 -3
- package/dist/Publish-DTvOvFNa.js +1337 -0
- package/dist/Recipe-Ddx31csF.js +388 -0
- package/dist/{Scheduler-C-A5m92O.js → Scheduler-CST5L_cw.js} +314 -254
- package/dist/ServingSequence-DYyEZI2S.js +374 -0
- package/dist/{Setting-C24V-lps.js → Setting-Ip0pGjks.js} +6 -6
- package/dist/Subcategory-BIgjzVta.js +459 -0
- package/dist/{Takeaway-DywX5BiX.js → Takeaway-CekhGM-m.js} +2 -2
- package/dist/{Takeaway-BFP2ohJn.js → Takeaway-aXsPg4JT.js} +5 -5
- package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-B3QS7o1v.js → TakeawayList.vue_vue_type_script_setup_true_lang-CaRR4_j3.js} +4 -4
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CshqYpc9.js +1291 -0
- package/dist/Unit-BMW8u0Us.js +424 -0
- package/dist/{Variant-BBfWhH-s.js → Variant-CZsrYRMU.js} +5 -5
- package/dist/{_id_-BooM3FX1.js → _id_-D4swrvNa.js} +3 -3
- package/dist/{app-Bmgb8ACe.js → app-BWwwHsWi.js} +312 -312
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +60 -0
- package/dist/apps/mf-menu/src/components/Product/BulkCategorySelect.vue.d.ts +37 -0
- package/dist/apps/mf-menu/src/components/Product/ProductAttributeFilter.vue.d.ts +11 -1
- package/dist/apps/mf-menu/src/components/ProductList.vue.d.ts +2 -2
- package/dist/apps/mf-menu/src/components/feature/NestedGroupManager/NestedGroupOverrideSheets.vue.d.ts +27 -0
- package/dist/apps/mf-menu/src/components/feature/RestaurantAttributesFilter.vue.d.ts +20 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{menu-compute-CG-fX5pi.js → menu-compute-D7TdiHt4.js} +4 -4
- package/dist/assets/{validate-menu-BeGMWVns.js → validate-menu-DXppWUVq.js} +2 -2
- package/dist/mf-menu-portal.css +1 -1
- package/dist/{provide-CfF0FmUz.js → provide-CDmXzkhz.js} +67990 -66891
- package/dist/{useActionFeedback-DyUCQl2x.js → useActionFeedback-Dm2HDa_2.js} +1 -1
- package/dist/{FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js → vuedraggable-CBtQLb_S.js} +140 -139
- package/package.json +2 -2
- package/dist/CategoryList.vue_vue_type_script_setup_true_lang-Bt_onPrP.js +0 -797
- package/dist/GroupList.vue_vue_type_script_setup_true_lang-Dgya_JLB.js +0 -2183
- package/dist/Ingredient-BlDW3TfZ.js +0 -463
- package/dist/LinkProductSideSheet.vue_vue_type_script_setup_true_lang-0tCpJlOf.js +0 -709
- package/dist/OrderPacing-Bb2n5wmI.js +0 -698
- package/dist/PrintRoute-CJB4gIP2.js +0 -473
- package/dist/ProductChipSummary.vue_vue_type_script_setup_true_lang-D8DygCBl.js +0 -110
- package/dist/ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-J6LpJ5wT.js +0 -1257
- package/dist/ProductList.vue_vue_type_script_setup_true_lang-DTLslTpK.js +0 -10353
- package/dist/Publish-BeKIXu3z.js +0 -1261
- package/dist/Recipe-Fo4tBkBv.js +0 -350
- package/dist/ServingSequence-BrCwLSO7.js +0 -336
- package/dist/Subcategory-B0oZIKbw.js +0 -412
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-D7mhnrXx.js +0 -1213
- package/dist/Unit-NhEwH-kr.js +0 -385
- package/dist/apps/mf-menu/src/views/MenuManagementEditor/RestaurantAttributesFilter.vue.d.ts +0 -2
|
@@ -0,0 +1,2011 @@
|
|
|
1
|
+
import { defineComponent as me, computed as O, toDisplayString as P, ref as se, watch as Ee, openBlock as g, createBlock as N, createSlots as Ke, withCtx as v, renderSlot as Le, createElementBlock as S, createVNode as s, createCommentVNode as E, nextTick as oo, resolveComponent as x, unref as n, createElementVNode as _, Fragment as J, renderList as ue, shallowRef as ne, onBeforeUnmount as Re, h as c, mergeProps as Te, defineAsyncComponent as je, onUnmounted as no, normalizeClass as lo, withModifiers as Ue } from "vue";
|
|
2
|
+
import { useI18n as ce, CustomAttributesForm as Me } from "@feedmepos/mf-common";
|
|
3
|
+
import { useDialog as He, components as T } from "@feedmepos/ui-library";
|
|
4
|
+
import { _ as to } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js";
|
|
5
|
+
import { _ as ae, b as ao } from "./TranslationLanguageSelector.vue_vue_type_script_setup_true_lang-BJZ6VcrT.js";
|
|
6
|
+
import { a as Ye, _ as ke } from "./vuedraggable-CBtQLb_S.js";
|
|
7
|
+
import { _ as Ne } from "./FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js";
|
|
8
|
+
import { _ as io } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
+
import { RemyButton as Ge } from "@feedmepos/mf-remy-panel";
|
|
10
|
+
import { _ as ro } from "./AddPriceGroupDialog.vue_vue_type_script_setup_true_lang-DhKyG3gY.js";
|
|
11
|
+
import { u as Ze } from "./useEditorValidation-Ctef5Bxt.js";
|
|
12
|
+
import { b as De, u as Be } from "./provide-CDmXzkhz.js";
|
|
13
|
+
import { u as qe } from "./useActionFeedback-Dm2HDa_2.js";
|
|
14
|
+
import { a as so, A as uo, _ as mo } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CnI80Ojd.js";
|
|
15
|
+
const Je = /* @__PURE__ */ me({
|
|
16
|
+
__name: "LocalizedCurrencySymbol",
|
|
17
|
+
props: {
|
|
18
|
+
currency: {}
|
|
19
|
+
},
|
|
20
|
+
setup(G) {
|
|
21
|
+
const B = G, { n: k } = ce(), F = O(() => {
|
|
22
|
+
if (!B.currency) return "";
|
|
23
|
+
const u = k(0, {
|
|
24
|
+
useGrouping: !1,
|
|
25
|
+
minimumFractionDigits: 0,
|
|
26
|
+
maximumFractionDigits: 0
|
|
27
|
+
});
|
|
28
|
+
return k(0, {
|
|
29
|
+
style: "currency",
|
|
30
|
+
currency: B.currency,
|
|
31
|
+
currencyDisplay: "narrowSymbol",
|
|
32
|
+
useGrouping: !1,
|
|
33
|
+
minimumFractionDigits: 0,
|
|
34
|
+
maximumFractionDigits: 0
|
|
35
|
+
}).replace(u, "").trim() || B.currency;
|
|
36
|
+
});
|
|
37
|
+
return (u, o) => P(F.value);
|
|
38
|
+
}
|
|
39
|
+
}), co = { key: 0 }, Fe = /* @__PURE__ */ me({
|
|
40
|
+
__name: "ProductMoneyField",
|
|
41
|
+
props: {
|
|
42
|
+
modelValue: {},
|
|
43
|
+
currency: {},
|
|
44
|
+
commitOnInput: { type: Boolean }
|
|
45
|
+
},
|
|
46
|
+
emits: ["update:modelValue"],
|
|
47
|
+
setup(G, { expose: B, emit: k }) {
|
|
48
|
+
const F = G, u = k, { n: o, locale: D } = ce(), z = se();
|
|
49
|
+
B({
|
|
50
|
+
inputEl: O(() => {
|
|
51
|
+
var m;
|
|
52
|
+
return ((m = z.value) == null ? void 0 : m.inputEl) ?? null;
|
|
53
|
+
}),
|
|
54
|
+
focus: () => {
|
|
55
|
+
var m, i;
|
|
56
|
+
return (i = (m = z.value) == null ? void 0 : m.inputEl) == null ? void 0 : i.focus();
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
function h(m) {
|
|
60
|
+
return m === null ? "" : o(m, {
|
|
61
|
+
minimumFractionDigits: 2,
|
|
62
|
+
maximumFractionDigits: 2,
|
|
63
|
+
useGrouping: !1
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function V(m) {
|
|
67
|
+
var b;
|
|
68
|
+
if (m.trim() === "") return null;
|
|
69
|
+
const i = ((b = new Intl.NumberFormat(D.value).formatToParts(1.5).find((y) => y.type === "decimal")) == null ? void 0 : b.value) ?? ".", p = Number(m.replace(i, "."));
|
|
70
|
+
return Number.isFinite(p) ? p : void 0;
|
|
71
|
+
}
|
|
72
|
+
function d(m, i) {
|
|
73
|
+
return m === null || i === null ? m === i : Math.round(m * 100) === Math.round(i * 100);
|
|
74
|
+
}
|
|
75
|
+
const C = O(() => h(F.modelValue)), t = se(C.value), L = se(!1);
|
|
76
|
+
Ee(C, (m) => {
|
|
77
|
+
const i = V(t.value);
|
|
78
|
+
L.value && i !== void 0 && d(i, F.modelValue) || (t.value = m);
|
|
79
|
+
});
|
|
80
|
+
async function Y() {
|
|
81
|
+
var i, p;
|
|
82
|
+
const m = V(((p = (i = z.value) == null ? void 0 : i.inputEl) == null ? void 0 : p.value) ?? "");
|
|
83
|
+
m !== void 0 && u("update:modelValue", m), await oo(), t.value = C.value;
|
|
84
|
+
}
|
|
85
|
+
function Z(m) {
|
|
86
|
+
if (t.value = String(m ?? ""), !F.commitOnInput) return;
|
|
87
|
+
const i = V(t.value);
|
|
88
|
+
i !== void 0 && u("update:modelValue", i);
|
|
89
|
+
}
|
|
90
|
+
function q(m) {
|
|
91
|
+
var i, p;
|
|
92
|
+
L.value = m, m ? (p = (i = z.value) == null ? void 0 : i.inputEl) == null || p.select() : Y();
|
|
93
|
+
}
|
|
94
|
+
function A(m) {
|
|
95
|
+
m.key === "Enter" && !m.isComposing && Y();
|
|
96
|
+
}
|
|
97
|
+
return Ee(
|
|
98
|
+
() => {
|
|
99
|
+
var m;
|
|
100
|
+
return ((m = z.value) == null ? void 0 : m.inputEl) ?? null;
|
|
101
|
+
},
|
|
102
|
+
(m, i, p) => {
|
|
103
|
+
m && (m.addEventListener("keydown", A), p(() => m.removeEventListener("keydown", A)));
|
|
104
|
+
},
|
|
105
|
+
{ immediate: !0, flush: "post" }
|
|
106
|
+
), (m, i) => (g(), N(ae, {
|
|
107
|
+
ref_key: "field",
|
|
108
|
+
ref: z,
|
|
109
|
+
"model-value": t.value,
|
|
110
|
+
inputmode: "decimal",
|
|
111
|
+
"onUpdate:modelValue": Z,
|
|
112
|
+
onFocusChanged: q
|
|
113
|
+
}, Ke({
|
|
114
|
+
prepend: v(() => [
|
|
115
|
+
m.currency ? (g(), S("span", co, [
|
|
116
|
+
s(Je, { currency: m.currency }, null, 8, ["currency"])
|
|
117
|
+
])) : E("", !0)
|
|
118
|
+
]),
|
|
119
|
+
append: v(() => [
|
|
120
|
+
Le(m.$slots, "append")
|
|
121
|
+
]),
|
|
122
|
+
_: 2
|
|
123
|
+
}, [
|
|
124
|
+
m.$slots["helper-text"] ? {
|
|
125
|
+
name: "helper-text",
|
|
126
|
+
fn: v(() => [
|
|
127
|
+
Le(m.$slots, "helper-text")
|
|
128
|
+
]),
|
|
129
|
+
key: "0"
|
|
130
|
+
} : void 0
|
|
131
|
+
]), 1032, ["model-value"]));
|
|
132
|
+
}
|
|
133
|
+
}), Qe = /* @__PURE__ */ me({
|
|
134
|
+
__name: "ProductPriceTierButton",
|
|
135
|
+
props: {
|
|
136
|
+
configured: { type: Boolean },
|
|
137
|
+
label: {},
|
|
138
|
+
disabled: { type: Boolean }
|
|
139
|
+
},
|
|
140
|
+
emits: ["open"],
|
|
141
|
+
setup(G, { emit: B }) {
|
|
142
|
+
const k = B, { t: F } = ce();
|
|
143
|
+
return (u, o) => {
|
|
144
|
+
const D = x("FmButton"), z = x("FmTooltip");
|
|
145
|
+
return g(), N(z, {
|
|
146
|
+
content: n(F)("menu.price_tier.price_tier_config"),
|
|
147
|
+
"z-index": 999,
|
|
148
|
+
placement: "top"
|
|
149
|
+
}, {
|
|
150
|
+
default: v(() => [
|
|
151
|
+
s(D, {
|
|
152
|
+
icon: "price_change",
|
|
153
|
+
variant: "tertiary",
|
|
154
|
+
"text-color": "neutral-gray-400",
|
|
155
|
+
"overwrite-icon-outline": u.configured ? "filled" : "outline",
|
|
156
|
+
"aria-label": u.label,
|
|
157
|
+
disabled: u.disabled,
|
|
158
|
+
onClick: o[0] || (o[0] = (h) => k("open"))
|
|
159
|
+
}, null, 8, ["overwrite-icon-outline", "aria-label", "disabled"])
|
|
160
|
+
]),
|
|
161
|
+
_: 1
|
|
162
|
+
}, 8, ["content"]);
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
}), po = { class: "flex flex-col gap-8 p-8" }, go = { class: "fm-typo-en-body-md-600" }, bo = { class: "flex flex-col gap-4" }, vo = { key: 0 }, Ae = /* @__PURE__ */ me({
|
|
166
|
+
__name: "ProductMemberPriceTooltip",
|
|
167
|
+
props: {
|
|
168
|
+
prices: {},
|
|
169
|
+
currency: {}
|
|
170
|
+
},
|
|
171
|
+
setup(G) {
|
|
172
|
+
const B = G, { t: k, n: F } = ce(), u = O(
|
|
173
|
+
() => Object.entries(B.prices).flatMap(
|
|
174
|
+
([o, D]) => D === null ? [] : [{ name: o, amount: D }]
|
|
175
|
+
)
|
|
176
|
+
);
|
|
177
|
+
return (o, D) => {
|
|
178
|
+
const z = x("FmIcon"), h = x("FmTooltip");
|
|
179
|
+
return g(), N(h, {
|
|
180
|
+
variant: "plain",
|
|
181
|
+
placement: "right",
|
|
182
|
+
"z-index": 100
|
|
183
|
+
}, {
|
|
184
|
+
default: v(() => [
|
|
185
|
+
s(z, {
|
|
186
|
+
name: "info",
|
|
187
|
+
outline: ""
|
|
188
|
+
})
|
|
189
|
+
]),
|
|
190
|
+
content: v(() => [
|
|
191
|
+
_("div", po, [
|
|
192
|
+
_("p", go, P(n(k)("menu.member_pricing.title")), 1),
|
|
193
|
+
_("ul", bo, [
|
|
194
|
+
u.value.length === 0 ? (g(), S("li", vo, P(n(k)("menu.member_pricing.tooltip.no_member_price")), 1)) : E("", !0),
|
|
195
|
+
(g(!0), S(J, null, ue(u.value, (V) => (g(), S("li", {
|
|
196
|
+
key: V.name,
|
|
197
|
+
class: "fm-typo-en-body-md-400"
|
|
198
|
+
}, P(n(k)("menu.common.labels.a11y_labelled_name", {
|
|
199
|
+
label: V.name,
|
|
200
|
+
name: n(F)(
|
|
201
|
+
V.amount,
|
|
202
|
+
o.currency ? { style: "currency", currency: o.currency, minimumFractionDigits: 2 } : { minimumFractionDigits: 2 }
|
|
203
|
+
)
|
|
204
|
+
})), 1))), 128))
|
|
205
|
+
])
|
|
206
|
+
])
|
|
207
|
+
]),
|
|
208
|
+
_: 1
|
|
209
|
+
});
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
}), _o = { class: "fm-typo-en-title-md-600" }, fo = {
|
|
213
|
+
key: 0,
|
|
214
|
+
class: "flex flex-col gap-32"
|
|
215
|
+
}, yo = { class: "flex flex-col fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-100 gap-4" }, wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ho = {
|
|
216
|
+
key: 0,
|
|
217
|
+
class: "fm-typo-en-body-lg-600"
|
|
218
|
+
}, xo = { class: "flex flex-col gap-24" }, ko = { class: "fm-typo-en-title-sm-600" }, Fo = { class: "flex flex-col gap-16" }, Co = { class: "flex flex-col gap-4" }, So = { class: "fm-typo-en-body-lg-600" }, $o = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Po = {
|
|
219
|
+
key: 1,
|
|
220
|
+
class: "py-16 space-y-32"
|
|
221
|
+
}, Oo = { class: "space-y-8" }, Vo = { class: "flex items-center justify-between" }, To = { class: "space-y-8" }, No = { class: "fm-typo-en-body-lg-600" }, Eo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, zo = { class: "flex gap-8" }, We = /* @__PURE__ */ me({
|
|
222
|
+
__name: "ProductPricingSheet",
|
|
223
|
+
props: {
|
|
224
|
+
session: {},
|
|
225
|
+
onCreatePriceGroup: { type: Function, default: void 0 },
|
|
226
|
+
zIndex: { default: void 0 },
|
|
227
|
+
mainPricingLabel: { type: Boolean, default: !0 }
|
|
228
|
+
},
|
|
229
|
+
emits: ["close", "suggest"],
|
|
230
|
+
setup(G, { emit: B }) {
|
|
231
|
+
const k = G, F = B, { t: u } = ce(), o = He(), D = De(), z = Be(k.session), h = O(
|
|
232
|
+
() => z.value.status === "ready" ? z.value.value : null
|
|
233
|
+
), V = Ze(() => k.session);
|
|
234
|
+
function d(i, p) {
|
|
235
|
+
var y;
|
|
236
|
+
const b = V.issue(((y = h.value) == null ? void 0 : y.fieldIssues) ?? {}, `rows.${i}.amount`) ?? p.issue;
|
|
237
|
+
return b ? [D(b)] : [];
|
|
238
|
+
}
|
|
239
|
+
function C(i) {
|
|
240
|
+
var b;
|
|
241
|
+
const p = V.issue(
|
|
242
|
+
((b = h.value) == null ? void 0 : b.fieldIssues) ?? {},
|
|
243
|
+
`rows.0.members.${i.key}`
|
|
244
|
+
) ?? i.issue;
|
|
245
|
+
return p ? [D(p)] : [];
|
|
246
|
+
}
|
|
247
|
+
const t = ne(null);
|
|
248
|
+
function L() {
|
|
249
|
+
var i;
|
|
250
|
+
(i = t.value) == null || i.dispose(), t.value = null;
|
|
251
|
+
}
|
|
252
|
+
function Y(i) {
|
|
253
|
+
L(), t.value = k.session.memberEditor(i);
|
|
254
|
+
}
|
|
255
|
+
Re(L);
|
|
256
|
+
const Z = O(() => [
|
|
257
|
+
{
|
|
258
|
+
accessorKey: "key",
|
|
259
|
+
header: () => u(
|
|
260
|
+
"menu.product.form.member_price.configure.member_selling_price.table.tier"
|
|
261
|
+
),
|
|
262
|
+
enableSorting: !1
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
id: "amount",
|
|
266
|
+
header: () => u(
|
|
267
|
+
"menu.product.form.member_price.configure.member_selling_price.table.selling_price"
|
|
268
|
+
),
|
|
269
|
+
enableSorting: !1,
|
|
270
|
+
cell: ({ row: i }) => c(
|
|
271
|
+
Fe,
|
|
272
|
+
{
|
|
273
|
+
modelValue: i.original.amount,
|
|
274
|
+
commitOnInput: !0,
|
|
275
|
+
"aria-label": i.original.key,
|
|
276
|
+
errorMessages: C(i.original),
|
|
277
|
+
...V.field(
|
|
278
|
+
`rows.0.members.${i.original.key}`,
|
|
279
|
+
(p) => {
|
|
280
|
+
var b, y;
|
|
281
|
+
return k.session.setAmount(
|
|
282
|
+
((y = (b = h.value) == null ? void 0 : b.rows[0]) == null ? void 0 : y.tier) ?? null,
|
|
283
|
+
i.original.key,
|
|
284
|
+
p
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
)
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
append: () => {
|
|
291
|
+
var p;
|
|
292
|
+
return (p = h.value) != null && p.showSuggestion ? c(Ge, {
|
|
293
|
+
pureStyling: !0,
|
|
294
|
+
class: "shrink-0 scale-75",
|
|
295
|
+
"aria-label": u("menu.product.remy.pricing"),
|
|
296
|
+
onClick: () => F("suggest")
|
|
297
|
+
}) : null;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
)
|
|
301
|
+
}
|
|
302
|
+
]), q = O(() => [
|
|
303
|
+
{
|
|
304
|
+
accessorKey: "tier",
|
|
305
|
+
header: () => u("menu.price_tier.form.table.columns.name"),
|
|
306
|
+
enableSorting: !1
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
id: "amount",
|
|
310
|
+
header: () => u("menu.price_tier.form.table.columns.price"),
|
|
311
|
+
enableSorting: !1,
|
|
312
|
+
cell: ({ row: i }) => c(Fe, {
|
|
313
|
+
modelValue: i.original.amount,
|
|
314
|
+
commitOnInput: !0,
|
|
315
|
+
// Every tier row rendered this field under one name, so a step naming
|
|
316
|
+
// a particular tier's price had nothing to distinguish the rows by.
|
|
317
|
+
// Qualify it with the tier, as the frozen baselines name it
|
|
318
|
+
// ("Default selling price: DISC TIER CLEAR").
|
|
319
|
+
"aria-label": i.original.tier ? u("menu.common.labels.a11y_labelled_name", {
|
|
320
|
+
label: u(
|
|
321
|
+
"menu.product.form.member_price.configure.default_selling_price"
|
|
322
|
+
),
|
|
323
|
+
name: i.original.tier
|
|
324
|
+
}) : u(
|
|
325
|
+
"menu.product.form.member_price.configure.default_selling_price"
|
|
326
|
+
),
|
|
327
|
+
errorMessages: d(i.index, i.original),
|
|
328
|
+
...V.field(
|
|
329
|
+
`rows.${i.index}.amount`,
|
|
330
|
+
(p) => k.session.setAmount(i.original.tier, null, p)
|
|
331
|
+
)
|
|
332
|
+
})
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
id: "members",
|
|
336
|
+
header: () => u("menu.price_tier.form.table.columns.member_price"),
|
|
337
|
+
enableSorting: !1,
|
|
338
|
+
cell: ({ row: i }) => {
|
|
339
|
+
var y;
|
|
340
|
+
const p = i.original.members.filter(
|
|
341
|
+
(K) => K.amount !== null
|
|
342
|
+
).length, b = p ? u("menu.product.form.member_price.configure.title_with_tier", {
|
|
343
|
+
num: p
|
|
344
|
+
}) : u("menu.product.form.member_price.configure.title");
|
|
345
|
+
return c("div", { class: "flex items-center justify-between" }, [
|
|
346
|
+
c(
|
|
347
|
+
T.FmButton,
|
|
348
|
+
{
|
|
349
|
+
variant: "plain",
|
|
350
|
+
label: b,
|
|
351
|
+
// This is the nested pricing-sheet action. Keep it distinct from
|
|
352
|
+
// the product form's row-level "Member price" action while
|
|
353
|
+
// qualifying the tier, so both independently reachable surfaces
|
|
354
|
+
// stay semantic.
|
|
355
|
+
"aria-label": p ? b : i.original.tier ? u("menu.common.labels.a11y_labelled_name", {
|
|
356
|
+
label: u(
|
|
357
|
+
"menu.product.form.member_price.configure.title"
|
|
358
|
+
),
|
|
359
|
+
name: i.original.tier
|
|
360
|
+
}) : void 0,
|
|
361
|
+
onClick: () => i.original.tier && Y(i.original.tier)
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
default: () => c(
|
|
365
|
+
"span",
|
|
366
|
+
{ class: "underline line-clamp-2 break-all" },
|
|
367
|
+
b
|
|
368
|
+
)
|
|
369
|
+
}
|
|
370
|
+
),
|
|
371
|
+
c(Ae, {
|
|
372
|
+
prices: Object.fromEntries(
|
|
373
|
+
i.original.members.map((K) => [K.key, K.amount])
|
|
374
|
+
),
|
|
375
|
+
currency: (y = h.value) == null ? void 0 : y.currency
|
|
376
|
+
})
|
|
377
|
+
]);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
]);
|
|
381
|
+
function A() {
|
|
382
|
+
var p;
|
|
383
|
+
if (k.session.apply()) {
|
|
384
|
+
F("close");
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
const i = Object.entries(((p = h.value) == null ? void 0 : p.fieldIssues) ?? {}).flatMap(
|
|
388
|
+
([b, y]) => (y ?? []).map((K) => ({ ...K, field: b }))
|
|
389
|
+
);
|
|
390
|
+
V.submit(async () => ({ kind: "rejected", issues: i }));
|
|
391
|
+
}
|
|
392
|
+
function m() {
|
|
393
|
+
k.onCreatePriceGroup && o.open({
|
|
394
|
+
zIndex: 200,
|
|
395
|
+
title: u("menu.price_tier.add_price_group"),
|
|
396
|
+
contentComponent: ro,
|
|
397
|
+
primaryActions: {
|
|
398
|
+
text: u("menu.category.manager.dialog.add.action"),
|
|
399
|
+
close: !1
|
|
400
|
+
},
|
|
401
|
+
secondaryActions: {
|
|
402
|
+
text: u("menu.common.actions.cancel"),
|
|
403
|
+
close: !0
|
|
404
|
+
}
|
|
405
|
+
}).onPrimary(async (i) => {
|
|
406
|
+
const p = String(i ?? "");
|
|
407
|
+
await k.onCreatePriceGroup(p) && (k.session.addTier(p), o.close());
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
return (i, p) => {
|
|
411
|
+
var ie;
|
|
412
|
+
const b = x("FmTable"), y = x("FmButton"), K = x("FmSideSheet"), de = x("ProductPricingSheet", !0);
|
|
413
|
+
return g(), S(J, null, [
|
|
414
|
+
s(K, {
|
|
415
|
+
"model-value": !0,
|
|
416
|
+
"z-index": k.zIndex ?? 300,
|
|
417
|
+
"max-width": ((ie = h.value) == null ? void 0 : ie.mode) === "members" ? 720 : 560,
|
|
418
|
+
"is-container": n(T).FmForm,
|
|
419
|
+
"is-container-props": {
|
|
420
|
+
onValidationSuccess: A,
|
|
421
|
+
blameFormChildOnValidationFailed: !0
|
|
422
|
+
},
|
|
423
|
+
"onUpdate:modelValue": p[2] || (p[2] = (I) => !I && F("close"))
|
|
424
|
+
}, {
|
|
425
|
+
"side-sheet-header": v(() => {
|
|
426
|
+
var I;
|
|
427
|
+
return [
|
|
428
|
+
_("p", _o, P(n(u)(
|
|
429
|
+
((I = h.value) == null ? void 0 : I.mode) === "tiers" ? "menu.price_tier.price_tier_config" : "menu.product.form.member_price.configure.title"
|
|
430
|
+
)), 1)
|
|
431
|
+
];
|
|
432
|
+
}),
|
|
433
|
+
"side-sheet-footer": v(() => {
|
|
434
|
+
var I, R, M;
|
|
435
|
+
return [
|
|
436
|
+
_("div", zo, [
|
|
437
|
+
s(y, {
|
|
438
|
+
label: ((I = h.value) == null ? void 0 : I.mode) === "tiers" ? n(u)("menu.common.actions.update") : n(u)("menu.common.actions.apply"),
|
|
439
|
+
"aria-label": ((R = h.value) == null ? void 0 : R.mode) === "tiers" ? n(u)("menu.price_tier.action.update") : void 0,
|
|
440
|
+
variant: "primary",
|
|
441
|
+
size: "lg",
|
|
442
|
+
type: "button",
|
|
443
|
+
onClick: A
|
|
444
|
+
}, null, 8, ["label", "aria-label"]),
|
|
445
|
+
s(y, {
|
|
446
|
+
label: n(u)("menu.common.actions.cancel"),
|
|
447
|
+
"aria-label": ((M = h.value) == null ? void 0 : M.mode) === "tiers" ? n(u)("menu.price_tier.action.cancel") : n(u)("menu.product.form.member_price.configure.cancel"),
|
|
448
|
+
variant: "tertiary",
|
|
449
|
+
size: "lg",
|
|
450
|
+
onClick: p[1] || (p[1] = (Q) => F("close"))
|
|
451
|
+
}, null, 8, ["label", "aria-label"])
|
|
452
|
+
])
|
|
453
|
+
];
|
|
454
|
+
}),
|
|
455
|
+
default: v(() => {
|
|
456
|
+
var I, R;
|
|
457
|
+
return [
|
|
458
|
+
((I = h.value) == null ? void 0 : I.mode) === "members" ? (g(), S("div", fo, [
|
|
459
|
+
_("div", yo, [
|
|
460
|
+
_("p", wo, P(n(u)("menu.product.form.member_price.configure.current_configuration")), 1),
|
|
461
|
+
h.value.configurationName || i.mainPricingLabel ? (g(), S("p", ho, P(h.value.configurationName ?? n(u)("menu.product.form.member_price.configure.main_pricing")), 1)) : E("", !0)
|
|
462
|
+
]),
|
|
463
|
+
_("div", xo, [
|
|
464
|
+
_("p", ko, P(n(u)("menu.product.form.member_price.configure.pricing_grid")), 1),
|
|
465
|
+
(g(!0), S(J, null, ue(h.value.rows, (M, Q) => (g(), N(Fe, Te(
|
|
466
|
+
{
|
|
467
|
+
key: M.tier ?? "base",
|
|
468
|
+
class: "w-[258px] xs:w-full",
|
|
469
|
+
label: n(u)("menu.product.form.member_price.configure.default_selling_price"),
|
|
470
|
+
"model-value": M.amount,
|
|
471
|
+
"commit-on-input": "",
|
|
472
|
+
currency: h.value.currency,
|
|
473
|
+
"error-messages": d(Q, M)
|
|
474
|
+
},
|
|
475
|
+
{ ref_for: !0 },
|
|
476
|
+
n(V).field(
|
|
477
|
+
`rows.${Q}.amount`,
|
|
478
|
+
(W) => i.session.setAmount(M.tier, null, W)
|
|
479
|
+
)
|
|
480
|
+
), {
|
|
481
|
+
append: v(() => [
|
|
482
|
+
h.value.showSuggestion ? (g(), N(n(Ge), {
|
|
483
|
+
key: 0,
|
|
484
|
+
"pure-styling": "",
|
|
485
|
+
class: "shrink-0 scale-75",
|
|
486
|
+
"aria-label": n(u)("menu.product.remy.pricing"),
|
|
487
|
+
onClick: p[0] || (p[0] = (W) => F("suggest"))
|
|
488
|
+
}, null, 8, ["aria-label"])) : E("", !0)
|
|
489
|
+
]),
|
|
490
|
+
_: 2
|
|
491
|
+
}, 1040, ["label", "model-value", "currency", "error-messages"]))), 128))
|
|
492
|
+
]),
|
|
493
|
+
_("div", Fo, [
|
|
494
|
+
_("div", Co, [
|
|
495
|
+
_("p", So, P(n(u)(
|
|
496
|
+
"menu.product.form.member_price.configure.member_selling_price.label"
|
|
497
|
+
)), 1),
|
|
498
|
+
_("p", $o, P(n(u)(
|
|
499
|
+
"menu.product.form.member_price.configure.member_selling_price.sublabel"
|
|
500
|
+
)), 1)
|
|
501
|
+
]),
|
|
502
|
+
s(b, {
|
|
503
|
+
"column-defs": Z.value,
|
|
504
|
+
"row-data": [...((R = h.value.rows[0]) == null ? void 0 : R.members) ?? []],
|
|
505
|
+
"hide-footer": ""
|
|
506
|
+
}, null, 8, ["column-defs", "row-data"])
|
|
507
|
+
])
|
|
508
|
+
])) : h.value ? (g(), S("div", Po, [
|
|
509
|
+
_("div", Oo, [
|
|
510
|
+
_("div", Vo, [
|
|
511
|
+
_("div", To, [
|
|
512
|
+
_("p", No, P(n(u)("menu.price_tier.price_group")), 1),
|
|
513
|
+
_("p", Eo, P(n(u)("menu.price_tier.description")), 1)
|
|
514
|
+
]),
|
|
515
|
+
k.onCreatePriceGroup ? (g(), N(y, {
|
|
516
|
+
key: 0,
|
|
517
|
+
class: "min-w-fit",
|
|
518
|
+
label: n(u)("menu.price_tier.add_price_group"),
|
|
519
|
+
icon: "add",
|
|
520
|
+
variant: "secondary",
|
|
521
|
+
onClick: m
|
|
522
|
+
}, null, 8, ["label"])) : E("", !0)
|
|
523
|
+
]),
|
|
524
|
+
s(b, {
|
|
525
|
+
"column-defs": q.value,
|
|
526
|
+
"row-data": [...h.value.rows],
|
|
527
|
+
"hide-footer": ""
|
|
528
|
+
}, null, 8, ["column-defs", "row-data"])
|
|
529
|
+
])
|
|
530
|
+
])) : E("", !0)
|
|
531
|
+
];
|
|
532
|
+
}),
|
|
533
|
+
_: 1
|
|
534
|
+
}, 8, ["z-index", "max-width", "is-container", "is-container-props"]),
|
|
535
|
+
t.value ? (g(), N(de, {
|
|
536
|
+
key: 0,
|
|
537
|
+
session: t.value,
|
|
538
|
+
"z-index": (k.zIndex ?? 300) + 100,
|
|
539
|
+
"main-pricing-label": i.mainPricingLabel,
|
|
540
|
+
onClose: L
|
|
541
|
+
}, null, 8, ["session", "z-index", "main-pricing-label"])) : E("", !0)
|
|
542
|
+
], 64);
|
|
543
|
+
};
|
|
544
|
+
}
|
|
545
|
+
}), Io = {}, Lo = { class: "flex gap-16" };
|
|
546
|
+
function Bo(G, B) {
|
|
547
|
+
return g(), S("div", Lo, [
|
|
548
|
+
Le(G.$slots, "default")
|
|
549
|
+
]);
|
|
550
|
+
}
|
|
551
|
+
const Xe = /* @__PURE__ */ io(Io, [["render", Bo]]), Do = {
|
|
552
|
+
key: 0,
|
|
553
|
+
class: "group-list-nested-sheet-marker sr-only",
|
|
554
|
+
"aria-hidden": "true"
|
|
555
|
+
}, Ao = { class: "mr-auto fm-typo-en-title-md-600" }, Uo = { class: "space-y-24 pt-16" }, Mo = { class: "rounded-md border border-fm-color-neutral-gray-200 px-16 py-12" }, Go = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ko = { class: "fm-typo-en-title-sm-600" }, Ro = { class: "space-y-16" }, jo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ho = {
|
|
556
|
+
key: 0,
|
|
557
|
+
class: "nested-group-editor-sheet-marker sr-only"
|
|
558
|
+
}, Yo = { class: "fm-typo-en-title-md-600" }, Zo = { class: "pt-8 space-y-32" }, qo = { class: "space-y-16" }, Jo = {
|
|
559
|
+
key: 0,
|
|
560
|
+
class: "nested-group-hidden-notice flex gap-8 rounded-md bg-fm-color-system-warning-100 p-12"
|
|
561
|
+
}, Qo = { class: "space-y-4" }, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-system-warning-400" }, Xo = { class: "fm-typo-en-body-md-400 text-fm-color-system-warning-400" }, en = { class: "xs:overflow-x-scroll" }, on = { class: "xs:min-w-[640px]" }, nn = { class: "flex gap-8" }, ln = /* @__PURE__ */ me({
|
|
562
|
+
__name: "NestedGroupOverrideSheets",
|
|
563
|
+
props: {
|
|
564
|
+
sdk: {},
|
|
565
|
+
session: {},
|
|
566
|
+
currencyCode: {}
|
|
567
|
+
},
|
|
568
|
+
emits: ["close"],
|
|
569
|
+
setup(G, { emit: B }) {
|
|
570
|
+
const k = je(
|
|
571
|
+
() => import("./ProductInventoryDialog-fV38GO1a.js")
|
|
572
|
+
), F = G, u = B, { t: o, n: D } = ce(), z = De(), { run: h } = qe();
|
|
573
|
+
function V(l) {
|
|
574
|
+
if (!l) return "";
|
|
575
|
+
const r = D(0, {
|
|
576
|
+
useGrouping: !1,
|
|
577
|
+
minimumFractionDigits: 0,
|
|
578
|
+
maximumFractionDigits: 0
|
|
579
|
+
});
|
|
580
|
+
return D(0, {
|
|
581
|
+
style: "currency",
|
|
582
|
+
currency: l,
|
|
583
|
+
currencyDisplay: "narrowSymbol",
|
|
584
|
+
useGrouping: !1,
|
|
585
|
+
minimumFractionDigits: 0,
|
|
586
|
+
maximumFractionDigits: 0
|
|
587
|
+
}).replace(r, "").trim() || l;
|
|
588
|
+
}
|
|
589
|
+
const d = ne({
|
|
590
|
+
status: "loading"
|
|
591
|
+
}), C = ne(null), t = ne({
|
|
592
|
+
status: "loading"
|
|
593
|
+
}), L = O(() => F.session !== null), Y = O(() => C.value !== null);
|
|
594
|
+
let Z = () => {
|
|
595
|
+
}, q = () => {
|
|
596
|
+
};
|
|
597
|
+
const A = ne(null), m = ne(null), i = ne(""), p = O(
|
|
598
|
+
() => d.value.status === "ready" ? d.value.value : null
|
|
599
|
+
), b = O(
|
|
600
|
+
() => t.value.status === "ready" ? t.value.value : null
|
|
601
|
+
), y = O(() => {
|
|
602
|
+
var l;
|
|
603
|
+
return [
|
|
604
|
+
...((l = b.value) == null ? void 0 : l.options) ?? []
|
|
605
|
+
];
|
|
606
|
+
}), K = O(() => {
|
|
607
|
+
var l;
|
|
608
|
+
return [
|
|
609
|
+
...((l = p.value) == null ? void 0 : l.groups) ?? []
|
|
610
|
+
];
|
|
611
|
+
}), de = O(() => [
|
|
612
|
+
{
|
|
613
|
+
accessorKey: "name",
|
|
614
|
+
header: () => o("menu.group.list.columns.name"),
|
|
615
|
+
enableSorting: !1
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
id: "products",
|
|
619
|
+
header: () => o("menu.group.list.columns.products"),
|
|
620
|
+
enableSorting: !1,
|
|
621
|
+
size: 200,
|
|
622
|
+
cell: (l) => c(
|
|
623
|
+
"div",
|
|
624
|
+
{ class: "line-clamp-2 break-all" },
|
|
625
|
+
l.row.original.products.join(", ")
|
|
626
|
+
)
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
id: "actions",
|
|
630
|
+
header: "",
|
|
631
|
+
size: 52,
|
|
632
|
+
enableSorting: !1,
|
|
633
|
+
cell: (l) => c("div", { class: "flex justify-end" }, [
|
|
634
|
+
c(T.FmButton, {
|
|
635
|
+
"aria-label": o("menu.group.a11y.row", {
|
|
636
|
+
label: o("menu.common.actions.edit"),
|
|
637
|
+
index: l.row.index + 1
|
|
638
|
+
}),
|
|
639
|
+
prependIcon: "edit",
|
|
640
|
+
textColor: "neutral-gray-400",
|
|
641
|
+
variant: "tertiary",
|
|
642
|
+
onClick: () => _e(l.row.original.id)
|
|
643
|
+
})
|
|
644
|
+
])
|
|
645
|
+
}
|
|
646
|
+
]);
|
|
647
|
+
function ie(l, r) {
|
|
648
|
+
return l === null ? "" : D(l, {
|
|
649
|
+
style: "currency",
|
|
650
|
+
currency: r,
|
|
651
|
+
currencyDisplay: "narrowSymbol"
|
|
652
|
+
}).replaceAll(/\s/g, "");
|
|
653
|
+
}
|
|
654
|
+
const I = O(
|
|
655
|
+
() => [
|
|
656
|
+
{
|
|
657
|
+
id: "default",
|
|
658
|
+
size: 35,
|
|
659
|
+
header: () => o("menu.group.option.is_default"),
|
|
660
|
+
enableSorting: !1,
|
|
661
|
+
cell: (l) => c(T.FmCheckbox, {
|
|
662
|
+
"aria-label": o("menu.group.a11y.row", {
|
|
663
|
+
label: o("menu.group.option.is_default"),
|
|
664
|
+
index: l.row.index + 1
|
|
665
|
+
}),
|
|
666
|
+
disabled: l.row.original.orderFrom === "NONE",
|
|
667
|
+
modelValue: l.row.original.isDefault,
|
|
668
|
+
value: l.row.original.id,
|
|
669
|
+
"onUpdate:modelValue": (r) => {
|
|
670
|
+
var $;
|
|
671
|
+
return ($ = C.value) == null ? void 0 : $.setOptionDefault(
|
|
672
|
+
l.row.original.id,
|
|
673
|
+
r,
|
|
674
|
+
l.row.original.target
|
|
675
|
+
);
|
|
676
|
+
}
|
|
677
|
+
})
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
accessorKey: "code",
|
|
681
|
+
size: 100,
|
|
682
|
+
header: () => o("menu.group.option.code"),
|
|
683
|
+
enableSorting: !1
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
id: "title",
|
|
687
|
+
header: () => c("div", { class: "flex items-center w-full gap-8" }, [
|
|
688
|
+
c("span", o("menu.group.option.product_title")),
|
|
689
|
+
// `groupConfig().name` is off for an override, which disables the
|
|
690
|
+
// option translation trigger rather than removing it.
|
|
691
|
+
c(T.FmButton, {
|
|
692
|
+
disabled: !0,
|
|
693
|
+
icon: "g_translate",
|
|
694
|
+
textColor: "neutral-gray-400",
|
|
695
|
+
variant: "tertiary"
|
|
696
|
+
})
|
|
697
|
+
]),
|
|
698
|
+
enableSorting: !1,
|
|
699
|
+
cell: (l) => c(
|
|
700
|
+
"div",
|
|
701
|
+
c(ae, {
|
|
702
|
+
"aria-label": o("menu.group.a11y.row", {
|
|
703
|
+
label: o("menu.group.option.product_title"),
|
|
704
|
+
index: l.row.index + 1
|
|
705
|
+
}),
|
|
706
|
+
class: "min-w-[300px]",
|
|
707
|
+
disabled: !0,
|
|
708
|
+
modelValue: l.row.original.name
|
|
709
|
+
})
|
|
710
|
+
)
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
id: "price",
|
|
714
|
+
size: 400,
|
|
715
|
+
header: () => o("menu.group.option.price", {
|
|
716
|
+
symbol: V(F.currencyCode)
|
|
717
|
+
}),
|
|
718
|
+
enableSorting: !1,
|
|
719
|
+
cell: (l) => {
|
|
720
|
+
const r = l.row.original;
|
|
721
|
+
return c("div", { class: "flex items-center gap-8" }, [
|
|
722
|
+
c(Fe, {
|
|
723
|
+
class: "min-w-[88px]",
|
|
724
|
+
commitOnInput: !0,
|
|
725
|
+
disabled: r.orderFrom === "NONE",
|
|
726
|
+
inputmode: "decimal",
|
|
727
|
+
"aria-label": o("menu.group.a11y.row", {
|
|
728
|
+
label: o("menu.group.option.price", {
|
|
729
|
+
symbol: V(r.currency)
|
|
730
|
+
}),
|
|
731
|
+
index: l.row.index + 1
|
|
732
|
+
}),
|
|
733
|
+
modelValue: r.priceAmount,
|
|
734
|
+
placeholder: ie(
|
|
735
|
+
r.inheritedPriceAmount,
|
|
736
|
+
r.currency
|
|
737
|
+
),
|
|
738
|
+
"onUpdate:modelValue": ($) => {
|
|
739
|
+
var ee;
|
|
740
|
+
return (ee = C.value) == null ? void 0 : ee.setOptionPrice(
|
|
741
|
+
r.id,
|
|
742
|
+
$,
|
|
743
|
+
r.target
|
|
744
|
+
);
|
|
745
|
+
}
|
|
746
|
+
}),
|
|
747
|
+
...r.editPricing.state === "hidden" ? [] : [
|
|
748
|
+
c("div", { class: "flex items-center gap-4" }, [
|
|
749
|
+
c(
|
|
750
|
+
T.FmButton,
|
|
751
|
+
{
|
|
752
|
+
variant: "plain",
|
|
753
|
+
label: o(
|
|
754
|
+
"menu.product.form.member_price.configure.title"
|
|
755
|
+
),
|
|
756
|
+
"aria-label": o("menu.group.a11y.row", {
|
|
757
|
+
label: o(
|
|
758
|
+
"menu.product.form.member_price.configure.title"
|
|
759
|
+
),
|
|
760
|
+
index: l.row.index + 1
|
|
761
|
+
}),
|
|
762
|
+
disabled: r.editPricing.state !== "allowed",
|
|
763
|
+
onClick: () => be(r, "members")
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
default: () => c(
|
|
767
|
+
"span",
|
|
768
|
+
{ class: "underline line-clamp-2 break-all" },
|
|
769
|
+
r.memberPriceCount ? o(
|
|
770
|
+
"menu.product.form.member_price.configure.title_with_tier",
|
|
771
|
+
{ num: r.memberPriceCount }
|
|
772
|
+
) : o(
|
|
773
|
+
"menu.product.form.member_price.configure.title"
|
|
774
|
+
)
|
|
775
|
+
)
|
|
776
|
+
}
|
|
777
|
+
),
|
|
778
|
+
c(Ae, { prices: r.memberPrices })
|
|
779
|
+
])
|
|
780
|
+
]
|
|
781
|
+
]);
|
|
782
|
+
}
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
id: "orderFrom",
|
|
786
|
+
size: 100,
|
|
787
|
+
header: () => o("menu.common.labels.order_from"),
|
|
788
|
+
enableSorting: !1,
|
|
789
|
+
cell: (l) => c(T.FmSelect, {
|
|
790
|
+
"aria-label": o("menu.group.a11y.row", {
|
|
791
|
+
label: o("menu.common.labels.order_from"),
|
|
792
|
+
index: l.row.index + 1
|
|
793
|
+
}),
|
|
794
|
+
items: R.value,
|
|
795
|
+
// FmSelect teleports its menu below this z-index-200 sheet unless
|
|
796
|
+
// it is pinned one above it (as ProductGroupSheet does).
|
|
797
|
+
menuZIndex: 201,
|
|
798
|
+
modelValue: l.row.original.orderFrom,
|
|
799
|
+
shiftMenu: !0,
|
|
800
|
+
"onUpdate:modelValue": (r) => {
|
|
801
|
+
var $;
|
|
802
|
+
r && (($ = C.value) == null || $.setOptionOrderFrom(
|
|
803
|
+
l.row.original.id,
|
|
804
|
+
r,
|
|
805
|
+
l.row.original.target
|
|
806
|
+
));
|
|
807
|
+
}
|
|
808
|
+
})
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
id: "actions",
|
|
812
|
+
size: 80,
|
|
813
|
+
header: "",
|
|
814
|
+
enableSorting: !1,
|
|
815
|
+
meta: { cellClass: "" },
|
|
816
|
+
cell: (l) => {
|
|
817
|
+
const r = l.row.original;
|
|
818
|
+
return c("div", { class: "flex items-center justify-end" }, [
|
|
819
|
+
...r.editPricing.state === "hidden" ? [] : [
|
|
820
|
+
c(Qe, {
|
|
821
|
+
configured: r.hasPriceTiers,
|
|
822
|
+
disabled: r.editPricing.state !== "allowed",
|
|
823
|
+
label: o("menu.group.a11y.row", {
|
|
824
|
+
label: o("menu.price_tier.price_tier_config"),
|
|
825
|
+
index: l.row.index + 1
|
|
826
|
+
}),
|
|
827
|
+
onOpen: () => be(r, "tiers")
|
|
828
|
+
})
|
|
829
|
+
],
|
|
830
|
+
c(T.FmButton, {
|
|
831
|
+
"aria-label": o("menu.group.a11y.row", {
|
|
832
|
+
label: o("menu.inventory.title"),
|
|
833
|
+
index: l.row.index + 1
|
|
834
|
+
}),
|
|
835
|
+
disabled: r.orderFrom === "NONE",
|
|
836
|
+
icon: "inventory_2",
|
|
837
|
+
overwriteIconOutline: r.inventory.bindings.length ? "filled" : "outline",
|
|
838
|
+
textColor: "neutral-gray-400",
|
|
839
|
+
variant: "tertiary",
|
|
840
|
+
onClick: () => ze(r)
|
|
841
|
+
}),
|
|
842
|
+
// A deeper nesting level is outside the approved nested-override
|
|
843
|
+
// scope, so the trigger stays in legacy's disabled state.
|
|
844
|
+
c(T.FmButton, {
|
|
845
|
+
"aria-label": o("menu.group.a11y.row", {
|
|
846
|
+
label: o("menu.group.nested.title"),
|
|
847
|
+
index: l.row.index + 1
|
|
848
|
+
}),
|
|
849
|
+
disabled: !0,
|
|
850
|
+
icon: "arrow_split",
|
|
851
|
+
textColor: "neutral-gray-400",
|
|
852
|
+
variant: "tertiary"
|
|
853
|
+
})
|
|
854
|
+
]);
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
]
|
|
858
|
+
), R = O(() => [
|
|
859
|
+
{ label: o("menu.order.from.options.all"), value: "ALL" },
|
|
860
|
+
{ label: o("menu.order.from.options.pos_only"), value: "POS_ONLY" },
|
|
861
|
+
{ label: o("menu.order.from.options.none"), value: "NONE" }
|
|
862
|
+
]);
|
|
863
|
+
function M() {
|
|
864
|
+
var l;
|
|
865
|
+
(l = A.value) == null || l.dispose(), A.value = null;
|
|
866
|
+
}
|
|
867
|
+
async function Q(l) {
|
|
868
|
+
return (await h(() => F.sdk.priceTier.create(l), {
|
|
869
|
+
successMessage: o("menu.price_tier.add_price_group_success")
|
|
870
|
+
})).kind === "success";
|
|
871
|
+
}
|
|
872
|
+
function W() {
|
|
873
|
+
var l;
|
|
874
|
+
(l = m.value) == null || l.dispose(), m.value = null, i.value = "";
|
|
875
|
+
}
|
|
876
|
+
function be(l, r) {
|
|
877
|
+
var $;
|
|
878
|
+
M(), A.value = (($ = C.value) == null ? void 0 : $.pricingEditor(
|
|
879
|
+
l.id,
|
|
880
|
+
r,
|
|
881
|
+
l.target
|
|
882
|
+
)) ?? null;
|
|
883
|
+
}
|
|
884
|
+
function ze(l) {
|
|
885
|
+
var r;
|
|
886
|
+
W(), i.value = l.name, m.value = ((r = C.value) == null ? void 0 : r.inventoryEditor(l.id, l.target)) ?? null;
|
|
887
|
+
}
|
|
888
|
+
function X() {
|
|
889
|
+
var l, r;
|
|
890
|
+
M(), W(), q(), q = () => {
|
|
891
|
+
}, (l = C.value) == null || l.discard(), (r = C.value) == null || r.dispose(), C.value = null;
|
|
892
|
+
}
|
|
893
|
+
function ve() {
|
|
894
|
+
X(), u("close");
|
|
895
|
+
}
|
|
896
|
+
function _e(l) {
|
|
897
|
+
var $;
|
|
898
|
+
X();
|
|
899
|
+
const r = ($ = F.session) == null ? void 0 : $.editor(l);
|
|
900
|
+
r && (C.value = r, t.value = r.get(), q = r.subscribe(
|
|
901
|
+
(ee) => t.value = ee
|
|
902
|
+
));
|
|
903
|
+
}
|
|
904
|
+
function Ie() {
|
|
905
|
+
var r;
|
|
906
|
+
const l = (r = C.value) == null ? void 0 : r.submit();
|
|
907
|
+
(l == null ? void 0 : l.kind) === "success" && fe();
|
|
908
|
+
}
|
|
909
|
+
function fe() {
|
|
910
|
+
var l;
|
|
911
|
+
q(), q = () => {
|
|
912
|
+
}, (l = C.value) == null || l.dispose(), C.value = null;
|
|
913
|
+
}
|
|
914
|
+
return Ee(
|
|
915
|
+
() => F.session,
|
|
916
|
+
(l) => {
|
|
917
|
+
X(), Z(), Z = () => {
|
|
918
|
+
}, l && (d.value = l.get(), Z = l.subscribe(
|
|
919
|
+
(r) => d.value = r
|
|
920
|
+
));
|
|
921
|
+
},
|
|
922
|
+
{ immediate: !0 }
|
|
923
|
+
), no(() => {
|
|
924
|
+
X(), Z();
|
|
925
|
+
}), (l, r) => {
|
|
926
|
+
const $ = x("FmButton"), ee = x("FmTable"), Ce = x("FmSideSheet"), Se = x("FmStepperField"), e = x("FmSwitch"), a = x("FmIcon"), U = x("FmFormGroup"), le = x("FmHelperText");
|
|
927
|
+
return g(), S(J, null, [
|
|
928
|
+
A.value ? (g(), N(We, {
|
|
929
|
+
key: 0,
|
|
930
|
+
session: A.value,
|
|
931
|
+
"on-create-price-group": Q,
|
|
932
|
+
onClose: M
|
|
933
|
+
}, null, 8, ["session"])) : E("", !0),
|
|
934
|
+
m.value ? (g(), N(n(k), {
|
|
935
|
+
key: 1,
|
|
936
|
+
"product-name": i.value,
|
|
937
|
+
session: m.value,
|
|
938
|
+
onClose: W
|
|
939
|
+
}, null, 8, ["product-name", "session"])) : E("", !0),
|
|
940
|
+
s(Ce, {
|
|
941
|
+
"model-value": L.value,
|
|
942
|
+
"close-button": !1,
|
|
943
|
+
"max-width": 800,
|
|
944
|
+
"z-index": 100,
|
|
945
|
+
"dismiss-away": !Y.value,
|
|
946
|
+
"onUpdate:modelValue": r[0] || (r[0] = (H) => !H && ve())
|
|
947
|
+
}, {
|
|
948
|
+
"side-sheet-header": v(() => [
|
|
949
|
+
s($, {
|
|
950
|
+
"aria-label": n(o)("menu.common.actions.back"),
|
|
951
|
+
icon: "arrow_back",
|
|
952
|
+
variant: "tertiary",
|
|
953
|
+
onClick: ve
|
|
954
|
+
}, null, 8, ["aria-label"]),
|
|
955
|
+
L.value ? (g(), S("span", Do)) : E("", !0),
|
|
956
|
+
_("p", Ao, P(n(o)("menu.group.nested.title")), 1)
|
|
957
|
+
]),
|
|
958
|
+
"side-sheet-footer": v(() => [
|
|
959
|
+
s($, {
|
|
960
|
+
label: n(o)("menu.common.actions.ok"),
|
|
961
|
+
size: "lg",
|
|
962
|
+
onClick: ve
|
|
963
|
+
}, null, 8, ["label"])
|
|
964
|
+
]),
|
|
965
|
+
default: v(() => {
|
|
966
|
+
var H;
|
|
967
|
+
return [
|
|
968
|
+
_("div", Uo, [
|
|
969
|
+
_("div", Mo, [
|
|
970
|
+
_("p", Go, P(n(o)("menu.group.nested.currently_configuring")), 1),
|
|
971
|
+
_("p", Ko, P((H = p.value) == null ? void 0 : H.optionName), 1)
|
|
972
|
+
]),
|
|
973
|
+
_("div", Ro, [
|
|
974
|
+
_("p", jo, P(n(o)("menu.group.nested.subtitle")), 1),
|
|
975
|
+
s(ee, {
|
|
976
|
+
"column-defs": de.value,
|
|
977
|
+
"page-size": K.value.length,
|
|
978
|
+
"row-data": K.value,
|
|
979
|
+
"shrink-at": !1,
|
|
980
|
+
"hide-footer": "",
|
|
981
|
+
"pin-header-row": ""
|
|
982
|
+
}, null, 8, ["column-defs", "page-size", "row-data"])
|
|
983
|
+
])
|
|
984
|
+
])
|
|
985
|
+
];
|
|
986
|
+
}),
|
|
987
|
+
_: 1
|
|
988
|
+
}, 8, ["model-value", "dismiss-away"]),
|
|
989
|
+
s(Ce, {
|
|
990
|
+
"model-value": Y.value,
|
|
991
|
+
"max-width": 800,
|
|
992
|
+
"z-index": 200,
|
|
993
|
+
"onUpdate:modelValue": r[4] || (r[4] = (H) => !H && X())
|
|
994
|
+
}, {
|
|
995
|
+
"side-sheet-header": v(() => [
|
|
996
|
+
Y.value ? (g(), S("span", Ho, P(n(o)("menu.common.labels.nested_group_override")), 1)) : E("", !0),
|
|
997
|
+
_("p", Yo, P(n(o)("menu.group.update")), 1)
|
|
998
|
+
]),
|
|
999
|
+
"side-sheet-footer": v(() => [
|
|
1000
|
+
_("div", nn, [
|
|
1001
|
+
s($, {
|
|
1002
|
+
label: n(o)("menu.common.actions.update"),
|
|
1003
|
+
size: "lg",
|
|
1004
|
+
onClick: Ue(Ie, ["stop"])
|
|
1005
|
+
}, null, 8, ["label"]),
|
|
1006
|
+
s($, {
|
|
1007
|
+
label: n(o)("menu.common.actions.cancel"),
|
|
1008
|
+
size: "lg",
|
|
1009
|
+
variant: "tertiary",
|
|
1010
|
+
onClick: Ue(X, ["stop"])
|
|
1011
|
+
}, null, 8, ["label"])
|
|
1012
|
+
])
|
|
1013
|
+
]),
|
|
1014
|
+
default: v(() => {
|
|
1015
|
+
var H, ye, $e, Pe, Oe;
|
|
1016
|
+
return [
|
|
1017
|
+
_("div", Zo, [
|
|
1018
|
+
s(Ye, null, {
|
|
1019
|
+
default: v(() => {
|
|
1020
|
+
var te;
|
|
1021
|
+
return [
|
|
1022
|
+
s(ae, {
|
|
1023
|
+
disabled: "",
|
|
1024
|
+
label: n(o)("menu.common.labels.group_name"),
|
|
1025
|
+
placeholder: ((te = b.value) == null ? void 0 : te.groupName) ?? ""
|
|
1026
|
+
}, {
|
|
1027
|
+
append: v(() => [
|
|
1028
|
+
s($, {
|
|
1029
|
+
disabled: "",
|
|
1030
|
+
icon: "g_translate",
|
|
1031
|
+
variant: "tertiary"
|
|
1032
|
+
})
|
|
1033
|
+
]),
|
|
1034
|
+
_: 1
|
|
1035
|
+
}, 8, ["label", "placeholder"]),
|
|
1036
|
+
s(Xe, null, {
|
|
1037
|
+
default: v(() => {
|
|
1038
|
+
var oe, pe, re, we, he, xe;
|
|
1039
|
+
return [
|
|
1040
|
+
s(Se, {
|
|
1041
|
+
class: "flex-1",
|
|
1042
|
+
disabled: ((oe = b.value) == null ? void 0 : oe.bounds.state) !== "allowed",
|
|
1043
|
+
"helper-text": ((pe = b.value) == null ? void 0 : pe.bounds.state) === "disabled" ? n(z)(b.value.bounds.reason) : void 0,
|
|
1044
|
+
label: n(o)("menu.common.labels.min_select"),
|
|
1045
|
+
min: 0,
|
|
1046
|
+
"model-value": ((re = b.value) == null ? void 0 : re.min) ?? 0,
|
|
1047
|
+
"onUpdate:modelValue": r[1] || (r[1] = (ge) => {
|
|
1048
|
+
var f;
|
|
1049
|
+
return (f = C.value) == null ? void 0 : f.setMin(ge);
|
|
1050
|
+
})
|
|
1051
|
+
}, null, 8, ["disabled", "helper-text", "label", "model-value"]),
|
|
1052
|
+
s(Se, {
|
|
1053
|
+
class: "flex-1",
|
|
1054
|
+
disabled: ((we = b.value) == null ? void 0 : we.bounds.state) !== "allowed",
|
|
1055
|
+
label: n(o)("menu.common.labels.max_select"),
|
|
1056
|
+
min: ((he = b.value) == null ? void 0 : he.min) ?? 0,
|
|
1057
|
+
"model-value": ((xe = b.value) == null ? void 0 : xe.max) ?? 0,
|
|
1058
|
+
"onUpdate:modelValue": r[2] || (r[2] = (ge) => {
|
|
1059
|
+
var f;
|
|
1060
|
+
return (f = C.value) == null ? void 0 : f.setMax(ge);
|
|
1061
|
+
})
|
|
1062
|
+
}, null, 8, ["disabled", "label", "min", "model-value"])
|
|
1063
|
+
];
|
|
1064
|
+
}),
|
|
1065
|
+
_: 1
|
|
1066
|
+
}),
|
|
1067
|
+
s(Ne, {
|
|
1068
|
+
label: n(o)("menu.common.labels.configuration")
|
|
1069
|
+
}, {
|
|
1070
|
+
default: v(() => {
|
|
1071
|
+
var oe;
|
|
1072
|
+
return [
|
|
1073
|
+
_("div", qo, [
|
|
1074
|
+
s(e, {
|
|
1075
|
+
disabled: "",
|
|
1076
|
+
label: n(o)("menu.common.labels.stackable"),
|
|
1077
|
+
"model-value": ((oe = b.value) == null ? void 0 : oe.stackable) ?? !1,
|
|
1078
|
+
sublabel: n(o)("menu.common.labels.stackable_sublabel"),
|
|
1079
|
+
"label-placement": "right"
|
|
1080
|
+
}, null, 8, ["label", "model-value", "sublabel"]),
|
|
1081
|
+
b.value && b.value.hide.state !== "hidden" ? (g(), N(e, {
|
|
1082
|
+
key: 0,
|
|
1083
|
+
disabled: b.value.hide.state !== "allowed",
|
|
1084
|
+
label: n(o)("menu.common.labels.hide_group"),
|
|
1085
|
+
"model-value": b.value.hidden,
|
|
1086
|
+
sublabel: n(o)("menu.common.labels.hide_group_sublabel_product"),
|
|
1087
|
+
"label-placement": "right",
|
|
1088
|
+
"onUpdate:modelValue": r[3] || (r[3] = (pe) => {
|
|
1089
|
+
var re;
|
|
1090
|
+
return (re = C.value) == null ? void 0 : re.setHidden(!!pe);
|
|
1091
|
+
})
|
|
1092
|
+
}, null, 8, ["disabled", "label", "model-value", "sublabel"])) : E("", !0)
|
|
1093
|
+
])
|
|
1094
|
+
];
|
|
1095
|
+
}),
|
|
1096
|
+
_: 1
|
|
1097
|
+
}, 8, ["label"])
|
|
1098
|
+
];
|
|
1099
|
+
}),
|
|
1100
|
+
_: 1
|
|
1101
|
+
}),
|
|
1102
|
+
(H = b.value) != null && H.hidden ? (g(), S("div", Jo, [
|
|
1103
|
+
s(a, {
|
|
1104
|
+
class: "shrink-0",
|
|
1105
|
+
color: "system-warning-400",
|
|
1106
|
+
name: "visibility_off",
|
|
1107
|
+
outline: "",
|
|
1108
|
+
size: "sm"
|
|
1109
|
+
}),
|
|
1110
|
+
_("div", Qo, [
|
|
1111
|
+
_("p", Wo, P(n(o)("menu.common.labels.hide_group_notice")), 1),
|
|
1112
|
+
_("p", Xo, P(n(o)("menu.common.labels.hide_group_notice_reset")), 1)
|
|
1113
|
+
])
|
|
1114
|
+
])) : E("", !0),
|
|
1115
|
+
s(U, {
|
|
1116
|
+
class: lo([
|
|
1117
|
+
"!gap-16",
|
|
1118
|
+
(ye = b.value) != null && ye.hidden ? "opacity-50 pointer-events-none" : ""
|
|
1119
|
+
]),
|
|
1120
|
+
inert: (($e = b.value) == null ? void 0 : $e.hidden) || void 0,
|
|
1121
|
+
tag: "div",
|
|
1122
|
+
"helper-text": n(o)("menu.common.validation.default_items_tip", {
|
|
1123
|
+
count: y.value.filter((te) => te.isDefault).length,
|
|
1124
|
+
max: ((Pe = b.value) == null ? void 0 : Pe.max) ?? 0
|
|
1125
|
+
}),
|
|
1126
|
+
"model-value": y.value
|
|
1127
|
+
}, {
|
|
1128
|
+
default: v(() => [
|
|
1129
|
+
s(ke, {
|
|
1130
|
+
title: n(o)("menu.group.option.title")
|
|
1131
|
+
}, {
|
|
1132
|
+
default: v(() => [
|
|
1133
|
+
_("div", en, [
|
|
1134
|
+
_("div", on, [
|
|
1135
|
+
s(ee, {
|
|
1136
|
+
"column-defs": I.value,
|
|
1137
|
+
"page-size": Math.max(y.value.length, 1),
|
|
1138
|
+
"row-data": y.value,
|
|
1139
|
+
"shrink-at": !1,
|
|
1140
|
+
"hide-footer": ""
|
|
1141
|
+
}, null, 8, ["column-defs", "page-size", "row-data"])
|
|
1142
|
+
])
|
|
1143
|
+
])
|
|
1144
|
+
]),
|
|
1145
|
+
_: 1
|
|
1146
|
+
}, 8, ["title"])
|
|
1147
|
+
]),
|
|
1148
|
+
_: 1
|
|
1149
|
+
}, 8, ["class", "inert", "helper-text", "model-value"]),
|
|
1150
|
+
(g(!0), S(J, null, ue(((Oe = b.value) == null ? void 0 : Oe.issues) ?? [], (te, oe) => (g(), N(le, {
|
|
1151
|
+
key: `${te.code}-${oe}`,
|
|
1152
|
+
state: "error",
|
|
1153
|
+
text: n(z)(te)
|
|
1154
|
+
}, null, 8, ["text"]))), 128))
|
|
1155
|
+
])
|
|
1156
|
+
];
|
|
1157
|
+
}),
|
|
1158
|
+
_: 1
|
|
1159
|
+
}, 8, ["model-value"])
|
|
1160
|
+
], 64);
|
|
1161
|
+
};
|
|
1162
|
+
}
|
|
1163
|
+
}), tn = { class: "fm-typo-en-title-md-600" }, an = {
|
|
1164
|
+
key: 0,
|
|
1165
|
+
class: "pt-8 space-y-32"
|
|
1166
|
+
}, rn = { class: "xs:overflow-x-scroll" }, sn = { class: "xs:min-w-[640px]" }, un = { class: "flex gap-8 items-center justify-start" }, mn = { class: "fm-typo-en-title-md-600" }, cn = { class: "pt-8 space-y-24" }, dn = { class: "flex gap-8 flex-wrap" }, pn = { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, gn = { class: "flex gap-8" }, On = /* @__PURE__ */ me({
|
|
1167
|
+
__name: "ProductGroupCreateSheet",
|
|
1168
|
+
props: {
|
|
1169
|
+
sdk: {},
|
|
1170
|
+
presentation: {}
|
|
1171
|
+
},
|
|
1172
|
+
emits: ["close", "created"],
|
|
1173
|
+
setup(G, { emit: B }) {
|
|
1174
|
+
const k = je(
|
|
1175
|
+
() => import("./ProductInventoryDialog-fV38GO1a.js")
|
|
1176
|
+
), F = G, u = B, { t: o } = ce(), D = x("i18n-t"), z = De(), { run: h } = qe(), V = He(), d = F.sdk.group.creationEditor(
|
|
1177
|
+
F.presentation === "tree" ? { surface: "editor" } : void 0
|
|
1178
|
+
), C = Be(d), t = O(
|
|
1179
|
+
() => C.value.status === "ready" ? C.value.value : null
|
|
1180
|
+
), L = Ze(() => d), Y = O(
|
|
1181
|
+
() => {
|
|
1182
|
+
var e;
|
|
1183
|
+
return Object.fromEntries(
|
|
1184
|
+
Object.entries(((e = t.value) == null ? void 0 : e.attributeValueOptions) ?? {}).map(
|
|
1185
|
+
([a, U]) => [a, [...U]]
|
|
1186
|
+
)
|
|
1187
|
+
);
|
|
1188
|
+
}
|
|
1189
|
+
), Z = Be(F.sdk.linkProduct.catalogue), q = O(
|
|
1190
|
+
() => Z.value.status === "ready" ? Z.value.value : null
|
|
1191
|
+
), A = se(!1), m = se({}), i = O(
|
|
1192
|
+
() => {
|
|
1193
|
+
var e;
|
|
1194
|
+
return (((e = t.value) == null ? void 0 : e.options) ?? []).map((a) => ({
|
|
1195
|
+
...a,
|
|
1196
|
+
subRows: a.variants
|
|
1197
|
+
}));
|
|
1198
|
+
}
|
|
1199
|
+
), p = O(
|
|
1200
|
+
() => Math.max(
|
|
1201
|
+
i.value.reduce(
|
|
1202
|
+
(e, a) => e + 1 + a.subRows.length,
|
|
1203
|
+
0
|
|
1204
|
+
),
|
|
1205
|
+
1
|
|
1206
|
+
)
|
|
1207
|
+
), b = (e) => e.combinationKey ? `${e.id}:${e.combinationKey}` : e.id, y = (e, a, U, le) => e.combinationKey ? o("menu.common.labels.a11y_labelled_name", {
|
|
1208
|
+
label: o(U),
|
|
1209
|
+
name: e.name || e.inheritedName
|
|
1210
|
+
}) : le ? o(le, { index: a + 1 }) : o("menu.group.a11y.row", { label: o(U), index: a + 1 });
|
|
1211
|
+
function K(e) {
|
|
1212
|
+
d.setProducts([...e]), A.value = !1;
|
|
1213
|
+
}
|
|
1214
|
+
function de() {
|
|
1215
|
+
d.cancelTranslation();
|
|
1216
|
+
}
|
|
1217
|
+
function ie() {
|
|
1218
|
+
var e;
|
|
1219
|
+
if (!((e = t.value) != null && e.translationDirty)) {
|
|
1220
|
+
d.cancelTranslation();
|
|
1221
|
+
return;
|
|
1222
|
+
}
|
|
1223
|
+
V.open({
|
|
1224
|
+
title: o("menu.common.dialog.discard.title"),
|
|
1225
|
+
message: o("menu.common.dialog.discard.message"),
|
|
1226
|
+
primaryActions: {
|
|
1227
|
+
text: o("menu.common.actions.discard"),
|
|
1228
|
+
close: !0,
|
|
1229
|
+
variant: "destructive"
|
|
1230
|
+
},
|
|
1231
|
+
secondaryActions: {
|
|
1232
|
+
text: o("menu.common.actions.cancel"),
|
|
1233
|
+
close: !0
|
|
1234
|
+
}
|
|
1235
|
+
}).onPrimary(() => d.cancelTranslation());
|
|
1236
|
+
}
|
|
1237
|
+
const I = ne(null), R = ne(null), M = se(""), Q = ne(null);
|
|
1238
|
+
function W() {
|
|
1239
|
+
var e;
|
|
1240
|
+
(e = I.value) == null || e.dispose(), I.value = null;
|
|
1241
|
+
}
|
|
1242
|
+
function be(e, a) {
|
|
1243
|
+
W(), I.value = d.pricingEditor(
|
|
1244
|
+
e.id,
|
|
1245
|
+
a,
|
|
1246
|
+
e.combinationKey
|
|
1247
|
+
);
|
|
1248
|
+
}
|
|
1249
|
+
async function ze(e) {
|
|
1250
|
+
return (await h(() => F.sdk.priceTier.create(e), {
|
|
1251
|
+
successMessage: o("menu.price_tier.add_price_group_success")
|
|
1252
|
+
})).kind === "success";
|
|
1253
|
+
}
|
|
1254
|
+
function X() {
|
|
1255
|
+
var e;
|
|
1256
|
+
(e = R.value) == null || e.dispose(), R.value = null, M.value = "";
|
|
1257
|
+
}
|
|
1258
|
+
function ve(e) {
|
|
1259
|
+
X(), M.value = e.name || e.inheritedName, R.value = d.inventoryEditor(e.id, e.combinationKey);
|
|
1260
|
+
}
|
|
1261
|
+
function _e() {
|
|
1262
|
+
var e;
|
|
1263
|
+
(e = Q.value) == null || e.dispose(), Q.value = null;
|
|
1264
|
+
}
|
|
1265
|
+
function Ie(e) {
|
|
1266
|
+
_e(), Q.value = d.nestedOverrides(e.id, e.combinationKey);
|
|
1267
|
+
}
|
|
1268
|
+
Re(() => {
|
|
1269
|
+
W(), X(), _e(), d.dispose();
|
|
1270
|
+
});
|
|
1271
|
+
const fe = (e) => t.value ? L.issue(t.value.fieldIssues, e) ?? t.value.issues.find((a) => a.field === e) : void 0, l = (e) => {
|
|
1272
|
+
const a = fe(e);
|
|
1273
|
+
return a ? z(a) : "";
|
|
1274
|
+
}, r = ["NORMAL", "PRODUCT", "DYNAMIC"], $ = se(0);
|
|
1275
|
+
function ee() {
|
|
1276
|
+
d.confirmTypeChange(!1), $.value += 1;
|
|
1277
|
+
}
|
|
1278
|
+
Ee(
|
|
1279
|
+
() => {
|
|
1280
|
+
var e;
|
|
1281
|
+
return (e = t.value) == null ? void 0 : e.typeChange;
|
|
1282
|
+
},
|
|
1283
|
+
(e) => {
|
|
1284
|
+
e && V.open({
|
|
1285
|
+
title: o("menu.common.dialog.change_type.title"),
|
|
1286
|
+
message: o("menu.common.dialog.change_type.message"),
|
|
1287
|
+
primaryActions: { text: o("menu.common.actions.yes"), close: !0 },
|
|
1288
|
+
secondaryActions: { text: o("menu.common.actions.no"), close: !0 }
|
|
1289
|
+
}).onPrimary(() => d.confirmTypeChange(!0)).onSecondary(() => ee()).onClose(() => ee());
|
|
1290
|
+
}
|
|
1291
|
+
);
|
|
1292
|
+
async function Ce() {
|
|
1293
|
+
var U;
|
|
1294
|
+
const e = ((U = t.value) == null ? void 0 : U.name) ?? "";
|
|
1295
|
+
(await h(() => L.submit(() => d.submit()), {
|
|
1296
|
+
showLoading: () => {
|
|
1297
|
+
var le;
|
|
1298
|
+
return ((le = t.value) == null ? void 0 : le.status) === "submitting";
|
|
1299
|
+
}
|
|
1300
|
+
})).kind === "success" && (u("created", e), u("close"));
|
|
1301
|
+
}
|
|
1302
|
+
const Se = O(() => [
|
|
1303
|
+
{
|
|
1304
|
+
accessorKey: "isDefault",
|
|
1305
|
+
size: 35,
|
|
1306
|
+
header: () => o("menu.group.option.is_default"),
|
|
1307
|
+
enableSorting: !1,
|
|
1308
|
+
cell: (e) => (
|
|
1309
|
+
// A product with variants has no default of its own; its
|
|
1310
|
+
// combinations do (OptionTable.vue:143-145).
|
|
1311
|
+
e.row.original.variants.length ? null : c(T.FmCheckbox, {
|
|
1312
|
+
modelValue: e.row.original.isDefault,
|
|
1313
|
+
value: b(e.row.original),
|
|
1314
|
+
"aria-label": y(
|
|
1315
|
+
e.row.original,
|
|
1316
|
+
e.row.index,
|
|
1317
|
+
"menu.group.option.is_default"
|
|
1318
|
+
),
|
|
1319
|
+
"onUpdate:modelValue": (a) => {
|
|
1320
|
+
d.setOption(
|
|
1321
|
+
e.row.original.id,
|
|
1322
|
+
{ isDefault: a },
|
|
1323
|
+
e.row.original.combinationKey
|
|
1324
|
+
), L.touch("options");
|
|
1325
|
+
}
|
|
1326
|
+
})
|
|
1327
|
+
)
|
|
1328
|
+
},
|
|
1329
|
+
{
|
|
1330
|
+
accessorKey: "code",
|
|
1331
|
+
size: 100,
|
|
1332
|
+
header: () => o("menu.group.option.code"),
|
|
1333
|
+
enableSorting: !1,
|
|
1334
|
+
cell: (e) => c("div", { class: "break-all max-w-[100px]" }, e.row.original.code)
|
|
1335
|
+
},
|
|
1336
|
+
{
|
|
1337
|
+
accessorKey: "name",
|
|
1338
|
+
header: () => {
|
|
1339
|
+
var e;
|
|
1340
|
+
return c("div", { class: "flex items-center w-full gap-8" }, [
|
|
1341
|
+
c("span", o("menu.group.option.product_title")),
|
|
1342
|
+
((e = t.value) == null ? void 0 : e.showTranslation) === !1 ? null : c(T.FmButton, {
|
|
1343
|
+
icon: "g_translate",
|
|
1344
|
+
variant: "tertiary",
|
|
1345
|
+
textColor: "neutral-gray-400",
|
|
1346
|
+
// Distinct from the group-name translate button below, AND from
|
|
1347
|
+
// every field's own name: `getByLabel` is substring-matching, so
|
|
1348
|
+
// "Translate group name" made the "Group name" textbox resolve two
|
|
1349
|
+
// elements and the frozen create input could not run at all. Both
|
|
1350
|
+
// are named so that no control's accessible name contains another's
|
|
1351
|
+
// (including the collision that the first renaming created).
|
|
1352
|
+
// Distinct from the group-name translate button below: both are
|
|
1353
|
+
// `g_translate` FmButtons inside one side sheet, and one shared
|
|
1354
|
+
// name made two controls of one role indistinguishable — the same
|
|
1355
|
+
// ADR-0003 §1 condition as on the option cells. Neither name is
|
|
1356
|
+
// visible, so this changes no rendering.
|
|
1357
|
+
"aria-label": o("menu.group.translation.translate_options"),
|
|
1358
|
+
onClick: () => d.beginTranslation("options")
|
|
1359
|
+
})
|
|
1360
|
+
]);
|
|
1361
|
+
},
|
|
1362
|
+
enableSorting: !1,
|
|
1363
|
+
cell: (e) => c(
|
|
1364
|
+
ae,
|
|
1365
|
+
{
|
|
1366
|
+
class: "min-w-[300px]",
|
|
1367
|
+
modelValue: e.row.original.name,
|
|
1368
|
+
placeholder: e.row.original.inheritedName,
|
|
1369
|
+
errorMessages: fe(`option.${e.row.original.id}.name`) ? [l(`option.${e.row.original.id}.name`)] : [],
|
|
1370
|
+
// Named PER ROW: "Option 1 title", "Option 2 title", …
|
|
1371
|
+
//
|
|
1372
|
+
// The accessible name is an addition the MIGRATED app owns — legacy
|
|
1373
|
+
// renders these cells unlabelled, with no accessible name at all, so
|
|
1374
|
+
// nothing here is matched to legacy's DOM. One shared name was the
|
|
1375
|
+
// first attempt and it could not work: after the second "Add option"
|
|
1376
|
+
// two textboxes answer to it, so a locator that must resolve one
|
|
1377
|
+
// element fails. The index has to lead rather than trail, because
|
|
1378
|
+
// `getByLabel` is substring-matching — "Option title 1"
|
|
1379
|
+
// and "Option title 2" would both still match a recorded
|
|
1380
|
+
// "Option title", while "Option 1 title" is not a substring of
|
|
1381
|
+
// "Option 2 title". Owner-approved 2026-09-08 together with the
|
|
1382
|
+
// baseline refresh that re-records the four steps against these names.
|
|
1383
|
+
//
|
|
1384
|
+
// The visible column header stays "Title", which is what the golden
|
|
1385
|
+
// shows; this is the accessible name only.
|
|
1386
|
+
"aria-label": y(
|
|
1387
|
+
e.row.original,
|
|
1388
|
+
e.row.index,
|
|
1389
|
+
"menu.group.option.product_title",
|
|
1390
|
+
"menu.group.option.option_title_numbered"
|
|
1391
|
+
),
|
|
1392
|
+
...L.field(
|
|
1393
|
+
`option.${e.row.original.id}.name`,
|
|
1394
|
+
(a) => d.setOption(
|
|
1395
|
+
e.row.original.id,
|
|
1396
|
+
{ name: a },
|
|
1397
|
+
e.row.original.combinationKey
|
|
1398
|
+
)
|
|
1399
|
+
)
|
|
1400
|
+
},
|
|
1401
|
+
e.row.original.variants.length ? {
|
|
1402
|
+
// Legacy puts the toggle inside the title field
|
|
1403
|
+
// (OptionTable.vue:228-243).
|
|
1404
|
+
append: () => c(
|
|
1405
|
+
"button",
|
|
1406
|
+
{
|
|
1407
|
+
type: "button",
|
|
1408
|
+
class: "flex",
|
|
1409
|
+
"aria-label": o(
|
|
1410
|
+
e.row.getIsExpanded() ? "menu.apply_product.table.collapse_combinations" : "menu.apply_product.table.expand_combinations",
|
|
1411
|
+
{
|
|
1412
|
+
name: e.row.original.name || e.row.original.inheritedName
|
|
1413
|
+
}
|
|
1414
|
+
),
|
|
1415
|
+
onClick: e.row.getToggleExpandedHandler()
|
|
1416
|
+
},
|
|
1417
|
+
c(T.FmIcon, {
|
|
1418
|
+
name: "keyboard_arrow_up",
|
|
1419
|
+
// Down while collapsed, up once expanded.
|
|
1420
|
+
class: [
|
|
1421
|
+
"cursor-pointer transition-transform",
|
|
1422
|
+
e.row.getIsExpanded() ? "" : "rotate-180"
|
|
1423
|
+
]
|
|
1424
|
+
})
|
|
1425
|
+
)
|
|
1426
|
+
} : void 0
|
|
1427
|
+
)
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
accessorKey: "priceAmount",
|
|
1431
|
+
size: 400,
|
|
1432
|
+
header: () => c(
|
|
1433
|
+
D,
|
|
1434
|
+
{ keypath: "menu.group.option.price", tag: "span" },
|
|
1435
|
+
{
|
|
1436
|
+
symbol: () => {
|
|
1437
|
+
var e;
|
|
1438
|
+
return c(Je, { currency: (e = t.value) == null ? void 0 : e.currency });
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
),
|
|
1442
|
+
enableSorting: !1,
|
|
1443
|
+
cell: (e) => (
|
|
1444
|
+
// Legacy wraps the price control in `flex items-center gap-8`
|
|
1445
|
+
// (`portal .../GroupManager/OptionTable.vue:290`), so the input takes
|
|
1446
|
+
// its natural width inside the 400px column instead of stretching to
|
|
1447
|
+
// fill it. Without the wrapper the field runs ~127px wider than the
|
|
1448
|
+
// frozen `group/v3-create/form-normal` golden shows.
|
|
1449
|
+
c("div", { class: "flex items-center gap-8" }, [
|
|
1450
|
+
c(Fe, {
|
|
1451
|
+
modelValue: e.row.original.priceAmount,
|
|
1452
|
+
// Indexed for the same reason as the title above; the visible
|
|
1453
|
+
// header keeps its currency symbol.
|
|
1454
|
+
"aria-label": y(
|
|
1455
|
+
e.row.original,
|
|
1456
|
+
e.row.index,
|
|
1457
|
+
"menu.group.option.price",
|
|
1458
|
+
"menu.group.option.option_price_numbered"
|
|
1459
|
+
),
|
|
1460
|
+
"onUpdate:modelValue": (a) => d.setOption(
|
|
1461
|
+
e.row.original.id,
|
|
1462
|
+
{ priceAmount: a },
|
|
1463
|
+
e.row.original.combinationKey
|
|
1464
|
+
)
|
|
1465
|
+
}),
|
|
1466
|
+
// Legacy's member-price form beside the price, V4 only
|
|
1467
|
+
// (`OptionTable.vue:333-382`); a row that cannot sell keeps it,
|
|
1468
|
+
// disabled.
|
|
1469
|
+
...e.row.original.editPricing.state !== "hidden" ? [
|
|
1470
|
+
c("div", { class: "flex items-center gap-4" }, [
|
|
1471
|
+
c(
|
|
1472
|
+
T.FmButton,
|
|
1473
|
+
{
|
|
1474
|
+
variant: "plain",
|
|
1475
|
+
label: o(
|
|
1476
|
+
"menu.product.form.member_price.configure.title"
|
|
1477
|
+
),
|
|
1478
|
+
"aria-label": y(
|
|
1479
|
+
e.row.original,
|
|
1480
|
+
e.row.index,
|
|
1481
|
+
"menu.product.form.member_price.configure.title"
|
|
1482
|
+
),
|
|
1483
|
+
disabled: e.row.original.editPricing.state !== "allowed",
|
|
1484
|
+
onClick: () => be(e.row.original, "members")
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
default: () => c(
|
|
1488
|
+
"span",
|
|
1489
|
+
{ class: "underline line-clamp-2 break-all" },
|
|
1490
|
+
e.row.original.memberPriceCount ? o(
|
|
1491
|
+
"menu.product.form.member_price.configure.title_with_tier",
|
|
1492
|
+
{ num: e.row.original.memberPriceCount }
|
|
1493
|
+
) : o(
|
|
1494
|
+
"menu.product.form.member_price.configure.title"
|
|
1495
|
+
)
|
|
1496
|
+
)
|
|
1497
|
+
}
|
|
1498
|
+
),
|
|
1499
|
+
c(Ae, {
|
|
1500
|
+
prices: e.row.original.memberPrices
|
|
1501
|
+
})
|
|
1502
|
+
])
|
|
1503
|
+
] : []
|
|
1504
|
+
])
|
|
1505
|
+
)
|
|
1506
|
+
},
|
|
1507
|
+
{
|
|
1508
|
+
accessorKey: "orderFrom",
|
|
1509
|
+
size: 100,
|
|
1510
|
+
header: () => o("menu.common.labels.order_from"),
|
|
1511
|
+
enableSorting: !1,
|
|
1512
|
+
cell: (e) => c(T.FmSelect, {
|
|
1513
|
+
modelValue: e.row.original.orderFrom,
|
|
1514
|
+
disabled: !e.row.original.editOrderFrom,
|
|
1515
|
+
"aria-label": y(
|
|
1516
|
+
e.row.original,
|
|
1517
|
+
e.row.index,
|
|
1518
|
+
"menu.common.labels.order_from"
|
|
1519
|
+
),
|
|
1520
|
+
items: ["ALL", "POS_ONLY", "NONE"].map((a) => ({
|
|
1521
|
+
value: a,
|
|
1522
|
+
label: o(so[a])
|
|
1523
|
+
})),
|
|
1524
|
+
"onUpdate:modelValue": (a) => d.setOption(
|
|
1525
|
+
e.row.original.id,
|
|
1526
|
+
{ orderFrom: a },
|
|
1527
|
+
e.row.original.combinationKey
|
|
1528
|
+
)
|
|
1529
|
+
})
|
|
1530
|
+
},
|
|
1531
|
+
{
|
|
1532
|
+
id: "action",
|
|
1533
|
+
meta: { cellClass: "" },
|
|
1534
|
+
size: 80,
|
|
1535
|
+
enableSorting: !1,
|
|
1536
|
+
cell: (e) => c("div", { class: "flex items-center justify-end" }, [
|
|
1537
|
+
// Legacy's price-tier button, V4 only (`OptionTable.vue:505-524`).
|
|
1538
|
+
...e.row.original.editPricing.state !== "hidden" ? [
|
|
1539
|
+
c(Qe, {
|
|
1540
|
+
configured: e.row.original.hasPriceTiers,
|
|
1541
|
+
disabled: e.row.original.editPricing.state !== "allowed",
|
|
1542
|
+
label: y(
|
|
1543
|
+
e.row.original,
|
|
1544
|
+
e.row.index,
|
|
1545
|
+
"menu.price_tier.price_tier_config"
|
|
1546
|
+
),
|
|
1547
|
+
onOpen: () => be(e.row.original, "tiers")
|
|
1548
|
+
})
|
|
1549
|
+
] : [],
|
|
1550
|
+
// Inventory binding: every V4 row and, on V3, a NORMAL group's rows
|
|
1551
|
+
// (`AddForm.vue` `inventory`). The icon fills once a binding is
|
|
1552
|
+
// staged (`OptionTable.vue:556`).
|
|
1553
|
+
...e.row.original.editInventory.state !== "hidden" ? [
|
|
1554
|
+
c(T.FmButton, {
|
|
1555
|
+
prependIcon: "inventory_2",
|
|
1556
|
+
overwriteIconOutline: e.row.original.inventoryBound ? "filled" : "outline",
|
|
1557
|
+
variant: "tertiary",
|
|
1558
|
+
textColor: "neutral-gray-400",
|
|
1559
|
+
disabled: e.row.original.editInventory.state !== "allowed",
|
|
1560
|
+
"aria-label": y(
|
|
1561
|
+
e.row.original,
|
|
1562
|
+
e.row.index,
|
|
1563
|
+
"menu.group.option.inventory"
|
|
1564
|
+
),
|
|
1565
|
+
onClick: () => ve(e.row.original)
|
|
1566
|
+
})
|
|
1567
|
+
] : [],
|
|
1568
|
+
// Legacy keeps the nested-group button on every row, badged with the
|
|
1569
|
+
// count and enabled where the row's product links a group
|
|
1570
|
+
// (`OptionTable.vue:466-496`).
|
|
1571
|
+
...e.row.original.nestedGroupCount ? [
|
|
1572
|
+
c(
|
|
1573
|
+
T.FmBadge,
|
|
1574
|
+
{
|
|
1575
|
+
class: "bg-fm-color-primary text-fm-color-neutral-white !right-0 !top-0",
|
|
1576
|
+
value: e.row.original.nestedGroupCount
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
default: () => c(T.FmButton, {
|
|
1580
|
+
prependIcon: "arrow_split",
|
|
1581
|
+
variant: "tertiary",
|
|
1582
|
+
textColor: "neutral-gray-400",
|
|
1583
|
+
disabled: e.row.original.editNested.state !== "allowed",
|
|
1584
|
+
"aria-label": y(
|
|
1585
|
+
e.row.original,
|
|
1586
|
+
e.row.index,
|
|
1587
|
+
"menu.group.nested.title"
|
|
1588
|
+
),
|
|
1589
|
+
onClick: () => Ie(e.row.original)
|
|
1590
|
+
})
|
|
1591
|
+
}
|
|
1592
|
+
)
|
|
1593
|
+
] : [
|
|
1594
|
+
c(T.FmButton, {
|
|
1595
|
+
prependIcon: "arrow_split",
|
|
1596
|
+
variant: "tertiary",
|
|
1597
|
+
textColor: "neutral-gray-400",
|
|
1598
|
+
disabled: !0,
|
|
1599
|
+
"aria-label": y(
|
|
1600
|
+
e.row.original,
|
|
1601
|
+
e.row.index,
|
|
1602
|
+
"menu.group.nested.title"
|
|
1603
|
+
)
|
|
1604
|
+
})
|
|
1605
|
+
],
|
|
1606
|
+
c(T.FmButton, {
|
|
1607
|
+
prependIcon: "delete",
|
|
1608
|
+
variant: "tertiary",
|
|
1609
|
+
textColor: "neutral-gray-400",
|
|
1610
|
+
"aria-label": y(
|
|
1611
|
+
e.row.original,
|
|
1612
|
+
e.row.index,
|
|
1613
|
+
"menu.common.actions.remove"
|
|
1614
|
+
),
|
|
1615
|
+
// A combination is removed with its product (OptionTable.vue:547-556).
|
|
1616
|
+
disabled: !!e.row.original.combinationKey,
|
|
1617
|
+
onClick: () => d.removeOption(e.row.original.id)
|
|
1618
|
+
})
|
|
1619
|
+
])
|
|
1620
|
+
}
|
|
1621
|
+
]);
|
|
1622
|
+
return (e, a) => {
|
|
1623
|
+
var we, he, xe, ge;
|
|
1624
|
+
const U = x("FmButton"), le = x("FmTooltip"), H = x("FmStepperField"), ye = x("FmFormGroup"), $e = x("FmRadio"), Pe = x("FmRadioGroup"), Oe = x("FmSwitch"), te = x("FmTable"), oe = x("FmSideSheet"), pe = x("FmChip"), re = x("FmSelect");
|
|
1625
|
+
return g(), S(J, null, [
|
|
1626
|
+
s(oe, {
|
|
1627
|
+
"model-value": !0,
|
|
1628
|
+
"max-width": e.presentation === "tree" ? 720 : 800,
|
|
1629
|
+
"is-container": n(T).FmForm,
|
|
1630
|
+
"is-container-props": { onValidationSuccess: Ce },
|
|
1631
|
+
"onUpdate:modelValue": a[9] || (a[9] = (f) => !f && u("close"))
|
|
1632
|
+
}, {
|
|
1633
|
+
"side-sheet-header": v(() => [
|
|
1634
|
+
_("p", tn, P(n(o)("menu.group.add")), 1)
|
|
1635
|
+
]),
|
|
1636
|
+
"side-sheet-footer": v(() => {
|
|
1637
|
+
var f;
|
|
1638
|
+
return [
|
|
1639
|
+
_("div", un, [
|
|
1640
|
+
s(U, {
|
|
1641
|
+
label: n(o)("menu.common.actions.add"),
|
|
1642
|
+
disabled: ((f = t.value) == null ? void 0 : f.submit.state) !== "allowed",
|
|
1643
|
+
size: "lg",
|
|
1644
|
+
type: "submit",
|
|
1645
|
+
variant: "primary"
|
|
1646
|
+
}, null, 8, ["label", "disabled"]),
|
|
1647
|
+
s(U, {
|
|
1648
|
+
label: n(o)("menu.common.actions.cancel"),
|
|
1649
|
+
size: "lg",
|
|
1650
|
+
variant: "tertiary",
|
|
1651
|
+
onClick: a[8] || (a[8] = (w) => u("close"))
|
|
1652
|
+
}, null, 8, ["label"])
|
|
1653
|
+
])
|
|
1654
|
+
];
|
|
1655
|
+
}),
|
|
1656
|
+
default: v(() => [
|
|
1657
|
+
t.value ? (g(), S("div", an, [
|
|
1658
|
+
s(Ye, null, {
|
|
1659
|
+
default: v(() => {
|
|
1660
|
+
var f;
|
|
1661
|
+
return [
|
|
1662
|
+
s(ae, Te({
|
|
1663
|
+
autofocus: "",
|
|
1664
|
+
label: n(o)("menu.common.labels.group_name"),
|
|
1665
|
+
"model-value": t.value.name,
|
|
1666
|
+
"error-messages": fe("name") ? [l("name")] : []
|
|
1667
|
+
}, n(L).field("name", n(d).setName)), Ke({ _: 2 }, [
|
|
1668
|
+
t.value.showTranslation !== !1 ? {
|
|
1669
|
+
name: "append",
|
|
1670
|
+
fn: v(() => [
|
|
1671
|
+
s(le, {
|
|
1672
|
+
variant: "plain",
|
|
1673
|
+
placement: "top",
|
|
1674
|
+
"z-index": 999
|
|
1675
|
+
}, {
|
|
1676
|
+
default: v(() => [
|
|
1677
|
+
s(U, {
|
|
1678
|
+
variant: "tertiary",
|
|
1679
|
+
icon: "g_translate",
|
|
1680
|
+
disabled: !t.value.canTranslateName,
|
|
1681
|
+
"aria-label": n(o)("menu.group.translation.translate_name"),
|
|
1682
|
+
onClick: a[0] || (a[0] = (w) => n(d).beginTranslation("group"))
|
|
1683
|
+
}, null, 8, ["disabled", "aria-label"])
|
|
1684
|
+
]),
|
|
1685
|
+
_: 1
|
|
1686
|
+
})
|
|
1687
|
+
]),
|
|
1688
|
+
key: "0"
|
|
1689
|
+
} : void 0
|
|
1690
|
+
]), 1040, ["label", "model-value", "error-messages"]),
|
|
1691
|
+
s(ye, {
|
|
1692
|
+
"model-value": `${t.value.min} ${t.value.max}`,
|
|
1693
|
+
invalid: !!l("bounds"),
|
|
1694
|
+
"helper-text": l("bounds")
|
|
1695
|
+
}, {
|
|
1696
|
+
default: v(() => [
|
|
1697
|
+
s(Xe, null, {
|
|
1698
|
+
default: v(() => [
|
|
1699
|
+
s(H, Te({
|
|
1700
|
+
class: "flex-1",
|
|
1701
|
+
min: 0,
|
|
1702
|
+
label: n(o)("menu.common.labels.min_select"),
|
|
1703
|
+
"model-value": t.value.min
|
|
1704
|
+
}, n(L).field("bounds", n(d).setMin)), null, 16, ["label", "model-value"]),
|
|
1705
|
+
s(H, Te({
|
|
1706
|
+
class: "flex-1",
|
|
1707
|
+
min: t.value.min,
|
|
1708
|
+
label: n(o)("menu.common.labels.max_select"),
|
|
1709
|
+
"model-value": t.value.max
|
|
1710
|
+
}, n(L).field("bounds", n(d).setMax)), null, 16, ["min", "label", "model-value"])
|
|
1711
|
+
]),
|
|
1712
|
+
_: 1
|
|
1713
|
+
})
|
|
1714
|
+
]),
|
|
1715
|
+
_: 1
|
|
1716
|
+
}, 8, ["model-value", "invalid", "helper-text"]),
|
|
1717
|
+
t.value.showType ? (g(), N(Ne, {
|
|
1718
|
+
key: 0,
|
|
1719
|
+
label: n(o)("menu.common.labels.group_type")
|
|
1720
|
+
}, {
|
|
1721
|
+
default: v(() => [
|
|
1722
|
+
(g(), N(Pe, {
|
|
1723
|
+
key: $.value,
|
|
1724
|
+
"model-value": t.value.type,
|
|
1725
|
+
"onUpdate:modelValue": a[1] || (a[1] = (w) => n(d).setType(w))
|
|
1726
|
+
}, {
|
|
1727
|
+
default: v(() => [
|
|
1728
|
+
(g(), S(J, null, ue(r, (w) => s($e, {
|
|
1729
|
+
key: w,
|
|
1730
|
+
value: w,
|
|
1731
|
+
label: n(o)(n(uo)[w])
|
|
1732
|
+
}, null, 8, ["value", "label"])), 64))
|
|
1733
|
+
]),
|
|
1734
|
+
_: 1
|
|
1735
|
+
}, 8, ["model-value"]))
|
|
1736
|
+
]),
|
|
1737
|
+
_: 1
|
|
1738
|
+
}, 8, ["label"])) : E("", !0),
|
|
1739
|
+
s(Ne, {
|
|
1740
|
+
label: n(o)("menu.common.labels.configuration")
|
|
1741
|
+
}, {
|
|
1742
|
+
default: v(() => [
|
|
1743
|
+
s(Oe, {
|
|
1744
|
+
"model-value": t.value.stackable,
|
|
1745
|
+
label: n(o)("menu.common.labels.stackable"),
|
|
1746
|
+
"label-placement": "right",
|
|
1747
|
+
sublabel: n(o)("menu.common.labels.stackable_sublabel"),
|
|
1748
|
+
"onUpdate:modelValue": a[2] || (a[2] = (w) => n(d).setStackable(w))
|
|
1749
|
+
}, null, 8, ["model-value", "label", "sublabel"])
|
|
1750
|
+
]),
|
|
1751
|
+
_: 1
|
|
1752
|
+
}, 8, ["label"]),
|
|
1753
|
+
(f = t.value.tagging) != null && f.visible ? (g(), S(J, { key: 1 }, [
|
|
1754
|
+
e.presentation === "tree" ? (g(), N(n(Me), {
|
|
1755
|
+
key: 0,
|
|
1756
|
+
entity: "group",
|
|
1757
|
+
"model-value": t.value.customAttributes ?? {},
|
|
1758
|
+
"value-options": Y.value,
|
|
1759
|
+
"onUpdate:modelValue": a[3] || (a[3] = (w) => n(d).setCustomAttributes(w ?? null))
|
|
1760
|
+
}, null, 8, ["model-value", "value-options"])) : (g(), N(ke, {
|
|
1761
|
+
key: 1,
|
|
1762
|
+
title: n(o)("menu.group.form.tagging.title"),
|
|
1763
|
+
"sub-title": n(o)("menu.group.form.tagging.subtitle")
|
|
1764
|
+
}, {
|
|
1765
|
+
default: v(() => [
|
|
1766
|
+
s(n(Me), {
|
|
1767
|
+
entity: "group",
|
|
1768
|
+
"model-value": t.value.customAttributes ?? {},
|
|
1769
|
+
"value-options": Y.value,
|
|
1770
|
+
"onUpdate:modelValue": a[4] || (a[4] = (w) => n(d).setCustomAttributes(w ?? null))
|
|
1771
|
+
}, null, 8, ["model-value", "value-options"])
|
|
1772
|
+
]),
|
|
1773
|
+
_: 1
|
|
1774
|
+
}, 8, ["title", "sub-title"]))
|
|
1775
|
+
], 64)) : E("", !0)
|
|
1776
|
+
];
|
|
1777
|
+
}),
|
|
1778
|
+
_: 1
|
|
1779
|
+
}),
|
|
1780
|
+
s(ye, {
|
|
1781
|
+
tag: "div",
|
|
1782
|
+
"model-value": t.value.options,
|
|
1783
|
+
invalid: !!l("options"),
|
|
1784
|
+
"helper-text": l("options") || n(o)("menu.common.validation.default_items_tip", {
|
|
1785
|
+
count: t.value.defaultCount,
|
|
1786
|
+
max: t.value.max
|
|
1787
|
+
})
|
|
1788
|
+
}, {
|
|
1789
|
+
default: v(() => [
|
|
1790
|
+
s(ke, {
|
|
1791
|
+
title: n(o)("menu.group.option.title"),
|
|
1792
|
+
"sub-title": t.value.linkProducts && e.presentation !== "tree" ? n(o)("menu.group.option.subtitle") : ""
|
|
1793
|
+
}, {
|
|
1794
|
+
"append-title": v(() => [
|
|
1795
|
+
s(U, {
|
|
1796
|
+
variant: "secondary",
|
|
1797
|
+
"text-color": "primary",
|
|
1798
|
+
"border-color": "primary",
|
|
1799
|
+
"prepend-icon": t.value.linkProducts ? "link" : "add",
|
|
1800
|
+
label: n(o)(
|
|
1801
|
+
t.value.linkProducts ? "menu.group.option.link_products" : "menu.group.option.add_option"
|
|
1802
|
+
),
|
|
1803
|
+
onClick: a[5] || (a[5] = (f) => t.value.linkProducts ? A.value = !0 : n(d).addOption())
|
|
1804
|
+
}, null, 8, ["prepend-icon", "label"])
|
|
1805
|
+
]),
|
|
1806
|
+
default: v(() => [
|
|
1807
|
+
_("div", rn, [
|
|
1808
|
+
_("div", sn, [
|
|
1809
|
+
s(te, {
|
|
1810
|
+
draggable: "",
|
|
1811
|
+
onDndChanged: a[6] || (a[6] = (f) => n(d).reorderOptions(
|
|
1812
|
+
f.map((w) => w.id)
|
|
1813
|
+
)),
|
|
1814
|
+
"column-defs": Se.value,
|
|
1815
|
+
"column-visibility": {
|
|
1816
|
+
code: t.value.showCode,
|
|
1817
|
+
priceAmount: t.value.showPrice,
|
|
1818
|
+
orderFrom: t.value.showOrderFrom
|
|
1819
|
+
},
|
|
1820
|
+
"row-data": i.value,
|
|
1821
|
+
"get-row-id": b,
|
|
1822
|
+
"expanded-state": m.value,
|
|
1823
|
+
"onUpdate:expandedState": a[7] || (a[7] = (f) => m.value = f),
|
|
1824
|
+
"page-size": p.value,
|
|
1825
|
+
"shrink-at": !1,
|
|
1826
|
+
"hide-footer": ""
|
|
1827
|
+
}, null, 8, ["column-defs", "column-visibility", "row-data", "expanded-state", "page-size"])
|
|
1828
|
+
])
|
|
1829
|
+
])
|
|
1830
|
+
]),
|
|
1831
|
+
_: 1
|
|
1832
|
+
}, 8, ["title", "sub-title"])
|
|
1833
|
+
]),
|
|
1834
|
+
_: 1
|
|
1835
|
+
}, 8, ["model-value", "invalid", "helper-text"])
|
|
1836
|
+
])) : E("", !0)
|
|
1837
|
+
]),
|
|
1838
|
+
_: 1
|
|
1839
|
+
}, 8, ["max-width", "is-container", "is-container-props"]),
|
|
1840
|
+
((we = t.value) == null ? void 0 : we.translationMode) === "group" ? (g(), N(to, {
|
|
1841
|
+
key: 0,
|
|
1842
|
+
"model-value": !0,
|
|
1843
|
+
name: t.value.name,
|
|
1844
|
+
"name-locale": t.value.nameLocale,
|
|
1845
|
+
"supported-locales": t.value.supportedLocales,
|
|
1846
|
+
dirty: t.value.translationDirty,
|
|
1847
|
+
title: n(o)("menu.group.translation.title"),
|
|
1848
|
+
"name-section-label": n(o)("menu.common.translation.name_section", {
|
|
1849
|
+
entity: n(o)("menu.group.title")
|
|
1850
|
+
}),
|
|
1851
|
+
"onUpdate:modelValue": a[10] || (a[10] = (f) => !f && de()),
|
|
1852
|
+
"onUpdate:name": a[11] || (a[11] = (f) => n(d).setName(f)),
|
|
1853
|
+
"onUpdate:nameLocale": a[12] || (a[12] = (f) => n(d).setNameLocale(f)),
|
|
1854
|
+
onSave: a[13] || (a[13] = (f) => n(d).applyTranslation()),
|
|
1855
|
+
onDiscard: a[14] || (a[14] = (f) => n(d).cancelTranslation())
|
|
1856
|
+
}, null, 8, ["name", "name-locale", "supported-locales", "dirty", "title", "name-section-label"])) : E("", !0),
|
|
1857
|
+
((he = t.value) == null ? void 0 : he.translationMode) === "options" ? (g(), N(oe, {
|
|
1858
|
+
key: 1,
|
|
1859
|
+
"model-value": !0,
|
|
1860
|
+
"max-width": 720,
|
|
1861
|
+
"onUpdate:modelValue": a[17] || (a[17] = (f) => !f && de()),
|
|
1862
|
+
"onOn:clickedAway": ie
|
|
1863
|
+
}, {
|
|
1864
|
+
"side-sheet-header": v(() => [
|
|
1865
|
+
_("p", mn, P(n(o)("menu.group.translation.title")), 1)
|
|
1866
|
+
]),
|
|
1867
|
+
"side-sheet-footer": v(() => [
|
|
1868
|
+
_("div", gn, [
|
|
1869
|
+
s(U, {
|
|
1870
|
+
label: n(o)("menu.common.actions.save"),
|
|
1871
|
+
size: "lg",
|
|
1872
|
+
onClick: a[16] || (a[16] = (f) => n(d).applyTranslation())
|
|
1873
|
+
}, null, 8, ["label"]),
|
|
1874
|
+
s(U, {
|
|
1875
|
+
label: n(o)("menu.common.actions.cancel"),
|
|
1876
|
+
variant: "tertiary",
|
|
1877
|
+
size: "lg",
|
|
1878
|
+
onClick: ie
|
|
1879
|
+
}, null, 8, ["label"])
|
|
1880
|
+
])
|
|
1881
|
+
]),
|
|
1882
|
+
default: v(() => [
|
|
1883
|
+
_("div", cn, [
|
|
1884
|
+
s(Ne, {
|
|
1885
|
+
label: n(o)("menu.group.translation.language")
|
|
1886
|
+
}, {
|
|
1887
|
+
default: v(() => {
|
|
1888
|
+
var f;
|
|
1889
|
+
return [
|
|
1890
|
+
_("div", dn, [
|
|
1891
|
+
(g(!0), S(J, null, ue(t.value.optionTranslationLocales, (w) => {
|
|
1892
|
+
var j;
|
|
1893
|
+
return g(), N(pe, {
|
|
1894
|
+
key: w,
|
|
1895
|
+
removable: "",
|
|
1896
|
+
label: ((j = t.value.supportedLocales.find((Ve) => Ve.code === w)) == null ? void 0 : j.name) ?? w,
|
|
1897
|
+
onChipClosed: (Ve) => n(d).setOptionTranslationLocales(
|
|
1898
|
+
t.value.optionTranslationLocales.filter((eo) => eo !== w)
|
|
1899
|
+
)
|
|
1900
|
+
}, null, 8, ["label", "onChipClosed"]);
|
|
1901
|
+
}), 128)),
|
|
1902
|
+
s(re, {
|
|
1903
|
+
items: (((f = t.value) == null ? void 0 : f.supportedLocales) ?? []).filter(
|
|
1904
|
+
(w) => {
|
|
1905
|
+
var j;
|
|
1906
|
+
return !(((j = t.value) == null ? void 0 : j.optionTranslationLocales) ?? []).includes(w.code);
|
|
1907
|
+
}
|
|
1908
|
+
).map((w) => ({ value: w.code, label: w.name })),
|
|
1909
|
+
placeholder: n(o)("menu.group.translation.add_language"),
|
|
1910
|
+
"model-value": null,
|
|
1911
|
+
"onUpdate:modelValue": a[15] || (a[15] = (w) => n(d).setOptionTranslationLocales([
|
|
1912
|
+
...t.value.optionTranslationLocales,
|
|
1913
|
+
w
|
|
1914
|
+
]))
|
|
1915
|
+
}, null, 8, ["items", "placeholder"])
|
|
1916
|
+
])
|
|
1917
|
+
];
|
|
1918
|
+
}),
|
|
1919
|
+
_: 1
|
|
1920
|
+
}, 8, ["label"]),
|
|
1921
|
+
s(ke, {
|
|
1922
|
+
title: n(o)("menu.group.translation.group_name")
|
|
1923
|
+
}, {
|
|
1924
|
+
default: v(() => [
|
|
1925
|
+
s(ae, {
|
|
1926
|
+
"model-value": t.value.name,
|
|
1927
|
+
readonly: ""
|
|
1928
|
+
}, null, 8, ["model-value"])
|
|
1929
|
+
]),
|
|
1930
|
+
_: 1
|
|
1931
|
+
}, 8, ["title"]),
|
|
1932
|
+
s(ke, {
|
|
1933
|
+
title: n(o)("menu.group.translation.product_name")
|
|
1934
|
+
}, {
|
|
1935
|
+
default: v(() => [
|
|
1936
|
+
(g(!0), S(J, null, ue(t.value.options, (f, w) => (g(), S("div", {
|
|
1937
|
+
key: f.id,
|
|
1938
|
+
class: "space-y-8"
|
|
1939
|
+
}, [
|
|
1940
|
+
_("p", pn, P(n(o)("menu.group.translation.option", { number: w + 1 })), 1),
|
|
1941
|
+
s(ae, {
|
|
1942
|
+
label: n(o)("menu.group.translation.option_default", { number: w + 1 }),
|
|
1943
|
+
"model-value": f.name,
|
|
1944
|
+
"onUpdate:modelValue": (j) => n(d).setOption(f.id, { name: j })
|
|
1945
|
+
}, null, 8, ["label", "model-value", "onUpdate:modelValue"]),
|
|
1946
|
+
(g(!0), S(J, null, ue(t.value.optionTranslationLocales, (j) => (g(), S("div", {
|
|
1947
|
+
key: j,
|
|
1948
|
+
class: "flex gap-8 items-center"
|
|
1949
|
+
}, [
|
|
1950
|
+
s(ao, { code: j }, null, 8, ["code"]),
|
|
1951
|
+
s(ae, {
|
|
1952
|
+
class: "flex-1",
|
|
1953
|
+
"aria-label": n(o)("menu.group.translation.option_translation", {
|
|
1954
|
+
number: w + 1,
|
|
1955
|
+
language: j
|
|
1956
|
+
}),
|
|
1957
|
+
"model-value": f.nameLocale[j] ?? "",
|
|
1958
|
+
placeholder: n(o)("menu.group.translation.placeholder"),
|
|
1959
|
+
"onUpdate:modelValue": (Ve) => n(d).setOptionNameLocale(f.id, {
|
|
1960
|
+
...f.nameLocale,
|
|
1961
|
+
[j]: Ve
|
|
1962
|
+
})
|
|
1963
|
+
}, null, 8, ["aria-label", "model-value", "placeholder", "onUpdate:modelValue"])
|
|
1964
|
+
]))), 128))
|
|
1965
|
+
]))), 128))
|
|
1966
|
+
]),
|
|
1967
|
+
_: 1
|
|
1968
|
+
}, 8, ["title"])
|
|
1969
|
+
])
|
|
1970
|
+
]),
|
|
1971
|
+
_: 1
|
|
1972
|
+
})) : E("", !0),
|
|
1973
|
+
s(mo, {
|
|
1974
|
+
modelValue: A.value,
|
|
1975
|
+
"onUpdate:modelValue": a[18] || (a[18] = (f) => A.value = f),
|
|
1976
|
+
catalogue: q.value,
|
|
1977
|
+
"selected-product-ids": ((xe = t.value) == null ? void 0 : xe.selectedProductIds) ?? [],
|
|
1978
|
+
title: n(o)("menu.group.option.link_products"),
|
|
1979
|
+
onSubmit: K
|
|
1980
|
+
}, null, 8, ["modelValue", "catalogue", "selected-product-ids", "title"]),
|
|
1981
|
+
I.value ? (g(), N(We, {
|
|
1982
|
+
key: 2,
|
|
1983
|
+
session: I.value,
|
|
1984
|
+
"on-create-price-group": ze,
|
|
1985
|
+
onClose: W
|
|
1986
|
+
}, null, 8, ["session"])) : E("", !0),
|
|
1987
|
+
R.value ? (g(), N(n(k), {
|
|
1988
|
+
key: 3,
|
|
1989
|
+
"product-name": M.value,
|
|
1990
|
+
session: R.value,
|
|
1991
|
+
onClose: X
|
|
1992
|
+
}, null, 8, ["product-name", "session"])) : E("", !0),
|
|
1993
|
+
s(ln, {
|
|
1994
|
+
sdk: e.sdk,
|
|
1995
|
+
session: Q.value,
|
|
1996
|
+
"currency-code": (ge = t.value) == null ? void 0 : ge.currency,
|
|
1997
|
+
onClose: _e
|
|
1998
|
+
}, null, 8, ["sdk", "session", "currency-code"])
|
|
1999
|
+
], 64);
|
|
2000
|
+
};
|
|
2001
|
+
}
|
|
2002
|
+
});
|
|
2003
|
+
export {
|
|
2004
|
+
Xe as F,
|
|
2005
|
+
Fe as _,
|
|
2006
|
+
Ae as a,
|
|
2007
|
+
We as b,
|
|
2008
|
+
Qe as c,
|
|
2009
|
+
On as d,
|
|
2010
|
+
ln as e
|
|
2011
|
+
};
|