@feedmepos/mf-menu-portal 1.0.3-dev.1 → 1.0.4-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-CjhvMPAF.js → App-BZKKZoxc.js} +3 -3
- package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-DQ1EupOa.js → BindingTable.vue_vue_type_script_setup_true_lang-CKMp3GaN.js} +1 -1
- package/dist/{Catalog-Ce6UZKfF.js → Catalog-CAHbtV4H.js} +4 -4
- package/dist/{CatalogBinding-OvF89AdH.js → CatalogBinding-Bhf_B-HW.js} +3 -3
- package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-QFb_vf3e.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-CFqyk2fz.js} +3 -3
- package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-DbBBicau.js → CatalogEditor.vue_vue_type_script_setup_true_lang-DbSQyj5E.js} +166 -129
- package/dist/{CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-BtDLJPur.js → CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-CYMrCMo1.js} +3 -3
- package/dist/{Category-CO7a2jIA.js → Category-BiIE6JWS.js} +5 -5
- package/dist/{Category-9sP0Ic10.js → Category-n3cAs8IF.js} +2 -2
- package/dist/{CategoryList.vue_vue_type_script_setup_true_lang-DQBrqCNS.js → CategoryList.vue_vue_type_script_setup_true_lang-BaecheDk.js} +4 -4
- package/dist/{CookingGuide-BJVP9ld_.js → CookingGuide-DHi4QqBd.js} +4 -4
- package/dist/{Group-DFuUzZMI.js → Group-D5-wyI4V.js} +2 -2
- package/dist/{Group-CHmDRljy.js → Group-DkKUYhoT.js} +5 -5
- package/dist/{GroupList.vue_vue_type_script_setup_true_lang-CFB3Tiwn.js → GroupList.vue_vue_type_script_setup_true_lang-C4MhLA7R.js} +5 -5
- package/dist/{Ingredient-IVtCH1fp.js → Ingredient-CbJSvV6r.js} +3 -3
- package/dist/{LinkProductSideSheet.vue_vue_type_script_setup_true_lang-C1bNcf0n.js → LinkProductSideSheet.vue_vue_type_script_setup_true_lang-C2pNO1hF.js} +1 -1
- package/dist/{MenuSetting-y_npXdfo.js → MenuSetting-DaQPBU74.js} +250 -244
- package/dist/{OrderPacing-duaZ1n23.js → OrderPacing-CSJ-ohx3.js} +4 -4
- package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-CglwAqpb.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-DDr0P_hg.js} +1 -1
- package/dist/{Preview-CPrLqotQ.js → Preview-D7WS3ftB.js} +1 -1
- package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-CkktQHSu.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-CH099Ogz.js} +1 -1
- package/dist/{PrintRoute-B-cpn4KD.js → PrintRoute-Ci5nFh5U.js} +3 -3
- package/dist/{Product-Dsb4xp2V.js → Product-Cnai3PSK.js} +4 -4
- package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang-DyRRzdMv.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-CgG9Ooj-.js} +2 -2
- package/dist/{ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-D7NiGNBX.js → ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-UeIB15M8.js} +411 -400
- package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-CXtIwqAA.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-BYrFs09n.js} +1 -1
- package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-BqqgTJcT.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-BHaNygs1.js} +10 -10
- package/dist/{ProductInternalTools-Cv6g8J4E.js → ProductInternalTools-BDM2wNdr.js} +2 -2
- package/dist/{ProductInventoryDialog-CN01RWpm.js → ProductInventoryDialog-CQzpqhFQ.js} +1 -1
- package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-DfQFUFCM.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-B12JBNSL.js} +1 -1
- package/dist/{ProductList.vue_vue_type_script_setup_true_lang-DN8Qpqk3.js → ProductList.vue_vue_type_script_setup_true_lang-bFpRJqAM.js} +8 -8
- package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-BaL3tTXC.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-Chv4V2ps.js} +1 -1
- package/dist/{Products-C7nVEa3o.js → Products-BSRl9QqW.js} +3 -3
- package/dist/{Publish-vSeZ4RoR.js → Publish-B0YeaFMZ.js} +3 -3
- package/dist/{Recipe-COvS5O5W.js → Recipe-CUFm5Gvj.js} +3 -3
- package/dist/{Scheduler-fHE48xDN.js → Scheduler-D5ZSBFVY.js} +3 -3
- package/dist/{ServingSequence-C_bPALqb.js → ServingSequence-DaNyijEL.js} +2 -2
- package/dist/{Setting-CNhyGVqf.js → Setting-DbO5vVZf.js} +61 -55
- package/dist/SubItemTaxSwitch.vue_vue_type_script_setup_true_lang-DIFXPxna.js +37 -0
- package/dist/SubItemTaxWarning.vue_vue_type_script_setup_true_lang-BUyK6Jaa.js +27 -0
- package/dist/{Subcategory-CmbeggrE.js → Subcategory-HrK6lsAH.js} +2 -2
- package/dist/{Takeaway-Mu-5Rsqq.js → Takeaway-DZ2pXpc4.js} +5 -5
- package/dist/{Takeaway-CAJdKpFQ.js → Takeaway-HmId8Qqp.js} +2 -2
- package/dist/{TakeawayList.vue_vue_type_script_setup_true_lang-Cu_Fa8H1.js → TakeawayList.vue_vue_type_script_setup_true_lang-BBWdi9Em.js} +3 -3
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-R8ZElN_F.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DeAN-dVm.js} +6 -6
- package/dist/{Unit-BFvFeLlF.js → Unit-oze9Bah6.js} +2 -2
- package/dist/{Variant-tXGlwIkZ.js → Variant-B9j4riC-.js} +3 -3
- package/dist/{_id_-D7l6sNVO.js → _id_-Bp2gkxXp.js} +3 -3
- package/dist/{app-D72i6dx4.js → app-A5dqYWsU.js} +39 -39
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +105 -0
- package/dist/apps/mf-menu/src/components/MenuSetting/SubItemTaxSwitch.vue.d.ts +9 -0
- package/dist/apps/mf-menu/src/components/MenuSetting/SubItemTaxWarning.vue.d.ts +2 -0
- package/dist/apps/mf-menu/src/components/Product/ProductMoneyField.vue.d.ts +3 -3
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{menu-compute-DuJqTkh0.js → menu-compute-BXVeOLK2.js} +132 -132
- package/dist/assets/validate-menu-rN3yrHun.js +130 -0
- package/dist/{provide-CT-DoyGO.js → provide-Qt5LApQe.js} +80309 -73907
- package/dist/{useActionFeedback-DwVnl3ys.js → useActionFeedback-CtMJLWBu.js} +1 -1
- package/package.json +1 -1
- package/dist/assets/validate-menu-DretrNgu.js +0 -130
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { defineComponent as W, computed as
|
|
2
|
-
import { useI18n as X, CustomAttributesForm as
|
|
3
|
-
import { useDialog as he, components as
|
|
4
|
-
import { RemyButton as
|
|
5
|
-
import { _ as
|
|
1
|
+
import { defineComponent as W, computed as E, toDisplayString as T, ref as oe, watch as se, openBlock as c, createBlock as O, createSlots as ye, withCtx as p, renderSlot as ue, createElementBlock as w, createVNode as s, createCommentVNode as N, nextTick as Le, resolveComponent as y, unref as n, createElementVNode as v, Fragment as K, renderList as Q, shallowRef as Ae, onBeforeUnmount as xe, h as _, mergeProps as ae } from "vue";
|
|
2
|
+
import { useI18n as X, CustomAttributesForm as _e } from "@feedmepos/mf-common";
|
|
3
|
+
import { useDialog as he, components as M } from "@feedmepos/ui-library";
|
|
4
|
+
import { RemyButton as fe } from "@feedmepos/mf-remy-panel";
|
|
5
|
+
import { _ as Ie } from "./AddPriceGroupDialog.vue_vue_type_script_setup_true_lang-DhKyG3gY.js";
|
|
6
6
|
import { u as we } from "./useEditorValidation-Ctef5Bxt.js";
|
|
7
|
-
import { b as ke, u as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as J, b as
|
|
10
|
-
import { a as
|
|
7
|
+
import { b as ke, u as me } from "./provide-Qt5LApQe.js";
|
|
8
|
+
import { _ as ze } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js";
|
|
9
|
+
import { _ as J, b as Ee } from "./TranslationLanguageSelector.vue_vue_type_script_setup_true_lang-BJZ6VcrT.js";
|
|
10
|
+
import { a as Ne, _ as le } from "./FormSection.vue_vue_type_script_setup_true_lang-pY-_msnM.js";
|
|
11
11
|
import { _ as re } from "./FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js";
|
|
12
|
-
import { _ as
|
|
13
|
-
import { a as
|
|
14
|
-
import { u as Re } from "./useActionFeedback-
|
|
12
|
+
import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
+
import { a as Be, A as De, _ as Me } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-C2pNO1hF.js";
|
|
14
|
+
import { u as Re } from "./useActionFeedback-CtMJLWBu.js";
|
|
15
15
|
const Fe = /* @__PURE__ */ W({
|
|
16
16
|
__name: "LocalizedCurrencySymbol",
|
|
17
17
|
props: {
|
|
18
18
|
currency: {}
|
|
19
19
|
},
|
|
20
20
|
setup(I) {
|
|
21
|
-
const
|
|
22
|
-
if (!
|
|
23
|
-
const e =
|
|
21
|
+
const P = I, { n: b } = X(), f = E(() => {
|
|
22
|
+
if (!P.currency) return "";
|
|
23
|
+
const e = b(0, {
|
|
24
24
|
useGrouping: !1,
|
|
25
25
|
minimumFractionDigits: 0,
|
|
26
26
|
maximumFractionDigits: 0
|
|
27
27
|
});
|
|
28
|
-
return
|
|
28
|
+
return b(0, {
|
|
29
29
|
style: "currency",
|
|
30
|
-
currency:
|
|
30
|
+
currency: P.currency,
|
|
31
31
|
currencyDisplay: "narrowSymbol",
|
|
32
32
|
useGrouping: !1,
|
|
33
33
|
minimumFractionDigits: 0,
|
|
34
34
|
maximumFractionDigits: 0
|
|
35
|
-
}).replace(e, "").trim() ||
|
|
35
|
+
}).replace(e, "").trim() || P.currency;
|
|
36
36
|
});
|
|
37
|
-
return (e,
|
|
37
|
+
return (e, F) => T(f.value);
|
|
38
38
|
}
|
|
39
39
|
}), Ge = { key: 0 }, ie = /* @__PURE__ */ W({
|
|
40
40
|
__name: "ProductMoneyField",
|
|
@@ -44,66 +44,77 @@ const Fe = /* @__PURE__ */ W({
|
|
|
44
44
|
commitOnInput: { type: Boolean }
|
|
45
45
|
},
|
|
46
46
|
emits: ["update:modelValue"],
|
|
47
|
-
setup(I, { expose:
|
|
48
|
-
const f = I, e =
|
|
49
|
-
|
|
50
|
-
inputEl:
|
|
51
|
-
var
|
|
52
|
-
return ((
|
|
47
|
+
setup(I, { expose: P, emit: b }) {
|
|
48
|
+
const f = I, e = b, { n: F, locale: L } = X(), C = oe();
|
|
49
|
+
P({
|
|
50
|
+
inputEl: E(() => {
|
|
51
|
+
var u;
|
|
52
|
+
return ((u = C.value) == null ? void 0 : u.inputEl) ?? null;
|
|
53
53
|
}),
|
|
54
54
|
focus: () => {
|
|
55
|
-
var
|
|
56
|
-
return (
|
|
55
|
+
var u, S;
|
|
56
|
+
return (S = (u = C.value) == null ? void 0 : u.inputEl) == null ? void 0 : S.focus();
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
|
-
const
|
|
60
|
-
() => f.modelValue === null ? "" :
|
|
59
|
+
const g = E(
|
|
60
|
+
() => f.modelValue === null ? "" : F(f.modelValue, {
|
|
61
61
|
minimumFractionDigits: 2,
|
|
62
62
|
maximumFractionDigits: 2,
|
|
63
63
|
useGrouping: !1
|
|
64
64
|
})
|
|
65
|
-
), a = oe(
|
|
66
|
-
|
|
67
|
-
a.value =
|
|
65
|
+
), a = oe(g.value);
|
|
66
|
+
se(g, (u) => {
|
|
67
|
+
a.value = u;
|
|
68
68
|
});
|
|
69
69
|
async function j() {
|
|
70
|
-
var
|
|
71
|
-
const
|
|
72
|
-
(
|
|
70
|
+
var U, Y, i;
|
|
71
|
+
const u = ((Y = (U = C.value) == null ? void 0 : U.inputEl) == null ? void 0 : Y.value) ?? "", S = ((i = new Intl.NumberFormat(L.value).formatToParts(1.5).find((r) => r.type === "decimal")) == null ? void 0 : i.value) ?? ".", x = u.trim() === "" ? null : Number(u.replace(S, "."));
|
|
72
|
+
(x === null || Number.isFinite(x)) && e("update:modelValue", x), await Le(), a.value = g.value;
|
|
73
73
|
}
|
|
74
|
-
async function l(
|
|
75
|
-
var
|
|
76
|
-
if (a.value = String(
|
|
77
|
-
const
|
|
78
|
-
(
|
|
74
|
+
async function l(u) {
|
|
75
|
+
var U;
|
|
76
|
+
if (a.value = String(u ?? ""), !f.commitOnInput) return;
|
|
77
|
+
const S = ((U = new Intl.NumberFormat(L.value).formatToParts(1.5).find((Y) => Y.type === "decimal")) == null ? void 0 : U.value) ?? ".", x = a.value.trim() === "" ? null : Number(a.value.replace(S, "."));
|
|
78
|
+
(x === null || Number.isFinite(x)) && e("update:modelValue", x);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
var
|
|
82
|
-
|
|
80
|
+
function $(u) {
|
|
81
|
+
var S, x;
|
|
82
|
+
u ? (x = (S = C.value) == null ? void 0 : S.inputEl) == null || x.select() : j();
|
|
83
83
|
}
|
|
84
|
-
|
|
84
|
+
function R(u) {
|
|
85
|
+
u.key === "Enter" && !u.isComposing && j();
|
|
86
|
+
}
|
|
87
|
+
return se(
|
|
88
|
+
() => {
|
|
89
|
+
var u;
|
|
90
|
+
return ((u = C.value) == null ? void 0 : u.inputEl) ?? null;
|
|
91
|
+
},
|
|
92
|
+
(u, S, x) => {
|
|
93
|
+
u && (u.addEventListener("keydown", R), x(() => u.removeEventListener("keydown", R)));
|
|
94
|
+
},
|
|
95
|
+
{ immediate: !0, flush: "post" }
|
|
96
|
+
), (u, S) => (c(), O(J, {
|
|
85
97
|
ref_key: "field",
|
|
86
|
-
ref:
|
|
98
|
+
ref: C,
|
|
87
99
|
"model-value": a.value,
|
|
88
100
|
inputmode: "decimal",
|
|
89
101
|
"onUpdate:modelValue": l,
|
|
90
|
-
onFocusChanged:
|
|
91
|
-
onKeydown: Le(j, ["enter"])
|
|
102
|
+
onFocusChanged: $
|
|
92
103
|
}, ye({
|
|
93
|
-
prepend:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
])) :
|
|
104
|
+
prepend: p(() => [
|
|
105
|
+
u.currency ? (c(), w("span", Ge, [
|
|
106
|
+
s(Fe, { currency: u.currency }, null, 8, ["currency"])
|
|
107
|
+
])) : N("", !0)
|
|
97
108
|
]),
|
|
98
|
-
append:
|
|
99
|
-
|
|
109
|
+
append: p(() => [
|
|
110
|
+
ue(u.$slots, "append")
|
|
100
111
|
]),
|
|
101
112
|
_: 2
|
|
102
113
|
}, [
|
|
103
|
-
|
|
114
|
+
u.$slots["helper-text"] ? {
|
|
104
115
|
name: "helper-text",
|
|
105
|
-
fn:
|
|
106
|
-
|
|
116
|
+
fn: p(() => [
|
|
117
|
+
ue(u.$slots, "helper-text")
|
|
107
118
|
]),
|
|
108
119
|
key: "0"
|
|
109
120
|
} : void 0
|
|
@@ -117,68 +128,68 @@ const Fe = /* @__PURE__ */ W({
|
|
|
117
128
|
disabled: { type: Boolean }
|
|
118
129
|
},
|
|
119
130
|
emits: ["open"],
|
|
120
|
-
setup(I, { emit:
|
|
121
|
-
const
|
|
122
|
-
return (e,
|
|
123
|
-
const L = y("FmButton"),
|
|
124
|
-
return
|
|
131
|
+
setup(I, { emit: P }) {
|
|
132
|
+
const b = P, { t: f } = X();
|
|
133
|
+
return (e, F) => {
|
|
134
|
+
const L = y("FmButton"), C = y("FmTooltip");
|
|
135
|
+
return c(), O(C, {
|
|
125
136
|
content: n(f)("menu.price_tier.price_tier_config"),
|
|
126
137
|
"z-index": 999,
|
|
127
138
|
placement: "top"
|
|
128
139
|
}, {
|
|
129
|
-
default:
|
|
130
|
-
|
|
140
|
+
default: p(() => [
|
|
141
|
+
s(L, {
|
|
131
142
|
icon: "price_change",
|
|
132
143
|
variant: "tertiary",
|
|
133
144
|
"text-color": "neutral-gray-400",
|
|
134
145
|
"overwrite-icon-outline": e.configured ? "filled" : "outline",
|
|
135
146
|
"aria-label": e.label,
|
|
136
147
|
disabled: e.disabled,
|
|
137
|
-
onClick:
|
|
148
|
+
onClick: F[0] || (F[0] = (g) => b("open"))
|
|
138
149
|
}, null, 8, ["overwrite-icon-outline", "aria-label", "disabled"])
|
|
139
150
|
]),
|
|
140
151
|
_: 1
|
|
141
152
|
}, 8, ["content"]);
|
|
142
153
|
};
|
|
143
154
|
}
|
|
144
|
-
}),
|
|
155
|
+
}), Ke = { class: "flex flex-col gap-8 p-8" }, je = { class: "fm-typo-en-body-md-600" }, Ye = { class: "flex flex-col gap-4" }, He = { key: 0 }, qe = /* @__PURE__ */ W({
|
|
145
156
|
__name: "ProductMemberPriceTooltip",
|
|
146
157
|
props: {
|
|
147
158
|
prices: {},
|
|
148
159
|
currency: {}
|
|
149
160
|
},
|
|
150
161
|
setup(I) {
|
|
151
|
-
const
|
|
152
|
-
() => Object.entries(
|
|
153
|
-
([
|
|
162
|
+
const P = I, { t: b, n: f } = X(), e = E(
|
|
163
|
+
() => Object.entries(P.prices).flatMap(
|
|
164
|
+
([F, L]) => L === null ? [] : [{ name: F, amount: L }]
|
|
154
165
|
)
|
|
155
166
|
);
|
|
156
|
-
return (
|
|
157
|
-
const
|
|
158
|
-
return
|
|
167
|
+
return (F, L) => {
|
|
168
|
+
const C = y("FmIcon"), g = y("FmTooltip");
|
|
169
|
+
return c(), O(g, {
|
|
159
170
|
variant: "plain",
|
|
160
171
|
placement: "right",
|
|
161
172
|
"z-index": 100
|
|
162
173
|
}, {
|
|
163
|
-
default:
|
|
164
|
-
|
|
174
|
+
default: p(() => [
|
|
175
|
+
s(C, {
|
|
165
176
|
name: "info",
|
|
166
177
|
outline: ""
|
|
167
178
|
})
|
|
168
179
|
]),
|
|
169
|
-
content:
|
|
170
|
-
v("div",
|
|
171
|
-
v("p",
|
|
172
|
-
v("ul",
|
|
173
|
-
e.value.length === 0 ? (
|
|
174
|
-
(
|
|
180
|
+
content: p(() => [
|
|
181
|
+
v("div", Ke, [
|
|
182
|
+
v("p", je, T(n(b)("menu.member_pricing.title")), 1),
|
|
183
|
+
v("ul", Ye, [
|
|
184
|
+
e.value.length === 0 ? (c(), w("li", He, T(n(b)("menu.member_pricing.tooltip.no_member_price")), 1)) : N("", !0),
|
|
185
|
+
(c(!0), w(K, null, Q(e.value, (a) => (c(), w("li", {
|
|
175
186
|
key: a.name,
|
|
176
187
|
class: "fm-typo-en-body-md-400"
|
|
177
|
-
},
|
|
188
|
+
}, T(n(b)("menu.common.labels.a11y_labelled_name", {
|
|
178
189
|
label: a.name,
|
|
179
190
|
name: n(f)(
|
|
180
191
|
a.amount,
|
|
181
|
-
|
|
192
|
+
F.currency ? { style: "currency", currency: F.currency, minimumFractionDigits: 2 } : { minimumFractionDigits: 2 }
|
|
182
193
|
)
|
|
183
194
|
})), 1))), 128))
|
|
184
195
|
])
|
|
@@ -188,16 +199,16 @@ const Fe = /* @__PURE__ */ W({
|
|
|
188
199
|
});
|
|
189
200
|
};
|
|
190
201
|
}
|
|
191
|
-
}),
|
|
202
|
+
}), Je = { class: "fm-typo-en-title-md-600" }, Qe = {
|
|
192
203
|
key: 0,
|
|
193
204
|
class: "flex flex-col gap-32"
|
|
194
|
-
},
|
|
205
|
+
}, We = { class: "flex flex-col fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-100 gap-4" }, Xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ze = {
|
|
195
206
|
key: 0,
|
|
196
207
|
class: "fm-typo-en-body-lg-600"
|
|
197
|
-
},
|
|
208
|
+
}, eo = { class: "flex flex-col gap-24" }, oo = { class: "fm-typo-en-title-sm-600" }, no = { class: "flex flex-col gap-16" }, to = { class: "flex flex-col gap-4" }, lo = { class: "fm-typo-en-body-lg-600" }, ao = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, io = {
|
|
198
209
|
key: 1,
|
|
199
210
|
class: "py-16 space-y-32"
|
|
200
|
-
},
|
|
211
|
+
}, ro = { class: "space-y-8" }, so = { class: "flex items-center justify-between" }, uo = { class: "space-y-8" }, mo = { class: "fm-typo-en-body-lg-600" }, co = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, po = { class: "flex gap-8" }, Go = /* @__PURE__ */ W({
|
|
201
212
|
__name: "ProductPricingSheet",
|
|
202
213
|
props: {
|
|
203
214
|
session: {},
|
|
@@ -206,33 +217,33 @@ const Fe = /* @__PURE__ */ W({
|
|
|
206
217
|
mainPricingLabel: { type: Boolean, default: !0 }
|
|
207
218
|
},
|
|
208
219
|
emits: ["close", "suggest"],
|
|
209
|
-
setup(I, { emit:
|
|
210
|
-
const
|
|
211
|
-
() =>
|
|
212
|
-
), a = we(() =>
|
|
213
|
-
function j(i,
|
|
214
|
-
var
|
|
215
|
-
const
|
|
216
|
-
return
|
|
220
|
+
setup(I, { emit: P }) {
|
|
221
|
+
const b = I, f = P, { t: e } = X(), F = he(), L = ke(), C = me(b.session), g = E(
|
|
222
|
+
() => C.value.status === "ready" ? C.value.value : null
|
|
223
|
+
), a = we(() => b.session);
|
|
224
|
+
function j(i, r) {
|
|
225
|
+
var k;
|
|
226
|
+
const h = a.issue(((k = g.value) == null ? void 0 : k.fieldIssues) ?? {}, `rows.${i}.amount`) ?? r.issue;
|
|
227
|
+
return h ? [L(h)] : [];
|
|
217
228
|
}
|
|
218
229
|
function l(i) {
|
|
219
|
-
var
|
|
220
|
-
const
|
|
221
|
-
((
|
|
230
|
+
var h;
|
|
231
|
+
const r = a.issue(
|
|
232
|
+
((h = g.value) == null ? void 0 : h.fieldIssues) ?? {},
|
|
222
233
|
`rows.0.members.${i.key}`
|
|
223
234
|
) ?? i.issue;
|
|
224
|
-
return
|
|
235
|
+
return r ? [L(r)] : [];
|
|
225
236
|
}
|
|
226
|
-
const
|
|
227
|
-
function
|
|
237
|
+
const $ = Ae(null);
|
|
238
|
+
function R() {
|
|
228
239
|
var i;
|
|
229
|
-
(i =
|
|
240
|
+
(i = $.value) == null || i.dispose(), $.value = null;
|
|
230
241
|
}
|
|
231
|
-
function
|
|
232
|
-
|
|
242
|
+
function u(i) {
|
|
243
|
+
R(), $.value = b.session.memberEditor(i);
|
|
233
244
|
}
|
|
234
|
-
xe(
|
|
235
|
-
const
|
|
245
|
+
xe(R);
|
|
246
|
+
const S = E(() => [
|
|
236
247
|
{
|
|
237
248
|
accessorKey: "key",
|
|
238
249
|
header: () => e(
|
|
@@ -255,20 +266,20 @@ const Fe = /* @__PURE__ */ W({
|
|
|
255
266
|
errorMessages: l(i.original),
|
|
256
267
|
...a.field(
|
|
257
268
|
`rows.0.members.${i.original.key}`,
|
|
258
|
-
(
|
|
259
|
-
var
|
|
260
|
-
return
|
|
261
|
-
((
|
|
269
|
+
(r) => {
|
|
270
|
+
var h, k;
|
|
271
|
+
return b.session.setAmount(
|
|
272
|
+
((k = (h = g.value) == null ? void 0 : h.rows[0]) == null ? void 0 : k.tier) ?? null,
|
|
262
273
|
i.original.key,
|
|
263
|
-
|
|
274
|
+
r
|
|
264
275
|
);
|
|
265
276
|
}
|
|
266
277
|
)
|
|
267
278
|
},
|
|
268
279
|
{
|
|
269
280
|
append: () => {
|
|
270
|
-
var
|
|
271
|
-
return (
|
|
281
|
+
var r;
|
|
282
|
+
return (r = g.value) != null && r.showSuggestion ? _(fe, {
|
|
272
283
|
pureStyling: !0,
|
|
273
284
|
class: "shrink-0 scale-75",
|
|
274
285
|
"aria-label": e("menu.product.remy.pricing"),
|
|
@@ -278,7 +289,7 @@ const Fe = /* @__PURE__ */ W({
|
|
|
278
289
|
}
|
|
279
290
|
)
|
|
280
291
|
}
|
|
281
|
-
]),
|
|
292
|
+
]), x = E(() => [
|
|
282
293
|
{
|
|
283
294
|
accessorKey: "tier",
|
|
284
295
|
header: () => e("menu.price_tier.form.table.columns.name"),
|
|
@@ -306,7 +317,7 @@ const Fe = /* @__PURE__ */ W({
|
|
|
306
317
|
errorMessages: j(i.index, i.original),
|
|
307
318
|
...a.field(
|
|
308
319
|
`rows.${i.index}.amount`,
|
|
309
|
-
(
|
|
320
|
+
(r) => b.session.setAmount(i.original.tier, null, r)
|
|
310
321
|
)
|
|
311
322
|
})
|
|
312
323
|
},
|
|
@@ -315,64 +326,64 @@ const Fe = /* @__PURE__ */ W({
|
|
|
315
326
|
header: () => e("menu.price_tier.form.table.columns.member_price"),
|
|
316
327
|
enableSorting: !1,
|
|
317
328
|
cell: ({ row: i }) => {
|
|
318
|
-
var
|
|
319
|
-
const
|
|
320
|
-
(
|
|
321
|
-
).length,
|
|
322
|
-
num:
|
|
329
|
+
var k;
|
|
330
|
+
const r = i.original.members.filter(
|
|
331
|
+
(B) => B.amount !== null
|
|
332
|
+
).length, h = r ? e("menu.product.form.member_price.configure.title_with_tier", {
|
|
333
|
+
num: r
|
|
323
334
|
}) : e("menu.product.form.member_price.configure.title");
|
|
324
335
|
return _("div", { class: "flex items-center justify-between" }, [
|
|
325
336
|
_(
|
|
326
|
-
|
|
337
|
+
M.FmButton,
|
|
327
338
|
{
|
|
328
339
|
variant: "plain",
|
|
329
|
-
label:
|
|
340
|
+
label: h,
|
|
330
341
|
// This is the nested pricing-sheet action. Keep it distinct from
|
|
331
342
|
// the product form's row-level "Member price" action while
|
|
332
343
|
// qualifying the tier, so both independently reachable surfaces
|
|
333
344
|
// stay semantic.
|
|
334
|
-
"aria-label":
|
|
345
|
+
"aria-label": r ? h : i.original.tier ? e("menu.common.labels.a11y_labelled_name", {
|
|
335
346
|
label: e(
|
|
336
347
|
"menu.product.form.member_price.configure.title"
|
|
337
348
|
),
|
|
338
349
|
name: i.original.tier
|
|
339
350
|
}) : void 0,
|
|
340
|
-
onClick: () => i.original.tier &&
|
|
351
|
+
onClick: () => i.original.tier && u(i.original.tier)
|
|
341
352
|
},
|
|
342
353
|
{
|
|
343
354
|
default: () => _(
|
|
344
355
|
"span",
|
|
345
356
|
{ class: "underline line-clamp-2 break-all" },
|
|
346
|
-
|
|
357
|
+
h
|
|
347
358
|
)
|
|
348
359
|
}
|
|
349
360
|
),
|
|
350
|
-
_(
|
|
361
|
+
_(qe, {
|
|
351
362
|
prices: Object.fromEntries(
|
|
352
|
-
i.original.members.map((
|
|
363
|
+
i.original.members.map((B) => [B.key, B.amount])
|
|
353
364
|
),
|
|
354
|
-
currency: (
|
|
365
|
+
currency: (k = g.value) == null ? void 0 : k.currency
|
|
355
366
|
})
|
|
356
367
|
]);
|
|
357
368
|
}
|
|
358
369
|
}
|
|
359
370
|
]);
|
|
360
|
-
function
|
|
361
|
-
var
|
|
362
|
-
if (
|
|
371
|
+
function U() {
|
|
372
|
+
var r;
|
|
373
|
+
if (b.session.apply()) {
|
|
363
374
|
f("close");
|
|
364
375
|
return;
|
|
365
376
|
}
|
|
366
|
-
const i = Object.entries(((
|
|
367
|
-
([
|
|
377
|
+
const i = Object.entries(((r = g.value) == null ? void 0 : r.fieldIssues) ?? {}).flatMap(
|
|
378
|
+
([h, k]) => (k ?? []).map((B) => ({ ...B, field: h }))
|
|
368
379
|
);
|
|
369
380
|
a.submit(async () => ({ kind: "rejected", issues: i }));
|
|
370
381
|
}
|
|
371
|
-
function
|
|
372
|
-
|
|
382
|
+
function Y() {
|
|
383
|
+
b.onCreatePriceGroup && F.open({
|
|
373
384
|
zIndex: 200,
|
|
374
385
|
title: e("menu.price_tier.add_price_group"),
|
|
375
|
-
contentComponent:
|
|
386
|
+
contentComponent: Ie,
|
|
376
387
|
primaryActions: {
|
|
377
388
|
text: e("menu.category.manager.dialog.add.action"),
|
|
378
389
|
close: !1
|
|
@@ -382,167 +393,167 @@ const Fe = /* @__PURE__ */ W({
|
|
|
382
393
|
close: !0
|
|
383
394
|
}
|
|
384
395
|
}).onPrimary(async (i) => {
|
|
385
|
-
const
|
|
386
|
-
await
|
|
396
|
+
const r = String(i ?? "");
|
|
397
|
+
await b.onCreatePriceGroup(r) && (b.session.addTier(r), F.close());
|
|
387
398
|
});
|
|
388
399
|
}
|
|
389
|
-
return (i,
|
|
390
|
-
var
|
|
391
|
-
const
|
|
392
|
-
return
|
|
393
|
-
|
|
400
|
+
return (i, r) => {
|
|
401
|
+
var G;
|
|
402
|
+
const h = y("FmTable"), k = y("FmButton"), B = y("FmSideSheet"), Z = y("ProductPricingSheet", !0);
|
|
403
|
+
return c(), w(K, null, [
|
|
404
|
+
s(B, {
|
|
394
405
|
"model-value": !0,
|
|
395
|
-
"z-index":
|
|
396
|
-
"max-width": ((
|
|
397
|
-
"is-container": n(
|
|
406
|
+
"z-index": b.zIndex ?? 300,
|
|
407
|
+
"max-width": ((G = g.value) == null ? void 0 : G.mode) === "members" ? 720 : 560,
|
|
408
|
+
"is-container": n(M).FmForm,
|
|
398
409
|
"is-container-props": {
|
|
399
|
-
onValidationSuccess:
|
|
410
|
+
onValidationSuccess: U,
|
|
400
411
|
blameFormChildOnValidationFailed: !0
|
|
401
412
|
},
|
|
402
|
-
"onUpdate:modelValue":
|
|
413
|
+
"onUpdate:modelValue": r[2] || (r[2] = (z) => !z && f("close"))
|
|
403
414
|
}, {
|
|
404
|
-
"side-sheet-header":
|
|
405
|
-
var
|
|
415
|
+
"side-sheet-header": p(() => {
|
|
416
|
+
var z;
|
|
406
417
|
return [
|
|
407
|
-
v("p",
|
|
408
|
-
((
|
|
418
|
+
v("p", Je, T(n(e)(
|
|
419
|
+
((z = g.value) == null ? void 0 : z.mode) === "tiers" ? "menu.price_tier.price_tier_config" : "menu.product.form.member_price.configure.title"
|
|
409
420
|
)), 1)
|
|
410
421
|
];
|
|
411
422
|
}),
|
|
412
|
-
"side-sheet-footer":
|
|
413
|
-
var
|
|
423
|
+
"side-sheet-footer": p(() => {
|
|
424
|
+
var z, H, D;
|
|
414
425
|
return [
|
|
415
|
-
v("div",
|
|
416
|
-
|
|
417
|
-
label: ((
|
|
418
|
-
"aria-label": ((
|
|
426
|
+
v("div", po, [
|
|
427
|
+
s(k, {
|
|
428
|
+
label: ((z = g.value) == null ? void 0 : z.mode) === "tiers" ? n(e)("menu.common.actions.update") : n(e)("menu.common.actions.apply"),
|
|
429
|
+
"aria-label": ((H = g.value) == null ? void 0 : H.mode) === "tiers" ? n(e)("menu.price_tier.action.update") : void 0,
|
|
419
430
|
variant: "primary",
|
|
420
431
|
size: "lg",
|
|
421
432
|
type: "button",
|
|
422
|
-
onClick:
|
|
433
|
+
onClick: U
|
|
423
434
|
}, null, 8, ["label", "aria-label"]),
|
|
424
|
-
|
|
435
|
+
s(k, {
|
|
425
436
|
label: n(e)("menu.common.actions.cancel"),
|
|
426
|
-
"aria-label": ((
|
|
437
|
+
"aria-label": ((D = g.value) == null ? void 0 : D.mode) === "tiers" ? n(e)("menu.price_tier.action.cancel") : n(e)("menu.product.form.member_price.configure.cancel"),
|
|
427
438
|
variant: "tertiary",
|
|
428
439
|
size: "lg",
|
|
429
|
-
onClick:
|
|
440
|
+
onClick: r[1] || (r[1] = (ee) => f("close"))
|
|
430
441
|
}, null, 8, ["label", "aria-label"])
|
|
431
442
|
])
|
|
432
443
|
];
|
|
433
444
|
}),
|
|
434
|
-
default:
|
|
435
|
-
var
|
|
445
|
+
default: p(() => {
|
|
446
|
+
var z, H;
|
|
436
447
|
return [
|
|
437
|
-
((
|
|
438
|
-
v("div",
|
|
439
|
-
v("p",
|
|
440
|
-
|
|
448
|
+
((z = g.value) == null ? void 0 : z.mode) === "members" ? (c(), w("div", Qe, [
|
|
449
|
+
v("div", We, [
|
|
450
|
+
v("p", Xe, T(n(e)("menu.product.form.member_price.configure.current_configuration")), 1),
|
|
451
|
+
g.value.configurationName || i.mainPricingLabel ? (c(), w("p", Ze, T(g.value.configurationName ?? n(e)("menu.product.form.member_price.configure.main_pricing")), 1)) : N("", !0)
|
|
441
452
|
]),
|
|
442
|
-
v("div",
|
|
443
|
-
v("p",
|
|
444
|
-
(
|
|
453
|
+
v("div", eo, [
|
|
454
|
+
v("p", oo, T(n(e)("menu.product.form.member_price.configure.pricing_grid")), 1),
|
|
455
|
+
(c(!0), w(K, null, Q(g.value.rows, (D, ee) => (c(), O(ie, ae(
|
|
445
456
|
{
|
|
446
|
-
key:
|
|
457
|
+
key: D.tier ?? "base",
|
|
447
458
|
class: "w-[258px] xs:w-full",
|
|
448
459
|
label: n(e)("menu.product.form.member_price.configure.default_selling_price"),
|
|
449
|
-
"model-value":
|
|
460
|
+
"model-value": D.amount,
|
|
450
461
|
"commit-on-input": "",
|
|
451
|
-
currency:
|
|
452
|
-
"error-messages": j(ee,
|
|
462
|
+
currency: g.value.currency,
|
|
463
|
+
"error-messages": j(ee, D)
|
|
453
464
|
},
|
|
454
465
|
{ ref_for: !0 },
|
|
455
466
|
n(a).field(
|
|
456
467
|
`rows.${ee}.amount`,
|
|
457
|
-
(ne) => i.session.setAmount(
|
|
468
|
+
(ne) => i.session.setAmount(D.tier, null, ne)
|
|
458
469
|
)
|
|
459
470
|
), {
|
|
460
|
-
append:
|
|
461
|
-
|
|
471
|
+
append: p(() => [
|
|
472
|
+
g.value.showSuggestion ? (c(), O(n(fe), {
|
|
462
473
|
key: 0,
|
|
463
474
|
"pure-styling": "",
|
|
464
475
|
class: "shrink-0 scale-75",
|
|
465
476
|
"aria-label": n(e)("menu.product.remy.pricing"),
|
|
466
|
-
onClick:
|
|
467
|
-
}, null, 8, ["aria-label"])) :
|
|
477
|
+
onClick: r[0] || (r[0] = (ne) => f("suggest"))
|
|
478
|
+
}, null, 8, ["aria-label"])) : N("", !0)
|
|
468
479
|
]),
|
|
469
480
|
_: 2
|
|
470
481
|
}, 1040, ["label", "model-value", "currency", "error-messages"]))), 128))
|
|
471
482
|
]),
|
|
472
|
-
v("div",
|
|
473
|
-
v("div",
|
|
474
|
-
v("p",
|
|
483
|
+
v("div", no, [
|
|
484
|
+
v("div", to, [
|
|
485
|
+
v("p", lo, T(n(e)(
|
|
475
486
|
"menu.product.form.member_price.configure.member_selling_price.label"
|
|
476
487
|
)), 1),
|
|
477
|
-
v("p",
|
|
488
|
+
v("p", ao, T(n(e)(
|
|
478
489
|
"menu.product.form.member_price.configure.member_selling_price.sublabel"
|
|
479
490
|
)), 1)
|
|
480
491
|
]),
|
|
481
|
-
|
|
482
|
-
"column-defs":
|
|
483
|
-
"row-data": [...((
|
|
492
|
+
s(h, {
|
|
493
|
+
"column-defs": S.value,
|
|
494
|
+
"row-data": [...((H = g.value.rows[0]) == null ? void 0 : H.members) ?? []],
|
|
484
495
|
"hide-footer": ""
|
|
485
496
|
}, null, 8, ["column-defs", "row-data"])
|
|
486
497
|
])
|
|
487
|
-
])) :
|
|
488
|
-
v("div",
|
|
489
|
-
v("div",
|
|
490
|
-
v("div",
|
|
491
|
-
v("p",
|
|
492
|
-
v("p",
|
|
498
|
+
])) : g.value ? (c(), w("div", io, [
|
|
499
|
+
v("div", ro, [
|
|
500
|
+
v("div", so, [
|
|
501
|
+
v("div", uo, [
|
|
502
|
+
v("p", mo, T(n(e)("menu.price_tier.price_group")), 1),
|
|
503
|
+
v("p", co, T(n(e)("menu.price_tier.description")), 1)
|
|
493
504
|
]),
|
|
494
|
-
|
|
505
|
+
b.onCreatePriceGroup ? (c(), O(k, {
|
|
495
506
|
key: 0,
|
|
496
507
|
class: "min-w-fit",
|
|
497
508
|
label: n(e)("menu.price_tier.add_price_group"),
|
|
498
509
|
icon: "add",
|
|
499
510
|
variant: "secondary",
|
|
500
|
-
onClick:
|
|
501
|
-
}, null, 8, ["label"])) :
|
|
511
|
+
onClick: Y
|
|
512
|
+
}, null, 8, ["label"])) : N("", !0)
|
|
502
513
|
]),
|
|
503
|
-
|
|
504
|
-
"column-defs":
|
|
505
|
-
"row-data": [...
|
|
514
|
+
s(h, {
|
|
515
|
+
"column-defs": x.value,
|
|
516
|
+
"row-data": [...g.value.rows],
|
|
506
517
|
"hide-footer": ""
|
|
507
518
|
}, null, 8, ["column-defs", "row-data"])
|
|
508
519
|
])
|
|
509
|
-
])) :
|
|
520
|
+
])) : N("", !0)
|
|
510
521
|
];
|
|
511
522
|
}),
|
|
512
523
|
_: 1
|
|
513
524
|
}, 8, ["z-index", "max-width", "is-container", "is-container-props"]),
|
|
514
|
-
|
|
525
|
+
$.value ? (c(), O(Z, {
|
|
515
526
|
key: 0,
|
|
516
|
-
session:
|
|
517
|
-
"z-index": (
|
|
527
|
+
session: $.value,
|
|
528
|
+
"z-index": (b.zIndex ?? 300) + 100,
|
|
518
529
|
"main-pricing-label": i.mainPricingLabel,
|
|
519
|
-
onClose:
|
|
520
|
-
}, null, 8, ["session", "z-index", "main-pricing-label"])) :
|
|
530
|
+
onClose: R
|
|
531
|
+
}, null, 8, ["session", "z-index", "main-pricing-label"])) : N("", !0)
|
|
521
532
|
], 64);
|
|
522
533
|
};
|
|
523
534
|
}
|
|
524
|
-
}),
|
|
525
|
-
function
|
|
526
|
-
return
|
|
527
|
-
|
|
535
|
+
}), go = {}, bo = { class: "flex gap-16" };
|
|
536
|
+
function vo(I, P) {
|
|
537
|
+
return c(), w("div", bo, [
|
|
538
|
+
ue(I.$slots, "default")
|
|
528
539
|
]);
|
|
529
540
|
}
|
|
530
|
-
const
|
|
541
|
+
const _o = /* @__PURE__ */ Ue(go, [["render", vo]]), fo = { class: "fm-typo-en-title-md-600" }, yo = {
|
|
531
542
|
key: 0,
|
|
532
543
|
class: "pt-8 space-y-32"
|
|
533
|
-
},
|
|
544
|
+
}, xo = { class: "xs:overflow-x-scroll" }, ho = { class: "xs:min-w-[640px]" }, wo = { class: "flex gap-8 items-center justify-start" }, ko = { class: "fm-typo-en-title-md-600" }, Fo = { class: "pt-8 space-y-24" }, Co = { class: "flex gap-8 flex-wrap" }, $o = { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, So = { class: "flex gap-8" }, Ko = /* @__PURE__ */ W({
|
|
534
545
|
__name: "ProductGroupCreateSheet",
|
|
535
546
|
props: {
|
|
536
547
|
sdk: {},
|
|
537
548
|
presentation: {}
|
|
538
549
|
},
|
|
539
550
|
emits: ["close", "created"],
|
|
540
|
-
setup(I, { emit:
|
|
541
|
-
const
|
|
542
|
-
|
|
543
|
-
), j =
|
|
551
|
+
setup(I, { emit: P }) {
|
|
552
|
+
const b = I, f = P, { t: e } = X(), F = y("i18n-t"), L = ke(), { run: C } = Re(), g = he(), a = b.sdk.group.creationEditor(
|
|
553
|
+
b.presentation === "tree" ? { surface: "editor" } : void 0
|
|
554
|
+
), j = me(a), l = E(
|
|
544
555
|
() => j.value.status === "ready" ? j.value.value : null
|
|
545
|
-
),
|
|
556
|
+
), $ = we(() => a), R = E(
|
|
546
557
|
() => {
|
|
547
558
|
var o;
|
|
548
559
|
return Object.fromEntries(
|
|
@@ -551,9 +562,9 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
551
562
|
)
|
|
552
563
|
);
|
|
553
564
|
}
|
|
554
|
-
),
|
|
555
|
-
() =>
|
|
556
|
-
),
|
|
565
|
+
), u = me(b.sdk.linkProduct.catalogue), S = E(
|
|
566
|
+
() => u.value.status === "ready" ? u.value.value : null
|
|
567
|
+
), x = oe(!1), U = oe({}), Y = E(
|
|
557
568
|
() => {
|
|
558
569
|
var o;
|
|
559
570
|
return (((o = l.value) == null ? void 0 : o.options) ?? []).map((t) => ({
|
|
@@ -561,23 +572,23 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
561
572
|
subRows: t.variants
|
|
562
573
|
}));
|
|
563
574
|
}
|
|
564
|
-
), i = (o) => o.combinationKey ? `${o.id}:${o.combinationKey}` : o.id,
|
|
575
|
+
), i = (o) => o.combinationKey ? `${o.id}:${o.combinationKey}` : o.id, r = (o, t, V, q) => o.combinationKey ? e("menu.common.labels.a11y_labelled_name", {
|
|
565
576
|
label: e(V),
|
|
566
577
|
name: o.name || o.inheritedName
|
|
567
|
-
}) :
|
|
568
|
-
function
|
|
569
|
-
a.setProducts([...o]),
|
|
578
|
+
}) : q ? e(q, { index: t + 1 }) : e("menu.group.a11y.row", { label: e(V), index: t + 1 });
|
|
579
|
+
function h(o) {
|
|
580
|
+
a.setProducts([...o]), x.value = !1;
|
|
570
581
|
}
|
|
571
|
-
function
|
|
582
|
+
function k() {
|
|
572
583
|
a.cancelTranslation();
|
|
573
584
|
}
|
|
574
|
-
function
|
|
585
|
+
function B() {
|
|
575
586
|
var o;
|
|
576
587
|
if (!((o = l.value) != null && o.translationDirty)) {
|
|
577
588
|
a.cancelTranslation();
|
|
578
589
|
return;
|
|
579
590
|
}
|
|
580
|
-
|
|
591
|
+
g.open({
|
|
581
592
|
title: e("menu.common.dialog.discard.title"),
|
|
582
593
|
message: e("menu.common.dialog.discard.message"),
|
|
583
594
|
primaryActions: {
|
|
@@ -592,38 +603,38 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
592
603
|
}).onPrimary(() => a.cancelTranslation());
|
|
593
604
|
}
|
|
594
605
|
xe(() => a.dispose());
|
|
595
|
-
const Z = (o) => l.value ?
|
|
606
|
+
const Z = (o) => l.value ? $.issue(l.value.fieldIssues, o) ?? l.value.issues.find((t) => t.field === o) : void 0, G = (o) => {
|
|
596
607
|
const t = Z(o);
|
|
597
608
|
return t ? L(t) : "";
|
|
598
|
-
},
|
|
599
|
-
function
|
|
600
|
-
a.confirmTypeChange(!1),
|
|
609
|
+
}, z = ["NORMAL", "PRODUCT", "DYNAMIC"], H = oe(0);
|
|
610
|
+
function D() {
|
|
611
|
+
a.confirmTypeChange(!1), H.value += 1;
|
|
601
612
|
}
|
|
602
|
-
|
|
613
|
+
se(
|
|
603
614
|
() => {
|
|
604
615
|
var o;
|
|
605
616
|
return (o = l.value) == null ? void 0 : o.typeChange;
|
|
606
617
|
},
|
|
607
618
|
(o) => {
|
|
608
|
-
o &&
|
|
619
|
+
o && g.open({
|
|
609
620
|
title: e("menu.common.dialog.change_type.title"),
|
|
610
621
|
message: e("menu.common.dialog.change_type.message"),
|
|
611
622
|
primaryActions: { text: e("menu.common.actions.yes"), close: !0 },
|
|
612
623
|
secondaryActions: { text: e("menu.common.actions.no"), close: !0 }
|
|
613
|
-
}).onPrimary(() => a.confirmTypeChange(!0)).onSecondary(() =>
|
|
624
|
+
}).onPrimary(() => a.confirmTypeChange(!0)).onSecondary(() => D()).onClose(() => D());
|
|
614
625
|
}
|
|
615
626
|
);
|
|
616
627
|
async function ee() {
|
|
617
628
|
var V;
|
|
618
629
|
const o = ((V = l.value) == null ? void 0 : V.name) ?? "";
|
|
619
|
-
(await
|
|
630
|
+
(await C(() => $.submit(() => a.submit()), {
|
|
620
631
|
showLoading: () => {
|
|
621
|
-
var
|
|
622
|
-
return ((
|
|
632
|
+
var q;
|
|
633
|
+
return ((q = l.value) == null ? void 0 : q.status) === "submitting";
|
|
623
634
|
}
|
|
624
635
|
})).kind === "success" && (f("created", o), f("close"));
|
|
625
636
|
}
|
|
626
|
-
const ne =
|
|
637
|
+
const ne = E(() => [
|
|
627
638
|
{
|
|
628
639
|
accessorKey: "isDefault",
|
|
629
640
|
size: 35,
|
|
@@ -632,10 +643,10 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
632
643
|
cell: (o) => (
|
|
633
644
|
// A product with variants has no default of its own; its
|
|
634
645
|
// combinations do (OptionTable.vue:143-145).
|
|
635
|
-
o.row.original.variants.length ? null : _(
|
|
646
|
+
o.row.original.variants.length ? null : _(M.FmCheckbox, {
|
|
636
647
|
modelValue: o.row.original.isDefault,
|
|
637
648
|
value: i(o.row.original),
|
|
638
|
-
"aria-label":
|
|
649
|
+
"aria-label": r(
|
|
639
650
|
o.row.original,
|
|
640
651
|
o.row.index,
|
|
641
652
|
"menu.group.option.is_default"
|
|
@@ -645,7 +656,7 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
645
656
|
o.row.original.id,
|
|
646
657
|
{ isDefault: t },
|
|
647
658
|
o.row.original.combinationKey
|
|
648
|
-
),
|
|
659
|
+
), $.touch("options");
|
|
649
660
|
}
|
|
650
661
|
})
|
|
651
662
|
)
|
|
@@ -663,7 +674,7 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
663
674
|
var o;
|
|
664
675
|
return _("div", { class: "flex items-center w-full gap-8" }, [
|
|
665
676
|
_("span", e("menu.group.option.product_title")),
|
|
666
|
-
((o = l.value) == null ? void 0 : o.showTranslation) === !1 ? null : _(
|
|
677
|
+
((o = l.value) == null ? void 0 : o.showTranslation) === !1 ? null : _(M.FmButton, {
|
|
667
678
|
icon: "g_translate",
|
|
668
679
|
variant: "tertiary",
|
|
669
680
|
textColor: "neutral-gray-400",
|
|
@@ -690,7 +701,7 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
690
701
|
class: "min-w-[300px]",
|
|
691
702
|
modelValue: o.row.original.name,
|
|
692
703
|
placeholder: o.row.original.inheritedName,
|
|
693
|
-
errorMessages: Z(`option.${o.row.original.id}.name`) ? [
|
|
704
|
+
errorMessages: Z(`option.${o.row.original.id}.name`) ? [G(`option.${o.row.original.id}.name`)] : [],
|
|
694
705
|
// Named PER ROW: "Option 1 title", "Option 2 title", …
|
|
695
706
|
//
|
|
696
707
|
// The accessible name is an addition the MIGRATED app owns — legacy
|
|
@@ -707,13 +718,13 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
707
718
|
//
|
|
708
719
|
// The visible column header stays "Title", which is what the golden
|
|
709
720
|
// shows; this is the accessible name only.
|
|
710
|
-
"aria-label":
|
|
721
|
+
"aria-label": r(
|
|
711
722
|
o.row.original,
|
|
712
723
|
o.row.index,
|
|
713
724
|
"menu.group.option.product_title",
|
|
714
725
|
"menu.group.option.option_title_numbered"
|
|
715
726
|
),
|
|
716
|
-
|
|
727
|
+
...$.field(
|
|
717
728
|
`option.${o.row.original.id}.name`,
|
|
718
729
|
(t) => a.setOption(
|
|
719
730
|
o.row.original.id,
|
|
@@ -738,7 +749,7 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
738
749
|
),
|
|
739
750
|
onClick: o.row.getToggleExpandedHandler()
|
|
740
751
|
},
|
|
741
|
-
_(
|
|
752
|
+
_(M.FmIcon, {
|
|
742
753
|
name: "keyboard_arrow_up",
|
|
743
754
|
class: [
|
|
744
755
|
"cursor-pointer transition-transform",
|
|
@@ -753,7 +764,7 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
753
764
|
accessorKey: "priceAmount",
|
|
754
765
|
size: 400,
|
|
755
766
|
header: () => _(
|
|
756
|
-
|
|
767
|
+
F,
|
|
757
768
|
{ keypath: "menu.group.option.price", tag: "span" },
|
|
758
769
|
{
|
|
759
770
|
symbol: () => {
|
|
@@ -774,7 +785,7 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
774
785
|
modelValue: o.row.original.priceAmount,
|
|
775
786
|
// Indexed for the same reason as the title above; the visible
|
|
776
787
|
// header keeps its currency symbol.
|
|
777
|
-
"aria-label":
|
|
788
|
+
"aria-label": r(
|
|
778
789
|
o.row.original,
|
|
779
790
|
o.row.index,
|
|
780
791
|
"menu.group.option.price",
|
|
@@ -794,17 +805,17 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
794
805
|
size: 100,
|
|
795
806
|
header: () => e("menu.common.labels.order_from"),
|
|
796
807
|
enableSorting: !1,
|
|
797
|
-
cell: (o) => _(
|
|
808
|
+
cell: (o) => _(M.FmSelect, {
|
|
798
809
|
modelValue: o.row.original.orderFrom,
|
|
799
810
|
disabled: !o.row.original.editOrderFrom,
|
|
800
|
-
"aria-label":
|
|
811
|
+
"aria-label": r(
|
|
801
812
|
o.row.original,
|
|
802
813
|
o.row.index,
|
|
803
814
|
"menu.common.labels.order_from"
|
|
804
815
|
),
|
|
805
816
|
items: ["ALL", "POS_ONLY", "NONE"].map((t) => ({
|
|
806
817
|
value: t,
|
|
807
|
-
label: e(
|
|
818
|
+
label: e(Be[t])
|
|
808
819
|
})),
|
|
809
820
|
"onUpdate:modelValue": (t) => a.setOption(
|
|
810
821
|
o.row.original.id,
|
|
@@ -829,12 +840,12 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
829
840
|
// `group/v3-create/form-normal` layout — it is what narrows the Price
|
|
830
841
|
// column to the width the golden shows.
|
|
831
842
|
...(t = l.value) != null && t.showInventory ? [
|
|
832
|
-
_(
|
|
843
|
+
_(M.FmButton, {
|
|
833
844
|
prependIcon: "inventory_2",
|
|
834
845
|
variant: "tertiary",
|
|
835
846
|
textColor: "neutral-gray-400",
|
|
836
847
|
disabled: !0,
|
|
837
|
-
"aria-label":
|
|
848
|
+
"aria-label": r(
|
|
838
849
|
o.row.original,
|
|
839
850
|
o.row.index,
|
|
840
851
|
"menu.group.option.inventory"
|
|
@@ -844,23 +855,23 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
844
855
|
// Legacy retains the disabled nested-group affordance on empty rows.
|
|
845
856
|
// There is no nested edit intent when the product links no groups.
|
|
846
857
|
...o.row.original.nestedGroupCount ? [] : [
|
|
847
|
-
_(
|
|
858
|
+
_(M.FmButton, {
|
|
848
859
|
prependIcon: "arrow_split",
|
|
849
860
|
variant: "tertiary",
|
|
850
861
|
textColor: "neutral-gray-400",
|
|
851
862
|
disabled: !0,
|
|
852
|
-
"aria-label":
|
|
863
|
+
"aria-label": r(
|
|
853
864
|
o.row.original,
|
|
854
865
|
o.row.index,
|
|
855
866
|
"menu.group.nested.title"
|
|
856
867
|
)
|
|
857
868
|
})
|
|
858
869
|
],
|
|
859
|
-
_(
|
|
870
|
+
_(M.FmButton, {
|
|
860
871
|
prependIcon: "delete",
|
|
861
872
|
variant: "tertiary",
|
|
862
873
|
textColor: "neutral-gray-400",
|
|
863
|
-
"aria-label":
|
|
874
|
+
"aria-label": r(
|
|
864
875
|
o.row.original,
|
|
865
876
|
o.row.index,
|
|
866
877
|
"menu.common.actions.remove"
|
|
@@ -874,66 +885,66 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
874
885
|
}
|
|
875
886
|
]);
|
|
876
887
|
return (o, t) => {
|
|
877
|
-
var
|
|
878
|
-
const V = y("FmButton"),
|
|
879
|
-
return
|
|
880
|
-
|
|
888
|
+
var ge, be, ve;
|
|
889
|
+
const V = y("FmButton"), q = y("FmTooltip"), ce = y("FmStepperField"), de = y("FmFormGroup"), Ce = y("FmRadio"), $e = y("FmRadioGroup"), Se = y("FmSwitch"), Te = y("FmTable"), pe = y("FmSideSheet"), Pe = y("FmChip"), Ve = y("FmSelect");
|
|
890
|
+
return c(), w(K, null, [
|
|
891
|
+
s(pe, {
|
|
881
892
|
"model-value": !0,
|
|
882
893
|
"max-width": o.presentation === "tree" ? 720 : 800,
|
|
883
|
-
"is-container": n(
|
|
894
|
+
"is-container": n(M).FmForm,
|
|
884
895
|
"is-container-props": { onValidationSuccess: ee },
|
|
885
|
-
"onUpdate:modelValue": t[9] || (t[9] = (
|
|
896
|
+
"onUpdate:modelValue": t[9] || (t[9] = (m) => !m && f("close"))
|
|
886
897
|
}, {
|
|
887
|
-
"side-sheet-header":
|
|
888
|
-
v("p",
|
|
898
|
+
"side-sheet-header": p(() => [
|
|
899
|
+
v("p", fo, T(n(e)("menu.group.add")), 1)
|
|
889
900
|
]),
|
|
890
|
-
"side-sheet-footer":
|
|
891
|
-
var
|
|
901
|
+
"side-sheet-footer": p(() => {
|
|
902
|
+
var m;
|
|
892
903
|
return [
|
|
893
|
-
v("div",
|
|
894
|
-
|
|
904
|
+
v("div", wo, [
|
|
905
|
+
s(V, {
|
|
895
906
|
label: n(e)("menu.common.actions.add"),
|
|
896
|
-
disabled: ((
|
|
907
|
+
disabled: ((m = l.value) == null ? void 0 : m.submit.state) !== "allowed",
|
|
897
908
|
size: "lg",
|
|
898
909
|
type: "submit",
|
|
899
910
|
variant: "primary"
|
|
900
911
|
}, null, 8, ["label", "disabled"]),
|
|
901
|
-
|
|
912
|
+
s(V, {
|
|
902
913
|
label: n(e)("menu.common.actions.cancel"),
|
|
903
914
|
size: "lg",
|
|
904
915
|
variant: "tertiary",
|
|
905
|
-
onClick: t[8] || (t[8] = (
|
|
916
|
+
onClick: t[8] || (t[8] = (d) => f("close"))
|
|
906
917
|
}, null, 8, ["label"])
|
|
907
918
|
])
|
|
908
919
|
];
|
|
909
920
|
}),
|
|
910
|
-
default:
|
|
911
|
-
l.value ? (
|
|
912
|
-
|
|
913
|
-
default:
|
|
914
|
-
var
|
|
921
|
+
default: p(() => [
|
|
922
|
+
l.value ? (c(), w("div", yo, [
|
|
923
|
+
s(Ne, null, {
|
|
924
|
+
default: p(() => {
|
|
925
|
+
var m;
|
|
915
926
|
return [
|
|
916
|
-
|
|
927
|
+
s(J, ae({
|
|
917
928
|
autofocus: "",
|
|
918
929
|
label: n(e)("menu.common.labels.group_name"),
|
|
919
930
|
"model-value": l.value.name,
|
|
920
|
-
"error-messages": Z("name") ? [
|
|
921
|
-
}, n(
|
|
931
|
+
"error-messages": Z("name") ? [G("name")] : []
|
|
932
|
+
}, n($).field("name", n(a).setName)), ye({ _: 2 }, [
|
|
922
933
|
l.value.showTranslation !== !1 ? {
|
|
923
934
|
name: "append",
|
|
924
|
-
fn:
|
|
925
|
-
|
|
935
|
+
fn: p(() => [
|
|
936
|
+
s(q, {
|
|
926
937
|
variant: "plain",
|
|
927
938
|
placement: "top",
|
|
928
939
|
"z-index": 999
|
|
929
940
|
}, {
|
|
930
|
-
default:
|
|
931
|
-
|
|
941
|
+
default: p(() => [
|
|
942
|
+
s(V, {
|
|
932
943
|
variant: "tertiary",
|
|
933
944
|
icon: "g_translate",
|
|
934
945
|
disabled: !l.value.canTranslateName,
|
|
935
946
|
"aria-label": n(e)("menu.group.translation.translate_name"),
|
|
936
|
-
onClick: t[0] || (t[0] = (
|
|
947
|
+
onClick: t[0] || (t[0] = (d) => n(a).beginTranslation("group"))
|
|
937
948
|
}, null, 8, ["disabled", "aria-label"])
|
|
938
949
|
]),
|
|
939
950
|
_: 1
|
|
@@ -942,111 +953,111 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
942
953
|
key: "0"
|
|
943
954
|
} : void 0
|
|
944
955
|
]), 1040, ["label", "model-value", "error-messages"]),
|
|
945
|
-
|
|
956
|
+
s(de, {
|
|
946
957
|
"model-value": `${l.value.min} ${l.value.max}`,
|
|
947
|
-
invalid: !!
|
|
948
|
-
"helper-text":
|
|
958
|
+
invalid: !!G("bounds"),
|
|
959
|
+
"helper-text": G("bounds")
|
|
949
960
|
}, {
|
|
950
|
-
default:
|
|
951
|
-
|
|
952
|
-
default:
|
|
953
|
-
|
|
961
|
+
default: p(() => [
|
|
962
|
+
s(_o, null, {
|
|
963
|
+
default: p(() => [
|
|
964
|
+
s(ce, ae({
|
|
954
965
|
class: "flex-1",
|
|
955
966
|
min: 0,
|
|
956
967
|
label: n(e)("menu.common.labels.min_select"),
|
|
957
968
|
"model-value": l.value.min
|
|
958
|
-
}, n(
|
|
959
|
-
|
|
969
|
+
}, n($).field("bounds", n(a).setMin)), null, 16, ["label", "model-value"]),
|
|
970
|
+
s(ce, ae({
|
|
960
971
|
class: "flex-1",
|
|
961
972
|
min: l.value.min,
|
|
962
973
|
label: n(e)("menu.common.labels.max_select"),
|
|
963
974
|
"model-value": l.value.max
|
|
964
|
-
}, n(
|
|
975
|
+
}, n($).field("bounds", n(a).setMax)), null, 16, ["min", "label", "model-value"])
|
|
965
976
|
]),
|
|
966
977
|
_: 1
|
|
967
978
|
})
|
|
968
979
|
]),
|
|
969
980
|
_: 1
|
|
970
981
|
}, 8, ["model-value", "invalid", "helper-text"]),
|
|
971
|
-
l.value.showType ? (
|
|
982
|
+
l.value.showType ? (c(), O(re, {
|
|
972
983
|
key: 0,
|
|
973
984
|
label: n(e)("menu.common.labels.group_type")
|
|
974
985
|
}, {
|
|
975
|
-
default:
|
|
976
|
-
(
|
|
977
|
-
key:
|
|
986
|
+
default: p(() => [
|
|
987
|
+
(c(), O($e, {
|
|
988
|
+
key: H.value,
|
|
978
989
|
"model-value": l.value.type,
|
|
979
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
990
|
+
"onUpdate:modelValue": t[1] || (t[1] = (d) => n(a).setType(d))
|
|
980
991
|
}, {
|
|
981
|
-
default:
|
|
982
|
-
(
|
|
983
|
-
key:
|
|
984
|
-
value:
|
|
985
|
-
label: n(e)(n(
|
|
992
|
+
default: p(() => [
|
|
993
|
+
(c(), w(K, null, Q(z, (d) => s(Ce, {
|
|
994
|
+
key: d,
|
|
995
|
+
value: d,
|
|
996
|
+
label: n(e)(n(De)[d])
|
|
986
997
|
}, null, 8, ["value", "label"])), 64))
|
|
987
998
|
]),
|
|
988
999
|
_: 1
|
|
989
1000
|
}, 8, ["model-value"]))
|
|
990
1001
|
]),
|
|
991
1002
|
_: 1
|
|
992
|
-
}, 8, ["label"])) :
|
|
993
|
-
|
|
1003
|
+
}, 8, ["label"])) : N("", !0),
|
|
1004
|
+
s(re, {
|
|
994
1005
|
label: n(e)("menu.common.labels.configuration")
|
|
995
1006
|
}, {
|
|
996
|
-
default:
|
|
997
|
-
|
|
1007
|
+
default: p(() => [
|
|
1008
|
+
s(Se, {
|
|
998
1009
|
"model-value": l.value.stackable,
|
|
999
1010
|
label: n(e)("menu.common.labels.stackable"),
|
|
1000
1011
|
"label-placement": "right",
|
|
1001
1012
|
sublabel: n(e)("menu.common.labels.stackable_sublabel"),
|
|
1002
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
1013
|
+
"onUpdate:modelValue": t[2] || (t[2] = (d) => n(a).setStackable(d))
|
|
1003
1014
|
}, null, 8, ["model-value", "label", "sublabel"])
|
|
1004
1015
|
]),
|
|
1005
1016
|
_: 1
|
|
1006
1017
|
}, 8, ["label"]),
|
|
1007
|
-
(
|
|
1008
|
-
o.presentation === "tree" ? (
|
|
1018
|
+
(m = l.value.tagging) != null && m.visible ? (c(), w(K, { key: 1 }, [
|
|
1019
|
+
o.presentation === "tree" ? (c(), O(n(_e), {
|
|
1009
1020
|
key: 0,
|
|
1010
1021
|
entity: "group",
|
|
1011
1022
|
"model-value": l.value.customAttributes ?? {},
|
|
1012
|
-
"value-options":
|
|
1013
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
1014
|
-
}, null, 8, ["model-value", "value-options"])) : (
|
|
1023
|
+
"value-options": R.value,
|
|
1024
|
+
"onUpdate:modelValue": t[3] || (t[3] = (d) => n(a).setCustomAttributes(d ?? null))
|
|
1025
|
+
}, null, 8, ["model-value", "value-options"])) : (c(), O(le, {
|
|
1015
1026
|
key: 1,
|
|
1016
1027
|
title: n(e)("menu.group.form.tagging.title"),
|
|
1017
1028
|
"sub-title": n(e)("menu.group.form.tagging.subtitle")
|
|
1018
1029
|
}, {
|
|
1019
|
-
default:
|
|
1020
|
-
|
|
1030
|
+
default: p(() => [
|
|
1031
|
+
s(n(_e), {
|
|
1021
1032
|
entity: "group",
|
|
1022
1033
|
"model-value": l.value.customAttributes ?? {},
|
|
1023
|
-
"value-options":
|
|
1024
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
1034
|
+
"value-options": R.value,
|
|
1035
|
+
"onUpdate:modelValue": t[4] || (t[4] = (d) => n(a).setCustomAttributes(d ?? null))
|
|
1025
1036
|
}, null, 8, ["model-value", "value-options"])
|
|
1026
1037
|
]),
|
|
1027
1038
|
_: 1
|
|
1028
1039
|
}, 8, ["title", "sub-title"]))
|
|
1029
|
-
], 64)) :
|
|
1040
|
+
], 64)) : N("", !0)
|
|
1030
1041
|
];
|
|
1031
1042
|
}),
|
|
1032
1043
|
_: 1
|
|
1033
1044
|
}),
|
|
1034
|
-
|
|
1045
|
+
s(de, {
|
|
1035
1046
|
tag: "div",
|
|
1036
1047
|
"model-value": l.value.options,
|
|
1037
|
-
invalid: !!
|
|
1038
|
-
"helper-text":
|
|
1048
|
+
invalid: !!G("options"),
|
|
1049
|
+
"helper-text": G("options") || n(e)("menu.common.validation.default_items_tip", {
|
|
1039
1050
|
count: l.value.defaultCount,
|
|
1040
1051
|
max: l.value.max
|
|
1041
1052
|
})
|
|
1042
1053
|
}, {
|
|
1043
|
-
default:
|
|
1044
|
-
|
|
1054
|
+
default: p(() => [
|
|
1055
|
+
s(le, {
|
|
1045
1056
|
title: n(e)("menu.group.option.title"),
|
|
1046
1057
|
"sub-title": l.value.linkProducts && o.presentation !== "tree" ? n(e)("menu.group.option.subtitle") : ""
|
|
1047
1058
|
}, {
|
|
1048
|
-
"append-title":
|
|
1049
|
-
|
|
1059
|
+
"append-title": p(() => [
|
|
1060
|
+
s(V, {
|
|
1050
1061
|
variant: "secondary",
|
|
1051
1062
|
"text-color": "primary",
|
|
1052
1063
|
"border-color": "primary",
|
|
@@ -1054,16 +1065,16 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
1054
1065
|
label: n(e)(
|
|
1055
1066
|
l.value.linkProducts ? "menu.group.option.link_products" : "menu.group.option.add_option"
|
|
1056
1067
|
),
|
|
1057
|
-
onClick: t[5] || (t[5] = (
|
|
1068
|
+
onClick: t[5] || (t[5] = (m) => l.value.linkProducts ? x.value = !0 : n(a).addOption())
|
|
1058
1069
|
}, null, 8, ["prepend-icon", "label"])
|
|
1059
1070
|
]),
|
|
1060
|
-
default:
|
|
1061
|
-
v("div",
|
|
1062
|
-
v("div",
|
|
1063
|
-
|
|
1071
|
+
default: p(() => [
|
|
1072
|
+
v("div", xo, [
|
|
1073
|
+
v("div", ho, [
|
|
1074
|
+
s(Te, {
|
|
1064
1075
|
draggable: "",
|
|
1065
|
-
onDndChanged: t[6] || (t[6] = (
|
|
1066
|
-
|
|
1076
|
+
onDndChanged: t[6] || (t[6] = (m) => n(a).reorderOptions(
|
|
1077
|
+
m.map((d) => d.id)
|
|
1067
1078
|
)),
|
|
1068
1079
|
"column-defs": ne.value,
|
|
1069
1080
|
"column-visibility": {
|
|
@@ -1071,10 +1082,10 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
1071
1082
|
priceAmount: l.value.showPrice,
|
|
1072
1083
|
orderFrom: l.value.showOrderFrom
|
|
1073
1084
|
},
|
|
1074
|
-
"row-data":
|
|
1085
|
+
"row-data": Y.value,
|
|
1075
1086
|
"get-row-id": i,
|
|
1076
|
-
"expanded-state":
|
|
1077
|
-
"onUpdate:expandedState": t[7] || (t[7] = (
|
|
1087
|
+
"expanded-state": U.value,
|
|
1088
|
+
"onUpdate:expandedState": t[7] || (t[7] = (m) => U.value = m),
|
|
1078
1089
|
"page-size": Math.max(l.value.options.length, 1),
|
|
1079
1090
|
"shrink-at": !1,
|
|
1080
1091
|
"hide-footer": ""
|
|
@@ -1087,11 +1098,11 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
1087
1098
|
]),
|
|
1088
1099
|
_: 1
|
|
1089
1100
|
}, 8, ["model-value", "invalid", "helper-text"])
|
|
1090
|
-
])) :
|
|
1101
|
+
])) : N("", !0)
|
|
1091
1102
|
]),
|
|
1092
1103
|
_: 1
|
|
1093
1104
|
}, 8, ["max-width", "is-container", "is-container-props"]),
|
|
1094
|
-
((
|
|
1105
|
+
((ge = l.value) == null ? void 0 : ge.translationMode) === "group" ? (c(), O(ze, {
|
|
1095
1106
|
key: 0,
|
|
1096
1107
|
"model-value": !0,
|
|
1097
1108
|
name: l.value.name,
|
|
@@ -1102,69 +1113,69 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
1102
1113
|
"name-section-label": n(e)("menu.common.translation.name_section", {
|
|
1103
1114
|
entity: n(e)("menu.group.title")
|
|
1104
1115
|
}),
|
|
1105
|
-
"onUpdate:modelValue": t[10] || (t[10] = (
|
|
1106
|
-
"onUpdate:name": t[11] || (t[11] = (
|
|
1107
|
-
"onUpdate:nameLocale": t[12] || (t[12] = (
|
|
1108
|
-
onSave: t[13] || (t[13] = (
|
|
1109
|
-
onDiscard: t[14] || (t[14] = (
|
|
1110
|
-
}, null, 8, ["name", "name-locale", "supported-locales", "dirty", "title", "name-section-label"])) :
|
|
1111
|
-
((
|
|
1116
|
+
"onUpdate:modelValue": t[10] || (t[10] = (m) => !m && k()),
|
|
1117
|
+
"onUpdate:name": t[11] || (t[11] = (m) => n(a).setName(m)),
|
|
1118
|
+
"onUpdate:nameLocale": t[12] || (t[12] = (m) => n(a).setNameLocale(m)),
|
|
1119
|
+
onSave: t[13] || (t[13] = (m) => n(a).applyTranslation()),
|
|
1120
|
+
onDiscard: t[14] || (t[14] = (m) => n(a).cancelTranslation())
|
|
1121
|
+
}, null, 8, ["name", "name-locale", "supported-locales", "dirty", "title", "name-section-label"])) : N("", !0),
|
|
1122
|
+
((be = l.value) == null ? void 0 : be.translationMode) === "options" ? (c(), O(pe, {
|
|
1112
1123
|
key: 1,
|
|
1113
1124
|
"model-value": !0,
|
|
1114
1125
|
"max-width": 720,
|
|
1115
|
-
"onUpdate:modelValue": t[17] || (t[17] = (
|
|
1116
|
-
"onOn:clickedAway":
|
|
1126
|
+
"onUpdate:modelValue": t[17] || (t[17] = (m) => !m && k()),
|
|
1127
|
+
"onOn:clickedAway": B
|
|
1117
1128
|
}, {
|
|
1118
|
-
"side-sheet-header":
|
|
1119
|
-
v("p",
|
|
1129
|
+
"side-sheet-header": p(() => [
|
|
1130
|
+
v("p", ko, T(n(e)("menu.group.translation.title")), 1)
|
|
1120
1131
|
]),
|
|
1121
|
-
"side-sheet-footer":
|
|
1122
|
-
v("div",
|
|
1123
|
-
|
|
1132
|
+
"side-sheet-footer": p(() => [
|
|
1133
|
+
v("div", So, [
|
|
1134
|
+
s(V, {
|
|
1124
1135
|
label: n(e)("menu.common.actions.save"),
|
|
1125
1136
|
size: "lg",
|
|
1126
|
-
onClick: t[16] || (t[16] = (
|
|
1137
|
+
onClick: t[16] || (t[16] = (m) => n(a).applyTranslation())
|
|
1127
1138
|
}, null, 8, ["label"]),
|
|
1128
|
-
|
|
1139
|
+
s(V, {
|
|
1129
1140
|
label: n(e)("menu.common.actions.cancel"),
|
|
1130
1141
|
variant: "tertiary",
|
|
1131
1142
|
size: "lg",
|
|
1132
|
-
onClick:
|
|
1143
|
+
onClick: B
|
|
1133
1144
|
}, null, 8, ["label"])
|
|
1134
1145
|
])
|
|
1135
1146
|
]),
|
|
1136
|
-
default:
|
|
1137
|
-
v("div",
|
|
1138
|
-
|
|
1147
|
+
default: p(() => [
|
|
1148
|
+
v("div", Fo, [
|
|
1149
|
+
s(re, {
|
|
1139
1150
|
label: n(e)("menu.group.translation.language")
|
|
1140
1151
|
}, {
|
|
1141
|
-
default:
|
|
1142
|
-
var
|
|
1152
|
+
default: p(() => {
|
|
1153
|
+
var m;
|
|
1143
1154
|
return [
|
|
1144
|
-
v("div",
|
|
1145
|
-
(
|
|
1155
|
+
v("div", Co, [
|
|
1156
|
+
(c(!0), w(K, null, Q(l.value.optionTranslationLocales, (d) => {
|
|
1146
1157
|
var A;
|
|
1147
|
-
return
|
|
1148
|
-
key:
|
|
1158
|
+
return c(), O(Pe, {
|
|
1159
|
+
key: d,
|
|
1149
1160
|
removable: "",
|
|
1150
|
-
label: ((A = l.value.supportedLocales.find((te) => te.code ===
|
|
1161
|
+
label: ((A = l.value.supportedLocales.find((te) => te.code === d)) == null ? void 0 : A.name) ?? d,
|
|
1151
1162
|
onChipClosed: (te) => n(a).setOptionTranslationLocales(
|
|
1152
|
-
l.value.optionTranslationLocales.filter((Oe) => Oe !==
|
|
1163
|
+
l.value.optionTranslationLocales.filter((Oe) => Oe !== d)
|
|
1153
1164
|
)
|
|
1154
1165
|
}, null, 8, ["label", "onChipClosed"]);
|
|
1155
1166
|
}), 128)),
|
|
1156
|
-
|
|
1157
|
-
items: (((
|
|
1158
|
-
(
|
|
1167
|
+
s(Ve, {
|
|
1168
|
+
items: (((m = l.value) == null ? void 0 : m.supportedLocales) ?? []).filter(
|
|
1169
|
+
(d) => {
|
|
1159
1170
|
var A;
|
|
1160
|
-
return !(((A = l.value) == null ? void 0 : A.optionTranslationLocales) ?? []).includes(
|
|
1171
|
+
return !(((A = l.value) == null ? void 0 : A.optionTranslationLocales) ?? []).includes(d.code);
|
|
1161
1172
|
}
|
|
1162
|
-
).map((
|
|
1173
|
+
).map((d) => ({ value: d.code, label: d.name })),
|
|
1163
1174
|
placeholder: n(e)("menu.group.translation.add_language"),
|
|
1164
1175
|
"model-value": null,
|
|
1165
|
-
"onUpdate:modelValue": t[15] || (t[15] = (
|
|
1176
|
+
"onUpdate:modelValue": t[15] || (t[15] = (d) => n(a).setOptionTranslationLocales([
|
|
1166
1177
|
...l.value.optionTranslationLocales,
|
|
1167
|
-
|
|
1178
|
+
d
|
|
1168
1179
|
]))
|
|
1169
1180
|
}, null, 8, ["items", "placeholder"])
|
|
1170
1181
|
])
|
|
@@ -1172,46 +1183,46 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
1172
1183
|
}),
|
|
1173
1184
|
_: 1
|
|
1174
1185
|
}, 8, ["label"]),
|
|
1175
|
-
|
|
1186
|
+
s(le, {
|
|
1176
1187
|
title: n(e)("menu.group.translation.group_name")
|
|
1177
1188
|
}, {
|
|
1178
|
-
default:
|
|
1179
|
-
|
|
1189
|
+
default: p(() => [
|
|
1190
|
+
s(J, {
|
|
1180
1191
|
"model-value": l.value.name,
|
|
1181
1192
|
readonly: ""
|
|
1182
1193
|
}, null, 8, ["model-value"])
|
|
1183
1194
|
]),
|
|
1184
1195
|
_: 1
|
|
1185
1196
|
}, 8, ["title"]),
|
|
1186
|
-
|
|
1197
|
+
s(le, {
|
|
1187
1198
|
title: n(e)("menu.group.translation.product_name")
|
|
1188
1199
|
}, {
|
|
1189
|
-
default:
|
|
1190
|
-
(
|
|
1191
|
-
key:
|
|
1200
|
+
default: p(() => [
|
|
1201
|
+
(c(!0), w(K, null, Q(l.value.options, (m, d) => (c(), w("div", {
|
|
1202
|
+
key: m.id,
|
|
1192
1203
|
class: "space-y-8"
|
|
1193
1204
|
}, [
|
|
1194
|
-
v("p",
|
|
1195
|
-
|
|
1196
|
-
label: n(e)("menu.group.translation.option_default", { number:
|
|
1197
|
-
"model-value":
|
|
1198
|
-
"onUpdate:modelValue": (A) => n(a).setOption(
|
|
1205
|
+
v("p", $o, T(n(e)("menu.group.translation.option", { number: d + 1 })), 1),
|
|
1206
|
+
s(J, {
|
|
1207
|
+
label: n(e)("menu.group.translation.option_default", { number: d + 1 }),
|
|
1208
|
+
"model-value": m.name,
|
|
1209
|
+
"onUpdate:modelValue": (A) => n(a).setOption(m.id, { name: A })
|
|
1199
1210
|
}, null, 8, ["label", "model-value", "onUpdate:modelValue"]),
|
|
1200
|
-
(
|
|
1211
|
+
(c(!0), w(K, null, Q(l.value.optionTranslationLocales, (A) => (c(), w("div", {
|
|
1201
1212
|
key: A,
|
|
1202
1213
|
class: "flex gap-8 items-center"
|
|
1203
1214
|
}, [
|
|
1204
|
-
|
|
1205
|
-
|
|
1215
|
+
s(Ee, { code: A }, null, 8, ["code"]),
|
|
1216
|
+
s(J, {
|
|
1206
1217
|
class: "flex-1",
|
|
1207
1218
|
"aria-label": n(e)("menu.group.translation.option_translation", {
|
|
1208
|
-
number:
|
|
1219
|
+
number: d + 1,
|
|
1209
1220
|
language: A
|
|
1210
1221
|
}),
|
|
1211
|
-
"model-value":
|
|
1222
|
+
"model-value": m.nameLocale[A] ?? "",
|
|
1212
1223
|
placeholder: n(e)("menu.group.translation.placeholder"),
|
|
1213
|
-
"onUpdate:modelValue": (te) => n(a).setOptionNameLocale(
|
|
1214
|
-
...
|
|
1224
|
+
"onUpdate:modelValue": (te) => n(a).setOptionNameLocale(m.id, {
|
|
1225
|
+
...m.nameLocale,
|
|
1215
1226
|
[A]: te
|
|
1216
1227
|
})
|
|
1217
1228
|
}, null, 8, ["aria-label", "model-value", "placeholder", "onUpdate:modelValue"])
|
|
@@ -1223,24 +1234,24 @@ const fo = /* @__PURE__ */ De(bo, [["render", _o]]), yo = { class: "fm-typo-en-t
|
|
|
1223
1234
|
])
|
|
1224
1235
|
]),
|
|
1225
1236
|
_: 1
|
|
1226
|
-
})) :
|
|
1227
|
-
|
|
1228
|
-
modelValue:
|
|
1229
|
-
"onUpdate:modelValue": t[18] || (t[18] = (
|
|
1230
|
-
catalogue:
|
|
1231
|
-
"selected-product-ids": ((
|
|
1237
|
+
})) : N("", !0),
|
|
1238
|
+
s(Me, {
|
|
1239
|
+
modelValue: x.value,
|
|
1240
|
+
"onUpdate:modelValue": t[18] || (t[18] = (m) => x.value = m),
|
|
1241
|
+
catalogue: S.value,
|
|
1242
|
+
"selected-product-ids": ((ve = l.value) == null ? void 0 : ve.selectedProductIds) ?? [],
|
|
1232
1243
|
title: n(e)("menu.group.option.link_products"),
|
|
1233
|
-
onSubmit:
|
|
1244
|
+
onSubmit: h
|
|
1234
1245
|
}, null, 8, ["modelValue", "catalogue", "selected-product-ids", "title"])
|
|
1235
1246
|
], 64);
|
|
1236
1247
|
};
|
|
1237
1248
|
}
|
|
1238
1249
|
});
|
|
1239
1250
|
export {
|
|
1240
|
-
|
|
1251
|
+
_o as F,
|
|
1241
1252
|
ie as _,
|
|
1242
|
-
|
|
1253
|
+
qe as a,
|
|
1243
1254
|
Go as b,
|
|
1244
1255
|
Ro as c,
|
|
1245
|
-
|
|
1256
|
+
Ko as d
|
|
1246
1257
|
};
|