@redocly/reference-docs 2.13.1 → 2.13.2
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/bin/cli/commands/redocly-docs-cli.min.js +28 -28
- package/bin/cli/commands/redocly-docs-cli.min.js.LICENSE.txt +1 -1
- package/dist/console.redocly-reference-docs.min.js +1 -1
- package/dist/oauth2-redirect.js +1 -1
- package/dist/redocly-reference-docs.min.js +495 -495
- package/lib/components/Endpoint/Endpoint.d.ts +2 -2
- package/lib/components/Endpoint/ServerList.d.ts +2 -2
- package/lib/components/Endpoint/Summary.d.ts +3 -3
- package/lib/components/NextSectionButton.d.ts +2 -2
- package/lib/components/Overlay.d.ts +1 -1
- package/lib/components/Panel/PanelComponent.d.ts +2 -1
- package/lib/components/ProProviders.d.ts +2 -2
- package/lib/components/RedoclyReferenceDocs.d.ts +3 -3
- package/lib/components/Samples/ExampleSwitch.d.ts +1 -1
- package/lib/components/Samples/SamplesTabs.d.ts +1 -1
- package/lib/components/Samples/use-example-key.d.ts +1 -1
- package/lib/components/Search/MenuItemProSearch.d.ts +2 -2
- package/lib/components/Search/MenuItemProSearch.js +1 -1
- package/lib/components/Search/ProSearchBox.d.ts +5 -5
- package/lib/components/Search/SearchField.d.ts +1 -1
- package/lib/components/StoreProvider.d.ts +3 -2
- package/lib/components/Tabs/CollapsingTabs/CollapsingTabs.d.ts +1 -1
- package/lib/components/Tabs/CollapsingTabs/CollapsingTabsBase.d.ts +2 -2
- package/lib/components/VersionSwitcher.d.ts +2 -2
- package/lib/components/common/CheckboxList.d.ts +3 -2
- package/lib/components/common/Dropdown/Dropdown.d.ts +1 -1
- package/lib/components/common/Dropdown/types.d.ts +1 -1
- package/lib/components/common/FileUpload/helper.d.ts +1 -1
- package/lib/components/common/TextField.d.ts +1 -1
- package/lib/components/console/ActionPanel.d.ts +2 -2
- package/lib/components/console/AuthPanel.d.ts +4 -4
- package/lib/components/console/CodemirrorInput.d.ts +1 -1
- package/lib/components/console/Console.d.ts +6 -6
- package/lib/components/console/OAuth2Flow.d.ts +4 -4
- package/lib/components/console/OAuth2TokenInput.d.ts +1 -1
- package/lib/components/console/OpenIDConnect.d.ts +3 -3
- package/lib/components/console/OperationParameters.d.ts +1 -1
- package/lib/components/console/RequestBody.d.ts +2 -2
- package/lib/components/console/RequestBodyForm.d.ts +1 -1
- package/lib/components/console/ResponseBody.d.ts +1 -1
- package/lib/components/console/ResponsePanel.d.ts +1 -1
- package/lib/components/console/ServerDropdown.d.ts +1 -1
- package/lib/components/console/utils.d.ts +1 -1
- package/lib/components/pluggable/RedocExample.d.ts +2 -2
- package/lib/components/pluggable/RedocRequestBody.d.ts +1 -1
- package/lib/components/pluggable/RedocResponse.d.ts +1 -1
- package/lib/components/pluggable/RedocSchema.d.ts +2 -2
- package/lib/components/pluggable/styled.components.d.ts +1 -1
- package/lib/components/styled.elements.d.ts +3 -2
- package/lib/models/code-sample-options.d.ts +1 -1
- package/lib/redoc-lib/src/common-elements/LinkToField.d.ts +2 -2
- package/lib/redoc-lib/src/common-elements/Tooltip.d.ts +1 -1
- package/lib/redoc-lib/src/common-elements/linkify.d.ts +3 -2
- package/lib/redoc-lib/src/common-elements/perfect-scrollbar.d.ts +3 -2
- package/lib/redoc-lib/src/components/ApiInfo/ApiInfo.d.ts +1 -1
- package/lib/redoc-lib/src/components/ApiLogo/ApiLogo.d.ts +1 -1
- package/lib/redoc-lib/src/components/ApiLogo/styled.elements.d.ts +1 -1
- package/lib/redoc-lib/src/components/CallbackSamples/CallbackReqSamples.d.ts +1 -1
- package/lib/redoc-lib/src/components/CallbackSamples/CallbackSamples.d.ts +2 -2
- package/lib/redoc-lib/src/components/Callbacks/CallbackDetails.d.ts +1 -1
- package/lib/redoc-lib/src/components/Callbacks/CallbackOperation.d.ts +1 -1
- package/lib/redoc-lib/src/components/Callbacks/CallbackSummary.d.ts +2 -2
- package/lib/redoc-lib/src/components/Callbacks/CallbacksList.d.ts +1 -1
- package/lib/redoc-lib/src/components/ContentItems/ContentItems.d.ts +3 -3
- package/lib/redoc-lib/src/components/DownloadButton/DownloadButton.d.ts +1 -1
- package/lib/redoc-lib/src/components/DropdownOrLabel/DropdownOrLabel.d.ts +1 -1
- package/lib/redoc-lib/src/components/ErrorBoundary.d.ts +2 -1
- package/lib/redoc-lib/src/components/ExternalDocumentation/ExternalDocumentation.d.ts +1 -1
- package/lib/redoc-lib/src/components/Fields/Field.d.ts +3 -3
- package/lib/redoc-lib/src/components/Fields/FieldDetails.d.ts +1 -1
- package/lib/redoc-lib/src/components/GenericChildrenSwitcher/GenericChildrenSwitcher.d.ts +1 -1
- package/lib/redoc-lib/src/components/Markdown/AdvancedMarkdown.d.ts +3 -3
- package/lib/redoc-lib/src/components/Markdown/SanitizedMdBlock.d.ts +1 -1
- package/lib/redoc-lib/src/components/Markdown/styled.elements.d.ts +1 -1
- package/lib/redoc-lib/src/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +2 -2
- package/lib/redoc-lib/src/components/Operation/Operation.d.ts +1 -1
- package/lib/redoc-lib/src/components/OptionsProvider.d.ts +1 -1
- package/lib/redoc-lib/src/components/Parameters/ParametersGroup.d.ts +1 -1
- package/lib/redoc-lib/src/components/PayloadSamples/Example.d.ts +1 -1
- package/lib/redoc-lib/src/components/PayloadSamples/MediaTypeSamples.d.ts +1 -1
- package/lib/redoc-lib/src/components/PayloadSamples/PayloadSamples.d.ts +1 -1
- package/lib/redoc-lib/src/components/PayloadSamples/exernalExampleHook.d.ts +1 -1
- package/lib/redoc-lib/src/components/RequestSamples/CodeSample.d.ts +2 -2
- package/lib/redoc-lib/src/components/RequestSamples/RequestSamples.d.ts +1 -1
- package/lib/redoc-lib/src/components/RequestSamples/languageSwitchEvent.d.ts +3 -2
- package/lib/redoc-lib/src/components/RequestSamples/useCodeSamples.d.ts +1 -1
- package/lib/redoc-lib/src/components/Responses/Response.d.ts +1 -1
- package/lib/redoc-lib/src/components/Responses/ResponseDetails.d.ts +1 -1
- package/lib/redoc-lib/src/components/Responses/ResponseHeaders.d.ts +1 -1
- package/lib/redoc-lib/src/components/Responses/ResponseSummary.d.ts +2 -2
- package/lib/redoc-lib/src/components/Responses/ResponsesList.d.ts +1 -1
- package/lib/redoc-lib/src/components/Schema/ArraySchema.d.ts +1 -1
- package/lib/redoc-lib/src/components/Schema/DiscriminatorDropdown.d.ts +2 -2
- package/lib/redoc-lib/src/components/Schema/ObjectSchema.d.ts +1 -1
- package/lib/redoc-lib/src/components/Schema/OneOfSchema.d.ts +1 -1
- package/lib/redoc-lib/src/components/Schema/Schema.d.ts +1 -1
- package/lib/redoc-lib/src/components/SchemaDefinition/SchemaDefinition.d.ts +2 -2
- package/lib/redoc-lib/src/components/SearchBox/SearchBox.d.ts +3 -3
- package/lib/redoc-lib/src/components/SecurityRequirement/SecurityRequirement.d.ts +1 -1
- package/lib/redoc-lib/src/components/SecuritySchemes/SecuritySchemes.d.ts +2 -2
- package/lib/redoc-lib/src/components/SideMenu/MenuItem.d.ts +3 -3
- package/lib/redoc-lib/src/components/SideMenu/MenuItem.js +1 -1
- package/lib/redoc-lib/src/components/SideMenu/SideMenu.d.ts +3 -3
- package/lib/redoc-lib/src/components/SourceCode/SourceCode.d.ts +2 -2
- package/lib/redoc-lib/src/components/StickySidebar/StickyResponsiveSidebar.d.ts +3 -2
- package/lib/redoc-lib/src/components/StoreBuilder.d.ts +1 -1
- package/lib/redoc-lib/src/components/helper.d.ts +1 -1
- package/lib/redoc-lib/src/services/MarkdownRenderer.d.ts +3 -3
- package/lib/redoc-lib/src/services/MenuBuilder.d.ts +3 -3
- package/lib/redoc-lib/src/services/OpenAPIParser.d.ts +1 -1
- package/lib/redoc-lib/src/services/RedocNormalizedOptions.d.ts +5 -5
- package/lib/redoc-lib/src/services/ScrollService.d.ts +1 -1
- package/lib/redoc-lib/src/services/SpecStore.d.ts +3 -3
- package/lib/redoc-lib/src/services/models/ApiInfo.d.ts +2 -2
- package/lib/redoc-lib/src/services/models/Callback.d.ts +3 -3
- package/lib/redoc-lib/src/services/models/Example.d.ts +2 -2
- package/lib/redoc-lib/src/services/models/Field.d.ts +5 -4
- package/lib/redoc-lib/src/services/models/Group.model.d.ts +4 -4
- package/lib/redoc-lib/src/services/models/MediaContent.d.ts +5 -5
- package/lib/redoc-lib/src/services/models/MediaType.d.ts +5 -5
- package/lib/redoc-lib/src/services/models/Operation.d.ts +8 -8
- package/lib/redoc-lib/src/services/models/RequestBody.d.ts +4 -4
- package/lib/redoc-lib/src/services/models/Response.d.ts +4 -4
- package/lib/redoc-lib/src/services/models/Schema.d.ts +5 -5
- package/lib/redoc-lib/src/services/models/SecurityRequirement.d.ts +2 -2
- package/lib/redoc-lib/src/services/models/SecuritySchemes.d.ts +2 -2
- package/lib/redoc-lib/src/services/models/Webhook.d.ts +3 -3
- package/lib/redoc-lib/src/styled-components.d.ts +2 -2
- package/lib/redoc-lib/src/types/open-api.d.ts +2 -2
- package/lib/redoc-lib/src/utils/helpers.d.ts +3 -3
- package/lib/redoc-lib/src/utils/helpers.js +1 -1
- package/lib/redoc-lib/src/utils/loadAndBundleSpec.d.ts +1 -1
- package/lib/redoc-lib/src/utils/media-css.d.ts +1 -1
- package/lib/redoc-lib/src/utils/openapi.d.ts +3 -3
- package/lib/services/ProMenu.d.ts +2 -2
- package/lib/services/ProStore.d.ts +13 -26
- package/lib/services/ProStore.js +1 -1
- package/lib/services/SearchStore.d.ts +3 -2
- package/lib/services/VersionedSpecStore.d.ts +3 -2
- package/lib/services/code-samples/generator.d.ts +3 -3
- package/lib/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/index.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/go/native.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/java/httpclient.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/node/fetch.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/php/curl.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/php/utils.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/python/requests.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/ruby/native.d.ts +2 -2
- package/lib/services/code-samples/httpsnippet/targets/shell/curl.d.ts +2 -2
- package/lib/services/extendTheme.d.ts +2 -2
- package/lib/services/history/FakeHistoryService.d.ts +2 -2
- package/lib/services/history/ProHashHistoryService.d.ts +2 -2
- package/lib/services/history/PushStateHistoryService.d.ts +3 -2
- package/lib/services/history/helpers.d.ts +1 -1
- package/lib/services/index.d.ts +1 -0
- package/lib/services/index.js +1 -1
- package/lib/services/types.d.ts +24 -0
- package/lib/services/types.js +2 -0
- package/lib/services/utils.js +1 -1
- package/lib/standalone.d.ts +3 -3
- package/lib/utils.js +1 -1
- package/lib-esm/components/Endpoint/Endpoint.d.ts +2 -2
- package/lib-esm/components/Endpoint/ServerList.d.ts +2 -2
- package/lib-esm/components/Endpoint/Summary.d.ts +3 -3
- package/lib-esm/components/NextSectionButton.d.ts +2 -2
- package/lib-esm/components/Overlay.d.ts +1 -1
- package/lib-esm/components/Panel/PanelComponent.d.ts +2 -1
- package/lib-esm/components/ProProviders.d.ts +2 -2
- package/lib-esm/components/RedoclyReferenceDocs.d.ts +3 -3
- package/lib-esm/components/Samples/ExampleSwitch.d.ts +1 -1
- package/lib-esm/components/Samples/SamplesTabs.d.ts +1 -1
- package/lib-esm/components/Samples/use-example-key.d.ts +1 -1
- package/lib-esm/components/Search/MenuItemProSearch.d.ts +2 -2
- package/lib-esm/components/Search/MenuItemProSearch.js +1 -1
- package/lib-esm/components/Search/ProSearchBox.d.ts +5 -5
- package/lib-esm/components/Search/SearchField.d.ts +1 -1
- package/lib-esm/components/StoreProvider.d.ts +3 -2
- package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabs.d.ts +1 -1
- package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabsBase.d.ts +2 -2
- package/lib-esm/components/VersionSwitcher.d.ts +2 -2
- package/lib-esm/components/common/CheckboxList.d.ts +3 -2
- package/lib-esm/components/common/Dropdown/Dropdown.d.ts +1 -1
- package/lib-esm/components/common/Dropdown/types.d.ts +1 -1
- package/lib-esm/components/common/FileUpload/helper.d.ts +1 -1
- package/lib-esm/components/common/TextField.d.ts +1 -1
- package/lib-esm/components/console/ActionPanel.d.ts +2 -2
- package/lib-esm/components/console/AuthPanel.d.ts +4 -4
- package/lib-esm/components/console/CodemirrorInput.d.ts +1 -1
- package/lib-esm/components/console/Console.d.ts +6 -6
- package/lib-esm/components/console/OAuth2Flow.d.ts +4 -4
- package/lib-esm/components/console/OAuth2TokenInput.d.ts +1 -1
- package/lib-esm/components/console/OpenIDConnect.d.ts +3 -3
- package/lib-esm/components/console/OperationParameters.d.ts +1 -1
- package/lib-esm/components/console/RequestBody.d.ts +2 -2
- package/lib-esm/components/console/RequestBodyForm.d.ts +1 -1
- package/lib-esm/components/console/ResponseBody.d.ts +1 -1
- package/lib-esm/components/console/ResponsePanel.d.ts +1 -1
- package/lib-esm/components/console/ServerDropdown.d.ts +1 -1
- package/lib-esm/components/console/utils.d.ts +1 -1
- package/lib-esm/components/pluggable/RedocExample.d.ts +2 -2
- package/lib-esm/components/pluggable/RedocRequestBody.d.ts +1 -1
- package/lib-esm/components/pluggable/RedocResponse.d.ts +1 -1
- package/lib-esm/components/pluggable/RedocSchema.d.ts +2 -2
- package/lib-esm/components/pluggable/styled.components.d.ts +1 -1
- package/lib-esm/components/styled.elements.d.ts +3 -2
- package/lib-esm/models/code-sample-options.d.ts +1 -1
- package/lib-esm/redoc-lib/src/common-elements/LinkToField.d.ts +2 -2
- package/lib-esm/redoc-lib/src/common-elements/Tooltip.d.ts +1 -1
- package/lib-esm/redoc-lib/src/common-elements/linkify.d.ts +3 -2
- package/lib-esm/redoc-lib/src/common-elements/perfect-scrollbar.d.ts +3 -2
- package/lib-esm/redoc-lib/src/components/ApiInfo/ApiInfo.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/ApiLogo/ApiLogo.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/ApiLogo/styled.elements.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/CallbackSamples/CallbackReqSamples.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/CallbackSamples/CallbackSamples.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/Callbacks/CallbackDetails.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Callbacks/CallbackOperation.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Callbacks/CallbackSummary.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/Callbacks/CallbacksList.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/ContentItems/ContentItems.d.ts +3 -3
- package/lib-esm/redoc-lib/src/components/DownloadButton/DownloadButton.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/DropdownOrLabel/DropdownOrLabel.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/ErrorBoundary.d.ts +2 -1
- package/lib-esm/redoc-lib/src/components/ExternalDocumentation/ExternalDocumentation.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Fields/Field.d.ts +3 -3
- package/lib-esm/redoc-lib/src/components/Fields/FieldDetails.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/GenericChildrenSwitcher/GenericChildrenSwitcher.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Markdown/AdvancedMarkdown.d.ts +3 -3
- package/lib-esm/redoc-lib/src/components/Markdown/SanitizedMdBlock.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Markdown/styled.elements.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/Operation/Operation.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/OptionsProvider.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Parameters/ParametersGroup.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/PayloadSamples/Example.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/PayloadSamples/MediaTypeSamples.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/PayloadSamples/PayloadSamples.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/PayloadSamples/exernalExampleHook.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/RequestSamples/CodeSample.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/RequestSamples/RequestSamples.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/RequestSamples/languageSwitchEvent.d.ts +3 -2
- package/lib-esm/redoc-lib/src/components/RequestSamples/useCodeSamples.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Responses/Response.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Responses/ResponseDetails.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Responses/ResponseHeaders.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Responses/ResponseSummary.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/Responses/ResponsesList.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Schema/ArraySchema.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Schema/DiscriminatorDropdown.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/Schema/ObjectSchema.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Schema/OneOfSchema.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/Schema/Schema.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/SchemaDefinition/SchemaDefinition.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/SearchBox/SearchBox.d.ts +3 -3
- package/lib-esm/redoc-lib/src/components/SecurityRequirement/SecurityRequirement.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/SecuritySchemes/SecuritySchemes.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/SideMenu/MenuItem.d.ts +3 -3
- package/lib-esm/redoc-lib/src/components/SideMenu/MenuItem.js +1 -1
- package/lib-esm/redoc-lib/src/components/SideMenu/SideMenu.d.ts +3 -3
- package/lib-esm/redoc-lib/src/components/SourceCode/SourceCode.d.ts +2 -2
- package/lib-esm/redoc-lib/src/components/StickySidebar/StickyResponsiveSidebar.d.ts +3 -2
- package/lib-esm/redoc-lib/src/components/StoreBuilder.d.ts +1 -1
- package/lib-esm/redoc-lib/src/components/helper.d.ts +1 -1
- package/lib-esm/redoc-lib/src/services/MarkdownRenderer.d.ts +3 -3
- package/lib-esm/redoc-lib/src/services/MenuBuilder.d.ts +3 -3
- package/lib-esm/redoc-lib/src/services/OpenAPIParser.d.ts +1 -1
- package/lib-esm/redoc-lib/src/services/RedocNormalizedOptions.d.ts +5 -5
- package/lib-esm/redoc-lib/src/services/ScrollService.d.ts +1 -1
- package/lib-esm/redoc-lib/src/services/SpecStore.d.ts +3 -3
- package/lib-esm/redoc-lib/src/services/models/ApiInfo.d.ts +2 -2
- package/lib-esm/redoc-lib/src/services/models/Callback.d.ts +3 -3
- package/lib-esm/redoc-lib/src/services/models/Example.d.ts +2 -2
- package/lib-esm/redoc-lib/src/services/models/Field.d.ts +5 -4
- package/lib-esm/redoc-lib/src/services/models/Group.model.d.ts +4 -4
- package/lib-esm/redoc-lib/src/services/models/MediaContent.d.ts +5 -5
- package/lib-esm/redoc-lib/src/services/models/MediaType.d.ts +5 -5
- package/lib-esm/redoc-lib/src/services/models/Operation.d.ts +8 -8
- package/lib-esm/redoc-lib/src/services/models/RequestBody.d.ts +4 -4
- package/lib-esm/redoc-lib/src/services/models/Response.d.ts +4 -4
- package/lib-esm/redoc-lib/src/services/models/Schema.d.ts +5 -5
- package/lib-esm/redoc-lib/src/services/models/SecurityRequirement.d.ts +2 -2
- package/lib-esm/redoc-lib/src/services/models/SecuritySchemes.d.ts +2 -2
- package/lib-esm/redoc-lib/src/services/models/Webhook.d.ts +3 -3
- package/lib-esm/redoc-lib/src/styled-components.d.ts +2 -2
- package/lib-esm/redoc-lib/src/types/open-api.d.ts +2 -2
- package/lib-esm/redoc-lib/src/utils/helpers.d.ts +3 -3
- package/lib-esm/redoc-lib/src/utils/helpers.js +1 -1
- package/lib-esm/redoc-lib/src/utils/loadAndBundleSpec.d.ts +1 -1
- package/lib-esm/redoc-lib/src/utils/media-css.d.ts +1 -1
- package/lib-esm/redoc-lib/src/utils/openapi.d.ts +3 -3
- package/lib-esm/services/ProMenu.d.ts +2 -2
- package/lib-esm/services/ProStore.d.ts +13 -26
- package/lib-esm/services/ProStore.js +1 -1
- package/lib-esm/services/SearchStore.d.ts +3 -2
- package/lib-esm/services/VersionedSpecStore.d.ts +3 -2
- package/lib-esm/services/code-samples/generator.d.ts +3 -3
- package/lib-esm/services/code-samples/httpsnippet/helpers/code-helpers.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/index.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/csharp/httpclient.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/go/native.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/java/httpclient.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/java8/apachehttp.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/javascript/fetch.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/node/fetch.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/php/curl.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/php/utils.d.ts +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/python/requests.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/ruby/native.d.ts +2 -2
- package/lib-esm/services/code-samples/httpsnippet/targets/shell/curl.d.ts +2 -2
- package/lib-esm/services/extendTheme.d.ts +2 -2
- package/lib-esm/services/history/FakeHistoryService.d.ts +2 -2
- package/lib-esm/services/history/ProHashHistoryService.d.ts +2 -2
- package/lib-esm/services/history/PushStateHistoryService.d.ts +3 -2
- package/lib-esm/services/history/helpers.d.ts +1 -1
- package/lib-esm/services/index.d.ts +1 -0
- package/lib-esm/services/index.js +1 -1
- package/lib-esm/services/types.d.ts +24 -0
- package/lib-esm/services/types.js +2 -0
- package/lib-esm/services/utils.js +1 -1
- package/lib-esm/standalone.d.ts +3 -3
- package/lib-esm/utils.js +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { OpenAPIExternalDocumentation, OpenAPISchema, Referenced } from '../../types';
|
|
2
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
3
|
-
import { RedocProNormalizedOptions } from '../../../../services';
|
|
1
|
+
import type { OpenAPIExternalDocumentation, OpenAPISchema, Referenced } from '../../types';
|
|
2
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
3
|
+
import type { RedocProNormalizedOptions } from '../../../../services';
|
|
4
4
|
import { FieldModel } from './Field';
|
|
5
|
-
import { MergedOpenAPISchema, ResponseModel } from '../';
|
|
6
|
-
import { OperationModel } from './Operation';
|
|
5
|
+
import type { MergedOpenAPISchema, ResponseModel } from '../';
|
|
6
|
+
import type { OperationModel } from './Operation';
|
|
7
7
|
export declare type Deps = {
|
|
8
8
|
parentFieldFullPath?: string;
|
|
9
9
|
operation?: OperationModel;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OpenAPISecurityRequirement, OpenAPISecurityScheme } from '../../types';
|
|
2
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
1
|
+
import type { OpenAPISecurityRequirement, OpenAPISecurityScheme } from '../../types';
|
|
2
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
3
3
|
export interface SecurityScheme extends OpenAPISecurityScheme {
|
|
4
4
|
id: string;
|
|
5
5
|
sectionId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OpenAPISecurityScheme, Referenced } from '../../types';
|
|
2
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
1
|
+
import type { OpenAPISecurityScheme, Referenced } from '../../types';
|
|
2
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
3
3
|
export declare class SecuritySchemeModel {
|
|
4
4
|
id: string;
|
|
5
5
|
sectionId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { OpenAPIPath, Referenced } from '../../types';
|
|
2
|
-
import { OpenAPIParser } from '../OpenAPIParser';
|
|
1
|
+
import type { OpenAPIPath, Referenced } from '../../types';
|
|
2
|
+
import type { OpenAPIParser } from '../OpenAPIParser';
|
|
3
3
|
import { OperationModel } from './Operation';
|
|
4
|
-
import { RedocProNormalizedOptions } from '../../../../services';
|
|
4
|
+
import type { RedocProNormalizedOptions } from '../../../../services';
|
|
5
5
|
export declare class WebhookModel {
|
|
6
6
|
operations: OperationModel[];
|
|
7
7
|
constructor(parser: OpenAPIParser, options: RedocProNormalizedOptions, infoOrRef?: Referenced<OpenAPIPath>);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as styledComponents from 'styled-components';
|
|
2
|
-
import { ResolvedThemeInterface, MediaValue } from './theme';
|
|
3
|
-
import { ProTheme } from '../../services/extendTheme';
|
|
2
|
+
import type { ResolvedThemeInterface, MediaValue } from './theme';
|
|
3
|
+
import type { ProTheme } from '../../services/extendTheme';
|
|
4
4
|
export type { ResolvedThemeInterface, MediaValue };
|
|
5
5
|
declare const styled: styledComponents.ThemedStyledInterface<ProTheme>, css: styledComponents.ThemedCssFunction<ProTheme>, createGlobalStyle: <P extends object = {}>(first: TemplateStringsArray | styledComponents.CSSObject | styledComponents.InterpolationFunction<styledComponents.ThemedStyledProps<P, ProTheme>>, ...interpolations: styledComponents.Interpolation<styledComponents.ThemedStyledProps<P, ProTheme>>[]) => styledComponents.GlobalStyleComponent<P, ProTheme>, keyframes: (strings: TemplateStringsArray | styledComponents.CSSKeyframes, ...interpolations: styledComponents.SimpleInterpolation[]) => styledComponents.Keyframes, ThemeProvider: styledComponents.ThemeProviderComponent<ProTheme, ProTheme>;
|
|
6
6
|
export { css, createGlobalStyle, keyframes, ThemeProvider };
|
|
@@ -20,9 +20,9 @@ export declare function flattenByProp<T extends GenericObject, P extends keyof T
|
|
|
20
20
|
export declare function stripTrailingSlash(path: string): string;
|
|
21
21
|
export declare function isNumeric(value: unknown): value is number;
|
|
22
22
|
export declare function appendToMdHeading(md: string, heading: string, content: string): string;
|
|
23
|
-
export declare const mergeObjects: (target: GenericObject, ...sources: GenericObject[]) =>
|
|
24
|
-
export declare const isObject: (item:
|
|
25
|
-
export declare const
|
|
23
|
+
export declare const mergeObjects: (target: GenericObject, ...sources: GenericObject[]) => GenericObject;
|
|
24
|
+
export declare const isObject: (item: unknown) => item is "object";
|
|
25
|
+
export declare const isMergeableObject: (item: unknown) => boolean;
|
|
26
26
|
/**
|
|
27
27
|
* slugify() returns empty string when failed to slugify.
|
|
28
28
|
* so try to return minimum slugified-string with failed one which keeps original value
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign,__spreadArray}from"tslib";import slugify from"slugify";import{format,parse}from"url";import{ZERO_BREAKPOINT}from"./media-css";import{isNamedDefinition}from"./openapi";import JsonPointer from"./JsonPointer";export function mapWithLast(e,r){for(var t=[],n=0;n<e.length-1;n++)t.push(r(e[n],!1));return 0!==e.length&&t.push(r(e[e.length-1],!0)),t}export function mapValues(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=r(e[n],n,e));return t}export function flattenByProp(e,r){var t=[],n=function(e){for(var i=0,
|
|
1
|
+
import{__assign,__spreadArray}from"tslib";import slugify from"slugify";import{format,parse}from"url";import{ZERO_BREAKPOINT}from"./media-css";import{isNamedDefinition}from"./openapi";import JsonPointer from"./JsonPointer";export function mapWithLast(e,r){for(var t=[],n=0;n<e.length-1;n++)t.push(r(e[n],!1));return 0!==e.length&&t.push(r(e[e.length-1],!0)),t}export function mapValues(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=r(e[n],n,e));return t}export function flattenByProp(e,r){var t=[],n=function(e){for(var i=0,a=e;i<a.length;i++){var o=a[i];t.push(o),o[r]&&n(o[r])}};return n(e),t}export function stripTrailingSlash(e){return e.endsWith("/")?e.substring(0,e.length-1):e}export function isNumeric(e){return!isNaN(parseFloat(e))&&isFinite(e)}export function appendToMdHeading(e,r,t){var n=new RegExp("(^|\\n)#\\s?"+r+"\\s*\\n","i"),i=new RegExp("((\\n|^)#\\s*"+r+"\\s*(\\n|$)(?:.|\\n)*?)(\\n#|$)","i");if(n.test(e))return e.replace(i,"$1\n\n"+t+"\n$4");var a=""===e||e.endsWith("\n\n")?"":e.endsWith("\n")?"\n":"\n\n";return""+e+a+"# "+r+"\n\n"+t}export var mergeObjects=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];if(!r.length)return e;var n=r.shift();return void 0===n?e:(isMergeableObject(e)&&isMergeableObject(n)&&Object.keys(n).forEach((function(r){var t;isMergeableObject(n[r])?(e[r]||(e[r]={}),["string","number"].includes(typeof e[r])&&(n[r][ZERO_BREAKPOINT]||0===n[r][ZERO_BREAKPOINT]||console.warn('Theme resolver: using default value of "'+e[r]+'" for "'+r+'". This is not recommended. Prefer adding default value by providing "'+ZERO_BREAKPOINT+'" property to '+JSON.stringify(n[r])+"."),e[r]=((t={})[ZERO_BREAKPOINT]=e[r],t)),mergeObjects(e[r],n[r])):e[r]=n[r]})),mergeObjects.apply(void 0,__spreadArray([e],r,!1)))};export var isObject=function(e){return null!==e&&"object"==typeof e};export var isMergeableObject=function(e){return isObject(e)&&!Array.isArray(e)};export function safeSlugify(e){return slugify(e)||e.toString().toLowerCase().replace(/\s+/g,"-").replace(/&/g,"-and-").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")}export function isAbsoluteUrl(e){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(e)}export function resolveUrl(e,r){var t;if(r.startsWith("//"))t=""+(parse(e).protocol||"https:")+r;else if(isAbsoluteUrl(r))t=r;else if(r.startsWith("/")){var n=parse(e);t=format(__assign(__assign({},n),{pathname:r}))}else t=stripTrailingSlash(e)+"/"+r;return stripTrailingSlash(t)}export function getBasePath(e){try{return parseURL(e).pathname}catch(r){return e}}export function titleize(e){return e.charAt(0).toUpperCase()+e.slice(1)}export function removeQueryString(e){try{var r=parseURL(e);return r.search="",r.toString()}catch(r){return e}}function parseURL(e){return"undefined"==typeof URL?new(require("url").URL)(e):new URL(e)}export function unescapeHTMLChars(e){return e.replace(/&#(\d+);/g,(function(e,r){return String.fromCharCode(parseInt(r,10))})).replace(/&/g,"&")}export function sanitizeItemId(e){return e&&e.replace(/#/g,"_")}export function getSchemaTitle(e,r){return r||isNamedDefinition(e)&&JsonPointer.baseName(e)||""}
|
|
2
2
|
//# sourceMappingURL=helpers.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Document } from '@redocly/openapi-core';
|
|
1
|
+
import type { Document } from '@redocly/openapi-core';
|
|
2
2
|
import type { OpenAPIDefinition } from '../types';
|
|
3
3
|
export declare function loadAndBundleDefinition(specUrlOrObject: GenericObject | string): Promise<OpenAPIDefinition>;
|
|
4
4
|
export declare function createParsedDocument(specUrlOrObject: GenericObject | string): Document;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FieldModel } from '../services/models';
|
|
2
|
-
import { OpenAPIParser } from '../services/OpenAPIParser';
|
|
3
|
-
import { OpenAPIEncoding, OpenAPIMediaType, OpenAPIOperation, OpenAPIParameter, OpenAPIParameterStyle, OpenAPISchema, OpenAPIServer, Referenced, OpenAPIResponse, OpenAPIRequestBody } from '../types';
|
|
1
|
+
import type { FieldModel } from '../services/models';
|
|
2
|
+
import type { OpenAPIParser } from '../services/OpenAPIParser';
|
|
3
|
+
import type { OpenAPIEncoding, OpenAPIMediaType, OpenAPIOperation, OpenAPIParameter, OpenAPIParameterStyle, OpenAPISchema, OpenAPIServer, Referenced, OpenAPIResponse, OpenAPIRequestBody } from '../types';
|
|
4
4
|
export declare function isStatusCode(statusCode: string): boolean;
|
|
5
5
|
export declare function getStatusCodeType(statusCode: string | number, defaultAsError?: boolean): string;
|
|
6
6
|
export declare function isOperationName(key: string): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IMenuItem, ScrollService, HistoryService, MenuItemType, SchemaModel, SpecStore } from '../redoc-lib';
|
|
2
|
-
import { RedocProNormalizedOptions } from './ProStore';
|
|
1
|
+
import type { IMenuItem, ScrollService, HistoryService, MenuItemType, SchemaModel, SpecStore } from '../redoc-lib';
|
|
2
|
+
import type { RedocProNormalizedOptions } from './ProStore';
|
|
3
3
|
import { VersionedSpecStore } from './VersionedSpecStore';
|
|
4
4
|
export declare type ExtendedMenuItem = Omit<IMenuItem, 'type'> & {
|
|
5
5
|
type: MenuItemType | 'spec';
|
|
@@ -1,29 +1,16 @@
|
|
|
1
|
-
import { IValueDidChange } from 'mobx';
|
|
2
|
-
import { ContentItemModel, IMenuItem,
|
|
1
|
+
import type { IValueDidChange } from 'mobx';
|
|
2
|
+
import type { ContentItemModel, IMenuItem, OpenAPIDefinition, OpenAPIExternalDocumentation, OperationModel, RedocRawOptions, SearchStore } from '../redoc-lib';
|
|
3
|
+
import { MarkerService, RedocNormalizedOptions, SpecStore } from '../redoc-lib';
|
|
3
4
|
import { ProMenu } from './ProMenu';
|
|
4
|
-
import { SearchResultMeta } from './SearchStore';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { LicenseInfo } from './check';
|
|
8
|
-
import { CodeSamplesConfig, Languages } from './code-samples/';
|
|
9
|
-
import { Events
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
export declare type RedocProTheme = RedocRawOptions['theme'] & ThemeExtension;
|
|
14
|
-
export declare type MarkdownItemsPagination = 'none' | 'section';
|
|
15
|
-
export declare type Pagination = 'none' | 'section' | 'item';
|
|
16
|
-
export declare type ExternalLink = ExternalLinkLink | ExternalLinkSeparator;
|
|
17
|
-
export declare type ExternalLinkLink = {
|
|
18
|
-
label: string;
|
|
19
|
-
link: string;
|
|
20
|
-
target?: string;
|
|
21
|
-
separatorLine?: boolean;
|
|
22
|
-
};
|
|
23
|
-
export declare type ExternalLinkSeparator = {
|
|
24
|
-
separator?: string;
|
|
25
|
-
separatorLine?: boolean;
|
|
26
|
-
};
|
|
5
|
+
import type { SearchResultMeta } from './SearchStore';
|
|
6
|
+
import type { SpecVersions } from './VersionedSpecStore';
|
|
7
|
+
import { VersionedSpecStore } from './VersionedSpecStore';
|
|
8
|
+
import type { LicenseInfo } from './check';
|
|
9
|
+
import type { CodeSamplesConfig, Languages } from './code-samples/';
|
|
10
|
+
import type { Events } from './store-types';
|
|
11
|
+
import { LayoutVariant } from './store-types';
|
|
12
|
+
import type { ExternalLink, MarkdownItemsPagination, Normalized, Pagination, RedocProTheme } from './types';
|
|
13
|
+
import { SideNavStyle } from './types';
|
|
27
14
|
export declare type RedocProUserOptionsExt = {
|
|
28
15
|
licenseKey?: string;
|
|
29
16
|
searchMode?: 'default' | 'path-only';
|
|
@@ -31,7 +18,7 @@ export declare type RedocProUserOptionsExt = {
|
|
|
31
18
|
searchTagTitleBoost?: number | string;
|
|
32
19
|
searchFieldLevelBoost?: number | string;
|
|
33
20
|
searchAutoExpand?: boolean;
|
|
34
|
-
sideNavStyle?:
|
|
21
|
+
sideNavStyle?: SideNavStyle;
|
|
35
22
|
showConsole?: boolean;
|
|
36
23
|
hideLogo?: boolean;
|
|
37
24
|
whiteLabel?: boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var _a;import{__assign,__awaiter,__decorate,__generator}from"tslib";import{action,makeObservable,observable,observe}from"mobx";import{bundle,Config}from"@redocly/openapi-core";import{bind,debounce}from"decko";import{IS_BROWSER,MarkerService,RedocNormalizedOptions,ScrollService,SecurityDefs,SpecStore,SECURITY_DEFINITIONS_COMPONENT_NAME,SECURITY_DEFINITIONS_JSX_NAME,SCHEMA_DEFINITION_JSX_NAME,SchemaDefinition,createParsedDocument}from"../redoc-lib";import{FakeHistoryService,ProHashHistoryService,PushStateHistoryService}from"./history";import{ProMenu}from"./ProMenu";import{DeepSearchStore,RemoteSearch,DEFAULT_SEARCH_MAX_DEPTH}from"./SearchStore";import{extendTheme}from"./extendTheme";import{RedocResponse,PullRight}from"../components/pluggable";import{VersionedSpecStore}from"./VersionedSpecStore";import parseToken from"./check";import{normalizePath}from"./utils";import{fromSessionStorage,toSessionStorage,toLocalStorage,fromLocalStorage,setGlobalStore}from"../utils";import{LayoutVariant}from"./store-types";var global="undefined"==typeof window?{__REDOCLY_SEARCH_URL:void 0}:window,NestingGroup=function(){function e(e,t,i,o){var n=this;Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"absoluteIdx",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"description",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"linkable",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"items",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"externalDocs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"active",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"expanded",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"depth",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"level",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),makeObservable(this),this.id="section/"+e,this.type="nesting-group",this.name=i||"",this.level=1,this.depth=1,this.description="",this.parent=void 0,this.expanded=!1,this.items=t,this.linkable=!!o,t.forEach((function(e){return e.parent=n})),increaseDepthDeep(t)}return Object.defineProperty(e.prototype,"activate",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.active=!0}}),Object.defineProperty(e.prototype,"expand",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.expanded=!0,this.parent&&this.parent.expand()}}),Object.defineProperty(e.prototype,"collapse",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.expanded=!1}}),Object.defineProperty(e.prototype,"deactivate",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.active=!1}}),__decorate([observable],e.prototype,"active",void 0),__decorate([observable],e.prototype,"expanded",void 0),__decorate([action],e.prototype,"activate",null),__decorate([action],e.prototype,"expand",null),__decorate([action],e.prototype,"collapse",null),__decorate([action],e.prototype,"deactivate",null),e}();export{NestingGroup};function increaseDepthDeep(e){Array.isArray(e)&&e.forEach((function(e){e.depth++,e.parent&&"group"===e.parent.type&&(e.depth=e.parent.depth),increaseDepthDeep(e.items)}))}var ProStore=function(){function e(e,t,i,o){var n=this;void 0===i&&(i={}),void 0===o&&(o=!0),Object.defineProperty(this,"rawOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"menu",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"definition",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"marker",{enumerable:!0,configurable:!0,writable:!0,value:new MarkerService}),Object.defineProperty(this,"scroll",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"disposer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"search",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tryItOperation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showRightPanel",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"layout",{enumerable:!0,configurable:!0,writable:!0,value:LayoutVariant.THREE_PANEL}),Object.defineProperty(this,"activeSampleLanguage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isLoading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"l",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),makeObservable(this),this.initProOptions(i),IS_BROWSER&&(this.l=parseToken(i.licenseKey),this.l.then((function(e){e.valid&&e.allowed&&!e.expired||e.local||(n.menu.items=[],n.menu.flatItems=n.menu.flatItems.slice(0,1),n.menu.renderItems=[])})));var r="object"==typeof e&&"versions"in e,a=this.options.disableSidebar?new FakeHistoryService(this.options):"browser"===this.options.routingStrategy?new PushStateHistoryService(this.options,r):new ProHashHistoryService(this.options,r);this.definition=r?new VersionedSpecStore(e,this.options,a.currentId.split("/")[0]):new SpecStore(e,t,this.options),i.downloadDefinitionUrl&&(this.definition.info.downloadFileName=""),this.scroll=new ScrollService(this.options),this.options.disableSidebar||ProMenu.updateOnHistory(a.currentId,this.scroll),this.menu=new ProMenu(this.definition,this.scroll,this.options,a),this.menu.initOnHistory(),this.options.disableSearch||this.initSearch(this.options,o),this.disposer=observe(this.menu,"none"===this.options.pagination?"activeItemIdx":"activeRenderItemIdx",(function(e){setTimeout((function(){return n.updateMarkOnMenu(e.newValue)}))})),setGlobalStore(this)}return Object.defineProperty(e.prototype,"initProOptions",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,i,o,n,r;e=deepClone(e),this.rawOptions=extendTheme(e),this.options=new RedocNormalizedOptions(this.rawOptions,DEFAULT_OPTIONS),this.options.showConsole=null===(t=this.rawOptions.showConsole)||void 0===t||t,this.options.hideRightPanel=null!==(i=this.rawOptions.hideRightPanel)&&void 0!==i&&i,this.showRightPanel=!this.options.hideRightPanel,this.options.showRightPanelToggle=null===(o=this.rawOptions.showRightPanelToggle)||void 0===o||o,this.options.showChangeLayoutButton=null===(n=this.rawOptions.showChangeLayoutButton)||void 0===n||n,this.options.layout=this.rawOptions.layout||LayoutVariant.THREE_PANEL,this.options.defaultSampleLanguage=this.rawOptions.defaultSampleLanguage||"",this.options.deepLinkSeparator=this.rawOptions.deepLinkSeparator||"/",this.options.deepLinkPrefix=this.rawOptions.deepLinkPrefix||"!",this.options.disableDeepLinks=this.rawOptions.disableDeepLinks||!1,this.options.sideNavStyle=this.rawOptions.sideNavStyle||"summary-only",this.options.whiteLabel=!!this.rawOptions.whiteLabel,this.options.hideLogo=!!this.rawOptions.hideLogo,this.options.hideInfoSection=!!this.rawOptions.hideInfoSection,this.options.oAuth2RedirectURI=this.rawOptions.oAuth2RedirectURI||null,this.options.oAuth2RedirectURI=this.rawOptions.oAuth2RedirectURI||null,this.options.events=this.rawOptions.events||{},this.options.corsProxyUrl=this.rawOptions.corsProxyUrl?addTrailingSlash(this.rawOptions.corsProxyUrl):null,this.options.authCorsProxyUrl=this.rawOptions.authCorsProxyUrl?addTrailingSlash(this.rawOptions.authCorsProxyUrl):null,this.options.theme.scrollYOffset=this.options.scrollYOffset,this.options.linkForId=this.rawOptions.linkForId||null,this.options.generateDeepLink=this.rawOptions.generateDeepLink||null,this.options.onDeepLinkClick=this.rawOptions.onDeepLinkClick||null,this.options.requestInterceptor=this.rawOptions.requestInterceptor||null,this.options.sidebarLinks=this.rawOptions.sidebarLinks||{};var a="object"==typeof this.rawOptions.layout?this.rawOptions.layout:null;if(this.options.pagination=this.rawOptions.pagination||"none",this.options.routingStrategy="none"===this.options.pagination?"hash":"browser",!(null===(r=this.rawOptions)||void 0===r?void 0:r.pagination)&&(null==a?void 0:a.scope))switch(console.warn('"layout.scope" and "routingStrategy" settings are deprecated. Please, use "pagination" instead.'),null==a?void 0:a.scope){case"all":default:this.options.pagination="none",this.options.routingStrategy="hash";break;case"section":this.options.pagination="section",this.options.routingStrategy="browser";break;case"item":this.options.pagination="item",this.options.routingStrategy="browser"}this.options.markdownItemsPagination="none",!1!==this.rawOptions.showNextButton&&(this.options.showNextButton=!0),this.options.disableSidebar=!!e.disableSidebar,this.options.disableSidebar&&(this.options.theme.sidebar.width="0px"),this.options.skipBundleAndConvert=!!e.skipBundleAndConvert,this.options.routingBasePath=e.routingBasePath&&normalizePath(e.routingBasePath)||"",this.options.searchAutoExpand=!1!==e.searchAutoExpand,this.options.searchMode=e.searchMode||"default",this.options.ctrlFHijack=void 0===e.ctrlFHijack||e.ctrlFHijack,this.options.disablePaginationLoadingAnimation=!!e.disablePaginationLoadingAnimation||"none"===this.options.pagination,this.options.showConsole,this.options.generateCodeSamples=e.generateCodeSamples||{languages:[]},this.options.searchMaxDepth=this.rawOptions.searchMaxDepth||DEFAULT_SEARCH_MAX_DEPTH}}),Object.defineProperty(e.prototype,"initSearch",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var i=this;global.__REDOCLY_SEARCH_URL?this.search=new RemoteSearch(global.__REDOCLY_SEARCH_URL):this.search=new DeepSearchStore(e),t&&setTimeout((function(){var e;return null===(e=i.search)||void 0===e?void 0:e.indexItems(i.menu.items)}),50),this.definition instanceof VersionedSpecStore&&observe(this.definition,"activeVersionIdx",(function(t){var o,n,r=i.definition;null===(o=i.search)||void 0===o||o.dispose(),i.search=new DeepSearchStore(e);var a=r.versions[t.newValue]._searchIndexName;if(IS_BROWSER&&a){var s=r.versions[t.newValue]._searchIndexName,l=new URL(window.location.href);l.pathname=joinURLs(i.options.routingBasePath,s),null===(n=i.search)||void 0===n||n.fromExternalJS(l.toString(),__redoc_state.searchIndexExport),i.observeAllAndRemark()}else setTimeout((function(){var e;null===(e=i.search)||void 0===e||e.indexItems(i.menu.items)}),0)})),IS_BROWSER&&this.observeAllAndRemark()}}),Object.defineProperty(e.prototype,"onDidMount",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.menu.updateOnHistory(),this.updateMarkOnMenu(this.menu.activeItemIdx),this.layout=fromLocalStorage("layoutVariant")||this.options.layout||this.layout,this.activeSampleLanguage=fromLocalStorage("activeSampleLanguage")||this.options.defaultSampleLanguage,this.options.showRightPanelToggle){var e=fromSessionStorage("showRightPanelToggleState");e&&(this.showRightPanel="true"===e)}}}),Object.defineProperty(e.prototype,"toggleRightPanel",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.showRightPanel=null!=e?e:!this.showRightPanel,toSessionStorage("showRightPanelToggleState",JSON.stringify(this.showRightPanel))}}),Object.defineProperty(e.prototype,"toggleLayout",{enumerable:!1,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=LayoutVariant.THREE_PANEL),this.layout=e,toLocalStorage("layoutVariant",e)}}),Object.defineProperty(e.prototype,"disableConsole",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.options.showConsole=!1}}),Object.defineProperty(e.prototype,"enableConsole",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.options.showConsole=!0}}),Object.defineProperty(e.prototype,"tryItOut",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.tryItOperation=e}}),Object.defineProperty(e.prototype,"setActiveSampleLanguage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.activeSampleLanguage===e)return this.stopLoader();this.activeSampleLanguage=e,toLocalStorage("activeSampleLanguage",e)}}),Object.defineProperty(e.prototype,"activateSampleLanguage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.setActiveSampleLanguage(e)}}),Object.defineProperty(e.prototype,"startLoader",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isLoading||(this.isLoading=!0)}}),Object.defineProperty(e.prototype,"stopLoader",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isLoading&&(this.isLoading=!1)}}),Object.defineProperty(e.prototype,"dereferenceSpecForTryIt",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,i,o,n;return __awaiter(this,void 0,void 0,(function(){var r,a,s,l,p,u,c;return __generator(this,(function(h){switch(h.label){case 0:return r=this.definition.parser.definition,a=JSON.parse(JSON.stringify(r)),s=__assign(__assign({},getSpecVersionObj(a)),{components:a.components,paths:(u={},u[e.path]=(c={},c[e.httpVerb]=null===(i=null===(t=a.paths)||void 0===t?void 0:t[e.path])||void 0===i?void 0:i[e.httpVerb],c.parameters=null===(n=null===(o=a.paths)||void 0===o?void 0:o[e.path])||void 0===n?void 0:n.parameters,c),u)}),l=new Config({}),p=createParsedDocument(s),[4,bundle({config:l,doc:p,dereference:!0})];case 1:return h.sent(),[2,a]}}))}))}}),Object.defineProperty(e.prototype,"observeAllAndRemark",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=function(i){for(var o=0,n=i;o<n.length;o++){var r=n[o];if("operation"===r.type)for(var a=0,s=r.responses;a<s.length;a++){var l=s[a];observe(l,"expanded",(function(t){return e.remark(t)}))}else"tag"===r.type&&t(r.items||[])}};t(this.menu.renderItems),"none"!==this.options.pagination&&observe(this.menu,"renderItems",(function(){return t(e.menu.renderItems)}))}}),Object.defineProperty(e.prototype,"remark",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;e.newValue&&setTimeout((function(){return t.marker.mark()}),0)}}),Object.defineProperty(e,"fromJS",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var i,o=new e(t.definition.data,t.definition.url,t.options,!1);setGlobalStore(o),o.menu.activeItemIdx=void 0!==t.menu.activeItemIdx?t.menu.activeItemIdx:-1,o.definition instanceof VersionedSpecStore&&t.definition.activeVersionIdx&&(o.definition.activeVersionIdx=t.definition.activeVersionIdx||0);var n=o.menu.flatItems[o.menu.activeItemIdx];if(n&&o.menu.activate(n,!1),!o.options.disableSearch){var r=new URL(window.location.href);r.pathname=t.searchIndexPath&&t.searchIndexPath.startsWith("/")?t.searchIndexPath:r.pathname+(r.pathname.endsWith("/")?"":"/")+t.searchIndexPath,null===(i=o.search)||void 0===i||i.fromExternalJS(r.toString(),t.searchIndexExport)}return t.tryItOperationId&&(o.tryItOperation=o.menu.flatItems.find((function(e){return e.id===t.tryItOperationId}))),setTimeout((function(){return o.observeAllAndRemark()}),0),o}}),Object.defineProperty(e.prototype,"toJS",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(o){switch(o.label){case 0:return i={menu:{activeItemIdx:this.menu.activeItemIdx},definition:this.definition instanceof VersionedSpecStore?{url:void 0,data:this.definition.toJS()}:{url:this.definition.parser.definitionUrl,data:this.definition.parser.definition}},this.search?[4,this.search.toJS()]:[3,2];case 1:return t=o.sent(),[3,3];case 2:t=void 0,o.label=3;case 3:return[2,(i.searchIndex=t,i.options=this.rawOptions,i.tryItOperationId=null===(e=this.tryItOperation)||void 0===e?void 0:e.id,i)]}}))}))}}),Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.scroll.dispose(),this.menu.dispose(),this.search&&this.search.dispose(),this.disposer()}}),Object.defineProperty(e.prototype,"updateMarkOnMenu",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t=Math.max(0,e),i=Math.min(this.menu.flatItems.length,t+5),o=[],n=t;n<i;n++){(r=this.menu.getElementAt(n))&&(r&&o.push(r))}if("item"===this.options.pagination){var r,a=(this.menu.flatItems[e]||{}).parent;if(null==a?void 0:a.absoluteIdx)(r=this.menu.getElementAt(a.absoluteIdx))&&o.push(r)}this.marker.addOnly(o),this.marker.mark()}}),__decorate([observable],e.prototype,"search",void 0),__decorate([observable],e.prototype,"tryItOperation",void 0),__decorate([observable],e.prototype,"showRightPanel",void 0),__decorate([observable],e.prototype,"layout",void 0),__decorate([observable],e.prototype,"activeSampleLanguage",void 0),__decorate([observable],e.prototype,"isLoading",void 0),__decorate([action],e.prototype,"onDidMount",null),__decorate([action],e.prototype,"toggleRightPanel",null),__decorate([action],e.prototype,"toggleLayout",null),__decorate([action],e.prototype,"disableConsole",null),__decorate([action],e.prototype,"enableConsole",null),__decorate([action],e.prototype,"tryItOut",null),__decorate([action],e.prototype,"setActiveSampleLanguage",null),__decorate([bind,debounce(500)],e.prototype,"activateSampleLanguage",null),__decorate([action],e.prototype,"startLoader",null),__decorate([action],e.prototype,"stopLoader",null),e}();export{ProStore};var DEFAULT_OPTIONS={ignoreNamedSchemas:["java.io.ObjectStreamField"],allowedMdComponents:(_a={RedocResponse:{component:RedocResponse,propsSelector:function(e){return{store:e}}},PullRight:{component:PullRight,propsSelector:function(){return{}}}},_a[SECURITY_DEFINITIONS_COMPONENT_NAME]={component:SecurityDefs,propsSelector:function(e){return{securitySchemes:e.definition.securitySchemes}}},_a[SECURITY_DEFINITIONS_JSX_NAME]={component:SecurityDefs,propsSelector:function(e){return{securitySchemes:e.definition.securitySchemes}}},_a[SCHEMA_DEFINITION_JSX_NAME]={component:SchemaDefinition,propsSelector:function(e){return{parser:e.definition.parser,options:e.options,layout:e.layout,showRightPanel:e.showRightPanel}}},_a)};function joinURLs(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),t.startsWith("/")&&(t=t.substring(1)),e+"/"+t}function addTrailingSlash(e){return e.endsWith("/")?e:e+"/"}function getSpecVersionObj(e){return e.openapi?{openapi:e.openapi}:e.swagger?{swagger:e.swagger}:void 0}function deepClone(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var i in e){var o=e[i];t[i]=deepClone(o)}return t}
|
|
1
|
+
var _a;import{__assign,__awaiter,__decorate,__generator}from"tslib";import{action,makeObservable,observable,observe}from"mobx";import{bundle,Config}from"@redocly/openapi-core";import{bind,debounce}from"decko";import{createParsedDocument,IS_BROWSER,MarkerService,RedocNormalizedOptions,SCHEMA_DEFINITION_JSX_NAME,SchemaDefinition,ScrollService,SECURITY_DEFINITIONS_COMPONENT_NAME,SECURITY_DEFINITIONS_JSX_NAME,SecurityDefs,SpecStore}from"../redoc-lib";import{FakeHistoryService,ProHashHistoryService,PushStateHistoryService}from"./history";import{ProMenu}from"./ProMenu";import{DeepSearchStore,DEFAULT_SEARCH_MAX_DEPTH,RemoteSearch}from"./SearchStore";import{extendTheme}from"./extendTheme";import{PullRight,RedocResponse}from"../components/pluggable";import{VersionedSpecStore}from"./VersionedSpecStore";import parseToken from"./check";import{normalizePath}from"./utils";import{fromLocalStorage,fromSessionStorage,setGlobalStore,toLocalStorage,toSessionStorage}from"../utils";import{LayoutVariant}from"./store-types";import{SideNavStyle}from"./types";var global="undefined"==typeof window?{__REDOCLY_SEARCH_URL:void 0}:window,NestingGroup=function(){function e(e,t,i,o){var n=this;Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"absoluteIdx",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"description",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"linkable",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"items",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"externalDocs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"active",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"expanded",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"depth",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"level",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),makeObservable(this),this.id="section/"+e,this.type="nesting-group",this.name=i||"",this.level=1,this.depth=1,this.description="",this.parent=void 0,this.expanded=!1,this.items=t,this.linkable=!!o,t.forEach((function(e){return e.parent=n})),increaseDepthDeep(t)}return Object.defineProperty(e.prototype,"activate",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.active=!0}}),Object.defineProperty(e.prototype,"expand",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.expanded=!0,this.parent&&this.parent.expand()}}),Object.defineProperty(e.prototype,"collapse",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.expanded=!1}}),Object.defineProperty(e.prototype,"deactivate",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.active=!1}}),__decorate([observable],e.prototype,"active",void 0),__decorate([observable],e.prototype,"expanded",void 0),__decorate([action],e.prototype,"activate",null),__decorate([action],e.prototype,"expand",null),__decorate([action],e.prototype,"collapse",null),__decorate([action],e.prototype,"deactivate",null),e}();export{NestingGroup};function increaseDepthDeep(e){Array.isArray(e)&&e.forEach((function(e){e.depth++,e.parent&&"group"===e.parent.type&&(e.depth=e.parent.depth),increaseDepthDeep(e.items)}))}var ProStore=function(){function e(e,t,i,o){var n=this;void 0===i&&(i={}),void 0===o&&(o=!0),Object.defineProperty(this,"rawOptions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"menu",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"definition",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"marker",{enumerable:!0,configurable:!0,writable:!0,value:new MarkerService}),Object.defineProperty(this,"scroll",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"disposer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"search",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"tryItOperation",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"showRightPanel",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"layout",{enumerable:!0,configurable:!0,writable:!0,value:LayoutVariant.THREE_PANEL}),Object.defineProperty(this,"activeSampleLanguage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isLoading",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"l",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),makeObservable(this),this.initProOptions(i),IS_BROWSER&&(this.l=parseToken(i.licenseKey),this.l.then((function(e){e.valid&&e.allowed&&!e.expired||e.local||(n.menu.items=[],n.menu.flatItems=n.menu.flatItems.slice(0,1),n.menu.renderItems=[])})));var r="object"==typeof e&&"versions"in e,a=this.options.disableSidebar?new FakeHistoryService(this.options):"browser"===this.options.routingStrategy?new PushStateHistoryService(this.options,r):new ProHashHistoryService(this.options,r);this.definition=r?new VersionedSpecStore(e,this.options,a.currentId.split("/")[0]):new SpecStore(e,t,this.options),i.downloadDefinitionUrl&&(this.definition.info.downloadFileName=""),this.scroll=new ScrollService(this.options),this.options.disableSidebar||ProMenu.updateOnHistory(a.currentId,this.scroll),this.menu=new ProMenu(this.definition,this.scroll,this.options,a),this.menu.initOnHistory(),this.options.disableSearch||this.initSearch(this.options,o),this.disposer=observe(this.menu,"none"===this.options.pagination?"activeItemIdx":"activeRenderItemIdx",(function(e){setTimeout((function(){return n.updateMarkOnMenu(e.newValue)}))})),setGlobalStore(this)}return Object.defineProperty(e.prototype,"initProOptions",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,i,o,n,r;e=deepClone(e),this.rawOptions=extendTheme(e),this.options=new RedocNormalizedOptions(this.rawOptions,DEFAULT_OPTIONS),this.options.showConsole=null===(t=this.rawOptions.showConsole)||void 0===t||t,this.options.hideRightPanel=null!==(i=this.rawOptions.hideRightPanel)&&void 0!==i&&i,this.showRightPanel=!this.options.hideRightPanel,this.options.showRightPanelToggle=null===(o=this.rawOptions.showRightPanelToggle)||void 0===o||o,this.options.showChangeLayoutButton=null===(n=this.rawOptions.showChangeLayoutButton)||void 0===n||n,this.options.layout=this.rawOptions.layout||LayoutVariant.THREE_PANEL,this.options.defaultSampleLanguage=this.rawOptions.defaultSampleLanguage||"",this.options.deepLinkSeparator=this.rawOptions.deepLinkSeparator||"/",this.options.deepLinkPrefix=this.rawOptions.deepLinkPrefix||"!",this.options.disableDeepLinks=this.rawOptions.disableDeepLinks||!1,this.options.sideNavStyle=this.rawOptions.sideNavStyle||SideNavStyle.SummaryOnly,this.options.whiteLabel=!!this.rawOptions.whiteLabel,this.options.hideLogo=!!this.rawOptions.hideLogo,this.options.hideInfoSection=!!this.rawOptions.hideInfoSection,this.options.oAuth2RedirectURI=this.rawOptions.oAuth2RedirectURI||null,this.options.oAuth2RedirectURI=this.rawOptions.oAuth2RedirectURI||null,this.options.events=this.rawOptions.events||{},this.options.corsProxyUrl=this.rawOptions.corsProxyUrl?addTrailingSlash(this.rawOptions.corsProxyUrl):null,this.options.authCorsProxyUrl=this.rawOptions.authCorsProxyUrl?addTrailingSlash(this.rawOptions.authCorsProxyUrl):null,this.options.theme.scrollYOffset=this.options.scrollYOffset,this.options.linkForId=this.rawOptions.linkForId||null,this.options.generateDeepLink=this.rawOptions.generateDeepLink||null,this.options.onDeepLinkClick=this.rawOptions.onDeepLinkClick||null,this.options.requestInterceptor=this.rawOptions.requestInterceptor||null,this.options.sidebarLinks=this.rawOptions.sidebarLinks||{};var a="object"==typeof this.rawOptions.layout?this.rawOptions.layout:null;if(this.options.pagination=this.rawOptions.pagination||"none",this.options.routingStrategy="none"===this.options.pagination?"hash":"browser",!(null===(r=this.rawOptions)||void 0===r?void 0:r.pagination)&&(null==a?void 0:a.scope))switch(console.warn('"layout.scope" and "routingStrategy" settings are deprecated. Please, use "pagination" instead.'),null==a?void 0:a.scope){case"all":default:this.options.pagination="none",this.options.routingStrategy="hash";break;case"section":this.options.pagination="section",this.options.routingStrategy="browser";break;case"item":this.options.pagination="item",this.options.routingStrategy="browser"}this.options.markdownItemsPagination="none",!1!==this.rawOptions.showNextButton&&(this.options.showNextButton=!0),this.options.disableSidebar=!!e.disableSidebar,this.options.disableSidebar&&(this.options.theme.sidebar.width="0px"),this.options.skipBundleAndConvert=!!e.skipBundleAndConvert,this.options.routingBasePath=e.routingBasePath&&normalizePath(e.routingBasePath)||"",this.options.searchAutoExpand=!1!==e.searchAutoExpand,this.options.searchMode=e.searchMode||"default",this.options.ctrlFHijack=void 0===e.ctrlFHijack||e.ctrlFHijack,this.options.disablePaginationLoadingAnimation=!!e.disablePaginationLoadingAnimation||"none"===this.options.pagination,this.options.showConsole,this.options.generateCodeSamples=e.generateCodeSamples||{languages:[]},this.options.searchMaxDepth=this.rawOptions.searchMaxDepth||DEFAULT_SEARCH_MAX_DEPTH}}),Object.defineProperty(e.prototype,"initSearch",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var i=this;global.__REDOCLY_SEARCH_URL?this.search=new RemoteSearch(global.__REDOCLY_SEARCH_URL):this.search=new DeepSearchStore(e),t&&setTimeout((function(){var e;return null===(e=i.search)||void 0===e?void 0:e.indexItems(i.menu.items)}),50),this.definition instanceof VersionedSpecStore&&observe(this.definition,"activeVersionIdx",(function(t){var o,n,r=i.definition;null===(o=i.search)||void 0===o||o.dispose(),i.search=new DeepSearchStore(e);var a=r.versions[t.newValue]._searchIndexName;if(IS_BROWSER&&a){var s=r.versions[t.newValue]._searchIndexName,l=new URL(window.location.href);l.pathname=joinURLs(i.options.routingBasePath,s),null===(n=i.search)||void 0===n||n.fromExternalJS(l.toString(),__redoc_state.searchIndexExport),i.observeAllAndRemark()}else setTimeout((function(){var e;null===(e=i.search)||void 0===e||e.indexItems(i.menu.items)}),0)})),IS_BROWSER&&this.observeAllAndRemark()}}),Object.defineProperty(e.prototype,"onDidMount",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.menu.updateOnHistory(),this.updateMarkOnMenu(this.menu.activeItemIdx),this.layout=fromLocalStorage("layoutVariant")||this.options.layout||this.layout,this.activeSampleLanguage=fromLocalStorage("activeSampleLanguage")||this.options.defaultSampleLanguage,this.options.showRightPanelToggle){var e=fromSessionStorage("showRightPanelToggleState");e&&(this.showRightPanel="true"===e)}}}),Object.defineProperty(e.prototype,"toggleRightPanel",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.showRightPanel=null!=e?e:!this.showRightPanel,toSessionStorage("showRightPanelToggleState",JSON.stringify(this.showRightPanel))}}),Object.defineProperty(e.prototype,"toggleLayout",{enumerable:!1,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=LayoutVariant.THREE_PANEL),this.layout=e,toLocalStorage("layoutVariant",e)}}),Object.defineProperty(e.prototype,"disableConsole",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.options.showConsole=!1}}),Object.defineProperty(e.prototype,"enableConsole",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.options.showConsole=!0}}),Object.defineProperty(e.prototype,"tryItOut",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.tryItOperation=e}}),Object.defineProperty(e.prototype,"setActiveSampleLanguage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.activeSampleLanguage===e)return this.stopLoader();this.activeSampleLanguage=e,toLocalStorage("activeSampleLanguage",e)}}),Object.defineProperty(e.prototype,"activateSampleLanguage",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.setActiveSampleLanguage(e)}}),Object.defineProperty(e.prototype,"startLoader",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isLoading||(this.isLoading=!0)}}),Object.defineProperty(e.prototype,"stopLoader",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isLoading&&(this.isLoading=!1)}}),Object.defineProperty(e.prototype,"dereferenceSpecForTryIt",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t,i,o,n;return __awaiter(this,void 0,void 0,(function(){var r,a,s,l,p,u,c;return __generator(this,(function(h){switch(h.label){case 0:return r=this.definition.parser.definition,a=JSON.parse(JSON.stringify(r)),s=__assign(__assign({},getSpecVersionObj(a)),{components:a.components,paths:(u={},u[e.path]=(c={},c[e.httpVerb]=null===(i=null===(t=a.paths)||void 0===t?void 0:t[e.path])||void 0===i?void 0:i[e.httpVerb],c.parameters=null===(n=null===(o=a.paths)||void 0===o?void 0:o[e.path])||void 0===n?void 0:n.parameters,c),u)}),l=new Config({}),p=createParsedDocument(s),[4,bundle({config:l,doc:p,dereference:!0})];case 1:return h.sent(),[2,a]}}))}))}}),Object.defineProperty(e.prototype,"observeAllAndRemark",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=function(i){for(var o=0,n=i;o<n.length;o++){var r=n[o];if("operation"===r.type)for(var a=0,s=r.responses;a<s.length;a++){var l=s[a];observe(l,"expanded",(function(t){return e.remark(t)}))}else"tag"===r.type&&t(r.items||[])}};t(this.menu.renderItems),"none"!==this.options.pagination&&observe(this.menu,"renderItems",(function(){return t(e.menu.renderItems)}))}}),Object.defineProperty(e.prototype,"remark",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;e.newValue&&setTimeout((function(){return t.marker.mark()}),0)}}),Object.defineProperty(e,"fromJS",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var i,o=new e(t.definition.data,t.definition.url,t.options,!1);setGlobalStore(o),o.menu.activeItemIdx=void 0!==t.menu.activeItemIdx?t.menu.activeItemIdx:-1,o.definition instanceof VersionedSpecStore&&t.definition.activeVersionIdx&&(o.definition.activeVersionIdx=t.definition.activeVersionIdx||0);var n=o.menu.flatItems[o.menu.activeItemIdx];if(n&&o.menu.activate(n,!1),!o.options.disableSearch){var r=new URL(window.location.href);r.pathname=t.searchIndexPath&&t.searchIndexPath.startsWith("/")?t.searchIndexPath:r.pathname+(r.pathname.endsWith("/")?"":"/")+t.searchIndexPath,null===(i=o.search)||void 0===i||i.fromExternalJS(r.toString(),t.searchIndexExport)}return t.tryItOperationId&&(o.tryItOperation=o.menu.flatItems.find((function(e){return e.id===t.tryItOperationId}))),setTimeout((function(){return o.observeAllAndRemark()}),0),o}}),Object.defineProperty(e.prototype,"toJS",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e;return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(o){switch(o.label){case 0:return i={menu:{activeItemIdx:this.menu.activeItemIdx},definition:this.definition instanceof VersionedSpecStore?{url:void 0,data:this.definition.toJS()}:{url:this.definition.parser.definitionUrl,data:this.definition.parser.definition}},this.search?[4,this.search.toJS()]:[3,2];case 1:return t=o.sent(),[3,3];case 2:t=void 0,o.label=3;case 3:return[2,(i.searchIndex=t,i.options=this.rawOptions,i.tryItOperationId=null===(e=this.tryItOperation)||void 0===e?void 0:e.id,i)]}}))}))}}),Object.defineProperty(e.prototype,"dispose",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.scroll.dispose(),this.menu.dispose(),this.search&&this.search.dispose(),this.disposer()}}),Object.defineProperty(e.prototype,"updateMarkOnMenu",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t=Math.max(0,e),i=Math.min(this.menu.flatItems.length,t+5),o=[],n=t;n<i;n++){(r=this.menu.getElementAt(n))&&(r&&o.push(r))}if("item"===this.options.pagination){var r,a=(this.menu.flatItems[e]||{}).parent;if(null==a?void 0:a.absoluteIdx)(r=this.menu.getElementAt(a.absoluteIdx))&&o.push(r)}this.marker.addOnly(o),this.marker.mark()}}),__decorate([observable],e.prototype,"search",void 0),__decorate([observable],e.prototype,"tryItOperation",void 0),__decorate([observable],e.prototype,"showRightPanel",void 0),__decorate([observable],e.prototype,"layout",void 0),__decorate([observable],e.prototype,"activeSampleLanguage",void 0),__decorate([observable],e.prototype,"isLoading",void 0),__decorate([action],e.prototype,"onDidMount",null),__decorate([action],e.prototype,"toggleRightPanel",null),__decorate([action],e.prototype,"toggleLayout",null),__decorate([action],e.prototype,"disableConsole",null),__decorate([action],e.prototype,"enableConsole",null),__decorate([action],e.prototype,"tryItOut",null),__decorate([action],e.prototype,"setActiveSampleLanguage",null),__decorate([bind,debounce(500)],e.prototype,"activateSampleLanguage",null),__decorate([action],e.prototype,"startLoader",null),__decorate([action],e.prototype,"stopLoader",null),e}();export{ProStore};var DEFAULT_OPTIONS={ignoreNamedSchemas:["java.io.ObjectStreamField"],allowedMdComponents:(_a={RedocResponse:{component:RedocResponse,propsSelector:function(e){return{store:e}}},PullRight:{component:PullRight,propsSelector:function(){return{}}}},_a[SECURITY_DEFINITIONS_COMPONENT_NAME]={component:SecurityDefs,propsSelector:function(e){return{securitySchemes:e.definition.securitySchemes}}},_a[SECURITY_DEFINITIONS_JSX_NAME]={component:SecurityDefs,propsSelector:function(e){return{securitySchemes:e.definition.securitySchemes}}},_a[SCHEMA_DEFINITION_JSX_NAME]={component:SchemaDefinition,propsSelector:function(e){return{parser:e.definition.parser,options:e.options,layout:e.layout,showRightPanel:e.showRightPanel}}},_a)};function joinURLs(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),t.startsWith("/")&&(t=t.substring(1)),e+"/"+t}function addTrailingSlash(e){return e.endsWith("/")?e:e+"/"}function getSpecVersionObj(e){return e.openapi?{openapi:e.openapi}:e.swagger?{swagger:e.swagger}:void 0}function deepClone(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var i in e){var o=e[i];t[i]=deepClone(o)}return t}
|
|
2
2
|
//# sourceMappingURL=ProStore.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { IMenuItem, OperationModel, RedocNormalizedOptions, SearchResult
|
|
2
|
-
import {
|
|
1
|
+
import type { IMenuItem, OperationModel, RedocNormalizedOptions, SearchResult } from '../redoc-lib';
|
|
2
|
+
import { SearchStore } from '../redoc-lib';
|
|
3
|
+
import type { RedocProUserOptionsExt } from './ProStore';
|
|
3
4
|
export declare type SearchResultMeta = {
|
|
4
5
|
place?: string;
|
|
5
6
|
path?: string[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { OpenAPIDefinition, ApiInfoModel, OpenAPIParser, OpenAPIExternalDocumentation, SecuritySchemesModel, ContentItemModel } from '../redoc-lib';
|
|
2
|
+
import { SpecStore } from '../redoc-lib';
|
|
3
|
+
import type { RedocProNormalizedOptions } from './ProStore';
|
|
3
4
|
interface VersionInfo {
|
|
4
5
|
id: string;
|
|
5
6
|
title: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { OperationModel, ServerVariables } from '../../redoc-lib';
|
|
2
|
-
import * as HAR from './har';
|
|
3
|
-
import { Languages } from './types';
|
|
1
|
+
import type { OperationModel, ServerVariables } from '../../redoc-lib';
|
|
2
|
+
import type * as HAR from './har';
|
|
3
|
+
import type { Languages } from './types';
|
|
4
4
|
export declare type CustomHAR = HAR.Request & {
|
|
5
5
|
securityOAuth2ExtraCalls?: HAR.Request[];
|
|
6
6
|
basicAuth?: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SnippetRequest } from '../index';
|
|
2
|
-
import { CodeBuilder } from './code-builder';
|
|
1
|
+
import type { SnippetRequest } from '../index';
|
|
2
|
+
import type { CodeBuilder } from './code-builder';
|
|
3
3
|
export declare function getPreserveTransformer({ body, authorizationHeader, }: {
|
|
4
4
|
body?: boolean;
|
|
5
5
|
authorizationHeader?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CustomHAR } from '..';
|
|
2
|
-
import { PostData } from '../har';
|
|
1
|
+
import type { CustomHAR } from '..';
|
|
2
|
+
import type { PostData } from '../har';
|
|
3
3
|
interface ParsedUrlQueryInput {
|
|
4
4
|
[key: string]: string | number | boolean | string[] | number[] | boolean[] | undefined | null;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CSharpCodeSampleConfig } from '../../../types';
|
|
2
|
-
import { LanguageHandler } from '../..';
|
|
1
|
+
import type { CSharpCodeSampleConfig } from '../../../types';
|
|
2
|
+
import type { LanguageHandler } from '../..';
|
|
3
3
|
declare const handler: LanguageHandler<CSharpCodeSampleConfig['options']>;
|
|
4
4
|
export declare const info: {
|
|
5
5
|
key: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LanguageHandler } from '../..';
|
|
2
|
-
import { GoCodeSampleConfig } from '../../../types';
|
|
1
|
+
import type { LanguageHandler } from '../..';
|
|
2
|
+
import type { GoCodeSampleConfig } from '../../../types';
|
|
3
3
|
declare const handler: LanguageHandler<GoCodeSampleConfig['options']>;
|
|
4
4
|
export declare const info: {
|
|
5
5
|
key: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { JavaCodeSampleConfig } from '../../../types';
|
|
2
|
-
import { LanguageHandler } from '../..';
|
|
1
|
+
import type { JavaCodeSampleConfig } from '../../../types';
|
|
2
|
+
import type { LanguageHandler } from '../..';
|
|
3
3
|
declare const handler: LanguageHandler<JavaCodeSampleConfig['options']>;
|
|
4
4
|
export declare const info: {
|
|
5
5
|
key: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Java8CodeSampleConfig } from '../../../types';
|
|
2
|
-
import { LanguageHandler } from '../..';
|
|
1
|
+
import type { Java8CodeSampleConfig } from '../../../types';
|
|
2
|
+
import type { LanguageHandler } from '../..';
|
|
3
3
|
declare const handler: LanguageHandler<Java8CodeSampleConfig['options']>;
|
|
4
4
|
export declare const info: {
|
|
5
5
|
key: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LanguageHandler } from '../..';
|
|
2
|
-
import { JavaScriptCodeSampleConfig } from '../../../types';
|
|
1
|
+
import type { LanguageHandler } from '../..';
|
|
2
|
+
import type { JavaScriptCodeSampleConfig } from '../../../types';
|
|
3
3
|
declare const handler: LanguageHandler<JavaScriptCodeSampleConfig['options']>;
|
|
4
4
|
export declare const info: {
|
|
5
5
|
key: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LanguageHandler } from '../..';
|
|
2
|
-
import { NodeJsCodeSampleConfig } from '../../../types';
|
|
1
|
+
import type { LanguageHandler } from '../..';
|
|
2
|
+
import type { NodeJsCodeSampleConfig } from '../../../types';
|
|
3
3
|
declare const handler: LanguageHandler<NodeJsCodeSampleConfig['options']>;
|
|
4
4
|
export declare const info: {
|
|
5
5
|
key: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LanguageHandler } from '../..';
|
|
2
|
-
import { PHPCodeSampleConfig } from '../../../types';
|
|
1
|
+
import type { LanguageHandler } from '../..';
|
|
2
|
+
import type { PHPCodeSampleConfig } from '../../../types';
|
|
3
3
|
declare const handler: LanguageHandler<PHPCodeSampleConfig['options']>;
|
|
4
4
|
export declare const info: {
|
|
5
5
|
key: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Input, ObjectToPhpArrayOptions } from './types';
|
|
1
|
+
import type { Input, ObjectToPhpArrayOptions } from './types';
|
|
2
2
|
export declare function objectToPhpArray(input: Input, options: ObjectToPhpArrayOptions, pad?: string): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LanguageHandler } from '../..';
|
|
2
|
-
import { PythonCodeSampleConfig } from '../../../types';
|
|
1
|
+
import type { LanguageHandler } from '../..';
|
|
2
|
+
import type { PythonCodeSampleConfig } from '../../../types';
|
|
3
3
|
declare const handler: LanguageHandler<PythonCodeSampleConfig['options']>;
|
|
4
4
|
export default handler;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LanguageHandler } from '../..';
|
|
2
|
-
import { RubyCodeSampleConfig } from '../../../types';
|
|
1
|
+
import type { LanguageHandler } from '../..';
|
|
2
|
+
import type { RubyCodeSampleConfig } from '../../../types';
|
|
3
3
|
declare const handler: LanguageHandler<RubyCodeSampleConfig['options']>;
|
|
4
4
|
export declare const info: {
|
|
5
5
|
key: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LanguageHandler } from '../..';
|
|
2
|
-
import { cURULCodeSampleConfig } from '../../../types';
|
|
1
|
+
import type { LanguageHandler } from '../..';
|
|
2
|
+
import type { cURULCodeSampleConfig } from '../../../types';
|
|
3
3
|
declare const handler: LanguageHandler<cURULCodeSampleConfig['options']>;
|
|
4
4
|
export declare const info: {
|
|
5
5
|
key: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RedocProRawOptions } from './ProStore';
|
|
2
|
-
import { ResolvedThemeInterface, MediaValue } from '../redoc-lib';
|
|
1
|
+
import type { RedocProRawOptions } from './ProStore';
|
|
2
|
+
import type { ResolvedThemeInterface, MediaValue } from '../redoc-lib';
|
|
3
3
|
export declare function extendTheme(options: RedocProRawOptions): RedocProRawOptions;
|
|
4
4
|
interface Typography {
|
|
5
5
|
fontSize?: MediaValue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import EventEmitter from 'eventemitter3';
|
|
2
|
-
import { HistoryService } from '../../redoc-lib';
|
|
3
|
-
import { RedocProNormalizedOptions } from '../ProStore';
|
|
2
|
+
import type { HistoryService } from '../../redoc-lib';
|
|
3
|
+
import type { RedocProNormalizedOptions } from '../ProStore';
|
|
4
4
|
export declare class FakeHistoryService implements Interface<HistoryService> {
|
|
5
5
|
options: RedocProNormalizedOptions;
|
|
6
6
|
_emitter: EventEmitter<string | symbol, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HistoryService } from '../../redoc-lib';
|
|
2
|
-
import { RedocProNormalizedOptions } from '../ProStore';
|
|
1
|
+
import type { HistoryService } from '../../redoc-lib';
|
|
2
|
+
import type { RedocProNormalizedOptions } from '../ProStore';
|
|
3
3
|
/**
|
|
4
4
|
* Used for multi-version and multispec in SSR mode.
|
|
5
5
|
* Allows rendering each version on separate path but keeps hash-routing for inner routes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { HistoryService } from '../../redoc-lib';
|
|
2
|
-
import {
|
|
1
|
+
import type { HistoryService } from '../../redoc-lib';
|
|
2
|
+
import type { RedocProNormalizedOptions } from '../ProStore';
|
|
3
|
+
import type { MarkdownItemsPagination, Pagination } from '../types';
|
|
3
4
|
export declare class PushStateHistoryService implements Interface<HistoryService> {
|
|
4
5
|
options: RedocProNormalizedOptions;
|
|
5
6
|
private multispec;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldModel } from '../../redoc-lib';
|
|
1
|
+
import type { FieldModel } from '../../redoc-lib';
|
|
2
2
|
export declare function isSameHash(a: string, b: string): boolean;
|
|
3
3
|
export declare function constructFieldDeepFragment(field: FieldModel): string | null;
|
|
4
4
|
export declare function joinWithSeparator(base?: string, path?: string, sep?: string): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export*from"./ProStore";export*from"./history";export*from"./store-types";export*from"./code-samples";
|
|
1
|
+
export*from"./ProStore";export*from"./history";export*from"./store-types";export*from"./code-samples";export*from"./types";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { RedocRawOptions } from '../redoc-lib';
|
|
2
|
+
import type { ThemeExtension } from './extendTheme';
|
|
3
|
+
export declare enum SideNavStyle {
|
|
4
|
+
SummaryOnly = "summary-only",
|
|
5
|
+
PathFirst = "path-first",
|
|
6
|
+
IdOnly = "id-only"
|
|
7
|
+
}
|
|
8
|
+
export declare type RedocProTheme = RedocRawOptions['theme'] & ThemeExtension;
|
|
9
|
+
export declare type Normalized<T> = {
|
|
10
|
+
[P in keyof T]-?: T[P];
|
|
11
|
+
};
|
|
12
|
+
export declare type MarkdownItemsPagination = 'none' | 'section';
|
|
13
|
+
export declare type Pagination = 'none' | 'section' | 'item';
|
|
14
|
+
export declare type ExternalLink = ExternalLinkLink | ExternalLinkSeparator;
|
|
15
|
+
export declare type ExternalLinkLink = {
|
|
16
|
+
label: string;
|
|
17
|
+
link: string;
|
|
18
|
+
target?: string;
|
|
19
|
+
separatorLine?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare type ExternalLinkSeparator = {
|
|
22
|
+
separator?: string;
|
|
23
|
+
separatorLine?: boolean;
|
|
24
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign,__awaiter,__generator}from"tslib";import merge from"deepmerge";import{
|
|
1
|
+
import{__assign,__awaiter,__generator}from"tslib";import merge from"deepmerge";import{isMergeableObject,isObject}from"../redoc-lib/src/utils/helpers";export function normalizePath(e){return e.startsWith("/")||(e="/"+e),e.endsWith("/")&&(e=e.slice(0,-1)),e}export function isSameMime(e,r){return!(!e||!r)&&normalizeMimeType(e)===normalizeMimeType(r)}export function normalizeMimeType(e){if(e)return e.split(";")[0].toLowerCase()}export function unescapeServerVariables(e){var r=new RegExp("%7B","g"),t=new RegExp("%7D","g");return e.replace(r,"{").replace(t,"}").replace("///","//")}export function arrayMergeStrategy(e,r){if(!e.length||!hasObjectOrArray(e))return r;var t=e.filter((function(e){return Object.keys(e).length>0}));return r.forEach((function(r,n){isMergeableObject(r)?t[n]=merge(e[n],r,{arrayMerge:arrayMergeStrategy}):Array.isArray(r)?t.push(r):t[n]=r})),t}var hasObjectOrArray=function(e){return e.some((function(e){return isObject(e)&&Object.keys(e).length>0}))};export function isEmptyObject(e){return!!e&&0===Object.keys(e).length}export var cryptoLib="undefined"!=typeof window&&(window.crypto||window.msCrypto)||void 0;export function randString(e){void 0===e&&(e=32);for(var r="";r.length<e;)r+=Math.random().toString(32).substring(2);return r.substring(0,e)}export function encodeState(e){var r=__assign({randomStr:randString()},e);return btoa(JSON.stringify(r))}export function sha256(e){return __awaiter(this,void 0,void 0,(function(){var r;return __generator(this,(function(t){return r=(new TextEncoder).encode(e),[2,null==cryptoLib?void 0:cryptoLib.subtle.digest("SHA-256",r)]}))}))}export function base64UrlEncode(e){if(e)return btoa(String.fromCharCode.apply(null,new Uint8Array(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|
package/lib-esm/standalone.d.ts
CHANGED
|
@@ -13,10 +13,10 @@ import 'core-js/es/string/starts-with';
|
|
|
13
13
|
import 'core-js/es/symbol';
|
|
14
14
|
import 'unfetch/polyfill/index';
|
|
15
15
|
import 'url-polyfill';
|
|
16
|
-
import { OpenAPIDefinition } from './redoc-lib';
|
|
17
|
-
import { ProStoreState, RedocProRawOptions } from './services/ProStore';
|
|
16
|
+
import type { OpenAPIDefinition } from './redoc-lib';
|
|
17
|
+
import type { ProStoreState, RedocProRawOptions } from './services/ProStore';
|
|
18
18
|
import { LayoutVariant } from './services/store-types';
|
|
19
|
-
import { SpecVersions } from './services/VersionedSpecStore';
|
|
19
|
+
import type { SpecVersions } from './services/VersionedSpecStore';
|
|
20
20
|
export { setSecurityDetails, setParameterValue, setSecurityDetailsVariants } from './utils';
|
|
21
21
|
export declare function toggleLayout(layout?: LayoutVariant): void;
|
|
22
22
|
export declare function toggleRightPanel(value?: boolean): void;
|
package/lib-esm/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as React from"react";import{IS_BROWSER}from"./redoc-lib";var _store;export var getGlobalStore=function(){return _store};export var setGlobalStore=function(e){return _store=e};export function debounce(e,t,o){var r,n=0;return function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];function s(){n>1&&e.apply(void 0,a),n=0,r=null}n++,r?clearTimeout(r):o&&e.apply(void 0,a),r=setTimeout(s,t)}}export function toSessionStorage(e,t){window.sessionStorage.setItem("redoc."+e,t)}export function fromSessionStorage(e){return IS_BROWSER&&window.sessionStorage.getItem("redoc."+e)||""}export function setParameterValue(e,t,o){toSessionStorage(e+"."+t,JSON.stringify(o))}export function getParameterValue(e,t){try{return JSON.parse(fromSessionStorage(e+"."+t))}catch(e){return null}}export function toLocalStorage(e,t){window.localStorage.setItem("redoc."+e,t)}export function fromLocalStorage(e){return IS_BROWSER&&window.localStorage.getItem("redoc."+e)||""}export function useDimensions(e){var t=React.useState(null),o=t[0],r=t[1];return React.useLayoutEffect((function(){if(e){var t=function(){return window.requestAnimationFrame((function(){return r(e.getBoundingClientRect())}))};return t(),window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}}}),[e]),[o]}export function escapeFormId(e){return e.replace(/\./g,"%2e")}export function unescapeFormId(e){return e.replace(/%2e/g,".")}export function setSecurityDetails(e,t){e=escapeFormId(e),"string"==typeof t?toSessionStorage("auth."+e,t):t&&(toSessionStorage("auth."+e+".password",t.password||""),toSessionStorage("auth."+e+".username",t.username||""),toSessionStorage("auth."+e+".token",t.token&&JSON.stringify(t.token)||""),toSessionStorage("auth."+e+".client_id",t.client_id||""),toSessionStorage("auth."+e+".client_secret",t.client_secret||""),toSessionStorage("auth."+e+".scopes",t.scopes&&JSON.stringify(t.scopes)||""))}export function setSecurityDetailsVariants(e,t){toSessionStorage("auth."+(e=escapeFormId(e))+".variants",JSON.stringify(t))}export function getSecurityDetails(e){var t=fromSessionStorage("auth."+(e=escapeFormId(e))),o=fromSessionStorage("auth."+e+".token");return{raw:t,password:fromSessionStorage("auth."+e+".password"),username:fromSessionStorage("auth."+e+".username"),token:o&&JSON.parse(o)||null,client_id:fromSessionStorage("auth."+e+".client_id"),client_secret:fromSessionStorage("auth."+e+".client_secret"),scopes:fromSessionStorage("auth."+e+".scopes")}}export function getSecurityDetailsOptions(e,t){var o=fromSessionStorage("auth."+(e=escapeFormId(e))+".variants");if(!o)return null;var r=JSON.parse(o);return r&&Array.isArray(r)?r.map((function(e){return e.details?""===t&&e.details&&"string"==typeof e.details?{label:e.label,value:e.details}:"object"==typeof e.details?{label:e.label,value:e.details[t]}:null:null})).filter(notNull):null}function notNull(e){return null!==e}export function get(e,t,o){return"string"==typeof t&&(t=t.split(".")),t.reduce((function(e,t){return e&&e[t]?e[t]:o}),e)}export function joinStringFactory(e){return function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return t.filter(Boolean).join(e)}}export var dottedString=joinStringFactory(".");
|
|
1
|
+
import*as React from"react";import{IS_BROWSER}from"./redoc-lib";var _store;export var getGlobalStore=function(){return _store};export var setGlobalStore=function(e){return _store=e};export function debounce(e,t,o){var r,n=0;return function(){for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];function s(){n>1&&e.apply(void 0,a),n=0,r=null}n++,r?clearTimeout(r):o&&e.apply(void 0,a),r=setTimeout(s,t)}}export function toSessionStorage(e,t){IS_BROWSER&&window.sessionStorage.setItem("redoc."+e,t)}export function fromSessionStorage(e){return IS_BROWSER&&window.sessionStorage.getItem("redoc."+e)||""}export function setParameterValue(e,t,o){toSessionStorage(e+"."+t,JSON.stringify(o))}export function getParameterValue(e,t){try{return JSON.parse(fromSessionStorage(e+"."+t))}catch(e){return null}}export function toLocalStorage(e,t){window.localStorage.setItem("redoc."+e,t)}export function fromLocalStorage(e){return IS_BROWSER&&window.localStorage.getItem("redoc."+e)||""}export function useDimensions(e){var t=React.useState(null),o=t[0],r=t[1];return React.useLayoutEffect((function(){if(e){var t=function(){return window.requestAnimationFrame((function(){return r(e.getBoundingClientRect())}))};return t(),window.addEventListener("resize",t),function(){window.removeEventListener("resize",t)}}}),[e]),[o]}export function escapeFormId(e){return e.replace(/\./g,"%2e")}export function unescapeFormId(e){return e.replace(/%2e/g,".")}export function setSecurityDetails(e,t){e=escapeFormId(e),"string"==typeof t?toSessionStorage("auth."+e,t):t&&(toSessionStorage("auth."+e+".password",t.password||""),toSessionStorage("auth."+e+".username",t.username||""),toSessionStorage("auth."+e+".token",t.token&&JSON.stringify(t.token)||""),toSessionStorage("auth."+e+".client_id",t.client_id||""),toSessionStorage("auth."+e+".client_secret",t.client_secret||""),toSessionStorage("auth."+e+".scopes",t.scopes&&JSON.stringify(t.scopes)||""))}export function setSecurityDetailsVariants(e,t){toSessionStorage("auth."+(e=escapeFormId(e))+".variants",JSON.stringify(t))}export function getSecurityDetails(e){var t=fromSessionStorage("auth."+(e=escapeFormId(e))),o=fromSessionStorage("auth."+e+".token");return{raw:t,password:fromSessionStorage("auth."+e+".password"),username:fromSessionStorage("auth."+e+".username"),token:o&&JSON.parse(o)||null,client_id:fromSessionStorage("auth."+e+".client_id"),client_secret:fromSessionStorage("auth."+e+".client_secret"),scopes:fromSessionStorage("auth."+e+".scopes")}}export function getSecurityDetailsOptions(e,t){var o=fromSessionStorage("auth."+(e=escapeFormId(e))+".variants");if(!o)return null;var r=JSON.parse(o);return r&&Array.isArray(r)?r.map((function(e){return e.details?""===t&&e.details&&"string"==typeof e.details?{label:e.label,value:e.details}:"object"==typeof e.details?{label:e.label,value:e.details[t]}:null:null})).filter(notNull):null}function notNull(e){return null!==e}export function get(e,t,o){return"string"==typeof t&&(t=t.split(".")),t.reduce((function(e,t){return e&&e[t]?e[t]:o}),e)}export function joinStringFactory(e){return function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return t.filter(Boolean).join(e)}}export var dottedString=joinStringFactory(".");
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|