datastake-daf 0.6.367 → 0.6.368
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/.env +8 -0
- package/.vscode/settings.json +13 -0
- package/dist/components/index.js +58 -66
- package/dist/hooks/index.js +39 -34
- package/package.json +1 -1
- package/src/@daf/core/components/Charts/ColumnChart/ColumnChart.stories.jsx +0 -28
- package/src/@daf/core/components/Graphs/StakeholderMappings/index.jsx +0 -3
- package/src/@daf/core/components/Graphs/components/BaseGraph.jsx +37 -40
- package/src/@daf/core/components/Graphs/components/Nodes/NameNode.jsx +32 -42
- package/src/@daf/hooks/useFilters.js +317 -277
- package/src/@daf/hooks/useSources.js +6 -3
|
@@ -32,7 +32,6 @@ const BaseGraph = forwardRef(function BaseGraph(
|
|
|
32
32
|
t,
|
|
33
33
|
withDuration = true,
|
|
34
34
|
onFilterChange,
|
|
35
|
-
isPdf,
|
|
36
35
|
...props
|
|
37
36
|
},
|
|
38
37
|
ref,
|
|
@@ -88,45 +87,43 @@ const BaseGraph = forwardRef(function BaseGraph(
|
|
|
88
87
|
}}
|
|
89
88
|
{...props}
|
|
90
89
|
>
|
|
91
|
-
{
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
>
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
</Controls>
|
|
129
|
-
)}
|
|
90
|
+
<Controls position="bottom-right" showFitView={false} showInteractive={false}>
|
|
91
|
+
<ControlButton
|
|
92
|
+
onClick={() => {
|
|
93
|
+
fitView({
|
|
94
|
+
padding: 0.1,
|
|
95
|
+
nodes: [...nodesToFit],
|
|
96
|
+
duration: withDuration ? 300 : undefined,
|
|
97
|
+
});
|
|
98
|
+
}}
|
|
99
|
+
>
|
|
100
|
+
<AimOutlined height={20} width={20} />
|
|
101
|
+
</ControlButton>
|
|
102
|
+
<ControlButton
|
|
103
|
+
onClick={() => {
|
|
104
|
+
const viewport = getViewport();
|
|
105
|
+
setViewport({
|
|
106
|
+
x: viewport.x,
|
|
107
|
+
y: viewport.y + 20,
|
|
108
|
+
zoom: viewport.zoom,
|
|
109
|
+
});
|
|
110
|
+
}}
|
|
111
|
+
>
|
|
112
|
+
<UpOutlined height={20} width={20}></UpOutlined>
|
|
113
|
+
</ControlButton>
|
|
114
|
+
<ControlButton
|
|
115
|
+
onClick={() => {
|
|
116
|
+
const viewport = getViewport();
|
|
117
|
+
setViewport({
|
|
118
|
+
x: viewport.x,
|
|
119
|
+
y: viewport.y - 20,
|
|
120
|
+
zoom: viewport.zoom,
|
|
121
|
+
});
|
|
122
|
+
}}
|
|
123
|
+
>
|
|
124
|
+
<DownOutlined height={20} width={20}></DownOutlined>
|
|
125
|
+
</ControlButton>
|
|
126
|
+
</Controls>
|
|
130
127
|
</ReactFlow>
|
|
131
128
|
</div>
|
|
132
129
|
</ComponentWithFocus>
|
|
@@ -13,8 +13,6 @@ const { useToken } = theme;
|
|
|
13
13
|
export default function NameNode({ data }) {
|
|
14
14
|
const { token } = useToken();
|
|
15
15
|
const translateFN = typeof data?.t === "function" ? data.t : (key) => key;
|
|
16
|
-
const isPdf = data?.isPdf;
|
|
17
|
-
|
|
18
16
|
return (
|
|
19
17
|
<>
|
|
20
18
|
<Handle
|
|
@@ -36,7 +34,6 @@ export default function NameNode({ data }) {
|
|
|
36
34
|
}}
|
|
37
35
|
/>
|
|
38
36
|
<Style
|
|
39
|
-
$isPdf={isPdf}
|
|
40
37
|
style={{
|
|
41
38
|
opacity: data.isEmpty ? 0.5 : 1,
|
|
42
39
|
}}
|
|
@@ -98,21 +95,19 @@ export default function NameNode({ data }) {
|
|
|
98
95
|
) : null}
|
|
99
96
|
</div>
|
|
100
97
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
</div>
|
|
115
|
-
)}
|
|
98
|
+
<div
|
|
99
|
+
style={{
|
|
100
|
+
marginLeft: "auto",
|
|
101
|
+
}}
|
|
102
|
+
className="go-to"
|
|
103
|
+
onClick={() => {
|
|
104
|
+
if (typeof data.onClick === "function") {
|
|
105
|
+
data.onClick();
|
|
106
|
+
}
|
|
107
|
+
}}
|
|
108
|
+
>
|
|
109
|
+
<CustomIcon height={14} width={14} name="LinkNewTab" />
|
|
110
|
+
</div>
|
|
116
111
|
</div>
|
|
117
112
|
</Style>
|
|
118
113
|
<Handle
|
|
@@ -134,30 +129,25 @@ export default function NameNode({ data }) {
|
|
|
134
129
|
}
|
|
135
130
|
|
|
136
131
|
const Style = styled.div`
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
box-shadow: 0px 5.64px 17.56px 5.02px #0000000d;
|
|
146
|
-
/* Ensure borders/colors survive PDF rendering */
|
|
147
|
-
border: ${(props) => (props.$isPdf ? '1px solid var(--base-gray-30)' : 'none')};
|
|
148
|
-
-webkit-print-color-adjust: exact;
|
|
149
|
-
print-color-adjust: exact;
|
|
132
|
+
width: ${NAME_CARD_WIDTH}px;
|
|
133
|
+
display: flex;
|
|
134
|
+
background: white;
|
|
135
|
+
border-radius: 8px;
|
|
136
|
+
box-shadow: 0px 3.76px 10.03px 0px #00000014;
|
|
137
|
+
box-shadow: 0px 1.88px 3.76px -2.51px #0000001f;
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
box-shadow: 0px 5.64px 17.56px 5.02px #0000000d;
|
|
150
140
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
141
|
+
.left {
|
|
142
|
+
width: 32px;
|
|
143
|
+
background: red;
|
|
144
|
+
border-top-left-radius: 12px;
|
|
145
|
+
border-bottom-left-radius: 12px;
|
|
146
|
+
}
|
|
157
147
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
148
|
+
.right {
|
|
149
|
+
padding: 16px 12px;
|
|
150
|
+
width: 100%
|
|
151
|
+
border-bottom: 1px solid var(--base-gray-30);
|
|
152
|
+
}
|
|
163
153
|
`;
|