@feedmepos/mf-inventory-portal 0.0.23-dev.2 → 0.0.23-dev.21

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 (112) hide show
  1. package/dist/{App-DRE3c1lJ.js → App-CvIvF0fg.js} +59 -51
  2. package/dist/{ApprovalView-B4ZYcS3B.js → ApprovalView-BOn2HDVY.js} +20 -23
  3. package/dist/{BindingsDialog-Df1yrWHU.js → BindingsDialog-9qfADiSA.js} +7 -7
  4. package/dist/{BindingsPicker-BERMWh4w.js → BindingsPicker-CpV9uOqj.js} +7 -8
  5. package/dist/{BindingsTable-DRIapOWW.js → BindingsTable-BYScxUTj.js} +16 -20
  6. package/dist/ClosingDraftView-DM7-3zOd.js +1116 -0
  7. package/dist/{ClosingTemplateView-CbFn3Sdy.js → ClosingTemplateView-Cye5VPAM.js} +66 -76
  8. package/dist/{FmDroppableField-8RzKjEdL.js → FmDroppableField-AIKfZo3H.js} +1 -1
  9. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CQUsooGm.js +282 -0
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BHSGZyJL.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CFQc-CBX.js} +121 -119
  11. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DH5IQchQ.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-2r8mut0B.js} +7 -7
  12. package/dist/{IngredientGroupView-DoETcEvV.js → IngredientGroupView-RNokzPJa.js} +30 -36
  13. package/dist/IngredientsView-M7K_GAEO.js +1660 -0
  14. package/dist/{IntegrationView-D1HeBiGF.js → IntegrationView-D9a8d1sO.js} +18 -20
  15. package/dist/{InventoryBindingForm-Dmz9BQ37.js → InventoryBindingForm-B0Gx5N1p.js} +1 -1
  16. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DoyqVBOd.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DEOudgKD.js} +15 -17
  17. package/dist/{InventoryBindingSummary-DrpwiRGZ.js → InventoryBindingSummary-C16Nc5aN.js} +1 -1
  18. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-yNEswIEI.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CZiypEex.js} +1 -1
  19. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Br4_VUza.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BbYZwclN.js} +8 -8
  20. package/dist/{PurchaseOrderPrintPreview-cp671yWE.js → PurchaseOrderPrintPreview-DdKF8g0J.js} +13 -14
  21. package/dist/ReceiveRequestView-DBPRR6fz.js +4186 -0
  22. package/dist/{RecipeView-CD_dAWLo.js → RecipeView-CzUgVxKz.js} +58 -63
  23. package/dist/{StockView-DfUzFC1b.js → StockView-DCO3N1FS.js} +1338 -1446
  24. package/dist/{SupplierView-DB-zrNxh.js → SupplierView-CzV6DYSj.js} +2345 -783
  25. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-00pcY0qu.js +1228 -0
  26. package/dist/TransferTemplateView-uL5PId9-.js +1265 -0
  27. package/dist/{UnitView-BlC9-WOA.js → UnitView-d-mCs-cS.js} +40 -44
  28. package/dist/{WarehouseView-CgEY87Lo.js → WarehouseView-B7z8m-Hv.js} +67 -73
  29. package/dist/api/adjustment-template.d.ts +23 -0
  30. package/dist/api/bill.d.ts +2 -2
  31. package/dist/api/closing-draft.d.ts +6 -0
  32. package/dist/api/closing.d.ts +1 -0
  33. package/dist/api/netsuite.d.ts +69 -0
  34. package/dist/app-CTCC1zfY.js +58871 -0
  35. package/dist/app.d.ts +56 -0
  36. package/dist/app.js +2 -2
  37. package/dist/components/FmMinMaxInputRules.d.ts +4 -1
  38. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  39. package/dist/components/row-action.enum.d.ts +1 -0
  40. package/dist/composable/defineDeepModel.d.ts +1 -1
  41. package/dist/{decimal-D7BCubZO.js → decimal-DhUR6QsF.js} +1 -1
  42. package/dist/{feature-BR-MsGYt.js → feature-DiGS5Fa4.js} +23 -9
  43. package/dist/format-unit-display-MRARpSlY.js +1210 -0
  44. package/dist/index-BSN3RnCl.js +12087 -0
  45. package/dist/netsuite-CIibMNer.js +251 -0
  46. package/dist/router/name.d.ts +2 -0
  47. package/dist/stock-COHpOTJk.js +110 -0
  48. package/dist/stores/feature.d.ts +2 -0
  49. package/dist/stores/integration/netsuite.d.ts +81 -0
  50. package/dist/stores/inventory.d.ts +1 -4
  51. package/dist/style.css +1 -1
  52. package/dist/{supplier-aBuwVukl.js → supplier-csNwTHYl.js} +15 -15
  53. package/dist/tsconfig.app.tsbuildinfo +1 -1
  54. package/dist/{use-inventory-binding-dialog-CLQ0LUmW.js → use-inventory-binding-dialog-172A48Xx.js} +10 -11
  55. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
  56. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
  57. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
  58. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
  59. package/dist/views/adjustment-template/wastage-template/actions.d.ts +1295 -0
  60. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
  61. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
  62. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
  63. package/dist/views/adjustment-template/wastage-template/props.d.ts +29 -0
  64. package/dist/views/adjustment-template/wastage-template/table.d.ts +1273 -0
  65. package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +2 -0
  66. package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +22 -0
  67. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +451 -0
  68. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +25 -0
  69. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +2601 -0
  70. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -0
  71. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
  72. package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
  73. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +24 -192
  74. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +24 -192
  75. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +34 -34
  76. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -0
  77. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +54 -54
  78. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +54 -54
  79. package/dist/views/receive-request/helper/check-netsuite-subsidiary.helper.d.ts +1 -0
  80. package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
  81. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  82. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  83. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +8 -8
  84. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +96 -96
  85. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +96 -96
  86. package/dist/{xlsx-BbtURTDy.js → xlsx-CH-bhcOL.js} +1 -1
  87. package/dist/{xlsx.util-zYS4OJFi.js → xlsx.util-4aHI7W-Z.js} +1 -1
  88. package/package.json +3 -3
  89. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-7JYNssTm.js +0 -267
  90. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-KbYSywk2.js +0 -436
  91. package/dist/FmMultiselectDialog-Da9JMCYa.js +0 -415
  92. package/dist/IngredientsView-DHAhj9pV.js +0 -1613
  93. package/dist/ReceiveRequestView-C1WBlpho.js +0 -4082
  94. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
  95. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-2mzqFGCz.js +0 -1144
  96. package/dist/TransferTemplateView-CaAJrqU6.js +0 -1262
  97. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  98. package/dist/app-CAyFhmAz.js +0 -33457
  99. package/dist/date2-D9i5izMt.js +0 -117
  100. package/dist/dayjs.min-SJKP9zBL.js +0 -282
  101. package/dist/defineDeepModel-DS4Shctf.js +0 -13
  102. package/dist/format-time-from-id-CUby60uW.js +0 -15
  103. package/dist/format-unit-display-D25Al2JZ.js +0 -1198
  104. package/dist/fuzzy-BryBtMz_.js +0 -41
  105. package/dist/index-ByJbUSIQ.js +0 -45
  106. package/dist/index-CFA_VFyX.js +0 -10545
  107. package/dist/index-CTvgBOum.js +0 -22280
  108. package/dist/netsuite-D0G4B60k.js +0 -146
  109. package/dist/normalizeArguments-DP7Hrren.js +0 -1552
  110. package/dist/row-action.enum-PMKMRrZR.js +0 -50
  111. package/dist/rules-DxVY0b7F.js +0 -198
  112. package/dist/use-template-enabled-locations-2-BgTiwy_3.js +0 -86
@@ -1,8 +1,7 @@
1
- import { defineComponent as oe, mergeModels as z, useModel as se, computed as v, ref as P, watch as T, inject as le, resolveComponent as b, openBlock as f, createElementBlock as y, createElementVNode as a, createVNode as h, withCtx as M, renderSlot as $, normalizeClass as V, toDisplayString as g, withDirectives as ie, vModelText as ae, createCommentVNode as W, createTextVNode as ue, createBlock as q, Fragment as re, renderList as me } from "vue";
2
- import { F as I } from "./index-CTvgBOum.js";
3
- import { I as k, g as j, c as ce, a as x, m as de, t as pe, b as fe, p as ve, l as be, u as ye } from "./rules-DxVY0b7F.js";
1
+ import { defineComponent as oe, mergeModels as z, useModel as se, computed as v, ref as P, watch as O, inject as ie, resolveComponent as b, openBlock as f, createElementBlock as y, createElementVNode as u, createVNode as h, withCtx as g, 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 { Q as I, I as k, G as L, z as ce, h as M, au as de, t as pe, y as fe, ab as ve, as as be, ar as ye } from "./app-CTCC1zfY.js";
4
3
  import "@feedmepos/ui-library";
5
- function E() {
4
+ function G() {
6
5
  return {
7
6
  amount: I.reset()
8
7
  };
@@ -12,32 +11,32 @@ function H() {
12
11
  return k()(d.amountAsString);
13
12
  };
14
13
  }
15
- function Ve(s) {
16
- return function(n) {
17
- return k()(n.amountAsString) !== !0 ? !0 : +n.amountAsString < s ? `Must be at least ${s}` : !0;
14
+ function Se(l) {
15
+ return function(t) {
16
+ return k()(t.amountAsString) !== !0 ? !0 : +t.amountAsString < l ? `Must be at least ${l}` : !0;
18
17
  };
19
18
  }
20
- function je(s) {
21
- return function(n) {
22
- return k()(n.amountAsString) !== !0 ? !0 : +n.amountAsString > s ? `Must be at most ${s}` : !0;
19
+ function Ve(l) {
20
+ return function(t) {
21
+ return k()(t.amountAsString) !== !0 ? !0 : +t.amountAsString > l ? `Must be at most ${l}` : !0;
23
22
  };
24
23
  }
25
- function G(s, d = !1) {
26
- return function(u) {
27
- const o = H()(u);
28
- if (o != !0)
29
- return d ? o : !0;
30
- const F = typeof s == "number" ? s : j(s, u.modelValue.measurement);
31
- return ce(+u.amountAsString).precision > F ? `Cannot exceed precision more than ${x({
24
+ function E(l, d = !1) {
25
+ return function(r) {
26
+ const s = H()(r);
27
+ if (s != !0)
28
+ return d ? s : !0;
29
+ const F = typeof l == "number" ? l : L(l, r.modelValue.measurement);
30
+ return ce(+r.amountAsString).precision > F ? `Cannot exceed precision more than ${M({
32
31
  amount: 1,
33
32
  precision: F
34
33
  })}` : !0;
35
34
  };
36
35
  }
37
- function Le(s) {
38
- const d = de(s);
39
- return function(u) {
40
- return d(u.modelValue.amount);
36
+ function Le(l) {
37
+ const d = de(l);
38
+ return function(r) {
39
+ return d(r.modelValue.amount);
41
40
  };
42
41
  }
43
42
  const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { 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 = {
@@ -46,16 +45,16 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
46
45
  }, Pe = {
47
46
  key: 0,
48
47
  class: "line-clamp-1 text-ellipsis break-all"
49
- }, Ie = { class: "flex items-center gap-4" }, ke = { class: "line-clamp-1 text-ellipsis break-all" }, Re = { class: "max-w-[200px] flex flex-col gap-[1px]" }, De = {
48
+ }, Ie = { class: "flex items-center gap-4" }, ke = { class: "line-clamp-1 text-ellipsis break-all" }, Be = { class: "max-w-[200px] flex flex-col gap-[1px]" }, De = {
50
49
  key: 1,
51
50
  class: "flex flex-col gap-4 pl-8 shrink-0"
52
- }, Be = {
51
+ }, Re = {
53
52
  class: "flex items-center",
54
53
  style: { "pointer-events": "none" }
55
- }, Ce = {
54
+ }, Ue = {
56
55
  class: "flex items-center",
57
56
  style: { "pointer-events": "none" }
58
- }, Oe = /* @__PURE__ */ oe({
57
+ }, $e = /* @__PURE__ */ oe({
59
58
  __name: "FmUnitInput",
60
59
  props: /* @__PURE__ */ z({
61
60
  modelValue: {},
@@ -105,112 +104,115 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
105
104
  modelModifiers: {}
106
105
  }),
107
106
  emits: /* @__PURE__ */ z(["update:amount", "update:measurement"], ["update:modelValue"]),
108
- setup(s, { emit: d }) {
109
- const n = s, u = d, o = se(s, "modelValue"), F = k(), R = v(() => {
110
- var t;
111
- return j(n.unit, (t = o.value) == null ? void 0 : t.measurement);
107
+ setup(l, { emit: d }) {
108
+ const t = l, r = d, s = se(l, "modelValue"), F = k(), B = v(() => {
109
+ var n;
110
+ return L(t.unit, (n = s.value) == null ? void 0 : n.measurement);
112
111
  }), c = P((() => {
113
- var i;
114
- const e = ((i = o.value) == null ? void 0 : i.amount) ?? I.reset(), t = be(e), l = n.formatMinimumPrecision ?? t.precision, r = ye(t, l);
115
- return x(r);
112
+ var o;
113
+ const e = ((o = s.value) == null ? void 0 : o.amount) ?? I.reset(), n = be(e), i = t.formatMinimumPrecision ?? n.precision, a = ye(n, i);
114
+ return M(a);
116
115
  })());
117
- T(c, (e) => {
118
- const t = F(e), l = n.precision ?? R.value, i = typeof n.formatMinimumPrecision == "number" && n.formatMinimumPrecision > l ? n.formatMinimumPrecision : l;
119
- t == !0 && (o.value = {
120
- ...o.value,
121
- amount: pe(+e, i)
122
- }), u("update:amount", e);
116
+ O(c, (e) => {
117
+ const n = F(e), i = t.precision ?? B.value, o = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > i ? t.formatMinimumPrecision : i;
118
+ n == !0 && (s.value = {
119
+ ...s.value,
120
+ amount: pe(+e, o)
121
+ }), r("update:amount", e);
123
122
  });
124
- const J = Symbol.for("fm:form-state"), D = le(J, null), A = v(() => n.disabled ?? (D == null ? void 0 : D.getDisabled()) ?? !1), K = P(), B = P(!1), L = P(!1), Q = v(() => B.value || L.value), X = v(() => {
125
- var e;
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), K = v(() => R.value || $.value), X = v(() => {
124
+ var a;
125
+ const i = [...t.unit.measurements.filter((o) => !o.name.toLocaleLowerCase().includes("inactive")).filter((o) => o.abbrev !== t.unit.abbrev || +M(o.conversion) != 1).groupBy(
126
+ (o) => `${o.abbrev}${M(o.conversion)}`
127
+ ).values()].map((o) => o[0]).flat();
126
128
  return [
127
129
  {
128
- label: (e = n.unit) == null ? void 0 : e.abbrev,
130
+ label: (a = t.unit) == null ? void 0 : a.abbrev,
129
131
  value: null
130
132
  },
131
- ...n.unit.measurements.map((t) => ({
132
- label: t.abbrev,
133
- value: t.id
133
+ ...i.map((o) => ({
134
+ label: o.abbrev,
135
+ value: o.id
134
136
  }))
135
137
  ];
136
- }), C = v({
138
+ }), U = v({
137
139
  get() {
138
- var e, t;
139
- return ((t = (e = o.value) == null ? void 0 : e.measurement) == null ? void 0 : t.id) ?? null;
140
+ var e, n;
141
+ return ((n = (e = s.value) == null ? void 0 : e.measurement) == null ? void 0 : n.id) ?? null;
140
142
  },
141
143
  set(e) {
142
144
  if (e == null)
143
- o.value = {
144
- ...o.value ?? E(),
145
+ s.value = {
146
+ ...s.value ?? G(),
145
147
  measurement: null
146
- }, u("update:measurement", null);
148
+ }, r("update:measurement", null);
147
149
  else {
148
- const t = n.unit.measurements.find((l) => l.id === e) ?? null;
149
- o.value = {
150
- ...o.value ?? E(),
151
- measurement: t
152
- }, u("update:measurement", t);
150
+ const n = t.unit.measurements.find((i) => i.id === e) ?? null;
151
+ s.value = {
152
+ ...s.value ?? G(),
153
+ measurement: n
154
+ }, r("update:measurement", n);
153
155
  }
154
156
  }
155
157
  });
156
- T(C, (e, t) => {
158
+ O(U, (e, n) => {
157
159
  var m;
158
- if (!n.convertAmountOnChangeUnit)
160
+ if (!t.convertAmountOnChangeUnit)
159
161
  return;
160
- const l = ((m = o.value) == null ? void 0 : m.amount) ?? I.reset(), r = n.unit.measurements.find((_) => _.id === t) ?? null, i = n.unit.measurements.find((_) => _.id === e) ?? null, p = r ? fe(l, r.conversion) : l, w = i ? ve(p, i.conversion) : p, N = j(n.unit, i), S = I.convertPrecision({
162
+ const i = ((m = s.value) == null ? void 0 : m.amount) ?? I.reset(), a = t.unit.measurements.find((_) => _.id === n) ?? null, o = t.unit.measurements.find((_) => _.id === e) ?? null, p = a ? fe(i, a.conversion) : i, w = o ? ve(p, o.conversion) : p, N = L(t.unit, o), S = I.convertPrecision({
161
163
  value: w,
162
164
  precision: N
163
165
  });
164
- c.value = x(S);
166
+ c.value = M(S);
165
167
  });
166
- const U = v(() => {
167
- var e, t;
168
- return ((t = (e = o.value) == null ? void 0 : e.measurement) == null ? void 0 : t.abbrev) ?? n.unit.abbrev;
168
+ const C = v(() => {
169
+ var e, n;
170
+ return ((n = (e = s.value) == null ? void 0 : e.measurement) == null ? void 0 : n.abbrev) ?? t.unit.abbrev;
169
171
  }), Y = v(
170
172
  () => {
171
173
  var e;
172
- return ((e = n.rules) == null ? void 0 : e.map(
173
- (t) => (l) => typeof t == "function" ? t(l) : t
174
+ return ((e = t.rules) == null ? void 0 : e.map(
175
+ (n) => (i) => typeof n == "function" ? n(i) : n
174
176
  )) ?? [];
175
177
  }
176
- ), ee = v(() => [...n.applyDefaultRules ? [
178
+ ), ee = v(() => [...t.applyDefaultRules ? [
177
179
  H(),
178
- typeof n.precision == "number" ? G(n.precision) : G(n.unit)
180
+ typeof t.precision == "number" ? E(t.precision) : E(t.unit)
179
181
  ] : [], ...Y.value]);
180
- function O(e) {
181
- const t = n.precision ?? R.value, r = typeof n.formatMinimumPrecision == "number" && n.formatMinimumPrecision > t ? n.formatMinimumPrecision : t, i = e.toFixed(r), p = i.includes(".") ? i.replace(/0+$/, "") : i;
182
+ function j(e) {
183
+ const n = t.precision ?? B.value, a = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > n ? t.formatMinimumPrecision : n, o = e.toFixed(a), p = o.includes(".") ? o.replace(/0+$/, "") : o;
182
184
  return p.endsWith(".") ? p.slice(0, p.length - 1) : p;
183
185
  }
184
186
  function te() {
185
- if (!n.stepper)
187
+ if (!t.stepper)
186
188
  return;
187
- const e = +c.value + +x(n.stepper);
188
- c.value = O(e);
189
+ const e = +c.value + +M(t.stepper);
190
+ c.value = j(e);
189
191
  }
190
192
  function ne() {
191
- if (!n.stepper)
193
+ if (!t.stepper)
192
194
  return;
193
- const e = +c.value - +x(n.stepper);
194
- c.value = O(e);
195
+ const e = +c.value - +M(t.stepper);
196
+ c.value = j(e);
195
197
  }
196
- return (e, t) => {
197
- const l = b("FmLabel"), r = b("FmIcon"), i = b("FmMenuItem"), p = b("FmMenu"), w = b("FmTooltip"), N = b("FmField"), S = b("FmFormGroup");
198
+ return (e, n) => {
199
+ const i = b("FmLabel"), a = b("FmIcon"), o = b("FmMenuItem"), p = b("FmMenu"), w = b("FmTooltip"), N = b("FmField"), S = b("FmFormGroup");
198
200
  return f(), y("div", he, [
199
- a("div", Me, [
200
- a("div", ge, [
201
- h(l, {
201
+ u("div", Me, [
202
+ u("div", ge, [
203
+ h(i, {
202
204
  label: e.label,
203
205
  disabled: e.disabled,
204
206
  required: e.labelMark === "required",
205
207
  optional: e.labelMark === "optional"
206
208
  }, null, 8, ["label", "disabled", "required", "optional"])
207
209
  ]),
208
- h(N, { focused: Q.value }, {
209
- default: M(() => [
210
- a("div", xe, [
211
- $(e.$slots, "prepend"),
212
- a("div", Fe, [
213
- a("div", Ae, [
210
+ h(N, { focused: K.value }, {
211
+ default: g(() => [
212
+ u("div", xe, [
213
+ T(e.$slots, "prepend"),
214
+ u("div", Fe, [
215
+ u("div", Ae, [
214
216
  e.stepperOnly ? (f(), y("span", {
215
217
  key: 0,
216
218
  class: V({
@@ -218,14 +220,14 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
218
220
  "text-fm-color-typo-primary": !A.value,
219
221
  "text-fm-color-typo-disabled": A.value
220
222
  })
221
- }, g(c.value), 3)) : ie((f(), y("input", {
223
+ }, x(c.value), 3)) : le((f(), y("input", {
222
224
  key: 1,
223
225
  type: "text",
224
226
  ref_key: "inputRef",
225
- ref: K,
226
- onFocus: t[0] || (t[0] = () => B.value = !0),
227
- onBlur: t[1] || (t[1] = () => B.value = !1),
228
- "onUpdate:modelValue": t[2] || (t[2] = (m) => c.value = m),
227
+ ref: J,
228
+ onFocus: n[0] || (n[0] = () => R.value = !0),
229
+ onBlur: n[1] || (n[1] = () => R.value = !1),
230
+ "onUpdate:modelValue": n[2] || (n[2] = (m) => c.value = m),
229
231
  class: V({
230
232
  "fm-text-field--input fm-typo-en-body-lg-400": !0,
231
233
  "text-fm-color-typo-primary": !A.value,
@@ -235,35 +237,35 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
235
237
  [ae, c.value]
236
238
  ])
237
239
  ]),
238
- e.separator ? (f(), y("div", _e, g(e.separator), 1)) : W("", !0),
239
- a("div", {
240
+ e.separator ? (f(), y("div", _e, x(e.separator), 1)) : q("", !0),
241
+ u("div", {
240
242
  class: V([e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"])
241
243
  }, [
242
244
  h(w, { "z-index": 51 }, {
243
- content: M(() => [
244
- ue(g(U.value), 1)
245
+ content: g(() => [
246
+ ue(x(C.value), 1)
245
247
  ]),
246
- default: M(() => [
247
- e.disableUnit ? (f(), y("div", Pe, g(U.value), 1)) : (f(), q(p, {
248
+ default: g(() => [
249
+ e.disableUnit ? (f(), y("div", Pe, x(C.value), 1)) : (f(), W(p, {
248
250
  key: 1,
249
- onMenuChanged: t[3] || (t[3] = (m) => L.value = m),
251
+ onMenuChanged: n[3] || (n[3] = (m) => $.value = m),
250
252
  "z-index": 500,
251
253
  placement: e.placement,
252
254
  disabled: e.disabled
253
255
  }, {
254
- "menu-button": M(() => [
255
- a("div", Ie, [
256
- a("div", ke, g(U.value), 1),
257
- h(r, { name: "keyboard_arrow_down" })
256
+ "menu-button": g(() => [
257
+ u("div", Ie, [
258
+ u("div", ke, x(C.value), 1),
259
+ h(a, { name: "keyboard_arrow_down" })
258
260
  ])
259
261
  ]),
260
- default: M(() => [
261
- a("div", Re, [
262
- (f(!0), y(re, null, me(X.value, (m) => (f(), q(i, {
262
+ default: g(() => [
263
+ u("div", Be, [
264
+ (f(!0), y(re, null, me(X.value, (m) => (f(), W(o, {
263
265
  key: m.value ?? void 0,
264
266
  label: m.label,
265
- "model-value": m.value == C.value,
266
- onClick: (_) => C.value = m.value
267
+ "model-value": m.value == U.value,
268
+ onClick: (_) => U.value = m.value
267
269
  }, null, 8, ["label", "model-value", "onClick"]))), 128))
268
270
  ])
269
271
  ]),
@@ -274,31 +276,31 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
274
276
  })
275
277
  ], 2),
276
278
  e.stepper ? (f(), y("div", De, [
277
- a("div", {
279
+ u("div", {
278
280
  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",
279
281
  onClick: te
280
282
  }, [
281
- a("div", Be, [
282
- h(r, {
283
+ u("div", Re, [
284
+ h(a, {
283
285
  name: "expand_less",
284
286
  size: "md"
285
287
  })
286
288
  ])
287
289
  ]),
288
- a("div", {
290
+ u("div", {
289
291
  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",
290
292
  onClick: ne
291
293
  }, [
292
- a("div", Ce, [
293
- h(r, {
294
+ u("div", Ue, [
295
+ h(a, {
294
296
  name: "expand_more",
295
297
  size: "md"
296
298
  })
297
299
  ])
298
300
  ])
299
- ])) : W("", !0)
301
+ ])) : q("", !0)
300
302
  ]),
301
- $(e.$slots, "append")
303
+ T(e.$slots, "append")
302
304
  ])
303
305
  ]),
304
306
  _: 3
@@ -306,7 +308,7 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
306
308
  ]),
307
309
  h(S, {
308
310
  class: "flex-1",
309
- "model-value": { modelValue: o.value, amountAsString: String(c.value) },
311
+ "model-value": { modelValue: s.value, amountAsString: String(c.value) },
310
312
  info: e.labelInfo,
311
313
  rules: ee.value,
312
314
  "helper-text": e.helperText,
@@ -317,10 +319,10 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
317
319
  }
318
320
  });
319
321
  export {
320
- Ve as F,
321
- Oe as _,
322
- je as a,
322
+ Se as F,
323
+ $e as _,
324
+ Ve as a,
323
325
  Le as b,
324
326
  H as c,
325
- G as d
327
+ E as d
326
328
  };
@@ -1,7 +1,7 @@
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 { a, b as y } from "./rules-DxVY0b7F.js";
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 y } from "vue";
2
+ import { h as a, y as x } from "./app-CTCC1zfY.js";
3
3
  import { useI18n as _ } from "@feedmepos/mf-common";
4
- const v = { class: "flex flex-col" }, b = { 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" }, g = { class: "flex-1 py-8 px-16" }, h = {
4
+ const v = { class: "flex flex-col" }, h = { 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" }, g = { class: "flex-1 py-8 px-16" }, b = {
5
5
  class: "flex-0 py-8 px-16",
6
6
  style: { "flex-basis": "120px" }
7
7
  }, k = { class: "flex-1 py-8 px-16" }, B = {
@@ -23,7 +23,7 @@ const v = { class: "flex flex-col" }, b = { class: "flex flex-row fm-typo-en-bod
23
23
  function c(e, i) {
24
24
  var t;
25
25
  if (e.measurement) {
26
- const u = y(e.amount, e.measurement.conversion);
26
+ const u = x(e.amount, e.measurement.conversion);
27
27
  return `${a(u, !1)} ${(t = e.measurement) == null ? void 0 : t.abbrev}`;
28
28
  }
29
29
  return `${a(e.amount, !1)} ${i.abbrev}`;
@@ -32,11 +32,11 @@ const v = { class: "flex flex-col" }, b = { class: "flex flex-row fm-typo-en-bod
32
32
  return e.unit !== void 0;
33
33
  }
34
34
  return (e, i) => (s(), n("div", v, [
35
- r("div", b, [
35
+ r("div", h, [
36
36
  r("div", g, o(e.name), 1),
37
- r("div", h, o(l(m)("inventory.ingredient.bindedItems.amount")), 1)
37
+ r("div", b, o(l(m)("inventory.ingredient.bindedItems.amount")), 1)
38
38
  ]),
39
- (s(!0), n(d, null, x(e.bindings, (t) => (s(), n("div", {
39
+ (s(!0), n(d, null, y(e.bindings, (t) => (s(), n("div", {
40
40
  key: t.id,
41
41
  class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
42
42
  }, [
@@ -1,15 +1,9 @@
1
- import { ref as C, computed as I, defineComponent as Y, resolveComponent as S, openBlock as M, createBlock as O, withCtx as R, createElementVNode as x, createVNode as g, unref as l, createElementBlock as ee, toDisplayString as H, createTextVNode as te, watch as ue, isRef as ce, normalizeClass as de, normalizeStyle as me, createSlots as pe, Teleport as fe, normalizeProps as ve, guardReactiveProps as ge } from "vue";
2
- import { a as J, c as B, h as oe, u as ye } from "./app-CAyFhmAz.js";
3
- import { useDialog as le, useSnackbar as Z, useProxiedModel as be, useBreakpoints as _e } from "@feedmepos/ui-library";
4
- import { F as h, D as ne, R as Q } from "./row-action.enum-PMKMRrZR.js";
1
+ import { ref as C, computed as F, defineComponent as Y, resolveComponent as S, openBlock as M, createBlock as O, withCtx as R, createElementVNode as x, createVNode as g, unref as l, createElementBlock as ee, toDisplayString as H, createTextVNode as te, watch as ue, isRef as ce, normalizeClass as de, normalizeStyle as me, createSlots as pe, Teleport as fe, normalizeProps as ve, guardReactiveProps as ge } from "vue";
2
+ import { a as J, c as h, d as B, e as ye, D as oe, f as Q, w as be, k as _e, A as xe, x as ne, m as se, u as ke, p as he, q as we, r as Se, s as Ie, v as ae } from "./app-CTCC1zfY.js";
3
+ import { useDialog as le, useSnackbar as Z, useProxiedModel as Fe, useBreakpoints as Ce } from "@feedmepos/ui-library";
5
4
  import { useI18n as W } from "@feedmepos/mf-common";
6
- import { defineStore as ie, storeToRefs as se } from "pinia";
7
- import { c as xe, _ as ke, F as ae } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
8
- import { u as he, _ as we, a as Se } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-KbYSywk2.js";
5
+ import { defineStore as ie, storeToRefs as re } from "pinia";
9
6
  import "./array-hChJVZLE.js";
10
- import { d as Fe } from "./defineDeepModel-DS4Shctf.js";
11
- import { R as Ie, A as Ce } from "./rules-DxVY0b7F.js";
12
- import { F as re } from "./FmMultiselectDialog-Da9JMCYa.js";
13
7
  const X = ie(
14
8
  "ingredientGroupactions",
15
9
  function() {
@@ -113,7 +107,7 @@ const X = ie(
113
107
  );
114
108
  }
115
109
  }
116
- const v = I(() => [
110
+ const v = F(() => [
117
111
  {
118
112
  accessorKey: "name",
119
113
  header: () => "Name"
@@ -130,8 +124,8 @@ const X = ie(
130
124
  id: "action",
131
125
  header: "",
132
126
  cell(f) {
133
- return xe(
134
- [ne[Q.Edit], ne[Q.Delete]],
127
+ return ye(
128
+ [oe[Q.Edit], oe[Q.Delete]],
135
129
  (y) => {
136
130
  p(y, f.row.original);
137
131
  }
@@ -166,7 +160,7 @@ const X = ie(
166
160
  },
167
161
  emits: ["validation-success"],
168
162
  setup(U, { expose: c, emit: w }) {
169
- const o = Fe("modelValue"), r = w, i = J(), p = le(), { t: v } = W(), f = C();
163
+ const o = be("modelValue"), r = w, i = J(), p = le(), { t: v } = W(), f = C();
170
164
  c({
171
165
  validateInputs: () => {
172
166
  var a;
@@ -181,7 +175,7 @@ const X = ie(
181
175
  return (a = f.value) == null ? void 0 : a.resetInputs();
182
176
  }
183
177
  });
184
- const y = I(() => i.skus.groupBy((a) => a.unit._id));
178
+ const y = F(() => i.skus.groupBy((a) => a.unit._id));
185
179
  function A() {
186
180
  var s;
187
181
  const a = i.skus.filter((n) => {
@@ -198,7 +192,7 @@ const X = ie(
198
192
  p.open({
199
193
  title: v("inventory.closing.form.items.selectItem"),
200
194
  closeButton: !0,
201
- contentComponent: re,
195
+ contentComponent: ne,
202
196
  contentComponentProps: {
203
197
  modelValue: [(s = o.skus) == null ? void 0 : s[0]],
204
198
  items: a,
@@ -237,7 +231,7 @@ const X = ie(
237
231
  p.open({
238
232
  title: v("inventory.closing.form.items.selectItem"),
239
233
  closeButton: !0,
240
- contentComponent: re,
234
+ contentComponent: ne,
241
235
  contentComponentProps: {
242
236
  modelValue: s,
243
237
  items: a,
@@ -276,19 +270,19 @@ const X = ie(
276
270
  return (a, s) => {
277
271
  const n = S("FmTextField"), t = S("FmLabel"), e = S("FmField"), u = S("FmFormGroup"), _ = S("FmButton"), m = S("FmTable"), D = S("FmForm");
278
272
  return M(), O(D, {
279
- onValidationSuccess: s[5] || (s[5] = (F) => r("validation-success")),
273
+ onValidationSuccess: s[5] || (s[5] = (I) => r("validation-success")),
280
274
  ref_key: "formRef",
281
275
  ref: f,
282
276
  class: "flex flex-col gap-32"
283
277
  }, {
284
278
  default: R(() => {
285
- var F, G, V, T, L;
279
+ var I, G, V, T, L;
286
280
  return [
287
281
  x("div", De, [
288
282
  g(n, {
289
283
  label: "Name",
290
284
  "label-mark": "required",
291
- rules: [l(Ie)()],
285
+ rules: [l(_e)()],
292
286
  modelValue: l(o).name,
293
287
  "onUpdate:modelValue": s[0] || (s[0] = (k) => l(o).name = k)
294
288
  }, null, 8, ["rules", "modelValue"]),
@@ -320,8 +314,8 @@ const X = ie(
320
314
  x("div", Te, [
321
315
  s[6] || (s[6] = te(H("Select a main item to filter out substitutable items with same unit.") + " ")),
322
316
  g(u, {
323
- "model-value": ((F = l(o)) == null ? void 0 : F.skus) ?? [],
324
- rules: [l(Ce)(1, "Required")]
317
+ "model-value": ((I = l(o)) == null ? void 0 : I.skus) ?? [],
318
+ rules: [l(xe)(1, "Required")]
325
319
  }, null, 8, ["model-value", "rules"])
326
320
  ])
327
321
  ])
@@ -370,7 +364,7 @@ const X = ie(
370
364
  },
371
365
  emits: ["update:show"],
372
366
  setup(U) {
373
- const c = U, w = J(), o = Z(), { t: r } = W(), i = be(c, "show"), p = C({}), v = C(`${Math.random()}`);
367
+ const c = U, w = J(), o = Z(), { t: r } = W(), i = Fe(c, "show"), p = C({}), v = C(`${Math.random()}`);
374
368
  ue(
375
369
  () => c.show,
376
370
  (t) => {
@@ -382,7 +376,7 @@ const X = ie(
382
376
  }), v.value = `${Math.random()}`);
383
377
  }
384
378
  );
385
- const f = I(() => {
379
+ const f = F(() => {
386
380
  switch (c.mode) {
387
381
  case h.READ:
388
382
  return "";
@@ -392,7 +386,7 @@ const X = ie(
392
386
  return r("inventory.ingredient.create.title");
393
387
  }
394
388
  return "";
395
- }), y = I(() => {
389
+ }), y = F(() => {
396
390
  switch (c.mode) {
397
391
  case h.READ:
398
392
  return "";
@@ -413,7 +407,7 @@ const X = ie(
413
407
  type: "success"
414
408
  });
415
409
  } catch (e) {
416
- e instanceof oe || o.open({
410
+ e instanceof se || o.open({
417
411
  title: r("inventory.ingredient.create.error.title"),
418
412
  message: r("inventory.ingredient.create.error.message"),
419
413
  type: "error"
@@ -432,7 +426,7 @@ const X = ie(
432
426
  type: "success"
433
427
  });
434
428
  } catch (e) {
435
- e instanceof oe || o.open({
429
+ e instanceof se || o.open({
436
430
  title: r("inventory.ingredient.update.error.title"),
437
431
  message: r("inventory.ingredient.update.error.message"),
438
432
  type: "error"
@@ -497,15 +491,15 @@ const X = ie(
497
491
  }, 8, ["model-value", "header"]);
498
492
  };
499
493
  }
500
- }), Le = { class: "flex flex-col py-8" }, ze = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ne = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, tt = /* @__PURE__ */ Y({
494
+ }), Le = { class: "flex flex-col py-8" }, ze = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ne = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Qe = /* @__PURE__ */ Y({
501
495
  __name: "IngredientGroupView",
502
496
  setup(U) {
503
- const c = J(), w = I(() => c.skuGroups), o = ye(), { t: r } = W(), {
497
+ const c = J(), w = F(() => c.skuGroups), o = ke(), { t: r } = W(), {
504
498
  createIngredientGroup: i,
505
499
  updateIngredientGroup: p,
506
500
  importIngredientGroups: v,
507
501
  exportIngredientGroups: f
508
- } = X(), { columnDefs: y, loading: A } = se(Ae()), { ingredientGroupDialogProps: b } = se(X());
502
+ } = X(), { columnDefs: y, loading: A } = re(Ae()), { ingredientGroupDialogProps: b } = re(X());
509
503
  function d(D) {
510
504
  switch (D) {
511
505
  case "add":
@@ -516,7 +510,7 @@ const X = ie(
516
510
  return f();
517
511
  }
518
512
  }
519
- const a = C(""), s = C(!1), n = I(() => s.value || A.value), { breakpoints: t } = _e(), e = I(() => t.value.xs || t.value.sm), u = I(() => e.value ? 10 : 20), _ = he(), m = I(() => [
513
+ const a = C(""), s = C(!1), n = F(() => s.value || A.value), { breakpoints: t } = Ce(), e = F(() => t.value.xs || t.value.sm), u = F(() => e.value ? 10 : 20), _ = he(), m = F(() => [
520
514
  {
521
515
  label: r("inventory.ingredient.create.title"),
522
516
  value: "add",
@@ -526,7 +520,7 @@ const X = ie(
526
520
  { label: r("common.import"), value: "import" },
527
521
  { label: r("common.export"), value: "export" }
528
522
  ]);
529
- return (D, F) => {
523
+ return (D, I) => {
530
524
  const G = S("FmTable");
531
525
  return M(), O(we, {
532
526
  title: l(r)("inventory.ingredientGroup.title"),
@@ -546,7 +540,7 @@ const X = ie(
546
540
  g(Se, {
547
541
  searchable: "",
548
542
  search: a.value,
549
- "onUpdate:search": F[0] || (F[0] = (V) => a.value = V)
543
+ "onUpdate:search": I[0] || (I[0] = (V) => a.value = V)
550
544
  }, null, 8, ["search"]),
551
545
  g(G, {
552
546
  style: me(l(_).tableHeight),
@@ -555,11 +549,11 @@ const X = ie(
555
549
  "search-value": a.value,
556
550
  loading: !l(o)._currentLocation || n.value,
557
551
  "loading-text": "Loading",
558
- onRowClick: F[1] || (F[1] = (V) => l(p)(V.original)),
552
+ onRowClick: I[1] || (I[1] = (V) => l(p)(V.original)),
559
553
  "page-size": u.value
560
554
  }, {
561
555
  "list-row": R((V) => [
562
- g(ke, {
556
+ g(Ie, {
563
557
  row: V,
564
558
  onRowClick: l(p)
565
559
  }, pe({
@@ -606,5 +600,5 @@ const X = ie(
606
600
  }
607
601
  });
608
602
  export {
609
- tt as default
603
+ Qe as default
610
604
  };