@feedmepos/mf-inventory-portal 1.0.15-dev.2 → 1.0.15-dev.4
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-CgxrN-aD.js → App-C2-uZBjX.js} +2 -2
- package/dist/ApprovalView-BYSG24mC.js +213 -0
- package/dist/{BindingsDialog-B_ZMDl-b.js → BindingsDialog-BVgAl7QB.js} +2 -2
- package/dist/{BindingsPicker-B84BG8zT.js → BindingsPicker-CTqO6MTh.js} +1 -1
- package/dist/{BindingsTable-DrvoykYc.js → BindingsTable-DAkGh7yD.js} +1 -1
- package/dist/{ClosingDraftView-Ds9sI2Eg.js → ClosingDraftView-CJe3za1B.js} +41 -41
- package/dist/{ClosingTemplateView-BhZ1OXkD.js → ClosingTemplateView-CzuyG1NM.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-Yuxf-jCh.js → DeliveryOrderPrintPreview-DC-S5Jkp.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D6ktiUO5.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BIR8hIIx.js} +43 -43
- package/dist/{FmMultiselectDialog-4lVsA2Rn.js → FmMultiselectDialog-CyhyAmUf.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-XmTRSHn_.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DbASoXHB.js} +57 -57
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-B3PvtR0j.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BNcVcxkw.js} +1 -1
- package/dist/IngredientGroupView-CoVSqi7W.js +977 -0
- package/dist/IngredientsView-auG4thna.js +1778 -0
- package/dist/{IntegrationView-BnrCkjWt.js → IntegrationView-BCGzax4k.js} +5 -5
- package/dist/{InventoryBindingForm-uyHh2TI_.js → InventoryBindingForm-BlpwH-je.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CECDj9Pw.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DJxy3D57.js} +46 -46
- package/dist/{InventoryBindingSummary-DyHCqgIe.js → InventoryBindingSummary-B1dzBf4n.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Dx2lMf6h.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BqxFQWOu.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BCX3vlmU.js → PremiumBadge.vue_vue_type_script_setup_true_lang-COUgrdWW.js} +15 -15
- package/dist/{PublishView-BVGyY6nn.js → PublishView-DRiyZ8D8.js} +13 -13
- package/dist/{PurchaseOrderPrintPreview-pbYIFiOG.js → PurchaseOrderPrintPreview-DQjCaQ1U.js} +4 -4
- package/dist/ReceiveRequestView-B88Nfuck.js +2576 -0
- package/dist/{RecipeView-DcgoCf4g.js → RecipeView-B-PR_bJO.js} +4 -4
- package/dist/{StockView-zO2uL662.js → StockView-DWZ9OiPc.js} +108 -108
- package/dist/{SupplierView-I5bqiX_2.js → SupplierView-BXLJkj_P.js} +37 -37
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-GMAU4wTt.js +2090 -0
- package/dist/{TransferTemplateView-BDOt17yc.js → TransferTemplateView-BU4CJAi6.js} +149 -149
- package/dist/{UnitView-BVY5S6-3.js → UnitView-6Z2MUNL0.js} +32 -32
- package/dist/{WarehouseView-m6MKrtYq.js → WarehouseView-TVrrr6uJ.js} +26 -26
- package/dist/api/inventory.d.ts +12 -0
- package/dist/{app-DtICLubM.js → app-BFIrvTDw.js} +33844 -25682
- package/dist/app.d.ts +1 -0
- package/dist/app.js +5 -5
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +36 -0
- package/dist/{decimal-C1dAcCf3.js → decimal-wpLnNWZL.js} +1 -1
- package/dist/{feature-Y7qzvbl4.js → feature-BvpauT6E.js} +79 -79
- package/dist/{format-unit-display-CPqfS4vp.js → format-unit-display-BbK1Rcd3.js} +48 -48
- package/dist/helper/rules.d.ts +1 -1
- package/dist/{index-DIEdSG3y.js → index-C2nfh-Rm.js} +1 -1
- package/dist/{index-0qsqwB0T.js → index-DI7DUbNm.js} +4 -4
- package/dist/{stock-CowNp_xM.js → stock-DkHVa1PB.js} +1 -1
- package/dist/stores/inventory.d.ts +16 -0
- package/dist/{supplier-JVTTlQNL.js → supplier-BiJ-_4RN.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-Df59lld2.js → use-ingredient-select-dialog-Bkt9TvKm.js} +5 -5
- package/dist/{use-inventory-binding-dialog-Bxxb93Kz.js → use-inventory-binding-dialog-ClzflO2S.js} +1 -1
- package/dist/views/ingredient-group/components/ingredient-group-rule-field/IngredientGroupRuleField.vue.d.ts +4 -0
- package/dist/views/ingredient-group/composables/use-ingredient-group-rule-item.d.ts +5 -0
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +12 -0
- package/dist/{vue-i18n-DJOdRwc3.js → vue-i18n-Bvbu7J8Z.js} +153 -153
- package/package.json +4 -4
- package/dist/ApprovalView-DNGhkVc9.js +0 -147
- package/dist/IngredientGroupView-usK9stxT.js +0 -8779
- package/dist/IngredientsView-DPx8Z2zo.js +0 -1749
- package/dist/ReceiveRequestView-DZAgH2_u.js +0 -2516
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-NyQg_yR9.js +0 -2020
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { i as T, t as
|
|
2
|
-
import { u as
|
|
3
|
-
import { P as F } from "./format-unit-display-
|
|
4
|
-
import { computed as f, defineComponent as j, mergeModels as q, useModel as x, ref as W, resolveComponent as V, openBlock as S, createElementBlock as
|
|
1
|
+
import { i as T, t as R, as as M, u as B, aw as E, aH as H, aI as z, aJ as U } from "./app-BFIrvTDw.js";
|
|
2
|
+
import { u as D } from "./supplier-BiJ-_4RN.js";
|
|
3
|
+
import { P as F } from "./format-unit-display-BbK1Rcd3.js";
|
|
4
|
+
import { computed as f, defineComponent as j, mergeModels as q, useModel as x, ref as W, resolveComponent as V, openBlock as S, createElementBlock as I, normalizeStyle as $, createElementVNode as N, createVNode as J, withCtx as K, createBlock as g, createCommentVNode as O, Fragment as Q, renderList as X, unref as w } from "vue";
|
|
5
5
|
function Y(t, i, a) {
|
|
6
|
-
var
|
|
7
|
-
if (!!i.measurement === !!a && ((
|
|
6
|
+
var s;
|
|
7
|
+
if (!!i.measurement === !!a && ((s = i.measurement) == null ? void 0 : s.id) === a)
|
|
8
8
|
return i;
|
|
9
9
|
if (!a)
|
|
10
10
|
return {
|
|
11
11
|
costPerUnit: i.costPerUnit
|
|
12
12
|
};
|
|
13
|
-
const
|
|
14
|
-
return
|
|
13
|
+
const o = t.measurements.find((p) => p.id === a);
|
|
14
|
+
return o ? {
|
|
15
15
|
costPerUnit: i.costPerUnit,
|
|
16
|
-
measurement:
|
|
16
|
+
measurement: o
|
|
17
17
|
} : {
|
|
18
18
|
costPerUnit: i.costPerUnit
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function se(t, i, a, l) {
|
|
22
22
|
var P, _, n;
|
|
23
23
|
if (l != null && l.manualTotalCost)
|
|
24
24
|
return l == null ? void 0 : l.manualTotalCost;
|
|
25
25
|
const u = (n = (_ = (P = l == null ? void 0 : l.supplier) == null ? void 0 : P.supplyItems) == null ? void 0 : _.find(
|
|
26
26
|
(e) => e.skuId === t._id
|
|
27
|
-
)) == null ? void 0 : n.defaultCost,
|
|
27
|
+
)) == null ? void 0 : n.defaultCost, o = t.defaultCost ? Y(t.unit, t.defaultCost, t.trackingMeasurement) : void 0, s = u ?? o, p = s == null ? void 0 : s.costPerUnit, y = p ? s != null && s.measurement ? +T(p) / +T(s == null ? void 0 : s.measurement.conversion) : +T(p) : void 0, v = y ? a ? y * +T(a.conversion) : y : void 0, h = v ? +T(i) * v : void 0;
|
|
28
28
|
return h ? {
|
|
29
|
-
...
|
|
30
|
-
currency:
|
|
29
|
+
...R(h ?? 0, 2),
|
|
30
|
+
currency: M()
|
|
31
31
|
} : {
|
|
32
32
|
amount: 0,
|
|
33
33
|
precision: 0,
|
|
34
|
-
currency:
|
|
34
|
+
currency: M()
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
function k(t) {
|
|
@@ -55,20 +55,20 @@ function L(t) {
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
const u =
|
|
60
|
-
|
|
58
|
+
function oe(t, i, a = !1, l = !1) {
|
|
59
|
+
const u = D(), o = B();
|
|
60
|
+
o.watchLocation(async () => {
|
|
61
61
|
var b;
|
|
62
62
|
await u.readSuppliers();
|
|
63
63
|
const n = t();
|
|
64
64
|
if ((b = n.supplier) != null && b._id) return;
|
|
65
|
-
const e = l ? u.suppliers[0] : u.businessSuppliers[0], r = (a ?
|
|
65
|
+
const e = l ? u.suppliers[0] : u.businessSuppliers[0], r = (a ? o.locations.filter((m) => m.doc._id !== o.currentLocation.doc._id) : o.locations)[0];
|
|
66
66
|
i({
|
|
67
67
|
...n,
|
|
68
68
|
supplier: e ? k(e) : r ? L(r) : n.supplier
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
|
-
const
|
|
71
|
+
const s = f(
|
|
72
72
|
() => {
|
|
73
73
|
var n, e;
|
|
74
74
|
return typeof ((e = (n = t()) == null ? void 0 : n.supplier) == null ? void 0 : e.internal) == "string" ? F.TRANSFER : F.PURCHASE;
|
|
@@ -80,15 +80,15 @@ function se(t, i, a = !1, l = !1) {
|
|
|
80
80
|
},
|
|
81
81
|
set(n) {
|
|
82
82
|
const e = t() ?? {};
|
|
83
|
-
if (
|
|
84
|
-
const C = (l ? u.suppliers : u.businessSuppliers).find((
|
|
83
|
+
if (s.value === F.PURCHASE) {
|
|
84
|
+
const C = (l ? u.suppliers : u.businessSuppliers).find((A) => A._id === n);
|
|
85
85
|
i({
|
|
86
86
|
...e,
|
|
87
87
|
supplier: C ? k(C) : e.supplier
|
|
88
88
|
});
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
|
-
const b = (a ?
|
|
91
|
+
const b = (a ? o.locations.filter((m) => m.doc._id !== o.currentLocation.doc._id) : o.locations).find((m) => m.doc._id === n);
|
|
92
92
|
i({
|
|
93
93
|
...e,
|
|
94
94
|
supplier: b ? L(b) : e.supplier
|
|
@@ -99,10 +99,10 @@ function se(t, i, a = !1, l = !1) {
|
|
|
99
99
|
return l ? [...e, ...n] : e;
|
|
100
100
|
}), c = f(() => {
|
|
101
101
|
var d;
|
|
102
|
-
const n = ((d =
|
|
103
|
-
return (a ?
|
|
102
|
+
const n = ((d = o._currentLocation) == null ? void 0 : d.type) === E.warehouse;
|
|
103
|
+
return (a ? o.locations.filter((r) => r.doc._id !== o.currentLocation.doc._id) : o.locations).filter((r) => n || r.acceptRequest).map(L);
|
|
104
104
|
}), P = f(() => {
|
|
105
|
-
if (
|
|
105
|
+
if (s.value === F.PURCHASE) {
|
|
106
106
|
const e = y.value.map((r) => ({
|
|
107
107
|
label: r.name,
|
|
108
108
|
value: r._id
|
|
@@ -121,11 +121,11 @@ function se(t, i, a = !1, l = !1) {
|
|
|
121
121
|
}), _ = f(() => {
|
|
122
122
|
var r, b;
|
|
123
123
|
const n = (b = (r = t()) == null ? void 0 : r.supplier) == null ? void 0 : b._id;
|
|
124
|
-
if (
|
|
124
|
+
if (s.value === F.PURCHASE) {
|
|
125
125
|
const m = u.suppliers.find((C) => C._id === n);
|
|
126
126
|
return m ? k(m) : null;
|
|
127
127
|
}
|
|
128
|
-
const d =
|
|
128
|
+
const d = o.locations.find((m) => m.doc._id);
|
|
129
129
|
return d ? L(d) : null;
|
|
130
130
|
});
|
|
131
131
|
return {
|
|
@@ -153,18 +153,18 @@ const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ j({
|
|
|
153
153
|
emits: ["update:search"],
|
|
154
154
|
setup(t) {
|
|
155
155
|
const i = t, a = x(t, "search"), l = f(
|
|
156
|
-
() => new
|
|
157
|
-
), u = f(() => l.value.search(a.value)),
|
|
158
|
-
return console.log({ stickyRef:
|
|
156
|
+
() => new z(i.items, ["label", "sublabel"], i.options)
|
|
157
|
+
), u = f(() => l.value.search(a.value)), o = W();
|
|
158
|
+
return console.log({ stickyRef: o }), (s, p) => {
|
|
159
159
|
const y = V("FmButton"), v = V("FmTextField"), h = V("FmMenuItem");
|
|
160
|
-
return S(),
|
|
160
|
+
return S(), I("div", {
|
|
161
161
|
class: "relative",
|
|
162
|
-
style: $({ width:
|
|
162
|
+
style: $({ width: s.width })
|
|
163
163
|
}, [
|
|
164
|
-
|
|
164
|
+
N("div", {
|
|
165
165
|
class: "sticky top-0 bg-white mb-8",
|
|
166
166
|
ref_key: "stickyRef",
|
|
167
|
-
ref:
|
|
167
|
+
ref: o
|
|
168
168
|
}, [
|
|
169
169
|
J(v, {
|
|
170
170
|
modelValue: a.value,
|
|
@@ -177,24 +177,24 @@ const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ j({
|
|
|
177
177
|
variant: "tertiary",
|
|
178
178
|
"prepend-icon": "close",
|
|
179
179
|
onClick: p[0] || (p[0] = (c) => a.value = "")
|
|
180
|
-
})) :
|
|
180
|
+
})) : O("", !0)
|
|
181
181
|
]),
|
|
182
182
|
_: 1
|
|
183
183
|
}, 8, ["modelValue"])
|
|
184
184
|
], 512),
|
|
185
|
-
|
|
186
|
-
(S(!0),
|
|
185
|
+
N("div", Z, [
|
|
186
|
+
(S(!0), I(Q, null, X(u.value, (c, P) => (S(), g(h, {
|
|
187
187
|
key: P,
|
|
188
188
|
label: c.label,
|
|
189
189
|
sublabel: c.sublabel,
|
|
190
|
-
"model-value":
|
|
191
|
-
onClick: () =>
|
|
190
|
+
"model-value": w(U)(s.modelValue, c.value),
|
|
191
|
+
onClick: () => s.handleItemChange(w(U)(s.modelValue, c.value), c),
|
|
192
192
|
onVnodeMounted: (_) => {
|
|
193
193
|
var n, e;
|
|
194
|
-
return
|
|
194
|
+
return w(U)(s.modelValue, c.value) && ((n = _.el) == null || n.scrollIntoView({ behavior: "instant", block: "end" }), (e = _.el) == null || e.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
|
|
195
195
|
}
|
|
196
196
|
}, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
|
|
197
|
-
u.value.length ?
|
|
197
|
+
u.value.length ? O("", !0) : (S(), g(h, {
|
|
198
198
|
key: 0,
|
|
199
199
|
disabled: "",
|
|
200
200
|
label: "No options available"
|
|
@@ -206,6 +206,6 @@ const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ j({
|
|
|
206
206
|
});
|
|
207
207
|
export {
|
|
208
208
|
ae as _,
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
se as c,
|
|
210
|
+
oe as u
|
|
211
211
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineStore as p } from "pinia";
|
|
2
2
|
import { useDialog as y } from "@feedmepos/ui-library";
|
|
3
3
|
import { useI18n as v } from "@feedmepos/mf-common";
|
|
4
|
-
import {
|
|
4
|
+
import { a0 as a } from "./app-BFIrvTDw.js";
|
|
5
5
|
import { h as S } from "vue";
|
|
6
6
|
const w = p("inventoryMultiSelectDialog", () => {
|
|
7
7
|
const l = y(), { t: n } = v();
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { defineComponent as se, mergeModels as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as se, mergeModels as j, useModel as ie, computed as v, ref as k, watch as z, onBeforeUnmount as le, inject as ae, resolveComponent as b, openBlock as f, createElementBlock as y, createElementVNode as u, createVNode as M, withCtx as x, renderSlot as q, normalizeClass as L, toDisplayString as A, withDirectives as ue, vModelText as re, createCommentVNode as W, createTextVNode as me, createBlock as E, Fragment as ce, renderList as de } from "vue";
|
|
2
|
+
import { O as B, I as D, W as T, P as pe, i as h, aF as fe, t as ve, L as be, am as ye, aD as Me, aC as he } from "./app-BFIrvTDw.js";
|
|
3
3
|
import "@feedmepos/ui-library";
|
|
4
|
-
function
|
|
4
|
+
function G() {
|
|
5
5
|
return {
|
|
6
6
|
amount: B.reset()
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Z() {
|
|
10
10
|
return function(p) {
|
|
11
11
|
return D()(p.amountAsString);
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function Le(l) {
|
|
15
15
|
return function(t) {
|
|
16
16
|
return D()(t.amountAsString) !== !0 ? !0 : +t.amountAsString < l ? `Must be at least ${l}` : !0;
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Te(l) {
|
|
20
20
|
return function(t) {
|
|
21
21
|
return D()(t.amountAsString) !== !0 ? !0 : +t.amountAsString > l ? `Must be at most ${l}` : !0;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function H(l, p = !1) {
|
|
25
25
|
return function(m) {
|
|
26
|
-
const s =
|
|
26
|
+
const s = Z()(m);
|
|
27
27
|
if (s != !0)
|
|
28
28
|
return p ? s : !0;
|
|
29
|
-
const _ = typeof l == "number" ? l :
|
|
29
|
+
const _ = typeof l == "number" ? l : T(l, m.modelValue.measurement);
|
|
30
30
|
return pe(+m.amountAsString).precision > _ ? `Cannot exceed precision more than ${h({
|
|
31
31
|
amount: 1,
|
|
32
32
|
precision: _
|
|
33
33
|
})}` : !0;
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function Oe(l) {
|
|
37
37
|
const p = fe(l);
|
|
38
38
|
return function(m) {
|
|
39
39
|
return p(m.modelValue.amount);
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
const ge = { class: "flex flex-col" },
|
|
42
|
+
const ge = { class: "flex flex-col" }, Fe = { class: "flex flex-col" }, xe = { class: "flex-1" }, Ae = { class: "flex items-center gap-4" }, _e = { class: "flex-1 flex gap-4" }, Pe = { class: "shrink-0 grow basis-2/5" }, Ie = {
|
|
43
43
|
key: 0,
|
|
44
44
|
class: "text-fm-color-typo-secondary"
|
|
45
45
|
}, ke = {
|
|
@@ -48,15 +48,15 @@ const ge = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
48
48
|
}, Be = { class: "flex items-center gap-4" }, De = { class: "line-clamp-1 text-ellipsis break-all" }, Re = { class: "max-w-[200px] flex flex-col gap-[1px]" }, Ue = {
|
|
49
49
|
key: 1,
|
|
50
50
|
class: "flex flex-col gap-4 pl-8 shrink-0"
|
|
51
|
-
},
|
|
51
|
+
}, Ce = {
|
|
52
52
|
class: "flex items-center",
|
|
53
53
|
style: { "pointer-events": "none" }
|
|
54
|
-
},
|
|
54
|
+
}, we = {
|
|
55
55
|
class: "flex items-center",
|
|
56
56
|
style: { "pointer-events": "none" }
|
|
57
|
-
},
|
|
57
|
+
}, $e = /* @__PURE__ */ se({
|
|
58
58
|
__name: "FmUnitInput",
|
|
59
|
-
props: /* @__PURE__ */
|
|
59
|
+
props: /* @__PURE__ */ j({
|
|
60
60
|
modelValue: {},
|
|
61
61
|
unit: {},
|
|
62
62
|
rules: {},
|
|
@@ -103,19 +103,19 @@ const ge = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
103
103
|
modelValue: {},
|
|
104
104
|
modelModifiers: {}
|
|
105
105
|
}),
|
|
106
|
-
emits: /* @__PURE__ */
|
|
106
|
+
emits: /* @__PURE__ */ j(["update:amount", "update:measurement"], ["update:modelValue"]),
|
|
107
107
|
setup(l, { emit: p }) {
|
|
108
108
|
const t = l, m = p, s = ie(l, "modelValue"), _ = D(), R = v(() => {
|
|
109
109
|
var n;
|
|
110
|
-
return
|
|
110
|
+
return T(t.unit, (n = s.value) == null ? void 0 : n.measurement);
|
|
111
111
|
}), d = k((() => {
|
|
112
112
|
var o;
|
|
113
113
|
const e = ((o = s.value) == null ? void 0 : o.amount) ?? B.reset(), n = Me(e), i = t.formatMinimumPrecision ?? n.precision, a = he(n, i);
|
|
114
114
|
return h(a);
|
|
115
115
|
})());
|
|
116
|
-
let
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
let F = null;
|
|
117
|
+
z(d, (e) => {
|
|
118
|
+
F && clearTimeout(F), F = setTimeout(() => {
|
|
119
119
|
var r;
|
|
120
120
|
const n = _(e), i = t.precision ?? R.value, o = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > i ? t.formatMinimumPrecision : i;
|
|
121
121
|
if (n == !0) {
|
|
@@ -128,9 +128,9 @@ const ge = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
128
128
|
m("update:amount", e);
|
|
129
129
|
}, 500);
|
|
130
130
|
}), le(() => {
|
|
131
|
-
|
|
131
|
+
F && clearTimeout(F);
|
|
132
132
|
});
|
|
133
|
-
const
|
|
133
|
+
const K = Symbol.for("fm:form-state"), U = ae(K, null), P = v(() => t.disabled ?? (U == null ? void 0 : U.getDisabled()) ?? !1), Q = k(), C = k(!1), O = k(!1), X = v(() => C.value || O.value), Y = v(() => {
|
|
134
134
|
var a;
|
|
135
135
|
const i = [...t.unit.measurements.filter((o) => !o.name.toLocaleLowerCase().includes("inactive")).filter((o) => o.abbrev !== t.unit.abbrev || +h(o.conversion) != 1).groupBy(
|
|
136
136
|
(o) => `${o.abbrev}${h(o.conversion)}`
|
|
@@ -145,7 +145,7 @@ const ge = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
145
145
|
value: o.id
|
|
146
146
|
}))
|
|
147
147
|
];
|
|
148
|
-
}),
|
|
148
|
+
}), w = v({
|
|
149
149
|
get() {
|
|
150
150
|
var e, n;
|
|
151
151
|
return ((n = (e = s.value) == null ? void 0 : e.measurement) == null ? void 0 : n.id) ?? null;
|
|
@@ -153,23 +153,23 @@ const ge = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
153
153
|
set(e) {
|
|
154
154
|
if (e == null)
|
|
155
155
|
s.value = {
|
|
156
|
-
...s.value ??
|
|
156
|
+
...s.value ?? G(),
|
|
157
157
|
measurement: null
|
|
158
158
|
}, m("update:measurement", null);
|
|
159
159
|
else {
|
|
160
160
|
const n = t.unit.measurements.find((i) => i.id === e) ?? null;
|
|
161
161
|
s.value = {
|
|
162
|
-
...s.value ??
|
|
162
|
+
...s.value ?? G(),
|
|
163
163
|
measurement: n
|
|
164
164
|
}, m("update:measurement", n);
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
});
|
|
168
|
-
|
|
168
|
+
z(w, (e, n) => {
|
|
169
169
|
var c;
|
|
170
170
|
if (!t.convertAmountOnChangeUnit)
|
|
171
171
|
return;
|
|
172
|
-
const i = ((c = s.value) == null ? void 0 : c.amount) ?? B.reset(), a = t.unit.measurements.find((I) => I.id === n) ?? null, o = t.unit.measurements.find((I) => I.id === e) ?? null, r = a ? be(i, a.conversion) : i, g = o ? ye(r, o.conversion) : r, S =
|
|
172
|
+
const i = ((c = s.value) == null ? void 0 : c.amount) ?? B.reset(), a = t.unit.measurements.find((I) => I.id === n) ?? null, o = t.unit.measurements.find((I) => I.id === e) ?? null, r = a ? be(i, a.conversion) : i, g = o ? ye(r, o.conversion) : r, S = T(t.unit, o), V = B.convertPrecision({
|
|
173
173
|
value: g,
|
|
174
174
|
precision: S
|
|
175
175
|
});
|
|
@@ -186,10 +186,10 @@ const ge = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
186
186
|
)) ?? [];
|
|
187
187
|
}
|
|
188
188
|
), te = v(() => [...t.applyDefaultRules ? [
|
|
189
|
-
|
|
190
|
-
typeof t.precision == "number" ?
|
|
189
|
+
Z(),
|
|
190
|
+
typeof t.precision == "number" ? H(t.precision) : H(t.unit)
|
|
191
191
|
] : [], ...ee.value]);
|
|
192
|
-
function
|
|
192
|
+
function $(e) {
|
|
193
193
|
const n = t.precision ?? R.value, a = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > n ? t.formatMinimumPrecision : n, o = e.toFixed(a), r = o.includes(".") ? o.replace(/0+$/, "") : o;
|
|
194
194
|
return r.endsWith(".") ? r.slice(0, r.length - 1) : r;
|
|
195
195
|
}
|
|
@@ -197,19 +197,19 @@ const ge = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
197
197
|
if (!t.stepper)
|
|
198
198
|
return;
|
|
199
199
|
const e = +d.value + +h(t.stepper);
|
|
200
|
-
d.value =
|
|
200
|
+
d.value = $(e);
|
|
201
201
|
}
|
|
202
202
|
function oe() {
|
|
203
203
|
if (!t.stepper)
|
|
204
204
|
return;
|
|
205
205
|
const e = +d.value - +h(t.stepper);
|
|
206
|
-
d.value =
|
|
206
|
+
d.value = $(e);
|
|
207
207
|
}
|
|
208
208
|
return (e, n) => {
|
|
209
209
|
const i = b("FmLabel"), a = b("FmIcon"), o = b("FmMenuItem"), r = b("FmMenu"), g = b("FmTooltip"), S = b("FmField"), V = b("FmFormGroup");
|
|
210
210
|
return f(), y("div", ge, [
|
|
211
|
-
u("div",
|
|
212
|
-
u("div",
|
|
211
|
+
u("div", Fe, [
|
|
212
|
+
u("div", xe, [
|
|
213
213
|
M(i, {
|
|
214
214
|
label: e.label,
|
|
215
215
|
disabled: e.disabled,
|
|
@@ -218,14 +218,14 @@ const ge = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
218
218
|
}, null, 8, ["label", "disabled", "required", "optional"])
|
|
219
219
|
]),
|
|
220
220
|
M(S, { focused: X.value }, {
|
|
221
|
-
default:
|
|
221
|
+
default: x(() => [
|
|
222
222
|
u("div", Ae, [
|
|
223
223
|
q(e.$slots, "prepend"),
|
|
224
224
|
u("div", _e, [
|
|
225
225
|
u("div", Pe, [
|
|
226
226
|
e.stepperOnly ? (f(), y("span", {
|
|
227
227
|
key: 0,
|
|
228
|
-
class:
|
|
228
|
+
class: L({
|
|
229
229
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
230
230
|
"text-fm-color-typo-primary": !P.value,
|
|
231
231
|
"text-fm-color-typo-disabled": P.value
|
|
@@ -235,10 +235,10 @@ const ge = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
235
235
|
type: "text",
|
|
236
236
|
ref_key: "inputRef",
|
|
237
237
|
ref: Q,
|
|
238
|
-
onFocus: n[0] || (n[0] = () =>
|
|
239
|
-
onBlur: n[1] || (n[1] = () =>
|
|
238
|
+
onFocus: n[0] || (n[0] = () => C.value = !0),
|
|
239
|
+
onBlur: n[1] || (n[1] = () => C.value = !1),
|
|
240
240
|
"onUpdate:modelValue": n[2] || (n[2] = (c) => d.value = c),
|
|
241
|
-
class:
|
|
241
|
+
class: L({
|
|
242
242
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
243
243
|
"text-fm-color-typo-primary": !P.value,
|
|
244
244
|
"text-fm-color-typo-disabled": P.value
|
|
@@ -249,33 +249,33 @@ const ge = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
249
249
|
]),
|
|
250
250
|
e.separator ? (f(), y("div", Ie, A(e.separator), 1)) : W("", !0),
|
|
251
251
|
u("div", {
|
|
252
|
-
class:
|
|
252
|
+
class: L([e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"])
|
|
253
253
|
}, [
|
|
254
254
|
M(g, { "z-index": 51 }, {
|
|
255
|
-
content:
|
|
255
|
+
content: x(() => [
|
|
256
256
|
me(A(N.value), 1)
|
|
257
257
|
]),
|
|
258
|
-
default:
|
|
259
|
-
e.disableUnit ? (f(), y("div", ke, A(N.value), 1)) : (f(),
|
|
258
|
+
default: x(() => [
|
|
259
|
+
e.disableUnit ? (f(), y("div", ke, A(N.value), 1)) : (f(), E(r, {
|
|
260
260
|
key: 1,
|
|
261
|
-
onMenuChanged: n[3] || (n[3] = (c) =>
|
|
261
|
+
onMenuChanged: n[3] || (n[3] = (c) => O.value = c),
|
|
262
262
|
"z-index": 500,
|
|
263
263
|
placement: e.placement,
|
|
264
264
|
disabled: e.disabled
|
|
265
265
|
}, {
|
|
266
|
-
"menu-button":
|
|
266
|
+
"menu-button": x(() => [
|
|
267
267
|
u("div", Be, [
|
|
268
268
|
u("div", De, A(N.value), 1),
|
|
269
269
|
M(a, { name: "keyboard_arrow_down" })
|
|
270
270
|
])
|
|
271
271
|
]),
|
|
272
|
-
default:
|
|
272
|
+
default: x(() => [
|
|
273
273
|
u("div", Re, [
|
|
274
|
-
(f(!0), y(ce, null, de(Y.value, (c) => (f(),
|
|
274
|
+
(f(!0), y(ce, null, de(Y.value, (c) => (f(), E(o, {
|
|
275
275
|
key: c.value ?? void 0,
|
|
276
276
|
label: c.label,
|
|
277
|
-
"model-value": c.value ==
|
|
278
|
-
onClick: (I) =>
|
|
277
|
+
"model-value": c.value == w.value,
|
|
278
|
+
onClick: (I) => w.value = c.value
|
|
279
279
|
}, null, 8, ["label", "model-value", "onClick"]))), 128))
|
|
280
280
|
])
|
|
281
281
|
]),
|
|
@@ -290,7 +290,7 @@ const ge = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
290
290
|
class: "w-24 h-12 flex items-center justify-center fm-corner-radius-sm bg-fm-color-neutral-gray-100 hover:bg-fm-color-neutral-gray-200",
|
|
291
291
|
onClick: ne
|
|
292
292
|
}, [
|
|
293
|
-
u("div",
|
|
293
|
+
u("div", Ce, [
|
|
294
294
|
M(a, {
|
|
295
295
|
name: "expand_less",
|
|
296
296
|
size: "md"
|
|
@@ -301,7 +301,7 @@ const ge = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
301
301
|
class: "w-24 h-12 flex items-center justify-center fm-corner-radius-sm bg-fm-color-neutral-gray-100 hover:bg-fm-color-neutral-gray-200",
|
|
302
302
|
onClick: oe
|
|
303
303
|
}, [
|
|
304
|
-
u("div",
|
|
304
|
+
u("div", we, [
|
|
305
305
|
M(a, {
|
|
306
306
|
name: "expand_more",
|
|
307
307
|
size: "md"
|
|
@@ -329,10 +329,10 @@ const ge = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
329
329
|
}
|
|
330
330
|
});
|
|
331
331
|
export {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
332
|
+
Le as F,
|
|
333
|
+
$e as _,
|
|
334
|
+
Te as a,
|
|
335
|
+
Oe as b,
|
|
336
|
+
Z as c,
|
|
337
|
+
H as d
|
|
338
338
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p, openBlock as s, createElementBlock as n, createElementVNode as r, toDisplayString as o, unref as l, Fragment as d, renderList as x } from "vue";
|
|
2
|
-
import { i as a,
|
|
2
|
+
import { i as a, L as y } from "./app-BFIrvTDw.js";
|
|
3
3
|
import { useI18n as _ } from "@feedmepos/mf-common";
|
|
4
4
|
const v = { class: "flex flex-col" }, g = { 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" }, h = { class: "flex-1 py-8 px-16" }, b = {
|
|
5
5
|
class: "flex-0 py-8 px-16",
|