zek 19.0.7 → 19.0.9
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,9 +1835,6 @@ 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
|
-
if (Convert.isNumber(model)) {
|
|
1839
|
-
return this.api.getBlob(`api/${this.controller}/${model}/export/${fileTypeId}`).pipe(catchError(this.handleError('export', null)));
|
|
1840
|
-
}
|
|
1841
1838
|
return this.api.getBlob(`api/${this.controller}/export/${fileTypeId}`, model).pipe(catchError(this.handleError('export', null)));
|
|
1842
1839
|
}
|
|
1843
1840
|
}
|
|
@@ -2743,7 +2740,7 @@ class EditBaseComponent extends EditFormComponent {
|
|
|
2743
2740
|
}
|
|
2744
2741
|
}
|
|
2745
2742
|
export(fileTypeId) {
|
|
2746
|
-
this.service.export(this.id, fileTypeId).subscribe(data => {
|
|
2743
|
+
this.service.export({ id: this.id }, fileTypeId).subscribe(data => {
|
|
2747
2744
|
this.downloadFile(data, 'export.xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
|
|
2748
2745
|
});
|
|
2749
2746
|
}
|
|
@@ -4051,6 +4048,8 @@ class DateValueAccessor {
|
|
|
4051
4048
|
//@Input() ngModel: any;
|
|
4052
4049
|
datepicker;
|
|
4053
4050
|
oldValue = null;
|
|
4051
|
+
min;
|
|
4052
|
+
max;
|
|
4054
4053
|
constructor(el, format, language, env) {
|
|
4055
4054
|
this.el = el;
|
|
4056
4055
|
if (env) {
|
|
@@ -4086,16 +4085,16 @@ class DateValueAccessor {
|
|
|
4086
4085
|
el.nativeElement.addEventListener('changeDate', (e) => {
|
|
4087
4086
|
this.onChangeDate(e); //execude
|
|
4088
4087
|
});
|
|
4089
|
-
setTimeout(() => {
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
}, 0);
|
|
4088
|
+
// setTimeout(() => {
|
|
4089
|
+
// const min = this.el.nativeElement.getAttribute('min');
|
|
4090
|
+
// const max = this.el.nativeElement.getAttribute('max');
|
|
4091
|
+
// const minDate = min ? DateHelper.toDate(min) : null;
|
|
4092
|
+
// const maxDate = max ? DateHelper.toDate(max) : null;
|
|
4093
|
+
// this.datepicker.setOptions({
|
|
4094
|
+
// minDate: minDate,//String|Date|Number
|
|
4095
|
+
// maxDate: maxDate,//String|Date|Number
|
|
4096
|
+
// });
|
|
4097
|
+
// }, 0);
|
|
4099
4098
|
}
|
|
4100
4099
|
// onKeyUp(e: any) {
|
|
4101
4100
|
// if (e && e.target) {
|
|
@@ -4118,6 +4117,24 @@ class DateValueAccessor {
|
|
|
4118
4117
|
this.datepicker.destroy();
|
|
4119
4118
|
}
|
|
4120
4119
|
}
|
|
4120
|
+
ngOnChanges(changes) {
|
|
4121
|
+
if (changes['min']) {
|
|
4122
|
+
const minDate = this.min ? DateHelper.toDate(this.min) : null;
|
|
4123
|
+
if (this.datepicker) {
|
|
4124
|
+
this.datepicker.setOptions({
|
|
4125
|
+
minDate: minDate,
|
|
4126
|
+
});
|
|
4127
|
+
}
|
|
4128
|
+
}
|
|
4129
|
+
if (changes['max']) {
|
|
4130
|
+
const maxDate = this.max ? DateHelper.toDate(this.max) : null;
|
|
4131
|
+
if (this.datepicker) {
|
|
4132
|
+
this.datepicker.setOptions({
|
|
4133
|
+
maxDate: maxDate
|
|
4134
|
+
});
|
|
4135
|
+
}
|
|
4136
|
+
}
|
|
4137
|
+
}
|
|
4121
4138
|
/**
|
|
4122
4139
|
* Fires when user choose date in datepicker
|
|
4123
4140
|
* @param e Custom event
|
|
@@ -4204,7 +4221,7 @@ class DateValueAccessor {
|
|
|
4204
4221
|
this.onTouched = fn;
|
|
4205
4222
|
}
|
|
4206
4223
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: DateValueAccessor, deps: [{ token: i0.ElementRef }, { token: DATE_FORMAT }, { token: LANGUAGE }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4207
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.6", type: DateValueAccessor, isStandalone: false, selector: "[zek-date],input[type=date][formControlName],input[type=date][formControl],input[type=date][ngModel]", providers: [DATE_VALUE_ACCESSOR], ngImport: i0 });
|
|
4224
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.6", type: DateValueAccessor, isStandalone: false, selector: "[zek-date],input[type=date][formControlName],input[type=date][formControl],input[type=date][ngModel]", inputs: { min: "min", max: "max" }, providers: [DATE_VALUE_ACCESSOR], usesOnChanges: true, ngImport: i0 });
|
|
4208
4225
|
}
|
|
4209
4226
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: DateValueAccessor, decorators: [{
|
|
4210
4227
|
type: Directive,
|
|
@@ -4226,7 +4243,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImpor
|
|
|
4226
4243
|
}] }, { type: undefined, decorators: [{
|
|
4227
4244
|
type: Inject,
|
|
4228
4245
|
args: ['env']
|
|
4229
|
-
}] }]
|
|
4246
|
+
}] }], propDecorators: { min: [{
|
|
4247
|
+
type: Input
|
|
4248
|
+
}], max: [{
|
|
4249
|
+
type: Input
|
|
4250
|
+
}] } });
|
|
4230
4251
|
|
|
4231
4252
|
class DatepickerModule {
|
|
4232
4253
|
static forRoot(config, environment) {
|