@digi-frontend/dgate-api-documentation 2.0.1-test.8 → 2.0.1-test.9
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.cjs +66 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +66 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -842,13 +842,69 @@ var SidebarErrorBoundary = class extends react.default.Component {
|
|
|
842
842
|
return this.props.children;
|
|
843
843
|
}
|
|
844
844
|
};
|
|
845
|
-
const
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
845
|
+
const FallbackSidebar = () => {
|
|
846
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Sider, {
|
|
847
|
+
width: 280,
|
|
848
|
+
style: {
|
|
849
|
+
backgroundColor: "#f5f5f5",
|
|
850
|
+
border: "1px solid #d9d9d9"
|
|
851
|
+
},
|
|
852
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
853
|
+
style: { padding: 16 },
|
|
854
|
+
children: [
|
|
855
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", {
|
|
856
|
+
style: {
|
|
857
|
+
color: "#ff4d4f",
|
|
858
|
+
margin: 0,
|
|
859
|
+
marginBottom: 8
|
|
860
|
+
},
|
|
861
|
+
children: "Sidebar Error"
|
|
862
|
+
}),
|
|
863
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
864
|
+
style: {
|
|
865
|
+
margin: 0,
|
|
866
|
+
fontSize: "12px",
|
|
867
|
+
color: "#666"
|
|
868
|
+
},
|
|
869
|
+
children: "The sidebar component encountered an error and has been disabled."
|
|
870
|
+
}),
|
|
871
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
872
|
+
style: {
|
|
873
|
+
margin: 0,
|
|
874
|
+
fontSize: "11px",
|
|
875
|
+
color: "#999",
|
|
876
|
+
marginTop: 8
|
|
877
|
+
},
|
|
878
|
+
children: "Check the console for more details."
|
|
879
|
+
})
|
|
880
|
+
]
|
|
881
|
+
})
|
|
882
|
+
});
|
|
883
|
+
};
|
|
884
|
+
const SafeSidebar = () => {
|
|
885
|
+
try {
|
|
886
|
+
const expandedKeys = useStore((state) => state.view.expandedKeys);
|
|
887
|
+
const setExpandedKeys = useStore((state) => state.view.setExpandedKeys);
|
|
888
|
+
const setSelectedApi = useStore((state) => state.view.setSelectedApi);
|
|
889
|
+
const setSelectedEndpoint = useStore((state) => state.view.setSelectedEndpoint);
|
|
890
|
+
const [selectedNode, setSelectedNodeState] = (0, react.useState)();
|
|
891
|
+
const transformedData = useStore((state) => state.view.transformedData);
|
|
892
|
+
console.log("[Sidebar] Store access successful, transformedData:", transformedData);
|
|
893
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarContent, {
|
|
894
|
+
expandedKeys,
|
|
895
|
+
setExpandedKeys,
|
|
896
|
+
setSelectedApi,
|
|
897
|
+
setSelectedEndpoint,
|
|
898
|
+
selectedNode,
|
|
899
|
+
setSelectedNodeState,
|
|
900
|
+
transformedData
|
|
901
|
+
});
|
|
902
|
+
} catch (error) {
|
|
903
|
+
console.error("[Sidebar] Error accessing store or rendering:", error);
|
|
904
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FallbackSidebar, {});
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
const SidebarContent = ({ expandedKeys, setExpandedKeys, setSelectedApi, setSelectedEndpoint, selectedNode, setSelectedNodeState, transformedData }) => {
|
|
852
908
|
const builtTreeData = (0, react.useMemo)(() => {
|
|
853
909
|
console.log("[Sidebar] transformedData:", transformedData);
|
|
854
910
|
const tree = buildTreeDataStructure(transformedData);
|
|
@@ -975,6 +1031,9 @@ const Sidebar = () => {
|
|
|
975
1031
|
})
|
|
976
1032
|
}) }));
|
|
977
1033
|
};
|
|
1034
|
+
const Sidebar = () => {
|
|
1035
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SafeSidebar, {});
|
|
1036
|
+
};
|
|
978
1037
|
|
|
979
1038
|
//#endregion
|
|
980
1039
|
//#region src/view/components/MainContent.tsx
|