@redocly/openapi-docs 0.0.0-beta-20240223133421 → 0.0.0-beta-20240227165736
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/dist/redocly-openapi-docs.min.js +9870 -8755
- package/lib/components/ApiInfo/ApiInfo.js +1 -1
- package/lib/components/ApiInfo/Metadata.js +1 -1
- package/lib/components/CallbackSamples/CallbackSamples.d.ts +2 -2
- package/lib/components/CallbackSamples/CallbackSamples.js +2 -3
- package/lib/components/Callbacks/CallbackDetails.d.ts +2 -2
- package/lib/components/Callbacks/CallbackDetails.js +1 -1
- package/lib/components/Callbacks/CallbackOperation.js +1 -1
- package/lib/components/Callbacks/CallbackSummary.js +2 -13
- package/lib/components/Callbacks/CallbacksList.d.ts +2 -2
- package/lib/components/Callbacks/CallbacksList.js +1 -1
- package/lib/components/Content/Content.d.ts +2 -2
- package/lib/components/Content/Content.js +1 -1
- package/lib/components/ContentItem/ContentItem.d.ts +2 -2
- package/lib/components/ContentItem/ContentItem.js +1 -1
- package/lib/components/ContentItems/ContentItems.d.ts +2 -2
- package/lib/components/ContentItems/ContentItems.js +1 -1
- package/lib/components/Discriminator/Discriminator.d.ts +2 -2
- package/lib/components/Discriminator/Discriminator.js +1 -1
- package/lib/components/Download/DownloadSpecification.d.ts +1 -2
- package/lib/components/Download/DownloadSpecification.js +1 -5
- package/lib/components/DropdownOrLabel/DropdownOrLabel.js +2 -2
- package/lib/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/lib/components/ExternalDocumentation/ExternalDocumentation.d.ts +2 -2
- package/lib/components/ExternalDocumentation/ExternalDocumentation.js +2 -2
- package/lib/components/Language/LanguageDropdown.js +1 -1
- package/lib/components/Language/LanguageItem.d.ts +1 -2
- package/lib/components/Language/LanguageItem.js +1 -1
- package/lib/components/Language/LanguageList.d.ts +2 -2
- package/lib/components/Language/LanguageList.js +1 -1
- package/lib/components/Language/_tests_/LanguageDropdown.test.js +1 -1
- package/lib/components/Language/styled.d.ts +0 -1
- package/lib/components/Language/styled.js +2 -9
- package/lib/components/Markdown/Markdown.js +1 -1
- package/lib/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +1 -2
- package/lib/components/MediaTypeSwitch/MediaTypesSwitch.js +1 -1
- package/lib/components/OperationItem/Description.d.ts +1 -2
- package/lib/components/OperationItem/Description.js +1 -1
- package/lib/components/OperationItem/OperationItem.d.ts +2 -2
- package/lib/components/OperationItem/OperationItem.js +2 -2
- package/lib/components/Overlay.js +1 -1
- package/lib/components/Overview/Overview.js +1 -1
- package/lib/components/PageFooter/PageFooter.d.ts +3 -3
- package/lib/components/PageFooter/PageFooter.js +1 -1
- package/lib/components/PanelItem/PanelItem.d.ts +1 -2
- package/lib/components/PanelItem/PanelItem.js +1 -1
- package/lib/components/PayloadSamples/Example.js +1 -1
- package/lib/components/PayloadSamples/ExampleValue.js +1 -1
- package/lib/components/PayloadSamples/ExternalExample.js +1 -1
- package/lib/components/PayloadSamples/MediaTypeSamples.d.ts +2 -2
- package/lib/components/PayloadSamples/MediaTypeSamples.js +1 -1
- package/lib/components/PayloadSamples/PayloadSamples.d.ts +2 -2
- package/lib/components/PayloadSamples/PayloadSamples.js +1 -1
- package/lib/components/PropertyDetails/DescriptionEnums.d.ts +1 -2
- package/lib/components/PropertyDetails/DescriptionEnums.js +2 -2
- package/lib/components/PropertyDetails/EnumValues.d.ts +2 -2
- package/lib/components/PropertyDetails/EnumValues.js +1 -1
- package/lib/components/PropertyDetails/Examples.d.ts +1 -2
- package/lib/components/PropertyDetails/Examples.js +1 -1
- package/lib/components/PropertyDetails/Extensions.d.ts +2 -2
- package/lib/components/PropertyDetails/Extensions.js +2 -2
- package/lib/components/PropertyDetails/FieldDetail.d.ts +2 -2
- package/lib/components/PropertyDetails/FieldDetail.js +1 -1
- package/lib/components/PropertyDetails/FieldDetails.d.ts +2 -2
- package/lib/components/PropertyDetails/FieldDetails.js +1 -1
- package/lib/components/PropertyDetails/Pattern.js +1 -1
- package/lib/components/PropertyDetails/PlusCircleIcon.d.ts +1 -2
- package/lib/components/PropertyDetails/PlusCircleIcon.js +1 -1
- package/lib/components/PropertyDetails/PropertyDetails.d.ts +2 -2
- package/lib/components/PropertyDetails/PropertyDetails.js +1 -1
- package/lib/components/PropertyDetails/SchemaTypeInfo.d.ts +1 -2
- package/lib/components/PropertyDetails/SchemaTypeInfo.js +1 -1
- package/lib/components/PropertyDetails/SimpleEnums.d.ts +1 -2
- package/lib/components/PropertyDetails/SimpleEnums.js +1 -1
- package/lib/components/PropertyDetails/styled.d.ts +0 -1
- package/lib/components/PropertyDetails/styled.js +1 -10
- package/lib/components/RedoclyOpenAPIDocs/Providers.d.ts +1 -2
- package/lib/components/RedoclyOpenAPIDocs/Providers.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.d.ts +1 -2
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsMultiStandalone.js +1 -1
- package/lib/components/RenderHook/RenderHook.js +1 -1
- package/lib/components/Replay/Replay.d.ts +2 -2
- package/lib/components/Replay/Replay.js +1 -1
- package/lib/components/RequestParameters/Body.d.ts +2 -2
- package/lib/components/RequestParameters/Body.js +1 -1
- package/lib/components/RequestParameters/ParametersGroup.d.ts +2 -2
- package/lib/components/RequestParameters/ParametersGroup.js +1 -1
- package/lib/components/RequestParameters/RequestParameters.js +1 -1
- package/lib/components/RequestSamples/CodeSample.d.ts +2 -2
- package/lib/components/RequestSamples/CodeSample.js +1 -1
- package/lib/components/RequestSamples/Example.d.ts +1 -2
- package/lib/components/RequestSamples/Example.js +1 -1
- package/lib/components/RequestSamples/RequestSamples.d.ts +2 -2
- package/lib/components/RequestSamples/RequestSamples.js +6 -1
- package/lib/components/ResponseSamples/ResponseSamples.d.ts +1 -2
- package/lib/components/ResponseSamples/ResponseSamples.js +1 -1
- package/lib/components/ResponseSamples/Summary.js +1 -1
- package/lib/components/Responses/OperationResponseList.d.ts +1 -2
- package/lib/components/Responses/OperationResponseList.js +1 -1
- package/lib/components/Responses/ResponseDetails.d.ts +2 -2
- package/lib/components/Responses/ResponseDetails.js +1 -1
- package/lib/components/Responses/ResponseHeaders.d.ts +2 -2
- package/lib/components/Responses/ResponseHeaders.js +1 -1
- package/lib/components/RightPanel/RightPanel.js +1 -1
- package/lib/components/Samples/ExampleSwitch.js +1 -1
- package/lib/components/Schema/ArraySchema.d.ts +2 -2
- package/lib/components/Schema/ArraySchema.js +1 -1
- package/lib/components/Schema/ObjectSchema.d.ts +2 -2
- package/lib/components/Schema/ObjectSchema.js +1 -1
- package/lib/components/Schema/OneOfSchema.d.ts +2 -2
- package/lib/components/Schema/OneOfSchema.js +1 -1
- package/lib/components/Schema/RecursiveSchema.d.ts +2 -2
- package/lib/components/Schema/RecursiveSchema.js +1 -1
- package/lib/components/Schema/Schema.d.ts +2 -2
- package/lib/components/Schema/Schema.js +1 -1
- package/lib/components/SchemaDefinition/SchemaDefinition.d.ts +2 -2
- package/lib/components/SchemaDefinition/SchemaDefinition.js +1 -1
- package/lib/components/Search/MenuItemSearch.js +1 -1
- package/lib/components/Search/Search.d.ts +2 -2
- package/lib/components/Search/Search.js +1 -1
- package/lib/components/Search/SearchBox.js +1 -1
- package/lib/components/Search/SearchField.js +1 -1
- package/lib/components/Search/styled.js +2 -2
- package/lib/components/SectionContent/SectionContent.js +1 -1
- package/lib/components/SectionItem/SectionItem.d.ts +2 -2
- package/lib/components/SectionItem/SectionItem.js +1 -1
- package/lib/components/Security/Divider.d.ts +1 -2
- package/lib/components/Security/Divider.js +1 -1
- package/lib/components/Security/OAuthFlow.d.ts +2 -2
- package/lib/components/Security/OAuthFlow.js +1 -1
- package/lib/components/Security/Security.js +1 -1
- package/lib/components/Security/SecurityButton.js +6 -10
- package/lib/components/Security/SecurityFlow.js +1 -1
- package/lib/components/Security/SecurityModal.js +8 -17
- package/lib/components/Security/SecuritySchemeItem.d.ts +1 -2
- package/lib/components/Security/SecuritySchemeItem.js +4 -4
- package/lib/components/SecurityRequirement/PanelDescription.js +1 -1
- package/lib/components/SecurityRequirement/RequiredScopesRow.js +1 -1
- package/lib/components/SecurityRequirement/RequirementElement.js +1 -1
- package/lib/components/SecurityRequirement/SecurityDefs.js +1 -1
- package/lib/components/SecurityRequirement/SecurityRequirement.d.ts +2 -2
- package/lib/components/SecurityRequirement/SecurityRequirement.js +1 -1
- package/lib/components/SecuritySchemes/OAuthFlow.d.ts +2 -2
- package/lib/components/SecuritySchemes/OAuthFlow.js +1 -1
- package/lib/components/SeeMore/SeeMore.js +1 -1
- package/lib/components/ServerList/ServerList.js +1 -1
- package/lib/components/ServerListDropdown/ServerListDropdown.js +1 -1
- package/lib/components/ServerListDropdown/styled.js +0 -3
- package/lib/components/SideMenu/Actions.d.ts +1 -2
- package/lib/components/SideMenu/Actions.js +1 -1
- package/lib/components/SideMenu/MenuItem.d.ts +2 -2
- package/lib/components/SideMenu/MenuItem.js +1 -1
- package/lib/components/SideMenu/MenuItemEternalLink.d.ts +2 -2
- package/lib/components/SideMenu/MenuItemEternalLink.js +1 -1
- package/lib/components/SideMenu/MenuItemLink.d.ts +2 -2
- package/lib/components/SideMenu/MenuItemLink.js +1 -1
- package/lib/components/SideMenu/MenuItems.d.ts +2 -2
- package/lib/components/SideMenu/MenuItems.js +1 -1
- package/lib/components/SideMenu/MenuOperationItemContent.d.ts +2 -2
- package/lib/components/SideMenu/MenuOperationItemContent.js +2 -2
- package/lib/components/SideMenu/SideMenu.d.ts +2 -2
- package/lib/components/SideMenu/SideMenu.js +1 -1
- package/lib/components/StickySidebar/StickyResponsiveSidebar.d.ts +2 -2
- package/lib/components/StickySidebar/StickyResponsiveSidebar.js +2 -2
- package/lib/components/Tabs/Tabs.d.ts +1 -2
- package/lib/components/Tabs/Tabs.js +1 -1
- package/lib/components/TagItem/OperationsNavigation.d.ts +3 -3
- package/lib/components/TagItem/OperationsNavigation.js +16 -14
- package/lib/components/TagItem/TagItem.d.ts +1 -2
- package/lib/components/TagItem/TagItem.js +1 -1
- package/lib/components/VersionSwitcher.js +1 -1
- package/lib/components/ViewNested/ViewNested.d.ts +2 -2
- package/lib/components/ViewNested/ViewNested.js +1 -13
- package/lib/components/common/BodyContent/BodyContent.d.ts +2 -2
- package/lib/components/common/BodyContent/BodyContent.js +1 -1
- package/lib/components/common/ClearButton/ClearButton.d.ts +2 -2
- package/lib/components/common/ClearButton/ClearButton.js +1 -1
- package/lib/components/common/ConstraintsView.d.ts +2 -2
- package/lib/components/common/ConstraintsView.js +1 -1
- package/lib/components/common/Dropdown/Dropdown.d.ts +2 -2
- package/lib/components/common/Dropdown/Dropdown.js +1 -1
- package/lib/components/common/DropdownTheme/Dropdown.d.ts +1 -2
- package/lib/components/common/DropdownTheme/Dropdown.js +2 -10
- package/lib/components/common/Extensions.d.ts +2 -2
- package/lib/components/common/Extensions.js +2 -2
- package/lib/components/common/Fields/fields.d.ts +5 -1
- package/lib/components/common/Fields/fields.js +2 -6
- package/lib/components/common/LinearProgress.js +2 -2
- package/lib/components/common/LinkToField.js +1 -1
- package/lib/components/common/SchemaSelection/SchemaSelection.d.ts +1 -2
- package/lib/components/common/SchemaSelection/SchemaSelection.js +1 -1
- package/lib/components/common/Skeleton/Skeleton.js +2 -2
- package/lib/components/common/linkify.js +1 -1
- package/lib/components/common/perfect-scrollbar.js +2 -2
- package/lib/components/pluggable/PullRight.d.ts +1 -2
- package/lib/components/pluggable/PullRight.js +1 -1
- package/lib/components/pluggable/RedocExample.js +1 -1
- package/lib/components/pluggable/RedocRequestBody.js +1 -1
- package/lib/components/pluggable/RedocResponse.js +1 -1
- package/lib/components/pluggable/RedocSchema.js +1 -1
- package/lib/hoc/withRouter.js +1 -1
- package/lib/hoc/withStore.js +1 -1
- package/lib/icons/CSharpIcon/CSharpIcon.d.ts +2 -3
- package/lib/icons/CSharpIcon/CSharpIcon.js +1 -1
- package/lib/icons/CurlIcon/CurlIcon.d.ts +2 -3
- package/lib/icons/CurlIcon/CurlIcon.js +1 -1
- package/lib/icons/GOIcon/GOIcon.d.ts +2 -3
- package/lib/icons/GOIcon/GOIcon.js +1 -1
- package/lib/icons/JavaIcon/JavaIcon.d.ts +2 -3
- package/lib/icons/JavaIcon/JavaIcon.js +1 -1
- package/lib/icons/JavaScriptIcon/JavaScriptIcon.d.ts +2 -3
- package/lib/icons/JavaScriptIcon/JavaScriptIcon.js +1 -1
- package/lib/icons/NodeJSIcon/NodeJSIcon.d.ts +2 -3
- package/lib/icons/NodeJSIcon/NodeJSIcon.js +1 -1
- package/lib/icons/PHPIcon/PHPIcon.d.ts +2 -3
- package/lib/icons/PHPIcon/PHPIcon.js +1 -1
- package/lib/icons/PythonIcon/PythonIcon.d.ts +2 -3
- package/lib/icons/PythonIcon/PythonIcon.js +1 -1
- package/lib/icons/RIcon/RIcon.d.ts +2 -3
- package/lib/icons/RIcon/RIcon.js +1 -1
- package/lib/icons/RubyIcon/RubyIcon.d.ts +2 -3
- package/lib/icons/RubyIcon/RubyIcon.js +1 -1
- package/lib/services/search/SearchStore.js +19 -8
- package/lib/standalone.js +1 -1
- package/lib/testProviders.js +1 -1
- package/lib-esm/components/ApiInfo/ApiInfo.js +1 -1
- package/lib-esm/components/ApiInfo/Metadata.js +1 -1
- package/lib-esm/components/CallbackSamples/CallbackSamples.d.ts +2 -2
- package/lib-esm/components/CallbackSamples/CallbackSamples.js +2 -3
- package/lib-esm/components/Callbacks/CallbackDetails.d.ts +2 -2
- package/lib-esm/components/Callbacks/CallbackDetails.js +1 -1
- package/lib-esm/components/Callbacks/CallbackOperation.js +1 -1
- package/lib-esm/components/Callbacks/CallbackSummary.js +2 -13
- package/lib-esm/components/Callbacks/CallbacksList.d.ts +2 -2
- package/lib-esm/components/Callbacks/CallbacksList.js +1 -1
- package/lib-esm/components/Content/Content.d.ts +2 -2
- package/lib-esm/components/Content/Content.js +1 -1
- package/lib-esm/components/ContentItem/ContentItem.d.ts +2 -2
- package/lib-esm/components/ContentItem/ContentItem.js +1 -1
- package/lib-esm/components/ContentItems/ContentItems.d.ts +2 -2
- package/lib-esm/components/ContentItems/ContentItems.js +1 -1
- package/lib-esm/components/Discriminator/Discriminator.d.ts +2 -2
- package/lib-esm/components/Discriminator/Discriminator.js +1 -1
- package/lib-esm/components/Download/DownloadSpecification.d.ts +1 -2
- package/lib-esm/components/Download/DownloadSpecification.js +1 -5
- package/lib-esm/components/DropdownOrLabel/DropdownOrLabel.js +2 -2
- package/lib-esm/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/lib-esm/components/ExternalDocumentation/ExternalDocumentation.d.ts +2 -2
- package/lib-esm/components/ExternalDocumentation/ExternalDocumentation.js +3 -3
- package/lib-esm/components/Language/LanguageDropdown.js +1 -1
- package/lib-esm/components/Language/LanguageItem.d.ts +1 -2
- package/lib-esm/components/Language/LanguageItem.js +1 -1
- package/lib-esm/components/Language/LanguageList.d.ts +2 -2
- package/lib-esm/components/Language/LanguageList.js +1 -1
- package/lib-esm/components/Language/_tests_/LanguageDropdown.test.js +1 -1
- package/lib-esm/components/Language/styled.d.ts +0 -1
- package/lib-esm/components/Language/styled.js +1 -8
- package/lib-esm/components/Markdown/Markdown.js +1 -1
- package/lib-esm/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +1 -2
- package/lib-esm/components/MediaTypeSwitch/MediaTypesSwitch.js +1 -1
- package/lib-esm/components/OperationItem/Description.d.ts +1 -2
- package/lib-esm/components/OperationItem/Description.js +1 -1
- package/lib-esm/components/OperationItem/OperationItem.d.ts +2 -2
- package/lib-esm/components/OperationItem/OperationItem.js +2 -2
- package/lib-esm/components/Overlay.js +1 -1
- package/lib-esm/components/Overview/Overview.js +1 -1
- package/lib-esm/components/PageFooter/PageFooter.d.ts +3 -3
- package/lib-esm/components/PageFooter/PageFooter.js +1 -1
- package/lib-esm/components/PanelItem/PanelItem.d.ts +1 -2
- package/lib-esm/components/PanelItem/PanelItem.js +1 -1
- package/lib-esm/components/PayloadSamples/Example.js +1 -1
- package/lib-esm/components/PayloadSamples/ExampleValue.js +1 -1
- package/lib-esm/components/PayloadSamples/ExternalExample.js +1 -1
- package/lib-esm/components/PayloadSamples/MediaTypeSamples.d.ts +2 -2
- package/lib-esm/components/PayloadSamples/MediaTypeSamples.js +1 -1
- package/lib-esm/components/PayloadSamples/PayloadSamples.d.ts +2 -2
- package/lib-esm/components/PayloadSamples/PayloadSamples.js +1 -1
- package/lib-esm/components/PropertyDetails/DescriptionEnums.d.ts +1 -2
- package/lib-esm/components/PropertyDetails/DescriptionEnums.js +2 -2
- package/lib-esm/components/PropertyDetails/EnumValues.d.ts +2 -2
- package/lib-esm/components/PropertyDetails/EnumValues.js +1 -1
- package/lib-esm/components/PropertyDetails/Examples.d.ts +1 -2
- package/lib-esm/components/PropertyDetails/Examples.js +1 -1
- package/lib-esm/components/PropertyDetails/Extensions.d.ts +2 -2
- package/lib-esm/components/PropertyDetails/Extensions.js +2 -2
- package/lib-esm/components/PropertyDetails/FieldDetail.d.ts +2 -2
- package/lib-esm/components/PropertyDetails/FieldDetail.js +1 -1
- package/lib-esm/components/PropertyDetails/FieldDetails.d.ts +2 -2
- package/lib-esm/components/PropertyDetails/FieldDetails.js +1 -1
- package/lib-esm/components/PropertyDetails/Pattern.js +1 -1
- package/lib-esm/components/PropertyDetails/PlusCircleIcon.d.ts +1 -2
- package/lib-esm/components/PropertyDetails/PlusCircleIcon.js +1 -1
- package/lib-esm/components/PropertyDetails/PropertyDetails.d.ts +2 -2
- package/lib-esm/components/PropertyDetails/PropertyDetails.js +1 -1
- package/lib-esm/components/PropertyDetails/SchemaTypeInfo.d.ts +1 -2
- package/lib-esm/components/PropertyDetails/SchemaTypeInfo.js +1 -1
- package/lib-esm/components/PropertyDetails/SimpleEnums.d.ts +1 -2
- package/lib-esm/components/PropertyDetails/SimpleEnums.js +1 -1
- package/lib-esm/components/PropertyDetails/styled.d.ts +0 -1
- package/lib-esm/components/PropertyDetails/styled.js +1 -10
- package/lib-esm/components/RedoclyOpenAPIDocs/Providers.d.ts +1 -2
- package/lib-esm/components/RedoclyOpenAPIDocs/Providers.js +1 -1
- package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.d.ts +1 -2
- package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js +1 -1
- package/lib-esm/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsMultiStandalone.js +1 -1
- package/lib-esm/components/RenderHook/RenderHook.js +1 -1
- package/lib-esm/components/Replay/Replay.d.ts +2 -2
- package/lib-esm/components/Replay/Replay.js +1 -1
- package/lib-esm/components/RequestParameters/Body.d.ts +2 -2
- package/lib-esm/components/RequestParameters/Body.js +1 -1
- package/lib-esm/components/RequestParameters/ParametersGroup.d.ts +2 -2
- package/lib-esm/components/RequestParameters/ParametersGroup.js +1 -1
- package/lib-esm/components/RequestParameters/RequestParameters.js +1 -1
- package/lib-esm/components/RequestSamples/CodeSample.d.ts +2 -2
- package/lib-esm/components/RequestSamples/CodeSample.js +1 -1
- package/lib-esm/components/RequestSamples/Example.d.ts +1 -2
- package/lib-esm/components/RequestSamples/Example.js +1 -1
- package/lib-esm/components/RequestSamples/RequestSamples.d.ts +2 -2
- package/lib-esm/components/RequestSamples/RequestSamples.js +6 -1
- package/lib-esm/components/ResponseSamples/ResponseSamples.d.ts +1 -2
- package/lib-esm/components/ResponseSamples/ResponseSamples.js +1 -1
- package/lib-esm/components/ResponseSamples/Summary.js +1 -1
- package/lib-esm/components/Responses/OperationResponseList.d.ts +1 -2
- package/lib-esm/components/Responses/OperationResponseList.js +1 -1
- package/lib-esm/components/Responses/ResponseDetails.d.ts +2 -2
- package/lib-esm/components/Responses/ResponseDetails.js +1 -1
- package/lib-esm/components/Responses/ResponseHeaders.d.ts +2 -2
- package/lib-esm/components/Responses/ResponseHeaders.js +1 -1
- package/lib-esm/components/RightPanel/RightPanel.js +1 -1
- package/lib-esm/components/Samples/ExampleSwitch.js +1 -1
- package/lib-esm/components/Schema/ArraySchema.d.ts +2 -2
- package/lib-esm/components/Schema/ArraySchema.js +1 -1
- package/lib-esm/components/Schema/ObjectSchema.d.ts +2 -2
- package/lib-esm/components/Schema/ObjectSchema.js +1 -1
- package/lib-esm/components/Schema/OneOfSchema.d.ts +2 -2
- package/lib-esm/components/Schema/OneOfSchema.js +1 -1
- package/lib-esm/components/Schema/RecursiveSchema.d.ts +2 -2
- package/lib-esm/components/Schema/RecursiveSchema.js +1 -1
- package/lib-esm/components/Schema/Schema.d.ts +2 -2
- package/lib-esm/components/Schema/Schema.js +1 -1
- package/lib-esm/components/SchemaDefinition/SchemaDefinition.d.ts +2 -2
- package/lib-esm/components/SchemaDefinition/SchemaDefinition.js +1 -1
- package/lib-esm/components/Search/MenuItemSearch.js +1 -1
- package/lib-esm/components/Search/Search.d.ts +2 -2
- package/lib-esm/components/Search/Search.js +1 -1
- package/lib-esm/components/Search/SearchBox.js +1 -1
- package/lib-esm/components/Search/SearchField.js +1 -1
- package/lib-esm/components/Search/styled.js +2 -2
- package/lib-esm/components/SectionContent/SectionContent.js +1 -1
- package/lib-esm/components/SectionItem/SectionItem.d.ts +2 -2
- package/lib-esm/components/SectionItem/SectionItem.js +1 -1
- package/lib-esm/components/Security/Divider.d.ts +1 -2
- package/lib-esm/components/Security/Divider.js +1 -1
- package/lib-esm/components/Security/OAuthFlow.d.ts +2 -2
- package/lib-esm/components/Security/OAuthFlow.js +1 -1
- package/lib-esm/components/Security/Security.js +1 -1
- package/lib-esm/components/Security/SecurityButton.js +6 -10
- package/lib-esm/components/Security/SecurityFlow.js +1 -1
- package/lib-esm/components/Security/SecurityModal.js +8 -17
- package/lib-esm/components/Security/SecuritySchemeItem.d.ts +1 -2
- package/lib-esm/components/Security/SecuritySchemeItem.js +4 -4
- package/lib-esm/components/SecurityRequirement/PanelDescription.js +1 -1
- package/lib-esm/components/SecurityRequirement/RequiredScopesRow.js +1 -1
- package/lib-esm/components/SecurityRequirement/RequirementElement.js +1 -1
- package/lib-esm/components/SecurityRequirement/SecurityDefs.js +1 -1
- package/lib-esm/components/SecurityRequirement/SecurityRequirement.d.ts +2 -2
- package/lib-esm/components/SecurityRequirement/SecurityRequirement.js +1 -1
- package/lib-esm/components/SecuritySchemes/OAuthFlow.d.ts +2 -2
- package/lib-esm/components/SecuritySchemes/OAuthFlow.js +1 -1
- package/lib-esm/components/SeeMore/SeeMore.js +1 -1
- package/lib-esm/components/ServerList/ServerList.js +1 -1
- package/lib-esm/components/ServerListDropdown/ServerListDropdown.js +1 -1
- package/lib-esm/components/ServerListDropdown/styled.js +0 -3
- package/lib-esm/components/SideMenu/Actions.d.ts +1 -2
- package/lib-esm/components/SideMenu/Actions.js +1 -1
- package/lib-esm/components/SideMenu/MenuItem.d.ts +2 -2
- package/lib-esm/components/SideMenu/MenuItem.js +1 -1
- package/lib-esm/components/SideMenu/MenuItemEternalLink.d.ts +2 -2
- package/lib-esm/components/SideMenu/MenuItemEternalLink.js +1 -1
- package/lib-esm/components/SideMenu/MenuItemLink.d.ts +2 -2
- package/lib-esm/components/SideMenu/MenuItemLink.js +1 -1
- package/lib-esm/components/SideMenu/MenuItems.d.ts +2 -2
- package/lib-esm/components/SideMenu/MenuItems.js +1 -1
- package/lib-esm/components/SideMenu/MenuOperationItemContent.d.ts +2 -2
- package/lib-esm/components/SideMenu/MenuOperationItemContent.js +2 -2
- package/lib-esm/components/SideMenu/SideMenu.d.ts +2 -2
- package/lib-esm/components/SideMenu/SideMenu.js +1 -1
- package/lib-esm/components/StickySidebar/StickyResponsiveSidebar.d.ts +2 -2
- package/lib-esm/components/StickySidebar/StickyResponsiveSidebar.js +2 -2
- package/lib-esm/components/Tabs/Tabs.d.ts +1 -2
- package/lib-esm/components/Tabs/Tabs.js +1 -1
- package/lib-esm/components/TagItem/OperationsNavigation.d.ts +3 -3
- package/lib-esm/components/TagItem/OperationsNavigation.js +16 -14
- package/lib-esm/components/TagItem/TagItem.d.ts +1 -2
- package/lib-esm/components/TagItem/TagItem.js +1 -1
- package/lib-esm/components/VersionSwitcher.js +1 -1
- package/lib-esm/components/ViewNested/ViewNested.d.ts +2 -2
- package/lib-esm/components/ViewNested/ViewNested.js +1 -13
- package/lib-esm/components/common/BodyContent/BodyContent.d.ts +2 -2
- package/lib-esm/components/common/BodyContent/BodyContent.js +1 -1
- package/lib-esm/components/common/ClearButton/ClearButton.d.ts +2 -2
- package/lib-esm/components/common/ClearButton/ClearButton.js +1 -1
- package/lib-esm/components/common/ConstraintsView.d.ts +2 -2
- package/lib-esm/components/common/ConstraintsView.js +1 -1
- package/lib-esm/components/common/Dropdown/Dropdown.d.ts +2 -2
- package/lib-esm/components/common/Dropdown/Dropdown.js +1 -1
- package/lib-esm/components/common/DropdownTheme/Dropdown.d.ts +1 -2
- package/lib-esm/components/common/DropdownTheme/Dropdown.js +2 -10
- package/lib-esm/components/common/Extensions.d.ts +2 -2
- package/lib-esm/components/common/Extensions.js +2 -2
- package/lib-esm/components/common/Fields/fields.d.ts +5 -1
- package/lib-esm/components/common/Fields/fields.js +2 -6
- package/lib-esm/components/common/LinearProgress.js +2 -2
- package/lib-esm/components/common/LinkToField.js +1 -1
- package/lib-esm/components/common/SchemaSelection/SchemaSelection.d.ts +1 -2
- package/lib-esm/components/common/SchemaSelection/SchemaSelection.js +1 -1
- package/lib-esm/components/common/Skeleton/Skeleton.js +2 -2
- package/lib-esm/components/common/linkify.js +2 -2
- package/lib-esm/components/common/perfect-scrollbar.js +2 -2
- package/lib-esm/components/pluggable/PullRight.d.ts +1 -2
- package/lib-esm/components/pluggable/PullRight.js +1 -1
- package/lib-esm/components/pluggable/RedocExample.js +1 -1
- package/lib-esm/components/pluggable/RedocRequestBody.js +1 -1
- package/lib-esm/components/pluggable/RedocResponse.js +1 -1
- package/lib-esm/components/pluggable/RedocSchema.js +1 -1
- package/lib-esm/hoc/withRouter.js +1 -1
- package/lib-esm/hoc/withStore.js +1 -1
- package/lib-esm/icons/CSharpIcon/CSharpIcon.d.ts +2 -3
- package/lib-esm/icons/CSharpIcon/CSharpIcon.js +1 -1
- package/lib-esm/icons/CurlIcon/CurlIcon.d.ts +2 -3
- package/lib-esm/icons/CurlIcon/CurlIcon.js +1 -1
- package/lib-esm/icons/GOIcon/GOIcon.d.ts +2 -3
- package/lib-esm/icons/GOIcon/GOIcon.js +1 -1
- package/lib-esm/icons/JavaIcon/JavaIcon.d.ts +2 -3
- package/lib-esm/icons/JavaIcon/JavaIcon.js +1 -1
- package/lib-esm/icons/JavaScriptIcon/JavaScriptIcon.d.ts +2 -3
- package/lib-esm/icons/JavaScriptIcon/JavaScriptIcon.js +1 -1
- package/lib-esm/icons/NodeJSIcon/NodeJSIcon.d.ts +2 -3
- package/lib-esm/icons/NodeJSIcon/NodeJSIcon.js +1 -1
- package/lib-esm/icons/PHPIcon/PHPIcon.d.ts +2 -3
- package/lib-esm/icons/PHPIcon/PHPIcon.js +1 -1
- package/lib-esm/icons/PythonIcon/PythonIcon.d.ts +2 -3
- package/lib-esm/icons/PythonIcon/PythonIcon.js +1 -1
- package/lib-esm/icons/RIcon/RIcon.d.ts +2 -3
- package/lib-esm/icons/RIcon/RIcon.js +1 -1
- package/lib-esm/icons/RubyIcon/RubyIcon.d.ts +2 -3
- package/lib-esm/icons/RubyIcon/RubyIcon.js +1 -1
- package/lib-esm/services/search/SearchStore.js +19 -8
- package/lib-esm/standalone.js +1 -1
- package/lib-esm/testProviders.js +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var __rest=this&&this.__rest||function(e,r){var t={};for(var
|
|
1
|
+
var __rest=this&&this.__rest||function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)r.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(t[o[i]]=e[o[i]])}return t};import{jsx as _jsx}from"react/jsx-runtime";import{memo}from"react";import{useAtomValue}from"jotai";import styled from"styled-components";import{ArraySchema}from"./ArraySchema";import{ObjectSchema}from"./ObjectSchema";import{OneOfSchema}from"./OneOfSchema";import{RecursiveSchema}from"./RecursiveSchema";import{operationStore}from"../../jotai/operation";import{FieldDetails}from"../PropertyDetails";function SchemaComponent(e){var r,{schema:t,onDiscriminatorChange:o}=e,i=__rest(e,["schema","onDiscriminatorChange"]);const{activeOneOf:a}=useAtomValue(operationStore((null==t?void 0:t.deps.operation.pointer)||""));if(!t)return null;const{type:n,oneOf:s,discriminatorProp:c,isCircular:m}=t,l=(i.level||0)+1;if(m)return _jsx(RecursiveSchema,{schema:t});if(void 0!==c){if(!s||!s.length)return console.warn(`Looks like you are using discriminator wrong: you don't have any definition inherited from the ${t.title}`),null;const e=s[a[t.pointer]||0];return(null==e?void 0:e.isCircular)?_jsx(RecursiveSchema,{schema:e}):_jsx(ObjectSchema,Object.assign({},i,{level:l,schema:e,discriminator:{fieldName:c,parentSchema:t,onChange:o}}))}if(void 0!==s)return _jsx(OneOfSchema,Object.assign({},i,{schema:t,level:l}));const p=Array.isArray(n)?n:[n];if(p.includes("object")){if(null===(r=t.fields)||void 0===r?void 0:r.length)return _jsx(ObjectSchema,Object.assign({},i,{level:l,schema:t}))}else if(p.includes("array"))return _jsx(ArraySchema,Object.assign({},i,{level:l,schema:t}));return _jsx(Wrapper,{children:_jsx(FieldDetails,{field:{schema:t,name:"",required:!1,deprecated:!1},fieldParentsName:i.fieldParentsName})})}export const Schema=memo(SchemaComponent);const Wrapper=styled.div`
|
|
2
2
|
padding: var(--spacing-xxs) 0;
|
|
3
3
|
border-bottom: 1px solid var(--border-color-primary);
|
|
4
4
|
`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
interface SchemaDefinitionProps {
|
|
3
3
|
schemaRef?: string;
|
|
4
4
|
exampleRef?: string;
|
|
5
5
|
showReadOnly?: boolean;
|
|
6
6
|
showWriteOnly?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export declare const SchemaDefinition:
|
|
8
|
+
export declare const SchemaDefinition: import("react").NamedExoticComponent<SchemaDefinitionProps>;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{memo,useCallback,useMemo}from"react";import styled from"styled-components";import{LayoutVariant,Panel}from"@redocly/theme";import{useAtom,useAtomValue}from"jotai";import{writeAtom}from"../../jotai/nexus";import{SamplesMiddlePanel,SamplesPanel,Row,Section}from"../common";import{getMediaType}from"../../models";import{MediaTypeSamples}from"../PayloadSamples";import{Schema}from"../Schema";import{Markdown}from"../Markdown";import{layoutAtom}from"../../jotai/app";import{globalStoreAtom}from"../../jotai/store";import{operationStore}from"../../jotai/operation";const getMediaTypeInfo=(e,o)=>{if(!e)return{};const a={schema:{$ref:e}};return o&&(a.examples={example:{$ref:o}}),a};function SchemaDefinitionComponent({schemaRef:e,exampleRef:o,showReadOnly:a=!0,showWriteOnly:t=!1}){var i,n,m;const s=useAtomValue(layoutAtom),{parser:r,options:l}=useAtomValue(globalStoreAtom),p=useMemo((()=>getMediaType(r,"json",!1,getMediaTypeInfo(e,o),l,{operation:{pointer:"SchemaDefinitionComponent"}})),[o,l,r,e]),[c,d]=useAtom(operationStore(null===(i=p.operation)||void 0===i?void 0:i.pointer)),u=useCallback((e=>{if(!p.schema)return;const o=p.schema,a=o.oneOf;if(a&&(null==p?void 0:p.examples)&&Object.keys(null==p?void 0:p.examples).includes(e)){const t=a.findIndex((o=>o.title===e));-1!==t&&o&&writeAtom(operationStore(o.deps.operation.pointer),(e=>{var a,i;return Object.assign(Object.assign({},e),{activeExampleName:(null===(i=null===(a=o.oneOf)||void 0===a?void 0:a[t])||void 0===i?void 0:i.title)||e.activeExampleName,activeOneOf:Object.assign(Object.assign({},e.activeOneOf),{[o.pointer]:t})})}))}c.activeExampleName!==e&&d((o=>Object.assign(Object.assign({},o),{activeExampleName:e})))}),[null==p?void 0:p.examples,p.schema,c.activeExampleName,d]);return _jsx(Section,{children:_jsxs(Row,{layout:s,children:[_jsxs(SamplesMiddlePanel,{isStacked:s===LayoutVariant.STACKED,children:[(null===(n=p.schema)||void 0===n?void 0:n.description)&&_jsx(Description,{children:_jsx(Markdown,{source:null===(m=p.schema)||void 0===m?void 0:m.description})}),_jsx(Schema,{skipWriteOnly:!t,skipReadOnly:!a,schema:p.schema})]}),_jsx(SamplesPanel,{children:_jsx(Panel,{className:"panel-response-samples",children:_jsx(MediaTypeSamples,{mediaType:p,onChange:u})})})]})})}export const SchemaDefinition=memo(SchemaDefinitionComponent);const Description=styled.div`
|
|
2
2
|
margin-bottom: var(--spacing-vertical);
|
|
3
3
|
`;
|
|
4
4
|
//# sourceMappingURL=SchemaDefinition.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{useAtomValue}from"jotai";import{MenuItem,MenuItemPath}from"../SideMenu";import{SideNavStyle}from"../../services";import{formatPath,formatPlaces}from"./utils";import{MarkedSpan,Place,ResultMeta}from"./styled";import{globalOptionsAtom}from"../../jotai/store";function markString(e,t){const a=new RegExp("("+t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")+")","gi"),r=e.split(a);for(let e=1,t=r.length;e<t;e+=2)r[e]=_jsx(MarkedSpan,{children:r[e]},e);return r}export const MenuItemSearch=({result:e,term:t,active:a,onClick:r})=>{const{searchMode:s,sideNavStyle:i}=useAtomValue(globalOptionsAtom),m="path-only"===s,n=i===SideNavStyle.PathFirst;return _jsxs(MenuItem,{item:Object.create(e.item,{name:{value:m?e.item.name:""},path:{value:""},search:{value:!0}}),active:a,"data-role":"search:result",onClick:r,children:[(n||m)&&"operation"===e.item.type?_jsx(_Fragment,{children:_jsx(MenuItemPath,{title:e.item.path,children:markString(e.item.path,t)})}):markString(e.item.name,t),e.count>1?_jsxs(ResultMeta,{children:[e.count," matching ",formatPlaces(e.places)]}):1===e.count?_jsxs(ResultMeta,{children:["in ",_jsx(Place,{children:e.places[0].place})," ",formatPath(t,e.places[0].paths[0])]}):null]})};
|
|
2
2
|
//# sourceMappingURL=MenuItemSearch.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import type { SearchProps } from './types';
|
|
3
|
-
export declare const Search:
|
|
3
|
+
export declare const Search: import("react").NamedExoticComponent<SearchProps>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{memo,useState}from"react";import{SearchField}from"./SearchField";import{SearchBox}from"./SearchBox";import{useSearch}from"../../services/search/useSearch";import{MarkerService}from"../../services";const marker=new MarkerService;function SearchComponent({contentItems:e,flatItems:r,options:a}){const[s,t]=useState(!1),[o,c]=useState(""),{search:m}=useSearch({contentItems:e,options:a});return a.disableSearch?null:_jsxs(_Fragment,{children:[_jsx(SearchField,{showPopUp:()=>t(!0),searchValue:o,marker:marker,setSearchValue:c}),_jsx(SearchBox,{search:m,marker:marker,flatItems:r,options:a,shown:s,hidePopUp:()=>t(!1),showPopUp:()=>t(!0),setSearchValue:c,searchValue:o})]})}export const Search=memo(SearchComponent);
|
|
2
2
|
//# sourceMappingURL=Search.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import hotkeys from"hotkeys-js";import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import hotkeys from"hotkeys-js";import{useCallback,useEffect,useRef,useState}from"react";import{useMount,useUnmount,Portal}from"@redocly/theme";import{usePrevious}from"../../hooks";import{PerfectScrollbarWrap}from"../common";import{debounce}from"../../utils";import{MenuItemSearch}from"./MenuItemSearch";import{SearchPopUpBG,SearchPopUpWrap,SearchPopUpHeader,TextContainer,SearchResultsBox,SearchResultsItems,ButtonClose,ButtonClear,SearchInput}from"./styled";import{enhanceResults,expandResults}from"./utils";export const SearchBox=({search:e,shown:r,searchValue:t,setSearchValue:n,marker:o,flatItems:s,options:a,hidePopUp:u,showPopUp:l})=>{const c=useRef(null),i=useRef(null),[h,p]=useState(null),[m,d]=useState(-1),[f,x]=useState(!1),[S,k]=useState(""),j=usePrevious(r),C=useCallback((e=>{c.current&&(clearTimeout(c.current),c.current=null),p(null),k(e),x(!1),o.unmark()}),[o]);useMount((()=>{a.ctrlFHijack&&hotkeys("cmd+f,ctrl+f",(e=>(e.preventDefault(),e.stopPropagation(),a.disableSearch||l(),!1)))})),useEffect((()=>{var e;!j&&r&&(null===(e=i.current)||void 0===e||e.focus())}),[j,r]),useEffect((()=>{!j&&r&&!t&&S&&C("")}),[C,j,e,t,r,S]),useUnmount((()=>{hotkeys.unbind("cmd+f,ctrl+f")}));const P=()=>{p(null),k(""),d(-1),n(""),o.unmark()},_=debounce(((r,t)=>{e.search(r).then((e=>{t(e)}))}),200,!0),g=e=>{let r=!1;return _(e,(t=>{e.length<3&&C(e),r||(e=>{c.current&&(clearTimeout(c.current),c.current=null),p(enhanceResults(e,(e=>s.find((r=>r.id===e))))),x(!1)})(t)})),()=>{r=!0}},y=e=>{if(u(),a.searchAutoExpand)try{expandResults(e)}catch(e){console.warn("Failed to auto expand schema:",e.message)}};return r?_jsx(Portal,{mountId:"api-content",children:_jsx(SearchPopUpBG,{role:"search",onClick:e=>{"search"===e.target.getAttribute("role")&&(P(),u())},children:_jsxs(SearchPopUpWrap,{children:[_jsxs(SearchPopUpHeader,{children:[_jsx(SearchInput,{ref:i,value:S,onKeyDown:e=>{if("Escape"===e.key&&i.current&&(i.current.blur(),u()),h&&("Escape"===e.key&&P(),"ArrowDown"===e.key&&(d(Math.min(m+1,h.length-1)),e.preventDefault()),"ArrowUp"===e.key&&(d(Math.max(0,m-1)),e.preventDefault()),"Enter"===e.key)){const e=h[m];e&&y(e)}},placeholder:"Search...",type:"text",onChange:e=>{const r=e.target.value;if(r.length<a.minCharacterLengthToInitSearch)return C(r),void n("");(e=>{k(e),n(e),c.current&&(clearTimeout(c.current),c.current=null),c.current=setTimeout((()=>{x(!0)}),500),o.mark(e)})(r),g(r)},autoFocus:!0}),S&&_jsx(ButtonClear,{onClick:P,children:"Clear"}),_jsx(ButtonClose,{onClick:()=>{P(),u()}})]}),_jsxs(SearchResultsBox,{"data-role":"search:results",children:[f&&_jsx(TextContainer,{children:"Loading..."}),!f&&!(null==h?void 0:h.length)&&_jsx(TextContainer,{children:"No results found"}),(null==h?void 0:h.length)?_jsx(PerfectScrollbarWrap,{options:{wheelPropagation:!1},children:_jsx(SearchResultsItems,{children:h.slice(0,50).map(((e,r)=>_jsx(MenuItemSearch,{result:e,active:r===m,term:S,onClick:u},e.index+e.item.id)))})}):null]})]})})}):null};
|
|
2
2
|
//# sourceMappingURL=SearchBox.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{SearchFieldWrap,SearchIcon,ButtonClear,CrossIcon}from"./styled";export const SearchField=({showPopUp:r,searchValue:s,marker:e,setSearchValue:a})=>{const o=!!s;return _jsxs(SearchFieldWrap,{onClick:r,className:`button-field-search ${!!s&&"active"}`,children:[_jsx("span",{}),s||"Search",_jsx(SearchIcon,{}),o&&_jsx(ButtonClear,{onClick:r=>{r.stopPropagation(),e.unmark(),a("")},children:_jsx(CrossIcon,{})})]})};
|
|
2
2
|
//# sourceMappingURL=SearchField.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import styled from"styled-components";export const CrossIcon=()=>_jsxs("svg",{version:"1.1",viewBox:"0 0 12 12",width:"12",height:"12",xmlns:"http://www.w3.org/2000/svg",fill:"none",className:"clear-icon",children:[_jsx("path",{d:"M11 1L6 6L11 11",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),_jsx("path",{d:"M1 1L6 6L1 11",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});export const ButtonClose=styled.i.attrs((()=>({className:"button-close"})))`
|
|
2
2
|
cursor: pointer;
|
|
3
3
|
position: absolute;
|
|
4
4
|
right: 15px;
|
|
@@ -6,7 +6,7 @@ import React from"react";import styled from"styled-components";export const Cros
|
|
|
6
6
|
`;export const ButtonClear=styled.i.attrs((()=>({className:"button-clear"})))`
|
|
7
7
|
cursor: pointer;
|
|
8
8
|
position: absolute;
|
|
9
|
-
`;export const SearchIcon=()=>
|
|
9
|
+
`;export const SearchIcon=()=>_jsxs("svg",{version:"1.1",viewBox:"0 0 15 16",width:"15",height:"16",xmlns:"http://www.w3.org/2000/svg",fill:"none",className:"search-icon",children:[_jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5 14C11.0899 14 14 11.0899 14 7.5C14 3.91015 11.0899 1 7.5 1C3.91015 1 1 3.91015 1 7.5C1 11.0899 3.91015 14 7.5 14Z",stroke:"currentColor",strokeWidth:"2"}),_jsx("path",{d:"M7.5 5C6.11929 5 5 6.11929 5 7.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),_jsx("path",{d:"M1 15L3 13",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]});export const SearchFieldWrap=styled.button`
|
|
10
10
|
cursor: text;
|
|
11
11
|
margin: 10px 20px 13px;
|
|
12
12
|
padding: 0 18px 0 3px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{useMemo}from"react";import{breakpoints,LayoutVariant,OpenApiHeader}from"@redocly/theme";import{useAtomValue}from"jotai";import styled from"styled-components";import{ContentItem}from"../ContentItem";import{MiddlePanelWrapper}from"../Panel";import{PageFooter}from"../PageFooter";import{globalOptionsAtom}from"../../jotai/store";import{RenderHook}from"../RenderHook";import{RightPanel}from"../RightPanel";import{layoutAtom}from"../../jotai/app";import{SamplesPanel}from"../common";export function SectionContent({items:e,hideFooterAndHeader:t}){const{hooks:{MiddlePanelHeader:o},routingBasePath:a}=useAtomValue(globalOptionsAtom),n=useAtomValue(layoutAtom),i=useMemo((()=>t?null:_jsx(MiddlePanelWrapper,{children:_jsx(PageFooter,{})})),[t]),r=useMemo((()=>t||!OpenApiHeader&&!o?null:_jsx(MiddlePanelWrapper,{children:o?_jsx(RenderHook,{Hook:o,props:void 0}):_jsx(OpenApiHeader,{})})),[o,t]);return 0===e.length?null:_jsxs(_Fragment,{children:[r,_jsxs(Container,{children:[_jsx(SectionContainer,{layout:n,children:e.filter((({type:e})=>["section"].includes(e))).map((e=>_jsx(ContentItem,{item:e,routingBasePath:a},e.id)))}),_jsx(RightPanelContainer,{layout:n,children:_jsx(RightPanel,{item:e[0]})})]}),e.filter((({type:e})=>!["section"].includes(e))).map((e=>_jsx(ContentItem,{item:e,routingBasePath:a},e.id))),i]})}const Container=styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
width: 100%;
|
|
4
4
|
`,SectionContainer=styled.div`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import type { GroupModel } from '../../models';
|
|
3
3
|
export interface SectionItemProps {
|
|
4
4
|
item: GroupModel;
|
|
5
5
|
}
|
|
6
|
-
export declare const SectionItem:
|
|
6
|
+
export declare const SectionItem: import("react").NamedExoticComponent<SectionItemProps>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import{SamplesMiddlePanel,Row}from"../common";import{Markdown}from"../Markdown";import{ExternalDocumentation}from"../ExternalDocumentation";function SectionItemComponent({item:e}){const{externalDocs:t,ast:o,description:n}=e;return _jsxs(_Fragment,{children:[_jsx(Markdown,{ast:o,source:n,htmlWrap:e=>_jsx(SamplesMiddlePanel,{compact:!0,fullWidth:!0,children:e})}),t&&_jsx(Row,{children:_jsx(SamplesMiddlePanel,{compact:!0,fullWidth:!0,children:_jsx(ExternalDocumentation,{externalDocs:t})})})]})}export const SectionItem=memo(SectionItemComponent);
|
|
2
2
|
//# sourceMappingURL=SectionItem.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import styled from"styled-components";import{Tag}from"./styled";export function Divider({label:r}){return _jsxs(Wrapper,{children:[_jsx(Tag,{className:"tag-grey",children:r})," ",_jsx("hr",{})]})}const Wrapper=styled.div`
|
|
2
2
|
font-size: var(--font-size-sm);
|
|
3
3
|
width: 100%;
|
|
4
4
|
display: flex;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import type { OpenAPISecurityScheme } from '../../types';
|
|
3
3
|
export interface OAuthFlowProps {
|
|
4
4
|
flow: OpenAPISecurityScheme['flows'][keyof OpenAPISecurityScheme['flows']];
|
|
5
5
|
}
|
|
6
|
-
export declare const OAuthFlow:
|
|
6
|
+
export declare const OAuthFlow: import("react").NamedExoticComponent<PropsWithChildren<OAuthFlowProps>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import styled from"styled-components";import{Markdown}from"../Markdown";import{SecuritySchemeItem}from"./SecuritySchemeItem";import{StyledLink,Tag}from"./styled";function OAuthFlowComponent({flow:e}){const t=Object.keys((null==e?void 0:e.scopes)||{});return _jsxs(_Fragment,{children:[_jsx(SecuritySchemeItem,{label:"Authorization URL:",value:(null==e?void 0:e.authorizationUrl)&&_jsx(StyledLink,{target:"_blank",rel:"noopener noreferrer",href:null==e?void 0:e.authorizationUrl,children:null==e?void 0:e.authorizationUrl})}),_jsx(SecuritySchemeItem,{label:"Token URL:",value:null==e?void 0:e.tokenUrl}),_jsx(SecuritySchemeItem,{label:"Refresh URL:",value:null==e?void 0:e.refreshUrl}),t.length&&_jsxs(_Fragment,{children:[_jsx(SecuritySchemeItem,{label:"Scopes",value:" "}),t.map((t=>_jsx(SecuritySchemeItem,{label:_jsx(StyledTag,{className:"tag-grey",children:t}),value:_jsx(Markdown,{source:(null==e?void 0:e.scopes[t])||""})},t)))]})||null]})}const StyledTag=styled(Tag)`
|
|
2
2
|
margin-left: var(--spacing-xs);
|
|
3
3
|
`;export const OAuthFlow=memo(OAuthFlowComponent);
|
|
4
4
|
//# sourceMappingURL=OAuthFlow.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{useState}from"react";import{useAtomValue}from"jotai";import{Portal}from"@redocly/theme";import{globalStoreAtom}from"../../jotai/store";import{SecurityButton}from"./SecurityButton";import{SecurityModal}from"./SecurityModal";export function Security({securities:t}){const{options:{hideSecuritySection:o}}=useAtomValue(globalStoreAtom),[e,r]=useState(!1);return!t.length||o?null:_jsxs(_Fragment,{children:[_jsx(SecurityButton,{securities:t,onClick:()=>r(!0)}),e&&_jsx(Portal,{mountId:"api-content",children:_jsx(SecurityModal,{securities:t,onClose:()=>r(!1)})})]})}
|
|
2
2
|
//# sourceMappingURL=Security.js.map
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import styled from"styled-components";import{Button,SecurityIcon}from"@redocly/theme";export function SecurityButton({securities:t,onClick:n}){return _jsxs(StyledButton,{icon:_jsx(SecurityIcon,{}),variant:"link",onClick:n,children:[_jsx(Title,{children:"Security:"}),_jsx(SecurityList,{children:t.map((n=>{const e=t.length>1&&n.schemes.length>1;return`\n ${e?"(":""} \n ${n.schemes.map((({id:t})=>t)).join(" and ")} \n ${e?")":""}\n `})).join(" or ")})]})}const StyledButton=styled(Button)`
|
|
4
2
|
align-self: flex-start;
|
|
5
3
|
gap: var(--spacing-xxs);
|
|
6
4
|
min-height: 32px;
|
|
7
5
|
background: var(--color-info-bg);
|
|
8
|
-
color: var(--link-color-primary);
|
|
9
|
-
border: none;
|
|
10
|
-
font-size: var(--font-size-base);
|
|
11
|
-
font-family: var(--font-family-base);
|
|
12
|
-
line-height: var(--line-height-base);
|
|
13
6
|
padding: 0 var(--spacing-xs);
|
|
14
|
-
border-radius: var(--border-radius-md);
|
|
15
7
|
margin-top: var(--spacing-base);
|
|
16
|
-
|
|
8
|
+
|
|
9
|
+
&:hover {
|
|
10
|
+
background: var(--color-info-bg);
|
|
11
|
+
color: var(--link-color-primary);
|
|
12
|
+
}
|
|
17
13
|
`,Title=styled.span`
|
|
18
14
|
font-family: var(--font-family-monospaced);
|
|
19
15
|
font-weight: var(--font-weight-semibold);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import styled from"styled-components";import{SecuritySchemeItem}from"./SecuritySchemeItem";import{titleize}from"../../utils";import{OAuthFlow}from"./OAuthFlow";import{StyledLink,Tag}from"./styled";import{Markdown}from"../Markdown";import{getRequiredScopes}from"./helper";export function SecurityFlow({type:e,bearerFormat:r,name:t,flows:a,openIdConnectUrl:i,description:s,id:o,securities:l,in:n}){if(!e||!o)return null;const m=getRequiredScopes(o,l),c={http:_jsxs(_Fragment,{children:[_jsx(SecuritySchemeItem,{label:"HTTP Authorization Scheme",value:e}),_jsx(SecuritySchemeItem,{label:"Bearer Format",value:r})]}),apiKey:_jsx(SecuritySchemeItem,{label:`${titleize(n||"")} parameter name:`,value:t}),oauth2:_jsxs(_Fragment,{children:[_jsx(SecuritySchemeItem,{label:"Flow type:",value:e}),a&&Object.keys(a).map((e=>_jsx(OAuthFlow,{flow:a[e]},e)))]}),openIdConnect:_jsx(SecuritySchemeItem,{label:"Connect URL:",value:i&&_jsx(StyledLink,{target:"_blank",rel:"noopener noreferrer",href:i,children:i})})};return _jsxs(Wrapper,{children:[_jsx(TitleSchema,{children:o}),_jsx(Markdown,{source:s}),_jsxs(List,{children:[c[e]||null,_jsx(SecuritySchemeItem,{label:"Required scopes",value:m.length&&_jsx(Row,{children:m.map((e=>_jsx(Tag,{className:"tag-grey",children:e},e)))})})]})]})}const Wrapper=styled.div`
|
|
2
2
|
background: var(--layer-color);
|
|
3
3
|
padding: var(--spacing-base);
|
|
4
4
|
border-radius: var(--border-radius);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{Fragment,useEffect,useState,useRef}from"react";import styled from"styled-components";import{useOutsideClick,Typography,CloseIcon,SecurityIcon,Segmented,Button}from"@redocly/theme";import{SecurityFlow}from"./SecurityFlow";import{Divider}from"./Divider";export function SecurityModal({securities:e,onClose:t}){const[o,s]=useState(0),i=useRef(null),{schemes:r}=e[o]||{};useEffect((()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow="auto"})),[]),useOutsideClick(i,t);const a=e.map((({schemes:e},t)=>({label:e.map((({id:e})=>e)).join(" and "),value:t})));return _jsx(StyledBackground,{children:_jsxs(Wrapper,{ref:i,children:[_jsx(Close,{onClick:t,"data-cy":"close",variant:"ghost",icon:_jsx(CloseIcon,{})}),_jsxs(Title,{children:[_jsx(SecurityIcon,{size:"24px"}),"Security"]}),_jsx(Segmented,{value:o,onChange:({value:e})=>s(e),options:a}),r.map(((t,o)=>_jsxs(Fragment,{children:[_jsx(SecurityFlow,Object.assign({},t,{securities:e})),o!==r.length-1&&_jsx(Divider,{label:"and"})]},t.id)))]})})}const Wrapper=styled.div`
|
|
2
2
|
background: var(--bg-color);
|
|
3
3
|
box-shadow: var(--bg-raised-shadow);
|
|
4
4
|
border-radius: var(--border-radius-lg);
|
|
@@ -7,40 +7,31 @@ import React,{Fragment,useEffect,useState}from"react";import styled from"styled-
|
|
|
7
7
|
flex-direction: column;
|
|
8
8
|
align-items: flex-start;
|
|
9
9
|
position: absolute;
|
|
10
|
-
width:
|
|
10
|
+
width: 720px;
|
|
11
11
|
max-width: 100%;
|
|
12
12
|
height: auto;
|
|
13
|
-
max-height:
|
|
13
|
+
max-height: 600px;
|
|
14
14
|
overflow-y: scroll;
|
|
15
15
|
left: 50%;
|
|
16
|
-
top:
|
|
17
|
-
transform: translate(-50%, -
|
|
18
|
-
z-index: 2;
|
|
16
|
+
top: 30%;
|
|
17
|
+
transform: translate(-50%, -30%);
|
|
19
18
|
.tag-grey span {
|
|
20
19
|
font-size: var(--font-size-base);
|
|
21
20
|
line-height: var(--line-height-base);
|
|
22
21
|
}
|
|
23
22
|
`,StyledBackground=styled.div`
|
|
24
|
-
background:
|
|
23
|
+
background: var(--bg-color-modal-overlay);
|
|
25
24
|
position: fixed;
|
|
26
25
|
width: 100vw;
|
|
27
26
|
height: 100vh;
|
|
28
|
-
z-index:
|
|
27
|
+
z-index: var(--z-index-popover);
|
|
29
28
|
left: 0;
|
|
30
29
|
top: 0;
|
|
31
30
|
pointer-events: auto;
|
|
32
|
-
`,Close=styled
|
|
33
|
-
border: none;
|
|
34
|
-
background: none;
|
|
31
|
+
`,Close=styled(Button)`
|
|
35
32
|
position: absolute;
|
|
36
33
|
right: var(--spacing-md);
|
|
37
34
|
top: var(--spacing-md);
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
svg {
|
|
40
|
-
width: 18px;
|
|
41
|
-
height: 18px;
|
|
42
|
-
fill: var(--text-color-primary);
|
|
43
|
-
}
|
|
44
35
|
`,Title=styled(Typography)`
|
|
45
36
|
display: flex;
|
|
46
37
|
align-items: center;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { ReactNode } from 'react';
|
|
3
2
|
interface SecuritySchemeItemProps {
|
|
4
3
|
label: string | ReactNode;
|
|
5
4
|
value: string | ReactNode;
|
|
6
5
|
}
|
|
7
|
-
export declare function SecuritySchemeItem({ label, value }: SecuritySchemeItemProps):
|
|
6
|
+
export declare function SecuritySchemeItem({ label, value }: SecuritySchemeItemProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
7
|
export {};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import styled from"styled-components";export function SecuritySchemeItem({label:e,value:t}){return e&&t?_jsxs(Row,{children:[_jsx(Label,{children:e}),_jsx(Value,{children:t})]}):null}const Row=styled.div`
|
|
2
2
|
display: flex;
|
|
3
|
-
justify-content:
|
|
3
|
+
justify-content: flex-start;
|
|
4
4
|
margin-bottom: var(--spacing-xxs);
|
|
5
5
|
font-size: var(--font-size-sm);
|
|
6
6
|
color: var(--text-color-secondary);
|
|
7
7
|
`,Label=styled.div`
|
|
8
|
-
width: 296px;
|
|
9
8
|
display: flex;
|
|
10
9
|
align-items: center;
|
|
11
10
|
justify-content: flex-start;
|
|
12
11
|
font-size: var(--font-size-base);
|
|
13
12
|
line-height: var(--line-height-base);
|
|
13
|
+
flex: 1;
|
|
14
14
|
`,Value=styled.div`
|
|
15
|
-
|
|
15
|
+
flex: 1;
|
|
16
16
|
font-size: var(--font-size-base);
|
|
17
17
|
line-height: var(--line-height-base);
|
|
18
18
|
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsxs as _jsxs,jsx as _jsx}from"react/jsx-runtime";import{useLayoutEffect,Fragment,useRef,useState}from"react";import styled from"styled-components";import{AUTH_TYPES}from"./constants";export function PanelDescription({securities:e,showSecuritySchemeType:t}){const s=useRef(null),[n,r]=useState("");return useLayoutEffect((()=>{var e;r((null===(e=s.current)||void 0===e?void 0:e.innerText)||"")}),[s]),_jsx(StyledDescription,{ref:s,title:n,children:e.map(((s,n)=>{let r="",i="";const o=s.schemes.length;return e.length>1&&o>1&&(r=0===n?"(":"",i=")"),n!==e.length-1&&(i+=" or "),_jsxs(Fragment,{children:[r,o?s.schemes.map((e=>_jsxs(StyledRequirementElement,{children:[t?`${AUTH_TYPES[e.type]||e.type}: `:null,e.id]},e.id))).reduce(((e,t)=>[e," and ",t])):null,i]},s.schemes.map((({id:e})=>e)).join(""))}))})}const StyledDescription=styled.span`
|
|
2
2
|
font-size: var(--font-size-base);
|
|
3
3
|
`,StyledRequirementElement=styled.span``;
|
|
4
4
|
//# sourceMappingURL=PanelDescription.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{Fragment}from"react";import{Row}from"./styled";export function RequiredScopesRow({scopes:e}){return e.length?_jsxs(Row,{children:[_jsx("b",{children:"Required scopes: "}),e.map((e=>_jsxs(Fragment,{children:[_jsx("code",{children:e})," "]},e)))]}):null}
|
|
2
2
|
//# sourceMappingURL=RequiredScopesRow.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import styled from"styled-components";import{markdownLinksCss}from"@redocly/theme";import{AUTH_TYPES}from"./constants";import{Link}from"../common";export function RequirementElement({showSecuritySchemeType:e,security:r}){return _jsx(SecurityRequirementOrWrap,{children:r.schemes.map((r=>{const n=r.scopes.length>0;return _jsxs(SecurityRequirementAndWrap,{children:[e?`${AUTH_TYPES[r.type]||r.type}: `:null,_jsx(Link,{to:r.id,security:!0,"aria-label":`link to ${r.id}`,children:_jsx("b",{children:r.id})}),n?["(",r.scopes.map((e=>_jsx(ScopeName,{children:e},e))).reduce(((e,r)=>[e,", ",r])),")"]:null]},r.id)}))})}const SecurityRequirementAndWrap=styled.span`
|
|
2
2
|
&:after {
|
|
3
3
|
content: ' and ';
|
|
4
4
|
font-weight: normal;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import styled from"styled-components";import{useAtomValue}from"jotai";import{H4,Markdown as MarkdownWrapper}from"@redocly/theme";import{Markdown}from"../Markdown";import{OAuthFlow}from"../SecuritySchemes";import{AUTH_TYPES}from"./constants";import{Section,ShareLink}from"../common";import{titleize}from"../../utils";import{globalStoreAtom}from"../../jotai/store";import{getSecuritySchemes}from"../../models";import{Label,Title,Item,Container}from"./styled";export function SecurityDefs(){const{parser:e}=useAtomValue(globalStoreAtom),r=getSecuritySchemes({parser:e});return _jsx(_Fragment,{children:null==r?void 0:r.map((e=>_jsxs(Section,{id:e.sectionId,sectionId:e.sectionId,children:[_jsxs(H4,{children:[_jsx(ShareLink,{to:`#${e.sectionId}`,"aria-label":`link to ${e.id}`}),e.id]}),_jsx(Description,{source:e.description||""}),_jsx(MarkdownWrapper,{children:_jsxs(Container,{className:"security-details",children:[_jsxs(Item,{children:[_jsx(Label,{children:"Security Scheme Type"}),_jsx(Title,{children:AUTH_TYPES[e.type]||e.type})]}),e.apiKey?_jsxs(Item,{children:[_jsxs(Label,{children:[titleize(e.apiKey.in||"")," parameter name"]}),_jsx(Title,{children:e.apiKey.name})]}):e.http?[_jsxs(Item,{children:[_jsx(Label,{children:"HTTP Authorization Scheme"}),_jsx(Title,{children:e.http.scheme})]},"scheme"),"bearer"===e.http.scheme&&e.http.bearerFormat&&_jsxs(Item,{children:[_jsx(Label,{children:"Bearer format"}),_jsxs(Title,{children:['"',e.http.bearerFormat,'"']})]},"bearer")]:e.openId?_jsxs(Item,{children:[_jsx(Label,{children:"Connect URL"}),_jsx(Title,{children:_jsx("a",{target:"_blank",rel:"noopener noreferrer",href:e.openId.connectUrl,children:e.openId.connectUrl})})]}):e.flows?Object.keys(e.flows).map((r=>_jsx(OAuthFlow,{type:r,flow:e.flows[r]},r))):null]})})]},e.id)))})}const Description=styled((e=>_jsx(Markdown,Object.assign({},e))))`
|
|
2
2
|
margin-bottom: 1em;
|
|
3
3
|
`;
|
|
4
4
|
//# sourceMappingURL=SecurityDefs.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import type { SecurityRequirementsProps } from './types';
|
|
3
|
-
export declare const SecurityRequirements:
|
|
3
|
+
export declare const SecurityRequirements: import("react").NamedExoticComponent<SecurityRequirementsProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{Fragment,memo,useState}from"react";import styled from"styled-components";import{useAtomValue}from"jotai";import{Markdown as MarkdownWrapper}from"@redocly/theme";import{Markdown}from"../Markdown";import{OAuthFlow}from"../SecuritySchemes";import{PanelDescription}from"./PanelDescription";import{RequirementElement}from"./RequirementElement";import{RequiredScopesRow}from"./RequiredScopesRow";import{Row}from"./styled";import{AUTH_TYPES}from"./constants";import{titleize}from"../../utils";import{ContentPanel}from"../Panel";import{globalStoreAtom}from"../../jotai/store";import{useSecurityRequirements}from"./useSecurityRequirements";function getRequiredScopes(e,r){const t=[];let o=r.length;for(;o--;){const s=r[o];let i=s.schemes.length;for(;i--;){const r=s.schemes[i];r.id===e&&t.push(...r.scopes)}}return Array.from(new Set(t))}function SecurityRequirementsComponent({securities:e}){const[r,t]=useState(!1),{options:{showSecuritySchemeType:o,hideSecuritySection:s},parser:i}=useAtomValue(globalStoreAtom),n=useSecurityRequirements({parser:i,securities:e});return!e.length||s?null:_jsxs(ContentPanel,{className:"panel-security-schemas",header:"Security",onToggle:e=>t(e),description:!r&&_jsx(PanelDescription,{securities:e,showSecuritySchemeType:o}),expanded:r,children:[r&&n&&n.length>1?_jsx(SecurityRequirementBlock,{children:e.map(((r,t)=>{let s,i,n="";return e.length>1&&r.schemes.length>1&&(i=0===t?"(":"",n=")"),t!==e.length-1&&(n+=" or",s=_jsx("br",{})),_jsxs(Fragment,{children:[i,_jsx(RequirementElement,{security:r,showSecuritySchemeType:o}),n,s]},r.schemes.map((({id:e})=>e)).join(""))}))}):null,r?n.map((r=>{const t=getRequiredScopes(r.id,e);return _jsxs(SecurityDetails,{children:[_jsxs("h5",{children:[AUTH_TYPES[r.type]||r.type,": ",r.id]}),_jsx(Markdown,{source:r.description||""}),_jsx(MarkdownWrapper,{children:r.apiKey?_jsxs(_Fragment,{children:[_jsxs(Row,{children:[_jsxs("b",{children:[titleize(r.apiKey.in||"")," parameter name: "]}),_jsx("code",{children:r.apiKey.name})]}),_jsx(RequiredScopesRow,{scopes:t})]}):r.http?_jsxs(_Fragment,{children:[_jsxs(Row,{children:[_jsx("b",{children:"HTTP Authorization Scheme: "}),_jsx("code",{children:r.http.scheme})]}),_jsx(Row,{children:"bearer"===r.http.scheme&&r.http.bearerFormat&&_jsxs(_Fragment,{children:[_jsx("b",{children:"Bearer format: "}),_jsx("code",{children:r.http.bearerFormat})]})}),_jsx(RequiredScopesRow,{scopes:t})]}):r.openId?_jsxs(_Fragment,{children:[_jsxs(Row,{children:[_jsx("b",{children:"Connect URL: "}),_jsx("code",{children:_jsx("a",{target:"_blank",rel:"noopener noreferrer",href:r.openId.connectUrl,children:r.openId.connectUrl})})]}),_jsx(RequiredScopesRow,{scopes:t})]}):r.flows?Object.keys(r.flows).map((e=>_jsx(OAuthFlow,{type:e,flow:r.flows[e],children:_jsx(RequiredScopesRow,{scopes:t})},e))):null},r.id)]},r.id)})):null]})}export const SecurityRequirements=memo(SecurityRequirementsComponent);const SecurityDetails=styled.div`
|
|
2
2
|
border-bottom: 1px solid var(--border-color-primary);
|
|
3
3
|
margin-bottom: 1.5em;
|
|
4
4
|
padding-bottom: 0.7em;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import type { OAuthFlowProps } from './types';
|
|
3
|
-
export declare const OAuthFlow:
|
|
3
|
+
export declare const OAuthFlow: import("react").NamedExoticComponent<PropsWithChildren<OAuthFlowProps>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{memo}from"react";import{Markdown}from"../Markdown";import{SeeMore}from"../SeeMore";import{Label,Title,Item,Container}from"../SecurityRequirement";import{hasAuthorizationUrl,hasTokenUrl}from"./helpers";function OAuthFlowComponent({type:e,flow:r,children:l}){const n=Object.keys((null==r?void 0:r.scopes)||{});return _jsxs(_Fragment,{children:[_jsxs(Item,{children:[_jsx(Label,{children:"Flow type "}),_jsxs(Title,{children:[_jsx("code",{children:e})," "]})]}),hasAuthorizationUrl(e,r)?_jsxs(Item,{children:[_jsx(Label,{children:"Authorization URL "}),_jsx(Title,{children:_jsx("a",{target:"_blank",rel:"noopener noreferrer",href:null==r?void 0:r.authorizationUrl,children:null==r?void 0:r.authorizationUrl})})]}):null,hasTokenUrl(e,r)?_jsxs(Item,{children:[_jsx(Label,{children:"Token URL "}),_jsx(Title,{children:_jsx("code",{children:null==r?void 0:r.tokenUrl})})]}):null,(null==r?void 0:r.refreshUrl)&&_jsxs(Item,{children:[_jsx(Label,{children:"Refresh URL "}),_jsx(Title,{children:_jsx("code",{children:null==r?void 0:r.refreshUrl})})]}),n.length?_jsxs(_Fragment,{children:[l,_jsx(Item,{children:_jsx(Label,{children:"Scopes"})}),_jsx(SeeMore,{height:"5em",children:_jsx(Container,{children:n.map((e=>_jsxs(Item,{children:[_jsx(Label,{children:_jsx("code",{children:e})}),_jsx(Title,{children:_jsx(Markdown,{source:(null==r?void 0:r.scopes[e])||"",base:!0})})]},e)))})})]}):null]})}export const OAuthFlow=memo(OAuthFlowComponent);
|
|
2
2
|
//# sourceMappingURL=OAuthFlow.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import styled from"styled-components";import
|
|
1
|
+
import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import styled from"styled-components";import{createRef,useLayoutEffect,useState}from"react";const TOLERANCE_PX=20;export function SeeMore({children:e,height:t}){const n=createRef(),[r,o]=useState(!1),[i,s]=useState(!1);useLayoutEffect((()=>{n.current&&n.current.clientHeight+TOLERANCE_PX<n.current.scrollHeight&&s(!0)}),[n]);return _jsxs(_Fragment,{children:[_jsx(Container,{ref:n,className:r?"":"container",style:{height:r?"auto":t},children:e}),_jsx(ButtonContainer,{dimmed:!r,children:i&&_jsx(ButtonLinkStyled,{onClick:()=>{o(!r)},children:r?"See less":"See more"})})]})}const Container=styled.div`
|
|
2
2
|
overflow-y: hidden;
|
|
3
3
|
`,ButtonContainer=styled.div`
|
|
4
4
|
text-align: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{CopyButton}from"@redocly/theme";import styled from"styled-components";import{expandDefaultServerVariables,getBasePath}from"../../utils";import{PanelItemDescription,Title}from"../PanelItem";import{ViewNested}from"../ViewNested";import{Tag}from"../common";export const ServerList=({servers:e,path:r,expandVariables:a,hideHostname:i})=>_jsx(ItemsList,{children:e.map((e=>{const t=a?expandDefaultServerVariables(e.url,e.variables):e.url,s=getBasePath(t),n=(i?"/"===s?"":s:t)+r,o=Object.keys(e.variables||{}).length,l=`${1===Number(o)?"":o} ${1!==o?"variables":"variable"}`;return _jsxs("div",{children:[_jsx(PanelItemDescription,{children:e.description}),_jsxs(TitleWrap,{children:[_jsx(Title,{suppressHydrationWarning:!0,children:n}),_jsx(CopyButton,{data:n},n)]}),e.variables&&_jsx(ViewNested,{expandText:`Show ${l}`,hideText:`Hide ${l}`,propertyLength:Object.keys(e.variables).length,expandable:!0,isArray:!0,hideDivider:!0,children:_jsx(ServerVariablesContainer,{children:Object.entries(e.variables||{}).map((([e,r])=>_jsxs(ServerVariableContainer,{children:[_jsx(ServerVariableName,{children:e}),_jsxs(Variable,{children:["Default ",_jsx(StyledTag,{children:r.default})]}),_jsx(Variable,{children:r.description}),r.enum&&_jsxs(Variable,{children:["Enum",_jsx(TagWrapper,{children:r.enum.map((e=>_jsx(StyledTag,{children:e},e)))})]})]},e)))})})]},t)}))});const ItemsList=styled.div`
|
|
2
2
|
& > div {
|
|
3
3
|
border-bottom: 1px solid var(--border-color-secondary);
|
|
4
4
|
margin-bottom: var(--spacing-xs);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{useMemo}from"react";import{CopyButton,Dropdown}from"@redocly/theme";import{HttpVerb}from"../shared";import{PathWrapper,Path,ServerItemWrap}from"./styled";import{PanelItem}from"../PanelItem";export const ServerListDropdown=({operation:r,className:e})=>{const t=useMemo((()=>r.servers.filter((({description:r,url:e})=>r&&e)).map((({description:r,url:e})=>_jsx(ServerItemWrap,{children:_jsx(PanelItem,{header:r,title:e,actions:[_jsx(CopyButton,{data:e},e)]})},e)))),[r.servers]);return _jsx(Dropdown,{items:t,withArrow:!0,className:e,children:_jsxs(PathWrapper,{children:[_jsx(HttpVerb,{color:r.httpVerb,children:r.httpVerb}),_jsx(Path,{children:r.path})]})})};
|
|
2
2
|
//# sourceMappingURL=ServerListDropdown.js.map
|
|
@@ -4,13 +4,10 @@ import styled from"styled-components";export const PathWrapper=styled.div`
|
|
|
4
4
|
overflow-x: hidden;
|
|
5
5
|
`;export const Path=styled.span`
|
|
6
6
|
margin: 0 var(--spacing-unit) 0 calc(var(--spacing-unit) * 0.5);
|
|
7
|
-
color: var(--text-color-secondary);
|
|
8
7
|
overflow-x: hidden;
|
|
9
8
|
text-overflow: ellipsis;
|
|
10
9
|
white-space: nowrap;
|
|
11
|
-
overflow-wrap: normal;
|
|
12
10
|
display: inline-block;
|
|
13
|
-
word-break: break-all;
|
|
14
11
|
line-height: var(--line-height-base);
|
|
15
12
|
font-size: var(--font-size-base);
|
|
16
13
|
`;export const ServerItemWrap=styled.div`
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Actions: () => React.JSX.Element;
|
|
1
|
+
export declare const Actions: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";import{useAtom,useAtomValue}from"jotai";import{SidebarActions,LayoutVariant}from"@redocly/theme";import styled from"styled-components";import{collapsedSidebarAtom,layoutAtom}from"../../jotai/app";import{globalOptionsAtom}from"../../jotai/store";export const Actions=()=>{const{showChangeLayoutButton:o}=useAtomValue(globalOptionsAtom),[t,a]=useAtom(layoutAtom),[e,r]=useAtom(collapsedSidebarAtom);return _jsx(_Fragment,{children:_jsx(Wrapper,{children:_jsx(SidebarActions,{showChangeLayoutButton:o,layout:t,onChangeViewClick:()=>a(t===LayoutVariant.STACKED?LayoutVariant.THREE_PANEL:LayoutVariant.STACKED),collapsedSidebar:e,onChangeCollapseSidebarClick:()=>r(!e),isOpenapiDocs:!0})})})};const Wrapper=styled.div`
|
|
2
2
|
position: sticky;
|
|
3
3
|
top: calc(100vh);
|
|
4
4
|
padding: var(--spacing-sm) var(--spacing-md);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import type { ExtendedMenuItem } from './types';
|
|
3
3
|
interface MenuItemProps {
|
|
4
4
|
active?: boolean;
|
|
5
5
|
item: ExtendedMenuItem;
|
|
6
6
|
onClick?: () => void;
|
|
7
7
|
}
|
|
8
|
-
export declare const MenuItem:
|
|
8
|
+
export declare const MenuItem: import("react").NamedExoticComponent<PropsWithChildren<MenuItemProps>>;
|
|
9
9
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{memo,useCallback}from"react";import{Tag,ChevronDownIcon,ChevronRightIcon}from"@redocly/theme";import{MenuItemLi,MenuItemTitle}from"./styled";import{MenuItems}from"./MenuItems";import{MenuItemLink}from"./MenuItemLink";import{MenuOperationItemContent}from"./MenuOperationItemContent";import{encodeBackSlashes}from"../../utils";import{useMenuItemExpanded}from"./hooks";function MenuItemComponent({item:e,children:t,onClick:n}){var o;const[m,i]=useMenuItemExpanded(e),s=encodeBackSlashes(e.href),r=useCallback((()=>{s&&e.hasActiveSubItem||i(!m)}),[s,e.hasActiveSubItem,i,m]),a=(null===(o=e.items)||void 0===o?void 0:o.length)>0;return _jsxs(MenuItemLi,{depth:e.depth,"data-item-id":e.id,onClick:n,children:["operation"===e.type?_jsx(MenuOperationItemContent,{item:e,to:s,active:e.active,children:t}):_jsxs(MenuItemLink,{to:s,depth:e.depth,type:e.type,hasChildren:a,active:e.active,onClick:r,children:[e.depth>0&&a&&_jsx(m?ChevronDownIcon:ChevronRightIcon,{})||null,e.isSchema?_jsx(Tag,{color:"schema",children:"schema"}):null,_jsxs(MenuItemTitle,{title:e.name,children:[e.name,t]})]}),a&&_jsx(MenuItems,{expanded:m,items:e.items})]})}export const MenuItem=memo(MenuItemComponent);
|
|
2
2
|
//# sourceMappingURL=MenuItem.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import type { ExternalLink } from '../../services';
|
|
3
|
-
export declare const MenuExternalLink:
|
|
3
|
+
export declare const MenuExternalLink: import("react").NamedExoticComponent<PropsWithChildren<{
|
|
4
4
|
link: ExternalLink;
|
|
5
5
|
}>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{jsx as _jsx,Fragment as _Fragment}from"react/jsx-runtime";import{memo}from"react";import{StyledMenuItemLink,MenuItemLi,MenuItemLabel,MenuItemTitle}from"./styled";function isSeparator(e){return null!=e.separator||!!e.separatorLine&&!e.link}const MenuItemExternalLink=StyledMenuItemLink.withComponent("a");function MenuExternalLinkComponent({link:e}){return _jsx(_Fragment,{children:isSeparator(e)?e.separator?_jsx(MenuItemLabel,{depth:0,active:!1,children:e.separator}):null:_jsx(MenuItemLi,{depth:1,children:_jsx(MenuItemExternalLink,{href:e.link,target:e.target,depth:1,children:_jsx(MenuItemTitle,{title:e.label,children:e.label})})})})}export const MenuExternalLink=memo(MenuExternalLinkComponent);
|
|
2
2
|
//# sourceMappingURL=MenuItemEternalLink.js.map
|