@klippa/ngx-enhancy-forms 14.7.6 → 14.7.7

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.
@@ -1137,6 +1137,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
1137
1137
  class FormErrorComponent {
1138
1138
  constructor(parent) {
1139
1139
  this.parent = parent;
1140
+ this.showErrorValueAsMessage = false;
1140
1141
  this.showError = false;
1141
1142
  }
1142
1143
  ngOnInit() {
@@ -1152,18 +1153,23 @@ class FormErrorComponent {
1152
1153
  }
1153
1154
  });
1154
1155
  }
1156
+ getErrorValueMessage() {
1157
+ return this.parent.getAttachedControl().errors[this.error];
1158
+ }
1155
1159
  }
1156
1160
  FormErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormErrorComponent, deps: [{ token: FormElementComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1157
- FormErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: FormErrorComponent, selector: "klp-form-error", inputs: { error: "error" }, viewQueries: [{ propertyName: "contentRef", first: true, predicate: ["contentRef"], descendants: true }], ngImport: i0, template: "<ng-template #contentRef>\n\t<ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:block}\n"] });
1161
+ FormErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: FormErrorComponent, selector: "klp-form-error", inputs: { error: "error", showErrorValueAsMessage: "showErrorValueAsMessage" }, viewQueries: [{ propertyName: "contentRef", first: true, predicate: ["contentRef"], descendants: true }], ngImport: i0, template: "<ng-template #contentRef>\n\t<ng-content *ngIf=\"!showErrorValueAsMessage\"></ng-content>\n\t<div *ngIf=\"showErrorValueAsMessage\">{{getErrorValueMessage()}}</div>\n</ng-template>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1158
1162
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: FormErrorComponent, decorators: [{
1159
1163
  type: Component,
1160
- args: [{ selector: 'klp-form-error', template: "<ng-template #contentRef>\n\t<ng-content></ng-content>\n</ng-template>\n", styles: [":host{display:block}\n"] }]
1164
+ args: [{ selector: 'klp-form-error', template: "<ng-template #contentRef>\n\t<ng-content *ngIf=\"!showErrorValueAsMessage\"></ng-content>\n\t<div *ngIf=\"showErrorValueAsMessage\">{{getErrorValueMessage()}}</div>\n</ng-template>\n", styles: [":host{display:block}\n"] }]
1161
1165
  }], ctorParameters: function () { return [{ type: FormElementComponent, decorators: [{
1162
1166
  type: Host
1163
1167
  }, {
1164
1168
  type: Optional
1165
1169
  }] }]; }, propDecorators: { error: [{
1166
1170
  type: Input
1171
+ }], showErrorValueAsMessage: [{
1172
+ type: Input
1167
1173
  }], contentRef: [{
1168
1174
  type: ViewChild,
1169
1175
  args: ['contentRef']