docusaurus-theme-openapi-docs 3.0.0-beta.3 → 3.0.0-beta.4
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/lib/markdown/utils.d.ts +2 -1
- package/lib/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.d.ts +13 -0
- package/lib/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +199 -124
- package/lib/theme/ApiExplorer/Accept/index.d.ts +2 -2
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.d.ts +4 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.js +25 -19
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.d.ts +4 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +27 -16
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.d.ts +4 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.js +115 -96
- package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js +115 -54
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +41 -30
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.d.ts +14 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +200 -120
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.js +36 -24
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +35 -28
- package/lib/theme/ApiExplorer/ApiCodeBlock/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/index.js +72 -14
- package/lib/theme/ApiExplorer/Authorization/index.d.ts +2 -2
- package/lib/theme/ApiExplorer/Body/index.d.ts +2 -2
- package/lib/theme/ApiExplorer/CodeSnippets/index.d.ts +2 -2
- package/lib/theme/ApiExplorer/CodeTabs/index.d.ts +11 -0
- package/lib/theme/ApiExplorer/CodeTabs/index.js +125 -78
- package/lib/theme/ApiExplorer/ContentType/index.d.ts +2 -2
- package/lib/theme/ApiExplorer/Export/index.d.ts +2 -2
- package/lib/theme/ApiExplorer/FloatingButton/index.d.ts +1 -1
- package/lib/theme/ApiExplorer/FormFileUpload/index.d.ts +2 -2
- package/lib/theme/ApiExplorer/FormItem/index.d.ts +1 -1
- package/lib/theme/ApiExplorer/FormMultiSelect/index.d.ts +1 -1
- package/lib/theme/ApiExplorer/FormSelect/index.d.ts +1 -1
- package/lib/theme/ApiExplorer/FormTextInput/index.d.ts +1 -1
- package/lib/theme/ApiExplorer/MethodEndpoint/index.d.ts +2 -2
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.d.ts +2 -2
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.d.ts +2 -2
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.d.ts +2 -2
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.d.ts +2 -2
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.d.ts +2 -2
- package/lib/theme/ApiExplorer/ParamOptions/index.d.ts +2 -2
- package/lib/theme/ApiExplorer/Request/index.d.ts +2 -2
- package/lib/theme/ApiExplorer/Response/index.d.ts +2 -2
- package/lib/theme/ApiExplorer/SecuritySchemes/index.d.ts +2 -2
- package/lib/theme/ApiExplorer/Server/index.d.ts +2 -2
- package/lib/theme/ApiExplorer/index.d.ts +2 -2
- package/lib/theme/ApiItem/index.d.ts +2 -2
- package/lib/theme/ApiItem/index.js +4 -3
- package/lib/theme/ApiItem/store.d.ts +4 -4
- package/lib/theme/ApiLogo/index.d.ts +2 -2
- package/lib/theme/ApiTabs/index.d.ts +3 -0
- package/lib/theme/ApiTabs/index.js +146 -96
- package/lib/theme/DiscriminatorTabs/index.d.ts +3 -0
- package/lib/theme/DiscriminatorTabs/index.js +146 -94
- package/lib/theme/MimeTabs/index.d.ts +6 -0
- package/lib/theme/MimeTabs/index.js +163 -114
- package/lib/theme/ParamsItem/index.d.ts +22 -0
- package/lib/theme/ParamsItem/index.js +154 -109
- package/lib/theme/ResponseSamples/index.d.ts +8 -0
- package/lib/theme/ResponseSamples/index.js +18 -13
- package/lib/theme/SchemaItem/index.d.ts +12 -0
- package/lib/theme/SchemaItem/index.js +123 -89
- package/lib/theme/SchemaTabs/index.d.ts +3 -0
- package/lib/theme/SchemaTabs/index.js +142 -91
- package/package.json +4 -4
- package/src/markdown/utils.ts +4 -2
- package/src/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/{index.js → index.tsx} +21 -8
- package/src/theme/ApiExplorer/ApiCodeBlock/Container/{index.js → index.tsx} +6 -3
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/{Element.js → Element.tsx} +5 -1
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/{String.js → String.tsx} +4 -4
- package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/{index.js → index.tsx} +8 -3
- package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/{index.js → index.tsx} +9 -1
- package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/{index.js → index.tsx} +12 -2
- package/src/theme/ApiExplorer/ApiCodeBlock/Line/{index.js → index.tsx} +2 -1
- package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/{index.js → index.tsx} +11 -1
- package/src/theme/ApiExplorer/ApiCodeBlock/{index.js → index.tsx} +10 -5
- package/src/theme/ApiExplorer/CodeTabs/{index.js → index.tsx} +48 -25
- package/src/theme/ApiItem/index.tsx +3 -4
- package/src/theme/ApiLogo/index.tsx +1 -1
- package/src/theme/ApiTabs/{index.js → index.tsx} +54 -23
- package/src/theme/DiscriminatorTabs/{index.js → index.tsx} +57 -24
- package/src/theme/MimeTabs/{index.js → index.tsx} +58 -26
- package/src/theme/ParamsItem/{index.js → index.tsx} +28 -13
- package/src/theme/ResponseSamples/{index.js → index.tsx} +10 -1
- package/src/theme/SchemaItem/{index.js → index.tsx} +18 -9
- package/src/theme/SchemaTabs/{index.js → index.tsx} +56 -25
- package/src/theme-classic.d.ts +69 -2
- package/tsconfig.json +4 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { RequestBodyObject } from "docusaurus-plugin-openapi-docs/src/openapi/types";
|
|
3
3
|
export interface Props {
|
|
4
4
|
jsonRequestBodyExample: string;
|
|
@@ -6,5 +6,5 @@ export interface Props {
|
|
|
6
6
|
methods?: any;
|
|
7
7
|
required?: boolean;
|
|
8
8
|
}
|
|
9
|
-
declare function BodyWrap({ requestBodyMetadata, jsonRequestBodyExample, methods, required, }: Props): JSX.Element | null;
|
|
9
|
+
declare function BodyWrap({ requestBodyMetadata, jsonRequestBodyExample, methods, required, }: Props): React.JSX.Element | null;
|
|
10
10
|
export default BodyWrap;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import sdk from "@paloaltonetworks/postman-collection";
|
|
3
3
|
export interface Language {
|
|
4
4
|
highlight: string;
|
|
@@ -16,5 +16,5 @@ export interface Props {
|
|
|
16
16
|
postman: sdk.Request;
|
|
17
17
|
codeSamples: any;
|
|
18
18
|
}
|
|
19
|
-
declare function CodeSnippets({ postman, codeSamples }: Props): JSX.Element | null;
|
|
19
|
+
declare function CodeSnippets({ postman, codeSamples }: Props): React.JSX.Element | null;
|
|
20
20
|
export default CodeSnippets;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type TabProps } from "@docusaurus/theme-common/internal";
|
|
3
|
+
import { Language } from "@theme/ApiExplorer/CodeSnippets";
|
|
4
|
+
export interface Props {
|
|
5
|
+
action: {
|
|
6
|
+
[key: string]: React.Dispatch<any>;
|
|
7
|
+
};
|
|
8
|
+
currentLanguage: Language;
|
|
9
|
+
includeVariant: boolean;
|
|
10
|
+
}
|
|
11
|
+
export default function CodeTabs(props: TabProps & Props): React.JSX.Element;
|
|
@@ -1,20 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/* ============================================================================
|
|
2
3
|
* Copyright (c) Palo Alto Networks
|
|
3
4
|
*
|
|
4
5
|
* This source code is licensed under the MIT license found in the
|
|
5
6
|
* LICENSE file in the root directory of this source tree.
|
|
6
7
|
* ========================================================================== */
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
var __createBinding =
|
|
9
|
+
(this && this.__createBinding) ||
|
|
10
|
+
(Object.create
|
|
11
|
+
? function (o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
+
if (
|
|
15
|
+
!desc ||
|
|
16
|
+
("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
|
|
17
|
+
) {
|
|
18
|
+
desc = {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return m[k];
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
Object.defineProperty(o, k2, desc);
|
|
26
|
+
}
|
|
27
|
+
: function (o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
});
|
|
31
|
+
var __setModuleDefault =
|
|
32
|
+
(this && this.__setModuleDefault) ||
|
|
33
|
+
(Object.create
|
|
34
|
+
? function (o, v) {
|
|
35
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
36
|
+
}
|
|
37
|
+
: function (o, v) {
|
|
38
|
+
o["default"] = v;
|
|
39
|
+
});
|
|
40
|
+
var __importStar =
|
|
41
|
+
(this && this.__importStar) ||
|
|
42
|
+
function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null)
|
|
46
|
+
for (var k in mod)
|
|
47
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
48
|
+
__createBinding(result, mod, k);
|
|
49
|
+
__setModuleDefault(result, mod);
|
|
50
|
+
return result;
|
|
51
|
+
};
|
|
52
|
+
var __importDefault =
|
|
53
|
+
(this && this.__importDefault) ||
|
|
54
|
+
function (mod) {
|
|
55
|
+
return mod && mod.__esModule ? mod : { default: mod };
|
|
56
|
+
};
|
|
57
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
|
+
const react_1 = __importStar(require("react"));
|
|
59
|
+
const internal_1 = require("@docusaurus/theme-common/internal");
|
|
60
|
+
const useIsBrowser_1 = __importDefault(require("@docusaurus/useIsBrowser"));
|
|
61
|
+
const CodeSnippets_1 = require("@theme/ApiExplorer/CodeSnippets");
|
|
62
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
18
63
|
function TabList({
|
|
19
64
|
action,
|
|
20
65
|
currentLanguage,
|
|
@@ -26,29 +71,26 @@ function TabList({
|
|
|
26
71
|
tabValues,
|
|
27
72
|
}) {
|
|
28
73
|
const tabRefs = [];
|
|
29
|
-
const { blockElementScrollPositionUntilNextRender } =
|
|
30
|
-
|
|
31
|
-
|
|
74
|
+
const { blockElementScrollPositionUntilNextRender } = (0,
|
|
75
|
+
internal_1.useScrollPositionBlocker)();
|
|
32
76
|
const handleTabChange = (event) => {
|
|
33
77
|
const newTab = event.currentTarget;
|
|
34
78
|
const newTabIndex = tabRefs.indexOf(newTab);
|
|
35
79
|
const newTabValue = tabValues[newTabIndex].value;
|
|
36
|
-
|
|
37
80
|
if (newTabValue !== selectedValue) {
|
|
38
81
|
blockElementScrollPositionUntilNextRender(newTab);
|
|
39
82
|
selectValue(newTabValue);
|
|
40
83
|
}
|
|
41
|
-
|
|
42
84
|
if (action) {
|
|
43
85
|
let newLanguage;
|
|
44
86
|
if (currentLanguage && includeVariant) {
|
|
45
|
-
newLanguage = languageSet.filter(
|
|
87
|
+
newLanguage = CodeSnippets_1.languageSet.filter(
|
|
46
88
|
(lang) => lang.language === currentLanguage
|
|
47
89
|
)[0];
|
|
48
90
|
newLanguage.variant = newTabValue;
|
|
49
91
|
action.setSelectedVariant(newTabValue.toLowerCase());
|
|
50
92
|
} else {
|
|
51
|
-
newLanguage = languageSet.filter(
|
|
93
|
+
newLanguage = CodeSnippets_1.languageSet.filter(
|
|
52
94
|
(lang) => lang.language === newTabValue
|
|
53
95
|
)[0];
|
|
54
96
|
action.setSelectedVariant(newLanguage.variant.toLowerCase());
|
|
@@ -56,7 +98,6 @@ function TabList({
|
|
|
56
98
|
action.setLanguage(newLanguage);
|
|
57
99
|
}
|
|
58
100
|
};
|
|
59
|
-
|
|
60
101
|
const handleKeydown = (event) => {
|
|
61
102
|
let focusElement = null;
|
|
62
103
|
switch (event.key) {
|
|
@@ -79,96 +120,102 @@ function TabList({
|
|
|
79
120
|
}
|
|
80
121
|
focusElement?.focus();
|
|
81
122
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
role
|
|
86
|
-
aria-orientation
|
|
87
|
-
className
|
|
123
|
+
return react_1.default.createElement(
|
|
124
|
+
"ul",
|
|
125
|
+
{
|
|
126
|
+
role: "tablist",
|
|
127
|
+
"aria-orientation": "horizontal",
|
|
128
|
+
className: (0, clsx_1.default)(
|
|
88
129
|
"tabs",
|
|
89
130
|
"openapi-tabs__code-list-container",
|
|
90
131
|
{
|
|
91
132
|
"tabs--block": block,
|
|
92
133
|
},
|
|
93
134
|
className
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
135
|
+
),
|
|
136
|
+
},
|
|
137
|
+
tabValues.map(({ value, label, attributes }) =>
|
|
138
|
+
react_1.default.createElement(
|
|
139
|
+
"li",
|
|
140
|
+
{
|
|
98
141
|
// TODO extract TabListItem
|
|
99
|
-
role
|
|
100
|
-
tabIndex
|
|
101
|
-
aria-selected
|
|
102
|
-
key
|
|
103
|
-
ref
|
|
104
|
-
onKeyDown
|
|
105
|
-
onClick
|
|
106
|
-
|
|
107
|
-
className
|
|
142
|
+
role: "tab",
|
|
143
|
+
tabIndex: selectedValue === value ? 0 : -1,
|
|
144
|
+
"aria-selected": selectedValue === value,
|
|
145
|
+
key: value,
|
|
146
|
+
ref: (tabControl) => tabRefs.push(tabControl),
|
|
147
|
+
onKeyDown: handleKeydown,
|
|
148
|
+
onClick: handleTabChange,
|
|
149
|
+
...attributes,
|
|
150
|
+
className: (0, clsx_1.default)(
|
|
108
151
|
"tabs__item",
|
|
109
152
|
"openapi-tabs__code-item",
|
|
110
153
|
attributes?.className,
|
|
111
154
|
{
|
|
112
155
|
active: selectedValue === value,
|
|
113
156
|
}
|
|
114
|
-
)
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
</ul>
|
|
157
|
+
),
|
|
158
|
+
},
|
|
159
|
+
react_1.default.createElement("span", null, label ?? value)
|
|
160
|
+
)
|
|
161
|
+
)
|
|
120
162
|
);
|
|
121
163
|
}
|
|
122
|
-
|
|
123
164
|
function TabContent({ lazy, children, selectedValue }) {
|
|
124
|
-
|
|
125
|
-
|
|
165
|
+
const childTabs = (Array.isArray(children) ? children : [children]).filter(
|
|
166
|
+
Boolean
|
|
167
|
+
);
|
|
126
168
|
if (lazy) {
|
|
127
|
-
const selectedTabItem =
|
|
169
|
+
const selectedTabItem = childTabs.find(
|
|
128
170
|
(tabItem) => tabItem.props.value === selectedValue
|
|
129
171
|
);
|
|
130
172
|
if (!selectedTabItem) {
|
|
131
173
|
// fail-safe or fail-fast? not sure what's best here
|
|
132
174
|
return null;
|
|
133
175
|
}
|
|
134
|
-
return cloneElement(selectedTabItem, {
|
|
176
|
+
return (0, react_1.cloneElement)(selectedTabItem, {
|
|
177
|
+
className: "margin-top--md",
|
|
178
|
+
});
|
|
135
179
|
}
|
|
136
|
-
return (
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
)
|
|
144
|
-
|
|
180
|
+
return react_1.default.createElement(
|
|
181
|
+
"div",
|
|
182
|
+
{ className: "margin-top--md openapi-tabs__code-content" },
|
|
183
|
+
childTabs.map((tabItem, i) =>
|
|
184
|
+
(0, react_1.cloneElement)(tabItem, {
|
|
185
|
+
key: i,
|
|
186
|
+
hidden: tabItem.props.value !== selectedValue,
|
|
187
|
+
})
|
|
188
|
+
)
|
|
145
189
|
);
|
|
146
190
|
}
|
|
147
|
-
|
|
148
191
|
function TabsComponent(props) {
|
|
149
|
-
const tabs = useTabs(props);
|
|
192
|
+
const tabs = (0, internal_1.useTabs)(props);
|
|
150
193
|
const { className } = props;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
className
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
194
|
+
return react_1.default.createElement(
|
|
195
|
+
"div",
|
|
196
|
+
{
|
|
197
|
+
className: (0, clsx_1.default)(
|
|
198
|
+
"tabs-container openapi-tabs__code-container",
|
|
199
|
+
className
|
|
200
|
+
),
|
|
201
|
+
},
|
|
202
|
+
react_1.default.createElement(TabList, { ...props, ...tabs }),
|
|
203
|
+
react_1.default.createElement(TabContent, { ...props, ...tabs })
|
|
161
204
|
);
|
|
162
205
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
206
|
+
function CodeTabs(props) {
|
|
207
|
+
const isBrowser = (0, useIsBrowser_1.default)();
|
|
208
|
+
return react_1.default.createElement(
|
|
209
|
+
TabsComponent,
|
|
210
|
+
// Remount tabs after hydration
|
|
211
|
+
// Temporary fix for https://github.com/facebook/docusaurus/issues/5653
|
|
212
|
+
{
|
|
168
213
|
// Remount tabs after hydration
|
|
169
214
|
// Temporary fix for https://github.com/facebook/docusaurus/issues/5653
|
|
170
|
-
key
|
|
171
|
-
|
|
172
|
-
|
|
215
|
+
key: String(isBrowser),
|
|
216
|
+
...props,
|
|
217
|
+
},
|
|
218
|
+
(0, internal_1.sanitizeTabsChildren)(props.children)
|
|
173
219
|
);
|
|
174
220
|
}
|
|
221
|
+
exports.default = CodeTabs;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare function ContentType(): JSX.Element | null;
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare function ContentType(): React.JSX.Element | null;
|
|
3
3
|
export default ContentType;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare function Export({ url, proxy }: any): JSX.Element;
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare function Export({ url, proxy }: any): React.JSX.Element;
|
|
3
3
|
export default Export;
|
|
@@ -4,5 +4,5 @@ export interface Props {
|
|
|
4
4
|
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
}
|
|
7
|
-
declare function FloatingButton({ label, onClick, children }: Props): JSX.Element;
|
|
7
|
+
declare function FloatingButton({ label, onClick, children }: Props): React.JSX.Element;
|
|
8
8
|
export default FloatingButton;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
export interface Props {
|
|
3
3
|
placeholder: string;
|
|
4
4
|
onChange?(file?: File): any;
|
|
5
5
|
}
|
|
6
|
-
declare function FormFileUpload({ placeholder, onChange }: Props): JSX.Element;
|
|
6
|
+
declare function FormFileUpload({ placeholder, onChange }: Props): React.JSX.Element;
|
|
7
7
|
export default FormFileUpload;
|
|
@@ -6,5 +6,5 @@ export interface Props {
|
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
declare function FormItem({ label, type, required, children, className }: Props): JSX.Element;
|
|
9
|
+
declare function FormItem({ label, type, required, children, className }: Props): React.JSX.Element;
|
|
10
10
|
export default FormItem;
|
|
@@ -5,5 +5,5 @@ export interface Props {
|
|
|
5
5
|
onChange?: React.ChangeEventHandler<HTMLSelectElement>;
|
|
6
6
|
showErrors?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare function FormMultiSelect({ value, options, onChange, showErrors }: Props): JSX.Element | null;
|
|
8
|
+
declare function FormMultiSelect({ value, options, onChange, showErrors }: Props): React.JSX.Element | null;
|
|
9
9
|
export default FormMultiSelect;
|
|
@@ -4,5 +4,5 @@ export interface Props {
|
|
|
4
4
|
options?: string[];
|
|
5
5
|
onChange?: React.ChangeEventHandler<HTMLSelectElement>;
|
|
6
6
|
}
|
|
7
|
-
declare function FormSelect({ value, options, onChange }: Props): JSX.Element | null;
|
|
7
|
+
declare function FormSelect({ value, options, onChange }: Props): React.JSX.Element | null;
|
|
8
8
|
export default FormSelect;
|
|
@@ -5,5 +5,5 @@ export interface Props {
|
|
|
5
5
|
password?: boolean;
|
|
6
6
|
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
7
7
|
}
|
|
8
|
-
declare function FormTextInput({ isRequired, value, placeholder, password, onChange, paramName, }: Props): JSX.Element;
|
|
8
|
+
declare function FormTextInput({ isRequired, value, placeholder, password, onChange, paramName, }: Props): React.JSX.Element;
|
|
9
9
|
export default FormTextInput;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
export interface Props {
|
|
3
3
|
method: string;
|
|
4
4
|
path: string;
|
|
5
5
|
}
|
|
6
|
-
declare function MethodEndpoint({ method, path }: Props): JSX.Element;
|
|
6
|
+
declare function MethodEndpoint({ method, path }: Props): React.JSX.Element;
|
|
7
7
|
export default MethodEndpoint;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Param } from "@theme/ApiExplorer/ParamOptions/slice";
|
|
3
3
|
export interface ParamProps {
|
|
4
4
|
param: Param;
|
|
5
5
|
}
|
|
6
|
-
export default function ParamArrayFormItem({ param }: ParamProps): JSX.Element;
|
|
6
|
+
export default function ParamArrayFormItem({ param }: ParamProps): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Param } from "@theme/ApiExplorer/ParamOptions/slice";
|
|
3
3
|
export interface ParamProps {
|
|
4
4
|
param: Param;
|
|
5
5
|
}
|
|
6
|
-
export default function ParamBooleanFormItem({ param }: ParamProps): JSX.Element;
|
|
6
|
+
export default function ParamBooleanFormItem({ param }: ParamProps): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Param } from "@theme/ApiExplorer/ParamOptions/slice";
|
|
3
3
|
export interface ParamProps {
|
|
4
4
|
param: Param;
|
|
5
5
|
}
|
|
6
|
-
export default function ParamMultiSelectFormItem({ param }: ParamProps): JSX.Element;
|
|
6
|
+
export default function ParamMultiSelectFormItem({ param }: ParamProps): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Param } from "@theme/ApiExplorer/ParamOptions/slice";
|
|
3
3
|
export interface ParamProps {
|
|
4
4
|
param: Param;
|
|
5
5
|
}
|
|
6
|
-
export default function ParamSelectFormItem({ param }: ParamProps): JSX.Element;
|
|
6
|
+
export default function ParamSelectFormItem({ param }: ParamProps): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Param } from "@theme/ApiExplorer/ParamOptions/slice";
|
|
3
3
|
export interface ParamProps {
|
|
4
4
|
param: Param;
|
|
5
5
|
}
|
|
6
|
-
export default function ParamTextFormItem({ param }: ParamProps): JSX.Element;
|
|
6
|
+
export default function ParamTextFormItem({ param }: ParamProps): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { Param } from "./slice";
|
|
3
3
|
export interface ParamProps {
|
|
4
4
|
param: Param;
|
|
5
5
|
}
|
|
6
|
-
declare function ParamOptions(): JSX.Element;
|
|
6
|
+
declare function ParamOptions(): React.JSX.Element;
|
|
7
7
|
export default ParamOptions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
|
|
3
3
|
declare function Request({ item }: {
|
|
4
4
|
item: NonNullable<ApiItem>;
|
|
5
|
-
}): JSX.Element | null;
|
|
5
|
+
}): React.JSX.Element | null;
|
|
6
6
|
export default Request;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
|
|
3
3
|
declare function Response({ item }: {
|
|
4
4
|
item: NonNullable<ApiItem>;
|
|
5
|
-
}): JSX.Element | null;
|
|
5
|
+
}): React.JSX.Element | null;
|
|
6
6
|
export default Response;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare function SecuritySchemes(props: any): JSX.Element | null;
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare function SecuritySchemes(props: any): React.JSX.Element | null;
|
|
3
3
|
export default SecuritySchemes;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare function Server(): JSX.Element | null;
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare function Server(): React.JSX.Element | null;
|
|
3
3
|
export default Server;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
|
|
3
3
|
declare function ApiExplorer({ item, infoPath, }: {
|
|
4
4
|
item: NonNullable<ApiItem>;
|
|
5
5
|
infoPath: string;
|
|
6
|
-
}): JSX.Element;
|
|
6
|
+
}): React.JSX.Element;
|
|
7
7
|
export default ApiExplorer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="@docusaurus/plugin-content-docs" />
|
|
2
|
-
|
|
2
|
+
import React from "react";
|
|
3
3
|
import type { Props } from "@theme/DocItem";
|
|
4
|
-
export default function ApiItem(props: Props): JSX.Element;
|
|
4
|
+
export default function ApiItem(props: Props): React.JSX.Element;
|
|
@@ -18,6 +18,7 @@ const ExecutionEnvironment_1 = __importDefault(
|
|
|
18
18
|
require("@docusaurus/ExecutionEnvironment")
|
|
19
19
|
);
|
|
20
20
|
const theme_common_1 = require("@docusaurus/theme-common");
|
|
21
|
+
const internal_1 = require("@docusaurus/theme-common/internal");
|
|
21
22
|
const useDocusaurusContext_1 = __importDefault(
|
|
22
23
|
require("@docusaurus/useDocusaurusContext")
|
|
23
24
|
);
|
|
@@ -29,11 +30,11 @@ const Metadata_1 = __importDefault(require("@theme/DocItem/Metadata"));
|
|
|
29
30
|
const clsx_1 = __importDefault(require("clsx"));
|
|
30
31
|
const react_redux_1 = require("react-redux");
|
|
31
32
|
const store_1 = require("./store");
|
|
32
|
-
const { DocProvider } = require("@docusaurus/theme-common/internal");
|
|
33
33
|
let ApiExplorer = (_) => react_1.default.createElement("div", null);
|
|
34
34
|
if (ExecutionEnvironment_1.default.canUseDOM) {
|
|
35
35
|
ApiExplorer = require("@theme/ApiExplorer").default;
|
|
36
36
|
}
|
|
37
|
+
// @ts-ignore
|
|
37
38
|
function ApiItem(props) {
|
|
38
39
|
const docHtmlClassName = `docs-doc-id-${props.content.metadata.id}`;
|
|
39
40
|
const MDXComponent = props.content;
|
|
@@ -118,7 +119,7 @@ function ApiItem(props) {
|
|
|
118
119
|
}
|
|
119
120
|
if (api) {
|
|
120
121
|
return react_1.default.createElement(
|
|
121
|
-
DocProvider,
|
|
122
|
+
internal_1.DocProvider,
|
|
122
123
|
{ content: props.content },
|
|
123
124
|
react_1.default.createElement(
|
|
124
125
|
theme_common_1.HtmlClassNameProvider,
|
|
@@ -166,7 +167,7 @@ function ApiItem(props) {
|
|
|
166
167
|
}
|
|
167
168
|
// Non-API docs
|
|
168
169
|
return react_1.default.createElement(
|
|
169
|
-
DocProvider,
|
|
170
|
+
internal_1.DocProvider,
|
|
170
171
|
{ content: props.content },
|
|
171
172
|
react_1.default.createElement(
|
|
172
173
|
theme_common_1.HtmlClassNameProvider,
|
|
@@ -8,7 +8,7 @@ declare const rootReducer: import("redux").Reducer<import("redux").CombinedState
|
|
|
8
8
|
auth: unknown;
|
|
9
9
|
}>, import("redux").Action<any>>;
|
|
10
10
|
export type RootState = ReturnType<typeof rootReducer>;
|
|
11
|
-
export declare const createStoreWithState: (preloadedState: RootState, middlewares: any[]) => import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<import("redux").
|
|
11
|
+
export declare const createStoreWithState: (preloadedState: RootState, middlewares: any[]) => import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<import("redux").EmptyObject & {
|
|
12
12
|
accept: unknown;
|
|
13
13
|
contentType: unknown;
|
|
14
14
|
response: unknown;
|
|
@@ -16,7 +16,7 @@ export declare const createStoreWithState: (preloadedState: RootState, middlewar
|
|
|
16
16
|
body: unknown;
|
|
17
17
|
params: unknown;
|
|
18
18
|
auth: unknown;
|
|
19
|
-
}
|
|
19
|
+
}, import("redux").Action<any>, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<import("redux").CombinedState<{
|
|
20
20
|
accept: unknown;
|
|
21
21
|
contentType: unknown;
|
|
22
22
|
response: unknown;
|
|
@@ -25,7 +25,7 @@ export declare const createStoreWithState: (preloadedState: RootState, middlewar
|
|
|
25
25
|
params: unknown;
|
|
26
26
|
auth: unknown;
|
|
27
27
|
}>, import("redux").AnyAction, undefined>, ...any[]]>>;
|
|
28
|
-
export declare const createStoreWithoutState: (preloadedState: {}, middlewares: any[]) => import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<import("redux").
|
|
28
|
+
export declare const createStoreWithoutState: (preloadedState: {}, middlewares: any[]) => import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<import("redux").EmptyObject & {
|
|
29
29
|
accept: unknown;
|
|
30
30
|
contentType: unknown;
|
|
31
31
|
response: unknown;
|
|
@@ -33,7 +33,7 @@ export declare const createStoreWithoutState: (preloadedState: {}, middlewares:
|
|
|
33
33
|
body: unknown;
|
|
34
34
|
params: unknown;
|
|
35
35
|
auth: unknown;
|
|
36
|
-
}
|
|
36
|
+
}, import("redux").Action<any>, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<import("redux").CombinedState<{
|
|
37
37
|
accept: unknown;
|
|
38
38
|
contentType: unknown;
|
|
39
39
|
response: unknown;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export default function ApiLogo(props: any): JSX.Element | undefined;
|
|
1
|
+
import React from "react";
|
|
2
|
+
export default function ApiLogo(props: any): React.JSX.Element | undefined;
|