@feedmepos/mf-inventory-portal 0.0.23-dev.24 → 0.0.23-dev.26

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 (49) hide show
  1. package/dist/{App-dQy0_X6Q.js → App-C0hXAs5E.js} +49 -45
  2. package/dist/{ApprovalView-CxwAuXae.js → ApprovalView-Db5Aq3gK.js} +15 -15
  3. package/dist/{BindingsDialog-BX8J03Uc.js → BindingsDialog-dKNKrWKv.js} +9 -9
  4. package/dist/{BindingsPicker-CAW_3sSv.js → BindingsPicker-dN1bNnc0.js} +5 -5
  5. package/dist/{BindingsTable-7UmxSmdW.js → BindingsTable-BA461fcU.js} +8 -8
  6. package/dist/{ClosingDraftView-DukJAMlK.js → ClosingDraftView-aRHVKTA6.js} +68 -69
  7. package/dist/{ClosingTemplateView-Dm7_gMTo.js → ClosingTemplateView-BYnC4Whw.js} +58 -61
  8. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DN3N20Nb.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BdjeCWX1.js} +13 -13
  9. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BrPRiS_u.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CP2euPwM.js} +46 -46
  10. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bln1lReW.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-C4aYGbW2.js} +7 -7
  11. package/dist/{IngredientGroupView-BKIJHeh9.js → IngredientGroupView-vdG6npct.js} +40 -40
  12. package/dist/{IngredientsView-Blnohl3I.js → IngredientsView-DWRAoLHx.js} +207 -210
  13. package/dist/{IntegrationView-Dna4bUA7.js → IntegrationView-Dp_A-Swf.js} +89 -90
  14. package/dist/{InventoryBindingForm-D6HSF8Wn.js → InventoryBindingForm-D_wSUUKv.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CnWvwNjJ.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-2Mnqz6HN.js} +27 -27
  16. package/dist/{InventoryBindingSummary-CNNCv8NX.js → InventoryBindingSummary-oyRdM7Pd.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CrMkMTAt.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CSabNdfV.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Cw3E2NKS.js → PremiumBadge.vue_vue_type_script_setup_true_lang-tu1Al7wM.js} +17 -18
  19. package/dist/{PurchaseOrderPrintPreview-PEN03dZK.js → PurchaseOrderPrintPreview-B4m8t90I.js} +1 -1
  20. package/dist/{ReceiveRequestView-rTUhjMLY.js → ReceiveRequestView-DIJb_dU2.js} +26 -27
  21. package/dist/{RecipeView-V1hx1AUG.js → RecipeView-Ch5KMGLJ.js} +47 -48
  22. package/dist/{StockView-B5nDn8nO.js → StockView-BVuzsMG7.js} +7 -7
  23. package/dist/{SupplierView-DyyRxm6k.js → SupplierView-DEC2LmtN.js} +203 -206
  24. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D6oZOwHL.js → TransferDetails.vue_vue_type_script_setup_true_lang-9UZWws3P.js} +61 -62
  25. package/dist/{TransferTemplateView-OTR9Re51.js → TransferTemplateView-DAMQ_Whn.js} +144 -145
  26. package/dist/{UnitView-DGhm1JXD.js → UnitView-CFwHRgQ-.js} +3 -3
  27. package/dist/{WarehouseView-DMAvFisd.js → WarehouseView-HE71bVOX.js} +52 -52
  28. package/dist/app-CRSuR04o.js +84133 -0
  29. package/dist/app.js +1 -1
  30. package/dist/{decimal-DuJEFEYp.js → decimal-B5DqWjel.js} +1 -1
  31. package/dist/{feature-BRqas45f.js → feature-DxNphYNO.js} +1 -1
  32. package/dist/{format-unit-display-G6VtlQe7.js → format-unit-display-D40MKAIU.js} +50 -53
  33. package/dist/{index-D3f51k-I.js → index-BWDsx2Ik.js} +1 -1
  34. package/dist/{stock-DZkj2LE0.js → stock-BAPZYfON.js} +1 -1
  35. package/dist/style.css +1 -1
  36. package/dist/{supplier-Cm5Cw3u7.js → supplier-Bp7xaTFX.js} +1 -1
  37. package/dist/tsconfig.app.tsbuildinfo +1 -1
  38. package/dist/{use-inventory-binding-dialog-DCt0wUiw.js → use-inventory-binding-dialog-cxY29PPx.js} +1 -1
  39. package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +2 -0
  40. package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +18 -0
  41. package/dist/views/adjustment-template/import/export.d.ts +60 -0
  42. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1 -1
  43. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +1 -1
  44. package/package.json +1 -1
  45. package/dist/FmDroppableField-BqZcDO2v.js +0 -154
  46. package/dist/app-DQRbwx-z.js +0 -58903
  47. package/dist/netsuite-D4b5JceM.js +0 -251
  48. package/dist/xlsx-9Gc42bxv.js +0 -24004
  49. package/dist/xlsx.util-CEvUL8mk.js +0 -78
@@ -1,7 +1,7 @@
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-DQRbwx-z.js";
1
+ import { defineComponent as oe, mergeModels as $, useModel as se, computed as v, ref as P, watch as z, inject as ie, resolveComponent as b, openBlock as f, createElementBlock as y, createElementVNode as u, createVNode as M, withCtx as 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 { Z as I, I as k, O as L, K as ce, i as h, aE as de, t as pe, J as fe, aj as ve, aC as be, aB as ye } from "./app-CRSuR04o.js";
3
3
  import "@feedmepos/ui-library";
4
- function G() {
4
+ function E() {
5
5
  return {
6
6
  amount: I.reset()
7
7
  };
@@ -21,13 +21,13 @@ function Ve(l) {
21
21
  return k()(t.amountAsString) !== !0 ? !0 : +t.amountAsString > l ? `Must be at most ${l}` : !0;
22
22
  };
23
23
  }
24
- function E(l, d = !1) {
24
+ function G(l, d = !1) {
25
25
  return function(r) {
26
26
  const s = H()(r);
27
27
  if (s != !0)
28
28
  return d ? s : !0;
29
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({
30
+ return ce(+r.amountAsString).precision > F ? `Cannot exceed precision more than ${h({
31
31
  amount: 1,
32
32
  precision: F
33
33
  })}` : !0;
@@ -39,7 +39,7 @@ function Le(l) {
39
39
  return d(r.modelValue.amount);
40
40
  };
41
41
  }
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 = {
42
+ const Me = { class: "flex flex-col" }, he = { 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 = {
43
43
  key: 0,
44
44
  class: "text-fm-color-typo-secondary"
45
45
  }, Pe = {
@@ -51,12 +51,12 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
51
51
  }, Re = {
52
52
  class: "flex items-center",
53
53
  style: { "pointer-events": "none" }
54
- }, Ue = {
54
+ }, Ce = {
55
55
  class: "flex items-center",
56
56
  style: { "pointer-events": "none" }
57
- }, $e = /* @__PURE__ */ oe({
57
+ }, je = /* @__PURE__ */ oe({
58
58
  __name: "FmUnitInput",
59
- props: /* @__PURE__ */ z({
59
+ props: /* @__PURE__ */ $({
60
60
  modelValue: {},
61
61
  unit: {},
62
62
  rules: {},
@@ -103,7 +103,7 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
103
103
  modelValue: {},
104
104
  modelModifiers: {}
105
105
  }),
106
- emits: /* @__PURE__ */ z(["update:amount", "update:measurement"], ["update:modelValue"]),
106
+ emits: /* @__PURE__ */ $(["update:amount", "update:measurement"], ["update:modelValue"]),
107
107
  setup(l, { emit: d }) {
108
108
  const t = l, r = d, s = se(l, "modelValue"), F = k(), B = v(() => {
109
109
  var n;
@@ -111,19 +111,19 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
111
111
  }), c = P((() => {
112
112
  var o;
113
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);
114
+ return h(a);
115
115
  })());
116
- O(c, (e) => {
116
+ z(c, (e) => {
117
117
  const n = F(e), i = t.precision ?? B.value, o = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > i ? t.formatMinimumPrecision : i;
118
118
  n == !0 && (s.value = {
119
119
  ...s.value,
120
120
  amount: pe(+e, o)
121
121
  }), r("update:amount", e);
122
122
  });
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(() => {
123
+ const J = Symbol.for("fm:form-state"), D = ie(J, null), A = v(() => t.disabled ?? (D == null ? void 0 : D.getDisabled()) ?? !1), K = P(), R = P(!1), j = P(!1), Q = v(() => R.value || j.value), X = v(() => {
124
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)}`
125
+ const i = [...t.unit.measurements.filter((o) => !o.name.toLocaleLowerCase().includes("inactive")).filter((o) => o.abbrev !== t.unit.abbrev || +h(o.conversion) != 1).groupBy(
126
+ (o) => `${o.abbrev}${h(o.conversion)}`
127
127
  ).values()].map((o) => o[0]).flat();
128
128
  return [
129
129
  {
@@ -135,7 +135,7 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
135
135
  value: o.id
136
136
  }))
137
137
  ];
138
- }), U = v({
138
+ }), C = v({
139
139
  get() {
140
140
  var e, n;
141
141
  return ((n = (e = s.value) == null ? void 0 : e.measurement) == null ? void 0 : n.id) ?? null;
@@ -143,19 +143,19 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
143
143
  set(e) {
144
144
  if (e == null)
145
145
  s.value = {
146
- ...s.value ?? G(),
146
+ ...s.value ?? E(),
147
147
  measurement: null
148
148
  }, r("update:measurement", null);
149
149
  else {
150
150
  const n = t.unit.measurements.find((i) => i.id === e) ?? null;
151
151
  s.value = {
152
- ...s.value ?? G(),
152
+ ...s.value ?? E(),
153
153
  measurement: n
154
154
  }, r("update:measurement", n);
155
155
  }
156
156
  }
157
157
  });
158
- O(U, (e, n) => {
158
+ z(C, (e, n) => {
159
159
  var m;
160
160
  if (!t.convertAmountOnChangeUnit)
161
161
  return;
@@ -163,9 +163,9 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
163
163
  value: w,
164
164
  precision: N
165
165
  });
166
- c.value = M(S);
166
+ c.value = h(S);
167
167
  });
168
- const C = v(() => {
168
+ const U = v(() => {
169
169
  var e, n;
170
170
  return ((n = (e = s.value) == null ? void 0 : e.measurement) == null ? void 0 : n.abbrev) ?? t.unit.abbrev;
171
171
  }), Y = v(
@@ -177,37 +177,37 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
177
177
  }
178
178
  ), ee = v(() => [...t.applyDefaultRules ? [
179
179
  H(),
180
- typeof t.precision == "number" ? E(t.precision) : E(t.unit)
180
+ typeof t.precision == "number" ? G(t.precision) : G(t.unit)
181
181
  ] : [], ...Y.value]);
182
- function j(e) {
182
+ function O(e) {
183
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;
184
184
  return p.endsWith(".") ? p.slice(0, p.length - 1) : p;
185
185
  }
186
186
  function te() {
187
187
  if (!t.stepper)
188
188
  return;
189
- const e = +c.value + +M(t.stepper);
190
- c.value = j(e);
189
+ const e = +c.value + +h(t.stepper);
190
+ c.value = O(e);
191
191
  }
192
192
  function ne() {
193
193
  if (!t.stepper)
194
194
  return;
195
- const e = +c.value - +M(t.stepper);
196
- c.value = j(e);
195
+ const e = +c.value - +h(t.stepper);
196
+ c.value = O(e);
197
197
  }
198
198
  return (e, n) => {
199
199
  const i = b("FmLabel"), a = b("FmIcon"), o = b("FmMenuItem"), p = b("FmMenu"), w = b("FmTooltip"), N = b("FmField"), S = b("FmFormGroup");
200
- return f(), y("div", he, [
201
- u("div", Me, [
200
+ return f(), y("div", Me, [
201
+ u("div", he, [
202
202
  u("div", ge, [
203
- h(i, {
203
+ M(i, {
204
204
  label: e.label,
205
205
  disabled: e.disabled,
206
206
  required: e.labelMark === "required",
207
207
  optional: e.labelMark === "optional"
208
208
  }, null, 8, ["label", "disabled", "required", "optional"])
209
209
  ]),
210
- h(N, { focused: K.value }, {
210
+ M(N, { focused: Q.value }, {
211
211
  default: g(() => [
212
212
  u("div", xe, [
213
213
  T(e.$slots, "prepend"),
@@ -224,7 +224,7 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
224
224
  key: 1,
225
225
  type: "text",
226
226
  ref_key: "inputRef",
227
- ref: J,
227
+ ref: K,
228
228
  onFocus: n[0] || (n[0] = () => R.value = !0),
229
229
  onBlur: n[1] || (n[1] = () => R.value = !1),
230
230
  "onUpdate:modelValue": n[2] || (n[2] = (m) => c.value = m),
@@ -241,22 +241,22 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
241
241
  u("div", {
242
242
  class: V([e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"])
243
243
  }, [
244
- h(w, { "z-index": 51 }, {
244
+ M(w, { "z-index": 51 }, {
245
245
  content: g(() => [
246
- ue(x(C.value), 1)
246
+ ue(x(U.value), 1)
247
247
  ]),
248
248
  default: g(() => [
249
- e.disableUnit ? (f(), y("div", Pe, x(C.value), 1)) : (f(), W(p, {
249
+ e.disableUnit ? (f(), y("div", Pe, x(U.value), 1)) : (f(), W(p, {
250
250
  key: 1,
251
- onMenuChanged: n[3] || (n[3] = (m) => $.value = m),
251
+ onMenuChanged: n[3] || (n[3] = (m) => j.value = m),
252
252
  "z-index": 500,
253
253
  placement: e.placement,
254
254
  disabled: e.disabled
255
255
  }, {
256
256
  "menu-button": g(() => [
257
257
  u("div", Ie, [
258
- u("div", ke, x(C.value), 1),
259
- h(a, { name: "keyboard_arrow_down" })
258
+ u("div", ke, x(U.value), 1),
259
+ M(a, { name: "keyboard_arrow_down" })
260
260
  ])
261
261
  ]),
262
262
  default: g(() => [
@@ -264,8 +264,8 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
264
264
  (f(!0), y(re, null, me(X.value, (m) => (f(), W(o, {
265
265
  key: m.value ?? void 0,
266
266
  label: m.label,
267
- "model-value": m.value == U.value,
268
- onClick: (_) => U.value = m.value
267
+ "model-value": m.value == C.value,
268
+ onClick: (_) => C.value = m.value
269
269
  }, null, 8, ["label", "model-value", "onClick"]))), 128))
270
270
  ])
271
271
  ]),
@@ -281,7 +281,7 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
281
281
  onClick: te
282
282
  }, [
283
283
  u("div", Re, [
284
- h(a, {
284
+ M(a, {
285
285
  name: "expand_less",
286
286
  size: "md"
287
287
  })
@@ -291,8 +291,8 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
291
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",
292
292
  onClick: ne
293
293
  }, [
294
- u("div", Ue, [
295
- h(a, {
294
+ u("div", Ce, [
295
+ M(a, {
296
296
  name: "expand_more",
297
297
  size: "md"
298
298
  })
@@ -306,7 +306,7 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
306
306
  _: 3
307
307
  }, 8, ["focused"])
308
308
  ]),
309
- h(S, {
309
+ M(S, {
310
310
  class: "flex-1",
311
311
  "model-value": { modelValue: s.value, amountAsString: String(c.value) },
312
312
  info: e.labelInfo,
@@ -320,9 +320,9 @@ const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { c
320
320
  });
321
321
  export {
322
322
  Se as F,
323
- $e as _,
323
+ je as _,
324
324
  Ve as a,
325
325
  Le as b,
326
326
  H as c,
327
- E as d
327
+ G as d
328
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 y } from "vue";
2
- import { h as a, y as x } from "./app-DQRbwx-z.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 x } from "vue";
2
+ import { i as a, J as y } from "./app-CRSuR04o.js";
3
3
  import { useI18n as _ } from "@feedmepos/mf-common";
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 = {
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",
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" }, h = { 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 = x(e.amount, e.measurement.conversion);
26
+ const u = y(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" }, h = { 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", h, [
36
- r("div", g, o(e.name), 1),
35
+ r("div", g, [
36
+ r("div", h, o(e.name), 1),
37
37
  r("div", b, o(l(m)("inventory.ingredient.bindedItems.amount")), 1)
38
38
  ]),
39
- (s(!0), n(d, null, y(e.bindings, (t) => (s(), n("div", {
39
+ (s(!0), n(d, null, x(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,5 +1,5 @@
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-DQRbwx-z.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 j, 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, d as h, e as B, f as ye, D as oe, h as Q, G as be, l as _e, A as xe, H as ne, n as se, u as ke, x as he, y as we, z as Se, B as Ie, E as ae } from "./app-CRSuR04o.js";
3
3
  import { useDialog as le, useSnackbar as Z, useProxiedModel as Fe, useBreakpoints as Ce } from "@feedmepos/ui-library";
4
4
  import { useI18n as W } from "@feedmepos/mf-common";
5
5
  import { defineStore as ie, storeToRefs as re } from "pinia";
@@ -64,7 +64,7 @@ const X = ie(
64
64
  }
65
65
  }).onPrimary(() => f(d, a, s));
66
66
  }
67
- function A() {
67
+ function G() {
68
68
  }
69
69
  function b() {
70
70
  }
@@ -72,12 +72,12 @@ const X = ie(
72
72
  createIngredientGroup: p,
73
73
  updateIngredientGroup: v,
74
74
  deleteIngredientGroup: y,
75
- importIngredientGroups: A,
75
+ importIngredientGroups: G,
76
76
  exportIngredientGroups: b,
77
77
  ingredientGroupDialogProps: i
78
78
  };
79
79
  }
80
- ), Ae = ie(
80
+ ), Ge = ie(
81
81
  "ingredientGroupTable",
82
82
  function() {
83
83
  const c = C(!1), w = Z(), o = J(), r = X();
@@ -145,7 +145,7 @@ const X = ie(
145
145
  columnDefs: v
146
146
  };
147
147
  }
148
- ), De = { class: "flex flex-col gap-16" }, Ge = { class: "flex flex-col gap-8 cursor-pointer" }, Ve = {
148
+ ), Ae = { class: "flex flex-col gap-16" }, De = { class: "flex flex-col gap-8 cursor-pointer" }, Ve = {
149
149
  key: 0,
150
150
  class: "text-fm-color-typo-primary fm-typo-en-body-lg-400 line-clamp-1 break-all"
151
151
  }, Ee = { class: "text-fm-color-typo-secondary" }, Re = {
@@ -176,7 +176,7 @@ const X = ie(
176
176
  }
177
177
  });
178
178
  const y = F(() => i.skus.groupBy((a) => a.unit._id));
179
- function A() {
179
+ function G() {
180
180
  var s;
181
181
  const a = i.skus.filter((n) => {
182
182
  var t;
@@ -249,8 +249,8 @@ const X = ie(
249
249
  }).onPrimary((n) => {
250
250
  var u, _;
251
251
  const t = ((u = o.skus) == null ? void 0 : u.slice(1)) ?? [], e = n.map((m) => {
252
- const D = t.find((G) => (G == null ? void 0 : G._id) === m._id);
253
- return D || B(m, ["unit"]);
252
+ const A = t.find((D) => (D == null ? void 0 : D._id) === m._id);
253
+ return A || B(m, ["unit"]);
254
254
  });
255
255
  o.skus = [(_ = o.skus) == null ? void 0 : _[0], ...e];
256
256
  });
@@ -268,17 +268,17 @@ const X = ie(
268
268
  }
269
269
  ];
270
270
  return (a, s) => {
271
- const n = S("FmTextField"), t = S("FmLabel"), e = S("FmField"), u = S("FmFormGroup"), _ = S("FmButton"), m = S("FmTable"), D = S("FmForm");
272
- return M(), O(D, {
271
+ const n = S("FmTextField"), t = S("FmLabel"), e = S("FmField"), u = S("FmFormGroup"), _ = S("FmButton"), m = S("FmTable"), A = S("FmForm");
272
+ return M(), O(A, {
273
273
  onValidationSuccess: s[5] || (s[5] = (I) => r("validation-success")),
274
274
  ref_key: "formRef",
275
275
  ref: f,
276
276
  class: "flex flex-col gap-32"
277
277
  }, {
278
278
  default: R(() => {
279
- var I, G, V, T, L;
279
+ var I, D, V, T, z;
280
280
  return [
281
- x("div", De, [
281
+ x("div", Ae, [
282
282
  g(n, {
283
283
  label: "Name",
284
284
  "label-mark": "required",
@@ -292,27 +292,27 @@ const X = ie(
292
292
  modelValue: l(o).ref,
293
293
  "onUpdate:modelValue": s[1] || (s[1] = (k) => l(o).ref = k)
294
294
  }, null, 8, ["modelValue"]),
295
- x("div", Ge, [
295
+ x("div", De, [
296
296
  g(t, {
297
297
  label: "Main ingredient",
298
298
  required: ""
299
299
  }),
300
300
  g(e, {
301
- onClick: s[2] || (s[2] = (k) => A())
301
+ onClick: s[2] || (s[2] = (k) => G())
302
302
  }, {
303
303
  default: R(() => {
304
- var k, E, $, z, N, K, q, P, j;
304
+ var k, E, $, L, N, K, q, P, H;
305
305
  return [
306
306
  ($ = (E = (k = l(o)) == null ? void 0 : k.skus) == null ? void 0 : E[0]) != null && $.name ? (M(), ee("span", Ve, [
307
- x("span", Ee, "[" + H((K = (N = (z = l(o)) == null ? void 0 : z.skus) == null ? void 0 : N[0]) == null ? void 0 : K.code) + "]", 1),
308
- te(" " + H((j = (P = (q = l(o)) == null ? void 0 : q.skus) == null ? void 0 : P[0]) == null ? void 0 : j.name), 1)
309
- ])) : (M(), ee("span", Re, H("Click to select main item")))
307
+ x("span", Ee, "[" + j((K = (N = (L = l(o)) == null ? void 0 : L.skus) == null ? void 0 : N[0]) == null ? void 0 : K.code) + "]", 1),
308
+ te(" " + j((H = (P = (q = l(o)) == null ? void 0 : q.skus) == null ? void 0 : P[0]) == null ? void 0 : H.name), 1)
309
+ ])) : (M(), ee("span", Re, j("Click to select main item")))
310
310
  ];
311
311
  }),
312
312
  _: 1
313
313
  }),
314
314
  x("div", Te, [
315
- s[6] || (s[6] = te(H("Select a main item to filter out substitutable items with same unit.") + " ")),
315
+ s[6] || (s[6] = te(j("Select a main item to filter out substitutable items with same unit.") + " ")),
316
316
  g(u, {
317
317
  "model-value": ((I = l(o)) == null ? void 0 : I.skus) ?? [],
318
318
  rules: [l(xe)(1, "Required")]
@@ -326,7 +326,7 @@ const X = ie(
326
326
  x("div", null, [
327
327
  g(_, {
328
328
  label: "Add items",
329
- disabled: (((V = (G = l(o)) == null ? void 0 : G.skus) == null ? void 0 : V.length) ?? 0) < 1,
329
+ disabled: (((V = (D = l(o)) == null ? void 0 : D.skus) == null ? void 0 : V.length) ?? 0) < 1,
330
330
  onClick: s[3] || (s[3] = (k) => b()),
331
331
  "prepend-icon": "add",
332
332
  variant: "secondary",
@@ -346,7 +346,7 @@ const X = ie(
346
346
  }),
347
347
  draggable: "",
348
348
  "hide-footer": "",
349
- "page-size": ((L = l(o).skus) == null ? void 0 : L.length) ?? 0
349
+ "page-size": ((z = l(o).skus) == null ? void 0 : z.length) ?? 0
350
350
  }, null, 8, ["row-data", "page-size"])
351
351
  ])
352
352
  ];
@@ -396,7 +396,7 @@ const X = ie(
396
396
  return r("common.add");
397
397
  }
398
398
  return "";
399
- }), A = C(), b = C(!1);
399
+ }), G = C(), b = C(!1);
400
400
  async function d() {
401
401
  b.value = !0;
402
402
  const t = B(p.value);
@@ -437,7 +437,7 @@ const X = ie(
437
437
  }
438
438
  function s() {
439
439
  var t, e;
440
- (e = (t = A.value) == null ? void 0 : t.validateInputs) == null || e.call(t);
440
+ (e = (t = G.value) == null ? void 0 : t.validateInputs) == null || e.call(t);
441
441
  }
442
442
  function n() {
443
443
  switch (c.mode) {
@@ -478,7 +478,7 @@ const X = ie(
478
478
  (M(), O(Me, {
479
479
  class: "w-full",
480
480
  ref_key: "hasValidationExpose",
481
- ref: A,
481
+ ref: G,
482
482
  key: v.value,
483
483
  "model-value": p.value,
484
484
  "onUpdate:modelValue": e[0] || (e[0] = (m) => p.value = m),
@@ -491,7 +491,7 @@ const X = ie(
491
491
  }, 8, ["model-value", "header"]);
492
492
  };
493
493
  }
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({
494
+ }), ze = { class: "flex flex-col py-8" }, Le = { 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({
495
495
  __name: "IngredientGroupView",
496
496
  setup(U) {
497
497
  const c = J(), w = F(() => c.skuGroups), o = ke(), { t: r } = W(), {
@@ -499,9 +499,9 @@ const X = ie(
499
499
  updateIngredientGroup: p,
500
500
  importIngredientGroups: v,
501
501
  exportIngredientGroups: f
502
- } = X(), { columnDefs: y, loading: A } = re(Ae()), { ingredientGroupDialogProps: b } = re(X());
503
- function d(D) {
504
- switch (D) {
502
+ } = X(), { columnDefs: y, loading: G } = re(Ge()), { ingredientGroupDialogProps: b } = re(X());
503
+ function d(A) {
504
+ switch (A) {
505
505
  case "add":
506
506
  return i();
507
507
  case "import":
@@ -510,7 +510,7 @@ const X = ie(
510
510
  return f();
511
511
  }
512
512
  }
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(() => [
513
+ const a = C(""), s = C(!1), n = F(() => s.value || G.value), { breakpoints: t } = Ce(), e = F(() => t.value.xs || t.value.sm), u = F(() => e.value ? 10 : 20), _ = he(), m = F(() => [
514
514
  {
515
515
  label: r("inventory.ingredient.create.title"),
516
516
  value: "add",
@@ -520,8 +520,8 @@ const X = ie(
520
520
  { label: r("common.import"), value: "import" },
521
521
  { label: r("common.export"), value: "export" }
522
522
  ]);
523
- return (D, I) => {
524
- const G = S("FmTable");
523
+ return (A, I) => {
524
+ const D = S("FmTable");
525
525
  return M(), O(we, {
526
526
  title: l(r)("inventory.ingredientGroup.title"),
527
527
  actions: m.value,
@@ -542,7 +542,7 @@ const X = ie(
542
542
  search: a.value,
543
543
  "onUpdate:search": I[0] || (I[0] = (V) => a.value = V)
544
544
  }, null, 8, ["search"]),
545
- g(G, {
545
+ g(D, {
546
546
  style: me(l(_).tableHeight),
547
547
  "column-defs": l(y),
548
548
  "row-data": w.value,
@@ -558,19 +558,19 @@ const X = ie(
558
558
  onRowClick: l(p)
559
559
  }, pe({
560
560
  default: R((T) => {
561
- var L, k, E, $, z, N, K, q, P, j;
561
+ var z, k, E, $, L, N, K, q, P, H;
562
562
  return [
563
- x("div", Le, [
564
- x("div", ze, [
563
+ x("div", ze, [
564
+ x("div", Le, [
565
565
  g(l(ae), {
566
- render: (E = (k = (L = T.code) == null ? void 0 : L.column) == null ? void 0 : k.columnDef) == null ? void 0 : E.cell,
567
- props: (z = ($ = T.code) == null ? void 0 : $.getContext) == null ? void 0 : z.call($)
566
+ render: (E = (k = (z = T.code) == null ? void 0 : z.column) == null ? void 0 : k.columnDef) == null ? void 0 : E.cell,
567
+ props: (L = ($ = T.code) == null ? void 0 : $.getContext) == null ? void 0 : L.call($)
568
568
  }, null, 8, ["render", "props"])
569
569
  ]),
570
570
  x("div", Ne, [
571
571
  g(l(ae), {
572
572
  render: (q = (K = (N = T.name) == null ? void 0 : N.column) == null ? void 0 : K.columnDef) == null ? void 0 : q.cell,
573
- props: (j = (P = T.name) == null ? void 0 : P.getContext) == null ? void 0 : j.call(P)
573
+ props: (H = (P = T.name) == null ? void 0 : P.getContext) == null ? void 0 : H.call(P)
574
574
  }, null, 8, ["render", "props"])
575
575
  ])
576
576
  ])
@@ -581,7 +581,7 @@ const X = ie(
581
581
  s.value ? {
582
582
  name: "loading-text",
583
583
  fn: R(() => [
584
- x("div", null, H(l(r)("inventory.ingredient.table.importing")), 1)
584
+ x("div", null, j(l(r)("inventory.ingredient.table.importing")), 1)
585
585
  ]),
586
586
  key: "0"
587
587
  } : void 0