@progress/kendo-react-chart-wizard 8.2.0-develop.38
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/ChartWizard.js +8 -0
- package/ChartWizard.mjs +946 -0
- package/DeleteCell.js +8 -0
- package/DeleteCell.mjs +47 -0
- package/LICENSE.md +11 -0
- package/NOTICE.txt +110 -0
- package/README.md +62 -0
- package/SeriesGrid.js +8 -0
- package/SeriesGrid.mjs +140 -0
- package/chart-wizard-state.js +8 -0
- package/chart-wizard-state.mjs +344 -0
- package/common/get-wizard-data-from-data-rows.js +8 -0
- package/common/get-wizard-data-from-data-rows.mjs +24 -0
- package/dist/cdn/js/kendo-react-chart-wizard.js +8 -0
- package/export.js +8 -0
- package/export.mjs +70 -0
- package/grid-integration/get-grid-selected-rows.js +8 -0
- package/grid-integration/get-grid-selected-rows.mjs +33 -0
- package/grid-integration/get-wizard-data-from-grid-selection.js +8 -0
- package/grid-integration/get-wizard-data-from-grid-selection.mjs +14 -0
- package/index.d.mts +322 -0
- package/index.d.ts +322 -0
- package/index.js +8 -0
- package/index.mjs +28 -0
- package/messages.js +8 -0
- package/messages.mjs +225 -0
- package/package.json +63 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./get-grid-selected-rows.js"),r=require("../common/get-wizard-data-from-data-rows.js"),a=e=>r.getWizardDataFromDataRows(t.getGridSelectedRows(e));exports.getWizardDataFromGridSelection=a;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import { getGridSelectedRows as e } from "./get-grid-selected-rows.mjs";
|
|
10
|
+
import { getWizardDataFromDataRows as o } from "../common/get-wizard-data-from-data-rows.mjs";
|
|
11
|
+
const i = (t) => o(e(t));
|
|
12
|
+
export {
|
|
13
|
+
i as getWizardDataFromGridSelection
|
|
14
|
+
};
|
package/index.d.mts
ADDED
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { Chart } from '@progress/kendo-react-charts';
|
|
9
|
+
import { ChartAreaProps } from '@progress/kendo-react-charts';
|
|
10
|
+
import { ChartCategoryAxisItemProps } from '@progress/kendo-react-charts';
|
|
11
|
+
import { ChartLegendProps } from '@progress/kendo-react-charts';
|
|
12
|
+
import { ChartSeriesItemProps } from '@progress/kendo-react-charts';
|
|
13
|
+
import { ChartSubtitleProps } from '@progress/kendo-react-charts';
|
|
14
|
+
import { ChartTitleProps } from '@progress/kendo-react-charts';
|
|
15
|
+
import { ChartValueAxisItemProps } from '@progress/kendo-react-charts';
|
|
16
|
+
import { ChartXAxisItemProps } from '@progress/kendo-react-charts';
|
|
17
|
+
import { ChartYAxisItemProps } from '@progress/kendo-react-charts';
|
|
18
|
+
import { GridHandle } from '@progress/kendo-react-grid';
|
|
19
|
+
import { ImageExportOptions } from '@progress/kendo-drawing';
|
|
20
|
+
import { PDFOptions } from '@progress/kendo-drawing/pdf';
|
|
21
|
+
import * as React_2 from 'react';
|
|
22
|
+
import { SeriesStack } from '@progress/kendo-react-charts';
|
|
23
|
+
import { SeriesType } from '@progress/kendo-react-charts';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
export declare enum ActionTypes {
|
|
29
|
+
seriesType = 0,
|
|
30
|
+
stacked = 1,
|
|
31
|
+
categoryAxisX = 2,
|
|
32
|
+
valueAxisY = 3,
|
|
33
|
+
seriesChange = 4,
|
|
34
|
+
areaMarginLeft = 5,
|
|
35
|
+
areaMarginRight = 6,
|
|
36
|
+
areaMarginTop = 7,
|
|
37
|
+
areaMarginBottom = 8,
|
|
38
|
+
areaBackground = 9,
|
|
39
|
+
titleText = 10,
|
|
40
|
+
titleFontName = 11,
|
|
41
|
+
titleFontSize = 12,
|
|
42
|
+
titleColor = 13,
|
|
43
|
+
subtitleText = 14,
|
|
44
|
+
subtitleFontName = 15,
|
|
45
|
+
subtitleFontSize = 16,
|
|
46
|
+
subtitleColor = 17,
|
|
47
|
+
seriesColor = 18,
|
|
48
|
+
seriesLabel = 19,
|
|
49
|
+
legendVisible = 20,
|
|
50
|
+
legendFontName = 21,
|
|
51
|
+
legendFontSize = 22,
|
|
52
|
+
legendColor = 23,
|
|
53
|
+
legendPosition = 24,
|
|
54
|
+
categoryAxisTitleText = 25,
|
|
55
|
+
categoryAxisTitleFontName = 26,
|
|
56
|
+
categoryAxisTitleFontSize = 27,
|
|
57
|
+
categoryAxisTitleColor = 28,
|
|
58
|
+
categoryAxisLabelsFontName = 29,
|
|
59
|
+
categoryAxisLabelsFontSize = 30,
|
|
60
|
+
categoryAxisLabelsColor = 31,
|
|
61
|
+
categoryAxisLabelsRotation = 32,
|
|
62
|
+
categoryAxisReverseOrder = 33,
|
|
63
|
+
valueAxisTitleText = 34,
|
|
64
|
+
valueAxisTitleFontName = 35,
|
|
65
|
+
valueAxisTitleFontSize = 36,
|
|
66
|
+
valueAxisTitleColor = 37,
|
|
67
|
+
valueAxisLabelsFormat = 38,
|
|
68
|
+
valueAxisLabelsFontName = 39,
|
|
69
|
+
valueAxisLabelsFontSize = 40,
|
|
70
|
+
valueAxisLabelsColor = 41,
|
|
71
|
+
valueAxisLabelsRotation = 42
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The KendoReact ChartWizard component.
|
|
76
|
+
*/
|
|
77
|
+
export declare const ChartWizard: React_2.FC<ChartWizardProps>;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Describes a single data cell for the Chart Wizard.
|
|
81
|
+
*/
|
|
82
|
+
export declare interface ChartWizardDataCell {
|
|
83
|
+
/**
|
|
84
|
+
* The field name of the data cell.
|
|
85
|
+
*/
|
|
86
|
+
field: string;
|
|
87
|
+
/**
|
|
88
|
+
* The value of the data cell.
|
|
89
|
+
*/
|
|
90
|
+
value: any;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Describes a data row for the Chart Wizard.
|
|
95
|
+
*/
|
|
96
|
+
export declare type ChartWizardDataRow = ChartWizardDataCell[];
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The default state of the ChartWizard component.
|
|
100
|
+
*/
|
|
101
|
+
export declare interface ChartWizardDefaultState extends Pick<ChartWizardState, 'stack' | 'seriesType'> {
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The props of the KendoReact ChartWizard component.
|
|
106
|
+
*/
|
|
107
|
+
export declare interface ChartWizardProps {
|
|
108
|
+
/**
|
|
109
|
+
* The data to be visualized in the ChartWizard component.
|
|
110
|
+
*/
|
|
111
|
+
data: ChartWizardDataRow[];
|
|
112
|
+
/**
|
|
113
|
+
* The event that will be fired when the ChartWizard component is closed.
|
|
114
|
+
*/
|
|
115
|
+
onClose?: () => void;
|
|
116
|
+
/**
|
|
117
|
+
* Fires when the Chart is about to be exported. Can be prevented.
|
|
118
|
+
*/
|
|
119
|
+
onExport?: (event: ExportEvent) => void;
|
|
120
|
+
/**
|
|
121
|
+
* The export options for the ChartWizard component.
|
|
122
|
+
*/
|
|
123
|
+
exportOptions?: ExportOptions;
|
|
124
|
+
/**
|
|
125
|
+
* The default state of the ChartWizard component.
|
|
126
|
+
*/
|
|
127
|
+
defaultState?: ChartWizardDefaultState;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @hidden
|
|
132
|
+
*/
|
|
133
|
+
export declare interface ChartWizardState {
|
|
134
|
+
title?: ChartTitleProps;
|
|
135
|
+
subtitle?: ChartSubtitleProps;
|
|
136
|
+
area: ChartAreaProps;
|
|
137
|
+
categoryAxis: ChartCategoryAxisItemProps[];
|
|
138
|
+
valueAxis: ChartValueAxisItemProps[];
|
|
139
|
+
series: SeriesItem[];
|
|
140
|
+
initialSeries: SeriesItem[];
|
|
141
|
+
xAxis?: ChartXAxisItemProps[];
|
|
142
|
+
yAxis?: ChartYAxisItemProps[];
|
|
143
|
+
legend?: ChartLegendProps;
|
|
144
|
+
columns: string[];
|
|
145
|
+
data: ChartWizardDataRow[];
|
|
146
|
+
/**
|
|
147
|
+
* The series type of the chart.
|
|
148
|
+
*
|
|
149
|
+
* The supported series types are:
|
|
150
|
+
* - `'column'`
|
|
151
|
+
* - `'bar'`
|
|
152
|
+
* - `'line'`
|
|
153
|
+
* - `'pie'`
|
|
154
|
+
* - `'scatter'`
|
|
155
|
+
*/
|
|
156
|
+
seriesType?: SeriesType;
|
|
157
|
+
categoryField?: string;
|
|
158
|
+
valueField?: string;
|
|
159
|
+
/**
|
|
160
|
+
* The stack configuration of the series.
|
|
161
|
+
*/
|
|
162
|
+
stack?: SeriesStack | false;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @hidden
|
|
167
|
+
*/
|
|
168
|
+
export declare const createInitialState: (data: ChartWizardDataRow[], seriesType: SeriesType, defaultState?: ChartWizardDefaultState) => ChartWizardState;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @hidden
|
|
172
|
+
*/
|
|
173
|
+
export declare const createState: (data: any[], seriesType: SeriesType) => ChartWizardState;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Represents a data column from a grid component or similar.
|
|
177
|
+
*/
|
|
178
|
+
export declare interface DataColumn {
|
|
179
|
+
field: string;
|
|
180
|
+
title: string;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Represents a data row from a grid component or similar.
|
|
185
|
+
*/
|
|
186
|
+
export declare interface DataRow {
|
|
187
|
+
dataItem: any;
|
|
188
|
+
dataColumns: DataColumn[];
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Arguments for the `export` event on the Chart Wizard.
|
|
193
|
+
*/
|
|
194
|
+
export declare class ExportEvent extends PreventableEvent {
|
|
195
|
+
/**
|
|
196
|
+
* The export options on the Chart Wizard.
|
|
197
|
+
*/
|
|
198
|
+
exportOptions: ExportOptions;
|
|
199
|
+
/**
|
|
200
|
+
* The current Chart chart instance to be exported.
|
|
201
|
+
*/
|
|
202
|
+
chart: Chart;
|
|
203
|
+
constructor(chart: Chart, exportOptions: ExportOptions);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* The export options for the Chart Wizard.
|
|
208
|
+
*/
|
|
209
|
+
export declare interface ExportOptions {
|
|
210
|
+
fileName?: string;
|
|
211
|
+
pdf?: PDFOptions;
|
|
212
|
+
image?: ImageExportOptions;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* @hidden
|
|
217
|
+
*/
|
|
218
|
+
export declare const fontNames: {
|
|
219
|
+
text: string;
|
|
220
|
+
value: string;
|
|
221
|
+
style: {
|
|
222
|
+
fontFamily: string;
|
|
223
|
+
};
|
|
224
|
+
}[];
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @hidden
|
|
228
|
+
*/
|
|
229
|
+
export declare const fontSizes: {
|
|
230
|
+
text: string;
|
|
231
|
+
value: string;
|
|
232
|
+
}[];
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Maps the Grid selectedState to a more general DataRows type to be displayed in the Chart Wizard.
|
|
236
|
+
*
|
|
237
|
+
* The selectedKeys can be either row keys or cell keys.
|
|
238
|
+
*
|
|
239
|
+
* @returns DataRow array that can be passed to getWizardDataFromDataRows in order to bind the Chart Wizard.
|
|
240
|
+
*/
|
|
241
|
+
export declare function getGridSelectedRows(args: {
|
|
242
|
+
grid: GridHandle | null;
|
|
243
|
+
data: any[];
|
|
244
|
+
selectedState: {
|
|
245
|
+
[id: string]: boolean | number[];
|
|
246
|
+
};
|
|
247
|
+
dataItemKey: string;
|
|
248
|
+
}): DataRow[];
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Maps data rows to the Chart Wizard data format.
|
|
252
|
+
*
|
|
253
|
+
* @returns collection that can be used as Chart Wizard.
|
|
254
|
+
*/
|
|
255
|
+
export declare function getWizardDataFromDataRows(dataRows: DataRow[]): ChartWizardDataRow[];
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Maps the Grid selectedState to data to be displayed in the Chart Wizard.
|
|
259
|
+
*
|
|
260
|
+
* Supports both row and cell selection.
|
|
261
|
+
*
|
|
262
|
+
* @returns collection that can be used as Chart Wizard.
|
|
263
|
+
*/
|
|
264
|
+
export declare const getWizardDataFromGridSelection: (args: {
|
|
265
|
+
grid: GridHandle | null;
|
|
266
|
+
data: any[];
|
|
267
|
+
selectedState: {
|
|
268
|
+
[id: string]: boolean | number[];
|
|
269
|
+
};
|
|
270
|
+
dataItemKey: string;
|
|
271
|
+
}) => ChartWizardDataRow[];
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* @hidden
|
|
275
|
+
*/
|
|
276
|
+
export declare const isCategorical: (type?: SeriesType) => boolean | undefined;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* @hidden
|
|
280
|
+
*/
|
|
281
|
+
export declare const mergeStates: (state: ChartWizardState, newState: ChartWizardState) => ChartWizardState;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* @hidden
|
|
285
|
+
*/
|
|
286
|
+
export declare const parseFont: (font?: string) => {
|
|
287
|
+
size: string | undefined;
|
|
288
|
+
name: string | undefined;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* @hidden
|
|
293
|
+
*/
|
|
294
|
+
declare abstract class PreventableEvent {
|
|
295
|
+
private prevented;
|
|
296
|
+
/**
|
|
297
|
+
* Prevents the default action for a specified event.
|
|
298
|
+
* In this way, the source component suppresses the built-in behavior that follows the event.
|
|
299
|
+
*/
|
|
300
|
+
preventDefault(): void;
|
|
301
|
+
/**
|
|
302
|
+
* Returns `true` if the event was prevented by any of its subscribers.
|
|
303
|
+
*
|
|
304
|
+
* @returns - Returns `true` if the default action was prevented.
|
|
305
|
+
* Otherwise, returns `false`.
|
|
306
|
+
*/
|
|
307
|
+
isDefaultPrevented(): boolean;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* @hidden
|
|
312
|
+
*/
|
|
313
|
+
export declare interface SeriesItem extends ChartSeriesItemProps {
|
|
314
|
+
id: number;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* @hidden
|
|
319
|
+
*/
|
|
320
|
+
export declare const updateState: (currentState: ChartWizardState, action: ActionTypes, value: any) => ChartWizardState;
|
|
321
|
+
|
|
322
|
+
export { }
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { Chart } from '@progress/kendo-react-charts';
|
|
9
|
+
import { ChartAreaProps } from '@progress/kendo-react-charts';
|
|
10
|
+
import { ChartCategoryAxisItemProps } from '@progress/kendo-react-charts';
|
|
11
|
+
import { ChartLegendProps } from '@progress/kendo-react-charts';
|
|
12
|
+
import { ChartSeriesItemProps } from '@progress/kendo-react-charts';
|
|
13
|
+
import { ChartSubtitleProps } from '@progress/kendo-react-charts';
|
|
14
|
+
import { ChartTitleProps } from '@progress/kendo-react-charts';
|
|
15
|
+
import { ChartValueAxisItemProps } from '@progress/kendo-react-charts';
|
|
16
|
+
import { ChartXAxisItemProps } from '@progress/kendo-react-charts';
|
|
17
|
+
import { ChartYAxisItemProps } from '@progress/kendo-react-charts';
|
|
18
|
+
import { GridHandle } from '@progress/kendo-react-grid';
|
|
19
|
+
import { ImageExportOptions } from '@progress/kendo-drawing';
|
|
20
|
+
import { PDFOptions } from '@progress/kendo-drawing/pdf';
|
|
21
|
+
import * as React_2 from 'react';
|
|
22
|
+
import { SeriesStack } from '@progress/kendo-react-charts';
|
|
23
|
+
import { SeriesType } from '@progress/kendo-react-charts';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
export declare enum ActionTypes {
|
|
29
|
+
seriesType = 0,
|
|
30
|
+
stacked = 1,
|
|
31
|
+
categoryAxisX = 2,
|
|
32
|
+
valueAxisY = 3,
|
|
33
|
+
seriesChange = 4,
|
|
34
|
+
areaMarginLeft = 5,
|
|
35
|
+
areaMarginRight = 6,
|
|
36
|
+
areaMarginTop = 7,
|
|
37
|
+
areaMarginBottom = 8,
|
|
38
|
+
areaBackground = 9,
|
|
39
|
+
titleText = 10,
|
|
40
|
+
titleFontName = 11,
|
|
41
|
+
titleFontSize = 12,
|
|
42
|
+
titleColor = 13,
|
|
43
|
+
subtitleText = 14,
|
|
44
|
+
subtitleFontName = 15,
|
|
45
|
+
subtitleFontSize = 16,
|
|
46
|
+
subtitleColor = 17,
|
|
47
|
+
seriesColor = 18,
|
|
48
|
+
seriesLabel = 19,
|
|
49
|
+
legendVisible = 20,
|
|
50
|
+
legendFontName = 21,
|
|
51
|
+
legendFontSize = 22,
|
|
52
|
+
legendColor = 23,
|
|
53
|
+
legendPosition = 24,
|
|
54
|
+
categoryAxisTitleText = 25,
|
|
55
|
+
categoryAxisTitleFontName = 26,
|
|
56
|
+
categoryAxisTitleFontSize = 27,
|
|
57
|
+
categoryAxisTitleColor = 28,
|
|
58
|
+
categoryAxisLabelsFontName = 29,
|
|
59
|
+
categoryAxisLabelsFontSize = 30,
|
|
60
|
+
categoryAxisLabelsColor = 31,
|
|
61
|
+
categoryAxisLabelsRotation = 32,
|
|
62
|
+
categoryAxisReverseOrder = 33,
|
|
63
|
+
valueAxisTitleText = 34,
|
|
64
|
+
valueAxisTitleFontName = 35,
|
|
65
|
+
valueAxisTitleFontSize = 36,
|
|
66
|
+
valueAxisTitleColor = 37,
|
|
67
|
+
valueAxisLabelsFormat = 38,
|
|
68
|
+
valueAxisLabelsFontName = 39,
|
|
69
|
+
valueAxisLabelsFontSize = 40,
|
|
70
|
+
valueAxisLabelsColor = 41,
|
|
71
|
+
valueAxisLabelsRotation = 42
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The KendoReact ChartWizard component.
|
|
76
|
+
*/
|
|
77
|
+
export declare const ChartWizard: React_2.FC<ChartWizardProps>;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Describes a single data cell for the Chart Wizard.
|
|
81
|
+
*/
|
|
82
|
+
export declare interface ChartWizardDataCell {
|
|
83
|
+
/**
|
|
84
|
+
* The field name of the data cell.
|
|
85
|
+
*/
|
|
86
|
+
field: string;
|
|
87
|
+
/**
|
|
88
|
+
* The value of the data cell.
|
|
89
|
+
*/
|
|
90
|
+
value: any;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Describes a data row for the Chart Wizard.
|
|
95
|
+
*/
|
|
96
|
+
export declare type ChartWizardDataRow = ChartWizardDataCell[];
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The default state of the ChartWizard component.
|
|
100
|
+
*/
|
|
101
|
+
export declare interface ChartWizardDefaultState extends Pick<ChartWizardState, 'stack' | 'seriesType'> {
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The props of the KendoReact ChartWizard component.
|
|
106
|
+
*/
|
|
107
|
+
export declare interface ChartWizardProps {
|
|
108
|
+
/**
|
|
109
|
+
* The data to be visualized in the ChartWizard component.
|
|
110
|
+
*/
|
|
111
|
+
data: ChartWizardDataRow[];
|
|
112
|
+
/**
|
|
113
|
+
* The event that will be fired when the ChartWizard component is closed.
|
|
114
|
+
*/
|
|
115
|
+
onClose?: () => void;
|
|
116
|
+
/**
|
|
117
|
+
* Fires when the Chart is about to be exported. Can be prevented.
|
|
118
|
+
*/
|
|
119
|
+
onExport?: (event: ExportEvent) => void;
|
|
120
|
+
/**
|
|
121
|
+
* The export options for the ChartWizard component.
|
|
122
|
+
*/
|
|
123
|
+
exportOptions?: ExportOptions;
|
|
124
|
+
/**
|
|
125
|
+
* The default state of the ChartWizard component.
|
|
126
|
+
*/
|
|
127
|
+
defaultState?: ChartWizardDefaultState;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @hidden
|
|
132
|
+
*/
|
|
133
|
+
export declare interface ChartWizardState {
|
|
134
|
+
title?: ChartTitleProps;
|
|
135
|
+
subtitle?: ChartSubtitleProps;
|
|
136
|
+
area: ChartAreaProps;
|
|
137
|
+
categoryAxis: ChartCategoryAxisItemProps[];
|
|
138
|
+
valueAxis: ChartValueAxisItemProps[];
|
|
139
|
+
series: SeriesItem[];
|
|
140
|
+
initialSeries: SeriesItem[];
|
|
141
|
+
xAxis?: ChartXAxisItemProps[];
|
|
142
|
+
yAxis?: ChartYAxisItemProps[];
|
|
143
|
+
legend?: ChartLegendProps;
|
|
144
|
+
columns: string[];
|
|
145
|
+
data: ChartWizardDataRow[];
|
|
146
|
+
/**
|
|
147
|
+
* The series type of the chart.
|
|
148
|
+
*
|
|
149
|
+
* The supported series types are:
|
|
150
|
+
* - `'column'`
|
|
151
|
+
* - `'bar'`
|
|
152
|
+
* - `'line'`
|
|
153
|
+
* - `'pie'`
|
|
154
|
+
* - `'scatter'`
|
|
155
|
+
*/
|
|
156
|
+
seriesType?: SeriesType;
|
|
157
|
+
categoryField?: string;
|
|
158
|
+
valueField?: string;
|
|
159
|
+
/**
|
|
160
|
+
* The stack configuration of the series.
|
|
161
|
+
*/
|
|
162
|
+
stack?: SeriesStack | false;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @hidden
|
|
167
|
+
*/
|
|
168
|
+
export declare const createInitialState: (data: ChartWizardDataRow[], seriesType: SeriesType, defaultState?: ChartWizardDefaultState) => ChartWizardState;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @hidden
|
|
172
|
+
*/
|
|
173
|
+
export declare const createState: (data: any[], seriesType: SeriesType) => ChartWizardState;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Represents a data column from a grid component or similar.
|
|
177
|
+
*/
|
|
178
|
+
export declare interface DataColumn {
|
|
179
|
+
field: string;
|
|
180
|
+
title: string;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Represents a data row from a grid component or similar.
|
|
185
|
+
*/
|
|
186
|
+
export declare interface DataRow {
|
|
187
|
+
dataItem: any;
|
|
188
|
+
dataColumns: DataColumn[];
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Arguments for the `export` event on the Chart Wizard.
|
|
193
|
+
*/
|
|
194
|
+
export declare class ExportEvent extends PreventableEvent {
|
|
195
|
+
/**
|
|
196
|
+
* The export options on the Chart Wizard.
|
|
197
|
+
*/
|
|
198
|
+
exportOptions: ExportOptions;
|
|
199
|
+
/**
|
|
200
|
+
* The current Chart chart instance to be exported.
|
|
201
|
+
*/
|
|
202
|
+
chart: Chart;
|
|
203
|
+
constructor(chart: Chart, exportOptions: ExportOptions);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* The export options for the Chart Wizard.
|
|
208
|
+
*/
|
|
209
|
+
export declare interface ExportOptions {
|
|
210
|
+
fileName?: string;
|
|
211
|
+
pdf?: PDFOptions;
|
|
212
|
+
image?: ImageExportOptions;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* @hidden
|
|
217
|
+
*/
|
|
218
|
+
export declare const fontNames: {
|
|
219
|
+
text: string;
|
|
220
|
+
value: string;
|
|
221
|
+
style: {
|
|
222
|
+
fontFamily: string;
|
|
223
|
+
};
|
|
224
|
+
}[];
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @hidden
|
|
228
|
+
*/
|
|
229
|
+
export declare const fontSizes: {
|
|
230
|
+
text: string;
|
|
231
|
+
value: string;
|
|
232
|
+
}[];
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Maps the Grid selectedState to a more general DataRows type to be displayed in the Chart Wizard.
|
|
236
|
+
*
|
|
237
|
+
* The selectedKeys can be either row keys or cell keys.
|
|
238
|
+
*
|
|
239
|
+
* @returns DataRow array that can be passed to getWizardDataFromDataRows in order to bind the Chart Wizard.
|
|
240
|
+
*/
|
|
241
|
+
export declare function getGridSelectedRows(args: {
|
|
242
|
+
grid: GridHandle | null;
|
|
243
|
+
data: any[];
|
|
244
|
+
selectedState: {
|
|
245
|
+
[id: string]: boolean | number[];
|
|
246
|
+
};
|
|
247
|
+
dataItemKey: string;
|
|
248
|
+
}): DataRow[];
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Maps data rows to the Chart Wizard data format.
|
|
252
|
+
*
|
|
253
|
+
* @returns collection that can be used as Chart Wizard.
|
|
254
|
+
*/
|
|
255
|
+
export declare function getWizardDataFromDataRows(dataRows: DataRow[]): ChartWizardDataRow[];
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Maps the Grid selectedState to data to be displayed in the Chart Wizard.
|
|
259
|
+
*
|
|
260
|
+
* Supports both row and cell selection.
|
|
261
|
+
*
|
|
262
|
+
* @returns collection that can be used as Chart Wizard.
|
|
263
|
+
*/
|
|
264
|
+
export declare const getWizardDataFromGridSelection: (args: {
|
|
265
|
+
grid: GridHandle | null;
|
|
266
|
+
data: any[];
|
|
267
|
+
selectedState: {
|
|
268
|
+
[id: string]: boolean | number[];
|
|
269
|
+
};
|
|
270
|
+
dataItemKey: string;
|
|
271
|
+
}) => ChartWizardDataRow[];
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* @hidden
|
|
275
|
+
*/
|
|
276
|
+
export declare const isCategorical: (type?: SeriesType) => boolean | undefined;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* @hidden
|
|
280
|
+
*/
|
|
281
|
+
export declare const mergeStates: (state: ChartWizardState, newState: ChartWizardState) => ChartWizardState;
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* @hidden
|
|
285
|
+
*/
|
|
286
|
+
export declare const parseFont: (font?: string) => {
|
|
287
|
+
size: string | undefined;
|
|
288
|
+
name: string | undefined;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* @hidden
|
|
293
|
+
*/
|
|
294
|
+
declare abstract class PreventableEvent {
|
|
295
|
+
private prevented;
|
|
296
|
+
/**
|
|
297
|
+
* Prevents the default action for a specified event.
|
|
298
|
+
* In this way, the source component suppresses the built-in behavior that follows the event.
|
|
299
|
+
*/
|
|
300
|
+
preventDefault(): void;
|
|
301
|
+
/**
|
|
302
|
+
* Returns `true` if the event was prevented by any of its subscribers.
|
|
303
|
+
*
|
|
304
|
+
* @returns - Returns `true` if the default action was prevented.
|
|
305
|
+
* Otherwise, returns `false`.
|
|
306
|
+
*/
|
|
307
|
+
isDefaultPrevented(): boolean;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* @hidden
|
|
312
|
+
*/
|
|
313
|
+
export declare interface SeriesItem extends ChartSeriesItemProps {
|
|
314
|
+
id: number;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* @hidden
|
|
319
|
+
*/
|
|
320
|
+
export declare const updateState: (currentState: ChartWizardState, action: ActionTypes, value: any) => ChartWizardState;
|
|
321
|
+
|
|
322
|
+
export { }
|
package/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./ChartWizard.js"),e=require("./chart-wizard-state.js"),a=require("./grid-integration/get-grid-selected-rows.js"),r=require("./grid-integration/get-wizard-data-from-grid-selection.js"),i=require("./common/get-wizard-data-from-data-rows.js");exports.ChartWizard=t.ChartWizard;exports.ActionTypes=e.ActionTypes;exports.createInitialState=e.createInitialState;exports.createState=e.createState;exports.fontNames=e.fontNames;exports.fontSizes=e.fontSizes;exports.isCategorical=e.isCategorical;exports.mergeStates=e.mergeStates;exports.parseFont=e.parseFont;exports.updateState=e.updateState;exports.getGridSelectedRows=a.getGridSelectedRows;exports.getWizardDataFromGridSelection=r.getWizardDataFromGridSelection;exports.getWizardDataFromDataRows=i.getWizardDataFromDataRows;
|
package/index.mjs
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import { ChartWizard as r } from "./ChartWizard.mjs";
|
|
10
|
+
import { ActionTypes as o, createInitialState as i, createState as m, fontNames as s, fontSizes as p, isCategorical as c, mergeStates as d, parseFont as f, updateState as n } from "./chart-wizard-state.mjs";
|
|
11
|
+
import { getGridSelectedRows as g } from "./grid-integration/get-grid-selected-rows.mjs";
|
|
12
|
+
import { getWizardDataFromGridSelection as x } from "./grid-integration/get-wizard-data-from-grid-selection.mjs";
|
|
13
|
+
import { getWizardDataFromDataRows as D } from "./common/get-wizard-data-from-data-rows.mjs";
|
|
14
|
+
export {
|
|
15
|
+
o as ActionTypes,
|
|
16
|
+
r as ChartWizard,
|
|
17
|
+
i as createInitialState,
|
|
18
|
+
m as createState,
|
|
19
|
+
s as fontNames,
|
|
20
|
+
p as fontSizes,
|
|
21
|
+
g as getGridSelectedRows,
|
|
22
|
+
D as getWizardDataFromDataRows,
|
|
23
|
+
x as getWizardDataFromGridSelection,
|
|
24
|
+
c as isCategorical,
|
|
25
|
+
d as mergeStates,
|
|
26
|
+
f as parseFont,
|
|
27
|
+
n as updateState
|
|
28
|
+
};
|