@feedmepos/mf-inventory-portal 0.0.22-dev.36 → 0.0.22-dev.38

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 (64) hide show
  1. package/dist/{ApprovalView-av_qng0N.js → ApprovalView-B1EiHn4f.js} +8 -8
  2. package/dist/{BindingsDialog-VZ6YelwP.js → BindingsDialog-DmYWCMdc.js} +9 -9
  3. package/dist/{BindingsPicker-BFYv2ftI.js → BindingsPicker-B35A7Px5.js} +17 -17
  4. package/dist/{BindingsTable-DFowW8vT.js → BindingsTable-CtN6XTmL.js} +1 -1
  5. package/dist/{ClosingTemplateView-DNcgyBVw.js → ClosingTemplateView-Ch8hg35a.js} +15 -15
  6. package/dist/FmDroppableField-DK78vkN3.js +152 -0
  7. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CAZ4P0Ax.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-0p8dn-rc.js} +76 -76
  8. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DqOb7e4M.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DSQW1Ayz.js} +20 -20
  9. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bb0W0wUH.js +51 -0
  10. package/dist/IngredientsView-C47jIp0f.js +1611 -0
  11. package/dist/{IntegrationView-DT5F9V0h.js → IntegrationView-Dulaskd9.js} +71 -71
  12. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CXw4tAI_.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-btsYefZJ.js} +1 -1
  13. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C6a6F_jD.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BGLxTaW8.js} +16 -16
  14. package/dist/{PurchaseOrderPrintPreview-BMCy5C1z.js → PurchaseOrderPrintPreview-BtDEZAgl.js} +7 -7
  15. package/dist/{ReceiveRequestView-DBU59iYm.js → ReceiveRequestView-Cf6UV1Gz.js} +1042 -1029
  16. package/dist/{RecipeView-Brnk8Ar7.js → RecipeView-MagbCdki.js} +30 -29
  17. package/dist/StockView-D1TK5omK.js +7762 -0
  18. package/dist/{SupplierView-C0GT_JzY.js → SupplierView-CIUY0y12.js} +11 -11
  19. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BzJ8TnL_.js → TransferDetails.vue_vue_type_script_setup_true_lang-CacJUhOj.js} +99 -101
  20. package/dist/TransferTemplateView-CetnHs4Q.js +2054 -0
  21. package/dist/{UnitView-Dw2xLWy4.js → UnitView-BDZRBWlk.js} +16 -16
  22. package/dist/{WarehouseView-Cgf1mP8s.js → WarehouseView-DtUxLB_u.js} +20 -20
  23. package/dist/api/bill.d.ts +84 -238
  24. package/dist/api/purchase-order-template.d.ts +4 -2
  25. package/dist/{app-Iz-opVBA.js → app-BGqgEJv-.js} +18166 -18188
  26. package/dist/app.js +2 -2
  27. package/dist/{decimal-ffsKJesh.js → decimal-NPqoitzq.js} +1 -1
  28. package/dist/defineDeepModel-C4ebJegy.js +13 -0
  29. package/dist/format-time-from-id-DkB5tphe.js +15 -0
  30. package/dist/helper/xlsx.util.d.ts +7 -0
  31. package/dist/purchase-order-transaction-type-ag48uMYt.js +348 -0
  32. package/dist/stores/inventory.d.ts +63 -0
  33. package/dist/stores/location.d.ts +89 -0
  34. package/dist/stores/supplier.d.ts +120 -3
  35. package/dist/stores/warehouse.d.ts +7 -4
  36. package/dist/supplier-CBaaZ4vA.js +70 -0
  37. package/dist/tsconfig.app.tsbuildinfo +1 -1
  38. package/dist/{use-template-enabled-locations-2-BSLLHtkm.js → use-template-enabled-locations-2-CYsM7ABF.js} +1 -1
  39. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +2 -2
  40. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +2 -2
  41. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +2 -2
  42. package/dist/views/recipe/composables/use-recipe-form.d.ts +2 -2
  43. package/dist/views/stock/components/StockRecordCard.vue.d.ts +42 -119
  44. package/dist/views/stock/composables/use-stock-action.d.ts +2 -2
  45. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImport.vue.d.ts +2 -0
  46. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItem.vue.d.ts +12 -0
  47. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +9 -0
  48. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +10 -6
  49. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +1850 -5
  50. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +76 -0
  51. package/dist/views/transfer-template/helpers/remove-deleted-skus.helper.d.ts +1 -230
  52. package/dist/views/unit/composables/use-unit-form.d.ts +2 -2
  53. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +14 -8
  54. package/dist/{xlsx-C8qXPxB4.js → xlsx-DQC0TWcU.js} +651 -651
  55. package/dist/xlsx.util-N5bu_PXw.js +78 -0
  56. package/package.json +3 -3
  57. package/dist/IngredientsView-afICUj_U.js +0 -1755
  58. package/dist/StockView-BtTZNhlp.js +0 -1909
  59. package/dist/TransferTemplateView-SrBMTzU-.js +0 -1237
  60. package/dist/defineDeepModel-CDrYKSnU.js +0 -13
  61. package/dist/format-time-from-id-e9QU46u4.js +0 -15
  62. package/dist/purchase-order-transaction-type-DN3Czz6K.js +0 -338
  63. package/dist/supplier-DdJIh1nj.js +0 -69
  64. package/dist/xlsx.util-DGLr1W_5.js +0 -109
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as ee, ref as h, watch as te, computed as U, resolveComponent as ae, openBlock as g, createBlock as G, unref as e, withCtx as b, createElementVNode as s, normalizeClass as oe, createVNode as n, normalizeStyle as re, toDisplayString as ne, createElementBlock as se, createCommentVNode as le, Teleport as ie, mergeProps as ce } from "vue";
2
- import { ab as f, P as J, j as pe } from "./app-Iz-opVBA.js";
3
- import { b as ue, u as me, _ as de, a as fe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DqOb7e4M.js";
4
- import { a as _e, b as ve, _ as De } from "./TransferDetails.vue_vue_type_script_setup_true_lang-BzJ8TnL_.js";
2
+ import { i as pe, ag as f, V as J } from "./app-BGqgEJv-.js";
3
+ import { b as ue, u as me, _ as de, a as fe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DSQW1Ayz.js";
4
+ import { a as _e, b as ve, _ as De } from "./TransferDetails.vue_vue_type_script_setup_true_lang-CacJUhOj.js";
5
5
  import { _ as he, F as _ } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
6
6
  import { useBreakpoints as ge } from "@feedmepos/ui-library";
7
7
  import { useI18n as be } from "@feedmepos/mf-common";
@@ -75,7 +75,7 @@ const xe = { class: "flex flex-col py-8" }, ye = { class: "fm-typo-en-body-md-40
75
75
  onRowClick: (t) => e(o).promptShowTransferDetails(t.purchaseOrder, t)
76
76
  }, {
77
77
  default: b((t) => {
78
- var R, k, O, i, S, T, C, z, c, F, M, p, $, u, V, Y, j, q, L, m, N, P, E, A, d, H;
78
+ var R, k, O, i, S, T, C, z, c, F, M, p, V, u, $, Y, q, L, N, m, j, E, P, A, d, H;
79
79
  return [
80
80
  s("div", xe, [
81
81
  s("div", ye, [
@@ -90,16 +90,16 @@ const xe = { class: "flex flex-col py-8" }, ye = { class: "fm-typo-en-body-md-40
90
90
  props: (F = (c = t.to_name) == null ? void 0 : c.getContext) == null ? void 0 : F.call(c)
91
91
  }, null, 8, ["render", "props"])
92
92
  ]),
93
- s("div", Re, ne((V = (u = ($ = (p = (M = r.original.purchaseOrder) == null ? void 0 : M.items) == null ? void 0 : p.map) == null ? void 0 : $.call(p, (I) => `${I.name}`)) == null ? void 0 : u.join) == null ? void 0 : V.call(u, ", ")), 1),
93
+ s("div", Re, ne(($ = (u = (V = (p = (M = r.original.purchaseOrder) == null ? void 0 : M.items) == null ? void 0 : p.map) == null ? void 0 : V.call(p, (I) => `${I.name}`)) == null ? void 0 : u.join) == null ? void 0 : $.call(u, ", ")), 1),
94
94
  (Y = r.original.purchaseOrder) != null && Y.ref ? (g(), se("div", ke, [
95
95
  n(e(_), {
96
- render: (L = (q = (j = t.purchaseOrder_ref) == null ? void 0 : j.column) == null ? void 0 : q.columnDef) == null ? void 0 : L.cell,
97
- props: (N = (m = t.purchaseOrder_ref) == null ? void 0 : m.getContext) == null ? void 0 : N.call(m)
96
+ render: (N = (L = (q = t.purchaseOrder_ref) == null ? void 0 : q.column) == null ? void 0 : L.columnDef) == null ? void 0 : N.cell,
97
+ props: (j = (m = t.purchaseOrder_ref) == null ? void 0 : m.getContext) == null ? void 0 : j.call(m)
98
98
  }, null, 8, ["render", "props"])
99
99
  ])) : le("", !0),
100
100
  s("div", Oe, [
101
101
  n(e(_), {
102
- render: (A = (E = (P = t.purchaseOrder_status) == null ? void 0 : P.column) == null ? void 0 : E.columnDef) == null ? void 0 : A.cell,
102
+ render: (A = (P = (E = t.purchaseOrder_status) == null ? void 0 : E.column) == null ? void 0 : P.columnDef) == null ? void 0 : A.cell,
103
103
  props: (H = (d = t.purchaseOrder_status) == null ? void 0 : d.getContext) == null ? void 0 : H.call(d)
104
104
  }, null, 8, ["render", "props"])
105
105
  ])
@@ -1,5 +1,5 @@
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 d, createBlock as I, withCtx as R, createVNode as a, createCommentVNode as z, createElementVNode as P } from "vue";
2
- import { u as V, ar as L, _ as S } from "./app-Iz-opVBA.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 { u as V, av as L, _ as S } from "./app-BGqgEJv-.js";
3
3
  const U = {
4
4
  key: 0,
5
5
  class: "flex justify-end gap-8 items-center"
@@ -9,10 +9,10 @@ const U = {
9
9
  }, A = /* @__PURE__ */ C({
10
10
  __name: "BindingsDialog",
11
11
  setup(N) {
12
- const p = V(), u = o(!0), s = o(new Array()), c = o(), t = L(y);
12
+ const p = V(), d = o(!0), s = o(new Array()), u = o(), t = L(y);
13
13
  async function y() {
14
- await p.readInventory(), c.value = t.onMessage("props:inventory-bindings", (e) => {
15
- u.value = !1, s.value = e;
14
+ await p.readInventory(), u.value = t.onMessage("props:inventory-bindings", (e) => {
15
+ d.value = !1, s.value = e;
16
16
  }).onMessage("props:inventory-bindings:validate", () => {
17
17
  var e;
18
18
  (e = f.value) == null || e.validateInputs();
@@ -36,7 +36,7 @@ const U = {
36
36
  }).observe(e);
37
37
  }), F(() => {
38
38
  var e, n;
39
- (n = (e = c.value) == null ? void 0 : e.removeEventListener) == null || n.call(e);
39
+ (n = (e = u.value) == null ? void 0 : e.removeEventListener) == null || n.call(e);
40
40
  }), x([() => s.value], ([e]) => {
41
41
  t.sendMessage("@update:inventory-bindings", e);
42
42
  });
@@ -47,12 +47,12 @@ const U = {
47
47
  const f = o();
48
48
  return (e, n) => {
49
49
  const g = l("FmButton"), B = l("FmForm"), h = l("FmCircularProgress");
50
- return i(), d("div", {
50
+ return i(), c("div", {
51
51
  class: "bg-white",
52
52
  ref_key: "resizeableRef",
53
53
  ref: m
54
54
  }, [
55
- u.value ? (i(), d("div", E, [
55
+ d.value ? (i(), c("div", E, [
56
56
  a(h, { size: "md" }),
57
57
  n[2] || (n[2] = P("div", null, "Loading bindings dialog...", -1))
58
58
  ])) : (i(), I(B, {
@@ -69,7 +69,7 @@ const U = {
69
69
  "iframe-mode": "",
70
70
  "onClick:pickInventoryBindings": k
71
71
  }, null, 8, ["model-value"]),
72
- r.value ? z("", !0) : (i(), d("div", U, [
72
+ r.value ? z("", !0) : (i(), c("div", U, [
73
73
  a(g, {
74
74
  type: "button",
75
75
  variant: "tertiary",
@@ -1,5 +1,5 @@
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 { u as M, ar as x, z } from "./app-Iz-opVBA.js";
1
+ import { defineComponent as S, computed as u, ref as l, onMounted as U, onUnmounted as V, resolveComponent as E, openBlock as p, createElementBlock as f, createVNode as r, createElementVNode as k } from "vue";
2
+ import { u as M, av as x, y as z } from "./app-BGqgEJv-.js";
3
3
  const F = {
4
4
  key: 0,
5
5
  class: "flex flex-col gap-16"
@@ -9,14 +9,14 @@ const F = {
9
9
  }, N = /* @__PURE__ */ S({
10
10
  __name: "BindingsPicker",
11
11
  setup(L) {
12
- const d = M(), C = r(() => d.recipes), I = r(() => d.skus), g = l(!0), i = l(new Array()), a = l("RECIPE"), c = r(() => a.value === "SKU" ? I.value.map((s) => ({
12
+ const d = M(), C = u(() => d.recipes), I = u(() => d.skus), g = l(!0), i = l(new Array()), a = l("RECIPE"), c = u(() => a.value === "SKU" ? I.value.map((s) => ({
13
13
  label: s.name,
14
14
  sublabel: s.code,
15
15
  value: s
16
16
  })) : C.value.map((s) => ({
17
17
  label: s.name,
18
18
  value: s
19
- }))), b = r({
19
+ }))), b = u({
20
20
  get() {
21
21
  if (a.value === "SKU") {
22
22
  const e = i.value.filter((n) => n.type === "SKU");
@@ -31,7 +31,7 @@ const F = {
31
31
  const s = i.value.filter((n) => n.type === "SKU");
32
32
  e = e, i.value = [
33
33
  ...e.map((n) => {
34
- const t = i.value.find((v) => v.id === n._id);
34
+ const t = i.value.find((m) => m.id === n._id);
35
35
  return t || {
36
36
  type: "RECIPE",
37
37
  id: n._id,
@@ -49,7 +49,7 @@ const F = {
49
49
  i.value = [
50
50
  ...s,
51
51
  ...e.map((n) => {
52
- const t = i.value.find((v) => v.id === n._id);
52
+ const t = i.value.find((m) => m.id === n._id);
53
53
  return t || {
54
54
  type: "SKU",
55
55
  id: n._id,
@@ -62,9 +62,9 @@ const F = {
62
62
  ];
63
63
  }
64
64
  }
65
- }), _ = l(), o = x(B);
65
+ }), y = l(), o = x(B);
66
66
  async function B() {
67
- await d.readInventory(), _.value = o.onMessage(
67
+ await d.readInventory(), y.value = o.onMessage(
68
68
  "props:binding-items",
69
69
  (e) => {
70
70
  g.value = !1, a.value = e.type, i.value = e.bindings;
@@ -77,38 +77,38 @@ const F = {
77
77
  function R() {
78
78
  o.sendMessage("@submit:items", i.value);
79
79
  }
80
- const y = l();
80
+ const _ = l();
81
81
  return U(() => {
82
- const e = y.value;
82
+ const e = _.value;
83
83
  e && new ResizeObserver(() => {
84
84
  o.sendMessage("resize", e.scrollHeight);
85
85
  }).observe(e);
86
86
  }), V(() => {
87
87
  var e, s;
88
- (s = (e = _.value) == null ? void 0 : e.removeEventListener) == null || s.call(e);
88
+ (s = (e = y.value) == null ? void 0 : e.removeEventListener) == null || s.call(e);
89
89
  }), (e, s) => {
90
90
  const n = E("FmButton"), t = E("FmCircularProgress");
91
91
  return p(), f("div", {
92
92
  class: "bg-white",
93
93
  ref_key: "resizeableRef",
94
- ref: y
94
+ ref: _
95
95
  }, [
96
96
  g.value ? (p(), f("div", w, [
97
- u(t, { size: "md" }),
97
+ r(t, { size: "md" }),
98
98
  s[1] || (s[1] = k("div", null, "Loading bindings dialog...", -1))
99
99
  ])) : (p(), f("div", F, [
100
- u(z, {
100
+ r(z, {
101
101
  "model-value": b.value,
102
- "onUpdate:modelValue": s[0] || (s[0] = (m) => b.value = m),
102
+ "onUpdate:modelValue": s[0] || (s[0] = (v) => b.value = v),
103
103
  items: c.value
104
104
  }, null, 8, ["model-value", "items"]),
105
105
  k("div", K, [
106
- u(n, {
106
+ r(n, {
107
107
  variant: "tertiary",
108
108
  label: "Close",
109
109
  onClick: P
110
110
  }),
111
- u(n, {
111
+ r(n, {
112
112
  label: "Submit",
113
113
  onClick: R
114
114
  })
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as _, ref as c, provide as C, computed as f, resolveComponent as b, openBlock as p, createBlock as h, h as z, onMounted as B, onUnmounted as I, createElementBlock as y, createVNode as N, createElementVNode as x } from "vue";
2
- import { k as v, u as E, ar as L } from "./app-Iz-opVBA.js";
2
+ import { j as v, u as E, av as L } from "./app-BGqgEJv-.js";
3
3
  import { components as F } from "@feedmepos/ui-library";
4
4
  import "@feedmepos/mf-common";
5
5
  const P = /* @__PURE__ */ _({
@@ -1,15 +1,15 @@
1
1
  import { ref as F, h as x, computed as P, defineComponent as Y, openBlock as k, createElementBlock as S, createElementVNode as f, toDisplayString as I, createVNode as _, unref as c, Fragment as _e, renderList as Ce, resolveComponent as V, createBlock as B, withCtx as R, watch as Me, isRef as Pe, createTextVNode as ve, normalizeClass as Fe, normalizeStyle as Se, Teleport as Ae, normalizeProps as Ve, guardReactiveProps as Ie, mergeProps as Re } from "vue";
2
- import { u as Ue, _ as Ee, a as ze } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DqOb7e4M.js";
2
+ import { u as Ue, _ as Ee, a as ze } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DSQW1Ayz.js";
3
3
  import { useCoreStore as Ne, useI18n as J } from "@feedmepos/mf-common";
4
- import { useDialog as Q, useSnackbar as W, FmButtonVariant as be, components as U, useProxiedModel as Be, useBreakpoints as Le } from "@feedmepos/ui-library";
4
+ import { useDialog as X, useSnackbar as Q, FmButtonVariant as be, components as U, useProxiedModel as Be, useBreakpoints as Le } from "@feedmepos/ui-library";
5
5
  import { defineStore as we, storeToRefs as Ye } from "pinia";
6
6
  import { F as E, D as ye, R as z } from "./row-action.enum-PMKMRrZR.js";
7
- import { o as je, c as xe, j as ke, u as Ke, R as Ge, A as He, z as Je, i as qe, T as he } from "./app-Iz-opVBA.js";
7
+ import { n as je, c as xe, i as ke, u as Ke, R as Ge, A as He, y as Je, X as qe, Y as he } from "./app-BGqgEJv-.js";
8
8
  import { c as Oe, F as N, _ as Te } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
9
- import { f as Qe } from "./format-time-from-id-e9QU46u4.js";
9
+ import { f as Xe } from "./format-time-from-id-DkB5tphe.js";
10
10
  import "vue-router";
11
- import { d as We } from "./defineDeepModel-CDrYKSnU.js";
12
- import { u as Xe } from "./use-template-enabled-locations-2-BSLLHtkm.js";
11
+ import { d as Qe } from "./defineDeepModel-C4ebJegy.js";
12
+ import { u as We } from "./use-template-enabled-locations-2-CYsM7ABF.js";
13
13
  const q = je((m, g) => {
14
14
  function v() {
15
15
  var s;
@@ -46,7 +46,7 @@ const q = je((m, g) => {
46
46
  }
47
47
  };
48
48
  }), O = we("closingTemplateActions", () => {
49
- const m = Q(), g = W(), v = q(), t = F({});
49
+ const m = X(), g = Q(), v = q(), t = F({});
50
50
  function o() {
51
51
  t.value = {
52
52
  mode: E.CREATE,
@@ -181,7 +181,7 @@ const q = je((m, g) => {
181
181
  accessorKey: "_id",
182
182
  header: () => g("inventory.closing.table.createdAt"),
183
183
  cell(e) {
184
- return Qe(`${e.getValue()}`);
184
+ return Xe(`${e.getValue()}`);
185
185
  },
186
186
  enableSorting: !0
187
187
  },
@@ -525,11 +525,11 @@ const et = { class: "flex flex-col gap-16 py-12" }, tt = { class: "flex" }, st =
525
525
  disabled: { type: Boolean }
526
526
  },
527
527
  setup(m, { expose: g }) {
528
- const v = m, t = We(), { t: o } = J(), s = Ke(), b = Q(), {
528
+ const v = m, t = Qe(), { t: o } = J(), s = Ke(), b = X(), {
529
529
  promptSelectLocations: n,
530
530
  columnDefs: r,
531
531
  rowData: d
532
- } = Xe({
532
+ } = We({
533
533
  getLocations() {
534
534
  return t.locations;
535
535
  },
@@ -704,7 +704,7 @@ const et = { class: "flex flex-col gap-16 py-12" }, tt = { class: "flex" }, st =
704
704
  emits: ["update:show", "submitted"],
705
705
  setup(m, { expose: g, emit: v }) {
706
706
  var C;
707
- const t = m, o = v, s = q(), b = W(), { t: n } = J(), r = Be(t, "show");
707
+ const t = m, o = v, s = q(), b = Q(), { t: n } = J(), r = Be(t, "show");
708
708
  function d() {
709
709
  return {
710
710
  _id: "",
@@ -861,7 +861,7 @@ const wt = /* @__PURE__ */ qe(ht, [["render", _t]]), xt = { class: "flex flex-co
861
861
  __name: "ClosingTemplatePublish",
862
862
  emits: ["close"],
863
863
  setup(m, { emit: g }) {
864
- const v = F(!1), t = W(), o = q(), s = De(), b = g;
864
+ const v = F(!1), t = Q(), o = q(), s = De(), b = g;
865
865
  async function n() {
866
866
  v.value = !0;
867
867
  try {
@@ -926,7 +926,7 @@ const wt = /* @__PURE__ */ qe(ht, [["render", _t]]), xt = { class: "flex flex-co
926
926
  }), Ft = { class: "flex-1 flex flex-col gap-8" }, St = { class: "flex flex-col" }, At = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, It = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Rt = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, qt = /* @__PURE__ */ Y({
927
927
  __name: "ClosingTemplateView",
928
928
  setup(m) {
929
- const { t: g } = J(), { createTemplate: v, updateTemplate: t } = O(), { templateDialogProps: o, templateDetailsProps: s } = Ye(O()), b = ke(), n = Q(), r = De(), d = Ue(), { breakpoints: u } = Le();
929
+ const { t: g } = J(), { createTemplate: v, updateTemplate: t } = O(), { templateDialogProps: o, templateDetailsProps: s } = Ye(O()), b = ke(), n = X(), r = De(), d = Ue(), { breakpoints: u } = Le();
930
930
  b.watchLocation(r.fetchTemplates);
931
931
  const y = P(() => r.loading), p = F(""), w = P(() => u.value.xs || u.value.sm), e = P(() => w.value ? 10 : 20);
932
932
  function l(a) {
@@ -1011,13 +1011,13 @@ const wt = /* @__PURE__ */ qe(ht, [["render", _t]]), xt = { class: "flex flex-co
1011
1011
  onRowClick: (T) => c(t)(T)
1012
1012
  }, {
1013
1013
  default: R((T) => {
1014
- var X, Z, ee, j, te, se, le, oe, K, ne, ae, ie, re, ce, ue, G, de, me, pe, fe, H, ge;
1014
+ var W, Z, ee, j, te, se, le, oe, K, ne, ae, ie, re, ce, ue, G, de, me, pe, fe, H, ge;
1015
1015
  return [
1016
1016
  f("div", Ft, [
1017
1017
  f("div", St, [
1018
1018
  f("div", At, [
1019
1019
  _(c(N), {
1020
- render: (ee = (Z = (X = T._id) == null ? void 0 : X.column) == null ? void 0 : Z.columnDef) == null ? void 0 : ee.cell,
1020
+ render: (ee = (Z = (W = T._id) == null ? void 0 : W.column) == null ? void 0 : Z.columnDef) == null ? void 0 : ee.cell,
1021
1021
  props: (te = (j = T._id) == null ? void 0 : j.getContext) == null ? void 0 : te.call(j)
1022
1022
  }, null, 8, ["render", "props"])
1023
1023
  ]),
@@ -0,0 +1,152 @@
1
+ import { defineComponent as O, ref as r, computed as v, resolveComponent as z, openBlock as n, createElementBlock as p, createElementVNode as d, createCommentVNode as k, renderSlot as c, createBlock as C, normalizeClass as u, toDisplayString as g } from "vue";
2
+ import { X as N } from "./app-BGqgEJv-.js";
3
+ const M = {
4
+ key: 0,
5
+ class: "relative"
6
+ }, W = ["accept", "disabled"], X = { class: "flex flex-col gap-8" }, q = ["accept", "disabled"], G = /* @__PURE__ */ O({
7
+ __name: "FmDroppableField",
8
+ props: {
9
+ buttonLabel: {},
10
+ label: { default: "" },
11
+ disabled: { type: Boolean, default: !1 },
12
+ accept: { default: "" },
13
+ maxFileSize: { default: 8e6 },
14
+ contentClass: {}
15
+ },
16
+ emits: ["file-upload", "file-rejected"],
17
+ setup(S, { emit: $ }) {
18
+ const l = S, y = $, t = r(!1), i = r(null), s = r(null), f = r(), B = (e) => {
19
+ l.disabled || (e.stopPropagation(), e.preventDefault());
20
+ }, V = (e) => {
21
+ l.disabled || (e.stopPropagation(), e.preventDefault(), t.value = !0);
22
+ }, R = (e) => {
23
+ l.disabled || (e.stopPropagation(), e.preventDefault(), t.value = !1);
24
+ }, j = (e) => {
25
+ var a;
26
+ l.disabled || (e.stopPropagation(), e.preventDefault(), t.value = !1, F((a = e.dataTransfer) == null ? void 0 : a.files));
27
+ };
28
+ function F(e) {
29
+ if (e)
30
+ if (f.value = e, i.value = T(e[0]), s.value = A(e[0]), i.value && s.value)
31
+ y("file-upload", e[0]);
32
+ else {
33
+ const a = L();
34
+ y("file-rejected", [
35
+ {
36
+ file: e[0],
37
+ reason: a
38
+ }
39
+ ]);
40
+ }
41
+ }
42
+ const L = () => {
43
+ const e = new Array();
44
+ return i.value || e.push("invalid-type"), s.value || e.push("invalid-size"), e;
45
+ }, T = (e) => {
46
+ if (!l.accept) return !0;
47
+ const a = l.accept.split(",").map((o) => o.trim());
48
+ for (const o of a)
49
+ if (E(o)) {
50
+ if (D(o) === D(e.type)) return !0;
51
+ } else if (P(e) === o || e.type === o) return !0;
52
+ return !1;
53
+ }, A = (e) => e.size <= l.maxFileSize, E = (e) => e.indexOf("*") !== -1, P = (e) => "." + e.name.split(".").pop(), D = (e) => e.substring(0, e.indexOf("/")), w = v(() => {
54
+ if (t.value) return "Drop file to upload";
55
+ if (i.value) {
56
+ if (!s.value) return `File size exceeds ${l.maxFileSize * 1e-6}mb`;
57
+ } else return "File type is not valid";
58
+ return "";
59
+ }), m = v(() => f.value ? !i.value || !s.value : !1), _ = (e) => {
60
+ const a = e.target;
61
+ F(a.files);
62
+ }, x = v(() => {
63
+ var e;
64
+ return (e = f.value) == null ? void 0 : e.item(0);
65
+ }), b = r();
66
+ return (e, a) => {
67
+ const o = z("FmLabel"), I = z("FmButton");
68
+ return n(), p("label", {
69
+ class: "fm-droppable-field",
70
+ ref_key: "fmButtonRef",
71
+ ref: b
72
+ }, [
73
+ e.$slots.default ? (n(), p("div", M, [
74
+ d("input", {
75
+ accept: e.accept,
76
+ disabled: e.disabled,
77
+ class: "fm-droppable-field__input",
78
+ type: "file",
79
+ onChange: _
80
+ }, null, 40, W)
81
+ ])) : k("", !0),
82
+ c(e.$slots, "default", {
83
+ isDragging: t.value,
84
+ isValidFileType: i.value,
85
+ isValidFileSize: s.value,
86
+ singleValidFile: x.value,
87
+ openFileDialog: () => {
88
+ var h;
89
+ return console.log("click", b.value), (h = b.value) == null ? void 0 : h.click();
90
+ }
91
+ }, () => [
92
+ d("div", X, [
93
+ e.$slots.label ? c(e.$slots, "label", { key: 0 }, void 0, !0) : (n(), C(o, {
94
+ key: 1,
95
+ label: e.label
96
+ }, null, 8, ["label"]))
97
+ ]),
98
+ d("div", {
99
+ class: u([[
100
+ e.contentClass ? e.contentClass : "w-full h-full",
101
+ {
102
+ "fm-droppable-field__container--dragging": t.value,
103
+ "fm-droppable-field__container--invalid": m.value && !e.disabled,
104
+ "fm-droppable-field__container--disabled": e.disabled
105
+ }
106
+ ], "fm-droppable-field__container"]),
107
+ onDragenter: B,
108
+ onDragleave: R,
109
+ onDragover: V,
110
+ onDrop: j
111
+ }, [
112
+ (t.value || m.value) && !e.disabled ? (n(), p("div", {
113
+ key: 0,
114
+ class: u({
115
+ "fm-typo-en-body-lg-600": !0,
116
+ "text-fm-color-primary": t.value,
117
+ "text-fm-color-typo-error": m.value
118
+ })
119
+ }, g(w.value), 3)) : (n(), C(I, {
120
+ key: 1,
121
+ disabled: e.disabled,
122
+ label: e.buttonLabel ?? "Add files",
123
+ size: "md",
124
+ variant: "secondary"
125
+ }, null, 8, ["disabled", "label"])),
126
+ c(e.$slots, "accept-text", {}, () => [
127
+ l.accept ? (n(), p("div", {
128
+ key: 0,
129
+ class: u([[e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"], "fm-typo-en-body-md-400"])
130
+ }, g(`Accepts ${l.accept}`), 3)) : k("", !0)
131
+ ], !0),
132
+ d("input", {
133
+ accept: e.accept,
134
+ disabled: e.disabled,
135
+ class: "fm-droppable-field__input",
136
+ type: "file",
137
+ onChange: _
138
+ }, null, 40, q)
139
+ ], 34),
140
+ c(e.$slots, "helper-text", {}, () => [
141
+ d("div", {
142
+ class: u([[e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"], "fm-typo-en-body-sm-400"])
143
+ }, g(`Max size ${l.maxFileSize * 1e-6}mb`), 3)
144
+ ], !0)
145
+ ], !0)
146
+ ], 512);
147
+ };
148
+ }
149
+ }), K = /* @__PURE__ */ N(G, [["__scopeId", "data-v-311b22a0"]]);
150
+ export {
151
+ K as F
152
+ };