@progress/kendo-angular-treelist 21.4.0-develop.1 → 21.4.0-develop.10

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.
@@ -124,5 +124,10 @@ export declare class ViewCollection {
124
124
  resetItem(item: any, resetChildren: boolean): void;
125
125
  clear(): void;
126
126
  loadData(): void;
127
+ /**
128
+ * @hidden
129
+ * Returns all data nodes from the TreeList, recursively collecting items from all hierarchy levels.
130
+ */
131
+ get flatData(): Array<any>;
127
132
  private unsubscribeChildren;
128
133
  }
@@ -5,6 +5,7 @@
5
5
  import { isObservable, Subscription, BehaviorSubject } from 'rxjs';
6
6
  import { take } from 'rxjs/operators';
7
7
  import { EventEmitter } from '@angular/core';
8
+ import { isArray } from '../utils';
8
9
  /**
9
10
  * @hidden
10
11
  */
@@ -458,6 +459,40 @@ export class ViewCollection {
458
459
  this.dataLoaded.emit();
459
460
  }
460
461
  }
462
+ /**
463
+ * @hidden
464
+ * Returns all data nodes from the TreeList, recursively collecting items from all hierarchy levels.
465
+ */
466
+ get flatData() {
467
+ const result = [];
468
+ const options = this.fieldAccessor();
469
+ const fetchChildren = options.fetchChildren;
470
+ const toProcess = [...(isArray(options.data) ? options.data : options.data?.data || [])];
471
+ while (toProcess.length) {
472
+ const current = toProcess.shift();
473
+ result.push(current);
474
+ const id = options.idGetter(current);
475
+ if (this.loaded.has(id)) {
476
+ const children = this.loaded.get(id);
477
+ if (children !== LOADING) {
478
+ const childData = children?.data || children;
479
+ if (childData?.length) {
480
+ toProcess.unshift(...childData);
481
+ }
482
+ }
483
+ }
484
+ else if (fetchChildren) {
485
+ const children = fetchChildren(current);
486
+ if (children && !isObservable(children)) {
487
+ const childData = children?.data || children;
488
+ if (childData?.length) {
489
+ toProcess.unshift(...childData);
490
+ }
491
+ }
492
+ }
493
+ }
494
+ return result;
495
+ }
461
496
  unsubscribeChildren() {
462
497
  if (this.childrenSubscription) {
463
498
  this.childrenSubscription.unsubscribe();
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1765536417,
14
- version: '21.4.0-develop.1',
13
+ publishDate: 1766140387,
14
+ version: '21.4.0-develop.10',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -615,6 +615,7 @@ export class ListComponent {
615
615
  class="k-grid-content k-virtual-content"
616
616
  [kendoTreeListResizableContainer]="lockedLeafColumns.length > 0"
617
617
  [lockedWidth]="lockedWidth + 1"
618
+ tabindex="-1"
618
619
  >
619
620
  <div role="presentation">
620
621
  <table
@@ -731,6 +732,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
731
732
  class="k-grid-content k-virtual-content"
732
733
  [kendoTreeListResizableContainer]="lockedLeafColumns.length > 0"
733
734
  [lockedWidth]="lockedWidth + 1"
735
+ tabindex="-1"
734
736
  >
735
737
  <div role="presentation">
736
738
  <table
@@ -68,7 +68,7 @@ export class SelectableDirective {
68
68
  this._selectedItems = value;
69
69
  const currentValue = value || [];
70
70
  const previousState = this.selectionService.selectAllCheckedState;
71
- if (currentValue.length > 0 && currentValue.length === this.treelist.view.total) {
71
+ if (currentValue.length > 0 && currentValue.length >= this.treelist.view.flatData.length) {
72
72
  this.selectionService.selectAllCheckedState = true;
73
73
  }
74
74
  else if (currentValue.length === 0) {
@@ -199,6 +199,8 @@ export class SelectionService {
199
199
  dataItem: item.data
200
200
  }));
201
201
  this.changes.next(new SelectionChangeEvent(select ? 'add' : 'remove', selectedItems));
202
+ this.selectAllCheckedState = select;
203
+ this.selectAllCheckedStateChange.next(select);
202
204
  });
203
205
  }
204
206
  selectRange(firstPoint, secondPoint) {
@@ -49,8 +49,8 @@ const packageMetadata = {
49
49
  productName: 'Kendo UI for Angular',
50
50
  productCode: 'KENDOUIANGULAR',
51
51
  productCodes: ['KENDOUIANGULAR'],
52
- publishDate: 1765536417,
53
- version: '21.4.0-develop.1',
52
+ publishDate: 1766140387,
53
+ version: '21.4.0-develop.10',
54
54
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
55
55
  };
56
56
 
@@ -1815,6 +1815,40 @@ class ViewCollection {
1815
1815
  this.dataLoaded.emit();
1816
1816
  }
1817
1817
  }
1818
+ /**
1819
+ * @hidden
1820
+ * Returns all data nodes from the TreeList, recursively collecting items from all hierarchy levels.
1821
+ */
1822
+ get flatData() {
1823
+ const result = [];
1824
+ const options = this.fieldAccessor();
1825
+ const fetchChildren = options.fetchChildren;
1826
+ const toProcess = [...(isArray(options.data) ? options.data : options.data?.data || [])];
1827
+ while (toProcess.length) {
1828
+ const current = toProcess.shift();
1829
+ result.push(current);
1830
+ const id = options.idGetter(current);
1831
+ if (this.loaded.has(id)) {
1832
+ const children = this.loaded.get(id);
1833
+ if (children !== LOADING) {
1834
+ const childData = children?.data || children;
1835
+ if (childData?.length) {
1836
+ toProcess.unshift(...childData);
1837
+ }
1838
+ }
1839
+ }
1840
+ else if (fetchChildren) {
1841
+ const children = fetchChildren(current);
1842
+ if (children && !isObservable(children)) {
1843
+ const childData = children?.data || children;
1844
+ if (childData?.length) {
1845
+ toProcess.unshift(...childData);
1846
+ }
1847
+ }
1848
+ }
1849
+ }
1850
+ return result;
1851
+ }
1818
1852
  unsubscribeChildren() {
1819
1853
  if (this.childrenSubscription) {
1820
1854
  this.childrenSubscription.unsubscribe();
@@ -4451,6 +4485,8 @@ class SelectionService {
4451
4485
  dataItem: item.data
4452
4486
  }));
4453
4487
  this.changes.next(new SelectionChangeEvent(select ? 'add' : 'remove', selectedItems));
4488
+ this.selectAllCheckedState = select;
4489
+ this.selectAllCheckedStateChange.next(select);
4454
4490
  });
4455
4491
  }
4456
4492
  selectRange(firstPoint, secondPoint) {
@@ -8469,6 +8505,7 @@ class ListComponent {
8469
8505
  class="k-grid-content k-virtual-content"
8470
8506
  [kendoTreeListResizableContainer]="lockedLeafColumns.length > 0"
8471
8507
  [lockedWidth]="lockedWidth + 1"
8508
+ tabindex="-1"
8472
8509
  >
8473
8510
  <div role="presentation">
8474
8511
  <table
@@ -8585,6 +8622,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
8585
8622
  class="k-grid-content k-virtual-content"
8586
8623
  [kendoTreeListResizableContainer]="lockedLeafColumns.length > 0"
8587
8624
  [lockedWidth]="lockedWidth + 1"
8625
+ tabindex="-1"
8588
8626
  >
8589
8627
  <div role="presentation">
8590
8628
  <table
@@ -20921,7 +20959,7 @@ class SelectableDirective {
20921
20959
  this._selectedItems = value;
20922
20960
  const currentValue = value || [];
20923
20961
  const previousState = this.selectionService.selectAllCheckedState;
20924
- if (currentValue.length > 0 && currentValue.length === this.treelist.view.total) {
20962
+ if (currentValue.length > 0 && currentValue.length >= this.treelist.view.flatData.length) {
20925
20963
  this.selectionService.selectAllCheckedState = true;
20926
20964
  }
20927
20965
  else if (currentValue.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-treelist",
3
- "version": "21.4.0-develop.1",
3
+ "version": "21.4.0-develop.10",
4
4
  "description": "Kendo UI TreeList for Angular - Display hierarchical data in an Angular tree grid view that supports sorting, filtering, paging, and much more.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -24,7 +24,7 @@
24
24
  "package": {
25
25
  "productName": "Kendo UI for Angular",
26
26
  "productCode": "KENDOUIANGULAR",
27
- "publishDate": 1765536417,
27
+ "publishDate": 1766140387,
28
28
  "licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
29
29
  }
30
30
  },
@@ -37,26 +37,26 @@
37
37
  "@progress/kendo-data-query": "^1.0.0",
38
38
  "@progress/kendo-drawing": "^1.23.1",
39
39
  "@progress/kendo-licensing": "^1.7.0",
40
- "@progress/kendo-angular-buttons": "21.4.0-develop.1",
41
- "@progress/kendo-angular-common": "21.4.0-develop.1",
42
- "@progress/kendo-angular-dateinputs": "21.4.0-develop.1",
43
- "@progress/kendo-angular-dropdowns": "21.4.0-develop.1",
44
- "@progress/kendo-angular-excel-export": "21.4.0-develop.1",
45
- "@progress/kendo-angular-icons": "21.4.0-develop.1",
46
- "@progress/kendo-angular-inputs": "21.4.0-develop.1",
47
- "@progress/kendo-angular-intl": "21.4.0-develop.1",
48
- "@progress/kendo-angular-l10n": "21.4.0-develop.1",
49
- "@progress/kendo-angular-label": "21.4.0-develop.1",
50
- "@progress/kendo-angular-pager": "21.4.0-develop.1",
51
- "@progress/kendo-angular-pdf-export": "21.4.0-develop.1",
52
- "@progress/kendo-angular-popup": "21.4.0-develop.1",
53
- "@progress/kendo-angular-toolbar": "21.4.0-develop.1",
54
- "@progress/kendo-angular-utils": "21.4.0-develop.1",
40
+ "@progress/kendo-angular-buttons": "21.4.0-develop.10",
41
+ "@progress/kendo-angular-common": "21.4.0-develop.10",
42
+ "@progress/kendo-angular-dateinputs": "21.4.0-develop.10",
43
+ "@progress/kendo-angular-dropdowns": "21.4.0-develop.10",
44
+ "@progress/kendo-angular-excel-export": "21.4.0-develop.10",
45
+ "@progress/kendo-angular-icons": "21.4.0-develop.10",
46
+ "@progress/kendo-angular-inputs": "21.4.0-develop.10",
47
+ "@progress/kendo-angular-intl": "21.4.0-develop.10",
48
+ "@progress/kendo-angular-l10n": "21.4.0-develop.10",
49
+ "@progress/kendo-angular-label": "21.4.0-develop.10",
50
+ "@progress/kendo-angular-pager": "21.4.0-develop.10",
51
+ "@progress/kendo-angular-pdf-export": "21.4.0-develop.10",
52
+ "@progress/kendo-angular-popup": "21.4.0-develop.10",
53
+ "@progress/kendo-angular-toolbar": "21.4.0-develop.10",
54
+ "@progress/kendo-angular-utils": "21.4.0-develop.10",
55
55
  "rxjs": "^6.5.3 || ^7.0.0"
56
56
  },
57
57
  "dependencies": {
58
58
  "tslib": "^2.3.1",
59
- "@progress/kendo-angular-schematics": "21.4.0-develop.1",
59
+ "@progress/kendo-angular-schematics": "21.4.0-develop.10",
60
60
  "@progress/kendo-common": "^1.0.1",
61
61
  "@progress/kendo-file-saver": "^1.0.0"
62
62
  },
@@ -9,13 +9,13 @@ const schematics_1 = require("@angular-devkit/schematics");
9
9
  function default_1(options) {
10
10
  const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'TreeListModule', package: 'treelist', peerDependencies: {
11
11
  // peer dep of the dropdowns
12
- '@progress/kendo-angular-treeview': '21.4.0-develop.1',
12
+ '@progress/kendo-angular-treeview': '21.4.0-develop.10',
13
13
  // peer dependency of kendo-angular-inputs
14
- '@progress/kendo-angular-dialog': '21.4.0-develop.1',
14
+ '@progress/kendo-angular-dialog': '21.4.0-develop.10',
15
15
  // peer dependency of kendo-angular-icons
16
16
  '@progress/kendo-svg-icons': '^4.0.0',
17
17
  // peer dependency of kendo-angular-dateinputs
18
- '@progress/kendo-angular-navigation': '21.4.0-develop.1',
18
+ '@progress/kendo-angular-navigation': '21.4.0-develop.10',
19
19
  } });
20
20
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
21
21
  }