@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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as ee, ref as h, watch as te, computed as ae, resolveComponent as H, openBlock as D, createBlock as U, withCtx as x, createElementVNode as a, createVNode as r, unref as e, normalizeStyle as oe, toDisplayString as re, createElementBlock as se, createCommentVNode as ne, Teleport as le, mergeProps as ce } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { a as pe } from "./init-date-range-
|
|
4
|
-
import { a as me, b as ue, _ as de } from "./TransferDetails.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { q as G } from "./date2-
|
|
6
|
-
import { _ as fe } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-
|
|
7
|
-
import { _ as _e } from "./ChangeLocationComponent.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { _ as ve, F as _, u as he } from "./layout-
|
|
2
|
+
import { r as f, f as ie } from "./app-CjkBFVBh.js";
|
|
3
|
+
import { a as pe } from "./init-date-range-58-0kupV.js";
|
|
4
|
+
import { a as me, b as ue, _ as de } from "./TransferDetails.vue_vue_type_script_setup_true_lang-DzK7B6nw.js";
|
|
5
|
+
import { q as G } from "./date2-D-5KX0_X.js";
|
|
6
|
+
import { _ as fe } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-Dov3Uq2z.js";
|
|
7
|
+
import { _ as _e } from "./ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CYZ5Ecsh.js";
|
|
8
|
+
import { _ as ve, F as _, u as he } from "./layout-D2Kwl_3f.js";
|
|
9
9
|
import { useBreakpoints as De } from "@feedmepos/ui-library";
|
|
10
10
|
const xe = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, ge = { class: "px-8 flex gap-8 items-center xs:gap-0 xs:flex-col-reverse sm:gap-0 sm:flex-col-reverse" }, be = { class: "xs:w-full sm:w-full flex gap-8 items-center overflow-x-auto no-scrollbar py-8" }, ye = /* @__PURE__ */ a("div", { class: "h-32" }, null, -1), we = { class: "flex-1 w-full" }, Re = { class: "flex flex-col py-8" }, Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ke = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Se = {
|
|
11
11
|
key: 0,
|
|
@@ -81,7 +81,7 @@ const xe = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, ge =
|
|
|
81
81
|
onRowClick: (t) => e(s).promptShowTransferDetails(t.purchaseOrder, t)
|
|
82
82
|
}, {
|
|
83
83
|
default: x((t) => {
|
|
84
|
-
var w, R, T, c, k, O, S, C, i, F,
|
|
84
|
+
var w, R, T, c, k, O, S, C, i, F, M, p, $, m, q, z, V, Y, A, u, L, N, j, E, d, P;
|
|
85
85
|
return [
|
|
86
86
|
a("div", Re, [
|
|
87
87
|
a("div", Te, [
|
|
@@ -96,7 +96,7 @@ const xe = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, ge =
|
|
|
96
96
|
props: (F = (i = t.to_name) == null ? void 0 : i.getContext) == null ? void 0 : F.call(i)
|
|
97
97
|
}, null, 8, ["render", "props"])
|
|
98
98
|
]),
|
|
99
|
-
a("div", Oe, re((
|
|
99
|
+
a("div", Oe, re((q = (m = ($ = (p = (M = n.original.purchaseOrder) == null ? void 0 : M.items) == null ? void 0 : p.map) == null ? void 0 : $.call(p, (I) => `${I.name}`)) == null ? void 0 : m.join) == null ? void 0 : q.call(m, ", ")), 1),
|
|
100
100
|
(z = n.original.purchaseOrder) != null && z.ref ? (D(), se("div", Se, [
|
|
101
101
|
r(e(_), {
|
|
102
102
|
render: (A = (Y = (V = t.purchaseOrder_ref) == null ? void 0 : V.column) == null ? void 0 : Y.columnDef) == null ? void 0 : A.cell,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as C, ref as o, onMounted as M, onUnmounted as F, watch as x, resolveComponent as l, openBlock as i, createElementBlock as c, createBlock as I, withCtx as
|
|
2
|
-
import { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang
|
|
3
|
-
import { u as L,
|
|
1
|
+
import { defineComponent as C, ref as o, onMounted as M, onUnmounted as F, watch as x, resolveComponent as l, openBlock as i, createElementBlock as c, createBlock as I, withCtx as R, createVNode as a, createCommentVNode as z, createElementVNode as P } from "vue";
|
|
2
|
+
import { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-BfBvA1g5.js";
|
|
3
|
+
import { u as L, A as S } from "./app-CjkBFVBh.js";
|
|
4
4
|
const U = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "flex justify-end gap-8 items-center"
|
|
@@ -63,14 +63,14 @@ const U = {
|
|
|
63
63
|
ref: f,
|
|
64
64
|
class: "flex flex-col gap-16"
|
|
65
65
|
}, {
|
|
66
|
-
default:
|
|
66
|
+
default: R(() => [
|
|
67
67
|
a(V, {
|
|
68
68
|
"model-value": s.value,
|
|
69
69
|
"onUpdate:modelValue": t[0] || (t[0] = (w) => s.value = w),
|
|
70
70
|
"iframe-mode": "",
|
|
71
71
|
"onClick:pickInventoryBindings": k
|
|
72
72
|
}, null, 8, ["model-value"]),
|
|
73
|
-
r.value ?
|
|
73
|
+
r.value ? z("", !0) : (i(), c("div", U, [
|
|
74
74
|
a(g, {
|
|
75
75
|
type: "button",
|
|
76
76
|
variant: "tertiary",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as S, computed as r, ref as l, onMounted as U, onUnmounted as V, resolveComponent as E, openBlock as p, createElementBlock as f, createVNode as u, createElementVNode as k } from "vue";
|
|
2
|
-
import { _ as x } from "./FmMultiselectDialog.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { u as
|
|
4
|
-
const
|
|
2
|
+
import { _ as x } from "./FmMultiselectDialog.vue_vue_type_script_setup_true_lang-blApBVkg.js";
|
|
3
|
+
import { u as M, A as h } from "./app-CjkBFVBh.js";
|
|
4
|
+
const z = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "flex flex-col gap-16"
|
|
7
7
|
}, K = { class: "flex justify-end gap-8 items-center" }, w = {
|
|
@@ -10,7 +10,7 @@ const h = {
|
|
|
10
10
|
}, F = /* @__PURE__ */ k("div", null, "Loading bindings dialog...", -1), H = /* @__PURE__ */ S({
|
|
11
11
|
__name: "BindingsPicker",
|
|
12
12
|
setup(L) {
|
|
13
|
-
const d =
|
|
13
|
+
const d = M(), C = r(() => d.recipes), I = r(() => d.skus), g = l(!0), i = l(new Array()), a = l("RECIPE"), c = r(() => a.value === "SKU" ? I.value.map((s) => ({
|
|
14
14
|
label: s.name,
|
|
15
15
|
sublabel: s.code,
|
|
16
16
|
value: s
|
|
@@ -63,7 +63,7 @@ const h = {
|
|
|
63
63
|
];
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
}), b = l(), o =
|
|
66
|
+
}), b = l(), o = h(B);
|
|
67
67
|
async function B() {
|
|
68
68
|
await d.readInventory(), b.value = o.onMessage(
|
|
69
69
|
"props:binding-items",
|
|
@@ -97,7 +97,7 @@ const h = {
|
|
|
97
97
|
g.value ? (p(), f("div", w, [
|
|
98
98
|
u(t, { size: "md" }),
|
|
99
99
|
F
|
|
100
|
-
])) : (p(), f("div",
|
|
100
|
+
])) : (p(), f("div", z, [
|
|
101
101
|
u(x, {
|
|
102
102
|
"model-value": _.value,
|
|
103
103
|
"onUpdate:modelValue": s[0] || (s[0] = (m) => _.value = m),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as h, ref as o, provide as C, computed as v, resolveComponent as x, openBlock as r, createElementBlock as u, Fragment as L, renderList as F, createElementVNode as p, toDisplayString as k, createVNode as w, withModifiers as I, createStaticVNode as N, onMounted as
|
|
2
|
-
import {
|
|
3
|
-
import "./dayjs.min-
|
|
1
|
+
import { defineComponent as h, ref as o, provide as C, computed as v, resolveComponent as x, openBlock as r, createElementBlock as u, Fragment as L, renderList as F, createElementVNode as p, toDisplayString as k, createVNode as w, withModifiers as I, createStaticVNode as N, onMounted as E, onUnmounted as z, createBlock as M } from "vue";
|
|
2
|
+
import { i as b, u as P, A as R } from "./app-CjkBFVBh.js";
|
|
3
|
+
import "./dayjs.min-BKYgFjeY.js";
|
|
4
4
|
import "@feedmepos/ui-library";
|
|
5
|
-
import "./fuzzy-
|
|
6
|
-
const U = { class: "" }, D = /* @__PURE__ */ N('<div class="flex font-bold bg-[#F7F8FA]"><div class="flex-grow-0 flex-shrink-0 basis-5/12 py-8"></div><div class="flex-grow-0 flex-shrink-0 basis-3/12 py-8">Ingredient</div><div class="flex-grow-0 flex-shrink-0 basis-3/12 py-8">Recipe</div><div class="flex-grow-0 flex-shrink-0 basis-1/12 py-8"></div></div>', 1), O = ["onClick"], V = { class: "flex-grow-0 flex-shrink-0 basis-5/12 py-8 pl-8" }, $ = { class: "flex-grow-0 flex-shrink-0 basis-3/12 py-8" }, S = { class: "flex-grow-0 flex-shrink-0 basis-3/12 py-8" },
|
|
5
|
+
import "./fuzzy-BPDipSKr.js";
|
|
6
|
+
const U = { class: "" }, D = /* @__PURE__ */ N('<div class="flex font-bold bg-[#F7F8FA]"><div class="flex-grow-0 flex-shrink-0 basis-5/12 py-8"></div><div class="flex-grow-0 flex-shrink-0 basis-3/12 py-8">Ingredient</div><div class="flex-grow-0 flex-shrink-0 basis-3/12 py-8">Recipe</div><div class="flex-grow-0 flex-shrink-0 basis-1/12 py-8"></div></div>', 1), O = ["onClick"], V = { class: "flex-grow-0 flex-shrink-0 basis-5/12 py-8 pl-8" }, $ = { class: "flex-grow-0 flex-shrink-0 basis-3/12 py-8" }, S = { class: "flex-grow-0 flex-shrink-0 basis-3/12 py-8" }, A = { class: "flex-grow-0 flex-shrink-0 basis-1/12 py-4" }, T = /* @__PURE__ */ h({
|
|
7
7
|
__name: "binding-ui",
|
|
8
8
|
props: {
|
|
9
9
|
items: { default: () => [] },
|
|
@@ -23,20 +23,20 @@ const U = { class: "" }, D = /* @__PURE__ */ N('<div class="flex font-bold bg-[#
|
|
|
23
23
|
C("closeDialog", () => {
|
|
24
24
|
a.value.isOpen = !a.value.isOpen;
|
|
25
25
|
});
|
|
26
|
-
const
|
|
27
|
-
key:
|
|
28
|
-
name:
|
|
29
|
-
_skuLinked:
|
|
30
|
-
({ type: t, id: e }) => t === b.enum.SKU &&
|
|
26
|
+
const n = g, f = l, _ = v(() => n.items.map((i) => ({
|
|
27
|
+
key: i.key,
|
|
28
|
+
name: i.name,
|
|
29
|
+
_skuLinked: i.bindings.filter(
|
|
30
|
+
({ type: t, id: e }) => t === b.enum.SKU && n.skus.some((c) => c._id === e)
|
|
31
31
|
).length,
|
|
32
|
-
_recipeLinked:
|
|
33
|
-
({ type: t, id: e }) => t === b.enum.RECIPE &&
|
|
32
|
+
_recipeLinked: i.bindings.filter(
|
|
33
|
+
({ type: t, id: e }) => t === b.enum.RECIPE && n.recipes.some((c) => c._id === e)
|
|
34
34
|
).length,
|
|
35
35
|
onUpdate: async () => {
|
|
36
|
-
|
|
36
|
+
n.editable && f("click:open-binding-dialog", n.type, i);
|
|
37
37
|
}
|
|
38
38
|
})));
|
|
39
|
-
return (m,
|
|
39
|
+
return (m, i) => {
|
|
40
40
|
const t = x("FmButton");
|
|
41
41
|
return r(), u("div", U, [
|
|
42
42
|
D,
|
|
@@ -48,13 +48,13 @@ const U = { class: "" }, D = /* @__PURE__ */ N('<div class="flex font-bold bg-[#
|
|
|
48
48
|
p("div", V, k(e.name), 1),
|
|
49
49
|
p("div", $, k(e._skuLinked ? `${e._skuLinked} linked` : "Not linked"), 1),
|
|
50
50
|
p("div", S, k(e._recipeLinked ? `${e._recipeLinked} linked` : "Not linked"), 1),
|
|
51
|
-
p("div",
|
|
51
|
+
p("div", A, [
|
|
52
52
|
w(t, {
|
|
53
53
|
variant: "tertiary",
|
|
54
54
|
icon: "edit",
|
|
55
55
|
"icon-color": "#000",
|
|
56
56
|
size: "md",
|
|
57
|
-
disabled: !
|
|
57
|
+
disabled: !n.editable,
|
|
58
58
|
type: "button",
|
|
59
59
|
onClick: I(e.onUpdate, ["stop"])
|
|
60
60
|
}, null, 8, ["disabled", "onClick"])
|
|
@@ -69,28 +69,28 @@ const U = { class: "" }, D = /* @__PURE__ */ N('<div class="flex font-bold bg-[#
|
|
|
69
69
|
}, j = /* @__PURE__ */ p("div", null, "Loading bindings table...", -1), Q = /* @__PURE__ */ h({
|
|
70
70
|
__name: "BindingsTable",
|
|
71
71
|
setup(g) {
|
|
72
|
-
const l = P(), a = o(!0),
|
|
72
|
+
const l = P(), a = o(!0), n = o(new Array()), f = v(() => l.recipes), _ = v(() => l.skus), m = o(""), i = R(e), t = o();
|
|
73
73
|
async function e() {
|
|
74
|
-
await l.readInventory(), t.value =
|
|
74
|
+
await l.readInventory(), t.value = i.onMessage(
|
|
75
75
|
"props:grouped-bindings",
|
|
76
76
|
(s) => {
|
|
77
|
-
a.value = !1,
|
|
77
|
+
a.value = !1, n.value = s;
|
|
78
78
|
}
|
|
79
|
-
),
|
|
79
|
+
), i.sendMessage("props:grouped-bindings");
|
|
80
80
|
}
|
|
81
81
|
async function c(s, d) {
|
|
82
|
-
|
|
82
|
+
i.sendMessage("@click:open-binding-dialog", {
|
|
83
83
|
key: s,
|
|
84
84
|
binding: d
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
const y = o();
|
|
88
|
-
return
|
|
88
|
+
return E(() => {
|
|
89
89
|
const s = y.value;
|
|
90
90
|
s && new ResizeObserver(() => {
|
|
91
|
-
|
|
91
|
+
i.sendMessage("resize", s.scrollHeight);
|
|
92
92
|
}).observe(s);
|
|
93
|
-
}),
|
|
93
|
+
}), z(() => {
|
|
94
94
|
var s, d;
|
|
95
95
|
(d = (s = t.value) == null ? void 0 : s.removeEventListener) == null || d.call(s);
|
|
96
96
|
}), (s, d) => {
|
|
@@ -103,9 +103,9 @@ const U = { class: "" }, D = /* @__PURE__ */ N('<div class="flex font-bold bg-[#
|
|
|
103
103
|
a.value ? (r(), u("div", Y, [
|
|
104
104
|
w(B, { size: "md" }),
|
|
105
105
|
j
|
|
106
|
-
])) : (r(), M(
|
|
106
|
+
])) : (r(), M(T, {
|
|
107
107
|
key: 0,
|
|
108
|
-
items:
|
|
108
|
+
items: n.value,
|
|
109
109
|
recipes: f.value,
|
|
110
110
|
skus: _.value,
|
|
111
111
|
type: m.value,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as S, ref as V, computed as p, resolveComponent as a, openBlock as t, createElementBlock as v, createVNode as l, withCtx as w, createElementVNode as i, toDisplayString as H, unref as _, Fragment as k, renderList as C, createBlock as d, createCommentVNode as L } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { f as I } from "./app-CjkBFVBh.js";
|
|
3
3
|
const B = { class: "inline-flex" }, D = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer text-fm-color-neutral-gray-400" }, z = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, E = {
|
|
4
4
|
class: "overflow-hidden overflow-y-scroll",
|
|
5
5
|
style: { maxHeight: "105px" }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as $, ref as C, onMounted as N, watch as E, computed as f, resolveComponent as m, openBlock as v, createElementBlock as _, createElementVNode as s, createVNode as d, createTextVNode as M, toDisplayString as T, createSlots as U, withCtx as h, createBlock as I, Fragment as j, renderList as z } from "vue";
|
|
2
2
|
import { useDialogChild as q } from "@feedmepos/ui-library";
|
|
3
|
-
import {
|
|
4
|
-
import { f as H } from "./fuzzy-
|
|
3
|
+
import { y as c } from "./app-CjkBFVBh.js";
|
|
4
|
+
import { f as H } from "./fuzzy-BPDipSKr.js";
|
|
5
5
|
const R = { class: "flex flex-col h-[400px]" }, G = { class: "flex justify-between py-24 items-center relative" }, J = { class: "flex gap-16 basis-1/2" }, K = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, O = /* @__PURE__ */ s("span", { class: "xs:hidden" }, "selected", -1), P = /* @__PURE__ */ s("div", { class: "absolute pointer-events-none -bottom-[304px] left-0 w-full h-[308px] overflow-hidden flex flex-col justify-between" }, [
|
|
6
6
|
/* @__PURE__ */ s("div", { class: "h-1 fm-shadow-light-200" }),
|
|
7
7
|
/* @__PURE__ */ s("div", {
|
|
@@ -24,17 +24,17 @@ const R = { class: "flex flex-col h-[400px]" }, G = { class: "flex justify-betwe
|
|
|
24
24
|
},
|
|
25
25
|
emits: ["update:modelValue"],
|
|
26
26
|
setup(L, { emit: B }) {
|
|
27
|
-
const y = q(),
|
|
27
|
+
const y = q(), b = L, D = B, t = C(b.modelValue ?? []);
|
|
28
28
|
N(() => {
|
|
29
29
|
y.emitData(t.value);
|
|
30
30
|
}), E([() => t.value], ([l]) => {
|
|
31
31
|
y.emitData(l), D("update:modelValue", l);
|
|
32
32
|
});
|
|
33
|
-
function
|
|
33
|
+
function x(l) {
|
|
34
34
|
return !!t.value.find((e) => c(e, l));
|
|
35
35
|
}
|
|
36
36
|
function g(l, e) {
|
|
37
|
-
const i =
|
|
37
|
+
const i = x(l);
|
|
38
38
|
if (!(e && i || !e && !i))
|
|
39
39
|
if (e) {
|
|
40
40
|
const a = [...t.value, l];
|
|
@@ -45,7 +45,7 @@ const R = { class: "flex flex-col h-[400px]" }, G = { class: "flex justify-betwe
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
const n = C(""), u = f(() => {
|
|
48
|
-
const l = n.value.toLocaleLowerCase(), e =
|
|
48
|
+
const l = n.value.toLocaleLowerCase(), e = b.items;
|
|
49
49
|
return n.value ? H.filter(l, e, {
|
|
50
50
|
pre: "|",
|
|
51
51
|
post: "|",
|
|
@@ -59,7 +59,7 @@ const R = { class: "flex flex-col h-[400px]" }, G = { class: "flex justify-betwe
|
|
|
59
59
|
function S() {
|
|
60
60
|
r.value ? t.value = t.value.filter(
|
|
61
61
|
(l) => !u.value.find((e) => c(e.value, l))
|
|
62
|
-
) : t.value =
|
|
62
|
+
) : t.value = b.items.filter(
|
|
63
63
|
(l) => t.value.find((e) => c(e, l.value)) || u.value.find((e) => c(e.value, l.value))
|
|
64
64
|
).map((l) => l.value);
|
|
65
65
|
}
|
|
@@ -118,12 +118,12 @@ const R = { class: "flex flex-col h-[400px]" }, G = { class: "flex justify-betwe
|
|
|
118
118
|
key: o.value,
|
|
119
119
|
label: o.label,
|
|
120
120
|
sublabel: o.sublabel,
|
|
121
|
-
onClick: (w) => g(o.value, !
|
|
121
|
+
onClick: (w) => g(o.value, !x(o.value)),
|
|
122
122
|
style: { "padding-top": "4px", "padding-bottom": "4px", "padding-left": "32px" }
|
|
123
123
|
}, {
|
|
124
124
|
prepend: h(() => [
|
|
125
125
|
d(p, {
|
|
126
|
-
"model-value":
|
|
126
|
+
"model-value": x(o.value),
|
|
127
127
|
"onUpdate:modelValue": (w) => g(o.value, w),
|
|
128
128
|
value: o.value
|
|
129
129
|
}, null, 8, ["model-value", "onUpdate:modelValue", "value"])
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { defineComponent as Q, mergeModels as U, useModel as X, computed as m, ref as h, watch as j, inject as Y, resolveComponent as p, openBlock as M, createElementBlock as D, createElementVNode as i, createVNode as v, withCtx as R, renderSlot as L, withDirectives as ee, normalizeClass as te, vModelText as ne, toDisplayString as T, createCommentVNode as oe, Fragment as ae, renderList as ue, createBlock as le } from "vue";
|
|
2
|
+
import { F } from "./dayjs.min-BKYgFjeY.js";
|
|
3
|
+
import { g as w, c as se, a as C, t as ie, b as re, v as me, w as ce, x as de } from "./date2-D-5KX0_X.js";
|
|
4
|
+
import { I as k } from "./rules-D0MrF_UU.js";
|
|
5
|
+
function $() {
|
|
6
|
+
return {
|
|
7
|
+
amount: F.reset()
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function q() {
|
|
11
|
+
return function(d) {
|
|
12
|
+
return k()(d.amountAsString);
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function _e(u) {
|
|
16
|
+
return function(n) {
|
|
17
|
+
return k()(n.amountAsString) !== !0 ? !0 : +n.amountAsString <= u ? `Must be more than ${u}` : !0;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function z(u, d = !1) {
|
|
21
|
+
return function(r) {
|
|
22
|
+
const o = q()(r);
|
|
23
|
+
if (o != !0)
|
|
24
|
+
return d ? o : !0;
|
|
25
|
+
const b = typeof u == "number" ? u : w(u, r.modelValue.measurement);
|
|
26
|
+
return se(+r.amountAsString).precision > b ? `Cannot exceed precision more than ${C({
|
|
27
|
+
amount: 1,
|
|
28
|
+
precision: b
|
|
29
|
+
})}` : !0;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const pe = { class: "flex flex-col" }, fe = { class: "flex flex-col" }, ve = { class: "flex-1" }, be = { class: "flex items-center gap-4" }, ye = { class: "flex-1" }, he = {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "text-fm-color-typo-secondary"
|
|
35
|
+
}, Me = { class: "text-fm-color-typo-secondary whitespace-nowrap" }, Fe = { class: "flex items-center gap-4" }, ge = { class: "max-w-[200px] flex flex-col gap-[1px]" }, Be = /* @__PURE__ */ Q({
|
|
36
|
+
__name: "FmUnitInput",
|
|
37
|
+
props: /* @__PURE__ */ U({
|
|
38
|
+
modelValue: {},
|
|
39
|
+
unit: {},
|
|
40
|
+
rules: {},
|
|
41
|
+
zIndex: {},
|
|
42
|
+
applyDefaultRules: { type: Boolean },
|
|
43
|
+
placement: {},
|
|
44
|
+
separator: {},
|
|
45
|
+
precision: {},
|
|
46
|
+
convertAmountOnChangeUnit: { type: Boolean },
|
|
47
|
+
formatMinimumPrecision: {},
|
|
48
|
+
placeholder: {},
|
|
49
|
+
minLength: {},
|
|
50
|
+
maxLength: {},
|
|
51
|
+
inputmode: {},
|
|
52
|
+
type: {},
|
|
53
|
+
readonly: { type: Boolean },
|
|
54
|
+
labelMark: {},
|
|
55
|
+
prependIcon: {},
|
|
56
|
+
appendIcon: {},
|
|
57
|
+
showValidBorder: { type: Boolean },
|
|
58
|
+
labelInfo: {},
|
|
59
|
+
showWordCount: { type: Boolean },
|
|
60
|
+
invalid: { type: Boolean },
|
|
61
|
+
autofocus: { type: Boolean },
|
|
62
|
+
formatter: { type: Function },
|
|
63
|
+
decimal: {},
|
|
64
|
+
datalist: {},
|
|
65
|
+
shiftDatalist: { type: Boolean },
|
|
66
|
+
datalistMaxHeight: {},
|
|
67
|
+
datalistMinHeight: {},
|
|
68
|
+
offsetDatalist: {},
|
|
69
|
+
datalistPlacement: {},
|
|
70
|
+
datalistZIndex: {},
|
|
71
|
+
datalistWidth: {},
|
|
72
|
+
label: {},
|
|
73
|
+
disabled: { type: Boolean },
|
|
74
|
+
focused: { type: Boolean },
|
|
75
|
+
helperText: {},
|
|
76
|
+
helperState: {}
|
|
77
|
+
}, {
|
|
78
|
+
modelValue: {},
|
|
79
|
+
modelModifiers: {}
|
|
80
|
+
}),
|
|
81
|
+
emits: /* @__PURE__ */ U(["update:amount", "update:measurement"], ["update:modelValue"]),
|
|
82
|
+
setup(u, { emit: d }) {
|
|
83
|
+
const n = u, r = d, o = X(u, "modelValue"), b = k(), N = m(() => {
|
|
84
|
+
var t;
|
|
85
|
+
return w(n.unit, (t = o.value) == null ? void 0 : t.measurement);
|
|
86
|
+
}), f = h((() => {
|
|
87
|
+
var l;
|
|
88
|
+
const e = ((l = o.value) == null ? void 0 : l.amount) ?? F.reset(), t = ce(e), a = n.formatMinimumPrecision ?? t.precision, c = de(t, a);
|
|
89
|
+
return C(c);
|
|
90
|
+
})());
|
|
91
|
+
j(f, (e) => {
|
|
92
|
+
const t = b(e), a = n.precision ?? N.value, l = typeof n.formatMinimumPrecision == "number" && n.formatMinimumPrecision > a ? n.formatMinimumPrecision : a;
|
|
93
|
+
t == !0 && (o.value = {
|
|
94
|
+
...o.value,
|
|
95
|
+
amount: ie(+e, l)
|
|
96
|
+
}), r("update:amount", e);
|
|
97
|
+
});
|
|
98
|
+
const E = Symbol.for("fm:form-state"), g = Y(E, null), S = m(() => n.disabled ?? (g == null ? void 0 : g.getDisabled()) ?? !1), G = h(), x = h(!1), V = h(!1), H = m(() => x.value || V.value), O = m(() => {
|
|
99
|
+
var e;
|
|
100
|
+
return [
|
|
101
|
+
{
|
|
102
|
+
label: (e = n.unit) == null ? void 0 : e.abbrev,
|
|
103
|
+
value: null
|
|
104
|
+
},
|
|
105
|
+
...n.unit.measurements.map((t) => ({
|
|
106
|
+
label: t.abbrev,
|
|
107
|
+
value: t.id
|
|
108
|
+
}))
|
|
109
|
+
];
|
|
110
|
+
}), A = m({
|
|
111
|
+
get() {
|
|
112
|
+
var e, t;
|
|
113
|
+
return ((t = (e = o.value) == null ? void 0 : e.measurement) == null ? void 0 : t.id) ?? null;
|
|
114
|
+
},
|
|
115
|
+
set(e) {
|
|
116
|
+
if (e == null)
|
|
117
|
+
o.value = {
|
|
118
|
+
...o.value ?? $(),
|
|
119
|
+
measurement: null
|
|
120
|
+
}, r("update:measurement", null);
|
|
121
|
+
else {
|
|
122
|
+
const t = n.unit.measurements.find((a) => a.id === e) ?? null;
|
|
123
|
+
o.value = {
|
|
124
|
+
...o.value ?? $(),
|
|
125
|
+
measurement: t
|
|
126
|
+
}, r("update:measurement", t);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
j(A, (e, t) => {
|
|
131
|
+
var _;
|
|
132
|
+
if (!n.convertAmountOnChangeUnit)
|
|
133
|
+
return;
|
|
134
|
+
const a = ((_ = o.value) == null ? void 0 : _.amount) ?? F.reset(), c = n.unit.measurements.find((B) => B.id === t) ?? null, l = n.unit.measurements.find((B) => B.id === e) ?? null, y = c ? re(a, c.conversion) : a, I = l ? me(y, l.conversion) : y, P = w(n.unit, l), s = F.convertPrecision({
|
|
135
|
+
value: I,
|
|
136
|
+
precision: P
|
|
137
|
+
});
|
|
138
|
+
f.value = C(s);
|
|
139
|
+
});
|
|
140
|
+
const Z = m(() => {
|
|
141
|
+
var e, t;
|
|
142
|
+
return ((t = (e = o.value) == null ? void 0 : e.measurement) == null ? void 0 : t.abbrev) ?? n.unit.abbrev;
|
|
143
|
+
}), J = m(
|
|
144
|
+
() => {
|
|
145
|
+
var e;
|
|
146
|
+
return ((e = n.rules) == null ? void 0 : e.map(
|
|
147
|
+
(t) => (a) => typeof t == "function" ? t(a) : t
|
|
148
|
+
)) ?? [];
|
|
149
|
+
}
|
|
150
|
+
), K = m(() => [...n.applyDefaultRules ? [
|
|
151
|
+
q(),
|
|
152
|
+
typeof n.precision == "number" ? z(n.precision) : z(n.unit)
|
|
153
|
+
] : [], ...J.value]);
|
|
154
|
+
return (e, t) => {
|
|
155
|
+
const a = p("FmLabel"), c = p("FmIcon"), l = p("FmMenuItem"), y = p("FmMenu"), I = p("FmField"), P = p("FmFormGroup");
|
|
156
|
+
return M(), D("div", pe, [
|
|
157
|
+
i("div", fe, [
|
|
158
|
+
i("div", ve, [
|
|
159
|
+
v(a, {
|
|
160
|
+
label: e.label,
|
|
161
|
+
disabled: e.disabled,
|
|
162
|
+
required: e.labelMark === "required",
|
|
163
|
+
optional: e.labelMark === "optional"
|
|
164
|
+
}, null, 8, ["label", "disabled", "required", "optional"])
|
|
165
|
+
]),
|
|
166
|
+
v(I, { focused: H.value }, {
|
|
167
|
+
default: R(() => [
|
|
168
|
+
i("div", be, [
|
|
169
|
+
L(e.$slots, "prepend"),
|
|
170
|
+
i("div", ye, [
|
|
171
|
+
ee(i("input", {
|
|
172
|
+
type: "text",
|
|
173
|
+
ref_key: "inputRef",
|
|
174
|
+
ref: G,
|
|
175
|
+
onFocus: t[0] || (t[0] = () => x.value = !0),
|
|
176
|
+
onBlur: t[1] || (t[1] = () => x.value = !1),
|
|
177
|
+
"onUpdate:modelValue": t[2] || (t[2] = (s) => f.value = s),
|
|
178
|
+
class: te({
|
|
179
|
+
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
180
|
+
"text-fm-color-typo-primary": !S.value,
|
|
181
|
+
"text-fm-color-typo-disabled": S.value
|
|
182
|
+
})
|
|
183
|
+
}, null, 34), [
|
|
184
|
+
[ne, f.value]
|
|
185
|
+
])
|
|
186
|
+
]),
|
|
187
|
+
e.separator ? (M(), D("div", he, T(e.separator), 1)) : oe("", !0),
|
|
188
|
+
i("div", Me, [
|
|
189
|
+
v(y, {
|
|
190
|
+
onMenuChanged: t[3] || (t[3] = (s) => V.value = s),
|
|
191
|
+
"z-index": 500,
|
|
192
|
+
placement: e.placement
|
|
193
|
+
}, {
|
|
194
|
+
"menu-button": R(() => [
|
|
195
|
+
i("div", Fe, [
|
|
196
|
+
i("div", null, T(Z.value), 1),
|
|
197
|
+
v(c, { name: "keyboard_arrow_down" })
|
|
198
|
+
])
|
|
199
|
+
]),
|
|
200
|
+
default: R(() => [
|
|
201
|
+
i("div", ge, [
|
|
202
|
+
(M(!0), D(ae, null, ue(O.value, (s) => (M(), le(l, {
|
|
203
|
+
key: s.value ?? void 0,
|
|
204
|
+
label: s.label,
|
|
205
|
+
"model-value": s.value == A.value,
|
|
206
|
+
onClick: (_) => A.value = s.value
|
|
207
|
+
}, null, 8, ["label", "model-value", "onClick"]))), 128))
|
|
208
|
+
])
|
|
209
|
+
]),
|
|
210
|
+
_: 1
|
|
211
|
+
}, 8, ["placement"])
|
|
212
|
+
]),
|
|
213
|
+
L(e.$slots, "append")
|
|
214
|
+
])
|
|
215
|
+
]),
|
|
216
|
+
_: 3
|
|
217
|
+
}, 8, ["focused"])
|
|
218
|
+
]),
|
|
219
|
+
v(P, {
|
|
220
|
+
class: "flex-1",
|
|
221
|
+
"model-value": { modelValue: o.value, amountAsString: String(f.value) },
|
|
222
|
+
info: e.labelInfo,
|
|
223
|
+
rules: K.value,
|
|
224
|
+
"helper-text": e.helperText,
|
|
225
|
+
"helper-state": e.helperState
|
|
226
|
+
}, null, 8, ["model-value", "info", "rules", "helper-text", "helper-state"])
|
|
227
|
+
]);
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
export {
|
|
232
|
+
_e as F,
|
|
233
|
+
Be as _,
|
|
234
|
+
q as a,
|
|
235
|
+
z as b
|
|
236
|
+
};
|