@allurereport/charts-api 3.0.0-beta.25 → 3.0.0-beta.27
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.js +2 -3
- package/dist/types.d.ts +21 -2
- package/dist/types.js +1 -0
- package/package.json +3 -3
package/dist/constants.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BarChartType,
|
|
1
|
+
import { BarChartType, ChartType, FunnelChartType, TreeMapChartType } from "./types.js";
|
|
2
2
|
export const DEFAULT_CHART_HISTORY_LIMIT = 10;
|
|
3
3
|
export const defaultChartsConfig = [
|
|
4
4
|
{
|
|
@@ -6,8 +6,7 @@ export const defaultChartsConfig = [
|
|
|
6
6
|
title: "Current status",
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
|
-
type: ChartType.
|
|
10
|
-
dataType: ChartDataType.Status,
|
|
9
|
+
type: ChartType.StatusDynamics,
|
|
11
10
|
title: "Status dynamics",
|
|
12
11
|
},
|
|
13
12
|
{
|
package/dist/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { HistoryDataPoint, SeverityLevel, Statistic, TestResult, TestStatus
|
|
|
2
2
|
export declare enum ChartType {
|
|
3
3
|
Trend = "trend",
|
|
4
4
|
CurrentStatus = "currentStatus",
|
|
5
|
+
StatusDynamics = "statusDynamics",
|
|
5
6
|
TreeMap = "treemap",
|
|
6
7
|
HeatMap = "heatmap",
|
|
7
8
|
Bar = "bar",
|
|
@@ -163,7 +164,19 @@ export interface CurrentStatusChartData {
|
|
|
163
164
|
title?: string;
|
|
164
165
|
data: Statistic;
|
|
165
166
|
}
|
|
166
|
-
export
|
|
167
|
+
export interface StatusDynamicsChartData {
|
|
168
|
+
type: ChartType.StatusDynamics;
|
|
169
|
+
title?: string;
|
|
170
|
+
data: {
|
|
171
|
+
statistic: Statistic;
|
|
172
|
+
id: string;
|
|
173
|
+
timestamp: number;
|
|
174
|
+
name: string;
|
|
175
|
+
}[];
|
|
176
|
+
limit?: number;
|
|
177
|
+
statuses?: TestStatus[];
|
|
178
|
+
}
|
|
179
|
+
export type GeneratedChartData = TrendChartData | BarChartData | CurrentStatusChartData | StatusDynamicsChartData | ComingSoonChartData | TreeMapChartData | HeatMapChartData | FunnelChartData;
|
|
167
180
|
export type GeneratedChartsData = Record<ChartId, GeneratedChartData>;
|
|
168
181
|
export type TrendChartOptions = {
|
|
169
182
|
type: ChartType.Trend;
|
|
@@ -179,6 +192,12 @@ export type CurrentStatusChartOptions = {
|
|
|
179
192
|
statuses?: TestStatus[];
|
|
180
193
|
metric?: TestStatus;
|
|
181
194
|
};
|
|
195
|
+
export type StatusDynamicsChartOptions = {
|
|
196
|
+
type: ChartType.StatusDynamics;
|
|
197
|
+
title?: string;
|
|
198
|
+
limit?: number;
|
|
199
|
+
statuses?: TestStatus[];
|
|
200
|
+
};
|
|
182
201
|
export type BarChartOptions = {
|
|
183
202
|
type: ChartType.Bar;
|
|
184
203
|
dataType: BarChartType;
|
|
@@ -206,7 +225,7 @@ export type FunnelChartOptions = {
|
|
|
206
225
|
title?: string;
|
|
207
226
|
layers?: string[];
|
|
208
227
|
};
|
|
209
|
-
export type ChartOptions = TrendChartOptions | CurrentStatusChartOptions | BarChartOptions | ComingSoonChartOptions | TreeMapChartOptions | HeatMapChartOptions | FunnelChartOptions;
|
|
228
|
+
export type ChartOptions = TrendChartOptions | CurrentStatusChartOptions | StatusDynamicsChartOptions | BarChartOptions | ComingSoonChartOptions | TreeMapChartOptions | HeatMapChartOptions | FunnelChartOptions;
|
|
210
229
|
export interface AllureChartsStoreData {
|
|
211
230
|
historyDataPoints: HistoryDataPoint[];
|
|
212
231
|
testResults: TestResult[];
|
package/dist/types.js
CHANGED
|
@@ -2,6 +2,7 @@ export var ChartType;
|
|
|
2
2
|
(function (ChartType) {
|
|
3
3
|
ChartType["Trend"] = "trend";
|
|
4
4
|
ChartType["CurrentStatus"] = "currentStatus";
|
|
5
|
+
ChartType["StatusDynamics"] = "statusDynamics";
|
|
5
6
|
ChartType["TreeMap"] = "treemap";
|
|
6
7
|
ChartType["HeatMap"] = "heatmap";
|
|
7
8
|
ChartType["Bar"] = "bar";
|
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.27",
|
|
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.27",
|
|
31
|
+
"@allurereport/plugin-api": "3.0.0-beta.27",
|
|
32
32
|
"d3-shape": "^3.2.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|