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,257 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _Link = _interopRequireDefault(require("@docusaurus/Link"));
|
|
9
|
-
var _hooks = require("@theme/ApiItem/hooks");
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
/* ============================================================================
|
|
12
|
-
* Copyright (c) Palo Alto Networks
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the MIT license found in the
|
|
15
|
-
* LICENSE file in the root directory of this source tree.
|
|
16
|
-
* ========================================================================== */
|
|
17
|
-
|
|
18
|
-
function SecuritySchemes(props) {
|
|
19
|
-
var _options$selected, _options$selected$;
|
|
20
|
-
const options = (0, _hooks.useTypedSelector)(state => state.auth.options);
|
|
21
|
-
const selected = (0, _hooks.useTypedSelector)(state => state.auth.selected);
|
|
22
|
-
const infoAuthPath = `/${props.infoPath}#authentication`;
|
|
23
|
-
if (selected === undefined) return null;
|
|
24
|
-
if (((_options$selected = options[selected]) === null || _options$selected === void 0 ? void 0 : (_options$selected$ = _options$selected[0]) === null || _options$selected$ === void 0 ? void 0 : _options$selected$.type) === undefined) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
const selectedAuth = options[selected];
|
|
28
|
-
return <details className={`details__demo-panel`} open={false}>
|
|
29
|
-
<summary className={`details__request-summary`}>
|
|
30
|
-
<h4>Authorization</h4>
|
|
31
|
-
</summary>
|
|
32
|
-
{selectedAuth.map(auth => {
|
|
33
|
-
const isHttp = auth.type === "http";
|
|
34
|
-
const isApiKey = auth.type === "apiKey";
|
|
35
|
-
const isOauth2 = auth.type === "oauth2";
|
|
36
|
-
const isOpenId = auth.type === "openIdConnect";
|
|
37
|
-
if (isHttp) {
|
|
38
|
-
var _auth$name;
|
|
39
|
-
if (auth.scheme === "bearer") {
|
|
40
|
-
const {
|
|
41
|
-
name,
|
|
42
|
-
key,
|
|
43
|
-
type,
|
|
44
|
-
scopes,
|
|
45
|
-
...rest
|
|
46
|
-
} = auth;
|
|
47
|
-
return <_react.default.Fragment key={auth.key}>
|
|
48
|
-
<pre style={{
|
|
49
|
-
display: "flex",
|
|
50
|
-
flexDirection: "column",
|
|
51
|
-
background: "var(--openapi-card-background-color)"
|
|
52
|
-
}}>
|
|
53
|
-
<span>
|
|
54
|
-
<strong>name:</strong>{" "}
|
|
55
|
-
<_Link.default to={infoAuthPath}>{name !== null && name !== void 0 ? name : key}</_Link.default>
|
|
56
|
-
</span>
|
|
57
|
-
<span>
|
|
58
|
-
<strong>type: </strong>
|
|
59
|
-
{type}
|
|
60
|
-
</span>
|
|
61
|
-
{scopes && scopes.length > 0 && <span>
|
|
62
|
-
<strong>scopes: </strong>
|
|
63
|
-
<code>
|
|
64
|
-
{auth.scopes.length > 0 ? auth.scopes.toString() : "[]"}
|
|
65
|
-
</code>
|
|
66
|
-
</span>}
|
|
67
|
-
{Object.keys(rest).map((k, i) => {
|
|
68
|
-
return <span key={k}>
|
|
69
|
-
<strong>{k}: </strong>
|
|
70
|
-
{typeof rest[k] === "object" ? JSON.stringify(rest[k], null, 2) : String(rest[k])}
|
|
71
|
-
</span>;
|
|
72
|
-
})}
|
|
73
|
-
</pre>
|
|
74
|
-
</_react.default.Fragment>;
|
|
75
|
-
}
|
|
76
|
-
if (auth.scheme === "basic") {
|
|
77
|
-
const {
|
|
78
|
-
name,
|
|
79
|
-
key,
|
|
80
|
-
type,
|
|
81
|
-
scopes,
|
|
82
|
-
...rest
|
|
83
|
-
} = auth;
|
|
84
|
-
return <_react.default.Fragment key={auth.key}>
|
|
85
|
-
<pre style={{
|
|
86
|
-
display: "flex",
|
|
87
|
-
flexDirection: "column",
|
|
88
|
-
background: "var(--openapi-card-background-color)"
|
|
89
|
-
}}>
|
|
90
|
-
<span>
|
|
91
|
-
<strong>name:</strong>{" "}
|
|
92
|
-
<_Link.default to={infoAuthPath}>{name !== null && name !== void 0 ? name : key}</_Link.default>
|
|
93
|
-
</span>
|
|
94
|
-
<span>
|
|
95
|
-
<strong>type: </strong>
|
|
96
|
-
{type}
|
|
97
|
-
</span>
|
|
98
|
-
{scopes && scopes.length > 0 && <span>
|
|
99
|
-
<strong>scopes: </strong>
|
|
100
|
-
<code>
|
|
101
|
-
{auth.scopes.length > 0 ? auth.scopes.toString() : "[]"}
|
|
102
|
-
</code>
|
|
103
|
-
</span>}
|
|
104
|
-
{Object.keys(rest).map((k, i) => {
|
|
105
|
-
return <span key={k}>
|
|
106
|
-
<strong>{k}: </strong>
|
|
107
|
-
{typeof rest[k] === "object" ? JSON.stringify(rest[k], null, 2) : String(rest[k])}
|
|
108
|
-
</span>;
|
|
109
|
-
})}
|
|
110
|
-
</pre>
|
|
111
|
-
</_react.default.Fragment>;
|
|
112
|
-
}
|
|
113
|
-
return <_react.default.Fragment key={auth.key}>
|
|
114
|
-
<pre style={{
|
|
115
|
-
display: "flex",
|
|
116
|
-
flexDirection: "column",
|
|
117
|
-
background: "var(--openapi-card-background-color)"
|
|
118
|
-
}}>
|
|
119
|
-
<span>
|
|
120
|
-
<strong>name:</strong>{" "}
|
|
121
|
-
<_Link.default to={infoAuthPath}>{(_auth$name = auth.name) !== null && _auth$name !== void 0 ? _auth$name : auth.key}</_Link.default>
|
|
122
|
-
</span>
|
|
123
|
-
<span>
|
|
124
|
-
<strong>type: </strong>
|
|
125
|
-
{auth.type}
|
|
126
|
-
</span>
|
|
127
|
-
<span>
|
|
128
|
-
<strong>in: </strong>
|
|
129
|
-
{auth.in}
|
|
130
|
-
</span>
|
|
131
|
-
</pre>
|
|
132
|
-
</_react.default.Fragment>;
|
|
133
|
-
}
|
|
134
|
-
if (isApiKey) {
|
|
135
|
-
const {
|
|
136
|
-
name,
|
|
137
|
-
key,
|
|
138
|
-
type,
|
|
139
|
-
scopes,
|
|
140
|
-
...rest
|
|
141
|
-
} = auth;
|
|
142
|
-
return <_react.default.Fragment key={auth.key}>
|
|
143
|
-
<pre style={{
|
|
144
|
-
display: "flex",
|
|
145
|
-
flexDirection: "column",
|
|
146
|
-
background: "var(--openapi-card-background-color)"
|
|
147
|
-
}}>
|
|
148
|
-
<span>
|
|
149
|
-
<strong>name:</strong>{" "}
|
|
150
|
-
<_Link.default to={infoAuthPath}>{name !== null && name !== void 0 ? name : key}</_Link.default>
|
|
151
|
-
</span>
|
|
152
|
-
<span>
|
|
153
|
-
<strong>type: </strong>
|
|
154
|
-
{type}
|
|
155
|
-
</span>
|
|
156
|
-
{scopes && scopes.length > 0 && <span>
|
|
157
|
-
<strong>scopes: </strong>
|
|
158
|
-
<code>
|
|
159
|
-
{auth.scopes.length > 0 ? auth.scopes.toString() : "[]"}
|
|
160
|
-
</code>
|
|
161
|
-
</span>}
|
|
162
|
-
{Object.keys(rest).map((k, i) => {
|
|
163
|
-
return <span key={k}>
|
|
164
|
-
<strong>{k}: </strong>
|
|
165
|
-
{typeof rest[k] === "object" ? JSON.stringify(rest[k], null, 2) : String(rest[k])}
|
|
166
|
-
</span>;
|
|
167
|
-
})}
|
|
168
|
-
</pre>
|
|
169
|
-
</_react.default.Fragment>;
|
|
170
|
-
}
|
|
171
|
-
if (isOauth2) {
|
|
172
|
-
const {
|
|
173
|
-
name,
|
|
174
|
-
key,
|
|
175
|
-
type,
|
|
176
|
-
scopes,
|
|
177
|
-
flows,
|
|
178
|
-
...rest
|
|
179
|
-
} = auth;
|
|
180
|
-
return <_react.default.Fragment key={selected}>
|
|
181
|
-
<pre style={{
|
|
182
|
-
display: "flex",
|
|
183
|
-
flexDirection: "column",
|
|
184
|
-
background: "var(--openapi-card-background-color)"
|
|
185
|
-
}}>
|
|
186
|
-
<span>
|
|
187
|
-
<strong>name:</strong>{" "}
|
|
188
|
-
<_Link.default to={infoAuthPath}>{name !== null && name !== void 0 ? name : key}</_Link.default>
|
|
189
|
-
</span>
|
|
190
|
-
<span>
|
|
191
|
-
<strong>type: </strong>
|
|
192
|
-
{type}
|
|
193
|
-
</span>
|
|
194
|
-
{scopes && scopes.length > 0 && <span>
|
|
195
|
-
<strong>scopes: </strong>
|
|
196
|
-
<code>
|
|
197
|
-
{auth.scopes.length > 0 ? auth.scopes.toString() : "[]"}
|
|
198
|
-
</code>
|
|
199
|
-
</span>}
|
|
200
|
-
{Object.keys(rest).map((k, i) => {
|
|
201
|
-
return <span key={k}>
|
|
202
|
-
<strong>{k}: </strong>
|
|
203
|
-
{typeof rest[k] === "object" ? JSON.stringify(rest[k], null, 2) : String(rest[k])}
|
|
204
|
-
</span>;
|
|
205
|
-
})}
|
|
206
|
-
{flows && <span>
|
|
207
|
-
<code>
|
|
208
|
-
<strong>flows: </strong>
|
|
209
|
-
{JSON.stringify(flows, null, 2)}
|
|
210
|
-
</code>
|
|
211
|
-
</span>}
|
|
212
|
-
</pre>
|
|
213
|
-
</_react.default.Fragment>;
|
|
214
|
-
}
|
|
215
|
-
if (isOpenId) {
|
|
216
|
-
const {
|
|
217
|
-
name,
|
|
218
|
-
key,
|
|
219
|
-
scopes,
|
|
220
|
-
type,
|
|
221
|
-
...rest
|
|
222
|
-
} = auth;
|
|
223
|
-
return <_react.default.Fragment key={auth.key}>
|
|
224
|
-
<pre style={{
|
|
225
|
-
display: "flex",
|
|
226
|
-
flexDirection: "column",
|
|
227
|
-
background: "var(--openapi-card-background-color)"
|
|
228
|
-
}}>
|
|
229
|
-
<span>
|
|
230
|
-
<strong>name:</strong>{" "}
|
|
231
|
-
<_Link.default to={infoAuthPath}>{name !== null && name !== void 0 ? name : key}</_Link.default>
|
|
232
|
-
</span>
|
|
233
|
-
<span>
|
|
234
|
-
<strong>type: </strong>
|
|
235
|
-
{type}
|
|
236
|
-
</span>
|
|
237
|
-
{scopes && scopes.length > 0 && <span>
|
|
238
|
-
<strong>scopes: </strong>
|
|
239
|
-
<code>
|
|
240
|
-
{auth.scopes.length > 0 ? auth.scopes.toString() : "[]"}
|
|
241
|
-
</code>
|
|
242
|
-
</span>}
|
|
243
|
-
{Object.keys(rest).map((k, i) => {
|
|
244
|
-
return <span key={k}>
|
|
245
|
-
<strong>{k}: </strong>
|
|
246
|
-
{typeof rest[k] === "object" ? JSON.stringify(rest[k], null, 2) : String(rest[k])}
|
|
247
|
-
</span>;
|
|
248
|
-
})}
|
|
249
|
-
</pre>
|
|
250
|
-
</_react.default.Fragment>;
|
|
251
|
-
}
|
|
252
|
-
return undefined;
|
|
253
|
-
})}
|
|
254
|
-
</details>;
|
|
255
|
-
}
|
|
256
|
-
var _default = SecuritySchemes;
|
|
257
|
-
exports.default = _default;
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _FloatingButton = _interopRequireDefault(require("@theme/ApiDemoPanel/FloatingButton"));
|
|
9
|
-
var _FormItem = _interopRequireDefault(require("@theme/ApiDemoPanel/FormItem"));
|
|
10
|
-
var _FormSelect = _interopRequireDefault(require("@theme/ApiDemoPanel/FormSelect"));
|
|
11
|
-
var _FormTextInput = _interopRequireDefault(require("@theme/ApiDemoPanel/FormTextInput"));
|
|
12
|
-
var _hooks = require("@theme/ApiItem/hooks");
|
|
13
|
-
var _slice = require("./slice");
|
|
14
|
-
var _stylesModule = _interopRequireDefault(require("./styles.module.css"));
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
|
-
/* ============================================================================
|
|
19
|
-
* Copyright (c) Palo Alto Networks
|
|
20
|
-
*
|
|
21
|
-
* This source code is licensed under the MIT license found in the
|
|
22
|
-
* LICENSE file in the root directory of this source tree.
|
|
23
|
-
* ========================================================================== */
|
|
24
|
-
|
|
25
|
-
function Server() {
|
|
26
|
-
const [isEditing, setIsEditing] = (0, _react.useState)(false);
|
|
27
|
-
const value = (0, _hooks.useTypedSelector)(state => state.server.value);
|
|
28
|
-
const options = (0, _hooks.useTypedSelector)(state => state.server.options);
|
|
29
|
-
const dispatch = (0, _hooks.useTypedDispatch)();
|
|
30
|
-
if (options.length <= 0) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
if (options.length < 1 && (value === null || value === void 0 ? void 0 : value.variables) === undefined) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
if (!value) {
|
|
37
|
-
const defaultOption = options[0];
|
|
38
|
-
dispatch((0, _slice.setServer)(JSON.stringify(defaultOption)));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Default to first option when existing server state is mismatched
|
|
42
|
-
if (value) {
|
|
43
|
-
const urlExists = options.find(s => s.url === value.url);
|
|
44
|
-
if (!urlExists) {
|
|
45
|
-
const defaultOption = options[0];
|
|
46
|
-
dispatch((0, _slice.setServer)(JSON.stringify(defaultOption)));
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if (!isEditing) {
|
|
50
|
-
let url = "";
|
|
51
|
-
if (value) {
|
|
52
|
-
url = value.url.replace(/\/$/, "");
|
|
53
|
-
if (value.variables) {
|
|
54
|
-
Object.keys(value.variables).forEach(variable => {
|
|
55
|
-
var _value$variables$vari, _value$variables;
|
|
56
|
-
url = url.replace(`{${variable}}`, (_value$variables$vari = (_value$variables = value.variables) === null || _value$variables === void 0 ? void 0 : _value$variables[variable].default) !== null && _value$variables$vari !== void 0 ? _value$variables$vari : "");
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return <_FloatingButton.default onClick={() => setIsEditing(true)} label="Edit">
|
|
61
|
-
<_FormItem.default label="Base URL">
|
|
62
|
-
<pre style={{
|
|
63
|
-
background: "var(--openapi-card-background-color)",
|
|
64
|
-
paddingLeft: "0px"
|
|
65
|
-
}}>
|
|
66
|
-
<code title={url}>{url}</code>
|
|
67
|
-
</pre>
|
|
68
|
-
</_FormItem.default>
|
|
69
|
-
</_FloatingButton.default>;
|
|
70
|
-
}
|
|
71
|
-
return <div className={_stylesModule.default.optionsPanel}>
|
|
72
|
-
<_FloatingButton.default onClick={() => setIsEditing(false)} label="Hide">
|
|
73
|
-
<_FormItem.default label="Base URL">
|
|
74
|
-
<_FormSelect.default options={options.map(s => s.url)} onChange={e => {
|
|
75
|
-
dispatch((0, _slice.setServer)(JSON.stringify(options.filter(s => s.url === e.target.value)[0])));
|
|
76
|
-
}} value={value === null || value === void 0 ? void 0 : value.url} />
|
|
77
|
-
<small>{value === null || value === void 0 ? void 0 : value.description}</small>
|
|
78
|
-
</_FormItem.default>
|
|
79
|
-
{(value === null || value === void 0 ? void 0 : value.variables) && Object.keys(value.variables).map(key => {
|
|
80
|
-
var _value$variables2, _value$variables3, _value$variables4;
|
|
81
|
-
if (((_value$variables2 = value.variables) === null || _value$variables2 === void 0 ? void 0 : _value$variables2[key].enum) !== undefined) {
|
|
82
|
-
return <_FormItem.default label={key}>
|
|
83
|
-
<_FormSelect.default options={value.variables[key].enum} onChange={e => {
|
|
84
|
-
dispatch((0, _slice.setServerVariable)(JSON.stringify({
|
|
85
|
-
key,
|
|
86
|
-
value: e.target.value
|
|
87
|
-
})));
|
|
88
|
-
}} value={value === null || value === void 0 ? void 0 : value.variables[key].default} />
|
|
89
|
-
</_FormItem.default>;
|
|
90
|
-
}
|
|
91
|
-
return <_FormItem.default label={key}>
|
|
92
|
-
<_FormTextInput.default placeholder={(_value$variables3 = value.variables) === null || _value$variables3 === void 0 ? void 0 : _value$variables3[key].default} onChange={e => {
|
|
93
|
-
dispatch((0, _slice.setServerVariable)(JSON.stringify({
|
|
94
|
-
key,
|
|
95
|
-
value: e.target.value
|
|
96
|
-
})));
|
|
97
|
-
}} value={value === null || value === void 0 ? void 0 : (_value$variables4 = value.variables) === null || _value$variables4 === void 0 ? void 0 : _value$variables4[key].default} />
|
|
98
|
-
</_FormItem.default>;
|
|
99
|
-
})}
|
|
100
|
-
</_FloatingButton.default>
|
|
101
|
-
</div>;
|
|
102
|
-
}
|
|
103
|
-
var _default = Server;
|
|
104
|
-
exports.default = _default;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.slice = exports.setServerVariable = exports.setServer = exports.default = void 0;
|
|
7
|
-
var _toolkit = require("@reduxjs/toolkit");
|
|
8
|
-
/* ============================================================================
|
|
9
|
-
* Copyright (c) Palo Alto Networks
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the MIT license found in the
|
|
12
|
-
* LICENSE file in the root directory of this source tree.
|
|
13
|
-
* ========================================================================== */
|
|
14
|
-
|
|
15
|
-
const initialState = {};
|
|
16
|
-
const slice = (0, _toolkit.createSlice)({
|
|
17
|
-
name: "server",
|
|
18
|
-
initialState,
|
|
19
|
-
reducers: {
|
|
20
|
-
setServer: (state, action) => {
|
|
21
|
-
state.value = state.options.find(s => s.url === JSON.parse(action.payload).url);
|
|
22
|
-
},
|
|
23
|
-
setServerVariable: (state, action) => {
|
|
24
|
-
var _state$value;
|
|
25
|
-
if ((_state$value = state.value) !== null && _state$value !== void 0 && _state$value.variables) {
|
|
26
|
-
const parsedPayload = JSON.parse(action.payload);
|
|
27
|
-
state.value.variables[parsedPayload.key].default = parsedPayload.value;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
exports.slice = slice;
|
|
33
|
-
const {
|
|
34
|
-
setServer,
|
|
35
|
-
setServerVariable
|
|
36
|
-
} = slice.actions;
|
|
37
|
-
exports.setServerVariable = setServerVariable;
|
|
38
|
-
exports.setServer = setServer;
|
|
39
|
-
var _default = slice.reducer;
|
|
40
|
-
exports.default = _default;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
.showMoreButton {
|
|
2
|
-
-webkit-appearance: none;
|
|
3
|
-
-moz-appearance: none;
|
|
4
|
-
appearance: none;
|
|
5
|
-
|
|
6
|
-
cursor: pointer;
|
|
7
|
-
font-size: var(--ifm-code-font-size);
|
|
8
|
-
/* font-weight: var(--ifm-button-font-weight); */
|
|
9
|
-
/* line-height: 1.5; */
|
|
10
|
-
|
|
11
|
-
padding: 0;
|
|
12
|
-
|
|
13
|
-
user-select: none;
|
|
14
|
-
white-space: nowrap;
|
|
15
|
-
|
|
16
|
-
border: 0px solid transparent;
|
|
17
|
-
|
|
18
|
-
display: block;
|
|
19
|
-
/* width: 100%; */
|
|
20
|
-
|
|
21
|
-
background-color: transparent;
|
|
22
|
-
|
|
23
|
-
color: var(--ifm-color-primary);
|
|
24
|
-
cursor: pointer;
|
|
25
|
-
margin-top: var(--ifm-pre-padding);
|
|
26
|
-
margin-bottom: 0;
|
|
27
|
-
text-align: left;
|
|
28
|
-
display: block;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.showMoreButton:hover {
|
|
32
|
-
/* text-decoration: underline; */
|
|
33
|
-
/* background-color: red; */
|
|
34
|
-
color: var(--ifm-color-primary-hover);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.showMoreButton:first-child {
|
|
38
|
-
margin-top: 0;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.optionsPanel:empty {
|
|
42
|
-
display: none;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.optionsPanel {
|
|
46
|
-
background: var(--openapi-card-background-color);
|
|
47
|
-
border-radius: var(--openapi-card-border-radius);
|
|
48
|
-
color: var(--ifm-pre-color);
|
|
49
|
-
line-height: var(--ifm-pre-line-height);
|
|
50
|
-
margin-bottom: var(--ifm-spacing-vertical);
|
|
51
|
-
margin-top: 0;
|
|
52
|
-
overflow: auto;
|
|
53
|
-
|
|
54
|
-
/* hack for view calculation when monaco is hidden */
|
|
55
|
-
position: relative;
|
|
56
|
-
}
|