docusaurus-theme-openapi-docs 0.0.0-beta.659 → 0.0.0-beta.660
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/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +15 -15
- package/lib/theme/ApiDemoPanel/ApiCodeBlock/Line/_Line.scss +5 -5
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/Accept/index.js +2 -2
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/Container/_Container.scss +1 -1
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/Container/index.js +1 -1
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/Content/Element.js +3 -3
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/Content/String.js +18 -15
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/Content/_Content.scss +16 -16
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/CopyButton/_CopyButton.scss +8 -8
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/CopyButton/index.js +5 -5
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/ExitButton/_ExitButton.scss +2 -2
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/ExitButton/index.js +3 -3
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/ExpandButton/_ExpandButton.scss +11 -11
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +156 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +46 -0
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/Line/index.js +3 -3
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
- package/{src/theme/ApiDemoPanel → lib/theme/ApiExplorer}/ApiCodeBlock/WordWrapButton/index.js +2 -2
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/index.js +2 -2
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/Authorization/index.js +3 -3
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/Authorization/slice.js +1 -1
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/Body/index.js +8 -10
- package/lib/theme/{ApiDemoPanel/Curl → ApiExplorer/CodeSnippets}/index.d.ts +2 -2
- package/lib/theme/{ApiDemoPanel/Curl → ApiExplorer/CodeSnippets}/index.js +6 -6
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/CodeTabs/_CodeTabs.scss +4 -4
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/CodeTabs/index.js +1 -1
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ContentType/index.js +2 -2
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/FloatingButton/_FloatingButton.scss +4 -4
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/FloatingButton/index.js +1 -1
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/FormFileUpload/_FormFileUpload.scss +6 -6
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/FormFileUpload/index.js +5 -5
- package/lib/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/FormItem/index.js +4 -2
- package/{src/theme/ApiDemoPanel → lib/theme/ApiExplorer}/FormMultiSelect/_FormMultiSelect.scss +2 -2
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/FormMultiSelect/index.js +1 -1
- package/{src/theme/ApiDemoPanel → lib/theme/ApiExplorer}/FormSelect/_FormSelect.scss +4 -4
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/FormSelect/index.js +1 -1
- package/{src/theme/ApiDemoPanel → lib/theme/ApiExplorer}/FormTextInput/_FormTextInput.scss +5 -5
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/FormTextInput/index.js +3 -3
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/LiveEditor/_LiveEditor.scss +2 -2
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/LiveEditor/index.js +5 -5
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamArrayFormItem.d.ts +1 -1
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamArrayFormItem.js +6 -6
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamBooleanFormItem.d.ts +1 -1
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamBooleanFormItem.js +3 -3
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.d.ts +1 -1
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.js +3 -3
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamSelectFormItem.d.ts +1 -1
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamSelectFormItem.js +3 -3
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamTextFormItem.d.ts +1 -1
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamTextFormItem.js +2 -2
- package/{src/theme/ApiDemoPanel → lib/theme/ApiExplorer}/ParamOptions/_ParamOptions.scss +7 -7
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/index.js +11 -11
- package/{src/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Request/_Request.scss +11 -11
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/Request/index.js +31 -25
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/Request/makeRequest.d.ts +1 -1
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/Response/_Response.scss +8 -8
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/Response/index.js +13 -10
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/Server/_Server.scss +4 -4
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/Server/index.js +7 -7
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/buildPostmanRequest.d.ts +2 -2
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/index.d.ts +2 -2
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/index.js +8 -6
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/persistanceMiddleware.js +1 -1
- package/lib/theme/ApiItem/index.js +5 -5
- package/lib/theme/ApiItem/store.js +7 -7
- package/lib/theme/MimeTabs/index.js +2 -2
- package/lib/theme/styles.scss +27 -27
- package/package.json +3 -3
- package/src/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +15 -15
- package/src/theme/ApiDemoPanel/ApiCodeBlock/Line/_Line.scss +5 -5
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Accept/index.tsx +2 -2
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/Container/_Container.scss +1 -1
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/Container/index.js +1 -1
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/Content/Element.js +3 -3
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/Content/String.js +18 -15
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/Content/_Content.scss +16 -16
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/CopyButton/_CopyButton.scss +8 -8
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/CopyButton/index.js +5 -5
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/ExitButton/_ExitButton.scss +2 -2
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/ExitButton/index.js +3 -3
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/ExpandButton/_ExpandButton.scss +11 -11
- package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +156 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +46 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/Line/index.js +3 -3
- package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
- package/{lib/theme/ApiDemoPanel → src/theme/ApiExplorer}/ApiCodeBlock/WordWrapButton/index.js +2 -2
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ApiCodeBlock/index.js +2 -2
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Authorization/index.tsx +3 -3
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Authorization/slice.ts +1 -1
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Body/index.tsx +8 -8
- package/src/theme/{ApiDemoPanel/Curl → ApiExplorer/CodeSnippets}/index.tsx +6 -6
- package/src/theme/{ApiDemoPanel → ApiExplorer}/CodeTabs/_CodeTabs.scss +4 -4
- package/src/theme/{ApiDemoPanel → ApiExplorer}/CodeTabs/index.js +1 -1
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ContentType/index.tsx +2 -2
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FloatingButton/_FloatingButton.scss +4 -4
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FloatingButton/index.tsx +1 -1
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormFileUpload/_FormFileUpload.scss +6 -6
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormFileUpload/index.tsx +8 -4
- package/src/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormItem/index.tsx +2 -2
- package/{lib/theme/ApiDemoPanel → src/theme/ApiExplorer}/FormMultiSelect/_FormMultiSelect.scss +2 -2
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormMultiSelect/index.tsx +1 -1
- package/{lib/theme/ApiDemoPanel → src/theme/ApiExplorer}/FormSelect/_FormSelect.scss +4 -4
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormSelect/index.tsx +1 -1
- package/{lib/theme/ApiDemoPanel → src/theme/ApiExplorer}/FormTextInput/_FormTextInput.scss +5 -5
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormTextInput/index.tsx +3 -3
- package/src/theme/{ApiDemoPanel → ApiExplorer}/LiveEditor/_LiveEditor.scss +2 -2
- package/src/theme/{ApiDemoPanel → ApiExplorer}/LiveEditor/index.tsx +5 -5
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +9 -6
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx +3 -3
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx +3 -3
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx +3 -3
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamTextFormItem.tsx +2 -2
- package/{lib/theme/ApiDemoPanel → src/theme/ApiExplorer}/ParamOptions/_ParamOptions.scss +7 -7
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/index.tsx +11 -11
- package/{lib/theme/ApiDemoPanel → src/theme/ApiExplorer}/Request/_Request.scss +11 -11
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Request/index.tsx +25 -25
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Request/makeRequest.ts +1 -1
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Response/_Response.scss +8 -8
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Response/index.tsx +10 -10
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Server/_Server.scss +4 -4
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Server/index.tsx +7 -7
- package/src/theme/{ApiDemoPanel → ApiExplorer}/buildPostmanRequest.ts +2 -2
- package/src/theme/{ApiDemoPanel → ApiExplorer}/index.tsx +6 -6
- package/src/theme/{ApiDemoPanel → ApiExplorer}/persistanceMiddleware.ts +1 -1
- package/src/theme/ApiItem/index.tsx +5 -5
- package/src/theme/ApiItem/store.ts +7 -7
- package/src/theme/MimeTabs/index.js +2 -2
- package/src/theme/styles.scss +27 -27
- package/src/theme-openapi.d.ts +56 -56
- package/lib/theme/ApiDemoPanel/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +0 -10
- package/lib/theme/ApiDemoPanel/FormItem/_FormItem.scss +0 -21
- package/src/theme/ApiDemoPanel/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +0 -10
- package/src/theme/ApiDemoPanel/FormItem/_FormItem.scss +0 -21
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Accept/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Accept/slice.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Accept/slice.js +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Authorization/auth-types.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Authorization/auth-types.js +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Authorization/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Authorization/slice.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Body/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Body/json2xml.js +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Body/slice.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Body/slice.js +0 -0
- /package/lib/theme/{ApiDemoPanel/Curl → ApiExplorer/CodeSnippets}/languages.json +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/ContentType/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/ContentType/slice.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/ContentType/slice.js +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Export/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Export/index.js +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/FloatingButton/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/FormFileUpload/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/FormItem/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/FormMultiSelect/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/FormSelect/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/FormTextInput/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/LiveEditor/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/MethodEndpoint/_MethodEndpoint.scss +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/MethodEndpoint/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/MethodEndpoint/index.js +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/slice.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/slice.js +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Request/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Request/makeRequest.js +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Response/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Response/slice.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Response/slice.js +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/SecuritySchemes/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/SecuritySchemes/index.js +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Server/index.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Server/slice.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/Server/slice.js +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/buildPostmanRequest.js +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/persistanceMiddleware.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/storage-utils.d.ts +0 -0
- /package/lib/theme/{ApiDemoPanel → ApiExplorer}/storage-utils.js +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Accept/slice.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Authorization/auth-types.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Body/json2xml.js +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Body/slice.ts +0 -0
- /package/src/theme/{ApiDemoPanel/Curl → ApiExplorer/CodeSnippets}/languages.json +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/ContentType/slice.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Export/index.tsx +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/MethodEndpoint/_MethodEndpoint.scss +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/MethodEndpoint/index.tsx +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/slice.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Response/slice.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/SecuritySchemes/index.tsx +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Server/slice.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/postman-collection.d.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/react-modal.d.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/storage-utils.ts +0 -0
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
|
-
import json2xml from "@theme/
|
|
11
|
-
import FormFileUpload from "@theme/
|
|
12
|
-
import FormItem from "@theme/
|
|
13
|
-
import FormSelect from "@theme/
|
|
14
|
-
import FormTextInput from "@theme/
|
|
15
|
-
import LiveApp from "@theme/
|
|
10
|
+
import json2xml from "@theme/ApiExplorer/Body/json2xml";
|
|
11
|
+
import FormFileUpload from "@theme/ApiExplorer/FormFileUpload";
|
|
12
|
+
import FormItem from "@theme/ApiExplorer/FormItem";
|
|
13
|
+
import FormSelect from "@theme/ApiExplorer/FormSelect";
|
|
14
|
+
import FormTextInput from "@theme/ApiExplorer/FormTextInput";
|
|
15
|
+
import LiveApp from "@theme/ApiExplorer/LiveEditor";
|
|
16
16
|
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
17
17
|
import SchemaTabs from "@theme/SchemaTabs";
|
|
18
18
|
import TabItem from "@theme/TabItem";
|
|
@@ -121,7 +121,7 @@ function Body({
|
|
|
121
121
|
schema?.type === "object"
|
|
122
122
|
) {
|
|
123
123
|
return (
|
|
124
|
-
<FormItem className="openapi-
|
|
124
|
+
<FormItem className="openapi-explorer__form-item-body-container">
|
|
125
125
|
<div>
|
|
126
126
|
{Object.entries(schema.properties ?? {}).map(([key, val]: any) => {
|
|
127
127
|
if (val.format === "binary") {
|
|
@@ -314,7 +314,7 @@ function Body({
|
|
|
314
314
|
|
|
315
315
|
if (examplesBodies && examplesBodies.length > 0) {
|
|
316
316
|
return (
|
|
317
|
-
<FormItem className="openapi-
|
|
317
|
+
<FormItem className="openapi-explorer__form-item-body-container">
|
|
318
318
|
<SchemaTabs className="openapi-tabs__schema" lazy>
|
|
319
319
|
{/* @ts-ignore */}
|
|
320
320
|
<TabItem label="Default" value="default" default>
|
|
@@ -10,9 +10,9 @@ import React, { useState, useEffect } from "react";
|
|
|
10
10
|
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
|
|
11
11
|
import codegen from "@paloaltonetworks/postman-code-generators";
|
|
12
12
|
import sdk from "@paloaltonetworks/postman-collection";
|
|
13
|
-
import ApiCodeBlock from "@theme/
|
|
14
|
-
import buildPostmanRequest from "@theme/
|
|
15
|
-
import CodeTabs from "@theme/
|
|
13
|
+
import ApiCodeBlock from "@theme/ApiExplorer/ApiCodeBlock";
|
|
14
|
+
import buildPostmanRequest from "@theme/ApiExplorer/buildPostmanRequest";
|
|
15
|
+
import CodeTabs from "@theme/ApiExplorer/CodeTabs";
|
|
16
16
|
import { useTypedSelector } from "@theme/ApiItem/hooks";
|
|
17
17
|
import merge from "lodash/merge";
|
|
18
18
|
|
|
@@ -143,7 +143,7 @@ function CodeTab({ children, hidden, className, onClick }: any): JSX.Element {
|
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
function
|
|
146
|
+
function CodeSnippets({ postman, codeSamples }: Props) {
|
|
147
147
|
// TODO: match theme for vscode.
|
|
148
148
|
|
|
149
149
|
const { siteConfig } = useDocusaurusContext();
|
|
@@ -348,7 +348,7 @@ function Curl({ postman, codeSamples }: Props) {
|
|
|
348
348
|
{/* @ts-ignore */}
|
|
349
349
|
<ApiCodeBlock
|
|
350
350
|
language={lang.highlight}
|
|
351
|
-
className="openapi-
|
|
351
|
+
className="openapi-explorer__code-block"
|
|
352
352
|
showLineNumbers={true}
|
|
353
353
|
>
|
|
354
354
|
{codeText}
|
|
@@ -365,4 +365,4 @@ function Curl({ postman, codeSamples }: Props) {
|
|
|
365
365
|
);
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
-
export default
|
|
368
|
+
export default CodeSnippets;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
padding: 1rem;
|
|
18
18
|
background-color: var(--ifm-pre-background);
|
|
19
19
|
border-radius: var(--ifm-global-radius);
|
|
20
|
-
border: 1px solid var(--openapi-
|
|
20
|
+
border: 1px solid var(--openapi-explorer-border-color);
|
|
21
21
|
box-shadow: 0 2px 3px hsla(222, 8%, 43%, 0.1),
|
|
22
22
|
0 8px 16px -10px hsla(222, 8%, 43%, 0.2);
|
|
23
23
|
transition: 300ms;
|
|
@@ -68,14 +68,14 @@
|
|
|
68
68
|
margin-top: unset !important;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
.openapi-
|
|
71
|
+
.openapi-explorer__code-block code {
|
|
72
72
|
max-height: 200px;
|
|
73
|
-
font-size: var(--openapi-
|
|
73
|
+
font-size: var(--openapi-explorer-font-size-code);
|
|
74
74
|
padding-top: var(--ifm-pre-padding);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
body[class="ReactModal__Body--open"] {
|
|
78
|
-
.openapi-
|
|
78
|
+
.openapi-explorer__code-block code {
|
|
79
79
|
max-height: 600px;
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
useTabs,
|
|
13
13
|
} from "@docusaurus/theme-common/internal";
|
|
14
14
|
import useIsBrowser from "@docusaurus/useIsBrowser";
|
|
15
|
-
import { languageSet } from "@theme/
|
|
15
|
+
import { languageSet } from "@theme/ApiExplorer/CodeSnippets";
|
|
16
16
|
import clsx from "clsx";
|
|
17
17
|
|
|
18
18
|
function TabList({
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
|
-
import FormItem from "@theme/
|
|
11
|
-
import FormSelect from "@theme/
|
|
10
|
+
import FormItem from "@theme/ApiExplorer/FormItem";
|
|
11
|
+
import FormSelect from "@theme/ApiExplorer/FormSelect";
|
|
12
12
|
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
13
13
|
|
|
14
14
|
import { setContentType } from "./slice";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.openapi-
|
|
1
|
+
.openapi-explorer__floating-btn {
|
|
2
2
|
position: relative;
|
|
3
3
|
|
|
4
4
|
button {
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
right: calc(var(--ifm-pre-padding) / 2);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
.openapi-
|
|
21
|
-
.openapi-
|
|
22
|
-
.openapi-
|
|
20
|
+
.openapi-explorer__floating-btn:hover button,
|
|
21
|
+
.openapi-explorer__floating-btn:focus-visible button,
|
|
22
|
+
.openapi-explorer__floating-btn button:focus-visible {
|
|
23
23
|
visibility: visible;
|
|
24
24
|
opacity: 1;
|
|
25
25
|
}
|
|
@@ -15,7 +15,7 @@ export interface Props {
|
|
|
15
15
|
|
|
16
16
|
function FloatingButton({ label, onClick, children }: Props) {
|
|
17
17
|
return (
|
|
18
|
-
<div tabIndex={0} className="openapi-
|
|
18
|
+
<div tabIndex={0} className="openapi-explorer__floating-btn">
|
|
19
19
|
{label && (
|
|
20
20
|
<button tabIndex={0} onClick={onClick}>
|
|
21
21
|
{label}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.openapi-
|
|
1
|
+
.openapi-explorer__dropzone {
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
),
|
|
20
20
|
linear-gradient(var(--ifm-color-primary), var(--ifm-color-primary));
|
|
21
21
|
|
|
22
|
-
.openapi-
|
|
22
|
+
.openapi-explorer__dropzone-content {
|
|
23
23
|
color: var(--ifm-pre-color);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
.openapi-
|
|
28
|
+
.openapi-explorer__dropzone-hover {
|
|
29
29
|
display: inline-flex;
|
|
30
30
|
align-items: center;
|
|
31
31
|
justify-content: center;
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
),
|
|
45
45
|
linear-gradient(var(--ifm-color-primary), var(--ifm-color-primary));
|
|
46
46
|
|
|
47
|
-
.openapi-
|
|
47
|
+
.openapi-explorer__dropzone-content {
|
|
48
48
|
display: flex;
|
|
49
49
|
align-items: center;
|
|
50
50
|
justify-content: center;
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
color: var(--ifm-pre-color);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.openapi-
|
|
56
|
+
.openapi-explorer__file-name {
|
|
57
57
|
margin: 0 calc(var(--ifm-pre-padding) * 1.5);
|
|
58
58
|
white-space: nowrap;
|
|
59
59
|
overflow: hidden;
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.openapi-
|
|
65
|
+
.openapi-explorer__dropzone-content {
|
|
66
66
|
display: flex;
|
|
67
67
|
align-items: center;
|
|
68
68
|
justify-content: center;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React, { useState } from "react";
|
|
9
9
|
|
|
10
|
-
import FloatingButton from "@theme/
|
|
10
|
+
import FloatingButton from "@theme/ApiExplorer/FloatingButton";
|
|
11
11
|
import MagicDropzone from "react-magic-dropzone";
|
|
12
12
|
|
|
13
13
|
type PreviewFile = { preview: string } & File;
|
|
@@ -53,7 +53,7 @@ function RenderPreview({ file }: RenderPreviewProps) {
|
|
|
53
53
|
d="M0.210,-0.000 L40.000,39.790 L40.000,40.000 L15.000,40.000 C6.716,40.000 0.000,33.284 0.000,25.000 L0.000,-0.000 L0.210,-0.000 Z"
|
|
54
54
|
/>
|
|
55
55
|
</svg>
|
|
56
|
-
<div className="openapi-
|
|
56
|
+
<div className="openapi-explorer__file-name">{file.name}</div>
|
|
57
57
|
</div>
|
|
58
58
|
);
|
|
59
59
|
}
|
|
@@ -83,7 +83,9 @@ function FormFileUpload({ placeholder, onChange }: Props) {
|
|
|
83
83
|
<FloatingButton>
|
|
84
84
|
<MagicDropzone
|
|
85
85
|
className={
|
|
86
|
-
hover
|
|
86
|
+
hover
|
|
87
|
+
? "openapi-explorer__dropzone-hover"
|
|
88
|
+
: "openapi-explorer__dropzone"
|
|
87
89
|
}
|
|
88
90
|
onDrop={handleDrop}
|
|
89
91
|
onDragEnter={() => setHover(true)}
|
|
@@ -105,7 +107,9 @@ function FormFileUpload({ placeholder, onChange }: Props) {
|
|
|
105
107
|
<RenderPreview file={file} />
|
|
106
108
|
</>
|
|
107
109
|
) : (
|
|
108
|
-
<div className="openapi-
|
|
110
|
+
<div className="openapi-explorer__dropzone-content">
|
|
111
|
+
{placeholder}
|
|
112
|
+
</div>
|
|
109
113
|
)}
|
|
110
114
|
</MagicDropzone>
|
|
111
115
|
</FloatingButton>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.openapi-explorer__form-item {
|
|
2
|
+
padding: var(--openapi-explorer-padding-input);
|
|
3
|
+
font-size: var(--openapi-explorer-font-size-input);
|
|
4
|
+
|
|
5
|
+
&:first-child {
|
|
6
|
+
margin-top: 0;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.required {
|
|
10
|
+
color: var(--openapi-required);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.openapi-explorer__form-item-body-container {
|
|
15
|
+
padding: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.openapi-explorer__form-item-label {
|
|
19
|
+
font-family: var(--ifm-font-family-monospace);
|
|
20
|
+
font-weight: bold;
|
|
21
|
+
}
|
|
@@ -19,9 +19,9 @@ export interface Props {
|
|
|
19
19
|
|
|
20
20
|
function FormItem({ label, type, required, children, className }: Props) {
|
|
21
21
|
return (
|
|
22
|
-
<div className={clsx("openapi-
|
|
22
|
+
<div className={clsx("openapi-explorer__form-item", className)}>
|
|
23
23
|
{label && (
|
|
24
|
-
<label className="openapi-
|
|
24
|
+
<label className="openapi-explorer__form-item-label">{label}</label>
|
|
25
25
|
)}
|
|
26
26
|
{type && <span style={{ opacity: 0.6 }}> — {type}</span>}
|
|
27
27
|
{required && <span className="openapi-schema__required">required</span>}
|
package/{lib/theme/ApiDemoPanel → src/theme/ApiExplorer}/FormMultiSelect/_FormMultiSelect.scss
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.openapi-
|
|
1
|
+
.openapi-explorer__multi-select-input {
|
|
2
2
|
width: 100%;
|
|
3
3
|
margin-top: calc(var(--ifm-pre-padding) / 2);
|
|
4
4
|
padding: 1rem;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
border: 1px solid transparent;
|
|
7
7
|
background-color: var(--openapi-input-background);
|
|
8
8
|
outline: none;
|
|
9
|
-
font-size: var(--openapi-
|
|
9
|
+
font-size: var(--openapi-explorer-font-size-input);
|
|
10
10
|
color: var(--ifm-pre-color);
|
|
11
11
|
-moz-appearance: none;
|
|
12
12
|
-webkit-appearance: none;
|
|
@@ -35,7 +35,7 @@ function FormMultiSelect({ value, options, onChange, showErrors }: Props) {
|
|
|
35
35
|
return (
|
|
36
36
|
<select
|
|
37
37
|
style={{ height: height }}
|
|
38
|
-
className={clsx("openapi-
|
|
38
|
+
className={clsx("openapi-explorer__multi-select-input", {
|
|
39
39
|
error: showErrors,
|
|
40
40
|
})}
|
|
41
41
|
value={value}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
html[data-theme="dark"] .openapi-
|
|
1
|
+
html[data-theme="dark"] .openapi-explorer__select-input {
|
|
2
2
|
margin-top: calc(var(--ifm-pre-padding) / 2);
|
|
3
3
|
background-color: var(--openapi-input-background);
|
|
4
4
|
border: none;
|
|
@@ -17,15 +17,15 @@ html[data-theme="dark"] .openapi-demo__select-input {
|
|
|
17
17
|
background-size: auto auto;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.openapi-
|
|
20
|
+
.openapi-explorer__select-input {
|
|
21
21
|
width: 100%;
|
|
22
22
|
margin-top: calc(var(--ifm-pre-padding) / 2);
|
|
23
|
-
padding: var(--openapi-
|
|
23
|
+
padding: var(--openapi-explorer-padding-input);
|
|
24
24
|
border: none;
|
|
25
25
|
outline: none;
|
|
26
26
|
border-radius: 4px;
|
|
27
27
|
background-color: var(--openapi-input-background);
|
|
28
|
-
font-size: var(--openapi-
|
|
28
|
+
font-size: var(--openapi-explorer-font-size-input);
|
|
29
29
|
font-family: var(--ifm-font-family-monospace);
|
|
30
30
|
color: var(--ifm-pre-color);
|
|
31
31
|
-moz-appearance: none;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.openapi-
|
|
1
|
+
.openapi-explorer__form-item-input {
|
|
2
2
|
margin-top: calc(var(--ifm-pre-padding) / 2);
|
|
3
3
|
background-color: var(--openapi-input-background);
|
|
4
4
|
border: 1px solid transparent;
|
|
5
5
|
outline: none;
|
|
6
6
|
width: 100%;
|
|
7
7
|
color: var(--ifm-pre-color);
|
|
8
|
-
padding: var(--openapi-
|
|
8
|
+
padding: var(--openapi-explorer-padding-input);
|
|
9
9
|
border-radius: 4px;
|
|
10
10
|
|
|
11
11
|
&:hover {
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.openapi-
|
|
26
|
-
font-size: var(--openapi-
|
|
25
|
+
.openapi-explorer__input-error {
|
|
26
|
+
font-size: var(--openapi-explorer-font-size-input);
|
|
27
27
|
color: var(--openapi-required);
|
|
28
|
-
padding-top: var(--openapi-
|
|
28
|
+
padding-top: var(--openapi-explorer-padding-input);
|
|
29
29
|
|
|
30
30
|
&::before {
|
|
31
31
|
display: inline;
|
|
@@ -43,7 +43,7 @@ function FormTextInput({
|
|
|
43
43
|
{...register(paramName, {
|
|
44
44
|
required: isRequired ? "This field is required" : false,
|
|
45
45
|
})}
|
|
46
|
-
className={clsx("openapi-
|
|
46
|
+
className={clsx("openapi-explorer__form-item-input", {
|
|
47
47
|
error: showErrorMessage,
|
|
48
48
|
})}
|
|
49
49
|
type={password ? "password" : "text"}
|
|
@@ -55,7 +55,7 @@ function FormTextInput({
|
|
|
55
55
|
/>
|
|
56
56
|
) : (
|
|
57
57
|
<input
|
|
58
|
-
className="openapi-
|
|
58
|
+
className="openapi-explorer__form-item-input"
|
|
59
59
|
type={password ? "password" : "text"}
|
|
60
60
|
placeholder={placeholder}
|
|
61
61
|
title={placeholder}
|
|
@@ -69,7 +69,7 @@ function FormTextInput({
|
|
|
69
69
|
errors={errors}
|
|
70
70
|
name={paramName}
|
|
71
71
|
render={({ message }) => (
|
|
72
|
-
<div className="openapi-
|
|
72
|
+
<div className="openapi-explorer__input-error">{message}</div>
|
|
73
73
|
)}
|
|
74
74
|
/>
|
|
75
75
|
)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.openapi-
|
|
1
|
+
.openapi-explorer__playground-container {
|
|
2
2
|
margin-top: 1rem;
|
|
3
3
|
margin-bottom: var(--ifm-leading);
|
|
4
4
|
border-radius: var(--ifm-global-radius);
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
max-height: 500px;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.openapi-
|
|
10
|
+
.openapi-explorer__playground-editor {
|
|
11
11
|
font: var(--ifm-code-font-size) / var(--ifm-pre-line-height)
|
|
12
12
|
var(--ifm-font-family-monospace) !important;
|
|
13
13
|
/* rtl:ignore */
|
|
@@ -10,7 +10,7 @@ import React, { useEffect, useState } from "react";
|
|
|
10
10
|
import { usePrismTheme } from "@docusaurus/theme-common";
|
|
11
11
|
import useIsBrowser from "@docusaurus/useIsBrowser";
|
|
12
12
|
import { ErrorMessage } from "@hookform/error-message";
|
|
13
|
-
import { setStringRawBody } from "@theme/
|
|
13
|
+
import { setStringRawBody } from "@theme/ApiExplorer/Body/slice";
|
|
14
14
|
import clsx from "clsx";
|
|
15
15
|
import { Controller, useFormContext } from "react-hook-form";
|
|
16
16
|
import { LiveProvider, LiveEditor, withLive } from "react-live";
|
|
@@ -27,8 +27,8 @@ function Live({ onEdit, showErrors }: any) {
|
|
|
27
27
|
<LiveEditor
|
|
28
28
|
key={String(isBrowser)}
|
|
29
29
|
className={clsx({
|
|
30
|
-
"openapi-
|
|
31
|
-
"openapi-
|
|
30
|
+
"openapi-explorer__playground-editor": true,
|
|
31
|
+
"openapi-explorer__form-item-input": showErrors,
|
|
32
32
|
error: showErrors,
|
|
33
33
|
})}
|
|
34
34
|
onChange={onEdit}
|
|
@@ -72,7 +72,7 @@ function App({
|
|
|
72
72
|
return (
|
|
73
73
|
<div
|
|
74
74
|
className={clsx({
|
|
75
|
-
"openapi-
|
|
75
|
+
"openapi-explorer__playground-container": true,
|
|
76
76
|
})}
|
|
77
77
|
>
|
|
78
78
|
<LiveProvider
|
|
@@ -99,7 +99,7 @@ function App({
|
|
|
99
99
|
errors={errors}
|
|
100
100
|
name="requestBody"
|
|
101
101
|
render={({ message }) => (
|
|
102
|
-
<div className="openapi-
|
|
102
|
+
<div className="openapi-explorer__input-error">{message}</div>
|
|
103
103
|
)}
|
|
104
104
|
/>
|
|
105
105
|
)}
|
package/src/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx
RENAMED
|
@@ -9,9 +9,9 @@ import React, { useEffect, useState } from "react";
|
|
|
9
9
|
|
|
10
10
|
import { ErrorMessage } from "@hookform/error-message";
|
|
11
11
|
import { nanoid } from "@reduxjs/toolkit";
|
|
12
|
-
import FormSelect from "@theme/
|
|
13
|
-
import FormTextInput from "@theme/
|
|
14
|
-
import { Param, setParam } from "@theme/
|
|
12
|
+
import FormSelect from "@theme/ApiExplorer/FormSelect";
|
|
13
|
+
import FormTextInput from "@theme/ApiExplorer/FormTextInput";
|
|
14
|
+
import { Param, setParam } from "@theme/ApiExplorer/ParamOptions/slice";
|
|
15
15
|
import { useTypedDispatch } from "@theme/ApiItem/hooks";
|
|
16
16
|
import { Controller, useFormContext } from "react-hook-form";
|
|
17
17
|
|
|
@@ -114,7 +114,7 @@ export default function ParamArrayFormItem({ param }: ParamProps) {
|
|
|
114
114
|
onChange={handleChangeItem(item, onChange)}
|
|
115
115
|
/>
|
|
116
116
|
<button
|
|
117
|
-
className="openapi-
|
|
117
|
+
className="openapi-explorer__delete-btn"
|
|
118
118
|
onClick={handleDeleteItem(item)}
|
|
119
119
|
>
|
|
120
120
|
<svg
|
|
@@ -133,7 +133,10 @@ export default function ParamArrayFormItem({ param }: ParamProps) {
|
|
|
133
133
|
</button>
|
|
134
134
|
</div>
|
|
135
135
|
))}
|
|
136
|
-
<button
|
|
136
|
+
<button
|
|
137
|
+
className="openapi-explorer__thin-btn"
|
|
138
|
+
onClick={handleAddItem}
|
|
139
|
+
>
|
|
137
140
|
Add item
|
|
138
141
|
</button>
|
|
139
142
|
</>
|
|
@@ -144,7 +147,7 @@ export default function ParamArrayFormItem({ param }: ParamProps) {
|
|
|
144
147
|
errors={errors}
|
|
145
148
|
name="paramArray"
|
|
146
149
|
render={({ message }) => (
|
|
147
|
-
<div className="openapi-
|
|
150
|
+
<div className="openapi-explorer__input-error">{message}</div>
|
|
148
151
|
)}
|
|
149
152
|
/>
|
|
150
153
|
)}
|
package/src/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx
RENAMED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
10
|
import { ErrorMessage } from "@hookform/error-message";
|
|
11
|
-
import FormSelect from "@theme/
|
|
12
|
-
import { Param, setParam } from "@theme/
|
|
11
|
+
import FormSelect from "@theme/ApiExplorer/FormSelect";
|
|
12
|
+
import { Param, setParam } from "@theme/ApiExplorer/ParamOptions/slice";
|
|
13
13
|
import { useTypedDispatch } from "@theme/ApiItem/hooks";
|
|
14
14
|
import { Controller, useFormContext } from "react-hook-form";
|
|
15
15
|
|
|
@@ -55,7 +55,7 @@ export default function ParamBooleanFormItem({ param }: ParamProps) {
|
|
|
55
55
|
errors={errors}
|
|
56
56
|
name="paramBoolean"
|
|
57
57
|
render={({ message }) => (
|
|
58
|
-
<div className="openapi-
|
|
58
|
+
<div className="openapi-explorer__input-error">{message}</div>
|
|
59
59
|
)}
|
|
60
60
|
/>
|
|
61
61
|
)}
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
10
|
import { ErrorMessage } from "@hookform/error-message";
|
|
11
|
-
import FormMultiSelect from "@theme/
|
|
12
|
-
import { Param, setParam } from "@theme/
|
|
11
|
+
import FormMultiSelect from "@theme/ApiExplorer/FormMultiSelect";
|
|
12
|
+
import { Param, setParam } from "@theme/ApiExplorer/ParamOptions/slice";
|
|
13
13
|
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
14
14
|
import { Controller, useFormContext } from "react-hook-form";
|
|
15
15
|
|
|
@@ -77,7 +77,7 @@ export default function ParamMultiSelectFormItem({ param }: ParamProps) {
|
|
|
77
77
|
errors={errors}
|
|
78
78
|
name="paramMultiSelect"
|
|
79
79
|
render={({ message }) => (
|
|
80
|
-
<div className="openapi-
|
|
80
|
+
<div className="openapi-explorer__input-error">{message}</div>
|
|
81
81
|
)}
|
|
82
82
|
/>
|
|
83
83
|
)}
|
package/src/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx
RENAMED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
10
|
import { ErrorMessage } from "@hookform/error-message";
|
|
11
|
-
import FormSelect from "@theme/
|
|
12
|
-
import { Param, setParam } from "@theme/
|
|
11
|
+
import FormSelect from "@theme/ApiExplorer/FormSelect";
|
|
12
|
+
import { Param, setParam } from "@theme/ApiExplorer/ParamOptions/slice";
|
|
13
13
|
import { useTypedDispatch } from "@theme/ApiItem/hooks";
|
|
14
14
|
import { Controller, useFormContext } from "react-hook-form";
|
|
15
15
|
|
|
@@ -56,7 +56,7 @@ export default function ParamSelectFormItem({ param }: ParamProps) {
|
|
|
56
56
|
errors={errors}
|
|
57
57
|
name="paramSelect"
|
|
58
58
|
render={({ message }) => (
|
|
59
|
-
<div className="openapi-
|
|
59
|
+
<div className="openapi-explorer__input-error">{message}</div>
|
|
60
60
|
)}
|
|
61
61
|
/>
|
|
62
62
|
)}
|
package/src/theme/{ApiDemoPanel → ApiExplorer}/ParamOptions/ParamFormItems/ParamTextFormItem.tsx
RENAMED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
|
|
10
|
-
import FormTextInput from "@theme/
|
|
11
|
-
import { Param, setParam } from "@theme/
|
|
10
|
+
import FormTextInput from "@theme/ApiExplorer/FormTextInput";
|
|
11
|
+
import { Param, setParam } from "@theme/ApiExplorer/ParamOptions/slice";
|
|
12
12
|
import { useTypedDispatch } from "@theme/ApiItem/hooks";
|
|
13
13
|
|
|
14
14
|
export interface ParamProps {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.openapi-
|
|
1
|
+
.openapi-explorer__plus-btn--expanded {
|
|
2
2
|
transition: transform 0.2s ease;
|
|
3
3
|
display: inline-block;
|
|
4
4
|
transform: rotate(0deg);
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
transform: rotate(45deg);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.openapi-
|
|
10
|
+
.openapi-explorer__show-more-btn {
|
|
11
11
|
width: 100%;
|
|
12
12
|
-webkit-appearance: none;
|
|
13
13
|
-moz-appearance: none;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
margin-bottom: 0.5rem;
|
|
17
17
|
padding: 0;
|
|
18
18
|
cursor: pointer;
|
|
19
|
-
font-size: var(--openapi-
|
|
19
|
+
font-size: var(--openapi-explorer-font-size-input);
|
|
20
20
|
user-select: none;
|
|
21
21
|
white-space: nowrap;
|
|
22
22
|
border: 0px solid transparent;
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
.openapi-
|
|
37
|
+
.openapi-explorer__delete-btn {
|
|
38
38
|
-webkit-appearance: none;
|
|
39
39
|
-moz-appearance: none;
|
|
40
40
|
appearance: none;
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
.openapi-
|
|
80
|
+
.openapi-explorer__thin-btn {
|
|
81
81
|
-webkit-appearance: none;
|
|
82
82
|
-moz-appearance: none;
|
|
83
83
|
cursor: pointer;
|
|
@@ -112,11 +112,11 @@
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
.openapi-
|
|
115
|
+
.openapi-explorer__show-options {
|
|
116
116
|
visibility: visible;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
.openapi-
|
|
119
|
+
.openapi-explorer__hide-options {
|
|
120
120
|
display: none;
|
|
121
121
|
visibility: hidden;
|
|
122
122
|
}
|