@allurereport/web-dashboard 3.0.0-beta.13 → 3.0.0-beta.15

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 (33) hide show
  1. package/dist/multi/app-c035074b.js +2 -0
  2. package/dist/multi/manifest.json +20 -20
  3. package/dist/multi/{styles-d1c5e4d9.css → styles-c035074b.css} +1 -2
  4. package/dist/single/app-6589e136.js +2 -0
  5. package/dist/single/manifest.json +1 -1
  6. package/package.json +4 -4
  7. package/src/components/Dashboard/index.tsx +16 -6
  8. package/src/stores/dashboard.ts +1 -1
  9. package/dist/multi/app-d1c5e4d9.js +0 -2
  10. package/dist/single/app-73d84c66.js +0 -2
  11. package/src/components/Dashboard/components/TrendChartWidget/index.tsx +0 -69
  12. package/src/components/Dashboard/components/Widget/index.tsx +0 -19
  13. package/src/components/Dashboard/components/Widget/styles.scss +0 -31
  14. /package/dist/multi/{173.app-d1c5e4d9.js → 173.app-c035074b.js} +0 -0
  15. /package/dist/multi/{174.app-d1c5e4d9.js → 174.app-c035074b.js} +0 -0
  16. /package/dist/multi/{252.app-d1c5e4d9.js → 252.app-c035074b.js} +0 -0
  17. /package/dist/multi/{282.app-d1c5e4d9.js → 282.app-c035074b.js} +0 -0
  18. /package/dist/multi/{29.app-d1c5e4d9.js → 29.app-c035074b.js} +0 -0
  19. /package/dist/multi/{416.app-d1c5e4d9.js → 416.app-c035074b.js} +0 -0
  20. /package/dist/multi/{527.app-d1c5e4d9.js → 527.app-c035074b.js} +0 -0
  21. /package/dist/multi/{600.app-d1c5e4d9.js → 600.app-c035074b.js} +0 -0
  22. /package/dist/multi/{605.app-d1c5e4d9.js → 605.app-c035074b.js} +0 -0
  23. /package/dist/multi/{638.app-d1c5e4d9.js → 638.app-c035074b.js} +0 -0
  24. /package/dist/multi/{672.app-d1c5e4d9.js → 672.app-c035074b.js} +0 -0
  25. /package/dist/multi/{686.app-d1c5e4d9.js → 686.app-c035074b.js} +0 -0
  26. /package/dist/multi/{725.app-d1c5e4d9.js → 725.app-c035074b.js} +0 -0
  27. /package/dist/multi/{741.app-d1c5e4d9.js → 741.app-c035074b.js} +0 -0
  28. /package/dist/multi/{755.app-d1c5e4d9.js → 755.app-c035074b.js} +0 -0
  29. /package/dist/multi/{894.app-d1c5e4d9.js → 894.app-c035074b.js} +0 -0
  30. /package/dist/multi/{943.app-d1c5e4d9.js → 943.app-c035074b.js} +0 -0
  31. /package/dist/multi/{980.app-d1c5e4d9.js → 980.app-c035074b.js} +0 -0
  32. /package/dist/multi/{app-d1c5e4d9.js.LICENSE.txt → app-c035074b.js.LICENSE.txt} +0 -0
  33. /package/dist/single/{app-73d84c66.js.LICENSE.txt → app-6589e136.js.LICENSE.txt} +0 -0
@@ -1,3 +1,3 @@
1
1
  {
2
- "main.js": "app-73d84c66.js"
2
+ "main.js": "app-6589e136.js"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/web-dashboard",
3
- "version": "3.0.0-beta.13",
3
+ "version": "3.0.0-beta.15",
4
4
  "description": "The static files for Allure Dashboard Report",
5
5
  "keywords": [
6
6
  "allure",
@@ -31,9 +31,9 @@
31
31
  "IE 11"
32
32
  ],
33
33
  "dependencies": {
34
- "@allurereport/core-api": "3.0.0-beta.13",
35
- "@allurereport/web-commons": "3.0.0-beta.13",
36
- "@allurereport/web-components": "3.0.0-beta.13",
34
+ "@allurereport/core-api": "3.0.0-beta.15",
35
+ "@allurereport/web-commons": "3.0.0-beta.15",
36
+ "@allurereport/web-components": "3.0.0-beta.15",
37
37
  "@preact/signals": "^1.3.0",
38
38
  "clsx": "^2.1.1",
39
39
  "i18next": "^24.0.2",
@@ -1,14 +1,23 @@
1
1
  /* eslint-disable @typescript-eslint/no-unsafe-argument */
2
2
  import { capitalize } from "@allurereport/web-commons";
3
- import { Grid, GridItem, Loadable, PageLoader, SuccessRatePieChart } from "@allurereport/web-components";
3
+ import {
4
+ Grid,
5
+ GridItem,
6
+ Loadable,
7
+ PageLoader,
8
+ SuccessRatePieChart,
9
+ TrendChartWidget,
10
+ Widget,
11
+ } from "@allurereport/web-components";
4
12
  import { useEffect } from "preact/hooks";
5
13
  import { type ChartData, ChartType, dashboardStore, fetchDashboardData } from "@/stores/dashboard";
6
14
  import { useI18n } from "@/stores/locale";
7
- import { TrendChartWidget } from "./components/TrendChartWidget";
8
- import { Widget } from "./components/Widget";
9
15
  import * as styles from "./styles.scss";
10
16
 
11
- const getChartWidgetByType = (chartData: ChartData, t: (key: string, options?: any) => string) => {
17
+ const getChartWidgetByType = (
18
+ chartData: ChartData,
19
+ { t, empty }: Record<string, (key: string, options?: any) => string>,
20
+ ) => {
12
21
  switch (chartData.type) {
13
22
  case ChartType.Trend: {
14
23
  const type = t(`trend.type.${chartData.dataType}`);
@@ -21,6 +30,7 @@ const getChartWidgetByType = (chartData: ChartData, t: (key: string, options?: a
21
30
  slices={chartData.slices}
22
31
  min={chartData.min}
23
32
  max={chartData.max}
33
+ translations={{ "no-results": empty("no-results") }}
24
34
  />
25
35
  );
26
36
  }
@@ -42,6 +52,7 @@ const getChartWidgetByType = (chartData: ChartData, t: (key: string, options?: a
42
52
 
43
53
  export const Dashboard = () => {
44
54
  const { t } = useI18n("charts");
55
+ const { t: empty } = useI18n("empty");
45
56
 
46
57
  useEffect(() => {
47
58
  fetchDashboardData();
@@ -53,8 +64,7 @@ export const Dashboard = () => {
53
64
  renderLoader={() => <PageLoader />}
54
65
  renderData={(data) => {
55
66
  const charts = Object.entries(data).map(([chartId, value]) => {
56
- const chartWidget = getChartWidgetByType(value, t);
57
-
67
+ const chartWidget = getChartWidgetByType(value, { t, empty });
58
68
  return (
59
69
  <GridItem key={chartId} className={styles["overview-grid-item"]}>
60
70
  {chartWidget}
@@ -189,7 +189,7 @@ export const fetchDashboardData = async () => {
189
189
  };
190
190
 
191
191
  try {
192
- const res = await fetchReportJsonData<ChartsResponse>("widgets/charts.json");
192
+ const res = await fetchReportJsonData<ChartsResponse>("widgets/charts.json", { bustCache: true });
193
193
 
194
194
  dashboardStore.value = {
195
195
  data: createCharts(res),