@eventcatalog/core 0.1.15 → 0.1.19
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/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +58 -44
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/eslint/.cache_1bay4w0 +1 -1
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/prerender-manifest.json +1 -1
- package/.next/routes-manifest.json +1 -1
- package/.next/server/chunks/484.js +572 -0
- package/.next/server/chunks/{685.js → 730.js} +2 -411
- package/.next/server/chunks/8.js +4 -0
- package/.next/server/chunks/944.js +10 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/_app.js +60 -32
- package/.next/server/pages/events/AddedItemToCart/logs.html +1 -1
- package/.next/server/pages/events/AddedItemToCart/v/0.0.1.html +2 -2
- package/.next/server/pages/events/AddedItemToCart/v/0.0.1.json +1 -1
- package/.next/server/pages/events/AddedItemToCart/v/0.0.2.html +2 -2
- package/.next/server/pages/events/AddedItemToCart/v/0.0.2.json +1 -1
- package/.next/server/pages/events/AddedItemToCart.html +3 -3
- package/.next/server/pages/events/AddedItemToCart.json +1 -1
- package/.next/server/pages/events/OrderComplete/logs.html +1 -1
- package/.next/server/pages/events/OrderComplete.html +3 -3
- package/.next/server/pages/events/OrderComplete.json +1 -1
- package/.next/server/pages/events/OrderConfirmed/logs.html +1 -1
- package/.next/server/pages/events/OrderConfirmed.html +3 -3
- package/.next/server/pages/events/OrderConfirmed.json +1 -1
- package/.next/server/pages/events/OrderRequested/logs.html +1 -1
- package/.next/server/pages/events/OrderRequested.html +3 -3
- package/.next/server/pages/events/OrderRequested.json +1 -1
- package/.next/server/pages/events/PaymentProcessed/logs.html +1 -1
- package/.next/server/pages/events/PaymentProcessed.html +3 -3
- package/.next/server/pages/events/PaymentProcessed.json +1 -1
- package/.next/server/pages/events/RemovedItemFromCart/logs.html +1 -1
- package/.next/server/pages/events/RemovedItemFromCart.html +3 -3
- package/.next/server/pages/events/RemovedItemFromCart.json +1 -1
- package/.next/server/pages/events/ShipmentDelivered/logs.html +1 -1
- package/.next/server/pages/events/ShipmentDelivered.html +3 -3
- package/.next/server/pages/events/ShipmentDelivered.json +1 -1
- package/.next/server/pages/events/ShipmentDispatched/logs.html +1 -1
- package/.next/server/pages/events/ShipmentDispatched.html +3 -3
- package/.next/server/pages/events/ShipmentDispatched.json +1 -1
- package/.next/server/pages/events/ShipmentPrepared/logs.html +1 -1
- package/.next/server/pages/events/ShipmentPrepared.html +2 -2
- package/.next/server/pages/events/ShipmentPrepared.json +1 -1
- package/.next/server/pages/events/[name]/v/[version].js +15 -1
- package/.next/server/pages/events/[name]/v/[version].js.nft.json +1 -1
- package/.next/server/pages/events/[name].js +15 -1
- package/.next/server/pages/events/[name].js.nft.json +1 -1
- package/.next/server/pages/events.html +2 -2
- package/.next/server/pages/events.js.nft.json +1 -1
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/overview.html +1 -1
- package/.next/server/pages/services/Basket Service.html +2 -2
- package/.next/server/pages/services/Basket Service.json +1 -1
- package/.next/server/pages/services/Data Lake.html +2 -2
- package/.next/server/pages/services/Data Lake.json +1 -1
- package/.next/server/pages/services/Payment Service.html +2 -2
- package/.next/server/pages/services/Payment Service.json +1 -1
- package/.next/server/pages/services/Shipping Service.html +2 -2
- package/.next/server/pages/services/Shipping Service.json +1 -1
- package/.next/server/pages/services/[name].js +26 -3
- package/.next/server/pages/services/[name].js.nft.json +1 -1
- package/.next/server/pages/services.html +2 -2
- package/.next/server/pages/services.js.nft.json +1 -1
- package/.next/server/pages/users/[id].js.nft.json +1 -1
- package/.next/server/pages/users/dboyne.html +2 -2
- package/.next/server/pages/users/mSmith.html +2 -2
- package/.next/server/pages/visualiser.html +14 -0
- package/.next/server/pages/visualiser.js +627 -0
- package/.next/server/pages/visualiser.js.nft.json +1 -0
- package/.next/server/pages/visualiser.json +1 -0
- package/.next/server/pages-manifest.json +1 -0
- package/.next/static/chunks/109-a08539311d3d6672.js +1 -0
- package/.next/static/chunks/{178-b2fa9e84692fffe3.js → 178-87f01d17ab32dd4f.js} +1 -1
- package/.next/static/chunks/252-08ab418f9b6821dd.js +1 -0
- package/.next/static/chunks/506-12764fcf4b5d93b0.js +1 -0
- package/.next/static/chunks/519-2ec6fc3cdbaa4dc2.js +1 -0
- package/.next/static/chunks/650-343888e13f994a09.js +1 -0
- package/.next/static/chunks/962-20c87db3880df896.js +1 -0
- package/.next/static/chunks/b744740b-229c238b25b9eeac.js +1 -0
- package/.next/static/chunks/pages/_app-f1bd719e11eb827e.js +1 -0
- package/.next/static/chunks/pages/events/[name]/v/{[version]-d8d4d12f05da9c8a.js → [version]-33051dbc32f5fe4e.js} +1 -1
- package/.next/static/chunks/pages/events/{[name]-89e1edc81aa51fc3.js → [name]-813780e7042af288.js} +1 -1
- package/.next/static/chunks/pages/services/[name]-142d7fa515cfc532.js +1 -0
- package/.next/static/chunks/pages/visualiser-e4e3757e74f19df7.js +1 -0
- package/.next/static/chunks/{webpack-258a9e5dae8126df.js → webpack-fb340c369157e229.js} +1 -1
- package/.next/static/css/4a01a08d48b115f7.css +3 -0
- package/.next/static/jznFKGTbxJsAeYNZE4XtO/_buildManifest.js +1 -0
- package/.next/static/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/_middlewareManifest.js +0 -0
- package/.next/static/jznFKGTbxJsAeYNZE4XtO/_ssgManifest.js +1 -0
- package/.next/trace +56 -56
- package/CHANGELOG.md +26 -0
- package/components/Footer.tsx +1 -1
- package/components/Header.tsx +1 -0
- package/components/Mdx/NodeGraph/{GraphElements.ts → GraphElements.tsx} +71 -16
- package/components/Mdx/NodeGraph/Node.tsx +15 -0
- package/components/Mdx/NodeGraph/NodeGraph.tsx +62 -12
- package/components/Mdx/NodeGraph/__tests__/__snapshots__/GraphElements.spec.ts.snap +334 -0
- package/components/Sidebars/EventSidebar.tsx +7 -0
- package/components/Sidebars/ServiceSidebar.tsx +8 -1
- package/eventcatalog.config.js +1 -0
- package/out/404/index.html +1 -1
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/AddedItemToCart/logs.json +0 -0
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/AddedItemToCart/v/0.0.1.json +1 -1
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/AddedItemToCart/v/0.0.2.json +1 -1
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/AddedItemToCart.json +1 -1
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/OrderComplete/logs.json +0 -0
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/OrderComplete.json +1 -1
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/OrderConfirmed/logs.json +0 -0
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/OrderConfirmed.json +1 -1
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/OrderRequested/logs.json +0 -0
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/OrderRequested.json +1 -1
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/PaymentProcessed/logs.json +0 -0
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/PaymentProcessed.json +1 -1
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/RemovedItemFromCart/logs.json +0 -0
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/RemovedItemFromCart.json +1 -1
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/ShipmentDelivered/logs.json +0 -0
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/ShipmentDelivered.json +1 -1
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/ShipmentDispatched/logs.json +0 -0
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/ShipmentDispatched.json +1 -1
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/ShipmentPrepared/logs.json +0 -0
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events/ShipmentPrepared.json +1 -1
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/events.json +0 -0
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/overview.json +0 -0
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/services/Basket Service.json +1 -1
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/services/Data Lake.json +1 -1
- package/out/_next/data/jznFKGTbxJsAeYNZE4XtO/services/Payment Service.json +1 -0
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/services/Shipping Service.json +1 -1
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/services.json +0 -0
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/users/dboyne.json +0 -0
- package/out/_next/data/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/users/mSmith.json +0 -0
- package/out/_next/data/jznFKGTbxJsAeYNZE4XtO/visualiser.json +1 -0
- package/out/_next/static/chunks/109-a08539311d3d6672.js +1 -0
- package/out/_next/static/chunks/{178-b2fa9e84692fffe3.js → 178-87f01d17ab32dd4f.js} +1 -1
- package/out/_next/static/chunks/252-08ab418f9b6821dd.js +1 -0
- package/out/_next/static/chunks/506-12764fcf4b5d93b0.js +1 -0
- package/out/_next/static/chunks/519-2ec6fc3cdbaa4dc2.js +1 -0
- package/out/_next/static/chunks/650-343888e13f994a09.js +1 -0
- package/out/_next/static/chunks/962-20c87db3880df896.js +1 -0
- package/out/_next/static/chunks/b744740b-229c238b25b9eeac.js +1 -0
- package/out/_next/static/chunks/pages/_app-f1bd719e11eb827e.js +1 -0
- package/out/_next/static/chunks/pages/events/[name]/v/{[version]-d8d4d12f05da9c8a.js → [version]-33051dbc32f5fe4e.js} +1 -1
- package/out/_next/static/chunks/pages/events/{[name]-89e1edc81aa51fc3.js → [name]-813780e7042af288.js} +1 -1
- package/out/_next/static/chunks/pages/services/[name]-142d7fa515cfc532.js +1 -0
- package/out/_next/static/chunks/pages/visualiser-e4e3757e74f19df7.js +1 -0
- package/out/_next/static/chunks/{webpack-258a9e5dae8126df.js → webpack-fb340c369157e229.js} +1 -1
- package/out/_next/static/css/4a01a08d48b115f7.css +3 -0
- package/out/_next/static/jznFKGTbxJsAeYNZE4XtO/_buildManifest.js +1 -0
- package/out/_next/static/{W7dEX1FefaypBNVaAa8SV → jznFKGTbxJsAeYNZE4XtO}/_middlewareManifest.js +0 -0
- package/out/_next/static/jznFKGTbxJsAeYNZE4XtO/_ssgManifest.js +1 -0
- package/out/events/AddedItemToCart/index.html +3 -3
- package/out/events/AddedItemToCart/logs/index.html +1 -1
- package/out/events/AddedItemToCart/v/0.0.1/index.html +2 -2
- package/out/events/AddedItemToCart/v/0.0.2/index.html +2 -2
- package/out/events/OrderComplete/index.html +3 -3
- package/out/events/OrderComplete/logs/index.html +1 -1
- package/out/events/OrderConfirmed/index.html +3 -3
- package/out/events/OrderConfirmed/logs/index.html +1 -1
- package/out/events/OrderRequested/index.html +3 -3
- package/out/events/OrderRequested/logs/index.html +1 -1
- package/out/events/PaymentProcessed/index.html +3 -3
- package/out/events/PaymentProcessed/logs/index.html +1 -1
- package/out/events/RemovedItemFromCart/index.html +3 -3
- package/out/events/RemovedItemFromCart/logs/index.html +1 -1
- package/out/events/ShipmentDelivered/index.html +3 -3
- package/out/events/ShipmentDelivered/logs/index.html +1 -1
- package/out/events/ShipmentDispatched/index.html +3 -3
- package/out/events/ShipmentDispatched/logs/index.html +1 -1
- package/out/events/ShipmentPrepared/index.html +2 -2
- package/out/events/ShipmentPrepared/logs/index.html +1 -1
- package/out/events/index.html +2 -2
- package/out/index.html +1 -1
- package/out/overview/index.html +1 -1
- package/out/services/Basket Service/index.html +2 -2
- package/out/services/Data Lake/index.html +2 -2
- package/out/services/Payment Service/index.html +2 -2
- package/out/services/Shipping Service/index.html +2 -2
- package/out/services/index.html +2 -2
- package/out/users/dboyne/index.html +2 -2
- package/out/users/mSmith/index.html +2 -2
- package/out/visualiser/index.html +14 -0
- package/package.json +2 -2
- package/pages/_app.tsx +59 -37
- package/pages/visualiser.tsx +248 -0
- package/styles/globals.css +18 -0
- package/.next/static/W7dEX1FefaypBNVaAa8SV/_buildManifest.js +0 -1
- package/.next/static/W7dEX1FefaypBNVaAa8SV/_ssgManifest.js +0 -1
- package/.next/static/chunks/280-06401c009983574c.js +0 -1
- package/.next/static/chunks/519-7c428c1e49c8e614.js +0 -1
- package/.next/static/chunks/620-d80b0351ea428525.js +0 -1
- package/.next/static/chunks/651-739e958e40343654.js +0 -1
- package/.next/static/chunks/962-3388407055119bf3.js +0 -1
- package/.next/static/chunks/b744740b-94e91620ba96ccbf.js +0 -1
- package/.next/static/chunks/pages/_app-46c2e0f1ff3b4efb.js +0 -1
- package/.next/static/chunks/pages/services/[name]-204382bfbc48b1b4.js +0 -1
- package/.next/static/css/7c5aa7fd17ca8eca.css +0 -3
- package/out/_next/data/W7dEX1FefaypBNVaAa8SV/services/Payment Service.json +0 -1
- package/out/_next/static/W7dEX1FefaypBNVaAa8SV/_buildManifest.js +0 -1
- package/out/_next/static/W7dEX1FefaypBNVaAa8SV/_ssgManifest.js +0 -1
- package/out/_next/static/chunks/280-06401c009983574c.js +0 -1
- package/out/_next/static/chunks/519-7c428c1e49c8e614.js +0 -1
- package/out/_next/static/chunks/620-d80b0351ea428525.js +0 -1
- package/out/_next/static/chunks/651-739e958e40343654.js +0 -1
- package/out/_next/static/chunks/962-3388407055119bf3.js +0 -1
- package/out/_next/static/chunks/b744740b-94e91620ba96ccbf.js +0 -1
- package/out/_next/static/chunks/pages/_app-46c2e0f1ff3b4efb.js +0 -1
- package/out/_next/static/chunks/pages/services/[name]-204382bfbc48b1b4.js +0 -1
- package/out/_next/static/css/7c5aa7fd17ca8eca.css +0 -3
|
@@ -0,0 +1,572 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.id = 484;
|
|
3
|
+
exports.ids = [484];
|
|
4
|
+
exports.modules = {
|
|
5
|
+
|
|
6
|
+
/***/ 8484:
|
|
7
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
// EXPORTS
|
|
11
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
12
|
+
"Z": () => (/* binding */ NodeGraph_NodeGraph)
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// EXTERNAL MODULE: external "react/jsx-runtime"
|
|
16
|
+
var jsx_runtime_ = __webpack_require__(997);
|
|
17
|
+
// EXTERNAL MODULE: external "react"
|
|
18
|
+
var external_react_ = __webpack_require__(6689);
|
|
19
|
+
// EXTERNAL MODULE: ../../node_modules/next/link.js
|
|
20
|
+
var next_link = __webpack_require__(9097);
|
|
21
|
+
// EXTERNAL MODULE: external "react-flow-renderer"
|
|
22
|
+
var external_react_flow_renderer_ = __webpack_require__(6987);
|
|
23
|
+
var external_react_flow_renderer_default = /*#__PURE__*/__webpack_require__.n(external_react_flow_renderer_);
|
|
24
|
+
// EXTERNAL MODULE: external "next/config"
|
|
25
|
+
var config_ = __webpack_require__(4558);
|
|
26
|
+
var config_default = /*#__PURE__*/__webpack_require__.n(config_);
|
|
27
|
+
// EXTERNAL MODULE: external "@heroicons/react/outline/"
|
|
28
|
+
var _ = __webpack_require__(535);
|
|
29
|
+
// EXTERNAL MODULE: external "@heroicons/react/solid/"
|
|
30
|
+
var solid_ = __webpack_require__(9464);
|
|
31
|
+
;// CONCATENATED MODULE: ./components/Mdx/NodeGraph/Node.tsx
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
function Node({ type , label }) {
|
|
37
|
+
const Icon = type === 'event' ? solid_.MailIcon : _.ServerIcon;
|
|
38
|
+
return(/*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
|
|
39
|
+
children: [
|
|
40
|
+
/*#__PURE__*/ jsx_runtime_.jsx(Icon, {
|
|
41
|
+
className: "h-3 w-3 text-gray-700 inline-block mr-1 -mt-0.5"
|
|
42
|
+
}),
|
|
43
|
+
/*#__PURE__*/ jsx_runtime_.jsx("span", {
|
|
44
|
+
className: "text-gray-700",
|
|
45
|
+
children: label
|
|
46
|
+
})
|
|
47
|
+
]
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
/* harmony default export */ const NodeGraph_Node = (Node);
|
|
51
|
+
|
|
52
|
+
;// CONCATENATED MODULE: ./components/Mdx/NodeGraph/GraphElements.tsx
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
const { publicRuntimeConfig: { basePath ='' } = {
|
|
58
|
+
} } = config_default()();
|
|
59
|
+
const MIN_NODE_WIDTH = 150;
|
|
60
|
+
const generateLink = (value, type)=>basePath !== '' ? `${basePath}/${type}/${value}` : `/${type}/${value}`
|
|
61
|
+
;
|
|
62
|
+
const calcWidth = (value)=>value.length * 8 > MIN_NODE_WIDTH ? value.length * 8 : MIN_NODE_WIDTH
|
|
63
|
+
;
|
|
64
|
+
const buildNodeEdge = ({ id , target , source , label , isAnimated =true })=>({
|
|
65
|
+
id,
|
|
66
|
+
target,
|
|
67
|
+
source,
|
|
68
|
+
type: 'smoothstep',
|
|
69
|
+
arrowHeadType: external_react_flow_renderer_.ArrowHeadType.ArrowClosed,
|
|
70
|
+
animated: isAnimated,
|
|
71
|
+
label,
|
|
72
|
+
labelBgPadding: [
|
|
73
|
+
8,
|
|
74
|
+
4
|
|
75
|
+
],
|
|
76
|
+
labelBgBorderRadius: 4,
|
|
77
|
+
labelStyle: {
|
|
78
|
+
fontSize: '6px'
|
|
79
|
+
},
|
|
80
|
+
labelBgStyle: {
|
|
81
|
+
fill: 'white',
|
|
82
|
+
color: '#fff',
|
|
83
|
+
fillOpacity: 0.5
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
;
|
|
87
|
+
const buildNodeData = ({ name , label , type , maxWidth })=>{
|
|
88
|
+
const width = calcWidth(label);
|
|
89
|
+
const linkType = type === 'service' ? 'services' : 'events';
|
|
90
|
+
const link = generateLink(name, linkType);
|
|
91
|
+
return {
|
|
92
|
+
label,
|
|
93
|
+
link,
|
|
94
|
+
width,
|
|
95
|
+
maxWidth
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
const getNodeLabel = ({ type , label , includeIcon })=>{
|
|
99
|
+
if (!includeIcon) return label;
|
|
100
|
+
return(/*#__PURE__*/ jsx_runtime_.jsx(NodeGraph_Node, {
|
|
101
|
+
type: type,
|
|
102
|
+
label: label
|
|
103
|
+
}));
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Builds a graph for a given event
|
|
107
|
+
* @param {Event} - event
|
|
108
|
+
* @param rootNodeColor - The color of the root node
|
|
109
|
+
* @param isAnimated - whether to animate the graph
|
|
110
|
+
*/ const getEventElements = ({ name: eventName , producers: eventProducers , consumers: eventConsumers }, rootNodeColor = '#2563eb', isAnimated = true, includeLabels = false, includeNodeIcons = false)=>{
|
|
111
|
+
const position = {
|
|
112
|
+
x: 0,
|
|
113
|
+
y: 0
|
|
114
|
+
};
|
|
115
|
+
const consumerColor = '#818cf8';
|
|
116
|
+
const producerColor = '#75d7b6';
|
|
117
|
+
const nodeStyles = {
|
|
118
|
+
fontSize: includeNodeIcons ? '8px' : 'auto'
|
|
119
|
+
};
|
|
120
|
+
const producersNames = eventProducers.map((s)=>calcWidth(s)
|
|
121
|
+
);
|
|
122
|
+
const maxProducersWidth = Math.max(...producersNames);
|
|
123
|
+
const consumersNames = eventConsumers.map((s)=>calcWidth(s)
|
|
124
|
+
);
|
|
125
|
+
const maxConsumersWidth = Math.max(...consumersNames);
|
|
126
|
+
const eventNameAsNodeID = `ev-${eventName.replace(/ /g, '_')}`;
|
|
127
|
+
const eventNodeWidth = calcWidth(eventName);
|
|
128
|
+
const producers = eventProducers.map((node)=>({
|
|
129
|
+
label: node,
|
|
130
|
+
id: `pr-${node.replace(/ /g, '_')}`
|
|
131
|
+
})
|
|
132
|
+
);
|
|
133
|
+
const consumers = eventConsumers.map((node)=>({
|
|
134
|
+
label: node,
|
|
135
|
+
id: `co-${node.replace(/ /g, '_')}`
|
|
136
|
+
})
|
|
137
|
+
);
|
|
138
|
+
// Transforms services & event into a graph model
|
|
139
|
+
const producersNodes = producers.map(({ label , id })=>{
|
|
140
|
+
const nodeWidth = calcWidth(label);
|
|
141
|
+
const diff = maxProducersWidth - nodeWidth;
|
|
142
|
+
const nodeMaxWidth = diff !== 0 ? nodeWidth - diff : maxProducersWidth;
|
|
143
|
+
const labelToRender = getNodeLabel({
|
|
144
|
+
type: 'service',
|
|
145
|
+
label,
|
|
146
|
+
includeIcon: includeNodeIcons
|
|
147
|
+
});
|
|
148
|
+
return {
|
|
149
|
+
id,
|
|
150
|
+
data: buildNodeData({
|
|
151
|
+
name: label,
|
|
152
|
+
label: labelToRender,
|
|
153
|
+
type: 'service',
|
|
154
|
+
maxWidth: nodeMaxWidth
|
|
155
|
+
}),
|
|
156
|
+
style: {
|
|
157
|
+
border: `2px solid ${producerColor}`,
|
|
158
|
+
width: nodeWidth,
|
|
159
|
+
...nodeStyles
|
|
160
|
+
},
|
|
161
|
+
type: 'input',
|
|
162
|
+
position
|
|
163
|
+
};
|
|
164
|
+
});
|
|
165
|
+
const consumersNodes = consumers.map(({ id , label })=>{
|
|
166
|
+
const width = calcWidth(label);
|
|
167
|
+
const labelToRender = getNodeLabel({
|
|
168
|
+
type: 'service',
|
|
169
|
+
label,
|
|
170
|
+
includeIcon: includeNodeIcons
|
|
171
|
+
});
|
|
172
|
+
return {
|
|
173
|
+
id,
|
|
174
|
+
data: buildNodeData({
|
|
175
|
+
name: label,
|
|
176
|
+
label: labelToRender,
|
|
177
|
+
type: 'service',
|
|
178
|
+
maxWidth: maxConsumersWidth
|
|
179
|
+
}),
|
|
180
|
+
style: {
|
|
181
|
+
border: `2px solid ${consumerColor}`,
|
|
182
|
+
width,
|
|
183
|
+
...nodeStyles
|
|
184
|
+
},
|
|
185
|
+
type: 'output',
|
|
186
|
+
position
|
|
187
|
+
};
|
|
188
|
+
});
|
|
189
|
+
const eventNode = {
|
|
190
|
+
id: eventNameAsNodeID,
|
|
191
|
+
data: buildNodeData({
|
|
192
|
+
name: eventName,
|
|
193
|
+
label: getNodeLabel({
|
|
194
|
+
type: 'event',
|
|
195
|
+
label: eventName,
|
|
196
|
+
includeIcon: includeNodeIcons
|
|
197
|
+
}),
|
|
198
|
+
type: 'event',
|
|
199
|
+
maxWidth: eventNodeWidth
|
|
200
|
+
}),
|
|
201
|
+
style: {
|
|
202
|
+
border: `2px solid ${rootNodeColor}`,
|
|
203
|
+
width: eventNodeWidth,
|
|
204
|
+
...nodeStyles
|
|
205
|
+
},
|
|
206
|
+
position
|
|
207
|
+
};
|
|
208
|
+
// Build connections
|
|
209
|
+
const producersEdges = producers.map(({ id , label })=>buildNodeEdge({
|
|
210
|
+
id: `epe-${label.replace(/ /g, '_')}`,
|
|
211
|
+
source: id,
|
|
212
|
+
target: eventNameAsNodeID,
|
|
213
|
+
isAnimated,
|
|
214
|
+
label: includeLabels ? 'publishes' : ''
|
|
215
|
+
})
|
|
216
|
+
);
|
|
217
|
+
const consumersEdges = consumers.map(({ id , label })=>buildNodeEdge({
|
|
218
|
+
id: `ece-${label.replace(/ /g, '_')}`,
|
|
219
|
+
target: id,
|
|
220
|
+
source: eventNameAsNodeID,
|
|
221
|
+
isAnimated,
|
|
222
|
+
label: includeLabels ? 'subscribed by' : ''
|
|
223
|
+
})
|
|
224
|
+
);
|
|
225
|
+
// Merge nodes in order
|
|
226
|
+
const elements = [
|
|
227
|
+
...producersNodes,
|
|
228
|
+
eventNode,
|
|
229
|
+
...consumersNodes,
|
|
230
|
+
...producersEdges,
|
|
231
|
+
...consumersEdges
|
|
232
|
+
];
|
|
233
|
+
return elements;
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* Builds a graph for a given service
|
|
237
|
+
* @param {Service} service
|
|
238
|
+
* @param {string} rootNodeColor of the root node
|
|
239
|
+
* @param isAnimated whether the graph should be animated
|
|
240
|
+
* @returns {string} Mermaid Graph
|
|
241
|
+
*/ const getServiceElements = ({ publishes , subscribes , name: serviceName }, rootNodeColor = '#2563eb', isAnimated = true, includeEdgeLabels = false, includeNodeIcons = false)=>{
|
|
242
|
+
const position = {
|
|
243
|
+
x: 0,
|
|
244
|
+
y: 0
|
|
245
|
+
};
|
|
246
|
+
const publishColor = '#818cf8';
|
|
247
|
+
const subscribeColor = '#75d7b6';
|
|
248
|
+
const nodeStyles = {
|
|
249
|
+
fontSize: includeNodeIcons ? '8px' : 'auto'
|
|
250
|
+
};
|
|
251
|
+
const publishesNames = publishes.map((e)=>calcWidth(e.name)
|
|
252
|
+
);
|
|
253
|
+
const maxPublishesWidth = Math.max(...publishesNames);
|
|
254
|
+
const subscribesNames = subscribes.map((e)=>calcWidth(e.name)
|
|
255
|
+
);
|
|
256
|
+
const maxSubscribesWidth = Math.max(...subscribesNames);
|
|
257
|
+
const serviceNameAsNodeID = `ser-${serviceName.replace(/ /g, '_')}`;
|
|
258
|
+
// Transforms services & event into a graph model
|
|
259
|
+
const publishesNodes = publishes.map((node)=>{
|
|
260
|
+
const nodeWidth = calcWidth(node.name);
|
|
261
|
+
const labelToRender = getNodeLabel({
|
|
262
|
+
type: 'event',
|
|
263
|
+
label: node.name,
|
|
264
|
+
includeIcon: includeNodeIcons
|
|
265
|
+
});
|
|
266
|
+
return {
|
|
267
|
+
id: `pub-${node.name.replace(/ /g, '_')}`,
|
|
268
|
+
data: buildNodeData({
|
|
269
|
+
name: node.name,
|
|
270
|
+
label: labelToRender,
|
|
271
|
+
type: 'event',
|
|
272
|
+
maxWidth: maxPublishesWidth
|
|
273
|
+
}),
|
|
274
|
+
style: {
|
|
275
|
+
border: `2px solid ${publishColor}`,
|
|
276
|
+
width: nodeWidth,
|
|
277
|
+
...nodeStyles
|
|
278
|
+
},
|
|
279
|
+
type: 'output',
|
|
280
|
+
position
|
|
281
|
+
};
|
|
282
|
+
});
|
|
283
|
+
const subscribesNodes = subscribes.map((node)=>{
|
|
284
|
+
const nodeWidth = calcWidth(node.name);
|
|
285
|
+
const diff = maxSubscribesWidth - nodeWidth;
|
|
286
|
+
const nodeMaxWidth = diff !== 0 ? nodeWidth - diff : maxSubscribesWidth;
|
|
287
|
+
const labelToRender = getNodeLabel({
|
|
288
|
+
type: 'event',
|
|
289
|
+
label: node.name,
|
|
290
|
+
includeIcon: includeNodeIcons
|
|
291
|
+
});
|
|
292
|
+
return {
|
|
293
|
+
id: `sub-${node.name.replace(/ /g, '_')}`,
|
|
294
|
+
data: buildNodeData({
|
|
295
|
+
name: node.name,
|
|
296
|
+
label: labelToRender,
|
|
297
|
+
type: 'event',
|
|
298
|
+
maxWidth: nodeMaxWidth,
|
|
299
|
+
...nodeStyles
|
|
300
|
+
}),
|
|
301
|
+
style: {
|
|
302
|
+
border: `2px solid ${subscribeColor}`,
|
|
303
|
+
width: nodeWidth,
|
|
304
|
+
...nodeStyles
|
|
305
|
+
},
|
|
306
|
+
type: 'input',
|
|
307
|
+
position
|
|
308
|
+
};
|
|
309
|
+
});
|
|
310
|
+
const serviceNode = {
|
|
311
|
+
id: serviceNameAsNodeID,
|
|
312
|
+
data: buildNodeData({
|
|
313
|
+
name: serviceName,
|
|
314
|
+
label: getNodeLabel({
|
|
315
|
+
type: 'service',
|
|
316
|
+
label: serviceName,
|
|
317
|
+
includeIcon: includeNodeIcons
|
|
318
|
+
}),
|
|
319
|
+
type: 'service',
|
|
320
|
+
maxWidth: calcWidth(serviceName)
|
|
321
|
+
}),
|
|
322
|
+
style: {
|
|
323
|
+
border: `2px solid ${rootNodeColor}`,
|
|
324
|
+
width: calcWidth(serviceName),
|
|
325
|
+
...nodeStyles
|
|
326
|
+
},
|
|
327
|
+
position
|
|
328
|
+
};
|
|
329
|
+
// Build connections
|
|
330
|
+
const publishesEdges = publishes.map((node)=>buildNodeEdge({
|
|
331
|
+
id: `ecp-${node.name.replace(/ /g, '_')}`,
|
|
332
|
+
source: serviceNameAsNodeID,
|
|
333
|
+
target: `pub-${node.name.replace(/ /g, '_')}`,
|
|
334
|
+
isAnimated,
|
|
335
|
+
label: includeEdgeLabels ? 'publishes' : ''
|
|
336
|
+
})
|
|
337
|
+
);
|
|
338
|
+
const subscribesEdges = subscribes.map((node)=>buildNodeEdge({
|
|
339
|
+
id: `esc-${node.name.replace(/ /g, '_')}`,
|
|
340
|
+
target: serviceNameAsNodeID,
|
|
341
|
+
source: `sub-${node.name.replace(/ /g, '_')}`,
|
|
342
|
+
isAnimated,
|
|
343
|
+
label: includeEdgeLabels ? 'subscribed by' : ''
|
|
344
|
+
})
|
|
345
|
+
);
|
|
346
|
+
// Merge nodes in order
|
|
347
|
+
const elements = [
|
|
348
|
+
...subscribesNodes,
|
|
349
|
+
serviceNode,
|
|
350
|
+
...publishesNodes,
|
|
351
|
+
...publishesEdges,
|
|
352
|
+
...subscribesEdges
|
|
353
|
+
];
|
|
354
|
+
return elements;
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
// EXTERNAL MODULE: external "dagre"
|
|
358
|
+
var external_dagre_ = __webpack_require__(4214);
|
|
359
|
+
var external_dagre_default = /*#__PURE__*/__webpack_require__.n(external_dagre_);
|
|
360
|
+
;// CONCATENATED MODULE: ./components/Mdx/NodeGraph/GraphLayout.ts
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
const nodeDefaultWidth = 150;
|
|
364
|
+
const nodeDefaultHeight = 36;
|
|
365
|
+
const offset = 48;
|
|
366
|
+
const verticalOffset = offset / 1.5;
|
|
367
|
+
function createGraphLayout(elements, isHorizontal) {
|
|
368
|
+
const dagreGraph = new (external_dagre_default()).graphlib.Graph();
|
|
369
|
+
dagreGraph.setDefaultEdgeLabel(()=>({
|
|
370
|
+
})
|
|
371
|
+
);
|
|
372
|
+
dagreGraph.setGraph({
|
|
373
|
+
rankdir: 'LR',
|
|
374
|
+
ranksep: offset * 2,
|
|
375
|
+
nodesep: verticalOffset
|
|
376
|
+
});
|
|
377
|
+
elements.forEach((element)=>{
|
|
378
|
+
if ((0,external_react_flow_renderer_.isNode)(element)) {
|
|
379
|
+
var ref, ref1, ref2, ref3;
|
|
380
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
381
|
+
const nodeWidth = ((ref = element.__rf) === null || ref === void 0 ? void 0 : ref.width) ? (ref1 = element.__rf) === null || ref1 === void 0 ? void 0 : ref1.width : (ref2 = element.data) === null || ref2 === void 0 ? void 0 : ref2.width;
|
|
382
|
+
dagreGraph.setNode(element.id, {
|
|
383
|
+
width: nodeWidth || nodeDefaultWidth,
|
|
384
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
385
|
+
height: ((ref3 = element.__rf) === null || ref3 === void 0 ? void 0 : ref3.height) || nodeDefaultHeight
|
|
386
|
+
});
|
|
387
|
+
} else {
|
|
388
|
+
dagreGraph.setEdge(element.source, element.target);
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
// Calculate the layout, to get the node positions with their widths and heights
|
|
392
|
+
external_dagre_default().layout(dagreGraph);
|
|
393
|
+
return elements.map((element)=>{
|
|
394
|
+
if ((0,external_react_flow_renderer_.isNode)(element)) {
|
|
395
|
+
var ref;
|
|
396
|
+
const node = dagreGraph.node(element.id);
|
|
397
|
+
element.targetPosition = isHorizontal ? external_react_flow_renderer_.Position.Left : external_react_flow_renderer_.Position.Top;
|
|
398
|
+
element.sourcePosition = isHorizontal ? external_react_flow_renderer_.Position.Right : external_react_flow_renderer_.Position.Bottom;
|
|
399
|
+
element.position = {
|
|
400
|
+
x: offset / 2 + node.x - ((element === null || element === void 0 ? void 0 : (ref = element.data) === null || ref === void 0 ? void 0 : ref.maxWidth) || node.width) / 2,
|
|
401
|
+
y: node.y - node.height / 2
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
return element;
|
|
405
|
+
});
|
|
406
|
+
};
|
|
407
|
+
// Helper - ReactFlow canvas height calculator
|
|
408
|
+
const calcCanvasHeight = (data, type)=>{
|
|
409
|
+
const minHeight = 300;
|
|
410
|
+
const nodeSpacing = nodeDefaultHeight + verticalOffset;
|
|
411
|
+
let nodesHeight = 0;
|
|
412
|
+
if (type === 'event') {
|
|
413
|
+
nodesHeight = Math.max(data.producers.length, data.consumers.length) * nodeSpacing;
|
|
414
|
+
} else {
|
|
415
|
+
nodesHeight = Math.max(data.publishes.length, data.subscribes.length) * nodeSpacing;
|
|
416
|
+
}
|
|
417
|
+
return Math.max(minHeight, nodesHeight);
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
;// CONCATENATED MODULE: ./components/Mdx/NodeGraph/NodeGraph.tsx
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
// NodeGraphBuilder component wrapping ReactFlow
|
|
428
|
+
function NodeGraphBuilder({ data , source , rootNodeColor , maxZoom =10 , isAnimated =true , fitView =true , zoomOnScroll =false , isDraggable =false , isHorizontal =true , includeBackground =false , includeEdgeLabels =false , includeNodeIcons , title , subtitle }) {
|
|
429
|
+
const getElements = ()=>{
|
|
430
|
+
if (source === 'event') {
|
|
431
|
+
return getEventElements(data, rootNodeColor, isAnimated, includeEdgeLabels, includeNodeIcons);
|
|
432
|
+
}
|
|
433
|
+
return getServiceElements(data, rootNodeColor, isAnimated, includeEdgeLabels, includeNodeIcons);
|
|
434
|
+
};
|
|
435
|
+
// Initialize graph layout
|
|
436
|
+
const isInitializedRef = (0,external_react_.useRef)(false);
|
|
437
|
+
const nodes = (0,external_react_flow_renderer_.useStoreState)((state)=>state.nodes
|
|
438
|
+
);
|
|
439
|
+
const edges = (0,external_react_flow_renderer_.useStoreState)((state)=>state.edges
|
|
440
|
+
);
|
|
441
|
+
const { fitView: resetView } = (0,external_react_flow_renderer_.useZoomPanHelper)();
|
|
442
|
+
// Calculate initial element layout
|
|
443
|
+
const graphElements = createGraphLayout(getElements(), isHorizontal);
|
|
444
|
+
const { 0: elements , 1: setElements } = (0,external_react_.useState)(graphElements);
|
|
445
|
+
// if data changes, reset the elements
|
|
446
|
+
(0,external_react_.useEffect)(()=>{
|
|
447
|
+
const updatedElements = createGraphLayout(getElements(), isHorizontal);
|
|
448
|
+
setElements(updatedElements);
|
|
449
|
+
setTimeout(()=>{
|
|
450
|
+
resetView();
|
|
451
|
+
}, 1);
|
|
452
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
453
|
+
}, [
|
|
454
|
+
data
|
|
455
|
+
]);
|
|
456
|
+
// Rerender graph layout to get rendered width/height for nodes/edges
|
|
457
|
+
(0,external_react_.useEffect)(()=>{
|
|
458
|
+
var // eslint-disable-next-line no-underscore-dangle
|
|
459
|
+
ref;
|
|
460
|
+
if (isInitializedRef.current === false && nodes.length > 0 && (nodes === null || nodes === void 0 ? void 0 : (ref = nodes[0]) === null || ref === void 0 ? void 0 : ref.__rf.width) != null) {
|
|
461
|
+
// Calculate element layout
|
|
462
|
+
const updateElements = ()=>{
|
|
463
|
+
const updatedElements = createGraphLayout([
|
|
464
|
+
...nodes,
|
|
465
|
+
...edges
|
|
466
|
+
], isHorizontal);
|
|
467
|
+
setElements(updatedElements);
|
|
468
|
+
isInitializedRef.current = true;
|
|
469
|
+
};
|
|
470
|
+
updateElements();
|
|
471
|
+
}
|
|
472
|
+
}, [
|
|
473
|
+
nodes,
|
|
474
|
+
edges,
|
|
475
|
+
isInitializedRef,
|
|
476
|
+
isHorizontal
|
|
477
|
+
]);
|
|
478
|
+
// ReactFlow operations
|
|
479
|
+
const onElementClick = (event, element)=>window.open(element.data.link, '_self')
|
|
480
|
+
;
|
|
481
|
+
const onLoad = (0,external_react_.useCallback)((reactFlowInstance)=>{
|
|
482
|
+
if (fitView) {
|
|
483
|
+
reactFlowInstance.fitView();
|
|
484
|
+
}
|
|
485
|
+
}, [
|
|
486
|
+
fitView
|
|
487
|
+
]);
|
|
488
|
+
return(/*#__PURE__*/ (0,jsx_runtime_.jsxs)((external_react_flow_renderer_default()), {
|
|
489
|
+
elements: elements,
|
|
490
|
+
onLoad: onLoad,
|
|
491
|
+
onElementClick: onElementClick,
|
|
492
|
+
nodesDraggable: isDraggable,
|
|
493
|
+
zoomOnScroll: zoomOnScroll,
|
|
494
|
+
maxZoom: maxZoom,
|
|
495
|
+
children: [
|
|
496
|
+
title && /*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
|
|
497
|
+
className: "absolute top-4 right-4 bg-white z-10 text-lg px-4 py-2 space-x-2",
|
|
498
|
+
children: [
|
|
499
|
+
/*#__PURE__*/ jsx_runtime_.jsx("span", {
|
|
500
|
+
className: " font-bold",
|
|
501
|
+
children: title
|
|
502
|
+
}),
|
|
503
|
+
subtitle && /*#__PURE__*/ (0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
|
|
504
|
+
children: [
|
|
505
|
+
/*#__PURE__*/ jsx_runtime_.jsx("span", {
|
|
506
|
+
className: "text-gray-200",
|
|
507
|
+
children: "|"
|
|
508
|
+
}),
|
|
509
|
+
/*#__PURE__*/ jsx_runtime_.jsx("span", {
|
|
510
|
+
className: "font-light",
|
|
511
|
+
children: subtitle
|
|
512
|
+
})
|
|
513
|
+
]
|
|
514
|
+
})
|
|
515
|
+
]
|
|
516
|
+
}),
|
|
517
|
+
/*#__PURE__*/ jsx_runtime_.jsx(external_react_flow_renderer_.Controls, {
|
|
518
|
+
className: "block absolute top-5 react-flow__controls-no-shadow"
|
|
519
|
+
}),
|
|
520
|
+
includeBackground && /*#__PURE__*/ jsx_runtime_.jsx(external_react_flow_renderer_.Background, {
|
|
521
|
+
color: "#c1c1c1",
|
|
522
|
+
gap: 8
|
|
523
|
+
})
|
|
524
|
+
]
|
|
525
|
+
}));
|
|
526
|
+
}
|
|
527
|
+
// NodeGraph wrapping NodeGraphBuilder Component
|
|
528
|
+
function NodeGraph({ data , source , rootNodeColor , maxHeight , maxZoom , fitView , zoomOnScroll , isAnimated , isDraggable , isHorizontal , includeBackground , renderWithBorder =true , title , subtitle , includeEdgeLabels , includeNodeIcons }) {
|
|
529
|
+
// Set dynamic height of node graph
|
|
530
|
+
const dynamicHeight = maxHeight || calcCanvasHeight(data, source);
|
|
531
|
+
const borderClasses = `border-dashed border-2 border-slate-300`;
|
|
532
|
+
return(/*#__PURE__*/ (0,jsx_runtime_.jsxs)("div", {
|
|
533
|
+
className: `node-graph w-full h-screen ${renderWithBorder ? borderClasses : ''}`,
|
|
534
|
+
style: {
|
|
535
|
+
height: dynamicHeight
|
|
536
|
+
},
|
|
537
|
+
children: [
|
|
538
|
+
/*#__PURE__*/ jsx_runtime_.jsx(external_react_flow_renderer_.ReactFlowProvider, {
|
|
539
|
+
children: /*#__PURE__*/ jsx_runtime_.jsx(NodeGraphBuilder, {
|
|
540
|
+
source: source,
|
|
541
|
+
data: data,
|
|
542
|
+
rootNodeColor: rootNodeColor,
|
|
543
|
+
maxZoom: maxZoom,
|
|
544
|
+
fitView: fitView,
|
|
545
|
+
includeBackground: includeBackground,
|
|
546
|
+
zoomOnScroll: zoomOnScroll,
|
|
547
|
+
isAnimated: isAnimated,
|
|
548
|
+
isDraggable: isDraggable,
|
|
549
|
+
isHorizontal: isHorizontal,
|
|
550
|
+
includeEdgeLabels: includeEdgeLabels,
|
|
551
|
+
includeNodeIcons: includeNodeIcons,
|
|
552
|
+
title: title,
|
|
553
|
+
subtitle: subtitle
|
|
554
|
+
})
|
|
555
|
+
}),
|
|
556
|
+
/*#__PURE__*/ jsx_runtime_.jsx(next_link["default"], {
|
|
557
|
+
href: `/visualiser?type=${source}&name=${data.name}`,
|
|
558
|
+
children: /*#__PURE__*/ jsx_runtime_.jsx("a", {
|
|
559
|
+
className: "block text-right underline text-xs mt-4",
|
|
560
|
+
children: "Open in Visualiser →"
|
|
561
|
+
})
|
|
562
|
+
})
|
|
563
|
+
]
|
|
564
|
+
}));
|
|
565
|
+
}
|
|
566
|
+
/* harmony default export */ const NodeGraph_NodeGraph = (NodeGraph);
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
/***/ })
|
|
570
|
+
|
|
571
|
+
};
|
|
572
|
+
;
|