@redocly/openapi-docs 0.83.0-rc.4 → 0.83.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/redocly-openapi-docs.min.js +1529 -1509
- package/lib/components/SectionContent/SectionContent.js +1 -10
- package/lib/utils/security-details.js +1 -1
- package/lib-esm/components/SectionContent/SectionContent.js +1 -10
- package/lib-esm/utils/security-details.js +1 -1
- package/package.json +5 -5
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SectionContent=void 0;const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("react"),theme_1=require("@redocly/theme"),jotai_1=require("jotai"),styled_components_1=__importDefault(require("styled-components")),ContentItem_1=require("../ContentItem"),PageFooter_1=require("../PageFooter"),store_1=require("../../jotai/store"),RenderHook_1=require("../RenderHook"),RightPanel_1=require("../RightPanel"),app_1=require("../../jotai/app"),common_1=require("../common");function SectionContent({items:e,hideFooterAndHeader:t}){const{unstable_hooks:{MiddlePanelHeader:n},routingBasePath:
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
margin-bottom: var(--spacing-xxl);
|
|
5
|
-
`,MiddlePanelWrapper=(0,styled_components_1.default)(common_1.SamplesMiddlePanel)`
|
|
1
|
+
"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SectionContent=void 0;const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("react"),theme_1=require("@redocly/theme"),jotai_1=require("jotai"),styled_components_1=__importDefault(require("styled-components")),ContentItem_1=require("../ContentItem"),PageFooter_1=require("../PageFooter"),store_1=require("../../jotai/store"),RenderHook_1=require("../RenderHook"),RightPanel_1=require("../RightPanel"),app_1=require("../../jotai/app"),common_1=require("../common");function SectionContent({items:e,hideFooterAndHeader:t}){const{unstable_hooks:{MiddlePanelHeader:n},routingBasePath:r}=(0,jotai_1.useAtomValue)(store_1.globalOptionsAtom),o=(0,jotai_1.useAtomValue)(app_1.layoutAtom),a=o===theme_1.LayoutVariant.STACKED,i=(0,react_1.useMemo)((()=>t?null:(0,jsx_runtime_1.jsx)(MiddlePanelWrapper,{isStacked:a,children:(0,jsx_runtime_1.jsx)(PageFooter_1.PageFooter,{})})),[t,a]),s=(0,react_1.useMemo)((()=>t||!theme_1.OpenApiHeader&&!n?null:(0,jsx_runtime_1.jsx)(MiddlePanelWrapper,{isStacked:a,children:n?(0,jsx_runtime_1.jsx)(RenderHook_1.RenderHook,{Hook:n,props:void 0}):(0,jsx_runtime_1.jsx)(theme_1.OpenApiHeader,{})})),[n,t,a]);return 0===e.length?null:(0,jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment,{children:[s,(0,jsx_runtime_1.jsxs)(common_1.Row,{layout:o,children:[(0,jsx_runtime_1.jsx)(SectionContainer,{layout:o,children:e.filter((({type:e})=>"section"===e)).map((e=>(0,jsx_runtime_1.jsx)(ContentItem_1.ContentItem,{item:e,routingBasePath:r},e.id)))}),(0,jsx_runtime_1.jsx)(RightPanelContainer,{isStacked:a,tabIndex:0,children:(0,jsx_runtime_1.jsx)(RightPanel_1.RightPanel,{item:e[0]})})]}),e.filter((({type:e})=>"section"!==e)).map((e=>(0,jsx_runtime_1.jsx)(ContentItem_1.ContentItem,{item:e,routingBasePath:r},e.id))),i]})}exports.SectionContent=SectionContent;const MiddlePanelWrapper=(0,styled_components_1.default)(common_1.SamplesMiddlePanel)`
|
|
6
2
|
align-self: flex-start;
|
|
7
3
|
padding-top: var(--panel-gap-vertical);
|
|
8
4
|
padding-bottom: var(--panel-gap-vertical);
|
|
@@ -14,12 +10,7 @@
|
|
|
14
10
|
}
|
|
15
11
|
`,RightPanelContainer=(0,styled_components_1.default)(common_1.SamplesPanel)`
|
|
16
12
|
margin: var(--spacing-base) 0 var(--spacing-xs);
|
|
17
|
-
display: none;
|
|
18
13
|
overflow-y: auto;
|
|
19
14
|
max-height: calc(100vh - var(--navbar-height) - var(--panel-gap-vertical) * 2);
|
|
20
|
-
|
|
21
|
-
@media screen and (min-width: ${theme_1.breakpoints.large}) {
|
|
22
|
-
display: ${({isStacked:e})=>e?"none":"block"};
|
|
23
|
-
}
|
|
24
15
|
`;
|
|
25
16
|
//# sourceMappingURL=SectionContent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setSecurityDetails=exports.getSecurityDetails=exports.setSecurityDetailsVariants=void 0;const theme_1=require("@redocly/theme"),string_1=require("./string"),session_storage_1=require("./session-storage");function setSecurityDetailsVariants(e,s){e=(0,string_1.escapeFormId)(e),(0,session_storage_1.toSessionStorage)(`auth.${e}.variants`,JSON.stringify(s))}function getSecurityDetails(e,s={}){return{raw:s[e+theme_1.SecurityVariablesEnvSuffix.APIKey],password:s[e+theme_1.SecurityVariablesEnvSuffix.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setSecurityDetails=exports.getSecurityDetails=exports.setSecurityDetailsVariants=void 0;const theme_1=require("@redocly/theme"),string_1=require("./string"),session_storage_1=require("./session-storage");function setSecurityDetailsVariants(e,s){e=(0,string_1.escapeFormId)(e),(0,session_storage_1.toSessionStorage)(`auth.${e}.variants`,JSON.stringify(s))}function getSecurityDetails(e,s={}){return{raw:s[e+theme_1.SecurityVariablesEnvSuffix.APIKey],password:s[e+theme_1.SecurityVariablesEnvSuffix.Username],username:s[e+theme_1.SecurityVariablesEnvSuffix.Password],token:s[e+theme_1.SecurityVariablesEnvSuffix.Token]?{access_token:s[e+theme_1.SecurityVariablesEnvSuffix.Token]}:void 0,client_id:s[e+theme_1.SecurityVariablesEnvSuffix.ClientId],client_secret:s[e+theme_1.SecurityVariablesEnvSuffix.ClientSecret],scopes:(0,session_storage_1.fromSessionStorage)(`auth.${e}.scopes`)}}function setSecurityDetails(e,s){e=(0,string_1.escapeFormId)(e),"string"==typeof s?(0,session_storage_1.toSessionStorage)("auth."+e,s):s&&((0,session_storage_1.toSessionStorage)(`auth.${e}.password`,s.password||""),(0,session_storage_1.toSessionStorage)(`auth.${e}.username`,s.username||""),(0,session_storage_1.toSessionStorage)(`auth.${e}.token`,s.token&&JSON.stringify(s.token)||""),(0,session_storage_1.toSessionStorage)(`auth.${e}.client_id`,s.client_id||""),(0,session_storage_1.toSessionStorage)(`auth.${e}.client_secret`,s.client_secret||""),(0,session_storage_1.toSessionStorage)(`auth.${e}.scopes`,s.scopes&&JSON.stringify(s.scopes)||""))}exports.setSecurityDetailsVariants=setSecurityDetailsVariants,exports.getSecurityDetails=getSecurityDetails,exports.setSecurityDetails=setSecurityDetails;
|
|
2
2
|
//# sourceMappingURL=security-details.js.map
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{useMemo}from"react";import{breakpoints,LayoutVariant,OpenApiHeader}from"@redocly/theme";import{useAtomValue}from"jotai";import styled from"styled-components";import{ContentItem}from"../ContentItem";import{PageFooter}from"../PageFooter";import{globalOptionsAtom}from"../../jotai/store";import{RenderHook}from"../RenderHook";import{RightPanel}from"../RightPanel";import{layoutAtom}from"../../jotai/app";import{SamplesMiddlePanel,SamplesPanel}from"../common";export function SectionContent({items:e,hideFooterAndHeader:t}){const{unstable_hooks:{MiddlePanelHeader:a},routingBasePath:o}=useAtomValue(globalOptionsAtom),n=useAtomValue(layoutAtom),
|
|
2
|
-
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
|
-
margin-bottom: var(--spacing-xxl);
|
|
5
|
-
`,MiddlePanelWrapper=styled(SamplesMiddlePanel)`
|
|
1
|
+
import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";import{useMemo}from"react";import{breakpoints,LayoutVariant,OpenApiHeader}from"@redocly/theme";import{useAtomValue}from"jotai";import styled from"styled-components";import{ContentItem}from"../ContentItem";import{PageFooter}from"../PageFooter";import{globalOptionsAtom}from"../../jotai/store";import{RenderHook}from"../RenderHook";import{RightPanel}from"../RightPanel";import{layoutAtom}from"../../jotai/app";import{Row,SamplesMiddlePanel,SamplesPanel}from"../common";export function SectionContent({items:e,hideFooterAndHeader:t}){const{unstable_hooks:{MiddlePanelHeader:a},routingBasePath:o}=useAtomValue(globalOptionsAtom),n=useAtomValue(layoutAtom),r=n===LayoutVariant.STACKED,i=useMemo((()=>t?null:_jsx(MiddlePanelWrapper,{isStacked:r,children:_jsx(PageFooter,{})})),[t,r]),l=useMemo((()=>t||!OpenApiHeader&&!a?null:_jsx(MiddlePanelWrapper,{isStacked:r,children:a?_jsx(RenderHook,{Hook:a,props:void 0}):_jsx(OpenApiHeader,{})})),[a,t,r]);return 0===e.length?null:_jsxs(_Fragment,{children:[l,_jsxs(Row,{layout:n,children:[_jsx(SectionContainer,{layout:n,children:e.filter((({type:e})=>"section"===e)).map((e=>_jsx(ContentItem,{item:e,routingBasePath:o},e.id)))}),_jsx(RightPanelContainer,{isStacked:r,tabIndex:0,children:_jsx(RightPanel,{item:e[0]})})]}),e.filter((({type:e})=>"section"!==e)).map((e=>_jsx(ContentItem,{item:e,routingBasePath:o},e.id))),i]})}const MiddlePanelWrapper=styled(SamplesMiddlePanel)`
|
|
6
2
|
align-self: flex-start;
|
|
7
3
|
padding-top: var(--panel-gap-vertical);
|
|
8
4
|
padding-bottom: var(--panel-gap-vertical);
|
|
@@ -14,12 +10,7 @@ import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";i
|
|
|
14
10
|
}
|
|
15
11
|
`,RightPanelContainer=styled(SamplesPanel)`
|
|
16
12
|
margin: var(--spacing-base) 0 var(--spacing-xs);
|
|
17
|
-
display: none;
|
|
18
13
|
overflow-y: auto;
|
|
19
14
|
max-height: calc(100vh - var(--navbar-height) - var(--panel-gap-vertical) * 2);
|
|
20
|
-
|
|
21
|
-
@media screen and (min-width: ${breakpoints.large}) {
|
|
22
|
-
display: ${({isStacked:e})=>e?"none":"block"};
|
|
23
|
-
}
|
|
24
15
|
`;
|
|
25
16
|
//# sourceMappingURL=SectionContent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{SecurityVariablesEnvSuffix}from"@redocly/theme";import{escapeFormId}from"./string";import{fromSessionStorage,toSessionStorage}from"./session-storage";export function setSecurityDetailsVariants(e,t){e=escapeFormId(e),toSessionStorage(`auth.${e}.variants`,JSON.stringify(t))}export function getSecurityDetails(e,t={}){return{raw:t[e+SecurityVariablesEnvSuffix.APIKey],password:t[e+SecurityVariablesEnvSuffix.
|
|
1
|
+
import{SecurityVariablesEnvSuffix}from"@redocly/theme";import{escapeFormId}from"./string";import{fromSessionStorage,toSessionStorage}from"./session-storage";export function setSecurityDetailsVariants(e,t){e=escapeFormId(e),toSessionStorage(`auth.${e}.variants`,JSON.stringify(t))}export function getSecurityDetails(e,t={}){return{raw:t[e+SecurityVariablesEnvSuffix.APIKey],password:t[e+SecurityVariablesEnvSuffix.Username],username:t[e+SecurityVariablesEnvSuffix.Password],token:t[e+SecurityVariablesEnvSuffix.Token]?{access_token:t[e+SecurityVariablesEnvSuffix.Token]}:void 0,client_id:t[e+SecurityVariablesEnvSuffix.ClientId],client_secret:t[e+SecurityVariablesEnvSuffix.ClientSecret],scopes:fromSessionStorage(`auth.${e}.scopes`)}}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)||""))}
|
|
2
2
|
//# sourceMappingURL=security-details.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "0.83.0-rc.
|
|
3
|
+
"version": "0.83.0-rc.6",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"openapi-docs": "bin.js"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@redocly/theme": "0.83.0-rc.
|
|
19
|
+
"@redocly/theme": "0.83.0-rc.6",
|
|
20
20
|
"core-js": "^3.1.4",
|
|
21
21
|
"react": "^18.0.0",
|
|
22
22
|
"react-dom": "^18.0.0",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"url": "~0.11.0",
|
|
45
45
|
"url-template": "^2.0.8",
|
|
46
46
|
"util": "~0.12.5",
|
|
47
|
-
"@redocly/
|
|
48
|
-
"@redocly/
|
|
47
|
+
"@redocly/replay": "0.83.0-rc.6",
|
|
48
|
+
"@redocly/config": "0.83.0-rc.6"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@cfaester/enzyme-adapter-react-18": "0.7.1",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"webpack": "5.91.0",
|
|
96
96
|
"webpack-cli": "5.1.4",
|
|
97
97
|
"webpack-dev-server": "4.15.2",
|
|
98
|
-
"@redocly/theme": "0.83.0-rc.
|
|
98
|
+
"@redocly/theme": "0.83.0-rc.6"
|
|
99
99
|
},
|
|
100
100
|
"scripts": {
|
|
101
101
|
"start": "webpack serve --mode=development --hot",
|