@lenne.tech/ng-base 14.13.0 → 14.13.2
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/base-components/components/model-form/model-form.component.d.ts +7 -0
- package/esm2020/base-components/components/change-password/change-password.component.mjs +41 -21
- package/esm2020/base-components/components/input/input.component.mjs +2 -2
- package/esm2020/base-components/components/model-form/model-form.component.mjs +36 -23
- package/esm2020/base-components/components/upload-image/upload-image.component.mjs +3 -3
- package/esm2020/shared/services/file.service.mjs +1 -2
- package/esm2020/shared/services/forms.service.mjs +12 -4
- package/esm2020/shared/validators/secure-password.validator.mjs +2 -2
- package/fesm2015/lenne.tech-ng-base-base-components.mjs +85 -51
- package/fesm2015/lenne.tech-ng-base-base-components.mjs.map +1 -1
- package/fesm2015/lenne.tech-ng-base-shared.mjs +13 -5
- package/fesm2015/lenne.tech-ng-base-shared.mjs.map +1 -1
- package/fesm2020/lenne.tech-ng-base-base-components.mjs +79 -46
- package/fesm2020/lenne.tech-ng-base-base-components.mjs.map +1 -1
- package/fesm2020/lenne.tech-ng-base-shared.mjs +12 -5
- package/fesm2020/lenne.tech-ng-base-shared.mjs.map +1 -1
- package/package.json +1 -1
- package/shared/services/forms.service.d.ts +1 -0
|
@@ -2025,14 +2025,22 @@ class FormsService {
|
|
|
2025
2025
|
});
|
|
2026
2026
|
}
|
|
2027
2027
|
findInvalidControls(formGroup) {
|
|
2028
|
-
|
|
2028
|
+
return this.getInvalidControl(formGroup);
|
|
2029
|
+
}
|
|
2030
|
+
getInvalidControl(formGroup, invalid) {
|
|
2031
|
+
let result = invalid ? [...invalid] : [];
|
|
2029
2032
|
const controls = formGroup.controls;
|
|
2030
2033
|
Object.keys(formGroup.controls).forEach((name) => {
|
|
2031
2034
|
if (controls[name].invalid) {
|
|
2032
|
-
|
|
2035
|
+
if (controls[name]?.controls) {
|
|
2036
|
+
result = this.getInvalidControl(controls[name], result);
|
|
2037
|
+
}
|
|
2038
|
+
else {
|
|
2039
|
+
result.push(name);
|
|
2040
|
+
}
|
|
2033
2041
|
}
|
|
2034
2042
|
});
|
|
2035
|
-
return
|
|
2043
|
+
return result;
|
|
2036
2044
|
}
|
|
2037
2045
|
scrollToInvalidControl(form) {
|
|
2038
2046
|
const invalidForm = this.findInvalidControls(form)[0];
|
|
@@ -2438,7 +2446,6 @@ class FileService {
|
|
|
2438
2446
|
*/
|
|
2439
2447
|
async upload(url, path, file, compressOptions) {
|
|
2440
2448
|
return new Promise(async (resolve, reject) => {
|
|
2441
|
-
console.log(url, path, compressOptions, file);
|
|
2442
2449
|
if (compressOptions) {
|
|
2443
2450
|
file = await this.compress(file, compressOptions);
|
|
2444
2451
|
}
|
|
@@ -2558,7 +2565,7 @@ function fullEmail() {
|
|
|
2558
2565
|
|
|
2559
2566
|
function securePasswordValidator() {
|
|
2560
2567
|
return (control) => {
|
|
2561
|
-
const PASSWORD_REGEX = /^(
|
|
2568
|
+
const PASSWORD_REGEX = /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/i;
|
|
2562
2569
|
return !PASSWORD_REGEX.test(control.value) ? { invalidSecurePassword: true } : null;
|
|
2563
2570
|
};
|
|
2564
2571
|
}
|