@asyncapi/react-component 2.0.4 → 2.1.0
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/browser/index.js +3 -3
- package/browser/index.js.LICENSE.txt +1 -1
- package/browser/standalone/index.js +3 -3
- package/browser/standalone/index.js.LICENSE.txt +1 -1
- package/browser/standalone/without-parser.js +1 -1
- package/browser/standalone/without-parser.js.LICENSE.txt +1 -1
- package/browser/without-parser.js +2 -2
- package/browser/without-parser.js.LICENSE.txt +1 -1
- package/lib/cjs/config/config.js.map +1 -1
- package/lib/cjs/config/default.js +1 -0
- package/lib/cjs/config/default.js.map +1 -1
- package/lib/cjs/containers/Messages/Messages.js +5 -2
- package/lib/cjs/containers/Messages/Messages.js.map +1 -1
- package/lib/esm/config/config.js.map +1 -1
- package/lib/esm/config/default.js +1 -0
- package/lib/esm/config/default.js.map +1 -1
- package/lib/esm/containers/Messages/Messages.js +5 -2
- package/lib/esm/containers/Messages/Messages.js.map +1 -1
- package/lib/types/config/config.d.ts +1 -0
- package/lib/types/config/config.d.ts.map +1 -1
- package/lib/types/config/default.d.ts.map +1 -1
- package/lib/types/containers/Messages/Messages.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -68,7 +68,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
68
68
|
PERFORMANCE OF THIS SOFTWARE.
|
|
69
69
|
***************************************************************************** */
|
|
70
70
|
|
|
71
|
-
/*! @license DOMPurify
|
|
71
|
+
/*! @license DOMPurify 3.1.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.5/LICENSE */
|
|
72
72
|
|
|
73
73
|
/*! https://mths.be/punycode v1.4.0 by @mathias */
|
|
74
74
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"","sourcesContent":["export interface ConfigInterface {\n schemaID?: string;\n show?: ShowConfig;\n expand?: ExpandConfig;\n sidebar?: SideBarConfig;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n parserOptions?: any;\n publishLabel?: string;\n subscribeLabel?: string;\n sendLabel?: string;\n receiveLabel?: string;\n requestLabel?: string;\n replyLabel?: string;\n}\n\nexport interface ShowConfig {\n sidebar?: boolean;\n info?: boolean;\n servers?: boolean;\n operations?: boolean;\n messages?: boolean;\n schemas?: boolean;\n errors?: boolean;\n}\n\nexport interface ExpandConfig {\n messageExamples?: boolean;\n}\n\nexport interface SideBarConfig {\n showServers?: 'byDefault' | 'bySpecTags' | 'byServersTags';\n showOperations?: 'byDefault' | 'bySpecTags' | 'byOperationsTags';\n}\n"]}
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"","sourcesContent":["export interface ConfigInterface {\n schemaID?: string;\n show?: ShowConfig;\n expand?: ExpandConfig;\n sidebar?: SideBarConfig;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n parserOptions?: any;\n publishLabel?: string;\n subscribeLabel?: string;\n sendLabel?: string;\n receiveLabel?: string;\n requestLabel?: string;\n replyLabel?: string;\n}\n\nexport interface ShowConfig {\n sidebar?: boolean;\n info?: boolean;\n servers?: boolean;\n operations?: boolean;\n messages?: boolean;\n messageExamples?: boolean;\n schemas?: boolean;\n errors?: boolean;\n}\n\nexport interface ExpandConfig {\n messageExamples?: boolean;\n}\n\nexport interface SideBarConfig {\n showServers?: 'byDefault' | 'bySpecTags' | 'byServersTags';\n showOperations?: 'byDefault' | 'bySpecTags' | 'byOperationsTags';\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/config/default.ts"],"names":[],"mappings":";;;AACA,0CAOsB;AAET,QAAA,aAAa,GAAoB;IAC5C,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;KACb;IACD,MAAM,EAAE;QACN,eAAe,EAAE,KAAK;KACvB;IACD,OAAO,EAAE;QACP,WAAW,EAAE,WAAW;QACxB,cAAc,EAAE,WAAW;KAC5B;IACD,YAAY,EAAE,sCAA0B;IACxC,cAAc,EAAE,wCAA4B;IAC5C,SAAS,EAAE,mCAAuB;IAClC,YAAY,EAAE,2CAA+B;IAC7C,YAAY,EAAE,sCAA0B;IACxC,UAAU,EAAE,sCAA0B;CACvC,CAAC","sourcesContent":["import { ConfigInterface } from './config';\nimport {\n PUBLISH_LABEL_DEFAULT_TEXT,\n RECEIVE_TEXT_LABEL_DEFAULT_TEXT,\n REPLIER_LABEL_DEFAULT_TEXT,\n REQUEST_LABEL_DEFAULT_TEXT,\n SEND_LABEL_DEFAULT_TEXT,\n SUBSCRIBE_LABEL_DEFAULT_TEXT,\n} from '../constants';\n\nexport const defaultConfig: ConfigInterface = {\n schemaID: '',\n show: {\n sidebar: false,\n info: true,\n servers: true,\n operations: true,\n messages: true,\n schemas: true,\n errors: true,\n },\n expand: {\n messageExamples: false,\n },\n sidebar: {\n showServers: 'byDefault',\n showOperations: 'byDefault',\n },\n publishLabel: PUBLISH_LABEL_DEFAULT_TEXT,\n subscribeLabel: SUBSCRIBE_LABEL_DEFAULT_TEXT,\n sendLabel: SEND_LABEL_DEFAULT_TEXT,\n receiveLabel: RECEIVE_TEXT_LABEL_DEFAULT_TEXT,\n requestLabel: REQUEST_LABEL_DEFAULT_TEXT,\n replyLabel: REPLIER_LABEL_DEFAULT_TEXT,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/config/default.ts"],"names":[],"mappings":";;;AACA,0CAOsB;AAET,QAAA,aAAa,GAAoB;IAC5C,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,eAAe,EAAE,KAAK;QACtB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;KACb;IACD,MAAM,EAAE;QACN,eAAe,EAAE,KAAK;KACvB;IACD,OAAO,EAAE;QACP,WAAW,EAAE,WAAW;QACxB,cAAc,EAAE,WAAW;KAC5B;IACD,YAAY,EAAE,sCAA0B;IACxC,cAAc,EAAE,wCAA4B;IAC5C,SAAS,EAAE,mCAAuB;IAClC,YAAY,EAAE,2CAA+B;IAC7C,YAAY,EAAE,sCAA0B;IACxC,UAAU,EAAE,sCAA0B;CACvC,CAAC","sourcesContent":["import { ConfigInterface } from './config';\nimport {\n PUBLISH_LABEL_DEFAULT_TEXT,\n RECEIVE_TEXT_LABEL_DEFAULT_TEXT,\n REPLIER_LABEL_DEFAULT_TEXT,\n REQUEST_LABEL_DEFAULT_TEXT,\n SEND_LABEL_DEFAULT_TEXT,\n SUBSCRIBE_LABEL_DEFAULT_TEXT,\n} from '../constants';\n\nexport const defaultConfig: ConfigInterface = {\n schemaID: '',\n show: {\n sidebar: false,\n info: true,\n servers: true,\n operations: true,\n messages: true,\n messageExamples: false,\n schemas: true,\n errors: true,\n },\n expand: {\n messageExamples: false,\n },\n sidebar: {\n showServers: 'byDefault',\n showOperations: 'byDefault',\n },\n publishLabel: PUBLISH_LABEL_DEFAULT_TEXT,\n subscribeLabel: SUBSCRIBE_LABEL_DEFAULT_TEXT,\n sendLabel: SEND_LABEL_DEFAULT_TEXT,\n receiveLabel: RECEIVE_TEXT_LABEL_DEFAULT_TEXT,\n requestLabel: REQUEST_LABEL_DEFAULT_TEXT,\n replyLabel: REPLIER_LABEL_DEFAULT_TEXT,\n};\n"]}
|
|
@@ -18,8 +18,11 @@ var Messages = function () {
|
|
|
18
18
|
}
|
|
19
19
|
return (react_1.default.createElement("section", { id: "".concat(helpers_1.CommonHelpers.getIdentifier('messages', config)), className: "mt-16" },
|
|
20
20
|
react_1.default.createElement("h2", { className: "2xl:w-7/12 text-3xl font-light mb-4 px-8" }, constants_1.MESSAGES_TEXT),
|
|
21
|
-
react_1.default.createElement("ul", null, messages.map(function (message, idx) {
|
|
22
|
-
|
|
21
|
+
react_1.default.createElement("ul", null, messages.map(function (message, idx) {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
return (react_1.default.createElement("li", { className: "mb-4", key: message.id(), id: helpers_1.CommonHelpers.getIdentifier("message-".concat(message.id()), config) },
|
|
24
|
+
react_1.default.createElement(Message_1.Message, { messageName: message.id(), message: message, index: idx + 1, key: message.id(), showExamples: (_b = (_a = config === null || config === void 0 ? void 0 : config.show) === null || _a === void 0 ? void 0 : _a.messageExamples) !== null && _b !== void 0 ? _b : false })));
|
|
25
|
+
}))));
|
|
23
26
|
};
|
|
24
27
|
exports.Messages = Messages;
|
|
25
28
|
//# sourceMappingURL=Messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Messages.js","sourceRoot":"","sources":["../../../../src/containers/Messages/Messages.tsx"],"names":[],"mappings":";;;;;;AAAA,gDAA0B;AAE1B,qCAAoC;AAEpC,2CAAoD;AACpD,yCAA8C;AAC9C,6CAAgD;AAEzC,IAAM,QAAQ,GAA4B;IAC/C,IAAM,QAAQ,GAAG,IAAA,kBAAO,GAAE,CAAC;IAC3B,IAAM,MAAM,GAAG,IAAA,oBAAS,GAAE,CAAC;IAC3B,IAAM,QAAQ,GACZ,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC;IAE7E,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QACtC,OAAO,IAAI,CAAC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AAW,EAAE,OAAO,CAAC,EAAE,EAAE,EACzB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,GAAG,GAAG,CAAC,EACd,GAAG,EAAE,OAAO,CAAC,EAAE,EAAE,EACjB,YAAY,EAAE,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,0CAAE,eAAe,mCAAI,KAAK,GACpD,CACC,CACN,CAAA;SAAA,CAAC,CACC,CACG,CACX,CAAC;AACJ,CAAC,CAAC;AArCW,QAAA,QAAQ,YAqCnB","sourcesContent":["import React from 'react';\n\nimport { Message } from './Message';\n\nimport { useConfig, useSpec } from '../../contexts';\nimport { CommonHelpers } from '../../helpers';\nimport { MESSAGES_TEXT } from '../../constants';\n\nexport const Messages: React.FunctionComponent = () => {\n const asyncapi = useSpec();\n const config = useConfig();\n const messages =\n !asyncapi.components().isEmpty() && asyncapi.components().messages().all();\n\n if (!messages || messages.length === 0) {\n return null;\n }\n\n return (\n <section\n id={`${CommonHelpers.getIdentifier('messages', config)}`}\n className=\"mt-16\"\n >\n <h2 className=\"2xl:w-7/12 text-3xl font-light mb-4 px-8\">\n {MESSAGES_TEXT}\n </h2>\n <ul>\n {messages.map((message, idx) => (\n <li\n className=\"mb-4\"\n key={message.id()}\n id={CommonHelpers.getIdentifier(`message-${message.id()}`, config)}\n >\n <Message\n messageName={message.id()}\n message={message}\n index={idx + 1}\n key={message.id()}\n showExamples={config?.show?.messageExamples ?? false}\n />\n </li>\n ))}\n </ul>\n </section>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"","sourcesContent":["export interface ConfigInterface {\n schemaID?: string;\n show?: ShowConfig;\n expand?: ExpandConfig;\n sidebar?: SideBarConfig;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n parserOptions?: any;\n publishLabel?: string;\n subscribeLabel?: string;\n sendLabel?: string;\n receiveLabel?: string;\n requestLabel?: string;\n replyLabel?: string;\n}\n\nexport interface ShowConfig {\n sidebar?: boolean;\n info?: boolean;\n servers?: boolean;\n operations?: boolean;\n messages?: boolean;\n schemas?: boolean;\n errors?: boolean;\n}\n\nexport interface ExpandConfig {\n messageExamples?: boolean;\n}\n\nexport interface SideBarConfig {\n showServers?: 'byDefault' | 'bySpecTags' | 'byServersTags';\n showOperations?: 'byDefault' | 'bySpecTags' | 'byOperationsTags';\n}\n"]}
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"","sourcesContent":["export interface ConfigInterface {\n schemaID?: string;\n show?: ShowConfig;\n expand?: ExpandConfig;\n sidebar?: SideBarConfig;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n parserOptions?: any;\n publishLabel?: string;\n subscribeLabel?: string;\n sendLabel?: string;\n receiveLabel?: string;\n requestLabel?: string;\n replyLabel?: string;\n}\n\nexport interface ShowConfig {\n sidebar?: boolean;\n info?: boolean;\n servers?: boolean;\n operations?: boolean;\n messages?: boolean;\n messageExamples?: boolean;\n schemas?: boolean;\n errors?: boolean;\n}\n\nexport interface ExpandConfig {\n messageExamples?: boolean;\n}\n\nexport interface SideBarConfig {\n showServers?: 'byDefault' | 'bySpecTags' | 'byServersTags';\n showOperations?: 'byDefault' | 'bySpecTags' | 'byOperationsTags';\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/config/default.ts"],"names":[],"mappings":"AACA,OAAO,EACL,0BAA0B,EAC1B,+BAA+B,EAC/B,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,IAAM,aAAa,GAAoB;IAC5C,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;KACb;IACD,MAAM,EAAE;QACN,eAAe,EAAE,KAAK;KACvB;IACD,OAAO,EAAE;QACP,WAAW,EAAE,WAAW;QACxB,cAAc,EAAE,WAAW;KAC5B;IACD,YAAY,EAAE,0BAA0B;IACxC,cAAc,EAAE,4BAA4B;IAC5C,SAAS,EAAE,uBAAuB;IAClC,YAAY,EAAE,+BAA+B;IAC7C,YAAY,EAAE,0BAA0B;IACxC,UAAU,EAAE,0BAA0B;CACvC,CAAC","sourcesContent":["import { ConfigInterface } from './config';\nimport {\n PUBLISH_LABEL_DEFAULT_TEXT,\n RECEIVE_TEXT_LABEL_DEFAULT_TEXT,\n REPLIER_LABEL_DEFAULT_TEXT,\n REQUEST_LABEL_DEFAULT_TEXT,\n SEND_LABEL_DEFAULT_TEXT,\n SUBSCRIBE_LABEL_DEFAULT_TEXT,\n} from '../constants';\n\nexport const defaultConfig: ConfigInterface = {\n schemaID: '',\n show: {\n sidebar: false,\n info: true,\n servers: true,\n operations: true,\n messages: true,\n schemas: true,\n errors: true,\n },\n expand: {\n messageExamples: false,\n },\n sidebar: {\n showServers: 'byDefault',\n showOperations: 'byDefault',\n },\n publishLabel: PUBLISH_LABEL_DEFAULT_TEXT,\n subscribeLabel: SUBSCRIBE_LABEL_DEFAULT_TEXT,\n sendLabel: SEND_LABEL_DEFAULT_TEXT,\n receiveLabel: RECEIVE_TEXT_LABEL_DEFAULT_TEXT,\n requestLabel: REQUEST_LABEL_DEFAULT_TEXT,\n replyLabel: REPLIER_LABEL_DEFAULT_TEXT,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/config/default.ts"],"names":[],"mappings":"AACA,OAAO,EACL,0BAA0B,EAC1B,+BAA+B,EAC/B,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,IAAM,aAAa,GAAoB;IAC5C,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;QACd,eAAe,EAAE,KAAK;QACtB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;KACb;IACD,MAAM,EAAE;QACN,eAAe,EAAE,KAAK;KACvB;IACD,OAAO,EAAE;QACP,WAAW,EAAE,WAAW;QACxB,cAAc,EAAE,WAAW;KAC5B;IACD,YAAY,EAAE,0BAA0B;IACxC,cAAc,EAAE,4BAA4B;IAC5C,SAAS,EAAE,uBAAuB;IAClC,YAAY,EAAE,+BAA+B;IAC7C,YAAY,EAAE,0BAA0B;IACxC,UAAU,EAAE,0BAA0B;CACvC,CAAC","sourcesContent":["import { ConfigInterface } from './config';\nimport {\n PUBLISH_LABEL_DEFAULT_TEXT,\n RECEIVE_TEXT_LABEL_DEFAULT_TEXT,\n REPLIER_LABEL_DEFAULT_TEXT,\n REQUEST_LABEL_DEFAULT_TEXT,\n SEND_LABEL_DEFAULT_TEXT,\n SUBSCRIBE_LABEL_DEFAULT_TEXT,\n} from '../constants';\n\nexport const defaultConfig: ConfigInterface = {\n schemaID: '',\n show: {\n sidebar: false,\n info: true,\n servers: true,\n operations: true,\n messages: true,\n messageExamples: false,\n schemas: true,\n errors: true,\n },\n expand: {\n messageExamples: false,\n },\n sidebar: {\n showServers: 'byDefault',\n showOperations: 'byDefault',\n },\n publishLabel: PUBLISH_LABEL_DEFAULT_TEXT,\n subscribeLabel: SUBSCRIBE_LABEL_DEFAULT_TEXT,\n sendLabel: SEND_LABEL_DEFAULT_TEXT,\n receiveLabel: RECEIVE_TEXT_LABEL_DEFAULT_TEXT,\n requestLabel: REQUEST_LABEL_DEFAULT_TEXT,\n replyLabel: REPLIER_LABEL_DEFAULT_TEXT,\n};\n"]}
|
|
@@ -12,7 +12,10 @@ export var Messages = function () {
|
|
|
12
12
|
}
|
|
13
13
|
return (React.createElement("section", { id: "".concat(CommonHelpers.getIdentifier('messages', config)), className: "mt-16" },
|
|
14
14
|
React.createElement("h2", { className: "2xl:w-7/12 text-3xl font-light mb-4 px-8" }, MESSAGES_TEXT),
|
|
15
|
-
React.createElement("ul", null, messages.map(function (message, idx) {
|
|
16
|
-
|
|
15
|
+
React.createElement("ul", null, messages.map(function (message, idx) {
|
|
16
|
+
var _a, _b;
|
|
17
|
+
return (React.createElement("li", { className: "mb-4", key: message.id(), id: CommonHelpers.getIdentifier("message-".concat(message.id()), config) },
|
|
18
|
+
React.createElement(Message, { messageName: message.id(), message: message, index: idx + 1, key: message.id(), showExamples: (_b = (_a = config === null || config === void 0 ? void 0 : config.show) === null || _a === void 0 ? void 0 : _a.messageExamples) !== null && _b !== void 0 ? _b : false })));
|
|
19
|
+
}))));
|
|
17
20
|
};
|
|
18
21
|
//# sourceMappingURL=Messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Messages.js","sourceRoot":"","sources":["../../../../src/containers/Messages/Messages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,IAAM,QAAQ,GAA4B;IAC/C,IAAM,QAAQ,GAAG,OAAO,EAAE,CAAC;IAC3B,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,IAAM,QAAQ,GACZ,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,IAAI,QAAQ,CAAC,UAA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EAAC,0CAA0C,IACrD,aAAa,CACX;QACL,gCACG,QAAQ,CAAC,GAAG,CAAC,UAAC,OAAO,EAAE,GAAG;;YAAK,OAAA,CAC9B,4BACE,SAAS,EAAC,MAAM,EAChB,GAAG,EAAE,OAAO,CAAC,EAAE,EAAE,EACjB,EAAE,EAAE,aAAa,CAAC,aAAa,CAAC,kBAAW,OAAO,CAAC,EAAE,EAAE,CAAE,EAAE,MAAM,CAAC;gBAElE,oBAAC,OAAO,IACN,WAAW,EAAE,OAAO,CAAC,EAAE,EAAE,EACzB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,GAAG,GAAG,CAAC,EACd,GAAG,EAAE,OAAO,CAAC,EAAE,EAAE,EACjB,YAAY,EAAE,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,0CAAE,eAAe,mCAAI,KAAK,GACpD,CACC,CACN,CAAA;SAAA,CAAC,CACC,CACG,CACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { Message } from './Message';\n\nimport { useConfig, useSpec } from '../../contexts';\nimport { CommonHelpers } from '../../helpers';\nimport { MESSAGES_TEXT } from '../../constants';\n\nexport const Messages: React.FunctionComponent = () => {\n const asyncapi = useSpec();\n const config = useConfig();\n const messages =\n !asyncapi.components().isEmpty() && asyncapi.components().messages().all();\n\n if (!messages || messages.length === 0) {\n return null;\n }\n\n return (\n <section\n id={`${CommonHelpers.getIdentifier('messages', config)}`}\n className=\"mt-16\"\n >\n <h2 className=\"2xl:w-7/12 text-3xl font-light mb-4 px-8\">\n {MESSAGES_TEXT}\n </h2>\n <ul>\n {messages.map((message, idx) => (\n <li\n className=\"mb-4\"\n key={message.id()}\n id={CommonHelpers.getIdentifier(`message-${message.id()}`, config)}\n >\n <Message\n messageName={message.id()}\n message={message}\n index={idx + 1}\n key={message.id()}\n showExamples={config?.show?.messageExamples ?? false}\n />\n </li>\n ))}\n </ul>\n </section>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,WAAW,GAAG,YAAY,GAAG,eAAe,CAAC;IAC3D,cAAc,CAAC,EAAE,WAAW,GAAG,YAAY,GAAG,kBAAkB,CAAC;CAClE"}
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/config/config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,aAAa,CAAC;IAExB,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,WAAW,GAAG,YAAY,GAAG,eAAe,CAAC;IAC3D,cAAc,CAAC,EAAE,WAAW,GAAG,YAAY,GAAG,kBAAkB,CAAC;CAClE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/config/default.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAU3C,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/config/default.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAU3C,eAAO,MAAM,aAAa,EAAE,eAyB3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Messages.d.ts","sourceRoot":"","sources":["../../../../src/containers/Messages/Messages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"Messages.d.ts","sourceRoot":"","sources":["../../../../src/containers/Messages/Messages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAqC5B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asyncapi/react-component",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A React component for AsyncAPI specification.",
|
|
6
6
|
"repository": {
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@asyncapi/parser": "^3.1.0",
|
|
74
74
|
"@asyncapi/protobuf-schema-parser": "^3.2.14",
|
|
75
75
|
"highlight.js": "^10.7.2",
|
|
76
|
-
"isomorphic-dompurify": "^
|
|
76
|
+
"isomorphic-dompurify": "^2.12.0",
|
|
77
77
|
"marked": "^4.0.14",
|
|
78
78
|
"openapi-sampler": "^1.2.1",
|
|
79
79
|
"use-resize-observer": "^9.1.0"
|