@industry-theme/file-city-panel 0.2.8 → 0.2.10
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeCityPanel.d.ts","sourceRoot":"","sources":["../../src/panels/CodeCityPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAsBjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAYpD;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"CodeCityPanel.d.ts","sourceRoot":"","sources":["../../src/panels/CodeCityPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAsBjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAYpD;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AA+sCD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAEvD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EA8BxC,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -14516,28 +14516,6 @@ function createKnipHighlightLayers(buildings, knipMetrics) {
|
|
|
14516
14516
|
function createAlexandriaHighlightLayers(buildings, alexandriaMetrics) {
|
|
14517
14517
|
return createMetricHighlightLayers(buildings, alexandriaMetrics, "alexandria");
|
|
14518
14518
|
}
|
|
14519
|
-
function isColorModeAvailable(mode, qualityData, hasGitData) {
|
|
14520
|
-
var _a, _b, _c, _d, _e;
|
|
14521
|
-
if (mode === "fileTypes") return true;
|
|
14522
|
-
if (mode === "git") return hasGitData;
|
|
14523
|
-
if (!qualityData) return false;
|
|
14524
|
-
switch (mode) {
|
|
14525
|
-
case "coverage":
|
|
14526
|
-
return !!qualityData.fileCoverage && Object.keys(qualityData.fileCoverage).length > 0;
|
|
14527
|
-
case "eslint":
|
|
14528
|
-
return !!((_a = qualityData.fileMetrics) == null ? void 0 : _a.eslint) && qualityData.fileMetrics.eslint.length > 0;
|
|
14529
|
-
case "typescript":
|
|
14530
|
-
return !!((_b = qualityData.fileMetrics) == null ? void 0 : _b.typescript) && qualityData.fileMetrics.typescript.length > 0;
|
|
14531
|
-
case "prettier":
|
|
14532
|
-
return !!((_c = qualityData.fileMetrics) == null ? void 0 : _c.prettier) && qualityData.fileMetrics.prettier.length > 0;
|
|
14533
|
-
case "knip":
|
|
14534
|
-
return !!((_d = qualityData.fileMetrics) == null ? void 0 : _d.knip) && qualityData.fileMetrics.knip.length > 0;
|
|
14535
|
-
case "alexandria":
|
|
14536
|
-
return !!((_e = qualityData.fileMetrics) == null ? void 0 : _e.alexandria) && qualityData.fileMetrics.alexandria.length > 0;
|
|
14537
|
-
default:
|
|
14538
|
-
return false;
|
|
14539
|
-
}
|
|
14540
|
-
}
|
|
14541
14519
|
function getLayersForColorMode(mode, buildings, qualityData, fileColorLayers, gitLayers) {
|
|
14542
14520
|
var _a, _b, _c, _d, _e;
|
|
14543
14521
|
switch (mode) {
|
|
@@ -14704,10 +14682,10 @@ const CodeCityPanelContent = ({
|
|
|
14704
14682
|
return COLOR_MODES.filter((mode) => {
|
|
14705
14683
|
if (mode.id === "fileTypes") return true;
|
|
14706
14684
|
if (mode.id === "git") return hasGitData;
|
|
14707
|
-
if (
|
|
14708
|
-
return
|
|
14685
|
+
if (sliceSelectedColorMode === mode.id) return true;
|
|
14686
|
+
return (enabledModes == null ? void 0 : enabledModes.includes(mode.id)) ?? false;
|
|
14709
14687
|
});
|
|
14710
|
-
}, [gitSlice == null ? void 0 : gitSlice.data, (_d = colorModesSlice == null ? void 0 : colorModesSlice.data) == null ? void 0 : _d.enabledModes, qualityData]);
|
|
14688
|
+
}, [gitSlice == null ? void 0 : gitSlice.data, (_d = colorModesSlice == null ? void 0 : colorModesSlice.data) == null ? void 0 : _d.enabledModes, qualityData, sliceSelectedColorMode]);
|
|
14711
14689
|
useEffect(() => {
|
|
14712
14690
|
const currentModeAvailable = availableColorModes.some((m) => m.id === colorMode);
|
|
14713
14691
|
if (!currentModeAvailable) {
|
|
@@ -15086,7 +15064,7 @@ const CodeCityPanelContent = ({
|
|
|
15086
15064
|
}
|
|
15087
15065
|
setBaseLayers(modeLayers);
|
|
15088
15066
|
const activePackagePath = selectedPackagePath ?? hoveredPackagePath;
|
|
15089
|
-
if (activePackagePath !==
|
|
15067
|
+
if (activePackagePath && activePackagePath !== "" && activePackagePath !== "/" && modeLayers.length > 0) {
|
|
15090
15068
|
const packageFilteredLayers = [];
|
|
15091
15069
|
modeLayers.forEach((layer) => {
|
|
15092
15070
|
const insidePackage = layer.items.filter(
|