@feedmepos/mf-inventory-portal 0.0.17-dev.1 → 0.0.17-dev.10
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/{ApprovalView-NJ4FogNu.js → ApprovalView-C72rFK1R.js} +9 -9
- package/dist/{BindingsDialog-B-j1k1SE.js → BindingsDialog-gL9pxfYy.js} +5 -5
- package/dist/{BindingsPicker-CEi3jyh0.js → BindingsPicker-5mFctYt_.js} +6 -6
- package/dist/{BindingsTable-DHYJ2Eqm.js → BindingsTable-C6x9dxpe.js} +26 -26
- package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-1XPAzm5R.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CYZ5Ecsh.js} +1 -1
- package/dist/{FmMultiselectDialog.vue_vue_type_script_setup_true_lang-DL98UqsQ.js → FmMultiselectDialog.vue_vue_type_script_setup_true_lang-blApBVkg.js} +9 -9
- package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-Db_M7Cx1.js +236 -0
- package/dist/IngredientsView-P0zlf89O.js +1771 -0
- package/dist/{IntegrationView-DxqyRxVR.js → IntegrationView-C1SXz981.js} +4 -4
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang--KLpvU2e.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BfBvA1g5.js} +6 -6
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-HpuL5QhV.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CSuO9X2f.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-BGbCA7Al.js → PurchaseOrderPrintPreview-DGZafWSJ.js} +4 -4
- package/dist/ReceiveRequestView-C8yrU5NY.js +1435 -0
- package/dist/RecipeView-DJy1k_j1.js +581 -0
- package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-Dov3Uq2z.js +64 -0
- package/dist/{StockView-Pyk4MBIQ.js → StockView-CEmw7w_F.js} +13 -13
- package/dist/SupplierView-D0y-ASGR.js +804 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Ctqjw3f1.js → TransferDetails.vue_vue_type_script_setup_true_lang-DzK7B6nw.js} +5 -5
- package/dist/{UnitView-DVauPXKw.js → UnitView-PnHtBAGc.js} +7 -7
- package/dist/{WarehouseView-BYivsQgQ.js → WarehouseView-DXhn95Vl.js} +4 -4
- package/dist/api/inventory.d.ts +105 -0
- package/dist/{app-DXqS7qYg.js → app-CjkBFVBh.js} +2693 -2664
- package/dist/app.js +1 -1
- package/dist/components/FmDroppableField.vue.d.ts +75 -0
- package/dist/components/FmUnitInputProps.d.ts +1 -0
- package/dist/components/FmUnitInputRules.d.ts +3 -1
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +1 -0
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +1 -0
- package/dist/{date2-B96h4mWb.js → date2-D-5KX0_X.js} +55 -46
- package/dist/{dayjs.min-CQkpEWlm.js → dayjs.min-BKYgFjeY.js} +526 -514
- package/dist/{decimal-DQOX97fs.js → decimal-CNnMmnJA.js} +1 -1
- package/dist/{fuzzy-Dr-kBYFA.js → fuzzy-BPDipSKr.js} +1 -1
- package/dist/helper/number.d.ts +8 -0
- package/dist/helper/random.d.ts +2 -0
- package/dist/helper/xlsx.util.d.ts +1 -0
- package/dist/{init-date-range-6CJBD0GL.js → init-date-range-58-0kupV.js} +1 -1
- package/dist/{layout-CVjYEZxq.js → layout-D2Kwl_3f.js} +12 -12
- package/dist/{rules-B_-yQn9M.js → rules-D0MrF_UU.js} +1 -1
- package/dist/{stock-estimate-DoU-A7bG.js → stock-estimate-CwklebfL.js} +2 -2
- package/dist/stores/inventory.d.ts +5 -0
- package/dist/style.css +1 -1
- package/dist/{supplier-D2Wuv0oV.js → supplier-D4woY4Fa.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-Bc0Yx1fK.js → use-inventory-binding-dialog-C6CEI0CS.js} +2 -2
- package/dist/views/ingredients/components/import-ingredients/ImportIngredientItem.vue.d.ts +12 -0
- package/dist/views/ingredients/components/import-ingredients/ImportIngredientItemProps.d.ts +6 -0
- package/dist/views/ingredients/components/import-ingredients/ImportIngredients.vue.d.ts +2 -0
- package/dist/views/ingredients/components/import-ingredients/ImportIngredientsProps.d.ts +5 -0
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -0
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -0
- package/dist/views/ingredients/helper/import-export.helper.d.ts +47 -0
- package/dist/views/ingredients/helper/sku-id.helper.d.ts +1 -0
- package/dist/views/receive-request/components/supplier-price-history/SupplierPriceHistoryProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +5 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +4 -0
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +12 -0
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +4 -2
- package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
- package/dist/xlsx-BfH_6O8P.js +24004 -0
- package/dist/xlsx.util-BpHfmZp6.js +107 -0
- package/package.json +7 -6
- package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-DqD-jNxc.js +0 -229
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-BYi6BUwT.js +0 -49
- package/dist/IngredientsView-DNbppADe.js +0 -973
- package/dist/ReceiveRequestView-C1ae5dRi.js +0 -1434
- package/dist/RecipeView-BwP8jlG0.js +0 -596
- package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-CFjO4TPG.js +0 -53
- package/dist/SupplierView-CVZ7bOgA.js +0 -803
- package/dist/xlsx-Vw9D2Jo4.js +0 -15510
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { defineComponent as _, openBlock as f, createElementBlock as u, createElementVNode as x, toDisplayString as d, Fragment as g, renderList as M, unref as v } from "vue";
|
|
2
|
+
import { a as h, b } from "./date2-D-5KX0_X.js";
|
|
3
|
+
import { u as y, w as k, r as S } from "./xlsx-BfH_6O8P.js";
|
|
4
|
+
const A = { class: "flex flex-col" }, $ = { class: "flex flex-row fm-typo-en-body-md-600 bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary h-48 items-center" }, B = { class: "flex-1 py-8 px-16" }, E = /* @__PURE__ */ x("div", {
|
|
5
|
+
class: "flex-0 py-8 px-16",
|
|
6
|
+
style: { "flex-basis": "120px" }
|
|
7
|
+
}, "Amount", -1), I = { class: "flex-1 py-8 px-16" }, N = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "flex-0 py-8 px-16",
|
|
10
|
+
style: { "flex-basis": "120px" }
|
|
11
|
+
}, j = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "flex-0 py-8 px-16",
|
|
14
|
+
style: { "flex-basis": "120px" }
|
|
15
|
+
}, R = /* @__PURE__ */ _({
|
|
16
|
+
__name: "IngredientBindedItem",
|
|
17
|
+
props: {
|
|
18
|
+
name: {},
|
|
19
|
+
bindings: {}
|
|
20
|
+
},
|
|
21
|
+
setup(o) {
|
|
22
|
+
function n(e, s) {
|
|
23
|
+
var t;
|
|
24
|
+
if (e.measurement) {
|
|
25
|
+
const a = b(e.amount, e.measurement.conversion);
|
|
26
|
+
return `${h(a, !1)} ${(t = e.measurement) == null ? void 0 : t.abbrev}`;
|
|
27
|
+
}
|
|
28
|
+
return `${h(e.amount, !1)} ${s.abbrev}`;
|
|
29
|
+
}
|
|
30
|
+
function r(e) {
|
|
31
|
+
return e.unit !== void 0;
|
|
32
|
+
}
|
|
33
|
+
return (e, s) => (f(), u("div", A, [
|
|
34
|
+
x("div", $, [
|
|
35
|
+
x("div", B, d(e.name), 1),
|
|
36
|
+
E
|
|
37
|
+
]),
|
|
38
|
+
(f(!0), u(g, null, M(e.bindings, (t) => (f(), u("div", {
|
|
39
|
+
key: t.id,
|
|
40
|
+
class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
|
|
41
|
+
}, [
|
|
42
|
+
x("div", I, d(t.name), 1),
|
|
43
|
+
r(t) ? (f(), u("div", N, d(n(t, t.unit)), 1)) : (f(), u("div", j, d(v(h)(t.amount, !1)), 1))
|
|
44
|
+
]))), 128))
|
|
45
|
+
]));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
function* C(o) {
|
|
49
|
+
const [n, r] = o.split(":"), e = /\d+/, s = e.exec(n), t = e.exec(r);
|
|
50
|
+
if (!s || !t)
|
|
51
|
+
throw new Error(`Cannot parse row range for range: ${o}`);
|
|
52
|
+
const a = Number(s[0]), l = Number(t[0]);
|
|
53
|
+
for (let c = a; c <= l; c++)
|
|
54
|
+
yield c;
|
|
55
|
+
}
|
|
56
|
+
function* F(o) {
|
|
57
|
+
const [n, r] = o.split(":"), e = /[^\d]+/, s = e.exec(n), t = e.exec(r);
|
|
58
|
+
if (!s || !t)
|
|
59
|
+
throw new Error(`Cannot parse row range for range: ${o}`);
|
|
60
|
+
let a = 0, l = "A";
|
|
61
|
+
for (yield l; l !== t[0]; ) {
|
|
62
|
+
a++;
|
|
63
|
+
const c = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
64
|
+
let i = a, m = !1, p = "";
|
|
65
|
+
do {
|
|
66
|
+
const w = i % c.length;
|
|
67
|
+
i = Math.floor(i / c.length), p += c.charAt(w), m = i > 0, i -= 1;
|
|
68
|
+
} while (m);
|
|
69
|
+
l = p.split("").reverse().join(""), yield l;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function T(o) {
|
|
73
|
+
var e;
|
|
74
|
+
const n = [], r = o["!ref"];
|
|
75
|
+
if (!r) return n;
|
|
76
|
+
for (const s of C(r)) {
|
|
77
|
+
const t = [];
|
|
78
|
+
for (const a of F(r))
|
|
79
|
+
t.push(((e = o[`${a}${s}`]) == null ? void 0 : e.w) ?? "");
|
|
80
|
+
n.push(t);
|
|
81
|
+
}
|
|
82
|
+
return n;
|
|
83
|
+
}
|
|
84
|
+
function X(o, n, r = "Sheet1") {
|
|
85
|
+
const e = y.aoa_to_sheet([n, ...o]), s = o.reduce((l, c) => Math.max(l, c.length), 0), t = Array.from({ length: s }).map((l, c) => {
|
|
86
|
+
const i = o.map((m) => `${m[c]}`).reduce((m, p) => Math.max(m, p.length + 3), 0);
|
|
87
|
+
return {
|
|
88
|
+
wch: Math.max(i, 5)
|
|
89
|
+
};
|
|
90
|
+
});
|
|
91
|
+
e["!cols"] = t;
|
|
92
|
+
const a = y.book_new();
|
|
93
|
+
return y.book_append_sheet(a, e, r), a;
|
|
94
|
+
}
|
|
95
|
+
function U(o, n) {
|
|
96
|
+
k(o, n, { compression: !0 });
|
|
97
|
+
}
|
|
98
|
+
async function V(o) {
|
|
99
|
+
return S(await o.arrayBuffer());
|
|
100
|
+
}
|
|
101
|
+
export {
|
|
102
|
+
R as _,
|
|
103
|
+
U as d,
|
|
104
|
+
V as r,
|
|
105
|
+
T as s,
|
|
106
|
+
X as t
|
|
107
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-inventory-portal",
|
|
3
|
-
"version": "0.0.17-dev.
|
|
3
|
+
"version": "0.0.17-dev.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@feedmepos/core": "^2.9.3",
|
|
18
18
|
"@feedmepos/menu": "1.0.34",
|
|
19
|
-
"@feedmepos/mf-common": "1.
|
|
20
|
-
"@feedmepos/ui-library": "1.2.
|
|
19
|
+
"@feedmepos/mf-common": "1.9.3-beta.1",
|
|
20
|
+
"@feedmepos/ui-library": "1.2.58",
|
|
21
21
|
"@tanstack/vue-table": "^8.17.3",
|
|
22
22
|
"@types/dinero.js": "^1.9.4",
|
|
23
23
|
"@vue/cli-service": "^5.0.8",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"vue-router": "^4.3.2",
|
|
38
38
|
"xlsx": "^0.18.5",
|
|
39
39
|
"zod": "3.17.9",
|
|
40
|
-
"@feedmepos/
|
|
40
|
+
"@feedmepos/inventory-core": "^0.2.16-alpha.9",
|
|
41
41
|
"@feedmepos/inventory-core-js": "^1.0.0",
|
|
42
|
-
"@feedmepos/inventory
|
|
42
|
+
"@feedmepos/zod-inventory": "^1.0.9"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@rushstack/eslint-patch": "^1.10.3",
|
|
@@ -86,7 +86,8 @@
|
|
|
86
86
|
"format": "prettier --write src/",
|
|
87
87
|
"test": "vitest",
|
|
88
88
|
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
|
|
89
|
-
"
|
|
89
|
+
"check:env": "cat build-*.env | grep -qE \"^[^#].*localhost\" && { echo \"Error: build-*.env files contains localhost reference\" >&2; exit 1;} || exit 0",
|
|
90
|
+
"prepublish": "pnpm check:env && pnpm build:mf && pnpm build:dts",
|
|
90
91
|
"publish:beta": "pnpm publish --tag beta",
|
|
91
92
|
"test:publish": "pnpm prepublish && pnpm pack",
|
|
92
93
|
"unpack": "tar zxf"
|
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
import { defineComponent as K, mergeModels as j, useModel as Q, computed as i, ref as y, watch as L, inject as X, resolveComponent as d, openBlock as F, createElementBlock as R, createElementVNode as u, createVNode as f, withCtx as C, renderSlot as T, withDirectives as Y, normalizeClass as ee, vModelText as te, toDisplayString as $, createCommentVNode as ne, Fragment as oe, renderList as le, createBlock as ae } from "vue";
|
|
2
|
-
import { F as M } from "./dayjs.min-CQkpEWlm.js";
|
|
3
|
-
import { g as w, c as ue, a as k, t as se, b as re, v as ie } from "./date2-B96h4mWb.js";
|
|
4
|
-
import { I as S } from "./rules-B_-yQn9M.js";
|
|
5
|
-
function z() {
|
|
6
|
-
return {
|
|
7
|
-
amount: M.reset()
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
function O() {
|
|
11
|
-
return function(m) {
|
|
12
|
-
return S()(m.amountAsString);
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
function Ie(s) {
|
|
16
|
-
return function(n) {
|
|
17
|
-
return S()(n.amountAsString) !== !0 ? !0 : +n.amountAsString <= s ? `Must be more than ${s}` : !0;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function me(s, m = !1) {
|
|
21
|
-
return function(r) {
|
|
22
|
-
const o = O()(r);
|
|
23
|
-
if (o != !0)
|
|
24
|
-
return m ? o : !0;
|
|
25
|
-
const v = w(s, r.modelValue.measurement);
|
|
26
|
-
return ue(+r.amountAsString).precision > v ? `Cannot exceed precision more than ${k({
|
|
27
|
-
amount: 1,
|
|
28
|
-
precision: v
|
|
29
|
-
})}` : !0;
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
const ce = { class: "flex flex-col" }, de = { class: "flex flex-col" }, pe = { class: "flex-1" }, fe = { class: "flex items-center gap-4" }, ve = { class: "flex-1" }, be = {
|
|
33
|
-
key: 0,
|
|
34
|
-
class: "text-fm-color-typo-secondary"
|
|
35
|
-
}, he = { class: "text-fm-color-typo-secondary whitespace-nowrap" }, ye = { class: "flex items-center gap-4" }, Fe = { class: "max-w-[200px] flex flex-col gap-[1px]" }, _e = /* @__PURE__ */ K({
|
|
36
|
-
__name: "FmUnitInput",
|
|
37
|
-
props: /* @__PURE__ */ j({
|
|
38
|
-
modelValue: {},
|
|
39
|
-
unit: {},
|
|
40
|
-
rules: {},
|
|
41
|
-
zIndex: {},
|
|
42
|
-
applyDefaultRules: { type: Boolean },
|
|
43
|
-
placement: {},
|
|
44
|
-
separator: {},
|
|
45
|
-
precision: {},
|
|
46
|
-
convertAmountOnChangeUnit: { type: Boolean },
|
|
47
|
-
placeholder: {},
|
|
48
|
-
minLength: {},
|
|
49
|
-
maxLength: {},
|
|
50
|
-
inputmode: {},
|
|
51
|
-
type: {},
|
|
52
|
-
readonly: { type: Boolean },
|
|
53
|
-
labelMark: {},
|
|
54
|
-
prependIcon: {},
|
|
55
|
-
appendIcon: {},
|
|
56
|
-
showValidBorder: { type: Boolean },
|
|
57
|
-
labelInfo: {},
|
|
58
|
-
showWordCount: { type: Boolean },
|
|
59
|
-
invalid: { type: Boolean },
|
|
60
|
-
autofocus: { type: Boolean },
|
|
61
|
-
formatter: { type: Function },
|
|
62
|
-
decimal: {},
|
|
63
|
-
datalist: {},
|
|
64
|
-
shiftDatalist: { type: Boolean },
|
|
65
|
-
datalistMaxHeight: {},
|
|
66
|
-
datalistMinHeight: {},
|
|
67
|
-
offsetDatalist: {},
|
|
68
|
-
datalistPlacement: {},
|
|
69
|
-
datalistZIndex: {},
|
|
70
|
-
datalistWidth: {},
|
|
71
|
-
label: {},
|
|
72
|
-
disabled: { type: Boolean },
|
|
73
|
-
focused: { type: Boolean },
|
|
74
|
-
helperText: {},
|
|
75
|
-
helperState: {}
|
|
76
|
-
}, {
|
|
77
|
-
modelValue: {},
|
|
78
|
-
modelModifiers: {}
|
|
79
|
-
}),
|
|
80
|
-
emits: /* @__PURE__ */ j(["update:amount", "update:measurement"], ["update:modelValue"]),
|
|
81
|
-
setup(s, { emit: m }) {
|
|
82
|
-
var U;
|
|
83
|
-
const n = s, r = m, o = Q(s, "modelValue"), v = S(), V = i(() => {
|
|
84
|
-
var t;
|
|
85
|
-
return w(n.unit, (t = o.value) == null ? void 0 : t.measurement);
|
|
86
|
-
}), c = y(k(((U = o.value) == null ? void 0 : U.amount) ?? M.reset()));
|
|
87
|
-
L(c, (e) => {
|
|
88
|
-
const t = v(e), l = n.precision ?? V.value;
|
|
89
|
-
t == !0 && (o.value = {
|
|
90
|
-
...o.value,
|
|
91
|
-
amount: se(+e, l)
|
|
92
|
-
}), r("update:amount", e);
|
|
93
|
-
});
|
|
94
|
-
const q = Symbol.for("fm:form-state"), x = X(q, null), N = i(() => n.disabled ?? (x == null ? void 0 : x.getDisabled()) ?? !1), W = y(), g = y(!1), P = y(!1), E = i(() => g.value || P.value), G = i(() => {
|
|
95
|
-
var e;
|
|
96
|
-
return [
|
|
97
|
-
{
|
|
98
|
-
label: (e = n.unit) == null ? void 0 : e.abbrev,
|
|
99
|
-
value: null
|
|
100
|
-
},
|
|
101
|
-
...n.unit.measurements.map((t) => ({
|
|
102
|
-
label: t.abbrev,
|
|
103
|
-
value: t.id
|
|
104
|
-
}))
|
|
105
|
-
];
|
|
106
|
-
}), A = i({
|
|
107
|
-
get() {
|
|
108
|
-
var e, t;
|
|
109
|
-
return ((t = (e = o.value) == null ? void 0 : e.measurement) == null ? void 0 : t.id) ?? null;
|
|
110
|
-
},
|
|
111
|
-
set(e) {
|
|
112
|
-
if (e == null)
|
|
113
|
-
o.value = {
|
|
114
|
-
...o.value ?? z(),
|
|
115
|
-
measurement: null
|
|
116
|
-
}, r("update:measurement", null);
|
|
117
|
-
else {
|
|
118
|
-
const t = n.unit.measurements.find((l) => l.id === e) ?? null;
|
|
119
|
-
o.value = {
|
|
120
|
-
...o.value ?? z(),
|
|
121
|
-
measurement: t
|
|
122
|
-
}, r("update:measurement", t);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
L(A, (e, t) => {
|
|
127
|
-
var B;
|
|
128
|
-
if (!n.convertAmountOnChangeUnit)
|
|
129
|
-
return;
|
|
130
|
-
const l = ((B = o.value) == null ? void 0 : B.amount) ?? M.reset(), b = n.unit.measurements.find((D) => D.id === t) ?? null, p = n.unit.measurements.find((D) => D.id === e) ?? null, h = b ? re(l, b.conversion) : l, I = p ? ie(h, p.conversion) : h, _ = w(n.unit, p), a = M.convertPrecision({
|
|
131
|
-
value: I,
|
|
132
|
-
precision: _
|
|
133
|
-
});
|
|
134
|
-
c.value = k(a);
|
|
135
|
-
});
|
|
136
|
-
const H = i(() => {
|
|
137
|
-
var e, t;
|
|
138
|
-
return ((t = (e = o.value) == null ? void 0 : e.measurement) == null ? void 0 : t.abbrev) ?? n.unit.abbrev;
|
|
139
|
-
}), Z = i(
|
|
140
|
-
() => {
|
|
141
|
-
var e;
|
|
142
|
-
return ((e = n.rules) == null ? void 0 : e.map(
|
|
143
|
-
(t) => (l) => typeof t == "function" ? t(l) : t
|
|
144
|
-
)) ?? [];
|
|
145
|
-
}
|
|
146
|
-
), J = i(() => [...n.applyDefaultRules ? [O(), me(n.unit)] : [], ...Z.value]);
|
|
147
|
-
return (e, t) => {
|
|
148
|
-
const l = d("FmLabel"), b = d("FmIcon"), p = d("FmMenuItem"), h = d("FmMenu"), I = d("FmField"), _ = d("FmFormGroup");
|
|
149
|
-
return F(), R("div", ce, [
|
|
150
|
-
u("div", de, [
|
|
151
|
-
u("div", pe, [
|
|
152
|
-
f(l, {
|
|
153
|
-
label: e.label,
|
|
154
|
-
disabled: e.disabled,
|
|
155
|
-
required: e.labelMark === "required",
|
|
156
|
-
optional: e.labelMark === "optional"
|
|
157
|
-
}, null, 8, ["label", "disabled", "required", "optional"])
|
|
158
|
-
]),
|
|
159
|
-
f(I, { focused: E.value }, {
|
|
160
|
-
default: C(() => [
|
|
161
|
-
u("div", fe, [
|
|
162
|
-
T(e.$slots, "prepend"),
|
|
163
|
-
u("div", ve, [
|
|
164
|
-
Y(u("input", {
|
|
165
|
-
type: "text",
|
|
166
|
-
ref_key: "inputRef",
|
|
167
|
-
ref: W,
|
|
168
|
-
onFocus: t[0] || (t[0] = () => g.value = !0),
|
|
169
|
-
onBlur: t[1] || (t[1] = () => g.value = !1),
|
|
170
|
-
"onUpdate:modelValue": t[2] || (t[2] = (a) => c.value = a),
|
|
171
|
-
class: ee({
|
|
172
|
-
"fm-text-field--input fm-typo-en-body-lg-400 text-right": !0,
|
|
173
|
-
"text-fm-color-typo-primary": !N.value,
|
|
174
|
-
"text-fm-color-typo-disabled": N.value
|
|
175
|
-
})
|
|
176
|
-
}, null, 34), [
|
|
177
|
-
[te, c.value]
|
|
178
|
-
])
|
|
179
|
-
]),
|
|
180
|
-
e.separator ? (F(), R("div", be, $(e.separator), 1)) : ne("", !0),
|
|
181
|
-
u("div", he, [
|
|
182
|
-
f(h, {
|
|
183
|
-
onMenuChanged: t[3] || (t[3] = (a) => P.value = a),
|
|
184
|
-
"z-index": 500,
|
|
185
|
-
placement: e.placement
|
|
186
|
-
}, {
|
|
187
|
-
"menu-button": C(() => [
|
|
188
|
-
u("div", ye, [
|
|
189
|
-
u("div", null, $(H.value), 1),
|
|
190
|
-
f(b, { name: "keyboard_arrow_down" })
|
|
191
|
-
])
|
|
192
|
-
]),
|
|
193
|
-
default: C(() => [
|
|
194
|
-
u("div", Fe, [
|
|
195
|
-
(F(!0), R(oe, null, le(G.value, (a) => (F(), ae(p, {
|
|
196
|
-
key: a.value ?? void 0,
|
|
197
|
-
label: a.label,
|
|
198
|
-
"model-value": a.value == A.value,
|
|
199
|
-
onClick: (B) => A.value = a.value
|
|
200
|
-
}, null, 8, ["label", "model-value", "onClick"]))), 128))
|
|
201
|
-
])
|
|
202
|
-
]),
|
|
203
|
-
_: 1
|
|
204
|
-
}, 8, ["placement"])
|
|
205
|
-
]),
|
|
206
|
-
T(e.$slots, "append")
|
|
207
|
-
])
|
|
208
|
-
]),
|
|
209
|
-
_: 3
|
|
210
|
-
}, 8, ["focused"])
|
|
211
|
-
]),
|
|
212
|
-
f(_, {
|
|
213
|
-
class: "flex-1",
|
|
214
|
-
"model-value": { modelValue: o.value, amountAsString: String(c.value) },
|
|
215
|
-
info: e.labelInfo,
|
|
216
|
-
rules: J.value,
|
|
217
|
-
"helper-text": e.helperText,
|
|
218
|
-
"helper-state": e.helperState
|
|
219
|
-
}, null, 8, ["model-value", "info", "rules", "helper-text", "helper-state"])
|
|
220
|
-
]);
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
export {
|
|
225
|
-
Ie as F,
|
|
226
|
-
_e as _,
|
|
227
|
-
O as a,
|
|
228
|
-
me as b
|
|
229
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { defineComponent as f, openBlock as s, createElementBlock as n, createElementVNode as r, toDisplayString as o, Fragment as u, renderList as p, unref as x } from "vue";
|
|
2
|
-
import { a, b as d } from "./date2-B96h4mWb.js";
|
|
3
|
-
const y = { class: "flex flex-col" }, _ = { class: "flex flex-row fm-typo-en-body-md-600 bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary h-48 items-center" }, v = { class: "flex-1 py-8 px-16" }, h = /* @__PURE__ */ r("div", {
|
|
4
|
-
class: "flex-0 py-8 px-16",
|
|
5
|
-
style: { "flex-basis": "120px" }
|
|
6
|
-
}, "Amount", -1), b = { class: "flex-1 py-8 px-16" }, g = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "flex-0 py-8 px-16",
|
|
9
|
-
style: { "flex-basis": "120px" }
|
|
10
|
-
}, k = {
|
|
11
|
-
key: 1,
|
|
12
|
-
class: "flex-0 py-8 px-16",
|
|
13
|
-
style: { "flex-basis": "120px" }
|
|
14
|
-
}, I = /* @__PURE__ */ f({
|
|
15
|
-
__name: "IngredientBindedItem",
|
|
16
|
-
props: {
|
|
17
|
-
name: {},
|
|
18
|
-
bindings: {}
|
|
19
|
-
},
|
|
20
|
-
setup(B) {
|
|
21
|
-
function m(e, l) {
|
|
22
|
-
var t;
|
|
23
|
-
if (e.measurement) {
|
|
24
|
-
const c = d(e.amount, e.measurement.conversion);
|
|
25
|
-
return `${a(c, !1)} ${(t = e.measurement) == null ? void 0 : t.abbrev}`;
|
|
26
|
-
}
|
|
27
|
-
return `${a(e.amount, !1)} ${l.abbrev}`;
|
|
28
|
-
}
|
|
29
|
-
function i(e) {
|
|
30
|
-
return e.unit !== void 0;
|
|
31
|
-
}
|
|
32
|
-
return (e, l) => (s(), n("div", y, [
|
|
33
|
-
r("div", _, [
|
|
34
|
-
r("div", v, o(e.name), 1),
|
|
35
|
-
h
|
|
36
|
-
]),
|
|
37
|
-
(s(!0), n(u, null, p(e.bindings, (t) => (s(), n("div", {
|
|
38
|
-
key: t.id,
|
|
39
|
-
class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
|
|
40
|
-
}, [
|
|
41
|
-
r("div", b, o(t.name), 1),
|
|
42
|
-
i(t) ? (s(), n("div", g, o(m(t, t.unit)), 1)) : (s(), n("div", k, o(x(a)(t.amount, !1)), 1))
|
|
43
|
-
]))), 128))
|
|
44
|
-
]));
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
export {
|
|
48
|
-
I as _
|
|
49
|
-
};
|