@ng-nest/ui 15.0.2 → 15.0.3

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.
@@ -337,3 +337,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
337
337
 
338
338
  export { XIconComponent, XIconHref, XIconModule, XIconPrefix, XIconProperty, XIconService, XSouceUrl, XViewBox };
339
339
  //# sourceMappingURL=ng-nest-ui-icon.mjs.map
340
+ //# sourceMappingURL=ng-nest-ui-icon.mjs.map
@@ -438,3 +438,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
438
438
 
439
439
  export { XInputComponent, XInputGroupComponent, XInputGroupPrefix, XInputGroupProperty, XInputModule, XInputPrefix, XInputProperty };
440
440
  //# sourceMappingURL=ng-nest-ui-input.mjs.map
441
+ //# sourceMappingURL=ng-nest-ui-input.mjs.map
@@ -162,3 +162,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
162
162
 
163
163
  export { XRadioComponent, XRadioModule, XRadioPrefix, XRadioProperty };
164
164
  //# sourceMappingURL=ng-nest-ui-radio.mjs.map
165
+ //# sourceMappingURL=ng-nest-ui-radio.mjs.map
@@ -237,3 +237,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
237
237
 
238
238
  export { XTreeFileComponent, XTreeFileImgs, XTreeFileModule, XTreeFilePrefix, XTreeFileProperty };
239
239
  //# sourceMappingURL=ng-nest-ui-tree-file.mjs.map
240
+ //# sourceMappingURL=ng-nest-ui-tree-file.mjs.map
@@ -626,3 +626,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
626
626
 
627
627
  export { XUploadComponent, XUploadModule, XUploadPortalComponent, XUploadPortalPrefix, XUploadPrefix, XUploadProperty };
628
628
  //# sourceMappingURL=ng-nest-ui-upload.mjs.map
629
+ //# sourceMappingURL=ng-nest-ui-upload.mjs.map
@@ -211,3 +211,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
211
211
 
212
212
  export { XAnchorComponent, XAnchorModule, XAnchorPrefix, XAnchorProperty };
213
213
  //# sourceMappingURL=ng-nest-ui-anchor.mjs.map
214
+ //# sourceMappingURL=ng-nest-ui-anchor.mjs.map
@@ -183,3 +183,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
183
183
 
184
184
  export { XCheckboxComponent, XCheckboxModule, XCheckboxPrefix, XCheckboxProperty };
185
185
  //# sourceMappingURL=ng-nest-ui-checkbox.mjs.map
186
+ //# sourceMappingURL=ng-nest-ui-checkbox.mjs.map
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { EventEmitter, Component, Input, Output, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, HostListener, ViewChild, NgModule } from '@angular/core';
3
3
  import { __decorate } from 'tslib';
4
4
  import * as i2 from '@ng-nest/ui/core';
5
- import { XWithConfig, XInputBoolean, XDataConvert, XProperty, XIsChange, chunk, XIsEmpty, XAddDays, XConnectBaseAnimation, XIsDate, XIsNumber, XIsString, XClearClass, XAddMonths, XAddYears, XIsUndefined } from '@ng-nest/ui/core';
5
+ import { XWithConfig, XInputBoolean, XDataConvert, XProperty, XIsChange, chunk, XIsEmpty, XAddDays, XConnectBaseAnimation, XIsDate, XIsNumber, XIsString, XIsNull, XClearClass, XAddMonths, XAddYears, XIsUndefined } from '@ng-nest/ui/core';
6
6
  import { XControlValueAccessor, XValueAccessor, XBaseFormModule } from '@ng-nest/ui/base-form';
7
7
  import { Subject } from 'rxjs';
8
8
  import { map, takeUntil } from 'rxjs/operators';
@@ -911,7 +911,7 @@ class XDatePickerComponent extends XDatePickerProperty {
911
911
  const valueTime = new Date(value).getTime();
912
912
  this.numberValue = !isNaN(valueTime) ? valueTime : '';
913
913
  }
914
- else if (XIsEmpty(value)) {
914
+ else if (XIsEmpty(value) || XIsNull(value)) {
915
915
  this.numberValue = '';
916
916
  }
917
917
  this.value = value;
@@ -991,11 +991,11 @@ class XDatePickerComponent extends XDatePickerProperty {
991
991
  }
992
992
  }
993
993
  clearEmit() {
994
- this.value = '';
994
+ this.value = null;
995
995
  this.numberValue = '';
996
996
  this.displayValue = '';
997
997
  this.mleave();
998
- this.valueChange.next(this.numberValue);
998
+ this.valueChange.next(this.value);
999
999
  this.modelChange();
1000
1000
  }
1001
1001
  modelChange() {
@@ -1005,6 +1005,8 @@ class XDatePickerComponent extends XDatePickerProperty {
1005
1005
  this.formControlValidator();
1006
1006
  }
1007
1007
  getValue() {
1008
+ if (this.numberValue === '')
1009
+ return null;
1008
1010
  return ['date', 'string'].includes(this.modelType) ? new Date(this.numberValue) : this.numberValue;
1009
1011
  }
1010
1012
  portalAttached() {
@@ -1730,4 +1732,3 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.0", ngImpor
1730
1732
 
1731
1733
  export { XDatePickerComponent, XDatePickerModule, XDatePickerPortalComponent, XDatePickerPortalPrefix, XDatePickerPrefix, XDatePickerProperty, XDateRangeComponent, XDateRangePortalComponent, XDateRangePortalPrefix, XDateRangePrefix, XDateRangeProperty, XPickerDateComponent, XPickerDatePrefix, XPickerDateProperty, XPickerMonthComponent, XPickerMonthPrefix, XPickerMonthProperty, XPickerYearComponent, XPickerYearPrefix, XPickerYearProperty };
1732
1734
  //# sourceMappingURL=ng-nest-ui-date-picker.mjs.map
1733
- //# sourceMappingURL=ng-nest-ui-date-picker.mjs.map