@allurereport/web-awesome 3.0.0-beta.6 → 3.0.0-beta.8
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.
- package/.eslintrc.cjs +4 -1
- package/dist/multi/141.app-4375537b.js +1 -0
- package/dist/multi/222.app-4375537b.js +1 -0
- package/dist/multi/335.app-4375537b.js +1 -0
- package/dist/multi/34.app-4375537b.js +1 -0
- package/dist/multi/349.app-4375537b.js +1 -0
- package/dist/multi/378.app-4375537b.js +1 -0
- package/dist/multi/406.app-4375537b.js +1 -0
- package/dist/multi/476.app-4375537b.js +1 -0
- package/dist/multi/53.app-4375537b.js +1 -0
- package/dist/multi/584.app-4375537b.js +1 -0
- package/dist/multi/690.app-4375537b.js +1 -0
- package/dist/multi/747.app-4375537b.js +1 -0
- package/dist/multi/767.app-4375537b.js +1 -0
- package/dist/multi/83.app-4375537b.js +1 -0
- package/dist/multi/873.app-4375537b.js +1 -0
- package/dist/multi/920.app-4375537b.js +1 -0
- package/dist/multi/991.app-4375537b.js +1 -0
- package/dist/multi/app-4375537b.js +2 -0
- package/dist/multi/manifest.json +20 -20
- package/dist/multi/styles-4375537b.css +283 -0
- package/dist/single/app-f16f6693.js +2 -0
- package/dist/single/manifest.json +1 -1
- package/package.json +6 -4
- package/src/assets/scss/fonts.scss +2 -20
- package/src/components/{app/ArrowButton → ArrowButton}/index.tsx +3 -4
- package/src/components/{app/BaseLayout → BaseLayout}/index.tsx +17 -16
- package/src/components/{app/Footer → Footer}/FooterLogo.tsx +2 -2
- package/src/components/Footer/FooterVersion.tsx +33 -0
- package/src/components/Footer/index.tsx +13 -0
- package/src/components/Header/index.tsx +14 -0
- package/src/components/{app/LanguagePicker → LanguagePicker}/index.tsx +2 -3
- package/src/components/MainReport/index.tsx +19 -0
- package/src/components/{app/Metadata → Metadata}/index.tsx +23 -16
- package/src/components/{app/Metadata → Metadata}/styles.scss +1 -1
- package/src/components/{app/MetadataButton → MetadataButton}/index.tsx +3 -4
- package/src/components/{app/Modal → Modal}/index.tsx +9 -19
- package/src/components/{app/ReportBody → ReportBody}/Filters.tsx +7 -11
- package/src/components/{app/ReportBody → ReportBody}/HeaderActions.tsx +1 -1
- package/src/components/{app/ReportBody → ReportBody}/SortBy.tsx +12 -14
- package/src/components/{app/ReportBody → ReportBody}/index.tsx +2 -2
- package/src/components/{app/ReportHeader → ReportHeader}/ReportHeaderLabelList.tsx +2 -2
- package/src/components/{app/ReportHeader → ReportHeader}/ReportHeaderLogo.tsx +2 -2
- package/src/components/{app/ReportHeader → ReportHeader}/ReportHeaderPie.tsx +2 -2
- package/src/components/{app/ReportHeader → ReportHeader}/index.tsx +5 -5
- package/src/components/{app/ReportLogo → ReportLogo}/index.tsx +3 -4
- package/src/components/{app/ReportLogoFull → ReportLogoFull}/index.tsx +3 -4
- package/src/components/{app/ReportMetadata → ReportMetadata}/MetadataItem.tsx +2 -2
- package/src/components/{app/ReportMetadata → ReportMetadata}/MetadataSummary.tsx +8 -10
- package/src/components/{app/ReportMetadata → ReportMetadata}/MetadataTestType.tsx +5 -5
- package/src/components/ReportMetadata/MetadataWithIcon.tsx +21 -0
- package/src/components/{app/ReportMetadata → ReportMetadata}/index.tsx +5 -5
- package/src/components/{app/ReportMetadata → ReportMetadata}/styles.scss +1 -1
- package/src/components/{app/Tabs → Tabs}/index.tsx +1 -1
- package/src/components/{app/TestResult → TestResult}/TestResultAttachmentsView/index.tsx +1 -1
- package/src/components/{app/TestResult → TestResult}/TestResultDescription/index.tsx +4 -4
- package/src/components/TestResult/TestResultDropdown/index.tsx +23 -0
- package/src/components/{app/TestResult → TestResult}/TestResultEmpty/index.tsx +5 -6
- package/src/components/TestResult/TestResultError/index.tsx +59 -0
- package/src/components/{app/TestResult → TestResult}/TestResultHeader/index.tsx +10 -10
- package/src/components/{app/TestResult → TestResult}/TestResultHistory/TestResultHistoryItem.tsx +16 -17
- package/src/components/{app/TestResult → TestResult}/TestResultHistory/index.tsx +2 -2
- package/src/components/{app/TestResult → TestResult}/TestResultInfo/TestResultInfoStatuses.tsx +8 -9
- package/src/components/{app/TestResult → TestResult}/TestResultInfo/index.tsx +8 -10
- package/src/components/{app/TestResult → TestResult}/TestResultLinks/index.tsx +12 -16
- package/src/components/{app/TestResult → TestResult}/TestResultMetadata/index.tsx +4 -4
- package/src/components/{app/TestResult → TestResult}/TestResultNavigation/index.tsx +7 -9
- package/src/components/{app/TestResult → TestResult}/TestResultOverview.tsx +13 -13
- package/src/components/{app/TestResult → TestResult}/TestResultParameters/index.tsx +4 -4
- package/src/components/{app/TestResult → TestResult}/TestResultPrevStatuses/index.tsx +6 -9
- package/src/components/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +52 -0
- package/src/components/TestResult/TestResultRetriesView/index.tsx +24 -0
- package/src/components/{app/TestResult → TestResult}/TestResultSetup/index.tsx +8 -9
- package/src/components/TestResult/TestResultSeverity/index.tsx +27 -0
- package/src/components/{app/TestResult → TestResult}/TestResultStatus/index.tsx +2 -2
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/attachment.tsx +10 -10
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/attachmentCode.tsx +7 -2
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/attachmentImage.tsx +6 -3
- package/src/components/TestResult/TestResultSteps/attachmentVideo.tsx +15 -0
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/index.tsx +5 -5
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultAttachment.tsx +25 -27
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultAttachmentInfo.tsx +8 -12
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultStep.tsx +25 -18
- package/src/components/TestResult/TestResultSteps/testResultStepInfo.tsx +30 -0
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/wrongAttachment.tsx +1 -1
- package/src/components/{app/TestResult → TestResult}/TestResultTabs/index.tsx +1 -1
- package/src/components/{app/TestResult → TestResult}/TestResultTeardown/index.tsx +6 -6
- package/src/components/{app/TestResult → TestResult}/index.tsx +10 -10
- package/src/components/{app/ThemeButton → ThemeButton}/ThemeButton.tsx +2 -4
- package/src/components/{app/Tree → Tree}/Tree.tsx +3 -10
- package/src/components/{app/Tree → Tree}/TreeHeader.tsx +3 -3
- package/src/components/{app/Tree → Tree}/TreeItem.tsx +2 -2
- package/src/components/Tree/TreeItemIcon.tsx +32 -0
- package/src/components/{app/Tree → Tree}/index.tsx +7 -7
- package/src/i18n/locales/en.json +1 -0
- package/src/index.tsx +2 -2
- package/src/stores/index.ts +1 -1
- package/src/stores/testResults.ts +7 -3
- package/src/stores/tree.ts +1 -1
- package/src/utils/isMac.ts +6 -5
- package/src/utils/treeFilters.ts +107 -58
- package/test/utils/treeFilters.test.ts +25 -1
- package/tsconfig.json +5 -3
- package/vitest.config.ts +7 -1
- package/webpack.config.js +2 -0
- package/dist/multi/141.app-07a6d2ea.js +0 -1
- package/dist/multi/222.app-07a6d2ea.js +0 -1
- package/dist/multi/335.app-07a6d2ea.js +0 -1
- package/dist/multi/34.app-07a6d2ea.js +0 -1
- package/dist/multi/349.app-07a6d2ea.js +0 -1
- package/dist/multi/378.app-07a6d2ea.js +0 -1
- package/dist/multi/406.app-07a6d2ea.js +0 -1
- package/dist/multi/476.app-07a6d2ea.js +0 -1
- package/dist/multi/53.app-07a6d2ea.js +0 -1
- package/dist/multi/584.app-07a6d2ea.js +0 -1
- package/dist/multi/690.app-07a6d2ea.js +0 -1
- package/dist/multi/747.app-07a6d2ea.js +0 -1
- package/dist/multi/767.app-07a6d2ea.js +0 -1
- package/dist/multi/83.app-07a6d2ea.js +0 -1
- package/dist/multi/873.app-07a6d2ea.js +0 -1
- package/dist/multi/920.app-07a6d2ea.js +0 -1
- package/dist/multi/991.app-07a6d2ea.js +0 -1
- package/dist/multi/app-07a6d2ea.js +0 -2
- package/dist/multi/styles-07a6d2ea.css +0 -363
- package/dist/single/app-c2627b69.js +0 -2
- package/src/assets/fonts/JetBrainsMono_vf.woff +0 -0
- package/src/assets/fonts/JetBrainsMono_vf.woff2 +0 -0
- package/src/assets/fonts/pt-root-ui_vf.woff +0 -0
- package/src/assets/fonts/pt-root-ui_vf.woff2 +0 -0
- package/src/assets/scss/mixins.scss +0 -26
- package/src/assets/svg/arrows-chevron-down.svg +0 -5
- package/src/assets/svg/github.svg +0 -5
- package/src/assets/svg/line-alerts-notification-box.svg +0 -3
- package/src/assets/svg/line-arrows-chevron-down-double.svg +0 -3
- package/src/assets/svg/line-arrows-chevron-down.svg +0 -3
- package/src/assets/svg/line-arrows-chevron-right.svg +0 -3
- package/src/assets/svg/line-arrows-chevron-up-double.svg +0 -3
- package/src/assets/svg/line-arrows-chevron-up.svg +0 -3
- package/src/assets/svg/line-arrows-corner-down-right.svg +0 -3
- package/src/assets/svg/line-arrows-expand-3.svg +0 -3
- package/src/assets/svg/line-arrows-refresh-ccw-1.svg +0 -3
- package/src/assets/svg/line-arrows-sort-line-asc.svg +0 -3
- package/src/assets/svg/line-arrows-sort-line-desc.svg +0 -3
- package/src/assets/svg/line-arrows-switch-vertical-1.svg +0 -3
- package/src/assets/svg/line-dev-bug-2.svg +0 -3
- package/src/assets/svg/line-dev-code-square.svg +0 -3
- package/src/assets/svg/line-files-file-attachment-2.svg +0 -3
- package/src/assets/svg/line-general-check.svg +0 -3
- package/src/assets/svg/line-general-checklist3.svg +0 -3
- package/src/assets/svg/line-general-copy-3.svg +0 -3
- package/src/assets/svg/line-general-download-cloud.svg +0 -3
- package/src/assets/svg/line-general-equal.svg +0 -3
- package/src/assets/svg/line-general-home-line.svg +0 -3
- package/src/assets/svg/line-general-link-1.svg +0 -3
- package/src/assets/svg/line-general-link-external.svg +0 -3
- package/src/assets/svg/line-general-search-md.svg +0 -3
- package/src/assets/svg/line-general-settings-1.svg +0 -3
- package/src/assets/svg/line-general-x-close.svg +0 -3
- package/src/assets/svg/line-general-zap.svg +0 -3
- package/src/assets/svg/line-helpers-flag.svg +0 -4
- package/src/assets/svg/line-helpers-play-circle.svg +0 -4
- package/src/assets/svg/line-images-image.svg +0 -3
- package/src/assets/svg/line-security-key.svg +0 -3
- package/src/assets/svg/line-shapes-dot-circle.svg +0 -3
- package/src/assets/svg/line-shapes-moon.svg +0 -3
- package/src/assets/svg/line-shapes-sun.svg +0 -3
- package/src/assets/svg/line-time-clock-stopwatch.svg +0 -3
- package/src/assets/svg/report-logo.svg +0 -64
- package/src/assets/svg/solid-alert-circle.svg +0 -3
- package/src/assets/svg/solid-check-circle.svg +0 -3
- package/src/assets/svg/solid-help-circle.svg +0 -3
- package/src/assets/svg/solid-minus-circle.svg +0 -3
- package/src/assets/svg/solid-x-circle.svg +0 -3
- package/src/assets/svg/spinner.svg +0 -18
- package/src/assets/svg/view-off.svg +0 -12
- package/src/assets/svg/view.svg +0 -11
- package/src/components/app/Footer/FooterVersion.tsx +0 -27
- package/src/components/app/Footer/index.tsx +0 -13
- package/src/components/app/Header/index.tsx +0 -17
- package/src/components/app/MainReport/index.tsx +0 -19
- package/src/components/app/ReportMetadata/MetadataWithIcon.tsx +0 -25
- package/src/components/app/TestResult/TestResultDropdown/index.tsx +0 -19
- package/src/components/app/TestResult/TestResultError/index.tsx +0 -53
- package/src/components/app/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +0 -50
- package/src/components/app/TestResult/TestResultRetriesView/index.tsx +0 -24
- package/src/components/app/TestResult/TestResultSeverity/index.tsx +0 -34
- package/src/components/app/TestResult/TestResultSteps/attachmentVideo.tsx +0 -12
- package/src/components/app/TestResult/TestResultSteps/testResultStepInfo.tsx +0 -33
- package/src/components/app/Tree/TreeItemIcon.tsx +0 -35
- package/src/components/commons/Button/index.tsx +0 -176
- package/src/components/commons/Button/styles.scss +0 -560
- package/src/components/commons/Counter/index.tsx +0 -29
- package/src/components/commons/Counter/styles.scss +0 -21
- package/src/components/commons/Label/index.tsx +0 -11
- package/src/components/commons/Label/styles.scss +0 -7
- package/src/components/commons/Link/index.tsx +0 -20
- package/src/components/commons/Link/styles.scss +0 -46
- package/src/components/commons/Loadable/index.tsx +0 -32
- package/src/components/commons/Menu/index.tsx +0 -198
- package/src/components/commons/Menu/styles.scss +0 -94
- package/src/components/commons/PageLoader/index.tsx +0 -10
- package/src/components/commons/PageLoader/styles.scss +0 -29
- package/src/components/commons/SearchBox/index.tsx +0 -64
- package/src/components/commons/SearchBox/styles.scss +0 -58
- package/src/components/commons/Spinner/index.tsx +0 -8
- package/src/components/commons/SuccessRatePieChart/index.tsx +0 -52
- package/src/components/commons/SuccessRatePieChart/styles.scss +0 -11
- package/src/components/commons/SvgIcon/index.tsx +0 -46
- package/src/components/commons/SvgIcon/styles.scss +0 -26
- package/src/components/commons/Toggle/index.tsx +0 -30
- package/src/components/commons/Toggle/styles.scss +0 -48
- package/src/components/commons/Tooltip/index.tsx +0 -123
- package/src/components/commons/Tooltip/styles.scss +0 -38
- package/src/components/commons/Typography/index.tsx +0 -99
- package/src/hooks/useDebouncedCallback.ts +0 -31
- /package/dist/multi/{816.app-07a6d2ea.js → 816.app-4375537b.js} +0 -0
- /package/dist/multi/{app-07a6d2ea.js.LICENSE.txt → app-4375537b.js.LICENSE.txt} +0 -0
- /package/dist/single/{app-c2627b69.js.LICENSE.txt → app-f16f6693.js.LICENSE.txt} +0 -0
- /package/src/assets/scss/{code.css → code.scss} +0 -0
- /package/src/components/{app/ArrowButton → ArrowButton}/styles.scss +0 -0
- /package/src/components/{app/BaseLayout → BaseLayout}/styles.scss +0 -0
- /package/src/components/{app/Footer → Footer}/styles.scss +0 -0
- /package/src/components/{app/Header → Header}/styles.scss +0 -0
- /package/src/components/{app/MetadataButton → MetadataButton}/styles.scss +0 -0
- /package/src/components/{app/Modal → Modal}/styles.scss +0 -0
- /package/src/components/{app/ReportBody → ReportBody}/context.tsx +0 -0
- /package/src/components/{app/ReportBody → ReportBody}/styles.scss +0 -0
- /package/src/components/{app/ReportHeader → ReportHeader}/styles.scss +0 -0
- /package/src/components/{app/ReportLogo → ReportLogo}/styles.scss +0 -0
- /package/src/components/{app/ReportLogoFull → ReportLogoFull}/styles.scss +0 -0
- /package/src/components/{app/Tabs → Tabs}/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultAttachmentsView/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultDescription/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultDropdown/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultEmpty/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultError/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultHeader/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultHistory/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultInfo/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultLinks/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultMetadata/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultNavigation/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultParameters/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultPrevStatuses/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultRetriesView/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultSeverity/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultStatus/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultSteps/HtmlAttachmentPreview.tsx +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultSteps/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultTabs/styles.scss +0 -0
- /package/src/components/{app/Tree → Tree}/styles.scss +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/web-awesome",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.8",
|
|
4
4
|
"description": "The static files for Allure Awesome Report",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -31,8 +31,9 @@
|
|
|
31
31
|
"IE 11"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@allurereport/core-api": "3.0.0-beta.
|
|
35
|
-
"@allurereport/web-commons": "3.0.0-beta.
|
|
34
|
+
"@allurereport/core-api": "3.0.0-beta.8",
|
|
35
|
+
"@allurereport/web-commons": "3.0.0-beta.8",
|
|
36
|
+
"@allurereport/web-components": "3.0.0-beta.8",
|
|
36
37
|
"@preact/signals": "^1.3.0",
|
|
37
38
|
"clsx": "^2.1.1",
|
|
38
39
|
"d3-shape": "^3.2.0",
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
"@typescript-eslint/parser": "^8.0.0",
|
|
61
62
|
"@vitest/runner": "^2.1.8",
|
|
62
63
|
"@vitest/snapshot": "^2.1.8",
|
|
63
|
-
"allure-vitest": "^3.0.
|
|
64
|
+
"allure-vitest": "^3.0.9",
|
|
64
65
|
"autoprefixer": "^10.4.20",
|
|
65
66
|
"babel-loader": "^9.2.1",
|
|
66
67
|
"babel-plugin-prismjs": "^2.1.0",
|
|
@@ -79,6 +80,7 @@
|
|
|
79
80
|
"eslint-plugin-react": "^7.36.1",
|
|
80
81
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
81
82
|
"filesize": "^10.1.6",
|
|
83
|
+
"fork-ts-checker-webpack-plugin": "^9.0.2",
|
|
82
84
|
"globals": "^15.9.0",
|
|
83
85
|
"html-webpack-plugin": "^5.6.3",
|
|
84
86
|
"mini-css-extract-plugin": "^2.9.1",
|
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
@
|
|
2
|
-
font-family: "PTRootUIWebVF";
|
|
3
|
-
font-display: swap;
|
|
4
|
-
font-weight: 300 700;
|
|
5
|
-
src:
|
|
6
|
-
url("../fonts/pt-root-ui_vf.woff2") format("woff2 supports variations"),
|
|
7
|
-
url("../fonts/pt-root-ui_vf.woff2") format("woff2-variations"),
|
|
8
|
-
url("../fonts/pt-root-ui_vf.woff") format("woff supports variations"),
|
|
9
|
-
url("../fonts/pt-root-ui_vf.woff") format("woff-variations");
|
|
10
|
-
}
|
|
1
|
+
@import "~@allurereport/web-components/mixins.scss";
|
|
11
2
|
|
|
12
|
-
@
|
|
13
|
-
font-family: JetBrainsMonoVF;
|
|
14
|
-
font-display: swap;
|
|
15
|
-
font-weight: 100 800;
|
|
16
|
-
src:
|
|
17
|
-
url("../fonts/JetBrainsMono_vf.woff2") format("woff2 supports variations"),
|
|
18
|
-
url("../fonts/JetBrainsMono_vf.woff2") format("woff2-variations"),
|
|
19
|
-
url("../fonts/JetBrainsMono_vf.woff") format("woff supports variations"),
|
|
20
|
-
url("../fonts/JetBrainsMono_vf.woff") format("woff-variations");
|
|
21
|
-
}
|
|
3
|
+
@include allure-fonts;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { SvgIcon, allureIcons } from "@allurereport/web-components";
|
|
1
2
|
import { clsx } from "clsx";
|
|
2
3
|
import type { FunctionalComponent } from "preact";
|
|
3
|
-
import lineChevronDown from "@/assets/svg/line-arrows-chevron-down.svg";
|
|
4
|
-
import { SvgIcon } from "@/components/commons/SvgIcon";
|
|
5
4
|
import * as styles from "./styles.scss";
|
|
6
5
|
|
|
7
6
|
export interface ArrowButtonProps {
|
|
@@ -17,13 +16,13 @@ export const ArrowButton: FunctionalComponent<ArrowButtonProps> = ({
|
|
|
17
16
|
buttonSize = "m",
|
|
18
17
|
iconSize = "xs",
|
|
19
18
|
className,
|
|
20
|
-
icon,
|
|
19
|
+
icon = allureIcons.lineArrowsChevronDown,
|
|
21
20
|
...rest
|
|
22
21
|
}) => {
|
|
23
22
|
return (
|
|
24
23
|
<button className={clsx(styles["arrow-button"], styles[`arrow-button-${buttonSize}`])} {...rest}>
|
|
25
24
|
<SvgIcon
|
|
26
|
-
id={icon
|
|
25
|
+
id={icon}
|
|
27
26
|
size={iconSize}
|
|
28
27
|
className={clsx(
|
|
29
28
|
styles["arrow-button-icon"],
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { ensureReportDataReady
|
|
1
|
+
import { ensureReportDataReady } from "@allurereport/web-commons";
|
|
2
|
+
import { Loadable, PageLoader } from "@allurereport/web-components";
|
|
2
3
|
import { useEffect } from "preact/compat";
|
|
3
|
-
import { Footer } from "@/components/
|
|
4
|
-
import MainReport from "@/components/
|
|
5
|
-
import Modal from "@/components/
|
|
6
|
-
import TestResult from "@/components/
|
|
7
|
-
import { Loadable } from "@/components/commons/Loadable";
|
|
8
|
-
import { PageLoader } from "@/components/commons/PageLoader";
|
|
4
|
+
import { Footer } from "@/components/Footer";
|
|
5
|
+
import MainReport from "@/components/MainReport";
|
|
6
|
+
import Modal from "@/components/Modal";
|
|
7
|
+
import TestResult from "@/components/TestResult";
|
|
9
8
|
import { fetchStats, getLocale, getTheme } from "@/stores";
|
|
10
9
|
import { fetchPieChartData } from "@/stores/chart";
|
|
11
10
|
import { fetchEnvInfo } from "@/stores/envInfo";
|
|
@@ -13,7 +12,11 @@ import { fetchTestResult, fetchTestResultNav, testResultStore } from "@/stores/t
|
|
|
13
12
|
import { fetchTreeData, treeStore } from "@/stores/tree";
|
|
14
13
|
import * as styles from "./styles.scss";
|
|
15
14
|
|
|
16
|
-
export
|
|
15
|
+
export type BaseLayoutProps = {
|
|
16
|
+
testResultId?: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const BaseLayout = ({ testResultId }: BaseLayoutProps) => {
|
|
17
20
|
useEffect(() => {
|
|
18
21
|
getTheme();
|
|
19
22
|
getLocale();
|
|
@@ -24,13 +27,11 @@ export const BaseLayout = ({ testResultId }) => {
|
|
|
24
27
|
fetchTestResult(testResultId);
|
|
25
28
|
fetchTestResultNav();
|
|
26
29
|
} else {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
fetchEnvInfo(),
|
|
33
|
-
]);
|
|
30
|
+
ensureReportDataReady();
|
|
31
|
+
fetchStats();
|
|
32
|
+
fetchPieChartData();
|
|
33
|
+
fetchTreeData();
|
|
34
|
+
fetchEnvInfo();
|
|
34
35
|
}
|
|
35
36
|
}, [testResultId]);
|
|
36
37
|
|
|
@@ -42,7 +43,7 @@ export const BaseLayout = ({ testResultId }) => {
|
|
|
42
43
|
renderData={(testResult) => (
|
|
43
44
|
<>
|
|
44
45
|
<Modal testResult={testResult} />
|
|
45
|
-
<div className={styles.wrapper}>
|
|
46
|
+
<div className={styles.wrapper} key={testResult?.id}>
|
|
46
47
|
<TestResult testResult={testResult} />
|
|
47
48
|
<Footer />
|
|
48
49
|
</div>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Text } from "
|
|
1
|
+
import { Text } from "@allurereport/web-components";
|
|
2
2
|
import { ReportLogoFull } from "../ReportLogoFull";
|
|
3
3
|
import * as styles from "./styles.scss";
|
|
4
4
|
|
|
5
5
|
export const FooterLogo = () => {
|
|
6
6
|
return (
|
|
7
7
|
<div className={styles["footer-logo"]}>
|
|
8
|
-
<a href="https://allurereport.org" target={"_blank"}>
|
|
8
|
+
<a href="https://allurereport.org" target={"_blank"} rel="noreferrer">
|
|
9
9
|
<Text type="paragraph" size="m" className={styles["footer-logo"]}>
|
|
10
10
|
Powered by
|
|
11
11
|
</Text>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { getReportOptions } from "@allurereport/web-commons";
|
|
2
|
+
import { Text } from "@allurereport/web-components";
|
|
3
|
+
import { useEffect, useState } from "preact/hooks";
|
|
4
|
+
import type { AllureAwesomeReportOptions } from "types";
|
|
5
|
+
import { currentLocaleIso } from "@/stores";
|
|
6
|
+
import * as styles from "./styles.scss";
|
|
7
|
+
|
|
8
|
+
export const FooterVersion = () => {
|
|
9
|
+
const [createdAt, setCreatedAt] = useState<number | null>(null);
|
|
10
|
+
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const reportOptions = getReportOptions<AllureAwesomeReportOptions>();
|
|
13
|
+
if (reportOptions?.createdAt) {
|
|
14
|
+
setCreatedAt(Number(reportOptions.createdAt));
|
|
15
|
+
}
|
|
16
|
+
}, []);
|
|
17
|
+
|
|
18
|
+
const formattedCreatedAt = new Date(createdAt as number).toLocaleDateString(currentLocaleIso.value as string, {
|
|
19
|
+
month: "numeric",
|
|
20
|
+
day: "numeric",
|
|
21
|
+
year: "numeric",
|
|
22
|
+
hour: "numeric",
|
|
23
|
+
minute: "numeric",
|
|
24
|
+
second: "numeric",
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<Text type="paragraph" size="m" className={styles.version}>
|
|
29
|
+
{formattedCreatedAt}
|
|
30
|
+
<span> Ver: 3.0.0</span>
|
|
31
|
+
</Text>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import * as styles from "@/components/BaseLayout/styles.scss";
|
|
3
|
+
import { FooterLogo } from "@/components/Footer/FooterLogo";
|
|
4
|
+
import { FooterVersion } from "@/components/Footer/FooterVersion";
|
|
5
|
+
|
|
6
|
+
export const Footer = () => {
|
|
7
|
+
return (
|
|
8
|
+
<div className={clsx(styles.below)}>
|
|
9
|
+
<FooterLogo />
|
|
10
|
+
<FooterVersion />
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LanguagePicker } from "@/components/LanguagePicker";
|
|
2
|
+
import { ThemeButton } from "@/components/ThemeButton/ThemeButton";
|
|
3
|
+
import * as styles from "./styles.scss";
|
|
4
|
+
|
|
5
|
+
export const Header = () => {
|
|
6
|
+
return (
|
|
7
|
+
<div className={styles.above}>
|
|
8
|
+
<div className={styles.right}>
|
|
9
|
+
<LanguagePicker />
|
|
10
|
+
<ThemeButton />
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
);
|
|
14
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DropdownButton } from "
|
|
1
|
+
import { DropdownButton, Menu } from "@allurereport/web-components";
|
|
2
2
|
import { LANG_LOCALE, type LangLocale } from "@/i18n/constants";
|
|
3
3
|
import { currentLocale } from "@/stores";
|
|
4
4
|
import { setLocale } from "@/stores/locale";
|
|
5
|
-
import { Menu } from "../../commons/Menu";
|
|
6
5
|
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
7
7
|
const langPickerOptions = Object.entries(LANG_LOCALE).map(([key, { full }]) => ({
|
|
8
8
|
key: key as LangLocale,
|
|
9
9
|
value: full,
|
|
@@ -11,7 +11,6 @@ const langPickerOptions = Object.entries(LANG_LOCALE).map(([key, { full }]) => (
|
|
|
11
11
|
|
|
12
12
|
export const LanguagePicker = () => {
|
|
13
13
|
const locale = currentLocale.value;
|
|
14
|
-
|
|
15
14
|
const handleSelect = (selectedOption: LangLocale) => {
|
|
16
15
|
setLocale(selectedOption);
|
|
17
16
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as styles from "@/components/BaseLayout/styles.scss";
|
|
2
|
+
import { Header } from "@/components/Header";
|
|
3
|
+
import { ReportBody } from "@/components/ReportBody";
|
|
4
|
+
import { ReportHeader } from "@/components/ReportHeader";
|
|
5
|
+
import { ReportMetadata } from "@/components/ReportMetadata";
|
|
6
|
+
|
|
7
|
+
const MainReport = () => {
|
|
8
|
+
return (
|
|
9
|
+
<>
|
|
10
|
+
<Header />
|
|
11
|
+
<div className={styles.content}>
|
|
12
|
+
<ReportHeader />
|
|
13
|
+
<ReportMetadata />
|
|
14
|
+
<ReportBody />
|
|
15
|
+
</div>
|
|
16
|
+
</>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
export default MainReport;
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
+
import { Button, Menu, Text, allureIcons } from "@allurereport/web-components";
|
|
1
2
|
import clsx from "clsx";
|
|
2
|
-
import
|
|
3
|
-
import { FunctionalComponent } from "preact";
|
|
3
|
+
import type { FunctionalComponent } from "preact";
|
|
4
4
|
import { useState } from "preact/hooks";
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import { MetadataProps } from "@/components/app/ReportMetadata";
|
|
8
|
-
import { Button } from "@/components/commons/Button";
|
|
9
|
-
import { Menu } from "@/components/commons/Menu";
|
|
10
|
-
import { Text } from "@/components/commons/Typography";
|
|
5
|
+
import { MetadataButton } from "@/components/MetadataButton";
|
|
6
|
+
import type { MetadataProps } from "@/components/ReportMetadata";
|
|
11
7
|
import { useI18n } from "@/stores/locale";
|
|
12
8
|
import { copyToClipboard } from "@/utils/copyToClipboard";
|
|
13
9
|
import * as styles from "./styles.scss";
|
|
14
10
|
|
|
15
|
-
const { t } = useI18n("ui");
|
|
16
|
-
|
|
17
11
|
export const MetadataList: FunctionalComponent<MetadataProps & { columns?: number }> = ({
|
|
18
12
|
envInfo,
|
|
19
13
|
size = "m",
|
|
@@ -24,8 +18,8 @@ export const MetadataList: FunctionalComponent<MetadataProps & { columns?: numbe
|
|
|
24
18
|
class={styles["report-metadata-list"]}
|
|
25
19
|
style={{ gridTemplateColumns: `repeat(${columns}, ${100 / columns - 5}%)` }}
|
|
26
20
|
>
|
|
27
|
-
{envInfo?.map((
|
|
28
|
-
<MetadataKeyValue size={size} title={
|
|
21
|
+
{envInfo?.map(({ name, values, value }) => (
|
|
22
|
+
<MetadataKeyValue key={name} size={size} title={name} value={value} values={values} />
|
|
29
23
|
))}
|
|
30
24
|
</div>
|
|
31
25
|
);
|
|
@@ -35,14 +29,18 @@ export const TestResultMetadataList: FunctionalComponent<MetadataProps> = ({ gro
|
|
|
35
29
|
return (
|
|
36
30
|
<div class={styles["report-metadata-list"]}>
|
|
37
31
|
{groupedLabels &&
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
38
33
|
Object.entries(groupedLabels)?.map(([name, values]) => (
|
|
39
|
-
<MetadataKeyValue size={size} title={name} values={values} />
|
|
34
|
+
<MetadataKeyValue key={name} size={size} title={name} values={values} />
|
|
40
35
|
))}
|
|
41
36
|
</div>
|
|
42
37
|
);
|
|
43
38
|
};
|
|
39
|
+
|
|
44
40
|
export const Metadata: FunctionalComponent<MetadataProps> = ({ envInfo }) => {
|
|
41
|
+
const { t } = useI18n("ui");
|
|
45
42
|
const [isOpened, setIsOpen] = useState(true);
|
|
43
|
+
|
|
46
44
|
return (
|
|
47
45
|
<div class={styles["report-metadata"]}>
|
|
48
46
|
<MetadataButton isOpened={isOpened} setIsOpen={setIsOpen} counter={envInfo.length} title={t("metadata")} />
|
|
@@ -50,17 +48,26 @@ export const Metadata: FunctionalComponent<MetadataProps> = ({ envInfo }) => {
|
|
|
50
48
|
</div>
|
|
51
49
|
);
|
|
52
50
|
};
|
|
53
|
-
|
|
51
|
+
|
|
52
|
+
const MetadataTooltip = (props: { value: string }) => {
|
|
53
|
+
const { value } = props;
|
|
54
54
|
const { t } = useI18n("ui");
|
|
55
|
+
|
|
55
56
|
return (
|
|
56
57
|
<div className={styles["metadata-tooltip"]}>
|
|
57
58
|
<div className={styles["metadata-tooltip-value"]}>
|
|
58
59
|
<Text>{value}</Text>
|
|
59
60
|
</div>
|
|
60
|
-
<Button
|
|
61
|
+
<Button
|
|
62
|
+
style={"outline"}
|
|
63
|
+
icon={allureIcons.lineGeneralCopy3}
|
|
64
|
+
text={t("copy")}
|
|
65
|
+
onClick={() => copyToClipboard(value)}
|
|
66
|
+
/>
|
|
61
67
|
</div>
|
|
62
68
|
);
|
|
63
69
|
};
|
|
70
|
+
|
|
64
71
|
const MetaDataKeyLabel: FunctionalComponent<{
|
|
65
72
|
size?: "s" | "m";
|
|
66
73
|
value: string;
|
|
@@ -101,7 +108,7 @@ const MetadataKeyValue: FunctionalComponent<{
|
|
|
101
108
|
{values?.length ? (
|
|
102
109
|
<div className={styles["report-metadata-values"]}>
|
|
103
110
|
{values.map((item) => (
|
|
104
|
-
<MetaDataKeyLabel value={item} />
|
|
111
|
+
<MetaDataKeyLabel key={item} value={item} />
|
|
105
112
|
))}
|
|
106
113
|
</div>
|
|
107
114
|
) : (
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { Counter, Text } from "@allurereport/web-components";
|
|
1
2
|
import clsx from "clsx";
|
|
2
|
-
import { FunctionalComponent } from "preact";
|
|
3
|
-
import { ArrowButton } from "@/components/
|
|
4
|
-
import { Counter } from "@/components/commons/Counter";
|
|
5
|
-
import { Text } from "@/components/commons/Typography";
|
|
3
|
+
import type { FunctionalComponent } from "preact";
|
|
4
|
+
import { ArrowButton } from "@/components/ArrowButton";
|
|
6
5
|
import * as styles from "./styles.scss";
|
|
7
6
|
|
|
8
7
|
interface MetadataButtonProps {
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import type { AttachmentTestStepResult } from "@allurereport/core-api";
|
|
2
|
+
import { Button, Heading, IconButton, TooltipWrapper, allureIcons } from "@allurereport/web-components";
|
|
2
3
|
import { signal } from "@preact/signals";
|
|
3
4
|
import type { FunctionalComponent, VNode } from "preact";
|
|
4
5
|
import { useEffect } from "preact/hooks";
|
|
5
6
|
import Prism from "prismjs";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import LineGeneralXClose from "@/assets/svg/line-general-x-close.svg";
|
|
9
|
-
import ViewOffIcon from "@/assets/svg/view-off.svg";
|
|
10
|
-
import ViewIcon from "@/assets/svg/view.svg";
|
|
11
|
-
import { Attachment } from "@/components/app/TestResult/TestResultSteps/attachment";
|
|
12
|
-
import { Button, IconButton } from "@/components/commons/Button";
|
|
13
|
-
import { TooltipWrapper } from "@/components/commons/Tooltip";
|
|
14
|
-
import { Heading } from "@/components/commons/Typography";
|
|
7
|
+
import type { AllureAwesomeTestResult } from "types";
|
|
8
|
+
import { Attachment } from "@/components/TestResult/TestResultSteps/attachment";
|
|
15
9
|
import { attachmentType, downloadAttachment, openAttachmentInNewTab } from "@/utils/attachments";
|
|
16
|
-
import type { AllureAwesomeTestResult } from "../../../../types.js";
|
|
17
10
|
import * as styles from "./styles.scss";
|
|
18
11
|
|
|
19
12
|
export const isModalOpen = signal(false);
|
|
@@ -43,7 +36,7 @@ const closeModal = () => {
|
|
|
43
36
|
isModalOpen.value = false;
|
|
44
37
|
};
|
|
45
38
|
|
|
46
|
-
const ModalThumb = ({ item, children }) => {
|
|
39
|
+
const ModalThumb: FunctionalComponent<{ item: AttachmentTestStepResult }> = ({ item, children }) => {
|
|
47
40
|
const isActiveThumb = modalData.value.data?.link?.id === item.link?.id;
|
|
48
41
|
|
|
49
42
|
const showAttach = (showedItem: AttachmentTestStepResult) => {
|
|
@@ -54,10 +47,7 @@ const ModalThumb = ({ item, children }) => {
|
|
|
54
47
|
};
|
|
55
48
|
|
|
56
49
|
return (
|
|
57
|
-
<div
|
|
58
|
-
className={`${styles["modal-thumb"]} ${isActiveThumb ? styles.active : ""}`}
|
|
59
|
-
onClick={() => showAttach(item as AttachmentTestStepResult)}
|
|
60
|
-
>
|
|
50
|
+
<div className={`${styles["modal-thumb"]} ${isActiveThumb ? styles.active : ""}`} onClick={() => showAttach(item)}>
|
|
61
51
|
{children}
|
|
62
52
|
</div>
|
|
63
53
|
);
|
|
@@ -136,7 +126,7 @@ const Modal: FunctionalComponent<ModalProps> = ({ testResult }) => {
|
|
|
136
126
|
<Button
|
|
137
127
|
style={"outline"}
|
|
138
128
|
onClick={openInNewWindow}
|
|
139
|
-
icon={
|
|
129
|
+
icon={allureIcons.lineGeneralLinkExternal}
|
|
140
130
|
text={"Open in new tab"}
|
|
141
131
|
/>
|
|
142
132
|
)}
|
|
@@ -146,7 +136,7 @@ const Modal: FunctionalComponent<ModalProps> = ({ testResult }) => {
|
|
|
146
136
|
style={"outline"}
|
|
147
137
|
size={"m"}
|
|
148
138
|
iconSize={"s"}
|
|
149
|
-
icon={modalData.value.preview ?
|
|
139
|
+
icon={modalData.value.preview ? allureIcons.viewOff : allureIcons.view}
|
|
150
140
|
onClick={() => {
|
|
151
141
|
modalData.value = {
|
|
152
142
|
...modalData.value,
|
|
@@ -161,11 +151,11 @@ const Modal: FunctionalComponent<ModalProps> = ({ testResult }) => {
|
|
|
161
151
|
style={"outline"}
|
|
162
152
|
size={"m"}
|
|
163
153
|
iconSize={"s"}
|
|
164
|
-
icon={
|
|
154
|
+
icon={allureIcons.lineGeneralDownloadCloud}
|
|
165
155
|
onClick={(e: MouseEvent) => downloadData(e)}
|
|
166
156
|
/>
|
|
167
157
|
</TooltipWrapper>
|
|
168
|
-
<IconButton iconSize={"m"} style={"ghost"} onClick={closeModal} icon={
|
|
158
|
+
<IconButton iconSize={"m"} style={"ghost"} onClick={closeModal} icon={allureIcons.lineGeneralXClose} />
|
|
169
159
|
</div>
|
|
170
160
|
</div>
|
|
171
161
|
<div className={styles["modal-data"]}>
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import zapIcon from "@/assets/svg/line-general-zap.svg";
|
|
5
|
-
import { Button } from "@/components/commons/Button";
|
|
6
|
-
import { Menu } from "@/components/commons/Menu";
|
|
7
|
-
import { Toggle } from "@/components/commons/Toggle";
|
|
1
|
+
import { Button, allureIcons } from "@allurereport/web-components";
|
|
2
|
+
import { Menu } from "@allurereport/web-components";
|
|
3
|
+
import { Toggle } from "@allurereport/web-components";
|
|
8
4
|
import { useI18n } from "@/stores/locale";
|
|
9
5
|
import { setTreeFilter, treeFiltersStore } from "@/stores/tree";
|
|
10
6
|
import * as styles from "./styles.scss";
|
|
@@ -19,7 +15,7 @@ export const Filters = () => {
|
|
|
19
15
|
menuTrigger={({ isOpened, onClick }) => (
|
|
20
16
|
<div className={hasFilter && styles.filtersBtnWithFilters}>
|
|
21
17
|
<Button
|
|
22
|
-
icon={
|
|
18
|
+
icon={allureIcons.lineGeneralSettings1}
|
|
23
19
|
text={t("more-filters")}
|
|
24
20
|
size="m"
|
|
25
21
|
style="outline"
|
|
@@ -37,7 +33,7 @@ export const Filters = () => {
|
|
|
37
33
|
onClick={() => {
|
|
38
34
|
setTreeFilter("flaky", !flaky);
|
|
39
35
|
}}
|
|
40
|
-
leadingIcon={
|
|
36
|
+
leadingIcon={allureIcons.lineGeneralZap}
|
|
41
37
|
rightSlot={
|
|
42
38
|
<div className={styles.filterToggle}>
|
|
43
39
|
<Toggle
|
|
@@ -56,7 +52,7 @@ export const Filters = () => {
|
|
|
56
52
|
closeMenuOnClick={false}
|
|
57
53
|
ariaLabel={t("enable-filter", { filter: t("retry") })}
|
|
58
54
|
onClick={() => setTreeFilter("retry", !retry)}
|
|
59
|
-
leadingIcon={
|
|
55
|
+
leadingIcon={allureIcons.lineArrowsRefreshCcw1}
|
|
60
56
|
rightSlot={
|
|
61
57
|
<div className={styles.filterToggle}>
|
|
62
58
|
<Toggle
|
|
@@ -75,7 +71,7 @@ export const Filters = () => {
|
|
|
75
71
|
closeMenuOnClick={false}
|
|
76
72
|
ariaLabel={t("enable-filter", { filter: t("new") })}
|
|
77
73
|
onClick={() => setTreeFilter("new", !isNew)}
|
|
78
|
-
leadingIcon={
|
|
74
|
+
leadingIcon={allureIcons.lineAlertsNotificationBox}
|
|
79
75
|
rightSlot={
|
|
80
76
|
<div className={styles.filterToggle}>
|
|
81
77
|
<Toggle
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { SearchBox } from "@allurereport/web-components";
|
|
1
2
|
import { useI18n } from "@/stores/locale";
|
|
2
3
|
import { setTreeQuery, treeFiltersStore } from "@/stores/tree";
|
|
3
|
-
import { SearchBox } from "../../commons/SearchBox";
|
|
4
4
|
import { Filters } from "./Filters";
|
|
5
5
|
import * as styles from "./styles.scss";
|
|
6
6
|
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
+
import { DropdownButton, allureIcons } from "@allurereport/web-components";
|
|
2
|
+
import { Link } from "@allurereport/web-components";
|
|
3
|
+
import { Menu } from "@allurereport/web-components";
|
|
4
|
+
import { SvgIcon } from "@allurereport/web-components";
|
|
5
|
+
import { Text } from "@allurereport/web-components";
|
|
1
6
|
import clsx from "clsx";
|
|
2
7
|
import type { ComponentChildren } from "preact";
|
|
3
|
-
import lineChevronDownIcon from "@/assets/svg/line-arrows-chevron-down.svg";
|
|
4
|
-
import sortAscIcon from "@/assets/svg/line-arrows-sort-line-asc.svg";
|
|
5
|
-
import sortDescIcon from "@/assets/svg/line-arrows-sort-line-desc.svg";
|
|
6
|
-
import switchVerticalIcon from "@/assets/svg/line-arrows-switch-vertical-1.svg";
|
|
7
8
|
import { useI18n } from "@/stores/locale";
|
|
8
9
|
import { setTreeDirection, setTreeSortBy, treeFiltersStore } from "@/stores/tree";
|
|
9
|
-
import { DropdownButton } from "../../commons/Button";
|
|
10
|
-
import { Link } from "../../commons/Link";
|
|
11
|
-
import { Menu } from "../../commons/Menu";
|
|
12
|
-
import { SvgIcon } from "../../commons/SvgIcon";
|
|
13
|
-
import { Text } from "../../commons/Typography";
|
|
14
10
|
import * as styles from "./styles.scss";
|
|
15
11
|
|
|
16
12
|
const BtnWrapper = ({ children }: { children: ComponentChildren }) => {
|
|
@@ -40,7 +36,7 @@ export const SortBy = () => {
|
|
|
40
36
|
{displayedSortByValue} {displayedDirection}
|
|
41
37
|
<SvgIcon
|
|
42
38
|
size="s"
|
|
43
|
-
id={
|
|
39
|
+
id={allureIcons.lineArrowsChevronDown}
|
|
44
40
|
className={clsx(styles.sortByIcon, isOpened && styles.sortByIconReversed)}
|
|
45
41
|
/>
|
|
46
42
|
</Link>
|
|
@@ -54,7 +50,7 @@ export const SortBy = () => {
|
|
|
54
50
|
<Menu.Item
|
|
55
51
|
closeMenuOnClick={false}
|
|
56
52
|
onClick={onClick}
|
|
57
|
-
leadingIcon={
|
|
53
|
+
leadingIcon={allureIcons.lineArrowsSwitchVertical1}
|
|
58
54
|
rightSlot={
|
|
59
55
|
<BtnWrapper>
|
|
60
56
|
<DropdownButton
|
|
@@ -92,7 +88,9 @@ export const SortBy = () => {
|
|
|
92
88
|
<Menu.Item
|
|
93
89
|
closeMenuOnClick={false}
|
|
94
90
|
onClick={onClick}
|
|
95
|
-
leadingIcon={
|
|
91
|
+
leadingIcon={
|
|
92
|
+
direction === "asc" ? allureIcons.lineArrowsSortLineAsc : allureIcons.lineArrowsSortLineDesc
|
|
93
|
+
}
|
|
96
94
|
rightSlot={
|
|
97
95
|
<BtnWrapper>
|
|
98
96
|
<DropdownButton
|
|
@@ -112,14 +110,14 @@ export const SortBy = () => {
|
|
|
112
110
|
<Menu.Section>
|
|
113
111
|
<Menu.ItemWithCheckmark
|
|
114
112
|
onClick={() => setTreeDirection("asc")}
|
|
115
|
-
leadingIcon={
|
|
113
|
+
leadingIcon={allureIcons.lineArrowsSortLineAsc}
|
|
116
114
|
isChecked={direction === "asc"}
|
|
117
115
|
>
|
|
118
116
|
{sortByDirectionsLocale(`${sortBy}-asc`)}
|
|
119
117
|
</Menu.ItemWithCheckmark>
|
|
120
118
|
<Menu.ItemWithCheckmark
|
|
121
119
|
onClick={() => setTreeDirection("desc")}
|
|
122
|
-
leadingIcon={
|
|
120
|
+
leadingIcon={allureIcons.lineArrowsSortLineDesc}
|
|
123
121
|
isChecked={direction === "desc"}
|
|
124
122
|
>
|
|
125
123
|
{sortByDirectionsLocale(`${sortBy}-desc`)}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { statusesList } from "@allurereport/core-api";
|
|
2
|
-
import { Loadable } from "
|
|
2
|
+
import { Loadable } from "@allurereport/web-components";
|
|
3
|
+
import { Counter } from "@allurereport/web-components";
|
|
3
4
|
import { statsStore } from "@/stores";
|
|
4
5
|
import { useI18n } from "@/stores/locale";
|
|
5
6
|
import { capitalize } from "@/utils/capitalize";
|
|
6
|
-
import { Counter } from "../../commons/Counter";
|
|
7
7
|
import { Tab, Tabs, TabsList } from "../Tabs";
|
|
8
8
|
import { TreeList } from "../Tree";
|
|
9
9
|
import { HeaderActions } from "./HeaderActions";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { Label } from "@allurereport/web-components";
|
|
2
|
+
import * as styles from "@/components/ReportHeader/styles.scss";
|
|
3
3
|
|
|
4
4
|
export const ReportHeaderLabelList = () => {
|
|
5
5
|
return (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as styles from "@/components/
|
|
2
|
-
import { ReportLogo } from "@/components/
|
|
1
|
+
import * as styles from "@/components/ReportHeader/styles.scss";
|
|
2
|
+
import { ReportLogo } from "@/components/ReportLogo";
|
|
3
3
|
|
|
4
4
|
export const ReportHeaderLogo = () => {
|
|
5
5
|
return (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Loadable } from "
|
|
2
|
-
import { SuccessRatePieChart } from "
|
|
1
|
+
import { Loadable } from "@allurereport/web-components";
|
|
2
|
+
import { SuccessRatePieChart } from "@allurereport/web-components";
|
|
3
3
|
import { pieChartStore } from "@/stores/chart";
|
|
4
4
|
import * as styles from "./styles.scss";
|
|
5
5
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { getReportOptions } from "@allurereport/web-commons";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { Heading, Text } from "@allurereport/web-components";
|
|
3
|
+
import type { AllureAwesomeReportOptions } from "types";
|
|
4
|
+
import { ReportHeaderLogo } from "@/components/ReportHeader/ReportHeaderLogo";
|
|
5
|
+
import { ReportHeaderPie } from "@/components/ReportHeader/ReportHeaderPie";
|
|
5
6
|
import { currentLocaleIso } from "@/stores";
|
|
6
|
-
import type { AllureAwesomeReportOptions } from "../../../../types.js";
|
|
7
7
|
import * as styles from "./styles.scss";
|
|
8
8
|
|
|
9
9
|
export const ReportHeader = () => {
|
|
10
10
|
const { reportName, createdAt } = getReportOptions<AllureAwesomeReportOptions>() ?? {};
|
|
11
|
-
const formattedCreatedAt = new Date(createdAt).toLocaleDateString(currentLocaleIso.value as string, {
|
|
11
|
+
const formattedCreatedAt = new Date(createdAt as number).toLocaleDateString(currentLocaleIso.value as string, {
|
|
12
12
|
month: "long",
|
|
13
13
|
day: "numeric",
|
|
14
14
|
year: "numeric",
|