@feedmepos/mf-inventory-portal 0.0.24-dev.3 → 0.0.24-dev.49

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 (90) hide show
  1. package/dist/{App-C8gm6x7Q.js → App-BANIE_vi.js} +1 -1
  2. package/dist/ApprovalView-JQXB-wD3.js +140 -0
  3. package/dist/{BindingsDialog-II1cNZ8y.js → BindingsDialog-DPkylv4n.js} +8 -8
  4. package/dist/{BindingsPicker-7hWtLm42.js → BindingsPicker-DRq1pyB3.js} +1 -1
  5. package/dist/BindingsTable-CgcUJaar.js +120 -0
  6. package/dist/ClosingDraftView-MxkQABme.js +1348 -0
  7. package/dist/{ClosingTemplateView-cmdRLrA3.js → ClosingTemplateView-DK-REWKF.js} +478 -493
  8. package/dist/{FmCustomAttribute.vue_vue_type_script_setup_true_lang-Dk618cmq.js → FmCustomAttribute.vue_vue_type_script_setup_true_lang-CJYQN_nb.js} +1 -1
  9. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CH1wbfBF.js +211 -0
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BcQSDPWo.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BCQAMGnj.js} +1 -1
  11. package/dist/{IngredientGroupView-YGl-cE0p.js → IngredientGroupView-BbdFsju3.js} +1 -1
  12. package/dist/IngredientsView-CymDx24X.js +1742 -0
  13. package/dist/{IntegrationView-Bq-m4-Wh.js → IntegrationView-CpqWQjyz.js} +679 -642
  14. package/dist/{InventoryBindingForm-DFWSf75X.js → InventoryBindingForm-D3LbsYBi.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-RQ6XxdxU.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-k8k3iqCg.js} +96 -96
  16. package/dist/{InventoryBindingSummary-DU6GO2TJ.js → InventoryBindingSummary-DQ64AcL6.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-ChpZ0NwL.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Co-zYf0x.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Ba2Uq1H-.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Bzy_5Iha.js} +1 -1
  19. package/dist/PublishView-DQrsouy_.js +222 -0
  20. package/dist/{PurchaseOrderPrintPreview-cp_DzuxM.js → PurchaseOrderPrintPreview-BQA3Sbns.js} +5 -5
  21. package/dist/ReceiveRequestView-E4FtIHQm.js +2584 -0
  22. package/dist/{RecipeView-voWc35VV.js → RecipeView-B5fp0clS.js} +3 -3
  23. package/dist/{StockView-CoigRqM-.js → StockView-WN-Uf6Nc.js} +7 -7
  24. package/dist/{SupplierView-BDpCPZE7.js → SupplierView-CaOqPzEY.js} +295 -300
  25. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-db47qL0f.js +1539 -0
  26. package/dist/TransferTemplateView-Dg7e2TeB.js +1422 -0
  27. package/dist/{UnitView-BBPJ0vhB.js → UnitView-Brnwh4tw.js} +3 -3
  28. package/dist/{WarehouseView-Ck6hBrGf.js → WarehouseView-DlUXVVHp.js} +1 -1
  29. package/dist/api/closing-draft.d.ts +1 -0
  30. package/dist/api/inventory.d.ts +2 -0
  31. package/dist/api/netsuite.d.ts +21 -4
  32. package/dist/api/purchase-order.d.ts +6 -1
  33. package/dist/api/stock.d.ts +1 -0
  34. package/dist/{app-ojZQI-KQ.js → app-CrAS505q.js} +25174 -24344
  35. package/dist/app.d.ts +0 -6
  36. package/dist/app.js +1 -1
  37. package/dist/components/FmCustomAttribute2.vue.d.ts +18 -0
  38. package/dist/components/FmLockableField.vue.d.ts +3 -0
  39. package/dist/components/FmMultiselectDialog.d.ts +23 -0
  40. package/dist/components/FmMultiselectDialog.vue.d.ts +20 -3
  41. package/dist/components/FmMultiselectDialogProps.d.ts +2 -0
  42. package/dist/{decimal-xq82Pirk.js → decimal-B3VbEmUT.js} +1 -1
  43. package/dist/{format-unit-display-ByfsyWBU.js → format-unit-display-Becux8VN.js} +256 -253
  44. package/dist/helper/fuzzy.d.ts +10 -0
  45. package/dist/{index-Bi6FnWGy.js → index-B8LjoNQa.js} +3 -3
  46. package/dist/{index-CKEbjSig.js → index-BojrVfgC.js} +1 -1
  47. package/dist/layout/SingleColumnLayout.vue.d.ts +1 -1
  48. package/dist/{stock-CC4RqQaB.js → stock-D3jX6RXK.js} +29 -25
  49. package/dist/stores/feature.d.ts +4 -2
  50. package/dist/stores/integration/netsuite.d.ts +26 -4
  51. package/dist/stores/inventory.d.ts +127 -0
  52. package/dist/stores/location.d.ts +91 -0
  53. package/dist/style.css +1 -1
  54. package/dist/{supplier-DLXOOcIm.js → supplier-BPzrg-JT.js} +1 -1
  55. package/dist/tsconfig.app.tsbuildinfo +1 -1
  56. package/dist/use-ingredient-select-dialog-CeL6kOMh.js +52 -0
  57. package/dist/{use-inventory-binding-dialog-B1zBTsW9.js → use-inventory-binding-dialog-SBHeD85N.js} +1 -1
  58. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +4 -1
  59. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +1 -1
  60. package/dist/views/ingredients/composables/use-ingredient-select-dialog.d.ts +16 -0
  61. package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +2 -0
  62. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +2 -0
  63. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +386 -0
  64. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -0
  65. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +382 -2
  66. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +3 -0
  67. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +783 -5
  68. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +595 -6
  69. package/dist/views/receive-request/import/XilnexImportDialog.vue.d.ts +22 -0
  70. package/dist/views/receive-request/import/XilnexImportForm.vue.d.ts +17 -0
  71. package/dist/views/receive-request/import/XilnexResult.vue.d.ts +17 -0
  72. package/dist/views/receive-request/import/export.d.ts +14 -0
  73. package/dist/views/receive-request/import/props.d.ts +7 -0
  74. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -0
  75. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +220 -0
  76. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +5 -1
  77. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +24 -0
  78. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +24 -0
  79. package/dist/views/transfer-template/composables/useTransferTemplateHelper.d.ts +305 -0
  80. package/dist/{vue-i18n-AeCKtYb7.js → vue-i18n-DSQQNX5F.js} +270 -270
  81. package/package.json +4 -4
  82. package/dist/ApprovalView-xtUG5yeg.js +0 -138
  83. package/dist/BindingsTable-Bub-L-pM.js +0 -145
  84. package/dist/ClosingDraftView-C9VKku7E.js +0 -1225
  85. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BSB7T16f.js +0 -286
  86. package/dist/IngredientsView-XxrOFv-u.js +0 -1706
  87. package/dist/PublishView-CBIvo-Qj.js +0 -192
  88. package/dist/ReceiveRequestView-UIaPylF0.js +0 -1876
  89. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CyovzdZg.js +0 -1327
  90. package/dist/TransferTemplateView-C2XMghN_.js +0 -1284
@@ -1,5 +1,5 @@
1
1
  import { ref as x, onUnmounted as F, defineComponent as h, watch as P, onMounted as U, computed as g, resolveComponent as b, openBlock as S, createElementBlock as I, unref as v, createVNode as _, createElementVNode as p, toDisplayString as w, createBlock as G, createCommentVNode as M } from "vue";
2
- import { u as k, a as D, b as H, R as e, c as B, g as s, d as W } from "./app-ojZQI-KQ.js";
2
+ import { u as k, a as D, b as H, R as e, c as B, g as s, d as W } from "./app-CrAS505q.js";
3
3
  import { useCoreStore as A, useI18n as O } from "@feedmepos/mf-common";
4
4
  import { useRouter as C, useRoute as K } from "vue-router";
5
5
  import { u as $ } from "./useTabStorage-BkIVScW_.js";
@@ -0,0 +1,140 @@
1
+ import { defineComponent as oe, ref as g, watch as re, computed as b, resolveComponent as ne, openBlock as x, createBlock as K, unref as e, withCtx as y, createElementVNode as s, normalizeClass as se, createVNode as n, normalizeStyle as le, toDisplayString as ce, createElementBlock as ie, createCommentVNode as ue, Teleport as pe, mergeProps as me } from "vue";
2
+ import { u as de, av as _, aG as fe, a8 as Q, z as _e, _ as ve, B as he, E as De, G as v } from "./app-CrAS505q.js";
3
+ import { a as ge, P as O, b as be, _ as xe } from "./TransferDetails.vue_vue_type_script_setup_true_lang-db47qL0f.js";
4
+ import { useBreakpoints as ye } from "@feedmepos/ui-library";
5
+ import { useI18n as Oe } from "@feedmepos/mf-common";
6
+ const Re = { class: "flex flex-col py-8" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, ke = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Se = {
7
+ key: 0,
8
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
9
+ }, Ce = { class: "pt-8" }, $e = /* @__PURE__ */ oe({
10
+ __name: "ApprovalView",
11
+ setup(Te) {
12
+ const o = ge(O.APPROVAL), { columnDefs: W } = be(O.APPROVAL, o), X = de();
13
+ _.object({
14
+ name: _.string().optional().nullable(),
15
+ start: _.date().optional().nullable(),
16
+ end: _.date().optional().nullable()
17
+ });
18
+ const R = g({
19
+ name: "",
20
+ ...fe()
21
+ }), a = g({
22
+ startDate: Q(R.value.start ?? /* @__PURE__ */ new Date()),
23
+ endDate: Q(R.value.end ?? /* @__PURE__ */ new Date())
24
+ });
25
+ re([() => a.value.startDate], () => {
26
+ if (!a.value.startDate)
27
+ return;
28
+ if (!a.value.endDate) {
29
+ a.value.endDate = a.value.startDate;
30
+ return;
31
+ }
32
+ const c = new Date(a.value.startDate);
33
+ if (new Date(a.value.endDate).getTime() < c.getTime()) {
34
+ a.value.endDate = a.value.startDate;
35
+ return;
36
+ }
37
+ });
38
+ const h = g(""), { breakpoints: w } = ye(), D = b(() => w.value.xs || w.value.sm), Z = b(() => D.value ? 10 : 20), B = _e(), { t: P } = Oe(), I = b(() => [
39
+ {
40
+ label: P("common.refresh"),
41
+ value: "refresh"
42
+ }
43
+ ]);
44
+ function ee(c) {
45
+ switch (c) {
46
+ case "refresh":
47
+ return o.fetchData();
48
+ }
49
+ }
50
+ return (c, l) => {
51
+ const te = ne("FmTable");
52
+ return x(), K(ve, {
53
+ title: e(P)("inventory.transfer.approval.title"),
54
+ actions: I.value,
55
+ "onClick:action": ee
56
+ }, {
57
+ default: y(() => [
58
+ s("div", {
59
+ class: se([
60
+ "flex flex-col gap-8 max-h-full",
61
+ {
62
+ "p-0": D.value,
63
+ "px-24 ": !D.value
64
+ }
65
+ ])
66
+ }, [
67
+ n(he, {
68
+ searchable: "",
69
+ "change-location": "",
70
+ search: h.value,
71
+ "onUpdate:search": l[0] || (l[0] = (r) => h.value = r)
72
+ }, null, 8, ["search"]),
73
+ n(te, {
74
+ style: le(e(B).tableHeight),
75
+ "column-defs": e(W),
76
+ "row-data": e(o).purchaseRequests.value,
77
+ "search-value": h.value,
78
+ loading: !e(X)._currentLocation || e(o).loading.value,
79
+ onRowClick: l[1] || (l[1] = (r) => e(o).promptShowTransferDetails(r.original.purchaseOrder, r.original)),
80
+ "page-size": Z.value
81
+ }, {
82
+ "list-row": y((r) => [
83
+ n(De, {
84
+ row: r,
85
+ onRowClick: (t) => e(o).promptShowTransferDetails(t.purchaseOrder, t)
86
+ }, {
87
+ default: y((t) => {
88
+ var k, S, C, i, T, A, V, z, u, L, M, p, $, m, E, F, Y, q, N, d, j, G, H, U, f, J;
89
+ return [
90
+ s("div", Re, [
91
+ s("div", we, [
92
+ n(e(v), {
93
+ render: (C = (S = (k = t.purchaseOrder__id) == null ? void 0 : k.column) == null ? void 0 : S.columnDef) == null ? void 0 : C.cell,
94
+ props: (T = (i = t.purchaseOrder__id) == null ? void 0 : i.getContext) == null ? void 0 : T.call(i)
95
+ }, null, 8, ["render", "props"])
96
+ ]),
97
+ s("div", Pe, [
98
+ n(e(v), {
99
+ render: (z = (V = (A = t.to_name) == null ? void 0 : A.column) == null ? void 0 : V.columnDef) == null ? void 0 : z.cell,
100
+ props: (L = (u = t.to_name) == null ? void 0 : u.getContext) == null ? void 0 : L.call(u)
101
+ }, null, 8, ["render", "props"])
102
+ ]),
103
+ s("div", ke, ce((E = (m = ($ = (p = (M = r.original.purchaseOrder) == null ? void 0 : M.items) == null ? void 0 : p.map) == null ? void 0 : $.call(p, (ae) => `${ae.name}`)) == null ? void 0 : m.join) == null ? void 0 : E.call(m, ", ")), 1),
104
+ (F = r.original.purchaseOrder) != null && F.ref ? (x(), ie("div", Se, [
105
+ n(e(v), {
106
+ render: (N = (q = (Y = t.purchaseOrder_ref) == null ? void 0 : Y.column) == null ? void 0 : q.columnDef) == null ? void 0 : N.cell,
107
+ props: (j = (d = t.purchaseOrder_ref) == null ? void 0 : d.getContext) == null ? void 0 : j.call(d)
108
+ }, null, 8, ["render", "props"])
109
+ ])) : ue("", !0),
110
+ s("div", Ce, [
111
+ n(e(v), {
112
+ render: (U = (H = (G = t.purchaseOrder_status) == null ? void 0 : G.column) == null ? void 0 : H.columnDef) == null ? void 0 : U.cell,
113
+ props: (J = (f = t.purchaseOrder_status) == null ? void 0 : f.getContext) == null ? void 0 : J.call(f)
114
+ }, null, 8, ["render", "props"])
115
+ ])
116
+ ])
117
+ ];
118
+ }),
119
+ _: 2
120
+ }, 1032, ["row", "onRowClick"])
121
+ ]),
122
+ _: 1
123
+ }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
124
+ ], 2),
125
+ (x(), K(pe, { to: "body" }, [
126
+ n(xe, me({
127
+ scope: e(O).APPROVAL
128
+ }, e(o).transferDetailsProps.value, {
129
+ onSubmitted: e(o).fetchData
130
+ }), null, 16, ["scope", "onSubmitted"])
131
+ ]))
132
+ ]),
133
+ _: 1
134
+ }, 8, ["title", "actions"]);
135
+ };
136
+ }
137
+ });
138
+ export {
139
+ $e as default
140
+ };
@@ -1,16 +1,16 @@
1
- import { defineComponent as C, ref as o, onMounted as M, onUnmounted as F, watch as x, resolveComponent as l, openBlock as i, createElementBlock as c, createBlock as I, withCtx as R, createVNode as a, createCommentVNode as z, createElementVNode as L } from "vue";
2
- import { _ as P } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-RQ6XxdxU.js";
3
- import { a as V, aL as S } from "./app-ojZQI-KQ.js";
1
+ import { defineComponent as C, ref as o, onMounted as M, onUnmounted as F, watch as x, resolveComponent as l, openBlock as i, createElementBlock as c, createBlock as I, withCtx as R, createVNode as a, createCommentVNode as z, createElementVNode as P } from "vue";
2
+ import { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-k8k3iqCg.js";
3
+ import { a as L, aO as S } from "./app-CrAS505q.js";
4
4
  const U = {
5
5
  key: 0,
6
6
  class: "flex justify-end gap-8 items-center"
7
7
  }, E = {
8
8
  key: 1,
9
9
  class: "p-24 flex items-center justify-center gap-16"
10
- }, D = /* @__PURE__ */ C({
10
+ }, A = /* @__PURE__ */ C({
11
11
  __name: "BindingsDialog",
12
12
  setup(N) {
13
- const p = V(), d = o(!0), s = o(new Array()), u = o(), t = S(y);
13
+ const p = L(), d = o(!0), s = o(new Array()), u = o(), t = S(y);
14
14
  async function y() {
15
15
  await p.readInventory(), u.value = t.onMessage("props:inventory-bindings", (e) => {
16
16
  d.value = !1, s.value = e;
@@ -55,7 +55,7 @@ const U = {
55
55
  }, [
56
56
  d.value ? (i(), c("div", E, [
57
57
  a(h, { size: "md" }),
58
- n[2] || (n[2] = L("div", null, "Loading bindings dialog...", -1))
58
+ n[2] || (n[2] = P("div", null, "Loading bindings dialog...", -1))
59
59
  ])) : (i(), I(B, {
60
60
  key: 0,
61
61
  onValidationSuccess: n[1] || (n[1] = () => r.value ? void 0 : b()),
@@ -64,7 +64,7 @@ const U = {
64
64
  class: "flex flex-col gap-16"
65
65
  }, {
66
66
  default: R(() => [
67
- a(P, {
67
+ a(V, {
68
68
  "model-value": s.value,
69
69
  "onUpdate:modelValue": n[0] || (n[0] = (w) => s.value = w),
70
70
  "iframe-mode": "",
@@ -90,5 +90,5 @@ const U = {
90
90
  }
91
91
  });
92
92
  export {
93
- D as default
93
+ A as default
94
94
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as S, computed as r, ref as l, onMounted as U, onUnmounted as V, resolveComponent as E, openBlock as p, createElementBlock as f, createVNode as u, createElementVNode as k } from "vue";
2
- import { a as M, aL as x, J as z } from "./app-ojZQI-KQ.js";
2
+ import { a as M, aO as x, J as z } from "./app-CrAS505q.js";
3
3
  const F = {
4
4
  key: 0,
5
5
  class: "flex flex-col gap-16"
@@ -0,0 +1,120 @@
1
+ import { defineComponent as x, ref as r, provide as C, computed as g, resolveComponent as h, openBlock as l, createElementBlock as u, createStaticVNode as F, Fragment as L, renderList as I, createElementVNode as p, toDisplayString as v, createVNode as w, withModifiers as N, onMounted as E, onUnmounted as z, createBlock as M } from "vue";
2
+ import { F as b, a as O, aO as P } from "./app-CrAS505q.js";
3
+ import "@feedmepos/ui-library";
4
+ import "@feedmepos/mf-common";
5
+ const R = { class: "" }, U = ["onClick"], D = { class: "flex-grow-0 flex-shrink-0 basis-5/12 py-8 pl-8" }, V = { class: "flex-grow-0 flex-shrink-0 basis-3/12 py-8" }, S = { class: "flex-grow-0 flex-shrink-0 basis-3/12 py-8" }, $ = { class: "flex-grow-0 flex-shrink-0 basis-1/12 py-4" }, T = /* @__PURE__ */ x({
6
+ __name: "binding-ui",
7
+ props: {
8
+ items: { default: () => [] },
9
+ recipes: { default: () => [] },
10
+ skus: { default: () => [] },
11
+ type: { default: "Product" },
12
+ editable: { type: Boolean, default: !1 }
13
+ },
14
+ emits: ["click:open-binding-dialog"],
15
+ setup(_, { emit: a }) {
16
+ const d = r({
17
+ isOpen: !1,
18
+ initialValue: [],
19
+ context: "",
20
+ name: ""
21
+ });
22
+ C("closeDialog", () => {
23
+ d.value.isOpen = !d.value.isOpen;
24
+ });
25
+ const i = _, f = a, m = g(() => i.items.map((s) => ({
26
+ key: s.key,
27
+ name: s.name,
28
+ _skuLinked: s.bindings.filter(
29
+ ({ type: t, id: e }) => t === b.enum.SKU && i.skus.some((c) => c._id === e)
30
+ ).length,
31
+ _recipeLinked: s.bindings.filter(
32
+ ({ type: t, id: e }) => t === b.enum.RECIPE && i.recipes.some((c) => c._id === e)
33
+ ).length,
34
+ onUpdate: async () => {
35
+ i.editable && f("click:open-binding-dialog", i.type, s);
36
+ }
37
+ })));
38
+ return (k, s) => {
39
+ const t = h("FmButton");
40
+ return l(), u("div", R, [
41
+ s[0] || (s[0] = F('<div class="flex font-bold bg-[#F7F8FA]"><div class="flex-grow-0 flex-shrink-0 basis-5/12 py-8"></div><div class="flex-grow-0 flex-shrink-0 basis-3/12 py-8">Ingredient</div><div class="flex-grow-0 flex-shrink-0 basis-3/12 py-8">Recipe</div><div class="flex-grow-0 flex-shrink-0 basis-1/12 py-8"></div></div>', 1)),
42
+ (l(!0), u(L, null, I(m.value, (e) => (l(), u("div", {
43
+ key: e.key,
44
+ class: "cursor-pointer flex border-t border-[rgba(17,32,47,0.15] items-center",
45
+ onClick: e.onUpdate
46
+ }, [
47
+ p("div", D, v(e.name), 1),
48
+ p("div", V, v(e._skuLinked ? `${e._skuLinked} linked` : "Not linked"), 1),
49
+ p("div", S, v(e._recipeLinked ? `${e._recipeLinked} linked` : "Not linked"), 1),
50
+ p("div", $, [
51
+ w(t, {
52
+ variant: "tertiary",
53
+ icon: "edit",
54
+ "icon-color": "#000",
55
+ size: "md",
56
+ disabled: !i.editable,
57
+ type: "button",
58
+ onClick: N(e.onUpdate, ["stop"])
59
+ }, null, 8, ["disabled", "onClick"])
60
+ ])
61
+ ], 8, U))), 128))
62
+ ]);
63
+ };
64
+ }
65
+ }), A = {
66
+ key: 1,
67
+ class: "p-24 flex items-center justify-center gap-16"
68
+ }, K = /* @__PURE__ */ x({
69
+ __name: "BindingsTable",
70
+ setup(_) {
71
+ const a = O(), d = r(!0), i = r(new Array()), f = g(() => a.recipes), m = g(() => a.skus), k = r(""), s = P(e), t = r();
72
+ async function e() {
73
+ await a.readInventory(), t.value = s.onMessage(
74
+ "props:grouped-bindings",
75
+ (n) => {
76
+ d.value = !1, i.value = n;
77
+ }
78
+ ), s.sendMessage("props:grouped-bindings");
79
+ }
80
+ async function c(n, o) {
81
+ s.sendMessage("@click:open-binding-dialog", {
82
+ key: n,
83
+ binding: o
84
+ });
85
+ }
86
+ const y = r();
87
+ return E(() => {
88
+ const n = y.value;
89
+ n && new ResizeObserver(() => {
90
+ s.sendMessage("resize", n.scrollHeight);
91
+ }).observe(n);
92
+ }), z(() => {
93
+ var n, o;
94
+ (o = (n = t.value) == null ? void 0 : n.removeEventListener) == null || o.call(n);
95
+ }), (n, o) => {
96
+ const B = h("FmCircularProgress");
97
+ return l(), u("div", {
98
+ class: "bg-white",
99
+ ref_key: "resizeableRef",
100
+ ref: y
101
+ }, [
102
+ d.value ? (l(), u("div", A, [
103
+ w(B, { size: "md" }),
104
+ o[0] || (o[0] = p("div", null, "Loading bindings table...", -1))
105
+ ])) : (l(), M(T, {
106
+ key: 0,
107
+ items: i.value,
108
+ recipes: f.value,
109
+ skus: m.value,
110
+ type: k.value,
111
+ editable: "",
112
+ "onClick:openBindingDialog": c
113
+ }, null, 8, ["items", "recipes", "skus", "type"]))
114
+ ], 512);
115
+ };
116
+ }
117
+ });
118
+ export {
119
+ K as default
120
+ };