Skip to content

Commit 876a299

Browse files
authored
Merge pull request #22 from cmu-delphi/release/v2.0.2
Release v2.0.2
2 parents 93b1066 + 70c753d commit 876a299

File tree

9 files changed

+4816
-2796
lines changed

9 files changed

+4816
-2796
lines changed

package-lock.json

Lines changed: 4763 additions & 2756 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "www-epivis",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"private": true,
55
"license": "MIT",
66
"description": "",
@@ -30,45 +30,45 @@
3030
"prepack": "npm run build"
3131
},
3232
"devDependencies": {
33-
"@fortawesome/free-solid-svg-icons": "^5.15.3",
34-
"@rollup/plugin-commonjs": "^19.0.0",
35-
"@rollup/plugin-node-resolve": "^13.0.0",
36-
"@rollup/plugin-replace": "^2.4.2",
37-
"@rollup/plugin-typescript": "^8.2.1",
38-
"@tsconfig/svelte": "^1.0.10",
33+
"@fortawesome/free-solid-svg-icons": "^6.1.2",
34+
"@rollup/plugin-commonjs": "^22.0.2",
35+
"@rollup/plugin-node-resolve": "^13.3.0",
36+
"@rollup/plugin-replace": "^4.0.0",
37+
"@rollup/plugin-typescript": "^8.4.0",
38+
"@tsconfig/svelte": "^3.0.0",
3939
"@types/d3-array": "^2.11.0",
4040
"@types/d3-dsv": "^2.0.1",
41-
"@types/uikit": "^3.3.1",
42-
"@typescript-eslint/eslint-plugin": "^4.24.0",
43-
"@typescript-eslint/parser": "^4.24.0",
41+
"@types/uikit": "^3.14.0",
42+
"@typescript-eslint/eslint-plugin": "^5.35.1",
43+
"@typescript-eslint/parser": "^5.35.1",
4444
"d3-array": "^2.12.1",
4545
"d3-dsv": "^2.0.0",
46-
"date-fns": "^2.21.3",
47-
"eslint": "^7.26.0",
48-
"eslint-plugin-cypress": "^2.11.3",
49-
"eslint-plugin-svelte3": "^3.2.0",
50-
"husky": "^6.0.0",
51-
"lint-staged": "^11.0.0",
52-
"prettier": "^2.3.0",
53-
"prettier-plugin-svelte": "^2.3.0",
54-
"rollup": "^2.48.0",
46+
"date-fns": "^2.29.2",
47+
"eslint": "^8.22.0",
48+
"eslint-plugin-cypress": "^2.12.1",
49+
"eslint-plugin-svelte3": "^4.0.0",
50+
"husky": "^8.0.1",
51+
"lint-staged": "^13.0.3",
52+
"prettier": "^2.7.1",
53+
"prettier-plugin-svelte": "^2.7.0",
54+
"rollup": "^2.78.1",
5555
"rollup-plugin-css-only": "^3.1.0",
56-
"rollup-plugin-livereload": "^2.0.0",
57-
"rollup-plugin-scss": "^2.6.1",
56+
"rollup-plugin-livereload": "^2.0.5",
57+
"rollup-plugin-scss": "^3.0.0",
5858
"rollup-plugin-svelte": "^7.1.0",
5959
"rollup-plugin-terser": "^7.0.2",
60-
"sass": "^1.32.13",
61-
"shepherd.js": "^8.3.1",
62-
"sirv-cli": "^1.0.11",
63-
"svelte": "^3.38.2",
64-
"svelte-check": "^1.5.4",
65-
"svelte-fa": "^2.2.0",
66-
"svelte-preprocess": "^4.7.3",
67-
"tslib": "^2.2.0",
68-
"typescript": "^4.2.4"
60+
"sass": "^1.54.5",
61+
"shepherd.js": "^10.0.1",
62+
"sirv-cli": "^2.0.2",
63+
"svelte": "^3.49.0",
64+
"svelte-check": "^2.8.1",
65+
"svelte-fa": "^3.0.3",
66+
"svelte-preprocess": "^4.10.7",
67+
"tslib": "^2.4.0",
68+
"typescript": "^4.7.4"
6969
},
7070
"dependencies": {
71-
"uikit": "^3.6.22"
71+
"uikit": "^3.15.5"
7272
},
7373
"lint-staged": {
7474
"*.{ts,js,svelte}": "eslint --cache --fix",

samples/simple.csv

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
a,date,v
2+
1,2022-01-01,1
3+
1,2022-01-02,2
4+
1,2022-01-03,3
5+
1,2022-01-04,4
6+
1,2022-01-05,3

src/components/Chart.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,7 @@
793793
</script>
794794

795795
<div {style} class="wrapper {className || ''}" bind:clientWidth={width} bind:clientHeight={height} data-tour="chart">
796+
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
796797
<canvas
797798
bind:this={canvas}
798799
{style}

src/components/dialogs/ImportCSVDialog.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
transpose,
3333
hasHeader,
3434
dateType: dateType == 'none' ? null : dateType,
35-
dateFormat: dateType == 'simple' ? 'YYYY-MM-DD' : 'undefined',
35+
dateFormat: dateType == 'simple' ? 'yyyy-MM-dd' : 'undefined',
3636
dateCol1: Number.parseInt(dateColumn, 10),
3737
dateCol2: Number.parseInt(dateColumn1, 10),
3838
hasGroup,

src/data/importCSV.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,27 @@ function asDataGroup(group: IDataGroup): DataGroup {
3737
}
3838

3939
export default function importCSV(file: File, fileContent: string, options: CSVOptions): DataGroup {
40-
let lines = '';
40+
const lines: string[] = [];
4141
for (const row of fileContent.split('\n')) {
4242
const trimmed = row.trim();
4343
if (trimmed[0] === '#') {
4444
continue;
4545
}
46-
lines += trimmed;
46+
lines.push(trimmed);
4747
}
48-
let rows = csvParseRows(lines);
48+
let rows = csvParseRows(lines.join('\n'));
4949
let numColumns = rows.reduce((acc, v) => Math.max(acc, v.length), 0);
5050
if (options.transpose) {
5151
numColumns = rows.length;
5252
rows = transpose(rows, numColumns);
5353
}
5454

55-
let labels = Array(numColumns).map((_, i) => `Column ${i}`);
55+
let labels = Array(numColumns)
56+
.fill(0)
57+
.map((_, i) => `Column ${i}`);
5658

5759
let groups: { label: string; level: number; rows: string[][] }[] = [{ label: file.name, level: 0, rows: [] }];
5860
let activeGroup = groups[0];
59-
groups.push(activeGroup);
6061

6162
let foundHeader = false;
6263
for (const row of rows) {
@@ -207,7 +208,7 @@ function parseDate(values: string[], lineIndex: number, options: CSVOptions): Ep
207208
}
208209
return new EpiDate(2000, 1, 1).addDays(lineIndex);
209210
} catch (error) {
210-
console.error('invalid date in row', values, options);
211+
console.error('invalid date in row', values, options, error);
211212
return null;
212213
}
213214
}

src/global.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="svelte" />

src/wrapper/_customize.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use 'sass:math';
2+
13
// Font
24
$global-font-family: 'Open Sans', Roboto, Arial, sans-serif;
35

@@ -27,4 +29,4 @@ $breadcrumb-divider-margin-horizontal: 3px;
2729
$tab-item-active-border: $menu-active-color;
2830
$tab-item-border-width: $menu-active-border-width;
2931

30-
$grid-gap: (32/1440) * 100%;
32+
$grid-gap: math.div(32, 1440) * 100%;

src/wrapper/layout/_layouts.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
$grid-gap: (32/1440) * 100%;
1+
@use 'sass:math';
2+
3+
$grid-gap: math.div(32, 1440) * 100%;
24

35
.content-grid {
46
display: grid;

0 commit comments

Comments
 (0)