lawgic-dev-kit 0.20.1 → 0.20.4

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.
@@ -1,4 +1,4 @@
1
- import { __module as r } from "../../_virtual/index5.js";
1
+ import { __module as r } from "../../_virtual/index2.js";
2
2
  import { __require as s } from "./node_modules/react-is/index.js";
3
3
  import { __require as t } from "./factoryWithTypeCheckers.js";
4
4
  import { __require as p } from "./factoryWithThrowingShims.js";
@@ -1,6 +1,6 @@
1
- import { p as v } from "../../_virtual/index2.js";
2
- import { t as U } from "../../_virtual/index3.js";
3
- import oe from "../../_virtual/index4.js";
1
+ import { p as v } from "../../_virtual/index3.js";
2
+ import { t as U } from "../../_virtual/index4.js";
3
+ import oe from "../../_virtual/index5.js";
4
4
  const ce = Object.prototype.toString, he = Error.prototype.toString, fe = RegExp.prototype.toString, de = typeof Symbol < "u" ? Symbol.prototype.toString : () => "", pe = /^Symbol\((.*)\)(.*)$/;
5
5
  function me(n) {
6
6
  return n != +n ? "NaN" : n === 0 && 1 / n < 0 ? "-0" : "" + n;
@@ -1,7 +1,7 @@
1
- import { j as u } from "../_virtual/jsx-runtime.js";
2
- import { l as i } from "../_virtual/lodash.js";
3
- import { useState as M, useRef as w, useCallback as s, useEffect as C } from "react";
4
- import m from "../components/molecules/AlertModal/AlertModal.js";
1
+ import { j as i } from "../_virtual/jsx-runtime.js";
2
+ import { l as u } from "../_virtual/lodash.js";
3
+ import { useState as M, useRef as w, useCallback as s, useEffect as m } from "react";
4
+ import C from "../components/molecules/AlertModal/AlertModal.js";
5
5
  import "../node_modules/@fortawesome/react-fontawesome/index.es.js";
6
6
  import "../contexts/themeContext.js";
7
7
  import x from "../components/atoms/CenterModal/CenterModal.js";
@@ -11,22 +11,23 @@ import "../components/atoms/ImageProfileInput/ImageProfileInput.validators.js";
11
11
  import "fuse.js";
12
12
  import h from "../components/molecules/DialogModal/DialogModal.js";
13
13
  import "../components/molecules/InformationContainer/InformationContainer.js";
14
- const T = () => {
15
- const [p, n] = M([]), o = w([]), d = s((e) => {
14
+ import "react-dom";
15
+ const v = () => {
16
+ const [p, o] = M([]), n = w([]), d = s((e) => {
16
17
  const r = {
17
18
  ...e,
18
- id: (e == null ? void 0 : e.id) || i.uniqueId(),
19
+ id: (e == null ? void 0 : e.id) || u.uniqueId(),
19
20
  open: !0,
20
21
  type: (e == null ? void 0 : e.type) || "center",
21
22
  props: {
22
23
  ...e.props,
23
24
  open: !0,
24
- onClose: () => t(e.id || i.uniqueId())
25
+ onClose: () => t(e.id || u.uniqueId())
25
26
  }
26
27
  };
27
- o.current = [...o.current, r], n(o.current);
28
+ n.current = [...n.current, r], o(n.current);
28
29
  }, []), l = s((e) => {
29
- const r = i.uniqueId(), c = {
30
+ const r = u.uniqueId(), c = {
30
31
  id: r,
31
32
  open: !0,
32
33
  onClose: () => {
@@ -35,26 +36,26 @@ const T = () => {
35
36
  type: "custom",
36
37
  component: e
37
38
  };
38
- o.current = [...o.current, c], n(o.current);
39
+ n.current = [...n.current, c], o(n.current);
39
40
  }, []), t = s((e) => {
40
- o.current = o.current.map(
41
+ n.current = n.current.map(
41
42
  (r) => r.id === e ? { ...r, open: !1 } : r
42
- ), n(o.current), setTimeout(() => {
43
- o.current = o.current.filter(
43
+ ), o(n.current), setTimeout(() => {
44
+ n.current = n.current.filter(
44
45
  (r) => r.id !== e
45
- ), n(o.current);
46
+ ), o(n.current);
46
47
  }, 150);
47
48
  }, []);
48
- return C(() => {
49
+ return m(() => {
49
50
  window.openModal = d, window.closeModal = t, window.openCustomModal = l;
50
- }, [d, t, l]), /* @__PURE__ */ u.jsx(u.Fragment, { children: p.map((e) => {
51
+ }, [d, t, l]), /* @__PURE__ */ i.jsx(i.Fragment, { children: p.map((e) => {
51
52
  if (e.type === "custom" && (e != null && e.component)) {
52
53
  const { open: c, onClose: f, component: a } = e;
53
54
  return a(c, f);
54
55
  }
55
56
  if (e.type === "dialog") {
56
57
  const { props: c } = e;
57
- return /* @__PURE__ */ u.jsx(
58
+ return /* @__PURE__ */ i.jsx(
58
59
  h,
59
60
  {
60
61
  ...c,
@@ -66,8 +67,8 @@ const T = () => {
66
67
  }
67
68
  if (e.type === "alert") {
68
69
  const { props: c } = e;
69
- return /* @__PURE__ */ u.jsx(
70
- m,
70
+ return /* @__PURE__ */ i.jsx(
71
+ C,
71
72
  {
72
73
  ...c,
73
74
  open: e.open,
@@ -77,7 +78,7 @@ const T = () => {
77
78
  );
78
79
  }
79
80
  const { props: r } = e;
80
- return /* @__PURE__ */ u.jsx(
81
+ return /* @__PURE__ */ i.jsx(
81
82
  x,
82
83
  {
83
84
  ...r,
@@ -89,21 +90,21 @@ const T = () => {
89
90
  );
90
91
  }) });
91
92
  };
92
- function v(p) {
93
- var n;
94
- (n = window == null ? void 0 : window.openModal) == null || n.call(window, p);
95
- }
96
93
  function z(p) {
97
- var n;
98
- (n = window == null ? void 0 : window.openCustomModal) == null || n.call(window, p);
94
+ var o;
95
+ (o = window == null ? void 0 : window.openModal) == null || o.call(window, p);
99
96
  }
100
97
  function B(p) {
101
- var n;
102
- (n = window == null ? void 0 : window.closeModal) == null || n.call(window, p);
98
+ var o;
99
+ (o = window == null ? void 0 : window.openCustomModal) == null || o.call(window, p);
100
+ }
101
+ function G(p) {
102
+ var o;
103
+ (o = window == null ? void 0 : window.closeModal) == null || o.call(window, p);
103
104
  }
104
105
  export {
105
- T as ModalContainer,
106
- B as closeModal,
107
- z as openCustomModal,
108
- v as openModal
106
+ v as ModalContainer,
107
+ G as closeModal,
108
+ B as openCustomModal,
109
+ z as openModal
109
110
  };
@@ -6,6 +6,7 @@ import "../_virtual/lodash.js";
6
6
  import "../contexts/themeContext.js";
7
7
  import "react-hook-form";
8
8
  import "../components/molecules/InformationContainer/InformationContainer.js";
9
+ import "react-dom";
9
10
  import "../constants/countries.js";
10
11
  import "../components/atoms/ImageProfileInput/ImageProfileInput.validators.js";
11
12
  import h from "../components/atoms/Toast/Toast.js";
@@ -105,7 +106,7 @@ const p = (e, o, t = {}) => {
105
106
  resolve: t,
106
107
  reject: a
107
108
  };
108
- }, A = {
109
+ }, F = {
109
110
  success: (e, o = {}) => c(e, "success", o),
110
111
  error: (e, o = {}) => c(e, "error", o),
111
112
  warning: (e, o = {}) => c(e, "warning", o),
@@ -116,5 +117,5 @@ const p = (e, o, t = {}) => {
116
117
  export {
117
118
  p as showToastAsync,
118
119
  b as showToastLoading,
119
- A as toast
120
+ F as toast
120
121
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lawgic-dev-kit",
3
- "version": "0.20.1",
3
+ "version": "0.20.4",
4
4
  "description": "Componentes de UI para Lawgic",
5
5
  "type": "module",
6
6
  "private": false,