@progress/kendo-angular-treelist 17.0.2-develop.1 → 17.0.2-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.
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-treelist',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1731579410,
13
- version: '17.0.2-develop.1',
12
+ publishDate: 1731944159,
13
+ version: '17.0.2-develop.10',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -36,6 +36,7 @@ import { FilterMenuComponent } from '../../filtering/menu/filter-menu.component'
36
36
  import { LogicalCellDirective } from '../../navigation/logical-cell.directive';
37
37
  import { LogicalRowDirective } from '../../navigation/logical-row.directive';
38
38
  import { CheckBoxComponent } from '@progress/kendo-angular-inputs';
39
+ import { TreeListSelectAllCheckboxDirective } from './select-all-checkbox.directive';
39
40
  import * as i0 from "@angular/core";
40
41
  import * as i1 from "../../common/single-popup.service";
41
42
  import * as i2 from "../../dragdrop/drag-hint.service";
@@ -469,6 +470,7 @@ export class HeaderComponent {
469
470
  <kendo-checkbox
470
471
  [inputAttributes]="{'aria-label': messageFor('selectAllRowsCheckboxLabel')}"
471
472
  kendoTreeListFocusable
473
+ kendoTreeListSelectAllCheckbox
472
474
  (checkedStateChange)="selectAllChange($event)"
473
475
  ></kendo-checkbox>
474
476
  </ng-template>
@@ -543,7 +545,7 @@ export class HeaderComponent {
543
545
  [logicalSlaveCellsCount]="unlockedColumnsCount"
544
546
  >
545
547
  </tr>
546
- `, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: LogicalRowDirective, selector: "[kendoTreeListLogicalRow]", inputs: ["logicalRowIndex", "logicalSlaveRow", "logicalCellsCount", "logicalSlaveCellsCount", "dataRowIndex", "dataItem", "isNew", "totalColumns"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: LogicalCellDirective, selector: "[kendoTreeListLogicalCell]", inputs: ["logicalColIndex", "logicalRowIndex", "logicalSlaveCell", "column", "colIndex", "colSpan", "rowSpan", "dataRowIndex", "dataItem", "expandable"] }, { kind: "directive", type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["context"], outputs: ["enter", "leave", "drop"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: DraggableColumnDirective, selector: "[kendoDraggableColumn]", inputs: ["context", "enableDrag"], outputs: ["drag"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: FilterMenuComponent, selector: "kendo-treelist-filter-menu", inputs: ["column", "filter"] }, { kind: "component", type: ColumnMenuComponent, selector: "kendo-treelist-column-menu", inputs: ["standalone", "column", "settings", "sort", "filter", "sortable", "columnMenuTemplate"] }, { kind: "directive", type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: FocusableDirective, selector: "[kendoTreeListFocusable],\n [kendoTreeListAddCommand],\n [kendoTreeListEditCommand],\n [kendoTreeListRemoveCommand],\n [kendoTreeListSaveCommand],\n [kendoTreeListCancelCommand]\n ", inputs: ["kendoTreeListFocusable", "enabled", "kendoTreeListAddCommand", "kendoTreeListEditCommand", "kendoTreeListRemoveCommand", "kendoTreeListSaveCommand", "kendoTreeListCancelCommand"] }, { kind: "directive", type: ColumnHandleDirective, selector: "[kendoTreeListColumnHandle]", inputs: ["columns", "column"] }, { kind: "component", type: FilterRowComponent, selector: "[kendoTreeListFilterRow]", inputs: ["columns", "filter", "logicalRowIndex", "lockedColumnsCount"] }, { kind: "component", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }] });
548
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: LogicalRowDirective, selector: "[kendoTreeListLogicalRow]", inputs: ["logicalRowIndex", "logicalSlaveRow", "logicalCellsCount", "logicalSlaveCellsCount", "dataRowIndex", "dataItem", "isNew", "totalColumns"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: LogicalCellDirective, selector: "[kendoTreeListLogicalCell]", inputs: ["logicalColIndex", "logicalRowIndex", "logicalSlaveCell", "column", "colIndex", "colSpan", "rowSpan", "dataRowIndex", "dataItem", "expandable"] }, { kind: "directive", type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["context"], outputs: ["enter", "leave", "drop"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: DraggableColumnDirective, selector: "[kendoDraggableColumn]", inputs: ["context", "enableDrag"], outputs: ["drag"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: FilterMenuComponent, selector: "kendo-treelist-filter-menu", inputs: ["column", "filter"] }, { kind: "component", type: ColumnMenuComponent, selector: "kendo-treelist-column-menu", inputs: ["standalone", "column", "settings", "sort", "filter", "sortable", "columnMenuTemplate"] }, { kind: "directive", type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: FocusableDirective, selector: "[kendoTreeListFocusable],\n [kendoTreeListAddCommand],\n [kendoTreeListEditCommand],\n [kendoTreeListRemoveCommand],\n [kendoTreeListSaveCommand],\n [kendoTreeListCancelCommand]\n ", inputs: ["kendoTreeListFocusable", "enabled", "kendoTreeListAddCommand", "kendoTreeListEditCommand", "kendoTreeListRemoveCommand", "kendoTreeListSaveCommand", "kendoTreeListCancelCommand"] }, { kind: "directive", type: ColumnHandleDirective, selector: "[kendoTreeListColumnHandle]", inputs: ["columns", "column"] }, { kind: "component", type: FilterRowComponent, selector: "[kendoTreeListFilterRow]", inputs: ["columns", "filter", "logicalRowIndex", "lockedColumnsCount"] }, { kind: "component", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }, { kind: "directive", type: TreeListSelectAllCheckboxDirective, selector: "[kendoTreeListSelectAllCheckbox]" }] });
547
549
  }
548
550
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HeaderComponent, decorators: [{
549
551
  type: Component,
@@ -656,6 +658,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
656
658
  <kendo-checkbox
657
659
  [inputAttributes]="{'aria-label': messageFor('selectAllRowsCheckboxLabel')}"
658
660
  kendoTreeListFocusable
661
+ kendoTreeListSelectAllCheckbox
659
662
  (checkedStateChange)="selectAllChange($event)"
660
663
  ></kendo-checkbox>
661
664
  </ng-template>
@@ -732,7 +735,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
732
735
  </tr>
733
736
  `,
734
737
  standalone: true,
735
- imports: [NgFor, LogicalRowDirective, NgIf, LogicalCellDirective, DropTargetDirective, DraggableDirective, DraggableColumnDirective, NgClass, NgStyle, FilterMenuComponent, ColumnMenuComponent, TemplateContextDirective, IconWrapperComponent, FocusableDirective, ColumnHandleDirective, FilterRowComponent, CheckBoxComponent]
738
+ imports: [NgFor, LogicalRowDirective, NgIf, LogicalCellDirective, DropTargetDirective, DraggableDirective, DraggableColumnDirective, NgClass, NgStyle,
739
+ FilterMenuComponent, ColumnMenuComponent, TemplateContextDirective, IconWrapperComponent, FocusableDirective, ColumnHandleDirective, FilterRowComponent,
740
+ CheckBoxComponent, TreeListSelectAllCheckboxDirective]
736
741
  }]
737
742
  }], ctorParameters: function () { return [{ type: i1.SinglePopupService }, { type: i2.DragHintService }, { type: i3.DropCueService }, { type: i4.ColumnReorderService }, { type: i5.SortService }, { type: i6.SelectionService }, { type: i7.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { totalColumnLevels: [{
738
743
  type: Input
@@ -0,0 +1,76 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { ChangeDetectorRef, Directive, ElementRef, Renderer2 } from '@angular/core';
6
+ import { CheckBoxComponent } from '@progress/kendo-angular-inputs';
7
+ import { SelectionService } from '../../selection/selection.service';
8
+ import { Subscription } from 'rxjs';
9
+ import { isPresent } from '@progress/kendo-angular-common';
10
+ import { ViewCollection } from '../../data/data.collection';
11
+ import * as i0 from "@angular/core";
12
+ import * as i1 from "@progress/kendo-angular-inputs";
13
+ import * as i2 from "../../selection/selection.service";
14
+ /**
15
+ * @hidden
16
+ */
17
+ export class TreeListSelectAllCheckboxDirective {
18
+ sub = new Subscription();
19
+ setState = true;
20
+ constructor(host, hostEl, selectionService, cdr, renderer) {
21
+ this.sub = selectionService.changes.subscribe(eventData => {
22
+ // omit setting the state when the selection change comes from clicking the checkbox, and clear the flag
23
+ if (!this.setState) {
24
+ this.setState = true;
25
+ return;
26
+ }
27
+ const view = eventData.sender.view;
28
+ let total;
29
+ ViewCollection.loadView({
30
+ fields: Object.assign({}, view.fieldAccessor(), {
31
+ hasFooter: false,
32
+ pageable: false,
33
+ isVirtual: false
34
+ }),
35
+ loaded: view.loaded,
36
+ selectionState: view.selectionState
37
+ }).subscribe(view => {
38
+ if (!view) {
39
+ return;
40
+ }
41
+ total = view.data.length;
42
+ });
43
+ const allSelected = total === selectionService.state.length;
44
+ const noneSelected = selectionService.state.length === 0;
45
+ const someSelected = !noneSelected && !allSelected;
46
+ if (allSelected && host.checkedState !== true) {
47
+ host.checkedState = true;
48
+ }
49
+ else if (someSelected && host.checkedState !== 'indeterminate') {
50
+ host.checkedState = 'indeterminate';
51
+ }
52
+ else if (noneSelected && host.checkedState !== false) {
53
+ host.checkedState = false;
54
+ }
55
+ cdr.detectChanges();
56
+ });
57
+ // set flag for conditional checkbox state logic
58
+ ['pointerdown', 'keydown'].forEach(eventName => this.sub.add(renderer.listen(hostEl.nativeElement, eventName, (e) => {
59
+ const isSpace = e.key && e.key === ' ';
60
+ const spaceOrPointer = !isPresent(e.key) || isSpace;
61
+ spaceOrPointer && (this.setState = false);
62
+ })));
63
+ }
64
+ ngOnDestroy() {
65
+ this.sub && this.sub.unsubscribe();
66
+ }
67
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeListSelectAllCheckboxDirective, deps: [{ token: i1.CheckBoxComponent }, { token: i0.ElementRef }, { token: i2.SelectionService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
68
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TreeListSelectAllCheckboxDirective, isStandalone: true, selector: "[kendoTreeListSelectAllCheckbox]", ngImport: i0 });
69
+ }
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeListSelectAllCheckboxDirective, decorators: [{
71
+ type: Directive,
72
+ args: [{
73
+ selector: '[kendoTreeListSelectAllCheckbox]',
74
+ standalone: true
75
+ }]
76
+ }], ctorParameters: function () { return [{ type: i1.CheckBoxComponent }, { type: i0.ElementRef }, { type: i2.SelectionService }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; } });
@@ -7,14 +7,17 @@ import { TreeListComponent } from '../treelist.component';
7
7
  import { getter } from '@progress/kendo-common';
8
8
  import { isString } from '../utils';
9
9
  import { createState, RowSelectionState } from './selection-state';
10
+ import { SelectionService } from './selection.service';
10
11
  import * as i0 from "@angular/core";
11
12
  import * as i1 from "../treelist.component";
13
+ import * as i2 from "./selection.service";
12
14
  const defaultColumnKeyGetter = (_column, columnIndex) => columnIndex;
13
15
  /**
14
16
  * A directive which controls the selection state. [See example](slug:selection_treelist).
15
17
  */
16
18
  export class SelectableDirective {
17
19
  treelist;
20
+ selectionService;
18
21
  /**
19
22
  * @hidden
20
23
  */
@@ -91,8 +94,9 @@ export class SelectableDirective {
91
94
  _columnKeyGetter;
92
95
  _keyGetter;
93
96
  _selectedItems = [];
94
- constructor(treelist) {
97
+ constructor(treelist, selectionService) {
95
98
  this.treelist = treelist;
99
+ this.selectionService = selectionService;
96
100
  this.cellSelected = this.cellSelected.bind(this);
97
101
  this.rowSelected = this.rowSelected.bind(this);
98
102
  this.selectionChange = this.selectionChange.bind(this);
@@ -131,7 +135,7 @@ export class SelectableDirective {
131
135
  this.emitSelectedItemsChange();
132
136
  }
133
137
  emitSelectedItemsChange() {
134
- this.lastChange = this.state.toArray();
138
+ this.selectionService.state = this.lastChange = this.state.toArray();
135
139
  this.selectedItemsChange.emit(this.lastChange);
136
140
  }
137
141
  subscribeSelection() {
@@ -170,7 +174,7 @@ export class SelectableDirective {
170
174
  get leafColumns() {
171
175
  return this.treelist.lockedLeafColumns.toArray().concat(this.treelist.nonLockedLeafColumns.toArray());
172
176
  }
173
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectableDirective, deps: [{ token: i1.TreeListComponent }], target: i0.ɵɵFactoryTarget.Directive });
177
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectableDirective, deps: [{ token: i1.TreeListComponent }, { token: i2.SelectionService }], target: i0.ɵɵFactoryTarget.Directive });
174
178
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: SelectableDirective, isStandalone: true, selector: "[kendoTreeListSelectable]", inputs: { selectable: "selectable", selectedItems: "selectedItems", itemKey: "itemKey", columnKey: "columnKey" }, outputs: { selectedItemsChange: "selectedItemsChange" }, exportAs: ["kendoTreeListSelectable"], ngImport: i0 });
175
179
  }
176
180
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectableDirective, decorators: [{
@@ -180,7 +184,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
180
184
  selector: '[kendoTreeListSelectable]',
181
185
  standalone: true
182
186
  }]
183
- }], ctorParameters: function () { return [{ type: i1.TreeListComponent }]; }, propDecorators: { selectable: [{
187
+ }], ctorParameters: function () { return [{ type: i1.TreeListComponent }, { type: i2.SelectionService }]; }, propDecorators: { selectable: [{
184
188
  type: Input
185
189
  }], selectedItems: [{
186
190
  type: Input
@@ -18,6 +18,7 @@ const noop = () => false;
18
18
  */
19
19
  export class SelectionService {
20
20
  changes = new Subject();
21
+ state = [];
21
22
  set settings(value) {
22
23
  if (typeof value === 'object') {
23
24
  this._settings = value;
@@ -27,6 +27,7 @@ import { plusIcon, cancelIcon, lockIcon, unlockIcon, insertMiddleIcon, caretAltD
27
27
  import * as i95 from '@progress/kendo-angular-pager';
28
28
  import { PagerContextService, PagerNavigationService, PagerTemplateDirective, KENDO_PAGER } from '@progress/kendo-angular-pager';
29
29
  import { getter, setter } from '@progress/kendo-common';
30
+ import * as i1$5 from '@progress/kendo-angular-inputs';
30
31
  import { NumericTextBoxComponent, CheckBoxComponent, TextBoxComponent, RadioButtonComponent } from '@progress/kendo-angular-inputs';
31
32
  import * as i1$3 from '@progress/kendo-angular-intl';
32
33
  import { DropDownListComponent, AutoCompleteComponent } from '@progress/kendo-angular-dropdowns';
@@ -45,8 +46,8 @@ const packageMetadata = {
45
46
  name: '@progress/kendo-angular-treelist',
46
47
  productName: 'Kendo UI for Angular',
47
48
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
48
- publishDate: 1731579410,
49
- version: '17.0.2-develop.1',
49
+ publishDate: 1731944159,
50
+ version: '17.0.2-develop.10',
50
51
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
51
52
  };
52
53
 
@@ -4213,6 +4214,7 @@ const noop = () => false;
4213
4214
  */
4214
4215
  class SelectionService {
4215
4216
  changes = new Subject();
4217
+ state = [];
4216
4218
  set settings(value) {
4217
4219
  if (typeof value === 'object') {
4218
4220
  this._settings = value;
@@ -13308,6 +13310,70 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
13308
13310
  type: Input
13309
13311
  }] } });
13310
13312
 
13313
+ /**
13314
+ * @hidden
13315
+ */
13316
+ class TreeListSelectAllCheckboxDirective {
13317
+ sub = new Subscription();
13318
+ setState = true;
13319
+ constructor(host, hostEl, selectionService, cdr, renderer) {
13320
+ this.sub = selectionService.changes.subscribe(eventData => {
13321
+ // omit setting the state when the selection change comes from clicking the checkbox, and clear the flag
13322
+ if (!this.setState) {
13323
+ this.setState = true;
13324
+ return;
13325
+ }
13326
+ const view = eventData.sender.view;
13327
+ let total;
13328
+ ViewCollection.loadView({
13329
+ fields: Object.assign({}, view.fieldAccessor(), {
13330
+ hasFooter: false,
13331
+ pageable: false,
13332
+ isVirtual: false
13333
+ }),
13334
+ loaded: view.loaded,
13335
+ selectionState: view.selectionState
13336
+ }).subscribe(view => {
13337
+ if (!view) {
13338
+ return;
13339
+ }
13340
+ total = view.data.length;
13341
+ });
13342
+ const allSelected = total === selectionService.state.length;
13343
+ const noneSelected = selectionService.state.length === 0;
13344
+ const someSelected = !noneSelected && !allSelected;
13345
+ if (allSelected && host.checkedState !== true) {
13346
+ host.checkedState = true;
13347
+ }
13348
+ else if (someSelected && host.checkedState !== 'indeterminate') {
13349
+ host.checkedState = 'indeterminate';
13350
+ }
13351
+ else if (noneSelected && host.checkedState !== false) {
13352
+ host.checkedState = false;
13353
+ }
13354
+ cdr.detectChanges();
13355
+ });
13356
+ // set flag for conditional checkbox state logic
13357
+ ['pointerdown', 'keydown'].forEach(eventName => this.sub.add(renderer.listen(hostEl.nativeElement, eventName, (e) => {
13358
+ const isSpace = e.key && e.key === ' ';
13359
+ const spaceOrPointer = !isPresent$1(e.key) || isSpace;
13360
+ spaceOrPointer && (this.setState = false);
13361
+ })));
13362
+ }
13363
+ ngOnDestroy() {
13364
+ this.sub && this.sub.unsubscribe();
13365
+ }
13366
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeListSelectAllCheckboxDirective, deps: [{ token: i1$5.CheckBoxComponent }, { token: i0.ElementRef }, { token: SelectionService }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
13367
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TreeListSelectAllCheckboxDirective, isStandalone: true, selector: "[kendoTreeListSelectAllCheckbox]", ngImport: i0 });
13368
+ }
13369
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeListSelectAllCheckboxDirective, decorators: [{
13370
+ type: Directive,
13371
+ args: [{
13372
+ selector: '[kendoTreeListSelectAllCheckbox]',
13373
+ standalone: true
13374
+ }]
13375
+ }], ctorParameters: function () { return [{ type: i1$5.CheckBoxComponent }, { type: i0.ElementRef }, { type: SelectionService }, { type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }]; } });
13376
+
13311
13377
  /* eslint-disable @typescript-eslint/no-explicit-any */
13312
13378
  const mergeObjects = (...args) => Object.assign.apply(null, [{}].concat(args));
13313
13379
  const directions = initialDirection => initialDirection === "asc" ? ["asc", "desc"] : ["desc", "asc"];
@@ -13734,6 +13800,7 @@ class HeaderComponent {
13734
13800
  <kendo-checkbox
13735
13801
  [inputAttributes]="{'aria-label': messageFor('selectAllRowsCheckboxLabel')}"
13736
13802
  kendoTreeListFocusable
13803
+ kendoTreeListSelectAllCheckbox
13737
13804
  (checkedStateChange)="selectAllChange($event)"
13738
13805
  ></kendo-checkbox>
13739
13806
  </ng-template>
@@ -13808,7 +13875,7 @@ class HeaderComponent {
13808
13875
  [logicalSlaveCellsCount]="unlockedColumnsCount"
13809
13876
  >
13810
13877
  </tr>
13811
- `, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: LogicalRowDirective, selector: "[kendoTreeListLogicalRow]", inputs: ["logicalRowIndex", "logicalSlaveRow", "logicalCellsCount", "logicalSlaveCellsCount", "dataRowIndex", "dataItem", "isNew", "totalColumns"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: LogicalCellDirective, selector: "[kendoTreeListLogicalCell]", inputs: ["logicalColIndex", "logicalRowIndex", "logicalSlaveCell", "column", "colIndex", "colSpan", "rowSpan", "dataRowIndex", "dataItem", "expandable"] }, { kind: "directive", type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["context"], outputs: ["enter", "leave", "drop"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: DraggableColumnDirective, selector: "[kendoDraggableColumn]", inputs: ["context", "enableDrag"], outputs: ["drag"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: FilterMenuComponent, selector: "kendo-treelist-filter-menu", inputs: ["column", "filter"] }, { kind: "component", type: ColumnMenuComponent, selector: "kendo-treelist-column-menu", inputs: ["standalone", "column", "settings", "sort", "filter", "sortable", "columnMenuTemplate"] }, { kind: "directive", type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: FocusableDirective, selector: "[kendoTreeListFocusable],\n [kendoTreeListAddCommand],\n [kendoTreeListEditCommand],\n [kendoTreeListRemoveCommand],\n [kendoTreeListSaveCommand],\n [kendoTreeListCancelCommand]\n ", inputs: ["kendoTreeListFocusable", "enabled", "kendoTreeListAddCommand", "kendoTreeListEditCommand", "kendoTreeListRemoveCommand", "kendoTreeListSaveCommand", "kendoTreeListCancelCommand"] }, { kind: "directive", type: ColumnHandleDirective, selector: "[kendoTreeListColumnHandle]", inputs: ["columns", "column"] }, { kind: "component", type: FilterRowComponent, selector: "[kendoTreeListFilterRow]", inputs: ["columns", "filter", "logicalRowIndex", "lockedColumnsCount"] }, { kind: "component", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }] });
13878
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: LogicalRowDirective, selector: "[kendoTreeListLogicalRow]", inputs: ["logicalRowIndex", "logicalSlaveRow", "logicalCellsCount", "logicalSlaveCellsCount", "dataRowIndex", "dataItem", "isNew", "totalColumns"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: LogicalCellDirective, selector: "[kendoTreeListLogicalCell]", inputs: ["logicalColIndex", "logicalRowIndex", "logicalSlaveCell", "column", "colIndex", "colSpan", "rowSpan", "dataRowIndex", "dataItem", "expandable"] }, { kind: "directive", type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["context"], outputs: ["enter", "leave", "drop"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: DraggableColumnDirective, selector: "[kendoDraggableColumn]", inputs: ["context", "enableDrag"], outputs: ["drag"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: FilterMenuComponent, selector: "kendo-treelist-filter-menu", inputs: ["column", "filter"] }, { kind: "component", type: ColumnMenuComponent, selector: "kendo-treelist-column-menu", inputs: ["standalone", "column", "settings", "sort", "filter", "sortable", "columnMenuTemplate"] }, { kind: "directive", type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: FocusableDirective, selector: "[kendoTreeListFocusable],\n [kendoTreeListAddCommand],\n [kendoTreeListEditCommand],\n [kendoTreeListRemoveCommand],\n [kendoTreeListSaveCommand],\n [kendoTreeListCancelCommand]\n ", inputs: ["kendoTreeListFocusable", "enabled", "kendoTreeListAddCommand", "kendoTreeListEditCommand", "kendoTreeListRemoveCommand", "kendoTreeListSaveCommand", "kendoTreeListCancelCommand"] }, { kind: "directive", type: ColumnHandleDirective, selector: "[kendoTreeListColumnHandle]", inputs: ["columns", "column"] }, { kind: "component", type: FilterRowComponent, selector: "[kendoTreeListFilterRow]", inputs: ["columns", "filter", "logicalRowIndex", "lockedColumnsCount"] }, { kind: "component", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }, { kind: "directive", type: TreeListSelectAllCheckboxDirective, selector: "[kendoTreeListSelectAllCheckbox]" }] });
13812
13879
  }
13813
13880
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HeaderComponent, decorators: [{
13814
13881
  type: Component,
@@ -13921,6 +13988,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
13921
13988
  <kendo-checkbox
13922
13989
  [inputAttributes]="{'aria-label': messageFor('selectAllRowsCheckboxLabel')}"
13923
13990
  kendoTreeListFocusable
13991
+ kendoTreeListSelectAllCheckbox
13924
13992
  (checkedStateChange)="selectAllChange($event)"
13925
13993
  ></kendo-checkbox>
13926
13994
  </ng-template>
@@ -13997,7 +14065,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
13997
14065
  </tr>
13998
14066
  `,
13999
14067
  standalone: true,
14000
- imports: [NgFor, LogicalRowDirective, NgIf, LogicalCellDirective, DropTargetDirective, DraggableDirective, DraggableColumnDirective, NgClass, NgStyle, FilterMenuComponent, ColumnMenuComponent, TemplateContextDirective, IconWrapperComponent, FocusableDirective, ColumnHandleDirective, FilterRowComponent, CheckBoxComponent]
14068
+ imports: [NgFor, LogicalRowDirective, NgIf, LogicalCellDirective, DropTargetDirective, DraggableDirective, DraggableColumnDirective, NgClass, NgStyle,
14069
+ FilterMenuComponent, ColumnMenuComponent, TemplateContextDirective, IconWrapperComponent, FocusableDirective, ColumnHandleDirective, FilterRowComponent,
14070
+ CheckBoxComponent, TreeListSelectAllCheckboxDirective]
14001
14071
  }]
14002
14072
  }], ctorParameters: function () { return [{ type: SinglePopupService }, { type: DragHintService }, { type: DropCueService }, { type: ColumnReorderService }, { type: SortService }, { type: SelectionService }, { type: i1$1.LocalizationService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { totalColumnLevels: [{
14003
14073
  type: Input
@@ -18514,6 +18584,7 @@ const defaultColumnKeyGetter = (_column, columnIndex) => columnIndex;
18514
18584
  */
18515
18585
  class SelectableDirective {
18516
18586
  treelist;
18587
+ selectionService;
18517
18588
  /**
18518
18589
  * @hidden
18519
18590
  */
@@ -18590,8 +18661,9 @@ class SelectableDirective {
18590
18661
  _columnKeyGetter;
18591
18662
  _keyGetter;
18592
18663
  _selectedItems = [];
18593
- constructor(treelist) {
18664
+ constructor(treelist, selectionService) {
18594
18665
  this.treelist = treelist;
18666
+ this.selectionService = selectionService;
18595
18667
  this.cellSelected = this.cellSelected.bind(this);
18596
18668
  this.rowSelected = this.rowSelected.bind(this);
18597
18669
  this.selectionChange = this.selectionChange.bind(this);
@@ -18630,7 +18702,7 @@ class SelectableDirective {
18630
18702
  this.emitSelectedItemsChange();
18631
18703
  }
18632
18704
  emitSelectedItemsChange() {
18633
- this.lastChange = this.state.toArray();
18705
+ this.selectionService.state = this.lastChange = this.state.toArray();
18634
18706
  this.selectedItemsChange.emit(this.lastChange);
18635
18707
  }
18636
18708
  subscribeSelection() {
@@ -18669,7 +18741,7 @@ class SelectableDirective {
18669
18741
  get leafColumns() {
18670
18742
  return this.treelist.lockedLeafColumns.toArray().concat(this.treelist.nonLockedLeafColumns.toArray());
18671
18743
  }
18672
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectableDirective, deps: [{ token: TreeListComponent }], target: i0.ɵɵFactoryTarget.Directive });
18744
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectableDirective, deps: [{ token: TreeListComponent }, { token: SelectionService }], target: i0.ɵɵFactoryTarget.Directive });
18673
18745
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: SelectableDirective, isStandalone: true, selector: "[kendoTreeListSelectable]", inputs: { selectable: "selectable", selectedItems: "selectedItems", itemKey: "itemKey", columnKey: "columnKey" }, outputs: { selectedItemsChange: "selectedItemsChange" }, exportAs: ["kendoTreeListSelectable"], ngImport: i0 });
18674
18746
  }
18675
18747
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectableDirective, decorators: [{
@@ -18679,7 +18751,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
18679
18751
  selector: '[kendoTreeListSelectable]',
18680
18752
  standalone: true
18681
18753
  }]
18682
- }], ctorParameters: function () { return [{ type: TreeListComponent }]; }, propDecorators: { selectable: [{
18754
+ }], ctorParameters: function () { return [{ type: TreeListComponent }, { type: SelectionService }]; }, propDecorators: { selectable: [{
18683
18755
  type: Input
18684
18756
  }], selectedItems: [{
18685
18757
  type: Input
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-treelist",
3
- "version": "17.0.2-develop.1",
3
+ "version": "17.0.2-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",
@@ -31,25 +31,26 @@
31
31
  "@progress/kendo-data-query": "^1.0.0",
32
32
  "@progress/kendo-drawing": "^1.21.0",
33
33
  "@progress/kendo-licensing": "^1.0.2",
34
- "@progress/kendo-angular-buttons": "17.0.2-develop.1",
35
- "@progress/kendo-angular-common": "17.0.2-develop.1",
36
- "@progress/kendo-angular-dateinputs": "17.0.2-develop.1",
37
- "@progress/kendo-angular-dropdowns": "17.0.2-develop.1",
38
- "@progress/kendo-angular-excel-export": "17.0.2-develop.1",
39
- "@progress/kendo-angular-icons": "17.0.2-develop.1",
40
- "@progress/kendo-angular-inputs": "17.0.2-develop.1",
41
- "@progress/kendo-angular-intl": "17.0.2-develop.1",
42
- "@progress/kendo-angular-l10n": "17.0.2-develop.1",
43
- "@progress/kendo-angular-label": "17.0.2-develop.1",
44
- "@progress/kendo-angular-pdf-export": "17.0.2-develop.1",
45
- "@progress/kendo-angular-popup": "17.0.2-develop.1",
46
- "@progress/kendo-angular-toolbar": "17.0.2-develop.1",
47
- "@progress/kendo-angular-utils": "17.0.2-develop.1",
34
+ "@progress/kendo-angular-buttons": "17.0.2-develop.10",
35
+ "@progress/kendo-angular-common": "17.0.2-develop.10",
36
+ "@progress/kendo-angular-dateinputs": "17.0.2-develop.10",
37
+ "@progress/kendo-angular-dropdowns": "17.0.2-develop.10",
38
+ "@progress/kendo-angular-excel-export": "17.0.2-develop.10",
39
+ "@progress/kendo-angular-icons": "17.0.2-develop.10",
40
+ "@progress/kendo-angular-inputs": "17.0.2-develop.10",
41
+ "@progress/kendo-angular-intl": "17.0.2-develop.10",
42
+ "@progress/kendo-angular-l10n": "17.0.2-develop.10",
43
+ "@progress/kendo-angular-label": "17.0.2-develop.10",
44
+ "@progress/kendo-angular-pager": "17.0.2-develop.10",
45
+ "@progress/kendo-angular-pdf-export": "17.0.2-develop.10",
46
+ "@progress/kendo-angular-popup": "17.0.2-develop.10",
47
+ "@progress/kendo-angular-toolbar": "17.0.2-develop.10",
48
+ "@progress/kendo-angular-utils": "17.0.2-develop.10",
48
49
  "rxjs": "^6.5.3 || ^7.0.0"
49
50
  },
50
51
  "dependencies": {
51
52
  "tslib": "^2.3.1",
52
- "@progress/kendo-angular-schematics": "17.0.2-develop.1",
53
+ "@progress/kendo-angular-schematics": "17.0.2-develop.10",
53
54
  "@progress/kendo-common": "^1.0.1",
54
55
  "@progress/kendo-file-saver": "^1.0.0"
55
56
  },
@@ -0,0 +1,19 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2024 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { ChangeDetectorRef, ElementRef, OnDestroy, Renderer2 } from '@angular/core';
6
+ import { CheckBoxComponent } from '@progress/kendo-angular-inputs';
7
+ import { SelectionService } from '../../selection/selection.service';
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * @hidden
11
+ */
12
+ export declare class TreeListSelectAllCheckboxDirective implements OnDestroy {
13
+ private sub;
14
+ private setState;
15
+ constructor(host: CheckBoxComponent, hostEl: ElementRef, selectionService: SelectionService, cdr: ChangeDetectorRef, renderer: Renderer2);
16
+ ngOnDestroy(): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<TreeListSelectAllCheckboxDirective, never>;
18
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TreeListSelectAllCheckboxDirective, "[kendoTreeListSelectAllCheckbox]", never, {}, {}, never, never, true, never>;
19
+ }
@@ -4,13 +4,13 @@ const schematics_1 = require("@angular-devkit/schematics");
4
4
  function default_1(options) {
5
5
  const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'TreeListModule', package: 'treelist', peerDependencies: {
6
6
  // peer dep of the dropdowns
7
- '@progress/kendo-angular-treeview': '17.0.2-develop.1',
7
+ '@progress/kendo-angular-treeview': '17.0.2-develop.10',
8
8
  // peer dependency of kendo-angular-inputs
9
- '@progress/kendo-angular-dialog': '17.0.2-develop.1',
9
+ '@progress/kendo-angular-dialog': '17.0.2-develop.10',
10
10
  // peer dependency of kendo-angular-icons
11
11
  '@progress/kendo-svg-icons': '^4.0.0',
12
12
  // peer dependency of kendo-angular-dateinputs
13
- '@progress/kendo-angular-navigation': '17.0.2-develop.1',
13
+ '@progress/kendo-angular-navigation': '17.0.2-develop.10',
14
14
  } });
15
15
  return (0, schematics_1.externalSchematic)('@progress/kendo-angular-schematics', 'ng-add', finalOptions);
16
16
  }
@@ -4,6 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { OnDestroy, EventEmitter } from '@angular/core';
6
6
  import { TreeListComponent } from '../treelist.component';
7
+ import { SelectionService } from './selection.service';
7
8
  import * as i0 from "@angular/core";
8
9
  /**
9
10
  * The [`kendoTreeListSelectable`](slug:api_treelist_selectabledirective) state items.
@@ -23,6 +24,7 @@ export interface SelectionItem {
23
24
  */
24
25
  export declare class SelectableDirective implements OnDestroy {
25
26
  private treelist;
27
+ private selectionService;
26
28
  /**
27
29
  * @hidden
28
30
  */
@@ -52,7 +54,7 @@ export declare class SelectableDirective implements OnDestroy {
52
54
  protected _columnKeyGetter: any;
53
55
  protected _keyGetter: any;
54
56
  private _selectedItems;
55
- constructor(treelist: TreeListComponent);
57
+ constructor(treelist: TreeListComponent, selectionService: SelectionService);
56
58
  ngOnDestroy(): void;
57
59
  /**
58
60
  * @hidden
@@ -14,6 +14,7 @@ export declare const defaultSelected: (_item: any) => boolean;
14
14
  */
15
15
  export declare class SelectionService {
16
16
  changes: Subject<SelectionChangeEvent>;
17
+ state: any[];
17
18
  set settings(value: any);
18
19
  get settings(): any;
19
20
  get enableMarquee(): boolean;