@progress/kendo-angular-treeview 15.5.0-develop.9 → 15.5.0
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/package-metadata.mjs +2 -2
- package/esm2020/shared.module.mjs +0 -4
- package/esm2020/treeview-group.component.mjs +20 -14
- package/fesm2015/progress-kendo-angular-treeview.mjs +23 -151
- package/fesm2020/progress-kendo-angular-treeview.mjs +23 -151
- package/package.json +6 -6
- package/schematics/ngAdd/index.js +4 -4
- package/shared.module.d.ts +3 -4
- package/treeview-group.component.d.ts +4 -0
- package/checkbox/checkbox.component.d.ts +0 -62
- package/checkbox/checkbox.module.d.ts +0 -16
- package/esm2020/checkbox/checkbox.component.mjs +0 -117
- package/esm2020/checkbox/checkbox.module.mjs +0 -27
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-treeview',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
13
|
-
version: '15.5.0
|
|
12
|
+
publishDate: 1713437456,
|
|
13
|
+
version: '15.5.0',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
15
15
|
};
|
|
@@ -16,7 +16,6 @@ import { LoadingIndicatorDirective } from './loading-indicator.directive';
|
|
|
16
16
|
import { FlatDataBindingDirective } from './flat-binding.directive';
|
|
17
17
|
import { TreeViewItemDirective } from './treeview-item.directive';
|
|
18
18
|
import { TreeViewItemContentDirective } from './treeview-item-content.directive';
|
|
19
|
-
import { CheckBoxModule } from './checkbox/checkbox.module';
|
|
20
19
|
import { DragAndDropDirective } from './drag-and-drop/drag-and-drop.directive';
|
|
21
20
|
import { DragClueTemplateDirective } from './drag-and-drop/drag-clue/drag-clue-template.directive';
|
|
22
21
|
import { DropHintTemplateDirective } from './drag-and-drop/drop-hint/drop-hint-template.directive';
|
|
@@ -82,7 +81,6 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
82
81
|
LoadMoreButtonTemplateDirective,
|
|
83
82
|
LocalizedMessagesDirective,
|
|
84
83
|
CustomMessagesComponent], imports: [CommonModule,
|
|
85
|
-
CheckBoxModule,
|
|
86
84
|
InputsModule,
|
|
87
85
|
IconsModule], exports: [TreeViewComponent,
|
|
88
86
|
TreeViewGroupComponent,
|
|
@@ -108,7 +106,6 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
108
106
|
CustomMessagesComponent] });
|
|
109
107
|
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SharedModule, imports: [[
|
|
110
108
|
CommonModule,
|
|
111
|
-
CheckBoxModule,
|
|
112
109
|
InputsModule,
|
|
113
110
|
IconsModule
|
|
114
111
|
]] });
|
|
@@ -119,7 +116,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
119
116
|
exports: [COMPONENT_DIRECTIVES],
|
|
120
117
|
imports: [
|
|
121
118
|
CommonModule,
|
|
122
|
-
CheckBoxModule,
|
|
123
119
|
InputsModule,
|
|
124
120
|
IconsModule
|
|
125
121
|
],
|
|
@@ -27,7 +27,7 @@ import * as i6 from "./node-children.service";
|
|
|
27
27
|
import * as i7 from "./data-change-notification.service";
|
|
28
28
|
import * as i8 from "@progress/kendo-angular-l10n";
|
|
29
29
|
import * as i9 from "@progress/kendo-angular-icons";
|
|
30
|
-
import * as i10 from "
|
|
30
|
+
import * as i10 from "@progress/kendo-angular-inputs";
|
|
31
31
|
import * as i11 from "@angular/common";
|
|
32
32
|
import * as i12 from "./treeview-item.directive";
|
|
33
33
|
import * as i13 from "./loading-indicator.directive";
|
|
@@ -152,6 +152,16 @@ export class TreeViewGroupComponent {
|
|
|
152
152
|
const textField = isArray(this.textField) ? this.textField[0] : this.textField;
|
|
153
153
|
return getter(textField)(dataItem);
|
|
154
154
|
}
|
|
155
|
+
getCheckBoxState(item, index) {
|
|
156
|
+
const state = this.isChecked(item, index);
|
|
157
|
+
if (state === 'indeterminate') {
|
|
158
|
+
return state;
|
|
159
|
+
}
|
|
160
|
+
return state === 'checked';
|
|
161
|
+
}
|
|
162
|
+
getCheckboxAttributes(index) {
|
|
163
|
+
return { 'aria-hidden': 'true', role: 'none', 'aria-labelledby': this.nodeIndex(index) };
|
|
164
|
+
}
|
|
155
165
|
ngOnDestroy() {
|
|
156
166
|
if (isPresent(this.nodesSubscription)) {
|
|
157
167
|
this.nodesSubscription.unsubscribe();
|
|
@@ -346,14 +356,12 @@ TreeViewGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
346
356
|
</span>
|
|
347
357
|
<kendo-checkbox
|
|
348
358
|
*ngIf="checkboxes && hasCheckbox(node, nodeIndex(index))"
|
|
349
|
-
[
|
|
359
|
+
[disabled]="isItemDisabled(node, index)"
|
|
350
360
|
[size]="size"
|
|
351
|
-
[
|
|
352
|
-
|
|
353
|
-
[isChecked]="isChecked"
|
|
354
|
-
(checkStateChange)="checkNode(nodeIndex(index))"
|
|
361
|
+
[checkedState]="getCheckBoxState(node, nodeIndex(index))"
|
|
362
|
+
(checkedStateChange)="checkNode(nodeIndex(index))"
|
|
355
363
|
[tabindex]="-1"
|
|
356
|
-
[
|
|
364
|
+
[inputAttributes]="getCheckboxAttributes(index)"
|
|
357
365
|
></kendo-checkbox>
|
|
358
366
|
<span kendoTreeViewItemContent
|
|
359
367
|
[id]="nodeIndex(index)"
|
|
@@ -460,7 +468,7 @@ TreeViewGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
460
468
|
</span>
|
|
461
469
|
</div>
|
|
462
470
|
</li>
|
|
463
|
-
`, isInline: true, components: [{ type: i9.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i10.CheckBoxComponent, selector: "kendo-checkbox", inputs: ["
|
|
471
|
+
`, isInline: true, components: [{ type: i9.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i10.CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }, { type: TreeViewGroupComponent, selector: "[kendoTreeViewGroup]", inputs: ["checkboxes", "expandIcons", "disabled", "selectable", "touchActions", "disableParentNodesOnly", "loadOnDemand", "trackBy", "nodes", "textField", "parentDataItem", "parentIndex", "nodeTemplateRef", "loadMoreButtonTemplateRef", "loadMoreService", "size", "expandDisabledNodes", "isChecked", "isDisabled", "hasCheckbox", "isExpanded", "isVisible", "isSelected", "children", "hasChildren"] }], directives: [{ type: i11.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i12.TreeViewItemDirective, selector: "[kendoTreeViewItem]", inputs: ["dataItem", "index", "parentDataItem", "parentIndex", "role", "loadOnDemand", "checkable", "selectable", "expandable", "isChecked", "isDisabled", "isVisible", "isExpanded", "isSelected"] }, { type: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i13.LoadingIndicatorDirective, selector: "[kendoTreeViewLoading]", inputs: ["kendoTreeViewLoading"] }, { type: i14.TreeViewItemContentDirective, selector: "[kendoTreeViewItemContent]", inputs: ["dataItem", "index", "initialSelection", "isSelected"] }, { type: i11.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i11.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i11.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i11.NgSwitchDefault, selector: "[ngSwitchDefault]" }], animations: [
|
|
464
472
|
trigger('toggle', [
|
|
465
473
|
transition('void => *', [
|
|
466
474
|
style({ height: 0 }),
|
|
@@ -526,14 +534,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
526
534
|
</span>
|
|
527
535
|
<kendo-checkbox
|
|
528
536
|
*ngIf="checkboxes && hasCheckbox(node, nodeIndex(index))"
|
|
529
|
-
[
|
|
537
|
+
[disabled]="isItemDisabled(node, index)"
|
|
530
538
|
[size]="size"
|
|
531
|
-
[
|
|
532
|
-
|
|
533
|
-
[isChecked]="isChecked"
|
|
534
|
-
(checkStateChange)="checkNode(nodeIndex(index))"
|
|
539
|
+
[checkedState]="getCheckBoxState(node, nodeIndex(index))"
|
|
540
|
+
(checkedStateChange)="checkNode(nodeIndex(index))"
|
|
535
541
|
[tabindex]="-1"
|
|
536
|
-
[
|
|
542
|
+
[inputAttributes]="getCheckboxAttributes(index)"
|
|
537
543
|
></kendo-checkbox>
|
|
538
544
|
<span kendoTreeViewItemContent
|
|
539
545
|
[id]="nodeIndex(index)"
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { EventEmitter, Injectable, Directive, Optional,
|
|
7
|
-
import { isDocumentAvailable, Keys,
|
|
6
|
+
import { EventEmitter, Injectable, Directive, Optional, Input, HostBinding, Component, forwardRef, isDevMode, ViewContainerRef, ChangeDetectionStrategy, ViewChild, Output, ContentChild, Host, NgModule } from '@angular/core';
|
|
7
|
+
import { isDocumentAvailable, Keys, anyChanged, hasObservers, isChanged, guid } from '@progress/kendo-angular-common';
|
|
8
8
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
9
9
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { Subject, of, Subscription, EMPTY, BehaviorSubject, merge } from 'rxjs';
|
|
@@ -28,8 +28,8 @@ const packageMetadata = {
|
|
|
28
28
|
name: '@progress/kendo-angular-treeview',
|
|
29
29
|
productName: 'Kendo UI for Angular',
|
|
30
30
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
31
|
-
publishDate:
|
|
32
|
-
version: '15.5.0
|
|
31
|
+
publishDate: 1713437456,
|
|
32
|
+
version: '15.5.0',
|
|
33
33
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -1079,116 +1079,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1079
1079
|
type: Injectable
|
|
1080
1080
|
}] });
|
|
1081
1081
|
|
|
1082
|
-
/**
|
|
1083
|
-
* @hidden
|
|
1084
|
-
*
|
|
1085
|
-
* Represents the CheckBox component of the Kendo UI TreeView for Angular.
|
|
1086
|
-
*
|
|
1087
|
-
*/
|
|
1088
|
-
class CheckBoxComponent {
|
|
1089
|
-
constructor(element, renderer, changeDetector) {
|
|
1090
|
-
this.element = element;
|
|
1091
|
-
this.renderer = renderer;
|
|
1092
|
-
this.changeDetector = changeDetector;
|
|
1093
|
-
/**
|
|
1094
|
-
* Specifies the [`id`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) of the component.
|
|
1095
|
-
*/
|
|
1096
|
-
this.id = `_${guid()}`;
|
|
1097
|
-
/**
|
|
1098
|
-
* Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
1099
|
-
*/
|
|
1100
|
-
this.tabindex = 0;
|
|
1101
|
-
/**
|
|
1102
|
-
* Specifies the size of the component.
|
|
1103
|
-
*/
|
|
1104
|
-
this.size = 'medium';
|
|
1105
|
-
/**
|
|
1106
|
-
* Fires when the user changes the check state of the component.
|
|
1107
|
-
*/
|
|
1108
|
-
this.checkStateChange = new EventEmitter();
|
|
1109
|
-
this.checkState = 'none';
|
|
1110
|
-
}
|
|
1111
|
-
//XXX: implement ComponentValueAccessor
|
|
1112
|
-
//XXX: focus/blur methods
|
|
1113
|
-
get classWrapper() { return true; }
|
|
1114
|
-
get indeterminate() {
|
|
1115
|
-
return this.checkState === 'indeterminate';
|
|
1116
|
-
}
|
|
1117
|
-
get checked() {
|
|
1118
|
-
return this.checkState === 'checked';
|
|
1119
|
-
}
|
|
1120
|
-
get checkBoxClasses() {
|
|
1121
|
-
return `k-checkbox ${this.size ? getSizeClass('checkbox', this.size) : ''} k-rounded-md`;
|
|
1122
|
-
}
|
|
1123
|
-
ngOnInit() {
|
|
1124
|
-
this.renderer.removeAttribute(this.element.nativeElement, "tabindex");
|
|
1125
|
-
}
|
|
1126
|
-
ngDoCheck() {
|
|
1127
|
-
this.checkState = this.isChecked(this.node, this.index);
|
|
1128
|
-
}
|
|
1129
|
-
handleChange(e) {
|
|
1130
|
-
const state = e.target.checked ? 'checked' : 'none';
|
|
1131
|
-
// update the View State so that Angular updates the input if the isChecked value is the same
|
|
1132
|
-
this.checkState = state;
|
|
1133
|
-
this.changeDetector.detectChanges();
|
|
1134
|
-
this.checkStateChange.emit(state);
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
CheckBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1138
|
-
CheckBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: { id: "id", isChecked: "isChecked", node: "node", index: "index", labelledby: "labelledby", tabindex: "tabindex", size: "size" }, outputs: { checkStateChange: "checkStateChange" }, host: { properties: { "class.k-checkbox-wrap": "this.classWrapper" } }, ngImport: i0, template: `
|
|
1139
|
-
<input
|
|
1140
|
-
type="checkbox"
|
|
1141
|
-
[class]="checkBoxClasses"
|
|
1142
|
-
[id]="id"
|
|
1143
|
-
[checked]="checked"
|
|
1144
|
-
[indeterminate]="indeterminate"
|
|
1145
|
-
[tabindex]="tabindex"
|
|
1146
|
-
(change)="handleChange($event)"
|
|
1147
|
-
role="none"
|
|
1148
|
-
[attr.aria-hidden]="'true'"
|
|
1149
|
-
[attr.aria-labelledby]="labelledby"
|
|
1150
|
-
/>
|
|
1151
|
-
`, isInline: true });
|
|
1152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxComponent, decorators: [{
|
|
1153
|
-
type: Component,
|
|
1154
|
-
args: [{
|
|
1155
|
-
selector: 'kendo-checkbox',
|
|
1156
|
-
template: `
|
|
1157
|
-
<input
|
|
1158
|
-
type="checkbox"
|
|
1159
|
-
[class]="checkBoxClasses"
|
|
1160
|
-
[id]="id"
|
|
1161
|
-
[checked]="checked"
|
|
1162
|
-
[indeterminate]="indeterminate"
|
|
1163
|
-
[tabindex]="tabindex"
|
|
1164
|
-
(change)="handleChange($event)"
|
|
1165
|
-
role="none"
|
|
1166
|
-
[attr.aria-hidden]="'true'"
|
|
1167
|
-
[attr.aria-labelledby]="labelledby"
|
|
1168
|
-
/>
|
|
1169
|
-
`
|
|
1170
|
-
}]
|
|
1171
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { classWrapper: [{
|
|
1172
|
-
type: HostBinding,
|
|
1173
|
-
args: ['class.k-checkbox-wrap']
|
|
1174
|
-
}], id: [{
|
|
1175
|
-
type: Input
|
|
1176
|
-
}], isChecked: [{
|
|
1177
|
-
type: Input
|
|
1178
|
-
}], node: [{
|
|
1179
|
-
type: Input
|
|
1180
|
-
}], index: [{
|
|
1181
|
-
type: Input
|
|
1182
|
-
}], labelledby: [{
|
|
1183
|
-
type: Input
|
|
1184
|
-
}], tabindex: [{
|
|
1185
|
-
type: Input
|
|
1186
|
-
}], size: [{
|
|
1187
|
-
type: Input
|
|
1188
|
-
}], checkStateChange: [{
|
|
1189
|
-
type: Output
|
|
1190
|
-
}] } });
|
|
1191
|
-
|
|
1192
1082
|
const buildItem = (index, dataItem) => ({ dataItem, index });
|
|
1193
1083
|
let id = 0;
|
|
1194
1084
|
const TREE_ITEM_ROLE = 'treeitem';
|
|
@@ -1628,6 +1518,16 @@ class TreeViewGroupComponent {
|
|
|
1628
1518
|
const textField = isArray(this.textField) ? this.textField[0] : this.textField;
|
|
1629
1519
|
return getter(textField)(dataItem);
|
|
1630
1520
|
}
|
|
1521
|
+
getCheckBoxState(item, index) {
|
|
1522
|
+
const state = this.isChecked(item, index);
|
|
1523
|
+
if (state === 'indeterminate') {
|
|
1524
|
+
return state;
|
|
1525
|
+
}
|
|
1526
|
+
return state === 'checked';
|
|
1527
|
+
}
|
|
1528
|
+
getCheckboxAttributes(index) {
|
|
1529
|
+
return { 'aria-hidden': 'true', role: 'none', 'aria-labelledby': this.nodeIndex(index) };
|
|
1530
|
+
}
|
|
1631
1531
|
ngOnDestroy() {
|
|
1632
1532
|
if (isPresent(this.nodesSubscription)) {
|
|
1633
1533
|
this.nodesSubscription.unsubscribe();
|
|
@@ -1822,14 +1722,12 @@ TreeViewGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1822
1722
|
</span>
|
|
1823
1723
|
<kendo-checkbox
|
|
1824
1724
|
*ngIf="checkboxes && hasCheckbox(node, nodeIndex(index))"
|
|
1825
|
-
[
|
|
1725
|
+
[disabled]="isItemDisabled(node, index)"
|
|
1826
1726
|
[size]="size"
|
|
1827
|
-
[
|
|
1828
|
-
|
|
1829
|
-
[isChecked]="isChecked"
|
|
1830
|
-
(checkStateChange)="checkNode(nodeIndex(index))"
|
|
1727
|
+
[checkedState]="getCheckBoxState(node, nodeIndex(index))"
|
|
1728
|
+
(checkedStateChange)="checkNode(nodeIndex(index))"
|
|
1831
1729
|
[tabindex]="-1"
|
|
1832
|
-
[
|
|
1730
|
+
[inputAttributes]="getCheckboxAttributes(index)"
|
|
1833
1731
|
></kendo-checkbox>
|
|
1834
1732
|
<span kendoTreeViewItemContent
|
|
1835
1733
|
[id]="nodeIndex(index)"
|
|
@@ -1936,7 +1834,7 @@ TreeViewGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1936
1834
|
</span>
|
|
1937
1835
|
</div>
|
|
1938
1836
|
</li>
|
|
1939
|
-
`, isInline: true, components: [{ type: i9.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["
|
|
1837
|
+
`, isInline: true, components: [{ type: i9.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i8.CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }, { type: TreeViewGroupComponent, selector: "[kendoTreeViewGroup]", inputs: ["checkboxes", "expandIcons", "disabled", "selectable", "touchActions", "disableParentNodesOnly", "loadOnDemand", "trackBy", "nodes", "textField", "parentDataItem", "parentIndex", "nodeTemplateRef", "loadMoreButtonTemplateRef", "loadMoreService", "size", "expandDisabledNodes", "isChecked", "isDisabled", "hasCheckbox", "isExpanded", "isVisible", "isSelected", "children", "hasChildren"] }], directives: [{ type: i11.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: TreeViewItemDirective, selector: "[kendoTreeViewItem]", inputs: ["dataItem", "index", "parentDataItem", "parentIndex", "role", "loadOnDemand", "checkable", "selectable", "expandable", "isChecked", "isDisabled", "isVisible", "isExpanded", "isSelected"] }, { type: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: LoadingIndicatorDirective, selector: "[kendoTreeViewLoading]", inputs: ["kendoTreeViewLoading"] }, { type: TreeViewItemContentDirective, selector: "[kendoTreeViewItemContent]", inputs: ["dataItem", "index", "initialSelection", "isSelected"] }, { type: i11.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i11.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i11.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i11.NgSwitchDefault, selector: "[ngSwitchDefault]" }], animations: [
|
|
1940
1838
|
trigger('toggle', [
|
|
1941
1839
|
transition('void => *', [
|
|
1942
1840
|
style({ height: 0 }),
|
|
@@ -2002,14 +1900,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2002
1900
|
</span>
|
|
2003
1901
|
<kendo-checkbox
|
|
2004
1902
|
*ngIf="checkboxes && hasCheckbox(node, nodeIndex(index))"
|
|
2005
|
-
[
|
|
1903
|
+
[disabled]="isItemDisabled(node, index)"
|
|
2006
1904
|
[size]="size"
|
|
2007
|
-
[
|
|
2008
|
-
|
|
2009
|
-
[isChecked]="isChecked"
|
|
2010
|
-
(checkStateChange)="checkNode(nodeIndex(index))"
|
|
1905
|
+
[checkedState]="getCheckBoxState(node, nodeIndex(index))"
|
|
1906
|
+
(checkedStateChange)="checkNode(nodeIndex(index))"
|
|
2011
1907
|
[tabindex]="-1"
|
|
2012
|
-
[
|
|
1908
|
+
[inputAttributes]="getCheckboxAttributes(index)"
|
|
2013
1909
|
></kendo-checkbox>
|
|
2014
1910
|
<span kendoTreeViewItemContent
|
|
2015
1911
|
[id]="nodeIndex(index)"
|
|
@@ -5343,27 +5239,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
5343
5239
|
type: Input
|
|
5344
5240
|
}] } });
|
|
5345
5241
|
|
|
5346
|
-
const COMPONENT_DIRECTIVES$1 = [
|
|
5347
|
-
CheckBoxComponent
|
|
5348
|
-
];
|
|
5349
|
-
/**
|
|
5350
|
-
* @hidden
|
|
5351
|
-
*
|
|
5352
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the CheckBox component.
|
|
5353
|
-
*/
|
|
5354
|
-
class CheckBoxModule {
|
|
5355
|
-
}
|
|
5356
|
-
CheckBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5357
|
-
CheckBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxModule, declarations: [CheckBoxComponent], exports: [CheckBoxComponent] });
|
|
5358
|
-
CheckBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxModule });
|
|
5359
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxModule, decorators: [{
|
|
5360
|
-
type: NgModule,
|
|
5361
|
-
args: [{
|
|
5362
|
-
declarations: [COMPONENT_DIRECTIVES$1],
|
|
5363
|
-
exports: [COMPONENT_DIRECTIVES$1]
|
|
5364
|
-
}]
|
|
5365
|
-
}] });
|
|
5366
|
-
|
|
5367
5242
|
/**
|
|
5368
5243
|
* A directive which enables the update of the initially provided data array during drag-and-drop.
|
|
5369
5244
|
*
|
|
@@ -5593,7 +5468,6 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
5593
5468
|
LoadMoreButtonTemplateDirective,
|
|
5594
5469
|
LocalizedMessagesDirective,
|
|
5595
5470
|
CustomMessagesComponent], imports: [CommonModule,
|
|
5596
|
-
CheckBoxModule,
|
|
5597
5471
|
InputsModule,
|
|
5598
5472
|
IconsModule], exports: [TreeViewComponent,
|
|
5599
5473
|
TreeViewGroupComponent,
|
|
@@ -5619,7 +5493,6 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
5619
5493
|
CustomMessagesComponent] });
|
|
5620
5494
|
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SharedModule, imports: [[
|
|
5621
5495
|
CommonModule,
|
|
5622
|
-
CheckBoxModule,
|
|
5623
5496
|
InputsModule,
|
|
5624
5497
|
IconsModule
|
|
5625
5498
|
]] });
|
|
@@ -5630,7 +5503,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
5630
5503
|
exports: [COMPONENT_DIRECTIVES],
|
|
5631
5504
|
imports: [
|
|
5632
5505
|
CommonModule,
|
|
5633
|
-
CheckBoxModule,
|
|
5634
5506
|
InputsModule,
|
|
5635
5507
|
IconsModule
|
|
5636
5508
|
],
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
|
-
import { EventEmitter, Injectable, Directive, Optional,
|
|
7
|
-
import { isDocumentAvailable, Keys,
|
|
6
|
+
import { EventEmitter, Injectable, Directive, Optional, Input, HostBinding, Component, forwardRef, isDevMode, ViewContainerRef, ChangeDetectionStrategy, ViewChild, Output, ContentChild, Host, NgModule } from '@angular/core';
|
|
7
|
+
import { isDocumentAvailable, Keys, anyChanged, hasObservers, isChanged, guid } from '@progress/kendo-angular-common';
|
|
8
8
|
import * as i1 from '@progress/kendo-angular-l10n';
|
|
9
9
|
import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
|
|
10
10
|
import { Subject, of, Subscription, EMPTY, BehaviorSubject, merge } from 'rxjs';
|
|
@@ -28,8 +28,8 @@ const packageMetadata = {
|
|
|
28
28
|
name: '@progress/kendo-angular-treeview',
|
|
29
29
|
productName: 'Kendo UI for Angular',
|
|
30
30
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
31
|
-
publishDate:
|
|
32
|
-
version: '15.5.0
|
|
31
|
+
publishDate: 1713437456,
|
|
32
|
+
version: '15.5.0',
|
|
33
33
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -1075,116 +1075,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1075
1075
|
type: Injectable
|
|
1076
1076
|
}] });
|
|
1077
1077
|
|
|
1078
|
-
/**
|
|
1079
|
-
* @hidden
|
|
1080
|
-
*
|
|
1081
|
-
* Represents the CheckBox component of the Kendo UI TreeView for Angular.
|
|
1082
|
-
*
|
|
1083
|
-
*/
|
|
1084
|
-
class CheckBoxComponent {
|
|
1085
|
-
constructor(element, renderer, changeDetector) {
|
|
1086
|
-
this.element = element;
|
|
1087
|
-
this.renderer = renderer;
|
|
1088
|
-
this.changeDetector = changeDetector;
|
|
1089
|
-
/**
|
|
1090
|
-
* Specifies the [`id`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) of the component.
|
|
1091
|
-
*/
|
|
1092
|
-
this.id = `_${guid()}`;
|
|
1093
|
-
/**
|
|
1094
|
-
* Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
1095
|
-
*/
|
|
1096
|
-
this.tabindex = 0;
|
|
1097
|
-
/**
|
|
1098
|
-
* Specifies the size of the component.
|
|
1099
|
-
*/
|
|
1100
|
-
this.size = 'medium';
|
|
1101
|
-
/**
|
|
1102
|
-
* Fires when the user changes the check state of the component.
|
|
1103
|
-
*/
|
|
1104
|
-
this.checkStateChange = new EventEmitter();
|
|
1105
|
-
this.checkState = 'none';
|
|
1106
|
-
}
|
|
1107
|
-
//XXX: implement ComponentValueAccessor
|
|
1108
|
-
//XXX: focus/blur methods
|
|
1109
|
-
get classWrapper() { return true; }
|
|
1110
|
-
get indeterminate() {
|
|
1111
|
-
return this.checkState === 'indeterminate';
|
|
1112
|
-
}
|
|
1113
|
-
get checked() {
|
|
1114
|
-
return this.checkState === 'checked';
|
|
1115
|
-
}
|
|
1116
|
-
get checkBoxClasses() {
|
|
1117
|
-
return `k-checkbox ${this.size ? getSizeClass('checkbox', this.size) : ''} k-rounded-md`;
|
|
1118
|
-
}
|
|
1119
|
-
ngOnInit() {
|
|
1120
|
-
this.renderer.removeAttribute(this.element.nativeElement, "tabindex");
|
|
1121
|
-
}
|
|
1122
|
-
ngDoCheck() {
|
|
1123
|
-
this.checkState = this.isChecked(this.node, this.index);
|
|
1124
|
-
}
|
|
1125
|
-
handleChange(e) {
|
|
1126
|
-
const state = e.target.checked ? 'checked' : 'none';
|
|
1127
|
-
// update the View State so that Angular updates the input if the isChecked value is the same
|
|
1128
|
-
this.checkState = state;
|
|
1129
|
-
this.changeDetector.detectChanges();
|
|
1130
|
-
this.checkStateChange.emit(state);
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
CheckBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1134
|
-
CheckBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: { id: "id", isChecked: "isChecked", node: "node", index: "index", labelledby: "labelledby", tabindex: "tabindex", size: "size" }, outputs: { checkStateChange: "checkStateChange" }, host: { properties: { "class.k-checkbox-wrap": "this.classWrapper" } }, ngImport: i0, template: `
|
|
1135
|
-
<input
|
|
1136
|
-
type="checkbox"
|
|
1137
|
-
[class]="checkBoxClasses"
|
|
1138
|
-
[id]="id"
|
|
1139
|
-
[checked]="checked"
|
|
1140
|
-
[indeterminate]="indeterminate"
|
|
1141
|
-
[tabindex]="tabindex"
|
|
1142
|
-
(change)="handleChange($event)"
|
|
1143
|
-
role="none"
|
|
1144
|
-
[attr.aria-hidden]="'true'"
|
|
1145
|
-
[attr.aria-labelledby]="labelledby"
|
|
1146
|
-
/>
|
|
1147
|
-
`, isInline: true });
|
|
1148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxComponent, decorators: [{
|
|
1149
|
-
type: Component,
|
|
1150
|
-
args: [{
|
|
1151
|
-
selector: 'kendo-checkbox',
|
|
1152
|
-
template: `
|
|
1153
|
-
<input
|
|
1154
|
-
type="checkbox"
|
|
1155
|
-
[class]="checkBoxClasses"
|
|
1156
|
-
[id]="id"
|
|
1157
|
-
[checked]="checked"
|
|
1158
|
-
[indeterminate]="indeterminate"
|
|
1159
|
-
[tabindex]="tabindex"
|
|
1160
|
-
(change)="handleChange($event)"
|
|
1161
|
-
role="none"
|
|
1162
|
-
[attr.aria-hidden]="'true'"
|
|
1163
|
-
[attr.aria-labelledby]="labelledby"
|
|
1164
|
-
/>
|
|
1165
|
-
`
|
|
1166
|
-
}]
|
|
1167
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { classWrapper: [{
|
|
1168
|
-
type: HostBinding,
|
|
1169
|
-
args: ['class.k-checkbox-wrap']
|
|
1170
|
-
}], id: [{
|
|
1171
|
-
type: Input
|
|
1172
|
-
}], isChecked: [{
|
|
1173
|
-
type: Input
|
|
1174
|
-
}], node: [{
|
|
1175
|
-
type: Input
|
|
1176
|
-
}], index: [{
|
|
1177
|
-
type: Input
|
|
1178
|
-
}], labelledby: [{
|
|
1179
|
-
type: Input
|
|
1180
|
-
}], tabindex: [{
|
|
1181
|
-
type: Input
|
|
1182
|
-
}], size: [{
|
|
1183
|
-
type: Input
|
|
1184
|
-
}], checkStateChange: [{
|
|
1185
|
-
type: Output
|
|
1186
|
-
}] } });
|
|
1187
|
-
|
|
1188
1078
|
const buildItem = (index, dataItem) => ({ dataItem, index });
|
|
1189
1079
|
let id = 0;
|
|
1190
1080
|
const TREE_ITEM_ROLE = 'treeitem';
|
|
@@ -1624,6 +1514,16 @@ class TreeViewGroupComponent {
|
|
|
1624
1514
|
const textField = isArray(this.textField) ? this.textField[0] : this.textField;
|
|
1625
1515
|
return getter(textField)(dataItem);
|
|
1626
1516
|
}
|
|
1517
|
+
getCheckBoxState(item, index) {
|
|
1518
|
+
const state = this.isChecked(item, index);
|
|
1519
|
+
if (state === 'indeterminate') {
|
|
1520
|
+
return state;
|
|
1521
|
+
}
|
|
1522
|
+
return state === 'checked';
|
|
1523
|
+
}
|
|
1524
|
+
getCheckboxAttributes(index) {
|
|
1525
|
+
return { 'aria-hidden': 'true', role: 'none', 'aria-labelledby': this.nodeIndex(index) };
|
|
1526
|
+
}
|
|
1627
1527
|
ngOnDestroy() {
|
|
1628
1528
|
if (isPresent(this.nodesSubscription)) {
|
|
1629
1529
|
this.nodesSubscription.unsubscribe();
|
|
@@ -1818,14 +1718,12 @@ TreeViewGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1818
1718
|
</span>
|
|
1819
1719
|
<kendo-checkbox
|
|
1820
1720
|
*ngIf="checkboxes && hasCheckbox(node, nodeIndex(index))"
|
|
1821
|
-
[
|
|
1721
|
+
[disabled]="isItemDisabled(node, index)"
|
|
1822
1722
|
[size]="size"
|
|
1823
|
-
[
|
|
1824
|
-
|
|
1825
|
-
[isChecked]="isChecked"
|
|
1826
|
-
(checkStateChange)="checkNode(nodeIndex(index))"
|
|
1723
|
+
[checkedState]="getCheckBoxState(node, nodeIndex(index))"
|
|
1724
|
+
(checkedStateChange)="checkNode(nodeIndex(index))"
|
|
1827
1725
|
[tabindex]="-1"
|
|
1828
|
-
[
|
|
1726
|
+
[inputAttributes]="getCheckboxAttributes(index)"
|
|
1829
1727
|
></kendo-checkbox>
|
|
1830
1728
|
<span kendoTreeViewItemContent
|
|
1831
1729
|
[id]="nodeIndex(index)"
|
|
@@ -1932,7 +1830,7 @@ TreeViewGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0",
|
|
|
1932
1830
|
</span>
|
|
1933
1831
|
</div>
|
|
1934
1832
|
</li>
|
|
1935
|
-
`, isInline: true, components: [{ type: i9.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["
|
|
1833
|
+
`, isInline: true, components: [{ type: i9.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i8.CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }, { type: TreeViewGroupComponent, selector: "[kendoTreeViewGroup]", inputs: ["checkboxes", "expandIcons", "disabled", "selectable", "touchActions", "disableParentNodesOnly", "loadOnDemand", "trackBy", "nodes", "textField", "parentDataItem", "parentIndex", "nodeTemplateRef", "loadMoreButtonTemplateRef", "loadMoreService", "size", "expandDisabledNodes", "isChecked", "isDisabled", "hasCheckbox", "isExpanded", "isVisible", "isSelected", "children", "hasChildren"] }], directives: [{ type: i11.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: TreeViewItemDirective, selector: "[kendoTreeViewItem]", inputs: ["dataItem", "index", "parentDataItem", "parentIndex", "role", "loadOnDemand", "checkable", "selectable", "expandable", "isChecked", "isDisabled", "isVisible", "isExpanded", "isSelected"] }, { type: i11.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i11.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: LoadingIndicatorDirective, selector: "[kendoTreeViewLoading]", inputs: ["kendoTreeViewLoading"] }, { type: TreeViewItemContentDirective, selector: "[kendoTreeViewItemContent]", inputs: ["dataItem", "index", "initialSelection", "isSelected"] }, { type: i11.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i11.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i11.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i11.NgSwitchDefault, selector: "[ngSwitchDefault]" }], animations: [
|
|
1936
1834
|
trigger('toggle', [
|
|
1937
1835
|
transition('void => *', [
|
|
1938
1836
|
style({ height: 0 }),
|
|
@@ -1998,14 +1896,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1998
1896
|
</span>
|
|
1999
1897
|
<kendo-checkbox
|
|
2000
1898
|
*ngIf="checkboxes && hasCheckbox(node, nodeIndex(index))"
|
|
2001
|
-
[
|
|
1899
|
+
[disabled]="isItemDisabled(node, index)"
|
|
2002
1900
|
[size]="size"
|
|
2003
|
-
[
|
|
2004
|
-
|
|
2005
|
-
[isChecked]="isChecked"
|
|
2006
|
-
(checkStateChange)="checkNode(nodeIndex(index))"
|
|
1901
|
+
[checkedState]="getCheckBoxState(node, nodeIndex(index))"
|
|
1902
|
+
(checkedStateChange)="checkNode(nodeIndex(index))"
|
|
2007
1903
|
[tabindex]="-1"
|
|
2008
|
-
[
|
|
1904
|
+
[inputAttributes]="getCheckboxAttributes(index)"
|
|
2009
1905
|
></kendo-checkbox>
|
|
2010
1906
|
<span kendoTreeViewItemContent
|
|
2011
1907
|
[id]="nodeIndex(index)"
|
|
@@ -5335,27 +5231,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
5335
5231
|
type: Input
|
|
5336
5232
|
}] } });
|
|
5337
5233
|
|
|
5338
|
-
const COMPONENT_DIRECTIVES$1 = [
|
|
5339
|
-
CheckBoxComponent
|
|
5340
|
-
];
|
|
5341
|
-
/**
|
|
5342
|
-
* @hidden
|
|
5343
|
-
*
|
|
5344
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the CheckBox component.
|
|
5345
|
-
*/
|
|
5346
|
-
class CheckBoxModule {
|
|
5347
|
-
}
|
|
5348
|
-
CheckBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5349
|
-
CheckBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxModule, declarations: [CheckBoxComponent], exports: [CheckBoxComponent] });
|
|
5350
|
-
CheckBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxModule });
|
|
5351
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxModule, decorators: [{
|
|
5352
|
-
type: NgModule,
|
|
5353
|
-
args: [{
|
|
5354
|
-
declarations: [COMPONENT_DIRECTIVES$1],
|
|
5355
|
-
exports: [COMPONENT_DIRECTIVES$1]
|
|
5356
|
-
}]
|
|
5357
|
-
}] });
|
|
5358
|
-
|
|
5359
5234
|
/**
|
|
5360
5235
|
* A directive which enables the update of the initially provided data array during drag-and-drop.
|
|
5361
5236
|
*
|
|
@@ -5585,7 +5460,6 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
5585
5460
|
LoadMoreButtonTemplateDirective,
|
|
5586
5461
|
LocalizedMessagesDirective,
|
|
5587
5462
|
CustomMessagesComponent], imports: [CommonModule,
|
|
5588
|
-
CheckBoxModule,
|
|
5589
5463
|
InputsModule,
|
|
5590
5464
|
IconsModule], exports: [TreeViewComponent,
|
|
5591
5465
|
TreeViewGroupComponent,
|
|
@@ -5611,7 +5485,6 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
5611
5485
|
CustomMessagesComponent] });
|
|
5612
5486
|
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: SharedModule, imports: [[
|
|
5613
5487
|
CommonModule,
|
|
5614
|
-
CheckBoxModule,
|
|
5615
5488
|
InputsModule,
|
|
5616
5489
|
IconsModule
|
|
5617
5490
|
]] });
|
|
@@ -5622,7 +5495,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
5622
5495
|
exports: [COMPONENT_DIRECTIVES],
|
|
5623
5496
|
imports: [
|
|
5624
5497
|
CommonModule,
|
|
5625
|
-
CheckBoxModule,
|
|
5626
5498
|
InputsModule,
|
|
5627
5499
|
IconsModule
|
|
5628
5500
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-treeview",
|
|
3
|
-
"version": "15.5.0
|
|
3
|
+
"version": "15.5.0",
|
|
4
4
|
"description": "Kendo UI TreeView for Angular",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"@angular/core": "13 - 17",
|
|
24
24
|
"@angular/platform-browser": "13 - 17",
|
|
25
25
|
"@progress/kendo-licensing": "^1.0.2",
|
|
26
|
-
"@progress/kendo-angular-common": "15.5.0
|
|
27
|
-
"@progress/kendo-angular-inputs": "15.5.0
|
|
28
|
-
"@progress/kendo-angular-icons": "15.5.0
|
|
29
|
-
"@progress/kendo-angular-l10n": "15.5.0
|
|
26
|
+
"@progress/kendo-angular-common": "15.5.0",
|
|
27
|
+
"@progress/kendo-angular-inputs": "15.5.0",
|
|
28
|
+
"@progress/kendo-angular-icons": "15.5.0",
|
|
29
|
+
"@progress/kendo-angular-l10n": "15.5.0",
|
|
30
30
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"tslib": "^2.3.1",
|
|
34
|
-
"@progress/kendo-angular-schematics": "15.5.0
|
|
34
|
+
"@progress/kendo-angular-schematics": "15.5.0",
|
|
35
35
|
"@progress/kendo-common": "^0.2.0",
|
|
36
36
|
"@progress/kendo-draggable": "^3.0.2"
|
|
37
37
|
},
|
|
@@ -4,10 +4,10 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
4
4
|
function default_1(options) {
|
|
5
5
|
const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'TreeViewModule', package: 'treeview', peerDependencies: {
|
|
6
6
|
// Peers of kendo-angular-inputs
|
|
7
|
-
'@progress/kendo-angular-buttons': '15.5.0
|
|
8
|
-
'@progress/kendo-angular-dialog': '15.5.0
|
|
9
|
-
'@progress/kendo-angular-intl': '15.5.0
|
|
10
|
-
'@progress/kendo-angular-popup': '15.5.0
|
|
7
|
+
'@progress/kendo-angular-buttons': '15.5.0',
|
|
8
|
+
'@progress/kendo-angular-dialog': '15.5.0',
|
|
9
|
+
'@progress/kendo-angular-intl': '15.5.0',
|
|
10
|
+
'@progress/kendo-angular-popup': '15.5.0',
|
|
11
11
|
'@progress/kendo-drawing': '^1.9.3',
|
|
12
12
|
// Peer dependency of icons
|
|
13
13
|
'@progress/kendo-svg-icons': '^2.0.0'
|
package/shared.module.d.ts
CHANGED
|
@@ -26,14 +26,13 @@ import * as i20 from "./load-more/load-more-button-template.directive";
|
|
|
26
26
|
import * as i21 from "./localization/localized-messages.directive";
|
|
27
27
|
import * as i22 from "./localization/custom-messages.component";
|
|
28
28
|
import * as i23 from "@angular/common";
|
|
29
|
-
import * as i24 from "
|
|
30
|
-
import * as i25 from "@progress/kendo-angular-
|
|
31
|
-
import * as i26 from "@progress/kendo-angular-icons";
|
|
29
|
+
import * as i24 from "@progress/kendo-angular-inputs";
|
|
30
|
+
import * as i25 from "@progress/kendo-angular-icons";
|
|
32
31
|
/**
|
|
33
32
|
* @hidden
|
|
34
33
|
*/
|
|
35
34
|
export declare class SharedModule {
|
|
36
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<SharedModule, never>;
|
|
37
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedModule, [typeof i1.TreeViewComponent, typeof i2.TreeViewGroupComponent, typeof i3.TreeViewItemDirective, typeof i4.TreeViewItemContentDirective, typeof i5.NodeTemplateDirective, typeof i6.CheckDirective, typeof i7.DisableDirective, typeof i8.ExpandDirective, typeof i9.SelectDirective, typeof i10.HierarchyBindingDirective, typeof i11.LoadingIndicatorDirective, typeof i12.FlatDataBindingDirective, typeof i13.DragAndDropDirective, typeof i14.DragClueTemplateDirective, typeof i15.DragClueComponent, typeof i16.DropHintTemplateDirective, typeof i17.DropHintComponent, typeof i18.DragAndDropEditingDirective, typeof i19.LoadMoreDirective, typeof i20.LoadMoreButtonTemplateDirective, typeof i21.LocalizedMessagesDirective, typeof i22.CustomMessagesComponent], [typeof i23.CommonModule, typeof i24.
|
|
36
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedModule, [typeof i1.TreeViewComponent, typeof i2.TreeViewGroupComponent, typeof i3.TreeViewItemDirective, typeof i4.TreeViewItemContentDirective, typeof i5.NodeTemplateDirective, typeof i6.CheckDirective, typeof i7.DisableDirective, typeof i8.ExpandDirective, typeof i9.SelectDirective, typeof i10.HierarchyBindingDirective, typeof i11.LoadingIndicatorDirective, typeof i12.FlatDataBindingDirective, typeof i13.DragAndDropDirective, typeof i14.DragClueTemplateDirective, typeof i15.DragClueComponent, typeof i16.DropHintTemplateDirective, typeof i17.DropHintComponent, typeof i18.DragAndDropEditingDirective, typeof i19.LoadMoreDirective, typeof i20.LoadMoreButtonTemplateDirective, typeof i21.LocalizedMessagesDirective, typeof i22.CustomMessagesComponent], [typeof i23.CommonModule, typeof i24.InputsModule, typeof i25.IconsModule], [typeof i1.TreeViewComponent, typeof i2.TreeViewGroupComponent, typeof i3.TreeViewItemDirective, typeof i4.TreeViewItemContentDirective, typeof i5.NodeTemplateDirective, typeof i6.CheckDirective, typeof i7.DisableDirective, typeof i8.ExpandDirective, typeof i9.SelectDirective, typeof i10.HierarchyBindingDirective, typeof i11.LoadingIndicatorDirective, typeof i12.FlatDataBindingDirective, typeof i13.DragAndDropDirective, typeof i14.DragClueTemplateDirective, typeof i15.DragClueComponent, typeof i16.DropHintTemplateDirective, typeof i17.DropHintComponent, typeof i18.DragAndDropEditingDirective, typeof i19.LoadMoreDirective, typeof i20.LoadMoreButtonTemplateDirective, typeof i21.LocalizedMessagesDirective, typeof i22.CustomMessagesComponent]>;
|
|
38
37
|
static ɵinj: i0.ɵɵInjectorDeclaration<SharedModule>;
|
|
39
38
|
}
|
|
@@ -99,6 +99,10 @@ export declare class TreeViewGroupComponent implements OnChanges, OnInit, OnDest
|
|
|
99
99
|
checkNode(index: string): void;
|
|
100
100
|
nodeIndex(index: number): string;
|
|
101
101
|
nodeText(dataItem: any): any;
|
|
102
|
+
getCheckBoxState(item: object, index: any): any;
|
|
103
|
+
getCheckboxAttributes(index: number): {
|
|
104
|
+
[key: string]: string;
|
|
105
|
+
};
|
|
102
106
|
ngOnDestroy(): void;
|
|
103
107
|
ngOnInit(): void;
|
|
104
108
|
ngOnChanges(changes: any): void;
|
|
@@ -1,62 +0,0 @@
|
|
|
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, DoCheck, ElementRef, EventEmitter, OnInit, Renderer2 } from '@angular/core';
|
|
6
|
-
import { TreeViewSize } from '../size';
|
|
7
|
-
import { CheckedState } from './checked-state';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*
|
|
12
|
-
* Represents the CheckBox component of the Kendo UI TreeView for Angular.
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
export declare class CheckBoxComponent implements OnInit, DoCheck {
|
|
16
|
-
private element;
|
|
17
|
-
private renderer;
|
|
18
|
-
private changeDetector;
|
|
19
|
-
get classWrapper(): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Specifies the [`id`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) of the component.
|
|
22
|
-
*/
|
|
23
|
-
id: string;
|
|
24
|
-
/**
|
|
25
|
-
* A function that determines if node is checked.
|
|
26
|
-
*/
|
|
27
|
-
isChecked: any;
|
|
28
|
-
/**
|
|
29
|
-
* The node item.
|
|
30
|
-
*/
|
|
31
|
-
node: any;
|
|
32
|
-
/**
|
|
33
|
-
* The node index.
|
|
34
|
-
*/
|
|
35
|
-
index: string;
|
|
36
|
-
/**
|
|
37
|
-
* Specifies the value for the aria-labelledby attribute.
|
|
38
|
-
*/
|
|
39
|
-
labelledby: any;
|
|
40
|
-
/**
|
|
41
|
-
* Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
42
|
-
*/
|
|
43
|
-
tabindex: number;
|
|
44
|
-
/**
|
|
45
|
-
* Specifies the size of the component.
|
|
46
|
-
*/
|
|
47
|
-
size: TreeViewSize;
|
|
48
|
-
/**
|
|
49
|
-
* Fires when the user changes the check state of the component.
|
|
50
|
-
*/
|
|
51
|
-
checkStateChange: EventEmitter<CheckedState>;
|
|
52
|
-
get indeterminate(): boolean;
|
|
53
|
-
get checked(): boolean;
|
|
54
|
-
get checkBoxClasses(): any;
|
|
55
|
-
private checkState;
|
|
56
|
-
constructor(element: ElementRef, renderer: Renderer2, changeDetector: ChangeDetectorRef);
|
|
57
|
-
ngOnInit(): void;
|
|
58
|
-
ngDoCheck(): void;
|
|
59
|
-
handleChange(e: any): void;
|
|
60
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CheckBoxComponent, never>;
|
|
61
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CheckBoxComponent, "kendo-checkbox", never, { "id": "id"; "isChecked": "isChecked"; "node": "node"; "index": "index"; "labelledby": "labelledby"; "tabindex": "tabindex"; "size": "size"; }, { "checkStateChange": "checkStateChange"; }, never, never>;
|
|
62
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
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 * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "./checkbox.component";
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*
|
|
10
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the CheckBox component.
|
|
11
|
-
*/
|
|
12
|
-
export declare class CheckBoxModule {
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CheckBoxModule, never>;
|
|
14
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CheckBoxModule, [typeof i1.CheckBoxComponent], never, [typeof i1.CheckBoxComponent]>;
|
|
15
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<CheckBoxModule>;
|
|
16
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
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, Component, ElementRef, EventEmitter, HostBinding, Input, Output, Renderer2 } from '@angular/core';
|
|
6
|
-
import { guid } from '@progress/kendo-angular-common';
|
|
7
|
-
import { getSizeClass } from '../utils';
|
|
8
|
-
import * as i0 from "@angular/core";
|
|
9
|
-
/**
|
|
10
|
-
* @hidden
|
|
11
|
-
*
|
|
12
|
-
* Represents the CheckBox component of the Kendo UI TreeView for Angular.
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
export class CheckBoxComponent {
|
|
16
|
-
constructor(element, renderer, changeDetector) {
|
|
17
|
-
this.element = element;
|
|
18
|
-
this.renderer = renderer;
|
|
19
|
-
this.changeDetector = changeDetector;
|
|
20
|
-
/**
|
|
21
|
-
* Specifies the [`id`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) of the component.
|
|
22
|
-
*/
|
|
23
|
-
this.id = `_${guid()}`;
|
|
24
|
-
/**
|
|
25
|
-
* Specifies the [`tabindex`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of the component.
|
|
26
|
-
*/
|
|
27
|
-
this.tabindex = 0;
|
|
28
|
-
/**
|
|
29
|
-
* Specifies the size of the component.
|
|
30
|
-
*/
|
|
31
|
-
this.size = 'medium';
|
|
32
|
-
/**
|
|
33
|
-
* Fires when the user changes the check state of the component.
|
|
34
|
-
*/
|
|
35
|
-
this.checkStateChange = new EventEmitter();
|
|
36
|
-
this.checkState = 'none';
|
|
37
|
-
}
|
|
38
|
-
//XXX: implement ComponentValueAccessor
|
|
39
|
-
//XXX: focus/blur methods
|
|
40
|
-
get classWrapper() { return true; }
|
|
41
|
-
get indeterminate() {
|
|
42
|
-
return this.checkState === 'indeterminate';
|
|
43
|
-
}
|
|
44
|
-
get checked() {
|
|
45
|
-
return this.checkState === 'checked';
|
|
46
|
-
}
|
|
47
|
-
get checkBoxClasses() {
|
|
48
|
-
return `k-checkbox ${this.size ? getSizeClass('checkbox', this.size) : ''} k-rounded-md`;
|
|
49
|
-
}
|
|
50
|
-
ngOnInit() {
|
|
51
|
-
this.renderer.removeAttribute(this.element.nativeElement, "tabindex");
|
|
52
|
-
}
|
|
53
|
-
ngDoCheck() {
|
|
54
|
-
this.checkState = this.isChecked(this.node, this.index);
|
|
55
|
-
}
|
|
56
|
-
handleChange(e) {
|
|
57
|
-
const state = e.target.checked ? 'checked' : 'none';
|
|
58
|
-
// update the View State so that Angular updates the input if the isChecked value is the same
|
|
59
|
-
this.checkState = state;
|
|
60
|
-
this.changeDetector.detectChanges();
|
|
61
|
-
this.checkStateChange.emit(state);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
CheckBoxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
-
CheckBoxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: { id: "id", isChecked: "isChecked", node: "node", index: "index", labelledby: "labelledby", tabindex: "tabindex", size: "size" }, outputs: { checkStateChange: "checkStateChange" }, host: { properties: { "class.k-checkbox-wrap": "this.classWrapper" } }, ngImport: i0, template: `
|
|
66
|
-
<input
|
|
67
|
-
type="checkbox"
|
|
68
|
-
[class]="checkBoxClasses"
|
|
69
|
-
[id]="id"
|
|
70
|
-
[checked]="checked"
|
|
71
|
-
[indeterminate]="indeterminate"
|
|
72
|
-
[tabindex]="tabindex"
|
|
73
|
-
(change)="handleChange($event)"
|
|
74
|
-
role="none"
|
|
75
|
-
[attr.aria-hidden]="'true'"
|
|
76
|
-
[attr.aria-labelledby]="labelledby"
|
|
77
|
-
/>
|
|
78
|
-
`, isInline: true });
|
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxComponent, decorators: [{
|
|
80
|
-
type: Component,
|
|
81
|
-
args: [{
|
|
82
|
-
selector: 'kendo-checkbox',
|
|
83
|
-
template: `
|
|
84
|
-
<input
|
|
85
|
-
type="checkbox"
|
|
86
|
-
[class]="checkBoxClasses"
|
|
87
|
-
[id]="id"
|
|
88
|
-
[checked]="checked"
|
|
89
|
-
[indeterminate]="indeterminate"
|
|
90
|
-
[tabindex]="tabindex"
|
|
91
|
-
(change)="handleChange($event)"
|
|
92
|
-
role="none"
|
|
93
|
-
[attr.aria-hidden]="'true'"
|
|
94
|
-
[attr.aria-labelledby]="labelledby"
|
|
95
|
-
/>
|
|
96
|
-
`
|
|
97
|
-
}]
|
|
98
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { classWrapper: [{
|
|
99
|
-
type: HostBinding,
|
|
100
|
-
args: ['class.k-checkbox-wrap']
|
|
101
|
-
}], id: [{
|
|
102
|
-
type: Input
|
|
103
|
-
}], isChecked: [{
|
|
104
|
-
type: Input
|
|
105
|
-
}], node: [{
|
|
106
|
-
type: Input
|
|
107
|
-
}], index: [{
|
|
108
|
-
type: Input
|
|
109
|
-
}], labelledby: [{
|
|
110
|
-
type: Input
|
|
111
|
-
}], tabindex: [{
|
|
112
|
-
type: Input
|
|
113
|
-
}], size: [{
|
|
114
|
-
type: Input
|
|
115
|
-
}], checkStateChange: [{
|
|
116
|
-
type: Output
|
|
117
|
-
}] } });
|
|
@@ -1,27 +0,0 @@
|
|
|
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 { NgModule } from '@angular/core';
|
|
6
|
-
import { CheckBoxComponent } from './checkbox.component';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
const COMPONENT_DIRECTIVES = [
|
|
9
|
-
CheckBoxComponent
|
|
10
|
-
];
|
|
11
|
-
/**
|
|
12
|
-
* @hidden
|
|
13
|
-
*
|
|
14
|
-
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the CheckBox component.
|
|
15
|
-
*/
|
|
16
|
-
export class CheckBoxModule {
|
|
17
|
-
}
|
|
18
|
-
CheckBoxModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
19
|
-
CheckBoxModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxModule, declarations: [CheckBoxComponent], exports: [CheckBoxComponent] });
|
|
20
|
-
CheckBoxModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxModule });
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CheckBoxModule, decorators: [{
|
|
22
|
-
type: NgModule,
|
|
23
|
-
args: [{
|
|
24
|
-
declarations: [COMPONENT_DIRECTIVES],
|
|
25
|
-
exports: [COMPONENT_DIRECTIVES]
|
|
26
|
-
}]
|
|
27
|
-
}] });
|