@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.
Files changed (83) hide show
  1. package/dist/ApiUtils.d.ts +10 -0
  2. package/dist/ApiUtils.js +25 -1
  3. package/dist/ApiUtils.js.map +1 -1
  4. package/dist/INotification.d.ts +32 -0
  5. package/dist/INotification.js +3 -0
  6. package/dist/INotification.js.map +1 -0
  7. package/dist/IPluginDefinition.d.ts +4 -1
  8. package/dist/IReporting.d.ts +41 -4
  9. package/dist/IThemeManager.d.ts +13 -18
  10. package/dist/IThemeManager.js.map +1 -1
  11. package/dist/ITidyTableTransformation.d.ts +20 -1
  12. package/dist/IWidgetVariantManager.d.ts +20 -2
  13. package/dist/LazyTreeView.d.ts +43 -1
  14. package/dist/LazyTreeView.js +5 -1
  15. package/dist/LazyTreeView.js.map +1 -1
  16. package/dist/Loader.d.ts +10 -0
  17. package/dist/Loader.js +33 -0
  18. package/dist/Loader.js.map +1 -0
  19. package/dist/PublicContext.d.ts +75 -10
  20. package/dist/PublicContext.js.map +1 -1
  21. package/dist/PublicLayout.d.ts +6 -6
  22. package/dist/PublicTemplate.d.ts +161 -58
  23. package/dist/PublicTemplate.js +16 -1
  24. package/dist/PublicTemplate.js.map +1 -1
  25. package/dist/PublicTemplateForm.d.ts +131 -29
  26. package/dist/PublicTemplateForm.js +7 -1
  27. package/dist/PublicTemplateForm.js.map +1 -1
  28. package/dist/PublicTheme.d.ts +114 -69
  29. package/dist/PublicTheme.js.map +1 -1
  30. package/dist/PublicTidyColumn.d.ts +327 -259
  31. package/dist/PublicTidyColumn.js +48 -2
  32. package/dist/PublicTidyColumn.js.map +1 -1
  33. package/dist/PublicTidyHistogram.d.ts +24 -0
  34. package/dist/PublicTidyHistogram.js +77 -0
  35. package/dist/PublicTidyHistogram.js.map +1 -0
  36. package/dist/PublicTidyMath.d.ts +49 -45
  37. package/dist/PublicTidyMath.js +0 -280
  38. package/dist/PublicTidyMath.js.map +1 -1
  39. package/dist/PublicTidyTable.d.ts +170 -154
  40. package/dist/PublicTidyTableInteractions.d.ts +30 -23
  41. package/dist/PublicTidyTableInteractions.js +5 -4
  42. package/dist/PublicTidyTableInteractions.js.map +1 -1
  43. package/dist/PublicTidyTableTypes.d.ts +133 -55
  44. package/dist/PublicTidyTableTypes.js +35 -18
  45. package/dist/PublicTidyTableTypes.js.map +1 -1
  46. package/dist/PublicTidyTree.d.ts +27 -37
  47. package/dist/PublicTidyTree.js +30 -58
  48. package/dist/PublicTidyTree.js.map +1 -1
  49. package/dist/RemoteContainerUtils.d.ts +1 -1
  50. package/dist/RemoteContainerUtils.js +9 -1
  51. package/dist/RemoteContainerUtils.js.map +1 -1
  52. package/dist/ReportingVersion.d.ts +1 -1
  53. package/dist/ReportingVersion.js +1 -1
  54. package/dist/ReportingVersion.js.map +1 -1
  55. package/dist/index.d.ts +3 -0
  56. package/dist/index.js +3 -0
  57. package/dist/index.js.map +1 -1
  58. package/dist/theme/ThemeFilterAutocomplete.d.ts +30 -0
  59. package/dist/theme/ThemeFilterAutocomplete.js +23 -0
  60. package/dist/theme/ThemeFilterAutocomplete.js.map +1 -0
  61. package/dist/theme/ThemeFilterButtons.d.ts +28 -3
  62. package/dist/theme/ThemeFilterButtons.js +9 -3
  63. package/dist/theme/ThemeFilterButtons.js.map +1 -1
  64. package/dist/theme/ThemeFilterCheckboxes.d.ts +18 -0
  65. package/dist/theme/ThemeFilterCheckboxes.js +11 -0
  66. package/dist/theme/ThemeFilterCheckboxes.js.map +1 -0
  67. package/dist/theme/ThemeFilterSlider.d.ts +47 -0
  68. package/dist/theme/ThemeFilterSlider.js +29 -0
  69. package/dist/theme/ThemeFilterSlider.js.map +1 -0
  70. package/dist/theme/ThemeFilterTree.d.ts +70 -0
  71. package/dist/theme/ThemeFilterTree.js +11 -0
  72. package/dist/theme/ThemeFilterTree.js.map +1 -0
  73. package/dist/theme/ThemeGoogleMapMarker.d.ts +51 -0
  74. package/dist/theme/ThemeGoogleMapMarker.js +3 -0
  75. package/dist/theme/ThemeGoogleMapMarker.js.map +1 -0
  76. package/dist/theme/ThemeHtmlBox.d.ts +7 -1
  77. package/dist/theme/ThemePivotTable.d.ts +23 -0
  78. package/dist/theme/ThemePivotTable.js +21 -0
  79. package/dist/theme/ThemePivotTable.js.map +1 -0
  80. package/dist/theme/ThemeTable.d.ts +15 -0
  81. package/dist/theme/ThemeTable.js +5 -0
  82. package/dist/theme/ThemeTable.js.map +1 -0
  83. package/package.json +11 -10
@@ -3,13 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TidyPivotTableLikeNodeStatus = exports.TreeFireEventMode = exports.SelectionMode = void 0;
4
4
  var SelectionMode;
5
5
  (function (SelectionMode) {
6
+ /**
7
+ * User can only select one item.
8
+ */
6
9
  SelectionMode["SINGLE"] = "SINGLE";
7
- SelectionMode["MULTIPLE"] = "MULTIPLE";
8
- SelectionMode["TREE"] = "TREE";
9
10
  /**
10
- * Deprecated, use options for selection optimization instead
11
+ * User can select multiple items.
11
12
  */
12
- SelectionMode["TREE_COLLAPSE"] = "TREE_COLLAPSE";
13
+ SelectionMode["MULTIPLE"] = "MULTIPLE";
13
14
  })(SelectionMode = exports.SelectionMode || (exports.SelectionMode = {}));
14
15
  var TreeFireEventMode;
15
16
  (function (TreeFireEventMode) {
@@ -1 +1 @@
1
- {"version":3,"file":"PublicTidyTableInteractions.js","sourceRoot":"","sources":["../src/PublicTidyTableInteractions.ts"],"names":[],"mappings":";;;AAOA,IAAY,aASX;AATD,WAAY,aAAa;IACrB,kCAAiB,CAAA;IACjB,sCAAqB,CAAA;IACrB,8BAAa,CAAA;IAEb;;OAEG;IACH,gDAA+B,CAAA;AACnC,CAAC,EATW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QASxB;AAED,IAAY,iBAMX;AAND,WAAY,iBAAiB;IACzB,kDAA6B,CAAA;IAC7B;;OAEG;IACH,4DAAuC,CAAA;AAC3C,CAAC,EANW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAM5B;AAED,IAAY,4BAMX;AAND,WAAY,4BAA4B;IACpC,yFAAS,CAAA;IACT,uFAAQ,CAAA;IACR,uHAAwB,CAAA;IACxB,mGAAc,CAAA;IACd,qFAAO,CAAA;AACX,CAAC,EANW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAMvC"}
1
+ {"version":3,"file":"PublicTidyTableInteractions.js","sourceRoot":"","sources":["../src/PublicTidyTableInteractions.ts"],"names":[],"mappings":";;;AAOA,IAAY,aAUX;AAVD,WAAY,aAAa;IACrB;;OAEG;IACH,kCAAiB,CAAA;IAEjB;;OAEG;IACH,sCAAqB,CAAA;AACzB,CAAC,EAVW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAUxB;AAED,IAAY,iBAMX;AAND,WAAY,iBAAiB;IACzB,kDAA6B,CAAA;IAC7B;;OAEG;IACH,4DAAuC,CAAA;AAC3C,CAAC,EANW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAM5B;AAGD,IAAY,4BAMX;AAND,WAAY,4BAA4B;IACpC,yFAAS,CAAA;IACT,uFAAQ,CAAA;IACR,uHAAwB,CAAA;IACxB,mGAAc,CAAA;IACd,qFAAO,CAAA;AACX,CAAC,EANW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAMvC"}
@@ -1,6 +1,9 @@
1
1
  /**
2
2
  * Tidy Column Types
3
3
  */
4
+ import { TidyHistogramBucketType } from "./PublicTidyHistogram";
5
+ import { ITidyColumnAddValueInsert } from "./PublicTidyColumn";
6
+ import { MdxNodeIdentifier } from "./PublicTidyTable";
4
7
  export declare enum TidyColumnsType {
5
8
  /**
6
9
  * Values represent a color, e.g. 'red', 'rbg(10, 10, 10)' or '#fff'. Can be null.
@@ -8,12 +11,16 @@ export declare enum TidyColumnsType {
8
11
  COLOR = "color",
9
12
  LONGITUDE = "longitude",
10
13
  LATITUDE = "latitude",
14
+ /**
15
+ * ISO2 location (country, region, city...) codes
16
+ */
17
+ ISO2_LOCATION_CODE = "iso2Location",
11
18
  /**
12
19
  * date, time or combination of the two. Can be null.
13
20
  */
14
21
  DATETIME = "datetime",
15
22
  /**
16
- * numeric data, e.g. double, float, integer, etc. Can be null.
23
+ * numeric data, e.g., double, float, integer, etc. Can be null.
17
24
  */
18
25
  NUMERIC = "numeric",
19
26
  /**
@@ -21,72 +28,87 @@ export declare enum TidyColumnsType {
21
28
  */
22
29
  CHARACTER = "character",
23
30
  /**
24
- * Boolean data type, true, false.
25
- * Can be null.
31
+ * Boolean data type, true, false. Can be null.
26
32
  */
27
33
  LOGICAL = "logical",
28
34
  /**
29
35
  * array of values. Can be null.
30
36
  */
31
- VECTOR = "vector",
37
+ LIST = "list",
32
38
  /**
33
- * Column has values of multiple types.
39
+ * Column has values of multiple types
34
40
  */
35
41
  MIXED = "mixed",
36
42
  /**
37
- * The column type is not known. Note, empty columns are inferred to have type UNKNOWN.
43
+ * The column type is not known because there is no data
38
44
  */
39
45
  UNKNOWN = "unknown",
40
46
  /**
41
- * The column has null values only.
47
+ * The column has null values only
48
+ */
49
+ NULL = "null",
50
+ /**
51
+ * Use any to opt-out of type checking
42
52
  */
43
- NULL = "null"
53
+ ANY = "any"
54
+ }
55
+ export declare type TidyColumnsSubType = "YEAR" | "HALF_YEAR" | "QUARTER" | "MONTH" | "WEEK" | "DAY" | "DAY_MONTH" | "DAY_YEAR" | "HOUR" | "HALF_HOUR" | "QUARTER_HOUR" | "MINUTE" | "SECOND";
56
+ export declare enum ITidyColumnsSource {
57
+ QUERY = "query",
58
+ TRANSFORMATION = "transformation",
59
+ UNKNOWN = "unknown"
44
60
  }
45
61
  /**
46
62
  * Defines a mapping that maps columns to the coordinate system of the chart.
63
+ *
64
+ * The key represents the internal name for the mapping (is converted to lowercase).
65
+ * undefined --> the editor sets names to undefined upon removing of a mapping.
47
66
  */
48
- export declare type ChartTemplateDataMapping = {
49
- /**
50
- * The key represents the internal name for the mapping.
51
- * undefined --> the editor sets names to undefined upon removing of a mapping.
52
- */
53
- [key: string]: TidyTableMappingCoordinate | undefined;
54
- };
67
+ export declare type ChartTemplateDataMapping = Record<string, TidyTableColumnSelector | undefined>;
55
68
  /**
56
- * Returns true if the coordinate is a mapping coordinate. Returns false otherwise.
57
- * @param coordinate
69
+ * Defines an index from column tag (name, mapping, role, etc..) to the name or index of the column in the table.
70
+ * The column tag is converted to lower case.
58
71
  */
59
- export declare function isTidyTableMappingCoordinate(coordinate: any): coordinate is TidyTableMappingCoordinate;
60
- export interface TidyTableMappingCoordinate {
72
+ export declare type TidyColumnIndex = Record<string, string | number>;
73
+ export declare enum TidyTableMappingColumnSelectorOptions {
74
+ ALL = "@IC3_ALL",
75
+ ALL_NUMERIC = "@IC3_ALL_NUMERIC",
76
+ ALL_CHARACTER = "@IC3_ALL_CHARACTER",
77
+ ALL_MEASURES = "@IC3_ALL_MEASURES",
78
+ ALL_AXIS = "@IC3_ALL_AXIS"
79
+ }
80
+ export declare type TidyTableColumnSelector = {
61
81
  /**
62
- * Name of the column.
82
+ * Search column by name
63
83
  */
64
84
  name: string;
65
85
  /**
66
- * If we want a property, the name of the property for the column with name name.
86
+ * If we want a property, the name of the column's property.
67
87
  */
68
88
  property?: string;
69
- /**
70
- * If defined, search column using MDX axis information. Fallback on name.
71
- */
72
- axis?: AxisCoordinate;
73
- }
89
+ } | TidyTableMappingColumnSelectorOptions;
74
90
  /**
75
- * The coordinate of an mdx axis.
91
+ * Coordinate of an MDX member
76
92
  */
77
- export interface AxisCoordinate {
93
+ export interface MdxMemberCoordinates {
78
94
  /**
79
- * The index of the axis (on 0, on 1, on 2, etc..)
95
+ * index of the axis. ON 0, ON 1, etc..
80
96
  */
81
- index: number;
97
+ axisIdx: number;
82
98
  /**
83
- * If multiple hierarchies are on a single axis, the tuple indicates the index of the hierarchy. For example,
84
- * [Time].[Calendar].[Month]* [Product].[Product].[Article] ON 1
85
- * has index = 0, and Month on tuple = 0 and Article on tuple = 1.
86
- *
87
- * If an axis with multiple tuples is combined to a single column, then the tuple index equals 0.
99
+ * index of the tuple in the axis. E.g. (AF, 2009) in [AF, 2008, AF, 2009, AF, 2010] has index 1.
100
+ */
101
+ tupleIdx: number;
102
+ /**
103
+ * index of the member in the tuple. E.g. AF in (AF, 2009) has index 0 and 2009 has index 1.
88
104
  */
89
- tuple: number;
105
+ hierIdx: number;
106
+ }
107
+ declare type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
108
+ /**
109
+ * The coordinate of an MDX axis. If and only if the columns source is from ON 0, the hierIdx is defined.
110
+ */
111
+ export interface AxisCoordinate extends Optional<MdxMemberCoordinates, "tupleIdx"> {
90
112
  /**
91
113
  * Object keeping track of the transformation from the original axis to the current column.
92
114
  * If this object is undefined, then the column can not be constructed using a coordinate transformation of the axis.
@@ -106,12 +128,13 @@ export interface MdxRepetitionInfo {
106
128
  /**
107
129
  * identifier of a column value ( uniqueName if it´s an axis or idx if measure )
108
130
  */
109
- export declare type TidyColumnCoordinateUniqueName = string;
131
+ export declare type TidyColumnCoordinateUniqueName = MdxNodeIdentifier['uid'];
110
132
  export declare enum IAmcharts4DataKey {
111
133
  /**
112
- * If the axis is a date axis, this is the date time value.
134
+ * The value of the axis. The value is a date if the user mapped a date column and the row number string if the
135
+ * user mapped a character column. Use an adapter on the category axis to get the actual value of the label.
113
136
  */
114
- DATE = "date",
137
+ AXIS = "axis",
115
138
  /**
116
139
  * Tag for the rows in the result
117
140
  */
@@ -125,24 +148,27 @@ export declare enum IAmcharts4DataKey {
125
148
  * Objects that have this type are used in chart.data in amCharts.
126
149
  */
127
150
  export declare type IAmCharts4Data = Record<string, any>;
128
- export interface IAmCharts4DataTreeMap {
129
- name: string;
151
+ export interface IAmCharts4DataTreeMap extends IAmCharts4Data {
130
152
  children: IAmCharts4Data[];
131
153
  }
132
154
  export declare type ITidyRow = any[];
133
155
  export interface MdxInfo {
134
156
  uniqueName: string;
135
157
  key: string;
158
+ name: string;
159
+ caption: string;
160
+ isAll?: boolean;
136
161
  pun?: string;
137
- lcaption?: string;
138
- ld: number;
139
162
  cc?: number;
140
- caption: string;
141
- name: string;
163
+ levelCaption?: string;
142
164
  /**
143
- * Member index of the mdx-axis.
165
+ * Relative: starts at 0.
144
166
  */
145
- index: number;
167
+ levelDepthR: number;
168
+ /**
169
+ * Index on the MDX axis of the tuple the member belongs to.
170
+ */
171
+ tupleIndex: number;
146
172
  }
147
173
  export interface IMdxAxisSeriesInfo {
148
174
  hierarchyName?: string;
@@ -156,14 +182,17 @@ export interface IMdxAxisSeriesInfo {
156
182
  * The unique name of the default member of the dimension.
157
183
  */
158
184
  defaultMemberUN?: string;
185
+ defaultMemberName?: string;
186
+ defaultMemberCaption?: string;
187
+ defaultMemberKey?: string;
159
188
  }
160
189
  export interface EntityItem {
161
190
  uniqueName: string;
191
+ key?: string;
162
192
  name: string;
163
193
  caption: string;
164
- key: string;
165
- hierUN?: string;
166
194
  parentUN?: string;
195
+ hierUN?: string;
167
196
  selected?: boolean;
168
197
  empty?: boolean;
169
198
  tupleUNames?: string[];
@@ -225,24 +254,73 @@ export declare enum SelectionBehaviour {
225
254
  }
226
255
  export declare enum SortingType {
227
256
  ASCENDING = "ASCENDING",
228
- DESCENDING = "DESCENDING"
257
+ DESCENDING = "DESCENDING",
258
+ KEEP_ORDER = "KEEP_ORDER"
229
259
  }
230
- export interface HistogramData {
260
+ export interface HistogramBucket {
261
+ /**
262
+ * Bucket start range. Undefined = -Infinity.
263
+ */
264
+ from?: number;
231
265
  /**
232
- * Bucket start range.
266
+ * Bucket end range. Undefined = Infinity.
233
267
  */
234
- from: number;
268
+ to?: number;
235
269
  /**
236
- * Bucket end range.
270
+ * The name of the bucket
237
271
  */
238
- to: number;
272
+ name?: string;
273
+ }
274
+ export interface HistogramData extends HistogramBucket {
239
275
  /**
240
276
  * Number of values that fall in the range [from, to).
241
277
  */
242
278
  count: number;
279
+ /**
280
+ * Row indices where the value falls in the bucket
281
+ */
282
+ rows: number[];
283
+ }
284
+ export interface HistogramOptions {
285
+ /**
286
+ * The number of bins to use in the histogram or an object with custom bins. Default = 10.
287
+ *
288
+ * If bins is a number, then the algorithm generates the bins. The included endpoint of the bin is rounded with
289
+ * a precision of 1e10 in the direction that makes the bin larger.
290
+ */
291
+ bins: number | HistogramBucket[];
292
+ /**
293
+ * The type of interval. Default = RIGHT_CLOSED.
294
+ */
295
+ intervalType: TidyHistogramBucketType;
296
+ /**
297
+ * If true, put the minimum value in the first bucket if intervalType = (from, to] or put the maximum value
298
+ * in the last bucket if intervalType = [from, to).
299
+ * If false, exclude the minimum or maximum value in the above scenario.
300
+ * Default = true.
301
+ */
302
+ includeEndPoints: boolean;
243
303
  }
244
304
  export declare enum InterpolationType {
305
+ NONE = "none",
245
306
  RGB = "rgb",
307
+ HCL = "hcl",
246
308
  HSL = "hsl",
247
309
  LAB = "lab"
248
310
  }
311
+ export interface ConvertToTypeParseSettings {
312
+ locale?: string;
313
+ dateFormat?: string;
314
+ listSeparator?: string;
315
+ }
316
+ export interface ITotalRowValues {
317
+ /**
318
+ * Keys as column names.
319
+ */
320
+ totalValues: Record<string, ITidyColumnAddValueInsert>;
321
+ /**
322
+ * Keys as column names.
323
+ */
324
+ totalTexts: Record<string, ITidyColumnAddValueInsert>;
325
+ }
326
+ export {};
@@ -3,7 +3,7 @@
3
3
  * Tidy Column Types
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.InterpolationType = exports.SortingType = exports.SelectionBehaviour = exports.IAmcharts4DataKey = exports.isTidyTableMappingCoordinate = exports.TidyColumnsType = void 0;
6
+ exports.InterpolationType = exports.SortingType = exports.SelectionBehaviour = exports.IAmcharts4DataKey = exports.TidyTableMappingColumnSelectorOptions = exports.ITidyColumnsSource = exports.TidyColumnsType = void 0;
7
7
  var TidyColumnsType;
8
8
  (function (TidyColumnsType) {
9
9
  /**
@@ -12,12 +12,16 @@ var TidyColumnsType;
12
12
  TidyColumnsType["COLOR"] = "color";
13
13
  TidyColumnsType["LONGITUDE"] = "longitude";
14
14
  TidyColumnsType["LATITUDE"] = "latitude";
15
+ /**
16
+ * ISO2 location (country, region, city...) codes
17
+ */
18
+ TidyColumnsType["ISO2_LOCATION_CODE"] = "iso2Location";
15
19
  /**
16
20
  * date, time or combination of the two. Can be null.
17
21
  */
18
22
  TidyColumnsType["DATETIME"] = "datetime";
19
23
  /**
20
- * numeric data, e.g. double, float, integer, etc. Can be null.
24
+ * numeric data, e.g., double, float, integer, etc. Can be null.
21
25
  */
22
26
  TidyColumnsType["NUMERIC"] = "numeric";
23
27
  /**
@@ -25,41 +29,51 @@ var TidyColumnsType;
25
29
  */
26
30
  TidyColumnsType["CHARACTER"] = "character";
27
31
  /**
28
- * Boolean data type, true, false.
29
- * Can be null.
32
+ * Boolean data type, true, false. Can be null.
30
33
  */
31
34
  TidyColumnsType["LOGICAL"] = "logical";
32
35
  /**
33
36
  * array of values. Can be null.
34
37
  */
35
- TidyColumnsType["VECTOR"] = "vector";
38
+ TidyColumnsType["LIST"] = "list";
36
39
  /**
37
- * Column has values of multiple types.
40
+ * Column has values of multiple types
38
41
  */
39
42
  TidyColumnsType["MIXED"] = "mixed";
40
43
  /**
41
- * The column type is not known. Note, empty columns are inferred to have type UNKNOWN.
44
+ * The column type is not known because there is no data
42
45
  */
43
46
  TidyColumnsType["UNKNOWN"] = "unknown";
44
47
  /**
45
- * The column has null values only.
48
+ * The column has null values only
46
49
  */
47
50
  TidyColumnsType["NULL"] = "null";
51
+ /**
52
+ * Use any to opt-out of type checking
53
+ */
54
+ TidyColumnsType["ANY"] = "any";
48
55
  })(TidyColumnsType = exports.TidyColumnsType || (exports.TidyColumnsType = {}));
49
- /**
50
- * Returns true if the coordinate is a mapping coordinate. Returns false otherwise.
51
- * @param coordinate
52
- */
53
- function isTidyTableMappingCoordinate(coordinate) {
54
- return coordinate != null && coordinate.name != null;
55
- }
56
- exports.isTidyTableMappingCoordinate = isTidyTableMappingCoordinate;
56
+ var ITidyColumnsSource;
57
+ (function (ITidyColumnsSource) {
58
+ ITidyColumnsSource["QUERY"] = "query";
59
+ ITidyColumnsSource["TRANSFORMATION"] = "transformation";
60
+ ITidyColumnsSource["UNKNOWN"] = "unknown";
61
+ })(ITidyColumnsSource = exports.ITidyColumnsSource || (exports.ITidyColumnsSource = {}));
62
+ var TidyTableMappingColumnSelectorOptions;
63
+ (function (TidyTableMappingColumnSelectorOptions) {
64
+ TidyTableMappingColumnSelectorOptions["ALL"] = "@IC3_ALL";
65
+ TidyTableMappingColumnSelectorOptions["ALL_NUMERIC"] = "@IC3_ALL_NUMERIC";
66
+ TidyTableMappingColumnSelectorOptions["ALL_CHARACTER"] = "@IC3_ALL_CHARACTER";
67
+ TidyTableMappingColumnSelectorOptions["ALL_MEASURES"] = "@IC3_ALL_MEASURES";
68
+ TidyTableMappingColumnSelectorOptions["ALL_AXIS"] = "@IC3_ALL_AXIS";
69
+ })(TidyTableMappingColumnSelectorOptions = exports.TidyTableMappingColumnSelectorOptions || (exports.TidyTableMappingColumnSelectorOptions = {}));
57
70
  var IAmcharts4DataKey;
58
71
  (function (IAmcharts4DataKey) {
59
72
  /**
60
- * If the axis is a date axis, this is the date time value.
73
+ * The value of the axis. The value is a date if the user mapped a date column and the row number string if the
74
+ * user mapped a character column. Use an adapter on the category axis to get the actual value of the label.
61
75
  */
62
- IAmcharts4DataKey["DATE"] = "date";
76
+ IAmcharts4DataKey["AXIS"] = "axis";
63
77
  /**
64
78
  * Tag for the rows in the result
65
79
  */
@@ -100,10 +114,13 @@ var SortingType;
100
114
  (function (SortingType) {
101
115
  SortingType["ASCENDING"] = "ASCENDING";
102
116
  SortingType["DESCENDING"] = "DESCENDING";
117
+ SortingType["KEEP_ORDER"] = "KEEP_ORDER";
103
118
  })(SortingType = exports.SortingType || (exports.SortingType = {}));
104
119
  var InterpolationType;
105
120
  (function (InterpolationType) {
121
+ InterpolationType["NONE"] = "none";
106
122
  InterpolationType["RGB"] = "rgb";
123
+ InterpolationType["HCL"] = "hcl";
107
124
  InterpolationType["HSL"] = "hsl";
108
125
  InterpolationType["LAB"] = "lab";
109
126
  })(InterpolationType = exports.InterpolationType || (exports.InterpolationType = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"PublicTidyTableTypes.js","sourceRoot":"","sources":["../src/PublicTidyTableTypes.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,IAAY,eAkDX;AAlDD,WAAY,eAAe;IACvB;;OAEG;IACH,kCAAe,CAAA;IAEf,0CAAuB,CAAA;IACvB,wCAAqB,CAAA;IAErB;;OAEG;IACH,wCAAqB,CAAA;IAErB;;OAEG;IACH,sCAAmB,CAAA;IAEnB;;OAEG;IACH,0CAAuB,CAAA;IAEvB;;;OAGG;IACH,sCAAmB,CAAA;IAEnB;;OAEG;IACH,oCAAiB,CAAA;IAEjB;;OAEG;IACH,kCAAe,CAAA;IAEf;;OAEG;IACH,sCAAmB,CAAA;IAEnB;;OAEG;IACH,gCAAa,CAAA;AAEjB,CAAC,EAlDW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAkD1B;AAaD;;;GAGG;AACH,SAAgB,4BAA4B,CAAC,UAAe;IACxD,OAAO,UAAU,IAAI,IAAI,IAAI,UAAU,CAAC,IAAI,IAAI,IAAI,CAAC;AACzD,CAAC;AAFD,oEAEC;AA6DD,IAAY,iBAeX;AAfD,WAAY,iBAAiB;IACzB;;OAEG;IACH,kCAAa,CAAA;IAEb;;OAEG;IACH,gCAAW,CAAA;IAEX;;OAEG;IACH,+BAAU,CAAA;AACd,CAAC,EAfW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAe5B;AA+FD,IAAY,kBA8BX;AA9BD,WAAY,kBAAkB;IAC1B;;OAEG;IACH,iDAA2B,CAAA;IAE3B;;OAEG;IACH,+CAAyB,CAAA;IAEzB;;OAEG;IACH,iDAA2B,CAAA;IAE3B;;OAEG;IACH,iDAA2B,CAAA;IAE3B;;OAEG;IACH,6CAAuB,CAAA;IAEvB;;OAEG;IACH,yDAAmC,CAAA;AACvC,CAAC,EA9BW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QA8B7B;AAED,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,sCAAuB,CAAA;IACvB,wCAAyB,CAAA;AAC7B,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB;AAmBD,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IACzB,gCAAW,CAAA;IACX,gCAAW,CAAA;IACX,gCAAW,CAAA;AACf,CAAC,EAJW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAI5B"}
1
+ {"version":3,"file":"PublicTidyTableTypes.js","sourceRoot":"","sources":["../src/PublicTidyTableTypes.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAMH,IAAY,eA0DX;AA1DD,WAAY,eAAe;IACvB;;OAEG;IACH,kCAAe,CAAA;IAEf,0CAAuB,CAAA;IACvB,wCAAqB,CAAA;IAErB;;OAEG;IACH,sDAAmC,CAAA;IAEnC;;OAEG;IACH,wCAAqB,CAAA;IAErB;;OAEG;IACH,sCAAmB,CAAA;IAEnB;;OAEG;IACH,0CAAuB,CAAA;IAEvB;;OAEG;IACH,sCAAmB,CAAA;IAEnB;;OAEG;IACH,gCAAa,CAAA;IAEb;;OAEG;IACH,kCAAe,CAAA;IAEf;;OAEG;IACH,sCAAmB,CAAA;IAEnB;;OAEG;IACH,gCAAa,CAAA;IAEb;;OAEG;IACH,8BAAW,CAAA;AACf,CAAC,EA1DW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QA0D1B;AAkBD,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,qCAAe,CAAA;IACf,uDAAiC,CAAA;IACjC,yCAAmB,CAAA;AACvB,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B;AAgBD,IAAY,qCAQX;AARD,WAAY,qCAAqC;IAE7C,yDAAgB,CAAA;IAChB,yEAAgC,CAAA;IAChC,6EAAoC,CAAA;IACpC,2EAAkC,CAAA;IAClC,mEAA0B,CAAA;AAE9B,CAAC,EARW,qCAAqC,GAArC,6CAAqC,KAArC,6CAAqC,QAQhD;AAgED,IAAY,iBAgBX;AAhBD,WAAY,iBAAiB;IACzB;;;OAGG;IACH,kCAAa,CAAA;IAEb;;OAEG;IACH,gCAAW,CAAA;IAEX;;OAEG;IACH,+BAAU,CAAA;AACd,CAAC,EAhBW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAgB5B;AA6GD,IAAY,kBA8BX;AA9BD,WAAY,kBAAkB;IAC1B;;OAEG;IACH,iDAA2B,CAAA;IAE3B;;OAEG;IACH,+CAAyB,CAAA;IAEzB;;OAEG;IACH,iDAA2B,CAAA;IAE3B;;OAEG;IACH,iDAA2B,CAAA;IAE3B;;OAEG;IACH,6CAAuB,CAAA;IAEvB;;OAEG;IACH,yDAAmC,CAAA;AACvC,CAAC,EA9BW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QA8B7B;AAED,IAAY,WAIX;AAJD,WAAY,WAAW;IACnB,sCAAuB,CAAA;IACvB,wCAAyB,CAAA;IACzB,wCAAuB,CAAA;AAC3B,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB;AAsDD,IAAY,iBAMX;AAND,WAAY,iBAAiB;IACzB,kCAAa,CAAA;IACb,gCAAW,CAAA;IACX,gCAAW,CAAA;IACX,gCAAW,CAAA;IACX,gCAAW,CAAA;AACf,CAAC,EANW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAM5B"}
@@ -1,4 +1,4 @@
1
- import { ITidyColumn } from "./PublicTidyColumn";
1
+ import { ITidyBaseColumn, ITidyColumn } from "./PublicTidyColumn";
2
2
  /**
3
3
  * a tree node that with origin in a TidyColumn
4
4
  */
@@ -6,11 +6,11 @@ export interface TidyTreeNode {
6
6
  /**
7
7
  * the column the tree node was generated from
8
8
  */
9
- originColumn?: ITidyColumn;
9
+ originalColumn?: ITidyColumn;
10
10
  /**
11
- * the first index position that generated the column (some column are repetition of a same pattern)
11
+ * the rows that the node is created from
12
12
  */
13
- firstIdx: number;
13
+ rowIds: number[];
14
14
  /**
15
15
  * the label/value of this node
16
16
  */
@@ -19,58 +19,48 @@ export interface TidyTreeNode {
19
19
  * children of this tree
20
20
  */
21
21
  children: TidyTreeNode[];
22
- /**
23
- * the measures associated with a given node (by default just leaf nodes have values)
24
- */
25
- measures: any[];
26
22
  }
23
+ declare type ArrayReducer<T> = (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T;
27
24
  /**
28
- * A tree structure that was generated from a TidyTable with measures associated on each
29
- * node. It makes 'sense'
25
+ * A tree structure that was generated from a TidyTable.
30
26
  *
31
- * Bear in mind not all measures can be aggregated with a SUM
27
+ * Table:
28
+ * budget type | cc
29
+ * Monthly Budget | Savings
30
+ * Monthly Budget | Mortgage/Rent
31
+ * Yearly Budget | Car Payment
32
32
  *
33
- * root
33
+ * converts to <nodeLabel> <rowIds>:
34
+ * root [0,1,2]
34
35
  * |
35
- * --- Europe 3
36
+ * --- Monthly Budget [0,1]
36
37
  * | |
37
- * | --- Spain 1
38
+ * | --- Savings [0]
38
39
  * | |
39
- * | --- France 2
40
+ * | --- Mortgage/Rent [1]
40
41
  * |
41
- * --- America 4
42
+ * --- Yearly Budget [3]
42
43
  * |
43
- * --- US 4
44
+ * --- Car Payment [3]
44
45
  *
45
- * the values of the measures are added to the leafs
46
46
  */
47
47
  export declare class TidyTree {
48
- measures: ITidyColumn[];
49
48
  root: TidyTreeNode;
50
- constructor(measures: ITidyColumn[], root?: TidyTreeNode);
51
- /**
52
- * Performs the specified action on each node of the tree
53
- *
54
- * if callbackfn return false, it will not perform a foreach on it's children
55
- */
56
- foreach(callbackfn: (node: TidyTreeNode, levelDepth: number, parentNode: TidyTreeNode | undefined, nodeChildrenIdx: number) => boolean | void): void;
49
+ constructor(root?: TidyTreeNode);
57
50
  /**
58
51
  * A unique id for each node of the tree
59
52
  * returns levelDepth + "--" + node.nodeLabel
60
53
  */
61
- static uniqueId(node: TidyTreeNode, levelDepth: number): string;
54
+ static getUniqueId(node: TidyTreeNode, levelDepth: number): string;
62
55
  /**
63
- * aggregates all children measures values on parents using aggregation function recursively
64
- *
65
- * aggrfn is sum by default
56
+ * Performs the specified action on each node of the tree
57
+ * if callbackfn return false, it will not perform a foreach on it's children
66
58
  */
67
- aggregateOnParents(aggrfn?: (a: any | null, b: any | null) => any): void;
59
+ forEach(callbackfn: (node: TidyTreeNode, levelDepth: number, parentNode: TidyTreeNode, nodeChildrenIdx: number) => boolean | void): void;
68
60
  /**
69
- * Aggregates for all no root nodes on the uniqueId at measureIdx
70
- *
71
- * if the getter returns the leveldepth it will aggregate all nodes for the same level.
72
- * if the getter returns the nodelabel it will aggregate all nodes with the same label (you can add the level depth to ensure uniqueness).
73
- *
61
+ * aggregates all children measures values on parents using aggregation function recursively
62
+ * aggrfn is sum by default
74
63
  */
75
- aggregateOnId<ID_TYPE>(idGetter: (node: TidyTreeNode, levelDepth: number) => ID_TYPE, measureIdx?: number, aggrfn?: (a: any | null, b: any | null) => any): Map<ID_TYPE, any>;
64
+ getNodeValue<T>(node: TidyTreeNode, measure: ITidyBaseColumn<T>, aggrfn?: ArrayReducer<T>): T;
76
65
  }
66
+ export {};