@unovis/ts 1.4.2-beta.0 → 1.5.0-alpha.0
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/axis/config.d.ts +2 -0
- package/components/axis/config.js.map +1 -1
- package/components/axis/index.js +16 -17
- package/components/axis/index.js.map +1 -1
- package/components/brush/index.js +4 -4
- package/components/brush/index.js.map +1 -1
- package/components/brush/style.d.ts +44 -1
- package/components/brush/style.js +39 -32
- package/components/brush/style.js.map +1 -1
- package/components/graph/config.d.ts +10 -13
- package/components/graph/config.js +2 -2
- package/components/graph/config.js.map +1 -1
- package/components/graph/index.d.ts +3 -13
- package/components/graph/index.js +63 -173
- package/components/graph/index.js.map +1 -1
- package/components/graph/modules/layout.js +14 -6
- package/components/graph/modules/layout.js.map +1 -1
- package/components/graph/modules/node/index.d.ts +4 -3
- package/components/graph/modules/node/index.js +62 -34
- package/components/graph/modules/node/index.js.map +1 -1
- package/components/graph/modules/node/style.d.ts +0 -2
- package/components/graph/modules/node/style.js +4 -34
- package/components/graph/modules/node/style.js.map +1 -1
- package/components/graph/style.d.ts +0 -1
- package/components/graph/style.js +1 -22
- package/components/graph/style.js.map +1 -1
- package/components/graph/types.d.ts +0 -1
- package/components/graph/types.js.map +1 -1
- package/components/tooltip/config.d.ts +7 -1
- package/components/tooltip/config.js +2 -0
- package/components/tooltip/config.js.map +1 -1
- package/components/tooltip/index.d.ts +9 -1
- package/components/tooltip/index.js +139 -41
- package/components/tooltip/index.js.map +1 -1
- package/components/tooltip/style.d.ts +1 -1
- package/components/tooltip/style.js +25 -25
- package/components/tooltip/style.js.map +1 -1
- package/data-models/graph.d.ts +0 -2
- package/data-models/graph.js +0 -6
- package/data-models/graph.js.map +1 -1
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/types/text.d.ts +2 -0
- package/types/text.js.map +1 -1
- package/utils/text.d.ts +1 -1
- package/utils/text.js +27 -15
- package/utils/text.js.map +1 -1
|
@@ -11,11 +11,10 @@ import { getX, getY, getSideLabelTextColor, getNodeSize, getNodeColor, polyTween
|
|
|
11
11
|
import { appendShape, updateShape } from '../shape.js';
|
|
12
12
|
import { ZoomLevel } from '../zoom-levels.js';
|
|
13
13
|
import { zoomOutLevel2, zoomOutLevel1 } from '../../style.js';
|
|
14
|
-
import { node, customNode, nodeSelection, nodeGauge, nodeIcon, label, labelBackground, labelText, labelTextContent, subLabelTextContent,
|
|
14
|
+
import { node, customNode, nodeSelection, nodeGauge, nodeIcon, sideLabelsGroup, nodeBottomIcon, label, labelBackground, labelText, labelTextContent, subLabelTextContent, greyedOutNode, draggable, nodeSelectionActive, sideLabel, sideLabelBackground, nodeIsDragged, nodePolygon, sideLabelGroup } from './style.js';
|
|
15
15
|
|
|
16
16
|
const SIDE_LABEL_DEFAULT_RADIUS = 10;
|
|
17
|
-
function createNodes(selection, config) {
|
|
18
|
-
const { nodeShape } = config;
|
|
17
|
+
function createNodes(selection, config, duration, scale = 1) {
|
|
19
18
|
selection.each((d, i, elements) => {
|
|
20
19
|
const element = elements[i];
|
|
21
20
|
const group = select(element);
|
|
@@ -29,13 +28,25 @@ function createNodes(selection, config) {
|
|
|
29
28
|
return `translate(${x}, ${y}) scale(${scale})`;
|
|
30
29
|
})
|
|
31
30
|
.attr('opacity', 0);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
// If there's a custom render function, use it
|
|
32
|
+
if (config.nodeEnterCustomRenderFunction) {
|
|
33
|
+
config.nodeEnterCustomRenderFunction(d, element, config, duration, scale);
|
|
34
|
+
}
|
|
35
|
+
else { // Default node rendering
|
|
36
|
+
const shape = getString(d, config.nodeShape, d._index);
|
|
37
|
+
// Todo: The 'nodeShape' and `nodeIcon` storing logic below it a temporary solution,
|
|
38
|
+
// we need a cleaner implementation
|
|
39
|
+
element.nodeShape = shape;
|
|
40
|
+
appendShape(group, shape, node, customNode, d._index);
|
|
41
|
+
appendShape(group, shape, nodeSelection, customNode, d._index);
|
|
42
|
+
group.append('path').attr('class', nodeGauge);
|
|
43
|
+
group.append('g').attr('class', nodeIcon);
|
|
44
|
+
group.append('g')
|
|
45
|
+
.attr('class', sideLabelsGroup);
|
|
46
|
+
group.append('text')
|
|
47
|
+
.attr('class', nodeBottomIcon);
|
|
48
|
+
}
|
|
49
|
+
// Label
|
|
39
50
|
const label$1 = group.append('g').attr('class', label);
|
|
40
51
|
label$1.append('rect').attr('class', labelBackground);
|
|
41
52
|
const labelText$1 = label$1.append('text')
|
|
@@ -46,21 +57,17 @@ function createNodes(selection, config) {
|
|
|
46
57
|
.attr('class', subLabelTextContent)
|
|
47
58
|
.attr('dy', '1.1em')
|
|
48
59
|
.attr('x', '0');
|
|
49
|
-
group.append('g')
|
|
50
|
-
.attr('class', sideLabelsGroup);
|
|
51
|
-
group.append('text')
|
|
52
|
-
.attr('class', nodeBottomIcon);
|
|
53
60
|
});
|
|
54
61
|
}
|
|
55
|
-
function
|
|
62
|
+
function updateNodeSelectedGreyout(selection, config) {
|
|
56
63
|
const { nodeDisabled } = config;
|
|
57
64
|
selection.each((d, i, elements) => {
|
|
58
65
|
const group = select(elements[i]);
|
|
59
66
|
const isGreyout = getBoolean(d, nodeDisabled, d._index) || d._state.greyout;
|
|
60
|
-
group.classed(greyedOutNode, isGreyout
|
|
67
|
+
group.classed(greyedOutNode, isGreyout)
|
|
61
68
|
.classed(draggable, !config.disableDrag);
|
|
62
69
|
const nodeSelectionOutline = group.selectAll(`.${nodeSelection}`);
|
|
63
|
-
nodeSelectionOutline.classed(nodeSelectionActive, d._state.selected
|
|
70
|
+
nodeSelectionOutline.classed(nodeSelectionActive, d._state.selected);
|
|
64
71
|
group.selectAll(`.${sideLabel}`)
|
|
65
72
|
.style('fill', (l) => isGreyout ? null : getSideLabelTextColor(l, selection.node()));
|
|
66
73
|
group.selectAll(`.${sideLabelBackground}`)
|
|
@@ -69,7 +76,18 @@ function updateSelectedNodes(selection, config) {
|
|
|
69
76
|
}
|
|
70
77
|
function updateNodes(selection, config, duration, scale = 1) {
|
|
71
78
|
const { nodeGaugeAnimDuration, nodeStrokeWidth, nodeShape, nodeSize, nodeGaugeValue, nodeGaugeFill, nodeIcon: nodeIcon$1, nodeIconSize, nodeLabel, nodeLabelTrim, nodeLabelTrimMode, nodeLabelTrimLength, nodeSubLabel, nodeSubLabelTrim, nodeSubLabelTrimMode, nodeSubLabelTrimLength, nodeSideLabels, nodeStroke, nodeFill, nodeBottomIcon: nodeBottomIcon$1, } = config;
|
|
72
|
-
|
|
79
|
+
const nodeGroupsUpdate = smartTransition(selection, duration)
|
|
80
|
+
.attr('transform', d => `translate(${getX(d)}, ${getY(d)}) scale(1)`)
|
|
81
|
+
.attr('opacity', 1);
|
|
82
|
+
// If there's a custom render function, use it
|
|
83
|
+
if (config.nodeUpdateCustomRenderFunction) {
|
|
84
|
+
selection.each((d, i, elements) => {
|
|
85
|
+
config.nodeUpdateCustomRenderFunction(d, elements[i], config, duration, scale);
|
|
86
|
+
});
|
|
87
|
+
return nodeGroupsUpdate;
|
|
88
|
+
}
|
|
89
|
+
// Default node rendering
|
|
90
|
+
// Re-create nodes to update shapes if they were changed
|
|
73
91
|
selection.each((d, i, elements) => {
|
|
74
92
|
const element = elements[i];
|
|
75
93
|
const group = select(element);
|
|
@@ -140,26 +158,32 @@ function updateNodes(selection, config, duration, scale = 1) {
|
|
|
140
158
|
// Set Node Selection
|
|
141
159
|
updateShape(nodeSelectionOutline, nodeShape, nodeSize, d._index);
|
|
142
160
|
// Update Node Icon
|
|
143
|
-
const
|
|
161
|
+
const nodeIconValue = getString(d, nodeIcon$1, d._index);
|
|
144
162
|
const nodeIconSizeValue = (_c = getNumber(d, nodeIconSize, d._index)) !== null && _c !== void 0 ? _c : 2.5 * Math.sqrt(nodeSizeValue);
|
|
145
163
|
const nodeIconColor = getNodeIconColor(d, nodeFill, d._index, selection.node());
|
|
146
|
-
|
|
147
|
-
if (
|
|
148
|
-
icon
|
|
149
|
-
|
|
164
|
+
const shouldRenderUseElement = isInternalHref(nodeIconValue);
|
|
165
|
+
if (groupElement.nodeIcon !== nodeIconValue) {
|
|
166
|
+
// If the icon has changed, we remove all children and re-render
|
|
167
|
+
icon.selectAll('*').remove();
|
|
168
|
+
// If the icon is a href, we need to append a <use> element. If it's a text we append the `<text>` element.
|
|
169
|
+
icon.append(shouldRenderUseElement ? 'use' : 'text');
|
|
170
|
+
groupElement.nodeIcon = nodeIconValue;
|
|
171
|
+
}
|
|
172
|
+
if (shouldRenderUseElement) {
|
|
173
|
+
icon.select('use')
|
|
174
|
+
.attr('href', nodeIconValue)
|
|
150
175
|
.attr('x', -nodeIconSizeValue / 2)
|
|
151
176
|
.attr('y', -nodeIconSizeValue / 2)
|
|
152
177
|
.attr('width', nodeIconSizeValue)
|
|
153
178
|
.attr('height', nodeIconSizeValue)
|
|
154
179
|
.style('fill', nodeIconColor);
|
|
155
180
|
}
|
|
156
|
-
else {
|
|
157
|
-
icon
|
|
158
|
-
.append('text')
|
|
181
|
+
else {
|
|
182
|
+
icon.select('text')
|
|
159
183
|
.style('font-size', `${nodeIconSizeValue}px`)
|
|
160
184
|
.attr('dy', '0.1em')
|
|
161
185
|
.style('fill', nodeIconColor)
|
|
162
|
-
.html(
|
|
186
|
+
.html(nodeIconValue);
|
|
163
187
|
}
|
|
164
188
|
// Side Labels
|
|
165
189
|
const sideLabelsData = getValue(d, nodeSideLabels, d._index) || [];
|
|
@@ -224,12 +248,10 @@ function updateNodes(selection, config, duration, scale = 1) {
|
|
|
224
248
|
bottomIcon.html(getString(d, nodeBottomIcon$1, d._index))
|
|
225
249
|
.attr('transform', `translate(0, ${nodeHeight / 2})`);
|
|
226
250
|
});
|
|
227
|
-
|
|
228
|
-
return
|
|
229
|
-
.attr('transform', d => `translate(${getX(d)}, ${getY(d)}) scale(1)`)
|
|
230
|
-
.attr('opacity', 1);
|
|
251
|
+
updateNodeSelectedGreyout(selection, config);
|
|
252
|
+
return nodeGroupsUpdate;
|
|
231
253
|
}
|
|
232
|
-
function removeNodes(selection, config, duration) {
|
|
254
|
+
function removeNodes(selection, config, duration, scale = 1) {
|
|
233
255
|
smartTransition(selection, duration / 2)
|
|
234
256
|
.attr('opacity', 0)
|
|
235
257
|
.attr('transform', (d, i) => {
|
|
@@ -241,6 +263,12 @@ function removeNodes(selection, config, duration) {
|
|
|
241
263
|
return `translate(${x}, ${y}) scale(${scale})`;
|
|
242
264
|
})
|
|
243
265
|
.remove();
|
|
266
|
+
// If there's a custom render function, use it
|
|
267
|
+
if (config.nodeExitCustomRenderFunction) {
|
|
268
|
+
selection.each((d, i, elements) => {
|
|
269
|
+
config.nodeExitCustomRenderFunction(d, elements[i], config, duration, scale);
|
|
270
|
+
});
|
|
271
|
+
}
|
|
244
272
|
}
|
|
245
273
|
function setLabelBackgroundRect(selection, config) {
|
|
246
274
|
const { nodeLabel } = config;
|
|
@@ -258,10 +286,10 @@ function zoomNodes(selection, config, scale) {
|
|
|
258
286
|
.attr('transform', `scale(${1 / Math.pow(scale, 0.35)})`);
|
|
259
287
|
selection.selectAll(`.${sideLabel}`)
|
|
260
288
|
.attr('transform', `scale(${1 / Math.pow(scale, 0.45)})`);
|
|
261
|
-
if (scale >= ZoomLevel.Level3)
|
|
289
|
+
if (scale >= ZoomLevel.Level3 && !config.nodeEnterCustomRenderFunction)
|
|
262
290
|
selection.call(setLabelBackgroundRectThrottled, config);
|
|
263
291
|
}
|
|
264
292
|
const zoomNodesThrottled = throttle(zoomNodes, 500);
|
|
265
293
|
|
|
266
|
-
export { createNodes, removeNodes,
|
|
294
|
+
export { createNodes, removeNodes, updateNodeSelectedGreyout, updateNodes, zoomNodes, zoomNodesThrottled };
|
|
267
295
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/graph/modules/node/index.ts"],"sourcesContent":["import { select, Selection } from 'd3-selection'\nimport { Transition } from 'd3-transition'\nimport { arc } from 'd3-shape'\n\n// Types\nimport { GraphInputLink, GraphInputNode } from 'types/graph'\nimport { TrimMode } from 'types/text'\n\n// Utils\nimport { trimString } from 'utils/text'\nimport { polygon } from 'utils/path'\nimport { smartTransition } from 'utils/d3'\nimport { getBoolean, getNumber, getString, getValue, throttle } from 'utils/data'\nimport { getColor } from 'utils/color'\nimport { isStringSvg } from 'utils/svg'\n\n// Local Types\nimport { GraphNode, GraphCircleLabel, GraphNodeAnimationState, GraphNodeAnimatedElement, GraphNodeShape } from '../../types'\n\n// Config\nimport { GraphConfigInterface } from '../../config'\n\n// Helpers\nimport {\n arcTween,\n polyTween,\n setLabelRect,\n getX,\n getY,\n getSideLabelTextColor,\n getNodeColor,\n getNodeIconColor,\n getNodeSize,\n LABEL_RECT_VERTICAL_PADDING,\n isInternalHref,\n} from './helper'\nimport { appendShape, updateShape } from '../shape'\nimport { ZoomLevel } from '../zoom-levels'\n\n// Styles\nimport * as generalSelectors from '../../style'\nimport * as nodeSelectors from './style'\n\nconst SIDE_LABEL_DEFAULT_RADIUS = 10\n\nexport interface GraphNodeSVGGElement extends SVGGElement {\n nodeShape?: string;\n}\n\nexport function createNodes<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>\n): void {\n const { nodeShape } = config\n\n selection.each((d, i, elements) => {\n const element = elements[i] as GraphNodeSVGGElement\n const group = select<SVGGElement, GraphNode<N, L>>(element)\n group\n .attr('transform', (d: GraphNode<N, L>, i) => {\n const configuredPosition = getValue<GraphNode<N, L>, [number, number] | undefined>(d, config.nodeEnterPosition, i)\n const scale = getNumber(d, config.nodeEnterScale, i) ?? 0\n const x = configuredPosition?.[0] ?? getX(d)\n const y = configuredPosition?.[1] ?? getY(d)\n return `translate(${x}, ${y}) scale(${scale})`\n })\n .attr('opacity', 0)\n\n const shape = getString(d, nodeShape, d._index)\n /** Todo: The 'nodeShape' storing logic below it a temporary fix, needs a cleaner implementation */\n element.nodeShape = shape\n appendShape(group, shape, nodeSelectors.node, nodeSelectors.customNode, d._index)\n appendShape(group, shape, nodeSelectors.nodeSelection, nodeSelectors.customNode, d._index)\n group.append('path').attr('class', nodeSelectors.nodeGauge)\n group.append('g').attr('class', nodeSelectors.nodeIcon)\n\n const label = group.append('g').attr('class', nodeSelectors.label)\n label.append('rect').attr('class', nodeSelectors.labelBackground)\n\n const labelText = label.append('text')\n .attr('class', nodeSelectors.labelText)\n .attr('dy', '0.32em')\n labelText.append('tspan').attr('class', nodeSelectors.labelTextContent)\n labelText.append('tspan')\n .attr('class', nodeSelectors.subLabelTextContent)\n .attr('dy', '1.1em')\n .attr('x', '0')\n\n group.append('g')\n .attr('class', nodeSelectors.sideLabelsGroup)\n\n group.append('text')\n .attr('class', nodeSelectors.nodeBottomIcon)\n })\n}\n\nexport function updateSelectedNodes<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>\n): void {\n const { nodeDisabled } = config\n\n selection.each((d, i, elements) => {\n const group: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown> = select(elements[i])\n const isGreyout = getBoolean(d, nodeDisabled, d._index) || d._state.greyout\n\n group.classed(nodeSelectors.greyedOutNode, isGreyout && !d._state.brushed)\n .classed(nodeSelectors.draggable, !config.disableDrag)\n\n const nodeSelectionOutline = group.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.nodeSelection}`)\n nodeSelectionOutline.classed(nodeSelectors.nodeSelectionActive, d._state.selected || d._state.brushed)\n\n group.selectAll<SVGTextElement, GraphCircleLabel>(`.${nodeSelectors.sideLabel}`)\n .style('fill', (l) => isGreyout ? null : getSideLabelTextColor(l, selection.node()))\n\n group.selectAll<SVGRectElement, GraphCircleLabel>(`.${nodeSelectors.sideLabelBackground}`)\n .style('fill', (l) => isGreyout ? null : l.color)\n })\n}\n\nexport function updateNodes<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n duration: number,\n scale = 1\n): Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown> | Transition<SVGGElement, GraphNode<N, L>, SVGGElement, unknown> {\n const {\n nodeGaugeAnimDuration, nodeStrokeWidth, nodeShape, nodeSize, nodeGaugeValue, nodeGaugeFill,\n nodeIcon, nodeIconSize, nodeLabel, nodeLabelTrim, nodeLabelTrimMode, nodeLabelTrimLength,\n nodeSubLabel, nodeSubLabelTrim, nodeSubLabelTrimMode, nodeSubLabelTrimLength,\n nodeSideLabels, nodeStroke, nodeFill, nodeBottomIcon,\n } = config\n\n // Re-create nodes to update shapes if they were changes\n selection.each((d, i, elements) => {\n const element = elements[i] as GraphNodeSVGGElement\n const group = select<SVGGElement, GraphNode<N, L>>(element)\n const shape = getString(d, nodeShape, d._index)\n\n if (element.nodeShape !== shape) {\n group.select(`.${nodeSelectors.node}`).remove()\n appendShape(group, nodeShape, nodeSelectors.node, nodeSelectors.customNode, d._index, `.${nodeSelectors.nodeSelection}`)\n group.select(`.${nodeSelectors.nodeSelection}`).remove()\n appendShape(group, shape, nodeSelectors.nodeSelection, null, d._index, `.${nodeSelectors.nodeGauge}`)\n element.nodeShape = shape\n }\n })\n\n // Update nodes themselves\n selection.each((d, i, elements) => {\n const groupElement = elements[i]\n const group: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown> = select(groupElement)\n const node: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown> = group.select(`.${nodeSelectors.node}`)\n const nodeArc = group.select<GraphNodeAnimatedElement<SVGElement>>(`.${nodeSelectors.nodeGauge}`)\n const icon = group.select<SVGTextElement>(`.${nodeSelectors.nodeIcon}`)\n const sideLabelsGroup = group.select<SVGGElement>(`.${nodeSelectors.sideLabelsGroup}`)\n const label = group.select<SVGGElement>(`.${nodeSelectors.label}`)\n const labelTextContent = label.select<SVGTextElement>(`.${nodeSelectors.labelTextContent}`)\n const sublabelTextContent = label.select<SVGTextElement>(`.${nodeSelectors.subLabelTextContent}`)\n const bottomIcon = group.select<SVGTextElement>(`.${nodeSelectors.nodeBottomIcon}`)\n const nodeSelectionOutline = group.select<SVGGElement>(`.${nodeSelectors.nodeSelection}`)\n const nodeSizeValue = getNodeSize(d, nodeSize, d._index)\n const arcGenerator = arc<GraphNodeAnimationState>()\n .innerRadius(state => state.nodeSize / 2 - state.borderWidth / 2)\n .outerRadius(state => state.nodeSize / 2 + state.borderWidth / 2)\n .startAngle(0 * (Math.PI / 180))\n // eslint-disable-next-line dot-notation\n .endAngle(a => a['endAngle'])\n\n group\n .classed(generalSelectors.zoomOutLevel2, scale < ZoomLevel.Level2)\n .classed(nodeSelectors.nodeIsDragged, (d: GraphNode<N, L>) => d._state.isDragged)\n\n // Update Group\n group\n .classed(nodeSelectors.nodePolygon, () => {\n const shape = getString(d, nodeShape, d._index)\n return shape === GraphNodeShape.Triangle || shape === GraphNodeShape.Hexagon || shape === GraphNodeShape.Square\n })\n\n // Update Node\n node\n .call(updateShape, nodeShape, nodeSize, d._index)\n .attr('stroke-width', getNumber(d, nodeStrokeWidth, d._index) ?? 0)\n .style('fill', getNodeColor(d, nodeFill, d._index))\n .style('stroke', getColor(d, nodeStroke, d._index, true) ?? null)\n\n const nodeBBox = (node.node() as SVGGraphicsElement).getBBox()\n\n nodeArc\n .attr('stroke-width', getNumber(d, nodeStrokeWidth, d._index))\n .style('display', !getNumber(d, nodeGaugeValue, d._index) ? 'none' : null)\n .style('fill', getNodeColor(d, nodeGaugeFill, d._index))\n .style('stroke', getNodeColor(d, nodeGaugeFill, d._index))\n .style('stroke-opacity', d => getString(d, nodeShape, d._index) === GraphNodeShape.Circle ? 0 : null)\n\n nodeArc\n .transition()\n .duration(nodeGaugeAnimDuration)\n .attrTween('d', (\n d,\n j,\n arr\n ) => {\n switch (getString(d, nodeShape, d._index)) {\n case GraphNodeShape.Circle: return arcTween(d, config, arcGenerator, arr[j])\n case GraphNodeShape.Hexagon: return polyTween(d, config, polygon, arr[j])\n case GraphNodeShape.Square: return polyTween(d, config, polygon, arr[j])\n case GraphNodeShape.Triangle: return polyTween(d, config, polygon, arr[j])\n default: return null\n }\n })\n\n // Set Node Selection\n updateShape(nodeSelectionOutline, nodeShape, nodeSize, d._index)\n\n // Update Node Icon\n const nodeIconContent = getString(d, nodeIcon, d._index)\n const nodeIconSizeValue = getNumber(d, nodeIconSize, d._index) ?? 2.5 * Math.sqrt(nodeSizeValue)\n const nodeIconColor = getNodeIconColor(d, nodeFill, d._index, selection.node())\n icon.selectAll('*').remove() // Removing all children first\n if (isInternalHref(nodeIconContent)) { // If the icon is a href, we need to append a <use> element and render the icon with it\n icon.append('use')\n .attr('href', nodeIconContent)\n .attr('x', -nodeIconSizeValue / 2)\n .attr('y', -nodeIconSizeValue / 2)\n .attr('width', nodeIconSizeValue)\n .attr('height', nodeIconSizeValue)\n .style('fill', nodeIconColor)\n } else { // If the icon is a text, we need to append a <text> element and render the icon as text\n icon\n .append('text')\n .style('font-size', `${nodeIconSizeValue}px`)\n .attr('dy', '0.1em')\n .style('fill', nodeIconColor)\n .html(nodeIconContent)\n }\n\n // Side Labels\n const sideLabelsData = getValue<GraphNode<N, L>, GraphCircleLabel[]>(d, nodeSideLabels, d._index) || []\n const sideLabels = sideLabelsGroup.selectAll<SVGGElement, GraphCircleLabel>('g').data(sideLabelsData)\n const sideLabelsEnter = sideLabels.enter().append('g')\n .attr('class', nodeSelectors.sideLabelGroup)\n sideLabelsEnter.append('circle')\n .attr('class', nodeSelectors.sideLabelBackground)\n .attr('r', l => l.radius ?? SIDE_LABEL_DEFAULT_RADIUS)\n sideLabelsEnter.append('text')\n .attr('class', nodeSelectors.sideLabel)\n\n const sideLabelsUpdate = sideLabels.merge(sideLabelsEnter)\n .style('cursor', l => l.cursor ?? null)\n\n // Side label text\n sideLabelsUpdate.select(`.${nodeSelectors.sideLabel}`).html(d => d.text)\n .attr('dy', '0.1em')\n .style('fill', l => l.textColor ?? getSideLabelTextColor(l, selection.node()))\n .style('font-size', l => l.fontSize ?? `${(2 + (l.radius ?? SIDE_LABEL_DEFAULT_RADIUS)) / Math.pow(l.text.toString().length, 0.3)}px`)\n // Side label circle background\n sideLabelsUpdate.select(`.${nodeSelectors.sideLabelBackground}`)\n .style('fill', l => l.color)\n\n sideLabelsUpdate.attr('transform', (l, j) => {\n if (sideLabelsData.length === 1) return `translate(${nodeSizeValue / 2.5}, ${-nodeSizeValue / 2.5})`\n const r = 1.05 * nodeSizeValue / 2\n const angle = j * 1.15 * 2 * Math.atan2(l.radius ?? SIDE_LABEL_DEFAULT_RADIUS, r) - Math.PI / 3\n return `translate(${r * Math.cos(angle)}, ${r * Math.sin(angle)})`\n })\n\n sideLabels.exit().remove()\n\n // Set label and sub-label text\n const labelText = getString(d, nodeLabel, d._index)\n const sublabelText = getString(d, nodeSubLabel, d._index)\n const labelTextTrimmed = getBoolean(d, nodeLabelTrim, d._index)\n ? trimString(labelText, getNumber(d, nodeLabelTrimLength, d._index), getValue(d, nodeLabelTrimMode as TrimMode, d._index))\n : labelText\n const sublabelTextTrimmed = getBoolean(d, nodeSubLabelTrim, d._index)\n ? trimString(sublabelText, getNumber(d, nodeSubLabelTrimLength, d._index), getValue(d, nodeSubLabelTrimMode as TrimMode, d._index))\n : sublabelText\n\n labelTextContent.text(labelTextTrimmed)\n sublabelTextContent.text(sublabelTextTrimmed)\n group\n .on('mouseenter', () => {\n labelTextContent.text(labelText)\n sublabelTextContent.text(sublabelText)\n setLabelRect(label, labelText, nodeSelectors.labelText)\n group.raise()\n })\n .on('mouseleave', () => {\n labelTextContent.text(labelTextTrimmed)\n sublabelTextContent.text(sublabelTextTrimmed)\n setLabelRect(label, labelTextTrimmed, nodeSelectors.labelText)\n })\n\n // Position label\n const labelFontSize = parseFloat(window.getComputedStyle(groupElement).getPropertyValue('--vis-graph-node-label-font-size')) || 12\n const labelMargin = LABEL_RECT_VERTICAL_PADDING + 1.25 * labelFontSize ** 1.03\n const nodeHeight = isStringSvg((getString(d, nodeShape, d._index)) as GraphNodeShape) ? nodeBBox.height : nodeSizeValue\n label.attr('transform', `translate(0, ${nodeHeight / 2 + labelMargin})`)\n if (scale >= ZoomLevel.Level3) setLabelRect(label, getString(d, nodeLabel, d._index), nodeSelectors.labelText)\n\n // Bottom Icon\n bottomIcon.html(getString(d, nodeBottomIcon, d._index))\n .attr('transform', `translate(0, ${nodeHeight / 2})`)\n })\n\n updateSelectedNodes(selection, config)\n\n return smartTransition(selection, duration)\n .attr('transform', d => `translate(${getX(d)}, ${getY(d)}) scale(1)`)\n .attr('opacity', 1)\n}\n\nexport function removeNodes<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n duration: number\n): void {\n smartTransition(selection, duration / 2)\n .attr('opacity', 0)\n .attr('transform', (d, i) => {\n const configuredPosition = getValue<GraphNode<N, L>, [number, number] | undefined>(d, config.nodeExitPosition, i)\n const scale = getNumber(d, config.nodeExitScale, i) ?? 0\n const x = configuredPosition?.[0] ?? getX(d)\n const y = configuredPosition?.[1] ?? getY(d)\n return `translate(${x}, ${y}) scale(${scale})`\n })\n .remove()\n}\n\nfunction setLabelBackgroundRect<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>\n): void {\n const { nodeLabel } = config\n\n selection.each((d, i, elements) => {\n const group: Selection<SVGGElement, N, SVGGElement, N> = select(elements[i])\n const label: Selection<SVGGElement, N, SVGGElement, N> = group.select(`.${nodeSelectors.label}`)\n setLabelRect(label, getString(d, nodeLabel, i), nodeSelectors.labelText)\n })\n}\n\nconst setLabelBackgroundRectThrottled = throttle(setLabelBackgroundRect, 1000) as typeof setLabelBackgroundRect\n\nexport function zoomNodes<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n scale: number\n): void {\n selection.classed(generalSelectors.zoomOutLevel1, scale < ZoomLevel.Level1)\n selection.classed(generalSelectors.zoomOutLevel2, scale < ZoomLevel.Level2)\n\n selection.selectAll(`${nodeSelectors.sideLabelBackground}`)\n .attr('transform', `scale(${1 / Math.pow(scale, 0.35)})`)\n selection.selectAll(`.${nodeSelectors.sideLabel}`)\n .attr('transform', `scale(${1 / Math.pow(scale, 0.45)})`)\n\n if (scale >= ZoomLevel.Level3) selection.call(setLabelBackgroundRectThrottled, config)\n}\n\nexport const zoomNodesThrottled = throttle(zoomNodes, 500)\n"],"names":["nodeSelectors.node","nodeSelectors.customNode","nodeSelectors.nodeSelection","nodeSelectors.nodeGauge","nodeSelectors.nodeIcon","label","nodeSelectors.label","nodeSelectors.labelBackground","labelText","nodeSelectors.labelText","nodeSelectors.labelTextContent","nodeSelectors.subLabelTextContent","nodeSelectors.sideLabelsGroup","nodeSelectors.nodeBottomIcon","nodeSelectors.greyedOutNode","nodeSelectors.draggable","nodeSelectors.nodeSelectionActive","nodeSelectors.sideLabel","nodeSelectors.sideLabelBackground","nodeIcon","nodeBottomIcon","node","sideLabelsGroup","labelTextContent","generalSelectors.zoomOutLevel2","nodeSelectors.nodeIsDragged","nodeSelectors.nodePolygon","nodeSelectors.sideLabelGroup","generalSelectors.zoomOutLevel1"],"mappings":";;;;;;;;;;;;;;;AA2CA,MAAM,yBAAyB,GAAG,EAAE,CAAA;AAMpB,SAAA,WAAW,CACzB,SAAwE,EACxE,MAAkC,EAAA;AAElC,IAAA,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAA;IAE5B,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,KAAI;AAChC,QAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAyB,CAAA;AACnD,QAAA,M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,MAAA,EAAA,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA,CAAA,CAAG,CAAC,CAAA;AAE3D,IAAA,IAAI,KAAK,IAAI,SAAS,CAAC,MAAM;AAAE,QAAA,SAAS,CAAC,IAAI,CAAC,+BAA+B,EAAE,MAAM,CAAC,CAAA;AACxF,CAAC;AAEY,MAAA,kBAAkB,GAAG,QAAQ,CAAC,SAAS,EAAE,GAAG;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/graph/modules/node/index.ts"],"sourcesContent":["import { select, Selection } from 'd3-selection'\nimport { Transition } from 'd3-transition'\nimport { arc } from 'd3-shape'\n\n// Types\nimport { GraphInputLink, GraphInputNode } from 'types/graph'\nimport { TrimMode } from 'types/text'\n\n// Utils\nimport { trimString } from 'utils/text'\nimport { polygon } from 'utils/path'\nimport { smartTransition } from 'utils/d3'\nimport { getBoolean, getNumber, getString, getValue, throttle } from 'utils/data'\nimport { getColor } from 'utils/color'\nimport { isStringSvg } from 'utils/svg'\n\n// Local Types\nimport { GraphNode, GraphCircleLabel, GraphNodeAnimationState, GraphNodeAnimatedElement, GraphNodeShape } from '../../types'\n\n// Config\nimport { GraphConfigInterface } from '../../config'\n\n// Helpers\nimport {\n arcTween,\n polyTween,\n setLabelRect,\n getX,\n getY,\n getSideLabelTextColor,\n getNodeColor,\n getNodeIconColor,\n getNodeSize,\n LABEL_RECT_VERTICAL_PADDING,\n isInternalHref,\n} from './helper'\nimport { appendShape, updateShape } from '../shape'\nimport { ZoomLevel } from '../zoom-levels'\n\n// Styles\nimport * as generalSelectors from '../../style'\nimport * as nodeSelectors from './style'\n\nconst SIDE_LABEL_DEFAULT_RADIUS = 10\n\nexport interface GraphNodeSVGGElement extends SVGGElement {\n nodeShape?: string;\n nodeIcon?: string;\n}\n\nexport function createNodes<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n duration: number,\n scale = 1\n): void {\n selection.each((d, i, elements) => {\n const element = elements[i] as GraphNodeSVGGElement\n const group = select<SVGGElement, GraphNode<N, L>>(element)\n group\n .attr('transform', (d: GraphNode<N, L>, i) => {\n const configuredPosition = getValue<GraphNode<N, L>, [number, number] | undefined>(d, config.nodeEnterPosition, i)\n const scale = getNumber(d, config.nodeEnterScale, i) ?? 0\n const x = configuredPosition?.[0] ?? getX(d)\n const y = configuredPosition?.[1] ?? getY(d)\n return `translate(${x}, ${y}) scale(${scale})`\n })\n .attr('opacity', 0)\n\n // If there's a custom render function, use it\n if (config.nodeEnterCustomRenderFunction) {\n config.nodeEnterCustomRenderFunction(d, element, config, duration, scale)\n } else { // Default node rendering\n const shape = getString(d, config.nodeShape, d._index) as GraphNodeShape\n // Todo: The 'nodeShape' and `nodeIcon` storing logic below it a temporary solution,\n // we need a cleaner implementation\n element.nodeShape = shape\n appendShape(group, shape, nodeSelectors.node, nodeSelectors.customNode, d._index)\n appendShape(group, shape, nodeSelectors.nodeSelection, nodeSelectors.customNode, d._index)\n group.append('path').attr('class', nodeSelectors.nodeGauge)\n group.append('g').attr('class', nodeSelectors.nodeIcon)\n\n group.append('g')\n .attr('class', nodeSelectors.sideLabelsGroup)\n\n group.append('text')\n .attr('class', nodeSelectors.nodeBottomIcon)\n }\n\n // Label\n const label = group.append('g').attr('class', nodeSelectors.label)\n label.append('rect').attr('class', nodeSelectors.labelBackground)\n\n const labelText = label.append('text')\n .attr('class', nodeSelectors.labelText)\n .attr('dy', '0.32em')\n labelText.append('tspan').attr('class', nodeSelectors.labelTextContent)\n labelText.append('tspan')\n .attr('class', nodeSelectors.subLabelTextContent)\n .attr('dy', '1.1em')\n .attr('x', '0')\n })\n}\n\nexport function updateNodeSelectedGreyout<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>\n): void {\n const { nodeDisabled } = config\n\n selection.each((d, i, elements) => {\n const group: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown> = select(elements[i])\n const isGreyout = getBoolean(d, nodeDisabled, d._index) || d._state.greyout\n\n group.classed(nodeSelectors.greyedOutNode, isGreyout)\n .classed(nodeSelectors.draggable, !config.disableDrag)\n\n const nodeSelectionOutline = group.selectAll<SVGGElement, GraphNode<N, L>>(`.${nodeSelectors.nodeSelection}`)\n nodeSelectionOutline.classed(nodeSelectors.nodeSelectionActive, d._state.selected)\n\n group.selectAll<SVGTextElement, GraphCircleLabel>(`.${nodeSelectors.sideLabel}`)\n .style('fill', (l) => isGreyout ? null : getSideLabelTextColor(l, selection.node()))\n\n group.selectAll<SVGRectElement, GraphCircleLabel>(`.${nodeSelectors.sideLabelBackground}`)\n .style('fill', (l) => isGreyout ? null : l.color)\n })\n}\n\nexport function updateNodes<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n duration: number,\n scale = 1\n): Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown> | Transition<SVGGElement, GraphNode<N, L>, SVGGElement, unknown> {\n const {\n nodeGaugeAnimDuration, nodeStrokeWidth, nodeShape, nodeSize, nodeGaugeValue, nodeGaugeFill,\n nodeIcon, nodeIconSize, nodeLabel, nodeLabelTrim, nodeLabelTrimMode, nodeLabelTrimLength,\n nodeSubLabel, nodeSubLabelTrim, nodeSubLabelTrimMode, nodeSubLabelTrimLength,\n nodeSideLabels, nodeStroke, nodeFill, nodeBottomIcon,\n } = config\n\n const nodeGroupsUpdate = smartTransition(selection, duration)\n .attr('transform', d => `translate(${getX(d)}, ${getY(d)}) scale(1)`)\n .attr('opacity', 1)\n\n // If there's a custom render function, use it\n if (config.nodeUpdateCustomRenderFunction) {\n selection.each((d, i, elements) => {\n config.nodeUpdateCustomRenderFunction(d, elements[i], config, duration, scale)\n })\n\n return nodeGroupsUpdate\n }\n\n // Default node rendering\n // Re-create nodes to update shapes if they were changed\n selection.each((d, i, elements) => {\n const element = elements[i] as GraphNodeSVGGElement\n const group = select<SVGGElement, GraphNode<N, L>>(element)\n const shape = getString(d, nodeShape, d._index)\n\n if (element.nodeShape !== shape) {\n group.select(`.${nodeSelectors.node}`).remove()\n appendShape(group, nodeShape, nodeSelectors.node, nodeSelectors.customNode, d._index, `.${nodeSelectors.nodeSelection}`)\n group.select(`.${nodeSelectors.nodeSelection}`).remove()\n appendShape(group, shape, nodeSelectors.nodeSelection, null, d._index, `.${nodeSelectors.nodeGauge}`)\n element.nodeShape = shape\n }\n })\n\n // Update nodes themselves\n selection.each((d, i, elements) => {\n const groupElement = elements[i] as GraphNodeSVGGElement\n const group: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown> = select(groupElement)\n const node: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown> = group.select(`.${nodeSelectors.node}`)\n const nodeArc = group.select<GraphNodeAnimatedElement<SVGElement>>(`.${nodeSelectors.nodeGauge}`)\n const icon = group.select<SVGTextElement>(`.${nodeSelectors.nodeIcon}`)\n const sideLabelsGroup = group.select<SVGGElement>(`.${nodeSelectors.sideLabelsGroup}`)\n const label = group.select<SVGGElement>(`.${nodeSelectors.label}`)\n const labelTextContent = label.select<SVGTextElement>(`.${nodeSelectors.labelTextContent}`)\n const sublabelTextContent = label.select<SVGTextElement>(`.${nodeSelectors.subLabelTextContent}`)\n const bottomIcon = group.select<SVGTextElement>(`.${nodeSelectors.nodeBottomIcon}`)\n const nodeSelectionOutline = group.select<SVGGElement>(`.${nodeSelectors.nodeSelection}`)\n const nodeSizeValue = getNodeSize(d, nodeSize, d._index)\n const arcGenerator = arc<GraphNodeAnimationState>()\n .innerRadius(state => state.nodeSize / 2 - state.borderWidth / 2)\n .outerRadius(state => state.nodeSize / 2 + state.borderWidth / 2)\n .startAngle(0 * (Math.PI / 180))\n // eslint-disable-next-line dot-notation\n .endAngle(a => a['endAngle'])\n\n group\n .classed(generalSelectors.zoomOutLevel2, scale < ZoomLevel.Level2)\n .classed(nodeSelectors.nodeIsDragged, (d: GraphNode<N, L>) => d._state.isDragged)\n\n // Update Group\n group\n .classed(nodeSelectors.nodePolygon, () => {\n const shape = getString(d, nodeShape, d._index)\n return shape === GraphNodeShape.Triangle || shape === GraphNodeShape.Hexagon || shape === GraphNodeShape.Square\n })\n\n // Update Node\n node\n .call(updateShape, nodeShape, nodeSize, d._index)\n .attr('stroke-width', getNumber(d, nodeStrokeWidth, d._index) ?? 0)\n .style('fill', getNodeColor(d, nodeFill, d._index))\n .style('stroke', getColor(d, nodeStroke, d._index, true) ?? null)\n\n const nodeBBox = (node.node() as SVGGraphicsElement).getBBox()\n\n nodeArc\n .attr('stroke-width', getNumber(d, nodeStrokeWidth, d._index))\n .style('display', !getNumber(d, nodeGaugeValue, d._index) ? 'none' : null)\n .style('fill', getNodeColor(d, nodeGaugeFill, d._index))\n .style('stroke', getNodeColor(d, nodeGaugeFill, d._index))\n .style('stroke-opacity', d => getString(d, nodeShape, d._index) === GraphNodeShape.Circle ? 0 : null)\n\n nodeArc\n .transition()\n .duration(nodeGaugeAnimDuration)\n .attrTween('d', (\n d,\n j,\n arr\n ) => {\n switch (getString(d, nodeShape, d._index)) {\n case GraphNodeShape.Circle: return arcTween(d, config, arcGenerator, arr[j])\n case GraphNodeShape.Hexagon: return polyTween(d, config, polygon, arr[j])\n case GraphNodeShape.Square: return polyTween(d, config, polygon, arr[j])\n case GraphNodeShape.Triangle: return polyTween(d, config, polygon, arr[j])\n default: return null\n }\n })\n\n // Set Node Selection\n updateShape(nodeSelectionOutline, nodeShape, nodeSize, d._index)\n\n // Update Node Icon\n const nodeIconValue = getString(d, nodeIcon, d._index)\n const nodeIconSizeValue = getNumber(d, nodeIconSize, d._index) ?? 2.5 * Math.sqrt(nodeSizeValue)\n const nodeIconColor = getNodeIconColor(d, nodeFill, d._index, selection.node())\n const shouldRenderUseElement = isInternalHref(nodeIconValue)\n\n if (groupElement.nodeIcon !== nodeIconValue) {\n // If the icon has changed, we remove all children and re-render\n icon.selectAll('*').remove()\n // If the icon is a href, we need to append a <use> element. If it's a text we append the `<text>` element.\n icon.append(shouldRenderUseElement ? 'use' : 'text')\n groupElement.nodeIcon = nodeIconValue\n }\n\n if (shouldRenderUseElement) {\n icon.select('use')\n .attr('href', nodeIconValue)\n .attr('x', -nodeIconSizeValue / 2)\n .attr('y', -nodeIconSizeValue / 2)\n .attr('width', nodeIconSizeValue)\n .attr('height', nodeIconSizeValue)\n .style('fill', nodeIconColor)\n } else {\n icon.select('text')\n .style('font-size', `${nodeIconSizeValue}px`)\n .attr('dy', '0.1em')\n .style('fill', nodeIconColor)\n .html(nodeIconValue)\n }\n\n // Side Labels\n const sideLabelsData = getValue<GraphNode<N, L>, GraphCircleLabel[]>(d, nodeSideLabels, d._index) || []\n const sideLabels = sideLabelsGroup.selectAll<SVGGElement, GraphCircleLabel>('g').data(sideLabelsData)\n const sideLabelsEnter = sideLabels.enter().append('g')\n .attr('class', nodeSelectors.sideLabelGroup)\n sideLabelsEnter.append('circle')\n .attr('class', nodeSelectors.sideLabelBackground)\n .attr('r', l => l.radius ?? SIDE_LABEL_DEFAULT_RADIUS)\n sideLabelsEnter.append('text')\n .attr('class', nodeSelectors.sideLabel)\n\n const sideLabelsUpdate = sideLabels.merge(sideLabelsEnter)\n .style('cursor', l => l.cursor ?? null)\n\n // Side label text\n sideLabelsUpdate.select(`.${nodeSelectors.sideLabel}`).html(d => d.text)\n .attr('dy', '0.1em')\n .style('fill', l => l.textColor ?? getSideLabelTextColor(l, selection.node()))\n .style('font-size', l => l.fontSize ?? `${(2 + (l.radius ?? SIDE_LABEL_DEFAULT_RADIUS)) / Math.pow(l.text.toString().length, 0.3)}px`)\n // Side label circle background\n sideLabelsUpdate.select(`.${nodeSelectors.sideLabelBackground}`)\n .style('fill', l => l.color)\n\n sideLabelsUpdate.attr('transform', (l, j) => {\n if (sideLabelsData.length === 1) return `translate(${nodeSizeValue / 2.5}, ${-nodeSizeValue / 2.5})`\n const r = 1.05 * nodeSizeValue / 2\n const angle = j * 1.15 * 2 * Math.atan2(l.radius ?? SIDE_LABEL_DEFAULT_RADIUS, r) - Math.PI / 3\n return `translate(${r * Math.cos(angle)}, ${r * Math.sin(angle)})`\n })\n\n sideLabels.exit().remove()\n\n // Set label and sub-label text\n const labelText = getString(d, nodeLabel, d._index)\n const sublabelText = getString(d, nodeSubLabel, d._index)\n const labelTextTrimmed = getBoolean(d, nodeLabelTrim, d._index)\n ? trimString(labelText, getNumber(d, nodeLabelTrimLength, d._index), getValue(d, nodeLabelTrimMode as TrimMode, d._index))\n : labelText\n const sublabelTextTrimmed = getBoolean(d, nodeSubLabelTrim, d._index)\n ? trimString(sublabelText, getNumber(d, nodeSubLabelTrimLength, d._index), getValue(d, nodeSubLabelTrimMode as TrimMode, d._index))\n : sublabelText\n\n labelTextContent.text(labelTextTrimmed)\n sublabelTextContent.text(sublabelTextTrimmed)\n group\n .on('mouseenter', () => {\n labelTextContent.text(labelText)\n sublabelTextContent.text(sublabelText)\n setLabelRect(label, labelText, nodeSelectors.labelText)\n group.raise()\n })\n .on('mouseleave', () => {\n labelTextContent.text(labelTextTrimmed)\n sublabelTextContent.text(sublabelTextTrimmed)\n setLabelRect(label, labelTextTrimmed, nodeSelectors.labelText)\n })\n\n // Position label\n const labelFontSize = parseFloat(window.getComputedStyle(groupElement).getPropertyValue('--vis-graph-node-label-font-size')) || 12\n const labelMargin = LABEL_RECT_VERTICAL_PADDING + 1.25 * labelFontSize ** 1.03\n const nodeHeight = isStringSvg((getString(d, nodeShape, d._index)) as GraphNodeShape) ? nodeBBox.height : nodeSizeValue\n label.attr('transform', `translate(0, ${nodeHeight / 2 + labelMargin})`)\n if (scale >= ZoomLevel.Level3) setLabelRect(label, getString(d, nodeLabel, d._index), nodeSelectors.labelText)\n\n // Bottom Icon\n bottomIcon.html(getString(d, nodeBottomIcon, d._index))\n .attr('transform', `translate(0, ${nodeHeight / 2})`)\n })\n\n updateNodeSelectedGreyout(selection, config)\n\n return nodeGroupsUpdate\n}\n\nexport function removeNodes<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n duration: number,\n scale = 1\n): void {\n smartTransition(selection, duration / 2)\n .attr('opacity', 0)\n .attr('transform', (d, i) => {\n const configuredPosition = getValue<GraphNode<N, L>, [number, number] | undefined>(d, config.nodeExitPosition, i)\n const scale = getNumber(d, config.nodeExitScale, i) ?? 0\n const x = configuredPosition?.[0] ?? getX(d)\n const y = configuredPosition?.[1] ?? getY(d)\n return `translate(${x}, ${y}) scale(${scale})`\n })\n .remove()\n\n // If there's a custom render function, use it\n if (config.nodeExitCustomRenderFunction) {\n selection.each((d, i, elements) => {\n config.nodeExitCustomRenderFunction(d, elements[i], config, duration, scale)\n })\n }\n}\n\nfunction setLabelBackgroundRect<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>\n): void {\n const { nodeLabel } = config\n\n selection.each((d, i, elements) => {\n const group: Selection<SVGGElement, N, SVGGElement, N> = select(elements[i])\n const label: Selection<SVGGElement, N, SVGGElement, N> = group.select(`.${nodeSelectors.label}`)\n setLabelRect(label, getString(d, nodeLabel, i), nodeSelectors.labelText)\n })\n}\n\nconst setLabelBackgroundRectThrottled = throttle(setLabelBackgroundRect, 1000) as typeof setLabelBackgroundRect\n\nexport function zoomNodes<N extends GraphInputNode, L extends GraphInputLink> (\n selection: Selection<SVGGElement, GraphNode<N, L>, SVGGElement, unknown>,\n config: GraphConfigInterface<N, L>,\n scale: number\n): void {\n selection.classed(generalSelectors.zoomOutLevel1, scale < ZoomLevel.Level1)\n selection.classed(generalSelectors.zoomOutLevel2, scale < ZoomLevel.Level2)\n\n selection.selectAll(`${nodeSelectors.sideLabelBackground}`)\n .attr('transform', `scale(${1 / Math.pow(scale, 0.35)})`)\n selection.selectAll(`.${nodeSelectors.sideLabel}`)\n .attr('transform', `scale(${1 / Math.pow(scale, 0.45)})`)\n\n if (scale >= ZoomLevel.Level3 && !config.nodeEnterCustomRenderFunction) selection.call(setLabelBackgroundRectThrottled, config)\n}\n\nexport const zoomNodesThrottled = throttle(zoomNodes, 500)\n"],"names":["nodeSelectors.node","nodeSelectors.customNode","nodeSelectors.nodeSelection","nodeSelectors.nodeGauge","nodeSelectors.nodeIcon","nodeSelectors.sideLabelsGroup","nodeSelectors.nodeBottomIcon","label","nodeSelectors.label","nodeSelectors.labelBackground","labelText","nodeSelectors.labelText","nodeSelectors.labelTextContent","nodeSelectors.subLabelTextContent","nodeSelectors.greyedOutNode","nodeSelectors.draggable","nodeSelectors.nodeSelectionActive","nodeSelectors.sideLabel","nodeSelectors.sideLabelBackground","nodeIcon","nodeBottomIcon","node","sideLabelsGroup","labelTextContent","generalSelectors.zoomOutLevel2","nodeSelectors.nodeIsDragged","nodeSelectors.nodePolygon","nodeSelectors.sideLabelGroup","generalSelectors.zoomOutLevel1"],"mappings":";;;;;;;;;;;;;;;AA2CA,MAAM,yBAAyB,GAAG,EAAE,CAAA;AAO9B,SAAU,WAAW,CACzB,SAAwE,EACxE,MAAkC,EAClC,QAAgB,EAChB,KAAK,GAAG,CAAC,EAAA;IAET,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,KAAI;AAChC,QAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAyB,CAAA;AACnD,QAAA,MAAM,KAAK,GAAG,MAAM,CAA+B,OAAO,CAAC,CAAA;QAC3D,KAAK;aACF,IAAI,CAAC,WAAW,EAAE,CAAC,CAAkB,EAAE,CAAC,KAAI;;AAC3C,YAAA,MAAM,kBAAkB,GAAG,QAAQ,CAAgD,CAAC,EAAE,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAA;AAClH,YAAA,MAAM,KAAK,GAAG,CAAA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,CAACD,OAAK,EAAE,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAEI,SAAuB,CAAC,CAAA;AAC1E,KAAC,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,+BAA+B,GAAG,QAAQ,CAAC,sBAAsB,EAAE,IAAI,CAAkC,CAAA;SAE/F,SAAS,CACvB,SAAwE,EACxE,MAAkC,EAClC,KAAa,EAAA;AAEb,IAAA,SAAS,CAAC,OAAO,CAACiB,aAA8B,EAAE,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,CAAA;AAC3E,IAAA,SAAS,CAAC,OAAO,CAACJ,aAA8B,EAAE,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,CAAA;IAE3E,SAAS,CAAC,SAAS,CAAC,CAAA,EAAGN,mBAAiC,EAAE,CAAC;AACxD,SAAA,IAAI,CAAC,WAAW,EAAE,CAAS,MAAA,EAAA,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA,CAAA,CAAG,CAAC,CAAA;IAC3D,SAAS,CAAC,SAAS,CAAC,CAAA,CAAA,EAAID,SAAuB,EAAE,CAAC;AAC/C,SAAA,IAAI,CAAC,WAAW,EAAE,CAAS,MAAA,EAAA,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA,CAAA,CAAG,CAAC,CAAA;IAE3D,IAAI,KAAK,IAAI,SAAS,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,6BAA6B;AAAE,QAAA,SAAS,CAAC,IAAI,CAAC,+BAA+B,EAAE,MAAM,CAAC,CAAA;AACjI,CAAC;AAEY,MAAA,kBAAkB,GAAG,QAAQ,CAAC,SAAS,EAAE,GAAG;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export declare const nodes: string;
|
|
2
2
|
export declare const variables: void;
|
|
3
|
-
export declare const brushable: string;
|
|
4
3
|
export declare const node: string;
|
|
5
4
|
export declare const nodeIcon: string;
|
|
6
5
|
export declare const nodeBottomIcon: string;
|
|
@@ -23,4 +22,3 @@ export declare const nodeGauge: string;
|
|
|
23
22
|
export declare const nodePolygon: string;
|
|
24
23
|
export declare const customNode: string;
|
|
25
24
|
export declare const greyedOutNode: string;
|
|
26
|
-
export declare const brushed: string;
|
|
@@ -67,11 +67,6 @@ const variables = injectGlobal `
|
|
|
67
67
|
--vis-dark-graph-node-icon-greyout-color: var(--vis-color-grey);
|
|
68
68
|
--vis-dark-graph-node-side-label-background-greyout-color: #494B56;
|
|
69
69
|
|
|
70
|
-
/* Brushed */
|
|
71
|
-
--vis-graph-brushed-node-stroke-color: var(--vis-color-main);
|
|
72
|
-
--vis-graph-brushed-node-label-text-color: var(--vis-color-main);
|
|
73
|
-
--vis-graph-brushed-node-icon-fill-color: var(--vis-color-main);
|
|
74
|
-
|
|
75
70
|
/* Misc */
|
|
76
71
|
--vis-graph-node-dominant-baseline: middle;
|
|
77
72
|
}
|
|
@@ -101,18 +96,12 @@ const variables = injectGlobal `
|
|
|
101
96
|
--vis-graph-node-side-label-background-greyout-color: var(--vis-dark-graph-node-side-label-background-greyout-color);
|
|
102
97
|
}
|
|
103
98
|
`;
|
|
104
|
-
const brushable = css `
|
|
105
|
-
label: brushable;
|
|
106
|
-
`;
|
|
107
99
|
const node = css `
|
|
108
100
|
label: node-shape;
|
|
109
101
|
|
|
110
102
|
stroke: var(--vis-graph-node-stroke-color);
|
|
111
103
|
fill: var(--vis-graph-node-fill-color);
|
|
112
|
-
|
|
113
|
-
:not(.${brushable}) {
|
|
114
|
-
transition: .4s fill, 4s stroke;
|
|
115
|
-
}
|
|
104
|
+
transition: .4s fill, .4s stroke;
|
|
116
105
|
`;
|
|
117
106
|
const nodeIcon = css `
|
|
118
107
|
label: icon;
|
|
@@ -121,11 +110,8 @@ const nodeIcon = css `
|
|
|
121
110
|
dominant-baseline: var(--vis-graph-node-dominant-baseline);
|
|
122
111
|
text-anchor: middle;
|
|
123
112
|
pointer-events: none;
|
|
113
|
+
transition: .4s all;
|
|
124
114
|
fill: var(--vis-graph-node-icon-fill-color);
|
|
125
|
-
|
|
126
|
-
:not(.${brushable}) {
|
|
127
|
-
transition: .4s all;
|
|
128
|
-
}
|
|
129
115
|
`;
|
|
130
116
|
const nodeBottomIcon = css `
|
|
131
117
|
label: node-bottom-icon;
|
|
@@ -134,13 +120,10 @@ const nodeBottomIcon = css `
|
|
|
134
120
|
dominant-baseline: var(--vis-graph-node-dominant-baseline);
|
|
135
121
|
text-anchor: middle;
|
|
136
122
|
pointer-events: none;
|
|
123
|
+
transition: .4s fill;
|
|
137
124
|
fill: var(--vis-graph-node-bottom-icon-fill-color);
|
|
138
125
|
stroke: var(--vis-graph-node-bottom-icon-stroke-color);
|
|
139
126
|
stroke-width: var(--vis-graph-node-bottom-icon-stroke-width);
|
|
140
|
-
|
|
141
|
-
:not(.${brushable}) {
|
|
142
|
-
transition: .4s all;
|
|
143
|
-
}
|
|
144
127
|
`;
|
|
145
128
|
const nodeIsDragged = css `
|
|
146
129
|
label: dragged;
|
|
@@ -293,20 +276,7 @@ const greyedOutNode = css `
|
|
|
293
276
|
fill: var(--vis-graph-node-side-label-fill-color-bright) !important;
|
|
294
277
|
opacity: 0.25;
|
|
295
278
|
}
|
|
296
|
-
`;
|
|
297
|
-
const brushed = css `
|
|
298
|
-
label: brushed-node;
|
|
299
|
-
|
|
300
|
-
${`.${node}`} {
|
|
301
|
-
stroke: var(--vis-graph-brushed-node-stroke-color);
|
|
302
|
-
}
|
|
303
|
-
${`.${nodeIcon}`} {
|
|
304
|
-
fill: var(--vis-graph-brushed-node-icon-fill-color);
|
|
305
|
-
}
|
|
306
|
-
${`.${labelTextContent}`} {
|
|
307
|
-
fill: var(--vis-graph-brushed-node-label-text-color);
|
|
308
|
-
}
|
|
309
279
|
`;
|
|
310
280
|
|
|
311
|
-
export {
|
|
281
|
+
export { customNode, draggable, gNode, gNodeExit, greyedOutNode, label, labelBackground, labelText, labelTextContent, node, nodeBottomIcon, nodeGauge, nodeIcon, nodeIsDragged, nodePolygon, nodeSelection, nodeSelectionActive, nodes, sideLabel, sideLabelBackground, sideLabelGroup, sideLabelsGroup, subLabelTextContent, variables };
|
|
312
282
|
//# sourceMappingURL=style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sources":["../../../../../src/components/graph/modules/node/style.ts"],"sourcesContent":["import { css, injectGlobal } from '@emotion/css'\n\nexport const nodes = css`\n label: nodes;\n`\n\nexport const variables = injectGlobal`\n :root {\n /* Node Fill */\n --vis-graph-node-stroke-color: rgb(206, 211, 222);\n --vis-graph-node-fill-color: #fff;\n --vis-graph-node-gauge-color: #adb4c2;\n --vis-graph-node-selection-color: #acb3b8;\n\n --vis-dark-graph-node-stroke-color: rgba(30,30,30,.25);\n --vis-dark-graph-node-fill-color: #494b56;\n --vis-dark-graph-node-gauge-color: #989aa3;\n --vis-dark-graph-node-selection-color: #494b56;\n\n /* Node Central Icon */\n --vis-graph-node-icon-fill-color-bright: #ffffff;\n --vis-graph-node-icon-fill-color-dark: var(--vis-color-grey);\n --vis-graph-node-icon-fill-color: #9ea7b8;\n\n --vis-dark-graph-node-icon-fill-color: var(--vis-graph-node-icon-fill-color-bright);\n\n /* Node Bottom Icon */\n --vis-graph-node-bottom-icon-font-size: 14pt;\n --vis-graph-node-bottom-icon-fill-color: #a0a6ad;\n --vis-graph-node-bottom-icon-stroke-color: #fff;\n --vis-graph-node-bottom-icon-stroke-width: 2px;\n\n --vis-dark-graph-node-bottom-icon-fill-color: #a0a6ad;\n --vis-dark-graph-node-bottom-icon-stroke-color: #fff;\n\n /* Node Label */\n --vis-graph-node-label-font-size: 9pt;\n --vis-graph-node-label-background: #ffffff;\n --vis-graph-node-label-text-color: #0F1E57;\n --vis-graph-node-sublabel-text-color: #989aa3;\n --vis-graph-node-sublabel-font-size: 8pt;\n // Undefined by default to allow proper fallback to var(--vis-font-family)\n /* --vis-graph-node-label-font-family: */\n\n --vis-dark-graph-node-label-background: var(--vis-color-grey);\n --vis-dark-graph-node-label-text-color: #ffffff;\n --vis-dark-graph-node-sublabel-text-color: #989aa3;\n\n /* Node Side Labels (circular labels)*/\n --vis-graph-node-side-label-background-fill-color: #a0a9af;\n --vis-graph-node-side-label-background-stroke-color: #ffffff;\n --vis-graph-node-side-label-fill-color-bright: #ffffff;\n --vis-graph-node-side-label-fill-color-dark: #494b56;\n\n --vis-dark-graph-node-side-label-background-fill-color: #989aa3;\n --vis-dark-graph-node-side-label-background-stroke-color: var(--vis-color-grey);\n --vis-dark-graph-node-side-label-fill-color-bright: #f1f4f7;\n --vis-dark-graph-node-side-label-fill-color-dark: var(--vis-color-grey);\n\n /* Greyout */\n --vis-graph-node-greyout-opacity: 0.9;\n --vis-graph-node-greyout-filter: none;\n --vis-graph-node-greyout-color: #ebeff7;\n --vis-graph-node-icon-greyout-color: #c6cad1;\n --vis-graph-node-side-label-background-greyout-color: #f1f4f7;\n\n --vis-dark-graph-node-greyout-color: #494b56;\n --vis-dark-graph-node-icon-greyout-color: var(--vis-color-grey);\n --vis-dark-graph-node-side-label-background-greyout-color: #494B56;\n\n /* Brushed */\n --vis-graph-brushed-node-stroke-color: var(--vis-color-main);\n --vis-graph-brushed-node-label-text-color: var(--vis-color-main);\n --vis-graph-brushed-node-icon-fill-color: var(--vis-color-main);\n \n /* Misc */\n --vis-graph-node-dominant-baseline: middle;\n }\n\n body.theme-dark ${`.${nodes}`} {\n --vis-graph-node-stroke-color: var(--vis-dark-graph-node-stroke-color);\n --vis-graph-node-fill-color: var(--vis-dark-graph-node-fill-color);\n --vis-graph-node-gauge-color: var(--vis-dark-graph-node-gauge-color);\n --vis-graph-node-selection-color: var(--vis-dark-graph-node-selection-color);\n\n --vis-graph-node-icon-fill-color: var(--vis-dark-graph-node-icon-fill-color);\n\n --vis-graph-node-bottom-icon-fill-color: var(--vis-dark-graph-node-bottom-icon-fill-color);\n --vis-graph-node-bottom-icon-stroke-color: var(--vis-dark-graph-node-bottom-icon-stroke-color);\n\n --vis-graph-node-label-background: var(--vis-dark-graph-node-label-background);\n --vis-graph-node-label-text-color: var(--vis-dark-graph-node-label-text-color);\n --vis-graph-node-sublabel-text-color: var(--vis-dark-graph-node-sublabel-text-color);\n\n --vis-graph-node-side-label-background-fill-color: var(--vis-dark-graph-node-side-label-background-fill-color);\n --vis-graph-node-side-label-background-stroke-color: var(--vis-dark-graph-side-label-background-stroke-color);\n --vis-graph-node-side-label-fill-color-bright: var(--vis-dark-graph-node-side-label-fill-color-bright);\n --vis-graph-node-side-label-fill-color-dark: var(vis-dark-graph-node-side-label-fill-color-dark);\n\n --vis-graph-node-greyout-color: var(--vis-dark-graph-node-greyout-color);\n --vis-graph-node-icon-greyout-color: var(--vis-dark-graph-node-icon-greyout-color);\n --vis-graph-node-side-label-background-greyout-color: var(--vis-dark-graph-node-side-label-background-greyout-color);\n }\n`\n\nexport const brushable = css`\n label: brushable;\n`\n\n\nexport const node = css`\n label: node-shape;\n\n stroke: var(--vis-graph-node-stroke-color);\n fill: var(--vis-graph-node-fill-color);\n\n :not(.${brushable}) {\n transition: .4s fill, 4s stroke;\n }\n`\n\nexport const nodeIcon = css`\n label: icon;\n\n font-family: var(--vis-graph-icon-font-family), var(--vis-font-family);\n dominant-baseline: var(--vis-graph-node-dominant-baseline);\n text-anchor: middle;\n pointer-events: none;\n fill: var(--vis-graph-node-icon-fill-color);\n\n :not(.${brushable}) {\n transition: .4s all;\n }\n`\n\nexport const nodeBottomIcon = css`\n label: node-bottom-icon;\n font-family: var(--vis-graph-icon-font-family), var(--vis-font-family);\n font-size: var(--vis-graph-node-bottom-icon-font-size);\n dominant-baseline: var(--vis-graph-node-dominant-baseline);\n text-anchor: middle;\n pointer-events: none;\n fill: var(--vis-graph-node-bottom-icon-fill-color);\n stroke: var(--vis-graph-node-bottom-icon-stroke-color);\n stroke-width: var(--vis-graph-node-bottom-icon-stroke-width);\n\n :not(.${brushable}) {\n transition: .4s all;\n }\n`\n\nexport const nodeIsDragged = css`\n label: dragged;\n`\n\nexport const label = css`\n label: label;\n\n text-anchor: middle;\n font-weight: 300;\n font-size: var(--vis-graph-node-label-font-size);\n`\n\nexport const labelBackground = css`\n label: background;\n\n opacity: 0.9;\n -webkit-backdrop-filter: blur(2px);\n backdrop-filter: blur(2px);\n fill: var(--vis-graph-node-label-background);\n`\n\nexport const labelText = css`\n label: label-text;\n`\n\nexport const labelTextContent = css`\n label: label-text-content;\n\n fill: var(--vis-graph-node-label-text-color);\n font-family: var(--vis-graph-node-label-font-family, var(--vis-font-family));\n`\n\nexport const subLabelTextContent = css`\n label: sublabel-text-content;\n\n fill: var(--vis-graph-node-sublabel-text-color);\n font-family: var(--vis-graph-node-label-font-family, var(--vis-font-family));\n font-size: var(--vis-graph-node-sublabel-font-size);\n`\n\nexport const sideLabelsGroup = css`\n label: side-labels-group;\n`\n\nexport const sideLabelBackground = css`\n label: side-label-background;\n\n stroke-opacity: 0.8;\n stroke: var(--vis-graph-node-side-label-background-stroke-color);\n fill: var(--vis-graph-node-side-label-background-fill-color);\n`\n\nexport const sideLabel = css`\n label: side-label;\n\n font-family: var(--vis-graph-icon-font-family), var(--vis-font-family);\n dominant-baseline: var(--vis-graph-node-dominant-baseline);\n text-anchor: middle;\n font-size: 16px;\n fill: var(--vis-graph-node-side-label-fill-color-bright);\n`\n\nexport const sideLabelGroup = css`\n label: side-label-group;\n cursor: default;\n`\n\nexport const gNode = css`\n label: g-node;\n\n transition: .25s opacity;\n`\n\nexport const draggable = css`\n label: draggable;\n\n &:hover {\n cursor: grab;\n }\n\n &${`.${nodeIsDragged}`} {\n cursor: grabbing;\n }\n`\n\nexport const gNodeExit = css`\n label: g-node-exit;\n pointer-events: none;\n`\n\nexport const nodeSelectionActive = css`\n label: active;\n`\n\nexport const nodeSelection = css`\n label: node-selection;\n\n fill: none;\n stroke-width: 1;\n stroke-dasharray: 3 3;\n opacity: 0;\n transition: 350ms cubic-bezier(0.165, 0.840, 0.440, 1.000);\n transform: scale(.5);\n fill: var(--vis-graph-node-selection-color);\n fill-opacity: 0.1;\n stroke: var(--vis-graph-node-selection-color);\n stroke-opacity: 0.75;\n\n &${`.${nodeSelectionActive}`} {\n opacity: 1;\n transform: scale(1.2);\n }\n`\n\nexport const nodeGauge = css`\n label: node-gauge;\n\n fill: var(--vis-graph-node-gauge-color);\n transition: .4s fill;\n`\n\nexport const nodePolygon = css`\n label: polygon;\n\n ${`.${nodeGauge}`} {\n fill-opacity: 0;\n stroke-linecap: round;\n pointer-events: none;\n }\n`\n\nexport const customNode = css`\n label: custom-node;\n\n stroke-width: 0;\n`\n\nexport const greyedOutNode = css`\n label: greyed-out;\n opacity: var(--vis-graph-node-greyout-opacity);\n filter: var(--vis-graph-node-greyout-filter);\n\n ${`.${node}`} {\n fill: var(--vis-graph-node-greyout-color) !important;\n stroke: var(--vis-graph-node-greyout-color) !important;\n }\n\n ${`.${nodeIcon}`} {\n fill: var(--vis-graph-node-icon-greyout-color) !important;\n }\n\n ${`.${nodeGauge}`} {\n fill: var(--vis-graph-node-greyout-color) !important;\n stroke: var(--vis-graph-node-greyout-color) !important;\n }\n\n ${`.${label}`} {\n opacity: 0.5;\n }\n\n ${`.${sideLabelBackground}`} {\n fill: var(--vis-graph-node-side-label-background-greyout-color) !important;\n stroke-opacity: 0.5;\n }\n\n ${`.${sideLabel}`} {\n fill: var(--vis-graph-node-side-label-fill-color-bright) !important;\n opacity: 0.25;\n }\n`\n\nexport const brushed = css`\n label: brushed-node;\n\n ${`.${node}`} {\n stroke: var(--vis-graph-brushed-node-stroke-color);\n }\n ${`.${nodeIcon}`} {\n fill: var(--vis-graph-brushed-node-icon-fill-color);\n }\n ${`.${labelTextContent}`} {\n fill: var(--vis-graph-brushed-node-label-text-color);\n }\n`\n"],"names":[],"mappings":";;AAEO,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;EAEvB;AAEM,MAAM,SAAS,GAAG,YAAY,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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GAAG,GAAG,CAAA,CAAA;;EAErC;AAEM,MAAM,aAAa,GAAG,GAAG,CAAA,CAAA;;;;;;;;;;;;;;AAc3B,GAAA,EAAA,CAAA,CAAA,EAAI,mBAAmB,CAAE,CAAA,CAAA;;;;EAI7B;AAEM,MAAM,SAAS,GAAG,GAAG,CAAA,CAAA;;;;;EAK3B;AAEM,MAAM,WAAW,GAAG,GAAG,CAAA,CAAA;;;AAG1B,EAAA,EAAA,CAAA,CAAA,EAAI,SAAS,CAAE,CAAA,CAAA;;;;;EAKlB;AAEM,MAAM,UAAU,GAAG,GAAG,CAAA,CAAA;;;;EAI5B;AAEM,MAAM,aAAa,GAAG,GAAG,CAAA,CAAA;;;;;AAK5B,EAAA,EAAA,CAAA,CAAA,EAAI,IAAI,CAAE,CAAA,CAAA;;;;;AAKV,EAAA,EAAA,CAAA,CAAA,EAAI,QAAQ,CAAE,CAAA,CAAA;;;;AAId,EAAA,EAAA,CAAA,CAAA,EAAI,SAAS,CAAE,CAAA,CAAA;;;;;AAKf,EAAA,EAAA,CAAA,CAAA,EAAI,KAAK,CAAE,CAAA,CAAA;;;;AAIX,EAAA,EAAA,CAAA,CAAA,EAAI,mBAAmB,CAAE,CAAA,CAAA;;;;;AAKxB,GAAA,EAAA,CAAA,CAAA,EAAI,SAAS,CAAE,CAAA,CAAA;;;;EAInB;AAEM,MAAM,OAAO,GAAG,GAAG,CAAA,CAAA;;;AAGtB,EAAA,EAAA,CAAA,CAAA,EAAI,IAAI,CAAE,CAAA,CAAA;;;AAGV,EAAA,EAAA,CAAA,CAAA,EAAI,QAAQ,CAAE,CAAA,CAAA;;;AAGd,EAAA,EAAA,CAAA,CAAA,EAAI,gBAAgB,CAAE,CAAA,CAAA;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"style.js","sources":["../../../../../src/components/graph/modules/node/style.ts"],"sourcesContent":["import { css, injectGlobal } from '@emotion/css'\n\nexport const nodes = css`\n label: nodes;\n`\n\nexport const variables = injectGlobal`\n :root {\n /* Node Fill */\n --vis-graph-node-stroke-color: rgb(206, 211, 222);\n --vis-graph-node-fill-color: #fff;\n --vis-graph-node-gauge-color: #adb4c2;\n --vis-graph-node-selection-color: #acb3b8;\n\n --vis-dark-graph-node-stroke-color: rgba(30,30,30,.25);\n --vis-dark-graph-node-fill-color: #494b56;\n --vis-dark-graph-node-gauge-color: #989aa3;\n --vis-dark-graph-node-selection-color: #494b56;\n\n /* Node Central Icon */\n --vis-graph-node-icon-fill-color-bright: #ffffff;\n --vis-graph-node-icon-fill-color-dark: var(--vis-color-grey);\n --vis-graph-node-icon-fill-color: #9ea7b8;\n\n --vis-dark-graph-node-icon-fill-color: var(--vis-graph-node-icon-fill-color-bright);\n\n /* Node Bottom Icon */\n --vis-graph-node-bottom-icon-font-size: 14pt;\n --vis-graph-node-bottom-icon-fill-color: #a0a6ad;\n --vis-graph-node-bottom-icon-stroke-color: #fff;\n --vis-graph-node-bottom-icon-stroke-width: 2px;\n\n --vis-dark-graph-node-bottom-icon-fill-color: #a0a6ad;\n --vis-dark-graph-node-bottom-icon-stroke-color: #fff;\n\n /* Node Label */\n --vis-graph-node-label-font-size: 9pt;\n --vis-graph-node-label-background: #ffffff;\n --vis-graph-node-label-text-color: #0F1E57;\n --vis-graph-node-sublabel-text-color: #989aa3;\n --vis-graph-node-sublabel-font-size: 8pt;\n // Undefined by default to allow proper fallback to var(--vis-font-family)\n /* --vis-graph-node-label-font-family: */\n\n --vis-dark-graph-node-label-background: var(--vis-color-grey);\n --vis-dark-graph-node-label-text-color: #ffffff;\n --vis-dark-graph-node-sublabel-text-color: #989aa3;\n\n /* Node Side Labels (circular labels)*/\n --vis-graph-node-side-label-background-fill-color: #a0a9af;\n --vis-graph-node-side-label-background-stroke-color: #ffffff;\n --vis-graph-node-side-label-fill-color-bright: #ffffff;\n --vis-graph-node-side-label-fill-color-dark: #494b56;\n\n --vis-dark-graph-node-side-label-background-fill-color: #989aa3;\n --vis-dark-graph-node-side-label-background-stroke-color: var(--vis-color-grey);\n --vis-dark-graph-node-side-label-fill-color-bright: #f1f4f7;\n --vis-dark-graph-node-side-label-fill-color-dark: var(--vis-color-grey);\n\n /* Greyout */\n --vis-graph-node-greyout-opacity: 0.9;\n --vis-graph-node-greyout-filter: none;\n --vis-graph-node-greyout-color: #ebeff7;\n --vis-graph-node-icon-greyout-color: #c6cad1;\n --vis-graph-node-side-label-background-greyout-color: #f1f4f7;\n\n --vis-dark-graph-node-greyout-color: #494b56;\n --vis-dark-graph-node-icon-greyout-color: var(--vis-color-grey);\n --vis-dark-graph-node-side-label-background-greyout-color: #494B56;\n\n /* Misc */\n --vis-graph-node-dominant-baseline: middle;\n }\n\n body.theme-dark ${`.${nodes}`} {\n --vis-graph-node-stroke-color: var(--vis-dark-graph-node-stroke-color);\n --vis-graph-node-fill-color: var(--vis-dark-graph-node-fill-color);\n --vis-graph-node-gauge-color: var(--vis-dark-graph-node-gauge-color);\n --vis-graph-node-selection-color: var(--vis-dark-graph-node-selection-color);\n\n --vis-graph-node-icon-fill-color: var(--vis-dark-graph-node-icon-fill-color);\n\n --vis-graph-node-bottom-icon-fill-color: var(--vis-dark-graph-node-bottom-icon-fill-color);\n --vis-graph-node-bottom-icon-stroke-color: var(--vis-dark-graph-node-bottom-icon-stroke-color);\n\n --vis-graph-node-label-background: var(--vis-dark-graph-node-label-background);\n --vis-graph-node-label-text-color: var(--vis-dark-graph-node-label-text-color);\n --vis-graph-node-sublabel-text-color: var(--vis-dark-graph-node-sublabel-text-color);\n\n --vis-graph-node-side-label-background-fill-color: var(--vis-dark-graph-node-side-label-background-fill-color);\n --vis-graph-node-side-label-background-stroke-color: var(--vis-dark-graph-side-label-background-stroke-color);\n --vis-graph-node-side-label-fill-color-bright: var(--vis-dark-graph-node-side-label-fill-color-bright);\n --vis-graph-node-side-label-fill-color-dark: var(vis-dark-graph-node-side-label-fill-color-dark);\n\n --vis-graph-node-greyout-color: var(--vis-dark-graph-node-greyout-color);\n --vis-graph-node-icon-greyout-color: var(--vis-dark-graph-node-icon-greyout-color);\n --vis-graph-node-side-label-background-greyout-color: var(--vis-dark-graph-node-side-label-background-greyout-color);\n }\n`\n\nexport const node = css`\n label: node-shape;\n\n stroke: var(--vis-graph-node-stroke-color);\n fill: var(--vis-graph-node-fill-color);\n transition: .4s fill, .4s stroke;\n`\n\nexport const nodeIcon = css`\n label: icon;\n\n font-family: var(--vis-graph-icon-font-family), var(--vis-font-family);\n dominant-baseline: var(--vis-graph-node-dominant-baseline);\n text-anchor: middle;\n pointer-events: none;\n transition: .4s all;\n fill: var(--vis-graph-node-icon-fill-color);\n`\n\nexport const nodeBottomIcon = css`\n label: node-bottom-icon;\n font-family: var(--vis-graph-icon-font-family), var(--vis-font-family);\n font-size: var(--vis-graph-node-bottom-icon-font-size);\n dominant-baseline: var(--vis-graph-node-dominant-baseline);\n text-anchor: middle;\n pointer-events: none;\n transition: .4s fill;\n fill: var(--vis-graph-node-bottom-icon-fill-color);\n stroke: var(--vis-graph-node-bottom-icon-stroke-color);\n stroke-width: var(--vis-graph-node-bottom-icon-stroke-width);\n`\n\nexport const nodeIsDragged = css`\n label: dragged;\n`\n\nexport const label = css`\n label: label;\n\n text-anchor: middle;\n font-weight: 300;\n font-size: var(--vis-graph-node-label-font-size);\n`\n\nexport const labelBackground = css`\n label: background;\n\n opacity: 0.9;\n -webkit-backdrop-filter: blur(2px);\n backdrop-filter: blur(2px);\n fill: var(--vis-graph-node-label-background);\n`\n\nexport const labelText = css`\n label: label-text;\n`\n\nexport const labelTextContent = css`\n label: label-text-content;\n\n fill: var(--vis-graph-node-label-text-color);\n font-family: var(--vis-graph-node-label-font-family, var(--vis-font-family));\n`\n\nexport const subLabelTextContent = css`\n label: sublabel-text-content;\n\n fill: var(--vis-graph-node-sublabel-text-color);\n font-family: var(--vis-graph-node-label-font-family, var(--vis-font-family));\n font-size: var(--vis-graph-node-sublabel-font-size);\n`\n\nexport const sideLabelsGroup = css`\n label: side-labels-group;\n`\n\nexport const sideLabelBackground = css`\n label: side-label-background;\n\n stroke-opacity: 0.8;\n stroke: var(--vis-graph-node-side-label-background-stroke-color);\n fill: var(--vis-graph-node-side-label-background-fill-color);\n`\n\nexport const sideLabel = css`\n label: side-label;\n\n font-family: var(--vis-graph-icon-font-family), var(--vis-font-family);\n dominant-baseline: var(--vis-graph-node-dominant-baseline);\n text-anchor: middle;\n font-size: 16px;\n fill: var(--vis-graph-node-side-label-fill-color-bright);\n`\n\nexport const sideLabelGroup = css`\n label: side-label-group;\n cursor: default;\n`\n\nexport const gNode = css`\n label: g-node;\n\n transition: .25s opacity;\n`\n\nexport const draggable = css`\n label: draggable;\n\n &:hover {\n cursor: grab;\n }\n\n &${`.${nodeIsDragged}`} {\n cursor: grabbing;\n }\n`\n\nexport const gNodeExit = css`\n label: g-node-exit;\n pointer-events: none;\n`\n\nexport const nodeSelectionActive = css`\n label: active;\n`\n\nexport const nodeSelection = css`\n label: node-selection;\n\n fill: none;\n stroke-width: 1;\n stroke-dasharray: 3 3;\n opacity: 0;\n transition: 350ms cubic-bezier(0.165, 0.840, 0.440, 1.000);\n transform: scale(.5);\n fill: var(--vis-graph-node-selection-color);\n fill-opacity: 0.1;\n stroke: var(--vis-graph-node-selection-color);\n stroke-opacity: 0.75;\n\n &${`.${nodeSelectionActive}`} {\n opacity: 1;\n transform: scale(1.2);\n }\n`\n\nexport const nodeGauge = css`\n label: node-gauge;\n\n fill: var(--vis-graph-node-gauge-color);\n transition: .4s fill;\n`\n\nexport const nodePolygon = css`\n label: polygon;\n\n ${`.${nodeGauge}`} {\n fill-opacity: 0;\n stroke-linecap: round;\n pointer-events: none;\n }\n`\n\nexport const customNode = css`\n label: custom-node;\n\n stroke-width: 0;\n`\n\nexport const greyedOutNode = css`\n label: greyed-out;\n opacity: var(--vis-graph-node-greyout-opacity);\n filter: var(--vis-graph-node-greyout-filter);\n\n ${`.${node}`} {\n fill: var(--vis-graph-node-greyout-color) !important;\n stroke: var(--vis-graph-node-greyout-color) !important;\n }\n\n ${`.${nodeIcon}`} {\n fill: var(--vis-graph-node-icon-greyout-color) !important;\n }\n\n ${`.${nodeGauge}`} {\n fill: var(--vis-graph-node-greyout-color) !important;\n stroke: var(--vis-graph-node-greyout-color) !important;\n }\n\n ${`.${label}`} {\n opacity: 0.5;\n }\n\n ${`.${sideLabelBackground}`} {\n fill: var(--vis-graph-node-side-label-background-greyout-color) !important;\n stroke-opacity: 0.5;\n }\n\n ${`.${sideLabel}`} {\n fill: var(--vis-graph-node-side-label-fill-color-bright) !important;\n opacity: 0.25;\n }\n`\n"],"names":[],"mappings":";;AAEO,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;EAEvB;AAEM,MAAM,SAAS,GAAG,YAAY,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEjB,kBAAA,EAAA,CAAA,CAAA,EAAI,KAAK,CAAE,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;EAwB9B;AAEM,MAAM,IAAI,GAAG,GAAG,CAAA,CAAA;;;;;;EAMtB;AAEM,MAAM,QAAQ,GAAG,GAAG,CAAA,CAAA;;;;;;;;;EAS1B;AAEM,MAAM,cAAc,GAAG,GAAG,CAAA,CAAA;;;;;;;;;;;EAWhC;AAEM,MAAM,aAAa,GAAG,GAAG,CAAA,CAAA;;EAE/B;AAEM,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;;;;;EAMvB;AAEM,MAAM,eAAe,GAAG,GAAG,CAAA,CAAA;;;;;;;EAOjC;AAEM,MAAM,SAAS,GAAG,GAAG,CAAA,CAAA;;EAE3B;AAEM,MAAM,gBAAgB,GAAG,GAAG,CAAA,CAAA;;;;;EAKlC;AAEM,MAAM,mBAAmB,GAAG,GAAG,CAAA,CAAA;;;;;;EAMrC;AAEM,MAAM,eAAe,GAAG,GAAG,CAAA,CAAA;;EAEjC;AAEM,MAAM,mBAAmB,GAAG,GAAG,CAAA,CAAA;;;;;;EAMrC;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|
2
2
|
export declare const root: string;
|
|
3
3
|
export declare const background: string;
|
|
4
4
|
export declare const graphGroup: string;
|
|
5
|
-
export declare const brush: string;
|
|
6
5
|
export declare const zoomOutLevel1: string;
|
|
7
6
|
export declare const zoomOutLevel2: string;
|
|
@@ -6,9 +6,6 @@ import { gLink, flowCircle } from './modules/link/style.js';
|
|
|
6
6
|
const variables = injectGlobal `
|
|
7
7
|
:root {
|
|
8
8
|
--vis-graph-icon-font-family: ${UNOVIS_ICON_FONT_FAMILY_DEFAULT};
|
|
9
|
-
|
|
10
|
-
/* Brush */
|
|
11
|
-
--vis-graph-brush-selection-opacity: 0.2;
|
|
12
9
|
}
|
|
13
10
|
`;
|
|
14
11
|
// General
|
|
@@ -21,24 +18,6 @@ const background = css `
|
|
|
21
18
|
const graphGroup = css `
|
|
22
19
|
label: graph-group;
|
|
23
20
|
`;
|
|
24
|
-
const brush = css `
|
|
25
|
-
label: brush;
|
|
26
|
-
|
|
27
|
-
:not(.active) {
|
|
28
|
-
display: none;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.active {
|
|
32
|
-
.selection {
|
|
33
|
-
fill-opacity: 0;
|
|
34
|
-
stroke: none;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.handle {
|
|
38
|
-
display: none;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
`;
|
|
42
21
|
const zoomOutLevel1 = css `
|
|
43
22
|
label: zoom-out-level-1;
|
|
44
23
|
|
|
@@ -83,5 +62,5 @@ const zoomOutLevel2 = css `
|
|
|
83
62
|
}
|
|
84
63
|
`;
|
|
85
64
|
|
|
86
|
-
export { background,
|
|
65
|
+
export { background, graphGroup, root, variables, zoomOutLevel1, zoomOutLevel2 };
|
|
87
66
|
//# sourceMappingURL=style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sources":["../../../src/components/graph/style.ts"],"sourcesContent":["import { css, injectGlobal } from '@emotion/css'\nimport { UNOVIS_ICON_FONT_FAMILY_DEFAULT } from 'styles/index'\n\n// Nodes\nimport * as nodeSelectors from './modules/node/style'\n\n// Links\nimport * as linkSelectors from './modules/link/style'\n\nexport const variables = injectGlobal`\n :root {\n --vis-graph-icon-font-family: ${UNOVIS_ICON_FONT_FAMILY_DEFAULT};\n
|
|
1
|
+
{"version":3,"file":"style.js","sources":["../../../src/components/graph/style.ts"],"sourcesContent":["import { css, injectGlobal } from '@emotion/css'\nimport { UNOVIS_ICON_FONT_FAMILY_DEFAULT } from 'styles/index'\n\n// Nodes\nimport * as nodeSelectors from './modules/node/style'\n\n// Links\nimport * as linkSelectors from './modules/link/style'\n\nexport const variables = injectGlobal`\n :root {\n --vis-graph-icon-font-family: ${UNOVIS_ICON_FONT_FAMILY_DEFAULT};\n }\n`\n\n// General\nexport const root = css`\n label: graph-component;\n`\n\nexport const background = css`\n label: background;\n`\n\nexport const graphGroup = css`\n label: graph-group;\n`\n\nexport const zoomOutLevel1 = css`\n label: zoom-out-level-1;\n\n ${`.${nodeSelectors.label}`} {\n rect {\n stroke: none;\n }\n }\n`\n\nexport const zoomOutLevel2 = css`\n label: zoom-out-level-2;\n\n ${`.${nodeSelectors.label}`} {\n visibility: visible;\n }\n\n ${`.${nodeSelectors.nodeGauge}`} {\n visibility: visible;\n }\n\n ${`.${nodeSelectors.node}`} {\n stroke-width: 4px;\n }\n\n rect${`.${nodeSelectors.node}`} {\n stroke-width: 2px;\n }\n\n ${`.${linkSelectors.gLink}`} {\n animation: none;\n stroke-dasharray: none;\n }\n\n ${`.${linkSelectors.flowCircle}`} {\n display: none;\n }\n\n ${`.${nodeSelectors.nodeSelection}`} {\n &${`.${nodeSelectors.nodeSelectionActive}`} {\n transform: scale(1.15);\n }\n }\n`\n"],"names":["nodeSelectors.label","nodeSelectors.nodeGauge","nodeSelectors.node","linkSelectors.gLink","linkSelectors.flowCircle","nodeSelectors.nodeSelection","nodeSelectors.nodeSelectionActive"],"mappings":";;;;;AASO,MAAM,SAAS,GAAG,YAAY,CAAA,CAAA;;oCAED,+BAA+B,CAAA;;EAElE;AAED;AACO,MAAM,IAAI,GAAG,GAAG,CAAA,CAAA;;EAEtB;AAEM,MAAM,UAAU,GAAG,GAAG,CAAA,CAAA;;EAE5B;AAEM,MAAM,UAAU,GAAG,GAAG,CAAA,CAAA;;EAE5B;AAEM,MAAM,aAAa,GAAG,GAAG,CAAA,CAAA;;;IAG5B,CAAI,CAAA,EAAAA,KAAmB,CAAE,CAAA,CAAA;;;;;EAK5B;AAEM,MAAM,aAAa,GAAG,GAAG,CAAA,CAAA;;;IAG5B,CAAI,CAAA,EAAAA,KAAmB,CAAE,CAAA,CAAA;;;;IAIzB,CAAI,CAAA,EAAAC,SAAuB,CAAE,CAAA,CAAA;;;;IAI7B,CAAI,CAAA,EAAAC,IAAkB,CAAE,CAAA,CAAA;;;;QAIpB,CAAI,CAAA,EAAAA,IAAkB,CAAE,CAAA,CAAA;;;;IAI5B,CAAI,CAAA,EAAAC,KAAmB,CAAE,CAAA,CAAA;;;;;IAKzB,CAAI,CAAA,EAAAC,UAAwB,CAAE,CAAA,CAAA;;;;IAI9B,CAAI,CAAA,EAAAC,aAA2B,CAAE,CAAA,CAAA;OAC9B,CAAI,CAAA,EAAAC,mBAAiC,CAAE,CAAA,CAAA;;;;;;;;"}
|
|
@@ -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'\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
|
|
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'\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 };\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 /** Position of the label */\n labelPosition?: Position.Top | Position.Bottom | 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\n"],"names":[],"mappings":"IAuDY,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,GA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