@progress/kendo-react-pivotgrid 5.6.0-dev.202208261541 → 5.6.0-dev.202209021051
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/LICENSE.md +2 -2
- package/README.md +4 -4
- package/about.md +1 -1
- package/dist/cdn/js/kendo-react-pivotgrid.js +1 -1
- package/dist/es/PivotGrid.d.ts +14 -1
- package/dist/es/PivotGrid.js +68 -17
- package/dist/es/components/Cell.d.ts +8 -0
- package/dist/es/components/Cell.js +1 -1
- package/dist/es/components/HeaderCell.d.ts +4 -0
- package/dist/es/components/HeaderCell.js +2 -2
- package/dist/es/components/Row.d.ts +8 -0
- package/dist/es/components/Row.js +1 -1
- package/dist/es/hooks/usePivotLocalDataService.d.ts +6 -0
- package/dist/es/hooks/usePivotLocalDataService.js +18 -6
- package/dist/es/main.d.ts +2 -1
- package/dist/es/main.js +1 -0
- package/dist/es/messages/index.d.ts +5 -0
- package/dist/es/messages/index.js +5 -0
- package/dist/es/package-metadata.js +1 -1
- package/dist/es/utils/index.d.ts +13 -2
- package/dist/es/utils/index.js +19 -0
- package/dist/es/utils/navigation.d.ts +22 -0
- package/dist/es/utils/navigation.js +265 -0
- package/dist/npm/PivotGrid.d.ts +14 -1
- package/dist/npm/PivotGrid.js +68 -17
- package/dist/npm/components/Cell.d.ts +8 -0
- package/dist/npm/components/Cell.js +1 -1
- package/dist/npm/components/HeaderCell.d.ts +4 -0
- package/dist/npm/components/HeaderCell.js +2 -2
- package/dist/npm/components/Row.d.ts +8 -0
- package/dist/npm/components/Row.js +1 -1
- package/dist/npm/hooks/usePivotLocalDataService.d.ts +6 -0
- package/dist/npm/hooks/usePivotLocalDataService.js +18 -6
- package/dist/npm/main.d.ts +2 -1
- package/dist/npm/main.js +3 -1
- package/dist/npm/messages/index.d.ts +5 -0
- package/dist/npm/messages/index.js +6 -1
- package/dist/npm/package-metadata.js +1 -1
- package/dist/npm/utils/index.d.ts +13 -2
- package/dist/npm/utils/index.js +21 -1
- package/dist/npm/utils/navigation.d.ts +22 -0
- package/dist/npm/utils/navigation.js +268 -0
- package/dist/systemjs/kendo-react-pivotgrid.js +1 -1
- package/package.json +15 -12
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
var scrollableValuesSel = '.k-pivotgrid .k-pivotgrid-values';
|
|
2
|
+
var scrollableColumnHeaderSel = '.k-pivotgrid .k-pivotgrid-column-headers';
|
|
3
|
+
var scrollableRowHeaderSel = '.k-pivotgrid .k-pivotgrid-row-headers';
|
|
4
|
+
var emptyCellSel = '.k-pivotgrid > .k-pivotgrid-empty-cell';
|
|
5
|
+
var tableSel = 'table.k-pivotgrid-table';
|
|
6
|
+
var cellSel = '.k-pivotgrid-cell';
|
|
7
|
+
var scrollables = [scrollableValuesSel, scrollableColumnHeaderSel, scrollableRowHeaderSel].join(',');
|
|
8
|
+
var selectors = [
|
|
9
|
+
emptyCellSel,
|
|
10
|
+
[scrollableColumnHeaderSel, tableSel, cellSel].join(' '),
|
|
11
|
+
[scrollableRowHeaderSel, tableSel, cellSel].join(' '),
|
|
12
|
+
[scrollableValuesSel, tableSel, cellSel].join(' ')
|
|
13
|
+
];
|
|
14
|
+
var onEnter = function (target, nav, ev) {
|
|
15
|
+
var icon = target.querySelector('.k-icon');
|
|
16
|
+
if (icon) {
|
|
17
|
+
var index_1 = nav.elements.indexOf(target);
|
|
18
|
+
nav.update = function () {
|
|
19
|
+
nav.focusElement(nav.elements[index_1], null);
|
|
20
|
+
nav.update = function () { };
|
|
21
|
+
};
|
|
22
|
+
icon.click();
|
|
23
|
+
ev.preventDefault();
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var tryScrollLeft = function (target, scrollable, elToScroll) {
|
|
27
|
+
if (target.offsetLeft < scrollable.scrollLeft) {
|
|
28
|
+
elToScroll.scrollLeft = target.offsetLeft;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var tryScrollRight = function (target, scrollable, elToScroll) {
|
|
32
|
+
if (target.offsetLeft + target.offsetWidth > scrollable.scrollLeft + scrollable.offsetWidth &&
|
|
33
|
+
target.offsetWidth < scrollable.offsetWidth) {
|
|
34
|
+
elToScroll.scrollLeft = target.offsetLeft + target.offsetWidth - scrollable.offsetWidth;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var tryScrollUp = function (target, scrollable, elToScroll) {
|
|
38
|
+
if (scrollable.scrollTop && target.offsetTop < scrollable.scrollTop) {
|
|
39
|
+
elToScroll.scrollTop = target.offsetTop;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var tryScrollDown = function (target, scrollable, elToScroll) {
|
|
43
|
+
if (target.offsetTop + target.offsetHeight > scrollable.scrollTop + scrollable.offsetHeight &&
|
|
44
|
+
target.offsetHeight < scrollable.offsetHeight) {
|
|
45
|
+
elToScroll.scrollTop = target.offsetTop + target.offsetHeight - scrollable.offsetHeight;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var scrollTo = function (target, root, scrollFunc) {
|
|
49
|
+
var elToScroll = root.querySelector(scrollableValuesSel);
|
|
50
|
+
var scrollable = target && target.closest(scrollables);
|
|
51
|
+
if (!elToScroll || !scrollable || !target) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
scrollFunc.forEach(function (scroll) { return scroll(target, scrollable, elToScroll); });
|
|
55
|
+
};
|
|
56
|
+
var tableMap = function (table) {
|
|
57
|
+
var rows = Array.from(table.rows);
|
|
58
|
+
var colsCount = Array.from((rows && rows[0] && rows[0].cells) || [])
|
|
59
|
+
.map(function (c) { return c.colSpan; })
|
|
60
|
+
.reduce(function (prev, cur) { return prev + cur; }, 0);
|
|
61
|
+
var map = rows.map(function () { return new Array(colsCount); });
|
|
62
|
+
rows.forEach(function (row, r) {
|
|
63
|
+
var curColSpan = 0;
|
|
64
|
+
Array.from(row.cells).forEach(function (c) {
|
|
65
|
+
for (var colSp = 0; colSp < c.colSpan; colSp++) {
|
|
66
|
+
for (var rowSp = 0; rowSp < c.rowSpan; rowSp++) {
|
|
67
|
+
var ind = map[r + rowSp].findIndex(function (val, curInd) { return curInd >= curColSpan && !val; });
|
|
68
|
+
map[r + rowSp][ind] = c;
|
|
69
|
+
}
|
|
70
|
+
curColSpan++;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
return map;
|
|
75
|
+
};
|
|
76
|
+
var navigationMap = function (root) {
|
|
77
|
+
var columnHeader = tableMap(root.querySelector([scrollableColumnHeaderSel, tableSel].join(' ')));
|
|
78
|
+
var rowHeader = tableMap(root.querySelector([scrollableRowHeaderSel, tableSel].join(' ')));
|
|
79
|
+
var values = tableMap(root.querySelector([scrollableValuesSel, tableSel].join(' ')));
|
|
80
|
+
var emptyCell = root.querySelector(emptyCellSel);
|
|
81
|
+
var emptyCellRow = new Array(rowHeader[0].length).fill(emptyCell);
|
|
82
|
+
var map = [];
|
|
83
|
+
for (var i = 0; i < columnHeader.length; i++) {
|
|
84
|
+
map.push(emptyCellRow.concat(columnHeader[i]));
|
|
85
|
+
}
|
|
86
|
+
for (var i = 0; i < rowHeader.length; i++) {
|
|
87
|
+
map.push(rowHeader[i].concat(values[i]));
|
|
88
|
+
}
|
|
89
|
+
return map;
|
|
90
|
+
};
|
|
91
|
+
var getTargetPos = function (map, target) {
|
|
92
|
+
for (var r = 0; r < map.length; r++) {
|
|
93
|
+
for (var c = 0; c < map[r].length; c++) {
|
|
94
|
+
if (map[r][c] === target) {
|
|
95
|
+
return [r, c];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return [-1, -1];
|
|
100
|
+
};
|
|
101
|
+
var cellAt = function (root, target, pos) {
|
|
102
|
+
var map = navigationMap(root);
|
|
103
|
+
var targetPos = getTargetPos(map, target);
|
|
104
|
+
var nextPos = [targetPos[0] + pos[0], targetPos[1] + pos[1]];
|
|
105
|
+
var next = map[nextPos[0]] && map[nextPos[0]][nextPos[1]];
|
|
106
|
+
while (next && next === target) {
|
|
107
|
+
nextPos = [nextPos[0] + pos[0], nextPos[1] + pos[1]];
|
|
108
|
+
next = map[nextPos[0]] && map[nextPos[0]][nextPos[1]];
|
|
109
|
+
}
|
|
110
|
+
return next;
|
|
111
|
+
};
|
|
112
|
+
var keyboardEvents = {
|
|
113
|
+
keydown: {
|
|
114
|
+
ArrowLeft: function (target, nav, ev) {
|
|
115
|
+
ev.preventDefault();
|
|
116
|
+
var next = cellAt(nav.root, target, [0, -1]);
|
|
117
|
+
nav.focusElement(next, target);
|
|
118
|
+
scrollTo(next, nav.root, [tryScrollRight, tryScrollLeft, tryScrollDown, tryScrollUp]);
|
|
119
|
+
},
|
|
120
|
+
ArrowRight: function (target, nav, ev) {
|
|
121
|
+
ev.preventDefault();
|
|
122
|
+
var next = cellAt(nav.root, target, [0, 1]);
|
|
123
|
+
nav.focusElement(next, target);
|
|
124
|
+
scrollTo(next, nav.root, [tryScrollLeft, tryScrollRight, tryScrollDown, tryScrollUp]);
|
|
125
|
+
},
|
|
126
|
+
ArrowUp: function (target, nav, ev) {
|
|
127
|
+
ev.preventDefault();
|
|
128
|
+
var next = cellAt(nav.root, target, [-1, 0]);
|
|
129
|
+
nav.focusElement(next, target);
|
|
130
|
+
scrollTo(next, nav.root, [tryScrollRight, tryScrollLeft, tryScrollDown, tryScrollUp]);
|
|
131
|
+
},
|
|
132
|
+
ArrowDown: function (target, nav, ev) {
|
|
133
|
+
ev.preventDefault();
|
|
134
|
+
var next = cellAt(nav.root, target, [1, 0]);
|
|
135
|
+
nav.focusElement(next, target);
|
|
136
|
+
scrollTo(next, nav.root, [tryScrollRight, tryScrollLeft, tryScrollUp, tryScrollDown]);
|
|
137
|
+
},
|
|
138
|
+
Enter: onEnter,
|
|
139
|
+
Space: onEnter,
|
|
140
|
+
Home: function (target, nav, ev) {
|
|
141
|
+
var map = navigationMap(nav.root);
|
|
142
|
+
var row = ev.ctrlKey ? map[0] : (map.find(function (ro) { return Boolean(ro.find(function (x) { return x === target; })); }) || []);
|
|
143
|
+
var next = row[0];
|
|
144
|
+
if (next) {
|
|
145
|
+
nav.focusElement(next, target);
|
|
146
|
+
scrollTo(next, nav.root, [tryScrollRight, tryScrollLeft, tryScrollDown, tryScrollUp]);
|
|
147
|
+
ev.preventDefault();
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
End: function (target, nav, ev) {
|
|
151
|
+
var map = navigationMap(nav.root);
|
|
152
|
+
var row = ev.ctrlKey ? map[map.length - 1] : (map.find(function (ro) { return Boolean(ro.find(function (x) { return x === target; })); }) || []);
|
|
153
|
+
var next = row && row[row.length - 1] || null;
|
|
154
|
+
if (next) {
|
|
155
|
+
nav.focusElement(next, target);
|
|
156
|
+
scrollTo(next, nav.root, [tryScrollLeft, tryScrollRight, tryScrollUp, tryScrollDown]);
|
|
157
|
+
ev.preventDefault();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
var mouseEvents = {
|
|
163
|
+
click: function (target, nav) {
|
|
164
|
+
if (target && target instanceof HTMLElement) {
|
|
165
|
+
var prev = nav.elements.find(function (c) { return c.hasAttribute('tabindex'); }) || null;
|
|
166
|
+
nav.focusElement(target, prev);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* @hidden
|
|
172
|
+
*/
|
|
173
|
+
var PivotGridNavigation = /** @class */ (function () {
|
|
174
|
+
function PivotGridNavigation(settings) {
|
|
175
|
+
this.root = null;
|
|
176
|
+
this.selectors = [];
|
|
177
|
+
this.tabIndex = 0;
|
|
178
|
+
this.eventHandlers = {};
|
|
179
|
+
this.mouseEvents = {};
|
|
180
|
+
this.keyboardEvents = {};
|
|
181
|
+
this.update = function () { };
|
|
182
|
+
this.selectors = selectors;
|
|
183
|
+
this.mouseEvents = mouseEvents;
|
|
184
|
+
this.keyboardEvents = keyboardEvents;
|
|
185
|
+
this.tabIndex = settings.tabIndex;
|
|
186
|
+
}
|
|
187
|
+
Object.defineProperty(PivotGridNavigation.prototype, "elements", {
|
|
188
|
+
get: function () {
|
|
189
|
+
return this.root ? Array.from(this.root.querySelectorAll(this.selectors.join(','))) : [];
|
|
190
|
+
},
|
|
191
|
+
enumerable: false,
|
|
192
|
+
configurable: true
|
|
193
|
+
});
|
|
194
|
+
Object.defineProperty(PivotGridNavigation.prototype, "first", {
|
|
195
|
+
get: function () {
|
|
196
|
+
return (this.root && this.root.querySelector(this.selectors.join(','))) || null;
|
|
197
|
+
},
|
|
198
|
+
enumerable: false,
|
|
199
|
+
configurable: true
|
|
200
|
+
});
|
|
201
|
+
Object.defineProperty(PivotGridNavigation.prototype, "last", {
|
|
202
|
+
get: function () {
|
|
203
|
+
var all = this.elements;
|
|
204
|
+
return all[all.length - 1] || null;
|
|
205
|
+
},
|
|
206
|
+
enumerable: false,
|
|
207
|
+
configurable: true
|
|
208
|
+
});
|
|
209
|
+
PivotGridNavigation.prototype.start = function (root) {
|
|
210
|
+
var _this = this;
|
|
211
|
+
this.root = root;
|
|
212
|
+
var _loop_1 = function (eventType) {
|
|
213
|
+
if (this_1.mouseEvents[eventType]) {
|
|
214
|
+
this_1.eventHandlers[eventType] = (function (ev) {
|
|
215
|
+
var target = ev.target instanceof Element && ev.target.closest(_this.selectors.join(','));
|
|
216
|
+
if (target) {
|
|
217
|
+
_this.mouseEvents[eventType].call(undefined, target, _this, ev);
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
root.addEventListener(eventType, this_1.eventHandlers[eventType]);
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
var this_1 = this;
|
|
224
|
+
for (var eventType in this.mouseEvents) {
|
|
225
|
+
_loop_1(eventType);
|
|
226
|
+
}
|
|
227
|
+
var _loop_2 = function (eventType) {
|
|
228
|
+
if (this_2.keyboardEvents[eventType]) {
|
|
229
|
+
this_2.eventHandlers[eventType] = (function (ev) {
|
|
230
|
+
var target = ev.target instanceof Element && ev.target.closest(_this.selectors.join(','));
|
|
231
|
+
var key = ev.key === ' ' ? 'Space' : ev.key;
|
|
232
|
+
if (target && _this.keyboardEvents[eventType][key]) {
|
|
233
|
+
_this.keyboardEvents[eventType][key].call(undefined, target, _this, ev);
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
root.addEventListener(eventType, this_2.eventHandlers[eventType]);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
var this_2 = this;
|
|
240
|
+
for (var eventType in this.keyboardEvents) {
|
|
241
|
+
_loop_2(eventType);
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
PivotGridNavigation.prototype.stop = function () {
|
|
245
|
+
if (this.root) {
|
|
246
|
+
for (var eventType in this.eventHandlers) {
|
|
247
|
+
if (this.eventHandlers[eventType]) {
|
|
248
|
+
this.root.removeEventListener(eventType, this.eventHandlers[eventType]);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
this.root = null;
|
|
253
|
+
};
|
|
254
|
+
PivotGridNavigation.prototype.focusElement = function (element, previous) {
|
|
255
|
+
if (element) {
|
|
256
|
+
if (previous) {
|
|
257
|
+
previous.removeAttribute('tabindex');
|
|
258
|
+
}
|
|
259
|
+
element.setAttribute('tabindex', String(this.tabIndex));
|
|
260
|
+
element.focus({ preventScroll: true });
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
return PivotGridNavigation;
|
|
264
|
+
}());
|
|
265
|
+
export { PivotGridNavigation };
|
package/dist/npm/PivotGrid.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { PivotGridCellProps } from './components/Cell';
|
|
|
4
4
|
import { PivotGridHeaderCellProps } from './components/HeaderCell';
|
|
5
5
|
import { PivotGridColumnProps } from './components/Column';
|
|
6
6
|
import { CustomComponent } from '@progress/kendo-react-common';
|
|
7
|
-
import { PivotGridAxis, PivotDataItem, Tuple } from '@progress/kendo-pivotgrid-common';
|
|
7
|
+
import { PivotGridAxis, PivotDataItem, Tuple, AxisRow } from '@progress/kendo-pivotgrid-common';
|
|
8
8
|
import { PivotGridAxesChangeEvent } from './models';
|
|
9
9
|
/**
|
|
10
10
|
* Represents the props of the [KendoReact PivotGrid component]({% slug api_pivotgrid_pivotgrid %}).
|
|
@@ -26,6 +26,11 @@ export interface PivotGridProps {
|
|
|
26
26
|
* Sets the `tabIndex` property of the top-most element of the PivotGrid.
|
|
27
27
|
*/
|
|
28
28
|
tabIndex?: number;
|
|
29
|
+
/**
|
|
30
|
+
* If set to `true`, the user can use dedicated shortcuts to interact with the PivotGrid.
|
|
31
|
+
* By default, navigation is disabled.
|
|
32
|
+
*/
|
|
33
|
+
navigatable?: boolean;
|
|
29
34
|
/**
|
|
30
35
|
* Sets the `data` of the PivotGrid.
|
|
31
36
|
*/
|
|
@@ -157,6 +162,14 @@ export interface PivotGridProps {
|
|
|
157
162
|
export interface PivotGridHandle {
|
|
158
163
|
element: HTMLDivElement | null;
|
|
159
164
|
props: PivotGridProps;
|
|
165
|
+
columnHeaderRows: AxisRow[];
|
|
166
|
+
rowHeaderRows: AxisRow[];
|
|
167
|
+
dataCells: {
|
|
168
|
+
row: string[];
|
|
169
|
+
cells: PivotDataItem[];
|
|
170
|
+
}[];
|
|
171
|
+
rowHeaderBreadth: number;
|
|
172
|
+
columnHeaderBreadth: number;
|
|
160
173
|
}
|
|
161
174
|
/**
|
|
162
175
|
* Represents the [KendoReact PivotGrid component]({% slug api_pivotgrid_pivotgridprops %}).
|
package/dist/npm/PivotGrid.js
CHANGED
|
@@ -15,6 +15,8 @@ exports.PivotGrid = void 0;
|
|
|
15
15
|
var React = require("react");
|
|
16
16
|
var kendo_react_common_1 = require("@progress/kendo-react-common");
|
|
17
17
|
var package_metadata_1 = require("./package-metadata");
|
|
18
|
+
var kendo_react_intl_1 = require("@progress/kendo-react-intl");
|
|
19
|
+
var messages_1 = require("./messages");
|
|
18
20
|
var Row_1 = require("./components/Row");
|
|
19
21
|
var Cell_1 = require("./components/Cell");
|
|
20
22
|
var useHeaders_1 = require("./hooks/useHeaders");
|
|
@@ -23,6 +25,7 @@ var useHorizontalScrollSync_1 = require("./hooks/useHorizontalScrollSync");
|
|
|
23
25
|
var useVerticalScrollSync_1 = require("./hooks/useVerticalScrollSync");
|
|
24
26
|
var Column_1 = require("./components/Column");
|
|
25
27
|
var utils_1 = require("./utils");
|
|
28
|
+
var navigation_1 = require("./utils/navigation");
|
|
26
29
|
var kendo_react_common_2 = require("@progress/kendo-react-common");
|
|
27
30
|
var kendo_pivotgrid_common_1 = require("@progress/kendo-pivotgrid-common");
|
|
28
31
|
/**
|
|
@@ -33,13 +36,12 @@ exports.PivotGrid = React.forwardRef(function (props, ref) {
|
|
|
33
36
|
var _a = __assign(__assign({}, defaultProps), props), rows = _a.rows, rowAxes = _a.rowAxes, columns = _a.columns, columnAxes = _a.columnAxes, data = _a.data;
|
|
34
37
|
var element = React.useRef(null);
|
|
35
38
|
var target = React.useRef(null);
|
|
36
|
-
React.useImperativeHandle(target, function () { return ({ props: props, element: element.current }); });
|
|
37
|
-
React.useImperativeHandle(ref, function () { return target.current; });
|
|
38
39
|
var rowHeadersTable = React.useRef(null);
|
|
39
40
|
var columnHeadersTable = React.useRef(null);
|
|
40
41
|
var rowHeadersContainer = React.useRef(null);
|
|
41
42
|
var columnHeadersContainer = React.useRef(null);
|
|
42
43
|
var valuesHeadersContainer = React.useRef(null);
|
|
44
|
+
var localization = (0, kendo_react_intl_1.useLocalization)();
|
|
43
45
|
var handleRowAxesChange = function (newRowAxes, syntheticEvent) {
|
|
44
46
|
if (props.onRowAxesChange) {
|
|
45
47
|
props.onRowAxesChange({
|
|
@@ -65,6 +67,16 @@ exports.PivotGrid = React.forwardRef(function (props, ref) {
|
|
|
65
67
|
var _d = (0, useHeaders_1.useHeaders)((columnAxes || []).slice(), columnsTree, handleColumnAxesChange), dispatchColumns = _d[1];
|
|
66
68
|
var _e = (0, kendo_pivotgrid_common_1.toColumns)(columnsTree), columnHeaderRows = _e[0], columnHeaderLeafs = _e[1], columnHeaderBreadth = _e[3];
|
|
67
69
|
var measures = (0, kendo_pivotgrid_common_1.toData)((data || []).slice(), columnHeaderLeafs, rowHeaderLeafs, columnHeaderBreadth, rowHeaderDepth);
|
|
70
|
+
React.useImperativeHandle(target, function () { return ({
|
|
71
|
+
props: props,
|
|
72
|
+
element: element.current,
|
|
73
|
+
columnHeaderRows: columnHeaderRows,
|
|
74
|
+
rowHeaderRows: rowHeaderRows,
|
|
75
|
+
dataCells: measures,
|
|
76
|
+
rowHeaderBreadth: rowHeaderBreadth,
|
|
77
|
+
columnHeaderBreadth: columnHeaderBreadth
|
|
78
|
+
}); });
|
|
79
|
+
React.useImperativeHandle(ref, function () { return target.current; });
|
|
68
80
|
var dataColumns = [];
|
|
69
81
|
var rowHeaderColumns = [];
|
|
70
82
|
var columnHeadersColumns = [];
|
|
@@ -125,6 +137,27 @@ exports.PivotGrid = React.forwardRef(function (props, ref) {
|
|
|
125
137
|
element.current.style.gridTemplateColumns = "".concat(rowHeadersTable.current.offsetWidth, "px 1fr");
|
|
126
138
|
}
|
|
127
139
|
}, []);
|
|
140
|
+
var navigation = React.useRef(new navigation_1.PivotGridNavigation({ tabIndex: props.tabIndex || 0 }));
|
|
141
|
+
React.useEffect(function () {
|
|
142
|
+
if (element.current) {
|
|
143
|
+
var tabIndex = props.tabIndex || 0;
|
|
144
|
+
navigation.current.stop();
|
|
145
|
+
navigation.current.tabIndex = tabIndex;
|
|
146
|
+
if (props.navigatable) {
|
|
147
|
+
navigation.current.start(element.current);
|
|
148
|
+
var firstCell = navigation.current.first;
|
|
149
|
+
if (firstCell) {
|
|
150
|
+
firstCell.setAttribute('tabindex', String(tabIndex));
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return function () {
|
|
155
|
+
navigation.current.stop();
|
|
156
|
+
};
|
|
157
|
+
}, [props.tabIndex, props.navigatable]);
|
|
158
|
+
React.useEffect(function () {
|
|
159
|
+
navigation.current.update();
|
|
160
|
+
});
|
|
128
161
|
React.useEffect(function () {
|
|
129
162
|
if (columnHeadersTable.current) {
|
|
130
163
|
var observer_1 = new window.ResizeObserver(setRowsTemplate);
|
|
@@ -147,14 +180,36 @@ exports.PivotGrid = React.forwardRef(function (props, ref) {
|
|
|
147
180
|
return function () { observer_3.disconnect(); };
|
|
148
181
|
}
|
|
149
182
|
}, []);
|
|
150
|
-
|
|
151
|
-
|
|
183
|
+
var columnHeaderCellsIds = new Array(columnHeaderRows.length).fill([]).map(function () { return new Array(columnHeaderLeafs.length); });
|
|
184
|
+
columnHeaderRows.forEach(function (row, r) {
|
|
185
|
+
var curColSpan = 0;
|
|
186
|
+
Array.from(row.cells).forEach(function (cell) {
|
|
187
|
+
var expanded = Boolean(cell && cell.children && cell.children.length);
|
|
188
|
+
var id = (cell ? (0, utils_1.generateKey)(cell.normalizedPath)
|
|
189
|
+
+ (cell.total ? '|[TOTAL]' : '')
|
|
190
|
+
+ (expanded ? '|[EXPANDED]' : '') : '').replace(/\s/g, '-');
|
|
191
|
+
if (cell) {
|
|
192
|
+
for (var colSp = 0; colSp < (cell.colSpan || 1); colSp++) {
|
|
193
|
+
for (var rowSp = 0; rowSp < (cell.rowSpan || 1); rowSp++) {
|
|
194
|
+
var ind = columnHeaderCellsIds[r + rowSp].findIndex(function (val, curInd) { return curInd >= curColSpan && !val; });
|
|
195
|
+
columnHeaderCellsIds[r + rowSp][ind] = id;
|
|
196
|
+
}
|
|
197
|
+
curColSpan++;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
var dataCellsIds = measures.map(function (row) {
|
|
203
|
+
return row.cells.map(function (cell) { return (0, utils_1.generateDataKey)(cell.rowTuple.members, cell.columnTuple.members).replace(/\s/g, '-'); });
|
|
204
|
+
});
|
|
205
|
+
return (React.createElement("div", { ref: element, id: props.id, style: props.style, tabIndex: !props.navigatable ? props.tabIndex : undefined, className: (0, kendo_react_common_2.classNames)('k-pivotgrid', props.className), role: "grid" },
|
|
206
|
+
React.createElement("span", { className: "k-pivotgrid-empty-cell", title: localization.toLanguageString(messages_1.emptyCellAriaLabel, messages_1.messages[messages_1.emptyCellAriaLabel]) }),
|
|
152
207
|
React.createElement("div", { ref: columnHeadersContainer, className: "k-pivotgrid-column-headers", onScroll: handleHorizontalScroll },
|
|
153
|
-
React.createElement("table", { ref: columnHeadersTable, className: "k-pivotgrid-table" },
|
|
208
|
+
React.createElement("table", { ref: columnHeadersTable, className: "k-pivotgrid-table", role: "none" },
|
|
154
209
|
React.createElement("colgroup", null, columnHeadersColumns),
|
|
155
|
-
React.createElement("tbody", { className: "k-pivotgrid-tbody" }, columnHeaderRows.map(function (row) {
|
|
210
|
+
React.createElement("tbody", { className: "k-pivotgrid-tbody", role: 'rowgroup' }, columnHeaderRows.map(function (row, r) {
|
|
156
211
|
var foundCell = false;
|
|
157
|
-
return (React.createElement(ColumnHeadersRowComponent, __assign({ key: row.name }, RowProps), row.cells.map(function (cell, cellIdx) {
|
|
212
|
+
return (React.createElement(ColumnHeadersRowComponent, __assign({ key: row.name, role: "row" }, RowProps), row.cells.map(function (cell, cellIdx) {
|
|
158
213
|
var first = cellIdx !== 0 && !foundCell;
|
|
159
214
|
if (cell) {
|
|
160
215
|
foundCell = true;
|
|
@@ -162,28 +217,24 @@ exports.PivotGrid = React.forwardRef(function (props, ref) {
|
|
|
162
217
|
var expanded = cell && Boolean(cell.children && cell.children.length);
|
|
163
218
|
var expandable = cell && (cell.hasChildren && (!cell.total || (cell.total && cell.parent.total)));
|
|
164
219
|
return cell
|
|
165
|
-
? (React.createElement(ColumnHeadersColumnCellComponent, __assign({}, HeaderCellProps, { key:
|
|
166
|
-
+ (cell.total ? '|[TOTAL]' : '')
|
|
167
|
-
+ (expanded ? '|[EXPANDED]' : ''), "data-key": (0, utils_1.generateKey)(cell.normalizedPath)
|
|
168
|
-
+ (cell.total ? '|[TOTAL]' : '')
|
|
169
|
-
+ (expanded ? '|[EXPANDED]' : ''), columnPath: cell.normalizedPath, rowSpan: cell.rowSpan || undefined, colSpan: cell.colSpan || undefined, onIconClick: handleColumnCellClick, dataItem: cell, expanded: expanded, expandable: expandable, total: cell.total, first: first, root: cell.levelNum === 0 }), cell.caption))
|
|
220
|
+
? (React.createElement(ColumnHeadersColumnCellComponent, __assign({}, HeaderCellProps, { key: columnHeaderCellsIds[r][cellIdx], "data-key": columnHeaderCellsIds[r][cellIdx], id: columnHeaderCellsIds[r][cellIdx], columnPath: cell.normalizedPath, rowSpan: cell.rowSpan || undefined, colSpan: cell.colSpan || undefined, onIconClick: handleColumnCellClick, dataItem: cell, expanded: expanded, expandable: expandable, total: cell.total, first: first, root: cell.levelNum === 0, role: "columnheader" }), cell.caption))
|
|
170
221
|
: null;
|
|
171
222
|
})));
|
|
172
223
|
})))),
|
|
173
224
|
React.createElement("div", { ref: rowHeadersContainer, className: "k-pivotgrid-row-headers" },
|
|
174
|
-
React.createElement("table", { ref: rowHeadersTable, className: "k-pivotgrid-table" },
|
|
225
|
+
React.createElement("table", { ref: rowHeadersTable, className: "k-pivotgrid-table", role: "none" },
|
|
175
226
|
React.createElement("colgroup", null, rowHeaderColumns),
|
|
176
|
-
React.createElement("tbody", { className: "k-pivotgrid-tbody" }, rowHeaderRows.map(function (row, rowId) { return (React.createElement(RowHeadersRowComponent, __assign({ key: (0, utils_1.generateKey)(rowHeaderLeafs[rowId].path) }, RowProps, { path: rowHeaderLeafs[rowId].path }), row.cells.filter(Boolean).map(function (cell) { return cell
|
|
227
|
+
React.createElement("tbody", { className: "k-pivotgrid-tbody", role: "rowgroup" }, rowHeaderRows.map(function (row, rowId) { return (React.createElement(RowHeadersRowComponent, __assign({ key: (0, utils_1.generateKey)(rowHeaderLeafs[rowId].path) }, RowProps, { path: rowHeaderLeafs[rowId].path, role: "row", ariaOwns: dataCellsIds[rowId].join(' ') }), row.cells.filter(Boolean).map(function (cell) { return cell
|
|
177
228
|
? (React.createElement(RowHeadersCellComponent, __assign({}, HeaderCellProps, { key: (0, utils_1.generateKey)(cell.normalizedPath)
|
|
178
229
|
+ (cell.total ? '|[TOTAL]' : '')
|
|
179
230
|
+ (Boolean(cell.children && cell.children.length) ? '|[EXPANDED]' : ''), "data-key": (0, utils_1.generateKey)(cell.normalizedPath)
|
|
180
231
|
+ (cell.total ? '|[TOTAL]' : '')
|
|
181
|
-
+ (Boolean(cell.children && cell.children.length) ? '|[EXPANDED]' : ''), rowPath: cell.normalizedPath, rowSpan: cell.rowSpan || undefined, colSpan: cell.colSpan || undefined, dataItem: cell, expanded: Boolean(cell.children && cell.children.length), expandable: cell.hasChildren && !cell.total, total: cell.total, onIconClick: handleRowCellClick, root: cell.levelNum === 0 }), cell.caption))
|
|
232
|
+
+ (Boolean(cell.children && cell.children.length) ? '|[EXPANDED]' : ''), rowPath: cell.normalizedPath, rowSpan: cell.rowSpan || undefined, colSpan: cell.colSpan || undefined, dataItem: cell, expanded: Boolean(cell.children && cell.children.length), expandable: cell.hasChildren && !cell.total, total: cell.total, onIconClick: handleRowCellClick, root: cell.levelNum === 0, role: "rowheader" }), cell.caption))
|
|
182
233
|
: null; }))); })))),
|
|
183
234
|
React.createElement("div", { ref: valuesHeadersContainer, className: "k-pivotgrid-values", onScroll: handleValuesContainerScroll },
|
|
184
|
-
React.createElement("table", { className: "k-pivotgrid-table" },
|
|
235
|
+
React.createElement("table", { className: "k-pivotgrid-table", role: "none" },
|
|
185
236
|
React.createElement("colgroup", null, dataColumns),
|
|
186
|
-
React.createElement("tbody", { className: "k-pivotgrid-tbody" }, measures.map(function (row, rowId) { return (React.createElement(DataRowComponent, __assign({ key: (0, utils_1.generateKey)(rowHeaderLeafs[rowId].path) }, RowProps, { path: rowHeaderLeafs[rowId].path }), row.cells.map(function (cell, cellId) { return (React.createElement(CellComponent, __assign({ key:
|
|
237
|
+
React.createElement("tbody", { className: "k-pivotgrid-tbody", role: "none" }, measures.map(function (row, rowId) { return (React.createElement(DataRowComponent, __assign({ key: (0, utils_1.generateKey)(rowHeaderLeafs[rowId].path) }, RowProps, { path: rowHeaderLeafs[rowId].path, role: "none" }), row.cells.map(function (cell, cellId) { return (React.createElement(CellComponent, __assign({ key: dataCellsIds[rowId][cellId], "data-key": dataCellsIds[rowId][cellId], id: dataCellsIds[rowId][cellId] }, CellProps, { rowPath: cell.rowTuple.members.map(function (m) { return m.name; }), columnPath: cell.columnTuple.members.map(function (m) { return m.name; }), dataItem: cell, total: rowHeaderLeafs[rowId].total || columnHeaderLeafs[cellId].total, role: "gridcell", ariaDescribedby: columnHeaderCellsIds.map(function (r) { return r[cellId]; }).join(' ') }), (cell && cell.data && cell.data.fmtValue) ? cell.data.fmtValue : '\u00A0')); }))); }))))));
|
|
187
238
|
});
|
|
188
239
|
var defaultProps = {
|
|
189
240
|
rowAxes: [],
|
|
@@ -50,6 +50,14 @@ export interface PivotGridCellProps extends KendoMouse<PivotGridCellHandle, HTML
|
|
|
50
50
|
* Indicates if the current cell represents a `total` value.
|
|
51
51
|
*/
|
|
52
52
|
total?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Sets the `role` property of the top-most element of the PivotGridCell.
|
|
55
|
+
*/
|
|
56
|
+
role?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Sets the `aria-describedby` property of the top-most element of the PivotGridCell.
|
|
59
|
+
*/
|
|
60
|
+
ariaDescribedby?: string;
|
|
53
61
|
}
|
|
54
62
|
/**
|
|
55
63
|
* Represents the [KendoReact PivotGridCell component]({% slug api_pivotgrid_pivotgridcellprops %}).
|
|
@@ -27,7 +27,7 @@ exports.PivotGridCell = React.forwardRef(function (props, ref) {
|
|
|
27
27
|
}); });
|
|
28
28
|
React.useImperativeHandle(ref, function () { return target.current; });
|
|
29
29
|
var mouseProps = (0, kendo_react_common_1.useMouse)(props, target);
|
|
30
|
-
return (React.createElement("td", __assign({ ref: element }, mouseProps, {
|
|
30
|
+
return (React.createElement("td", __assign({ ref: element }, mouseProps, { id: props.id, style: props.style, tabIndex: props.tabIndex, role: props.role, "aria-describedby": props.ariaDescribedby, className: (0, kendo_react_common_1.classNames)('k-pivotgrid-cell', {
|
|
31
31
|
'k-pivotgrid-header-total': props.total
|
|
32
32
|
}, props.className) }), props.children));
|
|
33
33
|
});
|
|
@@ -85,6 +85,10 @@ export interface PivotGridHeaderCellProps extends KendoMouse<PivotGridHeaderCell
|
|
|
85
85
|
* A callback, fired whenever the `icon` is clicked.
|
|
86
86
|
*/
|
|
87
87
|
onIconClick?: (args: KendoMouseEvent<PivotGridHeaderCellHandle, HTMLSpanElement>) => void;
|
|
88
|
+
/**
|
|
89
|
+
* Sets the `role` property of the top-most element of the PivotGridHeaderCell.
|
|
90
|
+
*/
|
|
91
|
+
role?: string;
|
|
88
92
|
}
|
|
89
93
|
/**
|
|
90
94
|
* Represents the [KendoReact PivotGridHeaderCell component]({% slug api_pivotgrid_pivotgridheadercellprops %}).
|
|
@@ -37,13 +37,13 @@ exports.PivotGridHeaderCell = React.forwardRef(function (props, ref) {
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
return (React.createElement("th", __assign({ ref: element }, mouseProps, { colSpan: props.colSpan, rowSpan: props.rowSpan,
|
|
40
|
+
return (React.createElement("th", __assign({ ref: element }, mouseProps, { colSpan: props.colSpan, rowSpan: props.rowSpan, id: props.id, style: props.style, tabIndex: props.tabIndex, role: props.role }, (props.expandable ? { 'aria-expanded': props.expanded } : {}), { className: (0, kendo_react_common_1.classNames)('k-pivotgrid-cell', {
|
|
41
41
|
'k-pivotgrid-header-total': props.total,
|
|
42
42
|
'k-pivotgrid-header-root': props.root,
|
|
43
43
|
'k-pivotgrid-expanded': props.expanded,
|
|
44
44
|
'k-first': props.first
|
|
45
45
|
}, props.className) }),
|
|
46
|
-
props.expandable && (React.createElement(IconComponent, __assign({}, IconProps, { onClick: handleIconClick, name: "
|
|
46
|
+
props.expandable && (React.createElement(IconComponent, __assign({}, IconProps, { onClick: handleIconClick, name: "chevron-".concat(props.expanded ? 'up' : 'down'), "aria-hidden": true }))),
|
|
47
47
|
props.children));
|
|
48
48
|
});
|
|
49
49
|
var defaultProps = {
|
|
@@ -35,6 +35,14 @@ export interface PivotGridRowProps extends KendoMouse<PivotGridRowHandle, HTMLTa
|
|
|
35
35
|
* Represents the `path` leading to the current `row`.
|
|
36
36
|
*/
|
|
37
37
|
path?: string[];
|
|
38
|
+
/**
|
|
39
|
+
* Sets the `role` property of the top-most element of the PivotGridRow.
|
|
40
|
+
*/
|
|
41
|
+
role?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Sets the `aria-owns` property of the top-most element of the PivotGridRow.
|
|
44
|
+
*/
|
|
45
|
+
ariaOwns?: string;
|
|
38
46
|
}
|
|
39
47
|
/**
|
|
40
48
|
* Represents the [KendoReact PivotGridRow component]({% slug api_pivotgrid_pivotgridrowprops %}).
|
|
@@ -26,6 +26,6 @@ exports.PivotGridRow = React.forwardRef(function (props, ref) {
|
|
|
26
26
|
}); });
|
|
27
27
|
React.useImperativeHandle(ref, function () { return target.current; });
|
|
28
28
|
var mouseProps = (0, kendo_react_common_1.useMouse)(props, target);
|
|
29
|
-
return (React.createElement("tr", __assign({ ref: element }, mouseProps, { id: props.id, style: props.style, tabIndex: props.tabIndex, children: props.children, className: (0, kendo_react_common_1.classNames)('k-pivotgrid-row', props.className) })));
|
|
29
|
+
return (React.createElement("tr", __assign({ ref: element }, mouseProps, { id: props.id, style: props.style, tabIndex: props.tabIndex, children: props.children, role: props.role, "aria-owns": props.ariaOwns, className: (0, kendo_react_common_1.classNames)('k-pivotgrid-row', props.className) })));
|
|
30
30
|
});
|
|
31
31
|
exports.PivotGridRow.displayName = 'KendoReactPivotGridRow';
|
|
@@ -53,6 +53,12 @@ export interface PivotLocalDataServiceState {
|
|
|
53
53
|
* Represents the `PivotGridConfigurator` component props.
|
|
54
54
|
*/
|
|
55
55
|
configuratorProps: PivotGridConfiguratorProps;
|
|
56
|
+
/**
|
|
57
|
+
* Represents an object containing additional state data.
|
|
58
|
+
*/
|
|
59
|
+
state: {
|
|
60
|
+
loading: boolean;
|
|
61
|
+
};
|
|
56
62
|
}
|
|
57
63
|
/**
|
|
58
64
|
* A [custom React hook](https://reactjs.org/docs/hooks-custom.html) which provides data-binding to local data.
|
|
@@ -24,11 +24,13 @@ var stringSeparator = '&';
|
|
|
24
24
|
* A [custom React hook](https://reactjs.org/docs/hooks-custom.html) which provides data-binding to local data.
|
|
25
25
|
*/
|
|
26
26
|
var usePivotLocalDataService = function (args) {
|
|
27
|
-
var _a = React.useState(
|
|
28
|
-
var _b = React.useState(args.
|
|
29
|
-
var _c = React.useState(args.
|
|
30
|
-
var _d = React.useState(args.
|
|
31
|
-
var _e = React.useState(args.
|
|
27
|
+
var _a = React.useState(true), loading = _a[0], setLoading = _a[1];
|
|
28
|
+
var _b = React.useState(args.defaultColumnAxes || []), columnAxes = _b[0], setColumnAxes = _b[1];
|
|
29
|
+
var _c = React.useState(args.defaultRowAxes || []), rowAxes = _c[0], setRowAxes = _c[1];
|
|
30
|
+
var _d = React.useState(args.defaultMeasureAxes || []), measureAxes = _d[0], setMeasureAxes = _d[1];
|
|
31
|
+
var _e = React.useState(args.defaultSort || []), sort = _e[0], setSort = _e[1];
|
|
32
|
+
var _f = React.useState(args.defaultFilter || []), filter = _f[0], setFilter = _f[1];
|
|
33
|
+
var _g = React.useState(new Map()), dataTree = _g[0], setDataTree = _g[1];
|
|
32
34
|
var handleRowAxesChange = React.useCallback(function (event) {
|
|
33
35
|
setRowAxes(event.value);
|
|
34
36
|
}, []);
|
|
@@ -50,7 +52,14 @@ var usePivotLocalDataService = function (args) {
|
|
|
50
52
|
var columnSettings = React.useMemo(function () { return rootColumnAxes.split(stringSeparator).map(createAxisSettings); }, [rootColumnAxes, createAxisSettings]);
|
|
51
53
|
var rowSettings = React.useMemo(function () { return rootRowAxes.split(stringSeparator).map(createAxisSettings); }, [rootRowAxes, createAxisSettings]);
|
|
52
54
|
var measuresSettings = React.useMemo(function () { return measureAxes.map(function (m) { return args.measures.find(function (meas) { return String(meas.name) === String(m.name); }); }).filter(Boolean); }, [measureAxes, args.measures]);
|
|
53
|
-
|
|
55
|
+
React.useEffect(function () {
|
|
56
|
+
setLoading(true);
|
|
57
|
+
setTimeout(function () {
|
|
58
|
+
var result = (0, kendo_pivotgrid_common_1.createDataTree)(args.data, rowSettings, columnSettings, measuresSettings, bindingFields, filter);
|
|
59
|
+
setDataTree(result);
|
|
60
|
+
setLoading(false);
|
|
61
|
+
}, 0);
|
|
62
|
+
}, [args.data, rowSettings, columnSettings, measuresSettings, filter]);
|
|
54
63
|
var configuratorData = React.useMemo(function () { return (0, kendo_pivotgrid_common_1.createFlatSchemaDimensions)(args.dimensions, args.measures); }, [args.dimensions, args.measures]);
|
|
55
64
|
var dataState = React.useMemo(function () { return (0, kendo_pivotgrid_common_1.createLocalDataState)({
|
|
56
65
|
dataTree: dataTree,
|
|
@@ -84,6 +93,9 @@ var usePivotLocalDataService = function (args) {
|
|
|
84
93
|
onRowAxesChange: handleRowAxesChange,
|
|
85
94
|
onColumnAxesChange: handleColumnAxesChange,
|
|
86
95
|
onMeasureAxesChange: handleMeasureAxesChange
|
|
96
|
+
},
|
|
97
|
+
state: {
|
|
98
|
+
loading: loading
|
|
87
99
|
}
|
|
88
100
|
};
|
|
89
101
|
};
|
package/dist/npm/main.d.ts
CHANGED
|
@@ -14,4 +14,5 @@ export { PivotGridAxisFilterFieldsEditor, PivotGridAxisFilterFieldsEditorProps,
|
|
|
14
14
|
export { PivotOLAPService, usePivotOLAPService, PivotOLAPServiceArgs, PivotOLAPServiceProps, PivotOLAPServiceState } from './hooks/usePivotOLAPService';
|
|
15
15
|
export { usePivotLocalDataService, PivotLocalDataService, PivotLocalDataServiceArgs, PivotLocalDataServiceProps, PivotLocalDataServiceState } from './hooks/usePivotLocalDataService';
|
|
16
16
|
export { PivotGridTreeViewData, PivotGridAxesChangeEvent, PivotGridConfiguratorAxesChangeEvent, PivotGridConfiguratorSortChangeEvent, PivotGridConfiguratorFilterChangeEvent } from './models';
|
|
17
|
-
export {
|
|
17
|
+
export { dataCells } from './utils';
|
|
18
|
+
export { PivotGridAxis, AxisDataItem, AxisRow, DimensionField, HierarchyField, KPIField, KPIMeasureField, LevelField, MeasureField, Member, MemberField, PivotDataItem, Tuple, sumAggregate, averageAggregate, minAggregate, maxAggregate, Aggregate, Dimension, Measure } from '@progress/kendo-pivotgrid-common';
|
package/dist/npm/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.maxAggregate = exports.minAggregate = exports.averageAggregate = exports.sumAggregate = exports.PivotLocalDataService = exports.usePivotLocalDataService = exports.usePivotOLAPService = exports.PivotOLAPService = exports.PivotGridAxisFilterFieldsEditor = exports.PivotGridAxisEditor = exports.PivotGridConfiguratorEditorAxesContext = exports.PivotGridAxesEditor = exports.PivotGridFieldsEditor = exports.PivotGridConfiguratorButton = exports.PivotGridConfiguratorEditor = exports.PivotGridConfigurator = exports.PivotGridContainer = exports.PivotGridHeaderCell = exports.PivotGridCell = exports.PivotGridRow = exports.PivotGridColumn = exports.PivotGrid = void 0;
|
|
3
|
+
exports.maxAggregate = exports.minAggregate = exports.averageAggregate = exports.sumAggregate = exports.dataCells = exports.PivotLocalDataService = exports.usePivotLocalDataService = exports.usePivotOLAPService = exports.PivotOLAPService = exports.PivotGridAxisFilterFieldsEditor = exports.PivotGridAxisEditor = exports.PivotGridConfiguratorEditorAxesContext = exports.PivotGridAxesEditor = exports.PivotGridFieldsEditor = exports.PivotGridConfiguratorButton = exports.PivotGridConfiguratorEditor = exports.PivotGridConfigurator = exports.PivotGridContainer = exports.PivotGridHeaderCell = exports.PivotGridCell = exports.PivotGridRow = exports.PivotGridColumn = exports.PivotGrid = void 0;
|
|
4
4
|
var PivotGrid_1 = require("./PivotGrid");
|
|
5
5
|
Object.defineProperty(exports, "PivotGrid", { enumerable: true, get: function () { return PivotGrid_1.PivotGrid; } });
|
|
6
6
|
var Column_1 = require("./components/Column");
|
|
@@ -34,6 +34,8 @@ Object.defineProperty(exports, "usePivotOLAPService", { enumerable: true, get: f
|
|
|
34
34
|
var usePivotLocalDataService_1 = require("./hooks/usePivotLocalDataService");
|
|
35
35
|
Object.defineProperty(exports, "usePivotLocalDataService", { enumerable: true, get: function () { return usePivotLocalDataService_1.usePivotLocalDataService; } });
|
|
36
36
|
Object.defineProperty(exports, "PivotLocalDataService", { enumerable: true, get: function () { return usePivotLocalDataService_1.PivotLocalDataService; } });
|
|
37
|
+
var utils_1 = require("./utils");
|
|
38
|
+
Object.defineProperty(exports, "dataCells", { enumerable: true, get: function () { return utils_1.dataCells; } });
|
|
37
39
|
var kendo_pivotgrid_common_1 = require("@progress/kendo-pivotgrid-common");
|
|
38
40
|
Object.defineProperty(exports, "sumAggregate", { enumerable: true, get: function () { return kendo_pivotgrid_common_1.sumAggregate; } });
|
|
39
41
|
Object.defineProperty(exports, "averageAggregate", { enumerable: true, get: function () { return kendo_pivotgrid_common_1.averageAggregate; } });
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @hidden
|
|
3
|
+
*/
|
|
4
|
+
export declare const emptyCellAriaLabel = "pivotgrid.emptyCellAriaLabel";
|
|
1
5
|
/**
|
|
2
6
|
* @hidden
|
|
3
7
|
*/
|
|
@@ -50,6 +54,7 @@ export declare const configuratorButtonLabel = "pivotgrid.configuratorButtonLabe
|
|
|
50
54
|
* @hidden
|
|
51
55
|
*/
|
|
52
56
|
export declare const messages: {
|
|
57
|
+
"pivotgrid.emptyCellAriaLabel": string;
|
|
53
58
|
"pivotgrid.fieldMenuReset": string;
|
|
54
59
|
"pivotgrid.fieldMenuApply": string;
|
|
55
60
|
"pivotgrid.configuratorCancel": string;
|