From 44a8aec628807fbba0c8d507dff5302188a8d53c Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 30 Jan 2020 10:32:13 +0100 Subject: [PATCH 01/67] replace _karma.conf.js_ with _jest.config.js_ --- jest.config.js | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ karma.conf.js | 52 -------------------------------------------------- 2 files changed, 50 insertions(+), 52 deletions(-) create mode 100644 jest.config.js delete mode 100644 karma.conf.js diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..c546a8e --- /dev/null +++ b/jest.config.js @@ -0,0 +1,50 @@ +// test dependencies that require transformation +const pluginsToTransform = [ + 'tdp_comments', + 'tdp_ui', + 'tdp_core', + 'bootstrap-sass', // required to transform for phovea_ui + 'phovea_ui', + 'phovea_clue', + 'phovea_core', + 'phovea_security_flask', + 'sandbox', + 'tdp_marvinjs' +].join('|'); + +/** + * TODO check if we can process inline webpack loaders (e.g. as found in https://github.com/phovea/phovea_ui/blob/master/src/_bootstrap.ts) + * see also https://jestjs.io/docs/en/webpack#mocking-css-modules + */ +module.exports = { + transform: { + "^.+\\.tsx?$": "ts-jest" + }, + testRegex: "(.*(test|spec))\\.(tsx?)$", + testURL: "http://localhost/", + moduleFileExtensions: [ + "ts", + "tsx", + "js", + "jsx", + "json", + "node" + ], + modulePaths: [ + "src", + "../node_modules", + "../" + ], + transformIgnorePatterns: [`../node_modules/(?!${pluginsToTransform})`], + globals: { + "__VERSION__": "TEST_VERSION", + "__APP_CONTEXT__": "TEST_CONTEXT" + }, + moduleNameMapper: { + "^.+\\.(css|less|scss|sass)$": "identity-obj-proxy", + "imports-loader?.*": "imports-loader", + "raw-loader?.*": "raw-loader", + "file-loader?.*": "file-loader", + "script-loader?.*": "script-loader" + } +} diff --git a/karma.conf.js b/karma.conf.js deleted file mode 100644 index eb434ab..0000000 --- a/karma.conf.js +++ /dev/null @@ -1,52 +0,0 @@ -/* ***************************************************************************** - * Caleydo - Visualization for Molecular Biology - http://caleydo.org - * Copyright (c) The Caleydo Team. All rights reserved. - * Licensed under the new BSD license, available at http://caleydo.org/license - **************************************************************************** */ - -const webpack = require('./webpack.config.js'); - -module.exports = (config) => { - config.set({ - // frameworks to use - // available frameworks: https://npmjs.org/browse/keyword/karma-adapter - frameworks: ['jasmine'], - - // list of files / patterns to load in the browser - files: [ - 'tests.webpack.js' // just load this file - ], - - // preprocess matching files before serving them to the browser - // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor - preprocessors: { - // add webpack as preprocessor - 'tests.webpack.js': ['webpack', 'sourcemap'] - }, - - webpack: webpack('test'), - - failOnEmptyTestSuite: false, - - // test results reporter to use - // possible values: 'dots', 'progress' - // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ['progress'], - - // enable / disable watching file and executing tests whenever any file changes - autoWatch: false, - - // middleware: ['polyfill'], - // BUG that install everything "karma-polyfill-service": "github:sgratzl/karma-polyfill-service", - polyfill: { - // features: '', // feature set, see polyfill-service docs for details, defaults to `{default: {}}` - // path: '' // path to serve the polyfill script under, defaults to '/polyfill.js' - }, - - browsers: [process.env.CONTINUOUS_INTEGRATION ? 'Firefox' : 'Chrome'], - - // Continuous Integration mode - // if true, Karma captures browsers, runs the tests and exits - singleRun: true - }); -}; From ab1d0152f85d5d505aaf7045157dd9900cc45dd3 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 30 Jan 2020 10:32:30 +0100 Subject: [PATCH 02/67] replace reference types in tests with jest --- tests/axis.test.ts | 2 +- tests/heatmap.test.ts | 2 +- tests/table.test.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/axis.test.ts b/tests/axis.test.ts index 4622692..dd9350f 100644 --- a/tests/axis.test.ts +++ b/tests/axis.test.ts @@ -1,4 +1,4 @@ -/// +/// import {create} from '../src/axis'; describe('create', () => { diff --git a/tests/heatmap.test.ts b/tests/heatmap.test.ts index 9915e84..0fb564f 100644 --- a/tests/heatmap.test.ts +++ b/tests/heatmap.test.ts @@ -1,4 +1,4 @@ -/// +/// import {toScale, defaultDomain, defaultColor} from '../src/heatmap/internal'; import {INumberValueTypeDesc} from 'phovea_core/src/datatype'; diff --git a/tests/table.test.ts b/tests/table.test.ts index 76b2800..2c97e68 100644 --- a/tests/table.test.ts +++ b/tests/table.test.ts @@ -1,4 +1,4 @@ -/// +/// import {create} from '../src/table'; import {parseMatrix} from 'phovea_d3/src/parser'; import {parse} from 'phovea_core/src/range'; From 525a442f2f6d2b7c83d77811e626d1fb10383cf5 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 30 Jan 2020 10:32:45 +0100 Subject: [PATCH 03/67] switch branches in _package.json_ --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4b0a7da..bdbe8b0 100644 --- a/package.json +++ b/package.json @@ -49,8 +49,8 @@ "dist": "mkdirp dist && cd build && tar cvzf ../dist/phovea_vis.tar.gz *" }, "dependencies": { - "phovea_core": "github:phovea/phovea_core#develop", - "phovea_d3": "github:phovea/phovea_d3#develop", + "phovea_core": "github:phovea/phovea_core#stoiber/testing_with_jest", + "phovea_d3": "github:phovea/phovea_d3#stoiber/testing_with_jest", "@types/d3": "~3.5.36", "d3": "~3.5.17" }, From 5c8194b4180eb9175a35fa6cd282ceffcd640ee8 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 30 Jan 2020 10:33:09 +0100 Subject: [PATCH 04/67] update scripts for usage of jest --- package.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index bdbe8b0..4360c04 100644 --- a/package.json +++ b/package.json @@ -29,14 +29,16 @@ "node": ">= 12.13" }, "scripts": { + "clean": "rimraf build dist && npm run clean:compile", + "clean:compile": "rimraf src/**/*.map src/**/*.js src/**/*.d.ts tests/**/*.js tests/**/*.map tests/**/*.d.ts demo/**/*.js demo/**/*.map demo/**/*.d.ts", "compile": "tsc", "lint": "tslint -c tslint.json -p . 'src/**/*.ts?(x)' 'tests/**/*.ts?(x)'", - "docs": "typedoc --options typedoc.json src/", + "docs": "typedoc --options typedoc.json src/**.ts", "prebuild": "node -e \"process.exit(process.env.PHOVEA_SKIP_TESTS === undefined?1:0)\" || npm run test", - "pretest": "npm run compile", - "test": "test ! -d tests || karma start", + "pretest": "npm run clean && npm run compile", + "test": "jest", + "test:watch": "jest --watch", "posttest": "npm run lint", - "test:watch": "karma start --autoWatch=true --singleRun=false", "build:dev": "webpack", "build": "webpack --env prod", "start": "webpack-dev-server --inline", From 58beceb0fcc7e4d863225d118469bfdaf64c2e9a Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 30 Jan 2020 10:33:22 +0100 Subject: [PATCH 05/67] update dependencies for testing with jest --- package.json | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 4360c04..3bf9af8 100644 --- a/package.json +++ b/package.json @@ -57,31 +57,27 @@ "d3": "~3.5.17" }, "devDependencies": { - "@types/jasmine": "2.5.47", + "@types/jest": "23.3.13", "awesome-typescript-loader": "3.1.2", "css-loader": "0.28.0", "extract-loader": "0.1.0", "extract-text-webpack-plugin": "2.1.0", "file-loader": "0.11.1", "html-loader": "0.4.5", + "identity-obj-proxy": "^3.0.0", "imports-loader": "0.7.1", - "jasmine": "2.5.3", + "jest": "^22.4.0", "json-loader": "0.5.4", - "karma": "1.5.0", - "karma-chrome-launcher": "2.0.0", - "karma-firefox-launcher": "1.0.1", - "karma-jasmine": "1.1.0", - "karma-junit-reporter": "2.0.0", - "karma-sourcemap-loader": "0.3.7", - "karma-webpack": "2.0.3", "mkdirp": "0.5.1", "node-sass": "^4.12.0", "null-loader": "0.1.1", "raw-loader": "0.5.1", + "rimraf": "^3.0.0", "sass-loader": "6.0.7", "style-loader": "0.16.1", "tslib": "1.9.0", "tslint": "5.9.1", + "ts-jest": "22.4.4", "typedoc": "0.11.1", "typescript": "2.8.1", "url-loader": "0.5.8", From 93c1c33e12a98dbcc60f3faf8853856cdb800b4b Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 5 Feb 2020 09:52:20 +0100 Subject: [PATCH 06/67] fix import error --- jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index c546a8e..4657a8d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -35,7 +35,7 @@ module.exports = { "../node_modules", "../" ], - transformIgnorePatterns: [`../node_modules/(?!${pluginsToTransform})`], + transformIgnorePatterns: [`../node_modules/(?!${pluginsToTransform}).+\\.js$`], globals: { "__VERSION__": "TEST_VERSION", "__APP_CONTEXT__": "TEST_CONTEXT" From 5a40927ad52033d2eafeeb62fef70ca6e6714e0f Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 5 Feb 2020 13:08:37 +0100 Subject: [PATCH 07/67] handle xml files with `jest-raw-loader` --- jest.config.js | 3 ++- package.json | 3 ++- tsd.d.ts | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/jest.config.js b/jest.config.js index 4657a8d..9a1fd93 100644 --- a/jest.config.js +++ b/jest.config.js @@ -18,7 +18,8 @@ const pluginsToTransform = [ */ module.exports = { transform: { - "^.+\\.tsx?$": "ts-jest" + "^.+\\.tsx?$": "ts-jest", + "\\.xml$": "jest-raw-loader" }, testRegex: "(.*(test|spec))\\.(tsx?)$", testURL: "http://localhost/", diff --git a/package.json b/package.json index 3bf9af8..cd15b9b 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,7 @@ "ifdef-loader": "2.0.0", "fork-ts-checker-webpack-plugin": "0.4.1", "thread-loader": "1.1.2", - "ts-loader": "4.0.1" + "ts-loader": "4.0.1", + "jest-raw-loader": "1.0.1" } } diff --git a/tsd.d.ts b/tsd.d.ts index 9e343ca..619393b 100644 --- a/tsd.d.ts +++ b/tsd.d.ts @@ -20,6 +20,10 @@ declare module "*.html" { const content:string; export default content; } +declare module "*.xml" { + const content:string; + export default content; +} //allow json dependencies declare module "*.json"; //allow file dependencies From 9e2f0769b54200ce48aebf7ef8ae89fcc00196f0 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 5 Feb 2020 13:09:29 +0100 Subject: [PATCH 08/67] run `yo phovea:update` --- .circleci/config.yml | 2 +- tsd.d.ts | 4 ++++ tslint.json | 42 +++++++++++++++++++++++++++--------------- webpack.config.js | 2 +- 4 files changed, 33 insertions(+), 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8909887..75f35cf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ jobs: build: working_directory: ~/phovea docker: - - image: circleci/node:12-browsers + - image: circleci/node:12.13-buster-browsers steps: - checkout - run: diff --git a/tsd.d.ts b/tsd.d.ts index 619393b..8a28b34 100644 --- a/tsd.d.ts +++ b/tsd.d.ts @@ -13,8 +13,12 @@ declare module "*.css" { const content:string; export default content; } +// allow image dependencies declare module "*.png"; declare module "*.jpg"; +declare module "*.gif"; +declare module "*.webp"; +declare module "*.svg"; //allow html dependencies declare module "*.html" { const content:string; diff --git a/tslint.json b/tslint.json index 434c5eb..ec45867 100644 --- a/tslint.json +++ b/tslint.json @@ -23,6 +23,7 @@ "forin": true, "indent": [ true, + "spaces", 2 ], "interface-name": true, @@ -31,9 +32,25 @@ "max-line-length": false, "member-ordering": [ false, - "public-before-private", - "static-before-instance", - "variables-before-functions" + { + "order": [ + "public-static-field", + "public-static-method", + "public-instance-field", + "public-constructor", + "public-instance-method", + "protected-static-field", + "protected-static-method", + "protected-instance-field", + "protected-constructor", + "protected-instance-method", + "private-static-field", + "private-static-method", + "private-instance-field", + "private-constructor", + "private-instance-method" + ] + } ], "new-parens": true, "no-arg": true, @@ -96,18 +113,13 @@ ], "typedef-whitespace": [ true, - [ - "callSignature", - "noSpace" - ], - [ - "catchClause", - "noSpace" - ], - [ - "indexSignature", - "space" - ] + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } ], "use-isnan": true, "variable-name": [ diff --git a/webpack.config.js b/webpack.config.js index 95542e3..b4e63ac 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -74,7 +74,7 @@ const webpackloaders = [ }, {test: /\.json$/, use: 'json-loader'}, { - test: /\.(png|jpg)$/, + test: /\.(png|jpg|gif|webp)$/, loader: 'url-loader', options: { limit: 10000 // inline <= 10kb From 9dd07888f65a5093923a488948cb6bbec10a5ab3 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Fri, 7 Feb 2020 10:52:14 +0100 Subject: [PATCH 09/67] fix jest config remove node modules from testing and use correct plugins for `pluginsToTransform` --- jest.config.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/jest.config.js b/jest.config.js index 9a1fd93..221363c 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,15 +1,6 @@ // test dependencies that require transformation const pluginsToTransform = [ - 'tdp_comments', - 'tdp_ui', - 'tdp_core', - 'bootstrap-sass', // required to transform for phovea_ui - 'phovea_ui', - 'phovea_clue', - 'phovea_core', - 'phovea_security_flask', - 'sandbox', - 'tdp_marvinjs' + 'phovea_core' ].join('|'); /** @@ -33,7 +24,6 @@ module.exports = { ], modulePaths: [ "src", - "../node_modules", "../" ], transformIgnorePatterns: [`../node_modules/(?!${pluginsToTransform}).+\\.js$`], From b748154a857ef5b0a26225441d70d5bb63564866 Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Mon, 16 Mar 2020 17:51:21 +0100 Subject: [PATCH 10/67] prepare next develop --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 76b0c17..aeb3bfc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "phovea_vis", "description": "Utilitiy reposititory containing common visualizations (table, heatmap, scatterplot, axis, pie, distribution, ..)", - "version": "4.0.0", + "version": "4.0.1-SNAPSHOT", "author": { "name": "The Caleydo Team", "email": "contact@caleydo.org", @@ -49,8 +49,8 @@ "dist": "mkdir dist && cd build && tar cvzf ../dist/phovea_vis.tar.gz *" }, "dependencies": { - "phovea_core": "^4.0.0", - "phovea_d3": "^4.0.0", + "phovea_core": "github:phovea/phovea_core#develop", + "phovea_d3": "github:phovea/phovea_d3#develop", "@types/d3": "~3.5.36", "d3": "~3.5.17" }, From 279cdcc3023bbd8dcb4ff67ea517a7c23b140ad0 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Fri, 20 Mar 2020 08:46:07 +0100 Subject: [PATCH 11/67] update jest to latest version --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 78f5b82..590d6c4 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "d3": "~3.5.17" }, "devDependencies": { - "@types/jest": "23.3.13", + "@types/jest": "25.1.4", "awesome-typescript-loader": "3.1.2", "css-loader": "0.28.0", "extract-loader": "0.1.0", @@ -66,7 +66,7 @@ "html-loader": "0.4.5", "identity-obj-proxy": "^3.0.0", "imports-loader": "0.7.1", - "jest": "^22.4.0", + "jest": "^25.1.0", "json-loader": "0.5.4", "node-sass": "^4.13.1", "null-loader": "0.1.1", @@ -76,7 +76,7 @@ "style-loader": "0.16.1", "tslib": "~1.11.0", "tslint": "5.9.1", - "ts-jest": "22.4.4", + "ts-jest": "^25.2.1", "typedoc": "~0.16.10", "typescript": "~3.8.2", "url-loader": "0.5.8", From 3482003e9fa345b0bc663a90109ebcd7144f1ba9 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Fri, 20 Mar 2020 08:46:17 +0100 Subject: [PATCH 12/67] unify jest config --- jest.config.js | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/jest.config.js b/jest.config.js index 221363c..2ace085 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,8 +1,16 @@ // test dependencies that require transformation -const pluginsToTransform = [ - 'phovea_core' +let pluginsToTransform = [ + 'tdp_*', + 'phovea_*', + 'lineupjs' ].join('|'); +if(pluginsToTransform.length > 0) { + /** Attention: Negative Lookahead! This regex adds the specified repos to a whitelist that holds plugins that are excluded from the transformIgnorePatterns. + * This means that pluginsToTransform should contain all repos that export ts files. They can only be handled by the transformation. */ + pluginsToTransform = `(?!${pluginsToTransform})`; +} + /** * TODO check if we can process inline webpack loaders (e.g. as found in https://github.com/phovea/phovea_ui/blob/master/src/_bootstrap.ts) * see also https://jestjs.io/docs/en/webpack#mocking-css-modules @@ -13,7 +21,6 @@ module.exports = { "\\.xml$": "jest-raw-loader" }, testRegex: "(.*(test|spec))\\.(tsx?)$", - testURL: "http://localhost/", moduleFileExtensions: [ "ts", "tsx", @@ -24,12 +31,19 @@ module.exports = { ], modulePaths: [ "src", + "../node_modules", "../" ], - transformIgnorePatterns: [`../node_modules/(?!${pluginsToTransform}).+\\.js$`], + transformIgnorePatterns: [`../node_modules/${pluginsToTransform}`, `node_modules/${pluginsToTransform}`], globals: { "__VERSION__": "TEST_VERSION", - "__APP_CONTEXT__": "TEST_CONTEXT" + "__APP_CONTEXT__": "TEST_CONTEXT", + 'ts-jest': { + // has to be set to true, otherwise i18n import fails + "tsConfig": { + "esModuleInterop": true, + } + } }, moduleNameMapper: { "^.+\\.(css|less|scss|sass)$": "identity-obj-proxy", From f51f4e9be764e9d0398d0d151c6f9e6ebc961d06 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Mon, 23 Mar 2020 10:01:19 +0100 Subject: [PATCH 13/67] use pinned version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 590d6c4..ee49210 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "style-loader": "0.16.1", "tslib": "~1.11.0", "tslint": "5.9.1", - "ts-jest": "^25.2.1", + "ts-jest": "25.2.1", "typedoc": "~0.16.10", "typescript": "~3.8.2", "url-loader": "0.5.8", From 043ee2dea4e9b38be9724ac58b99aa631f1513d3 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 24 Mar 2020 07:08:55 +0100 Subject: [PATCH 14/67] use pinned jest version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ee49210..8c90c00 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "html-loader": "0.4.5", "identity-obj-proxy": "^3.0.0", "imports-loader": "0.7.1", - "jest": "^25.1.0", + "jest": "25.1.0", "json-loader": "0.5.4", "node-sass": "^4.13.1", "null-loader": "0.1.1", From 117898296000c665cbb4343b4c84e2dccd4b7885 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 24 Mar 2020 07:09:08 +0100 Subject: [PATCH 15/67] add mapping for jpg, gif and png --- jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index 2ace085..65bbf39 100644 --- a/jest.config.js +++ b/jest.config.js @@ -46,7 +46,7 @@ module.exports = { } }, moduleNameMapper: { - "^.+\\.(css|less|scss|sass)$": "identity-obj-proxy", + "^.+\\.(css|less|scss|sass|png|jpg|gif)$": "identity-obj-proxy", "imports-loader?.*": "imports-loader", "raw-loader?.*": "raw-loader", "file-loader?.*": "file-loader", From bdea7eb365fa5b63299bc63e161de794a070a346 Mon Sep 17 00:00:00 2001 From: Anita Steiner Date: Fri, 27 Mar 2020 10:51:06 +0100 Subject: [PATCH 16/67] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8c90c00..c0796a3 100644 --- a/package.json +++ b/package.json @@ -51,8 +51,8 @@ "dist": "mkdir dist && cd build && tar cvzf ../dist/phovea_vis.tar.gz *" }, "dependencies": { - "phovea_core": "github:phovea/phovea_core#stoiber/testing_with_jest", - "phovea_d3": "github:phovea/phovea_d3#stoiber/testing_with_jest", + "phovea_core": "github:phovea/phovea_core#develop", + "phovea_d3": "github:phovea/phovea_d3#develop", "@types/d3": "~3.5.36", "d3": "~3.5.17" }, From a7b132842cf60daa82f913b9f1fb3c5d72b7ae77 Mon Sep 17 00:00:00 2001 From: rumersdorfer <45141967+rumersdorfer@users.noreply.github.com> Date: Fri, 24 Apr 2020 14:01:41 +0200 Subject: [PATCH 17/67] Update README.md circleci links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0d04e46..8c65f44 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ This repository is part of **[Phovea](http://phovea.caleydo.org/)**, a platform [phovea-url]: https://phovea.caleydo.org [npm-image]: https://badge.fury.io/js/phovea_vis.svg [npm-url]: https://npmjs.org/package/phovea_vis -[travis-image]: https://travis-ci.org/phovea/phovea_vis.svg?branch=master -[travis-url]: https://travis-ci.org/phovea/phovea_vis +[circleci-image]: https://circleci.com/gh/phovea/phovea_vis.svg?style=shield +[circleci-url]: https://circleci.com/gh/phovea/phovea_vis [daviddm-image]: https://david-dm.org/phovea/phovea_vis/status.svg [daviddm-url]: https://david-dm.org/phovea/phovea_vis From c119db2eda1e3f72ca47cdbae47a669784453c87 Mon Sep 17 00:00:00 2001 From: rumersdorfer <45141967+rumersdorfer@users.noreply.github.com> Date: Tue, 12 May 2020 16:18:48 +0200 Subject: [PATCH 18/67] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8c65f44..768b3c3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ -phovea_vis [![Phovea][phovea-image]][phovea-url] [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] +phovea_vis ===================== +[![Phovea][phovea-image]][phovea-url] [![NPM version][npm-image]][npm-url] [![Build Status][circleci-image]][circleci-url] + Phovea client plugin providing standard visualization techniques (table, heatmap, scatterplot, axis, pie, distribution, ..). @@ -40,5 +42,4 @@ This repository is part of **[Phovea](http://phovea.caleydo.org/)**, a platform [npm-url]: https://npmjs.org/package/phovea_vis [circleci-image]: https://circleci.com/gh/phovea/phovea_vis.svg?style=shield [circleci-url]: https://circleci.com/gh/phovea/phovea_vis -[daviddm-image]: https://david-dm.org/phovea/phovea_vis/status.svg -[daviddm-url]: https://david-dm.org/phovea/phovea_vis + From ce72ea74f83821d731bb3e94bcace341159eb9f3 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 14 May 2020 10:37:34 +0200 Subject: [PATCH 19/67] rename internal to HistData --- src/distribution/{internal.ts => HistData.ts} | 0 src/distribution/Histogram.ts | 2 +- src/distribution/Mosaic.ts | 4 ++-- src/distribution/Pie.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) rename src/distribution/{internal.ts => HistData.ts} (100%) diff --git a/src/distribution/internal.ts b/src/distribution/HistData.ts similarity index 100% rename from src/distribution/internal.ts rename to src/distribution/HistData.ts diff --git a/src/distribution/Histogram.ts b/src/distribution/Histogram.ts index c5a714a..ba5ba8a 100644 --- a/src/distribution/Histogram.ts +++ b/src/distribution/Histogram.ts @@ -12,7 +12,7 @@ import {IStratification} from 'phovea_core/src/stratification'; import {IHistogram} from 'phovea_core/src/math'; import {toSelectOperation} from 'phovea_core/src/idtype'; import bindTooltip from 'phovea_d3/src/tooltip'; -import {createHistData, IDistributionOptions, IHistData, ITotalHeight, resolveHistMax} from './internal'; +import {createHistData, IDistributionOptions, IHistData, ITotalHeight, resolveHistMax} from './HistData'; export interface IHistogramOptions extends IDistributionOptions { /** diff --git a/src/distribution/Mosaic.ts b/src/distribution/Mosaic.ts index aae1be8..8c78223 100644 --- a/src/distribution/Mosaic.ts +++ b/src/distribution/Mosaic.ts @@ -12,7 +12,7 @@ import {IStratification} from 'phovea_core/src/stratification'; import {IHistogram} from 'phovea_core/src/math'; import {toSelectOperation} from 'phovea_core/src/idtype'; import bindTooltip from 'phovea_d3/src/tooltip'; -import {createHistData, IDistributionOptions, IHistData} from './internal'; +import {createHistData, IDistributionOptions, IHistData} from './HistData'; export interface IMosaicOptions extends IDistributionOptions { @@ -192,6 +192,6 @@ export default class Mosaic extends AVisInstance implements IVisInstance { } } -export function create(data: IHistAbleDataType|IStratification, parent: Element, options?: IMosaicOptions) { +export function createMosaic(data: IHistAbleDataType|IStratification, parent: Element, options?: IMosaicOptions) { return new Mosaic(data, parent, options); } diff --git a/src/distribution/Pie.ts b/src/distribution/Pie.ts index ddb5f36..dd3eb09 100644 --- a/src/distribution/Pie.ts +++ b/src/distribution/Pie.ts @@ -14,7 +14,7 @@ import {ICatHistogram} from 'phovea_core/src/math'; import {toSelectOperation} from 'phovea_core/src/idtype'; import {vec2, polygon} from 'phovea_core/src/geom'; import bindTooltip from 'phovea_d3/src/tooltip'; -import {IDistributionOptions, ITotalHeight, resolveHistMax} from './internal'; +import {IDistributionOptions, ITotalHeight, resolveHistMax} from './HistData'; function toPolygon(start: number, end: number, radius: number) { @@ -234,6 +234,6 @@ export default class Pie extends AVisInstance implements IVisInstance { //} } -export function create(data: IHistAbleDataType|IStratification, parent: Element, options?: IPieOptions) { +export function createPie(data: IHistAbleDataType|IStratification, parent: Element, options?: IPieOptions) { return new Pie(data, parent, options); } From a606c0d6dd0f8af6db7069f163858b049ed6d09e Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 14 May 2020 10:37:53 +0200 Subject: [PATCH 20/67] fix src/distribution/index.ts --- src/distribution/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/distribution/index.ts b/src/distribution/index.ts index 5333dc5..886700a 100644 --- a/src/distribution/index.ts +++ b/src/distribution/index.ts @@ -2,6 +2,10 @@ * Created by Samuel Gratzl on 26.01.2016. */ -export {default as Histogram, create} from './Histogram'; -export {default as Mosaic, create as createMosaic} from './Mosaic'; -export {default as Pie, create as createPie} from './Pie'; +export * from './HistData'; +export * from './Histogram'; +export {default as Histogram} from './Histogram'; +export * from './Mosaic'; +export {default as Mosaic} from './Mosaic'; +export * from './Pie'; +export {default as Pie} from './Pie'; From 989ec4972a39de67358505f43b2675a1f7790179 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 14 May 2020 10:39:50 +0200 Subject: [PATCH 21/67] remove internal.ts split up code into IScale.ts, ICommonHeatMapOptions.ts, defaultUtils.ts --- src/heatmap/ICommonHeatMapOptions.ts | 27 +++++++++++ src/heatmap/IScale.ts | 18 ++++++++ src/heatmap/{internal.ts => defaultUtils.ts} | 48 +------------------- 3 files changed, 46 insertions(+), 47 deletions(-) create mode 100644 src/heatmap/ICommonHeatMapOptions.ts create mode 100644 src/heatmap/IScale.ts rename src/heatmap/{internal.ts => defaultUtils.ts} (56%) diff --git a/src/heatmap/ICommonHeatMapOptions.ts b/src/heatmap/ICommonHeatMapOptions.ts new file mode 100644 index 0000000..ab9cab9 --- /dev/null +++ b/src/heatmap/ICommonHeatMapOptions.ts @@ -0,0 +1,27 @@ +import {IVisInstanceOptions} from 'phovea_core/src/vis'; + +export interface ICommonHeatMapOptions extends IVisInstanceOptions { + /** + * @default 10 + */ + initialScale?: number; + /** + * @default derived from value + */ + color?: string[]; + /** + * @default derived from value + */ + domain?: (number|string)[]; + + /** + * missing value color + * @default magenta + */ + missingColor?: string; + + /** + * defines the rendering mode, e.g. influencing how the selection is drawn + */ + mode?: 'lg'|'sm'; +} diff --git a/src/heatmap/IScale.ts b/src/heatmap/IScale.ts new file mode 100644 index 0000000..75913ad --- /dev/null +++ b/src/heatmap/IScale.ts @@ -0,0 +1,18 @@ +import * as d3 from 'd3'; +import {VALUE_TYPE_CATEGORICAL} from 'phovea_core/src/datatype'; + +export interface IScale { + (x: any): any; + domain(): any[]; + domain(values: any[]): IScale; + + range(): any[]; + range(values: any[]): IScale; +} + +export function toScale(value): IScale { + if (value.type === VALUE_TYPE_CATEGORICAL) { + return d3.scale.ordinal(); + } + return d3.scale.linear(); +} diff --git a/src/heatmap/internal.ts b/src/heatmap/defaultUtils.ts similarity index 56% rename from src/heatmap/internal.ts rename to src/heatmap/defaultUtils.ts index 34b7b31..758fbe9 100644 --- a/src/heatmap/internal.ts +++ b/src/heatmap/defaultUtils.ts @@ -2,12 +2,10 @@ * Created by Samuel Gratzl on 26.12.2016. */ -import * as d3 from 'd3'; import { - IValueTypeDesc, VALUE_TYPE_CATEGORICAL, INumberValueTypeDesc, + VALUE_TYPE_CATEGORICAL, INumberValueTypeDesc, ICategoricalValueTypeDesc, ICategory } from 'phovea_core/src/datatype'; -import {IVisInstanceOptions} from 'phovea_core/src/vis'; export function defaultColor(value: INumberValueTypeDesc|ICategoricalValueTypeDesc): string[] { @@ -35,50 +33,6 @@ export function defaultDomain(value: INumberValueTypeDesc|ICategoricalValueTypeD return r; } -export interface IScale { - (x: any): any; - domain(): any[]; - domain(values: any[]): IScale; - - range(): any[]; - range(values: any[]): IScale; -} - -export function toScale(value): IScale { - if (value.type === VALUE_TYPE_CATEGORICAL) { - return d3.scale.ordinal(); - } - return d3.scale.linear(); -} - - -export interface ICommonHeatMapOptions extends IVisInstanceOptions { - /** - * @default 10 - */ - initialScale?: number; - /** - * @default derived from value - */ - color?: string[]; - /** - * @default derived from value - */ - domain?: (number|string)[]; - - /** - * missing value color - * @default magenta - */ - missingColor?: string; - - /** - * defines the rendering mode, e.g. influencing how the selection is drawn - */ - mode?: 'lg'|'sm'; -} - - export function isMissing(v: any) { return (v === null || (typeof v === 'number' && isNaN(v))); } From 57466a175ca3e16d23fe763d8ca258a294fa594f Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 14 May 2020 10:41:26 +0200 Subject: [PATCH 22/67] update import statements accordingly --- src/heatmap/AHeatMapCanvasRenderer.ts | 2 +- src/heatmap/HeatMap.ts | 5 ++++- src/heatmap/HeatMap1D.ts | 4 +++- src/heatmap/HeatMapCanvasRenderer.ts | 4 +++- src/heatmap/HeatMapDOMRenderer.ts | 4 +++- src/heatmap/HeatMapImageRenderer.ts | 5 +++-- src/heatmap/IHeatMapRenderer.ts | 2 +- 7 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/heatmap/AHeatMapCanvasRenderer.ts b/src/heatmap/AHeatMapCanvasRenderer.ts index 4ab2bf3..a9a5694 100644 --- a/src/heatmap/AHeatMapCanvasRenderer.ts +++ b/src/heatmap/AHeatMapCanvasRenderer.ts @@ -9,7 +9,7 @@ import {onDOMNodeRemoved} from 'phovea_core/src'; import {IMatrix} from 'phovea_core/src/matrix'; import {toSelectOperation, defaultSelectionType} from 'phovea_core/src/idtype'; import {ESelectOption} from './IHeatMapRenderer'; -import {ICommonHeatMapOptions} from './internal'; +import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; export abstract class AHeatMapCanvasRenderer { diff --git a/src/heatmap/HeatMap.ts b/src/heatmap/HeatMap.ts index b69caba..1f4527a 100644 --- a/src/heatmap/HeatMap.ts +++ b/src/heatmap/HeatMap.ts @@ -11,7 +11,9 @@ import {rect} from 'phovea_core/src/geom'; import {mixin, onDOMNodeRemoved} from 'phovea_core/src'; import {toSelectOperation} from 'phovea_core/src/idtype'; import {INumericalMatrix, ICategoricalMatrix, DIM_ROW, DIM_COL} from 'phovea_core/src/matrix/IMatrix'; -import {defaultColor, defaultDomain, toScale, IScale, ICommonHeatMapOptions} from './internal'; +import {defaultColor, defaultDomain} from './defaultUtils'; +import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; +import {toScale, IScale} from './IScale'; import {IHeatMapRenderer, ESelectOption} from './IHeatMapRenderer'; import HeatMapDOMRenderer from './HeatMapDOMRenderer'; import HeatMapImageRenderer from './HeatMapImageRenderer'; @@ -252,3 +254,4 @@ export default class HeatMap extends AVisInstance implements IVisInstance { export function create(data: IHeatMapAbleMatrix, parent: HTMLElement, options?: IHeatMapOptions) { return new HeatMap(data, parent, options); } + diff --git a/src/heatmap/HeatMap1D.ts b/src/heatmap/HeatMap1D.ts index 0606961..e146037 100644 --- a/src/heatmap/HeatMap1D.ts +++ b/src/heatmap/HeatMap1D.ts @@ -10,7 +10,9 @@ import {rect} from 'phovea_core/src/geom'; import {mixin} from 'phovea_core/src'; import {selectionUtil} from 'phovea_d3/src/d3util'; import {INumericalVector, ICategoricalVector} from 'phovea_core/src/vector'; -import {defaultColor, defaultDomain, toScale, IScale, ICommonHeatMapOptions, isMissing} from './internal'; +import {defaultColor, defaultDomain, isMissing} from './defaultUtils'; +import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; +import {toScale, IScale} from './IScale'; export interface IHeatMap1DOptions extends ICommonHeatMapOptions { /** diff --git a/src/heatmap/HeatMapCanvasRenderer.ts b/src/heatmap/HeatMapCanvasRenderer.ts index 1b3170b..f93ba11 100644 --- a/src/heatmap/HeatMapCanvasRenderer.ts +++ b/src/heatmap/HeatMapCanvasRenderer.ts @@ -4,7 +4,9 @@ import * as d3 from 'd3'; -import {IScale, isMissing, ICommonHeatMapOptions} from './internal'; +import {isMissing} from './defaultUtils'; +import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; +import {IScale} from './IScale'; import {IHeatMapRenderer, ESelectOption} from './IHeatMapRenderer'; import AHeatMapCanvasRenderer from './AHeatMapCanvasRenderer'; import {IHeatMapAbleMatrix} from './HeatMap'; diff --git a/src/heatmap/HeatMapDOMRenderer.ts b/src/heatmap/HeatMapDOMRenderer.ts index 30ec0da..2e55a02 100644 --- a/src/heatmap/HeatMapDOMRenderer.ts +++ b/src/heatmap/HeatMapDOMRenderer.ts @@ -7,7 +7,9 @@ import * as d3 from 'd3'; import {Range, cell} from 'phovea_core/src/range'; import {onDOMNodeRemoved} from 'phovea_core/src'; import {toSelectOperation, defaultSelectionType} from 'phovea_core/src/idtype'; -import {IScale, isMissing, ICommonHeatMapOptions} from './internal'; +import {isMissing} from './defaultUtils'; +import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; +import {IScale} from './IScale'; import {IHeatMapRenderer, ESelectOption} from './IHeatMapRenderer'; import {IHeatMapAbleMatrix} from './HeatMap'; diff --git a/src/heatmap/HeatMapImageRenderer.ts b/src/heatmap/HeatMapImageRenderer.ts index 714e74f..0975ee2 100644 --- a/src/heatmap/HeatMapImageRenderer.ts +++ b/src/heatmap/HeatMapImageRenderer.ts @@ -4,9 +4,10 @@ import * as d3 from 'd3'; -import {all, Range} from 'phovea_core/src/range'; +import {all} from 'phovea_core/src/range'; import {IHeatMapUrlOptions} from 'phovea_core/src/matrix'; -import {IScale, ICommonHeatMapOptions} from './internal'; +import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; +import {IScale} from './IScale'; import {IHeatMapRenderer, ESelectOption} from './IHeatMapRenderer'; import AHeatMapCanvasRenderer from './AHeatMapCanvasRenderer'; import {IHeatMapAbleMatrix} from './HeatMap'; diff --git a/src/heatmap/IHeatMapRenderer.ts b/src/heatmap/IHeatMapRenderer.ts index ed3c514..5bc7ea1 100644 --- a/src/heatmap/IHeatMapRenderer.ts +++ b/src/heatmap/IHeatMapRenderer.ts @@ -3,7 +3,7 @@ */ import * as d3 from 'd3'; -import {IScale} from './internal'; +import {IScale} from './IScale'; import {IHeatMapAbleMatrix} from './HeatMap'; export enum ESelectOption { From bd5a91b49cee2eea1865442334195a367f300157 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 14 May 2020 10:41:50 +0200 Subject: [PATCH 23/67] rename create functions and move code out of index.ts --- src/heatmap/HeatMap.ts | 11 ++++++++++- src/heatmap/HeatMap1D.ts | 2 +- src/heatmap/index.ts | 13 ------------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/heatmap/HeatMap.ts b/src/heatmap/HeatMap.ts index 1f4527a..af6721e 100644 --- a/src/heatmap/HeatMap.ts +++ b/src/heatmap/HeatMap.ts @@ -18,6 +18,7 @@ import {IHeatMapRenderer, ESelectOption} from './IHeatMapRenderer'; import HeatMapDOMRenderer from './HeatMapDOMRenderer'; import HeatMapImageRenderer from './HeatMapImageRenderer'; import HeatMapCanvasRenderer from './HeatMapCanvasRenderer'; +import {IHeatMap1DOptions, create1D, IHeatMapAbleVector} from './HeatMap1D'; export declare type IHeatMapAbleMatrix = INumericalMatrix|ICategoricalMatrix; @@ -251,7 +252,15 @@ export default class HeatMap extends AVisInstance implements IVisInstance { } } -export function create(data: IHeatMapAbleMatrix, parent: HTMLElement, options?: IHeatMapOptions) { +export function create2D(data: IHeatMapAbleMatrix, parent: HTMLElement, options?: IHeatMapOptions) { return new HeatMap(data, parent, options); } +export function createHeatMapDimensions(data: IHeatMapAbleMatrix|IHeatMapAbleVector, parent: HTMLElement, options?: IHeatMapOptions|IHeatMap1DOptions): AVisInstance { + if (data.desc.type === 'matrix') { + return create2D(data, parent, options); + } else if (data.desc.type === 'vector') { + return create1D(data, parent, options); + } + throw new Error('unknown data type: ' + data.desc.type); +} diff --git a/src/heatmap/HeatMap1D.ts b/src/heatmap/HeatMap1D.ts index e146037..90957f3 100644 --- a/src/heatmap/HeatMap1D.ts +++ b/src/heatmap/HeatMap1D.ts @@ -160,6 +160,6 @@ export default class HeatMap1D extends AVisInstance implements IVisInstance { } -export function create(data: IHeatMapAbleVector, parent: HTMLElement, options?: IHeatMap1DOptions): AVisInstance { +export function create1D(data: IHeatMapAbleVector, parent: HTMLElement, options?: IHeatMap1DOptions): AVisInstance { return new HeatMap1D(data, parent, options); } diff --git a/src/heatmap/index.ts b/src/heatmap/index.ts index c5df2d7..1973d74 100644 --- a/src/heatmap/index.ts +++ b/src/heatmap/index.ts @@ -2,18 +2,5 @@ * Created by Samuel Gratzl on 05.08.2014. */ -import {AVisInstance} from 'phovea_core/src/vis'; -import {IHeatMapOptions, create as create2D, IHeatMapAbleMatrix} from './HeatMap'; -import {IHeatMap1DOptions, create as create1D, IHeatMapAbleVector} from './HeatMap1D'; -export {default as HeatMap, IHeatMapAbleMatrix} from './HeatMap'; -export {default as HeatMap1D, IHeatMapAbleVector} from './HeatMap1D'; -export function create(data: IHeatMapAbleMatrix|IHeatMapAbleVector, parent: HTMLElement, options?: IHeatMapOptions|IHeatMap1DOptions): AVisInstance { - if (data.desc.type === 'matrix') { - return create2D(data, parent, options); - } else if (data.desc.type === 'vector') { - return create1D(data, parent, options); - } - throw new Error('unknown data type: ' + data.desc.type); -} From f4783541e9bf70c187bf20b422e162319066e348 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 14 May 2020 10:42:41 +0200 Subject: [PATCH 24/67] update import statement --- tests/heatmap.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/heatmap.test.ts b/tests/heatmap.test.ts index 0fb564f..ff3dfc1 100644 --- a/tests/heatmap.test.ts +++ b/tests/heatmap.test.ts @@ -1,5 +1,6 @@ /// -import {toScale, defaultDomain, defaultColor} from '../src/heatmap/internal'; +import {defaultDomain, defaultColor} from '../src/heatmap/defaultUtils'; +import {toScale} from '../src/heatmap/IScale'; import {INumberValueTypeDesc} from 'phovea_core/src/datatype'; describe('toScale', () => { From 4ba6fe1d814cb3b9d617e49d30785eecd7cc6d3f Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 14 May 2020 10:52:18 +0200 Subject: [PATCH 25/67] add src/heatmap/index.ts --- src/heatmap/index.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/heatmap/index.ts b/src/heatmap/index.ts index 1973d74..a747b38 100644 --- a/src/heatmap/index.ts +++ b/src/heatmap/index.ts @@ -2,5 +2,19 @@ * Created by Samuel Gratzl on 05.08.2014. */ - - +export * from './defaultUtils'; +export * from './HeatMap'; +export {default as HeatMap} from './HeatMap'; +export * from './HeatMap1D'; +export {default as HeatMap1D} from './HeatMap1D'; +export * from './IHeatMapRenderer'; +export * from './IScale'; +export * from './AHeatMapCanvasRenderer'; +export {default as AHeatMapCanvasRenderer} from './AHeatMapCanvasRenderer'; +export * from './HeatMapCanvasRenderer'; +export {default as HeatMapCanvasRenderer} from './HeatMapCanvasRenderer'; +export * from './HeatMapDOMRenderer'; +export {default as HeatMapDOMRenderer} from './HeatMapDOMRenderer'; +export * from './HeatMapImageRenderer'; +export {default as HeatMapImageRenderer} from './HeatMapImageRenderer'; +export * from './ICommonHeatMapOptions'; From 5d2237707106917489017bce57f43e317f22c849 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 14 May 2020 10:52:36 +0200 Subject: [PATCH 26/67] rename create functions --- src/list/barplot.ts | 2 +- src/list/list.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/list/barplot.ts b/src/list/barplot.ts index 8625173..2d6b088 100644 --- a/src/list/barplot.ts +++ b/src/list/barplot.ts @@ -45,6 +45,6 @@ export default class BarPlot extends AList { export default List; -export function create(data: IAnyVector, parent: HTMLElement, options: IListOptions) { +export function createList(data: IAnyVector, parent: HTMLElement, options: IListOptions) { return new List(data, parent, options); } From 070df2778b71fce36395ac8ee3c3fbd2cd33eab9 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 14 May 2020 10:52:44 +0200 Subject: [PATCH 27/67] add internal index.ts --- src/list/internal/internal.ts | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 src/list/internal/internal.ts diff --git a/src/list/internal/internal.ts b/src/list/internal/internal.ts new file mode 100644 index 0000000..dcb3dde --- /dev/null +++ b/src/list/internal/internal.ts @@ -0,0 +1,2 @@ +export * from './AList'; +export {default as AList} from './AList'; From 4148503cc200f49131b459068914f4c1eb8bfe91 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 14 May 2020 10:52:56 +0200 Subject: [PATCH 28/67] add src/list/index.ts --- src/list/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/list/index.ts diff --git a/src/list/index.ts b/src/list/index.ts new file mode 100644 index 0000000..1fd5e1c --- /dev/null +++ b/src/list/index.ts @@ -0,0 +1,7 @@ +export * from './internal/internal'; +export * from './barplot'; +export {default as BarPlot} from './barplot'; +export * from './list'; +export {default as List} from './list'; +export * from './proportionalSymbol'; +export {default as ProportionalSymbol} from './proportionalSymbol'; From 7076370e5b28713782cb00edcae97f3640a362c3 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 14 May 2020 10:56:53 +0200 Subject: [PATCH 29/67] rename remaining create functions --- src/axis.ts | 2 +- src/box.ts | 2 +- src/distribution/Histogram.ts | 2 +- src/force_directed_graph.ts | 2 +- src/kaplanmeier.ts | 2 +- src/list/proportionalSymbol.ts | 2 +- src/table.ts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/axis.ts b/src/axis.ts index 4ff0e8e..0fabd3a 100644 --- a/src/axis.ts +++ b/src/axis.ts @@ -189,6 +189,6 @@ export class Axis extends AVisInstance implements IVisInstance { export default Axis; -export function create(data: INumericalVector, parent: HTMLElement, options: IAxisOptions) { +export function createAxis(data: INumericalVector, parent: HTMLElement, options: IAxisOptions) { return new Axis(data, parent, options); } diff --git a/src/box.ts b/src/box.ts index b6d173c..e84a032 100644 --- a/src/box.ts +++ b/src/box.ts @@ -107,6 +107,6 @@ export class BoxPlot extends AVisInstance implements IVisInstance { } export default BoxPlot; -export function create(data: INumericalVector, parent: Element, options?: IBoxPlotOptions) { +export function createBoxPlot(data: INumericalVector, parent: Element, options?: IBoxPlotOptions) { return new BoxPlot(data, parent, options); } diff --git a/src/distribution/Histogram.ts b/src/distribution/Histogram.ts index ba5ba8a..906b504 100644 --- a/src/distribution/Histogram.ts +++ b/src/distribution/Histogram.ts @@ -193,6 +193,6 @@ export default class Histogram extends AVisInstance implements IVisInstance { } -export function create(data: IHistAbleDataType, parent: Element, options?: IHistogramOptions) { +export function createHistrogram(data: IHistAbleDataType, parent: Element, options?: IHistogramOptions) { return new Histogram(data, parent, options); } diff --git a/src/force_directed_graph.ts b/src/force_directed_graph.ts index fe8cb06..48d9e55 100644 --- a/src/force_directed_graph.ts +++ b/src/force_directed_graph.ts @@ -182,6 +182,6 @@ export class ForceDirectedGraphVis extends AVisInstance implements IVisInstance } } -export function create(data: GraphProxy, parent: Element, options?: IForceDirectedGraphOptions) { +export function createForceDirectedGraphVis(data: GraphProxy, parent: Element, options?: IForceDirectedGraphOptions) { return new ForceDirectedGraphVis(data, parent, options); } diff --git a/src/kaplanmeier.ts b/src/kaplanmeier.ts index a569650..534712c 100644 --- a/src/kaplanmeier.ts +++ b/src/kaplanmeier.ts @@ -139,6 +139,6 @@ export class KaplanMeierPlot extends AVisInstance implements IVisInstance { } } -export function create(data: INumericalVector, parent: Element, options?: IKaplanMaierOptions) { +export function createKaplanMeierPlot(data: INumericalVector, parent: Element, options?: IKaplanMaierOptions) { return new KaplanMeierPlot(data, parent, options); } diff --git a/src/list/proportionalSymbol.ts b/src/list/proportionalSymbol.ts index 44d76c6..824f5f1 100644 --- a/src/list/proportionalSymbol.ts +++ b/src/list/proportionalSymbol.ts @@ -47,6 +47,6 @@ export default class ProportionalSymbol extends AList Date: Thu, 14 May 2020 10:58:18 +0200 Subject: [PATCH 30/67] add main index.ts --- src/index.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/index.ts diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..88a504c --- /dev/null +++ b/src/index.ts @@ -0,0 +1,11 @@ +export * from './distribution'; +export * from './heatmap'; +export * from './list'; + +export * from './axis'; +export {default as Axis} from './axis'; +export * from './box'; +export {default as BoxPlot} from './box'; +export * from './force_directed_graph'; +export * from './kaplanmeier'; +export * from './table'; From d31e18a41f1836d94a258f80d57f39c33892de02 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 14 May 2020 11:00:41 +0200 Subject: [PATCH 31/67] refactor remaining imports --- tests/axis.test.ts | 4 ++-- tests/table.test.ts | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/axis.test.ts b/tests/axis.test.ts index dd9350f..0233186 100644 --- a/tests/axis.test.ts +++ b/tests/axis.test.ts @@ -1,8 +1,8 @@ /// -import {create} from '../src/axis'; +import {createAxis} from '../src/axis'; describe('create', () => { it('is method', () => { - expect(typeof create).toEqual('function'); + expect(typeof createAxis).toEqual('function'); }); }); diff --git a/tests/table.test.ts b/tests/table.test.ts index 2c97e68..a1efab6 100644 --- a/tests/table.test.ts +++ b/tests/table.test.ts @@ -1,6 +1,6 @@ /// -import {create} from '../src/table'; -import {parseMatrix} from 'phovea_d3/src/parser'; +import {createTable} from '../src/table'; +import {asMatrix as parseMatrix} from 'phovea_core/src/matrix'; import {parse} from 'phovea_core/src/range'; describe('table', () => { @@ -18,9 +18,9 @@ describe('table', () => { ['A', 'B'] // col_ids ); const element = document.createElement('div'); - squareTable = create(data, element); - colTable = create(data.view(parse([[0,1],[1]])), element); - rowTable = create(data.view(parse([[1],[0,1]])), element); + squareTable = createTable(data, element); + colTable = createTable(data.view(parse([[0,1],[1]])), element); + rowTable = createTable(data.view(parse([[1],[0,1]])), element); setTimeout(function() { done(); }, 1000); // TODO: Can we do better than this? create() doesn't let us provide a callback? From 26dcd252b4b059bbb19606e41e3c8a7eb5c874ed Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Mon, 18 May 2020 09:03:04 +0200 Subject: [PATCH 32/67] switch branches in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c0796a3..25c2402 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ }, "dependencies": { "phovea_core": "github:phovea/phovea_core#develop", - "phovea_d3": "github:phovea/phovea_d3#develop", + "phovea_d3": "github:phovea/phovea_d3#vstoiber/refactoring", "@types/d3": "~3.5.36", "d3": "~3.5.17" }, From 7309b3edead3478648be0fab05eef499844c0c28 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 19 May 2020 12:26:33 +0200 Subject: [PATCH 33/67] remove default export --- src/axis.ts | 3 --- src/box.ts | 2 -- src/distribution/Histogram.ts | 2 +- src/distribution/Mosaic.ts | 2 +- src/distribution/Pie.ts | 2 +- src/distribution/index.ts | 3 --- src/heatmap/AHeatMapCanvasRenderer.ts | 2 -- src/heatmap/HeatMap.ts | 2 +- src/heatmap/HeatMap1D.ts | 2 +- src/heatmap/HeatMapCanvasRenderer.ts | 2 +- src/heatmap/HeatMapDOMRenderer.ts | 2 +- src/heatmap/HeatMapImageRenderer.ts | 9 +-------- src/heatmap/index.ts | 6 ------ src/index.ts | 2 -- src/list/barplot.ts | 2 +- src/list/index.ts | 3 --- src/list/internal/AList.ts | 2 -- src/list/internal/internal.ts | 1 - src/list/list.ts | 2 -- src/list/proportionalSymbol.ts | 2 +- 20 files changed, 10 insertions(+), 43 deletions(-) diff --git a/src/axis.ts b/src/axis.ts index 0fabd3a..9448574 100644 --- a/src/axis.ts +++ b/src/axis.ts @@ -186,9 +186,6 @@ export class Axis extends AVisInstance implements IVisInstance { return base; } } - -export default Axis; - export function createAxis(data: INumericalVector, parent: HTMLElement, options: IAxisOptions) { return new Axis(data, parent, options); } diff --git a/src/box.ts b/src/box.ts index e84a032..48a53b5 100644 --- a/src/box.ts +++ b/src/box.ts @@ -104,8 +104,6 @@ export class BoxPlot extends AVisInstance implements IVisInstance { return rect(ex[0], 0, ex[1] - ex[0], 50); }); } -} -export default BoxPlot; export function createBoxPlot(data: INumericalVector, parent: Element, options?: IBoxPlotOptions) { return new BoxPlot(data, parent, options); diff --git a/src/distribution/Histogram.ts b/src/distribution/Histogram.ts index 906b504..92bd3e4 100644 --- a/src/distribution/Histogram.ts +++ b/src/distribution/Histogram.ts @@ -38,7 +38,7 @@ export interface IHistogramOptions extends IDistributionOptions { color?: number; } -export default class Histogram extends AVisInstance implements IVisInstance { +export class Histogram extends AVisInstance implements IVisInstance { private options: IHistogramOptions = { nbins: 5, total: true, diff --git a/src/distribution/Mosaic.ts b/src/distribution/Mosaic.ts index 8c78223..6274396 100644 --- a/src/distribution/Mosaic.ts +++ b/src/distribution/Mosaic.ts @@ -39,7 +39,7 @@ export interface IMosaicOptions extends IDistributionOptions { selectAble?: boolean; } -export default class Mosaic extends AVisInstance implements IVisInstance { +export class Mosaic extends AVisInstance implements IVisInstance { private readonly options: IMosaicOptions = { width: 20, initialScale: 10, diff --git a/src/distribution/Pie.ts b/src/distribution/Pie.ts index dd3eb09..a38bb6d 100644 --- a/src/distribution/Pie.ts +++ b/src/distribution/Pie.ts @@ -67,7 +67,7 @@ export interface IPieOptions extends IDistributionOptions { innerRadius?: number; } -export default class Pie extends AVisInstance implements IVisInstance { +export class Pie extends AVisInstance implements IVisInstance { private readonly options: IPieOptions = { radius: 50, innerRadius: 0, diff --git a/src/distribution/index.ts b/src/distribution/index.ts index 886700a..6d0ed67 100644 --- a/src/distribution/index.ts +++ b/src/distribution/index.ts @@ -4,8 +4,5 @@ export * from './HistData'; export * from './Histogram'; -export {default as Histogram} from './Histogram'; export * from './Mosaic'; -export {default as Mosaic} from './Mosaic'; export * from './Pie'; -export {default as Pie} from './Pie'; diff --git a/src/heatmap/AHeatMapCanvasRenderer.ts b/src/heatmap/AHeatMapCanvasRenderer.ts index a9a5694..ace90a1 100644 --- a/src/heatmap/AHeatMapCanvasRenderer.ts +++ b/src/heatmap/AHeatMapCanvasRenderer.ts @@ -112,5 +112,3 @@ export abstract class AHeatMapCanvasRenderer { }); } } - -export default AHeatMapCanvasRenderer; diff --git a/src/heatmap/HeatMap.ts b/src/heatmap/HeatMap.ts index af6721e..fa4e8f3 100644 --- a/src/heatmap/HeatMap.ts +++ b/src/heatmap/HeatMap.ts @@ -63,7 +63,7 @@ export interface IHeatMapOptions extends ICommonHeatMapOptions { labels?: ESelectOption; } -export default class HeatMap extends AVisInstance implements IVisInstance { +export class HeatMap extends AVisInstance implements IVisInstance { private $node: d3.Selection; private colorer: IScale; private renderer: IHeatMapRenderer; diff --git a/src/heatmap/HeatMap1D.ts b/src/heatmap/HeatMap1D.ts index 90957f3..93e13ae 100644 --- a/src/heatmap/HeatMap1D.ts +++ b/src/heatmap/HeatMap1D.ts @@ -29,7 +29,7 @@ export interface IHeatMap1DOptions extends ICommonHeatMapOptions { export declare type IHeatMapAbleVector = INumericalVector|ICategoricalVector; -export default class HeatMap1D extends AVisInstance implements IVisInstance { +export class HeatMap1D extends AVisInstance implements IVisInstance { private readonly $node: d3.Selection; private readonly colorer: IScale; diff --git a/src/heatmap/HeatMapCanvasRenderer.ts b/src/heatmap/HeatMapCanvasRenderer.ts index f93ba11..a056c45 100644 --- a/src/heatmap/HeatMapCanvasRenderer.ts +++ b/src/heatmap/HeatMapCanvasRenderer.ts @@ -11,7 +11,7 @@ import {IHeatMapRenderer, ESelectOption} from './IHeatMapRenderer'; import AHeatMapCanvasRenderer from './AHeatMapCanvasRenderer'; import {IHeatMapAbleMatrix} from './HeatMap'; -export default class HeatMapCanvasRenderer extends AHeatMapCanvasRenderer implements IHeatMapRenderer { +export class HeatMapCanvasRenderer extends AHeatMapCanvasRenderer implements IHeatMapRenderer { private imageData: ImageData; private ready = false; diff --git a/src/heatmap/HeatMapDOMRenderer.ts b/src/heatmap/HeatMapDOMRenderer.ts index 2e55a02..0f21ead 100644 --- a/src/heatmap/HeatMapDOMRenderer.ts +++ b/src/heatmap/HeatMapDOMRenderer.ts @@ -13,7 +13,7 @@ import {IScale} from './IScale'; import {IHeatMapRenderer, ESelectOption} from './IHeatMapRenderer'; import {IHeatMapAbleMatrix} from './HeatMap'; -export default class HeatMapDOMRenderer implements IHeatMapRenderer { +export class HeatMapDOMRenderer implements IHeatMapRenderer { private color: IScale; constructor(private readonly selectAble: ESelectOption = ESelectOption.CELL, private readonly options: ICommonHeatMapOptions) { diff --git a/src/heatmap/HeatMapImageRenderer.ts b/src/heatmap/HeatMapImageRenderer.ts index 0975ee2..0cb221e 100644 --- a/src/heatmap/HeatMapImageRenderer.ts +++ b/src/heatmap/HeatMapImageRenderer.ts @@ -15,14 +15,7 @@ import {sendAPI, encodeParams, MAX_URL_LENGTH} from 'phovea_core/src/ajax'; import parseRange from 'phovea_core/src/range/parser'; import {prepareHeatmapUrlParameter} from 'phovea_core/src/matrix/loader'; - -function ensureHex(color: string) { - const rgb = d3.rgb(color); - const toHex = (d: number) => ('00' + d.toString(16)).slice(-2); - return `#${toHex(rgb.r)}${toHex(rgb.g)}${toHex(rgb.b)}`; -} - -export default class HeatMapImageRenderer extends AHeatMapCanvasRenderer implements IHeatMapRenderer { +export class HeatMapImageRenderer extends AHeatMapCanvasRenderer implements IHeatMapRenderer { private image: HTMLImageElement; private ready = false; private color: IScale; diff --git a/src/heatmap/index.ts b/src/heatmap/index.ts index a747b38..9e04702 100644 --- a/src/heatmap/index.ts +++ b/src/heatmap/index.ts @@ -4,17 +4,11 @@ export * from './defaultUtils'; export * from './HeatMap'; -export {default as HeatMap} from './HeatMap'; export * from './HeatMap1D'; -export {default as HeatMap1D} from './HeatMap1D'; export * from './IHeatMapRenderer'; export * from './IScale'; export * from './AHeatMapCanvasRenderer'; -export {default as AHeatMapCanvasRenderer} from './AHeatMapCanvasRenderer'; export * from './HeatMapCanvasRenderer'; -export {default as HeatMapCanvasRenderer} from './HeatMapCanvasRenderer'; export * from './HeatMapDOMRenderer'; -export {default as HeatMapDOMRenderer} from './HeatMapDOMRenderer'; export * from './HeatMapImageRenderer'; -export {default as HeatMapImageRenderer} from './HeatMapImageRenderer'; export * from './ICommonHeatMapOptions'; diff --git a/src/index.ts b/src/index.ts index 88a504c..31ec531 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,9 +3,7 @@ export * from './heatmap'; export * from './list'; export * from './axis'; -export {default as Axis} from './axis'; export * from './box'; -export {default as BoxPlot} from './box'; export * from './force_directed_graph'; export * from './kaplanmeier'; export * from './table'; diff --git a/src/list/barplot.ts b/src/list/barplot.ts index 2d6b088..53602b4 100644 --- a/src/list/barplot.ts +++ b/src/list/barplot.ts @@ -14,7 +14,7 @@ export interface IBarPlotOptions extends IAListOptions { max?: number; } -export default class BarPlot extends AList { +export class BarPlot extends AList { private readonly scale = scale.linear(); constructor(data: INumericalVector, parent: HTMLElement, options: IBarPlotOptions = {}) { diff --git a/src/list/index.ts b/src/list/index.ts index 1fd5e1c..c13f1a7 100644 --- a/src/list/index.ts +++ b/src/list/index.ts @@ -1,7 +1,4 @@ export * from './internal/internal'; export * from './barplot'; -export {default as BarPlot} from './barplot'; export * from './list'; -export {default as List} from './list'; export * from './proportionalSymbol'; -export {default as ProportionalSymbol} from './proportionalSymbol'; diff --git a/src/list/internal/AList.ts b/src/list/internal/AList.ts index 9d25180..2a28f39 100644 --- a/src/list/internal/AList.ts +++ b/src/list/internal/AList.ts @@ -101,6 +101,4 @@ export abstract class AList { } } -export default List; - export function createList(data: IAnyVector, parent: HTMLElement, options: IListOptions) { return new List(data, parent, options); } diff --git a/src/list/proportionalSymbol.ts b/src/list/proportionalSymbol.ts index 824f5f1..973147c 100644 --- a/src/list/proportionalSymbol.ts +++ b/src/list/proportionalSymbol.ts @@ -14,7 +14,7 @@ export interface IProportionalSymbolOptions extends IAListOptions { max?: number; } -export default class ProportionalSymbol extends AList { +export class ProportionalSymbol extends AList { private readonly scale = scale.linear(); constructor(data: INumericalVector, parent: HTMLElement, options: IProportionalSymbolOptions = {}) { From a219e418223ddab3f0f294ea894739e123bb6322 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 19 May 2020 14:37:41 +0200 Subject: [PATCH 34/67] initial refactoring --- src/axis.ts | 7 ++-- src/box.ts | 5 ++- src/distribution/Histogram.ts | 7 ++-- src/distribution/Mosaic.ts | 6 +-- src/distribution/Pie.ts | 36 ++++++++-------- src/force_directed_graph.ts | 7 ++-- src/heatmap/HeatMap.ts | 61 ++++++++++++++-------------- src/heatmap/HeatMap1D.ts | 7 ++-- src/heatmap/HeatMapCanvasRenderer.ts | 2 +- src/heatmap/HeatMapImageRenderer.ts | 12 ++++-- src/kaplanmeier.ts | 6 +-- src/list/barplot.ts | 10 +++-- src/list/list.ts | 4 +- src/list/proportionalSymbol.ts | 8 ++-- src/table.ts | 6 +-- tests/axis.test.ts | 4 +- tests/table.test.ts | 8 ++-- 17 files changed, 102 insertions(+), 94 deletions(-) diff --git a/src/axis.ts b/src/axis.ts index 9448574..8a536e2 100644 --- a/src/axis.ts +++ b/src/axis.ts @@ -185,7 +185,8 @@ export class Axis extends AVisInstance implements IVisInstance { base.h += 2 * this.options.r; return base; } -} -export function createAxis(data: INumericalVector, parent: HTMLElement, options: IAxisOptions) { - return new Axis(data, parent, options); + + static createAxis(data: INumericalVector, parent: HTMLElement, options: IAxisOptions) { + return new Axis(data, parent, options); + } } diff --git a/src/box.ts b/src/box.ts index 48a53b5..35245de 100644 --- a/src/box.ts +++ b/src/box.ts @@ -105,6 +105,7 @@ export class BoxPlot extends AVisInstance implements IVisInstance { }); } -export function createBoxPlot(data: INumericalVector, parent: Element, options?: IBoxPlotOptions) { - return new BoxPlot(data, parent, options); + static createBoxPlot(data: INumericalVector, parent: Element, options?: IBoxPlotOptions) { + return new BoxPlot(data, parent, options); + } } diff --git a/src/distribution/Histogram.ts b/src/distribution/Histogram.ts index 92bd3e4..af003c3 100644 --- a/src/distribution/Histogram.ts +++ b/src/distribution/Histogram.ts @@ -190,9 +190,8 @@ export class Histogram extends AVisInstance implements IVisInstance { this.options.rotate = rotate; return act; } -} - -export function createHistrogram(data: IHistAbleDataType, parent: Element, options?: IHistogramOptions) { - return new Histogram(data, parent, options); + static createHistrogram(data: IHistAbleDataType, parent: Element, options?: IHistogramOptions) { + return new Histogram(data, parent, options); + } } diff --git a/src/distribution/Mosaic.ts b/src/distribution/Mosaic.ts index 6274396..cc1faed 100644 --- a/src/distribution/Mosaic.ts +++ b/src/distribution/Mosaic.ts @@ -190,8 +190,8 @@ export class Mosaic extends AVisInstance implements IVisInstance { this.options.rotate = rotate; return act; } -} -export function createMosaic(data: IHistAbleDataType|IStratification, parent: Element, options?: IMosaicOptions) { - return new Mosaic(data, parent, options); + static createMosaic(data: IHistAbleDataType|IStratification, parent: Element, options?: IMosaicOptions) { + return new Mosaic(data, parent, options); + } } diff --git a/src/distribution/Pie.ts b/src/distribution/Pie.ts index a38bb6d..ab616d6 100644 --- a/src/distribution/Pie.ts +++ b/src/distribution/Pie.ts @@ -16,20 +16,6 @@ import {vec2, polygon} from 'phovea_core/src/geom'; import bindTooltip from 'phovea_d3/src/tooltip'; import {IDistributionOptions, ITotalHeight, resolveHistMax} from './HistData'; - -function toPolygon(start: number, end: number, radius: number) { - const r = [ - vec2(radius, radius), - vec2(radius + Math.cos(start) * radius, radius + Math.sin(start) * radius), - vec2(radius + Math.cos(end) * radius, radius + Math.sin(end) * radius) - ]; - //approximate by triangle - if (end - start > Math.PI) { //more than 180 degree use one more point - r.splice(2, 0, vec2(radius + Math.cos((end - start) * 0.5) * radius, radius + Math.sin((end - start) * 0.5) * radius)); - } - return polygon(r); -} - interface IRadialHistData { name: string; start: number; @@ -194,7 +180,7 @@ export class Pie extends AVisInstance implements IVisInstance { const ex = d3.extent(data, (value) => this.hist.binOf(value)); const startAngle = this.scale(this.histData[ex[0]].start); const endAngle = this.scale(this.histData[ex[1]].end); - return Promise.resolve(toPolygon(startAngle, endAngle, o.radius)); + return Promise.resolve(Pie.toPolygon(startAngle, endAngle, o.radius)); }); } @@ -219,6 +205,22 @@ export class Pie extends AVisInstance implements IVisInstance { return act; } + static createPie(data: IHistAbleDataType|IStratification, parent: Element, options?: IPieOptions) { + return new Pie(data, parent, options); + } + + static toPolygon(start: number, end: number, radius: number) { + const r = [ + vec2(radius, radius), + vec2(radius + Math.cos(start) * radius, radius + Math.sin(start) * radius), + vec2(radius + Math.cos(end) * radius, radius + Math.sin(end) * radius) + ]; + //approximate by triangle + if (end - start > Math.PI) { //more than 180 degree use one more point + r.splice(2, 0, vec2(radius + Math.cos((end - start) * 0.5) * radius, radius + Math.sin((end - start) * 0.5) * radius)); + } + return polygon(r); + } //updatedOption (name, value) { // if (name === 'innerRadius' || name === 'radius' || name === 'total') { @@ -233,7 +235,3 @@ export class Pie extends AVisInstance implements IVisInstance { // this.$node.selectAll('path').transition().attr('d', this.arc); //} } - -export function createPie(data: IHistAbleDataType|IStratification, parent: Element, options?: IPieOptions) { - return new Pie(data, parent, options); -} diff --git a/src/force_directed_graph.ts b/src/force_directed_graph.ts index 48d9e55..0be6565 100644 --- a/src/force_directed_graph.ts +++ b/src/force_directed_graph.ts @@ -180,8 +180,7 @@ export class ForceDirectedGraphVis extends AVisInstance implements IVisInstance }); return $svg; } -} - -export function createForceDirectedGraphVis(data: GraphProxy, parent: Element, options?: IForceDirectedGraphOptions) { - return new ForceDirectedGraphVis(data, parent, options); + static createForceDirectedGraphVis(data: GraphProxy, parent: Element, options?: IForceDirectedGraphOptions) { + return new ForceDirectedGraphVis(data, parent, options); + } } diff --git a/src/heatmap/HeatMap.ts b/src/heatmap/HeatMap.ts index fa4e8f3..01c5962 100644 --- a/src/heatmap/HeatMap.ts +++ b/src/heatmap/HeatMap.ts @@ -15,28 +15,13 @@ import {defaultColor, defaultDomain} from './defaultUtils'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; import {toScale, IScale} from './IScale'; import {IHeatMapRenderer, ESelectOption} from './IHeatMapRenderer'; -import HeatMapDOMRenderer from './HeatMapDOMRenderer'; -import HeatMapImageRenderer from './HeatMapImageRenderer'; -import HeatMapCanvasRenderer from './HeatMapCanvasRenderer'; -import {IHeatMap1DOptions, create1D, IHeatMapAbleVector} from './HeatMap1D'; +import {HeatMapDOMRenderer} from './HeatMapDOMRenderer'; +import {HeatMapImageRenderer} from './HeatMapImageRenderer'; +import {HeatMapCanvasRenderer} from './HeatMapCanvasRenderer'; +import {HeatMap1D, IHeatMap1DOptions, IHeatMapAbleVector} from './HeatMap1D'; export declare type IHeatMapAbleMatrix = INumericalMatrix|ICategoricalMatrix; -function createRenderer(d: IHeatMapAbleMatrix, selectAble: ESelectOption = ESelectOption.CELL, options:IHeatMapOptions): IHeatMapRenderer { - const cells = d.length; - if (cells <= 1000) { - return new HeatMapDOMRenderer(selectAble, options); - } - const url = d.heatmapUrl(); //can the url be created the return value should be valid - if (url && options.forceThumbnails) { - return new HeatMapImageRenderer(selectAble, options); - } else if (cells < 5000 || url === null) { - return new HeatMapCanvasRenderer(selectAble, options); - } else { - return new HeatMapImageRenderer(selectAble, options); - } -} - export interface IHeatMapOptions extends ICommonHeatMapOptions { /** * @default null @@ -105,7 +90,7 @@ export class HeatMap extends AVisInstance implements IVisInstance { const selection = typeof this.options.selectAble === 'boolean' ? (this.options.selectAble ? ESelectOption.CELL : ESelectOption.NONE) : ESelectOption[this.options.selectAble]; - this.renderer = createRenderer(data, selection, this.options); + this.renderer = HeatMap.createRenderer(data, selection, this.options); this.$node = this.build(d3.select(parent)); this.$node.datum(data); @@ -250,17 +235,33 @@ export class HeatMap extends AVisInstance implements IVisInstance { update() { this.renderer.redraw(this.$node, this.options.scale); } -} -export function create2D(data: IHeatMapAbleMatrix, parent: HTMLElement, options?: IHeatMapOptions) { - return new HeatMap(data, parent, options); -} + static createRenderer(d: IHeatMapAbleMatrix, selectAble: ESelectOption = ESelectOption.CELL, options:IHeatMapOptions): IHeatMapRenderer { + const cells = d.length; + if (cells <= 1000) { + return new HeatMapDOMRenderer(selectAble, options); + } + const url = d.heatmapUrl(); //can the url be created the return value should be valid + if (url && options.forceThumbnails) { + return new HeatMapImageRenderer(selectAble, options); + } else if (cells < 5000 || url === null) { + return new HeatMapCanvasRenderer(selectAble, options); + } else { + return new HeatMapImageRenderer(selectAble, options); + } + } -export function createHeatMapDimensions(data: IHeatMapAbleMatrix|IHeatMapAbleVector, parent: HTMLElement, options?: IHeatMapOptions|IHeatMap1DOptions): AVisInstance { - if (data.desc.type === 'matrix') { - return create2D(data, parent, options); - } else if (data.desc.type === 'vector') { - return create1D(data, parent, options); + static create2D(data: IHeatMapAbleMatrix, parent: HTMLElement, options?: IHeatMapOptions) { + return new HeatMap(data, parent, options); + } + + static createHeatMapDimensions(data: IHeatMapAbleMatrix|IHeatMapAbleVector, parent: HTMLElement, options?: IHeatMapOptions|IHeatMap1DOptions): AVisInstance { + if (data.desc.type === 'matrix') { + return HeatMap.create2D(data, parent, options); + } else if (data.desc.type === 'vector') { + return HeatMap1D.create1D(data, parent, options); + } + throw new Error('unknown data type: ' + data.desc.type); } - throw new Error('unknown data type: ' + data.desc.type); } + diff --git a/src/heatmap/HeatMap1D.ts b/src/heatmap/HeatMap1D.ts index 93e13ae..c21a7b0 100644 --- a/src/heatmap/HeatMap1D.ts +++ b/src/heatmap/HeatMap1D.ts @@ -157,9 +157,8 @@ export class HeatMap1D extends AVisInstance implements IVisInstance { }); return $svg; } -} - -export function create1D(data: IHeatMapAbleVector, parent: HTMLElement, options?: IHeatMap1DOptions): AVisInstance { - return new HeatMap1D(data, parent, options); + static create1D(data: IHeatMapAbleVector, parent: HTMLElement, options?: IHeatMap1DOptions): AVisInstance { + return new HeatMap1D(data, parent, options); + } } diff --git a/src/heatmap/HeatMapCanvasRenderer.ts b/src/heatmap/HeatMapCanvasRenderer.ts index a056c45..24cd54a 100644 --- a/src/heatmap/HeatMapCanvasRenderer.ts +++ b/src/heatmap/HeatMapCanvasRenderer.ts @@ -8,7 +8,7 @@ import {isMissing} from './defaultUtils'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; import {IScale} from './IScale'; import {IHeatMapRenderer, ESelectOption} from './IHeatMapRenderer'; -import AHeatMapCanvasRenderer from './AHeatMapCanvasRenderer'; +import {AHeatMapCanvasRenderer} from './AHeatMapCanvasRenderer'; import {IHeatMapAbleMatrix} from './HeatMap'; export class HeatMapCanvasRenderer extends AHeatMapCanvasRenderer implements IHeatMapRenderer { diff --git a/src/heatmap/HeatMapImageRenderer.ts b/src/heatmap/HeatMapImageRenderer.ts index 0cb221e..dde02b6 100644 --- a/src/heatmap/HeatMapImageRenderer.ts +++ b/src/heatmap/HeatMapImageRenderer.ts @@ -9,7 +9,7 @@ import {IHeatMapUrlOptions} from 'phovea_core/src/matrix'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; import {IScale} from './IScale'; import {IHeatMapRenderer, ESelectOption} from './IHeatMapRenderer'; -import AHeatMapCanvasRenderer from './AHeatMapCanvasRenderer'; +import {AHeatMapCanvasRenderer} from './AHeatMapCanvasRenderer'; import {IHeatMapAbleMatrix} from './HeatMap'; import {sendAPI, encodeParams, MAX_URL_LENGTH} from 'phovea_core/src/ajax'; import parseRange from 'phovea_core/src/range/parser'; @@ -107,7 +107,7 @@ export class HeatMapImageRenderer extends AHeatMapCanvasRenderer implements IHea const domain = c.domain(); const args: IHeatMapUrlOptions = { range: [domain[0], domain[domain.length - 1]], - missing: ensureHex(this.options.missingColor) + missing: HeatMapImageRenderer.ensureHex(this.options.missingColor) }; function arrEqual(a: any[], b: any[]) { @@ -125,7 +125,7 @@ export class HeatMapImageRenderer extends AHeatMapCanvasRenderer implements IHea } else if (arrEqual(colors, ['blue', 'white', 'red'])) { args.palette = 'blue_white_red'; } else if (colors.length === 2 || colors.length === 3) { - args.palette = colors.map(ensureHex).join('-'); + args.palette = colors.map(HeatMapImageRenderer.ensureHex).join('-'); } // persist to get range and create range object again @@ -149,4 +149,10 @@ export class HeatMapImageRenderer extends AHeatMapCanvasRenderer implements IHea return $root; } + + static ensureHex(color: string) { + const rgb = d3.rgb(color); + const toHex = (d: number) => ('00' + d.toString(16)).slice(-2); + return `#${toHex(rgb.r)}${toHex(rgb.g)}${toHex(rgb.b)}`; + } } diff --git a/src/kaplanmeier.ts b/src/kaplanmeier.ts index 534712c..92e0e85 100644 --- a/src/kaplanmeier.ts +++ b/src/kaplanmeier.ts @@ -137,8 +137,8 @@ export class KaplanMeierPlot extends AVisInstance implements IVisInstance { }); return $svg; } -} -export function createKaplanMeierPlot(data: INumericalVector, parent: Element, options?: IKaplanMaierOptions) { - return new KaplanMeierPlot(data, parent, options); + static createKaplanMeierPlot(data: INumericalVector, parent: Element, options?: IKaplanMaierOptions) { + return new KaplanMeierPlot(data, parent, options); + } } diff --git a/src/list/barplot.ts b/src/list/barplot.ts index 53602b4..15e35be 100644 --- a/src/list/barplot.ts +++ b/src/list/barplot.ts @@ -6,7 +6,7 @@ import '../style.scss'; import {scale} from 'd3'; import {mixin} from 'phovea_core/src'; import {INumericalVector} from 'phovea_core/src/vector'; -import AList, {IAListOptions} from './internal/AList'; +import {AList, IAListOptions} from './internal/AList'; import {INumberValueTypeDesc} from 'phovea_core/src/datatype'; export interface IBarPlotOptions extends IAListOptions { @@ -43,8 +43,10 @@ export class BarPlot extends AList { $update.style('font-size', (factor >= 1 ? null : Math.round(factor * 100) + '%')); $update.text(formatter); } + + } export function createList(data: IAnyVector, parent: HTMLElement, options: IListOptions) { diff --git a/src/list/proportionalSymbol.ts b/src/list/proportionalSymbol.ts index 973147c..1fad14c 100644 --- a/src/list/proportionalSymbol.ts +++ b/src/list/proportionalSymbol.ts @@ -6,7 +6,7 @@ import '../style.scss'; import {scale} from 'd3'; import {mixin} from 'phovea_core/src'; import {INumericalVector} from 'phovea_core/src/vector'; -import AList, {IAListOptions} from './internal/AList'; +import {AList, IAListOptions} from './internal/AList'; import {INumberValueTypeDesc} from 'phovea_core/src/datatype'; export interface IProportionalSymbolOptions extends IAListOptions { @@ -45,8 +45,8 @@ export class ProportionalSymbol extends AList -import {createAxis} from '../src/axis'; +import {Axis} from '../src/axis'; describe('create', () => { it('is method', () => { - expect(typeof createAxis).toEqual('function'); + expect(typeof Axis.createAxis).toEqual('function'); }); }); diff --git a/tests/table.test.ts b/tests/table.test.ts index a1efab6..8ee39ac 100644 --- a/tests/table.test.ts +++ b/tests/table.test.ts @@ -1,5 +1,5 @@ /// -import {createTable} from '../src/table'; +import {Table} from '../src/table'; import {asMatrix as parseMatrix} from 'phovea_core/src/matrix'; import {parse} from 'phovea_core/src/range'; @@ -18,9 +18,9 @@ describe('table', () => { ['A', 'B'] // col_ids ); const element = document.createElement('div'); - squareTable = createTable(data, element); - colTable = createTable(data.view(parse([[0,1],[1]])), element); - rowTable = createTable(data.view(parse([[1],[0,1]])), element); + squareTable = Table.createTable(data, element); + colTable = Table.createTable(data.view(parse([[0,1],[1]])), element); + rowTable = Table.createTable(data.view(parse([[1],[0,1]])), element); setTimeout(function() { done(); }, 1000); // TODO: Can we do better than this? create() doesn't let us provide a callback? From bb531c6fcfa3aa35478a657ecb5772752987f78f Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 20 May 2020 15:53:14 +0200 Subject: [PATCH 35/67] improve refactoring and update phovea_d3 imports --- package.json | 6 +- src/axis.ts | 4 +- src/box.ts | 4 +- src/distribution/HistData.ts | 117 ++++++++++++++------------- src/distribution/Histogram.ts | 10 +-- src/distribution/Mosaic.ts | 8 +- src/distribution/Pie.ts | 8 +- src/heatmap/DefaultUtils.ts | 41 ++++++++++ src/heatmap/HeatMap.ts | 6 +- src/heatmap/HeatMap1D.ts | 14 ++-- src/heatmap/HeatMapCanvasRenderer.ts | 4 +- src/heatmap/HeatMapDOMRenderer.ts | 10 +-- src/heatmap/defaultUtils.ts | 38 --------- src/heatmap/index.ts | 2 +- src/list/internal/AList.ts | 4 +- src/list/list.ts | 6 +- src/table.ts | 4 +- tests/heatmap.test.ts | 18 ++--- 18 files changed, 155 insertions(+), 149 deletions(-) create mode 100644 src/heatmap/DefaultUtils.ts delete mode 100644 src/heatmap/defaultUtils.ts diff --git a/package.json b/package.json index 25c2402..f9121e4 100644 --- a/package.json +++ b/package.json @@ -51,10 +51,10 @@ "dist": "mkdir dist && cd build && tar cvzf ../dist/phovea_vis.tar.gz *" }, "dependencies": { - "phovea_core": "github:phovea/phovea_core#develop", - "phovea_d3": "github:phovea/phovea_d3#vstoiber/refactoring", "@types/d3": "~3.5.36", - "d3": "~3.5.17" + "d3": "~3.5.17", + "phovea_core": "github:phovea/phovea_core#develop", + "phovea_d3": "github:phovea/phovea_d3#vstoiber/refactoring" }, "devDependencies": { "@types/jest": "25.1.4", diff --git a/src/axis.ts b/src/axis.ts index 8a536e2..640ac71 100644 --- a/src/axis.ts +++ b/src/axis.ts @@ -6,7 +6,7 @@ import './style.scss'; import * as d3 from 'd3'; import {mixin} from 'phovea_core/src'; import {AVisInstance, IVisInstance, assignVis, ITransform, IVisInstanceOptions} from 'phovea_core/src/vis'; -import {selectionUtil} from 'phovea_d3/src/d3util'; +import {D3Utils} from 'phovea_d3/src/d3util'; import {INumericalVector} from 'phovea_core/src/vector'; import {Range} from 'phovea_core/src/range'; @@ -104,7 +104,7 @@ export class Axis extends AVisInstance implements IVisInstance { } $axis.call(axis); - const onClick = selectionUtil(this.data, $points, 'circle'); + const onClick = D3Utils.selectionUtil(this.data, $points, 'circle'); const cxy = (o.orient === 'left' || o.orient === 'right') ? 'cy' : 'cx'; data.data().then((arr) => { diff --git a/src/box.ts b/src/box.ts index 35245de..a449355 100644 --- a/src/box.ts +++ b/src/box.ts @@ -9,7 +9,7 @@ import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea import {rect} from 'phovea_core/src/geom'; import {mixin} from 'phovea_core/src'; import {INumericalVector} from 'phovea_core/src/vector'; -import bindTooltip from 'phovea_d3/src/tooltip'; +import {ToolTip} from 'phovea_d3/src/ToolTip'; export declare type IBoxPlotOptions = IVisInstanceOptions; @@ -78,7 +78,7 @@ export class BoxPlot extends AVisInstance implements IVisInstance { width: s(stats.q3), height: '80%', 'class': 'box' - }).call(bindTooltip(text)); + }).call(ToolTip.bind(text)); $t.append('line').attr({ x1: s(stats.median), diff --git a/src/distribution/HistData.ts b/src/distribution/HistData.ts index 0c9535d..9515023 100644 --- a/src/distribution/HistData.ts +++ b/src/distribution/HistData.ts @@ -22,72 +22,75 @@ export interface IHistData { readonly color: string; } -function createCategoricalHistData(hist: ICatHistogram): IHistData[] { - const categories: any[] = hist.categories; - const cols = hist.colors || d3.scale.category10().range(); - const total = hist.validCount; - const data = []; - let acc = 0; +export class HistUtils { - hist.forEach((b, i) => { - data[i] = { - v: b, - acc, - ratio: b / total, - range: hist.range(i), + static createCategoricalHistData(hist: ICatHistogram): IHistData[] { + const categories: any[] = hist.categories; + const cols = hist.colors || d3.scale.category10().range(); + const total = hist.validCount; + const data = []; + let acc = 0; - name: (typeof categories[i] === 'string') ? categories[i] : categories[i].name, - color: (categories[i].color === undefined) ? cols[i] : categories[i].color - }; - acc += b; - }); - return data; -} + hist.forEach((b, i) => { + data[i] = { + v: b, + acc, + ratio: b / total, + range: hist.range(i), -function createNumericalHistData(hist: IHistogram, range: number[]): IHistData[] { - const data = [], - cols = d3.scale.linear().domain(range).range(['#111111', '#999999']), - total = hist.validCount, - binWidth = (range[1] - range[0]) / hist.bins; - let acc = 0; - hist.forEach((b, i) => { - data[i] = { - v: b, - acc, - ratio: b / total, - range: hist.range(i), + name: (typeof categories[i] === 'string') ? categories[i] : categories[i].name, + color: (categories[i].color === undefined) ? cols[i] : categories[i].color + }; + acc += b; + }); + return data; + } - name: 'Bin ' + (i + 1) + ' (center: ' + d3.round((i + 0.5) * binWidth, 2) + ')', - color: cols((i + 0.5) * binWidth) - }; - acc += b; - }); - return data; -} + static createNumericalHistData(hist: IHistogram, range: number[]): IHistData[] { + const data = [], + cols = d3.scale.linear().domain(range).range(['#111111', '#999999']), + total = hist.validCount, + binWidth = (range[1] - range[0]) / hist.bins; + let acc = 0; + hist.forEach((b, i) => { + data[i] = { + v: b, + acc, + ratio: b / total, + range: hist.range(i), -export function createHistData(hist: IHistogram, data: IHistAbleDataType|IStratification) { - if (data.desc.type === 'stratification') { - return createCategoricalHistData(hist); + name: 'Bin ' + (i + 1) + ' (center: ' + d3.round((i + 0.5) * binWidth, 2) + ')', + color: cols((i + 0.5) * binWidth) + }; + acc += b; + }); + return data; } - const d = (>data).valuetype; - if (d.type === VALUE_TYPE_CATEGORICAL) { - return createCategoricalHistData(hist); - } - return createNumericalHistData(hist, (d).range); -} - -export function resolveHistMax(hist: IHistogram, totalHeight: ITotalHeight): Promise { - const op: ((hist: IHistogram) => number|boolean) = typeof totalHeight === 'function' ? (<(hist: IHistogram) => number|boolean>totalHeight) : () => totalHeight; - return Promise.resolve(op(hist)).then((r: number|boolean) => { - if (r === true) { - return hist.validCount; + static createHistData(hist: IHistogram, data: IHistAbleDataType|IStratification) { + if (data.desc.type === 'stratification') { + return HistUtils.createCategoricalHistData(hist); } - if (r === false) { - return hist.largestBin; + const d = (>data).valuetype; + if (d.type === VALUE_TYPE_CATEGORICAL) { + return HistUtils.createCategoricalHistData(hist); } - return r; - }); + return HistUtils.createNumericalHistData(hist, (d).range); + } + + + static resolveHistMax(hist: IHistogram, totalHeight: ITotalHeight): Promise { + const op: ((hist: IHistogram) => number|boolean) = typeof totalHeight === 'function' ? (<(hist: IHistogram) => number|boolean>totalHeight) : () => totalHeight; + return Promise.resolve(op(hist)).then((r: number|boolean) => { + if (r === true) { + return hist.validCount; + } + if (r === false) { + return hist.largestBin; + } + return r; + }); + } } export declare type ITotalHeight = number|boolean|((hist: IHistogram) => number|boolean|Promise); diff --git a/src/distribution/Histogram.ts b/src/distribution/Histogram.ts index af003c3..c26c1bd 100644 --- a/src/distribution/Histogram.ts +++ b/src/distribution/Histogram.ts @@ -11,8 +11,8 @@ import {IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc} from import {IStratification} from 'phovea_core/src/stratification'; import {IHistogram} from 'phovea_core/src/math'; import {toSelectOperation} from 'phovea_core/src/idtype'; -import bindTooltip from 'phovea_d3/src/tooltip'; -import {createHistData, IDistributionOptions, IHistData, ITotalHeight, resolveHistMax} from './HistData'; +import {ToolTip} from 'phovea_d3/src/ToolTip'; +import {HistUtils, IDistributionOptions, IHistData, ITotalHeight} from './HistData'; export interface IHistogramOptions extends IDistributionOptions { /** @@ -125,16 +125,16 @@ export class Histogram extends AVisInstance implements IVisInstance { this.data.hist(Math.floor(o.nbins)).then((hist) => { this.hist = hist; xscale.domain(d3.range(hist.bins)); - return resolveHistMax(hist, this.options.total); + return HistUtils.resolveHistMax(hist, this.options.total); }).then((histmax) => { const hist = this.hist; yscale.domain([0, histmax]); - const histData = this.histData = createHistData(hist, this.data); + const histData = this.histData = HistUtils.createHistData(hist, this.data); const $m = $data.selectAll('rect').data(histData); $m.enter().append('rect') .attr('width', xscale.rangeBand()) - .call(bindTooltip((d) => `${d.name} ${d.v} entries (${Math.round(d.ratio * 100)}%)`)) + .call(ToolTip.bind((d) => `${d.name} ${d.v} entries (${Math.round(d.ratio * 100)}%)`)) .on('click', onClick); $m.attr({ x: (d, i) => xscale(i), diff --git a/src/distribution/Mosaic.ts b/src/distribution/Mosaic.ts index cc1faed..75eb1ac 100644 --- a/src/distribution/Mosaic.ts +++ b/src/distribution/Mosaic.ts @@ -11,8 +11,8 @@ import {IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc} from import {IStratification} from 'phovea_core/src/stratification'; import {IHistogram} from 'phovea_core/src/math'; import {toSelectOperation} from 'phovea_core/src/idtype'; -import bindTooltip from 'phovea_d3/src/tooltip'; -import {createHistData, IDistributionOptions, IHistData} from './HistData'; +import {ToolTip} from 'phovea_d3/src/ToolTip'; +import {HistUtils, IDistributionOptions, IHistData} from './HistData'; export interface IMosaicOptions extends IDistributionOptions { @@ -124,12 +124,12 @@ export class Mosaic extends AVisInstance implements IVisInstance { this.data.hist().then((hist) => { this.hist = hist; - const histData = this.histData = createHistData(hist, data); + const histData = this.histData = HistUtils.createHistData(hist, data); const $m = $data.selectAll('rect').data(histData); $m.enter().append('rect') .attr('width', '100%') - .call(bindTooltip((d) => `${d.name} ${d.v} entries (${Math.round(d.ratio * 100)}%)`)) + .call(ToolTip.bind((d) => `${d.name} ${d.v} entries (${Math.round(d.ratio * 100)}%)`)) .on('click', onClick); $m.attr({ y: (d) => d.acc, diff --git a/src/distribution/Pie.ts b/src/distribution/Pie.ts index ab616d6..3f8c893 100644 --- a/src/distribution/Pie.ts +++ b/src/distribution/Pie.ts @@ -13,8 +13,8 @@ import {IStratification} from 'phovea_core/src/stratification'; import {ICatHistogram} from 'phovea_core/src/math'; import {toSelectOperation} from 'phovea_core/src/idtype'; import {vec2, polygon} from 'phovea_core/src/geom'; -import bindTooltip from 'phovea_d3/src/tooltip'; -import {IDistributionOptions, ITotalHeight, resolveHistMax} from './HistData'; +import {ToolTip} from 'phovea_d3/src/ToolTip'; +import {IDistributionOptions, ITotalHeight, HistUtils} from './HistData'; interface IRadialHistData { name: string; @@ -131,7 +131,7 @@ export class Pie extends AVisInstance implements IVisInstance { data.hist().then((hist) => { this.hist = hist; - return resolveHistMax(hist, this.options.total); + return HistUtils.resolveHistMax(hist, this.options.total); }).then((total) => { const hist = this.hist; scale.domain([0, total]); @@ -154,7 +154,7 @@ export class Pie extends AVisInstance implements IVisInstance { const $m = $data.selectAll('path').data(histData); $m.enter() .append('path') - .call(bindTooltip((d) => d.name + ' ' + (d.size) + ' entries (' + Math.round(d.ratio * 100) + '%)')) + .call(ToolTip.bind((d) => d.name + ' ' + (d.size) + ' entries (' + Math.round(d.ratio * 100) + '%)')) .on('click', (d) => data.select(0, d.range, toSelectOperation(d3.event))); $m.attr('d', arc) .attr('fill', (d) => d.color) diff --git a/src/heatmap/DefaultUtils.ts b/src/heatmap/DefaultUtils.ts new file mode 100644 index 0000000..fb93c8b --- /dev/null +++ b/src/heatmap/DefaultUtils.ts @@ -0,0 +1,41 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ + +import { + VALUE_TYPE_CATEGORICAL, INumberValueTypeDesc, + ICategoricalValueTypeDesc, ICategory +} from 'phovea_core/src/datatype'; + +export class DefaultUtils { + + static defaultColor(value: INumberValueTypeDesc|ICategoricalValueTypeDesc): string[] { + if (value.type === VALUE_TYPE_CATEGORICAL) { + return (value).categories.map((c) => typeof c === 'string' ? 'gray' : (c).color || 'gray'); + } + const nv = value; + const r = nv.range; + if (r[0] < 0 && r[1] > 0) { + //use a symmetric range + return ['blue', 'white', 'red']; + } + return ['white', 'red']; + } + + static defaultDomain(value: INumberValueTypeDesc|ICategoricalValueTypeDesc): (string|number)[] { + if (value.type === VALUE_TYPE_CATEGORICAL) { + return (value).categories.map((c) => typeof c === 'string' ? c : (c).name); + } + const nv = value; + const r = nv.range; + if (r[0] < 0 && r[1] > 0) { + //use a symmetric range + return [Math.min(r[0], -r[1]), 0, Math.max(-r[0], r[1])]; + } + return r; + } + + static isMissing(v: any) { + return (v === null || (typeof v === 'number' && isNaN(v))); + } +} diff --git a/src/heatmap/HeatMap.ts b/src/heatmap/HeatMap.ts index 01c5962..134c9c1 100644 --- a/src/heatmap/HeatMap.ts +++ b/src/heatmap/HeatMap.ts @@ -11,7 +11,7 @@ import {rect} from 'phovea_core/src/geom'; import {mixin, onDOMNodeRemoved} from 'phovea_core/src'; import {toSelectOperation} from 'phovea_core/src/idtype'; import {INumericalMatrix, ICategoricalMatrix, DIM_ROW, DIM_COL} from 'phovea_core/src/matrix/IMatrix'; -import {defaultColor, defaultDomain} from './defaultUtils'; +import {DefaultUtils} from './DefaultUtils'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; import {toScale, IScale} from './IScale'; import {IHeatMapRenderer, ESelectOption} from './IHeatMapRenderer'; @@ -70,8 +70,8 @@ export class HeatMap extends AVisInstance implements IVisInstance { super(); const value = this.data.valuetype; mixin(this.options, { - color: defaultColor(value), - domain: defaultDomain(value) + color: DefaultUtils.defaultColor(value), + domain: DefaultUtils.defaultDomain(value) }, options); // if direct scale not given use initial scale diff --git a/src/heatmap/HeatMap1D.ts b/src/heatmap/HeatMap1D.ts index c21a7b0..bf1209c 100644 --- a/src/heatmap/HeatMap1D.ts +++ b/src/heatmap/HeatMap1D.ts @@ -8,9 +8,9 @@ import {Range} from 'phovea_core/src/range'; import {AVisInstance, IVisInstance, assignVis} from 'phovea_core/src/vis'; import {rect} from 'phovea_core/src/geom'; import {mixin} from 'phovea_core/src'; -import {selectionUtil} from 'phovea_d3/src/d3util'; +import {D3Utils} from 'phovea_d3/src/d3util'; import {INumericalVector, ICategoricalVector} from 'phovea_core/src/vector'; -import {defaultColor, defaultDomain, isMissing} from './defaultUtils'; +import {DefaultUtils} from './DefaultUtils'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; import {toScale, IScale} from './IScale'; @@ -46,8 +46,8 @@ export class HeatMap1D extends AVisInstance implements IVisInstance { super(); const value = this.data.valuetype; mixin(this.options, { - color: defaultColor(value), - domain: defaultDomain(value) + color: DefaultUtils.defaultColor(value), + domain: DefaultUtils.defaultDomain(value) }, options); this.options.scale = [1, this.options.initialScale]; if (this.options.heightTo) { @@ -125,7 +125,7 @@ export class HeatMap1D extends AVisInstance implements IVisInstance { private recolor() { const c = this.colorer; c.domain(this.options.domain).range(this.options.color); - this.$node.selectAll('rect').attr('fill', (d) => isMissing(d) ? this.options.missingColor : c(d)); + this.$node.selectAll('rect').attr('fill', (d) => DefaultUtils.isMissing(d) ? this.options.missingColor : c(d)); } private build($parent: d3.Selection) { @@ -143,13 +143,13 @@ export class HeatMap1D extends AVisInstance implements IVisInstance { const t = >this.data.data(); t.then((arr: any[]) => { const $rows = $g.selectAll('rect').data(arr); - const onClick = selectionUtil(this.data, $g, 'rect'); + const onClick = D3Utils.selectionUtil(this.data, $g, 'rect'); $rows.enter().append('rect').on('click', onClick).attr({ width: this.options.width, height: 1 }).append('title').text(String); $rows.attr({ - fill: (d) => isMissing(d) ? this.options.missingColor : c(d), + fill: (d) => DefaultUtils.isMissing(d) ? this.options.missingColor : c(d), y: (d, i) => i }); $rows.exit().remove(); diff --git a/src/heatmap/HeatMapCanvasRenderer.ts b/src/heatmap/HeatMapCanvasRenderer.ts index 24cd54a..89183a9 100644 --- a/src/heatmap/HeatMapCanvasRenderer.ts +++ b/src/heatmap/HeatMapCanvasRenderer.ts @@ -4,7 +4,7 @@ import * as d3 from 'd3'; -import {isMissing} from './defaultUtils'; +import {DefaultUtils} from './DefaultUtils'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; import {IScale} from './IScale'; import {IHeatMapRenderer, ESelectOption} from './IHeatMapRenderer'; @@ -51,7 +51,7 @@ export class HeatMapCanvasRenderer extends AHeatMapCanvasRenderer implements IHe arr.forEach((row, j) => { const t = j * ncol; row.forEach((cell, i) => { - const color = d3.rgb(isMissing(cell) ? this.options.missingColor : c(cell)); + const color = d3.rgb(DefaultUtils.isMissing(cell) ? this.options.missingColor : c(cell)); rgba[(t + i) * 4] = color.r; rgba[(t + i) * 4 + 1] = color.g; rgba[(t + i) * 4 + 2] = color.b; diff --git a/src/heatmap/HeatMapDOMRenderer.ts b/src/heatmap/HeatMapDOMRenderer.ts index 0f21ead..efe559e 100644 --- a/src/heatmap/HeatMapDOMRenderer.ts +++ b/src/heatmap/HeatMapDOMRenderer.ts @@ -7,7 +7,7 @@ import * as d3 from 'd3'; import {Range, cell} from 'phovea_core/src/range'; import {onDOMNodeRemoved} from 'phovea_core/src'; import {toSelectOperation, defaultSelectionType} from 'phovea_core/src/idtype'; -import {isMissing} from './defaultUtils'; +import {DefaultUtils} from './DefaultUtils'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; import {IScale} from './IScale'; import {IHeatMapRenderer, ESelectOption} from './IHeatMapRenderer'; @@ -35,8 +35,8 @@ export class HeatMapDOMRenderer implements IHeatMapRenderer { redraw($node: d3.Selection, scale: number[]) { $node.select('svg').selectAll('rect') - .attr('fill', (d) => isMissing(d) ? this.options.missingColor : this.color(d)) - .classed('missing', isMissing); + .attr('fill', (d) => DefaultUtils.isMissing(d) ? this.options.missingColor : this.color(d)) + .classed('missing', DefaultUtils.isMissing); } build(data: IHeatMapAbleMatrix, $parent: d3.Selection, scale: [number, number], c: IScale, onReady: () => void) { @@ -60,9 +60,9 @@ export class HeatMapDOMRenderer implements IHeatMapRenderer { height: 1, x: (d, j) => j, y: i, - fill: (d) => isMissing(d) ? that.options.missingColor : c(d) + fill: (d) => DefaultUtils.isMissing(d) ? that.options.missingColor : c(d) }); - $colsEnter.classed('missing', isMissing); + $colsEnter.classed('missing', DefaultUtils.isMissing); if (that.selectAble !== ESelectOption.NONE) { $colsEnter.on('click', (d, j) => { data.selectProduct([cell(i, j)], toSelectOperation(d3.event)); diff --git a/src/heatmap/defaultUtils.ts b/src/heatmap/defaultUtils.ts deleted file mode 100644 index 758fbe9..0000000 --- a/src/heatmap/defaultUtils.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Created by Samuel Gratzl on 26.12.2016. - */ - -import { - VALUE_TYPE_CATEGORICAL, INumberValueTypeDesc, - ICategoricalValueTypeDesc, ICategory -} from 'phovea_core/src/datatype'; - - -export function defaultColor(value: INumberValueTypeDesc|ICategoricalValueTypeDesc): string[] { - if (value.type === VALUE_TYPE_CATEGORICAL) { - return (value).categories.map((c) => typeof c === 'string' ? 'gray' : (c).color || 'gray'); - } - const nv = value; - const r = nv.range; - if (r[0] < 0 && r[1] > 0) { - //use a symmetric range - return ['blue', 'white', 'red']; - } - return ['white', 'red']; -} -export function defaultDomain(value: INumberValueTypeDesc|ICategoricalValueTypeDesc): (string|number)[] { - if (value.type === VALUE_TYPE_CATEGORICAL) { - return (value).categories.map((c) => typeof c === 'string' ? c : (c).name); - } - const nv = value; - const r = nv.range; - if (r[0] < 0 && r[1] > 0) { - //use a symmetric range - return [Math.min(r[0], -r[1]), 0, Math.max(-r[0], r[1])]; - } - return r; -} - -export function isMissing(v: any) { - return (v === null || (typeof v === 'number' && isNaN(v))); -} diff --git a/src/heatmap/index.ts b/src/heatmap/index.ts index 9e04702..21775c9 100644 --- a/src/heatmap/index.ts +++ b/src/heatmap/index.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 05.08.2014. */ -export * from './defaultUtils'; +export * from './DefaultUtils'; export * from './HeatMap'; export * from './HeatMap1D'; export * from './IHeatMapRenderer'; diff --git a/src/list/internal/AList.ts b/src/list/internal/AList.ts index 2a28f39..716f03f 100644 --- a/src/list/internal/AList.ts +++ b/src/list/internal/AList.ts @@ -6,7 +6,7 @@ import '../../style.scss'; import {select, extent, selection} from 'd3'; import {mixin} from 'phovea_core/src'; import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea_core/src/vis'; -import {selectionUtil} from 'phovea_d3/src/d3util'; +import {D3Utils} from 'phovea_d3/src/d3util'; import {IVector} from 'phovea_core/src/vector'; import {rect} from 'phovea_core/src/geom'; import Range from 'phovea_core/src/range/Range'; @@ -92,7 +92,7 @@ export abstract class AList { const $rows = this.$node.selectAll('div').data(arr); const $rowsEnter = $rows.enter().append('div').on('click', onClick); diff --git a/src/list/list.ts b/src/list/list.ts index 8d3e69d..52885ed 100644 --- a/src/list/list.ts +++ b/src/list/list.ts @@ -26,9 +26,9 @@ export class List extends AList { $update.text(formatter); } + static createList(data: IAnyVector, parent: HTMLElement, options: IListOptions) { + return new List(data, parent, options); + } } -export function createList(data: IAnyVector, parent: HTMLElement, options: IListOptions) { - return new List(data, parent, options); -} diff --git a/src/table.ts b/src/table.ts index 4ca10e1..a82c332 100644 --- a/src/table.ts +++ b/src/table.ts @@ -10,7 +10,7 @@ import {rect} from 'phovea_core/src/geom'; import {IAnyMatrix} from 'phovea_core/src/matrix'; import {ITable} from 'phovea_core/src/table'; import {IAnyVector} from 'phovea_core/src/vector'; -import {selectionUtil} from 'phovea_d3/src/d3util'; +import {D3Utils} from 'phovea_d3/src/d3util'; import {mixin} from 'phovea_core/src'; export declare type ITableOptions = IVisInstanceOptions; @@ -91,7 +91,7 @@ export class Table extends AVisInstance implements IVisInstance { const $table = $parent.append('table').attr('class', 'phovea-table'); $table.append('thead').append('tr'); $table.append('tbody'); - const onClick = selectionUtil(this.data, $table.select('tbody'), 'tr'); + const onClick = D3Utils.selectionUtil(this.data, $table.select('tbody'), 'tr'); Promise.all(promises).then((arr) => { const cols: string[] = arr[0], rows: string[] = arr[1], d: any[][] = arr[2]; const $headers = $table.select('thead tr').selectAll('th').data(['ID'].concat(cols)); diff --git a/tests/heatmap.test.ts b/tests/heatmap.test.ts index ff3dfc1..6ed657b 100644 --- a/tests/heatmap.test.ts +++ b/tests/heatmap.test.ts @@ -1,5 +1,5 @@ /// -import {defaultDomain, defaultColor} from '../src/heatmap/defaultUtils'; +import {DefaultUtils} from '../src/heatmap/DefaultUtils'; import {toScale} from '../src/heatmap/IScale'; import {INumberValueTypeDesc} from 'phovea_core/src/datatype'; @@ -9,8 +9,8 @@ describe('toScale', () => { type: 'real', range: [-1, 1] }; - const domain = defaultDomain(value); - const range = defaultColor(value); + const domain = DefaultUtils.defaultDomain(value); + const range = DefaultUtils.defaultColor(value); const scale = toScale(value).domain(domain).range(range); expect(scale(-1)).toEqual('#0000ff'); expect(scale(0)).toEqual('#ffffff'); @@ -21,8 +21,8 @@ describe('toScale', () => { type: 'real', range: [-0.1, 10] }; - const domain = defaultDomain(value); - const range = defaultColor(value); + const domain = DefaultUtils.defaultDomain(value); + const range = DefaultUtils.defaultColor(value); const scale = toScale(value).domain(domain).range(range); expect(scale(-0.1)).toEqual('#fcfcff'); expect(scale(0)).toEqual('#ffffff'); @@ -34,8 +34,8 @@ describe('toScale', () => { type: 'real', range: [0, 1] }; - const domain = defaultDomain(value); - const range = defaultColor(value); + const domain = DefaultUtils.defaultDomain(value); + const range = DefaultUtils.defaultColor(value); const scale = toScale(value).domain(domain).range(range); expect(scale(0)).toEqual('#ffffff'); expect(scale(0.5)).toEqual('#ff8080'); // interpolation @@ -46,8 +46,8 @@ describe('toScale', () => { type: 'real', range: [-1, 0] }; - const domain = defaultDomain(value); - const range = defaultColor(value); + const domain = DefaultUtils.defaultDomain(value); + const range = DefaultUtils.defaultColor(value); const scale = toScale(value).domain(domain).range(range); expect(scale(-1)).toEqual('#ffffff'); // TODO: Should be #0000ff? expect(scale(0)).toEqual('#ff0000'); // TODO: Should be #ffffff? From 9622438ff2a63834193c03ae3d1b7fae48a00222 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 26 May 2020 09:37:35 +0200 Subject: [PATCH 36/67] remove index.js --- index.js | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 index.js diff --git a/index.js b/index.js deleted file mode 100644 index 61859c3..0000000 --- a/index.js +++ /dev/null @@ -1,51 +0,0 @@ -/* ***************************************************************************** - * Caleydo - Visualization for Molecular Biology - http://caleydo.org - * Copyright (c) The Caleydo Team. All rights reserved. - * Licensed under the new BSD license, available at http://caleydo.org/license - **************************************************************************** */ - -/** - * generates and object that contain all modules in the src folder accessible as properties - */ - -/** - * magic file name for the pseudo root file - * @type {string} - */ -var INDEX_FILE = './index.ts'; -/** - * sorts the given filename by name ensuring INDEX is the first one - * @param a - * @param b - * @returns {number} - */ -function byName(a, b) { - if (a === INDEX_FILE) { - return a === b ? 0 : -1; - } - if (b === INDEX_FILE) { - return 1; - } - return a.toLowerCase().localeCompare(b.toLowerCase()); -} -// list all modules in the src folder excluding the one starting with _ -var req = require.context('./src', true, /^\.\/(?!internal)(([^_][\w]+)|(\w+\/index))\.tsx?$/); - -var files = req.keys().sort(byName); - -// root file exists? else use anonymous root object -if (files[0] === INDEX_FILE) { - module.exports = req(files.shift()); -} else { - module.exports = {}; -} - -// generate getter for all modules -files.forEach(function (f) { - Object.defineProperty(module.exports, f.substring(2, f.lastIndexOf('/index.') > 0 ? f.lastIndexOf('/index.') : f.lastIndexOf('.')), { - get: function () { - return req(f); - }, - enumerable: true - }); -}); From b81d8a71d780264c15f1713a5842d0170c8a82a7 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 26 May 2020 09:37:57 +0200 Subject: [PATCH 37/67] remove webpack config and tests --- tests.webpack.js | 14 -- webpack.config.js | 393 ---------------------------------------------- 2 files changed, 407 deletions(-) delete mode 100644 tests.webpack.js delete mode 100644 webpack.config.js diff --git a/tests.webpack.js b/tests.webpack.js deleted file mode 100644 index 9438ac4..0000000 --- a/tests.webpack.js +++ /dev/null @@ -1,14 +0,0 @@ -/* ***************************************************************************** - * Caleydo - Visualization for Molecular Biology - http://caleydo.org - * Copyright (c) The Caleydo Team. All rights reserved. - * Licensed under the new BSD license, available at http://caleydo.org/license - **************************************************************************** */ - -// build registry -require('./phovea_registry.js'); - -/** - * find all tests in the spec directory and load them - */ -var context = require.context('./tests', true, /\.test\.ts$/); // make sure you have your directory and regex test set correctly! -context.keys().forEach(context); diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index 0088ec6..0000000 --- a/webpack.config.js +++ /dev/null @@ -1,393 +0,0 @@ -/* ***************************************************************************** - * Caleydo - Visualization for Molecular Biology - http://caleydo.org - * Copyright (c) The Caleydo Team. All rights reserved. - * Licensed under the new BSD license, available at http://caleydo.org/license - **************************************************************************** */ - -const {libraryAliases, libraryExternals, modules, entries, ignores, type, registry, vendor} = require('./.yo-rc.json')['generator-phovea']; -const resolve = require('path').resolve; -const pkg = require('./package.json'); -const webpack = require('webpack'); -const fs = require('fs'); -const ExtractTextPlugin = require('extract-text-webpack-plugin'); -const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); -const buildInfo = require('./buildInfo.js'); - -const now = new Date(); -const prefix = (n) => n < 10 ? ('0' + n) : n.toString(); -const buildId = `${now.getUTCFullYear()}${prefix(now.getUTCMonth() + 1)}${prefix(now.getUTCDate())}-${prefix(now.getUTCHours())}${prefix(now.getUTCMinutes())}${prefix(now.getUTCSeconds())}`; -pkg.version = pkg.version.replace('SNAPSHOT', buildId); - -const year = (new Date()).getFullYear(); -const banner = '/*! ' + (pkg.title || pkg.name) + ' - v' + pkg.version + ' - ' + year + '\n' + - (pkg.homepage ? '* ' + pkg.homepage + '\n' : '') + - '* Copyright (c) ' + year + ' ' + pkg.author.name + ';' + - ' Licensed ' + pkg.license + '*/\n'; - -const preCompilerFlags = {flags: (registry || {}).flags || {}}; -const includeFeature = registry ? (extension, id) => { - const exclude = registry.exclude || []; - const include = registry.include || []; - if (!exclude && !include) { - return true; - } - const test = (f) => Array.isArray(f) ? extension.match(f[0]) && (id || '').match(f[1]) : extension.match(f); - return include.every(test) && !exclude.some(test); -} : () => true; - -const tsLoader = [ - { - loader: 'awesome-typescript-loader' - } -]; - -const tsLoaderDev = [ - {loader: 'cache-loader'}, - { - loader: 'thread-loader', - options: { - // there should be 1 cpu for the fork-ts-checker-webpack-plugin - workers: require('os').cpus().length - 1 - } - }, - { - loader: 'ts-loader', - options: { - happyPackMode: true, // IMPORTANT! use happyPackMode mode to speed-up compilation and reduce errors reported to webpack, - compilerOptions: { - target: 'es6' - } - } - } -]; - -// list of loaders and their mappings -const webpackloaders = [ - {test: /\.scss$/, use: 'style-loader!css-loader!sass-loader'}, - {test: /\.css$/, use: 'style-loader!css-loader'}, - {test: /\.tsx?$/, use: tsLoader}, - { - test: /phovea(_registry)?\.js$/, use: [{ - loader: 'ifdef-loader', - options: Object.assign({include: includeFeature}, preCompilerFlags) - }] - }, - {test: /\.json$/, use: 'json-loader'}, - { - test: /\.(png|jpg|gif|webp)$/, - loader: 'url-loader', - options: { - limit: 10000 // inline <= 10kb - } - }, - { - test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, - loader: 'url-loader', - options: { - limit: 10000, // inline <= 10kb - mimetype: 'application/font-woff' - } - }, - { - test: /\.svg(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, - loader: 'url-loader', - options: { - limit: 10000, // inline <= 10kb - mimetype: 'image/svg+xml' - } - }, - {test: /\.(ttf|eot)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: 'file-loader'} -]; - -/** - * tests whether the given phovea module name is matching the requested file and if so convert it to an external lookup - * depending on the loading type - */ -function testPhoveaModule(moduleName, request) { - if (!(new RegExp('^' + moduleName + '/src.*')).test(request)) { - return false; - } - const subModule = request.match(/.*\/src\/?(.*)/)[1]; - // skip empty modules = root - const path = subModule === '' ? [moduleName] : [moduleName, subModule]; - // phovea_ ... phovea.name - const rootPath = /phovea_.*/.test(moduleName) ? ['phovea', moduleName.slice(7)].concat(path.slice(1)) : path; - return { - root: rootPath, - commonjs2: path, - commonjs: path, - amd: request + (subModule === '' ? '/main' : '') - }; -} - -function testPhoveaModules(modules) { - return (context, request, callback) => { - for (let i = 0; i < modules.length; ++i) { - const r = testPhoveaModule(modules[i], request); - if (r) { - return callback(null, r); - } - } - callback(); - }; -} - -// use workspace registry file if available -const isWorkspaceContext = fs.existsSync(resolve(__dirname, '..', 'phovea_registry.js')); -const registryFile = isWorkspaceContext ? '../phovea_registry.js' : './phovea_registry.js'; -const actMetaData = `file-loader?name=phoveaMetaData.json!${buildInfo.metaDataTmpFile(pkg)}`; -const actBuildInfoFile = `file-loader?name=buildInfo.json!${buildInfo.tmpFile()}`; - -/** - * inject the registry to be included - * @param entry - * @returns {*} - */ -function injectRegistry(entry) { - const extraFiles = [registryFile, actBuildInfoFile, actMetaData]; - // build also the registry - if (typeof entry === 'string') { - return extraFiles.concat(entry); - } - const transformed = {}; - Object.keys(entry).forEach((eentry) => { - transformed[eentry] = extraFiles.concat(entry[eentry]); - }); - return transformed; -} - -/** - * generate a webpack configuration - */ -function generateWebpack(options) { - let base = { - entry: injectRegistry(options.entries), - output: { - path: resolve(__dirname, 'build'), - filename: (options.name || (pkg.name + (options.bundle ? '_bundle' : ''))) + (options.min && !options.nosuffix ? '.min' : '') + '.js', - chunkFilename: '[chunkhash].js', - publicPath: '' // no public path = relative - }, - resolve: { - // add `.ts` and `.tsx` as a resolvable extension. - extensions: ['.webpack.js', '.web.js', '.ts', '.tsx', '.js'], - alias: Object.assign({}, options.libs || {}), - symlinks: false, - // fallback to the directory above if they are siblings just in the workspace context - modules: isWorkspaceContext ? [ - resolve(__dirname, '../'), - 'node_modules' - ] : ['node_modules'] - }, - plugins: [ - // define magic constants that are replaced - new webpack.DefinePlugin({ - 'process.env.NODE_ENV': JSON.stringify(options.isProduction ? 'production' : 'development'), - __VERSION__: JSON.stringify(pkg.version), - __LICENSE__: JSON.stringify(pkg.license), - __BUILD_ID__: JSON.stringify(buildId), - __DEBUG__: options.isDev || options.isTest, - __TEST__: options.isTest, - __PRODUCTION__: options.isProduction, - __APP_CONTEXT__: JSON.stringify('/') - }) - // rest depends on type - ], - externals: [], - module: { - loaders: webpackloaders.slice() - }, - devServer: { - proxy: { - '/api/*': { - target: 'http://localhost:9000', - secure: false, - ws: true - }, - '/login': { - target: 'http://localhost:9000', - secure: false - }, - '/logout': { - target: 'http://localhost:9000', - secure: false - }, - '/loggedinas': { - target: 'http://localhost:9000', - secure: false - } - }, - contentBase: resolve(__dirname, 'build'), - watchOptions: { - aggregateTimeout: 500, - ignored: /node_modules/ - } - }, - watchOptions: { - aggregateTimeout: 500, - ignored: /node_modules/ - } - }; - - if (options.isProduction) { - base.plugins.unshift(new webpack.BannerPlugin({ - banner: banner, - raw: true - })); - base.plugins.push(new webpack.optimize.MinChunkSizePlugin({ - minChunkSize: 10000 // at least 10.000 characters - })); - // base.plugins.push(new webpack.optimize.ModuleConcatenationPlugin()); - } else if (options.isDev) { - // switch to def settings - base.module.loaders.find((d) => d.use === tsLoader).use = tsLoaderDev; - base.plugins.push(new ForkTsCheckerWebpackPlugin({checkSyntacticErrors: true, tsconfig: './tsconfig_dev.json'})); - } - - if (options.library) { - let libName = /phovea_.*/.test(pkg.name) ? ['phovea', pkg.name.slice(7)] : pkg.name; - // generate a library, i.e. output the last entry element - // create library name - if (options.moduleBundle) { - libName = 'phovea'; - } - base.output.library = libName; - base.output.libraryTarget = 'umd'; - base.output.umdNamedDefine = false; // anonymous require module - } - - if (!options.bundle) { - // if we don't bundle don't include external libraries and other phovea modules - base.externals.push(...(options.externals || Object.keys(options.libs || {}))); - - // ignore all phovea modules - if (options.modules) { - base.externals.push(testPhoveaModules(options.modules)); - } - - // ignore extra modules - (options.ignore || []).forEach(function (d) { - base.module.loaders.push({test: new RegExp(d), loader: 'null-loader'}); // use null loader - }); - // ingore phovea module registry calls - (options.modules || []).forEach(function (m) { - base.module.loaders.push({ - test: new RegExp('.*[\\\\/]' + m + '[\\\\/]phovea_registry.js'), - loader: 'null-loader' - }); // use null loader - }); - } - if (!options.bundle || options.isApp) { - // extract the included css file to own file - const p = new ExtractTextPlugin({ - filename: (options.isApp || options.moduleBundle ? 'style' : pkg.name) + (options.min && !options.nosuffix ? '.min' : '') + '.css', - allChunks: true // there seems to be a bug in dynamically loaded chunk styles are not loaded, workaround: extract all styles from all chunks - }); - base.plugins.push(p); - base.module.loaders[0] = { - test: /\.scss$/, - loader: p.extract(['css-loader', 'sass-loader']) - }; - base.module.loaders[1] = { - test: /\.css$/, - loader: p.extract(['css-loader']) - }; - } - if (options.isApp) { - // create manifest - // base.plugins.push(new webpack.optimize.AppCachePlugin()); - } - if (options.commons) { - // build a commons plugin - base.plugins.push(new webpack.optimize.CommonsChunkPlugin({ - // The order of this array matters - name: 'common', - filename: 'common.js', - minChunks: 2 - })); - } - if (options.vendor) { - (Array.isArray(options.vendor) ? options.vendor : [options.vendor]).forEach((reg) => { - base.plugins.push(new webpack.optimize.CommonsChunkPlugin({ - async: true, - children: true, - deepChildren: true, - minChunks: (module, count) => new RegExp(reg, 'i').test(module.resource) && count >= 2 - })); - }); - } - if (options.min) { - // use a minifier - base.plugins.push( - new webpack.LoaderOptionsPlugin({ - minimize: true, - debug: false - }), - new webpack.optimize.UglifyJsPlugin()); - } else { - // generate source maps - base.devtool = 'inline-source-map'; - } - return base; -} - -function generateWebpackConfig(env) { - const isTest = env === 'test'; - const isProduction = env === 'prod'; - const isDev = !isProduction && !isTest; - - const base = { - entries: entries, - libs: libraryAliases, - externals: libraryExternals, - modules: modules, - vendor: vendor, - ignore: ignores, - isProduction: isProduction, - isDev: isDev, - isTest: isTest - }; - - if (isTest) { - return generateWebpack(Object.assign({}, base, { - bundle: true - })); - } - - if (type.startsWith('app')) { - base.isApp = true; - base.bundle = true; // bundle everything together - base.name = '[name]'; // multiple entries case - base.commons = true; // extract commons module - } else if (type === 'bundle') { - base.library = true; // expose as library - base.moduleBundle = true; // expose as library 'phovea' - base.name = pkg.name; // to avoid adding _bundle - base.bundle = true; - } else { // type === 'lib' - base.library = true; - } - - // single generation - if (isDev) { - return generateWebpack(base); - } - if (type.startsWith('app')) { // isProduction app - return generateWebpack(Object.assign({}, base, { - min: true, - nosuffix: true - })); - } - // isProduction - return [ - // plain - generateWebpack(base), - // minified - generateWebpack(Object.assign({}, base, { - min: true - })) - ]; -} - -module.exports = generateWebpackConfig; -module.exports.generateWebpack = generateWebpack; From a3d436078556740fcb0ef820c6c16ba19d435df8 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 26 May 2020 09:40:06 +0200 Subject: [PATCH 38/67] update package.json --- package.json | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index f9121e4..7331d93 100644 --- a/package.json +++ b/package.json @@ -16,20 +16,21 @@ "type": "git", "url": "https://github.com/phovea/phovea_vis.git" }, - "main": "build/phovea_vis.js", + "main": "dist/index.js", + "types": "dist/index.d.ts", "files": [ "src", "index.js", "phovea.js", "phovea_registry.js", - "build" + "dist" ], "engines": { "npm": ">= 6.12", "node": ">= 12.13" }, "scripts": { - "clean": "rimraf build dist && npm run clean:compile", + "clean": "rimraf lib dist && npm run clean:compile", "clean:compile": "rimraf src/**/*.map src/**/*.js src/**/*.d.ts tests/**/*.js tests/**/*.map tests/**/*.d.ts demo/**/*.js demo/**/*.map demo/**/*.d.ts", "compile": "tsc", "lint": "tslint -c tslint.json -p . 'src/**/*.ts?(x)' 'tests/**/*.ts?(x)'", @@ -39,54 +40,39 @@ "test": "jest", "test:watch": "jest --watch", "posttest": "npm run lint", - "build:dev": "webpack", - "build": "webpack --env prod", - "start": "webpack-dev-server --inline", - "start:hot": "webpack-dev-server --inline --hot", - "watch": "webpack --watch", + "build": "npm run clean && npm run compile && npm run copy-assets && npm run copy-styles", + "copy-assets": "if [ -d src/assets ]; then cp -rv src/assets/ dist/assets/; fi", + "copy-styles": "cd src && find . -name '*.scss' -exec cp --parents '{}' ./../dist/ ';'", "release:major": "npm version major && npm publish && git push --follow-tags", "release:minor": "npm version minor && npm publish && git push --follow-tags", "release:patch": "npm version patch && npm publish && git push --follow-tags", "predist": "npm run build && npm run docs", - "dist": "mkdir dist && cd build && tar cvzf ../dist/phovea_vis.tar.gz *" + "dist": "mkdir lib && cd dist && tar cvzf ../lib/phovea_vis.tar.gz *" }, "dependencies": { "@types/d3": "~3.5.36", "d3": "~3.5.17", - "phovea_core": "github:phovea/phovea_core#develop", + "phovea_core": "github:phovea/phovea_core#asteiner/refactoring", "phovea_d3": "github:phovea/phovea_d3#vstoiber/refactoring" }, "devDependencies": { "@types/jest": "25.1.4", - "awesome-typescript-loader": "3.1.2", - "css-loader": "0.28.0", - "extract-loader": "0.1.0", - "extract-text-webpack-plugin": "2.1.0", "file-loader": "0.11.1", "html-loader": "0.4.5", "identity-obj-proxy": "^3.0.0", "imports-loader": "0.7.1", "jest": "25.1.0", - "json-loader": "0.5.4", "node-sass": "^4.13.1", "null-loader": "0.1.1", "raw-loader": "0.5.1", "rimraf": "^3.0.0", - "sass-loader": "6.0.7", - "style-loader": "0.16.1", "tslib": "~1.11.0", "tslint": "5.9.1", "ts-jest": "25.2.1", "typedoc": "~0.16.10", "typescript": "~3.8.2", "url-loader": "0.5.8", - "webpack": "2.3.3", - "webpack-dev-server": "2.4.2", - "cache-loader": "1.2.0", "ifdef-loader": "2.0.0", - "fork-ts-checker-webpack-plugin": "0.4.4", - "thread-loader": "1.1.2", - "ts-loader": "4.0.1", "jest-raw-loader": "1.0.1" } } From 0f079239094c1eaa6dd9dfce911d72dd8ef96f3a Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 26 May 2020 09:40:33 +0200 Subject: [PATCH 39/67] update tsconfig.json --- tsconfig.json | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 3a54054..5e27e6a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,29 +1,31 @@ { "compilerOptions": { - "module": "es6", - "target": "es5", + "module": "ES2020", + "target": "ES2019", "importHelpers": true, "sourceMap": true, + "declaration": true, "moduleResolution": "node", "jsx": "react", + "allowJs": true, + "declarationDir": "dist", + "outDir": "dist", "experimentalDecorators": true, - "downlevelIteration": true, // required as long as target is `es5` "lib": [ "dom", "es2015", "es2016.array.include", "es2017.object" ], - "baseUrl": "../", "noImplicitAny": false, "skipLibCheck": true, "esModuleInterop": false, - "allowSyntheticDefaultImports": true + "allowSyntheticDefaultImports": true // required for i18next }, "include": [ + "dist/index.d.ts", "src/**/*.ts", "src/**/*.tsx", - "tests/**/*.ts", "index.ts", "tsd.d.ts" ] From ac4d44286ee965fd34d73e12dcd0905d6c3b79d4 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 26 May 2020 09:41:05 +0200 Subject: [PATCH 40/67] remove System.import() --- phovea.js | 50 +++++++++++++++++++++++++------------------------- tsd.d.ts | 7 ------- 2 files changed, 25 insertions(+), 32 deletions(-) diff --git a/phovea.js b/phovea.js index 4427ede..dbe1759 100644 --- a/phovea.js +++ b/phovea.js @@ -6,12 +6,12 @@ //register all extensions in the registry following the given pattern module.exports = function(registry) { - //registry.push('extension-type', 'extension-id', function() { return System.import('./src/extension_impl'); }, {}); + //registry.push('extension-type', 'extension-id', function() { return import('./src/extension_impl'); }, {}); registry.push('vis', 'axis', function () { - return System.import('./src/axis'); + return import('./src/axis'); }, { name: 'Axis', - icon: function() { return System.import('./src/assets/axis_icon.svg'); }, + icon: function() { return import('./src/assets/axis_icon.svg'); }, scaling: 'height-only', filter: [ 'vector', @@ -39,10 +39,10 @@ module.exports = function(registry) { } }); registry.push('vis', 'barplot', function () { - return System.import('./src/list/barplot'); + return import('./src/list/barplot'); }, { name: 'Bar Plot', - icon: function() { return System.import('./src/assets/barplot_icon.png'); }, + icon: function() { return import('./src/assets/barplot_icon.png'); }, sizeDependsOnDataDimension: [ false, true @@ -54,7 +54,7 @@ module.exports = function(registry) { }); registry.push('vis', 'table', function () { - return System.import('./src/table'); + return import('./src/table'); }, { name: 'Table', filter: '(matrix|table|vector)', @@ -62,7 +62,7 @@ module.exports = function(registry) { }); registry.push('vis', 'list', function () { - return System.import('./src/list/list'); + return import('./src/list/list'); }, { name: 'List', filter: 'vector', @@ -72,7 +72,7 @@ module.exports = function(registry) { ] }); registry.push('vis', 'proportionalSymbol', function () { - return System.import('./src/list/proportionalSymbol'); + return import('./src/list/proportionalSymbol'); }, { name: 'Proportional Symbol', filter: [ @@ -84,21 +84,21 @@ module.exports = function(registry) { true ] }); - + registry.push('vis', 'phovea-vis-heatmap', function () { - return System.import('./src/heatmap'); + return import('./src/heatmap'); }, { name: 'HeatMap', - icon: function() { return System.import('./src/assets/heatmap_icon.svg'); }, + icon: function() { return import('./src/assets/heatmap_icon.svg'); }, sizeDependsOnDataDimension: true, filter: 'matrix' }); registry.push('vis', 'phovea-vis-heatmap1d', function () { - return System.import('./src/heatmap'); + return import('./src/heatmap'); }, { name: 'HeatMap 1D', - icon: function() { return System.import('./src/assets/heatmap_icon.svg'); }, + icon: function() { return import('./src/assets/heatmap_icon.svg'); }, sizeDependsOnDataDimension: [ false, true @@ -108,10 +108,10 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-kaplanmeier', function () { - return System.import('./src/kaplanmeier'); + return import('./src/kaplanmeier'); }, { name: 'Kaplanmeier Plot', - icon: function() { return System.import('./src/assets/kaplanmeier_icon.svg'); }, + icon: function() { return import('./src/assets/kaplanmeier_icon.svg'); }, sizeDependsOnDataDimension: [ false, false @@ -121,10 +121,10 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-histogram', function () { - return System.import('./src/distribution'); + return import('./src/distribution'); }, { name: 'Histogram', - icon: function() { return System.import('./src/assets/distribution_histogram_icon.png'); }, + icon: function() { return import('./src/assets/distribution_histogram_icon.png'); }, filter: [ '(vector|matrix|stratification)', '(categorical|real|int)' @@ -132,11 +132,11 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-mosaic', function () { - return System.import('./src/distribution'); + return import('./src/distribution'); }, { name: 'Mosaic', factory: 'createMosaic', - icon: function() { return System.import('./src/assets/distribution_mosaic_icon.png'); }, + icon: function() { return import('./src/assets/distribution_mosaic_icon.png'); }, sizeDependsOnDataDimension: [ false, true @@ -149,11 +149,11 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-pie', function () { - return System.import('./src/distribution'); + return import('./src/distribution'); }, { name: 'Pie', factory: 'createPie', - icon: function() { return System.import('./src/assets/distribution_pie_icon.png'); }, + icon: function() { return import('./src/assets/distribution_pie_icon.png'); }, scaling: 'aspect', filter: [ '(vector|stratification)', @@ -162,10 +162,10 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-box', function () { - return System.import('./src/box'); + return import('./src/box'); }, { name: 'BoxPlot', - icon: function() { return System.import('./src/assets/box_icon.png'); }, + icon: function() { return import('./src/assets/box_icon.png'); }, scaling: 'aspect', filter: [ 'vector', @@ -174,11 +174,11 @@ module.exports = function(registry) { }); registry.push('vis', 'force-directed-graph', function () { - return System.import('./src/force_directed_graph'); + return import('./src/force_directed_graph'); }, { name: 'Force Directed Graph', filter: 'graph', - icon: function() { return System.import('./src/assets/force_directed_graph.svg'); }, + icon: function() { return import('./src/assets/force_directed_graph.svg'); }, sizeDependsOnDataDimension: [ false, false diff --git a/tsd.d.ts b/tsd.d.ts index 8a28b34..146f562 100644 --- a/tsd.d.ts +++ b/tsd.d.ts @@ -38,10 +38,3 @@ declare module "raw-loader!*"; declare module "url-loader!*"; //allow html dependencies declare module "imports-loader!*"; - - -//define System.import as understood by webpack2 -interface ISystem { - import(module: string): Promise; -} -declare const System: ISystem; From 1b1f89c85cd59410ff4e558eecb29a8dae2b84e1 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 26 May 2020 09:41:28 +0200 Subject: [PATCH 41/67] add js handling in jest config --- jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index 65bbf39..a66b095 100644 --- a/jest.config.js +++ b/jest.config.js @@ -17,7 +17,7 @@ if(pluginsToTransform.length > 0) { */ module.exports = { transform: { - "^.+\\.tsx?$": "ts-jest", + "^.+\\.(js|ts|tsx)$": "ts-jest", "\\.xml$": "jest-raw-loader" }, testRegex: "(.*(test|spec))\\.(tsx?)$", From d551b45048d3a722d4bb697e17d360a9830cbd05 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 26 May 2020 09:42:04 +0200 Subject: [PATCH 42/67] add dist folder --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 69db746..780eed8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ /.tscache /.idea /build/ -/dist/ node_modules/ /src/**/*.js /tests/**/*.js From 8f5b5f61692cf78d289f3094074100cd382950b4 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 26 May 2020 09:49:28 +0200 Subject: [PATCH 43/67] import from module --- phovea_registry.js | 2 +- src/axis.ts | 10 +++++----- src/box.ts | 12 ++++++------ src/distribution/HistData.ts | 10 +++++----- src/distribution/Histogram.ts | 16 ++++++++-------- src/distribution/Mosaic.ts | 16 ++++++++-------- src/distribution/Pie.ts | 18 +++++++++--------- src/force_directed_graph.ts | 8 ++++---- src/heatmap/AHeatMapCanvasRenderer.ts | 8 ++++---- src/heatmap/DefaultUtils.ts | 2 +- src/heatmap/HeatMap.ts | 12 ++++++------ src/heatmap/HeatMap1D.ts | 12 ++++++------ src/heatmap/HeatMapDOMRenderer.ts | 6 +++--- src/heatmap/HeatMapImageRenderer.ts | 10 +++++----- src/heatmap/ICommonHeatMapOptions.ts | 2 +- src/heatmap/IScale.ts | 2 +- src/kaplanmeier.ts | 14 +++++++------- src/list/barplot.ts | 6 +++--- src/list/internal/AList.ts | 14 +++++++------- src/list/list.ts | 6 +++--- src/list/proportionalSymbol.ts | 6 +++--- src/table.ts | 16 ++++++++-------- tests/heatmap.test.ts | 2 +- tests/table.test.ts | 4 ++-- 24 files changed, 107 insertions(+), 107 deletions(-) diff --git a/phovea_registry.js b/phovea_registry.js index 064b0ce..5da1aa1 100644 --- a/phovea_registry.js +++ b/phovea_registry.js @@ -4,7 +4,7 @@ * Licensed under the new BSD license, available at http://caleydo.org/license **************************************************************************** */ -import {register} from 'phovea_core/src/plugin'; +import {register} from 'phovea_core'; /** * build a registry by registering all phovea modules diff --git a/src/axis.ts b/src/axis.ts index 640ac71..bd131c0 100644 --- a/src/axis.ts +++ b/src/axis.ts @@ -4,11 +4,11 @@ import './style.scss'; import * as d3 from 'd3'; -import {mixin} from 'phovea_core/src'; -import {AVisInstance, IVisInstance, assignVis, ITransform, IVisInstanceOptions} from 'phovea_core/src/vis'; -import {D3Utils} from 'phovea_d3/src/d3util'; -import {INumericalVector} from 'phovea_core/src/vector'; -import {Range} from 'phovea_core/src/range'; +import {mixin} from 'phovea_core'; +import {AVisInstance, IVisInstance, assignVis, ITransform, IVisInstanceOptions} from 'phovea_core'; +import {D3Utils} from 'phovea_d3'; +import {INumericalVector} from 'phovea_core'; +import {Range} from 'phovea_core'; export interface IAxisOptions extends IVisInstanceOptions { /** diff --git a/src/box.ts b/src/box.ts index a449355..fd0a893 100644 --- a/src/box.ts +++ b/src/box.ts @@ -4,12 +4,12 @@ import './style.scss'; import * as d3 from 'd3'; -import {Range} from 'phovea_core/src/range'; -import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea_core/src/vis'; -import {rect} from 'phovea_core/src/geom'; -import {mixin} from 'phovea_core/src'; -import {INumericalVector} from 'phovea_core/src/vector'; -import {ToolTip} from 'phovea_d3/src/ToolTip'; +import {Range} from 'phovea_core'; +import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea_core'; +import {rect} from 'phovea_core'; +import {mixin} from 'phovea_core'; +import {INumericalVector} from 'phovea_core'; +import {ToolTip} from 'phovea_d3'; export declare type IBoxPlotOptions = IVisInstanceOptions; diff --git a/src/distribution/HistData.ts b/src/distribution/HistData.ts index 9515023..56004ad 100644 --- a/src/distribution/HistData.ts +++ b/src/distribution/HistData.ts @@ -3,14 +3,14 @@ */ import * as d3 from 'd3'; -import {Range} from 'phovea_core/src/range'; -import {IVisInstanceOptions} from 'phovea_core/src/vis'; +import {Range} from 'phovea_core'; +import {IVisInstanceOptions} from 'phovea_core'; import { VALUE_TYPE_CATEGORICAL, IHistAbleDataType, INumberValueTypeDesc, ICategoricalValueTypeDesc -} from 'phovea_core/src/datatype'; -import {IStratification} from 'phovea_core/src/stratification'; -import {ICatHistogram, IHistogram} from 'phovea_core/src/math'; +} from 'phovea_core'; +import {IStratification} from 'phovea_core'; +import {ICatHistogram, IHistogram} from 'phovea_core'; export interface IHistData { diff --git a/src/distribution/Histogram.ts b/src/distribution/Histogram.ts index c26c1bd..4d8bd7d 100644 --- a/src/distribution/Histogram.ts +++ b/src/distribution/Histogram.ts @@ -4,14 +4,14 @@ import '../style.scss'; import * as d3 from 'd3'; -import {onDOMNodeRemoved, mixin} from 'phovea_core/src'; -import {Range} from 'phovea_core/src/range'; -import {AVisInstance, IVisInstance, assignVis, ITransform} from 'phovea_core/src/vis'; -import {IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc} from 'phovea_core/src/datatype'; -import {IStratification} from 'phovea_core/src/stratification'; -import {IHistogram} from 'phovea_core/src/math'; -import {toSelectOperation} from 'phovea_core/src/idtype'; -import {ToolTip} from 'phovea_d3/src/ToolTip'; +import {onDOMNodeRemoved, mixin} from 'phovea_core'; +import {Range} from 'phovea_core'; +import {AVisInstance, IVisInstance, assignVis, ITransform} from 'phovea_core'; +import {IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc} from 'phovea_core'; +import {IStratification} from 'phovea_core'; +import {IHistogram} from 'phovea_core'; +import {toSelectOperation} from 'phovea_core'; +import {ToolTip} from 'phovea_d3'; import {HistUtils, IDistributionOptions, IHistData, ITotalHeight} from './HistData'; export interface IHistogramOptions extends IDistributionOptions { diff --git a/src/distribution/Mosaic.ts b/src/distribution/Mosaic.ts index 75eb1ac..dd565f8 100644 --- a/src/distribution/Mosaic.ts +++ b/src/distribution/Mosaic.ts @@ -4,14 +4,14 @@ import '../style.scss'; import * as d3 from 'd3'; -import {onDOMNodeRemoved, mixin} from 'phovea_core/src'; -import {Range} from 'phovea_core/src/range'; -import {AVisInstance, IVisInstance, assignVis, ITransform} from 'phovea_core/src/vis'; -import {IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc} from 'phovea_core/src/datatype'; -import {IStratification} from 'phovea_core/src/stratification'; -import {IHistogram} from 'phovea_core/src/math'; -import {toSelectOperation} from 'phovea_core/src/idtype'; -import {ToolTip} from 'phovea_d3/src/ToolTip'; +import {onDOMNodeRemoved, mixin} from 'phovea_core'; +import {Range} from 'phovea_core'; +import {AVisInstance, IVisInstance, assignVis, ITransform} from 'phovea_core'; +import {IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc} from 'phovea_core'; +import {IStratification} from 'phovea_core'; +import {IHistogram} from 'phovea_core'; +import {toSelectOperation} from 'phovea_core'; +import {ToolTip} from 'phovea_d3'; import {HistUtils, IDistributionOptions, IHistData} from './HistData'; diff --git a/src/distribution/Pie.ts b/src/distribution/Pie.ts index 3f8c893..ad6e80a 100644 --- a/src/distribution/Pie.ts +++ b/src/distribution/Pie.ts @@ -5,15 +5,15 @@ import '../style.scss'; import * as d3 from 'd3'; -import {onDOMNodeRemoved, mixin} from 'phovea_core/src'; -import {Range} from 'phovea_core/src/range'; -import {AVisInstance, IVisInstance, assignVis, ITransform} from 'phovea_core/src/vis'; -import {IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc} from 'phovea_core/src/datatype'; -import {IStratification} from 'phovea_core/src/stratification'; -import {ICatHistogram} from 'phovea_core/src/math'; -import {toSelectOperation} from 'phovea_core/src/idtype'; -import {vec2, polygon} from 'phovea_core/src/geom'; -import {ToolTip} from 'phovea_d3/src/ToolTip'; +import {onDOMNodeRemoved, mixin} from 'phovea_core'; +import {Range} from 'phovea_core'; +import {AVisInstance, IVisInstance, assignVis, ITransform} from 'phovea_core'; +import {IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc} from 'phovea_core'; +import {IStratification} from 'phovea_core'; +import {ICatHistogram} from 'phovea_core'; +import {toSelectOperation} from 'phovea_core'; +import {vec2, polygon} from 'phovea_core'; +import {ToolTip} from 'phovea_d3'; import {IDistributionOptions, ITotalHeight, HistUtils} from './HistData'; interface IRadialHistData { diff --git a/src/force_directed_graph.ts b/src/force_directed_graph.ts index 0be6565..7fd897f 100644 --- a/src/force_directed_graph.ts +++ b/src/force_directed_graph.ts @@ -5,10 +5,10 @@ import './style.scss'; import * as d3 from 'd3'; -import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea_core/src/vis'; -import {mixin} from 'phovea_core/src'; -import GraphProxy from 'phovea_core/src/graph/GraphProxy'; -import { GraphNode } from 'phovea_core/src/graph/graph'; +import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea_core'; +import {mixin} from 'phovea_core'; +import GraphProxy from 'phovea_core'; +import { GraphNode } from 'phovea_core'; export interface IForceDirectedGraphOptions extends IVisInstanceOptions { /** diff --git a/src/heatmap/AHeatMapCanvasRenderer.ts b/src/heatmap/AHeatMapCanvasRenderer.ts index ace90a1..afcc845 100644 --- a/src/heatmap/AHeatMapCanvasRenderer.ts +++ b/src/heatmap/AHeatMapCanvasRenderer.ts @@ -4,10 +4,10 @@ import * as d3 from 'd3'; -import {Range, cell} from 'phovea_core/src/range'; -import {onDOMNodeRemoved} from 'phovea_core/src'; -import {IMatrix} from 'phovea_core/src/matrix'; -import {toSelectOperation, defaultSelectionType} from 'phovea_core/src/idtype'; +import {Range, cell} from 'phovea_core'; +import {onDOMNodeRemoved} from 'phovea_core'; +import {IMatrix} from 'phovea_core'; +import {toSelectOperation, defaultSelectionType} from 'phovea_core'; import {ESelectOption} from './IHeatMapRenderer'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; diff --git a/src/heatmap/DefaultUtils.ts b/src/heatmap/DefaultUtils.ts index fb93c8b..74605d3 100644 --- a/src/heatmap/DefaultUtils.ts +++ b/src/heatmap/DefaultUtils.ts @@ -5,7 +5,7 @@ import { VALUE_TYPE_CATEGORICAL, INumberValueTypeDesc, ICategoricalValueTypeDesc, ICategory -} from 'phovea_core/src/datatype'; +} from 'phovea_core'; export class DefaultUtils { diff --git a/src/heatmap/HeatMap.ts b/src/heatmap/HeatMap.ts index 134c9c1..93cc9e3 100644 --- a/src/heatmap/HeatMap.ts +++ b/src/heatmap/HeatMap.ts @@ -5,12 +5,12 @@ import '../style.scss'; import * as d3 from 'd3'; -import Range from 'phovea_core/src/range/Range'; -import {AVisInstance, IVisInstance, assignVis} from 'phovea_core/src/vis'; -import {rect} from 'phovea_core/src/geom'; -import {mixin, onDOMNodeRemoved} from 'phovea_core/src'; -import {toSelectOperation} from 'phovea_core/src/idtype'; -import {INumericalMatrix, ICategoricalMatrix, DIM_ROW, DIM_COL} from 'phovea_core/src/matrix/IMatrix'; +import Range from 'phovea_core'; +import {AVisInstance, IVisInstance, assignVis} from 'phovea_core'; +import {rect} from 'phovea_core'; +import {mixin, onDOMNodeRemoved} from 'phovea_core'; +import {toSelectOperation} from 'phovea_core'; +import {INumericalMatrix, ICategoricalMatrix, DIM_ROW, DIM_COL} from 'phovea_core'; import {DefaultUtils} from './DefaultUtils'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; import {toScale, IScale} from './IScale'; diff --git a/src/heatmap/HeatMap1D.ts b/src/heatmap/HeatMap1D.ts index bf1209c..b351980 100644 --- a/src/heatmap/HeatMap1D.ts +++ b/src/heatmap/HeatMap1D.ts @@ -4,12 +4,12 @@ import '../style.scss'; import * as d3 from 'd3'; -import {Range} from 'phovea_core/src/range'; -import {AVisInstance, IVisInstance, assignVis} from 'phovea_core/src/vis'; -import {rect} from 'phovea_core/src/geom'; -import {mixin} from 'phovea_core/src'; -import {D3Utils} from 'phovea_d3/src/d3util'; -import {INumericalVector, ICategoricalVector} from 'phovea_core/src/vector'; +import {Range} from 'phovea_core'; +import {AVisInstance, IVisInstance, assignVis} from 'phovea_core'; +import {rect} from 'phovea_core'; +import {mixin} from 'phovea_core'; +import {D3Utils} from 'phovea_d3'; +import {INumericalVector, ICategoricalVector} from 'phovea_core'; import {DefaultUtils} from './DefaultUtils'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; import {toScale, IScale} from './IScale'; diff --git a/src/heatmap/HeatMapDOMRenderer.ts b/src/heatmap/HeatMapDOMRenderer.ts index efe559e..f0a51e8 100644 --- a/src/heatmap/HeatMapDOMRenderer.ts +++ b/src/heatmap/HeatMapDOMRenderer.ts @@ -4,9 +4,9 @@ import * as d3 from 'd3'; -import {Range, cell} from 'phovea_core/src/range'; -import {onDOMNodeRemoved} from 'phovea_core/src'; -import {toSelectOperation, defaultSelectionType} from 'phovea_core/src/idtype'; +import {Range, cell} from 'phovea_core'; +import {onDOMNodeRemoved} from 'phovea_core'; +import {toSelectOperation, defaultSelectionType} from 'phovea_core'; import {DefaultUtils} from './DefaultUtils'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; import {IScale} from './IScale'; diff --git a/src/heatmap/HeatMapImageRenderer.ts b/src/heatmap/HeatMapImageRenderer.ts index dde02b6..30fd8c2 100644 --- a/src/heatmap/HeatMapImageRenderer.ts +++ b/src/heatmap/HeatMapImageRenderer.ts @@ -4,16 +4,16 @@ import * as d3 from 'd3'; -import {all} from 'phovea_core/src/range'; -import {IHeatMapUrlOptions} from 'phovea_core/src/matrix'; +import {all} from 'phovea_core'; +import {IHeatMapUrlOptions} from 'phovea_core'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; import {IScale} from './IScale'; import {IHeatMapRenderer, ESelectOption} from './IHeatMapRenderer'; import {AHeatMapCanvasRenderer} from './AHeatMapCanvasRenderer'; import {IHeatMapAbleMatrix} from './HeatMap'; -import {sendAPI, encodeParams, MAX_URL_LENGTH} from 'phovea_core/src/ajax'; -import parseRange from 'phovea_core/src/range/parser'; -import {prepareHeatmapUrlParameter} from 'phovea_core/src/matrix/loader'; +import {sendAPI, encodeParams, MAX_URL_LENGTH} from 'phovea_core'; +import parseRange from 'phovea_core'; +import {prepareHeatmapUrlParameter} from 'phovea_core'; export class HeatMapImageRenderer extends AHeatMapCanvasRenderer implements IHeatMapRenderer { private image: HTMLImageElement; diff --git a/src/heatmap/ICommonHeatMapOptions.ts b/src/heatmap/ICommonHeatMapOptions.ts index ab9cab9..2494c8c 100644 --- a/src/heatmap/ICommonHeatMapOptions.ts +++ b/src/heatmap/ICommonHeatMapOptions.ts @@ -1,4 +1,4 @@ -import {IVisInstanceOptions} from 'phovea_core/src/vis'; +import {IVisInstanceOptions} from 'phovea_core'; export interface ICommonHeatMapOptions extends IVisInstanceOptions { /** diff --git a/src/heatmap/IScale.ts b/src/heatmap/IScale.ts index 75913ad..96f5d87 100644 --- a/src/heatmap/IScale.ts +++ b/src/heatmap/IScale.ts @@ -1,5 +1,5 @@ import * as d3 from 'd3'; -import {VALUE_TYPE_CATEGORICAL} from 'phovea_core/src/datatype'; +import {VALUE_TYPE_CATEGORICAL} from 'phovea_core'; export interface IScale { (x: any): any; diff --git a/src/kaplanmeier.ts b/src/kaplanmeier.ts index 92e0e85..ecbeaab 100644 --- a/src/kaplanmeier.ts +++ b/src/kaplanmeier.ts @@ -5,13 +5,13 @@ import './style.scss'; import * as d3 from 'd3'; -import {Range} from 'phovea_core/src/range'; -import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea_core/src/vis'; -import {mixin} from 'phovea_core/src'; -import {INumericalVector} from 'phovea_core/src/vector'; -import {} from 'phovea_core/src/vis'; -import {} from 'phovea_core/src/range'; -import {} from 'phovea_core/src'; +import {Range} from 'phovea_core'; +import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea_core'; +import {mixin} from 'phovea_core'; +import {INumericalVector} from 'phovea_core'; +import {} from 'phovea_core'; +import {} from 'phovea_core'; +import {} from 'phovea_core'; export interface IKaplanMaierOptions extends IVisInstanceOptions { /** diff --git a/src/list/barplot.ts b/src/list/barplot.ts index 15e35be..a1ed9bd 100644 --- a/src/list/barplot.ts +++ b/src/list/barplot.ts @@ -4,10 +4,10 @@ import '../style.scss'; import {scale} from 'd3'; -import {mixin} from 'phovea_core/src'; -import {INumericalVector} from 'phovea_core/src/vector'; +import {mixin} from 'phovea_core'; +import {INumericalVector} from 'phovea_core'; import {AList, IAListOptions} from './internal/AList'; -import {INumberValueTypeDesc} from 'phovea_core/src/datatype'; +import {INumberValueTypeDesc} from 'phovea_core'; export interface IBarPlotOptions extends IAListOptions { min?: number; diff --git a/src/list/internal/AList.ts b/src/list/internal/AList.ts index 716f03f..e73b348 100644 --- a/src/list/internal/AList.ts +++ b/src/list/internal/AList.ts @@ -4,13 +4,13 @@ import '../../style.scss'; import {select, extent, selection} from 'd3'; -import {mixin} from 'phovea_core/src'; -import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea_core/src/vis'; -import {D3Utils} from 'phovea_d3/src/d3util'; -import {IVector} from 'phovea_core/src/vector'; -import {rect} from 'phovea_core/src/geom'; -import Range from 'phovea_core/src/range/Range'; -import {IValueTypeDesc} from 'phovea_core/src/datatype'; +import {mixin} from 'phovea_core'; +import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea_core'; +import {D3Utils} from 'phovea_d3'; +import {IVector} from 'phovea_core'; +import {rect} from 'phovea_core'; +import Range from 'phovea_core'; +import {IValueTypeDesc} from 'phovea_core'; export interface IAListOptions extends IVisInstanceOptions { width?: number; diff --git a/src/list/list.ts b/src/list/list.ts index 52885ed..f29f0f0 100644 --- a/src/list/list.ts +++ b/src/list/list.ts @@ -4,10 +4,10 @@ import '../style.scss'; import {format} from 'd3'; -import {mixin} from 'phovea_core/src'; -import {IAnyVector} from 'phovea_core/src/vector'; +import {mixin} from 'phovea_core'; +import {IAnyVector} from 'phovea_core'; import {AList, IAListOptions} from './internal/AList'; -import {IValueTypeDesc} from 'phovea_core/src/datatype'; +import {IValueTypeDesc} from 'phovea_core'; export interface IListOptions extends IAListOptions { format?: string; diff --git a/src/list/proportionalSymbol.ts b/src/list/proportionalSymbol.ts index 1fad14c..0145619 100644 --- a/src/list/proportionalSymbol.ts +++ b/src/list/proportionalSymbol.ts @@ -4,10 +4,10 @@ import '../style.scss'; import {scale} from 'd3'; -import {mixin} from 'phovea_core/src'; -import {INumericalVector} from 'phovea_core/src/vector'; +import {mixin} from 'phovea_core'; +import {INumericalVector} from 'phovea_core'; import {AList, IAListOptions} from './internal/AList'; -import {INumberValueTypeDesc} from 'phovea_core/src/datatype'; +import {INumberValueTypeDesc} from 'phovea_core'; export interface IProportionalSymbolOptions extends IAListOptions { min?: number; diff --git a/src/table.ts b/src/table.ts index a82c332..a3c2b18 100644 --- a/src/table.ts +++ b/src/table.ts @@ -4,14 +4,14 @@ import './style.scss'; import * as d3 from 'd3'; -import {Range} from 'phovea_core/src/range'; -import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea_core/src/vis'; -import {rect} from 'phovea_core/src/geom'; -import {IAnyMatrix} from 'phovea_core/src/matrix'; -import {ITable} from 'phovea_core/src/table'; -import {IAnyVector} from 'phovea_core/src/vector'; -import {D3Utils} from 'phovea_d3/src/d3util'; -import {mixin} from 'phovea_core/src'; +import {Range} from 'phovea_core'; +import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea_core'; +import {rect} from 'phovea_core'; +import {IAnyMatrix} from 'phovea_core'; +import {ITable} from 'phovea_core'; +import {IAnyVector} from 'phovea_core'; +import {D3Utils} from 'phovea_d3'; +import {mixin} from 'phovea_core'; export declare type ITableOptions = IVisInstanceOptions; diff --git a/tests/heatmap.test.ts b/tests/heatmap.test.ts index 6ed657b..01c33a2 100644 --- a/tests/heatmap.test.ts +++ b/tests/heatmap.test.ts @@ -1,7 +1,7 @@ /// import {DefaultUtils} from '../src/heatmap/DefaultUtils'; import {toScale} from '../src/heatmap/IScale'; -import {INumberValueTypeDesc} from 'phovea_core/src/datatype'; +import {INumberValueTypeDesc} from 'phovea_core'; describe('toScale', () => { it('handles negative and positive', () => { diff --git a/tests/table.test.ts b/tests/table.test.ts index 8ee39ac..2f9d948 100644 --- a/tests/table.test.ts +++ b/tests/table.test.ts @@ -1,7 +1,7 @@ /// import {Table} from '../src/table'; -import {asMatrix as parseMatrix} from 'phovea_core/src/matrix'; -import {parse} from 'phovea_core/src/range'; +import {asMatrix as parseMatrix} from 'phovea_core'; +import {parse} from 'phovea_core'; describe('table', () => { let squareTable; From ef082f9e42fb15106805d5748e39c1a441b6d02b Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 26 May 2020 10:23:16 +0200 Subject: [PATCH 44/67] fix phovea_core import statements --- src/axis.ts | 4 ++-- src/box.ts | 14 +++++++------- src/distribution/HistData.ts | 4 ++-- src/distribution/Histogram.ts | 14 +++++++------- src/distribution/Mosaic.ts | 14 +++++++------- src/distribution/Pie.ts | 26 +++++++++++++------------- src/force_directed_graph.ts | 10 +++++----- src/heatmap/AHeatMapCanvasRenderer.ts | 12 ++++++------ src/heatmap/DefaultUtils.ts | 6 +++--- src/heatmap/HeatMap.ts | 22 +++++++++++----------- src/heatmap/HeatMap1D.ts | 12 ++++++------ src/heatmap/HeatMapDOMRenderer.ts | 12 ++++++------ src/heatmap/HeatMapImageRenderer.ts | 20 ++++++++++---------- src/heatmap/IScale.ts | 4 ++-- src/kaplanmeier.ts | 8 ++++---- src/list/barplot.ts | 4 ++-- src/list/internal/AList.ts | 14 +++++++------- src/list/list.ts | 4 ++-- src/list/proportionalSymbol.ts | 4 ++-- src/table.ts | 14 +++++++------- tests/table.test.ts | 10 +++++----- 21 files changed, 116 insertions(+), 116 deletions(-) diff --git a/src/axis.ts b/src/axis.ts index bd131c0..5b157d1 100644 --- a/src/axis.ts +++ b/src/axis.ts @@ -4,7 +4,7 @@ import './style.scss'; import * as d3 from 'd3'; -import {mixin} from 'phovea_core'; +import {BaseUtils} from 'phovea_core'; import {AVisInstance, IVisInstance, assignVis, ITransform, IVisInstanceOptions} from 'phovea_core'; import {D3Utils} from 'phovea_d3'; import {INumericalVector} from 'phovea_core'; @@ -50,7 +50,7 @@ export class Axis extends AVisInstance implements IVisInstance { constructor(public readonly data: INumericalVector, parent: HTMLElement, options: IAxisOptions = {}) { super(); - mixin(this.options, options); + BaseUtils.mixin(this.options, options); this.$node = this.build(d3.select(parent)); this.$node.datum(this); diff --git a/src/box.ts b/src/box.ts index fd0a893..319bbd0 100644 --- a/src/box.ts +++ b/src/box.ts @@ -5,9 +5,9 @@ import './style.scss'; import * as d3 from 'd3'; import {Range} from 'phovea_core'; -import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea_core'; -import {rect} from 'phovea_core'; -import {mixin} from 'phovea_core'; +import {AVisInstance, IVisInstance, VisUtils, IVisInstanceOptions} from 'phovea_core'; +import {Rect} from 'phovea_core'; +import {BaseUtils} from 'phovea_core'; import {INumericalVector} from 'phovea_core'; import {ToolTip} from 'phovea_d3'; @@ -37,11 +37,11 @@ export class BoxPlot extends AVisInstance implements IVisInstance { constructor(public data: INumericalVector, parent: Element, options: IBoxPlotOptions = {}) { super(); - mixin(this.options, options); + BaseUtils.mixin(this.options, options); this.$node = this.build(d3.select(parent)); this.$node.datum(this); - assignVis(this.node, this); + VisUtils.assignVis(this.node, this); } get rawSize(): [number, number] { @@ -97,11 +97,11 @@ export class BoxPlot extends AVisInstance implements IVisInstance { const that = this; if (range.isAll || range.isNone) { const r = this.scale.range(); - return Promise.resolve(rect(r[0], 0, r[1] - r[0], 50)); + return Promise.resolve(Rect.rect(r[0], 0, r[1] - r[0], 50)); } return this.data.data(range).then(function (data) { const ex = d3.extent(data, that.scale); - return rect(ex[0], 0, ex[1] - ex[0], 50); + return Rect.rect(ex[0], 0, ex[1] - ex[0], 50); }); } diff --git a/src/distribution/HistData.ts b/src/distribution/HistData.ts index 56004ad..6bbd603 100644 --- a/src/distribution/HistData.ts +++ b/src/distribution/HistData.ts @@ -6,7 +6,7 @@ import * as d3 from 'd3'; import {Range} from 'phovea_core'; import {IVisInstanceOptions} from 'phovea_core'; import { - VALUE_TYPE_CATEGORICAL, + ValueTypeUtils, IHistAbleDataType, INumberValueTypeDesc, ICategoricalValueTypeDesc } from 'phovea_core'; import {IStratification} from 'phovea_core'; @@ -72,7 +72,7 @@ export class HistUtils { return HistUtils.createCategoricalHistData(hist); } const d = (>data).valuetype; - if (d.type === VALUE_TYPE_CATEGORICAL) { + if (d.type === ValueTypeUtils.VALUE_TYPE_CATEGORICAL) { return HistUtils.createCategoricalHistData(hist); } return HistUtils.createNumericalHistData(hist, (d).range); diff --git a/src/distribution/Histogram.ts b/src/distribution/Histogram.ts index 4d8bd7d..c7e399c 100644 --- a/src/distribution/Histogram.ts +++ b/src/distribution/Histogram.ts @@ -4,13 +4,13 @@ import '../style.scss'; import * as d3 from 'd3'; -import {onDOMNodeRemoved, mixin} from 'phovea_core'; +import {AppContext, BaseUtils} from 'phovea_core'; import {Range} from 'phovea_core'; -import {AVisInstance, IVisInstance, assignVis, ITransform} from 'phovea_core'; +import {AVisInstance, IVisInstance, VisUtils, ITransform} from 'phovea_core'; import {IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc} from 'phovea_core'; import {IStratification} from 'phovea_core'; import {IHistogram} from 'phovea_core'; -import {toSelectOperation} from 'phovea_core'; +import {SelectionUtils} from 'phovea_core'; import {ToolTip} from 'phovea_d3'; import {HistUtils, IDistributionOptions, IHistData, ITotalHeight} from './HistData'; @@ -57,13 +57,13 @@ export class Histogram extends AVisInstance implements IVisInstance { constructor(public readonly data: IHistAbleDataType|IStratification, parent: Element, options: IHistogramOptions = {}) { super(); - mixin(this.options, { + BaseUtils.mixin(this.options, { nbins: Math.floor(Math.sqrt(data.length)), }, options); this.$node = this.build(d3.select(parent)); this.$node.datum(this); - assignVis(this.node, this); + VisUtils.assignVis(this.node, this); } get rawSize(): [number, number] { @@ -116,11 +116,11 @@ export class Histogram extends AVisInstance implements IVisInstance { $m.exit().remove(); }; data.on('select', l); - onDOMNodeRemoved($data.node(), function () { + AppContext.getInstance().onDOMNodeRemoved($data.node(), function () { data.off('select', l); }); - const onClick = (d) => data.select(0, d.range, toSelectOperation(d3.event)); + const onClick = (d) => data.select(0, d.range, SelectionUtils.toSelectOperation(d3.event)); this.data.hist(Math.floor(o.nbins)).then((hist) => { this.hist = hist; diff --git a/src/distribution/Mosaic.ts b/src/distribution/Mosaic.ts index dd565f8..18bb367 100644 --- a/src/distribution/Mosaic.ts +++ b/src/distribution/Mosaic.ts @@ -4,13 +4,13 @@ import '../style.scss'; import * as d3 from 'd3'; -import {onDOMNodeRemoved, mixin} from 'phovea_core'; +import {AppContext, BaseUtils} from 'phovea_core'; import {Range} from 'phovea_core'; -import {AVisInstance, IVisInstance, assignVis, ITransform} from 'phovea_core'; +import {AVisInstance, IVisInstance, VisUtils, ITransform} from 'phovea_core'; import {IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc} from 'phovea_core'; import {IStratification} from 'phovea_core'; import {IHistogram} from 'phovea_core'; -import {toSelectOperation} from 'phovea_core'; +import {SelectionUtils} from 'phovea_core'; import {ToolTip} from 'phovea_d3'; import {HistUtils, IDistributionOptions, IHistData} from './HistData'; @@ -57,7 +57,7 @@ export class Mosaic extends AVisInstance implements IVisInstance { constructor(public readonly data: IHistAbleDataType|IStratification, parent: Element, options: IMosaicOptions = {}) { super(); - mixin(this.options, { + BaseUtils.mixin(this.options, { scale: [1, this.options.initialScale] }, options); @@ -67,7 +67,7 @@ export class Mosaic extends AVisInstance implements IVisInstance { this.$node = this.build(d3.select(parent)); this.$node.datum(this); - assignVis(this.node, this); + VisUtils.assignVis(this.node, this); } get rawSize(): [number, number] { @@ -115,11 +115,11 @@ export class Mosaic extends AVisInstance implements IVisInstance { }; if (o.selectAble) { data.on('select', l); - onDOMNodeRemoved($data.node(), () => data.off('select', l)); + AppContext.getInstance().onDOMNodeRemoved($data.node(), () => data.off('select', l)); } const onClick = o.selectAble ? (d) => { - data.select(0, d.range, toSelectOperation(d3.event)); + data.select(0, d.range, SelectionUtils.toSelectOperation(d3.event)); } : null; this.data.hist().then((hist) => { diff --git a/src/distribution/Pie.ts b/src/distribution/Pie.ts index ad6e80a..9295f6e 100644 --- a/src/distribution/Pie.ts +++ b/src/distribution/Pie.ts @@ -5,14 +5,14 @@ import '../style.scss'; import * as d3 from 'd3'; -import {onDOMNodeRemoved, mixin} from 'phovea_core'; +import {AppContext, BaseUtils} from 'phovea_core'; import {Range} from 'phovea_core'; -import {AVisInstance, IVisInstance, assignVis, ITransform} from 'phovea_core'; +import {AVisInstance, IVisInstance, VisUtils, ITransform} from 'phovea_core'; import {IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc} from 'phovea_core'; import {IStratification} from 'phovea_core'; import {ICatHistogram} from 'phovea_core'; -import {toSelectOperation} from 'phovea_core'; -import {vec2, polygon} from 'phovea_core'; +import {SelectionUtils} from 'phovea_core'; +import {Vector2D, Polygon} from 'phovea_core'; import {ToolTip} from 'phovea_d3'; import {IDistributionOptions, ITotalHeight, HistUtils} from './HistData'; @@ -73,11 +73,11 @@ export class Pie extends AVisInstance implements IVisInstance { constructor(public readonly data: IHistAbleDataType|IStratification, parent: Element, options: IPieOptions = {}) { super(); - mixin(this.options, options); + BaseUtils.mixin(this.options, options); this.$node = this.build(d3.select(parent)); this.$node.datum(this); - assignVis(this.node, this); + VisUtils.assignVis(this.node, this); } get rawSize(): [number, number] { @@ -125,7 +125,7 @@ export class Pie extends AVisInstance implements IVisInstance { $m.attr('d', arc); }; data.on('select', l); - onDOMNodeRemoved($data.node(), function () { + AppContext.getInstance().onDOMNodeRemoved($data.node(), function () { data.off('select', l); }); @@ -155,7 +155,7 @@ export class Pie extends AVisInstance implements IVisInstance { $m.enter() .append('path') .call(ToolTip.bind((d) => d.name + ' ' + (d.size) + ' entries (' + Math.round(d.ratio * 100) + '%)')) - .on('click', (d) => data.select(0, d.range, toSelectOperation(d3.event))); + .on('click', (d) => data.select(0, d.range, SelectionUtils.toSelectOperation(d3.event))); $m.attr('d', arc) .attr('fill', (d) => d.color) .style('opacity', 0); @@ -211,15 +211,15 @@ export class Pie extends AVisInstance implements IVisInstance { static toPolygon(start: number, end: number, radius: number) { const r = [ - vec2(radius, radius), - vec2(radius + Math.cos(start) * radius, radius + Math.sin(start) * radius), - vec2(radius + Math.cos(end) * radius, radius + Math.sin(end) * radius) + Vector2D.vec2(radius, radius), + Vector2D.vec2(radius + Math.cos(start) * radius, radius + Math.sin(start) * radius), + Vector2D.vec2(radius + Math.cos(end) * radius, radius + Math.sin(end) * radius) ]; //approximate by triangle if (end - start > Math.PI) { //more than 180 degree use one more point - r.splice(2, 0, vec2(radius + Math.cos((end - start) * 0.5) * radius, radius + Math.sin((end - start) * 0.5) * radius)); + r.splice(2, 0, Vector2D.vec2(radius + Math.cos((end - start) * 0.5) * radius, radius + Math.sin((end - start) * 0.5) * radius)); } - return polygon(r); + return Polygon.polygon(r); } //updatedOption (name, value) { diff --git a/src/force_directed_graph.ts b/src/force_directed_graph.ts index 7fd897f..b4c7c75 100644 --- a/src/force_directed_graph.ts +++ b/src/force_directed_graph.ts @@ -5,9 +5,9 @@ import './style.scss'; import * as d3 from 'd3'; -import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea_core'; -import {mixin} from 'phovea_core'; -import GraphProxy from 'phovea_core'; +import {AVisInstance, IVisInstance, VisUtils, IVisInstanceOptions} from 'phovea_core'; +import {BaseUtils} from 'phovea_core'; +import {GraphProxy} from 'phovea_core'; import { GraphNode } from 'phovea_core'; export interface IForceDirectedGraphOptions extends IVisInstanceOptions { @@ -36,10 +36,10 @@ export class ForceDirectedGraphVis extends AVisInstance implements IVisInstance constructor(public readonly data: GraphProxy, public parent: Element, options: IForceDirectedGraphOptions = {}) { super(); - mixin(this.options, options); + BaseUtils.mixin(this.options, options); this.$node = this.build(d3.select(parent)); this.$node.datum(data); - assignVis(this.node, this); + VisUtils.assignVis(this.node, this); } /** diff --git a/src/heatmap/AHeatMapCanvasRenderer.ts b/src/heatmap/AHeatMapCanvasRenderer.ts index afcc845..4360d12 100644 --- a/src/heatmap/AHeatMapCanvasRenderer.ts +++ b/src/heatmap/AHeatMapCanvasRenderer.ts @@ -4,10 +4,10 @@ import * as d3 from 'd3'; -import {Range, cell} from 'phovea_core'; -import {onDOMNodeRemoved} from 'phovea_core'; +import {Range} from 'phovea_core'; +import {AppContext} from 'phovea_core'; import {IMatrix} from 'phovea_core'; -import {toSelectOperation, defaultSelectionType} from 'phovea_core'; +import {SelectionUtils} from 'phovea_core'; import {ESelectOption} from './IHeatMapRenderer'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; @@ -25,7 +25,7 @@ export abstract class AHeatMapCanvasRenderer { if (this.selectAble !== ESelectOption.NONE) { $node.datum().productSelections().then((selected) => { this.redrawSelection($node.select('canvas.phovea-heatmap-selection').node(), dim, - defaultSelectionType, selected); + SelectionUtils.defaultSelectionType, selected); }); } } @@ -96,7 +96,7 @@ export abstract class AHeatMapCanvasRenderer { $selection.on('click', () => { const ij = toCoord(d3.event); - data.selectProduct([cell(...ij)], toSelectOperation(d3.event)); + data.selectProduct([Range.cell(...ij)], SelectionUtils.toSelectOperation(d3.event)); }); const l = (event, type, selected) => { @@ -104,7 +104,7 @@ export abstract class AHeatMapCanvasRenderer { }; data.on('selectProduct', l); - onDOMNodeRemoved($selection.node(), () => { + AppContext.getInstance().onDOMNodeRemoved($selection.node(), () => { data.off('selectProduct', l); }); data.productSelections().then((selected) => { diff --git a/src/heatmap/DefaultUtils.ts b/src/heatmap/DefaultUtils.ts index 74605d3..d765088 100644 --- a/src/heatmap/DefaultUtils.ts +++ b/src/heatmap/DefaultUtils.ts @@ -3,14 +3,14 @@ */ import { - VALUE_TYPE_CATEGORICAL, INumberValueTypeDesc, + ValueTypeUtils, INumberValueTypeDesc, ICategoricalValueTypeDesc, ICategory } from 'phovea_core'; export class DefaultUtils { static defaultColor(value: INumberValueTypeDesc|ICategoricalValueTypeDesc): string[] { - if (value.type === VALUE_TYPE_CATEGORICAL) { + if (value.type === ValueTypeUtils.VALUE_TYPE_CATEGORICAL) { return (value).categories.map((c) => typeof c === 'string' ? 'gray' : (c).color || 'gray'); } const nv = value; @@ -23,7 +23,7 @@ export class DefaultUtils { } static defaultDomain(value: INumberValueTypeDesc|ICategoricalValueTypeDesc): (string|number)[] { - if (value.type === VALUE_TYPE_CATEGORICAL) { + if (value.type === ValueTypeUtils.VALUE_TYPE_CATEGORICAL) { return (value).categories.map((c) => typeof c === 'string' ? c : (c).name); } const nv = value; diff --git a/src/heatmap/HeatMap.ts b/src/heatmap/HeatMap.ts index 93cc9e3..f2ee864 100644 --- a/src/heatmap/HeatMap.ts +++ b/src/heatmap/HeatMap.ts @@ -6,11 +6,11 @@ import '../style.scss'; import * as d3 from 'd3'; import Range from 'phovea_core'; -import {AVisInstance, IVisInstance, assignVis} from 'phovea_core'; -import {rect} from 'phovea_core'; -import {mixin, onDOMNodeRemoved} from 'phovea_core'; -import {toSelectOperation} from 'phovea_core'; -import {INumericalMatrix, ICategoricalMatrix, DIM_ROW, DIM_COL} from 'phovea_core'; +import {AVisInstance, IVisInstance, VisUtils} from 'phovea_core'; +import {Rect} from 'phovea_core'; +import {BaseUtils, AppContext} from 'phovea_core'; +import {SelectionUtils} from 'phovea_core'; +import {INumericalMatrix, ICategoricalMatrix, AMatrix} from 'phovea_core'; import {DefaultUtils} from './DefaultUtils'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; import {toScale, IScale} from './IScale'; @@ -69,7 +69,7 @@ export class HeatMap extends AVisInstance implements IVisInstance { constructor(public data: IHeatMapAbleMatrix, public parent: Element, options: IHeatMapOptions = {}) { super(); const value = this.data.valuetype; - mixin(this.options, { + BaseUtils.mixin(this.options, { color: DefaultUtils.defaultColor(value), domain: DefaultUtils.defaultDomain(value) }, options); @@ -94,7 +94,7 @@ export class HeatMap extends AVisInstance implements IVisInstance { this.$node = this.build(d3.select(parent)); this.$node.datum(data); - assignVis(this.node, this); + VisUtils.assignVis(this.node, this); } get rawSize(): [number, number] { @@ -136,7 +136,7 @@ export class HeatMap extends AVisInstance implements IVisInstance { const xw = l(range.dim(1), width, o.scale[0]); const yh = l(range.dim(0), height, o.scale[1]); - return Promise.resolve(rect(xw[0], yh[0], xw[1], yh[1])); + return Promise.resolve(Rect.rect(xw[0], yh[0], xw[1], yh[1])); } transform(scale?: [number, number], rotate: number = 0) { @@ -196,7 +196,7 @@ export class HeatMap extends AVisInstance implements IVisInstance { } private renderLabels($node: d3.Selection, mode: ESelectOption, names: Promise) { - const dim = mode === ESelectOption.ROW ? DIM_ROW : DIM_COL; + const dim = mode === ESelectOption.ROW ? AMatrix.DIM_ROW : AMatrix.DIM_COL; const $group = $node.append('div').attr('class', 'phovea-heatmap-labels ' + (mode === ESelectOption.ROW ? 'row-labels' : 'column-labels')); const l = function (event: any, type: string, selected: Range) { @@ -215,7 +215,7 @@ export class HeatMap extends AVisInstance implements IVisInstance { names.then((data) => { const $names = $group.selectAll('div').data(data); $names.enter().append('div').on('click', (d, i) => { - this.data.select(dim, [i], toSelectOperation(d3.event)); + this.data.select(dim, [i], SelectionUtils.toSelectOperation(d3.event)); }); $names.text(String); $names.exit().remove(); @@ -225,7 +225,7 @@ export class HeatMap extends AVisInstance implements IVisInstance { }); }); this.data.on('select', l); - onDOMNodeRemoved($group.node(), () => { + AppContext.getInstance().onDOMNodeRemoved($group.node(), () => { this.data.off('select', l); }); diff --git a/src/heatmap/HeatMap1D.ts b/src/heatmap/HeatMap1D.ts index b351980..9eb93f4 100644 --- a/src/heatmap/HeatMap1D.ts +++ b/src/heatmap/HeatMap1D.ts @@ -5,9 +5,9 @@ import '../style.scss'; import * as d3 from 'd3'; import {Range} from 'phovea_core'; -import {AVisInstance, IVisInstance, assignVis} from 'phovea_core'; -import {rect} from 'phovea_core'; -import {mixin} from 'phovea_core'; +import {AVisInstance, IVisInstance, VisUtils} from 'phovea_core'; +import {Rect} from 'phovea_core'; +import {BaseUtils} from 'phovea_core'; import {D3Utils} from 'phovea_d3'; import {INumericalVector, ICategoricalVector} from 'phovea_core'; import {DefaultUtils} from './DefaultUtils'; @@ -45,7 +45,7 @@ export class HeatMap1D extends AVisInstance implements IVisInstance { constructor(public readonly data: IHeatMapAbleVector, public parent: Element, options: IHeatMap1DOptions = {}) { super(); const value = this.data.valuetype; - mixin(this.options, { + BaseUtils.mixin(this.options, { color: DefaultUtils.defaultColor(value), domain: DefaultUtils.defaultDomain(value) }, options); @@ -56,7 +56,7 @@ export class HeatMap1D extends AVisInstance implements IVisInstance { this.colorer = toScale(value).domain(this.options.domain).range(this.options.color); this.$node = this.build(d3.select(parent)); this.$node.datum(data); - assignVis(this.node, this); + VisUtils.assignVis(this.node, this); } get rawSize(): [number, number] { @@ -97,7 +97,7 @@ export class HeatMap1D extends AVisInstance implements IVisInstance { } const yh = l(range.dim(0), height, this.options.scale[1]); - return Promise.resolve(rect(0, yh[0], 20, yh[1])); + return Promise.resolve(Rect.rect(0, yh[0], 20, yh[1])); } transform(scale?: [number, number], rotate: number = 0) { diff --git a/src/heatmap/HeatMapDOMRenderer.ts b/src/heatmap/HeatMapDOMRenderer.ts index f0a51e8..bc0da00 100644 --- a/src/heatmap/HeatMapDOMRenderer.ts +++ b/src/heatmap/HeatMapDOMRenderer.ts @@ -4,9 +4,9 @@ import * as d3 from 'd3'; -import {Range, cell} from 'phovea_core'; -import {onDOMNodeRemoved} from 'phovea_core'; -import {toSelectOperation, defaultSelectionType} from 'phovea_core'; +import {Range} from 'phovea_core'; +import {AppContext} from 'phovea_core'; +import {SelectionUtils} from 'phovea_core'; import {DefaultUtils} from './DefaultUtils'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; import {IScale} from './IScale'; @@ -65,7 +65,7 @@ export class HeatMapDOMRenderer implements IHeatMapRenderer { $colsEnter.classed('missing', DefaultUtils.isMissing); if (that.selectAble !== ESelectOption.NONE) { $colsEnter.on('click', (d, j) => { - data.selectProduct([cell(i, j)], toSelectOperation(d3.event)); + data.selectProduct([Range.cell(i, j)], SelectionUtils.toSelectOperation(d3.event)); }); } $colsEnter.append('title').text(String); @@ -90,11 +90,11 @@ export class HeatMapDOMRenderer implements IHeatMapRenderer { }; if (this.selectAble !== ESelectOption.NONE) { data.on('selectProduct', l); - onDOMNodeRemoved($g.node(), function () { + AppContext.getInstance().onDOMNodeRemoved($g.node(), function () { data.off('selectProduct', l); }); data.productSelections().then(function (selected) { - l(null, defaultSelectionType, selected); + l(null, SelectionUtils.defaultSelectionType, selected); }); } diff --git a/src/heatmap/HeatMapImageRenderer.ts b/src/heatmap/HeatMapImageRenderer.ts index 30fd8c2..ee8310a 100644 --- a/src/heatmap/HeatMapImageRenderer.ts +++ b/src/heatmap/HeatMapImageRenderer.ts @@ -4,16 +4,16 @@ import * as d3 from 'd3'; -import {all} from 'phovea_core'; +import {Range} from 'phovea_core'; import {IHeatMapUrlOptions} from 'phovea_core'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; import {IScale} from './IScale'; import {IHeatMapRenderer, ESelectOption} from './IHeatMapRenderer'; import {AHeatMapCanvasRenderer} from './AHeatMapCanvasRenderer'; import {IHeatMapAbleMatrix} from './HeatMap'; -import {sendAPI, encodeParams, MAX_URL_LENGTH} from 'phovea_core'; -import parseRange from 'phovea_core'; -import {prepareHeatmapUrlParameter} from 'phovea_core'; +import {AppContext, Ajax} from 'phovea_core'; +import {ParseRangeUtils} from 'phovea_core'; +import {MatrixLoaderHelper} from 'phovea_core'; export class HeatMapImageRenderer extends AHeatMapCanvasRenderer implements IHeatMapRenderer { private image: HTMLImageElement; @@ -130,19 +130,19 @@ export class HeatMapImageRenderer extends AHeatMapCanvasRenderer implements IHea // persist to get range and create range object again // TODO: make range property on matrix public - const range = parseRange(data.persist().range); - const params = prepareHeatmapUrlParameter(range, args); + const range = ParseRangeUtils.parseRange(data.persist().range); + const params = MatrixLoaderHelper.prepareHeatmapUrlParameter(range, args); const url = `/dataset/matrix/${data.desc.id}/data`; - const encoded = encodeParams(params); - if (encoded && (url.length + encoded.length >= MAX_URL_LENGTH)) { + const encoded = Ajax.encodeParams(params); + if (encoded && (url.length + encoded.length >= Ajax.MAX_URL_LENGTH)) { // use post instead - sendAPI(url, params, 'POST', 'blob').then((image) => { + AppContext.getInstance().sendAPI(url, params, 'POST', 'blob').then((image) => { const imageURL = window.URL.createObjectURL(image); this.image.src = imageURL; }); } else { - this.image.src = data.heatmapUrl(all(), args); + this.image.src = data.heatmapUrl(Range.all(), args); } super.buildSelection(data, $root, scale); diff --git a/src/heatmap/IScale.ts b/src/heatmap/IScale.ts index 96f5d87..41f2a54 100644 --- a/src/heatmap/IScale.ts +++ b/src/heatmap/IScale.ts @@ -1,5 +1,5 @@ import * as d3 from 'd3'; -import {VALUE_TYPE_CATEGORICAL} from 'phovea_core'; +import {ValueTypeUtils} from 'phovea_core'; export interface IScale { (x: any): any; @@ -11,7 +11,7 @@ export interface IScale { } export function toScale(value): IScale { - if (value.type === VALUE_TYPE_CATEGORICAL) { + if (value.type === ValueTypeUtils.VALUE_TYPE_CATEGORICAL) { return d3.scale.ordinal(); } return d3.scale.linear(); diff --git a/src/kaplanmeier.ts b/src/kaplanmeier.ts index ecbeaab..7e3b64e 100644 --- a/src/kaplanmeier.ts +++ b/src/kaplanmeier.ts @@ -6,8 +6,8 @@ import './style.scss'; import * as d3 from 'd3'; import {Range} from 'phovea_core'; -import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea_core'; -import {mixin} from 'phovea_core'; +import {AVisInstance, IVisInstance, VisUtils, IVisInstanceOptions} from 'phovea_core'; +import {BaseUtils} from 'phovea_core'; import {INumericalVector} from 'phovea_core'; import {} from 'phovea_core'; import {} from 'phovea_core'; @@ -46,10 +46,10 @@ export class KaplanMeierPlot extends AVisInstance implements IVisInstance { constructor(public readonly data: INumericalVector, public parent: Element, options: IKaplanMaierOptions = {}) { super(); //var value = (this.data.desc).value; - mixin(this.options, options); + BaseUtils.mixin(this.options, options); this.$node = this.build(d3.select(parent)); this.$node.datum(data); - assignVis(this.node, this); + VisUtils.assignVis(this.node, this); } get rawSize(): [number, number] { diff --git a/src/list/barplot.ts b/src/list/barplot.ts index a1ed9bd..f83e05e 100644 --- a/src/list/barplot.ts +++ b/src/list/barplot.ts @@ -4,7 +4,7 @@ import '../style.scss'; import {scale} from 'd3'; -import {mixin} from 'phovea_core'; +import {BaseUtils} from 'phovea_core'; import {INumericalVector} from 'phovea_core'; import {AList, IAListOptions} from './internal/AList'; import {INumberValueTypeDesc} from 'phovea_core'; @@ -18,7 +18,7 @@ export class BarPlot extends AList(); constructor(data: INumericalVector, parent: HTMLElement, options: IBarPlotOptions = {}) { - super(data, parent, mixin({cssClass: 'phovea-barplot', width: 100, min: NaN, max: NaN}, options)); + super(data, parent, BaseUtils.mixin({cssClass: 'phovea-barplot', width: 100, min: NaN, max: NaN}, options)); this.build(); } diff --git a/src/list/internal/AList.ts b/src/list/internal/AList.ts index e73b348..e39cedc 100644 --- a/src/list/internal/AList.ts +++ b/src/list/internal/AList.ts @@ -4,12 +4,12 @@ import '../../style.scss'; import {select, extent, selection} from 'd3'; -import {mixin} from 'phovea_core'; -import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea_core'; +import {BaseUtils} from 'phovea_core'; +import {AVisInstance, IVisInstance, VisUtils, IVisInstanceOptions} from 'phovea_core'; import {D3Utils} from 'phovea_d3'; import {IVector} from 'phovea_core'; -import {rect} from 'phovea_core'; -import Range from 'phovea_core'; +import {Rect} from 'phovea_core'; +import {Range} from 'phovea_core'; import {IValueTypeDesc} from 'phovea_core'; export interface IAListOptions extends IVisInstanceOptions { @@ -33,10 +33,10 @@ export abstract class AList, private readonly parent: HTMLElement, options: O) { super(); - this.options = mixin({}, DEFAULT_OPTIONS, options); + this.options = BaseUtils.mixin({}, DEFAULT_OPTIONS, options); this.$node = select(parent).append('div').attr('class', 'phovea-list ' + this.options.cssClass); this.$node.datum(this); - assignVis(this.node, this); + VisUtils.assignVis(this.node, this); } get rawSize(): [number, number] { @@ -59,7 +59,7 @@ export abstract class AListthis.node.childNodes.item(ex[0]); b = this.node.childNodes.item(ex[1]); } - return Promise.resolve(rect(0, a.offsetTop, w, b.offsetTop + b.clientHeight - a.offsetTop)); + return Promise.resolve(Rect.rect(0, a.offsetTop, w, b.offsetTop + b.clientHeight - a.offsetTop)); } transform(scale?: [number, number], rotate: number = 0) { diff --git a/src/list/list.ts b/src/list/list.ts index f29f0f0..bc36f03 100644 --- a/src/list/list.ts +++ b/src/list/list.ts @@ -4,7 +4,7 @@ import '../style.scss'; import {format} from 'd3'; -import {mixin} from 'phovea_core'; +import {BaseUtils} from 'phovea_core'; import {IAnyVector} from 'phovea_core'; import {AList, IAListOptions} from './internal/AList'; import {IValueTypeDesc} from 'phovea_core'; @@ -15,7 +15,7 @@ export interface IListOptions extends IAListOptions { export class List extends AList { constructor(data: IAnyVector, parent: HTMLElement, options: IListOptions = {}) { - super(data, parent, mixin({format: null, rowHeight: 18}, options)); + super(data, parent, BaseUtils.mixin({format: null, rowHeight: 18}, options)); this.build(); } diff --git a/src/list/proportionalSymbol.ts b/src/list/proportionalSymbol.ts index 0145619..d95c36e 100644 --- a/src/list/proportionalSymbol.ts +++ b/src/list/proportionalSymbol.ts @@ -4,7 +4,7 @@ import '../style.scss'; import {scale} from 'd3'; -import {mixin} from 'phovea_core'; +import {BaseUtils} from 'phovea_core'; import {INumericalVector} from 'phovea_core'; import {AList, IAListOptions} from './internal/AList'; import {INumberValueTypeDesc} from 'phovea_core'; @@ -18,7 +18,7 @@ export class ProportionalSymbol extends AList(); constructor(data: INumericalVector, parent: HTMLElement, options: IProportionalSymbolOptions = {}) { - super(data, parent, mixin({cssClass: 'phovea-proportional-symbol', width: 20, min: NaN, max: NaN}, options)); + super(data, parent, BaseUtils.mixin({cssClass: 'phovea-proportional-symbol', width: 20, min: NaN, max: NaN}, options)); this.build(); } diff --git a/src/table.ts b/src/table.ts index a3c2b18..35fe889 100644 --- a/src/table.ts +++ b/src/table.ts @@ -5,13 +5,13 @@ import './style.scss'; import * as d3 from 'd3'; import {Range} from 'phovea_core'; -import {AVisInstance, IVisInstance, assignVis, IVisInstanceOptions} from 'phovea_core'; -import {rect} from 'phovea_core'; +import {AVisInstance, IVisInstance, VisUtils, IVisInstanceOptions} from 'phovea_core'; +import {Rect} from 'phovea_core'; import {IAnyMatrix} from 'phovea_core'; import {ITable} from 'phovea_core'; import {IAnyVector} from 'phovea_core'; import {D3Utils} from 'phovea_d3'; -import {mixin} from 'phovea_core'; +import {BaseUtils} from 'phovea_core'; export declare type ITableOptions = IVisInstanceOptions; @@ -24,7 +24,7 @@ export class Table extends AVisInstance implements IVisInstance { constructor(public readonly data: IAnyMatrix|ITable|IAnyVector, parent: Element, options: ITableOptions = {}) { super(); - mixin(this.options, options); + BaseUtils.mixin(this.options, options); const $p = d3.select(parent); switch (data.desc.type) { //depending on the type of the data, create a different table case 'matrix': @@ -45,7 +45,7 @@ export class Table extends AVisInstance implements IVisInstance { break; } this.$node.datum(data); - assignVis(this.node, this); + VisUtils.assignVis(this.node, this); } get rawSize(): [number, number] { @@ -63,12 +63,12 @@ export class Table extends AVisInstance implements IVisInstance { let a, b; if (range.isAll || range.isNone) { b = $tbody.select('tr:last').node(); - return Promise.resolve(rect(0, offset, w, b.offsetTop + b.clientHeight)); + return Promise.resolve(Rect.rect(0, offset, w, b.offsetTop + b.clientHeight)); } const ex: any = d3.extent(range.dim(0).iter().asList()); a = $tbody.select('tr:nth-child(' + (ex[0] + 1) + ')').node(); b = $tbody.select('tr:nth-child(' + (ex[1] + 1) + ')').node(); - return Promise.resolve(rect(0, a.offsetTop, w, b.offsetTop + b.clientHeight - a.offsetTop)); + return Promise.resolve(Rect.rect(0, a.offsetTop, w, b.offsetTop + b.clientHeight - a.offsetTop)); } transform(scale?: [number, number], rotate: number = 0) { diff --git a/tests/table.test.ts b/tests/table.test.ts index 2f9d948..410800a 100644 --- a/tests/table.test.ts +++ b/tests/table.test.ts @@ -1,7 +1,7 @@ /// import {Table} from '../src/table'; -import {asMatrix as parseMatrix} from 'phovea_core'; -import {parse} from 'phovea_core'; +import {Matrix} from 'phovea_core'; +import {RangeElem} from 'phovea_core'; describe('table', () => { let squareTable; @@ -9,7 +9,7 @@ describe('table', () => { let rowTable; beforeEach(function(done) { // Yes, this is redundant, but it's ok for now. - const data = parseMatrix( + const data = Matrix.asMatrix( [ // raw data as 2D array [1, 2], [3, 4] @@ -19,8 +19,8 @@ describe('table', () => { ); const element = document.createElement('div'); squareTable = Table.createTable(data, element); - colTable = Table.createTable(data.view(parse([[0,1],[1]])), element); - rowTable = Table.createTable(data.view(parse([[1],[0,1]])), element); + colTable = Table.createTable(data.view(RangeElem.parse([[0,1],[1]])), element); + rowTable = Table.createTable(data.view(RangeElem.parse([[1],[0,1]])), element); setTimeout(function() { done(); }, 1000); // TODO: Can we do better than this? create() doesn't let us provide a callback? From 019d8b1142c607fa7a730973927b6ec4c828061c Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 26 May 2020 10:29:49 +0200 Subject: [PATCH 45/67] fix errors and add dist folder --- dist/axis.d.ts | 45 +++++ dist/axis.js | 145 ++++++++++++++++ dist/box.d.ts | 21 +++ dist/box.js | 87 ++++++++++ dist/distribution/HistData.d.ts | 25 +++ dist/distribution/HistData.js | 65 +++++++ dist/distribution/Histogram.d.ts | 45 +++++ dist/distribution/Histogram.js | 143 ++++++++++++++++ dist/distribution/Mosaic.d.ts | 46 +++++ dist/distribution/Mosaic.js | 145 ++++++++++++++++ dist/distribution/Pie.d.ts | 46 +++++ dist/distribution/Pie.js | 156 +++++++++++++++++ dist/distribution/index.d.ts | 7 + dist/distribution/index.js | 8 + dist/force_directed_graph.d.ts | 49 ++++++ dist/force_directed_graph.js | 153 +++++++++++++++++ dist/heatmap/AHeatMapCanvasRenderer.d.ts | 16 ++ dist/heatmap/AHeatMapCanvasRenderer.js | 94 ++++++++++ dist/heatmap/DefaultUtils.d.ts | 9 + dist/heatmap/DefaultUtils.js | 34 ++++ dist/heatmap/HeatMap.d.ts | 60 +++++++ dist/heatmap/HeatMap.js | 208 +++++++++++++++++++++++ dist/heatmap/HeatMap1D.d.ts | 41 +++++ dist/heatmap/HeatMap1D.js | 132 ++++++++++++++ dist/heatmap/HeatMapCanvasRenderer.d.ts | 20 +++ dist/heatmap/HeatMapCanvasRenderer.js | 92 ++++++++++ dist/heatmap/HeatMapDOMRenderer.d.ts | 18 ++ dist/heatmap/HeatMapDOMRenderer.js | 89 ++++++++++ dist/heatmap/HeatMapImageRenderer.d.ts | 21 +++ dist/heatmap/HeatMapImageRenderer.js | 135 +++++++++++++++ dist/heatmap/ICommonHeatMapOptions.d.ts | 24 +++ dist/heatmap/ICommonHeatMapOptions.js | 1 + dist/heatmap/IHeatMapRenderer.d.ts | 18 ++ dist/heatmap/IHeatMapRenderer.js | 11 ++ dist/heatmap/IScale.d.ts | 8 + dist/heatmap/IScale.js | 9 + dist/heatmap/index.d.ts | 13 ++ dist/heatmap/index.js | 13 ++ dist/index.d.ts | 8 + dist/index.js | 9 + dist/kaplanmeier.d.ts | 40 +++++ dist/kaplanmeier.js | 102 +++++++++++ dist/list/barplot.d.ts | 21 +++ dist/list/barplot.js | 36 ++++ dist/list/index.d.ts | 4 + dist/list/index.js | 5 + dist/list/internal/AList.d.ts | 32 ++++ dist/list/internal/AList.js | 83 +++++++++ dist/list/internal/internal.d.ts | 1 + dist/list/internal/internal.js | 2 + dist/list/list.d.ts | 16 ++ dist/list/list.js | 23 +++ dist/list/proportionalSymbol.d.ts | 21 +++ dist/list/proportionalSymbol.js | 38 +++++ dist/table.d.ts | 26 +++ dist/table.js | 108 ++++++++++++ src/axis.ts | 4 +- src/heatmap/HeatMap.ts | 2 +- 58 files changed, 2830 insertions(+), 3 deletions(-) create mode 100644 dist/axis.d.ts create mode 100644 dist/axis.js create mode 100644 dist/box.d.ts create mode 100644 dist/box.js create mode 100644 dist/distribution/HistData.d.ts create mode 100644 dist/distribution/HistData.js create mode 100644 dist/distribution/Histogram.d.ts create mode 100644 dist/distribution/Histogram.js create mode 100644 dist/distribution/Mosaic.d.ts create mode 100644 dist/distribution/Mosaic.js create mode 100644 dist/distribution/Pie.d.ts create mode 100644 dist/distribution/Pie.js create mode 100644 dist/distribution/index.d.ts create mode 100644 dist/distribution/index.js create mode 100644 dist/force_directed_graph.d.ts create mode 100644 dist/force_directed_graph.js create mode 100644 dist/heatmap/AHeatMapCanvasRenderer.d.ts create mode 100644 dist/heatmap/AHeatMapCanvasRenderer.js create mode 100644 dist/heatmap/DefaultUtils.d.ts create mode 100644 dist/heatmap/DefaultUtils.js create mode 100644 dist/heatmap/HeatMap.d.ts create mode 100644 dist/heatmap/HeatMap.js create mode 100644 dist/heatmap/HeatMap1D.d.ts create mode 100644 dist/heatmap/HeatMap1D.js create mode 100644 dist/heatmap/HeatMapCanvasRenderer.d.ts create mode 100644 dist/heatmap/HeatMapCanvasRenderer.js create mode 100644 dist/heatmap/HeatMapDOMRenderer.d.ts create mode 100644 dist/heatmap/HeatMapDOMRenderer.js create mode 100644 dist/heatmap/HeatMapImageRenderer.d.ts create mode 100644 dist/heatmap/HeatMapImageRenderer.js create mode 100644 dist/heatmap/ICommonHeatMapOptions.d.ts create mode 100644 dist/heatmap/ICommonHeatMapOptions.js create mode 100644 dist/heatmap/IHeatMapRenderer.d.ts create mode 100644 dist/heatmap/IHeatMapRenderer.js create mode 100644 dist/heatmap/IScale.d.ts create mode 100644 dist/heatmap/IScale.js create mode 100644 dist/heatmap/index.d.ts create mode 100644 dist/heatmap/index.js create mode 100644 dist/index.d.ts create mode 100644 dist/index.js create mode 100644 dist/kaplanmeier.d.ts create mode 100644 dist/kaplanmeier.js create mode 100644 dist/list/barplot.d.ts create mode 100644 dist/list/barplot.js create mode 100644 dist/list/index.d.ts create mode 100644 dist/list/index.js create mode 100644 dist/list/internal/AList.d.ts create mode 100644 dist/list/internal/AList.js create mode 100644 dist/list/internal/internal.d.ts create mode 100644 dist/list/internal/internal.js create mode 100644 dist/list/list.d.ts create mode 100644 dist/list/list.js create mode 100644 dist/list/proportionalSymbol.d.ts create mode 100644 dist/list/proportionalSymbol.js create mode 100644 dist/table.d.ts create mode 100644 dist/table.js diff --git a/dist/axis.d.ts b/dist/axis.d.ts new file mode 100644 index 0000000..3f0b199 --- /dev/null +++ b/dist/axis.d.ts @@ -0,0 +1,45 @@ +/** + * Created by Samuel Gratzl on 25.01.2016. + */ +import './style.scss'; +import { AVisInstance, IVisInstance, ITransform, IVisInstanceOptions } from 'phovea_core'; +import { INumericalVector } from 'phovea_core'; +import { Range } from 'phovea_core'; +export interface IAxisOptions extends IVisInstanceOptions { + /** + * axis shift + * @default 10 + */ + shift?: number; + /** + * axis orientation (left, right, top, bottom) + * @default left + */ + orient?: string; + /** + * @default 2 + */ + tickSize?: number; + /** + * radius + * @default 2 + */ + r?: number; +} +export declare class Axis extends AVisInstance implements IVisInstance { + readonly data: INumericalVector; + private readonly options; + private readonly $node; + private $axis; + private $points; + private scale; + private axis; + constructor(data: INumericalVector, parent: HTMLElement, options?: IAxisOptions); + get rawSize(): [number, number]; + get node(): HTMLElement; + private build; + locateImpl(range: Range): Promise; + transform(scale?: [number, number], rotate?: number): ITransform; + private wrap; + static createAxis(data: INumericalVector, parent: HTMLElement, options: IAxisOptions): Axis; +} diff --git a/dist/axis.js b/dist/axis.js new file mode 100644 index 0000000..20fd264 --- /dev/null +++ b/dist/axis.js @@ -0,0 +1,145 @@ +/** + * Created by Samuel Gratzl on 25.01.2016. + */ +import './style.scss'; +import * as d3 from 'd3'; +import { BaseUtils } from 'phovea_core'; +import { AVisInstance, VisUtils } from 'phovea_core'; +import { D3Utils } from 'phovea_d3'; +export class Axis extends AVisInstance { + constructor(data, parent, options = {}) { + super(); + this.data = data; + this.options = { + shift: 10, + tickSize: 2, + orient: 'left', + r: 2, + scale: [1, 1], + rotate: 0 + }; + BaseUtils.mixin(this.options, options); + this.$node = this.build(d3.select(parent)); + this.$node.datum(this); + VisUtils.assignVis(this.node, this); + } + get rawSize() { + return [50, 300]; + } + get node() { + return this.$node.node(); + } + build($parent) { + const o = this.options, size = this.size, data = this.data; + const $svg = $parent.append('svg').attr({ + width: size[0], + height: size[1], + 'class': 'phovea-axis' + }); + const $root = $svg.append('g'); + const $axis = this.$axis = $root.append('g').attr('class', 'makeover'); + const $points = this.$points = $root.append('g'); + const s = this.scale = d3.scale.linear().domain(data.desc.value.range).range([o.shift, ((o.orient === 'left' || o.orient === 'right') ? size[1] : size[0]) - o.shift]).clamp(true); + const axis = this.axis = d3.svg.axis() + .tickSize(o.tickSize) + .orient(o.orient) + .scale(s); + switch (o.orient) { + case 'left': + $points.attr('transform', 'translate(' + (size[0] - o.shift) + ',0)'); + $axis.attr('transform', 'translate(' + (size[0] - o.shift) + ',0)'); + break; + case 'right': + $points.attr('transform', 'translate(' + o.shift + ',0)'); + $axis.attr('transform', 'translate(' + o.shift + ',0)'); + break; + case 'top': + $points.attr('transform', 'translate(0, ' + o.shift + ')'); + $axis.attr('transform', 'translate(0,' + o.shift + ')'); + break; + case 'bottom': + $points.attr('transform', 'translate(0, ' + (size[1] - o.shift) + ')'); + $axis.attr('transform', 'translate(0,' + (size[1] - o.shift) + ')'); + break; + } + $axis.call(axis); + const onClick = D3Utils.selectionUtil(this.data, $points, 'circle'); + const cxy = (o.orient === 'left' || o.orient === 'right') ? 'cy' : 'cx'; + data.data().then((arr) => { + const $p = $points.selectAll('circle').data(arr); + $p.enter().append('circle').attr('r', o.r).on('click', onClick); + $p.exit().remove(); + $p.attr(cxy, s); + this.markReady(); + }); + return $svg; + } + locateImpl(range) { + if (range.isAll || range.isNone) { + const r = this.scale.range(); + return Promise.resolve(this.wrap({ y: r[0], h: r[1] - r[0] })); + } + return this.data.data(range).then((data) => { + const ex = d3.extent(data, this.scale); + return this.wrap({ y: ex[0], h: ex[1] - ex[0] }); + }); + } + transform(scale, rotate) { + const bak = { + scale: this.options.scale || [1, 1], + rotate: this.options.rotate || 0 + }; + if (arguments.length === 0) { + return bak; + } + const o = this.options; + const size = this.rawSize; + this.$node.attr({ + width: size[0] * scale[0], + height: size[1] * scale[1] + }).style('transform', 'rotate(' + rotate + 'deg)'); + this.scale.range([o.shift, ((o.orient === 'left' || o.orient === 'right') ? size[1] * scale[1] : size[0] * scale[0]) - o.shift]); + const cxy = (o.orient === 'left' || o.orient === 'right') ? 'cy' : 'cx'; + this.$points.selectAll('circle').attr(cxy, this.scale); + this.$axis.call(this.axis); + const act = { scale, rotate }; + this.fire('transform', act, bak); + this.options.scale = scale; + this.options.rotate = rotate; + return act; + } + wrap(base) { + const s = this.rawSize; + switch (this.options.orient) { + case 'left': + base.x = s[0] - this.options.shift; + base.w = 0; + break; + case 'right': + base.x = this.options.shift; + base.w = 0; + break; + case 'top': + base.x = base.y; + base.w = base.h; + base.y = this.options.shift; + base.h = 0; + break; + case 'bottom': + base.x = base.y; + base.w = base.h; + base.y = s[1] - this.options.shift; + base.h = 0; + break; + } + base.x -= this.options.r; + base.y -= this.options.r; + base.w += 2 * this.options.r; + base.h += 2 * this.options.r; + return base; + } + static createAxis(data, parent, options) { + return new Axis(data, parent, options); + } +} +//# sourceMappingURL=axis.js.map \ No newline at end of file diff --git a/dist/box.d.ts b/dist/box.d.ts new file mode 100644 index 0000000..b0d9d10 --- /dev/null +++ b/dist/box.d.ts @@ -0,0 +1,21 @@ +/** + * Created by Samuel Gratzl on 25.01.2016. + */ +import './style.scss'; +import { Range } from 'phovea_core'; +import { AVisInstance, IVisInstance, IVisInstanceOptions } from 'phovea_core'; +import { Rect } from 'phovea_core'; +import { INumericalVector } from 'phovea_core'; +export declare type IBoxPlotOptions = IVisInstanceOptions; +export declare class BoxPlot extends AVisInstance implements IVisInstance { + data: INumericalVector; + private readonly options; + private readonly $node; + private scale; + constructor(data: INumericalVector, parent: Element, options?: IBoxPlotOptions); + get rawSize(): [number, number]; + get node(): Element; + private build; + locateImpl(range: Range): Promise; + static createBoxPlot(data: INumericalVector, parent: Element, options?: IBoxPlotOptions): BoxPlot; +} diff --git a/dist/box.js b/dist/box.js new file mode 100644 index 0000000..b626fee --- /dev/null +++ b/dist/box.js @@ -0,0 +1,87 @@ +/** + * Created by Samuel Gratzl on 25.01.2016. + */ +import './style.scss'; +import * as d3 from 'd3'; +import { AVisInstance, VisUtils } from 'phovea_core'; +import { Rect } from 'phovea_core'; +import { BaseUtils } from 'phovea_core'; +import { ToolTip } from 'phovea_d3'; +function createText(stats) { + let r = ''; + const keys = ['min', 'max', 'sum', 'mean', 'median', 'q1', 'q3', 'var', 'sd', 'n', 'nans', 'moment2', 'moment3', 'moment4', 'kurtosis', 'skewness']; + keys.forEach(function (key) { + const value = stats[key]; + r = `${r}`; + }); + r = `${r}
${key}${value}
`; + return r; +} +export class BoxPlot extends AVisInstance { + constructor(data, parent, options = {}) { + super(); + this.data = data; + this.options = { + scale: [1, 1], + rotate: 0 + }; + BaseUtils.mixin(this.options, options); + this.$node = this.build(d3.select(parent)); + this.$node.datum(this); + VisUtils.assignVis(this.node, this); + } + get rawSize() { + return [300, 50]; + } + get node() { + return this.$node.node(); + } + build($parent) { + const size = this.size, data = this.data; + const $svg = $parent.append('svg').attr({ + width: size[0], + height: size[1], + 'class': 'phovea-box' + }); + const $t = $svg.append('g'); + const s = this.scale = d3.scale.linear().domain(this.data.desc.value.range).range([0, size[0]]).clamp(true); + $t.append('path').attr({ + d: `M0,0 L0,${size[1]} M0,${size[1] / 2} L${size[0]},${size[1] / 2} M${size[0]},0 L${size[0]},${size[1]}`, + 'class': 'axis' + }); + data.statsAdvanced().then((stats) => { + const text = createText(stats); + $t.append('rect').attr({ + x: s(stats.q1), + y: '10%', + width: s(stats.q3), + height: '80%', + 'class': 'box' + }).call(ToolTip.bind(text)); + $t.append('line').attr({ + x1: s(stats.median), + x2: s(stats.median), + y1: '10%', + y2: '90%', + 'class': 'mean' + }); + this.markReady(); + }); + return $svg; + } + locateImpl(range) { + const that = this; + if (range.isAll || range.isNone) { + const r = this.scale.range(); + return Promise.resolve(Rect.rect(r[0], 0, r[1] - r[0], 50)); + } + return this.data.data(range).then(function (data) { + const ex = d3.extent(data, that.scale); + return Rect.rect(ex[0], 0, ex[1] - ex[0], 50); + }); + } + static createBoxPlot(data, parent, options) { + return new BoxPlot(data, parent, options); + } +} +//# sourceMappingURL=box.js.map \ No newline at end of file diff --git a/dist/distribution/HistData.d.ts b/dist/distribution/HistData.d.ts new file mode 100644 index 0000000..0568b3c --- /dev/null +++ b/dist/distribution/HistData.d.ts @@ -0,0 +1,25 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import { Range } from 'phovea_core'; +import { IVisInstanceOptions } from 'phovea_core'; +import { IHistAbleDataType, INumberValueTypeDesc, ICategoricalValueTypeDesc } from 'phovea_core'; +import { IStratification } from 'phovea_core'; +import { ICatHistogram, IHistogram } from 'phovea_core'; +export interface IHistData { + readonly v: number; + readonly acc: number; + readonly ratio: number; + readonly range: Range; + readonly name: string; + readonly color: string; +} +export declare class HistUtils { + static createCategoricalHistData(hist: ICatHistogram): IHistData[]; + static createNumericalHistData(hist: IHistogram, range: number[]): IHistData[]; + static createHistData(hist: IHistogram, data: IHistAbleDataType | IStratification): IHistData[]; + static resolveHistMax(hist: IHistogram, totalHeight: ITotalHeight): Promise; +} +export declare type ITotalHeight = number | boolean | ((hist: IHistogram) => number | boolean | Promise); +export interface IDistributionOptions extends IVisInstanceOptions { +} diff --git a/dist/distribution/HistData.js b/dist/distribution/HistData.js new file mode 100644 index 0000000..ed8e000 --- /dev/null +++ b/dist/distribution/HistData.js @@ -0,0 +1,65 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import * as d3 from 'd3'; +import { ValueTypeUtils } from 'phovea_core'; +export class HistUtils { + static createCategoricalHistData(hist) { + const categories = hist.categories; + const cols = hist.colors || d3.scale.category10().range(); + const total = hist.validCount; + const data = []; + let acc = 0; + hist.forEach((b, i) => { + data[i] = { + v: b, + acc, + ratio: b / total, + range: hist.range(i), + name: (typeof categories[i] === 'string') ? categories[i] : categories[i].name, + color: (categories[i].color === undefined) ? cols[i] : categories[i].color + }; + acc += b; + }); + return data; + } + static createNumericalHistData(hist, range) { + const data = [], cols = d3.scale.linear().domain(range).range(['#111111', '#999999']), total = hist.validCount, binWidth = (range[1] - range[0]) / hist.bins; + let acc = 0; + hist.forEach((b, i) => { + data[i] = { + v: b, + acc, + ratio: b / total, + range: hist.range(i), + name: 'Bin ' + (i + 1) + ' (center: ' + d3.round((i + 0.5) * binWidth, 2) + ')', + color: cols((i + 0.5) * binWidth) + }; + acc += b; + }); + return data; + } + static createHistData(hist, data) { + if (data.desc.type === 'stratification') { + return HistUtils.createCategoricalHistData(hist); + } + const d = data.valuetype; + if (d.type === ValueTypeUtils.VALUE_TYPE_CATEGORICAL) { + return HistUtils.createCategoricalHistData(hist); + } + return HistUtils.createNumericalHistData(hist, d.range); + } + static resolveHistMax(hist, totalHeight) { + const op = typeof totalHeight === 'function' ? totalHeight : () => totalHeight; + return Promise.resolve(op(hist)).then((r) => { + if (r === true) { + return hist.validCount; + } + if (r === false) { + return hist.largestBin; + } + return r; + }); + } +} +//# sourceMappingURL=HistData.js.map \ No newline at end of file diff --git a/dist/distribution/Histogram.d.ts b/dist/distribution/Histogram.d.ts new file mode 100644 index 0000000..2c34e61 --- /dev/null +++ b/dist/distribution/Histogram.d.ts @@ -0,0 +1,45 @@ +/** + * Created by Samuel Gratzl on 26.01.2016. + */ +import '../style.scss'; +import { Range } from 'phovea_core'; +import { AVisInstance, IVisInstance, ITransform } from 'phovea_core'; +import { IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc } from 'phovea_core'; +import { IStratification } from 'phovea_core'; +import { IDistributionOptions, ITotalHeight } from './HistData'; +export interface IHistogramOptions extends IDistributionOptions { + /** + * options to specify how the total value is computed + * @default true + */ + total?: ITotalHeight; + /** + * @default Math.floor(Math.sqrt(data.length)) + */ + nbins?: number; + /** + * @default 200 + */ + duration?: number; + /** + * one color used for all the bins + * @default the color of the bin that is provided by the histogram + */ + color?: number; +} +export declare class Histogram extends AVisInstance implements IVisInstance { + readonly data: IHistAbleDataType | IStratification; + private options; + private readonly $node; + private xscale; + private yscale; + private hist; + private histData; + constructor(data: IHistAbleDataType | IStratification, parent: Element, options?: IHistogramOptions); + get rawSize(): [number, number]; + get node(): SVGSVGElement; + private build; + locateImpl(range: Range): any; + transform(scale?: [number, number], rotate?: number): ITransform; + static createHistrogram(data: IHistAbleDataType, parent: Element, options?: IHistogramOptions): Histogram; +} diff --git a/dist/distribution/Histogram.js b/dist/distribution/Histogram.js new file mode 100644 index 0000000..a21ba14 --- /dev/null +++ b/dist/distribution/Histogram.js @@ -0,0 +1,143 @@ +/** + * Created by Samuel Gratzl on 26.01.2016. + */ +import '../style.scss'; +import * as d3 from 'd3'; +import { AppContext, BaseUtils } from 'phovea_core'; +import { AVisInstance, VisUtils } from 'phovea_core'; +import { SelectionUtils } from 'phovea_core'; +import { ToolTip } from 'phovea_d3'; +import { HistUtils } from './HistData'; +export class Histogram extends AVisInstance { + constructor(data, parent, options = {}) { + super(); + this.data = data; + this.options = { + nbins: 5, + total: true, + duration: 200, + scale: [1, 1], + rotate: 0 + }; + BaseUtils.mixin(this.options, { + nbins: Math.floor(Math.sqrt(data.length)), + }, options); + this.$node = this.build(d3.select(parent)); + this.$node.datum(this); + VisUtils.assignVis(this.node, this); + } + get rawSize() { + return [200, 100]; + } + get node() { + return this.$node.node(); + } + build($parent) { + const size = this.size, data = this.data, o = this.options; + const $svg = $parent.append('svg').attr({ + width: size[0], + height: size[1], + 'class': 'phovea-histogram' + }); + const $t = $svg.append('g'); + const $data = $t.append('g'); + const $highlight = $t.append('g').style('pointer-events', 'none').classed('phovea-select-selected', true); + //using range bands with an ordinal scale for uniform distribution + const xscale = this.xscale = d3.scale.ordinal().rangeBands([0, size[0]], 0.1); + const yscale = this.yscale = d3.scale.linear().range([0, size[1]]); + const l = (event, type, selected) => { + if (!this.histData) { + return; + } + const highlights = this.histData.map((entry, i) => { + const s = entry.range.intersect(selected); + return { + i, + v: s.size()[0] + }; + }).filter((entry) => entry.v > 0); + const $m = $highlight.selectAll('rect').data(highlights); + $m.enter().append('rect').attr('width', xscale.rangeBand()); + $m.attr({ + x: (d) => xscale(d.i), + y: (d) => yscale(yscale.domain()[1] - d.v), + height: 0 + }); + $m.transition().duration(o.duration).attr('height', function (d) { + return yscale(d.v); + }); + $m.exit().remove(); + }; + data.on('select', l); + AppContext.getInstance().onDOMNodeRemoved($data.node(), function () { + data.off('select', l); + }); + const onClick = (d) => data.select(0, d.range, SelectionUtils.toSelectOperation(d3.event)); + this.data.hist(Math.floor(o.nbins)).then((hist) => { + this.hist = hist; + xscale.domain(d3.range(hist.bins)); + return HistUtils.resolveHistMax(hist, this.options.total); + }).then((histmax) => { + const hist = this.hist; + yscale.domain([0, histmax]); + const histData = this.histData = HistUtils.createHistData(hist, this.data); + const $m = $data.selectAll('rect').data(histData); + $m.enter().append('rect') + .attr('width', xscale.rangeBand()) + .call(ToolTip.bind((d) => `${d.name} ${d.v} entries (${Math.round(d.ratio * 100)}%)`)) + .on('click', onClick); + $m.attr({ + x: (d, i) => xscale(i), + fill: (d) => this.options.color || d.color, + y: (d) => yscale(yscale.domain()[1] - d.v), + height: (d) => yscale(d.v) + }); + this.markReady(); + data.selections().then((selected) => { + l(null, 'selected', selected); + }); + }); + return $svg; + } + locateImpl(range) { + const size = this.rawSize; + if (range.isAll || range.isNone) { + return Promise.resolve({ x: 0, y: 0, w: size[0], h: size[1] }); + } + return this.data.data(range).then((data) => { + const ex = d3.extent(data, (value) => this.hist.binOf(value)); + const h0 = this.histData[ex[0]]; + const h1 = this.histData[ex[1]]; + return Promise.resolve({ + x: this.xscale(ex[0]), + width: (this.xscale(ex[1]) - this.xscale(ex[0]) + this.xscale.rangeBand()), + height: this.yscale(Math.max(h0.v, h1.v)), + y: this.yscale(this.yscale.domain()[1] - Math.max(h0.v, h1.v)) + }); + }); + } + transform(scale, rotate) { + const bak = { + scale: this.options.scale || [1, 1], + rotate: this.options.rotate || 0 + }; + if (arguments.length === 0) { + return bak; + } + const size = this.rawSize; + this.$node.attr({ + width: size[0] * scale[0], + height: size[1] * scale[1] + }).style('transform', 'rotate(' + rotate + 'deg)'); + this.$node.select('g').attr('transform', 'scale(' + scale[0] + ',' + scale[1] + ')'); + const act = { scale, rotate }; + this.fire('transform', act, bak); + this.options.scale = scale; + this.options.rotate = rotate; + return act; + } + static createHistrogram(data, parent, options) { + return new Histogram(data, parent, options); + } +} +//# sourceMappingURL=Histogram.js.map \ No newline at end of file diff --git a/dist/distribution/Mosaic.d.ts b/dist/distribution/Mosaic.d.ts new file mode 100644 index 0000000..026c111 --- /dev/null +++ b/dist/distribution/Mosaic.d.ts @@ -0,0 +1,46 @@ +/** + * Created by Samuel Gratzl on 26.01.2016. + */ +import '../style.scss'; +import { Range } from 'phovea_core'; +import { AVisInstance, IVisInstance, ITransform } from 'phovea_core'; +import { IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc } from 'phovea_core'; +import { IStratification } from 'phovea_core'; +import { IDistributionOptions } from './HistData'; +export interface IMosaicOptions extends IDistributionOptions { + /** + * @default 20 + */ + width?: number; + /** + * @default 200 + */ + duration?: number; + /** + * target height such that the mosaic will fit + * @default null + */ + heightTo?: number; + /** + * @default 10 + */ + initialScale?: number; + /** + * @default true + */ + selectAble?: boolean; +} +export declare class Mosaic extends AVisInstance implements IVisInstance { + readonly data: IHistAbleDataType | IStratification; + private readonly options; + private readonly $node; + private hist; + private histData; + constructor(data: IHistAbleDataType | IStratification, parent: Element, options?: IMosaicOptions); + get rawSize(): [number, number]; + get node(): Element; + private build; + locateImpl(range: Range): any; + transform(scale?: [number, number], rotate?: number): ITransform; + static createMosaic(data: IHistAbleDataType | IStratification, parent: Element, options?: IMosaicOptions): Mosaic; +} diff --git a/dist/distribution/Mosaic.js b/dist/distribution/Mosaic.js new file mode 100644 index 0000000..b728844 --- /dev/null +++ b/dist/distribution/Mosaic.js @@ -0,0 +1,145 @@ +/** + * Created by Samuel Gratzl on 26.01.2016. + */ +import '../style.scss'; +import * as d3 from 'd3'; +import { AppContext, BaseUtils } from 'phovea_core'; +import { AVisInstance, VisUtils } from 'phovea_core'; +import { SelectionUtils } from 'phovea_core'; +import { ToolTip } from 'phovea_d3'; +import { HistUtils } from './HistData'; +export class Mosaic extends AVisInstance { + constructor(data, parent, options = {}) { + super(); + this.data = data; + this.options = { + width: 20, + initialScale: 10, + duration: 200, + heightTo: null, + selectAble: true, + scale: [1, 1], + rotate: 0 + }; + BaseUtils.mixin(this.options, { + scale: [1, this.options.initialScale] + }, options); + if (typeof this.options.heightTo === 'number') { + this.options.scale[1] = this.options.heightTo / this.data.dim[0]; + } + this.$node = this.build(d3.select(parent)); + this.$node.datum(this); + VisUtils.assignVis(this.node, this); + } + get rawSize() { + return [this.options.width, this.data.dim[0]]; + } + get node() { + return this.$node.node(); + } + build($parent) { + const size = this.size, data = this.data, o = this.options; + const $svg = $parent.append('svg').attr({ + width: size[0], + height: size[1], + 'class': 'phovea-mosaic' + }); + const $scale = $svg.append('g').attr('transform', 'scale(' + o.scale[0] + ',' + o.scale[1] + ')'); + const $data = $scale.append('g'); + const $highlight = $scale.append('g').style('pointer-events', 'none').classed('phovea-select-selected', true); + const l = (event, type, selected) => { + if (!this.histData) { + return; + } + const highlights = this.histData.map((entry, i) => { + const s = entry.range.intersect(selected); + return { + i, + acc: entry.acc, + v: s.size()[0] + }; + }).filter((entry) => entry.v > 0); + const $m = $highlight.selectAll('rect').data(highlights); + $m.enter().append('rect').attr('width', '100%').classed('phovea-select-selected', true); + $m.attr({ + y: (d) => d.acc, + height: (d) => d.v + }).style('opacity', 0); + $m.transition().duration(o.duration).style('opacity', 1); + $m.exit().remove(); + }; + if (o.selectAble) { + data.on('select', l); + AppContext.getInstance().onDOMNodeRemoved($data.node(), () => data.off('select', l)); + } + const onClick = o.selectAble ? (d) => { + data.select(0, d.range, SelectionUtils.toSelectOperation(d3.event)); + } : null; + this.data.hist().then((hist) => { + this.hist = hist; + const histData = this.histData = HistUtils.createHistData(hist, data); + const $m = $data.selectAll('rect').data(histData); + $m.enter().append('rect') + .attr('width', '100%') + .call(ToolTip.bind((d) => `${d.name} ${d.v} entries (${Math.round(d.ratio * 100)}%)`)) + .on('click', onClick); + $m.attr({ + y: (d) => d.acc, + height: (d) => d.v, + fill: (d) => d.color + }); + this.fire('built'); + this.markReady(); + if (o.selectAble) { + data.selections().then((selected) => { + l(null, 'selected', selected); + }); + } + }); + return $svg; + } + locateImpl(range) { + if (range.isAll || range.isNone) { + const s = this.size; + return Promise.resolve({ x: 0, y: 0, w: s[0], h: s[1] }); + } + return this.data.data(range).then((data) => { + const ex = d3.extent(data, (value) => this.hist.binOf(value)); + const h0 = this.histData[ex[0]]; + const h1 = this.histData[ex[1]]; + const y = Math.min(h0.acc, h1.acc); + const y2 = Math.max(h0.acc + h0.v, h1.acc + h1.v); + const scale = this.options.scale; + return Promise.resolve({ + x: 0, + width: this.rawSize[0] * scale[0], + height: (y2 - y) * scale[1], + y: y * scale[1] + }); + }); + } + transform(scale, rotate) { + const bak = { + scale: this.options.scale || [1, 1], + rotate: this.options.rotate || 0 + }; + if (arguments.length === 0) { + return bak; + } + const size = this.rawSize; + this.$node.attr({ + width: size[0] * scale[0], + height: size[1] * scale[1] + }).style('transform', 'rotate(' + rotate + 'deg)'); + this.$node.select('g').attr('transform', 'scale(' + scale[0] + ',' + scale[1] + ')'); + const act = { scale, rotate }; + this.fire('transform', act, bak); + this.options.scale = scale; + this.options.rotate = rotate; + return act; + } + static createMosaic(data, parent, options) { + return new Mosaic(data, parent, options); + } +} +//# sourceMappingURL=Mosaic.js.map \ No newline at end of file diff --git a/dist/distribution/Pie.d.ts b/dist/distribution/Pie.d.ts new file mode 100644 index 0000000..f3e9705 --- /dev/null +++ b/dist/distribution/Pie.d.ts @@ -0,0 +1,46 @@ +/** + * Created by Samuel Gratzl on 26.01.2016. + */ +import '../style.scss'; +import { Range } from 'phovea_core'; +import { AVisInstance, IVisInstance, ITransform } from 'phovea_core'; +import { IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc } from 'phovea_core'; +import { IStratification } from 'phovea_core'; +import { Polygon } from 'phovea_core'; +import { IDistributionOptions, ITotalHeight } from './HistData'; +export interface IPieOptions extends IDistributionOptions { + /** + * options to specify how the total value is computed + * @default true + */ + total?: ITotalHeight; + /** + * @default 200 + */ + duration?: number; + /** + * @default 50 + */ + radius?: number; + /** + * @default 0 + */ + innerRadius?: number; +} +export declare class Pie extends AVisInstance implements IVisInstance { + readonly data: IHistAbleDataType | IStratification; + private readonly options; + private readonly $node; + private scale; + private arc; + private hist; + private histData; + constructor(data: IHistAbleDataType | IStratification, parent: Element, options?: IPieOptions); + get rawSize(): [number, number]; + get node(): Element; + private build; + locateImpl(range: Range): any; + transform(scale?: [number, number], rotate?: number): ITransform; + static createPie(data: IHistAbleDataType | IStratification, parent: Element, options?: IPieOptions): Pie; + static toPolygon(start: number, end: number, radius: number): Polygon; +} diff --git a/dist/distribution/Pie.js b/dist/distribution/Pie.js new file mode 100644 index 0000000..ccf775d --- /dev/null +++ b/dist/distribution/Pie.js @@ -0,0 +1,156 @@ +/** + * Created by Samuel Gratzl on 26.01.2016. + */ +import '../style.scss'; +import * as d3 from 'd3'; +import { AppContext, BaseUtils } from 'phovea_core'; +import { AVisInstance, VisUtils } from 'phovea_core'; +import { SelectionUtils } from 'phovea_core'; +import { Vector2D, Polygon } from 'phovea_core'; +import { ToolTip } from 'phovea_d3'; +import { HistUtils } from './HistData'; +export class Pie extends AVisInstance { + constructor(data, parent, options = {}) { + super(); + this.data = data; + this.options = { + radius: 50, + innerRadius: 0, + duration: 200, + total: true, + scale: [1, 1], + rotate: 0 + }; + BaseUtils.mixin(this.options, options); + this.$node = this.build(d3.select(parent)); + this.$node.datum(this); + VisUtils.assignVis(this.node, this); + } + get rawSize() { + const r = this.options.radius; + return [r * 2, r * 2]; + } + get node() { + return this.$node.node(); + } + build($parent) { + const size = this.size, data = this.data, o = this.options; + const $svg = $parent.append('svg').attr({ + width: size[0], + height: size[1], + 'class': 'phovea-pie' + }); + const $base = $svg.append('g').attr('transform', 'translate(' + o.radius + ',' + o.radius + ')'); + const $data = $base.append('g'); + const $highlight = $base.append('g').style('pointer-events', 'none').classed('phovea-select-selected', true); + const scale = this.scale = d3.scale.linear().range([0, 2 * Math.PI]); + const arc = this.arc = d3.svg.arc().innerRadius(o.innerRadius).outerRadius(o.radius) + .startAngle((d) => scale(d.start)) + .endAngle((d) => scale(d.end)); + const l = (event, type, selected) => { + if (!this.histData) { + return; + } + const highlights = this.histData.map((entry) => { + const s = entry.range.intersect(selected); + return { + start: entry.start, + end: entry.start + s.size()[0] + }; + }).filter((entry) => entry.start < entry.end); + const $m = $highlight.selectAll('path').data(highlights); + $m.enter().append('path'); + $m.exit().remove(); + $m.attr('d', arc); + }; + data.on('select', l); + AppContext.getInstance().onDOMNodeRemoved($data.node(), function () { + data.off('select', l); + }); + data.hist().then((hist) => { + this.hist = hist; + return HistUtils.resolveHistMax(hist, this.options.total); + }).then((total) => { + const hist = this.hist; + scale.domain([0, total]); + const histData = this.histData = [], cats = hist.categories; + let prev = 0; + const cols = hist.colors || d3.scale.category10().range(); + hist.forEach(function (b, i) { + histData[i] = { + name: (typeof cats[i] === 'string') ? cats[i] : cats[i].name, + start: prev, + size: b, + ratio: b / total, + end: prev + b, + color: (cats[i].color === undefined) ? cols[i] : cats[i].color, + range: hist.range(i) + }; + prev += b; + }); + const $m = $data.selectAll('path').data(histData); + $m.enter() + .append('path') + .call(ToolTip.bind((d) => d.name + ' ' + (d.size) + ' entries (' + Math.round(d.ratio * 100) + '%)')) + .on('click', (d) => data.select(0, d.range, SelectionUtils.toSelectOperation(d3.event))); + $m.attr('d', arc) + .attr('fill', (d) => d.color) + .style('opacity', 0); + //fade in animation + $m.transition() + .duration(o.duration) + .delay((d, i) => i * o.duration) + .style('opacity', 1); + this.markReady(); + data.selections().then((selected) => l(null, 'selected', selected)); + }); + return $svg; + } + locateImpl(range) { + const o = this.options; + if (range.isAll || range.isNone) { + return Promise.resolve({ x: o.radius, y: o.radius, radius: o.radius }); + } + return this.data.data(range).then((data) => { + const ex = d3.extent(data, (value) => this.hist.binOf(value)); + const startAngle = this.scale(this.histData[ex[0]].start); + const endAngle = this.scale(this.histData[ex[1]].end); + return Promise.resolve(Pie.toPolygon(startAngle, endAngle, o.radius)); + }); + } + transform(scale, rotate) { + const bak = { + scale: this.options.scale || [1, 1], + rotate: this.options.rotate || 0 + }; + if (arguments.length === 0) { + return bak; + } + this.$node.attr({ + width: this.options.radius * 2 * scale[0], + height: this.options.radius * 2 * scale[1] + }).style('transform', 'rotate(' + rotate + 'deg)'); + this.$node.select('g').attr('transform', 'scale(' + scale[0] + ',' + scale[1] + ')translate(' + this.options.radius + ',' + this.options.radius + ')'); + const act = { scale, rotate }; + this.fire('transform', act, bak); + this.options.scale = scale; + this.options.rotate = rotate; + return act; + } + static createPie(data, parent, options) { + return new Pie(data, parent, options); + } + static toPolygon(start, end, radius) { + const r = [ + Vector2D.vec2(radius, radius), + Vector2D.vec2(radius + Math.cos(start) * radius, radius + Math.sin(start) * radius), + Vector2D.vec2(radius + Math.cos(end) * radius, radius + Math.sin(end) * radius) + ]; + //approximate by triangle + if (end - start > Math.PI) { //more than 180 degree use one more point + r.splice(2, 0, Vector2D.vec2(radius + Math.cos((end - start) * 0.5) * radius, radius + Math.sin((end - start) * 0.5) * radius)); + } + return Polygon.polygon(r); + } +} +//# sourceMappingURL=Pie.js.map \ No newline at end of file diff --git a/dist/distribution/index.d.ts b/dist/distribution/index.d.ts new file mode 100644 index 0000000..2139da3 --- /dev/null +++ b/dist/distribution/index.d.ts @@ -0,0 +1,7 @@ +/** + * Created by Samuel Gratzl on 26.01.2016. + */ +export * from './HistData'; +export * from './Histogram'; +export * from './Mosaic'; +export * from './Pie'; diff --git a/dist/distribution/index.js b/dist/distribution/index.js new file mode 100644 index 0000000..f26293e --- /dev/null +++ b/dist/distribution/index.js @@ -0,0 +1,8 @@ +/** + * Created by Samuel Gratzl on 26.01.2016. + */ +export * from './HistData'; +export * from './Histogram'; +export * from './Mosaic'; +export * from './Pie'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/force_directed_graph.d.ts b/dist/force_directed_graph.d.ts new file mode 100644 index 0000000..d4035ae --- /dev/null +++ b/dist/force_directed_graph.d.ts @@ -0,0 +1,49 @@ +/** + * Created by Samuel Gratzl on 05.08.2014. + */ +import './style.scss'; +import { AVisInstance, IVisInstance, IVisInstanceOptions } from 'phovea_core'; +import { GraphProxy } from 'phovea_core'; +export interface IForceDirectedGraphOptions extends IVisInstanceOptions { + /** + * assign colors + * @default true + */ + colors?: boolean; +} +export declare class ForceDirectedGraphVis extends AVisInstance implements IVisInstance { + readonly data: GraphProxy; + parent: Element; + private readonly $node; + private readonly options; + constructor(data: GraphProxy, parent: Element, options?: IForceDirectedGraphOptions); + /** + * the raw size without any scaling factors applied + * @returns {any[]} + */ + get rawSize(): [number, number]; + /** + * access to the HTML Element of this visualization + * @returns {Element} + */ + get node(): Element; + /** + * get/set an option of this vis + * @param name + * @param val + * @returns {any} + */ + option(name: string, val?: any): any; + /** + * transform this visualization given the scaling and rotation factor + * @param scale a two number array + * @param rotate a factor in degree + * @returns {any} + */ + transform(scale?: [number, number], rotate?: number): { + scale: [number, number]; + rotate: number; + }; + private build; + static createForceDirectedGraphVis(data: GraphProxy, parent: Element, options?: IForceDirectedGraphOptions): ForceDirectedGraphVis; +} diff --git a/dist/force_directed_graph.js b/dist/force_directed_graph.js new file mode 100644 index 0000000..e5462c8 --- /dev/null +++ b/dist/force_directed_graph.js @@ -0,0 +1,153 @@ +/** + * Created by Samuel Gratzl on 05.08.2014. + */ +import './style.scss'; +import * as d3 from 'd3'; +import { AVisInstance, VisUtils } from 'phovea_core'; +import { BaseUtils } from 'phovea_core'; +export class ForceDirectedGraphVis extends AVisInstance { + constructor(data, parent, options = {}) { + super(); + this.data = data; + this.parent = parent; + this.options = { + scale: [1, 1], + rotate: 0, + colors: true + }; + BaseUtils.mixin(this.options, options); + this.$node = this.build(d3.select(parent)); + this.$node.datum(data); + VisUtils.assignVis(this.node, this); + } + /** + * the raw size without any scaling factors applied + * @returns {any[]} + */ + get rawSize() { + return [300, 300]; + } + /** + * access to the HTML Element of this visualization + * @returns {Element} + */ + get node() { + return this.$node.node(); + } + /** + * get/set an option of this vis + * @param name + * @param val + * @returns {any} + */ + option(name, val) { + if (arguments.length === 1) { + return this.options[name]; + } + else { + this.fire('option', name, val, this.options[name]); + this.fire('option.' + name, val, this.options[name]); + this.options[name] = val; + //handle option change + } + } + /** + * transform this visualization given the scaling and rotation factor + * @param scale a two number array + * @param rotate a factor in degree + * @returns {any} + */ + transform(scale, rotate = 0) { + const bak = { + scale: this.options.scale || [1, 1], + rotate: this.options.rotate || 0 + }; + if (arguments.length === 0) { + return bak; + } + const raw = this.rawSize; + this.$node.style('transform', 'rotate(' + rotate + 'deg)'); + this.$node.attr('width', raw[0] * scale[0]).attr('height', raw[1] * scale[1]); + this.$node.select('g').attr('transform', 'scale(' + scale[0] + ',' + scale[1] + ')'); + const act = { scale, rotate }; + this.fire('transform', act, bak); + this.options.scale = scale; + this.options.rotate = rotate; + return act; + } + build($parent) { + //create a svg and append a group for the transform + const scaleFactor = this.options.scale, size = this.size; + //create the svg + const $svg = $parent.append('svg').attr({ + width: size[0], + height: size[1], + 'class': 'phovea-graph-force' + }); + const $root = $svg.append('g').attr('transform', 'scale(' + scaleFactor[0] + ',' + scaleFactor[1] + ')'); + const colors = d3.scale.category10().range().slice(); + this.data.impl().then((graph) => { + const nodes = graph.nodes.map((n) => ({ v: n })); + const lookup = d3.map(nodes, (d) => String(d.v.id)); + const edges = graph.edges.map((n) => ({ + v: n, + source: lookup.get(String(n.source.id)), + target: lookup.get(String(n.target.id)) + })); + const f = d3.layout.force() + .size(this.rawSize); + f.nodes(nodes).links(edges); + const $links = $root.selectAll('.edge').data(edges); + $links.enter().append('line').classed('edge', true); + $links.attr('data-type', (d) => d.v.type); + $links.exit().remove(); + const $nodes = $root.selectAll('.node').data(nodes); + $nodes.enter().append('circle') + .classed('node', true).attr('r', 5) + .call(f.drag) + .on('click', (d) => { + console.log(d.v); + }) + .append('title'); + $nodes.attr('data-type', (d) => d.v.type); + if (this.options.colors) { + $links.style('stroke', (d) => { + let c = lookup[d.v.type]; + if (!c) { + c = colors.shift() || 'gray'; + lookup[d.v.type] = c; + } + return c; + }); + $nodes.style('fill', (d) => { + let c = lookup[d.v.type]; + if (!c) { + c = colors.shift() || 'gray'; + lookup[d.v.type] = c; + } + return c; + }); + } + $nodes.select('title').text((d) => d.v.id + ' ' + d.v.type); + f.on('tick', () => { + $links.attr({ + x1: (d) => d.source.x, + y1: (d) => d.source.y, + x2: (d) => d.target.x, + y2: (d) => d.target.y + }); + $nodes.attr({ + cx: (d) => d.x, + cy: (d) => d.y + }); + }); + this.markReady(); + f.start(); + }); + return $svg; + } + static createForceDirectedGraphVis(data, parent, options) { + return new ForceDirectedGraphVis(data, parent, options); + } +} +//# sourceMappingURL=force_directed_graph.js.map \ No newline at end of file diff --git a/dist/heatmap/AHeatMapCanvasRenderer.d.ts b/dist/heatmap/AHeatMapCanvasRenderer.d.ts new file mode 100644 index 0000000..40ce7fa --- /dev/null +++ b/dist/heatmap/AHeatMapCanvasRenderer.d.ts @@ -0,0 +1,16 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import * as d3 from 'd3'; +import { Range } from 'phovea_core'; +import { IMatrix } from 'phovea_core'; +import { ESelectOption } from './IHeatMapRenderer'; +import { ICommonHeatMapOptions } from './ICommonHeatMapOptions'; +export declare abstract class AHeatMapCanvasRenderer { + protected readonly selectAble: ESelectOption; + protected options: ICommonHeatMapOptions; + constructor(selectAble: ESelectOption, options: ICommonHeatMapOptions); + rescale($node: d3.Selection, dim: number[], scale: number[]): void; + protected redrawSelection(canvas: HTMLCanvasElement, dim: number[], type: string, selected: Range[]): void; + protected buildSelection(data: IMatrix, $root: d3.Selection, scale: [number, number]): void; +} diff --git a/dist/heatmap/AHeatMapCanvasRenderer.js b/dist/heatmap/AHeatMapCanvasRenderer.js new file mode 100644 index 0000000..b2949eb --- /dev/null +++ b/dist/heatmap/AHeatMapCanvasRenderer.js @@ -0,0 +1,94 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import * as d3 from 'd3'; +import { Range } from 'phovea_core'; +import { AppContext } from 'phovea_core'; +import { SelectionUtils } from 'phovea_core'; +import { ESelectOption } from './IHeatMapRenderer'; +export class AHeatMapCanvasRenderer { + constructor(selectAble = ESelectOption.CELL, options) { + this.selectAble = selectAble; + this.options = options; + } + rescale($node, dim, scale) { + $node.selectAll('canvas.phovea-heatmap-selection').attr({ + width: dim[1] * scale[0], + height: dim[0] * scale[1] + }); + if (this.selectAble !== ESelectOption.NONE) { + $node.datum().productSelections().then((selected) => { + this.redrawSelection($node.select('canvas.phovea-heatmap-selection').node(), dim, SelectionUtils.defaultSelectionType, selected); + }); + } + } + redrawSelection(canvas, dim, type, selected) { + const ctx = canvas.getContext('2d'); + ctx.save(); + ctx.clearRect(0, 0, canvas.width, canvas.height); + ctx.fillStyle = 'orange'; + ctx.strokeStyle = 'orange'; + if (selected.length === 0) { + ctx.restore(); + return; + } + if (selected.some((a) => a.isAll)) { + ctx.fillRect(0, 0, canvas.width, canvas.height); + ctx.restore(); + return; + } + if (this.options.mode === 'sm') { + ctx.scale(canvas.width / dim[1], canvas.height / dim[0]); + selected.forEach((cell) => { + cell.product((indices) => { + const [i, j] = indices; + ctx.fillRect(j, i, 1, 1); + }, dim); + }); + } + else { + const cw = canvas.width / dim[1]; + const ch = canvas.height / dim[0]; + selected.forEach((cell) => { + cell.product((indices) => { + const [i, j] = indices; + ctx.strokeRect(j * cw, i * ch, cw, ch); + }, dim); + }); + } + ctx.restore(); + } + buildSelection(data, $root, scale) { + if (this.selectAble === ESelectOption.NONE) { + return; + } + const dims = data.dim; + const width = dims[1], height = dims[0]; + const $selection = $root.append('canvas').attr({ + width: width * scale[0], + height: height * scale[1], + 'class': 'phovea-heatmap-selection' + }); + const toCoord = (evt) => { + const c = $selection.node(), rect = c.getBoundingClientRect(); + const x = evt.clientX - rect.left, y = evt.clientY - rect.top; + const i = Math.floor(width * x / c.width), j = Math.floor(height * y / c.height); + return [j, i]; + }; + $selection.on('click', () => { + const ij = toCoord(d3.event); + data.selectProduct([Range.cell(...ij)], SelectionUtils.toSelectOperation(d3.event)); + }); + const l = (event, type, selected) => { + this.redrawSelection($selection.node(), dims, type, selected); + }; + data.on('selectProduct', l); + AppContext.getInstance().onDOMNodeRemoved($selection.node(), () => { + data.off('selectProduct', l); + }); + data.productSelections().then((selected) => { + this.redrawSelection($selection.node(), dims, 'selected', selected); + }); + } +} +//# sourceMappingURL=AHeatMapCanvasRenderer.js.map \ No newline at end of file diff --git a/dist/heatmap/DefaultUtils.d.ts b/dist/heatmap/DefaultUtils.d.ts new file mode 100644 index 0000000..c4b2ab2 --- /dev/null +++ b/dist/heatmap/DefaultUtils.d.ts @@ -0,0 +1,9 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import { INumberValueTypeDesc, ICategoricalValueTypeDesc } from 'phovea_core'; +export declare class DefaultUtils { + static defaultColor(value: INumberValueTypeDesc | ICategoricalValueTypeDesc): string[]; + static defaultDomain(value: INumberValueTypeDesc | ICategoricalValueTypeDesc): (string | number)[]; + static isMissing(v: any): boolean; +} diff --git a/dist/heatmap/DefaultUtils.js b/dist/heatmap/DefaultUtils.js new file mode 100644 index 0000000..b4cfbcd --- /dev/null +++ b/dist/heatmap/DefaultUtils.js @@ -0,0 +1,34 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import { ValueTypeUtils } from 'phovea_core'; +export class DefaultUtils { + static defaultColor(value) { + if (value.type === ValueTypeUtils.VALUE_TYPE_CATEGORICAL) { + return value.categories.map((c) => typeof c === 'string' ? 'gray' : c.color || 'gray'); + } + const nv = value; + const r = nv.range; + if (r[0] < 0 && r[1] > 0) { + //use a symmetric range + return ['blue', 'white', 'red']; + } + return ['white', 'red']; + } + static defaultDomain(value) { + if (value.type === ValueTypeUtils.VALUE_TYPE_CATEGORICAL) { + return value.categories.map((c) => typeof c === 'string' ? c : c.name); + } + const nv = value; + const r = nv.range; + if (r[0] < 0 && r[1] > 0) { + //use a symmetric range + return [Math.min(r[0], -r[1]), 0, Math.max(-r[0], r[1])]; + } + return r; + } + static isMissing(v) { + return (v === null || (typeof v === 'number' && isNaN(v))); + } +} +//# sourceMappingURL=DefaultUtils.js.map \ No newline at end of file diff --git a/dist/heatmap/HeatMap.d.ts b/dist/heatmap/HeatMap.d.ts new file mode 100644 index 0000000..bdf0bbd --- /dev/null +++ b/dist/heatmap/HeatMap.d.ts @@ -0,0 +1,60 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import '../style.scss'; +import { Range } from 'phovea_core'; +import { AVisInstance, IVisInstance } from 'phovea_core'; +import { Rect } from 'phovea_core'; +import { INumericalMatrix, ICategoricalMatrix } from 'phovea_core'; +import { ICommonHeatMapOptions } from './ICommonHeatMapOptions'; +import { IHeatMapRenderer, ESelectOption } from './IHeatMapRenderer'; +import { IHeatMap1DOptions, IHeatMapAbleVector } from './HeatMap1D'; +export declare type IHeatMapAbleMatrix = INumericalMatrix | ICategoricalMatrix; +export interface IHeatMapOptions extends ICommonHeatMapOptions { + /** + * @default null + */ + scaleTo?: [number, number]; + /** + * @default 200 + */ + duration?: number; + /** + * @default true + */ + selectAble?: boolean; + /** + * force using images if possible + * @default false + */ + forceThumbnails?: boolean; + /** + * render optional labels, + * @default NONE + */ + labels?: ESelectOption; +} +export declare class HeatMap extends AVisInstance implements IVisInstance { + data: IHeatMapAbleMatrix; + parent: Element; + private $node; + private colorer; + private renderer; + private readonly options; + constructor(data: IHeatMapAbleMatrix, parent: Element, options?: IHeatMapOptions); + get rawSize(): [number, number]; + get node(): Element; + option(name: string, val?: any): any; + locateImpl(range: Range): Promise; + transform(scale?: [number, number], rotate?: number): { + scale: [number, number]; + rotate: number; + }; + private recolor; + private build; + private renderLabels; + update(): void; + static createRenderer(d: IHeatMapAbleMatrix, selectAble: ESelectOption, options: IHeatMapOptions): IHeatMapRenderer; + static create2D(data: IHeatMapAbleMatrix, parent: HTMLElement, options?: IHeatMapOptions): HeatMap; + static createHeatMapDimensions(data: IHeatMapAbleMatrix | IHeatMapAbleVector, parent: HTMLElement, options?: IHeatMapOptions | IHeatMap1DOptions): AVisInstance; +} diff --git a/dist/heatmap/HeatMap.js b/dist/heatmap/HeatMap.js new file mode 100644 index 0000000..2d59948 --- /dev/null +++ b/dist/heatmap/HeatMap.js @@ -0,0 +1,208 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import '../style.scss'; +import * as d3 from 'd3'; +import { AVisInstance, VisUtils } from 'phovea_core'; +import { Rect } from 'phovea_core'; +import { BaseUtils, AppContext } from 'phovea_core'; +import { SelectionUtils } from 'phovea_core'; +import { AMatrix } from 'phovea_core'; +import { DefaultUtils } from './DefaultUtils'; +import { toScale } from './IScale'; +import { ESelectOption } from './IHeatMapRenderer'; +import { HeatMapDOMRenderer } from './HeatMapDOMRenderer'; +import { HeatMapImageRenderer } from './HeatMapImageRenderer'; +import { HeatMapCanvasRenderer } from './HeatMapCanvasRenderer'; +import { HeatMap1D } from './HeatMap1D'; +export class HeatMap extends AVisInstance { + constructor(data, parent, options = {}) { + super(); + this.data = data; + this.parent = parent; + this.options = { + initialScale: 10, + scaleTo: null, + duration: 200, + selectAble: true, + forceThumbnails: false, + scale: [1, 1], + rotate: 0, + labels: ESelectOption.NONE, + missingColor: '#d400c2', + mode: 'sm' + }; + const value = this.data.valuetype; + BaseUtils.mixin(this.options, { + color: DefaultUtils.defaultColor(value), + domain: DefaultUtils.defaultDomain(value) + }, options); + // if direct scale not given use initial scale + if (!options.scale) { + this.options.scale = [this.options.initialScale, this.options.initialScale]; + } + if (this.options.scaleTo) { + const raw = this.data.dim; + this.options.scale = this.options.scaleTo.map((d, i) => d / raw[i]); + } + this.options.rotate = 0; + this.colorer = toScale(value).domain(this.options.domain).range(this.options.color); + // handle string case + this.options.labels = typeof this.options.labels === 'string' ? ESelectOption[this.options.labels] : this.options.labels; + const selection = typeof this.options.selectAble === 'boolean' ? (this.options.selectAble ? ESelectOption.CELL : ESelectOption.NONE) : ESelectOption[this.options.selectAble]; + this.renderer = HeatMap.createRenderer(data, selection, this.options); + this.$node = this.build(d3.select(parent)); + this.$node.datum(data); + VisUtils.assignVis(this.node, this); + } + get rawSize() { + const d = this.data.dim; + return [d[1], d[0]]; + } + get node() { + return this.$node.node(); + } + option(name, val) { + if (arguments.length === 1) { + return this.options[name]; + } + else { + this.fire('option', name, val, this.options[name]); + this.fire('option.' + name, val, this.options[name]); + this.options[name] = val; + switch (name) { + case 'color': + case 'domain': + this.recolor(); + break; + } + } + } + locateImpl(range) { + const dims = this.data.dim; + const width = dims[1], height = dims[0], o = this.options; + function l(r, max, s) { + if (r.isAll || r.isNone) { + return [0, max * s]; + } + const ex = d3.extent(r.iter().asList()); + return [ex[0] * s, (ex[1] - ex[0] + 1) * s]; + } + const xw = l(range.dim(1), width, o.scale[0]); + const yh = l(range.dim(0), height, o.scale[1]); + return Promise.resolve(Rect.rect(xw[0], yh[0], xw[1], yh[1])); + } + transform(scale, rotate = 0) { + const bak = { + scale: this.options.scale || [1, 1], + rotate: this.options.rotate || 0 + }; + if (arguments.length === 0) { + return bak; + } + const dims = this.data.dim; + this.$node.style('transform', 'rotate(' + rotate + 'deg)'); + if (bak.scale[0] !== scale[0] || bak.scale[1] !== scale[1]) { + this.renderer.rescale(this.$node, dims, scale); + if (this.options.labels === ESelectOption.CELL || this.options.labels === ESelectOption.ROW) { + this.$node.select('div.row-labels') + .style('height', dims[0] * scale[1] + 'px') + .style('right', dims[1] * scale[0] + 'px'); + } + if (this.options.labels === ESelectOption.CELL || this.options.labels === ESelectOption.COLUMN) { + this.$node.select('div.column-labels') + .style('height', dims[1] * scale[0] + 'px'); + } + } + const act = { scale, rotate }; + this.fire('transform', act, bak); + this.options.scale = scale; + this.options.rotate = rotate; + return act; + } + recolor() { + const c = this.colorer; + c.domain(this.options.domain).range(this.options.color); + this.renderer.recolor(this.$node, this.data, c, this.options.scale); + } + build($parent) { + const $node = this.renderer.build(this.data, $parent, this.options.scale, this.colorer, () => { + this.renderer.redraw(this.$node, this.options.scale); + this.markReady(); + }); + if (this.options.labels === ESelectOption.CELL || this.options.labels === ESelectOption.ROW) { + this.renderLabels($node, ESelectOption.ROW, this.data.rows()) + .style('height', this.size[1] + 'px') + .style('right', this.size[0] + 'px'); + } + if (this.options.labels === ESelectOption.CELL || this.options.labels === ESelectOption.COLUMN) { + this.renderLabels($node, ESelectOption.COLUMN, this.data.cols()) + .style('height', this.size[0] + 'px'); + } + return $node; + } + renderLabels($node, mode, names) { + const dim = mode === ESelectOption.ROW ? AMatrix.DIM_ROW : AMatrix.DIM_COL; + const $group = $node.append('div').attr('class', 'phovea-heatmap-labels ' + (mode === ESelectOption.ROW ? 'row-labels' : 'column-labels')); + const l = function (event, type, selected) { + const all = $group.selectAll('div'); + all.classed('phovea-select-' + type, false); + const dimSelections = selected.dim(dim); + if (dimSelections.isAll && !selected.dim(1 - dim).isAll) { + return; + } + const sub = dimSelections.filter(all[0]); + if (sub.length > 0) { + d3.selectAll(sub).classed('phovea-select-' + type, true); + } + }; + names.then((data) => { + const $names = $group.selectAll('div').data(data); + $names.enter().append('div').on('click', (d, i) => { + this.data.select(dim, [i], SelectionUtils.toSelectOperation(d3.event)); + }); + $names.text(String); + $names.exit().remove(); + this.data.selections().then((selected) => { + l(null, 'selected', selected); + }); + }); + this.data.on('select', l); + AppContext.getInstance().onDOMNodeRemoved($group.node(), () => { + this.data.off('select', l); + }); + return $group; + } + update() { + this.renderer.redraw(this.$node, this.options.scale); + } + static createRenderer(d, selectAble = ESelectOption.CELL, options) { + const cells = d.length; + if (cells <= 1000) { + return new HeatMapDOMRenderer(selectAble, options); + } + const url = d.heatmapUrl(); //can the url be created the return value should be valid + if (url && options.forceThumbnails) { + return new HeatMapImageRenderer(selectAble, options); + } + else if (cells < 5000 || url === null) { + return new HeatMapCanvasRenderer(selectAble, options); + } + else { + return new HeatMapImageRenderer(selectAble, options); + } + } + static create2D(data, parent, options) { + return new HeatMap(data, parent, options); + } + static createHeatMapDimensions(data, parent, options) { + if (data.desc.type === 'matrix') { + return HeatMap.create2D(data, parent, options); + } + else if (data.desc.type === 'vector') { + return HeatMap1D.create1D(data, parent, options); + } + throw new Error('unknown data type: ' + data.desc.type); + } +} +//# sourceMappingURL=HeatMap.js.map \ No newline at end of file diff --git a/dist/heatmap/HeatMap1D.d.ts b/dist/heatmap/HeatMap1D.d.ts new file mode 100644 index 0000000..3a02877 --- /dev/null +++ b/dist/heatmap/HeatMap1D.d.ts @@ -0,0 +1,41 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import '../style.scss'; +import { Range } from 'phovea_core'; +import { AVisInstance, IVisInstance } from 'phovea_core'; +import { Rect } from 'phovea_core'; +import { INumericalVector, ICategoricalVector } from 'phovea_core'; +import { ICommonHeatMapOptions } from './ICommonHeatMapOptions'; +export interface IHeatMap1DOptions extends ICommonHeatMapOptions { + /** + * width + * @default 20 + */ + width?: number; + /** + * scale such that the height matches the argument + * @default null + */ + heightTo?: number; +} +export declare type IHeatMapAbleVector = INumericalVector | ICategoricalVector; +export declare class HeatMap1D extends AVisInstance implements IVisInstance { + readonly data: IHeatMapAbleVector; + parent: Element; + private readonly $node; + private readonly colorer; + private readonly options; + constructor(data: IHeatMapAbleVector, parent: Element, options?: IHeatMap1DOptions); + get rawSize(): [number, number]; + get node(): Element; + option(name: string, val?: any): any; + locateImpl(range: Range): Promise; + transform(scale?: [number, number], rotate?: number): { + scale: [number, number]; + rotate: number; + }; + private recolor; + private build; + static create1D(data: IHeatMapAbleVector, parent: HTMLElement, options?: IHeatMap1DOptions): AVisInstance; +} diff --git a/dist/heatmap/HeatMap1D.js b/dist/heatmap/HeatMap1D.js new file mode 100644 index 0000000..5f12b26 --- /dev/null +++ b/dist/heatmap/HeatMap1D.js @@ -0,0 +1,132 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import '../style.scss'; +import * as d3 from 'd3'; +import { AVisInstance, VisUtils } from 'phovea_core'; +import { Rect } from 'phovea_core'; +import { BaseUtils } from 'phovea_core'; +import { D3Utils } from 'phovea_d3'; +import { DefaultUtils } from './DefaultUtils'; +import { toScale } from './IScale'; +export class HeatMap1D extends AVisInstance { + constructor(data, parent, options = {}) { + super(); + this.data = data; + this.parent = parent; + this.options = { + initialScale: 10, + width: 20, + heightTo: null, + scale: [1, 1], + rotate: 0, + missingColor: '#d400c2' + }; + const value = this.data.valuetype; + BaseUtils.mixin(this.options, { + color: DefaultUtils.defaultColor(value), + domain: DefaultUtils.defaultDomain(value) + }, options); + this.options.scale = [1, this.options.initialScale]; + if (this.options.heightTo) { + this.options.scale[1] = this.options.heightTo / this.data.dim[0]; + } + this.colorer = toScale(value).domain(this.options.domain).range(this.options.color); + this.$node = this.build(d3.select(parent)); + this.$node.datum(data); + VisUtils.assignVis(this.node, this); + } + get rawSize() { + const d = this.data.dim; + return [this.options.width, d[0]]; + } + get node() { + return this.$node.node(); + } + option(name, val) { + if (arguments.length === 1) { + return this.options[name]; + } + else { + this.fire('option', name, val, this.options[name]); + this.fire('option.' + name, val, this.options[name]); + this.options[name] = val; + switch (name) { + case 'color': + case 'domain': + this.recolor(); + break; + } + } + } + locateImpl(range) { + const dims = this.data.dim; + const height = dims[0]; + function l(r, max, s) { + if (r.isAll || r.isNone) { + return [0, max * s]; + } + const ex = d3.extent(r.asList()); + return [ex[0] * s, (ex[1] - ex[0] + 1) * s]; + } + const yh = l(range.dim(0), height, this.options.scale[1]); + return Promise.resolve(Rect.rect(0, yh[0], 20, yh[1])); + } + transform(scale, rotate = 0) { + const bak = { + scale: this.options.scale || [1, 1], + rotate: this.options.rotate || 0 + }; + if (arguments.length === 0) { + return bak; + } + const dims = this.data.dim; + const width = this.options.width, height = dims[0]; + this.$node.attr({ + width: width * scale[0], + height: height * scale[1] + }).style('transform', 'rotate(' + rotate + 'deg)'); + this.$node.select('g').attr('transform', 'scale(' + scale[0] + ',' + scale[1] + ')'); + const act = { scale, rotate }; + this.fire('transform', act, bak); + this.options.scale = scale; + this.options.rotate = rotate; + return act; + } + recolor() { + const c = this.colorer; + c.domain(this.options.domain).range(this.options.color); + this.$node.selectAll('rect').attr('fill', (d) => DefaultUtils.isMissing(d) ? this.options.missingColor : c(d)); + } + build($parent) { + const dims = this.data.dim; + const width = this.options.width, height = dims[0]; + const $svg = $parent.append('svg').attr({ + width, + height: height * this.options.initialScale, + 'class': 'phovea-heatmap' + }); + const $g = $svg.append('g').attr('transform', 'scale(1,' + this.options.initialScale + ')'); + const c = this.colorer; + const t = this.data.data(); + t.then((arr) => { + const $rows = $g.selectAll('rect').data(arr); + const onClick = D3Utils.selectionUtil(this.data, $g, 'rect'); + $rows.enter().append('rect').on('click', onClick).attr({ + width: this.options.width, + height: 1 + }).append('title').text(String); + $rows.attr({ + fill: (d) => DefaultUtils.isMissing(d) ? this.options.missingColor : c(d), + y: (d, i) => i + }); + $rows.exit().remove(); + this.markReady(); + }); + return $svg; + } + static create1D(data, parent, options) { + return new HeatMap1D(data, parent, options); + } +} +//# sourceMappingURL=HeatMap1D.js.map \ No newline at end of file diff --git a/dist/heatmap/HeatMapCanvasRenderer.d.ts b/dist/heatmap/HeatMapCanvasRenderer.d.ts new file mode 100644 index 0000000..87d63b0 --- /dev/null +++ b/dist/heatmap/HeatMapCanvasRenderer.d.ts @@ -0,0 +1,20 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import * as d3 from 'd3'; +import { ICommonHeatMapOptions } from './ICommonHeatMapOptions'; +import { IScale } from './IScale'; +import { IHeatMapRenderer, ESelectOption } from './IHeatMapRenderer'; +import { AHeatMapCanvasRenderer } from './AHeatMapCanvasRenderer'; +import { IHeatMapAbleMatrix } from './HeatMap'; +export declare class HeatMapCanvasRenderer extends AHeatMapCanvasRenderer implements IHeatMapRenderer { + private imageData; + private ready; + constructor(selectAble: ESelectOption, options: ICommonHeatMapOptions); + rescale($node: d3.Selection, dim: number[], scale: number[]): void; + redraw($node: d3.Selection, scale: number[]): void; + recolor($node: d3.Selection, data: IHeatMapAbleMatrix, color: IScale, scale: number[]): void; + private genImage; + private redrawImpl; + build(data: IHeatMapAbleMatrix, $parent: d3.Selection, scale: [number, number], c: IScale, onReady: () => void): d3.Selection; +} diff --git a/dist/heatmap/HeatMapCanvasRenderer.js b/dist/heatmap/HeatMapCanvasRenderer.js new file mode 100644 index 0000000..060286a --- /dev/null +++ b/dist/heatmap/HeatMapCanvasRenderer.js @@ -0,0 +1,92 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import * as d3 from 'd3'; +import { DefaultUtils } from './DefaultUtils'; +import { ESelectOption } from './IHeatMapRenderer'; +import { AHeatMapCanvasRenderer } from './AHeatMapCanvasRenderer'; +export class HeatMapCanvasRenderer extends AHeatMapCanvasRenderer { + constructor(selectAble = ESelectOption.CELL, options) { + super(selectAble, options); + this.ready = false; + } + rescale($node, dim, scale) { + $node.selectAll('canvas').attr({ + width: dim[1] * scale[0], + height: dim[0] * scale[1] + }); + if (this.ready) { + this.redrawImpl(this.imageData, $node, scale); + } + super.rescale($node, dim, scale); + } + redraw($node, scale) { + if (this.ready) { + this.redrawImpl(this.imageData, $node, scale); + } + } + recolor($node, data, color, scale) { + const rgba = this.imageData.data; + if (this.ready) { + data.data().then((arr) => { + this.genImage(rgba, arr, data.ncol, color); + this.redrawImpl(this.imageData, $node, scale); + }); + } + } + genImage(rgba, arr, ncol, c) { + arr.forEach((row, j) => { + const t = j * ncol; + row.forEach((cell, i) => { + const color = d3.rgb(DefaultUtils.isMissing(cell) ? this.options.missingColor : c(cell)); + rgba[(t + i) * 4] = color.r; + rgba[(t + i) * 4 + 1] = color.g; + rgba[(t + i) * 4 + 2] = color.b; + rgba[(t + i) * 4 + 3] = 255; + }); + }); + } + redrawImpl(imageData, $root, scale) { + const context = $root.select('canvas').node().getContext('2d'); + context.msImageSmoothingEnabled = false; + //if (context.hasOwnProperty('imageSmoothingEnabled')) { + context.imageSmoothingEnabled = false; + //} + if (scale[0] === 1 && scale[1] === 1) { + //don't nee + context.putImageData(imageData, 0, 0); + } + else { + const tmp = $root.node().ownerDocument.createElement('canvas'); + tmp.width = imageData.width; + tmp.height = imageData.height; + const d = tmp.getContext('2d'); + d.putImageData(imageData, 0, 0); + context.save(); + context.scale(scale[0], scale[1]); + context.drawImage(tmp, 0, 0); + context.restore(); + d3.select(tmp).remove(); + } + } + build(data, $parent, scale, c, onReady) { + const dims = data.dim; + const width = dims[1], height = dims[0]; + const $root = $parent.append('div').attr('class', 'phovea-heatmap'); + const $canvas = $root.append('canvas').attr({ + width: width * scale[0], + height: height * scale[1], + 'class': 'phovea-heatmap-data' + }); + this.imageData = $canvas.node().getContext('2d').createImageData(width, height); //new (ImageData)(data.ncol, data.nrow); + const rgba = this.imageData.data; + data.data().then((arr) => { + this.ready = true; + this.genImage(rgba, arr, data.ncol, c); + onReady(); + }); + super.buildSelection(data, $root, scale); + return $root; + } +} +//# sourceMappingURL=HeatMapCanvasRenderer.js.map \ No newline at end of file diff --git a/dist/heatmap/HeatMapDOMRenderer.d.ts b/dist/heatmap/HeatMapDOMRenderer.d.ts new file mode 100644 index 0000000..e73d706 --- /dev/null +++ b/dist/heatmap/HeatMapDOMRenderer.d.ts @@ -0,0 +1,18 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import * as d3 from 'd3'; +import { ICommonHeatMapOptions } from './ICommonHeatMapOptions'; +import { IScale } from './IScale'; +import { IHeatMapRenderer, ESelectOption } from './IHeatMapRenderer'; +import { IHeatMapAbleMatrix } from './HeatMap'; +export declare class HeatMapDOMRenderer implements IHeatMapRenderer { + private readonly selectAble; + private readonly options; + private color; + constructor(selectAble: ESelectOption, options: ICommonHeatMapOptions); + rescale($node: d3.Selection, dim: number[], scale: number[]): void; + recolor($node: d3.Selection, data: IHeatMapAbleMatrix, color: IScale, scale: number[]): void; + redraw($node: d3.Selection, scale: number[]): void; + build(data: IHeatMapAbleMatrix, $parent: d3.Selection, scale: [number, number], c: IScale, onReady: () => void): d3.Selection; +} diff --git a/dist/heatmap/HeatMapDOMRenderer.js b/dist/heatmap/HeatMapDOMRenderer.js new file mode 100644 index 0000000..1b69a7d --- /dev/null +++ b/dist/heatmap/HeatMapDOMRenderer.js @@ -0,0 +1,89 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import * as d3 from 'd3'; +import { Range } from 'phovea_core'; +import { AppContext } from 'phovea_core'; +import { SelectionUtils } from 'phovea_core'; +import { DefaultUtils } from './DefaultUtils'; +import { ESelectOption } from './IHeatMapRenderer'; +export class HeatMapDOMRenderer { + constructor(selectAble = ESelectOption.CELL, options) { + this.selectAble = selectAble; + this.options = options; + } + rescale($node, dim, scale) { + $node.select('svg').attr({ + width: dim[1] * scale[0], + height: dim[0] * scale[1] + }); + $node.select('g').attr('transform', 'scale(' + scale[0] + ',' + scale[1] + ')'); + } + recolor($node, data, color, scale) { + this.color = color; + this.redraw($node, scale); + } + redraw($node, scale) { + $node.select('svg').selectAll('rect') + .attr('fill', (d) => DefaultUtils.isMissing(d) ? this.options.missingColor : this.color(d)) + .classed('missing', DefaultUtils.isMissing); + } + build(data, $parent, scale, c, onReady) { + const dims = data.dim, that = this; + const width = dims[1], height = dims[0]; + const $node = $parent.append('div').attr('class', 'phovea-heatmap ' + this.options.mode); + const $svg = $node.append('svg').attr({ + width: width * scale[0], + height: height * scale[1] + }); + const $g = $svg.append('g').attr('transform', 'scale(' + scale[0] + ',' + scale[1] + ')'); + this.color = c; + data.data().then((arr) => { + const $rows = $g.selectAll('g').data(arr); + $rows.enter().append('g').each(function (row, i) { + const $cols = d3.select(this).selectAll('rect').data(row); + const $colsEnter = $cols.enter().append('rect').attr({ + width: 1, + height: 1, + x: (d, j) => j, + y: i, + fill: (d) => DefaultUtils.isMissing(d) ? that.options.missingColor : c(d) + }); + $colsEnter.classed('missing', DefaultUtils.isMissing); + if (that.selectAble !== ESelectOption.NONE) { + $colsEnter.on('click', (d, j) => { + data.selectProduct([Range.cell(i, j)], SelectionUtils.toSelectOperation(d3.event)); + }); + } + $colsEnter.append('title').text(String); + }); + onReady(); + }); + const l = function (event, type, selected) { + $g.selectAll('rect').classed('phovea-select-' + type, false); + if (selected.length === 0) { + return; + } + selected.forEach((cell) => { + cell.product((indices) => { + const cell = $g.select(`rect[y="${indices[0]}"][x="${indices[1]}"]`).classed('phovea-select-' + type, true).node(); + // push parent to front + cell.parentElement.appendChild(cell); + // push parent to front + cell.parentElement.parentElement.appendChild(cell.parentElement); + }, data.dim); + }); + }; + if (this.selectAble !== ESelectOption.NONE) { + data.on('selectProduct', l); + AppContext.getInstance().onDOMNodeRemoved($g.node(), function () { + data.off('selectProduct', l); + }); + data.productSelections().then(function (selected) { + l(null, SelectionUtils.defaultSelectionType, selected); + }); + } + return $node; + } +} +//# sourceMappingURL=HeatMapDOMRenderer.js.map \ No newline at end of file diff --git a/dist/heatmap/HeatMapImageRenderer.d.ts b/dist/heatmap/HeatMapImageRenderer.d.ts new file mode 100644 index 0000000..921a99a --- /dev/null +++ b/dist/heatmap/HeatMapImageRenderer.d.ts @@ -0,0 +1,21 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import * as d3 from 'd3'; +import { ICommonHeatMapOptions } from './ICommonHeatMapOptions'; +import { IScale } from './IScale'; +import { IHeatMapRenderer, ESelectOption } from './IHeatMapRenderer'; +import { AHeatMapCanvasRenderer } from './AHeatMapCanvasRenderer'; +import { IHeatMapAbleMatrix } from './HeatMap'; +export declare class HeatMapImageRenderer extends AHeatMapCanvasRenderer implements IHeatMapRenderer { + private image; + private ready; + private color; + constructor(selectAble: ESelectOption, options: ICommonHeatMapOptions); + rescale($node: d3.Selection, dim: number[], scale: number[]): void; + redraw($node: d3.Selection, scale: number[]): void; + private redrawImpl; + recolor($node: d3.Selection, data: IHeatMapAbleMatrix, color: IScale, scale: number[]): void; + build(data: IHeatMapAbleMatrix, $parent: d3.Selection, scale: [number, number], c: IScale, onReady: () => void): d3.Selection; + static ensureHex(color: string): string; +} diff --git a/dist/heatmap/HeatMapImageRenderer.js b/dist/heatmap/HeatMapImageRenderer.js new file mode 100644 index 0000000..8de0dde --- /dev/null +++ b/dist/heatmap/HeatMapImageRenderer.js @@ -0,0 +1,135 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import * as d3 from 'd3'; +import { Range } from 'phovea_core'; +import { ESelectOption } from './IHeatMapRenderer'; +import { AHeatMapCanvasRenderer } from './AHeatMapCanvasRenderer'; +import { AppContext, Ajax } from 'phovea_core'; +import { ParseRangeUtils } from 'phovea_core'; +import { MatrixLoaderHelper } from 'phovea_core'; +export class HeatMapImageRenderer extends AHeatMapCanvasRenderer { + constructor(selectAble = ESelectOption.CELL, options) { + super(selectAble, options); + this.ready = false; + } + rescale($node, dim, scale) { + $node.selectAll('canvas').attr({ + width: dim[1] * scale[0], + height: dim[0] * scale[1] + }); + if (this.ready) { + this.redrawImpl($node, scale); + } + super.rescale($node, dim, scale); + } + redraw($node, scale) { + if (this.ready) { + this.redrawImpl($node, scale); + } + } + redrawImpl($root, scale) { + const canvas = $root.select('canvas').node(); + const ctx = canvas.getContext('2d'); + ctx.msImageSmoothingEnabled = false; + //if (context.hasOwnProperty('imageSmoothingEnabled')) { + ctx.imageSmoothingEnabled = false; + //} + if (scale[0] === 1 && scale[1] === 1) { + ctx.drawImage(this.image, 0, 0); + } + else { + ctx.save(); + ctx.scale(scale[0], scale[1]); + //console.log('draw with scale', scale, this.image.width, this.image.height); + ctx.drawImage(this.image, 0, 0); + ctx.restore(); + } + //apply color scale + /*if (false) { //FIXME + let imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); + let data = imageData.data; + var help = d3.scale.linear().domain([0,255]).range(this.color.domain()); + for (let i = 0; i < data.length; i += 4) { + //gray scale + let v = data[i]; + //to convert to domain value or use a different scale + var color = d3.rgb(this.color(help(v))); + data[i] = color.r; + data[i + 1] = color.g; + data[i + 2] = color.b; + data[i + 3] = 255; + } + ctx.putImageData(imageData, 0, 0); + }*/ + } + recolor($node, data, color, scale) { + //can't do that + this.color = color; + this.redrawImpl($node, scale); + } + build(data, $parent, scale, c, onReady) { + this.color = c; + const dims = data.dim; + const width = dims[1], height = dims[0]; + const $root = $parent.append('div').attr('class', 'phovea-heatmap'); + $root.append('canvas').attr({ + width: width * scale[0], + height: height * scale[1], + 'class': 'phovea-heatmap-data' + }); + this.image = new Image(); + this.image.onload = () => { + this.ready = true; + onReady(); + }; + const domain = c.domain(); + const args = { + range: [domain[0], domain[domain.length - 1]], + missing: HeatMapImageRenderer.ensureHex(this.options.missingColor) + }; + function arrEqual(a, b) { + if (a.length !== b.length) { + return false; + } + return a.every((ai, i) => ai === b[i]); + } + const colors = c.range(); + if (arrEqual(colors, ['black', 'white'])) { + //default scale + } + else if (arrEqual(colors, ['white', 'red'])) { + args.palette = 'white_red'; + } + else if (arrEqual(colors, ['blue', 'white', 'red'])) { + args.palette = 'blue_white_red'; + } + else if (colors.length === 2 || colors.length === 3) { + args.palette = colors.map(HeatMapImageRenderer.ensureHex).join('-'); + } + // persist to get range and create range object again + // TODO: make range property on matrix public + const range = ParseRangeUtils.parseRange(data.persist().range); + const params = MatrixLoaderHelper.prepareHeatmapUrlParameter(range, args); + const url = `/dataset/matrix/${data.desc.id}/data`; + const encoded = Ajax.encodeParams(params); + if (encoded && (url.length + encoded.length >= Ajax.MAX_URL_LENGTH)) { + // use post instead + AppContext.getInstance().sendAPI(url, params, 'POST', 'blob').then((image) => { + const imageURL = window.URL.createObjectURL(image); + this.image.src = imageURL; + }); + } + else { + this.image.src = data.heatmapUrl(Range.all(), args); + } + super.buildSelection(data, $root, scale); + return $root; + } + static ensureHex(color) { + const rgb = d3.rgb(color); + const toHex = (d) => ('00' + d.toString(16)).slice(-2); + return `#${toHex(rgb.r)}${toHex(rgb.g)}${toHex(rgb.b)}`; + } +} +//# sourceMappingURL=HeatMapImageRenderer.js.map \ No newline at end of file diff --git a/dist/heatmap/ICommonHeatMapOptions.d.ts b/dist/heatmap/ICommonHeatMapOptions.d.ts new file mode 100644 index 0000000..9f31669 --- /dev/null +++ b/dist/heatmap/ICommonHeatMapOptions.d.ts @@ -0,0 +1,24 @@ +import { IVisInstanceOptions } from 'phovea_core'; +export interface ICommonHeatMapOptions extends IVisInstanceOptions { + /** + * @default 10 + */ + initialScale?: number; + /** + * @default derived from value + */ + color?: string[]; + /** + * @default derived from value + */ + domain?: (number | string)[]; + /** + * missing value color + * @default magenta + */ + missingColor?: string; + /** + * defines the rendering mode, e.g. influencing how the selection is drawn + */ + mode?: 'lg' | 'sm'; +} diff --git a/dist/heatmap/ICommonHeatMapOptions.js b/dist/heatmap/ICommonHeatMapOptions.js new file mode 100644 index 0000000..6a714b1 --- /dev/null +++ b/dist/heatmap/ICommonHeatMapOptions.js @@ -0,0 +1 @@ +//# sourceMappingURL=ICommonHeatMapOptions.js.map \ No newline at end of file diff --git a/dist/heatmap/IHeatMapRenderer.d.ts b/dist/heatmap/IHeatMapRenderer.d.ts new file mode 100644 index 0000000..ac3d143 --- /dev/null +++ b/dist/heatmap/IHeatMapRenderer.d.ts @@ -0,0 +1,18 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +import * as d3 from 'd3'; +import { IScale } from './IScale'; +import { IHeatMapAbleMatrix } from './HeatMap'; +export declare enum ESelectOption { + CELL = 0, + ROW = 1, + COLUMN = 2, + NONE = 3 +} +export interface IHeatMapRenderer { + rescale($node: d3.Selection, dim: number[], scale: number[]): any; + redraw($node: d3.Selection, scale: number[]): any; + recolor($node: d3.Selection, data: IHeatMapAbleMatrix, color: IScale, scale: number[]): any; + build(data: IHeatMapAbleMatrix, $parent: d3.Selection, scale: [number, number], c: IScale, onReady: () => void): any; +} diff --git a/dist/heatmap/IHeatMapRenderer.js b/dist/heatmap/IHeatMapRenderer.js new file mode 100644 index 0000000..62e3ed7 --- /dev/null +++ b/dist/heatmap/IHeatMapRenderer.js @@ -0,0 +1,11 @@ +/** + * Created by Samuel Gratzl on 26.12.2016. + */ +export var ESelectOption; +(function (ESelectOption) { + ESelectOption[ESelectOption["CELL"] = 0] = "CELL"; + ESelectOption[ESelectOption["ROW"] = 1] = "ROW"; + ESelectOption[ESelectOption["COLUMN"] = 2] = "COLUMN"; + ESelectOption[ESelectOption["NONE"] = 3] = "NONE"; +})(ESelectOption || (ESelectOption = {})); +//# sourceMappingURL=IHeatMapRenderer.js.map \ No newline at end of file diff --git a/dist/heatmap/IScale.d.ts b/dist/heatmap/IScale.d.ts new file mode 100644 index 0000000..d05ecd5 --- /dev/null +++ b/dist/heatmap/IScale.d.ts @@ -0,0 +1,8 @@ +export interface IScale { + (x: any): any; + domain(): any[]; + domain(values: any[]): IScale; + range(): any[]; + range(values: any[]): IScale; +} +export declare function toScale(value: any): IScale; diff --git a/dist/heatmap/IScale.js b/dist/heatmap/IScale.js new file mode 100644 index 0000000..fbf54ed --- /dev/null +++ b/dist/heatmap/IScale.js @@ -0,0 +1,9 @@ +import * as d3 from 'd3'; +import { ValueTypeUtils } from 'phovea_core'; +export function toScale(value) { + if (value.type === ValueTypeUtils.VALUE_TYPE_CATEGORICAL) { + return d3.scale.ordinal(); + } + return d3.scale.linear(); +} +//# sourceMappingURL=IScale.js.map \ No newline at end of file diff --git a/dist/heatmap/index.d.ts b/dist/heatmap/index.d.ts new file mode 100644 index 0000000..5779ae3 --- /dev/null +++ b/dist/heatmap/index.d.ts @@ -0,0 +1,13 @@ +/** + * Created by Samuel Gratzl on 05.08.2014. + */ +export * from './DefaultUtils'; +export * from './HeatMap'; +export * from './HeatMap1D'; +export * from './IHeatMapRenderer'; +export * from './IScale'; +export * from './AHeatMapCanvasRenderer'; +export * from './HeatMapCanvasRenderer'; +export * from './HeatMapDOMRenderer'; +export * from './HeatMapImageRenderer'; +export * from './ICommonHeatMapOptions'; diff --git a/dist/heatmap/index.js b/dist/heatmap/index.js new file mode 100644 index 0000000..93287aa --- /dev/null +++ b/dist/heatmap/index.js @@ -0,0 +1,13 @@ +/** + * Created by Samuel Gratzl on 05.08.2014. + */ +export * from './DefaultUtils'; +export * from './HeatMap'; +export * from './HeatMap1D'; +export * from './IHeatMapRenderer'; +export * from './IScale'; +export * from './AHeatMapCanvasRenderer'; +export * from './HeatMapCanvasRenderer'; +export * from './HeatMapDOMRenderer'; +export * from './HeatMapImageRenderer'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..04deada --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,8 @@ +export * from './distribution'; +export * from './heatmap'; +export * from './list'; +export * from './axis'; +export * from './box'; +export * from './force_directed_graph'; +export * from './kaplanmeier'; +export * from './table'; diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..76290d5 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,9 @@ +export * from './distribution'; +export * from './heatmap'; +export * from './list'; +export * from './axis'; +export * from './box'; +export * from './force_directed_graph'; +export * from './kaplanmeier'; +export * from './table'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/kaplanmeier.d.ts b/dist/kaplanmeier.d.ts new file mode 100644 index 0000000..a9db560 --- /dev/null +++ b/dist/kaplanmeier.d.ts @@ -0,0 +1,40 @@ +/** + * Created by Samuel Gratzl on 01.10.2015. + */ +import './style.scss'; +import { Range } from 'phovea_core'; +import { AVisInstance, IVisInstance, IVisInstanceOptions } from 'phovea_core'; +import { INumericalVector } from 'phovea_core'; +export interface IKaplanMaierOptions extends IVisInstanceOptions { + /** + * @default 300 + */ + width?: number; + /** + * @default 300 + */ + height?: number; + /** + * maxtime in total given + * @param died the current one + * @default last one + */ + maxTime?(died: number[]): number | Promise; +} +export declare class KaplanMeierPlot extends AVisInstance implements IVisInstance { + readonly data: INumericalVector; + parent: Element; + private readonly $node; + private readonly options; + private readonly line; + constructor(data: INumericalVector, parent: Element, options?: IKaplanMaierOptions); + get rawSize(): [number, number]; + get node(): Element; + locateImpl(range: Range): Promise; + transform(scale?: [number, number], rotate?: number): { + scale: [number, number]; + rotate: number; + }; + private build; + static createKaplanMeierPlot(data: INumericalVector, parent: Element, options?: IKaplanMaierOptions): KaplanMeierPlot; +} diff --git a/dist/kaplanmeier.js b/dist/kaplanmeier.js new file mode 100644 index 0000000..dc619fb --- /dev/null +++ b/dist/kaplanmeier.js @@ -0,0 +1,102 @@ +/** + * Created by Samuel Gratzl on 01.10.2015. + */ +import './style.scss'; +import * as d3 from 'd3'; +import { AVisInstance, VisUtils } from 'phovea_core'; +import { BaseUtils } from 'phovea_core'; +export class KaplanMeierPlot extends AVisInstance { + constructor(data, parent, options = {}) { + super(); + this.data = data; + this.parent = parent; + this.options = { + scale: [1, 1], + rotate: 0, + width: 300, + height: 300, + maxTime: (died) => died[died.length - 1] + }; + this.line = d3.svg.line().interpolate('step'); + //var value = (this.data.desc).value; + BaseUtils.mixin(this.options, options); + this.$node = this.build(d3.select(parent)); + this.$node.datum(data); + VisUtils.assignVis(this.node, this); + } + get rawSize() { + return [this.options.width, this.options.height]; + } + get node() { + return this.$node.node(); + } + locateImpl(range) { + //TODO + return Promise.resolve(null); + } + transform(scale, rotate = 0) { + const bak = { + scale: this.options.scale || [1, 1], + rotate: this.options.rotate || 0 + }; + if (arguments.length === 0) { + return bak; + } + const width = this.options.width, height = this.options.height; + this.$node.attr({ + width: width * scale[0], + height: height * scale[1] + }).style('transform', 'rotate(' + rotate + 'deg)'); + this.$node.select('g').attr('transform', 'scale(' + scale[0] + ',' + scale[1] + ')'); + const act = { scale, rotate }; + this.fire('transform', act, bak); + this.options.scale = scale; + this.options.rotate = rotate; + return act; + } + build($parent) { + const width = this.options.width, height = this.options.height, scale = this.options.scale || [1, 1]; + const $svg = $parent.append('svg').attr({ + width: width * scale[0], + height: height * scale[1], + 'class': 'phovea-kaplanmeier' + }); + const $g = $svg.append('g'); + const xscale = d3.scale.linear().range([0, width]); + const yscale = d3.scale.linear().range([0, height]); + this.line + .x((d) => xscale(d[0])) + .y((d) => yscale(d[1])); + this.data.data().then((arr) => { + //TODO + const died = arr.filter((a) => !isNaN(a) && a !== null).map((a) => Math.abs(a)); + died.sort(d3.ascending); + //const alive = arr.length - died.length; + yscale.domain([0, arr.length]); + Promise.resolve(this.options.maxTime(died)).then((maxAxisTime) => { + xscale.domain([0, maxAxisTime]); + //0 ... 100% + const points = [[0, 0]]; + let prevI = 0; + for (let i = 1; i < died.length; ++i) { + while (died[i] === died[i - 1] && i < died.length) { + ++i; + } + points.push([died[prevI], prevI + 1]); + prevI = i; + } + if (died.length > 0) { + points.push([died[prevI], prevI + 1]); + } + points.push([maxAxisTime, died.length]); + $g.append('path').datum(points).attr('d', this.line); + this.markReady(); + }); + }); + return $svg; + } + static createKaplanMeierPlot(data, parent, options) { + return new KaplanMeierPlot(data, parent, options); + } +} +//# sourceMappingURL=kaplanmeier.js.map \ No newline at end of file diff --git a/dist/list/barplot.d.ts b/dist/list/barplot.d.ts new file mode 100644 index 0000000..c5c519b --- /dev/null +++ b/dist/list/barplot.d.ts @@ -0,0 +1,21 @@ +/** + * Created by Samuel Gratzl on 25.01.2016. + */ +/// +import '../style.scss'; +import { INumericalVector } from 'phovea_core'; +import { AList, IAListOptions } from './internal/AList'; +import { INumberValueTypeDesc } from 'phovea_core'; +export interface IBarPlotOptions extends IAListOptions { + min?: number; + max?: number; +} +export declare class BarPlot extends AList { + private readonly scale; + constructor(data: INumericalVector, parent: HTMLElement, options?: IBarPlotOptions); + private get maxBarWidth(); + private get domain(); + protected render($enter: d3.Selection, $update: d3.Selection): void; + protected build(): void; + static createBarPlot(data: INumericalVector, parent: HTMLElement, options: IBarPlotOptions): BarPlot; +} diff --git a/dist/list/barplot.js b/dist/list/barplot.js new file mode 100644 index 0000000..8551a26 --- /dev/null +++ b/dist/list/barplot.js @@ -0,0 +1,36 @@ +/** + * Created by Samuel Gratzl on 25.01.2016. + */ +import '../style.scss'; +import { scale } from 'd3'; +import { BaseUtils } from 'phovea_core'; +import { AList } from './internal/AList'; +export class BarPlot extends AList { + constructor(data, parent, options = {}) { + super(data, parent, BaseUtils.mixin({ cssClass: 'phovea-barplot', width: 100, min: NaN, max: NaN }, options)); + this.scale = scale.linear(); + this.build(); + } + get maxBarWidth() { + const scale = this.options.scale; + return scale[0] * this.options.width; + } + get domain() { + const r = this.data.valuetype.range; + return [!isNaN(this.options.min) ? this.options.min : r[0], !isNaN(this.options.max) ? this.options.max : r[1]]; + } + render($enter, $update) { + this.scale.range([0, this.maxBarWidth]); + const scale = this.options.scale; + $update.attr('title', (d) => String(d)); + $update.style('width', (d) => this.scale(d) + 'px'); + } + build() { + this.scale.domain(this.domain).range([0, this.maxBarWidth]); + return super.build(); + } + static createBarPlot(data, parent, options) { + return new BarPlot(data, parent, options); + } +} +//# sourceMappingURL=barplot.js.map \ No newline at end of file diff --git a/dist/list/index.d.ts b/dist/list/index.d.ts new file mode 100644 index 0000000..c13f1a7 --- /dev/null +++ b/dist/list/index.d.ts @@ -0,0 +1,4 @@ +export * from './internal/internal'; +export * from './barplot'; +export * from './list'; +export * from './proportionalSymbol'; diff --git a/dist/list/index.js b/dist/list/index.js new file mode 100644 index 0000000..cb98793 --- /dev/null +++ b/dist/list/index.js @@ -0,0 +1,5 @@ +export * from './internal/internal'; +export * from './barplot'; +export * from './list'; +export * from './proportionalSymbol'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/list/internal/AList.d.ts b/dist/list/internal/AList.d.ts new file mode 100644 index 0000000..f94973d --- /dev/null +++ b/dist/list/internal/AList.d.ts @@ -0,0 +1,32 @@ +/** + * Created by Samuel Gratzl on 25.01.2016. + */ +/// +import '../../style.scss'; +import { AVisInstance, IVisInstance, IVisInstanceOptions } from 'phovea_core'; +import { IVector } from 'phovea_core'; +import { Rect } from 'phovea_core'; +import { Range } from 'phovea_core'; +import { IValueTypeDesc } from 'phovea_core'; +export interface IAListOptions extends IVisInstanceOptions { + width?: number; + rowHeight?: number; + cssClass?: string; +} +export declare abstract class AList extends AVisInstance implements IVisInstance { + readonly data: IVector; + private readonly parent; + protected readonly options: O; + private readonly $node; + constructor(data: IVector, parent: HTMLElement, options: O); + get rawSize(): [number, number]; + get node(): HTMLElement; + locateImpl(range: Range): Promise; + transform(scale?: [number, number], rotate?: number): { + scale: [number, number]; + rotate: number; + }; + protected abstract render($enter: d3.Selection, $update: d3.Selection): any; + update(): void; + protected build(): void; +} diff --git a/dist/list/internal/AList.js b/dist/list/internal/AList.js new file mode 100644 index 0000000..faef9d2 --- /dev/null +++ b/dist/list/internal/AList.js @@ -0,0 +1,83 @@ +/** + * Created by Samuel Gratzl on 25.01.2016. + */ +import '../../style.scss'; +import { select, extent, selection } from 'd3'; +import { BaseUtils } from 'phovea_core'; +import { AVisInstance, VisUtils } from 'phovea_core'; +import { D3Utils } from 'phovea_d3'; +import { Rect } from 'phovea_core'; +const DEFAULT_OPTIONS = { + scale: [1, 1], + rotate: 0, + width: 200, + rowHeight: 20, + cssClass: '' +}; +export class AList extends AVisInstance { + constructor(data, parent, options) { + super(); + this.data = data; + this.parent = parent; + this.options = BaseUtils.mixin({}, DEFAULT_OPTIONS, options); + this.$node = select(parent).append('div').attr('class', 'phovea-list ' + this.options.cssClass); + this.$node.datum(this); + VisUtils.assignVis(this.node, this); + } + get rawSize() { + return [this.options.width, this.data.length * this.options.rowHeight]; + } + get node() { + return this.$node.node(); + } + locateImpl(range) { + const w = this.node.clientWidth; + const $node = select(this.node); + let a, b; + if (range.isAll || range.isNone) { + a = this.node.firstElementChild; + b = this.node.lastElementChild; + } + else { + const ex = extent(range.dim(0).iter().asList()); + a = this.node.childNodes.item(ex[0]); + b = this.node.childNodes.item(ex[1]); + } + return Promise.resolve(Rect.rect(0, a.offsetTop, w, b.offsetTop + b.clientHeight - a.offsetTop)); + } + transform(scale, rotate = 0) { + const bak = { + scale: this.options.scale || [1, 1], + rotate: this.options.rotate || 0 + }; + if (arguments.length === 0) { + return bak; + } + this.$node.style('transform', 'rotate(' + rotate + 'deg)'); + this.$node.style('width', `${scale[0] * this.options.width}px`); + this.$node.style('height', `${scale[1] * this.data.length * this.options.rowHeight}px`); + const act = { scale, rotate }; + this.fire('transform', act, bak); + this.options.scale = scale; + this.options.rotate = rotate; + this.update(); + return act; + } + update() { + this.render(selection(), this.$node.selectAll('div')); + } + build() { + const scale = this.options.scale; + this.$node.style('width', `${scale[0] * this.options.width}px`); + this.$node.style('height', `${scale[1] * this.data.length * this.options.rowHeight}px`); + const onClick = D3Utils.selectionUtil(this.data, this.$node, 'div'); + this.data.data().then((arr) => { + const $rows = this.$node.selectAll('div').data(arr); + const $rowsEnter = $rows.enter().append('div').on('click', onClick); + this.render($rowsEnter, $rows); + $rows.exit().remove(); + this.markReady(); + }); + } +} +//# sourceMappingURL=AList.js.map \ No newline at end of file diff --git a/dist/list/internal/internal.d.ts b/dist/list/internal/internal.d.ts new file mode 100644 index 0000000..8a86226 --- /dev/null +++ b/dist/list/internal/internal.d.ts @@ -0,0 +1 @@ +export * from './AList'; diff --git a/dist/list/internal/internal.js b/dist/list/internal/internal.js new file mode 100644 index 0000000..bf204ef --- /dev/null +++ b/dist/list/internal/internal.js @@ -0,0 +1,2 @@ +export * from './AList'; +//# sourceMappingURL=internal.js.map \ No newline at end of file diff --git a/dist/list/list.d.ts b/dist/list/list.d.ts new file mode 100644 index 0000000..fa885cd --- /dev/null +++ b/dist/list/list.d.ts @@ -0,0 +1,16 @@ +/** + * Created by Samuel Gratzl on 25.01.2016. + */ +/// +import '../style.scss'; +import { IAnyVector } from 'phovea_core'; +import { AList, IAListOptions } from './internal/AList'; +import { IValueTypeDesc } from 'phovea_core'; +export interface IListOptions extends IAListOptions { + format?: string; +} +export declare class List extends AList { + constructor(data: IAnyVector, parent: HTMLElement, options?: IListOptions); + protected render($enter: d3.Selection, $update: d3.Selection): void; + static createList(data: IAnyVector, parent: HTMLElement, options: IListOptions): List; +} diff --git a/dist/list/list.js b/dist/list/list.js new file mode 100644 index 0000000..6ea837e --- /dev/null +++ b/dist/list/list.js @@ -0,0 +1,23 @@ +/** + * Created by Samuel Gratzl on 25.01.2016. + */ +import '../style.scss'; +import { format } from 'd3'; +import { BaseUtils } from 'phovea_core'; +import { AList } from './internal/AList'; +export class List extends AList { + constructor(data, parent, options = {}) { + super(data, parent, BaseUtils.mixin({ format: null, rowHeight: 18 }, options)); + this.build(); + } + render($enter, $update) { + const formatter = this.options.format ? format(this.options.format) : String; + const factor = this.options.scale[1]; + $update.style('font-size', (factor >= 1 ? null : Math.round(factor * 100) + '%')); + $update.text(formatter); + } + static createList(data, parent, options) { + return new List(data, parent, options); + } +} +//# sourceMappingURL=list.js.map \ No newline at end of file diff --git a/dist/list/proportionalSymbol.d.ts b/dist/list/proportionalSymbol.d.ts new file mode 100644 index 0000000..ab899fc --- /dev/null +++ b/dist/list/proportionalSymbol.d.ts @@ -0,0 +1,21 @@ +/** + * Created by Samuel Gratzl on 25.01.2016. + */ +/// +import '../style.scss'; +import { INumericalVector } from 'phovea_core'; +import { AList, IAListOptions } from './internal/AList'; +import { INumberValueTypeDesc } from 'phovea_core'; +export interface IProportionalSymbolOptions extends IAListOptions { + min?: number; + max?: number; +} +export declare class ProportionalSymbol extends AList { + private readonly scale; + constructor(data: INumericalVector, parent: HTMLElement, options?: IProportionalSymbolOptions); + private get maxDiameter(); + private get domain(); + protected render($enter: d3.Selection, $update: d3.Selection): void; + protected build(): void; + static createProportionalSymbol(data: INumericalVector, parent: HTMLElement, options: IProportionalSymbolOptions): ProportionalSymbol; +} diff --git a/dist/list/proportionalSymbol.js b/dist/list/proportionalSymbol.js new file mode 100644 index 0000000..5441061 --- /dev/null +++ b/dist/list/proportionalSymbol.js @@ -0,0 +1,38 @@ +/** + * Created by Samuel Gratzl on 25.01.2016. + */ +import '../style.scss'; +import { scale } from 'd3'; +import { BaseUtils } from 'phovea_core'; +import { AList } from './internal/AList'; +export class ProportionalSymbol extends AList { + constructor(data, parent, options = {}) { + super(data, parent, BaseUtils.mixin({ cssClass: 'phovea-proportional-symbol', width: 20, min: NaN, max: NaN }, options)); + this.scale = scale.linear(); + this.build(); + } + get maxDiameter() { + const scale = this.options.scale; + const w = scale[0] * this.options.width; + const h = scale[1] * this.options.rowHeight; + return Math.min(w, h); + } + get domain() { + const r = this.data.valuetype.range; + return [!isNaN(this.options.min) ? this.options.min : r[0], !isNaN(this.options.max) ? this.options.max : r[1]]; + } + render($enter, $update) { + this.scale.range([0, this.maxDiameter]); + $update.attr('title', (d) => String(d)); + $update.style('width', (d) => this.scale(d) + 'px'); + $update.style('height', (d) => this.scale(d) + 'px'); + } + build() { + this.scale.domain(this.domain).range([0, this.maxDiameter]); + return super.build(); + } + static createProportionalSymbol(data, parent, options) { + return new ProportionalSymbol(data, parent, options); + } +} +//# sourceMappingURL=proportionalSymbol.js.map \ No newline at end of file diff --git a/dist/table.d.ts b/dist/table.d.ts new file mode 100644 index 0000000..1a31ebc --- /dev/null +++ b/dist/table.d.ts @@ -0,0 +1,26 @@ +/** + * Created by Samuel Gratzl on 05.08.2014. + */ +import './style.scss'; +import { Range } from 'phovea_core'; +import { AVisInstance, IVisInstance, IVisInstanceOptions } from 'phovea_core'; +import { Rect } from 'phovea_core'; +import { IAnyMatrix } from 'phovea_core'; +import { ITable } from 'phovea_core'; +import { IAnyVector } from 'phovea_core'; +export declare type ITableOptions = IVisInstanceOptions; +export declare class Table extends AVisInstance implements IVisInstance { + readonly data: IAnyMatrix | ITable | IAnyVector; + private readonly $node; + private readonly options; + constructor(data: IAnyMatrix | ITable | IAnyVector, parent: Element, options?: ITableOptions); + get rawSize(): [number, number]; + get node(): Element; + locateImpl(range: Range): Promise; + transform(scale?: [number, number], rotate?: number): { + scale: [number, number]; + rotate: number; + }; + private build; + static createTable(data: IAnyMatrix | ITable | IAnyVector, parent: Element, options?: ITableOptions): Table; +} diff --git a/dist/table.js b/dist/table.js new file mode 100644 index 0000000..0ad36ae --- /dev/null +++ b/dist/table.js @@ -0,0 +1,108 @@ +/** + * Created by Samuel Gratzl on 05.08.2014. + */ +import './style.scss'; +import * as d3 from 'd3'; +import { AVisInstance, VisUtils } from 'phovea_core'; +import { Rect } from 'phovea_core'; +import { D3Utils } from 'phovea_d3'; +import { BaseUtils } from 'phovea_core'; +export class Table extends AVisInstance { + constructor(data, parent, options = {}) { + super(); + this.data = data; + this.options = { + scale: [1, 1], + rotate: 0 + }; + BaseUtils.mixin(this.options, options); + const $p = d3.select(parent); + switch (data.desc.type) { //depending on the type of the data, create a different table + case 'matrix': + const dmatrix = data; + this.$node = this.build($p, [dmatrix.cols(), dmatrix.rows(), dmatrix.data()]); + break; + case 'table': + const dtable = data; + this.$node = this.build($p, [dtable.cols().map((v) => v.desc.name), dtable.rows(), this.data.data()]); + break; + case 'vector': + const dvector = data; + this.$node = this.build($p, [ + [dvector.desc.name], + dvector.names(), + dvector.data().then((data) => data.map((d) => [d])) + ]); + break; + } + this.$node.datum(data); + VisUtils.assignVis(this.node, this); + } + get rawSize() { + const dim = this.data.dim; + return [(dim[1] || 1) * 200, dim[0] * 22]; + } + get node() { + return this.$node.node(); + } + locateImpl(range) { + const $tbody = d3.select(this.node).select('tbody'); + const offset = $tbody.node().offsetTop, w = $tbody.node().clientWidth; + let a, b; + if (range.isAll || range.isNone) { + b = $tbody.select('tr:last').node(); + return Promise.resolve(Rect.rect(0, offset, w, b.offsetTop + b.clientHeight)); + } + const ex = d3.extent(range.dim(0).iter().asList()); + a = $tbody.select('tr:nth-child(' + (ex[0] + 1) + ')').node(); + b = $tbody.select('tr:nth-child(' + (ex[1] + 1) + ')').node(); + return Promise.resolve(Rect.rect(0, a.offsetTop, w, b.offsetTop + b.clientHeight - a.offsetTop)); + } + transform(scale, rotate = 0) { + const bak = { + scale: this.options.scale || [1, 1], + rotate: this.options.rotate || 0 + }; + if (arguments.length === 0) { + return bak; + } + this.$node.style('transform', 'rotate(' + rotate + 'deg)scale(' + scale[0] + ',' + scale[1] + ')'); + const act = { scale, rotate }; + this.fire('transform', act, bak); + this.options.scale = scale; + this.options.rotate = rotate; + return act; + } + build($parent, promises) { + const $table = $parent.append('table').attr('class', 'phovea-table'); + $table.append('thead').append('tr'); + $table.append('tbody'); + const onClick = D3Utils.selectionUtil(this.data, $table.select('tbody'), 'tr'); + Promise.all(promises).then((arr) => { + const cols = arr[0], rows = arr[1], d = arr[2]; + const $headers = $table.select('thead tr').selectAll('th').data(['ID'].concat(cols)); + $headers.enter().append('th'); + $headers.text(String); + $headers.exit().remove(); + const $rows = $table.select('tbody').selectAll('tr').data(d); + $rows.enter().append('tr').on('click', onClick); + $rows.each(function (row, i) { + const $header = d3.select(this).selectAll('th').data(rows.slice(i, i + 1)); + $header.enter().append('th'); + $header.text(String); + $header.exit().remove(); + const $row = d3.select(this).selectAll('td').data(row); + $row.enter().append('td'); + $row.text(String); + $row.exit().remove(); + }); + $rows.exit().remove(); + this.markReady(); + }); + return $table; + } + static createTable(data, parent, options) { + return new Table(data, parent, options); + } +} +//# sourceMappingURL=table.js.map \ No newline at end of file diff --git a/src/axis.ts b/src/axis.ts index 5b157d1..db0003c 100644 --- a/src/axis.ts +++ b/src/axis.ts @@ -5,7 +5,7 @@ import './style.scss'; import * as d3 from 'd3'; import {BaseUtils} from 'phovea_core'; -import {AVisInstance, IVisInstance, assignVis, ITransform, IVisInstanceOptions} from 'phovea_core'; +import {AVisInstance, IVisInstance, VisUtils, ITransform, IVisInstanceOptions} from 'phovea_core'; import {D3Utils} from 'phovea_d3'; import {INumericalVector} from 'phovea_core'; import {Range} from 'phovea_core'; @@ -54,7 +54,7 @@ export class Axis extends AVisInstance implements IVisInstance { this.$node = this.build(d3.select(parent)); this.$node.datum(this); - assignVis(this.node, this); + VisUtils.assignVis(this.node, this); } get rawSize(): [number, number] { diff --git a/src/heatmap/HeatMap.ts b/src/heatmap/HeatMap.ts index f2ee864..044bdde 100644 --- a/src/heatmap/HeatMap.ts +++ b/src/heatmap/HeatMap.ts @@ -5,7 +5,7 @@ import '../style.scss'; import * as d3 from 'd3'; -import Range from 'phovea_core'; +import {Range} from 'phovea_core'; import {AVisInstance, IVisInstance, VisUtils} from 'phovea_core'; import {Rect} from 'phovea_core'; import {BaseUtils, AppContext} from 'phovea_core'; From 9fa9408da24a642a254bb313f7ce9b94242cec53 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 26 May 2020 14:30:53 +0200 Subject: [PATCH 46/67] improve refactoring --- dist/{ => base}/axis.d.ts | 0 dist/{ => base}/axis.js | 0 dist/{ => base}/box.d.ts | 0 dist/{ => base}/box.js | 0 dist/{ => base}/force_directed_graph.d.ts | 0 dist/{ => base}/force_directed_graph.js | 0 dist/base/index.d.ts | 5 +++++ dist/base/index.js | 6 ++++++ dist/{ => base}/kaplanmeier.d.ts | 0 dist/{ => base}/kaplanmeier.js | 0 dist/{ => base}/table.d.ts | 0 dist/{ => base}/table.js | 0 dist/index.d.ts | 6 +----- dist/index.js | 6 +----- src/{ => base}/axis.ts | 0 src/{ => base}/box.ts | 0 src/{ => base}/force_directed_graph.ts | 0 src/base/index.ts | 5 +++++ src/{ => base}/kaplanmeier.ts | 0 src/{ => base}/table.ts | 0 src/index.ts | 7 +------ src/{ => scss}/style.scss | 0 tests/axis.test.ts | 2 +- tests/table.test.ts | 2 +- 24 files changed, 21 insertions(+), 18 deletions(-) rename dist/{ => base}/axis.d.ts (100%) rename dist/{ => base}/axis.js (100%) rename dist/{ => base}/box.d.ts (100%) rename dist/{ => base}/box.js (100%) rename dist/{ => base}/force_directed_graph.d.ts (100%) rename dist/{ => base}/force_directed_graph.js (100%) create mode 100644 dist/base/index.d.ts create mode 100644 dist/base/index.js rename dist/{ => base}/kaplanmeier.d.ts (100%) rename dist/{ => base}/kaplanmeier.js (100%) rename dist/{ => base}/table.d.ts (100%) rename dist/{ => base}/table.js (100%) rename src/{ => base}/axis.ts (100%) rename src/{ => base}/box.ts (100%) rename src/{ => base}/force_directed_graph.ts (100%) create mode 100644 src/base/index.ts rename src/{ => base}/kaplanmeier.ts (100%) rename src/{ => base}/table.ts (100%) rename src/{ => scss}/style.scss (100%) diff --git a/dist/axis.d.ts b/dist/base/axis.d.ts similarity index 100% rename from dist/axis.d.ts rename to dist/base/axis.d.ts diff --git a/dist/axis.js b/dist/base/axis.js similarity index 100% rename from dist/axis.js rename to dist/base/axis.js diff --git a/dist/box.d.ts b/dist/base/box.d.ts similarity index 100% rename from dist/box.d.ts rename to dist/base/box.d.ts diff --git a/dist/box.js b/dist/base/box.js similarity index 100% rename from dist/box.js rename to dist/base/box.js diff --git a/dist/force_directed_graph.d.ts b/dist/base/force_directed_graph.d.ts similarity index 100% rename from dist/force_directed_graph.d.ts rename to dist/base/force_directed_graph.d.ts diff --git a/dist/force_directed_graph.js b/dist/base/force_directed_graph.js similarity index 100% rename from dist/force_directed_graph.js rename to dist/base/force_directed_graph.js diff --git a/dist/base/index.d.ts b/dist/base/index.d.ts new file mode 100644 index 0000000..d8ee7c6 --- /dev/null +++ b/dist/base/index.d.ts @@ -0,0 +1,5 @@ +export * from './axis'; +export * from './box'; +export * from './force_directed_graph'; +export * from './kaplanmeier'; +export * from './table'; diff --git a/dist/base/index.js b/dist/base/index.js new file mode 100644 index 0000000..686c6a4 --- /dev/null +++ b/dist/base/index.js @@ -0,0 +1,6 @@ +export * from './axis'; +export * from './box'; +export * from './force_directed_graph'; +export * from './kaplanmeier'; +export * from './table'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/kaplanmeier.d.ts b/dist/base/kaplanmeier.d.ts similarity index 100% rename from dist/kaplanmeier.d.ts rename to dist/base/kaplanmeier.d.ts diff --git a/dist/kaplanmeier.js b/dist/base/kaplanmeier.js similarity index 100% rename from dist/kaplanmeier.js rename to dist/base/kaplanmeier.js diff --git a/dist/table.d.ts b/dist/base/table.d.ts similarity index 100% rename from dist/table.d.ts rename to dist/base/table.d.ts diff --git a/dist/table.js b/dist/base/table.js similarity index 100% rename from dist/table.js rename to dist/base/table.js diff --git a/dist/index.d.ts b/dist/index.d.ts index 04deada..c30dc9e 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -1,8 +1,4 @@ export * from './distribution'; export * from './heatmap'; export * from './list'; -export * from './axis'; -export * from './box'; -export * from './force_directed_graph'; -export * from './kaplanmeier'; -export * from './table'; +export * from './base'; diff --git a/dist/index.js b/dist/index.js index 76290d5..ec14bfd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,9 +1,5 @@ export * from './distribution'; export * from './heatmap'; export * from './list'; -export * from './axis'; -export * from './box'; -export * from './force_directed_graph'; -export * from './kaplanmeier'; -export * from './table'; +export * from './base'; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/src/axis.ts b/src/base/axis.ts similarity index 100% rename from src/axis.ts rename to src/base/axis.ts diff --git a/src/box.ts b/src/base/box.ts similarity index 100% rename from src/box.ts rename to src/base/box.ts diff --git a/src/force_directed_graph.ts b/src/base/force_directed_graph.ts similarity index 100% rename from src/force_directed_graph.ts rename to src/base/force_directed_graph.ts diff --git a/src/base/index.ts b/src/base/index.ts new file mode 100644 index 0000000..d8ee7c6 --- /dev/null +++ b/src/base/index.ts @@ -0,0 +1,5 @@ +export * from './axis'; +export * from './box'; +export * from './force_directed_graph'; +export * from './kaplanmeier'; +export * from './table'; diff --git a/src/kaplanmeier.ts b/src/base/kaplanmeier.ts similarity index 100% rename from src/kaplanmeier.ts rename to src/base/kaplanmeier.ts diff --git a/src/table.ts b/src/base/table.ts similarity index 100% rename from src/table.ts rename to src/base/table.ts diff --git a/src/index.ts b/src/index.ts index 31ec531..c30dc9e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,4 @@ export * from './distribution'; export * from './heatmap'; export * from './list'; - -export * from './axis'; -export * from './box'; -export * from './force_directed_graph'; -export * from './kaplanmeier'; -export * from './table'; +export * from './base'; diff --git a/src/style.scss b/src/scss/style.scss similarity index 100% rename from src/style.scss rename to src/scss/style.scss diff --git a/tests/axis.test.ts b/tests/axis.test.ts index 1b492dd..9183570 100644 --- a/tests/axis.test.ts +++ b/tests/axis.test.ts @@ -1,5 +1,5 @@ /// -import {Axis} from '../src/axis'; +import {Axis} from '../src/base/axis'; describe('create', () => { it('is method', () => { diff --git a/tests/table.test.ts b/tests/table.test.ts index 410800a..d77cab6 100644 --- a/tests/table.test.ts +++ b/tests/table.test.ts @@ -1,5 +1,5 @@ /// -import {Table} from '../src/table'; +import {Table} from '../src/base/table'; import {Matrix} from 'phovea_core'; import {RangeElem} from 'phovea_core'; From caa7d9ed8feae4085434604e649622ef19312ae2 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 27 May 2020 07:14:55 +0200 Subject: [PATCH 47/67] remove remaining export function statement --- dist/heatmap/HeatMap.js | 4 ++-- dist/heatmap/HeatMap1D.js | 4 ++-- dist/heatmap/IScale.d.ts | 4 +++- dist/heatmap/IScale.js | 10 ++++++---- src/heatmap/HeatMap.ts | 4 ++-- src/heatmap/HeatMap1D.ts | 4 ++-- src/heatmap/IScale.ts | 10 ++++++---- tests/heatmap.test.ts | 10 +++++----- 8 files changed, 28 insertions(+), 22 deletions(-) diff --git a/dist/heatmap/HeatMap.js b/dist/heatmap/HeatMap.js index 2d59948..b079314 100644 --- a/dist/heatmap/HeatMap.js +++ b/dist/heatmap/HeatMap.js @@ -9,7 +9,7 @@ import { BaseUtils, AppContext } from 'phovea_core'; import { SelectionUtils } from 'phovea_core'; import { AMatrix } from 'phovea_core'; import { DefaultUtils } from './DefaultUtils'; -import { toScale } from './IScale'; +import { ScaleUtils } from './IScale'; import { ESelectOption } from './IHeatMapRenderer'; import { HeatMapDOMRenderer } from './HeatMapDOMRenderer'; import { HeatMapImageRenderer } from './HeatMapImageRenderer'; @@ -46,7 +46,7 @@ export class HeatMap extends AVisInstance { this.options.scale = this.options.scaleTo.map((d, i) => d / raw[i]); } this.options.rotate = 0; - this.colorer = toScale(value).domain(this.options.domain).range(this.options.color); + this.colorer = ScaleUtils.toScale(value).domain(this.options.domain).range(this.options.color); // handle string case this.options.labels = typeof this.options.labels === 'string' ? ESelectOption[this.options.labels] : this.options.labels; const selection = typeof this.options.selectAble === 'boolean' ? (this.options.selectAble ? ESelectOption.CELL : ESelectOption.NONE) : ESelectOption[this.options.selectAble]; diff --git a/dist/heatmap/HeatMap1D.js b/dist/heatmap/HeatMap1D.js index 5f12b26..f3e536f 100644 --- a/dist/heatmap/HeatMap1D.js +++ b/dist/heatmap/HeatMap1D.js @@ -8,7 +8,7 @@ import { Rect } from 'phovea_core'; import { BaseUtils } from 'phovea_core'; import { D3Utils } from 'phovea_d3'; import { DefaultUtils } from './DefaultUtils'; -import { toScale } from './IScale'; +import { ScaleUtils } from './IScale'; export class HeatMap1D extends AVisInstance { constructor(data, parent, options = {}) { super(); @@ -31,7 +31,7 @@ export class HeatMap1D extends AVisInstance { if (this.options.heightTo) { this.options.scale[1] = this.options.heightTo / this.data.dim[0]; } - this.colorer = toScale(value).domain(this.options.domain).range(this.options.color); + this.colorer = ScaleUtils.toScale(value).domain(this.options.domain).range(this.options.color); this.$node = this.build(d3.select(parent)); this.$node.datum(data); VisUtils.assignVis(this.node, this); diff --git a/dist/heatmap/IScale.d.ts b/dist/heatmap/IScale.d.ts index d05ecd5..5cb9073 100644 --- a/dist/heatmap/IScale.d.ts +++ b/dist/heatmap/IScale.d.ts @@ -5,4 +5,6 @@ export interface IScale { range(): any[]; range(values: any[]): IScale; } -export declare function toScale(value: any): IScale; +export declare class ScaleUtils { + static toScale(value: any): IScale; +} diff --git a/dist/heatmap/IScale.js b/dist/heatmap/IScale.js index fbf54ed..78e24ce 100644 --- a/dist/heatmap/IScale.js +++ b/dist/heatmap/IScale.js @@ -1,9 +1,11 @@ import * as d3 from 'd3'; import { ValueTypeUtils } from 'phovea_core'; -export function toScale(value) { - if (value.type === ValueTypeUtils.VALUE_TYPE_CATEGORICAL) { - return d3.scale.ordinal(); +export class ScaleUtils { + static toScale(value) { + if (value.type === ValueTypeUtils.VALUE_TYPE_CATEGORICAL) { + return d3.scale.ordinal(); + } + return d3.scale.linear(); } - return d3.scale.linear(); } //# sourceMappingURL=IScale.js.map \ No newline at end of file diff --git a/src/heatmap/HeatMap.ts b/src/heatmap/HeatMap.ts index 044bdde..0465de6 100644 --- a/src/heatmap/HeatMap.ts +++ b/src/heatmap/HeatMap.ts @@ -13,7 +13,7 @@ import {SelectionUtils} from 'phovea_core'; import {INumericalMatrix, ICategoricalMatrix, AMatrix} from 'phovea_core'; import {DefaultUtils} from './DefaultUtils'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; -import {toScale, IScale} from './IScale'; +import {ScaleUtils, IScale} from './IScale'; import {IHeatMapRenderer, ESelectOption} from './IHeatMapRenderer'; import {HeatMapDOMRenderer} from './HeatMapDOMRenderer'; import {HeatMapImageRenderer} from './HeatMapImageRenderer'; @@ -83,7 +83,7 @@ export class HeatMap extends AVisInstance implements IVisInstance { this.options.scale = <[number, number]>this.options.scaleTo.map((d, i) => d / raw[i]); } this.options.rotate = 0; - this.colorer = toScale(value).domain(this.options.domain).range(this.options.color); + this.colorer = ScaleUtils.toScale(value).domain(this.options.domain).range(this.options.color); // handle string case this.options.labels = typeof this.options.labels === 'string' ? ESelectOption[this.options.labels]: this.options.labels; diff --git a/src/heatmap/HeatMap1D.ts b/src/heatmap/HeatMap1D.ts index 9eb93f4..ba4f024 100644 --- a/src/heatmap/HeatMap1D.ts +++ b/src/heatmap/HeatMap1D.ts @@ -12,7 +12,7 @@ import {D3Utils} from 'phovea_d3'; import {INumericalVector, ICategoricalVector} from 'phovea_core'; import {DefaultUtils} from './DefaultUtils'; import {ICommonHeatMapOptions} from './ICommonHeatMapOptions'; -import {toScale, IScale} from './IScale'; +import {ScaleUtils, IScale} from './IScale'; export interface IHeatMap1DOptions extends ICommonHeatMapOptions { /** @@ -53,7 +53,7 @@ export class HeatMap1D extends AVisInstance implements IVisInstance { if (this.options.heightTo) { this.options.scale[1] = this.options.heightTo / this.data.dim[0]; } - this.colorer = toScale(value).domain(this.options.domain).range(this.options.color); + this.colorer = ScaleUtils.toScale(value).domain(this.options.domain).range(this.options.color); this.$node = this.build(d3.select(parent)); this.$node.datum(data); VisUtils.assignVis(this.node, this); diff --git a/src/heatmap/IScale.ts b/src/heatmap/IScale.ts index 41f2a54..899f19f 100644 --- a/src/heatmap/IScale.ts +++ b/src/heatmap/IScale.ts @@ -10,9 +10,11 @@ export interface IScale { range(values: any[]): IScale; } -export function toScale(value): IScale { - if (value.type === ValueTypeUtils.VALUE_TYPE_CATEGORICAL) { - return d3.scale.ordinal(); +export class ScaleUtils { + static toScale(value): IScale { + if (value.type === ValueTypeUtils.VALUE_TYPE_CATEGORICAL) { + return d3.scale.ordinal(); + } + return d3.scale.linear(); } - return d3.scale.linear(); } diff --git a/tests/heatmap.test.ts b/tests/heatmap.test.ts index 01c33a2..6a27622 100644 --- a/tests/heatmap.test.ts +++ b/tests/heatmap.test.ts @@ -1,6 +1,6 @@ /// import {DefaultUtils} from '../src/heatmap/DefaultUtils'; -import {toScale} from '../src/heatmap/IScale'; +import {ScaleUtils} from '../src/heatmap/IScale'; import {INumberValueTypeDesc} from 'phovea_core'; describe('toScale', () => { @@ -11,7 +11,7 @@ describe('toScale', () => { }; const domain = DefaultUtils.defaultDomain(value); const range = DefaultUtils.defaultColor(value); - const scale = toScale(value).domain(domain).range(range); + const scale = ScaleUtils.toScale(value).domain(domain).range(range); expect(scale(-1)).toEqual('#0000ff'); expect(scale(0)).toEqual('#ffffff'); expect(scale(1)).toEqual('#ff0000'); @@ -23,7 +23,7 @@ describe('toScale', () => { }; const domain = DefaultUtils.defaultDomain(value); const range = DefaultUtils.defaultColor(value); - const scale = toScale(value).domain(domain).range(range); + const scale = ScaleUtils.toScale(value).domain(domain).range(range); expect(scale(-0.1)).toEqual('#fcfcff'); expect(scale(0)).toEqual('#ffffff'); expect(scale(5)).toEqual('#ff8080'); @@ -36,7 +36,7 @@ describe('toScale', () => { }; const domain = DefaultUtils.defaultDomain(value); const range = DefaultUtils.defaultColor(value); - const scale = toScale(value).domain(domain).range(range); + const scale = ScaleUtils.toScale(value).domain(domain).range(range); expect(scale(0)).toEqual('#ffffff'); expect(scale(0.5)).toEqual('#ff8080'); // interpolation expect(scale(1)).toEqual('#ff0000'); @@ -48,7 +48,7 @@ describe('toScale', () => { }; const domain = DefaultUtils.defaultDomain(value); const range = DefaultUtils.defaultColor(value); - const scale = toScale(value).domain(domain).range(range); + const scale = ScaleUtils.toScale(value).domain(domain).range(range); expect(scale(-1)).toEqual('#ffffff'); // TODO: Should be #0000ff? expect(scale(0)).toEqual('#ff0000'); // TODO: Should be #ffffff? }); From 37732215beb55b7f907c466e7a6eb45a6a4404c0 Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Wed, 27 May 2020 11:28:18 +0200 Subject: [PATCH 48/67] change table test --- dist/assets/axis_icon.png | Bin 0 -> 649 bytes dist/assets/axis_icon.svg | 73 ++++ dist/assets/barplot_icon.png | Bin 0 -> 283 bytes dist/assets/box_icon.png | Bin 0 -> 944 bytes dist/assets/distribution_histogram_icon.png | Bin 0 -> 1049 bytes dist/assets/distribution_mosaic_icon.png | Bin 0 -> 1097 bytes dist/assets/distribution_pie_icon.png | Bin 0 -> 1993 bytes dist/assets/force_directed_graph.svg | 44 +++ dist/assets/heatmap_icon.png | Bin 0 -> 1705 bytes dist/assets/heatmap_icon.svg | 375 ++++++++++++++++++++ dist/assets/kaplanmeier_icon.png | Bin 0 -> 635 bytes dist/assets/kaplanmeier_icon.svg | 146 ++++++++ dist/scss/style.scss | 180 ++++++++++ package.json | 3 +- tests/table.test.ts | 6 +- 15 files changed, 822 insertions(+), 5 deletions(-) create mode 100644 dist/assets/axis_icon.png create mode 100644 dist/assets/axis_icon.svg create mode 100644 dist/assets/barplot_icon.png create mode 100644 dist/assets/box_icon.png create mode 100644 dist/assets/distribution_histogram_icon.png create mode 100644 dist/assets/distribution_mosaic_icon.png create mode 100644 dist/assets/distribution_pie_icon.png create mode 100644 dist/assets/force_directed_graph.svg create mode 100644 dist/assets/heatmap_icon.png create mode 100644 dist/assets/heatmap_icon.svg create mode 100644 dist/assets/kaplanmeier_icon.png create mode 100644 dist/assets/kaplanmeier_icon.svg create mode 100644 dist/scss/style.scss diff --git a/dist/assets/axis_icon.png b/dist/assets/axis_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..9d5332ddf2c53f8a0582d5d2070328f3dc10fb29 GIT binary patch literal 649 zcmV;40(Sk0P)yp1pYOdT7OHE!adVi6CCm=RvJe%%rg93-9oD z-h98jee<1BBEle%?oO0aXMyVpIUkEi{U{TWqW~rVNf;A3poFysMn zGLECmjmFjpK)GCdH9mf41NaDLf#b|z52*Ag+1Hv8(+rFP0AWZOD6Fkry4`N?-U7(y ztM{j;U))Ql`7$%ZUeXTQK(>R@RJuhYR@U%z(q;9%zlK%p@9Xlm-o!&Hj> z*;(Ei3HlkO%jE&T-5MNs-;h!LKVaYjNsnnmYfdG)D#DNrpxS6`d9Btv55Tt1Y?sTm zZQ#A{b7 + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/dist/assets/barplot_icon.png b/dist/assets/barplot_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..8743d5323deb224788c5e7396725f8f57a85e672 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzwj^(N7l!{JxM1({$v_d#0*}aI z1_rJ-Ak28-{AyL8AbW|YuPggKMm{cPuKxzx%7H>FJY5_^A`ZWuZq0XCfx&tH?x!MW zc1j0bFW}?5zH|AD7djqGN_t5DTK2fs=hTr5Yf}^dt(D>j Zc>Yd2&!N(qnE`Y&gQu&X%Q~loCIGUVZYBT# literal 0 HcmV?d00001 diff --git a/dist/assets/box_icon.png b/dist/assets/box_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..b74d2109624f5173a31a549f3e1ba2d5578492a6 GIT binary patch literal 944 zcmV;h15f;kP)3Mk;v|lfsA=965D9@q7qF`YRQV&=bcI;+=OD3Umkm3XY$_fS z4=I9DK!8+NO_Sghr>*Nawy)1Q!@^dRhFkEi3;aoUbMMTV?|k2!ITt3FV1oZUr0nIj zoxQYkcxU0!NoVuK$2YvimoZBO^MIMzww2_m$W1^DNf7ag=-t^we_oiKxj(bE_2`=$ zR|Xezk}?AI{k>`H_P5eBd%IRiZm8;2z?p?-;_RQhxeg%W078uM_Q3m{MyLO^?C<>w zw8kQE)ND^-VRdg=q6bk@ zs>p|*t`Nh!D{D*dTzzF@d#+l2t=S2#(JBbhs3c0}ghYk!-hYYhojp<~)F1Y7Dy-Bp zF3q^`q}~4Qc76Y5Mtz1O&?b~4_KGz>5V8_fYL@ytwyF&7<`@fCO`!GK^! z5uxuRok1iGn3A1R^|Y)Jg98^}5P{Et*Ozhx*qTpK5wau!6SS9E?$i)7h@}RXDo|NmEOgLodhd^S@9w)_4jLnm z!>Aw5xL*7CTR#8k_tC1u13$Wq=oQ|1?~iAyv(1=J72RC zKE{S185RmeqD6bNv~^T|z)TUB8CE2!KTapf?q;oeFJD~l-kSXWOfbO&CHNaevUf#D SRrhBA0000?9f9=W?@Hkof`zWHVmw!X}plSf`^>lVp%Z$JfLwOT&??&CSWEw=R082~JZ z^JAATZn|mZ$LvhiWhQ1^vjIR!gJZv{WE|E?!1rR?dhGw20mm6o z>|Cj42IQV?ifFz7&w#e491Vv$G*Aj$wn-;POGbO4ZlNe7!Rb*%&u0AvnST_72V0XS?AYSR?i z9E4x3iDpV0K-C2%0H_0X6L;Kvkgzl-%_4zQrL7ZyJhqs3H>M7@Sc;=cReTh=%{bpC z&OosBXF$@dy8(DxS&(uVp=#-T{r}WwfMON*JgB!~1AxUpzTT}fkST3?5^VLPfDI zLX!Zdk*UxHx&uIO21*X(n{XhX6rdLXVbBTi8HfRRaH1id08pab0O=iy+DD#=jkV1` zP+G;@pJpd0UdC#v;-Mmk5uT#9R_7@IalEj`b%R#ggoKo?@d;udc)iuS_rQ=z3-Y8N z4|n?`S`#8OU?G8#+0|&@^v1PYxlF-=2ZD3hj!q7|#)6d#t)B^<=LLSn@L?n=a!_^* zNbU2S5L5|?RRZ@PKFY+)kgr309S|_EGfPC}D_^S^oDRz(?C2Wv^$Y&@`YXTyvmIbY TYF0c_00000NkvXXu0mjfiDAtd literal 0 HcmV?d00001 diff --git a/dist/assets/distribution_mosaic_icon.png b/dist/assets/distribution_mosaic_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..36d76fbbec56f2a1321d9ceae5d7c9e32b04955c GIT binary patch literal 1097 zcmV-P1h)H$P)K8^nTFKw`=3@C*pC%LA}v!wRur z&5~6hgkTW4jXmx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A2?VPG zxX17H`+s)&MW(9|0Qbv=s&#Hzer)}|{m=$4!x#@+ie;u)oG%i2Agh^+84MPGu|SB6 zCXm5vDtaeVINZ1%qSO7D@8~n@^8Cw(Kx!-~_F+X$YpFhv;$nDv_F zfvka>)^iKcTA=6ePt2mcNWz|tHE2`R)AV=?iE4V_aJkoKlcjq9y_=A|+(!iC$#UBq zmoFeUL%`x~ki|Si3WLbc7Zx6lkaa~<*nC$RB%56C4j%C3Lm+&u+D`wn9G4eVVtnj`_V)O>5OiIaP4^LnCTq)BYOm{dDY!(p-)Dwn9I__ zaleHFqNSN-Ba0=oei4y~3o;R7{8JTcy{m{Eo@S<-almflxO#6z1+qf}mTPYp`_D)~ zVdBhmM6Mh#OPM)~l~%T7I-Ny>uLy=D*E8J=fXK0WA~_(cl%4`3AHRft!-`(6xSAf| zu`~c$mZkz>W8SlzCo%w>JHrTNr~f=wvEjI-+ZazNXh@XM)E^CtXw1UJRcRT{O zv&5=H{K|x7R$ugW{QSsH6U1|E-3SzUsMLvOKVa_nk@dY3F=Uc6L+aS27}G7}21bDf z+>g^GGtHapSQtbodh(7yTul$-;PxQG{U`A1#|NqVRY0SjvBqxk;_nxFkZ611XeJU0 z(W+Fw}Z^szEoYC_tC(Cd)C{%x?1+A59r8Qp)QYfffsalG^4yJsVWNPkETG)3PDuuB#)PZ(awH_FZDC^ubjhB{) z=AdF}U@K|L;d8R#jb8d9N^)(X zgUO;tGZOMYs6L~_cUVk$551p6XQ77cLuG=DX=`BB)OVneD;nG zr#WvhAjC+pW?jrWalx4)A3ho?aU(~vWKMDBP7kLGc|>O2JJ&_I`BMV4TzaXuv$*j0 be*p#nDITKEVI&pv00000NkvXXu0mjfK3L8y literal 0 HcmV?d00001 diff --git a/dist/assets/force_directed_graph.svg b/dist/assets/force_directed_graph.svg new file mode 100644 index 0000000..f26d510 --- /dev/null +++ b/dist/assets/force_directed_graph.svg @@ -0,0 +1,44 @@ + + + + + + + image/svg+xml + + + + + + + + S + + diff --git a/dist/assets/heatmap_icon.png b/dist/assets/heatmap_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a668bc0d69808092706387b895de1f5454af8deb GIT binary patch literal 1705 zcmV;a23GlrP)`e|Khfch>9u@V0JAx^XN!O(OS8p#`NR zAW#HK#Y_6qhp1AKcxVxVA_Vk>3e*aaQV9vEJXAu0f)yzt2!*OaI4@0s;x@LUCibRw zY_A=!cWtlNyR)D3wKF_y@Or(o=CQp`GxvXg_a2>d&pB7PuIutC4h5iQx?Eo{kOcT; z7u5%SJuZ6yU;yi&M#9txxgtvxoTE^CO&JJVzor z%vg4m)!IDTEwHQbpC1>v6Hxr@C6X-#N;^?p*WKR3Ce?3?F3finsf>4T$vkc=_2w z9pcGH?g!w+q0@xbScmRcRFGv)_Nl{h01low?s;$^90ovqChEYVHqH6Pb5yM|%Y`{2 zPCxsdqntQ&no~#4F#Xy&8e2uQ)DmX7f<5vuZcydxufIxJl=yA(N9cBq#jV?f+&&I8 z9_7h{U*VgNp5<5XRLGQMmNpEERhy%+JYk=~PtP7D9`+*vY}VIEM2CrnVysF@KGv>r zaq2B@rpEzjY!!(P4iG4oQ5Ke&y>yuyZ=c6DOe&^EB05Yw+|R0%WTyOYE>6A0le;wcC4`WMI>UPTmitsa*9res}04=qIe&ZJA`bMV#tL9|<~$(?x)V2?b^ zOtMu>>P}<(J1F$82Q;<{@SqM--vwUcVj3PCgPbdJgfB*vFIPI*WAO%%qnksAiYEvWT?{A~wXlF-6LlW^!g6s|3$I`BKXOMfiAc z{Stb^yQr7$u3#o-F>{-pE))vytzW`)bWb){$ue(Dv7xVY4}pYCsxsX*PDW9qv9Ro^ z38X#Qs#zvwbk`Mtn6IDGj;Fh0wJ)*{4>6m(z5TE6s1vFjYG-$~<3aHRlQZM3y>?}+ z0^pMZSlv4&Za9Rtd*^#Y7RsJ%h}fRGa9!7JI5umgbcYyLqeRp`>V*PkrSpD79@>v9 zAggu0mO_CrvEY4_^a5p%cKx|X0$EZ%{W|bpQsMKj-Sau000000NkvXXu0mjfs&Y9t literal 0 HcmV?d00001 diff --git a/dist/assets/heatmap_icon.svg b/dist/assets/heatmap_icon.svg new file mode 100644 index 0000000..0c4c37e --- /dev/null +++ b/dist/assets/heatmap_icon.svg @@ -0,0 +1,375 @@ + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dist/assets/kaplanmeier_icon.png b/dist/assets/kaplanmeier_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..dbdf137148ef7fcf88eaf25135cbcbcc9bf0a738 GIT binary patch literal 635 zcmV->0)+jEP)6r!#2U)jfH5Xg%Gp}1}zjVEHuTk*J9tm%j|42BrE8F z$Gi8Qx$nGt-@uib0U$}1I%7oO4nGDw-0fpYZ#?_7q*X}=CB2fg;BjS1pC!e(OD_T6 zffHuNs0FOM{S2@MOgaBO&;|}Te;)V<%m1IoZPpbOmHcS~|wR0ih!*dG!e VGJ!~ETf+bV002ovPDHLkV1i|I3l#tW literal 0 HcmV?d00001 diff --git a/dist/assets/kaplanmeier_icon.svg b/dist/assets/kaplanmeier_icon.svg new file mode 100644 index 0000000..eeef723 --- /dev/null +++ b/dist/assets/kaplanmeier_icon.svg @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + KM + + diff --git a/dist/scss/style.scss b/dist/scss/style.scss new file mode 100644 index 0000000..a20cf02 --- /dev/null +++ b/dist/scss/style.scss @@ -0,0 +1,180 @@ +$select-color: orange; +$hover-color: #ffc46b; + +.phovea-axis { + .makeover { + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + } + + .tick line, path { + fill: none; + stroke: black; + shape-rendering: crispEdges; + } + + circle { + + } +} + +.phovea-barplot { + rect { + stroke: white; + fill: black; + } +} + +.phovea-box { + path.axis { + stroke: darkgrey; + } + + line.mean { + stroke: black; + stroke-width: 3px; + } + + rect.box { + fill: steelblue; + } +} + +div.phovea-heatmap { + position: relative; + line-height: 0; + + canvas { + + &.phovea-heatmap-selection { + position: absolute; + top: 0; + left: 0; + z-index: 2; + } + } + + .phovea-heatmap-labels { + line-height: 100%; + position: absolute; + display: flex; + flex-direction: column; + justify-content: space-around; + overflow: hidden; + + div.phovea-select-selected { + background-color: $select-color; + } + + &.row-labels { + top: 0; + text-align: right; + } + + &.column-labels { + top: 0; + transform: rotate(-90deg); + transform-origin: top left; + } + } +} + +.phovea-table { + font-size: smaller; + border-collapse: collapse; + + tr { + &.phovea-select-selected { + border: 1px solid $select-color; + } + &.phovea-select-hovered { + border: 1px solid $hover-color; + } + } +} + +.phovea-kaplanmeier { + path { + fill: none; + stroke: black; + } +} + +.phovea-graph-force { + .node { + opacity: 0.5; + } + .edge { + stroke: black; + } +} + + +.phovea-heatmap { + &.lg { + // highlight selection for svg heatmap + rect { + &.phovea-select-selected { + stroke: $select-color; + } + &.phovea-select-hovered { + stroke: $hover-color; + } + } + } + &.sm { + rect { + &.phovea-select-selected { + fill: $select-color; + } + &.phovea-select-hovered { + fill: $hover-color; + } + } + } +} + +.phovea-histogram { + .phovea-select-selected rect { + fill: $select-color; + } + .phovea-select-hovered rect { + fill: $hover-color; + } +} + +.phovea-list { + display: flex; + flex-direction: column; + justify-content: space-around; + overflow: hidden; + text-overflow: ellipsis; + + > div { + white-space: nowrap; + + &.small { + font-size: 50%; + } + } + + &.phovea-proportional-symbol { + > div { + border-radius: 50%; + background-color: black; + } + } + + &.phovea-barplot { + align-items: stretch; + + > div { + flex: 1 1 auto; + background-color: black; + } + } +} diff --git a/package.json b/package.json index 7331d93..b96ee6b 100644 --- a/package.json +++ b/package.json @@ -52,8 +52,7 @@ "dependencies": { "@types/d3": "~3.5.36", "d3": "~3.5.17", - "phovea_core": "github:phovea/phovea_core#asteiner/refactoring", - "phovea_d3": "github:phovea/phovea_d3#vstoiber/refactoring" + "phovea_core": "github:phovea/phovea_core#asteiner/refactoring" }, "devDependencies": { "@types/jest": "25.1.4", diff --git a/tests/table.test.ts b/tests/table.test.ts index d77cab6..8ac3374 100644 --- a/tests/table.test.ts +++ b/tests/table.test.ts @@ -1,7 +1,7 @@ /// import {Table} from '../src/base/table'; import {Matrix} from 'phovea_core'; -import {RangeElem} from 'phovea_core'; +import {ParseRangeUtils} from 'phovea_core'; describe('table', () => { let squareTable; @@ -19,8 +19,8 @@ describe('table', () => { ); const element = document.createElement('div'); squareTable = Table.createTable(data, element); - colTable = Table.createTable(data.view(RangeElem.parse([[0,1],[1]])), element); - rowTable = Table.createTable(data.view(RangeElem.parse([[1],[0,1]])), element); + colTable = Table.createTable(data.view(ParseRangeUtils.parseRangeLike([[0,1],[1]])), element); + rowTable = Table.createTable(data.view(ParseRangeUtils.parseRangeLike([[1],[0,1]])), element); setTimeout(function() { done(); }, 1000); // TODO: Can we do better than this? create() doesn't let us provide a callback? From 3c5ce8dced0e5a34613d9153278b70340427d572 Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Wed, 27 May 2020 11:32:10 +0200 Subject: [PATCH 49/67] add phovea_d3 --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index b96ee6b..bcc667b 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ "dependencies": { "@types/d3": "~3.5.36", "d3": "~3.5.17", - "phovea_core": "github:phovea/phovea_core#asteiner/refactoring" + "phovea_core": "github:phovea/phovea_core#asteiner/refactoring", + "phovea_d3": "github:phovea/phovea_d3#asteiner/refactoring" }, "devDependencies": { "@types/jest": "25.1.4", From 08930a1c8c5ce82833140586cf22b0ec0ced93cb Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Wed, 27 May 2020 12:54:31 +0200 Subject: [PATCH 50/67] change path --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bcc667b..7331d93 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@types/d3": "~3.5.36", "d3": "~3.5.17", "phovea_core": "github:phovea/phovea_core#asteiner/refactoring", - "phovea_d3": "github:phovea/phovea_d3#asteiner/refactoring" + "phovea_d3": "github:phovea/phovea_d3#vstoiber/refactoring" }, "devDependencies": { "@types/jest": "25.1.4", From 04f181ce9ebe2c4ba1d8138b1cc73f2c34696eca Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Mon, 1 Jun 2020 11:36:05 +0200 Subject: [PATCH 51/67] refactore stylings --- dist/base/axis.d.ts | 2 +- dist/base/axis.js | 2 +- dist/base/box.d.ts | 2 +- dist/base/box.js | 2 +- dist/base/force_directed_graph.d.ts | 2 +- dist/base/force_directed_graph.js | 2 +- dist/base/kaplanmeier.d.ts | 2 +- dist/base/kaplanmeier.js | 2 +- dist/base/table.d.ts | 2 +- dist/base/table.js | 2 +- dist/distribution/Histogram.d.ts | 2 +- dist/distribution/Histogram.js | 2 +- dist/distribution/Mosaic.d.ts | 2 +- dist/distribution/Mosaic.js | 2 +- dist/distribution/Pie.d.ts | 2 +- dist/distribution/Pie.js | 2 +- dist/heatmap/HeatMap.d.ts | 2 +- dist/heatmap/HeatMap.js | 2 +- dist/heatmap/HeatMap1D.d.ts | 2 +- dist/heatmap/HeatMap1D.js | 2 +- dist/list/barplot.d.ts | 2 +- dist/list/barplot.js | 2 +- dist/list/internal/AList.d.ts | 2 +- dist/list/internal/AList.js | 2 +- dist/list/list.d.ts | 2 +- dist/list/list.js | 2 +- dist/list/proportionalSymbol.d.ts | 2 +- dist/list/proportionalSymbol.js | 2 +- dist/scss/{style.scss => main.scss} | 0 src/base/axis.ts | 2 +- src/base/box.ts | 2 +- src/base/force_directed_graph.ts | 2 +- src/base/kaplanmeier.ts | 2 +- src/base/table.ts | 2 +- src/distribution/Histogram.ts | 2 +- src/distribution/Mosaic.ts | 2 +- src/distribution/Pie.ts | 2 +- src/heatmap/HeatMap.ts | 2 +- src/heatmap/HeatMap1D.ts | 2 +- src/list/barplot.ts | 2 +- src/list/internal/AList.ts | 2 +- src/list/list.ts | 2 +- src/list/proportionalSymbol.ts | 2 +- src/scss/{style.scss => main.scss} | 0 44 files changed, 42 insertions(+), 42 deletions(-) rename dist/scss/{style.scss => main.scss} (100%) rename src/scss/{style.scss => main.scss} (100%) diff --git a/dist/base/axis.d.ts b/dist/base/axis.d.ts index 3f0b199..d0a0cfb 100644 --- a/dist/base/axis.d.ts +++ b/dist/base/axis.d.ts @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 25.01.2016. */ -import './style.scss'; +import '../scss/main.scss'; import { AVisInstance, IVisInstance, ITransform, IVisInstanceOptions } from 'phovea_core'; import { INumericalVector } from 'phovea_core'; import { Range } from 'phovea_core'; diff --git a/dist/base/axis.js b/dist/base/axis.js index 20fd264..cdf35a4 100644 --- a/dist/base/axis.js +++ b/dist/base/axis.js @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 25.01.2016. */ -import './style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import { BaseUtils } from 'phovea_core'; import { AVisInstance, VisUtils } from 'phovea_core'; diff --git a/dist/base/box.d.ts b/dist/base/box.d.ts index b0d9d10..809d15d 100644 --- a/dist/base/box.d.ts +++ b/dist/base/box.d.ts @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 25.01.2016. */ -import './style.scss'; +import '../scss/main.scss'; import { Range } from 'phovea_core'; import { AVisInstance, IVisInstance, IVisInstanceOptions } from 'phovea_core'; import { Rect } from 'phovea_core'; diff --git a/dist/base/box.js b/dist/base/box.js index b626fee..8d12a85 100644 --- a/dist/base/box.js +++ b/dist/base/box.js @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 25.01.2016. */ -import './style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import { AVisInstance, VisUtils } from 'phovea_core'; import { Rect } from 'phovea_core'; diff --git a/dist/base/force_directed_graph.d.ts b/dist/base/force_directed_graph.d.ts index d4035ae..ed6ab13 100644 --- a/dist/base/force_directed_graph.d.ts +++ b/dist/base/force_directed_graph.d.ts @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 05.08.2014. */ -import './style.scss'; +import '../scss/main.scss'; import { AVisInstance, IVisInstance, IVisInstanceOptions } from 'phovea_core'; import { GraphProxy } from 'phovea_core'; export interface IForceDirectedGraphOptions extends IVisInstanceOptions { diff --git a/dist/base/force_directed_graph.js b/dist/base/force_directed_graph.js index e5462c8..6b73b51 100644 --- a/dist/base/force_directed_graph.js +++ b/dist/base/force_directed_graph.js @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 05.08.2014. */ -import './style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import { AVisInstance, VisUtils } from 'phovea_core'; import { BaseUtils } from 'phovea_core'; diff --git a/dist/base/kaplanmeier.d.ts b/dist/base/kaplanmeier.d.ts index a9db560..bcac2a8 100644 --- a/dist/base/kaplanmeier.d.ts +++ b/dist/base/kaplanmeier.d.ts @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 01.10.2015. */ -import './style.scss'; +import '../scss/main.scss'; import { Range } from 'phovea_core'; import { AVisInstance, IVisInstance, IVisInstanceOptions } from 'phovea_core'; import { INumericalVector } from 'phovea_core'; diff --git a/dist/base/kaplanmeier.js b/dist/base/kaplanmeier.js index dc619fb..bb1800b 100644 --- a/dist/base/kaplanmeier.js +++ b/dist/base/kaplanmeier.js @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 01.10.2015. */ -import './style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import { AVisInstance, VisUtils } from 'phovea_core'; import { BaseUtils } from 'phovea_core'; diff --git a/dist/base/table.d.ts b/dist/base/table.d.ts index 1a31ebc..b20bbc9 100644 --- a/dist/base/table.d.ts +++ b/dist/base/table.d.ts @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 05.08.2014. */ -import './style.scss'; +import '../scss/main.scss'; import { Range } from 'phovea_core'; import { AVisInstance, IVisInstance, IVisInstanceOptions } from 'phovea_core'; import { Rect } from 'phovea_core'; diff --git a/dist/base/table.js b/dist/base/table.js index 0ad36ae..c3bb0ab 100644 --- a/dist/base/table.js +++ b/dist/base/table.js @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 05.08.2014. */ -import './style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import { AVisInstance, VisUtils } from 'phovea_core'; import { Rect } from 'phovea_core'; diff --git a/dist/distribution/Histogram.d.ts b/dist/distribution/Histogram.d.ts index 2c34e61..9acd9e3 100644 --- a/dist/distribution/Histogram.d.ts +++ b/dist/distribution/Histogram.d.ts @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 26.01.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import { Range } from 'phovea_core'; import { AVisInstance, IVisInstance, ITransform } from 'phovea_core'; import { IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc } from 'phovea_core'; diff --git a/dist/distribution/Histogram.js b/dist/distribution/Histogram.js index a21ba14..aa9244a 100644 --- a/dist/distribution/Histogram.js +++ b/dist/distribution/Histogram.js @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 26.01.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import { AppContext, BaseUtils } from 'phovea_core'; import { AVisInstance, VisUtils } from 'phovea_core'; diff --git a/dist/distribution/Mosaic.d.ts b/dist/distribution/Mosaic.d.ts index 026c111..b7d58a2 100644 --- a/dist/distribution/Mosaic.d.ts +++ b/dist/distribution/Mosaic.d.ts @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 26.01.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import { Range } from 'phovea_core'; import { AVisInstance, IVisInstance, ITransform } from 'phovea_core'; import { IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc } from 'phovea_core'; diff --git a/dist/distribution/Mosaic.js b/dist/distribution/Mosaic.js index b728844..67b8297 100644 --- a/dist/distribution/Mosaic.js +++ b/dist/distribution/Mosaic.js @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 26.01.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import { AppContext, BaseUtils } from 'phovea_core'; import { AVisInstance, VisUtils } from 'phovea_core'; diff --git a/dist/distribution/Pie.d.ts b/dist/distribution/Pie.d.ts index f3e9705..ae5327a 100644 --- a/dist/distribution/Pie.d.ts +++ b/dist/distribution/Pie.d.ts @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 26.01.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import { Range } from 'phovea_core'; import { AVisInstance, IVisInstance, ITransform } from 'phovea_core'; import { IHistAbleDataType, ICategoricalValueTypeDesc, INumberValueTypeDesc } from 'phovea_core'; diff --git a/dist/distribution/Pie.js b/dist/distribution/Pie.js index ccf775d..c69986f 100644 --- a/dist/distribution/Pie.js +++ b/dist/distribution/Pie.js @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 26.01.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import { AppContext, BaseUtils } from 'phovea_core'; import { AVisInstance, VisUtils } from 'phovea_core'; diff --git a/dist/heatmap/HeatMap.d.ts b/dist/heatmap/HeatMap.d.ts index bdf0bbd..a707d15 100644 --- a/dist/heatmap/HeatMap.d.ts +++ b/dist/heatmap/HeatMap.d.ts @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 26.12.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import { Range } from 'phovea_core'; import { AVisInstance, IVisInstance } from 'phovea_core'; import { Rect } from 'phovea_core'; diff --git a/dist/heatmap/HeatMap.js b/dist/heatmap/HeatMap.js index b079314..b8c8c2b 100644 --- a/dist/heatmap/HeatMap.js +++ b/dist/heatmap/HeatMap.js @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 26.12.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import { AVisInstance, VisUtils } from 'phovea_core'; import { Rect } from 'phovea_core'; diff --git a/dist/heatmap/HeatMap1D.d.ts b/dist/heatmap/HeatMap1D.d.ts index 3a02877..53bcdea 100644 --- a/dist/heatmap/HeatMap1D.d.ts +++ b/dist/heatmap/HeatMap1D.d.ts @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 26.12.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import { Range } from 'phovea_core'; import { AVisInstance, IVisInstance } from 'phovea_core'; import { Rect } from 'phovea_core'; diff --git a/dist/heatmap/HeatMap1D.js b/dist/heatmap/HeatMap1D.js index f3e536f..523763f 100644 --- a/dist/heatmap/HeatMap1D.js +++ b/dist/heatmap/HeatMap1D.js @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 26.12.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import { AVisInstance, VisUtils } from 'phovea_core'; import { Rect } from 'phovea_core'; diff --git a/dist/list/barplot.d.ts b/dist/list/barplot.d.ts index c5c519b..d73d4d8 100644 --- a/dist/list/barplot.d.ts +++ b/dist/list/barplot.d.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 25.01.2016. */ /// -import '../style.scss'; +import '../scss/main.scss'; import { INumericalVector } from 'phovea_core'; import { AList, IAListOptions } from './internal/AList'; import { INumberValueTypeDesc } from 'phovea_core'; diff --git a/dist/list/barplot.js b/dist/list/barplot.js index 8551a26..58b10d0 100644 --- a/dist/list/barplot.js +++ b/dist/list/barplot.js @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 25.01.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import { scale } from 'd3'; import { BaseUtils } from 'phovea_core'; import { AList } from './internal/AList'; diff --git a/dist/list/internal/AList.d.ts b/dist/list/internal/AList.d.ts index f94973d..e7e3248 100644 --- a/dist/list/internal/AList.d.ts +++ b/dist/list/internal/AList.d.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 25.01.2016. */ /// -import '../../style.scss'; +import '../scss/main.scss'; import { AVisInstance, IVisInstance, IVisInstanceOptions } from 'phovea_core'; import { IVector } from 'phovea_core'; import { Rect } from 'phovea_core'; diff --git a/dist/list/internal/AList.js b/dist/list/internal/AList.js index faef9d2..387778d 100644 --- a/dist/list/internal/AList.js +++ b/dist/list/internal/AList.js @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 25.01.2016. */ -import '../../style.scss'; +import '../scss/main.scss'; import { select, extent, selection } from 'd3'; import { BaseUtils } from 'phovea_core'; import { AVisInstance, VisUtils } from 'phovea_core'; diff --git a/dist/list/list.d.ts b/dist/list/list.d.ts index fa885cd..d732e3b 100644 --- a/dist/list/list.d.ts +++ b/dist/list/list.d.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 25.01.2016. */ /// -import '../style.scss'; +import '../scss/main.scss'; import { IAnyVector } from 'phovea_core'; import { AList, IAListOptions } from './internal/AList'; import { IValueTypeDesc } from 'phovea_core'; diff --git a/dist/list/list.js b/dist/list/list.js index 6ea837e..df6f1e2 100644 --- a/dist/list/list.js +++ b/dist/list/list.js @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 25.01.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import { format } from 'd3'; import { BaseUtils } from 'phovea_core'; import { AList } from './internal/AList'; diff --git a/dist/list/proportionalSymbol.d.ts b/dist/list/proportionalSymbol.d.ts index ab899fc..01cb96e 100644 --- a/dist/list/proportionalSymbol.d.ts +++ b/dist/list/proportionalSymbol.d.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 25.01.2016. */ /// -import '../style.scss'; +import '../scss/main.scss'; import { INumericalVector } from 'phovea_core'; import { AList, IAListOptions } from './internal/AList'; import { INumberValueTypeDesc } from 'phovea_core'; diff --git a/dist/list/proportionalSymbol.js b/dist/list/proportionalSymbol.js index 5441061..3af4444 100644 --- a/dist/list/proportionalSymbol.js +++ b/dist/list/proportionalSymbol.js @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 25.01.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import { scale } from 'd3'; import { BaseUtils } from 'phovea_core'; import { AList } from './internal/AList'; diff --git a/dist/scss/style.scss b/dist/scss/main.scss similarity index 100% rename from dist/scss/style.scss rename to dist/scss/main.scss diff --git a/src/base/axis.ts b/src/base/axis.ts index db0003c..6e184ab 100644 --- a/src/base/axis.ts +++ b/src/base/axis.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 25.01.2016. */ -import './style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import {BaseUtils} from 'phovea_core'; import {AVisInstance, IVisInstance, VisUtils, ITransform, IVisInstanceOptions} from 'phovea_core'; diff --git a/src/base/box.ts b/src/base/box.ts index 319bbd0..c7c7fb8 100644 --- a/src/base/box.ts +++ b/src/base/box.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 25.01.2016. */ -import './style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import {Range} from 'phovea_core'; import {AVisInstance, IVisInstance, VisUtils, IVisInstanceOptions} from 'phovea_core'; diff --git a/src/base/force_directed_graph.ts b/src/base/force_directed_graph.ts index b4c7c75..c781f56 100644 --- a/src/base/force_directed_graph.ts +++ b/src/base/force_directed_graph.ts @@ -3,7 +3,7 @@ */ -import './style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import {AVisInstance, IVisInstance, VisUtils, IVisInstanceOptions} from 'phovea_core'; import {BaseUtils} from 'phovea_core'; diff --git a/src/base/kaplanmeier.ts b/src/base/kaplanmeier.ts index 7e3b64e..495c057 100644 --- a/src/base/kaplanmeier.ts +++ b/src/base/kaplanmeier.ts @@ -3,7 +3,7 @@ */ -import './style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import {Range} from 'phovea_core'; import {AVisInstance, IVisInstance, VisUtils, IVisInstanceOptions} from 'phovea_core'; diff --git a/src/base/table.ts b/src/base/table.ts index 35fe889..d1c1f61 100644 --- a/src/base/table.ts +++ b/src/base/table.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 05.08.2014. */ -import './style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import {Range} from 'phovea_core'; import {AVisInstance, IVisInstance, VisUtils, IVisInstanceOptions} from 'phovea_core'; diff --git a/src/distribution/Histogram.ts b/src/distribution/Histogram.ts index c7e399c..6716c28 100644 --- a/src/distribution/Histogram.ts +++ b/src/distribution/Histogram.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 26.01.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import {AppContext, BaseUtils} from 'phovea_core'; import {Range} from 'phovea_core'; diff --git a/src/distribution/Mosaic.ts b/src/distribution/Mosaic.ts index 18bb367..b38afd8 100644 --- a/src/distribution/Mosaic.ts +++ b/src/distribution/Mosaic.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 26.01.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import {AppContext, BaseUtils} from 'phovea_core'; import {Range} from 'phovea_core'; diff --git a/src/distribution/Pie.ts b/src/distribution/Pie.ts index 9295f6e..9c46346 100644 --- a/src/distribution/Pie.ts +++ b/src/distribution/Pie.ts @@ -3,7 +3,7 @@ */ -import '../style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import {AppContext, BaseUtils} from 'phovea_core'; import {Range} from 'phovea_core'; diff --git a/src/heatmap/HeatMap.ts b/src/heatmap/HeatMap.ts index 0465de6..bfefb49 100644 --- a/src/heatmap/HeatMap.ts +++ b/src/heatmap/HeatMap.ts @@ -3,7 +3,7 @@ */ -import '../style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import {Range} from 'phovea_core'; import {AVisInstance, IVisInstance, VisUtils} from 'phovea_core'; diff --git a/src/heatmap/HeatMap1D.ts b/src/heatmap/HeatMap1D.ts index ba4f024..7646aee 100644 --- a/src/heatmap/HeatMap1D.ts +++ b/src/heatmap/HeatMap1D.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 26.12.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import * as d3 from 'd3'; import {Range} from 'phovea_core'; import {AVisInstance, IVisInstance, VisUtils} from 'phovea_core'; diff --git a/src/list/barplot.ts b/src/list/barplot.ts index f83e05e..d69464e 100644 --- a/src/list/barplot.ts +++ b/src/list/barplot.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 25.01.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import {scale} from 'd3'; import {BaseUtils} from 'phovea_core'; import {INumericalVector} from 'phovea_core'; diff --git a/src/list/internal/AList.ts b/src/list/internal/AList.ts index e39cedc..351aa84 100644 --- a/src/list/internal/AList.ts +++ b/src/list/internal/AList.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 25.01.2016. */ -import '../../style.scss'; +import '../scss/main.scss'; import {select, extent, selection} from 'd3'; import {BaseUtils} from 'phovea_core'; import {AVisInstance, IVisInstance, VisUtils, IVisInstanceOptions} from 'phovea_core'; diff --git a/src/list/list.ts b/src/list/list.ts index bc36f03..d0de0a4 100644 --- a/src/list/list.ts +++ b/src/list/list.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 25.01.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import {format} from 'd3'; import {BaseUtils} from 'phovea_core'; import {IAnyVector} from 'phovea_core'; diff --git a/src/list/proportionalSymbol.ts b/src/list/proportionalSymbol.ts index d95c36e..f8a6da7 100644 --- a/src/list/proportionalSymbol.ts +++ b/src/list/proportionalSymbol.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 25.01.2016. */ -import '../style.scss'; +import '../scss/main.scss'; import {scale} from 'd3'; import {BaseUtils} from 'phovea_core'; import {INumericalVector} from 'phovea_core'; diff --git a/src/scss/style.scss b/src/scss/main.scss similarity index 100% rename from src/scss/style.scss rename to src/scss/main.scss From d52e49458edc086369a6e7d239371e0003406635 Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Mon, 1 Jun 2020 11:50:03 +0200 Subject: [PATCH 52/67] change stylings --- dist/list/internal/AList.d.ts | 2 +- dist/list/internal/AList.js | 2 +- src/list/internal/AList.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/list/internal/AList.d.ts b/dist/list/internal/AList.d.ts index e7e3248..cfeb745 100644 --- a/dist/list/internal/AList.d.ts +++ b/dist/list/internal/AList.d.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 25.01.2016. */ /// -import '../scss/main.scss'; +import '../../scss/main.scss'; import { AVisInstance, IVisInstance, IVisInstanceOptions } from 'phovea_core'; import { IVector } from 'phovea_core'; import { Rect } from 'phovea_core'; diff --git a/dist/list/internal/AList.js b/dist/list/internal/AList.js index 387778d..5d4d7cc 100644 --- a/dist/list/internal/AList.js +++ b/dist/list/internal/AList.js @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 25.01.2016. */ -import '../scss/main.scss'; +import '../../scss/main.scss'; import { select, extent, selection } from 'd3'; import { BaseUtils } from 'phovea_core'; import { AVisInstance, VisUtils } from 'phovea_core'; diff --git a/src/list/internal/AList.ts b/src/list/internal/AList.ts index 351aa84..c6aff86 100644 --- a/src/list/internal/AList.ts +++ b/src/list/internal/AList.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 25.01.2016. */ -import '../scss/main.scss'; +import '../../scss/main.scss'; import {select, extent, selection} from 'd3'; import {BaseUtils} from 'phovea_core'; import {AVisInstance, IVisInstance, VisUtils, IVisInstanceOptions} from 'phovea_core'; From 28729c06ee8191e7e9c446fb17ca50d4fbacffcd Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Mon, 1 Jun 2020 13:19:25 +0200 Subject: [PATCH 53/67] change registry entries --- phovea.js | 48 +++++++++++++++++++++---------------------- phovea_registry.js | 4 ++-- tests/axis.test.ts | 2 +- tests/heatmap.test.ts | 4 ++-- tests/table.test.ts | 2 +- 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/phovea.js b/phovea.js index dbe1759..9cb4e95 100644 --- a/phovea.js +++ b/phovea.js @@ -6,12 +6,12 @@ //register all extensions in the registry following the given pattern module.exports = function(registry) { - //registry.push('extension-type', 'extension-id', function() { return import('./src/extension_impl'); }, {}); + //registry.push('extension-type', 'extension-id', function() { return import('./dist/extension_impl'); }, {}); registry.push('vis', 'axis', function () { - return import('./src/axis'); + return import('./dist/axis'); }, { name: 'Axis', - icon: function() { return import('./src/assets/axis_icon.svg'); }, + icon: function() { return import('./dist/assets/axis_icon.svg'); }, scaling: 'height-only', filter: [ 'vector', @@ -39,10 +39,10 @@ module.exports = function(registry) { } }); registry.push('vis', 'barplot', function () { - return import('./src/list/barplot'); + return import('./dist/list/barplot'); }, { name: 'Bar Plot', - icon: function() { return import('./src/assets/barplot_icon.png'); }, + icon: function() { return import('./dist/assets/barplot_icon.png'); }, sizeDependsOnDataDimension: [ false, true @@ -54,7 +54,7 @@ module.exports = function(registry) { }); registry.push('vis', 'table', function () { - return import('./src/table'); + return import('./dist/table'); }, { name: 'Table', filter: '(matrix|table|vector)', @@ -62,7 +62,7 @@ module.exports = function(registry) { }); registry.push('vis', 'list', function () { - return import('./src/list/list'); + return import('./dist/list/list'); }, { name: 'List', filter: 'vector', @@ -72,7 +72,7 @@ module.exports = function(registry) { ] }); registry.push('vis', 'proportionalSymbol', function () { - return import('./src/list/proportionalSymbol'); + return import('./dist/list/proportionalSymbol'); }, { name: 'Proportional Symbol', filter: [ @@ -86,19 +86,19 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-heatmap', function () { - return import('./src/heatmap'); + return import('./dist/heatmap'); }, { name: 'HeatMap', - icon: function() { return import('./src/assets/heatmap_icon.svg'); }, + icon: function() { return import('./dist/assets/heatmap_icon.svg'); }, sizeDependsOnDataDimension: true, filter: 'matrix' }); registry.push('vis', 'phovea-vis-heatmap1d', function () { - return import('./src/heatmap'); + return import('./dist/heatmap'); }, { name: 'HeatMap 1D', - icon: function() { return import('./src/assets/heatmap_icon.svg'); }, + icon: function() { return import('./dist/assets/heatmap_icon.svg'); }, sizeDependsOnDataDimension: [ false, true @@ -108,10 +108,10 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-kaplanmeier', function () { - return import('./src/kaplanmeier'); + return import('./dist/kaplanmeier'); }, { name: 'Kaplanmeier Plot', - icon: function() { return import('./src/assets/kaplanmeier_icon.svg'); }, + icon: function() { return import('./dist/assets/kaplanmeier_icon.svg'); }, sizeDependsOnDataDimension: [ false, false @@ -121,10 +121,10 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-histogram', function () { - return import('./src/distribution'); + return import('./dist/distribution'); }, { name: 'Histogram', - icon: function() { return import('./src/assets/distribution_histogram_icon.png'); }, + icon: function() { return import('./dist/assets/distribution_histogram_icon.png'); }, filter: [ '(vector|matrix|stratification)', '(categorical|real|int)' @@ -132,11 +132,11 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-mosaic', function () { - return import('./src/distribution'); + return import('./dist/distribution'); }, { name: 'Mosaic', factory: 'createMosaic', - icon: function() { return import('./src/assets/distribution_mosaic_icon.png'); }, + icon: function() { return import('./dist/assets/distribution_mosaic_icon.png'); }, sizeDependsOnDataDimension: [ false, true @@ -149,11 +149,11 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-pie', function () { - return import('./src/distribution'); + return import('./dist/distribution'); }, { name: 'Pie', factory: 'createPie', - icon: function() { return import('./src/assets/distribution_pie_icon.png'); }, + icon: function() { return import('./dist/assets/distribution_pie_icon.png'); }, scaling: 'aspect', filter: [ '(vector|stratification)', @@ -162,10 +162,10 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-box', function () { - return import('./src/box'); + return import('./dist/box'); }, { name: 'BoxPlot', - icon: function() { return import('./src/assets/box_icon.png'); }, + icon: function() { return import('./dist/assets/box_icon.png'); }, scaling: 'aspect', filter: [ 'vector', @@ -174,11 +174,11 @@ module.exports = function(registry) { }); registry.push('vis', 'force-directed-graph', function () { - return import('./src/force_directed_graph'); + return import('./dist/force_directed_graph'); }, { name: 'Force Directed Graph', filter: 'graph', - icon: function() { return import('./src/assets/force_directed_graph.svg'); }, + icon: function() { return import('./dist/assets/force_directed_graph.svg'); }, sizeDependsOnDataDimension: [ false, false diff --git a/phovea_registry.js b/phovea_registry.js index 5da1aa1..be70199 100644 --- a/phovea_registry.js +++ b/phovea_registry.js @@ -4,7 +4,7 @@ * Licensed under the new BSD license, available at http://caleydo.org/license **************************************************************************** */ -import {register} from 'phovea_core'; +import {PluginRegistry} from 'phovea_core'; /** * build a registry by registering all phovea modules @@ -13,4 +13,4 @@ import {register} from 'phovea_core'; import 'phovea_core/phovea_registry.js'; import 'phovea_d3/phovea_registry.js'; //self -register('phovea_vis',require('./phovea.js')); +PluginRegistry.getInstance().register('phovea_vis',require('./phovea.js')); diff --git a/tests/axis.test.ts b/tests/axis.test.ts index 9183570..a8a1038 100644 --- a/tests/axis.test.ts +++ b/tests/axis.test.ts @@ -1,5 +1,5 @@ /// -import {Axis} from '../src/base/axis'; +import {Axis} from '../dist/base/axis'; describe('create', () => { it('is method', () => { diff --git a/tests/heatmap.test.ts b/tests/heatmap.test.ts index 6a27622..7ce9f13 100644 --- a/tests/heatmap.test.ts +++ b/tests/heatmap.test.ts @@ -1,6 +1,6 @@ /// -import {DefaultUtils} from '../src/heatmap/DefaultUtils'; -import {ScaleUtils} from '../src/heatmap/IScale'; +import {DefaultUtils} from '../dist/heatmap/DefaultUtils'; +import {ScaleUtils} from '../dist/heatmap/IScale'; import {INumberValueTypeDesc} from 'phovea_core'; describe('toScale', () => { diff --git a/tests/table.test.ts b/tests/table.test.ts index 8ac3374..46ee50b 100644 --- a/tests/table.test.ts +++ b/tests/table.test.ts @@ -1,5 +1,5 @@ /// -import {Table} from '../src/base/table'; +import {Table} from '../dist/base/table'; import {Matrix} from 'phovea_core'; import {ParseRangeUtils} from 'phovea_core'; From 6330c372f367600414dcc164e9ba8c95fe04cdc3 Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Tue, 2 Jun 2020 07:57:51 +0200 Subject: [PATCH 54/67] change registry entries --- phovea.js | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/phovea.js b/phovea.js index 9cb4e95..089780a 100644 --- a/phovea.js +++ b/phovea.js @@ -8,8 +8,9 @@ module.exports = function(registry) { //registry.push('extension-type', 'extension-id', function() { return import('./dist/extension_impl'); }, {}); registry.push('vis', 'axis', function () { - return import('./dist/axis'); + return import('./dist/base/axis'); }, { + factory: 'createAxis', name: 'Axis', icon: function() { return import('./dist/assets/axis_icon.svg'); }, scaling: 'height-only', @@ -41,6 +42,7 @@ module.exports = function(registry) { registry.push('vis', 'barplot', function () { return import('./dist/list/barplot'); }, { + factory: 'createBarPlot', name: 'Bar Plot', icon: function() { return import('./dist/assets/barplot_icon.png'); }, sizeDependsOnDataDimension: [ @@ -54,8 +56,9 @@ module.exports = function(registry) { }); registry.push('vis', 'table', function () { - return import('./dist/table'); + return import('./dist/base/table'); }, { + factory: 'createTable', name: 'Table', filter: '(matrix|table|vector)', sizeDependsOnDataDimension: true @@ -64,6 +67,7 @@ module.exports = function(registry) { registry.push('vis', 'list', function () { return import('./dist/list/list'); }, { + factory: 'createList', name: 'List', filter: 'vector', sizeDependsOnDataDimension: [ @@ -74,6 +78,7 @@ module.exports = function(registry) { registry.push('vis', 'proportionalSymbol', function () { return import('./dist/list/proportionalSymbol'); }, { + factory: 'createProportionalSymbol', name: 'Proportional Symbol', filter: [ 'vector', @@ -86,8 +91,9 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-heatmap', function () { - return import('./dist/heatmap'); + return import('./dist/heatmap/HeatMap'); }, { + factory: 'createRenderer', name: 'HeatMap', icon: function() { return import('./dist/assets/heatmap_icon.svg'); }, sizeDependsOnDataDimension: true, @@ -95,8 +101,9 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-heatmap1d', function () { - return import('./dist/heatmap'); + return import('./dist/heatmap/HeatMap1D'); }, { + factory: 'create1D', name: 'HeatMap 1D', icon: function() { return import('./dist/assets/heatmap_icon.svg'); }, sizeDependsOnDataDimension: [ @@ -108,8 +115,9 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-kaplanmeier', function () { - return import('./dist/kaplanmeier'); + return import('./dist/base/kaplanmeier'); }, { + factory: 'createKaplanMeierPlot', name: 'Kaplanmeier Plot', icon: function() { return import('./dist/assets/kaplanmeier_icon.svg'); }, sizeDependsOnDataDimension: [ @@ -121,8 +129,9 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-histogram', function () { - return import('./dist/distribution'); + return import('./dist/distribution/Histogram'); }, { + factory: 'createHistrogram', name: 'Histogram', icon: function() { return import('./dist/assets/distribution_histogram_icon.png'); }, filter: [ @@ -132,7 +141,7 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-mosaic', function () { - return import('./dist/distribution'); + return import('./dist/distribution/Mosaic'); }, { name: 'Mosaic', factory: 'createMosaic', @@ -149,7 +158,7 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-pie', function () { - return import('./dist/distribution'); + return import('./dist/distribution/Pie'); }, { name: 'Pie', factory: 'createPie', @@ -162,8 +171,9 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-box', function () { - return import('./dist/box'); + return import('./dist/base/box'); }, { + factory: 'createBoxPlot', name: 'BoxPlot', icon: function() { return import('./dist/assets/box_icon.png'); }, scaling: 'aspect', @@ -174,8 +184,9 @@ module.exports = function(registry) { }); registry.push('vis', 'force-directed-graph', function () { - return import('./dist/force_directed_graph'); + return import('./dist/base/force_directed_graph'); }, { + factory: 'createForceDirectedGraphVis', name: 'Force Directed Graph', filter: 'graph', icon: function() { return import('./dist/assets/force_directed_graph.svg'); }, From ad43f3f496954a2991c347841207187f8c694b95 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 3 Jun 2020 11:29:15 +0200 Subject: [PATCH 55/67] remove pretest script --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 7331d93..3e4e373 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "lint": "tslint -c tslint.json -p . 'src/**/*.ts?(x)' 'tests/**/*.ts?(x)'", "docs": "typedoc --options typedoc.json src/**.ts", "prebuild": "node -e \"process.exit(process.env.PHOVEA_SKIP_TESTS === undefined?1:0)\" || npm run test", - "pretest": "npm run clean && npm run compile", "test": "jest", "test:watch": "jest --watch", "posttest": "npm run lint", From 93c510ea422ef712d667419f6b209dded2c7bf69 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 3 Jun 2020 11:30:44 +0200 Subject: [PATCH 56/67] update npm scripts to work cross-platform --- package.json | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 3e4e373..c43bffb 100644 --- a/package.json +++ b/package.json @@ -40,8 +40,8 @@ "test:watch": "jest --watch", "posttest": "npm run lint", "build": "npm run clean && npm run compile && npm run copy-assets && npm run copy-styles", - "copy-assets": "if [ -d src/assets ]; then cp -rv src/assets/ dist/assets/; fi", - "copy-styles": "cd src && find . -name '*.scss' -exec cp --parents '{}' ./../dist/ ';'", + "copy-assets": "if [ -d src/assets ]; then shx --verbose cp -R src/assets/ dist/assets/; fi", + "copy-styles": "if [ -d src/scss ]; then shx --verbose cp -R src/scss/ dist/scss/; fi", "release:major": "npm version major && npm publish && git push --follow-tags", "release:minor": "npm version minor && npm publish && git push --follow-tags", "release:patch": "npm version patch && npm publish && git push --follow-tags", @@ -59,19 +59,20 @@ "file-loader": "0.11.1", "html-loader": "0.4.5", "identity-obj-proxy": "^3.0.0", + "ifdef-loader": "2.0.0", "imports-loader": "0.7.1", "jest": "25.1.0", + "jest-raw-loader": "1.0.1", "node-sass": "^4.13.1", "null-loader": "0.1.1", "raw-loader": "0.5.1", "rimraf": "^3.0.0", + "shx": "^0.3.2", + "ts-jest": "25.2.1", "tslib": "~1.11.0", "tslint": "5.9.1", - "ts-jest": "25.2.1", "typedoc": "~0.16.10", "typescript": "~3.8.2", - "url-loader": "0.5.8", - "ifdef-loader": "2.0.0", - "jest-raw-loader": "1.0.1" + "url-loader": "0.5.8" } } From 4437a9d29328b144d70fb11c6370eae4b2275f2d Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 3 Jun 2020 14:16:57 +0200 Subject: [PATCH 57/67] fix dynamic import statements in phovea.js --- phovea.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/phovea.js b/phovea.js index 089780a..79b5402 100644 --- a/phovea.js +++ b/phovea.js @@ -8,7 +8,7 @@ module.exports = function(registry) { //registry.push('extension-type', 'extension-id', function() { return import('./dist/extension_impl'); }, {}); registry.push('vis', 'axis', function () { - return import('./dist/base/axis'); + return import('./dist/base/axis').then((a) => a.Axis); }, { factory: 'createAxis', name: 'Axis', @@ -40,7 +40,7 @@ module.exports = function(registry) { } }); registry.push('vis', 'barplot', function () { - return import('./dist/list/barplot'); + return import('./dist/list/barplot').then((b) => b.BarPlot); }, { factory: 'createBarPlot', name: 'Bar Plot', @@ -56,7 +56,7 @@ module.exports = function(registry) { }); registry.push('vis', 'table', function () { - return import('./dist/base/table'); + return import('./dist/base/table').then((t) => t.Table); }, { factory: 'createTable', name: 'Table', @@ -65,7 +65,7 @@ module.exports = function(registry) { }); registry.push('vis', 'list', function () { - return import('./dist/list/list'); + return import('./dist/list/list').then((l) => l.List); }, { factory: 'createList', name: 'List', @@ -76,7 +76,7 @@ module.exports = function(registry) { ] }); registry.push('vis', 'proportionalSymbol', function () { - return import('./dist/list/proportionalSymbol'); + return import('./dist/list/proportionalSymbol').then((p) => p.ProportionalSymbol); }, { factory: 'createProportionalSymbol', name: 'Proportional Symbol', @@ -91,7 +91,7 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-heatmap', function () { - return import('./dist/heatmap/HeatMap'); + return import('./dist/heatmap/HeatMap').then((h) => h.HeatMap); }, { factory: 'createRenderer', name: 'HeatMap', @@ -101,7 +101,7 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-heatmap1d', function () { - return import('./dist/heatmap/HeatMap1D'); + return import('./dist/heatmap/HeatMap1D').then((h) => h.HeatMap1D); }, { factory: 'create1D', name: 'HeatMap 1D', @@ -115,7 +115,7 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-kaplanmeier', function () { - return import('./dist/base/kaplanmeier'); + return import('./dist/base/kaplanmeier').then((k) => k.KaplanMeierPlot); }, { factory: 'createKaplanMeierPlot', name: 'Kaplanmeier Plot', @@ -129,7 +129,7 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-histogram', function () { - return import('./dist/distribution/Histogram'); + return import('./dist/distribution/Histogram').then((h) => h.Histogram); }, { factory: 'createHistrogram', name: 'Histogram', @@ -141,7 +141,7 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-mosaic', function () { - return import('./dist/distribution/Mosaic'); + return import('./dist/distribution/Mosaic').then((m) => m.Mosaic); }, { name: 'Mosaic', factory: 'createMosaic', @@ -158,7 +158,7 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-pie', function () { - return import('./dist/distribution/Pie'); + return import('./dist/distribution/Pie').then((p) => p.Pie); }, { name: 'Pie', factory: 'createPie', @@ -171,7 +171,7 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-box', function () { - return import('./dist/base/box'); + return import('./dist/base/box').then((b) => b.BoxPlot); }, { factory: 'createBoxPlot', name: 'BoxPlot', @@ -184,7 +184,7 @@ module.exports = function(registry) { }); registry.push('vis', 'force-directed-graph', function () { - return import('./dist/base/force_directed_graph'); + return import('./dist/base/force_directed_graph').then((f) => f.ForceDirectedGraphVis); }, { factory: 'createForceDirectedGraphVis', name: 'Force Directed Graph', From 25be2088fc0d32c6437349bd38c2a9908d0b374d Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Sun, 14 Jun 2020 13:47:36 +0200 Subject: [PATCH 58/67] update conf files --- dist/phovea.d.ts | 1 + dist/phovea.js | 188 +++++++++++++++++++++++++++++++++++++ jest.config.js | 18 +--- package.json | 19 +--- phovea_registry.js | 3 +- phovea.js => src/phovea.ts | 50 +++++----- tsconfig.json | 51 +++++----- tsconfig_dev.json | 6 -- tsd.d.ts | 10 -- 9 files changed, 249 insertions(+), 97 deletions(-) create mode 100644 dist/phovea.d.ts create mode 100644 dist/phovea.js rename phovea.js => src/phovea.ts (68%) delete mode 100644 tsconfig_dev.json diff --git a/dist/phovea.d.ts b/dist/phovea.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/dist/phovea.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/dist/phovea.js b/dist/phovea.js new file mode 100644 index 0000000..272795b --- /dev/null +++ b/dist/phovea.js @@ -0,0 +1,188 @@ +/* ***************************************************************************** + * Caleydo - Visualization for Molecular Biology - http://caleydo.org + * Copyright (c) The Caleydo Team. All rights reserved. + * Licensed under the new BSD license, available at http://caleydo.org/license + **************************************************************************** */ +//register all extensions in the registry following the given pattern +module.exports = function (registry) { + //registry.push('extension-type', 'extension-id', function() { return import('./dist/extension_impl'); }, {}); + registry.push('vis', 'axis', function () { + return import('./base/axis').then((a) => a.Axis); + }, { + factory: 'createAxis', + name: 'Axis', + icon() { return import('./assets/axis_icon.svg'); }, + scaling: 'height-only', + filter: [ + 'vector', + '(real|int)' + ], + options: { + tickSize: { + type: 'int', + range: [ + 1, + null + ], + default: 2 + }, + orient: { + type: 'categorical', + categories: [ + 'left', + 'right', + 'top', + 'bottom' + ], + default: 'left' + } + } + }); + registry.push('vis', 'barplot', function () { + return import('./list/barplot').then((b) => b.BarPlot); + }, { + factory: 'createBarPlot', + name: 'Bar Plot', + icon() { return import('./assets/barplot_icon.png'); }, + sizeDependsOnDataDimension: [ + false, + true + ], + filter: [ + 'vector', + '(real|int)' + ] + }); + registry.push('vis', 'table', function () { + return import('./base/table').then((t) => t.Table); + }, { + factory: 'createTable', + name: 'Table', + filter: '(matrix|table|vector)', + sizeDependsOnDataDimension: true + }); + registry.push('vis', 'list', function () { + return import('./list/list').then((l) => l.List); + }, { + factory: 'createList', + name: 'List', + filter: 'vector', + sizeDependsOnDataDimension: [ + false, + true + ] + }); + registry.push('vis', 'proportionalSymbol', function () { + return import('./list/proportionalSymbol').then((p) => p.ProportionalSymbol); + }, { + factory: 'createProportionalSymbol', + name: 'Proportional Symbol', + filter: [ + 'vector', + '(real|int)' + ], + sizeDependsOnDataDimension: [ + false, + true + ] + }); + registry.push('vis', 'phovea-vis-heatmap', function () { + return import('./heatmap/HeatMap').then((h) => h.HeatMap); + }, { + factory: 'createRenderer', + name: 'HeatMap', + icon() { return import('./assets/heatmap_icon.svg'); }, + sizeDependsOnDataDimension: true, + filter: 'matrix' + }); + registry.push('vis', 'phovea-vis-heatmap1d', function () { + return import('./heatmap/HeatMap1D').then((h) => h.HeatMap1D); + }, { + factory: 'create1D', + name: 'HeatMap 1D', + icon() { return import('./assets/heatmap_icon.svg'); }, + sizeDependsOnDataDimension: [ + false, + true + ], + scaling: 'height-only', + filter: ['vector', '(real|int|categorical)'] + }); + registry.push('vis', 'phovea-vis-kaplanmeier', function () { + return import('./base/kaplanmeier').then((k) => k.KaplanMeierPlot); + }, { + factory: 'createKaplanMeierPlot', + name: 'Kaplanmeier Plot', + icon() { return import('./assets/kaplanmeier_icon.svg'); }, + sizeDependsOnDataDimension: [ + false, + false + ], + scaling: 'aspect', + filter: ['vector', 'int'] + }); + registry.push('vis', 'phovea-vis-histogram', function () { + return import('./distribution/Histogram').then((h) => h.Histogram); + }, { + factory: 'createHistrogram', + name: 'Histogram', + icon() { return import('./assets/distribution_histogram_icon.png'); }, + filter: [ + '(vector|matrix|stratification)', + '(categorical|real|int)' + ] + }); + registry.push('vis', 'phovea-vis-mosaic', function () { + return import('./distribution/Mosaic').then((m) => m.Mosaic); + }, { + name: 'Mosaic', + factory: 'createMosaic', + icon() { return import('./assets/distribution_mosaic_icon.png'); }, + sizeDependsOnDataDimension: [ + false, + true + ], + scaling: 'height-only', + filter: [ + '(vector|stratification)', + 'categorical' + ] + }); + registry.push('vis', 'phovea-vis-pie', function () { + return import('./distribution/Pie').then((p) => p.Pie); + }, { + name: 'Pie', + factory: 'createPie', + icon() { return import('./assets/distribution_pie_icon.png'); }, + scaling: 'aspect', + filter: [ + '(vector|stratification)', + 'categorical' + ] + }); + registry.push('vis', 'phovea-vis-box', function () { + return import('./base/box').then((b) => b.BoxPlot); + }, { + factory: 'createBoxPlot', + name: 'BoxPlot', + icon() { return import('./assets/box_icon.png'); }, + scaling: 'aspect', + filter: [ + 'vector', + '(real|int)' + ] + }); + registry.push('vis', 'force-directed-graph', function () { + return import('./base/force_directed_graph').then((f) => f.ForceDirectedGraphVis); + }, { + factory: 'createForceDirectedGraphVis', + name: 'Force Directed Graph', + filter: 'graph', + icon() { return import('./assets/force_directed_graph.svg'); }, + sizeDependsOnDataDimension: [ + false, + false + ] + }); +}; +//# sourceMappingURL=phovea.js.map \ No newline at end of file diff --git a/jest.config.js b/jest.config.js index a66b095..b0e54bb 100644 --- a/jest.config.js +++ b/jest.config.js @@ -30,26 +30,18 @@ module.exports = { "node" ], modulePaths: [ - "src", - "../node_modules", - "../" + "src" ], transformIgnorePatterns: [`../node_modules/${pluginsToTransform}`, `node_modules/${pluginsToTransform}`], globals: { "__VERSION__": "TEST_VERSION", "__APP_CONTEXT__": "TEST_CONTEXT", - 'ts-jest': { - // has to be set to true, otherwise i18n import fails - "tsConfig": { - "esModuleInterop": true, - } + // has to be set to true, otherwise i18n import fails + "tsConfig": { + "esModuleInterop": true } }, moduleNameMapper: { - "^.+\\.(css|less|scss|sass|png|jpg|gif)$": "identity-obj-proxy", - "imports-loader?.*": "imports-loader", - "raw-loader?.*": "raw-loader", - "file-loader?.*": "file-loader", - "script-loader?.*": "script-loader" + "^.+\\.(css|less|scss|sass|png|jpg|gif)$": "identity-obj-proxy" } } diff --git a/package.json b/package.json index c43bffb..543d50d 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,6 @@ "types": "dist/index.d.ts", "files": [ "src", - "index.js", - "phovea.js", "phovea_registry.js", "dist" ], @@ -33,6 +31,7 @@ "clean": "rimraf lib dist && npm run clean:compile", "clean:compile": "rimraf src/**/*.map src/**/*.js src/**/*.d.ts tests/**/*.js tests/**/*.map tests/**/*.d.ts demo/**/*.js demo/**/*.map demo/**/*.d.ts", "compile": "tsc", + "compile:watch": "tsc -w", "lint": "tslint -c tslint.json -p . 'src/**/*.ts?(x)' 'tests/**/*.ts?(x)'", "docs": "typedoc --options typedoc.json src/**.ts", "prebuild": "node -e \"process.exit(process.env.PHOVEA_SKIP_TESTS === undefined?1:0)\" || npm run test", @@ -40,8 +39,8 @@ "test:watch": "jest --watch", "posttest": "npm run lint", "build": "npm run clean && npm run compile && npm run copy-assets && npm run copy-styles", - "copy-assets": "if [ -d src/assets ]; then shx --verbose cp -R src/assets/ dist/assets/; fi", - "copy-styles": "if [ -d src/scss ]; then shx --verbose cp -R src/scss/ dist/scss/; fi", + "copy-assets": "if [ -d src/assets ]; then shx --verbose cp -R src/assets/. dist/assets/; fi", + "copy-styles": "if [ -d src/scss ]; then shx --verbose cp -R src/scss/. dist/scss/; fi", "release:major": "npm version major && npm publish && git push --follow-tags", "release:minor": "npm version minor && npm publish && git push --follow-tags", "release:patch": "npm version patch && npm publish && git push --follow-tags", @@ -49,30 +48,22 @@ "dist": "mkdir lib && cd dist && tar cvzf ../lib/phovea_vis.tar.gz *" }, "dependencies": { - "@types/d3": "~3.5.36", "d3": "~3.5.17", "phovea_core": "github:phovea/phovea_core#asteiner/refactoring", "phovea_d3": "github:phovea/phovea_d3#vstoiber/refactoring" }, "devDependencies": { + "@types/d3": "~3.5.36", "@types/jest": "25.1.4", - "file-loader": "0.11.1", - "html-loader": "0.4.5", "identity-obj-proxy": "^3.0.0", - "ifdef-loader": "2.0.0", - "imports-loader": "0.7.1", "jest": "25.1.0", "jest-raw-loader": "1.0.1", - "node-sass": "^4.13.1", - "null-loader": "0.1.1", - "raw-loader": "0.5.1", "rimraf": "^3.0.0", "shx": "^0.3.2", "ts-jest": "25.2.1", "tslib": "~1.11.0", "tslint": "5.9.1", "typedoc": "~0.16.10", - "typescript": "~3.8.2", - "url-loader": "0.5.8" + "typescript": "~3.8.2" } } diff --git a/phovea_registry.js b/phovea_registry.js index be70199..a082d23 100644 --- a/phovea_registry.js +++ b/phovea_registry.js @@ -5,6 +5,7 @@ **************************************************************************** */ import {PluginRegistry} from 'phovea_core'; +import reg from './dist/phovea'; /** * build a registry by registering all phovea modules @@ -13,4 +14,4 @@ import {PluginRegistry} from 'phovea_core'; import 'phovea_core/phovea_registry.js'; import 'phovea_d3/phovea_registry.js'; //self -PluginRegistry.getInstance().register('phovea_vis',require('./phovea.js')); +PluginRegistry.getInstance().register('phovea_vis',reg); diff --git a/phovea.js b/src/phovea.ts similarity index 68% rename from phovea.js rename to src/phovea.ts index 79b5402..db5eddd 100644 --- a/phovea.js +++ b/src/phovea.ts @@ -4,15 +4,17 @@ * Licensed under the new BSD license, available at http://caleydo.org/license **************************************************************************** */ +import {IRegistry} from 'phovea_core'; + //register all extensions in the registry following the given pattern -module.exports = function(registry) { +module.exports = function(registry: IRegistry) { //registry.push('extension-type', 'extension-id', function() { return import('./dist/extension_impl'); }, {}); registry.push('vis', 'axis', function () { - return import('./dist/base/axis').then((a) => a.Axis); + return import('./base/axis').then((a) => a.Axis); }, { factory: 'createAxis', name: 'Axis', - icon: function() { return import('./dist/assets/axis_icon.svg'); }, + icon() { return import('./assets/axis_icon.svg'); }, scaling: 'height-only', filter: [ 'vector', @@ -40,11 +42,11 @@ module.exports = function(registry) { } }); registry.push('vis', 'barplot', function () { - return import('./dist/list/barplot').then((b) => b.BarPlot); + return import('./list/barplot').then((b) => b.BarPlot); }, { factory: 'createBarPlot', name: 'Bar Plot', - icon: function() { return import('./dist/assets/barplot_icon.png'); }, + icon() { return import('./assets/barplot_icon.png'); }, sizeDependsOnDataDimension: [ false, true @@ -56,7 +58,7 @@ module.exports = function(registry) { }); registry.push('vis', 'table', function () { - return import('./dist/base/table').then((t) => t.Table); + return import('./base/table').then((t) => t.Table); }, { factory: 'createTable', name: 'Table', @@ -65,7 +67,7 @@ module.exports = function(registry) { }); registry.push('vis', 'list', function () { - return import('./dist/list/list').then((l) => l.List); + return import('./list/list').then((l) => l.List); }, { factory: 'createList', name: 'List', @@ -76,7 +78,7 @@ module.exports = function(registry) { ] }); registry.push('vis', 'proportionalSymbol', function () { - return import('./dist/list/proportionalSymbol').then((p) => p.ProportionalSymbol); + return import('./list/proportionalSymbol').then((p) => p.ProportionalSymbol); }, { factory: 'createProportionalSymbol', name: 'Proportional Symbol', @@ -91,21 +93,21 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-heatmap', function () { - return import('./dist/heatmap/HeatMap').then((h) => h.HeatMap); + return import('./heatmap/HeatMap').then((h) => h.HeatMap); }, { factory: 'createRenderer', name: 'HeatMap', - icon: function() { return import('./dist/assets/heatmap_icon.svg'); }, + icon() { return import('./assets/heatmap_icon.svg'); }, sizeDependsOnDataDimension: true, filter: 'matrix' }); registry.push('vis', 'phovea-vis-heatmap1d', function () { - return import('./dist/heatmap/HeatMap1D').then((h) => h.HeatMap1D); + return import('./heatmap/HeatMap1D').then((h) => h.HeatMap1D); }, { factory: 'create1D', name: 'HeatMap 1D', - icon: function() { return import('./dist/assets/heatmap_icon.svg'); }, + icon() { return import('./assets/heatmap_icon.svg'); }, sizeDependsOnDataDimension: [ false, true @@ -115,11 +117,11 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-kaplanmeier', function () { - return import('./dist/base/kaplanmeier').then((k) => k.KaplanMeierPlot); + return import('./base/kaplanmeier').then((k) => k.KaplanMeierPlot); }, { factory: 'createKaplanMeierPlot', name: 'Kaplanmeier Plot', - icon: function() { return import('./dist/assets/kaplanmeier_icon.svg'); }, + icon() { return import('./assets/kaplanmeier_icon.svg'); }, sizeDependsOnDataDimension: [ false, false @@ -129,11 +131,11 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-histogram', function () { - return import('./dist/distribution/Histogram').then((h) => h.Histogram); + return import('./distribution/Histogram').then((h) => h.Histogram); }, { factory: 'createHistrogram', name: 'Histogram', - icon: function() { return import('./dist/assets/distribution_histogram_icon.png'); }, + icon() { return import('./assets/distribution_histogram_icon.png'); }, filter: [ '(vector|matrix|stratification)', '(categorical|real|int)' @@ -141,11 +143,11 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-mosaic', function () { - return import('./dist/distribution/Mosaic').then((m) => m.Mosaic); + return import('./distribution/Mosaic').then((m) => m.Mosaic); }, { name: 'Mosaic', factory: 'createMosaic', - icon: function() { return import('./dist/assets/distribution_mosaic_icon.png'); }, + icon() { return import('./assets/distribution_mosaic_icon.png'); }, sizeDependsOnDataDimension: [ false, true @@ -158,11 +160,11 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-pie', function () { - return import('./dist/distribution/Pie').then((p) => p.Pie); + return import('./distribution/Pie').then((p) => p.Pie); }, { name: 'Pie', factory: 'createPie', - icon: function() { return import('./dist/assets/distribution_pie_icon.png'); }, + icon() { return import('./assets/distribution_pie_icon.png'); }, scaling: 'aspect', filter: [ '(vector|stratification)', @@ -171,11 +173,11 @@ module.exports = function(registry) { }); registry.push('vis', 'phovea-vis-box', function () { - return import('./dist/base/box').then((b) => b.BoxPlot); + return import('./base/box').then((b) => b.BoxPlot); }, { factory: 'createBoxPlot', name: 'BoxPlot', - icon: function() { return import('./dist/assets/box_icon.png'); }, + icon() { return import('./assets/box_icon.png'); }, scaling: 'aspect', filter: [ 'vector', @@ -184,12 +186,12 @@ module.exports = function(registry) { }); registry.push('vis', 'force-directed-graph', function () { - return import('./dist/base/force_directed_graph').then((f) => f.ForceDirectedGraphVis); + return import('./base/force_directed_graph').then((f) => f.ForceDirectedGraphVis); }, { factory: 'createForceDirectedGraphVis', name: 'Force Directed Graph', filter: 'graph', - icon: function() { return import('./dist/assets/force_directed_graph.svg'); }, + icon() { return import('./assets/force_directed_graph.svg'); }, sizeDependsOnDataDimension: [ false, false diff --git a/tsconfig.json b/tsconfig.json index 5e27e6a..52440f6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,32 +1,25 @@ { "compilerOptions": { - "module": "ES2020", - "target": "ES2019", - "importHelpers": true, - "sourceMap": true, - "declaration": true, - "moduleResolution": "node", - "jsx": "react", - "allowJs": true, - "declarationDir": "dist", - "outDir": "dist", - "experimentalDecorators": true, - "lib": [ - "dom", - "es2015", - "es2016.array.include", - "es2017.object" - ], - "noImplicitAny": false, - "skipLibCheck": true, - "esModuleInterop": false, - "allowSyntheticDefaultImports": true // required for i18next - }, - "include": [ - "dist/index.d.ts", - "src/**/*.ts", - "src/**/*.tsx", - "index.ts", - "tsd.d.ts" - ] + "module": "ES2020", + "target": "ES2019", + "importHelpers": true, + "sourceMap": true, + "declaration": true, + "moduleResolution": "node", + "jsx": "react", + "allowJs": true, + "declarationDir": "dist", + "outDir": "dist", + "experimentalDecorators": true, + "noImplicitAny": false, + "skipLibCheck": true, + "esModuleInterop": false, + "resolveJsonModule": true, + "allowSyntheticDefaultImports": true +}, +"include": [ + "src/**/*.ts", + "src/**/*.tsx", + "tsd.d.ts" +] } diff --git a/tsconfig_dev.json b/tsconfig_dev.json deleted file mode 100644 index 807b9bf..0000000 --- a/tsconfig_dev.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "./tsconfig", - "compilerOptions": { - "target": "es6" - } -} diff --git a/tsd.d.ts b/tsd.d.ts index 146f562..4796ea2 100644 --- a/tsd.d.ts +++ b/tsd.d.ts @@ -28,13 +28,3 @@ declare module "*.xml" { const content:string; export default content; } -//allow json dependencies -declare module "*.json"; -//allow file dependencies -declare module "file-loader!*"; -//allow file dependencies -declare module "raw-loader!*"; -//allow url dependencies -declare module "url-loader!*"; -//allow html dependencies -declare module "imports-loader!*"; From 499deb5ab802941c908deed42406db0124aff7c3 Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Mon, 15 Jun 2020 10:05:14 +0200 Subject: [PATCH 59/67] update jest config --- jest.config.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jest.config.js b/jest.config.js index b0e54bb..12fff0f 100644 --- a/jest.config.js +++ b/jest.config.js @@ -36,9 +36,11 @@ module.exports = { globals: { "__VERSION__": "TEST_VERSION", "__APP_CONTEXT__": "TEST_CONTEXT", - // has to be set to true, otherwise i18n import fails - "tsConfig": { - "esModuleInterop": true + 'ts-jest': { + // has to be set to true, otherwise i18n import fails + "tsConfig": { + "esModuleInterop": true, + } } }, moduleNameMapper: { From d2fc18cef7fe3b5dee351dc8c365999315034a49 Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Mon, 6 Jul 2020 08:31:44 +0200 Subject: [PATCH 60/67] add commonheatmap options --- dist/heatmap/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/dist/heatmap/index.js b/dist/heatmap/index.js index 93287aa..59009c4 100644 --- a/dist/heatmap/index.js +++ b/dist/heatmap/index.js @@ -10,4 +10,5 @@ export * from './AHeatMapCanvasRenderer'; export * from './HeatMapCanvasRenderer'; export * from './HeatMapDOMRenderer'; export * from './HeatMapImageRenderer'; +export * from './ICommonHeatMapOptions'; //# sourceMappingURL=index.js.map \ No newline at end of file From d75e80b4b218a8f4152e4c5b61ecdcb864822d4e Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Sun, 12 Jul 2020 17:22:35 +0200 Subject: [PATCH 61/67] add mapping --- .gitignore | 3 ++- dist/base/axis.js.map | 1 + dist/base/box.js.map | 1 + dist/base/force_directed_graph.js.map | 1 + dist/base/index.js.map | 1 + dist/base/kaplanmeier.js.map | 1 + dist/base/table.js.map | 1 + dist/distribution/HistData.js.map | 1 + dist/distribution/Histogram.js.map | 1 + dist/distribution/Mosaic.js.map | 1 + dist/distribution/Pie.js.map | 1 + dist/distribution/index.js.map | 1 + dist/heatmap/AHeatMapCanvasRenderer.js.map | 1 + dist/heatmap/DefaultUtils.js.map | 1 + dist/heatmap/HeatMap.js.map | 1 + dist/heatmap/HeatMap1D.js.map | 1 + dist/heatmap/HeatMapCanvasRenderer.js.map | 1 + dist/heatmap/HeatMapDOMRenderer.js.map | 1 + dist/heatmap/HeatMapImageRenderer.js.map | 1 + dist/heatmap/ICommonHeatMapOptions.js.map | 1 + dist/heatmap/IHeatMapRenderer.js.map | 1 + dist/heatmap/IScale.js.map | 1 + dist/heatmap/index.js | 1 - dist/heatmap/index.js.map | 1 + dist/index.js.map | 1 + dist/list/barplot.js.map | 1 + dist/list/index.js.map | 1 + dist/list/internal/AList.js.map | 1 + dist/list/internal/internal.js.map | 1 + dist/list/list.js.map | 1 + dist/list/proportionalSymbol.js.map | 1 + dist/phovea.js.map | 1 + 32 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 dist/base/axis.js.map create mode 100644 dist/base/box.js.map create mode 100644 dist/base/force_directed_graph.js.map create mode 100644 dist/base/index.js.map create mode 100644 dist/base/kaplanmeier.js.map create mode 100644 dist/base/table.js.map create mode 100644 dist/distribution/HistData.js.map create mode 100644 dist/distribution/Histogram.js.map create mode 100644 dist/distribution/Mosaic.js.map create mode 100644 dist/distribution/Pie.js.map create mode 100644 dist/distribution/index.js.map create mode 100644 dist/heatmap/AHeatMapCanvasRenderer.js.map create mode 100644 dist/heatmap/DefaultUtils.js.map create mode 100644 dist/heatmap/HeatMap.js.map create mode 100644 dist/heatmap/HeatMap1D.js.map create mode 100644 dist/heatmap/HeatMapCanvasRenderer.js.map create mode 100644 dist/heatmap/HeatMapDOMRenderer.js.map create mode 100644 dist/heatmap/HeatMapImageRenderer.js.map create mode 100644 dist/heatmap/ICommonHeatMapOptions.js.map create mode 100644 dist/heatmap/IHeatMapRenderer.js.map create mode 100644 dist/heatmap/IScale.js.map create mode 100644 dist/heatmap/index.js.map create mode 100644 dist/index.js.map create mode 100644 dist/list/barplot.js.map create mode 100644 dist/list/index.js.map create mode 100644 dist/list/internal/AList.js.map create mode 100644 dist/list/internal/internal.js.map create mode 100644 dist/list/list.js.map create mode 100644 dist/list/proportionalSymbol.js.map create mode 100644 dist/phovea.js.map diff --git a/.gitignore b/.gitignore index 780eed8..df479e8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,8 @@ node_modules/ /src/**/*.js /tests/**/*.js -*.map +/src/**/*.map +/tests/**/*.map *.css *.log /.cache-loader diff --git a/dist/base/axis.js.map b/dist/base/axis.js.map new file mode 100644 index 0000000..a68c6be --- /dev/null +++ b/dist/base/axis.js.map @@ -0,0 +1 @@ +{"version":3,"file":"axis.js","sourceRoot":"","sources":["../../src/base/axis.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,YAAY,EAAgB,QAAQ,EAAkC,MAAM,aAAa,CAAC;AAClG,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AA0BlC,MAAM,OAAO,IAAK,SAAQ,YAAY;IAgBpC,YAA4B,IAAsB,EAAE,MAAmB,EAAE,UAAwB,EAAE;QACjG,KAAK,EAAE,CAAC;QADkB,SAAI,GAAJ,IAAI,CAAkB;QAfjC,YAAO,GAAiB;YACvC,KAAK,EAAE,EAAE;YACT,QAAQ,EAAE,CAAC;YACX,MAAM,EAAE,MAAM;YACd,CAAC,EAAE,CAAC;YACJ,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YACb,MAAM,EAAE,CAAC;SACV,CAAC;QAUA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAEvC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAC3C,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACvB,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC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I,CAAC,OAAO,CAAC,KAAK,CAAC;gBAC5B,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;gBACX,MAAM;YACR,KAAK,KAAK;gBACR,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;gBAChB,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;gBAChB,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;gBAC5B,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;gBACX,MAAM;YACR,KAAK,QAAQ;gBACX,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;gBAChB,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;gBAChB,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;gBACnC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;gBACX,MAAM;SACT;QACD,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QACzB,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QACzB,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,IAAsB,EAAE,MAAmB,EAAE,OAAqB;QAClF,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;CACF"} \ No newline at end of file diff --git a/dist/base/box.js.map b/dist/base/box.js.map new file mode 100644 index 0000000..2c65ac5 --- /dev/null +++ b/dist/base/box.js.map @@ -0,0 +1 @@ +{"version":3,"file":"box.js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,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;SAC7D;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,UAAU,IAAI;YAC9C,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;YACvC,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,aAAa,CAAC,IAAsB,EAAE,MAAe,EAAE,OAAyB;QACrF,OAAO,IAAI,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;CACF"} \ No newline at end of file diff --git a/dist/base/force_directed_graph.js.map b/dist/base/force_directed_graph.js.map new file mode 100644 index 0000000..1d494f3 --- /dev/null +++ b/dist/base/force_directed_graph.js.map @@ -0,0 +1 @@ +{"version":3,"file":"force_directed_graph.js","sourceRoot":"","sources":["../../src/base/force_directed_graph.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAC,YAAY,EAAgB,QAAQ,EAAsB,MAAM,aAAa,CAAC;AACtF,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAmBtC,MAAM,OAAO,qBAAsB,SAAQ,YAAY;IASrD,YAA4B,IAAgB,EAAS,MAAe,EAAE,UAAsC,EAAE;QAC5G,KAAK,EAAE,CAAC;QADkB,SAAI,GAAJ,IAAI,CAAY;QAAS,WAAM,GAAN,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C;iBAC7B,CAAC,CAAC;gBAEH,MAAM,CAAC,IAAI,CAAC;oBACV,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAO,CAAE,CAAC,CAAC;oBACrB,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAO,CAAE,CAAC,CAAC;iBACtB,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,SAAS,EAAE,CAAC;YACjB,CAAC,CAAC,KAAK,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,CAAC,2BAA2B,CAAC,IAAgB,EAAE,MAAe,EAAE,OAAoC;QACxG,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF"} \ No newline at end of file diff --git a/dist/base/index.js.map b/dist/base/index.js.map new file mode 100644 index 0000000..0b30df1 --- /dev/null +++ b/dist/base/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/base/kaplanmeier.js.map b/dist/base/kaplanmeier.js.map new file mode 100644 index 0000000..8d2694a --- /dev/null +++ b/dist/base/kaplanmeier.js.map @@ -0,0 +1 @@ +{"version":3,"file":"kaplanmeier.js","sourceRoot":"","sources":["../../src/base/kaplanmeier.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,OAAO,EAAC,YAAY,EAAgB,QAAQ,EAAsB,MAAM,aAAa,CAAC;AACtF,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAuBtC,MA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AAI,CAAC;IACd,CAAC;IAED,MAAM,CAAC,qBAAqB,CAAC,IAAsB,EAAE,MAAe,EAAE,OAA6B;QACjG,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;CACF"} \ No newline at end of file diff --git a/dist/base/table.js.map b/dist/base/table.js.map new file mode 100644 index 0000000..aa4b098 --- /dev/null +++ b/dist/base/table.js.map @@ -0,0 +1 @@ +{"version":3,"file":"table.js","sourceRoot":"","sources":["../../src/base/table.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,OAAO,EAAC,YAAY,EAAgB,QAAQ,EAAsB,MAAM,aAAa,CAAC;AACtF,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAIjC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAItC,MAAM,OAAO,KAAM,SAAQ,YAAY;IAOrC,YAA4B,IAAkC,EAAE,MAAe,EAAE,UAAyB,EAAE;QAC1G,KAAK,EAAE,CAAC;QADkB,SAAI,GAAJ,IAAI,CAA8B;QAL7C,YAAO,GAAkB;YACxC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YACb,MAAM,EAAE,CAAC;SACV,CAAC;QAIA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACvC,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7B,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,6DAA6D;YACrF,KAAK,QAAQ;gBACX,MAAM,OAAO,GAAe,IAAI,CAAC;gBACjC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,OAAO,C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E,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAM,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAC5D,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAC1B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAClB,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC;YACvB,CAAC,CAAC,CAAC;YACH,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC;YACtB,IAAI,CAAC,SAAS,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,IAAkC,EAAE,MAAe,EAAE,OAAuB;QAC7F,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;CACF"} \ No newline at end of file diff --git a/dist/distribution/HistData.js.map b/dist/distribution/HistData.js.map new file mode 100644 index 0000000..e09da42 --- /dev/null +++ b/dist/distribution/HistData.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HistData.js","sourceRoot":"","sources":["../../src/distribution/HistData.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAGzB,OAAO,EACL,cAAc,EAEf,MAAM,aAAa,CAAC;AAcrB,MAAM,OAAO,SAAS;IAEpB,MAAM,CAAC,yBAAyB,CAAC,IAAmB;QAClD,MAAM,UAAU,GAAU,IAAI,CAAC,UAAU,CAAC;QAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC;QAC1D,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC;QAC9B,MAAM,IAAI,GAAG,EAAE,CAAC;QAChB,IAAI,GAAG,GAAG,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,OAAO,IAAI,CAAC,UAAU,CAAC;aACxB;YACD,IAAI,CAAC,KAAK,KAAK,EAAE;gBACf,OAAO,IAAI,CAAC,UAAU,CAAC;aACxB;YACD,OAAe,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;IACL,CAAC;CACF"} \ No newline at end of file diff --git a/dist/distribution/Histogram.js.map b/dist/distribution/Histogram.js.map new file mode 100644 index 0000000..4767ddb --- /dev/null +++ b/dist/distribution/Histogram.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Histogram.js","sourceRoot":"","sources":["../../src/distribution/Histogram.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;AAElD,OAAO,EAAC,YAAY,EAAgB,QAAQ,EAAa,MAAM,aAAa,CAAC;AAI7E,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,SAAS,EAAgD,MAAM,YAAY,CAAC;AA0BpF,MAAM,OAAO,SAAU,SAAQ,YAAY;IAiBzC,YAA4B,IAAuF,EAAE,MAAe,EAAE,UAA6B,EAAE;QACnK,KAAK,EAAE,CAAC;QADkB,SAAI,GAAJ,IAAI,CAAmF;QAhB3G,YAAO,GAAsB;YACnC,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,IAAI;YACX,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YACb,MAAM,EAAE,CAAC;SACV,CAAC;QAYA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE;YAC5B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SAC1C,EAAE,OAAO,CAAC,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AAM,GAAG,MAAM,CAAC;QAC7B,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,CAAC,gBAAgB,CAAC,IAAuE,EAAE,MAAe,EAAE,OAA2B;QAC3I,OAAO,IAAI,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;CACF"} \ No newline at end of file diff --git a/dist/distribution/Mosaic.js.map b/dist/distribution/Mosaic.js.map new file mode 100644 index 0000000..4ddc75e --- /dev/null +++ b/dist/distribution/Mosaic.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Mosaic.js","sourceRoot":"","sources":["../../src/distribution/Mosaic.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;AAElD,OAAO,EAAC,YAAY,EAAgB,QAAQ,EAAa,MAAM,aAAa,CAAC;AAI7E,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAClC,OAAO,EAAC,SAAS,EAAkC,MAAM,YAAY,CAAC;AA2BtE,MAAM,OAAO,MAAO,SAAQ,YAAY;IAgBtC,YAA4B,IAAuF,EAAE,MAAe,EAAE,UAA0B,EAAE;QAChK,KAAK,EAAE,CAAC;QADkB,SAAI,GAAJ,IAAI,CAAmF;QAflG,YAAO,GAAmB;YACzC,KAAK,EAAE,EAAE;YACT,YAAY,EAAE,EAAE;YAChB,QAAQ,EAAE,GAAG;YACb,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;YACb,MAAM,EAAE,CAAC;SACV,CAAC;QASA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE;YAC5B,KAAK,EAAE,CAAC,CAAC,E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MAAM,IAAI,CAAC;SACjC,CAAC;QACF,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;YAC1B,OAAO,GAAG,CAAC;SACZ;QACD,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC;QAC1B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;YACd,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;YACzB,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;SAC3B,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;QACnD,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;QAErF,MAAM,GAAG,GAAG,EAAC,KAAK,EAAE,MAAM,EAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QACjC,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;QAC7B,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,IAAuF,EAAE,MAAe,EAAE,OAAwB;QACpJ,OAAO,IAAI,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;CACF"} \ No newline at end of file diff --git a/dist/distribution/Pie.js.map b/dist/distribution/Pie.js.map new file mode 100644 index 0000000..ee891c1 --- /dev/null +++ b/dist/distribution/Pie.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Pie.js","sourceRoot":"","sources":["../../src/distribution/Pie.ts"],"names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ACzD,MAAM,CAAC,GAAG;YACR,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;YAC7B,QAAQ,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC;YACnF,QAAQ,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;SAChF,CAAC;QACF,yBAAyB;QACzB,IAAI,GAAG,GAAG,KAAK,GAAG,IAAI,CAAC,EAAE,EAAE,EAAE,yCAAyC;YACpE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,GAAG,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;SACjI;QACD,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;CAcF"} \ No newline at end of file diff --git a/dist/distribution/index.js.map b/dist/distribution/index.js.map new file mode 100644 index 0000000..4e8a0d0 --- /dev/null +++ b/dist/distribution/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/distribution/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC"} \ No newline at end of file diff --git a/dist/heatmap/AHeatMapCanvasRenderer.js.map b/dist/heatmap/AHeatMapCanvasRenderer.js.map new file mode 100644 index 0000000..8c5aea1 --- /dev/null +++ b/dist/heatmap/AHeatMapCanvasRenderer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AHeatMapCanvasRenderer.js","sourceRoot":"","sources":["../../src/heatmap/AHeatMapCanvasRenderer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAClC,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAGjD,MAAM,OAAgB,sBAAsB;IAE1C,YAA+B,aAA4B,aAAa,CAAC,IAAI,EAAY,OAA8B;QAAxF,eAAU,GAAV,UAAU,CAAoC;QAAY,YAAO,GAAP,OAAO,CAAuB;IAEvH,CAAC;IAED,OAAO,CAAC,KAAwB,EAAE,GAAa,EAAE,KAAe;QAC9D,KAAK,CAAC,SAAS,CAAC,iCAAiC,CAAC,CAAC,IAAI,CAAC;YACtD,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;YACxB,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;SAC1B,CAAC,CAAC;QACH,IAAI,IAAI,CAAC,UAAU,KAAK,aAAa,CAAC,IAAI,EAAE;YAC1C,KAAK,CAAC,KAAK,EAAE,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAClD,IAAI,CAAC,eAAe,CAAoB,KAAK,CAAC,MAAM,CAAC,iCAAiC,CAAC,CAAC,IAAI,EAAE,EAAE,GAAG,EACnG,cAAc,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;YACjD,CAAC,CAAC,CAAC;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CAAC,eAAe,CAAoB,UAAU,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;QACzF,CAAC,CAAC,CAAC;IACL,CAAC;CACF"} \ No newline at end of file diff --git a/dist/heatmap/DefaultUtils.js.map b/dist/heatmap/DefaultUtils.js.map new file mode 100644 index 0000000..0f2e34e --- /dev/null +++ b/dist/heatmap/DefaultUtils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DefaultUtils.js","sourceRoot":"","sources":["../../src/heatmap/DefaultUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,cAAc,EAEf,MAAM,aAAa,CAAC;AAErB,MAAM,OAAO,YAAY;IAEvB,MAAM,CAAC,YAAY,CAAC,KAAqD;QACvE,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,CAAC,sBAAsB,EAAE;YACxD,OAAmC,KAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAa,CAAE,CAAC,KAAK,IAAI,MAAM,CAAC,CAAC;SAClI;QACD,MAAM,EAAE,GAAyB,KAAK,CAAC;QACvC,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;QACnB,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;YACxB,uBAAuB;YACvB,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;SACjC;QACD,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED,MAAM,CAAC,aAAa,CAAC,KAAqD;QACxE,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,CAAC,sBAAsB,EAAE;YACxD,OAAmC,KAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAS,CAAC,CAAC,CAAC,CAAa,CAAE,CAAC,IAAI,CAAC,CAAC;SAC1H;QACD,MAAM,EAAE,GAAyB,KAAK,CAAC;QACvC,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC;QACnB,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;YACxB,uBAAuB;YACvB,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC1D;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,CAAM;QACrB,OAAO,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC;CACF"} \ No newline at end of file diff --git a/dist/heatmap/HeatMap.js.map b/dist/heatmap/HeatMap.js.map new file mode 100644 index 0000000..6b940ae --- /dev/null +++ b/dist/heatmap/HeatMap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HeatMap.js","sourceRoot":"","sources":["../../src/heatmap/HeatMap.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,OAAO,EAAC,YAAY,EAAgB,QAAQ,EAAC,MAAM,aAAa,CAAC;AACjE,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAClD,OAAO,EAAC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AI,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;YAC/B,OAAO,OAAO,CAAC,QAAQ,CAAqB,IAAI,EAAE,MAAM,EAAmB,OAAO,CAAC,CAAC;SACrF;aAAM,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;YACtC,OAAO,SAAS,CAAC,QAAQ,CAAqB,IAAI,EAAE,MAAM,EAAqB,OAAO,CAAC,CAAC;SACzF;QACD,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;CACF"} \ No newline at end of file diff --git a/dist/heatmap/HeatMap1D.js.map b/dist/heatmap/HeatMap1D.js.map new file mode 100644 index 0000000..cdfe5f5 --- /dev/null +++ b/dist/heatmap/HeatMap1D.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HeatMap1D.js","sourceRoot":"","sources":["../../src/heatmap/HeatMap1D.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,OAAO,EAAC,YAAY,EAAgB,QAAQ,EAAC,MAAM,aAAa,CAAC;AACjE,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AACtC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAElC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAC,UAAU,EAAS,MAAM,UAAU,CAAC;AAiB5C,MAAM,OAAO,SAAU,SAAQ,YAAY;IAazC,YAA4B,IAAwB,EAAS,MAAe,EAAE,UAA6B,EAAE;QAC3G,KAAK,EAAE,CAAC;QADkB,SAAI,GAAJ,IAAI,CAAoB;QAAS,WAAM,GAAN,MAAM,CAAS;QAT3D,YAAO,GAAsB;YAC5C,YAAY,EAAE,EAAE;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EAAE,MAAmB,EAAE,OAA2B;QACxF,OAAO,IAAI,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;CACF"} \ No newline at end of file diff --git a/dist/heatmap/HeatMapCanvasRenderer.js.map b/dist/heatmap/HeatMapCanvasRenderer.js.map new file mode 100644 index 0000000..f8a404c --- /dev/null +++ b/dist/heatmap/HeatMapCanvasRenderer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HeatMapCanvasRenderer.js","sourceRoot":"","sources":["../../src/heatmap/HeatMapCanvasRenderer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAG5C,OAAO,EAAmB,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAC;AAGhE,MAAM,OAAO,qBAAsB,SAAQ,sBAAsB;IAI/D,YAAY,UAAU,GAAG,aAAa,CAAC,IAAI,EAAE,OAA8B;QACzE,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAHrB,UAAK,GAAG,KAAK,CAAC;IAItB,CAAC;IAED,OAAO,CAAC,KAAwB,EAAE,GAAa,EAAE,KAAe;QAC9D,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC;YAC7B,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;YACxB,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;SAC1B,CAAC,CAAC;QACH,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SAC/C;QAED,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,EAAE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AC,CAAC;YACvC,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAEzC,OAAO,KAAK,CAAC;IAEf,CAAC;CACF"} \ No newline at end of file diff --git a/dist/heatmap/HeatMapDOMRenderer.js.map b/dist/heatmap/HeatMapDOMRenderer.js.map new file mode 100644 index 0000000..1a0c09a --- /dev/null +++ b/dist/heatmap/HeatMapDOMRenderer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HeatMapDOMRenderer.js","sourceRoot":"","sources":["../../src/heatmap/HeatMapDOMRenderer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAClC,OAAO,EAAC,UAAU,EAAC,MAAM,aAAa,CAAC;AACvC,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAG5C,OAAO,EAAmB,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAGnE,MAAM,OAAO,kBAAkB;IAG7B,YAA6B,aAA4B,aAAa,CAAC,IAAI,EAAmB,OAA8B;QAA/F,eAAU,GAAV,UAAU,CAAoC;QAAmB,YAAO,GAAP,OAAO,CAAuB;IAE5H,CAAC;IAED,OAAO,CAAC,KAAwB,EAAE,GAAa,EAAE,KAAe;QAC9D,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;YACvB,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;YACxB,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;SAC1B,CAAC,CAAC;QACH,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,EA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AC,CAAC;QACL,CAAC,CAAC;QACF,IAAI,IAAI,CAAC,UAAU,KAAK,aAAa,CAAC,IAAI,EAAE;YAC1C,IAAI,CAAC,EAAE,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;YAC5B,UAAU,CAAC,WAAW,EAAE,CAAC,gBAAgB,CAAU,EAAE,CAAC,IAAI,EAAE,EAAE;gBAC5D,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;YAC/B,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,iBAAiB,EAAE,CAAC,IAAI,CAAC,UAAU,QAAQ;gBAC9C,CAAC,CAAC,IAAI,EAAE,cAAc,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;YACzD,CAAC,CAAC,CAAC;SACJ;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF"} \ No newline at end of file diff --git a/dist/heatmap/HeatMapImageRenderer.js.map b/dist/heatmap/HeatMapImageRenderer.js.map new file mode 100644 index 0000000..ca4a7ae --- /dev/null +++ b/dist/heatmap/HeatMapImageRenderer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"HeatMapImageRenderer.js","sourceRoot":"","sources":["../../src/heatmap/HeatMapImageRenderer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAC,KAAK,EAAC,MAAM,aAAa,CAAC;AAIlC,OAAO,EAAmB,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAC,eAAe,EAAC,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAE/C,MAAM,OAAO,oBAAqB,SAAQ,sBAAsB;IAK9D,YAAY,UAAU,GAAG,aAAa,CAAC,IAA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CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/D,OAAO,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1D,CAAC;CACF"} \ No newline at end of file diff --git a/dist/heatmap/ICommonHeatMapOptions.js.map b/dist/heatmap/ICommonHeatMapOptions.js.map new file mode 100644 index 0000000..8af0d48 --- /dev/null +++ b/dist/heatmap/ICommonHeatMapOptions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ICommonHeatMapOptions.js","sourceRoot":"","sources":["../../src/heatmap/ICommonHeatMapOptions.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/heatmap/IHeatMapRenderer.js.map b/dist/heatmap/IHeatMapRenderer.js.map new file mode 100644 index 0000000..3927fb2 --- /dev/null +++ b/dist/heatmap/IHeatMapRenderer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IHeatMapRenderer.js","sourceRoot":"","sources":["../../src/heatmap/IHeatMapRenderer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,iDAAI,CAAA;IACJ,+CAAG,CAAA;IACH,qDAAM,CAAA;IACN,iDAAI,CAAA;AACN,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB"} \ No newline at end of file diff --git a/dist/heatmap/IScale.js.map b/dist/heatmap/IScale.js.map new file mode 100644 index 0000000..5b78766 --- /dev/null +++ b/dist/heatmap/IScale.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IScale.js","sourceRoot":"","sources":["../../src/heatmap/IScale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAC,cAAc,EAAC,MAAM,aAAa,CAAC;AAW3C,MAAM,OAAO,UAAU;IACrB,MAAM,CAAC,OAAO,CAAC,KAAK;QAClB,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,CAAC,sBAAsB,EAAE;YACxD,OAAO,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;SAC3B;QACD,OAAO,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IAC3B,CAAC;CACF"} \ No newline at end of file diff --git a/dist/heatmap/index.js b/dist/heatmap/index.js index 59009c4..93287aa 100644 --- a/dist/heatmap/index.js +++ b/dist/heatmap/index.js @@ -10,5 +10,4 @@ export * from './AHeatMapCanvasRenderer'; export * from './HeatMapCanvasRenderer'; export * from './HeatMapDOMRenderer'; export * from './HeatMapImageRenderer'; -export * from './ICommonHeatMapOptions'; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/heatmap/index.js.map b/dist/heatmap/index.js.map new file mode 100644 index 0000000..50c810e --- /dev/null +++ b/dist/heatmap/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/heatmap/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC"} \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map new file mode 100644 index 0000000..467b9b7 --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"} \ No newline at end of file diff --git a/dist/list/barplot.js.map b/dist/list/barplot.js.map new file mode 100644 index 0000000..e980e3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AAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClH,CAAC;IAES,MAAM,CAAC,MAA4B,EAAE,OAA6B;QAC1E,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QACxC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;QACjC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACtD,CAAC;IAES,KAAK;QACb,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QAC5D,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;IAGD,MAAM,CAAC,aAAa,CAAC,IAAsB,EAAE,MAAmB,EAAE,OAAwB;QACxF,OAAO,IAAI,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;CACF"} \ No newline at end of file diff --git a/dist/list/index.js.map b/dist/list/index.js.map new file mode 100644 index 0000000..e92e6dc --- /dev/null +++ b/dist/list/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/list/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC"} \ No newline at end of file diff --git a/dist/list/internal/AList.js.map b/dist/list/internal/AList.js.map new file mode 100644 index 0000000..2872b56 --- /dev/null +++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AI,CAAC,CAAC;QAChE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,CAAC,CAAC;QAExF,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACpE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,GAAQ,EAAE,EAAE;YACjC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YACpD,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACpE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;YAC/B,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC;YACtB,IAAI,CAAC,SAAS,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;IACL,CAAC;CACF"} \ No newline at end of file diff --git a/dist/list/internal/internal.js.map b/dist/list/internal/internal.js.map new file mode 100644 index 0000000..c6ae417 --- /dev/null +++ b/dist/list/internal/internal.js.map @@ -0,0 +1 @@ +{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/list/internal/internal.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/list/list.js.map b/dist/list/list.js.map new file mode 100644 index 0000000..279a292 --- /dev/null +++ b/dist/list/list.js.map @@ -0,0 +1 @@ +{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/list/list.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAC,MAAM,EAAC,MAAM,IAAI,CAAC;AAC1B,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAC,KAAK,EAAgB,MAAM,kBAAkB,CAAC;AAOtD,MAAM,OAAO,IAAK,SAAQ,KAAwC;IAChE,YAAY,IAAgB,EAAE,MAAmB,EAAE,UAAwB,EAAE;QAC3E,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAC,EAAE,OAAO,CAAC,CAAC,CAAC;QAC7E,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAES,MAAM,CAAC,MAAyB,EAAE,OAA0B;QACpE,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAC7E,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACrC,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;QAClF,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC;IAED,MAAM,CAAC,UAAU,CAAC,IAAgB,EAAE,MAAmB,EAAE,OAAqB;QAC5E,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;CAEF"} \ No newline at end of file diff --git a/dist/list/proportionalSymbol.js.map b/dist/list/proportionalSymbol.js.map new file mode 100644 index 0000000..7d51bad --- /dev/null +++ b/dist/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,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClH,CAAC;IAES,MAAM,CAAC,MAA4B,EAAE,OAA6B;QAC1E,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QACxC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;QACpD,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACvD,CAAC;IAES,KAAK;QACb,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QAC5D,OAAO,KAAK,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,IAAsB,EAAE,MAAmB,EAAE,OAAmC;QAC9G,OAAO,IAAI,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;CACF"} \ No newline at end of file diff --git a/dist/phovea.js.map b/dist/phovea.js.map new file mode 100644 index 0000000..354cc36 --- /dev/null +++ b/dist/phovea.js.map @@ -0,0 +1 @@ +{"version":3,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AC,EAAE;QACD,OAAO,EAAE,eAAe;QACxB,IAAI,EAAE,SAAS;QACf,IAAI,KAAK,OAAO,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;QAClD,OAAO,EAAE,QAAQ;QACjB,MAAM,EAAE;YACN,QAAQ;YACR,YAAY;SACb;KAEF,CAAC,CAAC;IACH,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,sBAAsB,EAAE;QAC3C,OAAO,MAAM,CAAC,6BAA6B,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC;IACpF,CAAC,EAAE;QACD,OAAO,EAAE,6BAA6B;QACtC,IAAI,EAAE,sBAAsB;QAC5B,MAAM,EAAE,OAAO;QACf,IAAI,KAAK,OAAO,MAAM,CAAC,mCAAmC,CAAC,CAAC,CAAC,CAAC;QAC9D,0BAA0B,EAAE;YAC1B,KAAK;YACL,KAAK;SACN;KAEF,CAAC,CAAC;AACL,CAAC,CAAC"} \ No newline at end of file From 89d2fd21d62a62c95eb5f6b266b12fdd5f35cd24 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Mon, 13 Jul 2020 10:38:18 +0200 Subject: [PATCH 62/67] use correct factory in phovea.ts --- dist/phovea.js | 4 ++-- dist/phovea.js.map | 2 +- src/phovea.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/phovea.js b/dist/phovea.js index 272795b..080f0a1 100644 --- a/dist/phovea.js +++ b/dist/phovea.js @@ -87,9 +87,9 @@ module.exports = function (registry) { ] }); registry.push('vis', 'phovea-vis-heatmap', function () { - return import('./heatmap/HeatMap').then((h) => h.HeatMap); + return import('./heatmap/HeatMap'); }, { - factory: 'createRenderer', + factory: 'new HeatMap', name: 'HeatMap', icon() { return import('./assets/heatmap_icon.svg'); }, sizeDependsOnDataDimension: true, diff --git a/dist/phovea.js.map b/dist/phovea.js.map index 354cc36..2a63338 100644 --- a/dist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ACN;KAEF,CAAC,CAAC;AACL,CAAC,CAAC"} \ No newline at end of file diff --git a/src/phovea.ts b/src/phovea.ts index db5eddd..21729a7 100644 --- a/src/phovea.ts +++ b/src/phovea.ts @@ -93,9 +93,9 @@ module.exports = function(registry: IRegistry) { }); registry.push('vis', 'phovea-vis-heatmap', function () { - return import('./heatmap/HeatMap').then((h) => h.HeatMap); + return import('./heatmap/HeatMap'); }, { - factory: 'createRenderer', + factory: 'new HeatMap', name: 'HeatMap', icon() { return import('./assets/heatmap_icon.svg'); }, sizeDependsOnDataDimension: true, From 41206e06e4e3a2467774c6e4b18fde69904667ac Mon Sep 17 00:00:00 2001 From: Anita Steiner Date: Tue, 14 Jul 2020 13:01:28 +0200 Subject: [PATCH 63/67] Update .gitignore --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index df479e8..8a7810a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ /.tscache /.idea -/build/ +/lib/ node_modules/ /src/**/*.js /tests/**/*.js @@ -8,5 +8,4 @@ node_modules/ /tests/**/*.map *.css *.log -/.cache-loader package-lock.json From 16df9602809b8ce83ca79ca8567641522a108be3 Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Wed, 15 Jul 2020 08:09:34 +0200 Subject: [PATCH 64/67] change package-json --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 543d50d..fa91950 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,7 @@ "node": ">= 12.13" }, "scripts": { - "clean": "rimraf lib dist && npm run clean:compile", - "clean:compile": "rimraf src/**/*.map src/**/*.js src/**/*.d.ts tests/**/*.js tests/**/*.map tests/**/*.d.ts demo/**/*.js demo/**/*.map demo/**/*.d.ts", + "clean": "rimraf lib dist", "compile": "tsc", "compile:watch": "tsc -w", "lint": "tslint -c tslint.json -p . 'src/**/*.ts?(x)' 'tests/**/*.ts?(x)'", From dd1e050716674327f43eea37f76d2b58427d88cd Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 22 Jul 2020 09:33:59 +0200 Subject: [PATCH 65/67] last update --- dist/heatmap/index.js | 1 + dist/heatmap/index.js.map | 2 +- package.json | 29 ++++++++++++++++------------- tsconfig.json | 3 ++- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/dist/heatmap/index.js b/dist/heatmap/index.js index 93287aa..59009c4 100644 --- a/dist/heatmap/index.js +++ b/dist/heatmap/index.js @@ -10,4 +10,5 @@ export * from './AHeatMapCanvasRenderer'; export * from './HeatMapCanvasRenderer'; export * from './HeatMapDOMRenderer'; export * from './HeatMapImageRenderer'; +export * from './ICommonHeatMapOptions'; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/heatmap/index.js.map b/dist/heatmap/index.js.map index 50c810e..c0283bf 100644 --- a/dist/heatmap/index.js.map +++ b/dist/heatmap/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/heatmap/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/heatmap/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"} \ No newline at end of file diff --git a/package.json b/package.json index fa91950..51654e6 100644 --- a/package.json +++ b/package.json @@ -28,16 +28,19 @@ "node": ">= 12.13" }, "scripts": { - "clean": "rimraf lib dist", + "clean": "rimraf lib dist && npm run clean:compile", + "clean:compile": "rimraf src/**/*.map src/**/*.js src/**/*.d.ts tests/**/*.js tests/**/*.map tests/**/*.d.ts demo/**/*.js demo/**/*.map demo/**/*.d.ts", "compile": "tsc", "compile:watch": "tsc -w", + "postcompile": "npm run copy", "lint": "tslint -c tslint.json -p . 'src/**/*.ts?(x)' 'tests/**/*.ts?(x)'", "docs": "typedoc --options typedoc.json src/**.ts", "prebuild": "node -e \"process.exit(process.env.PHOVEA_SKIP_TESTS === undefined?1:0)\" || npm run test", "test": "jest", "test:watch": "jest --watch", "posttest": "npm run lint", - "build": "npm run clean && npm run compile && npm run copy-assets && npm run copy-styles", + "copy": "npm run copy-assets && npm run copy-styles", + "build": "npm run clean && npm run compile", "copy-assets": "if [ -d src/assets ]; then shx --verbose cp -R src/assets/. dist/assets/; fi", "copy-styles": "if [ -d src/scss ]; then shx --verbose cp -R src/scss/. dist/scss/; fi", "release:major": "npm version major && npm publish && git push --follow-tags", @@ -53,16 +56,16 @@ }, "devDependencies": { "@types/d3": "~3.5.36", - "@types/jest": "25.1.4", - "identity-obj-proxy": "^3.0.0", - "jest": "25.1.0", - "jest-raw-loader": "1.0.1", - "rimraf": "^3.0.0", - "shx": "^0.3.2", - "ts-jest": "25.2.1", - "tslib": "~1.11.0", - "tslint": "5.9.1", - "typedoc": "~0.16.10", - "typescript": "~3.8.2" + "@types/jest": "~26.0.5", + "identity-obj-proxy": "~3.0.0", + "jest": "~26.1.0", + "jest-raw-loader": "~1.0.1", + "rimraf": "~3.0.2", + "shx": "~0.3.2", + "ts-jest": "~26.1.3", + "tslib": "~2.0.0", + "tslint": "~5.20.1", + "typedoc": "~0.17.8", + "typescript": "~3.9.7" } } diff --git a/tsconfig.json b/tsconfig.json index 52440f6..8b5e3d3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,7 +15,8 @@ "skipLibCheck": true, "esModuleInterop": false, "resolveJsonModule": true, - "allowSyntheticDefaultImports": true + "allowSyntheticDefaultImports": true, + "preserveWatchOutput":true }, "include": [ "src/**/*.ts", From fd990254236bd3e051d2ff6182db1e80a2d7666f Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Sun, 26 Jul 2020 11:14:45 +0200 Subject: [PATCH 66/67] test changes --- buildInfo.js | 176 ------------------------------------------ package.json | 8 +- tests/axis.test.ts | 2 +- tests/heatmap.test.ts | 4 +- tests/table.test.ts | 2 +- 5 files changed, 8 insertions(+), 184 deletions(-) delete mode 100644 buildInfo.js diff --git a/buildInfo.js b/buildInfo.js deleted file mode 100644 index 4e7bd68..0000000 --- a/buildInfo.js +++ /dev/null @@ -1,176 +0,0 @@ -/** - * Created by sam on 13.11.2016. - */ - -const spawnSync = require('child_process').spawnSync; -const path = require('path'); -const resolve = path.resolve; -const fs = require('fs'); - -function dependencyGraph(cwd) { - const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; - const r = spawnSync(npm, ['ls', '--prod', '--json'], { - cwd: cwd - }); - if (!r.stdout) { - console.error(cwd, r.error); - return {}; - } - return JSON.parse(r.stdout.toString()); -} - -function gitHead(cwd) { - if (!fs.existsSync(cwd + '/.git')) { - return null; - } - const r = spawnSync('git', ['rev-parse', '--verify', 'HEAD'], { - cwd: cwd - }); - if (!r.stdout) { - console.error(cwd, r.error); - return {}; - } - return r.stdout.toString().trim(); -} - -function resolveModules() { - const reg = fs.readFileSync('../phovea_registry.js').toString(); - const regex = /^import '(.*)\/phovea_registry.js'/gm; - const modules = []; - let r; - while ((r = regex.exec(reg)) !== null) { - modules.push(r[1]); - } - return modules; -} - -function cleanupDependency(d) { - return d; -} - -function resolveWorkspace() { - console.log('resolve parent'); - const workspaceDeps = dependencyGraph('..').dependencies; - const modules = new Set(resolveModules()); - - let deps = null; - const resolveModule = (m) => { - console.log('resolve', m); - const pkg = JSON.parse(fs.readFileSync(`../${m}/package.json`).toString()); - const head = gitHead('../' + m); - const repo = pkg.repository.url; - return { - name: pkg.name, - version: pkg.version, - resolved: head ? `${repo.endsWith('.git') ? repo.slice(0, repo.length - 4) : repo}/commit/${head}` : pkg.version, - dependencies: deps(pkg.dependencies) - }; - }; - deps = (deps) => { - const r = {}; - Object.keys(deps).forEach((d) => { - if (d in workspaceDeps) { - r[d] = cleanupDependency(workspaceDeps[d]); - delete workspaceDeps[d]; - } else if (modules.has(d)) { - modules.delete(d); - r[d] = resolveModule(d); - } else { - r[d] = '-> link'; - } - }); - return r; - }; - - // self = - const root = path.basename(process.cwd()); - console.log(root); - - modules.delete(root); - const base = resolveModule(root); - base.extraDependencies = {}; - while (modules.size > 0) { - let m = Array.from(modules.keys())[0]; - modules.delete(m); - base.extraDependencies[m] = resolveModule(m); - } - return base; -} - -function resolveSingle() { - console.log('resolve self'); - const self = dependencyGraph('.'); - const pkg = require(`./package.json`); - const head = gitHead('.'); - const deps = {}; - Object.keys(self.dependencies || {}).forEach((d) => { - deps[d] = cleanupDependency(self.dependencies[d]); - }); - return { - name: self.name, - version: pkg.version, - resolved: head ? `${pkg.repository.url}#${head}` : pkg.version, - dependencies: deps, - extraDependencies: {} - }; -} - -function generate() { - console.log('building buildInfo'); - const isWorkspaceContext = fs.existsSync('../phovea_registry.js'); - if (isWorkspaceContext) { - return resolveWorkspace(); - } - return resolveSingle(); -} - -const IS_WINDOWS = process.platform === 'win32'; - -function tmpdir() { - if (IS_WINDOWS) { - return process.env.TEMP || process.env.TMP || - (process.env.SystemRoot || process.env.windir) + '\\temp'; - } - return process.env.TMPDIR || process.env.TMP || process.env.TEMP || '/tmp'; -} - -function resolveScreenshot() { - const f = resolve(__dirname, 'media/screenshot.png'); - if (!fs.existsSync(f)) { - return null; - } - const buffer = Buffer.from(fs.readFileSync(f)).toString('base64'); - return `data:image/png;base64,${buffer}`; -} - -function metaData(pkg) { - pkg = pkg || require(`./package.json`); - return { - name: pkg.name, - displayName: pkg.displayName, - version: pkg.version, - repository: pkg.repository.url, - homepage: pkg.homepage, - description: pkg.description, - screenshot: resolveScreenshot() - }; -} - -module.exports.metaData = metaData; -module.exports.metaDataTmpFile = function (pkg) { - const s = metaData(pkg); - const file = `${tmpdir()}/metaData${Math.random().toString(36).slice(-8)}.txt`; - fs.writeFileSync(file, JSON.stringify(s, null, ' ')); - return file; -}; -module.exports.generate = generate; -module.exports.tmpFile = function () { - const s = generate(); - const file = `${tmpdir()}/buildInfo${Math.random().toString(36).slice(-8)}.txt`; - fs.writeFileSync(file, JSON.stringify(s, null, ' ')); - return file; -}; - -if (require.main === module) { - fs.writeFile('deps.json', JSON.stringify(generate(), null, ' ')); -} diff --git a/package.json b/package.json index 51654e6..1f8004b 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,8 @@ "node": ">= 12.13" }, "scripts": { - "clean": "rimraf lib dist && npm run clean:compile", - "clean:compile": "rimraf src/**/*.map src/**/*.js src/**/*.d.ts tests/**/*.js tests/**/*.map tests/**/*.d.ts demo/**/*.js demo/**/*.map demo/**/*.d.ts", + "clean": "rimraf lib dist", + "delete-dependencies": "rimraf node_modules", "compile": "tsc", "compile:watch": "tsc -w", "postcompile": "npm run copy", @@ -51,8 +51,8 @@ }, "dependencies": { "d3": "~3.5.17", - "phovea_core": "github:phovea/phovea_core#asteiner/refactoring", - "phovea_d3": "github:phovea/phovea_d3#vstoiber/refactoring" + "phovea_core": "github:phovea/phovea_core#develop", + "phovea_d3": "github:phovea/phovea_d3#develop" }, "devDependencies": { "@types/d3": "~3.5.36", diff --git a/tests/axis.test.ts b/tests/axis.test.ts index a8a1038..9183570 100644 --- a/tests/axis.test.ts +++ b/tests/axis.test.ts @@ -1,5 +1,5 @@ /// -import {Axis} from '../dist/base/axis'; +import {Axis} from '../src/base/axis'; describe('create', () => { it('is method', () => { diff --git a/tests/heatmap.test.ts b/tests/heatmap.test.ts index 7ce9f13..6a27622 100644 --- a/tests/heatmap.test.ts +++ b/tests/heatmap.test.ts @@ -1,6 +1,6 @@ /// -import {DefaultUtils} from '../dist/heatmap/DefaultUtils'; -import {ScaleUtils} from '../dist/heatmap/IScale'; +import {DefaultUtils} from '../src/heatmap/DefaultUtils'; +import {ScaleUtils} from '../src/heatmap/IScale'; import {INumberValueTypeDesc} from 'phovea_core'; describe('toScale', () => { diff --git a/tests/table.test.ts b/tests/table.test.ts index 46ee50b..8ac3374 100644 --- a/tests/table.test.ts +++ b/tests/table.test.ts @@ -1,5 +1,5 @@ /// -import {Table} from '../dist/base/table'; +import {Table} from '../src/base/table'; import {Matrix} from 'phovea_core'; import {ParseRangeUtils} from 'phovea_core'; From 541f70e82743e9a198e1bc7f45d66bd088adfe9c Mon Sep 17 00:00:00 2001 From: Dominic Girardi Date: Thu, 30 Jul 2020 15:55:16 +0200 Subject: [PATCH 67/67] Updating version --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 1f8004b..663e750 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "phovea_vis", "description": "Utilitiy reposititory containing common visualizations (table, heatmap, scatterplot, axis, pie, distribution, ..)", - "version": "4.0.1-SNAPSHOT", + "version": "5.0.0", "author": { "name": "The Caleydo Team", "email": "contact@caleydo.org", @@ -51,8 +51,8 @@ }, "dependencies": { "d3": "~3.5.17", - "phovea_core": "github:phovea/phovea_core#develop", - "phovea_d3": "github:phovea/phovea_d3#develop" + "phovea_core": "^5.0.0", + "phovea_d3": "^5.0.0" }, "devDependencies": { "@types/d3": "~3.5.36",