zek 19.0.9 → 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
|
@@ -1835,7 +1835,9 @@ class CrudService extends BaseService {
|
|
|
1835
1835
|
return this.api.post(`api/${this.controller}/batch`, model).pipe(catchError(this.handleError(this.batch.name, null)));
|
|
1836
1836
|
}
|
|
1837
1837
|
export(model, fileTypeId) {
|
|
1838
|
-
return
|
|
1838
|
+
return Convert.isNumber(model)
|
|
1839
|
+
? this.api.getBlob(`api/${this.controller}/${model}/export/${fileTypeId}`).pipe(catchError(this.handleError('export', null)))
|
|
1840
|
+
: this.api.getBlob(`api/${this.controller}/export/${fileTypeId}`, model).pipe(catchError(this.handleError('export', null)));
|
|
1839
1841
|
}
|
|
1840
1842
|
}
|
|
1841
1843
|
|
|
@@ -2740,7 +2742,7 @@ class EditBaseComponent extends EditFormComponent {
|
|
|
2740
2742
|
}
|
|
2741
2743
|
}
|
|
2742
2744
|
export(fileTypeId) {
|
|
2743
|
-
this.service.export(
|
|
2745
|
+
this.service.export(this.id, fileTypeId).subscribe(data => {
|
|
2744
2746
|
this.downloadFile(data, 'export.xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
|
|
2745
2747
|
});
|
|
2746
2748
|
}
|
|
@@ -5929,12 +5931,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImpor
|
|
|
5929
5931
|
|
|
5930
5932
|
class ZekFieldValidator {
|
|
5931
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
|
+
}
|
|
5932
5940
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ZekFieldValidator, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5933
|
-
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": "
|
|
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" }] });
|
|
5934
5942
|
}
|
|
5935
5943
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ZekFieldValidator, decorators: [{
|
|
5936
5944
|
type: Component,
|
|
5937
|
-
args: [{ standalone: true, selector: 'zek-field-validator, [zek-field-validator]', host: {
|
|
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>" }]
|
|
5938
5948
|
}], propDecorators: { field: [{
|
|
5939
5949
|
type: Input
|
|
5940
5950
|
}] } });
|