@feedmepos/mf-inventory-portal 0.0.23-dev.4 → 0.0.23-dev.41

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 (136) hide show
  1. package/dist/{App-DReDvY0M.js → App-DW2K97Bb.js} +84 -72
  2. package/dist/{ApprovalView-BMZlYmRk.js → ApprovalView-BgSxdrwt.js} +25 -28
  3. package/dist/{BindingsDialog-Y2K4I7H7.js → BindingsDialog-CQtusdvp.js} +6 -6
  4. package/dist/{BindingsPicker-DKBq9c37.js → BindingsPicker-BnEjRAah.js} +8 -9
  5. package/dist/{BindingsTable-45v4SDfp.js → BindingsTable-DpTPAef_.js} +18 -22
  6. package/dist/ClosingDraftView-CXKYLCZS.js +1190 -0
  7. package/dist/{ClosingTemplateView-CKJVYSbj.js → ClosingTemplateView-CMTJHywt.js} +271 -285
  8. package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-zOmcCdDR.js +142 -0
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CMEOp-0r.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-mAPA5_sB.js} +18 -19
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C1DjyjyH.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BjNpfucZ.js} +25 -26
  11. package/dist/{IngredientGroupView-BuP-HGeg.js → IngredientGroupView-CrEfiZvn.js} +63 -69
  12. package/dist/IngredientsView-BB8LQlU9.js +1707 -0
  13. package/dist/{IntegrationView-kYCaKG0o.js → IntegrationView-D2wTkDyX.js} +89 -92
  14. package/dist/{InventoryBindingForm-BXHq4h-n.js → InventoryBindingForm-DW7rJDc1.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CVxJ_bV3.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Ci8UI1eQ.js} +112 -104
  16. package/dist/{InventoryBindingSummary-Bjasfc_v.js → InventoryBindingSummary-B40KofiI.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DM0C4raP.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DD7VT9MS.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C3O3JebE.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BGuXTfn6.js} +19 -20
  19. package/dist/{PurchaseOrderPrintPreview-CmjkfTTS.js → PurchaseOrderPrintPreview-DQmx28Be.js} +17 -18
  20. package/dist/ReceiveRequestView-CJknzKfd.js +4205 -0
  21. package/dist/RecipeView-D5oWQ9Yd.js +609 -0
  22. package/dist/StockView-U59PHCy2.js +1818 -0
  23. package/dist/{SupplierView-DAx7E7sR.js → SupplierView-CLjjpTNZ.js} +2325 -787
  24. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DLDDXnyG.js +1327 -0
  25. package/dist/TransferTemplateView-CFoVrPIX.js +1264 -0
  26. package/dist/{UnitView-CQPGZ8-r.js → UnitView-CAopphN_.js} +228 -227
  27. package/dist/{WarehouseView-jy-RNCgy.js → WarehouseView-DUZku5U6.js} +100 -106
  28. package/dist/api/adjustment-template.d.ts +25 -0
  29. package/dist/api/bill.d.ts +240 -84
  30. package/dist/api/closing-draft.d.ts +6 -0
  31. package/dist/api/closing.d.ts +1 -0
  32. package/dist/api/inventory.d.ts +15 -6
  33. package/dist/api/netsuite.d.ts +3 -3
  34. package/dist/app-0klJzLit.js +84527 -0
  35. package/dist/app.d.ts +64 -0
  36. package/dist/app.js +2 -2
  37. package/dist/components/FmCustomAttribute.vue.d.ts +23 -0
  38. package/dist/components/FmLockableField.vue.d.ts +37 -0
  39. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  40. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +3 -1
  41. package/dist/components/row-action.enum.d.ts +1 -0
  42. package/dist/components/shell/inventory/binding-ui.vue.d.ts +3 -1
  43. package/dist/composable/defineDeepModel.d.ts +1 -1
  44. package/dist/{decimal-BAc9M88Q.js → decimal-Cu4rlnvU.js} +1 -1
  45. package/dist/feature-C1wCaXKQ.js +946 -0
  46. package/dist/format-unit-display-CMa5UhY1.js +1215 -0
  47. package/dist/{StockView-D9no-mrA.js → index-BJaMpEVJ.js} +2242 -3986
  48. package/dist/index-HTBqkVVr.js +29202 -0
  49. package/dist/router/name.d.ts +2 -0
  50. package/dist/stock-CB4yNRMO.js +125 -0
  51. package/dist/stores/feature.d.ts +6 -0
  52. package/dist/stores/integration/netsuite.d.ts +70 -2
  53. package/dist/stores/inventory.d.ts +21 -12
  54. package/dist/stores/supplier.d.ts +1 -1
  55. package/dist/style.css +1 -1
  56. package/dist/{supplier-DJC0UZWv.js → supplier-biIIXGyr.js} +15 -15
  57. package/dist/tsconfig.app.tsbuildinfo +1 -1
  58. package/dist/{use-inventory-binding-dialog-PEQbFRvO.js → use-inventory-binding-dialog-BopoOOxB.js} +10 -11
  59. package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +2 -0
  60. package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +18 -0
  61. package/dist/views/adjustment-template/import/export.d.ts +60 -0
  62. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
  63. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
  64. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
  65. package/dist/views/adjustment-template/wastage-template/WastageTemplateReason.vue.d.ts +18 -0
  66. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
  67. package/dist/views/adjustment-template/wastage-template/actions.d.ts +1329 -0
  68. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
  69. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
  70. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
  71. package/dist/views/adjustment-template/wastage-template/props.d.ts +36 -0
  72. package/dist/views/adjustment-template/wastage-template/table.d.ts +1303 -0
  73. package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +2 -0
  74. package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +22 -0
  75. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +625 -0
  76. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +25 -0
  77. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +3645 -0
  78. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -0
  79. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
  80. package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
  81. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +2 -1
  82. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +48 -204
  83. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +49 -205
  84. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +6 -3
  85. package/dist/views/ingredients/components/convert/ConvertFormProps.d.ts +1 -0
  86. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -2
  87. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +1 -0
  88. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +2 -1
  89. package/dist/views/receive-request/components/netsuite/NetSuiteInfo.vue.d.ts +12 -0
  90. package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +13 -0
  91. package/dist/views/receive-request/components/netsuite/NetSuiteSync.vue.d.ts +12 -0
  92. package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +13 -0
  93. package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
  94. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +70 -17
  95. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -2
  96. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -1
  97. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +102 -24
  98. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +102 -24
  99. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -0
  100. package/dist/views/stock/components/StockRecordCard.vue.d.ts +120 -42
  101. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +6 -4
  102. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  103. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +2 -1
  104. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +24 -12
  105. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +24 -12
  106. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +2 -1
  107. package/package.json +7 -6
  108. package/dist/FmDroppableField-8RzKjEdL.js +0 -154
  109. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BhdcqRh-.js +0 -436
  110. package/dist/FmMultiselectDialog-D7YtdoyJ.js +0 -415
  111. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-zjvFEF5C.js +0 -51
  112. package/dist/IngredientsView-DMRN-odY.js +0 -1613
  113. package/dist/ReceiveRequestView-aQZJO8sq.js +0 -4165
  114. package/dist/RecipeView-DXO43tFi.js +0 -597
  115. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
  116. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DCA0RUfu.js +0 -1209
  117. package/dist/TransferTemplateView-CfxdQF1t.js +0 -1261
  118. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  119. package/dist/app-KnSMkJBV.js +0 -33496
  120. package/dist/date2-CIeUqUIc.js +0 -117
  121. package/dist/dayjs.min-Df5jSnDJ.js +0 -282
  122. package/dist/defineDeepModel-BfuQAIoM.js +0 -13
  123. package/dist/feature-dwB4OxRQ.js +0 -86
  124. package/dist/format-time-from-id-BbvzyIN6.js +0 -15
  125. package/dist/format-unit-display-BBWblJEt.js +0 -1216
  126. package/dist/fuzzy-B9ryZ9VZ.js +0 -41
  127. package/dist/index-BN0CY3sZ.js +0 -22277
  128. package/dist/index-Bj1fJum-.js +0 -45
  129. package/dist/index-C4yL_7rR.js +0 -10545
  130. package/dist/netsuite-ByWOS6tI.js +0 -194
  131. package/dist/normalizeArguments-DP7Hrren.js +0 -1552
  132. package/dist/row-action.enum-PMKMRrZR.js +0 -50
  133. package/dist/rules-C12nWDD1.js +0 -198
  134. package/dist/use-template-enabled-locations-2-k9g5t8tt.js +0 -86
  135. package/dist/xlsx-B4XHad7S.js +0 -24004
  136. package/dist/xlsx.util-BSO4SHJi.js +0 -78
@@ -0,0 +1,142 @@
1
+ import { defineComponent as g, openBlock as a, createElementBlock as i, createElementVNode as m, toDisplayString as u, unref as h, Fragment as C, renderList as N, computed as v, resolveComponent as V, createVNode as S, createCommentVNode as w, h as B } from "vue";
2
+ import { i as b, K as F, e as $ } from "./app-0klJzLit.js";
3
+ import { useI18n as k, useCoreStore as I } from "@feedmepos/mf-common";
4
+ import { components as O } from "@feedmepos/ui-library";
5
+ const T = { class: "flex flex-col" }, z = { 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" }, j = { class: "flex-1 py-8 px-16" }, D = {
6
+ class: "flex-0 py-8 px-16",
7
+ style: { "flex-basis": "120px" }
8
+ }, E = { class: "flex-1 py-8 px-16" }, K = {
9
+ key: 0,
10
+ class: "flex-0 py-8 px-16",
11
+ style: { "flex-basis": "120px" }
12
+ }, M = {
13
+ key: 1,
14
+ class: "flex-0 py-8 px-16",
15
+ style: { "flex-basis": "120px" }
16
+ }, G = /* @__PURE__ */ g({
17
+ __name: "IngredientBindedItem",
18
+ props: {
19
+ name: {},
20
+ bindings: {}
21
+ },
22
+ setup(_) {
23
+ const { t: p } = k();
24
+ function l(o, c) {
25
+ var n;
26
+ if (o.measurement) {
27
+ const d = F(o.amount, o.measurement.conversion);
28
+ return `${b(d, !1)} ${(n = o.measurement) == null ? void 0 : n.abbrev}`;
29
+ }
30
+ return `${b(o.amount, !1)} ${c.abbrev}`;
31
+ }
32
+ function f(o) {
33
+ return o.unit !== void 0;
34
+ }
35
+ return (o, c) => (a(), i("div", T, [
36
+ m("div", z, [
37
+ m("div", j, u(o.name), 1),
38
+ m("div", D, u(h(p)("inventory.ingredient.bindedItems.amount")), 1)
39
+ ]),
40
+ (a(!0), i(C, null, N(o.bindings, (n) => (a(), i("div", {
41
+ key: n.id,
42
+ class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
43
+ }, [
44
+ m("div", E, u(n.name), 1),
45
+ f(n) ? (a(), i("div", K, u(l(n, n.unit)), 1)) : (a(), i("div", M, u(h(b)(n.amount, !1)), 1))
46
+ ]))), 128))
47
+ ]));
48
+ }
49
+ }), U = {
50
+ key: 0,
51
+ class: "flex flex-col gap-16"
52
+ }, H = /* @__PURE__ */ g({
53
+ __name: "FmCustomAttribute",
54
+ props: {
55
+ entity: {},
56
+ modelValue: {},
57
+ valueOptions: {}
58
+ },
59
+ emits: ["update:modelValue"],
60
+ setup(_, { emit: p }) {
61
+ const l = _, f = p, { t: o } = k(), c = I();
62
+ function n(s) {
63
+ var e, t;
64
+ if ((t = (e = l.valueOptions) == null ? void 0 : e[s]) != null && t.length)
65
+ return l.valueOptions[s];
66
+ }
67
+ const d = v(() => {
68
+ const s = /* @__PURE__ */ new Set(["671005de24a7f4001c87e25e"]), e = c.currentBusiness.value;
69
+ return e ? s.has(e._id) ? [
70
+ {
71
+ key: "tag",
72
+ type: "string",
73
+ entity: "inventorySku"
74
+ },
75
+ {
76
+ key: "tag",
77
+ type: "string",
78
+ entity: "inventoryRecipe"
79
+ }
80
+ ].filter((r) => r.entity === l.entity) : [] : [];
81
+ }), y = v(() => d.value.map((s) => {
82
+ var t;
83
+ const e = n(s.key);
84
+ return {
85
+ key: s.key,
86
+ type: s.type,
87
+ value: ((t = l.modelValue) == null ? void 0 : t[s.key]) || "",
88
+ options: e
89
+ };
90
+ }) || []), A = [
91
+ {
92
+ header: () => o("portalshell.customAttributes.form.key"),
93
+ accessorKey: "key",
94
+ enableSorting: !1
95
+ },
96
+ {
97
+ header: () => o("portalshell.customAttributes.form.value"),
98
+ accessorKey: "value",
99
+ enableSorting: !1,
100
+ cell: (s) => {
101
+ const e = s.row.original;
102
+ return B(O.FmTextField, {
103
+ modelValue: e.value,
104
+ placeholder: o("portalshell.customAttributes.form.valuePlaceholder"),
105
+ datalist: e.options,
106
+ rules: [
107
+ (t) => e.type === "number" && isNaN(Number(t)) ? o("portalshell.customAttributes.form.attributeValueMustBeNumber") : !0
108
+ ],
109
+ "onUpdate:modelValue": (t) => {
110
+ const r = $(l.modelValue);
111
+ if (r[e.key] = t == null ? void 0 : t.trim(), e.type === "number") {
112
+ if (isNaN(Number(t)))
113
+ return;
114
+ r[e.key] = Number(t);
115
+ }
116
+ Object.keys(r).forEach((x) => {
117
+ r[x] || delete r[x];
118
+ }), f("update:modelValue", r);
119
+ }
120
+ });
121
+ }
122
+ }
123
+ ];
124
+ return (s, e) => {
125
+ const t = V("FmTable");
126
+ return y.value.length ? (a(), i("div", U, [
127
+ e[0] || (e[0] = m("div", { class: "fm-typo-en-title-sm-600" }, "Custom attributes", -1)),
128
+ S(t, {
129
+ "column-defs": A,
130
+ "row-data": y.value,
131
+ "shrink-at": !1,
132
+ "page-size": y.value.length,
133
+ "hide-footer": ""
134
+ }, null, 8, ["row-data", "page-size"])
135
+ ])) : w("", !0);
136
+ };
137
+ }
138
+ });
139
+ export {
140
+ G as _,
141
+ H as a
142
+ };
@@ -1,8 +1,7 @@
1
- import { r as w, u as I, I as B, y as H, z as M } from "./app-KnSMkJBV.js";
2
- import { a as k, t as R } from "./rules-C12nWDD1.js";
3
- import { u as j } from "./supplier-DJC0UZWv.js";
4
- import { P as S } from "./format-unit-display-BBWblJEt.js";
5
- import { computed as y, defineComponent as $, mergeModels as W, useModel as J, resolveComponent as U, openBlock as T, createElementBlock as A, normalizeStyle as K, createElementVNode as N, createVNode as Q, withCtx as X, createBlock as x, createCommentVNode as D, Fragment as Y, renderList as Z, unref as V } from "vue";
1
+ import { i as k, t as B, an as w, u as H, as as I, aC as R, aD as M } from "./app-0klJzLit.js";
2
+ import { u as j } from "./supplier-biIIXGyr.js";
3
+ import { P as S } from "./format-unit-display-CMa5UhY1.js";
4
+ import { computed as y, defineComponent as $, mergeModels as W, useModel as J, resolveComponent as U, openBlock as T, createElementBlock as A, normalizeStyle as K, createElementVNode as D, createVNode as Q, withCtx as X, createBlock as x, createCommentVNode as N, Fragment as Y, renderList as Z, unref as V } from "vue";
6
5
  function z(l, r, e) {
7
6
  var s;
8
7
  if (!!r.measurement === !!e && ((s = r.measurement) == null ? void 0 : s.id) === e)
@@ -19,7 +18,7 @@ function z(l, r, e) {
19
18
  costPerUnit: r.costPerUnit
20
19
  };
21
20
  }
22
- function re(l, r, e, n) {
21
+ function oe(l, r, e, n) {
23
22
  var b, g, u;
24
23
  if (n != null && n.manualTotalCost)
25
24
  return n == null ? void 0 : n.manualTotalCost;
@@ -27,7 +26,7 @@ function re(l, r, e, n) {
27
26
  (a) => a.skuId === l._id
28
27
  )) == null ? void 0 : u.defaultCost, o = l.defaultCost ? z(l.unit, l.defaultCost, l.trackingMeasurement) : void 0, s = t ?? o, i = s == null ? void 0 : s.costPerUnit, c = i ? s != null && s.measurement ? +k(i) / +k(s == null ? void 0 : s.measurement.conversion) : +k(i) : void 0, p = c ? e ? c * +k(e.conversion) : c : void 0, f = p ? +k(r) * p : void 0;
29
28
  return f ? {
30
- ...R(f ?? 0, 2),
29
+ ...B(f ?? 0, 2),
31
30
  currency: w()
32
31
  } : {
33
32
  amount: 0,
@@ -36,7 +35,7 @@ function re(l, r, e, n) {
36
35
  };
37
36
  }
38
37
  function F(l) {
39
- return H.parse(l);
38
+ return R.parse(l);
40
39
  }
41
40
  function C(l) {
42
41
  return {
@@ -56,8 +55,8 @@ function C(l) {
56
55
  }
57
56
  };
58
57
  }
59
- function ie(l, r, e = !1, n = !1) {
60
- const t = j(), o = I();
58
+ function re(l, r, e = !1, n = !1) {
59
+ const t = j(), o = H();
61
60
  o.watchLocation(async () => {
62
61
  var v;
63
62
  await t.readSuppliers();
@@ -100,7 +99,7 @@ function ie(l, r, e = !1, n = !1) {
100
99
  return n ? [...a, ...u] : a;
101
100
  }), L = y(() => {
102
101
  var h;
103
- const u = ((h = o._currentLocation) == null ? void 0 : h.type) === B.warehouse;
102
+ const u = ((h = o._currentLocation) == null ? void 0 : h.type) === I.warehouse;
104
103
  return (e ? o.locations.filter((d) => d.doc._id !== o.currentLocation.doc._id) : o.locations).filter((d) => u || d.acceptRequest).map(C);
105
104
  }), b = y(() => {
106
105
  if (s.value === S.PURCHASE) {
@@ -213,7 +212,7 @@ class P {
213
212
  return r.split("").map((t, o) => t !== n ? !1 : o).filter((t) => t !== !1);
214
213
  }
215
214
  }
216
- const G = { class: "sticky top-0 bg-white mb-8" }, q = { class: "overflow-y-auto pb-8" }, le = /* @__PURE__ */ $({
215
+ const G = { class: "sticky top-0 bg-white mb-8" }, q = { class: "overflow-y-auto pb-8" }, ie = /* @__PURE__ */ $({
217
216
  __name: "FmFilterableMenuOptions",
218
217
  props: /* @__PURE__ */ W({
219
218
  modelValue: {},
@@ -237,7 +236,7 @@ const G = { class: "sticky top-0 bg-white mb-8" }, q = { class: "overflow-y-auto
237
236
  class: "relative",
238
237
  style: K({ maxHeight: `${o.maxHeight}px`, width: o.width })
239
238
  }, [
240
- N("div", G, [
239
+ D("div", G, [
241
240
  Q(c, {
242
241
  modelValue: e.value,
243
242
  "onUpdate:modelValue": s[1] || (s[1] = (f) => e.value = f),
@@ -249,12 +248,12 @@ const G = { class: "sticky top-0 bg-white mb-8" }, q = { class: "overflow-y-auto
249
248
  variant: "tertiary",
250
249
  "prepend-icon": "close",
251
250
  onClick: s[0] || (s[0] = (f) => e.value = "")
252
- })) : D("", !0)
251
+ })) : N("", !0)
253
252
  ]),
254
253
  _: 1
255
254
  }, 8, ["modelValue"])
256
255
  ]),
257
- N("div", q, [
256
+ D("div", q, [
258
257
  (T(!0), A(Y, null, Z(t.value, (f, L) => (T(), x(p, {
259
258
  key: L,
260
259
  label: f.label,
@@ -266,7 +265,7 @@ const G = { class: "sticky top-0 bg-white mb-8" }, q = { class: "overflow-y-auto
266
265
  return V(M)(o.modelValue, f.value) && ((g = b.el) == null || g.scrollIntoView({ behavior: "smooth", block: "center" }), console.log("scrollTo", b.el)), void 0;
267
266
  }
268
267
  }, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
269
- t.value.length ? D("", !0) : (T(), x(p, {
268
+ t.value.length ? N("", !0) : (T(), x(p, {
270
269
  key: 0,
271
270
  disabled: "",
272
271
  label: "No options available"
@@ -277,7 +276,7 @@ const G = { class: "sticky top-0 bg-white mb-8" }, q = { class: "overflow-y-auto
277
276
  }
278
277
  });
279
278
  export {
280
- le as _,
281
- re as c,
282
- ie as u
279
+ ie as _,
280
+ oe as c,
281
+ re as u
283
282
  };
@@ -1,6 +1,5 @@
1
- import { defineComponent as oe, mergeModels as O, useModel as se, computed as v, ref as P, watch as z, inject as ie, resolveComponent as b, openBlock as f, createElementBlock as y, createElementVNode as u, createVNode as M, withCtx as h, renderSlot as T, normalizeClass as V, toDisplayString as F, withDirectives as le, vModelText as ae, createCommentVNode as q, createTextVNode as ue, createBlock as W, Fragment as re, renderList as me } from "vue";
2
- import { F as I } from "./index-BN0CY3sZ.js";
3
- import { I as k, g as L, c as ce, a as g, m as de, t as pe, b as fe, p as ve, l as be, u as ye } from "./rules-C12nWDD1.js";
1
+ import { defineComponent as oe, mergeModels as O, useModel as se, computed as v, ref as P, watch as z, inject as ie, resolveComponent as b, openBlock as f, createElementBlock as y, createElementVNode as u, createVNode as M, withCtx as h, renderSlot as T, normalizeClass as V, toDisplayString as x, withDirectives as le, vModelText as ae, createCommentVNode as q, createTextVNode as ue, createBlock as W, Fragment as re, renderList as me } from "vue";
2
+ import { $ as I, I as k, P as L, L as ce, i as g, aA as de, t as pe, K as fe, ag as ve, ay as be, ax as ye } from "./app-0klJzLit.js";
4
3
  import "@feedmepos/ui-library";
5
4
  function E() {
6
5
  return {
@@ -12,12 +11,12 @@ function H() {
12
11
  return k()(d.amountAsString);
13
12
  };
14
13
  }
15
- function Ve(l) {
14
+ function Se(l) {
16
15
  return function(t) {
17
16
  return k()(t.amountAsString) !== !0 ? !0 : +t.amountAsString < l ? `Must be at least ${l}` : !0;
18
17
  };
19
18
  }
20
- function Le(l) {
19
+ function Ve(l) {
21
20
  return function(t) {
22
21
  return k()(t.amountAsString) !== !0 ? !0 : +t.amountAsString > l ? `Must be at most ${l}` : !0;
23
22
  };
@@ -27,20 +26,20 @@ function G(l, d = !1) {
27
26
  const s = H()(r);
28
27
  if (s != !0)
29
28
  return d ? s : !0;
30
- const x = typeof l == "number" ? l : L(l, r.modelValue.measurement);
31
- return ce(+r.amountAsString).precision > x ? `Cannot exceed precision more than ${g({
29
+ const F = typeof l == "number" ? l : L(l, r.modelValue.measurement);
30
+ return ce(+r.amountAsString).precision > F ? `Cannot exceed precision more than ${g({
32
31
  amount: 1,
33
- precision: x
32
+ precision: F
34
33
  })}` : !0;
35
34
  };
36
35
  }
37
- function $e(l) {
36
+ function Le(l) {
38
37
  const d = de(l);
39
38
  return function(r) {
40
39
  return d(r.modelValue.amount);
41
40
  };
42
41
  }
43
- const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { class: "flex-1" }, Fe = { class: "flex items-center gap-4" }, xe = { class: "flex-1 flex gap-4" }, Ae = { class: "shrink-0 grow basis-2/5" }, _e = {
42
+ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { class: "flex-1" }, xe = { class: "flex items-center gap-4" }, Fe = { class: "flex-1 flex gap-4" }, Ae = { class: "shrink-0 grow basis-2/5" }, _e = {
44
43
  key: 0,
45
44
  class: "text-fm-color-typo-secondary"
46
45
  }, Pe = {
@@ -55,7 +54,7 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
55
54
  }, Ue = {
56
55
  class: "flex items-center",
57
56
  style: { "pointer-events": "none" }
58
- }, je = /* @__PURE__ */ oe({
57
+ }, $e = /* @__PURE__ */ oe({
59
58
  __name: "FmUnitInput",
60
59
  props: /* @__PURE__ */ O({
61
60
  modelValue: {},
@@ -106,7 +105,7 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
106
105
  }),
107
106
  emits: /* @__PURE__ */ O(["update:amount", "update:measurement"], ["update:modelValue"]),
108
107
  setup(l, { emit: d }) {
109
- const t = l, r = d, s = se(l, "modelValue"), x = k(), B = v(() => {
108
+ const t = l, r = d, s = se(l, "modelValue"), F = k(), B = v(() => {
110
109
  var n;
111
110
  return L(t.unit, (n = s.value) == null ? void 0 : n.measurement);
112
111
  }), c = P((() => {
@@ -115,13 +114,13 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
115
114
  return g(a);
116
115
  })());
117
116
  z(c, (e) => {
118
- const n = x(e), i = t.precision ?? B.value, o = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > i ? t.formatMinimumPrecision : i;
117
+ const n = F(e), i = t.precision ?? B.value, o = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > i ? t.formatMinimumPrecision : i;
119
118
  n == !0 && (s.value = {
120
119
  ...s.value,
121
120
  amount: pe(+e, o)
122
121
  }), r("update:amount", e);
123
122
  });
124
- const J = Symbol.for("fm:form-state"), D = ie(J, null), A = v(() => t.disabled ?? (D == null ? void 0 : D.getDisabled()) ?? !1), K = P(), R = P(!1), $ = P(!1), Q = v(() => R.value || $.value), X = v(() => {
123
+ const Z = Symbol.for("fm:form-state"), D = ie(Z, null), A = v(() => t.disabled ?? (D == null ? void 0 : D.getDisabled()) ?? !1), J = P(), R = P(!1), $ = P(!1), Q = v(() => R.value || $.value), X = v(() => {
125
124
  var a;
126
125
  const i = [...t.unit.measurements.filter((o) => !o.name.toLocaleLowerCase().includes("inactive")).filter((o) => o.abbrev !== t.unit.abbrev || +g(o.conversion) != 1).groupBy(
127
126
  (o) => `${o.abbrev}${g(o.conversion)}`
@@ -210,9 +209,9 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
210
209
  ]),
211
210
  M(N, { focused: Q.value }, {
212
211
  default: h(() => [
213
- u("div", Fe, [
212
+ u("div", xe, [
214
213
  T(e.$slots, "prepend"),
215
- u("div", xe, [
214
+ u("div", Fe, [
216
215
  u("div", Ae, [
217
216
  e.stepperOnly ? (f(), y("span", {
218
217
  key: 0,
@@ -221,11 +220,11 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
221
220
  "text-fm-color-typo-primary": !A.value,
222
221
  "text-fm-color-typo-disabled": A.value
223
222
  })
224
- }, F(c.value), 3)) : le((f(), y("input", {
223
+ }, x(c.value), 3)) : le((f(), y("input", {
225
224
  key: 1,
226
225
  type: "text",
227
226
  ref_key: "inputRef",
228
- ref: K,
227
+ ref: J,
229
228
  onFocus: n[0] || (n[0] = () => R.value = !0),
230
229
  onBlur: n[1] || (n[1] = () => R.value = !1),
231
230
  "onUpdate:modelValue": n[2] || (n[2] = (m) => c.value = m),
@@ -238,16 +237,16 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
238
237
  [ae, c.value]
239
238
  ])
240
239
  ]),
241
- e.separator ? (f(), y("div", _e, F(e.separator), 1)) : q("", !0),
240
+ e.separator ? (f(), y("div", _e, x(e.separator), 1)) : q("", !0),
242
241
  u("div", {
243
242
  class: V([e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"])
244
243
  }, [
245
244
  M(w, { "z-index": 51 }, {
246
245
  content: h(() => [
247
- ue(F(C.value), 1)
246
+ ue(x(C.value), 1)
248
247
  ]),
249
248
  default: h(() => [
250
- e.disableUnit ? (f(), y("div", Pe, F(C.value), 1)) : (f(), W(p, {
249
+ e.disableUnit ? (f(), y("div", Pe, x(C.value), 1)) : (f(), W(p, {
251
250
  key: 1,
252
251
  onMenuChanged: n[3] || (n[3] = (m) => $.value = m),
253
252
  "z-index": 500,
@@ -256,7 +255,7 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
256
255
  }, {
257
256
  "menu-button": h(() => [
258
257
  u("div", Ie, [
259
- u("div", ke, F(C.value), 1),
258
+ u("div", ke, x(C.value), 1),
260
259
  M(a, { name: "keyboard_arrow_down" })
261
260
  ])
262
261
  ]),
@@ -320,10 +319,10 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
320
319
  }
321
320
  });
322
321
  export {
323
- Ve as F,
324
- je as _,
325
- Le as a,
326
- $e as b,
322
+ Se as F,
323
+ $e as _,
324
+ Ve as a,
325
+ Le as b,
327
326
  H as c,
328
327
  G as d
329
328
  };