@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,69 +1,70 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { useDialog as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { _ as
|
|
1
|
+
import { defineComponent as pe, computed as k, ref as $e, shallowRef as B, h as x, withModifiers as re, onUnmounted as Le, resolveComponent as C, openBlock as i, createBlock as b, unref as t, withCtx as v, createElementBlock as h, toDisplayString as S, Fragment as ue, createElementVNode as d, normalizeClass as ce, createVNode as r, renderList as Pe, createCommentVNode as $, mergeProps as me, createSlots as Te, nextTick as Ve } from "vue";
|
|
2
|
+
import { _ as Ee, d as Oe } from "./vuedraggable-CBtQLb_S.js";
|
|
3
|
+
import { useI18n as Ie } from "@feedmepos/mf-common";
|
|
4
|
+
import { useDialog as ze, useBreakpoints as Me, components as de, FmButtonVariant as H } from "@feedmepos/ui-library";
|
|
5
|
+
import { _ as je } from "./PhoneFab.vue_vue_type_script_setup_true_lang-CipbTqbp.js";
|
|
6
|
+
import { _ as Be } from "./ApplyProduct.vue_vue_type_script_setup_true_lang-CPh1GBw9.js";
|
|
7
|
+
import { _ as Ue } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
8
|
+
import { _ as Ae } from "./ProductVariantTranslationSheet.vue_vue_type_script_setup_true_lang-C4iK-sAd.js";
|
|
9
|
+
import { _ as Ne } from "./FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js";
|
|
10
|
+
import { _ as qe } from "./PageLayout.vue_vue_type_script_setup_true_lang-DrhsROXo.js";
|
|
10
11
|
import { _ as ve } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-CAkLEmSA.js";
|
|
11
|
-
import { u as
|
|
12
|
-
import { u as
|
|
13
|
-
import { b as
|
|
14
|
-
const
|
|
12
|
+
import { u as De } from "./useActionFeedback-CElXij1W.js";
|
|
13
|
+
import { u as Re } from "./useEditorValidation-Ctef5Bxt.js";
|
|
14
|
+
import { b as Qe, u as Ge, a as He } from "./provide-BGLSDsuJ.js";
|
|
15
|
+
const Ke = {
|
|
15
16
|
key: 0,
|
|
16
17
|
class: "text-fm-color-typo-secondary",
|
|
17
18
|
role: "alert"
|
|
18
|
-
},
|
|
19
|
+
}, Je = {
|
|
19
20
|
key: 1,
|
|
20
21
|
class: "text-fm-color-typo-secondary",
|
|
21
22
|
"data-menu-state": "unavailable"
|
|
22
|
-
},
|
|
23
|
-
key:
|
|
24
|
-
class: "
|
|
25
|
-
},
|
|
23
|
+
}, We = { class: "flex justify-end items-center" }, Xe = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "mt-8 flex-1 min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
26
|
+
}, Ye = ["onClick"], Ze = { class: "min-w-0 flex-1 space-y-4" }, ea = { class: "fm-typo-en-body-lg-600 break-words" }, aa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ta = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary break-words" }, na = { key: 1 }, oa = { class: "fm-typo-en-title-md-600" }, la = { class: "py-16 space-y-32" }, sa = ["data-not-allow-sort"], ia = {
|
|
26
27
|
key: 1,
|
|
27
28
|
class: "w-24"
|
|
28
|
-
},
|
|
29
|
+
}, ra = { class: "flex-1" }, ua = { class: "flex items-center gap-8" }, ca = { class: "flex gap-8 items-center justify-start" }, ma = /* @__PURE__ */ pe({
|
|
29
30
|
__name: "VariantList",
|
|
30
31
|
props: {
|
|
31
32
|
sdk: {}
|
|
32
33
|
},
|
|
33
34
|
setup(K) {
|
|
34
|
-
const
|
|
35
|
-
() =>
|
|
36
|
-
), W =
|
|
35
|
+
const y = K, { t: a } = Ie(), L = Qe(), J = ze(), { breakpoints: fe } = Me(), { run: U } = De(), g = Ge(y.sdk.variant.list), c = k(
|
|
36
|
+
() => g.value.status === "ready" ? g.value.value : null
|
|
37
|
+
), W = k(() => {
|
|
37
38
|
var e;
|
|
38
39
|
return ((e = c.value) == null ? void 0 : e.query) ?? "";
|
|
39
|
-
}), P =
|
|
40
|
-
|
|
40
|
+
}), P = k(() => fe.value.xs), T = $e(!1), u = B(
|
|
41
|
+
y.sdk.variant.editor()
|
|
41
42
|
), V = B(
|
|
42
43
|
u.value.get()
|
|
43
44
|
);
|
|
44
45
|
let A = u.value.subscribe(
|
|
45
46
|
(e) => V.value = e
|
|
46
47
|
);
|
|
47
|
-
const l =
|
|
48
|
+
const l = k(
|
|
48
49
|
() => V.value.status === "ready" ? V.value.value : null
|
|
49
|
-
),
|
|
50
|
-
() => l.value ?
|
|
51
|
-
), Y =
|
|
52
|
-
() => l.value ?
|
|
50
|
+
), E = Re(() => u.value), X = k(
|
|
51
|
+
() => l.value ? E.issue(l.value.fieldIssues, "name") ?? l.value.nameIssue : null
|
|
52
|
+
), Y = k(
|
|
53
|
+
() => l.value ? E.issue(l.value.fieldIssues, "options") ?? l.value.optionsIssue : null
|
|
53
54
|
);
|
|
54
|
-
function
|
|
55
|
-
const { ref: n, ...o } =
|
|
55
|
+
function _e(e) {
|
|
56
|
+
const { ref: n, ...o } = E.field(
|
|
56
57
|
"options",
|
|
57
58
|
(m) => u.value.setOptionName(e, m)
|
|
58
59
|
);
|
|
59
60
|
return o;
|
|
60
61
|
}
|
|
61
|
-
const w = B(null), Z = B("variant"),
|
|
62
|
+
const w = B(null), Z = B("variant"), be = k(() => {
|
|
62
63
|
var e;
|
|
63
64
|
return ((e = l.value) == null ? void 0 : e.linkedGroups) ?? [];
|
|
64
65
|
}), N = /* @__PURE__ */ new Map();
|
|
65
66
|
function ee(e) {
|
|
66
|
-
|
|
67
|
+
I(), A(), u.value.dispose(), u.value = y.sdk.variant.editor(e), V.value = u.value.get(), A = u.value.subscribe(
|
|
67
68
|
(n) => V.value = n
|
|
68
69
|
);
|
|
69
70
|
}
|
|
@@ -73,12 +74,12 @@ const Je = {
|
|
|
73
74
|
function ae(e) {
|
|
74
75
|
ee(e.id), T.value = !0;
|
|
75
76
|
}
|
|
76
|
-
function
|
|
77
|
+
function O() {
|
|
77
78
|
T.value = !1;
|
|
78
79
|
}
|
|
79
80
|
function te() {
|
|
80
81
|
var e;
|
|
81
|
-
if (!((e = l.value) != null && e.dirty)) return
|
|
82
|
+
if (!((e = l.value) != null && e.dirty)) return O();
|
|
82
83
|
J.open({
|
|
83
84
|
title: a("menu.common.dialog.dismiss.title"),
|
|
84
85
|
message: a("menu.common.dialog.dismiss.message"),
|
|
@@ -92,7 +93,7 @@ const Je = {
|
|
|
92
93
|
close: !0,
|
|
93
94
|
variant: H.Tertiary
|
|
94
95
|
}
|
|
95
|
-
}).onPrimary(
|
|
96
|
+
}).onPrimary(O);
|
|
96
97
|
}
|
|
97
98
|
function ye(e) {
|
|
98
99
|
e ? T.value = !0 : te();
|
|
@@ -101,21 +102,21 @@ const Je = {
|
|
|
101
102
|
var n;
|
|
102
103
|
(n = w.value) == null || n.dispose(), Z.value = e, w.value = u.value.translationEditor();
|
|
103
104
|
}
|
|
104
|
-
function
|
|
105
|
+
function I() {
|
|
105
106
|
var e;
|
|
106
107
|
(e = w.value) == null || e.dispose(), w.value = null;
|
|
107
108
|
}
|
|
108
|
-
async function
|
|
109
|
+
async function ge() {
|
|
109
110
|
const e = w.value;
|
|
110
111
|
if (!e) return;
|
|
111
112
|
(await U(async () => e.apply(), {
|
|
112
113
|
showLoading: !1
|
|
113
|
-
})).kind === "success" &&
|
|
114
|
+
})).kind === "success" && I();
|
|
114
115
|
}
|
|
115
|
-
function
|
|
116
|
+
function ke(e) {
|
|
116
117
|
u.value.reorderOptions(e.map((n) => n.id));
|
|
117
118
|
}
|
|
118
|
-
function
|
|
119
|
+
function he(e) {
|
|
119
120
|
return e.draggedContext.futureIndex !== e.relatedContext.list.length - 1;
|
|
120
121
|
}
|
|
121
122
|
function D(e, n) {
|
|
@@ -123,11 +124,11 @@ const Je = {
|
|
|
123
124
|
const o = l.value;
|
|
124
125
|
return ((m = Y.value) == null ? void 0 : m.code) === "menu.variant.form.options.name_required" && !!o && e !== o.options.length - 1 && !n.name.trim();
|
|
125
126
|
}
|
|
126
|
-
function
|
|
127
|
+
function we(e, n) {
|
|
127
128
|
const o = Y.value;
|
|
128
|
-
return D(e, n) && o ?
|
|
129
|
+
return D(e, n) && o ? L(o) : "";
|
|
129
130
|
}
|
|
130
|
-
function
|
|
131
|
+
function xe(e, n) {
|
|
131
132
|
if (!n || typeof n.focus != "function") {
|
|
132
133
|
N.delete(e);
|
|
133
134
|
return;
|
|
@@ -138,32 +139,32 @@ const Je = {
|
|
|
138
139
|
a("menu.variant.form.options.input", { number: e + 1 })
|
|
139
140
|
);
|
|
140
141
|
}
|
|
141
|
-
function
|
|
142
|
+
function Ce(e) {
|
|
142
143
|
return e.reduce((n, o) => {
|
|
143
144
|
for (const [m, F] of Object.entries(o.nameLocale ?? {}))
|
|
144
145
|
n[m] ?? (n[m] = F);
|
|
145
146
|
return n;
|
|
146
147
|
}, {});
|
|
147
148
|
}
|
|
148
|
-
async function
|
|
149
|
+
async function Fe() {
|
|
149
150
|
var F, z, M;
|
|
150
151
|
const e = ((F = l.value) == null ? void 0 : F.name) ?? "", n = await U(
|
|
151
|
-
() =>
|
|
152
|
+
() => E.submit(() => u.value.submit()),
|
|
152
153
|
{
|
|
153
154
|
successMessage: a("menu.variant.form.saved", { name: e }),
|
|
154
155
|
// `submit()` publishes `submitting` synchronously only when it will
|
|
155
156
|
// perform a write. Local validation rejection must not flash loading.
|
|
156
157
|
showLoading: () => {
|
|
157
|
-
var
|
|
158
|
-
return ((
|
|
158
|
+
var f;
|
|
159
|
+
return ((f = l.value) == null ? void 0 : f.status) === "submitting";
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
162
|
);
|
|
162
|
-
n.kind === "success" &&
|
|
163
|
-
const o = n.kind === "rejected" && n.issues.some((
|
|
164
|
-
(
|
|
163
|
+
n.kind === "success" && O();
|
|
164
|
+
const o = n.kind === "rejected" && n.issues.some((f) => f.field === "options"), m = (z = l.value) == null ? void 0 : z.options.findIndex(
|
|
165
|
+
(f, R) => D(R, f)
|
|
165
166
|
);
|
|
166
|
-
o && m !== void 0 && m >= 0 && (await
|
|
167
|
+
o && m !== void 0 && m >= 0 && (await Ve(), (M = N.get(m)) == null || M.focus());
|
|
167
168
|
}
|
|
168
169
|
function oe(e) {
|
|
169
170
|
e.remove.state === "allowed" && J.open({
|
|
@@ -181,12 +182,12 @@ const Je = {
|
|
|
181
182
|
close: !0
|
|
182
183
|
}
|
|
183
184
|
}).onPrimary(async () => {
|
|
184
|
-
await U(() =>
|
|
185
|
+
await U(() => y.sdk.variant.remove(e.id), {
|
|
185
186
|
successMessage: a("menu.variant.form.removed", { name: e.name })
|
|
186
187
|
});
|
|
187
188
|
});
|
|
188
189
|
}
|
|
189
|
-
const
|
|
190
|
+
const Se = k(() => [
|
|
190
191
|
// Widths are the legacy ones (`Variant.vue:57,76,107`). They are not
|
|
191
192
|
// cosmetic: they decide where the option-values column wraps, and a wrap
|
|
192
193
|
// shifts every row below it out of visual parity.
|
|
@@ -210,7 +211,7 @@ const Je = {
|
|
|
210
211
|
size: 560,
|
|
211
212
|
enableSorting: !1,
|
|
212
213
|
cell: (e) => {
|
|
213
|
-
const n =
|
|
214
|
+
const n = Ce(e.row.original.options);
|
|
214
215
|
return x("div", { class: "flex items-center gap-8" }, [
|
|
215
216
|
x(
|
|
216
217
|
"span",
|
|
@@ -235,7 +236,7 @@ const Je = {
|
|
|
235
236
|
size: 52,
|
|
236
237
|
meta: { cellClass: "pl-16", headerContentClass: "-mx-16" },
|
|
237
238
|
header: "",
|
|
238
|
-
cell: (e) => x(
|
|
239
|
+
cell: (e) => x(de.FmButton, {
|
|
239
240
|
icon: "delete",
|
|
240
241
|
variant: "tertiary",
|
|
241
242
|
textColor: "neutral-gray-400",
|
|
@@ -243,91 +244,81 @@ const Je = {
|
|
|
243
244
|
"aria-label": a("menu.variant.actions.remove", {
|
|
244
245
|
name: e.row.original.name
|
|
245
246
|
}),
|
|
246
|
-
onClick:
|
|
247
|
+
onClick: re(
|
|
247
248
|
() => oe(e.row.original),
|
|
248
249
|
["stop", "prevent"]
|
|
249
250
|
)
|
|
250
251
|
})
|
|
251
252
|
}
|
|
252
253
|
]);
|
|
253
|
-
return
|
|
254
|
-
|
|
254
|
+
return Le(() => {
|
|
255
|
+
y.sdk.variant.search(""), I(), A(), u.value.dispose();
|
|
255
256
|
}), (e, n) => {
|
|
256
|
-
const o =
|
|
257
|
-
return i(),
|
|
257
|
+
const o = C("FmButton"), m = C("FmCircularProgress"), F = C("FmSearch"), z = C("FmTable"), M = C("FmTooltip"), f = C("FmTextField"), R = C("FmSideSheet");
|
|
258
|
+
return i(), b(qe, {
|
|
258
259
|
heading: t(a)("menu.variant.title")
|
|
259
260
|
}, {
|
|
260
|
-
"append-heading":
|
|
261
|
-
t(
|
|
261
|
+
"append-heading": v(() => [
|
|
262
|
+
t(g).status === "ready" && c.value && c.value.totalCount > 0 && !P.value ? (i(), b(o, {
|
|
262
263
|
key: 0,
|
|
263
264
|
class: "ml-auto",
|
|
264
265
|
disabled: c.value.create.state !== "allowed",
|
|
265
266
|
label: t(a)("menu.variant.add"),
|
|
266
267
|
"prepend-icon": "add",
|
|
267
268
|
onClick: q
|
|
268
|
-
}, null, 8, ["disabled", "label"])) :
|
|
269
|
+
}, null, 8, ["disabled", "label"])) : $("", !0)
|
|
269
270
|
]),
|
|
270
|
-
default:
|
|
271
|
-
t(
|
|
271
|
+
default: v(() => [
|
|
272
|
+
t(g).status === "error" ? (i(), h("p", Ke, S(t(L)(t(g).error.message)), 1)) : t(g).status === "unavailable" ? (i(), h("p", Je, S(t(L)(t(g).reason)), 1)) : t(g).status === "loading" ? (i(), b(m, { key: 2 })) : c.value && c.value.rows.length === 0 && !W.value ? (i(), b(t(Ue), {
|
|
272
273
|
key: 3,
|
|
274
|
+
class: "xs:pt-16",
|
|
273
275
|
action: { text: t(a)("menu.variant.add"), callback: q },
|
|
274
276
|
title: t(a)("menu.variant.empty.title"),
|
|
275
277
|
subtitle: t(a)("menu.variant.empty.subtitle")
|
|
276
|
-
}, null, 8, ["action", "title", "subtitle"])) : c.value ? (i(),
|
|
277
|
-
d("div",
|
|
278
|
+
}, null, 8, ["action", "title", "subtitle"])) : c.value ? (i(), h(ue, { key: 4 }, [
|
|
279
|
+
d("div", We, [
|
|
278
280
|
d("div", {
|
|
279
|
-
class:
|
|
281
|
+
class: ce(P.value ? "w-[calc(100%-32px)] mx-16 mt-8" : "w-[320px]")
|
|
280
282
|
}, [
|
|
281
283
|
r(F, {
|
|
282
284
|
autofocus: "",
|
|
283
|
-
class:
|
|
285
|
+
class: ce(P.value ? "mb-0" : "mb-8"),
|
|
284
286
|
"model-value": W.value,
|
|
285
287
|
placeholder: t(a)("menu.common.labels.search_variants"),
|
|
286
|
-
"onUpdate:modelValue":
|
|
288
|
+
"onUpdate:modelValue": y.sdk.variant.search
|
|
287
289
|
}, null, 8, ["class", "model-value", "placeholder", "onUpdate:modelValue"])
|
|
288
290
|
], 2)
|
|
289
291
|
]),
|
|
290
|
-
P.value ? (i(),
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
onClick: ue((_) => oe(s), ["stop"])
|
|
321
|
-
}, null, 8, ["disabled", "aria-label", "onClick"])
|
|
322
|
-
])
|
|
323
|
-
]),
|
|
324
|
-
_: 2
|
|
325
|
-
}, 1032, ["onClick"]))), 128))
|
|
326
|
-
]),
|
|
327
|
-
_: 1
|
|
328
|
-
})) : (i(), C("div", na, [
|
|
329
|
-
r(k, {
|
|
330
|
-
"column-defs": Le.value,
|
|
292
|
+
P.value ? (i(), h("div", Xe, [
|
|
293
|
+
(i(!0), h(ue, null, Pe(c.value.rows, (s) => (i(), h("div", {
|
|
294
|
+
key: s.id,
|
|
295
|
+
class: "py-12 px-16 flex space-x-8 items-center cursor-pointer",
|
|
296
|
+
onClick: (_) => ae(s)
|
|
297
|
+
}, [
|
|
298
|
+
d("div", Ze, [
|
|
299
|
+
d("p", ea, S(s.name), 1),
|
|
300
|
+
d("div", null, [
|
|
301
|
+
d("p", aa, S(t(a)("menu.common.labels.items_linked", {
|
|
302
|
+
count: s.linkedProductCount
|
|
303
|
+
})), 1),
|
|
304
|
+
d("p", ta, S(t(a)("menu.variant.mobile.value", {
|
|
305
|
+
values: s.options.map((_) => _.name).join(", ")
|
|
306
|
+
})), 1)
|
|
307
|
+
])
|
|
308
|
+
]),
|
|
309
|
+
r(o, {
|
|
310
|
+
class: "shrink-0",
|
|
311
|
+
disabled: s.remove.state !== "allowed",
|
|
312
|
+
"aria-label": t(a)("menu.variant.actions.remove", { name: s.name }),
|
|
313
|
+
"prepend-icon": "delete",
|
|
314
|
+
"text-color": "neutral-gray-400",
|
|
315
|
+
variant: "tertiary",
|
|
316
|
+
onClick: re((_) => oe(s), ["stop"])
|
|
317
|
+
}, null, 8, ["disabled", "aria-label", "onClick"])
|
|
318
|
+
], 8, Ye))), 128))
|
|
319
|
+
])) : (i(), h("div", na, [
|
|
320
|
+
r(z, {
|
|
321
|
+
"column-defs": Se.value,
|
|
331
322
|
"hide-footer": "",
|
|
332
323
|
"page-size": c.value.rows.length,
|
|
333
324
|
"pin-header-row": "",
|
|
@@ -336,35 +327,37 @@ const Je = {
|
|
|
336
327
|
onRowClick: n[0] || (n[0] = (s) => ae(s.original))
|
|
337
328
|
}, null, 8, ["column-defs", "page-size", "row-data"])
|
|
338
329
|
])),
|
|
339
|
-
c.value.totalCount > 0 && P.value ? (i(),
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
330
|
+
c.value.totalCount > 0 && P.value ? (i(), b(je, { key: 2 }, {
|
|
331
|
+
default: v(() => [
|
|
332
|
+
r(o, {
|
|
333
|
+
disabled: c.value.create.state !== "allowed",
|
|
334
|
+
label: t(a)("menu.variant.add"),
|
|
335
|
+
"prepend-icon": "add",
|
|
336
|
+
variant: "fab",
|
|
337
|
+
onClick: q
|
|
338
|
+
}, null, 8, ["disabled", "label"])
|
|
339
|
+
]),
|
|
340
|
+
_: 1
|
|
341
|
+
})) : $("", !0)
|
|
342
|
+
], 64)) : $("", !0),
|
|
343
|
+
r(R, {
|
|
351
344
|
"model-value": T.value,
|
|
352
|
-
"is-container": t(
|
|
353
|
-
"is-container-props": { onValidationSuccess:
|
|
345
|
+
"is-container": t(de).FmForm,
|
|
346
|
+
"is-container-props": { onValidationSuccess: Fe },
|
|
354
347
|
"max-width": 560,
|
|
355
348
|
"onOn:clickedAway": te,
|
|
356
349
|
"onUpdate:modelValue": ye
|
|
357
350
|
}, {
|
|
358
|
-
"side-sheet-header":
|
|
351
|
+
"side-sheet-header": v(() => {
|
|
359
352
|
var s;
|
|
360
353
|
return [
|
|
361
|
-
d("p",
|
|
354
|
+
d("p", oa, S(((s = l.value) == null ? void 0 : s.mode) === "update" ? t(a)("menu.variant.form.title.edit") : t(a)("menu.variant.form.title.add")), 1)
|
|
362
355
|
];
|
|
363
356
|
}),
|
|
364
|
-
"side-sheet-footer":
|
|
357
|
+
"side-sheet-footer": v(() => {
|
|
365
358
|
var s, _;
|
|
366
359
|
return [
|
|
367
|
-
d("div",
|
|
360
|
+
d("div", ca, [
|
|
368
361
|
r(o, {
|
|
369
362
|
disabled: ((s = l.value) == null ? void 0 : s.submit.state) !== "allowed",
|
|
370
363
|
label: ((_ = l.value) == null ? void 0 : _.mode) === "update" ? t(a)("menu.common.actions.update") : t(a)("menu.common.actions.add"),
|
|
@@ -376,35 +369,35 @@ const Je = {
|
|
|
376
369
|
label: t(a)("menu.common.actions.cancel"),
|
|
377
370
|
size: "lg",
|
|
378
371
|
variant: "tertiary",
|
|
379
|
-
onClick:
|
|
372
|
+
onClick: O
|
|
380
373
|
}, null, 8, ["label"])
|
|
381
374
|
])
|
|
382
375
|
];
|
|
383
376
|
}),
|
|
384
|
-
default:
|
|
377
|
+
default: v(() => {
|
|
385
378
|
var s;
|
|
386
379
|
return [
|
|
387
|
-
d("div",
|
|
388
|
-
r(
|
|
380
|
+
d("div", la, [
|
|
381
|
+
r(Ee, {
|
|
389
382
|
title: t(a)("menu.variant.form.detail")
|
|
390
383
|
}, {
|
|
391
|
-
default:
|
|
384
|
+
default: v(() => {
|
|
392
385
|
var _;
|
|
393
386
|
return [
|
|
394
|
-
r(
|
|
395
|
-
"error-messages": X.value ? [t(
|
|
387
|
+
r(f, me({
|
|
388
|
+
"error-messages": X.value ? [t(L)(X.value)] : [],
|
|
396
389
|
"helper-text": t(a)("menu.variant.form.name.helper"),
|
|
397
390
|
label: t(a)("menu.variant.form.name.label"),
|
|
398
391
|
"model-value": ((_ = l.value) == null ? void 0 : _.name) ?? "",
|
|
399
392
|
placeholder: t(a)("menu.variant.form.name.placeholder")
|
|
400
|
-
}, t(
|
|
401
|
-
append:
|
|
402
|
-
r(
|
|
393
|
+
}, t(E).field("name", u.value.setName)), {
|
|
394
|
+
append: v(() => [
|
|
395
|
+
r(M, {
|
|
403
396
|
placement: "top",
|
|
404
397
|
variant: "plain",
|
|
405
398
|
"z-index": 999
|
|
406
399
|
}, {
|
|
407
|
-
default:
|
|
400
|
+
default: v(() => [
|
|
408
401
|
r(o, {
|
|
409
402
|
"aria-label": t(a)("menu.variant.form.translation.button"),
|
|
410
403
|
class: "!p-0",
|
|
@@ -418,53 +411,53 @@ const Je = {
|
|
|
418
411
|
]),
|
|
419
412
|
_: 1
|
|
420
413
|
}, 16, ["error-messages", "helper-text", "label", "model-value", "placeholder"]),
|
|
421
|
-
r(
|
|
414
|
+
r(Ne, {
|
|
422
415
|
label: t(a)("menu.variant.form.options.title")
|
|
423
416
|
}, {
|
|
424
|
-
default:
|
|
417
|
+
default: v(() => {
|
|
425
418
|
var Q;
|
|
426
419
|
return [
|
|
427
|
-
r(t(
|
|
420
|
+
r(t(Oe), {
|
|
428
421
|
"model-value": [...((Q = l.value) == null ? void 0 : Q.options) ?? []],
|
|
429
|
-
move:
|
|
422
|
+
move: he,
|
|
430
423
|
class: "space-y-16",
|
|
431
424
|
"data-testid": "variant-options",
|
|
432
425
|
group: "variants",
|
|
433
426
|
handle: ".handle",
|
|
434
427
|
"item-key": "id",
|
|
435
|
-
"onUpdate:modelValue":
|
|
428
|
+
"onUpdate:modelValue": ke
|
|
436
429
|
}, {
|
|
437
|
-
item:
|
|
438
|
-
var se, ie
|
|
430
|
+
item: v(({ element: j, index: p }) => {
|
|
431
|
+
var le, se, ie;
|
|
439
432
|
return [
|
|
440
433
|
d("div", {
|
|
441
434
|
class: "flex items-center gap-8",
|
|
442
|
-
"data-not-allow-sort":
|
|
435
|
+
"data-not-allow-sort": p === (((le = l.value) == null ? void 0 : le.options.length) ?? 0) - 1
|
|
443
436
|
}, [
|
|
444
|
-
|
|
437
|
+
p !== (((se = l.value) == null ? void 0 : se.options.length) ?? 0) - 1 ? (i(), b(o, {
|
|
445
438
|
key: 0,
|
|
446
439
|
"aria-label": t(a)("menu.variant.form.options.move", {
|
|
447
|
-
number:
|
|
440
|
+
number: p + 1
|
|
448
441
|
}),
|
|
449
442
|
class: "handle cursor-move !p-0",
|
|
450
443
|
icon: "drag_handle",
|
|
451
444
|
variant: "tertiary"
|
|
452
|
-
}, null, 8, ["aria-label"])) :
|
|
453
|
-
d("div",
|
|
454
|
-
r(
|
|
455
|
-
ref: (G) =>
|
|
445
|
+
}, null, 8, ["aria-label"])) : p > 0 ? (i(), h("div", ia)) : $("", !0),
|
|
446
|
+
d("div", ra, [
|
|
447
|
+
r(f, me({
|
|
448
|
+
ref: (G) => xe(p, G),
|
|
456
449
|
class: "flex-1",
|
|
457
|
-
"error-messages": D(
|
|
450
|
+
"error-messages": D(p, j) ? [we(p, j)] : [],
|
|
458
451
|
"model-value": j.name,
|
|
459
452
|
placeholder: t(a)("menu.variant.form.options.placeholder")
|
|
460
|
-
},
|
|
461
|
-
|
|
453
|
+
}, _e(p)), Te({ _: 2 }, [
|
|
454
|
+
p !== (((ie = l.value) == null ? void 0 : ie.options.length) ?? 0) - 1 ? {
|
|
462
455
|
name: "append",
|
|
463
|
-
fn:
|
|
464
|
-
d("div",
|
|
456
|
+
fn: v(() => [
|
|
457
|
+
d("div", ua, [
|
|
465
458
|
r(o, {
|
|
466
459
|
"aria-label": t(a)("menu.variant.form.options.translation", {
|
|
467
|
-
number:
|
|
460
|
+
number: p + 1
|
|
468
461
|
}),
|
|
469
462
|
class: "!p-0",
|
|
470
463
|
icon: "g_translate",
|
|
@@ -478,7 +471,7 @@ const Je = {
|
|
|
478
471
|
class: "!p-0",
|
|
479
472
|
icon: "close",
|
|
480
473
|
variant: "tertiary",
|
|
481
|
-
onClick: (G) => u.value.removeOption(
|
|
474
|
+
onClick: (G) => u.value.removeOption(p)
|
|
482
475
|
}, null, 8, ["aria-label", "onClick"])
|
|
483
476
|
])
|
|
484
477
|
]),
|
|
@@ -486,7 +479,7 @@ const Je = {
|
|
|
486
479
|
} : void 0
|
|
487
480
|
]), 1040, ["error-messages", "model-value", "placeholder"])
|
|
488
481
|
])
|
|
489
|
-
], 8,
|
|
482
|
+
], 8, sa)
|
|
490
483
|
];
|
|
491
484
|
}),
|
|
492
485
|
_: 1
|
|
@@ -499,38 +492,38 @@ const Je = {
|
|
|
499
492
|
}),
|
|
500
493
|
_: 1
|
|
501
494
|
}, 8, ["title"]),
|
|
502
|
-
((s = l.value) == null ? void 0 : s.mode) === "update" && l.value.linkedProductCount > 0 ? (i(),
|
|
495
|
+
((s = l.value) == null ? void 0 : s.mode) === "update" && l.value.linkedProductCount > 0 ? (i(), b(Be, {
|
|
503
496
|
key: 0,
|
|
504
497
|
"applied-count": l.value.linkedProductCount,
|
|
505
|
-
groups:
|
|
498
|
+
groups: be.value,
|
|
506
499
|
query: l.value.linkedProductQuery,
|
|
507
500
|
"show-count": !1,
|
|
508
501
|
title: t(a)("menu.variant.form.applied_product"),
|
|
509
502
|
"read-only": "",
|
|
510
503
|
"onUpdate:query": u.value.setLinkedProductQuery
|
|
511
|
-
}, null, 8, ["applied-count", "groups", "query", "title", "onUpdate:query"])) :
|
|
504
|
+
}, null, 8, ["applied-count", "groups", "query", "title", "onUpdate:query"])) : $("", !0)
|
|
512
505
|
])
|
|
513
506
|
];
|
|
514
507
|
}),
|
|
515
508
|
_: 1
|
|
516
509
|
}, 8, ["model-value", "is-container", "is-container-props"]),
|
|
517
|
-
w.value ? (i(),
|
|
510
|
+
w.value ? (i(), b(Ae, {
|
|
518
511
|
key: 5,
|
|
519
512
|
"expanded-section": Z.value,
|
|
520
513
|
session: w.value,
|
|
521
|
-
onClose:
|
|
522
|
-
onSave:
|
|
523
|
-
}, null, 8, ["expanded-section", "session"])) :
|
|
514
|
+
onClose: I,
|
|
515
|
+
onSave: ge
|
|
516
|
+
}, null, 8, ["expanded-section", "session"])) : $("", !0)
|
|
524
517
|
]),
|
|
525
518
|
_: 1
|
|
526
519
|
}, 8, ["heading"]);
|
|
527
520
|
};
|
|
528
521
|
}
|
|
529
|
-
}), Sa = /* @__PURE__ */
|
|
522
|
+
}), Sa = /* @__PURE__ */ pe({
|
|
530
523
|
__name: "Variant",
|
|
531
524
|
setup(K) {
|
|
532
|
-
const
|
|
533
|
-
return (a,
|
|
525
|
+
const y = He();
|
|
526
|
+
return (a, L) => (i(), b(ma, { sdk: t(y) }, null, 8, ["sdk"]));
|
|
534
527
|
}
|
|
535
528
|
});
|
|
536
529
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as i, watch as l, onUnmounted as m, openBlock as d, createBlock as p, unref as f } from "vue";
|
|
2
2
|
import { useRoute as _, useRouter as g, RouterView as k } from "vue-router";
|
|
3
|
-
import { a as R, u as w } from "./provide-
|
|
4
|
-
import { u as h } from "./useActionFeedback-
|
|
5
|
-
import { R as y } from "./app-
|
|
3
|
+
import { a as R, u as w } from "./provide-BGLSDsuJ.js";
|
|
4
|
+
import { u as h } from "./useActionFeedback-CElXij1W.js";
|
|
5
|
+
import { R as y } from "./app-CxJjx2ma.js";
|
|
6
6
|
const M = /* @__PURE__ */ i({
|
|
7
7
|
__name: "[id]",
|
|
8
8
|
setup(x) {
|