@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.mjs
CHANGED
|
@@ -5841,6 +5841,7 @@ var System_default = memo26(function SystemNode({ data }) {
|
|
|
5841
5841
|
const { id, version, name, summary, scope } = system;
|
|
5842
5842
|
const isExternal = scope === "external";
|
|
5843
5843
|
const isDark = useDarkMode();
|
|
5844
|
+
const isFlowStep = Boolean(data.step);
|
|
5844
5845
|
const stats = [
|
|
5845
5846
|
{ icon: ServerIcon2, label: "Services", count: servicesCount },
|
|
5846
5847
|
{ icon: MessageSquareIcon, label: "Messages", count: messagesCount },
|
|
@@ -5854,15 +5855,18 @@ var System_default = memo26(function SystemNode({ data }) {
|
|
|
5854
5855
|
return /* @__PURE__ */ jsxs27(
|
|
5855
5856
|
"div",
|
|
5856
5857
|
{
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5858
|
+
...isFlowStep ? {} : {
|
|
5859
|
+
role: "button",
|
|
5860
|
+
tabIndex: 0,
|
|
5861
|
+
onClick: goToMap,
|
|
5862
|
+
onKeyDown: (e) => {
|
|
5863
|
+
if (e.key === "Enter" || e.key === " ") goToMap();
|
|
5864
|
+
},
|
|
5865
|
+
title: `Open the ${name} map`
|
|
5862
5866
|
},
|
|
5863
|
-
title: `Open the ${name} map`,
|
|
5864
5867
|
className: classNames18(
|
|
5865
|
-
"relative min-w-48 max-w-60 rounded-xl border-2 overflow-visible
|
|
5868
|
+
"relative min-w-48 max-w-60 rounded-xl border-2 overflow-visible",
|
|
5869
|
+
!isFlowStep && "cursor-pointer",
|
|
5866
5870
|
isExternal ? "border-dashed border-violet-400" : "border-violet-500"
|
|
5867
5871
|
),
|
|
5868
5872
|
style: {
|
|
@@ -8999,6 +9003,8 @@ var NODE_SHAPE_MAP = {
|
|
|
8999
9003
|
flows: ["([", "])"],
|
|
9000
9004
|
// stadium (rounded)
|
|
9001
9005
|
flow: ["([", "])"],
|
|
9006
|
+
systems: ["[[", "]]"],
|
|
9007
|
+
system: ["[[", "]]"],
|
|
9002
9008
|
step: ["[", "]"],
|
|
9003
9009
|
// rectangle
|
|
9004
9010
|
user: ["((", "))"],
|
|
@@ -9048,6 +9054,8 @@ var NODE_STYLE_CLASSES = {
|
|
|
9048
9054
|
domain: "fill:#eab308,stroke:#a16207,color:#000",
|
|
9049
9055
|
flows: "fill:#14b8a6,stroke:#0f766e,color:#fff",
|
|
9050
9056
|
flow: "fill:#14b8a6,stroke:#0f766e,color:#fff",
|
|
9057
|
+
systems: "fill:#8b5cf6,stroke:#6d28d9,color:#fff",
|
|
9058
|
+
system: "fill:#8b5cf6,stroke:#6d28d9,color:#fff",
|
|
9051
9059
|
step: "fill:#374151,stroke:#1f2937,color:#fff",
|
|
9052
9060
|
user: "fill:#8b5cf6,stroke:#6d28d9,color:#fff",
|
|
9053
9061
|
actor: "fill:#eab308,stroke:#a16207,color:#000",
|
|
@@ -9119,6 +9127,12 @@ function getNodeLabel(node) {
|
|
|
9119
9127
|
const version = domainData?.version || domain?.version;
|
|
9120
9128
|
return formatLabelWithVersion(name, version);
|
|
9121
9129
|
}
|
|
9130
|
+
if (type === "systems" || type === "system") {
|
|
9131
|
+
const system = data.system;
|
|
9132
|
+
const name = system?.name || system?.id || node.id;
|
|
9133
|
+
const version = system?.data?.version || system?.version;
|
|
9134
|
+
return formatLabelWithVersion(name, version);
|
|
9135
|
+
}
|
|
9122
9136
|
if (type === "flows" || type === "flow") {
|
|
9123
9137
|
const flow = data.flow;
|
|
9124
9138
|
const name = flow?.name || flow?.id || node.id;
|