@feedmepos/mf-menu-portal 1.0.4-dev.4 → 1.0.5-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-CrpoLCjA.js → App-B2xq1U4S.js} +699 -687
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-Hdsnu29V.js → ApplyProduct.vue_vue_type_script_setup_true_lang-CPh1GBw9.js} +11 -10
- package/dist/{BindingTable.vue_vue_type_script_setup_true_lang-D3CmOOPY.js → BindingTable.vue_vue_type_script_setup_true_lang-DCgMQJE-.js} +50 -46
- package/dist/Catalog-BEI73S_k.js +433 -0
- package/dist/{CatalogBinding-BNATtZEY.js → CatalogBinding-3rhuTWDD.js} +30 -29
- package/dist/{CatalogEditTabs.vue_vue_type_script_setup_true_lang-BmG-xpW4.js → CatalogEditTabs.vue_vue_type_script_setup_true_lang-CraEwqCY.js} +30 -29
- package/dist/{CatalogEditor.vue_vue_type_script_setup_true_lang-BFsRDFpj.js → CatalogEditor.vue_vue_type_script_setup_true_lang-Dc72SNpI.js} +314 -304
- package/dist/CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-CMyubLvP.js +127 -0
- package/dist/{Category-DMoXTsfG.js → Category-BVCdkA5K.js} +14 -13
- package/dist/{Category-DxjdQ-NN.js → Category-P5DYjIeF.js} +2 -2
- package/dist/{CategoryList.vue_vue_type_script_setup_true_lang-B3Ts1O-9.js → CategoryList.vue_vue_type_script_setup_true_lang-DyhW52Df.js} +274 -262
- package/dist/{CookingGuide-DiZZDYD-.js → CookingGuide-Y-c1NLP5.js} +144 -140
- package/dist/{Group-rzfh_o6r.js → Group-D6wA3jCF.js} +2 -2
- package/dist/{Group-DFR8q-tt.js → Group-qqr5SUIc.js} +17 -15
- package/dist/GroupList.vue_vue_type_script_setup_true_lang-DNTVfY2d.js +1996 -0
- package/dist/{Ingredient-DpjGIuH9.js → Ingredient-CJHkJZ0y.js} +94 -93
- package/dist/{LinkProductSideSheet.vue_vue_type_script_setup_true_lang-CnI80Ojd.js → LinkProductSideSheet.vue_vue_type_script_setup_true_lang-Cb6nO43H.js} +1 -1
- package/dist/{MenuSetting-DR-pDSF_.js → MenuSetting-YcEGo51l.js} +462 -446
- package/dist/{OrderPacing-JcTuweqF.js → OrderPacing-DwQU7c0Y.js} +207 -204
- package/dist/{OrderPacingFields.vue_vue_type_script_setup_true_lang-HwwJ2mGv.js → OrderPacingFields.vue_vue_type_script_setup_true_lang-2Cdz70u-.js} +1 -2
- package/dist/PageLayout.vue_vue_type_script_setup_true_lang-DrhsROXo.js +44 -0
- package/dist/PhoneFab.vue_vue_type_script_setup_true_lang-CipbTqbp.js +12 -0
- package/dist/{Preview-BZyun5lZ.js → Preview-DLeXy5V-.js} +2 -2
- package/dist/{PriceTierNotice.vue_vue_type_script_setup_true_lang-DquqNbE1.js → PriceTierNotice.vue_vue_type_script_setup_true_lang-D_OV9Z_4.js} +1 -1
- package/dist/{PrintRoute-CzEx2dCt.js → PrintRoute-R38w0-U2.js} +151 -150
- package/dist/{Product-CQb0n06E.js → Product-sbMCaVhM.js} +8 -7
- package/dist/ProductAttributeFilter.vue_vue_type_script_setup_true_lang-DoHQeOHy.js +7826 -0
- package/dist/ProductChipSummary.vue_vue_type_script_setup_true_lang-D9v88xZs.js +111 -0
- package/dist/{ProductEditorHost.vue_vue_type_script_setup_true_lang-CBlDEjqF.js → ProductEditorHost.vue_vue_type_script_setup_true_lang-DsIGLKNS.js} +17 -17
- package/dist/{ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-D8NQTCLx.js → ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-CEliG36Z.js} +726 -726
- package/dist/{ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-cG47Pu-6.js → ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-B3bShTjM.js} +127 -124
- package/dist/{ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-0UwUcA2L.js → ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-BzctosMW.js} +820 -807
- package/dist/{ProductInternalTools-QrBR1nFp.js → ProductInternalTools-jE3Ovo4l.js} +3 -3
- package/dist/{ProductInventoryDialog-fV38GO1a.js → ProductInventoryDialog-EDlrXupB.js} +1 -1
- package/dist/{ProductInventoryDialog.vue_vue_type_script_setup_true_lang-Bzb3RrMg.js → ProductInventoryDialog.vue_vue_type_script_setup_true_lang-LOwSpoiA.js} +1 -1
- package/dist/{ProductList.vue_vue_type_script_setup_true_lang-BwKQESr3.js → ProductList.vue_vue_type_script_setup_true_lang-rczFAWVa.js} +1135 -1098
- package/dist/{ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-CDYcHXo1.js → ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-C4iK-sAd.js} +1 -1
- package/dist/{Products-B8tysOAL.js → Products-DUE10OyS.js} +51 -49
- package/dist/Publish-BlMxKniP.js +1300 -0
- package/dist/{Recipe-Ddx31csF.js → Recipe-BhjPAidT.js} +83 -82
- package/dist/{Scheduler-CST5L_cw.js → Scheduler-wKG3_D1f.js} +137 -136
- package/dist/{ServingSequence-DYyEZI2S.js → ServingSequence-B26BETQs.js} +63 -61
- package/dist/Setting-DBdNl3WL.js +185 -0
- package/dist/{Subcategory-BIgjzVta.js → Subcategory-B06yMcuE.js} +147 -144
- package/dist/{Takeaway-CekhGM-m.js → Takeaway-CFATfy-6.js} +2 -2
- package/dist/{Takeaway-aXsPg4JT.js → Takeaway-DFqOtls7.js} +17 -16
- package/dist/TakeawayList.vue_vue_type_script_setup_true_lang-CUHB-g9I.js +616 -0
- package/dist/TextChip.vue_vue_type_script_setup_true_lang-YkUjMTXo.js +32 -0
- package/dist/{TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CshqYpc9.js → TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DoS4Btzj.js} +281 -308
- package/dist/{Unit-BMW8u0Us.js → Unit-B5wKBmIT.js} +90 -89
- package/dist/{Variant-CZsrYRMU.js → Variant-C5ePu0za.js} +167 -174
- package/dist/{_id_-D4swrvNa.js → _id_-HRDqt6oD.js} +3 -3
- package/dist/{app-BWwwHsWi.js → app-CxJjx2ma.js} +39 -39
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/src/app.d.ts +35 -0
- package/dist/apps/mf-menu/src/components/GroupList.vue.d.ts +8 -0
- package/dist/apps/mf-menu/src/components/Product/OrderFromChip.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/Product/ProductThumbnail.vue.d.ts +6 -0
- package/dist/apps/mf-menu/src/components/ProductList.vue.d.ts +4 -2
- package/dist/apps/mf-menu/src/components/PublishList.vue.d.ts +1 -1
- package/dist/apps/mf-menu/src/components/layout/MobileXScrollable.vue.d.ts +9 -0
- package/dist/apps/mf-menu/src/components/layout/PageLayout.vue.d.ts +7 -0
- package/dist/apps/mf-menu/src/components/layout/PhoneFab.vue.d.ts +9 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{menu-compute-D7TdiHt4.js → menu-compute-CQdeCEBO.js} +19 -19
- package/dist/assets/{validate-menu-DXppWUVq.js → validate-menu-BVo4fNWG.js} +14 -14
- package/dist/mf-menu-portal.css +1 -1
- package/dist/{provide-CDmXzkhz.js → provide-BGLSDsuJ.js} +99816 -99564
- package/dist/{useActionFeedback-Dm2HDa_2.js → useActionFeedback-CElXij1W.js} +1 -1
- package/package.json +1 -1
- package/dist/Catalog-VU3HhNro.js +0 -374
- package/dist/CatalogLinkProductAction.vue_vue_type_script_setup_true_lang-Bk4FqVmx.js +0 -117
- package/dist/GroupList.vue_vue_type_script_setup_true_lang-DiN-wQXX.js +0 -1807
- package/dist/PageLayout.vue_vue_type_script_setup_true_lang-B3szUH39.js +0 -41
- package/dist/ProductAttributeFilter.vue_vue_type_script_setup_true_lang-B2KdolJS.js +0 -7931
- package/dist/Publish-DTvOvFNa.js +0 -1337
- package/dist/Setting-Ip0pGjks.js +0 -179
- package/dist/TakeawayList.vue_vue_type_script_setup_true_lang-CaRR4_j3.js +0 -554
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { _ as ge, a as
|
|
3
|
-
import { useI18n as be, CustomAttributesForm as
|
|
4
|
-
import { useAppStore as
|
|
5
|
-
import { InventoryBindingSummary as
|
|
6
|
-
import { components as B, useDialog as
|
|
7
|
-
import { b as
|
|
1
|
+
import { ref as Y, computed as R, nextTick as Je, defineComponent as ce, openBlock as r, createBlock as T, unref as e, withCtx as c, createElementVNode as n, renderSlot as Qe, createElementBlock as S, resolveComponent as M, toDisplayString as I, createCommentVNode as y, createVNode as s, toRaw as el, onBeforeUnmount as ke, Fragment as re, renderList as Fe, shallowRef as ye, watch as Ae, onMounted as Ol, createTextVNode as sl, withModifiers as Ee, normalizeClass as Be, h as X, createSlots as cl, normalizeStyle as pl, isRef as Ll, mergeProps as Ce, withDirectives as ul } from "vue";
|
|
2
|
+
import { _ as ge, a as Wl, b as $l, u as Yl } from "./TranslationLanguageSelector.vue_vue_type_script_setup_true_lang-BJZ6VcrT.js";
|
|
3
|
+
import { useI18n as be, CustomAttributesForm as Zl } from "@feedmepos/mf-common";
|
|
4
|
+
import { useAppStore as zl, RemyButton as Sl } from "@feedmepos/mf-remy-panel";
|
|
5
|
+
import { InventoryBindingSummary as Jl } from "@feedmepos/mf-inventory-portal";
|
|
6
|
+
import { components as B, useDialog as Xe, useSnackbar as ea, FmButtonVariant as Ne, FmButtonColorThemeVariant as Vl } from "@feedmepos/ui-library";
|
|
7
|
+
import { b as la } from "./app-CxJjx2ma.js";
|
|
8
8
|
import { _ as Oe } from "./FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js";
|
|
9
|
-
import { d as
|
|
10
|
-
import {
|
|
11
|
-
import { u as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { a as
|
|
15
|
-
import { _ as
|
|
16
|
-
import { _ as
|
|
17
|
-
import { _ as
|
|
9
|
+
import { d as aa, _ as qe, a as ta } from "./vuedraggable-CBtQLb_S.js";
|
|
10
|
+
import { _ as Dl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
+
import { b as Pe, u as Le, A as oa } from "./provide-BGLSDsuJ.js";
|
|
12
|
+
import { u as Ue } from "./useActionFeedback-CElXij1W.js";
|
|
13
|
+
import { a as dl, b as Pl, t as Ul, r as na, d as sa, c as ia } from "./ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-B3bShTjM.js";
|
|
14
|
+
import { _ as Ke, a as nl, F as ra, b as Rl, c as ua, d as da } from "./ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-CEliG36Z.js";
|
|
15
|
+
import { a as Ml, A as Il, _ as ma } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-Cb6nO43H.js";
|
|
16
|
+
import { _ as Nl } from "./ProductInventoryDialog.vue_vue_type_script_setup_true_lang-LOwSpoiA.js";
|
|
17
|
+
import { _ as ca } from "./PriceTierNotice.vue_vue_type_script_setup_true_lang-D_OV9Z_4.js";
|
|
18
|
+
import { _ as pa } from "./AddPriceGroupDialog.vue_vue_type_script_setup_true_lang-DhKyG3gY.js";
|
|
18
19
|
import { _ as il } from "./TranslationSideSheet.vue_vue_type_script_setup_true_lang-B0j2PNih.js";
|
|
19
|
-
import { _ as
|
|
20
|
+
import { _ as va } from "./OrderPacingFields.vue_vue_type_script_setup_true_lang-2Cdz70u-.js";
|
|
20
21
|
import { u as ll } from "./useEditorValidation-Ctef5Bxt.js";
|
|
21
|
-
import { _ as
|
|
22
|
-
function
|
|
23
|
-
const i =
|
|
24
|
-
() => x.value ?
|
|
22
|
+
import { _ as ba } from "./ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-C4iK-sAd.js";
|
|
23
|
+
function El(H, V) {
|
|
24
|
+
const i = Y(""), x = R(() => i.value.trim().toLowerCase()), o = R(
|
|
25
|
+
() => x.value ? H().filter(
|
|
25
26
|
(C) => V(C).toLowerCase().includes(x.value)
|
|
26
|
-
) :
|
|
27
|
+
) : H()
|
|
27
28
|
), d = R(
|
|
28
29
|
() => x.value !== "" && o.value.length === 0
|
|
29
30
|
);
|
|
@@ -32,14 +33,14 @@ function Ml(Y, V) {
|
|
|
32
33
|
}
|
|
33
34
|
return { search: i, filtered: o, noMatches: d, reset: w };
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
-
const
|
|
36
|
+
function ql() {
|
|
37
|
+
const H = Y(), V = Y();
|
|
37
38
|
let i = !1;
|
|
38
39
|
async function x(d) {
|
|
39
40
|
var P;
|
|
40
41
|
if (i = d, V.value = void 0, !d) return;
|
|
41
42
|
await Je(), await new Promise(requestAnimationFrame);
|
|
42
|
-
const w = (P =
|
|
43
|
+
const w = (P = H.value) == null ? void 0 : P.parentElement;
|
|
43
44
|
if (!i || !w) return;
|
|
44
45
|
const C = getComputedStyle(w);
|
|
45
46
|
V.value = w.clientHeight - parseFloat(C.paddingTop) - parseFloat(C.paddingBottom);
|
|
@@ -47,7 +48,7 @@ function Nl() {
|
|
|
47
48
|
const o = R(
|
|
48
49
|
() => V.value ? { minHeight: `${V.value}px` } : void 0
|
|
49
50
|
);
|
|
50
|
-
return { content:
|
|
51
|
+
return { content: H, contentStyle: o, onMenuChanged: x };
|
|
51
52
|
}
|
|
52
53
|
const ml = /* @__PURE__ */ ce({
|
|
53
54
|
__name: "FlatInlineSort",
|
|
@@ -57,8 +58,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
57
58
|
lockLast: { type: Boolean }
|
|
58
59
|
},
|
|
59
60
|
emits: ["reorder"],
|
|
60
|
-
setup(
|
|
61
|
-
const i =
|
|
61
|
+
setup(H, { emit: V }) {
|
|
62
|
+
const i = H, x = V;
|
|
62
63
|
function o(w) {
|
|
63
64
|
x(
|
|
64
65
|
"reorder",
|
|
@@ -68,7 +69,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
68
69
|
function d(w) {
|
|
69
70
|
return !i.lockLast || w.draggedContext.futureIndex !== w.relatedContext.list.length - 1;
|
|
70
71
|
}
|
|
71
|
-
return (w, C) => (r(), T(e(
|
|
72
|
+
return (w, C) => (r(), T(e(aa), {
|
|
72
73
|
"model-value": [...i.items],
|
|
73
74
|
"item-key": "id",
|
|
74
75
|
handle: i.handle,
|
|
@@ -76,9 +77,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
76
77
|
class: "space-y-16",
|
|
77
78
|
"onUpdate:modelValue": o
|
|
78
79
|
}, {
|
|
79
|
-
item:
|
|
80
|
+
item: c(({ element: P, index: m }) => [
|
|
80
81
|
n("div", null, [
|
|
81
|
-
|
|
82
|
+
Qe(w.$slots, "item", {
|
|
82
83
|
element: P,
|
|
83
84
|
index: m
|
|
84
85
|
})
|
|
@@ -87,10 +88,18 @@ const ml = /* @__PURE__ */ ce({
|
|
|
87
88
|
_: 3
|
|
88
89
|
}, 8, ["model-value", "handle"]));
|
|
89
90
|
}
|
|
90
|
-
}),
|
|
91
|
+
}), fa = {}, ga = { class: "overflow-x-auto" }, ya = { class: "xs:w-[600px]" };
|
|
92
|
+
function _a(H, V) {
|
|
93
|
+
return r(), S("div", ga, [
|
|
94
|
+
n("div", ya, [
|
|
95
|
+
Qe(H.$slots, "default")
|
|
96
|
+
])
|
|
97
|
+
]);
|
|
98
|
+
}
|
|
99
|
+
const Tl = /* @__PURE__ */ Dl(fa, [["render", _a]]), ha = { class: "flex items-center justify-between" }, ka = { class: "space-y-4 flex-1" }, wa = { class: "fm-typo-en-title-sm-600" }, xa = {
|
|
91
100
|
key: 0,
|
|
92
101
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
93
|
-
},
|
|
102
|
+
}, Ca = { class: "sr-only" }, Fa = { key: 0 }, Te = /* @__PURE__ */ ce({
|
|
94
103
|
__name: "ProductFormSection",
|
|
95
104
|
props: {
|
|
96
105
|
section: {},
|
|
@@ -102,8 +111,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
102
111
|
anchor: {}
|
|
103
112
|
},
|
|
104
113
|
emits: ["update:enabled"],
|
|
105
|
-
setup(
|
|
106
|
-
const i =
|
|
114
|
+
setup(H, { emit: V }) {
|
|
115
|
+
const i = H, x = V;
|
|
107
116
|
return (o, d) => {
|
|
108
117
|
const w = M("FmSwitch"), C = M("FmCard");
|
|
109
118
|
return i.section.toggle === "none" ? (r(), T(qe, {
|
|
@@ -112,11 +121,11 @@ const ml = /* @__PURE__ */ ce({
|
|
|
112
121
|
title: i.title,
|
|
113
122
|
"sub-title": i.subtitle
|
|
114
123
|
}, {
|
|
115
|
-
"append-title":
|
|
116
|
-
|
|
124
|
+
"append-title": c(() => [
|
|
125
|
+
Qe(o.$slots, "append-title")
|
|
117
126
|
]),
|
|
118
|
-
default:
|
|
119
|
-
|
|
127
|
+
default: c(() => [
|
|
128
|
+
Qe(o.$slots, "default")
|
|
120
129
|
]),
|
|
121
130
|
_: 3
|
|
122
131
|
}, 8, ["id", "title", "sub-title"])) : (r(), T(C, {
|
|
@@ -124,11 +133,11 @@ const ml = /* @__PURE__ */ ce({
|
|
|
124
133
|
class: "p-16 space-y-24",
|
|
125
134
|
variant: "outlined"
|
|
126
135
|
}, {
|
|
127
|
-
default:
|
|
128
|
-
n("div",
|
|
129
|
-
n("div",
|
|
130
|
-
n("p",
|
|
131
|
-
i.description ? (r(), S("p",
|
|
136
|
+
default: c(() => [
|
|
137
|
+
n("div", ha, [
|
|
138
|
+
n("div", ka, [
|
|
139
|
+
n("p", wa, I(i.overrideTitle ?? i.title), 1),
|
|
140
|
+
i.description ? (r(), S("p", xa, I(i.description), 1)) : y("", !0)
|
|
132
141
|
]),
|
|
133
142
|
s(w, {
|
|
134
143
|
"aria-label": i.toggleLabel ?? i.title,
|
|
@@ -136,45 +145,45 @@ const ml = /* @__PURE__ */ ce({
|
|
|
136
145
|
value: "",
|
|
137
146
|
"onUpdate:modelValue": d[0] || (d[0] = (P) => x("update:enabled", P))
|
|
138
147
|
}, {
|
|
139
|
-
label:
|
|
140
|
-
n("span",
|
|
148
|
+
label: c(() => [
|
|
149
|
+
n("span", Ca, I(i.toggleLabel ?? i.title), 1)
|
|
141
150
|
]),
|
|
142
151
|
_: 1
|
|
143
152
|
}, 8, ["aria-label", "model-value"])
|
|
144
153
|
]),
|
|
145
|
-
i.section.toggle === "on" ? (r(), S("div",
|
|
154
|
+
i.section.toggle === "on" ? (r(), S("div", Fa, [
|
|
146
155
|
i.overrideTitle ? (r(), T(qe, {
|
|
147
156
|
key: 0,
|
|
148
157
|
id: i.anchor,
|
|
149
158
|
title: i.title,
|
|
150
159
|
"sub-title": i.subtitle
|
|
151
160
|
}, {
|
|
152
|
-
"append-title":
|
|
153
|
-
|
|
161
|
+
"append-title": c(() => [
|
|
162
|
+
Qe(o.$slots, "append-title")
|
|
154
163
|
]),
|
|
155
|
-
default:
|
|
156
|
-
|
|
164
|
+
default: c(() => [
|
|
165
|
+
Qe(o.$slots, "default")
|
|
157
166
|
]),
|
|
158
167
|
_: 3
|
|
159
|
-
}, 8, ["id", "title", "sub-title"])) :
|
|
168
|
+
}, 8, ["id", "title", "sub-title"])) : Qe(o.$slots, "default", { key: 1 })
|
|
160
169
|
])) : y("", !0)
|
|
161
170
|
]),
|
|
162
171
|
_: 3
|
|
163
172
|
}));
|
|
164
173
|
};
|
|
165
174
|
}
|
|
166
|
-
}),
|
|
175
|
+
}), $a = { class: "fm-typo-en-title-sm-600" }, Sa = { class: "space-y-16" }, Va = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pa = { class: "flex items-end gap-12" }, Ua = { style: { width: "198px" } }, Ia = { class: "fm-typo-en-body-md-400 pb-12" }, Ta = { style: { width: "198px" } }, Aa = {
|
|
167
176
|
key: 0,
|
|
168
177
|
class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
169
|
-
},
|
|
178
|
+
}, Ba = { class: "flex w-full items-center justify-end gap-8 px-0 pb-0" }, Oa = /* @__PURE__ */ ce({
|
|
170
179
|
__name: "ProductImageCustomFormatDialog",
|
|
171
180
|
props: {
|
|
172
181
|
sdk: {},
|
|
173
182
|
existingIds: {}
|
|
174
183
|
},
|
|
175
184
|
emits: ["close", "confirm"],
|
|
176
|
-
setup(
|
|
177
|
-
const i =
|
|
185
|
+
setup(H, { emit: V }) {
|
|
186
|
+
const i = H, x = V, { t: o } = be(), { run: d } = Ue(), w = Y(""), C = Y(""), P = Y(!0);
|
|
178
187
|
function m() {
|
|
179
188
|
P.value = !1, x("close");
|
|
180
189
|
}
|
|
@@ -203,11 +212,11 @@ const ml = /* @__PURE__ */ ce({
|
|
|
203
212
|
],
|
|
204
213
|
"max-width": 560
|
|
205
214
|
}, {
|
|
206
|
-
"dialog-header":
|
|
207
|
-
n("p",
|
|
215
|
+
"dialog-header": c(() => [
|
|
216
|
+
n("p", $a, I(e(o)("menu.product_image.custom.title")), 1)
|
|
208
217
|
]),
|
|
209
|
-
"dialog-footer":
|
|
210
|
-
n("div",
|
|
218
|
+
"dialog-footer": c(() => [
|
|
219
|
+
n("div", Ba, [
|
|
211
220
|
s(e(B).FmButton, {
|
|
212
221
|
label: e(o)("menu.common.actions.cancel"),
|
|
213
222
|
variant: "tertiary",
|
|
@@ -220,11 +229,11 @@ const ml = /* @__PURE__ */ ce({
|
|
|
220
229
|
}, null, 8, ["label"])
|
|
221
230
|
])
|
|
222
231
|
]),
|
|
223
|
-
default:
|
|
224
|
-
n("div",
|
|
225
|
-
n("p",
|
|
226
|
-
n("div",
|
|
227
|
-
n("div",
|
|
232
|
+
default: c(() => [
|
|
233
|
+
n("div", Sa, [
|
|
234
|
+
n("p", Va, I(e(o)("menu.product_image.custom.hint")), 1),
|
|
235
|
+
n("div", Pa, [
|
|
236
|
+
n("div", Ua, [
|
|
228
237
|
s(e(B).FmTextField, {
|
|
229
238
|
modelValue: w.value,
|
|
230
239
|
"onUpdate:modelValue": F[0] || (F[0] = (L) => w.value = L),
|
|
@@ -233,8 +242,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
233
242
|
type: "number"
|
|
234
243
|
}, null, 8, ["modelValue", "label", "placeholder"])
|
|
235
244
|
]),
|
|
236
|
-
n("p",
|
|
237
|
-
n("div",
|
|
245
|
+
n("p", Ia, I(e(o)("menu.product_image.custom.separator")), 1),
|
|
246
|
+
n("div", Ta, [
|
|
238
247
|
s(e(B).FmTextField, {
|
|
239
248
|
modelValue: C.value,
|
|
240
249
|
"onUpdate:modelValue": F[1] || (F[1] = (L) => C.value = L),
|
|
@@ -244,24 +253,24 @@ const ml = /* @__PURE__ */ ce({
|
|
|
244
253
|
}, null, 8, ["modelValue", "label", "placeholder"])
|
|
245
254
|
])
|
|
246
255
|
]),
|
|
247
|
-
l.value.label ? (r(), S("p",
|
|
256
|
+
l.value.label ? (r(), S("p", Aa, I(l.value.label), 1)) : y("", !0)
|
|
248
257
|
])
|
|
249
258
|
]),
|
|
250
259
|
_: 1
|
|
251
260
|
}, 8, ["modelValue"]));
|
|
252
261
|
}
|
|
253
|
-
}),
|
|
262
|
+
}), La = { class: "fm-typo-en-title-sm-600" }, za = { class: "space-y-16" }, Da = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ra = {
|
|
254
263
|
key: 0,
|
|
255
264
|
class: "space-y-8"
|
|
256
|
-
},
|
|
265
|
+
}, Ma = { class: "flex w-full items-center justify-end gap-8 px-0 pb-0" }, Na = /* @__PURE__ */ ce({
|
|
257
266
|
__name: "ProductImageRegenerateDialog",
|
|
258
267
|
props: {
|
|
259
268
|
ratioLabel: {},
|
|
260
269
|
canRegenerateFromOriginal: { type: Boolean }
|
|
261
270
|
},
|
|
262
271
|
emits: ["close", "confirm"],
|
|
263
|
-
setup(
|
|
264
|
-
const i =
|
|
272
|
+
setup(H, { emit: V }) {
|
|
273
|
+
const i = H, x = V, { t: o } = be(), d = Y(""), w = Y(!1), C = Y(!0);
|
|
265
274
|
function P() {
|
|
266
275
|
C.value = !1, x("close");
|
|
267
276
|
}
|
|
@@ -279,11 +288,11 @@ const ml = /* @__PURE__ */ ce({
|
|
|
279
288
|
],
|
|
280
289
|
"max-width": 560
|
|
281
290
|
}, {
|
|
282
|
-
"dialog-header":
|
|
283
|
-
n("p",
|
|
291
|
+
"dialog-header": c(() => [
|
|
292
|
+
n("p", La, I(e(o)("menu.product_image.regenerate.title")), 1)
|
|
284
293
|
]),
|
|
285
|
-
"dialog-footer":
|
|
286
|
-
n("div",
|
|
294
|
+
"dialog-footer": c(() => [
|
|
295
|
+
n("div", Ma, [
|
|
287
296
|
s(e(B).FmButton, {
|
|
288
297
|
label: e(o)("menu.common.actions.cancel"),
|
|
289
298
|
variant: "tertiary",
|
|
@@ -296,10 +305,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
296
305
|
}, null, 8, ["label"])
|
|
297
306
|
])
|
|
298
307
|
]),
|
|
299
|
-
default:
|
|
300
|
-
n("div",
|
|
301
|
-
n("p",
|
|
302
|
-
i.canRegenerateFromOriginal ? (r(), S("div",
|
|
308
|
+
default: c(() => [
|
|
309
|
+
n("div", za, [
|
|
310
|
+
n("p", Da, I(e(o)("menu.product_image.regenerate.hint", { ratio: i.ratioLabel })), 1),
|
|
311
|
+
i.canRegenerateFromOriginal ? (r(), S("div", Ra, [
|
|
303
312
|
s(e(B).FmRadio, {
|
|
304
313
|
modelValue: w.value,
|
|
305
314
|
"onUpdate:modelValue": $[0] || ($[0] = (_) => w.value = _),
|
|
@@ -326,22 +335,22 @@ const ml = /* @__PURE__ */ ce({
|
|
|
326
335
|
_: 1
|
|
327
336
|
}, 8, ["modelValue"]));
|
|
328
337
|
}
|
|
329
|
-
}),
|
|
338
|
+
}), Ea = { class: "fm-typo-en-title-md-600 mr-auto" }, qa = {
|
|
330
339
|
key: 0,
|
|
331
340
|
class: "space-y-32 p-24 text-fm-color-typo-primary"
|
|
332
|
-
},
|
|
341
|
+
}, Ga = {
|
|
333
342
|
key: 0,
|
|
334
343
|
class: "flex items-center gap-16"
|
|
335
|
-
},
|
|
344
|
+
}, ja = ["alt", "src"], Ka = { class: "fm-typo-en-body-lg-600" }, Qa = {
|
|
336
345
|
key: 1,
|
|
337
346
|
class: "space-y-16"
|
|
338
|
-
},
|
|
347
|
+
}, Xa = { class: "flex items-start gap-16" }, Ha = { class: "mr-auto" }, Wa = { class: "fm-typo-en-title-sm-600" }, Ya = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Za = { class: "divide-y divide-fm-color-neutral-gray-100" }, Ja = ["aria-label"], et = ["alt", "src"], lt = { class: "fm-typo-en-body-lg-600" }, at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, tt = ["aria-label"], ot = ["alt", "src"], nt = { class: "mr-auto" }, st = { class: "flex items-center gap-8" }, it = { class: "fm-typo-en-body-lg-600" }, rt = {
|
|
339
348
|
key: 0,
|
|
340
349
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
341
|
-
},
|
|
350
|
+
}, ut = {
|
|
342
351
|
key: 1,
|
|
343
352
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
344
|
-
},
|
|
353
|
+
}, dt = { class: "grid w-[144px] shrink-0 grid-cols-3" }, mt = { class: "space-y-8" }, ct = { class: "fm-typo-en-title-sm-600" }, pt = { class: "flex items-start gap-12" }, vt = { class: "sr-only" }, bt = { class: "fm-typo-en-body-lg-400" }, ft = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gt = { class: "flex items-center justify-start gap-8" }, yt = { class: "fm-typo-en-title-md-600" }, _t = { class: "flex h-[420px] items-center justify-center overflow-hidden rounded-md" }, ht = ["src", "alt"], kt = /* @__PURE__ */ ce({
|
|
345
354
|
__name: "ProductImageManageSheet",
|
|
346
355
|
props: {
|
|
347
356
|
sdk: {},
|
|
@@ -349,8 +358,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
349
358
|
imageRef: {}
|
|
350
359
|
},
|
|
351
360
|
emits: ["close"],
|
|
352
|
-
setup(
|
|
353
|
-
const i =
|
|
361
|
+
setup(H, { emit: V }) {
|
|
362
|
+
const i = H, x = V, { t: o } = be(), { run: d } = Ue(), w = Xe(), C = Pe(), P = Y(null), m = Y("");
|
|
354
363
|
function l(q, Z) {
|
|
355
364
|
m.value = Z, P.value = q;
|
|
356
365
|
}
|
|
@@ -361,7 +370,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
361
370
|
), G = R(() => {
|
|
362
371
|
var q;
|
|
363
372
|
return ((q = E.value) == null ? void 0 : q.ratios) ?? [];
|
|
364
|
-
}), A = R(() => G.value.map((q) => q.id)), v =
|
|
373
|
+
}), A = R(() => G.value.map((q) => q.id)), v = Y(!0), g = Y(!1), f = Y(null), k = Y(null);
|
|
365
374
|
function O(q) {
|
|
366
375
|
return q.status === "pending" ? o("menu.product_image.status.pending") : q.status === "failed" ? o("menu.product_image.status.failed") : "";
|
|
367
376
|
}
|
|
@@ -374,7 +383,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
374
383
|
function a() {
|
|
375
384
|
v.value = !1, x("close");
|
|
376
385
|
}
|
|
377
|
-
function
|
|
386
|
+
function p() {
|
|
378
387
|
F.update(), a();
|
|
379
388
|
}
|
|
380
389
|
function ne() {
|
|
@@ -429,7 +438,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
429
438
|
N.onerror = () => Z(""), N.onload = () => Z(typeof N.result == "string" ? N.result : ""), N.readAsDataURL(q);
|
|
430
439
|
});
|
|
431
440
|
}
|
|
432
|
-
const se =
|
|
441
|
+
const se = Y(null);
|
|
433
442
|
function de(q) {
|
|
434
443
|
if (!q.removeNeedsConfirmation) {
|
|
435
444
|
fe(q);
|
|
@@ -471,16 +480,16 @@ const ml = /* @__PURE__ */ ce({
|
|
|
471
480
|
"close-button": "",
|
|
472
481
|
"max-width": 860
|
|
473
482
|
}, {
|
|
474
|
-
"side-sheet-header":
|
|
475
|
-
n("p",
|
|
483
|
+
"side-sheet-header": c(() => [
|
|
484
|
+
n("p", Ea, I(e(o)("menu.product_image.manage.title")), 1)
|
|
476
485
|
]),
|
|
477
|
-
"side-sheet-footer":
|
|
478
|
-
n("div",
|
|
486
|
+
"side-sheet-footer": c(() => [
|
|
487
|
+
n("div", gt, [
|
|
479
488
|
s(e(B).FmButton, {
|
|
480
489
|
label: e(o)("menu.common.actions.update"),
|
|
481
490
|
size: "lg",
|
|
482
491
|
variant: "primary",
|
|
483
|
-
onClick:
|
|
492
|
+
onClick: p
|
|
484
493
|
}, null, 8, ["label"]),
|
|
485
494
|
s(e(B).FmButton, {
|
|
486
495
|
label: e(o)("menu.common.actions.cancel"),
|
|
@@ -490,29 +499,29 @@ const ml = /* @__PURE__ */ ce({
|
|
|
490
499
|
}, null, 8, ["label"])
|
|
491
500
|
])
|
|
492
501
|
]),
|
|
493
|
-
default:
|
|
494
|
-
E.value ? (r(), S("div",
|
|
495
|
-
E.value.addFormat.state !== "allowed" ? (r(), S("section",
|
|
502
|
+
default: c(() => [
|
|
503
|
+
E.value ? (r(), S("div", qa, [
|
|
504
|
+
E.value.addFormat.state !== "allowed" ? (r(), S("section", Ga, [
|
|
496
505
|
s(e(B).FmCard, {
|
|
497
506
|
class: "!h-80 !w-80 rounded-md",
|
|
498
507
|
variant: "outlined"
|
|
499
508
|
}, {
|
|
500
|
-
default:
|
|
509
|
+
default: c(() => [
|
|
501
510
|
n("img", {
|
|
502
511
|
alt: e(o)("menu.product_image.manage.original"),
|
|
503
512
|
class: "h-full w-full object-cover",
|
|
504
513
|
src: E.value.originalUrl
|
|
505
|
-
}, null, 8,
|
|
514
|
+
}, null, 8, ja)
|
|
506
515
|
]),
|
|
507
516
|
_: 1
|
|
508
517
|
}),
|
|
509
|
-
n("p",
|
|
518
|
+
n("p", Ka, I(e(o)("menu.product_image.manage.original")), 1)
|
|
510
519
|
])) : y("", !0),
|
|
511
|
-
E.value.addFormat.state === "allowed" ? (r(), S("section",
|
|
512
|
-
n("div",
|
|
513
|
-
n("div",
|
|
514
|
-
n("p",
|
|
515
|
-
n("p",
|
|
520
|
+
E.value.addFormat.state === "allowed" ? (r(), S("section", Qa, [
|
|
521
|
+
n("div", Xa, [
|
|
522
|
+
n("div", Ha, [
|
|
523
|
+
n("p", Wa, I(e(o)("menu.product_image.manage.aspect_ratio")), 1),
|
|
524
|
+
n("p", Ya, I(e(o)("menu.product_image.manage.aspect_ratio_hint")), 1)
|
|
516
525
|
]),
|
|
517
526
|
s(e(B).FmButton, {
|
|
518
527
|
disabled: E.value.addFormat.state !== "allowed",
|
|
@@ -523,7 +532,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
523
532
|
onClick: Z[0] || (Z[0] = (N) => g.value = !0)
|
|
524
533
|
}, null, 8, ["disabled", "label", "aria-label"])
|
|
525
534
|
]),
|
|
526
|
-
n("div",
|
|
535
|
+
n("div", Za, [
|
|
527
536
|
n("div", {
|
|
528
537
|
class: "flex items-center gap-16 py-12",
|
|
529
538
|
role: "group",
|
|
@@ -535,7 +544,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
535
544
|
placement: "top",
|
|
536
545
|
"z-index": 999
|
|
537
546
|
}, {
|
|
538
|
-
default:
|
|
547
|
+
default: c(() => [
|
|
539
548
|
s(e(B).FmButton, {
|
|
540
549
|
"aria-label": e(o)("menu.product_image.preview.title"),
|
|
541
550
|
label: e(o)("menu.product_image.preview.title"),
|
|
@@ -546,17 +555,17 @@ const ml = /* @__PURE__ */ ce({
|
|
|
546
555
|
e(o)("menu.product_image.manage.original")
|
|
547
556
|
))
|
|
548
557
|
}, {
|
|
549
|
-
default:
|
|
558
|
+
default: c(() => [
|
|
550
559
|
s(e(B).FmCard, {
|
|
551
560
|
class: "!h-80 !w-80 rounded-md",
|
|
552
561
|
variant: "outlined"
|
|
553
562
|
}, {
|
|
554
|
-
default:
|
|
563
|
+
default: c(() => [
|
|
555
564
|
n("img", {
|
|
556
565
|
alt: e(o)("menu.product_image.manage.original"),
|
|
557
566
|
class: "h-full w-full object-cover",
|
|
558
567
|
src: E.value.originalUrl
|
|
559
|
-
}, null, 8,
|
|
568
|
+
}, null, 8, et)
|
|
560
569
|
]),
|
|
561
570
|
_: 1
|
|
562
571
|
})
|
|
@@ -567,10 +576,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
567
576
|
_: 1
|
|
568
577
|
}, 8, ["content"]),
|
|
569
578
|
n("div", null, [
|
|
570
|
-
n("p",
|
|
571
|
-
n("p",
|
|
579
|
+
n("p", lt, I(e(o)("menu.product_image.manage.original")), 1),
|
|
580
|
+
n("p", at, I(e(o)("menu.product_image.manage.custom_sizing")), 1)
|
|
572
581
|
])
|
|
573
|
-
], 8,
|
|
582
|
+
], 8, Ja),
|
|
574
583
|
(r(!0), S(re, null, Fe(G.value, (N) => (r(), S("div", {
|
|
575
584
|
key: N.label,
|
|
576
585
|
class: "product-image-ratio-row flex items-center gap-16 py-12",
|
|
@@ -583,7 +592,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
583
592
|
placement: "top",
|
|
584
593
|
"z-index": 999
|
|
585
594
|
}, {
|
|
586
|
-
default:
|
|
595
|
+
default: c(() => [
|
|
587
596
|
s(e(B).FmButton, {
|
|
588
597
|
"aria-label": e(o)("menu.product_image.preview.title"),
|
|
589
598
|
label: e(o)("menu.product_image.preview.title"),
|
|
@@ -592,18 +601,18 @@ const ml = /* @__PURE__ */ ce({
|
|
|
592
601
|
variant: "plain",
|
|
593
602
|
onClick: (Ie) => l(N.previewUrl, N.label)
|
|
594
603
|
}, {
|
|
595
|
-
default:
|
|
604
|
+
default: c(() => [
|
|
596
605
|
s(e(B).FmCard, {
|
|
597
606
|
class: "flex !h-80 !w-80 items-center justify-center rounded-md",
|
|
598
607
|
variant: "outlined"
|
|
599
608
|
}, {
|
|
600
|
-
default:
|
|
609
|
+
default: c(() => [
|
|
601
610
|
N.previewUrl ? (r(), S("img", {
|
|
602
611
|
key: 0,
|
|
603
612
|
alt: N.label,
|
|
604
613
|
class: "h-full w-full object-cover",
|
|
605
614
|
src: N.previewUrl
|
|
606
|
-
}, null, 8,
|
|
615
|
+
}, null, 8, ot)) : (r(), T(e(B).FmIcon, {
|
|
607
616
|
key: 1,
|
|
608
617
|
color: "neutral-gray-300",
|
|
609
618
|
name: "image",
|
|
@@ -618,9 +627,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
618
627
|
]),
|
|
619
628
|
_: 2
|
|
620
629
|
}, 1032, ["content"]),
|
|
621
|
-
n("div",
|
|
622
|
-
n("div",
|
|
623
|
-
n("p",
|
|
630
|
+
n("div", nt, [
|
|
631
|
+
n("div", st, [
|
|
632
|
+
n("p", it, I(N.label), 1),
|
|
624
633
|
N.required ? (r(), T(e(B).FmChip, {
|
|
625
634
|
key: 0,
|
|
626
635
|
color: "negative",
|
|
@@ -634,16 +643,16 @@ const ml = /* @__PURE__ */ ce({
|
|
|
634
643
|
size: "sm"
|
|
635
644
|
}, null, 8, ["color", "label"])) : y("", !0)
|
|
636
645
|
]),
|
|
637
|
-
N.purpose ? (r(), S("p",
|
|
638
|
-
!N.required && !N.previewUrl ? (r(), S("p",
|
|
646
|
+
N.purpose ? (r(), S("p", rt, I(e(C)(N.purpose)), 1)) : y("", !0),
|
|
647
|
+
!N.required && !N.previewUrl ? (r(), S("p", ut, I(e(o)("menu.product_image.manage.custom_image_hint")), 1)) : y("", !0)
|
|
639
648
|
]),
|
|
640
|
-
n("div",
|
|
649
|
+
n("div", dt, [
|
|
641
650
|
s(e(B).FmTooltip, {
|
|
642
651
|
content: e(o)("menu.product_image.replace.action"),
|
|
643
652
|
placement: "top",
|
|
644
653
|
"z-index": 999
|
|
645
654
|
}, {
|
|
646
|
-
default:
|
|
655
|
+
default: c(() => [
|
|
647
656
|
s(e(B).FmButton, {
|
|
648
657
|
"aria-label": e(o)("menu.product_image.replace.action_for", {
|
|
649
658
|
ratio: N.label
|
|
@@ -662,7 +671,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
662
671
|
placement: "top",
|
|
663
672
|
"z-index": 999
|
|
664
673
|
}, {
|
|
665
|
-
default:
|
|
674
|
+
default: c(() => [
|
|
666
675
|
s(e(B).FmButton, {
|
|
667
676
|
"aria-label": e(o)("menu.product_image.regenerate.action_for", {
|
|
668
677
|
ratio: N.label
|
|
@@ -687,26 +696,26 @@ const ml = /* @__PURE__ */ ce({
|
|
|
687
696
|
onClick: (Ie) => de(N)
|
|
688
697
|
}, null, 8, ["aria-label", "disabled", "onClick"])) : y("", !0)
|
|
689
698
|
])
|
|
690
|
-
], 8,
|
|
699
|
+
], 8, tt))), 128))
|
|
691
700
|
])
|
|
692
701
|
])) : y("", !0),
|
|
693
|
-
n("section",
|
|
694
|
-
n("p",
|
|
695
|
-
n("div",
|
|
702
|
+
n("section", mt, [
|
|
703
|
+
n("p", ct, I(e(o)("menu.product_image.manage.cover_photo")), 1),
|
|
704
|
+
n("div", pt, [
|
|
696
705
|
s(e(B).FmSwitch, {
|
|
697
706
|
"aria-label": e(o)("menu.product_image.manage.set_as_cover"),
|
|
698
707
|
disabled: E.value.isCover && !E.value.canClearCover,
|
|
699
708
|
"model-value": E.value.isCover,
|
|
700
709
|
"onUpdate:modelValue": Q
|
|
701
710
|
}, {
|
|
702
|
-
label:
|
|
703
|
-
n("span",
|
|
711
|
+
label: c(() => [
|
|
712
|
+
n("span", vt, I(e(o)("menu.product_image.manage.set_as_cover")), 1)
|
|
704
713
|
]),
|
|
705
714
|
_: 1
|
|
706
715
|
}, 8, ["aria-label", "disabled", "model-value"]),
|
|
707
716
|
n("div", null, [
|
|
708
|
-
n("p",
|
|
709
|
-
n("p",
|
|
717
|
+
n("p", bt, I(e(o)("menu.product_image.manage.set_as_cover")), 1),
|
|
718
|
+
n("p", ft, I(e(o)("menu.product_image.manage.cover_hint")), 1)
|
|
710
719
|
])
|
|
711
720
|
])
|
|
712
721
|
])
|
|
@@ -719,22 +728,22 @@ const ml = /* @__PURE__ */ ce({
|
|
|
719
728
|
"max-width": 560,
|
|
720
729
|
"onUpdate:modelValue": Z[4] || (Z[4] = (N) => !N && (P.value = null))
|
|
721
730
|
}, {
|
|
722
|
-
"dialog-header":
|
|
723
|
-
n("p",
|
|
731
|
+
"dialog-header": c(() => [
|
|
732
|
+
n("p", yt, I(m.value), 1)
|
|
724
733
|
]),
|
|
725
|
-
default:
|
|
726
|
-
n("div",
|
|
734
|
+
default: c(() => [
|
|
735
|
+
n("div", _t, [
|
|
727
736
|
P.value ? (r(), S("img", {
|
|
728
737
|
key: 0,
|
|
729
738
|
src: P.value,
|
|
730
739
|
alt: m.value,
|
|
731
740
|
class: "max-h-full max-w-full object-contain"
|
|
732
|
-
}, null, 8,
|
|
741
|
+
}, null, 8, ht)) : y("", !0)
|
|
733
742
|
])
|
|
734
743
|
]),
|
|
735
744
|
_: 1
|
|
736
745
|
}, 8, ["model-value"]),
|
|
737
|
-
g.value ? (r(), T(
|
|
746
|
+
g.value ? (r(), T(Oa, {
|
|
738
747
|
key: 0,
|
|
739
748
|
"existing-ids": A.value,
|
|
740
749
|
sdk: i.sdk,
|
|
@@ -749,7 +758,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
749
758
|
onCancel: Z[6] || (Z[6] = (N) => k.value = null),
|
|
750
759
|
onConfirm: b
|
|
751
760
|
}, null, 8, ["ratio-label", "aspect-ratio"])) : y("", !0),
|
|
752
|
-
f.value ? (r(), T(
|
|
761
|
+
f.value ? (r(), T(Na, {
|
|
753
762
|
key: 2,
|
|
754
763
|
"can-regenerate-from-original": f.value.canRegenerateFromOriginal,
|
|
755
764
|
"ratio-label": f.value.label,
|
|
@@ -758,14 +767,14 @@ const ml = /* @__PURE__ */ ce({
|
|
|
758
767
|
}, null, 8, ["can-regenerate-from-original", "ratio-label"])) : y("", !0)
|
|
759
768
|
], 64));
|
|
760
769
|
}
|
|
761
|
-
}),
|
|
770
|
+
}), wt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary mb-12" }, xt = { class: "grid gap-16 [grid-template-columns:repeat(auto-fill,minmax(160px,1fr))]" }, Ct = { class: "fm-typo-en-body-md-400 px-16 text-center" }, Ft = ["accept"], $t = { class: "flex h-full w-full items-center justify-center" }, St = ["alt", "src"], Vt = { class: "pointer-events-none absolute left-8 right-8 top-8 flex items-center justify-end gap-4" }, Pt = { class: "absolute bottom-8 right-8 flex gap-4" }, Ut = /* @__PURE__ */ ce({
|
|
762
771
|
__name: "ProductImageField",
|
|
763
772
|
props: {
|
|
764
773
|
sdk: {},
|
|
765
774
|
target: {}
|
|
766
775
|
},
|
|
767
|
-
setup(
|
|
768
|
-
const V =
|
|
776
|
+
setup(H) {
|
|
777
|
+
const V = H, { t: i, n: x } = be(), { run: o } = Ue(), d = Xe(), w = ea(), C = Pe(), P = zl(), m = R(() => el(V.target)), l = ye({
|
|
769
778
|
status: "loading"
|
|
770
779
|
});
|
|
771
780
|
let $ = null, _ = null;
|
|
@@ -784,7 +793,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
784
793
|
var z;
|
|
785
794
|
return ((z = L.value) == null ? void 0 : z.tiles) ?? [];
|
|
786
795
|
}
|
|
787
|
-
), G =
|
|
796
|
+
), G = oa.join(","), A = Y(null), v = Y(!1), g = Y([]), f = Y(0), k = Y([]), O = Y(null);
|
|
788
797
|
let Q = null;
|
|
789
798
|
function ee() {
|
|
790
799
|
g.value = [], f.value = 0, k.value = [], Q = null;
|
|
@@ -794,7 +803,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
794
803
|
});
|
|
795
804
|
const a = R(
|
|
796
805
|
() => g.value[f.value] ?? null
|
|
797
|
-
),
|
|
806
|
+
), p = R(() => {
|
|
798
807
|
var z;
|
|
799
808
|
return ((z = L.value) == null ? void 0 : z.addImage.state) !== "allowed";
|
|
800
809
|
});
|
|
@@ -808,20 +817,20 @@ const ml = /* @__PURE__ */ ce({
|
|
|
808
817
|
}
|
|
809
818
|
function le(z) {
|
|
810
819
|
var D;
|
|
811
|
-
v.value = !1, !
|
|
820
|
+
v.value = !1, !p.value && ve(Array.from(((D = z.dataTransfer) == null ? void 0 : D.files) ?? []));
|
|
812
821
|
}
|
|
813
822
|
function ve(z) {
|
|
814
|
-
if (
|
|
823
|
+
if (p.value || z.length === 0) return;
|
|
815
824
|
const D = [];
|
|
816
|
-
for (const
|
|
817
|
-
const ie = V.sdk.productImage.screenFile(
|
|
825
|
+
for (const W of z) {
|
|
826
|
+
const ie = V.sdk.productImage.screenFile(W.type);
|
|
818
827
|
if (ie) {
|
|
819
828
|
o(async () => ({ kind: "rejected", issues: [ie] }), {
|
|
820
829
|
showLoading: !1
|
|
821
830
|
});
|
|
822
831
|
continue;
|
|
823
832
|
}
|
|
824
|
-
D.push(
|
|
833
|
+
D.push(W);
|
|
825
834
|
}
|
|
826
835
|
D.length !== 0 && (g.value = D, f.value = 0, k.value = [], Q = m.value);
|
|
827
836
|
}
|
|
@@ -857,10 +866,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
857
866
|
}
|
|
858
867
|
async function de(z, D) {
|
|
859
868
|
var ie;
|
|
860
|
-
const
|
|
869
|
+
const W = ((ie = L.value) == null ? void 0 : ie.defersUpload) === !0;
|
|
861
870
|
await o(
|
|
862
871
|
() => V.sdk.productImage.upload(z, D),
|
|
863
|
-
|
|
872
|
+
W ? {
|
|
864
873
|
showLoading: !1,
|
|
865
874
|
successMessage: i("menu.product_image.staged_added")
|
|
866
875
|
} : {
|
|
@@ -878,34 +887,34 @@ const ml = /* @__PURE__ */ ce({
|
|
|
878
887
|
const D = m.value;
|
|
879
888
|
if (!D) return null;
|
|
880
889
|
N();
|
|
881
|
-
const
|
|
882
|
-
return q =
|
|
890
|
+
const W = V.sdk.productImage.edit(D, el(z.imageRef));
|
|
891
|
+
return q = W, Z = W.subscribe((ie) => {
|
|
883
892
|
fe.value = ie.status === "ready" ? ie.value : null, fe.value || ($e.value = null);
|
|
884
|
-
}),
|
|
893
|
+
}), W;
|
|
885
894
|
}
|
|
886
895
|
async function ze(z, D) {
|
|
887
|
-
const
|
|
896
|
+
const W = await o(z, {
|
|
888
897
|
loadingMessage: D,
|
|
889
898
|
showLoading: !!D
|
|
890
899
|
});
|
|
891
|
-
return
|
|
892
|
-
type:
|
|
893
|
-
[
|
|
894
|
-
}),
|
|
900
|
+
return W.kind === "success" && w.open({
|
|
901
|
+
type: W.value.severity,
|
|
902
|
+
[W.value.presentation]: C(W.value.message)
|
|
903
|
+
}), W;
|
|
895
904
|
}
|
|
896
905
|
async function Ge(z) {
|
|
897
|
-
const D = Ie(z),
|
|
898
|
-
if (!(!D || !
|
|
906
|
+
const D = Ie(z), W = fe.value;
|
|
907
|
+
if (!(!D || !W))
|
|
899
908
|
try {
|
|
900
|
-
const ie = await Pl(
|
|
909
|
+
const ie = await Pl(W.sourceUrl);
|
|
901
910
|
q === D && ($e.value = ie);
|
|
902
911
|
} catch {
|
|
903
912
|
q === D && await ze(() => D.confirmCrop(null));
|
|
904
913
|
}
|
|
905
914
|
}
|
|
906
915
|
async function Ye(z) {
|
|
907
|
-
const D = q,
|
|
908
|
-
if ($e.value = null, !D || !
|
|
916
|
+
const D = q, W = fe.value;
|
|
917
|
+
if ($e.value = null, !D || !W) return;
|
|
909
918
|
let ie = null;
|
|
910
919
|
try {
|
|
911
920
|
ie = await Ul(z);
|
|
@@ -913,19 +922,19 @@ const ml = /* @__PURE__ */ ce({
|
|
|
913
922
|
}
|
|
914
923
|
await ze(
|
|
915
924
|
() => D.confirmCrop(ie),
|
|
916
|
-
z ? C(
|
|
925
|
+
z ? C(W.loadingMessage) : void 0
|
|
917
926
|
), q === D && N();
|
|
918
927
|
}
|
|
919
928
|
async function He(z) {
|
|
920
|
-
const D = Ie(z),
|
|
921
|
-
if (!D || !
|
|
929
|
+
const D = Ie(z), W = fe.value;
|
|
930
|
+
if (!D || !W) return;
|
|
922
931
|
const ie = await o(
|
|
923
932
|
() => D.prepareRemy(async () => {
|
|
924
|
-
const _e = await Pl(
|
|
933
|
+
const _e = await Pl(W.sourceUrl);
|
|
925
934
|
return {
|
|
926
935
|
contentType: _e.type,
|
|
927
936
|
byteLength: _e.size,
|
|
928
|
-
imageData: await
|
|
937
|
+
imageData: await na(_e)
|
|
929
938
|
};
|
|
930
939
|
}),
|
|
931
940
|
{ showLoading: !1 }
|
|
@@ -937,10 +946,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
937
946
|
}
|
|
938
947
|
function J(z) {
|
|
939
948
|
var ie;
|
|
940
|
-
const D = (ie = z.detail) == null ? void 0 : ie.imageData,
|
|
941
|
-
!
|
|
942
|
-
() =>
|
|
943
|
-
const _e = await
|
|
949
|
+
const D = (ie = z.detail) == null ? void 0 : ie.imageData, W = q;
|
|
950
|
+
!W || typeof D != "string" || !D || ze(
|
|
951
|
+
() => W.applyRemy(async () => {
|
|
952
|
+
const _e = await sa(D);
|
|
944
953
|
return V.sdk.productImage.screenFile(_e.type) ? {
|
|
945
954
|
contentType: _e.type,
|
|
946
955
|
byteLength: _e.size,
|
|
@@ -949,12 +958,12 @@ const ml = /* @__PURE__ */ ce({
|
|
|
949
958
|
base64: D,
|
|
950
959
|
width: 0,
|
|
951
960
|
height: 0
|
|
952
|
-
} : Ul(await
|
|
961
|
+
} : Ul(await ia(_e));
|
|
953
962
|
}),
|
|
954
963
|
i("menu.product_image.uploading")
|
|
955
964
|
);
|
|
956
965
|
}
|
|
957
|
-
|
|
966
|
+
Ol(() => window.addEventListener("apply-image", J)), ke(() => {
|
|
958
967
|
window.removeEventListener("apply-image", J), N();
|
|
959
968
|
});
|
|
960
969
|
function we(z) {
|
|
@@ -984,10 +993,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
984
993
|
"label-mark": "optional",
|
|
985
994
|
"model-value": E.value.length
|
|
986
995
|
}, {
|
|
987
|
-
default:
|
|
988
|
-
n("p",
|
|
996
|
+
default: c(() => [
|
|
997
|
+
n("p", wt, [
|
|
989
998
|
sl(I(e(i)("menu.product_image.hint")) + " ", 1),
|
|
990
|
-
|
|
999
|
+
p.value ? y("", !0) : (r(), S(re, { key: 0 }, [
|
|
991
1000
|
s(e(B).FmIcon, {
|
|
992
1001
|
class: "mr-4 align-text-bottom",
|
|
993
1002
|
color: "neutral-gray-400",
|
|
@@ -998,14 +1007,14 @@ const ml = /* @__PURE__ */ ce({
|
|
|
998
1007
|
sl(I(e(i)("menu.product_image.crop_hint")), 1)
|
|
999
1008
|
], 64))
|
|
1000
1009
|
]),
|
|
1001
|
-
n("div",
|
|
1010
|
+
n("div", xt, [
|
|
1002
1011
|
n("div", {
|
|
1003
1012
|
class: Be(["product-image-drop aspect-square rounded-md border border-dashed flex flex-col items-center justify-center gap-8", [
|
|
1004
1013
|
v.value ? "border-fm-color-primary" : "border-fm-color-neutral-gray-300",
|
|
1005
|
-
|
|
1014
|
+
p.value ? "opacity-50 cursor-not-allowed" : ""
|
|
1006
1015
|
]]),
|
|
1007
|
-
onDragleave: D[0] || (D[0] = Ee((
|
|
1008
|
-
onDragover: D[1] || (D[1] = Ee((
|
|
1016
|
+
onDragleave: D[0] || (D[0] = Ee((W) => v.value = !1, ["prevent"])),
|
|
1017
|
+
onDragover: D[1] || (D[1] = Ee((W) => v.value = !p.value, ["prevent"])),
|
|
1009
1018
|
onDrop: Ee(le, ["prevent"])
|
|
1010
1019
|
}, [
|
|
1011
1020
|
s(e(B).FmIcon, {
|
|
@@ -1013,9 +1022,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1013
1022
|
name: "cloud_upload",
|
|
1014
1023
|
outline: ""
|
|
1015
1024
|
}),
|
|
1016
|
-
n("p",
|
|
1025
|
+
n("p", Ct, I(e(i)("menu.product_image.drop_hint")), 1),
|
|
1017
1026
|
s(e(B).FmButton, {
|
|
1018
|
-
disabled:
|
|
1027
|
+
disabled: p.value,
|
|
1019
1028
|
label: e(i)("menu.product_image.add_file"),
|
|
1020
1029
|
variant: "secondary",
|
|
1021
1030
|
onClick: ne
|
|
@@ -1028,34 +1037,34 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1028
1037
|
multiple: "",
|
|
1029
1038
|
type: "file",
|
|
1030
1039
|
onChange: pe
|
|
1031
|
-
}, null, 40,
|
|
1040
|
+
}, null, 40, Ft)
|
|
1032
1041
|
], 34),
|
|
1033
|
-
(r(!0), S(re, null, Fe(E.value, (
|
|
1034
|
-
var _e,
|
|
1042
|
+
(r(!0), S(re, null, Fe(E.value, (W, ie) => {
|
|
1043
|
+
var _e, We, De;
|
|
1035
1044
|
return r(), S("div", {
|
|
1036
|
-
key:
|
|
1045
|
+
key: W.url,
|
|
1037
1046
|
class: "product-image-tile relative aspect-square"
|
|
1038
1047
|
}, [
|
|
1039
1048
|
s(e(B).FmButton, {
|
|
1040
1049
|
"aria-label": e(i)("menu.product_image.manage.action_for", { index: ie + 1 }),
|
|
1041
1050
|
class: "!block !h-full !w-full !overflow-hidden !rounded-md !p-0",
|
|
1042
1051
|
label: e(i)("menu.product_image.manage.title"),
|
|
1043
|
-
disabled:
|
|
1052
|
+
disabled: W.manage.state !== "allowed",
|
|
1044
1053
|
variant: "plain",
|
|
1045
|
-
onClick: (je) => O.value =
|
|
1054
|
+
onClick: (je) => O.value = W.imageRef
|
|
1046
1055
|
}, {
|
|
1047
|
-
default:
|
|
1048
|
-
n("div",
|
|
1056
|
+
default: c(() => [
|
|
1057
|
+
n("div", $t, [
|
|
1049
1058
|
s(e(B).FmCard, {
|
|
1050
1059
|
class: "flex !h-[180px] !w-[180px] !border-0 items-center justify-center rounded-md",
|
|
1051
1060
|
variant: "outlined"
|
|
1052
1061
|
}, {
|
|
1053
|
-
default:
|
|
1062
|
+
default: c(() => [
|
|
1054
1063
|
n("img", {
|
|
1055
1064
|
alt: e(i)("menu.product_image.tile_alt", { index: ie + 1 }),
|
|
1056
1065
|
class: "h-full w-full object-cover",
|
|
1057
|
-
src:
|
|
1058
|
-
}, null, 8,
|
|
1066
|
+
src: W.url
|
|
1067
|
+
}, null, 8, St)
|
|
1059
1068
|
]),
|
|
1060
1069
|
_: 2
|
|
1061
1070
|
}, 1024)
|
|
@@ -1063,19 +1072,19 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1063
1072
|
]),
|
|
1064
1073
|
_: 2
|
|
1065
1074
|
}, 1032, ["aria-label", "label", "disabled", "onClick"]),
|
|
1066
|
-
n("div",
|
|
1067
|
-
|
|
1075
|
+
n("div", Vt, [
|
|
1076
|
+
W.isCover ? (r(), T(e(B).FmChip, {
|
|
1068
1077
|
key: 0,
|
|
1069
1078
|
label: e(i)("menu.product_image.cover_badge")
|
|
1070
1079
|
}, null, 8, ["label"])) : y("", !0),
|
|
1071
|
-
|
|
1080
|
+
W.formatCount !== null && W.formatCount !== void 0 ? (r(), T(e(B).FmChip, {
|
|
1072
1081
|
key: 1,
|
|
1073
|
-
label: e(x)(
|
|
1082
|
+
label: e(x)(W.formatCount),
|
|
1074
1083
|
"right-icon": "resize"
|
|
1075
1084
|
}, null, 8, ["label"])) : y("", !0)
|
|
1076
1085
|
]),
|
|
1077
|
-
n("div",
|
|
1078
|
-
((_e =
|
|
1086
|
+
n("div", Pt, [
|
|
1087
|
+
((_e = W.crop) == null ? void 0 : _e.state) === "allowed" ? (r(), T(e(B).FmButton, {
|
|
1079
1088
|
key: 0,
|
|
1080
1089
|
label: e(i)("menu.product_image.editor.title"),
|
|
1081
1090
|
"aria-label": e(i)("menu.product_image.editor.title"),
|
|
@@ -1083,9 +1092,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1083
1092
|
class: "!h-32 !w-32 !rounded-full !p-0 shadow-sm",
|
|
1084
1093
|
"bg-color": "neutral-white",
|
|
1085
1094
|
variant: "tertiary",
|
|
1086
|
-
onClick: Ee((je) => Ge(
|
|
1095
|
+
onClick: Ee((je) => Ge(W), ["stop"])
|
|
1087
1096
|
}, {
|
|
1088
|
-
default:
|
|
1097
|
+
default: c(() => [
|
|
1089
1098
|
s(e(B).FmIcon, {
|
|
1090
1099
|
name: "crop",
|
|
1091
1100
|
size: "sm"
|
|
@@ -1093,7 +1102,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1093
1102
|
]),
|
|
1094
1103
|
_: 2
|
|
1095
1104
|
}, 1032, ["label", "aria-label", "title", "onClick"])) : y("", !0),
|
|
1096
|
-
((
|
|
1105
|
+
((We = W.remy) == null ? void 0 : We.state) === "allowed" ? (r(), T(e(B).FmButton, {
|
|
1097
1106
|
key: 1,
|
|
1098
1107
|
label: e(i)("menu.remy.title"),
|
|
1099
1108
|
"aria-label": e(i)("menu.remy.title"),
|
|
@@ -1102,9 +1111,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1102
1111
|
class: "!h-32 !w-32 !rounded-full !p-0 shadow-sm",
|
|
1103
1112
|
"bg-color": "neutral-white",
|
|
1104
1113
|
variant: "tertiary",
|
|
1105
|
-
onClick: Ee((je) => He(
|
|
1114
|
+
onClick: Ee((je) => He(W), ["stop"])
|
|
1106
1115
|
}, {
|
|
1107
|
-
default:
|
|
1116
|
+
default: c(() => [
|
|
1108
1117
|
s(e(B).FmIcon, {
|
|
1109
1118
|
name: "auto_awesome",
|
|
1110
1119
|
size: "sm"
|
|
@@ -1113,18 +1122,18 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1113
1122
|
_: 2
|
|
1114
1123
|
}, 1032, ["label", "aria-label", "title", "disabled", "onClick"])) : y("", !0)
|
|
1115
1124
|
]),
|
|
1116
|
-
|
|
1125
|
+
W.remove.state !== "hidden" ? (r(), T(e(B).FmButton, {
|
|
1117
1126
|
key: 0,
|
|
1118
1127
|
label: e(i)("menu.product_image.remove.action_for", { index: ie + 1 }),
|
|
1119
1128
|
"aria-label": e(i)("menu.product_image.remove.action_for", { index: ie + 1 }),
|
|
1120
1129
|
class: "!absolute -right-8 -top-8 !h-24 !w-24 !rounded-full !p-0",
|
|
1121
|
-
disabled:
|
|
1130
|
+
disabled: W.remove.state !== "allowed",
|
|
1122
1131
|
"bg-color": "neutral-black",
|
|
1123
1132
|
"icon-color": "neutral-white",
|
|
1124
1133
|
variant: "tertiary",
|
|
1125
|
-
onClick: (je) => we(
|
|
1134
|
+
onClick: (je) => we(W)
|
|
1126
1135
|
}, {
|
|
1127
|
-
default:
|
|
1136
|
+
default: c(() => [
|
|
1128
1137
|
s(e(B).FmIcon, {
|
|
1129
1138
|
name: "close",
|
|
1130
1139
|
size: "sm",
|
|
@@ -1152,24 +1161,24 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1152
1161
|
onCancel: N,
|
|
1153
1162
|
onConfirm: Ye
|
|
1154
1163
|
}, null, 8, ["file", "mode", "edit-view"])) : y("", !0),
|
|
1155
|
-
O.value && V.target ? (r(), T(
|
|
1164
|
+
O.value && V.target ? (r(), T(kt, {
|
|
1156
1165
|
key: 2,
|
|
1157
1166
|
"image-ref": O.value,
|
|
1158
1167
|
sdk: V.sdk,
|
|
1159
1168
|
target: V.target,
|
|
1160
|
-
onClose: D[2] || (D[2] = (
|
|
1169
|
+
onClose: D[2] || (D[2] = (W) => O.value = null)
|
|
1161
1170
|
}, null, 8, ["image-ref", "sdk", "target"])) : y("", !0)
|
|
1162
1171
|
]),
|
|
1163
1172
|
_: 1
|
|
1164
1173
|
}, 8, ["label", "model-value"]));
|
|
1165
1174
|
}
|
|
1166
|
-
}),
|
|
1175
|
+
}), It = {
|
|
1167
1176
|
key: 0,
|
|
1168
1177
|
class: "flex justify-between pb-16"
|
|
1169
|
-
},
|
|
1178
|
+
}, Tt = { key: 1 }, At = { class: "flex gap-8" }, Bt = {
|
|
1170
1179
|
key: 1,
|
|
1171
1180
|
class: "flex flex-col items-center space-y-16"
|
|
1172
|
-
},
|
|
1181
|
+
}, Ot = { class: "flex flex-col items-center space-y-4 w-full" }, Lt = { class: "fm-typo-en-title-sm-600" }, zt = { class: "text-fm-color-typo-secondary" }, Al = /* @__PURE__ */ ce({
|
|
1173
1182
|
__name: "ProductChoicePicker",
|
|
1174
1183
|
props: {
|
|
1175
1184
|
session: {},
|
|
@@ -1178,8 +1187,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1178
1187
|
create: { type: Function },
|
|
1179
1188
|
dialogCancelName: {}
|
|
1180
1189
|
},
|
|
1181
|
-
setup(
|
|
1182
|
-
const V =
|
|
1190
|
+
setup(H) {
|
|
1191
|
+
const V = H, { t: i } = be(), x = R(
|
|
1183
1192
|
() => V.kind === "group" ? {
|
|
1184
1193
|
search: "menu.common.labels.search_groups",
|
|
1185
1194
|
add: "menu.common.actions.add_group",
|
|
@@ -1212,7 +1221,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1212
1221
|
const _ = V.session.applyWithOutcome();
|
|
1213
1222
|
_.kind !== "cancelled" && ((F = V.close) == null || F.call(V)), await o(() => Promise.resolve(_), { showLoading: !1 });
|
|
1214
1223
|
}
|
|
1215
|
-
const m =
|
|
1224
|
+
const m = Y(null);
|
|
1216
1225
|
Ae(
|
|
1217
1226
|
m,
|
|
1218
1227
|
(_) => {
|
|
@@ -1267,7 +1276,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1267
1276
|
}, null, 8, ["model-value", "value", "label"])
|
|
1268
1277
|
], 2))), 128))
|
|
1269
1278
|
], 2),
|
|
1270
|
-
_.kind ? (r(), S("div",
|
|
1279
|
+
_.kind ? (r(), S("div", It, [
|
|
1271
1280
|
_.create ? (r(), T(G, {
|
|
1272
1281
|
key: 0,
|
|
1273
1282
|
label: e(i)(x.value.add),
|
|
@@ -1275,8 +1284,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1275
1284
|
variant: "tertiary",
|
|
1276
1285
|
"text-color": "primary",
|
|
1277
1286
|
onClick: F[2] || (F[2] = (A) => _.create())
|
|
1278
|
-
}, null, 8, ["label", "aria-label"])) : (r(), S("div",
|
|
1279
|
-
n("div",
|
|
1287
|
+
}, null, 8, ["label", "aria-label"])) : (r(), S("div", Tt)),
|
|
1288
|
+
n("div", At, [
|
|
1280
1289
|
s(G, {
|
|
1281
1290
|
label: e(i)("menu.common.actions.cancel"),
|
|
1282
1291
|
"aria-label": e(i)(x.value.cancelSelection),
|
|
@@ -1292,10 +1301,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1292
1301
|
}, null, 8, ["label"])
|
|
1293
1302
|
])
|
|
1294
1303
|
])) : y("", !0)
|
|
1295
|
-
], 2)) : $.value && _.kind ? (r(), S("div",
|
|
1296
|
-
n("div",
|
|
1297
|
-
n("p",
|
|
1298
|
-
n("p",
|
|
1304
|
+
], 2)) : $.value && _.kind ? (r(), S("div", Bt, [
|
|
1305
|
+
n("div", Ot, [
|
|
1306
|
+
n("p", Lt, I(e(i)(x.value.emptyTitle)), 1),
|
|
1307
|
+
n("p", zt, I(e(i)(x.value.emptySubtitle)), 1)
|
|
1299
1308
|
]),
|
|
1300
1309
|
_.create ? (r(), T(G, {
|
|
1301
1310
|
key: 0,
|
|
@@ -1306,7 +1315,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1306
1315
|
])) : y("", !0);
|
|
1307
1316
|
};
|
|
1308
1317
|
}
|
|
1309
|
-
}),
|
|
1318
|
+
}), Dt = { class: "flex flex-col gap-8" }, Rt = { class: "flex items-center justify-between gap-16" }, Mt = { class: "fm-typo-en-body-lg-600" }, Nt = { class: "sr-only" }, Et = /* @__PURE__ */ ce({
|
|
1310
1319
|
__name: "ProductQuantityField",
|
|
1311
1320
|
props: {
|
|
1312
1321
|
label: {},
|
|
@@ -1319,8 +1328,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1319
1328
|
min: {}
|
|
1320
1329
|
},
|
|
1321
1330
|
emits: ["update:modelValue", "update:enabled"],
|
|
1322
|
-
setup(
|
|
1323
|
-
const i =
|
|
1331
|
+
setup(H, { emit: V }) {
|
|
1332
|
+
const i = H, x = V, o = Pe(), d = Y(i.modelValue !== null);
|
|
1324
1333
|
let w = !1;
|
|
1325
1334
|
Ae(
|
|
1326
1335
|
() => i.modelValue,
|
|
@@ -1337,17 +1346,17 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1337
1346
|
}
|
|
1338
1347
|
return (m, l) => {
|
|
1339
1348
|
const $ = M("FmSwitch"), _ = M("FmStepperField");
|
|
1340
|
-
return r(), S("div",
|
|
1341
|
-
n("div",
|
|
1342
|
-
n("p",
|
|
1349
|
+
return r(), S("div", Dt, [
|
|
1350
|
+
n("div", Rt, [
|
|
1351
|
+
n("p", Mt, I(m.label), 1),
|
|
1343
1352
|
s($, {
|
|
1344
1353
|
"model-value": d.value,
|
|
1345
1354
|
disabled: m.disabled,
|
|
1346
1355
|
"onUpdate:modelValue": C,
|
|
1347
1356
|
label: ""
|
|
1348
1357
|
}, {
|
|
1349
|
-
label:
|
|
1350
|
-
n("span",
|
|
1358
|
+
label: c(() => [
|
|
1359
|
+
n("span", Nt, I(m.toggleAccessibleName ?? m.accessibleName), 1)
|
|
1351
1360
|
]),
|
|
1352
1361
|
_: 1
|
|
1353
1362
|
}, 8, ["model-value", "disabled"])
|
|
@@ -1365,10 +1374,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1365
1374
|
]);
|
|
1366
1375
|
};
|
|
1367
1376
|
}
|
|
1368
|
-
}),
|
|
1377
|
+
}), qt = ["data-scope-title"], Gt = { class: "fm-typo-en-title-md-600 mr-auto" }, jt = { class: "pt-8 space-y-32" }, Kt = { class: "fm-typo-en-title-sm-600" }, Qt = { class: "flex items-end space-x-24" }, Xt = { class: "flex" }, Ht = { key: 0 }, Wt = { class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400" }, Yt = { class: "flex flex-wrap gap-8 mt-8" }, Zt = { class: "fm-typo-en-body-sm-400 text-fm-color-neutral-gray-400 mt-8" }, Jt = { class: "space-y-16" }, eo = {
|
|
1369
1378
|
key: 1,
|
|
1370
1379
|
class: "flex gap-8 rounded-md bg-fm-color-system-warning-100 p-12"
|
|
1371
|
-
},
|
|
1380
|
+
}, lo = { class: "space-y-4" }, ao = { class: "fm-typo-en-body-md-400 text-fm-color-system-warning-400" }, to = { class: "fm-typo-en-body-md-400 text-fm-color-system-warning-400" }, oo = { class: "xs:overflow-x-scroll" }, no = { class: "xs:min-w-[640px]" }, so = { class: "flex gap-8 items-center justify-start" }, io = { class: "flex items-center gap-8" }, ro = { class: "grow" }, uo = { class: "pt-16 space-y-24" }, mo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, co = { class: "fm-typo-en-title-sm-600" }, po = { class: "space-y-16" }, vo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, bo = /* @__PURE__ */ ce({
|
|
1372
1381
|
__name: "ProductGroupSheet",
|
|
1373
1382
|
props: {
|
|
1374
1383
|
modelValue: { type: Boolean },
|
|
@@ -1381,8 +1390,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1381
1390
|
createPriceGroup: { type: Function }
|
|
1382
1391
|
},
|
|
1383
1392
|
emits: ["update:modelValue"],
|
|
1384
|
-
setup(
|
|
1385
|
-
const i =
|
|
1393
|
+
setup(H, { emit: V }) {
|
|
1394
|
+
const i = H, x = R(
|
|
1386
1395
|
() => i.presentation === "tree" ? 720 : 800
|
|
1387
1396
|
), o = V, { t: d, n: w } = be(), C = (b) => {
|
|
1388
1397
|
const h = b.code ? d("menu.group.list.product_code_name", {
|
|
@@ -1398,7 +1407,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1398
1407
|
}, P = (b) => b.reduce((h, se) => {
|
|
1399
1408
|
const de = C(se);
|
|
1400
1409
|
return h ? d("menu.group.list.join_products", { list: h, item: de }) : de;
|
|
1401
|
-
}, ""), m =
|
|
1410
|
+
}, ""), m = Y({}), l = ye(null), $ = ye(null);
|
|
1402
1411
|
function _() {
|
|
1403
1412
|
var b;
|
|
1404
1413
|
(b = $.value) == null || b.dispose(), $.value = null;
|
|
@@ -1428,7 +1437,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1428
1437
|
header: () => d("menu.group.list.columns.products"),
|
|
1429
1438
|
size: 200,
|
|
1430
1439
|
enableSorting: !1,
|
|
1431
|
-
cell: (b) =>
|
|
1440
|
+
cell: (b) => X(
|
|
1432
1441
|
"div",
|
|
1433
1442
|
{ class: "line-clamp-2 break-all" },
|
|
1434
1443
|
P(b.row.original.products)
|
|
@@ -1438,7 +1447,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1438
1447
|
id: "action",
|
|
1439
1448
|
size: 52,
|
|
1440
1449
|
enableSorting: !1,
|
|
1441
|
-
cell: (b) =>
|
|
1450
|
+
cell: (b) => X(B.FmButton, {
|
|
1442
1451
|
prependIcon: "edit",
|
|
1443
1452
|
variant: "tertiary",
|
|
1444
1453
|
// The same row action as the product form's group table, so it takes
|
|
@@ -1452,7 +1461,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1452
1461
|
onClick: () => G.value && Q(G.value, b.row.original.id)
|
|
1453
1462
|
})
|
|
1454
1463
|
}
|
|
1455
|
-
]), v =
|
|
1464
|
+
]), v = Y(!1), g = ye(null), f = ye(null);
|
|
1456
1465
|
let k = null;
|
|
1457
1466
|
function O() {
|
|
1458
1467
|
var b;
|
|
@@ -1476,10 +1485,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1476
1485
|
value: null
|
|
1477
1486
|
},
|
|
1478
1487
|
...i.orderFromOptions.map((b) => ({
|
|
1479
|
-
label: d(
|
|
1488
|
+
label: d(Ml[b]),
|
|
1480
1489
|
value: b
|
|
1481
1490
|
}))
|
|
1482
|
-
]),
|
|
1491
|
+
]), p = (b) => b === "" || b === null || b === void 0 ? null : Number(b), ne = R(
|
|
1483
1492
|
() => i.view.combinations.filter((b) => b.hidden).map((b) => b.label)
|
|
1484
1493
|
), pe = R(
|
|
1485
1494
|
() => i.view.options.map((b) => ({
|
|
@@ -1495,7 +1504,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1495
1504
|
cell: (b) => {
|
|
1496
1505
|
var se;
|
|
1497
1506
|
const h = b.row.original;
|
|
1498
|
-
return (se = h.children) != null && se.length ? null :
|
|
1507
|
+
return (se = h.children) != null && se.length ? null : X(B.FmCheckbox, {
|
|
1499
1508
|
modelValue: h.isDefault,
|
|
1500
1509
|
value: "",
|
|
1501
1510
|
"aria-label": d("menu.common.labels.a11y_labelled_name", {
|
|
@@ -1514,11 +1523,11 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1514
1523
|
},
|
|
1515
1524
|
{
|
|
1516
1525
|
accessorKey: "name",
|
|
1517
|
-
header: () =>
|
|
1518
|
-
|
|
1526
|
+
header: () => X("div", { class: "flex items-center w-full gap-8" }, [
|
|
1527
|
+
X("span", d("menu.group.option.product_title")),
|
|
1519
1528
|
// The editor's legacy copy has no translation column
|
|
1520
1529
|
// (TreeEditor/form/GroupManager/OptionTable.vue:187-189).
|
|
1521
|
-
i.presentation === "tree" ? null :
|
|
1530
|
+
i.presentation === "tree" ? null : X(B.FmButton, {
|
|
1522
1531
|
icon: "g_translate",
|
|
1523
1532
|
variant: "tertiary",
|
|
1524
1533
|
textColor: "neutral-gray-400",
|
|
@@ -1528,9 +1537,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1528
1537
|
enableSorting: !1,
|
|
1529
1538
|
cell: (b) => {
|
|
1530
1539
|
const h = b.row.getIsExpanded();
|
|
1531
|
-
return
|
|
1540
|
+
return X(
|
|
1532
1541
|
"div",
|
|
1533
|
-
|
|
1542
|
+
X(
|
|
1534
1543
|
ge,
|
|
1535
1544
|
{
|
|
1536
1545
|
modelValue: b.row.original.name,
|
|
@@ -1541,7 +1550,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1541
1550
|
// `getCanExpand()` is true for every FmTable row; legacy asks
|
|
1542
1551
|
// whether the option carries combination entries (`items?.length`).
|
|
1543
1552
|
b.row.original.children.length > 0 ? {
|
|
1544
|
-
append: () =>
|
|
1553
|
+
append: () => X(B.FmIcon, {
|
|
1545
1554
|
name: "keyboard_arrow_up",
|
|
1546
1555
|
// Legacy greys the toggle when the title is not
|
|
1547
1556
|
// editable (`NeutralGray200`), which it never is here.
|
|
@@ -1573,8 +1582,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1573
1582
|
size: 400,
|
|
1574
1583
|
cell: (b) => {
|
|
1575
1584
|
const h = b.row.original;
|
|
1576
|
-
return
|
|
1577
|
-
|
|
1585
|
+
return X("div", { class: "flex items-center gap-8" }, [
|
|
1586
|
+
X(Ke, {
|
|
1578
1587
|
class: "min-w-[88px]",
|
|
1579
1588
|
modelValue: h.displayPriceAmount,
|
|
1580
1589
|
inputmode: "decimal",
|
|
@@ -1606,12 +1615,12 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1606
1615
|
"onUpdate:modelValue": (se) => i.session.setOptionPrice(
|
|
1607
1616
|
h.id,
|
|
1608
1617
|
h.combinationKey,
|
|
1609
|
-
|
|
1618
|
+
p(se)
|
|
1610
1619
|
)
|
|
1611
1620
|
}),
|
|
1612
1621
|
...h.editPricing.state === "hidden" ? [] : [
|
|
1613
|
-
|
|
1614
|
-
|
|
1622
|
+
X("div", { class: "flex items-center gap-4" }, [
|
|
1623
|
+
X(
|
|
1615
1624
|
B.FmButton,
|
|
1616
1625
|
{
|
|
1617
1626
|
variant: "plain",
|
|
@@ -1634,7 +1643,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1634
1643
|
onClick: () => E(h, "members")
|
|
1635
1644
|
},
|
|
1636
1645
|
{
|
|
1637
|
-
default: () =>
|
|
1646
|
+
default: () => X(
|
|
1638
1647
|
"span",
|
|
1639
1648
|
{ class: "underline line-clamp-2 break-all" },
|
|
1640
1649
|
h.memberPriceCount ? d(
|
|
@@ -1646,7 +1655,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1646
1655
|
)
|
|
1647
1656
|
}
|
|
1648
1657
|
),
|
|
1649
|
-
|
|
1658
|
+
X(nl, { prices: h.memberPrices })
|
|
1650
1659
|
])
|
|
1651
1660
|
]
|
|
1652
1661
|
]);
|
|
@@ -1659,7 +1668,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1659
1668
|
size: 100,
|
|
1660
1669
|
cell: (b) => {
|
|
1661
1670
|
const h = b.row.original;
|
|
1662
|
-
return
|
|
1671
|
+
return X(B.FmSelect, {
|
|
1663
1672
|
items: a.value,
|
|
1664
1673
|
modelValue: h.displayOrderFrom,
|
|
1665
1674
|
shiftMenu: !0,
|
|
@@ -1683,9 +1692,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1683
1692
|
enableSorting: !1,
|
|
1684
1693
|
cell: (b) => {
|
|
1685
1694
|
const h = b.row.original;
|
|
1686
|
-
return
|
|
1695
|
+
return X("div", { class: "flex items-center justify-end" }, [
|
|
1687
1696
|
...h.editPricing.state === "hidden" ? [] : [
|
|
1688
|
-
|
|
1697
|
+
X(B.FmButton, {
|
|
1689
1698
|
icon: "price_change",
|
|
1690
1699
|
variant: "tertiary",
|
|
1691
1700
|
// Match the neutral-grey action buttons beside it and the
|
|
@@ -1699,7 +1708,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1699
1708
|
onClick: () => E(h, "tiers")
|
|
1700
1709
|
})
|
|
1701
1710
|
],
|
|
1702
|
-
|
|
1711
|
+
X(B.FmButton, {
|
|
1703
1712
|
prependIcon: "inventory_2",
|
|
1704
1713
|
textColor: "neutral-gray-400",
|
|
1705
1714
|
variant: "tertiary",
|
|
@@ -1715,7 +1724,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1715
1724
|
);
|
|
1716
1725
|
}
|
|
1717
1726
|
}),
|
|
1718
|
-
|
|
1727
|
+
X(B.FmButton, {
|
|
1719
1728
|
prependIcon: "arrow_split",
|
|
1720
1729
|
textColor: "neutral-gray-400",
|
|
1721
1730
|
variant: "tertiary",
|
|
@@ -1743,15 +1752,15 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1743
1752
|
"z-index": i.zIndex ?? 200,
|
|
1744
1753
|
"onUpdate:modelValue": h[8] || (h[8] = (J) => o("update:modelValue", J))
|
|
1745
1754
|
}, {
|
|
1746
|
-
"side-sheet-header":
|
|
1755
|
+
"side-sheet-header": c(() => [
|
|
1747
1756
|
n("span", {
|
|
1748
1757
|
class: "nested-group-editor-sheet-marker sr-only",
|
|
1749
1758
|
"data-scope-title": e(d)("menu.common.labels.nested_group_override")
|
|
1750
|
-
}, I(e(d)("menu.common.labels.nested_group_override")), 9,
|
|
1751
|
-
n("p",
|
|
1759
|
+
}, I(e(d)("menu.common.labels.nested_group_override")), 9, qt),
|
|
1760
|
+
n("p", Gt, I(e(d)("menu.group.update")), 1)
|
|
1752
1761
|
]),
|
|
1753
|
-
"side-sheet-footer":
|
|
1754
|
-
n("div",
|
|
1762
|
+
"side-sheet-footer": c(() => [
|
|
1763
|
+
n("div", so, [
|
|
1755
1764
|
s(de, {
|
|
1756
1765
|
label: e(d)("menu.common.actions.update"),
|
|
1757
1766
|
"aria-label": e(d)(
|
|
@@ -1772,16 +1781,16 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1772
1781
|
}, null, 8, ["label", "aria-label"])
|
|
1773
1782
|
])
|
|
1774
1783
|
]),
|
|
1775
|
-
default:
|
|
1776
|
-
n("div",
|
|
1784
|
+
default: c(() => [
|
|
1785
|
+
n("div", jt, [
|
|
1777
1786
|
b.view.combinations.length > 0 ? (r(), T(fe, {
|
|
1778
1787
|
key: 0,
|
|
1779
1788
|
class: "p-16 bg-fm-color-neutral-gray-100 space-y-24",
|
|
1780
1789
|
variant: "outlined"
|
|
1781
1790
|
}, {
|
|
1782
|
-
default:
|
|
1783
|
-
n("p",
|
|
1784
|
-
n("div",
|
|
1791
|
+
default: c(() => [
|
|
1792
|
+
n("p", Kt, I(e(d)("menu.group.option.variant")), 1),
|
|
1793
|
+
n("div", Qt, [
|
|
1785
1794
|
s(se, {
|
|
1786
1795
|
class: "flex-1",
|
|
1787
1796
|
"aria-label": e(d)("menu.group.option.variant"),
|
|
@@ -1793,7 +1802,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1793
1802
|
"model-value": b.view.combinationKey,
|
|
1794
1803
|
"onUpdate:modelValue": h[0] || (h[0] = (J) => b.session.selectCombination(String(J ?? "")))
|
|
1795
1804
|
}, null, 8, ["aria-label", "menu-z-index", "items", "model-value"]),
|
|
1796
|
-
n("div",
|
|
1805
|
+
n("div", Xt, [
|
|
1797
1806
|
s(de, {
|
|
1798
1807
|
variant: e(Ne).Tertiary,
|
|
1799
1808
|
"prepend-icon": "keyboard_arrow_left",
|
|
@@ -1810,9 +1819,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1810
1819
|
}, null, 8, ["variant", "aria-label"])
|
|
1811
1820
|
])
|
|
1812
1821
|
]),
|
|
1813
|
-
b.view.combinations.length > 1 ? (r(), S("div",
|
|
1814
|
-
n("p",
|
|
1815
|
-
n("div",
|
|
1822
|
+
b.view.combinations.length > 1 ? (r(), S("div", Ht, [
|
|
1823
|
+
n("p", Wt, I(e(d)("menu.group.option.show_in_variants")), 1),
|
|
1824
|
+
n("div", Yt, [
|
|
1816
1825
|
(r(!0), S(re, null, Fe(b.view.combinations, (J) => (r(), T($e, {
|
|
1817
1826
|
key: J.id,
|
|
1818
1827
|
icon: J.hidden ? "visibility_off" : "check",
|
|
@@ -1822,7 +1831,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1822
1831
|
onClick: (we) => b.session.toggleCombinationHidden(J.id)
|
|
1823
1832
|
}, null, 8, ["icon", "label", "selected", "onClick"]))), 128))
|
|
1824
1833
|
]),
|
|
1825
|
-
n("p",
|
|
1834
|
+
n("p", Zt, I(ne.value.length ? e(d)("menu.group.option.hidden_in_variants", {
|
|
1826
1835
|
variants: ne.value.join(", ")
|
|
1827
1836
|
}) : e(d)("menu.group.option.shown_in_all_variants", {
|
|
1828
1837
|
count: b.view.combinations.length
|
|
@@ -1831,8 +1840,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1831
1840
|
]),
|
|
1832
1841
|
_: 1
|
|
1833
1842
|
})) : y("", !0),
|
|
1834
|
-
s(
|
|
1835
|
-
default:
|
|
1843
|
+
s(ta, null, {
|
|
1844
|
+
default: c(() => [
|
|
1836
1845
|
s(ge, {
|
|
1837
1846
|
label: e(d)("menu.common.labels.group_name"),
|
|
1838
1847
|
placeholder: b.view.name,
|
|
@@ -1840,7 +1849,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1840
1849
|
}, cl({ _: 2 }, [
|
|
1841
1850
|
b.presentation !== "tree" ? {
|
|
1842
1851
|
name: "append",
|
|
1843
|
-
fn:
|
|
1852
|
+
fn: c(() => [
|
|
1844
1853
|
s(de, {
|
|
1845
1854
|
variant: "tertiary",
|
|
1846
1855
|
icon: "g_translate",
|
|
@@ -1853,9 +1862,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1853
1862
|
s(Z, {
|
|
1854
1863
|
"model-value": b.view.minSelect + " " + b.view.maxSelect
|
|
1855
1864
|
}, {
|
|
1856
|
-
default:
|
|
1857
|
-
s(
|
|
1858
|
-
default:
|
|
1865
|
+
default: c(() => [
|
|
1866
|
+
s(ra, null, {
|
|
1867
|
+
default: c(() => [
|
|
1859
1868
|
s(q, {
|
|
1860
1869
|
class: "flex-1",
|
|
1861
1870
|
label: e(d)("menu.common.labels.min_select"),
|
|
@@ -1883,10 +1892,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1883
1892
|
s(Oe, {
|
|
1884
1893
|
label: e(d)("menu.common.labels.configuration")
|
|
1885
1894
|
}, {
|
|
1886
|
-
default:
|
|
1895
|
+
default: c(() => {
|
|
1887
1896
|
var J;
|
|
1888
1897
|
return [
|
|
1889
|
-
n("div",
|
|
1898
|
+
n("div", Jt, [
|
|
1890
1899
|
s(N, {
|
|
1891
1900
|
"model-value": b.view.stackable,
|
|
1892
1901
|
disabled: "",
|
|
@@ -1913,7 +1922,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1913
1922
|
]),
|
|
1914
1923
|
_: 1
|
|
1915
1924
|
}),
|
|
1916
|
-
b.view.hidden ? (r(), S("div",
|
|
1925
|
+
b.view.hidden ? (r(), S("div", eo, [
|
|
1917
1926
|
s(Ie, {
|
|
1918
1927
|
class: "shrink-0",
|
|
1919
1928
|
color: "system-warning-400",
|
|
@@ -1921,9 +1930,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1921
1930
|
outline: "",
|
|
1922
1931
|
size: "sm"
|
|
1923
1932
|
}),
|
|
1924
|
-
n("div",
|
|
1925
|
-
n("p",
|
|
1926
|
-
n("p",
|
|
1933
|
+
n("div", lo, [
|
|
1934
|
+
n("p", ao, I(e(d)("menu.common.labels.hide_group_notice")), 1),
|
|
1935
|
+
n("p", to, I(e(d)("menu.common.labels.hide_group_notice_reset")), 1)
|
|
1927
1936
|
])
|
|
1928
1937
|
])) : y("", !0),
|
|
1929
1938
|
s(Z, {
|
|
@@ -1936,13 +1945,13 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1936
1945
|
max: b.view.maxSelect
|
|
1937
1946
|
})
|
|
1938
1947
|
}, {
|
|
1939
|
-
default:
|
|
1948
|
+
default: c(() => [
|
|
1940
1949
|
s(qe, {
|
|
1941
1950
|
title: e(d)("menu.common.labels.product")
|
|
1942
1951
|
}, {
|
|
1943
|
-
default:
|
|
1944
|
-
n("div",
|
|
1945
|
-
n("div",
|
|
1952
|
+
default: c(() => [
|
|
1953
|
+
n("div", oo, [
|
|
1954
|
+
n("div", no, [
|
|
1946
1955
|
s(ze, {
|
|
1947
1956
|
"column-defs": le.value,
|
|
1948
1957
|
"row-data": pe.value,
|
|
@@ -1973,8 +1982,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1973
1982
|
"onUpdate:modelValue": h[11] || (h[11] = (J) => !J && (G.value = null)),
|
|
1974
1983
|
"onOn:clickedAway": h[12] || (h[12] = (J) => G.value = null)
|
|
1975
1984
|
}, {
|
|
1976
|
-
"side-sheet-header":
|
|
1977
|
-
n("div",
|
|
1985
|
+
"side-sheet-header": c(() => [
|
|
1986
|
+
n("div", io, [
|
|
1978
1987
|
h[14] || (h[14] = n("span", {
|
|
1979
1988
|
class: "nested-group-sheet-marker",
|
|
1980
1989
|
"aria-hidden": "true",
|
|
@@ -1986,10 +1995,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1986
1995
|
"aria-label": e(d)("menu.common.actions.cancel"),
|
|
1987
1996
|
onClick: h[9] || (h[9] = (J) => G.value = null)
|
|
1988
1997
|
}, null, 8, ["aria-label"]),
|
|
1989
|
-
n("div",
|
|
1998
|
+
n("div", ro, I(e(d)("menu.group.nested.title")), 1)
|
|
1990
1999
|
])
|
|
1991
2000
|
]),
|
|
1992
|
-
"side-sheet-footer":
|
|
2001
|
+
"side-sheet-footer": c(() => [
|
|
1993
2002
|
s(de, {
|
|
1994
2003
|
label: e(d)("menu.common.actions.ok"),
|
|
1995
2004
|
size: "lg",
|
|
@@ -1997,25 +2006,25 @@ const ml = /* @__PURE__ */ ce({
|
|
|
1997
2006
|
onClick: h[10] || (h[10] = (J) => G.value = null)
|
|
1998
2007
|
}, null, 8, ["label"])
|
|
1999
2008
|
]),
|
|
2000
|
-
default:
|
|
2009
|
+
default: c(() => {
|
|
2001
2010
|
var J, we;
|
|
2002
2011
|
return [
|
|
2003
|
-
n("div",
|
|
2012
|
+
n("div", uo, [
|
|
2004
2013
|
s(fe, {
|
|
2005
2014
|
variant: "outlined",
|
|
2006
2015
|
class: "px-16 py-12"
|
|
2007
2016
|
}, {
|
|
2008
|
-
default:
|
|
2017
|
+
default: c(() => {
|
|
2009
2018
|
var z;
|
|
2010
2019
|
return [
|
|
2011
|
-
n("p",
|
|
2012
|
-
n("p",
|
|
2020
|
+
n("p", mo, I(e(d)("menu.group.nested.currently_configuring")), 1),
|
|
2021
|
+
n("p", co, I((z = G.value) == null ? void 0 : z.name), 1)
|
|
2013
2022
|
];
|
|
2014
2023
|
}),
|
|
2015
2024
|
_: 1
|
|
2016
2025
|
}),
|
|
2017
|
-
n("div",
|
|
2018
|
-
n("p",
|
|
2026
|
+
n("div", po, [
|
|
2027
|
+
n("p", vo, I(e(d)("menu.group.nested.subtitle")), 1),
|
|
2019
2028
|
s(ze, {
|
|
2020
2029
|
"column-defs": A.value,
|
|
2021
2030
|
"row-data": [...((J = G.value) == null ? void 0 : J.nestedGroups) ?? []],
|
|
@@ -2030,13 +2039,13 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2030
2039
|
}),
|
|
2031
2040
|
_: 1
|
|
2032
2041
|
}, 8, ["model-value", "max-width", "z-index"]),
|
|
2033
|
-
$.value ? (r(), T(
|
|
2042
|
+
$.value ? (r(), T(Nl, {
|
|
2034
2043
|
key: 0,
|
|
2035
2044
|
session: $.value,
|
|
2036
2045
|
"product-name": ((He = l.value) == null ? void 0 : He.name) ?? "",
|
|
2037
2046
|
onClose: _
|
|
2038
2047
|
}, null, 8, ["session", "product-name"])) : y("", !0),
|
|
2039
|
-
F.value ? (r(), T(
|
|
2048
|
+
F.value ? (r(), T(Rl, {
|
|
2040
2049
|
key: 1,
|
|
2041
2050
|
session: F.value,
|
|
2042
2051
|
"z-index": (i.zIndex ?? 200) + 100,
|
|
@@ -2059,17 +2068,17 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2059
2068
|
], 64);
|
|
2060
2069
|
};
|
|
2061
2070
|
}
|
|
2062
|
-
}),
|
|
2071
|
+
}), fo = {
|
|
2063
2072
|
key: 0,
|
|
2064
2073
|
class: "w-[320px] xs:hidden sm:hidden fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-200 space-y-4 self-start"
|
|
2065
|
-
},
|
|
2074
|
+
}, go = { class: "fm-typo-en-title-sm-600" }, yo = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _o = { class: "fm-typo-en-body-lg-600" }, ho = /* @__PURE__ */ ce({
|
|
2066
2075
|
__name: "ProductSummaryCard",
|
|
2067
2076
|
props: {
|
|
2068
2077
|
summary: {},
|
|
2069
2078
|
variant: { default: "full" }
|
|
2070
2079
|
},
|
|
2071
|
-
setup(
|
|
2072
|
-
const V =
|
|
2080
|
+
setup(H) {
|
|
2081
|
+
const V = H, i = Xe(), { t: x, n: o } = be(), d = x("menu.product.form.summary.empty_value"), w = R(() => [
|
|
2073
2082
|
{
|
|
2074
2083
|
name: x("menu.product.form.summary.fields.code"),
|
|
2075
2084
|
value: V.summary.code ?? d
|
|
@@ -2118,17 +2127,17 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2118
2127
|
function C() {
|
|
2119
2128
|
i.open({
|
|
2120
2129
|
title: x("menu.product.form.summary.title"),
|
|
2121
|
-
contentComponent:
|
|
2130
|
+
contentComponent: X(
|
|
2122
2131
|
"div",
|
|
2123
2132
|
{ class: "space-y-4" },
|
|
2124
2133
|
w.value.map(
|
|
2125
|
-
(P) =>
|
|
2126
|
-
|
|
2134
|
+
(P) => X("div", { class: "space-y-4" }, [
|
|
2135
|
+
X(
|
|
2127
2136
|
"div",
|
|
2128
2137
|
{ class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" },
|
|
2129
2138
|
P.name
|
|
2130
2139
|
),
|
|
2131
|
-
|
|
2140
|
+
X("div", { class: "fm-typo-en-body-lg-600" }, P.value)
|
|
2132
2141
|
])
|
|
2133
2142
|
)
|
|
2134
2143
|
)
|
|
@@ -2136,15 +2145,15 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2136
2145
|
}
|
|
2137
2146
|
return (P, m) => {
|
|
2138
2147
|
const l = M("FmButton");
|
|
2139
|
-
return P.variant === "full" ? (r(), S("div",
|
|
2140
|
-
n("div",
|
|
2148
|
+
return P.variant === "full" ? (r(), S("div", fo, [
|
|
2149
|
+
n("div", go, I(e(x)("menu.product.form.summary.title")), 1),
|
|
2141
2150
|
m[0] || (m[0] = n("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
2142
2151
|
(r(!0), S(re, null, Fe(w.value, ($) => (r(), S("div", {
|
|
2143
2152
|
key: $.name,
|
|
2144
2153
|
class: "space-y-4"
|
|
2145
2154
|
}, [
|
|
2146
|
-
n("div",
|
|
2147
|
-
n("div",
|
|
2155
|
+
n("div", yo, I($.name), 1),
|
|
2156
|
+
n("div", _o, I($.value), 1)
|
|
2148
2157
|
]))), 128))
|
|
2149
2158
|
])) : (r(), T(l, {
|
|
2150
2159
|
key: 1,
|
|
@@ -2155,13 +2164,13 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2155
2164
|
}, null, 8, ["aria-label"]));
|
|
2156
2165
|
};
|
|
2157
2166
|
}
|
|
2158
|
-
}),
|
|
2167
|
+
}), ko = {
|
|
2159
2168
|
key: 0,
|
|
2160
2169
|
class: "sticky top-0 z-10 px-8 pb-8 bg-fm-color-neutral-white"
|
|
2161
|
-
},
|
|
2170
|
+
}, wo = {
|
|
2162
2171
|
key: 1,
|
|
2163
2172
|
class: "py-8 px-12 fm-typo-en-body-md-400 text-fm-color-typo-tertiary"
|
|
2164
|
-
},
|
|
2173
|
+
}, xo = /* @__PURE__ */ ce({
|
|
2165
2174
|
__name: "ProductCategoryMultiSelect",
|
|
2166
2175
|
props: {
|
|
2167
2176
|
items: {},
|
|
@@ -2170,11 +2179,11 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2170
2179
|
placeholder: {}
|
|
2171
2180
|
},
|
|
2172
2181
|
emits: ["update:modelValue", "create"],
|
|
2173
|
-
setup(
|
|
2174
|
-
const i =
|
|
2182
|
+
setup(H, { emit: V }) {
|
|
2183
|
+
const i = H, x = V, { t: o } = be(), { search: d, filtered: w, noMatches: C, reset: P } = El(
|
|
2175
2184
|
() => i.items,
|
|
2176
2185
|
(F) => F.label
|
|
2177
|
-
), { content: m, contentStyle: l, onMenuChanged: $ } =
|
|
2186
|
+
), { content: m, contentStyle: l, onMenuChanged: $ } = ql();
|
|
2178
2187
|
function _(F) {
|
|
2179
2188
|
F || P(), $(F);
|
|
2180
2189
|
}
|
|
@@ -2190,17 +2199,17 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2190
2199
|
"onUpdate:modelValue": L[2] || (L[2] = (g) => x("update:modelValue", g ?? [])),
|
|
2191
2200
|
onDropdownChanged: _
|
|
2192
2201
|
}, {
|
|
2193
|
-
"menu-wrapper":
|
|
2202
|
+
"menu-wrapper": c(({ handleItemChange: g }) => [
|
|
2194
2203
|
n("div", {
|
|
2195
2204
|
ref_key: "content",
|
|
2196
2205
|
ref: m,
|
|
2197
2206
|
class: "shrink-0",
|
|
2198
2207
|
style: pl(e(l))
|
|
2199
2208
|
}, [
|
|
2200
|
-
F.items.length ? (r(), S("div",
|
|
2209
|
+
F.items.length ? (r(), S("div", ko, [
|
|
2201
2210
|
s(E, {
|
|
2202
2211
|
modelValue: e(d),
|
|
2203
|
-
"onUpdate:modelValue": L[0] || (L[0] = (f) =>
|
|
2212
|
+
"onUpdate:modelValue": L[0] || (L[0] = (f) => Ll(d) ? d.value = f : null),
|
|
2204
2213
|
autofocus: "",
|
|
2205
2214
|
placeholder: e(o)("menu.common.actions.search")
|
|
2206
2215
|
}, null, 8, ["modelValue", "placeholder"])
|
|
@@ -2214,7 +2223,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2214
2223
|
"model-value": F.modelValue.includes(f.value),
|
|
2215
2224
|
"onUpdate:modelValue": (k) => g(k, f)
|
|
2216
2225
|
}, null, 8, ["label", "data-checked", "model-value", "onUpdate:modelValue"]))), 128)),
|
|
2217
|
-
e(C) ? (r(), S("p",
|
|
2226
|
+
e(C) ? (r(), S("p", wo, I(e(o)("menu.product.form.detail.category.no_results")), 1)) : y("", !0),
|
|
2218
2227
|
s(A, {
|
|
2219
2228
|
variant: "plain",
|
|
2220
2229
|
"prepend-icon": "add",
|
|
@@ -2228,31 +2237,31 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2228
2237
|
}, 8, ["items", "disabled", "model-value", "placeholder"]);
|
|
2229
2238
|
};
|
|
2230
2239
|
}
|
|
2231
|
-
}),
|
|
2240
|
+
}), Co = ["aria-label"], Fo = { class: "text-fm-color-typo-tertiary break-all fm-typo-en-body-lg-400 line-clamp-1" }, $o = {
|
|
2232
2241
|
key: 0,
|
|
2233
2242
|
class: "sticky top-0 z-10 px-8 pb-8 bg-fm-color-neutral-white"
|
|
2234
|
-
},
|
|
2243
|
+
}, So = {
|
|
2235
2244
|
key: 1,
|
|
2236
2245
|
class: "py-8 px-12 fm-typo-en-body-md-400 text-fm-color-typo-tertiary"
|
|
2237
|
-
},
|
|
2246
|
+
}, Vo = {
|
|
2238
2247
|
key: 0,
|
|
2239
2248
|
class: "flex flex-col gap-4 justify-center"
|
|
2240
|
-
},
|
|
2249
|
+
}, Po = /* @__PURE__ */ ce({
|
|
2241
2250
|
__name: "ProductCategorySelector",
|
|
2242
2251
|
props: {
|
|
2243
2252
|
view: {},
|
|
2244
2253
|
session: {}
|
|
2245
2254
|
},
|
|
2246
2255
|
emits: ["create"],
|
|
2247
|
-
setup(
|
|
2248
|
-
const i =
|
|
2256
|
+
setup(H, { emit: V }) {
|
|
2257
|
+
const i = H, x = V, { t: o } = be(), d = Pe(), w = (g) => g.labelMessage ? d(g.labelMessage) : g.label, C = Y(!1), P = Y(), { search: m, filtered: l, noMatches: $, reset: _ } = El(
|
|
2249
2258
|
() => i.view.categoryOptions,
|
|
2250
2259
|
w
|
|
2251
2260
|
), {
|
|
2252
2261
|
content: F,
|
|
2253
2262
|
contentStyle: L,
|
|
2254
2263
|
onMenuChanged: E
|
|
2255
|
-
} =
|
|
2264
|
+
} = ql();
|
|
2256
2265
|
function G(g) {
|
|
2257
2266
|
C.value = g, g || _(), E(g);
|
|
2258
2267
|
}
|
|
@@ -2266,7 +2275,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2266
2275
|
i.session.selectCategory(g, f), f && ((k = P.value) == null || k.toggleMenu(!1));
|
|
2267
2276
|
}
|
|
2268
2277
|
return (g, f) => {
|
|
2269
|
-
const k = M("FmIcon"), O = M("FmField"), Q = M("FmSearch"), ee = M("FmMenuItem"), a = M("FmButton"),
|
|
2278
|
+
const k = M("FmIcon"), O = M("FmField"), Q = M("FmSearch"), ee = M("FmMenuItem"), a = M("FmButton"), p = M("FmMenu"), ne = M("FmFormGroup"), pe = M("FmChipGroup");
|
|
2270
2279
|
return r(), S("div", {
|
|
2271
2280
|
class: "flex flex-col gap-4",
|
|
2272
2281
|
"aria-label": g.view.categoryLabel === "plural" ? e(o)("menu.product.form.detail.category.label") : e(o)("menu.product.form.detail.category.label_singular")
|
|
@@ -2276,43 +2285,43 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2276
2285
|
disabled: g.view.editClassification.state !== "allowed",
|
|
2277
2286
|
focused: C.value
|
|
2278
2287
|
}, {
|
|
2279
|
-
default:
|
|
2280
|
-
s(
|
|
2288
|
+
default: c(() => [
|
|
2289
|
+
s(p, {
|
|
2281
2290
|
ref_key: "menu",
|
|
2282
2291
|
ref: P,
|
|
2283
2292
|
disabled: g.view.editClassification.state !== "allowed",
|
|
2284
2293
|
"close-on-click": !1,
|
|
2285
2294
|
onMenuChanged: G
|
|
2286
2295
|
}, {
|
|
2287
|
-
"menu-button":
|
|
2296
|
+
"menu-button": c(() => [
|
|
2288
2297
|
s(O, {
|
|
2289
2298
|
class: "cursor-pointer",
|
|
2290
2299
|
disabled: g.view.editClassification.state !== "allowed",
|
|
2291
2300
|
focused: C.value
|
|
2292
2301
|
}, {
|
|
2293
|
-
append:
|
|
2302
|
+
append: c(() => [
|
|
2294
2303
|
s(k, {
|
|
2295
2304
|
name: C.value ? "expand_less" : "expand_more",
|
|
2296
2305
|
size: "md"
|
|
2297
2306
|
}, null, 8, ["name"])
|
|
2298
2307
|
]),
|
|
2299
|
-
default:
|
|
2300
|
-
n("div",
|
|
2308
|
+
default: c(() => [
|
|
2309
|
+
n("div", Fo, I(e(o)("menu.product.form.detail.category.placeholder")), 1)
|
|
2301
2310
|
]),
|
|
2302
2311
|
_: 1
|
|
2303
2312
|
}, 8, ["disabled", "focused"])
|
|
2304
2313
|
]),
|
|
2305
|
-
default:
|
|
2314
|
+
default: c(() => [
|
|
2306
2315
|
n("div", {
|
|
2307
2316
|
ref_key: "content",
|
|
2308
2317
|
ref: F,
|
|
2309
2318
|
class: "relative min-w-[112px] py-12 px-4 flex flex-col overflow-y-auto bg-fm-color-neutral-white shadow-light-300 rounded-md",
|
|
2310
2319
|
style: pl(e(L))
|
|
2311
2320
|
}, [
|
|
2312
|
-
g.view.categoryOptions.length ? (r(), S("div",
|
|
2321
|
+
g.view.categoryOptions.length ? (r(), S("div", $o, [
|
|
2313
2322
|
s(Q, {
|
|
2314
2323
|
modelValue: e(m),
|
|
2315
|
-
"onUpdate:modelValue": f[0] || (f[0] = (le) =>
|
|
2324
|
+
"onUpdate:modelValue": f[0] || (f[0] = (le) => Ll(m) ? m.value = le : null),
|
|
2316
2325
|
autofocus: "",
|
|
2317
2326
|
placeholder: e(o)("menu.common.actions.search")
|
|
2318
2327
|
}, null, 8, ["modelValue", "placeholder"])
|
|
@@ -2324,7 +2333,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2324
2333
|
"model-value": g.view.categoryId === le.id,
|
|
2325
2334
|
"onUpdate:modelValue": (ve) => v(le.id, ve)
|
|
2326
2335
|
}, null, 8, ["label", "model-value", "onUpdate:modelValue"]))), 128)),
|
|
2327
|
-
e($) ? (r(), S("p",
|
|
2336
|
+
e($) ? (r(), S("p", So, I(e(o)("menu.product.form.detail.category.no_results")), 1)) : y("", !0),
|
|
2328
2337
|
s(a, {
|
|
2329
2338
|
variant: "plain",
|
|
2330
2339
|
"prepend-icon": "add",
|
|
@@ -2339,7 +2348,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2339
2348
|
]),
|
|
2340
2349
|
_: 1
|
|
2341
2350
|
}, 8, ["model-value", "disabled", "focused"]),
|
|
2342
|
-
A.value.length ? (r(), S("div",
|
|
2351
|
+
A.value.length ? (r(), S("div", Vo, [
|
|
2343
2352
|
s(pe, {
|
|
2344
2353
|
disabled: g.view.editClassification.state !== "allowed",
|
|
2345
2354
|
items: A.value.map((le) => ({ label: w(le) })),
|
|
@@ -2347,22 +2356,22 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2347
2356
|
onChipClosed: f[2] || (f[2] = (le) => g.session.removeCategory(A.value[le].id))
|
|
2348
2357
|
}, null, 8, ["disabled", "items"])
|
|
2349
2358
|
])) : y("", !0)
|
|
2350
|
-
], 8,
|
|
2359
|
+
], 8, Co);
|
|
2351
2360
|
};
|
|
2352
2361
|
}
|
|
2353
|
-
}),
|
|
2362
|
+
}), Uo = { class: "fm-typo-en-title-md-600" }, Io = { class: "pt-8 space-y-24" }, To = { class: "flex flex-col gap-16 border p-16 rounded-lg" }, Ao = ["aria-expanded"], Bo = { class: "fm-typo-en-body-lg-600" }, Oo = {
|
|
2354
2363
|
key: 0,
|
|
2355
2364
|
class: "flex flex-col gap-32 pl-32"
|
|
2356
|
-
},
|
|
2365
|
+
}, Lo = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary border inline-block rounded-full px-8 py-4 mb-8" }, zo = {
|
|
2357
2366
|
key: 0,
|
|
2358
2367
|
class: "space-y-8"
|
|
2359
|
-
},
|
|
2368
|
+
}, Do = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary border inline-block rounded-full px-8 py-4 mb-8" }, Ro = { class: "flex w-[100px] items-center gap-8" }, Mo = { class: "fm-typo-en-body-md-400" }, No = { class: "flex-1" }, Eo = { class: "flex flex-col gap-16 border p-16 rounded-lg" }, qo = ["aria-expanded"], Go = { class: "fm-typo-en-body-lg-600" }, jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Ko = {
|
|
2360
2369
|
key: 0,
|
|
2361
2370
|
class: "flex flex-col gap-32 pl-32"
|
|
2362
|
-
},
|
|
2371
|
+
}, Qo = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary border inline-block rounded-full px-8 py-4 mb-8" }, Xo = {
|
|
2363
2372
|
key: 0,
|
|
2364
2373
|
class: "space-y-8"
|
|
2365
|
-
},
|
|
2374
|
+
}, Ho = { class: "fm-typo-en-body-sm-600 text-fm-color-typo-secondary border inline-block rounded-full px-8 py-4 mb-8" }, Wo = { class: "flex w-[100px] items-center gap-8 pt-12" }, Yo = { class: "fm-typo-en-body-md-400" }, Zo = { class: "flex-1" }, Jo = { class: "w-full flex gap-8 items-center justify-end relative -top-px" }, en = /* @__PURE__ */ ce({
|
|
2366
2375
|
__name: "ProductTranslationDialog",
|
|
2367
2376
|
props: {
|
|
2368
2377
|
modelValue: { type: Boolean },
|
|
@@ -2371,13 +2380,13 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2371
2380
|
initialSection: { default: "name" }
|
|
2372
2381
|
},
|
|
2373
2382
|
emits: ["update:modelValue"],
|
|
2374
|
-
setup(
|
|
2375
|
-
const i =
|
|
2383
|
+
setup(H, { emit: V }) {
|
|
2384
|
+
const i = H, x = V, { t: o } = be(), d = Xe(), w = R({
|
|
2376
2385
|
get: () => i.modelValue,
|
|
2377
2386
|
set: (f) => {
|
|
2378
2387
|
f ? x("update:modelValue", f) : v();
|
|
2379
2388
|
}
|
|
2380
|
-
}), C =
|
|
2389
|
+
}), C = Y(!0), P = Y(!1);
|
|
2381
2390
|
Ae(
|
|
2382
2391
|
() => [i.modelValue, i.initialSection],
|
|
2383
2392
|
([f, k]) => {
|
|
@@ -2466,14 +2475,14 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2466
2475
|
const O = M("FmIcon"), Q = M("FmTextarea"), ee = M("FmButton"), a = M("FmDialog");
|
|
2467
2476
|
return r(), T(a, {
|
|
2468
2477
|
modelValue: w.value,
|
|
2469
|
-
"onUpdate:modelValue": k[4] || (k[4] = (
|
|
2478
|
+
"onUpdate:modelValue": k[4] || (k[4] = (p) => w.value = p),
|
|
2470
2479
|
"max-width": 800
|
|
2471
2480
|
}, {
|
|
2472
|
-
"dialog-header":
|
|
2473
|
-
n("p",
|
|
2481
|
+
"dialog-header": c(() => [
|
|
2482
|
+
n("p", Uo, I(e(o)("menu.product.translation.title")), 1)
|
|
2474
2483
|
]),
|
|
2475
|
-
"dialog-footer":
|
|
2476
|
-
n("div",
|
|
2484
|
+
"dialog-footer": c(() => [
|
|
2485
|
+
n("div", Jo, [
|
|
2477
2486
|
s(ee, {
|
|
2478
2487
|
label: e(o)("menu.common.actions.cancel"),
|
|
2479
2488
|
"aria-label": e(o)("menu.product.translation.cancel_translation"),
|
|
@@ -2490,30 +2499,30 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2490
2499
|
}, null, 8, ["label", "aria-label"])
|
|
2491
2500
|
])
|
|
2492
2501
|
]),
|
|
2493
|
-
default:
|
|
2494
|
-
n("div",
|
|
2495
|
-
s(
|
|
2496
|
-
selected: m.value.map((
|
|
2502
|
+
default: c(() => [
|
|
2503
|
+
n("div", Io, [
|
|
2504
|
+
s(Wl, {
|
|
2505
|
+
selected: m.value.map((p) => ({ code: p.code, name: p.label })),
|
|
2497
2506
|
available: $.value,
|
|
2498
2507
|
"menu-z-index": 101,
|
|
2499
2508
|
onAdd: E,
|
|
2500
2509
|
onRemove: G
|
|
2501
2510
|
}, null, 8, ["selected", "available"]),
|
|
2502
|
-
n("div",
|
|
2511
|
+
n("div", To, [
|
|
2503
2512
|
n("button", {
|
|
2504
2513
|
type: "button",
|
|
2505
2514
|
class: "flex items-center gap-16 cursor-pointer appearance-none border-0 bg-transparent p-0 text-left",
|
|
2506
2515
|
"aria-expanded": C.value,
|
|
2507
|
-
onClick: k[0] || (k[0] = (
|
|
2516
|
+
onClick: k[0] || (k[0] = (p) => C.value = !C.value)
|
|
2508
2517
|
}, [
|
|
2509
2518
|
s(O, {
|
|
2510
2519
|
name: C.value ? "keyboard_arrow_down" : "keyboard_arrow_right"
|
|
2511
2520
|
}, null, 8, ["name"]),
|
|
2512
|
-
n("p",
|
|
2513
|
-
], 8,
|
|
2514
|
-
C.value ? (r(), S("div",
|
|
2521
|
+
n("p", Bo, I(e(o)("menu.product.translation.product_name")), 1)
|
|
2522
|
+
], 8, Ao),
|
|
2523
|
+
C.value ? (r(), S("div", Oo, [
|
|
2515
2524
|
n("div", null, [
|
|
2516
|
-
n("p",
|
|
2525
|
+
n("p", Lo, I(e(o)("menu.common.translation.default")), 1),
|
|
2517
2526
|
n("div", {
|
|
2518
2527
|
class: Be({
|
|
2519
2528
|
"-mt-px mb-px": m.value.length === 0,
|
|
@@ -2524,54 +2533,54 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2524
2533
|
"aria-label": e(o)("menu.product.form.detail.fields.name.label"),
|
|
2525
2534
|
"model-value": f.view.name,
|
|
2526
2535
|
placeholder: e(o)("menu.product.translation.placeholder"),
|
|
2527
|
-
"onUpdate:modelValue": k[1] || (k[1] = (
|
|
2536
|
+
"onUpdate:modelValue": k[1] || (k[1] = (p) => f.session.setName(String(p ?? "")))
|
|
2528
2537
|
}, null, 8, ["aria-label", "model-value", "placeholder"])
|
|
2529
2538
|
], 2)
|
|
2530
2539
|
]),
|
|
2531
|
-
m.value.length > 0 ? (r(), S("div",
|
|
2532
|
-
n("p",
|
|
2533
|
-
(r(!0), S(re, null, Fe(m.value, (
|
|
2534
|
-
key:
|
|
2540
|
+
m.value.length > 0 ? (r(), S("div", zo, [
|
|
2541
|
+
n("p", Do, I(e(o)("menu.common.translation.translation_label")), 1),
|
|
2542
|
+
(r(!0), S(re, null, Fe(m.value, (p) => (r(), S("div", {
|
|
2543
|
+
key: p.code,
|
|
2535
2544
|
class: "flex gap-16 items-center"
|
|
2536
2545
|
}, [
|
|
2537
|
-
n("div",
|
|
2546
|
+
n("div", Ro, [
|
|
2538
2547
|
s($l, {
|
|
2539
|
-
code:
|
|
2548
|
+
code: p.code
|
|
2540
2549
|
}, null, 8, ["code"]),
|
|
2541
|
-
n("span",
|
|
2550
|
+
n("span", Mo, I(p.label), 1)
|
|
2542
2551
|
]),
|
|
2543
|
-
n("div",
|
|
2552
|
+
n("div", No, [
|
|
2544
2553
|
s(ge, {
|
|
2545
2554
|
"aria-label": e(o)("menu.product.translation.name_field", {
|
|
2546
|
-
locale:
|
|
2555
|
+
locale: p.label
|
|
2547
2556
|
}),
|
|
2548
|
-
"model-value":
|
|
2557
|
+
"model-value": p.name,
|
|
2549
2558
|
placeholder: e(o)("menu.product.translation.placeholder"),
|
|
2550
|
-
"onUpdate:modelValue": (ne) => F(
|
|
2559
|
+
"onUpdate:modelValue": (ne) => F(p.code, String(ne ?? ""))
|
|
2551
2560
|
}, null, 8, ["aria-label", "model-value", "placeholder", "onUpdate:modelValue"])
|
|
2552
2561
|
])
|
|
2553
2562
|
]))), 128))
|
|
2554
2563
|
])) : y("", !0)
|
|
2555
2564
|
])) : y("", !0)
|
|
2556
2565
|
]),
|
|
2557
|
-
n("div",
|
|
2566
|
+
n("div", Eo, [
|
|
2558
2567
|
n("button", {
|
|
2559
2568
|
type: "button",
|
|
2560
2569
|
class: "flex items-center gap-16 cursor-pointer appearance-none border-0 bg-transparent p-0 text-left",
|
|
2561
2570
|
"aria-expanded": P.value,
|
|
2562
|
-
onClick: k[2] || (k[2] = (
|
|
2571
|
+
onClick: k[2] || (k[2] = (p) => P.value = !P.value)
|
|
2563
2572
|
}, [
|
|
2564
2573
|
s(O, {
|
|
2565
2574
|
name: P.value ? "keyboard_arrow_down" : "keyboard_arrow_right"
|
|
2566
2575
|
}, null, 8, ["name"]),
|
|
2567
|
-
n("p",
|
|
2576
|
+
n("p", Go, [
|
|
2568
2577
|
sl(I(e(o)("menu.product.translation.description")) + " ", 1),
|
|
2569
|
-
n("span",
|
|
2578
|
+
n("span", jo, I(e(o)("menu.product.translation.optional")), 1)
|
|
2570
2579
|
])
|
|
2571
|
-
], 8,
|
|
2572
|
-
P.value ? (r(), S("div",
|
|
2580
|
+
], 8, qo),
|
|
2581
|
+
P.value ? (r(), S("div", Ko, [
|
|
2573
2582
|
n("div", null, [
|
|
2574
|
-
n("p",
|
|
2583
|
+
n("p", Qo, I(e(o)("menu.common.translation.default")), 1),
|
|
2575
2584
|
n("div", {
|
|
2576
2585
|
class: Be(["-mt-px", {
|
|
2577
2586
|
"mb-px product-translation-empty-textarea": m.value.length === 0
|
|
@@ -2581,28 +2590,28 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2581
2590
|
"aria-label": e(o)("menu.product.form.detail.fields.description.label"),
|
|
2582
2591
|
"model-value": f.view.description,
|
|
2583
2592
|
placeholder: e(o)("menu.product.translation.placeholder"),
|
|
2584
|
-
"onUpdate:modelValue": k[3] || (k[3] = (
|
|
2593
|
+
"onUpdate:modelValue": k[3] || (k[3] = (p) => f.session.setDescription(String(p ?? "")))
|
|
2585
2594
|
}, null, 8, ["aria-label", "model-value", "placeholder"])
|
|
2586
2595
|
], 2)
|
|
2587
2596
|
]),
|
|
2588
|
-
m.value.length > 0 ? (r(), S("div",
|
|
2589
|
-
n("p",
|
|
2590
|
-
(r(!0), S(re, null, Fe(m.value, (
|
|
2591
|
-
key:
|
|
2597
|
+
m.value.length > 0 ? (r(), S("div", Xo, [
|
|
2598
|
+
n("p", Ho, I(e(o)("menu.common.translation.translation_label")), 1),
|
|
2599
|
+
(r(!0), S(re, null, Fe(m.value, (p) => (r(), S("div", {
|
|
2600
|
+
key: p.code,
|
|
2592
2601
|
class: "flex gap-16 items-start"
|
|
2593
2602
|
}, [
|
|
2594
|
-
n("div",
|
|
2603
|
+
n("div", Wo, [
|
|
2595
2604
|
s($l, {
|
|
2596
|
-
code:
|
|
2605
|
+
code: p.code
|
|
2597
2606
|
}, null, 8, ["code"]),
|
|
2598
|
-
n("span",
|
|
2607
|
+
n("span", Yo, I(p.label), 1)
|
|
2599
2608
|
]),
|
|
2600
|
-
n("div",
|
|
2609
|
+
n("div", Zo, [
|
|
2601
2610
|
s(Q, {
|
|
2602
|
-
"aria-label": l(
|
|
2603
|
-
"model-value":
|
|
2611
|
+
"aria-label": l(p.label),
|
|
2612
|
+
"model-value": p.description,
|
|
2604
2613
|
placeholder: e(o)("menu.product.translation.placeholder"),
|
|
2605
|
-
"onUpdate:modelValue": (ne) => L(
|
|
2614
|
+
"onUpdate:modelValue": (ne) => L(p.code, String(ne ?? ""))
|
|
2606
2615
|
}, null, 8, ["aria-label", "model-value", "placeholder", "onUpdate:modelValue"])
|
|
2607
2616
|
])
|
|
2608
2617
|
]))), 128))
|
|
@@ -2615,61 +2624,61 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2615
2624
|
}, 8, ["modelValue"]);
|
|
2616
2625
|
};
|
|
2617
2626
|
}
|
|
2618
|
-
}),
|
|
2627
|
+
}), ln = { class: "flex-1 py-24 space-y-24 xs:w-full min-w-0" }, an = ["aria-label"], tn = { class: "space-y-4" }, on = { class: "fm-typo-en-title-sm-600" }, nn = { class: "text-fm-color-typo-secondary" }, sn = { class: "flex gap-16" }, rn = { class: "flex-1" }, un = { class: "flex-1" }, dn = ["aria-label"], mn = { class: "flex flex-col gap-24" }, cn = { class: "flex space-x-16 xs:flex-col xs:space-x-0 xs:space-y-16" }, pn = { class: "w-[160px] xs:w-full" }, vn = { class: "flex-1" }, bn = { class: "py-12 px-16 space-y-4" }, fn = { class: "relative" }, gn = { class: "fm-typo-en-body-lg-600" }, yn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, _n = { class: "absolute top-32 right-4 flex gap-4" }, hn = { class: "py-12 px-16 space-y-4" }, kn = { class: "flex flex-col gap-16" }, wn = { class: "space-y-8" }, xn = { class: "pl-32" }, Cn = {
|
|
2619
2628
|
key: 0,
|
|
2620
2629
|
class: "flex items-center gap-8"
|
|
2621
|
-
},
|
|
2630
|
+
}, Fn = {
|
|
2622
2631
|
key: 1,
|
|
2623
2632
|
class: "flex flex-col gap-24"
|
|
2624
|
-
},
|
|
2633
|
+
}, $n = { class: "flex flex-col rounded-lg border border-fm-color-neutral-gray-100" }, Sn = { class: "flex items-center gap-16" }, Vn = { class: "flex-1 min-w-0" }, Pn = { class: "fm-typo-en-body-lg-600" }, Un = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, In = { class: "flex flex-col gap-16 pl-40" }, Tn = ["aria-label"], An = {
|
|
2625
2634
|
key: 3,
|
|
2626
2635
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
2627
|
-
},
|
|
2636
|
+
}, Bn = { class: "flex space-x-16 xs:flex-col xs:space-x-0 xs:space-y-16" }, On = {
|
|
2628
2637
|
key: 0,
|
|
2629
2638
|
class: "flex fm-corner-radius-lg p-16 border border-fm-color-neutral-gray-100 items-center justify-between"
|
|
2630
|
-
},
|
|
2639
|
+
}, Ln = { class: "flex flex-col space-y-4" }, zn = { class: "fm-typo-en-body-lg-600" }, Dn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Rn = { class: "flex items-center gap-16" }, Mn = { class: "space-y-16" }, Nn = { class: "space-y-8" }, En = {
|
|
2631
2640
|
key: 0,
|
|
2632
2641
|
class: "pl-32 pb-4 flex items-center gap-16"
|
|
2633
|
-
},
|
|
2642
|
+
}, qn = { class: "fm-typo-en-body-lg-400" }, Gn = { class: "w-[258px]" }, jn = { class: "w-[117px]" }, Kn = {
|
|
2634
2643
|
key: 0,
|
|
2635
2644
|
class: "space-y-8"
|
|
2636
|
-
},
|
|
2645
|
+
}, Qn = {
|
|
2637
2646
|
key: 0,
|
|
2638
2647
|
class: "pl-32 pb-4 flex space-x-16"
|
|
2639
|
-
},
|
|
2648
|
+
}, Xn = { class: "w-[258px] xs:w-full" }, Hn = {
|
|
2640
2649
|
key: 1,
|
|
2641
2650
|
class: "space-y-8"
|
|
2642
|
-
},
|
|
2651
|
+
}, Wn = { class: "pl-32 pb-4 flex space-x-16" }, Yn = { class: "w-[258px] xs:w-full" }, Zn = { class: "space-y-16" }, Jn = {
|
|
2643
2652
|
key: 0,
|
|
2644
2653
|
class: "pl-32 pb-4 flex items-center gap-16"
|
|
2645
|
-
},
|
|
2654
|
+
}, es = { class: "fm-typo-en-body-lg-400" }, ls = { class: "w-[258px]" }, as = {
|
|
2646
2655
|
key: 4,
|
|
2647
2656
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
2648
|
-
},
|
|
2657
|
+
}, ts = { class: "space-y-16" }, os = { class: "flex items-center space-x-4" }, ns = { class: "pt-16 pb-8" }, ss = {
|
|
2649
2658
|
key: 6,
|
|
2650
2659
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
2651
|
-
},
|
|
2660
|
+
}, is = { class: "space-y-16" }, rs = { class: "flex items-center space-x-8" }, us = { class: "flex items-center flex-1 h-[36px] px-8 border border-fm-color-neutral-gray-300 rounded-md bg-fm-color-neutral-white" }, ds = { class: "flex-1 fm-typo-en-body-lg-400" }, ms = {
|
|
2652
2661
|
key: 8,
|
|
2653
2662
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
2654
|
-
},
|
|
2663
|
+
}, cs = {
|
|
2655
2664
|
key: 10,
|
|
2656
2665
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
2657
|
-
},
|
|
2666
|
+
}, ps = { class: "xs:overflow-x-scroll" }, vs = {
|
|
2658
2667
|
key: 12,
|
|
2659
2668
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
2660
|
-
},
|
|
2669
|
+
}, bs = {
|
|
2661
2670
|
key: 14,
|
|
2662
2671
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
2663
|
-
},
|
|
2672
|
+
}, fs = {
|
|
2664
2673
|
key: 0,
|
|
2665
2674
|
class: "flex flex-col gap-16"
|
|
2666
|
-
},
|
|
2675
|
+
}, gs = {
|
|
2667
2676
|
key: 16,
|
|
2668
2677
|
class: "w-full h-[2px] bg-fm-color-neutral-gray-100"
|
|
2669
|
-
},
|
|
2678
|
+
}, ys = {
|
|
2670
2679
|
key: 0,
|
|
2671
2680
|
class: "space-y-16"
|
|
2672
|
-
},
|
|
2681
|
+
}, _s = /* @__PURE__ */ ce({
|
|
2673
2682
|
__name: "ProductForm",
|
|
2674
2683
|
props: {
|
|
2675
2684
|
view: {},
|
|
@@ -2681,8 +2690,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2681
2690
|
sdk: {}
|
|
2682
2691
|
},
|
|
2683
2692
|
emits: ["select-scope", "create-entity"],
|
|
2684
|
-
setup(
|
|
2685
|
-
const i =
|
|
2693
|
+
setup(H, { emit: V }) {
|
|
2694
|
+
const i = H, x = Y(null);
|
|
2686
2695
|
Ae(
|
|
2687
2696
|
() => [i.treeSelection, i.view.itemId],
|
|
2688
2697
|
async ([u]) => {
|
|
@@ -2744,14 +2753,14 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2744
2753
|
}, L = (u) => u.reduce((t, j) => {
|
|
2745
2754
|
const te = F(j);
|
|
2746
2755
|
return t ? l("menu.group.list.join_products", { list: t, item: te }) : te;
|
|
2747
|
-
}, ""), E =
|
|
2756
|
+
}, ""), E = Xe();
|
|
2748
2757
|
function G(u) {
|
|
2749
|
-
const t = u === "variant" ?
|
|
2758
|
+
const t = u === "variant" ? p.value.variantPicker() : p.value.groupPicker();
|
|
2750
2759
|
t && E.open({
|
|
2751
2760
|
title: l(
|
|
2752
2761
|
u === "variant" ? "menu.product.form.variant.add" : "menu.product.form.group.add"
|
|
2753
2762
|
),
|
|
2754
|
-
contentComponent:
|
|
2763
|
+
contentComponent: Al,
|
|
2755
2764
|
contentComponentProps: {
|
|
2756
2765
|
session: t,
|
|
2757
2766
|
kind: u,
|
|
@@ -2761,10 +2770,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2761
2770
|
}).onClose(() => t.dispose());
|
|
2762
2771
|
}
|
|
2763
2772
|
function A() {
|
|
2764
|
-
const u =
|
|
2773
|
+
const u = p.value.pacingPicker();
|
|
2765
2774
|
u && E.open({
|
|
2766
2775
|
title: l("menu.product.form.order_pacing.time_presets.add"),
|
|
2767
|
-
contentComponent:
|
|
2776
|
+
contentComponent: Al,
|
|
2768
2777
|
// Named for what it cancels, like the group and variant pickers beside
|
|
2769
2778
|
// it (`<kind>.picker.cancel`): a bare "Cancel" said nothing about which
|
|
2770
2779
|
// of the several dismissible surfaces on this form it belonged to. As
|
|
@@ -2791,7 +2800,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2791
2800
|
u.apply() && E.close();
|
|
2792
2801
|
}).onTertiary(() => o("create-entity", "pacing")).onClose(() => u.dispose());
|
|
2793
2802
|
}
|
|
2794
|
-
const v = Pe(), g =
|
|
2803
|
+
const v = Pe(), g = Y(
|
|
2795
2804
|
null
|
|
2796
2805
|
), f = R(
|
|
2797
2806
|
() => (i.itemBreadcrumb ?? []).map((u) => ({
|
|
@@ -2809,7 +2818,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2809
2818
|
},
|
|
2810
2819
|
{ flush: "post" }
|
|
2811
2820
|
);
|
|
2812
|
-
const k =
|
|
2821
|
+
const k = Y(null);
|
|
2813
2822
|
function O(u) {
|
|
2814
2823
|
var j, te;
|
|
2815
2824
|
const t = i.session.prepareSuggestion(u);
|
|
@@ -2818,7 +2827,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2818
2827
|
oe != null && oe.focus ? oe.focus() : (te = (j = oe == null ? void 0 : oe.$el) == null ? void 0 : j.querySelector("input")) == null || te.focus();
|
|
2819
2828
|
return;
|
|
2820
2829
|
}
|
|
2821
|
-
|
|
2830
|
+
zl().activate({
|
|
2822
2831
|
command: t.command,
|
|
2823
2832
|
prompt: l(
|
|
2824
2833
|
u === "description" ? "menu.product.remy.description_prompt" : "menu.product.remy.pricing_prompt",
|
|
@@ -2836,12 +2845,12 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2836
2845
|
typeof t == "string" ? t : ""
|
|
2837
2846
|
);
|
|
2838
2847
|
}
|
|
2839
|
-
|
|
2848
|
+
Ol(() => {
|
|
2840
2849
|
window.addEventListener("apply-pricing", Q), window.addEventListener("apply-description", ee);
|
|
2841
2850
|
}), ke(() => {
|
|
2842
2851
|
window.removeEventListener("apply-pricing", Q), window.removeEventListener("apply-description", ee);
|
|
2843
2852
|
});
|
|
2844
|
-
const a = R(() => i.view),
|
|
2853
|
+
const a = R(() => i.view), p = R(() => i.session);
|
|
2845
2854
|
Ae(
|
|
2846
2855
|
() => {
|
|
2847
2856
|
var u;
|
|
@@ -2855,10 +2864,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2855
2864
|
}
|
|
2856
2865
|
);
|
|
2857
2866
|
function ne(u, t) {
|
|
2858
|
-
|
|
2867
|
+
p.value.setSectionEnabled(u, t);
|
|
2859
2868
|
}
|
|
2860
2869
|
function pe(u) {
|
|
2861
|
-
|
|
2870
|
+
p.value.setVariantGroups(
|
|
2862
2871
|
a.value.variantGroups.filter((t) => t.id !== u).map((t) => t.id)
|
|
2863
2872
|
);
|
|
2864
2873
|
}
|
|
@@ -2867,11 +2876,11 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2867
2876
|
currency: u.unitAmount.currency,
|
|
2868
2877
|
currencyDisplay: "narrowSymbol",
|
|
2869
2878
|
minimumFractionDigits: u.unitAmount.precision
|
|
2870
|
-
}).replaceAll(/\s/g, ""), b =
|
|
2879
|
+
}).replaceAll(/\s/g, ""), b = Y(!1), h = Y("name"), se = Yl();
|
|
2871
2880
|
function de(u = "name") {
|
|
2872
2881
|
var j, te;
|
|
2873
2882
|
const t = u === "name" ? (j = a.value) == null ? void 0 : j.nameTranslation : (te = a.value) == null ? void 0 : te.descriptionTranslation;
|
|
2874
|
-
(t == null ? void 0 : t.state) === "allowed" && (h.value = u,
|
|
2883
|
+
(t == null ? void 0 : t.state) === "allowed" && (h.value = u, p.value.beginTranslationEdit(), b.value = !0);
|
|
2875
2884
|
}
|
|
2876
2885
|
const $e = R(
|
|
2877
2886
|
() => Object.fromEntries(
|
|
@@ -2887,7 +2896,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2887
2896
|
...a.value.additionalCategoryIds
|
|
2888
2897
|
]), Z = R(
|
|
2889
2898
|
() => a.value.formOrderFromOptions.map((u) => ({
|
|
2890
|
-
label: l(u === null ? "menu.product.form.detail.order_from.default" :
|
|
2899
|
+
label: l(u === null ? "menu.product.form.detail.order_from.default" : Ml[u]),
|
|
2891
2900
|
value: u
|
|
2892
2901
|
}))
|
|
2893
2902
|
), N = R(() => [...a.value.priceTierRows]), Ie = R(
|
|
@@ -2902,7 +2911,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2902
2911
|
accessorKey: "amount",
|
|
2903
2912
|
header: () => l("menu.price_tier.form.table.columns.price"),
|
|
2904
2913
|
enableSorting: !1,
|
|
2905
|
-
cell: ({ row: u }) =>
|
|
2914
|
+
cell: ({ row: u }) => X(Ke, {
|
|
2906
2915
|
modelValue: u.original.amount,
|
|
2907
2916
|
"aria-label": l("menu.common.labels.a11y_labelled_name", {
|
|
2908
2917
|
label: l(
|
|
@@ -2910,7 +2919,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2910
2919
|
),
|
|
2911
2920
|
name: u.original.tier
|
|
2912
2921
|
}),
|
|
2913
|
-
"onUpdate:modelValue": (t) =>
|
|
2922
|
+
"onUpdate:modelValue": (t) => p.value.setPriceTierAmount(u.original.tier, t)
|
|
2914
2923
|
})
|
|
2915
2924
|
},
|
|
2916
2925
|
{
|
|
@@ -2919,8 +2928,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2919
2928
|
enableSorting: !1,
|
|
2920
2929
|
cell: ({ row: u }) => {
|
|
2921
2930
|
var t;
|
|
2922
|
-
return
|
|
2923
|
-
|
|
2931
|
+
return X("div", { class: "flex items-center justify-between" }, [
|
|
2932
|
+
X(
|
|
2924
2933
|
B.FmButton,
|
|
2925
2934
|
{
|
|
2926
2935
|
label: l("menu.product.form.member_price.configure.title"),
|
|
@@ -2935,7 +2944,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2935
2944
|
onClick: () => m(void 0, u.original.tier)
|
|
2936
2945
|
},
|
|
2937
2946
|
{
|
|
2938
|
-
default: () =>
|
|
2947
|
+
default: () => X(
|
|
2939
2948
|
"span",
|
|
2940
2949
|
{ class: "underline line-clamp-2 break-all" },
|
|
2941
2950
|
u.original.memberPriceCount ? l(
|
|
@@ -2945,7 +2954,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2945
2954
|
)
|
|
2946
2955
|
}
|
|
2947
2956
|
),
|
|
2948
|
-
|
|
2957
|
+
X(nl, {
|
|
2949
2958
|
prices: u.original.memberPrices,
|
|
2950
2959
|
currency: (t = a.value.summary.sellingPrice) == null ? void 0 : t.currency
|
|
2951
2960
|
})
|
|
@@ -2974,7 +2983,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2974
2983
|
enableSorting: !1,
|
|
2975
2984
|
cell: (u) => {
|
|
2976
2985
|
const t = u.row.original;
|
|
2977
|
-
return
|
|
2986
|
+
return X(ge, {
|
|
2978
2987
|
modelValue: t.code ?? "",
|
|
2979
2988
|
placeholder: t.inheritedCode || l("menu.product.form.variant.placeholders.no_code"),
|
|
2980
2989
|
"aria-label": l("menu.common.labels.a11y_labelled_name", {
|
|
@@ -2982,7 +2991,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2982
2991
|
name: t.label
|
|
2983
2992
|
}),
|
|
2984
2993
|
errorMessages: t.codeIssue ? [v(t.codeIssue)] : [],
|
|
2985
|
-
"onUpdate:modelValue": (j) =>
|
|
2994
|
+
"onUpdate:modelValue": (j) => p.value.setCombination(t.key, {
|
|
2986
2995
|
code: String(j ?? "")
|
|
2987
2996
|
})
|
|
2988
2997
|
});
|
|
@@ -2994,7 +3003,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
2994
3003
|
enableSorting: !1,
|
|
2995
3004
|
cell: (u) => {
|
|
2996
3005
|
const t = u.row.original;
|
|
2997
|
-
return
|
|
3006
|
+
return X(
|
|
2998
3007
|
"div",
|
|
2999
3008
|
{
|
|
3000
3009
|
"aria-label": l("menu.common.labels.a11y_labelled_name", {
|
|
@@ -3004,7 +3013,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3004
3013
|
role: "combobox"
|
|
3005
3014
|
},
|
|
3006
3015
|
[
|
|
3007
|
-
|
|
3016
|
+
X(B.FmSelect, {
|
|
3008
3017
|
items: [
|
|
3009
3018
|
{
|
|
3010
3019
|
label: l(
|
|
@@ -3023,7 +3032,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3023
3032
|
name: t.label
|
|
3024
3033
|
}),
|
|
3025
3034
|
shiftMenu: !0,
|
|
3026
|
-
"onUpdate:modelValue": (j) =>
|
|
3035
|
+
"onUpdate:modelValue": (j) => p.value.setCombination(t.key, {
|
|
3027
3036
|
orderFrom: j ?? null
|
|
3028
3037
|
})
|
|
3029
3038
|
})
|
|
@@ -3045,14 +3054,14 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3045
3054
|
cell: ({ row: u }) => {
|
|
3046
3055
|
var j;
|
|
3047
3056
|
const t = u.original;
|
|
3048
|
-
return
|
|
3057
|
+
return X(
|
|
3049
3058
|
"div",
|
|
3050
3059
|
{
|
|
3051
3060
|
class: "flex items-center gap-8",
|
|
3052
3061
|
"data-product-combination-key": t.key
|
|
3053
3062
|
},
|
|
3054
3063
|
[
|
|
3055
|
-
|
|
3064
|
+
X(Ke, {
|
|
3056
3065
|
modelValue: t.priceAmount,
|
|
3057
3066
|
disabled: a.value.editPrice.state !== "allowed",
|
|
3058
3067
|
placeholder: Ge(t.inheritedPriceAmount),
|
|
@@ -3060,11 +3069,11 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3060
3069
|
label: l("menu.product.form.variant.input_labels.price"),
|
|
3061
3070
|
name: t.label
|
|
3062
3071
|
}),
|
|
3063
|
-
"onUpdate:modelValue": (te) =>
|
|
3072
|
+
"onUpdate:modelValue": (te) => p.value.setCombination(t.key, { priceAmount: te })
|
|
3064
3073
|
}),
|
|
3065
3074
|
...a.value.showVariantMemberPricing ? [
|
|
3066
|
-
|
|
3067
|
-
|
|
3075
|
+
X("div", { class: "flex items-center gap-8" }, [
|
|
3076
|
+
X(
|
|
3068
3077
|
B.FmButton,
|
|
3069
3078
|
{
|
|
3070
3079
|
variant: Ne.Plain,
|
|
@@ -3090,7 +3099,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3090
3099
|
onClick: () => m(t.key)
|
|
3091
3100
|
},
|
|
3092
3101
|
{
|
|
3093
|
-
default: () =>
|
|
3102
|
+
default: () => X(
|
|
3094
3103
|
"span",
|
|
3095
3104
|
{
|
|
3096
3105
|
class: "underline line-clamp-2 break-all"
|
|
@@ -3112,21 +3121,21 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3112
3121
|
// Price column past the table's equal 150px split (measured
|
|
3113
3122
|
// 302.5 vs 257.1 per other column, 2026-09-26 probe); on the
|
|
3114
3123
|
// product page it narrows the price input beside it.
|
|
3115
|
-
|
|
3116
|
-
|
|
3124
|
+
X("div", { "aria-hidden": "true" }),
|
|
3125
|
+
X(nl, {
|
|
3117
3126
|
prices: t.memberPrices,
|
|
3118
3127
|
currency: (j = a.value.summary.sellingPrice) == null ? void 0 : j.currency
|
|
3119
3128
|
})
|
|
3120
3129
|
]),
|
|
3121
3130
|
...a.value.isOverride ? [] : [
|
|
3122
|
-
|
|
3131
|
+
X(ua, {
|
|
3123
3132
|
configured: t.priceTierCount > 0,
|
|
3124
3133
|
label: l("menu.common.labels.a11y_labelled_name", {
|
|
3125
3134
|
label: l("menu.price_tier.price_group"),
|
|
3126
3135
|
name: t.label
|
|
3127
3136
|
}),
|
|
3128
3137
|
onOpen: () => {
|
|
3129
|
-
P(), C.value =
|
|
3138
|
+
P(), C.value = p.value.pricingEditor(
|
|
3130
3139
|
"tiers",
|
|
3131
3140
|
t.key
|
|
3132
3141
|
);
|
|
@@ -3142,7 +3151,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3142
3151
|
accessorKey: "minPriceAmount",
|
|
3143
3152
|
header: () => l("menu.product.form.variant.columns.min_price"),
|
|
3144
3153
|
enableSorting: !1,
|
|
3145
|
-
cell: ({ row: u }) =>
|
|
3154
|
+
cell: ({ row: u }) => X(Ke, {
|
|
3146
3155
|
modelValue: u.original.minPriceAmount,
|
|
3147
3156
|
placeholder: Ge(u.original.inheritedMinPriceAmount),
|
|
3148
3157
|
"aria-label": l("menu.common.labels.a11y_labelled_name", {
|
|
@@ -3150,7 +3159,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3150
3159
|
name: u.original.label
|
|
3151
3160
|
}),
|
|
3152
3161
|
errorMessages: u.original.minPriceIssue ? [v(u.original.minPriceIssue)] : [],
|
|
3153
|
-
"onUpdate:modelValue": (t) =>
|
|
3162
|
+
"onUpdate:modelValue": (t) => p.value.setCombination(u.original.key, {
|
|
3154
3163
|
minPriceAmount: t
|
|
3155
3164
|
})
|
|
3156
3165
|
})
|
|
@@ -3192,11 +3201,11 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3192
3201
|
enableSorting: !1,
|
|
3193
3202
|
cell: (u) => {
|
|
3194
3203
|
const t = u.row.original;
|
|
3195
|
-
return
|
|
3204
|
+
return X(
|
|
3196
3205
|
"div",
|
|
3197
3206
|
{ class: "flex justify-end", "data-product-group-id": t.id },
|
|
3198
3207
|
[
|
|
3199
|
-
|
|
3208
|
+
X(B.FmButton, {
|
|
3200
3209
|
icon: "delete",
|
|
3201
3210
|
variant: Ne.Tertiary,
|
|
3202
3211
|
textColor: "neutral-gray-400",
|
|
@@ -3204,9 +3213,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3204
3213
|
label: l("menu.product.form.group.actions.detach"),
|
|
3205
3214
|
name: t.label
|
|
3206
3215
|
}),
|
|
3207
|
-
onClick: () =>
|
|
3216
|
+
onClick: () => p.value.removeGroup(t.id)
|
|
3208
3217
|
}),
|
|
3209
|
-
|
|
3218
|
+
X(B.FmButton, {
|
|
3210
3219
|
icon: "edit",
|
|
3211
3220
|
variant: Ne.Tertiary,
|
|
3212
3221
|
textColor: "neutral-gray-400",
|
|
@@ -3224,16 +3233,16 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3224
3233
|
);
|
|
3225
3234
|
}
|
|
3226
3235
|
}
|
|
3227
|
-
]), J =
|
|
3236
|
+
]), J = Y(!1), we = ye(
|
|
3228
3237
|
null
|
|
3229
3238
|
);
|
|
3230
3239
|
let z = null, D = null;
|
|
3231
|
-
function
|
|
3240
|
+
function W() {
|
|
3232
3241
|
D == null || D(), D = null, z == null || z.dispose(), z = null, we.value = null, J.value = !1;
|
|
3233
3242
|
}
|
|
3234
3243
|
function ie(u) {
|
|
3235
3244
|
if (u.edit.state !== "allowed") return;
|
|
3236
|
-
|
|
3245
|
+
W();
|
|
3237
3246
|
const t = i.session.groupEditor(u.id);
|
|
3238
3247
|
z = t, we.value = t.get(), D = t.subscribe((j) => {
|
|
3239
3248
|
we.value = j;
|
|
@@ -3245,8 +3254,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3245
3254
|
return ((u = we.value) == null ? void 0 : u.status) === "ready" ? we.value.value : null;
|
|
3246
3255
|
}
|
|
3247
3256
|
);
|
|
3248
|
-
ke(
|
|
3249
|
-
const
|
|
3257
|
+
ke(W);
|
|
3258
|
+
const We = R(
|
|
3250
3259
|
() => a.value.inventoryRows.map((u) => ({
|
|
3251
3260
|
_id: u.key,
|
|
3252
3261
|
name: u.label,
|
|
@@ -3258,17 +3267,17 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3258
3267
|
var u;
|
|
3259
3268
|
(u = De.value) == null || u.dispose(), De.value = null;
|
|
3260
3269
|
}
|
|
3261
|
-
function
|
|
3262
|
-
je(), De.value =
|
|
3270
|
+
function Gl(u) {
|
|
3271
|
+
je(), De.value = p.value.inventoryEditor(u._id);
|
|
3263
3272
|
}
|
|
3264
3273
|
ke(je);
|
|
3265
|
-
const vl =
|
|
3274
|
+
const vl = Y(null);
|
|
3266
3275
|
async function bl() {
|
|
3267
3276
|
await Je();
|
|
3268
3277
|
const u = vl.value;
|
|
3269
3278
|
if (!u) return;
|
|
3270
3279
|
const t = u.querySelectorAll("tbody tr");
|
|
3271
|
-
|
|
3280
|
+
We.value.forEach((j, te) => {
|
|
3272
3281
|
var al;
|
|
3273
3282
|
const oe = (al = t[te]) == null ? void 0 : al.querySelectorAll("button"), Ve = oe == null ? void 0 : oe[oe.length - 1];
|
|
3274
3283
|
Ve && !Ve.getAttribute("aria-label") && Ve.setAttribute(
|
|
@@ -3280,10 +3289,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3280
3289
|
);
|
|
3281
3290
|
});
|
|
3282
3291
|
}
|
|
3283
|
-
Ae(
|
|
3292
|
+
Ae(We, bl, {
|
|
3284
3293
|
immediate: !0
|
|
3285
3294
|
});
|
|
3286
|
-
const
|
|
3295
|
+
const jl = R(() => [
|
|
3287
3296
|
{
|
|
3288
3297
|
accessorKey: "label",
|
|
3289
3298
|
header: () => a.value.combinations.length > 0 ? l("menu.product.form.takeaway.columns.variant") : l("menu.product.form.takeaway.columns.product"),
|
|
@@ -3298,14 +3307,14 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3298
3307
|
label: l("menu.product.form.takeaway.columns.takeaway"),
|
|
3299
3308
|
name: t.label
|
|
3300
3309
|
});
|
|
3301
|
-
return
|
|
3310
|
+
return X(
|
|
3302
3311
|
"div",
|
|
3303
3312
|
{
|
|
3304
3313
|
"aria-label": j,
|
|
3305
3314
|
role: "combobox"
|
|
3306
3315
|
},
|
|
3307
3316
|
[
|
|
3308
|
-
|
|
3317
|
+
X(
|
|
3309
3318
|
B.FmSelect,
|
|
3310
3319
|
{
|
|
3311
3320
|
items: [
|
|
@@ -3321,14 +3330,14 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3321
3330
|
modelValue: t.takeawayId,
|
|
3322
3331
|
shiftMenu: !0,
|
|
3323
3332
|
"aria-label": j,
|
|
3324
|
-
"onUpdate:modelValue": (te) => t.key ?
|
|
3333
|
+
"onUpdate:modelValue": (te) => t.key ? p.value.setCombination(t.key, {
|
|
3325
3334
|
takeawayId: te
|
|
3326
|
-
}) :
|
|
3335
|
+
}) : p.value.setTakeaway(te)
|
|
3327
3336
|
},
|
|
3328
3337
|
{
|
|
3329
3338
|
// Legacy appends the same "Add new" row to this menu
|
|
3330
3339
|
// (`ProductTakeaway.vue:108-128`).
|
|
3331
|
-
"append-menu": () =>
|
|
3340
|
+
"append-menu": () => X(B.FmButton, {
|
|
3332
3341
|
variant: Ne.Plain,
|
|
3333
3342
|
prependIcon: "add",
|
|
3334
3343
|
class: "w-full justify-start",
|
|
@@ -3341,14 +3350,14 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3341
3350
|
);
|
|
3342
3351
|
}
|
|
3343
3352
|
}
|
|
3344
|
-
]),
|
|
3353
|
+
]), Kl = R(() => [
|
|
3345
3354
|
{
|
|
3346
3355
|
accessorKey: "isDefault",
|
|
3347
3356
|
header: () => l("menu.product.form.order_pacing.time_presets.columns.default"),
|
|
3348
3357
|
size: 75,
|
|
3349
3358
|
cell: (u) => {
|
|
3350
3359
|
const t = u.row.original;
|
|
3351
|
-
return
|
|
3360
|
+
return X(B.FmCheckbox, {
|
|
3352
3361
|
modelValue: t.isDefault,
|
|
3353
3362
|
value: "",
|
|
3354
3363
|
"aria-label": l("menu.common.labels.a11y_labelled_name", {
|
|
@@ -3357,7 +3366,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3357
3366
|
),
|
|
3358
3367
|
name: t.label
|
|
3359
3368
|
}),
|
|
3360
|
-
"onUpdate:modelValue": (j) =>
|
|
3369
|
+
"onUpdate:modelValue": (j) => p.value.setServeDelayDefault(t.id, j)
|
|
3361
3370
|
});
|
|
3362
3371
|
}
|
|
3363
3372
|
},
|
|
@@ -3370,7 +3379,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3370
3379
|
header: () => l("menu.product.form.order_pacing.time_presets.columns.delay"),
|
|
3371
3380
|
cell: (u) => $(u.getValue())
|
|
3372
3381
|
}
|
|
3373
|
-
]), fl =
|
|
3382
|
+
]), fl = Y(null), Ql = la(fl), xe = (u) => {
|
|
3374
3383
|
var t;
|
|
3375
3384
|
return (t = i.validation) == null ? void 0 : t.touch(u);
|
|
3376
3385
|
};
|
|
@@ -3396,7 +3405,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3396
3405
|
return t != null && t.length ? i.validation ? i.validation.issue(a.value.fieldIssues, u) ?? void 0 : t[0] : a.value.issues.find((te) => te.field === u);
|
|
3397
3406
|
}, gl = R(
|
|
3398
3407
|
() => ue("name") ?? a.value.nameIssue
|
|
3399
|
-
), yl =
|
|
3408
|
+
), yl = Y();
|
|
3400
3409
|
return Ae(
|
|
3401
3410
|
() => ue("category"),
|
|
3402
3411
|
(u) => {
|
|
@@ -3406,14 +3415,14 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3406
3415
|
{ flush: "pre" }
|
|
3407
3416
|
), (u, t) => {
|
|
3408
3417
|
var xl;
|
|
3409
|
-
const j = M("FmBreadcrumb"), te = M("FmSelect"), oe = M("FmButton"), Ve = M("FmTooltip"), al = M("FmTextarea"), tl = M("FmRadio"),
|
|
3418
|
+
const j = M("FmBreadcrumb"), te = M("FmSelect"), oe = M("FmButton"), Ve = M("FmTooltip"), al = M("FmTextarea"), tl = M("FmRadio"), Xl = M("FmSnackbar"), _l = M("FmRadioGroup"), hl = M("FmFormGroup"), kl = M("FmStepperField"), Hl = M("FmIcon"), Ze = M("FmTable"), Me = M("FmCheckbox"), wl = M("FmSwitch");
|
|
3410
3419
|
return r(), S(re, null, [
|
|
3411
3420
|
n("div", {
|
|
3412
3421
|
ref_key: "formRoot",
|
|
3413
3422
|
ref: x,
|
|
3414
3423
|
class: Be(["flex space-x-40 mx-auto w-full xs:space-x-0", u.presentation === "tree" ? "tree-item-form" : "max-w-[1200px]"])
|
|
3415
3424
|
}, [
|
|
3416
|
-
n("div",
|
|
3425
|
+
n("div", ln, [
|
|
3417
3426
|
u.presentation === "tree" ? (r(), T(j, {
|
|
3418
3427
|
key: 0,
|
|
3419
3428
|
ref_key: "breadcrumb",
|
|
@@ -3426,12 +3435,12 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3426
3435
|
"aria-label": e(l)("menu.catalog_scheduler.title"),
|
|
3427
3436
|
class: "space-y-24 p-16 border-fm-color-neutral-gray-200 fm-corner-radius-lg border"
|
|
3428
3437
|
}, [
|
|
3429
|
-
n("div",
|
|
3430
|
-
n("div",
|
|
3431
|
-
n("div",
|
|
3438
|
+
n("div", tn, [
|
|
3439
|
+
n("div", on, I(e(l)("menu.catalog_scheduler.title")), 1),
|
|
3440
|
+
n("div", nn, I(e(l)("menu.catalog_scheduler.subtitle")), 1)
|
|
3432
3441
|
]),
|
|
3433
|
-
n("div",
|
|
3434
|
-
n("div",
|
|
3442
|
+
n("div", sn, [
|
|
3443
|
+
n("div", rn, [
|
|
3435
3444
|
s(te, {
|
|
3436
3445
|
label: e(l)("menu.common.labels.catalog"),
|
|
3437
3446
|
"aria-label": e(l)("menu.common.labels.catalog"),
|
|
@@ -3446,7 +3455,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3446
3455
|
}))
|
|
3447
3456
|
}, null, 8, ["label", "aria-label", "items", "model-value"])
|
|
3448
3457
|
]),
|
|
3449
|
-
n("div",
|
|
3458
|
+
n("div", un, [
|
|
3450
3459
|
n("div", {
|
|
3451
3460
|
role: "combobox",
|
|
3452
3461
|
"aria-label": e(l)("menu.common.labels.scheduler")
|
|
@@ -3463,11 +3472,11 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3463
3472
|
schedulerId: K ?? null
|
|
3464
3473
|
}))
|
|
3465
3474
|
}, null, 8, ["label", "aria-label", "items", "model-value"])
|
|
3466
|
-
], 8,
|
|
3475
|
+
], 8, dn)
|
|
3467
3476
|
])
|
|
3468
3477
|
])
|
|
3469
|
-
], 8,
|
|
3470
|
-
s(
|
|
3478
|
+
], 8, an)) : y("", !0),
|
|
3479
|
+
s(ca, { sdk: u.sdk }, null, 8, ["sdk"]),
|
|
3471
3480
|
s(Te, {
|
|
3472
3481
|
section: a.value.sections.general,
|
|
3473
3482
|
title: e(l)("menu.product.form.detail.title"),
|
|
@@ -3476,12 +3485,12 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3476
3485
|
"toggle-label": e(l)("menu.product.form.sections.general.description"),
|
|
3477
3486
|
"onUpdate:enabled": t[22] || (t[22] = (K) => ne("general", K))
|
|
3478
3487
|
}, {
|
|
3479
|
-
default:
|
|
3488
|
+
default: c(() => {
|
|
3480
3489
|
var K, me, ae, Se;
|
|
3481
3490
|
return [
|
|
3482
|
-
n("div",
|
|
3483
|
-
n("div",
|
|
3484
|
-
n("div",
|
|
3491
|
+
n("div", mn, [
|
|
3492
|
+
n("div", cn, [
|
|
3493
|
+
n("div", pn, [
|
|
3485
3494
|
s(ge, Ce({
|
|
3486
3495
|
label: e(l)("menu.product.form.detail.fields.code.label"),
|
|
3487
3496
|
"model-value": a.value.code,
|
|
@@ -3492,11 +3501,11 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3492
3501
|
count: a.value.duplicateCodeCount
|
|
3493
3502
|
}) : ""
|
|
3494
3503
|
}, Re("code"), {
|
|
3495
|
-
"onUpdate:modelValue": t[2] || (t[2] = (U) => (xe("code"),
|
|
3496
|
-
onFocusChanged: t[3] || (t[3] = (U) => !U &&
|
|
3504
|
+
"onUpdate:modelValue": t[2] || (t[2] = (U) => (xe("code"), p.value.setCode(String(U ?? "")))),
|
|
3505
|
+
onFocusChanged: t[3] || (t[3] = (U) => !U && p.value.normalizeTextField("code"))
|
|
3497
3506
|
}), null, 16, ["label", "model-value", "disabled", "placeholder", "error-messages", "helper-text"])
|
|
3498
3507
|
]),
|
|
3499
|
-
n("div",
|
|
3508
|
+
n("div", vn, [
|
|
3500
3509
|
s(ge, {
|
|
3501
3510
|
label: e(l)("menu.product.form.detail.fields.name.label"),
|
|
3502
3511
|
"label-mark": "required",
|
|
@@ -3511,17 +3520,17 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3511
3520
|
"menu.product.form.detail.fields.name.duplicate_warning",
|
|
3512
3521
|
{ count: a.value.duplicateNameCount }
|
|
3513
3522
|
) : "",
|
|
3514
|
-
"onUpdate:modelValue": t[5] || (t[5] = (U) => (xe("name"),
|
|
3523
|
+
"onUpdate:modelValue": t[5] || (t[5] = (U) => (xe("name"), p.value.setName(String(U ?? "")))),
|
|
3515
3524
|
onFocusChanged: t[6] || (t[6] = (U) => !U && xe("name"))
|
|
3516
3525
|
}, {
|
|
3517
|
-
append:
|
|
3526
|
+
append: c(() => [
|
|
3518
3527
|
s(Ve, {
|
|
3519
3528
|
variant: "plain",
|
|
3520
3529
|
placement: "top",
|
|
3521
3530
|
"z-index": 999
|
|
3522
3531
|
}, {
|
|
3523
|
-
content:
|
|
3524
|
-
n("div",
|
|
3532
|
+
content: c(() => [
|
|
3533
|
+
n("div", bn, [
|
|
3525
3534
|
(r(!0), S(re, null, Fe(a.value.nameTranslationTooltip, (U) => (r(), S("div", {
|
|
3526
3535
|
key: U.locale
|
|
3527
3536
|
}, I(e(l)("menu.common.translation.tooltip_value", {
|
|
@@ -3530,7 +3539,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3530
3539
|
})), 1))), 128))
|
|
3531
3540
|
])
|
|
3532
3541
|
]),
|
|
3533
|
-
default:
|
|
3542
|
+
default: c(() => [
|
|
3534
3543
|
s(oe, {
|
|
3535
3544
|
disabled: a.value.nameTranslation.state !== "allowed",
|
|
3536
3545
|
icon: "g_translate",
|
|
@@ -3554,33 +3563,34 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3554
3563
|
"helper-text": a.value.duplicateName2Count > 0 ? e(l)("menu.product.form.detail.fields.name2.duplicate_warning", {
|
|
3555
3564
|
count: a.value.duplicateName2Count
|
|
3556
3565
|
}) : "",
|
|
3557
|
-
"onUpdate:modelValue": t[7] || (t[7] = (U) =>
|
|
3558
|
-
onFocusChanged: t[8] || (t[8] = (U) => !U &&
|
|
3566
|
+
"onUpdate:modelValue": t[7] || (t[7] = (U) => p.value.setName2(String(U ?? ""))),
|
|
3567
|
+
onFocusChanged: t[8] || (t[8] = (U) => !U && p.value.normalizeTextField("name2"))
|
|
3559
3568
|
}, null, 8, ["label", "model-value", "disabled", "placeholder", "helper-text"]),
|
|
3560
|
-
n("div",
|
|
3569
|
+
n("div", fn, [
|
|
3561
3570
|
s(al, {
|
|
3571
|
+
class: "description",
|
|
3562
3572
|
"model-value": a.value.description,
|
|
3563
3573
|
disabled: a.value.editIdentity.state !== "allowed",
|
|
3564
3574
|
placeholder: ((Se = a.value.inherited) == null ? void 0 : Se.description) || e(l)("menu.product.form.detail.fields.description.placeholder"),
|
|
3565
|
-
"onUpdate:modelValue": t[9] || (t[9] = (U) =>
|
|
3566
|
-
onFocusout: t[10] || (t[10] = (U) =>
|
|
3575
|
+
"onUpdate:modelValue": t[9] || (t[9] = (U) => p.value.setDescription(String(U ?? ""))),
|
|
3576
|
+
onFocusout: t[10] || (t[10] = (U) => p.value.normalizeTextField("description"))
|
|
3567
3577
|
}, {
|
|
3568
|
-
label:
|
|
3569
|
-
n("p",
|
|
3578
|
+
label: c(() => [
|
|
3579
|
+
n("p", gn, [
|
|
3570
3580
|
sl(I(e(l)("menu.product.form.detail.fields.description.label")) + " ", 1),
|
|
3571
|
-
n("span",
|
|
3581
|
+
n("span", yn, I(e(l)("menu.product.form.detail.fields.description.optional")), 1)
|
|
3572
3582
|
])
|
|
3573
3583
|
]),
|
|
3574
3584
|
_: 1
|
|
3575
3585
|
}, 8, ["model-value", "disabled", "placeholder"]),
|
|
3576
|
-
n("div",
|
|
3586
|
+
n("div", _n, [
|
|
3577
3587
|
s(Ve, {
|
|
3578
3588
|
variant: "plain",
|
|
3579
3589
|
placement: "top",
|
|
3580
3590
|
"z-index": 999
|
|
3581
3591
|
}, {
|
|
3582
|
-
content:
|
|
3583
|
-
n("div",
|
|
3592
|
+
content: c(() => [
|
|
3593
|
+
n("div", hn, [
|
|
3584
3594
|
(r(!0), S(re, null, Fe(a.value.descriptionTranslationTooltip, (U) => (r(), S("div", {
|
|
3585
3595
|
key: U.locale
|
|
3586
3596
|
}, I(e(l)("menu.common.translation.tooltip_value", {
|
|
@@ -3589,7 +3599,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3589
3599
|
})), 1))), 128))
|
|
3590
3600
|
])
|
|
3591
3601
|
]),
|
|
3592
|
-
default:
|
|
3602
|
+
default: c(() => [
|
|
3593
3603
|
s(oe, {
|
|
3594
3604
|
disabled: a.value.descriptionTranslation.state !== "allowed",
|
|
3595
3605
|
icon: "g_translate",
|
|
@@ -3606,7 +3616,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3606
3616
|
}, null, 8, ["aria-label"])
|
|
3607
3617
|
])
|
|
3608
3618
|
]),
|
|
3609
|
-
s(
|
|
3619
|
+
s(Ut, {
|
|
3610
3620
|
sdk: i.sdk,
|
|
3611
3621
|
target: i.session.images
|
|
3612
3622
|
}, null, 8, ["sdk", "target"])
|
|
@@ -3614,16 +3624,16 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3614
3624
|
s(Oe, {
|
|
3615
3625
|
label: a.value.categoryLabel === "plural" ? e(l)("menu.product.form.detail.category.label") : e(l)("menu.product.form.detail.category.label_singular")
|
|
3616
3626
|
}, {
|
|
3617
|
-
default:
|
|
3627
|
+
default: c(() => [
|
|
3618
3628
|
a.value.canChooseAddon ? (r(), T(_l, {
|
|
3619
3629
|
key: 0,
|
|
3620
3630
|
"model-value": fe.value,
|
|
3621
3631
|
disabled: a.value.editClassification.state !== "allowed",
|
|
3622
|
-
"onUpdate:modelValue": t[16] || (t[16] = (U) =>
|
|
3632
|
+
"onUpdate:modelValue": t[16] || (t[16] = (U) => p.value.setAddon(U === "ADD_ON"))
|
|
3623
3633
|
}, {
|
|
3624
|
-
default:
|
|
3625
|
-
n("div",
|
|
3626
|
-
n("div",
|
|
3634
|
+
default: c(() => [
|
|
3635
|
+
n("div", kn, [
|
|
3636
|
+
n("div", wn, [
|
|
3627
3637
|
s(tl, {
|
|
3628
3638
|
value: "PRODUCT",
|
|
3629
3639
|
disabled: a.value.categoryOptions.length === 0,
|
|
@@ -3632,8 +3642,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3632
3642
|
"menu.product.form.detail.category.options.product.sublabel"
|
|
3633
3643
|
)
|
|
3634
3644
|
}, null, 8, ["disabled", "label", "sublabel"]),
|
|
3635
|
-
ul((r(), S("div",
|
|
3636
|
-
a.value.showCategoryMultiselect ? (r(), T(
|
|
3645
|
+
ul((r(), S("div", xn, [
|
|
3646
|
+
a.value.showCategoryMultiselect ? (r(), T(xo, {
|
|
3637
3647
|
key: 0,
|
|
3638
3648
|
items: a.value.categoryOptions.map((U) => ({
|
|
3639
3649
|
label: U.label,
|
|
@@ -3642,7 +3652,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3642
3652
|
disabled: a.value.editClassification.state !== "allowed" || a.value.isAddon,
|
|
3643
3653
|
"model-value": q.value,
|
|
3644
3654
|
placeholder: e(l)("menu.product.form.detail.category.placeholder"),
|
|
3645
|
-
"onUpdate:modelValue": t[13] || (t[13] = (U) =>
|
|
3655
|
+
"onUpdate:modelValue": t[13] || (t[13] = (U) => p.value.setCategories(U)),
|
|
3646
3656
|
onCreate: t[14] || (t[14] = (U) => o("create-entity", "category"))
|
|
3647
3657
|
}, null, 8, ["items", "disabled", "model-value", "placeholder"])) : y("", !0)
|
|
3648
3658
|
])), [
|
|
@@ -3652,8 +3662,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3652
3662
|
]
|
|
3653
3663
|
])
|
|
3654
3664
|
]),
|
|
3655
|
-
a.value.categoryOptions.length === 0 ? (r(), S("div",
|
|
3656
|
-
s(
|
|
3665
|
+
a.value.categoryOptions.length === 0 ? (r(), S("div", Cn, [
|
|
3666
|
+
s(Xl, {
|
|
3657
3667
|
title: e(l)("menu.product.form.detail.category.add_first"),
|
|
3658
3668
|
variant: "info"
|
|
3659
3669
|
}, null, 8, ["title"]),
|
|
@@ -3680,10 +3690,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3680
3690
|
"model-value": a.value.categoryId,
|
|
3681
3691
|
"error-messages": ue("category") ? [e(v)(ue("category"))] : []
|
|
3682
3692
|
}, {
|
|
3683
|
-
default:
|
|
3684
|
-
s(
|
|
3693
|
+
default: c(() => [
|
|
3694
|
+
s(Po, {
|
|
3685
3695
|
view: a.value,
|
|
3686
|
-
session:
|
|
3696
|
+
session: p.value,
|
|
3687
3697
|
onCreate: t[17] || (t[17] = (U) => o("create-entity", "category"))
|
|
3688
3698
|
}, null, 8, ["view", "session"])
|
|
3689
3699
|
]),
|
|
@@ -3696,7 +3706,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3696
3706
|
key: 0,
|
|
3697
3707
|
label: e(l)("menu.product.form.detail.path.label")
|
|
3698
3708
|
}, {
|
|
3699
|
-
default:
|
|
3709
|
+
default: c(() => [
|
|
3700
3710
|
ul((r(), S("div", null, [
|
|
3701
3711
|
s(te, {
|
|
3702
3712
|
items: a.value.subcategoryOptions.map((U) => ({
|
|
@@ -3708,9 +3718,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3708
3718
|
disabled: a.value.editClassification.state !== "allowed",
|
|
3709
3719
|
"model-value": [...a.value.subcategoryIds],
|
|
3710
3720
|
placeholder: a.value.inheritedSubcategoryLabel ?? e(l)("menu.product.form.detail.path.placeholder"),
|
|
3711
|
-
"onUpdate:modelValue": t[19] || (t[19] = (U) =>
|
|
3721
|
+
"onUpdate:modelValue": t[19] || (t[19] = (U) => p.value.setSubcategories(U ?? []))
|
|
3712
3722
|
}, cl({
|
|
3713
|
-
"append-menu":
|
|
3723
|
+
"append-menu": c(() => [
|
|
3714
3724
|
s(oe, {
|
|
3715
3725
|
variant: "plain",
|
|
3716
3726
|
size: "lg",
|
|
@@ -3725,7 +3735,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3725
3735
|
}, [
|
|
3726
3736
|
a.value.subcategoryIds.length ? {
|
|
3727
3737
|
name: "default",
|
|
3728
|
-
fn:
|
|
3738
|
+
fn: c(() => [
|
|
3729
3739
|
n("div", {
|
|
3730
3740
|
class: Be([
|
|
3731
3741
|
"break-all fm-typo-en-body-lg-400 line-clamp-1",
|
|
@@ -3749,41 +3759,41 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3749
3759
|
]),
|
|
3750
3760
|
_: 1
|
|
3751
3761
|
}, 8, ["label"])) : y("", !0),
|
|
3752
|
-
a.value.showAdvancedFields ? (r(), S("div",
|
|
3762
|
+
a.value.showAdvancedFields ? (r(), S("div", Fn, [
|
|
3753
3763
|
s(kl, {
|
|
3754
3764
|
label: e(l)("menu.product.form.detail.fields.shelf_life.label"),
|
|
3755
3765
|
"model-value": a.value.shelfLifeMinutes,
|
|
3756
|
-
"onUpdate:modelValue": t[20] || (t[20] = (U) =>
|
|
3766
|
+
"onUpdate:modelValue": t[20] || (t[20] = (U) => p.value.setShelfLifeMinutes(le(U)))
|
|
3757
3767
|
}, null, 8, ["label", "model-value"]),
|
|
3758
3768
|
s(qe, {
|
|
3759
3769
|
title: e(l)("menu.product.form.item_quantity.title"),
|
|
3760
3770
|
"sub-title": e(l)("menu.product.form.item_quantity.subtitle")
|
|
3761
3771
|
}, {
|
|
3762
|
-
default:
|
|
3763
|
-
n("div",
|
|
3772
|
+
default: c(() => [
|
|
3773
|
+
n("div", $n, [
|
|
3764
3774
|
(r(), S(re, null, Fe(["perBill", "perOrderSession"], (U) => n("div", {
|
|
3765
3775
|
key: U,
|
|
3766
3776
|
class: "flex flex-col gap-16 p-16 border-b last:border-b-0 border-fm-color-neutral-gray-100"
|
|
3767
3777
|
}, [
|
|
3768
|
-
n("div",
|
|
3769
|
-
s(
|
|
3778
|
+
n("div", Sn, [
|
|
3779
|
+
s(Hl, {
|
|
3770
3780
|
name: U === "perBill" ? "request_quote" : "schedule",
|
|
3771
3781
|
size: "md",
|
|
3772
3782
|
outline: ""
|
|
3773
3783
|
}, null, 8, ["name"]),
|
|
3774
|
-
n("div",
|
|
3775
|
-
n("p",
|
|
3784
|
+
n("div", Vn, [
|
|
3785
|
+
n("p", Pn, I(e(l)(
|
|
3776
3786
|
U === "perBill" ? "menu.product.form.item_quantity.scopes.per_bill.title" : "menu.product.form.item_quantity.scopes.per_order_session.title"
|
|
3777
3787
|
)), 1),
|
|
3778
|
-
n("p",
|
|
3788
|
+
n("p", Un, I(e(l)(
|
|
3779
3789
|
U === "perBill" ? "menu.product.form.item_quantity.scopes.per_bill.description" : "menu.product.form.item_quantity.scopes.per_order_session.description"
|
|
3780
3790
|
)), 1)
|
|
3781
3791
|
])
|
|
3782
3792
|
]),
|
|
3783
|
-
n("div",
|
|
3793
|
+
n("div", In, [
|
|
3784
3794
|
(r(), S(re, null, Fe(["min", "max"], (he) => {
|
|
3785
3795
|
var ol;
|
|
3786
|
-
return s(
|
|
3796
|
+
return s(Et, {
|
|
3787
3797
|
key: he,
|
|
3788
3798
|
label: e(l)(
|
|
3789
3799
|
he === "min" ? "menu.product.form.item_quantity.fields.min.label" : "menu.product.form.item_quantity.fields.max.label"
|
|
@@ -3807,7 +3817,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3807
3817
|
issue: ue(`orderQuantity.${U}.${he}`),
|
|
3808
3818
|
"onUpdate:modelValue": (rl) => {
|
|
3809
3819
|
var Cl, Fl;
|
|
3810
|
-
return xe(`orderQuantity.${U}.${he}`),
|
|
3820
|
+
return xe(`orderQuantity.${U}.${he}`), p.value.setOrderQuantity({
|
|
3811
3821
|
...a.value.orderQuantity,
|
|
3812
3822
|
[U]: {
|
|
3813
3823
|
min: ((Cl = a.value.orderQuantity[U]) == null ? void 0 : Cl.min) ?? null,
|
|
@@ -3816,7 +3826,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3816
3826
|
}
|
|
3817
3827
|
});
|
|
3818
3828
|
},
|
|
3819
|
-
"onUpdate:enabled": (rl) => (xe(`orderQuantity.${U}.${he}`),
|
|
3829
|
+
"onUpdate:enabled": (rl) => (xe(`orderQuantity.${U}.${he}`), p.value.setOrderQuantityBoundEnabled(
|
|
3820
3830
|
U,
|
|
3821
3831
|
he,
|
|
3822
3832
|
rl
|
|
@@ -3840,9 +3850,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3840
3850
|
"aria-label": e(l)("menu.common.labels.order_from"),
|
|
3841
3851
|
items: Z.value,
|
|
3842
3852
|
"model-value": a.value.formOrderFrom,
|
|
3843
|
-
"onUpdate:modelValue": t[21] || (t[21] = (U) =>
|
|
3853
|
+
"onUpdate:modelValue": t[21] || (t[21] = (U) => p.value.setOrderFrom(U))
|
|
3844
3854
|
}, null, 8, ["disabled", "label", "aria-label", "items", "model-value"])
|
|
3845
|
-
], 8,
|
|
3855
|
+
], 8, Tn)
|
|
3846
3856
|
];
|
|
3847
3857
|
}),
|
|
3848
3858
|
_: 1
|
|
@@ -3853,17 +3863,17 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3853
3863
|
title: e(l)("menu.product.form.sections.tagging.title"),
|
|
3854
3864
|
subtitle: e(l)("menu.product.form.sections.tagging.subtitle")
|
|
3855
3865
|
}, {
|
|
3856
|
-
default:
|
|
3857
|
-
s(e(
|
|
3866
|
+
default: c(() => [
|
|
3867
|
+
s(e(Zl), {
|
|
3858
3868
|
entity: "item",
|
|
3859
3869
|
"model-value": a.value.customAttributes ?? {},
|
|
3860
3870
|
"value-options": $e.value,
|
|
3861
|
-
"onUpdate:modelValue": t[23] || (t[23] = (K) =>
|
|
3871
|
+
"onUpdate:modelValue": t[23] || (t[23] = (K) => p.value.setCustomAttributes(K ?? null))
|
|
3862
3872
|
}, null, 8, ["model-value", "value-options"])
|
|
3863
3873
|
]),
|
|
3864
3874
|
_: 1
|
|
3865
3875
|
}, 8, ["section", "title", "subtitle"])) : y("", !0),
|
|
3866
|
-
a.value.isOverride ? y("", !0) : (r(), S("div",
|
|
3876
|
+
a.value.isOverride ? y("", !0) : (r(), S("div", An)),
|
|
3867
3877
|
s(Te, {
|
|
3868
3878
|
section: a.value.sections.price,
|
|
3869
3879
|
anchor: "anchor-price",
|
|
@@ -3873,10 +3883,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3873
3883
|
"toggle-label": e(l)("menu.product.form.sections.price.description"),
|
|
3874
3884
|
"onUpdate:enabled": t[37] || (t[37] = (K) => ne("price", K))
|
|
3875
3885
|
}, {
|
|
3876
|
-
default:
|
|
3886
|
+
default: c(() => {
|
|
3877
3887
|
var K, me;
|
|
3878
3888
|
return [
|
|
3879
|
-
n("div",
|
|
3889
|
+
n("div", Bn, [
|
|
3880
3890
|
n("div", {
|
|
3881
3891
|
class: Be(
|
|
3882
3892
|
u.presentation === "tree" ? "w-[274px] xs:w-full" : "w-[266px] xs:w-full"
|
|
@@ -3896,9 +3906,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3896
3906
|
"error-messages": ue("price") ? [e(v)(ue("price"))] : [],
|
|
3897
3907
|
"helper-text": a.value.editPrice.state === "disabled" ? e(v)(a.value.editPrice.reason) : ""
|
|
3898
3908
|
}, Re("price"), {
|
|
3899
|
-
"onUpdate:modelValue": t[25] || (t[25] = (ae) => (xe("price"),
|
|
3909
|
+
"onUpdate:modelValue": t[25] || (t[25] = (ae) => (xe("price"), p.value.setPriceAmount(le(ae))))
|
|
3900
3910
|
}), {
|
|
3901
|
-
append:
|
|
3911
|
+
append: c(() => [
|
|
3902
3912
|
s(e(Sl), {
|
|
3903
3913
|
"pure-styling": "",
|
|
3904
3914
|
class: "shrink-0 scale-75",
|
|
@@ -3927,7 +3937,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3927
3937
|
})),
|
|
3928
3938
|
"model-value": a.value.selectedTax,
|
|
3929
3939
|
"shift-menu": "",
|
|
3930
|
-
"onUpdate:modelValue": t[26] || (t[26] = (ae) =>
|
|
3940
|
+
"onUpdate:modelValue": t[26] || (t[26] = (ae) => p.value.setTaxCode(ae ?? null))
|
|
3931
3941
|
}, null, 8, ["label", "disabled", "items", "model-value"]), [
|
|
3932
3942
|
[
|
|
3933
3943
|
_,
|
|
@@ -3937,12 +3947,12 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3937
3947
|
]
|
|
3938
3948
|
])
|
|
3939
3949
|
]),
|
|
3940
|
-
a.value.showMemberPricing ? (r(), S("div",
|
|
3941
|
-
n("div",
|
|
3942
|
-
n("p",
|
|
3943
|
-
n("p",
|
|
3950
|
+
a.value.showMemberPricing ? (r(), S("div", On, [
|
|
3951
|
+
n("div", Ln, [
|
|
3952
|
+
n("p", zn, I(e(l)("menu.product.form.member_price.title")), 1),
|
|
3953
|
+
n("p", Dn, I(e(l)("menu.product.form.member_price.description")), 1)
|
|
3944
3954
|
]),
|
|
3945
|
-
n("div",
|
|
3955
|
+
n("div", Rn, [
|
|
3946
3956
|
s(oe, {
|
|
3947
3957
|
label: e(l)("menu.product.form.member_price.configure.title"),
|
|
3948
3958
|
variant: "secondary",
|
|
@@ -3959,7 +3969,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3959
3969
|
label: e(l)("menu.price_tier.price_group"),
|
|
3960
3970
|
description: e(l)("menu.price_tier.description")
|
|
3961
3971
|
}, {
|
|
3962
|
-
append:
|
|
3972
|
+
append: c(() => [
|
|
3963
3973
|
s(oe, {
|
|
3964
3974
|
label: e(l)("menu.price_tier.add_price_group"),
|
|
3965
3975
|
icon: "add",
|
|
@@ -3967,7 +3977,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3967
3977
|
onClick: t[28] || (t[28] = (ae) => o("create-entity", "priceGroup"))
|
|
3968
3978
|
}, null, 8, ["label"])
|
|
3969
3979
|
]),
|
|
3970
|
-
default:
|
|
3980
|
+
default: c(() => [
|
|
3971
3981
|
s(Ze, {
|
|
3972
3982
|
"column-defs": ze.value,
|
|
3973
3983
|
"row-data": N.value,
|
|
@@ -3980,26 +3990,26 @@ const ml = /* @__PURE__ */ ce({
|
|
|
3980
3990
|
s(Oe, {
|
|
3981
3991
|
label: e(l)("menu.product.form.price.settings.title")
|
|
3982
3992
|
}, {
|
|
3983
|
-
default:
|
|
3993
|
+
default: c(() => {
|
|
3984
3994
|
var ae, Se;
|
|
3985
3995
|
return [
|
|
3986
|
-
n("div",
|
|
3996
|
+
n("div", Mn, [
|
|
3987
3997
|
s(Me, {
|
|
3988
3998
|
disabled: a.value.editOpenPrice.state !== "allowed",
|
|
3989
3999
|
label: e(l)("menu.product.form.price.settings.open_price.label"),
|
|
3990
4000
|
sublabel: e(l)("menu.product.form.price.settings.open_price.sublabel"),
|
|
3991
4001
|
"model-value": a.value.openPrice,
|
|
3992
4002
|
value: "",
|
|
3993
|
-
"onUpdate:modelValue": t[29] || (t[29] = (U) =>
|
|
4003
|
+
"onUpdate:modelValue": t[29] || (t[29] = (U) => p.value.setOpenPrice(!!U))
|
|
3994
4004
|
}, null, 8, ["disabled", "label", "sublabel", "model-value"]),
|
|
3995
|
-
n("div",
|
|
4005
|
+
n("div", Nn, [
|
|
3996
4006
|
s(Me, {
|
|
3997
4007
|
disabled: a.value.editUnitSale.state !== "allowed",
|
|
3998
4008
|
label: e(l)("menu.product.form.price.settings.sell_by_unit.label"),
|
|
3999
4009
|
sublabel: e(l)("menu.product.form.price.settings.sell_by_unit.sublabel"),
|
|
4000
4010
|
"model-value": a.value.unitSale.enabled,
|
|
4001
4011
|
value: "",
|
|
4002
|
-
"onUpdate:modelValue": t[30] || (t[30] = (U) =>
|
|
4012
|
+
"onUpdate:modelValue": t[30] || (t[30] = (U) => p.value.setUnitSale({
|
|
4003
4013
|
enabled: !!U,
|
|
4004
4014
|
unit: a.value.unitSale.unit,
|
|
4005
4015
|
// Legacy enables the sale with `perXUnit: 0`, which its
|
|
@@ -4008,11 +4018,11 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4008
4018
|
perXUnit: a.value.unitSale.perXUnit ?? 0
|
|
4009
4019
|
}))
|
|
4010
4020
|
}, null, 8, ["disabled", "label", "sublabel", "model-value"]),
|
|
4011
|
-
a.value.unitSale.enabled ? (r(), S("div",
|
|
4012
|
-
n("p",
|
|
4021
|
+
a.value.unitSale.enabled ? (r(), S("div", En, [
|
|
4022
|
+
n("p", qn, I(e(l)(
|
|
4013
4023
|
"menu.product.form.price.settings.sell_by_unit.per_unit.label"
|
|
4014
4024
|
)), 1),
|
|
4015
|
-
n("div",
|
|
4025
|
+
n("div", Gn, [
|
|
4016
4026
|
s(ge, Ce({
|
|
4017
4027
|
disabled: a.value.editUnitSale.state !== "allowed",
|
|
4018
4028
|
"aria-label": e(l)(
|
|
@@ -4026,14 +4036,14 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4026
4036
|
"menu.product.form.price.settings.sell_by_unit.per_unit.placeholder"
|
|
4027
4037
|
)
|
|
4028
4038
|
}, Re("perXUnit"), {
|
|
4029
|
-
"onUpdate:modelValue": t[31] || (t[31] = (U) => (xe("perXUnit"),
|
|
4039
|
+
"onUpdate:modelValue": t[31] || (t[31] = (U) => (xe("perXUnit"), p.value.setUnitSale({
|
|
4030
4040
|
enabled: !0,
|
|
4031
4041
|
unit: a.value.unitSale.unit,
|
|
4032
4042
|
perXUnit: le(U)
|
|
4033
4043
|
})))
|
|
4034
4044
|
}), null, 16, ["disabled", "aria-label", "error-messages", "model-value", "placeholder"])
|
|
4035
4045
|
]),
|
|
4036
|
-
n("div",
|
|
4046
|
+
n("div", jn, [
|
|
4037
4047
|
s(ge, Ce({
|
|
4038
4048
|
disabled: a.value.editUnitSale.state !== "allowed",
|
|
4039
4049
|
"aria-label": e(l)(
|
|
@@ -4045,7 +4055,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4045
4055
|
"menu.product.form.price.settings.sell_by_unit.unit.placeholder"
|
|
4046
4056
|
)
|
|
4047
4057
|
}, Re("unit"), {
|
|
4048
|
-
"onUpdate:modelValue": t[32] || (t[32] = (U) => (xe("unit"),
|
|
4058
|
+
"onUpdate:modelValue": t[32] || (t[32] = (U) => (xe("unit"), p.value.setUnitSale({
|
|
4049
4059
|
enabled: !0,
|
|
4050
4060
|
unit: String(U ?? ""),
|
|
4051
4061
|
perXUnit: a.value.unitSale.perXUnit
|
|
@@ -4054,15 +4064,15 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4054
4064
|
])
|
|
4055
4065
|
])) : y("", !0)
|
|
4056
4066
|
]),
|
|
4057
|
-
a.value.editCosting.state === "allowed" ? (r(), S("div",
|
|
4067
|
+
a.value.editCosting.state === "allowed" ? (r(), S("div", Kn, [
|
|
4058
4068
|
s(Me, {
|
|
4059
4069
|
label: e(l)("menu.product.form.price.settings.track_costing.label"),
|
|
4060
4070
|
"model-value": a.value.costingAmount !== null,
|
|
4061
4071
|
value: "",
|
|
4062
|
-
"onUpdate:modelValue": t[33] || (t[33] = (U) =>
|
|
4072
|
+
"onUpdate:modelValue": t[33] || (t[33] = (U) => p.value.setCostingAmount(U ? 0 : null))
|
|
4063
4073
|
}, null, 8, ["label", "model-value"]),
|
|
4064
|
-
a.value.costingAmount !== null ? (r(), S("div",
|
|
4065
|
-
n("div",
|
|
4074
|
+
a.value.costingAmount !== null ? (r(), S("div", Qn, [
|
|
4075
|
+
n("div", Xn, [
|
|
4066
4076
|
s(Ke, Ce({
|
|
4067
4077
|
class: "w-full",
|
|
4068
4078
|
"aria-label": e(l)(
|
|
@@ -4072,21 +4082,21 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4072
4082
|
"model-value": a.value.costingAmount,
|
|
4073
4083
|
"error-messages": ue("costing") ? [e(v)(ue("costing"))] : []
|
|
4074
4084
|
}, Re("costing"), {
|
|
4075
|
-
"onUpdate:modelValue": t[34] || (t[34] = (U) => (xe("costing"),
|
|
4085
|
+
"onUpdate:modelValue": t[34] || (t[34] = (U) => (xe("costing"), p.value.setCostingAmount(U ?? 0)))
|
|
4076
4086
|
}), null, 16, ["aria-label", "currency", "model-value", "error-messages"])
|
|
4077
4087
|
])
|
|
4078
4088
|
])) : y("", !0)
|
|
4079
4089
|
])) : y("", !0),
|
|
4080
|
-
a.value.editMinimumPrice.state !== "hidden" ? (r(), S("div",
|
|
4090
|
+
a.value.editMinimumPrice.state !== "hidden" ? (r(), S("div", Hn, [
|
|
4081
4091
|
s(Me, {
|
|
4082
4092
|
label: e(l)("menu.product.form.price.settings.min_price.label"),
|
|
4083
4093
|
disabled: a.value.editMinimumPrice.state !== "allowed",
|
|
4084
4094
|
"model-value": a.value.minimumPriceAmount !== null,
|
|
4085
4095
|
value: "",
|
|
4086
|
-
"onUpdate:modelValue": t[35] || (t[35] = (U) =>
|
|
4096
|
+
"onUpdate:modelValue": t[35] || (t[35] = (U) => p.value.setMinimumPriceAmount(U ? 0 : null))
|
|
4087
4097
|
}, null, 8, ["label", "disabled", "model-value"]),
|
|
4088
|
-
n("div",
|
|
4089
|
-
n("div",
|
|
4098
|
+
n("div", Wn, [
|
|
4099
|
+
n("div", Yn, [
|
|
4090
4100
|
a.value.minimumPriceAmount !== null ? (r(), T(Ke, Ce({
|
|
4091
4101
|
key: 0,
|
|
4092
4102
|
"aria-label": e(l)(
|
|
@@ -4096,7 +4106,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4096
4106
|
"error-messages": ue("minPrice") ? [e(v)(ue("minPrice"))] : [],
|
|
4097
4107
|
"model-value": a.value.minimumPriceAmount
|
|
4098
4108
|
}, Re("minPrice"), {
|
|
4099
|
-
"onUpdate:modelValue": t[36] || (t[36] = (U) => (xe("minPrice"),
|
|
4109
|
+
"onUpdate:modelValue": t[36] || (t[36] = (U) => (xe("minPrice"), p.value.setMinimumPriceAmount(U ?? 0)))
|
|
4100
4110
|
}), null, 16, ["aria-label", "currency", "error-messages", "model-value"])) : y("", !0)
|
|
4101
4111
|
])
|
|
4102
4112
|
])
|
|
@@ -4110,8 +4120,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4110
4120
|
key: 2,
|
|
4111
4121
|
label: e(l)("menu.product.form.price.statutory_charges.title")
|
|
4112
4122
|
}, {
|
|
4113
|
-
default:
|
|
4114
|
-
n("div",
|
|
4123
|
+
default: c(() => [
|
|
4124
|
+
n("div", Zn, [
|
|
4115
4125
|
(r(!0), S(re, null, Fe(a.value.statutoryCharges, (ae) => (r(), S("div", {
|
|
4116
4126
|
key: ae.code,
|
|
4117
4127
|
class: "space-y-8"
|
|
@@ -4123,16 +4133,16 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4123
4133
|
}),
|
|
4124
4134
|
"model-value": ae.enabled,
|
|
4125
4135
|
value: "",
|
|
4126
|
-
"onUpdate:modelValue": (Se) =>
|
|
4136
|
+
"onUpdate:modelValue": (Se) => p.value.setStatutoryChargeEnabled(
|
|
4127
4137
|
ae.code,
|
|
4128
4138
|
!!Se
|
|
4129
4139
|
)
|
|
4130
4140
|
}, null, 8, ["label", "sublabel", "model-value", "onUpdate:modelValue"]),
|
|
4131
|
-
ae.enabled ? (r(), S("div",
|
|
4132
|
-
n("p",
|
|
4141
|
+
ae.enabled ? (r(), S("div", Jn, [
|
|
4142
|
+
n("p", es, I(e(l)(
|
|
4133
4143
|
"menu.product.form.price.statutory_charges.unit_count.label"
|
|
4134
4144
|
)), 1),
|
|
4135
|
-
n("div",
|
|
4145
|
+
n("div", ls, [
|
|
4136
4146
|
s(ge, Ce({
|
|
4137
4147
|
"aria-label": e(l)(
|
|
4138
4148
|
"menu.product.form.price.statutory_charges.unit_count.label"
|
|
@@ -4149,7 +4159,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4149
4159
|
"menu.product.form.price.statutory_charges.unit_count.placeholder"
|
|
4150
4160
|
)
|
|
4151
4161
|
}, { ref_for: !0 }, Re(`statutoryCharges.${ae.code}`), {
|
|
4152
|
-
"onUpdate:modelValue": (Se) => (xe(`statutoryCharges.${ae.code}`),
|
|
4162
|
+
"onUpdate:modelValue": (Se) => (xe(`statutoryCharges.${ae.code}`), p.value.setStatutoryChargeUnitCount(
|
|
4153
4163
|
ae.code,
|
|
4154
4164
|
le(Se)
|
|
4155
4165
|
))
|
|
@@ -4165,20 +4175,20 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4165
4175
|
}),
|
|
4166
4176
|
_: 1
|
|
4167
4177
|
}, 8, ["section", "title", "override-title", "description", "toggle-label"]),
|
|
4168
|
-
!a.value.isOverride && a.value.sections.print.visible ? (r(), S("div",
|
|
4178
|
+
!a.value.isOverride && a.value.sections.print.visible ? (r(), S("div", as)) : y("", !0),
|
|
4169
4179
|
a.value.sections.print.visible ? (r(), T(Te, {
|
|
4170
4180
|
key: 5,
|
|
4171
4181
|
section: a.value.sections.print,
|
|
4172
4182
|
title: e(l)("menu.product.form.print.title")
|
|
4173
4183
|
}, {
|
|
4174
|
-
default:
|
|
4184
|
+
default: c(() => {
|
|
4175
4185
|
var K;
|
|
4176
4186
|
return [
|
|
4177
4187
|
a.value.printConfig.state === "allowed" ? (r(), T(Oe, {
|
|
4178
4188
|
key: 0,
|
|
4179
4189
|
label: e(l)("menu.product.form.print.config.label")
|
|
4180
4190
|
}, {
|
|
4181
|
-
default:
|
|
4191
|
+
default: c(() => {
|
|
4182
4192
|
var me;
|
|
4183
4193
|
return [
|
|
4184
4194
|
s(wl, {
|
|
@@ -4187,7 +4197,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4187
4197
|
label: e(l)("menu.product.form.print.config.group_parent.label"),
|
|
4188
4198
|
sublabel: e(l)("menu.product.form.print.config.group_parent.sublabel"),
|
|
4189
4199
|
"label-placement": "right",
|
|
4190
|
-
"onUpdate:modelValue": t[38] || (t[38] = (ae) =>
|
|
4200
|
+
"onUpdate:modelValue": t[38] || (t[38] = (ae) => p.value.setPrintToRoot(!ae))
|
|
4191
4201
|
}, null, 8, ["model-value", "label", "sublabel"])
|
|
4192
4202
|
];
|
|
4193
4203
|
}),
|
|
@@ -4196,10 +4206,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4196
4206
|
s(_l, {
|
|
4197
4207
|
label: e(l)("menu.product.form.print.kds.label"),
|
|
4198
4208
|
"model-value": ((K = a.value.print) == null ? void 0 : K.sequential) ?? !1,
|
|
4199
|
-
"onUpdate:modelValue": t[39] || (t[39] = (me) =>
|
|
4209
|
+
"onUpdate:modelValue": t[39] || (t[39] = (me) => p.value.setPrintSequential(!!me))
|
|
4200
4210
|
}, {
|
|
4201
|
-
default:
|
|
4202
|
-
n("div",
|
|
4211
|
+
default: c(() => [
|
|
4212
|
+
n("div", ts, [
|
|
4203
4213
|
s(tl, {
|
|
4204
4214
|
value: !1,
|
|
4205
4215
|
label: e(l)("menu.product.form.print.kds.options.all.label"),
|
|
@@ -4217,17 +4227,17 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4217
4227
|
s(Oe, {
|
|
4218
4228
|
label: e(l)("menu.product.form.print.routes.label")
|
|
4219
4229
|
}, {
|
|
4220
|
-
default:
|
|
4230
|
+
default: c(() => [
|
|
4221
4231
|
a.value.printDepartmentOptions.length ? (r(), T(ml, {
|
|
4222
4232
|
key: 0,
|
|
4223
4233
|
items: a.value.printDepartmentOptions,
|
|
4224
4234
|
handle: ".print-route-handle",
|
|
4225
|
-
onReorder: t[42] || (t[42] = (me) =>
|
|
4235
|
+
onReorder: t[42] || (t[42] = (me) => p.value.reorderPrintDepartments(me))
|
|
4226
4236
|
}, {
|
|
4227
|
-
item:
|
|
4237
|
+
item: c(({ element: me }) => {
|
|
4228
4238
|
var ae, Se;
|
|
4229
4239
|
return [
|
|
4230
|
-
n("div",
|
|
4240
|
+
n("div", os, [
|
|
4231
4241
|
n("div", null, [
|
|
4232
4242
|
(ae = a.value.print) != null && ae.sequential ? (r(), T(oe, {
|
|
4233
4243
|
key: 0,
|
|
@@ -4247,14 +4257,14 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4247
4257
|
label: me.label,
|
|
4248
4258
|
"model-value": [...((Se = a.value.print) == null ? void 0 : Se.departmentIds) ?? []],
|
|
4249
4259
|
value: me.id,
|
|
4250
|
-
"onUpdate:modelValue": t[41] || (t[41] = (U) =>
|
|
4260
|
+
"onUpdate:modelValue": t[41] || (t[41] = (U) => p.value.setPrintDepartments(U ?? []))
|
|
4251
4261
|
}, null, 8, ["label", "model-value", "value"])
|
|
4252
4262
|
])
|
|
4253
4263
|
];
|
|
4254
4264
|
}),
|
|
4255
4265
|
_: 1
|
|
4256
4266
|
}, 8, ["items"])) : y("", !0),
|
|
4257
|
-
n("div",
|
|
4267
|
+
n("div", ns, [
|
|
4258
4268
|
s(oe, {
|
|
4259
4269
|
"aria-label": e(l)("menu.product.form.print.routes.add"),
|
|
4260
4270
|
label: e(l)("menu.product.form.print.routes.add"),
|
|
@@ -4270,7 +4280,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4270
4280
|
}),
|
|
4271
4281
|
_: 1
|
|
4272
4282
|
}, 8, ["section", "title"])) : y("", !0),
|
|
4273
|
-
a.value.isOverride ? y("", !0) : (r(), S("div",
|
|
4283
|
+
a.value.isOverride ? y("", !0) : (r(), S("div", ss)),
|
|
4274
4284
|
a.value.sections.variant.visible ? (r(), T(Te, {
|
|
4275
4285
|
key: 7,
|
|
4276
4286
|
section: a.value.sections.variant,
|
|
@@ -4282,7 +4292,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4282
4292
|
"toggle-label": e(l)("menu.product.form.sections.variant.description"),
|
|
4283
4293
|
"onUpdate:enabled": t[46] || (t[46] = (K) => ne("variant", K))
|
|
4284
4294
|
}, {
|
|
4285
|
-
"append-title":
|
|
4295
|
+
"append-title": c(() => [
|
|
4286
4296
|
a.value.editVariantGroups.state === "allowed" ? (r(), T(oe, {
|
|
4287
4297
|
key: 0,
|
|
4288
4298
|
"aria-label": e(l)("menu.product.form.variant.add"),
|
|
@@ -4292,20 +4302,20 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4292
4302
|
onClick: t[44] || (t[44] = (K) => G("variant"))
|
|
4293
4303
|
}, null, 8, ["aria-label", "label"])) : y("", !0)
|
|
4294
4304
|
]),
|
|
4295
|
-
default:
|
|
4296
|
-
n("div",
|
|
4305
|
+
default: c(() => [
|
|
4306
|
+
n("div", is, [
|
|
4297
4307
|
s(hl, {
|
|
4298
4308
|
"model-value": void 0,
|
|
4299
4309
|
"error-messages": ue("variant") ? [e(v)(ue("variant"))] : []
|
|
4300
4310
|
}, {
|
|
4301
|
-
default:
|
|
4311
|
+
default: c(() => [
|
|
4302
4312
|
s(ml, {
|
|
4303
4313
|
items: a.value.variantGroups,
|
|
4304
4314
|
handle: ".handle",
|
|
4305
|
-
onReorder: t[45] || (t[45] = (K) =>
|
|
4315
|
+
onReorder: t[45] || (t[45] = (K) => p.value.setVariantGroups(K))
|
|
4306
4316
|
}, {
|
|
4307
|
-
item:
|
|
4308
|
-
n("div",
|
|
4317
|
+
item: c(({ element: K }) => [
|
|
4318
|
+
n("div", rs, [
|
|
4309
4319
|
s(oe, {
|
|
4310
4320
|
class: "handle",
|
|
4311
4321
|
"prepend-icon": "drag_handle",
|
|
@@ -4315,8 +4325,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4315
4325
|
}),
|
|
4316
4326
|
disabled: a.value.editVariantGroups.state !== "allowed"
|
|
4317
4327
|
}, null, 8, ["aria-label", "disabled"]),
|
|
4318
|
-
n("div",
|
|
4319
|
-
n("p",
|
|
4328
|
+
n("div", us, [
|
|
4329
|
+
n("p", ds, I(K.label), 1),
|
|
4320
4330
|
a.value.editVariantGroups.state === "allowed" ? (r(), T(oe, {
|
|
4321
4331
|
key: 0,
|
|
4322
4332
|
icon: "close",
|
|
@@ -4338,25 +4348,28 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4338
4348
|
]),
|
|
4339
4349
|
_: 1
|
|
4340
4350
|
}, 8, ["error-messages"]),
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4351
|
+
s(Tl, null, {
|
|
4352
|
+
default: c(() => [
|
|
4353
|
+
a.value.combinations.length > 0 ? (r(), T(Ze, {
|
|
4354
|
+
key: 0,
|
|
4355
|
+
class: "w-full",
|
|
4356
|
+
"column-defs": Ye.value,
|
|
4357
|
+
"column-visibility": {
|
|
4358
|
+
minPriceAmount: a.value.showCombinationMinimumPrice
|
|
4359
|
+
},
|
|
4360
|
+
"row-data": [...a.value.combinations],
|
|
4361
|
+
"page-size": a.value.combinations.length,
|
|
4362
|
+
"hide-footer": "",
|
|
4363
|
+
"shrink-at": !1
|
|
4364
|
+
}, null, 8, ["column-defs", "column-visibility", "row-data", "page-size"])) : y("", !0)
|
|
4365
|
+
]),
|
|
4366
|
+
_: 1
|
|
4367
|
+
})
|
|
4355
4368
|
])
|
|
4356
4369
|
]),
|
|
4357
4370
|
_: 1
|
|
4358
4371
|
}, 8, ["section", "title", "subtitle", "override-title", "description", "toggle-label"])) : y("", !0),
|
|
4359
|
-
!a.value.isOverride && a.value.sections.group.visible ? (r(), S("div",
|
|
4372
|
+
!a.value.isOverride && a.value.sections.group.visible ? (r(), S("div", ms)) : y("", !0),
|
|
4360
4373
|
a.value.sections.group.visible ? (r(), T(Te, {
|
|
4361
4374
|
key: 9,
|
|
4362
4375
|
section: a.value.sections.group,
|
|
@@ -4367,8 +4380,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4367
4380
|
description: e(l)("menu.product.form.sections.group.description"),
|
|
4368
4381
|
"onUpdate:enabled": t[48] || (t[48] = (K) => ne("group", K))
|
|
4369
4382
|
}, {
|
|
4370
|
-
"append-title":
|
|
4383
|
+
"append-title": c(() => [
|
|
4371
4384
|
s(oe, {
|
|
4385
|
+
class: "flex-shrink-0",
|
|
4372
4386
|
"aria-label": e(l)("menu.product.form.group.add"),
|
|
4373
4387
|
label: e(l)("menu.product.form.group.add"),
|
|
4374
4388
|
"prepend-icon": "add",
|
|
@@ -4376,22 +4390,25 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4376
4390
|
onClick: t[47] || (t[47] = (K) => G("group"))
|
|
4377
4391
|
}, null, 8, ["aria-label", "label"])
|
|
4378
4392
|
]),
|
|
4379
|
-
default:
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4393
|
+
default: c(() => [
|
|
4394
|
+
s(Tl, null, {
|
|
4395
|
+
default: c(() => [
|
|
4396
|
+
a.value.groupRows.length > 0 ? (r(), T(Ze, {
|
|
4397
|
+
key: 0,
|
|
4398
|
+
"column-defs": He.value,
|
|
4399
|
+
"row-data": [...a.value.groupRows],
|
|
4400
|
+
"page-size": a.value.groupRows.length,
|
|
4401
|
+
"hide-footer": "",
|
|
4402
|
+
"pin-header-row": "",
|
|
4403
|
+
"shrink-at": !1
|
|
4404
|
+
}, null, 8, ["column-defs", "row-data", "page-size"])) : y("", !0)
|
|
4405
|
+
]),
|
|
4406
|
+
_: 1
|
|
4407
|
+
})
|
|
4391
4408
|
]),
|
|
4392
4409
|
_: 1
|
|
4393
4410
|
}, 8, ["section", "title", "subtitle", "override-title", "description"])) : y("", !0),
|
|
4394
|
-
!a.value.isOverride && a.value.sections.inventory.visible ? (r(), S("div",
|
|
4411
|
+
!a.value.isOverride && a.value.sections.inventory.visible ? (r(), S("div", cs)) : y("", !0),
|
|
4395
4412
|
a.value.sections.inventory.visible ? (r(), T(Te, {
|
|
4396
4413
|
key: 11,
|
|
4397
4414
|
section: a.value.sections.inventory,
|
|
@@ -4402,16 +4419,16 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4402
4419
|
"toggle-label": e(l)("menu.product.form.sections.inventory.description"),
|
|
4403
4420
|
"onUpdate:enabled": t[49] || (t[49] = (K) => ne("inventory", K))
|
|
4404
4421
|
}, {
|
|
4405
|
-
default:
|
|
4406
|
-
n("div",
|
|
4422
|
+
default: c(() => [
|
|
4423
|
+
n("div", ps, [
|
|
4407
4424
|
n("div", {
|
|
4408
4425
|
ref_key: "inventorySummaryRoot",
|
|
4409
4426
|
ref: vl,
|
|
4410
4427
|
class: "xs:min-w-[640px]"
|
|
4411
4428
|
}, [
|
|
4412
|
-
s(e(
|
|
4413
|
-
"row-data":
|
|
4414
|
-
onRowClick:
|
|
4429
|
+
s(e(Jl), {
|
|
4430
|
+
"row-data": We.value,
|
|
4431
|
+
onRowClick: Gl,
|
|
4415
4432
|
onVnodeUpdated: bl
|
|
4416
4433
|
}, null, 8, ["row-data"])
|
|
4417
4434
|
], 512)
|
|
@@ -4419,14 +4436,14 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4419
4436
|
]),
|
|
4420
4437
|
_: 1
|
|
4421
4438
|
}, 8, ["section", "title", "subtitle", "override-title", "description", "toggle-label"])) : y("", !0),
|
|
4422
|
-
a.value.sections.threshold.visible ? (r(), S("div",
|
|
4439
|
+
a.value.sections.threshold.visible ? (r(), S("div", vs)) : y("", !0),
|
|
4423
4440
|
a.value.sections.threshold.visible ? (r(), T(Te, {
|
|
4424
4441
|
key: 13,
|
|
4425
4442
|
section: a.value.sections.threshold,
|
|
4426
4443
|
title: e(l)("menu.inventory.threshold.title"),
|
|
4427
4444
|
subtitle: e(l)("menu.inventory.threshold.subtitle")
|
|
4428
4445
|
}, {
|
|
4429
|
-
default:
|
|
4446
|
+
default: c(() => [
|
|
4430
4447
|
s(kl, Ce({
|
|
4431
4448
|
"aria-label": e(l)("menu.inventory.threshold.title"),
|
|
4432
4449
|
"model-value": a.value.lowStockThreshold,
|
|
@@ -4435,12 +4452,12 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4435
4452
|
"error-messages": ue("lowStockThreshold") ? [e(v)(ue("lowStockThreshold"))] : [],
|
|
4436
4453
|
"helper-text": e(l)("menu.inventory.threshold.helper_text")
|
|
4437
4454
|
}, Re("lowStockThreshold"), {
|
|
4438
|
-
"onUpdate:modelValue": t[50] || (t[50] = (K) => (xe("lowStockThreshold"),
|
|
4455
|
+
"onUpdate:modelValue": t[50] || (t[50] = (K) => (xe("lowStockThreshold"), p.value.setLowStockThreshold(le(K))))
|
|
4439
4456
|
}), null, 16, ["aria-label", "model-value", "placeholder", "error-messages", "helper-text"])
|
|
4440
4457
|
]),
|
|
4441
4458
|
_: 1
|
|
4442
4459
|
}, 8, ["section", "title", "subtitle"])) : y("", !0),
|
|
4443
|
-
!a.value.isOverride && a.value.sections.takeaway.visible ? (r(), S("div",
|
|
4460
|
+
!a.value.isOverride && a.value.sections.takeaway.visible ? (r(), S("div", bs)) : y("", !0),
|
|
4444
4461
|
a.value.sections.takeaway.visible ? (r(), T(Te, {
|
|
4445
4462
|
key: 15,
|
|
4446
4463
|
section: a.value.sections.takeaway,
|
|
@@ -4451,15 +4468,15 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4451
4468
|
"toggle-label": e(l)("menu.product.form.sections.takeaway.description"),
|
|
4452
4469
|
"onUpdate:enabled": t[53] || (t[53] = (K) => ne("takeaway", K))
|
|
4453
4470
|
}, {
|
|
4454
|
-
default:
|
|
4455
|
-
u.presentation !== "tree" || a.value.editTakeawayPos.state === "allowed" || a.value.editTakeawayApp.state === "allowed" ? (r(), S("div",
|
|
4471
|
+
default: c(() => [
|
|
4472
|
+
u.presentation !== "tree" || a.value.editTakeawayPos.state === "allowed" || a.value.editTakeawayApp.state === "allowed" ? (r(), S("div", fs, [
|
|
4456
4473
|
a.value.editTakeawayPos.state === "allowed" ? (r(), T(Me, {
|
|
4457
4474
|
key: 0,
|
|
4458
4475
|
label: e(l)("menu.product.form.takeaway.takeawayConfig.pos.label"),
|
|
4459
4476
|
sublabel: e(l)("menu.product.form.takeaway.takeawayConfig.pos.sublabel"),
|
|
4460
4477
|
"model-value": a.value.takeawayPos,
|
|
4461
4478
|
value: "",
|
|
4462
|
-
"onUpdate:modelValue": t[51] || (t[51] = (K) =>
|
|
4479
|
+
"onUpdate:modelValue": t[51] || (t[51] = (K) => p.value.setTakeawayConfig({ pos: !!K }))
|
|
4463
4480
|
}, null, 8, ["label", "sublabel", "model-value"])) : y("", !0),
|
|
4464
4481
|
a.value.editTakeawayApp.state === "allowed" ? (r(), T(Me, {
|
|
4465
4482
|
key: 1,
|
|
@@ -4467,28 +4484,25 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4467
4484
|
sublabel: e(l)("menu.product.form.takeaway.takeawayConfig.app.sublabel"),
|
|
4468
4485
|
"model-value": a.value.takeawayApp,
|
|
4469
4486
|
value: "",
|
|
4470
|
-
"onUpdate:modelValue": t[52] || (t[52] = (K) =>
|
|
4487
|
+
"onUpdate:modelValue": t[52] || (t[52] = (K) => p.value.setTakeawayConfig({ app: !!K }))
|
|
4471
4488
|
}, null, 8, ["label", "sublabel", "model-value"])) : y("", !0)
|
|
4472
4489
|
])) : y("", !0),
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
"shrink-at": !1
|
|
4480
|
-
}, null, 8, ["column-defs", "row-data", "page-size"])
|
|
4481
|
-
])
|
|
4490
|
+
s(Ze, {
|
|
4491
|
+
"column-defs": jl.value,
|
|
4492
|
+
"row-data": [...a.value.takeawayRows],
|
|
4493
|
+
"page-size": Math.max(a.value.takeawayRows.length, 1),
|
|
4494
|
+
"hide-footer": ""
|
|
4495
|
+
}, null, 8, ["column-defs", "row-data", "page-size"])
|
|
4482
4496
|
]),
|
|
4483
4497
|
_: 1
|
|
4484
4498
|
}, 8, ["section", "title", "subtitle", "override-title", "description", "toggle-label"])) : y("", !0),
|
|
4485
|
-
!a.value.isOverride && a.value.sections.serveDelay.visible ? (r(), S("div",
|
|
4499
|
+
!a.value.isOverride && a.value.sections.serveDelay.visible ? (r(), S("div", gs)) : y("", !0),
|
|
4486
4500
|
a.value.sections.serveDelay.visible ? (r(), T(Te, {
|
|
4487
4501
|
key: 17,
|
|
4488
4502
|
section: a.value.sections.serveDelay,
|
|
4489
4503
|
title: e(l)("menu.product.form.order_pacing.title")
|
|
4490
4504
|
}, {
|
|
4491
|
-
default:
|
|
4505
|
+
default: c(() => {
|
|
4492
4506
|
var K, me;
|
|
4493
4507
|
return [
|
|
4494
4508
|
s(wl, {
|
|
@@ -4497,14 +4511,14 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4497
4511
|
label: e(l)("menu.product.form.order_pacing.serve_later.label"),
|
|
4498
4512
|
sublabel: e(l)("menu.product.form.order_pacing.serve_later.sublabel"),
|
|
4499
4513
|
"label-placement": "right",
|
|
4500
|
-
"onUpdate:modelValue": t[54] || (t[54] = (ae) =>
|
|
4514
|
+
"onUpdate:modelValue": t[54] || (t[54] = (ae) => p.value.setServeDelayEnabled(!!ae))
|
|
4501
4515
|
}, null, 8, ["model-value", "label", "sublabel"]),
|
|
4502
|
-
(me = a.value.serveDelay) != null && me.enabled ? (r(), S("div",
|
|
4516
|
+
(me = a.value.serveDelay) != null && me.enabled ? (r(), S("div", ys, [
|
|
4503
4517
|
s(qe, {
|
|
4504
4518
|
title: e(l)("menu.product.form.order_pacing.time_presets.title"),
|
|
4505
4519
|
"sub-title": e(l)("menu.product.form.order_pacing.time_presets.subtitle")
|
|
4506
4520
|
}, {
|
|
4507
|
-
"append-title":
|
|
4521
|
+
"append-title": c(() => [
|
|
4508
4522
|
s(oe, {
|
|
4509
4523
|
class: "flex-shrink-0",
|
|
4510
4524
|
"aria-label": e(l)("menu.product.form.order_pacing.time_presets.add"),
|
|
@@ -4518,11 +4532,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4518
4532
|
}, 8, ["title", "sub-title"]),
|
|
4519
4533
|
a.value.pacingRows.length > 0 ? (r(), T(Ze, {
|
|
4520
4534
|
key: 0,
|
|
4521
|
-
"column-defs":
|
|
4535
|
+
"column-defs": Kl.value,
|
|
4522
4536
|
"row-data": [...a.value.pacingRows],
|
|
4523
4537
|
"page-size": a.value.pacingRows.length,
|
|
4524
|
-
"hide-footer": ""
|
|
4525
|
-
"shrink-at": !1
|
|
4538
|
+
"hide-footer": ""
|
|
4526
4539
|
}, null, 8, ["column-defs", "row-data", "page-size"])) : y("", !0)
|
|
4527
4540
|
])) : y("", !0)
|
|
4528
4541
|
];
|
|
@@ -4536,20 +4549,20 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4536
4549
|
ref: fl,
|
|
4537
4550
|
class: "w-[360px] shrink-0 xs:hidden sm:hidden"
|
|
4538
4551
|
}, [
|
|
4539
|
-
s(
|
|
4552
|
+
s(ho, {
|
|
4540
4553
|
class: "fixed top-[85px]",
|
|
4541
|
-
style: pl({ left: `${e(
|
|
4554
|
+
style: pl({ left: `${e(Ql).left}px` }),
|
|
4542
4555
|
summary: a.value.summary
|
|
4543
4556
|
}, null, 8, ["style", "summary"])
|
|
4544
4557
|
], 512)) : y("", !0),
|
|
4545
|
-
s(
|
|
4558
|
+
s(en, {
|
|
4546
4559
|
modelValue: b.value,
|
|
4547
4560
|
"onUpdate:modelValue": t[55] || (t[55] = (K) => b.value = K),
|
|
4548
4561
|
"initial-section": h.value,
|
|
4549
4562
|
view: a.value,
|
|
4550
|
-
session:
|
|
4563
|
+
session: p.value
|
|
4551
4564
|
}, null, 8, ["modelValue", "initial-section", "view", "session"]),
|
|
4552
|
-
_e.value ? (r(), T(
|
|
4565
|
+
_e.value ? (r(), T(bo, {
|
|
4553
4566
|
key: 1,
|
|
4554
4567
|
"model-value": J.value,
|
|
4555
4568
|
view: _e.value,
|
|
@@ -4557,9 +4570,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4557
4570
|
"order-from-options": a.value.orderFromOptions,
|
|
4558
4571
|
presentation: u.presentation,
|
|
4559
4572
|
"create-price-group": w,
|
|
4560
|
-
"onUpdate:modelValue": t[56] || (t[56] = (K) => K ||
|
|
4573
|
+
"onUpdate:modelValue": t[56] || (t[56] = (K) => K || W())
|
|
4561
4574
|
}, null, 8, ["model-value", "view", "session", "order-from-options", "presentation"])) : y("", !0),
|
|
4562
|
-
De.value ? (r(), T(
|
|
4575
|
+
De.value ? (r(), T(Nl, {
|
|
4563
4576
|
key: 2,
|
|
4564
4577
|
session: De.value,
|
|
4565
4578
|
"product-name": a.value.name || ((xl = a.value.inherited) == null ? void 0 : xl.name) || "",
|
|
@@ -4567,7 +4580,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4567
4580
|
onClose: je
|
|
4568
4581
|
}, null, 8, ["session", "product-name", "disabled"])) : y("", !0)
|
|
4569
4582
|
], 2),
|
|
4570
|
-
C.value ? (r(), T(
|
|
4583
|
+
C.value ? (r(), T(Rl, {
|
|
4571
4584
|
key: 0,
|
|
4572
4585
|
session: C.value,
|
|
4573
4586
|
"on-create-price-group": w,
|
|
@@ -4577,19 +4590,19 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4577
4590
|
], 64);
|
|
4578
4591
|
};
|
|
4579
4592
|
}
|
|
4580
|
-
}),
|
|
4593
|
+
}), ci = /* @__PURE__ */ Dl(_s, [["__scopeId", "data-v-fae88273"]]), hs = /* @__PURE__ */ ce({
|
|
4581
4594
|
__name: "ProductInlineCategoryCreateField",
|
|
4582
4595
|
props: {
|
|
4583
4596
|
session: {},
|
|
4584
4597
|
label: {},
|
|
4585
4598
|
validation: {}
|
|
4586
4599
|
},
|
|
4587
|
-
setup(
|
|
4588
|
-
const V =
|
|
4600
|
+
setup(H) {
|
|
4601
|
+
const V = H, { t: i } = be(), x = Pe(), { run: o } = Ue(), d = Le(V.session), w = R(
|
|
4589
4602
|
() => d.value.status === "ready" ? d.value.value : null
|
|
4590
4603
|
), C = R(
|
|
4591
4604
|
() => w.value ? V.validation.issue(w.value.fieldIssues, "name") ?? w.value.nameIssue : null
|
|
4592
|
-
), P = ye(null), m = ye(null), l =
|
|
4605
|
+
), P = ye(null), m = ye(null), l = Y(!1);
|
|
4593
4606
|
let $ = null;
|
|
4594
4607
|
const _ = R(
|
|
4595
4608
|
() => {
|
|
@@ -4648,7 +4661,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4648
4661
|
(O) => v.session.setName(String(O ?? ""))
|
|
4649
4662
|
)
|
|
4650
4663
|
), {
|
|
4651
|
-
append:
|
|
4664
|
+
append: c(() => {
|
|
4652
4665
|
var O;
|
|
4653
4666
|
return [
|
|
4654
4667
|
s(f, {
|
|
@@ -4689,19 +4702,19 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4689
4702
|
], 64);
|
|
4690
4703
|
};
|
|
4691
4704
|
}
|
|
4692
|
-
}),
|
|
4705
|
+
}), ks = /* @__PURE__ */ ce({
|
|
4693
4706
|
__name: "ProductInlineSubcategoryCreateField",
|
|
4694
4707
|
props: {
|
|
4695
4708
|
session: {},
|
|
4696
4709
|
label: {},
|
|
4697
4710
|
validation: {}
|
|
4698
4711
|
},
|
|
4699
|
-
setup(
|
|
4700
|
-
const V =
|
|
4712
|
+
setup(H) {
|
|
4713
|
+
const V = H, { t: i } = be(), x = Pe(), o = Le(V.session), d = R(
|
|
4701
4714
|
() => o.value.status === "ready" ? o.value.value : null
|
|
4702
4715
|
), w = R(
|
|
4703
4716
|
() => d.value ? V.validation.issue(d.value.fieldIssues, "name") ?? d.value.nameIssue : null
|
|
4704
|
-
), C =
|
|
4717
|
+
), C = Y(!1);
|
|
4705
4718
|
function P() {
|
|
4706
4719
|
var $;
|
|
4707
4720
|
(($ = d.value) == null ? void 0 : $.translation.state) === "allowed" && (V.session.beginTranslationEdit(), C.value = !0);
|
|
@@ -4729,7 +4742,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4729
4742
|
(G) => $.session.setName(String(G ?? ""))
|
|
4730
4743
|
)
|
|
4731
4744
|
), {
|
|
4732
|
-
append:
|
|
4745
|
+
append: c(() => {
|
|
4733
4746
|
var G;
|
|
4734
4747
|
return [
|
|
4735
4748
|
s(F, {
|
|
@@ -4760,15 +4773,15 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4760
4773
|
], 64);
|
|
4761
4774
|
};
|
|
4762
4775
|
}
|
|
4763
|
-
}),
|
|
4776
|
+
}), ws = { class: "fm-typo-en-title-md-600" }, xs = { class: "flex flex-col gap-32 h-full min-h-0 py-16" }, Cs = { class: "flex-shrink-0" }, Fs = { class: "flex gap-8" }, $s = /* @__PURE__ */ ce({
|
|
4764
4777
|
__name: "ProductPacingSheet",
|
|
4765
4778
|
props: {
|
|
4766
4779
|
sdk: {},
|
|
4767
4780
|
initialProductIds: {}
|
|
4768
4781
|
},
|
|
4769
4782
|
emits: ["close", "created"],
|
|
4770
|
-
setup(
|
|
4771
|
-
const i =
|
|
4783
|
+
setup(H, { emit: V }) {
|
|
4784
|
+
const i = H, x = V, { t: o } = be(), { run: d } = Ue(), w = i.sdk.orderPacing.editor(), C = ll(() => w);
|
|
4772
4785
|
w.setLinkedProducts(i.initialProductIds);
|
|
4773
4786
|
const P = Le(w), m = R(
|
|
4774
4787
|
() => P.value.status === "ready" ? P.value.value : null
|
|
@@ -4780,7 +4793,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4780
4793
|
size: 75,
|
|
4781
4794
|
enableSorting: !1,
|
|
4782
4795
|
header: () => o("menu.order_pacing.link_product.table.column.default"),
|
|
4783
|
-
cell: (f) =>
|
|
4796
|
+
cell: (f) => X(B.FmCheckbox, {
|
|
4784
4797
|
modelValue: f.row.original.isDefault,
|
|
4785
4798
|
value: "",
|
|
4786
4799
|
"aria-label": o("menu.product.form.order_pacing.default_product", {
|
|
@@ -4805,8 +4818,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4805
4818
|
header: () => o("menu.order_pacing.link_product.table.column.current_default"),
|
|
4806
4819
|
cell: (f) => {
|
|
4807
4820
|
const k = f.row.original.currentDefault;
|
|
4808
|
-
return
|
|
4809
|
-
|
|
4821
|
+
return X("div", { class: "pt-1" }, [
|
|
4822
|
+
X(B.FmChip, {
|
|
4810
4823
|
label: k ? o("menu.order_pacing.columns.mins", { count: k.delay }) : o("menu.order_pacing.columns.none"),
|
|
4811
4824
|
variant: "plain",
|
|
4812
4825
|
compact: !0,
|
|
@@ -4820,7 +4833,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4820
4833
|
size: 40,
|
|
4821
4834
|
meta: { cellClass: "" },
|
|
4822
4835
|
enableSorting: !1,
|
|
4823
|
-
cell: (f) =>
|
|
4836
|
+
cell: (f) => X(B.FmButton, {
|
|
4824
4837
|
prependIcon: "delete",
|
|
4825
4838
|
variant: "tertiary",
|
|
4826
4839
|
"aria-label": o("menu.common.labels.a11y_labelled_name", {
|
|
@@ -4830,7 +4843,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4830
4843
|
onClick: () => w.unlinkProduct(f.row.original.productId)
|
|
4831
4844
|
})
|
|
4832
4845
|
}
|
|
4833
|
-
]), F =
|
|
4846
|
+
]), F = Y(!1), L = Y(!1);
|
|
4834
4847
|
function E() {
|
|
4835
4848
|
var f;
|
|
4836
4849
|
((f = m.value) == null ? void 0 : f.translation.state) === "allowed" && (w.beginTranslationEdit(), L.value = !0);
|
|
@@ -4864,18 +4877,18 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4864
4877
|
"is-container": e(B).FmForm,
|
|
4865
4878
|
"is-container-props": { onValidationSuccess: v },
|
|
4866
4879
|
"max-width": 600,
|
|
4867
|
-
"onUpdate:modelValue": k[2] || (k[2] = (
|
|
4880
|
+
"onUpdate:modelValue": k[2] || (k[2] = (p) => !p && x("close"))
|
|
4868
4881
|
}, {
|
|
4869
|
-
"side-sheet-header":
|
|
4870
|
-
n("p",
|
|
4882
|
+
"side-sheet-header": c(() => [
|
|
4883
|
+
n("p", ws, I(e(o)("menu.order_pacing.manager.dialog.add.title")), 1)
|
|
4871
4884
|
]),
|
|
4872
|
-
"side-sheet-footer":
|
|
4873
|
-
var
|
|
4885
|
+
"side-sheet-footer": c(() => {
|
|
4886
|
+
var p;
|
|
4874
4887
|
return [
|
|
4875
|
-
n("div",
|
|
4888
|
+
n("div", Fs, [
|
|
4876
4889
|
s(O, {
|
|
4877
4890
|
label: e(o)("menu.order_pacing.manager.dialog.add.action"),
|
|
4878
|
-
disabled: ((
|
|
4891
|
+
disabled: ((p = m.value) == null ? void 0 : p.submit.state) !== "allowed",
|
|
4879
4892
|
variant: "primary",
|
|
4880
4893
|
size: "lg",
|
|
4881
4894
|
type: "submit"
|
|
@@ -4889,21 +4902,21 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4889
4902
|
])
|
|
4890
4903
|
];
|
|
4891
4904
|
}),
|
|
4892
|
-
default:
|
|
4893
|
-
n("div",
|
|
4894
|
-
s(
|
|
4905
|
+
default: c(() => [
|
|
4906
|
+
n("div", xs, [
|
|
4907
|
+
s(va, {
|
|
4895
4908
|
view: m.value,
|
|
4896
4909
|
session: e(w),
|
|
4897
4910
|
validation: e(C)
|
|
4898
4911
|
}, {
|
|
4899
|
-
"name-append":
|
|
4900
|
-
var
|
|
4912
|
+
"name-append": c(() => {
|
|
4913
|
+
var p;
|
|
4901
4914
|
return [
|
|
4902
4915
|
s(O, {
|
|
4903
4916
|
"aria-label": e(o)("menu.common.translation.translation_label"),
|
|
4904
4917
|
icon: "g_translate",
|
|
4905
4918
|
variant: "tertiary",
|
|
4906
|
-
disabled: ((
|
|
4919
|
+
disabled: ((p = m.value) == null ? void 0 : p.translation.state) !== "allowed",
|
|
4907
4920
|
onClick: E
|
|
4908
4921
|
}, null, 8, ["aria-label", "disabled"])
|
|
4909
4922
|
];
|
|
@@ -4914,24 +4927,24 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4914
4927
|
title: e(o)("menu.order_pacing.product.title"),
|
|
4915
4928
|
"sub-title": e(o)("menu.order_pacing.product.subtitle")
|
|
4916
4929
|
}, {
|
|
4917
|
-
"append-title":
|
|
4918
|
-
n("div",
|
|
4930
|
+
"append-title": c(() => [
|
|
4931
|
+
n("div", Cs, [
|
|
4919
4932
|
s(O, {
|
|
4920
4933
|
"border-color": e(Vl).ColorPrimary,
|
|
4921
4934
|
label: e(o)("menu.order_pacing.link_product.title"),
|
|
4922
4935
|
"prepend-icon": "link",
|
|
4923
4936
|
"text-color": e(Vl).ColorPrimary,
|
|
4924
4937
|
variant: "secondary",
|
|
4925
|
-
onClick: k[0] || (k[0] = (
|
|
4938
|
+
onClick: k[0] || (k[0] = (p) => F.value = !0)
|
|
4926
4939
|
}, null, 8, ["border-color", "label", "text-color"])
|
|
4927
4940
|
])
|
|
4928
4941
|
]),
|
|
4929
|
-
default:
|
|
4930
|
-
var
|
|
4942
|
+
default: c(() => {
|
|
4943
|
+
var p;
|
|
4931
4944
|
return [
|
|
4932
4945
|
s(Q, {
|
|
4933
4946
|
"column-defs": _.value,
|
|
4934
|
-
"row-data": [...((
|
|
4947
|
+
"row-data": [...((p = m.value) == null ? void 0 : p.linkedProducts) ?? []],
|
|
4935
4948
|
"page-size": 999,
|
|
4936
4949
|
"shrink-at": !1,
|
|
4937
4950
|
"hide-footer": ""
|
|
@@ -4947,7 +4960,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4947
4960
|
m.value ? (r(), T(il, {
|
|
4948
4961
|
key: 0,
|
|
4949
4962
|
modelValue: L.value,
|
|
4950
|
-
"onUpdate:modelValue": k[3] || (k[3] = (
|
|
4963
|
+
"onUpdate:modelValue": k[3] || (k[3] = (p) => L.value = p),
|
|
4951
4964
|
dirty: m.value.translationDirty,
|
|
4952
4965
|
name: m.value.name,
|
|
4953
4966
|
"name-locale": m.value.nameLocale,
|
|
@@ -4959,9 +4972,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4959
4972
|
"onUpdate:name": e(w).setName,
|
|
4960
4973
|
"onUpdate:nameLocale": e(w).setNameLocale
|
|
4961
4974
|
}, null, 8, ["modelValue", "dirty", "name", "name-locale", "name-section-label", "supported-locales", "title", "onUpdate:name", "onUpdate:nameLocale"])) : y("", !0),
|
|
4962
|
-
s(
|
|
4975
|
+
s(ma, {
|
|
4963
4976
|
modelValue: F.value,
|
|
4964
|
-
"onUpdate:modelValue": k[4] || (k[4] = (
|
|
4977
|
+
"onUpdate:modelValue": k[4] || (k[4] = (p) => F.value = p),
|
|
4965
4978
|
catalogue: $.value,
|
|
4966
4979
|
"selected-product-ids": ((a = m.value) == null ? void 0 : a.linkedProductIds) ?? [],
|
|
4967
4980
|
onSubmit: g
|
|
@@ -4969,14 +4982,14 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4969
4982
|
], 64);
|
|
4970
4983
|
};
|
|
4971
4984
|
}
|
|
4972
|
-
}),
|
|
4985
|
+
}), Ss = { class: "fm-typo-en-title-md-600" }, Vs = { class: "pt-8 space-y-24" }, Ps = { class: "flex gap-8 items-center justify-start" }, Us = "menu.print_route.department_dialog.sections.route_detail.name.required", Is = /* @__PURE__ */ ce({
|
|
4973
4986
|
__name: "ProductPrintRouteSheet",
|
|
4974
4987
|
props: {
|
|
4975
4988
|
sdk: {}
|
|
4976
4989
|
},
|
|
4977
4990
|
emits: ["close", "created"],
|
|
4978
|
-
setup(
|
|
4979
|
-
const i =
|
|
4991
|
+
setup(H, { emit: V }) {
|
|
4992
|
+
const i = H, x = V, { t: o } = be(), d = Pe(), { run: w } = Ue(), C = i.sdk.printDepartment.editor(), P = Le(C), m = R(
|
|
4980
4993
|
() => P.value.status === "ready" ? P.value.value : null
|
|
4981
4994
|
), l = ll(() => C), $ = R(
|
|
4982
4995
|
() => m.value ? l.issue(m.value.fieldIssues, "name") : null
|
|
@@ -4984,7 +4997,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
4984
4997
|
ke(() => C.dispose());
|
|
4985
4998
|
const _ = R(() => {
|
|
4986
4999
|
const L = $.value;
|
|
4987
|
-
return L ? L.code !==
|
|
5000
|
+
return L ? L.code !== Us ? d(L) : o("menu.print_dept.validation.name_required") : "";
|
|
4988
5001
|
});
|
|
4989
5002
|
async function F() {
|
|
4990
5003
|
var G;
|
|
@@ -5007,13 +5020,13 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5007
5020
|
"dismiss-away": "",
|
|
5008
5021
|
"onUpdate:modelValue": E[1] || (E[1] = (v) => v || x("close"))
|
|
5009
5022
|
}, {
|
|
5010
|
-
"side-sheet-header":
|
|
5011
|
-
n("p",
|
|
5023
|
+
"side-sheet-header": c(() => [
|
|
5024
|
+
n("p", Ss, I(e(o)("menu.print_dept.add")), 1)
|
|
5012
5025
|
]),
|
|
5013
|
-
"side-sheet-footer":
|
|
5026
|
+
"side-sheet-footer": c(() => {
|
|
5014
5027
|
var v, g;
|
|
5015
5028
|
return [
|
|
5016
|
-
n("div",
|
|
5029
|
+
n("div", Ps, [
|
|
5017
5030
|
s(G, {
|
|
5018
5031
|
label: e(o)("menu.common.actions.add"),
|
|
5019
5032
|
size: "lg",
|
|
@@ -5030,10 +5043,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5030
5043
|
])
|
|
5031
5044
|
];
|
|
5032
5045
|
}),
|
|
5033
|
-
default:
|
|
5046
|
+
default: c(() => {
|
|
5034
5047
|
var v;
|
|
5035
5048
|
return [
|
|
5036
|
-
n("div",
|
|
5049
|
+
n("div", Vs, [
|
|
5037
5050
|
s(ge, Ce({
|
|
5038
5051
|
autofocus: "",
|
|
5039
5052
|
label: e(o)("menu.print_dept.columns.name"),
|
|
@@ -5047,20 +5060,20 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5047
5060
|
}, 8, ["is-container", "is-container-props"]);
|
|
5048
5061
|
};
|
|
5049
5062
|
}
|
|
5050
|
-
}),
|
|
5063
|
+
}), Ts = { class: "fm-typo-en-title-md-600" }, As = { class: "flex gap-8 items-center justify-start" }, Bs = /* @__PURE__ */ ce({
|
|
5051
5064
|
__name: "ProductTakeawaySheet",
|
|
5052
5065
|
props: {
|
|
5053
5066
|
sdk: {}
|
|
5054
5067
|
},
|
|
5055
5068
|
emits: ["close", "created"],
|
|
5056
|
-
setup(
|
|
5057
|
-
const i =
|
|
5069
|
+
setup(H, { emit: V }) {
|
|
5070
|
+
const i = H, x = V, { t: o } = be(), d = Pe(), { run: w } = Ue(), C = i.sdk.takeaway.editor(), P = Le(C), m = R(
|
|
5058
5071
|
() => P.value.status === "ready" ? P.value.value : null
|
|
5059
5072
|
), l = ll(() => C), $ = R(
|
|
5060
5073
|
() => m.value ? l.issue(m.value.fieldIssues, "name") : null
|
|
5061
5074
|
);
|
|
5062
5075
|
ke(() => C.dispose());
|
|
5063
|
-
const _ =
|
|
5076
|
+
const _ = Y(!1);
|
|
5064
5077
|
function F() {
|
|
5065
5078
|
var A;
|
|
5066
5079
|
((A = m.value) == null ? void 0 : A.translation.state) === "allowed" && (C.beginTranslationEdit(), _.value = !0);
|
|
@@ -5091,13 +5104,13 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5091
5104
|
"max-width": 560,
|
|
5092
5105
|
"onUpdate:modelValue": v[2] || (v[2] = (k) => k || x("close"))
|
|
5093
5106
|
}, {
|
|
5094
|
-
"side-sheet-header":
|
|
5095
|
-
n("p",
|
|
5107
|
+
"side-sheet-header": c(() => [
|
|
5108
|
+
n("p", Ts, I(e(o)("menu.takeaway.add")), 1)
|
|
5096
5109
|
]),
|
|
5097
|
-
"side-sheet-footer":
|
|
5110
|
+
"side-sheet-footer": c(() => {
|
|
5098
5111
|
var k, O;
|
|
5099
5112
|
return [
|
|
5100
|
-
n("div",
|
|
5113
|
+
n("div", As, [
|
|
5101
5114
|
s(g, {
|
|
5102
5115
|
label: e(o)("menu.common.actions.add"),
|
|
5103
5116
|
size: "lg",
|
|
@@ -5114,9 +5127,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5114
5127
|
])
|
|
5115
5128
|
];
|
|
5116
5129
|
}),
|
|
5117
|
-
default:
|
|
5130
|
+
default: c(() => [
|
|
5118
5131
|
s(qe, null, {
|
|
5119
|
-
default:
|
|
5132
|
+
default: c(() => {
|
|
5120
5133
|
var k, O;
|
|
5121
5134
|
return [
|
|
5122
5135
|
s(ge, Ce({
|
|
@@ -5126,7 +5139,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5126
5139
|
"model-value": ((k = m.value) == null ? void 0 : k.name) ?? "",
|
|
5127
5140
|
"error-messages": $.value ? [e(d)($.value)] : []
|
|
5128
5141
|
}, e(l).field("name", e(C).setName)), {
|
|
5129
|
-
append:
|
|
5142
|
+
append: c(() => {
|
|
5130
5143
|
var Q;
|
|
5131
5144
|
return [
|
|
5132
5145
|
s(g, {
|
|
@@ -5147,7 +5160,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5147
5160
|
"model-value": ((O = m.value) == null ? void 0 : O.price) ?? "",
|
|
5148
5161
|
"onUpdate:modelValue": v[0] || (v[0] = (Q) => e(C).setPrice(Q))
|
|
5149
5162
|
}, {
|
|
5150
|
-
prepend:
|
|
5163
|
+
prepend: c(() => {
|
|
5151
5164
|
var Q;
|
|
5152
5165
|
return [
|
|
5153
5166
|
n("span", null, I((Q = m.value) == null ? void 0 : Q.currencySymbol), 1)
|
|
@@ -5184,24 +5197,24 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5184
5197
|
], 64);
|
|
5185
5198
|
};
|
|
5186
5199
|
}
|
|
5187
|
-
}),
|
|
5200
|
+
}), Os = { class: "fm-typo-en-title-md-600" }, Ls = {
|
|
5188
5201
|
key: 0,
|
|
5189
5202
|
class: "py-16 space-y-32"
|
|
5190
|
-
},
|
|
5203
|
+
}, zs = ["data-not-allow-sort"], Ds = {
|
|
5191
5204
|
key: 1,
|
|
5192
5205
|
class: "w-24"
|
|
5193
|
-
},
|
|
5206
|
+
}, Rs = { class: "flex-1" }, Ms = { class: "flex items-center gap-8" }, Ns = {
|
|
5194
5207
|
key: 0,
|
|
5195
5208
|
role: "alert",
|
|
5196
5209
|
class: "text-fm-color-danger"
|
|
5197
|
-
},
|
|
5210
|
+
}, Es = { class: "flex gap-8 items-center justify-start" }, qs = /* @__PURE__ */ ce({
|
|
5198
5211
|
__name: "ProductVariantCreateSheet",
|
|
5199
5212
|
props: {
|
|
5200
5213
|
sdk: {}
|
|
5201
5214
|
},
|
|
5202
5215
|
emits: ["close", "created"],
|
|
5203
|
-
setup(
|
|
5204
|
-
const i =
|
|
5216
|
+
setup(H, { emit: V }) {
|
|
5217
|
+
const i = H, x = V, { t: o } = be(), d = Xe(), w = Pe(), { run: C } = Ue(), P = i.sdk.variant.editor(), m = Le(P), l = R(
|
|
5205
5218
|
() => m.value.status === "ready" ? m.value.value : null
|
|
5206
5219
|
), $ = ll(() => P), _ = R(
|
|
5207
5220
|
() => l.value ? $.issue(l.value.fieldIssues, "name") ?? l.value.nameIssue : null
|
|
@@ -5209,11 +5222,11 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5209
5222
|
() => l.value ? $.issue(l.value.fieldIssues, "options") ?? l.value.optionsIssue : null
|
|
5210
5223
|
);
|
|
5211
5224
|
function L(ee) {
|
|
5212
|
-
const { ref: a, ...
|
|
5225
|
+
const { ref: a, ...p } = $.field(
|
|
5213
5226
|
"options",
|
|
5214
5227
|
(ne) => P.setOptionName(ee, ne)
|
|
5215
5228
|
);
|
|
5216
|
-
return
|
|
5229
|
+
return p;
|
|
5217
5230
|
}
|
|
5218
5231
|
const E = /* @__PURE__ */ new Map();
|
|
5219
5232
|
function G(ee, a) {
|
|
@@ -5259,8 +5272,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5259
5272
|
x("created", ee), x("close");
|
|
5260
5273
|
return;
|
|
5261
5274
|
}
|
|
5262
|
-
const
|
|
5263
|
-
(h, se) => se <
|
|
5275
|
+
const p = ((le = l.value) == null ? void 0 : le.options) ?? [], ne = p.findIndex(
|
|
5276
|
+
(h, se) => se < p.length - 1 && !h.name.trim()
|
|
5264
5277
|
);
|
|
5265
5278
|
a.kind === "rejected" && a.issues.some((h) => h.field === "options") && ((ve = F.value) == null ? void 0 : ve.code) === "menu.variant.form.options.name_required" && ne >= 0 && (await Je(), (b = E.get(ne)) == null || b.focus());
|
|
5266
5279
|
}
|
|
@@ -5276,7 +5289,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5276
5289
|
return ke(() => {
|
|
5277
5290
|
g(), P.dispose();
|
|
5278
5291
|
}), (ee, a) => {
|
|
5279
|
-
const
|
|
5292
|
+
const p = M("FmButton"), ne = M("FmSideSheet");
|
|
5280
5293
|
return r(), S(re, null, [
|
|
5281
5294
|
s(ne, {
|
|
5282
5295
|
"model-value": !0,
|
|
@@ -5285,21 +5298,21 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5285
5298
|
"is-container-props": { onValidationSuccess: O },
|
|
5286
5299
|
"onOn:clickedAway": k
|
|
5287
5300
|
}, {
|
|
5288
|
-
"side-sheet-header":
|
|
5289
|
-
n("p",
|
|
5301
|
+
"side-sheet-header": c(() => [
|
|
5302
|
+
n("p", Os, I(e(o)("menu.variant.form.title.add")), 1)
|
|
5290
5303
|
]),
|
|
5291
|
-
"side-sheet-footer":
|
|
5304
|
+
"side-sheet-footer": c(() => {
|
|
5292
5305
|
var pe;
|
|
5293
5306
|
return [
|
|
5294
|
-
n("div",
|
|
5295
|
-
s(
|
|
5307
|
+
n("div", Es, [
|
|
5308
|
+
s(p, {
|
|
5296
5309
|
label: e(o)("menu.common.actions.add"),
|
|
5297
5310
|
disabled: ((pe = l.value) == null ? void 0 : pe.submit.state) !== "allowed",
|
|
5298
5311
|
size: "lg",
|
|
5299
5312
|
type: "submit",
|
|
5300
5313
|
variant: "primary"
|
|
5301
5314
|
}, null, 8, ["label", "disabled"]),
|
|
5302
|
-
s(
|
|
5315
|
+
s(p, {
|
|
5303
5316
|
label: e(o)("menu.common.actions.cancel"),
|
|
5304
5317
|
size: "lg",
|
|
5305
5318
|
variant: "tertiary",
|
|
@@ -5308,12 +5321,12 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5308
5321
|
])
|
|
5309
5322
|
];
|
|
5310
5323
|
}),
|
|
5311
|
-
default:
|
|
5312
|
-
l.value ? (r(), S("div",
|
|
5324
|
+
default: c(() => [
|
|
5325
|
+
l.value ? (r(), S("div", Ls, [
|
|
5313
5326
|
s(qe, {
|
|
5314
5327
|
title: e(o)("menu.variant.form.detail")
|
|
5315
5328
|
}, {
|
|
5316
|
-
default:
|
|
5329
|
+
default: c(() => [
|
|
5317
5330
|
s(ge, Ce({
|
|
5318
5331
|
autofocus: "",
|
|
5319
5332
|
"model-value": l.value.name,
|
|
@@ -5322,8 +5335,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5322
5335
|
"error-messages": _.value ? [e(w)(_.value)] : [],
|
|
5323
5336
|
"helper-text": e(o)("menu.variant.form.name.helper")
|
|
5324
5337
|
}, e($).field("name", e(P).setName)), {
|
|
5325
|
-
append:
|
|
5326
|
-
s(
|
|
5338
|
+
append: c(() => [
|
|
5339
|
+
s(p, {
|
|
5327
5340
|
class: "!p-0",
|
|
5328
5341
|
icon: "g_translate",
|
|
5329
5342
|
variant: "tertiary",
|
|
@@ -5336,7 +5349,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5336
5349
|
s(Oe, {
|
|
5337
5350
|
label: e(o)("menu.variant.form.options.title")
|
|
5338
5351
|
}, {
|
|
5339
|
-
default:
|
|
5352
|
+
default: c(() => [
|
|
5340
5353
|
n("div", null, [
|
|
5341
5354
|
s(ml, {
|
|
5342
5355
|
items: Q.value,
|
|
@@ -5344,12 +5357,12 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5344
5357
|
"lock-last": "",
|
|
5345
5358
|
onReorder: a[3] || (a[3] = (pe) => e(P).reorderOptions(pe))
|
|
5346
5359
|
}, {
|
|
5347
|
-
item:
|
|
5360
|
+
item: c(({ element: pe, index: le }) => [
|
|
5348
5361
|
n("div", {
|
|
5349
5362
|
class: "flex items-center space-x-8",
|
|
5350
5363
|
"data-not-allow-sort": le === l.value.options.length - 1
|
|
5351
5364
|
}, [
|
|
5352
|
-
le !== l.value.options.length - 1 ? (r(), T(
|
|
5365
|
+
le !== l.value.options.length - 1 ? (r(), T(p, {
|
|
5353
5366
|
key: 0,
|
|
5354
5367
|
class: "handle",
|
|
5355
5368
|
"prepend-icon": "drag_handle",
|
|
@@ -5357,8 +5370,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5357
5370
|
"aria-label": e(o)("menu.variant.form.options.move", { number: le + 1 }),
|
|
5358
5371
|
onClick: a[1] || (a[1] = Ee(() => {
|
|
5359
5372
|
}, ["stop"]))
|
|
5360
|
-
}, null, 8, ["aria-label"])) : le > 0 ? (r(), S("div",
|
|
5361
|
-
n("div",
|
|
5373
|
+
}, null, 8, ["aria-label"])) : le > 0 ? (r(), S("div", Ds)) : y("", !0),
|
|
5374
|
+
n("div", Rs, [
|
|
5362
5375
|
s(ge, Ce({
|
|
5363
5376
|
"model-value": pe.label,
|
|
5364
5377
|
placeholder: e(o)("menu.variant.form.options.placeholder"),
|
|
@@ -5371,9 +5384,9 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5371
5384
|
}, L(le)), cl({ _: 2 }, [
|
|
5372
5385
|
le !== l.value.options.length - 1 ? {
|
|
5373
5386
|
name: "append",
|
|
5374
|
-
fn:
|
|
5375
|
-
n("div",
|
|
5376
|
-
s(
|
|
5387
|
+
fn: c(() => [
|
|
5388
|
+
n("div", Ms, [
|
|
5389
|
+
s(p, {
|
|
5377
5390
|
class: "!p-0",
|
|
5378
5391
|
icon: "g_translate",
|
|
5379
5392
|
variant: "tertiary",
|
|
@@ -5382,7 +5395,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5382
5395
|
}),
|
|
5383
5396
|
onClick: a[2] || (a[2] = (ve) => f("options"))
|
|
5384
5397
|
}, null, 8, ["aria-label"]),
|
|
5385
|
-
s(
|
|
5398
|
+
s(p, {
|
|
5386
5399
|
class: "!p-0",
|
|
5387
5400
|
icon: "close",
|
|
5388
5401
|
variant: "plain",
|
|
@@ -5397,11 +5410,11 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5397
5410
|
} : void 0
|
|
5398
5411
|
]), 1040, ["model-value", "placeholder", "aria-label"])
|
|
5399
5412
|
])
|
|
5400
|
-
], 8,
|
|
5413
|
+
], 8, zs)
|
|
5401
5414
|
]),
|
|
5402
5415
|
_: 1
|
|
5403
5416
|
}, 8, ["items"]),
|
|
5404
|
-
F.value ? (r(), S("p",
|
|
5417
|
+
F.value ? (r(), S("p", Ns, I(e(w)(F.value)), 1)) : y("", !0)
|
|
5405
5418
|
])
|
|
5406
5419
|
]),
|
|
5407
5420
|
_: 1
|
|
@@ -5413,7 +5426,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5413
5426
|
]),
|
|
5414
5427
|
_: 1
|
|
5415
5428
|
}, 8, ["is-container", "is-container-props"]),
|
|
5416
|
-
A.value ? (r(), T(
|
|
5429
|
+
A.value ? (r(), T(ba, {
|
|
5417
5430
|
key: 0,
|
|
5418
5431
|
session: A.value,
|
|
5419
5432
|
"expanded-section": v.value,
|
|
@@ -5422,7 +5435,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5422
5435
|
], 64);
|
|
5423
5436
|
};
|
|
5424
5437
|
}
|
|
5425
|
-
}),
|
|
5438
|
+
}), Bl = {
|
|
5426
5439
|
category: {
|
|
5427
5440
|
title: "menu.category.manager.dialog.add.title",
|
|
5428
5441
|
label: "menu.category.name",
|
|
@@ -5435,7 +5448,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5435
5448
|
action: "menu.subcategory.manager.dialog.add.action",
|
|
5436
5449
|
success: "menu.subcategory.manager.dialog.add.success"
|
|
5437
5450
|
}
|
|
5438
|
-
},
|
|
5451
|
+
}, pi = /* @__PURE__ */ ce({
|
|
5439
5452
|
__name: "ProductInlineCreateHost",
|
|
5440
5453
|
props: {
|
|
5441
5454
|
sdk: {},
|
|
@@ -5443,8 +5456,8 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5443
5456
|
presentation: {}
|
|
5444
5457
|
},
|
|
5445
5458
|
emits: ["created"],
|
|
5446
|
-
setup(
|
|
5447
|
-
const x =
|
|
5459
|
+
setup(H, { expose: V, emit: i }) {
|
|
5460
|
+
const x = H, o = i, d = (A, v) => o("created", { kind: A, name: v }), { t: w } = be(), C = Xe(), { run: P } = Ue(), m = ye(null), l = ll(() => m.value), $ = Y(!1), _ = Y(!1), F = Y(!1), L = Y(!1), E = Y(!1);
|
|
5448
5461
|
function G(A) {
|
|
5449
5462
|
if (A === "printRoute") {
|
|
5450
5463
|
L.value = !0;
|
|
@@ -5469,7 +5482,7 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5469
5482
|
if (A === "priceGroup") {
|
|
5470
5483
|
C.open({
|
|
5471
5484
|
title: w("menu.price_tier.add_price_group"),
|
|
5472
|
-
contentComponent:
|
|
5485
|
+
contentComponent: pa,
|
|
5473
5486
|
primaryActions: {
|
|
5474
5487
|
text: w("menu.category.manager.dialog.add.action"),
|
|
5475
5488
|
close: !1
|
|
@@ -5488,10 +5501,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5488
5501
|
if (A === "category") {
|
|
5489
5502
|
const v = x.sdk.category.editor();
|
|
5490
5503
|
m.value = v;
|
|
5491
|
-
const g =
|
|
5504
|
+
const g = Bl.category;
|
|
5492
5505
|
C.open({
|
|
5493
5506
|
title: w(g.title),
|
|
5494
|
-
contentComponent:
|
|
5507
|
+
contentComponent: hs,
|
|
5495
5508
|
contentComponentProps: {
|
|
5496
5509
|
session: v,
|
|
5497
5510
|
label: w(g.label),
|
|
@@ -5513,10 +5526,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5513
5526
|
if (A === "subcategory") {
|
|
5514
5527
|
const v = x.sdk.subCategory.editor();
|
|
5515
5528
|
m.value = v;
|
|
5516
|
-
const g =
|
|
5529
|
+
const g = Bl.subcategory;
|
|
5517
5530
|
C.open({
|
|
5518
5531
|
title: w(g.title),
|
|
5519
|
-
contentComponent:
|
|
5532
|
+
contentComponent: ks,
|
|
5520
5533
|
contentComponentProps: {
|
|
5521
5534
|
session: v,
|
|
5522
5535
|
label: w(g.label),
|
|
@@ -5536,33 +5549,33 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5536
5549
|
}
|
|
5537
5550
|
}
|
|
5538
5551
|
return V({ open: G }), (A, v) => (r(), S(re, null, [
|
|
5539
|
-
$.value ? (r(), T(
|
|
5552
|
+
$.value ? (r(), T(da, {
|
|
5540
5553
|
key: 0,
|
|
5541
5554
|
presentation: A.presentation,
|
|
5542
5555
|
sdk: A.sdk,
|
|
5543
5556
|
onClose: v[0] || (v[0] = (g) => $.value = !1),
|
|
5544
5557
|
onCreated: v[1] || (v[1] = (g) => d("group", g))
|
|
5545
5558
|
}, null, 8, ["presentation", "sdk"])) : y("", !0),
|
|
5546
|
-
_.value ? (r(), T(
|
|
5559
|
+
_.value ? (r(), T(qs, {
|
|
5547
5560
|
key: 1,
|
|
5548
5561
|
sdk: A.sdk,
|
|
5549
5562
|
onClose: v[2] || (v[2] = (g) => _.value = !1),
|
|
5550
5563
|
onCreated: v[3] || (v[3] = (g) => d("variant", g))
|
|
5551
5564
|
}, null, 8, ["sdk"])) : y("", !0),
|
|
5552
|
-
F.value ? (r(), T(
|
|
5565
|
+
F.value ? (r(), T($s, {
|
|
5553
5566
|
key: 2,
|
|
5554
5567
|
"initial-product-ids": A.itemId ? [A.itemId] : [],
|
|
5555
5568
|
sdk: A.sdk,
|
|
5556
5569
|
onClose: v[4] || (v[4] = (g) => F.value = !1),
|
|
5557
5570
|
onCreated: v[5] || (v[5] = (g) => d("pacing", g))
|
|
5558
5571
|
}, null, 8, ["initial-product-ids", "sdk"])) : y("", !0),
|
|
5559
|
-
L.value ? (r(), T(
|
|
5572
|
+
L.value ? (r(), T(Is, {
|
|
5560
5573
|
key: 3,
|
|
5561
5574
|
sdk: A.sdk,
|
|
5562
5575
|
onClose: v[6] || (v[6] = (g) => L.value = !1),
|
|
5563
5576
|
onCreated: v[7] || (v[7] = (g) => d("printRoute", g))
|
|
5564
5577
|
}, null, 8, ["sdk"])) : y("", !0),
|
|
5565
|
-
E.value ? (r(), T(
|
|
5578
|
+
E.value ? (r(), T(Bs, {
|
|
5566
5579
|
key: 4,
|
|
5567
5580
|
sdk: A.sdk,
|
|
5568
5581
|
onClose: v[8] || (v[8] = (g) => E.value = !1),
|
|
@@ -5572,10 +5585,10 @@ const ml = /* @__PURE__ */ ce({
|
|
|
5572
5585
|
}
|
|
5573
5586
|
});
|
|
5574
5587
|
export {
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5588
|
+
Bl as I,
|
|
5589
|
+
ci as P,
|
|
5590
|
+
pi as _,
|
|
5591
|
+
ql as a,
|
|
5592
|
+
ho as b,
|
|
5593
|
+
El as u
|
|
5581
5594
|
};
|