@allurereport/charts-api 3.0.0-beta.23 → 3.0.0-beta.24
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/constants.d.ts +2 -9
- package/dist/constants.js +24 -23
- package/dist/types.d.ts +12 -11
- package/dist/types.js +1 -1
- package/package.json +3 -3
package/dist/constants.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
+
import { type ChartOptions } from "./types.js";
|
|
1
2
|
export declare const DEFAULT_CHART_HISTORY_LIMIT = 10;
|
|
2
|
-
export declare const defaultChartsConfig:
|
|
3
|
-
type: string;
|
|
4
|
-
title: string;
|
|
5
|
-
dataType?: undefined;
|
|
6
|
-
} | {
|
|
7
|
-
type: string;
|
|
8
|
-
dataType: string;
|
|
9
|
-
title: string;
|
|
10
|
-
})[];
|
|
3
|
+
export declare const defaultChartsConfig: ChartOptions[];
|
package/dist/constants.js
CHANGED
|
@@ -1,66 +1,67 @@
|
|
|
1
|
+
import { BarChartType, ChartDataType, ChartType, FunnelChartType, TreeMapChartType, } from "./types.js";
|
|
1
2
|
export const DEFAULT_CHART_HISTORY_LIMIT = 10;
|
|
2
3
|
export const defaultChartsConfig = [
|
|
3
4
|
{
|
|
4
|
-
type:
|
|
5
|
+
type: ChartType.CurrentStatus,
|
|
5
6
|
title: "Current status",
|
|
6
7
|
},
|
|
7
8
|
{
|
|
8
|
-
type:
|
|
9
|
-
dataType:
|
|
9
|
+
type: ChartType.Trend,
|
|
10
|
+
dataType: ChartDataType.Status,
|
|
10
11
|
title: "Status dynamics",
|
|
11
12
|
},
|
|
12
13
|
{
|
|
13
|
-
type:
|
|
14
|
-
dataType:
|
|
14
|
+
type: ChartType.Bar,
|
|
15
|
+
dataType: BarChartType.StatusBySeverity,
|
|
15
16
|
title: "Test result severities",
|
|
16
17
|
},
|
|
17
18
|
{
|
|
18
|
-
type:
|
|
19
|
-
dataType:
|
|
19
|
+
type: ChartType.Bar,
|
|
20
|
+
dataType: BarChartType.StatusTrend,
|
|
20
21
|
title: "Status change dynamics",
|
|
21
22
|
},
|
|
22
23
|
{
|
|
23
|
-
type:
|
|
24
|
-
dataType:
|
|
24
|
+
type: ChartType.Bar,
|
|
25
|
+
dataType: BarChartType.StatusChangeTrend,
|
|
25
26
|
title: "Test base growth dynamics",
|
|
26
27
|
},
|
|
27
28
|
{
|
|
28
|
-
type:
|
|
29
|
-
dataType:
|
|
29
|
+
type: ChartType.TreeMap,
|
|
30
|
+
dataType: TreeMapChartType.CoverageDiff,
|
|
30
31
|
title: "Coverage diff map",
|
|
31
32
|
},
|
|
32
33
|
{
|
|
33
|
-
type:
|
|
34
|
-
dataType:
|
|
34
|
+
type: ChartType.TreeMap,
|
|
35
|
+
dataType: TreeMapChartType.SuccessRateDistribution,
|
|
35
36
|
title: "Success rate distribution",
|
|
36
37
|
},
|
|
37
38
|
{
|
|
38
|
-
type:
|
|
39
|
+
type: ChartType.HeatMap,
|
|
39
40
|
title: "Problems distribution by environment",
|
|
40
41
|
},
|
|
41
42
|
{
|
|
42
|
-
type:
|
|
43
|
-
dataType:
|
|
43
|
+
type: ChartType.Bar,
|
|
44
|
+
dataType: BarChartType.StabilityRateDistribution,
|
|
44
45
|
title: "Stability rate distribution",
|
|
45
46
|
},
|
|
46
47
|
{
|
|
47
|
-
type:
|
|
48
|
-
dataType:
|
|
48
|
+
type: ChartType.Bar,
|
|
49
|
+
dataType: BarChartType.DurationsByLayer,
|
|
49
50
|
title: "Durations by layer histogram",
|
|
50
51
|
},
|
|
51
52
|
{
|
|
52
|
-
type:
|
|
53
|
+
type: ChartType.Bar,
|
|
53
54
|
dataType: "performanceTrend",
|
|
54
55
|
title: "Performance dynamics",
|
|
55
56
|
},
|
|
56
57
|
{
|
|
57
|
-
type:
|
|
58
|
-
dataType:
|
|
58
|
+
type: ChartType.Bar,
|
|
59
|
+
dataType: BarChartType.FbsuAgePyramid,
|
|
59
60
|
title: "FBSU age pyramid",
|
|
60
61
|
},
|
|
61
62
|
{
|
|
62
|
-
type:
|
|
63
|
-
dataType:
|
|
63
|
+
type: ChartType.Funnel,
|
|
64
|
+
dataType: FunnelChartType.TestingPyramid,
|
|
64
65
|
title: "Testing pyramid",
|
|
65
66
|
},
|
|
66
67
|
];
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HistoryDataPoint, SeverityLevel, Statistic, TestResult, TestStatus } from "@allurereport/core-api";
|
|
2
2
|
export declare enum ChartType {
|
|
3
3
|
Trend = "trend",
|
|
4
|
-
|
|
4
|
+
CurrentStatus = "currentStatus",
|
|
5
5
|
TreeMap = "treemap",
|
|
6
6
|
HeatMap = "heatmap",
|
|
7
7
|
Bar = "bar",
|
|
@@ -148,12 +148,6 @@ export interface HeatMapChartData<T extends Record<string, any> = {}> {
|
|
|
148
148
|
title?: string;
|
|
149
149
|
data: HeatMapSerie<T>[];
|
|
150
150
|
}
|
|
151
|
-
export interface PieChartData {
|
|
152
|
-
type: ChartType.Pie;
|
|
153
|
-
title?: string;
|
|
154
|
-
slices: PieSlice[];
|
|
155
|
-
percentage: number;
|
|
156
|
-
}
|
|
157
151
|
export interface ComingSoonChartData {
|
|
158
152
|
type: ChartType.ComingSoon;
|
|
159
153
|
title?: string;
|
|
@@ -164,7 +158,12 @@ export interface FunnelChartData {
|
|
|
164
158
|
title?: string;
|
|
165
159
|
data: Record<string, number | string>[];
|
|
166
160
|
}
|
|
167
|
-
export
|
|
161
|
+
export interface CurrentStatusChartData {
|
|
162
|
+
type: ChartType.CurrentStatus;
|
|
163
|
+
title?: string;
|
|
164
|
+
data: Statistic;
|
|
165
|
+
}
|
|
166
|
+
export type GeneratedChartData = TrendChartData | BarChartData | CurrentStatusChartData | ComingSoonChartData | TreeMapChartData | HeatMapChartData | FunnelChartData;
|
|
168
167
|
export type GeneratedChartsData = Record<ChartId, GeneratedChartData>;
|
|
169
168
|
export type TrendChartOptions = {
|
|
170
169
|
type: ChartType.Trend;
|
|
@@ -174,9 +173,11 @@ export type TrendChartOptions = {
|
|
|
174
173
|
limit?: number;
|
|
175
174
|
metadata?: TrendMetadataFnOverrides;
|
|
176
175
|
};
|
|
177
|
-
export type
|
|
178
|
-
type: ChartType.
|
|
176
|
+
export type CurrentStatusChartOptions = {
|
|
177
|
+
type: ChartType.CurrentStatus;
|
|
179
178
|
title?: string;
|
|
179
|
+
statuses?: TestStatus[];
|
|
180
|
+
metric?: TestStatus;
|
|
180
181
|
};
|
|
181
182
|
export type BarChartOptions = {
|
|
182
183
|
type: ChartType.Bar;
|
|
@@ -205,7 +206,7 @@ export type FunnelChartOptions = {
|
|
|
205
206
|
title?: string;
|
|
206
207
|
layers?: string[];
|
|
207
208
|
};
|
|
208
|
-
export type ChartOptions = TrendChartOptions |
|
|
209
|
+
export type ChartOptions = TrendChartOptions | CurrentStatusChartOptions | BarChartOptions | ComingSoonChartOptions | TreeMapChartOptions | HeatMapChartOptions | FunnelChartOptions;
|
|
209
210
|
export interface AllureChartsStoreData {
|
|
210
211
|
historyDataPoints: HistoryDataPoint[];
|
|
211
212
|
testResults: TestResult[];
|
package/dist/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/charts-api",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.24",
|
|
4
4
|
"description": "Allure Charts API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"eslint:format": "eslint --fix ./src/**/*.{js,jsx,ts,tsx}"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@allurereport/core-api": "3.0.0-beta.
|
|
31
|
-
"@allurereport/plugin-api": "3.0.0-beta.
|
|
30
|
+
"@allurereport/core-api": "3.0.0-beta.24",
|
|
31
|
+
"@allurereport/plugin-api": "3.0.0-beta.24",
|
|
32
32
|
"d3-shape": "^3.2.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|