@digi-frontend/dgate-api-documentation 4.0.0-beta.0 → 4.0.0-beta.3
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 +1010 -876
- package/dist/index.cjs.map +1 -1
- package/dist/{index-3piy-SU-.d.cts → index.d.cts} +22 -11
- package/dist/index.d.cts.map +1 -0
- package/dist/{index-ZiBNQn4i.d.ts → index.d.mts} +22 -11
- package/dist/index.d.mts.map +1 -0
- package/dist/{index.js → index.mjs} +885 -750
- package/dist/index.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/index-3piy-SU-.d.cts.map +0 -1
- package/dist/index-ZiBNQn4i.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { create } from "zustand";
|
|
2
2
|
import { devtools } from "zustand/middleware";
|
|
3
3
|
import { immer } from "zustand/middleware/immer";
|
|
4
|
-
import * as React from "react";
|
|
5
4
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
6
5
|
import { Alert, Breadcrumb, Button, Card, Divider, Drawer, Empty, Flex, Form, Grid, Input, Modal, Pagination, Select, Switch, Table, Tabs, Tag, Tooltip, Tree, Typography, message, theme } from "antd";
|
|
7
6
|
import { AppstoreOutlined, BarsOutlined, CheckCircleOutlined, DownOutlined, EditOutlined, ExclamationCircleFilled, EyeOutlined, InfoCircleOutlined, LeftOutlined, MinusSquareOutlined, PlusOutlined, PlusSquareOutlined, RightOutlined, SafetyOutlined, SearchOutlined, UpCircleOutlined } from "@ant-design/icons";
|
|
@@ -12,9 +11,8 @@ import { Resizable } from "re-resizable";
|
|
|
12
11
|
import Title from "antd/es/typography/Title";
|
|
13
12
|
import { nanoid } from "nanoid";
|
|
14
13
|
import { Light } from "react-syntax-highlighter";
|
|
15
|
-
import json from "react-syntax-highlighter/dist/esm/languages/hljs/json";
|
|
16
|
-
import * as hljs from "react-syntax-highlighter/dist/esm/styles/hljs";
|
|
17
|
-
|
|
14
|
+
import json from "react-syntax-highlighter/dist/esm/languages/hljs/json.js";
|
|
15
|
+
import * as hljs from "react-syntax-highlighter/dist/esm/styles/hljs/index.js";
|
|
18
16
|
//#region src/store/slices/view.ts
|
|
19
17
|
const createViewSlice = (set) => ({ view: {
|
|
20
18
|
selectedNodeKey: null,
|
|
@@ -70,32 +68,28 @@ const createViewSlice = (set) => ({ view: {
|
|
|
70
68
|
state.view.selectedStatusCode = code;
|
|
71
69
|
})
|
|
72
70
|
} });
|
|
73
|
-
|
|
74
71
|
//#endregion
|
|
75
72
|
//#region src/store/index.ts
|
|
76
73
|
const createStore = (set) => ({ ...createViewSlice(set) });
|
|
77
74
|
const useStore = create()(devtools(immer(createStore), { name: "dgate-docs-store" }));
|
|
78
|
-
var store_default = useStore;
|
|
79
|
-
|
|
80
75
|
//#endregion
|
|
81
76
|
//#region src/hooks/useStyle.ts
|
|
82
77
|
function useStyle(componentName, stylesFn) {
|
|
83
|
-
const { token
|
|
78
|
+
const { token, theme: theme$1, hashId } = theme.useToken();
|
|
84
79
|
const scope = (className) => `.${hashId}.${componentName}-${className}`;
|
|
85
80
|
const cx = (...classes) => classes.map((cls) => `${componentName}-${cls} ${hashId}`).join(" ");
|
|
86
81
|
return {
|
|
87
82
|
wrapSSR: useStyleRegister({
|
|
88
83
|
theme: theme$1,
|
|
89
|
-
token
|
|
84
|
+
token,
|
|
90
85
|
path: [componentName]
|
|
91
|
-
}, () => stylesFn(token
|
|
86
|
+
}, () => stylesFn(token, scope)),
|
|
92
87
|
cx,
|
|
93
88
|
scope,
|
|
94
|
-
token
|
|
89
|
+
token,
|
|
95
90
|
hashId
|
|
96
91
|
};
|
|
97
92
|
}
|
|
98
|
-
|
|
99
93
|
//#endregion
|
|
100
94
|
//#region src/theme/light.json
|
|
101
95
|
var token = {
|
|
@@ -426,41 +420,40 @@ var token = {
|
|
|
426
420
|
"marginXXXL": 60,
|
|
427
421
|
"marginXXXXL": 72
|
|
428
422
|
};
|
|
429
|
-
|
|
430
423
|
//#endregion
|
|
431
424
|
//#region src/view/helper/sidebar.utils.ts
|
|
432
425
|
const methodColors = {
|
|
433
426
|
GET: {
|
|
434
|
-
bg:
|
|
427
|
+
bg: "transparent",
|
|
435
428
|
color: token.colorPrimary
|
|
436
429
|
},
|
|
437
430
|
POST: {
|
|
438
|
-
bg:
|
|
439
|
-
color:
|
|
431
|
+
bg: "transparent",
|
|
432
|
+
color: token.colorSuccess
|
|
440
433
|
},
|
|
441
434
|
DELETE: {
|
|
442
|
-
bg:
|
|
435
|
+
bg: "transparent",
|
|
443
436
|
color: token.colorError
|
|
444
437
|
},
|
|
445
438
|
PUT: {
|
|
446
|
-
bg:
|
|
439
|
+
bg: "transparent",
|
|
447
440
|
color: token.colorWarning
|
|
448
441
|
},
|
|
449
442
|
PATCH: {
|
|
450
|
-
bg:
|
|
443
|
+
bg: "transparent",
|
|
451
444
|
color: token["volcano.5"]
|
|
452
445
|
},
|
|
453
446
|
OPTIONS: {
|
|
454
|
-
bg:
|
|
447
|
+
bg: "transparent",
|
|
455
448
|
color: token["geekblue.6"]
|
|
456
449
|
},
|
|
457
450
|
HEAD: {
|
|
458
|
-
bg:
|
|
451
|
+
bg: "transparent",
|
|
459
452
|
color: token["purple.5"]
|
|
460
453
|
},
|
|
461
454
|
TRACE: {
|
|
462
|
-
bg:
|
|
463
|
-
color: token["
|
|
455
|
+
bg: "transparent",
|
|
456
|
+
color: token["volcano.4"]
|
|
464
457
|
}
|
|
465
458
|
};
|
|
466
459
|
const darkerMethodColors = {
|
|
@@ -497,43 +490,91 @@ const darkerMethodColors = {
|
|
|
497
490
|
color: "#FFFFFF"
|
|
498
491
|
}
|
|
499
492
|
};
|
|
493
|
+
const sidebarMethodColors = {
|
|
494
|
+
GET: {
|
|
495
|
+
bg: token.colorPrimaryBgHover,
|
|
496
|
+
color: token.colorPrimary
|
|
497
|
+
},
|
|
498
|
+
POST: {
|
|
499
|
+
bg: token.colorSuccessBg,
|
|
500
|
+
color: token.colorSuccess
|
|
501
|
+
},
|
|
502
|
+
DELETE: {
|
|
503
|
+
bg: token.colorErrorBg,
|
|
504
|
+
color: token.colorError
|
|
505
|
+
},
|
|
506
|
+
PUT: {
|
|
507
|
+
bg: token.colorWarningBg,
|
|
508
|
+
color: token.colorWarning
|
|
509
|
+
},
|
|
510
|
+
PATCH: {
|
|
511
|
+
bg: token["volcano.1"],
|
|
512
|
+
color: token["volcano.5"]
|
|
513
|
+
},
|
|
514
|
+
OPTIONS: {
|
|
515
|
+
bg: token["geekblue.2"],
|
|
516
|
+
color: token["geekblue.6"]
|
|
517
|
+
},
|
|
518
|
+
HEAD: {
|
|
519
|
+
bg: token["purple.1"],
|
|
520
|
+
color: token["purple.5"]
|
|
521
|
+
},
|
|
522
|
+
TRACE: {
|
|
523
|
+
bg: token["volcano.1"],
|
|
524
|
+
color: token["volcano.4"]
|
|
525
|
+
}
|
|
526
|
+
};
|
|
500
527
|
const buildTreeDataStructure = (data) => {
|
|
501
528
|
if (!data) return [];
|
|
502
529
|
return data.map((api) => {
|
|
503
530
|
const tagEntries = Object.entries(api.tags);
|
|
531
|
+
const defaultTag = tagEntries.find(([tag]) => tag.toLowerCase() === "default");
|
|
532
|
+
const nonDefaultTags = tagEntries.filter(([tag]) => tag.toLowerCase() !== "default");
|
|
533
|
+
const defaultEndpoints = defaultTag ? defaultTag[1].map((endpoint) => ({
|
|
534
|
+
title: endpoint.summary,
|
|
535
|
+
key: endpoint.id,
|
|
536
|
+
isLeaf: true,
|
|
537
|
+
selectable: true,
|
|
538
|
+
method: endpoint.method,
|
|
539
|
+
data: {
|
|
540
|
+
endpoint,
|
|
541
|
+
api,
|
|
542
|
+
tagName: "default",
|
|
543
|
+
parentApiId: api.id
|
|
544
|
+
}
|
|
545
|
+
})) : [];
|
|
546
|
+
const tagNodes = nonDefaultTags.map(([tag, endpoints]) => {
|
|
547
|
+
const tagId = `tag-${api.id}-${tag.replace(/\s+/g, "-").toLowerCase()}`;
|
|
548
|
+
return {
|
|
549
|
+
title: tag,
|
|
550
|
+
key: tagId,
|
|
551
|
+
selectable: true,
|
|
552
|
+
data: {
|
|
553
|
+
tagName: tag,
|
|
554
|
+
apiData: api
|
|
555
|
+
},
|
|
556
|
+
children: endpoints.map((endpoint) => ({
|
|
557
|
+
title: endpoint.summary,
|
|
558
|
+
key: endpoint.id,
|
|
559
|
+
isLeaf: true,
|
|
560
|
+
selectable: true,
|
|
561
|
+
method: endpoint.method,
|
|
562
|
+
data: {
|
|
563
|
+
endpoint,
|
|
564
|
+
api,
|
|
565
|
+
tagName: tag,
|
|
566
|
+
parentApiId: api.id,
|
|
567
|
+
tagId
|
|
568
|
+
}
|
|
569
|
+
}))
|
|
570
|
+
};
|
|
571
|
+
});
|
|
504
572
|
return {
|
|
505
573
|
title: api.title,
|
|
506
574
|
key: api.id,
|
|
507
575
|
selectable: true,
|
|
508
576
|
data: api,
|
|
509
|
-
children:
|
|
510
|
-
const tagId = `tag-${api.id}-${tag.replace(/\s+/g, "-").toLowerCase()}`;
|
|
511
|
-
return {
|
|
512
|
-
title: tag,
|
|
513
|
-
key: tagId,
|
|
514
|
-
selectable: true,
|
|
515
|
-
data: {
|
|
516
|
-
tagName: tag,
|
|
517
|
-
apiData: api
|
|
518
|
-
},
|
|
519
|
-
children: endpoints.map((endpoint) => {
|
|
520
|
-
return {
|
|
521
|
-
title: endpoint.summary,
|
|
522
|
-
key: endpoint.id,
|
|
523
|
-
isLeaf: true,
|
|
524
|
-
selectable: true,
|
|
525
|
-
method: endpoint.method,
|
|
526
|
-
data: {
|
|
527
|
-
endpoint,
|
|
528
|
-
api,
|
|
529
|
-
tagName: tag,
|
|
530
|
-
parentApiId: api.id,
|
|
531
|
-
tagId
|
|
532
|
-
}
|
|
533
|
-
};
|
|
534
|
-
})
|
|
535
|
-
};
|
|
536
|
-
})
|
|
577
|
+
children: [...tagNodes, ...defaultEndpoints]
|
|
537
578
|
};
|
|
538
579
|
});
|
|
539
580
|
};
|
|
@@ -591,18 +632,18 @@ const filterTreeData = (data, searchText) => {
|
|
|
591
632
|
};
|
|
592
633
|
return data.map((node) => filterNode(node)).filter((node) => node !== null);
|
|
593
634
|
};
|
|
594
|
-
const getSidebarStyles = (token
|
|
635
|
+
const getSidebarStyles = (token, scope) => ({
|
|
595
636
|
[scope("sider")]: {
|
|
596
|
-
backgroundColor: token
|
|
637
|
+
backgroundColor: token.colorBgElevated,
|
|
597
638
|
overflowX: "clip",
|
|
598
|
-
borderRadius: token
|
|
639
|
+
borderRadius: token.borderRadius,
|
|
599
640
|
height: "auto"
|
|
600
641
|
},
|
|
601
|
-
[scope("content")]: { padding: token
|
|
642
|
+
[scope("content")]: { padding: token.padding },
|
|
602
643
|
[scope("controls")]: {
|
|
603
644
|
display: "flex",
|
|
604
|
-
gap: token
|
|
605
|
-
marginBottom: token
|
|
645
|
+
gap: token.marginXS,
|
|
646
|
+
marginBottom: token.marginSM
|
|
606
647
|
},
|
|
607
648
|
[scope("search-input")]: { flex: 1 },
|
|
608
649
|
[scope("tree")]: {
|
|
@@ -628,15 +669,17 @@ const getSidebarStyles = (token$1, scope) => ({
|
|
|
628
669
|
width: "100%",
|
|
629
670
|
padding: 0
|
|
630
671
|
},
|
|
631
|
-
"& .ant-tree-switcher": { backgroundColor: token
|
|
672
|
+
"& .ant-tree-switcher": { backgroundColor: token.colorBgElevated }
|
|
632
673
|
},
|
|
633
674
|
[scope("endpoint-item")]: {
|
|
634
675
|
display: "flex",
|
|
635
676
|
alignItems: "center",
|
|
636
|
-
gap: token
|
|
677
|
+
gap: token.marginXS,
|
|
637
678
|
width: "100%",
|
|
638
679
|
maxWidth: "100%",
|
|
639
|
-
minWidth: "100%"
|
|
680
|
+
minWidth: "100%",
|
|
681
|
+
paddingLeft: token.marginXS,
|
|
682
|
+
paddingRight: token.marginXS
|
|
640
683
|
},
|
|
641
684
|
[scope("method-tag")]: {
|
|
642
685
|
width: 51,
|
|
@@ -659,26 +702,26 @@ const getSidebarStyles = (token$1, scope) => ({
|
|
|
659
702
|
display: "block"
|
|
660
703
|
},
|
|
661
704
|
[scope("tag-title")]: {
|
|
662
|
-
color: token
|
|
705
|
+
color: token.colorText,
|
|
663
706
|
maxWidth: "100%",
|
|
664
707
|
display: "block",
|
|
665
708
|
flex: 1
|
|
666
709
|
},
|
|
667
710
|
[scope("api-title")]: {
|
|
668
711
|
flex: 1,
|
|
669
|
-
color: token
|
|
712
|
+
color: token.colorText,
|
|
670
713
|
maxWidth: "100%",
|
|
671
714
|
display: "block",
|
|
672
|
-
|
|
715
|
+
paddingLeft: "4px",
|
|
716
|
+
paddingRight: "4px",
|
|
673
717
|
margin: 0
|
|
674
718
|
}
|
|
675
719
|
});
|
|
676
|
-
|
|
677
720
|
//#endregion
|
|
678
721
|
//#region src/view/helper/sidebar.components.tsx
|
|
679
722
|
const { Text: Text$1 } = Typography;
|
|
680
723
|
const EndpointItem = ({ method, title, cx, isSelected = false }) => {
|
|
681
|
-
const methodStyle = (isSelected ? darkerMethodColors :
|
|
724
|
+
const methodStyle = (isSelected ? darkerMethodColors : sidebarMethodColors)[method];
|
|
682
725
|
const isPost = method?.toUpperCase() === "POST";
|
|
683
726
|
return /* @__PURE__ */ jsxs("div", {
|
|
684
727
|
className: `${cx("endpoint-item")}${isSelected ? ` ${cx("endpoint-item-selected")}` : ""}`,
|
|
@@ -728,7 +771,6 @@ const convertToRenderableTreeData = (treeDataStructure, selectedEndpoint, cx) =>
|
|
|
728
771
|
};
|
|
729
772
|
return treeDataStructure.map(renderNode);
|
|
730
773
|
};
|
|
731
|
-
|
|
732
774
|
//#endregion
|
|
733
775
|
//#region src/hooks/useNodeSelection.ts
|
|
734
776
|
const useNodeSelection = () => {
|
|
@@ -834,32 +876,23 @@ const useNodeSelection = () => {
|
|
|
834
876
|
selectPreSelectedApi
|
|
835
877
|
};
|
|
836
878
|
};
|
|
837
|
-
|
|
838
879
|
//#endregion
|
|
839
|
-
//#region src/assets/Minify.
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
fill: "none"
|
|
856
|
-
}, props), _path$5 || (_path$5 = /* @__PURE__ */ React.createElement("path", {
|
|
857
|
-
stroke: "currentcolor",
|
|
858
|
-
d: "m6 11.334 2-2 2 2M6 4.666l2 2 2-2"
|
|
859
|
-
})));
|
|
860
|
-
};
|
|
861
|
-
var Minify_default = SvgMinify;
|
|
862
|
-
|
|
880
|
+
//#region src/assets/Minify.tsx
|
|
881
|
+
const Minify = (props) => /* @__PURE__ */ jsxs("svg", {
|
|
882
|
+
width: "16",
|
|
883
|
+
height: "16",
|
|
884
|
+
viewBox: "0 0 16 16",
|
|
885
|
+
fill: "none",
|
|
886
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
887
|
+
...props,
|
|
888
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
889
|
+
d: "M6 11.334L8 9.33398L10 11.334",
|
|
890
|
+
stroke: "currentcolor"
|
|
891
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
892
|
+
d: "M6 4.66602L8 6.66602L10 4.66602",
|
|
893
|
+
stroke: "currentcolor"
|
|
894
|
+
})]
|
|
895
|
+
});
|
|
863
896
|
//#endregion
|
|
864
897
|
//#region src/view/components/NoDataIcon.tsx
|
|
865
898
|
const NoDataIcon = ({ width = 298, height = 237, fill = "#F1F5FD", stroke = "#E0E9F9", ...props }) => {
|
|
@@ -1027,8 +1060,6 @@ const NoDataIcon = ({ width = 298, height = 237, fill = "#F1F5FD", stroke = "#E0
|
|
|
1027
1060
|
]
|
|
1028
1061
|
});
|
|
1029
1062
|
};
|
|
1030
|
-
var NoDataIcon_default = NoDataIcon;
|
|
1031
|
-
|
|
1032
1063
|
//#endregion
|
|
1033
1064
|
//#region src/view/components/Sidebar.tsx
|
|
1034
1065
|
const { useBreakpoint: useBreakpoint$4 } = Grid;
|
|
@@ -1038,7 +1069,7 @@ const Sidebar = ({ searchValue, setSearchValue, onNodeSelect }) => {
|
|
|
1038
1069
|
const { selectNodeByKey, clearSelection } = useNodeSelection();
|
|
1039
1070
|
const [autoExpandParent, setAutoExpandParent] = useState(true);
|
|
1040
1071
|
const isMobile = !useBreakpoint$4().md;
|
|
1041
|
-
const { wrapSSR, cx, token
|
|
1072
|
+
const { wrapSSR, cx, token } = useStyle("Sidebar", getSidebarStyles);
|
|
1042
1073
|
const handleSearch = (value) => {
|
|
1043
1074
|
if (value && builtTreeData) {
|
|
1044
1075
|
setExpandedKeys(getAllTreeKeys(builtTreeData));
|
|
@@ -1103,7 +1134,7 @@ const Sidebar = ({ searchValue, setSearchValue, onNodeSelect }) => {
|
|
|
1103
1134
|
children: /* @__PURE__ */ jsx(Button, {
|
|
1104
1135
|
onClick: collapseAll,
|
|
1105
1136
|
title: "Collapse All",
|
|
1106
|
-
icon: /* @__PURE__ */ jsx(
|
|
1137
|
+
icon: /* @__PURE__ */ jsx(Minify, {})
|
|
1107
1138
|
})
|
|
1108
1139
|
})]
|
|
1109
1140
|
}), filteredTreeData?.length ? /* @__PURE__ */ jsx(Tree, {
|
|
@@ -1128,30 +1159,30 @@ const Sidebar = ({ searchValue, setSearchValue, onNodeSelect }) => {
|
|
|
1128
1159
|
}) : /* @__PURE__ */ jsxs(Flex, {
|
|
1129
1160
|
justify: "center",
|
|
1130
1161
|
align: "center",
|
|
1131
|
-
gap: token
|
|
1162
|
+
gap: token.marginSM,
|
|
1132
1163
|
vertical: true,
|
|
1133
|
-
style: { marginTop: token
|
|
1134
|
-
children: [/* @__PURE__ */ jsx(
|
|
1135
|
-
stroke: token
|
|
1136
|
-
fill: token
|
|
1164
|
+
style: { marginTop: token.paddingXL },
|
|
1165
|
+
children: [/* @__PURE__ */ jsx(NoDataIcon, {
|
|
1166
|
+
stroke: token.colorPrimaryHover,
|
|
1167
|
+
fill: token.colorPrimaryBg,
|
|
1137
1168
|
width: "10.375rem",
|
|
1138
1169
|
height: "8.1875rem"
|
|
1139
1170
|
}), searchValue.length ? /* @__PURE__ */ jsx(Text, {
|
|
1140
1171
|
style: {
|
|
1141
1172
|
textAlign: "center",
|
|
1142
|
-
fontFamily: token
|
|
1173
|
+
fontFamily: token.fontFamily,
|
|
1143
1174
|
fontWeight: 400,
|
|
1144
|
-
fontSize: token
|
|
1145
|
-
color: token
|
|
1175
|
+
fontSize: token.fontSizeLG,
|
|
1176
|
+
color: token.colorTextTertiary
|
|
1146
1177
|
},
|
|
1147
1178
|
children: "No results found"
|
|
1148
1179
|
}) : /* @__PURE__ */ jsxs(Text, {
|
|
1149
1180
|
style: {
|
|
1150
1181
|
textAlign: "center",
|
|
1151
|
-
fontFamily: token
|
|
1182
|
+
fontFamily: token.fontFamily,
|
|
1152
1183
|
fontWeight: 400,
|
|
1153
|
-
fontSize: token
|
|
1154
|
-
color: token
|
|
1184
|
+
fontSize: token.fontSizeLG,
|
|
1185
|
+
color: token.colorTextTertiary
|
|
1155
1186
|
},
|
|
1156
1187
|
children: [
|
|
1157
1188
|
"No API",
|
|
@@ -1191,52 +1222,40 @@ const Sidebar = ({ searchValue, setSearchValue, onNodeSelect }) => {
|
|
|
1191
1222
|
children: inner
|
|
1192
1223
|
}));
|
|
1193
1224
|
};
|
|
1194
|
-
|
|
1195
1225
|
//#endregion
|
|
1196
|
-
//#region src/assets/link.
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
fill: "none"
|
|
1213
|
-
}, props), _path$4 || (_path$4 = /* @__PURE__ */ React.createElement("path", {
|
|
1214
|
-
fill: "#4D75D9",
|
|
1215
|
-
d: "M3.875 9.25C2.085 9.25.625 7.79.625 6s1.46-3.25 3.25-3.25c.205 0 .375.17.375.375s-.17.375-.375.375a2.5 2.5 0 0 0 0 5 2.5 2.5 0 0 0 2.5-2.5c0-.205.17-.375.375-.375s.375.17.375.375c0 1.79-1.46 3.25-3.25 3.25"
|
|
1216
|
-
})), _path2$3 || (_path2$3 = /* @__PURE__ */ React.createElement("path", {
|
|
1217
|
-
fill: "#4D75D9",
|
|
1218
|
-
d: "M8 9.375A.38.38 0 0 1 7.625 9c0-.205.17-.375.375-.375A2.63 2.63 0 0 0 10.625 6 2.63 2.63 0 0 0 8 3.375 2.63 2.63 0 0 0 5.375 6c0 .205-.17.375-.375.375A.38.38 0 0 1 4.625 6 3.38 3.38 0 0 1 8 2.625 3.38 3.38 0 0 1 11.375 6 3.38 3.38 0 0 1 8 9.375"
|
|
1219
|
-
})));
|
|
1220
|
-
};
|
|
1221
|
-
var link_default = SvgLink;
|
|
1222
|
-
|
|
1226
|
+
//#region src/assets/link.tsx
|
|
1227
|
+
const Link = (props) => /* @__PURE__ */ jsxs("svg", {
|
|
1228
|
+
width: "12",
|
|
1229
|
+
height: "12",
|
|
1230
|
+
viewBox: "0 0 12 12",
|
|
1231
|
+
fill: "none",
|
|
1232
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1233
|
+
...props,
|
|
1234
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
1235
|
+
d: "M3.875 9.25C2.085 9.25 0.625 7.79 0.625 6C0.625 4.21 2.085 2.75 3.875 2.75C4.08 2.75 4.25 2.92 4.25 3.125C4.25 3.33 4.08 3.5 3.875 3.5C2.495 3.5 1.375 4.62 1.375 6C1.375 7.38 2.495 8.5 3.875 8.5C5.255 8.5 6.375 7.38 6.375 6C6.375 5.795 6.545 5.625 6.75 5.625C6.955 5.625 7.125 5.795 7.125 6C7.125 7.79 5.665 9.25 3.875 9.25Z",
|
|
1236
|
+
fill: "#4D75D9"
|
|
1237
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
1238
|
+
d: "M8 9.375C7.795 9.375 7.625 9.205 7.625 9C7.625 8.795 7.795 8.625 8 8.625C9.445 8.625 10.625 7.445 10.625 6C10.625 4.555 9.445 3.375 8 3.375C6.555 3.375 5.375 4.555 5.375 6C5.375 6.205 5.205 6.375 5 6.375C4.795 6.375 4.625 6.205 4.625 6C4.625 4.14 6.14 2.625 8 2.625C9.86 2.625 11.375 4.14 11.375 6C11.375 7.86 9.86 9.375 8 9.375Z",
|
|
1239
|
+
fill: "#4D75D9"
|
|
1240
|
+
})]
|
|
1241
|
+
});
|
|
1223
1242
|
//#endregion
|
|
1224
1243
|
//#region src/view/components/ApiPage/components/ApiCard.tsx
|
|
1225
1244
|
const ApiCard = ({ api, viewStyle }) => {
|
|
1226
|
-
const { wrapSSR, cx, token
|
|
1245
|
+
const { wrapSSR, cx, token } = useStyle("DocumentationApiCard", (token, scope) => ({
|
|
1227
1246
|
[scope("method-chip")]: {
|
|
1228
1247
|
minWidth: "5.375rem",
|
|
1229
1248
|
width: "fit-content",
|
|
1230
|
-
paddingLeft: token
|
|
1231
|
-
paddingRight: token
|
|
1249
|
+
paddingLeft: token.marginXS,
|
|
1250
|
+
paddingRight: token.marginXS,
|
|
1232
1251
|
display: "flex",
|
|
1233
1252
|
justifyContent: "center",
|
|
1234
1253
|
alignItems: "center",
|
|
1235
|
-
borderRadius: token
|
|
1254
|
+
borderRadius: token.borderRadius
|
|
1236
1255
|
},
|
|
1237
1256
|
[scope("list-container")]: {
|
|
1238
|
-
paddingTop: token
|
|
1239
|
-
paddingBottom: token
|
|
1257
|
+
paddingTop: token.marginXS,
|
|
1258
|
+
paddingBottom: token.marginXS
|
|
1240
1259
|
},
|
|
1241
1260
|
[scope("chip-title")]: {
|
|
1242
1261
|
alignSelf: "center",
|
|
@@ -1244,97 +1263,97 @@ const ApiCard = ({ api, viewStyle }) => {
|
|
|
1244
1263
|
padding: 0,
|
|
1245
1264
|
margin: 0,
|
|
1246
1265
|
lineHeight: "1.375rem",
|
|
1247
|
-
fontSize: token
|
|
1266
|
+
fontSize: token.fontSize
|
|
1248
1267
|
},
|
|
1249
1268
|
[scope("list-see-details")]: {
|
|
1250
1269
|
width: "6.5625rem",
|
|
1251
1270
|
height: "2rem",
|
|
1252
|
-
borderRadius: token
|
|
1253
|
-
border: `${token
|
|
1254
|
-
paddingRight: token
|
|
1255
|
-
paddingLeft: token
|
|
1256
|
-
background: token
|
|
1257
|
-
"&:hover": { background: token
|
|
1271
|
+
borderRadius: token.borderRadius,
|
|
1272
|
+
border: `${token.lineWidth}px solid ${token.Button?.defaultBorderColor}`,
|
|
1273
|
+
paddingRight: token.Button?.paddingInline,
|
|
1274
|
+
paddingLeft: token.Button?.paddingInline,
|
|
1275
|
+
background: token.Button?.defaultBg,
|
|
1276
|
+
"&:hover": { background: token.Button?.defaultBg }
|
|
1258
1277
|
},
|
|
1259
1278
|
[scope("list-content")]: {
|
|
1260
1279
|
display: "flex",
|
|
1261
|
-
paddingTop: token
|
|
1262
|
-
paddingBottom: token
|
|
1263
|
-
paddingRight: token
|
|
1264
|
-
paddingLeft: token
|
|
1280
|
+
paddingTop: token.paddingXXS,
|
|
1281
|
+
paddingBottom: token.paddingXXS,
|
|
1282
|
+
paddingRight: token.paddingXS,
|
|
1283
|
+
paddingLeft: token.paddingXS,
|
|
1265
1284
|
alignItems: "center",
|
|
1266
|
-
gap: token
|
|
1285
|
+
gap: token.marginXS,
|
|
1267
1286
|
alignSelf: "stretch",
|
|
1268
1287
|
flexDirection: "row",
|
|
1269
|
-
borderRadius: token
|
|
1270
|
-
border: `1px solid ${token
|
|
1288
|
+
borderRadius: token.borderRadiusSM,
|
|
1289
|
+
border: `1px solid ${token.colorBorderSecondary}`,
|
|
1271
1290
|
minWidth: "6.25rem",
|
|
1272
1291
|
maxWidth: "fit-content",
|
|
1273
|
-
svg: { path: { fill: token
|
|
1292
|
+
svg: { path: { fill: token.colorPrimary } }
|
|
1274
1293
|
},
|
|
1275
1294
|
[scope("list-title")]: {
|
|
1276
|
-
color: token
|
|
1277
|
-
fontSize: token
|
|
1278
|
-
fontWeight: token
|
|
1279
|
-
lineHeight: token
|
|
1295
|
+
color: token.colorTextHeading,
|
|
1296
|
+
fontSize: token.fontSizeHeading3,
|
|
1297
|
+
fontWeight: token.fontWeightStrong,
|
|
1298
|
+
lineHeight: token.lineHeightHeading3,
|
|
1280
1299
|
paddingBottom: 0,
|
|
1281
1300
|
marginBottom: 0,
|
|
1282
|
-
fontFamily: token
|
|
1301
|
+
fontFamily: token.fontFamily,
|
|
1283
1302
|
cursor: "pointer",
|
|
1284
1303
|
transition: "color 0.2s ease-in",
|
|
1285
1304
|
"&:hover": {
|
|
1286
|
-
color: `${token
|
|
1305
|
+
color: `${token.colorPrimary} !important`,
|
|
1287
1306
|
textDecoration: "underline"
|
|
1288
1307
|
}
|
|
1289
1308
|
},
|
|
1290
1309
|
[scope("path-name")]: {
|
|
1291
|
-
color: token
|
|
1292
|
-
fontSize: token
|
|
1310
|
+
color: token.colorText,
|
|
1311
|
+
fontSize: token.fontSizeSM,
|
|
1293
1312
|
fontWeight: 400,
|
|
1294
|
-
fontFamily: token
|
|
1313
|
+
fontFamily: token.fontFamily
|
|
1295
1314
|
},
|
|
1296
1315
|
[scope("grid-card")]: {
|
|
1297
1316
|
width: "17.5rem",
|
|
1298
1317
|
height: "100%",
|
|
1299
|
-
borderRadius: token
|
|
1318
|
+
borderRadius: token.borderRadiusLG
|
|
1300
1319
|
},
|
|
1301
1320
|
[scope("grid-title")]: {
|
|
1302
|
-
color: token
|
|
1303
|
-
fontSize: token
|
|
1304
|
-
fontWeight: token
|
|
1305
|
-
lineHeight: token
|
|
1321
|
+
color: token.colorTextHeading,
|
|
1322
|
+
fontSize: token.fontSizeHeading3,
|
|
1323
|
+
fontWeight: token.fontWeightStrong,
|
|
1324
|
+
lineHeight: token.lineHeightHeading3,
|
|
1306
1325
|
paddingBottom: 0,
|
|
1307
1326
|
marginBottom: 0,
|
|
1308
|
-
fontFamily: token
|
|
1327
|
+
fontFamily: token.fontFamily
|
|
1309
1328
|
},
|
|
1310
1329
|
[scope("grid-content")]: {
|
|
1311
1330
|
display: "flex",
|
|
1312
|
-
paddingTop: token
|
|
1313
|
-
paddingBottom: token
|
|
1314
|
-
paddingRight: token
|
|
1315
|
-
paddingLeft: token
|
|
1331
|
+
paddingTop: token.paddingXXS,
|
|
1332
|
+
paddingBottom: token.paddingXXS,
|
|
1333
|
+
paddingRight: token.paddingXS,
|
|
1334
|
+
paddingLeft: token.paddingXS,
|
|
1316
1335
|
alignItems: "center",
|
|
1317
|
-
gap: token
|
|
1336
|
+
gap: token.marginXS,
|
|
1318
1337
|
alignSelf: "stretch",
|
|
1319
1338
|
flexDirection: "row",
|
|
1320
|
-
borderRadius: token
|
|
1321
|
-
border: `1px solid ${token
|
|
1322
|
-
svg: { path: { fill: token
|
|
1339
|
+
borderRadius: token.borderRadiusSM,
|
|
1340
|
+
border: `1px solid ${token.colorBorderSecondary}`,
|
|
1341
|
+
svg: { path: { fill: token.colorPrimary } }
|
|
1323
1342
|
},
|
|
1324
1343
|
[scope("grid-path-name")]: {
|
|
1325
|
-
color: token
|
|
1326
|
-
fontSize: token
|
|
1344
|
+
color: token.colorText,
|
|
1345
|
+
fontSize: token.fontSizeSM,
|
|
1327
1346
|
fontWeight: 400,
|
|
1328
|
-
fontFamily: token
|
|
1347
|
+
fontFamily: token.fontFamily
|
|
1329
1348
|
},
|
|
1330
1349
|
[scope("grid-see-details")]: {
|
|
1331
1350
|
paddingTop: 0,
|
|
1332
1351
|
paddingBottom: 0,
|
|
1333
1352
|
paddingLeft: "0.4375rem",
|
|
1334
1353
|
paddingRight: "0.4375rem",
|
|
1335
|
-
borderRadius: token
|
|
1336
|
-
border: `1px solid ${token
|
|
1337
|
-
background: token
|
|
1354
|
+
borderRadius: token.borderRadiusSM,
|
|
1355
|
+
border: `1px solid ${token.Button?.defaultBorderColor}`,
|
|
1356
|
+
background: token.Button?.defaultBg,
|
|
1338
1357
|
boxShadow: `0 2px 0 0 rgba(0, 0, 0, 0.02)`,
|
|
1339
1358
|
width: "100%",
|
|
1340
1359
|
height: "1.5rem"
|
|
@@ -1378,7 +1397,7 @@ const ApiCard = ({ api, viewStyle }) => {
|
|
|
1378
1397
|
align: "center",
|
|
1379
1398
|
className: cx("list-container"),
|
|
1380
1399
|
children: [/* @__PURE__ */ jsxs(Flex, {
|
|
1381
|
-
gap: token
|
|
1400
|
+
gap: token.marginSM,
|
|
1382
1401
|
children: [/* @__PURE__ */ jsx(MethodChip, { method: api.method }), /* @__PURE__ */ jsx(Title, {
|
|
1383
1402
|
className: cx("list-title"),
|
|
1384
1403
|
level: 4,
|
|
@@ -1393,7 +1412,7 @@ const ApiCard = ({ api, viewStyle }) => {
|
|
|
1393
1412
|
}),
|
|
1394
1413
|
/* @__PURE__ */ jsxs("div", {
|
|
1395
1414
|
className: cx("list-content"),
|
|
1396
|
-
children: [/* @__PURE__ */ jsx(
|
|
1415
|
+
children: [/* @__PURE__ */ jsx(Link, {}), /* @__PURE__ */ jsx(Text, {
|
|
1397
1416
|
className: cx("path-name"),
|
|
1398
1417
|
children: api?.path
|
|
1399
1418
|
})]
|
|
@@ -1408,7 +1427,7 @@ const ApiCard = ({ api, viewStyle }) => {
|
|
|
1408
1427
|
className: cx("grid-card"),
|
|
1409
1428
|
children: /* @__PURE__ */ jsxs(Flex, {
|
|
1410
1429
|
vertical: true,
|
|
1411
|
-
gap: token
|
|
1430
|
+
gap: token.marginSM,
|
|
1412
1431
|
children: [
|
|
1413
1432
|
/* @__PURE__ */ jsx(MethodChip, { method: api?.method }),
|
|
1414
1433
|
/* @__PURE__ */ jsx(Title, {
|
|
@@ -1418,7 +1437,7 @@ const ApiCard = ({ api, viewStyle }) => {
|
|
|
1418
1437
|
}),
|
|
1419
1438
|
/* @__PURE__ */ jsxs("div", {
|
|
1420
1439
|
className: cx("grid-content"),
|
|
1421
|
-
children: [/* @__PURE__ */ jsx(
|
|
1440
|
+
children: [/* @__PURE__ */ jsx(Link, {}), /* @__PURE__ */ jsx(Text, {
|
|
1422
1441
|
className: cx("grid-path-name"),
|
|
1423
1442
|
children: api?.path
|
|
1424
1443
|
})]
|
|
@@ -1432,8 +1451,6 @@ const ApiCard = ({ api, viewStyle }) => {
|
|
|
1432
1451
|
})
|
|
1433
1452
|
}));
|
|
1434
1453
|
};
|
|
1435
|
-
var ApiCard_default = ApiCard;
|
|
1436
|
-
|
|
1437
1454
|
//#endregion
|
|
1438
1455
|
//#region src/view/components/ApiPage/components/ViewModeApiHeader.tsx
|
|
1439
1456
|
function formatAuthType(authType) {
|
|
@@ -1447,11 +1464,11 @@ function formatAuthType(authType) {
|
|
|
1447
1464
|
}
|
|
1448
1465
|
}
|
|
1449
1466
|
const ViewModeApiHeader = ({ api, viewLayout, onViewLayoutChange }) => {
|
|
1450
|
-
const { wrapSSR, cx
|
|
1467
|
+
const { wrapSSR, cx } = useStyle("ViewModeApiHeader", (token, scope) => ({
|
|
1451
1468
|
[scope("root")]: {
|
|
1452
1469
|
display: "flex",
|
|
1453
1470
|
flexDirection: "column",
|
|
1454
|
-
gap: token
|
|
1471
|
+
gap: token.marginMD
|
|
1455
1472
|
},
|
|
1456
1473
|
[scope("meta-bar")]: {
|
|
1457
1474
|
display: "flex",
|
|
@@ -1467,20 +1484,20 @@ const ViewModeApiHeader = ({ api, viewLayout, onViewLayoutChange }) => {
|
|
|
1467
1484
|
display: "flex",
|
|
1468
1485
|
alignItems: "center",
|
|
1469
1486
|
paddingRight: 12,
|
|
1470
|
-
borderRight: `1px solid ${token
|
|
1487
|
+
borderRight: `1px solid ${token.colorBorderSecondary}`,
|
|
1471
1488
|
marginRight: 12
|
|
1472
1489
|
},
|
|
1473
1490
|
[scope("jws-tag")]: {
|
|
1474
1491
|
display: "flex",
|
|
1475
1492
|
alignItems: "center",
|
|
1476
1493
|
height: 32,
|
|
1477
|
-
background: token
|
|
1478
|
-
border: `1px solid ${token
|
|
1494
|
+
background: token.colorPrimaryBg,
|
|
1495
|
+
border: `1px solid ${token.colorPrimaryBorder}`,
|
|
1479
1496
|
borderRadius: 6,
|
|
1480
1497
|
padding: "0 8px",
|
|
1481
1498
|
fontSize: 12,
|
|
1482
1499
|
lineHeight: "20px",
|
|
1483
|
-
color: token
|
|
1500
|
+
color: token.colorPrimary,
|
|
1484
1501
|
fontWeight: 400,
|
|
1485
1502
|
margin: 0
|
|
1486
1503
|
},
|
|
@@ -1488,14 +1505,14 @@ const ViewModeApiHeader = ({ api, viewLayout, onViewLayoutChange }) => {
|
|
|
1488
1505
|
display: "inline-flex",
|
|
1489
1506
|
alignItems: "center",
|
|
1490
1507
|
gap: 4,
|
|
1491
|
-
background: token
|
|
1492
|
-
border: `1px solid ${token
|
|
1508
|
+
background: token.colorBgContainer,
|
|
1509
|
+
border: `1px solid ${token.colorBorder}`,
|
|
1493
1510
|
borderRadius: 4,
|
|
1494
1511
|
padding: "0 8px",
|
|
1495
1512
|
height: 32,
|
|
1496
1513
|
fontSize: 12,
|
|
1497
1514
|
lineHeight: "20px",
|
|
1498
|
-
color: token
|
|
1515
|
+
color: token.colorText,
|
|
1499
1516
|
margin: 0,
|
|
1500
1517
|
boxSizing: "border-box"
|
|
1501
1518
|
},
|
|
@@ -1508,8 +1525,8 @@ const ViewModeApiHeader = ({ api, viewLayout, onViewLayoutChange }) => {
|
|
|
1508
1525
|
display: "inline-flex",
|
|
1509
1526
|
alignItems: "center",
|
|
1510
1527
|
gap: 8,
|
|
1511
|
-
background: token
|
|
1512
|
-
border: `1px solid ${token
|
|
1528
|
+
background: token.colorFillTertiary,
|
|
1529
|
+
border: `1px solid ${token.colorBorder}`,
|
|
1513
1530
|
borderRadius: 6,
|
|
1514
1531
|
padding: "0 15px",
|
|
1515
1532
|
height: 32,
|
|
@@ -1518,13 +1535,13 @@ const ViewModeApiHeader = ({ api, viewLayout, onViewLayoutChange }) => {
|
|
|
1518
1535
|
},
|
|
1519
1536
|
[scope("version-icon")]: {
|
|
1520
1537
|
fontSize: 16,
|
|
1521
|
-
color: token
|
|
1538
|
+
color: token.colorTextDisabled,
|
|
1522
1539
|
display: "flex",
|
|
1523
1540
|
alignItems: "center"
|
|
1524
1541
|
},
|
|
1525
1542
|
[scope("version-text")]: {
|
|
1526
1543
|
fontSize: 14,
|
|
1527
|
-
color: token
|
|
1544
|
+
color: token.colorTextDisabled,
|
|
1528
1545
|
fontWeight: 400,
|
|
1529
1546
|
lineHeight: 1
|
|
1530
1547
|
},
|
|
@@ -1538,16 +1555,16 @@ const ViewModeApiHeader = ({ api, viewLayout, onViewLayoutChange }) => {
|
|
|
1538
1555
|
justifyContent: "center"
|
|
1539
1556
|
},
|
|
1540
1557
|
[scope("toggle-btn-active")]: {
|
|
1541
|
-
border: `1px solid ${token
|
|
1542
|
-
color: `${token
|
|
1543
|
-
backgroundColor: `${token
|
|
1558
|
+
border: `1px solid ${token.colorPrimary} !important`,
|
|
1559
|
+
color: `${token.colorPrimary} !important`,
|
|
1560
|
+
backgroundColor: `${token.colorBgContainer} !important`,
|
|
1544
1561
|
zIndex: 1
|
|
1545
1562
|
},
|
|
1546
1563
|
[scope("description")]: {
|
|
1547
|
-
fontSize: token
|
|
1548
|
-
color: token
|
|
1564
|
+
fontSize: token.fontSizeLG,
|
|
1565
|
+
color: token.colorTextTertiary
|
|
1549
1566
|
},
|
|
1550
|
-
[scope("title")]: { fontFamily: token
|
|
1567
|
+
[scope("title")]: { fontFamily: token.fontFamily }
|
|
1551
1568
|
}));
|
|
1552
1569
|
const version = api.relatedVersions?.find((v) => v.apiId === api.currentVersion)?.version || api.version;
|
|
1553
1570
|
return wrapSSR(/* @__PURE__ */ jsxs("div", {
|
|
@@ -1632,15 +1649,13 @@ const ViewModeApiHeader = ({ api, viewLayout, onViewLayoutChange }) => {
|
|
|
1632
1649
|
]
|
|
1633
1650
|
}));
|
|
1634
1651
|
};
|
|
1635
|
-
|
|
1636
1652
|
//#endregion
|
|
1637
1653
|
//#region src/view/components/ApiPage/index.tsx
|
|
1638
1654
|
const APIPage = () => {
|
|
1639
1655
|
const [selectedUrl, setSelectedUrl] = useState("");
|
|
1640
|
-
const { view: { selectedApi,
|
|
1656
|
+
const { view: { selectedApi, focusedTag, setFocusedTag } } = useStore();
|
|
1641
1657
|
const [viewStyle, setViewStyle] = useState("grid");
|
|
1642
|
-
const { wrapSSR,
|
|
1643
|
-
selectedApi?.relatedVersions?.find((v) => v.apiId === selectedApi?.currentVersion);
|
|
1658
|
+
const { wrapSSR, token } = useStyle("DocumentationApiPage", () => ({}));
|
|
1644
1659
|
const urlsOptions = useMemo(() => selectedApi?.servers?.map((server) => ({
|
|
1645
1660
|
label: server?.url,
|
|
1646
1661
|
value: server?.url
|
|
@@ -1680,7 +1695,7 @@ const APIPage = () => {
|
|
|
1680
1695
|
};
|
|
1681
1696
|
return wrapSSR(/* @__PURE__ */ jsxs(Flex, {
|
|
1682
1697
|
vertical: true,
|
|
1683
|
-
gap: token
|
|
1698
|
+
gap: token.margin,
|
|
1684
1699
|
children: [selectedApi && /* @__PURE__ */ jsx(ViewModeApiHeader, {
|
|
1685
1700
|
api: selectedApi,
|
|
1686
1701
|
viewLayout: viewStyle,
|
|
@@ -1697,14 +1712,14 @@ const APIPage = () => {
|
|
|
1697
1712
|
haveUnderLine: index < arr.length - 1,
|
|
1698
1713
|
contextPath: selectedApi?.contextPath,
|
|
1699
1714
|
viewStyle,
|
|
1700
|
-
token
|
|
1715
|
+
token
|
|
1701
1716
|
}, `${selectedApi?.id}_${key}`);
|
|
1702
1717
|
})]
|
|
1703
1718
|
}));
|
|
1704
1719
|
};
|
|
1705
|
-
const APIsRenderer = ({ apis, withTitle, tagName, haveUnderLine, contextPath, viewStyle, token
|
|
1720
|
+
const APIsRenderer = ({ apis, withTitle, tagName, haveUnderLine, contextPath, viewStyle, token }) => {
|
|
1706
1721
|
return /* @__PURE__ */ jsxs(Flex, {
|
|
1707
|
-
gap: viewStyle === "grid" ? token
|
|
1722
|
+
gap: viewStyle === "grid" ? token.marginXS : 0,
|
|
1708
1723
|
style: {
|
|
1709
1724
|
marginBottom: 0,
|
|
1710
1725
|
paddingBottom: 0
|
|
@@ -1721,19 +1736,18 @@ const APIsRenderer = ({ apis, withTitle, tagName, haveUnderLine, contextPath, vi
|
|
|
1721
1736
|
wrap: "wrap",
|
|
1722
1737
|
gap: viewStyle === "grid" ? "1.5rem" : 0,
|
|
1723
1738
|
vertical: viewStyle === "list",
|
|
1724
|
-
children: apis.map((item) => /* @__PURE__ */ jsx(
|
|
1739
|
+
children: apis.map((item) => /* @__PURE__ */ jsx(ApiCard, {
|
|
1725
1740
|
api: item,
|
|
1726
1741
|
viewStyle
|
|
1727
1742
|
}, `${tagName}_renderer_${item.id}_${item.method}_${item.path}`))
|
|
1728
1743
|
}),
|
|
1729
1744
|
haveUnderLine && /* @__PURE__ */ jsx(Divider, { style: {
|
|
1730
|
-
marginTop: token
|
|
1731
|
-
marginBottom: token
|
|
1745
|
+
marginTop: token.marginSM,
|
|
1746
|
+
marginBottom: token.marginSM
|
|
1732
1747
|
} })
|
|
1733
1748
|
]
|
|
1734
1749
|
}, `${tagName}_renderer_${contextPath}`);
|
|
1735
1750
|
};
|
|
1736
|
-
|
|
1737
1751
|
//#endregion
|
|
1738
1752
|
//#region src/utils/index.ts
|
|
1739
1753
|
const handleStatusColor = (code) => {
|
|
@@ -1744,7 +1758,6 @@ const handleStatusColor = (code) => {
|
|
|
1744
1758
|
else if (code >= 300 && code < 400) return "orange";
|
|
1745
1759
|
else return "gray";
|
|
1746
1760
|
};
|
|
1747
|
-
|
|
1748
1761
|
//#endregion
|
|
1749
1762
|
//#region src/view/components/EndpointPage/EndpointPage.tsx
|
|
1750
1763
|
const { Title: Title$2, Paragraph } = Typography;
|
|
@@ -1766,7 +1779,7 @@ const requestColumns = [
|
|
|
1766
1779
|
}
|
|
1767
1780
|
];
|
|
1768
1781
|
const responseColumns = [...requestColumns];
|
|
1769
|
-
const buildRequestData = (params, token
|
|
1782
|
+
const buildRequestData = (params, token) => [...params].sort((a, b) => a.required === b.required ? 0 : a.required ? -1 : 1).map((p, index) => {
|
|
1770
1783
|
let typeLabel = p.schema?.type;
|
|
1771
1784
|
if (p.schema?.type === "array" && p.schema?.items?.type) typeLabel = `${p.schema.type}_${p.schema.items.type}`;
|
|
1772
1785
|
return {
|
|
@@ -1775,17 +1788,17 @@ const buildRequestData = (params, token$1) => [...params].sort((a, b) => a.requi
|
|
|
1775
1788
|
p.name,
|
|
1776
1789
|
typeLabel && /* @__PURE__ */ jsx("span", {
|
|
1777
1790
|
style: {
|
|
1778
|
-
color: token
|
|
1791
|
+
color: token.colorTextTertiary,
|
|
1779
1792
|
marginLeft: "0.25rem",
|
|
1780
1793
|
marginRight: "0.25rem"
|
|
1781
1794
|
},
|
|
1782
1795
|
children: typeLabel
|
|
1783
1796
|
}),
|
|
1784
1797
|
p.required ? /* @__PURE__ */ jsx("span", {
|
|
1785
|
-
style: { color: token
|
|
1798
|
+
style: { color: token.colorError },
|
|
1786
1799
|
children: "*"
|
|
1787
1800
|
}) : /* @__PURE__ */ jsx("span", {
|
|
1788
|
-
style: { color: token
|
|
1801
|
+
style: { color: token.colorSuccess },
|
|
1789
1802
|
children: "Optional"
|
|
1790
1803
|
})
|
|
1791
1804
|
] }),
|
|
@@ -1793,7 +1806,7 @@ const buildRequestData = (params, token$1) => [...params].sort((a, b) => a.requi
|
|
|
1793
1806
|
enum: p.schema?.enum ? p.schema.enum.map((e) => /* @__PURE__ */ jsx(Tag, { children: e }, e)) : "--"
|
|
1794
1807
|
};
|
|
1795
1808
|
});
|
|
1796
|
-
const buildHeaderData = (headers, token
|
|
1809
|
+
const buildHeaderData = (headers, token) => {
|
|
1797
1810
|
if (!headers) return [];
|
|
1798
1811
|
return Object.entries(headers).sort(([, a], [, b]) => a.required === b.required ? 0 : a.required ? -1 : 1).map(([name, header], idx) => {
|
|
1799
1812
|
let typeLabel = header.schema?.type;
|
|
@@ -1804,17 +1817,17 @@ const buildHeaderData = (headers, token$1) => {
|
|
|
1804
1817
|
name,
|
|
1805
1818
|
typeLabel && /* @__PURE__ */ jsx("span", {
|
|
1806
1819
|
style: {
|
|
1807
|
-
color: token
|
|
1820
|
+
color: token.colorTextTertiary,
|
|
1808
1821
|
marginLeft: "0.25rem",
|
|
1809
1822
|
marginRight: "0.25rem"
|
|
1810
1823
|
},
|
|
1811
1824
|
children: typeLabel
|
|
1812
1825
|
}),
|
|
1813
1826
|
header.required ? /* @__PURE__ */ jsx("span", {
|
|
1814
|
-
style: { color: token
|
|
1827
|
+
style: { color: token.colorError },
|
|
1815
1828
|
children: "*"
|
|
1816
1829
|
}) : /* @__PURE__ */ jsx("span", {
|
|
1817
|
-
style: { color: token
|
|
1830
|
+
style: { color: token.colorSuccess },
|
|
1818
1831
|
children: "Optional"
|
|
1819
1832
|
})
|
|
1820
1833
|
] }, idx),
|
|
@@ -1823,7 +1836,7 @@ const buildHeaderData = (headers, token$1) => {
|
|
|
1823
1836
|
};
|
|
1824
1837
|
});
|
|
1825
1838
|
};
|
|
1826
|
-
const buildRequestBodyData = (requestBody, token
|
|
1839
|
+
const buildRequestBodyData = (requestBody, token) => {
|
|
1827
1840
|
if (!requestBody?.content) return [];
|
|
1828
1841
|
const contentType = Object.keys(requestBody.content)[0];
|
|
1829
1842
|
const schema = requestBody.content[contentType]?.schema;
|
|
@@ -1836,17 +1849,17 @@ const buildRequestBodyData = (requestBody, token$1) => {
|
|
|
1836
1849
|
name,
|
|
1837
1850
|
prop.type && /* @__PURE__ */ jsx("span", {
|
|
1838
1851
|
style: {
|
|
1839
|
-
color: token
|
|
1852
|
+
color: token.colorTextTertiary,
|
|
1840
1853
|
marginLeft: "0.25rem",
|
|
1841
1854
|
marginRight: "0.25rem"
|
|
1842
1855
|
},
|
|
1843
1856
|
children: prop.type
|
|
1844
1857
|
}),
|
|
1845
1858
|
required.includes(name) ? /* @__PURE__ */ jsx("span", {
|
|
1846
|
-
style: { color: token
|
|
1859
|
+
style: { color: token.colorError },
|
|
1847
1860
|
children: "*"
|
|
1848
1861
|
}) : /* @__PURE__ */ jsx("span", {
|
|
1849
|
-
style: { color: token
|
|
1862
|
+
style: { color: token.colorSuccess },
|
|
1850
1863
|
children: "Optional"
|
|
1851
1864
|
})
|
|
1852
1865
|
] }),
|
|
@@ -1855,14 +1868,14 @@ const buildRequestBodyData = (requestBody, token$1) => {
|
|
|
1855
1868
|
}));
|
|
1856
1869
|
};
|
|
1857
1870
|
const EndpointPage = () => {
|
|
1858
|
-
const { selectedEndpoint, selectedApi, selectedStatusCode, setSelectedNodeKey, setFocusedContent, setFocusedTag, setActiveRequestTab } =
|
|
1871
|
+
const { selectedEndpoint, selectedApi, selectedStatusCode, setSelectedNodeKey, setFocusedContent, setFocusedTag, setActiveRequestTab } = useStore(({ view }) => view);
|
|
1859
1872
|
const [activeTabKey, setActiveTabKey] = useState("header");
|
|
1860
|
-
const { token
|
|
1861
|
-
const { cx } = useStyle("EndpointPage", (token
|
|
1873
|
+
const { token } = theme.useToken();
|
|
1874
|
+
const { cx } = useStyle("EndpointPage", (token, scope) => ({
|
|
1862
1875
|
[scope("docs-endpoint-container")]: {
|
|
1863
1876
|
display: "flex",
|
|
1864
1877
|
flexDirection: "column",
|
|
1865
|
-
gap: token
|
|
1878
|
+
gap: token.marginLG,
|
|
1866
1879
|
height: "100%"
|
|
1867
1880
|
},
|
|
1868
1881
|
[scope("content")]: {
|
|
@@ -1871,43 +1884,43 @@ const EndpointPage = () => {
|
|
|
1871
1884
|
},
|
|
1872
1885
|
[scope("code")]: {
|
|
1873
1886
|
background: "unset",
|
|
1874
|
-
borderRadius: token
|
|
1875
|
-
padding: token
|
|
1887
|
+
borderRadius: token.borderRadius,
|
|
1888
|
+
padding: token.paddingSM,
|
|
1876
1889
|
fontFamily: "monospace",
|
|
1877
1890
|
whiteSpace: "pre-wrap"
|
|
1878
1891
|
},
|
|
1879
1892
|
[scope("breadcrumb")]: {
|
|
1880
1893
|
display: "flex",
|
|
1881
|
-
gap: token
|
|
1894
|
+
gap: token.marginLG,
|
|
1882
1895
|
alignItems: "center",
|
|
1883
|
-
marginBottom: token
|
|
1896
|
+
marginBottom: token.marginLG
|
|
1884
1897
|
},
|
|
1885
1898
|
[scope("request-card")]: {
|
|
1886
|
-
borderRadius: token
|
|
1887
|
-
backgroundColor: token
|
|
1899
|
+
borderRadius: token.borderRadius,
|
|
1900
|
+
backgroundColor: token.colorBgBase,
|
|
1888
1901
|
".ant-card-head": {
|
|
1889
1902
|
minHeight: "unset",
|
|
1890
1903
|
borderBottom: "unset",
|
|
1891
1904
|
padding: "0.75rem",
|
|
1892
|
-
backgroundColor: token
|
|
1905
|
+
backgroundColor: token.colorBgBase
|
|
1893
1906
|
},
|
|
1894
1907
|
".ant-card-body": {
|
|
1895
1908
|
padding: "0px 0.75rem 0.75rem 0.75rem",
|
|
1896
|
-
backgroundColor: token
|
|
1909
|
+
backgroundColor: token.colorBgBase,
|
|
1897
1910
|
".ant-tabs-tab": { paddingTop: "0" }
|
|
1898
1911
|
},
|
|
1899
|
-
"& .ant-table": { backgroundColor: `${token
|
|
1900
|
-
"& .ant-table-thead > tr > th": { backgroundColor: `${token
|
|
1901
|
-
"& .ant-table-tbody > tr > td": { backgroundColor: `${token
|
|
1912
|
+
"& .ant-table": { backgroundColor: `${token.colorBgBase} !important` },
|
|
1913
|
+
"& .ant-table-thead > tr > th": { backgroundColor: `${token.colorBgBase} !important` },
|
|
1914
|
+
"& .ant-table-tbody > tr > td": { backgroundColor: `${token.colorBgBase} !important` }
|
|
1902
1915
|
},
|
|
1903
|
-
[scope("row-odd")]: { "& > td": { background: `${token
|
|
1904
|
-
[scope("row-even")]: { "& > td": { background: `${token
|
|
1916
|
+
[scope("row-odd")]: { "& > td": { background: `${token.colorBgElevated} !important` } },
|
|
1917
|
+
[scope("row-even")]: { "& > td": { background: `${token.colorBgLayout} !important` } }
|
|
1905
1918
|
}));
|
|
1906
|
-
const methodStyle =
|
|
1907
|
-
const headerParams = buildRequestData(selectedEndpoint?.parameters?.filter((p) => p.in === "header") || [], token
|
|
1908
|
-
const pathParams = buildRequestData(selectedEndpoint?.parameters?.filter((p) => p.in === "path") || [], token
|
|
1909
|
-
const queryParams = buildRequestData(selectedEndpoint?.parameters?.filter((p) => p.in === "query") || [], token
|
|
1910
|
-
const requestBodyData = buildRequestBodyData(selectedEndpoint?.requestBody, token
|
|
1919
|
+
const methodStyle = sidebarMethodColors[selectedEndpoint?.method];
|
|
1920
|
+
const headerParams = buildRequestData(selectedEndpoint?.parameters?.filter((p) => p.in === "header") || [], token);
|
|
1921
|
+
const pathParams = buildRequestData(selectedEndpoint?.parameters?.filter((p) => p.in === "path") || [], token);
|
|
1922
|
+
const queryParams = buildRequestData(selectedEndpoint?.parameters?.filter((p) => p.in === "query") || [], token);
|
|
1923
|
+
const requestBodyData = buildRequestBodyData(selectedEndpoint?.requestBody, token);
|
|
1911
1924
|
const requestTabs = [
|
|
1912
1925
|
{
|
|
1913
1926
|
key: "header",
|
|
@@ -1964,7 +1977,7 @@ const EndpointPage = () => {
|
|
|
1964
1977
|
setActiveRequestTab(firstKey);
|
|
1965
1978
|
}, [selectedEndpoint?.id]);
|
|
1966
1979
|
const responseHeaders = (selectedEndpoint?.responses?.[selectedStatusCode || 200])?.headers;
|
|
1967
|
-
const responseHeaderData = buildHeaderData(responseHeaders, token
|
|
1980
|
+
const responseHeaderData = buildHeaderData(responseHeaders, token);
|
|
1968
1981
|
return /* @__PURE__ */ jsx("div", {
|
|
1969
1982
|
className: cx("docs-endpoint-container"),
|
|
1970
1983
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -2004,18 +2017,24 @@ const EndpointPage = () => {
|
|
|
2004
2017
|
display: "flex",
|
|
2005
2018
|
flexDirection: "row",
|
|
2006
2019
|
alignItems: "center",
|
|
2007
|
-
color: token
|
|
2020
|
+
color: token.colorTextTertiary,
|
|
2008
2021
|
gap: "0.25rem"
|
|
2009
2022
|
},
|
|
2010
2023
|
children: /* @__PURE__ */ jsx("span", { children: selectedEndpoint?.tagName || "default" })
|
|
2011
2024
|
})
|
|
2012
2025
|
},
|
|
2013
|
-
{ title: /* @__PURE__ */ jsx(
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2026
|
+
{ title: /* @__PURE__ */ jsx(Tooltip, {
|
|
2027
|
+
title: selectedEndpoint?.summary || "Endpoint Name",
|
|
2028
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
2029
|
+
style: {
|
|
2030
|
+
overflow: "hidden",
|
|
2031
|
+
textOverflow: "ellipsis",
|
|
2032
|
+
whiteSpace: "nowrap",
|
|
2033
|
+
display: "block",
|
|
2034
|
+
maxWidth: "300px"
|
|
2035
|
+
},
|
|
2036
|
+
children: selectedEndpoint?.summary || "Endpoint Name"
|
|
2037
|
+
})
|
|
2019
2038
|
}) }
|
|
2020
2039
|
] })]
|
|
2021
2040
|
}),
|
|
@@ -2038,11 +2057,21 @@ const EndpointPage = () => {
|
|
|
2038
2057
|
flexShrink: 0
|
|
2039
2058
|
},
|
|
2040
2059
|
children: selectedEndpoint?.method
|
|
2041
|
-
}),
|
|
2060
|
+
}), /* @__PURE__ */ jsx(Tooltip, {
|
|
2061
|
+
title: selectedEndpoint?.summary ?? "--",
|
|
2062
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
2063
|
+
style: {
|
|
2064
|
+
overflow: "hidden",
|
|
2065
|
+
textOverflow: "ellipsis",
|
|
2066
|
+
whiteSpace: "nowrap"
|
|
2067
|
+
},
|
|
2068
|
+
children: selectedEndpoint?.summary?.replace(selectedEndpoint?.method, "") ?? "--"
|
|
2069
|
+
})
|
|
2070
|
+
})]
|
|
2042
2071
|
}),
|
|
2043
2072
|
/* @__PURE__ */ jsx(Paragraph, {
|
|
2044
2073
|
style: {
|
|
2045
|
-
color: token
|
|
2074
|
+
color: token.colorTextTertiary,
|
|
2046
2075
|
marginBottom: "1.5rem"
|
|
2047
2076
|
},
|
|
2048
2077
|
children: selectedEndpoint?.description ?? "--"
|
|
@@ -2052,9 +2081,9 @@ const EndpointPage = () => {
|
|
|
2052
2081
|
className: cx("request-card"),
|
|
2053
2082
|
style: {
|
|
2054
2083
|
marginBottom: "1.5rem",
|
|
2055
|
-
backgroundColor: token
|
|
2084
|
+
backgroundColor: token.colorBgBase
|
|
2056
2085
|
},
|
|
2057
|
-
styles: { body: { backgroundColor: token
|
|
2086
|
+
styles: { body: { backgroundColor: token.colorBgBase } },
|
|
2058
2087
|
children: /* @__PURE__ */ jsx(Tabs, {
|
|
2059
2088
|
activeKey: activeTabKey,
|
|
2060
2089
|
onChange: (key) => {
|
|
@@ -2088,51 +2117,41 @@ const EndpointPage = () => {
|
|
|
2088
2117
|
})
|
|
2089
2118
|
});
|
|
2090
2119
|
};
|
|
2091
|
-
|
|
2092
2120
|
//#endregion
|
|
2093
|
-
//#region src/assets/mouseSquare.
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
return /* @__PURE__ */ React.createElement("svg", _extends$3({
|
|
2106
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2107
|
-
width: 18,
|
|
2108
|
-
height: 18,
|
|
2109
|
-
fill: "none"
|
|
2110
|
-
}, props), _path$3 || (_path$3 = /* @__PURE__ */ React.createElement("path", {
|
|
2111
|
-
stroke: "#fff",
|
|
2121
|
+
//#region src/assets/mouseSquare.tsx
|
|
2122
|
+
const MouseSquare = (props) => /* @__PURE__ */ jsxs("svg", {
|
|
2123
|
+
width: "18",
|
|
2124
|
+
height: "18",
|
|
2125
|
+
viewBox: "0 0 18 18",
|
|
2126
|
+
fill: "none",
|
|
2127
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2128
|
+
...props,
|
|
2129
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
2130
|
+
d: "M16.5 9V6.75C16.5 3 15 1.5 11.25 1.5H6.75C3 1.5 1.5 3 1.5 6.75V11.25C1.5 15 3 16.5 6.75 16.5H9",
|
|
2131
|
+
stroke: "white",
|
|
2132
|
+
strokeWidth: "1.5",
|
|
2112
2133
|
strokeLinecap: "round",
|
|
2113
|
-
strokeLinejoin: "round"
|
|
2114
|
-
|
|
2115
|
-
d: "
|
|
2116
|
-
|
|
2117
|
-
|
|
2134
|
+
strokeLinejoin: "round"
|
|
2135
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
2136
|
+
d: "M15.7202 13.3808L14.4978 13.7934C14.1603 13.9059 13.8902 14.1684 13.7777 14.5134L13.3652 15.7359C13.0127 16.7934 11.5277 16.7709 11.1977 15.7134L9.81025 11.2508C9.54025 10.3658 10.3577 9.54085 11.2352 9.81835L15.7053 11.2059C16.7553 11.5359 16.7702 13.0283 15.7202 13.3808Z",
|
|
2137
|
+
stroke: "white",
|
|
2138
|
+
strokeWidth: "1.5",
|
|
2118
2139
|
strokeLinecap: "round",
|
|
2119
|
-
strokeLinejoin: "round"
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
})));
|
|
2123
|
-
};
|
|
2124
|
-
var mouseSquare_default = SvgMouseSquare;
|
|
2125
|
-
|
|
2140
|
+
strokeLinejoin: "round"
|
|
2141
|
+
})]
|
|
2142
|
+
});
|
|
2126
2143
|
//#endregion
|
|
2127
2144
|
//#region src/view/components/MainContent.tsx
|
|
2128
2145
|
const MainContent = ({ searchEnabled, handleResetSearch, handleVisitLandingPage }) => {
|
|
2129
|
-
const { focusedContent, transformedData } =
|
|
2130
|
-
const { wrapSSR, cx, token
|
|
2146
|
+
const { focusedContent, transformedData } = useStore(({ view }) => view);
|
|
2147
|
+
const { wrapSSR, cx, token } = useStyle("MainContent", (token, scope) => ({
|
|
2131
2148
|
[scope("inner-doc-container")]: {
|
|
2132
2149
|
width: "100%",
|
|
2133
2150
|
height: "auto",
|
|
2134
|
-
borderRadius: token
|
|
2135
|
-
padding: token
|
|
2151
|
+
borderRadius: token.borderRadius,
|
|
2152
|
+
padding: token.paddingXL,
|
|
2153
|
+
overflow: "hidden",
|
|
2154
|
+
minWidth: 0
|
|
2136
2155
|
},
|
|
2137
2156
|
[scope("centered")]: {
|
|
2138
2157
|
display: "flex",
|
|
@@ -2143,31 +2162,31 @@ const MainContent = ({ searchEnabled, handleResetSearch, handleVisitLandingPage
|
|
|
2143
2162
|
padding: 0
|
|
2144
2163
|
},
|
|
2145
2164
|
[scope("title")]: {
|
|
2146
|
-
fontFamily: token
|
|
2165
|
+
fontFamily: token.fontFamily,
|
|
2147
2166
|
fontWeight: 600,
|
|
2148
|
-
fontSize: token
|
|
2149
|
-
color: token
|
|
2167
|
+
fontSize: token.fontSizeHeading4,
|
|
2168
|
+
color: token.colorText
|
|
2150
2169
|
},
|
|
2151
2170
|
[scope("text")]: {
|
|
2152
|
-
color: token
|
|
2153
|
-
fontFamily: token
|
|
2171
|
+
color: token.colorText,
|
|
2172
|
+
fontFamily: token.fontFamily
|
|
2154
2173
|
},
|
|
2155
2174
|
[scope("visit-landing-button")]: {
|
|
2156
2175
|
width: "12.25rem",
|
|
2157
2176
|
height: "2.5rem",
|
|
2158
|
-
borderRadius: token
|
|
2177
|
+
borderRadius: token.borderRadiusLG
|
|
2159
2178
|
},
|
|
2160
2179
|
[scope("reset-button")]: {
|
|
2161
2180
|
width: "8.125rem",
|
|
2162
2181
|
height: "2.5rem",
|
|
2163
|
-
borderRadius: token
|
|
2164
|
-
backgroundColor: token
|
|
2165
|
-
fontSize: token
|
|
2182
|
+
borderRadius: token.borderRadiusLG,
|
|
2183
|
+
backgroundColor: token?.Button?.primaryColor,
|
|
2184
|
+
fontSize: token.Button?.contentFontSizeLG
|
|
2166
2185
|
}
|
|
2167
2186
|
}));
|
|
2168
2187
|
return wrapSSR(/* @__PURE__ */ jsx("div", {
|
|
2169
2188
|
className: cx("inner-doc-container", !transformedData?.length ? "centered" : ""),
|
|
2170
|
-
style: { backgroundColor: focusedContent === "ENDPOINT" ? token
|
|
2189
|
+
style: { backgroundColor: focusedContent === "ENDPOINT" ? token.colorBgBase : token.colorBgElevated },
|
|
2171
2190
|
children: !transformedData?.length ? /* @__PURE__ */ jsxs(Flex, {
|
|
2172
2191
|
justify: "center",
|
|
2173
2192
|
align: "center",
|
|
@@ -2175,9 +2194,9 @@ const MainContent = ({ searchEnabled, handleResetSearch, handleVisitLandingPage
|
|
|
2175
2194
|
vertical: true,
|
|
2176
2195
|
flex: 1,
|
|
2177
2196
|
children: [
|
|
2178
|
-
/* @__PURE__ */ jsx(
|
|
2179
|
-
stroke: token
|
|
2180
|
-
fill: token
|
|
2197
|
+
/* @__PURE__ */ jsx(NoDataIcon, {
|
|
2198
|
+
stroke: token.colorPrimaryHover,
|
|
2199
|
+
fill: token.colorPrimaryBg,
|
|
2181
2200
|
width: "18.625rem",
|
|
2182
2201
|
height: "14.75rem"
|
|
2183
2202
|
}),
|
|
@@ -2198,7 +2217,7 @@ const MainContent = ({ searchEnabled, handleResetSearch, handleVisitLandingPage
|
|
|
2198
2217
|
!searchEnabled ? /* @__PURE__ */ jsx(Button, {
|
|
2199
2218
|
type: "primary",
|
|
2200
2219
|
onClick: handleVisitLandingPage,
|
|
2201
|
-
icon: /* @__PURE__ */ jsx(
|
|
2220
|
+
icon: /* @__PURE__ */ jsx(MouseSquare, {}),
|
|
2202
2221
|
iconPosition: "start",
|
|
2203
2222
|
className: cx("visit-landing-button"),
|
|
2204
2223
|
children: "Visit Landing Page"
|
|
@@ -2212,27 +2231,26 @@ const MainContent = ({ searchEnabled, handleResetSearch, handleVisitLandingPage
|
|
|
2212
2231
|
}) : focusedContent === "ENDPOINT" ? /* @__PURE__ */ jsx(EndpointPage, {}) : /* @__PURE__ */ jsx(APIPage, {})
|
|
2213
2232
|
}));
|
|
2214
2233
|
};
|
|
2215
|
-
|
|
2216
2234
|
//#endregion
|
|
2217
2235
|
//#region src/view/components/ApiPage/components/ApiDocumentationBar.tsx
|
|
2218
2236
|
const { useBreakpoint: useBreakpoint$3 } = Grid;
|
|
2219
2237
|
const { Title: Title$1 } = Typography;
|
|
2220
2238
|
const ApiDocumentationBar = ({ apiName, mode, onModeChange, onReset, onSave, hasChanges = false, switcherNode }) => {
|
|
2221
2239
|
const isMobile = !useBreakpoint$3().md;
|
|
2222
|
-
const { wrapSSR, cx, token
|
|
2240
|
+
const { wrapSSR, cx, token } = useStyle("ApiDocumentationBar", (token, scope) => ({
|
|
2223
2241
|
[scope("root")]: {
|
|
2224
2242
|
display: "flex",
|
|
2225
2243
|
alignItems: "center",
|
|
2226
2244
|
justifyContent: "space-between",
|
|
2227
|
-
padding: `${token
|
|
2228
|
-
background: token
|
|
2229
|
-
borderRadius: token
|
|
2245
|
+
padding: `${token.marginSM + 4}px ${token.paddingLG}px`,
|
|
2246
|
+
background: token.colorBgContainer,
|
|
2247
|
+
borderRadius: token.borderRadius,
|
|
2230
2248
|
width: "100%",
|
|
2231
|
-
["@media (max-width: 640px)"]: { padding: `${token
|
|
2249
|
+
["@media (max-width: 640px)"]: { padding: `${token.marginSM}px ${token.marginMD}px` }
|
|
2232
2250
|
},
|
|
2233
2251
|
[scope("mobileWrapper")]: {
|
|
2234
2252
|
flexDirection: "column",
|
|
2235
|
-
gap: token
|
|
2253
|
+
gap: token.marginMD
|
|
2236
2254
|
},
|
|
2237
2255
|
[scope("mobileTopRow")]: {
|
|
2238
2256
|
width: "100%",
|
|
@@ -2255,7 +2273,9 @@ const ApiDocumentationBar = ({ apiName, mode, onModeChange, onReset, onSave, has
|
|
|
2255
2273
|
flex: 1,
|
|
2256
2274
|
display: "flex",
|
|
2257
2275
|
alignItems: "center",
|
|
2258
|
-
gap: token
|
|
2276
|
+
gap: token.marginSM,
|
|
2277
|
+
minWidth: 0,
|
|
2278
|
+
overflow: "hidden"
|
|
2259
2279
|
},
|
|
2260
2280
|
[scope("arrow-icon")]: {
|
|
2261
2281
|
width: 24,
|
|
@@ -2263,14 +2283,14 @@ const ApiDocumentationBar = ({ apiName, mode, onModeChange, onReset, onSave, has
|
|
|
2263
2283
|
display: "flex",
|
|
2264
2284
|
alignItems: "center",
|
|
2265
2285
|
justifyContent: "center",
|
|
2266
|
-
color: token
|
|
2286
|
+
color: token.colorText
|
|
2267
2287
|
},
|
|
2268
2288
|
[scope("switcher")]: {
|
|
2269
2289
|
display: "flex",
|
|
2270
2290
|
alignItems: "center",
|
|
2271
|
-
background: token
|
|
2272
|
-
padding: "4px
|
|
2273
|
-
borderRadius: token
|
|
2291
|
+
background: token.colorBgLayout,
|
|
2292
|
+
padding: "4px 4px",
|
|
2293
|
+
borderRadius: token.borderRadius,
|
|
2274
2294
|
gap: 8
|
|
2275
2295
|
},
|
|
2276
2296
|
[scope("switcher-item")]: {
|
|
@@ -2281,17 +2301,17 @@ const ApiDocumentationBar = ({ apiName, mode, onModeChange, onReset, onSave, has
|
|
|
2281
2301
|
background: "transparent",
|
|
2282
2302
|
border: "none",
|
|
2283
2303
|
cursor: "pointer",
|
|
2284
|
-
fontSize: token
|
|
2304
|
+
fontSize: token.fontSizeLG,
|
|
2285
2305
|
fontWeight: 400,
|
|
2286
|
-
color: token
|
|
2287
|
-
fontFamily: token
|
|
2306
|
+
color: token.colorText,
|
|
2307
|
+
fontFamily: token.fontFamily,
|
|
2288
2308
|
transition: "all 0.2s ease"
|
|
2289
2309
|
},
|
|
2290
2310
|
[scope("switcher-item-active")]: {
|
|
2291
|
-
background: token
|
|
2292
|
-
borderRadius: token
|
|
2311
|
+
background: token.colorBgContainer,
|
|
2312
|
+
borderRadius: token.borderRadius,
|
|
2293
2313
|
boxShadow: "0px 2px 4px -2px rgba(17,12,34,0.12)",
|
|
2294
|
-
fontSize: token
|
|
2314
|
+
fontSize: token.fontSize,
|
|
2295
2315
|
fontWeight: 700
|
|
2296
2316
|
},
|
|
2297
2317
|
[scope("switcher-icon")]: {
|
|
@@ -2305,14 +2325,14 @@ const ApiDocumentationBar = ({ apiName, mode, onModeChange, onReset, onSave, has
|
|
|
2305
2325
|
[scope("actions")]: {
|
|
2306
2326
|
display: "flex",
|
|
2307
2327
|
alignItems: "center",
|
|
2308
|
-
gap: token
|
|
2328
|
+
gap: token.marginMD,
|
|
2309
2329
|
flex: 1,
|
|
2310
2330
|
justifyContent: "flex-end"
|
|
2311
2331
|
},
|
|
2312
2332
|
[scope("mobileActions")]: {
|
|
2313
2333
|
display: "flex",
|
|
2314
2334
|
alignItems: "center",
|
|
2315
|
-
gap: token
|
|
2335
|
+
gap: token.marginSM,
|
|
2316
2336
|
justifyContent: "flex-end"
|
|
2317
2337
|
}
|
|
2318
2338
|
}));
|
|
@@ -2333,7 +2353,7 @@ const ApiDocumentationBar = ({ apiName, mode, onModeChange, onReset, onSave, has
|
|
|
2333
2353
|
style: {
|
|
2334
2354
|
margin: 0,
|
|
2335
2355
|
fontWeight: 600,
|
|
2336
|
-
color: token
|
|
2356
|
+
color: token.colorTextHeading
|
|
2337
2357
|
},
|
|
2338
2358
|
children: apiName
|
|
2339
2359
|
})
|
|
@@ -2363,15 +2383,22 @@ const ApiDocumentationBar = ({ apiName, mode, onModeChange, onReset, onSave, has
|
|
|
2363
2383
|
children: [
|
|
2364
2384
|
/* @__PURE__ */ jsx("div", {
|
|
2365
2385
|
className: cx("title-section"),
|
|
2366
|
-
children: /* @__PURE__ */
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2386
|
+
children: /* @__PURE__ */ jsx(Tooltip, {
|
|
2387
|
+
title: `${apiName} API Documentation`,
|
|
2388
|
+
children: /* @__PURE__ */ jsxs(Title$1, {
|
|
2389
|
+
level: 3,
|
|
2390
|
+
style: {
|
|
2391
|
+
margin: 0,
|
|
2392
|
+
fontWeight: 600,
|
|
2393
|
+
whiteSpace: "nowrap",
|
|
2394
|
+
overflow: "hidden",
|
|
2395
|
+
textOverflow: "ellipsis",
|
|
2396
|
+
color: token.colorTextHeading,
|
|
2397
|
+
minWidth: 0,
|
|
2398
|
+
flex: 1
|
|
2399
|
+
},
|
|
2400
|
+
children: [apiName, " API Documentation"]
|
|
2401
|
+
})
|
|
2375
2402
|
})
|
|
2376
2403
|
}),
|
|
2377
2404
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -2410,17 +2437,16 @@ const ApiDocumentationBar = ({ apiName, mode, onModeChange, onReset, onSave, has
|
|
|
2410
2437
|
]
|
|
2411
2438
|
}));
|
|
2412
2439
|
};
|
|
2413
|
-
|
|
2414
2440
|
//#endregion
|
|
2415
2441
|
//#region src/view/components/ApiPage/components/GeneralSection.tsx
|
|
2416
2442
|
const { useBreakpoint: useBreakpoint$2 } = Grid;
|
|
2417
2443
|
const GeneralSection = ({ apiName, authType, version, description, onApiNameChange, onDescriptionChange, collapsed = false, onToggleCollapse, onChangeDetected }) => {
|
|
2418
2444
|
const isMobile = !useBreakpoint$2().md;
|
|
2419
|
-
const { wrapSSR, cx, token
|
|
2445
|
+
const { wrapSSR, cx, token } = useStyle("GeneralSection", (token, scope) => ({
|
|
2420
2446
|
[scope("root")]: {
|
|
2421
2447
|
display: "flex",
|
|
2422
2448
|
flexDirection: "column",
|
|
2423
|
-
borderRadius: token
|
|
2449
|
+
borderRadius: token.borderRadius,
|
|
2424
2450
|
overflow: "hidden",
|
|
2425
2451
|
width: "100%"
|
|
2426
2452
|
},
|
|
@@ -2428,22 +2454,22 @@ const GeneralSection = ({ apiName, authType, version, description, onApiNameChan
|
|
|
2428
2454
|
display: "flex",
|
|
2429
2455
|
alignItems: "center",
|
|
2430
2456
|
justifyContent: "space-between",
|
|
2431
|
-
padding: `${token
|
|
2432
|
-
background: token
|
|
2433
|
-
borderRadius: `${token
|
|
2457
|
+
padding: `${token.paddingXS}px ${token.paddingLG}px`,
|
|
2458
|
+
background: token.colorPrimaryBg,
|
|
2459
|
+
borderRadius: `${token.borderRadius}px ${token.borderRadius}px 0 0`
|
|
2434
2460
|
},
|
|
2435
2461
|
[scope("body")]: {
|
|
2436
2462
|
display: "flex",
|
|
2437
2463
|
flexDirection: "column",
|
|
2438
|
-
gap: token
|
|
2439
|
-
padding: token
|
|
2440
|
-
paddingBottom: token
|
|
2441
|
-
background: token
|
|
2442
|
-
borderRadius: `0 0 ${token
|
|
2464
|
+
gap: token.paddingLG,
|
|
2465
|
+
padding: token.paddingLG,
|
|
2466
|
+
paddingBottom: token.paddingXXL ?? 48,
|
|
2467
|
+
background: token.colorBgElevated,
|
|
2468
|
+
borderRadius: `0 0 ${token.borderRadius}px ${token.borderRadius}px`
|
|
2443
2469
|
},
|
|
2444
2470
|
[scope("row")]: {
|
|
2445
2471
|
display: "flex",
|
|
2446
|
-
gap: token
|
|
2472
|
+
gap: token.paddingLG,
|
|
2447
2473
|
width: "100%"
|
|
2448
2474
|
},
|
|
2449
2475
|
[scope("field")]: {
|
|
@@ -2455,22 +2481,22 @@ const GeneralSection = ({ apiName, authType, version, description, onApiNameChan
|
|
|
2455
2481
|
[scope("label")]: {
|
|
2456
2482
|
display: "flex",
|
|
2457
2483
|
alignItems: "center",
|
|
2458
|
-
gap: token
|
|
2459
|
-
fontSize: token
|
|
2484
|
+
gap: token.marginXXS,
|
|
2485
|
+
fontSize: token.fontSize,
|
|
2460
2486
|
fontWeight: 400,
|
|
2461
|
-
color: token
|
|
2462
|
-
paddingBottom: token
|
|
2487
|
+
color: token.colorText,
|
|
2488
|
+
paddingBottom: token.paddingXS,
|
|
2463
2489
|
lineHeight: "22px"
|
|
2464
2490
|
},
|
|
2465
2491
|
[scope("label-required")]: {
|
|
2466
|
-
color: token
|
|
2467
|
-
fontSize: token
|
|
2492
|
+
color: token.colorError,
|
|
2493
|
+
fontSize: token.fontSize
|
|
2468
2494
|
},
|
|
2469
2495
|
[scope("count")]: {
|
|
2470
2496
|
alignSelf: "flex-end",
|
|
2471
|
-
fontSize: token
|
|
2472
|
-
color: token
|
|
2473
|
-
marginTop: token
|
|
2497
|
+
fontSize: token.fontSize,
|
|
2498
|
+
color: token.colorTextDescription,
|
|
2499
|
+
marginTop: token.marginXXS
|
|
2474
2500
|
}
|
|
2475
2501
|
}));
|
|
2476
2502
|
return wrapSSR(/* @__PURE__ */ jsxs("div", {
|
|
@@ -2481,7 +2507,7 @@ const GeneralSection = ({ apiName, authType, version, description, onApiNameChan
|
|
|
2481
2507
|
level: 4,
|
|
2482
2508
|
style: {
|
|
2483
2509
|
margin: 0,
|
|
2484
|
-
color: token
|
|
2510
|
+
color: token.colorTextHeading
|
|
2485
2511
|
},
|
|
2486
2512
|
children: "General"
|
|
2487
2513
|
}), /* @__PURE__ */ jsx(Button, {
|
|
@@ -2497,8 +2523,8 @@ const GeneralSection = ({ apiName, authType, version, description, onApiNameChan
|
|
|
2497
2523
|
}), !collapsed && /* @__PURE__ */ jsxs("div", {
|
|
2498
2524
|
className: cx("body"),
|
|
2499
2525
|
style: isMobile ? {
|
|
2500
|
-
padding: token
|
|
2501
|
-
paddingBottom: token
|
|
2526
|
+
padding: token.paddingMD,
|
|
2527
|
+
paddingBottom: token.paddingXXL ?? 48
|
|
2502
2528
|
} : void 0,
|
|
2503
2529
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
2504
2530
|
className: cx("row"),
|
|
@@ -2579,73 +2605,101 @@ const GeneralSection = ({ apiName, authType, version, description, onApiNameChan
|
|
|
2579
2605
|
})]
|
|
2580
2606
|
}));
|
|
2581
2607
|
};
|
|
2582
|
-
|
|
2583
2608
|
//#endregion
|
|
2584
|
-
//#region src/assets/trash.
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
}
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2609
|
+
//#region src/assets/trash.tsx
|
|
2610
|
+
const Trash = (props) => /* @__PURE__ */ jsxs("svg", {
|
|
2611
|
+
viewBox: "0 0 40 40",
|
|
2612
|
+
fill: "none",
|
|
2613
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2614
|
+
...props,
|
|
2615
|
+
children: [
|
|
2616
|
+
/* @__PURE__ */ jsx("mask", {
|
|
2617
|
+
id: "path-1-inside-1_17984_239034",
|
|
2618
|
+
fill: "white",
|
|
2619
|
+
children: /* @__PURE__ */ jsx("path", { d: "M0 8C0 3.58172 3.58172 0 8 0H32C36.4183 0 40 3.58172 40 8V32C40 36.4183 36.4183 40 32 40H8C3.58172 40 0 36.4183 0 32V8Z" })
|
|
2620
|
+
}),
|
|
2621
|
+
/* @__PURE__ */ jsx("path", {
|
|
2622
|
+
d: "M8 0V1H32V0V-1H8V0ZM40 8H39V32H40H41V8H40ZM32 40V39H8V40V41H32V40ZM0 32H1V8H0H-1V32H0ZM8 40V39C4.13401 39 1 35.866 1 32H0H-1C-1 36.9706 3.02944 41 8 41V40ZM40 32H39C39 35.866 35.866 39 32 39V40V41C36.9706 41 41 36.9706 41 32H40ZM32 0V1C35.866 1 39 4.13401 39 8H40H41C41 3.02944 36.9706 -1 32 -1V0ZM8 0V-1C3.02944 -1 -1 3.02944 -1 8H0H1C1 4.13401 4.13401 1 8 1V0Z",
|
|
2623
|
+
fill: "#FF4D4F",
|
|
2624
|
+
mask: "url(#path-1-inside-1_17984_239034)"
|
|
2625
|
+
}),
|
|
2626
|
+
/* @__PURE__ */ jsx("path", {
|
|
2627
|
+
d: "M26.75 15.4844C24.2525 15.2369 21.74 15.1094 19.235 15.1094C17.75 15.1094 16.265 15.1844 14.78 15.3344L13.25 15.4844",
|
|
2628
|
+
fill: "#FF4D4F"
|
|
2629
|
+
}),
|
|
2630
|
+
/* @__PURE__ */ jsx("path", {
|
|
2631
|
+
d: "M26.75 15.4844C24.2525 15.2369 21.74 15.1094 19.235 15.1094C17.75 15.1094 16.265 15.1844 14.78 15.3344L13.25 15.4844",
|
|
2632
|
+
stroke: "#FF4D4F",
|
|
2633
|
+
strokeWidth: "1.5",
|
|
2634
|
+
strokeLinecap: "round",
|
|
2635
|
+
strokeLinejoin: "round"
|
|
2636
|
+
}),
|
|
2637
|
+
/* @__PURE__ */ jsx("path", {
|
|
2638
|
+
d: "M17.375 14.7275L17.54 13.745C17.66 13.0325 17.75 12.5 19.0175 12.5H20.9825C22.25 12.5 22.3475 13.0625 22.46 13.7525L22.625 14.7275",
|
|
2639
|
+
stroke: "#FF4D4F",
|
|
2640
|
+
strokeWidth: "1.5",
|
|
2641
|
+
strokeLinecap: "round",
|
|
2642
|
+
strokeLinejoin: "round"
|
|
2643
|
+
}),
|
|
2644
|
+
/* @__PURE__ */ jsx("path", {
|
|
2645
|
+
d: "M25.1373 17.8555L24.6498 25.408C24.5673 26.5855 24.4998 27.5005 22.4073 27.5005H17.5923C15.4998 27.5005 15.4323 26.5855 15.3498 25.408L14.8623 17.8555",
|
|
2646
|
+
stroke: "#FF4D4F",
|
|
2647
|
+
strokeWidth: "1.5",
|
|
2648
|
+
strokeLinecap: "round",
|
|
2649
|
+
strokeLinejoin: "round"
|
|
2650
|
+
}),
|
|
2651
|
+
/* @__PURE__ */ jsx("path", {
|
|
2652
|
+
d: "M18.7476 23.375H21.2451",
|
|
2653
|
+
stroke: "#FF4D4F",
|
|
2654
|
+
strokeWidth: "1.5",
|
|
2655
|
+
strokeLinecap: "round",
|
|
2656
|
+
strokeLinejoin: "round"
|
|
2657
|
+
}),
|
|
2658
|
+
/* @__PURE__ */ jsx("path", {
|
|
2659
|
+
d: "M18.125 20.375H21.875",
|
|
2660
|
+
stroke: "#FF4D4F",
|
|
2661
|
+
strokeWidth: "1.5",
|
|
2662
|
+
strokeLinecap: "round",
|
|
2663
|
+
strokeLinejoin: "round"
|
|
2664
|
+
})
|
|
2665
|
+
]
|
|
2666
|
+
});
|
|
2620
2667
|
//#endregion
|
|
2621
|
-
//#region src/assets/info-circle.
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2668
|
+
//#region src/assets/info-circle.tsx
|
|
2669
|
+
const InfoCircle = (props) => /* @__PURE__ */ jsxs("svg", {
|
|
2670
|
+
width: "24",
|
|
2671
|
+
height: "24",
|
|
2672
|
+
viewBox: "0 0 24 24",
|
|
2673
|
+
fill: "none",
|
|
2674
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2675
|
+
...props,
|
|
2676
|
+
children: [
|
|
2677
|
+
/* @__PURE__ */ jsx("path", {
|
|
2678
|
+
d: "M12 22C17.5 22 22 17.5 22 12C22 6.5 17.5 2 12 2C6.5 2 2 6.5 2 12C2 17.5 6.5 22 12 22Z",
|
|
2679
|
+
stroke: "black",
|
|
2680
|
+
strokeOpacity: "0.45",
|
|
2681
|
+
strokeWidth: "1.5",
|
|
2682
|
+
strokeLinecap: "round",
|
|
2683
|
+
strokeLinejoin: "round"
|
|
2684
|
+
}),
|
|
2685
|
+
/* @__PURE__ */ jsx("path", {
|
|
2686
|
+
d: "M12 8V13",
|
|
2687
|
+
stroke: "black",
|
|
2688
|
+
strokeOpacity: "0.45",
|
|
2689
|
+
strokeWidth: "1.5",
|
|
2690
|
+
strokeLinecap: "round",
|
|
2691
|
+
strokeLinejoin: "round"
|
|
2692
|
+
}),
|
|
2693
|
+
/* @__PURE__ */ jsx("path", {
|
|
2694
|
+
d: "M11.9946 16H12.0036",
|
|
2695
|
+
stroke: "black",
|
|
2696
|
+
strokeOpacity: "0.45",
|
|
2697
|
+
strokeWidth: "1.5",
|
|
2698
|
+
strokeLinecap: "round",
|
|
2699
|
+
strokeLinejoin: "round"
|
|
2700
|
+
})
|
|
2701
|
+
]
|
|
2702
|
+
});
|
|
2649
2703
|
//#endregion
|
|
2650
2704
|
//#region src/hooks/useDebounce.ts
|
|
2651
2705
|
function useDebounce(value, delay = 500) {
|
|
@@ -2660,7 +2714,6 @@ function useDebounce(value, delay = 500) {
|
|
|
2660
2714
|
}, [value, delay]);
|
|
2661
2715
|
return debouncedValue;
|
|
2662
2716
|
}
|
|
2663
|
-
|
|
2664
2717
|
//#endregion
|
|
2665
2718
|
//#region src/view/components/ApiPage/components/AddParameterDrawer.tsx
|
|
2666
2719
|
const PARAM_IN_OPTIONS = [
|
|
@@ -2734,11 +2787,11 @@ const AddParameterDrawer = ({ open, onClose, onAdd, onEdit, mode = "add", initia
|
|
|
2734
2787
|
setHasChanges(false);
|
|
2735
2788
|
}
|
|
2736
2789
|
}, [open]);
|
|
2737
|
-
const { wrapSSR, cx, token
|
|
2790
|
+
const { wrapSSR, cx, token } = useStyle("AddParameterDrawer", (token, scope) => ({
|
|
2738
2791
|
[scope("title")]: {
|
|
2739
2792
|
fontSize: 16,
|
|
2740
2793
|
fontWeight: 600,
|
|
2741
|
-
color: token
|
|
2794
|
+
color: token.colorTextBase,
|
|
2742
2795
|
lineHeight: "24px",
|
|
2743
2796
|
fontFamily: "Cairo SemiBold, Cairo, sans-serif"
|
|
2744
2797
|
},
|
|
@@ -2749,21 +2802,21 @@ const AddParameterDrawer = ({ open, onClose, onAdd, onEdit, mode = "add", initia
|
|
|
2749
2802
|
"& .ant-form-item": { marginBottom: 0 }
|
|
2750
2803
|
},
|
|
2751
2804
|
[scope("label")]: {
|
|
2752
|
-
fontSize: token
|
|
2753
|
-
color: token
|
|
2805
|
+
fontSize: token.fontSize,
|
|
2806
|
+
color: token.colorText
|
|
2754
2807
|
},
|
|
2755
2808
|
[scope("asterisk")]: {
|
|
2756
|
-
color: token
|
|
2809
|
+
color: token.colorError,
|
|
2757
2810
|
marginLeft: 2
|
|
2758
2811
|
},
|
|
2759
2812
|
[scope("label-optional")]: {
|
|
2760
|
-
color: token
|
|
2813
|
+
color: token.colorTextTertiary,
|
|
2761
2814
|
marginLeft: 4,
|
|
2762
|
-
fontSize: token
|
|
2815
|
+
fontSize: token.fontSize
|
|
2763
2816
|
},
|
|
2764
2817
|
[scope("label-secondary")]: {
|
|
2765
|
-
fontSize: token
|
|
2766
|
-
color: token
|
|
2818
|
+
fontSize: token.fontSize,
|
|
2819
|
+
color: token.colorTextSecondary
|
|
2767
2820
|
},
|
|
2768
2821
|
[scope("switch-row")]: {
|
|
2769
2822
|
display: "flex",
|
|
@@ -2771,8 +2824,8 @@ const AddParameterDrawer = ({ open, onClose, onAdd, onEdit, mode = "add", initia
|
|
|
2771
2824
|
gap: 8
|
|
2772
2825
|
},
|
|
2773
2826
|
[scope("switch-label")]: {
|
|
2774
|
-
fontSize: token
|
|
2775
|
-
color: token
|
|
2827
|
+
fontSize: token.fontSize,
|
|
2828
|
+
color: token.colorText
|
|
2776
2829
|
},
|
|
2777
2830
|
[scope("enum-input-row")]: {
|
|
2778
2831
|
display: "flex",
|
|
@@ -2787,27 +2840,27 @@ const AddParameterDrawer = ({ open, onClose, onAdd, onEdit, mode = "add", initia
|
|
|
2787
2840
|
width: 32,
|
|
2788
2841
|
height: 32,
|
|
2789
2842
|
flexShrink: 0,
|
|
2790
|
-
borderColor: token
|
|
2791
|
-
color: token
|
|
2843
|
+
borderColor: token.colorPrimary,
|
|
2844
|
+
color: token.colorPrimary,
|
|
2792
2845
|
padding: 0,
|
|
2793
2846
|
display: "flex",
|
|
2794
2847
|
alignItems: "center",
|
|
2795
2848
|
justifyContent: "center",
|
|
2796
2849
|
"&:hover": {
|
|
2797
|
-
borderColor: `${token
|
|
2798
|
-
color: `${token
|
|
2850
|
+
borderColor: `${token.colorPrimary} !important`,
|
|
2851
|
+
color: `${token.colorPrimary} !important`
|
|
2799
2852
|
}
|
|
2800
2853
|
},
|
|
2801
2854
|
[scope("enum-list")]: {
|
|
2802
2855
|
display: "flex",
|
|
2803
2856
|
flexDirection: "column",
|
|
2804
|
-
gap: token
|
|
2805
|
-
marginTop: token
|
|
2857
|
+
gap: token.marginXS,
|
|
2858
|
+
marginTop: token.marginXS
|
|
2806
2859
|
},
|
|
2807
2860
|
[scope("enum-value-row")]: {
|
|
2808
2861
|
display: "flex",
|
|
2809
2862
|
alignItems: "center",
|
|
2810
|
-
gap: token
|
|
2863
|
+
gap: token.marginXS
|
|
2811
2864
|
},
|
|
2812
2865
|
[scope("enum-value-input-wrap")]: {
|
|
2813
2866
|
flex: 1,
|
|
@@ -2816,10 +2869,10 @@ const AddParameterDrawer = ({ open, onClose, onAdd, onEdit, mode = "add", initia
|
|
|
2816
2869
|
[scope("enum-value-input")]: {
|
|
2817
2870
|
height: 32,
|
|
2818
2871
|
fontSize: 14,
|
|
2819
|
-
color: token
|
|
2820
|
-
background: token
|
|
2821
|
-
border: `1px solid ${token
|
|
2822
|
-
borderRadius: token
|
|
2872
|
+
color: token.colorText,
|
|
2873
|
+
background: token.colorBgBase,
|
|
2874
|
+
border: `1px solid ${token.colorBorder}`,
|
|
2875
|
+
borderRadius: token.borderRadius,
|
|
2823
2876
|
cursor: "default",
|
|
2824
2877
|
width: "100%"
|
|
2825
2878
|
},
|
|
@@ -2831,7 +2884,7 @@ const AddParameterDrawer = ({ open, onClose, onAdd, onEdit, mode = "add", initia
|
|
|
2831
2884
|
display: "flex",
|
|
2832
2885
|
alignItems: "center",
|
|
2833
2886
|
justifyContent: "center",
|
|
2834
|
-
borderRadius: token
|
|
2887
|
+
borderRadius: token.borderRadius
|
|
2835
2888
|
},
|
|
2836
2889
|
[scope("footer")]: {
|
|
2837
2890
|
display: "flex",
|
|
@@ -2868,7 +2921,7 @@ const AddParameterDrawer = ({ open, onClose, onAdd, onEdit, mode = "add", initia
|
|
|
2868
2921
|
fontSize: 16,
|
|
2869
2922
|
fontWeight: 400,
|
|
2870
2923
|
lineHeight: "24px",
|
|
2871
|
-
color: token
|
|
2924
|
+
color: token.colorText
|
|
2872
2925
|
},
|
|
2873
2926
|
[scope("modalCloseBtn")]: {
|
|
2874
2927
|
position: "absolute",
|
|
@@ -2884,12 +2937,12 @@ const AddParameterDrawer = ({ open, onClose, onAdd, onEdit, mode = "add", initia
|
|
|
2884
2937
|
border: "none",
|
|
2885
2938
|
background: "transparent",
|
|
2886
2939
|
padding: 0,
|
|
2887
|
-
color: token
|
|
2940
|
+
color: token.colorTextTertiary,
|
|
2888
2941
|
fontSize: 16,
|
|
2889
2942
|
lineHeight: 1,
|
|
2890
2943
|
"&:hover": {
|
|
2891
|
-
color: token
|
|
2892
|
-
backgroundColor: token
|
|
2944
|
+
color: token.colorText,
|
|
2945
|
+
backgroundColor: token.colorFillSecondary
|
|
2893
2946
|
}
|
|
2894
2947
|
},
|
|
2895
2948
|
[scope("modalContent")]: {
|
|
@@ -2906,7 +2959,7 @@ const AddParameterDrawer = ({ open, onClose, onAdd, onEdit, mode = "add", initia
|
|
|
2906
2959
|
fontSize: 14,
|
|
2907
2960
|
fontWeight: 400,
|
|
2908
2961
|
lineHeight: "22px",
|
|
2909
|
-
color: token
|
|
2962
|
+
color: token.colorText
|
|
2910
2963
|
},
|
|
2911
2964
|
[scope("modalFooter")]: {
|
|
2912
2965
|
display: "flex",
|
|
@@ -2991,14 +3044,14 @@ const AddParameterDrawer = ({ open, onClose, onAdd, onEdit, mode = "add", initia
|
|
|
2991
3044
|
styles: {
|
|
2992
3045
|
header: {
|
|
2993
3046
|
padding: "16px 24px",
|
|
2994
|
-
borderBottom: `1px solid ${token
|
|
2995
|
-
background: token
|
|
3047
|
+
borderBottom: `1px solid ${token.colorFillSecondary}`,
|
|
3048
|
+
background: token.colorBgBase
|
|
2996
3049
|
},
|
|
2997
3050
|
body: { padding: "24px" },
|
|
2998
3051
|
footer: {
|
|
2999
3052
|
padding: "24px",
|
|
3000
|
-
background: token
|
|
3001
|
-
borderTop: `1px solid ${token
|
|
3053
|
+
background: token.colorPrimaryBg,
|
|
3054
|
+
borderTop: `1px solid ${token.colorFillSecondary}`
|
|
3002
3055
|
}
|
|
3003
3056
|
},
|
|
3004
3057
|
footer: /* @__PURE__ */ jsxs("div", {
|
|
@@ -3102,7 +3155,7 @@ const AddParameterDrawer = ({ open, onClose, onAdd, onEdit, mode = "add", initia
|
|
|
3102
3155
|
children: [/* @__PURE__ */ jsx(Switch, {
|
|
3103
3156
|
checked: requiredValue ?? true,
|
|
3104
3157
|
onChange: (checked) => form.setFieldValue("required", checked),
|
|
3105
|
-
style: { backgroundColor: requiredValue ?? true ? token
|
|
3158
|
+
style: { backgroundColor: requiredValue ?? true ? token.colorPrimary : void 0 }
|
|
3106
3159
|
}), /* @__PURE__ */ jsx("span", {
|
|
3107
3160
|
className: cx("switch-label"),
|
|
3108
3161
|
children: "Required?"
|
|
@@ -3170,7 +3223,7 @@ const AddParameterDrawer = ({ open, onClose, onAdd, onEdit, mode = "add", initia
|
|
|
3170
3223
|
}), /* @__PURE__ */ jsx(Button, {
|
|
3171
3224
|
danger: true,
|
|
3172
3225
|
type: "text",
|
|
3173
|
-
icon: /* @__PURE__ */ jsx(
|
|
3226
|
+
icon: /* @__PURE__ */ jsx(Trash, {
|
|
3174
3227
|
width: 32,
|
|
3175
3228
|
height: 32
|
|
3176
3229
|
}),
|
|
@@ -3243,9 +3296,9 @@ const AddParameterDrawer = ({ open, onClose, onAdd, onEdit, mode = "add", initia
|
|
|
3243
3296
|
borderRadius: 8,
|
|
3244
3297
|
height: 32,
|
|
3245
3298
|
paddingInline: 16,
|
|
3246
|
-
backgroundColor: token
|
|
3247
|
-
borderColor: token
|
|
3248
|
-
boxShadow: `0px 2px 0px ${token
|
|
3299
|
+
backgroundColor: token.colorPrimary,
|
|
3300
|
+
borderColor: token.colorPrimary,
|
|
3301
|
+
boxShadow: `0px 2px 0px ${token.colorPrimaryBg}`
|
|
3249
3302
|
},
|
|
3250
3303
|
children: mode === "edit" ? "Yes, Edit" : "Yes, Add"
|
|
3251
3304
|
})]
|
|
@@ -3254,20 +3307,19 @@ const AddParameterDrawer = ({ open, onClose, onAdd, onEdit, mode = "add", initia
|
|
|
3254
3307
|
})
|
|
3255
3308
|
] }));
|
|
3256
3309
|
};
|
|
3257
|
-
|
|
3258
3310
|
//#endregion
|
|
3259
3311
|
//#region src/view/components/ApiPage/components/EndpointsSection.tsx
|
|
3260
3312
|
const { useBreakpoint: useBreakpoint$1 } = Grid;
|
|
3261
3313
|
const PAGE_SIZE = 5;
|
|
3262
|
-
const getStatusCodeColor = (code, token
|
|
3314
|
+
const getStatusCodeColor = (code, token) => {
|
|
3263
3315
|
const n = parseInt(code, 10);
|
|
3264
3316
|
if (n >= 400 && n < 500) return {
|
|
3265
|
-
dot: token
|
|
3266
|
-
text: token
|
|
3317
|
+
dot: token.colorError,
|
|
3318
|
+
text: token.colorError
|
|
3267
3319
|
};
|
|
3268
3320
|
return {
|
|
3269
|
-
dot: token
|
|
3270
|
-
text: token
|
|
3321
|
+
dot: token.colorSuccess,
|
|
3322
|
+
text: token.colorText
|
|
3271
3323
|
};
|
|
3272
3324
|
};
|
|
3273
3325
|
const buildViewParamRows = (params) => params.map((p, idx) => ({
|
|
@@ -3322,11 +3374,11 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3322
3374
|
return next;
|
|
3323
3375
|
});
|
|
3324
3376
|
};
|
|
3325
|
-
const { wrapSSR, cx, token
|
|
3377
|
+
const { wrapSSR, cx, token } = useStyle("EndpointsSection", (token, scope) => ({
|
|
3326
3378
|
[scope("root")]: {
|
|
3327
3379
|
display: "flex",
|
|
3328
3380
|
flexDirection: "column",
|
|
3329
|
-
borderRadius: token
|
|
3381
|
+
borderRadius: token.borderRadius,
|
|
3330
3382
|
overflow: "hidden",
|
|
3331
3383
|
width: "100%",
|
|
3332
3384
|
flexShrink: 0
|
|
@@ -3335,28 +3387,28 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3335
3387
|
display: "flex",
|
|
3336
3388
|
alignItems: "center",
|
|
3337
3389
|
justifyContent: "space-between",
|
|
3338
|
-
padding: `${token
|
|
3339
|
-
background: token
|
|
3340
|
-
borderRadius: `${token
|
|
3390
|
+
padding: `${token.paddingXS}px ${token.paddingLG}px`,
|
|
3391
|
+
background: token.colorPrimaryBg,
|
|
3392
|
+
borderRadius: `${token.borderRadius}px ${token.borderRadius}px 0 0`
|
|
3341
3393
|
},
|
|
3342
3394
|
[scope("body")]: {
|
|
3343
3395
|
display: "flex",
|
|
3344
3396
|
flexDirection: "column",
|
|
3345
|
-
gap: token
|
|
3346
|
-
padding: token
|
|
3347
|
-
background: token
|
|
3348
|
-
borderRadius: `0 0 ${token
|
|
3397
|
+
gap: token.margin,
|
|
3398
|
+
padding: token.paddingLG,
|
|
3399
|
+
background: token.colorBgElevated,
|
|
3400
|
+
borderRadius: `0 0 ${token.borderRadius}px ${token.borderRadius}px`
|
|
3349
3401
|
},
|
|
3350
3402
|
[scope("tag-title")]: {
|
|
3351
|
-
fontSize: token
|
|
3403
|
+
fontSize: token.fontSize,
|
|
3352
3404
|
fontWeight: 600,
|
|
3353
|
-
color: token
|
|
3354
|
-
marginBottom: token
|
|
3405
|
+
color: token.colorTextSecondary,
|
|
3406
|
+
marginBottom: token.marginXS
|
|
3355
3407
|
},
|
|
3356
3408
|
[scope("endpoint-row")]: {
|
|
3357
3409
|
display: "flex",
|
|
3358
3410
|
alignItems: "center",
|
|
3359
|
-
gap: token
|
|
3411
|
+
gap: token.marginSM,
|
|
3360
3412
|
width: "100%"
|
|
3361
3413
|
},
|
|
3362
3414
|
[scope("endpoint-card")]: {
|
|
@@ -3364,44 +3416,48 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3364
3416
|
flex: "1 0 0",
|
|
3365
3417
|
alignItems: "center",
|
|
3366
3418
|
gap: 14,
|
|
3367
|
-
padding: `${token
|
|
3368
|
-
background: token
|
|
3369
|
-
borderRadius: token
|
|
3370
|
-
cursor: "pointer"
|
|
3419
|
+
padding: `${token.paddingXS}px ${token.padding}px`,
|
|
3420
|
+
background: token.colorFillSecondary,
|
|
3421
|
+
borderRadius: token.borderRadius,
|
|
3422
|
+
cursor: "pointer",
|
|
3423
|
+
overflow: "hidden"
|
|
3371
3424
|
},
|
|
3372
3425
|
[scope("endpoint-card-active")]: {
|
|
3373
3426
|
background: "transparent",
|
|
3374
|
-
border: `1px solid ${token
|
|
3427
|
+
border: `1px solid ${token.colorPrimaryBorder}`
|
|
3375
3428
|
},
|
|
3376
3429
|
[scope("method-badge")]: {
|
|
3377
3430
|
display: "flex",
|
|
3378
3431
|
alignItems: "center",
|
|
3379
3432
|
justifyContent: "center",
|
|
3380
3433
|
width: 64,
|
|
3381
|
-
padding: `0 ${token
|
|
3382
|
-
borderRadius: token
|
|
3434
|
+
padding: `0 ${token.paddingXS}px`,
|
|
3435
|
+
borderRadius: token.borderRadius,
|
|
3383
3436
|
border: "1px solid",
|
|
3384
|
-
fontSize: token
|
|
3437
|
+
fontSize: token.fontSize,
|
|
3385
3438
|
fontWeight: 400,
|
|
3386
3439
|
lineHeight: "22px",
|
|
3387
3440
|
whiteSpace: "nowrap",
|
|
3388
3441
|
alignSelf: "stretch"
|
|
3389
3442
|
},
|
|
3390
3443
|
[scope("endpoint-path")]: {
|
|
3391
|
-
fontSize: token
|
|
3444
|
+
fontSize: token.fontSizeLG,
|
|
3392
3445
|
fontWeight: 600,
|
|
3393
|
-
color: token
|
|
3394
|
-
lineHeight: "24px"
|
|
3446
|
+
color: token.colorTextHeading,
|
|
3447
|
+
lineHeight: "24px",
|
|
3448
|
+
overflow: "hidden",
|
|
3449
|
+
textOverflow: "ellipsis",
|
|
3450
|
+
whiteSpace: "nowrap"
|
|
3395
3451
|
},
|
|
3396
3452
|
[scope("endpoint-form")]: {
|
|
3397
3453
|
display: "flex",
|
|
3398
3454
|
flexDirection: "column",
|
|
3399
|
-
gap: token
|
|
3400
|
-
padding: token
|
|
3401
|
-
borderLeft: `3px solid ${token
|
|
3402
|
-
borderRight: `3px solid ${token
|
|
3403
|
-
borderBottom: `3px solid ${token
|
|
3404
|
-
borderRadius: `0 0 ${token
|
|
3455
|
+
gap: token.paddingLG,
|
|
3456
|
+
padding: token.paddingLG,
|
|
3457
|
+
borderLeft: `3px solid ${token.colorPrimaryBorder}`,
|
|
3458
|
+
borderRight: `3px solid ${token.colorPrimaryBorder}`,
|
|
3459
|
+
borderBottom: `3px solid ${token.colorPrimaryBorder}`,
|
|
3460
|
+
borderRadius: `0 0 ${token.borderRadius}px ${token.borderRadius}px`
|
|
3405
3461
|
},
|
|
3406
3462
|
[scope("form-row")]: {
|
|
3407
3463
|
display: "flex",
|
|
@@ -3417,41 +3473,41 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3417
3473
|
[scope("field-label")]: {
|
|
3418
3474
|
display: "flex",
|
|
3419
3475
|
alignItems: "center",
|
|
3420
|
-
gap: token
|
|
3421
|
-
fontSize: token
|
|
3476
|
+
gap: token.marginXXS,
|
|
3477
|
+
fontSize: token.fontSize,
|
|
3422
3478
|
fontWeight: 400,
|
|
3423
|
-
color: token
|
|
3424
|
-
paddingBottom: token
|
|
3479
|
+
color: token.colorText,
|
|
3480
|
+
paddingBottom: token.paddingXS,
|
|
3425
3481
|
lineHeight: "22px"
|
|
3426
3482
|
},
|
|
3427
|
-
[scope("label-required")]: { color: token
|
|
3428
|
-
[scope("label-optional")]: { color: token
|
|
3483
|
+
[scope("label-required")]: { color: token.colorError },
|
|
3484
|
+
[scope("label-optional")]: { color: token.colorTextDescription },
|
|
3429
3485
|
[scope("section-header")]: {
|
|
3430
3486
|
display: "flex",
|
|
3431
3487
|
alignItems: "center",
|
|
3432
3488
|
justifyContent: "space-between",
|
|
3433
|
-
paddingBottom: token
|
|
3434
|
-
borderBottom: `1px solid ${token
|
|
3489
|
+
paddingBottom: token.marginXXS,
|
|
3490
|
+
borderBottom: `1px solid ${token.colorBorder}`,
|
|
3435
3491
|
width: "100%"
|
|
3436
3492
|
},
|
|
3437
3493
|
[scope("section-title")]: {
|
|
3438
|
-
fontSize: token
|
|
3494
|
+
fontSize: token.fontSizeLG,
|
|
3439
3495
|
fontWeight: 600,
|
|
3440
|
-
color: token
|
|
3496
|
+
color: token.colorPrimary,
|
|
3441
3497
|
lineHeight: "24px"
|
|
3442
3498
|
},
|
|
3443
3499
|
[scope("param-row")]: {
|
|
3444
3500
|
display: "flex",
|
|
3445
3501
|
alignItems: "center",
|
|
3446
|
-
gap: token
|
|
3447
|
-
padding: `${token
|
|
3448
|
-
border: `1px solid ${token
|
|
3449
|
-
borderRadius: token
|
|
3450
|
-
background: token
|
|
3502
|
+
gap: token.marginXS,
|
|
3503
|
+
padding: `${token.marginXXS}px ${token.marginSM}px`,
|
|
3504
|
+
border: `1px solid ${token.colorBorder}`,
|
|
3505
|
+
borderRadius: token.borderRadius,
|
|
3506
|
+
background: token.colorBgContainer,
|
|
3451
3507
|
width: "100%",
|
|
3452
3508
|
cursor: "pointer",
|
|
3453
3509
|
userSelect: "none",
|
|
3454
|
-
"&:hover": { background: token
|
|
3510
|
+
"&:hover": { background: token.colorFillTertiary }
|
|
3455
3511
|
},
|
|
3456
3512
|
[scope("param-row-icon")]: {
|
|
3457
3513
|
fontSize: 12,
|
|
@@ -3468,7 +3524,7 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3468
3524
|
fontFamily: "Cairo, sans-serif",
|
|
3469
3525
|
fontSize: 14,
|
|
3470
3526
|
lineHeight: "20px",
|
|
3471
|
-
color: token
|
|
3527
|
+
color: token.colorTextLightSolid,
|
|
3472
3528
|
width: "100%",
|
|
3473
3529
|
whiteSpace: "pre",
|
|
3474
3530
|
overflowX: "auto",
|
|
@@ -3484,7 +3540,7 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3484
3540
|
},
|
|
3485
3541
|
[scope("code-btn")]: {
|
|
3486
3542
|
borderColor: "#fff",
|
|
3487
|
-
color: token
|
|
3543
|
+
color: token.colorTextLightSolid,
|
|
3488
3544
|
"&:hover": {
|
|
3489
3545
|
borderColor: "#fff !important",
|
|
3490
3546
|
color: "#fff !important",
|
|
@@ -3502,8 +3558,8 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3502
3558
|
justifyContent: "space-between",
|
|
3503
3559
|
width: "100%",
|
|
3504
3560
|
padding: `12px 24px`,
|
|
3505
|
-
borderBottom: `1px solid ${token
|
|
3506
|
-
background: token
|
|
3561
|
+
borderBottom: `1px solid ${token.colorBorderSecondary}`,
|
|
3562
|
+
background: token.colorBgContainer,
|
|
3507
3563
|
"&:last-child": { borderBottom: "none" }
|
|
3508
3564
|
},
|
|
3509
3565
|
[scope("param-details")]: {
|
|
@@ -3521,12 +3577,12 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3521
3577
|
[scope("param-detail-label")]: {
|
|
3522
3578
|
fontFamily: "Cairo SemiBold, Cairo, sans-serif",
|
|
3523
3579
|
fontSize: 16,
|
|
3524
|
-
color: token
|
|
3580
|
+
color: token.colorTextSecondary
|
|
3525
3581
|
},
|
|
3526
3582
|
[scope("param-detail-value")]: {
|
|
3527
3583
|
fontFamily: "Cairo, sans-serif",
|
|
3528
3584
|
fontSize: 16,
|
|
3529
|
-
color: token
|
|
3585
|
+
color: token.colorText
|
|
3530
3586
|
},
|
|
3531
3587
|
[scope("param-detail-value--ellipsis")]: {
|
|
3532
3588
|
overflow: "hidden",
|
|
@@ -3545,13 +3601,13 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3545
3601
|
display: "inline-flex",
|
|
3546
3602
|
alignItems: "center",
|
|
3547
3603
|
verticalAlign: "middle",
|
|
3548
|
-
background: token
|
|
3549
|
-
border: `1px solid ${token
|
|
3604
|
+
background: token.colorBgContainer,
|
|
3605
|
+
border: `1px solid ${token.colorBorder}`,
|
|
3550
3606
|
borderRadius: 6,
|
|
3551
3607
|
padding: "1px 8px",
|
|
3552
3608
|
fontSize: 12,
|
|
3553
3609
|
lineHeight: "20px",
|
|
3554
|
-
color: token
|
|
3610
|
+
color: token.colorText,
|
|
3555
3611
|
fontFamily: "Cairo, sans-serif",
|
|
3556
3612
|
margin: 0
|
|
3557
3613
|
},
|
|
@@ -3563,10 +3619,10 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3563
3619
|
width: 20,
|
|
3564
3620
|
height: 20,
|
|
3565
3621
|
borderRadius: "50%",
|
|
3566
|
-
border: `1px solid ${token
|
|
3622
|
+
border: `1px solid ${token.colorBorder}`,
|
|
3567
3623
|
background: "white",
|
|
3568
3624
|
fontSize: 12,
|
|
3569
|
-
color: token
|
|
3625
|
+
color: token.colorText,
|
|
3570
3626
|
cursor: "default"
|
|
3571
3627
|
},
|
|
3572
3628
|
[scope("enum-tooltip-list")]: {
|
|
@@ -3574,7 +3630,7 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3574
3630
|
padding: "0 0 0 16px",
|
|
3575
3631
|
fontSize: 14,
|
|
3576
3632
|
lineHeight: "22px",
|
|
3577
|
-
color: token
|
|
3633
|
+
color: token.colorTextLightSolid,
|
|
3578
3634
|
fontFamily: "Cairo, sans-serif"
|
|
3579
3635
|
},
|
|
3580
3636
|
[scope("status-label")]: {
|
|
@@ -3625,7 +3681,7 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3625
3681
|
alignItems: "center",
|
|
3626
3682
|
gap: 8
|
|
3627
3683
|
},
|
|
3628
|
-
"& .ant-select-item-option-selected": { background: `${token
|
|
3684
|
+
"& .ant-select-item-option-selected": { background: `${token.colorPrimaryBg} !important` }
|
|
3629
3685
|
},
|
|
3630
3686
|
[scope("param-actions")]: {
|
|
3631
3687
|
display: "flex",
|
|
@@ -3638,11 +3694,11 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3638
3694
|
display: "flex",
|
|
3639
3695
|
alignItems: "center",
|
|
3640
3696
|
justifyContent: "center",
|
|
3641
|
-
borderColor: token
|
|
3642
|
-
color: token
|
|
3697
|
+
borderColor: token.colorPrimary,
|
|
3698
|
+
color: token.colorPrimary,
|
|
3643
3699
|
"&:hover": {
|
|
3644
|
-
borderColor: `${token
|
|
3645
|
-
color: `${token
|
|
3700
|
+
borderColor: `${token.colorPrimary} !important`,
|
|
3701
|
+
color: `${token.colorPrimary} !important`
|
|
3646
3702
|
}
|
|
3647
3703
|
},
|
|
3648
3704
|
[scope("param-delete-btn")]: {
|
|
@@ -3672,7 +3728,7 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3672
3728
|
fontSize: 16,
|
|
3673
3729
|
fontWeight: 400,
|
|
3674
3730
|
lineHeight: "24px",
|
|
3675
|
-
color: token
|
|
3731
|
+
color: token.colorText
|
|
3676
3732
|
},
|
|
3677
3733
|
[scope("deleteModalCloseBtn")]: {
|
|
3678
3734
|
position: "absolute",
|
|
@@ -3688,12 +3744,12 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3688
3744
|
border: "none",
|
|
3689
3745
|
background: "transparent",
|
|
3690
3746
|
padding: 0,
|
|
3691
|
-
color: token
|
|
3747
|
+
color: token.colorTextSecondary,
|
|
3692
3748
|
fontSize: 16,
|
|
3693
3749
|
lineHeight: 1,
|
|
3694
3750
|
"&:hover": {
|
|
3695
|
-
color: token
|
|
3696
|
-
backgroundColor: token
|
|
3751
|
+
color: token.colorText,
|
|
3752
|
+
backgroundColor: token.colorFillSecondary
|
|
3697
3753
|
}
|
|
3698
3754
|
},
|
|
3699
3755
|
[scope("deleteModalContent")]: {
|
|
@@ -3710,7 +3766,7 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3710
3766
|
fontSize: 14,
|
|
3711
3767
|
fontWeight: 400,
|
|
3712
3768
|
lineHeight: "22px",
|
|
3713
|
-
color: token
|
|
3769
|
+
color: token.colorText
|
|
3714
3770
|
},
|
|
3715
3771
|
[scope("deleteModalFooter")]: {
|
|
3716
3772
|
display: "flex",
|
|
@@ -3728,33 +3784,33 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3728
3784
|
flexDirection: "column",
|
|
3729
3785
|
gap: 16,
|
|
3730
3786
|
width: "100%",
|
|
3731
|
-
borderLeft: `3px solid ${token
|
|
3732
|
-
borderRight: `3px solid ${token
|
|
3733
|
-
borderBottom: `3px solid ${token
|
|
3734
|
-
borderRadius: `0 0 ${token
|
|
3735
|
-
padding: token
|
|
3787
|
+
borderLeft: `3px solid ${token.colorPrimaryBorder}`,
|
|
3788
|
+
borderRight: `3px solid ${token.colorPrimaryBorder}`,
|
|
3789
|
+
borderBottom: `3px solid ${token.colorPrimaryBorder}`,
|
|
3790
|
+
borderRadius: `0 0 ${token.borderRadius}px ${token.borderRadius}px`,
|
|
3791
|
+
padding: token.paddingLG
|
|
3736
3792
|
},
|
|
3737
3793
|
[scope("view-params-card")]: {
|
|
3738
|
-
border: `1px solid ${token
|
|
3739
|
-
borderRadius: token
|
|
3794
|
+
border: `1px solid ${token.colorBorder}`,
|
|
3795
|
+
borderRadius: token.borderRadius,
|
|
3740
3796
|
display: "flex",
|
|
3741
3797
|
flexDirection: "column",
|
|
3742
|
-
gap: token
|
|
3798
|
+
gap: token.marginSM,
|
|
3743
3799
|
paddingTop: 12,
|
|
3744
3800
|
width: "100%",
|
|
3745
3801
|
overflow: "hidden",
|
|
3746
3802
|
"& .ant-table-thead > tr > th": {
|
|
3747
|
-
background: token
|
|
3803
|
+
background: token.colorFillSecondary,
|
|
3748
3804
|
fontWeight: 700,
|
|
3749
3805
|
fontSize: 14,
|
|
3750
|
-
padding: `${token
|
|
3751
|
-
paddingInline: `${token
|
|
3752
|
-
borderColor: `${token
|
|
3806
|
+
padding: `${token.paddingXS}px`,
|
|
3807
|
+
paddingInline: `${token.paddingXS}px`,
|
|
3808
|
+
borderColor: `${token.colorSplit} !important`
|
|
3753
3809
|
},
|
|
3754
3810
|
"& .ant-table-tbody > tr > td": {
|
|
3755
|
-
padding: `${token
|
|
3756
|
-
paddingInline: `${token
|
|
3757
|
-
borderColor: `${token
|
|
3811
|
+
padding: `${token.paddingXS}px`,
|
|
3812
|
+
paddingInline: `${token.paddingXS}px`,
|
|
3813
|
+
borderColor: `${token.colorBorder} !important`,
|
|
3758
3814
|
height: 38
|
|
3759
3815
|
},
|
|
3760
3816
|
"& .ant-table-container": {
|
|
@@ -3773,30 +3829,30 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3773
3829
|
[scope("view-params-title")]: {
|
|
3774
3830
|
fontSize: 16,
|
|
3775
3831
|
fontWeight: 600,
|
|
3776
|
-
color: token
|
|
3832
|
+
color: token.colorText
|
|
3777
3833
|
},
|
|
3778
3834
|
[scope("view-status-select-sm")]: { width: 65 },
|
|
3779
3835
|
[scope("view-param-name")]: {
|
|
3780
3836
|
fontSize: 14,
|
|
3781
3837
|
fontWeight: 400,
|
|
3782
|
-
color: token
|
|
3838
|
+
color: token.colorText
|
|
3783
3839
|
},
|
|
3784
3840
|
[scope("view-param-type")]: {
|
|
3785
3841
|
fontFamily: "'Cascadia Code', sans-serif",
|
|
3786
3842
|
fontSize: 12,
|
|
3787
|
-
color: token
|
|
3843
|
+
color: token.colorTextSecondary,
|
|
3788
3844
|
marginLeft: 4,
|
|
3789
3845
|
marginRight: 4
|
|
3790
3846
|
},
|
|
3791
|
-
[scope("view-param-required")]: { color: token
|
|
3847
|
+
[scope("view-param-required")]: { color: token.colorError },
|
|
3792
3848
|
[scope("view-param-optional")]: {
|
|
3793
|
-
color: token
|
|
3849
|
+
color: token.colorSuccess,
|
|
3794
3850
|
fontSize: 12,
|
|
3795
3851
|
marginLeft: 4
|
|
3796
3852
|
},
|
|
3797
3853
|
[scope("view-param-desc")]: {
|
|
3798
3854
|
fontSize: 12,
|
|
3799
|
-
color: token
|
|
3855
|
+
color: token.colorText
|
|
3800
3856
|
},
|
|
3801
3857
|
[scope("view-enum-container")]: {
|
|
3802
3858
|
display: "inline-flex",
|
|
@@ -3805,21 +3861,21 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3805
3861
|
alignItems: "center"
|
|
3806
3862
|
},
|
|
3807
3863
|
[scope("view-enum-tag")]: {
|
|
3808
|
-
background: token
|
|
3809
|
-
border: `1px solid ${token
|
|
3864
|
+
background: token.colorFillSecondary,
|
|
3865
|
+
border: `1px solid ${token.colorBorder}`,
|
|
3810
3866
|
borderRadius: 4,
|
|
3811
3867
|
padding: "1px 8px",
|
|
3812
3868
|
fontSize: 12,
|
|
3813
3869
|
lineHeight: "20px",
|
|
3814
|
-
color: token
|
|
3870
|
+
color: token.colorText,
|
|
3815
3871
|
margin: 0,
|
|
3816
3872
|
cursor: "default"
|
|
3817
3873
|
},
|
|
3818
|
-
[scope("view-row-odd")]: { "& > td": { background: `${token
|
|
3819
|
-
[scope("view-row-even")]: { "& > td": { background: `${token
|
|
3874
|
+
[scope("view-row-odd")]: { "& > td": { background: `${token.colorBgLayout} !important` } },
|
|
3875
|
+
[scope("view-row-even")]: { "& > td": { background: `${token.colorBgContainer} !important` } },
|
|
3820
3876
|
[scope("empty-wrapper")]: {
|
|
3821
|
-
background: token
|
|
3822
|
-
borderRadius: token
|
|
3877
|
+
background: token.colorBgElevated,
|
|
3878
|
+
borderRadius: token.borderRadius,
|
|
3823
3879
|
paddingTop: 16,
|
|
3824
3880
|
paddingBottom: 16,
|
|
3825
3881
|
gap: 8,
|
|
@@ -3852,25 +3908,25 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3852
3908
|
[scope("empty-description")]: {
|
|
3853
3909
|
fontSize: 14,
|
|
3854
3910
|
lineHeight: "22px",
|
|
3855
|
-
color: token
|
|
3911
|
+
color: token.colorTextDescription,
|
|
3856
3912
|
textAlign: "center",
|
|
3857
3913
|
fontWeight: 400
|
|
3858
3914
|
},
|
|
3859
3915
|
[scope("pagination")]: {
|
|
3860
3916
|
display: "flex",
|
|
3861
3917
|
justifyContent: "center",
|
|
3862
|
-
marginTop: token
|
|
3918
|
+
marginTop: token.marginMD,
|
|
3863
3919
|
".ant-pagination-item-active": {
|
|
3864
|
-
backgroundColor: token
|
|
3865
|
-
borderColor: token
|
|
3866
|
-
borderRadius: token
|
|
3920
|
+
backgroundColor: token.colorBgContainer,
|
|
3921
|
+
borderColor: token.colorPrimary,
|
|
3922
|
+
borderRadius: token.borderRadius,
|
|
3867
3923
|
display: "flex",
|
|
3868
3924
|
alignItems: "center",
|
|
3869
3925
|
justifyContent: "center",
|
|
3870
3926
|
a: {
|
|
3871
|
-
color: token
|
|
3872
|
-
fontWeight: token
|
|
3873
|
-
fontSize: token
|
|
3927
|
+
color: token.colorPrimary,
|
|
3928
|
+
fontWeight: token.fontWeightStrong,
|
|
3929
|
+
fontSize: token.fontSize,
|
|
3874
3930
|
lineHeight: "22px",
|
|
3875
3931
|
display: "flex",
|
|
3876
3932
|
alignItems: "center",
|
|
@@ -3879,18 +3935,18 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3879
3935
|
}
|
|
3880
3936
|
},
|
|
3881
3937
|
".ant-pagination-item": {
|
|
3882
|
-
borderRadius: token
|
|
3938
|
+
borderRadius: token.borderRadius,
|
|
3883
3939
|
minWidth: 32,
|
|
3884
3940
|
height: 32,
|
|
3885
3941
|
lineHeight: "32px",
|
|
3886
3942
|
a: {
|
|
3887
|
-
color: token
|
|
3943
|
+
color: token.colorText,
|
|
3888
3944
|
fontWeight: 400,
|
|
3889
|
-
fontSize: token
|
|
3945
|
+
fontSize: token.fontSize
|
|
3890
3946
|
}
|
|
3891
3947
|
},
|
|
3892
3948
|
".ant-pagination-prev .ant-pagination-item-link, .ant-pagination-next .ant-pagination-item-link": {
|
|
3893
|
-
borderRadius: token
|
|
3949
|
+
borderRadius: token.borderRadius,
|
|
3894
3950
|
width: 32,
|
|
3895
3951
|
height: 32,
|
|
3896
3952
|
display: "flex",
|
|
@@ -3984,7 +4040,7 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
3984
4040
|
level: 4,
|
|
3985
4041
|
style: {
|
|
3986
4042
|
margin: 0,
|
|
3987
|
-
color: token
|
|
4043
|
+
color: token.colorTextHeading
|
|
3988
4044
|
},
|
|
3989
4045
|
children: "Endpoints"
|
|
3990
4046
|
}), /* @__PURE__ */ jsx(Button, {
|
|
@@ -4012,14 +4068,17 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
4012
4068
|
children: [/* @__PURE__ */ jsx("span", {
|
|
4013
4069
|
className: cx("method-badge"),
|
|
4014
4070
|
style: {
|
|
4015
|
-
color: methodColor?.color,
|
|
4071
|
+
color: isExpanded ? "#ffffff" : methodColor?.color,
|
|
4016
4072
|
borderColor: methodColor?.color,
|
|
4017
|
-
backgroundColor: methodColor?.
|
|
4073
|
+
backgroundColor: isExpanded ? methodColor?.color : "transparent"
|
|
4018
4074
|
},
|
|
4019
4075
|
children: ep.method
|
|
4020
|
-
}), /* @__PURE__ */ jsx(
|
|
4021
|
-
|
|
4022
|
-
children:
|
|
4076
|
+
}), /* @__PURE__ */ jsx(Tooltip, {
|
|
4077
|
+
title: ep.path,
|
|
4078
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
4079
|
+
className: cx("endpoint-path"),
|
|
4080
|
+
children: ep.path
|
|
4081
|
+
})
|
|
4023
4082
|
})]
|
|
4024
4083
|
}), /* @__PURE__ */ jsx(UpCircleOutlined, {
|
|
4025
4084
|
onClick: () => handleEndpointClick(ep),
|
|
@@ -4029,7 +4088,7 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
4029
4088
|
transform: isExpanded ? "rotate(0deg)" : "rotate(180deg)",
|
|
4030
4089
|
transition: "transform 0.2s",
|
|
4031
4090
|
flexShrink: 0,
|
|
4032
|
-
color: isExpanded ? token
|
|
4091
|
+
color: isExpanded ? token.colorPrimary : token.colorText
|
|
4033
4092
|
}
|
|
4034
4093
|
})]
|
|
4035
4094
|
}),
|
|
@@ -4156,7 +4215,7 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
4156
4215
|
style: {
|
|
4157
4216
|
display: "flex",
|
|
4158
4217
|
alignItems: "center",
|
|
4159
|
-
gap: token
|
|
4218
|
+
gap: token.marginMD
|
|
4160
4219
|
},
|
|
4161
4220
|
children: [/* @__PURE__ */ jsx("span", {
|
|
4162
4221
|
className: cx("section-title"),
|
|
@@ -4282,7 +4341,7 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
4282
4341
|
const pagedReqParams = allReqParams.slice((reqPage - 1) * PAGE_SIZE, reqPage * PAGE_SIZE);
|
|
4283
4342
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
4284
4343
|
className: cx("param-list"),
|
|
4285
|
-
style: { marginTop: token
|
|
4344
|
+
style: { marginTop: token.margin },
|
|
4286
4345
|
children: pagedReqParams.map((param, i) => {
|
|
4287
4346
|
const idx = (reqPage - 1) * PAGE_SIZE + i;
|
|
4288
4347
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -4322,16 +4381,16 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
4322
4381
|
style: {
|
|
4323
4382
|
display: "flex",
|
|
4324
4383
|
alignItems: "center",
|
|
4325
|
-
gap: token
|
|
4326
|
-
background: token
|
|
4327
|
-
borderRadius: token
|
|
4328
|
-
padding: `0 ${token
|
|
4384
|
+
gap: token.margin,
|
|
4385
|
+
background: token.colorFillTertiary,
|
|
4386
|
+
borderRadius: token.borderRadius,
|
|
4387
|
+
padding: `0 ${token.marginSM}px`,
|
|
4329
4388
|
height: 50,
|
|
4330
4389
|
flexShrink: 0
|
|
4331
4390
|
},
|
|
4332
4391
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
4333
4392
|
danger: true,
|
|
4334
|
-
icon: /* @__PURE__ */ jsx(
|
|
4393
|
+
icon: /* @__PURE__ */ jsx(Trash, {
|
|
4335
4394
|
width: 32,
|
|
4336
4395
|
height: 32
|
|
4337
4396
|
}),
|
|
@@ -4450,7 +4509,7 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
4450
4509
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
4451
4510
|
danger: true,
|
|
4452
4511
|
type: "text",
|
|
4453
|
-
icon: /* @__PURE__ */ jsx(
|
|
4512
|
+
icon: /* @__PURE__ */ jsx(Trash, {
|
|
4454
4513
|
height: 32,
|
|
4455
4514
|
width: 32
|
|
4456
4515
|
}),
|
|
@@ -4492,12 +4551,12 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
4492
4551
|
})(),
|
|
4493
4552
|
/* @__PURE__ */ jsxs("div", {
|
|
4494
4553
|
className: cx("param-row"),
|
|
4495
|
-
style: { marginTop: token
|
|
4554
|
+
style: { marginTop: token.margin },
|
|
4496
4555
|
onClick: () => toggleRequestPanel(ep.id),
|
|
4497
4556
|
children: [/* @__PURE__ */ jsx(DownOutlined, { className: cx("param-row-icon", openRequestPanels.has(ep.id) ? "param-row-icon--open" : "") }), /* @__PURE__ */ jsxs("span", {
|
|
4498
|
-
style: { fontSize: token
|
|
4557
|
+
style: { fontSize: token.fontSize },
|
|
4499
4558
|
children: ["Request ", /* @__PURE__ */ jsx("span", {
|
|
4500
|
-
style: { color: token
|
|
4559
|
+
style: { color: token.colorError },
|
|
4501
4560
|
children: "*"
|
|
4502
4561
|
})]
|
|
4503
4562
|
})]
|
|
@@ -4541,7 +4600,7 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
4541
4600
|
style: {
|
|
4542
4601
|
display: "flex",
|
|
4543
4602
|
alignItems: "center",
|
|
4544
|
-
gap: token
|
|
4603
|
+
gap: token.marginMD
|
|
4545
4604
|
},
|
|
4546
4605
|
children: [/* @__PURE__ */ jsx("span", {
|
|
4547
4606
|
className: cx("section-title"),
|
|
@@ -4721,7 +4780,7 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
4721
4780
|
const pagedResParams = allResParams.slice((resPage - 1) * PAGE_SIZE, resPage * PAGE_SIZE);
|
|
4722
4781
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
4723
4782
|
className: cx("param-list"),
|
|
4724
|
-
style: { marginTop: token
|
|
4783
|
+
style: { marginTop: token.margin },
|
|
4725
4784
|
children: pagedResParams.map((param, i) => {
|
|
4726
4785
|
const idx = (resPage - 1) * PAGE_SIZE + i;
|
|
4727
4786
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -4761,16 +4820,16 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
4761
4820
|
style: {
|
|
4762
4821
|
display: "flex",
|
|
4763
4822
|
alignItems: "center",
|
|
4764
|
-
gap: token
|
|
4765
|
-
background: token
|
|
4766
|
-
borderRadius: token
|
|
4767
|
-
padding: `0 ${token
|
|
4823
|
+
gap: token.margin,
|
|
4824
|
+
background: token.colorFillTertiary,
|
|
4825
|
+
borderRadius: token.borderRadius,
|
|
4826
|
+
padding: `0 ${token.marginSM}px`,
|
|
4768
4827
|
height: 50,
|
|
4769
4828
|
flexShrink: 0
|
|
4770
4829
|
},
|
|
4771
4830
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
4772
4831
|
danger: true,
|
|
4773
|
-
icon: /* @__PURE__ */ jsx(
|
|
4832
|
+
icon: /* @__PURE__ */ jsx(Trash, {
|
|
4774
4833
|
width: 32,
|
|
4775
4834
|
height: 32
|
|
4776
4835
|
}),
|
|
@@ -4900,7 +4959,7 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
4900
4959
|
}), /* @__PURE__ */ jsx(Button, {
|
|
4901
4960
|
danger: true,
|
|
4902
4961
|
type: "text",
|
|
4903
|
-
icon: /* @__PURE__ */ jsx(
|
|
4962
|
+
icon: /* @__PURE__ */ jsx(Trash, {
|
|
4904
4963
|
height: 18,
|
|
4905
4964
|
width: 18
|
|
4906
4965
|
}),
|
|
@@ -4931,18 +4990,18 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
4931
4990
|
})(),
|
|
4932
4991
|
/* @__PURE__ */ jsxs("div", {
|
|
4933
4992
|
className: cx("param-row"),
|
|
4934
|
-
style: { marginTop: token
|
|
4993
|
+
style: { marginTop: token.margin },
|
|
4935
4994
|
onClick: () => toggleResponsePanel(ep.id),
|
|
4936
4995
|
children: [
|
|
4937
4996
|
/* @__PURE__ */ jsx(DownOutlined, { className: cx("param-row-icon", openResponsePanels.has(ep.id) ? "param-row-icon--open" : "") }),
|
|
4938
4997
|
/* @__PURE__ */ jsxs("span", {
|
|
4939
|
-
style: { fontSize: token
|
|
4998
|
+
style: { fontSize: token.fontSize },
|
|
4940
4999
|
children: ["Response ", /* @__PURE__ */ jsx("span", {
|
|
4941
|
-
style: { color: token
|
|
5000
|
+
style: { color: token.colorError },
|
|
4942
5001
|
children: "*"
|
|
4943
5002
|
})]
|
|
4944
5003
|
}),
|
|
4945
|
-
/* @__PURE__ */ jsx(
|
|
5004
|
+
/* @__PURE__ */ jsx(InfoCircle, { style: {
|
|
4946
5005
|
width: 24,
|
|
4947
5006
|
height: 24
|
|
4948
5007
|
} })
|
|
@@ -5124,11 +5183,10 @@ const EndpointsSection = ({ endpointsByTag, collapsed = false, onToggleCollapse,
|
|
|
5124
5183
|
]
|
|
5125
5184
|
}));
|
|
5126
5185
|
};
|
|
5127
|
-
|
|
5128
5186
|
//#endregion
|
|
5129
5187
|
//#region src/view/components/ApiPage/components/UnsavedChangesBanner.tsx
|
|
5130
5188
|
const UnsavedChangesBanner = ({ onClose }) => {
|
|
5131
|
-
const { wrapSSR, cx
|
|
5189
|
+
const { wrapSSR, cx } = useStyle("UnsavedChangesBanner", (token, scope) => ({
|
|
5132
5190
|
[scope("root")]: {
|
|
5133
5191
|
position: "sticky",
|
|
5134
5192
|
top: 0,
|
|
@@ -5138,7 +5196,7 @@ const UnsavedChangesBanner = ({ onClose }) => {
|
|
|
5138
5196
|
},
|
|
5139
5197
|
[scope("alert")]: {
|
|
5140
5198
|
padding: "8px 12px",
|
|
5141
|
-
fontSize: token
|
|
5199
|
+
fontSize: token.fontSize,
|
|
5142
5200
|
fontWeight: 400,
|
|
5143
5201
|
borderRadius: 0
|
|
5144
5202
|
}
|
|
@@ -5156,17 +5214,16 @@ const UnsavedChangesBanner = ({ onClose }) => {
|
|
|
5156
5214
|
})
|
|
5157
5215
|
}));
|
|
5158
5216
|
};
|
|
5159
|
-
|
|
5160
5217
|
//#endregion
|
|
5161
5218
|
//#region src/view/components/ApiPage/components/TagsSection.tsx
|
|
5162
5219
|
const { useBreakpoint } = Grid;
|
|
5163
5220
|
const TagsSection = ({ tags, collapsed = false, onToggleCollapse, onAddTag, onEditTag, onDeleteTag }) => {
|
|
5164
5221
|
const isMobile = !useBreakpoint().md;
|
|
5165
|
-
const { wrapSSR, cx, token
|
|
5222
|
+
const { wrapSSR, cx, token } = useStyle("TagsSection", (token, scope) => ({
|
|
5166
5223
|
[scope("root")]: {
|
|
5167
5224
|
display: "flex",
|
|
5168
5225
|
flexDirection: "column",
|
|
5169
|
-
borderRadius: token
|
|
5226
|
+
borderRadius: token.borderRadius,
|
|
5170
5227
|
overflow: "hidden",
|
|
5171
5228
|
width: "100%",
|
|
5172
5229
|
flexShrink: 0
|
|
@@ -5175,36 +5232,37 @@ const TagsSection = ({ tags, collapsed = false, onToggleCollapse, onAddTag, onEd
|
|
|
5175
5232
|
display: "flex",
|
|
5176
5233
|
alignItems: "center",
|
|
5177
5234
|
justifyContent: "space-between",
|
|
5178
|
-
padding: `${token
|
|
5179
|
-
background: token
|
|
5180
|
-
borderRadius: `${token
|
|
5235
|
+
padding: `${token.paddingXS}px ${token.paddingLG}px`,
|
|
5236
|
+
background: token.colorPrimaryBg,
|
|
5237
|
+
borderRadius: `${token.borderRadius}px ${token.borderRadius}px 0 0`
|
|
5181
5238
|
},
|
|
5182
5239
|
[scope("head-actions")]: {
|
|
5183
5240
|
display: "flex",
|
|
5184
5241
|
alignItems: "center",
|
|
5185
|
-
gap: token
|
|
5242
|
+
gap: token.margin
|
|
5186
5243
|
},
|
|
5187
5244
|
[scope("body")]: {
|
|
5188
5245
|
display: "flex",
|
|
5189
5246
|
flexDirection: "column",
|
|
5190
5247
|
gap: 0,
|
|
5191
|
-
padding: token
|
|
5192
|
-
background: token
|
|
5193
|
-
borderRadius: `0 0 ${token
|
|
5248
|
+
padding: token.paddingLG,
|
|
5249
|
+
background: token.colorBgElevated,
|
|
5250
|
+
borderRadius: `0 0 ${token.borderRadius}px ${token.borderRadius}px`
|
|
5194
5251
|
},
|
|
5195
5252
|
[scope("tag-row")]: {
|
|
5196
5253
|
display: "flex",
|
|
5197
5254
|
alignItems: "center",
|
|
5198
5255
|
justifyContent: "space-between",
|
|
5199
5256
|
height: 50,
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5257
|
+
paddingTop: token.controlHeightLG,
|
|
5258
|
+
paddingBottom: token.controlHeightLG,
|
|
5259
|
+
paddingRight: token.paddingLG,
|
|
5260
|
+
borderBottom: `1px solid ${token.colorBorder}`,
|
|
5203
5261
|
width: "100%"
|
|
5204
5262
|
},
|
|
5205
5263
|
[scope("tag-row-last")]: {
|
|
5206
5264
|
borderBottom: "none",
|
|
5207
|
-
paddingBottom:
|
|
5265
|
+
paddingBottom: token.marginLG
|
|
5208
5266
|
},
|
|
5209
5267
|
[scope("tag-info")]: {
|
|
5210
5268
|
display: "flex",
|
|
@@ -5216,26 +5274,26 @@ const TagsSection = ({ tags, collapsed = false, onToggleCollapse, onAddTag, onEd
|
|
|
5216
5274
|
[scope("tag-col")]: {
|
|
5217
5275
|
display: "flex",
|
|
5218
5276
|
flexDirection: "column",
|
|
5219
|
-
gap: token
|
|
5277
|
+
gap: token.marginXXS
|
|
5220
5278
|
},
|
|
5221
5279
|
[scope("col-label")]: {
|
|
5222
|
-
fontSize: token
|
|
5280
|
+
fontSize: token.fontSizeLG,
|
|
5223
5281
|
fontWeight: 600,
|
|
5224
|
-
color: token
|
|
5282
|
+
color: token.colorTextTertiary,
|
|
5225
5283
|
lineHeight: "24px",
|
|
5226
5284
|
whiteSpace: "nowrap"
|
|
5227
5285
|
},
|
|
5228
5286
|
[scope("col-value")]: {
|
|
5229
|
-
fontSize: token
|
|
5287
|
+
fontSize: token.fontSizeLG,
|
|
5230
5288
|
fontWeight: 400,
|
|
5231
|
-
color: token
|
|
5289
|
+
color: token.colorText,
|
|
5232
5290
|
lineHeight: "24px",
|
|
5233
5291
|
whiteSpace: "nowrap"
|
|
5234
5292
|
},
|
|
5235
5293
|
[scope("col-value-link")]: {
|
|
5236
|
-
fontSize: token
|
|
5294
|
+
fontSize: token.fontSize,
|
|
5237
5295
|
fontWeight: 400,
|
|
5238
|
-
color: token
|
|
5296
|
+
color: token.colorPrimary,
|
|
5239
5297
|
lineHeight: "22px",
|
|
5240
5298
|
textDecoration: "underline",
|
|
5241
5299
|
whiteSpace: "nowrap"
|
|
@@ -5243,13 +5301,13 @@ const TagsSection = ({ tags, collapsed = false, onToggleCollapse, onAddTag, onEd
|
|
|
5243
5301
|
[scope("tag-actions")]: {
|
|
5244
5302
|
display: "flex",
|
|
5245
5303
|
alignItems: "center",
|
|
5246
|
-
gap: token
|
|
5304
|
+
gap: token.margin
|
|
5247
5305
|
},
|
|
5248
5306
|
[scope("btn-delete")]: {
|
|
5249
5307
|
width: 40,
|
|
5250
5308
|
height: 40,
|
|
5251
|
-
border: `1px solid ${token
|
|
5252
|
-
borderRadius: token
|
|
5309
|
+
border: `1px solid ${token.colorError}`,
|
|
5310
|
+
borderRadius: token.borderRadius,
|
|
5253
5311
|
display: "flex",
|
|
5254
5312
|
alignItems: "center",
|
|
5255
5313
|
justifyContent: "center"
|
|
@@ -5257,9 +5315,9 @@ const TagsSection = ({ tags, collapsed = false, onToggleCollapse, onAddTag, onEd
|
|
|
5257
5315
|
[scope("btn-edit")]: {
|
|
5258
5316
|
width: 40,
|
|
5259
5317
|
height: 40,
|
|
5260
|
-
border: `1px solid ${token
|
|
5261
|
-
borderRadius: token
|
|
5262
|
-
background: token
|
|
5318
|
+
border: `1px solid ${token.colorBorder}`,
|
|
5319
|
+
borderRadius: token.borderRadius,
|
|
5320
|
+
background: token.colorBgContainer,
|
|
5263
5321
|
boxShadow: "0px 2px 0px 0px rgba(0,0,0,0.02)",
|
|
5264
5322
|
display: "flex",
|
|
5265
5323
|
alignItems: "center",
|
|
@@ -5271,8 +5329,8 @@ const TagsSection = ({ tags, collapsed = false, onToggleCollapse, onAddTag, onEd
|
|
|
5271
5329
|
alignItems: "flex-start",
|
|
5272
5330
|
justifyContent: "space-between",
|
|
5273
5331
|
gap: 8,
|
|
5274
|
-
paddingBottom: token
|
|
5275
|
-
borderBottom: `1px solid ${token
|
|
5332
|
+
paddingBottom: token.margin,
|
|
5333
|
+
borderBottom: `1px solid ${token.colorBorder}`,
|
|
5276
5334
|
width: "100%",
|
|
5277
5335
|
minHeight: 50
|
|
5278
5336
|
},
|
|
@@ -5300,9 +5358,9 @@ const TagsSection = ({ tags, collapsed = false, onToggleCollapse, onAddTag, onEd
|
|
|
5300
5358
|
display: "flex",
|
|
5301
5359
|
flexDirection: "column",
|
|
5302
5360
|
gap: 0,
|
|
5303
|
-
padding: token
|
|
5304
|
-
background: token
|
|
5305
|
-
borderRadius: `0 0 ${token
|
|
5361
|
+
padding: token.paddingMD,
|
|
5362
|
+
background: token.colorBgElevated,
|
|
5363
|
+
borderRadius: `0 0 ${token.borderRadius}px ${token.borderRadius}px`,
|
|
5306
5364
|
overflowX: "auto"
|
|
5307
5365
|
}
|
|
5308
5366
|
}));
|
|
@@ -5314,7 +5372,7 @@ const TagsSection = ({ tags, collapsed = false, onToggleCollapse, onAddTag, onEd
|
|
|
5314
5372
|
level: 4,
|
|
5315
5373
|
style: {
|
|
5316
5374
|
margin: 0,
|
|
5317
|
-
color: token
|
|
5375
|
+
color: token.colorTextHeading
|
|
5318
5376
|
},
|
|
5319
5377
|
children: "Tags"
|
|
5320
5378
|
}), /* @__PURE__ */ jsxs("div", {
|
|
@@ -5324,7 +5382,7 @@ const TagsSection = ({ tags, collapsed = false, onToggleCollapse, onAddTag, onEd
|
|
|
5324
5382
|
type: "primary",
|
|
5325
5383
|
icon: /* @__PURE__ */ jsx(PlusOutlined, {}),
|
|
5326
5384
|
onClick: onAddTag,
|
|
5327
|
-
style: { borderRadius: token
|
|
5385
|
+
style: { borderRadius: token.borderRadius },
|
|
5328
5386
|
children: "Add Tag"
|
|
5329
5387
|
}), /* @__PURE__ */ jsx(Button, {
|
|
5330
5388
|
type: "text",
|
|
@@ -5349,14 +5407,14 @@ const TagsSection = ({ tags, collapsed = false, onToggleCollapse, onAddTag, onEd
|
|
|
5349
5407
|
children: [/* @__PURE__ */ jsx("span", {
|
|
5350
5408
|
className: cx("col-label"),
|
|
5351
5409
|
style: {
|
|
5352
|
-
fontSize: token
|
|
5410
|
+
fontSize: token.fontSize,
|
|
5353
5411
|
lineHeight: "20px"
|
|
5354
5412
|
},
|
|
5355
5413
|
children: "Tag Name:"
|
|
5356
5414
|
}), /* @__PURE__ */ jsx("span", {
|
|
5357
5415
|
className: cx("col-value"),
|
|
5358
5416
|
style: {
|
|
5359
|
-
fontSize: token
|
|
5417
|
+
fontSize: token.fontSize,
|
|
5360
5418
|
lineHeight: "20px",
|
|
5361
5419
|
overflow: "hidden",
|
|
5362
5420
|
textOverflow: "ellipsis",
|
|
@@ -5369,7 +5427,7 @@ const TagsSection = ({ tags, collapsed = false, onToggleCollapse, onAddTag, onEd
|
|
|
5369
5427
|
children: [/* @__PURE__ */ jsx("span", {
|
|
5370
5428
|
className: cx("col-label"),
|
|
5371
5429
|
style: {
|
|
5372
|
-
fontSize: token
|
|
5430
|
+
fontSize: token.fontSize,
|
|
5373
5431
|
lineHeight: "20px"
|
|
5374
5432
|
},
|
|
5375
5433
|
children: "Description:"
|
|
@@ -5378,7 +5436,7 @@ const TagsSection = ({ tags, collapsed = false, onToggleCollapse, onAddTag, onEd
|
|
|
5378
5436
|
children: /* @__PURE__ */ jsx("span", {
|
|
5379
5437
|
className: cx("col-value"),
|
|
5380
5438
|
style: {
|
|
5381
|
-
fontSize: token
|
|
5439
|
+
fontSize: token.fontSize,
|
|
5382
5440
|
lineHeight: "20px",
|
|
5383
5441
|
overflow: "hidden",
|
|
5384
5442
|
textOverflow: "ellipsis",
|
|
@@ -5401,7 +5459,7 @@ const TagsSection = ({ tags, collapsed = false, onToggleCollapse, onAddTag, onEd
|
|
|
5401
5459
|
children: /* @__PURE__ */ jsx(Button, {
|
|
5402
5460
|
danger: true,
|
|
5403
5461
|
type: "text",
|
|
5404
|
-
icon: /* @__PURE__ */ jsx(
|
|
5462
|
+
icon: /* @__PURE__ */ jsx(Trash, {
|
|
5405
5463
|
width: 32,
|
|
5406
5464
|
height: 32
|
|
5407
5465
|
}),
|
|
@@ -5508,7 +5566,7 @@ const TagsSection = ({ tags, collapsed = false, onToggleCollapse, onAddTag, onEd
|
|
|
5508
5566
|
children: /* @__PURE__ */ jsx(Button, {
|
|
5509
5567
|
danger: true,
|
|
5510
5568
|
type: "text",
|
|
5511
|
-
icon: /* @__PURE__ */ jsx(
|
|
5569
|
+
icon: /* @__PURE__ */ jsx(Trash, {
|
|
5512
5570
|
width: 32,
|
|
5513
5571
|
height: 32
|
|
5514
5572
|
}),
|
|
@@ -5541,7 +5599,6 @@ const TagsSection = ({ tags, collapsed = false, onToggleCollapse, onAddTag, onEd
|
|
|
5541
5599
|
}))]
|
|
5542
5600
|
}));
|
|
5543
5601
|
};
|
|
5544
|
-
|
|
5545
5602
|
//#endregion
|
|
5546
5603
|
//#region src/view/components/ApiPage/components/AddTagDrawer.tsx
|
|
5547
5604
|
const TAG_NAME_REGEX = /^[A-Za-z0-9_-]+$/;
|
|
@@ -5555,11 +5612,11 @@ const AddTagDrawer = ({ open, onClose, mode, initialValues, onAddTag, onEditTag
|
|
|
5555
5612
|
const tagNameValue = Form.useWatch("name", form);
|
|
5556
5613
|
const extDocsDesc = Form.useWatch("externalDocsDescription", form);
|
|
5557
5614
|
const extDocsLink = Form.useWatch("externalDocsLink", form);
|
|
5558
|
-
const { wrapSSR, cx, token
|
|
5615
|
+
const { wrapSSR, cx, token } = useStyle("AddTagDrawer", (token, scope) => ({
|
|
5559
5616
|
[scope("title")]: {
|
|
5560
5617
|
fontSize: 16,
|
|
5561
5618
|
fontWeight: 600,
|
|
5562
|
-
color: token
|
|
5619
|
+
color: token.colorTextBase,
|
|
5563
5620
|
lineHeight: "24px",
|
|
5564
5621
|
fontFamily: "Cairo SemiBold, Cairo, sans-serif"
|
|
5565
5622
|
},
|
|
@@ -5570,25 +5627,25 @@ const AddTagDrawer = ({ open, onClose, mode, initialValues, onAddTag, onEditTag
|
|
|
5570
5627
|
"& .ant-form-item": { marginBottom: 0 }
|
|
5571
5628
|
},
|
|
5572
5629
|
[scope("label")]: {
|
|
5573
|
-
fontSize: token
|
|
5574
|
-
color: token
|
|
5630
|
+
fontSize: token.fontSize,
|
|
5631
|
+
color: token.colorText
|
|
5575
5632
|
},
|
|
5576
5633
|
[scope("asterisk")]: {
|
|
5577
|
-
color: token
|
|
5634
|
+
color: token.colorError,
|
|
5578
5635
|
marginLeft: 2
|
|
5579
5636
|
},
|
|
5580
5637
|
[scope("label-optional")]: {
|
|
5581
|
-
color: token
|
|
5638
|
+
color: token.colorTextTertiary,
|
|
5582
5639
|
marginLeft: 4,
|
|
5583
|
-
fontSize: token
|
|
5640
|
+
fontSize: token.fontSize
|
|
5584
5641
|
},
|
|
5585
5642
|
[scope("label-secondary")]: {
|
|
5586
|
-
fontSize: token
|
|
5587
|
-
color: token
|
|
5643
|
+
fontSize: token.fontSize,
|
|
5644
|
+
color: token.colorTextSecondary
|
|
5588
5645
|
},
|
|
5589
5646
|
[scope("label-disabled")]: {
|
|
5590
|
-
fontSize: token
|
|
5591
|
-
color: token
|
|
5647
|
+
fontSize: token.fontSize,
|
|
5648
|
+
color: token.colorTextDisabled
|
|
5592
5649
|
},
|
|
5593
5650
|
[scope("footer")]: {
|
|
5594
5651
|
display: "flex",
|
|
@@ -5625,7 +5682,7 @@ const AddTagDrawer = ({ open, onClose, mode, initialValues, onAddTag, onEditTag
|
|
|
5625
5682
|
fontSize: 16,
|
|
5626
5683
|
fontWeight: 400,
|
|
5627
5684
|
lineHeight: "24px",
|
|
5628
|
-
color: token
|
|
5685
|
+
color: token.colorText
|
|
5629
5686
|
},
|
|
5630
5687
|
[scope("modalCloseBtn")]: {
|
|
5631
5688
|
position: "absolute",
|
|
@@ -5641,12 +5698,12 @@ const AddTagDrawer = ({ open, onClose, mode, initialValues, onAddTag, onEditTag
|
|
|
5641
5698
|
border: "none",
|
|
5642
5699
|
background: "transparent",
|
|
5643
5700
|
padding: 0,
|
|
5644
|
-
color: token
|
|
5701
|
+
color: token.colorTextTertiary,
|
|
5645
5702
|
fontSize: 16,
|
|
5646
5703
|
lineHeight: 1,
|
|
5647
5704
|
"&:hover": {
|
|
5648
|
-
color: token
|
|
5649
|
-
backgroundColor: token
|
|
5705
|
+
color: token.colorText,
|
|
5706
|
+
backgroundColor: token.colorFillSecondary
|
|
5650
5707
|
}
|
|
5651
5708
|
},
|
|
5652
5709
|
[scope("modalContent")]: {
|
|
@@ -5663,7 +5720,7 @@ const AddTagDrawer = ({ open, onClose, mode, initialValues, onAddTag, onEditTag
|
|
|
5663
5720
|
fontSize: 14,
|
|
5664
5721
|
fontWeight: 400,
|
|
5665
5722
|
lineHeight: "22px",
|
|
5666
|
-
color: token
|
|
5723
|
+
color: token.colorText
|
|
5667
5724
|
},
|
|
5668
5725
|
[scope("modalFooter")]: {
|
|
5669
5726
|
display: "flex",
|
|
@@ -5740,14 +5797,14 @@ const AddTagDrawer = ({ open, onClose, mode, initialValues, onAddTag, onEditTag
|
|
|
5740
5797
|
styles: {
|
|
5741
5798
|
header: {
|
|
5742
5799
|
padding: "16px 24px",
|
|
5743
|
-
borderBottom: `1px solid ${token
|
|
5744
|
-
background: token
|
|
5800
|
+
borderBottom: `1px solid ${token.colorFillSecondary}`,
|
|
5801
|
+
background: token.colorBgBase
|
|
5745
5802
|
},
|
|
5746
5803
|
body: { padding: "24px" },
|
|
5747
5804
|
footer: {
|
|
5748
5805
|
padding: "24px",
|
|
5749
|
-
background: token
|
|
5750
|
-
borderTop: `1px solid ${token
|
|
5806
|
+
background: token.colorPrimaryBg,
|
|
5807
|
+
borderTop: `1px solid ${token.colorFillSecondary}`
|
|
5751
5808
|
}
|
|
5752
5809
|
},
|
|
5753
5810
|
footer: /* @__PURE__ */ jsxs("div", {
|
|
@@ -5948,9 +6005,9 @@ const AddTagDrawer = ({ open, onClose, mode, initialValues, onAddTag, onEditTag
|
|
|
5948
6005
|
borderRadius: 8,
|
|
5949
6006
|
height: 32,
|
|
5950
6007
|
paddingInline: 16,
|
|
5951
|
-
backgroundColor: token
|
|
5952
|
-
borderColor: token
|
|
5953
|
-
boxShadow: `0px 2px 0px ${token
|
|
6008
|
+
backgroundColor: token.colorPrimary,
|
|
6009
|
+
borderColor: token.colorPrimary,
|
|
6010
|
+
boxShadow: `0px 2px 0px ${token.colorPrimaryBg}`
|
|
5954
6011
|
},
|
|
5955
6012
|
children: confirmBtnLabel
|
|
5956
6013
|
})]
|
|
@@ -5959,7 +6016,6 @@ const AddTagDrawer = ({ open, onClose, mode, initialValues, onAddTag, onEditTag
|
|
|
5959
6016
|
})
|
|
5960
6017
|
] }));
|
|
5961
6018
|
};
|
|
5962
|
-
|
|
5963
6019
|
//#endregion
|
|
5964
6020
|
//#region src/view/helper/mutate.ts
|
|
5965
6021
|
const resolveSchema = (schema, components) => {
|
|
@@ -6044,44 +6100,32 @@ const transformOpenApiToDocs = (api) => {
|
|
|
6044
6100
|
curl
|
|
6045
6101
|
};
|
|
6046
6102
|
};
|
|
6047
|
-
|
|
6048
6103
|
//#endregion
|
|
6049
|
-
//#region src/assets/copy.
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
fill: "none"
|
|
6066
|
-
}, props), _path || (_path = /* @__PURE__ */ React.createElement("path", {
|
|
6067
|
-
fill: "currentcolor",
|
|
6068
|
-
d: "M7.4 15.167H4.6c-2.607 0-3.767-1.16-3.767-3.766V8.6c0-2.607 1.16-3.767 3.767-3.767h2.8c2.606 0 3.766 1.16 3.766 3.767v2.8c0 2.606-1.16 3.766-3.766 3.766M4.6 5.834c-2.067 0-2.767.7-2.767 2.767v2.8c0 2.066.7 2.766 2.767 2.766h2.8c2.066 0 2.766-.7 2.766-2.766V8.6c0-2.067-.7-2.767-2.766-2.767z"
|
|
6069
|
-
})), _path2 || (_path2 = /* @__PURE__ */ React.createElement("path", {
|
|
6070
|
-
fill: "currentcolor",
|
|
6071
|
-
d: "M11.4 11.167h-.734a.504.504 0 0 1-.5-.5V8.601c0-2.067-.7-2.767-2.766-2.767H5.333a.504.504 0 0 1-.5-.5v-.733C4.833 1.994 5.993.834 8.6.834h2.8c2.606 0 3.766 1.16 3.766 3.767v2.8c0 2.606-1.16 3.766-3.766 3.766m-.234-1h.234c2.066 0 2.766-.7 2.766-2.766V4.6c0-2.067-.7-2.767-2.766-2.767H8.6c-2.067 0-2.767.7-2.767 2.767v.233H7.4c2.606 0 3.766 1.16 3.766 3.767z"
|
|
6072
|
-
})));
|
|
6073
|
-
};
|
|
6074
|
-
var copy_default = SvgCopy;
|
|
6075
|
-
|
|
6104
|
+
//#region src/assets/copy.tsx
|
|
6105
|
+
const Copy = (props) => /* @__PURE__ */ jsxs("svg", {
|
|
6106
|
+
width: "16",
|
|
6107
|
+
height: "16",
|
|
6108
|
+
viewBox: "0 0 16 16",
|
|
6109
|
+
fill: "none",
|
|
6110
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6111
|
+
...props,
|
|
6112
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
6113
|
+
d: "M7.39967 15.1673H4.59967C1.99301 15.1673 0.833008 14.0073 0.833008 11.4007V8.60065C0.833008 5.99398 1.99301 4.83398 4.59967 4.83398H7.39967C10.0063 4.83398 11.1663 5.99398 11.1663 8.60065V11.4007C11.1663 14.0073 10.0063 15.1673 7.39967 15.1673ZM4.59967 5.83398C2.53301 5.83398 1.83301 6.53398 1.83301 8.60065V11.4007C1.83301 13.4673 2.53301 14.1673 4.59967 14.1673H7.39967C9.46634 14.1673 10.1663 13.4673 10.1663 11.4007V8.60065C10.1663 6.53398 9.46634 5.83398 7.39967 5.83398H4.59967Z",
|
|
6114
|
+
fill: "currentcolor"
|
|
6115
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
6116
|
+
d: "M11.3997 11.1673H10.6663C10.393 11.1673 10.1663 10.9407 10.1663 10.6673V8.60065C10.1663 6.53398 9.46634 5.83398 7.39967 5.83398H5.33301C5.05967 5.83398 4.83301 5.60732 4.83301 5.33398V4.60065C4.83301 1.99398 5.99301 0.833984 8.59967 0.833984H11.3997C14.0063 0.833984 15.1663 1.99398 15.1663 4.60065V7.40065C15.1663 10.0073 14.0063 11.1673 11.3997 11.1673ZM11.1663 10.1673H11.3997C13.4663 10.1673 14.1663 9.46732 14.1663 7.40065V4.60065C14.1663 2.53398 13.4663 1.83398 11.3997 1.83398H8.59967C6.53301 1.83398 5.83301 2.53398 5.83301 4.60065V4.83398H7.39967C10.0063 4.83398 11.1663 5.99398 11.1663 8.60065V10.1673Z",
|
|
6117
|
+
fill: "currentcolor"
|
|
6118
|
+
})]
|
|
6119
|
+
});
|
|
6076
6120
|
//#endregion
|
|
6077
6121
|
//#region src/view/components/EndpointPage/Codebox/Codebox.tsx
|
|
6078
6122
|
Light.registerLanguage("json", json);
|
|
6079
6123
|
const Codebox = ({ code, language, wrapLongLines }) => {
|
|
6080
6124
|
const [appTheme] = useState("DARK");
|
|
6081
|
-
const { token
|
|
6082
|
-
const bodyBg = themeConfig.id == 1 ? token
|
|
6083
|
-
const { cx } = useStyle("codeBox", (token
|
|
6084
|
-
borderRadius: token
|
|
6125
|
+
const { token, theme: themeConfig } = theme.useToken();
|
|
6126
|
+
const bodyBg = themeConfig.id == 1 ? token.colorBgContainer : "#1d2856";
|
|
6127
|
+
const { cx } = useStyle("codeBox", (token, scope) => ({ [scope("codebox")]: {
|
|
6128
|
+
borderRadius: token.borderRadius,
|
|
6085
6129
|
height: "100%",
|
|
6086
6130
|
maxHeight: "100%",
|
|
6087
6131
|
overflow: "auto",
|
|
@@ -6108,12 +6152,10 @@ const Codebox = ({ code, language, wrapLongLines }) => {
|
|
|
6108
6152
|
})
|
|
6109
6153
|
});
|
|
6110
6154
|
};
|
|
6111
|
-
var Codebox_default = Codebox;
|
|
6112
|
-
|
|
6113
6155
|
//#endregion
|
|
6114
6156
|
//#region src/view/components/CodeboxSidebar.tsx
|
|
6115
6157
|
function CodeboxSidebar() {
|
|
6116
|
-
const { selectedEndpoint, selectedApi, activeRequestTab, selectedStatusCode, statusCodeOptions, setSelectedStatusCode } =
|
|
6158
|
+
const { selectedEndpoint, selectedApi, activeRequestTab, selectedStatusCode, statusCodeOptions, setSelectedStatusCode } = useStore(({ view }) => view);
|
|
6117
6159
|
const httpStatusOptions = useMemo(() => statusCodeOptions.map((code) => ({
|
|
6118
6160
|
value: code,
|
|
6119
6161
|
label: /* @__PURE__ */ jsxs("span", {
|
|
@@ -6287,7 +6329,7 @@ function CodeboxSidebar() {
|
|
|
6287
6329
|
setCurlTooltip("Copied!");
|
|
6288
6330
|
setTimeout(() => setCurlTooltip("Copy cURL"), 1500);
|
|
6289
6331
|
},
|
|
6290
|
-
icon: /* @__PURE__ */ jsx(
|
|
6332
|
+
icon: /* @__PURE__ */ jsx(Copy, { style: { color: "white" } })
|
|
6291
6333
|
})
|
|
6292
6334
|
})]
|
|
6293
6335
|
}), /* @__PURE__ */ jsx("div", {
|
|
@@ -6317,12 +6359,10 @@ function CodeboxSidebar() {
|
|
|
6317
6359
|
open: httpStatusOptions.length === 1 ? false : void 0,
|
|
6318
6360
|
suffixIcon: httpStatusOptions.length > 1 ? void 0 : false
|
|
6319
6361
|
})]
|
|
6320
|
-
}), /* @__PURE__ */ jsx(
|
|
6362
|
+
}), /* @__PURE__ */ jsx(Codebox, { code: JSON.stringify(selectedEndpoint?.responses[selectedStatusCode], null, 2) || "" })]
|
|
6321
6363
|
})]
|
|
6322
6364
|
});
|
|
6323
6365
|
}
|
|
6324
|
-
var CodeboxSidebar_default = CodeboxSidebar;
|
|
6325
|
-
|
|
6326
6366
|
//#endregion
|
|
6327
6367
|
//#region src/view/layout.tsx
|
|
6328
6368
|
const DocumentationLayout = ({ data, preSelectedApi, handleVisitLandingPage, onSave }) => {
|
|
@@ -6352,11 +6392,11 @@ const DocumentationLayout = ({ data, preSelectedApi, handleVisitLandingPage, onS
|
|
|
6352
6392
|
});
|
|
6353
6393
|
const [localTags, setLocalTags] = useState([]);
|
|
6354
6394
|
const [messageApi, contextHolder] = message.useMessage();
|
|
6355
|
-
const { focusedContent, selectedNodeKey, selectedApi, originalData, builtTreeData, selectedEndpoint, setOriginalData, setTransformedData, setBuiltTreeData, setFocusedContent, setExpandedKeys, setSelectedEndpoint } =
|
|
6395
|
+
const { focusedContent, selectedNodeKey, selectedApi, originalData, builtTreeData, selectedEndpoint, setOriginalData, setTransformedData, setBuiltTreeData, setFocusedContent, setExpandedKeys, setSelectedEndpoint } = useStore(({ view }) => view);
|
|
6356
6396
|
const { selectFirstApi, selectPreSelectedApi, clearSelection } = useNodeSelection();
|
|
6357
6397
|
const hasInitializedRef = useRef(false);
|
|
6358
|
-
const { useBreakpoint
|
|
6359
|
-
const isMobile = !useBreakpoint
|
|
6398
|
+
const { useBreakpoint } = Grid;
|
|
6399
|
+
const isMobile = !useBreakpoint().md;
|
|
6360
6400
|
useEffect(() => {
|
|
6361
6401
|
return () => {
|
|
6362
6402
|
resetStore();
|
|
@@ -6398,11 +6438,11 @@ const DocumentationLayout = ({ data, preSelectedApi, handleVisitLandingPage, onS
|
|
|
6398
6438
|
selectedApi,
|
|
6399
6439
|
selectFirstApi
|
|
6400
6440
|
]);
|
|
6401
|
-
const { cx, token
|
|
6441
|
+
const { cx, token } = useStyle("APIDocumentationLayout", (token, scope) => ({
|
|
6402
6442
|
[scope("documentation-container")]: {
|
|
6403
6443
|
display: "flex",
|
|
6404
6444
|
flexDirection: "column",
|
|
6405
|
-
gap: token
|
|
6445
|
+
gap: token.marginLG,
|
|
6406
6446
|
height: "100%",
|
|
6407
6447
|
overflowY: "auto"
|
|
6408
6448
|
},
|
|
@@ -6414,7 +6454,7 @@ const DocumentationLayout = ({ data, preSelectedApi, handleVisitLandingPage, onS
|
|
|
6414
6454
|
display: "flex",
|
|
6415
6455
|
flexShrink: 0,
|
|
6416
6456
|
height: "auto",
|
|
6417
|
-
gap: token
|
|
6457
|
+
gap: token.marginLG,
|
|
6418
6458
|
width: "100%"
|
|
6419
6459
|
},
|
|
6420
6460
|
[".delete-tag-confirm-modal .ant-modal-container"]: {
|
|
@@ -6436,7 +6476,7 @@ const DocumentationLayout = ({ data, preSelectedApi, handleVisitLandingPage, onS
|
|
|
6436
6476
|
fontSize: 16,
|
|
6437
6477
|
fontWeight: 400,
|
|
6438
6478
|
lineHeight: "24px",
|
|
6439
|
-
color: token
|
|
6479
|
+
color: token.colorText
|
|
6440
6480
|
},
|
|
6441
6481
|
[scope("deleteModalCloseBtn")]: {
|
|
6442
6482
|
position: "absolute",
|
|
@@ -6452,12 +6492,12 @@ const DocumentationLayout = ({ data, preSelectedApi, handleVisitLandingPage, onS
|
|
|
6452
6492
|
border: "none",
|
|
6453
6493
|
background: "transparent",
|
|
6454
6494
|
padding: 0,
|
|
6455
|
-
color: token
|
|
6495
|
+
color: token.colorTextTertiary,
|
|
6456
6496
|
fontSize: 16,
|
|
6457
6497
|
lineHeight: 1,
|
|
6458
6498
|
"&:hover": {
|
|
6459
|
-
color: token
|
|
6460
|
-
backgroundColor: token
|
|
6499
|
+
color: token.colorText,
|
|
6500
|
+
backgroundColor: token.colorFillSecondary
|
|
6461
6501
|
}
|
|
6462
6502
|
},
|
|
6463
6503
|
[scope("deleteModalContent")]: {
|
|
@@ -6474,7 +6514,7 @@ const DocumentationLayout = ({ data, preSelectedApi, handleVisitLandingPage, onS
|
|
|
6474
6514
|
fontSize: 14,
|
|
6475
6515
|
fontWeight: 400,
|
|
6476
6516
|
lineHeight: "22px",
|
|
6477
|
-
color: token
|
|
6517
|
+
color: token.colorText
|
|
6478
6518
|
},
|
|
6479
6519
|
[scope("deleteModalFooter")]: {
|
|
6480
6520
|
display: "flex",
|
|
@@ -6763,7 +6803,7 @@ const DocumentationLayout = ({ data, preSelectedApi, handleVisitLandingPage, onS
|
|
|
6763
6803
|
style: {
|
|
6764
6804
|
display: "flex",
|
|
6765
6805
|
alignItems: "center",
|
|
6766
|
-
background: token
|
|
6806
|
+
background: token.colorBgLayout,
|
|
6767
6807
|
padding: "4px",
|
|
6768
6808
|
borderRadius: 8,
|
|
6769
6809
|
gap: 8
|
|
@@ -6778,12 +6818,12 @@ const DocumentationLayout = ({ data, preSelectedApi, handleVisitLandingPage, onS
|
|
|
6778
6818
|
border: "none",
|
|
6779
6819
|
cursor: "pointer",
|
|
6780
6820
|
borderRadius: 8,
|
|
6781
|
-
fontFamily: token
|
|
6782
|
-
background: mode === "edit" ? token
|
|
6821
|
+
fontFamily: token.fontFamily,
|
|
6822
|
+
background: mode === "edit" ? token.colorBgContainer : "transparent",
|
|
6783
6823
|
boxShadow: mode === "edit" ? "0px 2px 4px -2px rgba(17,12,34,0.12)" : "none",
|
|
6784
6824
|
fontWeight: mode === "edit" ? 700 : 400,
|
|
6785
|
-
fontSize: mode === "edit" ? token
|
|
6786
|
-
color: token
|
|
6825
|
+
fontSize: mode === "edit" ? token.fontSize : token.fontSizeLG,
|
|
6826
|
+
color: token.colorText
|
|
6787
6827
|
},
|
|
6788
6828
|
children: [/* @__PURE__ */ jsx(EditOutlined, { style: { fontSize: 18 } }), "Edit"]
|
|
6789
6829
|
}), /* @__PURE__ */ jsxs("button", {
|
|
@@ -6796,12 +6836,12 @@ const DocumentationLayout = ({ data, preSelectedApi, handleVisitLandingPage, onS
|
|
|
6796
6836
|
border: "none",
|
|
6797
6837
|
cursor: "pointer",
|
|
6798
6838
|
borderRadius: 8,
|
|
6799
|
-
fontFamily: token
|
|
6800
|
-
background: mode === "view" ? token
|
|
6839
|
+
fontFamily: token.fontFamily,
|
|
6840
|
+
background: mode === "view" ? token.colorBgContainer : "transparent",
|
|
6801
6841
|
boxShadow: mode === "view" ? "0px 2px 4px -2px rgba(17,12,34,0.12)" : "none",
|
|
6802
6842
|
fontWeight: mode === "view" ? 700 : 400,
|
|
6803
|
-
fontSize: mode === "view" ? token
|
|
6804
|
-
color: token
|
|
6843
|
+
fontSize: mode === "view" ? token.fontSize : token.fontSizeLG,
|
|
6844
|
+
color: token.colorText
|
|
6805
6845
|
},
|
|
6806
6846
|
children: [/* @__PURE__ */ jsx(EyeOutlined, { style: { fontSize: 18 } }), "View"]
|
|
6807
6847
|
})]
|
|
@@ -6966,7 +7006,7 @@ const DocumentationLayout = ({ data, preSelectedApi, handleVisitLandingPage, onS
|
|
|
6966
7006
|
handleResetSearch,
|
|
6967
7007
|
searchEnabled: !!searchValue
|
|
6968
7008
|
}),
|
|
6969
|
-
!isMobile && focusedContent === "ENDPOINT" && /* @__PURE__ */ jsx(
|
|
7009
|
+
!isMobile && focusedContent === "ENDPOINT" && /* @__PURE__ */ jsx(CodeboxSidebar, {})
|
|
6970
7010
|
]
|
|
6971
7011
|
}),
|
|
6972
7012
|
/* @__PURE__ */ jsx(AddTagDrawer, {
|
|
@@ -7066,7 +7106,102 @@ const DocumentationLayout = ({ data, preSelectedApi, handleVisitLandingPage, onS
|
|
|
7066
7106
|
]
|
|
7067
7107
|
});
|
|
7068
7108
|
};
|
|
7069
|
-
|
|
7070
7109
|
//#endregion
|
|
7071
|
-
|
|
7072
|
-
|
|
7110
|
+
//#region src/view/devportal-layout.tsx
|
|
7111
|
+
const DevportalDocumentationLayout = ({ data, preSelectedApi, handleVisitLandingPage }) => {
|
|
7112
|
+
const [searchValue, setSearchValue] = useState("");
|
|
7113
|
+
const { focusedContent, selectedNodeKey, selectedApi, builtTreeData, setOriginalData, setTransformedData, setBuiltTreeData, setFocusedContent, setExpandedKeys } = useStore(({ view }) => view);
|
|
7114
|
+
const { selectFirstApi, selectPreSelectedApi, clearSelection } = useNodeSelection();
|
|
7115
|
+
const hasInitializedRef = useRef(false);
|
|
7116
|
+
useEffect(() => {
|
|
7117
|
+
return () => {
|
|
7118
|
+
resetStore();
|
|
7119
|
+
};
|
|
7120
|
+
}, []);
|
|
7121
|
+
const resetStore = () => {
|
|
7122
|
+
setExpandedKeys([]);
|
|
7123
|
+
setFocusedContent(null);
|
|
7124
|
+
setBuiltTreeData([]);
|
|
7125
|
+
setTransformedData([]);
|
|
7126
|
+
setOriginalData([]);
|
|
7127
|
+
setSearchValue("");
|
|
7128
|
+
clearSelection();
|
|
7129
|
+
hasInitializedRef.current = false;
|
|
7130
|
+
};
|
|
7131
|
+
useEffect(() => {
|
|
7132
|
+
if (!hasInitializedRef.current && data.length > 0) {
|
|
7133
|
+
setOriginalData(data);
|
|
7134
|
+
const transformedData = data.map(transformOpenApiToDocs).sort((a, b) => a.title.localeCompare(b.title));
|
|
7135
|
+
setTransformedData(transformedData);
|
|
7136
|
+
setBuiltTreeData(buildTreeDataStructure(transformedData));
|
|
7137
|
+
hasInitializedRef.current = true;
|
|
7138
|
+
}
|
|
7139
|
+
}, [
|
|
7140
|
+
data,
|
|
7141
|
+
setOriginalData,
|
|
7142
|
+
setTransformedData,
|
|
7143
|
+
setBuiltTreeData
|
|
7144
|
+
]);
|
|
7145
|
+
useEffect(() => {
|
|
7146
|
+
if (builtTreeData && builtTreeData.length > 0 && !selectedApi && !selectedNodeKey && hasInitializedRef.current) {
|
|
7147
|
+
if (!preSelectedApi) selectFirstApi(builtTreeData);
|
|
7148
|
+
else selectPreSelectedApi(builtTreeData, preSelectedApi);
|
|
7149
|
+
hasInitializedRef.current = false;
|
|
7150
|
+
}
|
|
7151
|
+
}, [
|
|
7152
|
+
builtTreeData,
|
|
7153
|
+
selectedNodeKey,
|
|
7154
|
+
selectedApi,
|
|
7155
|
+
selectFirstApi
|
|
7156
|
+
]);
|
|
7157
|
+
const { cx } = useStyle("APIDocumentationLayout", (token, scope) => ({
|
|
7158
|
+
[scope("documentation-container")]: {
|
|
7159
|
+
display: "flex",
|
|
7160
|
+
flexDirection: "column",
|
|
7161
|
+
gap: token.marginLG,
|
|
7162
|
+
height: "100%",
|
|
7163
|
+
maxHeight: "100%",
|
|
7164
|
+
overflow: "hidden"
|
|
7165
|
+
},
|
|
7166
|
+
[scope("docs-layout")]: {
|
|
7167
|
+
display: "flex",
|
|
7168
|
+
height: "100%",
|
|
7169
|
+
maxHeight: "100%",
|
|
7170
|
+
overflow: "hidden",
|
|
7171
|
+
gap: token.marginLG,
|
|
7172
|
+
width: "100%"
|
|
7173
|
+
}
|
|
7174
|
+
}));
|
|
7175
|
+
const handleResetSearch = () => {
|
|
7176
|
+
setSearchValue("");
|
|
7177
|
+
};
|
|
7178
|
+
const _handleVisitLandingPage = () => {
|
|
7179
|
+
if (handleVisitLandingPage) {
|
|
7180
|
+
handleVisitLandingPage();
|
|
7181
|
+
return;
|
|
7182
|
+
}
|
|
7183
|
+
window.location.pathname = "/";
|
|
7184
|
+
};
|
|
7185
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7186
|
+
className: cx("documentation-container"),
|
|
7187
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
7188
|
+
className: cx("docs-layout"),
|
|
7189
|
+
children: [
|
|
7190
|
+
/* @__PURE__ */ jsx(Sidebar, {
|
|
7191
|
+
searchValue,
|
|
7192
|
+
setSearchValue
|
|
7193
|
+
}),
|
|
7194
|
+
/* @__PURE__ */ jsx(MainContent, {
|
|
7195
|
+
handleVisitLandingPage: _handleVisitLandingPage,
|
|
7196
|
+
handleResetSearch,
|
|
7197
|
+
searchEnabled: !!searchValue
|
|
7198
|
+
}),
|
|
7199
|
+
focusedContent === "ENDPOINT" && /* @__PURE__ */ jsx(CodeboxSidebar, {})
|
|
7200
|
+
]
|
|
7201
|
+
})
|
|
7202
|
+
});
|
|
7203
|
+
};
|
|
7204
|
+
//#endregion
|
|
7205
|
+
export { ApiDocumentationBar, DevportalDocumentationLayout, DocumentationLayout, useStore };
|
|
7206
|
+
|
|
7207
|
+
//# sourceMappingURL=index.mjs.map
|