@progress/kendo-angular-pivotgrid 1.0.2 → 1.1.0-dev.202210190858
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/bundles/kendo-angular-pivotgrid.umd.js +1 -1
- package/configurator/chip-kb-nav.directive.d.ts +24 -0
- package/configurator/configurator.component.d.ts +20 -6
- package/esm2015/configurator/chip-kb-nav.directive.js +62 -0
- package/esm2015/configurator/chip-menu/chip-menu.component.js +1 -1
- package/esm2015/configurator/configurator.component.js +169 -31
- package/esm2015/data-binding/base-binding-directive.js +1 -0
- package/esm2015/localization/custom-messages.component.js +1 -1
- package/esm2015/package-metadata.js +1 -1
- package/esm2015/pivotgrid.component.js +59 -13
- package/esm2015/pivotgrid.module.js +5 -2
- package/esm2015/util.js +8 -0
- package/fesm2015/kendo-angular-pivotgrid.js +296 -49
- package/localization/custom-messages.component.d.ts +1 -1
- package/package.json +2 -2
- package/pivotgrid.component.d.ts +9 -0
- package/pivotgrid.module.d.ts +7 -6
- package/util.d.ts +4 -0
|
@@ -7,7 +7,7 @@ import { EventEmitter, Injectable, Output, Component, HostBinding, Input, Direct
|
|
|
7
7
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
8
8
|
import * as i3 from '@progress/kendo-angular-common';
|
|
9
9
|
import { isDocumentAvailable, PreventableEvent, Keys, isChanged, hasObservers, anyChanged, EventsModule, DraggableModule } from '@progress/kendo-angular-common';
|
|
10
|
-
import { toTree, toRows, toColumns, toData, configuratorReducer, PIVOT_CONFIGURATOR_ACTION, PivotGridNavigation, HEADERS_ACTION, headersReducer, createFlatSchemaDimensions, createDataTree, createLocalDataState, rootFields, fetchData, createDataState, fetchDiscover, addKPI, buildKPIMeasures } from '@progress/kendo-pivotgrid-common';
|
|
10
|
+
import { toTree, toRows, toColumns, toData, configuratorReducer, PIVOT_CONFIGURATOR_ACTION, PivotGridNavigation, ConfiguratorNavigation, HEADERS_ACTION, headersReducer, createFlatSchemaDimensions, createDataTree, createLocalDataState, rootFields, fetchData, createDataState, fetchDiscover, addKPI, buildKPIMeasures } from '@progress/kendo-pivotgrid-common';
|
|
11
11
|
export { averageAggregate, maxAggregate, minAggregate, sumAggregate } from '@progress/kendo-pivotgrid-common';
|
|
12
12
|
import { BehaviorSubject, Subscription, Subject, from, of, fromEvent } from 'rxjs';
|
|
13
13
|
import { take, mergeMap, merge } from 'rxjs/operators';
|
|
@@ -17,9 +17,9 @@ import * as i7 from '@angular/common';
|
|
|
17
17
|
import { CommonModule } from '@angular/common';
|
|
18
18
|
import * as i5$1 from '@progress/kendo-angular-indicators';
|
|
19
19
|
import { IndicatorsModule } from '@progress/kendo-angular-indicators';
|
|
20
|
-
import * as i1$1 from '@progress/kendo-angular-popup';
|
|
21
20
|
import * as i4 from '@progress/kendo-angular-treeview';
|
|
22
|
-
import { TreeViewModule } from '@progress/kendo-angular-treeview';
|
|
21
|
+
import { TreeViewComponent, TreeViewModule } from '@progress/kendo-angular-treeview';
|
|
22
|
+
import * as i1$1 from '@progress/kendo-angular-popup';
|
|
23
23
|
import * as i5 from '@progress/kendo-angular-buttons';
|
|
24
24
|
import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
25
25
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
@@ -38,7 +38,7 @@ const packageMetadata = {
|
|
|
38
38
|
name: '@progress/kendo-angular-pivotgrid',
|
|
39
39
|
productName: 'Kendo UI for Angular',
|
|
40
40
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
41
|
-
publishDate:
|
|
41
|
+
publishDate: 1666169839,
|
|
42
42
|
version: '',
|
|
43
43
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
44
44
|
};
|
|
@@ -221,6 +221,14 @@ function cloneValue(value, nextValue) {
|
|
|
221
221
|
function cloneArray(array) {
|
|
222
222
|
return array.map(value => cloneValue(value, undefined));
|
|
223
223
|
}
|
|
224
|
+
/**
|
|
225
|
+
* @hidden
|
|
226
|
+
*/
|
|
227
|
+
const swapItems = (arr, i1, i2) => {
|
|
228
|
+
let temp = arr[i1];
|
|
229
|
+
arr[i1] = arr[i2];
|
|
230
|
+
arr[i2] = temp;
|
|
231
|
+
};
|
|
224
232
|
|
|
225
233
|
/**
|
|
226
234
|
* @hidden
|
|
@@ -1593,7 +1601,7 @@ class ChipMenuComponent {
|
|
|
1593
1601
|
close() {
|
|
1594
1602
|
this.popupService.destroy();
|
|
1595
1603
|
this.popupRef = null;
|
|
1596
|
-
this.anchor.nativeElement.focus();
|
|
1604
|
+
this.anchor.nativeElement.closest('.k-chip').focus();
|
|
1597
1605
|
}
|
|
1598
1606
|
get chipMenuTitle() {
|
|
1599
1607
|
const localizationMsg = this.localization.get('chipMenuIconTitle') || '';
|
|
@@ -1946,19 +1954,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
1946
1954
|
type: Input
|
|
1947
1955
|
}] } });
|
|
1948
1956
|
|
|
1957
|
+
/**
|
|
1958
|
+
* @hidden
|
|
1959
|
+
*/
|
|
1960
|
+
class ChipKeyboardNavigationDirective {
|
|
1961
|
+
constructor(host, renderer, ngZone) {
|
|
1962
|
+
this.host = host;
|
|
1963
|
+
this.renderer = renderer;
|
|
1964
|
+
this.ngZone = ngZone;
|
|
1965
|
+
this.keydownSub = new Subscription();
|
|
1966
|
+
this.reorder = new EventEmitter();
|
|
1967
|
+
}
|
|
1968
|
+
ngOnInit() {
|
|
1969
|
+
const chipElement = this.host.element.nativeElement;
|
|
1970
|
+
this.ngZone.runOutsideAngular(() => {
|
|
1971
|
+
this.keydownSub.add(this.renderer.listen(chipElement, 'keydown', (ev) => {
|
|
1972
|
+
const isDeleteOrBackspace = ev.keyCode === Keys.Delete || ev.keyCode === Keys.Backspace;
|
|
1973
|
+
const isAltDown = ev.keyCode === Keys.ArrowDown && ev.altKey;
|
|
1974
|
+
const menuIcon = this.host.element.nativeElement.querySelector('.k-i-more-vertical');
|
|
1975
|
+
const shiftAndMeta = ev.shiftKey && ev.metaKey;
|
|
1976
|
+
const isArrow = [Keys.ArrowLeft, Keys.ArrowRight, Keys.ArrowDown, Keys.ArrowUp].includes(ev.keyCode);
|
|
1977
|
+
const isReorderAction = shiftAndMeta && isArrow;
|
|
1978
|
+
if (isDeleteOrBackspace) {
|
|
1979
|
+
this.ngZone.run(() => {
|
|
1980
|
+
this.host.remove.emit({ sender: this.host, originalEvent: ev });
|
|
1981
|
+
});
|
|
1982
|
+
}
|
|
1983
|
+
else if (isAltDown && menuIcon) {
|
|
1984
|
+
menuIcon.click();
|
|
1985
|
+
}
|
|
1986
|
+
else if (isReorderAction) {
|
|
1987
|
+
const direction = {
|
|
1988
|
+
[Keys.ArrowDown]: 'down',
|
|
1989
|
+
[Keys.ArrowUp]: 'up',
|
|
1990
|
+
[Keys.ArrowRight]: 'right',
|
|
1991
|
+
[Keys.ArrowLeft]: 'left'
|
|
1992
|
+
}[ev.keyCode];
|
|
1993
|
+
this.reorder.emit({
|
|
1994
|
+
direction,
|
|
1995
|
+
sender: this.host
|
|
1996
|
+
});
|
|
1997
|
+
}
|
|
1998
|
+
}));
|
|
1999
|
+
});
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
ChipKeyboardNavigationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipKeyboardNavigationDirective, deps: [{ token: i5.ChipComponent }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2003
|
+
ChipKeyboardNavigationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: ChipKeyboardNavigationDirective, selector: "[kendoChipKeyboardNavigation]", outputs: { reorder: "reorder" }, ngImport: i0 });
|
|
2004
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ChipKeyboardNavigationDirective, decorators: [{
|
|
2005
|
+
type: Directive,
|
|
2006
|
+
args: [{ selector: '[kendoChipKeyboardNavigation]' }]
|
|
2007
|
+
}], ctorParameters: function () { return [{ type: i5.ChipComponent }, { type: i0.Renderer2 }, { type: i0.NgZone }]; }, propDecorators: { reorder: [{
|
|
2008
|
+
type: Output
|
|
2009
|
+
}] } });
|
|
2010
|
+
|
|
1949
2011
|
/**
|
|
1950
2012
|
* @hidden
|
|
1951
2013
|
* Represents the Kendo UI PivotGrid Configurator component for Angular.
|
|
1952
2014
|
*/
|
|
1953
2015
|
class PivotGridConfiguratorComponent {
|
|
1954
|
-
constructor(dataService, localization, configuratorService, cdr) {
|
|
2016
|
+
constructor(dataService, localization, configuratorService, cdr, zone) {
|
|
1955
2017
|
this.dataService = dataService;
|
|
1956
2018
|
this.localization = localization;
|
|
1957
2019
|
this.configuratorService = configuratorService;
|
|
1958
2020
|
this.cdr = cdr;
|
|
2021
|
+
this.zone = zone;
|
|
1959
2022
|
this.hostClass = true;
|
|
2023
|
+
this.hostAriaRole = 'dialog';
|
|
1960
2024
|
this.orientation = 'vertical';
|
|
1961
2025
|
this.sort = new Array();
|
|
2026
|
+
this.close = new EventEmitter();
|
|
1962
2027
|
this.checked = [];
|
|
1963
2028
|
this.subs = new Subscription();
|
|
1964
2029
|
/**
|
|
@@ -1976,6 +2041,9 @@ class PivotGridConfiguratorComponent {
|
|
|
1976
2041
|
return of(node.children);
|
|
1977
2042
|
};
|
|
1978
2043
|
}
|
|
2044
|
+
get headerTextId() {
|
|
2045
|
+
return `k-pivotgrid-${this.dataService.pivotGridId}-configurator-header`;
|
|
2046
|
+
}
|
|
1979
2047
|
get isHorizontal() {
|
|
1980
2048
|
return this.orientation === 'horizontal';
|
|
1981
2049
|
}
|
|
@@ -2004,6 +2072,9 @@ class PivotGridConfiguratorComponent {
|
|
|
2004
2072
|
this.cdr.detectChanges();
|
|
2005
2073
|
}));
|
|
2006
2074
|
}
|
|
2075
|
+
ngAfterViewInit() {
|
|
2076
|
+
this.treeView.focus();
|
|
2077
|
+
}
|
|
2007
2078
|
ngOnDestroy() {
|
|
2008
2079
|
this.subs.unsubscribe();
|
|
2009
2080
|
}
|
|
@@ -2015,6 +2086,9 @@ class PivotGridConfiguratorComponent {
|
|
|
2015
2086
|
getName(name) {
|
|
2016
2087
|
return name.toString();
|
|
2017
2088
|
}
|
|
2089
|
+
contentLabelId(section) {
|
|
2090
|
+
return `k-pivotgrid-${this.dataService.pivotGridId}-configurator-${section}`;
|
|
2091
|
+
}
|
|
2018
2092
|
setState(state) {
|
|
2019
2093
|
this.dataService.state = {
|
|
2020
2094
|
columnAxes: state.columnAxes,
|
|
@@ -2025,6 +2099,60 @@ class PivotGridConfiguratorComponent {
|
|
|
2025
2099
|
};
|
|
2026
2100
|
this.state = this.configuratorService.state = state;
|
|
2027
2101
|
}
|
|
2102
|
+
onReorder(ev, name, item) {
|
|
2103
|
+
var _a, _b;
|
|
2104
|
+
console.log(name, ev.direction);
|
|
2105
|
+
const currentCollection = this.state[`${name}Axes`];
|
|
2106
|
+
const itemIndex = currentCollection.indexOf(item);
|
|
2107
|
+
switch (ev.direction) {
|
|
2108
|
+
case 'right':
|
|
2109
|
+
if (itemIndex !== currentCollection.length - 1) {
|
|
2110
|
+
swapItems(currentCollection, itemIndex, itemIndex + 1);
|
|
2111
|
+
this.dataService.state[`${name}Axes`] = currentCollection;
|
|
2112
|
+
const newState = Object.assign(Object.assign({}, this.state), this.dataService.state);
|
|
2113
|
+
this.setState(newState);
|
|
2114
|
+
}
|
|
2115
|
+
break;
|
|
2116
|
+
case 'left':
|
|
2117
|
+
if (itemIndex !== 0) {
|
|
2118
|
+
swapItems(currentCollection, itemIndex, itemIndex - 1);
|
|
2119
|
+
this.dataService.state[`${name}Axes`] = currentCollection;
|
|
2120
|
+
const newState = Object.assign(Object.assign({}, this.state), this.dataService.state);
|
|
2121
|
+
this.setState(newState);
|
|
2122
|
+
this.cdr.detectChanges();
|
|
2123
|
+
ev.sender.focus();
|
|
2124
|
+
}
|
|
2125
|
+
break;
|
|
2126
|
+
case 'up':
|
|
2127
|
+
if (name === 'row') {
|
|
2128
|
+
currentCollection.splice(itemIndex, 1);
|
|
2129
|
+
const columnAxes = this.state.columnAxes;
|
|
2130
|
+
columnAxes.push(item);
|
|
2131
|
+
this.dataService.state[`${name}Axes`] = currentCollection;
|
|
2132
|
+
this.dataService.state[`columnAxes`] = columnAxes;
|
|
2133
|
+
const newState = Object.assign(Object.assign({}, this.state), this.dataService.state);
|
|
2134
|
+
this.setState(newState);
|
|
2135
|
+
this.cdr.detectChanges();
|
|
2136
|
+
(_a = this.columnsList) === null || _a === void 0 ? void 0 : _a.chips.last.focus();
|
|
2137
|
+
}
|
|
2138
|
+
break;
|
|
2139
|
+
case 'down':
|
|
2140
|
+
if (name === 'column') {
|
|
2141
|
+
currentCollection.splice(itemIndex, 1);
|
|
2142
|
+
const rowAxes = this.state.rowAxes;
|
|
2143
|
+
rowAxes.push(item);
|
|
2144
|
+
this.dataService.state[`${name}Axes`] = currentCollection;
|
|
2145
|
+
this.dataService.state[`rowAxes`] = rowAxes;
|
|
2146
|
+
const newState = Object.assign(Object.assign({}, this.state), this.dataService.state);
|
|
2147
|
+
this.setState(newState);
|
|
2148
|
+
this.cdr.detectChanges();
|
|
2149
|
+
(_b = this.rowsList) === null || _b === void 0 ? void 0 : _b.chips.last.focus();
|
|
2150
|
+
}
|
|
2151
|
+
break;
|
|
2152
|
+
default:
|
|
2153
|
+
break;
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2028
2156
|
/**
|
|
2029
2157
|
* Returns the localized message for a given token
|
|
2030
2158
|
*/
|
|
@@ -2056,12 +2184,18 @@ class PivotGridConfiguratorComponent {
|
|
|
2056
2184
|
* Updates the respective axis configuration of the current state
|
|
2057
2185
|
* when a chip is deleted from the UI
|
|
2058
2186
|
*/
|
|
2059
|
-
onChipRemove(item, section) {
|
|
2187
|
+
onChipRemove(ev, item, section) {
|
|
2060
2188
|
const filteredItems = this.dataService.state[`${section}Axes`].filter(descriptor => descriptor !== item);
|
|
2061
2189
|
this.dataService.state[`${section}Axes`] = filteredItems;
|
|
2062
2190
|
const newState = Object.assign(Object.assign({}, this.state), this.dataService.state);
|
|
2063
2191
|
this.checked = this.checked.filter(checkedItem => checkedItem.uniqueName !== item.name[0]);
|
|
2064
2192
|
this.setState(newState);
|
|
2193
|
+
if (!this.navigation) {
|
|
2194
|
+
return;
|
|
2195
|
+
}
|
|
2196
|
+
;
|
|
2197
|
+
const targetIndex = this.navigation.elements.indexOf(ev.sender.element.nativeElement);
|
|
2198
|
+
this.zone.runOutsideAngular(() => setTimeout(() => this.navigation.focusElement(this.navigation.elements[targetIndex - 1], this.navigation.elements[targetIndex])));
|
|
2065
2199
|
}
|
|
2066
2200
|
/**
|
|
2067
2201
|
* Constructs an array with all selected fields.
|
|
@@ -2121,6 +2255,19 @@ class PivotGridConfiguratorComponent {
|
|
|
2121
2255
|
payload: item
|
|
2122
2256
|
};
|
|
2123
2257
|
this.configuratorService.parseConfiguratorState(action);
|
|
2258
|
+
const closestItem = event.target.closest('.k-treeview-item');
|
|
2259
|
+
this.zone.runOutsideAngular(() => setTimeout(() => closestItem.focus()));
|
|
2260
|
+
}
|
|
2261
|
+
onTreeViewSelect(ev) {
|
|
2262
|
+
var _a;
|
|
2263
|
+
const closestItem = ev.target.closest('.k-treeview-item');
|
|
2264
|
+
if (closestItem) {
|
|
2265
|
+
(_a = closestItem.querySelector('.k-checkbox')) === null || _a === void 0 ? void 0 : _a.click();
|
|
2266
|
+
}
|
|
2267
|
+
}
|
|
2268
|
+
onTreeViewEscape(ev) {
|
|
2269
|
+
ev.stopImmediatePropagation();
|
|
2270
|
+
this.close.emit();
|
|
2124
2271
|
}
|
|
2125
2272
|
handleSubmit() {
|
|
2126
2273
|
this.dataService.configuratorFieldChange.emit(this.dataService.state);
|
|
@@ -2154,12 +2301,12 @@ class PivotGridConfiguratorComponent {
|
|
|
2154
2301
|
}
|
|
2155
2302
|
;
|
|
2156
2303
|
}
|
|
2157
|
-
PivotGridConfiguratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridConfiguratorComponent, deps: [{ token: PivotGridDataService }, { token: i1.LocalizationService }, { token: ConfiguratorService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2158
|
-
PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: { orientation: "orientation", sort: "sort", filter: "filter" }, host: { properties: { "class.k-pivotgrid-configurator": "this.hostClass" } }, providers: [
|
|
2304
|
+
PivotGridConfiguratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridConfiguratorComponent, deps: [{ token: PivotGridDataService }, { token: i1.LocalizationService }, { token: ConfiguratorService }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
2305
|
+
PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: { orientation: "orientation", sort: "sort", filter: "filter", navigation: "navigation" }, outputs: { close: "close" }, host: { properties: { "class.k-pivotgrid-configurator": "this.hostClass", "attr.role": "this.hostAriaRole", "attr.aria-labelledby": "this.headerTextId" } }, providers: [
|
|
2159
2306
|
ConfiguratorService,
|
|
2160
2307
|
DropCueService,
|
|
2161
2308
|
SinglePopupService
|
|
2162
|
-
], usesOnChanges: true, ngImport: i0, template: `
|
|
2309
|
+
], viewQueries: [{ propertyName: "treeView", first: true, predicate: TreeViewComponent, descendants: true }, { propertyName: "columnsList", first: true, predicate: ["columnsChiplist"], descendants: true }, { propertyName: "rowsList", first: true, predicate: ["rowsChiplist"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
2163
2310
|
<div
|
|
2164
2311
|
class="k-pivotgrid-configurator-panel k-pivotgrid-configurator-push"
|
|
2165
2312
|
[ngClass]="{
|
|
@@ -2168,31 +2315,36 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2168
2315
|
}"
|
|
2169
2316
|
>
|
|
2170
2317
|
<div class="k-pivotgrid-configurator-header">
|
|
2171
|
-
<div
|
|
2318
|
+
<div
|
|
2319
|
+
[id]="headerTextId"
|
|
2320
|
+
class="k-pivotgrid-configurator-header-text">{{messageFor('configuratorHeaderText')}}</div>
|
|
2172
2321
|
</div>
|
|
2173
2322
|
|
|
2174
2323
|
<div class="k-pivotgrid-configurator-content">
|
|
2175
2324
|
<div class="k-form" [class.k-form-horizontal]="isHorizontal">
|
|
2176
2325
|
<div class="k-form-field-wrapper">
|
|
2177
2326
|
<div class="k-form-field">
|
|
2178
|
-
<span class="k-label">{{messageFor('configuratorFieldsText')}}</span>
|
|
2327
|
+
<span [id]="contentLabelId('fields')" class="k-label">{{messageFor('configuratorFieldsText')}}</span>
|
|
2179
2328
|
</div>
|
|
2180
|
-
|
|
2181
2329
|
<div class="k-form-field">
|
|
2182
2330
|
<div class="k-fields-list-wrapper">
|
|
2183
2331
|
<kendo-treeview
|
|
2332
|
+
#treeview
|
|
2333
|
+
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('fields')"
|
|
2334
|
+
(focus)="treeview.focus()"
|
|
2184
2335
|
[nodes]="fields"
|
|
2185
2336
|
textField="caption"
|
|
2186
2337
|
[children]="children"
|
|
2187
2338
|
[hasChildren]="hasChildren"
|
|
2188
2339
|
kendoTreeViewExpandable
|
|
2189
2340
|
(childrenLoaded)="handleChildrenLoaded($event)"
|
|
2190
|
-
|
|
2341
|
+
(keydown.space)="onTreeViewSelect($event)">
|
|
2191
2342
|
<ng-template kendoTreeViewNodeTemplate let-dataItem>
|
|
2192
2343
|
<input kendoCheckBox
|
|
2193
2344
|
*ngIf="isSelectable(dataItem)"
|
|
2194
2345
|
type="checkbox"
|
|
2195
2346
|
kendoCheckBox
|
|
2347
|
+
tabindex="-1"
|
|
2196
2348
|
[checked]="isItemChecked(dataItem)"
|
|
2197
2349
|
(change)="handleCheckedChange($event, dataItem)"/>
|
|
2198
2350
|
{{ dataItem.caption }}
|
|
@@ -2209,24 +2361,28 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2209
2361
|
|
|
2210
2362
|
<ng-template #verticalTemplate>
|
|
2211
2363
|
<div class="k-form-field" kendoDropTarget axes="columnAxes">
|
|
2212
|
-
<span class="k-label">{{messageFor('configuratorColumnsText')}}</span>
|
|
2364
|
+
<span [id]="contentLabelId('columns')" class="k-label">{{messageFor('configuratorColumnsText')}}</span>
|
|
2213
2365
|
</div>
|
|
2214
2366
|
|
|
2215
2367
|
<kendo-chiplist
|
|
2216
2368
|
*ngIf="state.columnAxes && state.columnAxes.length; else noColumnAxes"
|
|
2369
|
+
#columnsChiplist
|
|
2217
2370
|
kendoDropTarget
|
|
2218
2371
|
axes="columnAxes"
|
|
2372
|
+
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('columns')"
|
|
2219
2373
|
>
|
|
2220
|
-
<ng-container *ngFor="let item of state.columnAxes">
|
|
2374
|
+
<ng-container *ngFor="let item of state.columnAxes; let i = index;">
|
|
2221
2375
|
<kendo-chip *ngIf="item.name.length === 1"
|
|
2222
2376
|
kendoChipDraggable
|
|
2223
2377
|
kendoDraggable
|
|
2224
2378
|
kendoDropTarget
|
|
2379
|
+
kendoChipKeyboardNavigation
|
|
2225
2380
|
[item]="item"
|
|
2226
2381
|
axes="columnAxes"
|
|
2227
2382
|
rounded="full"
|
|
2228
2383
|
[removable]="true"
|
|
2229
|
-
(remove)="onChipRemove(item, 'column')"
|
|
2384
|
+
(remove)="onChipRemove($event, item, 'column')"
|
|
2385
|
+
(reorder)="onReorder($event, 'column', item)"
|
|
2230
2386
|
>{{ getName(item.name) }}
|
|
2231
2387
|
<kendo-pivot-chip-menu
|
|
2232
2388
|
[chip]="item">
|
|
@@ -2240,24 +2396,28 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2240
2396
|
</ng-template>
|
|
2241
2397
|
|
|
2242
2398
|
<div class="k-form-field" kendoDropTarget axes="rowAxes">
|
|
2243
|
-
<span class="k-label">{{messageFor('configuratorRowsText')}}</span>
|
|
2399
|
+
<span [id]="contentLabelId('rows')" class="k-label">{{messageFor('configuratorRowsText')}}</span>
|
|
2244
2400
|
</div>
|
|
2245
2401
|
|
|
2246
2402
|
<kendo-chiplist
|
|
2247
2403
|
*ngIf="state.rowAxes && state.rowAxes.length; else noRowAxes"
|
|
2404
|
+
#rowsChiplist
|
|
2248
2405
|
kendoDropTarget
|
|
2249
2406
|
axes="rowAxes"
|
|
2407
|
+
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('rows')"
|
|
2250
2408
|
>
|
|
2251
2409
|
<ng-container *ngFor="let item of state.rowAxes">
|
|
2252
2410
|
<kendo-chip *ngIf="item.name.length === 1"
|
|
2253
2411
|
kendoChipDraggable
|
|
2254
2412
|
kendoDraggable
|
|
2255
2413
|
kendoDropTarget
|
|
2414
|
+
kendoChipKeyboardNavigation
|
|
2256
2415
|
[item]="item"
|
|
2257
2416
|
axes="rowAxes"
|
|
2258
2417
|
rounded="full"
|
|
2259
2418
|
[removable]="true"
|
|
2260
|
-
(remove)="onChipRemove(item, 'row')"
|
|
2419
|
+
(remove)="onChipRemove($event, item, 'row')"
|
|
2420
|
+
(reorder)="onReorder($event, 'row', item)"
|
|
2261
2421
|
>
|
|
2262
2422
|
{{ getName(item.name) }}
|
|
2263
2423
|
|
|
@@ -2279,23 +2439,26 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2279
2439
|
|
|
2280
2440
|
<ng-template #verticalMeasuresTemplate>
|
|
2281
2441
|
<div class="k-form-field" kendoDropTarget axes="measureAxes">
|
|
2282
|
-
<span class="k-label">{{messageFor('configuratorValuesText')}}</span>
|
|
2442
|
+
<span [id]="contentLabelId('values')" class="k-label">{{messageFor('configuratorValuesText')}}</span>
|
|
2283
2443
|
</div>
|
|
2284
2444
|
|
|
2285
2445
|
<kendo-chiplist
|
|
2286
2446
|
*ngIf="state.measureAxes && state.measureAxes.length; else noMeasureAxes"
|
|
2287
2447
|
kendoDropTarget
|
|
2288
2448
|
axes="measureAxes"
|
|
2449
|
+
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('values')"
|
|
2289
2450
|
>
|
|
2290
2451
|
<kendo-chip *ngFor="let item of state.measureAxes"
|
|
2291
2452
|
kendoChipDraggable
|
|
2292
2453
|
kendoDraggable
|
|
2293
2454
|
kendoDropTarget
|
|
2455
|
+
kendoChipKeyboardNavigation
|
|
2294
2456
|
[item]="item"
|
|
2295
2457
|
axes="measureAxes"
|
|
2296
2458
|
rounded="full"
|
|
2297
2459
|
[removable]="true"
|
|
2298
|
-
(remove)="onChipRemove(item, 'measure')"
|
|
2460
|
+
(remove)="onChipRemove($event, item, 'measure')"
|
|
2461
|
+
(reorder)="onReorder($event, 'measure', item)"
|
|
2299
2462
|
>
|
|
2300
2463
|
{{ getName(item.name) }}
|
|
2301
2464
|
</kendo-chip>
|
|
@@ -2313,7 +2476,7 @@ PivotGridConfiguratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
2313
2476
|
<button kendoButton themeColor="primary" type="button" (click)="handleSubmit()">{{messageFor('configuratorApplyButtonText')}}</button>
|
|
2314
2477
|
</div>
|
|
2315
2478
|
</div>
|
|
2316
|
-
`, isInline: true, styles: ["\n .k-form .k-chip-list {\n width: 100%;\n }\n\n .k-form .k-form-field,\n .k-form .k-settings-description {\n padding-top: 1em;\n margin-top: 0;\n }\n\n .k-form.k-form-horizontal .k-form-field,\n .k-form.k-form-horizontal .k-chip-list {\n padding-top: 0;\n padding-left: 16px;\n }\n\n .k-form.k-form-horizontal .k-form-field-wrapper {\n padding-left: 0;\n }\n "], components: [{ type: i4.TreeViewComponent, selector: "kendo-treeview", inputs: ["filterInputPlaceholder", "expandDisabledNodes", "animate", "nodeTemplate", "loadMoreButtonTemplate", "trackBy", "nodes", "textField", "hasChildren", "isChecked", "isDisabled", "isExpanded", "isSelected", "isVisible", "navigable", "children", "loadOnDemand", "filterable", "filter", "size", "disableParentNodesOnly"], outputs: ["childrenLoaded", "blur", "focus", "expand", "collapse", "nodeDragStart", "nodeDrag", "filterStateChange", "nodeDrop", "nodeDragEnd", "addItem", "removeItem", "checkedChange", "selectionChange", "filterChange", "nodeClick", "nodeDblClick"], exportAs: ["kendoTreeView"] }, { type: i5.ChipListComponent, selector: "kendo-chiplist, kendo-chip-list", inputs: ["selection", "size"], outputs: ["selectedChange", "remove"] }, { type: i5.ChipComponent, selector: "kendo-chip", inputs: ["label", "icon", "iconClass", "avatarClass", "selected", "removable", "removeIcon", "disabled", "size", "rounded", "fillMode", "themeColor"], outputs: ["remove", "contentClick"] }, { type: ChipMenuComponent, selector: "kendo-pivot-chip-menu", inputs: ["chip", "tabIndex"] }], directives: [{ type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.ExpandDirective, selector: "[kendoTreeViewExpandable]", inputs: ["isExpanded", "expandBy", "expandOnFilter", "expandedKeys"], outputs: ["expandedKeysChange"] }, { type: i4.NodeTemplateDirective, selector: "[kendoTreeViewNodeTemplate]" }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.CheckBoxDirective, selector: "input[kendoCheckBox]", inputs: ["size", "rounded"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["item", "axes"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: DraggableChipDirective, selector: "[kendoChipDraggable]", inputs: ["item"] }, { type: i3.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: i5.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
|
2479
|
+
`, isInline: true, styles: ["\n .k-form .k-chip-list {\n width: 100%;\n }\n\n .k-form .k-form-field,\n .k-form .k-settings-description {\n padding-top: 1em;\n margin-top: 0;\n }\n\n .k-form.k-form-horizontal .k-form-field,\n .k-form.k-form-horizontal .k-chip-list {\n padding-top: 0;\n padding-left: 16px;\n }\n\n .k-form.k-form-horizontal .k-form-field-wrapper {\n padding-left: 0;\n }\n "], components: [{ type: i4.TreeViewComponent, selector: "kendo-treeview", inputs: ["filterInputPlaceholder", "expandDisabledNodes", "animate", "nodeTemplate", "loadMoreButtonTemplate", "trackBy", "nodes", "textField", "hasChildren", "isChecked", "isDisabled", "isExpanded", "isSelected", "isVisible", "navigable", "children", "loadOnDemand", "filterable", "filter", "size", "disableParentNodesOnly"], outputs: ["childrenLoaded", "blur", "focus", "expand", "collapse", "nodeDragStart", "nodeDrag", "filterStateChange", "nodeDrop", "nodeDragEnd", "addItem", "removeItem", "checkedChange", "selectionChange", "filterChange", "nodeClick", "nodeDblClick"], exportAs: ["kendoTreeView"] }, { type: i5.ChipListComponent, selector: "kendo-chiplist, kendo-chip-list", inputs: ["selection", "size"], outputs: ["selectedChange", "remove"] }, { type: i5.ChipComponent, selector: "kendo-chip", inputs: ["label", "icon", "iconClass", "avatarClass", "selected", "removable", "removeIcon", "disabled", "size", "rounded", "fillMode", "themeColor"], outputs: ["remove", "contentClick"] }, { type: ChipMenuComponent, selector: "kendo-pivot-chip-menu", inputs: ["chip", "tabIndex"] }], directives: [{ type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.ExpandDirective, selector: "[kendoTreeViewExpandable]", inputs: ["isExpanded", "expandBy", "expandOnFilter", "expandedKeys"], outputs: ["expandedKeysChange"] }, { type: i4.NodeTemplateDirective, selector: "[kendoTreeViewNodeTemplate]" }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.CheckBoxDirective, selector: "input[kendoCheckBox]", inputs: ["size", "rounded"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["item", "axes"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: DraggableChipDirective, selector: "[kendoChipDraggable]", inputs: ["item"] }, { type: i3.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: ChipKeyboardNavigationDirective, selector: "[kendoChipKeyboardNavigation]", outputs: ["reorder"] }, { type: i5.ButtonDirective, selector: "button[kendoButton], span[kendoButton]", inputs: ["toggleable", "togglable", "selected", "tabIndex", "icon", "iconClass", "imageUrl", "disabled", "size", "rounded", "fillMode", "themeColor", "role", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] });
|
|
2317
2480
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridConfiguratorComponent, decorators: [{
|
|
2318
2481
|
type: Component,
|
|
2319
2482
|
args: [{
|
|
@@ -2332,31 +2495,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2332
2495
|
}"
|
|
2333
2496
|
>
|
|
2334
2497
|
<div class="k-pivotgrid-configurator-header">
|
|
2335
|
-
<div
|
|
2498
|
+
<div
|
|
2499
|
+
[id]="headerTextId"
|
|
2500
|
+
class="k-pivotgrid-configurator-header-text">{{messageFor('configuratorHeaderText')}}</div>
|
|
2336
2501
|
</div>
|
|
2337
2502
|
|
|
2338
2503
|
<div class="k-pivotgrid-configurator-content">
|
|
2339
2504
|
<div class="k-form" [class.k-form-horizontal]="isHorizontal">
|
|
2340
2505
|
<div class="k-form-field-wrapper">
|
|
2341
2506
|
<div class="k-form-field">
|
|
2342
|
-
<span class="k-label">{{messageFor('configuratorFieldsText')}}</span>
|
|
2507
|
+
<span [id]="contentLabelId('fields')" class="k-label">{{messageFor('configuratorFieldsText')}}</span>
|
|
2343
2508
|
</div>
|
|
2344
|
-
|
|
2345
2509
|
<div class="k-form-field">
|
|
2346
2510
|
<div class="k-fields-list-wrapper">
|
|
2347
2511
|
<kendo-treeview
|
|
2512
|
+
#treeview
|
|
2513
|
+
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('fields')"
|
|
2514
|
+
(focus)="treeview.focus()"
|
|
2348
2515
|
[nodes]="fields"
|
|
2349
2516
|
textField="caption"
|
|
2350
2517
|
[children]="children"
|
|
2351
2518
|
[hasChildren]="hasChildren"
|
|
2352
2519
|
kendoTreeViewExpandable
|
|
2353
2520
|
(childrenLoaded)="handleChildrenLoaded($event)"
|
|
2354
|
-
|
|
2521
|
+
(keydown.space)="onTreeViewSelect($event)">
|
|
2355
2522
|
<ng-template kendoTreeViewNodeTemplate let-dataItem>
|
|
2356
2523
|
<input kendoCheckBox
|
|
2357
2524
|
*ngIf="isSelectable(dataItem)"
|
|
2358
2525
|
type="checkbox"
|
|
2359
2526
|
kendoCheckBox
|
|
2527
|
+
tabindex="-1"
|
|
2360
2528
|
[checked]="isItemChecked(dataItem)"
|
|
2361
2529
|
(change)="handleCheckedChange($event, dataItem)"/>
|
|
2362
2530
|
{{ dataItem.caption }}
|
|
@@ -2373,24 +2541,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2373
2541
|
|
|
2374
2542
|
<ng-template #verticalTemplate>
|
|
2375
2543
|
<div class="k-form-field" kendoDropTarget axes="columnAxes">
|
|
2376
|
-
<span class="k-label">{{messageFor('configuratorColumnsText')}}</span>
|
|
2544
|
+
<span [id]="contentLabelId('columns')" class="k-label">{{messageFor('configuratorColumnsText')}}</span>
|
|
2377
2545
|
</div>
|
|
2378
2546
|
|
|
2379
2547
|
<kendo-chiplist
|
|
2380
2548
|
*ngIf="state.columnAxes && state.columnAxes.length; else noColumnAxes"
|
|
2549
|
+
#columnsChiplist
|
|
2381
2550
|
kendoDropTarget
|
|
2382
2551
|
axes="columnAxes"
|
|
2552
|
+
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('columns')"
|
|
2383
2553
|
>
|
|
2384
|
-
<ng-container *ngFor="let item of state.columnAxes">
|
|
2554
|
+
<ng-container *ngFor="let item of state.columnAxes; let i = index;">
|
|
2385
2555
|
<kendo-chip *ngIf="item.name.length === 1"
|
|
2386
2556
|
kendoChipDraggable
|
|
2387
2557
|
kendoDraggable
|
|
2388
2558
|
kendoDropTarget
|
|
2559
|
+
kendoChipKeyboardNavigation
|
|
2389
2560
|
[item]="item"
|
|
2390
2561
|
axes="columnAxes"
|
|
2391
2562
|
rounded="full"
|
|
2392
2563
|
[removable]="true"
|
|
2393
|
-
(remove)="onChipRemove(item, 'column')"
|
|
2564
|
+
(remove)="onChipRemove($event, item, 'column')"
|
|
2565
|
+
(reorder)="onReorder($event, 'column', item)"
|
|
2394
2566
|
>{{ getName(item.name) }}
|
|
2395
2567
|
<kendo-pivot-chip-menu
|
|
2396
2568
|
[chip]="item">
|
|
@@ -2404,24 +2576,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2404
2576
|
</ng-template>
|
|
2405
2577
|
|
|
2406
2578
|
<div class="k-form-field" kendoDropTarget axes="rowAxes">
|
|
2407
|
-
<span class="k-label">{{messageFor('configuratorRowsText')}}</span>
|
|
2579
|
+
<span [id]="contentLabelId('rows')" class="k-label">{{messageFor('configuratorRowsText')}}</span>
|
|
2408
2580
|
</div>
|
|
2409
2581
|
|
|
2410
2582
|
<kendo-chiplist
|
|
2411
2583
|
*ngIf="state.rowAxes && state.rowAxes.length; else noRowAxes"
|
|
2584
|
+
#rowsChiplist
|
|
2412
2585
|
kendoDropTarget
|
|
2413
2586
|
axes="rowAxes"
|
|
2587
|
+
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('rows')"
|
|
2414
2588
|
>
|
|
2415
2589
|
<ng-container *ngFor="let item of state.rowAxes">
|
|
2416
2590
|
<kendo-chip *ngIf="item.name.length === 1"
|
|
2417
2591
|
kendoChipDraggable
|
|
2418
2592
|
kendoDraggable
|
|
2419
2593
|
kendoDropTarget
|
|
2594
|
+
kendoChipKeyboardNavigation
|
|
2420
2595
|
[item]="item"
|
|
2421
2596
|
axes="rowAxes"
|
|
2422
2597
|
rounded="full"
|
|
2423
2598
|
[removable]="true"
|
|
2424
|
-
(remove)="onChipRemove(item, 'row')"
|
|
2599
|
+
(remove)="onChipRemove($event, item, 'row')"
|
|
2600
|
+
(reorder)="onReorder($event, 'row', item)"
|
|
2425
2601
|
>
|
|
2426
2602
|
{{ getName(item.name) }}
|
|
2427
2603
|
|
|
@@ -2443,23 +2619,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2443
2619
|
|
|
2444
2620
|
<ng-template #verticalMeasuresTemplate>
|
|
2445
2621
|
<div class="k-form-field" kendoDropTarget axes="measureAxes">
|
|
2446
|
-
<span class="k-label">{{messageFor('configuratorValuesText')}}</span>
|
|
2622
|
+
<span [id]="contentLabelId('values')" class="k-label">{{messageFor('configuratorValuesText')}}</span>
|
|
2447
2623
|
</div>
|
|
2448
2624
|
|
|
2449
2625
|
<kendo-chiplist
|
|
2450
2626
|
*ngIf="state.measureAxes && state.measureAxes.length; else noMeasureAxes"
|
|
2451
2627
|
kendoDropTarget
|
|
2452
2628
|
axes="measureAxes"
|
|
2629
|
+
[attr.aria-labelledby]="headerTextId + ' ' + contentLabelId('values')"
|
|
2453
2630
|
>
|
|
2454
2631
|
<kendo-chip *ngFor="let item of state.measureAxes"
|
|
2455
2632
|
kendoChipDraggable
|
|
2456
2633
|
kendoDraggable
|
|
2457
2634
|
kendoDropTarget
|
|
2635
|
+
kendoChipKeyboardNavigation
|
|
2458
2636
|
[item]="item"
|
|
2459
2637
|
axes="measureAxes"
|
|
2460
2638
|
rounded="full"
|
|
2461
2639
|
[removable]="true"
|
|
2462
|
-
(remove)="onChipRemove(item, 'measure')"
|
|
2640
|
+
(remove)="onChipRemove($event, item, 'measure')"
|
|
2641
|
+
(reorder)="onReorder($event, 'measure', item)"
|
|
2463
2642
|
>
|
|
2464
2643
|
{{ getName(item.name) }}
|
|
2465
2644
|
</kendo-chip>
|
|
@@ -2500,15 +2679,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
2500
2679
|
}
|
|
2501
2680
|
`]
|
|
2502
2681
|
}]
|
|
2503
|
-
}], ctorParameters: function () { return [{ type: PivotGridDataService }, { type: i1.LocalizationService }, { type: ConfiguratorService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { hostClass: [{
|
|
2682
|
+
}], ctorParameters: function () { return [{ type: PivotGridDataService }, { type: i1.LocalizationService }, { type: ConfiguratorService }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }]; }, propDecorators: { hostClass: [{
|
|
2504
2683
|
type: HostBinding,
|
|
2505
2684
|
args: ['class.k-pivotgrid-configurator']
|
|
2685
|
+
}], hostAriaRole: [{
|
|
2686
|
+
type: HostBinding,
|
|
2687
|
+
args: ['attr.role']
|
|
2688
|
+
}], headerTextId: [{
|
|
2689
|
+
type: HostBinding,
|
|
2690
|
+
args: ['attr.aria-labelledby']
|
|
2506
2691
|
}], orientation: [{
|
|
2507
2692
|
type: Input
|
|
2508
2693
|
}], sort: [{
|
|
2509
2694
|
type: Input
|
|
2510
2695
|
}], filter: [{
|
|
2511
2696
|
type: Input
|
|
2697
|
+
}], navigation: [{
|
|
2698
|
+
type: Input
|
|
2699
|
+
}], close: [{
|
|
2700
|
+
type: Output
|
|
2701
|
+
}], treeView: [{
|
|
2702
|
+
type: ViewChild,
|
|
2703
|
+
args: [TreeViewComponent]
|
|
2704
|
+
}], columnsList: [{
|
|
2705
|
+
type: ViewChild,
|
|
2706
|
+
args: ['columnsChiplist']
|
|
2707
|
+
}], rowsList: [{
|
|
2708
|
+
type: ViewChild,
|
|
2709
|
+
args: ['rowsChiplist']
|
|
2512
2710
|
}] } });
|
|
2513
2711
|
|
|
2514
2712
|
/**
|
|
@@ -2676,7 +2874,7 @@ class PivotGridComponent {
|
|
|
2676
2874
|
this.rtl = rtl;
|
|
2677
2875
|
this.direction = this.rtl ? 'rtl' : 'ltr';
|
|
2678
2876
|
}));
|
|
2679
|
-
dataService.wrapper = hostEl.nativeElement;
|
|
2877
|
+
dataService.wrapper = this.hostEl.nativeElement;
|
|
2680
2878
|
}
|
|
2681
2879
|
get rightPositionClass() {
|
|
2682
2880
|
var _a;
|
|
@@ -2769,10 +2967,32 @@ class PivotGridComponent {
|
|
|
2769
2967
|
messageFor(localizationToken) {
|
|
2770
2968
|
return this.localization.get(localizationToken);
|
|
2771
2969
|
}
|
|
2970
|
+
/**
|
|
2971
|
+
* @hidden
|
|
2972
|
+
*/
|
|
2973
|
+
toggleConfigurator() {
|
|
2974
|
+
this.showConfigurator = !this.showConfigurator;
|
|
2975
|
+
if (!this.navigable) {
|
|
2976
|
+
return;
|
|
2977
|
+
}
|
|
2978
|
+
if (this.showConfigurator) {
|
|
2979
|
+
this.zone.runOutsideAngular(() => setTimeout(() => this.initConfiguratorNavigation()));
|
|
2980
|
+
}
|
|
2981
|
+
else {
|
|
2982
|
+
this.stopConfiguratorNavigation();
|
|
2983
|
+
const el = this.navigation.current;
|
|
2984
|
+
if (el) {
|
|
2985
|
+
this.zone.runOutsideAngular(() => {
|
|
2986
|
+
setTimeout(() => this.navigation.focusElement(el, null));
|
|
2987
|
+
});
|
|
2988
|
+
}
|
|
2989
|
+
;
|
|
2990
|
+
}
|
|
2991
|
+
}
|
|
2772
2992
|
initNavigation() {
|
|
2773
2993
|
this.stopNavigation();
|
|
2774
2994
|
this.navigation = new PivotGridNavigation({ tabIndex: 0 });
|
|
2775
|
-
this.navigation.start(this.
|
|
2995
|
+
this.navigation.start(this.table.nativeElement);
|
|
2776
2996
|
const firstCell = this.navigation.first;
|
|
2777
2997
|
if (firstCell) {
|
|
2778
2998
|
firstCell.setAttribute('tabindex', '0');
|
|
@@ -2793,6 +3013,21 @@ class PivotGridComponent {
|
|
|
2793
3013
|
this.navigation.stop();
|
|
2794
3014
|
}
|
|
2795
3015
|
}
|
|
3016
|
+
initConfiguratorNavigation() {
|
|
3017
|
+
this.stopConfiguratorNavigation();
|
|
3018
|
+
this.configuratorNavigation = new ConfiguratorNavigation({ tabIndex: 0 });
|
|
3019
|
+
this.configuratorNavigation.start(this.configuratorWrapper.nativeElement);
|
|
3020
|
+
this.configuratorNavigation.first.setAttribute('tabindex', '0');
|
|
3021
|
+
}
|
|
3022
|
+
stopConfiguratorNavigation() {
|
|
3023
|
+
if (this.configuratorNavigation) {
|
|
3024
|
+
const lastFocusedEl = this.configuratorNavigation.elements.find(el => el.hasAttribute('tabindex'));
|
|
3025
|
+
if (lastFocusedEl) {
|
|
3026
|
+
this.renderer.removeAttribute(lastFocusedEl, 'tabindex');
|
|
3027
|
+
}
|
|
3028
|
+
this.configuratorNavigation.stop();
|
|
3029
|
+
}
|
|
3030
|
+
}
|
|
2796
3031
|
}
|
|
2797
3032
|
PivotGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: PivotGridDataService }, { token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i3.ScrollbarWidthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2798
3033
|
PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PivotGridComponent, selector: "kendo-pivotgrid", inputs: { loaderSettings: "loaderSettings", configurator: "configurator", columnHeadersWidth: "columnHeadersWidth", navigable: "navigable" }, host: { properties: { "class.k-d-flex": "this.hostClass", "class.k-pos-relative": "this.hostClass", "class.k-flex-row": "this.rightPositionClass", "class.k-flex-row-reverse": "this.leftPositionClass", "class.k-flex-column": "this.bottomPositionClass", "class.k-flex-column-reverse": "this.topPositionClass", "attr.dir": "this.dir", "attr.role": "this.ariaRole" } }, providers: [
|
|
@@ -2803,7 +3038,7 @@ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
2803
3038
|
provide: L10N_PREFIX,
|
|
2804
3039
|
useValue: 'kendo.pivotgrid'
|
|
2805
3040
|
}
|
|
2806
|
-
], viewQueries: [{ propertyName: "colHeadersTable", first: true, predicate: ["colHeadersTable"], descendants: true, read: ElementRef }, { propertyName: "rowHeadersTable", first: true, predicate: ["rowHeadersTable"], descendants: true, read: ElementRef }, { propertyName: "valuesTable", first: true, predicate: ["valuesTable"], descendants: true, read: ElementRef }, { propertyName: "table", first: true, predicate: ["table"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: `
|
|
3041
|
+
], viewQueries: [{ propertyName: "colHeadersTable", first: true, predicate: ["colHeadersTable"], descendants: true, read: ElementRef }, { propertyName: "rowHeadersTable", first: true, predicate: ["rowHeadersTable"], descendants: true, read: ElementRef }, { propertyName: "valuesTable", first: true, predicate: ["valuesTable"], descendants: true, read: ElementRef }, { propertyName: "table", first: true, predicate: ["table"], descendants: true, read: ElementRef }, { propertyName: "configuratorWrapper", first: true, predicate: ["configurator"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: `
|
|
2807
3042
|
<ng-container kendoPivotGridLocalizedMessages
|
|
2808
3043
|
i18n-loading="kendo.pivotgrid.loading|The loading text"
|
|
2809
3044
|
loading="Loading"
|
|
@@ -2927,19 +3162,22 @@ PivotGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
|
|
|
2927
3162
|
<span class="k-loading-text">{{ loadingText }}</span>
|
|
2928
3163
|
</div>
|
|
2929
3164
|
</div>
|
|
2930
|
-
|
|
2931
3165
|
<kendo-pivotgrid-configurator
|
|
3166
|
+
#configurator
|
|
2932
3167
|
*ngIf="showConfigurator"
|
|
2933
|
-
[
|
|
3168
|
+
[navigation]="configuratorNavigation"
|
|
3169
|
+
[orientation]="configuratorSettings.orientation"
|
|
3170
|
+
(close)="toggleConfigurator()">
|
|
2934
3171
|
</kendo-pivotgrid-configurator>
|
|
2935
|
-
|
|
2936
3172
|
<div *ngIf="configurator"
|
|
3173
|
+
#configuratorButton
|
|
2937
3174
|
class="k-pivotgrid-configurator-button"
|
|
2938
|
-
|
|
3175
|
+
aria-hidden="true"
|
|
3176
|
+
(click)="toggleConfigurator()">
|
|
2939
3177
|
<span>{{messageFor('configuratorButtonText')}}<span class="k-icon k-i-gear k-color-inherit"></span>
|
|
2940
3178
|
</span>
|
|
2941
3179
|
</div>
|
|
2942
|
-
`, isInline: true, styles: ["\n /** TODO: Remove if added to themes */\n div.k-loader {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n "], components: [{ type: PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: ["tableType", "colWidth"] }, { type: i5$1.LoaderComponent, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }, { type: PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: ["orientation", "sort", "filter"] }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoPivotGridLocalizedMessages]" }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
3180
|
+
`, isInline: true, styles: ["\n /** TODO: Remove if added to themes */\n div.k-loader {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n "], components: [{ type: PivotGridTableComponent, selector: "kendo-pivotgrid-table", inputs: ["tableType", "colWidth"] }, { type: i5$1.LoaderComponent, selector: "kendo-loader", inputs: ["type", "themeColor", "size"] }, { type: PivotGridConfiguratorComponent, selector: "kendo-pivotgrid-configurator", inputs: ["orientation", "sort", "filter", "navigation"], outputs: ["close"] }], directives: [{ type: LocalizedMessagesDirective, selector: "[kendoPivotGridLocalizedMessages]" }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
2943
3181
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: PivotGridComponent, decorators: [{
|
|
2944
3182
|
type: Component,
|
|
2945
3183
|
args: [{
|
|
@@ -3077,15 +3315,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3077
3315
|
<span class="k-loading-text">{{ loadingText }}</span>
|
|
3078
3316
|
</div>
|
|
3079
3317
|
</div>
|
|
3080
|
-
|
|
3081
3318
|
<kendo-pivotgrid-configurator
|
|
3319
|
+
#configurator
|
|
3082
3320
|
*ngIf="showConfigurator"
|
|
3083
|
-
[
|
|
3321
|
+
[navigation]="configuratorNavigation"
|
|
3322
|
+
[orientation]="configuratorSettings.orientation"
|
|
3323
|
+
(close)="toggleConfigurator()">
|
|
3084
3324
|
</kendo-pivotgrid-configurator>
|
|
3085
|
-
|
|
3086
3325
|
<div *ngIf="configurator"
|
|
3326
|
+
#configuratorButton
|
|
3087
3327
|
class="k-pivotgrid-configurator-button"
|
|
3088
|
-
|
|
3328
|
+
aria-hidden="true"
|
|
3329
|
+
(click)="toggleConfigurator()">
|
|
3089
3330
|
<span>{{messageFor('configuratorButtonText')}}<span class="k-icon k-i-gear k-color-inherit"></span>
|
|
3090
3331
|
</span>
|
|
3091
3332
|
</div>
|
|
@@ -3136,6 +3377,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3136
3377
|
}], table: [{
|
|
3137
3378
|
type: ViewChild,
|
|
3138
3379
|
args: ['table', { read: ElementRef }]
|
|
3380
|
+
}], configuratorWrapper: [{
|
|
3381
|
+
type: ViewChild,
|
|
3382
|
+
args: ['configurator', { read: ElementRef }]
|
|
3139
3383
|
}], loaderSettings: [{
|
|
3140
3384
|
type: Input
|
|
3141
3385
|
}], configurator: [{
|
|
@@ -3245,6 +3489,7 @@ class PivotBaseBindingDirective {
|
|
|
3245
3489
|
this.subs.add(this.dataService.valuesRows.subscribe((data) => {
|
|
3246
3490
|
this.zone.run(() => {
|
|
3247
3491
|
this.dataService.aggregateData = data;
|
|
3492
|
+
this.dataLoaded.emit(data);
|
|
3248
3493
|
});
|
|
3249
3494
|
}));
|
|
3250
3495
|
this.dataService.directive = this;
|
|
@@ -3557,7 +3802,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
3557
3802
|
|
|
3558
3803
|
/**
|
|
3559
3804
|
* Custom component messages override default component messages
|
|
3560
|
-
* ([see example]({% slug globalization_pivotgrid %}#toc-
|
|
3805
|
+
* ([see example]({% slug globalization_pivotgrid %}#toc-custom-messages)).
|
|
3561
3806
|
*/
|
|
3562
3807
|
class CustomMessagesComponent extends PivotGridMessages {
|
|
3563
3808
|
constructor(service) {
|
|
@@ -3704,7 +3949,8 @@ const DECLARATIONS = [
|
|
|
3704
3949
|
DraggableChipDirective,
|
|
3705
3950
|
DropTargetDirective,
|
|
3706
3951
|
LocalizedMessagesDirective,
|
|
3707
|
-
CustomMessagesComponent
|
|
3952
|
+
CustomMessagesComponent,
|
|
3953
|
+
ChipKeyboardNavigationDirective
|
|
3708
3954
|
];
|
|
3709
3955
|
const EXPORTS = [
|
|
3710
3956
|
PivotGridComponent,
|
|
@@ -3729,7 +3975,8 @@ PivotGridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
|
|
|
3729
3975
|
DraggableChipDirective,
|
|
3730
3976
|
DropTargetDirective,
|
|
3731
3977
|
LocalizedMessagesDirective,
|
|
3732
|
-
CustomMessagesComponent
|
|
3978
|
+
CustomMessagesComponent,
|
|
3979
|
+
ChipKeyboardNavigationDirective], imports: [EventsModule,
|
|
3733
3980
|
IndicatorsModule,
|
|
3734
3981
|
TreeViewModule,
|
|
3735
3982
|
DraggableModule,
|