@messaia/cdk 13.0.1 → 13.0.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.
@@ -2592,15 +2592,7 @@ class GenericFormBaseComponent extends BaseComponent {
2592
2592
  isFormValid(form = null) {
2593
2593
  /* Print some debug information */
2594
2594
  if (this.debug) {
2595
- console.log('Form:', form);
2596
- Object.keys(form.controls).forEach(key => {
2597
- const controlErrors = form.controls[key].errors;
2598
- if (controlErrors != null) {
2599
- Object.keys(controlErrors).forEach(keyError => {
2600
- console.log('Key control: ' + key + ', keyError: ' + keyError + ', err value: ', controlErrors[keyError]);
2601
- });
2602
- }
2603
- });
2595
+ this.debugForm(form);
2604
2596
  }
2605
2597
  /* If the form ist not valid.. */
2606
2598
  if (!form.valid) {
@@ -2670,6 +2662,21 @@ class GenericFormBaseComponent extends BaseComponent {
2670
2662
  control.markAsTouched();
2671
2663
  }
2672
2664
  }
2665
+ /**
2666
+ * Shows form errors
2667
+ * @param form
2668
+ */
2669
+ debugForm(form = null) {
2670
+ console.log('Form:', form);
2671
+ Object.keys(form.controls).forEach(key => {
2672
+ const controlErrors = form.controls[key].errors;
2673
+ if (controlErrors != null) {
2674
+ Object.keys(controlErrors).forEach(keyError => {
2675
+ console.log('Key control: ' + key + ', keyError: ' + keyError + ', err value: ', controlErrors[keyError]);
2676
+ });
2677
+ }
2678
+ });
2679
+ }
2673
2680
  /**
2674
2681
  * Loads the previous URL in the history list.
2675
2682
  * @param action
@@ -11394,6 +11401,14 @@ class GenericReactiveFormComponent extends GenericFormBaseComponent {
11394
11401
  this.form = this.formBuilder.formGroup(this.item, this.formBuilderConfig);
11395
11402
  this.onAfterFormBuild();
11396
11403
  }
11404
+ /**
11405
+ * Shows form errors
11406
+ * @param form
11407
+ */
11408
+ debugForm(form = null) {
11409
+ super.debugForm(form);
11410
+ console.log(this.form.getErrorSummary(false));
11411
+ }
11397
11412
  }
11398
11413
  /** @nocollapse */ /** @nocollapse */ GenericReactiveFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: GenericReactiveFormComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
11399
11414
  /** @nocollapse */ /** @nocollapse */ GenericReactiveFormComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.3", type: GenericReactiveFormComponent, usesInheritance: true, ngImport: i0 });