Skip to content

Commit 95c543b

Browse files
committed
Merge dev into main for v1.1.0 release
2 parents 4867bd6 + b534d3e commit 95c543b

File tree

5 files changed

+26
-80
lines changed

5 files changed

+26
-80
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules
22
*/node_modules
33
out
4+
dist
45
*.vsix
56
.DS_Store

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"repository": "https://github.com/elsevierlabs-os/linked-data",
1010
"description": "This extension provides shortcuts for standard Linked Data operations, format conversions, validation, querying and a graph visualization.",
11-
"version": "1.0.9",
11+
"version": "1.1.0",
1212
"icon": "media/img/lde-icon.png",
1313
"engines": {
1414
"vscode": "^1.75.0"

src/extension.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ export function activate(context: vscode.ExtensionContext) {
795795
let document = editor.document ;
796796

797797
// Try to obtain YAML configuration from comments at the top of the query
798-
const re = /^(#.+\n)+/;
798+
const re = /^(#.+\r?\n)+/;
799799
const m = document.getText().match(re);
800800
var shaclFileName;
801801

@@ -915,7 +915,7 @@ export function activate(context: vscode.ExtensionContext) {
915915
const query = document.getText();
916916

917917
// Try to obtain YAML configuration from comments at the top of the query
918-
const re = /^(#.+\n)+/;
918+
const re = /^(#.+\r?\n)+/;
919919
const m = query.match(re);
920920
var dataFileName;
921921

@@ -970,13 +970,13 @@ export function activate(context: vscode.ExtensionContext) {
970970
var data = [];
971971

972972
if (result.length > 0) {
973-
// Iterate over the keys of the first result to obtain the array of variables.
974-
for(let v of result[0].keys()){
975-
variables.push(v);
976-
}
977973
for(let r of result){
978974
let stringresult = [];
979975
for(let v of r.keys()){ // variables are key in the map
976+
977+
if (!variables.includes(v)) {
978+
variables.push(v);
979+
}
980980
if (r.get(v).value != undefined) {
981981
stringresult.push(r.get(v).value);
982982
} else {

src/inspector.css

Lines changed: 15 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,3 @@
1-
2-
/* .links path {
3-
stroke: #444;
4-
stroke-opacity: 0.6;
5-
}
6-
7-
marker {
8-
stroke: #444;
9-
fill: #444;
10-
stroke-width: 0.1;
11-
}
12-
13-
.edgelabel textPath {
14-
fill: #444;
15-
}
16-
17-
.nodes circle {
18-
stroke: #fff;
19-
stroke-width: 1.5px;
20-
}
21-
22-
text {
23-
font-family: "Elsevier Display", sans-serif;
24-
font-size: 10px;
25-
}
26-
27-
.d3-tip {
28-
line-height: 1;
29-
padding: 6px;
30-
background: rgba(0, 0, 0, 0.8);
31-
color: #fff;
32-
border-radius: 4px;
33-
font-family: "Elsevier Display", sans-serif;
34-
35-
}
36-
37-
table {
38-
max-width: 500px;
39-
vertical-align: top;
40-
}
41-
42-
th, td {
43-
vertical-align: top;
44-
}
45-
46-
td {color: lightgray;}
47-
48-
svg {
49-
width: 100%;
50-
padding-bottom: 92%;
51-
height: 1px;
52-
overflow: visible
53-
} */
54-
55-
56-
57-
/* svg {
58-
border: 1px solid #ccc;
59-
} */
60-
61-
621
svg {
632
width: 100%;
643
padding-bottom: 92%;
@@ -69,6 +8,21 @@ svg {
698
body {
709
font: 10px sans-serif;
7110
}
11+
12+
body.vscode-light {
13+
color: black;
14+
fill: black;
15+
}
16+
17+
body.vscode-dark {
18+
color: white;
19+
fill: white;
20+
}
21+
22+
body.vscode-high-contrast {
23+
color: red;
24+
}
25+
7226
circle.node {
7327
fill: lightsteelblue;
7428
stroke: #555;
@@ -89,14 +43,3 @@ div.tooltip {
8943
position: absolute;
9044
display: block;
9145
}
92-
93-
/* table {
94-
max-width: 500px;
95-
vertical-align: top;
96-
}
97-
98-
th, td {
99-
vertical-align: top;
100-
}
101-
102-
td {color: lightgray;} */

src/inspector.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as d3 from "d3";
22
import { default as d3tip } from "d3-tip";
3-
// import { on } from "events";
3+
import { on } from "events";
4+
import css from './inspector.css';
45

56
document.addEventListener('DOMContentLoaded', function() {
67
const dataContents = window.document.getElementById('data').innerText;
@@ -128,6 +129,7 @@ function ForceGraph({nodes, links}, // a dictionary with nodes and links arrays.
128129
.style("opacity", 0)
129130
.attr("class","tooltip")
130131
.style("background-color", "white")
132+
.style("color","rgb(36, 41, 46)")
131133
.style("border", "solid")
132134
.style("border-width", "2px")
133135
.style("border-radius", "5px")

0 commit comments

Comments
 (0)