igniteui-angular 14.2.35 → 14.2.37
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/esm2020/lib/date-picker/date-picker.component.mjs +5 -5
- package/esm2020/lib/services/csv/char-separated-value-data.mjs +14 -14
- package/esm2020/lib/services/csv/csv-exporter.mjs +2 -2
- package/fesm2015/igniteui-angular.mjs +18 -18
- package/fesm2015/igniteui-angular.mjs.map +1 -1
- package/fesm2020/igniteui-angular.mjs +18 -18
- package/fesm2020/igniteui-angular.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -3973,30 +3973,29 @@ class CharSeparatedValueData {
|
|
|
3973
3973
|
}
|
|
3974
3974
|
this._isSpecialData = ExportUtilities.isSpecialData(this._data[0]);
|
|
3975
3975
|
this._escapeCharacters.push(this._delimiter);
|
|
3976
|
-
this._headerRecord = this.processHeaderRecord(keys);
|
|
3976
|
+
this._headerRecord = this.processHeaderRecord(keys, this._data.length);
|
|
3977
3977
|
this._dataRecords = this.processDataRecords(this._data, keys);
|
|
3978
3978
|
return this._headerRecord + this._dataRecords;
|
|
3979
3979
|
}
|
|
3980
3980
|
prepareDataAsync(done) {
|
|
3981
|
-
if (!this._data || this._data.length === 0) {
|
|
3982
|
-
done('');
|
|
3983
|
-
}
|
|
3984
3981
|
const columns = this.columns?.filter(c => !c.skip)
|
|
3985
3982
|
.sort((a, b) => a.startIndex - b.startIndex)
|
|
3986
3983
|
.sort((a, b) => a.pinnedIndex - b.pinnedIndex);
|
|
3987
3984
|
const keys = columns && columns.length ? columns.map(c => c.field) : ExportUtilities.getKeysFromData(this._data);
|
|
3988
|
-
if (keys.length === 0) {
|
|
3989
|
-
done('');
|
|
3990
|
-
}
|
|
3991
3985
|
this._isSpecialData = ExportUtilities.isSpecialData(this._data[0]);
|
|
3992
3986
|
this._escapeCharacters.push(this._delimiter);
|
|
3993
3987
|
const headers = columns && columns.length ?
|
|
3994
3988
|
columns.map(c => c.header ?? c.field) :
|
|
3995
3989
|
keys;
|
|
3996
|
-
this._headerRecord = this.processHeaderRecord(headers);
|
|
3997
|
-
|
|
3998
|
-
done(
|
|
3999
|
-
}
|
|
3990
|
+
this._headerRecord = this.processHeaderRecord(headers, this._data.length);
|
|
3991
|
+
if (keys.length === 0 || ((!this._data || this._data.length === 0) && keys.length === 0)) {
|
|
3992
|
+
done('');
|
|
3993
|
+
}
|
|
3994
|
+
else {
|
|
3995
|
+
this.processDataRecordsAsync(this._data, keys, (dr) => {
|
|
3996
|
+
done(this._headerRecord + dr);
|
|
3997
|
+
});
|
|
3998
|
+
}
|
|
4000
3999
|
}
|
|
4001
4000
|
processField(value, escapeChars) {
|
|
4002
4001
|
let safeValue = ExportUtilities.hasValue(value) ? String(value) : '';
|
|
@@ -4005,12 +4004,13 @@ class CharSeparatedValueData {
|
|
|
4005
4004
|
}
|
|
4006
4005
|
return safeValue + this._delimiter;
|
|
4007
4006
|
}
|
|
4008
|
-
processHeaderRecord(keys) {
|
|
4007
|
+
processHeaderRecord(keys, dataLength) {
|
|
4009
4008
|
let recordData = '';
|
|
4010
4009
|
for (const keyName of keys) {
|
|
4011
4010
|
recordData += this.processField(keyName, this._escapeCharacters);
|
|
4012
4011
|
}
|
|
4013
|
-
|
|
4012
|
+
const result = recordData.slice(0, -this._delimiterLength);
|
|
4013
|
+
return dataLength > 0 ? result + this._eor : result;
|
|
4014
4014
|
}
|
|
4015
4015
|
processRecord(record, keys) {
|
|
4016
4016
|
const recordData = new Array(keys.length);
|
|
@@ -4336,7 +4336,7 @@ class IgxCsvExporterService extends IgxBaseExporter {
|
|
|
4336
4336
|
}
|
|
4337
4337
|
}
|
|
4338
4338
|
exportFile(data, fileName, fileType) {
|
|
4339
|
-
const blob = new Blob(['\ufeff', data], { type: fileType });
|
|
4339
|
+
const blob = new Blob([data ? '\ufeff' : '', data], { type: fileType });
|
|
4340
4340
|
ExportUtilities.saveBlobToFile(blob, fileName);
|
|
4341
4341
|
}
|
|
4342
4342
|
}
|
|
@@ -39824,16 +39824,16 @@ class IgxDatePickerComponent extends PickerBaseDirective {
|
|
|
39824
39824
|
}
|
|
39825
39825
|
setCalendarViewDate() {
|
|
39826
39826
|
const { minValue, maxValue } = this.getMinMaxDates();
|
|
39827
|
-
this.
|
|
39828
|
-
if (minValue && DateTimeUtil.lessThanMinValue(
|
|
39827
|
+
const dateValue = DateTimeUtil.isValidDate(this.dateValue) ? this.dateValue : new Date();
|
|
39828
|
+
if (minValue && DateTimeUtil.lessThanMinValue(dateValue, minValue)) {
|
|
39829
39829
|
this._calendar.viewDate = this._targetViewDate = minValue;
|
|
39830
39830
|
return;
|
|
39831
39831
|
}
|
|
39832
|
-
if (maxValue && DateTimeUtil.greaterThanMaxValue(
|
|
39832
|
+
if (maxValue && DateTimeUtil.greaterThanMaxValue(dateValue, maxValue)) {
|
|
39833
39833
|
this._calendar.viewDate = this._targetViewDate = maxValue;
|
|
39834
39834
|
return;
|
|
39835
39835
|
}
|
|
39836
|
-
this._calendar.viewDate = this._targetViewDate =
|
|
39836
|
+
this._calendar.viewDate = this._targetViewDate = dateValue;
|
|
39837
39837
|
}
|
|
39838
39838
|
}
|
|
39839
39839
|
IgxDatePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.1", ngImport: i0, type: IgxDatePickerComponent, deps: [{ token: i0.ElementRef }, { token: LOCALE_ID }, { token: IgxOverlayService }, { token: i0.NgModuleRef }, { token: i0.Injector }, { token: i0.Renderer2 }, { token: PlatformUtil }, { token: i0.ChangeDetectorRef }, { token: DisplayDensityToken, optional: true }, { token: IGX_INPUT_GROUP_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|