@redocly/asyncapi-docs 1.4.0 → 1.5.0-custom.3
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/lib/RedoclyAsyncAPIDocs.js +1 -1
- package/lib/components/ApiInfo.js +1 -1
- package/lib/components/AppRouter.js +1 -1
- package/lib/components/AsyncApiDocs.js +1 -1
- package/lib/components/Breadcrumbs.js +2 -2
- package/lib/components/ChannelBinding.js +1 -1
- package/lib/components/ChannelLinkItem.js +3 -3
- package/lib/components/ChannelParameters.js +3 -3
- package/lib/components/ChannelSection.js +7 -7
- package/lib/components/DownloadSpecification.js +4 -4
- package/lib/components/ItemsNavigation.js +6 -6
- package/lib/components/JsonSchema.js +2 -2
- package/lib/components/MarkdownSection.js +2 -2
- package/lib/components/Message.js +4 -4
- package/lib/components/MessageAMQPReferences.js +6 -6
- package/lib/components/MessageBinding.js +1 -1
- package/lib/components/MessageReferences.js +1 -1
- package/lib/components/MessageSection.js +7 -7
- package/lib/components/Metadata.d.ts +8 -0
- package/lib/components/Metadata.js +1 -0
- package/lib/components/Operation.js +12 -12
- package/lib/components/OperationBinding.js +1 -1
- package/lib/components/OperationSection.js +5 -5
- package/lib/components/RightPanel.js +5 -1
- package/lib/components/SamplesPanel.js +5 -5
- package/lib/components/Server.js +7 -7
- package/lib/components/ServerBindingsSection.js +1 -1
- package/lib/components/ServerModal.js +7 -7
- package/lib/components/ServerOverviewSection.js +7 -7
- package/lib/components/ServersListPanel.js +3 -3
- package/lib/components/TagBlock.js +9 -9
- package/lib/components/common/BindingPanel.js +6 -6
- package/lib/components/common/Information.js +2 -2
- package/lib/components/common/Link.js +9 -9
- package/lib/components/common/ListIcon.d.ts +1 -1
- package/lib/components/common/ListIcon.js +6 -6
- package/lib/components/common/MoreDetailsButton.js +2 -2
- package/lib/components/common/SectionWrapper.js +1 -1
- package/lib/components/common/TagWithIcon.js +6 -6
- package/lib/components/common/index.js +1 -1
- package/lib/components/common/styles.js +18 -18
- package/lib/hooks/index.js +1 -1
- package/lib/hooks/use-auto-scroll.js +1 -1
- package/lib/hooks/use-performance-metrics.js +1 -1
- package/lib/hooks/use-protocol-labels.js +1 -1
- package/lib/hooks/use-telemetry.js +1 -1
- package/lib/hooks/use-translate.js +1 -1
- package/lib/index.js +1 -1
- package/lib/jotai-store/Provider.js +1 -1
- package/lib/jotai-store/app.js +1 -1
- package/lib/types/apiItem.js +1 -1
- package/lib/types/async-api.js +1 -1
- package/lib/types/index.js +1 -1
- package/lib/types/protocol.js +1 -1
- package/lib/utils/avro-to-json-schema.js +1 -1
- package/lib/utils/build-menu-items.js +1 -1
- package/lib/utils/find-first-binding.js +1 -1
- package/lib/utils/generate-ast.js +1 -1
- package/lib/utils/generate-channel-link.js +1 -1
- package/lib/utils/generate-message-references-header.js +1 -1
- package/lib/utils/get-schema.js +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/is-equal.js +1 -1
- package/lib/utils/map-channel-to-operations.js +1 -1
- package/lib/utils/modify-payload.js +1 -1
- package/lib/utils/nav-to-api-items.js +1 -1
- package/lib/utils/try-decode-url-component.js +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var R=Object.create;var m=Object.defineProperty;var I=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty;var E=(e,s)=>{for(var t in s)m(e,t,{get:s[t],enumerable:!0})},M=(e,s,t,c)=>{if(s&&typeof s=="object"||typeof s=="function")for(let r of _(s))!w.call(e,r)&&r!==t&&m(e,r,{get:()=>s[r],enumerable:!(c=I(s,r))||c.enumerable});return e};var S=(e,s,t)=>(t=e!=null?R(h(e)):{},M(s||!e||!e.__esModule?m(t,"default",{value:e,enumerable:!0}):t,e)),T=e=>M(m({},"__esModule",{value:!0}),e);var v={};E(v,{RedoclyAsyncAPIDocs:()=>V});module.exports=T(v);var o=require("react/jsx-runtime"),p=require("@redocly/theme"),n=S(require("react")),f=require("./jotai-store/Provider"),l=require("./components/AsyncApiDocs"),y=require("./components/Breadcrumbs"),b=require("./components/AppRouter"),a=require("./hooks");const V=n.default.memo(({pageProps:e,document:s,apiItems:t,routingBasePath:c,protocol:r,downloadUrls:u,markdocOptions:A})=>{const d=(0,a.useTelemetry)(),j=(0,n.useMemo)(()=>({layout:e.apiOptions.layout,protocol:r,routingBasePath:c,downloadUrls:u,definition:s,markdocOptions:A}),[e.apiOptions.layout,r,c,u,s,A]);return(0,a.usePerformanceMetrics)({sendTelemetry:x=>{const i=Object.fromEntries(Object.entries(x).map(([D,O])=>[D.toLowerCase(),O]));d.sendAsyncapiDocsPerformanceMetricsMessage({cls:i.cls,lcp:i.lcp,fcp:i.fcp,ttfb:i.ttfb})}}),(0,p.useMount)(()=>{d.sendAsyncapiDocsViewedMessage({layout:e.apiOptions.layout})}),p.IS_BROWSER?(0,o.jsx)(f.AppProvider,{store:j,children:(0,o.jsxs)(b.AppRouter,{children:[(0,o.jsx)(y.Breadcrumbs,{}),(0,o.jsx)(l.AsyncApiDocs,{apiItems:t})]})}):(0,o.jsxs)(f.AppProvider,{store:j,children:[(0,o.jsx)(y.Breadcrumbs,{}),(0,o.jsx)(l.AsyncApiDocs,{apiItems:t})]})});0&&(module.exports={RedoclyAsyncAPIDocs});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var d=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var g=(o,t)=>{for(var r in t)d(o,r,{get:t[r],enumerable:!0})},A=(o,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of x(t))!u.call(o,a)&&a!==r&&d(o,a,{get:()=>t[a],enumerable:!(s=l(t,a))||s.enumerable});return o};var h=o=>A(d({},"__esModule",{value:!0}),o);var j={};g(j,{ApiInfo:()=>D});module.exports=h(j);var n=require("react/jsx-runtime"),m=require("jotai"),e=require("@redocly/openapi-docs"),f=require("@redocly/theme"),c=require("./common"),i=require("../jotai-store/app"),p=require("../hooks");const D=()=>{const o=(0,m.useAtomValue)(i.definitionAtom),t=(0,m.useAtomValue)(i.routingBasePathAtom),r=(0,m.useAtomValue)(i.markdocOptionsAtom),s=(0,p.useTranslate)(),a=(0,e.saveTextBeforeHeading)((0,e.getValueFromMdParsedExtension)(o.info,"description")||"");return(0,n.jsxs)(e.Section,{sectionId:t,children:[(0,n.jsxs)(c.ApiHeader,{children:[o.info.title," ",o.info.version,(0,n.jsx)(f.PageActions,{pageSlug:t})]}),a&&(0,n.jsx)(e.Markdown,{source:a,markdocOptions:r}),o.info.externalDocs&&(0,n.jsx)(c.ExternalDocumentationWrapper,{children:(0,n.jsx)(e.ExternalDocumentation,{externalDocs:o.info.externalDocs})}),o.info["x-metadata"]&&(0,n.jsx)(e.Metadata,{metadata:o.info["x-metadata"],translate:s})]})};0&&(module.exports={ApiInfo});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var x=Object.create;var m=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var C=(t,o)=>{for(var r in o)m(t,r,{get:o[r],enumerable:!0})},i=(t,o,r,u)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of a(o))!f.call(t,e)&&e!==r&&m(t,e,{get:()=>o[e],enumerable:!(u=R(o,e))||u.enumerable});return t};var I=(t,o,r)=>(r=t!=null?x(c(t)):{},i(o||!t||!t.__esModule?m(r,"default",{value:t,enumerable:!0}):r,t)),g=t=>i(m({},"__esModule",{value:!0}),t);var F={};C(F,{AppRouter:()=>j});module.exports=g(F);var n=require("react/jsx-runtime"),p=I(require("react")),s=require("react-router-dom");const j=p.default.memo(({children:t})=>(0,s.useInRouterContext)()?(0,n.jsx)(n.Fragment,{children:t}):(0,n.jsx)(s.BrowserRouter,{children:t}));0&&(module.exports={AppRouter});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var p=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var P=Object.prototype.hasOwnProperty;var S=(t,r)=>{for(var i in r)p(t,i,{get:r[i],enumerable:!0})},j=(t,r,i,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of x(r))!P.call(t,e)&&e!==i&&p(t,e,{get:()=>r[e],enumerable:!(l=v(r,e))||l.enumerable});return t};var B=t=>j(p({},"__esModule",{value:!0}),t);var w={};S(w,{AsyncApiDocs:()=>b});module.exports=B(w);var n=require("react/jsx-runtime"),m=require("jotai"),s=require("react"),c=require("@redocly/theme"),f=require("./RightPanel"),u=require("./TagBlock"),d=require("./ApiInfo"),h=require("./ChannelSection"),A=require("./MarkdownSection"),g=require("./common"),a=require("../jotai-store/app"),y=require("../hooks");const b=(0,s.memo)(({apiItems:t})=>{const r=(0,m.useAtomValue)(a.routingBasePathAtom),i=(0,m.useAtomValue)(a.definitionAtom);(0,y.useAutoScroll)(r);const l=(0,m.useAtomValue)(a.layoutAtom),e=(0,s.useCallback)(o=>o?.type==="tag"?(0,n.jsx)(u.TagBlock,{tag:o},o.link):o?.type==="channel"?(0,n.jsx)(h.ChannelSection,{item:o},o.link):null,[]);return(0,n.jsxs)(c.ThreePanelLayout,{className:"api-content",id:"api-content",layout:l,collapsedSidebar:!0,children:[(0,n.jsxs)(g.SectionWrapper,{rightPanel:(0,n.jsx)(f.RightPanel,{info:i.info,servers:i.servers}),children:[(0,n.jsx)(d.ApiInfo,{}),t.filter(({type:o})=>o==="markdown").map((o,k)=>(0,n.jsx)(A.MarkdownSection,{item:o},k))]}),t.map(e)]})});0&&(module.exports={AsyncApiDocs});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
var g=Object.create;var o=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var f=(a,r)=>{for(var e in r)o(a,e,{get:r[e],enumerable:!0})},d=(a,r,e,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of h(r))!b.call(a,t)&&t!==e&&o(a,t,{get:()=>r[t],enumerable:!(i=s(r,t))||i.enumerable});return a};var m=(a,r,e)=>(e=a!=null?g(v(a)):{},d(r||!a||!a.__esModule?o(e,"default",{value:a,enumerable:!0}):e,a)),u=a=>d(o({},"__esModule",{value:!0}),a);var j={};f(j,{Breadcrumbs:()=>B});module.exports=u(j);var p=require("react/jsx-runtime"),n=m(require("react")),l=m(require("styled-components")),c=require("@redocly/theme");const B=n.default.memo(()=>(0,p.jsx)(x,{children:(0,p.jsx)(c.Breadcrumbs,{})})),x=l.default.div`
|
|
2
2
|
padding-top: var(--panel-gap-vertical);
|
|
3
3
|
padding-bottom: var(--panel-gap-vertical);
|
|
4
4
|
padding-left: calc(var(--panel-gap-horizontal) * 2);
|
|
5
5
|
padding-right: var(--panel-gap-horizontal);
|
|
6
6
|
height: var(--navbar-height);
|
|
7
|
-
`;
|
|
7
|
+
`;0&&(module.exports={Breadcrumbs});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var s=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var b=(i,r)=>{for(var c in r)s(i,c,{get:r[c],enumerable:!0})},C=(i,r,c,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of m(r))!y.call(i,a)&&a!==c&&s(i,a,{get:()=>r[a],enumerable:!(o=u(r,a))||o.enumerable});return i};var j=i=>C(s({},"__esModule",{value:!0}),i);var _={};b(_,{ChannelBinding:()=>O});module.exports=j(_);var n=require("react/jsx-runtime"),l=require("react"),d=require("@redocly/theme"),t=require("./common"),p=require("../hooks"),x=function(i,r){var c={};for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&r.indexOf(o)<0&&(c[o]=i[o]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(i);a<o.length;a++)r.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(i,o[a])&&(c[o[a]]=i[o[a]]);return c};const O=({binding:i})=>{const[r,c]=(0,l.useState)(!1),{getProtocolLabel:o}=(0,p.useProtocolLabels)({amqp:Object.assign({},i.value||{})}),a=()=>{c(!r)},h=({key:f,value:e})=>{const{bindingVersion:P}=e,g=x(e,["bindingVersion"]);switch(f){case"kafka":return(0,n.jsxs)(n.Fragment,{children:[e.topic&&(0,n.jsxs)(t.HeaderWrapper,{children:[(0,n.jsx)("span",{"data-testid":"topic-label",children:"Topic"}),(0,n.jsx)("span",{children:(0,n.jsx)(t.TagStyled,{borderless:!0,"data-testid":"topic-value",children:e.topic})})]}),e.partitions&&(0,n.jsxs)(t.HeaderWrapper,{children:[(0,n.jsx)("span",{"data-testid":"partitions-label",children:"Partitions"}),(0,n.jsx)("span",{children:(0,n.jsx)(t.TagStyled,{borderless:!0,color:"blue","data-testid":"partitions-value",children:e.partitions})})]}),e.replicas&&(0,n.jsxs)(t.HeaderWrapper,{children:[(0,n.jsx)("span",{"data-testid":"replicas-label",children:"Replicas"}),(0,n.jsx)("span",{children:(0,n.jsx)(t.TagStyled,{borderless:!0,color:"green","data-testid":"replicas-value",children:e.replicas})})]}),e.topicConfiguration&&(0,n.jsxs)("div",{children:[(0,n.jsx)(t.HeaderWrapper,{expandable:!0,onClick:a,children:(0,n.jsx)(t.MoreDetailsButton,{expanded:r})}),r&&(0,n.jsxs)(t.TopicConfigurationWrapper,{children:[e.topicConfiguration["cleanup.policy"]&&(0,n.jsxs)(t.TopicConfiguration,{children:[(0,n.jsx)("span",{children:"\u0421leanup policy"}),(0,n.jsx)("span",{children:k(e.topicConfiguration["cleanup.policy"]).join(", ")})]}),e.topicConfiguration["retention.ms"]&&(0,n.jsxs)(t.TopicConfiguration,{children:[(0,n.jsx)("span",{children:"Retention, ms"}),(0,n.jsx)("span",{children:e.topicConfiguration["retention.ms"]})]}),e.topicConfiguration["retention.bytes"]&&(0,n.jsxs)(t.TopicConfiguration,{children:[(0,n.jsx)("span",{children:"Retention, bytes"}),(0,n.jsx)("span",{children:e.topicConfiguration["retention.bytes"]})]}),e.topicConfiguration["delete.retention.ms"]&&(0,n.jsxs)(t.TopicConfiguration,{children:[(0,n.jsx)("span",{children:"Delete retention, ms"}),(0,n.jsx)("span",{children:e.topicConfiguration["delete.retention.ms"]})]}),e.topicConfiguration["max.message.bytes"]&&(0,n.jsxs)(t.TopicConfiguration,{children:[(0,n.jsx)("span",{children:"Max message bytes"}),(0,n.jsx)("span",{children:e.topicConfiguration["max.message.bytes"]})]}),e.topicConfiguration["confluent.key.schema.validation"]&&(0,n.jsxs)(t.TopicConfiguration,{children:[(0,n.jsx)("span",{children:"Confluent key schema validation"}),(0,n.jsx)("span",{children:String(e.topicConfiguration["confluent.key.schema.validation"])})]}),e.topicConfiguration["confluent.key.subject.name.strategy"]&&(0,n.jsxs)(t.TopicConfiguration,{children:[(0,n.jsx)("span",{children:"Confluent key subject name strategy"}),(0,n.jsx)("span",{children:e.topicConfiguration["confluent.key.subject.name.strategy"]})]}),e.topicConfiguration["confluent.value.schema.validation"]&&(0,n.jsxs)(t.TopicConfiguration,{children:[(0,n.jsx)("span",{children:"Confluent value schema validation"}),(0,n.jsx)("span",{children:String(e.topicConfiguration["confluent.value.schema.validation"])})]}),e.topicConfiguration["confluent.value.subject.name.strategy"]&&(0,n.jsxs)(t.TopicConfiguration,{children:[(0,n.jsx)("span",{children:"Confluent value subject name strategy"}),(0,n.jsx)("span",{children:e.topicConfiguration["confluent.value.subject.name.strategy"]})]})]})]})]});default:return(0,n.jsx)(d.JsonViewer,{data:g,expandLevel:3,controls:!1})}};return(0,n.jsx)(t.BindingPanel,{header:o("channelBinding"),children:h(i)})};function k(i){return Array.isArray(i)?i:[i]}0&&(module.exports={ChannelBinding});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
var p=Object.create;var n=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var h=(r,o)=>{for(var i in o)n(r,i,{get:o[i],enumerable:!0})},l=(r,o,i,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of k(o))!g.call(r,e)&&e!==i&&n(r,e,{get:()=>o[e],enumerable:!(s=f(o,e))||s.enumerable});return r};var y=(r,o,i)=>(i=r!=null?p(x(r)):{},l(o||!r||!r.__esModule?n(i,"default",{value:r,enumerable:!0}):i,r)),L=r=>l(n({},"__esModule",{value:!0}),r);var b={};h(b,{ChannelLinkItem:()=>z});module.exports=L(b);var t=require("react/jsx-runtime"),c=require("react"),d=require("react-router-dom"),a=y(require("styled-components")),m=require("../utils"),v=require("./common/ListIcon");const z=({channel:r,isActive:o})=>{const i=(0,c.useMemo)(()=>(0,m.generateChannelLink)(r),[r]);return(0,t.jsxs)(j,{children:[(0,t.jsx)(v.ListIcon,{size:"22px",color:o?"var(--color-info-border)":"var(--border-color-primary)",style:{marginRight:"var(--spacing-xs)",flexShrink:0}}),(0,t.jsx)(C,{to:i,children:r.title||r.address||r.key})]})},j=a.default.div`
|
|
2
2
|
padding: var(--spacing-xxs) var(--spacing-md);
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
font-size: var(--font-size-md);
|
|
6
6
|
cursor: pointer;
|
|
7
|
-
`,
|
|
7
|
+
`,C=(0,a.default)(d.Link)`
|
|
8
8
|
text-decoration: var(--link-decoration);
|
|
9
9
|
color: var(--link-color-primary);
|
|
10
10
|
font-weight: var(--link-font-weight);
|
|
@@ -19,4 +19,4 @@
|
|
|
19
19
|
color: var(--link-color-primary-hover);
|
|
20
20
|
text-decoration: var(--link-decoration-hover);
|
|
21
21
|
}
|
|
22
|
-
`;
|
|
22
|
+
`;0&&(module.exports={ChannelLinkItem});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
var b=Object.create;var m=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var y=(r,e)=>{for(var t in e)m(r,t,{get:e[t],enumerable:!0})},p=(r,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of d(e))!v.call(r,o)&&o!==t&&m(r,o,{get:()=>e[o],enumerable:!(a=u(e,o))||a.enumerable});return r};var P=(r,e,t)=>(t=r!=null?b(x(r)):{},p(e||!r||!r.__esModule?m(t,"default",{value:r,enumerable:!0}):t,r)),k=r=>p(m({},"__esModule",{value:!0}),r);var O={};y(O,{ChannelParameters:()=>F});module.exports=k(O);var s=require("react/jsx-runtime"),i=require("@redocly/theme"),c=P(require("styled-components")),l=require("jotai"),n=require("@redocly/openapi-docs"),g=require("./JsonSchema"),h=require("../jotai-store/app"),f=require("./common");const F=({parameters:r,id:e})=>{const t=(0,l.useAtomValue)(h.routingBasePathAtom);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(L,{children:[(0,s.jsx)(f.LinkToField,{to:(0,i.combineUrls)(t,(0,n.makeDeepLink)(e,"parameters"))}),"Parameters"]}),Object.entries(r).map(([a,o])=>{const j={type:"object",properties:{[a]:Object.assign(Object.assign({},o),{type:o.location||""})}};return(0,s.jsx)(g.JsonSchema,{schema:j,slug:(0,i.combineUrls)(t,(0,n.makeDeepLink)(e,"parameters"))},a)})]})},L=(0,c.default)(i.H4)`
|
|
2
2
|
margin: var(--spacing-md) 0 0 0;
|
|
3
3
|
position: relative;
|
|
4
4
|
:hover {
|
|
5
|
-
${
|
|
5
|
+
${i.LinkIcon} {
|
|
6
6
|
opacity: 1;
|
|
7
7
|
visibility: visible;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
`;
|
|
10
|
+
`;0&&(module.exports={ChannelParameters});
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
var M=Object.create;var f=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty;var V=(o,r)=>{for(var t in r)f(o,t,{get:r[t],enumerable:!0})},H=(o,r,t,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let d of T(r))!W.call(o,d)&&d!==t&&f(o,d,{get:()=>r[d],enumerable:!(u=R(r,d))||u.enumerable});return o};var O=(o,r,t)=>(t=o!=null?M(N(o)):{},H(r||!o||!o.__esModule?f(t,"default",{value:o,enumerable:!0}):t,o)),$=o=>H(f({},"__esModule",{value:!0}),o);var J={};V(J,{ChannelSection:()=>z});module.exports=$(J);var n=require("react/jsx-runtime"),c=O(require("react")),m=O(require("styled-components")),b=require("jotai"),a=require("@redocly/openapi-docs"),l=require("@redocly/theme"),v=require("../jotai-store/app"),p=require("./common"),P=require("./ChannelParameters"),_=require("./ServersListPanel"),L=require("./ChannelBinding"),I=require("./MessageSection"),k=require("./OperationSection"),w=require("../hooks");const z=c.default.memo(({item:o})=>{var r;const t=(0,b.useAtomValue)(v.layoutAtom),u=(0,b.useAtomValue)(v.routingBasePathAtom),d=(0,b.useAtomValue)(v.definitionAtom),h=t===l.LayoutVariant.STACKED,e=(r=d.channels)===null||r===void 0?void 0:r[o.id],{getProtocolLabel:A}=(0,w.useProtocolLabels)(e?.bindings),g=(0,c.useMemo)(()=>Object.entries(d.servers||{}).map(([s,i])=>({key:s,value:i})).filter(({value:s})=>{var i;return(i=e?.servers)===null||i===void 0?void 0:i.some(B=>B.host===s.host)}),[e?.servers,d.servers]),j=(0,c.useMemo)(()=>Object.entries(e?.bindings||{}).map(([s,i])=>({key:s,value:i})),[e?.bindings]),C=(0,c.useMemo)(()=>Object.entries(e?.messages||{}).map(([s,i])=>({key:s,value:i})),[e?.messages]),y=(0,c.useMemo)(()=>o.items.filter(s=>{var i;return s.action==="send"&&((i=d.operations)===null||i===void 0?void 0:i[s.id])}),[d.operations,o.items]),S=(0,c.useMemo)(()=>o.items.filter(s=>{var i;return s.action==="receive"&&((i=d.operations)===null||i===void 0?void 0:i[s.id])}),[d.operations,o.items]),D=(0,c.useMemo)(()=>{var s;return(s=e?.["x-badges"])===null||s===void 0?void 0:s.map(i=>Object.assign(Object.assign({},i),{position:i.position||"after"}))},[e]);if(!e)return null;const x=(0,l.combineUrls)(u,o.dataSectionId);return(0,n.jsxs)(K,{children:[(0,n.jsxs)(U,{sectionId:x,children:[(0,n.jsx)(a.Row,{layout:t,children:(0,n.jsx)(a.SamplesMiddlePanel,{compact:!0,className:"api-info",isStacked:h,children:(0,n.jsx)(p.ActionTag,{color:A("channel").toLowerCase(),children:A("channel")})})}),(0,n.jsxs)(a.Row,{layout:t,children:[(0,n.jsxs)(a.SamplesMiddlePanel,{compact:!0,className:"api-info",isStacked:h,children:[(0,n.jsxs)(F,{children:[(0,n.jsxs)(q,{children:[(0,n.jsx)(a.CustomBadges,{badges:D,children:e?.title||e?.address||o.id}),(0,n.jsx)(p.ShareLink,{to:x,"aria-label":`link to ${o.label}`})]}),(0,n.jsx)(l.PageActions,{pageSlug:x})]}),e.address&&(0,n.jsxs)(p.TagWithIcon,{icon:(0,n.jsx)(l.CurveAutoColonIcon,{size:"14px"}),children:["name: ",(0,n.jsx)("span",{children:e.address})]}),(0,n.jsx)(p.Information,{summary:e.summary,description:e.description,externalDocs:e.externalDocs}),(0,n.jsx)(E,{Hook:l.AfterAsyncApiChannelDescription,props:{channel:e}}),e.parameters&&(0,n.jsx)(P.ChannelParameters,{parameters:e.parameters,id:o.link})]}),(0,n.jsxs)(a.OperationSamplesPanel,{isStacked:h,className:"panel-container-response-samples",children:[!!g?.length&&(0,n.jsx)(_.ServersListPanel,{servers:g,hideHeader:!0}),!!j.length&&(0,n.jsx)(L.ChannelBinding,{binding:j[0]})]})]}),C.length>0?(0,n.jsx)(I.MessageSection,{messages:C,id:o.link}):null]}),y.length>0?(0,n.jsx)(k.OperationSection,{operations:y,type:"send",id:o.link}):null,S.length>0&&y.length>0?(0,n.jsx)(a.Row,{layout:t,children:(0,n.jsx)(a.SamplesMiddlePanel,{isStacked:h,children:(0,n.jsx)(G,{})})}):null,S.length>0?(0,n.jsx)(k.OperationSection,{operations:S,type:"receive",id:o.link}):null]})});function E(o){if(!o.Hook)return null;const r=o.Hook(o.props),t=r&&r.html;return t?(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:t}}):r}const K=m.default.div`
|
|
2
2
|
width: 100%;
|
|
3
3
|
|
|
4
4
|
&:not(:last-child) {
|
|
5
5
|
border-bottom: 1px solid var(--border-color-primary);
|
|
6
6
|
}
|
|
7
|
-
`,
|
|
7
|
+
`,U=(0,m.default)(a.Section)`
|
|
8
8
|
padding: var(--spacing-xxl) 0 var(--spacing-base);
|
|
9
9
|
scroll-margin-top: calc(var(--navbar-height) - var(--spacing-base)) !important;
|
|
10
|
-
`,
|
|
10
|
+
`,q=(0,m.default)(l.H2)`
|
|
11
11
|
margin: 0 0 var(--spacing-xs) 0;
|
|
12
12
|
display: flex;
|
|
13
13
|
align-items: center;
|
|
14
14
|
gap: var(--spacing-xs);
|
|
15
15
|
flex-wrap: wrap;
|
|
16
16
|
:hover {
|
|
17
|
-
${
|
|
17
|
+
${l.LinkIcon} {
|
|
18
18
|
opacity: 1;
|
|
19
19
|
visibility: visible;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,F=m.default.div`
|
|
23
23
|
display: flex;
|
|
24
24
|
align-items: flex-start;
|
|
25
|
-
`,
|
|
25
|
+
`,G=m.default.div`
|
|
26
26
|
border-bottom: 1px solid var(--border-color-secondary);
|
|
27
|
-
`;
|
|
27
|
+
`;0&&(module.exports={ChannelSection});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var b=Object.create;var i=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var j=(e,n)=>{for(var r in n)i(e,r,{get:n[r],enumerable:!0})},m=(e,n,r,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of h(n))!v.call(e,t)&&t!==r&&i(e,t,{get:()=>n[t],enumerable:!(s=g(n,t))||s.enumerable});return e};var k=(e,n,r)=>(r=e!=null?b(y(e)):{},m(n||!e||!e.__esModule?i(r,"default",{value:e,enumerable:!0}):r,e)),D=e=>m(i({},"__esModule",{value:!0}),e);var A={};j(A,{DownloadSpecification:()=>C});module.exports=D(A);var o=require("react/jsx-runtime"),c=require("react"),l=k(require("styled-components")),a=require("@redocly/theme"),p=require("@redocly/openapi-docs"),f=require("jotai"),w=require("../jotai-store/app"),x=require("../hooks");function I(){const e=(0,x.useTelemetry)(),n=(0,f.useAtomValue)(w.downloadUrlsAtom),r=(0,p.useDownloadInfo)({downloadUrls:n}),s=(0,c.useCallback)(t=>{switch(t){case"yaml":return(0,o.jsx)(a.DocumentIcon,{});case"json":return(0,o.jsx)(a.JsonIcon,{});default:return(0,o.jsx)(a.FileIcon,{})}},[]);return r?(0,o.jsx)(z,{children:(r||[]).map(({title:t,url:d,iconType:u})=>(0,o.jsxs)(_,{onClick:()=>e.sendAsyncapiDocsDownloadDefinitionClickedMessage(),children:[(0,o.jsxs)(F,{children:[s(u),(0,o.jsx)("a",{href:d,target:"_blank",download:!0,rel:"noreferrer",children:t})]}),(0,o.jsx)("a",{href:d,target:"_blank",download:!0,rel:"noreferrer",children:(0,o.jsx)(a.Button,{variant:"text",size:"small",icon:(0,o.jsx)(a.DownloadIcon,{})})})]},t))}):(0,o.jsx)(o.Fragment,{})}const C=(0,c.memo)(I),_=l.default.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: baseline;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
padding-bottom: 0px;
|
|
11
11
|
border-bottom: none;
|
|
12
12
|
}
|
|
13
|
-
`,
|
|
13
|
+
`,F=l.default.span`
|
|
14
14
|
display: flex;
|
|
15
15
|
width: calc(100% - 25px);
|
|
16
16
|
gap: var(--spacing-xs);
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
overflow: hidden;
|
|
29
29
|
white-space: nowrap;
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,z=l.default.div`
|
|
32
32
|
display: flex;
|
|
33
33
|
align-items: center;
|
|
34
34
|
align-self: flex-start;
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
flex-direction: column;
|
|
37
37
|
gap: var(--spacing-sm);
|
|
38
38
|
font-size: var(--font-size-base);
|
|
39
|
-
`;
|
|
39
|
+
`;0&&(module.exports={DownloadSpecification});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
var L=Object.create;var c=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var M=(e,o)=>{for(var n in o)c(e,n,{get:o[n],enumerable:!0})},y=(e,o,n,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of B(o))!T.call(e,t)&&t!==n&&c(e,t,{get:()=>o[t],enumerable:!(s=_(o,t))||s.enumerable});return e};var O=(e,o,n)=>(n=e!=null?L(N(e)):{},y(o||!e||!e.__esModule?c(n,"default",{value:e,enumerable:!0}):n,e)),V=e=>y(c({},"__esModule",{value:!0}),e);var X={};M(X,{ItemsNavigation:()=>W});module.exports=V(X);var a=require("react/jsx-runtime"),i=O(require("styled-components")),k=require("react-router-dom"),S=require("@redocly/openapi-docs"),d=require("@redocly/theme"),v=require("jotai/index"),p=require("react"),h=require("../jotai-store/app"),A=require("./common"),I=require("../hooks");const u=8,W=({items:e,firstChannelBinding:o})=>{const[n,s]=(0,p.useState)(!1),{getProtocolLabel:t}=(0,I.useProtocolLabels)(o),z=(0,k.useNavigate)(),j=(0,v.useAtomValue)(h.layoutAtom),x=(0,v.useAtomValue)(h.definitionAtom),C=j===d.LayoutVariant.STACKED,{displayItems:P,count:b}=(0,p.useMemo)(()=>{const r=e?.filter(l=>{var g;return l.type==="channel"&&((g=x.channels)===null||g===void 0?void 0:g[l.id])})||[],m=n?r:r.slice(0,u),f=!n&&r.length>u?r.length-u:0;return{displayItems:m,count:f}},[e,n,x.channels]),E=r=>{z(r)};return(0,a.jsxs)(D,{isStacked:C,children:[(0,a.jsx)(R,{children:t("channels")}),P.map(({id:r,type:m,label:f,link:l})=>m==="channel"?(0,a.jsx)(H,{variant:"outlined",size:"large",onClick:()=>E(l),children:(0,a.jsxs)("span",{children:[(0,a.jsx)(A.ActionTag,{color:t("channel").toLowerCase(),children:t("channel")}),(0,a.jsx)(K,{children:f})]})},r):null),!n&&!!b&&(0,a.jsxs)(w,{variant:"link",size:"large","data-testid":"show-more-operations",fullWidth:!0,onClick:()=>s(!0),children:["Show ",b," more..."]})]})},D=(0,i.default)(S.SamplesPanel)`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: var(--spacing-xxs);
|
|
5
5
|
padding-top: var(--spacing-xxl);
|
|
6
|
-
`,
|
|
6
|
+
`,w=(0,i.default)(d.Button)`
|
|
7
7
|
& + & {
|
|
8
8
|
margin-left: 0;
|
|
9
9
|
}
|
|
10
|
-
`,
|
|
10
|
+
`,H=(0,i.default)(w)`
|
|
11
11
|
border-radius: var(--border-radius);
|
|
12
12
|
background: var(--bg-color);
|
|
13
13
|
justify-content: space-between;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
content: '→';
|
|
28
28
|
line-height: var(--line-height-base);
|
|
29
29
|
}
|
|
30
|
-
`,
|
|
30
|
+
`,K=i.default.span`
|
|
31
31
|
font-family: var(--font-family-base);
|
|
32
32
|
font-size: var(--font-size-base);
|
|
33
33
|
line-height: var(--line-height-base);
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
white-space: nowrap;
|
|
37
37
|
text-overflow: ellipsis;
|
|
38
38
|
overflow-x: hidden;
|
|
39
|
-
`,
|
|
39
|
+
`,R=i.default.span`
|
|
40
40
|
font-size: var(--font-size-base);
|
|
41
41
|
line-height: var(--line-height-base);
|
|
42
42
|
font-weight: var(--font-weight-bold);
|
|
43
43
|
color: var(--text-color-primary);
|
|
44
44
|
margin: var(--spacing-sm) 0 var(--spacing-xxs) 0;
|
|
45
|
-
`;
|
|
45
|
+
`;0&&(module.exports={ItemsNavigation});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
var a=Object.create;var d=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var h=(i,o)=>{for(var n in o)d(i,n,{get:o[n],enumerable:!0})},f=(i,o,n,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of g(o))!x.call(i,t)&&t!==n&&d(i,t,{get:()=>o[t],enumerable:!(r=m(o,t))||r.enumerable});return i};var S=(i,o,n)=>(n=i!=null?a(_(i)):{},f(o||!i||!i.__esModule?d(n,"default",{value:i,enumerable:!0}):n,i)),j=i=>f(d({},"__esModule",{value:!0}),i);var J={};h(J,{JsonSchema:()=>O});module.exports=j(J);var p=require("react/jsx-runtime"),e=require("@redocly/openapi-docs"),u=S(require("styled-components"));function O({options:i,schemaResolved:o,schema:n,slug:r,onOneOfChange:t}){var s,l,c;if(!n&&!o)return null;const v={openapi:"3.0.0",info:{version:"1",description:"test",title:"test"},paths:{},"x-root":((l=(s=o?.components)===null||s===void 0?void 0:s.schemas)===null||l===void 0?void 0:l.__root)||n,components:{schemas:Object.assign({},(c=o?.components)===null||c===void 0?void 0:c.schemas)}};return(0,p.jsx)(b,{children:(0,p.jsx)(e.StoreProvider,{options:i,definition:v,children:(0,p.jsx)(e.RedocSchema,{pointer:"#/x-root",slug:r,onOneOfChange:t})})})}const b=u.default.div`
|
|
2
2
|
& > div > div {
|
|
3
3
|
padding-left: 0;
|
|
4
4
|
padding-right: 0;
|
|
5
5
|
}
|
|
6
|
-
`;
|
|
6
|
+
`;0&&(module.exports={JsonSchema});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
var k=Object.create;var c=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var A=(t,o)=>{for(var r in o)c(t,r,{get:o[r],enumerable:!0})},l=(t,o,r,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of x(o))!u.call(t,a)&&a!==r&&c(t,a,{get:()=>o[a],enumerable:!(i=S(o,a))||i.enumerable});return t};var O=(t,o,r)=>(r=t!=null?k(j(t)):{},l(o||!t||!t.__esModule?c(r,"default",{value:t,enumerable:!0}):r,t)),_=t=>l(c({},"__esModule",{value:!0}),t);var w={};A(w,{MarkdownSection:()=>v});module.exports=_(w);var n=require("react/jsx-runtime"),e=require("jotai"),g=O(require("styled-components")),s=require("@redocly/openapi-docs"),d=require("@redocly/theme"),p=require("../utils"),m=require("../jotai-store/app");const v=({item:t})=>{const o=(0,e.useAtomValue)(m.markdocOptionsAtom),r=(0,e.useAtomValue)(m.routingBasePathAtom),i=(0,p.generateAst)(t.ast);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f,{sectionId:(0,d.combineUrls)(r,t.dataSectionId),children:(0,n.jsx)(s.Markdown,{ast:i,markdocOptions:o})}),t.items.map(a=>{const h=(0,p.generateAst)(a.ast);return(0,n.jsx)(f,{sectionId:(0,d.combineUrls)(r,a.dataSectionId),children:(0,n.jsx)(s.Markdown,{ast:h,markdocOptions:o})},a.link)})]})},f=(0,g.default)(s.Section)`
|
|
2
2
|
scroll-margin-top: calc(var(--navbar-height)) !important;
|
|
3
|
-
`;
|
|
3
|
+
`;0&&(module.exports={MarkdownSection});
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
var T=Object.create;var p=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var z=(o,n)=>{for(var t in n)p(o,t,{get:n[t],enumerable:!0})},b=(o,n,t,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of $(n))!k.call(o,r)&&r!==t&&p(o,r,{get:()=>n[r],enumerable:!(l=_(n,r))||l.enumerable});return o};var D=(o,n,t)=>(t=o!=null?T(j(o)):{},b(n||!o||!o.__esModule?p(t,"default",{value:o,enumerable:!0}):t,o)),F=o=>b(p({},"__esModule",{value:!0}),o);var B={};z(B,{Message:()=>R});module.exports=F(B);var e=require("react/jsx-runtime"),h=require("react"),v=D(require("styled-components")),i=require("@redocly/theme"),u=require("jotai"),a=require("@redocly/openapi-docs"),m=require("./common"),g=require("./JsonSchema"),y=require("../utils"),L=require("../hooks"),d=require("../jotai-store/app");const R=(0,h.memo)(({message:o,sectionId:n,id:t,onOneOfChange:l})=>{var r;const c=(0,u.useAtomValue)(d.routingBasePathAtom),s=(0,u.useAtomValue)(d.definitionAtom),{getProtocolLabel:P}=(0,L.useProtocolLabels)(),x=(0,h.useMemo)(()=>{var f;if(!((f=s?.components)===null||f===void 0)&&f.schemas)return{openapi:"3.0.0",info:{version:"1",title:"AsyncAPI",description:""},paths:{},components:{schemas:s.components.schemas}}},[(r=s?.components)===null||r===void 0?void 0:r.schemas]);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(m.Information,{summary:o.summary,description:o.description,externalDocs:o.externalDocs}),o.headers&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(A,{children:[(0,e.jsx)(m.LinkToField,{to:(0,i.combineUrls)(c,(0,a.makeDeepLink)(n,`messages&m=${t}/headers`))}),"Headers"]}),(0,e.jsx)(g.JsonSchema,{schema:(0,y.getSchema)(o.headers),schemaResolved:x,slug:(0,i.combineUrls)(c,(0,a.makeDeepLink)(n,`messages&m=${t}&t=headers`))})]}),o.payload&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(A,{children:[(0,e.jsx)(m.LinkToField,{to:(0,i.combineUrls)(c,(0,a.makeDeepLink)(n,`messages&m=${t}/payload`))}),P("payload"),o.contentType&&(0,e.jsx)(w,{children:o.contentType})]}),(0,e.jsx)(g.JsonSchema,{onOneOfChange:l,schema:(0,y.getSchema)(o.payload),schemaResolved:x,slug:(0,i.combineUrls)(c,(0,a.makeDeepLink)(n,`messages&m=${t}&t=payload`))})]})]})}),A=(0,v.default)(i.H4)`
|
|
2
2
|
margin: var(--spacing-md) 0 0 0;
|
|
3
3
|
font-size: 18px;
|
|
4
4
|
position: relative;
|
|
5
5
|
:hover {
|
|
6
|
-
${
|
|
6
|
+
${i.LinkIcon} {
|
|
7
7
|
opacity: 1;
|
|
8
8
|
visibility: visible;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
`,
|
|
11
|
+
`,w=v.default.span`
|
|
12
12
|
margin: 0px var(--spacing-xs);
|
|
13
13
|
color: var(--text-color-primary);
|
|
14
14
|
line-height: var(--line-height-lg);
|
|
15
15
|
font-family: var(--font-family-base);
|
|
16
16
|
font-weight: var(--font-weight-regular);
|
|
17
17
|
font-size: var(--font-size-lg);
|
|
18
|
-
`;
|
|
18
|
+
`;0&&(module.exports={Message});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
var q=Object.create;var d=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var Q=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var w=(e,s)=>{for(var i in s)d(e,i,{get:s[i],enumerable:!0})},u=(e,s,i,r)=>{if(s&&typeof s=="object"||typeof s=="function")for(let a of _(s))!S.call(e,a)&&a!==i&&d(e,a,{get:()=>s[a],enumerable:!(r=R(s,a))||r.enumerable});return e};var x=(e,s,i)=>(i=e!=null?q(Q(e)):{},u(s||!e||!e.__esModule?d(i,"default",{value:e,enumerable:!0}):i,e)),I=e=>u(d({},"__esModule",{value:!0}),e);var W={};w(W,{MessageAMQPReferences:()=>O});module.exports=I(W);var n=require("react/jsx-runtime"),c=x(require("react")),y=require("react-router-dom"),t=require("@redocly/theme"),M=require("jotai"),g=x(require("styled-components")),b=require("@redocly/openapi-docs"),j=require("../utils"),f=require("./ChannelLinkItem"),k=require("./../jotai-store/app");const O=c.default.memo(({messageKey:e})=>{const s=(0,M.useAtomValue)(k.definitionAtom),i=(0,y.useLocation)(),r=(0,t.useActiveSectionId)(i,!0),a=(0,c.useMemo)(()=>{var o,p;const l={exchanges:[],queues:[]};if(!s.channels)return l;for(const[P,m]of Object.entries(s.channels))if(m.messages&&m.messages[e]){const h=Object.assign(Object.assign({},m),{key:P});((p=(o=m.bindings)===null||o===void 0?void 0:o.amqp)===null||p===void 0?void 0:p.is)==="routingKey"?l.exchanges.push(h):l.queues.push(h)}return l},[e,s]),A=(0,c.useMemo)(()=>(0,j.generateMessageReferencesHeader)(a),[a]);return(0,n.jsxs)(T,{className:"panel-messages-samples",header:()=>(0,n.jsx)(t.PanelHeader,{isExpandable:!1,children:A}),"data-component-name":"MessageAMQPReferences/MessageAMQPReferences",children:[!!a.exchanges.length&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v,{children:"Exchanges"}),a.exchanges.map(o=>(0,n.jsx)(f.ChannelLinkItem,{channel:o,isActive:r.endsWith(o.key)},o.key))]}),!!a.queues.length&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v,{children:"Queues"}),a.queues.map(o=>(0,n.jsx)(f.ChannelLinkItem,{channel:o,isActive:r.endsWith(o.key)},o.key))]})]})}),v=(0,g.default)(t.Typography)`
|
|
2
2
|
font-weight: var(--font-weight-semibold);
|
|
3
3
|
font-size: var(--font-size-sm);
|
|
4
4
|
padding: var(--spacing-xxs) var(--spacing-md);
|
|
5
|
-
`,
|
|
6
|
-
${
|
|
5
|
+
`,T=(0,g.default)(t.Panel)`
|
|
6
|
+
${t.PanelBody} {
|
|
7
7
|
background-color: var(--layer-color-ontonal);
|
|
8
8
|
padding: 0;
|
|
9
9
|
display: flex;
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
overflow-y: scroll;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
${
|
|
15
|
+
${t.PanelHeader} {
|
|
16
16
|
display: flex;
|
|
17
17
|
justify-content: start;
|
|
18
18
|
align-items: center;
|
|
19
19
|
gap: var(--spacing-xs);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
${
|
|
22
|
+
${b.SamplesMiddlePanel} {
|
|
23
23
|
padding: 0 var(--spacing-md);
|
|
24
24
|
}
|
|
25
|
-
`;
|
|
25
|
+
`;0&&(module.exports={MessageAMQPReferences});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var i=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var f=(r,n)=>{for(var d in n)i(r,d,{get:n[d],enumerable:!0})},b=(r,n,d,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let e of g(n))!y.call(r,e)&&e!==d&&i(r,e,{get:()=>n[e],enumerable:!(a=m(n,e))||a.enumerable});return r};var u=r=>b(i({},"__esModule",{value:!0}),r);var j={};f(j,{MessageBinding:()=>S});module.exports=u(j);var t=require("react/jsx-runtime"),s=require("@redocly/theme"),o=require("./common"),c=require("./JsonSchema"),l=require("../utils"),k=function(r,n){var d={};for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&n.indexOf(a)<0&&(d[a]=r[a]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,a=Object.getOwnPropertySymbols(r);e<a.length;e++)n.indexOf(a[e])<0&&Object.prototype.propertyIsEnumerable.call(r,a[e])&&(d[a[e]]=r[a[e]]);return d};const S=({binding:r,slug:n})=>(0,t.jsx)(o.BindingPanel,{header:"Message configuration",children:(({key:a,value:e})=>{const{bindingVersion:O}=e,h=k(e,["bindingVersion"]);switch(a){case"kafka":const p={type:"object",properties:{key:(0,l.getSchema)(e.key)}};return(0,t.jsxs)(t.Fragment,{children:[e.key&&(0,t.jsx)(c.JsonSchema,{schema:p,slug:n}),e.schemaIdLocation&&(0,t.jsxs)(o.HeaderWrapper,{children:[(0,t.jsx)("span",{"data-testid":"schema-id-location-label",children:"Schema ID Location"}),(0,t.jsx)("span",{children:(0,t.jsx)(o.TagStyled,{borderless:!0,"data-testid":"schema-id-location-value",children:e.schemaIdLocation})})]}),e.schemaIdPayloadEncoding&&(0,t.jsxs)(o.HeaderWrapper,{children:[(0,t.jsx)("span",{"data-testid":"schema-id-payload-encoding-label",children:"Schema ID payload encoding"}),(0,t.jsx)("span",{children:(0,t.jsx)(o.TagStyled,{borderless:!0,"data-testid":"schema-id-payload-encoding-value",children:e.schemaIdPayloadEncoding})})]}),e.schemaLookupStrategy&&(0,t.jsxs)(o.HeaderWrapper,{children:[(0,t.jsx)("span",{"data-testid":"schema-lookup-strategy-label",children:"Schema lookup strategy"}),(0,t.jsx)("span",{children:(0,t.jsx)(o.TagStyled,{borderless:!0,"data-testid":"schema-lookup-strategy-value",children:e.schemaLookupStrategy})})]})]});default:return(0,t.jsx)(s.JsonViewer,{data:h,expandLevel:3,controls:!1})}})(r)});0&&(module.exports={MessageBinding});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var t=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var i=(o,e)=>{for(var s in e)t(o,s,{get:e[s],enumerable:!0})},g=(o,e,s,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of n(e))!u.call(o,r)&&r!==s&&t(o,r,{get:()=>e[r],enumerable:!(m=l(e,r))||m.enumerable});return o};var x=o=>g(t({},"__esModule",{value:!0}),o);var M={};i(M,{MessageReferences:()=>A});module.exports=x(M);var c=require("react/jsx-runtime"),p=require("jotai"),a=require("./MessageAMQPReferences"),f=require("./../jotai-store/app");const A=({messageKey:o})=>{switch((0,p.useAtomValue)(f.protocolAtom)){case"amqp":return(0,c.jsx)(a.MessageAMQPReferences,{messageKey:o});default:return null}};0&&(module.exports={MessageReferences});
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
var U=Object.create;var k=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var Q=Object.getOwnPropertyNames;var X=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var Z=(e,s)=>{for(var r in s)k(e,r,{get:s[r],enumerable:!0})},R=(e,s,r,m)=>{if(s&&typeof s=="object"||typeof s=="function")for(let p of Q(s))!Y.call(e,p)&&p!==r&&k(e,p,{get:()=>s[p],enumerable:!(m=J(s,p))||m.enumerable});return e};var T=(e,s,r)=>(r=e!=null?U(X(e)):{},R(s||!e||!e.__esModule?k(r,"default",{value:e,enumerable:!0}):r,e)),ee=e=>R(k({},"__esModule",{value:!0}),e);var le={};Z(le,{MessageSection:()=>ae});module.exports=ee(le);var n=require("react/jsx-runtime"),f=T(require("styled-components")),S=require("jotai"),B=require("react-router-dom"),i=require("@redocly/openapi-docs"),l=require("@redocly/theme"),a=T(require("react")),oe=T(require("openapi-sampler")),W=require("./SamplesPanel"),z=require("./MessageBinding"),H=require("./MessageReferences"),v=require("../jotai-store/app"),F=require("./Message"),M=require("../utils"),_=require("./common"),K=require("../hooks");const ne=3,ae=a.default.memo(({messages:e,id:s})=>{var r;const m=(0,B.useLocation)(),p=(0,a.useMemo)(()=>e.find(o=>(0,i.pathIncludesLink)(m,`m=${o.key}`))||e[0],[e,m]),[c,E]=(0,a.useState)(p),[b,w]=(0,a.useState)(c.value.payload),N=(0,a.useCallback)(o=>{const t=(0,M.modifyPayload)(b,o);t&&w(t)},[]),u=(0,S.useAtomValue)(v.definitionAtom),V=(0,a.useCallback)(()=>{var o;return c.value.examples||[{payload:oe.sample(Object.assign({},(0,M.getSchema)(b)),{},!((o=u?.components)===null||o===void 0)&&o.schemas?{components:{schemas:u.components.schemas}}:void 0)}]},[b,c.value.examples,(r=u?.components)===null||r===void 0?void 0:r.schemas]),A=(0,S.useAtomValue)(v.layoutAtom),g=(0,S.useAtomValue)(v.routingBasePathAtom),P=A===l.LayoutVariant.STACKED,y=(0,a.useMemo)(()=>e.map(o=>({label:o.value.title||o.value.name||o.key,value:o.key})),[e]),[x,q]=(0,a.useState)(!1),L=(0,a.useRef)(null),I=(0,K.useTelemetry)();(0,a.useEffect)(()=>{var o;const t=e.find(d=>(0,i.pathIncludesLink)(m,`m=${d.key}`));t&&(E(t),!((o=t?.value)===null||o===void 0)&&o.payload&&w(t.value.payload))},[m,e]);const O=(0,a.useCallback)(({value:o})=>{var t;const d=e.find(h=>h.key===o);d&&(I.sendAsyncapiDocsSwitchMessageClickedMessage({message:d.key}),E(d),!((t=d?.value)===null||t===void 0)&&t.payload&&w(d.value.payload))},[e,I]),C=(0,a.useMemo)(()=>Object.entries(c.value.bindings||{}).map(([o,t])=>({key:o,value:t})),[c.value.bindings]),j=(0,a.useMemo)(()=>(0,l.combineUrls)(g,(0,i.makeDeepLink)(s,`messages&m=${c.key}`)),[s,g,c.key]);(0,a.useEffect)(()=>{if(!L.current)return;const o=()=>{var t;const d=(t=L.current)===null||t===void 0?void 0:t.querySelectorAll('button[role="tab"]'),h=Array.from(d||[]).some(D=>D.offsetWidth<D.scrollWidth);h!==x&&q(h)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[x,y]);const G=(0,a.useMemo)(()=>(0,l.combineUrls)(g,(0,i.makeDeepLink)(s,"messages")),[s,g]);return(0,n.jsxs)(te,{"data-component-name":"MessageSection/MessageSection",children:[(0,n.jsx)(i.Row,{layout:A,children:(0,n.jsxs)(i.SamplesMiddlePanel,{isStacked:P,children:[(0,n.jsxs)(se,{children:[(0,n.jsx)(_.LinkToField,{to:G}),"Messages"]}),e.length>1?(0,n.jsxs)($,{children:["Accepts ",(0,n.jsx)("span",{children:"one of"})," the following messages:"]}):(0,n.jsx)($,{children:"Accepts the following message:"})]})}),(0,n.jsxs)(i.Row,{layout:A,children:[(0,n.jsxs)(i.SamplesMiddlePanel,{isStacked:P,children:[(0,n.jsxs)(ie,{children:[(0,n.jsx)(_.LinkToField,{to:j}),y.length>ne||x?(0,n.jsx)(i.Dropdown,{options:y,value:c.key,onChange:O}):(0,n.jsx)(l.Segmented,{ref:L,size:"small",value:c.key,options:y,onChange:O})]}),(0,n.jsx)(F.Message,{message:c.value,sectionId:s,id:c.key,onOneOfChange:N})]}),(0,n.jsxs)(i.OperationSamplesPanel,{isStacked:P,className:"panel-container-response-samples",children:[(0,n.jsx)(W.SamplesPanel,{examples:V()}),!!C.length&&(0,n.jsx)(z.MessageBinding,{binding:C[0],slug:j}),(0,n.jsx)(H.MessageReferences,{messageKey:c.key})]})]})]})}),te=f.default.div`
|
|
2
2
|
padding: var(--spacing-xl) 0 0 0;
|
|
3
|
-
`,
|
|
3
|
+
`,se=(0,f.default)(l.H4)`
|
|
4
4
|
margin: 0 0 var(--spacing-xs) 0;
|
|
5
5
|
position: relative;
|
|
6
6
|
:hover {
|
|
7
|
-
${
|
|
7
|
+
${l.LinkIcon} {
|
|
8
8
|
opacity: 1;
|
|
9
9
|
visibility: visible;
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
`,$=(0,f.default)(l.Typography)`
|
|
13
13
|
& > span {
|
|
14
14
|
font-weight: var(--font-weight-bold);
|
|
15
15
|
}
|
|
16
16
|
margin: 0 0 var(--spacing-sm) 0;
|
|
17
|
-
`,
|
|
17
|
+
`,ie=f.default.div`
|
|
18
18
|
position: relative;
|
|
19
19
|
:hover {
|
|
20
|
-
${
|
|
20
|
+
${l.LinkIcon} {
|
|
21
21
|
opacity: 1;
|
|
22
22
|
visibility: visible;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
`;
|
|
25
|
+
`;0&&(module.exports={MessageSection});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TFunction } from '@redocly/theme/core/openapi';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
interface MetadataProps {
|
|
4
|
+
metadata: any;
|
|
5
|
+
translate: TFunction;
|
|
6
|
+
}
|
|
7
|
+
export declare function Metadata({ metadata, translate }: MetadataProps): ReactElement | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var m=(t,r)=>{for(var n in r)c(t,n,{get:r[n],enumerable:!0})},u=(t,r,n,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of f(r))!h.call(t,i)&&i!==n&&c(t,i,{get:()=>r[i],enumerable:!(o=s(r,i))||o.enumerable});return t};var j=t=>u(c({},"__esModule",{value:!0}),t);var y={};m(y,{Metadata:()=>x});module.exports=j(y);var e=require("react/jsx-runtime"),l=require("react"),d=require("@redocly/theme/components/Markdown/Markdown"),p=require("@redocly/theme/components/Typography/H3"),a=require("@redocly/theme/core/openapi");const M=["title","description"];function b([t,r]){return M.includes(t)?null:Array.isArray(r)?{key:t,value:r.filter(n=>typeof n!="object").join(", ")}:typeof r=="object"?null:{key:t,value:r}}function x({metadata:t,translate:r}){const n=(0,l.useMemo)(()=>Object.entries(t||{}).map(b).filter(a.isNotNull),[t]);return t?(0,e.jsxs)(d.Markdown,{children:[(0,e.jsx)(p.H3,{children:r("openapi.info.metadata.title","Metadata")}),(0,e.jsxs)("table",{className:"md",children:[(0,e.jsx)("thead",{children:(0,e.jsxs)("tr",{children:[(0,e.jsx)("th",{scope:"col",children:r("openapi.key","Key")}),(0,e.jsx)("th",{scope:"col",children:r("openapi.value","Value")})]})}),(0,e.jsx)("tbody",{children:n.map(({key:o,value:i})=>(0,e.jsxs)("tr",{children:[(0,e.jsx)("td",{children:o}),(0,e.jsx)("td",{children:typeof i=="string"&&i.match(/^https?:\/\//)?(0,e.jsx)("a",{href:i,target:"_blank",rel:"noreferrer",children:i}):String(i)})]},o))})]})]}):null}0&&(module.exports={Metadata});
|