@progress/kendo-angular-treeview 23.3.0 → 23.3.1-develop.2
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/fesm2022/progress-kendo-angular-treeview.mjs +34 -14
- package/filtering-base.d.ts +1 -0
- package/navigation/navigation-state.interface.d.ts +1 -0
- package/navigation/navigation.service.d.ts +5 -3
- package/package-metadata.mjs +2 -2
- package/package.json +7 -7
- package/schematics/ngAdd/index.js +4 -4
|
@@ -28,8 +28,8 @@ const packageMetadata = {
|
|
|
28
28
|
productName: 'Kendo UI for Angular',
|
|
29
29
|
productCode: 'KENDOUIANGULAR',
|
|
30
30
|
productCodes: ['KENDOUIANGULAR'],
|
|
31
|
-
publishDate:
|
|
32
|
-
version: '23.3.
|
|
31
|
+
publishDate: 1775563625,
|
|
32
|
+
version: '23.3.1-develop.2',
|
|
33
33
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -629,6 +629,7 @@ class NavigationService {
|
|
|
629
629
|
activeItem;
|
|
630
630
|
isFocused = false;
|
|
631
631
|
shouldScroll = false;
|
|
632
|
+
shouldFocus = true;
|
|
632
633
|
_model = new NavigationModel();
|
|
633
634
|
get activeIndex() {
|
|
634
635
|
return nodeIndex(this.activeItem) || null;
|
|
@@ -647,29 +648,31 @@ class NavigationService {
|
|
|
647
648
|
this.moveToFirstVisibleChild = this.moveToFirstVisibleChild.bind(this);
|
|
648
649
|
this.moveToParent = this.moveToParent.bind(this);
|
|
649
650
|
}
|
|
650
|
-
activate(item, shouldScroll = false) {
|
|
651
|
+
activate(item, shouldScroll = false, shouldFocus = true) {
|
|
651
652
|
if (!this.navigable || !item || this.isActive(nodeIndex(item))) {
|
|
652
653
|
return;
|
|
653
654
|
}
|
|
654
655
|
this.isFocused = true;
|
|
655
656
|
this.activeItem = item || this.activeItem;
|
|
656
657
|
this.shouldScroll = shouldScroll;
|
|
658
|
+
this.shouldFocus = shouldFocus;
|
|
657
659
|
this.notifyMove();
|
|
658
660
|
}
|
|
659
|
-
activateParent(index) {
|
|
660
|
-
this.activate(this.model.findParent(index));
|
|
661
|
+
activateParent(index, shouldFocus = true) {
|
|
662
|
+
this.activate(this.model.findParent(index), false, shouldFocus);
|
|
661
663
|
}
|
|
662
|
-
activateIndex(index) {
|
|
664
|
+
activateIndex(index, shouldFocus = true) {
|
|
663
665
|
if (!index) {
|
|
664
666
|
return;
|
|
665
667
|
}
|
|
666
|
-
this.activate(this.model.findNode(index));
|
|
668
|
+
this.activate(this.model.findNode(index), false, shouldFocus);
|
|
667
669
|
}
|
|
668
670
|
activateClosest(index) {
|
|
669
671
|
if (!index || nodeIndex(this.focusableItem) !== index) {
|
|
670
672
|
return;
|
|
671
673
|
}
|
|
672
674
|
this.activeItem = this.model.closestNode(index);
|
|
675
|
+
this.shouldFocus = this.isTreeViewActive;
|
|
673
676
|
this.notifyMove();
|
|
674
677
|
}
|
|
675
678
|
activateFocusable() {
|
|
@@ -677,6 +680,16 @@ class NavigationService {
|
|
|
677
680
|
return;
|
|
678
681
|
}
|
|
679
682
|
this.activeItem = this.model.firstVisibleNode();
|
|
683
|
+
this.shouldFocus = this.isTreeViewActive;
|
|
684
|
+
this.notifyMove();
|
|
685
|
+
}
|
|
686
|
+
setFocusableItem(index) {
|
|
687
|
+
const item = this.model.findNode(index);
|
|
688
|
+
if (!item || item.disabled) {
|
|
689
|
+
return;
|
|
690
|
+
}
|
|
691
|
+
this.activeItem = item;
|
|
692
|
+
this.shouldFocus = this.isTreeViewActive;
|
|
680
693
|
this.notifyMove();
|
|
681
694
|
}
|
|
682
695
|
deactivate() {
|
|
@@ -684,6 +697,7 @@ class NavigationService {
|
|
|
684
697
|
return;
|
|
685
698
|
}
|
|
686
699
|
this.isFocused = false;
|
|
700
|
+
this.shouldFocus = false;
|
|
687
701
|
this.notifyMove();
|
|
688
702
|
}
|
|
689
703
|
checkIndex(index) {
|
|
@@ -739,7 +753,7 @@ class NavigationService {
|
|
|
739
753
|
}
|
|
740
754
|
unregisterItem(id, index) {
|
|
741
755
|
if (this.isActive(index)) {
|
|
742
|
-
this.activateParent(index);
|
|
756
|
+
this.activateParent(index, false);
|
|
743
757
|
}
|
|
744
758
|
this.model.unregisterItem(id, index);
|
|
745
759
|
}
|
|
@@ -784,7 +798,7 @@ class NavigationService {
|
|
|
784
798
|
this.moves.next(this.navigationState());
|
|
785
799
|
}
|
|
786
800
|
navigationState(expand = false) {
|
|
787
|
-
return ({ expand, index: this.activeIndex, isFocused: this.isFocused, shouldScroll: this.shouldScroll });
|
|
801
|
+
return ({ expand, index: this.activeIndex, isFocused: this.isFocused, shouldScroll: this.shouldScroll, shouldFocus: this.shouldFocus });
|
|
788
802
|
}
|
|
789
803
|
handleEnter(event) {
|
|
790
804
|
if (!this.navigable) {
|
|
@@ -1294,7 +1308,7 @@ class TreeViewItemDirective {
|
|
|
1294
1308
|
this.navigationService.moves
|
|
1295
1309
|
.subscribe((navState) => {
|
|
1296
1310
|
this.updateTabIndex();
|
|
1297
|
-
this.focusItem(navState.shouldScroll);
|
|
1311
|
+
this.focusItem(navState.shouldScroll, navState.shouldFocus);
|
|
1298
1312
|
}),
|
|
1299
1313
|
this.navigationService.expands
|
|
1300
1314
|
.pipe(filter(({ index }) => index === this.index && !this.isDisabled))
|
|
@@ -1314,7 +1328,7 @@ class TreeViewItemDirective {
|
|
|
1314
1328
|
const index = this.index;
|
|
1315
1329
|
selectionService.setFirstSelected(index, this.isSelected);
|
|
1316
1330
|
if (!navigationService.isActive(index) && selectionService.isFirstSelected(index)) {
|
|
1317
|
-
navigationService.activateIndex(index);
|
|
1331
|
+
navigationService.activateIndex(index, false);
|
|
1318
1332
|
}
|
|
1319
1333
|
}
|
|
1320
1334
|
expand(shouldExpand) {
|
|
@@ -1323,8 +1337,8 @@ class TreeViewItemDirective {
|
|
|
1323
1337
|
isFocusable() {
|
|
1324
1338
|
return !this.isDisabled && this.navigationService.isFocusable(this.index);
|
|
1325
1339
|
}
|
|
1326
|
-
focusItem(scrollIntoView = false) {
|
|
1327
|
-
if (this.isInitialized && this.navigationService.isActive(this.index)) {
|
|
1340
|
+
focusItem(scrollIntoView = false, shouldFocus = true) {
|
|
1341
|
+
if (this.isInitialized && this.navigationService.isActive(this.index) && shouldFocus) {
|
|
1328
1342
|
this.element.nativeElement.focus({ preventScroll: !scrollIntoView });
|
|
1329
1343
|
}
|
|
1330
1344
|
}
|
|
@@ -1346,9 +1360,12 @@ class TreeViewItemDirective {
|
|
|
1346
1360
|
}
|
|
1347
1361
|
updateNodeAvailability() {
|
|
1348
1362
|
const service = this.navigationService;
|
|
1349
|
-
if (this.isDisabled || !this.isVisible
|
|
1363
|
+
if (this.isDisabled || !this.isVisible) {
|
|
1350
1364
|
service.activateClosest(this.index); // activate before updating the item
|
|
1351
1365
|
}
|
|
1366
|
+
else if (this.isSelected) {
|
|
1367
|
+
service.setFocusableItem(this.index);
|
|
1368
|
+
}
|
|
1352
1369
|
else {
|
|
1353
1370
|
service.activateFocusable();
|
|
1354
1371
|
}
|
|
@@ -5143,6 +5160,7 @@ class FilteringBase {
|
|
|
5143
5160
|
*/
|
|
5144
5161
|
filterData;
|
|
5145
5162
|
visibleNodes = new Set();
|
|
5163
|
+
currentFilterTerm = '';
|
|
5146
5164
|
/**
|
|
5147
5165
|
* The settings which are applied when performing a filter on the component's data.
|
|
5148
5166
|
*/
|
|
@@ -5151,6 +5169,7 @@ class FilteringBase {
|
|
|
5151
5169
|
...DEFAULT_FILTER_SETTINGS,
|
|
5152
5170
|
...settings
|
|
5153
5171
|
};
|
|
5172
|
+
this.handleFilterChange(this.currentFilterTerm);
|
|
5154
5173
|
}
|
|
5155
5174
|
get filterSettings() {
|
|
5156
5175
|
return this._filterSettings;
|
|
@@ -5172,6 +5191,7 @@ class FilteringBase {
|
|
|
5172
5191
|
if (!this.filterData) {
|
|
5173
5192
|
return;
|
|
5174
5193
|
}
|
|
5194
|
+
this.currentFilterTerm = term;
|
|
5175
5195
|
this.resetNodesVisibility(this.filterData);
|
|
5176
5196
|
if (term) {
|
|
5177
5197
|
filterTree(this.filterData, term, this.filterSettings, this.component.textField);
|
package/filtering-base.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare abstract class FilteringBase {
|
|
|
16
16
|
*/
|
|
17
17
|
protected filterData: TreeItemFilterState[];
|
|
18
18
|
protected visibleNodes: Set<any>;
|
|
19
|
+
private currentFilterTerm;
|
|
19
20
|
/**
|
|
20
21
|
* The settings which are applied when performing a filter on the component's data.
|
|
21
22
|
*/
|
|
@@ -31,17 +31,19 @@ export declare class NavigationService {
|
|
|
31
31
|
private activeItem;
|
|
32
32
|
private isFocused;
|
|
33
33
|
private shouldScroll;
|
|
34
|
+
private shouldFocus;
|
|
34
35
|
private _model;
|
|
35
36
|
private get activeIndex();
|
|
36
37
|
private get isActiveExpanded();
|
|
37
38
|
private get isLoadMoreButton();
|
|
38
39
|
get focusableItem(): NavigationItem;
|
|
39
40
|
constructor(localization: LocalizationService);
|
|
40
|
-
activate(item: NavigationItem, shouldScroll?: boolean): void;
|
|
41
|
-
activateParent(index: string): void;
|
|
42
|
-
activateIndex(index: string): void;
|
|
41
|
+
activate(item: NavigationItem, shouldScroll?: boolean, shouldFocus?: boolean): void;
|
|
42
|
+
activateParent(index: string, shouldFocus?: boolean): void;
|
|
43
|
+
activateIndex(index: string, shouldFocus?: boolean): void;
|
|
43
44
|
activateClosest(index: string): void;
|
|
44
45
|
activateFocusable(): void;
|
|
46
|
+
setFocusableItem(index: string): void;
|
|
45
47
|
deactivate(): void;
|
|
46
48
|
checkIndex(index: string): void;
|
|
47
49
|
selectIndex(index: string): void;
|
package/package-metadata.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export const packageMetadata = {
|
|
|
7
7
|
"productCodes": [
|
|
8
8
|
"KENDOUIANGULAR"
|
|
9
9
|
],
|
|
10
|
-
"publishDate":
|
|
11
|
-
"version": "23.3.
|
|
10
|
+
"publishDate": 1775563625,
|
|
11
|
+
"version": "23.3.1-develop.2",
|
|
12
12
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
13
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-treeview",
|
|
3
|
-
"version": "23.3.
|
|
3
|
+
"version": "23.3.1-develop.2",
|
|
4
4
|
"description": "Kendo UI TreeView for Angular",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"package": {
|
|
20
20
|
"productName": "Kendo UI for Angular",
|
|
21
21
|
"productCode": "KENDOUIANGULAR",
|
|
22
|
-
"publishDate":
|
|
22
|
+
"publishDate": 1775563625,
|
|
23
23
|
"licensingDocsUrl": "https://www.telerik.com/kendo-angular-ui/my-license/"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"@angular/core": "19 - 21",
|
|
30
30
|
"@angular/platform-browser": "19 - 21",
|
|
31
31
|
"@progress/kendo-licensing": "^1.10.0",
|
|
32
|
-
"@progress/kendo-angular-common": "23.3.
|
|
33
|
-
"@progress/kendo-angular-inputs": "23.3.
|
|
34
|
-
"@progress/kendo-angular-icons": "23.3.
|
|
35
|
-
"@progress/kendo-angular-l10n": "23.3.
|
|
32
|
+
"@progress/kendo-angular-common": "23.3.1-develop.2",
|
|
33
|
+
"@progress/kendo-angular-inputs": "23.3.1-develop.2",
|
|
34
|
+
"@progress/kendo-angular-icons": "23.3.1-develop.2",
|
|
35
|
+
"@progress/kendo-angular-l10n": "23.3.1-develop.2",
|
|
36
36
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"tslib": "^2.3.1",
|
|
40
|
-
"@progress/kendo-angular-schematics": "23.3.
|
|
40
|
+
"@progress/kendo-angular-schematics": "23.3.1-develop.2",
|
|
41
41
|
"@progress/kendo-common": "^1.0.1",
|
|
42
42
|
"@progress/kendo-draggable": "^3.0.2"
|
|
43
43
|
},
|
|
@@ -9,10 +9,10 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
|
9
9
|
function default_1(options) {
|
|
10
10
|
const finalOptions = Object.assign(Object.assign({}, options), { mainNgModule: 'TreeViewModule', package: 'treeview', peerDependencies: {
|
|
11
11
|
// Peers of kendo-angular-inputs
|
|
12
|
-
'@progress/kendo-angular-buttons': '23.3.
|
|
13
|
-
'@progress/kendo-angular-dialog': '23.3.
|
|
14
|
-
'@progress/kendo-angular-intl': '23.3.
|
|
15
|
-
'@progress/kendo-angular-popup': '23.3.
|
|
12
|
+
'@progress/kendo-angular-buttons': '23.3.1-develop.2',
|
|
13
|
+
'@progress/kendo-angular-dialog': '23.3.1-develop.2',
|
|
14
|
+
'@progress/kendo-angular-intl': '23.3.1-develop.2',
|
|
15
|
+
'@progress/kendo-angular-popup': '23.3.1-develop.2',
|
|
16
16
|
'@progress/kendo-drawing': '^1.9.3',
|
|
17
17
|
// Peer dependency of icons
|
|
18
18
|
'@progress/kendo-svg-icons': '^4.0.0'
|