coer-elements 0.0.129 → 0.0.131
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/components/lib/coer-accordion/coer-accordion.component.d.ts +3 -3
- package/components/lib/coer-button/coer-button.component.d.ts +3 -2
- package/components/lib/coer-checkbox/coer-checkbox.component.d.ts +2 -2
- package/components/lib/coer-datebox/coer-datebox.component.d.ts +8 -7
- package/components/lib/coer-filebox/coer-filebox.component.d.ts +3 -3
- package/components/lib/coer-modal/coer-modal.component.d.ts +2 -2
- package/extensions/lib/object.extension.d.ts +1 -0
- package/extensions/lib/string.extension.d.ts +8 -0
- package/extensions/public-api.d.ts +1 -0
- package/fesm2022/coer-elements-components.mjs +25 -23
- package/fesm2022/coer-elements-components.mjs.map +1 -1
- package/fesm2022/coer-elements-extensions.mjs +40 -20
- package/fesm2022/coer-elements-extensions.mjs.map +1 -1
- package/fesm2022/coer-elements-guards.mjs +29 -0
- package/fesm2022/coer-elements-guards.mjs.map +1 -0
- package/fesm2022/coer-elements-interceptors.mjs +64 -0
- package/fesm2022/coer-elements-interceptors.mjs.map +1 -0
- package/fesm2022/coer-elements-pages.mjs +2 -2
- package/fesm2022/coer-elements-pages.mjs.map +1 -1
- package/fesm2022/coer-elements-tools.mjs +7 -27
- package/fesm2022/coer-elements-tools.mjs.map +1 -1
- package/fesm2022/coer-elements.mjs +1 -0
- package/fesm2022/coer-elements.mjs.map +1 -1
- package/guards/index.d.ts +5 -0
- package/guards/lib/login.guard.d.ts +2 -0
- package/guards/lib/page.guard.d.ts +2 -0
- package/guards/public-api.d.ts +2 -0
- package/index.d.ts +1 -0
- package/interceptors/index.d.ts +5 -0
- package/interceptors/lib/user.interceptor.d.ts +8 -0
- package/interceptors/lib/utc-offset.interceptor.d.ts +8 -0
- package/interceptors/public-api.d.ts +1 -0
- package/interfaces/lib/coer-menu/menu.interface.d.ts +3 -1
- package/package.json +10 -2
- package/pages/lib/coer-system/coer-system.component.d.ts +2 -2
- package/pages/lib/coer-system/login/login.component.d.ts +1 -1
- package/tools/lib/page.class.d.ts +4 -4
- package/tools/lib/section.class.d.ts +4 -4
- package/tools/lib/tools.d.ts +6 -6
@@ -23,39 +23,19 @@ const Tools = {
|
|
23
23
|
},
|
24
24
|
/** Returns true if the value is null or undefined, false otherwise */
|
25
25
|
IsNull: (value) => {
|
26
|
-
|
27
|
-
return true;
|
28
|
-
if (value === null)
|
29
|
-
return true;
|
30
|
-
return false;
|
26
|
+
return (value === undefined || value === null);
|
31
27
|
},
|
32
28
|
/** Returns true if the value is not null or undefined, false otherwise */
|
33
29
|
IsNotNull: (value) => {
|
34
|
-
|
35
|
-
return false;
|
36
|
-
if (value === null)
|
37
|
-
return false;
|
38
|
-
return true;
|
30
|
+
return !Tools.IsNull(value);
|
39
31
|
},
|
40
32
|
/** Returns true if the value is null or undefined or contains only whitespace, false otherwise */
|
41
33
|
IsOnlyWhiteSpace: (value) => {
|
42
|
-
|
43
|
-
return true;
|
44
|
-
if (value === null)
|
45
|
-
return true;
|
46
|
-
if (typeof value === 'string' && value.trim() === '')
|
47
|
-
return true;
|
48
|
-
return false;
|
34
|
+
return Tools.IsNull(value) || (typeof value === 'string' && value.trim() === '');
|
49
35
|
},
|
50
36
|
/** Returns true if has string value and is not only whitespace, false otherwise */
|
51
37
|
IsNotOnlyWhiteSpace: (value) => {
|
52
|
-
|
53
|
-
return false;
|
54
|
-
if (value === null)
|
55
|
-
return false;
|
56
|
-
if (typeof value === 'string' && value.trim() === '')
|
57
|
-
return false;
|
58
|
-
return true;
|
38
|
+
return Tools.IsNotNull(value) && !Tools.IsOnlyWhiteSpace(value);
|
59
39
|
},
|
60
40
|
/** Avoid Null value */
|
61
41
|
AvoidNull: (value, type = null) => {
|
@@ -99,7 +79,7 @@ const Tools = {
|
|
99
79
|
default: return '';
|
100
80
|
}
|
101
81
|
},
|
102
|
-
/**
|
82
|
+
/** */
|
103
83
|
RemoveAccents: (value) => {
|
104
84
|
if (Tools.IsOnlyWhiteSpace(value))
|
105
85
|
return '';
|
@@ -129,7 +109,7 @@ const Tools = {
|
|
129
109
|
return words.join(' ');
|
130
110
|
},
|
131
111
|
/** Get properties of an object */
|
132
|
-
|
112
|
+
GetPropertyList: (obj) => {
|
133
113
|
const properties = [];
|
134
114
|
if (obj === null)
|
135
115
|
return properties;
|
@@ -822,7 +802,7 @@ const ElementsHTML = {
|
|
822
802
|
let isInvalid = true;
|
823
803
|
if (Tools.IsNotNull(element)) {
|
824
804
|
if (typeof element == 'object') {
|
825
|
-
const properties = Tools.
|
805
|
+
const properties = Tools.GetPropertyList(element);
|
826
806
|
if (properties.includes('_isTouched') && properties.includes('_value')) {
|
827
807
|
isInvalid = element.isTouched && Tools.IsOnlyWhiteSpace(element.value);
|
828
808
|
}
|