@ic3/reporting-api 8.0.0-alpha.6 → 8.0.0-rc.3
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/dist/ApiUtils.d.ts +10 -0
- package/dist/ApiUtils.js +25 -1
- package/dist/ApiUtils.js.map +1 -1
- package/dist/INotification.d.ts +32 -0
- package/dist/INotification.js +3 -0
- package/dist/INotification.js.map +1 -0
- package/dist/IPluginDefinition.d.ts +4 -1
- package/dist/IReporting.d.ts +41 -4
- package/dist/IThemeManager.d.ts +13 -18
- package/dist/IThemeManager.js.map +1 -1
- package/dist/ITidyTableTransformation.d.ts +20 -1
- package/dist/IWidgetVariantManager.d.ts +20 -2
- package/dist/LazyTreeView.d.ts +43 -1
- package/dist/LazyTreeView.js +5 -1
- package/dist/LazyTreeView.js.map +1 -1
- package/dist/Loader.d.ts +10 -0
- package/dist/Loader.js +33 -0
- package/dist/Loader.js.map +1 -0
- package/dist/PublicContext.d.ts +75 -10
- package/dist/PublicContext.js.map +1 -1
- package/dist/PublicLayout.d.ts +6 -6
- package/dist/PublicTemplate.d.ts +161 -58
- package/dist/PublicTemplate.js +16 -1
- package/dist/PublicTemplate.js.map +1 -1
- package/dist/PublicTemplateForm.d.ts +131 -29
- package/dist/PublicTemplateForm.js +7 -1
- package/dist/PublicTemplateForm.js.map +1 -1
- package/dist/PublicTheme.d.ts +114 -69
- package/dist/PublicTheme.js.map +1 -1
- package/dist/PublicTidyColumn.d.ts +327 -259
- package/dist/PublicTidyColumn.js +48 -2
- package/dist/PublicTidyColumn.js.map +1 -1
- package/dist/PublicTidyHistogram.d.ts +24 -0
- package/dist/PublicTidyHistogram.js +77 -0
- package/dist/PublicTidyHistogram.js.map +1 -0
- package/dist/PublicTidyMath.d.ts +49 -45
- package/dist/PublicTidyMath.js +0 -280
- package/dist/PublicTidyMath.js.map +1 -1
- package/dist/PublicTidyTable.d.ts +170 -154
- package/dist/PublicTidyTableInteractions.d.ts +30 -23
- package/dist/PublicTidyTableInteractions.js +5 -4
- package/dist/PublicTidyTableInteractions.js.map +1 -1
- package/dist/PublicTidyTableTypes.d.ts +133 -55
- package/dist/PublicTidyTableTypes.js +35 -18
- package/dist/PublicTidyTableTypes.js.map +1 -1
- package/dist/PublicTidyTree.d.ts +27 -37
- package/dist/PublicTidyTree.js +30 -58
- package/dist/PublicTidyTree.js.map +1 -1
- package/dist/RemoteContainerUtils.d.ts +1 -1
- package/dist/RemoteContainerUtils.js +9 -1
- package/dist/RemoteContainerUtils.js.map +1 -1
- package/dist/ReportingVersion.d.ts +1 -1
- package/dist/ReportingVersion.js +1 -1
- package/dist/ReportingVersion.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/theme/ThemeFilterAutocomplete.d.ts +30 -0
- package/dist/theme/ThemeFilterAutocomplete.js +23 -0
- package/dist/theme/ThemeFilterAutocomplete.js.map +1 -0
- package/dist/theme/ThemeFilterButtons.d.ts +28 -3
- package/dist/theme/ThemeFilterButtons.js +9 -3
- package/dist/theme/ThemeFilterButtons.js.map +1 -1
- package/dist/theme/ThemeFilterCheckboxes.d.ts +18 -0
- package/dist/theme/ThemeFilterCheckboxes.js +11 -0
- package/dist/theme/ThemeFilterCheckboxes.js.map +1 -0
- package/dist/theme/ThemeFilterSlider.d.ts +47 -0
- package/dist/theme/ThemeFilterSlider.js +29 -0
- package/dist/theme/ThemeFilterSlider.js.map +1 -0
- package/dist/theme/ThemeFilterTree.d.ts +70 -0
- package/dist/theme/ThemeFilterTree.js +11 -0
- package/dist/theme/ThemeFilterTree.js.map +1 -0
- package/dist/theme/ThemeGoogleMapMarker.d.ts +51 -0
- package/dist/theme/ThemeGoogleMapMarker.js +3 -0
- package/dist/theme/ThemeGoogleMapMarker.js.map +1 -0
- package/dist/theme/ThemeHtmlBox.d.ts +7 -1
- package/dist/theme/ThemePivotTable.d.ts +23 -0
- package/dist/theme/ThemePivotTable.js +21 -0
- package/dist/theme/ThemePivotTable.js.map +1 -0
- package/dist/theme/ThemeTable.d.ts +15 -0
- package/dist/theme/ThemeTable.js +5 -0
- package/dist/theme/ThemeTable.js.map +1 -0
- package/package.json +11 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicTidyMath.js","sourceRoot":"","sources":["../src/PublicTidyMath.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PublicTidyMath.js","sourceRoot":"","sources":["../src/PublicTidyMath.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
import { AxisCoordinate,
|
|
2
|
-
import { AllowedColumnType, ITidyBaseColumn, ITidyCharacterColumn, ITidyColumn,
|
|
1
|
+
import { AxisCoordinate, IAmCharts4Data, IAmCharts4DataTreeMap, ITotalRowValues, SortingType, TidyColumnIndex, TidyColumnsType, TidyTableColumnSelector } from "./PublicTidyTableTypes";
|
|
2
|
+
import { AllowedColumnType, ITidyBaseColumn, ITidyBaseColumnReadonly, ITidyCharacterColumn, ITidyColumn, ITidyNumericColumn, ITidyUnknownColumn } from "./PublicTidyColumn";
|
|
3
3
|
import { TidyTree } from "./PublicTidyTree";
|
|
4
|
-
|
|
4
|
+
import { SelectionGranularityOptions } from "./PublicTemplate";
|
|
5
|
+
import { TidyHistogramOptions } from "./PublicTidyHistogram";
|
|
6
|
+
import { IPublicContext } from "./PublicContext";
|
|
7
|
+
/**
|
|
8
|
+
* Identifies a Mdx node in a query.
|
|
9
|
+
*
|
|
10
|
+
* For queries with more than 2 axis multiple rows might point to the same NodeIdentifier
|
|
11
|
+
*/
|
|
12
|
+
export interface MdxNodeIdentifier {
|
|
13
|
+
readonly uid: string;
|
|
14
|
+
readonly axis: number;
|
|
15
|
+
readonly hierarchyIdx: number;
|
|
16
|
+
readonly tupleUNs: ReadonlyArray<string>;
|
|
17
|
+
readonly tupleIdx: number;
|
|
18
|
+
}
|
|
5
19
|
/**
|
|
6
20
|
* Result of a MDX, SQL, ... query with additional transformations (e.g., colors, sizes, changing MDX names,...).
|
|
7
21
|
* A tidy table has axes and measures. The axes describe the coordinates for each measure.
|
|
@@ -17,9 +31,11 @@ export declare type ITidyTableType = "data" | "properties";
|
|
|
17
31
|
* The columns of this table are Brand, Year, Size (m).
|
|
18
32
|
*/
|
|
19
33
|
export interface ITidyTable {
|
|
20
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Get the query uid
|
|
36
|
+
*/
|
|
21
37
|
getQueryUid(): number;
|
|
22
|
-
asPivotTableForExcel(nullValue: any):
|
|
38
|
+
asPivotTableForExcel(nullValue: any): ITidyColumn[];
|
|
23
39
|
/**
|
|
24
40
|
* Return all columns in the table
|
|
25
41
|
*/
|
|
@@ -28,57 +44,38 @@ export interface ITidyTable {
|
|
|
28
44
|
* Get the number of rows.
|
|
29
45
|
*/
|
|
30
46
|
getRowCount(): number;
|
|
31
|
-
/**
|
|
32
|
-
* Set the number of rows.
|
|
33
|
-
* @deprecated
|
|
34
|
-
*/
|
|
35
|
-
setRowCount(count: number): void;
|
|
36
47
|
/**
|
|
37
48
|
* Get the number of columns.
|
|
38
49
|
*/
|
|
39
50
|
getColumnCount(): number;
|
|
40
51
|
/**
|
|
41
|
-
*
|
|
42
|
-
* @
|
|
43
|
-
* @see {getOptionalColumnByType}
|
|
44
|
-
*
|
|
52
|
+
* Get the nth character column in the table
|
|
53
|
+
* @param axisPosition
|
|
45
54
|
*/
|
|
46
55
|
getAxisN(axisPosition: number): ITidyCharacterColumn;
|
|
47
56
|
/**
|
|
48
|
-
* @
|
|
49
|
-
* @see {getOptionalColumnByType}
|
|
57
|
+
* @see {getAxisN}
|
|
50
58
|
*/
|
|
51
59
|
getOptionalAxisN(axisPosition: number): ITidyCharacterColumn | undefined;
|
|
52
60
|
/**
|
|
53
|
-
*
|
|
54
|
-
* @see {getOptionalColumnByType}
|
|
61
|
+
* Get the nth numeric column in the table
|
|
55
62
|
* @param axisPosition
|
|
56
63
|
*/
|
|
57
64
|
getMeasureN(axisPosition: number): ITidyNumericColumn;
|
|
58
65
|
/**
|
|
59
|
-
* @
|
|
60
|
-
* @see {getOptionalColumnByType}
|
|
66
|
+
* @see {getMeasureN}
|
|
61
67
|
* @param axisPosition
|
|
62
68
|
*/
|
|
63
69
|
getOptionalMeasureN(axisPosition: number): ITidyNumericColumn | undefined;
|
|
64
70
|
/**
|
|
65
|
-
*
|
|
66
|
-
* @param
|
|
71
|
+
* Get a column by name (case insensitive) or index. If no column is found, it gives an error.
|
|
72
|
+
* @param identifier name or index of the column
|
|
67
73
|
*/
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* @see {getColumnN}
|
|
71
|
-
*/
|
|
72
|
-
getOptionalColumnN(index: number): ITidyUnknownColumn | undefined;
|
|
73
|
-
/**
|
|
74
|
-
* Returns the first column with name. If no column is found, it gives an error.
|
|
75
|
-
* @param name name of the column.
|
|
76
|
-
*/
|
|
77
|
-
getColumn(name: string): ITidyUnknownColumn;
|
|
74
|
+
getColumn(identifier: string | number): ITidyColumn;
|
|
78
75
|
/**
|
|
79
76
|
* @see {getColumn}
|
|
80
77
|
*/
|
|
81
|
-
getOptionalColumn(
|
|
78
|
+
getOptionalColumn(identifier: string | number): ITidyColumn | undefined;
|
|
82
79
|
/**
|
|
83
80
|
* Column getters with mapping defined, throws an error if the column is not found.
|
|
84
81
|
*
|
|
@@ -89,45 +86,45 @@ export interface ITidyTable {
|
|
|
89
86
|
*
|
|
90
87
|
* @param alias mapping name
|
|
91
88
|
*/
|
|
92
|
-
getColumnByAlias(alias: string):
|
|
89
|
+
getColumnByAlias(alias: string): ITidyColumn;
|
|
93
90
|
/**
|
|
94
91
|
* @see {getColumnByAlias}
|
|
95
92
|
*/
|
|
96
|
-
getOptionalColumnByAlias(alias: string):
|
|
93
|
+
getOptionalColumnByAlias(alias: string): ITidyColumn | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Get the coordinate of the column using the alias for the mapping
|
|
96
|
+
* @param alias the name of the mapping
|
|
97
|
+
*/
|
|
98
|
+
getOptionalColumnCoordinateByAlias(alias: string): TidyTableColumnSelector | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* @param granularityOption , if valid a SelectionGranularityOptions
|
|
101
|
+
*/
|
|
102
|
+
getOptionalColumnBySelectionGranularity(granularityOption: string | SelectionGranularityOptions): ITidyColumn[] | undefined;
|
|
97
103
|
/**
|
|
98
|
-
* Get
|
|
99
|
-
* @param
|
|
104
|
+
* Get column(s) using a selector
|
|
105
|
+
* @param selector coordinate to the column or property.
|
|
100
106
|
*/
|
|
101
|
-
|
|
107
|
+
getColumnBySelector(selector?: TidyTableColumnSelector): ITidyColumn[] | undefined;
|
|
102
108
|
/**
|
|
103
109
|
* Get a column using the coordinate of an axis.
|
|
104
110
|
* @param coordinate
|
|
105
111
|
* @see {AxisCoordinate}
|
|
106
112
|
*/
|
|
107
|
-
getColumnByMdxAxis(coordinate: AxisCoordinate):
|
|
113
|
+
getColumnByMdxAxis(coordinate: AxisCoordinate): ITidyColumn | undefined;
|
|
108
114
|
/**
|
|
109
|
-
* Get
|
|
115
|
+
* Get all columns on an axis.
|
|
116
|
+
* @param axisIdx index of the axis. ON 0, ON 1, etc..
|
|
110
117
|
*/
|
|
111
|
-
|
|
118
|
+
getColumnsByMdxAxis(axisIdx: number): ITidyColumn[];
|
|
112
119
|
/**
|
|
113
|
-
* Get
|
|
114
|
-
* @param alias name in the mapping meta.
|
|
115
|
-
* @see {getColumnByAlias}
|
|
116
|
-
* @deprecated Use getColumnByAlias and test if the result is a numeric. The error from this function is not localized.
|
|
117
|
-
*/
|
|
118
|
-
getNumericColumnByAlias(alias: string): ITidyNumericColumn;
|
|
119
|
-
/**
|
|
120
|
-
* @see {getNumericColumnByAlias}
|
|
121
|
-
* @see {getColumnByAlias}
|
|
122
|
-
* @deprecated Use getOptionalColumnByAlias and test if the result is a numeric. The error from this function is not localized.
|
|
120
|
+
* Get the number of MDX axis.
|
|
123
121
|
*/
|
|
124
|
-
|
|
125
|
-
getColumnForTextFormatter(nameOrAlias: string): ITidyUnknownColumn | undefined;
|
|
122
|
+
getMdxAxisCount(): number;
|
|
126
123
|
/**
|
|
127
|
-
* Get the
|
|
128
|
-
* @param
|
|
124
|
+
* Get the column for the text formatter
|
|
125
|
+
* @param nameOrAlias the name or the mapping alias for the column
|
|
129
126
|
*/
|
|
130
|
-
|
|
127
|
+
getColumnForTextFormatter(nameOrAlias: string): ITidyColumn | undefined;
|
|
131
128
|
/**
|
|
132
129
|
* Convert the tidy table to an array of arrays.
|
|
133
130
|
* @param major the major-ordering of the arrays. If 'column', the result is an array of columns. If 'row', the
|
|
@@ -135,33 +132,38 @@ export interface ITidyTable {
|
|
|
135
132
|
*/
|
|
136
133
|
toArray(major?: 'row' | 'column'): any[][];
|
|
137
134
|
/**
|
|
138
|
-
* Get the
|
|
135
|
+
* Get the column names of the tidy table. Each column in the table has a unique name.
|
|
139
136
|
*/
|
|
140
|
-
|
|
137
|
+
getColumnNames(): string[];
|
|
141
138
|
/**
|
|
142
|
-
* Get the column
|
|
139
|
+
* Get the column captions of the tidy table
|
|
143
140
|
*/
|
|
144
|
-
|
|
141
|
+
getColumnCaptions(): string[];
|
|
145
142
|
/**
|
|
146
|
-
* Get
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
* getColumnByClassAndIdx("Axis", 1) would give the first column of class Axis
|
|
150
|
-
* @param type the column class to look for
|
|
151
|
-
* @param position get the nth column of type. Default = 0.
|
|
143
|
+
* Get a column by its type
|
|
144
|
+
* @param type columns of this type are in the result set
|
|
145
|
+
* @param position get the nth column of the result set, default = 0
|
|
152
146
|
*/
|
|
153
|
-
getColumnByType(type: TidyColumnsType, position?: number):
|
|
147
|
+
getColumnByType(type: TidyColumnsType, position?: number): ITidyColumn;
|
|
154
148
|
/**
|
|
155
149
|
* @see {getColumnByType}
|
|
156
150
|
*/
|
|
157
|
-
getOptionalColumnByType(type: TidyColumnsType, position?: number):
|
|
151
|
+
getOptionalColumnByType(type: TidyColumnsType, position?: number): ITidyColumn | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* Search through the columns in the table returning the n-th column that is found.
|
|
154
|
+
* @param predicate function that returns true if and only if the column is in the result set.
|
|
155
|
+
* @param position the position in the result set. Defaults to 0.
|
|
156
|
+
*/
|
|
157
|
+
searchColumn(predicate: (column: ITidyColumn) => boolean, position?: number): ITidyColumn | undefined;
|
|
158
|
+
/**
|
|
159
|
+
* Return a list of the types of the column in the table
|
|
160
|
+
*/
|
|
158
161
|
getColumnTypes(): TidyColumnsType[];
|
|
159
|
-
lookupColumnIdx(axis?: ITidyColumn): number;
|
|
160
162
|
/**
|
|
161
|
-
*
|
|
162
|
-
* @param
|
|
163
|
+
* Get the index of the column in the table
|
|
164
|
+
* @param col
|
|
163
165
|
*/
|
|
164
|
-
|
|
166
|
+
lookupColumnIdx(col?: ITidyColumn): number;
|
|
165
167
|
/**
|
|
166
168
|
* Returns the value of the cell. Does not search properties.
|
|
167
169
|
* @param columnName name of the column in the table
|
|
@@ -178,8 +180,6 @@ export interface ITidyTable {
|
|
|
178
180
|
* @param mapper
|
|
179
181
|
*/
|
|
180
182
|
mapColumns<T>(mapper: (colIdx: ITidyColumn, colData: (rowIdx: number) => any, rowCount: number) => T): T[];
|
|
181
|
-
getEntityItem(colIdx: number, rowIdx: number): EntityItem | undefined;
|
|
182
|
-
getMdxCoordinates(colIdx: number, rowIdx: number): [number, number, number] | [];
|
|
183
183
|
/**
|
|
184
184
|
* Take the sum of the column, but if it is a hierarchical column only the sum at the root level will be
|
|
185
185
|
* calculated
|
|
@@ -187,12 +187,6 @@ export interface ITidyTable {
|
|
|
187
187
|
* @param measureColIdx measures to take the sum of
|
|
188
188
|
*/
|
|
189
189
|
sumRoot(axisColIdx: number, measureColIdx: number): number;
|
|
190
|
-
/**
|
|
191
|
-
* Check if there is a one to many relation from name1 to name2.
|
|
192
|
-
* @param column1 name of first column.
|
|
193
|
-
* @param column2 name of second column.
|
|
194
|
-
*/
|
|
195
|
-
oneToManyRelation(column1: string, column2: string): boolean;
|
|
196
190
|
/**
|
|
197
191
|
* build a tidy tree where the levels are defined by the treeLevels parameter, using
|
|
198
192
|
* the column values for creating unique tree nodes.
|
|
@@ -220,25 +214,16 @@ export interface ITidyTable {
|
|
|
220
214
|
*
|
|
221
215
|
*
|
|
222
216
|
* @param treeColumns columns to build the levels
|
|
223
|
-
* @param measures measures to be attached to nodes (leafs)
|
|
224
217
|
* @param rootLabel the label of the root
|
|
225
218
|
* @param expandHierarchicalColumn if true, hierarchical columns will be expanded as a tree (all nodes except the root one will have measures values)
|
|
226
219
|
*/
|
|
227
|
-
buildTidyTree(treeColumns: ITidyColumn[],
|
|
220
|
+
buildTidyTree(treeColumns: ITidyColumn[], rootLabel?: string, expandHierarchicalColumn?: boolean): TidyTree;
|
|
228
221
|
/**
|
|
229
222
|
* Construct list of tidy tables
|
|
230
223
|
* @param columns groupIdx and groupRows for each unique value in this(ese) column(s)
|
|
231
224
|
* @returns an map with indexes for each group.
|
|
232
225
|
*/
|
|
233
|
-
groupBy(columns: ITidyColumn[]):
|
|
234
|
-
/**
|
|
235
|
-
* For each row matching values the lookup value call func()
|
|
236
|
-
*
|
|
237
|
-
* @param columns
|
|
238
|
-
* @param values
|
|
239
|
-
* @param func if false, stop the foreach
|
|
240
|
-
*/
|
|
241
|
-
forEachMatching(columns: ITidyColumn[], values: any[], func: (rowIdx: number) => void | boolean): void;
|
|
226
|
+
groupBy(columns: ITidyColumn[]): number[][];
|
|
242
227
|
/**
|
|
243
228
|
* Pivot a tidy table from wide to long format. See https://pandas.pydata.org/docs/reference/api/pandas.melt.html.
|
|
244
229
|
* @param columns columns to melt.
|
|
@@ -246,6 +231,19 @@ export interface ITidyTable {
|
|
|
246
231
|
* @param valuesCaption name of the column to which the values are melted.
|
|
247
232
|
*/
|
|
248
233
|
melt(columns: ITidyColumn[], namesCaption?: string, valuesCaption?: string): void;
|
|
234
|
+
/**
|
|
235
|
+
* Pivot a tidy table from long to wide format
|
|
236
|
+
* Duplicated rows are discarded.
|
|
237
|
+
* @param toColumns Pivot the row-values of this column to the columns of the table.
|
|
238
|
+
* @param valueCols transpose the values in these column.
|
|
239
|
+
* @param toRows Each unique combination in these columns is a row in the transformed table. Leave undefined to take all remaining columns.
|
|
240
|
+
*/
|
|
241
|
+
cast(toColumns: ITidyColumn[], valueCols: ITidyColumn[], toRows?: ITidyColumn[]): void;
|
|
242
|
+
/**
|
|
243
|
+
* Cast to create a new table
|
|
244
|
+
* @see cast
|
|
245
|
+
*/
|
|
246
|
+
castN(toColumns: ITidyColumn[], valueCols: ITidyColumn[], toRows?: ITidyColumn[]): ITidyTable;
|
|
249
247
|
/**
|
|
250
248
|
* Sort the table based on the certain columns. Default sorting is descending.
|
|
251
249
|
* @param columns column(s) used for sorting. Columns earlier in the list take priority over columns with
|
|
@@ -253,6 +251,13 @@ export interface ITidyTable {
|
|
|
253
251
|
* @param order sorting order. Default = descending.
|
|
254
252
|
*/
|
|
255
253
|
sort(columns: ITidyColumn[], order?: SortingType[]): void;
|
|
254
|
+
/**
|
|
255
|
+
* Sort the table while keeping the parent/child structure in treeColumns intact.
|
|
256
|
+
* @param treeColumns one or more columns with a tree like structure
|
|
257
|
+
* @param sortingColumns columns to sort on
|
|
258
|
+
* @param order sorting order. Default = descending.
|
|
259
|
+
*/
|
|
260
|
+
sortInTree(treeColumns: ITidyColumn[], sortingColumns: ITidyColumn[], order?: SortingType[]): void;
|
|
256
261
|
/**
|
|
257
262
|
* Get the ranking of one or more columns. Smallest value gets rank 0,
|
|
258
263
|
* second smallest rank 1, etc. until rank n-1. Sort ascending by default.
|
|
@@ -264,9 +269,12 @@ export interface ITidyTable {
|
|
|
264
269
|
/**
|
|
265
270
|
* Add a new column to the table. If the column name already exits, a new name is generated.
|
|
266
271
|
* If the column is already in the table, nothing is done.
|
|
267
|
-
* @param column
|
|
268
272
|
*/
|
|
269
273
|
addColumn(column: ITidyColumn): void;
|
|
274
|
+
/**
|
|
275
|
+
* Convert the tidy table to a data object that can be used by amCharts V5.
|
|
276
|
+
*/
|
|
277
|
+
toAmcharts5Data(axis: ITidyColumn, group: ITidyColumn | undefined, value: Record<string, ITidyColumn | undefined>): any;
|
|
270
278
|
/**
|
|
271
279
|
* Convert the tidy table to a data object that can be used by amCharts.
|
|
272
280
|
* Note, duplicated rows in 'group' are skipped.
|
|
@@ -282,12 +290,12 @@ export interface ITidyTable {
|
|
|
282
290
|
*/
|
|
283
291
|
toAmcharts4Data<F extends string>(category: ITidyColumn, value: Record<F, ITidyColumn | undefined>, group?: ITidyColumn, level?: ITidyColumn): IAmCharts4Data[];
|
|
284
292
|
/**
|
|
285
|
-
* Creates a data object for the Amcharts treemap
|
|
286
|
-
* @param
|
|
287
|
-
* @param
|
|
288
|
-
* @param
|
|
293
|
+
* Creates a data object for the Amcharts treemap
|
|
294
|
+
* @param level0 names for the parent nodes
|
|
295
|
+
* @param level1 names for the child nodes
|
|
296
|
+
* @param value values to use in the node data
|
|
289
297
|
*/
|
|
290
|
-
toAmcharts4DataTreeMap(value: Record<string, ITidyColumn | undefined
|
|
298
|
+
toAmcharts4DataTreeMap(level0: ITidyColumn, level1: ITidyColumn, value: Record<string, ITidyColumn | undefined>): IAmCharts4DataTreeMap[];
|
|
291
299
|
/**
|
|
292
300
|
* Convert the tidy table to json.
|
|
293
301
|
*
|
|
@@ -340,27 +348,8 @@ export interface ITidyTable {
|
|
|
340
348
|
/**
|
|
341
349
|
* throws an exception if the column does not belong to the table
|
|
342
350
|
*/
|
|
343
|
-
|
|
344
|
-
hasEmptyDrilldown(
|
|
345
|
-
/**
|
|
346
|
-
* Insert the rows of another table into this table at a given index. Ensure that both tables
|
|
347
|
-
* have the same number of columns.
|
|
348
|
-
* @param sliceTable
|
|
349
|
-
* @param rowIdx
|
|
350
|
-
*/
|
|
351
|
-
insertTable(sliceTable: ITidyTable, rowIdx: number): void;
|
|
352
|
-
/**
|
|
353
|
-
* Append the rows of another tidy table to the rows of this table. Columns with the same name are merged.
|
|
354
|
-
* @param table other tidy table.
|
|
355
|
-
* @param rowIdx start adding rows from this index. Appends at the end of the table if undefined.
|
|
356
|
-
*/
|
|
357
|
-
rBind(table: ITidyTable, rowIdx?: number): void;
|
|
358
|
-
/**
|
|
359
|
-
* Apply a function mutating each column of the tidy table.
|
|
360
|
-
* The function should result in columns of same length.
|
|
361
|
-
* @param lambda function to apply on the columns.
|
|
362
|
-
*/
|
|
363
|
-
applyColumns(lambda: (col: ITidyColumn) => void): void;
|
|
351
|
+
assertColumnExists(column: ITidyColumn): void;
|
|
352
|
+
hasEmptyDrilldown(nodeInfo: MdxNodeIdentifier): boolean;
|
|
364
353
|
/**
|
|
365
354
|
* Apply a new index to the table. Used for sorting, filtering and duplication of rows.
|
|
366
355
|
*
|
|
@@ -389,60 +378,87 @@ export interface ITidyTable {
|
|
|
389
378
|
*
|
|
390
379
|
* @param index list of integers.
|
|
391
380
|
*/
|
|
392
|
-
reIndex(index: number[]
|
|
381
|
+
reIndex(index: number[]): void;
|
|
393
382
|
/**
|
|
394
|
-
*
|
|
395
|
-
* @param
|
|
383
|
+
* Delete a column from the table (if it exists).
|
|
384
|
+
* @param column
|
|
385
|
+
*/
|
|
386
|
+
deleteColumn(column: ITidyColumn | string): boolean;
|
|
387
|
+
/**
|
|
388
|
+
* Keep a subset of columns from the table.
|
|
389
|
+
* @param columns list of columns, note that the length of each column must be the same as the number of rows
|
|
390
|
+
* in the table. Duplicates will be ignored. Columns with the same name get an index added to the name.
|
|
396
391
|
*/
|
|
397
|
-
|
|
392
|
+
setColumns(columns: ITidyColumn[]): void;
|
|
398
393
|
/**
|
|
399
|
-
*
|
|
400
|
-
* @param
|
|
401
|
-
* @param
|
|
394
|
+
* Create a new column. The column is not added to the table.
|
|
395
|
+
* @param name name of the column.
|
|
396
|
+
* @param values cell values for the column.
|
|
397
|
+
* @param type if undefined, the type is inferred. Note that the provided type is not checked against the values
|
|
398
|
+
* for speed. Be sure that the type you set is correct to prevent unexpected behaviour.
|
|
402
399
|
*/
|
|
403
|
-
|
|
400
|
+
createColumn<T>(name: string, values: T[], type?: AllowedColumnType<T>): ITidyBaseColumn<T>;
|
|
401
|
+
createTable(): ITidyTable;
|
|
404
402
|
/**
|
|
405
|
-
*
|
|
403
|
+
* Print the table as a markdown table (e.g., used for internal documentation).
|
|
406
404
|
*/
|
|
407
|
-
|
|
405
|
+
toMarkdown(): string;
|
|
408
406
|
/**
|
|
409
|
-
*
|
|
407
|
+
* Return the values of the tidy table (debugging purpose).
|
|
408
|
+
*
|
|
409
|
+
* @param order how to structure the array, default = column-major.
|
|
410
|
+
* Say the table has n rows and m columns, then
|
|
411
|
+
* > row-major - returns an array of row-values
|
|
412
|
+
* [
|
|
413
|
+
* [val11, val12, ..., val1m],
|
|
414
|
+
* [val21, val22, ..., val2m],
|
|
415
|
+
* ...,
|
|
416
|
+
* [valn1, valn2, ..., valnm]
|
|
417
|
+
* ]
|
|
418
|
+
*
|
|
419
|
+
* > column-major - returns an array of column-values
|
|
420
|
+
* [
|
|
421
|
+
* [val11, val21, ..., valn1],
|
|
422
|
+
* [val21, val22, ..., valn2],
|
|
423
|
+
* ...,
|
|
424
|
+
* [valm1, valm2, ..., valnm]
|
|
425
|
+
* ]
|
|
410
426
|
*/
|
|
411
|
-
|
|
427
|
+
getValues(order?: "row-major" | "column-major"): ReadonlyArray<ReadonlyArray<any>>;
|
|
412
428
|
/**
|
|
413
|
-
*
|
|
414
|
-
* @param
|
|
429
|
+
* Add a tag, name combination to the mapping
|
|
430
|
+
* @param tag name, mapping, role, etc..
|
|
431
|
+
* @param identifier name of the column in the table. Not exist = error.
|
|
415
432
|
*/
|
|
416
|
-
|
|
433
|
+
addToColumnIndex(tag: string, identifier: string | number): void;
|
|
417
434
|
/**
|
|
418
|
-
*
|
|
419
|
-
* @param alias name as defined in the mapping meta.
|
|
420
|
-
*
|
|
421
|
-
* @deprecated Use getColumnByAlias and test if the result is a numeric. The error from this function is not localized.
|
|
435
|
+
* Add a new index to the existing index, overwriting what already exists.
|
|
422
436
|
*/
|
|
423
|
-
|
|
437
|
+
addColumnIndex(index: TidyColumnIndex): void;
|
|
438
|
+
getQueryLimit(): number | undefined;
|
|
439
|
+
isTotalRow(rowIdx: number): boolean;
|
|
424
440
|
/**
|
|
425
|
-
*
|
|
426
|
-
*
|
|
441
|
+
* Transform the table to a table where each row is a bucket in the histogram for that group.
|
|
442
|
+
*
|
|
443
|
+
* @see TidyHistogramBucketColName
|
|
444
|
+
* @see TidyHistogramCountColName
|
|
427
445
|
*/
|
|
428
|
-
|
|
446
|
+
toHistogram(context: IPublicContext, valueCol: ITidyBaseColumnReadonly<number | null>, groupCol: ITidyColumn | undefined, options: TidyHistogramOptions): ITidyTable;
|
|
429
447
|
/**
|
|
430
|
-
*
|
|
431
|
-
* @param columns list of columns that are in the table.
|
|
448
|
+
* Create a histogram bucket column from the value column.
|
|
432
449
|
*/
|
|
433
|
-
|
|
450
|
+
toHistogramBucketColumn(context: IPublicContext, valueCol: ITidyBaseColumnReadonly<number | null>, options: TidyHistogramOptions): ITidyColumn;
|
|
451
|
+
addTotalRows(totals: Map<number, ITotalRowValues>): void;
|
|
434
452
|
/**
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
* @param name name of the column.
|
|
438
|
-
* @param values cell values for the column.
|
|
439
|
-
* @param type if undefined, the type is inferred. Note that the provided type is not checked against the values
|
|
440
|
-
* for speed. Be sure that the type you set is correct to prevent unexpected behaviour.
|
|
453
|
+
* Get a column by its role as defined in the mdxBuilderSettings.
|
|
454
|
+
* @param role name of the axis-role
|
|
441
455
|
*/
|
|
442
|
-
|
|
443
|
-
toMarkdown(): string;
|
|
456
|
+
getOptionalColumnByRole(role: string): ITidyUnknownColumn | undefined;
|
|
444
457
|
/**
|
|
445
|
-
*
|
|
458
|
+
* Pivot Table
|
|
459
|
+
* @param nodeInfo
|
|
446
460
|
*/
|
|
447
|
-
|
|
461
|
+
getLevelDepthR(nodeInfo: MdxNodeIdentifier): any;
|
|
462
|
+
hasMdxChildren(nodeInfo: MdxNodeIdentifier): boolean;
|
|
463
|
+
isLeaf(nodeInfo: MdxNodeIdentifier): any;
|
|
448
464
|
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SelectionBehaviour } from "./PublicTidyTableTypes";
|
|
2
2
|
import { ITidyBaseColumn, ITidyColumn } from "./PublicTidyColumn";
|
|
3
3
|
import { ILazyTreeViewLoader } from "./LazyTreeView";
|
|
4
4
|
import { PublicIcEvent } from "./IcEvent";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Theme } from "@mui/material/styles";
|
|
6
|
+
import { MdxNodeIdentifier } from "./PublicTidyTable";
|
|
7
7
|
export declare enum SelectionMode {
|
|
8
|
+
/**
|
|
9
|
+
* User can only select one item.
|
|
10
|
+
*/
|
|
8
11
|
SINGLE = "SINGLE",
|
|
9
|
-
MULTIPLE = "MULTIPLE",
|
|
10
|
-
TREE = "TREE",
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
+
* User can select multiple items.
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
+
MULTIPLE = "MULTIPLE"
|
|
15
16
|
}
|
|
16
17
|
export declare enum TreeFireEventMode {
|
|
17
18
|
ALL_SELECTED = "ALL_SELECTED",
|
|
@@ -45,6 +46,7 @@ export interface ITidyTableInteractionSelection {
|
|
|
45
46
|
isSelected(rowIdx: number): boolean;
|
|
46
47
|
/**
|
|
47
48
|
*
|
|
49
|
+
* @param column
|
|
48
50
|
* @param rowIdx the index of the row
|
|
49
51
|
*/
|
|
50
52
|
isColumnRowSelected(column: ITidyBaseColumn<any>, rowIdx: number): boolean | undefined;
|
|
@@ -65,13 +67,11 @@ export interface ITidyTableInteractionSelection {
|
|
|
65
67
|
*
|
|
66
68
|
* If the columns is not part of the selection columns of the widget nothing will happen
|
|
67
69
|
*
|
|
70
|
+
* @param column column that is in the selection columns
|
|
68
71
|
* @param rowIdx index of row clicked
|
|
69
72
|
* @param event the mouse event of the click
|
|
70
73
|
*/
|
|
71
74
|
handleColumnSelection(column: ITidyColumn, rowIdx: number, event?: TidyEvent): void;
|
|
72
|
-
/***
|
|
73
|
-
*
|
|
74
|
-
*/
|
|
75
75
|
getColorOnSelection(theme: Theme, color: string | undefined, rowIdx: number): string | undefined;
|
|
76
76
|
/**
|
|
77
77
|
* Handles the click event for the selection
|
|
@@ -91,7 +91,7 @@ export interface ITidyTableInteractionSelection {
|
|
|
91
91
|
/**
|
|
92
92
|
* Get the selection mode (single or multiple) of the interaction object.
|
|
93
93
|
*/
|
|
94
|
-
getSelectionMode(): SelectionMode
|
|
94
|
+
getSelectionMode(): SelectionMode;
|
|
95
95
|
/**
|
|
96
96
|
* Set the selection mode of the interaction.
|
|
97
97
|
* @param mode
|
|
@@ -111,6 +111,10 @@ export interface ITidyTableInteractionSelection {
|
|
|
111
111
|
*/
|
|
112
112
|
setTreeFireEventMode(mode: TreeFireEventMode): void;
|
|
113
113
|
setTreeCascade(value: boolean): void;
|
|
114
|
+
/**
|
|
115
|
+
* the selection will treat a click without ctr or shift as with a ctr key pressed (e.g. check boxes)
|
|
116
|
+
*/
|
|
117
|
+
setNoKeyModifierAsCtrl(value?: boolean): void;
|
|
114
118
|
/**
|
|
115
119
|
* Set to true to enable selection on the interaction object.
|
|
116
120
|
* @param enabled if true, the selection is enabled. If false, the interaction object does not respond to
|
|
@@ -118,27 +122,22 @@ export interface ITidyTableInteractionSelection {
|
|
|
118
122
|
*/
|
|
119
123
|
setSelectionActive(enabled?: boolean): void;
|
|
120
124
|
/**
|
|
121
|
-
* Returns true if the selection is activated, e.g. the interaction object responds to click and
|
|
125
|
+
* Returns true if the selection is activated, e.g. the interaction object responds to click and other selection
|
|
122
126
|
* events.
|
|
123
127
|
*/
|
|
124
128
|
isSelectionActive(): boolean;
|
|
125
129
|
}
|
|
126
130
|
export interface ITidyTableDrilldown {
|
|
127
|
-
handleDrilldown(rowIdx: number, event: TidyEvent | undefined): void;
|
|
128
|
-
/**
|
|
129
|
-
* drilldown
|
|
130
|
-
*
|
|
131
|
-
* @see pivotTableLikeDrilldown
|
|
132
|
-
*/
|
|
133
|
-
onDrilldown(column: ITidyColumn, rowIdx: number, event: TidyEvent | undefined): void;
|
|
131
|
+
handleDrilldown(rowIdx: number, event: TidyEvent | undefined, stopDrillDownDepth?: number): void;
|
|
134
132
|
hasDrilldown(): boolean;
|
|
135
|
-
hasNodeDrilldown(
|
|
133
|
+
hasNodeDrilldown(nodeInfo: MdxNodeIdentifier, stopDrillDownDepth?: number): boolean;
|
|
136
134
|
}
|
|
137
135
|
export interface ITidyTableInteractionEvent {
|
|
138
136
|
/**
|
|
139
137
|
* actionName if the action is bound to a channel, sends the events ( e.g. 'onClick' to the channel 'year' )
|
|
140
138
|
*/
|
|
141
|
-
fireEvent(actionName: string, column: ITidyColumn, rowIdx: number | number[]): void;
|
|
139
|
+
fireEvent(actionName: string, column: ITidyColumn | ITidyColumn[] | undefined, rowIdx: number | number[]): void;
|
|
140
|
+
fireClearEvent(actionName: string): void;
|
|
142
141
|
/**
|
|
143
142
|
* actionName if the action is bound to a channel, sends the emptySet event, ∅
|
|
144
143
|
*/
|
|
@@ -180,18 +179,26 @@ export interface ITidyTableInteraction extends ITidyTableInteractionSelection, I
|
|
|
180
179
|
* @param inverse per default, all items are expanded. If inverse is true, all items are collapsed per default.
|
|
181
180
|
*/
|
|
182
181
|
mapVisibleRows<T>(column: ITidyColumn, mapper: (index: number) => T, inverse?: boolean): T[];
|
|
183
|
-
mapTreeVisibleRows<T extends ReactElement>(column: ITidyColumn, mapper: (index: number) => T, filter?: (info: MdxInfo) => boolean): T[];
|
|
184
182
|
isCollapsed(column: ITidyColumn, rowIdx: number): boolean;
|
|
185
183
|
/**
|
|
186
184
|
* Is the node loading
|
|
187
185
|
*/
|
|
188
186
|
isLoading(column: ITidyColumn, rowIdx: number): boolean;
|
|
187
|
+
setSelectionColumns(columns: ITidyColumn[]): void;
|
|
188
|
+
/**
|
|
189
|
+
* Change the default drilldown column.
|
|
190
|
+
* @param column column to use for the drill-downs. Use undefined to reset to default.
|
|
191
|
+
*/
|
|
192
|
+
setDrilldownColumn(column: ITidyColumn | undefined): void;
|
|
189
193
|
/**
|
|
190
194
|
* Pivot Type behavior ( nodes can collapse/expand + drilldown might return some values)
|
|
191
195
|
*
|
|
192
196
|
* pay attention that the query needs to set the flag, pivot table like (to insert data)
|
|
193
197
|
*/
|
|
194
|
-
pivotTableLikeDrilldown(column: ITidyColumn, rowIdx: number,
|
|
198
|
+
pivotTableLikeDrilldown(event: TidyEvent, column: ITidyColumn, rowIdx: number, stopDrillDownDepth?: number): void;
|
|
199
|
+
pivotTableLikeDrilldownOnNode(event: TidyEvent, nodeInfo: MdxNodeIdentifier, stopDrillDownDepth?: number): void;
|
|
195
200
|
pivotTableLikeNodeStatus(column: ITidyColumn, rowIdx: number, stopDrillDownDepth?: number): TidyPivotTableLikeNodeStatus;
|
|
196
201
|
asLazyTreeViewLoader(column: ITidyColumn): ILazyTreeViewLoader;
|
|
202
|
+
getCompactedSelectionNames(): string[] | undefined;
|
|
203
|
+
isSelectable(col: ITidyColumn): boolean;
|
|
197
204
|
}
|