@progress/kendo-angular-grid 25.3.0-develop.4 → 25.3.0-develop.5

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.
@@ -3490,12 +3490,15 @@ class ColumnResizingService {
3490
3490
  zip$1(...observables)
3491
3491
  .pipe(take(1))
3492
3492
  .subscribe(widths => {
3493
- this.changes.emit({
3494
- columns: info.map(i => i.column),
3495
- type: 'autoFitComplete',
3496
- widths,
3497
- locked
3498
- });
3493
+ const allZero = widths.every((tableWidths) => tableWidths.every(w => w === 0));
3494
+ if (!allZero) {
3495
+ this.changes.emit({
3496
+ columns: info.map(i => i.column),
3497
+ type: 'autoFitComplete',
3498
+ widths,
3499
+ locked
3500
+ });
3501
+ }
3499
3502
  if (onComplete) {
3500
3503
  onComplete();
3501
3504
  }
@@ -25197,8 +25200,8 @@ const packageMetadata = {
25197
25200
  productName: 'Kendo UI for Angular',
25198
25201
  productCode: 'KENDOUIANGULAR',
25199
25202
  productCodes: ['KENDOUIANGULAR'],
25200
- publishDate: 1790926291,
25201
- version: '25.3.0-develop.4',
25203
+ publishDate: 1790942299,
25204
+ version: '25.3.0-develop.5',
25202
25205
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
25203
25206
  };
25204
25207
 
@@ -37243,6 +37246,7 @@ class GridComponent {
37243
37246
  selectionSubscription;
37244
37247
  stateChangeSubscription;
37245
37248
  groupExpandCollapseSubscription;
37249
+ autoSizeVisibilityObserver;
37246
37250
  editServiceSubscription;
37247
37251
  detailsServiceSubscription;
37248
37252
  filterSubscription;
@@ -37598,6 +37602,10 @@ class GridComponent {
37598
37602
  if (this.selectionSubscription) {
37599
37603
  this.selectionSubscription.unsubscribe();
37600
37604
  }
37605
+ if (this.autoSizeVisibilityObserver) {
37606
+ this.autoSizeVisibilityObserver.disconnect();
37607
+ this.autoSizeVisibilityObserver = null;
37608
+ }
37601
37609
  if (this.rowReorderSubscription) {
37602
37610
  this.rowReorderSubscription.unsubscribe();
37603
37611
  }
@@ -38711,9 +38719,44 @@ class GridComponent {
38711
38719
  }
38712
38720
  applyAutoSize() {
38713
38721
  const cols = this.columns.filter((c) => this.autoSize ? c.autoSize !== false : c.autoSize);
38714
- if (cols.length > 0) {
38715
- this.ngZone.onStable.pipe(take(1)).subscribe(() => this.autoFitColumns(cols));
38722
+ if (cols.length === 0) {
38723
+ return;
38724
+ }
38725
+ const element = this.wrapper.nativeElement;
38726
+ const tryAutoFit = () => {
38727
+ if (element.offsetWidth === 0 || !this.hasRenderedDataRows()) {
38728
+ return false;
38729
+ }
38730
+ this.autoFitColumns(cols);
38731
+ return true;
38732
+ };
38733
+ this.ngZone.onStable.pipe(take(1)).subscribe(() => {
38734
+ if (tryAutoFit()) {
38735
+ return;
38736
+ }
38737
+ if (!(isDocumentAvailable() && typeof ResizeObserver !== 'undefined')) {
38738
+ return;
38739
+ }
38740
+ this.ngZone.runOutsideAngular(() => {
38741
+ this.autoSizeVisibilityObserver = new ResizeObserver(() => {
38742
+ this.ngZone.run(() => {
38743
+ if (tryAutoFit()) {
38744
+ this.autoSizeVisibilityObserver?.disconnect();
38745
+ this.autoSizeVisibilityObserver = null;
38746
+ }
38747
+ });
38748
+ });
38749
+ this.autoSizeVisibilityObserver.observe(element);
38750
+ });
38751
+ });
38752
+ }
38753
+ hasRenderedDataRows() {
38754
+ const element = this.wrapper?.nativeElement;
38755
+ if (!element) {
38756
+ return false;
38716
38757
  }
38758
+ const dataRowSelector = 'tbody > tr:not(.k-grouping-row):not(.k-group-footer):not(.k-detail-row):not(.k-grid-norecords)';
38759
+ return !!element.querySelector(dataRowSelector);
38717
38760
  }
38718
38761
  onColumnRangeChange(range) {
38719
38762
  const viewportColumns = this.viewportColumns = [];
package/index.d.ts CHANGED
@@ -6031,6 +6031,7 @@ declare class GridComponent implements AfterContentInit, AfterViewInit, OnDestro
6031
6031
  private selectionSubscription;
6032
6032
  private stateChangeSubscription;
6033
6033
  private groupExpandCollapseSubscription;
6034
+ private autoSizeVisibilityObserver;
6034
6035
  private editServiceSubscription;
6035
6036
  private detailsServiceSubscription;
6036
6037
  private filterSubscription;
@@ -6392,6 +6393,7 @@ declare class GridComponent implements AfterContentInit, AfterViewInit, OnDestro
6392
6393
  private _rowClass;
6393
6394
  private navigationMetadata;
6394
6395
  private applyAutoSize;
6396
+ private hasRenderedDataRows;
6395
6397
  private onColumnRangeChange;
6396
6398
  private toggleDetailRowLegacy;
6397
6399
  private toggleGroupRowLegacy;
@@ -7,7 +7,7 @@ export const packageMetadata = {
7
7
  "productCodes": [
8
8
  "KENDOUIANGULAR"
9
9
  ],
10
- "publishDate": 1790926291,
11
- "version": "25.3.0-develop.4",
10
+ "publishDate": 1790942299,
11
+ "version": "25.3.0-develop.5",
12
12
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
13
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-grid",
3
- "version": "25.3.0-develop.4",
3
+ "version": "25.3.0-develop.5",
4
4
  "description": "Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -101,7 +101,7 @@
101
101
  "package": {
102
102
  "productName": "Kendo UI for Angular",
103
103
  "productCode": "KENDOUIANGULAR",
104
- "publishDate": 1790926291,
104
+ "publishDate": 1790942299,
105
105
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
106
106
  }
107
107
  },
@@ -114,32 +114,32 @@
114
114
  "@progress/kendo-data-query": "^1.7.3",
115
115
  "@progress/kendo-drawing": "^1.25.0",
116
116
  "@progress/kendo-licensing": "^1.11.0",
117
- "@progress/kendo-angular-buttons": "25.3.0-develop.4",
118
- "@progress/kendo-angular-common": "25.3.0-develop.4",
119
- "@progress/kendo-angular-dateinputs": "25.3.0-develop.4",
120
- "@progress/kendo-angular-layout": "25.3.0-develop.4",
121
- "@progress/kendo-angular-navigation": "25.3.0-develop.4",
122
- "@progress/kendo-angular-dropdowns": "25.3.0-develop.4",
123
- "@progress/kendo-angular-excel-export": "25.3.0-develop.4",
124
- "@progress/kendo-angular-icons": "25.3.0-develop.4",
125
- "@progress/kendo-angular-indicators": "25.3.0-develop.4",
126
- "@progress/kendo-angular-inputs": "25.3.0-develop.4",
127
- "@progress/kendo-angular-conversational-ui": "25.3.0-develop.4",
128
- "@progress/kendo-angular-intl": "25.3.0-develop.4",
129
- "@progress/kendo-angular-l10n": "25.3.0-develop.4",
130
- "@progress/kendo-angular-label": "25.3.0-develop.4",
131
- "@progress/kendo-angular-menu": "25.3.0-develop.4",
132
- "@progress/kendo-angular-pager": "25.3.0-develop.4",
133
- "@progress/kendo-angular-pdf-export": "25.3.0-develop.4",
134
- "@progress/kendo-angular-popup": "25.3.0-develop.4",
135
- "@progress/kendo-angular-toolbar": "25.3.0-develop.4",
136
- "@progress/kendo-angular-upload": "25.3.0-develop.4",
137
- "@progress/kendo-angular-utils": "25.3.0-develop.4",
117
+ "@progress/kendo-angular-buttons": "25.3.0-develop.5",
118
+ "@progress/kendo-angular-common": "25.3.0-develop.5",
119
+ "@progress/kendo-angular-dateinputs": "25.3.0-develop.5",
120
+ "@progress/kendo-angular-layout": "25.3.0-develop.5",
121
+ "@progress/kendo-angular-navigation": "25.3.0-develop.5",
122
+ "@progress/kendo-angular-dropdowns": "25.3.0-develop.5",
123
+ "@progress/kendo-angular-excel-export": "25.3.0-develop.5",
124
+ "@progress/kendo-angular-icons": "25.3.0-develop.5",
125
+ "@progress/kendo-angular-indicators": "25.3.0-develop.5",
126
+ "@progress/kendo-angular-inputs": "25.3.0-develop.5",
127
+ "@progress/kendo-angular-conversational-ui": "25.3.0-develop.5",
128
+ "@progress/kendo-angular-intl": "25.3.0-develop.5",
129
+ "@progress/kendo-angular-l10n": "25.3.0-develop.5",
130
+ "@progress/kendo-angular-label": "25.3.0-develop.5",
131
+ "@progress/kendo-angular-menu": "25.3.0-develop.5",
132
+ "@progress/kendo-angular-pager": "25.3.0-develop.5",
133
+ "@progress/kendo-angular-pdf-export": "25.3.0-develop.5",
134
+ "@progress/kendo-angular-popup": "25.3.0-develop.5",
135
+ "@progress/kendo-angular-toolbar": "25.3.0-develop.5",
136
+ "@progress/kendo-angular-upload": "25.3.0-develop.5",
137
+ "@progress/kendo-angular-utils": "25.3.0-develop.5",
138
138
  "rxjs": "^6.5.3 || ^7.0.0"
139
139
  },
140
140
  "dependencies": {
141
141
  "tslib": "^2.3.1",
142
- "@progress/kendo-angular-schematics": "25.3.0-develop.4",
142
+ "@progress/kendo-angular-schematics": "25.3.0-develop.5",
143
143
  "@progress/kendo-common": "^1.0.1",
144
144
  "@progress/kendo-file-saver": "^1.0.0",
145
145
  "@progress/kendo-csv": "^1.0.0"
@@ -9,19 +9,19 @@ const schematics_1 = require("@angular-devkit/schematics");
9
9
  function default_1(options) {
10
10
  const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'GridModule', package: 'grid', peerDependencies: {
11
11
  // peer deps of the dropdowns
12
- '@progress/kendo-angular-treeview': '25.3.0-develop.4',
13
- '@progress/kendo-angular-navigation': '25.3.0-develop.4',
12
+ '@progress/kendo-angular-treeview': '25.3.0-develop.5',
13
+ '@progress/kendo-angular-navigation': '25.3.0-develop.5',
14
14
  // peer dependency of kendo-angular-inputs
15
- '@progress/kendo-angular-dialog': '25.3.0-develop.4',
15
+ '@progress/kendo-angular-dialog': '25.3.0-develop.5',
16
16
  // peer dependency of kendo-angular-icons
17
17
  '@progress/kendo-svg-icons': '^4.0.0',
18
18
  // peer dependency of kendo-angular-layout
19
- '@progress/kendo-angular-progressbar': '25.3.0-develop.4',
19
+ '@progress/kendo-angular-progressbar': '25.3.0-develop.5',
20
20
  // transitive peer dependencies from toolbar
21
- '@progress/kendo-angular-indicators': '25.3.0-develop.4',
21
+ '@progress/kendo-angular-indicators': '25.3.0-develop.5',
22
22
  // transitive peer dependencies from conversational-ui
23
- '@progress/kendo-angular-menu': '25.3.0-develop.4',
24
- '@progress/kendo-angular-upload': '25.3.0-develop.4'
23
+ '@progress/kendo-angular-menu': '25.3.0-develop.5',
24
+ '@progress/kendo-angular-upload': '25.3.0-develop.5'
25
25
  } });
26
26
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
27
27
  }