@apia/query 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ListController.d.ts +130 -0
- package/dist/ListController.d.ts.map +1 -0
- package/dist/ListController.js +453 -0
- package/dist/ListController.js.map +1 -0
- package/dist/ListFunctionalityController.d.ts +13 -0
- package/dist/ListFunctionalityController.d.ts.map +1 -0
- package/dist/ListFunctionalityController.js +54 -0
- package/dist/ListFunctionalityController.js.map +1 -0
- package/dist/ModalListController.d.ts +14 -0
- package/dist/ModalListController.d.ts.map +1 -0
- package/dist/ModalListController.js +29 -0
- package/dist/ModalListController.js.map +1 -0
- package/dist/QueriesFunctionalityController.d.ts +262 -0
- package/dist/QueriesFunctionalityController.d.ts.map +1 -0
- package/dist/QueriesFunctionalityController.js +340 -0
- package/dist/QueriesFunctionalityController.js.map +1 -0
- package/dist/components/Pagination.d.ts +14 -0
- package/dist/components/Pagination.d.ts.map +1 -0
- package/dist/components/Pagination.js +65 -0
- package/dist/components/Pagination.js.map +1 -0
- package/dist/components/modals/ExportModal.js +146 -0
- package/dist/components/modals/ExportModal.js.map +1 -0
- package/dist/components/modals/FilterTypes.js +53 -0
- package/dist/components/modals/FilterTypes.js.map +1 -0
- package/dist/components/modals/controllers/ExportController.js +38 -0
- package/dist/components/modals/controllers/ExportController.js.map +1 -0
- package/dist/index.d.ts +8 -62
- package/dist/index.js +7 -240
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/getDateFromString.d.ts +4 -0
- package/dist/utils/getDateFromString.d.ts.map +1 -0
- package/dist/utils/getDateFromString.js +8 -0
- package/dist/utils/getDateFromString.js.map +1 -0
- package/dist/utils/getStringFromDate.d.ts +4 -0
- package/dist/utils/getStringFromDate.d.ts.map +1 -0
- package/dist/utils/getStringFromDate.js +8 -0
- package/dist/utils/getStringFromDate.js.map +1 -0
- package/package.json +10 -8
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Url } from '@apia/util';
|
|
2
|
+
import { ApiaApi } from '@apia/api2';
|
|
3
|
+
import { makeAutoObservable } from 'mobx';
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
+
var __publicField = (obj, key, value) => {
|
|
8
|
+
__defNormalProp(obj, key + "" , value);
|
|
9
|
+
return value;
|
|
10
|
+
};
|
|
11
|
+
class ListFunctionalityController {
|
|
12
|
+
constructor(env) {
|
|
13
|
+
this.env = env;
|
|
14
|
+
__publicField(this, "state", {
|
|
15
|
+
fncId: -1,
|
|
16
|
+
isFavorite: false,
|
|
17
|
+
isMaximized: false
|
|
18
|
+
});
|
|
19
|
+
makeAutoObservable(this);
|
|
20
|
+
this.initializeFavoriteAction();
|
|
21
|
+
}
|
|
22
|
+
async initializeFavoriteAction() {
|
|
23
|
+
const id = new Url(window.location.href).getParameter("favFncId") || new Url(
|
|
24
|
+
window.frameElement?.attributes.getNamedItem("src")?.value || ""
|
|
25
|
+
).getParameter("favFncId");
|
|
26
|
+
this.state.fncId = id || id == 0 ? Number.parseInt(String(id)) : 0;
|
|
27
|
+
if (this.state.fncId !== null) {
|
|
28
|
+
const res = await ApiaApi.post(
|
|
29
|
+
{ ...this.env.context },
|
|
30
|
+
{
|
|
31
|
+
action: "loadFavoriteState",
|
|
32
|
+
favFncId: this.state.fncId
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
if (res?.data) {
|
|
36
|
+
this.state.isFavorite = res.data.isFavorite;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
async toggleFavoriteFunctionality() {
|
|
41
|
+
if (this.state.fncId !== null) {
|
|
42
|
+
const res = await ApiaApi.post(
|
|
43
|
+
{ ...this.env.context },
|
|
44
|
+
{ action: "toggleFavorite", favFncId: this.state.fncId }
|
|
45
|
+
);
|
|
46
|
+
if (res?.data) {
|
|
47
|
+
this.state.isFavorite = res.data.isFavorite;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { ListFunctionalityController };
|
|
54
|
+
//# sourceMappingURL=ListFunctionalityController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListFunctionalityController.js","sources":["../src/ListFunctionalityController.ts"],"sourcesContent":["import { Url } from '@apia/util';\r\nimport { ListFunctionalityState } from './ListController';\r\nimport { ApiaApi } from '@apia/api2';\r\nimport { TQueryEnvironment } from './types';\r\nimport { makeAutoObservable } from 'mobx';\r\n\r\nexport class ListFunctionalityController {\r\n public readonly state: ListFunctionalityState = {\r\n fncId: -1,\r\n isFavorite: false,\r\n isMaximized: false,\r\n };\r\n\r\n constructor(protected env: TQueryEnvironment) {\r\n makeAutoObservable(this);\r\n\r\n this.initializeFavoriteAction();\r\n }\r\n\r\n protected async initializeFavoriteAction() {\r\n const id =\r\n new Url(window.location.href).getParameter('favFncId') ||\r\n new Url(\r\n window.frameElement?.attributes.getNamedItem('src')?.value || '',\r\n ).getParameter('favFncId');\r\n\r\n this.state.fncId = id || (id as any) == 0 ? Number.parseInt(String(id)) : 0;\r\n //id || (id as any) == 0 ? Number.parseInt(String(id)) : null;\r\n\r\n if (this.state.fncId !== null) {\r\n const res = await ApiaApi.post<{\r\n isFavorite: boolean;\r\n }>(\r\n { ...this.env.context },\r\n {\r\n action: 'loadFavoriteState',\r\n favFncId: this.state.fncId,\r\n },\r\n );\r\n\r\n if (res?.data) {\r\n this.state.isFavorite = res.data.isFavorite;\r\n }\r\n }\r\n }\r\n\r\n public async toggleFavoriteFunctionality() {\r\n if (this.state.fncId !== null) {\r\n const res = await ApiaApi.post<{\r\n isFavorite: boolean;\r\n }>(\r\n { ...this.env.context },\r\n { action: 'toggleFavorite', favFncId: this.state.fncId },\r\n );\r\n\r\n if (res?.data) {\r\n this.state.isFavorite = res.data.isFavorite;\r\n }\r\n }\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;;;;AAMO,MAAM,2BAAA,CAA4B;AAAA,EAOvC,YAAsB,GAAA,EAAwB;AAAxB,IAAA,IAAA,CAAA,GAAA,GAAA,GAAA;AANtB,IAAA,aAAA,CAAA,IAAA,EAAgB,OAAA,EAAgC;AAAA,MAC9C,KAAA,EAAO,EAAA;AAAA,MACP,UAAA,EAAY,KAAA;AAAA,MACZ,WAAA,EAAa;AAAA,KACf,CAAA;AAGE,IAAA,kBAAA,CAAmB,IAAI,CAAA;AAEvB,IAAA,IAAA,CAAK,wBAAA,EAAyB;AAAA;AAChC,EAEA,MAAgB,wBAAA,GAA2B;AACzC,IAAA,MAAM,EAAA,GACJ,IAAI,GAAA,CAAI,MAAA,CAAO,QAAA,CAAS,IAAI,CAAA,CAAE,YAAA,CAAa,UAAU,CAAA,IACrD,IAAI,GAAA;AAAA,MACF,OAAO,YAAA,EAAc,UAAA,CAAW,YAAA,CAAa,KAAK,GAAG,KAAA,IAAS;AAAA,KAChE,CAAE,aAAa,UAAU,CAAA;AAE3B,IAAA,IAAA,CAAK,KAAA,CAAM,KAAA,GAAQ,EAAA,IAAO,EAAA,IAAc,CAAA,GAAI,OAAO,QAAA,CAAS,MAAA,CAAO,EAAE,CAAC,CAAA,GAAI,CAAA;AAG1E,IAAA,IAAI,IAAA,CAAK,KAAA,CAAM,KAAA,KAAU,IAAA,EAAM;AAC7B,MAAA,MAAM,GAAA,GAAM,MAAM,OAAA,CAAQ,IAAA;AAAA,QAGxB,EAAE,GAAG,IAAA,CAAK,GAAA,CAAI,OAAA,EAAQ;AAAA,QACtB;AAAA,UACE,MAAA,EAAQ,mBAAA;AAAA,UACR,QAAA,EAAU,KAAK,KAAA,CAAM;AAAA;AACvB,OACF;AAEA,MAAA,IAAI,KAAK,IAAA,EAAM;AACb,QAAA,IAAA,CAAK,KAAA,CAAM,UAAA,GAAa,GAAA,CAAI,IAAA,CAAK,UAAA;AAAA;AACnC;AACF;AACF,EAEA,MAAa,2BAAA,GAA8B;AACzC,IAAA,IAAI,IAAA,CAAK,KAAA,CAAM,KAAA,KAAU,IAAA,EAAM;AAC7B,MAAA,MAAM,GAAA,GAAM,MAAM,OAAA,CAAQ,IAAA;AAAA,QAGxB,EAAE,GAAG,IAAA,CAAK,GAAA,CAAI,OAAA,EAAQ;AAAA,QACtB,EAAE,MAAA,EAAQ,gBAAA,EAAkB,QAAA,EAAU,IAAA,CAAK,MAAM,KAAA;AAAM,OACzD;AAEA,MAAA,IAAI,KAAK,IAAA,EAAM;AACb,QAAA,IAAA,CAAK,KAAA,CAAM,UAAA,GAAa,GAAA,CAAI,IAAA,CAAK,UAAA;AAAA;AACnC;AACF;AAEJ;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ListController, TListControllerConfiguration } from './ListController.js';
|
|
2
|
+
import { TQueryEnvironment } from './types.js';
|
|
3
|
+
|
|
4
|
+
declare class ModalListController extends ListController {
|
|
5
|
+
private tabId;
|
|
6
|
+
constructor(env: TQueryEnvironment, configuration: TListControllerConfiguration);
|
|
7
|
+
protected getPageMethodParameters(defaultParams: Record<string, unknown>): Record<string, unknown>;
|
|
8
|
+
protected getRefreshMethodParameters(defaultParams: Record<string, unknown>): Record<string, unknown>;
|
|
9
|
+
protected initializeFavoriteAction(): Promise<void>;
|
|
10
|
+
toggleFavoriteFunctionality(): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { ModalListController };
|
|
14
|
+
//# sourceMappingURL=ModalListController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalListController.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ListController } from './ListController.js';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5
|
+
var __publicField = (obj, key, value) => {
|
|
6
|
+
__defNormalProp(obj, key + "" , value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
class ModalListController extends ListController {
|
|
10
|
+
constructor(env, configuration) {
|
|
11
|
+
super(env, configuration);
|
|
12
|
+
__publicField(this, "tabId", Date.now());
|
|
13
|
+
}
|
|
14
|
+
getPageMethodParameters(defaultParams) {
|
|
15
|
+
return { ...defaultParams, tabId: this.tabId };
|
|
16
|
+
}
|
|
17
|
+
getRefreshMethodParameters(defaultParams) {
|
|
18
|
+
return { ...defaultParams, tabId: this.tabId };
|
|
19
|
+
}
|
|
20
|
+
initializeFavoriteAction() {
|
|
21
|
+
return Promise.resolve();
|
|
22
|
+
}
|
|
23
|
+
toggleFavoriteFunctionality() {
|
|
24
|
+
return Promise.resolve();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { ModalListController };
|
|
29
|
+
//# sourceMappingURL=ModalListController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalListController.js","sources":["../src/ModalListController.ts"],"sourcesContent":["import { ListController, TListControllerConfiguration } from './ListController';\r\nimport { TQueryEnvironment } from './types';\r\n\r\nexport class ModalListController extends ListController {\r\n private tabId = Date.now();\r\n\r\n public constructor(\r\n env: TQueryEnvironment,\r\n configuration: TListControllerConfiguration,\r\n ) {\r\n super(env, configuration);\r\n }\r\n\r\n protected getPageMethodParameters(\r\n defaultParams: Record<string, unknown>,\r\n ): Record<string, unknown> {\r\n return { ...defaultParams, tabId: this.tabId };\r\n }\r\n\r\n protected getRefreshMethodParameters(\r\n defaultParams: Record<string, unknown>,\r\n ): Record<string, unknown> {\r\n return { ...defaultParams, tabId: this.tabId };\r\n }\r\n\r\n protected initializeFavoriteAction(): Promise<void> {\r\n return Promise.resolve();\r\n }\r\n\r\n public toggleFavoriteFunctionality(): Promise<void> {\r\n return Promise.resolve();\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;;;;AAGO,MAAM,4BAA4B,cAAA,CAAe;AAAA,EAG/C,WAAA,CACL,KACA,aAAA,EACA;AACA,IAAA,KAAA,CAAM,KAAK,aAAa,CAAA;AAN1B,IAAA,aAAA,CAAA,IAAA,EAAQ,OAAA,EAAQ,KAAK,GAAA,EAAI,CAAA;AAAA;AAOzB,EAEU,wBACR,aAAA,EACyB;AACzB,IAAA,OAAO,EAAE,GAAG,aAAA,EAAe,KAAA,EAAO,KAAK,KAAA,EAAM;AAAA;AAC/C,EAEU,2BACR,aAAA,EACyB;AACzB,IAAA,OAAO,EAAE,GAAG,aAAA,EAAe,KAAA,EAAO,KAAK,KAAA,EAAM;AAAA;AAC/C,EAEU,wBAAA,GAA0C;AAClD,IAAA,OAAO,QAAQ,OAAA,EAAQ;AAAA;AACzB,EAEO,2BAAA,GAA6C;AAClD,IAAA,OAAO,QAAQ,OAAA,EAAQ;AAAA;AAE3B;;;;"}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { ListFunctionalityController } from './ListFunctionalityController.js';
|
|
2
|
+
import { TApiaChartColumn, TPivotTableData, ColumnSort, Pivot, TQuerySort, PivotTableUIProps } from '@apia/charts';
|
|
3
|
+
import { TQueryEnvironment } from './types.js';
|
|
4
|
+
import { EventEmitter } from '@apia/util';
|
|
5
|
+
import { TTab, TabsController, TabsControllerProps } from '@apia/components';
|
|
6
|
+
|
|
7
|
+
type PivotTableConfig = {
|
|
8
|
+
renderer: string;
|
|
9
|
+
columnSort: string;
|
|
10
|
+
aggregator: string;
|
|
11
|
+
mainPivot: boolean;
|
|
12
|
+
description: string;
|
|
13
|
+
title: string;
|
|
14
|
+
rowSort: string;
|
|
15
|
+
columns: {
|
|
16
|
+
column: {
|
|
17
|
+
showAs: 'row' | 'column' | 'none';
|
|
18
|
+
title: string;
|
|
19
|
+
AggColumnOrder?: number;
|
|
20
|
+
isAnAggColumn: boolean;
|
|
21
|
+
}[];
|
|
22
|
+
};
|
|
23
|
+
rows: {
|
|
24
|
+
row: {
|
|
25
|
+
cell: (string | number | {
|
|
26
|
+
content: string;
|
|
27
|
+
isHTML: boolean;
|
|
28
|
+
})[];
|
|
29
|
+
} | {
|
|
30
|
+
cell: (string | number | {
|
|
31
|
+
content: string;
|
|
32
|
+
isHTML: boolean;
|
|
33
|
+
})[];
|
|
34
|
+
}[];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
type Renderer = 'Table' | 'Table Heatmap' | 'Table Col Heatmap' | 'Table Row Heatmap' | 'Exportable TSV' | 'Grouped Column Chart' | 'Stacked Column Chart' | 'Grouped Bar Chart' | 'Stacked Bar Chart' | 'Line Chart' | 'Dot Chart' | 'Area Chart' | 'Scatter Chart' | 'Multiple Pie Chart';
|
|
38
|
+
type Aggregator = 'Count' | 'Count Unique Values' | 'List Unique Values' | 'Sum' | 'Integer Sum' | 'Average' | 'Median' | 'Sample Variance' | 'Sample Standard Deviation' | 'Minimum' | 'Maximum' | 'First' | 'Last' | 'Sum over Sum' | 'Sum as Fraction of Total' | 'Sum as Fraction of Rows' | 'Sum as Fraction of Columns' | 'Count as Fraction of Total' | 'Count as Fraction of Rows' | 'Count as Fraction of Columns';
|
|
39
|
+
type TChartData = {
|
|
40
|
+
title: string;
|
|
41
|
+
type: 'bar' | 'line' | 'scatter' | 'bubble' | 'pie' | 'doughnut' | 'polarArea' | 'radar' | 'waterfall';
|
|
42
|
+
datasets: {
|
|
43
|
+
backgroundColor: string | string[];
|
|
44
|
+
borderColor: string | string[];
|
|
45
|
+
borderWidth: number;
|
|
46
|
+
label: string;
|
|
47
|
+
data: number[] | [number, number][];
|
|
48
|
+
}[];
|
|
49
|
+
indexAxis: 'x' | 'y';
|
|
50
|
+
labels: string[];
|
|
51
|
+
showValues: string;
|
|
52
|
+
showLegend: string;
|
|
53
|
+
showXAxisValues: string | undefined;
|
|
54
|
+
showYAxisValues: string | undefined;
|
|
55
|
+
showTable: string | undefined;
|
|
56
|
+
xAxisTitle: string;
|
|
57
|
+
yAxisTitle: string;
|
|
58
|
+
};
|
|
59
|
+
type TApiaChartDefinition = {
|
|
60
|
+
chartType?: 'barH3D' | 'barV3D' | 'barH2D' | 'barV2D' | 'linear' | 'waterfall' | 'pie2D' | 'pie3D';
|
|
61
|
+
aspectRatio?: number;
|
|
62
|
+
axisXTitle?: string;
|
|
63
|
+
axisYTitle?: string;
|
|
64
|
+
hideSelector?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The colors of the waterfall chart are defined by the bars with positive
|
|
67
|
+
* values and the bars with negative values. So in order to mantain cohesion
|
|
68
|
+
* in the color schema of the chart, this prop establishes the required colors
|
|
69
|
+
* for the chart
|
|
70
|
+
*/
|
|
71
|
+
waterfallColors?: {
|
|
72
|
+
positive: string;
|
|
73
|
+
negative: string;
|
|
74
|
+
total: string;
|
|
75
|
+
stepConnector: string;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Name of the schema of colors shown in the chart. Pie charts must always include a schema
|
|
79
|
+
*/
|
|
80
|
+
colorSchema?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Main data to be parsed and shown in the chart.
|
|
83
|
+
* Depending on the ```chartType``` and the amount of ```column``` objects,
|
|
84
|
+
* the data can be considered differently.
|
|
85
|
+
*
|
|
86
|
+
* Examples:
|
|
87
|
+
* ```
|
|
88
|
+
* const columnsWithSingleColumnObject = columns: {
|
|
89
|
+
* column: {
|
|
90
|
+
* color: 'red',
|
|
91
|
+
* coordinate: [
|
|
92
|
+
* { xValue: '1', yValue: '1' },
|
|
93
|
+
* ...,
|
|
94
|
+
* ],
|
|
95
|
+
* name: 'col1',
|
|
96
|
+
* }
|
|
97
|
+
* };
|
|
98
|
+
* ```
|
|
99
|
+
* ```
|
|
100
|
+
* const columnsWithMultipleColumnObject = columns: {
|
|
101
|
+
* column: [
|
|
102
|
+
* {
|
|
103
|
+
* color: 'red',
|
|
104
|
+
* coordinate: [
|
|
105
|
+
* { xValue: '1', yValue: '1' },
|
|
106
|
+
* ...,
|
|
107
|
+
* ],
|
|
108
|
+
* name: 'col1',
|
|
109
|
+
* },
|
|
110
|
+
* ...,
|
|
111
|
+
* ]
|
|
112
|
+
* };
|
|
113
|
+
*```
|
|
114
|
+
*
|
|
115
|
+
*
|
|
116
|
+
* ***Horizontal and Vertical bars***:
|
|
117
|
+
*
|
|
118
|
+
* ```1 column object```:
|
|
119
|
+
*
|
|
120
|
+
* Each ```coordinate``` is considered an individual separate 'column bar',
|
|
121
|
+
* and the ```colorSchema``` is separated between each ```coordinate``` made
|
|
122
|
+
* 'column bar'.
|
|
123
|
+
*
|
|
124
|
+
*
|
|
125
|
+
* ```Multiple column objects```:
|
|
126
|
+
*
|
|
127
|
+
* Each ```column``` object should have the same amount of coordinates and
|
|
128
|
+
* the coordinates in the same index of the array should have the same
|
|
129
|
+
* ```xValue```
|
|
130
|
+
*
|
|
131
|
+
* Each ```coordinate``` is considered an individual separate 'column bar',
|
|
132
|
+
* but the coordinates of each column are re-accommodated based on their
|
|
133
|
+
* ```xValue``` in order to make groups of columns with the same value on the
|
|
134
|
+
* X axis.
|
|
135
|
+
*
|
|
136
|
+
* In this case there will be 6 groups of columns (based on the length of the
|
|
137
|
+
* coordinate array), each group containing 3 'column bars' (based on the
|
|
138
|
+
* amount of column objects) and the ```colorSchema``` will be distributed
|
|
139
|
+
* inside each group, meaning each column having one single color.
|
|
140
|
+
*
|
|
141
|
+
*
|
|
142
|
+
* ***Linear***:
|
|
143
|
+
*
|
|
144
|
+
* ```N column objects```:
|
|
145
|
+
|
|
146
|
+
*
|
|
147
|
+
* Each ```column``` object is considered a line path, the coordinates being
|
|
148
|
+
* the nodes of said line.
|
|
149
|
+
*
|
|
150
|
+
* ***Pie charts***:
|
|
151
|
+
*
|
|
152
|
+
* ```N column objects```:
|
|
153
|
+
*
|
|
154
|
+
* Each ```column``` object is considered a unique Pie chart, the coordinates
|
|
155
|
+
* being the slices of said pie.
|
|
156
|
+
*
|
|
157
|
+
* ***Waterfall***:
|
|
158
|
+
*
|
|
159
|
+
* ```N column objects```:
|
|
160
|
+
*
|
|
161
|
+
* Each ```column``` object is considered a unique Waterfall chart, the coordinates
|
|
162
|
+
* being bars with the ```yValue``` determining if it goes up or down. Only this
|
|
163
|
+
* type of chart admits negative values on its coordinates.
|
|
164
|
+
*
|
|
165
|
+
*/
|
|
166
|
+
dataSets: {
|
|
167
|
+
data: TApiaChartColumn | TApiaChartColumn[];
|
|
168
|
+
};
|
|
169
|
+
margin?: {
|
|
170
|
+
top: number;
|
|
171
|
+
left: number;
|
|
172
|
+
bottom: number;
|
|
173
|
+
right: number;
|
|
174
|
+
} | number;
|
|
175
|
+
pnl_id?: string;
|
|
176
|
+
showAxisXTitle?: boolean;
|
|
177
|
+
showAxisYTitle?: boolean;
|
|
178
|
+
showGrid?: boolean;
|
|
179
|
+
showLegend?: boolean;
|
|
180
|
+
showValues?: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* Specific for waterfall charts to show the total sum of the values of the
|
|
183
|
+
* chart at the end while each column shows its value. Otherwise the values
|
|
184
|
+
* shown on each bar will represent the current sum of values
|
|
185
|
+
*/
|
|
186
|
+
showTotal?: boolean;
|
|
187
|
+
title: string;
|
|
188
|
+
ratio: {
|
|
189
|
+
height: number;
|
|
190
|
+
width: number;
|
|
191
|
+
maxWidth: number;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
declare class AsideTabs extends TabsController {
|
|
195
|
+
id: string;
|
|
196
|
+
props: Omit<TabsControllerProps<TTab>, 'id' | 'initialState'>;
|
|
197
|
+
protected onTabChange: (newTab: string) => unknown;
|
|
198
|
+
constructor(id: string, props: Omit<TabsControllerProps<TTab>, 'id' | 'initialState'>, onTabChange: (newTab: string) => unknown);
|
|
199
|
+
openTab(tabId: string, _closeOthers?: boolean): void;
|
|
200
|
+
}
|
|
201
|
+
declare class QueriesFunctionalityController extends ListFunctionalityController {
|
|
202
|
+
protected env: TQueryEnvironment;
|
|
203
|
+
tabs?: TTab[] | undefined;
|
|
204
|
+
asideTabsController: AsideTabs;
|
|
205
|
+
queryState: {
|
|
206
|
+
currentChart?: (TChartData & {
|
|
207
|
+
chartId: string | number;
|
|
208
|
+
}) | (TChartData[] & {
|
|
209
|
+
chartId: string | number;
|
|
210
|
+
});
|
|
211
|
+
currentPivot?: TPivotTableData & {
|
|
212
|
+
pivotId: string;
|
|
213
|
+
};
|
|
214
|
+
defaultChart?: string;
|
|
215
|
+
defaultPivot?: string;
|
|
216
|
+
isLoading: boolean;
|
|
217
|
+
};
|
|
218
|
+
protected emitter: EventEmitter<{
|
|
219
|
+
changeTab: string;
|
|
220
|
+
}>;
|
|
221
|
+
constructor(env: TQueryEnvironment, tabs?: TTab[] | undefined);
|
|
222
|
+
loadChart(chartId: string): Promise<TChartData>;
|
|
223
|
+
loadMainChart(): Promise<void>;
|
|
224
|
+
private static convertChartDefinitionToChartData;
|
|
225
|
+
loadPivot(props: {
|
|
226
|
+
pivotId: string;
|
|
227
|
+
offline: boolean;
|
|
228
|
+
rowId?: string;
|
|
229
|
+
}): Promise<false | {
|
|
230
|
+
load: {
|
|
231
|
+
pivots: {
|
|
232
|
+
title: string;
|
|
233
|
+
description: string;
|
|
234
|
+
mainPivot: boolean;
|
|
235
|
+
columnSort: ColumnSort;
|
|
236
|
+
rowSort: ColumnSort;
|
|
237
|
+
renderer: Renderer;
|
|
238
|
+
aggregator: Aggregator;
|
|
239
|
+
columns: {
|
|
240
|
+
title: string;
|
|
241
|
+
showAs: "none" | "column" | "row";
|
|
242
|
+
AggColumnOrder: number | undefined;
|
|
243
|
+
isAnAggColumn: boolean;
|
|
244
|
+
}[];
|
|
245
|
+
rows: {
|
|
246
|
+
cell: string[];
|
|
247
|
+
}[];
|
|
248
|
+
}[];
|
|
249
|
+
};
|
|
250
|
+
}>;
|
|
251
|
+
loadMainPivot(): Promise<void>;
|
|
252
|
+
private static stripHtml;
|
|
253
|
+
handleCloseChart(): void;
|
|
254
|
+
handleClosePivot(): void;
|
|
255
|
+
openAndReadFile(pivot: Pivot, accept?: string): void;
|
|
256
|
+
convertColumnSortToTQuerySort(sort: ColumnSort): TQuerySort;
|
|
257
|
+
parsePivotProps(pivot: Pivot): Omit<PivotTableUIProps, "onChange">;
|
|
258
|
+
pivotRefresh(): Promise<void>;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export { type PivotTableConfig, QueriesFunctionalityController, type TApiaChartDefinition, type TChartData };
|
|
262
|
+
//# sourceMappingURL=QueriesFunctionalityController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueriesFunctionalityController.d.ts","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|