zek 19.0.10 → 19.0.11

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/fesm2022/zek.mjs CHANGED
@@ -5931,12 +5931,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImpor
5931
5931
 
5932
5932
  class ZekFieldValidator {
5933
5933
  field;
5934
+ get hasErrors() {
5935
+ return !!this.field &&
5936
+ this.field.invalid &&
5937
+ this.field.errors &&
5938
+ (this.field.dirty || this.field.touched || this.field.formDirective?.submitted);
5939
+ }
5934
5940
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ZekFieldValidator, deps: [], target: i0.ɵɵFactoryTarget.Component });
5935
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.6", type: ZekFieldValidator, isStandalone: true, selector: "zek-field-validator, [zek-field-validator]", inputs: { field: "field" }, host: { properties: { "class": "\"invalid-tooltip\"" } }, ngImport: i0, template: "<ng-container *ngIf=\"field && field.invalid && field.errors && (field.dirty || field.touched || field.formDirective?.submitted)\">\r\n <ng-container *ngIf=\"field.errors.required\">{{ 'Validation.Required' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.minlength\">{{ 'Validation.MinLengthFormat' | translate:{ value: field.errors.minlength.requiredLength } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.maxlength\">{{ 'Validation.MaxLengthFormat' | translate:{ value: field.errors.maxlength.requiredLength } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.min\">{{ 'Validation.Min' | translate:{ value: field.errors.min.min } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.max\">{{ 'Validation.Max' | translate:{ value: field.errors.min.max } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.email\">{{ 'Validation.Pattern' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.pattern\">{{ 'Validation.Pattern' | translate }}</ng-container><!-- {{ field.errors.pattern.requiredPattern }} -->\r\n <ng-container *ngIf=\"field.errors.mismatch\">{{ 'Validation.Mismatch' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.server\">{{field.errors.server}}</ng-container>\r\n</ng-container>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
5941
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.6", type: ZekFieldValidator, isStandalone: true, selector: "zek-field-validator, [zek-field-validator]", inputs: { field: "field" }, host: { properties: { "class.invalid-tooltip": "hasErrors" } }, ngImport: i0, template: "<ng-container *ngIf=\"hasErrors\">\r\n <ng-container *ngIf=\"field.errors.required\">{{ 'Validation.Required' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.minlength\">{{ 'Validation.MinLengthFormat' | translate:{ value: field.errors.minlength.requiredLength } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.maxlength\">{{ 'Validation.MaxLengthFormat' | translate:{ value: field.errors.maxlength.requiredLength } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.min\">{{ 'Validation.Min' | translate:{ value: field.errors.min.min } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.max\">{{ 'Validation.Max' | translate:{ value: field.errors.min.max } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.email\">{{ 'Validation.Pattern' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.pattern\">{{ 'Validation.Pattern' | translate }}</ng-container><!-- {{ field.errors.pattern.requiredPattern }} -->\r\n <ng-container *ngIf=\"field.errors.mismatch\">{{ 'Validation.Mismatch' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.server\">{{field.errors.server}}</ng-container>\r\n</ng-container>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
5936
5942
  }
5937
5943
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ZekFieldValidator, decorators: [{
5938
5944
  type: Component,
5939
- args: [{ standalone: true, selector: 'zek-field-validator, [zek-field-validator]', host: { '[class]': '"invalid-tooltip"' }, imports: [CommonModule, TranslateModule], template: "<ng-container *ngIf=\"field && field.invalid && field.errors && (field.dirty || field.touched || field.formDirective?.submitted)\">\r\n <ng-container *ngIf=\"field.errors.required\">{{ 'Validation.Required' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.minlength\">{{ 'Validation.MinLengthFormat' | translate:{ value: field.errors.minlength.requiredLength } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.maxlength\">{{ 'Validation.MaxLengthFormat' | translate:{ value: field.errors.maxlength.requiredLength } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.min\">{{ 'Validation.Min' | translate:{ value: field.errors.min.min } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.max\">{{ 'Validation.Max' | translate:{ value: field.errors.min.max } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.email\">{{ 'Validation.Pattern' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.pattern\">{{ 'Validation.Pattern' | translate }}</ng-container><!-- {{ field.errors.pattern.requiredPattern }} -->\r\n <ng-container *ngIf=\"field.errors.mismatch\">{{ 'Validation.Mismatch' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.server\">{{field.errors.server}}</ng-container>\r\n</ng-container>" }]
5945
+ args: [{ standalone: true, selector: 'zek-field-validator, [zek-field-validator]', host: {
5946
+ '[class.invalid-tooltip]': 'hasErrors'
5947
+ }, imports: [CommonModule, TranslateModule], template: "<ng-container *ngIf=\"hasErrors\">\r\n <ng-container *ngIf=\"field.errors.required\">{{ 'Validation.Required' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.minlength\">{{ 'Validation.MinLengthFormat' | translate:{ value: field.errors.minlength.requiredLength } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.maxlength\">{{ 'Validation.MaxLengthFormat' | translate:{ value: field.errors.maxlength.requiredLength } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.min\">{{ 'Validation.Min' | translate:{ value: field.errors.min.min } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.max\">{{ 'Validation.Max' | translate:{ value: field.errors.min.max } }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.email\">{{ 'Validation.Pattern' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.pattern\">{{ 'Validation.Pattern' | translate }}</ng-container><!-- {{ field.errors.pattern.requiredPattern }} -->\r\n <ng-container *ngIf=\"field.errors.mismatch\">{{ 'Validation.Mismatch' | translate }}</ng-container>\r\n <ng-container *ngIf=\"field.errors.server\">{{field.errors.server}}</ng-container>\r\n</ng-container>" }]
5940
5948
  }], propDecorators: { field: [{
5941
5949
  type: Input
5942
5950
  }] } });