@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.
Files changed (69) hide show
  1. package/dist/{ApprovalView-NJ4FogNu.js → ApprovalView-C72rFK1R.js} +9 -9
  2. package/dist/{BindingsDialog-B-j1k1SE.js → BindingsDialog-gL9pxfYy.js} +5 -5
  3. package/dist/{BindingsPicker-CEi3jyh0.js → BindingsPicker-5mFctYt_.js} +6 -6
  4. package/dist/{BindingsTable-DHYJ2Eqm.js → BindingsTable-C6x9dxpe.js} +26 -26
  5. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-1XPAzm5R.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CYZ5Ecsh.js} +1 -1
  6. package/dist/{FmMultiselectDialog.vue_vue_type_script_setup_true_lang-DL98UqsQ.js → FmMultiselectDialog.vue_vue_type_script_setup_true_lang-blApBVkg.js} +9 -9
  7. package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-Db_M7Cx1.js +236 -0
  8. package/dist/IngredientsView-P0zlf89O.js +1771 -0
  9. package/dist/{IntegrationView-DxqyRxVR.js → IntegrationView-C1SXz981.js} +4 -4
  10. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang--KLpvU2e.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BfBvA1g5.js} +6 -6
  11. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-HpuL5QhV.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CSuO9X2f.js} +1 -1
  12. package/dist/{PurchaseOrderPrintPreview-BGbCA7Al.js → PurchaseOrderPrintPreview-DGZafWSJ.js} +4 -4
  13. package/dist/ReceiveRequestView-C8yrU5NY.js +1435 -0
  14. package/dist/RecipeView-DJy1k_j1.js +581 -0
  15. package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-Dov3Uq2z.js +64 -0
  16. package/dist/{StockView-Pyk4MBIQ.js → StockView-CEmw7w_F.js} +13 -13
  17. package/dist/SupplierView-D0y-ASGR.js +804 -0
  18. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Ctqjw3f1.js → TransferDetails.vue_vue_type_script_setup_true_lang-DzK7B6nw.js} +5 -5
  19. package/dist/{UnitView-DVauPXKw.js → UnitView-PnHtBAGc.js} +7 -7
  20. package/dist/{WarehouseView-BYivsQgQ.js → WarehouseView-DXhn95Vl.js} +4 -4
  21. package/dist/api/inventory.d.ts +105 -0
  22. package/dist/{app-DXqS7qYg.js → app-CjkBFVBh.js} +2693 -2664
  23. package/dist/app.js +1 -1
  24. package/dist/components/FmDroppableField.vue.d.ts +75 -0
  25. package/dist/components/FmUnitInputProps.d.ts +1 -0
  26. package/dist/components/FmUnitInputRules.d.ts +3 -1
  27. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +1 -0
  28. package/dist/components/shell/inventory/binding-ui.vue.d.ts +1 -0
  29. package/dist/{date2-B96h4mWb.js → date2-D-5KX0_X.js} +55 -46
  30. package/dist/{dayjs.min-CQkpEWlm.js → dayjs.min-BKYgFjeY.js} +526 -514
  31. package/dist/{decimal-DQOX97fs.js → decimal-CNnMmnJA.js} +1 -1
  32. package/dist/{fuzzy-Dr-kBYFA.js → fuzzy-BPDipSKr.js} +1 -1
  33. package/dist/helper/number.d.ts +8 -0
  34. package/dist/helper/random.d.ts +2 -0
  35. package/dist/helper/xlsx.util.d.ts +1 -0
  36. package/dist/{init-date-range-6CJBD0GL.js → init-date-range-58-0kupV.js} +1 -1
  37. package/dist/{layout-CVjYEZxq.js → layout-D2Kwl_3f.js} +12 -12
  38. package/dist/{rules-B_-yQn9M.js → rules-D0MrF_UU.js} +1 -1
  39. package/dist/{stock-estimate-DoU-A7bG.js → stock-estimate-CwklebfL.js} +2 -2
  40. package/dist/stores/inventory.d.ts +5 -0
  41. package/dist/style.css +1 -1
  42. package/dist/{supplier-D2Wuv0oV.js → supplier-D4woY4Fa.js} +1 -1
  43. package/dist/tsconfig.app.tsbuildinfo +1 -1
  44. package/dist/{use-inventory-binding-dialog-Bc0Yx1fK.js → use-inventory-binding-dialog-C6CEI0CS.js} +2 -2
  45. package/dist/views/ingredients/components/import-ingredients/ImportIngredientItem.vue.d.ts +12 -0
  46. package/dist/views/ingredients/components/import-ingredients/ImportIngredientItemProps.d.ts +6 -0
  47. package/dist/views/ingredients/components/import-ingredients/ImportIngredients.vue.d.ts +2 -0
  48. package/dist/views/ingredients/components/import-ingredients/ImportIngredientsProps.d.ts +5 -0
  49. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -0
  50. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -0
  51. package/dist/views/ingredients/helper/import-export.helper.d.ts +47 -0
  52. package/dist/views/ingredients/helper/sku-id.helper.d.ts +1 -0
  53. package/dist/views/receive-request/components/supplier-price-history/SupplierPriceHistoryProps.d.ts +1 -0
  54. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +5 -0
  55. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +4 -0
  56. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +12 -0
  57. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +4 -2
  58. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  59. package/dist/xlsx-BfH_6O8P.js +24004 -0
  60. package/dist/xlsx.util-BpHfmZp6.js +107 -0
  61. package/package.json +7 -6
  62. package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-DqD-jNxc.js +0 -229
  63. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-BYi6BUwT.js +0 -49
  64. package/dist/IngredientsView-DNbppADe.js +0 -973
  65. package/dist/ReceiveRequestView-C1ae5dRi.js +0 -1434
  66. package/dist/RecipeView-BwP8jlG0.js +0 -596
  67. package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-CFjO4TPG.js +0 -53
  68. package/dist/SupplierView-CVZ7bOgA.js +0 -803
  69. package/dist/xlsx-Vw9D2Jo4.js +0 -15510
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as p, B as s } from "./app-DXqS7qYg.js";
1
+ import { E as p, D as s } from "./app-CjkBFVBh.js";
2
2
  export {
3
3
  p as FmApp,
4
4
  s as routers
@@ -0,0 +1,75 @@
1
+ import type { FmDropFieldProps } from '@feedmepos/ui-library';
2
+ export interface FmDroppableFieldProps extends FmDropFieldProps {
3
+ buttonLabel?: string;
4
+ }
5
+ export interface FmDroppableFieldEvents {
6
+ (event: 'file-upload', file: File): void;
7
+ (event: 'file-rejected', obj: {
8
+ file: File;
9
+ reason: string[];
10
+ }[]): void;
11
+ }
12
+ export interface FmDroppableFieldSlotDefault {
13
+ isDragging: boolean;
14
+ isValidFileType: boolean | null;
15
+ isValidFileSize: boolean | null;
16
+ singleValidFile?: File | null;
17
+ openFileDialog?(): void;
18
+ }
19
+ export interface FmDroppableFieldSlots {
20
+ default(props: FmDroppableFieldSlotDefault): void;
21
+ label(): void;
22
+ }
23
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FmDroppableFieldProps>, {
24
+ label: string;
25
+ disabled: boolean;
26
+ accept: string;
27
+ /** Default max is `8mb` */
28
+ maxFileSize: number;
29
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
30
+ "file-upload": (file: File) => void;
31
+ "file-rejected": (obj: {
32
+ file: File;
33
+ reason: string[];
34
+ }[]) => void;
35
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FmDroppableFieldProps>, {
36
+ label: string;
37
+ disabled: boolean;
38
+ accept: string;
39
+ /** Default max is `8mb` */
40
+ maxFileSize: number;
41
+ }>>> & {
42
+ "onFile-upload"?: ((file: File) => any) | undefined;
43
+ "onFile-rejected"?: ((obj: {
44
+ file: File;
45
+ reason: string[];
46
+ }[]) => any) | undefined;
47
+ }, {
48
+ label: string;
49
+ disabled: boolean;
50
+ accept: string;
51
+ maxFileSize: number;
52
+ }, {}>, Readonly<FmDroppableFieldSlots> & FmDroppableFieldSlots>;
53
+ export default _default;
54
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
55
+ type __VLS_TypePropsToRuntimeProps<T> = {
56
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
57
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
58
+ } : {
59
+ type: import('vue').PropType<T[K]>;
60
+ required: true;
61
+ };
62
+ };
63
+ type __VLS_WithDefaults<P, D> = {
64
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
65
+ default: D[K];
66
+ }> : P[K];
67
+ };
68
+ type __VLS_Prettify<T> = {
69
+ [K in keyof T]: T[K];
70
+ } & {};
71
+ type __VLS_WithTemplateSlots<T, S> = T & {
72
+ new (): {
73
+ $slots: S;
74
+ };
75
+ };
@@ -11,6 +11,7 @@ export interface FmUnitInputProps extends FmTextFieldWithoutModelValue {
11
11
  separator?: string;
12
12
  precision?: number;
13
13
  convertAmountOnChangeUnit?: boolean;
14
+ formatMinimumPrecision?: number;
14
15
  }
15
16
  export interface FmUnitInputEvents {
16
17
  (event: 'update:amount', amount: string): void;
@@ -1,4 +1,6 @@
1
1
  import type { FmGroupModelValue } from './FmUnitInputProps';
2
+ import type { ValidationResult } from '@feedmepos/ui-library';
2
3
  export declare function FmUnitInputAmountIsNumberRule(): (value: FmGroupModelValue) => true | "Must be a number";
3
4
  export declare function FmUnitInputAmountMoreThanRule(minimum: number): (value: FmGroupModelValue) => string | true;
4
- export declare function FmUnitInputMaxPrecisionRule(unit: FdoInventoryUnit, applyAmountRule?: boolean): (value: FmGroupModelValue) => string | true;
5
+ export declare function FmUnitInputMaxPrecisionRule(unit: FdoInventoryUnit, applyAmountRule?: boolean): (value: any) => ValidationResult;
6
+ export declare function FmUnitInputMaxPrecisionRule(precision: number, applyAmountRule?: boolean): (value: any) => ValidationResult;
@@ -87,6 +87,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
87
87
  low: number;
88
88
  mid: number;
89
89
  } | null | undefined;
90
+ operationalGroup?: string | null | undefined;
90
91
  unit: {
91
92
  _id: string;
92
93
  name: string;
@@ -67,6 +67,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
67
67
  low: number;
68
68
  mid: number;
69
69
  } | null | undefined;
70
+ operationalGroup?: string | null | undefined;
70
71
  unit: {
71
72
  _id: string;
72
73
  name: string;
@@ -1,82 +1,89 @@
1
- import { F as u, d as p } from "./dayjs.min-CQkpEWlm.js";
1
+ import { F as i, d as p } from "./dayjs.min-BKYgFjeY.js";
2
2
  function w(t, e) {
3
- return u.convertPrecision({
3
+ return i.convertPrecision({
4
4
  value: t,
5
5
  precision: e
6
6
  });
7
7
  }
8
8
  function N(t, e) {
9
- return u.add([t, e]);
9
+ return i.add([t, e]);
10
10
  }
11
11
  function S(t, e) {
12
- return u.multiply([t, e]);
12
+ return i.multiply([t, e]);
13
13
  }
14
14
  function b(t, e) {
15
- const n = Math.floor(t.amount * e.amount), r = n === 0 ? 0 : t.precision + e.precision, o = l(n), a = Math.min(r, o);
15
+ const n = Math.floor(t.amount * e.amount), r = n === 0 ? 0 : t.precision + e.precision, o = c(n), a = Math.min(r, o);
16
16
  return {
17
17
  amount: n / Math.pow(10, a),
18
18
  precision: r - a
19
19
  };
20
20
  }
21
21
  function T(t, e) {
22
- const n = +c(t), r = +c(e);
22
+ const n = +l(t), r = +l(e);
23
23
  return n / r;
24
24
  }
25
- function A(t, e) {
25
+ function v(t, e) {
26
26
  const n = T(t, e);
27
- return h(n);
27
+ return F(n);
28
+ }
29
+ function A(t, e) {
30
+ return t.precision >= e ? t : i.convertPrecision({ value: t, precision: e });
31
+ }
32
+ function j(t) {
33
+ const e = c(t.amount), n = t.precision - e;
34
+ return i.convertPrecision({ value: t, precision: Math.max(0, n) });
28
35
  }
29
- function c(t, e = !0) {
36
+ function l(t, e = !0) {
30
37
  return e ? Number(t.amount / Math.pow(10, t.precision)).toFixed(t.precision) : Number(t.amount / Math.pow(10, t.precision)).toString();
31
38
  }
32
- function j(t, e = !1, n = 2) {
39
+ function U(t, e = !1, n = 2) {
33
40
  const r = Number(t.amount / Math.pow(10, t.precision)), o = r.toFixed(
34
41
  Number.isInteger(r) ? 2 : Math.min(4, Math.max(2, n))
35
42
  );
36
43
  return e ? `${o} ${t.currency}` : t.currency === "MYR" ? `RM ${o}` : `${t.currency} ${o}`;
37
44
  }
38
- function U(t) {
45
+ function I(t) {
39
46
  return {
40
47
  ...t,
41
48
  amount: Math.abs(t.amount)
42
49
  };
43
50
  }
44
- function F(t) {
51
+ function h(t) {
45
52
  if (!isFinite(t)) return 0;
46
53
  let e = 1, n = 0;
47
54
  for (; Math.round(t * e) / e !== t; )
48
55
  e *= 10, n++;
49
56
  return n;
50
57
  }
51
- function h(t) {
52
- const e = F(t);
58
+ function F(t) {
59
+ const e = h(t);
53
60
  return {
54
61
  precision: e,
55
62
  amount: t * 10 ** e
56
63
  };
57
64
  }
58
- function I(t, e = 0, n = !1) {
65
+ function Y(t, e = 0, n = !1) {
59
66
  let r = 0;
60
67
  return Number.isNaN(Number(t)) || (n || Number(t) >= 0) && (r = Number(t)), {
61
68
  amount: Number((r * 10 ** e).toFixed(0)),
62
69
  precision: e
63
70
  };
64
71
  }
65
- function l(t) {
72
+ function c(t) {
66
73
  const e = `${t}`, n = e.replace(/0*$/g, "");
67
74
  return e.length - n.length;
68
75
  }
69
- function v(t, e) {
76
+ function $(t, e) {
70
77
  if (!e)
71
78
  return t.precision;
72
- const n = l(e.conversion.amount);
79
+ const n = c(e.conversion.amount);
73
80
  return t.precision - e.conversion.precision + n;
74
81
  }
75
- function Y(t) {
82
+ function P(t) {
76
83
  const e = new Intl.DateTimeFormat("en-US", { year: "numeric" }), n = new Intl.DateTimeFormat("en-US", { month: "short" });
77
84
  return [new Intl.DateTimeFormat("en-US", { day: "2-digit" }), n, e].map((a) => a.format(t).toUpperCase()).join(" ");
78
85
  }
79
- function $(t) {
86
+ function x(t) {
80
87
  const n = new Intl.DateTimeFormat("en-US", {
81
88
  hour: "2-digit",
82
89
  hour12: !0,
@@ -93,12 +100,12 @@ function H(t) {
93
100
  }).formatToParts(t);
94
101
  return `${(r = n.find((a) => a.type === "hour")) == null ? void 0 : r.value}:${(o = n.find((a) => a.type === "minute")) == null ? void 0 : o.value}`;
95
102
  }
96
- function i(t, e = "-") {
103
+ function s(t, e = "-") {
97
104
  const n = new Intl.DateTimeFormat("en-US", { year: "numeric" }), r = new Intl.DateTimeFormat("en-US", { month: "2-digit" }), o = new Intl.DateTimeFormat("en-US", { day: "2-digit" });
98
- return [n, r, o].map((s) => s.format(t).toUpperCase()).join(e);
105
+ return [n, r, o].map((u) => u.format(t).toUpperCase()).join(e);
99
106
  }
100
- function x(t, e = "-", n = ":") {
101
- const r = new Intl.DateTimeFormat("en-US", { year: "numeric" }), o = new Intl.DateTimeFormat("en-US", { month: "2-digit" }), a = new Intl.DateTimeFormat("en-US", { day: "2-digit" }), s = new Intl.DateTimeFormat("en-US", { hour: "2-digit", hour12: !1 }), f = new Intl.DateTimeFormat("en-US", { minute: "2-digit" }), D = [r, o, a].map((m) => m.format(t).toUpperCase()).join(e), g = [s, f].map((m) => m.format(t).toUpperCase()).join(n);
107
+ function C(t, e = "-", n = ":") {
108
+ const r = new Intl.DateTimeFormat("en-US", { year: "numeric" }), o = new Intl.DateTimeFormat("en-US", { month: "2-digit" }), a = new Intl.DateTimeFormat("en-US", { day: "2-digit" }), u = new Intl.DateTimeFormat("en-US", { hour: "2-digit", hour12: !1 }), f = new Intl.DateTimeFormat("en-US", { minute: "2-digit" }), D = [r, o, a].map((m) => m.format(t).toUpperCase()).join(e), g = [u, f].map((m) => m.format(t).toUpperCase()).join(n);
102
109
  return `${D} ${g}`;
103
110
  }
104
111
  function d(t) {
@@ -109,7 +116,7 @@ function M(t) {
109
116
  const e = d(t);
110
117
  return e.setDate(e.getDate() + 1), e.setTime(e.getTime() - 1), e;
111
118
  }
112
- function C(t) {
119
+ function R(t) {
113
120
  const { startDate: e, endDate: n } = t;
114
121
  if (e === null || n === null)
115
122
  return {
@@ -124,11 +131,11 @@ function C(t) {
124
131
  };
125
132
  const a = o.getTime() - r.getTime();
126
133
  return r.setTime(r.getTime() - a - 864e5), o.setTime(o.getTime() - a - 864e5), {
127
- startDate: i(r),
128
- endDate: i(o)
134
+ startDate: s(r),
135
+ endDate: s(o)
129
136
  };
130
137
  }
131
- function P(t) {
138
+ function Z(t) {
132
139
  const { startDate: e, endDate: n } = t;
133
140
  if (e === null || n === null)
134
141
  return {
@@ -143,11 +150,11 @@ function P(t) {
143
150
  };
144
151
  const a = o.getTime() - r.getTime();
145
152
  return r.setTime(r.getTime() + a + 864e5), o.setTime(o.getTime() + a + 864e5), {
146
- startDate: i(r),
147
- endDate: i(o)
153
+ startDate: s(r),
154
+ endDate: s(o)
148
155
  };
149
156
  }
150
- function R(t, e = /* @__PURE__ */ new Date()) {
157
+ function O(t, e = /* @__PURE__ */ new Date()) {
151
158
  const n = M(new Date(e.getTime()));
152
159
  return {
153
160
  startDate: p(d(new Date(e.getTime()))).subtract(t, "months").toISOString(),
@@ -155,26 +162,28 @@ function R(t, e = /* @__PURE__ */ new Date()) {
155
162
  };
156
163
  }
157
164
  export {
158
- c as a,
165
+ l as a,
159
166
  b,
160
- h as c,
161
- F as d,
162
- U as e,
163
- x as f,
164
- v as g,
167
+ F as c,
168
+ h as d,
169
+ I as e,
170
+ C as f,
171
+ $ as g,
165
172
  S as h,
166
173
  N as i,
167
- $ as j,
168
- j as k,
174
+ x as j,
175
+ U as k,
169
176
  w as l,
170
177
  d as m,
171
178
  M as n,
172
- P as o,
173
- C as p,
174
- i as q,
175
- Y as r,
176
- R as s,
177
- I as t,
179
+ Z as o,
180
+ R as p,
181
+ s as q,
182
+ P as r,
183
+ O as s,
184
+ Y as t,
178
185
  H as u,
179
- A as v
186
+ v,
187
+ j as w,
188
+ A as x
180
189
  };