@eventcatalog/core 2.53.0 → 2.53.1
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/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-K5EGYLT5.js → chunk-BQDTPLND.js} +1 -1
- package/dist/{chunk-UPR7DQB2.js → chunk-K5LYWIYR.js} +1 -1
- package/dist/{chunk-AYGHOQI3.js → chunk-Q363JHA2.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +3 -3
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.astro +3 -0
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.tsx +213 -139
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/index.astro +1 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-BQDTPLND.js";
|
|
4
|
+
import "../chunk-Q363JHA2.js";
|
|
5
|
+
import "../chunk-K5LYWIYR.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
package/dist/eventcatalog.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
} from "./chunk-XE6PFSH5.js";
|
|
7
7
|
import {
|
|
8
8
|
log_build_default
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-BQDTPLND.js";
|
|
10
|
+
import "./chunk-Q363JHA2.js";
|
|
11
11
|
import {
|
|
12
12
|
catalogToAstro,
|
|
13
13
|
checkAndConvertMdToMdx
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import "./chunk-LDBRNJIL.js";
|
|
16
16
|
import {
|
|
17
17
|
VERSION
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-K5LYWIYR.js";
|
|
19
19
|
import {
|
|
20
20
|
isAuthEnabled,
|
|
21
21
|
isBackstagePluginEnabled,
|
|
@@ -32,6 +32,7 @@ interface Props {
|
|
|
32
32
|
linksToVisualiser?: boolean;
|
|
33
33
|
showSearch?: boolean;
|
|
34
34
|
showLegend?: boolean;
|
|
35
|
+
zoomOnScroll?: boolean;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
const {
|
|
@@ -45,6 +46,7 @@ const {
|
|
|
45
46
|
linksToVisualiser,
|
|
46
47
|
showSearch = true,
|
|
47
48
|
showLegend = true,
|
|
49
|
+
zoomOnScroll = false,
|
|
48
50
|
} = Astro.props;
|
|
49
51
|
|
|
50
52
|
let nodes = [],
|
|
@@ -136,6 +138,7 @@ if (collection === 'domains-entities') {
|
|
|
136
138
|
mode={mode}
|
|
137
139
|
showSearch={showSearch}
|
|
138
140
|
includeKey={showLegend}
|
|
141
|
+
zoomOnScroll={zoomOnScroll}
|
|
139
142
|
/>
|
|
140
143
|
</div>
|
|
141
144
|
|
|
@@ -57,6 +57,7 @@ interface Props {
|
|
|
57
57
|
mode?: 'full' | 'simple';
|
|
58
58
|
showFlowWalkthrough?: boolean;
|
|
59
59
|
showSearch?: boolean;
|
|
60
|
+
zoomOnScroll?: boolean;
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
const getVisualiserUrlForCollection = (collectionItem: CollectionEntry<CollectionTypes>) => {
|
|
@@ -75,6 +76,7 @@ const NodeGraphBuilder = ({
|
|
|
75
76
|
mode = 'full',
|
|
76
77
|
showFlowWalkthrough = true,
|
|
77
78
|
showSearch = true,
|
|
79
|
+
zoomOnScroll = false,
|
|
78
80
|
}: Props) => {
|
|
79
81
|
const nodeTypes = useMemo(
|
|
80
82
|
() => ({
|
|
@@ -119,6 +121,8 @@ const NodeGraphBuilder = ({
|
|
|
119
121
|
});
|
|
120
122
|
const { fitView, getNodes } = useReactFlow();
|
|
121
123
|
const searchRef = useRef<VisualiserSearchRef>(null);
|
|
124
|
+
const reactFlowWrapperRef = useRef<HTMLDivElement>(null);
|
|
125
|
+
const scrollableContainerRef = useRef<HTMLElement | null>(null);
|
|
122
126
|
|
|
123
127
|
const resetNodesAndEdges = useCallback(() => {
|
|
124
128
|
setNodes((nds) =>
|
|
@@ -224,6 +228,70 @@ const NodeGraphBuilder = ({
|
|
|
224
228
|
}, 150);
|
|
225
229
|
}, []);
|
|
226
230
|
|
|
231
|
+
// Handle scroll wheel events to forward to page when no modifier keys are pressed
|
|
232
|
+
// Only when zoomOnScroll is disabled
|
|
233
|
+
// This is a fix for when we embed node graphs into pages, and users are scrolling the documentation pages
|
|
234
|
+
// We dont want REACT FLOW to swallow the scroll events, so we forward them to the parent page
|
|
235
|
+
useEffect(() => {
|
|
236
|
+
// Skip scroll handling if zoomOnScroll is enabled
|
|
237
|
+
if (zoomOnScroll) return;
|
|
238
|
+
|
|
239
|
+
// Cache the scrollable container on mount (expensive operation done once)
|
|
240
|
+
const findScrollableContainer = (): HTMLElement | null => {
|
|
241
|
+
// Try specific known selectors first (fast)
|
|
242
|
+
const selectors = [
|
|
243
|
+
'.docs-layout .overflow-y-auto',
|
|
244
|
+
'.overflow-y-auto',
|
|
245
|
+
'[style*="overflow-y:auto"]',
|
|
246
|
+
'[style*="overflow-y: auto"]',
|
|
247
|
+
];
|
|
248
|
+
|
|
249
|
+
for (const selector of selectors) {
|
|
250
|
+
const element = document.querySelector(selector) as HTMLElement;
|
|
251
|
+
if (element) return element;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
return null;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
// Find and cache the scrollable container once
|
|
258
|
+
if (!scrollableContainerRef.current) {
|
|
259
|
+
scrollableContainerRef.current = findScrollableContainer();
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
const handleWheel = (event: WheelEvent) => {
|
|
263
|
+
// Only forward scroll if no modifier keys are pressed
|
|
264
|
+
if (!event.ctrlKey && !event.shiftKey && !event.metaKey) {
|
|
265
|
+
event.preventDefault();
|
|
266
|
+
|
|
267
|
+
const scrollableContainer = scrollableContainerRef.current;
|
|
268
|
+
|
|
269
|
+
if (scrollableContainer) {
|
|
270
|
+
scrollableContainer.scrollBy({
|
|
271
|
+
top: event.deltaY,
|
|
272
|
+
left: event.deltaX,
|
|
273
|
+
behavior: 'instant',
|
|
274
|
+
});
|
|
275
|
+
} else {
|
|
276
|
+
// Fallback to window scroll
|
|
277
|
+
window.scrollBy({
|
|
278
|
+
top: event.deltaY,
|
|
279
|
+
left: event.deltaX,
|
|
280
|
+
behavior: 'instant',
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
const wrapper = reactFlowWrapperRef.current;
|
|
287
|
+
if (wrapper) {
|
|
288
|
+
wrapper.addEventListener('wheel', handleWheel, { passive: false });
|
|
289
|
+
return () => {
|
|
290
|
+
wrapper.removeEventListener('wheel', handleWheel);
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
}, [zoomOnScroll]);
|
|
294
|
+
|
|
227
295
|
const handlePaneClick = useCallback(() => {
|
|
228
296
|
setIsSettingsOpen(false);
|
|
229
297
|
searchRef.current?.hideSuggestions();
|
|
@@ -463,167 +531,170 @@ const NodeGraphBuilder = ({
|
|
|
463
531
|
const isFlowVisualization = edges.some((edge: Edge) => edge.type === 'flow-edge');
|
|
464
532
|
|
|
465
533
|
return (
|
|
466
|
-
<
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
534
|
+
<div ref={reactFlowWrapperRef} className="w-full h-full">
|
|
535
|
+
<ReactFlow
|
|
536
|
+
nodeTypes={nodeTypes}
|
|
537
|
+
edgeTypes={edgeTypes}
|
|
538
|
+
minZoom={0.07}
|
|
539
|
+
nodes={nodes}
|
|
540
|
+
edges={edges}
|
|
541
|
+
fitView
|
|
542
|
+
onNodesChange={onNodesChange}
|
|
543
|
+
onEdgesChange={onEdgesChange}
|
|
544
|
+
connectionLineType={ConnectionLineType.SmoothStep}
|
|
545
|
+
nodeOrigin={[0.1, 0.1]}
|
|
546
|
+
onNodeClick={handleNodeClick}
|
|
547
|
+
onPaneClick={handlePaneClick}
|
|
548
|
+
zoomOnScroll={zoomOnScroll}
|
|
549
|
+
className="relative"
|
|
550
|
+
>
|
|
551
|
+
<Panel position="top-center" className="w-full pr-6 ">
|
|
552
|
+
<div className="flex space-x-2 justify-between items-center">
|
|
553
|
+
<div className="flex space-x-2">
|
|
554
|
+
<div>
|
|
555
|
+
<button
|
|
556
|
+
onClick={() => setIsSettingsOpen(!isSettingsOpen)}
|
|
557
|
+
className="py-2.5 px-3 bg-white rounded-md shadow-md hover:bg-purple-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500"
|
|
558
|
+
aria-label="Open settings"
|
|
559
|
+
>
|
|
560
|
+
<CogIcon className="h-5 w-5 text-gray-600" />
|
|
561
|
+
</button>
|
|
562
|
+
</div>
|
|
563
|
+
{title && (
|
|
564
|
+
<span className="block shadow-sm bg-white text-xl z-10 text-black px-4 py-1.5 border-gray-200 rounded-md border opacity-80">
|
|
565
|
+
{title}
|
|
566
|
+
</span>
|
|
567
|
+
)}
|
|
492
568
|
</div>
|
|
493
|
-
{
|
|
494
|
-
<
|
|
495
|
-
{
|
|
496
|
-
</
|
|
569
|
+
{mode === 'full' && showSearch && (
|
|
570
|
+
<div className="flex justify-end space-x-2 w-96">
|
|
571
|
+
<VisualiserSearch ref={searchRef} nodes={nodes} onNodeSelect={handleNodeSelect} onClear={handleSearchClear} />
|
|
572
|
+
</div>
|
|
497
573
|
)}
|
|
498
574
|
</div>
|
|
499
|
-
{
|
|
500
|
-
<div className="flex justify-end
|
|
501
|
-
<
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
</span>
|
|
511
|
-
<select
|
|
512
|
-
value={links.find((link) => window.location.href.includes(link.url))?.url || links[0].url}
|
|
513
|
-
onChange={(e) => navigate(e.target.value)}
|
|
514
|
-
className="appearance-none pl-7 pr-6 py-0 text-[14px] bg-white rounded-md border border-gray-200 hover:bg-gray-100/50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500"
|
|
515
|
-
style={{ minWidth: 120, height: '26px' }}
|
|
516
|
-
>
|
|
517
|
-
{links.map((link) => (
|
|
518
|
-
<option key={link.url} value={link.url}>
|
|
519
|
-
{link.label}
|
|
520
|
-
</option>
|
|
521
|
-
))}
|
|
522
|
-
</select>
|
|
523
|
-
<span className="absolute right-2 pointer-events-none">
|
|
524
|
-
<svg className="w-4 h-4 text-gray-400" fill="none" stroke="currentColor" strokeWidth="2" viewBox="0 0 24 24">
|
|
525
|
-
<path strokeLinecap="round" strokeLinejoin="round" d="M19 9l-7 7-7-7" />
|
|
526
|
-
</svg>
|
|
527
|
-
</span>
|
|
528
|
-
</div>
|
|
529
|
-
</div>
|
|
530
|
-
)}
|
|
531
|
-
</Panel>
|
|
532
|
-
|
|
533
|
-
{isSettingsOpen && (
|
|
534
|
-
<div className="absolute top-[68px] left-5 w-72 p-4 bg-white rounded-lg shadow-lg z-30 border border-gray-200">
|
|
535
|
-
<h3 className="text-lg font-semibold mb-4">Visualizer Settings</h3>
|
|
536
|
-
<div className="space-y-4 ">
|
|
537
|
-
<div>
|
|
538
|
-
<div className="flex items-center justify-between">
|
|
539
|
-
<label htmlFor="message-animation-toggle" className="text-sm font-medium text-gray-700">
|
|
540
|
-
Simulate Messages
|
|
541
|
-
</label>
|
|
542
|
-
<button
|
|
543
|
-
id="message-animation-toggle"
|
|
544
|
-
onClick={toggleAnimateMessages}
|
|
545
|
-
className={`${
|
|
546
|
-
animateMessages ? 'bg-purple-600' : 'bg-gray-200'
|
|
547
|
-
} relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2`}
|
|
575
|
+
{links.length > 0 && (
|
|
576
|
+
<div className="flex justify-end mt-3">
|
|
577
|
+
<div className="relative flex items-center -mt-1">
|
|
578
|
+
<span className="absolute left-2 pointer-events-none flex items-center h-full">
|
|
579
|
+
<HistoryIcon className="h-4 w-4 text-gray-600" />
|
|
580
|
+
</span>
|
|
581
|
+
<select
|
|
582
|
+
value={links.find((link) => window.location.href.includes(link.url))?.url || links[0].url}
|
|
583
|
+
onChange={(e) => navigate(e.target.value)}
|
|
584
|
+
className="appearance-none pl-7 pr-6 py-0 text-[14px] bg-white rounded-md border border-gray-200 hover:bg-gray-100/50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-purple-500"
|
|
585
|
+
style={{ minWidth: 120, height: '26px' }}
|
|
548
586
|
>
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
</
|
|
587
|
+
{links.map((link) => (
|
|
588
|
+
<option key={link.url} value={link.url}>
|
|
589
|
+
{link.label}
|
|
590
|
+
</option>
|
|
591
|
+
))}
|
|
592
|
+
</select>
|
|
593
|
+
<span className="absolute right-2 pointer-events-none">
|
|
594
|
+
<svg className="w-4 h-4 text-gray-400" fill="none" stroke="currentColor" strokeWidth="2" viewBox="0 0 24 24">
|
|
595
|
+
<path strokeLinecap="round" strokeLinejoin="round" d="M19 9l-7 7-7-7" />
|
|
596
|
+
</svg>
|
|
597
|
+
</span>
|
|
555
598
|
</div>
|
|
556
|
-
<p className="text-[10px] text-gray-500">Animate events, queries and commands.</p>
|
|
557
599
|
</div>
|
|
558
|
-
|
|
600
|
+
)}
|
|
601
|
+
</Panel>
|
|
602
|
+
|
|
603
|
+
{isSettingsOpen && (
|
|
604
|
+
<div className="absolute top-[68px] left-5 w-72 p-4 bg-white rounded-lg shadow-lg z-30 border border-gray-200">
|
|
605
|
+
<h3 className="text-lg font-semibold mb-4">Visualizer Settings</h3>
|
|
606
|
+
<div className="space-y-4 ">
|
|
559
607
|
<div>
|
|
560
608
|
<div className="flex items-center justify-between">
|
|
561
|
-
<label htmlFor="
|
|
562
|
-
|
|
609
|
+
<label htmlFor="message-animation-toggle" className="text-sm font-medium text-gray-700">
|
|
610
|
+
Simulate Messages
|
|
563
611
|
</label>
|
|
564
612
|
<button
|
|
565
|
-
id="
|
|
566
|
-
onClick={
|
|
613
|
+
id="message-animation-toggle"
|
|
614
|
+
onClick={toggleAnimateMessages}
|
|
567
615
|
className={`${
|
|
568
|
-
|
|
616
|
+
animateMessages ? 'bg-purple-600' : 'bg-gray-200'
|
|
569
617
|
} relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2`}
|
|
570
618
|
>
|
|
571
619
|
<span
|
|
572
620
|
className={`${
|
|
573
|
-
|
|
621
|
+
animateMessages ? 'translate-x-6' : 'translate-x-1'
|
|
574
622
|
} inline-block h-4 w-4 transform rounded-full bg-white transition-transform`}
|
|
575
623
|
/>
|
|
576
624
|
</button>
|
|
577
625
|
</div>
|
|
578
|
-
<p className="text-[10px] text-gray-500">
|
|
626
|
+
<p className="text-[10px] text-gray-500">Animate events, queries and commands.</p>
|
|
579
627
|
</div>
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
<Panel position="bottom-right">
|
|
608
|
-
<div className=" bg-white font-light px-4 text-[12px] shadow-md py-1 rounded-md">
|
|
609
|
-
<ul className="m-0 p-0 ">
|
|
610
|
-
{Object.entries(legend).map(([key, { count, colorClass, groupId }]) => (
|
|
611
|
-
<li
|
|
612
|
-
key={key}
|
|
613
|
-
className="flex space-x-2 items-center text-[10px] cursor-pointer hover:text-purple-600 hover:underline"
|
|
614
|
-
onClick={() => handleLegendClick(key, groupId)}
|
|
628
|
+
{hasChannels && (
|
|
629
|
+
<div>
|
|
630
|
+
<div className="flex items-center justify-between">
|
|
631
|
+
<label htmlFor="hide-channels-toggle" className="text-sm font-medium text-gray-700">
|
|
632
|
+
Hide Channels
|
|
633
|
+
</label>
|
|
634
|
+
<button
|
|
635
|
+
id="hide-channels-toggle"
|
|
636
|
+
onClick={toggleChannelsVisibility}
|
|
637
|
+
className={`${
|
|
638
|
+
hideChannels ? 'bg-purple-600' : 'bg-gray-200'
|
|
639
|
+
} relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2`}
|
|
640
|
+
>
|
|
641
|
+
<span
|
|
642
|
+
className={`${
|
|
643
|
+
hideChannels ? 'translate-x-6' : 'translate-x-1'
|
|
644
|
+
} inline-block h-4 w-4 transform rounded-full bg-white transition-transform`}
|
|
645
|
+
/>
|
|
646
|
+
</button>
|
|
647
|
+
</div>
|
|
648
|
+
<p className="text-[10px] text-gray-500">Show or hide channels in the visualizer.</p>
|
|
649
|
+
</div>
|
|
650
|
+
)}
|
|
651
|
+
<div className="pt-4 border-t border-gray-200">
|
|
652
|
+
<button
|
|
653
|
+
onClick={handleExportVisual}
|
|
654
|
+
className="w-full flex items-center justify-center space-x-2 px-4 py-2 bg-purple-600 text-white text-sm font-medium rounded-md hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2"
|
|
615
655
|
>
|
|
616
|
-
<
|
|
617
|
-
<span
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
))}
|
|
622
|
-
</ul>
|
|
656
|
+
<DocumentArrowDownIcon className="w-4 h-4" />
|
|
657
|
+
<span>Export Visual</span>
|
|
658
|
+
</button>
|
|
659
|
+
</div>
|
|
660
|
+
</div>
|
|
623
661
|
</div>
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
662
|
+
)}
|
|
663
|
+
{includeBackground && <Background color="#bbb" gap={16} />}
|
|
664
|
+
{includeBackground && <Controls />}
|
|
665
|
+
{isFlowVisualization && showFlowWalkthrough && (
|
|
666
|
+
<Panel position="bottom-left">
|
|
667
|
+
<StepWalkthrough
|
|
668
|
+
nodes={nodes}
|
|
669
|
+
edges={edges}
|
|
670
|
+
isFlowVisualization={isFlowVisualization}
|
|
671
|
+
onStepChange={handleStepChange}
|
|
672
|
+
mode={mode}
|
|
673
|
+
/>
|
|
674
|
+
</Panel>
|
|
675
|
+
)}
|
|
676
|
+
{includeKey && (
|
|
677
|
+
<Panel position="bottom-right">
|
|
678
|
+
<div className=" bg-white font-light px-4 text-[12px] shadow-md py-1 rounded-md">
|
|
679
|
+
<ul className="m-0 p-0 ">
|
|
680
|
+
{Object.entries(legend).map(([key, { count, colorClass, groupId }]) => (
|
|
681
|
+
<li
|
|
682
|
+
key={key}
|
|
683
|
+
className="flex space-x-2 items-center text-[10px] cursor-pointer hover:text-purple-600 hover:underline"
|
|
684
|
+
onClick={() => handleLegendClick(key, groupId)}
|
|
685
|
+
>
|
|
686
|
+
<span className={`w-2 h-2 block ${colorClass}`} />
|
|
687
|
+
<span className="block capitalize">
|
|
688
|
+
{key} ({count})
|
|
689
|
+
</span>
|
|
690
|
+
</li>
|
|
691
|
+
))}
|
|
692
|
+
</ul>
|
|
693
|
+
</div>
|
|
694
|
+
</Panel>
|
|
695
|
+
)}
|
|
696
|
+
</ReactFlow>
|
|
697
|
+
</div>
|
|
627
698
|
);
|
|
628
699
|
};
|
|
629
700
|
|
|
@@ -643,6 +714,7 @@ interface NodeGraphProps {
|
|
|
643
714
|
portalId?: string;
|
|
644
715
|
showFlowWalkthrough?: boolean;
|
|
645
716
|
showSearch?: boolean;
|
|
717
|
+
zoomOnScroll?: boolean;
|
|
646
718
|
}
|
|
647
719
|
|
|
648
720
|
const NodeGraph = ({
|
|
@@ -661,6 +733,7 @@ const NodeGraph = ({
|
|
|
661
733
|
portalId,
|
|
662
734
|
showFlowWalkthrough = true,
|
|
663
735
|
showSearch = true,
|
|
736
|
+
zoomOnScroll = false,
|
|
664
737
|
}: NodeGraphProps) => {
|
|
665
738
|
const [elem, setElem] = useState(null);
|
|
666
739
|
const [showFooter, setShowFooter] = useState(true);
|
|
@@ -697,6 +770,7 @@ const NodeGraph = ({
|
|
|
697
770
|
mode={mode}
|
|
698
771
|
showFlowWalkthrough={showFlowWalkthrough}
|
|
699
772
|
showSearch={showSearch}
|
|
773
|
+
zoomOnScroll={zoomOnScroll}
|
|
700
774
|
/>
|
|
701
775
|
|
|
702
776
|
{showFooter && (
|
|
@@ -30,6 +30,7 @@ const {
|
|
|
30
30
|
linkTo="visualiser"
|
|
31
31
|
version={props.data.version}
|
|
32
32
|
linksToVisualiser={false}
|
|
33
|
+
zoomOnScroll={true}
|
|
33
34
|
href={{
|
|
34
35
|
label: `Open documentation for ${props.data.name} v${props.data.version}`,
|
|
35
36
|
url: buildUrl(`/docs/${props.collection}/${props.data.id}/${props.data.version}`),
|