@feedmepos/mf-inventory-portal 0.0.6 → 0.0.7-dev.2

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 (39) hide show
  1. package/dist/{ApprovalView-7XAT5-7o.js → ApprovalView-PgJmPjWr.js} +6 -6
  2. package/dist/{BindingsDialog-DgHuffxZ.js → BindingsDialog-Ch42kY-Z.js} +2 -2
  3. package/dist/{BindingsPicker-CdG1FKt3.js → BindingsPicker-CjKJb9Iu.js} +2 -2
  4. package/dist/{BindingsTable-DnhyMeyT.js → BindingsTable-PvwPN2Vu.js} +3 -3
  5. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-aicACi6T.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-Dyl7UXMT.js} +1 -1
  6. package/dist/{FmMultiselectDialog.vue_vue_type_script_setup_true_lang-BeCBc3ie.js → FmMultiselectDialog.vue_vue_type_script_setup_true_lang-BCUjOxSy.js} +2 -2
  7. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DS9A38-m.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CDi5O9gb.js} +1 -1
  8. package/dist/{IngredientsView-CC2M-Oxt.js → IngredientsView--902oYCN.js} +35 -39
  9. package/dist/{IntegrationView-C0eXkb_X.js → IntegrationView-DzfSwX2I.js} +3 -3
  10. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BqkpGRQG.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-jBbeI4Xr.js} +5 -5
  11. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DZshbzqT.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-VIcbJgay.js} +1 -1
  12. package/dist/{PurchaseOrderPrintPreview-BChxLASs.js → PurchaseOrderPrintPreview-sr4WLbNL.js} +1 -1
  13. package/dist/{ReceiveRequestView-B2T-K9on.js → ReceiveRequestView-B3n0s9JC.js} +11 -11
  14. package/dist/{RecipeView-DGS0-kll.js → RecipeView-DjHRoOJv.js} +58 -58
  15. package/dist/StockView-CtJ1iGfy.js +1807 -0
  16. package/dist/{SupplierView-C-qEfLPr.js → SupplierView-DXn13XBW.js} +7 -7
  17. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BQvyTSZC.js → TransferDetails.vue_vue_type_script_setup_true_lang-BdTcFpfV.js} +5 -5
  18. package/dist/{UnitView-zTo6Jwgy.js → UnitView-DVrscPTQ.js} +190 -177
  19. package/dist/{WarehouseView-h92-OZ8y.js → WarehouseView-B1n-2vW4.js} +3 -3
  20. package/dist/api/stock.d.ts +0 -8
  21. package/dist/{app-D_R27XfK.js → app-D-4-R23d.js} +10467 -10461
  22. package/dist/app.js +1 -1
  23. package/dist/core.d.ts +3 -3
  24. package/dist/{date2-CsVyh2xw.js → date2-B0vvvXGT.js} +8 -8
  25. package/dist/{dayjs.min-DJF3Prun.js → dayjs.min-BJNynOI_.js} +145 -145
  26. package/dist/{decimal-esXdd4p7.js → decimal-MudMBQgK.js} +1 -1
  27. package/dist/{fuzzy-5drv5SZI.js → fuzzy-CToOYwhA.js} +1 -1
  28. package/dist/{init-date-range-BWVT2UgA.js → init-date-range-D5SkV2p4.js} +1 -1
  29. package/dist/{layout-Cf3iZuvk.js → layout-C7Dvo6EU.js} +1 -1
  30. package/dist/{rules-QzzL5oLu.js → rules-D4pouPya.js} +1 -1
  31. package/dist/{stock-estimate-DqJKQ1Jf.js → stock-estimate-Cpumo92_.js} +2 -2
  32. package/dist/style.css +1 -1
  33. package/dist/{supplier-Df899fpy.js → supplier-lu9adAbr.js} +1 -1
  34. package/dist/tsconfig.app.tsbuildinfo +1 -1
  35. package/dist/{use-inventory-binding-dialog-CYQrVeOf.js → use-inventory-binding-dialog-C-4l8D01.js} +2 -2
  36. package/dist/{xlsx-DqpZNivg.js → xlsx-BIvEkCPF.js} +1087 -1087
  37. package/package.json +4 -4
  38. package/dist/StockView-Byeg5Lmo.js +0 -1919
  39. package/dist/views/stock/components/StockRecalculateDialog.vue.d.ts +0 -9
@@ -1,32 +1,32 @@
1
- import { defineComponent as q, computed as x, openBlock as m, createElementBlock as w, Fragment as z, renderList as j, createElementVNode as s, toDisplayString as _, createCommentVNode as G, ref as R, resolveComponent as A, createBlock as T, withCtx as I, createVNode as c, unref as d, isRef as W, normalizeStyle as se, Teleport as ae, normalizeProps as ne, guardReactiveProps as re } from "vue";
2
- import { u as H, S as ie, c as te, b as X, e as de } from "./app-D_R27XfK.js";
3
- import { useDialog as ue, useSnackbar as oe, useProxiedModel as Z, useBreakpoints as me } from "@feedmepos/ui-library";
4
- import { i as ce, _ as pe } from "./is-linked-ingredient-error-C6AghEwR.js";
5
- import { F as U, D as ee, R as N } from "./row-action.enum-BwQbURNh.js";
6
- import { c as fe, _ as ve, F as be, u as ye } from "./layout-Cf3iZuvk.js";
7
- import { _ as ge } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CFjO4TPG.js";
8
- import { R as L, A as _e, a as xe } from "./rules-QzzL5oLu.js";
9
- import { a as O, c as he } from "./date2-CsVyh2xw.js";
10
- import { F as Ve } from "./decimal-esXdd4p7.js";
11
- import { _ as Ue } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DZshbzqT.js";
12
- const we = { class: "flex flex-col gap-8" }, Ce = /* @__PURE__ */ s("div", { class: "fm-typo-en-body-md-400" }, "Sorry, this unit is used in the following modules:", -1), Se = {
1
+ import { defineComponent as q, computed as x, openBlock as c, createElementBlock as U, Fragment as z, renderList as j, createElementVNode as l, toDisplayString as g, createCommentVNode as G, ref as R, resolveComponent as A, createBlock as T, withCtx as I, createVNode as m, unref as d, isRef as W, normalizeStyle as se, Teleport as ae, normalizeProps as ne, guardReactiveProps as re } from "vue";
2
+ import { u as H, S as ie, c as te, b as X, e as de } from "./app-D-4-R23d.js";
3
+ import { useDialog as ue, useSnackbar as oe, useProxiedModel as Z, useBreakpoints as ce } from "@feedmepos/ui-library";
4
+ import { i as me, _ as pe } from "./is-linked-ingredient-error-C6AghEwR.js";
5
+ import { F as w, D as ee, R as N } from "./row-action.enum-BwQbURNh.js";
6
+ import { c as fe, _ as ve, F as be, u as ye } from "./layout-C7Dvo6EU.js";
7
+ import { _ as _e } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CFjO4TPG.js";
8
+ import { R as L, A as ge, a as xe } from "./rules-D4pouPya.js";
9
+ import { a as O, c as he } from "./date2-B0vvvXGT.js";
10
+ import { F as Ve } from "./decimal-MudMBQgK.js";
11
+ import { _ as we } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-VIcbJgay.js";
12
+ const Ue = { class: "flex flex-col gap-8" }, Ce = /* @__PURE__ */ l("div", { class: "fm-typo-en-body-md-400" }, "Sorry, this unit is used in the following modules:", -1), $e = {
13
13
  key: 0,
14
14
  class: "flex flex-col"
15
- }, Fe = /* @__PURE__ */ s("div", { 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" }, [
16
- /* @__PURE__ */ s("div", { class: "flex-1 py-8 px-16" }, "Ingredient"),
17
- /* @__PURE__ */ s("div", {
15
+ }, Se = /* @__PURE__ */ l("div", { 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" }, [
16
+ /* @__PURE__ */ l("div", { class: "flex-1 py-8 px-16" }, "Ingredient"),
17
+ /* @__PURE__ */ l("div", {
18
18
  class: "flex-0 py-8 px-16",
19
19
  style: { "flex-basis": "240px" }
20
20
  }, "Used in")
21
- ], -1), ke = { class: "flex-1 py-8 px-16" }, $e = {
21
+ ], -1), Fe = { class: "flex-1 py-8 px-16" }, ke = {
22
22
  class: "flex-0 py-8 px-16",
23
23
  style: { "flex-basis": "240px" }
24
24
  }, Ae = {
25
25
  key: 1,
26
26
  class: "flex flex-col"
27
- }, Ee = /* @__PURE__ */ s("div", { 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" }, [
28
- /* @__PURE__ */ s("div", { class: "flex-1 py-8 px-16" }, "Recipe"),
29
- /* @__PURE__ */ s("div", {
27
+ }, Ee = /* @__PURE__ */ l("div", { 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" }, [
28
+ /* @__PURE__ */ l("div", { class: "flex-1 py-8 px-16" }, "Recipe"),
29
+ /* @__PURE__ */ l("div", {
30
30
  class: "flex-0 py-8 px-16",
31
31
  style: { "flex-basis": "240px" }
32
32
  }, "Used in")
@@ -36,9 +36,9 @@ const we = { class: "flex flex-col gap-8" }, Ce = /* @__PURE__ */ s("div", { cla
36
36
  }, Re = {
37
37
  key: 2,
38
38
  class: "flex flex-col"
39
- }, Pe = /* @__PURE__ */ s("div", { 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" }, [
40
- /* @__PURE__ */ s("div", { class: "flex-1 py-8 px-16" }, "Menu"),
41
- /* @__PURE__ */ s("div", {
39
+ }, Pe = /* @__PURE__ */ l("div", { 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" }, [
40
+ /* @__PURE__ */ l("div", { class: "flex-1 py-8 px-16" }, "Menu"),
41
+ /* @__PURE__ */ l("div", {
42
42
  class: "flex-0 py-8 px-16",
43
43
  style: { "flex-basis": "240px" }
44
44
  }, "Used in")
@@ -51,45 +51,45 @@ const we = { class: "flex flex-col gap-8" }, Ce = /* @__PURE__ */ s("div", { cla
51
51
  unit: {}
52
52
  },
53
53
  setup(h) {
54
- const u = h, y = H(), a = x(() => y.validateUnitUsage(u.unit)), l = x(() => a.value.filter((f) => f.from === "INGREDIENT")), r = x(() => a.value.filter((f) => f.from === "RECIPE")), p = x(() => a.value.filter((f) => f.from === "MENU"));
55
- return (f, V) => (m(), w("div", we, [
54
+ const u = h, y = H(), a = x(() => y.validateUnitUsage(u.unit)), s = x(() => a.value.filter((f) => f.from === "INGREDIENT")), r = x(() => a.value.filter((f) => f.from === "RECIPE")), p = x(() => a.value.filter((f) => f.from === "MENU"));
55
+ return (f, V) => (c(), U("div", Ue, [
56
56
  Ce,
57
- l.value.length ? (m(), w("div", Se, [
58
- Fe,
59
- (m(!0), w(z, null, j(l.value, (t) => {
57
+ s.value.length ? (c(), U("div", $e, [
58
+ Se,
59
+ (c(!0), U(z, null, j(s.value, (t) => {
60
60
  var n;
61
- return m(), w("div", {
61
+ return c(), U("div", {
62
62
  key: t.code,
63
63
  class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
64
64
  }, [
65
- s("div", ke, _(t.code) + " " + _(t.name), 1),
66
- s("div", $e, _((n = t.bindedIngredient) != null && n.length ? "Convert binding" : "Item unit"), 1)
65
+ l("div", Fe, g(t.code) + " " + g(t.name), 1),
66
+ l("div", ke, g((n = t.bindedIngredient) != null && n.length ? "Convert binding" : "Item unit"), 1)
67
67
  ]);
68
68
  }), 128))
69
69
  ])) : G("", !0),
70
- r.value.length ? (m(), w("div", Ae, [
70
+ r.value.length ? (c(), U("div", Ae, [
71
71
  Ee,
72
- (m(!0), w(z, null, j(r.value, (t) => {
72
+ (c(!0), U(z, null, j(r.value, (t) => {
73
73
  var n, v, b;
74
- return m(), w("div", {
74
+ return c(), U("div", {
75
75
  key: t.code,
76
76
  class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
77
77
  }, [
78
- s("div", Ie, _(t.code) + " " + _(t.name), 1),
79
- s("div", De, _((n = t.bindedIngredient) == null ? void 0 : n.slice(0, 3).map((e) => e.code).join(", ")) + " " + _(t.bindedIngredient && ((v = t.bindedIngredient) == null ? void 0 : v.length) > 3 ? `and ${((b = t.bindedIngredient) == null ? void 0 : b.length) - 3} more` : ""), 1)
78
+ l("div", Ie, g(t.code) + " " + g(t.name), 1),
79
+ l("div", De, g((n = t.bindedIngredient) == null ? void 0 : n.slice(0, 3).map((e) => e.code).join(", ")) + " " + g(t.bindedIngredient && ((v = t.bindedIngredient) == null ? void 0 : v.length) > 3 ? `and ${((b = t.bindedIngredient) == null ? void 0 : b.length) - 3} more` : ""), 1)
80
80
  ]);
81
81
  }), 128))
82
82
  ])) : G("", !0),
83
- p.value.length ? (m(), w("div", Re, [
83
+ p.value.length ? (c(), U("div", Re, [
84
84
  Pe,
85
- (m(!0), w(z, null, j(p.value, (t) => {
85
+ (c(!0), U(z, null, j(p.value, (t) => {
86
86
  var n, v, b;
87
- return m(), w("div", {
87
+ return c(), U("div", {
88
88
  key: t.code,
89
89
  class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
90
90
  }, [
91
- s("div", Te, _(t.code) + " " + _(t.name), 1),
92
- s("div", Me, _((n = t.bindedIngredient) == null ? void 0 : n.slice(0, 3).map((e) => e.code).join(", ")) + " " + _(t.bindedIngredient && ((v = t.bindedIngredient) == null ? void 0 : v.length) > 3 ? `and ${((b = t.bindedIngredient) == null ? void 0 : b.length) - 3} more` : ""), 1)
91
+ l("div", Te, g(t.code) + " " + g(t.name), 1),
92
+ l("div", Me, g((n = t.bindedIngredient) == null ? void 0 : n.slice(0, 3).map((e) => e.code).join(", ")) + " " + g(t.bindedIngredient && ((v = t.bindedIngredient) == null ? void 0 : v.length) > 3 ? `and ${((b = t.bindedIngredient) == null ? void 0 : b.length) - 3} more` : ""), 1)
93
93
  ]);
94
94
  }), 128))
95
95
  ])) : G("", !0)
@@ -97,28 +97,28 @@ const we = { class: "flex flex-col gap-8" }, Ce = /* @__PURE__ */ s("div", { cla
97
97
  }
98
98
  });
99
99
  function Ne() {
100
- const h = ue(), u = oe(), y = H(), a = R(!1), l = R();
100
+ const h = ue(), u = oe(), y = H(), a = R(!1), s = R();
101
101
  function r() {
102
102
  const t = {
103
103
  unit: {},
104
- mode: U.CREATE,
104
+ mode: w.CREATE,
105
105
  show: !0,
106
106
  "onUpdate:show"(n) {
107
- l.value.show = n;
107
+ s.value.show = n;
108
108
  }
109
109
  };
110
- l.value = t;
110
+ s.value = t;
111
111
  }
112
112
  async function p(t) {
113
113
  const n = {
114
114
  unit: t,
115
- mode: U.UPDATE,
115
+ mode: w.UPDATE,
116
116
  show: !0,
117
117
  "onUpdate:show"(v) {
118
- l.value.show = v;
118
+ s.value.show = v;
119
119
  }
120
120
  };
121
- l.value = n;
121
+ s.value = n;
122
122
  }
123
123
  async function f(t) {
124
124
  a.value = !0;
@@ -129,7 +129,7 @@ function Ne() {
129
129
  type: "success"
130
130
  });
131
131
  } catch (n) {
132
- n instanceof ie && ce(n) ? h.open({
132
+ n instanceof ie && me(n) ? h.open({
133
133
  title: "Cannot delete unit",
134
134
  contentComponent: pe,
135
135
  contentComponentProps: {
@@ -186,7 +186,7 @@ function Ne() {
186
186
  createUnit: r,
187
187
  updateUnit: p,
188
188
  deleteUnit: V,
189
- unitDialogProps: l,
189
+ unitDialogProps: s,
190
190
  unitViewLoading: a
191
191
  };
192
192
  }
@@ -194,13 +194,13 @@ function Le({
194
194
  updateUnit: h,
195
195
  deleteUnit: u
196
196
  }) {
197
- async function y(l, r) {
197
+ async function y(s, r) {
198
198
  const p = te(r);
199
- if (l === N.Edit) {
199
+ if (s === N.Edit) {
200
200
  await h(p);
201
201
  return;
202
202
  }
203
- if (l === N.Delete) {
203
+ if (s === N.Delete) {
204
204
  await u(p);
205
205
  return;
206
206
  }
@@ -221,11 +221,11 @@ function Le({
221
221
  {
222
222
  id: "action",
223
223
  header: "",
224
- cell(l) {
224
+ cell(s) {
225
225
  return fe(
226
226
  [ee[N.Edit], ee[N.Delete]],
227
227
  (r) => {
228
- y(r, l.row.original);
228
+ y(r, s.row.original);
229
229
  }
230
230
  );
231
231
  },
@@ -238,7 +238,7 @@ function Le({
238
238
  }
239
239
  ] };
240
240
  }
241
- const ze = { class: "grid grid-cols-3 gap-24" }, je = { class: "flex" }, qe = { class: "flex items-center" }, He = { class: "fm-typo-en-body-lg-600 flex-grow" }, Ke = { class: "grid grid-cols-3 gap-24" }, Ge = /* @__PURE__ */ q({
241
+ const ze = { class: "flex flex-col gap-24" }, je = { class: "flex gap-24" }, qe = { class: "flex-1" }, He = { class: "flex-1" }, Ke = { class: "flex" }, Ge = { class: "flex items-center" }, Oe = { class: "fm-typo-en-body-lg-600 flex-grow" }, Ye = { class: "flex flex-col gap-24" }, Je = { class: "flex gap-24" }, Qe = { class: "flex-1" }, We = { class: "flex-1" }, Xe = /* @__PURE__ */ q({
242
242
  __name: "UnitForm",
243
243
  props: {
244
244
  mode: {},
@@ -247,9 +247,9 @@ const ze = { class: "grid grid-cols-3 gap-24" }, je = { class: "flex" }, qe = {
247
247
  },
248
248
  emits: ["update:modelValue", "click:submit"],
249
249
  setup(h, { expose: u, emit: y }) {
250
- const a = h, l = y;
250
+ const a = h, s = y;
251
251
  function r() {
252
- l("click:submit");
252
+ s("click:submit");
253
253
  }
254
254
  const p = x({
255
255
  get() {
@@ -258,7 +258,7 @@ const ze = { class: "grid grid-cols-3 gap-24" }, je = { class: "flex" }, qe = {
258
258
  },
259
259
  set(e) {
260
260
  const o = a.modelValue ?? {};
261
- o.name = e, l("update:modelValue", o);
261
+ o.name = e, s("update:modelValue", o);
262
262
  }
263
263
  }), f = x({
264
264
  get() {
@@ -267,7 +267,7 @@ const ze = { class: "grid grid-cols-3 gap-24" }, je = { class: "flex" }, qe = {
267
267
  },
268
268
  set(e) {
269
269
  const o = a.modelValue ?? {};
270
- o.abbrev = e, l("update:modelValue", o);
270
+ o.abbrev = e, s("update:modelValue", o);
271
271
  }
272
272
  }), V = x({
273
273
  get() {
@@ -276,7 +276,7 @@ const ze = { class: "grid grid-cols-3 gap-24" }, je = { class: "flex" }, qe = {
276
276
  },
277
277
  set(e) {
278
278
  const o = a.modelValue ?? {};
279
- o.precision = e, l("update:modelValue", o);
279
+ o.precision = e, s("update:modelValue", o);
280
280
  }
281
281
  }), t = x({
282
282
  get() {
@@ -285,7 +285,7 @@ const ze = { class: "grid grid-cols-3 gap-24" }, je = { class: "flex" }, qe = {
285
285
  },
286
286
  set(e) {
287
287
  const o = a.modelValue ?? {};
288
- o.measurements = e, l("update:modelValue", o);
288
+ o.measurements = e, s("update:modelValue", o);
289
289
  }
290
290
  });
291
291
  function n() {
@@ -301,11 +301,11 @@ const ze = { class: "grid grid-cols-3 gap-24" }, je = { class: "flex" }, qe = {
301
301
  precision: 0
302
302
  }
303
303
  }
304
- ], l("update:modelValue", e);
304
+ ], s("update:modelValue", e);
305
305
  }
306
306
  function v(e) {
307
307
  const o = a.modelValue ?? {}, i = o.measurements ?? [];
308
- i.splice(e, 1), o.measurements = i, l("update:modelValue", o);
308
+ i.splice(e, 1), o.measurements = i, s("update:modelValue", o);
309
309
  }
310
310
  const b = R();
311
311
  return u({
@@ -322,45 +322,52 @@ const ze = { class: "grid grid-cols-3 gap-24" }, je = { class: "flex" }, qe = {
322
322
  (o = (e = b.value) == null ? void 0 : e.resetInputs) == null || o.call(e);
323
323
  }
324
324
  }), (e, o) => {
325
- const i = A("FmTextField"), E = A("FmStepperField"), S = A("FmButton"), F = A("FmCard"), K = A("FmForm");
326
- return m(), T(K, {
325
+ const i = A("FmTextField"), E = A("FmStepperField"), $ = A("FmButton"), S = A("FmCard"), K = A("FmForm");
326
+ return c(), T(K, {
327
327
  ref_key: "formRef",
328
328
  ref: b,
329
329
  class: "flex flex-col gap-40",
330
330
  onValidationSuccess: r
331
331
  }, {
332
332
  default: I(() => {
333
- var k;
333
+ var F;
334
334
  return [
335
- s("div", ze, [
336
- c(i, {
337
- disabled: e.disabled,
338
- class: "col-span-2",
339
- label: "Name",
340
- modelValue: p.value,
341
- "onUpdate:modelValue": o[0] || (o[0] = (C) => p.value = C),
342
- rules: [d(L)()],
343
- "label-mark": "required"
344
- }, null, 8, ["disabled", "modelValue", "rules"]),
345
- c(i, {
346
- disabled: e.disabled,
347
- label: "Symbol",
348
- modelValue: f.value,
349
- "onUpdate:modelValue": o[1] || (o[1] = (C) => f.value = C),
350
- rules: [d(L)()],
351
- "label-mark": "required"
352
- }, null, 8, ["disabled", "modelValue", "rules"]),
353
- c(E, {
354
- disabled: e.disabled,
355
- class: "col-span-3",
356
- label: "Precision",
357
- modelValue: V.value,
358
- "onUpdate:modelValue": o[2] || (o[2] = (C) => V.value = C),
359
- rules: [d(_e)(0)]
360
- }, null, 8, ["disabled", "modelValue", "rules"])
335
+ l("div", ze, [
336
+ l("div", je, [
337
+ l("div", qe, [
338
+ m(i, {
339
+ disabled: e.disabled,
340
+ label: "Name",
341
+ modelValue: p.value,
342
+ "onUpdate:modelValue": o[0] || (o[0] = (C) => p.value = C),
343
+ rules: [d(L)()],
344
+ "label-mark": "required"
345
+ }, null, 8, ["disabled", "modelValue", "rules"])
346
+ ]),
347
+ l("div", He, [
348
+ m(i, {
349
+ disabled: e.disabled,
350
+ label: "Symbol",
351
+ modelValue: f.value,
352
+ "onUpdate:modelValue": o[1] || (o[1] = (C) => f.value = C),
353
+ rules: [d(L)()],
354
+ "label-mark": "required"
355
+ }, null, 8, ["disabled", "modelValue", "rules"])
356
+ ])
357
+ ]),
358
+ l("div", null, [
359
+ m(E, {
360
+ disabled: e.disabled,
361
+ class: "col-span-3",
362
+ label: "Precision",
363
+ modelValue: V.value,
364
+ "onUpdate:modelValue": o[2] || (o[2] = (C) => V.value = C),
365
+ rules: [d(ge)(0)]
366
+ }, null, 8, ["disabled", "modelValue", "rules"])
367
+ ])
361
368
  ]),
362
- s("div", je, [
363
- c(S, {
369
+ l("div", Ke, [
370
+ m($, {
364
371
  disabled: e.disabled,
365
372
  type: "button",
366
373
  "prepend-icon": "add",
@@ -369,56 +376,62 @@ const ze = { class: "grid grid-cols-3 gap-24" }, je = { class: "flex" }, qe = {
369
376
  onClick: n
370
377
  }, null, 8, ["disabled"])
371
378
  ]),
372
- (m(!0), w(z, null, j((k = e.modelValue) == null ? void 0 : k.measurements, (C, g) => (m(), T(F, {
379
+ (c(!0), U(z, null, j((F = e.modelValue) == null ? void 0 : F.measurements, (C, _) => (c(), T(S, {
373
380
  class: "flex flex-col gap-16 p-16",
374
381
  variant: "outlined",
375
382
  key: C.id
376
383
  }, {
377
384
  default: I(() => [
378
- s("div", qe, [
379
- s("div", He, "Measurement " + _(g + 1), 1),
380
- c(S, {
385
+ l("div", Ge, [
386
+ l("div", Oe, "Measurement " + g(_ + 1), 1),
387
+ m($, {
381
388
  disabled: e.disabled,
382
389
  variant: "tertiary",
383
390
  "prepend-icon": "delete",
384
- onClick: ($) => v(g)
391
+ onClick: (k) => v(_)
385
392
  }, null, 8, ["disabled", "onClick"])
386
393
  ]),
387
- s("div", Ke, [
388
- c(i, {
389
- disabled: e.disabled,
390
- class: "col-span-2",
391
- label: "Name",
392
- modelValue: e.modelValue.measurements[g].name,
393
- "onUpdate:modelValue": ($) => e.modelValue.measurements[g].name = $,
394
- rules: [d(L)()],
395
- "label-mark": "required"
396
- }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "rules"]),
397
- c(i, {
398
- disabled: e.disabled,
399
- label: "Symbol",
400
- modelValue: e.modelValue.measurements[g].abbrev,
401
- "onUpdate:modelValue": ($) => e.modelValue.measurements[g].abbrev = $,
402
- rules: [d(L)()],
403
- "label-mark": "required"
404
- }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "rules"]),
405
- c(Ue, {
394
+ l("div", Ye, [
395
+ l("div", Je, [
396
+ l("div", Qe, [
397
+ m(i, {
398
+ disabled: e.disabled,
399
+ class: "col-span-2",
400
+ label: "Name",
401
+ modelValue: e.modelValue.measurements[_].name,
402
+ "onUpdate:modelValue": (k) => e.modelValue.measurements[_].name = k,
403
+ rules: [d(L)()],
404
+ "label-mark": "required"
405
+ }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "rules"])
406
+ ]),
407
+ l("div", We, [
408
+ m(i, {
409
+ disabled: e.disabled,
410
+ label: "Symbol",
411
+ modelValue: e.modelValue.measurements[_].abbrev,
412
+ "onUpdate:modelValue": (k) => e.modelValue.measurements[_].abbrev = k,
413
+ rules: [d(L)()],
414
+ "label-mark": "required"
415
+ }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "rules"])
416
+ ])
417
+ ]),
418
+ m(we, {
406
419
  disabled: e.disabled,
407
420
  class: "col-span-3",
408
421
  label: "Conversion",
409
- "model-value": +d(O)(e.modelValue.measurements[g].conversion),
410
- "onUpdate:modelValue": ($) => t.value = t.value.map(
411
- (P, D) => D === g ? {
422
+ "model-value": +d(O)(e.modelValue.measurements[_].conversion),
423
+ "onUpdate:modelValue": (k) => t.value = t.value.map(
424
+ (P, D) => D === _ ? {
412
425
  ...P,
413
426
  conversion: d(Ve).toPrecision(
414
- d(he)($),
427
+ d(he)(k),
415
428
  V.value
416
429
  )
417
430
  } : P
418
431
  ),
419
432
  rules: [d(xe)(0)],
420
433
  step: +d(O)({ amount: 1, precision: V.value }),
421
- "helper-text": `1 ${e.modelValue.measurements[g].name || "measurement unit"} equal to ${+d(O)(e.modelValue.measurements[g].conversion)} ${p.value || "base unit"}`
434
+ "helper-text": `1 ${e.modelValue.measurements[_].name || "measurement unit"} equal to ${+d(O)(e.modelValue.measurements[_].conversion)} ${p.value || "base unit"}`
422
435
  }, null, 8, ["disabled", "model-value", "onUpdate:modelValue", "rules", "step", "helper-text"])
423
436
  ])
424
437
  ]),
@@ -430,32 +443,32 @@ const ze = { class: "grid grid-cols-3 gap-24" }, je = { class: "flex" }, qe = {
430
443
  }, 512);
431
444
  };
432
445
  }
433
- }), Oe = { class: "flex gap-4" }, Ye = /* @__PURE__ */ q({
446
+ }), Ze = { class: "flex gap-4" }, et = /* @__PURE__ */ q({
434
447
  __name: "UnitDialog",
435
448
  props: {
436
449
  show: { type: Boolean },
437
450
  unit: {},
438
- mode: { default: U.READ }
451
+ mode: { default: w.READ }
439
452
  },
440
453
  emits: ["update:show"],
441
454
  setup(h) {
442
- const u = h, y = H(), a = oe(), l = Z(u, "show"), r = Z(u, "unit"), p = x(() => {
455
+ const u = h, y = H(), a = oe(), s = Z(u, "show"), r = Z(u, "unit"), p = x(() => {
443
456
  switch (u.mode) {
444
- case U.READ:
445
- return "View Unit";
446
- case U.UPDATE:
447
- return "Edit Unit";
448
- case U.CREATE:
449
- return "Add Unit";
457
+ case w.READ:
458
+ return "View unit";
459
+ case w.UPDATE:
460
+ return "Edit unit";
461
+ case w.CREATE:
462
+ return "Add unit";
450
463
  }
451
464
  return "";
452
465
  }), f = x(() => {
453
466
  switch (u.mode) {
454
- case U.READ:
467
+ case w.READ:
455
468
  return "";
456
- case U.UPDATE:
469
+ case w.UPDATE:
457
470
  return "Save";
458
- case U.CREATE:
471
+ case w.CREATE:
459
472
  return "Add";
460
473
  }
461
474
  return "";
@@ -464,7 +477,7 @@ const ze = { class: "grid grid-cols-3 gap-24" }, je = { class: "flex" }, qe = {
464
477
  t.value = !0;
465
478
  try {
466
479
  const o = te(r.value);
467
- o.precision ?? (o.precision = 0), o.measurements ?? (o.measurements = []), await y.createUnit(o), l.value = !1, a.open({
480
+ o.precision ?? (o.precision = 0), o.measurements ?? (o.measurements = []), await y.createUnit(o), s.value = !1, a.open({
468
481
  title: "Success",
469
482
  message: "Created " + r.value.name,
470
483
  type: "success"
@@ -482,7 +495,7 @@ const ze = { class: "grid grid-cols-3 gap-24" }, je = { class: "flex" }, qe = {
482
495
  async function v() {
483
496
  t.value = !0;
484
497
  try {
485
- await y.updateUnit(r.value), l.value = !1, a.open({
498
+ await y.updateUnit(r.value), s.value = !1, a.open({
486
499
  title: "Success",
487
500
  message: "Updated " + r.value.name,
488
501
  type: "success"
@@ -503,106 +516,106 @@ const ze = { class: "grid grid-cols-3 gap-24" }, je = { class: "flex" }, qe = {
503
516
  }
504
517
  function e() {
505
518
  switch (u.mode) {
506
- case U.READ:
519
+ case w.READ:
507
520
  return;
508
- case U.UPDATE:
521
+ case w.UPDATE:
509
522
  return v();
510
- case U.CREATE:
523
+ case w.CREATE:
511
524
  return n();
512
525
  }
513
526
  }
514
527
  return (o, i) => {
515
- const E = A("FmButton"), S = A("FmSideSheet");
516
- return m(), T(S, {
517
- "model-value": d(l),
518
- "onUpdate:modelValue": i[3] || (i[3] = (F) => W(l) ? l.value = F : null),
528
+ const E = A("FmButton"), $ = A("FmSideSheet");
529
+ return c(), T($, {
530
+ "model-value": d(s),
531
+ "onUpdate:modelValue": i[3] || (i[3] = (S) => W(s) ? s.value = S : null),
519
532
  header: p.value,
520
533
  "close-button": "",
521
534
  "dismiss-away": "",
522
535
  "max-width": 500
523
536
  }, {
524
537
  "side-sheet-footer": I(() => [
525
- s("div", Oe, [
526
- c(E, {
538
+ l("div", Ze, [
539
+ m(E, {
527
540
  loading: t.value,
528
541
  label: f.value,
529
542
  onClick: b
530
543
  }, null, 8, ["loading", "label"]),
531
- c(E, {
544
+ m(E, {
532
545
  disabled: t.value,
533
546
  label: "Close",
534
547
  variant: "tertiary",
535
- onClick: i[2] || (i[2] = (F) => l.value = !1)
548
+ onClick: i[2] || (i[2] = (S) => s.value = !1)
536
549
  }, null, 8, ["disabled"])
537
550
  ])
538
551
  ]),
539
552
  default: I(() => [
540
- c(Ge, {
553
+ m(Xe, {
541
554
  class: "w-full",
542
555
  ref_key: "hasValidationExpose",
543
556
  ref: V,
544
557
  modelValue: d(r),
545
- "onUpdate:modelValue": i[0] || (i[0] = (F) => W(r) ? r.value = F : null),
558
+ "onUpdate:modelValue": i[0] || (i[0] = (S) => W(r) ? r.value = S : null),
546
559
  mode: o.mode,
547
560
  disabled: t.value,
548
- "onClick:submit": i[1] || (i[1] = (F) => e())
561
+ "onClick:submit": i[1] || (i[1] = (S) => e())
549
562
  }, null, 8, ["modelValue", "mode", "disabled"])
550
563
  ]),
551
564
  _: 1
552
565
  }, 8, ["model-value", "header"]);
553
566
  };
554
567
  }
555
- }), Je = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Qe = { class: "px-8 flex items-center xs:gap-0 xs:flex-col-reverse sm:gap-0 sm:flex-col-reverse" }, We = { class: "flex-1 w-full" }, Xe = { class: "flex flex-col py-8" }, Ze = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, et = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ct = /* @__PURE__ */ q({
568
+ }), tt = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, ot = { class: "px-8 flex items-center xs:gap-0 xs:flex-col-reverse sm:gap-0 sm:flex-col-reverse" }, lt = { class: "flex-1 w-full" }, st = { class: "flex flex-col py-8" }, at = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, nt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _t = /* @__PURE__ */ q({
556
569
  __name: "UnitView",
557
570
  setup(h) {
558
- const u = H(), y = de(), a = x(() => u.units), { createUnit: l, updateUnit: r, deleteUnit: p, unitDialogProps: f, unitViewLoading: V } = Ne(), { columnDefs: t } = Le({ updateUnit: r, deleteUnit: p });
571
+ const u = H(), y = de(), a = x(() => u.units), { createUnit: s, updateUnit: r, deleteUnit: p, unitDialogProps: f, unitViewLoading: V } = Ne(), { columnDefs: t } = Le({ updateUnit: r, deleteUnit: p });
559
572
  function n(E) {
560
- E === "add" && l();
573
+ E === "add" && s();
561
574
  }
562
- const v = R(""), b = x(() => V.value), { breakpoints: e } = me(), o = x(() => e.value.xs || e.value.sm ? 10 : 20), i = ye();
563
- return (E, S) => {
564
- const F = A("FmTableToolbar"), K = A("FmTable");
565
- return m(), T(ge, {
575
+ const v = R(""), b = x(() => V.value), { breakpoints: e } = ce(), o = x(() => e.value.xs || e.value.sm ? 10 : 20), i = ye();
576
+ return (E, $) => {
577
+ const S = A("FmTableToolbar"), K = A("FmTable");
578
+ return c(), T(_e, {
566
579
  title: "Unit",
567
580
  actions: [{ label: "Add unit", value: "add", isPrimary: !0, prependIcon: "add" }],
568
581
  "onClick:action": n
569
582
  }, {
570
583
  default: I(() => [
571
- s("div", Je, [
572
- s("div", Qe, [
573
- s("div", We, [
574
- c(F, {
584
+ l("div", tt, [
585
+ l("div", ot, [
586
+ l("div", lt, [
587
+ m(S, {
575
588
  searchable: "",
576
589
  "search-model": v.value,
577
- "onUpdate:searchModel": S[0] || (S[0] = (k) => v.value = k)
590
+ "onUpdate:searchModel": $[0] || ($[0] = (F) => v.value = F)
578
591
  }, null, 8, ["search-model"])
579
592
  ])
580
593
  ]),
581
- c(K, {
594
+ m(K, {
582
595
  style: se(d(i).tableHeight),
583
596
  "column-defs": d(t),
584
597
  "row-data": a.value,
585
598
  "search-value": v.value,
586
599
  loading: !d(y)._currentLocation || b.value,
587
- onRowClick: S[1] || (S[1] = (k) => d(r)(k.original)),
600
+ onRowClick: $[1] || ($[1] = (F) => d(r)(F.original)),
588
601
  "page-size": o.value
589
602
  }, {
590
- "list-row": I((k) => [
591
- c(ve, {
592
- row: k,
603
+ "list-row": I((F) => [
604
+ m(ve, {
605
+ row: F,
593
606
  onRowClick: d(r)
594
607
  }, {
595
608
  default: I((C) => {
596
- var g, $, P, D, Y, M, J, B, Q;
609
+ var _, k, P, D, Y, M, J, B, Q;
597
610
  return [
598
- s("div", Xe, [
599
- s("div", Ze, [
600
- c(d(be), {
601
- render: (P = ($ = (g = C.name) == null ? void 0 : g.column) == null ? void 0 : $.columnDef) == null ? void 0 : P.cell,
611
+ l("div", st, [
612
+ l("div", at, [
613
+ m(d(be), {
614
+ render: (P = (k = (_ = C.name) == null ? void 0 : _.column) == null ? void 0 : k.columnDef) == null ? void 0 : P.cell,
602
615
  props: (Y = (D = C.name) == null ? void 0 : D.getContext) == null ? void 0 : Y.call(D)
603
616
  }, null, 8, ["render", "props"])
604
617
  ]),
605
- s("div", et, _((Q = (B = (J = (M = k.original.measurements) == null ? void 0 : M.map) == null ? void 0 : J.call(M, (le) => le.name)) == null ? void 0 : B.join) == null ? void 0 : Q.call(B, ", ")), 1)
618
+ l("div", nt, g((Q = (B = (J = (M = F.original.measurements) == null ? void 0 : M.map) == null ? void 0 : J.call(M, (le) => le.name)) == null ? void 0 : B.join) == null ? void 0 : Q.call(B, ", ")), 1)
606
619
  ])
607
620
  ];
608
621
  }),
@@ -612,8 +625,8 @@ const ze = { class: "grid grid-cols-3 gap-24" }, je = { class: "flex" }, qe = {
612
625
  _: 1
613
626
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
614
627
  ]),
615
- (m(), T(ae, { to: "body" }, [
616
- c(Ye, ne(re(d(f))), null, 16)
628
+ (c(), T(ae, { to: "body" }, [
629
+ m(et, ne(re(d(f))), null, 16)
617
630
  ]))
618
631
  ]),
619
632
  _: 1
@@ -622,5 +635,5 @@ const ze = { class: "grid grid-cols-3 gap-24" }, je = { class: "flex" }, qe = {
622
635
  }
623
636
  });
624
637
  export {
625
- ct as default
638
+ _t as default
626
639
  };