@canyonjs/report-component 1.0.25 → 1.0.28
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/dist/index.js +8 -6
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -793,7 +793,7 @@ const SummaryNav = ({ value, onClick, reportName }) => {
|
|
|
793
793
|
})
|
|
794
794
|
});
|
|
795
795
|
};
|
|
796
|
-
const SummaryMetric = ({ data, onlyChange }) => {
|
|
796
|
+
const SummaryMetric = ({ data, onlyChange, showChangeMetrics }) => {
|
|
797
797
|
const t$1 = (v) => v;
|
|
798
798
|
const summaryTreeItem = { summary: data };
|
|
799
799
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("div", {
|
|
@@ -813,12 +813,12 @@ const SummaryMetric = ({ data, onlyChange }) => {
|
|
|
813
813
|
"changestatements"
|
|
814
814
|
];
|
|
815
815
|
return order.indexOf(key1) - order.indexOf(key2);
|
|
816
|
-
}).filter(([key]) => (onlyChange ? ["changestatements"] : [
|
|
816
|
+
}).filter(([key]) => (onlyChange ? showChangeMetrics ? ["changestatements"] : [] : [
|
|
817
817
|
"statements",
|
|
818
818
|
"branches",
|
|
819
819
|
"functions",
|
|
820
820
|
"lines",
|
|
821
|
-
"changestatements"
|
|
821
|
+
...showChangeMetrics ? ["changestatements"] : []
|
|
822
822
|
]).includes(key)).map(([key, value]) => {
|
|
823
823
|
return /* @__PURE__ */ jsxs("div", {
|
|
824
824
|
style: {
|
|
@@ -860,7 +860,7 @@ const SummaryBar = ({ pct }) => {
|
|
|
860
860
|
backgroundColor: getColor(pct)
|
|
861
861
|
} });
|
|
862
862
|
};
|
|
863
|
-
const SummaryHeader = ({ value, onSelect, data, reportName, onlyChange }) => {
|
|
863
|
+
const SummaryHeader = ({ value, onSelect, data, reportName, onlyChange, showChangeMetrics }) => {
|
|
864
864
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
865
865
|
/* @__PURE__ */ jsx(SummaryNav, {
|
|
866
866
|
reportName,
|
|
@@ -869,7 +869,8 @@ const SummaryHeader = ({ value, onSelect, data, reportName, onlyChange }) => {
|
|
|
869
869
|
}),
|
|
870
870
|
/* @__PURE__ */ jsx(SummaryMetric, {
|
|
871
871
|
data,
|
|
872
|
-
onlyChange
|
|
872
|
+
onlyChange,
|
|
873
|
+
showChangeMetrics
|
|
873
874
|
}),
|
|
874
875
|
/* @__PURE__ */ jsx(SummaryBar, { pct: data.statements.pct })
|
|
875
876
|
] });
|
|
@@ -1323,7 +1324,8 @@ const CanyonReport = ({ value, name, dataSource, onSelect, defaultOnlyChange = f
|
|
|
1323
1324
|
data: rootDataSource,
|
|
1324
1325
|
value,
|
|
1325
1326
|
onSelect: newOnSelect,
|
|
1326
|
-
onlyChange
|
|
1327
|
+
onlyChange,
|
|
1328
|
+
showChangeMetrics: hasAnyFileChange
|
|
1327
1329
|
}),
|
|
1328
1330
|
/* @__PURE__ */ jsx(RIf_default, {
|
|
1329
1331
|
condition: mode === "file",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canyonjs/report-component",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.28",
|
|
4
4
|
"homepage": "https://github.com/canyon-project/canyon#readme",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/canyon-project/canyon/issues"
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"@types/node": "^24.10.1",
|
|
41
41
|
"@types/react": "19.2.3",
|
|
42
42
|
"@types/react-dom": "19.2.3",
|
|
43
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
43
|
+
"@typescript/native-preview": "7.0.0-dev.20260417.1",
|
|
44
44
|
"@vitejs/plugin-react": "^5.1.1",
|
|
45
45
|
"istanbul-lib-coverage": "^3.2.2",
|
|
46
46
|
"tsdown": "^0.17.0",
|
|
47
|
-
"vite": "8.0.
|
|
47
|
+
"vite": "8.0.8"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsdown",
|