@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.
@@ -1972,14 +1972,23 @@ class FormsService {
1972
1972
  });
1973
1973
  }
1974
1974
  findInvalidControls(formGroup) {
1975
- const invalid = [];
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
- invalid.push(name);
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 invalid;
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 = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/i;
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
  }