@progress/kendo-angular-treelist 12.0.2-develop.3 → 12.1.0-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/common/provider.service.d.ts +6 -0
- package/esm2020/common/provider.service.mjs +9 -3
- package/esm2020/filtering/cell/filter-cell-operators.component.mjs +1 -1
- package/esm2020/filtering/cell/numeric-filter-cell.component.mjs +1 -1
- package/esm2020/filtering/cell/string-filter-cell.component.mjs +1 -1
- package/esm2020/filtering/filter-row.component.mjs +2 -2
- package/esm2020/index.mjs +1 -0
- package/esm2020/localization/messages.mjs +7 -1
- package/esm2020/navigation/focus-group.mjs +1 -0
- package/esm2020/navigation/focus-root.mjs +18 -8
- package/esm2020/navigation/focusable.directive.mjs +28 -11
- package/esm2020/navigation/navigation.service.mjs +1 -1
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/pager/pager-input.component.mjs +16 -6
- package/esm2020/pager/pager-next-buttons.component.mjs +34 -15
- package/esm2020/pager/pager-numeric-buttons.component.mjs +12 -8
- package/esm2020/pager/pager-page-sizes.component.mjs +11 -5
- package/esm2020/pager/pager-prev-buttons.component.mjs +31 -14
- package/esm2020/pager/pager.component.mjs +232 -21
- package/esm2020/rendering/cell.component.mjs +3 -1
- package/esm2020/rendering/common/dom-queries.mjs +21 -1
- package/esm2020/rendering/header/header.component.mjs +10 -3
- package/esm2020/rendering/list.component.mjs +2 -2
- package/esm2020/rendering/table-body.component.mjs +6 -2
- package/esm2020/rendering/toolbar/toolbar-focusable.directive.mjs +63 -0
- package/esm2020/rendering/toolbar/toolbar-navigation.service.mjs +53 -0
- package/esm2020/rendering/toolbar/toolbar.component.mjs +44 -5
- package/esm2020/treelist.component.mjs +64 -11
- package/esm2020/treelist.module.mjs +8 -3
- package/esm2020/utils.mjs +4 -0
- package/fesm2015/progress-kendo-angular-treelist.mjs +636 -115
- package/fesm2020/progress-kendo-angular-treelist.mjs +631 -115
- package/index.d.ts +1 -0
- package/localization/messages.d.ts +20 -1
- package/navigation/focus-group.d.ts +2 -1
- package/navigation/focus-root.d.ts +8 -2
- package/navigation/focusable.directive.d.ts +7 -1
- package/package.json +15 -15
- package/pager/pager-input.component.d.ts +3 -1
- package/pager/pager-next-buttons.component.d.ts +12 -2
- package/pager/pager-page-sizes.component.d.ts +3 -2
- package/pager/pager-prev-buttons.component.d.ts +7 -1
- package/pager/pager.component.d.ts +35 -4
- package/rendering/common/dom-queries.d.ts +8 -0
- package/rendering/toolbar/toolbar-focusable.directive.d.ts +28 -0
- package/rendering/toolbar/toolbar-navigation.service.d.ts +21 -0
- package/rendering/toolbar/toolbar.component.d.ts +14 -4
- package/schematics/ngAdd/index.js +3 -3
- package/treelist.component.d.ts +7 -0
- package/treelist.module.d.ts +76 -75
- package/utils.d.ts +4 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Directive, ElementRef } from '@angular/core';
|
|
6
|
+
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
7
|
+
import { ContextService } from '../../common/provider.service';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
import * as i1 from "../../common/provider.service";
|
|
10
|
+
/**
|
|
11
|
+
* A directive applied to all toolbar elements that need to be a part of the TreeList
|
|
12
|
+
* keyboard navigation.
|
|
13
|
+
*/
|
|
14
|
+
export class TreeListToolbarFocusableDirective {
|
|
15
|
+
constructor(host, ctx) {
|
|
16
|
+
this.host = host;
|
|
17
|
+
this.ctx = ctx;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
*/
|
|
22
|
+
get element() {
|
|
23
|
+
return this.host.nativeElement;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
get toolbarPosition() {
|
|
29
|
+
return isDocumentAvailable() && this.host.nativeElement.closest('.k-toolbar')?.getAttribute('position');
|
|
30
|
+
}
|
|
31
|
+
ngAfterViewInit() {
|
|
32
|
+
if (!isDocumentAvailable() || !this.toolbarPosition) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
this.ctx[`${this.toolbarPosition}ToolbarNavigation`]?.navigableElements.push(this.element);
|
|
36
|
+
this.ctx[`${this.toolbarPosition}ToolbarNavigation`]?.notify();
|
|
37
|
+
}
|
|
38
|
+
ngOnDestroy() {
|
|
39
|
+
if (!isDocumentAvailable() || !this.toolbarPosition) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const elements = this.ctx[`${this.toolbarPosition}ToolbarNavigation`].navigableElements;
|
|
43
|
+
this.ctx[`${this.toolbarPosition}ToolbarNavigation`].navigableElements = elements.filter(el => el !== this.element);
|
|
44
|
+
this.ctx[`${this.toolbarPosition}ToolbarNavigation`].notify();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
TreeListToolbarFocusableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeListToolbarFocusableDirective, deps: [{ token: i0.ElementRef }, { token: i1.ContextService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
48
|
+
TreeListToolbarFocusableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: TreeListToolbarFocusableDirective, selector: "\n [kendoTreeListToolbarFocusable],\n [kendoTreeListAddCommand],\n [kendoTreeListCancelCommand],\n [kendoTreeListEditCommand],\n [kendoTreeListRemoveCommand],\n [kendoTreeListSaveCommand],\n [kendoTreeListExcelCommand],\n [kendoTreeListPDFCommand]\n ", ngImport: i0 });
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeListToolbarFocusableDirective, decorators: [{
|
|
50
|
+
type: Directive,
|
|
51
|
+
args: [{
|
|
52
|
+
selector: `
|
|
53
|
+
[kendoTreeListToolbarFocusable],
|
|
54
|
+
[kendoTreeListAddCommand],
|
|
55
|
+
[kendoTreeListCancelCommand],
|
|
56
|
+
[kendoTreeListEditCommand],
|
|
57
|
+
[kendoTreeListRemoveCommand],
|
|
58
|
+
[kendoTreeListSaveCommand],
|
|
59
|
+
[kendoTreeListExcelCommand],
|
|
60
|
+
[kendoTreeListPDFCommand]
|
|
61
|
+
`
|
|
62
|
+
}]
|
|
63
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.ContextService }]; } });
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**-----------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
|
+
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
+
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Injectable, Renderer2 } from '@angular/core';
|
|
6
|
+
import { isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export class TreeListToolbarNavigationService {
|
|
12
|
+
constructor(renderer) {
|
|
13
|
+
this.renderer = renderer;
|
|
14
|
+
this.navigableElements = [];
|
|
15
|
+
this.currentActiveIndex = 0;
|
|
16
|
+
this.defaultFocusableSelector = `
|
|
17
|
+
[kendoTreeListToolbarFocusable],
|
|
18
|
+
[kendoTreeListAddCommand],
|
|
19
|
+
[kendoTreeListCancelCommand],
|
|
20
|
+
[kendoTreeListEditCommand],
|
|
21
|
+
[kendoTreeListRemoveCommand],
|
|
22
|
+
[kendoTreeListSaveCommand],
|
|
23
|
+
[kendoTreeListExcelCommand],
|
|
24
|
+
[kendoTreeListPDFCommand]
|
|
25
|
+
`;
|
|
26
|
+
}
|
|
27
|
+
notify() {
|
|
28
|
+
// ensure focusable elements are in the same order as in the DOM
|
|
29
|
+
this.navigableElements = this.navigableElements.length && Array.from(this.navigableElements[0].parentElement.querySelectorAll(this.defaultFocusableSelector)) || [];
|
|
30
|
+
this.currentActiveIndex = 0;
|
|
31
|
+
this.updateFocus();
|
|
32
|
+
}
|
|
33
|
+
focus() {
|
|
34
|
+
this.navigableElements[this.currentActiveIndex]?.focus();
|
|
35
|
+
}
|
|
36
|
+
updateFocus() {
|
|
37
|
+
if (!this.navigableElements.length) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
this.navigableElements.forEach(el => {
|
|
41
|
+
this.renderer.setAttribute(el, 'tabindex', '-1');
|
|
42
|
+
});
|
|
43
|
+
this.renderer.setAttribute(this.navigableElements[this.currentActiveIndex], 'tabindex', '0');
|
|
44
|
+
if (isDocumentAvailable() && document.activeElement.closest('.k-toolbar')) {
|
|
45
|
+
this.navigableElements[this.currentActiveIndex].focus();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
TreeListToolbarNavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeListToolbarNavigationService, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
50
|
+
TreeListToolbarNavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeListToolbarNavigationService });
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeListToolbarNavigationService, decorators: [{
|
|
52
|
+
type: Injectable
|
|
53
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }]; } });
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-inferrable-types */
|
|
6
|
+
import { Component, Input, HostBinding, Renderer2, ElementRef } from '@angular/core';
|
|
6
7
|
import { ContextService } from './../../common/provider.service';
|
|
8
|
+
import { Subscription } from 'rxjs';
|
|
9
|
+
import { Keys, isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
7
10
|
import * as i0 from "@angular/core";
|
|
8
11
|
import * as i1 from "./../../common/provider.service";
|
|
9
12
|
import * as i2 from "@angular/common";
|
|
@@ -11,9 +14,14 @@ import * as i2 from "@angular/common";
|
|
|
11
14
|
* @hidden
|
|
12
15
|
*/
|
|
13
16
|
export class ToolbarComponent {
|
|
14
|
-
constructor(ctx) {
|
|
17
|
+
constructor(elem, renderer, ctx) {
|
|
18
|
+
this.elem = elem;
|
|
19
|
+
this.renderer = renderer;
|
|
15
20
|
this.ctx = ctx;
|
|
21
|
+
this.hostRole = 'toolbar';
|
|
16
22
|
this.context = {};
|
|
23
|
+
this.subs = new Subscription();
|
|
24
|
+
this.navigationService = this.ctx[`${this.elem.nativeElement.getAttribute('position')}ToolbarNavigation`];
|
|
17
25
|
}
|
|
18
26
|
set position(value) {
|
|
19
27
|
this.context.position = value;
|
|
@@ -21,9 +29,35 @@ export class ToolbarComponent {
|
|
|
21
29
|
get toolbarTemplateRef() {
|
|
22
30
|
return this.ctx.treelist.toolbarTemplate ? this.ctx.treelist.toolbarTemplate.templateRef : undefined;
|
|
23
31
|
}
|
|
32
|
+
ngAfterViewInit() {
|
|
33
|
+
const element = this.elem.nativeElement;
|
|
34
|
+
this.subs.add(this.renderer.listen(element, 'keydown', event => this.onKeyDown(event)));
|
|
35
|
+
}
|
|
36
|
+
ngOnDestroy() {
|
|
37
|
+
this.subs.unsubscribe();
|
|
38
|
+
}
|
|
39
|
+
onKeyDown(event) {
|
|
40
|
+
if (this.navigable && isDocumentAvailable() && this.navigationService.navigableElements.length) {
|
|
41
|
+
const keyCode = event.keyCode;
|
|
42
|
+
if (keyCode === Keys.ArrowLeft || keyCode === Keys.ArrowRight) {
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
const dir = keyCode === Keys.ArrowLeft ? -1 : 1;
|
|
45
|
+
this.changeFocusedItem(dir);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
changeFocusedItem(dir) {
|
|
50
|
+
this.navigationService.currentActiveIndex += dir;
|
|
51
|
+
const bottomRange = this.navigationService.currentActiveIndex < 0;
|
|
52
|
+
const topRange = this.navigationService.currentActiveIndex >= this.navigationService.navigableElements.length;
|
|
53
|
+
if (bottomRange || topRange) {
|
|
54
|
+
this.navigationService.currentActiveIndex = bottomRange ? this.navigationService.navigableElements.length - 1 : 0;
|
|
55
|
+
}
|
|
56
|
+
this.navigationService.updateFocus();
|
|
57
|
+
}
|
|
24
58
|
}
|
|
25
|
-
ToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ToolbarComponent, deps: [{ token: i1.ContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
26
|
-
ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ToolbarComponent, selector: "kendo-treelist-toolbar", inputs: { position: "position" }, ngImport: i0, template: `
|
|
59
|
+
ToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ToolbarComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.ContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
60
|
+
ToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: ToolbarComponent, selector: "kendo-treelist-toolbar", inputs: { position: "position", navigable: "navigable" }, host: { properties: { "attr.role": "this.hostRole" } }, ngImport: i0, template: `
|
|
27
61
|
<ng-template
|
|
28
62
|
*ngIf="toolbarTemplateRef"
|
|
29
63
|
[ngTemplateOutlet]="toolbarTemplateRef"
|
|
@@ -44,6 +78,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
44
78
|
</ng-template>
|
|
45
79
|
`
|
|
46
80
|
}]
|
|
47
|
-
}], ctorParameters: function () { return [{ type: i1.ContextService }]; }, propDecorators: {
|
|
81
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.ContextService }]; }, propDecorators: { hostRole: [{
|
|
82
|
+
type: HostBinding,
|
|
83
|
+
args: ['attr.role']
|
|
84
|
+
}], position: [{
|
|
85
|
+
type: Input
|
|
86
|
+
}], navigable: [{
|
|
48
87
|
type: Input
|
|
49
88
|
}] } });
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright © 2023 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
5
6
|
import { Component, ContentChildren, ElementRef, EventEmitter, HostBinding, Input, Output, Renderer2, QueryList, ViewChild, isDevMode, NgZone, ViewChildren, ChangeDetectorRef, ViewEncapsulation, ChangeDetectionStrategy, forwardRef } from '@angular/core';
|
|
6
7
|
import { FormControl, FormGroup } from '@angular/forms';
|
|
7
8
|
import { Subscription, merge, isObservable } from 'rxjs';
|
|
@@ -64,6 +65,7 @@ import { SelectionService } from './selection/selection.service';
|
|
|
64
65
|
import { DataBoundTreeComponent } from './binding-directives/data-bound-tree-component';
|
|
65
66
|
import { ExpandableTreeComponent } from './expand-state/expandable-tree-component';
|
|
66
67
|
import { ContextService } from './common/provider.service';
|
|
68
|
+
import { guid } from '@progress/kendo-angular-common';
|
|
67
69
|
import * as i0 from "@angular/core";
|
|
68
70
|
import * as i1 from "./layout/browser-support.service";
|
|
69
71
|
import * as i2 from "./data/change-notification.service";
|
|
@@ -146,6 +148,7 @@ export class TreeListComponent {
|
|
|
146
148
|
this.expandStateService = expandStateService;
|
|
147
149
|
this.optionChanges = optionChanges;
|
|
148
150
|
this.selectionService = selectionService;
|
|
151
|
+
this.localization = localization;
|
|
149
152
|
this.ctx = ctx;
|
|
150
153
|
/**
|
|
151
154
|
* Defines the page size used by the TreeList when [paging]({% slug paging_treelist %}) is enabled.
|
|
@@ -401,6 +404,7 @@ export class TreeListComponent {
|
|
|
401
404
|
this.idGetter = getter(undefined);
|
|
402
405
|
this.localEditService = new LocalEditService();
|
|
403
406
|
this.view = new ViewCollection(this.viewFieldAccessor.bind(this), this.expandStateService, this.editService, this.selectionService);
|
|
407
|
+
this.ariaRootId = `k-${guid()}`;
|
|
404
408
|
this.dataChanged = false;
|
|
405
409
|
this._hasChildren = (() => false);
|
|
406
410
|
this.subscriptions = new Subscription();
|
|
@@ -751,6 +755,9 @@ export class TreeListComponent {
|
|
|
751
755
|
return this.selectionService.enableMultiple;
|
|
752
756
|
}
|
|
753
757
|
}
|
|
758
|
+
get navigation() {
|
|
759
|
+
return this.navigationService;
|
|
760
|
+
}
|
|
754
761
|
get isVirtual() {
|
|
755
762
|
return this.scrollable === 'virtual';
|
|
756
763
|
}
|
|
@@ -1242,6 +1249,12 @@ export class TreeListComponent {
|
|
|
1242
1249
|
this.changeDetectorRef.markForCheck();
|
|
1243
1250
|
this.pageChange.emit(event);
|
|
1244
1251
|
}
|
|
1252
|
+
/**
|
|
1253
|
+
* @hidden
|
|
1254
|
+
*/
|
|
1255
|
+
messageFor(token) {
|
|
1256
|
+
return this.localization.get(token);
|
|
1257
|
+
}
|
|
1245
1258
|
/**
|
|
1246
1259
|
* @hidden
|
|
1247
1260
|
*/
|
|
@@ -1927,6 +1940,9 @@ TreeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
1927
1940
|
i18n-noRecords="kendo.treelist.noRecords|The label visible in the TreeList when there are no records"
|
|
1928
1941
|
noRecords="No records available."
|
|
1929
1942
|
|
|
1943
|
+
i18n-pagerLabel="kendo.treelist.pagerLabel|The label for the TreeList pager"
|
|
1944
|
+
pagerLabel="{{ 'Page navigation, page {currentPage} of {totalPages}' }}"
|
|
1945
|
+
|
|
1930
1946
|
i18n-pagerFirstPage="kendo.treelist.pagerFirstPage|The label for the first page button in TreeList pager"
|
|
1931
1947
|
pagerFirstPage="Go to the first page"
|
|
1932
1948
|
|
|
@@ -2073,15 +2089,26 @@ TreeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
2073
2089
|
|
|
2074
2090
|
i18n-selectPage="kendo.treelist.selectPage|The text of the title and aria-label attributes applied to the page chooser in the TreeList Pager"
|
|
2075
2091
|
selectPage="Select page"
|
|
2092
|
+
|
|
2093
|
+
i18n-topToolbarLabel="kendo.treelist.topToolbarLabel|The label of the TreeList top toolbar"
|
|
2094
|
+
topToolbarLabel="Top toolbar"
|
|
2095
|
+
|
|
2096
|
+
i18n-bottomToolbarLabel="kendo.treelist.bottomToolbarLabel|The label of the TreeList bottom toolbar"
|
|
2097
|
+
bottomToolbarLabel="Bottom toolbar"
|
|
2076
2098
|
>
|
|
2077
2099
|
</ng-container>
|
|
2078
2100
|
<kendo-treelist-toolbar
|
|
2079
2101
|
*ngIf="showTopToolbar"
|
|
2080
|
-
position="top"
|
|
2081
|
-
|
|
2102
|
+
position="top"
|
|
2103
|
+
[navigable]="navigable"
|
|
2104
|
+
class="k-toolbar k-grid-toolbar k-toolbar-md"
|
|
2105
|
+
[attr.aria-label]="messageFor('topToolbarLabel')"
|
|
2106
|
+
[attr.aria-controls]="ariaRootId">
|
|
2107
|
+
</kendo-treelist-toolbar>
|
|
2082
2108
|
<div #ariaRoot
|
|
2083
2109
|
class="k-grid-aria-root"
|
|
2084
2110
|
role="treegrid"
|
|
2111
|
+
[id]="ariaRootId"
|
|
2085
2112
|
[attr.aria-rowcount]="ariaRowCount"
|
|
2086
2113
|
[attr.aria-colcount]="ariaColCount"
|
|
2087
2114
|
[attr.aria-multiselectable]="ariaMultiselectable"
|
|
@@ -2135,7 +2162,7 @@ TreeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
2135
2162
|
</colgroup>
|
|
2136
2163
|
<thead kendoTreeListHeader
|
|
2137
2164
|
[resizable]="resizable"
|
|
2138
|
-
role="
|
|
2165
|
+
role="rowgroup"
|
|
2139
2166
|
[scrollable]="true"
|
|
2140
2167
|
[columns]="headerColumns"
|
|
2141
2168
|
[totalColumnLevels]="totalColumnLevels"
|
|
@@ -2224,14 +2251,20 @@ TreeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
2224
2251
|
[total]="view.totalVisible"
|
|
2225
2252
|
[allCount]="view.total"
|
|
2226
2253
|
[skip]="skip"
|
|
2254
|
+
[navigable]="navigable"
|
|
2255
|
+
[attr.aria-controls]="ariaRootId"
|
|
2227
2256
|
[options]="pageable"
|
|
2228
2257
|
(pageChange)="notifyPageChange('pager', $event)">
|
|
2229
2258
|
</kendo-treelist-pager>
|
|
2230
2259
|
<kendo-treelist-toolbar
|
|
2231
2260
|
*ngIf="showBottomToolbar"
|
|
2232
2261
|
class="k-toolbar k-grid-toolbar k-grid-toolbar-bottom k-toolbar-md"
|
|
2233
|
-
position="bottom"
|
|
2234
|
-
|
|
2262
|
+
position="bottom"
|
|
2263
|
+
[navigable]="navigable"
|
|
2264
|
+
[attr.aria-label]="messageFor('bottomToolbarLabel')"
|
|
2265
|
+
[attr.aria-controls]="ariaRootId">
|
|
2266
|
+
</kendo-treelist-toolbar>
|
|
2267
|
+
`, isInline: true, components: [{ type: i21.ToolbarComponent, selector: "kendo-treelist-toolbar", inputs: ["position", "navigable"] }, { type: i22.ColGroupComponent, selector: "[kendoTreeListColGroup]", inputs: ["columns"] }, { type: i23.HeaderComponent, selector: "[kendoTreeListHeader]", inputs: ["totalColumnLevels", "columns", "scrollable", "filterable", "sort", "filter", "sortable", "lockedColumnsCount", "resizable", "reorderable", "columnMenu", "columnMenuTemplate", "totalColumnsCount"] }, { type: i24.ListComponent, selector: "kendo-treelist-list", inputs: ["view", "total", "rowHeight", "take", "skip", "columns", "noRecordsTemplate", "filterable", "rowClass", "loading", "trackBy", "virtualColumns", "isVirtual", "expandIcons"], outputs: ["contentScroll", "pageChange", "scrollBottom"] }, { type: i25.TableBodyComponent, selector: "[kendoTreeListTableBody]", inputs: ["columns", "allColumns", "noRecordsTemplate", "view", "skip", "filterable", "noRecordsText", "isLocked", "lockedColumnsCount", "totalColumnsCount", "virtualColumns", "expandIcons", "trackBy", "rowClass"] }, { type: i26.LoadingComponent, selector: "[kendoTreeListLoading]" }, { type: i27.PagerComponent, selector: "kendo-treelist-pager", inputs: ["allCount", "total", "skip", "navigable", "pageSize", "options", "template"], outputs: ["pageChange"] }], directives: [{ type: i28.LocalizedMessagesDirective, selector: "[kendoTreeListLocalizedMessages]" }, { type: i29.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i30.TableDirective, selector: "table", inputs: ["locked", "virtualColumns"] }, { type: i31.ResizableContainerDirective, selector: "[kendoTreeListResizableContainer]", inputs: ["lockedWidth", "kendoTreeListResizableContainer"] }, { type: i32.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: i33.MarqueeDirective, selector: "[kendoTreeListSelectionMarquee]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2235
2268
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeListComponent, decorators: [{
|
|
2236
2269
|
type: Component,
|
|
2237
2270
|
args: [{
|
|
@@ -2288,6 +2321,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2288
2321
|
i18n-noRecords="kendo.treelist.noRecords|The label visible in the TreeList when there are no records"
|
|
2289
2322
|
noRecords="No records available."
|
|
2290
2323
|
|
|
2324
|
+
i18n-pagerLabel="kendo.treelist.pagerLabel|The label for the TreeList pager"
|
|
2325
|
+
pagerLabel="{{ 'Page navigation, page {currentPage} of {totalPages}' }}"
|
|
2326
|
+
|
|
2291
2327
|
i18n-pagerFirstPage="kendo.treelist.pagerFirstPage|The label for the first page button in TreeList pager"
|
|
2292
2328
|
pagerFirstPage="Go to the first page"
|
|
2293
2329
|
|
|
@@ -2434,15 +2470,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2434
2470
|
|
|
2435
2471
|
i18n-selectPage="kendo.treelist.selectPage|The text of the title and aria-label attributes applied to the page chooser in the TreeList Pager"
|
|
2436
2472
|
selectPage="Select page"
|
|
2473
|
+
|
|
2474
|
+
i18n-topToolbarLabel="kendo.treelist.topToolbarLabel|The label of the TreeList top toolbar"
|
|
2475
|
+
topToolbarLabel="Top toolbar"
|
|
2476
|
+
|
|
2477
|
+
i18n-bottomToolbarLabel="kendo.treelist.bottomToolbarLabel|The label of the TreeList bottom toolbar"
|
|
2478
|
+
bottomToolbarLabel="Bottom toolbar"
|
|
2437
2479
|
>
|
|
2438
2480
|
</ng-container>
|
|
2439
2481
|
<kendo-treelist-toolbar
|
|
2440
2482
|
*ngIf="showTopToolbar"
|
|
2441
|
-
position="top"
|
|
2442
|
-
|
|
2483
|
+
position="top"
|
|
2484
|
+
[navigable]="navigable"
|
|
2485
|
+
class="k-toolbar k-grid-toolbar k-toolbar-md"
|
|
2486
|
+
[attr.aria-label]="messageFor('topToolbarLabel')"
|
|
2487
|
+
[attr.aria-controls]="ariaRootId">
|
|
2488
|
+
</kendo-treelist-toolbar>
|
|
2443
2489
|
<div #ariaRoot
|
|
2444
2490
|
class="k-grid-aria-root"
|
|
2445
2491
|
role="treegrid"
|
|
2492
|
+
[id]="ariaRootId"
|
|
2446
2493
|
[attr.aria-rowcount]="ariaRowCount"
|
|
2447
2494
|
[attr.aria-colcount]="ariaColCount"
|
|
2448
2495
|
[attr.aria-multiselectable]="ariaMultiselectable"
|
|
@@ -2496,7 +2543,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2496
2543
|
</colgroup>
|
|
2497
2544
|
<thead kendoTreeListHeader
|
|
2498
2545
|
[resizable]="resizable"
|
|
2499
|
-
role="
|
|
2546
|
+
role="rowgroup"
|
|
2500
2547
|
[scrollable]="true"
|
|
2501
2548
|
[columns]="headerColumns"
|
|
2502
2549
|
[totalColumnLevels]="totalColumnLevels"
|
|
@@ -2585,13 +2632,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2585
2632
|
[total]="view.totalVisible"
|
|
2586
2633
|
[allCount]="view.total"
|
|
2587
2634
|
[skip]="skip"
|
|
2635
|
+
[navigable]="navigable"
|
|
2636
|
+
[attr.aria-controls]="ariaRootId"
|
|
2588
2637
|
[options]="pageable"
|
|
2589
2638
|
(pageChange)="notifyPageChange('pager', $event)">
|
|
2590
2639
|
</kendo-treelist-pager>
|
|
2591
2640
|
<kendo-treelist-toolbar
|
|
2592
2641
|
*ngIf="showBottomToolbar"
|
|
2593
2642
|
class="k-toolbar k-grid-toolbar k-grid-toolbar-bottom k-toolbar-md"
|
|
2594
|
-
position="bottom"
|
|
2643
|
+
position="bottom"
|
|
2644
|
+
[navigable]="navigable"
|
|
2645
|
+
[attr.aria-label]="messageFor('bottomToolbarLabel')"
|
|
2646
|
+
[attr.aria-controls]="ariaRootId">
|
|
2647
|
+
</kendo-treelist-toolbar>
|
|
2595
2648
|
`
|
|
2596
2649
|
}]
|
|
2597
2650
|
}], ctorParameters: function () { return [{ type: i1.BrowserSupportService }, { type: i0.ElementRef }, { type: i2.ChangeNotificationService }, { type: i3.EditService }, { type: i4.FilterService }, { type: i5.PDFService }, { type: i6.ResponsiveService }, { type: i0.Renderer2 }, { type: i7.ExcelService }, { type: i0.NgZone }, { type: i8.ScrollSyncService }, { type: i9.DomEventsService }, { type: i10.ColumnResizingService }, { type: i0.ChangeDetectorRef }, { type: i11.ColumnReorderService }, { type: i12.ColumnInfoService }, { type: i13.NavigationService }, { type: i14.SortService }, { type: i15.ScrollRequestService }, { type: i16.ExpandStateService }, { type: i17.OptionChangesService }, { type: i18.SelectionService }, { type: i19.LocalizationService }, { type: i20.ContextService }]; }, propDecorators: { ariaLabel: [{
|
|
@@ -2736,10 +2789,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2736
2789
|
args: [ColumnMenuTemplateDirective]
|
|
2737
2790
|
}], lockedHeader: [{
|
|
2738
2791
|
type: ViewChild,
|
|
2739
|
-
args: ['lockedHeader'
|
|
2792
|
+
args: ['lockedHeader']
|
|
2740
2793
|
}], header: [{
|
|
2741
2794
|
type: ViewChild,
|
|
2742
|
-
args: ['header'
|
|
2795
|
+
args: ['header']
|
|
2743
2796
|
}], footer: [{
|
|
2744
2797
|
type: ViewChildren,
|
|
2745
2798
|
args: ['footer']
|
|
@@ -15,6 +15,7 @@ import { BodyModule } from "./rendering/body.module";
|
|
|
15
15
|
import { SharedModule } from './shared.module';
|
|
16
16
|
import { ToolbarTemplateDirective } from "./rendering/toolbar/toolbar-template.directive";
|
|
17
17
|
import { ToolbarComponent } from "./rendering/toolbar/toolbar.component";
|
|
18
|
+
import { TreeListToolbarFocusableDirective } from './rendering/toolbar/toolbar-focusable.directive';
|
|
18
19
|
import { ResizeSensorModule } from '@progress/kendo-angular-common';
|
|
19
20
|
import { TemplateEditingDirective } from './editing-directives/template-editing.directive';
|
|
20
21
|
import { ReactiveEditingDirective } from './editing-directives/reactive-editing.directive';
|
|
@@ -106,6 +107,7 @@ const exportedModules = [
|
|
|
106
107
|
FlatBindingDirective,
|
|
107
108
|
ExpandableDirective,
|
|
108
109
|
SelectableDirective,
|
|
110
|
+
TreeListToolbarFocusableDirective,
|
|
109
111
|
...SharedModule.exports(),
|
|
110
112
|
...BodyModule.exports(),
|
|
111
113
|
...HeaderModule.exports(),
|
|
@@ -129,7 +131,8 @@ const declarations = [
|
|
|
129
131
|
ExpandableDirective,
|
|
130
132
|
SelectableDirective,
|
|
131
133
|
MarqueeDirective,
|
|
132
|
-
TreeListSpacerComponent
|
|
134
|
+
TreeListSpacerComponent,
|
|
135
|
+
TreeListToolbarFocusableDirective
|
|
133
136
|
];
|
|
134
137
|
/**
|
|
135
138
|
* Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi'])
|
|
@@ -169,7 +172,8 @@ TreeListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
169
172
|
ExpandableDirective,
|
|
170
173
|
SelectableDirective,
|
|
171
174
|
MarqueeDirective,
|
|
172
|
-
TreeListSpacerComponent
|
|
175
|
+
TreeListSpacerComponent,
|
|
176
|
+
TreeListToolbarFocusableDirective], imports: [CommonModule,
|
|
173
177
|
SharedModule,
|
|
174
178
|
BodyModule,
|
|
175
179
|
HeaderModule,
|
|
@@ -188,7 +192,8 @@ TreeListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
|
|
|
188
192
|
HierarchyBindingDirective,
|
|
189
193
|
FlatBindingDirective,
|
|
190
194
|
ExpandableDirective,
|
|
191
|
-
SelectableDirective,
|
|
195
|
+
SelectableDirective,
|
|
196
|
+
TreeListToolbarFocusableDirective, i1.ColumnComponent, i2.SpanColumnComponent, i3.CheckboxColumnComponent, i4.ColumnGroupComponent, i5.FocusableDirective, i6.CommandColumnComponent, i7.CellTemplateDirective, i8.NoRecordsTemplateDirective, i9.EditTemplateDirective, i10.EditCommandDirective, i11.CancelCommandDirective, i12.SaveCommandDirective, i13.RemoveCommandDirective, i14.AddCommandDirective, i15.FooterTemplateDirective, i16.HeaderTemplateDirective, i17.PagerComponent, i18.PagerPrevButtonsComponent, i19.PagerNextButtonsComponent, i20.PagerNumericButtonsComponent, i21.PagerInputComponent, i22.PagerInfoComponent, i23.PagerPageSizesComponent, i24.PagerTemplateDirective, i25.FilterRowComponent, i26.FilterCellComponent, i27.FilterCellTemplateDirective, i28.FilterCellOperatorsComponent, i29.StringFilterCellComponent, i30.NumericFilterCellComponent, i31.AutoCompleteFilterCellComponent, i32.BooleanFilterCellComponent, i33.DateFilterCellComponent, i28.FilterCellOperatorsComponent, i34.ContainsFilterOperatorComponent, i35.DoesNotContainFilterOperatorComponent, i36.EndsWithFilterOperatorComponent, i37.EqualFilterOperatorComponent, i38.IsEmptyFilterOperatorComponent, i39.IsNotEmptyFilterOperatorComponent, i40.IsNotNullFilterOperatorComponent, i41.IsNullFilterOperatorComponent, i42.NotEqualFilterOperatorComponent, i43.StartsWithFilterOperatorComponent, i44.GreaterFilterOperatorComponent, i45.GreaterOrEqualToFilterOperatorComponent, i46.LessFilterOperatorComponent, i47.LessOrEqualToFilterOperatorComponent, i48.AfterFilterOperatorComponent, i49.AfterEqFilterOperatorComponent, i50.BeforeEqFilterOperatorComponent, i51.BeforeFilterOperatorComponent, i52.StringFilterMenuComponent, i53.FilterMenuTemplateDirective, i54.NumericFilterMenuComponent, i55.DateFilterMenuComponent, i56.BooleanFilterMenuComponent, i28.FilterCellOperatorsComponent, i34.ContainsFilterOperatorComponent, i35.DoesNotContainFilterOperatorComponent, i36.EndsWithFilterOperatorComponent, i37.EqualFilterOperatorComponent, i38.IsEmptyFilterOperatorComponent, i39.IsNotEmptyFilterOperatorComponent, i40.IsNotNullFilterOperatorComponent, i41.IsNullFilterOperatorComponent, i42.NotEqualFilterOperatorComponent, i43.StartsWithFilterOperatorComponent, i44.GreaterFilterOperatorComponent, i45.GreaterOrEqualToFilterOperatorComponent, i46.LessFilterOperatorComponent, i47.LessOrEqualToFilterOperatorComponent, i48.AfterFilterOperatorComponent, i49.AfterEqFilterOperatorComponent, i50.BeforeEqFilterOperatorComponent, i51.BeforeFilterOperatorComponent, i57.ColumnChooserComponent, i58.ColumnMenuFilterComponent, i59.ColumnMenuItemComponent, i60.ColumnMenuItemContentTemplateDirective, i61.ColumnMenuSortComponent, i62.ColumnMenuLockComponent, i63.ColumnMenuChooserComponent, i64.ColumnMenuTemplateDirective, i65.ColumnMenuComponent] });
|
|
192
197
|
TreeListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeListModule, imports: [[
|
|
193
198
|
CommonModule,
|
|
194
199
|
SharedModule,
|
package/esm2020/utils.mjs
CHANGED
|
@@ -111,3 +111,7 @@ export const cancelAnimationFrame = wnd.cancelAnimationFrame || wnd.msCancelRequ
|
|
|
111
111
|
/** @hidden */
|
|
112
112
|
export const isColumnEditable = (column, formGroup) => column.isEditable !== false &&
|
|
113
113
|
(column.editTemplate || (formGroup && column.field && formGroup.get(column.field)));
|
|
114
|
+
/**
|
|
115
|
+
* @hidden
|
|
116
|
+
*/
|
|
117
|
+
export const replaceMessagePlaceholder = (message, name, value) => message.replace(new RegExp(`\{\\s*${name}\\s*\}`, 'g'), value);
|