@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,156 +1,203 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { _ as
|
|
12
|
-
import { _ as
|
|
13
|
-
import {
|
|
14
|
-
import { _ as bl } from "./
|
|
15
|
-
import {
|
|
1
|
+
import { defineComponent as he, resolveComponent as T, openBlock as o, createBlock as F, withCtx as A, createElementBlock as f, computed as v, normalizeClass as fe, toDisplayString as L, unref as a, createSlots as Zt, createElementVNode as i, normalizeStyle as el, createVNode as y, isRef as tl, createCommentVNode as M, Fragment as Q, renderList as ue, renderSlot as qe, ref as Y, watch as _e, h as E, withModifiers as $e, withKeys as Ct, shallowRef as Ce, onUnmounted as ll, nextTick as al } from "vue";
|
|
2
|
+
import { _ as Ft } from "./TranslationLanguageSelector.vue_vue_type_script_setup_true_lang-BJZ6VcrT.js";
|
|
3
|
+
import { useI18n as Fe, useCoreStore as ol } from "@feedmepos/mf-common";
|
|
4
|
+
import { _ as $t, R as nl, A as St, h as Ke } from "./app-CxJjx2ma.js";
|
|
5
|
+
import { _ as Ge } from "./ProductChipSummary.vue_vue_type_script_setup_true_lang-D9v88xZs.js";
|
|
6
|
+
import { O as Ie, _ as sl } from "./LinkProductSideSheet.vue_vue_type_script_setup_true_lang-Cb6nO43H.js";
|
|
7
|
+
import { _ as rl } from "./ProductAttributeFilter.vue_vue_type_script_setup_true_lang-DoHQeOHy.js";
|
|
8
|
+
import { a as il, _ as ul } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DoS4Btzj.js";
|
|
9
|
+
import { u as cl, a as ml } from "./ProductInlineCreateHost.vue_vue_type_script_setup_true_lang-BzctosMW.js";
|
|
10
|
+
import { components as pe, useDialog as dl, useBreakpoints as pl, FmButtonVariant as be, FmButtonColorThemeVariant as ve } from "@feedmepos/ui-library";
|
|
11
|
+
import { _ as vl } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
12
|
+
import { _ as He } from "./ProductImageEditorDialog.vue_vue_type_script_setup_true_lang-B3bShTjM.js";
|
|
13
|
+
import { _ as fl } from "./TranslationViewChip.vue_vue_type_script_setup_true_lang-CAkLEmSA.js";
|
|
14
|
+
import { _ as bl } from "./PageLayout.vue_vue_type_script_setup_true_lang-DrhsROXo.js";
|
|
15
|
+
import { b as Ut, u as Ne, d as yl } from "./provide-BGLSDsuJ.js";
|
|
16
|
+
import { _ as gl } from "./ProductGroupCreateSheet.vue_vue_type_script_setup_true_lang-CEliG36Z.js";
|
|
17
|
+
import { _ as _l } from "./ProductEditorHost.vue_vue_type_script_setup_true_lang-DsIGLKNS.js";
|
|
16
18
|
import { _ as It } from "./ProductFilterMenu.vue_vue_type_script_setup_true_lang-Cgc0Ms_n.js";
|
|
17
|
-
import {
|
|
18
|
-
import { u as Mt } from "./useActionFeedback-Dm2HDa_2.js";
|
|
19
|
+
import { u as Tt } from "./useActionFeedback-CElXij1W.js";
|
|
19
20
|
import { _ as hl } from "./FormItem.vue_vue_type_script_setup_true_lang-C2S6QCyR.js";
|
|
20
|
-
import { _ as
|
|
21
|
-
import {
|
|
21
|
+
import { _ as xl } from "./vuedraggable-CBtQLb_S.js";
|
|
22
|
+
import { _ as Vt } from "./TextChip.vue_vue_type_script_setup_true_lang-YkUjMTXo.js";
|
|
23
|
+
import { u as kl } from "./useEditorValidation-Ctef5Bxt.js";
|
|
22
24
|
import { useRouter as wl } from "vue-router";
|
|
23
|
-
const Cl = {
|
|
25
|
+
const Cl = ["src", "alt"], Pt = /* @__PURE__ */ he({
|
|
26
|
+
__name: "ProductThumbnail",
|
|
27
|
+
props: {
|
|
28
|
+
src: {},
|
|
29
|
+
alt: {}
|
|
30
|
+
},
|
|
31
|
+
setup(C) {
|
|
32
|
+
return (u, t) => {
|
|
33
|
+
const $ = T("FmIcon"), n = T("FmCard");
|
|
34
|
+
return o(), F(n, {
|
|
35
|
+
variant: "outlined",
|
|
36
|
+
class: "flex shrink-0 w-72 !h-72 items-center justify-center rounded-md overflow-hidden"
|
|
37
|
+
}, {
|
|
38
|
+
default: A(() => [
|
|
39
|
+
u.src ? (o(), f("img", {
|
|
40
|
+
key: 0,
|
|
41
|
+
src: u.src,
|
|
42
|
+
alt: u.alt,
|
|
43
|
+
class: "w-full h-full object-cover"
|
|
44
|
+
}, null, 8, Cl)) : (o(), F($, {
|
|
45
|
+
key: 1,
|
|
46
|
+
name: "image",
|
|
47
|
+
outline: "",
|
|
48
|
+
color: "neutral-gray-300"
|
|
49
|
+
}))
|
|
50
|
+
]),
|
|
51
|
+
_: 1
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}), Fl = /* @__PURE__ */ he({
|
|
56
|
+
__name: "OrderFromChip",
|
|
57
|
+
props: {
|
|
58
|
+
orderFrom: {}
|
|
59
|
+
},
|
|
60
|
+
setup(C) {
|
|
61
|
+
const u = C, { t } = Fe(), $ = {
|
|
62
|
+
ALL: "bg-fm-color-neutral-gray-100",
|
|
63
|
+
POS_ONLY: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
64
|
+
NONE: "text-fm-color-typo-error bg-fm-color-system-error-100"
|
|
65
|
+
}, n = v(() => $[u.orderFrom]);
|
|
66
|
+
return (U, g) => (o(), f("span", {
|
|
67
|
+
class: fe(["inline-block fm-corner-radius-md px-4 py-[2px] fm-typo-en-body-md-600 text-nowrap max-w-full", n.value])
|
|
68
|
+
}, L(a(t)(a(Ie)[U.orderFrom])), 3));
|
|
69
|
+
}
|
|
70
|
+
}), $l = {
|
|
24
71
|
key: 0,
|
|
25
72
|
class: "sticky top-0 z-10 px-8 pb-8 bg-fm-color-neutral-white"
|
|
26
|
-
},
|
|
73
|
+
}, Sl = {
|
|
27
74
|
key: 1,
|
|
28
75
|
class: "py-8 px-12 fm-typo-en-body-md-400 text-fm-color-typo-tertiary"
|
|
29
|
-
},
|
|
76
|
+
}, Il = /* @__PURE__ */ he({
|
|
30
77
|
__name: "BulkCategorySelect",
|
|
31
78
|
props: {
|
|
32
79
|
items: {},
|
|
33
80
|
modelValue: {}
|
|
34
81
|
},
|
|
35
82
|
emits: ["update:modelValue"],
|
|
36
|
-
setup(C, { emit:
|
|
37
|
-
const t = C,
|
|
83
|
+
setup(C, { emit: u }) {
|
|
84
|
+
const t = C, $ = u, { t: n } = Fe(), { search: U, filtered: g, noMatches: x, reset: D } = cl(
|
|
38
85
|
() => t.items,
|
|
39
|
-
(
|
|
40
|
-
), { content:
|
|
41
|
-
function
|
|
42
|
-
|
|
86
|
+
(k) => k.label
|
|
87
|
+
), { content: z, contentStyle: _, onMenuChanged: O } = ml();
|
|
88
|
+
function W(k) {
|
|
89
|
+
k || D(), O(k);
|
|
43
90
|
}
|
|
44
|
-
return (
|
|
45
|
-
const
|
|
46
|
-
return o(), F(
|
|
47
|
-
items:
|
|
91
|
+
return (k, X) => {
|
|
92
|
+
const se = T("FmSearch"), ee = T("FmMenuItem"), j = T("FmSelect");
|
|
93
|
+
return o(), F(j, {
|
|
94
|
+
items: k.items,
|
|
48
95
|
multiselect: "",
|
|
49
96
|
"keep-selection-order": "",
|
|
50
|
-
"model-value":
|
|
51
|
-
"onUpdate:modelValue":
|
|
52
|
-
onDropdownChanged:
|
|
53
|
-
},
|
|
54
|
-
"menu-wrapper": A(({ handleItemChange:
|
|
55
|
-
|
|
97
|
+
"model-value": k.modelValue,
|
|
98
|
+
"onUpdate:modelValue": X[1] || (X[1] = (m) => $("update:modelValue", m ?? [])),
|
|
99
|
+
onDropdownChanged: W
|
|
100
|
+
}, Zt({
|
|
101
|
+
"menu-wrapper": A(({ handleItemChange: m }) => [
|
|
102
|
+
i("div", {
|
|
56
103
|
ref_key: "content",
|
|
57
|
-
ref:
|
|
104
|
+
ref: z,
|
|
58
105
|
class: "shrink-0",
|
|
59
|
-
style:
|
|
106
|
+
style: el(a(_))
|
|
60
107
|
}, [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
modelValue: a(
|
|
64
|
-
"onUpdate:modelValue":
|
|
108
|
+
k.items.length ? (o(), f("div", $l, [
|
|
109
|
+
y(se, {
|
|
110
|
+
modelValue: a(U),
|
|
111
|
+
"onUpdate:modelValue": X[0] || (X[0] = (te) => tl(U) ? U.value = te : null),
|
|
65
112
|
autofocus: "",
|
|
66
113
|
placeholder: a(n)("menu.common.actions.search")
|
|
67
114
|
}, null, 8, ["modelValue", "placeholder"])
|
|
68
115
|
])) : M("", !0),
|
|
69
|
-
(o(!0),
|
|
70
|
-
key:
|
|
71
|
-
label:
|
|
116
|
+
(o(!0), f(Q, null, ue(a(g), (te) => (o(), F(ee, {
|
|
117
|
+
key: te.value,
|
|
118
|
+
label: te.label,
|
|
72
119
|
"has-checkbox": "",
|
|
73
120
|
class: "scroll-mt-56",
|
|
74
|
-
"data-checked":
|
|
75
|
-
"model-value":
|
|
76
|
-
"onUpdate:modelValue": (
|
|
121
|
+
"data-checked": k.modelValue.includes(te.value),
|
|
122
|
+
"model-value": k.modelValue.includes(te.value),
|
|
123
|
+
"onUpdate:modelValue": (V) => m(V, te)
|
|
77
124
|
}, null, 8, ["label", "data-checked", "model-value", "onUpdate:modelValue"]))), 128)),
|
|
78
|
-
a(
|
|
125
|
+
a(x) ? (o(), f("p", Sl, L(a(n)("menu.product.form.detail.category.no_results")), 1)) : M("", !0)
|
|
79
126
|
], 4)
|
|
80
127
|
]),
|
|
81
128
|
_: 2
|
|
82
129
|
}, [
|
|
83
|
-
|
|
130
|
+
k.$slots.default ? {
|
|
84
131
|
name: "default",
|
|
85
132
|
fn: A(() => [
|
|
86
|
-
|
|
133
|
+
qe(k.$slots, "default")
|
|
87
134
|
]),
|
|
88
135
|
key: "0"
|
|
89
136
|
} : void 0
|
|
90
137
|
]), 1032, ["items", "model-value"]);
|
|
91
138
|
};
|
|
92
139
|
}
|
|
93
|
-
}),
|
|
140
|
+
}), Vl = { class: "flex items-center gap-8" }, Pl = { class: "fm-typo-en-title-md-600" }, Ll = {
|
|
94
141
|
key: 0,
|
|
95
142
|
class: "space-y-16"
|
|
96
|
-
},
|
|
143
|
+
}, El = { class: "flex items-center gap-8" }, Ol = { class: "w-[72px] h-[72px] rounded-md border border-fm-color-neutral-gray-200 flex items-center justify-center overflow-hidden" }, Ml = ["src", "alt"], Ul = { class: "space-y-4" }, Tl = { class: "fm-typo-en-title-md-600" }, Al = { class: "text-fm-color-typo-secondary" }, Rl = { class: "flex" }, Nl = { class: "w-[260px] space-y-16" }, jl = { class: "flex items-center gap-4 px-8" }, Dl = { class: "fm-typo-en-title-sm-600" }, zl = { class: "flex-1 min-w-0 overflow-x-auto" }, Bl = {
|
|
97
144
|
key: 1,
|
|
98
145
|
class: "p-24 text-fm-color-typo-secondary"
|
|
99
|
-
},
|
|
146
|
+
}, Kl = {
|
|
100
147
|
key: 2,
|
|
101
148
|
class: "flex justify-center p-24"
|
|
102
|
-
},
|
|
149
|
+
}, Gl = /* @__PURE__ */ he({
|
|
103
150
|
__name: "ProductOverviewSheet",
|
|
104
151
|
props: {
|
|
105
152
|
modelValue: { type: Boolean },
|
|
106
153
|
state: {}
|
|
107
154
|
},
|
|
108
155
|
emits: ["update:modelValue"],
|
|
109
|
-
setup(C, { emit:
|
|
110
|
-
const t = C,
|
|
156
|
+
setup(C, { emit: u }) {
|
|
157
|
+
const t = C, $ = u, { t: n, n: U } = Fe(), g = v(
|
|
111
158
|
() => {
|
|
112
159
|
var c;
|
|
113
160
|
return ((c = t.state) == null ? void 0 : c.status) === "ready" ? t.state.value : null;
|
|
114
161
|
}
|
|
115
|
-
),
|
|
162
|
+
), x = v(() => {
|
|
116
163
|
var c, p;
|
|
117
164
|
return ((c = t.state) == null ? void 0 : c.status) === "error" ? n("menu.product.overview.read_error") : ((p = t.state) == null ? void 0 : p.status) === "unavailable" ? n("menu.product.overview.unavailable") : null;
|
|
118
|
-
}),
|
|
165
|
+
}), D = v({
|
|
119
166
|
get: () => t.modelValue,
|
|
120
|
-
set: (c) =>
|
|
121
|
-
}),
|
|
122
|
-
|
|
167
|
+
set: (c) => $("update:modelValue", c)
|
|
168
|
+
}), z = Y("product"), _ = Y(null);
|
|
169
|
+
_e(
|
|
123
170
|
() => {
|
|
124
171
|
var c;
|
|
125
172
|
return (c = g.value) == null ? void 0 : c.itemId;
|
|
126
173
|
},
|
|
127
174
|
() => {
|
|
128
|
-
_.value = null,
|
|
175
|
+
_.value = null, z.value = "product";
|
|
129
176
|
}
|
|
130
177
|
);
|
|
131
|
-
const
|
|
178
|
+
const O = v(() => {
|
|
132
179
|
var c;
|
|
133
180
|
return ((c = g.value) == null ? void 0 : c.scopes) ?? [];
|
|
134
|
-
}),
|
|
135
|
-
() =>
|
|
181
|
+
}), W = v(
|
|
182
|
+
() => O.value.find(
|
|
136
183
|
(c) => c.catalogId === _.value
|
|
137
|
-
) ??
|
|
138
|
-
),
|
|
184
|
+
) ?? O.value[0]
|
|
185
|
+
), k = v(
|
|
139
186
|
() => {
|
|
140
187
|
var c;
|
|
141
188
|
return (((c = g.value) == null ? void 0 : c.groupScopes) ?? []).find(
|
|
142
189
|
(p) => p.catalogId === _.value
|
|
143
190
|
);
|
|
144
191
|
}
|
|
145
|
-
),
|
|
146
|
-
function
|
|
147
|
-
return c == null ? n("menu.common.labels.empty_value") : p ?
|
|
192
|
+
), X = (c, p) => c === null ? n("menu.product.overview.master_product") : p;
|
|
193
|
+
function se(c, p) {
|
|
194
|
+
return c == null ? n("menu.common.labels.empty_value") : p ? U(c, {
|
|
148
195
|
style: "currency",
|
|
149
196
|
currency: p,
|
|
150
197
|
currencyDisplay: "narrowSymbol"
|
|
151
|
-
}) :
|
|
198
|
+
}) : U(c, { minimumFractionDigits: 2 });
|
|
152
199
|
}
|
|
153
|
-
const
|
|
200
|
+
const ee = v(
|
|
154
201
|
() => [
|
|
155
202
|
{
|
|
156
203
|
accessorKey: "schedulerLabel",
|
|
@@ -175,7 +222,7 @@ const Cl = {
|
|
|
175
222
|
enableSorting: !1,
|
|
176
223
|
cell: (c) => {
|
|
177
224
|
const p = c.getValue();
|
|
178
|
-
return
|
|
225
|
+
return se((p == null ? void 0 : p.amount) ?? null, null);
|
|
179
226
|
}
|
|
180
227
|
},
|
|
181
228
|
{
|
|
@@ -184,66 +231,66 @@ const Cl = {
|
|
|
184
231
|
enableSorting: !1,
|
|
185
232
|
cell: (c) => {
|
|
186
233
|
const p = c.getValue();
|
|
187
|
-
return p === null ? n("menu.common.labels.empty_value") :
|
|
188
|
-
|
|
234
|
+
return p === null ? n("menu.common.labels.empty_value") : E(
|
|
235
|
+
pe.FmChip,
|
|
189
236
|
{ compact: !0, class: "fm-typo-en-body-md-600" },
|
|
190
|
-
() => n(
|
|
237
|
+
() => n(Ie[p])
|
|
191
238
|
);
|
|
192
239
|
}
|
|
193
240
|
}
|
|
194
241
|
]
|
|
195
|
-
),
|
|
242
|
+
), j = v({
|
|
196
243
|
get: () => _.value ?? "",
|
|
197
244
|
set: (c) => {
|
|
198
245
|
_.value = c || null;
|
|
199
246
|
}
|
|
200
247
|
});
|
|
201
|
-
|
|
248
|
+
_e(z, () => {
|
|
202
249
|
_.value = null;
|
|
203
250
|
});
|
|
204
|
-
const
|
|
251
|
+
const m = v(
|
|
205
252
|
() => {
|
|
206
253
|
var c;
|
|
207
|
-
return
|
|
254
|
+
return z.value === "product" ? O.value.map((p) => ({
|
|
208
255
|
value: p.catalogId ?? "",
|
|
209
|
-
label:
|
|
256
|
+
label: X(p.catalogId, p.label),
|
|
210
257
|
badge: p.badge,
|
|
211
258
|
disabled: !p.linked
|
|
212
259
|
})) : (((c = g.value) == null ? void 0 : c.groupScopes) ?? []).map((p) => ({
|
|
213
260
|
value: p.catalogId ?? "",
|
|
214
|
-
label:
|
|
261
|
+
label: X(p.catalogId, p.label),
|
|
215
262
|
badge: p.groups.length,
|
|
216
263
|
disabled: p.groups.length === 0
|
|
217
264
|
}));
|
|
218
265
|
}
|
|
219
|
-
),
|
|
266
|
+
), te = v(
|
|
220
267
|
() => {
|
|
221
268
|
var c;
|
|
222
|
-
return (((c =
|
|
269
|
+
return (((c = k.value) == null ? void 0 : c.groups) ?? []).map((p) => ({
|
|
223
270
|
groupName: p.groupName,
|
|
224
271
|
subRows: [...p.rows]
|
|
225
272
|
}));
|
|
226
273
|
}
|
|
227
|
-
),
|
|
228
|
-
|
|
229
|
-
|
|
274
|
+
), V = Y({});
|
|
275
|
+
_e(
|
|
276
|
+
te,
|
|
230
277
|
(c) => {
|
|
231
|
-
|
|
278
|
+
V.value = Object.fromEntries(c.map((p, S) => [S, !0]));
|
|
232
279
|
},
|
|
233
280
|
{ immediate: !0 }
|
|
234
281
|
);
|
|
235
|
-
const
|
|
282
|
+
const Z = v(() => [
|
|
236
283
|
{
|
|
237
284
|
accessorKey: "code",
|
|
238
285
|
header: () => n("menu.product.table.columns.code"),
|
|
239
286
|
enableSorting: !1,
|
|
240
|
-
cell: ({ row: c }) => c.original.subRows ?
|
|
287
|
+
cell: ({ row: c }) => c.original.subRows ? E(
|
|
241
288
|
"div",
|
|
242
289
|
{
|
|
243
290
|
class: "flex items-center gap-2 fm-typo-en-body-md-600 text-fm-color-typo-secondary"
|
|
244
291
|
},
|
|
245
292
|
[
|
|
246
|
-
|
|
293
|
+
E(pe.FmButton, {
|
|
247
294
|
icon: "keyboard_arrow_up",
|
|
248
295
|
variant: "tertiary",
|
|
249
296
|
"aria-label": n("menu.product.overview.toggle_group", {
|
|
@@ -278,16 +325,16 @@ const Cl = {
|
|
|
278
325
|
header: () => n("menu.product.form.variant.columns.price"),
|
|
279
326
|
cell: ({ row: c }) => {
|
|
280
327
|
var p;
|
|
281
|
-
return
|
|
328
|
+
return se((p = c.original.price) == null ? void 0 : p.amount, null);
|
|
282
329
|
}
|
|
283
330
|
},
|
|
284
331
|
{
|
|
285
332
|
accessorKey: "orderFrom",
|
|
286
333
|
header: () => n("menu.product.table.columns.order_from"),
|
|
287
|
-
cell: ({ row: c }) => c.original.orderFrom ?
|
|
288
|
-
|
|
334
|
+
cell: ({ row: c }) => c.original.orderFrom ? E(
|
|
335
|
+
pe.FmChip,
|
|
289
336
|
{ compact: !0, class: "fm-typo-en-body-md-600" },
|
|
290
|
-
() => n(
|
|
337
|
+
() => n(Ie[c.original.orderFrom])
|
|
291
338
|
) : n("menu.common.labels.empty_value")
|
|
292
339
|
}
|
|
293
340
|
].map((c) => ({
|
|
@@ -299,19 +346,19 @@ const Cl = {
|
|
|
299
346
|
}))
|
|
300
347
|
]);
|
|
301
348
|
return (c, p) => {
|
|
302
|
-
const
|
|
303
|
-
return o(), F(
|
|
304
|
-
modelValue:
|
|
305
|
-
"onUpdate:modelValue": p[3] || (p[3] = (
|
|
349
|
+
const S = T("FmCircularProgress"), I = T("FmIcon"), B = T("FmTabs"), r = T("FmBadge"), b = T("FmCollapsibleTabs"), R = T("FmTable"), oe = T("FmSideSheet");
|
|
350
|
+
return o(), F(oe, {
|
|
351
|
+
modelValue: D.value,
|
|
352
|
+
"onUpdate:modelValue": p[3] || (p[3] = (K) => D.value = K),
|
|
306
353
|
"max-width": 1200,
|
|
307
354
|
"dismiss-away": ""
|
|
308
355
|
}, {
|
|
309
356
|
"side-sheet-header": A(() => {
|
|
310
|
-
var
|
|
357
|
+
var K;
|
|
311
358
|
return [
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
((
|
|
359
|
+
i("div", Vl, [
|
|
360
|
+
i("p", Pl, L(a(n)("menu.product.overview.title")), 1),
|
|
361
|
+
((K = c.state) == null ? void 0 : K.status) === "ready" && c.state.stale ? (o(), F(S, {
|
|
315
362
|
key: 0,
|
|
316
363
|
size: "md"
|
|
317
364
|
})) : M("", !0)
|
|
@@ -319,95 +366,95 @@ const Cl = {
|
|
|
319
366
|
];
|
|
320
367
|
}),
|
|
321
368
|
default: A(() => {
|
|
322
|
-
var
|
|
369
|
+
var K, J, w;
|
|
323
370
|
return [
|
|
324
|
-
g.value ? (o(),
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
g.value.thumbnailUrl ? (o(),
|
|
371
|
+
g.value ? (o(), f("div", Ll, [
|
|
372
|
+
i("div", El, [
|
|
373
|
+
i("div", Ol, [
|
|
374
|
+
g.value.thumbnailUrl ? (o(), f("img", {
|
|
328
375
|
key: 0,
|
|
329
376
|
src: g.value.thumbnailUrl,
|
|
330
377
|
alt: g.value.name,
|
|
331
378
|
class: "w-full h-full object-cover"
|
|
332
|
-
}, null, 8,
|
|
379
|
+
}, null, 8, Ml)) : (o(), F(I, {
|
|
333
380
|
key: 1,
|
|
334
381
|
name: "image",
|
|
335
382
|
outline: "",
|
|
336
383
|
color: "neutral-gray-300"
|
|
337
384
|
}))
|
|
338
385
|
]),
|
|
339
|
-
|
|
340
|
-
|
|
386
|
+
i("div", Ul, [
|
|
387
|
+
i("p", Tl, L(g.value.code ? a(n)("menu.group.list.product_code_name", {
|
|
341
388
|
code: g.value.code,
|
|
342
389
|
name: g.value.name
|
|
343
390
|
}) : g.value.name), 1),
|
|
344
|
-
|
|
391
|
+
i("p", Al, L(a(n)("menu.common.labels.a11y_labelled_name", {
|
|
345
392
|
label: a(n)("menu.product.overview.base_price"),
|
|
346
|
-
name:
|
|
347
|
-
((
|
|
348
|
-
((
|
|
393
|
+
name: se(
|
|
394
|
+
((K = g.value.basePrice) == null ? void 0 : K.amount) ?? null,
|
|
395
|
+
((J = g.value.basePrice) == null ? void 0 : J.currency) ?? null
|
|
349
396
|
)
|
|
350
397
|
})), 1)
|
|
351
398
|
])
|
|
352
399
|
]),
|
|
353
|
-
|
|
354
|
-
modelValue:
|
|
355
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
400
|
+
y(B, {
|
|
401
|
+
modelValue: z.value,
|
|
402
|
+
"onUpdate:modelValue": p[0] || (p[0] = (N) => z.value = N),
|
|
356
403
|
items: [
|
|
357
404
|
{ value: "product", label: a(n)("menu.common.labels.product") },
|
|
358
405
|
{ value: "group", label: a(n)("menu.group.title") }
|
|
359
406
|
]
|
|
360
407
|
}, null, 8, ["modelValue", "items"]),
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
408
|
+
i("div", Rl, [
|
|
409
|
+
i("div", Nl, [
|
|
410
|
+
i("div", jl, [
|
|
411
|
+
i("p", Dl, L(a(n)("menu.common.labels.catalog")), 1),
|
|
412
|
+
y(r, {
|
|
366
413
|
inline: "",
|
|
367
414
|
variant: "neutral",
|
|
368
|
-
value:
|
|
415
|
+
value: z.value === "product" ? g.value.catalogCount : g.value.groupCount,
|
|
369
416
|
class: "!rounded-md !bg-fm-color-neutral-gray-100 !text-fm-color-typo-primary"
|
|
370
417
|
}, null, 8, ["value"])
|
|
371
418
|
]),
|
|
372
|
-
|
|
419
|
+
y($t, null, {
|
|
373
420
|
default: A(() => [
|
|
374
|
-
|
|
375
|
-
modelValue:
|
|
376
|
-
"onUpdate:modelValue": p[1] || (p[1] = (
|
|
377
|
-
items:
|
|
421
|
+
y(b, {
|
|
422
|
+
modelValue: j.value,
|
|
423
|
+
"onUpdate:modelValue": p[1] || (p[1] = (N) => j.value = N),
|
|
424
|
+
items: m.value
|
|
378
425
|
}, null, 8, ["modelValue", "items"])
|
|
379
426
|
]),
|
|
380
427
|
_: 1
|
|
381
428
|
})
|
|
382
429
|
]),
|
|
383
|
-
p[4] || (p[4] =
|
|
384
|
-
|
|
385
|
-
|
|
430
|
+
p[4] || (p[4] = i("div", { class: "w-[1px] min-h-full ml-4 mr-12 bg-fm-color-neutral-gray-100 self-stretch" }, null, -1)),
|
|
431
|
+
i("div", zl, [
|
|
432
|
+
z.value === "product" && W.value ? (o(), F(R, {
|
|
386
433
|
key: 0,
|
|
387
|
-
"column-defs":
|
|
388
|
-
"row-data": [...
|
|
389
|
-
"page-size": Math.max(
|
|
434
|
+
"column-defs": ee.value,
|
|
435
|
+
"row-data": [...W.value.rows],
|
|
436
|
+
"page-size": Math.max(W.value.rows.length, 1),
|
|
390
437
|
"hide-footer": "",
|
|
391
438
|
"shrink-at": !1
|
|
392
|
-
}, null, 8, ["column-defs", "row-data", "page-size"])) :
|
|
439
|
+
}, null, 8, ["column-defs", "row-data", "page-size"])) : z.value === "group" ? (o(), F($t, { key: 1 }, {
|
|
393
440
|
default: A(() => [
|
|
394
|
-
|
|
395
|
-
"column-defs":
|
|
396
|
-
"row-data":
|
|
397
|
-
"get-sub-row": (
|
|
398
|
-
"expanded-state":
|
|
441
|
+
y(R, {
|
|
442
|
+
"column-defs": Z.value,
|
|
443
|
+
"row-data": te.value,
|
|
444
|
+
"get-sub-row": (N) => N.subRows,
|
|
445
|
+
"expanded-state": V.value,
|
|
399
446
|
"page-size": 1e6,
|
|
400
447
|
"hide-footer": "",
|
|
401
448
|
"shrink-at": !1,
|
|
402
|
-
"onUpdate:expandedState": p[2] || (p[2] = (
|
|
449
|
+
"onUpdate:expandedState": p[2] || (p[2] = (N) => V.value = N)
|
|
403
450
|
}, null, 8, ["column-defs", "row-data", "get-sub-row", "expanded-state"])
|
|
404
451
|
]),
|
|
405
452
|
_: 1
|
|
406
453
|
})) : M("", !0)
|
|
407
454
|
])
|
|
408
455
|
])
|
|
409
|
-
])) :
|
|
410
|
-
|
|
456
|
+
])) : x.value ? (o(), f("p", Bl, L(x.value), 1)) : ((w = c.state) == null ? void 0 : w.status) === "loading" ? (o(), f("div", Kl, [
|
|
457
|
+
y(S, { size: "lg" })
|
|
411
458
|
])) : M("", !0)
|
|
412
459
|
];
|
|
413
460
|
}),
|
|
@@ -415,253 +462,253 @@ const Cl = {
|
|
|
415
462
|
}, 8, ["modelValue"]);
|
|
416
463
|
};
|
|
417
464
|
}
|
|
418
|
-
}),
|
|
465
|
+
}), ql = { class: "flex flex-col w-full h-full" }, Hl = {
|
|
419
466
|
key: 0,
|
|
420
467
|
class: "mx-16 mb-8 flex items-center gap-8 rounded-lg bg-fm-color-system-info-100 p-16"
|
|
421
|
-
},
|
|
468
|
+
}, Wl = { class: "fm-typo-en-body-lg-400" }, Xl = { class: "fm-typo-en-body-lg-400" }, Yl = { class: "xs:overflow-x-auto xs:shrink-0" }, Jl = {
|
|
422
469
|
key: 1,
|
|
423
470
|
class: "flex-1 flex overflow-hidden xs:flex-col"
|
|
424
|
-
},
|
|
471
|
+
}, Ql = { class: "w-[300px] overflow-y-auto xs:w-full xs:max-h-[40%] xs:shrink-0 xs:border-b xs:border-fm-color-neutral-gray-200" }, Zl = { class: "flex min-w-0 w-full items-center gap-8" }, ea = { class: "flex min-w-0 w-full items-center gap-8 pl-16" }, ta = { class: "flex min-w-0 w-full items-center gap-8 pl-32" }, la = { class: "flex-1 flex flex-col overflow-auto px-16 pb-16 pt-8 xs:px-0" }, aa = {
|
|
425
472
|
key: 0,
|
|
426
473
|
class: "border border-fm-color-neutral-gray-200 fm-corner-radius-md p-16"
|
|
427
|
-
},
|
|
474
|
+
}, oa = { class: "flex items-center gap-8 pb-8" }, na = { class: "fm-typo-en-title-sm-600" }, sa = { class: "fm-typo-en-title-sm-600 pb-8" }, ra = {
|
|
428
475
|
key: 2,
|
|
429
476
|
class: "mt-8 px-16 fm-typo-en-body-lg-600"
|
|
430
|
-
},
|
|
477
|
+
}, Lt = "line-clamp-2 w-full xs:!line-clamp-none", ia = /* @__PURE__ */ he({
|
|
431
478
|
__name: "ImportDiffPreview",
|
|
432
479
|
props: {
|
|
433
480
|
show: { type: Boolean },
|
|
434
481
|
diff: {}
|
|
435
482
|
},
|
|
436
483
|
emits: ["confirm", "cancel"],
|
|
437
|
-
setup(C, { emit:
|
|
438
|
-
var
|
|
439
|
-
const t = C,
|
|
440
|
-
function
|
|
441
|
-
const
|
|
442
|
-
|
|
484
|
+
setup(C, { emit: u }) {
|
|
485
|
+
var I, B;
|
|
486
|
+
const t = C, $ = u, { t: n, n: U } = Fe(), g = Y(((B = (I = t.diff) == null ? void 0 : I.tabs[0]) == null ? void 0 : B.id) ?? "product"), x = Y(null), D = Y(/* @__PURE__ */ new Set());
|
|
487
|
+
function z(r) {
|
|
488
|
+
const b = new Set(D.value);
|
|
489
|
+
b.has(r) ? b.delete(r) : b.add(r), D.value = b;
|
|
443
490
|
}
|
|
444
|
-
const _ =
|
|
491
|
+
const _ = v(
|
|
445
492
|
() => {
|
|
446
|
-
var
|
|
447
|
-
return (((
|
|
448
|
-
value:
|
|
449
|
-
label: n(`menu.import_export.diff.tabs.${
|
|
493
|
+
var r;
|
|
494
|
+
return (((r = t.diff) == null ? void 0 : r.tabs) ?? []).map((b) => ({
|
|
495
|
+
value: b.id,
|
|
496
|
+
label: n(`menu.import_export.diff.tabs.${b.id}`)
|
|
450
497
|
}));
|
|
451
498
|
}
|
|
452
|
-
),
|
|
499
|
+
), O = v(
|
|
453
500
|
() => {
|
|
454
|
-
var
|
|
455
|
-
return ((
|
|
501
|
+
var r;
|
|
502
|
+
return ((r = t.diff) == null ? void 0 : r.tabs.find((b) => b.id === g.value)) ?? null;
|
|
456
503
|
}
|
|
457
|
-
),
|
|
458
|
-
var
|
|
459
|
-
return ((
|
|
460
|
-
}),
|
|
461
|
-
() =>
|
|
504
|
+
), W = v(() => {
|
|
505
|
+
var r;
|
|
506
|
+
return ((r = O.value) == null ? void 0 : r.entities) ?? [];
|
|
507
|
+
}), k = v(
|
|
508
|
+
() => W.value.find((r) => r.key === x.value) ?? null
|
|
462
509
|
);
|
|
463
|
-
|
|
464
|
-
[g,
|
|
510
|
+
_e(
|
|
511
|
+
[g, W],
|
|
465
512
|
() => {
|
|
466
|
-
var
|
|
467
|
-
|
|
513
|
+
var r;
|
|
514
|
+
W.value.some((b) => b.key === x.value) || (x.value = ((r = W.value[0]) == null ? void 0 : r.key) ?? null);
|
|
468
515
|
},
|
|
469
516
|
{ immediate: !0 }
|
|
470
517
|
);
|
|
471
|
-
const
|
|
518
|
+
const X = v(
|
|
472
519
|
() => {
|
|
473
|
-
var
|
|
474
|
-
return (((
|
|
475
|
-
const
|
|
476
|
-
(
|
|
477
|
-
),
|
|
478
|
-
for (const
|
|
479
|
-
|
|
520
|
+
var r;
|
|
521
|
+
return (((r = O.value) == null ? void 0 : r.groups) ?? []).map((b) => {
|
|
522
|
+
const R = W.value.find((w) => w.isHeading && w.groupId === b.id) ?? null, oe = W.value.filter(
|
|
523
|
+
(w) => w.groupId === b.id && !w.isHeading
|
|
524
|
+
), K = [], J = /* @__PURE__ */ new Map();
|
|
525
|
+
for (const w of oe)
|
|
526
|
+
J.has(w.id) || (J.set(w.id, []), K.push(w.id)), J.get(w.id).push(w);
|
|
480
527
|
return {
|
|
481
|
-
...
|
|
482
|
-
heading:
|
|
483
|
-
products:
|
|
484
|
-
const
|
|
528
|
+
...b,
|
|
529
|
+
heading: R,
|
|
530
|
+
products: K.map((w) => {
|
|
531
|
+
const N = J.get(w), le = N.find((G) => G.variantName === null);
|
|
485
532
|
return {
|
|
486
|
-
id:
|
|
487
|
-
name:
|
|
488
|
-
base:
|
|
489
|
-
variants:
|
|
533
|
+
id: w,
|
|
534
|
+
name: N[0].name,
|
|
535
|
+
base: le ?? null,
|
|
536
|
+
variants: N.filter((G) => G.variantName !== null)
|
|
490
537
|
};
|
|
491
538
|
})
|
|
492
539
|
};
|
|
493
540
|
});
|
|
494
541
|
}
|
|
495
|
-
),
|
|
542
|
+
), se = {
|
|
496
543
|
ADDON: "menu.import_export.diff.groups.addon",
|
|
497
544
|
takeaway: "menu.import_export.diff.tabs.takeaway",
|
|
498
545
|
addonGroup: "menu.import_export.diff.tabs.addonGroup",
|
|
499
546
|
category: "menu.import_export.diff.tabs.category",
|
|
500
547
|
subcategory: "menu.import_export.diff.tabs.subcategory"
|
|
501
548
|
};
|
|
502
|
-
function
|
|
503
|
-
if (
|
|
504
|
-
const
|
|
505
|
-
return
|
|
549
|
+
function ee(r) {
|
|
550
|
+
if (r.name !== null) return r.name;
|
|
551
|
+
const b = se[r.id];
|
|
552
|
+
return b ? n(b) : r.id;
|
|
506
553
|
}
|
|
507
|
-
function r
|
|
508
|
-
switch (
|
|
554
|
+
function j(r) {
|
|
555
|
+
switch (r.kind) {
|
|
509
556
|
case "money":
|
|
510
|
-
return
|
|
511
|
-
minimumFractionDigits:
|
|
512
|
-
maximumFractionDigits:
|
|
557
|
+
return U(r.amount / 10 ** r.precision, {
|
|
558
|
+
minimumFractionDigits: r.precision,
|
|
559
|
+
maximumFractionDigits: r.precision
|
|
513
560
|
});
|
|
514
561
|
case "moneyList":
|
|
515
|
-
return `[${
|
|
516
|
-
(
|
|
517
|
-
minimumFractionDigits:
|
|
518
|
-
maximumFractionDigits:
|
|
562
|
+
return `[${r.items.map(
|
|
563
|
+
(b) => U(b.amount / 10 ** b.precision, {
|
|
564
|
+
minimumFractionDigits: b.precision,
|
|
565
|
+
maximumFractionDigits: b.precision
|
|
519
566
|
})
|
|
520
567
|
).join(", ")}]`;
|
|
521
568
|
case "statutoryCharges":
|
|
522
|
-
return
|
|
569
|
+
return r.charges.map((b) => `${b.code} × ${U(b.unitCount)}`).join(", ");
|
|
523
570
|
case "absent":
|
|
524
571
|
return n("menu.import_export.diff.values.absent");
|
|
525
572
|
case "followDefault":
|
|
526
573
|
return n("menu.import_export.diff.values.follow_default");
|
|
527
574
|
default:
|
|
528
|
-
return
|
|
575
|
+
return r.text;
|
|
529
576
|
}
|
|
530
577
|
}
|
|
531
|
-
function
|
|
532
|
-
const
|
|
533
|
-
return
|
|
578
|
+
function m(r, b) {
|
|
579
|
+
const R = r.cells[b];
|
|
580
|
+
return R ? R.before === null ? j(R.after) : `${j(R.before)} > ${j(R.after)}` : n("menu.import_export.diff.values.no_change");
|
|
534
581
|
}
|
|
535
|
-
const
|
|
582
|
+
const te = v(
|
|
536
583
|
() => {
|
|
537
|
-
var
|
|
538
|
-
return (((
|
|
539
|
-
(
|
|
540
|
-
id:
|
|
584
|
+
var r, b;
|
|
585
|
+
return (((r = k.value) == null ? void 0 : r.columns) ?? ((b = O.value) == null ? void 0 : b.columns) ?? []).map(
|
|
586
|
+
(R) => R.id === "default" && R.name === null ? {
|
|
587
|
+
id: R.id,
|
|
541
588
|
header: () => n("menu.import_export.diff.columns.default"),
|
|
542
|
-
cell: (
|
|
589
|
+
cell: (oe) => m(oe.row.original, R.id),
|
|
543
590
|
// Legacy's 300px floor (`PreviewProduct2.vue:96`) is wider than
|
|
544
591
|
// the table's whole card on a phone, where it wrapped every long
|
|
545
592
|
// value at 300px and left the end of each line off screen. Below
|
|
546
593
|
// `xs` the column takes the width the card has instead.
|
|
547
594
|
meta: {
|
|
548
595
|
headerClass: "min-w-[300px] xs:min-w-0",
|
|
549
|
-
cellSpanClass:
|
|
596
|
+
cellSpanClass: Lt
|
|
550
597
|
}
|
|
551
598
|
} : {
|
|
552
|
-
id:
|
|
553
|
-
header: () =>
|
|
554
|
-
cell: (
|
|
555
|
-
meta: { cellSpanClass:
|
|
599
|
+
id: R.id,
|
|
600
|
+
header: () => R.name ?? "",
|
|
601
|
+
cell: (oe) => m(oe.row.original, R.id),
|
|
602
|
+
meta: { cellSpanClass: Lt }
|
|
556
603
|
}
|
|
557
604
|
);
|
|
558
605
|
}
|
|
559
|
-
),
|
|
606
|
+
), V = v(() => [
|
|
560
607
|
{
|
|
561
608
|
id: "field",
|
|
562
609
|
header: () => n("menu.import_export.diff.columns.field"),
|
|
563
|
-
cell: (
|
|
610
|
+
cell: (r) => r.row.original.field
|
|
564
611
|
},
|
|
565
|
-
...
|
|
566
|
-
]),
|
|
612
|
+
...te.value
|
|
613
|
+
]), Z = (r) => r ? "T" : "F", c = [
|
|
567
614
|
{
|
|
568
615
|
id: "product",
|
|
569
616
|
header: () => n("menu.group.list.columns.products"),
|
|
570
|
-
cell: (
|
|
617
|
+
cell: (r) => r.row.original.name
|
|
571
618
|
},
|
|
572
619
|
{
|
|
573
620
|
id: "linked",
|
|
574
621
|
header: () => n("menu.import_export.diff.columns.default"),
|
|
575
|
-
cell: (
|
|
576
|
-
const
|
|
577
|
-
return `${
|
|
622
|
+
cell: (r) => {
|
|
623
|
+
const b = r.row.original;
|
|
624
|
+
return `${Z(b.before)} > ${Z(b.after)}`;
|
|
578
625
|
}
|
|
579
626
|
}
|
|
580
|
-
], p =
|
|
581
|
-
var
|
|
627
|
+
], p = v(() => {
|
|
628
|
+
var r;
|
|
582
629
|
return [
|
|
583
|
-
...((
|
|
630
|
+
...((r = k.value) == null ? void 0 : r.linkedProducts) ?? []
|
|
584
631
|
];
|
|
585
|
-
}),
|
|
632
|
+
}), S = v(
|
|
586
633
|
() => n("menu.import_export.diff.empty", {
|
|
587
634
|
tab: n(`menu.import_export.diff.tabs.${g.value}`)
|
|
588
635
|
})
|
|
589
636
|
);
|
|
590
|
-
return (
|
|
591
|
-
const
|
|
637
|
+
return (r, b) => {
|
|
638
|
+
const R = T("FmIcon"), oe = T("FmTabs"), K = T("FmChip"), J = T("FmListItem"), w = T("FmList"), N = T("FmTable");
|
|
592
639
|
return o(), F(He, {
|
|
593
|
-
show:
|
|
640
|
+
show: r.show,
|
|
594
641
|
title: a(n)("menu.import_export.diff.title"),
|
|
595
642
|
"primary-action": { label: a(n)("menu.import_export.preview.actions.confirm") },
|
|
596
643
|
"secondary-actions": [
|
|
597
644
|
{
|
|
598
645
|
label: a(n)("menu.import_export.preview.actions.cancel"),
|
|
599
|
-
click: () =>
|
|
646
|
+
click: () => $("cancel")
|
|
600
647
|
}
|
|
601
648
|
],
|
|
602
|
-
onOnPrimary:
|
|
603
|
-
onOnCancel:
|
|
649
|
+
onOnPrimary: b[1] || (b[1] = (le) => $("confirm")),
|
|
650
|
+
onOnCancel: b[2] || (b[2] = (le) => $("cancel"))
|
|
604
651
|
}, {
|
|
605
652
|
default: A(() => {
|
|
606
|
-
var
|
|
653
|
+
var le, G;
|
|
607
654
|
return [
|
|
608
|
-
|
|
609
|
-
(
|
|
610
|
-
|
|
655
|
+
i("div", ql, [
|
|
656
|
+
(le = r.diff) != null && le.newCatalogs.length ? (o(), f("div", Hl, [
|
|
657
|
+
y(R, {
|
|
611
658
|
name: "info",
|
|
612
659
|
color: "system-info-300"
|
|
613
660
|
}),
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
(o(!0),
|
|
618
|
-
key:
|
|
619
|
-
},
|
|
661
|
+
i("div", null, [
|
|
662
|
+
i("p", Wl, L(a(n)("menu.import_export.diff.new_catalogs")), 1),
|
|
663
|
+
i("ul", Xl, [
|
|
664
|
+
(o(!0), f(Q, null, ue(r.diff.newCatalogs, (q) => (o(), f("li", {
|
|
665
|
+
key: q.id
|
|
666
|
+
}, L(q.name), 1))), 128))
|
|
620
667
|
])
|
|
621
668
|
])
|
|
622
669
|
])) : M("", !0),
|
|
623
|
-
|
|
624
|
-
|
|
670
|
+
i("div", Yl, [
|
|
671
|
+
y(oe, {
|
|
625
672
|
"model-value": g.value,
|
|
626
673
|
items: _.value,
|
|
627
|
-
"onUpdate:modelValue":
|
|
674
|
+
"onUpdate:modelValue": b[0] || (b[0] = (q) => g.value = q)
|
|
628
675
|
}, null, 8, ["model-value", "items"])
|
|
629
676
|
]),
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
677
|
+
W.value.length ? (o(), f("div", Jl, [
|
|
678
|
+
i("div", Ql, [
|
|
679
|
+
y(w, null, {
|
|
633
680
|
default: A(() => [
|
|
634
|
-
(o(!0),
|
|
635
|
-
key:
|
|
681
|
+
(o(!0), f(Q, null, ue(X.value, (q) => (o(), f(Q, {
|
|
682
|
+
key: q.id
|
|
636
683
|
}, [
|
|
637
|
-
|
|
638
|
-
"data-testid": `import-diff-heading-${
|
|
639
|
-
onClick: (
|
|
684
|
+
y(J, {
|
|
685
|
+
"data-testid": `import-diff-heading-${q.id}`,
|
|
686
|
+
onClick: (H) => q.heading && !q.heading.isDeleted ? x.value = q.heading.key : void 0
|
|
640
687
|
}, {
|
|
641
688
|
default: A(() => {
|
|
642
|
-
var
|
|
689
|
+
var H, xe, re;
|
|
643
690
|
return [
|
|
644
|
-
|
|
645
|
-
|
|
691
|
+
i("span", Zl, [
|
|
692
|
+
y(R, {
|
|
646
693
|
name: "keyboard_arrow_down",
|
|
647
694
|
size: "sm"
|
|
648
695
|
}),
|
|
649
|
-
|
|
650
|
-
class:
|
|
651
|
-
"text-fm-color-typo-disabled": (
|
|
696
|
+
i("span", {
|
|
697
|
+
class: fe(["fm-typo-en-body-lg-400 truncate", {
|
|
698
|
+
"text-fm-color-typo-disabled": (H = q.heading) == null ? void 0 : H.isDeleted
|
|
652
699
|
}])
|
|
653
|
-
},
|
|
654
|
-
(
|
|
700
|
+
}, L(ee(q)), 3),
|
|
701
|
+
(xe = q.heading) != null && xe.isDeleted ? (o(), F(K, {
|
|
655
702
|
key: 0,
|
|
656
703
|
label: a(n)("menu.import_export.diff.deleted"),
|
|
657
704
|
variant: "critical",
|
|
658
705
|
class: "ml-auto"
|
|
659
|
-
}, null, 8, ["label"])) : (
|
|
706
|
+
}, null, 8, ["label"])) : (re = q.heading) != null && re.isCreate ? (o(), F(K, {
|
|
660
707
|
key: 1,
|
|
661
708
|
label: a(n)("menu.import_export.diff.created"),
|
|
662
709
|
variant: "success",
|
|
663
710
|
class: "ml-auto"
|
|
664
|
-
}, null, 8, ["label"])) :
|
|
711
|
+
}, null, 8, ["label"])) : q.heading ? (o(), F(K, {
|
|
665
712
|
key: 2,
|
|
666
713
|
label: a(n)("menu.import_export.diff.updated"),
|
|
667
714
|
variant: "neutral",
|
|
@@ -672,35 +719,35 @@ const Cl = {
|
|
|
672
719
|
}),
|
|
673
720
|
_: 2
|
|
674
721
|
}, 1032, ["data-testid", "onClick"]),
|
|
675
|
-
(o(!0),
|
|
676
|
-
var
|
|
677
|
-
return o(),
|
|
678
|
-
key:
|
|
722
|
+
(o(!0), f(Q, null, ue(q.products, (H) => {
|
|
723
|
+
var xe;
|
|
724
|
+
return o(), f(Q, {
|
|
725
|
+
key: H.id
|
|
679
726
|
}, [
|
|
680
|
-
|
|
681
|
-
"data-testid": `import-diff-entry-${((
|
|
682
|
-
onClick: (
|
|
727
|
+
y(J, {
|
|
728
|
+
"data-testid": `import-diff-entry-${((xe = H.base) == null ? void 0 : xe.key) ?? `${q.id}/${H.id}`}`,
|
|
729
|
+
onClick: (re) => H.base ? x.value = H.base.key : z(H.id)
|
|
683
730
|
}, {
|
|
684
731
|
default: A(() => {
|
|
685
|
-
var
|
|
732
|
+
var re, Ve, je;
|
|
686
733
|
return [
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
name:
|
|
734
|
+
i("span", ea, [
|
|
735
|
+
y(R, {
|
|
736
|
+
name: H.variants.length ? "keyboard_arrow_down" : "subdirectory_arrow_right",
|
|
690
737
|
size: "sm",
|
|
691
|
-
onClick:
|
|
738
|
+
onClick: $e((Pe) => H.variants.length ? z(H.id) : void 0, ["stop"])
|
|
692
739
|
}, null, 8, ["name", "onClick"]),
|
|
693
|
-
|
|
694
|
-
class:
|
|
695
|
-
"text-fm-color-typo-disabled": (
|
|
740
|
+
i("span", {
|
|
741
|
+
class: fe(["fm-typo-en-body-lg-400 truncate", {
|
|
742
|
+
"text-fm-color-typo-disabled": (re = H.base) == null ? void 0 : re.isDeleted
|
|
696
743
|
}])
|
|
697
|
-
},
|
|
698
|
-
(
|
|
744
|
+
}, L(H.name), 3),
|
|
745
|
+
(Ve = H.base) != null && Ve.isDeleted ? (o(), F(K, {
|
|
699
746
|
key: 0,
|
|
700
747
|
label: a(n)("menu.import_export.diff.deleted"),
|
|
701
748
|
variant: "critical",
|
|
702
749
|
class: "ml-auto"
|
|
703
|
-
}, null, 8, ["label"])) : (
|
|
750
|
+
}, null, 8, ["label"])) : (je = H.base) != null && je.isCreate ? (o(), F(K, {
|
|
704
751
|
key: 1,
|
|
705
752
|
label: a(n)("menu.import_export.diff.created"),
|
|
706
753
|
variant: "success",
|
|
@@ -711,24 +758,24 @@ const Cl = {
|
|
|
711
758
|
}),
|
|
712
759
|
_: 2
|
|
713
760
|
}, 1032, ["data-testid", "onClick"]),
|
|
714
|
-
(o(!0),
|
|
715
|
-
key:
|
|
716
|
-
"data-testid": `import-diff-entry-${
|
|
717
|
-
onClick: (
|
|
761
|
+
(o(!0), f(Q, null, ue(D.value.has(H.id) ? H.variants : [], (re) => (o(), F(J, {
|
|
762
|
+
key: re.key,
|
|
763
|
+
"data-testid": `import-diff-entry-${re.key}`,
|
|
764
|
+
onClick: (Ve) => x.value = re.key
|
|
718
765
|
}, {
|
|
719
766
|
default: A(() => [
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
class:
|
|
723
|
-
"text-fm-color-typo-disabled":
|
|
767
|
+
i("span", ta, [
|
|
768
|
+
i("span", {
|
|
769
|
+
class: fe(["fm-typo-en-body-lg-400 truncate", {
|
|
770
|
+
"text-fm-color-typo-disabled": re.isDeleted
|
|
724
771
|
}])
|
|
725
|
-
},
|
|
726
|
-
|
|
772
|
+
}, L(re.variantName), 3),
|
|
773
|
+
re.isDeleted ? (o(), F(K, {
|
|
727
774
|
key: 0,
|
|
728
775
|
label: a(n)("menu.import_export.diff.deleted"),
|
|
729
776
|
variant: "critical",
|
|
730
777
|
class: "ml-auto"
|
|
731
|
-
}, null, 8, ["label"])) :
|
|
778
|
+
}, null, 8, ["label"])) : re.isCreate ? (o(), F(K, {
|
|
732
779
|
key: 1,
|
|
733
780
|
label: a(n)("menu.import_export.diff.created"),
|
|
734
781
|
variant: "success",
|
|
@@ -745,39 +792,39 @@ const Cl = {
|
|
|
745
792
|
_: 1
|
|
746
793
|
})
|
|
747
794
|
]),
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
795
|
+
i("div", la, [
|
|
796
|
+
k.value && (!k.value.isHeading || k.value.changes.length) ? (o(), f("div", aa, [
|
|
797
|
+
i("div", oa, [
|
|
798
|
+
i("p", na, L(k.value.variantName ?? k.value.name), 1),
|
|
799
|
+
k.value.isDeleted ? (o(), F(K, {
|
|
753
800
|
key: 0,
|
|
754
801
|
"data-testid": "import-diff-selected-deleted",
|
|
755
802
|
label: a(n)("menu.import_export.diff.deleted"),
|
|
756
803
|
variant: "critical"
|
|
757
|
-
}, null, 8, ["label"])) :
|
|
804
|
+
}, null, 8, ["label"])) : k.value.isCreate ? (o(), F(K, {
|
|
758
805
|
key: 1,
|
|
759
806
|
"data-testid": "import-diff-selected-created",
|
|
760
807
|
label: a(n)("menu.import_export.diff.created"),
|
|
761
808
|
variant: "success"
|
|
762
809
|
}, null, 8, ["label"])) : M("", !0)
|
|
763
810
|
]),
|
|
764
|
-
|
|
765
|
-
"column-defs":
|
|
766
|
-
"row-data": [...
|
|
811
|
+
y(N, {
|
|
812
|
+
"column-defs": V.value,
|
|
813
|
+
"row-data": [...k.value.changes],
|
|
767
814
|
"hide-footer": "",
|
|
768
815
|
"shrink-at": !1,
|
|
769
|
-
"page-size":
|
|
816
|
+
"page-size": k.value.changes.length || 1
|
|
770
817
|
}, null, 8, ["column-defs", "row-data", "page-size"])
|
|
771
818
|
])) : M("", !0),
|
|
772
|
-
p.value.length ? (o(),
|
|
819
|
+
p.value.length ? (o(), f("div", {
|
|
773
820
|
key: 1,
|
|
774
821
|
"data-testid": "import-diff-linked-products",
|
|
775
|
-
class:
|
|
822
|
+
class: fe(["border border-fm-color-neutral-gray-200 fm-corner-radius-md p-16", { "mt-16": (G = k.value) == null ? void 0 : G.changes.length }])
|
|
776
823
|
}, [
|
|
777
|
-
|
|
824
|
+
i("p", sa, L(a(n)("menu.group.list.products_linked", {
|
|
778
825
|
count: p.value.length
|
|
779
826
|
})), 1),
|
|
780
|
-
|
|
827
|
+
y(N, {
|
|
781
828
|
"column-defs": c,
|
|
782
829
|
"row-data": p.value,
|
|
783
830
|
"hide-footer": "",
|
|
@@ -786,7 +833,7 @@ const Cl = {
|
|
|
786
833
|
}, null, 8, ["row-data", "page-size"])
|
|
787
834
|
], 2)) : M("", !0)
|
|
788
835
|
])
|
|
789
|
-
])) : (o(),
|
|
836
|
+
])) : (o(), f("p", ra, L(S.value), 1))
|
|
790
837
|
])
|
|
791
838
|
];
|
|
792
839
|
}),
|
|
@@ -794,89 +841,89 @@ const Cl = {
|
|
|
794
841
|
}, 8, ["show", "title", "primary-action", "secondary-actions"]);
|
|
795
842
|
};
|
|
796
843
|
}
|
|
797
|
-
}),
|
|
798
|
-
function
|
|
799
|
-
let
|
|
800
|
-
|
|
801
|
-
let t = 0,
|
|
802
|
-
for (;
|
|
844
|
+
}), ua = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), ca = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), ma = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), da = /[^\p{L}\d]+/giu, Et = "$1\0$2", Ot = "";
|
|
845
|
+
function At(C) {
|
|
846
|
+
let u = C.trim();
|
|
847
|
+
u = u.replace(ua, Et).replace(ca, Et), u = u.replace(da, "\0");
|
|
848
|
+
let t = 0, $ = u.length;
|
|
849
|
+
for (; u.charAt(t) === "\0"; )
|
|
803
850
|
t++;
|
|
804
|
-
if (t ===
|
|
851
|
+
if (t === $)
|
|
805
852
|
return [];
|
|
806
|
-
for (;
|
|
807
|
-
|
|
808
|
-
return
|
|
853
|
+
for (; u.charAt($ - 1) === "\0"; )
|
|
854
|
+
$--;
|
|
855
|
+
return u.slice(t, $).split(/\0/g);
|
|
809
856
|
}
|
|
810
|
-
function
|
|
811
|
-
const
|
|
812
|
-
for (let t = 0; t <
|
|
813
|
-
const
|
|
857
|
+
function pa(C) {
|
|
858
|
+
const u = At(C);
|
|
859
|
+
for (let t = 0; t < u.length; t++) {
|
|
860
|
+
const $ = u[t], n = ma.exec($);
|
|
814
861
|
if (n) {
|
|
815
|
-
const
|
|
816
|
-
|
|
862
|
+
const U = n.index + (n[1] ?? n[2]).length;
|
|
863
|
+
u.splice(t, 1, $.slice(0, U), $.slice(U));
|
|
817
864
|
}
|
|
818
865
|
}
|
|
819
|
-
return
|
|
866
|
+
return u;
|
|
820
867
|
}
|
|
821
|
-
function
|
|
822
|
-
const [t,
|
|
823
|
-
return t +
|
|
868
|
+
function va(C, u) {
|
|
869
|
+
const [t, $, n] = ga(C, u), U = fa(u == null ? void 0 : u.locale), g = ba(u == null ? void 0 : u.locale), x = ya(U, g);
|
|
870
|
+
return t + $.map((D, z) => z === 0 ? x(D) : U(D)).join((u == null ? void 0 : u.delimiter) ?? " ") + n;
|
|
824
871
|
}
|
|
825
|
-
function
|
|
826
|
-
return C === !1 ? (
|
|
872
|
+
function fa(C) {
|
|
873
|
+
return C === !1 ? (u) => u.toLowerCase() : (u) => u.toLocaleLowerCase(C);
|
|
827
874
|
}
|
|
828
|
-
function
|
|
829
|
-
return C === !1 ? (
|
|
875
|
+
function ba(C) {
|
|
876
|
+
return C === !1 ? (u) => u.toUpperCase() : (u) => u.toLocaleUpperCase(C);
|
|
830
877
|
}
|
|
831
|
-
function
|
|
832
|
-
return (t) => `${
|
|
878
|
+
function ya(C, u) {
|
|
879
|
+
return (t) => `${u(t[0])}${C(t.slice(1))}`;
|
|
833
880
|
}
|
|
834
|
-
function
|
|
835
|
-
const t =
|
|
836
|
-
let
|
|
837
|
-
for (;
|
|
838
|
-
const
|
|
839
|
-
if (
|
|
881
|
+
function ga(C, u = {}) {
|
|
882
|
+
const t = u.split ?? (u.separateNumbers ? pa : At), $ = u.prefixCharacters ?? Ot, n = u.suffixCharacters ?? Ot;
|
|
883
|
+
let U = 0, g = C.length;
|
|
884
|
+
for (; U < C.length; ) {
|
|
885
|
+
const x = C.charAt(U);
|
|
886
|
+
if (!$.includes(x))
|
|
840
887
|
break;
|
|
841
|
-
|
|
888
|
+
U++;
|
|
842
889
|
}
|
|
843
|
-
for (; g >
|
|
844
|
-
const
|
|
845
|
-
if (!n.includes(
|
|
890
|
+
for (; g > U; ) {
|
|
891
|
+
const x = g - 1, D = C.charAt(x);
|
|
892
|
+
if (!n.includes(D))
|
|
846
893
|
break;
|
|
847
|
-
g =
|
|
894
|
+
g = x;
|
|
848
895
|
}
|
|
849
896
|
return [
|
|
850
|
-
C.slice(0,
|
|
851
|
-
t(C.slice(
|
|
897
|
+
C.slice(0, U),
|
|
898
|
+
t(C.slice(U, g)),
|
|
852
899
|
C.slice(g)
|
|
853
900
|
];
|
|
854
901
|
}
|
|
855
|
-
const
|
|
902
|
+
const _a = { class: "py-16 flex flex-col w-full h-full" }, ha = { class: "border border-fm-color-neutral-gray-100 p-16 fm-corner-radius-md" }, xa = { class: "w-[160px]" }, ka = { class: "flex-1" }, wa = { class: "truncate" }, Ca = { class: "flex-1" }, Fa = { class: "truncate" }, $a = { key: 1 }, Sa = /* @__PURE__ */ he({
|
|
856
903
|
__name: "ImportV3DiffPreview",
|
|
857
904
|
props: {
|
|
858
905
|
show: { type: Boolean },
|
|
859
906
|
diff: {}
|
|
860
907
|
},
|
|
861
908
|
emits: ["confirm", "cancel"],
|
|
862
|
-
setup(C, { emit:
|
|
863
|
-
const t = C,
|
|
864
|
-
function
|
|
909
|
+
setup(C, { emit: u }) {
|
|
910
|
+
const t = C, $ = u, { t: n } = Fe(), U = Y(""), g = v(() => t.diff ?? []);
|
|
911
|
+
function x(_) {
|
|
865
912
|
return `${_.code} ${_.name}`.trim();
|
|
866
913
|
}
|
|
867
|
-
const
|
|
914
|
+
const D = v(
|
|
868
915
|
() => g.value.filter(
|
|
869
916
|
(_) => [
|
|
870
|
-
|
|
871
|
-
..._.fields.flatMap((
|
|
872
|
-
].join(" ").toLowerCase().includes(
|
|
917
|
+
x(_),
|
|
918
|
+
..._.fields.flatMap((O) => [O.before, O.after])
|
|
919
|
+
].join(" ").toLowerCase().includes(U.value.toLowerCase())
|
|
873
920
|
)
|
|
874
921
|
);
|
|
875
|
-
function
|
|
922
|
+
function z(_) {
|
|
876
923
|
return _ || n("menu.import_export.v3_diff.empty_cell");
|
|
877
924
|
}
|
|
878
|
-
return (_,
|
|
879
|
-
const
|
|
925
|
+
return (_, O) => {
|
|
926
|
+
const W = T("FmSearch");
|
|
880
927
|
return o(), F(He, {
|
|
881
928
|
show: _.show,
|
|
882
929
|
title: a(n)("menu.import_export.v3_diff.title"),
|
|
@@ -884,48 +931,48 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
884
931
|
"secondary-actions": [
|
|
885
932
|
{
|
|
886
933
|
label: a(n)("menu.import_export.preview.actions.cancel"),
|
|
887
|
-
click: () =>
|
|
934
|
+
click: () => $("cancel")
|
|
888
935
|
}
|
|
889
936
|
],
|
|
890
|
-
onOnPrimary:
|
|
891
|
-
onOnCancel:
|
|
937
|
+
onOnPrimary: O[1] || (O[1] = (k) => $("confirm")),
|
|
938
|
+
onOnCancel: O[2] || (O[2] = (k) => $("cancel"))
|
|
892
939
|
}, {
|
|
893
940
|
default: A(() => [
|
|
894
|
-
|
|
895
|
-
|
|
941
|
+
i("div", _a, [
|
|
942
|
+
y(xl, {
|
|
896
943
|
title: a(n)("menu.import_export.v3_diff.section")
|
|
897
944
|
}, {
|
|
898
945
|
"append-title": A(() => [
|
|
899
|
-
|
|
900
|
-
modelValue:
|
|
901
|
-
"onUpdate:modelValue":
|
|
946
|
+
y(W, {
|
|
947
|
+
modelValue: U.value,
|
|
948
|
+
"onUpdate:modelValue": O[0] || (O[0] = (k) => U.value = k)
|
|
902
949
|
}, null, 8, ["modelValue"])
|
|
903
950
|
]),
|
|
904
951
|
default: A(() => [
|
|
905
|
-
g.value.length > 0 ? (o(!0),
|
|
906
|
-
key: `${
|
|
907
|
-
label:
|
|
952
|
+
g.value.length > 0 ? (o(!0), f(Q, { key: 0 }, ue(D.value, (k) => (o(), F(hl, {
|
|
953
|
+
key: `${k.id}/${k.variantKey}`,
|
|
954
|
+
label: x(k)
|
|
908
955
|
}, {
|
|
909
956
|
default: A(() => [
|
|
910
|
-
|
|
911
|
-
(o(!0),
|
|
912
|
-
key:
|
|
913
|
-
class:
|
|
957
|
+
i("div", ha, [
|
|
958
|
+
(o(!0), f(Q, null, ue(k.fields, (X, se) => (o(), f("div", {
|
|
959
|
+
key: X.key,
|
|
960
|
+
class: fe(["flex items-center gap-8", { "mb-8": se < k.fields.length - 1 }])
|
|
914
961
|
}, [
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
962
|
+
i("div", xa, L(a(va)(X.key)), 1),
|
|
963
|
+
i("div", ka, [
|
|
964
|
+
i("div", wa, [
|
|
965
|
+
y(Vt, {
|
|
919
966
|
variant: "error",
|
|
920
|
-
label:
|
|
967
|
+
label: z(X.before)
|
|
921
968
|
}, null, 8, ["label"])
|
|
922
969
|
])
|
|
923
970
|
]),
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
971
|
+
i("div", Ca, [
|
|
972
|
+
i("div", Fa, [
|
|
973
|
+
y(Vt, {
|
|
927
974
|
variant: "success",
|
|
928
|
-
label:
|
|
975
|
+
label: z(X.after)
|
|
929
976
|
}, null, 8, ["label"])
|
|
930
977
|
])
|
|
931
978
|
])
|
|
@@ -933,7 +980,7 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
933
980
|
])
|
|
934
981
|
]),
|
|
935
982
|
_: 2
|
|
936
|
-
}, 1032, ["label"]))), 128)) : (o(),
|
|
983
|
+
}, 1032, ["label"]))), 128)) : (o(), f("div", $a, L(a(n)("menu.import_export.v3_diff.empty")), 1))
|
|
937
984
|
]),
|
|
938
985
|
_: 1
|
|
939
986
|
}, 8, ["title"])
|
|
@@ -943,7 +990,7 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
943
990
|
}, 8, ["show", "title", "primary-action", "secondary-actions"]);
|
|
944
991
|
};
|
|
945
992
|
}
|
|
946
|
-
}),
|
|
993
|
+
}), Ia = { class: "flex flex-col w-full h-full" }, Va = { class: "flex-1 flex overflow-hidden" }, Pa = { class: "w-[150px] overflow-y-auto my-8" }, La = { class: "fm-typo-en-body-lg-400 truncate" }, Ea = { class: "fm-typo-en-body-lg-400 truncate" }, Oa = { class: "fm-typo-en-body-lg-400 truncate" }, Ma = { class: "flex-1 flex flex-col overflow-auto p-16" }, Ua = { class: "fm-typo-en-title-sm-600 mb-16" }, Ta = { class: "fm-typo-en-title-sm-600 mb-16" }, Aa = { class: "flex gap-16 flex-wrap" }, Ra = { class: "fm-typo-en-title-sm-600 mb-16" }, Na = /* @__PURE__ */ he({
|
|
947
994
|
__name: "PreviewImportTable",
|
|
948
995
|
props: {
|
|
949
996
|
show: {
|
|
@@ -956,61 +1003,61 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
956
1003
|
}
|
|
957
1004
|
},
|
|
958
1005
|
emits: ["confirm", "cancel"],
|
|
959
|
-
setup(C, { emit:
|
|
960
|
-
const t = C,
|
|
1006
|
+
setup(C, { emit: u }) {
|
|
1007
|
+
const t = C, $ = u, { t: n, n: U } = Fe(), g = Y("products"), x = v(() => [
|
|
961
1008
|
{ value: "products", label: n("menu.import_export.preview.tabs.products") },
|
|
962
1009
|
{ value: "variants", label: n("menu.import_export.preview.tabs.variants") },
|
|
963
1010
|
{ value: "addons", label: n("menu.import_export.preview.tabs.addons") }
|
|
964
|
-
]),
|
|
1011
|
+
]), D = v(
|
|
965
1012
|
() => {
|
|
966
|
-
var
|
|
967
|
-
return ((
|
|
1013
|
+
var V;
|
|
1014
|
+
return ((V = t.tables) == null ? void 0 : V.categories) ?? [];
|
|
968
1015
|
}
|
|
969
|
-
),
|
|
1016
|
+
), z = v(
|
|
970
1017
|
() => {
|
|
971
|
-
var
|
|
972
|
-
return ((
|
|
1018
|
+
var V;
|
|
1019
|
+
return ((V = t.tables) == null ? void 0 : V.variantGroups) ?? [];
|
|
973
1020
|
}
|
|
974
|
-
), _ =
|
|
1021
|
+
), _ = v(
|
|
975
1022
|
() => {
|
|
976
|
-
var
|
|
977
|
-
return ((
|
|
1023
|
+
var V;
|
|
1024
|
+
return ((V = t.tables) == null ? void 0 : V.addonGroups) ?? [];
|
|
978
1025
|
}
|
|
979
|
-
),
|
|
980
|
-
() =>
|
|
981
|
-
(
|
|
982
|
-
) ??
|
|
983
|
-
),
|
|
984
|
-
() =>
|
|
985
|
-
(
|
|
986
|
-
) ??
|
|
987
|
-
),
|
|
1026
|
+
), O = Y(""), W = v(
|
|
1027
|
+
() => D.value.find(
|
|
1028
|
+
(V) => V.id === O.value
|
|
1029
|
+
) ?? D.value[0]
|
|
1030
|
+
), k = Y(""), X = v(
|
|
1031
|
+
() => z.value.find(
|
|
1032
|
+
(V) => V.id === k.value
|
|
1033
|
+
) ?? z.value[0]
|
|
1034
|
+
), se = Y(""), ee = v(
|
|
988
1035
|
() => _.value.find(
|
|
989
|
-
(
|
|
1036
|
+
(V) => V.id === se.value
|
|
990
1037
|
) ?? _.value[0]
|
|
991
1038
|
);
|
|
992
|
-
function
|
|
993
|
-
return
|
|
1039
|
+
function j(V) {
|
|
1040
|
+
return V === null ? n("menu.catalog.empty_value") : U(V.amount, {
|
|
994
1041
|
style: "currency",
|
|
995
|
-
currency:
|
|
1042
|
+
currency: V.currency,
|
|
996
1043
|
currencyDisplay: "narrowSymbol"
|
|
997
1044
|
}).replace(/^(\D+)\s+/, "$1");
|
|
998
1045
|
}
|
|
999
|
-
const
|
|
1046
|
+
const m = v(
|
|
1000
1047
|
() => [
|
|
1001
1048
|
{
|
|
1002
1049
|
id: "image",
|
|
1003
1050
|
header: () => n("menu.import_export.preview.columns.image"),
|
|
1004
1051
|
size: 72,
|
|
1005
1052
|
enableSorting: !1,
|
|
1006
|
-
cell: (
|
|
1007
|
-
const
|
|
1008
|
-
return
|
|
1053
|
+
cell: (V) => {
|
|
1054
|
+
const Z = V.row.original;
|
|
1055
|
+
return E(
|
|
1009
1056
|
"div",
|
|
1010
1057
|
{ class: "my-8 mx-12 flex items-center justify-center" },
|
|
1011
1058
|
[
|
|
1012
|
-
|
|
1013
|
-
|
|
1059
|
+
E(
|
|
1060
|
+
pe.FmCard,
|
|
1014
1061
|
{
|
|
1015
1062
|
variant: "outlined",
|
|
1016
1063
|
// `!` on the height only: `.h-40` and
|
|
@@ -1022,11 +1069,11 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1022
1069
|
// ProductList's 72px frame; see the note there.
|
|
1023
1070
|
class: "w-40 !h-40 flex shrink-0 items-center justify-center rounded-md overflow-hidden"
|
|
1024
1071
|
},
|
|
1025
|
-
() =>
|
|
1026
|
-
src:
|
|
1027
|
-
alt:
|
|
1072
|
+
() => Z.thumbnailUrl ? E("img", {
|
|
1073
|
+
src: Z.thumbnailUrl,
|
|
1074
|
+
alt: Z.name,
|
|
1028
1075
|
class: "w-full h-full object-cover"
|
|
1029
|
-
}) :
|
|
1076
|
+
}) : E(pe.FmIcon, {
|
|
1030
1077
|
name: "image",
|
|
1031
1078
|
outline: !0,
|
|
1032
1079
|
color: "neutral-gray-300"
|
|
@@ -1046,10 +1093,10 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1046
1093
|
header: () => n("menu.import_export.preview.columns.price"),
|
|
1047
1094
|
enableSorting: !1,
|
|
1048
1095
|
meta: { textAlign: "right" },
|
|
1049
|
-
cell: (
|
|
1096
|
+
cell: (V) => j(V.row.original.price)
|
|
1050
1097
|
}
|
|
1051
1098
|
]
|
|
1052
|
-
),
|
|
1099
|
+
), te = v(() => [
|
|
1053
1100
|
{
|
|
1054
1101
|
accessorKey: "name",
|
|
1055
1102
|
header: () => n("menu.import_export.preview.columns.name"),
|
|
@@ -1060,23 +1107,23 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1060
1107
|
header: () => n("menu.import_export.preview.columns.price"),
|
|
1061
1108
|
enableSorting: !1,
|
|
1062
1109
|
meta: { textAlign: "right" },
|
|
1063
|
-
cell: (
|
|
1110
|
+
cell: (V) => j(V.row.original.price)
|
|
1064
1111
|
},
|
|
1065
1112
|
{
|
|
1066
1113
|
id: "status",
|
|
1067
1114
|
header: () => n("menu.import_export.preview.columns.status"),
|
|
1068
1115
|
enableSorting: !1,
|
|
1069
|
-
cell: (
|
|
1070
|
-
const
|
|
1071
|
-
return
|
|
1072
|
-
variant:
|
|
1073
|
-
label: n(
|
|
1116
|
+
cell: (V) => {
|
|
1117
|
+
const Z = V.row.original.active;
|
|
1118
|
+
return E(pe.FmChip, {
|
|
1119
|
+
variant: Z ? "success" : "neutral",
|
|
1120
|
+
label: n(Z ? "menu.import_export.preview.status.active" : "menu.import_export.preview.status.inactive")
|
|
1074
1121
|
});
|
|
1075
1122
|
}
|
|
1076
1123
|
}
|
|
1077
1124
|
]);
|
|
1078
|
-
return (
|
|
1079
|
-
const c =
|
|
1125
|
+
return (V, Z) => {
|
|
1126
|
+
const c = T("FmTabs"), p = T("FmListItem"), S = T("FmList"), I = T("FmTable"), B = T("FmChip");
|
|
1080
1127
|
return o(), F(He, {
|
|
1081
1128
|
show: C.show,
|
|
1082
1129
|
title: a(n)("menu.import_export.preview.title"),
|
|
@@ -1084,66 +1131,66 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1084
1131
|
"secondary-actions": [
|
|
1085
1132
|
{
|
|
1086
1133
|
label: a(n)("menu.import_export.preview.actions.cancel"),
|
|
1087
|
-
click: () =>
|
|
1134
|
+
click: () => $("cancel")
|
|
1088
1135
|
}
|
|
1089
1136
|
],
|
|
1090
|
-
onOnPrimary:
|
|
1091
|
-
onOnCancel:
|
|
1137
|
+
onOnPrimary: Z[1] || (Z[1] = (r) => $("confirm")),
|
|
1138
|
+
onOnCancel: Z[2] || (Z[2] = (r) => $("cancel"))
|
|
1092
1139
|
}, {
|
|
1093
1140
|
default: A(() => {
|
|
1094
|
-
var
|
|
1141
|
+
var r, b, R, oe, K, J;
|
|
1095
1142
|
return [
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1143
|
+
i("div", Ia, [
|
|
1144
|
+
i("div", null, [
|
|
1145
|
+
y(c, {
|
|
1099
1146
|
"model-value": g.value,
|
|
1100
|
-
items:
|
|
1101
|
-
"onUpdate:modelValue":
|
|
1147
|
+
items: x.value,
|
|
1148
|
+
"onUpdate:modelValue": Z[0] || (Z[0] = (w) => g.value = w)
|
|
1102
1149
|
}, null, 8, ["model-value", "items"])
|
|
1103
1150
|
]),
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1151
|
+
i("div", Va, [
|
|
1152
|
+
i("div", Pa, [
|
|
1153
|
+
y(S, { separator: "" }, {
|
|
1107
1154
|
default: A(() => [
|
|
1108
|
-
g.value === "products" ? (o(!0),
|
|
1109
|
-
var
|
|
1155
|
+
g.value === "products" ? (o(!0), f(Q, { key: 0 }, ue(D.value, (w) => {
|
|
1156
|
+
var N;
|
|
1110
1157
|
return o(), F(p, {
|
|
1111
|
-
key:
|
|
1112
|
-
class:
|
|
1113
|
-
"text-fm-color-primary": ((
|
|
1158
|
+
key: w.id,
|
|
1159
|
+
class: fe(["!py-12 !px-16", {
|
|
1160
|
+
"text-fm-color-primary": ((N = W.value) == null ? void 0 : N.id) === w.id
|
|
1114
1161
|
}]),
|
|
1115
|
-
onClick: (
|
|
1162
|
+
onClick: (le) => O.value = w.id
|
|
1116
1163
|
}, {
|
|
1117
1164
|
default: A(() => [
|
|
1118
|
-
|
|
1165
|
+
i("span", La, L(w.name), 1)
|
|
1119
1166
|
]),
|
|
1120
1167
|
_: 2
|
|
1121
1168
|
}, 1032, ["class", "onClick"]);
|
|
1122
|
-
}), 128)) : g.value === "variants" ? (o(!0),
|
|
1123
|
-
var
|
|
1169
|
+
}), 128)) : g.value === "variants" ? (o(!0), f(Q, { key: 1 }, ue(z.value, (w) => {
|
|
1170
|
+
var N;
|
|
1124
1171
|
return o(), F(p, {
|
|
1125
|
-
key:
|
|
1126
|
-
class:
|
|
1127
|
-
"text-fm-color-primary": ((
|
|
1172
|
+
key: w.id,
|
|
1173
|
+
class: fe(["!py-12 !px-16", {
|
|
1174
|
+
"text-fm-color-primary": ((N = X.value) == null ? void 0 : N.id) === w.id
|
|
1128
1175
|
}]),
|
|
1129
|
-
onClick: (
|
|
1176
|
+
onClick: (le) => k.value = w.id
|
|
1130
1177
|
}, {
|
|
1131
1178
|
default: A(() => [
|
|
1132
|
-
|
|
1179
|
+
i("span", Ea, L(w.name), 1)
|
|
1133
1180
|
]),
|
|
1134
1181
|
_: 2
|
|
1135
1182
|
}, 1032, ["class", "onClick"]);
|
|
1136
|
-
}), 128)) : (o(!0),
|
|
1137
|
-
var
|
|
1183
|
+
}), 128)) : (o(!0), f(Q, { key: 2 }, ue(_.value, (w) => {
|
|
1184
|
+
var N;
|
|
1138
1185
|
return o(), F(p, {
|
|
1139
|
-
key:
|
|
1140
|
-
class:
|
|
1141
|
-
"text-fm-color-primary": ((
|
|
1186
|
+
key: w.id,
|
|
1187
|
+
class: fe(["!py-12 !px-16", {
|
|
1188
|
+
"text-fm-color-primary": ((N = ee.value) == null ? void 0 : N.id) === w.id
|
|
1142
1189
|
}]),
|
|
1143
|
-
onClick: (
|
|
1190
|
+
onClick: (le) => se.value = w.id
|
|
1144
1191
|
}, {
|
|
1145
1192
|
default: A(() => [
|
|
1146
|
-
|
|
1193
|
+
i("span", Oa, L(w.name), 1)
|
|
1147
1194
|
]),
|
|
1148
1195
|
_: 2
|
|
1149
1196
|
}, 1032, ["class", "onClick"]);
|
|
@@ -1152,27 +1199,27 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1152
1199
|
_: 1
|
|
1153
1200
|
})
|
|
1154
1201
|
]),
|
|
1155
|
-
|
|
1156
|
-
g.value === "products" ? (o(),
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
"column-defs":
|
|
1160
|
-
"row-data": ((
|
|
1202
|
+
i("div", Ma, [
|
|
1203
|
+
g.value === "products" ? (o(), f(Q, { key: 0 }, [
|
|
1204
|
+
i("p", Ua, L(((r = W.value) == null ? void 0 : r.name) ?? a(n)("menu.catalog.empty_value")), 1),
|
|
1205
|
+
y(I, {
|
|
1206
|
+
"column-defs": m.value,
|
|
1207
|
+
"row-data": ((b = W.value) == null ? void 0 : b.products) ?? [],
|
|
1161
1208
|
"shrink-at": !1
|
|
1162
1209
|
}, null, 8, ["column-defs", "row-data"])
|
|
1163
|
-
], 64)) : g.value === "variants" ? (o(),
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
(o(!0),
|
|
1167
|
-
key:
|
|
1168
|
-
label:
|
|
1210
|
+
], 64)) : g.value === "variants" ? (o(), f(Q, { key: 1 }, [
|
|
1211
|
+
i("p", Ta, L(((R = X.value) == null ? void 0 : R.name) ?? a(n)("menu.catalog.empty_value")), 1),
|
|
1212
|
+
i("div", Aa, [
|
|
1213
|
+
(o(!0), f(Q, null, ue(((oe = X.value) == null ? void 0 : oe.options) ?? [], (w) => (o(), F(B, {
|
|
1214
|
+
key: w.name,
|
|
1215
|
+
label: w.name
|
|
1169
1216
|
}, null, 8, ["label"]))), 128))
|
|
1170
1217
|
])
|
|
1171
|
-
], 64)) : (o(),
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
"column-defs":
|
|
1175
|
-
"row-data": ((
|
|
1218
|
+
], 64)) : (o(), f(Q, { key: 2 }, [
|
|
1219
|
+
i("p", Ra, L(((K = ee.value) == null ? void 0 : K.name) ?? a(n)("menu.catalog.empty_value")), 1),
|
|
1220
|
+
y(I, {
|
|
1221
|
+
"column-defs": te.value,
|
|
1222
|
+
"row-data": ((J = ee.value) == null ? void 0 : J.addons) ?? [],
|
|
1176
1223
|
"shrink-at": !1
|
|
1177
1224
|
}, null, 8, ["column-defs", "row-data"])
|
|
1178
1225
|
], 64))
|
|
@@ -1185,84 +1232,84 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1185
1232
|
}, 8, ["show", "title", "primary-action", "secondary-actions"]);
|
|
1186
1233
|
};
|
|
1187
1234
|
}
|
|
1188
|
-
}),
|
|
1235
|
+
}), ja = { class: "flex w-full items-center justify-between" }, Da = ["aria-label"], za = { class: "flex items-center gap-8 rounded-lg bg-fm-color-system-info-100 p-16 pl-24" }, Ba = { class: "fm-typo-en-body-lg-400" }, Ka = {
|
|
1189
1236
|
key: 0,
|
|
1190
1237
|
class: "upload-area w-full cursor-pointer rounded-md outline-2 outline-dashed outline-fm-color-neutral-gray-300 hover:outline-fm-color-neutral-black"
|
|
1191
|
-
},
|
|
1238
|
+
}, Ga = { class: "flex h-full w-full flex-col items-center justify-center p-16" }, qa = { class: "fm-typo-en-body-md-400 mt-4 text-fm-color-neutral-gray-300" }, Ha = ["aria-label"], Wa = { class: "mb-8 rounded-md outline-dashed outline-2 outline-fm-color-neutral-gray-300" }, Xa = { class: "p-16" }, Ya = { class: "flex w-[36px] shrink-0 items-center justify-center" }, Ja = { class: "fm-typo-en-body-lg-400 flex-1" }, Qa = {
|
|
1192
1239
|
key: 2,
|
|
1193
1240
|
class: "text-fm-color-typo-error",
|
|
1194
1241
|
role: "alert"
|
|
1195
|
-
},
|
|
1242
|
+
}, Za = {
|
|
1196
1243
|
key: 3,
|
|
1197
1244
|
class: "rounded-md bg-fm-color-neutral-gray-100 p-16",
|
|
1198
1245
|
"aria-live": "polite"
|
|
1199
|
-
},
|
|
1246
|
+
}, eo = { class: "fm-typo-en-body-md-600" }, to = { class: "fm-typo-en-body-md-400" }, lo = {
|
|
1200
1247
|
key: 0,
|
|
1201
1248
|
class: "mt-8 flex flex-col gap-4"
|
|
1202
|
-
},
|
|
1249
|
+
}, ao = { class: "flex w-full justify-end space-x-8" }, oo = /* @__PURE__ */ he({
|
|
1203
1250
|
__name: "ImportExport",
|
|
1204
1251
|
props: {
|
|
1205
1252
|
sdk: {}
|
|
1206
1253
|
},
|
|
1207
|
-
setup(C, { expose:
|
|
1208
|
-
const { t } =
|
|
1209
|
-
() =>
|
|
1210
|
-
),
|
|
1254
|
+
setup(C, { expose: u }) {
|
|
1255
|
+
const { t } = Fe(), { run: $ } = Tt(), n = Ut(), U = Ne(C.sdk.menuImportExport.view), g = Y(!1), x = Y(null), D = Y(null), z = Y("replace"), _ = v(
|
|
1256
|
+
() => U.value.status === "ready" ? U.value.value : null
|
|
1257
|
+
), O = v(
|
|
1211
1258
|
() => {
|
|
1212
|
-
var I,
|
|
1213
|
-
return !!((
|
|
1259
|
+
var S, I, B, r;
|
|
1260
|
+
return !!((I = (S = _.value) == null ? void 0 : S.preview) != null && I.ok) && !!((B = _.value) != null && B.preview.tables) && ((r = _.value) == null ? void 0 : r.previewSurface) === "vendor";
|
|
1214
1261
|
}
|
|
1215
|
-
),
|
|
1262
|
+
), W = v(
|
|
1216
1263
|
() => {
|
|
1217
|
-
var I,
|
|
1218
|
-
return !!((
|
|
1264
|
+
var S, I, B, r;
|
|
1265
|
+
return !!((I = (S = _.value) == null ? void 0 : S.preview) != null && I.ok) && !!((B = _.value) != null && B.preview.diff) && ((r = _.value) == null ? void 0 : r.previewSurface) === "diff";
|
|
1219
1266
|
}
|
|
1220
|
-
),
|
|
1267
|
+
), k = v(
|
|
1221
1268
|
() => {
|
|
1222
|
-
var I,
|
|
1223
|
-
return !!((
|
|
1269
|
+
var S, I, B, r;
|
|
1270
|
+
return !!((I = (S = _.value) == null ? void 0 : S.preview) != null && I.ok) && !!((B = _.value) != null && B.preview.v3Diff) && ((r = _.value) == null ? void 0 : r.previewSurface) === "v3Diff";
|
|
1224
1271
|
}
|
|
1225
1272
|
);
|
|
1226
|
-
function
|
|
1227
|
-
return typeof File < "u" &&
|
|
1273
|
+
function X(S) {
|
|
1274
|
+
return typeof File < "u" && S instanceof File;
|
|
1228
1275
|
}
|
|
1229
|
-
function
|
|
1230
|
-
return Array.isArray(
|
|
1276
|
+
function se(S) {
|
|
1277
|
+
return Array.isArray(S) ? S.filter(X) : typeof FileList < "u" && S instanceof FileList ? [...S] : X(S) ? [S] : [];
|
|
1231
1278
|
}
|
|
1232
|
-
function
|
|
1233
|
-
|
|
1279
|
+
function ee() {
|
|
1280
|
+
x.value = null, C.sdk.menuImportExport.openImport(), g.value = !0;
|
|
1234
1281
|
}
|
|
1235
|
-
|
|
1236
|
-
function
|
|
1237
|
-
C.sdk.menuImportExport.cancelImport(),
|
|
1282
|
+
u({ openImport: ee });
|
|
1283
|
+
function j() {
|
|
1284
|
+
C.sdk.menuImportExport.cancelImport(), x.value = null, g.value = !1;
|
|
1238
1285
|
}
|
|
1239
|
-
async function
|
|
1240
|
-
const
|
|
1241
|
-
|
|
1242
|
-
name:
|
|
1243
|
-
data: await
|
|
1286
|
+
async function m(S, I = !1) {
|
|
1287
|
+
const B = se(S), r = await Promise.all(
|
|
1288
|
+
B.map(async (R) => ({
|
|
1289
|
+
name: R.name,
|
|
1290
|
+
data: await R.arrayBuffer()
|
|
1244
1291
|
}))
|
|
1245
|
-
),
|
|
1246
|
-
if (
|
|
1247
|
-
|
|
1292
|
+
), b = I ? C.sdk.menuImportExport.addFiles(r) : C.sdk.menuImportExport.selectFiles(r);
|
|
1293
|
+
if (b.kind === "rejected") {
|
|
1294
|
+
x.value = n(b.issues[0]);
|
|
1248
1295
|
return;
|
|
1249
1296
|
}
|
|
1250
|
-
|
|
1297
|
+
x.value = null;
|
|
1251
1298
|
}
|
|
1252
|
-
function
|
|
1253
|
-
var
|
|
1254
|
-
|
|
1299
|
+
function te(S) {
|
|
1300
|
+
var I;
|
|
1301
|
+
z.value = S, (I = D.value) == null || I.click();
|
|
1255
1302
|
}
|
|
1256
|
-
function S
|
|
1257
|
-
var
|
|
1258
|
-
const
|
|
1259
|
-
!(
|
|
1303
|
+
function V(S) {
|
|
1304
|
+
var B;
|
|
1305
|
+
const I = S.target;
|
|
1306
|
+
!(I instanceof HTMLInputElement) || !((B = I.files) != null && B.length) || (m(I.files, z.value === "append"), I.value = "");
|
|
1260
1307
|
}
|
|
1261
|
-
function
|
|
1262
|
-
C.sdk.menuImportExport.removeFile(
|
|
1308
|
+
function Z(S) {
|
|
1309
|
+
C.sdk.menuImportExport.removeFile(S);
|
|
1263
1310
|
}
|
|
1264
1311
|
async function c() {
|
|
1265
|
-
await
|
|
1312
|
+
await $(() => C.sdk.menuImportExport.previewImport(), {
|
|
1266
1313
|
successMessage: t("menu.import_export.actions.preview_ready"),
|
|
1267
1314
|
showLoading: !1,
|
|
1268
1315
|
// Every client-side preview rejection here is a raw parser exception
|
|
@@ -1273,168 +1320,169 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1273
1320
|
});
|
|
1274
1321
|
}
|
|
1275
1322
|
async function p() {
|
|
1276
|
-
var
|
|
1277
|
-
if (!((
|
|
1323
|
+
var I;
|
|
1324
|
+
if (!((I = _.value) != null && I.preview) && (await $(
|
|
1278
1325
|
() => C.sdk.menuImportExport.previewImport(),
|
|
1279
1326
|
{ showLoading: !1, rejectedPresentation: "title" }
|
|
1280
1327
|
)).kind !== "success")
|
|
1281
1328
|
return;
|
|
1282
|
-
(await
|
|
1329
|
+
(await $(
|
|
1283
1330
|
() => C.sdk.menuImportExport.confirmImport(),
|
|
1284
1331
|
{ successMessage: t("menu.import_export.feedback.success") }
|
|
1285
|
-
)).kind === "success" &&
|
|
1332
|
+
)).kind === "success" && j();
|
|
1286
1333
|
}
|
|
1287
|
-
return (
|
|
1288
|
-
var
|
|
1289
|
-
const
|
|
1290
|
-
return o(),
|
|
1291
|
-
|
|
1292
|
-
show:
|
|
1293
|
-
tables: ((
|
|
1334
|
+
return (S, I) => {
|
|
1335
|
+
var oe, K, J, w, N, le;
|
|
1336
|
+
const B = T("FmIcon"), r = T("FmSelect"), b = T("FmButton"), R = T("FmDialog");
|
|
1337
|
+
return o(), f(Q, null, [
|
|
1338
|
+
y(Na, {
|
|
1339
|
+
show: O.value,
|
|
1340
|
+
tables: ((K = (oe = _.value) == null ? void 0 : oe.preview) == null ? void 0 : K.tables) ?? null,
|
|
1294
1341
|
onConfirm: p,
|
|
1295
|
-
onCancel:
|
|
1342
|
+
onCancel: j
|
|
1296
1343
|
}, null, 8, ["show", "tables"]),
|
|
1297
|
-
|
|
1298
|
-
show:
|
|
1299
|
-
diff: ((
|
|
1344
|
+
y(ia, {
|
|
1345
|
+
show: W.value,
|
|
1346
|
+
diff: ((w = (J = _.value) == null ? void 0 : J.preview) == null ? void 0 : w.diff) ?? null,
|
|
1300
1347
|
onConfirm: p,
|
|
1301
|
-
onCancel:
|
|
1348
|
+
onCancel: j
|
|
1302
1349
|
}, null, 8, ["show", "diff"]),
|
|
1303
|
-
|
|
1304
|
-
show:
|
|
1305
|
-
diff: ((
|
|
1350
|
+
y(Sa, {
|
|
1351
|
+
show: k.value,
|
|
1352
|
+
diff: ((le = (N = _.value) == null ? void 0 : N.preview) == null ? void 0 : le.v3Diff) ?? null,
|
|
1306
1353
|
onConfirm: p,
|
|
1307
|
-
onCancel:
|
|
1354
|
+
onCancel: j
|
|
1308
1355
|
}, null, 8, ["show", "diff"]),
|
|
1309
|
-
|
|
1310
|
-
"model-value": g.value && !
|
|
1356
|
+
y(R, {
|
|
1357
|
+
"model-value": g.value && !O.value && !W.value && !k.value,
|
|
1311
1358
|
overlay: !0,
|
|
1312
|
-
"max-width": 560,
|
|
1313
1359
|
"close-button": !1,
|
|
1314
|
-
"onUpdate:modelValue":
|
|
1360
|
+
"onUpdate:modelValue": I[3] || (I[3] = (G) => G ? g.value = !0 : j())
|
|
1315
1361
|
}, {
|
|
1316
1362
|
"dialog-header": A(() => [
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1363
|
+
i("div", ja, [
|
|
1364
|
+
i("span", null, L(a(t)("menu.import_export.dialog.title")), 1),
|
|
1365
|
+
y(B, {
|
|
1320
1366
|
"aria-label": a(t)("menu.import_export.actions.cancel"),
|
|
1321
1367
|
class: "relative -mr-24 cursor-pointer",
|
|
1322
1368
|
name: "close",
|
|
1323
1369
|
role: "button",
|
|
1324
1370
|
tabindex: "0",
|
|
1325
|
-
onClick:
|
|
1371
|
+
onClick: j,
|
|
1326
1372
|
onKeydown: [
|
|
1327
|
-
|
|
1328
|
-
|
|
1373
|
+
Ct(j, ["enter"]),
|
|
1374
|
+
Ct($e(j, ["prevent"]), ["space"])
|
|
1329
1375
|
]
|
|
1330
1376
|
}, null, 8, ["aria-label", "onKeydown"])
|
|
1331
1377
|
])
|
|
1332
1378
|
]),
|
|
1333
1379
|
"dialog-footer": A(() => [
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1380
|
+
i("div", ao, [
|
|
1381
|
+
y(b, {
|
|
1382
|
+
label: a(t)("menu.import_export.actions.cancel"),
|
|
1383
|
+
variant: "tertiary",
|
|
1384
|
+
onClick: j
|
|
1385
|
+
}, null, 8, ["label"]),
|
|
1386
|
+
y(b, {
|
|
1387
|
+
class: "ml-auto mr-8",
|
|
1388
|
+
label: a(t)("menu.import_export.actions.import"),
|
|
1389
|
+
variant: "primary",
|
|
1390
|
+
onClick: c
|
|
1391
|
+
}, null, 8, ["label"])
|
|
1392
|
+
])
|
|
1345
1393
|
]),
|
|
1346
1394
|
default: A(() => [
|
|
1347
|
-
_.value ? (o(),
|
|
1395
|
+
_.value ? (o(), f("div", {
|
|
1348
1396
|
key: 0,
|
|
1349
1397
|
role: "dialog",
|
|
1350
1398
|
"aria-label": a(t)("menu.import_export.dialog.title"),
|
|
1351
1399
|
class: "flex flex-col gap-24"
|
|
1352
1400
|
}, [
|
|
1353
|
-
|
|
1354
|
-
|
|
1401
|
+
i("div", za, [
|
|
1402
|
+
y(B, {
|
|
1355
1403
|
color: "system-info-300",
|
|
1356
1404
|
name: "info"
|
|
1357
1405
|
}),
|
|
1358
|
-
|
|
1406
|
+
i("p", Ba, L(a(t)("menu.import.dialog.info")), 1)
|
|
1359
1407
|
]),
|
|
1360
|
-
|
|
1361
|
-
items: _.value.importerOptions.map((
|
|
1362
|
-
value:
|
|
1363
|
-
label: a(t)(
|
|
1408
|
+
y(r, {
|
|
1409
|
+
items: _.value.importerOptions.map((G) => ({
|
|
1410
|
+
value: G.value,
|
|
1411
|
+
label: a(t)(G.labelKey)
|
|
1364
1412
|
})),
|
|
1365
1413
|
label: a(t)("menu.import.dialog.fields.type"),
|
|
1366
1414
|
"model-value": _.value.importer,
|
|
1367
|
-
"onUpdate:modelValue":
|
|
1415
|
+
"onUpdate:modelValue": I[0] || (I[0] = (G) => S.sdk.menuImportExport.selectImporter(String(G)))
|
|
1368
1416
|
}, null, 8, ["items", "label", "model-value"]),
|
|
1369
|
-
_.value.files.length === 0 ? (o(),
|
|
1370
|
-
|
|
1371
|
-
|
|
1417
|
+
_.value.files.length === 0 ? (o(), f("div", Ka, [
|
|
1418
|
+
i("div", Ga, [
|
|
1419
|
+
i("input", {
|
|
1372
1420
|
ref_key: "fileInput",
|
|
1373
|
-
ref:
|
|
1421
|
+
ref: D,
|
|
1374
1422
|
class: "hidden",
|
|
1375
1423
|
type: "file",
|
|
1376
1424
|
accept: ".xlsx,.xls,.json",
|
|
1377
1425
|
multiple: "",
|
|
1378
|
-
onChange:
|
|
1426
|
+
onChange: V
|
|
1379
1427
|
}, null, 544),
|
|
1380
|
-
|
|
1428
|
+
y(b, {
|
|
1381
1429
|
label: a(t)("menu.import.dialog.button.label"),
|
|
1382
1430
|
variant: "secondary",
|
|
1383
|
-
onClick:
|
|
1431
|
+
onClick: I[1] || (I[1] = (G) => te("replace"))
|
|
1384
1432
|
}, null, 8, ["label"]),
|
|
1385
|
-
|
|
1433
|
+
i("p", qa, L(a(t)("menu.import.dialog.subtitle")), 1)
|
|
1386
1434
|
])
|
|
1387
|
-
])) : (o(),
|
|
1435
|
+
])) : (o(), f("div", {
|
|
1388
1436
|
key: 1,
|
|
1389
1437
|
class: "flex flex-col",
|
|
1390
1438
|
"aria-label": a(t)("menu.import_export.labels.selected_files")
|
|
1391
1439
|
}, [
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
(o(!0),
|
|
1395
|
-
key: `${
|
|
1440
|
+
i("div", Wa, [
|
|
1441
|
+
i("div", Xa, [
|
|
1442
|
+
(o(!0), f(Q, null, ue(_.value.files, (G, q) => (o(), f("div", {
|
|
1443
|
+
key: `${G}-${q}`,
|
|
1396
1444
|
class: "flex items-center"
|
|
1397
1445
|
}, [
|
|
1398
|
-
|
|
1399
|
-
|
|
1446
|
+
i("span", Ya, [
|
|
1447
|
+
y(B, { name: "attach_file" })
|
|
1400
1448
|
]),
|
|
1401
|
-
|
|
1402
|
-
|
|
1449
|
+
i("p", Ja, L(G), 1),
|
|
1450
|
+
y(b, {
|
|
1403
1451
|
"aria-label": a(t)("menu.common.actions.remove"),
|
|
1404
1452
|
"icon-color": "primary",
|
|
1405
1453
|
"prepend-icon": "close",
|
|
1406
1454
|
variant: "plain",
|
|
1407
|
-
onClick: (
|
|
1455
|
+
onClick: (H) => Z(q)
|
|
1408
1456
|
}, null, 8, ["aria-label", "onClick"])
|
|
1409
1457
|
]))), 128))
|
|
1410
1458
|
]),
|
|
1411
|
-
|
|
1459
|
+
i("input", {
|
|
1412
1460
|
ref_key: "fileInput",
|
|
1413
|
-
ref:
|
|
1461
|
+
ref: D,
|
|
1414
1462
|
class: "hidden",
|
|
1415
1463
|
type: "file",
|
|
1416
1464
|
accept: ".xlsx,.xls,.json",
|
|
1417
1465
|
multiple: "",
|
|
1418
|
-
onChange:
|
|
1466
|
+
onChange: V
|
|
1419
1467
|
}, null, 544),
|
|
1420
|
-
|
|
1468
|
+
y(b, {
|
|
1421
1469
|
label: a(t)("menu.import_export.actions.add_new_files"),
|
|
1422
1470
|
"prepend-icon": "add",
|
|
1423
1471
|
variant: "plain",
|
|
1424
|
-
onClick:
|
|
1472
|
+
onClick: I[2] || (I[2] = (G) => te("append"))
|
|
1425
1473
|
}, null, 8, ["label"])
|
|
1426
1474
|
])
|
|
1427
|
-
], 8,
|
|
1428
|
-
|
|
1429
|
-
_.value.preview ? (o(),
|
|
1430
|
-
|
|
1431
|
-
|
|
1475
|
+
], 8, Ha)),
|
|
1476
|
+
x.value ? (o(), f("p", Qa, L(x.value), 1)) : M("", !0),
|
|
1477
|
+
_.value.preview ? (o(), f("section", Za, [
|
|
1478
|
+
i("p", eo, L(_.value.preview.ok ? a(t)("menu.import_export.labels.ready") : a(t)("menu.import_export.labels.has_errors")), 1),
|
|
1479
|
+
i("p", to, L(a(t)("menu.import_export.labels.change_count", {
|
|
1432
1480
|
count: _.value.preview.changes.length
|
|
1433
1481
|
})), 1),
|
|
1434
|
-
_.value.preview.issues.length ? (o(),
|
|
1435
|
-
(o(!0),
|
|
1436
|
-
key: `${
|
|
1437
|
-
},
|
|
1482
|
+
_.value.preview.issues.length ? (o(), f("ul", lo, [
|
|
1483
|
+
(o(!0), f(Q, null, ue(_.value.preview.issues, (G, q) => (o(), f("li", {
|
|
1484
|
+
key: `${G.code}-${q}`
|
|
1485
|
+
}, L(a(n)(G)), 1))), 128))
|
|
1438
1486
|
])) : M("", !0)
|
|
1439
1487
|
])) : M("", !0)
|
|
1440
1488
|
], 8, Da)) : M("", !0)
|
|
@@ -1444,107 +1492,105 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1444
1492
|
], 64);
|
|
1445
1493
|
};
|
|
1446
1494
|
}
|
|
1447
|
-
}),
|
|
1495
|
+
}), no = { class: "flex-1 flex justify-between gap-8 pl-8" }, so = {
|
|
1448
1496
|
key: 0,
|
|
1449
1497
|
class: "flex items-center"
|
|
1450
|
-
},
|
|
1498
|
+
}, ro = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, io = { class: "fm-typo-en-body-md-600 font-semibold" }, uo = { class: "flex items-center gap-8 ml-auto" }, co = ["onClick"], mo = { class: "flex items-center cursor-pointer" }, po = {
|
|
1451
1499
|
key: 0,
|
|
1452
1500
|
role: "alert",
|
|
1453
1501
|
class: "text-fm-color-typo-secondary"
|
|
1454
|
-
},
|
|
1502
|
+
}, vo = {
|
|
1455
1503
|
key: 1,
|
|
1456
1504
|
class: "text-fm-color-typo-secondary"
|
|
1457
|
-
},
|
|
1505
|
+
}, fo = {
|
|
1458
1506
|
key: 2,
|
|
1459
1507
|
class: "flex flex-1 items-center justify-center"
|
|
1460
|
-
},
|
|
1461
|
-
key: 3,
|
|
1462
|
-
class: "relative flex flex-col flex-1 min-h-0 space-y-8 overflow-hidden pt-16"
|
|
1463
|
-
}, mo = { class: "flex justify-between items-center gap-8" }, po = { class: "flex items-center gap-8" }, vo = ["aria-label"], fo = {
|
|
1508
|
+
}, bo = { class: "flex justify-between items-center gap-8 xs:flex-col xs:items-stretch" }, yo = ["aria-label"], go = {
|
|
1464
1509
|
key: 0,
|
|
1465
|
-
class: "w-[
|
|
1466
|
-
},
|
|
1510
|
+
class: "xs:order-2 w-full h-[1px] bg-fm-color-neutral-gray-100"
|
|
1511
|
+
}, _o = {
|
|
1512
|
+
key: 1,
|
|
1513
|
+
class: "w-[320px] xs:order-1 xs:w-full xs:px-8"
|
|
1514
|
+
}, ho = { class: "flex space-x-8" }, xo = {
|
|
1467
1515
|
key: 2,
|
|
1468
1516
|
class: "flex items-center p-4"
|
|
1469
|
-
},
|
|
1517
|
+
}, ko = { class: "mr-8 fm-typo-en-body-md-400" }, wo = {
|
|
1470
1518
|
key: 4,
|
|
1471
1519
|
class: "flex flex-col flex-1 overflow-auto divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
1472
|
-
},
|
|
1520
|
+
}, Co = ["onClick"], Fo = { class: "min-w-0 flex flex-1 items-center justify-start gap-16" }, $o = { class: "flex-1 min-w-0" }, So = { class: "flex justify-between items-center gap-8 pb-4" }, Io = { class: "flex-1 min-w-0 fm-typo-en-body-lg-600 line-clamp-2" }, Vo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Po = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Lo = {
|
|
1473
1521
|
key: 5,
|
|
1474
1522
|
class: "absolute inset-0 flex items-center justify-center bg-white/50"
|
|
1475
|
-
},
|
|
1523
|
+
}, Eo = { class: "w-full overflow-x-auto py-24" }, Oo = "fixed right-16 bottom-[72px] z-10", Mt = 37, on = /* @__PURE__ */ he({
|
|
1476
1524
|
__name: "ProductList",
|
|
1477
1525
|
props: {
|
|
1478
1526
|
sdk: {},
|
|
1479
1527
|
catalogPage: { type: Boolean }
|
|
1480
1528
|
},
|
|
1481
1529
|
setup(C) {
|
|
1482
|
-
const
|
|
1483
|
-
const e = [], l =
|
|
1530
|
+
const u = C, { t, n: $ } = Fe(), n = wl(), U = Ne(u.sdk.productBatchImage.entry), g = v(() => {
|
|
1531
|
+
const e = [], l = U.value;
|
|
1484
1532
|
return l.status === "ready" && l.value.state === "allowed" && e.push({
|
|
1485
1533
|
id: "product-internal-tools",
|
|
1486
1534
|
label: t("menu.productInternalTools.title"),
|
|
1487
|
-
run: () => void n.push({ name:
|
|
1535
|
+
run: () => void n.push({ name: nl.PRODUCT_INTERNAL_TOOLS })
|
|
1488
1536
|
}), e;
|
|
1489
|
-
}),
|
|
1537
|
+
}), x = Ut(), D = (e) => e.labelMessage ? x(e.labelMessage) : e.label, z = dl(), _ = pl(), O = v(() => _.breakpoints.value.xs), W = v(() => _.breakpoints.value.sm), k = Y(!1), X = Y(
|
|
1490
1538
|
null
|
|
1491
1539
|
);
|
|
1492
|
-
async function
|
|
1540
|
+
async function se() {
|
|
1493
1541
|
var e;
|
|
1494
|
-
|
|
1542
|
+
k.value = !k.value, k.value && (await al(), (e = X.value) == null || e.toggleProperty(!0));
|
|
1495
1543
|
}
|
|
1496
|
-
const { run:
|
|
1497
|
-
() =>
|
|
1498
|
-
),
|
|
1499
|
-
() =>
|
|
1500
|
-
),
|
|
1501
|
-
const e =
|
|
1544
|
+
const { run: ee } = Tt(), j = Ne(u.sdk.item.list), m = v(
|
|
1545
|
+
() => j.value.status === "ready" ? j.value.value : null
|
|
1546
|
+
), te = Ne(u.sdk.item.linkCatalogue), V = v(
|
|
1547
|
+
() => te.value.status === "ready" ? te.value.value : null
|
|
1548
|
+
), Z = Ne(u.sdk.menuImportExport.view), c = v(() => {
|
|
1549
|
+
const e = Z.value;
|
|
1502
1550
|
return e.status === "ready" && e.value.canImport;
|
|
1503
|
-
}),
|
|
1504
|
-
function
|
|
1551
|
+
}), p = Y(null);
|
|
1552
|
+
function S() {
|
|
1505
1553
|
var e;
|
|
1506
|
-
(e =
|
|
1554
|
+
(e = p.value) == null || e.openImport();
|
|
1507
1555
|
}
|
|
1508
|
-
const I =
|
|
1509
|
-
() =>
|
|
1510
|
-
),
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
ge(D, (e) => {
|
|
1514
|
-
e || (N.value = !1);
|
|
1556
|
+
const I = v(() => O.value), B = v(
|
|
1557
|
+
() => I.value ? be.Fab : be.Primary
|
|
1558
|
+
), r = Y(!1);
|
|
1559
|
+
_e(O, (e) => {
|
|
1560
|
+
e || (r.value = !1);
|
|
1515
1561
|
});
|
|
1516
|
-
const
|
|
1562
|
+
const b = ol(), R = v(() => {
|
|
1517
1563
|
var l;
|
|
1518
|
-
const e = ((l =
|
|
1519
|
-
return
|
|
1564
|
+
const e = ((l = b.sessionUser.value) == null ? void 0 : l.permissions) ?? [];
|
|
1565
|
+
return St(
|
|
1520
1566
|
[
|
|
1521
1567
|
{
|
|
1522
|
-
action:
|
|
1523
|
-
subject:
|
|
1568
|
+
action: Ke.Action.manage,
|
|
1569
|
+
subject: Ke.Subject.Business.menu_importExport
|
|
1524
1570
|
}
|
|
1525
1571
|
],
|
|
1526
1572
|
e
|
|
1527
1573
|
).granted;
|
|
1528
|
-
}),
|
|
1574
|
+
}), oe = v(() => {
|
|
1529
1575
|
var l;
|
|
1530
|
-
const e = ((l =
|
|
1531
|
-
return
|
|
1576
|
+
const e = ((l = b.sessionUser.value) == null ? void 0 : l.permissions) ?? [];
|
|
1577
|
+
return St(
|
|
1532
1578
|
[
|
|
1533
1579
|
{
|
|
1534
|
-
action:
|
|
1535
|
-
subject:
|
|
1580
|
+
action: Ke.Action.manage,
|
|
1581
|
+
subject: Ke.Subject.Business.menu_menuManagement
|
|
1536
1582
|
}
|
|
1537
1583
|
],
|
|
1538
1584
|
e
|
|
1539
1585
|
).granted;
|
|
1540
1586
|
});
|
|
1541
|
-
async function
|
|
1542
|
-
await
|
|
1587
|
+
async function K() {
|
|
1588
|
+
await ee(
|
|
1543
1589
|
async () => {
|
|
1544
|
-
const e = await
|
|
1590
|
+
const e = await u.sdk.menuImportExport.exportMenu();
|
|
1545
1591
|
if (e.kind !== "success") return e;
|
|
1546
1592
|
try {
|
|
1547
|
-
await
|
|
1593
|
+
await yl(e.value);
|
|
1548
1594
|
} catch {
|
|
1549
1595
|
return {
|
|
1550
1596
|
kind: "failure",
|
|
@@ -1560,201 +1606,207 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1560
1606
|
{ successMessage: t("menu.import_export.feedback.exported") }
|
|
1561
1607
|
);
|
|
1562
1608
|
}
|
|
1563
|
-
const
|
|
1609
|
+
const J = Y(!1), w = Ce(null), N = Ce(
|
|
1564
1610
|
null
|
|
1565
|
-
),
|
|
1611
|
+
), le = Ce({
|
|
1566
1612
|
status: "loading"
|
|
1567
1613
|
});
|
|
1568
|
-
let
|
|
1569
|
-
function
|
|
1614
|
+
let G = null;
|
|
1615
|
+
function q() {
|
|
1570
1616
|
var e, l;
|
|
1571
|
-
|
|
1617
|
+
G == null || G(), G = null, (e = w.value) == null || e.dispose(), w.value = null, (l = N.value) == null || l.dispose(), N.value = null, le.value = { status: "loading" };
|
|
1572
1618
|
}
|
|
1573
|
-
function
|
|
1619
|
+
function H() {
|
|
1574
1620
|
var l;
|
|
1575
|
-
|
|
1576
|
-
((l =
|
|
1577
|
-
(s) =>
|
|
1621
|
+
q(), N.value = u.sdk.linkProduct.selection(
|
|
1622
|
+
((l = m.value) == null ? void 0 : l.availableItemIds) ?? [],
|
|
1623
|
+
(s) => u.sdk.item.linkProducts(s)
|
|
1578
1624
|
);
|
|
1579
|
-
const e =
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
}),
|
|
1625
|
+
const e = u.sdk.linkProduct.rules();
|
|
1626
|
+
w.value = e, le.value = e.get(), G = e.subscribe((s) => {
|
|
1627
|
+
le.value = s;
|
|
1628
|
+
}), J.value = !0;
|
|
1583
1629
|
}
|
|
1584
|
-
function
|
|
1585
|
-
|
|
1630
|
+
function xe() {
|
|
1631
|
+
J.value = !1, q();
|
|
1586
1632
|
}
|
|
1587
|
-
|
|
1588
|
-
e ||
|
|
1633
|
+
_e(J, (e) => {
|
|
1634
|
+
e || q();
|
|
1589
1635
|
});
|
|
1590
|
-
async function
|
|
1591
|
-
(await
|
|
1636
|
+
async function re(e) {
|
|
1637
|
+
(await ee(
|
|
1592
1638
|
() => {
|
|
1593
1639
|
var s;
|
|
1594
|
-
return ((s =
|
|
1640
|
+
return ((s = N.value) == null ? void 0 : s.submit()) ?? Promise.resolve({ kind: "cancelled" });
|
|
1595
1641
|
},
|
|
1596
1642
|
{
|
|
1597
|
-
successMessage:
|
|
1643
|
+
successMessage: m.value ? x(m.value.linkSaveMessage) : ""
|
|
1598
1644
|
}
|
|
1599
|
-
)).kind === "success" &&
|
|
1645
|
+
)).kind === "success" && xe();
|
|
1600
1646
|
}
|
|
1601
|
-
async function
|
|
1602
|
-
const e =
|
|
1647
|
+
async function Ve() {
|
|
1648
|
+
const e = w.value;
|
|
1603
1649
|
if (!e) return;
|
|
1604
|
-
(await
|
|
1605
|
-
showLoading: () =>
|
|
1606
|
-
successMessage:
|
|
1607
|
-
})).kind === "success" &&
|
|
1650
|
+
(await ee(() => e.submit(), {
|
|
1651
|
+
showLoading: () => le.value.status === "ready" && le.value.value.status === "submitting",
|
|
1652
|
+
successMessage: m.value ? x(m.value.linkSaveMessage) : ""
|
|
1653
|
+
})).kind === "success" && xe();
|
|
1608
1654
|
}
|
|
1609
|
-
const
|
|
1610
|
-
var e;
|
|
1611
|
-
return ((e = r.value) == null ? void 0 : e.headerCount) ?? 0;
|
|
1612
|
-
}), Ce = b(() => {
|
|
1655
|
+
const je = v(() => {
|
|
1613
1656
|
var e;
|
|
1614
|
-
return ((e =
|
|
1615
|
-
}),
|
|
1657
|
+
return ((e = m.value) == null ? void 0 : e.headerCount) ?? 0;
|
|
1658
|
+
}), Pe = v(() => {
|
|
1616
1659
|
var e;
|
|
1617
|
-
return ((e =
|
|
1618
|
-
}),
|
|
1660
|
+
return ((e = m.value) == null ? void 0 : e.rows) ?? [];
|
|
1661
|
+
}), et = v(() => {
|
|
1619
1662
|
var e;
|
|
1620
|
-
return ((e =
|
|
1621
|
-
}), Rt =
|
|
1663
|
+
return ((e = m.value) == null ? void 0 : e.currencySymbol) ?? "";
|
|
1664
|
+
}), Rt = v(() => {
|
|
1622
1665
|
var e;
|
|
1623
|
-
return ((e =
|
|
1624
|
-
}),
|
|
1666
|
+
return ((e = m.value) == null ? void 0 : e.taxSystemCode) ?? null;
|
|
1667
|
+
}), Nt = v(() => [...Pe.value]);
|
|
1625
1668
|
function tt(e, l) {
|
|
1626
|
-
return e == null ? t("menu.catalog.empty_value") :
|
|
1669
|
+
return e == null ? t("menu.catalog.empty_value") : $(e, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
1670
|
+
}
|
|
1671
|
+
function jt(e) {
|
|
1672
|
+
var l;
|
|
1673
|
+
return `${et.value.toUpperCase()}${tt(((l = e.price) == null ? void 0 : l.amount) ?? 0)}`;
|
|
1627
1674
|
}
|
|
1628
1675
|
function lt(e) {
|
|
1629
|
-
return e === null ? t("menu.catalog.empty_value") :
|
|
1676
|
+
return e === null ? t("menu.catalog.empty_value") : $(e / 100, { style: "percent", minimumFractionDigits: 2 });
|
|
1630
1677
|
}
|
|
1631
|
-
const
|
|
1678
|
+
const ke = v(() => {
|
|
1632
1679
|
var e;
|
|
1633
|
-
return ((e =
|
|
1634
|
-
}),
|
|
1635
|
-
() =>
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1680
|
+
return ((e = m.value) == null ? void 0 : e.empty) ?? !1;
|
|
1681
|
+
}), We = v(
|
|
1682
|
+
() => {
|
|
1683
|
+
var e;
|
|
1684
|
+
return ke.value && !((e = m.value) != null && e.emptyState.showSearch);
|
|
1685
|
+
}
|
|
1686
|
+
), De = Y({}), ze = v(
|
|
1687
|
+
() => Object.entries(De.value).filter(([, e]) => e).map(([e]) => e)
|
|
1688
|
+
), Le = v(() => u.sdk.item.removeManyCapability(ze.value));
|
|
1689
|
+
function Xe() {
|
|
1690
|
+
De.value = {};
|
|
1639
1691
|
}
|
|
1640
|
-
|
|
1692
|
+
_e(
|
|
1641
1693
|
() => {
|
|
1642
1694
|
var e, l;
|
|
1643
|
-
return [(e =
|
|
1695
|
+
return [(e = m.value) == null ? void 0 : e.rows, (l = m.value) == null ? void 0 : l.attributeRule];
|
|
1644
1696
|
},
|
|
1645
|
-
() =>
|
|
1697
|
+
() => Xe()
|
|
1646
1698
|
);
|
|
1647
|
-
const
|
|
1648
|
-
let
|
|
1649
|
-
const Ee =
|
|
1699
|
+
const Se = Y(!1), ye = Ce(null), at = kl(() => ye.value);
|
|
1700
|
+
let ge = null;
|
|
1701
|
+
const Ee = Ce({
|
|
1650
1702
|
status: "loading"
|
|
1651
1703
|
});
|
|
1652
|
-
let
|
|
1653
|
-
const Oe =
|
|
1704
|
+
let we = null;
|
|
1705
|
+
const Oe = v(
|
|
1654
1706
|
() => Ee.value.status === "ready" ? Ee.value.value : null
|
|
1655
|
-
),
|
|
1707
|
+
), Ye = Y(!1), ce = Ce(null), Me = Ce(null);
|
|
1656
1708
|
let Ue = null;
|
|
1657
|
-
const
|
|
1709
|
+
const ne = v(
|
|
1658
1710
|
() => {
|
|
1659
1711
|
var e;
|
|
1660
1712
|
return ((e = Me.value) == null ? void 0 : e.status) === "ready" ? Me.value.value : null;
|
|
1661
1713
|
}
|
|
1662
1714
|
);
|
|
1663
|
-
function
|
|
1715
|
+
function Te() {
|
|
1664
1716
|
var e;
|
|
1665
|
-
Ue == null || Ue(), (e = ce.value) == null || e.dispose(), Ue = null, ce.value = null, Me.value = null,
|
|
1717
|
+
Ue == null || Ue(), (e = ce.value) == null || e.dispose(), Ue = null, ce.value = null, Me.value = null, Ye.value = !1;
|
|
1666
1718
|
}
|
|
1667
1719
|
function ot() {
|
|
1668
1720
|
var l;
|
|
1669
|
-
if (!((l =
|
|
1721
|
+
if (!((l = ne.value) != null && l.dirty)) return Te();
|
|
1670
1722
|
const e = ce.value;
|
|
1671
|
-
|
|
1723
|
+
z.open({
|
|
1672
1724
|
title: t("menu.product.table.bulk_edit.discard.title"),
|
|
1673
1725
|
message: t("menu.product.table.bulk_edit.discard.message"),
|
|
1674
1726
|
primaryActions: {
|
|
1675
1727
|
text: t("menu.common.actions.discard"),
|
|
1676
1728
|
close: !0,
|
|
1677
|
-
variant:
|
|
1729
|
+
variant: be.Destructive
|
|
1678
1730
|
},
|
|
1679
1731
|
secondaryActions: {
|
|
1680
1732
|
text: t("menu.common.actions.cancel"),
|
|
1681
1733
|
close: !0
|
|
1682
1734
|
}
|
|
1683
1735
|
}).onPrimary(() => {
|
|
1684
|
-
ce.value === e &&
|
|
1736
|
+
ce.value === e && Te();
|
|
1685
1737
|
});
|
|
1686
1738
|
}
|
|
1687
1739
|
function Dt() {
|
|
1688
|
-
|
|
1689
|
-
const e =
|
|
1740
|
+
Te();
|
|
1741
|
+
const e = u.sdk.item.bulkEditor();
|
|
1690
1742
|
ce.value = e, Me.value = e.get(), Ue = e.subscribe((l) => {
|
|
1691
1743
|
Me.value = l;
|
|
1692
|
-
}),
|
|
1744
|
+
}), Ye.value = !0;
|
|
1693
1745
|
}
|
|
1694
|
-
async function
|
|
1746
|
+
async function zt() {
|
|
1695
1747
|
var d;
|
|
1696
1748
|
const e = ce.value;
|
|
1697
1749
|
if (!e) return;
|
|
1698
|
-
const l = ((d =
|
|
1699
|
-
(await
|
|
1750
|
+
const l = ((d = ne.value) == null ? void 0 : d.dirty) ?? !1;
|
|
1751
|
+
(await ee(() => e.submit(), {
|
|
1700
1752
|
showLoading: () => {
|
|
1701
1753
|
var P;
|
|
1702
|
-
return ((P =
|
|
1754
|
+
return ((P = ne.value) == null ? void 0 : P.status) === "submitting";
|
|
1703
1755
|
},
|
|
1704
|
-
successMessage: l &&
|
|
1705
|
-
})).kind === "success" &&
|
|
1756
|
+
successMessage: l && ne.value ? x(ne.value.saveMessage) : ""
|
|
1757
|
+
})).kind === "success" && Te();
|
|
1706
1758
|
}
|
|
1707
|
-
function
|
|
1759
|
+
function Je(e) {
|
|
1708
1760
|
var l;
|
|
1709
|
-
|
|
1761
|
+
we == null || we(), (l = ye.value) == null || l.dispose(), ye.value = u.sdk.item.editor(e), Ee.value = ye.value.get(), we = ye.value.subscribe((s) => {
|
|
1710
1762
|
Ee.value = s;
|
|
1711
1763
|
});
|
|
1712
1764
|
}
|
|
1713
1765
|
function nt() {
|
|
1714
|
-
|
|
1766
|
+
ge = u.sdk.item.editorScope(), Je(), Se.value = !0;
|
|
1715
1767
|
}
|
|
1716
1768
|
function st(e) {
|
|
1717
|
-
|
|
1769
|
+
ge = u.sdk.item.editorScope(), Je(e.id), Se.value = !0;
|
|
1718
1770
|
}
|
|
1719
|
-
async function
|
|
1720
|
-
const e =
|
|
1771
|
+
async function Bt() {
|
|
1772
|
+
const e = ye.value;
|
|
1721
1773
|
if (!e) return;
|
|
1722
|
-
(await
|
|
1774
|
+
(await ee(
|
|
1723
1775
|
() => at.submit(() => e.submit()),
|
|
1724
1776
|
{
|
|
1725
1777
|
showLoading: () => {
|
|
1726
1778
|
var s;
|
|
1727
1779
|
return ((s = Oe.value) == null ? void 0 : s.status) === "submitting";
|
|
1728
1780
|
},
|
|
1729
|
-
successMessage: Oe.value ?
|
|
1781
|
+
successMessage: Oe.value ? x(Oe.value.saveMessage) : ""
|
|
1730
1782
|
}
|
|
1731
|
-
)).kind === "success" &&
|
|
1783
|
+
)).kind === "success" && ye.value === e && (Se.value = !1);
|
|
1732
1784
|
}
|
|
1733
|
-
function
|
|
1785
|
+
function Kt(e) {
|
|
1734
1786
|
var s;
|
|
1735
1787
|
const l = ((s = Oe.value) == null ? void 0 : s.itemId) ?? void 0;
|
|
1736
|
-
|
|
1788
|
+
ge == null || ge.select(e), Je(l);
|
|
1737
1789
|
}
|
|
1738
|
-
const
|
|
1739
|
-
let
|
|
1740
|
-
function
|
|
1741
|
-
|
|
1790
|
+
const Be = Y(!1), Qe = Ce(null);
|
|
1791
|
+
let Ae = null, Re = null;
|
|
1792
|
+
function Ze() {
|
|
1793
|
+
Re == null || Re(), Ae == null || Ae.dispose(), Re = null, Ae = null;
|
|
1742
1794
|
}
|
|
1743
|
-
function
|
|
1744
|
-
|
|
1745
|
-
const l =
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
}),
|
|
1795
|
+
function Gt(e) {
|
|
1796
|
+
Ze();
|
|
1797
|
+
const l = u.sdk.item.overview(e.id);
|
|
1798
|
+
Qe.value = l.get(), Ae = l, Re = l.subscribe((s) => {
|
|
1799
|
+
Qe.value = s;
|
|
1800
|
+
}), Be.value = !0;
|
|
1749
1801
|
}
|
|
1750
1802
|
function rt(e) {
|
|
1751
1803
|
if (!e.removeRequiresConfirmation) {
|
|
1752
|
-
|
|
1753
|
-
successMessage:
|
|
1804
|
+
ee(() => u.sdk.item.remove(e.id), {
|
|
1805
|
+
successMessage: x(e.removeMessage)
|
|
1754
1806
|
});
|
|
1755
1807
|
return;
|
|
1756
1808
|
}
|
|
1757
|
-
|
|
1809
|
+
z.open({
|
|
1758
1810
|
title: t("menu.common.dialog.remove.product.title"),
|
|
1759
1811
|
message: t("menu.common.dialog.remove.product.message", {
|
|
1760
1812
|
name: e.name
|
|
@@ -1762,32 +1814,32 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1762
1814
|
primaryActions: {
|
|
1763
1815
|
text: t("menu.common.actions.remove"),
|
|
1764
1816
|
close: !0,
|
|
1765
|
-
variant:
|
|
1817
|
+
variant: be.Destructive
|
|
1766
1818
|
},
|
|
1767
1819
|
secondaryActions: {
|
|
1768
1820
|
text: t("menu.common.actions.cancel"),
|
|
1769
1821
|
close: !0
|
|
1770
1822
|
}
|
|
1771
1823
|
}).onPrimary(async () => {
|
|
1772
|
-
await
|
|
1773
|
-
successMessage:
|
|
1824
|
+
await ee(() => u.sdk.item.remove(e.id), {
|
|
1825
|
+
successMessage: x(e.removeMessage)
|
|
1774
1826
|
});
|
|
1775
1827
|
});
|
|
1776
1828
|
}
|
|
1777
|
-
function
|
|
1829
|
+
function qt() {
|
|
1778
1830
|
var P, de;
|
|
1779
|
-
const e =
|
|
1831
|
+
const e = ze.value;
|
|
1780
1832
|
if (e.length === 0 || Le.value.state !== "allowed") return;
|
|
1781
|
-
const l = (P =
|
|
1782
|
-
successMessage: l ?
|
|
1833
|
+
const l = (P = m.value) == null ? void 0 : P.rows.find((me) => e.includes(me.id)), s = () => ee(() => u.sdk.item.removeMany(e), {
|
|
1834
|
+
successMessage: l ? x(l.removeMessage) : t("menu.common.dialog.remove.product.success")
|
|
1783
1835
|
}).then((me) => {
|
|
1784
|
-
me.kind === "success" &&
|
|
1836
|
+
me.kind === "success" && Xe();
|
|
1785
1837
|
});
|
|
1786
|
-
if (!((de =
|
|
1838
|
+
if (!((de = m.value) == null ? void 0 : de.rows.filter((me) => e.includes(me.id)).some((me) => me.removeRequiresConfirmation))) {
|
|
1787
1839
|
s();
|
|
1788
1840
|
return;
|
|
1789
1841
|
}
|
|
1790
|
-
|
|
1842
|
+
z.open({
|
|
1791
1843
|
title: t("menu.common.dialog.remove.product.title"),
|
|
1792
1844
|
message: t("menu.common.dialog.remove.product.message", {
|
|
1793
1845
|
name: (l == null ? void 0 : l.name) ?? ""
|
|
@@ -1795,7 +1847,7 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1795
1847
|
primaryActions: {
|
|
1796
1848
|
text: t("menu.common.actions.remove"),
|
|
1797
1849
|
close: !0,
|
|
1798
|
-
variant:
|
|
1850
|
+
variant: be.Destructive
|
|
1799
1851
|
},
|
|
1800
1852
|
secondaryActions: {
|
|
1801
1853
|
text: t("menu.common.actions.cancel"),
|
|
@@ -1803,20 +1855,20 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1803
1855
|
}
|
|
1804
1856
|
}).onPrimary(() => s());
|
|
1805
1857
|
}
|
|
1806
|
-
const it =
|
|
1858
|
+
const it = v(() => {
|
|
1807
1859
|
var e;
|
|
1808
1860
|
return [
|
|
1809
1861
|
{ label: t("menu.category.selector.all"), value: null },
|
|
1810
|
-
...(((e =
|
|
1811
|
-
label:
|
|
1862
|
+
...(((e = m.value) == null ? void 0 : e.categoryOptions) ?? []).map((l) => ({
|
|
1863
|
+
label: D(l),
|
|
1812
1864
|
value: l.id
|
|
1813
1865
|
}))
|
|
1814
1866
|
];
|
|
1815
|
-
}),
|
|
1867
|
+
}), Ht = v(() => {
|
|
1816
1868
|
var e;
|
|
1817
1869
|
return [
|
|
1818
1870
|
{ label: t("menu.common.labels.summary"), value: null },
|
|
1819
|
-
...(((e =
|
|
1871
|
+
...(((e = m.value) == null ? void 0 : e.scope.schedulerOptions) ?? []).map((l) => ({
|
|
1820
1872
|
label: l.label,
|
|
1821
1873
|
value: l.id
|
|
1822
1874
|
}))
|
|
@@ -1824,7 +1876,7 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1824
1876
|
});
|
|
1825
1877
|
function ut(e) {
|
|
1826
1878
|
return e.length === 0 ? [] : [
|
|
1827
|
-
|
|
1879
|
+
E(fl, {
|
|
1828
1880
|
nameLocale: Object.fromEntries(
|
|
1829
1881
|
e.map((l) => [l.locale, l.value])
|
|
1830
1882
|
),
|
|
@@ -1835,7 +1887,7 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1835
1887
|
function ct(e) {
|
|
1836
1888
|
return e.isAddon ? [t("menu.tree_editor.labels.addon"), ...e.categoryNames] : e.categoryNames;
|
|
1837
1889
|
}
|
|
1838
|
-
const
|
|
1890
|
+
const Wt = v(() => {
|
|
1839
1891
|
var e, l;
|
|
1840
1892
|
return [
|
|
1841
1893
|
{
|
|
@@ -1856,45 +1908,10 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1856
1908
|
// pulling that unit into scope.
|
|
1857
1909
|
cell: (s) => {
|
|
1858
1910
|
const d = s.row.original;
|
|
1859
|
-
return
|
|
1911
|
+
return E(
|
|
1860
1912
|
"div",
|
|
1861
1913
|
{ class: "my-8 mx-12 flex items-center justify-center" },
|
|
1862
|
-
[
|
|
1863
|
-
V(
|
|
1864
|
-
re.FmCard,
|
|
1865
|
-
{
|
|
1866
|
-
variant: "outlined",
|
|
1867
|
-
// Keeps the card square even when the child image has an
|
|
1868
|
-
// intrinsic ratio; legacy Thumbnail is the same fixed 72px box.
|
|
1869
|
-
// `w-72 h-72` IS 72px on the FeedMe scale, which is why the
|
|
1870
|
-
// inline `style: {width:'72px', height:'72px'}` that used to
|
|
1871
|
-
// sit here was removed as a restatement (ADR-0003 §2).
|
|
1872
|
-
//
|
|
1873
|
-
// The HEIGHT needs `!` and the width does not. `.h-72` and
|
|
1874
|
-
// `.fm-card--outlined { height: fit-content }` are both a
|
|
1875
|
-
// single class, so specificity ties and source order decides —
|
|
1876
|
-
// and the ui-library sheet loads after the utilities in the
|
|
1877
|
-
// app, so the card collapsed to its content: 72x26, which
|
|
1878
|
-
// stretched every product thumbnail into a letterbox. Nothing
|
|
1879
|
-
// in the library sets `width`, so `w-72` needs no help.
|
|
1880
|
-
//
|
|
1881
|
-
// A mount that loads the two sheets in the opposite order
|
|
1882
|
-
// renders this square, which is how every list screenshot once
|
|
1883
|
-
// compared clean while the real app was wrong. Do not drop the
|
|
1884
|
-
// `!` on the strength of a green visual comparison.
|
|
1885
|
-
class: "flex shrink-0 w-72 !h-72 items-center justify-center rounded-md overflow-hidden"
|
|
1886
|
-
},
|
|
1887
|
-
() => d.thumbnailUrl ? V("img", {
|
|
1888
|
-
src: d.thumbnailUrl,
|
|
1889
|
-
alt: d.name,
|
|
1890
|
-
class: "w-full h-full object-cover"
|
|
1891
|
-
}) : V(re.FmIcon, {
|
|
1892
|
-
name: "image",
|
|
1893
|
-
outline: !0,
|
|
1894
|
-
color: "neutral-gray-300"
|
|
1895
|
-
})
|
|
1896
|
-
)
|
|
1897
|
-
]
|
|
1914
|
+
[E(Pt, { src: d.thumbnailUrl, alt: d.name })]
|
|
1898
1915
|
);
|
|
1899
1916
|
}
|
|
1900
1917
|
},
|
|
@@ -1912,19 +1929,19 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1912
1929
|
size: 250,
|
|
1913
1930
|
cell: (s) => {
|
|
1914
1931
|
const d = s.row.original, P = d.translatedNames;
|
|
1915
|
-
return
|
|
1916
|
-
|
|
1932
|
+
return E("div", { class: "flex items-center gap-8" }, [
|
|
1933
|
+
E("span", { class: "text-wrap" }, d.name),
|
|
1917
1934
|
...ut(P)
|
|
1918
1935
|
]);
|
|
1919
1936
|
}
|
|
1920
1937
|
},
|
|
1921
1938
|
{
|
|
1922
1939
|
accessorKey: "price",
|
|
1923
|
-
header: () =>
|
|
1940
|
+
header: () => E(
|
|
1924
1941
|
"div",
|
|
1925
1942
|
{ class: "flex flex-1 justify-end" },
|
|
1926
1943
|
t("menu.product.table.columns.price", {
|
|
1927
|
-
currency:
|
|
1944
|
+
currency: et.value
|
|
1928
1945
|
})
|
|
1929
1946
|
),
|
|
1930
1947
|
enableSorting: !1,
|
|
@@ -1939,7 +1956,7 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1939
1956
|
accessorKey: "taxRatePercent",
|
|
1940
1957
|
// The header is DATA, not copy: legacy renders the business's tax system
|
|
1941
1958
|
// code here (ProductTable.vue:366), which is why no locale key exists.
|
|
1942
|
-
header: () =>
|
|
1959
|
+
header: () => E(
|
|
1943
1960
|
"div",
|
|
1944
1961
|
{ class: "flex flex-1 justify-end" },
|
|
1945
1962
|
Rt.value ?? ""
|
|
@@ -1956,13 +1973,13 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1956
1973
|
size: 140,
|
|
1957
1974
|
cell: (s) => {
|
|
1958
1975
|
const d = ct(s.row.original);
|
|
1959
|
-
return d.length === 0 ? t("menu.catalog.empty_value") :
|
|
1976
|
+
return d.length === 0 ? t("menu.catalog.empty_value") : E(Ge, {
|
|
1960
1977
|
kind: "category",
|
|
1961
1978
|
chips: d.map((P) => ({ key: P, label: P }))
|
|
1962
1979
|
});
|
|
1963
1980
|
}
|
|
1964
1981
|
},
|
|
1965
|
-
...((e =
|
|
1982
|
+
...((e = m.value) == null ? void 0 : e.subcategoryPathColumn.state) === "allowed" ? [
|
|
1966
1983
|
{
|
|
1967
1984
|
accessorKey: "subcategoryPath",
|
|
1968
1985
|
header: () => t("menu.product.table.columns.subcategory"),
|
|
@@ -1971,14 +1988,14 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1971
1988
|
cell: (s) => s.getValue() ?? t("menu.catalog.empty_value")
|
|
1972
1989
|
}
|
|
1973
1990
|
] : [],
|
|
1974
|
-
...(l =
|
|
1991
|
+
...(l = m.value) != null && l.attributeColumnVisible ? [
|
|
1975
1992
|
{
|
|
1976
1993
|
id: "tagging",
|
|
1977
1994
|
accessorKey: "attributeTags",
|
|
1978
1995
|
header: () => t("menu.product.table.columns.tagging"),
|
|
1979
1996
|
enableSorting: !1,
|
|
1980
1997
|
size: 140,
|
|
1981
|
-
cell: (s) =>
|
|
1998
|
+
cell: (s) => E(Ge, {
|
|
1982
1999
|
kind: "tagging",
|
|
1983
2000
|
chips: s.row.original.attributeTags
|
|
1984
2001
|
})
|
|
@@ -1993,10 +2010,10 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
1993
2010
|
size: 140,
|
|
1994
2011
|
cell: (s) => {
|
|
1995
2012
|
const d = s.getValue();
|
|
1996
|
-
return d === null ? t("menu.catalog.empty_value") :
|
|
1997
|
-
|
|
2013
|
+
return d === null ? t("menu.catalog.empty_value") : E(
|
|
2014
|
+
pe.FmChip,
|
|
1998
2015
|
{ compact: !0, class: "fm-typo-en-body-md-600 !px-4" },
|
|
1999
|
-
() => t(
|
|
2016
|
+
() => t(Ie[d])
|
|
2000
2017
|
);
|
|
2001
2018
|
}
|
|
2002
2019
|
},
|
|
@@ -2004,12 +2021,12 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2004
2021
|
id: "actions",
|
|
2005
2022
|
header: () => {
|
|
2006
2023
|
var s;
|
|
2007
|
-
return
|
|
2008
|
-
|
|
2024
|
+
return E("div", { class: "w-full px-4 flex justify-end" }, [
|
|
2025
|
+
E(pe.FmButton, {
|
|
2009
2026
|
prependIcon: "edit",
|
|
2010
|
-
variant:
|
|
2011
|
-
textColor:
|
|
2012
|
-
disabled: ((s =
|
|
2027
|
+
variant: be.Tertiary,
|
|
2028
|
+
textColor: ve.NeutralGray400,
|
|
2029
|
+
disabled: ((s = m.value) == null ? void 0 : s.bulkEdit.state) !== "allowed",
|
|
2013
2030
|
"aria-label": t("menu.product.table.bulk_edit.title"),
|
|
2014
2031
|
onClick: Dt
|
|
2015
2032
|
})
|
|
@@ -2020,7 +2037,7 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2020
2037
|
meta: { textAlign: "right", headerClass: "py-4", cellClass: "pl-16" },
|
|
2021
2038
|
cell: (s) => {
|
|
2022
2039
|
const d = s.row.original, P = [
|
|
2023
|
-
|
|
2040
|
+
E(pe.FmButton, {
|
|
2024
2041
|
icon: "overview",
|
|
2025
2042
|
variant: "tertiary",
|
|
2026
2043
|
textColor: "neutral-gray-400",
|
|
@@ -2028,27 +2045,27 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2028
2045
|
label: t("menu.product.overview.title"),
|
|
2029
2046
|
name: d.name
|
|
2030
2047
|
}),
|
|
2031
|
-
onClick:
|
|
2048
|
+
onClick: $e(() => Gt(d), ["stop"])
|
|
2032
2049
|
})
|
|
2033
2050
|
];
|
|
2034
2051
|
return d.remove.state !== "hidden" && P.push(
|
|
2035
|
-
|
|
2052
|
+
E(pe.FmButton, {
|
|
2036
2053
|
icon: "delete",
|
|
2037
2054
|
variant: "tertiary",
|
|
2038
2055
|
textColor: "neutral-gray-400",
|
|
2039
2056
|
disabled: d.remove.state !== "allowed",
|
|
2040
|
-
title: d.remove.state === "disabled" ?
|
|
2057
|
+
title: d.remove.state === "disabled" ? x(d.remove.reason) : void 0,
|
|
2041
2058
|
"aria-label": t("menu.common.labels.a11y_labelled_name", {
|
|
2042
2059
|
label: t("menu.common.actions.remove"),
|
|
2043
2060
|
name: d.name
|
|
2044
2061
|
}),
|
|
2045
|
-
onClick:
|
|
2062
|
+
onClick: $e(() => rt(d), ["stop"])
|
|
2046
2063
|
})
|
|
2047
|
-
),
|
|
2064
|
+
), E("div", { class: "flex justify-end gap-4" }, P);
|
|
2048
2065
|
}
|
|
2049
2066
|
}
|
|
2050
2067
|
];
|
|
2051
|
-
}),
|
|
2068
|
+
}), Xt = v(() => [
|
|
2052
2069
|
{
|
|
2053
2070
|
accessorKey: "code",
|
|
2054
2071
|
header: () => t("menu.product.table.columns.code"),
|
|
@@ -2057,10 +2074,10 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2057
2074
|
cell: (e) => {
|
|
2058
2075
|
var s;
|
|
2059
2076
|
const l = e.row.original;
|
|
2060
|
-
return
|
|
2077
|
+
return E(Ft, {
|
|
2061
2078
|
modelValue: l.code,
|
|
2062
2079
|
disabled: l.editCode.state !== "allowed",
|
|
2063
|
-
errorMessages: l.codeIssue ? [
|
|
2080
|
+
errorMessages: l.codeIssue ? [x(l.codeIssue)] : [],
|
|
2064
2081
|
placeholder: ((s = l.inherited) == null ? void 0 : s.code) ?? "",
|
|
2065
2082
|
"aria-label": t("menu.common.labels.a11y_labelled_name", {
|
|
2066
2083
|
label: t("menu.product.table.columns.code"),
|
|
@@ -2080,11 +2097,11 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2080
2097
|
size: 250,
|
|
2081
2098
|
cell: (e) => {
|
|
2082
2099
|
const l = e.row.original;
|
|
2083
|
-
return
|
|
2084
|
-
|
|
2100
|
+
return E("div", { class: "flex items-center gap-8" }, [
|
|
2101
|
+
E(Ft, {
|
|
2085
2102
|
modelValue: l.name,
|
|
2086
2103
|
disabled: l.editName.state !== "allowed",
|
|
2087
|
-
errorMessages: l.nameIssue ? [
|
|
2104
|
+
errorMessages: l.nameIssue ? [x(l.nameIssue)] : [],
|
|
2088
2105
|
"aria-label": t("menu.common.labels.a11y_labelled_name", {
|
|
2089
2106
|
label: t("menu.product.table.columns.name"),
|
|
2090
2107
|
name: l.committedName
|
|
@@ -2103,11 +2120,11 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2103
2120
|
meta: { textAlign: "right" },
|
|
2104
2121
|
header: () => {
|
|
2105
2122
|
var e;
|
|
2106
|
-
return
|
|
2123
|
+
return E(
|
|
2107
2124
|
"div",
|
|
2108
2125
|
{ class: "w-full flex justify-end" },
|
|
2109
2126
|
t("menu.product.table.columns.price", {
|
|
2110
|
-
currency: ((e =
|
|
2127
|
+
currency: ((e = ne.value) == null ? void 0 : e.currencySymbol) ?? ""
|
|
2111
2128
|
})
|
|
2112
2129
|
);
|
|
2113
2130
|
},
|
|
@@ -2115,8 +2132,8 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2115
2132
|
size: 140,
|
|
2116
2133
|
cell: (e) => {
|
|
2117
2134
|
const l = e.row.original;
|
|
2118
|
-
return
|
|
2119
|
-
|
|
2135
|
+
return E(
|
|
2136
|
+
gl,
|
|
2120
2137
|
{
|
|
2121
2138
|
modelValue: l.priceAmount,
|
|
2122
2139
|
commitOnInput: !0,
|
|
@@ -2140,8 +2157,8 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2140
2157
|
},
|
|
2141
2158
|
l.priceIssue ? {
|
|
2142
2159
|
"helper-text": () => [
|
|
2143
|
-
|
|
2144
|
-
|
|
2160
|
+
E("span", { class: "block" }, x(l.priceIssue)),
|
|
2161
|
+
E(
|
|
2145
2162
|
"span",
|
|
2146
2163
|
{ class: "block" },
|
|
2147
2164
|
t("menu.product.table.validation.price_min")
|
|
@@ -2156,10 +2173,10 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2156
2173
|
meta: { textAlign: "right" },
|
|
2157
2174
|
header: () => {
|
|
2158
2175
|
var e;
|
|
2159
|
-
return
|
|
2176
|
+
return E(
|
|
2160
2177
|
"div",
|
|
2161
2178
|
{ class: "w-full flex justify-end" },
|
|
2162
|
-
((e =
|
|
2179
|
+
((e = ne.value) == null ? void 0 : e.taxSystemCode) ?? ""
|
|
2163
2180
|
);
|
|
2164
2181
|
},
|
|
2165
2182
|
enableSorting: !1,
|
|
@@ -2167,8 +2184,8 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2167
2184
|
cell: (e) => {
|
|
2168
2185
|
var s, d;
|
|
2169
2186
|
const l = e.row.original;
|
|
2170
|
-
return
|
|
2171
|
-
items: (((s =
|
|
2187
|
+
return E(pe.FmSelect, {
|
|
2188
|
+
items: (((s = ne.value) == null ? void 0 : s.taxOptions) ?? []).map((P) => ({
|
|
2172
2189
|
label: t("menu.product.table.tax_option_label", {
|
|
2173
2190
|
name: P.name,
|
|
2174
2191
|
percent: lt(P.percent)
|
|
@@ -2179,7 +2196,7 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2179
2196
|
disabled: l.editTax.state !== "allowed",
|
|
2180
2197
|
shiftMenu: !0,
|
|
2181
2198
|
"aria-label": t("menu.common.labels.a11y_labelled_name", {
|
|
2182
|
-
label: ((d =
|
|
2199
|
+
label: ((d = ne.value) == null ? void 0 : d.taxSystemCode) ?? "",
|
|
2183
2200
|
name: l.committedName
|
|
2184
2201
|
}),
|
|
2185
2202
|
"onUpdate:modelValue": (P) => {
|
|
@@ -2197,11 +2214,11 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2197
2214
|
cell: (e) => {
|
|
2198
2215
|
var s;
|
|
2199
2216
|
const l = e.row.original;
|
|
2200
|
-
return
|
|
2201
|
-
|
|
2217
|
+
return E(
|
|
2218
|
+
Il,
|
|
2202
2219
|
{
|
|
2203
|
-
items: (((s =
|
|
2204
|
-
label:
|
|
2220
|
+
items: (((s = ne.value) == null ? void 0 : s.categoryOptions) ?? []).map((d) => ({
|
|
2221
|
+
label: D(d),
|
|
2205
2222
|
value: d.id
|
|
2206
2223
|
})),
|
|
2207
2224
|
hideChips: !0,
|
|
@@ -2218,7 +2235,7 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2218
2235
|
}
|
|
2219
2236
|
},
|
|
2220
2237
|
{
|
|
2221
|
-
default: () =>
|
|
2238
|
+
default: () => E(
|
|
2222
2239
|
"div",
|
|
2223
2240
|
{
|
|
2224
2241
|
class: [
|
|
@@ -2228,10 +2245,10 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2228
2245
|
},
|
|
2229
2246
|
l.categoryIds.length ? l.categoryIds.map((d) => {
|
|
2230
2247
|
var de;
|
|
2231
|
-
const P = (de =
|
|
2248
|
+
const P = (de = ne.value) == null ? void 0 : de.categoryOptions.find(
|
|
2232
2249
|
(me) => me.id === d
|
|
2233
2250
|
);
|
|
2234
|
-
return P ?
|
|
2251
|
+
return P ? D(P) : "";
|
|
2235
2252
|
}).join(t("menu.catalog.list_separator")) : t("menu.product.form.summary.fields.addon")
|
|
2236
2253
|
)
|
|
2237
2254
|
}
|
|
@@ -2246,11 +2263,11 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2246
2263
|
cell: (e) => {
|
|
2247
2264
|
var s;
|
|
2248
2265
|
const l = e.row.original;
|
|
2249
|
-
return
|
|
2250
|
-
|
|
2266
|
+
return E(
|
|
2267
|
+
pe.FmSelect,
|
|
2251
2268
|
{
|
|
2252
|
-
items: (((s =
|
|
2253
|
-
label:
|
|
2269
|
+
items: (((s = ne.value) == null ? void 0 : s.subcategoryOptions) ?? []).map((d) => ({
|
|
2270
|
+
label: D(d),
|
|
2254
2271
|
value: d.id
|
|
2255
2272
|
})),
|
|
2256
2273
|
multiselect: !0,
|
|
@@ -2270,7 +2287,7 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2270
2287
|
}
|
|
2271
2288
|
},
|
|
2272
2289
|
l.subcategoryIds.length ? {
|
|
2273
|
-
default: () =>
|
|
2290
|
+
default: () => E(
|
|
2274
2291
|
"div",
|
|
2275
2292
|
{
|
|
2276
2293
|
class: [
|
|
@@ -2280,10 +2297,10 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2280
2297
|
},
|
|
2281
2298
|
l.subcategoryIds.map((d) => {
|
|
2282
2299
|
var de;
|
|
2283
|
-
const P = (de =
|
|
2300
|
+
const P = (de = ne.value) == null ? void 0 : de.subcategoryOptions.find(
|
|
2284
2301
|
(me) => me.id === d
|
|
2285
2302
|
);
|
|
2286
|
-
return P ?
|
|
2303
|
+
return P ? D(P) : "";
|
|
2287
2304
|
}).filter(Boolean).join("/")
|
|
2288
2305
|
)
|
|
2289
2306
|
} : void 0
|
|
@@ -2299,9 +2316,9 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2299
2316
|
cell: (e) => {
|
|
2300
2317
|
var s;
|
|
2301
2318
|
const l = e.row.original;
|
|
2302
|
-
return
|
|
2303
|
-
items: (((s =
|
|
2304
|
-
label: t(
|
|
2319
|
+
return E(pe.FmSelect, {
|
|
2320
|
+
items: (((s = ne.value) == null ? void 0 : s.orderFromOptions) ?? []).map((d) => ({
|
|
2321
|
+
label: t(Ie[d]),
|
|
2305
2322
|
value: d
|
|
2306
2323
|
})),
|
|
2307
2324
|
modelValue: l.orderFrom,
|
|
@@ -2321,277 +2338,297 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2321
2338
|
]);
|
|
2322
2339
|
function mt() {
|
|
2323
2340
|
var e;
|
|
2324
|
-
|
|
2341
|
+
we == null || we(), we = null, (e = ye.value) == null || e.dispose(), ye.value = null, ge == null || ge.dispose(), ge = null, Ee.value = { status: "loading" };
|
|
2325
2342
|
}
|
|
2326
|
-
return
|
|
2343
|
+
return _e(Se, (e) => {
|
|
2327
2344
|
e || mt();
|
|
2328
|
-
}),
|
|
2329
|
-
e ||
|
|
2330
|
-
}),
|
|
2331
|
-
|
|
2345
|
+
}), _e(Be, (e) => {
|
|
2346
|
+
e || Ze();
|
|
2347
|
+
}), ll(() => {
|
|
2348
|
+
q(), mt(), Ze(), Te();
|
|
2332
2349
|
}), (e, l) => {
|
|
2333
2350
|
var pt;
|
|
2334
|
-
const s =
|
|
2335
|
-
return o(), F(
|
|
2351
|
+
const s = T("FmButton"), d = T("FmBottomSheet"), P = T("FmMenuItem"), de = T("FmMenu"), me = T("FmCircularProgress"), Yt = T("FmIcon"), Jt = T("FmSearch"), dt = T("FmTable");
|
|
2352
|
+
return o(), F(bl, {
|
|
2336
2353
|
class: "h-[calc(100dvh-56px)]",
|
|
2337
|
-
heading: e.catalogPage ? ((pt =
|
|
2354
|
+
heading: e.catalogPage ? ((pt = m.value) == null ? void 0 : pt.scope.catalogLabel) ?? a(t)("menu.common.labels.main") : a(t)("menu.products.title")
|
|
2338
2355
|
}, {
|
|
2339
2356
|
"prepend-heading": A(() => [
|
|
2340
|
-
|
|
2357
|
+
qe(e.$slots, "prepend-heading")
|
|
2341
2358
|
]),
|
|
2342
2359
|
"append-heading": A(() => [
|
|
2343
|
-
|
|
2344
|
-
e.catalogPage ? M("", !0) : (o(),
|
|
2345
|
-
|
|
2346
|
-
|
|
2360
|
+
i("div", no, [
|
|
2361
|
+
e.catalogPage ? M("", !0) : (o(), f("div", so, [
|
|
2362
|
+
i("div", ro, [
|
|
2363
|
+
i("p", io, L(a($)(je.value)), 1)
|
|
2347
2364
|
])
|
|
2348
2365
|
])),
|
|
2349
|
-
|
|
2350
|
-
!
|
|
2366
|
+
i("div", uo, [
|
|
2367
|
+
!O.value && !e.catalogPage && oe.value ? (o(), F(ul, {
|
|
2351
2368
|
key: 0,
|
|
2352
|
-
"can-open":
|
|
2369
|
+
"can-open": oe.value,
|
|
2353
2370
|
"listen-for-message": !1
|
|
2354
2371
|
}, {
|
|
2355
|
-
default: A(({ trigger:
|
|
2356
|
-
|
|
2357
|
-
"bg-color": a(
|
|
2372
|
+
default: A(({ trigger: ie }) => [
|
|
2373
|
+
y(s, {
|
|
2374
|
+
"bg-color": a(ve).NeutralGray100,
|
|
2358
2375
|
label: a(t)("menu.tree_editor.title"),
|
|
2359
|
-
"text-color": a(
|
|
2360
|
-
variant: a(
|
|
2361
|
-
onClick:
|
|
2376
|
+
"text-color": a(ve).TypoSecondary,
|
|
2377
|
+
variant: a(be).Primary,
|
|
2378
|
+
onClick: ie
|
|
2362
2379
|
}, null, 8, ["bg-color", "label", "text-color", "variant", "onClick"])
|
|
2363
2380
|
]),
|
|
2364
2381
|
_: 1
|
|
2365
2382
|
}, 8, ["can-open"])) : M("", !0),
|
|
2366
|
-
!
|
|
2367
|
-
|
|
2383
|
+
!O.value && !e.catalogPage && R.value ? (o(), f(Q, { key: 1 }, [
|
|
2384
|
+
y(s, {
|
|
2368
2385
|
label: a(t)("menu.products.actions.export"),
|
|
2369
|
-
"bg-color": a(
|
|
2370
|
-
"text-color": a(
|
|
2371
|
-
variant: a(
|
|
2372
|
-
onClick:
|
|
2386
|
+
"bg-color": a(ve).NeutralGray100,
|
|
2387
|
+
"text-color": a(ve).TypoSecondary,
|
|
2388
|
+
variant: a(be).Primary,
|
|
2389
|
+
onClick: K
|
|
2373
2390
|
}, null, 8, ["label", "bg-color", "text-color", "variant"]),
|
|
2374
|
-
|
|
2391
|
+
y(s, {
|
|
2375
2392
|
label: a(t)("menu.products.actions.import"),
|
|
2376
|
-
"bg-color": a(
|
|
2377
|
-
"text-color": a(
|
|
2378
|
-
variant: a(
|
|
2379
|
-
onClick:
|
|
2393
|
+
"bg-color": a(ve).NeutralGray100,
|
|
2394
|
+
"text-color": a(ve).TypoSecondary,
|
|
2395
|
+
variant: a(be).Primary,
|
|
2396
|
+
onClick: S
|
|
2380
2397
|
}, null, 8, ["label", "bg-color", "text-color", "variant"])
|
|
2381
2398
|
], 64)) : M("", !0),
|
|
2382
|
-
|
|
2399
|
+
O.value && !e.catalogPage && R.value ? (o(), F(d, {
|
|
2383
2400
|
key: 2,
|
|
2384
|
-
modelValue:
|
|
2385
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
2401
|
+
modelValue: r.value,
|
|
2402
|
+
"onUpdate:modelValue": l[2] || (l[2] = (ie) => r.value = ie),
|
|
2386
2403
|
"dismiss-away": "",
|
|
2387
2404
|
"no-header": "",
|
|
2388
2405
|
"z-index": 1001
|
|
2389
2406
|
}, {
|
|
2390
2407
|
"bottom-sheet-button": A(() => [
|
|
2391
|
-
|
|
2408
|
+
y(s, {
|
|
2392
2409
|
"aria-label": a(t)("menu.products.actions.more"),
|
|
2393
2410
|
icon: "more_vert",
|
|
2394
2411
|
variant: "tertiary",
|
|
2395
|
-
onClick: l[0] || (l[0] =
|
|
2412
|
+
onClick: l[0] || (l[0] = $e((ie) => r.value = !r.value, ["stop"]))
|
|
2396
2413
|
}, null, 8, ["aria-label"])
|
|
2397
2414
|
]),
|
|
2398
2415
|
default: A(() => [
|
|
2399
|
-
|
|
2400
|
-
onClick: l[1] || (l[1] = (
|
|
2416
|
+
i("div", {
|
|
2417
|
+
onClick: l[1] || (l[1] = (ie) => r.value = !1)
|
|
2401
2418
|
}, [
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2419
|
+
(o(!0), f(Q, null, ue([
|
|
2420
|
+
{
|
|
2421
|
+
label: a(t)("menu.products.actions.export"),
|
|
2422
|
+
run: K
|
|
2423
|
+
},
|
|
2424
|
+
{
|
|
2425
|
+
label: a(t)("menu.products.actions.import"),
|
|
2426
|
+
run: S
|
|
2427
|
+
}
|
|
2428
|
+
], (ie) => (o(), f("div", {
|
|
2429
|
+
key: ie.label,
|
|
2430
|
+
class: "py-8 px-12 hover:bg-fm-color-neutral-gray-100",
|
|
2431
|
+
"data-test": "product-sheet-item",
|
|
2432
|
+
onClick: ie.run
|
|
2433
|
+
}, [
|
|
2434
|
+
i("div", mo, L(ie.label), 1)
|
|
2435
|
+
], 8, co))), 128))
|
|
2410
2436
|
])
|
|
2411
2437
|
]),
|
|
2412
2438
|
_: 1
|
|
2413
2439
|
}, 8, ["modelValue"])) : M("", !0),
|
|
2414
|
-
!
|
|
2440
|
+
!O.value && !W.value && !e.catalogPage && g.value.length ? (o(), F(de, {
|
|
2415
2441
|
key: 3,
|
|
2416
2442
|
"close-on-click": ""
|
|
2417
2443
|
}, {
|
|
2418
2444
|
"menu-button": A(() => [
|
|
2419
|
-
|
|
2445
|
+
y(s, {
|
|
2420
2446
|
label: a(t)("menu.products.actions.more"),
|
|
2421
2447
|
"append-icon": "keyboard_arrow_down",
|
|
2422
|
-
"bg-color": a(
|
|
2423
|
-
"text-color": a(
|
|
2424
|
-
variant: a(
|
|
2448
|
+
"bg-color": a(ve).NeutralGray100,
|
|
2449
|
+
"text-color": a(ve).TypoSecondary,
|
|
2450
|
+
variant: a(be).Primary
|
|
2425
2451
|
}, null, 8, ["label", "bg-color", "text-color", "variant"])
|
|
2426
2452
|
]),
|
|
2427
2453
|
default: A(() => [
|
|
2428
|
-
(o(!0),
|
|
2429
|
-
key:
|
|
2454
|
+
(o(!0), f(Q, null, ue(g.value, (ie) => (o(), F(P, {
|
|
2455
|
+
key: ie.id,
|
|
2430
2456
|
class: "px-16 py-8",
|
|
2431
|
-
label:
|
|
2432
|
-
onClick:
|
|
2457
|
+
label: ie.label,
|
|
2458
|
+
onClick: ie.run
|
|
2433
2459
|
}, null, 8, ["label", "onClick"]))), 128))
|
|
2434
2460
|
]),
|
|
2435
2461
|
_: 1
|
|
2436
2462
|
})) : M("", !0),
|
|
2437
|
-
|
|
2438
|
-
class:
|
|
2463
|
+
i("div", {
|
|
2464
|
+
class: fe(I.value ? Oo : "contents")
|
|
2439
2465
|
}, [
|
|
2440
|
-
|
|
2466
|
+
m.value && !ke.value && m.value.create.state !== "hidden" ? (o(), F(s, {
|
|
2441
2467
|
key: 0,
|
|
2442
|
-
disabled:
|
|
2468
|
+
disabled: m.value.create.state !== "allowed",
|
|
2443
2469
|
label: a(t)("menu.products.actions.add"),
|
|
2444
2470
|
"prepend-icon": "add",
|
|
2445
|
-
variant:
|
|
2471
|
+
variant: B.value,
|
|
2446
2472
|
onClick: nt
|
|
2447
|
-
}, null, 8, ["disabled", "label", "variant"])) :
|
|
2473
|
+
}, null, 8, ["disabled", "label", "variant"])) : m.value && (!ke.value || e.catalogPage) && m.value.link.state === "allowed" ? (o(), F(s, {
|
|
2448
2474
|
key: 1,
|
|
2449
2475
|
label: a(t)("menu.products.actions.link"),
|
|
2450
2476
|
"prepend-icon": "link",
|
|
2451
|
-
variant:
|
|
2452
|
-
onClick:
|
|
2453
|
-
}, null, 8, ["label", "variant"])) :
|
|
2477
|
+
variant: B.value,
|
|
2478
|
+
onClick: H
|
|
2479
|
+
}, null, 8, ["label", "variant"])) : m.value && (!ke.value || e.catalogPage) && m.value.applyScheduler.state === "allowed" ? (o(), F(s, {
|
|
2454
2480
|
key: 2,
|
|
2455
2481
|
label: a(t)("menu.products.actions.apply_scheduler"),
|
|
2456
|
-
variant:
|
|
2457
|
-
onClick:
|
|
2482
|
+
variant: B.value,
|
|
2483
|
+
onClick: H
|
|
2458
2484
|
}, null, 8, ["label", "variant"])) : M("", !0)
|
|
2459
2485
|
], 2)
|
|
2460
2486
|
])
|
|
2461
2487
|
])
|
|
2462
2488
|
]),
|
|
2463
2489
|
default: A(() => {
|
|
2464
|
-
var
|
|
2490
|
+
var ie, vt, ft, bt, yt, gt, _t, ht, xt, kt;
|
|
2465
2491
|
return [
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2492
|
+
qe(e.$slots, "banner"),
|
|
2493
|
+
qe(e.$slots, "navigation"),
|
|
2494
|
+
a(j).status === "error" ? (o(), f("p", po, L(a(x)(a(j).error.message)), 1)) : a(j).status === "unavailable" ? (o(), f("p", vo, L(a(x)(a(j).reason)), 1)) : a(j).status === "loading" ? (o(), f("div", fo, [
|
|
2495
|
+
y(me, { size: "lg" })
|
|
2496
|
+
])) : m.value ? (o(), f("div", {
|
|
2497
|
+
key: 3,
|
|
2498
|
+
class: fe(["relative flex flex-col flex-1 min-h-0 overflow-hidden pt-16 xs:pt-8", O.value && We.value ? "space-y-24" : "space-y-8"])
|
|
2499
|
+
}, [
|
|
2500
|
+
i("div", bo, [
|
|
2501
|
+
i("div", {
|
|
2502
|
+
class: fe(["flex items-center gap-8 xs:order-3", We.value ? "xs:px-16" : "xs:px-8"]),
|
|
2503
|
+
"data-test": "product-scope-chips"
|
|
2504
|
+
}, [
|
|
2505
|
+
y(It, {
|
|
2473
2506
|
options: it.value,
|
|
2474
|
-
"model-value": ((
|
|
2475
|
-
"selected-values": ((vt =
|
|
2507
|
+
"model-value": ((ie = m.value) == null ? void 0 : ie.categoryFilterId) ?? null,
|
|
2508
|
+
"selected-values": ((vt = m.value) == null ? void 0 : vt.categoryFilterIds) ?? null,
|
|
2476
2509
|
title: a(t)("menu.category.selector.title", {
|
|
2477
|
-
label: !((bt = (ft =
|
|
2478
|
-
(
|
|
2479
|
-
var
|
|
2480
|
-
return
|
|
2510
|
+
label: !((bt = (ft = m.value) == null ? void 0 : ft.categoryFilterIds) != null && bt.length) || m.value.categoryFilterIds.length === m.value.categoryOptions.length ? a(t)("menu.category.selector.all") : m.value.categoryFilterIds.length === 1 ? (yt = it.value.find(
|
|
2511
|
+
(h) => {
|
|
2512
|
+
var ae;
|
|
2513
|
+
return h.value === ((ae = m.value) == null ? void 0 : ae.categoryFilterId);
|
|
2481
2514
|
}
|
|
2482
|
-
)) == null ? void 0 : yt.label : a(
|
|
2515
|
+
)) == null ? void 0 : yt.label : a($)(m.value.categoryFilterIds.length)
|
|
2483
2516
|
}),
|
|
2484
2517
|
checkbox: "",
|
|
2485
|
-
"onUpdate:selectedValues": l[3] || (l[3] = (
|
|
2518
|
+
"onUpdate:selectedValues": l[3] || (l[3] = (h) => e.sdk.item.filterByCategories(h))
|
|
2486
2519
|
}, {
|
|
2487
2520
|
default: A(() => {
|
|
2488
|
-
var
|
|
2521
|
+
var h;
|
|
2489
2522
|
return [
|
|
2490
|
-
(
|
|
2523
|
+
(h = m.value) != null && h.attributeOptions.length ? (o(), f("button", {
|
|
2491
2524
|
key: 0,
|
|
2492
2525
|
type: "button",
|
|
2493
2526
|
class: "pl-8 flex items-center justify-center border-l border-fm-color-neutral-gray-200",
|
|
2494
2527
|
"aria-label": a(t)("menu.product.attributes.filter"),
|
|
2495
|
-
onClick:
|
|
2528
|
+
onClick: $e(se, ["stop"])
|
|
2496
2529
|
}, [
|
|
2497
|
-
|
|
2530
|
+
y(Yt, {
|
|
2498
2531
|
name: "filter_alt",
|
|
2499
2532
|
outline: "",
|
|
2500
2533
|
color: "neutral-gray-400",
|
|
2501
2534
|
size: "sm"
|
|
2502
2535
|
})
|
|
2503
|
-
], 8,
|
|
2536
|
+
], 8, yo)) : M("", !0)
|
|
2504
2537
|
];
|
|
2505
2538
|
}),
|
|
2506
2539
|
_: 1
|
|
2507
2540
|
}, 8, ["options", "model-value", "selected-values", "title"]),
|
|
2508
|
-
|
|
2541
|
+
m.value && m.value.scope.schedulerSelector.state === "allowed" ? (o(), F(It, {
|
|
2509
2542
|
key: 0,
|
|
2510
|
-
options:
|
|
2511
|
-
"model-value":
|
|
2543
|
+
options: Ht.value,
|
|
2544
|
+
"model-value": m.value.scope.schedulerId,
|
|
2512
2545
|
title: a(t)("menu.common.labels.scheduler_title", {
|
|
2513
|
-
label:
|
|
2546
|
+
label: m.value.scope.schedulerLabel ?? a(t)("menu.common.labels.summary")
|
|
2514
2547
|
}),
|
|
2515
|
-
"onUpdate:modelValue": l[4] || (l[4] = (
|
|
2516
|
-
var
|
|
2548
|
+
"onUpdate:modelValue": l[4] || (l[4] = (h) => {
|
|
2549
|
+
var ae;
|
|
2517
2550
|
return e.sdk.item.selectScope({
|
|
2518
|
-
catalogId: ((
|
|
2519
|
-
schedulerId:
|
|
2551
|
+
catalogId: ((ae = m.value) == null ? void 0 : ae.scope.catalogId) ?? null,
|
|
2552
|
+
schedulerId: h
|
|
2520
2553
|
});
|
|
2521
2554
|
})
|
|
2522
2555
|
}, null, 8, ["options", "model-value", "title"])) : M("", !0),
|
|
2523
|
-
|
|
2524
|
-
filter: (gt =
|
|
2525
|
-
onConfirm: l[5] || (l[5] = (
|
|
2556
|
+
y(il, {
|
|
2557
|
+
filter: (gt = m.value) == null ? void 0 : gt.restaurantFilter,
|
|
2558
|
+
onConfirm: l[5] || (l[5] = (h) => e.sdk.item.setRestaurantFilter(h))
|
|
2526
2559
|
}, null, 8, ["filter"])
|
|
2527
|
-
]),
|
|
2528
|
-
|
|
2529
|
-
|
|
2560
|
+
], 2),
|
|
2561
|
+
O.value && !We.value ? (o(), f("div", go)) : M("", !0),
|
|
2562
|
+
!ke.value || (_t = m.value) != null && _t.emptyState.showSearch ? (o(), f("div", _o, [
|
|
2563
|
+
y(Jt, {
|
|
2530
2564
|
autofocus: "",
|
|
2531
|
-
"model-value": ((ht =
|
|
2565
|
+
"model-value": ((ht = m.value) == null ? void 0 : ht.query) ?? "",
|
|
2532
2566
|
placeholder: a(t)("menu.product.table.search.placeholder"),
|
|
2533
2567
|
"aria-label": a(t)("menu.common.labels.search"),
|
|
2534
|
-
"onUpdate:modelValue": l[6] || (l[6] = (
|
|
2535
|
-
formatPrice: (
|
|
2568
|
+
"onUpdate:modelValue": l[6] || (l[6] = (h) => u.sdk.item.search(String(h ?? ""), {
|
|
2569
|
+
formatPrice: (ae) => ae ? a($)(ae.amount, {
|
|
2536
2570
|
style: "currency",
|
|
2537
|
-
currency:
|
|
2571
|
+
currency: ae.currency,
|
|
2538
2572
|
currencyDisplay: "narrowSymbol"
|
|
2539
2573
|
}) : "",
|
|
2540
|
-
labelOrderFrom: (
|
|
2574
|
+
labelOrderFrom: (ae) => a(t)(a(Ie)[ae])
|
|
2541
2575
|
}))
|
|
2542
2576
|
}, null, 8, ["model-value", "placeholder", "aria-label"])
|
|
2543
2577
|
])) : M("", !0)
|
|
2544
2578
|
]),
|
|
2545
|
-
|
|
2579
|
+
ke.value && m.value ? (o(), F(a(vl), {
|
|
2546
2580
|
key: 0,
|
|
2547
|
-
title: a(
|
|
2548
|
-
subtitle: a(
|
|
2581
|
+
title: a(x)(m.value.emptyState.title),
|
|
2582
|
+
subtitle: a(x)(m.value.emptyState.subtitle)
|
|
2549
2583
|
}, {
|
|
2550
2584
|
action: A(() => [
|
|
2551
|
-
|
|
2552
|
-
|
|
2585
|
+
i("div", ho, [
|
|
2586
|
+
m.value.create.state === "allowed" ? (o(), F(s, {
|
|
2553
2587
|
key: 0,
|
|
2554
2588
|
label: a(t)("menu.product.table.empty.actions.add"),
|
|
2555
2589
|
"prepend-icon": "add",
|
|
2556
2590
|
onClick: nt
|
|
2557
|
-
}, null, 8, ["label"])) :
|
|
2591
|
+
}, null, 8, ["label"])) : m.value.link.state === "allowed" ? (o(), F(s, {
|
|
2558
2592
|
key: 1,
|
|
2559
2593
|
label: a(t)("menu.common.actions.link_product"),
|
|
2560
2594
|
"prepend-icon": "link",
|
|
2561
|
-
onClick:
|
|
2562
|
-
}, null, 8, ["label"])) :
|
|
2595
|
+
onClick: H
|
|
2596
|
+
}, null, 8, ["label"])) : m.value.applyScheduler.state === "allowed" ? (o(), F(s, {
|
|
2563
2597
|
key: 2,
|
|
2564
2598
|
label: a(t)("menu.common.actions.apply_product"),
|
|
2565
|
-
onClick:
|
|
2599
|
+
onClick: H
|
|
2566
2600
|
}, null, 8, ["label"])) : M("", !0),
|
|
2567
|
-
|
|
2601
|
+
m.value.emptyState.showImport && R.value ? (o(), F(s, {
|
|
2568
2602
|
key: 3,
|
|
2569
2603
|
label: a(t)("menu.product.table.empty.actions.import"),
|
|
2570
2604
|
"prepend-icon": "download",
|
|
2571
|
-
variant:
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2605
|
+
variant: a(be).Primary,
|
|
2606
|
+
"bg-color": a(ve).NeutralGray100,
|
|
2607
|
+
"text-color": a(ve).NeutralGray400,
|
|
2608
|
+
disabled: !c.value,
|
|
2609
|
+
onClick: S
|
|
2610
|
+
}, null, 8, ["label", "variant", "bg-color", "text-color", "disabled"])) : M("", !0)
|
|
2575
2611
|
])
|
|
2576
2612
|
]),
|
|
2577
2613
|
_: 1
|
|
2578
2614
|
}, 8, ["title", "subtitle"])) : M("", !0),
|
|
2579
|
-
|
|
2615
|
+
k.value && m.value ? (o(), F(rl, {
|
|
2580
2616
|
key: 1,
|
|
2581
2617
|
ref_key: "filterControl",
|
|
2582
|
-
ref:
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2618
|
+
ref: X,
|
|
2619
|
+
class: "xs:px-8",
|
|
2620
|
+
attributes: m.value.attributeOptions,
|
|
2621
|
+
rule: m.value.attributeRule,
|
|
2622
|
+
"onUpdate:rule": l[7] || (l[7] = (h) => e.sdk.item.setAttributeFilter(h))
|
|
2586
2623
|
}, null, 8, ["attributes", "rule"])) : M("", !0),
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
count:
|
|
2624
|
+
!O.value && ze.value.length > 0 ? (o(), f("div", xo, [
|
|
2625
|
+
i("p", ko, L(a(t)("menu.product.table.selection.count", {
|
|
2626
|
+
count: ze.value.length
|
|
2590
2627
|
})), 1),
|
|
2591
|
-
|
|
2628
|
+
y(s, {
|
|
2592
2629
|
label: a(t)("menu.product.table.selection.actions.deselect_all"),
|
|
2593
2630
|
variant: "plain",
|
|
2594
|
-
onClick:
|
|
2631
|
+
onClick: Xe
|
|
2595
2632
|
}, null, 8, ["label"]),
|
|
2596
2633
|
Le.value.state !== "hidden" ? (o(), F(s, {
|
|
2597
2634
|
key: 0,
|
|
@@ -2603,136 +2640,136 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2603
2640
|
"border-color": "system-error-300",
|
|
2604
2641
|
"text-color": "system-error-300",
|
|
2605
2642
|
disabled: Le.value.state !== "allowed",
|
|
2606
|
-
title: Le.value.state === "disabled" ? a(
|
|
2607
|
-
onClick:
|
|
2643
|
+
title: Le.value.state === "disabled" ? a(x)(Le.value.reason) : void 0,
|
|
2644
|
+
onClick: qt
|
|
2608
2645
|
}, null, 8, ["label", "aria-label", "disabled", "title"])) : M("", !0)
|
|
2609
2646
|
])) : M("", !0),
|
|
2610
|
-
!
|
|
2647
|
+
!O.value && !ke.value ? (o(), F(dt, {
|
|
2611
2648
|
key: 3,
|
|
2612
|
-
modelValue:
|
|
2613
|
-
"onUpdate:modelValue": l[8] || (l[8] = (
|
|
2649
|
+
modelValue: De.value,
|
|
2650
|
+
"onUpdate:modelValue": l[8] || (l[8] = (h) => De.value = h),
|
|
2614
2651
|
class: "min-h-0 flex-1",
|
|
2615
|
-
"column-defs":
|
|
2616
|
-
"row-data":
|
|
2617
|
-
"page-size":
|
|
2618
|
-
"get-row-id": (
|
|
2652
|
+
"column-defs": Wt.value,
|
|
2653
|
+
"row-data": Nt.value,
|
|
2654
|
+
"page-size": Pe.value.length,
|
|
2655
|
+
"get-row-id": (h) => h.id,
|
|
2619
2656
|
selection: "multiple",
|
|
2620
|
-
virtual:
|
|
2657
|
+
virtual: Pe.value.length > Mt,
|
|
2621
2658
|
"virtual-row-height": 91,
|
|
2622
2659
|
"hide-footer": "",
|
|
2623
2660
|
"pin-header-row": "",
|
|
2624
2661
|
"shrink-at": !1,
|
|
2625
|
-
onRowClick: l[9] || (l[9] = (
|
|
2626
|
-
}, null, 8, ["modelValue", "column-defs", "row-data", "page-size", "get-row-id", "virtual"])) :
|
|
2627
|
-
(o(!0),
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
}, 1024)) : M("", !0)
|
|
2662
|
+
onRowClick: l[9] || (l[9] = (h) => st(h.original))
|
|
2663
|
+
}, null, 8, ["modelValue", "column-defs", "row-data", "page-size", "get-row-id", "virtual"])) : ke.value ? M("", !0) : (o(), f("div", wo, [
|
|
2664
|
+
(o(!0), f(Q, null, ue(Pe.value, (h) => (o(), f("div", {
|
|
2665
|
+
key: h.id,
|
|
2666
|
+
class: "max-w-full py-12 px-16 flex items-center gap-16 cursor-pointer",
|
|
2667
|
+
"data-test": "product-phone-row",
|
|
2668
|
+
onClick: (ae) => st(h)
|
|
2669
|
+
}, [
|
|
2670
|
+
i("div", Fo, [
|
|
2671
|
+
y(Pt, {
|
|
2672
|
+
src: h.thumbnailUrl,
|
|
2673
|
+
alt: h.name
|
|
2674
|
+
}, null, 8, ["src", "alt"]),
|
|
2675
|
+
i("div", $o, [
|
|
2676
|
+
i("div", So, [
|
|
2677
|
+
i("p", Io, L(h.name), 1),
|
|
2678
|
+
h.orderFrom ? (o(), F(Fl, {
|
|
2679
|
+
key: 0,
|
|
2680
|
+
"order-from": h.orderFrom
|
|
2681
|
+
}, null, 8, ["order-from"])) : M("", !0)
|
|
2646
2682
|
]),
|
|
2647
|
-
|
|
2648
|
-
|
|
2683
|
+
i("p", Vo, L(jt(h)), 1),
|
|
2684
|
+
i("p", Po, L(a(t)("menu.common.labels.a11y_labelled_name", {
|
|
2649
2685
|
label: a(t)("menu.product.table.columns.code"),
|
|
2650
|
-
name:
|
|
2686
|
+
name: h.code || a(t)("menu.catalog.empty_value")
|
|
2651
2687
|
})), 1),
|
|
2652
|
-
|
|
2688
|
+
y(Ge, {
|
|
2653
2689
|
kind: "category",
|
|
2654
|
-
chips: ct(
|
|
2655
|
-
key:
|
|
2656
|
-
label:
|
|
2690
|
+
chips: ct(h).map((ae) => ({
|
|
2691
|
+
key: ae,
|
|
2692
|
+
label: ae
|
|
2657
2693
|
}))
|
|
2658
2694
|
}, null, 8, ["chips"]),
|
|
2659
|
-
|
|
2695
|
+
y(Ge, {
|
|
2660
2696
|
kind: "tagging",
|
|
2661
|
-
chips:
|
|
2697
|
+
chips: h.attributeTags
|
|
2662
2698
|
}, null, 8, ["chips"])
|
|
2663
|
-
])
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
}
|
|
2676
|
-
|
|
2677
|
-
|
|
2699
|
+
])
|
|
2700
|
+
]),
|
|
2701
|
+
h.remove.state !== "hidden" ? (o(), F(s, {
|
|
2702
|
+
key: 0,
|
|
2703
|
+
disabled: h.remove.state !== "allowed",
|
|
2704
|
+
title: h.remove.state === "disabled" ? a(x)(h.remove.reason) : void 0,
|
|
2705
|
+
"prepend-icon": "delete",
|
|
2706
|
+
variant: "tertiary",
|
|
2707
|
+
"text-color": a(ve).NeutralGray400,
|
|
2708
|
+
"aria-label": a(t)("menu.common.labels.a11y_labelled_name", {
|
|
2709
|
+
label: a(t)("menu.common.actions.remove"),
|
|
2710
|
+
name: h.name
|
|
2711
|
+
}),
|
|
2712
|
+
onClick: $e((ae) => rt(h), ["stop"])
|
|
2713
|
+
}, null, 8, ["disabled", "title", "text-color", "aria-label", "onClick"])) : M("", !0)
|
|
2714
|
+
], 8, Co))), 128))
|
|
2678
2715
|
])),
|
|
2679
|
-
a(
|
|
2680
|
-
|
|
2716
|
+
a(j).status === "ready" && a(j).stale ? (o(), f("div", Lo, [
|
|
2717
|
+
y(me, { size: "lg" })
|
|
2681
2718
|
])) : M("", !0)
|
|
2682
|
-
])) : M("", !0),
|
|
2683
|
-
|
|
2684
|
-
modelValue:
|
|
2685
|
-
"onUpdate:modelValue": l[10] || (l[10] = (
|
|
2686
|
-
catalogue:
|
|
2687
|
-
"selected-product-ids": ((
|
|
2688
|
-
"rules-session":
|
|
2689
|
-
"selection-session":
|
|
2690
|
-
"rules-view":
|
|
2719
|
+
], 2)) : M("", !0),
|
|
2720
|
+
y(sl, {
|
|
2721
|
+
modelValue: J.value,
|
|
2722
|
+
"onUpdate:modelValue": l[10] || (l[10] = (h) => J.value = h),
|
|
2723
|
+
catalogue: V.value,
|
|
2724
|
+
"selected-product-ids": ((xt = m.value) == null ? void 0 : xt.availableItemIds) ?? [],
|
|
2725
|
+
"rules-session": w.value,
|
|
2726
|
+
"selection-session": N.value,
|
|
2727
|
+
"rules-view": le.value.status === "ready" ? le.value.value : null,
|
|
2691
2728
|
title: a(t)("menu.link_product.title"),
|
|
2692
|
-
onSubmit:
|
|
2693
|
-
onSubmitRules:
|
|
2729
|
+
onSubmit: re,
|
|
2730
|
+
onSubmitRules: Ve
|
|
2694
2731
|
}, null, 8, ["modelValue", "catalogue", "selected-product-ids", "rules-session", "selection-session", "rules-view", "title"]),
|
|
2695
|
-
|
|
2696
|
-
open:
|
|
2697
|
-
"onUpdate:open": l[11] || (l[11] = (
|
|
2732
|
+
y(_l, {
|
|
2733
|
+
open: Se.value,
|
|
2734
|
+
"onUpdate:open": l[11] || (l[11] = (h) => Se.value = h),
|
|
2698
2735
|
sdk: e.sdk,
|
|
2699
|
-
session:
|
|
2736
|
+
session: ye.value,
|
|
2700
2737
|
validation: a(at),
|
|
2701
2738
|
view: Oe.value,
|
|
2702
|
-
onSelectScope:
|
|
2703
|
-
onSubmit:
|
|
2739
|
+
onSelectScope: Kt,
|
|
2740
|
+
onSubmit: Bt
|
|
2704
2741
|
}, null, 8, ["open", "sdk", "session", "validation", "view"]),
|
|
2705
|
-
|
|
2706
|
-
show:
|
|
2742
|
+
y(He, {
|
|
2743
|
+
show: Ye.value && !O.value,
|
|
2707
2744
|
title: a(t)("menu.product.table.bulk_edit.title"),
|
|
2708
2745
|
"primary-action": {
|
|
2709
2746
|
label: a(t)("menu.product.table.bulk_edit.actions.save"),
|
|
2710
|
-
disabled: ((
|
|
2747
|
+
disabled: ((kt = ne.value) == null ? void 0 : kt.submit.state) !== "allowed"
|
|
2711
2748
|
},
|
|
2712
2749
|
"secondary-actions": [
|
|
2713
2750
|
{
|
|
2714
2751
|
label: a(t)("menu.product.table.bulk_edit.actions.reset_all"),
|
|
2715
2752
|
click: () => {
|
|
2716
|
-
var
|
|
2717
|
-
return (
|
|
2753
|
+
var h;
|
|
2754
|
+
return (h = ce.value) == null ? void 0 : h.reset();
|
|
2718
2755
|
}
|
|
2719
2756
|
},
|
|
2720
2757
|
{ label: a(t)("menu.common.actions.cancel"), click: ot }
|
|
2721
2758
|
],
|
|
2722
|
-
onOnPrimary:
|
|
2759
|
+
onOnPrimary: zt,
|
|
2723
2760
|
onOnCancel: ot
|
|
2724
2761
|
}, {
|
|
2725
2762
|
default: A(() => {
|
|
2726
|
-
var
|
|
2763
|
+
var h, ae, wt;
|
|
2727
2764
|
return [
|
|
2728
|
-
|
|
2729
|
-
|
|
2765
|
+
i("div", Eo, [
|
|
2766
|
+
y(dt, {
|
|
2730
2767
|
class: "min-w-[1280px]",
|
|
2731
|
-
"column-defs":
|
|
2732
|
-
"row-data": [...((
|
|
2733
|
-
"page-size": ((
|
|
2734
|
-
"get-row-id": (
|
|
2735
|
-
virtual: (((
|
|
2768
|
+
"column-defs": Xt.value,
|
|
2769
|
+
"row-data": [...((h = ne.value) == null ? void 0 : h.rows) ?? []],
|
|
2770
|
+
"page-size": ((ae = ne.value) == null ? void 0 : ae.rows.length) ?? 0,
|
|
2771
|
+
"get-row-id": (Qt) => Qt.id,
|
|
2772
|
+
virtual: (((wt = ne.value) == null ? void 0 : wt.rows.length) ?? 0) > Mt,
|
|
2736
2773
|
"virtual-row-height": 48,
|
|
2737
2774
|
"hide-footer": "",
|
|
2738
2775
|
"pin-header-row": "",
|
|
@@ -2743,14 +2780,14 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2743
2780
|
}),
|
|
2744
2781
|
_: 1
|
|
2745
2782
|
}, 8, ["show", "title", "primary-action", "secondary-actions"]),
|
|
2746
|
-
|
|
2747
|
-
modelValue:
|
|
2748
|
-
"onUpdate:modelValue": l[12] || (l[12] = (
|
|
2749
|
-
state:
|
|
2783
|
+
y(Gl, {
|
|
2784
|
+
modelValue: Be.value,
|
|
2785
|
+
"onUpdate:modelValue": l[12] || (l[12] = (h) => Be.value = h),
|
|
2786
|
+
state: Qe.value
|
|
2750
2787
|
}, null, 8, ["modelValue", "state"]),
|
|
2751
|
-
|
|
2788
|
+
y(oo, {
|
|
2752
2789
|
ref_key: "importExport",
|
|
2753
|
-
ref:
|
|
2790
|
+
ref: p,
|
|
2754
2791
|
sdk: e.sdk
|
|
2755
2792
|
}, null, 8, ["sdk"])
|
|
2756
2793
|
];
|
|
@@ -2761,5 +2798,5 @@ const ya = { class: "py-16 flex flex-col w-full h-full" }, ga = { class: "border
|
|
|
2761
2798
|
}
|
|
2762
2799
|
});
|
|
2763
2800
|
export {
|
|
2764
|
-
|
|
2801
|
+
on as _
|
|
2765
2802
|
};
|