@allurereport/web-awesome 3.0.0 → 3.0.1

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 (76) hide show
  1. package/dist/multi/{173.app-9931797d1602fc52db5b.js → 173.app-bae2a0fe5738d77cd976.js} +1 -1
  2. package/dist/multi/174.app-bae2a0fe5738d77cd976.js +1 -0
  3. package/dist/multi/{252.app-9931797d1602fc52db5b.js → 252.app-bae2a0fe5738d77cd976.js} +1 -1
  4. package/dist/multi/{282.app-9931797d1602fc52db5b.js → 282.app-bae2a0fe5738d77cd976.js} +1 -1
  5. package/dist/multi/{29.app-9931797d1602fc52db5b.js → 29.app-bae2a0fe5738d77cd976.js} +1 -1
  6. package/dist/multi/{416.app-9931797d1602fc52db5b.js → 416.app-bae2a0fe5738d77cd976.js} +1 -1
  7. package/dist/multi/{527.app-9931797d1602fc52db5b.js → 527.app-bae2a0fe5738d77cd976.js} +1 -1
  8. package/dist/multi/{600.app-9931797d1602fc52db5b.js → 600.app-bae2a0fe5738d77cd976.js} +1 -1
  9. package/dist/multi/{605.app-9931797d1602fc52db5b.js → 605.app-bae2a0fe5738d77cd976.js} +1 -1
  10. package/dist/multi/{638.app-9931797d1602fc52db5b.js → 638.app-bae2a0fe5738d77cd976.js} +1 -1
  11. package/dist/multi/{672.app-9931797d1602fc52db5b.js → 672.app-bae2a0fe5738d77cd976.js} +1 -1
  12. package/dist/multi/{686.app-9931797d1602fc52db5b.js → 686.app-bae2a0fe5738d77cd976.js} +1 -1
  13. package/dist/multi/{725.app-9931797d1602fc52db5b.js → 725.app-bae2a0fe5738d77cd976.js} +1 -1
  14. package/dist/multi/{741.app-9931797d1602fc52db5b.js → 741.app-bae2a0fe5738d77cd976.js} +1 -1
  15. package/dist/multi/{755.app-9931797d1602fc52db5b.js → 755.app-bae2a0fe5738d77cd976.js} +1 -1
  16. package/dist/multi/{894.app-9931797d1602fc52db5b.js → 894.app-bae2a0fe5738d77cd976.js} +1 -1
  17. package/dist/multi/{91.app-9931797d1602fc52db5b.js → 91.app-bae2a0fe5738d77cd976.js} +1 -1
  18. package/dist/multi/{943.app-9931797d1602fc52db5b.js → 943.app-bae2a0fe5738d77cd976.js} +1 -1
  19. package/dist/multi/{980.app-9931797d1602fc52db5b.js → 980.app-bae2a0fe5738d77cd976.js} +1 -1
  20. package/dist/multi/app-bae2a0fe5738d77cd976.js +2 -0
  21. package/dist/multi/manifest.json +21 -21
  22. package/dist/multi/{styles-8fe37354d1c2270c691e.css → styles-bbf68b2ba63c38b53c38.css} +3 -3
  23. package/dist/single/app-996d3b5869f8fc942b66.js +2 -0
  24. package/dist/single/manifest.json +1 -1
  25. package/package.json +8 -8
  26. package/src/assets/scss/palette.scss +102 -102
  27. package/src/components/ReportBody/Filters.tsx +84 -33
  28. package/src/components/ReportBody/HeaderActions.tsx +2 -2
  29. package/src/components/ReportBody/SortBy.tsx +4 -7
  30. package/src/components/ReportBody/index.tsx +12 -17
  31. package/src/components/ReportTabs/index.tsx +37 -0
  32. package/src/components/SplitLayout/index.tsx +0 -2
  33. package/src/components/TestResult/TestStepsEmpty/index.tsx +1 -7
  34. package/src/components/TestResult/TrEmpty/index.tsx +1 -7
  35. package/src/components/TestResult/TrError/index.tsx +9 -2
  36. package/src/components/TestResult/TrSteps/TrStep.tsx +3 -3
  37. package/src/components/Tree/index.tsx +9 -17
  38. package/src/index.tsx +0 -1
  39. package/src/locales/az.json +3 -1
  40. package/src/locales/de.json +3 -1
  41. package/src/locales/en.json +4 -2
  42. package/src/locales/es.json +3 -1
  43. package/src/locales/fr.json +3 -1
  44. package/src/locales/he.json +3 -1
  45. package/src/locales/hy.json +3 -1
  46. package/src/locales/it.json +3 -1
  47. package/src/locales/ja.json +3 -1
  48. package/src/locales/ka.json +3 -1
  49. package/src/locales/kr.json +3 -1
  50. package/src/locales/nl.json +3 -1
  51. package/src/locales/pl.json +3 -1
  52. package/src/locales/pt.json +3 -1
  53. package/src/locales/ru.json +3 -1
  54. package/src/locales/sv.json +3 -1
  55. package/src/locales/tr.json +3 -1
  56. package/src/locales/ua.json +3 -1
  57. package/src/locales/zh.json +3 -1
  58. package/src/stores/tree.ts +37 -121
  59. package/src/stores/treeFilters/actions.ts +67 -0
  60. package/src/stores/treeFilters/constants.ts +7 -0
  61. package/src/stores/treeFilters/index.ts +3 -0
  62. package/src/stores/treeFilters/store.ts +73 -0
  63. package/src/stores/treeFilters/types.ts +12 -0
  64. package/src/utils/persist.ts +23 -0
  65. package/src/utils/tree.ts +12 -5
  66. package/src/utils/treeFilters.ts +16 -4
  67. package/test/stores/treeFilters.test.ts +302 -0
  68. package/test/utils/treeFilters.test.ts +145 -0
  69. package/types.d.ts +2 -0
  70. package/dist/multi/174.app-9931797d1602fc52db5b.js +0 -1
  71. package/dist/multi/app-9931797d1602fc52db5b.js +0 -2
  72. package/dist/single/app-6199dc1c2fd3bddc2526.js +0 -2
  73. package/src/components/Tabs/index.tsx +0 -62
  74. /package/dist/multi/{app-9931797d1602fc52db5b.js.LICENSE.txt → app-bae2a0fe5738d77cd976.js.LICENSE.txt} +0 -0
  75. /package/dist/single/{app-6199dc1c2fd3bddc2526.js.LICENSE.txt → app-996d3b5869f8fc942b66.js.LICENSE.txt} +0 -0
  76. /package/src/components/{Tabs → ReportTabs}/styles.scss +0 -0
@@ -1,62 +0,0 @@
1
- import { Text } from "@allurereport/web-components";
2
- import { type ComponentChildren, createContext } from "preact";
3
- import { useContext, useState } from "preact/hooks";
4
- import { setTreeStatus } from "@/stores/tree";
5
- import type { AwesomeStatus } from "../../../types";
6
- import * as styles from "./styles.scss";
7
-
8
- type TabsContextT = {
9
- currentTab: string | undefined;
10
- setCurrentTab: (tab: string) => void;
11
- };
12
-
13
- const TabsContext = createContext<TabsContextT | null>(null);
14
-
15
- export const useTabsContext = () => {
16
- const context = useContext(TabsContext);
17
-
18
- if (!context) {
19
- throw new Error("Tabs' components must be used within a Tabs component");
20
- }
21
-
22
- return context;
23
- };
24
-
25
- export const TabsProvider = (props: { initialTab?: string; children: ComponentChildren }) => {
26
- const { children, initialTab } = props;
27
- const [currentTab, setCurrentTab] = useState<string | undefined>(initialTab);
28
-
29
- return <TabsContext.Provider value={{ currentTab, setCurrentTab }}>{children}</TabsContext.Provider>;
30
- };
31
-
32
- export const Tabs = (props: { children: ComponentChildren; initialTab?: string }) => {
33
- return <TabsProvider {...props} />;
34
- };
35
-
36
- export const TabsList = (props: { children: ComponentChildren }) => {
37
- return <div className={styles.tabsList}>{props.children}</div>;
38
- };
39
-
40
- export const Tab = (props: { id: string; children: ComponentChildren }) => {
41
- const { id, children, ...rest } = props;
42
- const { currentTab, setCurrentTab } = useTabsContext();
43
- const isCurrentTab = currentTab === id;
44
- const handleTabClick = () => {
45
- if (isCurrentTab) {
46
- setCurrentTab("total");
47
- setTreeStatus("total");
48
- return;
49
- }
50
-
51
- setCurrentTab(id);
52
- setTreeStatus(id as AwesomeStatus);
53
- };
54
-
55
- return (
56
- <button {...rest} className={styles.tab} onClick={handleTabClick} aria-current={isCurrentTab ? true : undefined}>
57
- <Text type="paragraph" size="m" bold>
58
- {children}
59
- </Text>
60
- </button>
61
- );
62
- };
File without changes