@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,55 +1,53 @@
|
|
|
1
|
-
import { defineComponent as ae, computed as
|
|
1
|
+
import { defineComponent as ae, computed as v, ref as ve, shallowRef as X, h as pe, withModifiers as Y, onUnmounted as be, resolveComponent as h, openBlock as m, createBlock as w, unref as e, withCtx as S, createElementBlock as p, toDisplayString as x, Fragment as j, createElementVNode as c, createVNode as r, renderList as Z, createCommentVNode as V, mergeProps as I } from "vue";
|
|
2
2
|
import { useI18n as fe } from "@feedmepos/mf-common";
|
|
3
3
|
import { useDialog as ye, useBreakpoints as _e, components as ee, FmButtonVariant as ge } from "@feedmepos/ui-library";
|
|
4
|
-
import { _ as ke } from "./
|
|
5
|
-
import { _ as he } from "./
|
|
6
|
-
import { _ as xe } from "./
|
|
7
|
-
import {
|
|
8
|
-
import { u as Ce } from "./
|
|
9
|
-
import {
|
|
4
|
+
import { _ as ke } from "./PhoneFab.vue_vue_type_script_setup_true_lang-CipbTqbp.js";
|
|
5
|
+
import { _ as he } from "./index.vue_vue_type_script_setup_true_lang-CGPDazqs.js";
|
|
6
|
+
import { _ as xe } from "./ListCountTag.vue_vue_type_script_setup_true_lang-0bjk8Aly.js";
|
|
7
|
+
import { _ as we } from "./PageLayout.vue_vue_type_script_setup_true_lang-DrhsROXo.js";
|
|
8
|
+
import { u as Ce } from "./useActionFeedback-CElXij1W.js";
|
|
9
|
+
import { u as Fe } from "./useEditorValidation-Ctef5Bxt.js";
|
|
10
|
+
import { b as Se, u as $e, a as Me } from "./provide-BGLSDsuJ.js";
|
|
10
11
|
const Ve = {
|
|
11
12
|
key: 0,
|
|
12
13
|
class: "flex-1 flex justify-between gap-8 pl-8"
|
|
13
|
-
},
|
|
14
|
+
}, Ie = { class: "flex items-center" }, Ne = {
|
|
14
15
|
key: 0,
|
|
15
16
|
role: "alert",
|
|
16
17
|
class: "text-fm-color-typo-secondary"
|
|
17
|
-
},
|
|
18
|
+
}, Ue = {
|
|
18
19
|
key: 1,
|
|
19
20
|
class: "text-fm-color-typo-secondary"
|
|
20
|
-
},
|
|
21
|
+
}, Be = { class: "flex justify-end items-center" }, Ee = { class: "w-[320px] xs:w-full xs:px-16 xs:mt-8" }, je = {
|
|
21
22
|
key: 1,
|
|
22
23
|
class: "flex-1 min-h-0 overflow-scroll divide-y divide-fm-color-neutral-gray-100 pb-64"
|
|
23
|
-
},
|
|
24
|
-
key: 2,
|
|
25
|
-
class: "fixed right-16 bottom-[72px] z-[100]"
|
|
26
|
-
}, Oe = { class: "fm-typo-en-title-md-600" }, Re = { class: "pt-8 space-y-40" }, Te = { class: "flex flex-row gap-16" }, Le = { class: "flex justify-between items-center" }, Ke = { class: "fm-typo-en-body-md-600" }, qe = { class: "flex flex-row gap-8" }, Qe = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ge = { class: "flex gap-8 items-center justify-start" }, He = /* @__PURE__ */ ae({
|
|
24
|
+
}, Ae = ["onClick"], Pe = { class: "min-w-0 flex-1" }, ze = { class: "fm-typo-en-body-lg-600 mb-4 break-words" }, De = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary break-words" }, Oe = { class: "fm-typo-en-title-md-600" }, Re = { class: "pt-8 space-y-40" }, Te = { class: "flex flex-row gap-16" }, Le = { class: "flex justify-between items-center" }, Ke = { class: "fm-typo-en-body-md-600" }, qe = { class: "flex flex-row gap-8" }, Qe = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ge = { class: "flex gap-8 items-center justify-start" }, He = /* @__PURE__ */ ae({
|
|
27
25
|
__name: "UnitList",
|
|
28
26
|
props: {
|
|
29
27
|
sdk: {}
|
|
30
28
|
},
|
|
31
29
|
setup(A) {
|
|
32
|
-
const _ = A, { t: a } = fe(),
|
|
30
|
+
const _ = A, { t: a } = fe(), C = Se(), P = ye(), { run: z } = Ce(), b = $e(_.sdk.unit.list), d = v(
|
|
33
31
|
() => b.value.status === "ready" ? b.value.value : null
|
|
34
|
-
), le =
|
|
32
|
+
), le = v(() => {
|
|
35
33
|
var l;
|
|
36
34
|
return ((l = d.value) == null ? void 0 : l.query) ?? "";
|
|
37
|
-
}), { breakpoints: te } = _e(), N =
|
|
35
|
+
}), { breakpoints: te } = _e(), N = v(() => te.value.xs), se = v(() => {
|
|
38
36
|
var l;
|
|
39
37
|
return [...((l = d.value) == null ? void 0 : l.rows) ?? []];
|
|
40
|
-
}), f = ve(!1), i = X(_.sdk.unit.editor()),
|
|
38
|
+
}), f = ve(!1), i = X(_.sdk.unit.editor()), $ = X(
|
|
41
39
|
i.value.get()
|
|
42
40
|
);
|
|
43
41
|
let U = i.value.subscribe(
|
|
44
42
|
(l) => {
|
|
45
|
-
|
|
43
|
+
$.value = l;
|
|
46
44
|
}
|
|
47
45
|
);
|
|
48
|
-
const o =
|
|
49
|
-
() =>
|
|
50
|
-
), y =
|
|
46
|
+
const o = v(
|
|
47
|
+
() => $.value.status === "ready" ? $.value.value : null
|
|
48
|
+
), y = Fe(() => i.value), D = v(
|
|
51
49
|
() => o.value ? y.issue(o.value.fieldIssues, "name") ?? o.value.nameIssue : null
|
|
52
|
-
), O =
|
|
50
|
+
), O = v(
|
|
53
51
|
() => o.value ? y.issue(o.value.fieldIssues, "symbol") ?? o.value.symbolIssue : null
|
|
54
52
|
);
|
|
55
53
|
function R(l) {
|
|
@@ -57,7 +55,7 @@ const Ve = {
|
|
|
57
55
|
const t = l == null ? void 0 : l.match(/^(measurementName|measurementSymbol):(\d+)$/), u = t ? (g = o.value) == null ? void 0 : g.measurements[Number(t[2]) - 1] : void 0;
|
|
58
56
|
return t && u ? `${t[1]}:${u.id}` : l;
|
|
59
57
|
}
|
|
60
|
-
const oe =
|
|
58
|
+
const oe = v(
|
|
61
59
|
() => {
|
|
62
60
|
var l;
|
|
63
61
|
return Object.fromEntries(
|
|
@@ -69,12 +67,12 @@ const Ve = {
|
|
|
69
67
|
);
|
|
70
68
|
function T(l, t, u) {
|
|
71
69
|
const g = y.issue(oe.value, `${t}:${l}`) ?? u;
|
|
72
|
-
return g ? [
|
|
70
|
+
return g ? [C(g)] : [];
|
|
73
71
|
}
|
|
74
72
|
function L(l) {
|
|
75
|
-
U(), i.value.dispose(), i.value = _.sdk.unit.editor(l),
|
|
73
|
+
U(), i.value.dispose(), i.value = _.sdk.unit.editor(l), $.value = i.value.get(), U = i.value.subscribe(
|
|
76
74
|
(t) => {
|
|
77
|
-
|
|
75
|
+
$.value = t;
|
|
78
76
|
}
|
|
79
77
|
);
|
|
80
78
|
}
|
|
@@ -86,7 +84,7 @@ const Ve = {
|
|
|
86
84
|
L(l.id), f.value = !0;
|
|
87
85
|
}
|
|
88
86
|
async function ne() {
|
|
89
|
-
(await
|
|
87
|
+
(await z(
|
|
90
88
|
() => y.submit(async () => {
|
|
91
89
|
const t = await i.value.submit();
|
|
92
90
|
return t.kind === "rejected" ? {
|
|
@@ -119,7 +117,7 @@ const Ve = {
|
|
|
119
117
|
f.value = !1;
|
|
120
118
|
return;
|
|
121
119
|
}
|
|
122
|
-
|
|
120
|
+
P.open({
|
|
123
121
|
title: a("menu.common.dialog.dismiss.title"),
|
|
124
122
|
message: a("menu.common.dialog.dismiss.message"),
|
|
125
123
|
primaryActions: {
|
|
@@ -135,7 +133,7 @@ const Ve = {
|
|
|
135
133
|
});
|
|
136
134
|
}
|
|
137
135
|
function q(l) {
|
|
138
|
-
l.remove.state === "allowed" &&
|
|
136
|
+
l.remove.state === "allowed" && P.open({
|
|
139
137
|
title: a("menu.common.dialog.remove.unit.title"),
|
|
140
138
|
message: a("menu.common.dialog.remove.unit.message", {
|
|
141
139
|
name: l.name
|
|
@@ -150,12 +148,12 @@ const Ve = {
|
|
|
150
148
|
close: !0
|
|
151
149
|
}
|
|
152
150
|
}).onPrimary(async () => {
|
|
153
|
-
await
|
|
151
|
+
await z(() => _.sdk.unit.remove(l.id), {
|
|
154
152
|
successMessage: a("menu.unit.form.removed", { name: l.name })
|
|
155
153
|
});
|
|
156
154
|
});
|
|
157
155
|
}
|
|
158
|
-
const ue =
|
|
156
|
+
const ue = v(() => [
|
|
159
157
|
{
|
|
160
158
|
accessorKey: "name",
|
|
161
159
|
header: () => a("menu.unit.columns.name"),
|
|
@@ -187,37 +185,37 @@ const Ve = {
|
|
|
187
185
|
return be(() => {
|
|
188
186
|
U(), i.value.dispose();
|
|
189
187
|
}), (l, t) => {
|
|
190
|
-
const u = h("FmButton"), g = h("FmCircularProgress"),
|
|
191
|
-
return
|
|
188
|
+
const u = h("FmButton"), g = h("FmCircularProgress"), me = h("FmSearch"), re = h("FmTable"), M = h("FmTextField"), de = h("FmStepperField"), ce = h("FmSideSheet");
|
|
189
|
+
return m(), w(we, {
|
|
192
190
|
"data-visual-root": "unit",
|
|
193
191
|
heading: e(a)("menu.unit.title")
|
|
194
192
|
}, {
|
|
195
|
-
"append-heading":
|
|
196
|
-
e(b).status === "ready" && d.value ? (
|
|
197
|
-
c("div",
|
|
198
|
-
|
|
193
|
+
"append-heading": S(() => [
|
|
194
|
+
e(b).status === "ready" && d.value ? (m(), p("div", Ve, [
|
|
195
|
+
c("div", Ie, [
|
|
196
|
+
r(xe, {
|
|
199
197
|
value: d.value.totalCount
|
|
200
198
|
}, null, 8, ["value"])
|
|
201
199
|
]),
|
|
202
|
-
d.value.totalCount > 0 && !N.value ? (
|
|
200
|
+
d.value.totalCount > 0 && !N.value ? (m(), w(u, {
|
|
203
201
|
key: 0,
|
|
204
202
|
disabled: d.value.create.state !== "allowed",
|
|
205
203
|
label: e(a)("menu.unit.add"),
|
|
206
204
|
"prepend-icon": "add",
|
|
207
205
|
onClick: B
|
|
208
|
-
}, null, 8, ["disabled", "label"])) :
|
|
209
|
-
])) :
|
|
206
|
+
}, null, 8, ["disabled", "label"])) : V("", !0)
|
|
207
|
+
])) : V("", !0)
|
|
210
208
|
]),
|
|
211
|
-
default:
|
|
212
|
-
e(b).status === "error" ? (
|
|
209
|
+
default: S(() => [
|
|
210
|
+
e(b).status === "error" ? (m(), p("p", Ne, x(e(C)(e(b).error.message)), 1)) : e(b).status === "unavailable" ? (m(), p("p", Ue, x(e(C)(e(b).reason)), 1)) : e(b).status === "loading" ? (m(), w(g, { key: 2 })) : d.value && d.value.totalCount === 0 ? (m(), w(e(he), {
|
|
213
211
|
key: 3,
|
|
214
212
|
action: { text: e(a)("menu.unit.add"), callback: B },
|
|
215
213
|
title: e(a)("menu.unit.empty.title"),
|
|
216
214
|
subtitle: e(a)("menu.unit.empty.subtitle")
|
|
217
|
-
}, null, 8, ["action", "title", "subtitle"])) : d.value ? (
|
|
218
|
-
c("div",
|
|
219
|
-
c("div",
|
|
220
|
-
|
|
215
|
+
}, null, 8, ["action", "title", "subtitle"])) : d.value ? (m(), p(j, { key: 4 }, [
|
|
216
|
+
c("div", Be, [
|
|
217
|
+
c("div", Ee, [
|
|
218
|
+
r(me, {
|
|
221
219
|
autofocus: "",
|
|
222
220
|
class: "mb-8",
|
|
223
221
|
"model-value": le.value,
|
|
@@ -226,20 +224,20 @@ const Ve = {
|
|
|
226
224
|
}, null, 8, ["model-value", "placeholder", "onUpdate:modelValue"])
|
|
227
225
|
])
|
|
228
226
|
]),
|
|
229
|
-
N.value ? (
|
|
230
|
-
(
|
|
227
|
+
N.value ? (m(), p("div", je, [
|
|
228
|
+
(m(!0), p(j, null, Z(d.value.rows, (n) => (m(), p("div", {
|
|
231
229
|
key: n.id,
|
|
232
230
|
class: "py-12 px-16 flex space-x-8 items-center",
|
|
233
231
|
onClick: (k) => K(n)
|
|
234
232
|
}, [
|
|
235
|
-
c("div",
|
|
233
|
+
c("div", Pe, [
|
|
236
234
|
c("p", ze, x(n.name), 1),
|
|
237
|
-
c("p",
|
|
235
|
+
c("p", De, x(e(a)("menu.common.labels.a11y_labelled_name", {
|
|
238
236
|
label: e(a)("menu.common.labels.symbol"),
|
|
239
237
|
name: n.symbol
|
|
240
238
|
})), 1)
|
|
241
239
|
]),
|
|
242
|
-
|
|
240
|
+
r(u, {
|
|
243
241
|
class: "shrink-0",
|
|
244
242
|
"aria-label": e(a)("menu.common.actions.delete"),
|
|
245
243
|
disabled: n.remove.state !== "allowed",
|
|
@@ -248,8 +246,8 @@ const Ve = {
|
|
|
248
246
|
variant: "tertiary",
|
|
249
247
|
onClick: Y((k) => q(n), ["stop"])
|
|
250
248
|
}, null, 8, ["aria-label", "disabled", "onClick"])
|
|
251
|
-
], 8,
|
|
252
|
-
])) : (
|
|
249
|
+
], 8, Ae))), 128))
|
|
250
|
+
])) : (m(), w(re, {
|
|
253
251
|
key: 0,
|
|
254
252
|
"column-defs": ue.value,
|
|
255
253
|
"hide-footer": "",
|
|
@@ -259,17 +257,20 @@ const Ve = {
|
|
|
259
257
|
"shrink-at": !1,
|
|
260
258
|
onRowClick: t[0] || (t[0] = (n) => K(n.original))
|
|
261
259
|
}, null, 8, ["column-defs", "page-size", "row-data"])),
|
|
262
|
-
d.value.totalCount > 0 && N.value ? (
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
260
|
+
d.value.totalCount > 0 && N.value ? (m(), w(ke, { key: 2 }, {
|
|
261
|
+
default: S(() => [
|
|
262
|
+
r(u, {
|
|
263
|
+
disabled: d.value.create.state !== "allowed",
|
|
264
|
+
label: e(a)("menu.unit.add"),
|
|
265
|
+
"prepend-icon": "add",
|
|
266
|
+
variant: "fab",
|
|
267
|
+
onClick: B
|
|
268
|
+
}, null, 8, ["disabled", "label"])
|
|
269
|
+
]),
|
|
270
|
+
_: 1
|
|
271
|
+
})) : V("", !0)
|
|
272
|
+
], 64)) : V("", !0),
|
|
273
|
+
r(ce, {
|
|
273
274
|
modelValue: f.value,
|
|
274
275
|
"onUpdate:modelValue": t[4] || (t[4] = (n) => f.value = n),
|
|
275
276
|
"is-container": e(ee).FmForm,
|
|
@@ -277,24 +278,24 @@ const Ve = {
|
|
|
277
278
|
"max-width": 560,
|
|
278
279
|
"onOn:clickedAway": ie
|
|
279
280
|
}, {
|
|
280
|
-
"side-sheet-header":
|
|
281
|
+
"side-sheet-header": S(() => {
|
|
281
282
|
var n;
|
|
282
283
|
return [
|
|
283
284
|
c("p", Oe, x(((n = o.value) == null ? void 0 : n.mode) === "update" ? e(a)("menu.unit.update") : e(a)("menu.unit.add")), 1)
|
|
284
285
|
];
|
|
285
286
|
}),
|
|
286
|
-
"side-sheet-footer":
|
|
287
|
+
"side-sheet-footer": S(() => {
|
|
287
288
|
var n, k;
|
|
288
289
|
return [
|
|
289
290
|
c("div", Ge, [
|
|
290
|
-
|
|
291
|
+
r(u, {
|
|
291
292
|
disabled: ((n = o.value) == null ? void 0 : n.submit.state) !== "allowed",
|
|
292
293
|
label: ((k = o.value) == null ? void 0 : k.mode) === "update" ? e(a)("menu.common.actions.update") : e(a)("menu.common.actions.add"),
|
|
293
294
|
size: "lg",
|
|
294
295
|
type: "submit",
|
|
295
296
|
variant: "primary"
|
|
296
297
|
}, null, 8, ["disabled", "label"]),
|
|
297
|
-
|
|
298
|
+
r(u, {
|
|
298
299
|
label: e(a)("menu.common.actions.cancel"),
|
|
299
300
|
size: "lg",
|
|
300
301
|
variant: "tertiary",
|
|
@@ -303,25 +304,25 @@ const Ve = {
|
|
|
303
304
|
])
|
|
304
305
|
];
|
|
305
306
|
}),
|
|
306
|
-
default:
|
|
307
|
+
default: S(() => {
|
|
307
308
|
var n, k, E, Q, G, H, J;
|
|
308
309
|
return [
|
|
309
310
|
c("div", Re, [
|
|
310
311
|
c("div", Te, [
|
|
311
|
-
|
|
312
|
+
r(M, I({
|
|
312
313
|
class: "flex-2",
|
|
313
|
-
"error-messages": D.value ? [e(
|
|
314
|
+
"error-messages": D.value ? [e(C)(D.value)] : [],
|
|
314
315
|
label: e(a)("menu.unit.columns.name"),
|
|
315
316
|
"model-value": ((n = o.value) == null ? void 0 : n.name) ?? ""
|
|
316
317
|
}, e(y).field("name", i.value.setName)), null, 16, ["error-messages", "label", "model-value"]),
|
|
317
|
-
|
|
318
|
+
r(M, I({
|
|
318
319
|
class: "flex-1",
|
|
319
|
-
"error-messages": O.value ? [e(
|
|
320
|
+
"error-messages": O.value ? [e(C)(O.value)] : [],
|
|
320
321
|
label: e(a)("menu.unit.columns.symbol"),
|
|
321
322
|
"model-value": ((k = o.value) == null ? void 0 : k.symbol) ?? ""
|
|
322
323
|
}, e(y).field("symbol", i.value.setSymbol)), null, 16, ["error-messages", "label", "model-value"])
|
|
323
324
|
]),
|
|
324
|
-
|
|
325
|
+
r(de, {
|
|
325
326
|
label: e(a)("menu.unit.precision"),
|
|
326
327
|
max: (E = o.value) == null ? void 0 : E.precisionMax,
|
|
327
328
|
min: (Q = o.value) == null ? void 0 : Q.precisionMin,
|
|
@@ -330,15 +331,15 @@ const Ve = {
|
|
|
330
331
|
step: 1,
|
|
331
332
|
"onUpdate:modelValue": t[1] || (t[1] = (s) => i.value.setPrecision(Number(s)))
|
|
332
333
|
}, null, 8, ["label", "max", "min", "model-value", "placeholder"]),
|
|
333
|
-
|
|
334
|
+
r(u, {
|
|
334
335
|
disabled: ((H = o.value) == null ? void 0 : H.addMeasurement.state) !== "allowed",
|
|
335
336
|
label: e(a)("menu.unit.measurement.add"),
|
|
336
337
|
variant: "secondary",
|
|
337
338
|
onClick: t[2] || (t[2] = (s) => i.value.addMeasurement())
|
|
338
339
|
}, null, 8, ["disabled", "label"]),
|
|
339
|
-
(
|
|
340
|
+
(m(!0), p(j, null, Z(((J = o.value) == null ? void 0 : J.measurements) ?? [], (s) => {
|
|
340
341
|
var W;
|
|
341
|
-
return
|
|
342
|
+
return m(), p("div", {
|
|
342
343
|
key: s.id,
|
|
343
344
|
class: "flex flex-col gap-8"
|
|
344
345
|
}, [
|
|
@@ -346,18 +347,18 @@ const Ve = {
|
|
|
346
347
|
c("p", Ke, x(e(a)("menu.unit.measurement.title", {
|
|
347
348
|
number: s.position
|
|
348
349
|
})), 1),
|
|
349
|
-
|
|
350
|
+
r(u, {
|
|
350
351
|
"aria-label": e(a)("menu.unit.measurement.remove", {
|
|
351
352
|
number: s.position
|
|
352
353
|
}),
|
|
353
354
|
disabled: s.remove.state !== "allowed",
|
|
354
355
|
icon: "delete",
|
|
355
356
|
variant: "secondary",
|
|
356
|
-
onClick: (
|
|
357
|
+
onClick: (F) => i.value.removeMeasurement(s.id)
|
|
357
358
|
}, null, 8, ["aria-label", "disabled", "onClick"])
|
|
358
359
|
]),
|
|
359
360
|
c("div", qe, [
|
|
360
|
-
|
|
361
|
+
r(M, I(
|
|
361
362
|
{
|
|
362
363
|
"error-messages": T(
|
|
363
364
|
s.id,
|
|
@@ -370,10 +371,10 @@ const Ve = {
|
|
|
370
371
|
{ ref_for: !0 },
|
|
371
372
|
e(y).field(
|
|
372
373
|
`measurementName:${s.id}`,
|
|
373
|
-
(
|
|
374
|
+
(F) => i.value.setMeasurementName(s.id, F)
|
|
374
375
|
)
|
|
375
376
|
), null, 16, ["error-messages", "label", "model-value"]),
|
|
376
|
-
|
|
377
|
+
r(M, I(
|
|
377
378
|
{
|
|
378
379
|
"error-messages": T(
|
|
379
380
|
s.id,
|
|
@@ -386,14 +387,14 @@ const Ve = {
|
|
|
386
387
|
{ ref_for: !0 },
|
|
387
388
|
e(y).field(
|
|
388
389
|
`measurementSymbol:${s.id}`,
|
|
389
|
-
(
|
|
390
|
+
(F) => i.value.setMeasurementSymbol(s.id, F)
|
|
390
391
|
)
|
|
391
392
|
), null, 16, ["error-messages", "label", "model-value"])
|
|
392
393
|
]),
|
|
393
|
-
|
|
394
|
+
r(M, {
|
|
394
395
|
label: e(a)("menu.unit.measurement.conversion"),
|
|
395
396
|
"model-value": s.conversion,
|
|
396
|
-
"onUpdate:modelValue": (
|
|
397
|
+
"onUpdate:modelValue": (F) => i.value.setMeasurementConversion(s.id, F)
|
|
397
398
|
}, null, 8, ["label", "model-value", "onUpdate:modelValue"]),
|
|
398
399
|
c("p", Qe, x(e(a)("menu.unit.measurement.preview_line", {
|
|
399
400
|
name: s.name,
|
|
@@ -412,13 +413,13 @@ const Ve = {
|
|
|
412
413
|
}, 8, ["heading"]);
|
|
413
414
|
};
|
|
414
415
|
}
|
|
415
|
-
}),
|
|
416
|
+
}), oa = /* @__PURE__ */ ae({
|
|
416
417
|
__name: "Unit",
|
|
417
418
|
setup(A) {
|
|
418
419
|
const _ = Me();
|
|
419
|
-
return (a,
|
|
420
|
+
return (a, C) => (m(), w(He, { sdk: e(_) }, null, 8, ["sdk"]));
|
|
420
421
|
}
|
|
421
422
|
});
|
|
422
423
|
export {
|
|
423
|
-
|
|
424
|
+
oa as default
|
|
424
425
|
};
|