docusaurus-theme-openapi-docs 0.0.0-618 → 0.0.0-684
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/index.d.ts +2 -0
- package/lib/index.js +53 -27
- package/lib/markdown/createDescription.d.ts +1 -0
- package/lib/markdown/createDescription.js +8 -11
- package/lib/markdown/schema.d.ts +3 -0
- package/lib/markdown/schema.js +138 -139
- package/lib/markdown/utils.d.ts +8 -0
- package/lib/markdown/utils.js +36 -42
- package/lib/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +165 -0
- package/lib/theme/ApiDemoPanel/ApiCodeBlock/Line/_Line.scss +46 -0
- package/lib/theme/ApiExplorer/Accept/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Accept/index.js +38 -0
- package/lib/theme/ApiExplorer/Accept/slice.d.ts +11 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Accept/slice.js +7 -5
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.js +29 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +30 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.js +134 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js +74 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +47 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +156 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +46 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.js +47 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +44 -0
- package/lib/theme/ApiExplorer/ApiCodeBlock/index.js +40 -0
- package/lib/theme/ApiExplorer/Authorization/auth-types.d.ts +3 -0
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/Authorization/auth-types.js +4 -10
- package/lib/theme/ApiExplorer/Authorization/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Authorization/index.js +157 -0
- package/lib/theme/ApiExplorer/Authorization/slice.d.ts +40 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Authorization/slice.js +23 -16
- package/lib/theme/ApiExplorer/Body/index.d.ts +10 -0
- package/lib/theme/ApiExplorer/Body/index.js +363 -0
- package/lib/theme/ApiExplorer/Body/slice.d.ts +82 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Body/slice.js +21 -12
- package/lib/theme/ApiExplorer/CodeSnippets/index.d.ts +20 -0
- package/lib/theme/ApiExplorer/CodeSnippets/index.js +406 -0
- package/lib/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +291 -0
- package/lib/theme/ApiExplorer/CodeTabs/index.js +174 -0
- package/lib/theme/ApiExplorer/ContentType/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/ContentType/index.js +40 -0
- package/lib/theme/ApiExplorer/ContentType/slice.d.ts +11 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/ContentType/slice.js +7 -5
- package/lib/theme/ApiExplorer/Export/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Export/index.js +57 -0
- package/lib/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +25 -0
- package/lib/theme/ApiExplorer/FloatingButton/index.d.ts +8 -0
- package/lib/theme/ApiExplorer/FloatingButton/index.js +28 -0
- package/{lib-next/theme/ApiDemoPanel/FormFileUpload/styles.module.css → lib/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss} +32 -35
- package/lib/theme/ApiExplorer/FormFileUpload/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/FormFileUpload/index.js +161 -0
- package/lib/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
- package/lib/theme/ApiExplorer/FormItem/index.d.ts +10 -0
- package/lib/theme/ApiExplorer/FormItem/index.js +44 -0
- package/lib/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
- package/lib/theme/ApiExplorer/FormMultiSelect/index.d.ts +9 -0
- package/lib/theme/ApiExplorer/FormMultiSelect/index.js +51 -0
- package/{src/theme/ApiDemoPanel/FormSelect/styles.module.css → lib/theme/ApiExplorer/FormSelect/_FormSelect.scss} +15 -23
- package/lib/theme/ApiExplorer/FormSelect/index.d.ts +8 -0
- package/lib/theme/ApiExplorer/FormSelect/index.js +35 -0
- package/lib/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
- package/lib/theme/ApiExplorer/FormTextInput/index.d.ts +9 -0
- package/lib/theme/ApiExplorer/FormTextInput/index.js +73 -0
- package/lib/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
- package/lib/theme/ApiExplorer/LiveEditor/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/LiveEditor/index.js +154 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/MethodEndpoint/index.js +83 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.js +194 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.js +63 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.js +89 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.js +63 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.d.ts +6 -0
- package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.js +38 -0
- package/{src/theme/ApiDemoPanel/ParamOptions/styles.module.css → lib/theme/ApiExplorer/ParamOptions/_ParamOptions.scss} +38 -92
- package/lib/theme/ApiExplorer/ParamOptions/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/ParamOptions/index.js +210 -0
- package/lib/theme/ApiExplorer/ParamOptions/slice.d.ts +17 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/ParamOptions/slice.js +7 -5
- package/lib/theme/ApiExplorer/Request/_Request.scss +122 -0
- package/lib/theme/ApiExplorer/Request/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/Request/index.js +365 -0
- package/lib/theme/ApiExplorer/Request/makeRequest.d.ts +4 -0
- package/{lib-next/theme/ApiDemoPanel/Execute → lib/theme/ApiExplorer/Request}/makeRequest.js +10 -9
- package/lib/theme/ApiExplorer/Response/_Response.scss +119 -0
- package/lib/theme/ApiExplorer/Response/index.d.ts +6 -0
- package/lib/theme/ApiExplorer/Response/index.js +190 -0
- package/lib/theme/ApiExplorer/Response/slice.d.ts +17 -0
- package/lib/theme/ApiExplorer/Response/slice.js +51 -0
- package/lib/theme/ApiExplorer/SecuritySchemes/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/SecuritySchemes/index.js +380 -0
- package/{src/theme/ApiDemoPanel/Request/styles.module.css → lib/theme/ApiExplorer/Server/_Server.scss} +15 -7
- package/lib/theme/ApiExplorer/Server/index.d.ts +3 -0
- package/lib/theme/ApiExplorer/Server/index.js +187 -0
- package/lib/theme/ApiExplorer/Server/slice.d.ts +13 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Server/slice.js +10 -5
- package/lib/theme/ApiExplorer/buildPostmanRequest.d.ts +20 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/buildPostmanRequest.js +27 -40
- package/lib/theme/ApiExplorer/index.d.ts +7 -0
- package/lib/theme/ApiExplorer/index.js +37 -0
- package/lib/theme/ApiExplorer/persistanceMiddleware.d.ts +3 -0
- package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/persistanceMiddleware.js +11 -14
- package/lib/theme/ApiExplorer/storage-utils.d.ts +4 -0
- package/lib/theme/{ApiDemoPanel → ApiExplorer}/storage-utils.js +14 -13
- package/lib/theme/ApiItem/Layout/index.d.ts +4 -0
- package/lib/theme/ApiItem/Layout/index.js +78 -56
- package/lib/theme/ApiItem/hooks.d.ts +12 -0
- package/lib/theme/ApiItem/hooks.js +5 -10
- package/lib/theme/ApiItem/index.d.ts +4 -0
- package/lib/theme/ApiItem/index.js +141 -118
- package/lib/theme/ApiItem/store.d.ts +46 -0
- package/lib/theme/ApiItem/store.js +44 -34
- package/lib/theme/ApiLogo/index.d.ts +2 -0
- package/lib/theme/ApiLogo/index.js +34 -32
- package/lib/theme/ApiTabs/_ApiTabs.scss +140 -0
- package/lib/theme/ApiTabs/index.js +105 -190
- package/lib/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +97 -0
- package/lib/theme/DiscriminatorTabs/index.js +102 -189
- package/lib/theme/Markdown/Details/_Details.scss +119 -0
- package/lib/theme/MimeTabs/_MimeTabs.scss +69 -0
- package/lib/theme/MimeTabs/index.js +125 -199
- package/lib/theme/ParamsItem/_ParamsItem.scss +54 -0
- package/lib/theme/ParamsItem/index.js +9 -8
- package/lib/theme/ResponseSamples/_ResponseSamples.scss +3 -0
- package/lib/theme/ResponseSamples/index.js +2 -7
- package/lib/theme/SchemaItem/_SchemaItem.scss +89 -0
- package/lib/theme/SchemaItem/index.js +31 -22
- package/lib/theme/SchemaTabs/_SchemaTabs.scss +64 -0
- package/lib/theme/SchemaTabs/index.js +97 -185
- package/lib/theme/styles.scss +160 -0
- package/lib/types.d.ts +157 -0
- package/lib/types.js +8 -1
- package/package.json +17 -23
- package/src/index.ts +33 -3
- package/src/theme/ApiDemoPanel/ApiCodeBlock/ExpandButton/index.js +165 -0
- package/src/theme/ApiDemoPanel/ApiCodeBlock/Line/_Line.scss +46 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Accept/index.tsx +2 -2
- package/src/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Container/index.js +29 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +30 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/String.js +134 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js +74 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +47 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +156 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +46 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/Line/index.js +47 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +44 -0
- package/src/theme/ApiExplorer/ApiCodeBlock/index.js +40 -0
- 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 +64 -41
- package/src/theme/{ApiDemoPanel/Curl → ApiExplorer/CodeSnippets}/index.tsx +94 -34
- package/src/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +291 -0
- package/src/theme/ApiExplorer/CodeTabs/index.js +174 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/ContentType/index.tsx +2 -2
- package/src/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +25 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FloatingButton/index.tsx +1 -3
- package/src/theme/{ApiDemoPanel/FormFileUpload/styles.module.css → ApiExplorer/FormFileUpload/_FormFileUpload.scss} +32 -35
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormFileUpload/index.tsx +10 -6
- package/src/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormItem/index.tsx +8 -12
- package/src/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormMultiSelect/index.tsx +6 -3
- package/{lib/theme/ApiDemoPanel/FormSelect/styles.module.css → src/theme/ApiExplorer/FormSelect/_FormSelect.scss} +15 -23
- package/src/theme/{ApiDemoPanel → ApiExplorer}/FormSelect/index.tsx +5 -3
- package/src/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
- package/src/theme/ApiExplorer/FormTextInput/index.tsx +80 -0
- package/src/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
- package/src/theme/ApiExplorer/LiveEditor/index.tsx +112 -0
- package/src/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
- package/src/theme/ApiExplorer/MethodEndpoint/index.tsx +87 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +156 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx +64 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx +86 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx +65 -0
- package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.tsx +38 -0
- package/{lib-next/theme/ApiDemoPanel/ParamOptions/styles.module.css → src/theme/ApiExplorer/ParamOptions/_ParamOptions.scss} +38 -92
- package/src/theme/ApiExplorer/ParamOptions/index.tsx +145 -0
- package/src/theme/ApiExplorer/Request/_Request.scss +122 -0
- package/src/theme/ApiExplorer/Request/index.tsx +286 -0
- package/src/theme/{ApiDemoPanel/Execute → ApiExplorer/Request}/makeRequest.ts +9 -6
- package/src/theme/ApiExplorer/Response/_Response.scss +119 -0
- package/src/theme/ApiExplorer/Response/index.tsx +154 -0
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Response/slice.ts +22 -1
- package/src/theme/{ApiDemoPanel → ApiExplorer}/SecuritySchemes/index.tsx +5 -3
- package/{lib/theme/ApiDemoPanel/Request/styles.module.css → src/theme/ApiExplorer/Server/_Server.scss} +15 -7
- package/src/theme/{ApiDemoPanel → ApiExplorer}/Server/index.tsx +13 -17
- package/src/theme/{ApiDemoPanel → ApiExplorer}/buildPostmanRequest.ts +2 -2
- package/src/theme/{ApiDemoPanel → ApiExplorer}/index.tsx +14 -17
- package/src/theme/{ApiDemoPanel → ApiExplorer}/persistanceMiddleware.ts +1 -1
- package/src/theme/ApiItem/index.tsx +7 -7
- package/src/theme/ApiItem/store.ts +7 -7
- package/src/theme/ApiTabs/_ApiTabs.scss +140 -0
- package/src/theme/ApiTabs/index.js +105 -190
- package/src/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +97 -0
- package/src/theme/DiscriminatorTabs/index.js +102 -189
- package/src/theme/Markdown/Details/_Details.scss +119 -0
- package/src/theme/MimeTabs/_MimeTabs.scss +69 -0
- package/src/theme/MimeTabs/index.js +125 -199
- package/src/theme/ParamsItem/_ParamsItem.scss +54 -0
- package/src/theme/ParamsItem/index.js +9 -8
- package/src/theme/ResponseSamples/_ResponseSamples.scss +3 -0
- package/src/theme/ResponseSamples/index.js +2 -7
- package/src/theme/SchemaItem/_SchemaItem.scss +89 -0
- package/src/theme/SchemaItem/index.js +31 -22
- package/src/theme/SchemaTabs/_SchemaTabs.scss +64 -0
- package/src/theme/SchemaTabs/index.js +97 -185
- package/src/theme/styles.scss +160 -0
- package/src/theme-openapi.d.ts +90 -47
- package/tsconfig.json +6 -3
- package/lib/postman-code-generators.d.ts +0 -9
- package/lib/react-magic-dropzone.d.ts +0 -9
- package/lib/theme/ApiDemoPanel/Accept/index.js +0 -32
- package/lib/theme/ApiDemoPanel/Accept/slice.js +0 -31
- package/lib/theme/ApiDemoPanel/Authorization/index.js +0 -107
- package/lib/theme/ApiDemoPanel/Authorization/slice.js +0 -123
- package/lib/theme/ApiDemoPanel/Body/index.js +0 -256
- package/lib/theme/ApiDemoPanel/Body/slice.js +0 -102
- package/lib/theme/ApiDemoPanel/CodeTabs/index.js +0 -161
- package/lib/theme/ApiDemoPanel/CodeTabs/styles.module.css +0 -17
- package/lib/theme/ApiDemoPanel/ContentType/index.js +0 -32
- package/lib/theme/ApiDemoPanel/ContentType/slice.js +0 -31
- package/lib/theme/ApiDemoPanel/Curl/index.js +0 -240
- package/lib/theme/ApiDemoPanel/Curl/styles.module.css +0 -84
- package/lib/theme/ApiDemoPanel/Execute/index.js +0 -151
- package/lib/theme/ApiDemoPanel/Execute/makeRequest.js +0 -181
- package/lib/theme/ApiDemoPanel/Export/index.js +0 -47
- package/lib/theme/ApiDemoPanel/FloatingButton/index.js +0 -30
- package/lib/theme/ApiDemoPanel/FloatingButton/styles.module.css +0 -26
- package/lib/theme/ApiDemoPanel/FormFileUpload/index.js +0 -83
- package/lib/theme/ApiDemoPanel/FormFileUpload/styles.module.css +0 -75
- package/lib/theme/ApiDemoPanel/FormItem/index.js +0 -38
- package/lib/theme/ApiDemoPanel/FormItem/styles.module.css +0 -12
- package/lib/theme/ApiDemoPanel/FormMultiSelect/index.js +0 -45
- package/lib/theme/ApiDemoPanel/FormMultiSelect/styles.module.css +0 -38
- package/lib/theme/ApiDemoPanel/FormSelect/index.js +0 -34
- package/lib/theme/ApiDemoPanel/FormTextInput/index.js +0 -28
- package/lib/theme/ApiDemoPanel/FormTextInput/styles.module.css +0 -21
- package/lib/theme/ApiDemoPanel/LiveEditor/index.js +0 -62
- package/lib/theme/ApiDemoPanel/LiveEditor/styles.module.css +0 -35
- package/lib/theme/ApiDemoPanel/MethodEndpoint/index.js +0 -56
- package/lib/theme/ApiDemoPanel/ParamOptions/index.js +0 -216
- package/lib/theme/ApiDemoPanel/ParamOptions/slice.js +0 -34
- package/lib/theme/ApiDemoPanel/ParamOptions/styles.module.css +0 -176
- package/lib/theme/ApiDemoPanel/Request/index.js +0 -67
- package/lib/theme/ApiDemoPanel/Response/index.js +0 -66
- package/lib/theme/ApiDemoPanel/Response/slice.js +0 -36
- package/lib/theme/ApiDemoPanel/SecuritySchemes/index.js +0 -257
- package/lib/theme/ApiDemoPanel/Server/index.js +0 -104
- package/lib/theme/ApiDemoPanel/Server/slice.js +0 -40
- package/lib/theme/ApiDemoPanel/Server/styles.module.css +0 -56
- package/lib/theme/ApiDemoPanel/buildPostmanRequest.js +0 -303
- package/lib/theme/ApiDemoPanel/index.js +0 -41
- package/lib/theme/ApiDemoPanel/persistanceMiddleware.js +0 -59
- package/lib/theme/ApiDemoPanel/postman-collection.d.ts +0 -10
- package/lib/theme/ApiDemoPanel/react-modal.d.ts +0 -8
- package/lib/theme/ApiTabs/styles.module.css +0 -120
- package/lib/theme/DiscriminatorTabs/styles.module.css +0 -119
- package/lib/theme/MimeTabs/styles.module.css +0 -126
- package/lib/theme/ParamsItem/styles.module.css +0 -24
- package/lib/theme/ResponseSamples/styles.module.css +0 -7
- package/lib/theme/SchemaItem/styles.module.css +0 -38
- package/lib/theme/SchemaTabs/styles.module.css +0 -110
- package/lib/theme/styles.css +0 -520
- package/lib/theme-classic.d.ts +0 -13
- package/lib/theme-openapi.d.ts +0 -234
- package/lib/theme-translations.d.ts +0 -9
- package/lib-next/index.js +0 -29
- package/lib-next/markdown/createDescription.js +0 -13
- package/lib-next/markdown/schema.js +0 -153
- package/lib-next/markdown/utils.js +0 -44
- package/lib-next/postman-code-generators.d.ts +0 -9
- package/lib-next/react-magic-dropzone.d.ts +0 -9
- package/lib-next/theme/ApiDemoPanel/Accept/index.js +0 -30
- package/lib-next/theme/ApiDemoPanel/Authorization/auth-types.js +0 -29
- package/lib-next/theme/ApiDemoPanel/Authorization/index.js +0 -142
- package/lib-next/theme/ApiDemoPanel/Body/index.js +0 -324
- package/lib-next/theme/ApiDemoPanel/CodeTabs/index.js +0 -201
- package/lib-next/theme/ApiDemoPanel/CodeTabs/styles.module.css +0 -17
- package/lib-next/theme/ApiDemoPanel/ContentType/index.js +0 -30
- package/lib-next/theme/ApiDemoPanel/Curl/index.js +0 -283
- package/lib-next/theme/ApiDemoPanel/Curl/styles.module.css +0 -84
- package/lib-next/theme/ApiDemoPanel/Execute/index.js +0 -167
- package/lib-next/theme/ApiDemoPanel/Export/index.js +0 -45
- package/lib-next/theme/ApiDemoPanel/FloatingButton/index.js +0 -22
- package/lib-next/theme/ApiDemoPanel/FloatingButton/styles.module.css +0 -26
- package/lib-next/theme/ApiDemoPanel/FormFileUpload/index.js +0 -106
- package/lib-next/theme/ApiDemoPanel/FormItem/index.js +0 -36
- package/lib-next/theme/ApiDemoPanel/FormItem/styles.module.css +0 -12
- package/lib-next/theme/ApiDemoPanel/FormMultiSelect/index.js +0 -45
- package/lib-next/theme/ApiDemoPanel/FormMultiSelect/styles.module.css +0 -38
- package/lib-next/theme/ApiDemoPanel/FormSelect/index.js +0 -26
- package/lib-next/theme/ApiDemoPanel/FormSelect/styles.module.css +0 -51
- package/lib-next/theme/ApiDemoPanel/FormTextInput/index.js +0 -24
- package/lib-next/theme/ApiDemoPanel/FormTextInput/styles.module.css +0 -21
- package/lib-next/theme/ApiDemoPanel/LiveEditor/index.js +0 -59
- package/lib-next/theme/ApiDemoPanel/LiveEditor/styles.module.css +0 -35
- package/lib-next/theme/ApiDemoPanel/MethodEndpoint/index.js +0 -53
- package/lib-next/theme/ApiDemoPanel/ParamOptions/index.js +0 -292
- package/lib-next/theme/ApiDemoPanel/Request/index.js +0 -60
- package/lib-next/theme/ApiDemoPanel/Request/styles.module.css +0 -18
- package/lib-next/theme/ApiDemoPanel/Response/index.js +0 -67
- package/lib-next/theme/ApiDemoPanel/Response/slice.js +0 -23
- package/lib-next/theme/ApiDemoPanel/SecuritySchemes/index.js +0 -274
- package/lib-next/theme/ApiDemoPanel/Server/index.js +0 -132
- package/lib-next/theme/ApiDemoPanel/Server/styles.module.css +0 -56
- package/lib-next/theme/ApiDemoPanel/index.js +0 -28
- package/lib-next/theme/ApiDemoPanel/storage-utils.js +0 -33
- package/lib-next/theme/ApiItem/Layout/index.js +0 -68
- package/lib-next/theme/ApiItem/Layout/styles.module.css +0 -17
- package/lib-next/theme/ApiItem/hooks.js +0 -10
- package/lib-next/theme/ApiItem/index.js +0 -155
- package/lib-next/theme/ApiItem/store.js +0 -38
- package/lib-next/theme/ApiLogo/index.js +0 -48
- package/lib-next/theme/ApiTabs/index.js +0 -277
- package/lib-next/theme/ApiTabs/styles.module.css +0 -120
- package/lib-next/theme/DiscriminatorTabs/index.js +0 -272
- package/lib-next/theme/DiscriminatorTabs/styles.module.css +0 -119
- package/lib-next/theme/MimeTabs/index.js +0 -295
- package/lib-next/theme/MimeTabs/styles.module.css +0 -126
- package/lib-next/theme/ParamsItem/index.js +0 -135
- package/lib-next/theme/ParamsItem/styles.module.css +0 -24
- package/lib-next/theme/ResponseSamples/index.js +0 -27
- package/lib-next/theme/ResponseSamples/styles.module.css +0 -7
- package/lib-next/theme/SchemaItem/index.js +0 -114
- package/lib-next/theme/SchemaItem/styles.module.css +0 -38
- package/lib-next/theme/SchemaTabs/index.js +0 -270
- package/lib-next/theme/SchemaTabs/styles.module.css +0 -110
- package/lib-next/theme/styles.css +0 -520
- package/lib-next/theme-classic.d.ts +0 -13
- package/lib-next/theme-openapi.d.ts +0 -234
- package/lib-next/theme-translations.d.ts +0 -9
- package/lib-next/types.js +0 -1
- package/src/theme/ApiDemoPanel/Body/json2xml.js +0 -43
- package/src/theme/ApiDemoPanel/CodeTabs/index.tsx +0 -239
- package/src/theme/ApiDemoPanel/CodeTabs/styles.module.css +0 -17
- package/src/theme/ApiDemoPanel/Curl/languages.json +0 -1386
- package/src/theme/ApiDemoPanel/Curl/styles.module.css +0 -84
- package/src/theme/ApiDemoPanel/Execute/index.tsx +0 -189
- package/src/theme/ApiDemoPanel/FloatingButton/styles.module.css +0 -26
- package/src/theme/ApiDemoPanel/FormItem/styles.module.css +0 -12
- package/src/theme/ApiDemoPanel/FormMultiSelect/styles.module.css +0 -38
- package/src/theme/ApiDemoPanel/FormTextInput/index.tsx +0 -34
- package/src/theme/ApiDemoPanel/FormTextInput/styles.module.css +0 -21
- package/src/theme/ApiDemoPanel/LiveEditor/index.tsx +0 -75
- package/src/theme/ApiDemoPanel/LiveEditor/styles.module.css +0 -35
- package/src/theme/ApiDemoPanel/MethodEndpoint/index.tsx +0 -62
- package/src/theme/ApiDemoPanel/ParamOptions/index.tsx +0 -326
- package/src/theme/ApiDemoPanel/Request/index.tsx +0 -71
- package/src/theme/ApiDemoPanel/Response/index.tsx +0 -75
- package/src/theme/ApiDemoPanel/Server/styles.module.css +0 -56
- package/src/theme/ApiDemoPanel/postman-collection.d.ts +0 -10
- package/src/theme/ApiDemoPanel/react-modal.d.ts +0 -8
- package/src/theme/ApiTabs/styles.module.css +0 -120
- package/src/theme/DiscriminatorTabs/styles.module.css +0 -119
- package/src/theme/MimeTabs/styles.module.css +0 -126
- package/src/theme/ParamsItem/styles.module.css +0 -24
- package/src/theme/ResponseSamples/styles.module.css +0 -7
- package/src/theme/SchemaItem/styles.module.css +0 -38
- package/src/theme/SchemaTabs/styles.module.css +0 -110
- package/src/theme/styles.css +0 -520
- /package/{lib-next/theme/ApiDemoPanel → lib/theme/ApiExplorer}/Body/json2xml.js +0 -0
- /package/{lib-next/theme/ApiDemoPanel/Curl → lib/theme/ApiExplorer/CodeSnippets}/languages.json +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Accept/slice.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Authorization/auth-types.ts +0 -0
- /package/{lib/theme/ApiDemoPanel → src/theme/ApiExplorer}/Body/json2xml.js +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Body/slice.ts +0 -0
- /package/{lib/theme/ApiDemoPanel/Curl → src/theme/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}/ParamOptions/slice.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/Server/slice.ts +0 -0
- /package/{lib-next/theme/ApiDemoPanel → src/theme/ApiExplorer}/postman-collection.d.ts +0 -0
- /package/{lib-next/theme/ApiDemoPanel → src/theme/ApiExplorer}/react-modal.d.ts +0 -0
- /package/src/theme/{ApiDemoPanel → ApiExplorer}/storage-utils.ts +0 -0
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
.buttonGroup {
|
|
2
|
-
background: var(--openapi-card-background-color);
|
|
3
|
-
color: var(--ifm-pre-color);
|
|
4
|
-
font-family: var(--ifm-font-family-monospace);
|
|
5
|
-
/* font-size: var(--ifm-code-font-size); */
|
|
6
|
-
/* line-height: var(--ifm-pre-line-height); */
|
|
7
|
-
/* margin-bottom: calc(var(--ifm-spacing-vertical) / 4); */
|
|
8
|
-
margin-bottom: 1px;
|
|
9
|
-
margin-top: 0;
|
|
10
|
-
border-radius: var(--openapi-card-border-radius)
|
|
11
|
-
var(--openapi-card-border-radius) 2px 2px;
|
|
12
|
-
display: flex;
|
|
13
|
-
justify-content: flex-end;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.buttonGroup button {
|
|
17
|
-
-webkit-appearance: none;
|
|
18
|
-
-moz-appearance: none;
|
|
19
|
-
appearance: none;
|
|
20
|
-
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
/* font-size: calc(0.875rem * var(--ifm-button-size-multiplier)); */
|
|
23
|
-
/* line-height: 1.5; */
|
|
24
|
-
/* font-weight: var(--ifm-button-font-weight); */
|
|
25
|
-
|
|
26
|
-
/* font-size: var(--ifm-code-font-size); */
|
|
27
|
-
font-size: 13.3333px;
|
|
28
|
-
line-height: var(--ifm-pre-line-height);
|
|
29
|
-
font-weight: var(--ifm-font-weight-semibold);
|
|
30
|
-
|
|
31
|
-
padding: calc(
|
|
32
|
-
var(--ifm-button-padding-vertical) * var(--ifm-button-size-multiplier)
|
|
33
|
-
)
|
|
34
|
-
calc(
|
|
35
|
-
var(--ifm-button-padding-horizontal) * var(--ifm-button-size-multiplier)
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
text-align: center;
|
|
39
|
-
|
|
40
|
-
transition: color var(--ifm-button-transition-duration)
|
|
41
|
-
cubic-bezier(0.08, 0.52, 0.52, 1),
|
|
42
|
-
background var(--ifm-button-transition-duration)
|
|
43
|
-
cubic-bezier(0.08, 0.52, 0.52, 1),
|
|
44
|
-
border-color var(--ifm-button-transition-duration)
|
|
45
|
-
cubic-bezier(0.08, 0.52, 0.52, 1);
|
|
46
|
-
-webkit-user-select: none;
|
|
47
|
-
user-select: none;
|
|
48
|
-
white-space: nowrap;
|
|
49
|
-
|
|
50
|
-
background: transparent;
|
|
51
|
-
|
|
52
|
-
color: var(--ifm-menu-color);
|
|
53
|
-
border: 0px solid transparent;
|
|
54
|
-
/* border-radius: var(--ifm-pre-border-radius); */
|
|
55
|
-
|
|
56
|
-
--margin: 0.25rem;
|
|
57
|
-
|
|
58
|
-
border-radius: calc(var(--margin));
|
|
59
|
-
/* border-radius: 0.25rem; */
|
|
60
|
-
|
|
61
|
-
display: block;
|
|
62
|
-
width: 100%;
|
|
63
|
-
|
|
64
|
-
/* margin: 2px; */
|
|
65
|
-
margin: var(--margin);
|
|
66
|
-
margin-right: 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.buttonGroup button:last-child {
|
|
70
|
-
margin-right: 0.25rem;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.buttonGroup button:hover {
|
|
74
|
-
background: var(--ifm-menu-color-background-active);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.buttonGroup button:focus {
|
|
78
|
-
outline: 0;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.buttonGroup button.selected {
|
|
82
|
-
background: var(--ifm-menu-color-background-active);
|
|
83
|
-
color: var(--ifm-menu-color-active);
|
|
84
|
-
}
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
/* ============================================================================
|
|
2
|
-
* Copyright (c) Palo Alto Networks
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
* ========================================================================== */
|
|
7
|
-
|
|
8
|
-
import React from "react";
|
|
9
|
-
|
|
10
|
-
import sdk from "@paloaltonetworks/postman-collection";
|
|
11
|
-
import buildPostmanRequest from "@theme/ApiDemoPanel/buildPostmanRequest";
|
|
12
|
-
import { Param } from "@theme/ApiDemoPanel/ParamOptions/slice";
|
|
13
|
-
import { setResponse } from "@theme/ApiDemoPanel/Response/slice";
|
|
14
|
-
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
|
|
15
|
-
import Modal from "react-modal";
|
|
16
|
-
|
|
17
|
-
import makeRequest from "./makeRequest";
|
|
18
|
-
|
|
19
|
-
function validateRequest(params: {
|
|
20
|
-
path: Param[];
|
|
21
|
-
query: Param[];
|
|
22
|
-
header: Param[];
|
|
23
|
-
cookie: Param[];
|
|
24
|
-
}) {
|
|
25
|
-
for (let paramList of Object.values(params)) {
|
|
26
|
-
for (let param of paramList) {
|
|
27
|
-
if (param.required && !param.value) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface Props {
|
|
36
|
-
postman: sdk.Request;
|
|
37
|
-
proxy?: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function Execute({ postman, proxy }: Props) {
|
|
41
|
-
const pathParams = useTypedSelector((state: any) => state.params.path);
|
|
42
|
-
const queryParams = useTypedSelector((state: any) => state.params.query);
|
|
43
|
-
const cookieParams = useTypedSelector((state: any) => state.params.cookie);
|
|
44
|
-
const headerParams = useTypedSelector((state: any) => state.params.header);
|
|
45
|
-
const contentType = useTypedSelector((state: any) => state.contentType.value);
|
|
46
|
-
const body = useTypedSelector((state: any) => state.body);
|
|
47
|
-
const accept = useTypedSelector((state: any) => state.accept.value);
|
|
48
|
-
const server = useTypedSelector((state: any) => state.server.value);
|
|
49
|
-
const params = useTypedSelector((state: any) => state.params);
|
|
50
|
-
const auth = useTypedSelector((state: any) => state.auth);
|
|
51
|
-
|
|
52
|
-
const isValidRequest = validateRequest(params);
|
|
53
|
-
|
|
54
|
-
const dispatch = useTypedDispatch();
|
|
55
|
-
|
|
56
|
-
const postmanRequest = buildPostmanRequest(postman, {
|
|
57
|
-
queryParams,
|
|
58
|
-
pathParams,
|
|
59
|
-
cookieParams,
|
|
60
|
-
contentType,
|
|
61
|
-
accept,
|
|
62
|
-
headerParams,
|
|
63
|
-
body,
|
|
64
|
-
server,
|
|
65
|
-
auth,
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
const delay = (ms: number) =>
|
|
69
|
-
new Promise((resolve) => setTimeout(resolve, ms));
|
|
70
|
-
|
|
71
|
-
function openModal() {
|
|
72
|
-
setIsOpen(true);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function closeModal() {
|
|
76
|
-
setIsOpen(false);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
function acceptAgreement() {
|
|
80
|
-
setIsOpen(false);
|
|
81
|
-
setAgreementAccepted(true);
|
|
82
|
-
sessionStorage.setItem("agreement-ack", "true");
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const [modalIsOpen, setIsOpen] = React.useState(false);
|
|
86
|
-
// Set the following as default value to persist to session and enable modal
|
|
87
|
-
// sessionStorage.getItem("agreement-ack") === "true"
|
|
88
|
-
const [agreementAccepted, setAgreementAccepted] = React.useState(true);
|
|
89
|
-
|
|
90
|
-
const customStyles = {
|
|
91
|
-
overlay: {
|
|
92
|
-
backdropFilter: "blur(10px)",
|
|
93
|
-
backgroundColor: "transparent",
|
|
94
|
-
},
|
|
95
|
-
content: {
|
|
96
|
-
top: "50%",
|
|
97
|
-
left: "50%",
|
|
98
|
-
right: "auto",
|
|
99
|
-
bottom: "auto",
|
|
100
|
-
marginRight: "-50%",
|
|
101
|
-
border: "none",
|
|
102
|
-
padding: "none",
|
|
103
|
-
borderRadius: "var(--openapi-card-border-radius)",
|
|
104
|
-
background: "var(--ifm-card-background-color)",
|
|
105
|
-
transform: "translate(-50%, -50%)",
|
|
106
|
-
maxWidth: "550px",
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
if (agreementAccepted) {
|
|
111
|
-
return (
|
|
112
|
-
<button
|
|
113
|
-
className="button button--sm button--secondary"
|
|
114
|
-
disabled={!isValidRequest}
|
|
115
|
-
style={!isValidRequest ? { pointerEvents: "all" } : {}}
|
|
116
|
-
onClick={async () => {
|
|
117
|
-
dispatch(setResponse("Fetching..."));
|
|
118
|
-
try {
|
|
119
|
-
await delay(1200);
|
|
120
|
-
const res = await makeRequest(postmanRequest, proxy, body);
|
|
121
|
-
dispatch(setResponse(res));
|
|
122
|
-
} catch (e: any) {
|
|
123
|
-
console.log(e);
|
|
124
|
-
dispatch(setResponse("Connection failed"));
|
|
125
|
-
}
|
|
126
|
-
}}
|
|
127
|
-
>
|
|
128
|
-
Send API Request
|
|
129
|
-
</button>
|
|
130
|
-
);
|
|
131
|
-
} else {
|
|
132
|
-
return (
|
|
133
|
-
<React.Fragment>
|
|
134
|
-
<button
|
|
135
|
-
className="button button--sm button--secondary"
|
|
136
|
-
onClick={openModal}
|
|
137
|
-
>
|
|
138
|
-
Send API Request
|
|
139
|
-
</button>
|
|
140
|
-
<Modal
|
|
141
|
-
isOpen={modalIsOpen}
|
|
142
|
-
onRequestClose={closeModal}
|
|
143
|
-
style={customStyles}
|
|
144
|
-
contentLabel="Terms of Use"
|
|
145
|
-
>
|
|
146
|
-
<form>
|
|
147
|
-
<div className="card">
|
|
148
|
-
<div className="card__header">
|
|
149
|
-
<h2>Terms of Use</h2>
|
|
150
|
-
<hr></hr>
|
|
151
|
-
</div>
|
|
152
|
-
<div className="card__body">
|
|
153
|
-
<p>
|
|
154
|
-
By accepting this agreement the end user acknowledges the
|
|
155
|
-
risks of performing authenticated and non-authenticated API
|
|
156
|
-
requests from the browser.
|
|
157
|
-
</p>
|
|
158
|
-
<p>
|
|
159
|
-
The end user also accepts the responsibility of safeguarding
|
|
160
|
-
API credentials and any potentially sensitive data returned by
|
|
161
|
-
the API.
|
|
162
|
-
</p>
|
|
163
|
-
<br></br>
|
|
164
|
-
</div>
|
|
165
|
-
<div className="card__footer">
|
|
166
|
-
<div className="button-group button-group--block">
|
|
167
|
-
<button
|
|
168
|
-
className="button button--sm button--outline button--success"
|
|
169
|
-
onClick={acceptAgreement}
|
|
170
|
-
>
|
|
171
|
-
AGREE
|
|
172
|
-
</button>
|
|
173
|
-
<button
|
|
174
|
-
className="button button--sm button--outline button--danger"
|
|
175
|
-
onClick={closeModal}
|
|
176
|
-
>
|
|
177
|
-
DISAGREE
|
|
178
|
-
</button>
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
</div>
|
|
182
|
-
</form>
|
|
183
|
-
</Modal>
|
|
184
|
-
</React.Fragment>
|
|
185
|
-
);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export default Execute;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
.floatingButton {
|
|
2
|
-
position: relative;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.floatingButton button {
|
|
6
|
-
position: relative;
|
|
7
|
-
background: var(--ifm-color-emphasis-900);
|
|
8
|
-
border: none;
|
|
9
|
-
border-radius: var(--ifm-global-radius);
|
|
10
|
-
color: var(--ifm-color-emphasis-100);
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
padding: 0.4rem 0.5rem;
|
|
13
|
-
opacity: 0;
|
|
14
|
-
visibility: hidden;
|
|
15
|
-
transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out,
|
|
16
|
-
bottom 0.2s ease-in-out;
|
|
17
|
-
position: absolute;
|
|
18
|
-
right: calc(var(--ifm-pre-padding) / 2);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.floatingButton:hover button,
|
|
22
|
-
.floatingButton:focus-visible button,
|
|
23
|
-
.floatingButton button:focus-visible {
|
|
24
|
-
visibility: visible;
|
|
25
|
-
opacity: 1;
|
|
26
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
.inputBase {
|
|
2
|
-
margin-top: calc(var(--ifm-pre-padding) / 2);
|
|
3
|
-
/* height: 40px; */
|
|
4
|
-
background-color: var(--openapi-input-background);
|
|
5
|
-
border: none;
|
|
6
|
-
outline: none;
|
|
7
|
-
width: 100%;
|
|
8
|
-
font-size: var(--ifm-code-font-size);
|
|
9
|
-
color: var(--ifm-pre-color);
|
|
10
|
-
padding: 12px var(--ifm-pre-padding);
|
|
11
|
-
|
|
12
|
-
border-radius: 4px;
|
|
13
|
-
border: 2px solid transparent;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.selectInput {
|
|
17
|
-
composes: inputBase;
|
|
18
|
-
-moz-appearance: none;
|
|
19
|
-
-webkit-appearance: none;
|
|
20
|
-
appearance: none;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.selectInput option {
|
|
24
|
-
border-radius: 0.25rem;
|
|
25
|
-
color: var(--ifm-menu-color);
|
|
26
|
-
margin: 0.25rem 0;
|
|
27
|
-
padding: var(--ifm-menu-link-padding-vertical)
|
|
28
|
-
var(--ifm-menu-link-padding-horizontal);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.selectInput:focus option:checked {
|
|
32
|
-
/* background: #0f62fe linear-gradient(0deg, #0f62fe 0%, #0f62fe 100%); */
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.selectInput:focus {
|
|
36
|
-
/* box-shadow: inset 0px 0px 0px 2px white; */
|
|
37
|
-
border: 2px solid var(--openapi-input-border);
|
|
38
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/* ============================================================================
|
|
2
|
-
* Copyright (c) Palo Alto Networks
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
* ========================================================================== */
|
|
7
|
-
|
|
8
|
-
import React from "react";
|
|
9
|
-
|
|
10
|
-
import styles from "./styles.module.css";
|
|
11
|
-
|
|
12
|
-
export interface Props {
|
|
13
|
-
value?: string;
|
|
14
|
-
placeholder?: string;
|
|
15
|
-
password?: boolean;
|
|
16
|
-
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function FormTextInput({ value, placeholder, password, onChange }: Props) {
|
|
20
|
-
placeholder = placeholder?.split("\n")[0];
|
|
21
|
-
return (
|
|
22
|
-
<input
|
|
23
|
-
className={styles.input}
|
|
24
|
-
type={password ? "password" : "text"}
|
|
25
|
-
placeholder={placeholder}
|
|
26
|
-
title={placeholder}
|
|
27
|
-
value={value}
|
|
28
|
-
onChange={onChange}
|
|
29
|
-
autoComplete="off"
|
|
30
|
-
/>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export default FormTextInput;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
.inputBase {
|
|
2
|
-
margin-top: calc(var(--ifm-pre-padding) / 2);
|
|
3
|
-
/* height: 40px; */
|
|
4
|
-
background-color: var(--openapi-input-background);
|
|
5
|
-
border: none;
|
|
6
|
-
outline: none;
|
|
7
|
-
width: 100%;
|
|
8
|
-
font-size: var(--ifm-code-font-size);
|
|
9
|
-
color: var(--ifm-pre-color);
|
|
10
|
-
padding: 12px var(--ifm-pre-padding);
|
|
11
|
-
|
|
12
|
-
border-radius: 4px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.input {
|
|
16
|
-
composes: inputBase;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.input:focus {
|
|
20
|
-
box-shadow: inset 0px 0px 0px 2px var(--openapi-input-border);
|
|
21
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/* ============================================================================
|
|
2
|
-
* Copyright (c) Palo Alto Networks
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
* ========================================================================== */
|
|
7
|
-
|
|
8
|
-
import React, { useEffect, useState } from "react";
|
|
9
|
-
|
|
10
|
-
import { usePrismTheme } from "@docusaurus/theme-common";
|
|
11
|
-
import useIsBrowser from "@docusaurus/useIsBrowser";
|
|
12
|
-
import { setStringRawBody } from "@theme/ApiDemoPanel/Body/slice";
|
|
13
|
-
import { LiveProvider, LiveEditor, withLive } from "react-live";
|
|
14
|
-
|
|
15
|
-
import styles from "./styles.module.css";
|
|
16
|
-
|
|
17
|
-
function Live({ onEdit }: any) {
|
|
18
|
-
const isBrowser = useIsBrowser();
|
|
19
|
-
const [editorDisabled, setEditorDisabled] = useState(false);
|
|
20
|
-
|
|
21
|
-
// TODO: Temporary solution for disabling tab key
|
|
22
|
-
const handleKeydown = (event: React.KeyboardEvent) => {
|
|
23
|
-
if (event.key === "Tab") {
|
|
24
|
-
event.preventDefault();
|
|
25
|
-
setEditorDisabled(true);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<div onClick={() => setEditorDisabled(false)}>
|
|
31
|
-
<LiveEditor
|
|
32
|
-
key={String(isBrowser)}
|
|
33
|
-
className={styles.playgroundEditor}
|
|
34
|
-
onChange={onEdit}
|
|
35
|
-
disabled={editorDisabled}
|
|
36
|
-
onKeyDown={handleKeydown}
|
|
37
|
-
/>
|
|
38
|
-
</div>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const LiveComponent = withLive(Live);
|
|
43
|
-
|
|
44
|
-
function App({
|
|
45
|
-
children,
|
|
46
|
-
transformCode,
|
|
47
|
-
value,
|
|
48
|
-
language,
|
|
49
|
-
action,
|
|
50
|
-
...props
|
|
51
|
-
}: any): JSX.Element {
|
|
52
|
-
const prismTheme = usePrismTheme();
|
|
53
|
-
const [code, setCode] = React.useState(children);
|
|
54
|
-
|
|
55
|
-
useEffect(() => {
|
|
56
|
-
action(setStringRawBody(code));
|
|
57
|
-
}, [action, code]);
|
|
58
|
-
|
|
59
|
-
return (
|
|
60
|
-
<div className={styles.playgroundContainer}>
|
|
61
|
-
<LiveProvider
|
|
62
|
-
code={children.replace(/\n$/, "")}
|
|
63
|
-
transformCode={transformCode ?? ((code) => `${code};`)}
|
|
64
|
-
theme={prismTheme}
|
|
65
|
-
language={language}
|
|
66
|
-
{...props}
|
|
67
|
-
>
|
|
68
|
-
<LiveComponent onEdit={setCode} />
|
|
69
|
-
</LiveProvider>
|
|
70
|
-
</div>
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const LiveApp = withLive(App);
|
|
75
|
-
export default LiveApp;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
.playgroundContainer {
|
|
2
|
-
margin-top: 1rem;
|
|
3
|
-
margin-bottom: var(--ifm-leading);
|
|
4
|
-
border-radius: var(--ifm-global-radius);
|
|
5
|
-
box-shadow: var(--ifm-global-shadow-lw);
|
|
6
|
-
overflow: auto;
|
|
7
|
-
max-height: 500px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.playgroundHeader {
|
|
11
|
-
letter-spacing: 0.08rem;
|
|
12
|
-
padding: 0.75rem;
|
|
13
|
-
text-transform: uppercase;
|
|
14
|
-
font-weight: bold;
|
|
15
|
-
background: var(--ifm-color-emphasis-200);
|
|
16
|
-
color: var(--ifm-color-content);
|
|
17
|
-
font-size: var(--ifm-code-font-size);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.playgroundHeader:first-of-type {
|
|
21
|
-
background: var(--ifm-color-emphasis-600);
|
|
22
|
-
color: var(--ifm-color-content-inverse);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.playgroundEditor {
|
|
26
|
-
font: var(--ifm-code-font-size) / var(--ifm-pre-line-height)
|
|
27
|
-
var(--ifm-font-family-monospace) !important;
|
|
28
|
-
/* rtl:ignore */
|
|
29
|
-
direction: ltr;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.playgroundPreview {
|
|
33
|
-
padding: 1rem;
|
|
34
|
-
background-color: var(--ifm-pre-background);
|
|
35
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/* ============================================================================
|
|
2
|
-
* Copyright (c) Palo Alto Networks
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
* ========================================================================== */
|
|
7
|
-
|
|
8
|
-
import React from "react";
|
|
9
|
-
|
|
10
|
-
const methodStyle = {
|
|
11
|
-
borderRadius: "var(--ifm-global-radius)",
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
function colorForMethod(method: string) {
|
|
15
|
-
switch (method.toLowerCase()) {
|
|
16
|
-
case "get":
|
|
17
|
-
return "primary";
|
|
18
|
-
case "post":
|
|
19
|
-
return "success";
|
|
20
|
-
case "delete":
|
|
21
|
-
return "danger";
|
|
22
|
-
case "put":
|
|
23
|
-
return "info";
|
|
24
|
-
case "patch":
|
|
25
|
-
return "warning";
|
|
26
|
-
case "head":
|
|
27
|
-
return "secondary";
|
|
28
|
-
case "event":
|
|
29
|
-
return "secondary";
|
|
30
|
-
default:
|
|
31
|
-
return undefined;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface Props {
|
|
36
|
-
method: string;
|
|
37
|
-
path: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function MethodEndpoint({ method, path }: Props) {
|
|
41
|
-
return (
|
|
42
|
-
<pre
|
|
43
|
-
className="openapi-method-endpoint"
|
|
44
|
-
style={{
|
|
45
|
-
background: "var(--openapi-card-background-color)",
|
|
46
|
-
borderRadius: "var(--openapi-card-border-radius)",
|
|
47
|
-
}}
|
|
48
|
-
>
|
|
49
|
-
<span
|
|
50
|
-
style={methodStyle}
|
|
51
|
-
className={"badge badge--" + colorForMethod(method)}
|
|
52
|
-
>
|
|
53
|
-
{method.toUpperCase()}
|
|
54
|
-
</span>{" "}
|
|
55
|
-
<span className="openapi-method-endpoint__path">
|
|
56
|
-
{path.replace(/{([a-z0-9-_]+)}/gi, ":$1")}
|
|
57
|
-
</span>
|
|
58
|
-
</pre>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export default MethodEndpoint;
|