@eventcatalog/visualiser 4.1.4 → 4.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +21 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5905,6 +5905,7 @@ var System_default = (0, import_react54.memo)(function SystemNode({ data }) {
|
|
|
5905
5905
|
const { id, version, name, summary, scope } = system;
|
|
5906
5906
|
const isExternal = scope === "external";
|
|
5907
5907
|
const isDark = useDarkMode();
|
|
5908
|
+
const isFlowStep = Boolean(data.step);
|
|
5908
5909
|
const stats = [
|
|
5909
5910
|
{ icon: import_lucide_react26.Server, label: "Services", count: servicesCount },
|
|
5910
5911
|
{ icon: import_lucide_react26.MessageSquare, label: "Messages", count: messagesCount },
|
|
@@ -5918,15 +5919,18 @@ var System_default = (0, import_react54.memo)(function SystemNode({ data }) {
|
|
|
5918
5919
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
5919
5920
|
"div",
|
|
5920
5921
|
{
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5922
|
+
...isFlowStep ? {} : {
|
|
5923
|
+
role: "button",
|
|
5924
|
+
tabIndex: 0,
|
|
5925
|
+
onClick: goToMap,
|
|
5926
|
+
onKeyDown: (e) => {
|
|
5927
|
+
if (e.key === "Enter" || e.key === " ") goToMap();
|
|
5928
|
+
},
|
|
5929
|
+
title: `Open the ${name} map`
|
|
5926
5930
|
},
|
|
5927
|
-
title: `Open the ${name} map`,
|
|
5928
5931
|
className: classNames18(
|
|
5929
|
-
"relative min-w-48 max-w-60 rounded-xl border-2 overflow-visible
|
|
5932
|
+
"relative min-w-48 max-w-60 rounded-xl border-2 overflow-visible",
|
|
5933
|
+
!isFlowStep && "cursor-pointer",
|
|
5930
5934
|
isExternal ? "border-dashed border-violet-400" : "border-violet-500"
|
|
5931
5935
|
),
|
|
5932
5936
|
style: {
|
|
@@ -9011,6 +9015,8 @@ var NODE_SHAPE_MAP = {
|
|
|
9011
9015
|
flows: ["([", "])"],
|
|
9012
9016
|
// stadium (rounded)
|
|
9013
9017
|
flow: ["([", "])"],
|
|
9018
|
+
systems: ["[[", "]]"],
|
|
9019
|
+
system: ["[[", "]]"],
|
|
9014
9020
|
step: ["[", "]"],
|
|
9015
9021
|
// rectangle
|
|
9016
9022
|
user: ["((", "))"],
|
|
@@ -9060,6 +9066,8 @@ var NODE_STYLE_CLASSES = {
|
|
|
9060
9066
|
domain: "fill:#eab308,stroke:#a16207,color:#000",
|
|
9061
9067
|
flows: "fill:#14b8a6,stroke:#0f766e,color:#fff",
|
|
9062
9068
|
flow: "fill:#14b8a6,stroke:#0f766e,color:#fff",
|
|
9069
|
+
systems: "fill:#8b5cf6,stroke:#6d28d9,color:#fff",
|
|
9070
|
+
system: "fill:#8b5cf6,stroke:#6d28d9,color:#fff",
|
|
9063
9071
|
step: "fill:#374151,stroke:#1f2937,color:#fff",
|
|
9064
9072
|
user: "fill:#8b5cf6,stroke:#6d28d9,color:#fff",
|
|
9065
9073
|
actor: "fill:#eab308,stroke:#a16207,color:#000",
|
|
@@ -9131,6 +9139,12 @@ function getNodeLabel(node) {
|
|
|
9131
9139
|
const version = domainData?.version || domain?.version;
|
|
9132
9140
|
return formatLabelWithVersion(name, version);
|
|
9133
9141
|
}
|
|
9142
|
+
if (type === "systems" || type === "system") {
|
|
9143
|
+
const system = data.system;
|
|
9144
|
+
const name = system?.name || system?.id || node.id;
|
|
9145
|
+
const version = system?.data?.version || system?.version;
|
|
9146
|
+
return formatLabelWithVersion(name, version);
|
|
9147
|
+
}
|
|
9134
9148
|
if (type === "flows" || type === "flow") {
|
|
9135
9149
|
const flow = data.flow;
|
|
9136
9150
|
const name = flow?.name || flow?.id || node.id;
|