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.
- package/dist/_virtual/index2.js +2 -3
- package/dist/_virtual/index3.js +3 -3
- package/dist/_virtual/index4.js +3 -5
- package/dist/_virtual/index5.js +5 -2
- package/dist/components/atoms/Avatar/Avatar.js +6 -5
- package/dist/components/atoms/FilterPill/FilterPill.js +6 -5
- package/dist/components/atoms/UploadContainer/UploadContainer.js +3 -2
- package/dist/components/molecules/AlertModal/AlertModal.js +3 -2
- package/dist/components/molecules/CalendarSelector/CalendarSelector.js +3 -2
- package/dist/components/molecules/DialogModal/DialogModal.js +3 -2
- package/dist/components/molecules/FloatingMenu/FloatingMenu.js +11 -10
- package/dist/components/molecules/SideModal/SideModal.js +51 -58
- package/dist/components/molecules/SideModal/SideModal.types.d.ts +1 -0
- package/dist/components/molecules/Tabs/Tabs.js +8 -7
- package/dist/components/molecules/UncontrolledDateInput/UncontrolledDateInput.js +3 -2
- package/dist/lawgic-dev-kit.umd.js +35 -35
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/yup/index.esm.js +3 -3
- package/dist/utils/modal.js +34 -33
- package/dist/utils/toast.js +3 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as r } from "../../_virtual/
|
|
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/
|
|
2
|
-
import { t as U } from "../../_virtual/
|
|
3
|
-
import oe from "../../_virtual/
|
|
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;
|
package/dist/utils/modal.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { l as
|
|
3
|
-
import { useState as M, useRef as w, useCallback as s, useEffect as
|
|
4
|
-
import
|
|
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
|
-
|
|
15
|
-
|
|
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) ||
|
|
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 ||
|
|
25
|
+
onClose: () => t(e.id || u.uniqueId())
|
|
25
26
|
}
|
|
26
27
|
};
|
|
27
|
-
|
|
28
|
+
n.current = [...n.current, r], o(n.current);
|
|
28
29
|
}, []), l = s((e) => {
|
|
29
|
-
const r =
|
|
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
|
-
|
|
39
|
+
n.current = [...n.current, c], o(n.current);
|
|
39
40
|
}, []), t = s((e) => {
|
|
40
|
-
|
|
41
|
+
n.current = n.current.map(
|
|
41
42
|
(r) => r.id === e ? { ...r, open: !1 } : r
|
|
42
|
-
), n
|
|
43
|
-
|
|
43
|
+
), o(n.current), setTimeout(() => {
|
|
44
|
+
n.current = n.current.filter(
|
|
44
45
|
(r) => r.id !== e
|
|
45
|
-
), n
|
|
46
|
+
), o(n.current);
|
|
46
47
|
}, 150);
|
|
47
48
|
}, []);
|
|
48
|
-
return
|
|
49
|
+
return m(() => {
|
|
49
50
|
window.openModal = d, window.closeModal = t, window.openCustomModal = l;
|
|
50
|
-
}, [d, t, l]), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
70
|
-
|
|
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__ */
|
|
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
|
|
98
|
-
(
|
|
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
|
|
102
|
-
(
|
|
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
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
v as ModalContainer,
|
|
107
|
+
G as closeModal,
|
|
108
|
+
B as openCustomModal,
|
|
109
|
+
z as openModal
|
|
109
110
|
};
|
package/dist/utils/toast.js
CHANGED
|
@@ -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
|
-
},
|
|
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
|
-
|
|
120
|
+
F as toast
|
|
120
121
|
};
|