@reltio/components 1.4.1846 → 1.4.1848
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/cjs/features/graph/SigmaGraphContainer/SigmaGraphContainer.d.ts +0 -1
- package/cjs/features/graph/SigmaGraphContainer/SigmaGraphContainer.js +2 -1
- package/cjs/features/graph/SigmaGraphContainer/styles.d.ts +1 -0
- package/cjs/features/graph/SigmaGraphContainer/styles.js +96 -0
- package/esm/features/graph/SigmaGraphContainer/SigmaGraphContainer.d.ts +0 -1
- package/esm/features/graph/SigmaGraphContainer/SigmaGraphContainer.js +2 -1
- package/esm/features/graph/SigmaGraphContainer/styles.d.ts +1 -0
- package/esm/features/graph/SigmaGraphContainer/styles.js +93 -0
- package/package.json +2 -2
|
@@ -31,7 +31,6 @@ var react_1 = __importStar(require("react"));
|
|
|
31
31
|
var graphology_1 = require("graphology");
|
|
32
32
|
var ramda_1 = require("ramda");
|
|
33
33
|
var core_1 = require("@react-sigma/core");
|
|
34
|
-
require("@react-sigma/core/lib/react-sigma.min.css");
|
|
35
34
|
var node_1 = require("sigma/rendering/webgl/programs/common/node");
|
|
36
35
|
var edge_1 = require("sigma/rendering/webgl/programs/common/edge");
|
|
37
36
|
var edge_2 = __importDefault(require("sigma/rendering/webgl/programs/edge"));
|
|
@@ -45,8 +44,10 @@ var edge_arrowHead_1 = __importDefault(require("../rendering/webgl/edge.arrowHea
|
|
|
45
44
|
var edge_reversedArrowHead_1 = __importDefault(require("../rendering/webgl/edge.reversedArrowHead"));
|
|
46
45
|
var edge_clamped_1 = __importDefault(require("../rendering/webgl/edge.clamped"));
|
|
47
46
|
var edge_dashed_1 = __importDefault(require("../rendering/webgl/edge.dashed"));
|
|
47
|
+
var styles_1 = require("./styles");
|
|
48
48
|
var SigmaGraphContainer = function (_a) {
|
|
49
49
|
var children = _a.children, initialSettingsProp = _a.initialSettings;
|
|
50
|
+
(0, styles_1.useStyles)();
|
|
50
51
|
var initialSettings = (0, react_1.useMemo)(function () {
|
|
51
52
|
return (0, ramda_1.mergeDeepRight)({
|
|
52
53
|
allowInvalidContainer: true,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"@global :root" | "@global div.react-sigma" | "@global div.sigma-container" | "@global .react-sigma-controls" | "@global .react-sigma-controls.bottom-right" | "@global .react-sigma-controls.bottom-left" | "@global .react-sigma-controls.top-right" | "@global .react-sigma-controls.top-left" | "@global .react-sigma-controls:first-child" | "@global .react-sigma-controls:last-child" | "@global .react-sigma-control" | "@global .react-sigma-control:last-child" | "@global .react-sigma-control > *" | "@global .react-sigma-control > button" | "@global .react-sigma-control > button:hover" | "@global .react-sigma-search" | "@global .react-sigma-search label" | "@global .react-sigma-search input">;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useStyles = void 0;
|
|
4
|
+
var styles_1 = require("@mui/styles");
|
|
5
|
+
// copy of @react-sigma/core/lib/react-sigma.min.css
|
|
6
|
+
exports.useStyles = (0, styles_1.makeStyles)({
|
|
7
|
+
'@global :root': {
|
|
8
|
+
'--sigma-background-color': '#fff',
|
|
9
|
+
'--sigma-controls-background-color': '#fff',
|
|
10
|
+
'--sigma-controls-background-color-hover': 'rgba(0,0,0,0.2)',
|
|
11
|
+
'--sigma-controls-border-color': 'rgba(0,0,0,0.2)',
|
|
12
|
+
'--sigma-controls-color': '#000',
|
|
13
|
+
'--sigma-controls-zindex': '100',
|
|
14
|
+
'--sigma-controls-margin': '5px',
|
|
15
|
+
'--sigma-controls-size': '30px'
|
|
16
|
+
},
|
|
17
|
+
'@global div.react-sigma': {
|
|
18
|
+
height: '100%',
|
|
19
|
+
width: '100%',
|
|
20
|
+
position: 'relative',
|
|
21
|
+
background: 'var(--sigma-background-color)'
|
|
22
|
+
},
|
|
23
|
+
'@global div.sigma-container': { height: '100%', width: '100%' },
|
|
24
|
+
'@global .react-sigma-controls': {
|
|
25
|
+
position: 'absolute',
|
|
26
|
+
zIndex: 'var(--sigma-controls-zindex)',
|
|
27
|
+
border: '2px solid var(--sigma-controls-border-color)',
|
|
28
|
+
borderRadius: '4px',
|
|
29
|
+
color: 'var(--sigma-controls-color)',
|
|
30
|
+
backgroundColor: 'var(--sigma-controls-background-color)'
|
|
31
|
+
},
|
|
32
|
+
'@global .react-sigma-controls.bottom-right': {
|
|
33
|
+
bottom: 'var(--sigma-controls-margin)',
|
|
34
|
+
right: 'var(--sigma-controls-margin)'
|
|
35
|
+
},
|
|
36
|
+
'@global .react-sigma-controls.bottom-left': {
|
|
37
|
+
bottom: 'var(--sigma-controls-margin)',
|
|
38
|
+
left: 'var(--sigma-controls-margin)'
|
|
39
|
+
},
|
|
40
|
+
'@global .react-sigma-controls.top-right': {
|
|
41
|
+
top: 'var(--sigma-controls-margin)',
|
|
42
|
+
right: 'var(--sigma-controls-margin)'
|
|
43
|
+
},
|
|
44
|
+
'@global .react-sigma-controls.top-left': {
|
|
45
|
+
top: 'var(--sigma-controls-margin)',
|
|
46
|
+
left: 'var(--sigma-controls-margin)'
|
|
47
|
+
},
|
|
48
|
+
'@global .react-sigma-controls:first-child': {
|
|
49
|
+
borderTopLeftRadius: '2px',
|
|
50
|
+
borderTopRightRadius: '2px'
|
|
51
|
+
},
|
|
52
|
+
'@global .react-sigma-controls:last-child': {
|
|
53
|
+
borderBottomLeftRadius: '2px',
|
|
54
|
+
borderBottomRightRadius: '2px'
|
|
55
|
+
},
|
|
56
|
+
'@global .react-sigma-control': {
|
|
57
|
+
width: 'var(--sigma-controls-size)',
|
|
58
|
+
height: 'var(--sigma-controls-size)',
|
|
59
|
+
lineHeight: 'var(--sigma-controls-size)',
|
|
60
|
+
backgroundColor: 'var(--sigma-controls-background-color)',
|
|
61
|
+
borderBottom: '1px solid var(--sigma-controls-border-color)'
|
|
62
|
+
},
|
|
63
|
+
'@global .react-sigma-control:last-child': { borderBottom: 'none' },
|
|
64
|
+
'@global .react-sigma-control > *': { boxSizing: 'border-box' },
|
|
65
|
+
'@global .react-sigma-control > button': {
|
|
66
|
+
display: 'block',
|
|
67
|
+
border: 'none',
|
|
68
|
+
margin: '0',
|
|
69
|
+
padding: '0',
|
|
70
|
+
width: 'var(--sigma-controls-size)',
|
|
71
|
+
height: 'var(--sigma-controls-size)',
|
|
72
|
+
lineHeight: 'var(--sigma-controls-size)',
|
|
73
|
+
backgroundPosition: 'center',
|
|
74
|
+
backgroundSize: '50%',
|
|
75
|
+
backgroundRepeat: 'no-repeat',
|
|
76
|
+
backgroundColor: 'var(--sigma-controls-background-color)',
|
|
77
|
+
clip: 'rect(0,0,0,0)'
|
|
78
|
+
},
|
|
79
|
+
'@global .react-sigma-control > button:hover': {
|
|
80
|
+
backgroundColor: 'var(--sigma-controls-background-color-hover)'
|
|
81
|
+
},
|
|
82
|
+
'@global .react-sigma-search': {
|
|
83
|
+
backgroundColor: 'var(--sigma-controls-background-color)'
|
|
84
|
+
},
|
|
85
|
+
'@global .react-sigma-search label': { visibility: 'hidden' },
|
|
86
|
+
'@global .react-sigma-search input': {
|
|
87
|
+
color: 'var(--sigma-controls-color)',
|
|
88
|
+
backgroundColor: 'var(--sigma-controls-background-color)',
|
|
89
|
+
fontSize: '1em',
|
|
90
|
+
width: '100%',
|
|
91
|
+
margin: '0',
|
|
92
|
+
border: 'none',
|
|
93
|
+
padding: 'var(--sigma-controls-margin)',
|
|
94
|
+
boxSizing: 'border-box'
|
|
95
|
+
}
|
|
96
|
+
});
|
|
@@ -2,7 +2,6 @@ import React, { useMemo } from 'react';
|
|
|
2
2
|
import { MultiGraph } from 'graphology';
|
|
3
3
|
import { mergeDeepRight } from 'ramda';
|
|
4
4
|
import { SigmaContainer } from '@react-sigma/core';
|
|
5
|
-
import '@react-sigma/core/lib/react-sigma.min.css';
|
|
6
5
|
import { createNodeCompoundProgram } from 'sigma/rendering/webgl/programs/common/node';
|
|
7
6
|
import { createEdgeCompoundProgram } from 'sigma/rendering/webgl/programs/common/edge';
|
|
8
7
|
import LineEdgeProgram from 'sigma/rendering/webgl/programs/edge';
|
|
@@ -16,8 +15,10 @@ import EdgeArrowHeadProgram from '../rendering/webgl/edge.arrowHead';
|
|
|
16
15
|
import EdgeReversedArrowHeadProgram from '../rendering/webgl/edge.reversedArrowHead';
|
|
17
16
|
import EdgeClampedProgram from '../rendering/webgl/edge.clamped';
|
|
18
17
|
import DashedEdgeProgram from '../rendering/webgl/edge.dashed';
|
|
18
|
+
import { useStyles } from './styles';
|
|
19
19
|
export var SigmaGraphContainer = function (_a) {
|
|
20
20
|
var children = _a.children, initialSettingsProp = _a.initialSettings;
|
|
21
|
+
useStyles();
|
|
21
22
|
var initialSettings = useMemo(function () {
|
|
22
23
|
return mergeDeepRight({
|
|
23
24
|
allowInvalidContainer: true,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"@global :root" | "@global div.react-sigma" | "@global div.sigma-container" | "@global .react-sigma-controls" | "@global .react-sigma-controls.bottom-right" | "@global .react-sigma-controls.bottom-left" | "@global .react-sigma-controls.top-right" | "@global .react-sigma-controls.top-left" | "@global .react-sigma-controls:first-child" | "@global .react-sigma-controls:last-child" | "@global .react-sigma-control" | "@global .react-sigma-control:last-child" | "@global .react-sigma-control > *" | "@global .react-sigma-control > button" | "@global .react-sigma-control > button:hover" | "@global .react-sigma-search" | "@global .react-sigma-search label" | "@global .react-sigma-search input">;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { makeStyles } from '@mui/styles';
|
|
2
|
+
// copy of @react-sigma/core/lib/react-sigma.min.css
|
|
3
|
+
export var useStyles = makeStyles({
|
|
4
|
+
'@global :root': {
|
|
5
|
+
'--sigma-background-color': '#fff',
|
|
6
|
+
'--sigma-controls-background-color': '#fff',
|
|
7
|
+
'--sigma-controls-background-color-hover': 'rgba(0,0,0,0.2)',
|
|
8
|
+
'--sigma-controls-border-color': 'rgba(0,0,0,0.2)',
|
|
9
|
+
'--sigma-controls-color': '#000',
|
|
10
|
+
'--sigma-controls-zindex': '100',
|
|
11
|
+
'--sigma-controls-margin': '5px',
|
|
12
|
+
'--sigma-controls-size': '30px'
|
|
13
|
+
},
|
|
14
|
+
'@global div.react-sigma': {
|
|
15
|
+
height: '100%',
|
|
16
|
+
width: '100%',
|
|
17
|
+
position: 'relative',
|
|
18
|
+
background: 'var(--sigma-background-color)'
|
|
19
|
+
},
|
|
20
|
+
'@global div.sigma-container': { height: '100%', width: '100%' },
|
|
21
|
+
'@global .react-sigma-controls': {
|
|
22
|
+
position: 'absolute',
|
|
23
|
+
zIndex: 'var(--sigma-controls-zindex)',
|
|
24
|
+
border: '2px solid var(--sigma-controls-border-color)',
|
|
25
|
+
borderRadius: '4px',
|
|
26
|
+
color: 'var(--sigma-controls-color)',
|
|
27
|
+
backgroundColor: 'var(--sigma-controls-background-color)'
|
|
28
|
+
},
|
|
29
|
+
'@global .react-sigma-controls.bottom-right': {
|
|
30
|
+
bottom: 'var(--sigma-controls-margin)',
|
|
31
|
+
right: 'var(--sigma-controls-margin)'
|
|
32
|
+
},
|
|
33
|
+
'@global .react-sigma-controls.bottom-left': {
|
|
34
|
+
bottom: 'var(--sigma-controls-margin)',
|
|
35
|
+
left: 'var(--sigma-controls-margin)'
|
|
36
|
+
},
|
|
37
|
+
'@global .react-sigma-controls.top-right': {
|
|
38
|
+
top: 'var(--sigma-controls-margin)',
|
|
39
|
+
right: 'var(--sigma-controls-margin)'
|
|
40
|
+
},
|
|
41
|
+
'@global .react-sigma-controls.top-left': {
|
|
42
|
+
top: 'var(--sigma-controls-margin)',
|
|
43
|
+
left: 'var(--sigma-controls-margin)'
|
|
44
|
+
},
|
|
45
|
+
'@global .react-sigma-controls:first-child': {
|
|
46
|
+
borderTopLeftRadius: '2px',
|
|
47
|
+
borderTopRightRadius: '2px'
|
|
48
|
+
},
|
|
49
|
+
'@global .react-sigma-controls:last-child': {
|
|
50
|
+
borderBottomLeftRadius: '2px',
|
|
51
|
+
borderBottomRightRadius: '2px'
|
|
52
|
+
},
|
|
53
|
+
'@global .react-sigma-control': {
|
|
54
|
+
width: 'var(--sigma-controls-size)',
|
|
55
|
+
height: 'var(--sigma-controls-size)',
|
|
56
|
+
lineHeight: 'var(--sigma-controls-size)',
|
|
57
|
+
backgroundColor: 'var(--sigma-controls-background-color)',
|
|
58
|
+
borderBottom: '1px solid var(--sigma-controls-border-color)'
|
|
59
|
+
},
|
|
60
|
+
'@global .react-sigma-control:last-child': { borderBottom: 'none' },
|
|
61
|
+
'@global .react-sigma-control > *': { boxSizing: 'border-box' },
|
|
62
|
+
'@global .react-sigma-control > button': {
|
|
63
|
+
display: 'block',
|
|
64
|
+
border: 'none',
|
|
65
|
+
margin: '0',
|
|
66
|
+
padding: '0',
|
|
67
|
+
width: 'var(--sigma-controls-size)',
|
|
68
|
+
height: 'var(--sigma-controls-size)',
|
|
69
|
+
lineHeight: 'var(--sigma-controls-size)',
|
|
70
|
+
backgroundPosition: 'center',
|
|
71
|
+
backgroundSize: '50%',
|
|
72
|
+
backgroundRepeat: 'no-repeat',
|
|
73
|
+
backgroundColor: 'var(--sigma-controls-background-color)',
|
|
74
|
+
clip: 'rect(0,0,0,0)'
|
|
75
|
+
},
|
|
76
|
+
'@global .react-sigma-control > button:hover': {
|
|
77
|
+
backgroundColor: 'var(--sigma-controls-background-color-hover)'
|
|
78
|
+
},
|
|
79
|
+
'@global .react-sigma-search': {
|
|
80
|
+
backgroundColor: 'var(--sigma-controls-background-color)'
|
|
81
|
+
},
|
|
82
|
+
'@global .react-sigma-search label': { visibility: 'hidden' },
|
|
83
|
+
'@global .react-sigma-search input': {
|
|
84
|
+
color: 'var(--sigma-controls-color)',
|
|
85
|
+
backgroundColor: 'var(--sigma-controls-background-color)',
|
|
86
|
+
fontSize: '1em',
|
|
87
|
+
width: '100%',
|
|
88
|
+
margin: '0',
|
|
89
|
+
border: 'none',
|
|
90
|
+
padding: 'var(--sigma-controls-margin)',
|
|
91
|
+
boxSizing: 'border-box'
|
|
92
|
+
}
|
|
93
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1848",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
9
9
|
"@react-google-maps/api": "2.7.0",
|
|
10
10
|
"@react-sigma/core": "3.4.0",
|
|
11
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1798",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-cloud": "^1.2.5",
|
|
14
14
|
"d3-geo": "^2.0.1",
|