@redocly/openapi-docs 3.0.0-alpha.57.patch.1 → 3.0.0-alpha.58
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 +217 -158
- package/dist/oauth2-redirect.js +1 -1
- package/dist/redocly-openapi-docs.min.js +4937 -5807
- package/lib/components/Callbacks/CallbackSummary.js +1 -1
- package/lib/components/Download/DownloadButtonWithLabel.js +14 -6
- package/lib/components/DropdownOrLabel/DropdownOrLabel.js +3 -3
- package/lib/components/Endpoint/Summary.js +1 -1
- package/lib/components/Endpoint/styled.js +4 -4
- package/lib/components/Fields/FieldDetails.js +1 -1
- package/lib/components/NextSectionButton/NextSectionButton.js +1 -1
- package/lib/components/Panel/CodeHeader.js +2 -5
- package/lib/components/Panel/CodePanel.js +5 -1
- package/lib/components/Parameters/ParametersGroup.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/styled.js +2 -2
- package/lib/components/Search/styled.js +1 -3
- package/lib/components/SecurityRequirement/RequirementElement.js +1 -1
- package/lib/components/SecurityRequirement/SecurityRequirement.js +1 -1
- package/lib/components/SideMenu/MenuItem.js +1 -1
- package/lib/components/SideMenu/MenuOperationItemContent.js +1 -1
- package/lib/components/SourceCodeWithFile/SourceCodeWithFile.js +1 -1
- package/lib/components/StickySidebar/StickyResponsiveSidebar.js +2 -2
- package/lib/components/Tabs/CollapsingTabs/CollapsingTabList.js +2 -10
- package/lib/components/Tabs/Tab.js +12 -8
- package/lib/components/common/CheckboxList.js +3 -3
- package/lib/components/common/Dropdown/Dropdown.js +3 -3
- package/lib/components/common/Dropdown/styled.js +23 -11
- package/lib/components/common/Dropdown/types.d.ts +1 -0
- package/lib/components/common/Fields/fields-layout.js +3 -3
- package/lib/components/common/Fields/fields.d.ts +0 -1
- package/lib/components/common/Fields/fields.js +7 -11
- package/lib/components/common/form.js +4 -4
- package/lib/components/common/headers.js +1 -1
- package/lib/components/common/panels.js +1 -1
- package/lib/components/icons/LinkIcon.js +1 -1
- package/lib/components/pluggable/styled.components.js +0 -1
- package/lib/components/rightPanel/ActionPanel.js +1 -1
- package/lib/components/rightPanel/CodemirrorInput/styled.js +10 -14
- package/lib/components/rightPanel/ConsoleTabs/styled.js +16 -6
- package/lib/components/rightPanel/OAuth2Flow/OAuth2Flow.js +1 -1
- package/lib/components/rightPanel/ParameterArray.js +1 -1
- package/lib/components/rightPanel/ResponsePanel.js +1 -1
- package/lib/components/rightPanel/TryItPanel.js +3 -3
- package/lib/components/rightPanel/styled.d.ts +1 -0
- package/lib/components/rightPanel/styled.js +26 -6
- package/lib/components/shared/HttpVerb.d.ts +6 -2
- package/lib/components/shared/HttpVerb.js +3 -2
- package/lib/components/shared/MimeLabel.js +5 -4
- package/lib/components/shared/NoSampleLabel.js +1 -1
- package/lib/services/OAuth2.js +1 -1
- package/lib/services/code-samples/generator.js +1 -1
- package/lib/services/code-samples/httpsnippet/index.js +1 -1
- package/lib/services/history/helpers.js +1 -1
- package/lib-esm/components/Callbacks/CallbackSummary.js +1 -1
- package/lib-esm/components/Download/DownloadButtonWithLabel.js +14 -6
- package/lib-esm/components/DropdownOrLabel/DropdownOrLabel.js +1 -1
- package/lib-esm/components/Endpoint/Summary.js +1 -1
- package/lib-esm/components/Endpoint/styled.js +4 -4
- package/lib-esm/components/Fields/FieldDetails.js +1 -1
- package/lib-esm/components/NextSectionButton/NextSectionButton.js +1 -1
- package/lib-esm/components/Panel/CodeHeader.js +2 -5
- package/lib-esm/components/Panel/CodePanel.js +5 -1
- package/lib-esm/components/Parameters/ParametersGroup.js +1 -1
- package/lib-esm/components/RedoclyOpenAPIDocs/styled.js +2 -2
- package/lib-esm/components/Search/styled.js +1 -3
- package/lib-esm/components/SecurityRequirement/RequirementElement.js +1 -1
- package/lib-esm/components/SecurityRequirement/SecurityRequirement.js +1 -1
- package/lib-esm/components/SideMenu/MenuItem.js +1 -1
- package/lib-esm/components/SideMenu/MenuOperationItemContent.js +2 -2
- package/lib-esm/components/SourceCodeWithFile/SourceCodeWithFile.js +1 -1
- package/lib-esm/components/StickySidebar/StickyResponsiveSidebar.js +3 -3
- package/lib-esm/components/Tabs/CollapsingTabs/CollapsingTabList.js +1 -9
- package/lib-esm/components/Tabs/Tab.js +11 -7
- package/lib-esm/components/common/CheckboxList.js +3 -3
- package/lib-esm/components/common/Dropdown/Dropdown.js +2 -2
- package/lib-esm/components/common/Dropdown/styled.js +22 -10
- package/lib-esm/components/common/Dropdown/types.d.ts +1 -0
- package/lib-esm/components/common/Fields/fields-layout.js +2 -2
- package/lib-esm/components/common/Fields/fields.d.ts +0 -1
- package/lib-esm/components/common/Fields/fields.js +4 -8
- package/lib-esm/components/common/form.js +4 -4
- package/lib-esm/components/common/headers.js +1 -1
- package/lib-esm/components/common/panels.js +1 -1
- package/lib-esm/components/icons/LinkIcon.js +1 -1
- package/lib-esm/components/pluggable/styled.components.js +0 -1
- package/lib-esm/components/rightPanel/ActionPanel.js +1 -1
- package/lib-esm/components/rightPanel/CodemirrorInput/styled.js +10 -14
- package/lib-esm/components/rightPanel/ConsoleTabs/styled.js +15 -5
- package/lib-esm/components/rightPanel/OAuth2Flow/OAuth2Flow.js +1 -1
- package/lib-esm/components/rightPanel/ParameterArray.js +1 -1
- package/lib-esm/components/rightPanel/ResponsePanel.js +2 -2
- package/lib-esm/components/rightPanel/TryItPanel.js +3 -3
- package/lib-esm/components/rightPanel/styled.d.ts +1 -0
- package/lib-esm/components/rightPanel/styled.js +22 -2
- package/lib-esm/components/shared/HttpVerb.d.ts +6 -2
- package/lib-esm/components/shared/HttpVerb.js +3 -2
- package/lib-esm/components/shared/MimeLabel.js +4 -3
- package/lib-esm/components/shared/NoSampleLabel.js +1 -1
- package/lib-esm/services/OAuth2.js +1 -1
- package/lib-esm/services/code-samples/generator.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/index.js +1 -1
- package/lib-esm/services/history/helpers.js +1 -1
- package/package.json +5 -6
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import React,{useState,useEffect,memo}from"react";import{useRecoilValue}from"recoil";import styled from"styled-components";import{baseButtonStyles}from"@redocly/theme";import{l}from"../../services";import{useDownloadInfo}from"./useDownloadInfo";import{globalStoreSelector}from"../../recoil/store";function DownloadButtonWithLabelComponent({wrapped:o}){const{options:
|
|
1
|
+
import React,{useState,useEffect,memo}from"react";import{useRecoilValue}from"recoil";import styled from"styled-components";import{baseButtonStyles}from"@redocly/theme";import{l}from"../../services";import{useDownloadInfo}from"./useDownloadInfo";import{globalStoreSelector}from"../../recoil/store";function DownloadButtonWithLabelComponent({wrapped:o}){const{options:e,parser:t}=useRecoilValue(globalStoreSelector),{definition:n,definitionUrl:r}=t,{downloadDefinitionUrl:a}=e,[i,c]=useState(a),{downloadFileName:d,getDownloadLink:s}=useDownloadInfo({definition:n,definitionUrl:r});useEffect((()=>{a||c(s())}),[a,s]);return React.createElement(DownloadWrapper,{wrapped:o},l("downloadSpecification"),":",React.createElement(DownloadButton,{download:d||!0,target:"_blank",href:i,onClick:({target:o})=>{o.href||(o.href=i)}},l("download")))}export const DownloadButtonWithLabel=memo(DownloadButtonWithLabelComponent);const DownloadButton=styled.a.attrs({className:"download-specification-button button-color-secondary"})`
|
|
2
2
|
${baseButtonStyles};
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
|
|
4
|
+
color: var(--button-color);
|
|
5
|
+
background-color: var(--button-background-color);
|
|
6
|
+
&:hover {
|
|
7
|
+
background-color: var(--button-hover-background-color);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&:active {
|
|
11
|
+
background-color: var(--button-active-background-color);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
margin-left: 0.5em;
|
|
6
15
|
text-decoration: none;
|
|
16
|
+
vertical-align: middle;
|
|
7
17
|
`,DownloadWrapper=styled.p`
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: center;
|
|
10
18
|
align-self: flex-start;
|
|
11
19
|
padding-left: ${({wrapped:o})=>o?0:"var(--spacing-horizontal)"};
|
|
12
20
|
`;
|
|
@@ -3,6 +3,6 @@ var __rest=this&&this.__rest||function(e,t){var o={};for(var r in e)Object.proto
|
|
|
3
3
|
font-size: 14px;
|
|
4
4
|
text-transform: none;
|
|
5
5
|
font-weight: 400;
|
|
6
|
-
color: var(--text-
|
|
6
|
+
color: var(--text-color);
|
|
7
7
|
`;export function DropdownOrLabel(e){var{Label:t=MimeLabel,Dropdown:o=SimpleDropdown}=e,r=__rest(e,["Label","Dropdown"]);return 1===r.options.length?React.createElement(t,null,r.options[0].value):React.createElement(o,Object.assign({},r))}
|
|
8
8
|
//# sourceMappingURL=DropdownOrLabel.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from"react";import{PanelHeader,
|
|
1
|
+
import React from"react";import{PanelHeader,ShelfIcon}from"@redocly/theme";import{HttpVerb}from"../shared";import{Path,PathWrapper,TryItButton}from"./styled";export const Summary=({operation:e,expanded:t=!1,toggle:r,onToggleConsole:o,tryItOverride:l,showConsole:a})=>{const n=(null==l?void 0:l.label)||"Try it",c=(null==l?void 0:l.link)?TryItButton.withComponent("a"):TryItButton;return React.createElement(PanelHeader,{onClick:r,expanded:t},React.createElement(PathWrapper,null,React.createElement(HttpVerb,{type:e.httpVerb},e.httpVerb),React.createElement(Path,null,e.path),React.createElement(ShelfIcon,{direction:t?"down":"right"})),!e.isWebhook&&!e.isCallback&&a&&React.createElement(c,{color:"primary",onClick:l?e=>{var t;null===(t=null==l?void 0:l.onClick)||void 0===t||t.call(l),e.stopPropagation()}:o,"data-cy":"try-it",href:null==l?void 0:l.link},n)||null)};
|
|
2
2
|
//# sourceMappingURL=Summary.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import styled from"styled-components";import{Button}from"@redocly/theme";import{
|
|
1
|
+
import styled from"styled-components";import{Button}from"@redocly/theme";import{invertedInputStyles}from"../rightPanel/styled";export const DescriptionWrapper=styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
margin-bottom: 10px;
|
|
5
5
|
`;export const Path=styled.span`
|
|
6
6
|
margin: 0 4px;
|
|
7
|
-
color: var(--text-
|
|
7
|
+
color: var(--text-color-inverse);
|
|
8
8
|
overflow-x: hidden;
|
|
9
9
|
text-overflow: ellipsis;
|
|
10
10
|
white-space: ${({wrap:t})=>t?"normal":"nowrap"};
|
|
@@ -20,8 +20,8 @@ import styled from"styled-components";import{Button}from"@redocly/theme";import{
|
|
|
20
20
|
`;export const ServerItem=styled.div`
|
|
21
21
|
padding: 5px 0;
|
|
22
22
|
`;export const ServerUrl=styled.div`
|
|
23
|
-
${
|
|
24
|
-
border-radius: 0 0 var(--border-radius
|
|
23
|
+
${invertedInputStyles};
|
|
24
|
+
border-radius: 0 0 var(--border-radius) var(--border-radius);
|
|
25
25
|
padding: 7px 12px;
|
|
26
26
|
overflow-wrap: break-word;
|
|
27
27
|
`;export const TryItButton=styled(Button)`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React,{memo,useState}from"react";import{useRecoilValue}from"recoil";import{PatternLabel,RecursiveLabel,TypeFormat,TypeName,TypePrefix,TypeTitle,ToggleButton,
|
|
1
|
+
import React,{memo,useState}from"react";import{useRecoilValue}from"recoil";import{PatternLabel,RecursiveLabel,TypeFormat,TypeName,TypePrefix,TypeTitle,ToggleButton,Badge}from"../common";import{ExternalDocumentation}from"../ExternalDocumentation";import{Markdown}from"../Markdown";import{l}from"../../services";import{FieldDetail}from"./FieldDetail";import{ConstraintsView}from"./ConstraintsView";import{Extensions}from"./Extensions";import{EnumValues}from"./EnumValues";import{Examples,getSerializedValue}from"./Examples";import{TypeWrapper,FieldDescriptionWrapper}from"./styled";import{globalOptionsSelector}from"../../recoil/store";const MAX_PATTERN_LENGTH=45;function FieldDetailsComponent({showExamples:e,field:t,renderDiscriminatorSwitch:a}){const[n,r]=useState(!1),{enumSkipQuotes:i,hideSchemaTitles:o,hideSchemaPattern:c}=useRecoilValue(globalOptionsSelector),{schema:m,description:s,example:p,deprecated:u,examples:d}=t,E=Boolean(i)||"header"===t.in;let R=null;if(e&&(void 0!==p||void 0!==d))if(void 0!==d)R=React.createElement(Examples,{field:t});else{const e=!!t.in;R=React.createElement(FieldDetail,{label:"example",value:getSerializedValue(t,t.example),raw:e})}return React.createElement("div",null,React.createElement(TypeWrapper,null,React.createElement(TypePrefix,null,m.typePrefix),React.createElement(TypeName,null,m.displayType),m.displayFormat&&React.createElement(TypeFormat,null," ","<",m.displayFormat,">"," "),m.contentEncoding&&React.createElement(TypeFormat,null," ","<",m.contentEncoding,">"," "),m.contentMediaType&&React.createElement(TypeFormat,null," ","<",m.contentMediaType,">"," "),m.title&&!o&&React.createElement(TypeTitle,null," (",m.title,") "),React.createElement(ConstraintsView,{constraints:m.constraints}),m.pattern&&!c&&React.createElement(React.Fragment,null,React.createElement(PatternLabel,null,n||m.pattern.length<MAX_PATTERN_LENGTH?m.pattern:`${m.pattern.substr(0,MAX_PATTERN_LENGTH)}...`),m.pattern.length>MAX_PATTERN_LENGTH&&React.createElement(ToggleButton,{onClick:()=>{r(!n)}},n?"Hide pattern":"Show pattern"))," ",m.isCircular&&React.createElement(RecursiveLabel,null,l("recursive"))),u&&React.createElement("div",null,React.createElement(Badge,{deprecated:!0,style:{marginLeft:0}}," ",l("deprecated")," ")),React.createElement(FieldDetail,{raw:E,label:"default",value:m.default}),React.createElement(FieldDescriptionWrapper,null,React.createElement(Markdown,{source:s})),!a&&React.createElement(EnumValues,{type:m.type,values:m["x-enumDescriptions"]||m.enum})," ",R,React.createElement(Extensions,{extensions:Object.assign(Object.assign({},t.extensions),m.extensions)}),m.externalDocs&&React.createElement(ExternalDocumentation,{externalDocs:m.externalDocs,compact:!0}),null==a?void 0:a(),t.const&&React.createElement(FieldDetail,{label:"const",value:t.const})||null)}export const FieldDetails=memo(FieldDetailsComponent);
|
|
2
2
|
//# sourceMappingURL=FieldDetails.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Button}from"@redocly/theme";import React from"react";import{Link}from"../common";export function NextSectionButton({pagination:t,href:e,label:
|
|
1
|
+
import{Button}from"@redocly/theme";import React from"react";import{Link}from"../common";export function NextSectionButton({pagination:t,href:e,label:o}){return t&&"none"!==t?React.createElement(Link,{to:e},React.createElement(Button,{extraClass:"next-section-button",color:"secondary"},"➔ Next to ",React.createElement("strong",null,o))):null}
|
|
2
2
|
//# sourceMappingURL=NextSectionButton.js.map
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import styled from"styled-components";import{PanelHeader}from"@redocly/theme";export const CodeHeader=styled(PanelHeader)`
|
|
2
2
|
cursor: default;
|
|
3
|
-
border-bottom-right-radius: 0;
|
|
4
|
-
border-bottom-left-radius: 0;
|
|
3
|
+
border-bottom-right-radius: 0 !important;
|
|
4
|
+
border-bottom-left-radius: 0 !important;
|
|
5
5
|
min-height: 50px;
|
|
6
6
|
--panel-heading-background-color: var(--panel-samples-heading-background-color);
|
|
7
7
|
--panel-heading-padding-local: var(--panel-samples-heading-padding);
|
|
8
8
|
--panel-heading-text-color: var(--panel-samples-heading-text-color);
|
|
9
9
|
`;export const StyledCodeHeader=styled(CodeHeader)`
|
|
10
|
-
--panel-heading-font-size-local: var(--panel-heading-font-size);
|
|
11
|
-
--panel-heading-white-space-local: var(--panel-heading-white-space);
|
|
12
|
-
--panel-heading-line-height-local: var(--panel-heading-line-height);
|
|
13
10
|
--panel-heading-padding-local: 10px 20px;
|
|
14
11
|
`;
|
|
15
12
|
//# sourceMappingURL=CodeHeader.js.map
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import styled from"styled-components";import{Panel}from"@redocly/theme";export const CodePanel=styled(Panel)
|
|
1
|
+
import styled from"styled-components";import{Panel,PanelHeader}from"@redocly/theme";export const CodePanel=styled(Panel)`
|
|
2
|
+
> ${PanelHeader} {
|
|
3
|
+
min-height: 50px;
|
|
4
|
+
}
|
|
5
|
+
`;
|
|
2
6
|
//# sourceMappingURL=CodePanel.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React,{memo}from"react";import styled from"styled-components";import{FieldsGroupHeader,PropertiesTable}from"../../components";import{Field}from"../Fields";import{mapWithLast}from"../../utils";function ParametersGroupComponent({place:e,parameters:t}){return t&&t.length?React.createElement(Wrap,{key:e},React.createElement(FieldsGroupHeader,null,e," Parameters"),React.createElement(PropertiesTable,null,React.createElement("tbody",null,mapWithLast(t,((e,t)=>React.createElement(Field,{key:e.name,isLast:t,field:e,showExamples:!0})))))):null}export const ParametersGroup=memo(ParametersGroupComponent);export const Wrap=styled.div`
|
|
2
2
|
margin: 20px 0 0 0;
|
|
3
3
|
padding-bottom: 20px;
|
|
4
|
-
border-bottom: 1px solid var(--border-
|
|
4
|
+
border-bottom: 1px solid var(--border-color);
|
|
5
5
|
|
|
6
6
|
&:first-child {
|
|
7
7
|
margin: 0;
|
|
@@ -10,7 +10,7 @@ import{LayoutVariant}from"@redocly/theme";import styled,{createGlobalStyle,css}f
|
|
|
10
10
|
font-size: var(--font-size-base);
|
|
11
11
|
line-height: var(--line-height-base);
|
|
12
12
|
font-weight: var(--font-weight-regular);
|
|
13
|
-
color: var(--text-
|
|
13
|
+
color: var(--text-color);
|
|
14
14
|
-webkit-font-text-smoothing: var(--text-smoothing);
|
|
15
15
|
|
|
16
16
|
* {
|
|
@@ -70,7 +70,7 @@ import{LayoutVariant}from"@redocly/theme";import styled,{createGlobalStyle,css}f
|
|
|
70
70
|
(
|
|
71
71
|
100% - min(100% - var(--sidebar-width) - var(--layout-controls-width), var(${a})) -
|
|
72
72
|
var(--sidebar-width) + var(--layout-controls-width)
|
|
73
|
-
) / 2
|
|
73
|
+
) / 2 + 2px /* 2px to account for rounding errors */
|
|
74
74
|
);
|
|
75
75
|
`;export const BackgroundStubFix=styled.div`
|
|
76
76
|
position: absolute;
|
|
@@ -2,7 +2,7 @@ import React from"react";import styled from"styled-components";export const Cros
|
|
|
2
2
|
cursor: pointer;
|
|
3
3
|
position: absolute;
|
|
4
4
|
right: 15px;
|
|
5
|
-
color: var(--text-
|
|
5
|
+
color: var(--text-color);
|
|
6
6
|
`;export const ButtonClear=styled.i.attrs((()=>({className:"button-clear"})))`
|
|
7
7
|
cursor: pointer;
|
|
8
8
|
position: absolute;
|
|
@@ -97,10 +97,8 @@ import React from"react";import styled from"styled-components";export const Cros
|
|
|
97
97
|
background-color: var(--search-modal-clear-button-background-color);
|
|
98
98
|
padding: 4px 16px;
|
|
99
99
|
border-radius: var(--border-radius);
|
|
100
|
-
border: var(--search-modal-clear-button-border);
|
|
101
100
|
&:hover {
|
|
102
101
|
background-color: var(--search-modal-clear-button-hover-background-color);
|
|
103
|
-
border: var(--search-modal-clear-button-hover-border);
|
|
104
102
|
}
|
|
105
103
|
}
|
|
106
104
|
`;export const TextContainer=styled.div`
|
|
@@ -12,7 +12,7 @@ import React from"react";import styled from"styled-components";import{linksCss}f
|
|
|
12
12
|
`,SecurityRequirementOrWrap=styled.span`
|
|
13
13
|
${linksCss};
|
|
14
14
|
`,ScopeName=styled.code`
|
|
15
|
-
border: 1px solid var(--border-
|
|
15
|
+
border: 1px solid var(--border-color);
|
|
16
16
|
margin: 0 3px;
|
|
17
17
|
padding: 0.2em;
|
|
18
18
|
line-height: 1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React,{Fragment,memo,useState}from"react";import styled from"styled-components";import{useRecoilValue}from"recoil";import{MarkdownWrapper}from"@redocly/theme";import{Markdown}from"../Markdown";import{OAuthFlow}from"../SecuritySchemes";import{PanelDescription}from"./PanelDescription";import{RequirementElement}from"./RequirementElement";import{RequiredScopesRow}from"./RequiredScopesRow";import{LockIcon}from"../icons";import{Row}from"./styled";import{AUTH_TYPES}from"./constants";import{l}from"../../services";import{titleize}from"../../utils";import{ContentPanel}from"../Panel";import{globalStoreSelector}from"../../recoil/store";import{useSecurityRequirements}from"./useSecurityRequirements";function getRequiredScopes(e,t){const r=[];let o=t.length;for(;o--;){const n=t[o];let c=n.schemes.length;for(;c--;){const t=n.schemes[c];t.id===e&&r.push(...t.scopes)}}return Array.from(new Set(r))}function SecurityRequirementsComponent({securities:e}){const[t,r]=useState(!1),{options:{showSecuritySchemeType:o,hideSecuritySection:n},parser:c}=useRecoilValue(globalStoreSelector),a=useSecurityRequirements({parser:c,securities:e});return!e.length||n?null:React.createElement(ContentPanel,{className:"panel-security-schemas",header:l("authorizations"),onToggle:e=>r(e),description:!t&&React.createElement(PanelDescription,{securities:e,showSecuritySchemeType:o}),expanded:t},t&&a&&a.length>1?React.createElement(SecurityRequirementBlock,null,e.map(((t,r)=>{let n,c,a="";return e.length>1&&t.schemes.length>1&&(c=0===r?"(":"",a=")"),r!==e.length-1&&(a+=" or",n=React.createElement("br",null)),React.createElement(Fragment,{key:t.schemes.map((({id:e})=>e)).join("")},c,React.createElement(RequirementElement,{security:t,showSecuritySchemeType:o}),a,n)}))):null,t?a.map((t=>{const r=getRequiredScopes(t.id,e);return React.createElement(SecurityDetails,{key:t.id},React.createElement("h5",null,React.createElement(LockIcon,{size:"11px",style:{verticalAlign:"baseline"},color:"--panel-body-text-color"})," ",AUTH_TYPES[t.type]||t.type,": ",t.id),React.createElement(Markdown,{source:t.description||""}),React.createElement(MarkdownWrapper,{key:t.id},t.apiKey?React.createElement(React.Fragment,null,React.createElement(Row,null,React.createElement("b",null,titleize(t.apiKey.in||"")," parameter name: "),React.createElement("code",null,t.apiKey.name)),React.createElement(RequiredScopesRow,{scopes:r})):t.http?React.createElement(React.Fragment,null,React.createElement(Row,null,React.createElement("b",null,"HTTP Authorization Scheme: "),React.createElement("code",null,t.http.scheme)),React.createElement(Row,null,"bearer"===t.http.scheme&&t.http.bearerFormat&&React.createElement(React.Fragment,null,React.createElement("b",null,"Bearer format: "),React.createElement("code",null,t.http.bearerFormat))),React.createElement(RequiredScopesRow,{scopes:r})):t.openId?React.createElement(React.Fragment,null,React.createElement(Row,null,React.createElement("b",null,"Connect URL: "),React.createElement("code",null,React.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:t.openId.connectUrl},t.openId.connectUrl))),React.createElement(RequiredScopesRow,{scopes:r})):t.flows?Object.keys(t.flows).map((e=>React.createElement(OAuthFlow,{key:e,type:e,flow:t.flows[e]},React.createElement(RequiredScopesRow,{scopes:r})))):null))})):null)}export const SecurityRequirements=memo(SecurityRequirementsComponent);const SecurityDetails=styled.div`
|
|
2
|
-
border-bottom: 1px solid var(--border-
|
|
2
|
+
border-bottom: 1px solid var(--border-color);
|
|
3
3
|
margin-bottom: 1.5em;
|
|
4
4
|
padding-bottom: 0.7em;
|
|
5
5
|
&:last-child {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React,{memo,useCallback}from"react";import{
|
|
1
|
+
import React,{memo,useCallback}from"react";import{Badge}from"@redocly/theme";import{Pagination}from"../../services";import{MenuItemLi,MenuItemTitle}from"./styled";import{MenuItems}from"./MenuItems";import{MenuItemLink}from"./MenuItemLink";import{MenuOperationItemContent}from"./MenuOperationItemContent";import{ShelfIcon}from"../icons";import{encodeBackSlashes}from"../../utils";import{useMenuItemExpanded}from"./hooks";function MenuItemComponent({item:e,children:t,onClick:n,pagination:m}){var i;const[o,a]=useMenuItemExpanded(e),r=getLink(e,m),c=useCallback((()=>{r&&e.hasActiveSubItem||a(!o)}),[r,e.hasActiveSubItem,a,o]),l=(null===(i=e.items)||void 0===i?void 0:i.length)>0;return React.createElement(MenuItemLi,{depth:e.depth,"data-item-id":e.id,onClick:n},"operation"===e.type?React.createElement(MenuOperationItemContent,{item:e,to:r,active:e.active},t):React.createElement(MenuItemLink,{to:r,depth:e.depth,type:e.type,hasChildren:l,active:e.active,onClick:c},e.depth>0&&l&&React.createElement(ShelfIcon,{direction:o?"down":"right"})||null,e.isSchema?React.createElement(Badge,{type:"schema"},"schema"):null,React.createElement(MenuItemTitle,{title:e.name},e.name,t)),l&&React.createElement(MenuItems,{expanded:o,items:e.items}))}export const MenuItem=memo(MenuItemComponent);export function getLink(e,t){return"tag"!==e.type||e.description||t!==Pagination.Item?encodeBackSlashes(e.href):""}
|
|
2
2
|
//# sourceMappingURL=MenuItem.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React,{memo}from"react";import{
|
|
1
|
+
import React,{memo}from"react";import{Badge}from"@redocly/theme";import styled from"styled-components";import{useRecoilValue}from"recoil";import{MenuItemPath,MenuItemTitle}from"./styled";import{MenuItemLink}from"./MenuItemLink";import{SideNavStyle,l}from"../../services";import{shortenHTTPVerb}from"../../utils";import{globalOptionsSelector}from"../../recoil/store";const MenuItemOperationLink=styled(MenuItemLink)`
|
|
2
2
|
flex-wrap: wrap;
|
|
3
3
|
`,MenuItemDescription=styled.small`
|
|
4
4
|
display: block;
|
|
5
5
|
font-size: 0.87em;
|
|
6
6
|
line-height: 1.2;
|
|
7
|
-
`;function MenuOperationItemContentComponent({item:e,to:t,children:o,active:n}){let r,i;const{sideNavStyle:m,showWebhookVerb:a}=useRecoilValue(globalOptionsSelector);return m!==SideNavStyle.PathFirst&&!e.search||"operation"!==e.type?(r=m===SideNavStyle.IdOnly?e.operationId||e.path:e.name,i=null):(r=React.createElement(MenuItemPath,{title:e.path}," ",e.path," "),i=React.createElement(MenuItemDescription,null," ",e.name," ")),React.createElement(MenuItemOperationLink,{depth:e.depth,deprecated:e.deprecated,to:t,active:n},e.isWebhook?React.createElement(
|
|
7
|
+
`;function MenuOperationItemContentComponent({item:e,to:t,children:o,active:n}){let r,i;const{sideNavStyle:m,showWebhookVerb:a}=useRecoilValue(globalOptionsSelector);return m!==SideNavStyle.PathFirst&&!e.search||"operation"!==e.type?(r=m===SideNavStyle.IdOnly?e.operationId||e.path:e.name,i=null):(r=React.createElement(MenuItemPath,{title:e.path}," ",e.path," "),i=React.createElement(MenuItemDescription,null," ",e.name," ")),React.createElement(MenuItemOperationLink,{depth:e.depth,deprecated:e.deprecated,to:t,active:n},e.isWebhook?React.createElement(Badge,{type:"hook"},a?e.httpVerb:l("webhook")):React.createElement(Badge,{type:e.httpVerb},shortenHTTPVerb(e.httpVerb)),React.createElement(MenuItemTitle,{width:"calc(100% - 42px)"},r,o),i)}export const MenuOperationItemContent=memo(MenuOperationItemContentComponent);
|
|
8
8
|
//# sourceMappingURL=MenuOperationItemContent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from"react";import{CodeBlockContainer,CodeBlockControls}from"@redocly/theme";import styled from"styled-components";import{DownloadLink}from"../Download";import{FileIcon}from"../icons";export function SourceCodeWithFile({fileInfo:e}){return React.createElement(Wrapper,null,React.createElement(CodeBlockControls,null,React.createElement(DownloadLink,{fileInfo:e})),React.createElement(CodeBlockContainer,null,React.createElement(FileIcon,{color:"--text-
|
|
1
|
+
import React from"react";import{CodeBlockContainer,CodeBlockControls}from"@redocly/theme";import styled from"styled-components";import{DownloadLink}from"../Download";import{FileIcon}from"../icons";export function SourceCodeWithFile({fileInfo:e}){return React.createElement(Wrapper,null,React.createElement(CodeBlockControls,null,React.createElement(DownloadLink,{fileInfo:e})),React.createElement(CodeBlockContainer,null,React.createElement(FileIcon,{color:"--text-color-inverse"}),null==e?void 0:e.fileName))}const Wrapper=styled.div``;
|
|
2
2
|
//# sourceMappingURL=SourceCodeWithFile.js.map
|
|
@@ -24,8 +24,8 @@ import React,{memo,useEffect,useRef,useState}from"react";import styled,{css}from
|
|
|
24
24
|
}
|
|
25
25
|
`}
|
|
26
26
|
`,FloatingButton=styled(MobileSidebarButton)`
|
|
27
|
-
--fab-background-color: var(--
|
|
28
|
-
--fab-active-background: var(--
|
|
27
|
+
--fab-background-color: var(--color-secondary-900);
|
|
28
|
+
--fab-active-background: var(--color-secondary-900);
|
|
29
29
|
|
|
30
30
|
${({theme:e})=>css`
|
|
31
31
|
${e.mediaQueries[e.showAtBreakpoint.sidebar]} {
|
|
@@ -35,5 +35,5 @@ import React,{memo,useEffect,useRef,useState}from"react";import styled,{css}from
|
|
|
35
35
|
display: none;
|
|
36
36
|
}
|
|
37
37
|
`}
|
|
38
|
-
`;function StickyResponsiveSidebarComponent({scrollYOffset:e,hideFab:t,className:i,children:o,collapsedSidebar:r}){const[a,l]=useState("0px"),s=useRef(null),
|
|
38
|
+
`;function StickyResponsiveSidebarComponent({scrollYOffset:e,hideFab:t,className:i,children:o,collapsedSidebar:r}){const[a,l]=useState("0px"),s=useRef(null),c=useLocation(),[n,d]=useRecoilState(isSidebarOpenedSelector);useEffect((()=>{c.hash&&d(!1)}),[c.pathname,c.hash,d]),useMount((()=>{stickyfill&&stickyfill.add(s.current);const t=e();l(`${t}px`)})),useUnmount((()=>{stickyfill&&stickyfill.remove(s.current)}));return React.createElement(React.Fragment,null,React.createElement(StyledStickySidebar,{open:n,className:i,offsetTop:a,style:{top:a},ref:s,collapsedSidebar:r},r||n?o:null,React.createElement(Actions,null)),!t&&React.createElement(FloatingButton,{opened:n,onClick:()=>{d(!n)}},React.createElement(MobileSidebarIcon,null)))}export const StickyResponsiveSidebar=memo(StickyResponsiveSidebarComponent);
|
|
39
39
|
//# sourceMappingURL=StickyResponsiveSidebar.js.map
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import styled from"styled-components";import{TabList}from"../TabList";export const CollapsingTabList=styled(TabList)`
|
|
2
|
-
|
|
3
|
-
border-radius: var(--border-radius-lg);
|
|
4
|
-
padding: 2px;
|
|
5
|
-
margin: 0 0 15px;
|
|
6
|
-
|
|
7
|
-
li[class^='Tab'] {
|
|
8
|
-
margin: 0;
|
|
9
|
-
list-style: none;
|
|
10
|
-
}
|
|
2
|
+
margin: 0 0 10px;
|
|
11
3
|
`;
|
|
12
4
|
//# sourceMappingURL=CollapsingTabList.js.map
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
import{Tab as ReactTab}from"react-tabs";import styled from"styled-components";export const Tab=styled(ReactTab)`
|
|
2
2
|
flex: 1;
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
3
|
cursor: pointer;
|
|
7
|
-
padding:
|
|
4
|
+
padding: 5px 10px;
|
|
8
5
|
font-size: var(--panel-samples-tabs-font-size);
|
|
9
6
|
line-height: 26px;
|
|
10
7
|
font-weight: var(--panel-samples-tabs-font-weight);
|
|
11
8
|
text-align: center;
|
|
12
9
|
color: var(--panel-samples-tabs-text-color);
|
|
13
10
|
background-color: var(--panel-samples-tabs-background-color);
|
|
14
|
-
border-
|
|
11
|
+
border-bottom: 4px solid var(--panel-samples-tabs-border-color);
|
|
12
|
+
margin-bottom: -4px;
|
|
15
13
|
|
|
16
14
|
&:hover {
|
|
17
15
|
border-color: var(--panel-samples-tabs-hover-border-color);
|
|
18
16
|
background-color: var(--panel-samples-tabs-hover-background-color);
|
|
19
|
-
color: var(--panel-samples-tabs-hover-text-color);
|
|
20
17
|
}
|
|
21
18
|
|
|
22
19
|
&.react-tabs__tab--selected {
|
|
23
20
|
background-color: var(--panel-samples-tabs-active-background-color);
|
|
24
21
|
border-color: var(--panel-samples-tabs-active-border-color);
|
|
25
|
-
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:first-child {
|
|
25
|
+
border-top-left-radius: var(--border-radius);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:last-child {
|
|
29
|
+
border-top-right-radius: var(--border-radius);
|
|
26
30
|
}
|
|
27
31
|
`;
|
|
28
32
|
//# sourceMappingURL=Tab.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{asField}from"informed";import{CodeBlockControls,CodeBlockControlButton}from"@redocly/theme";import React,{useState}from"react";import styled from"styled-components";import{FormError}from"./form";import{Checkbox}from"./Checkbox";const DEFAULT_MAX_ITEMS=11;export const CheckboxListComponent=({items:e,fieldApi:t,validateOnChange:o,maxDisplayedItems:l,showControls:r,trimItemsLength:c})=>{const[a,
|
|
1
|
+
import{asField}from"informed";import{CodeBlockControls,CodeBlockControlButton}from"@redocly/theme";import React,{useState}from"react";import styled from"styled-components";import{FormError}from"./form";import{Checkbox}from"./Checkbox";const DEFAULT_MAX_ITEMS=11;export const CheckboxListComponent=({items:e,fieldApi:t,validateOnChange:o,maxDisplayedItems:l,showControls:r,trimItemsLength:c})=>{const[a,n]=useState(!0),s=e=>t.getValue().includes(e),i=t.getError(),d=l||11,m=c&&a?e.slice(0,d):e;return React.createElement("div",null,r?React.createElement(CodeBlockControls,{controls:{select:{onClick:()=>{t.setValue(e)},label:"Select all",tooltipText:"Select all checkboxes"},deselect:{onClick:()=>{t.setValue([])},label:"Deselect all",tooltipText:"Deselect all checkboxes"}}}):null,React.createElement(ListWrapper,null,m.map((e=>React.createElement(Checkbox,{fullWidth:!0,id:e,value:e,checked:s(e),label:e,key:e,onChange:e=>{(e=>{const o=e.target.value,l=e.target.checked;t.setTouched(!0);const r=t.getValue()||[];let c;if(l)c=[...r,o];else{const e=r.indexOf(o);c=[...r.slice(0,e),...r.slice(e+1)]}t.setValue(c)})(e),o&&t.validate()}}))),e.length>d&&c?React.createElement(ToggleButton,{onClick:()=>{n((e=>!e))}},a?"Show all":"Collapse"):null),i?React.createElement(FormError,null,i):"")};export const CheckboxList=asField(CheckboxListComponent);const ListWrapper=styled.div`
|
|
2
2
|
padding: 10px;
|
|
3
|
-
|
|
4
|
-
border-radius: 0 0 var(--border-radius
|
|
3
|
+
background-color: var(--panel-samples-input-background-color);
|
|
4
|
+
border-radius: 0 0 var(--border-radius) var(--border-radius);
|
|
5
5
|
`,ToggleButton=styled(CodeBlockControlButton)`
|
|
6
6
|
float: right;
|
|
7
7
|
`;
|
|
@@ -10,7 +10,7 @@ import React,{memo,useMemo}from"react";import styled from"styled-components";imp
|
|
|
10
10
|
margin: auto;
|
|
11
11
|
text-align: center;
|
|
12
12
|
polyline {
|
|
13
|
-
color:
|
|
13
|
+
color: ${e=>"dark"===e.variant&&"white"};
|
|
14
14
|
}
|
|
15
|
-
`,DropdownComponent=({options:e,onChange:t,handleClear:o,clearable:n,placeholder:
|
|
15
|
+
`,DropdownComponent=({options:e,onChange:t,handleClear:o,clearable:n,placeholder:a,value:r="",className:l,variant:s="light"})=>{var i;const c=useMemo((()=>e.map((({idx:e,value:t,title:o},n)=>{const a=normalizeText(t);return React.createElement("option",{key:e||a+n,value:a,className:"dropdown-option"},o||a)}))),[e]),m=normalizeText(r),d=(null===(i=e.find((e=>e.value===r)))||void 0===i?void 0:i.title)||m;return React.createElement("div",{className:l+" dropdown-wrapper"},React.createElement(ArrowIcon,{variant:s}),n&&(null==m?void 0:m.length)>0&&React.createElement(ClearButton,{handleClear:o}),React.createElement("select",{onChange:o=>{const{selectedIndex:n}=o.target;t(e[a||!r?n-1:n])},value:m,className:"dropdown-select"},a&&React.createElement("option",{disabled:!0,hidden:!0,value:a},a),!m&&!a&&React.createElement("option",{disabled:!0}),c),React.createElement("label",null,d))};export const Dropdown=memo(DropdownComponent);
|
|
16
16
|
//# sourceMappingURL=Dropdown.js.map
|
|
@@ -6,12 +6,14 @@ import styled,{css}from"styled-components";import{Dropdown as DropdownComponent}
|
|
|
6
6
|
&,
|
|
7
7
|
&:hover,
|
|
8
8
|
&:focus-within {
|
|
9
|
+
border: none;
|
|
9
10
|
box-shadow: none;
|
|
10
11
|
}
|
|
11
12
|
`;export const Dropdown=styled(DropdownComponent)`
|
|
12
13
|
box-sizing: border-box;
|
|
13
14
|
outline: none;
|
|
14
15
|
display: inline-block;
|
|
16
|
+
border-radius: var(--border-radius);
|
|
15
17
|
vertical-align: bottom;
|
|
16
18
|
position: relative;
|
|
17
19
|
width: ${({fullWidth:o})=>o?"100%":"auto"};
|
|
@@ -25,7 +27,8 @@ import styled,{css}from"styled-components";import{Dropdown as DropdownComponent}
|
|
|
25
27
|
outline: none;
|
|
26
28
|
display: inline-block;
|
|
27
29
|
color: var(--docs-dropdown-text-color);
|
|
28
|
-
border-radius: var(--border-radius
|
|
30
|
+
border-radius: var(--border-radius);
|
|
31
|
+
border: var(--docs-dropdown-border);
|
|
29
32
|
padding: var(--docs-dropdown-padding);
|
|
30
33
|
vertical-align: bottom;
|
|
31
34
|
width: ${({fullWidth:o})=>o?"100%":"auto"};
|
|
@@ -40,6 +43,7 @@ import styled,{css}from"styled-components";import{Dropdown as DropdownComponent}
|
|
|
40
43
|
&,
|
|
41
44
|
&:hover,
|
|
42
45
|
&:focus-within {
|
|
46
|
+
border: 1px solid var(--border-color);
|
|
43
47
|
box-shadow: none;
|
|
44
48
|
}
|
|
45
49
|
|
|
@@ -57,9 +61,9 @@ import styled,{css}from"styled-components";import{Dropdown as DropdownComponent}
|
|
|
57
61
|
appearance: none;
|
|
58
62
|
cursor: pointer;
|
|
59
63
|
|
|
60
|
-
color: var(--text-
|
|
64
|
+
color: var(--text-color);
|
|
61
65
|
line-height: inherit;
|
|
62
|
-
font-size:
|
|
66
|
+
font-size: 14px;
|
|
63
67
|
font-family: inherit;
|
|
64
68
|
padding: var(--docs-dropdown-padding);
|
|
65
69
|
${({variant:o})=>"dark"===o?darkDropdownStyle:""};
|
|
@@ -71,14 +75,16 @@ import styled,{css}from"styled-components";import{Dropdown as DropdownComponent}
|
|
|
71
75
|
}
|
|
72
76
|
label {
|
|
73
77
|
padding: 0 26px 0 4px;
|
|
78
|
+
border: none;
|
|
74
79
|
background: transparent;
|
|
75
|
-
font-size:
|
|
76
|
-
font-weight:
|
|
80
|
+
font-size: 14px;
|
|
81
|
+
font-weight: 400;
|
|
77
82
|
appearance: none;
|
|
78
83
|
height: auto;
|
|
79
84
|
|
|
80
85
|
&:hover,
|
|
81
86
|
&:focus-within {
|
|
87
|
+
border: none;
|
|
82
88
|
box-shadow: none;
|
|
83
89
|
}
|
|
84
90
|
}
|
|
@@ -90,16 +96,22 @@ import styled,{css}from"styled-components";import{Dropdown as DropdownComponent}
|
|
|
90
96
|
label {
|
|
91
97
|
${darkDropdownStyle};
|
|
92
98
|
|
|
93
|
-
|
|
94
|
-
|
|
99
|
+
height: 40px;
|
|
100
|
+
border-radius: 0 var(--border-radius) 0 0;
|
|
101
|
+
margin: 0 0 -4px;
|
|
95
102
|
transition: none;
|
|
96
103
|
min-width: auto;
|
|
97
|
-
background
|
|
104
|
+
background: ${({active:o})=>o?"var(--panel-samples-tabs-active-background-color)":"none"};
|
|
98
105
|
& {
|
|
106
|
+
border-bottom: 4px solid
|
|
107
|
+
${({active:o})=>o?"var(--panel-samples-tabs-active-border-color)":"transparent"};
|
|
108
|
+
|
|
99
109
|
&[open],
|
|
100
110
|
&:focus-within,
|
|
101
111
|
&:hover {
|
|
102
|
-
background
|
|
112
|
+
background: var(--border-color-secondary);
|
|
113
|
+
border-bottom: 4px solid
|
|
114
|
+
${({active:o})=>o?"var( --panel-samples-tabs-active-border-color)":"transparent"};
|
|
103
115
|
}
|
|
104
116
|
}
|
|
105
117
|
}
|
|
@@ -108,7 +120,7 @@ import styled,{css}from"styled-components";import{Dropdown as DropdownComponent}
|
|
|
108
120
|
label {
|
|
109
121
|
width: 100%;
|
|
110
122
|
font-weight: 600;
|
|
111
|
-
color: var(--text-
|
|
123
|
+
color: var(--text-color);
|
|
112
124
|
}
|
|
113
125
|
`;export const SchemaDiscriminatorDropdown=styled(Dropdown)`
|
|
114
126
|
.dropdown-select {
|
|
@@ -2,7 +2,7 @@ import styled,{css}from"styled-components";import{typography}from"../../../utils
|
|
|
2
2
|
text-align: right;
|
|
3
3
|
font-size: 0.9em;
|
|
4
4
|
font-weight: normal;
|
|
5
|
-
color: var(--text-secondary);
|
|
5
|
+
color: var(--text-color-secondary);
|
|
6
6
|
`;const repeatingGradient=css`
|
|
7
7
|
repeating-linear-gradient(0deg,
|
|
8
8
|
var(--schemas-lines-color),
|
|
@@ -122,7 +122,7 @@ import styled,{css}from"styled-components";import{typography}from"../../../utils
|
|
|
122
122
|
min-width: 200px;
|
|
123
123
|
|
|
124
124
|
${({theme:e})=>e.mediaQueries.small} {
|
|
125
|
-
border-bottom: 1px solid var(--border-
|
|
125
|
+
border-bottom: 1px solid var(--border-color);
|
|
126
126
|
border-left: none;
|
|
127
127
|
padding: 10px 0;
|
|
128
128
|
}
|
|
@@ -12,7 +12,6 @@ export declare const AdditionalPropertiesLabel: import("styled-components").Styl
|
|
|
12
12
|
export declare const AccessLabel: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
13
13
|
export declare const FieldValueLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
14
14
|
export declare const RecursiveLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
15
|
-
export declare const DeprecatedLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
16
15
|
export declare const EnumValue: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
17
16
|
export declare const DefaultValue: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
18
17
|
export declare const ExampleValue: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -5,7 +5,7 @@ import styled,{css}from"styled-components";import{typography}from"../../../utils
|
|
|
5
5
|
outline: 0;
|
|
6
6
|
cursor: pointer;
|
|
7
7
|
padding: 0 10px 0 0;
|
|
8
|
-
color: var(--text-
|
|
8
|
+
color: var(--text-color);
|
|
9
9
|
&:focus {
|
|
10
10
|
font-weight: var(--font-weight-bold);
|
|
11
11
|
}
|
|
@@ -40,7 +40,7 @@ import styled,{css}from"styled-components";import{typography}from"../../../utils
|
|
|
40
40
|
color: var(--schema-type-title-text-color);
|
|
41
41
|
word-break: break-word;
|
|
42
42
|
`;export const TypeFormat=TypeName;export const PropertyLabel=styled(FieldLabel.withComponent("div"))`
|
|
43
|
-
color: var(--text-secondary);
|
|
43
|
+
color: var(--text-color-secondary);
|
|
44
44
|
font-size: var(--schema-labels-font-size);
|
|
45
45
|
font-weight: normal;
|
|
46
46
|
line-height: 1;
|
|
@@ -62,10 +62,6 @@ import styled,{css}from"styled-components";import{typography}from"../../../utils
|
|
|
62
62
|
background-color: var(--schema-recursive-background-color);
|
|
63
63
|
border-color: var(--schema-recursive-border-color);
|
|
64
64
|
color: var(--schema-recursive-text-color);
|
|
65
|
-
`;export const DeprecatedLabel=styled(FieldValueLabel)`
|
|
66
|
-
color: var(--badge-deprecated-text-color);
|
|
67
|
-
background-color: var(--badge-deprecated-background-color);
|
|
68
|
-
border-color: var(--badge-deprecated-border-color);
|
|
69
65
|
`;export const EnumValue=styled(FieldValueLabel)`
|
|
70
66
|
background-color: var(--schema-enum-background-color);
|
|
71
67
|
border-color: var(--schema-enum-border-color);
|
|
@@ -101,11 +97,11 @@ import styled,{css}from"styled-components";import{typography}from"../../../utils
|
|
|
101
97
|
`;export const PatternLabel=styled(ConstraintItem)``;export const ToggleButton=styled.button`
|
|
102
98
|
background-color: transparent;
|
|
103
99
|
border: 0;
|
|
104
|
-
color: var(--text-secondary);
|
|
100
|
+
color: var(--text-color-secondary);
|
|
105
101
|
margin-left: var(--spacing-unit);
|
|
106
102
|
border-radius: var(--border-radius);
|
|
107
103
|
cursor: pointer;
|
|
108
|
-
outline-color: var(--text-secondary);
|
|
104
|
+
outline-color: var(--text-color-secondary);
|
|
109
105
|
font-size: 12px;
|
|
110
106
|
`;
|
|
111
107
|
//# sourceMappingURL=fields.js.map
|
|
@@ -30,18 +30,18 @@ import styled,{css}from"styled-components";export const Table=styled.div`
|
|
|
30
30
|
display: inline-block;
|
|
31
31
|
content: '*';
|
|
32
32
|
margin-left: 4px;
|
|
33
|
-
color: var(--color-error);
|
|
33
|
+
color: var(--color-error-500);
|
|
34
34
|
}
|
|
35
35
|
`}
|
|
36
36
|
`;export const FormError=styled.div`
|
|
37
|
-
color: var(--color-error);
|
|
37
|
+
color: var(--color-error-500);
|
|
38
38
|
font-size: 0.9em;
|
|
39
39
|
& pre {
|
|
40
40
|
word-break: break-word;
|
|
41
41
|
white-space: pre-wrap;
|
|
42
42
|
}
|
|
43
43
|
`;export const FormWarning=styled.div`
|
|
44
|
-
color: var(--color-warning);
|
|
44
|
+
color: var(--color-warning-500);
|
|
45
45
|
font-size: 0.9em;
|
|
46
46
|
`;function placeholder(o,e){let t="";for(let r=0;r<o;r++)t+=e;return'"'+t+'"'}export const TokenField=styled.div`
|
|
47
47
|
position: relative;
|
|
@@ -55,7 +55,7 @@ import styled,{css}from"styled-components";export const Table=styled.div`
|
|
|
55
55
|
padding: 0 5px;
|
|
56
56
|
cursor: pointer;
|
|
57
57
|
`;export const TokenClear=styled(TokenShowHide)`
|
|
58
|
-
color: var(--color-error);
|
|
58
|
+
color: var(--color-error-500);
|
|
59
59
|
`;export const FormHeader=styled.div`
|
|
60
60
|
font-weight: bold;
|
|
61
61
|
font-size: 1.2em;
|
|
@@ -3,7 +3,7 @@ import styled from"styled-components";import{typography}from"../../utils";export
|
|
|
3
3
|
|
|
4
4
|
${typography("right-panel-header")};
|
|
5
5
|
`;export const FieldsGroupHeader=styled.h5`
|
|
6
|
-
color: var(--text-secondary);
|
|
6
|
+
color: var(--text-color-secondary);
|
|
7
7
|
font-weight: bold;
|
|
8
8
|
text-transform: uppercase;
|
|
9
9
|
font-size: 14px;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import styled from"styled-components";import{SamplesMiddlePanel}from"../common/panels";export const SamplesWrap=styled.div`
|
|
2
2
|
padding: calc(var(--spacing-unit) * 4);
|
|
3
3
|
border-radius: var(--panel-border-radius);
|
|
4
|
-
border: var(--panel-samples-border);
|
|
5
4
|
background-color: var(--panel-samples-background-color);
|
|
6
5
|
`;export const ExamplesWrap=styled(SamplesWrap)`
|
|
7
6
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React,{memo}from"react";import styled from"styled-components";import{serializeParameterValue}from"../../utils";import{CodeHeader}from"../Panel";import{Path,PathWrapper,TryItButton}from"../Endpoint";import{HttpVerb}from"../shared";import{expandVariables}from"./utils";function formatPath(e,t,r){const n=t.path||{},a=t.query||{},o=Object.keys(a);let i=expandVariables(e,n);return o.length&&(i+="?"+o.map((e=>{if(!a[e])return"";const t=(e=>r.find((t=>t.name===e&&"query"===t.in)))(e);return t?serializeParameterValue(t,a[e]):`${e}=${encodeURIComponent(a[e])}`})).filter(Boolean).join("&")),i}export const ActionPanelComponent=({loading:e,operation:t,hasResponse:r,execute:n,params:a={}})=>React.createElement(CodeHeader,null,React.createElement(PathWrapper,null,React.createElement(HttpVerb,{
|
|
1
|
+
import React,{memo}from"react";import styled from"styled-components";import{serializeParameterValue}from"../../utils";import{CodeHeader}from"../Panel";import{Path,PathWrapper,TryItButton}from"../Endpoint";import{HttpVerb}from"../shared";import{expandVariables}from"./utils";function formatPath(e,t,r){const n=t.path||{},a=t.query||{},o=Object.keys(a);let i=expandVariables(e,n);return o.length&&(i+="?"+o.map((e=>{if(!a[e])return"";const t=(e=>r.find((t=>t.name===e&&"query"===t.in)))(e);return t?serializeParameterValue(t,a[e]):`${e}=${encodeURIComponent(a[e])}`})).filter(Boolean).join("&")),i}export const ActionPanelComponent=({loading:e,operation:t,hasResponse:r,execute:n,params:a={}})=>React.createElement(CodeHeader,null,React.createElement(PathWrapper,null,React.createElement(HttpVerb,{type:t.httpVerb},t.httpVerb),React.createElement(Path,{wrap:"true"},formatPath(t.path,a,t.parameters))),React.createElement(SendButton,{"data-cy":"send-button",color:"primary",blinking:e,onClick:()=>!e&&n()},e?"Sending...":r?"Resend":"Send"));const SendButton=styled(TryItButton)`
|
|
2
2
|
width: var(--panel-try-it-action-button-width);
|
|
3
3
|
`;export const ActionPanel=memo(ActionPanelComponent);
|
|
4
4
|
//# sourceMappingURL=ActionPanel.js.map
|