@allurereport/web-awesome 3.0.0-beta.23 → 3.0.0-beta.25

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 (57) hide show
  1. package/dist/multi/{173.app-5f97f0fc2fd3d653a804.js → 173.app-c2ae6c823c3af799e2d4.js} +1 -1
  2. package/dist/multi/{174.app-5f97f0fc2fd3d653a804.js → 174.app-c2ae6c823c3af799e2d4.js} +1 -1
  3. package/dist/multi/{252.app-5f97f0fc2fd3d653a804.js → 252.app-c2ae6c823c3af799e2d4.js} +1 -1
  4. package/dist/multi/{282.app-5f97f0fc2fd3d653a804.js → 282.app-c2ae6c823c3af799e2d4.js} +1 -1
  5. package/dist/multi/{29.app-5f97f0fc2fd3d653a804.js → 29.app-c2ae6c823c3af799e2d4.js} +1 -1
  6. package/dist/multi/{416.app-5f97f0fc2fd3d653a804.js → 416.app-c2ae6c823c3af799e2d4.js} +1 -1
  7. package/dist/multi/{527.app-5f97f0fc2fd3d653a804.js → 527.app-c2ae6c823c3af799e2d4.js} +1 -1
  8. package/dist/multi/{600.app-5f97f0fc2fd3d653a804.js → 600.app-c2ae6c823c3af799e2d4.js} +1 -1
  9. package/dist/multi/{605.app-5f97f0fc2fd3d653a804.js → 605.app-c2ae6c823c3af799e2d4.js} +1 -1
  10. package/dist/multi/{638.app-5f97f0fc2fd3d653a804.js → 638.app-c2ae6c823c3af799e2d4.js} +1 -1
  11. package/dist/multi/{672.app-5f97f0fc2fd3d653a804.js → 672.app-c2ae6c823c3af799e2d4.js} +1 -1
  12. package/dist/multi/{686.app-5f97f0fc2fd3d653a804.js → 686.app-c2ae6c823c3af799e2d4.js} +1 -1
  13. package/dist/multi/{725.app-5f97f0fc2fd3d653a804.js → 725.app-c2ae6c823c3af799e2d4.js} +1 -1
  14. package/dist/multi/{741.app-5f97f0fc2fd3d653a804.js → 741.app-c2ae6c823c3af799e2d4.js} +1 -1
  15. package/dist/multi/{755.app-5f97f0fc2fd3d653a804.js → 755.app-c2ae6c823c3af799e2d4.js} +1 -1
  16. package/dist/multi/{894.app-5f97f0fc2fd3d653a804.js → 894.app-c2ae6c823c3af799e2d4.js} +1 -1
  17. package/dist/multi/{943.app-5f97f0fc2fd3d653a804.js → 943.app-c2ae6c823c3af799e2d4.js} +1 -1
  18. package/dist/multi/{980.app-5f97f0fc2fd3d653a804.js → 980.app-c2ae6c823c3af799e2d4.js} +1 -1
  19. package/dist/multi/app-c2ae6c823c3af799e2d4.js +2 -0
  20. package/dist/multi/manifest.json +20 -20
  21. package/dist/multi/styles-016f0a9ec6cfcb83a8b3.css +48 -0
  22. package/dist/single/app-0c8570034ae48c739e8e.js +2 -0
  23. package/dist/single/manifest.json +1 -1
  24. package/package.json +6 -6
  25. package/src/assets/scss/theme.scss +2 -0
  26. package/src/components/Charts/index.tsx +72 -16
  27. package/src/components/Charts/styles.scss +1 -13
  28. package/src/components/SectionPicker/index.tsx +1 -0
  29. package/src/components/SectionSwitcher/index.tsx +2 -0
  30. package/src/components/Timeline/index.tsx +100 -0
  31. package/src/components/Timeline/styles.scss +45 -0
  32. package/src/locales/az.json +32 -3
  33. package/src/locales/de.json +32 -3
  34. package/src/locales/en.json +32 -3
  35. package/src/locales/es.json +32 -3
  36. package/src/locales/fr.json +32 -3
  37. package/src/locales/he.json +32 -3
  38. package/src/locales/hy.json +32 -3
  39. package/src/locales/it.json +32 -3
  40. package/src/locales/ja.json +32 -3
  41. package/src/locales/ka.json +32 -3
  42. package/src/locales/kr.json +32 -3
  43. package/src/locales/nl.json +32 -3
  44. package/src/locales/pl.json +40 -3
  45. package/src/locales/pt.json +32 -3
  46. package/src/locales/ru.json +40 -3
  47. package/src/locales/sv.json +32 -3
  48. package/src/locales/tr.json +32 -3
  49. package/src/locales/zh.json +32 -3
  50. package/src/stores/locale.ts +13 -3
  51. package/src/stores/timeline.ts +39 -0
  52. package/webpack.config.js +12 -1
  53. package/dist/multi/app-5f97f0fc2fd3d653a804.js +0 -2
  54. package/dist/multi/styles-d0a3b9e6a5609fee622f.css +0 -47
  55. package/dist/single/app-e0a811d47859e51f6510.js +0 -2
  56. /package/dist/multi/{app-5f97f0fc2fd3d653a804.js.LICENSE.txt → app-c2ae6c823c3af799e2d4.js.LICENSE.txt} +0 -0
  57. /package/dist/single/{app-e0a811d47859e51f6510.js.LICENSE.txt → app-0c8570034ae48c739e8e.js.LICENSE.txt} +0 -0
@@ -25,8 +25,9 @@ const namespaces = [
25
25
  "environments",
26
26
  "charts",
27
27
  "sections",
28
+ "timeline",
28
29
  "transitions.description",
29
- ];
30
+ ] as const;
30
31
 
31
32
  export const currentLocale = signal<LangLocale>("en" as LangLocale);
32
33
  export const currentLocaleIso = computed(() => LANG_LOCALE[currentLocale.value]?.iso ?? LANG_LOCALE.en.iso);
@@ -61,10 +62,19 @@ export const waitForI18next = i18next
61
62
  fallbackLng: "en",
62
63
  ns: namespaces,
63
64
  interpolation: { escapeValue: false },
65
+ })
66
+ .then(() => {
67
+ i18next.services.formatter.add("capitalize", (value) => {
68
+ return value.charAt(0).toLocaleUpperCase() + value.slice(1);
69
+ });
64
70
  });
65
71
 
66
- export const useI18n = (namespace?: string) => {
67
- const t = computed(() => (key: string, options?: TOptions) => i18next.t(key, { ns: namespace, ...options }));
72
+ export const useI18n = (namespace: (typeof namespaces)[number]) => {
73
+ const t = computed(
74
+ () =>
75
+ (key: string, options: TOptions = {}) =>
76
+ i18next.t(key, { ns: namespace, ...options }),
77
+ );
68
78
 
69
79
  return {
70
80
  t: t.value,
@@ -0,0 +1,39 @@
1
+ import type { TestResult } from "@allurereport/core-api";
2
+ import { fetchReportJsonData } from "@allurereport/web-commons";
3
+ import { signal } from "@preact/signals";
4
+ import type { StoreSignalState } from "@/stores/types";
5
+
6
+ export type TimlineTr = Pick<
7
+ TestResult,
8
+ "id" | "name" | "status" | "flaky" | "hidden" | "labels" | "environment" | "start" | "stop" | "duration"
9
+ >;
10
+
11
+ export const timelineStore = signal<StoreSignalState<TimlineTr[]>>({
12
+ loading: true,
13
+ error: undefined,
14
+ data: undefined,
15
+ });
16
+
17
+ export const fetchTimelineData = async () => {
18
+ timelineStore.value = {
19
+ ...timelineStore.value,
20
+ loading: true,
21
+ error: undefined,
22
+ };
23
+
24
+ try {
25
+ const res = await fetchReportJsonData<TimlineTr[]>("widgets/timeline.json", { bustCache: true });
26
+
27
+ timelineStore.value = {
28
+ data: res,
29
+ error: undefined,
30
+ loading: false,
31
+ };
32
+ } catch (err) {
33
+ timelineStore.value = {
34
+ data: undefined,
35
+ error: err.message,
36
+ loading: false,
37
+ };
38
+ }
39
+ };
package/webpack.config.js CHANGED
@@ -14,6 +14,9 @@ const baseDir = dirname(fileURLToPath(import.meta.url));
14
14
 
15
15
  export default (env, argv) => {
16
16
  const devMode = argv?.mode === "development";
17
+ /**
18
+ * @type {import("webpack").Configuration}
19
+ */
17
20
  const config = {
18
21
  entry: "./src/index.tsx",
19
22
  output: {
@@ -21,7 +24,7 @@ export default (env, argv) => {
21
24
  filename: devMode ? "app.js" : "app-[fullhash].js",
22
25
  assetModuleFilename: "[name][ext]",
23
26
  },
24
- devtool: devMode ? "inline-source-map" : false,
27
+ devtool: devMode ? "eval-source-map" : false,
25
28
  optimization: {
26
29
  minimize: !devMode,
27
30
  minimizer: [
@@ -111,6 +114,14 @@ export default (env, argv) => {
111
114
  },
112
115
  };
113
116
 
117
+ if (devMode) {
118
+ // Get and use source maps from dependencies
119
+ config.module.rules.push({
120
+ test: /\.js$/i,
121
+ extractSourceMap: true,
122
+ });
123
+ }
124
+
114
125
  if (SINGLE_FILE_MODE) {
115
126
  config.plugins.push(
116
127
  new webpack.optimize.LimitChunkCountPlugin({