@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
|
@@ -1972,14 +1972,23 @@ class FormsService {
|
|
|
1972
1972
|
});
|
|
1973
1973
|
}
|
|
1974
1974
|
findInvalidControls(formGroup) {
|
|
1975
|
-
|
|
1975
|
+
return this.getInvalidControl(formGroup);
|
|
1976
|
+
}
|
|
1977
|
+
getInvalidControl(formGroup, invalid) {
|
|
1978
|
+
let result = invalid ? [...invalid] : [];
|
|
1976
1979
|
const controls = formGroup.controls;
|
|
1977
1980
|
Object.keys(formGroup.controls).forEach((name) => {
|
|
1981
|
+
var _a;
|
|
1978
1982
|
if (controls[name].invalid) {
|
|
1979
|
-
|
|
1983
|
+
if ((_a = controls[name]) === null || _a === void 0 ? void 0 : _a.controls) {
|
|
1984
|
+
result = this.getInvalidControl(controls[name], result);
|
|
1985
|
+
}
|
|
1986
|
+
else {
|
|
1987
|
+
result.push(name);
|
|
1988
|
+
}
|
|
1980
1989
|
}
|
|
1981
1990
|
});
|
|
1982
|
-
return
|
|
1991
|
+
return result;
|
|
1983
1992
|
}
|
|
1984
1993
|
scrollToInvalidControl(form) {
|
|
1985
1994
|
const invalidForm = this.findInvalidControls(form)[0];
|
|
@@ -2385,7 +2394,6 @@ class FileService {
|
|
|
2385
2394
|
upload(url, path, file, compressOptions) {
|
|
2386
2395
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2387
2396
|
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
2388
|
-
console.log(url, path, compressOptions, file);
|
|
2389
2397
|
if (compressOptions) {
|
|
2390
2398
|
file = yield this.compress(file, compressOptions);
|
|
2391
2399
|
}
|
|
@@ -2507,7 +2515,7 @@ function fullEmail() {
|
|
|
2507
2515
|
|
|
2508
2516
|
function securePasswordValidator() {
|
|
2509
2517
|
return (control) => {
|
|
2510
|
-
const PASSWORD_REGEX = /^(
|
|
2518
|
+
const PASSWORD_REGEX = /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/i;
|
|
2511
2519
|
return !PASSWORD_REGEX.test(control.value) ? { invalidSecurePassword: true } : null;
|
|
2512
2520
|
};
|
|
2513
2521
|
}
|