@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.
Files changed (57) hide show
  1. package/dist/{App-CgxrN-aD.js → App-C2-uZBjX.js} +2 -2
  2. package/dist/ApprovalView-BYSG24mC.js +213 -0
  3. package/dist/{BindingsDialog-B_ZMDl-b.js → BindingsDialog-BVgAl7QB.js} +2 -2
  4. package/dist/{BindingsPicker-B84BG8zT.js → BindingsPicker-CTqO6MTh.js} +1 -1
  5. package/dist/{BindingsTable-DrvoykYc.js → BindingsTable-DAkGh7yD.js} +1 -1
  6. package/dist/{ClosingDraftView-Ds9sI2Eg.js → ClosingDraftView-CJe3za1B.js} +41 -41
  7. package/dist/{ClosingTemplateView-BhZ1OXkD.js → ClosingTemplateView-CzuyG1NM.js} +2 -2
  8. package/dist/{DeliveryOrderPrintPreview-Yuxf-jCh.js → DeliveryOrderPrintPreview-DC-S5Jkp.js} +1 -1
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D6ktiUO5.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BIR8hIIx.js} +43 -43
  10. package/dist/{FmMultiselectDialog-4lVsA2Rn.js → FmMultiselectDialog-CyhyAmUf.js} +1 -1
  11. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-XmTRSHn_.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DbASoXHB.js} +57 -57
  12. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-B3PvtR0j.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BNcVcxkw.js} +1 -1
  13. package/dist/IngredientGroupView-CoVSqi7W.js +977 -0
  14. package/dist/IngredientsView-auG4thna.js +1778 -0
  15. package/dist/{IntegrationView-BnrCkjWt.js → IntegrationView-BCGzax4k.js} +5 -5
  16. package/dist/{InventoryBindingForm-uyHh2TI_.js → InventoryBindingForm-BlpwH-je.js} +1 -1
  17. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CECDj9Pw.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DJxy3D57.js} +46 -46
  18. package/dist/{InventoryBindingSummary-DyHCqgIe.js → InventoryBindingSummary-B1dzBf4n.js} +1 -1
  19. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Dx2lMf6h.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BqxFQWOu.js} +1 -1
  20. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BCX3vlmU.js → PremiumBadge.vue_vue_type_script_setup_true_lang-COUgrdWW.js} +15 -15
  21. package/dist/{PublishView-BVGyY6nn.js → PublishView-DRiyZ8D8.js} +13 -13
  22. package/dist/{PurchaseOrderPrintPreview-pbYIFiOG.js → PurchaseOrderPrintPreview-DQjCaQ1U.js} +4 -4
  23. package/dist/ReceiveRequestView-B88Nfuck.js +2576 -0
  24. package/dist/{RecipeView-DcgoCf4g.js → RecipeView-B-PR_bJO.js} +4 -4
  25. package/dist/{StockView-zO2uL662.js → StockView-DWZ9OiPc.js} +108 -108
  26. package/dist/{SupplierView-I5bqiX_2.js → SupplierView-BXLJkj_P.js} +37 -37
  27. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-GMAU4wTt.js +2090 -0
  28. package/dist/{TransferTemplateView-BDOt17yc.js → TransferTemplateView-BU4CJAi6.js} +149 -149
  29. package/dist/{UnitView-BVY5S6-3.js → UnitView-6Z2MUNL0.js} +32 -32
  30. package/dist/{WarehouseView-m6MKrtYq.js → WarehouseView-TVrrr6uJ.js} +26 -26
  31. package/dist/api/inventory.d.ts +12 -0
  32. package/dist/{app-DtICLubM.js → app-BFIrvTDw.js} +33844 -25682
  33. package/dist/app.d.ts +1 -0
  34. package/dist/app.js +5 -5
  35. package/dist/components/FmInventoryTableToolbar.vue.d.ts +36 -0
  36. package/dist/{decimal-C1dAcCf3.js → decimal-wpLnNWZL.js} +1 -1
  37. package/dist/{feature-Y7qzvbl4.js → feature-BvpauT6E.js} +79 -79
  38. package/dist/{format-unit-display-CPqfS4vp.js → format-unit-display-BbK1Rcd3.js} +48 -48
  39. package/dist/helper/rules.d.ts +1 -1
  40. package/dist/{index-DIEdSG3y.js → index-C2nfh-Rm.js} +1 -1
  41. package/dist/{index-0qsqwB0T.js → index-DI7DUbNm.js} +4 -4
  42. package/dist/{stock-CowNp_xM.js → stock-DkHVa1PB.js} +1 -1
  43. package/dist/stores/inventory.d.ts +16 -0
  44. package/dist/{supplier-JVTTlQNL.js → supplier-BiJ-_4RN.js} +2 -2
  45. package/dist/tsconfig.app.tsbuildinfo +1 -1
  46. package/dist/{use-ingredient-select-dialog-Df59lld2.js → use-ingredient-select-dialog-Bkt9TvKm.js} +5 -5
  47. package/dist/{use-inventory-binding-dialog-Bxxb93Kz.js → use-inventory-binding-dialog-ClzflO2S.js} +1 -1
  48. package/dist/views/ingredient-group/components/ingredient-group-rule-field/IngredientGroupRuleField.vue.d.ts +4 -0
  49. package/dist/views/ingredient-group/composables/use-ingredient-group-rule-item.d.ts +5 -0
  50. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +12 -0
  51. package/dist/{vue-i18n-DJOdRwc3.js → vue-i18n-Bvbu7J8Z.js} +153 -153
  52. package/package.json +4 -4
  53. package/dist/ApprovalView-DNGhkVc9.js +0 -147
  54. package/dist/IngredientGroupView-usK9stxT.js +0 -8779
  55. package/dist/IngredientsView-DPx8Z2zo.js +0 -1749
  56. package/dist/ReceiveRequestView-DZAgH2_u.js +0 -2516
  57. 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 I, ao as w, u as R, as as B, aD as H, aE as D, aF as U } from "./app-DtICLubM.js";
2
- import { u as z } from "./supplier-JVTTlQNL.js";
3
- import { P as F } from "./format-unit-display-CPqfS4vp.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 N, normalizeStyle as $, createElementVNode as O, createVNode as J, withCtx as K, createBlock as g, createCommentVNode as A, Fragment as Q, renderList as X, unref as M } from "vue";
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 o;
7
- if (!!i.measurement === !!a && ((o = i.measurement) == null ? void 0 : o.id) === 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 s = t.measurements.find((p) => p.id === a);
14
- return s ? {
13
+ const o = t.measurements.find((p) => p.id === a);
14
+ return o ? {
15
15
  costPerUnit: i.costPerUnit,
16
- measurement: s
16
+ measurement: o
17
17
  } : {
18
18
  costPerUnit: i.costPerUnit
19
19
  };
20
20
  }
21
- function oe(t, i, a, l) {
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, s = t.defaultCost ? Y(t.unit, t.defaultCost, t.trackingMeasurement) : void 0, o = u ?? s, p = o == null ? void 0 : o.costPerUnit, y = p ? o != null && o.measurement ? +T(p) / +T(o == null ? void 0 : o.measurement.conversion) : +T(p) : void 0, v = y ? a ? y * +T(a.conversion) : y : void 0, h = v ? +T(i) * v : void 0;
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
- ...I(h ?? 0, 2),
30
- currency: w()
29
+ ...R(h ?? 0, 2),
30
+ currency: M()
31
31
  } : {
32
32
  amount: 0,
33
33
  precision: 0,
34
- currency: w()
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 se(t, i, a = !1, l = !1) {
59
- const u = z(), s = R();
60
- s.watchLocation(async () => {
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 ? s.locations.filter((m) => m.doc._id !== s.currentLocation.doc._id) : s.locations)[0];
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 o = f(
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 (o.value === F.PURCHASE) {
84
- const C = (l ? u.suppliers : u.businessSuppliers).find((E) => E._id === n);
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 ? s.locations.filter((m) => m.doc._id !== s.currentLocation.doc._id) : s.locations).find((m) => m.doc._id === n);
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 = s._currentLocation) == null ? void 0 : d.type) === B.warehouse;
103
- return (a ? s.locations.filter((r) => r.doc._id !== s.currentLocation.doc._id) : s.locations).filter((r) => n || r.acceptRequest).map(L);
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 (o.value === F.PURCHASE) {
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 (o.value === F.PURCHASE) {
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 = s.locations.find((m) => m.doc._id);
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 D(i.items, ["label", "sublabel"], i.options)
157
- ), u = f(() => l.value.search(a.value)), s = W();
158
- return console.log({ stickyRef: s }), (o, p) => {
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(), N("div", {
160
+ return S(), I("div", {
161
161
  class: "relative",
162
- style: $({ width: o.width })
162
+ style: $({ width: s.width })
163
163
  }, [
164
- O("div", {
164
+ N("div", {
165
165
  class: "sticky top-0 bg-white mb-8",
166
166
  ref_key: "stickyRef",
167
- ref: s
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
- })) : A("", !0)
180
+ })) : O("", !0)
181
181
  ]),
182
182
  _: 1
183
183
  }, 8, ["modelValue"])
184
184
  ], 512),
185
- O("div", Z, [
186
- (S(!0), N(Q, null, X(u.value, (c, P) => (S(), g(h, {
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": M(U)(o.modelValue, c.value),
191
- onClick: () => o.handleItemChange(M(U)(o.modelValue, c.value), c),
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 M(U)(o.modelValue, c.value) && ((n = _.el) == null || n.scrollIntoView({ behavior: "instant", block: "end" }), (e = _.el) == null || e.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
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 ? A("", !0) : (S(), g(h, {
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
- oe as c,
210
- se as u
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 { X as a } from "./app-DtICLubM.js";
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 z, useModel as ie, computed as v, ref as k, watch as O, onBeforeUnmount as le, inject as ae, resolveComponent as b, openBlock as f, createElementBlock as y, createElementVNode as u, createVNode as M, withCtx as F, renderSlot as q, normalizeClass as T, toDisplayString as A, withDirectives as ue, vModelText as re, createCommentVNode as W, createTextVNode as me, createBlock as H, Fragment as ce, renderList as de } from "vue";
2
- import { J as B, I as D, P as L, K as pe, i as h, aB as fe, t as ve, H as be, ai as ye, az as Me, ay as he } from "./app-DtICLubM.js";
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 E() {
4
+ function G() {
5
5
  return {
6
6
  amount: B.reset()
7
7
  };
8
8
  }
9
- function J() {
9
+ function Z() {
10
10
  return function(p) {
11
11
  return D()(p.amountAsString);
12
12
  };
13
13
  }
14
- function Te(l) {
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 Le(l) {
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 G(l, p = !1) {
24
+ function H(l, p = !1) {
25
25
  return function(m) {
26
- const s = J()(m);
26
+ const s = Z()(m);
27
27
  if (s != !0)
28
28
  return p ? s : !0;
29
- const _ = typeof l == "number" ? l : L(l, m.modelValue.measurement);
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 $e(l) {
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" }, xe = { class: "flex flex-col" }, Fe = { 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 = {
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
- }, we = {
51
+ }, Ce = {
52
52
  class: "flex items-center",
53
53
  style: { "pointer-events": "none" }
54
- }, Ce = {
54
+ }, we = {
55
55
  class: "flex items-center",
56
56
  style: { "pointer-events": "none" }
57
- }, je = /* @__PURE__ */ se({
57
+ }, $e = /* @__PURE__ */ se({
58
58
  __name: "FmUnitInput",
59
- props: /* @__PURE__ */ z({
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__ */ z(["update:amount", "update:measurement"], ["update:modelValue"]),
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 L(t.unit, (n = s.value) == null ? void 0 : n.measurement);
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 x = null;
117
- O(d, (e) => {
118
- x && clearTimeout(x), x = setTimeout(() => {
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
- x && clearTimeout(x);
131
+ F && clearTimeout(F);
132
132
  });
133
- const Z = Symbol.for("fm:form-state"), U = ae(Z, null), P = v(() => t.disabled ?? (U == null ? void 0 : U.getDisabled()) ?? !1), Q = k(), w = k(!1), $ = k(!1), X = v(() => w.value || $.value), Y = v(() => {
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
- }), C = v({
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 ?? E(),
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 ?? E(),
162
+ ...s.value ?? G(),
163
163
  measurement: n
164
164
  }, m("update:measurement", n);
165
165
  }
166
166
  }
167
167
  });
168
- O(C, (e, n) => {
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 = L(t.unit, o), V = B.convertPrecision({
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
- J(),
190
- typeof t.precision == "number" ? G(t.precision) : G(t.unit)
189
+ Z(),
190
+ typeof t.precision == "number" ? H(t.precision) : H(t.unit)
191
191
  ] : [], ...ee.value]);
192
- function j(e) {
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 = j(e);
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 = j(e);
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", xe, [
212
- u("div", Fe, [
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: F(() => [
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: T({
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] = () => w.value = !0),
239
- onBlur: n[1] || (n[1] = () => w.value = !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: T({
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: T([e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"])
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: F(() => [
255
+ content: x(() => [
256
256
  me(A(N.value), 1)
257
257
  ]),
258
- default: F(() => [
259
- e.disableUnit ? (f(), y("div", ke, A(N.value), 1)) : (f(), H(r, {
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) => $.value = 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": F(() => [
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: F(() => [
272
+ default: x(() => [
273
273
  u("div", Re, [
274
- (f(!0), y(ce, null, de(Y.value, (c) => (f(), H(o, {
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 == C.value,
278
- onClick: (I) => C.value = c.value
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", we, [
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", Ce, [
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
- Te as F,
333
- je as _,
334
- Le as a,
335
- $e as b,
336
- J as c,
337
- G as d
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, H as y } from "./app-DtICLubM.js";
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",