@allurereport/web-awesome 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.
Files changed (56) hide show
  1. package/dist/multi/{173.app-5f97f0fc2fd3d653a804.js → 173.app-9744a06934ffbef2c892.js} +1 -1
  2. package/dist/multi/{174.app-5f97f0fc2fd3d653a804.js → 174.app-9744a06934ffbef2c892.js} +1 -1
  3. package/dist/multi/{252.app-5f97f0fc2fd3d653a804.js → 252.app-9744a06934ffbef2c892.js} +1 -1
  4. package/dist/multi/{282.app-5f97f0fc2fd3d653a804.js → 282.app-9744a06934ffbef2c892.js} +1 -1
  5. package/dist/multi/{29.app-5f97f0fc2fd3d653a804.js → 29.app-9744a06934ffbef2c892.js} +1 -1
  6. package/dist/multi/{416.app-5f97f0fc2fd3d653a804.js → 416.app-9744a06934ffbef2c892.js} +1 -1
  7. package/dist/multi/{527.app-5f97f0fc2fd3d653a804.js → 527.app-9744a06934ffbef2c892.js} +1 -1
  8. package/dist/multi/{600.app-5f97f0fc2fd3d653a804.js → 600.app-9744a06934ffbef2c892.js} +1 -1
  9. package/dist/multi/{605.app-5f97f0fc2fd3d653a804.js → 605.app-9744a06934ffbef2c892.js} +1 -1
  10. package/dist/multi/{638.app-5f97f0fc2fd3d653a804.js → 638.app-9744a06934ffbef2c892.js} +1 -1
  11. package/dist/multi/{672.app-5f97f0fc2fd3d653a804.js → 672.app-9744a06934ffbef2c892.js} +1 -1
  12. package/dist/multi/{686.app-5f97f0fc2fd3d653a804.js → 686.app-9744a06934ffbef2c892.js} +1 -1
  13. package/dist/multi/{725.app-5f97f0fc2fd3d653a804.js → 725.app-9744a06934ffbef2c892.js} +1 -1
  14. package/dist/multi/{741.app-5f97f0fc2fd3d653a804.js → 741.app-9744a06934ffbef2c892.js} +1 -1
  15. package/dist/multi/{755.app-5f97f0fc2fd3d653a804.js → 755.app-9744a06934ffbef2c892.js} +1 -1
  16. package/dist/multi/{894.app-5f97f0fc2fd3d653a804.js → 894.app-9744a06934ffbef2c892.js} +1 -1
  17. package/dist/multi/{943.app-5f97f0fc2fd3d653a804.js → 943.app-9744a06934ffbef2c892.js} +1 -1
  18. package/dist/multi/{980.app-5f97f0fc2fd3d653a804.js → 980.app-9744a06934ffbef2c892.js} +1 -1
  19. package/dist/multi/app-9744a06934ffbef2c892.js +2 -0
  20. package/dist/multi/manifest.json +20 -20
  21. package/dist/multi/styles-c0d22dac0f1d971a76eb.css +48 -0
  22. package/dist/single/app-bfa8df3fad4158726f8e.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 +108 -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 +34 -0
  52. package/dist/multi/app-5f97f0fc2fd3d653a804.js +0 -2
  53. package/dist/multi/styles-d0a3b9e6a5609fee622f.css +0 -47
  54. package/dist/single/app-e0a811d47859e51f6510.js +0 -2
  55. /package/dist/multi/{app-5f97f0fc2fd3d653a804.js.LICENSE.txt → app-9744a06934ffbef2c892.js.LICENSE.txt} +0 -0
  56. /package/dist/single/{app-e0a811d47859e51f6510.js.LICENSE.txt → app-bfa8df3fad4158726f8e.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,34 @@
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 const timelineStore = signal<StoreSignalState<TestResult[]>>({
7
+ loading: true,
8
+ error: undefined,
9
+ data: undefined,
10
+ });
11
+
12
+ export const fetchTimelineData = async () => {
13
+ timelineStore.value = {
14
+ ...timelineStore.value,
15
+ loading: true,
16
+ error: undefined,
17
+ };
18
+
19
+ try {
20
+ const res = await fetchReportJsonData<TestResult[]>("widgets/timeline.json", { bustCache: true });
21
+
22
+ timelineStore.value = {
23
+ data: res,
24
+ error: undefined,
25
+ loading: false,
26
+ };
27
+ } catch (err) {
28
+ timelineStore.value = {
29
+ data: undefined,
30
+ error: err.message,
31
+ loading: false,
32
+ };
33
+ }
34
+ };