zek 19.0.6 → 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
|
@@ -175,15 +175,11 @@ class ArrayHelper {
|
|
|
175
175
|
const keys = Object.keys(value);
|
|
176
176
|
const slice = keys.length / 2;
|
|
177
177
|
const result = [];
|
|
178
|
-
// for (let i = 0; i < slice; i++) {
|
|
179
|
-
// result.push({ key: +keys[i], value: keys[i + slice] } as T);
|
|
180
|
-
// }
|
|
181
178
|
for (let i = slice; i < keys.length; i++) {
|
|
182
179
|
const name = keys[i];
|
|
183
180
|
result.push({ key: +value[name], value: name });
|
|
184
181
|
}
|
|
185
182
|
return result;
|
|
186
|
-
//return Array.from(keys.slice(keys.length / 2), x => { key:x, value:'aaa' } as Object);
|
|
187
183
|
}
|
|
188
184
|
static enumToKeyPairArray(value) {
|
|
189
185
|
return this.enumToKeyPairBaseArray(value);
|
|
@@ -4052,6 +4048,8 @@ class DateValueAccessor {
|
|
|
4052
4048
|
//@Input() ngModel: any;
|
|
4053
4049
|
datepicker;
|
|
4054
4050
|
oldValue = null;
|
|
4051
|
+
min;
|
|
4052
|
+
max;
|
|
4055
4053
|
constructor(el, format, language, env) {
|
|
4056
4054
|
this.el = el;
|
|
4057
4055
|
if (env) {
|
|
@@ -4087,16 +4085,16 @@ class DateValueAccessor {
|
|
|
4087
4085
|
el.nativeElement.addEventListener('changeDate', (e) => {
|
|
4088
4086
|
this.onChangeDate(e); //execude
|
|
4089
4087
|
});
|
|
4090
|
-
setTimeout(() => {
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
}, 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);
|
|
4100
4098
|
}
|
|
4101
4099
|
// onKeyUp(e: any) {
|
|
4102
4100
|
// if (e && e.target) {
|
|
@@ -4119,6 +4117,24 @@ class DateValueAccessor {
|
|
|
4119
4117
|
this.datepicker.destroy();
|
|
4120
4118
|
}
|
|
4121
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
|
+
}
|
|
4122
4138
|
/**
|
|
4123
4139
|
* Fires when user choose date in datepicker
|
|
4124
4140
|
* @param e Custom event
|
|
@@ -4205,7 +4221,7 @@ class DateValueAccessor {
|
|
|
4205
4221
|
this.onTouched = fn;
|
|
4206
4222
|
}
|
|
4207
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 });
|
|
4208
|
-
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 });
|
|
4209
4225
|
}
|
|
4210
4226
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: DateValueAccessor, decorators: [{
|
|
4211
4227
|
type: Directive,
|
|
@@ -4227,7 +4243,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImpor
|
|
|
4227
4243
|
}] }, { type: undefined, decorators: [{
|
|
4228
4244
|
type: Inject,
|
|
4229
4245
|
args: ['env']
|
|
4230
|
-
}] }]
|
|
4246
|
+
}] }], propDecorators: { min: [{
|
|
4247
|
+
type: Input
|
|
4248
|
+
}], max: [{
|
|
4249
|
+
type: Input
|
|
4250
|
+
}] } });
|
|
4231
4251
|
|
|
4232
4252
|
class DatepickerModule {
|
|
4233
4253
|
static forRoot(config, environment) {
|