docusaurus-theme-openapi-docs 0.0.0-1294 → 0.0.0-1310
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/schema.js +4 -5
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.js +4 -2
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.js +9 -6
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.d.ts +1 -1
- package/lib/theme/ApiExplorer/ApiCodeBlock/index.d.ts +1 -1
- package/lib/theme/ApiExplorer/Authorization/index.js +9 -10
- package/lib/theme/ApiExplorer/Body/index.js +4 -5
- package/lib/theme/ApiExplorer/CodeTabs/index.d.ts +1 -1
- package/lib/theme/ApiExplorer/CodeTabs/index.js +6 -5
- package/lib/theme/ApiExplorer/Export/index.js +9 -2
- package/lib/theme/ApiExplorer/FormFileUpload/index.js +1 -2
- package/lib/theme/ApiExplorer/FormLabel/index.js +1 -2
- package/lib/theme/ApiExplorer/FormTextInput/index.js +1 -2
- package/lib/theme/ApiExplorer/LiveEditor/index.js +1 -2
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.js +5 -3
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.js +1 -2
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.js +1 -2
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.js +1 -2
- package/lib/theme/ApiExplorer/ParamOptions/index.js +2 -3
- package/lib/theme/ApiExplorer/Request/index.js +17 -18
- package/lib/theme/ApiExplorer/Response/index.js +7 -11
- package/lib/theme/ApiExplorer/SecuritySchemes/index.js +57 -50
- package/lib/theme/ApiExplorer/Server/index.js +2 -3
- package/lib/theme/ApiTabs/index.d.ts +1 -1
- package/lib/theme/ApiTabs/index.js +7 -7
- package/lib/theme/DiscriminatorTabs/index.d.ts +1 -1
- package/lib/theme/DiscriminatorTabs/index.js +6 -5
- package/lib/theme/Example/index.js +3 -4
- package/lib/theme/MimeTabs/index.d.ts +1 -1
- package/lib/theme/MimeTabs/index.js +6 -5
- package/lib/theme/OperationTabs/index.d.ts +1 -1
- package/lib/theme/OperationTabs/index.js +6 -5
- package/lib/theme/ParamsDetails/index.js +1 -2
- package/lib/theme/ParamsItem/index.js +7 -8
- package/lib/theme/RequestSchema/index.js +4 -6
- package/lib/theme/ResponseExamples/index.js +3 -4
- package/lib/theme/ResponseSchema/index.js +2 -3
- package/lib/theme/Schema/index.js +8 -9
- package/lib/theme/SchemaExpansion/index.js +4 -5
- package/lib/theme/SchemaItem/index.js +9 -10
- package/lib/theme/SchemaTabs/index.d.ts +1 -1
- package/lib/theme/SchemaTabs/index.js +6 -5
- package/lib/theme/StatusCodes/index.js +2 -4
- package/lib/theme/TabItem/index.d.ts +5 -0
- package/lib/theme/TabItem/index.js +51 -0
- package/lib/theme/TabItem/styles.module.css +3 -0
- package/lib/theme/Tabs/index.d.ts +5 -0
- package/lib/theme/Tabs/index.js +148 -0
- package/lib/theme/Tabs/styles.module.css +7 -0
- package/lib/theme/translationIds.d.ts +1 -99
- package/lib/theme/translationIds.js +0 -116
- package/lib/theme/utils/codeBlockUtils.d.ts +28 -0
- package/lib/theme/utils/codeBlockUtils.js +223 -0
- package/lib/theme/utils/reactUtils.d.ts +1 -0
- package/lib/theme/utils/reactUtils.js +23 -0
- package/lib/theme/utils/scrollUtils.d.ts +7 -0
- package/lib/theme/utils/scrollUtils.js +175 -0
- package/lib/theme/utils/tabsUtils.d.ts +47 -0
- package/lib/theme/utils/tabsUtils.js +299 -0
- package/lib/theme/utils/useCodeWordWrap.d.ts +8 -0
- package/lib/theme/utils/useCodeWordWrap.js +84 -0
- package/lib/theme/utils/useMutationObserver.d.ts +3 -0
- package/lib/theme/utils/useMutationObserver.js +34 -0
- package/package.json +4 -4
- package/src/markdown/schema.ts +4 -5
- package/src/theme/ApiExplorer/ApiCodeBlock/Container/index.tsx +2 -1
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/String.tsx +8 -7
- package/src/theme/ApiExplorer/ApiCodeBlock/Line/index.tsx +1 -1
- package/src/theme/ApiExplorer/ApiCodeBlock/index.tsx +1 -1
- package/src/theme/ApiExplorer/Authorization/index.tsx +9 -10
- package/src/theme/ApiExplorer/Body/index.tsx +7 -5
- package/src/theme/ApiExplorer/CodeTabs/index.tsx +5 -5
- package/src/theme/ApiExplorer/Export/index.tsx +6 -2
- package/src/theme/ApiExplorer/FormFileUpload/index.tsx +1 -2
- package/src/theme/ApiExplorer/FormLabel/index.tsx +1 -2
- package/src/theme/ApiExplorer/FormTextInput/index.tsx +1 -2
- package/src/theme/ApiExplorer/LiveEditor/index.tsx +1 -2
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +5 -3
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx +1 -2
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx +1 -2
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx +1 -2
- package/src/theme/ApiExplorer/ParamOptions/index.tsx +2 -3
- package/src/theme/ApiExplorer/Request/index.tsx +23 -18
- package/src/theme/ApiExplorer/Response/index.tsx +10 -8
- package/src/theme/ApiExplorer/SecuritySchemes/index.tsx +60 -52
- package/src/theme/ApiExplorer/Server/index.tsx +8 -3
- package/src/theme/ApiTabs/index.tsx +8 -8
- package/src/theme/DiscriminatorTabs/index.tsx +6 -5
- package/src/theme/Example/index.tsx +3 -4
- package/src/theme/MimeTabs/index.tsx +9 -8
- package/src/theme/OperationTabs/index.tsx +5 -4
- package/src/theme/ParamsDetails/index.tsx +1 -2
- package/src/theme/ParamsItem/index.tsx +13 -8
- package/src/theme/RequestSchema/index.tsx +4 -5
- package/src/theme/ResponseExamples/index.tsx +3 -4
- package/src/theme/ResponseSchema/index.tsx +2 -3
- package/src/theme/Schema/index.tsx +8 -9
- package/src/theme/SchemaExpansion/index.tsx +4 -5
- package/src/theme/SchemaItem/index.tsx +18 -10
- package/src/theme/SchemaTabs/index.tsx +6 -5
- package/src/theme/StatusCodes/index.tsx +2 -3
- package/src/theme/TabItem/index.tsx +61 -0
- package/src/theme/TabItem/styles.module.css +3 -0
- package/src/theme/Tabs/index.tsx +164 -0
- package/src/theme/Tabs/styles.module.css +7 -0
- package/src/theme/translationIds.ts +37 -113
- package/src/theme/utils/codeBlockUtils.ts +296 -0
- package/src/theme/utils/reactUtils.ts +22 -0
- package/src/theme/utils/scrollUtils.tsx +153 -0
- package/src/theme/utils/tabsUtils.tsx +329 -0
- package/src/theme/utils/useCodeWordWrap.ts +110 -0
- package/src/theme/utils/useMutationObserver.ts +43 -0
- package/src/theme-classic.d.ts +0 -96
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -80,7 +80,6 @@ const ApiCodeBlock_1 = __importDefault(
|
|
|
80
80
|
const hooks_1 = require("@theme/ApiItem/hooks");
|
|
81
81
|
const SchemaTabs_1 = __importDefault(require("@theme/SchemaTabs"));
|
|
82
82
|
const TabItem_1 = __importDefault(require("@theme/TabItem"));
|
|
83
|
-
const translationIds_1 = require("@theme/translationIds");
|
|
84
83
|
const clsx_1 = __importDefault(require("clsx"));
|
|
85
84
|
const slice_1 = require("./slice");
|
|
86
85
|
// Pretty-print a JSON string by re-indenting structural tokens only.
|
|
@@ -193,7 +192,7 @@ function Response({ item }) {
|
|
|
193
192
|
"span",
|
|
194
193
|
{ className: "openapi-explorer__response-title" },
|
|
195
194
|
(0, Translate_1.translate)({
|
|
196
|
-
id:
|
|
195
|
+
id: "theme.openapi.response.title",
|
|
197
196
|
message: "Response",
|
|
198
197
|
})
|
|
199
198
|
),
|
|
@@ -209,7 +208,7 @@ function Response({ item }) {
|
|
|
209
208
|
},
|
|
210
209
|
},
|
|
211
210
|
(0, Translate_1.translate)({
|
|
212
|
-
id:
|
|
211
|
+
id: "theme.openapi.response.clear",
|
|
213
212
|
message: "Clear",
|
|
214
213
|
})
|
|
215
214
|
)
|
|
@@ -263,17 +262,14 @@ function Response({ item }) {
|
|
|
263
262
|
react_1.default.createElement(
|
|
264
263
|
Translate_1.default,
|
|
265
264
|
{
|
|
266
|
-
id:
|
|
265
|
+
id: "theme.openapi.response.placeholder",
|
|
267
266
|
values: {
|
|
268
267
|
code: react_1.default.createElement(
|
|
269
268
|
"code",
|
|
270
269
|
null,
|
|
271
270
|
react_1.default.createElement(
|
|
272
271
|
Translate_1.default,
|
|
273
|
-
{
|
|
274
|
-
id: translationIds_1.OPENAPI_REQUEST
|
|
275
|
-
.SEND_BUTTON,
|
|
276
|
-
},
|
|
272
|
+
{ id: "theme.openapi.request.sendButton" },
|
|
277
273
|
"Send API Request"
|
|
278
274
|
)
|
|
279
275
|
),
|
|
@@ -288,7 +284,7 @@ function Response({ item }) {
|
|
|
288
284
|
TabItem_1.default,
|
|
289
285
|
{
|
|
290
286
|
label: (0, Translate_1.translate)({
|
|
291
|
-
id:
|
|
287
|
+
id: "theme.openapi.response.headersTab",
|
|
292
288
|
message: "Headers",
|
|
293
289
|
}),
|
|
294
290
|
value: "headers",
|
|
@@ -323,14 +319,14 @@ function Response({ item }) {
|
|
|
323
319
|
react_1.default.createElement(
|
|
324
320
|
Translate_1.default,
|
|
325
321
|
{
|
|
326
|
-
id:
|
|
322
|
+
id: "theme.openapi.response.placeholder",
|
|
327
323
|
values: {
|
|
328
324
|
code: react_1.default.createElement(
|
|
329
325
|
"code",
|
|
330
326
|
null,
|
|
331
327
|
react_1.default.createElement(
|
|
332
328
|
Translate_1.default,
|
|
333
|
-
{ id:
|
|
329
|
+
{ id: "theme.openapi.request.sendButton" },
|
|
334
330
|
"Send API Request"
|
|
335
331
|
)
|
|
336
332
|
),
|
|
@@ -15,7 +15,6 @@ const react_1 = __importDefault(require("react"));
|
|
|
15
15
|
const Link_1 = __importDefault(require("@docusaurus/Link"));
|
|
16
16
|
const Translate_1 = require("@docusaurus/Translate");
|
|
17
17
|
const hooks_1 = require("@theme/ApiItem/hooks");
|
|
18
|
-
const translationIds_1 = require("@theme/translationIds");
|
|
19
18
|
function SecuritySchemes(props) {
|
|
20
19
|
const options = (0, hooks_1.useTypedSelector)((state) => state.auth.options);
|
|
21
20
|
const selected = (0, hooks_1.useTypedSelector)(
|
|
@@ -27,42 +26,46 @@ function SecuritySchemes(props) {
|
|
|
27
26
|
return null;
|
|
28
27
|
}
|
|
29
28
|
const selectedAuth = options[selected];
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
29
|
+
// Each label uses a static `translate()` call (literal id + message) so that
|
|
30
|
+
// `docusaurus write-translations` can statically extract it. A dynamic
|
|
31
|
+
// `translate({ id: someVar })` would be skipped by the extractor.
|
|
32
|
+
const renderRestLabel = (k) => {
|
|
33
|
+
switch (k) {
|
|
34
|
+
case "description":
|
|
35
|
+
return (0, Translate_1.translate)({
|
|
36
|
+
id: "theme.openapi.securitySchemes.description",
|
|
37
|
+
message: "description:",
|
|
38
|
+
});
|
|
39
|
+
case "scheme":
|
|
40
|
+
return (0, Translate_1.translate)({
|
|
41
|
+
id: "theme.openapi.securitySchemes.scheme",
|
|
42
|
+
message: "scheme:",
|
|
43
|
+
});
|
|
44
|
+
case "bearerFormat":
|
|
45
|
+
return (0, Translate_1.translate)({
|
|
46
|
+
id: "theme.openapi.securitySchemes.bearerFormat",
|
|
47
|
+
message: "bearerFormat:",
|
|
48
|
+
});
|
|
49
|
+
case "openIdConnectUrl":
|
|
50
|
+
return (0, Translate_1.translate)({
|
|
51
|
+
id: "theme.openapi.securitySchemes.openIdConnectUrl",
|
|
52
|
+
message: "openIdConnectUrl:",
|
|
53
|
+
});
|
|
54
|
+
default:
|
|
55
|
+
return `${k}:`;
|
|
56
|
+
}
|
|
47
57
|
};
|
|
48
58
|
const renderRest = (rest) =>
|
|
49
|
-
Object.keys(rest).map((k) =>
|
|
50
|
-
|
|
51
|
-
const label = translation
|
|
52
|
-
? (0, Translate_1.translate)({
|
|
53
|
-
id: translation.id,
|
|
54
|
-
message: translation.message,
|
|
55
|
-
})
|
|
56
|
-
: `${k}:`;
|
|
57
|
-
return react_1.default.createElement(
|
|
59
|
+
Object.keys(rest).map((k) =>
|
|
60
|
+
react_1.default.createElement(
|
|
58
61
|
"span",
|
|
59
62
|
{ key: k },
|
|
60
|
-
react_1.default.createElement("strong", null,
|
|
63
|
+
react_1.default.createElement("strong", null, renderRestLabel(k), " "),
|
|
61
64
|
typeof rest[k] === "object"
|
|
62
65
|
? JSON.stringify(rest[k], null, 2)
|
|
63
66
|
: String(rest[k])
|
|
64
|
-
)
|
|
65
|
-
|
|
67
|
+
)
|
|
68
|
+
);
|
|
66
69
|
return react_1.default.createElement(
|
|
67
70
|
"details",
|
|
68
71
|
{ className: "openapi-security__details", open: false },
|
|
@@ -72,7 +75,11 @@ function SecuritySchemes(props) {
|
|
|
72
75
|
react_1.default.createElement(
|
|
73
76
|
"h4",
|
|
74
77
|
{ className: "openapi-security__summary-header" },
|
|
75
|
-
|
|
78
|
+
(0, Translate_1.translate)({
|
|
79
|
+
id: "theme.openapi.securitySchemes.authorization",
|
|
80
|
+
message: "Authorization:",
|
|
81
|
+
}),
|
|
82
|
+
" ",
|
|
76
83
|
selectedAuth[0].name ?? selectedAuth[0].type
|
|
77
84
|
)
|
|
78
85
|
),
|
|
@@ -103,7 +110,7 @@ function SecuritySchemes(props) {
|
|
|
103
110
|
"strong",
|
|
104
111
|
null,
|
|
105
112
|
(0, Translate_1.translate)({
|
|
106
|
-
id:
|
|
113
|
+
id: "theme.openapi.securitySchemes.name",
|
|
107
114
|
message: "name:",
|
|
108
115
|
})
|
|
109
116
|
),
|
|
@@ -121,7 +128,7 @@ function SecuritySchemes(props) {
|
|
|
121
128
|
"strong",
|
|
122
129
|
null,
|
|
123
130
|
(0, Translate_1.translate)({
|
|
124
|
-
id:
|
|
131
|
+
id: "theme.openapi.securitySchemes.type",
|
|
125
132
|
message: "type:",
|
|
126
133
|
})
|
|
127
134
|
),
|
|
@@ -137,7 +144,7 @@ function SecuritySchemes(props) {
|
|
|
137
144
|
"strong",
|
|
138
145
|
null,
|
|
139
146
|
(0, Translate_1.translate)({
|
|
140
|
-
id:
|
|
147
|
+
id: "theme.openapi.securitySchemes.scopes",
|
|
141
148
|
message: "scopes:",
|
|
142
149
|
})
|
|
143
150
|
),
|
|
@@ -173,7 +180,7 @@ function SecuritySchemes(props) {
|
|
|
173
180
|
"strong",
|
|
174
181
|
null,
|
|
175
182
|
(0, Translate_1.translate)({
|
|
176
|
-
id:
|
|
183
|
+
id: "theme.openapi.securitySchemes.name",
|
|
177
184
|
message: "name:",
|
|
178
185
|
})
|
|
179
186
|
),
|
|
@@ -191,7 +198,7 @@ function SecuritySchemes(props) {
|
|
|
191
198
|
"strong",
|
|
192
199
|
null,
|
|
193
200
|
(0, Translate_1.translate)({
|
|
194
|
-
id:
|
|
201
|
+
id: "theme.openapi.securitySchemes.type",
|
|
195
202
|
message: "type:",
|
|
196
203
|
})
|
|
197
204
|
),
|
|
@@ -207,7 +214,7 @@ function SecuritySchemes(props) {
|
|
|
207
214
|
"strong",
|
|
208
215
|
null,
|
|
209
216
|
(0, Translate_1.translate)({
|
|
210
|
-
id:
|
|
217
|
+
id: "theme.openapi.securitySchemes.scopes",
|
|
211
218
|
message: "scopes:",
|
|
212
219
|
})
|
|
213
220
|
),
|
|
@@ -241,7 +248,7 @@ function SecuritySchemes(props) {
|
|
|
241
248
|
"strong",
|
|
242
249
|
null,
|
|
243
250
|
(0, Translate_1.translate)({
|
|
244
|
-
id:
|
|
251
|
+
id: "theme.openapi.securitySchemes.name",
|
|
245
252
|
message: "name:",
|
|
246
253
|
})
|
|
247
254
|
),
|
|
@@ -259,7 +266,7 @@ function SecuritySchemes(props) {
|
|
|
259
266
|
"strong",
|
|
260
267
|
null,
|
|
261
268
|
(0, Translate_1.translate)({
|
|
262
|
-
id:
|
|
269
|
+
id: "theme.openapi.securitySchemes.type",
|
|
263
270
|
message: "type:",
|
|
264
271
|
})
|
|
265
272
|
),
|
|
@@ -273,7 +280,7 @@ function SecuritySchemes(props) {
|
|
|
273
280
|
"strong",
|
|
274
281
|
null,
|
|
275
282
|
(0, Translate_1.translate)({
|
|
276
|
-
id:
|
|
283
|
+
id: "theme.openapi.securitySchemes.in",
|
|
277
284
|
message: "in:",
|
|
278
285
|
})
|
|
279
286
|
),
|
|
@@ -304,7 +311,7 @@ function SecuritySchemes(props) {
|
|
|
304
311
|
"strong",
|
|
305
312
|
null,
|
|
306
313
|
(0, Translate_1.translate)({
|
|
307
|
-
id:
|
|
314
|
+
id: "theme.openapi.securitySchemes.name",
|
|
308
315
|
message: "name:",
|
|
309
316
|
})
|
|
310
317
|
),
|
|
@@ -322,7 +329,7 @@ function SecuritySchemes(props) {
|
|
|
322
329
|
"strong",
|
|
323
330
|
null,
|
|
324
331
|
(0, Translate_1.translate)({
|
|
325
|
-
id:
|
|
332
|
+
id: "theme.openapi.securitySchemes.type",
|
|
326
333
|
message: "type:",
|
|
327
334
|
})
|
|
328
335
|
),
|
|
@@ -338,7 +345,7 @@ function SecuritySchemes(props) {
|
|
|
338
345
|
"strong",
|
|
339
346
|
null,
|
|
340
347
|
(0, Translate_1.translate)({
|
|
341
|
-
id:
|
|
348
|
+
id: "theme.openapi.securitySchemes.scopes",
|
|
342
349
|
message: "scopes:",
|
|
343
350
|
})
|
|
344
351
|
),
|
|
@@ -374,7 +381,7 @@ function SecuritySchemes(props) {
|
|
|
374
381
|
"strong",
|
|
375
382
|
null,
|
|
376
383
|
(0, Translate_1.translate)({
|
|
377
|
-
id:
|
|
384
|
+
id: "theme.openapi.securitySchemes.name",
|
|
378
385
|
message: "name:",
|
|
379
386
|
})
|
|
380
387
|
),
|
|
@@ -392,7 +399,7 @@ function SecuritySchemes(props) {
|
|
|
392
399
|
"strong",
|
|
393
400
|
null,
|
|
394
401
|
(0, Translate_1.translate)({
|
|
395
|
-
id:
|
|
402
|
+
id: "theme.openapi.securitySchemes.type",
|
|
396
403
|
message: "type:",
|
|
397
404
|
})
|
|
398
405
|
),
|
|
@@ -408,7 +415,7 @@ function SecuritySchemes(props) {
|
|
|
408
415
|
"strong",
|
|
409
416
|
null,
|
|
410
417
|
(0, Translate_1.translate)({
|
|
411
|
-
id:
|
|
418
|
+
id: "theme.openapi.securitySchemes.scopes",
|
|
412
419
|
message: "scopes:",
|
|
413
420
|
})
|
|
414
421
|
),
|
|
@@ -431,7 +438,7 @@ function SecuritySchemes(props) {
|
|
|
431
438
|
"strong",
|
|
432
439
|
null,
|
|
433
440
|
(0, Translate_1.translate)({
|
|
434
|
-
id:
|
|
441
|
+
id: "theme.openapi.securitySchemes.flows",
|
|
435
442
|
message: "flows:",
|
|
436
443
|
})
|
|
437
444
|
),
|
|
@@ -463,7 +470,7 @@ function SecuritySchemes(props) {
|
|
|
463
470
|
"strong",
|
|
464
471
|
null,
|
|
465
472
|
(0, Translate_1.translate)({
|
|
466
|
-
id:
|
|
473
|
+
id: "theme.openapi.securitySchemes.name",
|
|
467
474
|
message: "name:",
|
|
468
475
|
})
|
|
469
476
|
),
|
|
@@ -481,7 +488,7 @@ function SecuritySchemes(props) {
|
|
|
481
488
|
"strong",
|
|
482
489
|
null,
|
|
483
490
|
(0, Translate_1.translate)({
|
|
484
|
-
id:
|
|
491
|
+
id: "theme.openapi.securitySchemes.type",
|
|
485
492
|
message: "type:",
|
|
486
493
|
})
|
|
487
494
|
),
|
|
@@ -497,7 +504,7 @@ function SecuritySchemes(props) {
|
|
|
497
504
|
"strong",
|
|
498
505
|
null,
|
|
499
506
|
(0, Translate_1.translate)({
|
|
500
|
-
id:
|
|
507
|
+
id: "theme.openapi.securitySchemes.scopes",
|
|
501
508
|
message: "scopes:",
|
|
502
509
|
})
|
|
503
510
|
),
|
|
@@ -78,7 +78,6 @@ const FormTextInput_1 = __importDefault(
|
|
|
78
78
|
require("@theme/ApiExplorer/FormTextInput")
|
|
79
79
|
);
|
|
80
80
|
const hooks_1 = require("@theme/ApiItem/hooks");
|
|
81
|
-
const translationIds_1 = require("@theme/translationIds");
|
|
82
81
|
const slice_1 = require("./slice");
|
|
83
82
|
function Server({ labelId }) {
|
|
84
83
|
const [isEditing, setIsEditing] = (0, react_1.useState)(false);
|
|
@@ -123,7 +122,7 @@ function Server({ labelId }) {
|
|
|
123
122
|
{
|
|
124
123
|
onClick: () => setIsEditing(true),
|
|
125
124
|
label: (0, Translate_1.translate)({
|
|
126
|
-
id:
|
|
125
|
+
id: "theme.openapi.server.editButton",
|
|
127
126
|
message: "Edit",
|
|
128
127
|
}),
|
|
129
128
|
},
|
|
@@ -146,7 +145,7 @@ function Server({ labelId }) {
|
|
|
146
145
|
{
|
|
147
146
|
onClick: () => setIsEditing(false),
|
|
148
147
|
label: (0, Translate_1.translate)({
|
|
149
|
-
id:
|
|
148
|
+
id: "theme.openapi.server.hideButton",
|
|
150
149
|
message: "Hide",
|
|
151
150
|
}),
|
|
152
151
|
},
|
|
@@ -69,12 +69,12 @@ var __importDefault =
|
|
|
69
69
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70
70
|
exports.default = ApiTabs;
|
|
71
71
|
const react_1 = __importStar(require("react"));
|
|
72
|
-
const internal_1 = require("@docusaurus/theme-common/internal");
|
|
73
72
|
const Translate_1 = require("@docusaurus/Translate");
|
|
74
73
|
const useIsBrowser_1 = __importDefault(require("@docusaurus/useIsBrowser"));
|
|
75
74
|
const Heading_1 = __importDefault(require("@theme/Heading"));
|
|
76
|
-
const translationIds_1 = require("@theme/translationIds");
|
|
77
75
|
const clsx_1 = __importDefault(require("clsx"));
|
|
76
|
+
const scrollUtils_1 = require("@theme/utils/scrollUtils");
|
|
77
|
+
const tabsUtils_1 = require("@theme/utils/tabsUtils");
|
|
78
78
|
function TabList({
|
|
79
79
|
className,
|
|
80
80
|
block,
|
|
@@ -82,14 +82,14 @@ function TabList({
|
|
|
82
82
|
selectValue,
|
|
83
83
|
tabValues,
|
|
84
84
|
label = (0, Translate_1.translate)({
|
|
85
|
-
id:
|
|
85
|
+
id: "theme.openapi.tabs.responses.label",
|
|
86
86
|
message: "Responses",
|
|
87
87
|
}),
|
|
88
88
|
id = "responses",
|
|
89
89
|
}) {
|
|
90
90
|
const tabRefs = [];
|
|
91
91
|
const { blockElementScrollPositionUntilNextRender } = (0,
|
|
92
|
-
|
|
92
|
+
scrollUtils_1.useScrollPositionBlocker)();
|
|
93
93
|
const handleTabChange = (event) => {
|
|
94
94
|
const newTab = event.currentTarget;
|
|
95
95
|
const newTabIndex = tabRefs.indexOf(newTab);
|
|
@@ -245,9 +245,9 @@ function TabContent({ lazy, children, selectedValue }) {
|
|
|
245
245
|
);
|
|
246
246
|
}
|
|
247
247
|
function TabsComponent(props) {
|
|
248
|
-
const tabs = (0,
|
|
248
|
+
const tabs = (0, tabsUtils_1.useTabsContextValue)(props);
|
|
249
249
|
return react_1.default.createElement(
|
|
250
|
-
|
|
250
|
+
tabsUtils_1.TabsProvider,
|
|
251
251
|
{ value: tabs },
|
|
252
252
|
react_1.default.createElement(
|
|
253
253
|
"div",
|
|
@@ -269,6 +269,6 @@ function ApiTabs(props) {
|
|
|
269
269
|
key: String(isBrowser),
|
|
270
270
|
...props,
|
|
271
271
|
},
|
|
272
|
-
(0,
|
|
272
|
+
(0, tabsUtils_1.sanitizeTabsChildren)(props.children)
|
|
273
273
|
);
|
|
274
274
|
}
|
|
@@ -69,14 +69,15 @@ var __importDefault =
|
|
|
69
69
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70
70
|
exports.default = DiscriminatorTabs;
|
|
71
71
|
const react_1 = __importStar(require("react"));
|
|
72
|
-
const internal_1 = require("@docusaurus/theme-common/internal");
|
|
73
72
|
const useIsBrowser_1 = __importDefault(require("@docusaurus/useIsBrowser"));
|
|
74
73
|
const clsx_1 = __importDefault(require("clsx"));
|
|
75
74
|
const flatten_1 = __importDefault(require("lodash/flatten"));
|
|
75
|
+
const scrollUtils_1 = require("@theme/utils/scrollUtils");
|
|
76
|
+
const tabsUtils_1 = require("@theme/utils/tabsUtils");
|
|
76
77
|
function TabList({ className, block, selectedValue, selectValue, tabValues }) {
|
|
77
78
|
const tabRefs = [];
|
|
78
79
|
const { blockElementScrollPositionUntilNextRender } = (0,
|
|
79
|
-
|
|
80
|
+
scrollUtils_1.useScrollPositionBlocker)();
|
|
80
81
|
const handleTabChange = (event) => {
|
|
81
82
|
const newTab = event.currentTarget;
|
|
82
83
|
const newTabIndex = tabRefs.indexOf(newTab);
|
|
@@ -223,9 +224,9 @@ function TabContent({ lazy, children, selectedValue }) {
|
|
|
223
224
|
);
|
|
224
225
|
}
|
|
225
226
|
function TabsComponent(props) {
|
|
226
|
-
const tabs = (0,
|
|
227
|
+
const tabs = (0, tabsUtils_1.useTabsContextValue)(props);
|
|
227
228
|
return react_1.default.createElement(
|
|
228
|
-
|
|
229
|
+
tabsUtils_1.TabsProvider,
|
|
229
230
|
{ value: tabs },
|
|
230
231
|
react_1.default.createElement(
|
|
231
232
|
"div",
|
|
@@ -252,6 +253,6 @@ function DiscriminatorTabs(props) {
|
|
|
252
253
|
key: String(isBrowser),
|
|
253
254
|
...props,
|
|
254
255
|
},
|
|
255
|
-
(0,
|
|
256
|
+
(0, tabsUtils_1.sanitizeTabsChildren)(props.children)
|
|
256
257
|
);
|
|
257
258
|
}
|
|
@@ -17,7 +17,6 @@ const react_1 = __importDefault(require("react"));
|
|
|
17
17
|
const Translate_1 = require("@docusaurus/Translate");
|
|
18
18
|
const SchemaTabs_1 = __importDefault(require("@theme/SchemaTabs"));
|
|
19
19
|
const TabItem_1 = __importDefault(require("@theme/TabItem"));
|
|
20
|
-
const translationIds_1 = require("@theme/translationIds");
|
|
21
20
|
const EXAMPLE_CLASS_NAME = "openapi-example";
|
|
22
21
|
const EXAMPLES_CLASS_NAME = "openapi-examples";
|
|
23
22
|
/**
|
|
@@ -53,7 +52,7 @@ const renderExample = (example) => {
|
|
|
53
52
|
"strong",
|
|
54
53
|
null,
|
|
55
54
|
(0, Translate_1.translate)({
|
|
56
|
-
id:
|
|
55
|
+
id: "theme.openapi.schemaItem.example",
|
|
57
56
|
message: "Example:",
|
|
58
57
|
}),
|
|
59
58
|
" "
|
|
@@ -114,7 +113,7 @@ const renderExamplesRecord = (examples) => {
|
|
|
114
113
|
"strong",
|
|
115
114
|
null,
|
|
116
115
|
(0, Translate_1.translate)({
|
|
117
|
-
id:
|
|
116
|
+
id: "theme.openapi.schemaItem.examples",
|
|
118
117
|
message: "Examples:",
|
|
119
118
|
})
|
|
120
119
|
),
|
|
@@ -151,7 +150,7 @@ const renderExampleObject = (exampleName, exampleProperties) => {
|
|
|
151
150
|
"strong",
|
|
152
151
|
null,
|
|
153
152
|
(0, Translate_1.translate)({
|
|
154
|
-
id:
|
|
153
|
+
id: "theme.openapi.schemaItem.description",
|
|
155
154
|
message: "Description:",
|
|
156
155
|
}),
|
|
157
156
|
" "
|
|
@@ -69,12 +69,13 @@ var __importDefault =
|
|
|
69
69
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70
70
|
exports.default = MimeTabs;
|
|
71
71
|
const react_1 = __importStar(require("react"));
|
|
72
|
-
const internal_1 = require("@docusaurus/theme-common/internal");
|
|
73
72
|
const useIsBrowser_1 = __importDefault(require("@docusaurus/useIsBrowser"));
|
|
74
73
|
const slice_1 = require("@theme/ApiExplorer/Accept/slice");
|
|
75
74
|
const slice_2 = require("@theme/ApiExplorer/ContentType/slice");
|
|
76
75
|
const hooks_1 = require("@theme/ApiItem/hooks");
|
|
77
76
|
const clsx_1 = __importDefault(require("clsx"));
|
|
77
|
+
const scrollUtils_1 = require("@theme/utils/scrollUtils");
|
|
78
|
+
const tabsUtils_1 = require("@theme/utils/tabsUtils");
|
|
78
79
|
function TabList({
|
|
79
80
|
className,
|
|
80
81
|
block,
|
|
@@ -85,7 +86,7 @@ function TabList({
|
|
|
85
86
|
}) {
|
|
86
87
|
const tabRefs = [];
|
|
87
88
|
const { blockElementScrollPositionUntilNextRender } = (0,
|
|
88
|
-
|
|
89
|
+
scrollUtils_1.useScrollPositionBlocker)();
|
|
89
90
|
// custom
|
|
90
91
|
const dispatch = (0, hooks_1.useTypedDispatch)();
|
|
91
92
|
const isRequestSchema = schemaType?.toLowerCase() === "request";
|
|
@@ -256,9 +257,9 @@ function TabContent({ lazy, children, selectedValue }) {
|
|
|
256
257
|
);
|
|
257
258
|
}
|
|
258
259
|
function TabsComponent(props) {
|
|
259
|
-
const tabs = (0,
|
|
260
|
+
const tabs = (0, tabsUtils_1.useTabsContextValue)(props);
|
|
260
261
|
return react_1.default.createElement(
|
|
261
|
-
|
|
262
|
+
tabsUtils_1.TabsProvider,
|
|
262
263
|
{ value: tabs },
|
|
263
264
|
react_1.default.createElement(
|
|
264
265
|
"div",
|
|
@@ -280,6 +281,6 @@ function MimeTabs(props) {
|
|
|
280
281
|
key: String(isBrowser),
|
|
281
282
|
...props,
|
|
282
283
|
},
|
|
283
|
-
(0,
|
|
284
|
+
(0, tabsUtils_1.sanitizeTabsChildren)(props.children)
|
|
284
285
|
);
|
|
285
286
|
}
|
|
@@ -69,13 +69,14 @@ var __importDefault =
|
|
|
69
69
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
70
70
|
exports.default = OperationTabs;
|
|
71
71
|
const react_1 = __importStar(require("react"));
|
|
72
|
-
const internal_1 = require("@docusaurus/theme-common/internal");
|
|
73
72
|
const useIsBrowser_1 = __importDefault(require("@docusaurus/useIsBrowser"));
|
|
74
73
|
const clsx_1 = __importDefault(require("clsx"));
|
|
74
|
+
const scrollUtils_1 = require("@theme/utils/scrollUtils");
|
|
75
|
+
const tabsUtils_1 = require("@theme/utils/tabsUtils");
|
|
75
76
|
function TabList({ className, block, selectedValue, selectValue, tabValues }) {
|
|
76
77
|
const tabRefs = [];
|
|
77
78
|
const { blockElementScrollPositionUntilNextRender } = (0,
|
|
78
|
-
|
|
79
|
+
scrollUtils_1.useScrollPositionBlocker)();
|
|
79
80
|
const handleTabChange = (event) => {
|
|
80
81
|
const newTab = event.currentTarget;
|
|
81
82
|
const newTabIndex = tabRefs.indexOf(newTab);
|
|
@@ -218,9 +219,9 @@ function TabContent({ lazy, children, selectedValue }) {
|
|
|
218
219
|
);
|
|
219
220
|
}
|
|
220
221
|
function TabsComponent(props) {
|
|
221
|
-
const tabs = (0,
|
|
222
|
+
const tabs = (0, tabsUtils_1.useTabsContextValue)(props);
|
|
222
223
|
return react_1.default.createElement(
|
|
223
|
-
|
|
224
|
+
tabsUtils_1.TabsProvider,
|
|
224
225
|
{ value: tabs },
|
|
225
226
|
react_1.default.createElement(
|
|
226
227
|
"div",
|
|
@@ -242,6 +243,6 @@ function OperationTabs(props) {
|
|
|
242
243
|
key: String(isBrowser),
|
|
243
244
|
...props,
|
|
244
245
|
},
|
|
245
|
-
(0,
|
|
246
|
+
(0, tabsUtils_1.sanitizeTabsChildren)(props.children)
|
|
246
247
|
);
|
|
247
248
|
}
|
|
@@ -17,7 +17,6 @@ const Translate_1 = require("@docusaurus/Translate");
|
|
|
17
17
|
const Details_1 = __importDefault(require("@theme/Details"));
|
|
18
18
|
const ParamsItem_1 = __importDefault(require("@theme/ParamsItem"));
|
|
19
19
|
const SkeletonLoader_1 = __importDefault(require("@theme/SkeletonLoader"));
|
|
20
|
-
const translationIds_1 = require("@theme/translationIds");
|
|
21
20
|
const ParamsDetailsComponent = ({ parameters }) => {
|
|
22
21
|
const types = ["path", "query", "header", "cookie"];
|
|
23
22
|
return react_1.default.createElement(
|
|
@@ -36,7 +35,7 @@ const ParamsDetailsComponent = ({ parameters }) => {
|
|
|
36
35
|
{ className: "openapi-markdown__details-summary-header-params" },
|
|
37
36
|
(0, Translate_1.translate)(
|
|
38
37
|
{
|
|
39
|
-
id:
|
|
38
|
+
id: "theme.openapi.paramsDetails.parametersTitle",
|
|
40
39
|
message: "{type} Parameters",
|
|
41
40
|
},
|
|
42
41
|
{ type: type.charAt(0).toUpperCase() + type.slice(1) }
|