igniteui-angular 15.1.10 → 15.1.12

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.
@@ -4216,30 +4216,29 @@ class CharSeparatedValueData {
4216
4216
  }
4217
4217
  this._isSpecialData = ExportUtilities.isSpecialData(this._data[0]);
4218
4218
  this._escapeCharacters.push(this._delimiter);
4219
- this._headerRecord = this.processHeaderRecord(keys);
4219
+ this._headerRecord = this.processHeaderRecord(keys, this._data.length);
4220
4220
  this._dataRecords = this.processDataRecords(this._data, keys);
4221
4221
  return this._headerRecord + this._dataRecords;
4222
4222
  }
4223
4223
  prepareDataAsync(done) {
4224
- if (!this._data || this._data.length === 0) {
4225
- done('');
4226
- }
4227
4224
  const columns = this.columns?.filter(c => !c.skip)
4228
4225
  .sort((a, b) => a.startIndex - b.startIndex)
4229
4226
  .sort((a, b) => a.pinnedIndex - b.pinnedIndex);
4230
4227
  const keys = columns && columns.length ? columns.map(c => c.field) : ExportUtilities.getKeysFromData(this._data);
4231
- if (keys.length === 0) {
4232
- done('');
4233
- }
4234
4228
  this._isSpecialData = ExportUtilities.isSpecialData(this._data[0]);
4235
4229
  this._escapeCharacters.push(this._delimiter);
4236
4230
  const headers = columns && columns.length ?
4237
4231
  columns.map(c => c.header ?? c.field) :
4238
4232
  keys;
4239
- this._headerRecord = this.processHeaderRecord(headers);
4240
- this.processDataRecordsAsync(this._data, keys, (dr) => {
4241
- done(this._headerRecord + dr);
4242
- });
4233
+ this._headerRecord = this.processHeaderRecord(headers, this._data.length);
4234
+ if (keys.length === 0 || ((!this._data || this._data.length === 0) && keys.length === 0)) {
4235
+ done('');
4236
+ }
4237
+ else {
4238
+ this.processDataRecordsAsync(this._data, keys, (dr) => {
4239
+ done(this._headerRecord + dr);
4240
+ });
4241
+ }
4243
4242
  }
4244
4243
  processField(value, escapeChars) {
4245
4244
  let safeValue = ExportUtilities.hasValue(value) ? String(value) : '';
@@ -4248,12 +4247,13 @@ class CharSeparatedValueData {
4248
4247
  }
4249
4248
  return safeValue + this._delimiter;
4250
4249
  }
4251
- processHeaderRecord(keys) {
4250
+ processHeaderRecord(keys, dataLength) {
4252
4251
  let recordData = '';
4253
4252
  for (const keyName of keys) {
4254
4253
  recordData += this.processField(keyName, this._escapeCharacters);
4255
4254
  }
4256
- return recordData.slice(0, -this._delimiterLength) + this._eor;
4255
+ const result = recordData.slice(0, -this._delimiterLength);
4256
+ return dataLength > 0 ? result + this._eor : result;
4257
4257
  }
4258
4258
  processRecord(record, keys) {
4259
4259
  const recordData = new Array(keys.length);
@@ -4589,7 +4589,7 @@ class IgxCsvExporterService extends IgxBaseExporter {
4589
4589
  }
4590
4590
  }
4591
4591
  exportFile(data, fileName, fileType) {
4592
- const blob = new Blob(['\ufeff', data], { type: fileType });
4592
+ const blob = new Blob([data ? '\ufeff' : '', data], { type: fileType });
4593
4593
  ExportUtilities.saveBlobToFile(blob, fileName);
4594
4594
  }
4595
4595
  }
@@ -41086,16 +41086,16 @@ class IgxDatePickerComponent extends PickerBaseDirective {
41086
41086
  }
41087
41087
  setCalendarViewDate() {
41088
41088
  const { minValue, maxValue } = this.getMinMaxDates();
41089
- this._dateValue = this.dateValue || new Date();
41090
- if (minValue && DateTimeUtil.lessThanMinValue(this.dateValue, minValue)) {
41089
+ const dateValue = DateTimeUtil.isValidDate(this.dateValue) ? this.dateValue : new Date();
41090
+ if (minValue && DateTimeUtil.lessThanMinValue(dateValue, minValue)) {
41091
41091
  this._calendar.viewDate = this._targetViewDate = minValue;
41092
41092
  return;
41093
41093
  }
41094
- if (maxValue && DateTimeUtil.greaterThanMaxValue(this.dateValue, maxValue)) {
41094
+ if (maxValue && DateTimeUtil.greaterThanMaxValue(dateValue, maxValue)) {
41095
41095
  this._calendar.viewDate = this._targetViewDate = maxValue;
41096
41096
  return;
41097
41097
  }
41098
- this._calendar.viewDate = this._targetViewDate = this.dateValue;
41098
+ this._calendar.viewDate = this._targetViewDate = dateValue;
41099
41099
  }
41100
41100
  }
41101
41101
  IgxDatePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0", ngImport: i0, type: IgxDatePickerComponent, deps: [{ token: i0.ElementRef }, { token: LOCALE_ID }, { token: IgxOverlayService }, { 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 });
@@ -53696,14 +53696,12 @@ class IgxColumnGroupComponent extends IgxColumnComponent {
53696
53696
  get selectable() {
53697
53697
  return this.children && this.children.some(child => child.selectable);
53698
53698
  }
53699
+ /**
53700
+ * @hidden
53701
+ */
53699
53702
  set selectable(value) { }
53700
53703
  /**
53701
- * Returns a reference to the body template.
53702
- * ```typescript
53703
- * let bodyTemplate = this.columnGroup.bodyTemplate;
53704
- * ```
53705
- *
53706
- * @memberof IgxColumnGroupComponent
53704
+ * @hidden
53707
53705
  */
53708
53706
  get bodyTemplate() {
53709
53707
  return this._bodyTemplate;
@@ -53713,12 +53711,7 @@ class IgxColumnGroupComponent extends IgxColumnComponent {
53713
53711
  */
53714
53712
  set bodyTemplate(template) { }
53715
53713
  /**
53716
- * Returns a reference to the inline editor template.
53717
- * ```typescript
53718
- * let inlineEditorTemplate = this.columnGroup.inlineEditorTemplate;
53719
- * ```
53720
- *
53721
- * @memberof IgxColumnGroupComponent
53714
+ * @hidden
53722
53715
  */
53723
53716
  get inlineEditorTemplate() {
53724
53717
  return this._inlineEditorTemplate;
@@ -62929,7 +62922,10 @@ class IgxGridBaseDirective extends DisplayDensityBase {
62929
62922
  return this._rowHeight ? this._rowHeight : this.defaultRowHeight;
62930
62923
  }
62931
62924
  set rowHeight(value) {
62932
- this._rowHeight = parseInt(value, 10);
62925
+ if (typeof value !== 'number') {
62926
+ value = parseInt(value, 10);
62927
+ }
62928
+ this._rowHeight = value;
62933
62929
  }
62934
62930
  /**
62935
62931
  * Gets/Sets the default width of the columns.
@@ -63189,10 +63185,6 @@ class IgxGridBaseDirective extends DisplayDensityBase {
63189
63185
  this.clearSort();
63190
63186
  this._sortingOptions = Object.assign(this._sortingOptions, value);
63191
63187
  }
63192
- /**
63193
- * @hidden
63194
- * @internal
63195
- */
63196
63188
  get sortingOptions() {
63197
63189
  return this._sortingOptions;
63198
63190
  }
@@ -64801,12 +64793,6 @@ class IgxGridBaseDirective extends DisplayDensityBase {
64801
64793
  get virtualizationState() {
64802
64794
  return this.verticalScrollContainer.state;
64803
64795
  }
64804
- /**
64805
- * @hidden
64806
- */
64807
- set virtualizationState(state) {
64808
- this.verticalScrollContainer.state = state;
64809
- }
64810
64796
  /**
64811
64797
  * @hidden
64812
64798
  * @internal