@industry-theme/file-city-panel 0.2.48 → 0.2.50
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;AAuBjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAQpD;;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;AAUD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC;QACX,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;QAC1F,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;IACH,aAAa,EAAE;QACb,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,OAAO,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KAC7D,CAAC;IACF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG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,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KAC7D,CAAC;IACF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE;QACb,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,OAAO,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC;IACF,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AA+lDD;;;;;;;;;;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
|
@@ -9630,6 +9630,12 @@ var useContainerHeight = (initialHeight = 600) => {
|
|
|
9630
9630
|
}, []);
|
|
9631
9631
|
return [containerRef, containerHeight];
|
|
9632
9632
|
};
|
|
9633
|
+
var getDndProps = (enableDragAndDrop = false) => {
|
|
9634
|
+
return {
|
|
9635
|
+
disableDrag: !enableDragAndDrop,
|
|
9636
|
+
disableDrop: !enableDragAndDrop
|
|
9637
|
+
};
|
|
9638
|
+
};
|
|
9633
9639
|
function TreeNode({
|
|
9634
9640
|
node,
|
|
9635
9641
|
style: style2,
|
|
@@ -9854,8 +9860,10 @@ var GitStatusFileTree = ({
|
|
|
9854
9860
|
onNodeHover,
|
|
9855
9861
|
openByDefault,
|
|
9856
9862
|
initialHeight = 600,
|
|
9857
|
-
autoHeight = false
|
|
9863
|
+
autoHeight = false,
|
|
9864
|
+
enableDragAndDrop = false
|
|
9858
9865
|
}) => {
|
|
9866
|
+
const dndProps = getDndProps(enableDragAndDrop);
|
|
9859
9867
|
const gitStatusMap = useMemo(() => {
|
|
9860
9868
|
const map = /* @__PURE__ */ new Map();
|
|
9861
9869
|
gitStatusData.forEach((item) => {
|
|
@@ -9977,7 +9985,8 @@ var GitStatusFileTree = ({
|
|
|
9977
9985
|
...openByDefault !== void 0 && { openByDefault },
|
|
9978
9986
|
width: "100%",
|
|
9979
9987
|
height: containerHeight,
|
|
9980
|
-
rowHeight: 28
|
|
9988
|
+
rowHeight: 28,
|
|
9989
|
+
...dndProps
|
|
9981
9990
|
}, NodeRenderer2)));
|
|
9982
9991
|
};
|
|
9983
9992
|
React.createContext(null);
|
|
@@ -25796,14 +25805,26 @@ const CodeCityPanelContent = ({
|
|
|
25796
25805
|
}, [fileTreeSlice == null ? void 0 : fileTreeSlice.data, fileTreeSlice == null ? void 0 : fileTreeSlice.loading, (_i = context.currentScope.repository) == null ? void 0 : _i.path]);
|
|
25797
25806
|
const handleFileClick = useCallback(
|
|
25798
25807
|
(filePath) => {
|
|
25808
|
+
let gitStatus;
|
|
25809
|
+
if (gitSlice == null ? void 0 : gitSlice.data) {
|
|
25810
|
+
if (gitSlice.data.staged.includes(filePath)) {
|
|
25811
|
+
gitStatus = "staged";
|
|
25812
|
+
} else if (gitSlice.data.unstaged.includes(filePath)) {
|
|
25813
|
+
gitStatus = "unstaged";
|
|
25814
|
+
} else if (gitSlice.data.untracked.includes(filePath)) {
|
|
25815
|
+
gitStatus = "untracked";
|
|
25816
|
+
} else if (gitSlice.data.deleted.includes(filePath)) {
|
|
25817
|
+
gitStatus = "deleted";
|
|
25818
|
+
}
|
|
25819
|
+
}
|
|
25799
25820
|
events.emit({
|
|
25800
25821
|
type: "file:open",
|
|
25801
25822
|
source: "code-city-panel",
|
|
25802
25823
|
timestamp: Date.now(),
|
|
25803
|
-
payload: { path: filePath }
|
|
25824
|
+
payload: { path: filePath, gitStatus }
|
|
25804
25825
|
});
|
|
25805
25826
|
},
|
|
25806
|
-
[events]
|
|
25827
|
+
[events, gitSlice == null ? void 0 : gitSlice.data]
|
|
25807
25828
|
);
|
|
25808
25829
|
const handleGitNodeHover = useCallback(
|
|
25809
25830
|
(nodePath, _isFolder) => {
|