@progress/kendo-react-pivotgrid 6.1.1 → 7.0.0-develop.1
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 +1 -1
- package/{dist/npm/PivotGrid.d.ts → PivotGrid.d.ts} +4 -0
- package/{dist/es/components → components}/AxesEditor.d.ts +4 -6
- package/{dist/npm/components → components}/AxisEditor.d.ts +4 -0
- package/{dist/es/components → components}/AxisFilterFieldsEditor.d.ts +4 -0
- package/{dist/npm/components → components}/Cell.d.ts +4 -0
- package/{dist/es/components → components}/Column.d.ts +4 -0
- package/{dist/npm/components → components}/Configurator.d.ts +4 -0
- package/{dist/npm/components → components}/ConfiguratorButton.d.ts +4 -0
- package/{dist/es/components → components}/ConfiguratorEditor.d.ts +4 -0
- package/{dist/es/components → components}/Container.d.ts +4 -0
- package/components/EditorContext.d.ts +11 -0
- package/{dist/npm/components → components}/FieldsEditor.d.ts +4 -0
- package/{dist/es/components → components}/HeaderCell.d.ts +4 -0
- package/{dist/es/components → components}/Row.d.ts +4 -0
- package/dist/cdn/js/kendo-react-pivotgrid.js +5 -2
- package/hooks/index.d.ts +6 -0
- package/{dist/es/hooks → hooks}/useExpansion.d.ts +5 -1
- package/{dist/es/hooks → hooks}/useHeaders.d.ts +5 -1
- package/hooks/useHorizontalScrollSync.d.ts +9 -0
- package/{dist/es/hooks → hooks}/usePivotConfiguratorEditor.d.ts +5 -1
- package/{dist/npm/hooks → hooks}/usePivotLocalDataService.d.ts +4 -0
- package/{dist/npm/hooks → hooks}/usePivotOLAPService.d.ts +4 -0
- package/hooks/useVerticalScrollSync.d.ts +9 -0
- package/index.d.ts +22 -0
- package/index.js +5 -0
- package/index.mjs +1585 -0
- package/{dist/es/messages → messages}/index.d.ts +4 -0
- package/{dist/es/models → models}/index.d.ts +4 -1
- package/package-metadata.d.ts +9 -0
- package/package.json +36 -54
- package/{dist/es/shared → shared}/PivotGridConfiguratorEditorEventsContext.d.ts +4 -0
- package/{dist/npm/shared → shared}/PivotGridConfiguratorEditorStateContext.d.ts +4 -0
- package/shared/index.d.ts +6 -0
- package/{dist/es/utils → utils}/index.d.ts +4 -0
- package/about.md +0 -3
- package/dist/cdn/js/kendo-react-pivotgrid.js.LICENSE.txt +0 -14
- package/dist/es/PivotGrid.d.ts +0 -177
- package/dist/es/PivotGrid.js +0 -245
- package/dist/es/components/AxesEditor.js +0 -43
- package/dist/es/components/AxisEditor.d.ts +0 -52
- package/dist/es/components/AxisEditor.js +0 -138
- package/dist/es/components/AxisFilterFieldsEditor.js +0 -150
- package/dist/es/components/Cell.d.ts +0 -65
- package/dist/es/components/Cell.js +0 -31
- package/dist/es/components/Column.js +0 -33
- package/dist/es/components/Configurator.d.ts +0 -125
- package/dist/es/components/Configurator.js +0 -118
- package/dist/es/components/ConfiguratorButton.d.ts +0 -40
- package/dist/es/components/ConfiguratorButton.js +0 -39
- package/dist/es/components/ConfiguratorEditor.js +0 -191
- package/dist/es/components/Container.js +0 -22
- package/dist/es/components/FieldsEditor.d.ts +0 -74
- package/dist/es/components/FieldsEditor.js +0 -90
- package/dist/es/components/HeaderCell.js +0 -50
- package/dist/es/components/Row.js +0 -28
- package/dist/es/hooks/index.d.ts +0 -2
- package/dist/es/hooks/index.js +0 -2
- package/dist/es/hooks/useExpansion.js +0 -89
- package/dist/es/hooks/useHeaders.js +0 -25
- package/dist/es/hooks/useHorizontalScrollSync.d.ts +0 -5
- package/dist/es/hooks/useHorizontalScrollSync.js +0 -27
- package/dist/es/hooks/usePivotConfiguratorEditor.js +0 -103
- package/dist/es/hooks/usePivotLocalDataService.d.ts +0 -79
- package/dist/es/hooks/usePivotLocalDataService.js +0 -105
- package/dist/es/hooks/usePivotOLAPService.d.ts +0 -41
- package/dist/es/hooks/usePivotOLAPService.js +0 -371
- package/dist/es/hooks/useVerticalScrollSync.d.ts +0 -5
- package/dist/es/hooks/useVerticalScrollSync.js +0 -27
- package/dist/es/main.d.ts +0 -18
- package/dist/es/main.js +0 -17
- package/dist/es/messages/index.js +0 -71
- package/dist/es/models/index.js +0 -1
- package/dist/es/package-metadata.d.ts +0 -5
- package/dist/es/package-metadata.js +0 -11
- package/dist/es/shared/PivotGridConfiguratorEditorEventsContext.js +0 -5
- package/dist/es/shared/PivotGridConfiguratorEditorStateContext.d.ts +0 -6
- package/dist/es/shared/PivotGridConfiguratorEditorStateContext.js +0 -18
- package/dist/es/shared/index.d.ts +0 -2
- package/dist/es/shared/index.js +0 -2
- package/dist/es/utils/index.js +0 -118
- package/dist/npm/PivotGrid.js +0 -248
- package/dist/npm/components/AxesEditor.d.ts +0 -46
- package/dist/npm/components/AxesEditor.js +0 -46
- package/dist/npm/components/AxisEditor.js +0 -141
- package/dist/npm/components/AxisFilterFieldsEditor.d.ts +0 -114
- package/dist/npm/components/AxisFilterFieldsEditor.js +0 -153
- package/dist/npm/components/Cell.js +0 -34
- package/dist/npm/components/Column.d.ts +0 -42
- package/dist/npm/components/Column.js +0 -36
- package/dist/npm/components/Configurator.js +0 -121
- package/dist/npm/components/ConfiguratorButton.js +0 -42
- package/dist/npm/components/ConfiguratorEditor.d.ts +0 -126
- package/dist/npm/components/ConfiguratorEditor.js +0 -194
- package/dist/npm/components/Container.d.ts +0 -46
- package/dist/npm/components/Container.js +0 -25
- package/dist/npm/components/FieldsEditor.js +0 -93
- package/dist/npm/components/HeaderCell.d.ts +0 -96
- package/dist/npm/components/HeaderCell.js +0 -53
- package/dist/npm/components/Row.d.ts +0 -50
- package/dist/npm/components/Row.js +0 -31
- package/dist/npm/hooks/index.d.ts +0 -2
- package/dist/npm/hooks/index.js +0 -18
- package/dist/npm/hooks/useExpansion.d.ts +0 -19
- package/dist/npm/hooks/useExpansion.js +0 -93
- package/dist/npm/hooks/useHeaders.d.ts +0 -12
- package/dist/npm/hooks/useHeaders.js +0 -30
- package/dist/npm/hooks/useHorizontalScrollSync.d.ts +0 -5
- package/dist/npm/hooks/useHorizontalScrollSync.js +0 -31
- package/dist/npm/hooks/usePivotConfiguratorEditor.d.ts +0 -83
- package/dist/npm/hooks/usePivotConfiguratorEditor.js +0 -107
- package/dist/npm/hooks/usePivotLocalDataService.js +0 -110
- package/dist/npm/hooks/usePivotOLAPService.js +0 -376
- package/dist/npm/hooks/useVerticalScrollSync.d.ts +0 -5
- package/dist/npm/hooks/useVerticalScrollSync.js +0 -31
- package/dist/npm/main.d.ts +0 -18
- package/dist/npm/main.js +0 -43
- package/dist/npm/messages/index.d.ts +0 -70
- package/dist/npm/messages/index.js +0 -74
- package/dist/npm/models/index.d.ts +0 -45
- package/dist/npm/models/index.js +0 -2
- package/dist/npm/package-metadata.d.ts +0 -5
- package/dist/npm/package-metadata.js +0 -14
- package/dist/npm/shared/PivotGridConfiguratorEditorEventsContext.d.ts +0 -13
- package/dist/npm/shared/PivotGridConfiguratorEditorEventsContext.js +0 -8
- package/dist/npm/shared/PivotGridConfiguratorEditorStateContext.js +0 -21
- package/dist/npm/shared/index.d.ts +0 -2
- package/dist/npm/shared/index.js +0 -18
- package/dist/npm/utils/index.d.ts +0 -47
- package/dist/npm/utils/index.js +0 -130
- package/dist/systemjs/kendo-react-pivotgrid.js +0 -1
- package/e2e-next/basic.tests.ts +0 -24
|
@@ -1,371 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (_) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
/* eslint-disable max-len */
|
|
38
|
-
import * as React from 'react';
|
|
39
|
-
import { fetchData, createDataState, fetchDiscover, addKPI, buildKPIMeasures } from '@progress/kendo-pivotgrid-common';
|
|
40
|
-
import { clone } from '@progress/kendo-react-common';
|
|
41
|
-
;
|
|
42
|
-
/**
|
|
43
|
-
* A [custom React hook](https://reactjs.org/docs/hooks-custom.html) which provides data-binding to an OLAP service.
|
|
44
|
-
*/
|
|
45
|
-
export var usePivotOLAPService = function (args) {
|
|
46
|
-
var _a = React.useState(true), loading = _a[0], setLoading = _a[1];
|
|
47
|
-
var _b = React.useState({ data: [], columns: [], rows: [] }), dataState = _b[0], setDataState = _b[1];
|
|
48
|
-
var _c = React.useState([]), fields = _c[0], setFields = _c[1];
|
|
49
|
-
var _d = React.useState(args.defaultColumnAxes || []), columnAxes = _d[0], setColumnAxes = _d[1];
|
|
50
|
-
var _e = React.useState(args.defaultRowAxes || []), rowAxes = _e[0], setRowAxes = _e[1];
|
|
51
|
-
var _f = React.useState(args.defaultMeasureAxes || []), measureAxes = _f[0], setMeasureAxes = _f[1];
|
|
52
|
-
var _g = React.useState(args.defaultSort || []), sort = _g[0], setSort = _g[1];
|
|
53
|
-
var _h = React.useState(args.defaultFilter || []), filter = _h[0], setFilter = _h[1];
|
|
54
|
-
var handleRowAxesChange = function (event) {
|
|
55
|
-
setRowAxes(event.value);
|
|
56
|
-
};
|
|
57
|
-
var handleColumnAxesChange = function (event) {
|
|
58
|
-
setColumnAxes(event.value);
|
|
59
|
-
};
|
|
60
|
-
var handleMeasureAxesChange = function (event) {
|
|
61
|
-
setMeasureAxes(event.value);
|
|
62
|
-
};
|
|
63
|
-
var handleSortChange = function (event) {
|
|
64
|
-
setSort(event.value);
|
|
65
|
-
};
|
|
66
|
-
var handleFilterChange = function (event) {
|
|
67
|
-
setFilter(event.value);
|
|
68
|
-
};
|
|
69
|
-
React.useEffect(function () {
|
|
70
|
-
setLoading(true);
|
|
71
|
-
var options = {
|
|
72
|
-
connection: {
|
|
73
|
-
catalog: args.catalog,
|
|
74
|
-
cube: args.cube
|
|
75
|
-
},
|
|
76
|
-
columnAxes: columnAxes.slice(),
|
|
77
|
-
rowAxes: rowAxes.slice(),
|
|
78
|
-
measureAxes: measureAxes,
|
|
79
|
-
sort: sort,
|
|
80
|
-
filter: filter
|
|
81
|
-
};
|
|
82
|
-
setTimeout(function () {
|
|
83
|
-
fetchData({ url: args.url }, clone(options))
|
|
84
|
-
.then(createDataState)
|
|
85
|
-
.then(function (newDataState) {
|
|
86
|
-
setDataState(newDataState);
|
|
87
|
-
setLoading(false);
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
}, [columnAxes, rowAxes, measureAxes, filter, sort, args.cube, args.catalog, args.url]);
|
|
91
|
-
React.useEffect(function () {
|
|
92
|
-
setLoading(true);
|
|
93
|
-
var options = {
|
|
94
|
-
connection: {
|
|
95
|
-
catalog: args.catalog,
|
|
96
|
-
cube: args.cube
|
|
97
|
-
},
|
|
98
|
-
restrictions: {
|
|
99
|
-
catalogName: args.catalog,
|
|
100
|
-
cubeName: args.cube
|
|
101
|
-
},
|
|
102
|
-
command: 'schemaDimensions'
|
|
103
|
-
};
|
|
104
|
-
fetchDiscover({ url: args.url }, options)
|
|
105
|
-
.then(function (newFields) {
|
|
106
|
-
addKPI(newFields);
|
|
107
|
-
setFields(newFields);
|
|
108
|
-
setLoading(false);
|
|
109
|
-
});
|
|
110
|
-
}, [args.catalog, args.cube, args.url]);
|
|
111
|
-
var getAxis = function (nodes, target) {
|
|
112
|
-
if (nodes === void 0) { nodes = []; }
|
|
113
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
114
|
-
var node = nodes[i];
|
|
115
|
-
if (String(node.name) === String(target.name)) {
|
|
116
|
-
return node;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
return null;
|
|
120
|
-
};
|
|
121
|
-
var getField = function (nodes, target) {
|
|
122
|
-
if (nodes === void 0) { nodes = []; }
|
|
123
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
124
|
-
var node = nodes[i];
|
|
125
|
-
if (node.uniqueName === target.uniqueName) {
|
|
126
|
-
return node;
|
|
127
|
-
}
|
|
128
|
-
var result = getField(node.children, target);
|
|
129
|
-
if (result !== null) {
|
|
130
|
-
return result;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
return null;
|
|
134
|
-
};
|
|
135
|
-
var loadAxisFields = function (axis) { return __awaiter(void 0, void 0, void 0, function () {
|
|
136
|
-
var command, dimensionUniqueName, hierarchyUniqueName, levelUniqueName, memberUniqueName, treeOp, options;
|
|
137
|
-
return __generator(this, function (_a) {
|
|
138
|
-
if (axis.name) {
|
|
139
|
-
command = 'schemaMembers';
|
|
140
|
-
levelUniqueName = "".concat(String(axis.name), ".[(ALL)]");
|
|
141
|
-
}
|
|
142
|
-
options = {
|
|
143
|
-
connection: {
|
|
144
|
-
catalog: args.catalog,
|
|
145
|
-
cube: args.cube
|
|
146
|
-
},
|
|
147
|
-
restrictions: {
|
|
148
|
-
catalogName: args.catalog,
|
|
149
|
-
cubeName: args.cube,
|
|
150
|
-
hierarchyUniqueName: hierarchyUniqueName,
|
|
151
|
-
dimensionUniqueName: dimensionUniqueName,
|
|
152
|
-
levelUniqueName: levelUniqueName,
|
|
153
|
-
memberUniqueName: memberUniqueName,
|
|
154
|
-
treeOp: treeOp
|
|
155
|
-
},
|
|
156
|
-
command: command
|
|
157
|
-
};
|
|
158
|
-
return [2 /*return*/, fetchDiscover({ url: args.url }, options)];
|
|
159
|
-
});
|
|
160
|
-
}); };
|
|
161
|
-
var loadSubFields = function (axis) { return __awaiter(void 0, void 0, void 0, function () {
|
|
162
|
-
var command, dimensionUniqueName, hierarchyUniqueName, levelUniqueName, memberUniqueName, treeOp, options;
|
|
163
|
-
return __generator(this, function (_a) {
|
|
164
|
-
if (axis.uniqueName) {
|
|
165
|
-
command = 'schemaMembers';
|
|
166
|
-
memberUniqueName = axis.uniqueName.replace(/\&/g, '&');
|
|
167
|
-
treeOp = 1;
|
|
168
|
-
}
|
|
169
|
-
options = {
|
|
170
|
-
connection: {
|
|
171
|
-
catalog: args.catalog,
|
|
172
|
-
cube: args.cube
|
|
173
|
-
},
|
|
174
|
-
restrictions: {
|
|
175
|
-
catalogName: args.catalog,
|
|
176
|
-
cubeName: args.cube,
|
|
177
|
-
hierarchyUniqueName: hierarchyUniqueName,
|
|
178
|
-
dimensionUniqueName: dimensionUniqueName,
|
|
179
|
-
levelUniqueName: levelUniqueName,
|
|
180
|
-
memberUniqueName: memberUniqueName,
|
|
181
|
-
treeOp: treeOp
|
|
182
|
-
},
|
|
183
|
-
command: command
|
|
184
|
-
};
|
|
185
|
-
return [2 /*return*/, fetchDiscover({ url: args.url }, options)];
|
|
186
|
-
});
|
|
187
|
-
}); };
|
|
188
|
-
var loadFields = function (field) { return __awaiter(void 0, void 0, void 0, function () {
|
|
189
|
-
var command, dimensionUniqueName, hierarchyUniqueName, levelUniqueName, memberUniqueName, treeOp, options;
|
|
190
|
-
return __generator(this, function (_a) {
|
|
191
|
-
if (field.type === 2) {
|
|
192
|
-
command = 'schemaMeasures';
|
|
193
|
-
}
|
|
194
|
-
else if (field.dimensionUniqueName) {
|
|
195
|
-
command = 'schemaLevels';
|
|
196
|
-
hierarchyUniqueName = field.uniqueName;
|
|
197
|
-
}
|
|
198
|
-
else {
|
|
199
|
-
command = 'schemaHierarchies';
|
|
200
|
-
dimensionUniqueName = field.uniqueName;
|
|
201
|
-
}
|
|
202
|
-
options = {
|
|
203
|
-
connection: {
|
|
204
|
-
catalog: args.catalog,
|
|
205
|
-
cube: args.cube
|
|
206
|
-
},
|
|
207
|
-
restrictions: {
|
|
208
|
-
catalogName: args.catalog,
|
|
209
|
-
cubeName: args.cube,
|
|
210
|
-
hierarchyUniqueName: hierarchyUniqueName,
|
|
211
|
-
dimensionUniqueName: dimensionUniqueName,
|
|
212
|
-
levelUniqueName: levelUniqueName,
|
|
213
|
-
memberUniqueName: memberUniqueName,
|
|
214
|
-
treeOp: treeOp
|
|
215
|
-
},
|
|
216
|
-
command: command
|
|
217
|
-
};
|
|
218
|
-
return [2 /*return*/, fetchDiscover({ url: args.url }, options)];
|
|
219
|
-
});
|
|
220
|
-
}); };
|
|
221
|
-
var loadKPIs = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
222
|
-
var options;
|
|
223
|
-
return __generator(this, function (_a) {
|
|
224
|
-
options = {
|
|
225
|
-
connection: {
|
|
226
|
-
catalog: args.catalog,
|
|
227
|
-
cube: args.cube
|
|
228
|
-
},
|
|
229
|
-
restrictions: {
|
|
230
|
-
catalogName: args.catalog,
|
|
231
|
-
cubeName: args.cube
|
|
232
|
-
},
|
|
233
|
-
command: 'schemaKPIs'
|
|
234
|
-
};
|
|
235
|
-
return [2 /*return*/, fetchDiscover({ url: args.url }, options)];
|
|
236
|
-
});
|
|
237
|
-
}); };
|
|
238
|
-
var handleFieldExpand = function (event) { return __awaiter(void 0, void 0, void 0, function () {
|
|
239
|
-
var newFields, field, KPIs, _a, additionalFields;
|
|
240
|
-
return __generator(this, function (_b) {
|
|
241
|
-
switch (_b.label) {
|
|
242
|
-
case 0:
|
|
243
|
-
newFields = fields.slice();
|
|
244
|
-
field = getField(newFields, event.value);
|
|
245
|
-
if (!(field && field.uniqueName === '[KPIs]')) return [3 /*break*/, 2];
|
|
246
|
-
_a = normalizeKPIs;
|
|
247
|
-
return [4 /*yield*/, loadKPIs()];
|
|
248
|
-
case 1:
|
|
249
|
-
KPIs = _a.apply(void 0, [_b.sent()]);
|
|
250
|
-
field.children = KPIs;
|
|
251
|
-
return [3 /*break*/, 5];
|
|
252
|
-
case 2:
|
|
253
|
-
if (!(field && field.type === 'kpi')) return [3 /*break*/, 3];
|
|
254
|
-
field.children = buildKPIMeasures(field);
|
|
255
|
-
return [3 /*break*/, 5];
|
|
256
|
-
case 3:
|
|
257
|
-
if (!(field && !field.children)) return [3 /*break*/, 5];
|
|
258
|
-
return [4 /*yield*/, loadFields(field)];
|
|
259
|
-
case 4:
|
|
260
|
-
additionalFields = _b.sent();
|
|
261
|
-
field.children = additionalFields;
|
|
262
|
-
_b.label = 5;
|
|
263
|
-
case 5:
|
|
264
|
-
setFields(newFields);
|
|
265
|
-
return [2 /*return*/];
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
}); };
|
|
269
|
-
var handleAxisFilterFieldsExpandChange = function (event) { return __awaiter(void 0, void 0, void 0, function () {
|
|
270
|
-
var map, _a, axes, setter, newAxes, axis, axisFields;
|
|
271
|
-
return __generator(this, function (_b) {
|
|
272
|
-
switch (_b.label) {
|
|
273
|
-
case 0:
|
|
274
|
-
if (!event) {
|
|
275
|
-
return [2 /*return*/];
|
|
276
|
-
}
|
|
277
|
-
map = {
|
|
278
|
-
rowAxes: [rowAxes, setRowAxes],
|
|
279
|
-
columnAxes: [columnAxes, setColumnAxes],
|
|
280
|
-
measureAxes: [measureAxes, setMeasureAxes]
|
|
281
|
-
};
|
|
282
|
-
_a = map[event.target.props.axes], axes = _a[0], setter = _a[1];
|
|
283
|
-
newAxes = axes.slice();
|
|
284
|
-
axis = getAxis(newAxes, event.target.props.dataItem);
|
|
285
|
-
if (!(axis && !axis.fields)) return [3 /*break*/, 2];
|
|
286
|
-
return [4 /*yield*/, loadAxisFields(axis)];
|
|
287
|
-
case 1:
|
|
288
|
-
axisFields = _b.sent();
|
|
289
|
-
axis.fields = axisFields;
|
|
290
|
-
setter(newAxes);
|
|
291
|
-
_b.label = 2;
|
|
292
|
-
case 2: return [2 /*return*/];
|
|
293
|
-
}
|
|
294
|
-
});
|
|
295
|
-
}); };
|
|
296
|
-
var handleAxisFilterFieldExpand = function (event) { return __awaiter(void 0, void 0, void 0, function () {
|
|
297
|
-
var map, _a, axes, setter, newAxes, axis, newFields, field, axisFilterFieldChildren;
|
|
298
|
-
return __generator(this, function (_b) {
|
|
299
|
-
switch (_b.label) {
|
|
300
|
-
case 0:
|
|
301
|
-
if (!event) {
|
|
302
|
-
return [2 /*return*/];
|
|
303
|
-
}
|
|
304
|
-
map = {
|
|
305
|
-
rowAxes: [rowAxes, setRowAxes],
|
|
306
|
-
columnAxes: [columnAxes, setColumnAxes],
|
|
307
|
-
measureAxes: [measureAxes, setMeasureAxes]
|
|
308
|
-
};
|
|
309
|
-
_a = map[event.target.props.axes], axes = _a[0], setter = _a[1];
|
|
310
|
-
newAxes = axes.slice();
|
|
311
|
-
axis = getAxis(newAxes, event.target.props.dataItem);
|
|
312
|
-
if (!axis) return [3 /*break*/, 2];
|
|
313
|
-
newFields = (axis.fields || []).slice();
|
|
314
|
-
field = getField(newFields, event.value);
|
|
315
|
-
if (!(field && (!field.children || !field.children.length))) return [3 /*break*/, 2];
|
|
316
|
-
return [4 /*yield*/, loadSubFields(field)];
|
|
317
|
-
case 1:
|
|
318
|
-
axisFilterFieldChildren = _b.sent();
|
|
319
|
-
field.children = axisFilterFieldChildren;
|
|
320
|
-
axis.fields = newFields;
|
|
321
|
-
setter(newAxes);
|
|
322
|
-
_b.label = 2;
|
|
323
|
-
case 2: return [2 /*return*/];
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
}); };
|
|
327
|
-
return {
|
|
328
|
-
pivotProps: {
|
|
329
|
-
rowAxes: rowAxes,
|
|
330
|
-
columnAxes: columnAxes,
|
|
331
|
-
data: dataState.data,
|
|
332
|
-
rows: dataState.rows,
|
|
333
|
-
columns: dataState.columns,
|
|
334
|
-
onRowAxesChange: handleRowAxesChange,
|
|
335
|
-
onColumnAxesChange: handleColumnAxesChange
|
|
336
|
-
},
|
|
337
|
-
configuratorProps: {
|
|
338
|
-
sort: sort,
|
|
339
|
-
onSortChange: handleSortChange,
|
|
340
|
-
filter: filter,
|
|
341
|
-
onFilterChange: handleFilterChange,
|
|
342
|
-
data: fields,
|
|
343
|
-
rowAxes: rowAxes,
|
|
344
|
-
columnAxes: columnAxes,
|
|
345
|
-
measureAxes: measureAxes,
|
|
346
|
-
onRowAxesChange: handleRowAxesChange,
|
|
347
|
-
onColumnAxesChange: handleColumnAxesChange,
|
|
348
|
-
onMeasureAxesChange: handleMeasureAxesChange,
|
|
349
|
-
onFieldsEditorFieldExpand: handleFieldExpand,
|
|
350
|
-
onAxisFilterFieldExpand: handleAxisFilterFieldExpand,
|
|
351
|
-
onAxisFilterFieldsExpandChange: handleAxisFilterFieldsExpandChange
|
|
352
|
-
},
|
|
353
|
-
state: {
|
|
354
|
-
loading: loading
|
|
355
|
-
}
|
|
356
|
-
};
|
|
357
|
-
};
|
|
358
|
-
/**
|
|
359
|
-
* A [React higher-order component](https://reactjs.org/docs/higher-order-components.html) which provides data-binding to an OLAP service.
|
|
360
|
-
*/
|
|
361
|
-
export var PivotOLAPService = function (props) {
|
|
362
|
-
var args = usePivotOLAPService(props);
|
|
363
|
-
return props.children(args);
|
|
364
|
-
};
|
|
365
|
-
var normalizeKPIs = function (data) {
|
|
366
|
-
for (var idx = 0, length_1 = data.length; idx < length_1; idx++) {
|
|
367
|
-
data[idx].uniqueName = data[idx].name;
|
|
368
|
-
data[idx].type = 'kpi';
|
|
369
|
-
}
|
|
370
|
-
return data;
|
|
371
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* @hidden
|
|
4
|
-
*/
|
|
5
|
-
export var useVerticalScrollSync = function () {
|
|
6
|
-
var elements = [];
|
|
7
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
8
|
-
elements[_i] = arguments[_i];
|
|
9
|
-
}
|
|
10
|
-
var AF = React.useRef();
|
|
11
|
-
var handleScroll = function (event) {
|
|
12
|
-
if (AF.current !== undefined) {
|
|
13
|
-
window.cancelAnimationFrame(AF.current);
|
|
14
|
-
}
|
|
15
|
-
var target = event.currentTarget;
|
|
16
|
-
var scroll = target.scrollTop;
|
|
17
|
-
elements.forEach(function (elementRef) {
|
|
18
|
-
var element = elementRef.current;
|
|
19
|
-
if (element && element !== target) {
|
|
20
|
-
AF.current = window.requestAnimationFrame(function () {
|
|
21
|
-
element.scrollTop = Math.round(scroll);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
return handleScroll;
|
|
27
|
-
};
|
package/dist/es/main.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export { PivotGrid, PivotGridProps, PivotGridHandle } from './PivotGrid';
|
|
2
|
-
export { PivotGridColumn, PivotGridColumnProps, PivotGridColumnHandle } from './components/Column';
|
|
3
|
-
export { PivotGridRow, PivotGridRowProps, PivotGridRowHandle } from './components/Row';
|
|
4
|
-
export { PivotGridCell, PivotGridCellProps, PivotGridCellHandle } from './components/Cell';
|
|
5
|
-
export { PivotGridHeaderCell, PivotGridHeaderCellProps, PivotGridHeaderCellHandle } from './components/HeaderCell';
|
|
6
|
-
export { PivotGridContainer, PivotGridContainerProps, PivotGridContainerHandle } from './components/Container';
|
|
7
|
-
export { PivotGridConfigurator, PivotGridConfiguratorProps, PivotGridConfiguratorHandle } from './components/Configurator';
|
|
8
|
-
export { PivotGridConfiguratorEditor, PivotGridConfiguratorEditorProps, PivotGridConfiguratorEditorHandle } from './components/ConfiguratorEditor';
|
|
9
|
-
export { PivotGridConfiguratorButton, PivotGridConfiguratorButtonProps, PivotGridConfiguratorButtonHandle } from './components/ConfiguratorButton';
|
|
10
|
-
export { PivotGridFieldsEditor, PivotGridFieldsEditorProps, PivotGridFieldsEditorHandle, PivotGridFieldsEditorFieldExpandEvent, PivotGridFieldsEditorFieldCheckEvent } from './components/FieldsEditor';
|
|
11
|
-
export { PivotGridAxesEditor, PivotGridAxesEditorProps, PivotGridAxesEditorHandle, PivotGridConfiguratorEditorAxesContext } from './components/AxesEditor';
|
|
12
|
-
export { PivotGridAxisEditor, PivotGridAxisEditorProps, PivotGridAxisEditorHandle } from './components/AxisEditor';
|
|
13
|
-
export { PivotGridAxisFilterFieldsEditor, PivotGridAxisFilterFieldsEditorProps, PivotGridAxisFilterFieldsEditorHandle, PivotGridAxisFilterFieldExpandEvent, PivotGridAxisFilterFieldsExpandChangeEvent } from './components/AxisFilterFieldsEditor';
|
|
14
|
-
export { PivotOLAPService, usePivotOLAPService, PivotOLAPServiceArgs, PivotOLAPServiceProps, PivotOLAPServiceState } from './hooks/usePivotOLAPService';
|
|
15
|
-
export { usePivotLocalDataService, PivotLocalDataService, PivotLocalDataServiceArgs, PivotLocalDataServiceProps, PivotLocalDataServiceState } from './hooks/usePivotLocalDataService';
|
|
16
|
-
export { PivotGridTreeViewData, PivotGridAxesChangeEvent, PivotGridConfiguratorAxesChangeEvent, PivotGridConfiguratorSortChangeEvent, PivotGridConfiguratorFilterChangeEvent } from './models';
|
|
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/es/main.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export { PivotGrid } from './PivotGrid';
|
|
2
|
-
export { PivotGridColumn } from './components/Column';
|
|
3
|
-
export { PivotGridRow } from './components/Row';
|
|
4
|
-
export { PivotGridCell } from './components/Cell';
|
|
5
|
-
export { PivotGridHeaderCell } from './components/HeaderCell';
|
|
6
|
-
export { PivotGridContainer } from './components/Container';
|
|
7
|
-
export { PivotGridConfigurator } from './components/Configurator';
|
|
8
|
-
export { PivotGridConfiguratorEditor } from './components/ConfiguratorEditor';
|
|
9
|
-
export { PivotGridConfiguratorButton } from './components/ConfiguratorButton';
|
|
10
|
-
export { PivotGridFieldsEditor } from './components/FieldsEditor';
|
|
11
|
-
export { PivotGridAxesEditor, PivotGridConfiguratorEditorAxesContext } from './components/AxesEditor';
|
|
12
|
-
export { PivotGridAxisEditor } from './components/AxisEditor';
|
|
13
|
-
export { PivotGridAxisFilterFieldsEditor } from './components/AxisFilterFieldsEditor';
|
|
14
|
-
export { PivotOLAPService, usePivotOLAPService } from './hooks/usePivotOLAPService';
|
|
15
|
-
export { usePivotLocalDataService, PivotLocalDataService } from './hooks/usePivotLocalDataService';
|
|
16
|
-
export { dataCells } from './utils';
|
|
17
|
-
export { sumAggregate, averageAggregate, minAggregate, maxAggregate } from '@progress/kendo-pivotgrid-common';
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
var _a;
|
|
2
|
-
/**
|
|
3
|
-
* @hidden
|
|
4
|
-
*/
|
|
5
|
-
export var emptyCellAriaLabel = 'pivotgrid.emptyCellAriaLabel';
|
|
6
|
-
/**
|
|
7
|
-
* @hidden
|
|
8
|
-
*/
|
|
9
|
-
export var fieldMenuReset = 'pivotgrid.fieldMenuReset';
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
export var fieldMenuApply = 'pivotgrid.fieldMenuApply';
|
|
14
|
-
/**
|
|
15
|
-
* @hidden
|
|
16
|
-
*/
|
|
17
|
-
export var configuratorTitle = 'pivotgrid.configuratorTitle';
|
|
18
|
-
/**
|
|
19
|
-
* @hidden
|
|
20
|
-
*/
|
|
21
|
-
export var configuratorCancel = 'pivotgrid.configuratorCancel';
|
|
22
|
-
/**
|
|
23
|
-
* @hidden
|
|
24
|
-
*/
|
|
25
|
-
export var configuratorApply = 'pivotgrid.configuratorApply';
|
|
26
|
-
/**
|
|
27
|
-
* @hidden
|
|
28
|
-
*/
|
|
29
|
-
export var configuratorColumnsTitle = 'pivotgrid.configuratorColumnsTitle';
|
|
30
|
-
/**
|
|
31
|
-
* @hidden
|
|
32
|
-
*/
|
|
33
|
-
export var configuratorRowsTitle = 'pivotgrid.configuratorRowsTitle';
|
|
34
|
-
/**
|
|
35
|
-
* @hidden
|
|
36
|
-
*/
|
|
37
|
-
export var configuratorMeasuresTitle = 'pivotgrid.configuratorMeasuresTitle';
|
|
38
|
-
/**
|
|
39
|
-
* @hidden
|
|
40
|
-
*/
|
|
41
|
-
export var configuratorEditorSearchTitle = 'pivotgrid.configuratorEditorSearchTitle';
|
|
42
|
-
/**
|
|
43
|
-
* @hidden
|
|
44
|
-
*/
|
|
45
|
-
export var configuratorEditorSearchPlaceholder = 'pivotgrid.configuratorEditorSearchPlaceholder';
|
|
46
|
-
/**
|
|
47
|
-
* @hidden
|
|
48
|
-
*/
|
|
49
|
-
export var configuratorMissingFields = 'pivotgrid.configuratorMissingFields';
|
|
50
|
-
/**
|
|
51
|
-
* @hidden
|
|
52
|
-
*/
|
|
53
|
-
export var configuratorButtonLabel = 'pivotgrid.configuratorButtonLabel';
|
|
54
|
-
/**
|
|
55
|
-
* @hidden
|
|
56
|
-
*/
|
|
57
|
-
export var messages = (_a = {},
|
|
58
|
-
_a[emptyCellAriaLabel] = 'PivotGrid component. Use the arrow keys to navigate.',
|
|
59
|
-
_a[fieldMenuReset] = 'Reset',
|
|
60
|
-
_a[fieldMenuApply] = 'Apply',
|
|
61
|
-
_a[configuratorCancel] = 'Cancel',
|
|
62
|
-
_a[configuratorApply] = 'Apply',
|
|
63
|
-
_a[configuratorTitle] = 'Settings',
|
|
64
|
-
_a[configuratorEditorSearchTitle] = 'Fields',
|
|
65
|
-
_a[configuratorEditorSearchPlaceholder] = 'Search...',
|
|
66
|
-
_a[configuratorColumnsTitle] = 'Columns',
|
|
67
|
-
_a[configuratorRowsTitle] = 'Rows',
|
|
68
|
-
_a[configuratorMeasuresTitle] = 'Values',
|
|
69
|
-
_a[configuratorButtonLabel] = 'Change settings',
|
|
70
|
-
_a[configuratorMissingFields] = 'Select some fields to begin setup',
|
|
71
|
-
_a);
|
package/dist/es/models/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @hidden
|
|
3
|
-
*/
|
|
4
|
-
export var packageMetadata = {
|
|
5
|
-
name: '@progress/kendo-react-pivotgrid',
|
|
6
|
-
productName: 'KendoReact',
|
|
7
|
-
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate: 1700064952,
|
|
9
|
-
version: '',
|
|
10
|
-
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
11
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { PivotGridConfiguratorAction, PivotGridConfiguratorEditorState } from '../hooks/usePivotConfiguratorEditor';
|
|
3
|
-
/**
|
|
4
|
-
* @hidden
|
|
5
|
-
*/
|
|
6
|
-
export declare const PivotGridConfiguratorEditorStateContext: React.Context<[PivotGridConfiguratorEditorState, (action: PivotGridConfiguratorAction, event?: React.SyntheticEvent) => void]>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { noop } from '@progress/kendo-react-common';
|
|
3
|
-
/**
|
|
4
|
-
* @hidden
|
|
5
|
-
*/
|
|
6
|
-
export var PivotGridConfiguratorEditorStateContext = React.createContext([
|
|
7
|
-
{
|
|
8
|
-
expanded: [],
|
|
9
|
-
rowAxes: [],
|
|
10
|
-
columnAxes: [],
|
|
11
|
-
measureAxes: [],
|
|
12
|
-
dragItem: null,
|
|
13
|
-
dropZone: null,
|
|
14
|
-
dropDirection: null,
|
|
15
|
-
dropTarget: null
|
|
16
|
-
},
|
|
17
|
-
noop
|
|
18
|
-
]);
|
package/dist/es/shared/index.js
DELETED