@industry-theme/principal-view-panels 0.12.119 → 0.12.120
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasEditorPanel.d.ts","sourceRoot":"","sources":["../../src/panels/CanvasEditorPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAI5D,OAAO,KAAK,EAAqD,gBAAgB,EAAgF,MAAM,mCAAmC,CAAC;AAE3M,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAKxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAwDrE;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,2BAA2B;IACzE;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,cAAc,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEjC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAE3C;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,gBAAgB,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEnC;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC;QACrB,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;QAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC,CAAC;IAEH;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEn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rB,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;QAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC,CAAC;IAEH;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC;;;;OAIG;IACH,aAAa,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAEvC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAE1B;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA8wE9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardPanel.d.ts","sourceRoot":"","sources":["../../src/panels/DashboardPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAS/E,OAAO,KAAK,EAEV,YAAY,EAGZ,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAEhB,YAAY,EAKb,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"DashboardPanel.d.ts","sourceRoot":"","sources":["../../src/panels/DashboardPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAS/E,OAAO,KAAK,EAEV,YAAY,EAGZ,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,gBAAgB,EAEhB,YAAY,EAKb,MAAM,mCAAmC,CAAC;AAmP3C;;GAEG;AACH,MAAM,W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,MAAM,KAAK,IAAI,CAAC;IACzC,oCAAoC;IACpC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,EAAE,CAAC;IACrD,sDAAsD;IACtD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wCAAwC;IACxC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,sEAAsE;IACtE,WAAW,CAAC,EAAE,SAAS,EAAE,CAAC;IAC1B,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAAC;CACzC;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAyctD,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -182122,7 +182122,7 @@ function getParentNamespace(namespace2) {
|
|
|
182122
182122
|
return segments.slice(0, -1).join(".");
|
|
182123
182123
|
}
|
|
182124
182124
|
function useSequenceLayout(events, sequenceEdges, options = {}) {
|
|
182125
|
-
const { namespaceStrategy = "all-but-last", laneWidth =
|
|
182125
|
+
const { namespaceStrategy = "all-but-last", laneWidth = 250, laneGap = 0, eventSpacing = 80, headerHeight = 60, collapsedNamespaces = [], nodeWidth = 14, nodeHeight = 14 } = options;
|
|
182126
182126
|
return useMemo(() => {
|
|
182127
182127
|
if (events.length === 0) {
|
|
182128
182128
|
return {
|
|
@@ -182206,6 +182206,7 @@ function useSequenceLayout(events, sequenceEdges, options = {}) {
|
|
|
182206
182206
|
visibleNamespace,
|
|
182207
182207
|
timeLayer: i2,
|
|
182208
182208
|
isMoveEvent: event.moveEvent === true,
|
|
182209
|
+
sourcePath: event.sourcePath,
|
|
182209
182210
|
...event.data
|
|
182210
182211
|
},
|
|
182211
182212
|
style: {
|
|
@@ -182412,17 +182413,23 @@ function SequenceArrowParticipantEdge({ id: id2, sourceY, targetY, label, data }
|
|
|
182412
182413
|
barY = Math.min(safeSourceY, safeTargetY);
|
|
182413
182414
|
}
|
|
182414
182415
|
const barX = sourceX - barWidth / 2;
|
|
182415
|
-
return jsxs(Fragment, { children: [jsx("svg", { children: jsx("rect", { x: barX, y: barY, width: barWidth, height: barHeight, fill: strokeColor,
|
|
182416
|
+
return jsxs(Fragment, { children: [jsx("svg", { children: jsx("rect", { x: barX, y: barY, width: barWidth, height: barHeight, fill: strokeColor, stroke: strokeColor, strokeWidth: 2, rx: 2 }) }), label && jsx(EdgeLabelRenderer, { children: jsx("div", { style: {
|
|
182416
182417
|
position: "absolute",
|
|
182417
|
-
transform: `translate(
|
|
182418
|
+
transform: `translate(-100%, -50%) translate(${sourceX - 7}px,${barY + barHeight / 2}px)`,
|
|
182418
182419
|
background: isSourceSelected ? strokeColor : theme2.colors.background,
|
|
182419
|
-
padding:
|
|
182420
|
-
|
|
182420
|
+
padding: "2px 8px",
|
|
182421
|
+
borderTopLeftRadius: 4,
|
|
182422
|
+
borderTopRightRadius: 0,
|
|
182423
|
+
borderBottomLeftRadius: 4,
|
|
182424
|
+
borderBottomRightRadius: 0,
|
|
182421
182425
|
fontSize: theme2.fontSizes[0],
|
|
182422
182426
|
fontWeight: isSourceSelected ? theme2.fontWeights.bold : theme2.fontWeights.medium,
|
|
182423
182427
|
fontFamily: theme2.fonts.body,
|
|
182424
182428
|
color: isSourceSelected ? theme2.colors.background : strokeColor,
|
|
182425
|
-
|
|
182429
|
+
borderTop: `${isSourceSelected ? 2 : 1}px solid ${strokeColor}`,
|
|
182430
|
+
borderLeft: `${isSourceSelected ? 2 : 1}px solid ${strokeColor}`,
|
|
182431
|
+
borderBottom: `${isSourceSelected ? 2 : 1}px solid ${strokeColor}`,
|
|
182432
|
+
borderRight: `1px solid ${strokeColor}`,
|
|
182426
182433
|
pointerEvents: "all",
|
|
182427
182434
|
whiteSpace: "nowrap",
|
|
182428
182435
|
cursor: "pointer",
|
|
@@ -182433,7 +182440,11 @@ function SequenceArrowParticipantEdge({ id: id2, sourceY, targetY, label, data }
|
|
|
182433
182440
|
const strokeWidth = isMoveEvent ? 2.5 : 2;
|
|
182434
182441
|
const markerEnd = isMoveEvent ? "url(#sequence-arrow-move)" : "url(#sequence-arrow)";
|
|
182435
182442
|
const arrowY = (safeSourceY + safeTargetY) / 2;
|
|
182436
|
-
const
|
|
182443
|
+
const lifelineInset = 6;
|
|
182444
|
+
const direction = targetX > sourceX ? 1 : -1;
|
|
182445
|
+
const startX = sourceX + direction * lifelineInset;
|
|
182446
|
+
const endX = targetX - direction * lifelineInset;
|
|
182447
|
+
const path2 = `M ${startX} ${arrowY} L ${endX} ${arrowY}`;
|
|
182437
182448
|
const labelX = (sourceX + targetX) / 2;
|
|
182438
182449
|
const labelY = arrowY;
|
|
182439
182450
|
return jsxs(Fragment, { children: [jsx(BaseEdge, { id: id2, path: path2, style: {
|
|
@@ -182443,13 +182454,19 @@ function SequenceArrowParticipantEdge({ id: id2, sourceY, targetY, label, data }
|
|
|
182443
182454
|
position: "absolute",
|
|
182444
182455
|
transform: `translate(-50%, -50%) translate(${labelX}px,${labelY - 12}px)`,
|
|
182445
182456
|
background: isSourceSelected ? strokeColor : theme2.colors.background,
|
|
182446
|
-
padding:
|
|
182447
|
-
|
|
182457
|
+
padding: isMoveEvent ? "3px 10px" : "2px 8px",
|
|
182458
|
+
borderTopLeftRadius: 4,
|
|
182459
|
+
borderTopRightRadius: 4,
|
|
182460
|
+
borderBottomLeftRadius: 0,
|
|
182461
|
+
borderBottomRightRadius: 0,
|
|
182448
182462
|
fontSize: theme2.fontSizes[0],
|
|
182449
182463
|
fontWeight: isSourceSelected ? theme2.fontWeights.bold : isMoveEvent ? theme2.fontWeights.bold : theme2.fontWeights.medium,
|
|
182450
182464
|
fontFamily: theme2.fonts.body,
|
|
182451
182465
|
color: isSourceSelected ? theme2.colors.background : strokeColor,
|
|
182452
|
-
|
|
182466
|
+
borderTop: `${isSourceSelected ? 3 : isMoveEvent ? 2 : 1}px solid ${strokeColor}`,
|
|
182467
|
+
borderLeft: `${isSourceSelected ? 3 : isMoveEvent ? 2 : 1}px solid ${strokeColor}`,
|
|
182468
|
+
borderRight: `${isSourceSelected ? 3 : isMoveEvent ? 2 : 1}px solid ${strokeColor}`,
|
|
182469
|
+
borderBottom: `${isMoveEvent ? 2 : 1}px solid ${strokeColor}`,
|
|
182453
182470
|
pointerEvents: "all",
|
|
182454
182471
|
whiteSpace: "nowrap",
|
|
182455
182472
|
cursor: "pointer",
|
|
@@ -182464,10 +182481,11 @@ const defaultSequenceEdgeTypes = {
|
|
|
182464
182481
|
sequenceArrow: SequenceArrowEdge,
|
|
182465
182482
|
sequenceArrowParticipant: SequenceArrowParticipantEdge
|
|
182466
182483
|
};
|
|
182467
|
-
function SwimlaneLayer({ swimlanes, laneWidth, headerHeight, totalHeight }) {
|
|
182484
|
+
function SwimlaneLayer({ swimlanes, laneWidth, headerHeight, totalHeight, transparent = false }) {
|
|
182468
182485
|
const { x: x2, y: y2, zoom: zoom2 } = useViewport();
|
|
182486
|
+
const viewportHeight = useStore((s2) => s2.height);
|
|
182469
182487
|
const { theme: theme2 } = useTheme();
|
|
182470
|
-
const extendedHeight = totalHeight + 20;
|
|
182488
|
+
const extendedHeight = Math.max(totalHeight + 20, viewportHeight / zoom2 + 100);
|
|
182471
182489
|
return jsxs("div", { style: {
|
|
182472
182490
|
position: "absolute",
|
|
182473
182491
|
top: 0,
|
|
@@ -182478,13 +182496,14 @@ function SwimlaneLayer({ swimlanes, laneWidth, headerHeight, totalHeight }) {
|
|
|
182478
182496
|
zIndex: -1
|
|
182479
182497
|
}, children: [swimlanes.map((lane, index2) => {
|
|
182480
182498
|
const isEven = index2 % 2 === 0;
|
|
182499
|
+
const laneBackground = transparent ? "transparent" : isEven ? theme2.colors.muted : theme2.colors.background;
|
|
182481
182500
|
return jsx("div", { style: {
|
|
182482
182501
|
position: "absolute",
|
|
182483
182502
|
left: lane.x - laneWidth / 2,
|
|
182484
182503
|
top: 0,
|
|
182485
182504
|
width: laneWidth,
|
|
182486
182505
|
height: extendedHeight,
|
|
182487
|
-
backgroundColor:
|
|
182506
|
+
backgroundColor: laneBackground,
|
|
182488
182507
|
borderRight: `1px solid ${theme2.colors.border}`
|
|
182489
182508
|
} }, `bg-${lane.namespace}`);
|
|
182490
182509
|
}), swimlanes.map((lane) => jsx("div", { style: {
|
|
@@ -182493,11 +182512,11 @@ function SwimlaneLayer({ swimlanes, laneWidth, headerHeight, totalHeight }) {
|
|
|
182493
182512
|
top: headerHeight,
|
|
182494
182513
|
width: 2,
|
|
182495
182514
|
height: extendedHeight - headerHeight,
|
|
182496
|
-
backgroundColor:
|
|
182515
|
+
backgroundColor: "rgba(255, 255, 255, 0.4)",
|
|
182497
182516
|
transform: "translateX(-1px)"
|
|
182498
182517
|
} }, `lifeline-${lane.namespace}`))] });
|
|
182499
182518
|
}
|
|
182500
|
-
function SwimlaneHeadersLayer({ swimlanes, laneWidth, headerHeight, onToggleCollapse, stickyHeaders = true }) {
|
|
182519
|
+
function SwimlaneHeadersLayer({ swimlanes, laneWidth, headerHeight, onToggleCollapse, stickyHeaders = true, transparent = false }) {
|
|
182501
182520
|
const { x: x2, y: y2, zoom: zoom2 } = useViewport();
|
|
182502
182521
|
const { theme: theme2 } = useTheme();
|
|
182503
182522
|
const headerTop = stickyHeaders ? -y2 / zoom2 : 0;
|
|
@@ -182520,7 +182539,9 @@ function SwimlaneHeadersLayer({ swimlanes, laneWidth, headerHeight, onToggleColl
|
|
|
182520
182539
|
display: "flex",
|
|
182521
182540
|
alignItems: "center",
|
|
182522
182541
|
justifyContent: "center",
|
|
182523
|
-
|
|
182542
|
+
padding: "0 8px",
|
|
182543
|
+
boxSizing: "border-box",
|
|
182544
|
+
backgroundColor: transparent ? "transparent" : theme2.colors.muted,
|
|
182524
182545
|
borderBottom: `2px solid ${theme2.colors.border}`,
|
|
182525
182546
|
fontWeight: theme2.fontWeights.semibold,
|
|
182526
182547
|
fontSize: theme2.fontSizes[2],
|
|
@@ -182529,7 +182550,12 @@ function SwimlaneHeadersLayer({ swimlanes, laneWidth, headerHeight, onToggleColl
|
|
|
182529
182550
|
pointerEvents: "auto",
|
|
182530
182551
|
cursor: hasChildren ? "pointer" : "default",
|
|
182531
182552
|
userSelect: "none"
|
|
182532
|
-
}, onClick: () => hasChildren && (onToggleCollapse == null ? void 0 : onToggleCollapse(lane.namespace)), children: [hasChildren && jsx("span", { style: { marginRight: 6, fontSize: 10 }, children: lane.isCollapsed ? "▼" : "▶" }), jsx("span", {
|
|
182553
|
+
}, onClick: () => hasChildren && (onToggleCollapse == null ? void 0 : onToggleCollapse(lane.namespace)), children: [hasChildren && jsx("span", { style: { marginRight: 6, fontSize: 10 }, children: lane.isCollapsed ? "▼" : "▶" }), jsx("span", { style: {
|
|
182554
|
+
overflowWrap: "anywhere",
|
|
182555
|
+
wordBreak: "break-word",
|
|
182556
|
+
lineHeight: 1.2,
|
|
182557
|
+
textAlign: "center"
|
|
182558
|
+
}, title: lane.label, children: lane.label })] }, `header-${lane.namespace}`);
|
|
182533
182559
|
}) });
|
|
182534
182560
|
}
|
|
182535
182561
|
function SequenceDiagramInner({
|
|
@@ -182545,14 +182571,15 @@ function SequenceDiagramInner({
|
|
|
182545
182571
|
// Default to false since swimlanes provide visual structure
|
|
182546
182572
|
stickyHeaders = true,
|
|
182547
182573
|
selectedNodeId,
|
|
182548
|
-
showEventLabels = false
|
|
182574
|
+
showEventLabels = false,
|
|
182549
182575
|
// Default to false - labels already shown on edges
|
|
182576
|
+
transparent = false
|
|
182550
182577
|
}) {
|
|
182551
182578
|
const { theme: theme2 } = useTheme();
|
|
182552
|
-
const { laneWidth =
|
|
182579
|
+
const { laneWidth = 250, headerHeight = 60 } = layoutOptions;
|
|
182553
182580
|
const nodeTypes2 = useMemo(() => ({ ...defaultSequenceNodeTypes, ...customNodeTypes }), [customNodeTypes]);
|
|
182554
182581
|
const edgeTypes2 = useMemo(() => ({ ...defaultSequenceEdgeTypes, ...customEdgeTypes }), [customEdgeTypes]);
|
|
182555
|
-
const { nodes: layoutNodes, edges, swimlanes, totalHeight } = useSequenceLayout(events, sequenceEdges, layoutOptions);
|
|
182582
|
+
const { nodes: layoutNodes, edges, swimlanes, totalWidth, totalHeight } = useSequenceLayout(events, sequenceEdges, layoutOptions);
|
|
182556
182583
|
const nodes = useMemo(() => {
|
|
182557
182584
|
return layoutNodes.map((node2) => ({
|
|
182558
182585
|
...node2,
|
|
@@ -182579,14 +182606,15 @@ function SequenceDiagramInner({
|
|
|
182579
182606
|
onNodeClick == null ? void 0 : onNodeClick(edge.source, _event);
|
|
182580
182607
|
}, [onNodeClick]);
|
|
182581
182608
|
const translateExtent = useMemo(() => {
|
|
182582
|
-
|
|
182583
|
-
|
|
182584
|
-
|
|
182609
|
+
const xMin = 0;
|
|
182610
|
+
const xMax = totalWidth;
|
|
182611
|
+
const yMin = stickyHeaders ? 0 : -20;
|
|
182612
|
+
const yMax = stickyHeaders ? totalHeight + 1e3 : totalHeight + 20;
|
|
182585
182613
|
return [
|
|
182586
|
-
[
|
|
182587
|
-
[
|
|
182614
|
+
[xMin, yMin],
|
|
182615
|
+
[xMax, yMax]
|
|
182588
182616
|
];
|
|
182589
|
-
}, [stickyHeaders, totalHeight]);
|
|
182617
|
+
}, [stickyHeaders, totalWidth, totalHeight]);
|
|
182590
182618
|
const viewportConfig = useMemo(() => {
|
|
182591
182619
|
if (stickyHeaders) {
|
|
182592
182620
|
return {
|
|
@@ -182603,7 +182631,7 @@ function SequenceDiagramInner({
|
|
|
182603
182631
|
}
|
|
182604
182632
|
};
|
|
182605
182633
|
}, [stickyHeaders]);
|
|
182606
|
-
return jsxs(index$2, { nodes, edges: edgesWithSelection, nodeTypes: nodeTypes2, edgeTypes: edgeTypes2, onNodeClick: handleNodeClick2, onEdgeClick: handleEdgeClick, ...viewportConfig, minZoom: 0.1, maxZoom: 2, nodesDraggable: false, nodesConnectable: false, elementsSelectable: true, panOnScroll: true, zoomOnScroll: true, translateExtent, style: { background: theme2.colors.background }, children: [jsx("svg", { style: { position: "absolute", width: 0, height: 0 }, children: jsxs("defs", { children: [jsx("marker", { id: "sequence-arrow", viewBox: "0 0 10 10", refX: "8", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: theme2.colors.primary }) }), jsx("marker", { id: "sequence-arrow-move", viewBox: "0 0 10 10", refX: "8", refY: "5", markerWidth: "7", markerHeight: "7", orient: "auto-start-reverse", children: jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: theme2.colors.accent || "#f48771" }) })] }) }), showBackground && jsx(Background, { variant: BackgroundVariant.Dots, gap: 16, size: 1 }), showControls && jsx(Controls, {}), jsx(SwimlaneLayer, { swimlanes, laneWidth, headerHeight, totalHeight }), jsx(SwimlaneHeadersLayer, { swimlanes, laneWidth, headerHeight, totalHeight, onToggleCollapse, stickyHeaders }), swimlanes.some((s2) => s2.children.length > 0) && jsx(Panel$1, { position: "top-right", children: jsx("div", { style: {
|
|
182634
|
+
return jsxs(index$2, { nodes, edges: edgesWithSelection, nodeTypes: nodeTypes2, edgeTypes: edgeTypes2, onNodeClick: handleNodeClick2, onEdgeClick: handleEdgeClick, ...viewportConfig, minZoom: 0.1, maxZoom: 2, nodesDraggable: false, nodesConnectable: false, elementsSelectable: true, panOnScroll: true, zoomOnScroll: true, translateExtent, style: { background: transparent ? "transparent" : theme2.colors.background }, children: [jsx("svg", { style: { position: "absolute", width: 0, height: 0 }, children: jsxs("defs", { children: [jsx("marker", { id: "sequence-arrow", viewBox: "0 0 10 10", refX: "8", refY: "5", markerWidth: "6", markerHeight: "6", orient: "auto-start-reverse", children: jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: theme2.colors.primary }) }), jsx("marker", { id: "sequence-arrow-move", viewBox: "0 0 10 10", refX: "8", refY: "5", markerWidth: "7", markerHeight: "7", orient: "auto-start-reverse", children: jsx("path", { d: "M 0 0 L 10 5 L 0 10 z", fill: theme2.colors.accent || "#f48771" }) })] }) }), showBackground && jsx(Background, { variant: BackgroundVariant.Dots, gap: 16, size: 1 }), showControls && jsx(Controls, {}), jsx(SwimlaneLayer, { swimlanes, laneWidth, headerHeight, totalHeight, transparent }), jsx(SwimlaneHeadersLayer, { swimlanes, laneWidth, headerHeight, totalHeight, onToggleCollapse, stickyHeaders, transparent }), swimlanes.some((s2) => s2.children.length > 0) && jsx(Panel$1, { position: "top-right", children: jsx("div", { style: {
|
|
182607
182635
|
background: theme2.colors.background,
|
|
182608
182636
|
border: `1px solid ${theme2.colors.border}`,
|
|
182609
182637
|
borderRadius: 4,
|
|
@@ -182663,15 +182691,17 @@ function convertWorkflowToSequence$1(scenario, canvas) {
|
|
|
182663
182691
|
}
|
|
182664
182692
|
}
|
|
182665
182693
|
const events = eventNames.map((eventName, index2) => {
|
|
182666
|
-
const
|
|
182694
|
+
const canvasScope = eventToScopeMap.get(eventName);
|
|
182667
182695
|
const label = eventToLabelMap.get(eventName) || eventName.split(".").pop() || eventName;
|
|
182668
182696
|
const isMoveEvent = eventToMoveEventMap.get(eventName) ?? true;
|
|
182697
|
+
const name2 = canvasScope ? `${canvasScope}.${eventName}` : eventName;
|
|
182698
|
+
const participant = canvasScope ?? eventName.split(".")[0] ?? eventName;
|
|
182669
182699
|
return {
|
|
182670
182700
|
id: `event-${index2}`,
|
|
182671
|
-
name:
|
|
182701
|
+
name: name2,
|
|
182672
182702
|
label,
|
|
182673
182703
|
moveEvent: isMoveEvent,
|
|
182674
|
-
participant
|
|
182704
|
+
participant
|
|
182675
182705
|
};
|
|
182676
182706
|
});
|
|
182677
182707
|
const edges = [];
|
|
@@ -182695,8 +182725,9 @@ function WorkflowSequenceDiagram({
|
|
|
182695
182725
|
className,
|
|
182696
182726
|
onEventIndexChange,
|
|
182697
182727
|
selectedEventIndex,
|
|
182698
|
-
showEventLabels = false
|
|
182728
|
+
showEventLabels = false,
|
|
182699
182729
|
// Default to false - labels already on edges
|
|
182730
|
+
transparent = false
|
|
182700
182731
|
}) {
|
|
182701
182732
|
const { events, edges } = useMemo(() => convertWorkflowToSequence$1(scenario, canvas), [scenario, canvas]);
|
|
182702
182733
|
const handleNodeClick2 = useCallback((nodeId) => {
|
|
@@ -182723,7 +182754,7 @@ function WorkflowSequenceDiagram({
|
|
|
182723
182754
|
color: "#888"
|
|
182724
182755
|
}, children: "No events in workflow" });
|
|
182725
182756
|
}
|
|
182726
|
-
return jsx(SequenceDiagramRenderer, { events, edges, height, width, layoutOptions, showControls, showBackground, className, onNodeClick: onEventIndexChange ? handleNodeClick2 : void 0, selectedNodeId, showEventLabels });
|
|
182757
|
+
return jsx(SequenceDiagramRenderer, { events, edges, height, width, layoutOptions, showControls, showBackground, className, onNodeClick: onEventIndexChange ? handleNodeClick2 : void 0, selectedNodeId, showEventLabels, transparent });
|
|
182727
182758
|
}
|
|
182728
182759
|
const DEFAULT_NODE_WIDTH = 200;
|
|
182729
182760
|
const DEFAULT_NODE_HEIGHT = 100;
|
|
@@ -190754,9 +190785,6 @@ const EventCarousel = ({
|
|
|
190754
190785
|
canvas,
|
|
190755
190786
|
height: "100%",
|
|
190756
190787
|
layoutOptions: {
|
|
190757
|
-
laneWidth: 220,
|
|
190758
|
-
laneGap: 60,
|
|
190759
|
-
eventSpacing: 100,
|
|
190760
190788
|
namespaceStrategy: "first"
|
|
190761
190789
|
},
|
|
190762
190790
|
showControls: true
|
|
@@ -192418,9 +192446,6 @@ const CanvasEditorPanel = ({
|
|
|
192418
192446
|
canvas: state.canvas,
|
|
192419
192447
|
height: "100%",
|
|
192420
192448
|
layoutOptions: {
|
|
192421
|
-
laneWidth: 220,
|
|
192422
|
-
laneGap: 60,
|
|
192423
|
-
eventSpacing: 100,
|
|
192424
192449
|
namespaceStrategy: "first"
|
|
192425
192450
|
},
|
|
192426
192451
|
showControls: true,
|
|
@@ -207690,9 +207715,6 @@ function SequenceDiagramModal({
|
|
|
207690
207715
|
edges,
|
|
207691
207716
|
height: "100%",
|
|
207692
207717
|
layoutOptions: {
|
|
207693
|
-
laneWidth: 220,
|
|
207694
|
-
laneGap: 60,
|
|
207695
|
-
eventSpacing: 100,
|
|
207696
207718
|
namespaceStrategy: "first"
|
|
207697
207719
|
},
|
|
207698
207720
|
showControls: true
|