@redocly/openapi-docs 3.0.0-alpha.41 → 3.0.0-alpha.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/console.redocly-openapi-docs.min.js +53 -53
- package/dist/oauth2-redirect.js +1 -1
- package/dist/redocly-openapi-docs.min.js +761 -708
- package/lib/components/ApiInfo/ApiInfo.js +1 -1
- package/lib/components/ContentItems/ContentItems.js +1 -1
- package/lib/components/OperationItem/OperationItem.js +2 -2
- package/lib/components/PageFooter/PageFooter.d.ts +14 -0
- package/lib/components/PageFooter/PageFooter.js +2 -0
- package/lib/components/PageFooter/index.d.ts +1 -0
- package/lib/components/PageFooter/index.js +2 -0
- package/lib/components/Panel/MiddlePanelWrapper.d.ts +1 -0
- package/lib/components/Panel/{MiddleFooterWrapper.js → MiddlePanelWrapper.js} +2 -2
- package/lib/components/Panel/index.d.ts +1 -1
- package/lib/components/Panel/index.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/styled.js +2 -2
- package/lib/components/SectionContent/SectionContent.d.ts +2 -3
- package/lib/components/SectionContent/SectionContent.js +1 -1
- package/lib/components/TagItems/TagItems.d.ts +1 -2
- package/lib/components/TagItems/TagItems.js +1 -1
- package/lib/components/index.d.ts +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/rightPanel/CodemirrorInput/types.d.ts +1 -1
- package/lib/components/rightPanel/Console/Request.js +1 -1
- package/lib/components/rightPanel/utils.d.ts +1 -1
- package/lib/models/callback.d.ts +1 -2
- package/lib/models/mediaType.d.ts +1 -2
- package/lib/models/response.d.ts +1 -2
- package/lib/models/schema.d.ts +1 -2
- package/lib/services/types.d.ts +1 -0
- package/lib-esm/components/ApiInfo/ApiInfo.js +1 -1
- package/lib-esm/components/ContentItems/ContentItems.js +1 -1
- package/lib-esm/components/OperationItem/OperationItem.js +2 -2
- package/lib-esm/components/PageFooter/PageFooter.d.ts +14 -0
- package/lib-esm/components/PageFooter/PageFooter.js +2 -0
- package/lib-esm/components/PageFooter/index.d.ts +1 -0
- package/lib-esm/components/PageFooter/index.js +2 -0
- package/lib-esm/components/Panel/MiddlePanelWrapper.d.ts +1 -0
- package/lib-esm/components/Panel/{MiddleFooterWrapper.js → MiddlePanelWrapper.js} +2 -2
- package/lib-esm/components/Panel/index.d.ts +1 -1
- package/lib-esm/components/Panel/index.js +1 -1
- package/lib-esm/components/RedoclyOpenAPIDocs/styled.js +2 -2
- package/lib-esm/components/SectionContent/SectionContent.d.ts +2 -3
- package/lib-esm/components/SectionContent/SectionContent.js +1 -1
- package/lib-esm/components/TagItems/TagItems.d.ts +1 -2
- package/lib-esm/components/TagItems/TagItems.js +1 -1
- package/lib-esm/components/index.d.ts +1 -1
- package/lib-esm/components/index.js +1 -1
- package/lib-esm/components/rightPanel/CodemirrorInput/types.d.ts +1 -1
- package/lib-esm/components/rightPanel/Console/Request.js +1 -1
- package/lib-esm/components/rightPanel/utils.d.ts +1 -1
- package/lib-esm/models/callback.d.ts +1 -2
- package/lib-esm/models/mediaType.d.ts +1 -2
- package/lib-esm/models/response.d.ts +1 -2
- package/lib-esm/models/schema.d.ts +1 -2
- package/lib-esm/services/types.d.ts +1 -0
- package/package.json +2 -2
- package/lib/components/Panel/MiddleFooterWrapper.d.ts +0 -1
- package/lib-esm/components/Panel/MiddleFooterWrapper.d.ts +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React,{useMemo}from"react";import{
|
|
1
|
+
import React,{useMemo}from"react";import{OpenApiHeader}from"@redocly/theme";import{Pagination}from"../../services";import{ContentItem}from"../ContentItem";import{MiddlePanelWrapper}from"../Panel";import{PageFooter}from"../PageFooter";import{SectionContent}from"../SectionContent";export function TagItems({tag:e,nextSectionLink:t,pagination:n,showNextButton:o}){const a=useMemo((()=>{const e=React.createElement(PageFooter,{showNextButton:o,pagination:n,nextSectionLink:t});return e?React.createElement(MiddlePanelWrapper,null,e):null}),[t,n,o]),r=useMemo((()=>OpenApiHeader?React.createElement(MiddlePanelWrapper,null,React.createElement(OpenApiHeader,null)):null),[]);return React.createElement(React.Fragment,null,r,React.createElement(ContentItem,{key:e.id,item:e,withChildren:n!==Pagination.Item}),n===Pagination.Item&&React.createElement(SectionContent,{items:e.items||[],pagination:n,showNextButton:!1}),a)}
|
|
2
2
|
//# sourceMappingURL=TagItems.js.map
|
|
@@ -3,7 +3,7 @@ export * from './RedoclyOpenAPIDocs';
|
|
|
3
3
|
export * from './pluggable';
|
|
4
4
|
export * from './rightPanel/Console';
|
|
5
5
|
export { BackgroundStub, ApiContentWrap, BackgroundStubFix } from './RedoclyOpenAPIDocs/styled';
|
|
6
|
-
export {
|
|
6
|
+
export { MiddlePanelWrapper } from './Panel/MiddlePanelWrapper';
|
|
7
7
|
export * from './common';
|
|
8
8
|
export * from './ApiInfo';
|
|
9
9
|
export { SectionItem } from './SectionItem';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export*from"./NextSectionButton";export*from"./RedoclyOpenAPIDocs";export*from"./pluggable";export*from"./rightPanel/Console";export{BackgroundStub,ApiContentWrap,BackgroundStubFix}from"./RedoclyOpenAPIDocs/styled";export{
|
|
1
|
+
export*from"./NextSectionButton";export*from"./RedoclyOpenAPIDocs";export*from"./pluggable";export*from"./rightPanel/Console";export{BackgroundStub,ApiContentWrap,BackgroundStubFix}from"./RedoclyOpenAPIDocs/styled";export{MiddlePanelWrapper}from"./Panel/MiddlePanelWrapper";export*from"./common";export*from"./ApiInfo";export{SectionItem}from"./SectionItem";export{ContentItem}from"./ContentItem";export{ContentItems}from"./ContentItems";export{DiscriminatorDropdown}from"./DiscriminatorDropdown";export*from"./Schema/";export{OperationItem}from"./OperationItem";export*from"./Loading/Loading";export*from"./Markdown";export{OAuthFlow}from"./SecuritySchemes/OAuthFlow";export*from"./Responses";export*from"./ResponseSamples/ResponseSamples";export{PayloadSamples,ExampleValue,Example,DropdownWrapper}from"./PayloadSamples";export*from"./MediaTypeSwitch";export*from"./Parameters";export*from"./DropdownOrLabel";export*from"./ErrorBoundary";export*from"./SideMenu/";export*from"./StickySidebar/StickyResponsiveSidebar";export*from"./SchemaDefinition/SchemaDefinition";export*from"./SourceCodeWithFile/SourceCodeWithFile";export*from"./RequestSamples/RequestSamples";export{ShelfIcon,LockIcon,CrossIcon}from"./icons";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Controlled as CodeMirror } from 'react-codemirror2-react-17';
|
|
2
2
|
import type { FieldApi, FieldState } from 'informed';
|
|
3
3
|
import type { LegacyRef } from 'react';
|
|
4
|
-
import type { OpenAPISchema, Referenced } from '
|
|
4
|
+
import type { OpenAPISchema, Referenced } from '../../../types';
|
|
5
5
|
export interface CodemirrorInputBase {
|
|
6
6
|
forwardedRef?: LegacyRef<CodeMirror>;
|
|
7
7
|
mode?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React,{memo}from"react";import{Form,useField}from"informed";import{useRecoilValue}from"recoil";import{requiredValidator}from"../utils";import{JsonPointer}from"../../../utils";import{OAuth2}from"../../../services/OAuth2";import{l}from"../../../services";import{Accordion}from"../../Panel";import{ServersDropdown}from"../ServersDropdown";import{TryItPanel}from"../TryItPanel";import{RequestBody}from"../RequestBody";import{
|
|
1
|
+
import React,{memo}from"react";import{Form,useField}from"informed";import{useRecoilValue}from"recoil";import{OpenApiTryItSecurityPanel}from"@redocly/theme";import{requiredValidator}from"../utils";import{JsonPointer}from"../../../utils";import{OAuth2}from"../../../services/OAuth2";import{l}from"../../../services";import{Accordion}from"../../Panel";import{ServersDropdown}from"../ServersDropdown";import{TryItPanel}from"../TryItPanel";import{RequestBody}from"../RequestBody";import{OperationParameters}from"../../OperationParameters";import{AuthPanel}from"../AuthPanel";import{globalOptionsSelector}from"../../../recoil/store";import{RenderHook}from"../../RenderHook";function RequestComponent({operation:e,properties:r,securityDefaults:t,form:o,resolvedRawSpec:a,server:n,formApi:i,setFormApi:s,handleChange:u,handleServerChange:c}){const m=o.errors||{},d=m.path||m.cookie||m.header||m.query,{hooks:p,authCorsProxyUrl:h}=useRecoilValue(globalOptionsSelector),y=a&&JsonPointer.get(a,e.pointer);let v=o.values&&o.values.auth&&Object.keys(o.values.auth)[0];v&&o.values.auth[v]||(v=void 0),!v||void 0===o.values.auth[v].token&&void 0===o.values.auth[v].client_id&&void 0===o.values.auth[v].client_secret||o.values.auth[v].token&&o.values.auth[v].token.access_token||(v=void 0),v&&null!=o.values.auth[v].username&&(o.values.auth[v].username&&o.values.auth[v].password||(v=void 0));const f=e.parameters||[];return!a&&React.createElement(React.Fragment,null,"Loading...")||React.createElement(Form,{onChange:u,getApi:s,style:{flex:1,display:"flex",flexDirection:"column",margin:0}},React.createElement(ServersDropdown,{operation:e,onChange:c}),React.createElement(Accordion,{initialActiveIdx:e.security.length&&v?1:0},e.security.length&&i&&React.createElement(TryItPanel,{header:l("tryItAuth"),"data-cy":"security-trigger",error:!v&&!!m.auth,success:!!v,renderChildrenHidden:!0},React.createElement((({formApi:r})=>!0===Boolean(OpenApiTryItSecurityPanel||(null==p?void 0:p.ReplaceTryItSecurityPanel))?React.createElement(AuthPanelWrapper,{field:"auth",validate:requiredValidator},(r=>React.createElement(RenderHook,{Hook:OpenApiTryItSecurityPanel||(null==p?void 0:p.ReplaceTryItSecurityPanel),props:{server:n,operation:e,onChange:r,OAuth2:OAuth2}}))):React.createElement(AuthPanel,{formApi:r,form:o,operation:e,activeServer:n.url,authCorsProxyUrl:h,securityDefaults:t})),{formApi:i}))||null,e.requestBody&&i&&React.createElement(TryItPanel,{header:l("tryItBody"),"data-cy":"body-trigger",error:!!m.body,renderChildrenHidden:!0},React.createElement(RequestBody,{validate:allowBodyErrors,formApi:i,body:e.requestBody,pointer:e.pointer,id:e.id,resolvedBody:null==y?void 0:y.requestBody,properties:r}))||null,f.length&&React.createElement(TryItPanel,{header:l("tryItParameters"),"data-cy":"parameters-trigger",error:d,renderChildrenHidden:!0},React.createElement(OperationParameters,{operation:e,values:o.values,errors:o.errors||{}}))||null))}function AuthPanelWrapper(e){const{fieldApi:r,render:t,userProps:o}=useField(Object.assign({},e)),{setValue:a}=r,{children:n}=o;return t(React.createElement(React.Fragment,null,n(a)))}function allowBodyErrors(){}export const Request=memo(RequestComponent);
|
|
2
2
|
//# sourceMappingURL=Request.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { OpenAPIServer, Server, ServerVariables } from '../../types';
|
|
2
2
|
import type { FieldModel, ExtendedOpenAPISecurityScheme, OperationModel, ExampleModel } from '../../models';
|
|
3
3
|
import type { RequestBodyProps } from './RequestBody';
|
|
4
|
-
import type { Options } from '
|
|
4
|
+
import type { Options } from '../../services';
|
|
5
5
|
export declare function normalizeUrlProtocol(url: string): string;
|
|
6
6
|
export declare function updateStorage(state: GenericObject): void;
|
|
7
7
|
export declare const getParameters: (parameters: FieldModel[], type: string) => GenericObject;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { Options } from '
|
|
2
|
-
import type { OpenAPIParser } from 'src/services/OpenAPIParser';
|
|
1
|
+
import type { Options, OpenAPIParser } from '../services';
|
|
3
2
|
import type { OpenAPICallback, Referenced } from '../types';
|
|
4
3
|
import type { CallbackModel, GroupModel } from './types';
|
|
5
4
|
export declare function getCallback(parser: OpenAPIParser, name: string, infoOrRef: Referenced<OpenAPICallback>, parentPointer: string, options: Options, href: string, parent?: GroupModel): CallbackModel;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { OpenAPIMediaType } from '../types';
|
|
2
|
-
import type { OpenAPIParser } from '../services';
|
|
3
|
-
import type { Options } from 'src/services/Options/types';
|
|
2
|
+
import type { OpenAPIParser, Options } from '../services';
|
|
4
3
|
import type { MediaTypeModel, ResponseModel, OperationModel } from './types';
|
|
5
4
|
/**
|
|
6
5
|
* @param parser
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { OpenAPIResponse, Referenced } from '../types';
|
|
2
|
-
import type { OpenAPIParser } from '../services';
|
|
3
|
-
import type { Options } from 'src/services/Options';
|
|
2
|
+
import type { OpenAPIParser, Options } from '../services';
|
|
4
3
|
import type { ResponseModel, OperationModel } from './types';
|
|
5
4
|
type ResponseProps = {
|
|
6
5
|
parser: OpenAPIParser;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { OpenAPISchema, Referenced } from '../types';
|
|
2
|
-
import type { OpenAPIParser } from '../services';
|
|
2
|
+
import type { OpenAPIParser, Options } from '../services';
|
|
3
3
|
import type { Deps, SchemaModel } from './types';
|
|
4
|
-
import type { Options } from 'src/services/Options';
|
|
5
4
|
export declare function getSchema({ parser, schemaOrRef, pointer, options, isChild, baseRefsStack, deps, absolutePointer, }: {
|
|
6
5
|
parser: OpenAPIParser;
|
|
7
6
|
schemaOrRef: Referenced<OpenAPISchema>;
|
|
@@ -134,6 +134,7 @@ export interface HooksConfig {
|
|
|
134
134
|
}) => string;
|
|
135
135
|
sanitize?: (raw: string) => string;
|
|
136
136
|
MiddlePanelFooter?: HookConfig<undefined>;
|
|
137
|
+
MiddlePanelHeader?: HookConfig<undefined>;
|
|
137
138
|
/** @deprecated Use ReplaceTryItSecurityPanel instead */
|
|
138
139
|
ReplaceTryItAuthPanel?: HookConfig<SecurityPanelHookProps>;
|
|
139
140
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.42",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"webpack-dev-server": "^4.9.3",
|
|
120
120
|
"workerize-loader": "github:redocly/workerize-loader#webpack-5-dist",
|
|
121
121
|
"js-yaml": "4.1.0",
|
|
122
|
-
"@redocly/theme": "0.
|
|
122
|
+
"@redocly/theme": "0.15.0"
|
|
123
123
|
},
|
|
124
124
|
"scripts": {
|
|
125
125
|
"start": "webpack serve --mode=development --hot",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const MiddleFooterWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const MiddleFooterWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|