@feedmepos/mf-menu 0.32.17 → 0.32.18-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-Cfl37TTw.js +152661 -0
- package/dist/{Catalog-ChlP8Cid.js → Catalog-Yxsb-D33.js} +47 -52
- package/dist/{Category-CHs96ibF.js → Category-0vJH8Ct0.js} +86 -92
- package/dist/{Category-B1tAJpNd.js → Category-qp0wI14I.js} +25 -26
- package/dist/{CookingGuide-mEvca-0v.js → CookingGuide-EpAr5F5U.js} +139 -143
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-Bk26jQI7.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CkyD0sdI.js} +14 -16
- package/dist/{Group-Ye2IIY52.js → Group-B3W9iSbO.js} +5 -5
- package/dist/{Group-Co2Vf4Lw.js → Group-DLCh0fDU.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BcxSbvJS.js → Group.vue_vue_type_script_setup_true_lang-Bzy_hXDv.js} +176 -186
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D1f8VG-n.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-BFaAXp7r.js} +81 -88
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Jv6iJlg9.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CxP8lDD0.js} +2502 -2508
- package/dist/{Ingredient-BgnW8sWo.js → Ingredient-CVLMr_YB.js} +102 -105
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-8ziHcUiK.js → InventoryBinding.vue_vue_type_script_setup_true_lang-CdTC5ykI.js} +1058 -1059
- package/dist/{MenuSetting-GEngjeC8.js → MenuSetting-Blpi1vSd.js} +58 -61
- package/dist/{PrintRoute-BSlUQT7g.js → PrintRoute-BS7PPPkE.js} +49 -52
- package/dist/{Product-DNg_BUuV.js → Product-DDeNKQ7u.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-Cehy2oy-.js → Product.vue_vue_type_script_setup_true_lang-rmv8m4_D.js} +286 -298
- package/dist/{ProductInternalTools-B5A67yxH.js → ProductInternalTools-CVuothk9.js} +45 -46
- package/dist/{Products-DCsxmTPB.js → Products-BIvsHKEt.js} +111 -116
- package/dist/{Publish-Cst0Ll6T.js → Publish-CDADU3Pp.js} +154 -159
- package/dist/{Recipe-DupS3SQT.js → Recipe-CMhW7e_z.js} +40 -43
- package/dist/{Scheduler-BcThU1M6.js → Scheduler-BpxunKBV.js} +7 -7
- package/dist/{ServingSequence-CT3THBH6.js → ServingSequence-BQVuYyAB.js} +54 -58
- package/dist/{Setting-Dxh8E3no.js → Setting-Dj0yyP37.js} +63 -66
- package/dist/{Subcategory-DhJEzofz.js → Subcategory-BH4DDZM4.js} +72 -76
- package/dist/{Takeaway-DSC7U4Jk.js → Takeaway-CGJBZ_sJ.js} +1 -1
- package/dist/{Takeaway-B8BSSKNj.js → Takeaway-DifOudVE.js} +20 -21
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-BLpiJlk2.js → Takeaway.vue_vue_type_script_setup_true_lang-D-R5_S5G.js} +59 -64
- package/dist/{Unit-joU7vZZu.js → Unit-DXDox2Ut.js} +8 -8
- package/dist/{Variant-D8YjRJ6N.js → Variant-DbJVwgm5.js} +75 -78
- package/dist/{_id_-Bd9uo1WW.js → _id_-RFYwWjbM.js} +34 -38
- package/dist/{app-BNrAos5Z.js → app-Z0KWH9-d.js} +74 -335
- package/dist/app.js +4 -5
- package/dist/apps/mf-menu/src/app.d.ts +1 -2
- package/dist/apps/mf-menu/src/helper/import-export-utils.d.ts +1 -0
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-DbjzbFTw.js → linked-status-CkmoJAm-.js} +2 -2
- package/dist/assets/{menu-export-D_oNY_wi.js → menu-export-DcINiK28.js} +3 -3
- package/dist/assets/{override-menu-CIU7U1_4.js → override-menu-PUKiu-df.js} +2 -2
- package/dist/assets/{validate-menu-kuOxuwG9.js → validate-menu-CcqiRhNT.js} +2 -2
- package/dist/{catalogSetting-BHgsBDTl.js → catalogSetting-Bf66H-j7.js} +1 -1
- package/dist/dayjs.min-DNPTnUFp.js +6 -0
- package/dist/{jszip.min-7SsHzD5O.js → jszip.min-CO2_Gf69.js} +545 -545
- package/dist/{menu-Cd4NbFVq.js → menu-Brxar171.js} +1 -1
- package/dist/mf-menu.css +1 -1
- package/dist/{scheduler-B6OokVIA.js → scheduler-CqdIiE8G.js} +56 -60
- package/dist/{toExcel-BZkbXlHv.js → toExcel-CRJIU0NC.js} +2 -2
- package/dist/{unit-D6QOkMoM.js → unit-wYPYkm33.js} +98 -105
- package/package.json +1 -1
- package/dist/App-BiSEuDkd.js +0 -13484
- package/dist/ApplyProduct.vue_vue_type_script_setup_true_lang-C_SjdLpO.js +0 -161
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-BmPAVphe.js +0 -26
- package/dist/LinkProductSideSheet-DFDYEUBh.js +0 -687
- package/dist/MenuSelector.vue_vue_type_script_setup_true_lang-K6Z0QJBl.js +0 -69
- package/dist/RuleView.vue_vue_type_script_setup_true_lang-BeesK2ym.js +0 -3285
- package/dist/TextChip.vue_vue_type_script_setup_true_lang-8frWuZFL.js +0 -20
- package/dist/Thumbnail.vue_vue_type_script_setup_true_lang-C3qXnZlz.js +0 -399
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-CMe76XvZ.js +0 -6011
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-5fxKLAzS.js +0 -8163
- package/dist/app-nTzkERJW.js +0 -68
- package/dist/catalog-BO2nXwe5.js +0 -199
- package/dist/category-CuG3DsGL.js +0 -156
- package/dist/check-C9mY6LiX.js +0 -9
- package/dist/createComponentProgrammatically-Bt2rn1IQ.js +0 -11
- package/dist/currency-DxC5zyZB.js +0 -7
- package/dist/dayjs.min-BvFUSPWD.js +0 -6
- package/dist/discardConfirm-BHni0LNu.js +0 -28
- package/dist/index-B0nhvuxR.js +0 -273
- package/dist/index-C2zPvt64.js +0 -239
- package/dist/index-C36JQix-.js +0 -246
- package/dist/index-CisutoS9.js +0 -156
- package/dist/index.vue_vue_type_script_setup_true_lang-DCBYExNb.js +0 -109064
- package/dist/item-K01xd1Z0.js +0 -6868
- package/dist/menuV2-DKE-xanq.js +0 -1052
- package/dist/object-DVUNCr7w.js +0 -16
- package/dist/priceTier-Beavb91W.js +0 -87
- package/dist/search-BAPEUu1R.js +0 -15
- package/dist/string-DpfFixWH.js +0 -4
- package/dist/subcategory-DnslmmRD.js +0 -148
- package/dist/tooltip-B5BiPMx9.js +0 -32
- package/dist/vuedraggable-CK8z7qA8.js +0 -1728
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import { defineStore as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import {
|
|
4
|
-
import { useI18n as
|
|
5
|
-
import { useSnackbar as
|
|
6
|
-
|
|
7
|
-
import { c as re } from "./check-C9mY6LiX.js";
|
|
8
|
-
import "./vuedraggable-CK8z7qA8.js";
|
|
9
|
-
import "./menuV2-DKE-xanq.js";
|
|
10
|
-
import "./app-5fxKLAzS.js";
|
|
11
|
-
/* empty css */
|
|
12
|
-
import { c as me } from "./createComponentProgrammatically-Bt2rn1IQ.js";
|
|
13
|
-
const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
|
|
1
|
+
import { defineStore as W } from "pinia";
|
|
2
|
+
import { defineComponent as N, computed as U, ref as h, watch as S, resolveComponent as V, createBlock as H, openBlock as F, withCtx as w, createVNode as m, createElementVNode as f, normalizeClass as J, createElementBlock as A, toDisplayString as M, unref as l, Fragment as P, renderSlot as X, renderList as Z, getCurrentInstance as ee } from "vue";
|
|
3
|
+
import { Q as q, S as ne, N as B, c as k, d as $, a as j, l as E, F as te, b as ae, P as oe, m as C, e as D, n as le, u as ue, h as ie } from "./App-Cfl37TTw.js";
|
|
4
|
+
import { useI18n as T } from "@feedmepos/mf-common";
|
|
5
|
+
import { useSnackbar as I, components as se, useDialog as re, FmButtonVariant as me } from "@feedmepos/ui-library";
|
|
6
|
+
const de = ["value", "disabled"], ce = /* @__PURE__ */ N({
|
|
14
7
|
__name: "NumberPrecisionInput",
|
|
15
8
|
props: {
|
|
16
9
|
modelValue: {},
|
|
@@ -22,25 +15,25 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
|
|
|
22
15
|
},
|
|
23
16
|
emits: ["update:modelValue"],
|
|
24
17
|
setup(y, { emit: g }) {
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
e === "-" || e === "." ?
|
|
18
|
+
const n = y, t = g, c = U(() => q(n.step ?? 1).precision), d = h(n.modelValue.toString());
|
|
19
|
+
S([() => d.value], ([e]) => {
|
|
20
|
+
e === "-" || e === "." ? t("update:modelValue", 0) : t("update:modelValue", +e);
|
|
28
21
|
});
|
|
29
22
|
const b = (e) => {
|
|
30
23
|
if (e.ctrlKey || e.altKey || e.metaKey || ["Backspace", "Tab", "Enter", "ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(
|
|
31
24
|
e.key
|
|
32
25
|
))
|
|
33
26
|
return;
|
|
34
|
-
const i = e.currentTarget,
|
|
35
|
-
if (isFinite(
|
|
36
|
-
|
|
27
|
+
const i = e.currentTarget, o = +`${i.value}${e.key}`;
|
|
28
|
+
if (isFinite(o)) {
|
|
29
|
+
q(o).precision > c.value && e.preventDefault();
|
|
37
30
|
return;
|
|
38
31
|
}
|
|
39
32
|
i.value.length === 0 && (e.key === "-" || e.key === ".") || e.preventDefault();
|
|
40
33
|
};
|
|
41
34
|
return (e, i) => {
|
|
42
|
-
const
|
|
43
|
-
return F(),
|
|
35
|
+
const o = V("FmField"), a = V("FmFormGroup");
|
|
36
|
+
return F(), H(a, {
|
|
44
37
|
disabled: e.disabled,
|
|
45
38
|
modelValue: e.modelValue,
|
|
46
39
|
rules: e.rules,
|
|
@@ -48,14 +41,14 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
|
|
|
48
41
|
label: e.label
|
|
49
42
|
}, {
|
|
50
43
|
default: w(({ invalid: p }) => [
|
|
51
|
-
m(
|
|
44
|
+
m(o, { invalid: p }, {
|
|
52
45
|
default: w(() => [
|
|
53
46
|
f("input", {
|
|
54
47
|
value: d.value,
|
|
55
48
|
onInput: i[0] || (i[0] = (_) => d.value = _.target.value),
|
|
56
49
|
onKeydown: b,
|
|
57
50
|
inputmode: "numeric",
|
|
58
|
-
class:
|
|
51
|
+
class: J({
|
|
59
52
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
60
53
|
"text-fm-color-typo-primary": !e.disabled,
|
|
61
54
|
"text-fm-color-typo-disabled": e.disabled
|
|
@@ -70,7 +63,7 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
|
|
|
70
63
|
}, 8, ["disabled", "modelValue", "rules", "helper-text", "label"]);
|
|
71
64
|
};
|
|
72
65
|
}
|
|
73
|
-
}), pe = { class: "flex flex-col gap-8" }, ve = { class: "flex justify-between" }, fe = { class: "col q-mb-sm t-body-bold" }, be = { class: "flex flex-row gap-8" }, _e = { class: "q-mt-xs q-pl-sm t-system text-fsecondary" }, Ve = /* @__PURE__ */
|
|
66
|
+
}), pe = { class: "flex flex-col gap-8" }, ve = { class: "flex justify-between" }, fe = { class: "col q-mb-sm t-body-bold" }, be = { class: "flex flex-row gap-8" }, _e = { class: "q-mt-xs q-pl-sm t-system text-fsecondary" }, Ve = /* @__PURE__ */ N({
|
|
74
67
|
__name: "UnitMeasurement",
|
|
75
68
|
props: {
|
|
76
69
|
title: {
|
|
@@ -92,23 +85,23 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
|
|
|
92
85
|
},
|
|
93
86
|
emits: ["update:model-value", "delete"],
|
|
94
87
|
setup(y, { emit: g }) {
|
|
95
|
-
const { t } =
|
|
96
|
-
name:
|
|
88
|
+
const { t: n } = T(), t = y, c = U(() => ne(t.modelValue.conversion)), d = U(() => n("menu.unit.measurement.preview", {
|
|
89
|
+
name: t.modelValue.name,
|
|
97
90
|
value: c.value,
|
|
98
|
-
unit:
|
|
91
|
+
unit: t.unitName
|
|
99
92
|
}));
|
|
100
|
-
function b(
|
|
101
|
-
e("conversion", B(
|
|
93
|
+
function b(o) {
|
|
94
|
+
e("conversion", B(o, t.precision));
|
|
102
95
|
}
|
|
103
|
-
function e(
|
|
104
|
-
const p = k(
|
|
105
|
-
p[
|
|
96
|
+
function e(o, a) {
|
|
97
|
+
const p = k(t.modelValue);
|
|
98
|
+
p[o] = a, i("update:model-value", p);
|
|
106
99
|
}
|
|
107
100
|
const i = g;
|
|
108
|
-
return
|
|
109
|
-
() =>
|
|
101
|
+
return S(
|
|
102
|
+
() => t.precision,
|
|
110
103
|
() => b(c.value)
|
|
111
|
-
), (
|
|
104
|
+
), (o, a) => {
|
|
112
105
|
const p = V("FmButton"), _ = V("FmTextField");
|
|
113
106
|
return F(), A("div", pe, [
|
|
114
107
|
f("div", ve, [
|
|
@@ -116,56 +109,56 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
|
|
|
116
109
|
m(p, {
|
|
117
110
|
icon: "delete",
|
|
118
111
|
variant: "secondary",
|
|
119
|
-
onClick:
|
|
112
|
+
onClick: a[0] || (a[0] = (s) => i("delete"))
|
|
120
113
|
})
|
|
121
114
|
]),
|
|
122
115
|
f("div", be, [
|
|
123
116
|
m(_, {
|
|
124
|
-
"model-value":
|
|
117
|
+
"model-value": t.modelValue.name,
|
|
125
118
|
rules: [
|
|
126
|
-
(s) => s ? !0 : l(
|
|
127
|
-
field: l(
|
|
119
|
+
(s) => s ? !0 : l(n)("menu.common.validation.required", {
|
|
120
|
+
field: l(n)("menu.unit.measurement.name").toLowerCase()
|
|
128
121
|
})
|
|
129
122
|
],
|
|
130
|
-
label: l(
|
|
131
|
-
"onUpdate:modelValue":
|
|
123
|
+
label: l(n)("menu.unit.measurement.name"),
|
|
124
|
+
"onUpdate:modelValue": a[1] || (a[1] = (s) => e("name", s.trim()))
|
|
132
125
|
}, null, 8, ["model-value", "rules", "label"]),
|
|
133
126
|
m(_, {
|
|
134
|
-
"model-value":
|
|
127
|
+
"model-value": t.modelValue.abbrev,
|
|
135
128
|
rules: [
|
|
136
|
-
(s) => s ? !0 : l(
|
|
137
|
-
field: l(
|
|
129
|
+
(s) => s ? !0 : l(n)("menu.common.validation.required", {
|
|
130
|
+
field: l(n)("menu.unit.measurement.symbol").toLowerCase()
|
|
138
131
|
})
|
|
139
132
|
],
|
|
140
|
-
label: l(
|
|
141
|
-
"onUpdate:modelValue":
|
|
133
|
+
label: l(n)("menu.unit.measurement.symbol"),
|
|
134
|
+
"onUpdate:modelValue": a[2] || (a[2] = (s) => e("abbrev", s.trim()))
|
|
142
135
|
}, null, 8, ["model-value", "rules", "label"])
|
|
143
136
|
]),
|
|
144
137
|
m(ce, {
|
|
145
|
-
label: l(
|
|
138
|
+
label: l(n)("menu.unit.measurement.conversion"),
|
|
146
139
|
"model-value": c.value,
|
|
147
140
|
"onUpdate:modelValue": b,
|
|
148
|
-
step: 1 / Math.pow(10,
|
|
141
|
+
step: 1 / Math.pow(10, t.precision)
|
|
149
142
|
}, null, 8, ["label", "model-value", "step"]),
|
|
150
|
-
f("div", _e, M(l(
|
|
143
|
+
f("div", _e, M(l(n)("menu.unit.measurement.preview_label")) + ": " + M(d.value), 1)
|
|
151
144
|
]);
|
|
152
145
|
};
|
|
153
146
|
}
|
|
154
|
-
}), ye = { class: "fm-typo-en-title-md-600" }, ge = { class: "pt-8 space-y-40" }, Fe = { class: "flex flex-row gap-16" }, we = { class: "flex gap-8 items-center justify-start" }, Ue = /* @__PURE__ */
|
|
147
|
+
}), ye = { class: "fm-typo-en-title-md-600" }, ge = { class: "pt-8 space-y-40" }, Fe = { class: "flex flex-row gap-16" }, we = { class: "flex gap-8 items-center justify-start" }, Ue = /* @__PURE__ */ N({
|
|
155
148
|
__name: "Form",
|
|
156
149
|
props: {
|
|
157
150
|
initialValue: {}
|
|
158
151
|
},
|
|
159
152
|
setup(y, { expose: g }) {
|
|
160
|
-
const { t } =
|
|
161
|
-
() =>
|
|
162
|
-
), e = h(
|
|
163
|
-
|
|
153
|
+
const { t: n } = T(), t = y, c = $(j(I())), d = U(() => t.initialValue ? n("menu.unit.update") : n("menu.unit.add")), b = U(
|
|
154
|
+
() => t.initialValue ? n("menu.common.actions.update") : n("menu.common.actions.add")
|
|
155
|
+
), e = h(t.initialValue ? k(t.initialValue) : E.generator.initUnit()), i = h(!1), o = h(!1), a = (u) => {
|
|
156
|
+
ae.isBoolean(u) ? o.value = u : o.value = !o.value;
|
|
164
157
|
};
|
|
165
158
|
function p() {
|
|
166
159
|
e.value.measurements = e.value.measurements.map((u) => ({
|
|
167
160
|
...u,
|
|
168
|
-
conversion:
|
|
161
|
+
conversion: oe(u.conversion, e.value.precision)
|
|
169
162
|
}));
|
|
170
163
|
}
|
|
171
164
|
function _() {
|
|
@@ -179,16 +172,16 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
|
|
|
179
172
|
function s(u) {
|
|
180
173
|
e.value.measurements.splice(u, 1);
|
|
181
174
|
}
|
|
182
|
-
const K =
|
|
183
|
-
() => !
|
|
175
|
+
const K = te(
|
|
176
|
+
() => !le.isEqual(e.value, t.initialValue || E.generator.initUnit()),
|
|
184
177
|
() => {
|
|
185
|
-
|
|
178
|
+
o.value = !1;
|
|
186
179
|
}
|
|
187
180
|
), Y = async () => {
|
|
188
181
|
try {
|
|
189
182
|
i.value = !0;
|
|
190
183
|
const u = k(e.value);
|
|
191
|
-
|
|
184
|
+
t.initialValue ? await c.updateMenu(
|
|
192
185
|
{
|
|
193
186
|
module: D.F_MENU_MODULE_V4_KEY.enum.unit,
|
|
194
187
|
operation: C.F_OPERATION_TYPE.update,
|
|
@@ -202,28 +195,28 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
|
|
|
202
195
|
data: u
|
|
203
196
|
},
|
|
204
197
|
u.name
|
|
205
|
-
),
|
|
198
|
+
), a(!1), e.value = E.generator.initUnit();
|
|
206
199
|
} finally {
|
|
207
200
|
i.value = !1;
|
|
208
201
|
}
|
|
209
202
|
};
|
|
210
|
-
return
|
|
211
|
-
() =>
|
|
203
|
+
return S(
|
|
204
|
+
() => o.value,
|
|
212
205
|
(u) => {
|
|
213
|
-
u && (e.value =
|
|
206
|
+
u && (e.value = t.initialValue ? k(t.initialValue) : E.generator.initUnit());
|
|
214
207
|
}
|
|
215
208
|
), g({
|
|
216
|
-
show:
|
|
217
|
-
trigger:
|
|
209
|
+
show: o,
|
|
210
|
+
trigger: a
|
|
218
211
|
}), (u, v) => {
|
|
219
|
-
const
|
|
220
|
-
return F(), A(
|
|
221
|
-
X(u.$slots, "default", { trigger:
|
|
212
|
+
const L = V("FmTextField"), R = V("FmStepperField"), z = V("FmButton"), O = V("fm-button"), G = V("fm-side-sheet");
|
|
213
|
+
return F(), A(P, null, [
|
|
214
|
+
X(u.$slots, "default", { trigger: a }),
|
|
222
215
|
m(G, {
|
|
223
216
|
id: "unit-form",
|
|
224
|
-
modelValue:
|
|
225
|
-
"onUpdate:modelValue": v[4] || (v[4] = (r) =>
|
|
226
|
-
"is-container": l(
|
|
217
|
+
modelValue: o.value,
|
|
218
|
+
"onUpdate:modelValue": v[4] || (v[4] = (r) => o.value = r),
|
|
219
|
+
"is-container": l(se).FmForm,
|
|
227
220
|
"is-container-props": {
|
|
228
221
|
onValidationSuccess: Y,
|
|
229
222
|
blameFormChildOnValidationFailed: !0
|
|
@@ -236,43 +229,43 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
|
|
|
236
229
|
]),
|
|
237
230
|
"side-sheet-footer": w(() => [
|
|
238
231
|
f("div", we, [
|
|
239
|
-
m(
|
|
232
|
+
m(O, {
|
|
240
233
|
label: b.value,
|
|
241
234
|
loading: i.value,
|
|
242
235
|
size: "lg",
|
|
243
236
|
type: "submit",
|
|
244
237
|
variant: "primary"
|
|
245
238
|
}, null, 8, ["label", "loading"]),
|
|
246
|
-
m(
|
|
247
|
-
label: l(
|
|
239
|
+
m(O, {
|
|
240
|
+
label: l(n)("menu.common.actions.cancel"),
|
|
248
241
|
size: "lg",
|
|
249
242
|
variant: "tertiary",
|
|
250
|
-
onClick: v[3] || (v[3] = () =>
|
|
243
|
+
onClick: v[3] || (v[3] = () => o.value = !1)
|
|
251
244
|
}, null, 8, ["label"])
|
|
252
245
|
])
|
|
253
246
|
]),
|
|
254
247
|
default: w(() => [
|
|
255
248
|
f("div", ge, [
|
|
256
249
|
f("div", Fe, [
|
|
257
|
-
m(
|
|
250
|
+
m(L, {
|
|
258
251
|
class: "flex-2",
|
|
259
|
-
label: l(
|
|
252
|
+
label: l(n)("menu.unit.columns.name"),
|
|
260
253
|
modelValue: e.value.name,
|
|
261
254
|
"onUpdate:modelValue": v[0] || (v[0] = (r) => e.value.name = r),
|
|
262
255
|
rules: [
|
|
263
|
-
(r) => r ? !0 : l(
|
|
264
|
-
field: l(
|
|
256
|
+
(r) => r ? !0 : l(n)("menu.common.validation.required", {
|
|
257
|
+
field: l(n)("menu.unit.columns.name").toLowerCase()
|
|
265
258
|
})
|
|
266
259
|
]
|
|
267
260
|
}, null, 8, ["label", "modelValue", "rules"]),
|
|
268
|
-
m(
|
|
261
|
+
m(L, {
|
|
269
262
|
class: "flex-1",
|
|
270
|
-
label: l(
|
|
263
|
+
label: l(n)("menu.unit.columns.symbol"),
|
|
271
264
|
modelValue: e.value.abbrev,
|
|
272
265
|
"onUpdate:modelValue": v[1] || (v[1] = (r) => e.value.abbrev = r),
|
|
273
266
|
rules: [
|
|
274
|
-
(r) => r ? !0 : l(
|
|
275
|
-
field: l(
|
|
267
|
+
(r) => r ? !0 : l(n)("menu.common.validation.required", {
|
|
268
|
+
field: l(n)("menu.unit.columns.symbol").toLowerCase()
|
|
276
269
|
})
|
|
277
270
|
]
|
|
278
271
|
}, null, 8, ["label", "modelValue", "rules"])
|
|
@@ -284,26 +277,26 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
|
|
|
284
277
|
v[2] || (v[2] = (r) => e.value.precision = r),
|
|
285
278
|
p
|
|
286
279
|
],
|
|
287
|
-
label: l(
|
|
288
|
-
placeholder: l(
|
|
280
|
+
label: l(n)("menu.unit.precision"),
|
|
281
|
+
placeholder: l(n)("menu.unit.precision_placeholder"),
|
|
289
282
|
step: 1,
|
|
290
283
|
min: 0,
|
|
291
284
|
max: 5
|
|
292
285
|
}, null, 8, ["modelValue", "label", "placeholder"])
|
|
293
286
|
]),
|
|
294
287
|
m(z, {
|
|
295
|
-
label: l(
|
|
288
|
+
label: l(n)("menu.unit.measurement.add"),
|
|
296
289
|
variant: "secondary",
|
|
297
290
|
onClick: _
|
|
298
291
|
}, null, 8, ["label"]),
|
|
299
|
-
(F(!0), A(
|
|
292
|
+
(F(!0), A(P, null, Z(e.value.measurements, (r, x) => (F(), A("div", {
|
|
300
293
|
key: r.id
|
|
301
294
|
}, [
|
|
302
295
|
m(Ve, {
|
|
303
296
|
modelValue: e.value.measurements[x],
|
|
304
|
-
"onUpdate:modelValue": (
|
|
297
|
+
"onUpdate:modelValue": (Q) => e.value.measurements[x] = Q,
|
|
305
298
|
"unit-name": e.value.name,
|
|
306
|
-
title: l(
|
|
299
|
+
title: l(n)("menu.unit.measurement.title", { number: x + 1 }),
|
|
307
300
|
precision: e.value.precision,
|
|
308
301
|
onDelete: () => s(x)
|
|
309
302
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "unit-name", "title", "precision", "onDelete"])
|
|
@@ -315,58 +308,58 @@ const de = ["value", "disabled"], ce = /* @__PURE__ */ T({
|
|
|
315
308
|
], 64);
|
|
316
309
|
};
|
|
317
310
|
}
|
|
318
|
-
}), xe = Ue,
|
|
319
|
-
const y =
|
|
320
|
-
|
|
321
|
-
const c = ee(), { t: d } =
|
|
311
|
+
}), xe = Ue, Ce = W("unit-manager", () => {
|
|
312
|
+
const y = re(), g = I(), n = j(g), t = $(n);
|
|
313
|
+
ue();
|
|
314
|
+
const c = ee(), { t: d } = T(), b = (a) => {
|
|
322
315
|
var _, s;
|
|
323
|
-
const { vNode: p } =
|
|
316
|
+
const { vNode: p } = ie(
|
|
324
317
|
xe,
|
|
325
318
|
c,
|
|
326
|
-
|
|
319
|
+
a
|
|
327
320
|
);
|
|
328
321
|
(s = (_ = p.component) == null ? void 0 : _.exposed) == null || s.trigger();
|
|
329
322
|
};
|
|
330
323
|
async function e() {
|
|
331
324
|
b({});
|
|
332
325
|
}
|
|
333
|
-
async function i(
|
|
326
|
+
async function i(a) {
|
|
334
327
|
b({
|
|
335
|
-
initialValue:
|
|
328
|
+
initialValue: a
|
|
336
329
|
});
|
|
337
330
|
}
|
|
338
|
-
async function a
|
|
331
|
+
async function o(a) {
|
|
339
332
|
y.open({
|
|
340
333
|
title: d("menu.common.dialog.remove.unit.title"),
|
|
341
|
-
message: d("menu.common.dialog.remove.unit.message", { name:
|
|
334
|
+
message: d("menu.common.dialog.remove.unit.message", { name: a.name }),
|
|
342
335
|
primaryActions: {
|
|
343
336
|
text: d("menu.common.actions.remove"),
|
|
344
337
|
close: !0,
|
|
345
|
-
variant:
|
|
338
|
+
variant: me.Destructive
|
|
346
339
|
},
|
|
347
340
|
secondaryActions: {
|
|
348
341
|
text: d("menu.common.actions.cancel"),
|
|
349
342
|
close: !0
|
|
350
343
|
}
|
|
351
344
|
}).onPrimary(async () => {
|
|
352
|
-
await
|
|
345
|
+
await t.updateMenu(
|
|
353
346
|
{
|
|
354
347
|
module: D.F_MENU_MODULE_V4_KEY.enum.unit,
|
|
355
348
|
operation: C.F_OPERATION_TYPE.delete,
|
|
356
|
-
data:
|
|
349
|
+
data: a._id
|
|
357
350
|
},
|
|
358
|
-
|
|
351
|
+
a.name,
|
|
359
352
|
!0
|
|
360
353
|
);
|
|
361
354
|
});
|
|
362
355
|
}
|
|
363
356
|
return {
|
|
364
357
|
createUnit: e,
|
|
365
|
-
deleteUnit:
|
|
358
|
+
deleteUnit: o,
|
|
366
359
|
updateUnit: i
|
|
367
360
|
};
|
|
368
361
|
});
|
|
369
362
|
export {
|
|
370
363
|
xe as U,
|
|
371
|
-
|
|
364
|
+
Ce as u
|
|
372
365
|
};
|