@unovis/ts 1.5.1-xplg.2 → 1.5.1-xplg.4
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/components/graph/config.d.ts +3 -1
- package/components/graph/config.js +2 -2
- package/components/graph/config.js.map +1 -1
- package/components/graph/index.d.ts +2 -2
- package/components/graph/index.js +31 -10
- package/components/graph/index.js.map +1 -1
- package/components/graph/modules/link/index.js +1 -1
- package/components/graph/modules/link/index.js.map +1 -1
- package/components/graph/types.d.ts +7 -0
- package/components/graph/types.js +10 -2
- package/components/graph/types.js.map +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/types.js +1 -1
|
@@ -9,7 +9,7 @@ import { TrimMode } from "../../types/text";
|
|
|
9
9
|
import { Spacing } from "../../types/spacing";
|
|
10
10
|
import { GraphInputLink, GraphInputNode, GraphInputData } from "../../types/graph";
|
|
11
11
|
import { BooleanAccessor, ColorAccessor, NumericAccessor, StringAccessor, GenericAccessor } from "../../types/accessor";
|
|
12
|
-
import { GraphLayoutType, GraphCircleLabel, GraphLinkStyle, GraphLinkArrowStyle, GraphPanelConfig, GraphForceLayoutSettings, GraphElkLayoutSettings, GraphNodeShape, GraphDagreLayoutSetting, GraphNode, GraphLink, GraphNodeSelectionHighlightMode } from './types';
|
|
12
|
+
import { GraphLayoutType, GraphCircleLabel, GraphLinkStyle, GraphLinkArrowStyle, GraphPanelConfig, GraphForceLayoutSettings, GraphElkLayoutSettings, GraphNodeShape, GraphDagreLayoutSetting, GraphNode, GraphLink, GraphNodeSelectionHighlightMode, GraphFitViewAlignment } from './types';
|
|
13
13
|
export interface GraphConfigInterface<N extends GraphInputNode, L extends GraphInputLink> extends ComponentConfigInterface {
|
|
14
14
|
/** Zoom level constraints. Default: [0.35, 1.25] */
|
|
15
15
|
zoomScaleExtent?: [number, number];
|
|
@@ -27,6 +27,8 @@ export interface GraphConfigInterface<N extends GraphInputNode, L extends GraphI
|
|
|
27
27
|
zoomThrottledUpdateNodeThreshold?: number;
|
|
28
28
|
/** Padding for the graph when fitting to container. Default: `50` */
|
|
29
29
|
fitViewPadding?: Spacing | number;
|
|
30
|
+
/** Default alignment when fitting the graph view. Default: `GraphFitViewAlignment.Center` */
|
|
31
|
+
fitViewAlign?: GraphFitViewAlignment;
|
|
30
32
|
/** Type of the graph layout. Default: `GraphLayoutType.Force` */
|
|
31
33
|
layoutType?: GraphLayoutType | string;
|
|
32
34
|
/** Fit the graph to container on data or config updates, or on container resize. Default: `true` */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { isEqual } from '../../utils/data.js';
|
|
2
2
|
import { ComponentDefaultConfig } from '../../core/component/config.js';
|
|
3
3
|
import { TrimMode } from '../../types/text.js';
|
|
4
|
-
import { GraphLayoutType, GraphLinkStyle, GraphNodeShape, GraphNodeSelectionHighlightMode } from './types.js';
|
|
4
|
+
import { GraphLayoutType, GraphFitViewAlignment, GraphLinkStyle, GraphNodeShape, GraphNodeSelectionHighlightMode } from './types.js';
|
|
5
5
|
|
|
6
6
|
// Utils
|
|
7
|
-
const GraphDefaultConfig = Object.assign(Object.assign({}, ComponentDefaultConfig), { duration: 1000, zoomScaleExtent: [0.35, 1.25], disableZoom: false, zoomEventFilter: undefined, disableDrag: false, disableBrush: false, zoomThrottledUpdateNodeThreshold: 100, layoutType: GraphLayoutType.Force, layoutAutofit: true, layoutAutofitTolerance: 8.0, layoutNonConnectedAside: false, fitViewPadding: 50, layoutGroupOrder: [], layoutParallelSubGroupsPerRow: 1, layoutParallelNodesPerColumn: 6, layoutParallelGroupSpacing: undefined, layoutParallelSortConnectionsByGroup: undefined, layoutNodeGroup: (n) => n.group, layoutParallelNodeSubGroup: (n) => n.subgroup, forceLayoutSettings: {
|
|
7
|
+
const GraphDefaultConfig = Object.assign(Object.assign({}, ComponentDefaultConfig), { duration: 1000, zoomScaleExtent: [0.35, 1.25], disableZoom: false, zoomEventFilter: undefined, disableDrag: false, disableBrush: false, zoomThrottledUpdateNodeThreshold: 100, layoutType: GraphLayoutType.Force, layoutAutofit: true, layoutAutofitTolerance: 8.0, layoutNonConnectedAside: false, fitViewPadding: 50, fitViewAlign: GraphFitViewAlignment.Center, layoutGroupOrder: [], layoutParallelSubGroupsPerRow: 1, layoutParallelNodesPerColumn: 6, layoutParallelGroupSpacing: undefined, layoutParallelSortConnectionsByGroup: undefined, layoutNodeGroup: (n) => n.group, layoutParallelNodeSubGroup: (n) => n.subgroup, forceLayoutSettings: {
|
|
8
8
|
linkDistance: 60,
|
|
9
9
|
linkStrength: 0.45,
|
|
10
10
|
charge: -500,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../../../src/components/graph/config.ts"],"sourcesContent":["import { D3BrushEvent } from 'd3-brush'\nimport { D3DragEvent } from 'd3-drag'\nimport { D3ZoomEvent, ZoomTransform } from 'd3-zoom'\nimport { Selection } from 'd3-selection'\nimport { ElkShape } from 'elkjs'\n\n// Core\nimport type { GraphDataModel } from 'data-models/graph'\n\n// Utils\nimport { isEqual } from 'utils/data'\n\n// Config\nimport { ComponentConfigInterface, ComponentDefaultConfig } from 'core/component/config'\n\n// Types\nimport { TrimMode } from 'types/text'\nimport { Spacing } from 'types/spacing'\nimport { GraphInputLink, GraphInputNode, GraphInputData } from 'types/graph'\nimport { BooleanAccessor, ColorAccessor, NumericAccessor, StringAccessor, GenericAccessor } from 'types/accessor'\n\n// Local Types\nimport {\n GraphLayoutType,\n GraphCircleLabel,\n GraphLinkStyle,\n GraphLinkArrowStyle,\n GraphPanelConfig,\n GraphForceLayoutSettings,\n GraphElkLayoutSettings,\n GraphNodeShape,\n GraphDagreLayoutSetting,\n GraphNode,\n GraphLink,\n GraphNodeSelectionHighlightMode,\n} from './types'\n\nexport interface GraphConfigInterface<N extends GraphInputNode, L extends GraphInputLink> extends ComponentConfigInterface {\n // Zoom and drag\n /** Zoom level constraints. Default: [0.35, 1.25] */\n zoomScaleExtent?: [number, number];\n /** Disable zooming. Default: `false` */\n disableZoom?: boolean;\n /** Custom Zoom event filter to better control which actions should trigger zooming.\n * Learn more: https://d3js.org/d3-zoom#zoom_filter.\n * Default: `undefined` */\n zoomEventFilter?: (event: PointerEvent) => boolean;\n /** Disable node dragging. Default: `false` */\n disableDrag?: boolean;\n /** Disable brush for multiple node selection. Default: `false` */\n disableBrush?: boolean;\n /** Interval to re-render the graph when zooming. Default: `100` */\n zoomThrottledUpdateNodeThreshold?: number;\n /** Padding for the graph when fitting to container. Default: `50` */\n fitViewPadding?: Spacing | number;\n\n // Layout general settings\n /** Type of the graph layout. Default: `GraphLayoutType.Force` */\n layoutType?: GraphLayoutType | string;\n /** Fit the graph to container on data or config updates, or on container resize. Default: `true` */\n layoutAutofit?: boolean;\n /** Tolerance constant defining whether the graph should be fitted to container\n * (on data or config update, or container resize) after a zoom / pan interaction or not.\n * `0` — Stop fitting after any pan or zoom\n * `Number.POSITIVE_INFINITY` — Always fit\n * Default: `8.0` */\n layoutAutofitTolerance?: number;\n /** Place non-connected nodes at the bottom of the graph. Default: `false` */\n layoutNonConnectedAside?: boolean;\n\n // Settings for Parallel and Concentric layouts\n /** Node group accessor function.\n * Only for `GraphLayoutType.Parallel`, `GraphLayoutType.ParallelHorizontal` and `GraphLayoutType.Concentric` layouts.\n * Default: `node => node.group` */\n layoutNodeGroup?: StringAccessor<N>;\n /** Order of the layout groups.\n * Only for `GraphLayoutType.Parallel`, `GraphLayoutType.ParallelHorizontal` and `GraphLayoutType.Concentric` layouts.\n * Default: `[]` */\n layoutGroupOrder?: string[];\n\n // Setting for Parallel layouts only\n /** Sets the number of nodes in a sub-group after which they'll continue on the next column (or row if `layoutType` is\n * `GraphLayoutType.ParallelHorizontal`).\n * Only for `GraphLayoutType.Parallel` and `GraphLayoutType.ParallelHorizontal` layouts.\n * Default: `6` */\n layoutParallelNodesPerColumn?: number;\n /** Node sub-group accessor function.\n * Only for `GraphLayoutType.Parallel` and `GraphLayoutType.ParallelHorizontal` layouts.\n * Default: `node => node.subgroup` */\n layoutParallelNodeSubGroup?: StringAccessor<N>;\n /** Number of sub-groups per row (or column if `layoutType` is `GraphLayoutType.ParallelHorizontal`) in a group.\n * Only for `GraphLayoutType.Parallel` and `GraphLayoutType.ParallelHorizontal` layouts.\n * Default: `1` */\n layoutParallelSubGroupsPerRow?: number;\n /** Spacing between groups.\n * Only for `GraphLayoutType.Parallel` and `GraphLayoutType.ParallelHorizontal` layouts.\n * Default: `undefined` */\n layoutParallelGroupSpacing?: number;\n /** Set a group by name to have priority in sorting the graph links.\n * Only for `GraphLayoutType.Parallel` and `GraphLayoutType.ParallelHorizontal` layouts.\n * Default: `undefined` */\n layoutParallelSortConnectionsByGroup?: string;\n\n // Force layout\n /** Force Layout settings, see the `d3-force` package for more details */\n forceLayoutSettings?: GraphForceLayoutSettings<N, L>;\n\n // Dagre layout\n /** Darge Layout settings, see the `dagrejs` package\n * for more details: https://github.com/dagrejs/dagre/wiki#configuring-the-layout\n */\n dagreLayoutSettings?: GraphDagreLayoutSetting;\n\n // ELK layout\n /** ELK layout options, see the `elkjs` package for more details: https://github.com/kieler/elkjs.\n * If you want to specify custom layout option for each node group, you can provide an accessor function that\n * receives group name ('root' for the top-level configuration) as the first argument and returns an object containing\n * layout options. Default: `undefined`\n */\n layoutElkSettings?: GenericAccessor<GraphElkLayoutSettings, string> | undefined;\n /** Array of accessor functions to define nested node groups for the ELK Layered layout.\n * E.g.: `[n => n.group, n => n.subGroup]`.\n * Default: `undefined` */\n layoutElkNodeGroups?: StringAccessor<N>[];\n /** A function to be called per graph node to get the ELK shape object.\n * This enables you to provide custom node dimensions (through the `width` and `height` properties)\n * and coordinates (through the `x` and `y` properties) if needed.\n * Default: `undefined`\n */\n layoutElkGetNodeShape?: (d: GraphNode<N, L>, i: number) => ElkShape;\n\n // Links\n /** Link width accessor function ot constant value. Default: `1` */\n linkWidth?: NumericAccessor<L>;\n /** Link style accessor function or constant value. Default: `GraphLinkStyle.Solid` */\n linkStyle?: GenericAccessor<GraphLinkStyle, L>;\n /** Link band width accessor function or constant value. Default: `0` */\n linkBandWidth?: NumericAccessor<L>;\n /** Link arrow accessor function or constant value. Default: `undefined` */\n linkArrow?: GenericAccessor<GraphLinkArrowStyle | string | boolean, L> | undefined;\n /** Link stroke color accessor function or constant value. Default: `undefined` */\n linkStroke?: ColorAccessor<L>;\n /** Link disabled state accessor function or constant value. Default: `false` */\n linkDisabled?: BooleanAccessor<L>;\n /** Link flow animation accessor function or constant value. Default: `false` */\n linkFlow?: BooleanAccessor<L>;\n /** Animation duration of the flow (traffic) circles in milliseconds. If `linkFlowParticleSpeed` is provided,\n * this duration will be calculated based on the link length and particle speed. Default: `20000` */\n linkFlowAnimDuration?: NumericAccessor<L>;\n /** Size of the moving particles that represent traffic flow. Default: `2` */\n linkFlowParticleSize?: NumericAccessor<L>;\n /** Speed of the moving particles in pixels per second. This property takes precedence over `linkFlowAnimDuration`. Default: `undefined` */\n linkFlowParticleSpeed?: NumericAccessor<L>;\n /** Link label accessor function or constant value. Default: `undefined` */\n linkLabel?: GenericAccessor<GraphCircleLabel | GraphCircleLabel[], L> | undefined;\n /** Shift label along the link center a little bit to avoid overlap with the link arrow. Default: `true` */\n linkLabelShiftFromCenter?: BooleanAccessor<L>;\n /** Spacing between neighboring links. Default: `8` */\n linkNeighborSpacing?: number;\n /** Curvature of the link. Recommended value range: [0:1.5].\n * `0` - straight line,\n * `1` - nice curvature,\n * `1.5` - very curve.\n * Default: `0` */\n linkCurvature?: NumericAccessor<L>;\n /** Highlight links on hover. Default: `true` */\n linkHighlightOnHover?: boolean;\n /** Offset [x,y] in pixels from the source node's center point where the link should start. Default: `undefined` */\n linkSourcePointOffset?: GenericAccessor<[number, number], GraphLink<N, L>>;\n /** Offset [x,y] in pixels from the target node's center point where the link should end. Default: `undefined` */\n linkTargetPointOffset?: GenericAccessor<[number, number], GraphLink<N, L>>;\n /** Set selected link by its unique id. Default: `undefined` */\n selectedLinkId?: number | string;\n\n // Nodes\n /** Node size accessor function or constant value. Default: `30` */\n nodeSize?: NumericAccessor<N>;\n /** Node stroke width accessor function or constant value. Default: `3` */\n nodeStrokeWidth?: NumericAccessor<N>;\n /** Node shape accessor function or constant value. Default: `GraphNodeShape.Circle` */\n nodeShape?: GenericAccessor<GraphNodeShape | string, N>;\n /** Node gauge outline accessor function or constant value in the range [0,100]. Default: `0` */\n nodeGaugeValue?: NumericAccessor<N>;\n /** Node gauge outline fill color accessor function or constant value. Default: `undefined` */\n nodeGaugeFill?: ColorAccessor<N>;\n /** Animation duration of the node gauge outline. Default: `1500` */\n nodeGaugeAnimDuration?: number;\n /** Node central icon accessor function or constant value. Default: `node => node.icon` */\n nodeIcon?: StringAccessor<N>;\n /** Node central icon size accessor function or constant value. Default: `undefined` */\n nodeIconSize?: NumericAccessor<N>;\n /** Node label accessor function or constant value. Default: `node => node.label` */\n nodeLabel?: StringAccessor<N>;\n /** Defines whether to trim the node labels or not. Default: `true` */\n nodeLabelTrim?: BooleanAccessor<N>;\n /** Node label trimming mode. Default: `TrimMode.Middle` */\n nodeLabelTrimMode?: GenericAccessor<TrimMode | string, N>;\n /** Node label maximum allowed text length above which the label will be trimmed. Default: `15` */\n nodeLabelTrimLength?: NumericAccessor<N>;\n /** Node sub-label accessor function or constant value: Default: `''` */\n nodeSubLabel?: StringAccessor<N>;\n /** Defines whether to trim the node sub-labels or not. Default: `true` */\n nodeSubLabelTrim?: BooleanAccessor<N>;\n /** Node sub-label trimming mode. Default: `TrimMode.Middle` */\n nodeSubLabelTrimMode?: GenericAccessor<TrimMode | string, N>;\n /** Node sub-label maximum allowed text length above which the label will be trimmed. Default: `15` */\n nodeSubLabelTrimLength?: NumericAccessor<N>;\n /** Node circular side labels accessor function. The function should return an array of GraphCircleLabel objects. Default: `undefined` */\n nodeSideLabels?: GenericAccessor<GraphCircleLabel[], N>;\n /** Node bottom icon accessor function. Default: `undefined` */\n nodeBottomIcon?: StringAccessor<N>;\n /** Node disabled state accessor function or constant value. Default: `false` */\n nodeDisabled?: BooleanAccessor<N>;\n /** Node fill color accessor function or constant value. Default: `node => node.fill` */\n nodeFill?: ColorAccessor<N>;\n /** Node stroke color accessor function or constant value. Default: `node => node.stroke` */\n nodeStroke?: ColorAccessor<N>;\n /** Sorting function to determine node placement. Default: `undefined` */\n nodeSort?: ((a: N, b: N) => number);\n /** Specify the initial position for entering nodes as [x, y]. Default: `undefined` */\n nodeEnterPosition?: GenericAccessor<[number, number], N> | undefined;\n /** Specify the initial scale for entering nodes in the range [0,1]. Default: `0.75` */\n nodeEnterScale?: NumericAccessor<N> | undefined;\n /** Specify the destination position for exiting nodes as [x, y]. Default: `undefined` */\n nodeExitPosition?: GenericAccessor<[number, number], N> | undefined;\n /** Specify the destination scale for exiting nodes in the range [0,1]. Default: `0.75` */\n nodeExitScale?: NumericAccessor<N> | undefined;\n /** Custom \"enter\" function for node rendering. Default: `undefined` */\n nodeEnterCustomRenderFunction?:\n (datum: GraphNode<N, L>, nodeGroupElementSelection: Selection<SVGGElement, GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number) => void;\n /** Custom \"update\" function for node rendering. Default: `undefined` */\n nodeUpdateCustomRenderFunction?:\n (datum: GraphNode<N, L>, nodeGroupElementSelection: Selection<SVGGElement, GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number) => void;\n /** Custom partial \"update\" function for node rendering which will be triggered after the following events:\n * - Full node update (`nodeUpdateCustomRenderFunction`);\n * - Background click;\n * - Node and Link mouseover and mouseout;\n * - Node brushing,\n * Default: `undefined` */\n nodePartialUpdateCustomRenderFunction?:\n (datum: GraphNode<N, L>, nodeGroupElementSelection: Selection<SVGGElement, GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number) => void;\n /** Custom \"exit\" function for node rendering. Default: `undefined` */\n nodeExitCustomRenderFunction?:\n (datum: GraphNode<N, L>, nodeGroupElementSelection: Selection<SVGGElement, GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number) => void;\n /** Custom render function that will be called while zooming / panning the graph. Default: `undefined` */\n nodeOnZoomCustomRenderFunction?:\n (datum: GraphNode<N, L>, nodeGroupElementSelection: Selection<SVGGElement, GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, zoomLevel: number) => void;\n /** Define the mode for highlighting selected nodes in the graph. Default: `GraphNodeSelectionHighlightMode.GreyoutNonConnected` */\n nodeSelectionHighlightMode?: GraphNodeSelectionHighlightMode;\n /** Set selected node by unique id. Default: `undefined` */\n selectedNodeId?: number | string;\n /** Set selected nodes by unique id. Default: `undefined` */\n selectedNodeIds?: number[] | string[];\n\n /** Panels configuration. An array of `GraphPanelConfig` objects. Default: `[]` */\n panels?: GraphPanelConfig[] | undefined;\n\n // Events\n /** Graph node drag start callback function. Default: `undefined` */\n onNodeDragStart?: (n: GraphNode<N, L>, event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>) => void | undefined;\n /** Graph node drag callback function. Default: `undefined` */\n onNodeDrag?: (n: GraphNode<N, L>, event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>) => void | undefined;\n /** Graph node drag end callback function. Default: `undefined` */\n onNodeDragEnd?: (n: GraphNode<N, L>, event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>) => void | undefined;\n /** Zoom event callback. Default: `undefined` */\n onZoom?: (zoomScale: number, zoomScaleExtent: [number, number], event: D3ZoomEvent<SVGGElement, unknown> | undefined, transform: ZoomTransform) => void;\n /** Zoom start event callback. Default: `undefined` */\n onZoomStart?: (zoomScale: number, zoomScaleExtent: [number, number], event: D3ZoomEvent<SVGGElement, unknown> | undefined, transform: ZoomTransform) => void;\n /** Zoom end event callback. Default: `undefined` */\n onZoomEnd?: (zoomScale: number, zoomScaleExtent: [number, number], event: D3ZoomEvent<SVGGElement, unknown> | undefined, transform: ZoomTransform) => void;\n /** Callback function to be called when the graph layout is calculated. Default: `undefined` */\n onLayoutCalculated?: (nodes: GraphNode<N, L>[], links: GraphLink<N, L>[]) => void;\n /** Graph node selection brush callback function. Default: `undefined` */\n onNodeSelectionBrush?: (selectedNodes: GraphNode<N, L>[], event: D3BrushEvent<SVGGElement> | undefined) => void;\n /** Graph multiple node drag callback function. Default: `undefined` */\n onNodeSelectionDrag?: (selectedNodes: GraphNode<N, L>[], event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>) => void;\n /** Callback function to be called when the graph rendering is complete. Default: `undefined` */\n onRenderComplete?: (\n g: Selection<SVGGElement, unknown, null, undefined>,\n nodes: GraphNode<N, L>[],\n links: GraphLink<N, L>[],\n config: GraphConfigInterface<N, L>,\n duration: number,\n zoomLevel: number,\n width: number,\n height: number\n ) => void;\n\n /** Determines whether the component should update when new data is provided.\n * This function takes the previous and new data as parameters and returns a boolean\n * indicating whether the update should proceed. Useful for fine-grained control over\n * update behavior when your data has a complex nested structure.\n * By default the `isEqual` function from Unovis will be used to do the comparison.\n */\n shouldDataUpdate?: (\n prevData: GraphInputData<N, L>,\n nextData: GraphInputData<N, L>,\n datamodel: GraphDataModel<N, L, GraphNode<N, L>, GraphLink<N, L>>\n ) => boolean;\n}\n\nexport const GraphDefaultConfig: GraphConfigInterface<GraphInputNode, GraphInputLink> = {\n ...ComponentDefaultConfig,\n duration: 1000,\n zoomScaleExtent: [0.35, 1.25],\n disableZoom: false,\n zoomEventFilter: undefined,\n disableDrag: false,\n disableBrush: false,\n zoomThrottledUpdateNodeThreshold: 100,\n layoutType: GraphLayoutType.Force,\n layoutAutofit: true,\n layoutAutofitTolerance: 8.0,\n layoutNonConnectedAside: false,\n fitViewPadding: 50,\n layoutGroupOrder: [],\n layoutParallelSubGroupsPerRow: 1,\n layoutParallelNodesPerColumn: 6,\n layoutParallelGroupSpacing: undefined,\n layoutParallelSortConnectionsByGroup: undefined,\n layoutNodeGroup: (n: GraphInputNode): string => (n as { group: string }).group,\n layoutParallelNodeSubGroup: (n: GraphInputNode): string => (n as { subgroup: string }).subgroup,\n\n forceLayoutSettings: {\n linkDistance: 60,\n linkStrength: 0.45,\n charge: -500,\n forceXStrength: 0.15,\n forceYStrength: 0.25,\n numIterations: undefined,\n fixNodePositionAfterSimulation: false,\n },\n\n dagreLayoutSettings: {\n rankdir: 'BT',\n ranker: 'longest-path',\n },\n\n layoutElkSettings: undefined,\n layoutElkNodeGroups: undefined,\n layoutElkGetNodeShape: undefined,\n\n linkFlowAnimDuration: 20000,\n linkFlowParticleSize: 2,\n linkFlowParticleSpeed: undefined,\n linkWidth: 1,\n linkStyle: GraphLinkStyle.Solid,\n linkBandWidth: 0,\n linkArrow: undefined,\n linkStroke: undefined,\n linkFlow: false,\n linkLabel: undefined,\n linkLabelShiftFromCenter: true,\n linkNeighborSpacing: 8,\n linkDisabled: false,\n linkCurvature: 0,\n linkHighlightOnHover: true,\n linkSourcePointOffset: undefined,\n linkTargetPointOffset: undefined,\n selectedLinkId: undefined,\n\n nodeSize: 30,\n nodeStrokeWidth: 3,\n nodeShape: GraphNodeShape.Circle,\n nodeGaugeValue: 0,\n nodeIcon: (n: GraphInputNode): string => (n as { icon: string }).icon,\n nodeIconSize: undefined,\n nodeLabel: (n: GraphInputNode): string => (n as { label: string }).label,\n nodeLabelTrim: true,\n nodeLabelTrimLength: 15,\n nodeLabelTrimMode: TrimMode.Middle,\n nodeSubLabel: '',\n nodeSubLabelTrim: true,\n nodeSubLabelTrimLength: 15,\n nodeSubLabelTrimMode: TrimMode.Middle,\n nodeSideLabels: undefined,\n nodeBottomIcon: undefined,\n nodeDisabled: false,\n nodeFill: (n: GraphInputNode): string => (n as { fill: string }).fill,\n nodeGaugeFill: undefined,\n nodeStroke: (n: GraphInputNode): string => (n as { stroke: string }).stroke,\n nodeEnterPosition: undefined,\n nodeEnterScale: 0.75,\n nodeExitPosition: undefined,\n nodeExitScale: 0.75,\n nodeSort: undefined,\n nodeSelectionHighlightMode: GraphNodeSelectionHighlightMode.GreyoutNonConnected,\n nodeGaugeAnimDuration: 1500,\n\n selectedNodeId: undefined,\n selectedNodeIds: undefined,\n\n panels: undefined,\n\n onNodeDragStart: undefined,\n onNodeDrag: undefined,\n onNodeDragEnd: undefined,\n onZoom: undefined,\n onZoomStart: undefined,\n onZoomEnd: undefined,\n onLayoutCalculated: undefined,\n onNodeSelectionBrush: undefined,\n onNodeSelectionDrag: undefined,\n onRenderComplete: undefined,\n\n shouldDataUpdate: (prevData: GraphInputData<GraphInputNode, GraphInputLink>, nextData: GraphInputData<GraphInputNode, GraphInputLink>): boolean => {\n return !isEqual(prevData, nextData)\n },\n}\n"],"names":[],"mappings":";;;;;AASA;MAoSa,kBAAkB,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAC1B,sBAAsB,CACzB,EAAA,EAAA,QAAQ,EAAE,IAAI,EACd,eAAe,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,EAC7B,WAAW,EAAE,KAAK,EAClB,eAAe,EAAE,SAAS,EAC1B,WAAW,EAAE,KAAK,EAClB,YAAY,EAAE,KAAK,EACnB,gCAAgC,EAAE,GAAG,EACrC,UAAU,EAAE,eAAe,CAAC,KAAK,EACjC,aAAa,EAAE,IAAI,EACnB,sBAAsB,EAAE,GAAG,EAC3B,uBAAuB,EAAE,KAAK,EAC9B,cAAc,EAAE,EAAE,EAClB,gBAAgB,EAAE,EAAE,EACpB,6BAA6B,EAAE,CAAC,EAChC,4BAA4B,EAAE,CAAC,EAC/B,0BAA0B,EAAE,SAAS,EACrC,oCAAoC,EAAE,SAAS,EAC/C,eAAe,EAAE,CAAC,CAAiB,KAAc,CAAuB,CAAC,KAAK,EAC9E,0BAA0B,EAAE,CAAC,CAAiB,KAAc,CAA0B,CAAC,QAAQ,EAE/F,mBAAmB,EAAE;AACnB,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,YAAY,EAAE,IAAI;QAClB,MAAM,EAAE,CAAC,GAAG;AACZ,QAAA,cAAc,EAAE,IAAI;AACpB,QAAA,cAAc,EAAE,IAAI;AACp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AE,KAAK,EACnB,QAAQ,EAAE,CAAC,CAAiB,KAAc,CAAsB,CAAC,IAAI,EACrE,aAAa,EAAE,SAAS,EACxB,UAAU,EAAE,CAAC,CAAiB,KAAc,CAAwB,CAAC,MAAM,EAC3E,iBAAiB,EAAE,SAAS,EAC5B,cAAc,EAAE,IAAI,EACpB,gBAAgB,EAAE,SAAS,EAC3B,aAAa,EAAE,IAAI,EACnB,QAAQ,EAAE,SAAS,EACnB,0BAA0B,EAAE,+BAA+B,CAAC,mBAAmB,EAC/E,qBAAqB,EAAE,IAAI,EAE3B,cAAc,EAAE,SAAS,EACzB,eAAe,EAAE,SAAS,EAE1B,MAAM,EAAE,SAAS,EAEjB,eAAe,EAAE,SAAS,EAC1B,UAAU,EAAE,SAAS,EACrB,aAAa,EAAE,SAAS,EACxB,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,SAAS,EACtB,SAAS,EAAE,SAAS,EACpB,kBAAkB,EAAE,SAAS,EAC7B,oBAAoB,EAAE,SAAS,EAC/B,mBAAmB,EAAE,SAAS,EAC9B,gBAAgB,EAAE,SAAS,EAE3B,gBAAgB,EAAE,CAAC,QAAwD,EAAE,QAAwD,KAAa;AAChJ,QAAA,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;AACrC,KAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"config.js","sources":["../../../src/components/graph/config.ts"],"sourcesContent":["import { D3BrushEvent } from 'd3-brush'\nimport { D3DragEvent } from 'd3-drag'\nimport { D3ZoomEvent, ZoomTransform } from 'd3-zoom'\nimport { Selection } from 'd3-selection'\nimport { ElkShape } from 'elkjs'\n\n// Core\nimport type { GraphDataModel } from 'data-models/graph'\n\n// Utils\nimport { isEqual } from 'utils/data'\n\n// Config\nimport { ComponentConfigInterface, ComponentDefaultConfig } from 'core/component/config'\n\n// Types\nimport { TrimMode } from 'types/text'\nimport { Spacing } from 'types/spacing'\nimport { GraphInputLink, GraphInputNode, GraphInputData } from 'types/graph'\nimport { BooleanAccessor, ColorAccessor, NumericAccessor, StringAccessor, GenericAccessor } from 'types/accessor'\n\n// Local Types\nimport {\n GraphLayoutType,\n GraphCircleLabel,\n GraphLinkStyle,\n GraphLinkArrowStyle,\n GraphPanelConfig,\n GraphForceLayoutSettings,\n GraphElkLayoutSettings,\n GraphNodeShape,\n GraphDagreLayoutSetting,\n GraphNode,\n GraphLink,\n GraphNodeSelectionHighlightMode,\n GraphFitViewAlignment,\n} from './types'\n\nexport interface GraphConfigInterface<N extends GraphInputNode, L extends GraphInputLink> extends ComponentConfigInterface {\n // Zoom and drag\n /** Zoom level constraints. Default: [0.35, 1.25] */\n zoomScaleExtent?: [number, number];\n /** Disable zooming. Default: `false` */\n disableZoom?: boolean;\n /** Custom Zoom event filter to better control which actions should trigger zooming.\n * Learn more: https://d3js.org/d3-zoom#zoom_filter.\n * Default: `undefined` */\n zoomEventFilter?: (event: PointerEvent) => boolean;\n /** Disable node dragging. Default: `false` */\n disableDrag?: boolean;\n /** Disable brush for multiple node selection. Default: `false` */\n disableBrush?: boolean;\n /** Interval to re-render the graph when zooming. Default: `100` */\n zoomThrottledUpdateNodeThreshold?: number;\n /** Padding for the graph when fitting to container. Default: `50` */\n fitViewPadding?: Spacing | number;\n /** Default alignment when fitting the graph view. Default: `GraphFitViewAlignment.Center` */\n fitViewAlign?: GraphFitViewAlignment;\n\n // Layout general settings\n /** Type of the graph layout. Default: `GraphLayoutType.Force` */\n layoutType?: GraphLayoutType | string;\n /** Fit the graph to container on data or config updates, or on container resize. Default: `true` */\n layoutAutofit?: boolean;\n /** Tolerance constant defining whether the graph should be fitted to container\n * (on data or config update, or container resize) after a zoom / pan interaction or not.\n * `0` — Stop fitting after any pan or zoom\n * `Number.POSITIVE_INFINITY` — Always fit\n * Default: `8.0` */\n layoutAutofitTolerance?: number;\n /** Place non-connected nodes at the bottom of the graph. Default: `false` */\n layoutNonConnectedAside?: boolean;\n\n // Settings for Parallel and Concentric layouts\n /** Node group accessor function.\n * Only for `GraphLayoutType.Parallel`, `GraphLayoutType.ParallelHorizontal` and `GraphLayoutType.Concentric` layouts.\n * Default: `node => node.group` */\n layoutNodeGroup?: StringAccessor<N>;\n /** Order of the layout groups.\n * Only for `GraphLayoutType.Parallel`, `GraphLayoutType.ParallelHorizontal` and `GraphLayoutType.Concentric` layouts.\n * Default: `[]` */\n layoutGroupOrder?: string[];\n\n // Setting for Parallel layouts only\n /** Sets the number of nodes in a sub-group after which they'll continue on the next column (or row if `layoutType` is\n * `GraphLayoutType.ParallelHorizontal`).\n * Only for `GraphLayoutType.Parallel` and `GraphLayoutType.ParallelHorizontal` layouts.\n * Default: `6` */\n layoutParallelNodesPerColumn?: number;\n /** Node sub-group accessor function.\n * Only for `GraphLayoutType.Parallel` and `GraphLayoutType.ParallelHorizontal` layouts.\n * Default: `node => node.subgroup` */\n layoutParallelNodeSubGroup?: StringAccessor<N>;\n /** Number of sub-groups per row (or column if `layoutType` is `GraphLayoutType.ParallelHorizontal`) in a group.\n * Only for `GraphLayoutType.Parallel` and `GraphLayoutType.ParallelHorizontal` layouts.\n * Default: `1` */\n layoutParallelSubGroupsPerRow?: number;\n /** Spacing between groups.\n * Only for `GraphLayoutType.Parallel` and `GraphLayoutType.ParallelHorizontal` layouts.\n * Default: `undefined` */\n layoutParallelGroupSpacing?: number;\n /** Set a group by name to have priority in sorting the graph links.\n * Only for `GraphLayoutType.Parallel` and `GraphLayoutType.ParallelHorizontal` layouts.\n * Default: `undefined` */\n layoutParallelSortConnectionsByGroup?: string;\n\n // Force layout\n /** Force Layout settings, see the `d3-force` package for more details */\n forceLayoutSettings?: GraphForceLayoutSettings<N, L>;\n\n // Dagre layout\n /** Darge Layout settings, see the `dagrejs` package\n * for more details: https://github.com/dagrejs/dagre/wiki#configuring-the-layout\n */\n dagreLayoutSettings?: GraphDagreLayoutSetting;\n\n // ELK layout\n /** ELK layout options, see the `elkjs` package for more details: https://github.com/kieler/elkjs.\n * If you want to specify custom layout option for each node group, you can provide an accessor function that\n * receives group name ('root' for the top-level configuration) as the first argument and returns an object containing\n * layout options. Default: `undefined`\n */\n layoutElkSettings?: GenericAccessor<GraphElkLayoutSettings, string> | undefined;\n /** Array of accessor functions to define nested node groups for the ELK Layered layout.\n * E.g.: `[n => n.group, n => n.subGroup]`.\n * Default: `undefined` */\n layoutElkNodeGroups?: StringAccessor<N>[];\n /** A function to be called per graph node to get the ELK shape object.\n * This enables you to provide custom node dimensions (through the `width` and `height` properties)\n * and coordinates (through the `x` and `y` properties) if needed.\n * Default: `undefined`\n */\n layoutElkGetNodeShape?: (d: GraphNode<N, L>, i: number) => ElkShape;\n\n // Links\n /** Link width accessor function ot constant value. Default: `1` */\n linkWidth?: NumericAccessor<L>;\n /** Link style accessor function or constant value. Default: `GraphLinkStyle.Solid` */\n linkStyle?: GenericAccessor<GraphLinkStyle, L>;\n /** Link band width accessor function or constant value. Default: `0` */\n linkBandWidth?: NumericAccessor<L>;\n /** Link arrow accessor function or constant value. Default: `undefined` */\n linkArrow?: GenericAccessor<GraphLinkArrowStyle | string | boolean, L> | undefined;\n /** Link stroke color accessor function or constant value. Default: `undefined` */\n linkStroke?: ColorAccessor<L>;\n /** Link disabled state accessor function or constant value. Default: `false` */\n linkDisabled?: BooleanAccessor<L>;\n /** Link flow animation accessor function or constant value. Default: `false` */\n linkFlow?: BooleanAccessor<L>;\n /** Animation duration of the flow (traffic) circles in milliseconds. If `linkFlowParticleSpeed` is provided,\n * this duration will be calculated based on the link length and particle speed. Default: `20000` */\n linkFlowAnimDuration?: NumericAccessor<L>;\n /** Size of the moving particles that represent traffic flow. Default: `2` */\n linkFlowParticleSize?: NumericAccessor<L>;\n /** Speed of the moving particles in pixels per second. This property takes precedence over `linkFlowAnimDuration`. Default: `undefined` */\n linkFlowParticleSpeed?: NumericAccessor<L>;\n /** Link label accessor function or constant value. Default: `undefined` */\n linkLabel?: GenericAccessor<GraphCircleLabel | GraphCircleLabel[], L> | undefined;\n /** Shift label along the link center a little bit to avoid overlap with the link arrow. Default: `true` */\n linkLabelShiftFromCenter?: BooleanAccessor<L>;\n /** Spacing between neighboring links. Default: `8` */\n linkNeighborSpacing?: number;\n /** Curvature of the link. Recommended value range: [0:1.5].\n * `0` - straight line,\n * `1` - nice curvature,\n * `1.5` - very curve.\n * Default: `0` */\n linkCurvature?: NumericAccessor<L>;\n /** Highlight links on hover. Default: `true` */\n linkHighlightOnHover?: boolean;\n /** Offset [x,y] in pixels from the source node's center point where the link should start. Default: `undefined` */\n linkSourcePointOffset?: GenericAccessor<[number, number], GraphLink<N, L>>;\n /** Offset [x,y] in pixels from the target node's center point where the link should end. Default: `undefined` */\n linkTargetPointOffset?: GenericAccessor<[number, number], GraphLink<N, L>>;\n /** Set selected link by its unique id. Default: `undefined` */\n selectedLinkId?: number | string;\n\n // Nodes\n /** Node size accessor function or constant value. Default: `30` */\n nodeSize?: NumericAccessor<N>;\n /** Node stroke width accessor function or constant value. Default: `3` */\n nodeStrokeWidth?: NumericAccessor<N>;\n /** Node shape accessor function or constant value. Default: `GraphNodeShape.Circle` */\n nodeShape?: GenericAccessor<GraphNodeShape | string, N>;\n /** Node gauge outline accessor function or constant value in the range [0,100]. Default: `0` */\n nodeGaugeValue?: NumericAccessor<N>;\n /** Node gauge outline fill color accessor function or constant value. Default: `undefined` */\n nodeGaugeFill?: ColorAccessor<N>;\n /** Animation duration of the node gauge outline. Default: `1500` */\n nodeGaugeAnimDuration?: number;\n /** Node central icon accessor function or constant value. Default: `node => node.icon` */\n nodeIcon?: StringAccessor<N>;\n /** Node central icon size accessor function or constant value. Default: `undefined` */\n nodeIconSize?: NumericAccessor<N>;\n /** Node label accessor function or constant value. Default: `node => node.label` */\n nodeLabel?: StringAccessor<N>;\n /** Defines whether to trim the node labels or not. Default: `true` */\n nodeLabelTrim?: BooleanAccessor<N>;\n /** Node label trimming mode. Default: `TrimMode.Middle` */\n nodeLabelTrimMode?: GenericAccessor<TrimMode | string, N>;\n /** Node label maximum allowed text length above which the label will be trimmed. Default: `15` */\n nodeLabelTrimLength?: NumericAccessor<N>;\n /** Node sub-label accessor function or constant value: Default: `''` */\n nodeSubLabel?: StringAccessor<N>;\n /** Defines whether to trim the node sub-labels or not. Default: `true` */\n nodeSubLabelTrim?: BooleanAccessor<N>;\n /** Node sub-label trimming mode. Default: `TrimMode.Middle` */\n nodeSubLabelTrimMode?: GenericAccessor<TrimMode | string, N>;\n /** Node sub-label maximum allowed text length above which the label will be trimmed. Default: `15` */\n nodeSubLabelTrimLength?: NumericAccessor<N>;\n /** Node circular side labels accessor function. The function should return an array of GraphCircleLabel objects. Default: `undefined` */\n nodeSideLabels?: GenericAccessor<GraphCircleLabel[], N>;\n /** Node bottom icon accessor function. Default: `undefined` */\n nodeBottomIcon?: StringAccessor<N>;\n /** Node disabled state accessor function or constant value. Default: `false` */\n nodeDisabled?: BooleanAccessor<N>;\n /** Node fill color accessor function or constant value. Default: `node => node.fill` */\n nodeFill?: ColorAccessor<N>;\n /** Node stroke color accessor function or constant value. Default: `node => node.stroke` */\n nodeStroke?: ColorAccessor<N>;\n /** Sorting function to determine node placement. Default: `undefined` */\n nodeSort?: ((a: N, b: N) => number);\n /** Specify the initial position for entering nodes as [x, y]. Default: `undefined` */\n nodeEnterPosition?: GenericAccessor<[number, number], N> | undefined;\n /** Specify the initial scale for entering nodes in the range [0,1]. Default: `0.75` */\n nodeEnterScale?: NumericAccessor<N> | undefined;\n /** Specify the destination position for exiting nodes as [x, y]. Default: `undefined` */\n nodeExitPosition?: GenericAccessor<[number, number], N> | undefined;\n /** Specify the destination scale for exiting nodes in the range [0,1]. Default: `0.75` */\n nodeExitScale?: NumericAccessor<N> | undefined;\n /** Custom \"enter\" function for node rendering. Default: `undefined` */\n nodeEnterCustomRenderFunction?:\n (datum: GraphNode<N, L>, nodeGroupElementSelection: Selection<SVGGElement, GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number) => void;\n /** Custom \"update\" function for node rendering. Default: `undefined` */\n nodeUpdateCustomRenderFunction?:\n (datum: GraphNode<N, L>, nodeGroupElementSelection: Selection<SVGGElement, GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number) => void;\n /** Custom partial \"update\" function for node rendering which will be triggered after the following events:\n * - Full node update (`nodeUpdateCustomRenderFunction`);\n * - Background click;\n * - Node and Link mouseover and mouseout;\n * - Node brushing,\n * Default: `undefined` */\n nodePartialUpdateCustomRenderFunction?:\n (datum: GraphNode<N, L>, nodeGroupElementSelection: Selection<SVGGElement, GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number) => void;\n /** Custom \"exit\" function for node rendering. Default: `undefined` */\n nodeExitCustomRenderFunction?:\n (datum: GraphNode<N, L>, nodeGroupElementSelection: Selection<SVGGElement, GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, duration: number, zoomLevel: number) => void;\n /** Custom render function that will be called while zooming / panning the graph. Default: `undefined` */\n nodeOnZoomCustomRenderFunction?:\n (datum: GraphNode<N, L>, nodeGroupElementSelection: Selection<SVGGElement, GraphNode<N, L>, null, unknown>, config: GraphConfigInterface<N, L>, zoomLevel: number) => void;\n /** Define the mode for highlighting selected nodes in the graph. Default: `GraphNodeSelectionHighlightMode.GreyoutNonConnected` */\n nodeSelectionHighlightMode?: GraphNodeSelectionHighlightMode;\n /** Set selected node by unique id. Default: `undefined` */\n selectedNodeId?: number | string;\n /** Set selected nodes by unique id. Default: `undefined` */\n selectedNodeIds?: number[] | string[];\n\n /** Panels configuration. An array of `GraphPanelConfig` objects. Default: `[]` */\n panels?: GraphPanelConfig[] | undefined;\n\n // Events\n /** Graph node drag start callback function. Default: `undefined` */\n onNodeDragStart?: (n: GraphNode<N, L>, event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>) => void | undefined;\n /** Graph node drag callback function. Default: `undefined` */\n onNodeDrag?: (n: GraphNode<N, L>, event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>) => void | undefined;\n /** Graph node drag end callback function. Default: `undefined` */\n onNodeDragEnd?: (n: GraphNode<N, L>, event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>) => void | undefined;\n /** Zoom event callback. Default: `undefined` */\n onZoom?: (zoomScale: number, zoomScaleExtent: [number, number], event: D3ZoomEvent<SVGGElement, unknown> | undefined, transform: ZoomTransform) => void;\n /** Zoom start event callback. Default: `undefined` */\n onZoomStart?: (zoomScale: number, zoomScaleExtent: [number, number], event: D3ZoomEvent<SVGGElement, unknown> | undefined, transform: ZoomTransform) => void;\n /** Zoom end event callback. Default: `undefined` */\n onZoomEnd?: (zoomScale: number, zoomScaleExtent: [number, number], event: D3ZoomEvent<SVGGElement, unknown> | undefined, transform: ZoomTransform) => void;\n /** Callback function to be called when the graph layout is calculated. Default: `undefined` */\n onLayoutCalculated?: (nodes: GraphNode<N, L>[], links: GraphLink<N, L>[]) => void;\n /** Graph node selection brush callback function. Default: `undefined` */\n onNodeSelectionBrush?: (selectedNodes: GraphNode<N, L>[], event: D3BrushEvent<SVGGElement> | undefined) => void;\n /** Graph multiple node drag callback function. Default: `undefined` */\n onNodeSelectionDrag?: (selectedNodes: GraphNode<N, L>[], event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>) => void;\n /** Callback function to be called when the graph rendering is complete. Default: `undefined` */\n onRenderComplete?: (\n g: Selection<SVGGElement, unknown, null, undefined>,\n nodes: GraphNode<N, L>[],\n links: GraphLink<N, L>[],\n config: GraphConfigInterface<N, L>,\n duration: number,\n zoomLevel: number,\n width: number,\n height: number\n ) => void;\n\n /** Determines whether the component should update when new data is provided.\n * This function takes the previous and new data as parameters and returns a boolean\n * indicating whether the update should proceed. Useful for fine-grained control over\n * update behavior when your data has a complex nested structure.\n * By default the `isEqual` function from Unovis will be used to do the comparison.\n */\n shouldDataUpdate?: (\n prevData: GraphInputData<N, L>,\n nextData: GraphInputData<N, L>,\n datamodel: GraphDataModel<N, L, GraphNode<N, L>, GraphLink<N, L>>\n ) => boolean;\n}\n\nexport const GraphDefaultConfig: GraphConfigInterface<GraphInputNode, GraphInputLink> = {\n ...ComponentDefaultConfig,\n duration: 1000,\n zoomScaleExtent: [0.35, 1.25],\n disableZoom: false,\n zoomEventFilter: undefined,\n disableDrag: false,\n disableBrush: false,\n zoomThrottledUpdateNodeThreshold: 100,\n layoutType: GraphLayoutType.Force,\n layoutAutofit: true,\n layoutAutofitTolerance: 8.0,\n layoutNonConnectedAside: false,\n fitViewPadding: 50,\n fitViewAlign: GraphFitViewAlignment.Center,\n\n layoutGroupOrder: [],\n layoutParallelSubGroupsPerRow: 1,\n layoutParallelNodesPerColumn: 6,\n layoutParallelGroupSpacing: undefined,\n layoutParallelSortConnectionsByGroup: undefined,\n layoutNodeGroup: (n: GraphInputNode): string => (n as { group: string }).group,\n layoutParallelNodeSubGroup: (n: GraphInputNode): string => (n as { subgroup: string }).subgroup,\n\n forceLayoutSettings: {\n linkDistance: 60,\n linkStrength: 0.45,\n charge: -500,\n forceXStrength: 0.15,\n forceYStrength: 0.25,\n numIterations: undefined,\n fixNodePositionAfterSimulation: false,\n },\n\n dagreLayoutSettings: {\n rankdir: 'BT',\n ranker: 'longest-path',\n },\n\n layoutElkSettings: undefined,\n layoutElkNodeGroups: undefined,\n layoutElkGetNodeShape: undefined,\n\n linkFlowAnimDuration: 20000,\n linkFlowParticleSize: 2,\n linkFlowParticleSpeed: undefined,\n linkWidth: 1,\n linkStyle: GraphLinkStyle.Solid,\n linkBandWidth: 0,\n linkArrow: undefined,\n linkStroke: undefined,\n linkFlow: false,\n linkLabel: undefined,\n linkLabelShiftFromCenter: true,\n linkNeighborSpacing: 8,\n linkDisabled: false,\n linkCurvature: 0,\n linkHighlightOnHover: true,\n linkSourcePointOffset: undefined,\n linkTargetPointOffset: undefined,\n selectedLinkId: undefined,\n\n nodeSize: 30,\n nodeStrokeWidth: 3,\n nodeShape: GraphNodeShape.Circle,\n nodeGaugeValue: 0,\n nodeIcon: (n: GraphInputNode): string => (n as { icon: string }).icon,\n nodeIconSize: undefined,\n nodeLabel: (n: GraphInputNode): string => (n as { label: string }).label,\n nodeLabelTrim: true,\n nodeLabelTrimLength: 15,\n nodeLabelTrimMode: TrimMode.Middle,\n nodeSubLabel: '',\n nodeSubLabelTrim: true,\n nodeSubLabelTrimLength: 15,\n nodeSubLabelTrimMode: TrimMode.Middle,\n nodeSideLabels: undefined,\n nodeBottomIcon: undefined,\n nodeDisabled: false,\n nodeFill: (n: GraphInputNode): string => (n as { fill: string }).fill,\n nodeGaugeFill: undefined,\n nodeStroke: (n: GraphInputNode): string => (n as { stroke: string }).stroke,\n nodeEnterPosition: undefined,\n nodeEnterScale: 0.75,\n nodeExitPosition: undefined,\n nodeExitScale: 0.75,\n nodeSort: undefined,\n nodeSelectionHighlightMode: GraphNodeSelectionHighlightMode.GreyoutNonConnected,\n nodeGaugeAnimDuration: 1500,\n\n selectedNodeId: undefined,\n selectedNodeIds: undefined,\n\n panels: undefined,\n\n onNodeDragStart: undefined,\n onNodeDrag: undefined,\n onNodeDragEnd: undefined,\n onZoom: undefined,\n onZoomStart: undefined,\n onZoomEnd: undefined,\n onLayoutCalculated: undefined,\n onNodeSelectionBrush: undefined,\n onNodeSelectionDrag: undefined,\n onRenderComplete: undefined,\n\n shouldDataUpdate: (prevData: GraphInputData<GraphInputNode, GraphInputLink>, nextData: GraphInputData<GraphInputNode, GraphInputLink>): boolean => {\n return !isEqual(prevData, nextData)\n },\n}\n"],"names":[],"mappings":";;;;;AASA;AAuSa,MAAA,kBAAkB,GAC1B,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,sBAAsB,KACzB,QAAQ,EAAE,IAAI,EACd,eAAe,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,EAC7B,WAAW,EAAE,KAAK,EAClB,eAAe,EAAE,SAAS,EAC1B,WAAW,EAAE,KAAK,EAClB,YAAY,EAAE,KAAK,EACnB,gCAAgC,EAAE,GAAG,EACrC,UAAU,EAAE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AAE,SAAS,EAC9B,gBAAgB,EAAE,SAAS,EAE3B,gBAAgB,EAAE,CAAC,QAAwD,EAAE,QAAwD,KAAa;AAChJ,QAAA,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;AACrC,KAAC;;;;"}
|
|
@@ -3,7 +3,7 @@ import { ComponentCore } from "../../core/component";
|
|
|
3
3
|
import { GraphDataModel } from "../../data-models/graph";
|
|
4
4
|
import { GraphInputLink, GraphInputNode, GraphInputData } from "../../types/graph";
|
|
5
5
|
import { Spacing } from "../../types/spacing";
|
|
6
|
-
import { GraphNode, GraphLink } from './types';
|
|
6
|
+
import { GraphNode, GraphLink, GraphFitViewAlignment } from './types';
|
|
7
7
|
import { GraphConfigInterface } from './config';
|
|
8
8
|
import * as nodeSelectors from './modules/node/style';
|
|
9
9
|
export declare class Graph<N extends GraphInputNode, L extends GraphInputLink> extends ComponentCore<GraphInputData<N, L>, GraphConfigInterface<N, L>> {
|
|
@@ -124,7 +124,7 @@ export declare class Graph<N extends GraphInputNode, L extends GraphInputLink> e
|
|
|
124
124
|
zoomOut(increment?: number): void;
|
|
125
125
|
setZoom(zoomLevel: number): void;
|
|
126
126
|
getZoom(): number;
|
|
127
|
-
fitView(duration?: number, nodeIds?: (string | number)[]): void;
|
|
127
|
+
fitView(duration?: number, nodeIds?: (string | number)[], alignment?: GraphFitViewAlignment): void;
|
|
128
128
|
/** Enable automatic fitting to container if it was disabled due to previous zoom / pan interactions */
|
|
129
129
|
resetAutofitState(): void;
|
|
130
130
|
/** Get current coordinates of the nodes as an array of { id: string; x: number; y: number } objects */
|
|
@@ -9,7 +9,7 @@ import { ComponentCore } from '../../core/component/index.js';
|
|
|
9
9
|
import { GraphDataModel } from '../../data-models/graph.js';
|
|
10
10
|
import { isNumber, isFunction, clamp, getBoolean, getNumber, shallowDiff, isPlainObject, isEqual } from '../../utils/data.js';
|
|
11
11
|
import { smartTransition } from '../../utils/d3.js';
|
|
12
|
-
import { GraphLayoutType, GraphNodeSelectionHighlightMode, GraphLinkArrowStyle } from './types.js';
|
|
12
|
+
import { GraphLayoutType, GraphFitViewAlignment, GraphNodeSelectionHighlightMode, GraphLinkArrowStyle } from './types.js';
|
|
13
13
|
import { GraphDefaultConfig } from './config.js';
|
|
14
14
|
import { background, graphGroup, brush, root } from './style.js';
|
|
15
15
|
import * as style from './modules/node/style.js';
|
|
@@ -336,15 +336,15 @@ class Graph extends ComponentCore {
|
|
|
336
336
|
this._shouldSetPanels = false;
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
_fit(duration = 0, nodeIds) {
|
|
339
|
+
_fit(duration = 0, nodeIds, alignment = this.config.fitViewAlign) {
|
|
340
340
|
const { datamodel: { nodes } } = this;
|
|
341
341
|
const fitViewNodes = (nodeIds === null || nodeIds === void 0 ? void 0 : nodeIds.length) ? nodes.filter(n => nodeIds.includes(n.id)) : nodes;
|
|
342
|
-
const transform = this._getTransform(fitViewNodes);
|
|
342
|
+
const transform = this._getTransform(fitViewNodes, alignment);
|
|
343
343
|
smartTransition(this.g, duration)
|
|
344
344
|
.call(this._zoomBehavior.transform, transform);
|
|
345
345
|
this._onZoom(transform);
|
|
346
346
|
}
|
|
347
|
-
_getTransform(nodes) {
|
|
347
|
+
_getTransform(nodes, alignment) {
|
|
348
348
|
const { nodeSize, zoomScaleExtent } = this.config;
|
|
349
349
|
const { left, top, right, bottom } = this.bleed;
|
|
350
350
|
const maxNodeSize = getMaxNodeSize(nodes, nodeSize);
|
|
@@ -365,10 +365,31 @@ class Graph extends ComponentCore {
|
|
|
365
365
|
const xScale = w / (xExtent[1] - xExtent[0] + (left || 0) + (right || 0));
|
|
366
366
|
const yScale = h / (yExtent[1] - yExtent[0] + (top || 0) + (bottom || 0));
|
|
367
367
|
const clampedScale = clamp(min([xScale, yScale]), zoomScaleExtent[0], zoomScaleExtent[1]);
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
368
|
+
// Calculate translation based on alignment
|
|
369
|
+
let translateX;
|
|
370
|
+
let translateY;
|
|
371
|
+
switch (alignment) {
|
|
372
|
+
case GraphFitViewAlignment.Left:
|
|
373
|
+
translateX = left - xExtent[0] * clampedScale;
|
|
374
|
+
translateY = this._height / 2 - (yExtent[0] + (yExtent[1] - yExtent[0]) / 2) * clampedScale;
|
|
375
|
+
break;
|
|
376
|
+
case GraphFitViewAlignment.Right:
|
|
377
|
+
translateX = this._width - (xExtent[1] - xExtent[0]) * clampedScale - right;
|
|
378
|
+
translateY = this._height / 2 - (yExtent[0] + (yExtent[1] - yExtent[0]) / 2) * clampedScale;
|
|
379
|
+
break;
|
|
380
|
+
case GraphFitViewAlignment.Top:
|
|
381
|
+
translateX = this._width / 2 - (xExtent[0] + (xExtent[1] - xExtent[0]) / 2) * clampedScale;
|
|
382
|
+
translateY = top - yExtent[0] * clampedScale;
|
|
383
|
+
break;
|
|
384
|
+
case GraphFitViewAlignment.Bottom:
|
|
385
|
+
translateX = this._width / 2 - (xExtent[0] + (xExtent[1] - xExtent[0]) / 2) * clampedScale;
|
|
386
|
+
translateY = this._height - (yExtent[1] - yExtent[0]) * clampedScale - bottom;
|
|
387
|
+
break;
|
|
388
|
+
case GraphFitViewAlignment.Center:
|
|
389
|
+
default:
|
|
390
|
+
translateX = this._width / 2 - (xExtent[0] + (xExtent[1] - xExtent[0]) / 2) * clampedScale;
|
|
391
|
+
translateY = this._height / 2 - (yExtent[0] + (yExtent[1] - yExtent[0]) / 2) * clampedScale;
|
|
392
|
+
}
|
|
372
393
|
const transform = zoomIdentity
|
|
373
394
|
.translate(translateX, translateY)
|
|
374
395
|
.scale(clampedScale);
|
|
@@ -785,10 +806,10 @@ class Graph extends ComponentCore {
|
|
|
785
806
|
getZoom() {
|
|
786
807
|
return zoomTransform(this.g.node()).k;
|
|
787
808
|
}
|
|
788
|
-
fitView(duration = this.config.duration, nodeIds) {
|
|
809
|
+
fitView(duration = this.config.duration, nodeIds, alignment) {
|
|
789
810
|
var _a;
|
|
790
811
|
(_a = this._layoutCalculationPromise) === null || _a === void 0 ? void 0 : _a.then(() => {
|
|
791
|
-
this._fit(duration, nodeIds);
|
|
812
|
+
this._fit(duration, nodeIds, alignment);
|
|
792
813
|
});
|
|
793
814
|
}
|
|
794
815
|
/** Enable automatic fitting to container if it was disabled due to previous zoom / pan interactions */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/graph/index.ts"],"sourcesContent":["import { min, max } from 'd3-array'\nimport { Transition } from 'd3-transition'\nimport { select, Selection, pointer } from 'd3-selection'\nimport { brush, BrushBehavior, D3BrushEvent } from 'd3-brush'\nimport { zoom, zoomTransform, zoomIdentity, ZoomTransform, D3ZoomEvent, ZoomBehavior } from 'd3-zoom'\nimport { drag, D3DragEvent } from 'd3-drag'\nimport { interval, Timer } from 'd3-timer'\n\n// Core\nimport { ComponentCore } from 'core/component'\nimport { GraphDataModel } from 'data-models/graph'\n\n// Types\nimport { GraphInputLink, GraphInputNode, GraphInputData } from 'types/graph'\nimport { Spacing } from 'types/spacing'\n\n// Utils\nimport { isNumber, clamp, shallowDiff, isFunction, getBoolean, isPlainObject, isEqual, getNumber } from 'utils/data'\nimport { smartTransition } from 'utils/d3'\n\n// Local Types\nimport { GraphNode, GraphLink, GraphLayoutType, GraphLinkArrowStyle, GraphPanel, GraphNodeSelectionHighlightMode } from './types'\n\n// Config\nimport { GraphDefaultConfig, GraphConfigInterface } from './config'\n\n// Styles\nimport * as generalSelectors from './style'\nimport * as nodeSelectors from './modules/node/style'\nimport * as linkSelectors from './modules/link/style'\nimport * as panelSelectors from './modules/panel/style'\n\n// Modules\nimport { createNodes, updateNodes, removeNodes, zoomNodesThrottled, zoomNodes, updateNodesPartial, updateNodePositions } from './modules/node'\nimport { getMaxNodeSize, getNodeSize, getX, getY } from './modules/node/helper'\nimport {\n createLinks,\n updateLinks,\n removeLinks,\n zoomLinksThrottled,\n zoomLinks,\n animateLinkFlow,\n updateLinksPartial,\n updateLinkLines,\n} from './modules/link'\nimport { getDoubleArrowPath, getArrowPath } from './modules/link/helper'\nimport { createPanels, updatePanels, removePanels } from './modules/panel'\nimport { setPanelForNodes, updatePanelBBoxSize, updatePanelNumNodes, initPanels } from './modules/panel/helper'\nimport { applyLayoutCircular, applyLayoutParallel, applyLayoutDagre, applyLayoutConcentric, applyLayoutForce, applyELKLayout } from './modules/layout'\n\nexport class Graph<\n N extends GraphInputNode,\n L extends GraphInputLink,\n> extends ComponentCore<\n GraphInputData<N, L>,\n GraphConfigInterface<N, L>\n > {\n static selectors = {\n root: generalSelectors.root,\n graphGroup: generalSelectors.graphGroup,\n background: generalSelectors.background,\n node: nodeSelectors.gNode,\n nodeShape: nodeSelectors.node,\n nodeGauge: nodeSelectors.nodeGauge,\n nodeSideLabel: nodeSelectors.sideLabelGroup,\n nodeLabel: nodeSelectors.label,\n dimmedNode: nodeSelectors.greyedOutNode,\n link: linkSelectors.gLink,\n linkLine: linkSelectors.link,\n linkLabel: linkSelectors.linkLabelGroup,\n dimmedLink: linkSelectors.greyedOutLink,\n panel: panelSelectors.gPanel,\n panelRect: panelSelectors.panel,\n panelSelection: panelSelectors.panelSelection,\n panelLabel: panelSelectors.label,\n panelLabelText: panelSelectors.labelText,\n panelSideIcon: panelSelectors.sideIconGroup,\n panelSideIconShape: panelSelectors.sideIconShape,\n panelSideIconSymbol: panelSelectors.sideIconSymbol,\n }\n\n static nodeSelectors = nodeSelectors\n g: Selection<SVGGElement, unknown, null, undefined>\n protected _defaultConfig = GraphDefaultConfig as unknown as GraphConfigInterface<N, L>\n public config: GraphConfigInterface<N, L> = this._defaultConfig\n datamodel: GraphDataModel<N, L, GraphNode<N, L>, GraphLink<N, L>> = new GraphDataModel()\n private _selectedNodes: GraphNode<N, L>[]\n private _selectedLink: GraphLink<N, L>\n\n private _graphGroup: Selection<SVGGElement, unknown, null, undefined>\n private _panelsGroup: Selection<SVGGElement, unknown, null, undefined>\n private _linksGroup: Selection<SVGGElement, unknown, null, undefined>\n private _nodesGroup: Selection<SVGGElement, unknown, null, undefined>\n private _brush: Selection<SVGGElement, unknown, null, unknown>\n private _timer: Timer\n\n private _isFirstRender = true\n private _prevWidth: number\n private _prevHeight: number\n private _shouldRecalculateLayout = false\n private _currentLayoutType: GraphLayoutType | undefined\n private _layoutCalculationPromise: Promise<void> | undefined\n\n private _shouldFitLayout: boolean\n private _shouldSetPanels = false\n private _panels: GraphPanel[]\n\n private _defs: Selection<SVGDefsElement, unknown, SVGGElement, undefined>\n private _backgroundRect: Selection<SVGRectElement, unknown, SVGGElement, undefined>\n private _zoomBehavior: ZoomBehavior<SVGGElement, unknown>\n private _isAutoFitDisabled = false\n private _scale: number\n private _initialTransform: ZoomTransform\n private _isDragging = false\n private _brushBehavior: BrushBehavior<unknown>\n private _groupDragInit: [number, number]\n\n // A map for storing link total path lengths to optimize rendering performance\n private _linkPathLengthMap: Map<string, number> = new Map()\n\n events = {\n [Graph.selectors.background]: {\n click: this._onBackgroundClick.bind(this),\n },\n [Graph.selectors.node]: {\n click: this._onNodeClick.bind(this),\n mouseover: this._onNodeMouseOver.bind(this),\n mouseout: this._onNodeMouseOut.bind(this),\n },\n [Graph.selectors.link]: {\n click: this._onLinkClick.bind(this),\n mouseover: this._onLinkMouseOver.bind(this),\n mouseout: this._onLinkMouseOut.bind(this),\n },\n }\n\n public get selectedNode (): GraphNode<N, L> {\n return this._selectedNodes?.[0]\n }\n\n public get selectedNodes (): GraphNode<N, L>[] {\n return this._selectedNodes\n }\n\n public get selectedLink (): GraphLink<N, L> {\n return this._selectedLink\n }\n\n constructor (config?: GraphConfigInterface<N, L>) {\n super()\n if (config) this.setConfig(config)\n\n this._backgroundRect = this.g.append('rect').attr('class', generalSelectors.background)\n this._graphGroup = this.g.append('g').attr('class', generalSelectors.graphGroup)\n this._brush = this.g.append('g').attr('class', generalSelectors.brush)\n\n this._zoomBehavior = zoom<SVGGElement, unknown>()\n .scaleExtent(this.config.zoomScaleExtent)\n .on('zoom', (e: D3ZoomEvent<SVGGElement, unknown>) => this._onZoom(e.transform, e))\n .on('start', (e: D3ZoomEvent<SVGGElement, unknown>) => this._onZoomStart(e.transform, e))\n .on('end', (e: D3ZoomEvent<SVGGElement, unknown>) => this._onZoomEnd(e.transform, e))\n\n this._brushBehavior = brush()\n .on('start brush end', this._onBrush.bind(this))\n .filter(event => event.shiftKey)\n .keyModifiers(false)\n\n this._panelsGroup = this._graphGroup.append('g').attr('class', panelSelectors.panels)\n this._linksGroup = this._graphGroup.append('g').attr('class', linkSelectors.links)\n this._nodesGroup = this._graphGroup.append('g').attr('class', nodeSelectors.nodes)\n\n this._defs = this._graphGroup.append('defs')\n\n this._getLinkArrowDefId = this._getLinkArrowDefId.bind(this)\n }\n\n setData (data: GraphInputData<N, L>): void {\n const { config } = this\n if (!config.shouldDataUpdate(this.datamodel.data, data, this.datamodel)) return\n\n this.datamodel.nodeSort = config.nodeSort\n this.datamodel.data = data\n this._shouldRecalculateLayout = true\n if (config.layoutAutofit) this._shouldFitLayout = true\n this._shouldSetPanels = true\n\n this._addSVGDefs()\n }\n\n setConfig (config: GraphConfigInterface<N, L>): void {\n super.setConfig(config)\n const hasLayoutConfigurationChanged = this._shouldLayoutRecalculate()\n\n // If the data has changed (see above in `setData`) or the layout configuration has changed, we need to recalculate the layout\n this._shouldRecalculateLayout = this._shouldRecalculateLayout || hasLayoutConfigurationChanged\n\n // If the `config.layoutAutofit` is true and data has changed (see above in `setData`),\n // or the layout configuration has changed, we need to fit the layout\n this._shouldFitLayout = this._shouldFitLayout || hasLayoutConfigurationChanged\n\n if (this._shouldFitLayout) this._isAutoFitDisabled = false\n this._shouldSetPanels = true\n }\n\n get bleed (): Spacing {\n const padding = this.config.fitViewPadding // Extra padding to take into account labels and selection outlines\n return isNumber(padding)\n ? { top: padding, bottom: padding, left: padding, right: padding }\n : padding\n }\n\n _render (customDuration?: number): void {\n const { config: { disableBrush, disableZoom, duration, layoutAutofit, zoomEventFilter }, datamodel } = this\n if (!datamodel.nodes && !datamodel.links) return\n const animDuration = isNumber(customDuration) ? customDuration : duration\n\n this._backgroundRect\n .attr('width', this._width)\n .attr('height', this._height)\n .attr('opacity', 0)\n\n if ((this._prevWidth !== this._width || this._prevHeight !== this._height) && layoutAutofit) {\n // Fit layout on resize\n this._shouldFitLayout = true\n this._prevWidth = this._width\n this._prevHeight = this._height\n }\n\n // Handle brush behavior\n if (!disableBrush) {\n this._brushBehavior.extent([[0, 0], [this._width, this._height]])\n this._brush.call(this._brushBehavior)\n\n // Activate the brush when the shift key is pressed\n select(window)\n .on('keydown.unovis-graph', e => e.key === 'Shift' && this._activateBrush())\n .on('keyup.unovis-graph', e => e.key === 'Shift' && this._clearBrush())\n\n this._zoomBehavior.filter(event => !event.shiftKey)\n } else {\n this._brush.on('.brush', null)\n\n select(window)\n .on('keydown.unovis-graph', null)\n .on('keyup.unovis-graph', null)\n\n // Clear brush in case it was disabled in an active state\n if (this._brush.classed('active')) this._clearBrush()\n }\n\n // Apply layout and render\n if (this._shouldRecalculateLayout || !this._layoutCalculationPromise) {\n this._layoutCalculationPromise = this._calculateLayout()\n\n // Call `onLayoutCalculated` after the layout calculation is done and the `this._layoutCalculationPromise`\n // variable is set because the `fitView` function relies on the promise to be initialized\n this._layoutCalculationPromise.then(() => {\n this.config.onLayoutCalculated?.(datamodel.nodes, datamodel.links)\n })\n }\n\n // Redefining Zoom Behavior filter to the one specified in the config,\n // or to the default one supporting `shiftKey` for node brushing\n // See more: https://d3js.org/d3-zoom#zoom_filter\n this._zoomBehavior.filter(\n isFunction(zoomEventFilter)\n ? zoomEventFilter\n : (e: PointerEvent) => (!e.ctrlKey || e.type === 'wheel') && !e.button && !e.shiftKey) // Default filter\n\n this._layoutCalculationPromise.then(() => {\n // If the component has been destroyed while the layout calculation\n // was in progress, we cancel the render\n if (this.isDestroyed()) return\n\n this._initPanelsData()\n\n // Fit the view\n if (this._isFirstRender) {\n this._fit()\n this._shouldFitLayout = false\n } else if (this._shouldFitLayout && !this._isAutoFitDisabled) {\n this._fit(duration)\n this._shouldFitLayout = false\n }\n\n // Update Nodes and Links Selection State\n this._resetSelectionGreyoutState()\n if (this.config.selectedNodeId || this.config.selectedNodeIds) {\n const selectedIds = this.config.selectedNodeIds ?? [this.config.selectedNodeId]\n const selectedNodes = selectedIds.map(id => datamodel.getNodeById(id))\n this._setNodeSelectionState(selectedNodes)\n }\n\n if (this.config.selectedLinkId) {\n const selectedLink = datamodel.links.find(link => link.id === this.config.selectedLinkId)\n this._setLinkSelectionState(selectedLink)\n }\n\n // Draw\n this._drawNodes(animDuration)\n this._drawLinks(animDuration)\n\n // Link flow animation timer\n if (!this._timer) {\n const refreshRateMs = 35\n this._timer = interval(this._onLinkFlowTimerFrame.bind(this), refreshRateMs)\n }\n\n // Zoom\n if (disableZoom) this.g.on('.zoom', null)\n else this.g.call(this._zoomBehavior).on('dblclick.zoom', null)\n\n // We need to set up events and attributes again because the rendering might have been delayed by the layout\n // calculation and they were not set up properly (see the render function of `ComponentCore`)\n this._setUpComponentEventsThrottled()\n this._setCustomAttributesThrottled()\n\n // On render complete callback\n this.config.onRenderComplete?.(this.g, datamodel.nodes, datamodel.links, this.config, animDuration, this._scale, this._containerWidth, this._containerHeight)\n this._isFirstRender = false\n })\n }\n\n private _drawNodes (duration: number): void {\n const { config, datamodel } = this\n\n const nodes: GraphNode<N, L>[] = datamodel.nodes\n const nodeGroups = this._nodesGroup\n .selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.gNode}:not(.${nodeSelectors.gNodeExit})`)\n .data(nodes, d => String(d._id))\n\n const nodeGroupsEnter = nodeGroups.enter().append('g')\n .attr('class', nodeSelectors.gNode)\n .call(createNodes, config, duration, this._scale)\n\n const nodeGroupsMerged = nodeGroups.merge(nodeGroupsEnter)\n const nodeUpdateSelection = updateNodes(nodeGroupsMerged, config, duration, this._scale)\n\n this._drawPanels(nodeUpdateSelection, duration)\n\n const nodesGroupExit = nodeGroups.exit<GraphNode<N, L>>()\n nodesGroupExit\n .classed(nodeSelectors.gNodeExit, true)\n .call(removeNodes, config, duration, this._scale)\n\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const thisRef = this\n if (!config.disableDrag) {\n const dragBehaviour = drag<SVGGElement, GraphNode<N, L>>()\n .on('start drag end', function (event, d) {\n thisRef._handleDrag(d, event, select(this))\n })\n nodeGroupsMerged.call(dragBehaviour)\n } else {\n nodeGroupsMerged.on('.drag', null)\n }\n }\n\n private _drawLinks (duration: number): void {\n const { config, datamodel: { links } } = this\n\n const linkGroups = this._linksGroup\n .selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.gLink}:not(.${linkSelectors.gLinkExit}`)\n .data(links, (d: GraphLink<N, L>) => String(d._id))\n\n const linkGroupsEnter = linkGroups.enter().append('g')\n .attr('class', linkSelectors.gLink)\n .call(createLinks, config, duration)\n\n const linkGroupsMerged = linkGroups.merge(linkGroupsEnter)\n linkGroupsMerged.call(updateLinks, config, duration, this._scale, this._getLinkArrowDefId, this._linkPathLengthMap)\n\n const linkGroupsExit = linkGroups.exit<GraphLink<N, L>>()\n linkGroupsExit\n .attr('class', linkSelectors.gLinkExit)\n .call(removeLinks, config, duration)\n }\n\n private _drawPanels (\n nodeUpdateSelection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown> | Transition<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>,\n duration: number\n ): void {\n const { config } = this\n smartTransition(this._panelsGroup, duration / 2)\n .style('opacity', config.panels?.length ? 1 : 0)\n\n if (!this._panels) return\n\n const selection = ((nodeUpdateSelection as Transition<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>).duration)\n ? (nodeUpdateSelection as Transition<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>).selection()\n : nodeUpdateSelection as Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>\n\n updatePanelNumNodes(selection, this._panels, config)\n updatePanelBBoxSize(selection, this._panels, config)\n const panelData = this._panels.filter(p => p._numNodes)\n const panelGroup = this._panelsGroup\n .selectAll<SVGGElement, GraphPanel>(`.${panelSelectors.gPanel}`)\n .data(panelData, p => p.label)\n\n const panelGroupExit = panelGroup.exit<GraphPanel<N, L>>()\n panelGroupExit.call(removePanels, config, duration)\n\n const panelGroupEnter = panelGroup.enter().append('g')\n .attr('class', panelSelectors.gPanel)\n .call(createPanels, selection)\n const panelGroupMerged = panelGroup.merge(panelGroupEnter)\n\n this._updatePanels(panelGroupMerged, duration)\n }\n\n private _updatePanels (panelToUpdate: Selection<SVGGElement, GraphPanel, SVGGElement, unknown>, duration: number): void {\n const { config } = this\n if (!this._panels) return\n\n panelToUpdate.call(updatePanels, config, duration)\n }\n\n private async _calculateLayout (): Promise<void> {\n const { config, datamodel } = this\n\n // If the layout type has changed, we need to reset the node positions if they were fixed before\n if (this._currentLayoutType !== config.layoutType) {\n for (const node of datamodel.nodes) {\n delete node._state.fx\n delete node._state.fy\n }\n }\n\n switch (config.layoutType) {\n case GraphLayoutType.Precalculated:\n break\n case GraphLayoutType.Parallel:\n applyLayoutParallel(datamodel, config, this._width, this._height)\n break\n case GraphLayoutType.ParallelHorizontal:\n applyLayoutParallel(datamodel, config, this._width, this._height, 'horizontal')\n break\n case GraphLayoutType.Dagre:\n await applyLayoutDagre(datamodel, config, this._width)\n break\n case GraphLayoutType.Force:\n await applyLayoutForce(datamodel, config, this._width)\n break\n case GraphLayoutType.Concentric:\n applyLayoutConcentric(datamodel, config, this._width, this._height)\n break\n case GraphLayoutType.Elk:\n await applyELKLayout(datamodel, config, this._width)\n break\n case GraphLayoutType.Circular:\n default:\n applyLayoutCircular(datamodel, config, this._width, this._height)\n break\n }\n\n // We need to update the panels data right after the layout calculation\n // because we want to have the latest coordinates before calling `onLayoutCalculated`\n this._initPanelsData()\n\n this._shouldRecalculateLayout = false\n this._currentLayoutType = config.layoutType as GraphLayoutType\n }\n\n private _initPanelsData (): void {\n const { config, datamodel } = this\n\n if (this._shouldSetPanels) {\n this._panels = initPanels(config.panels)\n setPanelForNodes(this._panels, datamodel.nodes, this.config)\n this._shouldSetPanels = false\n }\n }\n\n private _fit (duration = 0, nodeIds?: (string | number)[]): void {\n const { datamodel: { nodes } } = this\n const fitViewNodes = nodeIds?.length ? nodes.filter(n => nodeIds.includes(n.id)) : nodes\n const transform = this._getTransform(fitViewNodes)\n smartTransition(this.g, duration)\n .call(this._zoomBehavior.transform, transform)\n this._onZoom(transform)\n }\n\n private _getTransform (nodes: GraphNode<N, L>[]): ZoomTransform {\n const { nodeSize, zoomScaleExtent } = this.config\n const { left, top, right, bottom } = this.bleed\n\n const maxNodeSize = getMaxNodeSize(nodes, nodeSize)\n const w = this._width\n const h = this._height\n\n const xExtent = [\n min(nodes, d => getX(d) - maxNodeSize / 2 - (max((d._panels || []).map(p => p._padding.left)) || 0)),\n max(nodes, d => getX(d) + maxNodeSize / 2 + (max((d._panels || []).map(p => p._padding.right)) || 0)),\n ]\n const yExtent = [\n min(nodes, d => getY(d) - maxNodeSize / 2 - (max((d._panels || []).map(p => p._padding.top)) || 0)),\n max(nodes, d => getY(d) + maxNodeSize / 2 + (max((d._panels || []).map(p => p._padding.bottom)) || 0)),\n ]\n\n if (xExtent.some(item => item === undefined) || yExtent.some(item => item === undefined)) {\n console.warn('Unovis | Graph: Some of the node coordinates are undefined. This can happen if you try to fit the graph before the layout has been calculated.')\n return zoomIdentity\n }\n\n const xScale = w / (xExtent[1] - xExtent[0] + (left || 0) + (right || 0))\n const yScale = h / (yExtent[1] - yExtent[0] + (top || 0) + (bottom || 0))\n\n const clampedScale = clamp(min([xScale, yScale]), zoomScaleExtent[0], zoomScaleExtent[1])\n\n const xCenter = (xExtent[1] + xExtent[0]) / 2\n const yCenter = (yExtent[1] + yExtent[0]) / 2\n const translateX = this._width / 2 - xCenter * clampedScale\n const translateY = this._height / 2 - yCenter * clampedScale\n const transform = zoomIdentity\n .translate(translateX, translateY)\n .scale(clampedScale)\n\n return transform\n }\n\n\n private _setNodeSelectionState (nodesToSelect: (GraphNode<N, L> | undefined)[]): void {\n const { config, datamodel } = this\n\n // Grey out all nodes and set us unselected\n for (const n of datamodel.nodes) {\n n._state.selected = false\n if (config.nodeSelectionHighlightMode !== GraphNodeSelectionHighlightMode.None) {\n n._state.greyout = true\n }\n }\n\n // Grey out all links and set us unselected\n for (const l of datamodel.links) {\n l._state.selected = false\n if (config.nodeSelectionHighlightMode !== GraphNodeSelectionHighlightMode.None) {\n l._state.greyout = true\n }\n }\n\n // Filter out non-existing nodes\n this._selectedNodes = nodesToSelect.filter(n => {\n const doesNodeExist = Boolean(n)\n if (!doesNodeExist) console.warn('Unovis | Graph: Select Node: Not found')\n\n return doesNodeExist\n })\n\n // Set provided nodes as selected and ungreyout\n for (const n of this._selectedNodes) {\n n._state.selected = true\n n._state.greyout = false\n }\n\n // Highlight connected links and nodes\n if (config.nodeSelectionHighlightMode === GraphNodeSelectionHighlightMode.GreyoutNonConnected) {\n const connectedLinks = datamodel.links.filter(l => this._selectedNodes.includes(l.source) || this._selectedNodes.includes(l.target))\n connectedLinks.forEach(l => {\n l.source._state.greyout = false\n l.target._state.greyout = false\n l._state.greyout = false\n })\n }\n }\n\n private _setLinkSelectionState (link: GraphLink<N, L>): void {\n const { datamodel: { nodes, links } } = this\n if (!link) console.warn('Unovis: Graph: Select Link: Not found')\n\n this._selectedLink = link\n const selectedLinkSource = link?.source as GraphNode<N, L>\n const selectedLinkTarget = link?.target as GraphNode<N, L>\n\n // Apply grey out\n nodes.forEach(n => {\n n._state.selected = false\n n._state.greyout = true\n if (selectedLinkTarget?._id === n._id || selectedLinkSource?._id === n._id) {\n link._state.greyout = false\n }\n })\n\n links.forEach(l => {\n l._state.greyout = true\n const source = l.source as GraphNode<N, L>\n const target = l.target as GraphNode<N, L>\n if ((source._id === selectedLinkSource?._id) && (target._id === selectedLinkTarget?._id)) {\n source._state.greyout = false\n target._state.greyout = false\n l._state.greyout = false\n }\n })\n\n links.forEach(l => {\n delete l._state.selected\n })\n\n if (link) link._state.selected = true\n }\n\n private _resetSelectionGreyoutState (): void {\n const { datamodel: { nodes, links } } = this\n this._selectedNodes = []\n this._selectedLink = undefined\n\n // Disable Greyout\n nodes.forEach(n => {\n delete n._state.selected\n delete n._state.greyout\n })\n\n links.forEach(l => {\n delete l._state.greyout\n delete l._state.selected\n })\n }\n\n private _updateNodesLinksPartial (): void {\n const { config } = this\n\n const linkElements = this._linksGroup.selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.gLink}`)\n linkElements.call(updateLinksPartial, config, this._scale)\n\n const nodeElements = this._nodesGroup.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.gNode}`)\n nodeElements.call(updateNodesPartial, config, config.duration, this._scale)\n }\n\n private _onBackgroundClick (): void {\n this._resetSelectionGreyoutState()\n this._updateNodesLinksPartial()\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private _onNodeClick (d: GraphNode<N, L>): void {\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private _onNodeMouseOut (d: GraphNode<N, L>): void {\n this._updateNodesLinksPartial()\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private _onNodeMouseOver (d: GraphNode<N, L>): void {\n this._updateNodesLinksPartial()\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private _onLinkClick (d: GraphLink<N, L>): void {\n }\n\n private _onLinkMouseOver (d: GraphLink<N, L>): void {\n if (this._isDragging) return\n\n if (this.config.linkHighlightOnHover) d._state.hovered = true\n this._updateNodesLinksPartial()\n }\n\n private _onLinkMouseOut (d: GraphLink<N, L>): void {\n if (this._isDragging) return\n\n delete d._state.hovered\n this._updateNodesLinksPartial()\n }\n\n private _onLinkFlowTimerFrame (elapsed = 0): void {\n const { config, datamodel: { links } } = this\n\n const hasLinksWithFlow = links.some((d, i) => getBoolean(d, config.linkFlow, i))\n if (!hasLinksWithFlow) return\n\n const linkElements = this._linksGroup.selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.gLink}`)\n const linksToAnimate = linkElements.filter(d => !d._state.greyout)\n linksToAnimate.each((l, i, els) => {\n let linkFlowAnimDuration = getNumber(l, config.linkFlowAnimDuration, l._indexGlobal)\n const linkFlowParticleSpeed = getNumber(l, config.linkFlowParticleSpeed, l._indexGlobal)\n\n // If particle speed is provided, calculate duration based on link length and speed\n if (linkFlowParticleSpeed) {\n const linkPathElement = els[i].querySelector<SVGPathElement>(`.${linkSelectors.linkSupport}`)\n const pathLength = linkPathElement ? (this._linkPathLengthMap.get(linkPathElement.getAttribute('d')) ?? linkPathElement.getTotalLength()) : 0\n if (pathLength > 0) linkFlowAnimDuration = (pathLength / linkFlowParticleSpeed) * 1000 // Convert to milliseconds\n }\n l._state.flowAnimTime = (elapsed % linkFlowAnimDuration) / linkFlowAnimDuration\n })\n animateLinkFlow(linksToAnimate, this.config, this._scale, this._linkPathLengthMap)\n }\n\n private _onZoom (t: ZoomTransform, event?: D3ZoomEvent<SVGGElement, unknown>): void {\n const { config, datamodel: { nodes } } = this\n const transform = t || event.transform\n this._scale = transform.k\n this._graphGroup.attr('transform', transform.toString())\n if (isFunction(config.onZoom)) config.onZoom(this._scale, config.zoomScaleExtent, event, transform)\n\n // console.warn('Unovis | Graph: Zoom: ', transform)\n if (!this._initialTransform) this._initialTransform = transform\n\n // If the event was triggered by a mouse interaction (pan or zoom) we don't\n // refit the layout after recalculation (e.g. on container resize)\n if (event?.sourceEvent) {\n const diff = Object.keys(transform).reduce((acc, prop) => {\n const propVal = transform[prop as keyof ZoomTransform] as number\n const initialPropVal = this._initialTransform[prop as keyof ZoomTransform] as number\n const dVal = Math.abs(propVal - initialPropVal)\n const scaledDVal = prop === 'k' ? 20 * dVal : dVal / 15\n acc += scaledDVal\n return acc\n }, 0)\n\n if (diff > config.layoutAutofitTolerance) this._isAutoFitDisabled = true\n else this._isAutoFitDisabled = false\n }\n\n this._nodesGroup.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.gNode}`)\n .call(\n (nodes.length > config.zoomThrottledUpdateNodeThreshold ? zoomNodesThrottled : zoomNodes) as typeof zoomNodes,\n config,\n this._scale\n )\n\n this._linksGroup.selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.gLink}`)\n .call(\n (nodes.length > config.zoomThrottledUpdateNodeThreshold ? zoomLinksThrottled : zoomLinks) as typeof zoomLinks,\n config,\n this._scale,\n this._getLinkArrowDefId\n )\n }\n\n private _onZoomStart (t: ZoomTransform, event?: D3ZoomEvent<SVGGElement, unknown>): void {\n const { config } = this\n const transform = t || event.transform\n this._scale = transform.k\n if (isFunction(config.onZoomStart)) config.onZoomStart(this._scale, config.zoomScaleExtent, event, transform)\n }\n\n private _onZoomEnd (t: ZoomTransform, event?: D3ZoomEvent<SVGGElement, unknown>): void {\n const { config } = this\n const transform = t || event.transform\n this._scale = transform.k\n if (isFunction(config.onZoomEnd)) config.onZoomEnd(this._scale, config.zoomScaleExtent, event, transform)\n }\n\n private _updateNodePosition (d: GraphNode<N, L>, x: number, y: number): void {\n const transform = zoomTransform(this.g.node())\n const scale = transform.k\n\n // Prevent the node from being dragged offscreen or outside its panel\n const panels = this._panels?.filter(p => p.nodes.includes(d._id)) ?? []\n const nodeSizeValue = getNodeSize(d, this.config.nodeSize, d._index)\n const maxY = min([(this._height - transform.y) / scale, ...panels.map(p => p._y + p._height)]) - nodeSizeValue / 2\n const maxX = min([(this._width - transform.x) / scale, ...panels.map(p => p._x + p._width)]) - nodeSizeValue / 2\n const minY = max([-transform.y / scale, ...panels.map(p => p._y)]) + nodeSizeValue / 2\n const minX = max([-transform.x / scale, ...panels.map(p => p._x)]) + nodeSizeValue / 2\n\n if (y < minY) y = minY\n else if (y > maxY) y = maxY\n if (x < minX) x = minX\n else if (x > maxX) x = maxX\n\n // Snap to Layout\n if (Math.sqrt(Math.pow(x - d.x, 2) + Math.pow(y - d.y, 2)) < 15) {\n x = d.x\n y = d.y\n }\n\n // Assign coordinates\n d._state.fx = x\n d._state.fy = y\n if (d._state.fx === d.x) delete d._state.fx\n if (d._state.fy === d.y) delete d._state.fy\n }\n\n private _onBrush (event: D3BrushEvent<SVGGElement>): void {\n if (!event.selection || !event.sourceEvent) return\n const { config } = this\n const transform = zoomTransform(this._graphGroup.node())\n const [xMin, yMin] = transform.invert(event.selection[0] as [number, number])\n const [xMax, yMax] = transform.invert(event.selection[1] as [number, number])\n\n // Update brushed nodes\n this._nodesGroup.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.gNode}`)\n .each(n => {\n const x = getX(n)\n const y = getY(n)\n n._state.brushed = x >= xMin && x <= xMax && y >= yMin && y <= yMax\n })\n .classed(nodeSelectors.brushed, n => n._state.brushed)\n\n const brushedNodes = this._nodesGroup.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.brushed}`)\n .call(updateNodesPartial, config, 0, this._scale)\n\n this._brush.classed('active', event.type !== 'end')\n config.onNodeSelectionBrush?.(brushedNodes.data(), event)\n }\n\n\n private _handleDrag (\n d: GraphNode<N, L>,\n event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>,\n nodeSelection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>\n ): void {\n if (event.sourceEvent.shiftKey && d._state.brushed) {\n this._dragSelectedNodes(event)\n } else if (!event.sourceEvent.shiftKey) {\n switch (event.type) {\n case 'start':\n this._onDragStarted(d, event, nodeSelection)\n break\n case 'drag':\n this._onDragged(d, event)\n break\n case 'end':\n this._onDragEnded(d, event, nodeSelection)\n break\n }\n }\n }\n\n private _onDragStarted (\n d: GraphNode<N, L>,\n event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>,\n nodeSelection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>\n ): void {\n const { config } = this\n this._isDragging = true\n d._state.isDragged = true\n nodeSelection.call(updateNodes, config, 0, this._scale)\n config.onNodeDragStart?.(d, event)\n }\n\n private _onDragged (\n d: GraphNode<N, L>,\n event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>\n ): void {\n const { config } = this\n const transform = zoomTransform(this.g.node())\n const scale = transform.k\n\n // Update node position\n const [x, y] = pointer(event, this._graphGroup.node())\n this._updateNodePosition(d, x, y)\n\n // Update affected DOM elements\n const nodeSelection = this._nodesGroup.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.gNode}`)\n const nodeToUpdate = nodeSelection.filter((n: GraphNode<N, L>) => n._id === d._id)\n nodeToUpdate.call(updateNodes, config, 0, scale)\n\n const linkSelection = this._linksGroup.selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.gLink}`)\n const linksToUpdate = linkSelection.filter((l: L) => {\n const source = l.source as GraphNode<N, L>\n const target = l.target as GraphNode<N, L>\n return source._id === d._id || target._id === d._id\n })\n linksToUpdate.call(updateLinks, config, 0, scale, this._getLinkArrowDefId, this._linkPathLengthMap)\n const linksToAnimate = linksToUpdate.filter(d => d._state.greyout)\n if (linksToAnimate.size()) animateLinkFlow(linksToAnimate, config, this._scale, this._linkPathLengthMap)\n\n config.onNodeDrag?.(d, event)\n }\n\n private _onDragEnded (\n d: GraphNode<N, L>,\n event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>,\n nodeSelection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>\n ): void {\n const { config } = this\n this._isDragging = false\n d._state.isDragged = false\n nodeSelection.call(updateNodes, config, 0, this._scale)\n config.onNodeDragEnd?.(d, event)\n }\n\n private _dragSelectedNodes (event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>): void {\n const { config } = this\n const curr = pointer(event, this._graphGroup.node())\n\n const selectedNodes = smartTransition(\n this._nodesGroup.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.brushed}`)\n ) as Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>\n\n if (event.type === 'start') {\n this._groupDragInit = curr\n this._isDragging = true\n selectedNodes.each(n => {\n n.x = getX(n)\n n.y = getY(n)\n n._state.isDragged = true\n })\n } else if (event.type === 'drag') {\n const dx = curr[0] - this._groupDragInit[0]\n const dy = curr[1] - this._groupDragInit[1]\n\n selectedNodes.each(n => this._updateNodePosition(n, n.x + dx, n.y + dy))\n\n const connectedLinks = smartTransition(\n this._linksGroup.selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.gLink}`)\n .filter(l => l.source?._state?.isDragged || l.target?._state?.isDragged)\n ) as Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown>\n\n connectedLinks.call(updateLinks, this.config, 0, this._scale, this._getLinkArrowDefId, this._linkPathLengthMap)\n } else {\n this._isDragging = false\n selectedNodes.each(n => { n._state.isDragged = false })\n }\n selectedNodes.call(updateNodes, config, 0, this._scale)\n this.config.onNodeSelectionDrag?.(selectedNodes.data(), event)\n }\n\n private _activateBrush (): void {\n this._brush.classed('active', true)\n this._nodesGroup.selectAll(`.${nodeSelectors.gNode}`)\n .classed(nodeSelectors.brushable, true)\n }\n\n private _clearBrush (): void {\n this._brush.classed('active', false).call(this._brushBehavior?.clear)\n\n this._nodesGroup.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.gNode}`)\n .classed(nodeSelectors.brushable, false)\n .classed(nodeSelectors.brushed, false)\n .each(n => { n._state.brushed = false })\n .call(updateNodesPartial, this.config, 0, this._scale)\n }\n\n private _shouldLayoutRecalculate (): boolean {\n const { prevConfig, config } = this\n if (prevConfig.layoutType !== config.layoutType) return true\n if (prevConfig.layoutNonConnectedAside !== config.layoutNonConnectedAside) return true\n\n if (prevConfig.layoutType === GraphLayoutType.Force) {\n const forceSettingsDiff = shallowDiff(prevConfig.forceLayoutSettings, config.forceLayoutSettings)\n if (Object.keys(forceSettingsDiff).length) return true\n }\n\n if (prevConfig.layoutType === GraphLayoutType.Dagre) {\n const dagreSettingsDiff = shallowDiff(prevConfig.dagreLayoutSettings, config.dagreLayoutSettings)\n if (Object.keys(dagreSettingsDiff).length) return true\n }\n\n if (prevConfig.layoutType === GraphLayoutType.Elk) {\n if (isPlainObject(prevConfig.layoutElkSettings) && isPlainObject(config.layoutElkSettings)) {\n // Do a deeper comparison if `config.layoutElkSettings` is an object\n const elkSettingsDiff = shallowDiff(\n prevConfig.layoutElkSettings as Record<string, string>,\n config.layoutElkSettings as Record<string, string>\n )\n return Boolean(Object.keys(elkSettingsDiff).length)\n } else {\n // Otherwise, do a simple `===` comparison\n return prevConfig.layoutElkSettings !== config.layoutElkSettings\n }\n }\n\n if (\n prevConfig.layoutType === GraphLayoutType.Parallel ||\n prevConfig.layoutType === GraphLayoutType.ParallelHorizontal ||\n prevConfig.layoutType === GraphLayoutType.Concentric\n ) {\n if (!isEqual(prevConfig.layoutGroupOrder, config.layoutGroupOrder)) return true\n if (prevConfig.layoutParallelNodesPerColumn !== config.layoutParallelNodesPerColumn) return true\n if (prevConfig.layoutParallelSortConnectionsByGroup !== config.layoutParallelSortConnectionsByGroup) return true\n }\n\n return false\n }\n\n private _getLinkArrowDefId (arrow: GraphLinkArrowStyle | undefined): string | null {\n return arrow ? `${this.uid}-${arrow}` : null\n }\n\n private _addSVGDefs (): void {\n // Clean up old defs\n this._defs.selectAll('*').remove()\n\n // Single Arrow\n this._defs.append('path').attr('d', getArrowPath())\n .attr('id', this._getLinkArrowDefId(GraphLinkArrowStyle.Single))\n\n // Double Arrow\n this._defs.append('path').attr('d', getDoubleArrowPath())\n .attr('id', this._getLinkArrowDefId(GraphLinkArrowStyle.Double))\n }\n\n public zoomIn (increment = 0.3): void {\n const scaleBy = 1 + increment\n smartTransition(this.g, this.config.duration / 2)\n .call(this._zoomBehavior.scaleBy, scaleBy)\n }\n\n public zoomOut (increment = 0.3): void {\n const scaleBy = 1 - increment\n smartTransition(this.g, this.config.duration / 2)\n .call(this._zoomBehavior.scaleBy, scaleBy)\n }\n\n public setZoom (zoomLevel: number): void {\n smartTransition(this.g, this.config.duration / 2)\n .call(this._zoomBehavior.scaleTo, zoomLevel)\n }\n\n public getZoom (): number {\n return zoomTransform(this.g.node()).k\n }\n\n public fitView (duration = this.config.duration, nodeIds?: (string | number)[]): void {\n this._layoutCalculationPromise?.then(() => {\n this._fit(duration, nodeIds)\n })\n }\n\n /** Enable automatic fitting to container if it was disabled due to previous zoom / pan interactions */\n public resetAutofitState (): void {\n this._isAutoFitDisabled = false\n }\n\n /** Get current coordinates of the nodes as an array of { id: string; x: number; y: number } objects */\n public getNodesCoordinates (): { id: string; x: number; y: number }[] {\n const { datamodel: { nodes } } = this\n return nodes.map(n => ({\n id: n._id,\n x: n.x,\n y: n.y,\n }))\n }\n\n /** Get node coordinates by id as { id: string; x: number; y: number } */\n public getNodeCoordinatesById (id: string): { id: string; x: number; y: number } | undefined {\n const { datamodel: { nodes } } = this\n const node = nodes.find(n => n._id === id)\n\n if (!node) {\n console.warn(`Unovis | Graph: Node ${id} not found`)\n return undefined\n } else {\n return {\n id: node._id,\n x: node.x,\n y: node.y,\n }\n }\n }\n\n /** Set the node state by id */\n public setNodeStateById (nodeId: string, state: GraphNode<N, L>['_state']): void {\n this.datamodel.setNodeStateById(nodeId, state)\n }\n\n /** Call a partial render to update the positions of the nodes and their links.\n * This can be useful when you've changed the node positions manually outside\n * of the component and want to update the graph.\n */\n public updateNodePositions (duration?: number): void {\n const { config } = this\n const animDuration = isNumber(duration) ? duration : config.duration\n\n const linkElements = this._linksGroup.selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.gLink}:not(.${linkSelectors.gLinkExit}`)\n updateLinkLines(linkElements, config, animDuration, this._scale, this._getLinkArrowDefId, this._linkPathLengthMap)\n\n const nodeElements = this._nodesGroup.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.gNode}:not(.${nodeSelectors.gNodeExit})`)\n updateNodePositions(nodeElements, animDuration)\n }\n}\n"],"names":["generalSelectors.background","generalSelectors.graphGroup","generalSelectors.brush","brush","panelSelectors.panels","linkSelectors.links","nodeSelectors.nodes","nodeSelectors.gNode","nodeSelectors.gNodeExit","linkSelectors.gLink","linkSelectors.gLinkExit","panelSelectors.gPanel","linkSelectors.linkSupport","nodeSelectors.brushed","nodeSelectors.brushable","generalSelectors.root","nodeSelectors.node","nodeSelectors.nodeGauge","nodeSelectors.sideLabelGroup","nodeSelectors.label","nodeSelectors.greyedOutNode","linkSelectors.link","linkSelectors.linkLabelGroup","linkSelectors.greyedOutLink","panelSelectors.panel","panelSelectors.panelSelection","panelSelectors.label","panelSelectors.labelText","panelSelectors.sideIconGroup","panelSelectors.sideIconShape","panelSelectors.sideIconSymbol","nodeSelectors"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAkDM,MAAO,KAGX,SAAQ,aAGP,CAAA;AA4FD,IAAA,WAAA,CAAa,MAAmC,EAAA;AAC9C,QAAA,KAAK,EAAE,CAAA;QAlEC,IAAc,CAAA,cAAA,GAAG,kBAA2D,CAAA;AAC/E,QAAA,IAAA,CAAA,MAAM,GAA+B,IAAI,CAAC,cAAc,CAAA;AAC/D,QAAA,IAAA,CAAA,SAAS,GAA2D,IAAI,cAAc,EAAE,CAAA;QAWhF,IAAc,CAAA,cAAA,GAAG,IAAI,CAAA;QAGrB,IAAwB,CAAA,wBAAA,GAAG,KAAK,CAAA;QAKhC,IAAgB,CAAA,gBAAA,GAAG,KAAK,CAAA;QAMxB,IAAkB,CAAA,kBAAA,GAAG,KAAK,CAAA;QAG1B,IAAW,CAAA,WAAA,GAAG,KAAK,CAAA;;AAKnB,QAAA,IAAA,CAAA,kBAAkB,GAAwB,IAAI,GAAG,EAAE,CAAA;AAE3D,QAAA,IAAA,CAAA,MAAM,GAAG;AACP,YAAA,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,GAAG;gBAC5B,KAAK,EAAE,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC;AAC1C,aAAA;AACD,YAAA,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG;gBACtB,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;gBACnC,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,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AEd,UAA2B;IACvC,UAAU,EAAED,UAA2B;IACvC,IAAI,EAAEO,KAAmB;IACzB,SAAS,EAAES,IAAkB;IAC7B,SAAS,EAAEC,SAAuB;IAClC,aAAa,EAAEC,cAA4B;IAC3C,SAAS,EAAEC,KAAmB;IAC9B,UAAU,EAAEC,aAA2B;IACvC,IAAI,EAAEX,KAAmB;IACzB,QAAQ,EAAEY,IAAkB;IAC5B,SAAS,EAAEC,cAA4B;IACvC,UAAU,EAAEC,aAA2B;IACvC,KAAK,EAAEZ,MAAqB;IAC5B,SAAS,EAAEa,KAAoB;IAC/B,cAAc,EAAEC,cAA6B;IAC7C,UAAU,EAAEC,OAAoB;IAChC,cAAc,EAAEC,SAAwB;IACxC,aAAa,EAAEC,aAA4B;IAC3C,kBAAkB,EAAEC,aAA4B;IAChD,mBAAmB,EAAEC,cAA6B;CACnD,CAAA;AAEM,KAAa,CAAA,aAAA,GAAGC,KAAa;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/graph/index.ts"],"sourcesContent":["import { min, max } from 'd3-array'\nimport { Transition } from 'd3-transition'\nimport { select, Selection, pointer } from 'd3-selection'\nimport { brush, BrushBehavior, D3BrushEvent } from 'd3-brush'\nimport { zoom, zoomTransform, zoomIdentity, ZoomTransform, D3ZoomEvent, ZoomBehavior } from 'd3-zoom'\nimport { drag, D3DragEvent } from 'd3-drag'\nimport { interval, Timer } from 'd3-timer'\n\n// Core\nimport { ComponentCore } from 'core/component'\nimport { GraphDataModel } from 'data-models/graph'\n\n// Types\nimport { GraphInputLink, GraphInputNode, GraphInputData } from 'types/graph'\nimport { Spacing } from 'types/spacing'\n\n// Utils\nimport { isNumber, clamp, shallowDiff, isFunction, getBoolean, isPlainObject, isEqual, getNumber } from 'utils/data'\nimport { smartTransition } from 'utils/d3'\n\n// Local Types\nimport {\n GraphNode,\n GraphLink,\n GraphLayoutType,\n GraphLinkArrowStyle,\n GraphPanel,\n GraphNodeSelectionHighlightMode,\n GraphFitViewAlignment,\n} from './types'\n\n// Config\nimport { GraphDefaultConfig, GraphConfigInterface } from './config'\n\n// Styles\nimport * as generalSelectors from './style'\nimport * as nodeSelectors from './modules/node/style'\nimport * as linkSelectors from './modules/link/style'\nimport * as panelSelectors from './modules/panel/style'\n\n// Modules\nimport { createNodes, updateNodes, removeNodes, zoomNodesThrottled, zoomNodes, updateNodesPartial, updateNodePositions } from './modules/node'\nimport { getMaxNodeSize, getNodeSize, getX, getY } from './modules/node/helper'\nimport {\n createLinks,\n updateLinks,\n removeLinks,\n zoomLinksThrottled,\n zoomLinks,\n animateLinkFlow,\n updateLinksPartial,\n updateLinkLines,\n} from './modules/link'\nimport { getDoubleArrowPath, getArrowPath } from './modules/link/helper'\nimport { createPanels, updatePanels, removePanels } from './modules/panel'\nimport { setPanelForNodes, updatePanelBBoxSize, updatePanelNumNodes, initPanels } from './modules/panel/helper'\nimport { applyLayoutCircular, applyLayoutParallel, applyLayoutDagre, applyLayoutConcentric, applyLayoutForce, applyELKLayout } from './modules/layout'\n\nexport class Graph<\n N extends GraphInputNode,\n L extends GraphInputLink,\n> extends ComponentCore<\n GraphInputData<N, L>,\n GraphConfigInterface<N, L>\n > {\n static selectors = {\n root: generalSelectors.root,\n graphGroup: generalSelectors.graphGroup,\n background: generalSelectors.background,\n node: nodeSelectors.gNode,\n nodeShape: nodeSelectors.node,\n nodeGauge: nodeSelectors.nodeGauge,\n nodeSideLabel: nodeSelectors.sideLabelGroup,\n nodeLabel: nodeSelectors.label,\n dimmedNode: nodeSelectors.greyedOutNode,\n link: linkSelectors.gLink,\n linkLine: linkSelectors.link,\n linkLabel: linkSelectors.linkLabelGroup,\n dimmedLink: linkSelectors.greyedOutLink,\n panel: panelSelectors.gPanel,\n panelRect: panelSelectors.panel,\n panelSelection: panelSelectors.panelSelection,\n panelLabel: panelSelectors.label,\n panelLabelText: panelSelectors.labelText,\n panelSideIcon: panelSelectors.sideIconGroup,\n panelSideIconShape: panelSelectors.sideIconShape,\n panelSideIconSymbol: panelSelectors.sideIconSymbol,\n }\n\n static nodeSelectors = nodeSelectors\n g: Selection<SVGGElement, unknown, null, undefined>\n protected _defaultConfig = GraphDefaultConfig as unknown as GraphConfigInterface<N, L>\n public config: GraphConfigInterface<N, L> = this._defaultConfig\n datamodel: GraphDataModel<N, L, GraphNode<N, L>, GraphLink<N, L>> = new GraphDataModel()\n private _selectedNodes: GraphNode<N, L>[]\n private _selectedLink: GraphLink<N, L>\n\n private _graphGroup: Selection<SVGGElement, unknown, null, undefined>\n private _panelsGroup: Selection<SVGGElement, unknown, null, undefined>\n private _linksGroup: Selection<SVGGElement, unknown, null, undefined>\n private _nodesGroup: Selection<SVGGElement, unknown, null, undefined>\n private _brush: Selection<SVGGElement, unknown, null, unknown>\n private _timer: Timer\n\n private _isFirstRender = true\n private _prevWidth: number\n private _prevHeight: number\n private _shouldRecalculateLayout = false\n private _currentLayoutType: GraphLayoutType | undefined\n private _layoutCalculationPromise: Promise<void> | undefined\n\n private _shouldFitLayout: boolean\n private _shouldSetPanels = false\n private _panels: GraphPanel[]\n\n private _defs: Selection<SVGDefsElement, unknown, SVGGElement, undefined>\n private _backgroundRect: Selection<SVGRectElement, unknown, SVGGElement, undefined>\n private _zoomBehavior: ZoomBehavior<SVGGElement, unknown>\n private _isAutoFitDisabled = false\n private _scale: number\n private _initialTransform: ZoomTransform\n private _isDragging = false\n private _brushBehavior: BrushBehavior<unknown>\n private _groupDragInit: [number, number]\n\n // A map for storing link total path lengths to optimize rendering performance\n private _linkPathLengthMap: Map<string, number> = new Map()\n\n events = {\n [Graph.selectors.background]: {\n click: this._onBackgroundClick.bind(this),\n },\n [Graph.selectors.node]: {\n click: this._onNodeClick.bind(this),\n mouseover: this._onNodeMouseOver.bind(this),\n mouseout: this._onNodeMouseOut.bind(this),\n },\n [Graph.selectors.link]: {\n click: this._onLinkClick.bind(this),\n mouseover: this._onLinkMouseOver.bind(this),\n mouseout: this._onLinkMouseOut.bind(this),\n },\n }\n\n public get selectedNode (): GraphNode<N, L> {\n return this._selectedNodes?.[0]\n }\n\n public get selectedNodes (): GraphNode<N, L>[] {\n return this._selectedNodes\n }\n\n public get selectedLink (): GraphLink<N, L> {\n return this._selectedLink\n }\n\n constructor (config?: GraphConfigInterface<N, L>) {\n super()\n if (config) this.setConfig(config)\n\n this._backgroundRect = this.g.append('rect').attr('class', generalSelectors.background)\n this._graphGroup = this.g.append('g').attr('class', generalSelectors.graphGroup)\n this._brush = this.g.append('g').attr('class', generalSelectors.brush)\n\n this._zoomBehavior = zoom<SVGGElement, unknown>()\n .scaleExtent(this.config.zoomScaleExtent)\n .on('zoom', (e: D3ZoomEvent<SVGGElement, unknown>) => this._onZoom(e.transform, e))\n .on('start', (e: D3ZoomEvent<SVGGElement, unknown>) => this._onZoomStart(e.transform, e))\n .on('end', (e: D3ZoomEvent<SVGGElement, unknown>) => this._onZoomEnd(e.transform, e))\n\n this._brushBehavior = brush()\n .on('start brush end', this._onBrush.bind(this))\n .filter(event => event.shiftKey)\n .keyModifiers(false)\n\n this._panelsGroup = this._graphGroup.append('g').attr('class', panelSelectors.panels)\n this._linksGroup = this._graphGroup.append('g').attr('class', linkSelectors.links)\n this._nodesGroup = this._graphGroup.append('g').attr('class', nodeSelectors.nodes)\n\n this._defs = this._graphGroup.append('defs')\n\n this._getLinkArrowDefId = this._getLinkArrowDefId.bind(this)\n }\n\n setData (data: GraphInputData<N, L>): void {\n const { config } = this\n if (!config.shouldDataUpdate(this.datamodel.data, data, this.datamodel)) return\n\n this.datamodel.nodeSort = config.nodeSort\n this.datamodel.data = data\n this._shouldRecalculateLayout = true\n if (config.layoutAutofit) this._shouldFitLayout = true\n this._shouldSetPanels = true\n\n this._addSVGDefs()\n }\n\n setConfig (config: GraphConfigInterface<N, L>): void {\n super.setConfig(config)\n const hasLayoutConfigurationChanged = this._shouldLayoutRecalculate()\n\n // If the data has changed (see above in `setData`) or the layout configuration has changed, we need to recalculate the layout\n this._shouldRecalculateLayout = this._shouldRecalculateLayout || hasLayoutConfigurationChanged\n\n // If the `config.layoutAutofit` is true and data has changed (see above in `setData`),\n // or the layout configuration has changed, we need to fit the layout\n this._shouldFitLayout = this._shouldFitLayout || hasLayoutConfigurationChanged\n\n if (this._shouldFitLayout) this._isAutoFitDisabled = false\n this._shouldSetPanels = true\n }\n\n get bleed (): Spacing {\n const padding = this.config.fitViewPadding // Extra padding to take into account labels and selection outlines\n return isNumber(padding)\n ? { top: padding, bottom: padding, left: padding, right: padding }\n : padding\n }\n\n _render (customDuration?: number): void {\n const { config: { disableBrush, disableZoom, duration, layoutAutofit, zoomEventFilter }, datamodel } = this\n if (!datamodel.nodes && !datamodel.links) return\n const animDuration = isNumber(customDuration) ? customDuration : duration\n\n this._backgroundRect\n .attr('width', this._width)\n .attr('height', this._height)\n .attr('opacity', 0)\n\n if ((this._prevWidth !== this._width || this._prevHeight !== this._height) && layoutAutofit) {\n // Fit layout on resize\n this._shouldFitLayout = true\n this._prevWidth = this._width\n this._prevHeight = this._height\n }\n\n // Handle brush behavior\n if (!disableBrush) {\n this._brushBehavior.extent([[0, 0], [this._width, this._height]])\n this._brush.call(this._brushBehavior)\n\n // Activate the brush when the shift key is pressed\n select(window)\n .on('keydown.unovis-graph', e => e.key === 'Shift' && this._activateBrush())\n .on('keyup.unovis-graph', e => e.key === 'Shift' && this._clearBrush())\n\n this._zoomBehavior.filter(event => !event.shiftKey)\n } else {\n this._brush.on('.brush', null)\n\n select(window)\n .on('keydown.unovis-graph', null)\n .on('keyup.unovis-graph', null)\n\n // Clear brush in case it was disabled in an active state\n if (this._brush.classed('active')) this._clearBrush()\n }\n\n // Apply layout and render\n if (this._shouldRecalculateLayout || !this._layoutCalculationPromise) {\n this._layoutCalculationPromise = this._calculateLayout()\n\n // Call `onLayoutCalculated` after the layout calculation is done and the `this._layoutCalculationPromise`\n // variable is set because the `fitView` function relies on the promise to be initialized\n this._layoutCalculationPromise.then(() => {\n this.config.onLayoutCalculated?.(datamodel.nodes, datamodel.links)\n })\n }\n\n // Redefining Zoom Behavior filter to the one specified in the config,\n // or to the default one supporting `shiftKey` for node brushing\n // See more: https://d3js.org/d3-zoom#zoom_filter\n this._zoomBehavior.filter(\n isFunction(zoomEventFilter)\n ? zoomEventFilter\n : (e: PointerEvent) => (!e.ctrlKey || e.type === 'wheel') && !e.button && !e.shiftKey) // Default filter\n\n this._layoutCalculationPromise.then(() => {\n // If the component has been destroyed while the layout calculation\n // was in progress, we cancel the render\n if (this.isDestroyed()) return\n\n this._initPanelsData()\n\n // Fit the view\n if (this._isFirstRender) {\n this._fit()\n this._shouldFitLayout = false\n } else if (this._shouldFitLayout && !this._isAutoFitDisabled) {\n this._fit(duration)\n this._shouldFitLayout = false\n }\n\n // Update Nodes and Links Selection State\n this._resetSelectionGreyoutState()\n if (this.config.selectedNodeId || this.config.selectedNodeIds) {\n const selectedIds = this.config.selectedNodeIds ?? [this.config.selectedNodeId]\n const selectedNodes = selectedIds.map(id => datamodel.getNodeById(id))\n this._setNodeSelectionState(selectedNodes)\n }\n\n if (this.config.selectedLinkId) {\n const selectedLink = datamodel.links.find(link => link.id === this.config.selectedLinkId)\n this._setLinkSelectionState(selectedLink)\n }\n\n // Draw\n this._drawNodes(animDuration)\n this._drawLinks(animDuration)\n\n // Link flow animation timer\n if (!this._timer) {\n const refreshRateMs = 35\n this._timer = interval(this._onLinkFlowTimerFrame.bind(this), refreshRateMs)\n }\n\n // Zoom\n if (disableZoom) this.g.on('.zoom', null)\n else this.g.call(this._zoomBehavior).on('dblclick.zoom', null)\n\n // We need to set up events and attributes again because the rendering might have been delayed by the layout\n // calculation and they were not set up properly (see the render function of `ComponentCore`)\n this._setUpComponentEventsThrottled()\n this._setCustomAttributesThrottled()\n\n // On render complete callback\n this.config.onRenderComplete?.(this.g, datamodel.nodes, datamodel.links, this.config, animDuration, this._scale, this._containerWidth, this._containerHeight)\n this._isFirstRender = false\n })\n }\n\n private _drawNodes (duration: number): void {\n const { config, datamodel } = this\n\n const nodes: GraphNode<N, L>[] = datamodel.nodes\n const nodeGroups = this._nodesGroup\n .selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.gNode}:not(.${nodeSelectors.gNodeExit})`)\n .data(nodes, d => String(d._id))\n\n const nodeGroupsEnter = nodeGroups.enter().append('g')\n .attr('class', nodeSelectors.gNode)\n .call(createNodes, config, duration, this._scale)\n\n const nodeGroupsMerged = nodeGroups.merge(nodeGroupsEnter)\n const nodeUpdateSelection = updateNodes(nodeGroupsMerged, config, duration, this._scale)\n\n this._drawPanels(nodeUpdateSelection, duration)\n\n const nodesGroupExit = nodeGroups.exit<GraphNode<N, L>>()\n nodesGroupExit\n .classed(nodeSelectors.gNodeExit, true)\n .call(removeNodes, config, duration, this._scale)\n\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const thisRef = this\n if (!config.disableDrag) {\n const dragBehaviour = drag<SVGGElement, GraphNode<N, L>>()\n .on('start drag end', function (event, d) {\n thisRef._handleDrag(d, event, select(this))\n })\n nodeGroupsMerged.call(dragBehaviour)\n } else {\n nodeGroupsMerged.on('.drag', null)\n }\n }\n\n private _drawLinks (duration: number): void {\n const { config, datamodel: { links } } = this\n\n const linkGroups = this._linksGroup\n .selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.gLink}:not(.${linkSelectors.gLinkExit}`)\n .data(links, (d: GraphLink<N, L>) => String(d._id))\n\n const linkGroupsEnter = linkGroups.enter().append('g')\n .attr('class', linkSelectors.gLink)\n .call(createLinks, config, duration)\n\n const linkGroupsMerged = linkGroups.merge(linkGroupsEnter)\n linkGroupsMerged.call(updateLinks, config, duration, this._scale, this._getLinkArrowDefId, this._linkPathLengthMap)\n\n const linkGroupsExit = linkGroups.exit<GraphLink<N, L>>()\n linkGroupsExit\n .attr('class', linkSelectors.gLinkExit)\n .call(removeLinks, config, duration)\n }\n\n private _drawPanels (\n nodeUpdateSelection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown> | Transition<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>,\n duration: number\n ): void {\n const { config } = this\n smartTransition(this._panelsGroup, duration / 2)\n .style('opacity', config.panels?.length ? 1 : 0)\n\n if (!this._panels) return\n\n const selection = ((nodeUpdateSelection as Transition<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>).duration)\n ? (nodeUpdateSelection as Transition<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>).selection()\n : nodeUpdateSelection as Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>\n\n updatePanelNumNodes(selection, this._panels, config)\n updatePanelBBoxSize(selection, this._panels, config)\n const panelData = this._panels.filter(p => p._numNodes)\n const panelGroup = this._panelsGroup\n .selectAll<SVGGElement, GraphPanel>(`.${panelSelectors.gPanel}`)\n .data(panelData, p => p.label)\n\n const panelGroupExit = panelGroup.exit<GraphPanel<N, L>>()\n panelGroupExit.call(removePanels, config, duration)\n\n const panelGroupEnter = panelGroup.enter().append('g')\n .attr('class', panelSelectors.gPanel)\n .call(createPanels, selection)\n const panelGroupMerged = panelGroup.merge(panelGroupEnter)\n\n this._updatePanels(panelGroupMerged, duration)\n }\n\n private _updatePanels (panelToUpdate: Selection<SVGGElement, GraphPanel, SVGGElement, unknown>, duration: number): void {\n const { config } = this\n if (!this._panels) return\n\n panelToUpdate.call(updatePanels, config, duration)\n }\n\n private async _calculateLayout (): Promise<void> {\n const { config, datamodel } = this\n\n // If the layout type has changed, we need to reset the node positions if they were fixed before\n if (this._currentLayoutType !== config.layoutType) {\n for (const node of datamodel.nodes) {\n delete node._state.fx\n delete node._state.fy\n }\n }\n\n switch (config.layoutType) {\n case GraphLayoutType.Precalculated:\n break\n case GraphLayoutType.Parallel:\n applyLayoutParallel(datamodel, config, this._width, this._height)\n break\n case GraphLayoutType.ParallelHorizontal:\n applyLayoutParallel(datamodel, config, this._width, this._height, 'horizontal')\n break\n case GraphLayoutType.Dagre:\n await applyLayoutDagre(datamodel, config, this._width)\n break\n case GraphLayoutType.Force:\n await applyLayoutForce(datamodel, config, this._width)\n break\n case GraphLayoutType.Concentric:\n applyLayoutConcentric(datamodel, config, this._width, this._height)\n break\n case GraphLayoutType.Elk:\n await applyELKLayout(datamodel, config, this._width)\n break\n case GraphLayoutType.Circular:\n default:\n applyLayoutCircular(datamodel, config, this._width, this._height)\n break\n }\n\n // We need to update the panels data right after the layout calculation\n // because we want to have the latest coordinates before calling `onLayoutCalculated`\n this._initPanelsData()\n\n this._shouldRecalculateLayout = false\n this._currentLayoutType = config.layoutType as GraphLayoutType\n }\n\n private _initPanelsData (): void {\n const { config, datamodel } = this\n\n if (this._shouldSetPanels) {\n this._panels = initPanels(config.panels)\n setPanelForNodes(this._panels, datamodel.nodes, this.config)\n this._shouldSetPanels = false\n }\n }\n\n private _fit (duration = 0, nodeIds?: (string | number)[], alignment = this.config.fitViewAlign): void {\n const { datamodel: { nodes } } = this\n const fitViewNodes = nodeIds?.length ? nodes.filter(n => nodeIds.includes(n.id)) : nodes\n const transform = this._getTransform(fitViewNodes, alignment)\n smartTransition(this.g, duration)\n .call(this._zoomBehavior.transform, transform)\n this._onZoom(transform)\n }\n\n private _getTransform (nodes: GraphNode<N, L>[], alignment: GraphFitViewAlignment): ZoomTransform {\n const { nodeSize, zoomScaleExtent } = this.config\n const { left, top, right, bottom } = this.bleed\n\n const maxNodeSize = getMaxNodeSize(nodes, nodeSize)\n const w = this._width\n const h = this._height\n\n const xExtent = [\n min(nodes, d => getX(d) - maxNodeSize / 2 - (max((d._panels || []).map(p => p._padding.left)) || 0)),\n max(nodes, d => getX(d) + maxNodeSize / 2 + (max((d._panels || []).map(p => p._padding.right)) || 0)),\n ]\n const yExtent = [\n min(nodes, d => getY(d) - maxNodeSize / 2 - (max((d._panels || []).map(p => p._padding.top)) || 0)),\n max(nodes, d => getY(d) + maxNodeSize / 2 + (max((d._panels || []).map(p => p._padding.bottom)) || 0)),\n ]\n\n if (xExtent.some(item => item === undefined) || yExtent.some(item => item === undefined)) {\n console.warn('Unovis | Graph: Some of the node coordinates are undefined. This can happen if you try to fit the graph before the layout has been calculated.')\n return zoomIdentity\n }\n\n const xScale = w / (xExtent[1] - xExtent[0] + (left || 0) + (right || 0))\n const yScale = h / (yExtent[1] - yExtent[0] + (top || 0) + (bottom || 0))\n\n const clampedScale = clamp(min([xScale, yScale]), zoomScaleExtent[0], zoomScaleExtent[1])\n\n // Calculate translation based on alignment\n let translateX: number\n let translateY: number\n\n switch (alignment) {\n case GraphFitViewAlignment.Left:\n translateX = left - xExtent[0] * clampedScale\n translateY = this._height / 2 - (yExtent[0] + (yExtent[1] - yExtent[0]) / 2) * clampedScale\n break\n case GraphFitViewAlignment.Right:\n translateX = this._width - (xExtent[1] - xExtent[0]) * clampedScale - right\n translateY = this._height / 2 - (yExtent[0] + (yExtent[1] - yExtent[0]) / 2) * clampedScale\n break\n case GraphFitViewAlignment.Top:\n translateX = this._width / 2 - (xExtent[0] + (xExtent[1] - xExtent[0]) / 2) * clampedScale\n translateY = top - yExtent[0] * clampedScale\n break\n case GraphFitViewAlignment.Bottom:\n translateX = this._width / 2 - (xExtent[0] + (xExtent[1] - xExtent[0]) / 2) * clampedScale\n translateY = this._height - (yExtent[1] - yExtent[0]) * clampedScale - bottom\n break\n case GraphFitViewAlignment.Center:\n default:\n translateX = this._width / 2 - (xExtent[0] + (xExtent[1] - xExtent[0]) / 2) * clampedScale\n translateY = this._height / 2 - (yExtent[0] + (yExtent[1] - yExtent[0]) / 2) * clampedScale\n }\n\n const transform = zoomIdentity\n .translate(translateX, translateY)\n .scale(clampedScale)\n\n return transform\n }\n\n private _setNodeSelectionState (nodesToSelect: (GraphNode<N, L> | undefined)[]): void {\n const { config, datamodel } = this\n\n // Grey out all nodes and set us unselected\n for (const n of datamodel.nodes) {\n n._state.selected = false\n if (config.nodeSelectionHighlightMode !== GraphNodeSelectionHighlightMode.None) {\n n._state.greyout = true\n }\n }\n\n // Grey out all links and set us unselected\n for (const l of datamodel.links) {\n l._state.selected = false\n if (config.nodeSelectionHighlightMode !== GraphNodeSelectionHighlightMode.None) {\n l._state.greyout = true\n }\n }\n\n // Filter out non-existing nodes\n this._selectedNodes = nodesToSelect.filter(n => {\n const doesNodeExist = Boolean(n)\n if (!doesNodeExist) console.warn('Unovis | Graph: Select Node: Not found')\n\n return doesNodeExist\n })\n\n // Set provided nodes as selected and ungreyout\n for (const n of this._selectedNodes) {\n n._state.selected = true\n n._state.greyout = false\n }\n\n // Highlight connected links and nodes\n if (config.nodeSelectionHighlightMode === GraphNodeSelectionHighlightMode.GreyoutNonConnected) {\n const connectedLinks = datamodel.links.filter(l => this._selectedNodes.includes(l.source) || this._selectedNodes.includes(l.target))\n connectedLinks.forEach(l => {\n l.source._state.greyout = false\n l.target._state.greyout = false\n l._state.greyout = false\n })\n }\n }\n\n private _setLinkSelectionState (link: GraphLink<N, L>): void {\n const { datamodel: { nodes, links } } = this\n if (!link) console.warn('Unovis: Graph: Select Link: Not found')\n\n this._selectedLink = link\n const selectedLinkSource = link?.source as GraphNode<N, L>\n const selectedLinkTarget = link?.target as GraphNode<N, L>\n\n // Apply grey out\n nodes.forEach(n => {\n n._state.selected = false\n n._state.greyout = true\n if (selectedLinkTarget?._id === n._id || selectedLinkSource?._id === n._id) {\n link._state.greyout = false\n }\n })\n\n links.forEach(l => {\n l._state.greyout = true\n const source = l.source as GraphNode<N, L>\n const target = l.target as GraphNode<N, L>\n if ((source._id === selectedLinkSource?._id) && (target._id === selectedLinkTarget?._id)) {\n source._state.greyout = false\n target._state.greyout = false\n l._state.greyout = false\n }\n })\n\n links.forEach(l => {\n delete l._state.selected\n })\n\n if (link) link._state.selected = true\n }\n\n private _resetSelectionGreyoutState (): void {\n const { datamodel: { nodes, links } } = this\n this._selectedNodes = []\n this._selectedLink = undefined\n\n // Disable Greyout\n nodes.forEach(n => {\n delete n._state.selected\n delete n._state.greyout\n })\n\n links.forEach(l => {\n delete l._state.greyout\n delete l._state.selected\n })\n }\n\n private _updateNodesLinksPartial (): void {\n const { config } = this\n\n const linkElements = this._linksGroup.selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.gLink}`)\n linkElements.call(updateLinksPartial, config, this._scale)\n\n const nodeElements = this._nodesGroup.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.gNode}`)\n nodeElements.call(updateNodesPartial, config, config.duration, this._scale)\n }\n\n private _onBackgroundClick (): void {\n this._resetSelectionGreyoutState()\n this._updateNodesLinksPartial()\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private _onNodeClick (d: GraphNode<N, L>): void {\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private _onNodeMouseOut (d: GraphNode<N, L>): void {\n this._updateNodesLinksPartial()\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private _onNodeMouseOver (d: GraphNode<N, L>): void {\n this._updateNodesLinksPartial()\n }\n\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n private _onLinkClick (d: GraphLink<N, L>): void {\n }\n\n private _onLinkMouseOver (d: GraphLink<N, L>): void {\n if (this._isDragging) return\n\n if (this.config.linkHighlightOnHover) d._state.hovered = true\n this._updateNodesLinksPartial()\n }\n\n private _onLinkMouseOut (d: GraphLink<N, L>): void {\n if (this._isDragging) return\n\n delete d._state.hovered\n this._updateNodesLinksPartial()\n }\n\n private _onLinkFlowTimerFrame (elapsed = 0): void {\n const { config, datamodel: { links } } = this\n\n const hasLinksWithFlow = links.some((d, i) => getBoolean(d, config.linkFlow, i))\n if (!hasLinksWithFlow) return\n\n const linkElements = this._linksGroup.selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.gLink}`)\n const linksToAnimate = linkElements.filter(d => !d._state.greyout)\n linksToAnimate.each((l, i, els) => {\n let linkFlowAnimDuration = getNumber(l, config.linkFlowAnimDuration, l._indexGlobal)\n const linkFlowParticleSpeed = getNumber(l, config.linkFlowParticleSpeed, l._indexGlobal)\n\n // If particle speed is provided, calculate duration based on link length and speed\n if (linkFlowParticleSpeed) {\n const linkPathElement = els[i].querySelector<SVGPathElement>(`.${linkSelectors.linkSupport}`)\n const pathLength = linkPathElement ? (this._linkPathLengthMap.get(linkPathElement.getAttribute('d')) ?? linkPathElement.getTotalLength()) : 0\n if (pathLength > 0) linkFlowAnimDuration = (pathLength / linkFlowParticleSpeed) * 1000 // Convert to milliseconds\n }\n l._state.flowAnimTime = (elapsed % linkFlowAnimDuration) / linkFlowAnimDuration\n })\n animateLinkFlow(linksToAnimate, this.config, this._scale, this._linkPathLengthMap)\n }\n\n private _onZoom (t: ZoomTransform, event?: D3ZoomEvent<SVGGElement, unknown>): void {\n const { config, datamodel: { nodes } } = this\n const transform = t || event.transform\n this._scale = transform.k\n this._graphGroup.attr('transform', transform.toString())\n if (isFunction(config.onZoom)) config.onZoom(this._scale, config.zoomScaleExtent, event, transform)\n\n // console.warn('Unovis | Graph: Zoom: ', transform)\n if (!this._initialTransform) this._initialTransform = transform\n\n // If the event was triggered by a mouse interaction (pan or zoom) we don't\n // refit the layout after recalculation (e.g. on container resize)\n if (event?.sourceEvent) {\n const diff = Object.keys(transform).reduce((acc, prop) => {\n const propVal = transform[prop as keyof ZoomTransform] as number\n const initialPropVal = this._initialTransform[prop as keyof ZoomTransform] as number\n const dVal = Math.abs(propVal - initialPropVal)\n const scaledDVal = prop === 'k' ? 20 * dVal : dVal / 15\n acc += scaledDVal\n return acc\n }, 0)\n\n if (diff > config.layoutAutofitTolerance) this._isAutoFitDisabled = true\n else this._isAutoFitDisabled = false\n }\n\n this._nodesGroup.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.gNode}`)\n .call(\n (nodes.length > config.zoomThrottledUpdateNodeThreshold ? zoomNodesThrottled : zoomNodes) as typeof zoomNodes,\n config,\n this._scale\n )\n\n this._linksGroup.selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.gLink}`)\n .call(\n (nodes.length > config.zoomThrottledUpdateNodeThreshold ? zoomLinksThrottled : zoomLinks) as typeof zoomLinks,\n config,\n this._scale,\n this._getLinkArrowDefId\n )\n }\n\n private _onZoomStart (t: ZoomTransform, event?: D3ZoomEvent<SVGGElement, unknown>): void {\n const { config } = this\n const transform = t || event.transform\n this._scale = transform.k\n if (isFunction(config.onZoomStart)) config.onZoomStart(this._scale, config.zoomScaleExtent, event, transform)\n }\n\n private _onZoomEnd (t: ZoomTransform, event?: D3ZoomEvent<SVGGElement, unknown>): void {\n const { config } = this\n const transform = t || event.transform\n this._scale = transform.k\n if (isFunction(config.onZoomEnd)) config.onZoomEnd(this._scale, config.zoomScaleExtent, event, transform)\n }\n\n private _updateNodePosition (d: GraphNode<N, L>, x: number, y: number): void {\n const transform = zoomTransform(this.g.node())\n const scale = transform.k\n\n // Prevent the node from being dragged offscreen or outside its panel\n const panels = this._panels?.filter(p => p.nodes.includes(d._id)) ?? []\n const nodeSizeValue = getNodeSize(d, this.config.nodeSize, d._index)\n const maxY = min([(this._height - transform.y) / scale, ...panels.map(p => p._y + p._height)]) - nodeSizeValue / 2\n const maxX = min([(this._width - transform.x) / scale, ...panels.map(p => p._x + p._width)]) - nodeSizeValue / 2\n const minY = max([-transform.y / scale, ...panels.map(p => p._y)]) + nodeSizeValue / 2\n const minX = max([-transform.x / scale, ...panels.map(p => p._x)]) + nodeSizeValue / 2\n\n if (y < minY) y = minY\n else if (y > maxY) y = maxY\n if (x < minX) x = minX\n else if (x > maxX) x = maxX\n\n // Snap to Layout\n if (Math.sqrt(Math.pow(x - d.x, 2) + Math.pow(y - d.y, 2)) < 15) {\n x = d.x\n y = d.y\n }\n\n // Assign coordinates\n d._state.fx = x\n d._state.fy = y\n if (d._state.fx === d.x) delete d._state.fx\n if (d._state.fy === d.y) delete d._state.fy\n }\n\n private _onBrush (event: D3BrushEvent<SVGGElement>): void {\n if (!event.selection || !event.sourceEvent) return\n const { config } = this\n const transform = zoomTransform(this._graphGroup.node())\n const [xMin, yMin] = transform.invert(event.selection[0] as [number, number])\n const [xMax, yMax] = transform.invert(event.selection[1] as [number, number])\n\n // Update brushed nodes\n this._nodesGroup.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.gNode}`)\n .each(n => {\n const x = getX(n)\n const y = getY(n)\n n._state.brushed = x >= xMin && x <= xMax && y >= yMin && y <= yMax\n })\n .classed(nodeSelectors.brushed, n => n._state.brushed)\n\n const brushedNodes = this._nodesGroup.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.brushed}`)\n .call(updateNodesPartial, config, 0, this._scale)\n\n this._brush.classed('active', event.type !== 'end')\n config.onNodeSelectionBrush?.(brushedNodes.data(), event)\n }\n\n\n private _handleDrag (\n d: GraphNode<N, L>,\n event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>,\n nodeSelection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>\n ): void {\n if (event.sourceEvent.shiftKey && d._state.brushed) {\n this._dragSelectedNodes(event)\n } else if (!event.sourceEvent.shiftKey) {\n switch (event.type) {\n case 'start':\n this._onDragStarted(d, event, nodeSelection)\n break\n case 'drag':\n this._onDragged(d, event)\n break\n case 'end':\n this._onDragEnded(d, event, nodeSelection)\n break\n }\n }\n }\n\n private _onDragStarted (\n d: GraphNode<N, L>,\n event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>,\n nodeSelection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>\n ): void {\n const { config } = this\n this._isDragging = true\n d._state.isDragged = true\n nodeSelection.call(updateNodes, config, 0, this._scale)\n config.onNodeDragStart?.(d, event)\n }\n\n private _onDragged (\n d: GraphNode<N, L>,\n event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>\n ): void {\n const { config } = this\n const transform = zoomTransform(this.g.node())\n const scale = transform.k\n\n // Update node position\n const [x, y] = pointer(event, this._graphGroup.node())\n this._updateNodePosition(d, x, y)\n\n // Update affected DOM elements\n const nodeSelection = this._nodesGroup.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.gNode}`)\n const nodeToUpdate = nodeSelection.filter((n: GraphNode<N, L>) => n._id === d._id)\n nodeToUpdate.call(updateNodes, config, 0, scale)\n\n const linkSelection = this._linksGroup.selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.gLink}`)\n const linksToUpdate = linkSelection.filter((l: L) => {\n const source = l.source as GraphNode<N, L>\n const target = l.target as GraphNode<N, L>\n return source._id === d._id || target._id === d._id\n })\n linksToUpdate.call(updateLinks, config, 0, scale, this._getLinkArrowDefId, this._linkPathLengthMap)\n const linksToAnimate = linksToUpdate.filter(d => d._state.greyout)\n if (linksToAnimate.size()) animateLinkFlow(linksToAnimate, config, this._scale, this._linkPathLengthMap)\n\n config.onNodeDrag?.(d, event)\n }\n\n private _onDragEnded (\n d: GraphNode<N, L>,\n event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>,\n nodeSelection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>\n ): void {\n const { config } = this\n this._isDragging = false\n d._state.isDragged = false\n nodeSelection.call(updateNodes, config, 0, this._scale)\n config.onNodeDragEnd?.(d, event)\n }\n\n private _dragSelectedNodes (event: D3DragEvent<SVGGElement, GraphNode<N, L>, unknown>): void {\n const { config } = this\n const curr = pointer(event, this._graphGroup.node())\n\n const selectedNodes = smartTransition(\n this._nodesGroup.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.brushed}`)\n ) as Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>\n\n if (event.type === 'start') {\n this._groupDragInit = curr\n this._isDragging = true\n selectedNodes.each(n => {\n n.x = getX(n)\n n.y = getY(n)\n n._state.isDragged = true\n })\n } else if (event.type === 'drag') {\n const dx = curr[0] - this._groupDragInit[0]\n const dy = curr[1] - this._groupDragInit[1]\n\n selectedNodes.each(n => this._updateNodePosition(n, n.x + dx, n.y + dy))\n\n const connectedLinks = smartTransition(\n this._linksGroup.selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.gLink}`)\n .filter(l => l.source?._state?.isDragged || l.target?._state?.isDragged)\n ) as Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown>\n\n connectedLinks.call(updateLinks, this.config, 0, this._scale, this._getLinkArrowDefId, this._linkPathLengthMap)\n } else {\n this._isDragging = false\n selectedNodes.each(n => { n._state.isDragged = false })\n }\n selectedNodes.call(updateNodes, config, 0, this._scale)\n this.config.onNodeSelectionDrag?.(selectedNodes.data(), event)\n }\n\n private _activateBrush (): void {\n this._brush.classed('active', true)\n this._nodesGroup.selectAll(`.${nodeSelectors.gNode}`)\n .classed(nodeSelectors.brushable, true)\n }\n\n private _clearBrush (): void {\n this._brush.classed('active', false).call(this._brushBehavior?.clear)\n\n this._nodesGroup.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.gNode}`)\n .classed(nodeSelectors.brushable, false)\n .classed(nodeSelectors.brushed, false)\n .each(n => { n._state.brushed = false })\n .call(updateNodesPartial, this.config, 0, this._scale)\n }\n\n private _shouldLayoutRecalculate (): boolean {\n const { prevConfig, config } = this\n if (prevConfig.layoutType !== config.layoutType) return true\n if (prevConfig.layoutNonConnectedAside !== config.layoutNonConnectedAside) return true\n\n if (prevConfig.layoutType === GraphLayoutType.Force) {\n const forceSettingsDiff = shallowDiff(prevConfig.forceLayoutSettings, config.forceLayoutSettings)\n if (Object.keys(forceSettingsDiff).length) return true\n }\n\n if (prevConfig.layoutType === GraphLayoutType.Dagre) {\n const dagreSettingsDiff = shallowDiff(prevConfig.dagreLayoutSettings, config.dagreLayoutSettings)\n if (Object.keys(dagreSettingsDiff).length) return true\n }\n\n if (prevConfig.layoutType === GraphLayoutType.Elk) {\n if (isPlainObject(prevConfig.layoutElkSettings) && isPlainObject(config.layoutElkSettings)) {\n // Do a deeper comparison if `config.layoutElkSettings` is an object\n const elkSettingsDiff = shallowDiff(\n prevConfig.layoutElkSettings as Record<string, string>,\n config.layoutElkSettings as Record<string, string>\n )\n return Boolean(Object.keys(elkSettingsDiff).length)\n } else {\n // Otherwise, do a simple `===` comparison\n return prevConfig.layoutElkSettings !== config.layoutElkSettings\n }\n }\n\n if (\n prevConfig.layoutType === GraphLayoutType.Parallel ||\n prevConfig.layoutType === GraphLayoutType.ParallelHorizontal ||\n prevConfig.layoutType === GraphLayoutType.Concentric\n ) {\n if (!isEqual(prevConfig.layoutGroupOrder, config.layoutGroupOrder)) return true\n if (prevConfig.layoutParallelNodesPerColumn !== config.layoutParallelNodesPerColumn) return true\n if (prevConfig.layoutParallelSortConnectionsByGroup !== config.layoutParallelSortConnectionsByGroup) return true\n }\n\n return false\n }\n\n private _getLinkArrowDefId (arrow: GraphLinkArrowStyle | undefined): string | null {\n return arrow ? `${this.uid}-${arrow}` : null\n }\n\n private _addSVGDefs (): void {\n // Clean up old defs\n this._defs.selectAll('*').remove()\n\n // Single Arrow\n this._defs.append('path').attr('d', getArrowPath())\n .attr('id', this._getLinkArrowDefId(GraphLinkArrowStyle.Single))\n\n // Double Arrow\n this._defs.append('path').attr('d', getDoubleArrowPath())\n .attr('id', this._getLinkArrowDefId(GraphLinkArrowStyle.Double))\n }\n\n public zoomIn (increment = 0.3): void {\n const scaleBy = 1 + increment\n smartTransition(this.g, this.config.duration / 2)\n .call(this._zoomBehavior.scaleBy, scaleBy)\n }\n\n public zoomOut (increment = 0.3): void {\n const scaleBy = 1 - increment\n smartTransition(this.g, this.config.duration / 2)\n .call(this._zoomBehavior.scaleBy, scaleBy)\n }\n\n public setZoom (zoomLevel: number): void {\n smartTransition(this.g, this.config.duration / 2)\n .call(this._zoomBehavior.scaleTo, zoomLevel)\n }\n\n public getZoom (): number {\n return zoomTransform(this.g.node()).k\n }\n\n public fitView (duration = this.config.duration, nodeIds?: (string | number)[], alignment?: GraphFitViewAlignment): void {\n this._layoutCalculationPromise?.then(() => {\n this._fit(duration, nodeIds, alignment)\n })\n }\n\n /** Enable automatic fitting to container if it was disabled due to previous zoom / pan interactions */\n public resetAutofitState (): void {\n this._isAutoFitDisabled = false\n }\n\n /** Get current coordinates of the nodes as an array of { id: string; x: number; y: number } objects */\n public getNodesCoordinates (): { id: string; x: number; y: number }[] {\n const { datamodel: { nodes } } = this\n return nodes.map(n => ({\n id: n._id,\n x: n.x,\n y: n.y,\n }))\n }\n\n /** Get node coordinates by id as { id: string; x: number; y: number } */\n public getNodeCoordinatesById (id: string): { id: string; x: number; y: number } | undefined {\n const { datamodel: { nodes } } = this\n const node = nodes.find(n => n._id === id)\n\n if (!node) {\n console.warn(`Unovis | Graph: Node ${id} not found`)\n return undefined\n } else {\n return {\n id: node._id,\n x: node.x,\n y: node.y,\n }\n }\n }\n\n /** Set the node state by id */\n public setNodeStateById (nodeId: string, state: GraphNode<N, L>['_state']): void {\n this.datamodel.setNodeStateById(nodeId, state)\n }\n\n /** Call a partial render to update the positions of the nodes and their links.\n * This can be useful when you've changed the node positions manually outside\n * of the component and want to update the graph.\n */\n public updateNodePositions (duration?: number): void {\n const { config } = this\n const animDuration = isNumber(duration) ? duration : config.duration\n\n const linkElements = this._linksGroup.selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.gLink}:not(.${linkSelectors.gLinkExit}`)\n updateLinkLines(linkElements, config, animDuration, this._scale, this._getLinkArrowDefId, this._linkPathLengthMap)\n\n const nodeElements = this._nodesGroup.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.gNode}:not(.${nodeSelectors.gNodeExit})`)\n updateNodePositions(nodeElements, animDuration)\n }\n}\n"],"names":["generalSelectors.background","generalSelectors.graphGroup","generalSelectors.brush","brush","panelSelectors.panels","linkSelectors.links","nodeSelectors.nodes","nodeSelectors.gNode","nodeSelectors.gNodeExit","linkSelectors.gLink","linkSelectors.gLinkExit","panelSelectors.gPanel","linkSelectors.linkSupport","nodeSelectors.brushed","nodeSelectors.brushable","generalSelectors.root","nodeSelectors.node","nodeSelectors.nodeGauge","nodeSelectors.sideLabelGroup","nodeSelectors.label","nodeSelectors.greyedOutNode","linkSelectors.link","linkSelectors.linkLabelGroup","linkSelectors.greyedOutLink","panelSelectors.panel","panelSelectors.panelSelection","panelSelectors.label","panelSelectors.labelText","panelSelectors.sideIconGroup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AAA,mBAAmB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAA;KAChD;;AAlgCM,KAAA,CAAA,SAAS,GAAG;IACjB,IAAI,EAAEO,IAAqB;IAC3B,UAAU,EAAEd,UAA2B;IACvC,UAAU,EAAED,UAA2B;IACvC,IAAI,EAAEO,KAAmB;IACzB,SAAS,EAAES,IAAkB;IAC7B,SAAS,EAAEC,SAAuB;IAClC,aAAa,EAAEC,cAA4B;IAC3C,SAAS,EAAEC,KAAmB;IAC9B,UAAU,EAAEC,aAA2B;IACvC,IAAI,EAAEX,KAAmB;IACzB,QAAQ,EAAEY,IAAkB;IAC5B,SAAS,EAAEC,cAA4B;IACvC,UAAU,EAAEC,aAA2B;IACvC,KAAK,EAAEZ,MAAqB;IAC5B,SAAS,EAAEa,KAAoB;IAC/B,cAAc,EAAEC,cAA6B;IAC7C,UAAU,EAAEC,OAAoB;IAChC,cAAc,EAAEC,SAAwB;IACxC,aAAa,EAAEC,aAA4B;IAC3C,kBAAkB,EAAEC,aAA4B;IAChD,mBAAmB,EAAEC,cAA6B;CACnD,CAAA;AAEM,KAAa,CAAA,aAAA,GAAGC,KAAa;;;;"}
|
|
@@ -259,7 +259,7 @@ function animateLinkFlow(selection, config, scale, linkPathLengthMap) {
|
|
|
259
259
|
const element = elements[i];
|
|
260
260
|
const linkGroup = select(element);
|
|
261
261
|
const flowGroup$1 = linkGroup.select(`.${flowGroup}`);
|
|
262
|
-
const linkPathElement = linkGroup.select(`.${
|
|
262
|
+
const linkPathElement = linkGroup.select(`.${link}`).node();
|
|
263
263
|
const cachedLinkPathLength = linkPathLengthMap.get(linkPathElement.getAttribute('d'));
|
|
264
264
|
const pathLength = cachedLinkPathLength !== null && cachedLinkPathLength !== void 0 ? cachedLinkPathLength : linkPathElement.getTotalLength();
|
|
265
265
|
if (!getBoolean(d, linkFlow, d._indexGlobal) || !pathLength)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/graph/modules/link/index.ts"],"sourcesContent":["import { select, Selection } from 'd3-selection'\nimport { range, sum } from 'd3-array'\nimport { Transition } from 'd3-transition'\nimport toPx from 'to-px'\n\n// Utils\nimport { throttle, getValue, getNumber, getBoolean, ensureArray } from 'utils/data'\nimport { smartTransition } from 'utils/d3'\nimport { getCSSVariableValueInPixels } from 'utils/misc'\nimport { estimateStringPixelLength } from 'utils/text'\n\n// Types\nimport { GraphInputLink, GraphInputNode } from 'types/graph'\n\n// Local Types\nimport { GraphCircleLabel, GraphLink, GraphLinkArrowStyle, GraphLinkStyle } from '../../types'\n\n// Config\nimport { GraphConfigInterface } from '../../config'\n\n// Helpers\nimport { getX, getY, isInternalHref } from '../node/helper'\nimport {\n getLinkShiftTransform,\n getLinkStrokeWidth,\n getLinkBandWidth,\n getLinkColor,\n getLinkLabelTextColor,\n getLinkArrowStyle,\n LINK_MARKER_WIDTH,\n} from './helper'\nimport { ZoomLevel } from '../zoom-levels'\n\n// Styles\nimport * as generalSelectors from '../../style'\nimport * as linkSelectors from './style'\n\nexport function createLinks<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown>\n): void {\n selection.attr('opacity', 0)\n\n selection.append('path')\n .attr('class', linkSelectors.linkSupport)\n\n selection.append('path')\n .attr('class', linkSelectors.link)\n\n selection.append('path')\n .attr('class', linkSelectors.linkBand)\n\n selection.append('use')\n .attr('class', linkSelectors.linkArrow)\n\n selection.append('g')\n .attr('class', linkSelectors.flowGroup)\n .style('opacity', 0)\n .selectAll(`.${linkSelectors.flowCircle}`)\n .data(range(0, 6)).enter()\n .append('circle')\n .attr('class', linkSelectors.flowCircle)\n}\n\n/** Updates the links partially according to their `_state` */\nexport function updateLinksPartial<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n scale: number\n): void {\n const isGreyedOut = (d: GraphLink<N, L>, i: number): boolean => getBoolean(d, config.linkDisabled, i) || d._state.greyout\n selection\n .classed(linkSelectors.greyedOutLink, (d, i) => isGreyedOut(d, i))\n\n selection.each((d, i, elements) => {\n const element = elements[i]\n const group = select(element)\n group.select(`.${linkSelectors.link}`)\n group.select(`.${linkSelectors.linkBand}`)\n const linkSupport = group.select(`.${linkSelectors.linkSupport}`)\n\n linkSupport\n .style('stroke-opacity', (d._state.hovered || d._state.selected) ? 0.2 : 0)\n .style('stroke-width',\n d._state.selected\n ? getLinkBandWidth(d, scale, config) + 5\n : d._state.hovered ? getLinkBandWidth(d, scale, config) + 10 : null\n )\n })\n}\n\nexport function updateLinkLines<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n duration: number,\n scale = 1,\n getLinkArrowDefId: (arrow: GraphLinkArrowStyle | undefined) => string,\n linkPathLengthMap: Map<string, number>\n): Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown> {\n return selection.each((d, i, elements) => {\n const element = elements[i]\n const linkGroup = select(element)\n const link = linkGroup.select<SVGPathElement>(`.${linkSelectors.link}`)\n const linkBand = linkGroup.select<SVGPathElement>(`.${linkSelectors.linkBand}`)\n const linkSupport = linkGroup.select<SVGPathElement>(`.${linkSelectors.linkSupport}`)\n const linkArrow = linkGroup.select<SVGUseElement>(`.${linkSelectors.linkArrow}`)\n const linkColor = getLinkColor(d, config)\n const linkShiftTransform = getLinkShiftTransform(d, config.linkNeighborSpacing)\n const linkLabelData = ensureArray(\n getValue<GraphLink<N, L>, GraphCircleLabel | GraphCircleLabel[]>(d, config.linkLabel, d._indexGlobal)\n )\n const offsetSource = getValue(d, config.linkSourcePointOffset, i)\n const offsetTarget = getValue(d, config.linkTargetPointOffset, i)\n const x1 = getX(d.source) + (offsetSource?.[0] || 0)\n const y1 = getY(d.source) + (offsetSource?.[1] || 0)\n const x2 = getX(d.target) + (offsetTarget?.[0] || 0)\n const y2 = getY(d.target) + (offsetTarget?.[1] || 0)\n\n const curvature = getNumber(d, config.linkCurvature, i) ?? 0\n const cp1x = x1 + (x2 - x1) * 0.5 * curvature\n const cp1y = y1 + (y2 - y1) * 0.0 * curvature\n const cp2x = x1 + (x2 - x1) * 0.5 * curvature\n const cp2y = y1 + (y2 - y1) * 1.0 * curvature\n\n const pathData = `M${x1},${y1} C${cp1x},${cp1y} ${cp2x},${cp2y} ${x2},${y2}`\n const linkPathElement = linkSupport.attr('d', pathData).node()\n const cachedLinkPathLength = linkPathLengthMap.get(pathData)\n const pathLength = cachedLinkPathLength ?? linkPathElement.getTotalLength()\n if (!cachedLinkPathLength) linkPathLengthMap.set(pathData, pathLength)\n\n linkSupport\n .style('stroke', linkColor)\n .attr('transform', linkShiftTransform)\n\n link\n .attr('class', linkSelectors.link)\n .style('stroke-width', getLinkStrokeWidth(d, scale, config))\n .style('stroke', linkColor)\n .attr('transform', linkShiftTransform)\n\n smartTransition(link, duration)\n .attr('d', pathData)\n\n linkBand\n .attr('class', linkSelectors.linkBand)\n .attr('transform', linkShiftTransform)\n .style('stroke-width', getLinkBandWidth(d, scale, config))\n .style('stroke', linkColor)\n\n smartTransition(linkBand, duration)\n .attr('d', pathData)\n\n\n // Arrow\n const linkArrowStyle = getLinkArrowStyle(d, config)\n if (linkArrowStyle) {\n const arrowPos = pathLength * (linkLabelData.length ? 0.65 : 0.5)\n const p1 = linkPathElement.getPointAtLength(arrowPos)\n const p2 = linkPathElement.getPointAtLength(arrowPos + 1) // A point very close to p1\n\n // Calculate the angle for the arrowhead\n const angle = Math.atan2(p2.y - p1.y, p2.x - p1.x) * (180 / Math.PI)\n const arrowWasShownBefore = linkArrow.attr('href')\n linkArrow\n .attr('href', `#${getLinkArrowDefId(linkArrowStyle)}`)\n\n smartTransition(linkArrow, arrowWasShownBefore ? duration : 0)\n .attr('fill', linkColor)\n .attr('transform', `translate(${p1.x}, ${p1.y}) rotate(${angle})`)\n } else {\n linkArrow.attr('href', null)\n }\n })\n}\n\nexport function updateLinks<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n duration: number,\n scale = 1,\n getLinkArrowDefId: (arrow: GraphLinkArrowStyle | undefined) => string,\n linkPathLengthMap: Map<string, number>\n): void {\n const { linkStyle, linkFlow, linkLabel, linkLabelShiftFromCenter } = config\n if (!selection.size()) return\n\n selection\n .classed(\n linkSelectors.linkDashed,\n d => getValue<GraphLink<N, L>, GraphLinkStyle>(d, linkStyle, d._indexGlobal) === GraphLinkStyle.Dashed\n )\n\n // Update line and arrow positions\n updateLinkLines(selection, config, duration, scale, getLinkArrowDefId, linkPathLengthMap)\n\n // Update labels and link flow (particles) groups\n selection.each((d, i, elements) => {\n const element = elements[i]\n const linkGroup = select(element)\n const flowGroup = linkGroup.select(`.${linkSelectors.flowGroup}`)\n const linkSupport = linkGroup.select<SVGPathElement>(`.${linkSelectors.linkSupport}`)\n const linkPathElement = linkSupport.node()\n const linkColor = getLinkColor(d, config)\n const linkShiftTransform = getLinkShiftTransform(d, config.linkNeighborSpacing)\n const linkLabelData = ensureArray(\n getValue<GraphLink<N, L>, GraphCircleLabel | GraphCircleLabel[]>(d, linkLabel, d._indexGlobal)\n )\n const linkFlowParticleSize = getNumber(d, config.linkFlowParticleSize, d._indexGlobal)\n\n // Particle Flow\n flowGroup\n .attr('transform', linkShiftTransform)\n .style('display', getBoolean(d, linkFlow, d._indexGlobal) ? null : 'none')\n\n flowGroup\n .selectAll(`.${linkSelectors.flowCircle}`)\n .attr('r', linkFlowParticleSize / Math.sqrt(scale))\n .style('fill', linkColor)\n\n smartTransition(flowGroup, duration)\n .style('opacity', scale < ZoomLevel.Level2 ? 0 : 1)\n\n // Labels\n // Preparing the labels before rendering to be able to center them\n const linkLabelsDataPrepared = linkLabelData.map((linkLabelDatum) => {\n const text = linkLabelDatum.text?.toString() || ''\n const shouldRenderUseElement = isInternalHref(text)\n const fontSizePx = toPx(linkLabelDatum.fontSize) ?? getCSSVariableValueInPixels('var(--vis-graph-link-label-font-size)', linkGroup.node())\n const shouldBeRenderedAsCircle = text.length <= 2 || shouldRenderUseElement\n const paddingVertical = 4\n const paddingHorizontal = shouldBeRenderedAsCircle ? paddingVertical : 8\n const estimatedWidthPx = estimateStringPixelLength(text, fontSizePx)\n\n return {\n ...linkLabelDatum,\n _shouldRenderUseElement: shouldRenderUseElement,\n _fontSizePx: fontSizePx,\n _shouldBeRenderedAsCircle: shouldBeRenderedAsCircle,\n _paddingVertical: paddingVertical,\n _paddingHorizontal: paddingHorizontal,\n _estimatedWidthPx: estimatedWidthPx,\n _borderRadius: linkLabelDatum.radius ?? (shouldBeRenderedAsCircle ? fontSizePx : 4),\n _backgroundWidth: (shouldBeRenderedAsCircle ? fontSizePx : estimatedWidthPx) + paddingHorizontal * 2,\n _backgroundHeight: fontSizePx + paddingVertical * 2,\n }\n })\n type GraphCircleLabelPrepared = typeof linkLabelsDataPrepared[0]\n const linkLabelGroups = linkGroup\n .selectAll<SVGGElement, GraphCircleLabelPrepared>(`.${linkSelectors.linkLabelGroup}`)\n .data(linkLabelsDataPrepared, (d: GraphCircleLabelPrepared) => d.text)\n\n const linkLabelGroupsEnter = linkLabelGroups.enter().append('g').attr('class', linkSelectors.linkLabelGroup)\n linkLabelGroupsEnter.each((linkLabelDatum, i, elements) => {\n const linkLabelGroup = select<SVGGElement, GraphCircleLabelPrepared>(elements[i])\n linkLabelGroup.append('rect').attr('class', linkSelectors.linkLabelBackground)\n\n const linkLabelText = linkLabelDatum ? linkLabelDatum.text?.toString() : undefined\n const shouldRenderUseElement = isInternalHref(linkLabelText)\n linkLabelGroup.select<SVGTextElement>(`.${linkSelectors.linkLabelContent}`).remove()\n linkLabelGroup\n .append(shouldRenderUseElement ? 'use' : 'text')\n .attr('class', linkSelectors.linkLabelContent)\n })\n linkLabelGroupsEnter.style('opacity', 0)\n\n const linkLabelGroupsMerged = linkLabelGroups.merge(linkLabelGroupsEnter)\n const linkLabelMargin = 1\n let linkLabelShiftCumulative = -sum(linkLabelsDataPrepared, d => d._backgroundWidth + linkLabelMargin) / 2 // Centering the labels\n const cachedLinkPathLength = linkPathLengthMap.get(linkPathElement.getAttribute('d'))\n const pathLength = cachedLinkPathLength ?? linkPathElement.getTotalLength()\n const linkArrowStyle = getLinkArrowStyle(d, config)\n linkLabelGroupsMerged.each((linkLabelDatum, i, elements) => {\n const element = elements[i]\n const linkLabelGroup = select<SVGGElement, GraphCircleLabelPrepared>(element)\n const linkLabelText = linkLabelDatum.text?.toString()\n const linkLabelContent = linkLabelGroup.select<SVGTextElement | SVGUseElement>(`.${linkSelectors.linkLabelContent}`)\n const linkMarkerWidth = linkArrowStyle ? LINK_MARKER_WIDTH * 2 : 0\n const linkLabelShift = getBoolean(d, linkLabelShiftFromCenter, d._indexGlobal) ? -linkMarkerWidth + 4 : 0\n const linkLabelPos = linkPathElement.getPointAtLength(pathLength / 2 + linkLabelShift + linkLabelShiftCumulative + linkLabelDatum._backgroundWidth / 2)\n const linkLabelTranslate = `translate(${linkLabelPos.x}, ${linkLabelPos.y})`\n const linkLabelBackground = linkLabelGroup.select<SVGRectElement>(`.${linkSelectors.linkLabelBackground}`)\n\n // If the label was not displayed before, we set the initial transform\n if (!linkLabelGroup.attr('transform')) {\n linkLabelGroup.attr('transform', `${linkLabelTranslate} scale(0)`)\n }\n\n const linkLabelColor = linkLabelDatum.textColor ?? getLinkLabelTextColor(linkLabelDatum)\n if (linkLabelDatum._shouldRenderUseElement) {\n linkLabelContent\n .attr('href', linkLabelText)\n .attr('x', -linkLabelDatum._fontSizePx / 2)\n .attr('y', -linkLabelDatum._fontSizePx / 2)\n .attr('width', linkLabelDatum._fontSizePx)\n .attr('height', linkLabelDatum._fontSizePx)\n .style('fill', linkLabelColor)\n .style('color', linkLabelColor) // Setting `color` to be passed to SVGs that use `currentColor`\n } else {\n linkLabelContent\n .text(linkLabelText)\n .attr('dy', '0.1em')\n .style('font-size', linkLabelDatum._fontSizePx)\n .style('fill', linkLabelColor)\n }\n\n linkLabelGroup.attr('hidden', null)\n .style('cursor', linkLabelDatum.cursor)\n\n smartTransition(linkLabelGroup, duration)\n .attr('transform', `${linkLabelTranslate} scale(1)`)\n .style('opacity', 1)\n\n linkLabelBackground\n .attr('x', -linkLabelDatum._backgroundWidth / 2)\n .attr('y', -linkLabelDatum._backgroundHeight / 2)\n .attr('width', linkLabelDatum._backgroundWidth)\n .attr('height', linkLabelDatum._backgroundHeight)\n .attr('rx', linkLabelDatum._borderRadius)\n .style('fill', linkLabelDatum.color)\n\n linkLabelShiftCumulative += linkLabelDatum._backgroundWidth + linkLabelMargin\n })\n\n smartTransition(linkLabelGroups.exit(), duration)\n .style('opacity', 0)\n .remove()\n })\n\n // Pointer Events\n if (duration > 0) {\n selection.attr('pointer-events', 'none')\n const t = smartTransition(selection, duration) as Transition<SVGGElement, GraphLink<N, L>, SVGGElement, GraphLink<N, L>>\n t\n .attr('opacity', 1)\n .on('end interrupt', (d, i, elements) => {\n select(elements[i])\n .attr('pointer-events', 'stroke')\n .attr('opacity', 1)\n })\n } else {\n selection.attr('opacity', 1)\n }\n\n updateLinksPartial(selection, config, scale)\n}\n\nexport function removeLinks<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n duration: number\n): void {\n smartTransition(selection, duration / 2)\n .attr('opacity', 0)\n .remove()\n}\n\nexport function animateLinkFlow<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n scale: number,\n linkPathLengthMap: Map<string, number>\n): void {\n const { linkFlow } = config\n if (scale < ZoomLevel.Level2) return\n\n selection.each((d, i, elements) => {\n const element = elements[i]\n const linkGroup = select(element)\n const flowGroup = linkGroup.select(`.${linkSelectors.flowGroup}`)\n\n const linkPathElement = linkGroup.select<SVGPathElement>(`.${linkSelectors.linkSupport}`).node()\n const cachedLinkPathLength = linkPathLengthMap.get(linkPathElement.getAttribute('d'))\n const pathLength = cachedLinkPathLength ?? linkPathElement.getTotalLength()\n\n if (!getBoolean(d, linkFlow, d._indexGlobal) || !pathLength) return\n const t = d._state.flowAnimTime\n const circles = flowGroup.selectAll(`.${linkSelectors.flowCircle}`)\n\n circles\n .attr('transform', index => {\n const tt = (t + (+index) / (circles.size() - 1)) % 1\n const p = linkPathElement.getPointAtLength(tt * pathLength)\n return `translate(${p.x}, ${p.y})`\n })\n })\n}\n\nexport function zoomLinks<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n scale: number\n): void {\n selection.classed(generalSelectors.zoomOutLevel2, scale < ZoomLevel.Level2)\n\n selection.select(`.${linkSelectors.flowGroup}`)\n .style('opacity', scale < ZoomLevel.Level2 ? 0 : 1)\n\n selection.each((l, i, els) => {\n const r = getNumber(l, config.linkFlowParticleSize, l._indexGlobal) / Math.sqrt(scale)\n select(els[i]).selectAll(`.${linkSelectors.flowCircle}`).attr('r', r)\n })\n\n const linkElements = selection.selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.link}`)\n linkElements\n .style('stroke-width', d => getLinkStrokeWidth(d, scale, config))\n\n const linkBandElements = selection.selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.linkBand}`)\n linkBandElements\n .style('stroke-width', d => getLinkBandWidth(d, scale, config))\n}\n\nexport const zoomLinksThrottled = throttle(zoomLinks, 500)\n\n"],"names":["linkSelectors.linkSupport","linkSelectors.link","linkSelectors.linkBand","linkSelectors.linkArrow","linkSelectors.flowGroup","linkSelectors.flowCircle","linkSelectors.greyedOutLink","linkSupport","link","linkBand","linkArrow","linkSelectors.linkDashed","flowGroup","linkSelectors.linkLabelGroup","linkSelectors.linkLabelBackground","linkSelectors.linkLabelContent","linkLabelContent","linkLabelBackground","gener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M,YAAY,GAAG,SAAS,CAAC,SAAS,CAA+B,CAAI,CAAA,EAAAJ,IAAkB,CAAE,CAAA,CAAC,CAAA;IAChG,YAAY;AACT,SAAA,KAAK,CAAC,cAAc,EAAE,CAAC,IAAI,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAA;AAEnE,IAAA,MAAM,gBAAgB,GAAG,SAAS,CAAC,SAAS,CAA+B,CAAI,CAAA,EAAAC,QAAsB,CAAE,CAAA,CAAC,CAAA;IACxG,gBAAgB;AACb,SAAA,KAAK,CAAC,cAAc,EAAE,CAAC,IAAI,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAA;AACnE,CAAC;AAEY,MAAA,kBAAkB,GAAG,QAAQ,CAAC,SAAS,EAAE,GAAG;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/graph/modules/link/index.ts"],"sourcesContent":["import { select, Selection } from 'd3-selection'\nimport { range, sum } from 'd3-array'\nimport { Transition } from 'd3-transition'\nimport toPx from 'to-px'\n\n// Utils\nimport { throttle, getValue, getNumber, getBoolean, ensureArray } from 'utils/data'\nimport { smartTransition } from 'utils/d3'\nimport { getCSSVariableValueInPixels } from 'utils/misc'\nimport { estimateStringPixelLength } from 'utils/text'\n\n// Types\nimport { GraphInputLink, GraphInputNode } from 'types/graph'\n\n// Local Types\nimport { GraphCircleLabel, GraphLink, GraphLinkArrowStyle, GraphLinkStyle } from '../../types'\n\n// Config\nimport { GraphConfigInterface } from '../../config'\n\n// Helpers\nimport { getX, getY, isInternalHref } from '../node/helper'\nimport {\n getLinkShiftTransform,\n getLinkStrokeWidth,\n getLinkBandWidth,\n getLinkColor,\n getLinkLabelTextColor,\n getLinkArrowStyle,\n LINK_MARKER_WIDTH,\n} from './helper'\nimport { ZoomLevel } from '../zoom-levels'\n\n// Styles\nimport * as generalSelectors from '../../style'\nimport * as linkSelectors from './style'\n\nexport function createLinks<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown>\n): void {\n selection.attr('opacity', 0)\n\n selection.append('path')\n .attr('class', linkSelectors.linkSupport)\n\n selection.append('path')\n .attr('class', linkSelectors.link)\n\n selection.append('path')\n .attr('class', linkSelectors.linkBand)\n\n selection.append('use')\n .attr('class', linkSelectors.linkArrow)\n\n selection.append('g')\n .attr('class', linkSelectors.flowGroup)\n .style('opacity', 0)\n .selectAll(`.${linkSelectors.flowCircle}`)\n .data(range(0, 6)).enter()\n .append('circle')\n .attr('class', linkSelectors.flowCircle)\n}\n\n/** Updates the links partially according to their `_state` */\nexport function updateLinksPartial<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n scale: number\n): void {\n const isGreyedOut = (d: GraphLink<N, L>, i: number): boolean => getBoolean(d, config.linkDisabled, i) || d._state.greyout\n selection\n .classed(linkSelectors.greyedOutLink, (d, i) => isGreyedOut(d, i))\n\n selection.each((d, i, elements) => {\n const element = elements[i]\n const group = select(element)\n group.select(`.${linkSelectors.link}`)\n group.select(`.${linkSelectors.linkBand}`)\n const linkSupport = group.select(`.${linkSelectors.linkSupport}`)\n\n linkSupport\n .style('stroke-opacity', (d._state.hovered || d._state.selected) ? 0.2 : 0)\n .style('stroke-width',\n d._state.selected\n ? getLinkBandWidth(d, scale, config) + 5\n : d._state.hovered ? getLinkBandWidth(d, scale, config) + 10 : null\n )\n })\n}\n\nexport function updateLinkLines<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n duration: number,\n scale = 1,\n getLinkArrowDefId: (arrow: GraphLinkArrowStyle | undefined) => string,\n linkPathLengthMap: Map<string, number>\n): Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown> {\n return selection.each((d, i, elements) => {\n const element = elements[i]\n const linkGroup = select(element)\n const link = linkGroup.select<SVGPathElement>(`.${linkSelectors.link}`)\n const linkBand = linkGroup.select<SVGPathElement>(`.${linkSelectors.linkBand}`)\n const linkSupport = linkGroup.select<SVGPathElement>(`.${linkSelectors.linkSupport}`)\n const linkArrow = linkGroup.select<SVGUseElement>(`.${linkSelectors.linkArrow}`)\n const linkColor = getLinkColor(d, config)\n const linkShiftTransform = getLinkShiftTransform(d, config.linkNeighborSpacing)\n const linkLabelData = ensureArray(\n getValue<GraphLink<N, L>, GraphCircleLabel | GraphCircleLabel[]>(d, config.linkLabel, d._indexGlobal)\n )\n const offsetSource = getValue(d, config.linkSourcePointOffset, i)\n const offsetTarget = getValue(d, config.linkTargetPointOffset, i)\n const x1 = getX(d.source) + (offsetSource?.[0] || 0)\n const y1 = getY(d.source) + (offsetSource?.[1] || 0)\n const x2 = getX(d.target) + (offsetTarget?.[0] || 0)\n const y2 = getY(d.target) + (offsetTarget?.[1] || 0)\n\n const curvature = getNumber(d, config.linkCurvature, i) ?? 0\n const cp1x = x1 + (x2 - x1) * 0.5 * curvature\n const cp1y = y1 + (y2 - y1) * 0.0 * curvature\n const cp2x = x1 + (x2 - x1) * 0.5 * curvature\n const cp2y = y1 + (y2 - y1) * 1.0 * curvature\n\n const pathData = `M${x1},${y1} C${cp1x},${cp1y} ${cp2x},${cp2y} ${x2},${y2}`\n const linkPathElement = linkSupport.attr('d', pathData).node()\n const cachedLinkPathLength = linkPathLengthMap.get(pathData)\n const pathLength = cachedLinkPathLength ?? linkPathElement.getTotalLength()\n if (!cachedLinkPathLength) linkPathLengthMap.set(pathData, pathLength)\n\n linkSupport\n .style('stroke', linkColor)\n .attr('transform', linkShiftTransform)\n\n link\n .attr('class', linkSelectors.link)\n .style('stroke-width', getLinkStrokeWidth(d, scale, config))\n .style('stroke', linkColor)\n .attr('transform', linkShiftTransform)\n\n smartTransition(link, duration)\n .attr('d', pathData)\n\n linkBand\n .attr('class', linkSelectors.linkBand)\n .attr('transform', linkShiftTransform)\n .style('stroke-width', getLinkBandWidth(d, scale, config))\n .style('stroke', linkColor)\n\n smartTransition(linkBand, duration)\n .attr('d', pathData)\n\n\n // Arrow\n const linkArrowStyle = getLinkArrowStyle(d, config)\n if (linkArrowStyle) {\n const arrowPos = pathLength * (linkLabelData.length ? 0.65 : 0.5)\n const p1 = linkPathElement.getPointAtLength(arrowPos)\n const p2 = linkPathElement.getPointAtLength(arrowPos + 1) // A point very close to p1\n\n // Calculate the angle for the arrowhead\n const angle = Math.atan2(p2.y - p1.y, p2.x - p1.x) * (180 / Math.PI)\n const arrowWasShownBefore = linkArrow.attr('href')\n linkArrow\n .attr('href', `#${getLinkArrowDefId(linkArrowStyle)}`)\n\n smartTransition(linkArrow, arrowWasShownBefore ? duration : 0)\n .attr('fill', linkColor)\n .attr('transform', `translate(${p1.x}, ${p1.y}) rotate(${angle})`)\n } else {\n linkArrow.attr('href', null)\n }\n })\n}\n\nexport function updateLinks<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n duration: number,\n scale = 1,\n getLinkArrowDefId: (arrow: GraphLinkArrowStyle | undefined) => string,\n linkPathLengthMap: Map<string, number>\n): void {\n const { linkStyle, linkFlow, linkLabel, linkLabelShiftFromCenter } = config\n if (!selection.size()) return\n\n selection\n .classed(\n linkSelectors.linkDashed,\n d => getValue<GraphLink<N, L>, GraphLinkStyle>(d, linkStyle, d._indexGlobal) === GraphLinkStyle.Dashed\n )\n\n // Update line and arrow positions\n updateLinkLines(selection, config, duration, scale, getLinkArrowDefId, linkPathLengthMap)\n\n // Update labels and link flow (particles) groups\n selection.each((d, i, elements) => {\n const element = elements[i]\n const linkGroup = select(element)\n const flowGroup = linkGroup.select(`.${linkSelectors.flowGroup}`)\n const linkSupport = linkGroup.select<SVGPathElement>(`.${linkSelectors.linkSupport}`)\n const linkPathElement = linkSupport.node()\n const linkColor = getLinkColor(d, config)\n const linkShiftTransform = getLinkShiftTransform(d, config.linkNeighborSpacing)\n const linkLabelData = ensureArray(\n getValue<GraphLink<N, L>, GraphCircleLabel | GraphCircleLabel[]>(d, linkLabel, d._indexGlobal)\n )\n const linkFlowParticleSize = getNumber(d, config.linkFlowParticleSize, d._indexGlobal)\n\n // Particle Flow\n flowGroup\n .attr('transform', linkShiftTransform)\n .style('display', getBoolean(d, linkFlow, d._indexGlobal) ? null : 'none')\n\n flowGroup\n .selectAll(`.${linkSelectors.flowCircle}`)\n .attr('r', linkFlowParticleSize / Math.sqrt(scale))\n .style('fill', linkColor)\n\n smartTransition(flowGroup, duration)\n .style('opacity', scale < ZoomLevel.Level2 ? 0 : 1)\n\n // Labels\n // Preparing the labels before rendering to be able to center them\n const linkLabelsDataPrepared = linkLabelData.map((linkLabelDatum) => {\n const text = linkLabelDatum.text?.toString() || ''\n const shouldRenderUseElement = isInternalHref(text)\n const fontSizePx = toPx(linkLabelDatum.fontSize) ?? getCSSVariableValueInPixels('var(--vis-graph-link-label-font-size)', linkGroup.node())\n const shouldBeRenderedAsCircle = text.length <= 2 || shouldRenderUseElement\n const paddingVertical = 4\n const paddingHorizontal = shouldBeRenderedAsCircle ? paddingVertical : 8\n const estimatedWidthPx = estimateStringPixelLength(text, fontSizePx)\n\n return {\n ...linkLabelDatum,\n _shouldRenderUseElement: shouldRenderUseElement,\n _fontSizePx: fontSizePx,\n _shouldBeRenderedAsCircle: shouldBeRenderedAsCircle,\n _paddingVertical: paddingVertical,\n _paddingHorizontal: paddingHorizontal,\n _estimatedWidthPx: estimatedWidthPx,\n _borderRadius: linkLabelDatum.radius ?? (shouldBeRenderedAsCircle ? fontSizePx : 4),\n _backgroundWidth: (shouldBeRenderedAsCircle ? fontSizePx : estimatedWidthPx) + paddingHorizontal * 2,\n _backgroundHeight: fontSizePx + paddingVertical * 2,\n }\n })\n type GraphCircleLabelPrepared = typeof linkLabelsDataPrepared[0]\n const linkLabelGroups = linkGroup\n .selectAll<SVGGElement, GraphCircleLabelPrepared>(`.${linkSelectors.linkLabelGroup}`)\n .data(linkLabelsDataPrepared, (d: GraphCircleLabelPrepared) => d.text)\n\n const linkLabelGroupsEnter = linkLabelGroups.enter().append('g').attr('class', linkSelectors.linkLabelGroup)\n linkLabelGroupsEnter.each((linkLabelDatum, i, elements) => {\n const linkLabelGroup = select<SVGGElement, GraphCircleLabelPrepared>(elements[i])\n linkLabelGroup.append('rect').attr('class', linkSelectors.linkLabelBackground)\n\n const linkLabelText = linkLabelDatum ? linkLabelDatum.text?.toString() : undefined\n const shouldRenderUseElement = isInternalHref(linkLabelText)\n linkLabelGroup.select<SVGTextElement>(`.${linkSelectors.linkLabelContent}`).remove()\n linkLabelGroup\n .append(shouldRenderUseElement ? 'use' : 'text')\n .attr('class', linkSelectors.linkLabelContent)\n })\n linkLabelGroupsEnter.style('opacity', 0)\n\n const linkLabelGroupsMerged = linkLabelGroups.merge(linkLabelGroupsEnter)\n const linkLabelMargin = 1\n let linkLabelShiftCumulative = -sum(linkLabelsDataPrepared, d => d._backgroundWidth + linkLabelMargin) / 2 // Centering the labels\n const cachedLinkPathLength = linkPathLengthMap.get(linkPathElement.getAttribute('d'))\n const pathLength = cachedLinkPathLength ?? linkPathElement.getTotalLength()\n const linkArrowStyle = getLinkArrowStyle(d, config)\n linkLabelGroupsMerged.each((linkLabelDatum, i, elements) => {\n const element = elements[i]\n const linkLabelGroup = select<SVGGElement, GraphCircleLabelPrepared>(element)\n const linkLabelText = linkLabelDatum.text?.toString()\n const linkLabelContent = linkLabelGroup.select<SVGTextElement | SVGUseElement>(`.${linkSelectors.linkLabelContent}`)\n const linkMarkerWidth = linkArrowStyle ? LINK_MARKER_WIDTH * 2 : 0\n const linkLabelShift = getBoolean(d, linkLabelShiftFromCenter, d._indexGlobal) ? -linkMarkerWidth + 4 : 0\n const linkLabelPos = linkPathElement.getPointAtLength(pathLength / 2 + linkLabelShift + linkLabelShiftCumulative + linkLabelDatum._backgroundWidth / 2)\n const linkLabelTranslate = `translate(${linkLabelPos.x}, ${linkLabelPos.y})`\n const linkLabelBackground = linkLabelGroup.select<SVGRectElement>(`.${linkSelectors.linkLabelBackground}`)\n\n // If the label was not displayed before, we set the initial transform\n if (!linkLabelGroup.attr('transform')) {\n linkLabelGroup.attr('transform', `${linkLabelTranslate} scale(0)`)\n }\n\n const linkLabelColor = linkLabelDatum.textColor ?? getLinkLabelTextColor(linkLabelDatum)\n if (linkLabelDatum._shouldRenderUseElement) {\n linkLabelContent\n .attr('href', linkLabelText)\n .attr('x', -linkLabelDatum._fontSizePx / 2)\n .attr('y', -linkLabelDatum._fontSizePx / 2)\n .attr('width', linkLabelDatum._fontSizePx)\n .attr('height', linkLabelDatum._fontSizePx)\n .style('fill', linkLabelColor)\n .style('color', linkLabelColor) // Setting `color` to be passed to SVGs that use `currentColor`\n } else {\n linkLabelContent\n .text(linkLabelText)\n .attr('dy', '0.1em')\n .style('font-size', linkLabelDatum._fontSizePx)\n .style('fill', linkLabelColor)\n }\n\n linkLabelGroup.attr('hidden', null)\n .style('cursor', linkLabelDatum.cursor)\n\n smartTransition(linkLabelGroup, duration)\n .attr('transform', `${linkLabelTranslate} scale(1)`)\n .style('opacity', 1)\n\n linkLabelBackground\n .attr('x', -linkLabelDatum._backgroundWidth / 2)\n .attr('y', -linkLabelDatum._backgroundHeight / 2)\n .attr('width', linkLabelDatum._backgroundWidth)\n .attr('height', linkLabelDatum._backgroundHeight)\n .attr('rx', linkLabelDatum._borderRadius)\n .style('fill', linkLabelDatum.color)\n\n linkLabelShiftCumulative += linkLabelDatum._backgroundWidth + linkLabelMargin\n })\n\n smartTransition(linkLabelGroups.exit(), duration)\n .style('opacity', 0)\n .remove()\n })\n\n // Pointer Events\n if (duration > 0) {\n selection.attr('pointer-events', 'none')\n const t = smartTransition(selection, duration) as Transition<SVGGElement, GraphLink<N, L>, SVGGElement, GraphLink<N, L>>\n t\n .attr('opacity', 1)\n .on('end interrupt', (d, i, elements) => {\n select(elements[i])\n .attr('pointer-events', 'stroke')\n .attr('opacity', 1)\n })\n } else {\n selection.attr('opacity', 1)\n }\n\n updateLinksPartial(selection, config, scale)\n}\n\nexport function removeLinks<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n duration: number\n): void {\n smartTransition(selection, duration / 2)\n .attr('opacity', 0)\n .remove()\n}\n\nexport function animateLinkFlow<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n scale: number,\n linkPathLengthMap: Map<string, number>\n): void {\n const { linkFlow } = config\n if (scale < ZoomLevel.Level2) return\n\n selection.each((d, i, elements) => {\n const element = elements[i]\n const linkGroup = select(element)\n const flowGroup = linkGroup.select(`.${linkSelectors.flowGroup}`)\n\n const linkPathElement = linkGroup.select<SVGPathElement>(`.${linkSelectors.link}`).node()\n const cachedLinkPathLength = linkPathLengthMap.get(linkPathElement.getAttribute('d'))\n const pathLength = cachedLinkPathLength ?? linkPathElement.getTotalLength()\n\n if (!getBoolean(d, linkFlow, d._indexGlobal) || !pathLength) return\n const t = d._state.flowAnimTime\n const circles = flowGroup.selectAll(`.${linkSelectors.flowCircle}`)\n\n circles\n .attr('transform', index => {\n const tt = (t + (+index) / (circles.size() - 1)) % 1\n const p = linkPathElement.getPointAtLength(tt * pathLength)\n return `translate(${p.x}, ${p.y})`\n })\n })\n}\n\nexport function zoomLinks<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphLink<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n scale: number\n): void {\n selection.classed(generalSelectors.zoomOutLevel2, scale < ZoomLevel.Level2)\n\n selection.select(`.${linkSelectors.flowGroup}`)\n .style('opacity', scale < ZoomLevel.Level2 ? 0 : 1)\n\n selection.each((l, i, els) => {\n const r = getNumber(l, config.linkFlowParticleSize, l._indexGlobal) / Math.sqrt(scale)\n select(els[i]).selectAll(`.${linkSelectors.flowCircle}`).attr('r', r)\n })\n\n const linkElements = selection.selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.link}`)\n linkElements\n .style('stroke-width', d => getLinkStrokeWidth(d, scale, config))\n\n const linkBandElements = selection.selectAll<SVGGElement, GraphLink<N, L>>(`.${linkSelectors.linkBand}`)\n linkBandElements\n .style('stroke-width', d => getLinkBandWidth(d, scale, config))\n}\n\nexport const zoomLinksThrottled = throttle(zoomLinks, 500)\n\n"],"names":["linkSelectors.linkSupport","linkSelectors.link","linkSelectors.linkBand","linkSelectors.linkArrow","linkSelectors.flowGroup","linkSelectors.flowCircle","linkSelectors.greyedOutLink","linkSupport","link","linkBand","linkArrow","linkSelectors.linkDashed","flowGroup","linkSelectors.linkLabelGroup","linkSelectors.linkLabelBackground","linkSelectors.linkLabelContent","linkLabelContent","linkLabelBackground","generalSelectors.zoomOutLevel2"],"mappings":";;;;;;;;;;;;;;AAqCM,SAAU,WAAW,CACzB,SAAwE,EAAA;AAExE,IAAA,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;AAE5B,IAAA,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;AACrB,SAAA,IAAI,CAAC,OAAO,EAAEA,WAAyB,CAAC,CAAA;AAE3C,IAAA,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;AACrB,SAAA,IAAI,CAAC,OAAO,EAAEC,IAAkB,CAAC,CAAA;AAEpC,IAAA,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;AACrB,SAAA,IAAI,CAAC,OAAO,EAAEC,QAAsB,CAAC,CAAA;AAExC,IAAA,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC;AACpB,SAAA,IAAI,CAAC,OAAO,EAAEC,SAAuB,CAAC,CAAA;AAEzC,IAAA,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC;AAClB,SAAA,IAAI,CAAC,OAAO,EAAEC,SAAuB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
+
export declare enum GraphFitViewAlignment {
|
|
198
|
+
Center = "center",
|
|
199
|
+
Top = "top",
|
|
200
|
+
Bottom = "bottom",
|
|
201
|
+
Left = "left",
|
|
202
|
+
Right = "right"
|
|
203
|
+
}
|
|
@@ -31,7 +31,15 @@ var GraphNodeSelectionHighlightMode;
|
|
|
31
31
|
GraphNodeSelectionHighlightMode["None"] = "none";
|
|
32
32
|
GraphNodeSelectionHighlightMode["Greyout"] = "greyout";
|
|
33
33
|
GraphNodeSelectionHighlightMode["GreyoutNonConnected"] = "greyout-non-connected";
|
|
34
|
-
})(GraphNodeSelectionHighlightMode || (GraphNodeSelectionHighlightMode = {}));
|
|
34
|
+
})(GraphNodeSelectionHighlightMode || (GraphNodeSelectionHighlightMode = {}));
|
|
35
|
+
var GraphFitViewAlignment;
|
|
36
|
+
(function (GraphFitViewAlignment) {
|
|
37
|
+
GraphFitViewAlignment["Center"] = "center";
|
|
38
|
+
GraphFitViewAlignment["Top"] = "top";
|
|
39
|
+
GraphFitViewAlignment["Bottom"] = "bottom";
|
|
40
|
+
GraphFitViewAlignment["Left"] = "left";
|
|
41
|
+
GraphFitViewAlignment["Right"] = "right";
|
|
42
|
+
})(GraphFitViewAlignment || (GraphFitViewAlignment = {}));
|
|
35
43
|
|
|
36
|
-
export { GraphLayoutType, GraphLinkArrowStyle, GraphLinkStyle, GraphNodeSelectionHighlightMode, GraphNodeShape };
|
|
44
|
+
export { GraphFitViewAlignment, GraphLayoutType, GraphLinkArrowStyle, GraphLinkStyle, GraphNodeSelectionHighlightMode, GraphNodeShape };
|
|
37
45
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../src/components/graph/types.ts"],"sourcesContent":["// Types\nimport { Position } from 'types/position'\nimport { GraphInputLink, GraphInputNode, GraphNodeCore, GraphLinkCore } from 'types/graph'\nimport { Spacing } from 'types/spacing'\nimport { TrimMode } from 'types/text'\n\nexport type GraphNode<\n N extends GraphInputNode = GraphInputNode,\n L extends GraphInputLink = GraphInputLink,\n> = GraphNodeCore<N, L> & {\n x?: number;\n y?: number;\n\n _id?: number | string;\n _index?: number;\n _state?: {\n isDragged?: boolean;\n fx?: number;\n fy?: number;\n selected?: boolean;\n greyout?: boolean;\n brushed?: boolean;\n };\n\n _panels?: GraphPanel<N, L>[];\n _isConnected?: boolean;\n}\n\nexport type GraphForceSimulationNode<\n N extends GraphInputNode = GraphInputNode,\n L extends GraphInputLink = GraphInputLink,\n> = GraphNode<N, L> & {\n fx?: number;\n fy?: number;\n}\n\nexport type GraphLink<\n N extends GraphInputNode = GraphInputNode,\n L extends GraphInputLink = GraphInputLink,\n> = GraphLinkCore<N, L> & {\n id?: number | string;\n source: number | string | GraphNode<N>;\n target: number | string | GraphNode<N>;\n\n _id?: number | string;\n _direction?: number;\n _index?: number;\n _neighbours?: number;\n\n _state?: {\n flowAnimTime?: number;\n hovered?: boolean;\n selected?: boolean;\n greyout?: boolean;\n };\n}\n\nexport enum GraphLayoutType {\n Circular = 'circular',\n Concentric = 'concentric',\n Parallel = 'parallel',\n ParallelHorizontal = 'parallel horizontal',\n Dagre = 'dagre',\n Force = 'force',\n Elk = 'elk',\n Precalculated = 'precalculated',\n}\n\nexport type GraphCircleLabel = {\n text: string;\n textColor?: string | null;\n color?: string | null;\n cursor?: string | null;\n fontSize?: string | null;\n radius?: number;\n}\n\nexport type GraphLinkLabel = GraphCircleLabel\n\nexport enum GraphLinkStyle {\n Dashed = 'dashed',\n Solid = 'solid',\n}\n\nexport enum GraphLinkArrowStyle {\n Single = 'single',\n Double = 'double',\n}\n\nexport enum GraphNodeShape {\n Circle = 'circle',\n Square = 'square',\n Hexagon = 'hexagon',\n Triangle = 'triangle',\n}\n\nexport type GraphPanelConfig = {\n /** Panel nodes references by unique ids */\n nodes: (string|number)[];\n /** Panel label */\n label?: string;\n /** Trim label if it's longer than this number of characters */\n labelTrimLength?: number;\n /** Trim mode of the label */\n labelTrimMode?: TrimMode;\n /** Position of the label */\n labelPosition?: Position.Top | Position.Bottom | string;\n /** Fill color of the panel */\n fillColor?: string;\n /** Color of the panel's border */\n borderColor?: string;\n /** Border width of the panel in pixels */\n borderWidth?: number;\n /** Inner padding */\n padding?: number | Spacing;\n /** Dashed outline showing that the panel is selected */\n dashedOutline?: boolean;\n /** Side icon symbol */\n sideIconSymbol?: string;\n /** Size of the icon as a CSS string. e.g.: `12pt` or `12px` */\n sideIconFontSize?: string;\n /** Color of the icon */\n sideIconSymbolColor?: string;\n /** Shape of the icon's background */\n sideIconShape?: GraphNodeShape | string;\n /** Size of the icon's background shape */\n sideIconShapeSize?: number;\n /** Stroke color of the icon's background shape */\n sideIconShapeStroke?: string;\n /** Cursor, when hovering over the icon */\n sideIconCursor?: string;\n}\n\nexport type GraphPanel<\n N extends GraphInputNode = GraphInputNode,\n L extends GraphInputLink = GraphInputLink,\n> = GraphPanelConfig & {\n _numNodes?: number;\n _x?: number;\n _y?: number;\n _width?: number;\n _height?: number;\n _disabled?: boolean;\n _padding?: Spacing;\n}\n\nexport type GraphNodeAnimationState = {\n endAngle: number;\n nodeIndex: number;\n nodeSize?: number;\n borderWidth?: number;\n}\n\nexport type GraphNodeAnimatedElement<T = SVGElement> = T & {\n _animState: GraphNodeAnimationState;\n}\n\nexport type GraphForceLayoutSettings<\n N extends GraphInputNode = GraphInputNode,\n L extends GraphInputLink = GraphInputLink,\n> = {\n /** Preferred Link Distance. Default: `60` */\n linkDistance?: number | ((l: GraphLink<N, L>, i: number) => number);\n /** Link Strength [0:1]. Default: `0.45` */\n linkStrength?: number | ((l: GraphLink<N, L>, i: number) => number);\n /** Charge Force (<0 repulsion, >0 attraction). Default: `-500` */\n charge?: number | ((l: GraphNode<N, L>, i: number) => number);\n /** X-centring force. Default: `0.15` */\n forceXStrength?: number;\n /** Y-centring force. Default: `0.25` */\n forceYStrength?: number;\n /** Number if simulation iterations. Default: automatic */\n numIterations?: number;\n /** Set to true if you want to fix the node positions after the simulation\n * Helpful when you want to update graph settings without re-calculating the layout.\n * Default: `false` */\n fixNodePositionAfterSimulation?: boolean;\n}\n\nexport type GraphElkLayoutSettings = Record<string, string>\n\n/**\n * Settings for configuring the layout of a Dagre graph.\n */\nexport type GraphDagreLayoutSetting = {\n /**\n * Direction for rank nodes. Can be TB, BT, LR, or RL, where T = top, B = bottom, L = left, and R = right.\n * Additional custom values can also be provided as a string.\n */\n rankdir?: 'TB' | 'BT' | 'LR' | 'RL' | string;\n\n /**\n * Alignment for rank nodes. Can be UL, UR, DL, or DR, where U = up, D = down, L = left, and R = right.\n * Additional custom values can also be provided as a string.\n */\n align?: 'UL' | 'UR' | 'DL' | 'DR' | string;\n\n /**\n * Number of pixels that separate nodes horizontally in the layout.\n */\n nodesep?: number;\n\n /**\n * Number of pixels that separate edges horizontally in the layout.\n */\n edgesep?: number;\n\n /**\n * Number of pixels between each rank in the layout.\n */\n ranksep?: number;\n\n /**\n * Number of pixels to use as a margin around the left and right of the graph.\n */\n marginx?: number;\n\n /**\n * Number of pixels to use as a margin around the top and bottom of the graph.\n */\n marginy?: number;\n\n /**\n * If set to 'greedy', uses a greedy heuristic for finding a feedback arc set for a graph.\n * A feedback arc set is a set of edges that can be removed to make a graph acyclic.\n */\n acyclicer?: 'greedy' | undefined;\n\n /**\n * Type of algorithm to assign a rank to each node in the input graph.\n * Possible values are 'network-simplex', 'tight-tree', or 'longest-path'.\n * Additional custom values can also be provided as a string.\n */\n ranker?: 'network-simplex' | 'tight-tree' | 'longest-path' | string;\n}\n\nexport enum GraphNodeSelectionHighlightMode {\n None = 'none',\n Greyout ='greyout',\n GreyoutNonConnected ='greyout-non-connected',\n}\n"],"names":[],"mappings":"IAyDY,gBASX;AATD,CAAA,UAAY,eAAe,EAAA;AACzB,IAAA,eAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACrB,IAAA,eAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;AACzB,IAAA,eAAA,CAAA,UAAA,CAAA,GAAA,U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A;AACb,IAAA,+BAAA,CAAA,SAAA,CAAA,GAAA,SAAkB,CAAA;AAClB,IAAA,+BAAA,CAAA,qBAAA,CAAA,GAAA,uBAA4C,CAAA;AAC9C,CAAC,EAJW,+BAA+B,KAA/B,+BAA+B,GAI1C,EAAA,CAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/components/graph/types.ts"],"sourcesContent":["// Types\nimport { Position } from 'types/position'\nimport { GraphInputLink, GraphInputNode, GraphNodeCore, GraphLinkCore } from 'types/graph'\nimport { Spacing } from 'types/spacing'\nimport { TrimMode } from 'types/text'\n\nexport type GraphNode<\n N extends GraphInputNode = GraphInputNode,\n L extends GraphInputLink = GraphInputLink,\n> = GraphNodeCore<N, L> & {\n x?: number;\n y?: number;\n\n _id?: number | string;\n _index?: number;\n _state?: {\n isDragged?: boolean;\n fx?: number;\n fy?: number;\n selected?: boolean;\n greyout?: boolean;\n brushed?: boolean;\n };\n\n _panels?: GraphPanel<N, L>[];\n _isConnected?: boolean;\n}\n\nexport type GraphForceSimulationNode<\n N extends GraphInputNode = GraphInputNode,\n L extends GraphInputLink = GraphInputLink,\n> = GraphNode<N, L> & {\n fx?: number;\n fy?: number;\n}\n\nexport type GraphLink<\n N extends GraphInputNode = GraphInputNode,\n L extends GraphInputLink = GraphInputLink,\n> = GraphLinkCore<N, L> & {\n id?: number | string;\n source: number | string | GraphNode<N>;\n target: number | string | GraphNode<N>;\n\n _id?: number | string;\n _direction?: number;\n _index?: number;\n _neighbours?: number;\n\n _state?: {\n flowAnimTime?: number;\n hovered?: boolean;\n selected?: boolean;\n greyout?: boolean;\n };\n}\n\nexport enum GraphLayoutType {\n Circular = 'circular',\n Concentric = 'concentric',\n Parallel = 'parallel',\n ParallelHorizontal = 'parallel horizontal',\n Dagre = 'dagre',\n Force = 'force',\n Elk = 'elk',\n Precalculated = 'precalculated',\n}\n\nexport type GraphCircleLabel = {\n text: string;\n textColor?: string | null;\n color?: string | null;\n cursor?: string | null;\n fontSize?: string | null;\n radius?: number;\n}\n\nexport type GraphLinkLabel = GraphCircleLabel\n\nexport enum GraphLinkStyle {\n Dashed = 'dashed',\n Solid = 'solid',\n}\n\nexport enum GraphLinkArrowStyle {\n Single = 'single',\n Double = 'double',\n}\n\nexport enum GraphNodeShape {\n Circle = 'circle',\n Square = 'square',\n Hexagon = 'hexagon',\n Triangle = 'triangle',\n}\n\nexport type GraphPanelConfig = {\n /** Panel nodes references by unique ids */\n nodes: (string|number)[];\n /** Panel label */\n label?: string;\n /** Trim label if it's longer than this number of characters */\n labelTrimLength?: number;\n /** Trim mode of the label */\n labelTrimMode?: TrimMode;\n /** Position of the label */\n labelPosition?: Position.Top | Position.Bottom | string;\n /** Fill color of the panel */\n fillColor?: string;\n /** Color of the panel's border */\n borderColor?: string;\n /** Border width of the panel in pixels */\n borderWidth?: number;\n /** Inner padding */\n padding?: number | Spacing;\n /** Dashed outline showing that the panel is selected */\n dashedOutline?: boolean;\n /** Side icon symbol */\n sideIconSymbol?: string;\n /** Size of the icon as a CSS string. e.g.: `12pt` or `12px` */\n sideIconFontSize?: string;\n /** Color of the icon */\n sideIconSymbolColor?: string;\n /** Shape of the icon's background */\n sideIconShape?: GraphNodeShape | string;\n /** Size of the icon's background shape */\n sideIconShapeSize?: number;\n /** Stroke color of the icon's background shape */\n sideIconShapeStroke?: string;\n /** Cursor, when hovering over the icon */\n sideIconCursor?: string;\n}\n\nexport type GraphPanel<\n N extends GraphInputNode = GraphInputNode,\n L extends GraphInputLink = GraphInputLink,\n> = GraphPanelConfig & {\n _numNodes?: number;\n _x?: number;\n _y?: number;\n _width?: number;\n _height?: number;\n _disabled?: boolean;\n _padding?: Spacing;\n}\n\nexport type GraphNodeAnimationState = {\n endAngle: number;\n nodeIndex: number;\n nodeSize?: number;\n borderWidth?: number;\n}\n\nexport type GraphNodeAnimatedElement<T = SVGElement> = T & {\n _animState: GraphNodeAnimationState;\n}\n\nexport type GraphForceLayoutSettings<\n N extends GraphInputNode = GraphInputNode,\n L extends GraphInputLink = GraphInputLink,\n> = {\n /** Preferred Link Distance. Default: `60` */\n linkDistance?: number | ((l: GraphLink<N, L>, i: number) => number);\n /** Link Strength [0:1]. Default: `0.45` */\n linkStrength?: number | ((l: GraphLink<N, L>, i: number) => number);\n /** Charge Force (<0 repulsion, >0 attraction). Default: `-500` */\n charge?: number | ((l: GraphNode<N, L>, i: number) => number);\n /** X-centring force. Default: `0.15` */\n forceXStrength?: number;\n /** Y-centring force. Default: `0.25` */\n forceYStrength?: number;\n /** Number if simulation iterations. Default: automatic */\n numIterations?: number;\n /** Set to true if you want to fix the node positions after the simulation\n * Helpful when you want to update graph settings without re-calculating the layout.\n * Default: `false` */\n fixNodePositionAfterSimulation?: boolean;\n}\n\nexport type GraphElkLayoutSettings = Record<string, string>\n\n/**\n * Settings for configuring the layout of a Dagre graph.\n */\nexport type GraphDagreLayoutSetting = {\n /**\n * Direction for rank nodes. Can be TB, BT, LR, or RL, where T = top, B = bottom, L = left, and R = right.\n * Additional custom values can also be provided as a string.\n */\n rankdir?: 'TB' | 'BT' | 'LR' | 'RL' | string;\n\n /**\n * Alignment for rank nodes. Can be UL, UR, DL, or DR, where U = up, D = down, L = left, and R = right.\n * Additional custom values can also be provided as a string.\n */\n align?: 'UL' | 'UR' | 'DL' | 'DR' | string;\n\n /**\n * Number of pixels that separate nodes horizontally in the layout.\n */\n nodesep?: number;\n\n /**\n * Number of pixels that separate edges horizontally in the layout.\n */\n edgesep?: number;\n\n /**\n * Number of pixels between each rank in the layout.\n */\n ranksep?: number;\n\n /**\n * Number of pixels to use as a margin around the left and right of the graph.\n */\n marginx?: number;\n\n /**\n * Number of pixels to use as a margin around the top and bottom of the graph.\n */\n marginy?: number;\n\n /**\n * If set to 'greedy', uses a greedy heuristic for finding a feedback arc set for a graph.\n * A feedback arc set is a set of edges that can be removed to make a graph acyclic.\n */\n acyclicer?: 'greedy' | undefined;\n\n /**\n * Type of algorithm to assign a rank to each node in the input graph.\n * Possible values are 'network-simplex', 'tight-tree', or 'longest-path'.\n * Additional custom values can also be provided as a string.\n */\n ranker?: 'network-simplex' | 'tight-tree' | 'longest-path' | string;\n}\n\nexport enum GraphNodeSelectionHighlightMode {\n None = 'none',\n Greyout ='greyout',\n GreyoutNonConnected ='greyout-non-connected',\n}\n\nexport enum GraphFitViewAlignment {\n Center = 'center',\n Top = 'top',\n Bottom = 'bottom',\n Left = 'left',\n Right = 'right',\n}\n"],"names":[],"mappings":"IAyDY,gBASX;AATD,CAAA,UAAY,eAAe,EAAA;AACzB,IAAA,eAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACrB,IAAA,eAAA,CAAA,YAAA,CAAA,GAAA,YAAyB,CAAA;AACzB,IAAA,eAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACrB,IAAA,eAAA,CAAA,oBAAA,CAAA,GAAA,qBAA0C,CAAA;AAC1C,IAAA,eAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,eAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,eAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,eAAA,CAAA,eAAA,CAAA,GAAA,eAA+B,CAAA;AACjC,CAAC,EATW,eAAe,KAAf,eAAe,GAS1B,EAAA,CAAA,CAAA,CAAA;IAaW,eAGX;AAHD,CAAA,UAAY,cAAc,EAAA;AACxB,IAAA,cAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,cAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACjB,CAAC,EAHW,cAAc,KAAd,cAAc,GAGzB,EAAA,CAAA,CAAA,CAAA;IAEW,oBAGX;AAHD,CAAA,UAAY,mBAAmB,EAAA;AAC7B,IAAA,mBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,mBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACnB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,GAG9B,EAAA,CAAA,CAAA,CAAA;IAEW,eAKX;AALD,CAAA,UAAY,cAAc,EAAA;AACxB,IAAA,cAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,cAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,cAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACvB,CAAC,EALW,cAAc,KAAd,cAAc,GAKzB,EAAA,CAAA,CAAA,CAAA;IA8IW,gCAIX;AAJD,CAAA,UAAY,+BAA+B,EAAA;AACzC,IAAA,+BAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,+BAAA,CAAA,SAAA,CAAA,GAAA,SAAkB,CAAA;AAClB,IAAA,+BAAA,CAAA,qBAAA,CAAA,GAAA,uBAA4C,CAAA;AAC9C,CAAC,EAJW,+BAA+B,KAA/B,+BAA+B,GAI1C,EAAA,CAAA,CAAA,CAAA;IAEW,sBAMX;AAND,CAAA,UAAY,qBAAqB,EAAA;AAC/B,IAAA,qBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,qBAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACX,IAAA,qBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,qBAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,qBAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACjB,CAAC,EANW,qBAAqB,KAArB,qBAAqB,GAMhC,EAAA,CAAA,CAAA;;;;"}
|
package/index.js
CHANGED
|
@@ -54,7 +54,7 @@ export { AxisType } from './components/axis/types.js';
|
|
|
54
54
|
export { ChordLabelAlignment } from './components/chord-diagram/types.js';
|
|
55
55
|
export { MapPointLabelPosition, MapProjection, MapProjectionKind } from './components/topojson-map/types.js';
|
|
56
56
|
export { LeafletMapPointShape, LeafletMapRenderer } from './components/leaflet-map/types.js';
|
|
57
|
-
export { GraphLayoutType, GraphLinkArrowStyle, GraphLinkStyle, GraphNodeSelectionHighlightMode, GraphNodeShape } from './components/graph/types.js';
|
|
57
|
+
export { GraphFitViewAlignment, GraphLayoutType, GraphLinkArrowStyle, GraphLinkStyle, GraphNodeSelectionHighlightMode, GraphNodeShape } from './components/graph/types.js';
|
|
58
58
|
export { SankeyEnterTransitionType, SankeyExitTransitionType, SankeyLayout, SankeyNodeAlign, SankeySubLabelPlacement } from './components/sankey/types.js';
|
|
59
59
|
export { VisControlsOrientation } from './components/vis-controls/types.js';
|
|
60
60
|
export { FreeBrushMode } from './components/free-brush/types.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unovis/ts",
|
|
3
3
|
"description": "Modular data visualization framework for React, Angular, Svelte, Vue, Solid, and vanilla TypeScript or JavaScript",
|
|
4
|
-
"version": "1.5.1-xplg.
|
|
4
|
+
"version": "1.5.1-xplg.4",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/f5/unovis.git",
|
package/types.js
CHANGED
|
@@ -18,7 +18,7 @@ export { ChordLabelAlignment } from './components/chord-diagram/types.js';
|
|
|
18
18
|
export { MapPointLabelPosition, MapProjection, MapProjectionKind } from './components/topojson-map/types.js';
|
|
19
19
|
export { LeafletMapPointShape, LeafletMapRenderer } from './components/leaflet-map/types.js';
|
|
20
20
|
export { MapLibreArcticDark, MapLibreArcticLight } from './components/leaflet-map/renderer/map-style.js';
|
|
21
|
-
export { GraphLayoutType, GraphLinkArrowStyle, GraphLinkStyle, GraphNodeSelectionHighlightMode, GraphNodeShape } from './components/graph/types.js';
|
|
21
|
+
export { GraphFitViewAlignment, GraphLayoutType, GraphLinkArrowStyle, GraphLinkStyle, GraphNodeSelectionHighlightMode, GraphNodeShape } from './components/graph/types.js';
|
|
22
22
|
export { SankeyEnterTransitionType, SankeyExitTransitionType, SankeyLayout, SankeyNodeAlign, SankeySubLabelPlacement } from './components/sankey/types.js';
|
|
23
23
|
export { VisControlsOrientation } from './components/vis-controls/types.js';
|
|
24
24
|
export { FreeBrushMode } from './components/free-brush/types.js';
|