@digi-frontend/dgate-api-documentation 3.1.4 → 3.1.5
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 +44 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +44 -48
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1657,45 +1657,6 @@ const APIPage = () => {
|
|
|
1657
1657
|
});
|
|
1658
1658
|
return filtered;
|
|
1659
1659
|
};
|
|
1660
|
-
const APIsRenderer = ({ apis, withTitle, tagName, haveUnderLine, contextPath }) => {
|
|
1661
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(antd.Flex, {
|
|
1662
|
-
gap: viewStyle == "grid" ? token$1.marginXS : 0,
|
|
1663
|
-
style: {
|
|
1664
|
-
marginBottom: 0,
|
|
1665
|
-
paddingBottom: 0
|
|
1666
|
-
},
|
|
1667
|
-
vertical: true,
|
|
1668
|
-
children: [
|
|
1669
|
-
withTitle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd_es_typography_Title.default, {
|
|
1670
|
-
id: tagName,
|
|
1671
|
-
style: { marginBottom: 0 },
|
|
1672
|
-
level: 4,
|
|
1673
|
-
children: tagName
|
|
1674
|
-
}),
|
|
1675
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd.Flex, {
|
|
1676
|
-
wrap: "wrap",
|
|
1677
|
-
gap: viewStyle == "grid" ? "1.5rem" : 0,
|
|
1678
|
-
vertical: viewStyle == "list",
|
|
1679
|
-
children: apis.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ApiCard_default, {
|
|
1680
|
-
api: item,
|
|
1681
|
-
viewStyle
|
|
1682
|
-
}, `${tagName}_renderer_${item.method}_${contextPath}`))
|
|
1683
|
-
}),
|
|
1684
|
-
haveUnderLine && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd.Divider, { style: {
|
|
1685
|
-
marginTop: token$1.marginSM,
|
|
1686
|
-
marginBottom: token$1.marginSM
|
|
1687
|
-
} })
|
|
1688
|
-
]
|
|
1689
|
-
}, `${tagName}_renderer_${contextPath}`);
|
|
1690
|
-
};
|
|
1691
|
-
function formatAuthType(authType) {
|
|
1692
|
-
if (!authType) return "N/A";
|
|
1693
|
-
switch (authType) {
|
|
1694
|
-
case "OAUTH": return "OAuth2";
|
|
1695
|
-
case "API_KEY": return "API Key";
|
|
1696
|
-
default: return authType.replaceAll("_", " ").toLowerCase().replace(/\b\w/g, (char) => char.toUpperCase());
|
|
1697
|
-
}
|
|
1698
|
-
}
|
|
1699
1660
|
return wrapSSR(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(antd.Flex, {
|
|
1700
1661
|
vertical: true,
|
|
1701
1662
|
gap: token$1.margin,
|
|
@@ -1799,23 +1760,58 @@ const APIPage = () => {
|
|
|
1799
1760
|
if (b.toLowerCase() === "default") return -1;
|
|
1800
1761
|
return 0;
|
|
1801
1762
|
}).map(([key, endpoints], index, arr) => {
|
|
1802
|
-
if (key.toLowerCase() === "default" && arr.length <= 1) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(APIsRenderer, {
|
|
1803
|
-
apis: endpoints,
|
|
1804
|
-
tagName: key,
|
|
1805
|
-
withTitle: false,
|
|
1806
|
-
contextPath: selectedApi?.contextPath
|
|
1807
|
-
}, `${selectedApi}_${selectedApi?.contextPath}`);
|
|
1808
1763
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(APIsRenderer, {
|
|
1809
1764
|
apis: endpoints,
|
|
1810
1765
|
tagName: key,
|
|
1811
|
-
withTitle:
|
|
1766
|
+
withTitle: !(key.toLowerCase() === "default") || arr.length > 1,
|
|
1812
1767
|
haveUnderLine: index < arr.length - 1,
|
|
1813
|
-
contextPath: selectedApi?.contextPath
|
|
1814
|
-
|
|
1768
|
+
contextPath: selectedApi?.contextPath,
|
|
1769
|
+
viewStyle,
|
|
1770
|
+
token: token$1
|
|
1771
|
+
}, `${selectedApi?.id}_${key}`);
|
|
1815
1772
|
})
|
|
1816
1773
|
]
|
|
1817
1774
|
}));
|
|
1818
1775
|
};
|
|
1776
|
+
const APIsRenderer = ({ apis, withTitle, tagName, haveUnderLine, contextPath, viewStyle, token: token$1 }) => {
|
|
1777
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(antd.Flex, {
|
|
1778
|
+
gap: viewStyle === "grid" ? token$1.marginXS : 0,
|
|
1779
|
+
style: {
|
|
1780
|
+
marginBottom: 0,
|
|
1781
|
+
paddingBottom: 0
|
|
1782
|
+
},
|
|
1783
|
+
vertical: true,
|
|
1784
|
+
children: [
|
|
1785
|
+
withTitle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd_es_typography_Title.default, {
|
|
1786
|
+
id: tagName,
|
|
1787
|
+
style: { marginBottom: 0 },
|
|
1788
|
+
level: 4,
|
|
1789
|
+
children: tagName
|
|
1790
|
+
}),
|
|
1791
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd.Flex, {
|
|
1792
|
+
wrap: "wrap",
|
|
1793
|
+
gap: viewStyle === "grid" ? "1.5rem" : 0,
|
|
1794
|
+
vertical: viewStyle === "list",
|
|
1795
|
+
children: apis.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ApiCard_default, {
|
|
1796
|
+
api: item,
|
|
1797
|
+
viewStyle
|
|
1798
|
+
}, `${tagName}_renderer_${item.id}_${item.method}_${item.path}`))
|
|
1799
|
+
}),
|
|
1800
|
+
haveUnderLine && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(antd.Divider, { style: {
|
|
1801
|
+
marginTop: token$1.marginSM,
|
|
1802
|
+
marginBottom: token$1.marginSM
|
|
1803
|
+
} })
|
|
1804
|
+
]
|
|
1805
|
+
}, `${tagName}_renderer_${contextPath}`);
|
|
1806
|
+
};
|
|
1807
|
+
function formatAuthType(authType) {
|
|
1808
|
+
if (!authType) return "N/A";
|
|
1809
|
+
switch (authType) {
|
|
1810
|
+
case "OAUTH": return "OAuth2";
|
|
1811
|
+
case "API_KEY": return "API Key";
|
|
1812
|
+
default: return authType.replaceAll("_", " ").toLowerCase().replace(/\b\w/g, (char) => char.toUpperCase());
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1819
1815
|
|
|
1820
1816
|
//#endregion
|
|
1821
1817
|
//#region src/view/components/EndpointPage/EndpointPage.tsx
|