@envisiongroup/porygon 1.0.0-rc.38 → 1.0.0-rc.40
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/react-components/fields/Input/EFWInput.utils.js +23 -19
- package/dist/react-components/forms/EFWForm/EFWForm.hooks.js +2 -2
- package/dist/react-components/forms/EFWForm/EFWForm.js +436 -357
- package/dist/react-components/forms/EFWForm/EFWForm.types.d.ts +17 -3
- package/dist/react-components/forms/EFWForm/EFWForm.utils.js +34 -34
- package/dist/react-components/forms/EFWForm/index.d.ts +1 -1
- package/dist/react-components/tables/EFWTable/EFWTable.d.ts +1 -1
- package/dist/react-components/tables/EFWTable/EFWTable.js +746 -683
- package/dist/react-components/tables/EFWTable/EFWTable.types.d.ts +43 -4
- package/dist/react-components/tables/EFWTable/components/EFWTableBody/EFWTableBody.js +79 -75
- package/dist/react-components/tables/EFWTable/components/EFWTableBody/EFWTableBody.types.d.ts +2 -1
- package/dist/react-components/tables/EFWTable/components/EFWTableCell/EFWTableCell.js +34 -26
- package/dist/react-components/tables/EFWTable/components/EFWTableRow/EFWTableRow.js +69 -42
- package/dist/react-components/tables/EFWTable/components/EFWTableRow/EFWTableRow.types.d.ts +2 -1
- package/dist/react-components/tables/EFWTable/hooks/useDefaultAddButton/useDefaultAddButton.js +4 -1
- package/dist/react-components/tables/EFWTable/hooks/useTableController/useTableController.js +88 -86
- package/dist/react-components/tables/EFWTable/hooks/useTableSelection/useTableSelection.d.ts +1 -1
- package/dist/react-components/tables/EFWTable/hooks/useTableSelection/useTableSelection.js +100 -53
- package/dist/react-components/tables/EFWTable/hooks/useTableSelection/useTableSelection.types.d.ts +5 -1
- package/dist/react-components/tables/EFWTable/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2,26 +2,30 @@ const d = (t) => {
|
|
|
2
2
|
const e = (t || "").toString(), r = e.replace(/^0+/, "");
|
|
3
3
|
let n = "";
|
|
4
4
|
if (r != "" && r.length > 1) {
|
|
5
|
-
const
|
|
6
|
-
let
|
|
7
|
-
for (
|
|
8
|
-
n =
|
|
9
|
-
const
|
|
10
|
-
return n = n + "-" +
|
|
5
|
+
const o = r.replace(/\./g, "").replace(/-/g, ""), c = o.substring(0, o.length - 1);
|
|
6
|
+
let l = 0, s = 1;
|
|
7
|
+
for (l = c.length - 1; l >= 0; l--)
|
|
8
|
+
n = c.charAt(l) + n, s % 3 == 0 && s <= c.length - 1 && (n = "." + n), s++;
|
|
9
|
+
const u = o.substring(o.length - 1);
|
|
10
|
+
return n = n + "-" + u, n;
|
|
11
11
|
} else
|
|
12
12
|
return e;
|
|
13
13
|
}, F = (t) => {
|
|
14
|
-
|
|
14
|
+
const e = (t || "").replace(/\./g, "").replace(/‐/g, "-");
|
|
15
|
+
if (!/^[0-9]+-?[0-9kK]{1}$/.test(e))
|
|
15
16
|
return !1;
|
|
16
|
-
const
|
|
17
|
-
let
|
|
18
|
-
const
|
|
19
|
-
|
|
17
|
+
const r = e.includes("-") ? e.split("-") : [e.slice(0, -1), e.slice(-1)];
|
|
18
|
+
let n = r[1];
|
|
19
|
+
const i = r[0];
|
|
20
|
+
if (!i || !n)
|
|
21
|
+
return !1;
|
|
22
|
+
const o = function(c) {
|
|
23
|
+
let l = 0, s = 1;
|
|
20
24
|
for (; c; c = Math.floor(c / 10))
|
|
21
|
-
s = (s + c % 10 * (9 -
|
|
25
|
+
s = (s + c % 10 * (9 - l++ % 6)) % 11;
|
|
22
26
|
return s ? s - 1 : "k";
|
|
23
27
|
};
|
|
24
|
-
return
|
|
28
|
+
return n == "K" && (n = "k"), o(i) == n;
|
|
25
29
|
}, P = (t) => /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t), R = (t) => /^([01]?[0-9]|2[0-3]):[0-5][0-9]$/.test(t), f = {
|
|
26
30
|
none: /^.*$/,
|
|
27
31
|
email: /^.*$/,
|
|
@@ -31,7 +35,7 @@ const d = (t) => {
|
|
|
31
35
|
date: /^\d*$/,
|
|
32
36
|
time: /^\d*$/,
|
|
33
37
|
custom: /^\d*$/
|
|
34
|
-
},
|
|
38
|
+
}, h = (t, e) => f[e].test(t), a = {
|
|
35
39
|
none: (t) => t,
|
|
36
40
|
email: (t) => t,
|
|
37
41
|
phone: (t) => t.replace(/[() -]/g, ""),
|
|
@@ -74,14 +78,14 @@ const d = (t) => {
|
|
|
74
78
|
}
|
|
75
79
|
return t;
|
|
76
80
|
}
|
|
77
|
-
}, p = (t, e) => t ? (
|
|
81
|
+
}, p = (t, e) => t ? (a[e] || a.none)(t) : "", m = (t, e, r = {}) => t ? h(t, e) ? (g[e] || g.none)(t, r) : t : "", C = (t, e = "none", r) => {
|
|
78
82
|
const n = p(t ?? "", e);
|
|
79
|
-
return
|
|
83
|
+
return m(n, e, r ?? {});
|
|
80
84
|
};
|
|
81
85
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
m as applyFormatting,
|
|
87
|
+
C as getInputFormattedValue,
|
|
88
|
+
h as isFormattableValue,
|
|
85
89
|
p as stripFormatting,
|
|
86
90
|
F as validateChileanRut,
|
|
87
91
|
P as validateEmail,
|
|
@@ -8,8 +8,8 @@ const C = () => {
|
|
|
8
8
|
overwriteAll: !1
|
|
9
9
|
}) => {
|
|
10
10
|
r.current?.setValues(e, s);
|
|
11
|
-
}, []), o = t((e = !0) => r.current?.validateForm(e) ?? !1, []), i = t(() => {
|
|
12
|
-
r.current?.resetValues();
|
|
11
|
+
}, []), o = t((e = !0) => r.current?.validateForm(e) ?? !1, []), i = t((e) => {
|
|
12
|
+
r.current?.resetValues(e);
|
|
13
13
|
}, []), d = t((e, s) => r.current?.setDisabled(e, s) ?? [], []), g = t((e, s) => r.current?.setEditable(e, s) ?? [], []), m = t(() => r.current?.isDisabled() ?? !1, []), b = t(() => r.current?.isEditable() ?? !0, []), f = t((e, s = "internal") => {
|
|
14
14
|
r.current?.addMessageBar(e, s);
|
|
15
15
|
}, []), v = t((e) => {
|