@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.js
CHANGED
|
@@ -1626,45 +1626,6 @@ const APIPage = () => {
|
|
|
1626
1626
|
});
|
|
1627
1627
|
return filtered;
|
|
1628
1628
|
};
|
|
1629
|
-
const APIsRenderer = ({ apis, withTitle, tagName, haveUnderLine, contextPath }) => {
|
|
1630
|
-
return /* @__PURE__ */ jsxs(Flex, {
|
|
1631
|
-
gap: viewStyle == "grid" ? token$1.marginXS : 0,
|
|
1632
|
-
style: {
|
|
1633
|
-
marginBottom: 0,
|
|
1634
|
-
paddingBottom: 0
|
|
1635
|
-
},
|
|
1636
|
-
vertical: true,
|
|
1637
|
-
children: [
|
|
1638
|
-
withTitle && /* @__PURE__ */ jsx(Title, {
|
|
1639
|
-
id: tagName,
|
|
1640
|
-
style: { marginBottom: 0 },
|
|
1641
|
-
level: 4,
|
|
1642
|
-
children: tagName
|
|
1643
|
-
}),
|
|
1644
|
-
/* @__PURE__ */ jsx(Flex, {
|
|
1645
|
-
wrap: "wrap",
|
|
1646
|
-
gap: viewStyle == "grid" ? "1.5rem" : 0,
|
|
1647
|
-
vertical: viewStyle == "list",
|
|
1648
|
-
children: apis.map((item) => /* @__PURE__ */ jsx(ApiCard_default, {
|
|
1649
|
-
api: item,
|
|
1650
|
-
viewStyle
|
|
1651
|
-
}, `${tagName}_renderer_${item.method}_${contextPath}`))
|
|
1652
|
-
}),
|
|
1653
|
-
haveUnderLine && /* @__PURE__ */ jsx(Divider, { style: {
|
|
1654
|
-
marginTop: token$1.marginSM,
|
|
1655
|
-
marginBottom: token$1.marginSM
|
|
1656
|
-
} })
|
|
1657
|
-
]
|
|
1658
|
-
}, `${tagName}_renderer_${contextPath}`);
|
|
1659
|
-
};
|
|
1660
|
-
function formatAuthType(authType) {
|
|
1661
|
-
if (!authType) return "N/A";
|
|
1662
|
-
switch (authType) {
|
|
1663
|
-
case "OAUTH": return "OAuth2";
|
|
1664
|
-
case "API_KEY": return "API Key";
|
|
1665
|
-
default: return authType.replaceAll("_", " ").toLowerCase().replace(/\b\w/g, (char) => char.toUpperCase());
|
|
1666
|
-
}
|
|
1667
|
-
}
|
|
1668
1629
|
return wrapSSR(/* @__PURE__ */ jsxs(Flex, {
|
|
1669
1630
|
vertical: true,
|
|
1670
1631
|
gap: token$1.margin,
|
|
@@ -1768,23 +1729,58 @@ const APIPage = () => {
|
|
|
1768
1729
|
if (b.toLowerCase() === "default") return -1;
|
|
1769
1730
|
return 0;
|
|
1770
1731
|
}).map(([key, endpoints], index, arr) => {
|
|
1771
|
-
if (key.toLowerCase() === "default" && arr.length <= 1) return /* @__PURE__ */ jsx(APIsRenderer, {
|
|
1772
|
-
apis: endpoints,
|
|
1773
|
-
tagName: key,
|
|
1774
|
-
withTitle: false,
|
|
1775
|
-
contextPath: selectedApi?.contextPath
|
|
1776
|
-
}, `${selectedApi}_${selectedApi?.contextPath}`);
|
|
1777
1732
|
return /* @__PURE__ */ jsx(APIsRenderer, {
|
|
1778
1733
|
apis: endpoints,
|
|
1779
1734
|
tagName: key,
|
|
1780
|
-
withTitle:
|
|
1735
|
+
withTitle: !(key.toLowerCase() === "default") || arr.length > 1,
|
|
1781
1736
|
haveUnderLine: index < arr.length - 1,
|
|
1782
|
-
contextPath: selectedApi?.contextPath
|
|
1783
|
-
|
|
1737
|
+
contextPath: selectedApi?.contextPath,
|
|
1738
|
+
viewStyle,
|
|
1739
|
+
token: token$1
|
|
1740
|
+
}, `${selectedApi?.id}_${key}`);
|
|
1784
1741
|
})
|
|
1785
1742
|
]
|
|
1786
1743
|
}));
|
|
1787
1744
|
};
|
|
1745
|
+
const APIsRenderer = ({ apis, withTitle, tagName, haveUnderLine, contextPath, viewStyle, token: token$1 }) => {
|
|
1746
|
+
return /* @__PURE__ */ jsxs(Flex, {
|
|
1747
|
+
gap: viewStyle === "grid" ? token$1.marginXS : 0,
|
|
1748
|
+
style: {
|
|
1749
|
+
marginBottom: 0,
|
|
1750
|
+
paddingBottom: 0
|
|
1751
|
+
},
|
|
1752
|
+
vertical: true,
|
|
1753
|
+
children: [
|
|
1754
|
+
withTitle && /* @__PURE__ */ jsx(Title, {
|
|
1755
|
+
id: tagName,
|
|
1756
|
+
style: { marginBottom: 0 },
|
|
1757
|
+
level: 4,
|
|
1758
|
+
children: tagName
|
|
1759
|
+
}),
|
|
1760
|
+
/* @__PURE__ */ jsx(Flex, {
|
|
1761
|
+
wrap: "wrap",
|
|
1762
|
+
gap: viewStyle === "grid" ? "1.5rem" : 0,
|
|
1763
|
+
vertical: viewStyle === "list",
|
|
1764
|
+
children: apis.map((item) => /* @__PURE__ */ jsx(ApiCard_default, {
|
|
1765
|
+
api: item,
|
|
1766
|
+
viewStyle
|
|
1767
|
+
}, `${tagName}_renderer_${item.id}_${item.method}_${item.path}`))
|
|
1768
|
+
}),
|
|
1769
|
+
haveUnderLine && /* @__PURE__ */ jsx(Divider, { style: {
|
|
1770
|
+
marginTop: token$1.marginSM,
|
|
1771
|
+
marginBottom: token$1.marginSM
|
|
1772
|
+
} })
|
|
1773
|
+
]
|
|
1774
|
+
}, `${tagName}_renderer_${contextPath}`);
|
|
1775
|
+
};
|
|
1776
|
+
function formatAuthType(authType) {
|
|
1777
|
+
if (!authType) return "N/A";
|
|
1778
|
+
switch (authType) {
|
|
1779
|
+
case "OAUTH": return "OAuth2";
|
|
1780
|
+
case "API_KEY": return "API Key";
|
|
1781
|
+
default: return authType.replaceAll("_", " ").toLowerCase().replace(/\b\w/g, (char) => char.toUpperCase());
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1788
1784
|
|
|
1789
1785
|
//#endregion
|
|
1790
1786
|
//#region src/view/components/EndpointPage/EndpointPage.tsx
|