@allurereport/web-dashboard 3.0.1 → 3.2.0

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 (56) hide show
  1. package/dist/multi/{173.app-d817a5a655317181a528.js → 173.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  2. package/dist/multi/{174.app-d817a5a655317181a528.js → 174.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  3. package/dist/multi/{252.app-d817a5a655317181a528.js → 252.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  4. package/dist/multi/{282.app-d817a5a655317181a528.js → 282.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  5. package/dist/multi/{29.app-d817a5a655317181a528.js → 29.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  6. package/dist/multi/{416.app-d817a5a655317181a528.js → 416.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  7. package/dist/multi/{527.app-d817a5a655317181a528.js → 527.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  8. package/dist/multi/{600.app-d817a5a655317181a528.js → 600.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  9. package/dist/multi/{605.app-d817a5a655317181a528.js → 605.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  10. package/dist/multi/{638.app-d817a5a655317181a528.js → 638.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  11. package/dist/multi/{672.app-d817a5a655317181a528.js → 672.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  12. package/dist/multi/{686.app-d817a5a655317181a528.js → 686.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  13. package/dist/multi/{725.app-d817a5a655317181a528.js → 725.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  14. package/dist/multi/{741.app-d817a5a655317181a528.js → 741.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  15. package/dist/multi/749.app-7ac8c7228f79c5ce8ff3.js +1 -0
  16. package/dist/multi/{755.app-d817a5a655317181a528.js → 755.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  17. package/dist/multi/{894.app-d817a5a655317181a528.js → 894.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  18. package/dist/multi/{943.app-d817a5a655317181a528.js → 943.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  19. package/dist/multi/{980.app-d817a5a655317181a528.js → 980.app-7ac8c7228f79c5ce8ff3.js} +1 -1
  20. package/dist/multi/app-7ac8c7228f79c5ce8ff3.js +2 -0
  21. package/dist/multi/{app-d817a5a655317181a528.js.LICENSE.txt → app-7ac8c7228f79c5ce8ff3.js.LICENSE.txt} +7 -0
  22. package/dist/multi/manifest.json +21 -21
  23. package/dist/multi/{styles-addfb0e270ca070fb16b.css → styles-6e84fb28f87ce39fa305.css} +1 -1
  24. package/dist/single/app-a852a6b926584d4d704b.js +2 -0
  25. package/dist/single/{app-8450c91141b1579a1c04.js.LICENSE.txt → app-a852a6b926584d4d704b.js.LICENSE.txt} +7 -0
  26. package/dist/single/manifest.json +1 -1
  27. package/package.json +7 -8
  28. package/src/components/Dashboard/index.tsx +10 -8
  29. package/src/components/Header/index.tsx +5 -2
  30. package/src/index.html +12 -12
  31. package/src/index.tsx +0 -2
  32. package/src/locales/az.json +2 -2
  33. package/src/locales/de.json +2 -2
  34. package/src/locales/en.json +2 -2
  35. package/src/locales/es.json +2 -2
  36. package/src/locales/fr.json +2 -2
  37. package/src/locales/he.json +2 -2
  38. package/src/locales/hy.json +2 -2
  39. package/src/locales/it.json +2 -2
  40. package/src/locales/ja.json +2 -2
  41. package/src/locales/ka.json +2 -2
  42. package/src/locales/kr.json +2 -2
  43. package/src/locales/nl.json +2 -2
  44. package/src/locales/pl.json +2 -2
  45. package/src/locales/pt.json +2 -2
  46. package/src/locales/ru.json +2 -2
  47. package/src/locales/sv.json +2 -2
  48. package/src/locales/tr.json +2 -2
  49. package/src/locales/{ua.json → uk.json} +2 -2
  50. package/src/locales/zh.json +2 -2
  51. package/src/stores/locale.ts +68 -37
  52. package/types.d.ts +1 -1
  53. package/dist/multi/91.app-d817a5a655317181a528.js +0 -1
  54. package/dist/multi/app-d817a5a655317181a528.js +0 -2
  55. package/dist/single/app-8450c91141b1579a1c04.js +0 -2
  56. package/src/stores/theme.ts +0 -32
@@ -6,3 +6,10 @@
6
6
  * @namespace
7
7
  * @public
8
8
  */
9
+
10
+ /**!
11
+ * Sortable 1.15.6
12
+ * @author RubaXa <trash@rubaxa.org>
13
+ * @author owenm <owen23355@gmail.com>
14
+ * @license MIT
15
+ */
@@ -1,3 +1,3 @@
1
1
  {
2
- "main.js": "app-8450c91141b1579a1c04.js"
2
+ "main.js": "app-a852a6b926584d4d704b.js"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/web-dashboard",
3
- "version": "3.0.1",
3
+ "version": "3.2.0",
4
4
  "description": "The static files for Allure Dashboard Report",
5
5
  "keywords": [
6
6
  "allure",
@@ -31,15 +31,14 @@
31
31
  "IE 11"
32
32
  ],
33
33
  "dependencies": {
34
- "@allurereport/charts-api": "3.0.1",
35
- "@allurereport/core-api": "3.0.1",
36
- "@allurereport/web-commons": "3.0.1",
37
- "@allurereport/web-components": "3.0.1",
38
- "@preact/signals": "^1.3.0",
34
+ "@allurereport/charts-api": "3.2.0",
35
+ "@allurereport/core-api": "3.2.0",
36
+ "@allurereport/web-commons": "3.2.0",
37
+ "@allurereport/web-components": "3.2.0",
38
+ "@preact/signals": "^2.6.1",
39
39
  "clsx": "^2.1.1",
40
40
  "i18next": "^24.0.2",
41
- "preact": "^10.28.2",
42
- "reset.css": "^2.0.2"
41
+ "preact": "^10.28.2"
43
42
  },
44
43
  "devDependencies": {
45
44
  "@babel/core": "^7.27.4",
@@ -1,17 +1,17 @@
1
1
  /* eslint-disable @typescript-eslint/no-unsafe-argument */
2
2
  import { ChartType } from "@allurereport/charts-api";
3
- import { type UIChartData } from "@allurereport/web-commons";
3
+ import { type UIChartData, themeStore } from "@allurereport/web-commons";
4
4
  import {
5
5
  CurrentStatusChartWidget,
6
6
  DurationDynamicsChartWidget,
7
7
  DurationsChartWidget,
8
- FBSUAgePyramidChartWidget,
9
8
  Grid,
10
9
  GridItem,
11
10
  HeatMapWidget,
12
11
  Loadable,
13
12
  PageLoader,
14
13
  StabilityDistributionWidget,
14
+ StatusAgePyramidChartWidget,
15
15
  StatusDynamicsChartWidget,
16
16
  StatusTransitionsChartWidget,
17
17
  TestBaseGrowthDynamicsChartWidget,
@@ -20,13 +20,15 @@ import {
20
20
  TrSeveritiesChartWidget,
21
21
  TreeMapChartWidget,
22
22
  } from "@allurereport/web-components";
23
+ import { computed } from "@preact/signals";
23
24
  import { useEffect } from "preact/hooks";
24
25
  import { dashboardStore, fetchDashboardData } from "@/stores/dashboard";
25
26
  import { currentEnvironment, fetchEnvironments } from "@/stores/env";
26
27
  import { useI18n } from "@/stores/locale";
27
- import { themeStore } from "@/stores/theme";
28
28
  import * as styles from "./styles.scss";
29
29
 
30
+ const currentTheme = computed(() => themeStore.value.current);
31
+
30
32
  const getChartWidgetByType = (
31
33
  chartData: UIChartData,
32
34
  { t, empty }: Record<string, (key: string, options?: any) => string>,
@@ -110,15 +112,15 @@ const getChartWidgetByType = (
110
112
  />
111
113
  );
112
114
  }
113
- case ChartType.FBSUAgePyramid: {
114
- const title = chartData.title ?? t("fbsuAgePyramid.title");
115
+ case ChartType.StatusAgePyramid: {
116
+ const title = chartData.title ?? t("statusAgePyramid.title");
115
117
 
116
118
  return (
117
- <FBSUAgePyramidChartWidget
119
+ <StatusAgePyramidChartWidget
118
120
  title={title}
119
121
  data={chartData.data}
120
122
  statuses={chartData.statuses}
121
- i18n={(key, props = {}) => t(`fbsuAgePyramid.${key}`, props)}
123
+ i18n={(key, props = {}) => t(`statusAgePyramid.${key}`, props)}
122
124
  />
123
125
  );
124
126
  }
@@ -211,7 +213,7 @@ export const Dashboard = () => {
211
213
  }, []);
212
214
 
213
215
  return (
214
- <ThemeProvider theme={themeStore.value}>
216
+ <ThemeProvider theme={currentTheme.value}>
215
217
  <Loadable
216
218
  source={dashboardStore}
217
219
  renderLoader={() => <PageLoader />}
@@ -1,8 +1,9 @@
1
+ import { themeStore, toggleUserTheme } from "@allurereport/web-commons";
1
2
  import { LanguagePicker, ThemeButton } from "@allurereport/web-components";
3
+ import { computed } from "@preact/signals";
2
4
  import type { ClassValue } from "clsx";
3
5
  import clsx from "clsx";
4
6
  import { currentLocale, setLocale } from "@/stores/locale";
5
- import { getTheme, themeStore, toggleTheme } from "@/stores/theme";
6
7
  import { EnvironmentPicker } from "../EnvironmentPicker";
7
8
  import * as styles from "./styles.scss";
8
9
 
@@ -10,13 +11,15 @@ interface HeaderProps {
10
11
  className?: ClassValue;
11
12
  }
12
13
 
14
+ const selectedTheme = computed(() => themeStore.value.selected);
15
+
13
16
  export const Header = ({ className }: HeaderProps) => {
14
17
  return (
15
18
  <div className={clsx(styles.above, className)}>
16
19
  <div className={styles.right}>
17
20
  <EnvironmentPicker />
18
21
  <LanguagePicker locale={currentLocale.value} setLocale={setLocale} />
19
- <ThemeButton theme={themeStore.value} toggleTheme={toggleTheme} getTheme={getTheme} />
22
+ <ThemeButton theme={selectedTheme.value} toggleTheme={toggleUserTheme} />
20
23
  </div>
21
24
  </div>
22
25
  );
package/src/index.html CHANGED
@@ -4,6 +4,18 @@
4
4
  <title>Allure Dashboard</title>
5
5
  <link rel="icon" href="data:image/svg+xml,%3Csvg width='32' height='32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M22.232 4.662a3.6 3.6 0 0 1 5.09.035c2.855 2.894 4.662 6.885 4.662 11.295a3.6 3.6 0 0 1-7.2 0c0-2.406-.981-4.61-2.587-6.24a3.6 3.6 0 0 1 .035-5.09Z' fill='url(%23a)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12.392 3.6a3.6 3.6 0 0 1 3.6-3.6c4.41 0 8.401 1.807 11.296 4.662a3.6 3.6 0 1 1-5.056 5.126C20.602 8.18 18.398 7.2 15.992 7.2a3.6 3.6 0 0 1-3.6-3.6Z' fill='url(%23b)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 15.992C0 7.157 7.157 0 15.992 0a3.6 3.6 0 0 1 0 7.2A8.789 8.789 0 0 0 7.2 15.992c0 2.406.981 4.61 2.588 6.24a3.6 3.6 0 0 1-5.126 5.056C1.807 24.393 0 20.402 0 15.992Z' fill='url(%23c)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4.661 22.232a3.6 3.6 0 0 1 5.091-.035c1.63 1.606 3.834 2.587 6.24 2.587a3.6 3.6 0 0 1 0 7.2c-4.41 0-8.401-1.807-11.295-4.661a3.6 3.6 0 0 1-.036-5.091Z' fill='url(%23d)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M28.384 12.392a3.6 3.6 0 0 1 3.6 3.6c0 8.835-7.157 15.992-15.992 15.992a3.6 3.6 0 0 1 0-7.2 8.789 8.789 0 0 0 8.792-8.792 3.6 3.6 0 0 1 3.6-3.6Z' fill='url(%23e)'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M28.385 12.392a3.6 3.6 0 0 1 3.6 3.6v12.392a3.6 3.6 0 0 1-7.2 0V15.992a3.6 3.6 0 0 1 3.6-3.6Z' fill='url(%23f)'/%3E%3Cg clip-path='url(%23g)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M22.232 4.662a3.6 3.6 0 0 1 5.091.035c2.855 2.894 4.662 6.885 4.662 11.295a3.6 3.6 0 0 1-7.2 0c0-2.406-.982-4.61-2.588-6.24a3.6 3.6 0 0 1 .035-5.09Z' fill='url(%23h)'/%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='a' x1='26.4' y1='9.6' x2='28.8' y2='15' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%237E22CE'/%3E%3Cstop offset='1' stop-color='%238B5CF6'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='26.8' y1='9.4' x2='17.8' y2='3.6' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23EF4444'/%3E%3Cstop offset='1' stop-color='%23DC2626'/%3E%3C/linearGradient%3E%3ClinearGradient id='c' x1='3.6' y1='14' x2='5.4' y2='24.8' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%2322C55E'/%3E%3Cstop offset='1' stop-color='%2315803D'/%3E%3C/linearGradient%3E%3ClinearGradient id='d' x1='4.8' y1='22.2' x2='14.4' y2='29.2' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%2394A3B8'/%3E%3Cstop offset='.958' stop-color='%2364748B'/%3E%3Cstop offset='1' stop-color='%2364748B'/%3E%3C/linearGradient%3E%3ClinearGradient id='e' x1='28.4' y1='22.173' x2='22.188' y2='28.384' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23D97706'/%3E%3Cstop offset='1' stop-color='%23FBBF24'/%3E%3C/linearGradient%3E%3ClinearGradient id='f' x1='29.2' y1='54.4' x2='30.626' y2='54.256' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%23FBBF24'/%3E%3Cstop offset='1' stop-color='%23FBBF24'/%3E%3C/linearGradient%3E%3ClinearGradient id='h' x1='26.4' y1='9.6' x2='28.8' y2='15' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%237E22CE'/%3E%3Cstop offset='1' stop-color='%238B5CF6'/%3E%3C/linearGradient%3E%3CclipPath id='g'%3E%3Cpath fill='%23fff' transform='translate(24.8 12)' d='M0 0h7.2v8H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E" />
6
6
  <base href="http://localhost:8080" />
7
+ <script>
8
+ window.allureReportOptions = {
9
+ "reportName": "Allure Report",
10
+ "logo": "",
11
+ "theme": "light",
12
+ "reportLanguage": "en",
13
+ "createdAt": 1739819870336,
14
+ "reportUuid": "51b36daf-614b-409c-b6a2-e8e401b2c145",
15
+ "layout": [],
16
+ "allureVersion": "3.0.0-beta.8"
17
+ };
18
+ </script>
7
19
  </head>
8
20
  <body>
9
21
  <div id="app"></div>
@@ -20,18 +32,6 @@
20
32
 
21
33
  window.document.head.appendChild(baseEl);
22
34
  </script>
23
- <script>
24
- window.allureReportOptions = {
25
- "reportName": "Allure Report",
26
- "logo": "",
27
- "theme": "light",
28
- "reportLanguage": "en",
29
- "createdAt": 1739819870336,
30
- "reportUuid": "51b36daf-614b-409c-b6a2-e8e401b2c145",
31
- "layout": [],
32
- "allureVersion": "3.0.0-beta.8"
33
- };
34
- </script>
35
35
  <script async>
36
36
  window.allureReportDataReady = true;
37
37
  </script>
package/src/index.tsx CHANGED
@@ -4,7 +4,6 @@ import { render } from "preact";
4
4
  import "@/assets/scss/index.scss";
5
5
  import { BaseLayout } from "@/components/BaseLayout";
6
6
  import { getLocale, waitForI18next } from "@/stores/locale";
7
- import { getTheme } from "@/stores/theme";
8
7
  import { isMac } from "@/utils/isMac";
9
8
  import * as styles from "./styles.scss";
10
9
 
@@ -26,7 +25,6 @@ document.addEventListener("DOMContentLoaded", () => {
26
25
  await waitForI18next;
27
26
  if (globalThis) {
28
27
  await getLocale();
29
- getTheme();
30
28
  }
31
29
  await ensureReportDataReady();
32
30
 
@@ -151,8 +151,8 @@
151
151
  "history": "{{timestamp, timestamp_date}}"
152
152
  }
153
153
  },
154
- "fbsuAgePyramid": {
155
- "title": "FBSU yaş piramidası",
154
+ "statusAgePyramid": {
155
+ "title": "Statusa görə yaş piramidası",
156
156
  "status": {
157
157
  "passed": "$t(statuses:passed, capitalize)",
158
158
  "failed": "$t(statuses:failed, capitalize)",
@@ -151,8 +151,8 @@
151
151
  "history": "{{timestamp, timestamp_date}}"
152
152
  }
153
153
  },
154
- "fbsuAgePyramid": {
155
- "title": "FBSU-Alterspyramide",
154
+ "statusAgePyramid": {
155
+ "title": "Alterspyramide nach Status",
156
156
  "status": {
157
157
  "passed": "$t(statuses:passed, capitalize)",
158
158
  "failed": "$t(statuses:failed, capitalize)",
@@ -151,8 +151,8 @@
151
151
  "history": "{{timestamp, timestamp_date}}"
152
152
  }
153
153
  },
154
- "fbsuAgePyramid": {
155
- "title": "FBSU age pyramid",
154
+ "statusAgePyramid": {
155
+ "title": "Status age pyramid",
156
156
  "status": {
157
157
  "passed": "$t(statuses:passed, capitalize)",
158
158
  "failed": "$t(statuses:failed, capitalize)",
@@ -151,8 +151,8 @@
151
151
  "history": "{{timestamp, timestamp_date}}"
152
152
  }
153
153
  },
154
- "fbsuAgePyramid": {
155
- "title": "Pirámide de edad FBSU",
154
+ "statusAgePyramid": {
155
+ "title": "Pirámide de edad por estado",
156
156
  "status": {
157
157
  "passed": "$t(statuses:passed, capitalize)",
158
158
  "failed": "$t(statuses:failed, capitalize)",
@@ -151,8 +151,8 @@
151
151
  "history": "{{timestamp, timestamp_date}}"
152
152
  }
153
153
  },
154
- "fbsuAgePyramid": {
155
- "title": "Pyramide des âges FBSU",
154
+ "statusAgePyramid": {
155
+ "title": "Pyramide des âges par statut",
156
156
  "status": {
157
157
  "passed": "$t(statuses:passed, capitalize)",
158
158
  "failed": "$t(statuses:failed, capitalize)",
@@ -151,8 +151,8 @@
151
151
  "history": "{{timestamp, timestamp_date}}"
152
152
  }
153
153
  },
154
- "fbsuAgePyramid": {
155
- "title": "פירמידת גילאים FBSU",
154
+ "statusAgePyramid": {
155
+ "title": "פירמידת גילאים לפי סטטוס",
156
156
  "status": {
157
157
  "passed": "$t(statuses:passed, capitalize)",
158
158
  "failed": "$t(statuses:failed, capitalize)",
@@ -151,8 +151,8 @@
151
151
  "history": "{{timestamp, timestamp_date}}"
152
152
  }
153
153
  },
154
- "fbsuAgePyramid": {
155
- "title": "FBSU տdelays",
154
+ "statusAgePyramid": {
155
+ "title": "Կարգավիճակի տարիքային պիրամիդ",
156
156
  "status": {
157
157
  "passed": "$t(statuses:passed, capitalize)",
158
158
  "failed": "$t(statuses:failed, capitalize)",
@@ -151,8 +151,8 @@
151
151
  "history": "{{timestamp, timestamp_date}}"
152
152
  }
153
153
  },
154
- "fbsuAgePyramid": {
155
- "title": "Piramide delle età FBSU",
154
+ "statusAgePyramid": {
155
+ "title": "Piramide delle età per stato",
156
156
  "status": {
157
157
  "passed": "$t(statuses:passed, capitalize)",
158
158
  "failed": "$t(statuses:failed, capitalize)",
@@ -151,8 +151,8 @@
151
151
  "history": "{{timestamp, timestamp_date}}"
152
152
  }
153
153
  },
154
- "fbsuAgePyramid": {
155
- "title": "FBSU年齢ピラミッド",
154
+ "statusAgePyramid": {
155
+ "title": "ステータス年齢ピラミッド",
156
156
  "status": {
157
157
  "passed": "$t(statuses:passed, capitalize)",
158
158
  "failed": "$t(statuses:failed, capitalize)",
@@ -151,8 +151,8 @@
151
151
  "history": "{{timestamp, timestamp_date}}"
152
152
  }
153
153
  },
154
- "fbsuAgePyramid": {
155
- "title": "FBSU ასაკობრივი პირამიდა",
154
+ "statusAgePyramid": {
155
+ "title": "ასაკობრივი პირამიდა სტატუსის მიხედვით",
156
156
  "status": {
157
157
  "passed": "$t(statuses:passed, capitalize)",
158
158
  "failed": "$t(statuses:failed, capitalize)",
@@ -151,8 +151,8 @@
151
151
  "history": "{{timestamp, timestamp_date}}"
152
152
  }
153
153
  },
154
- "fbsuAgePyramid": {
155
- "title": "FBSU 연령 피라미드",
154
+ "statusAgePyramid": {
155
+ "title": "상태 연령 피라미드",
156
156
  "status": {
157
157
  "passed": "$t(statuses:passed, capitalize)",
158
158
  "failed": "$t(statuses:failed, capitalize)",
@@ -151,8 +151,8 @@
151
151
  "history": "{{timestamp, timestamp_date}}"
152
152
  }
153
153
  },
154
- "fbsuAgePyramid": {
155
- "title": "FBSU leeftijdspiramide",
154
+ "statusAgePyramid": {
155
+ "title": "Leeftijdspiramide per status",
156
156
  "status": {
157
157
  "passed": "$t(statuses:passed, capitalize)",
158
158
  "failed": "$t(statuses:failed, capitalize)",
@@ -157,8 +157,8 @@
157
157
  "history": "{{timestamp, timestamp_date}}"
158
158
  }
159
159
  },
160
- "fbsuAgePyramid": {
161
- "title": "Piramida wiekowa FBSU",
160
+ "statusAgePyramid": {
161
+ "title": "Piramida wieku według statusu",
162
162
  "status": {
163
163
  "passed": "$t(statuses:passed, capitalize)",
164
164
  "failed": "$t(statuses:failed, capitalize)",
@@ -151,8 +151,8 @@
151
151
  "history": "{{timestamp, timestamp_date}}"
152
152
  }
153
153
  },
154
- "fbsuAgePyramid": {
155
- "title": "Pirâmide etária FBSU",
154
+ "statusAgePyramid": {
155
+ "title": "Pirâmide etária por status",
156
156
  "status": {
157
157
  "passed": "$t(statuses:passed, capitalize)",
158
158
  "failed": "$t(statuses:failed, capitalize)",
@@ -157,8 +157,8 @@
157
157
  "history": "{{timestamp, timestamp_date}}"
158
158
  }
159
159
  },
160
- "fbsuAgePyramid": {
161
- "title": "FBSU пирамида возраста",
160
+ "statusAgePyramid": {
161
+ "title": "Пирамида возраста по статусу",
162
162
  "status": {
163
163
  "passed": "$t(statuses:passed, capitalize)",
164
164
  "failed": "$t(statuses:failed, capitalize)",
@@ -151,8 +151,8 @@
151
151
  "history": "{{timestamp, timestamp_date}}"
152
152
  }
153
153
  },
154
- "fbsuAgePyramid": {
155
- "title": "FBSU ålderspyramid",
154
+ "statusAgePyramid": {
155
+ "title": "Ålderspyramid per status",
156
156
  "status": {
157
157
  "passed": "$t(statuses:passed, capitalize)",
158
158
  "failed": "$t(statuses:failed, capitalize)",
@@ -151,8 +151,8 @@
151
151
  "history": "{{timestamp, timestamp_date}}"
152
152
  }
153
153
  },
154
- "fbsuAgePyramid": {
155
- "title": "FBSU yaş piramidi",
154
+ "statusAgePyramid": {
155
+ "title": "Durum yaş piramidi",
156
156
  "status": {
157
157
  "passed": "$t(statuses:passed, capitalize)",
158
158
  "failed": "$t(statuses:failed, capitalize)",
@@ -157,8 +157,8 @@
157
157
  "history": "{{timestamp, timestamp_date}}"
158
158
  }
159
159
  },
160
- "fbsuAgePyramid": {
161
- "title": "FBSU вікова піраміда",
160
+ "statusAgePyramid": {
161
+ "title": "Вікова піраміда за статусом",
162
162
  "status": {
163
163
  "passed": "$t(statuses:passed, capitalize)",
164
164
  "failed": "$t(statuses:failed, capitalize)",
@@ -151,8 +151,8 @@
151
151
  "history": "{{timestamp, timestamp_date}}"
152
152
  }
153
153
  },
154
- "fbsuAgePyramid": {
155
- "title": "FBSU年龄金字塔",
154
+ "statusAgePyramid": {
155
+ "title": "状态年龄金字塔",
156
156
  "status": {
157
157
  "passed": "$t(statuses:passed, capitalize)",
158
158
  "failed": "$t(statuses:failed, capitalize)",
@@ -1,5 +1,11 @@
1
1
  import { formatDuration } from "@allurereport/core-api";
2
- import { DEFAULT_LOCALE, LANG_LOCALE, type LangLocale, getReportOptions } from "@allurereport/web-commons";
2
+ import {
3
+ DEFAULT_LOCALE,
4
+ LANG_LOCALE,
5
+ type LangLocale,
6
+ getLocaleDateTimeOverride,
7
+ getReportOptions,
8
+ } from "@allurereport/web-commons";
3
9
  import { computed, signal } from "@preact/signals";
4
10
  import i18next, { type TOptions } from "i18next";
5
11
  import type { DashboardReportOptions } from "types";
@@ -45,7 +51,8 @@ export const waitForI18next = i18next
45
51
  namespace: string,
46
52
  callback: (errorValue: unknown, translations: null) => void,
47
53
  ) => {
48
- await import(`@/locales/${language}.json`)
54
+ const loadLocale = language === "en-iso" ? "en" : language;
55
+ await import(`@/locales/${loadLocale}.json`)
49
56
  .then((resources: Record<string, null>) => {
50
57
  callback(null, resources[namespace]);
51
58
  })
@@ -61,43 +68,67 @@ export const waitForI18next = i18next
61
68
  interpolation: { escapeValue: false },
62
69
  })
63
70
  .then(() => {
64
- i18next.services.formatter.add("capitalize", (value) => {
71
+ i18next.services.formatter.add("capitalize", (value: string) => {
65
72
  return value.charAt(0).toLocaleUpperCase() + value.slice(1);
66
73
  });
67
- i18next.services.formatter.add("timestamp_date", (value: number, lng, options) => {
68
- const formatter = new Intl.DateTimeFormat(lng, {
69
- ...options,
70
- month: "numeric",
71
- day: "numeric",
72
- year: "numeric",
73
- });
74
- return formatter.format(value);
75
- });
76
- i18next.services.formatter.add("timestamp_long", (value: number, lng, options) => {
77
- const formatter = new Intl.DateTimeFormat(lng, {
78
- ...options,
79
- month: "numeric",
80
- day: "numeric",
81
- year: "numeric",
82
- hour: "numeric",
83
- minute: "numeric",
84
- second: "numeric",
85
- hour12: false,
86
- });
87
- return formatter.format(value).replace(",", ` ${i18next.t("ui:at")}`);
88
- });
89
- i18next.services.formatter.add("timestamp_long_no_seconds", (value: number, lng, options) => {
90
- const formatter = new Intl.DateTimeFormat(lng, {
91
- ...options,
92
- month: "numeric",
93
- day: "numeric",
94
- year: "numeric",
95
- hour: "numeric",
96
- minute: "numeric",
97
- hour12: false,
98
- });
99
- return formatter.format(value).replace(",", ` ${i18next.t("ui:at")}`);
100
- });
74
+ i18next.services.formatter.add(
75
+ "timestamp_date",
76
+ (value: number, lng: string, options?: Intl.DateTimeFormatOptions) => {
77
+ const override = getLocaleDateTimeOverride(lng, "date");
78
+ const formatter = new Intl.DateTimeFormat(override?.locale ?? lng, {
79
+ ...options,
80
+ month: "numeric",
81
+ day: "numeric",
82
+ year: "numeric",
83
+ ...(override?.options ?? {}),
84
+ });
85
+ const formatted = formatter.format(value);
86
+ return override?.stripComma ? formatted.replace(",", "") : formatted;
87
+ },
88
+ );
89
+ i18next.services.formatter.add(
90
+ "timestamp_long",
91
+ (value: number, lng: string, options?: Intl.DateTimeFormatOptions) => {
92
+ const override = getLocaleDateTimeOverride(lng, "dateTime");
93
+ const formatter = new Intl.DateTimeFormat(override?.locale ?? lng, {
94
+ ...options,
95
+ month: "numeric",
96
+ day: "numeric",
97
+ year: "numeric",
98
+ hour: "numeric",
99
+ minute: "numeric",
100
+ second: "numeric",
101
+ hour12: false,
102
+ ...(override?.options ?? {}),
103
+ });
104
+ const formatted = formatter.format(value);
105
+ if (override?.includeAtSeparator === false || override?.stripComma) {
106
+ return formatted.replace(",", "");
107
+ }
108
+ return formatted.replace(",", ` ${i18next.t("ui:at")}`);
109
+ },
110
+ );
111
+ i18next.services.formatter.add(
112
+ "timestamp_long_no_seconds",
113
+ (value: number, lng: string, options?: Intl.DateTimeFormatOptions) => {
114
+ const override = getLocaleDateTimeOverride(lng, "dateTimeNoSeconds");
115
+ const formatter = new Intl.DateTimeFormat(override?.locale ?? lng, {
116
+ ...options,
117
+ month: "numeric",
118
+ day: "numeric",
119
+ year: "numeric",
120
+ hour: "numeric",
121
+ minute: "numeric",
122
+ hour12: false,
123
+ ...(override?.options ?? {}),
124
+ });
125
+ const formatted = formatter.format(value);
126
+ if (override?.includeAtSeparator === false || override?.stripComma) {
127
+ return formatted.replace(",", "");
128
+ }
129
+ return formatted.replace(",", ` ${i18next.t("ui:at")}`);
130
+ },
131
+ );
101
132
  i18next.services.formatter.add("format_duration", (value: number) => {
102
133
  return formatDuration(value);
103
134
  });
package/types.d.ts CHANGED
@@ -15,7 +15,7 @@ export type DashboardReportOptions = {
15
15
  reportName?: string;
16
16
  logo?: string;
17
17
  theme?: "light" | "dark";
18
- reportLanguage?: "en" | "ru";
18
+ reportLanguage?: string;
19
19
  createdAt: number;
20
20
  reportUuid: string;
21
21
  };
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_allurereport_web_dashboard=self.webpackChunk_allurereport_web_dashboard||[]).push([[91],{4091:function(t){t.exports=JSON.parse('{"statuses":{"passed":"Успішний","failed":"Неуспішний","broken":"Зламаний","skipped":"Пропущений","unknown":"Невідомий","total":"Всі"},"empty":{"no-results":"Немає результатів","no-history-results":"Інформація про історію відсутня"},"severity":{"blocker":"Блокер","critical":"Критична","normal":"Звичайна","minor":"Невисока","trivial":"Мінімальна"},"environments":{"environment_one":"Оточення","environment_other":"Оточення","all":"Всі"},"charts":{"trend":{"title":"Графік тренду: {{type}}","type":{"status":"Статус","severity":"Важливість"}},"currentStatus":{"title":"Поточний статус","status":{"passed":"$t(statuses:passed, capitalize)","failed":"$t(statuses:failed, capitalize)","broken":"$t(statuses:broken, capitalize)","skipped":"$t(statuses:skipped, capitalize)","unknown":"$t(statuses:unknown, capitalize)"},"percentage":"{{percentage}}%","of":"з {{total}}","total":"{{total}}","tests":{"new_zero":"Немає нових тестів","new_one":"{{count}} новий тест","new_few":"{{count}} нових тести","new_many":"{{count}} нових тестів","new_other":"{{count}} нових тестів","flaky_zero":"Немає нестабільних тестів","flaky_one":"{{count}} нестабільний тест","flaky_few":"{{count}} нестабільних тести","flaky_many":"{{count}} нестабільних тестів","flaky_other":"{{count}} нестабільних тестів","retries_zero":"Немає повторних тестів","retries_one":"{{count}} повторний тест","retries_few":"{{count}} повторних тести","retries_many":"{{count}} повторних тестів","retries_other":"{{count}} повторних тестів"}},"statusDynamics":{"title":"Динаміка статусів","status":{"passed":"$t(statuses:passed, capitalize)","failed":"$t(statuses:failed, capitalize)","broken":"$t(statuses:broken, capitalize)","skipped":"$t(statuses:skipped, capitalize)","unknown":"$t(statuses:unknown, capitalize)"},"no-history":"$t(empty:no-history-results)","no-results":"$t(empty:no-results)","tooltips":{"current":"Останній звіт ({{timestamp, timestamp_long_no_seconds}})","history":"Звіт від {{timestamp, timestamp_long_no_seconds}}"},"ticks":{"current":"Останній","history":"{{timestamp, timestamp_date}}"}},"statusTransitions":{"title":"Переходи статусів","legend":{"trend":"Коефіцієнт виправлень"},"transitions":{"new":"$t(transitions:new, capitalize)","fixed":"$t(transitions:fixed, capitalize)","regressed":"$t(transitions:regressed, capitalize)","malfunctioned":"$t(transitions:malfunctioned, capitalize)"},"no-history":"$t(empty:no-history-results)","no-results":"$t(empty:no-results)","tooltips":{"current":"Останній звіт ({{timestamp, timestamp_long_no_seconds}})","history":"Звіт від {{timestamp, timestamp_long_no_seconds}}"},"ticks":{"current":"Останній","history":"{{timestamp, timestamp_date}}"}},"durations":{"title":"Гістограма тривалостей за {{groupBy}}","title_none":"Гістограма тривалостей","no-results":"$t(empty:no-results)","groupBy":{"none":"Немає","layer":"Шар"},"ticks":{"durationRange":"{{from, format_duration}} - {{to, format_duration}}"},"tooltips":{"durationRange":"{{from, format_duration}} - {{to, format_duration}}"},"legend":{"value":"{{value}}","total":"Кількість тестів"}},"stabilityDistribution":{"title":"Розподіл стабільності","no-results":"$t(empty:no-results)","legend":{"stabilityRate":"Коефіцієнт стабільності"}},"testBaseGrowthDynamics":{"title":"Динаміка росту бази тестів","status":{"newpassed":"Новий $t(statuses:passed)","newfailed":"Новий $t(statuses:failed)","newbroken":"Новий $t(statuses:broken)","newskipped":"Новий $t(statuses:skipped)","newunknown":"Новий $t(statuses:unknown)","removedpassed":"Видалений $t(statuses:passed)","removedfailed":"Видалений $t(statuses:failed)","removedbroken":"Видалений $t(statuses:broken)","removedskipped":"Видалений $t(statuses:skipped)","removedunknown":"Видалений $t(statuses:unknown)"},"legend":{"trend":"Тренд зростання"},"no-history":"$t(empty:no-history-results)","no-results":"$t(empty:no-results)","tooltips":{"current":"Останній звіт ({{timestamp, timestamp_long_no_seconds}})","history":"Звіт від {{timestamp, timestamp_long_no_seconds}}"},"ticks":{"current":"Останній","history":"{{timestamp, timestamp_date}}"}},"fbsuAgePyramid":{"title":"FBSU вікова піраміда","status":{"passed":"$t(statuses:passed, capitalize)","failed":"$t(statuses:failed, capitalize)","broken":"$t(statuses:broken, capitalize)","skipped":"$t(statuses:skipped, capitalize)","unknown":"$t(statuses:unknown, capitalize)"},"no-history":"$t(empty:no-history-results)","no-results":"$t(empty:no-results)","tooltips":{"current":"Останній звіт ({{timestamp, timestamp_long_no_seconds}})","history":"Звіт від {{timestamp, timestamp_long_no_seconds}}"},"ticks":{"current":"Останній","history":"{{timestamp, timestamp_date}}"}},"trSeverities":{"title":"Результати тестів за важливістю","no-results":"$t(empty:no-results)","status":{"passed":"$t(statuses:passed, capitalize)","failed":"$t(statuses:failed, capitalize)","broken":"$t(statuses:broken, capitalize)","skipped":"$t(statuses:skipped, capitalize)","unknown":"$t(statuses:unknown, capitalize)"},"severity":{"blocker":"$t(severity:blocker, capitalize)","critical":"$t(severity:critical, capitalize)","normal":"$t(severity:normal, capitalize)","minor":"$t(severity:minor, capitalize)","trivial":"$t(severity:trivial, capitalize)","unset":"Немає важливості"}},"durationDynamics":{"title":"Динаміка тривалості","durations":{"sequential":"Послідовна тривалість","duration":"Тривалість тестів","speedup":"Прискорення"},"no-results":"$t(empty:no-results)","tooltips":{"current":"Останній звіт ({{timestamp, timestamp_long_no_seconds}})","history":"Звіт від {{timestamp, timestamp_long_no_seconds}}"},"ticks":{"current":"Останній","history":"{{timestamp, timestamp_date}}"},"legend":{"duration":"{{duration, format_duration}}","speedup":"{{speedup}}x"}}},"transitions":{"description":{"new":"Перша поява цього результату тесту в звіті","fixed":"Раніше \\"неуспішний\\" або \\"зламаний\\" тест, який тепер \\"успішний\\"","regressed":"Раніше \\"успішний\\" або \\"зламаний\\" тест, який тепер \\"неуспішний\\"","malfunctioned":"Раніше \\"успішний\\" або \\"неуспішний\\" тест, який тепер \\"зламаний\\""},"new":"Нові","fixed":"Виправлені","regressed":"Регресовані","malfunctioned":"Зламані"}}')}}]);