@digi-frontend/dgate-api-documentation 2.0.1-test.4 → 2.0.1-test.6
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 +38 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +45 -45
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +45 -45
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -29
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -35,8 +35,8 @@ const __ant_design_nextjs_registry = __toESM(require("@ant-design/nextjs-registr
|
|
|
35
35
|
const createViewSlice = (set) => ({ view: {
|
|
36
36
|
selectedNodeKey: null,
|
|
37
37
|
expandedKeys: ["custom-auth", "api-name-01"],
|
|
38
|
-
originalData:
|
|
39
|
-
transformedData:
|
|
38
|
+
originalData: [],
|
|
39
|
+
transformedData: [],
|
|
40
40
|
selectedApi: null,
|
|
41
41
|
selectedEndpoint: null,
|
|
42
42
|
setSelectedNode: (key) => set((state) => {
|
|
@@ -769,37 +769,46 @@ const convertToRenderableTreeData = (treeDataStructure, selectedNode, cx) => {
|
|
|
769
769
|
};
|
|
770
770
|
|
|
771
771
|
//#endregion
|
|
772
|
-
//#region src/view/
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
componentDidCatch(error) {
|
|
793
|
-
this.props.onError(error);
|
|
772
|
+
//#region src/view/components/Sidebar.tsx
|
|
773
|
+
const { Sider } = antd.Layout;
|
|
774
|
+
var SidebarErrorBoundary = class extends react.default.Component {
|
|
775
|
+
constructor(props) {
|
|
776
|
+
super(props);
|
|
777
|
+
this.state = { hasError: false };
|
|
778
|
+
}
|
|
779
|
+
static getDerivedStateFromError(error) {
|
|
780
|
+
console.error("[Sidebar] Error caught by ErrorBoundary:", error);
|
|
781
|
+
return {
|
|
782
|
+
hasError: true,
|
|
783
|
+
error
|
|
784
|
+
};
|
|
785
|
+
}
|
|
786
|
+
componentDidCatch(error, errorInfo) {
|
|
787
|
+
console.error("[Sidebar] ComponentDidCatch - Error:", error);
|
|
788
|
+
console.error("[Sidebar] ComponentDidCatch - ErrorInfo:", errorInfo);
|
|
789
|
+
setTimeout(() => {
|
|
790
|
+
throw new Error(`Sidebar component error: ${error.message}`);
|
|
791
|
+
}, 0);
|
|
794
792
|
}
|
|
795
793
|
render() {
|
|
794
|
+
if (this.state.hasError) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
795
|
+
style: {
|
|
796
|
+
color: "red",
|
|
797
|
+
padding: 24,
|
|
798
|
+
border: "1px solid red"
|
|
799
|
+
},
|
|
800
|
+
children: [
|
|
801
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: "Sidebar Error" }),
|
|
802
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: "The sidebar component crashed. Check console for details." }),
|
|
803
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
|
|
804
|
+
style: { fontSize: "12px" },
|
|
805
|
+
children: this.state.error?.message
|
|
806
|
+
})
|
|
807
|
+
]
|
|
808
|
+
});
|
|
796
809
|
return this.props.children;
|
|
797
810
|
}
|
|
798
811
|
};
|
|
799
|
-
|
|
800
|
-
//#endregion
|
|
801
|
-
//#region src/view/components/Sidebar.tsx
|
|
802
|
-
const { Sider } = antd.Layout;
|
|
803
812
|
const Sidebar = () => {
|
|
804
813
|
const expandedKeys = useStore((state) => state.view.expandedKeys);
|
|
805
814
|
const setExpandedKeys = useStore((state) => state.view.setExpandedKeys);
|
|
@@ -898,7 +907,7 @@ const Sidebar = () => {
|
|
|
898
907
|
}
|
|
899
908
|
setSelectedNodeState(stringKeys);
|
|
900
909
|
};
|
|
901
|
-
return wrapSSR(/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
910
|
+
return wrapSSR(/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarErrorBoundary, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Sider, {
|
|
902
911
|
width: 280,
|
|
903
912
|
className: cx("sider"),
|
|
904
913
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|