diff --git a/library/package.json b/library/package.json index bf0a29ba9..cb6227d68 100644 --- a/library/package.json +++ b/library/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/react-component", - "version": "2.3.1", + "version": "2.3.3", "private": false, "description": "A React component for AsyncAPI specification.", "repository": { diff --git a/library/src/components/Bindings.tsx b/library/src/components/Bindings.tsx index f40deb37f..a6c8fcc39 100644 --- a/library/src/components/Bindings.tsx +++ b/library/src/components/Bindings.tsx @@ -25,9 +25,9 @@ export const Bindings: React.FunctionComponent = ({ const schemaName = (
{name} - + {protocol} - +
); return ( diff --git a/library/src/components/Schema.tsx b/library/src/components/Schema.tsx index 0ccb5bb0d..61dd88ac8 100644 --- a/library/src/components/Schema.tsx +++ b/library/src/components/Schema.tsx @@ -160,37 +160,37 @@ export const Schema: React.FunctionComponent = ({
{schema.format() && ( - + format: {schema.format()} - + )} {/* related to string */} {schema.pattern() !== undefined && ( - + must match: {schema.pattern()} - + )} {schema.contentMediaType() !== undefined && ( - + media type: {schema.contentMediaType()} - + )} {schema.contentEncoding() !== undefined && ( - + encoding: {schema.contentEncoding()} - + )} {/* constraints */} {!!constraints.length && constraints.map((c) => ( - {c} - + ))} {uid && !uid.startsWith(' = ({
)} {externalDocs && ( - + Documentation - + )} {schema.examples() && ( diff --git a/library/src/containers/Messages/Message.tsx b/library/src/containers/Messages/Message.tsx index 4d5c5fbf3..2b30b435b 100644 --- a/library/src/containers/Messages/Message.tsx +++ b/library/src/containers/Messages/Message.tsx @@ -55,12 +55,9 @@ export const Message: React.FunctionComponent = ({
{index !== undefined && ( - #{index} + #{index} )} {title && {title}} - - {messageId} -
{summary &&

{summary}

} diff --git a/library/src/containers/Operations/Operation.tsx b/library/src/containers/Operations/Operation.tsx index 26dc958d7..af98dd6c7 100644 --- a/library/src/containers/Operations/Operation.tsx +++ b/library/src/containers/Operations/Operation.tsx @@ -262,7 +262,7 @@ export const OperationReplyInfo: React.FunctionComponent = (props) => { : 'bg-blue-600 border-blue-600' } text-sm rounded-t h-8 px-4 border text-white flex items-center`} > - REPLY INFORMATION + REPLY INFORMATION
= ({
{securityProtocol && (
- + security.protocol: - - + + {securityProtocol} - +
)} {saslMechanism && (
- + sasl.mechanism: - - + + {saslMechanism} - +
)}
@@ -179,19 +179,19 @@ const SecurityItem: React.FunctionComponent = ({ key={flowName} >
- + Flow: - - + + {ServerHelpers.flowName(flowName)} - +
{authorizationUrl && (
- + Auth URL: - + {authorizationUrl} @@ -199,9 +199,9 @@ const SecurityItem: React.FunctionComponent = ({ )} {tokenUrl && (
- + Token URL: - + {tokenUrl} @@ -209,9 +209,9 @@ const SecurityItem: React.FunctionComponent = ({ )} {refreshUrl && (
- + Refresh URL: - + {refreshUrl} @@ -219,9 +219,9 @@ const SecurityItem: React.FunctionComponent = ({ )} {scopes && (
- + Scopes: - +
    {scopes && Object.entries(scopes).map(([scopeName, scopeDesc]) => ( diff --git a/library/src/containers/Servers/Server.tsx b/library/src/containers/Servers/Server.tsx index 560444ee1..233efdf9c 100644 --- a/library/src/containers/Servers/Server.tsx +++ b/library/src/containers/Servers/Server.tsx @@ -34,14 +34,14 @@ export const Server: React.FunctionComponent = ({
    {server.url()} - + {protocolVersion ? `${server.protocol()} ${protocolVersion}` : server.protocol()} - - + + {serverName} - +
    {server.hasDescription() && ( diff --git a/library/src/containers/Sidebar/Sidebar.tsx b/library/src/containers/Sidebar/Sidebar.tsx index a834a2b40..fe313624e 100644 --- a/library/src/containers/Sidebar/Sidebar.tsx +++ b/library/src/containers/Sidebar/Sidebar.tsx @@ -356,12 +356,12 @@ const OperationItem: React.FunctionComponent = ({ href={`#${operationHrefId}`} onClick={() => setShowSidebar(false)} > - {typeLabel} - + {label} diff --git a/library/src/containers/Sidebar/__tests__/SideBar.test.tsx b/library/src/containers/Sidebar/__tests__/SideBar.test.tsx index 4701a0006..6568f57e7 100644 --- a/library/src/containers/Sidebar/__tests__/SideBar.test.tsx +++ b/library/src/containers/Sidebar/__tests__/SideBar.test.tsx @@ -121,10 +121,10 @@ describe('Sidebar component', () => { 'smartylighting.streetlights.1.0.action.{streetlightId}.dim', ]; for (let i = 0; i < operations.length; i++) { + const description = operations[i].querySelector('span'); + // eslint-disable-next-line jest/no-standalone-expect - expect(operations[i].querySelectorAll('span')[1].textContent).toBe( - expectedOperationDescriptions[i], - ); + expect(description?.textContent).toBe(expectedOperationDescriptions[i]); } }); }); diff --git a/package-lock.json b/package-lock.json index 93837294b..a974ab968 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,7 +36,7 @@ }, "library": { "name": "@asyncapi/react-component", - "version": "2.3.1", + "version": "2.3.3", "license": "Apache-2.0", "dependencies": { "@asyncapi/avro-schema-parser": "^3.0.24", @@ -27671,10 +27671,10 @@ }, "web-component": { "name": "@asyncapi/web-component", - "version": "2.3.1", + "version": "2.3.3", "license": "Apache-2.0", "dependencies": { - "@asyncapi/react-component": "^2.3.1", + "@asyncapi/react-component": "^2.3.3", "react": "^18.2.0", "react-dom": "^18.2.0", "web-react-components": "^1.4.2" diff --git a/web-component/package.json b/web-component/package.json index e8e076177..cfd89549e 100644 --- a/web-component/package.json +++ b/web-component/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/web-component", - "version": "2.3.1", + "version": "2.3.3", "private": false, "description": "A web component for AsyncAPI specification. Based on @asyncapi/react-component.", "repository": { @@ -44,7 +44,7 @@ "install:reactcomp": "chmod +x ./bump-react-comp.sh && ./bump-react-comp.sh" }, "dependencies": { - "@asyncapi/react-component": "^2.3.1", + "@asyncapi/react-component": "^2.3.3", "react": "^18.2.0", "react-dom": "^18.2.0", "web-react-components": "^1.4.2"