From d90d7f7b92077d2738bab9da0c076784c657367e Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 30 Jan 2020 13:25:01 +0100 Subject: [PATCH 01/44] 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 dea4366d5a3f9a5ef5beffacc16ed07f005b165d Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 30 Jan 2020 13:25:17 +0100 Subject: [PATCH 02/44] update scripts for testing with jest --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 842aaa5..099f0cc 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,8 @@ "redhat_packages.txt" ], "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", "check": "flake8 --exclude=.git,venv,deploy,docs,__pycache__,node_modules", "pretest": "echo hybrid", "test": "npm run test:web && npm run test:python", @@ -47,7 +49,7 @@ "docs": "npm run docs:web && npm run docs:python", "prebuild": "echo hybrid", "posttest": "echo hybrid", - "test:watch": "karma start --autoWatch=true --singleRun=false", + "test:watch": "jest --watch", "build:dev": "webpack", "build": "npm run build:web && npm run build:python", "start": "webpack-dev-server --inline", @@ -59,7 +61,7 @@ "pretest:web": "npm run compile", "pretest:python": "npm run check", "posttest:web": "npm run lint", - "test:web": "test ! $(find tests -name \"*.ts\") || karma start", + "test:web": "test ! $(find tests -name \"*.ts\") || jest", "test:python": "test ! $(find tests -name \"*.py\") || python setup.py test", "predist:web": "npm run build:web && npm run docs:web", "dist:web": "mkdirp dist && cd build && tar cvzf ../dist/tdp_dummy.tar.gz *", From bc6dc0122ec6095ec6aaa22545088ccc4a78f6b5 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 30 Jan 2020 13:25:34 +0100 Subject: [PATCH 03/44] switch branches in _package.json_ --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 099f0cc..564c7f6 100644 --- a/package.json +++ b/package.json @@ -75,10 +75,10 @@ "predist:python": "npm run build:python && npm run docs:python" }, "dependencies": { - "tdp_core": "github:datavisyn/tdp_core#develop" + "tdp_core": "github:datavisyn/tdp_core#stoiber/testing_with_jest" }, "optionalDependencies": { - "ordino": "github:Caleydo/ordino#develop" + "ordino": "github:Caleydo/ordino#stoiber/testing_with_jest" }, "devDependencies": { "@types/jasmine": "2.5.47", From 596581a4777c04cee8ad68ce91cdadaca7bd3259 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 30 Jan 2020 13:25:46 +0100 Subject: [PATCH 04/44] update dependencies for testing with jest --- package.json | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 564c7f6..1ceb24e 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "ordino": "github:Caleydo/ordino#stoiber/testing_with_jest" }, "devDependencies": { - "@types/jasmine": "2.5.47", + "@types/jest": "23.3.13", "awesome-typescript-loader": "3.1.2", "cache-loader": "1.2.0", "css-loader": "0.28.0", @@ -92,25 +92,20 @@ "fork-ts-checker-webpack-plugin": "0.4.1", "html-loader": "0.4.5", "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", "thread-loader": "1.1.2", "ts-loader": "4.0.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 937b48f8206a736780cdec96de07026b666498c3 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 5 Feb 2020 13:33:26 +0100 Subject: [PATCH 05/44] handle xml files with `jest-raw-loader` --- jest.config.js | 3 ++- package.json | 1 + tsd.d.ts | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index c546a8e..c1b22a1 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 1ceb24e..e81f617 100644 --- a/package.json +++ b/package.json @@ -93,6 +93,7 @@ "html-loader": "0.4.5", "imports-loader": "0.7.1", "jest": "^22.4.0", + "jest-raw-loader": "1.0.1", "json-loader": "0.5.4", "mkdirp": "0.5.1", "node-sass": "^4.12.0", 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 a64721191e005818cca4b908df4952e44b9ae682 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 5 Feb 2020 13:33:56 +0100 Subject: [PATCH 06/44] run `yo phovea:update` --- tsd.d.ts | 4 ++++ webpack.config.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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/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 ae03e144587a1d18adc02641ea7300ce404ddd1a Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 5 Feb 2020 15:52:50 +0100 Subject: [PATCH 07/44] add dependency for "identity-obj-proxy" --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index e81f617..51cd264 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,7 @@ "css-loader": "0.28.0", "extract-text-webpack-plugin": "2.1.0", "extract-loader": "0.1.0", + "identity-obj-proxy": "^3.0.0", "ifdef-loader": "2.0.0", "file-loader": "0.11.1", "fork-ts-checker-webpack-plugin": "0.4.1", From a441236e5eadaeb7e465734e96646ac23cc788bc Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 18 Mar 2020 09:38:19 +0100 Subject: [PATCH 08/44] prepare next dev version --- package.json | 6 +++--- requirements.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 7fc9227..22c3e9a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "tdp_dummy", "description": "", "homepage": "https://phovea.caleydo.org", - "version": "7.0.0", + "version": "7.0.1-SNAPSHOT", "author": { "name": "The Caleydo Team", "email": "contact@caleydo.org", @@ -73,10 +73,10 @@ "predist:python": "npm run build:python && npm run docs:python" }, "dependencies": { - "tdp_core": "github:datavisyn/tdp_core#semver:^9.0.0" + "tdp_core": "github:datavisyn/tdp_core#develop" }, "optionalDependencies": { - "ordino": "github:Caleydo/ordino#semver:^7.0.0" + "ordino": "github:Caleydo/ordino#develop" }, "devDependencies": { "@types/jasmine": "2.5.47", diff --git a/requirements.txt b/requirements.txt index 789699f..185cf08 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ --e git+https://github.com/datavisyn/tdp_core.git@v9.0.0#egg=tdp_core +-e git+https://github.com/datavisyn/tdp_core.git@develop#egg=tdp_core From 84c9634b26635a71b3cedce2e3486cf85d3ae6d8 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Fri, 20 Mar 2020 09:55:55 +0100 Subject: [PATCH 09/44] update jest to latest version --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2957642..b5f0e4b 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "ordino": "github:Caleydo/ordino#stoiber/testing_with_jest" }, "devDependencies": { - "@types/jest": "23.3.13", + "@types/jest": "25.1.4", "awesome-typescript-loader": "3.1.2", "cache-loader": "1.2.0", "css-loader": "0.28.0", @@ -93,7 +93,7 @@ "fork-ts-checker-webpack-plugin": "0.4.4", "html-loader": "0.4.5", "imports-loader": "0.7.1", - "jest": "^22.4.0", + "jest": "^25.1.0", "jest-raw-loader": "1.0.1", "json-loader": "0.5.4", "node-sass": "^4.13.1", @@ -106,7 +106,7 @@ "ts-loader": "4.0.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 6f9db0074dc6c4282ecfbee4da4724962444c679 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Fri, 20 Mar 2020 09:56:00 +0100 Subject: [PATCH 10/44] unify jest config --- jest.config.js | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/jest.config.js b/jest.config.js index c1b22a1..2ace085 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,17 +1,16 @@ // 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' +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 @@ -22,7 +21,6 @@ module.exports = { "\\.xml$": "jest-raw-loader" }, testRegex: "(.*(test|spec))\\.(tsx?)$", - testURL: "http://localhost/", moduleFileExtensions: [ "ts", "tsx", @@ -36,10 +34,16 @@ module.exports = { "../node_modules", "../" ], - transformIgnorePatterns: [`../node_modules/(?!${pluginsToTransform})`], + 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 b0d22aa62238d190cfb04e94291bce72698f81a2 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Mon, 23 Mar 2020 10:07:09 +0100 Subject: [PATCH 11/44] use pinned version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b5f0e4b..f3845a3 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "ts-loader": "4.0.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 e71fda5195206ec1e732fe0e6eeb0d83be0901b3 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 24 Mar 2020 07:18:32 +0100 Subject: [PATCH 12/44] use pinned jest version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f3845a3..5515d2d 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "fork-ts-checker-webpack-plugin": "0.4.4", "html-loader": "0.4.5", "imports-loader": "0.7.1", - "jest": "^25.1.0", + "jest": "25.1.0", "jest-raw-loader": "1.0.1", "json-loader": "0.5.4", "node-sass": "^4.13.1", From 06363451e2738119df38936bb67624fc83583cbc Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Tue, 24 Mar 2020 07:18:43 +0100 Subject: [PATCH 13/44] add mapping for png, gif and jpg --- 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 a5db6be2e39d3b5113ef9351456f2baddc9cc0b2 Mon Sep 17 00:00:00 2001 From: Anita Steiner Date: Fri, 27 Mar 2020 11:05:28 +0100 Subject: [PATCH 14/44] Update package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5515d2d..33f2658 100644 --- a/package.json +++ b/package.json @@ -75,10 +75,10 @@ "predist:python": "npm run build:python && npm run docs:python" }, "dependencies": { - "tdp_core": "github:datavisyn/tdp_core#stoiber/testing_with_jest" + "tdp_core": "github:datavisyn/tdp_core#develop" }, "optionalDependencies": { - "ordino": "github:Caleydo/ordino#stoiber/testing_with_jest" + "ordino": "github:Caleydo/ordino#develop" }, "devDependencies": { "@types/jest": "25.1.4", From 8f9bddef56c993cdb91819873cefb7da3990e1d6 Mon Sep 17 00:00:00 2001 From: rumersdorfer <45141967+rumersdorfer@users.noreply.github.com> Date: Fri, 24 Apr 2020 15:32:44 +0200 Subject: [PATCH 15/44] Update README.md circleci links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aefc5da..41a49f7 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/tdp_dummy.svg [npm-url]: https://npmjs.org/package/tdp_dummy -[travis-image]: https://travis-ci.org/caleydo/tdp_dummy.svg?branch=master -[travis-url]: https://travis-ci.org/caleydo/tdp_dummy +[circleci-image]: https://circleci.com/gh/Caleydo/tdp_dummy.svg?style=shield +[circleci-url]: https://circleci.com/gh/Caleydo/tdp_dummy [daviddm-image]: https://david-dm.org/caleydo/tdp_dummy/status.svg [daviddm-url]: https://david-dm.org/caleydo/tdp_dummy From 29a9542a4fa6bab71b1029603d94efdc9ee47486 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 14 May 2020 17:14:24 +0200 Subject: [PATCH 16/44] add index.ts file for subdirectories --- src/scores/index.ts | 1 + src/views/index.ts | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 src/scores/index.ts create mode 100644 src/views/index.ts diff --git a/src/scores/index.ts b/src/scores/index.ts new file mode 100644 index 0000000..680f3c6 --- /dev/null +++ b/src/scores/index.ts @@ -0,0 +1 @@ +export * from './DummyScore'; diff --git a/src/views/index.ts b/src/views/index.ts new file mode 100644 index 0000000..442502e --- /dev/null +++ b/src/views/index.ts @@ -0,0 +1,10 @@ +export * from './DummyComposite'; +export * from './DummyDependentBList'; +export {default as DummyDependentBList} from './DummyDependentBList'; +export * from './DummyDependentList'; +export {default as DummyDependentList} from './DummyDependentList'; +export * from './DummyDetailView'; +export {default as DummyDetailView} from './DummyDetailView'; +export * from './DummyInstantView'; +export {default as DummyInstantView} from './DummyInstantView'; +export * from './DummyList'; From 8b27f9d8e7ece00237754e7e3f554a47c2dcc225 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Thu, 14 May 2020 17:14:31 +0200 Subject: [PATCH 17/44] add main index.ts --- src/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/index.ts diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..ef5723d --- /dev/null +++ b/src/index.ts @@ -0,0 +1,8 @@ +export * from './scores'; +export * from './views'; + +export * from './config'; +export * from './DummyMenuSection'; +export {default as DummyMenuSection} from './DummyMenuSection'; +export * from './DummySearchProvider'; +export {default as DummySearchProvider} from './DummySearchProvider'; From 644657ca6c0cde3093a7c7bc61eda0532a621bca Mon Sep 17 00:00:00 2001 From: rumersdorfer <45141967+rumersdorfer@users.noreply.github.com> Date: Fri, 15 May 2020 12:19:19 +0200 Subject: [PATCH 18/44] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 41a49f7..9d9d34b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ -tdp_dummy [![Phovea][phovea-image]][phovea-url] [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![CircleCI](https://circleci.com/gh/Caleydo/tdp_dummy.svg?style=shield)](https://circleci.com/gh/Caleydo/tdp_dummy) +tdp_dummy ===================== +[![Phovea][phovea-image-client]][phovea-url] [![Phovea][phovea-image-server]][phovea-url] [![NPM version][npm-image]][npm-url] [![CircleCI][circleci-image]][circleci-url] This repository provides a SQLite database with dummy data and additional views for this specific dataset for TargID. @@ -34,11 +35,10 @@ npm run build This repository is part of **[Phovea](http://phovea.caleydo.org/)**, a platform for developing web-based visualization applications. For tutorials, API docs, and more information about the build and deployment process, see the [documentation page](http://phovea.caleydo.org). -[phovea-image]: https://img.shields.io/badge/Phovea-Client%20Plugin-F47D20.svg +[phovea-image-client]: https://img.shields.io/badge/Phovea-Client%20Plugin-F47D20.svg +[phovea-image-server]: https://img.shields.io/badge/Phovea-Server%20Plugin-10ACDF.svg [phovea-url]: https://phovea.caleydo.org [npm-image]: https://badge.fury.io/js/tdp_dummy.svg [npm-url]: https://npmjs.org/package/tdp_dummy [circleci-image]: https://circleci.com/gh/Caleydo/tdp_dummy.svg?style=shield [circleci-url]: https://circleci.com/gh/Caleydo/tdp_dummy -[daviddm-image]: https://david-dm.org/caleydo/tdp_dummy/status.svg -[daviddm-url]: https://david-dm.org/caleydo/tdp_dummy From 53a730380944eb048486521066d8714aef691d39 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 20 May 2020 09:08:37 +0200 Subject: [PATCH 19/44] remove default export --- src/DummyMenuSection.ts | 2 +- src/DummySearchProvider.ts | 2 +- src/index.ts | 2 -- src/views/DummyDependentBList.ts | 2 +- src/views/DummyDependentList.ts | 2 +- src/views/DummyDetailView.ts | 2 +- src/views/DummyInstantView.ts | 2 +- src/views/index.ts | 4 ---- 8 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/DummyMenuSection.ts b/src/DummyMenuSection.ts index f5650f8..0e9ae58 100644 --- a/src/DummyMenuSection.ts +++ b/src/DummyMenuSection.ts @@ -9,7 +9,7 @@ import {IStartMenuSection, IStartMenuSectionOptions} from 'ordino/src/extensions import {resolve} from 'phovea_core/src/idtype'; import NamedSetList from 'tdp_core/src/storage/NamedSetList'; -export default class DummyMenuSection implements IStartMenuSection { +export class DummyMenuSection implements IStartMenuSection { private readonly idType = resolve('IDTypeA'); private readonly list: NamedSetList; diff --git a/src/DummySearchProvider.ts b/src/DummySearchProvider.ts index 5976992..acf46d4 100644 --- a/src/DummySearchProvider.ts +++ b/src/DummySearchProvider.ts @@ -3,7 +3,7 @@ import {getTDPLookup, getTDPFilteredRows} from 'tdp_core/src/rest'; import './style.scss'; import {IResult, ISearchProvider} from 'tdp_core/src/public/search'; -export default class DummySearchProvider implements ISearchProvider { +export class DummySearchProvider implements ISearchProvider { constructor(private readonly dataSource: IDummyDataSource) { diff --git a/src/index.ts b/src/index.ts index ef5723d..a51f69d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,6 +3,4 @@ export * from './views'; export * from './config'; export * from './DummyMenuSection'; -export {default as DummyMenuSection} from './DummyMenuSection'; export * from './DummySearchProvider'; -export {default as DummySearchProvider} from './DummySearchProvider'; diff --git a/src/views/DummyDependentBList.ts b/src/views/DummyDependentBList.ts index 3e72ff2..23ab892 100644 --- a/src/views/DummyDependentBList.ts +++ b/src/views/DummyDependentBList.ts @@ -7,7 +7,7 @@ import {single, ARankingView, numberCol} from 'tdp_core/src/lineup'; import {getTDPDesc, getTDPRows, getTDPScore} from 'tdp_core/src/rest'; import {resolve} from 'phovea_core/src/idtype'; -export default class DummyDependentBList extends ARankingView { +export class DummyDependentBList extends ARankingView { protected getParameterFormDescs() { return super.getParameterFormDescs().concat([ diff --git a/src/views/DummyDependentList.ts b/src/views/DummyDependentList.ts index 1718201..134587c 100644 --- a/src/views/DummyDependentList.ts +++ b/src/views/DummyDependentList.ts @@ -7,7 +7,7 @@ import {single, ARankingView, numberCol} from 'tdp_core/src/lineup'; import {getTDPDesc, getTDPRows, getTDPScore} from 'tdp_core/src/rest'; import {resolve} from 'phovea_core/src/idtype'; -export default class DummyDependentList extends ARankingView { +export class DummyDependentList extends ARankingView { protected getParameterFormDescs() { return super.getParameterFormDescs().concat([ diff --git a/src/views/DummyDetailView.ts b/src/views/DummyDetailView.ts index a0f6045..caec245 100644 --- a/src/views/DummyDetailView.ts +++ b/src/views/DummyDetailView.ts @@ -7,7 +7,7 @@ import {showErrorModalDialog} from 'tdp_core/src/dialogs'; import * as d3 from 'd3'; import {getTDPData} from 'tdp_core/src/rest'; -export default class DummyDetailView extends AD3View { +export class DummyDetailView extends AD3View { private readonly x = d3.scale.linear(); private readonly y = d3.scale.linear(); diff --git a/src/views/DummyInstantView.ts b/src/views/DummyInstantView.ts index c55233b..61210ac 100644 --- a/src/views/DummyInstantView.ts +++ b/src/views/DummyInstantView.ts @@ -1,7 +1,7 @@ import AInstantView from 'tdp_core/src/views/AInstantView'; -export default class DummyInstantView extends AInstantView { +export class DummyInstantView extends AInstantView { protected initImpl() { super.initImpl(); diff --git a/src/views/index.ts b/src/views/index.ts index 442502e..734adb6 100644 --- a/src/views/index.ts +++ b/src/views/index.ts @@ -1,10 +1,6 @@ export * from './DummyComposite'; export * from './DummyDependentBList'; -export {default as DummyDependentBList} from './DummyDependentBList'; export * from './DummyDependentList'; -export {default as DummyDependentList} from './DummyDependentList'; export * from './DummyDetailView'; -export {default as DummyDetailView} from './DummyDetailView'; export * from './DummyInstantView'; -export {default as DummyInstantView} from './DummyInstantView'; export * from './DummyList'; From 2de31befcaf14c88362721c907c9a9a09c56a059 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 20 May 2020 09:14:56 +0200 Subject: [PATCH 20/44] switch branches in package.json --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 33f2658..e229d16 100644 --- a/package.json +++ b/package.json @@ -75,10 +75,10 @@ "predist:python": "npm run build:python && npm run docs:python" }, "dependencies": { - "tdp_core": "github:datavisyn/tdp_core#develop" + "tdp_core": "github:datavisyn/tdp_core#vstoiber/refactoring" }, "optionalDependencies": { - "ordino": "github:Caleydo/ordino#develop" + "ordino": "github:Caleydo/ordino#vstoiber/use_refactoring_branches" }, "devDependencies": { "@types/jest": "25.1.4", From 241ba8ccf8dba09c6fb13610c6d30e89da31d583 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 20 May 2020 09:15:04 +0200 Subject: [PATCH 21/44] update import statements --- src/DummyMenuSection.ts | 2 +- src/scores/DummyScore.ts | 2 +- src/views/DummyComposite.ts | 4 ++-- src/views/DummyDetailView.ts | 4 ++-- src/views/DummyInstantView.ts | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/DummyMenuSection.ts b/src/DummyMenuSection.ts index 0e9ae58..bd67eda 100644 --- a/src/DummyMenuSection.ts +++ b/src/DummyMenuSection.ts @@ -7,7 +7,7 @@ import {categories} from './config'; import {INamedSet} from 'tdp_core/src/storage'; import {IStartMenuSection, IStartMenuSectionOptions} from 'ordino/src/extensions'; import {resolve} from 'phovea_core/src/idtype'; -import NamedSetList from 'tdp_core/src/storage/NamedSetList'; +import {NamedSetList} from 'tdp_core/src/storage/NamedSetList'; export class DummyMenuSection implements IStartMenuSection { private readonly idType = resolve('IDTypeA'); diff --git a/src/scores/DummyScore.ts b/src/scores/DummyScore.ts index 3420458..9121789 100644 --- a/src/scores/DummyScore.ts +++ b/src/scores/DummyScore.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 27.04.2016. */ -import {IScore, IScoreParam} from 'tdp_core/src/lineup'; +import {IScore, IScoreParam} from 'tdp_core/src/extensions'; import {samples, ParameterFormIds, IDummyDataSource, dataSourceA, dataSourceB} from '../config'; import {resolve} from 'phovea_core/src/idtype'; import {FormDialog, IFormElementDesc, FormElementType} from 'tdp_core/src/form'; diff --git a/src/views/DummyComposite.ts b/src/views/DummyComposite.ts index 2bce043..ea3fc95 100644 --- a/src/views/DummyComposite.ts +++ b/src/views/DummyComposite.ts @@ -1,5 +1,5 @@ -import ATableView from 'tdp_core/src/views/ATableView'; -import AView from 'tdp_core/src/views/AView'; +import {ATableView} from 'tdp_core/src/views/ATableView'; +import {AView} from 'tdp_core/src/views/AView'; import {VIEW_COMPOSITE_EVENT_CHANGE_RATIOS} from 'tdp_core/src/views/CompositeView'; diff --git a/src/views/DummyDetailView.ts b/src/views/DummyDetailView.ts index caec245..2debb2f 100644 --- a/src/views/DummyDetailView.ts +++ b/src/views/DummyDetailView.ts @@ -3,7 +3,7 @@ */ import '../style.scss'; import {AD3View} from 'tdp_core/src/views/AD3View'; -import {showErrorModalDialog} from 'tdp_core/src/dialogs'; +import {errorAlert} from 'tdp_core/src/notifications'; import * as d3 from 'd3'; import {getTDPData} from 'tdp_core/src/rest'; @@ -89,7 +89,7 @@ export class DummyDetailView extends AD3View { }); // on error - promise.catch(showErrorModalDialog) + promise.catch(errorAlert) .catch((error) => { console.error(error); this.setBusy(false); diff --git a/src/views/DummyInstantView.ts b/src/views/DummyInstantView.ts index 61210ac..acad4d8 100644 --- a/src/views/DummyInstantView.ts +++ b/src/views/DummyInstantView.ts @@ -1,4 +1,4 @@ -import AInstantView from 'tdp_core/src/views/AInstantView'; +import {AInstantView} from 'tdp_core/src/views/AInstantView'; export class DummyInstantView extends AInstantView { From 6fb3e4787992d5f5ff6250e79dff012bb55ea7b6 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 27 May 2020 07:46:31 +0200 Subject: [PATCH 22/44] improve refactoring --- src/{ => base}/DummyMenuSection.ts | 2 +- src/{ => base}/DummySearchProvider.ts | 4 ++-- src/{ => base}/config.ts | 0 src/base/index.ts | 3 +++ src/index.ts | 5 +---- src/scores/DummyScore.ts | 2 +- src/{styles => scss}/_idtype_color.scss | 0 src/{ => scss}/style.scss | 2 +- src/views/DummyDependentBList.ts | 2 +- src/views/DummyDependentList.ts | 2 +- src/views/DummyDetailView.ts | 2 +- src/views/DummyList.ts | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) rename src/{ => base}/DummyMenuSection.ts (97%) rename src/{ => base}/DummySearchProvider.ts (89%) rename src/{ => base}/config.ts (100%) create mode 100644 src/base/index.ts rename src/{styles => scss}/_idtype_color.scss (100%) rename src/{ => scss}/style.scss (61%) diff --git a/src/DummyMenuSection.ts b/src/base/DummyMenuSection.ts similarity index 97% rename from src/DummyMenuSection.ts rename to src/base/DummyMenuSection.ts index bd67eda..8240e30 100644 --- a/src/DummyMenuSection.ts +++ b/src/base/DummyMenuSection.ts @@ -3,7 +3,7 @@ */ import {IPluginDesc} from 'phovea_core/src/plugin'; -import {categories} from './config'; +import {categories} from '../config'; import {INamedSet} from 'tdp_core/src/storage'; import {IStartMenuSection, IStartMenuSectionOptions} from 'ordino/src/extensions'; import {resolve} from 'phovea_core/src/idtype'; diff --git a/src/DummySearchProvider.ts b/src/base/DummySearchProvider.ts similarity index 89% rename from src/DummySearchProvider.ts rename to src/base/DummySearchProvider.ts index acf46d4..9ebc0ab 100644 --- a/src/DummySearchProvider.ts +++ b/src/base/DummySearchProvider.ts @@ -1,6 +1,6 @@ -import {IDummyDataSource, dataSourceA, dataSourceB} from './config'; +import {IDummyDataSource, dataSourceA, dataSourceB} from '../config'; import {getTDPLookup, getTDPFilteredRows} from 'tdp_core/src/rest'; -import './style.scss'; +import '../scss/style.scss'; import {IResult, ISearchProvider} from 'tdp_core/src/public/search'; export class DummySearchProvider implements ISearchProvider { diff --git a/src/config.ts b/src/base/config.ts similarity index 100% rename from src/config.ts rename to src/base/config.ts diff --git a/src/base/index.ts b/src/base/index.ts new file mode 100644 index 0000000..847bb7f --- /dev/null +++ b/src/base/index.ts @@ -0,0 +1,3 @@ +export * from './config'; +export * from './DummyMenuSection'; +export * from './DummySearchProvider'; diff --git a/src/index.ts b/src/index.ts index a51f69d..c270974 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,3 @@ export * from './scores'; export * from './views'; - -export * from './config'; -export * from './DummyMenuSection'; -export * from './DummySearchProvider'; +export * from './base'; diff --git a/src/scores/DummyScore.ts b/src/scores/DummyScore.ts index 9121789..3b711d3 100644 --- a/src/scores/DummyScore.ts +++ b/src/scores/DummyScore.ts @@ -3,7 +3,7 @@ */ import {IScore, IScoreParam} from 'tdp_core/src/extensions'; -import {samples, ParameterFormIds, IDummyDataSource, dataSourceA, dataSourceB} from '../config'; +import {samples, ParameterFormIds, IDummyDataSource, dataSourceA, dataSourceB} from '../base/config'; import {resolve} from 'phovea_core/src/idtype'; import {FormDialog, IFormElementDesc, FormElementType} from 'tdp_core/src/form'; import {getTDPScore} from 'tdp_core/src/rest'; diff --git a/src/styles/_idtype_color.scss b/src/scss/_idtype_color.scss similarity index 100% rename from src/styles/_idtype_color.scss rename to src/scss/_idtype_color.scss diff --git a/src/style.scss b/src/scss/style.scss similarity index 61% rename from src/style.scss rename to src/scss/style.scss index 420da97..1fbea77 100644 --- a/src/style.scss +++ b/src/scss/style.scss @@ -1,4 +1,4 @@ /** * Created by Samuel Gratzl on 16.12.2015 */ -@import 'styles/idtype_color'; +@import './idtype_color'; diff --git a/src/views/DummyDependentBList.ts b/src/views/DummyDependentBList.ts index 23ab892..da23694 100644 --- a/src/views/DummyDependentBList.ts +++ b/src/views/DummyDependentBList.ts @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 29.01.2016. */ -import {types, dataSourceA, ParameterFormIds} from '../config'; +import {types, dataSourceA, ParameterFormIds} from '../base/config'; import {FormElementType} from 'tdp_core/src/form'; import {single, ARankingView, numberCol} from 'tdp_core/src/lineup'; import {getTDPDesc, getTDPRows, getTDPScore} from 'tdp_core/src/rest'; diff --git a/src/views/DummyDependentList.ts b/src/views/DummyDependentList.ts index 134587c..c1f2906 100644 --- a/src/views/DummyDependentList.ts +++ b/src/views/DummyDependentList.ts @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 29.01.2016. */ -import {types, samples, ParameterFormIds, dataSourceB} from '../config'; +import {types, samples, ParameterFormIds, dataSourceB} from '../base/config'; import {FormElementType} from 'tdp_core/src/form'; import {single, ARankingView, numberCol} from 'tdp_core/src/lineup'; import {getTDPDesc, getTDPRows, getTDPScore} from 'tdp_core/src/rest'; diff --git a/src/views/DummyDetailView.ts b/src/views/DummyDetailView.ts index 2debb2f..5bd6bca 100644 --- a/src/views/DummyDetailView.ts +++ b/src/views/DummyDetailView.ts @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 27.04.2016. */ -import '../style.scss'; +import '../scss/style.scss'; import {AD3View} from 'tdp_core/src/views/AD3View'; import {errorAlert} from 'tdp_core/src/notifications'; import * as d3 from 'd3'; diff --git a/src/views/DummyList.ts b/src/views/DummyList.ts index c2cbd14..44188aa 100644 --- a/src/views/DummyList.ts +++ b/src/views/DummyList.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 29.01.2016. */ import {IViewContext, ISelection} from 'tdp_core/src/views'; -import {IDummyDataSource, dataSourceA, dataSourceB} from '../config'; +import {IDummyDataSource, dataSourceA, dataSourceB} from '../base/config'; import {getTDPDesc, getTDPFilteredRows} from 'tdp_core/src/rest'; import {AStartList} from 'tdp_core/src/views/AStartList'; From ef12085d17ea7fb285214d31cdd8882be777563a Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 27 May 2020 07:46:52 +0200 Subject: [PATCH 23/44] 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 651bda05ca074f7805960c87bc2006b1e6be8086 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 27 May 2020 07:47:10 +0200 Subject: [PATCH 24/44] 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 d022ecd82d96774a1a7559903e172503442edaeb Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 27 May 2020 07:49:33 +0200 Subject: [PATCH 25/44] update package.json --- package.json | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index e229d16..46311c4 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "type": "git", "url": "https://github.com/caleydo/tdp_dummy.git" }, - "main": "build/tdp_dummy.js", + "main": "dist/index.js", + "types": "dist/index.d.ts", "engines": { "npm": ">= 6.12", "node": ">= 12.13", @@ -27,7 +28,7 @@ "index.js", "phovea.js", "phovea_registry.js", - "build", + "dist", "tdp_dummy", "__init__.py", "__main__.py", @@ -37,7 +38,7 @@ "redhat_packages.txt" ], "scripts": { - "clean": "rimraf build dist && npm run clean:compile", + "clean": "rimraf dist lib && 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", "check": "flake8 --exclude=.git,venv,deploy,docs,__pycache__,node_modules", "pretest": "echo hybrid", @@ -50,11 +51,10 @@ "prebuild": "echo hybrid", "posttest": "echo hybrid", "test:watch": "jest --watch", - "build:dev": "webpack", "build": "npm run build:web && npm run build:python", - "start": "webpack-dev-server --inline", - "start:hot": "webpack-dev-server --inline --hot", - "watch": "webpack --watch", + "build:web": "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", @@ -64,17 +64,17 @@ "test:web": "test ! $(find tests -name \"*.ts\") || jest", "test:python": "test ! $(find tests -name \"*.py\") || python setup.py test", "predist:web": "npm run build:web && npm run docs:web", - "dist:web": "mkdir dist && cd build && tar cvzf ../dist/tdp_dummy.tar.gz *", + "dist:web": "mkdir lib && cd dist && tar cvzf ../lib/tdp_dummy.tar.gz *", "dist:python": "python setup.py sdist bdist_wheel", "docs:web": "typedoc --options typedoc.json src/**.ts", "docs:python": "sphinx-apidoc -o docs -f ./tdp_dummy && sphinx-build ./docs build/docs", "build:python": "rm -rf build/source && find . -name '*.pyc' -delete && node buildPython.js && cp -r ./tdp_dummy build/source/", - "build:web": "webpack --env prod", "prebuild:python": "node -e \"process.exit(process.env.PHOVEA_SKIP_TESTS === undefined?1:0)\" || npm run test:python", "prebuild:web": "node -e \"process.exit(process.env.PHOVEA_SKIP_TESTS === undefined?1:0)\" || npm run test:web", "predist:python": "npm run build:python && npm run docs:python" }, "dependencies": { + "madge": "^3.9.0", "tdp_core": "github:datavisyn/tdp_core#vstoiber/refactoring" }, "optionalDependencies": { @@ -82,35 +82,23 @@ }, "devDependencies": { "@types/jest": "25.1.4", - "awesome-typescript-loader": "3.1.2", - "cache-loader": "1.2.0", - "css-loader": "0.28.0", - "extract-text-webpack-plugin": "2.1.0", "extract-loader": "0.1.0", "identity-obj-proxy": "^3.0.0", "ifdef-loader": "2.0.0", "file-loader": "0.11.1", - "fork-ts-checker-webpack-plugin": "0.4.4", "html-loader": "0.4.5", "imports-loader": "0.7.1", "jest": "25.1.0", "jest-raw-loader": "1.0.1", - "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", - "thread-loader": "1.1.2", - "ts-loader": "4.0.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" + "url-loader": "0.5.8" } } From 13dc7dbdf390a73a86adaec1d4ce29d601769d7a Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 27 May 2020 07:49:56 +0200 Subject: [PATCH 26/44] 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 89db91dc537b1e49c8c8aedc4938bf896761049e Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 27 May 2020 07:50:20 +0200 Subject: [PATCH 27/44] add handling for js files 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 6aac4c39d457cab622d33dafaf3a5f8e0bb0bd86 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 27 May 2020 07:51:52 +0200 Subject: [PATCH 28/44] import from module --- phovea_registry.js | 2 +- src/base/DummyMenuSection.ts | 8 ++++---- src/scores/DummyScore.ts | 8 ++++---- src/views/DummyDependentBList.ts | 8 ++++---- src/views/DummyDependentList.ts | 8 ++++---- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/phovea_registry.js b/phovea_registry.js index e4b0c05..52fe1c2 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/base/DummyMenuSection.ts b/src/base/DummyMenuSection.ts index 8240e30..e4c3b2b 100644 --- a/src/base/DummyMenuSection.ts +++ b/src/base/DummyMenuSection.ts @@ -2,12 +2,12 @@ * Created by Holger Stitz on 10.08.2016. */ -import {IPluginDesc} from 'phovea_core/src/plugin'; +import {IPluginDesc} from 'phovea_core'; import {categories} from '../config'; -import {INamedSet} from 'tdp_core/src/storage'; +import {INamedSet} from 'tdp_core'; import {IStartMenuSection, IStartMenuSectionOptions} from 'ordino/src/extensions'; -import {resolve} from 'phovea_core/src/idtype'; -import {NamedSetList} from 'tdp_core/src/storage/NamedSetList'; +import {resolve} from 'phovea_core'; +import {NamedSetList} from 'tdp_core'; export class DummyMenuSection implements IStartMenuSection { private readonly idType = resolve('IDTypeA'); diff --git a/src/scores/DummyScore.ts b/src/scores/DummyScore.ts index 3b711d3..155a2b6 100644 --- a/src/scores/DummyScore.ts +++ b/src/scores/DummyScore.ts @@ -2,11 +2,11 @@ * Created by Samuel Gratzl on 27.04.2016. */ -import {IScore, IScoreParam} from 'tdp_core/src/extensions'; +import {IScore, IScoreParam} from 'tdp_core'; import {samples, ParameterFormIds, IDummyDataSource, dataSourceA, dataSourceB} from '../base/config'; -import {resolve} from 'phovea_core/src/idtype'; -import {FormDialog, IFormElementDesc, FormElementType} from 'tdp_core/src/form'; -import {getTDPScore} from 'tdp_core/src/rest'; +import {resolve} from 'phovea_core'; +import {FormDialog, IFormElementDesc, FormElementType} from 'tdp_core'; +import {getTDPScore} from 'tdp_core'; class DummyScore implements IScore { private readonly dataSource: IDummyDataSource; diff --git a/src/views/DummyDependentBList.ts b/src/views/DummyDependentBList.ts index da23694..5e3a04d 100644 --- a/src/views/DummyDependentBList.ts +++ b/src/views/DummyDependentBList.ts @@ -2,10 +2,10 @@ * Created by Samuel Gratzl on 29.01.2016. */ import {types, dataSourceA, ParameterFormIds} from '../base/config'; -import {FormElementType} from 'tdp_core/src/form'; -import {single, ARankingView, numberCol} from 'tdp_core/src/lineup'; -import {getTDPDesc, getTDPRows, getTDPScore} from 'tdp_core/src/rest'; -import {resolve} from 'phovea_core/src/idtype'; +import {FormElementType} from 'tdp_core'; +import {single, ARankingView, numberCol} from 'tdp_core'; +import {getTDPDesc, getTDPRows, getTDPScore} from 'tdp_core'; +import {resolve} from 'phovea_core'; export class DummyDependentBList extends ARankingView { diff --git a/src/views/DummyDependentList.ts b/src/views/DummyDependentList.ts index c1f2906..6aaf116 100644 --- a/src/views/DummyDependentList.ts +++ b/src/views/DummyDependentList.ts @@ -2,10 +2,10 @@ * Created by Samuel Gratzl on 29.01.2016. */ import {types, samples, ParameterFormIds, dataSourceB} from '../base/config'; -import {FormElementType} from 'tdp_core/src/form'; -import {single, ARankingView, numberCol} from 'tdp_core/src/lineup'; -import {getTDPDesc, getTDPRows, getTDPScore} from 'tdp_core/src/rest'; -import {resolve} from 'phovea_core/src/idtype'; +import {FormElementType} from 'tdp_core'; +import {single, ARankingView, numberCol} from 'tdp_core'; +import {getTDPDesc, getTDPRows, getTDPScore} from 'tdp_core'; +import {resolve} from 'phovea_core'; export class DummyDependentList extends ARankingView { From 17ed51a7553d46c1b672c5db2295c7d71c34b3e0 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 27 May 2020 07:57:44 +0200 Subject: [PATCH 29/44] use static functions --- src/scores/DummyScore.ts | 104 ++++++++++++++++++++------------------- src/views/DummyList.ts | 13 +++-- 2 files changed, 59 insertions(+), 58 deletions(-) diff --git a/src/scores/DummyScore.ts b/src/scores/DummyScore.ts index 155a2b6..c395534 100644 --- a/src/scores/DummyScore.ts +++ b/src/scores/DummyScore.ts @@ -34,64 +34,66 @@ class DummyScore implements IScore { filter_b_cat2: this.tumorSample }); } -} -export function createScore(params: { table: 'a' | 'b', score: string, tumorSample: string, aggregation: string }) { - return new DummyScore(params.table, params.score, params.tumorSample, params.aggregation); -} + static createScore(params: { table: 'a' | 'b', score: string, tumorSample: string, aggregation: string }) { + return new DummyScore(params.table, params.score, params.tumorSample, params.aggregation); + } -export function create(desc: any): Promise { - const table = desc.idType === dataSourceA.idType ? 'a' : 'b'; + static create(desc: any): Promise { + const table = desc.idType === dataSourceA.idType ? 'a' : 'b'; - const dialog = new FormDialog('Add Score Column', 'Add Score Column'); - const formDesc: IFormElementDesc[] = [ - { - type: FormElementType.SELECT, - label: 'Sample', - id: ParameterFormIds.SAMPLE, - options: { - optionsData: samples + const dialog = new FormDialog('Add Score Column', 'Add Score Column'); + const formDesc: IFormElementDesc[] = [ + { + type: FormElementType.SELECT, + label: 'Sample', + id: ParameterFormIds.SAMPLE, + options: { + optionsData: samples + }, + useSession: true }, - useSession: true - }, - { - type: FormElementType.SELECT, - label: 'Score', - id: ParameterFormIds.SCORE_ATTRIBUTE, - options: { - optionsData: [ - {value: 'ab_real', name: 'Real', data: 'ab_real'}, - {value: 'ab_int', name: 'Int', data: 'ab_int'} - ] + { + type: FormElementType.SELECT, + label: 'Score', + id: ParameterFormIds.SCORE_ATTRIBUTE, + options: { + optionsData: [ + {value: 'ab_real', name: 'Real', data: 'ab_real'}, + {value: 'ab_int', name: 'Int', data: 'ab_int'} + ] + }, + useSession: true }, - useSession: true - }, - { - type: FormElementType.SELECT, - label: 'Aggregation', - id: ParameterFormIds.SCORE_AGGREGATION, - options: { - optionsData: [ - {value: 'avg', name: 'AVG', data: 'avg'}, - {value: 'min', name: 'MIN', data: 'min'}, - {value: 'max', name: 'MAX', data: 'max'} - ] - }, - useSession: true - } - ]; - dialog.append(...formDesc); + { + type: FormElementType.SELECT, + label: 'Aggregation', + id: ParameterFormIds.SCORE_AGGREGATION, + options: { + optionsData: [ + {value: 'avg', name: 'AVG', data: 'avg'}, + {value: 'min', name: 'MIN', data: 'min'}, + {value: 'max', name: 'MAX', data: 'max'} + ] + }, + useSession: true + } + ]; + dialog.append(...formDesc); - return dialog.showAsPromise((builder) => { - const data = builder.getElementData(); - return { - table, - score: data[ParameterFormIds.SCORE_ATTRIBUTE], - tumorSample: data[ParameterFormIds.SAMPLE], - aggregation: data[ParameterFormIds.SCORE_AGGREGATION] - }; - }); + return dialog.showAsPromise((builder) => { + const data = builder.getElementData(); + return { + table, + score: data[ParameterFormIds.SCORE_ATTRIBUTE], + tumorSample: data[ParameterFormIds.SAMPLE], + aggregation: data[ParameterFormIds.SCORE_AGGREGATION] + }; + }); + } } + + diff --git a/src/views/DummyList.ts b/src/views/DummyList.ts index 44188aa..9eac35d 100644 --- a/src/views/DummyList.ts +++ b/src/views/DummyList.ts @@ -23,13 +23,12 @@ class DummyStartList extends AStartList { const filters = this.buildNamedSetFilters('namedset4id'); return getTDPFilteredRows('dummy', this.dataSource.table, {}, filters); } -} -export function createStartA(context: IViewContext, selection: ISelection, parent: HTMLElement, options?) { - return new DummyStartList(context, dataSourceA, selection, parent, options); -} + static createStartA(context: IViewContext, selection: ISelection, parent: HTMLElement, options?) { + return new DummyStartList(context, dataSourceA, selection, parent, options); + } -export function createStartB(context: IViewContext, selection: ISelection, parent: HTMLElement, options?) { - return new DummyStartList(context, dataSourceB, selection, parent, options); + static createStartB(context: IViewContext, selection: ISelection, parent: HTMLElement, options?) { + return new DummyStartList(context, dataSourceB, selection, parent, options); + } } - From 9f7b9fa4c6eb5030a957174740c0142bc3bfc168 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 27 May 2020 09:28:38 +0200 Subject: [PATCH 30/44] remove System.import declaration --- tsd.d.ts | 7 ------- 1 file changed, 7 deletions(-) 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 67ab1cd90e35965067d4cd1da38b78fa4e781b8d Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 27 May 2020 10:09:20 +0200 Subject: [PATCH 31/44] add dist folder --- .gitignore | 1 - dist/base/DummyMenuSection.d.ts | 13 +++++ dist/base/DummyMenuSection.js | 45 +++++++++++++++ dist/base/DummySearchProvider.d.ts | 11 ++++ dist/base/DummySearchProvider.js | 28 ++++++++++ dist/base/config.d.ts | 23 ++++++++ dist/base/config.js | 28 ++++++++++ dist/base/index.d.ts | 3 + dist/base/index.js | 4 ++ dist/config.d.ts | 26 +++++++++ dist/config.js | 33 +++++++++++ dist/index.d.ts | 3 + dist/index.js | 3 + dist/scores/DummyScore.d.ts | 4 ++ dist/scores/DummyScore.js | 86 +++++++++++++++++++++++++++++ dist/scores/index.d.ts | 1 + dist/scores/index.js | 1 + dist/views/DummyComposite.d.ts | 12 ++++ dist/views/DummyComposite.js | 45 +++++++++++++++ dist/views/DummyDependentBList.d.ts | 10 ++++ dist/views/DummyDependentBList.js | 54 ++++++++++++++++++ dist/views/DummyDependentList.d.ts | 10 ++++ dist/views/DummyDependentList.js | 64 +++++++++++++++++++++ dist/views/DummyDetailView.d.ts | 19 +++++++ dist/views/DummyDetailView.js | 81 +++++++++++++++++++++++++++ dist/views/DummyInstantView.d.ts | 5 ++ dist/views/DummyInstantView.js | 27 +++++++++ dist/views/DummyList.d.ts | 1 + dist/views/DummyList.js | 26 +++++++++ dist/views/index.d.ts | 6 ++ dist/views/index.js | 6 ++ 31 files changed, 678 insertions(+), 1 deletion(-) create mode 100644 dist/base/DummyMenuSection.d.ts create mode 100644 dist/base/DummyMenuSection.js create mode 100644 dist/base/DummySearchProvider.d.ts create mode 100644 dist/base/DummySearchProvider.js create mode 100644 dist/base/config.d.ts create mode 100644 dist/base/config.js create mode 100644 dist/base/index.d.ts create mode 100644 dist/base/index.js create mode 100644 dist/config.d.ts create mode 100644 dist/config.js create mode 100644 dist/index.d.ts create mode 100644 dist/index.js create mode 100644 dist/scores/DummyScore.d.ts create mode 100644 dist/scores/DummyScore.js create mode 100644 dist/scores/index.d.ts create mode 100644 dist/scores/index.js create mode 100644 dist/views/DummyComposite.d.ts create mode 100644 dist/views/DummyComposite.js create mode 100644 dist/views/DummyDependentBList.d.ts create mode 100644 dist/views/DummyDependentBList.js create mode 100644 dist/views/DummyDependentList.d.ts create mode 100644 dist/views/DummyDependentList.js create mode 100644 dist/views/DummyDetailView.d.ts create mode 100644 dist/views/DummyDetailView.js create mode 100644 dist/views/DummyInstantView.d.ts create mode 100644 dist/views/DummyInstantView.js create mode 100644 dist/views/DummyList.d.ts create mode 100644 dist/views/DummyList.js create mode 100644 dist/views/index.d.ts create mode 100644 dist/views/index.js diff --git a/.gitignore b/.gitignore index 5c74ff0..f479ed9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ /.tscache /.idea /build/ -/dist/ *.egg-info/ *.egg *.py[cod] diff --git a/dist/base/DummyMenuSection.d.ts b/dist/base/DummyMenuSection.d.ts new file mode 100644 index 0000000..77d1853 --- /dev/null +++ b/dist/base/DummyMenuSection.d.ts @@ -0,0 +1,13 @@ +/** + * Created by Holger Stitz on 10.08.2016. + */ +import { IPluginDesc } from 'phovea_core'; +import { INamedSet } from 'tdp_core'; +import { IStartMenuSection, IStartMenuSectionOptions } from 'ordino/src/extensions'; +export declare class DummyMenuSection implements IStartMenuSection { + readonly desc: IPluginDesc; + private readonly idType; + private readonly list; + constructor(parent: HTMLElement, desc: IPluginDesc, options: IStartMenuSectionOptions); + push(namedSet: INamedSet): boolean; +} diff --git a/dist/base/DummyMenuSection.js b/dist/base/DummyMenuSection.js new file mode 100644 index 0000000..7057d08 --- /dev/null +++ b/dist/base/DummyMenuSection.js @@ -0,0 +1,45 @@ +/** + * Created by Holger Stitz on 10.08.2016. + */ +import { categories } from '../config'; +import { resolve } from 'phovea_core'; +import { NamedSetList } from 'tdp_core'; +export class DummyMenuSection { + constructor(parent, desc, options) { + this.desc = desc; + this.idType = resolve('IDTypeA'); + const createSession = (namedSet) => { + if (options.session) { + options.session(this.desc.viewId, { namedSet }, {}); + } + else { + console.error('no session factory object given to push new view'); + } + }; + this.list = new NamedSetList(this.idType, createSession, parent.ownerDocument); + // read species + const species = categories.slice(0); + species.unshift('all'); + // convert species to namedset + this.list.push(...species.map((d) => { + return { + name: d, + description: '', + idType: '', + ids: '', + subTypeKey: 'cat', + subTypeValue: d, + creator: '' + }; + })); + parent.appendChild(this.list.node); + } + push(namedSet) { + if (namedSet.idType !== this.idType.id) { + return false; + } + this.list.push(namedSet); + return true; + } +} +//# sourceMappingURL=DummyMenuSection.js.map \ No newline at end of file diff --git a/dist/base/DummySearchProvider.d.ts b/dist/base/DummySearchProvider.d.ts new file mode 100644 index 0000000..cfe622d --- /dev/null +++ b/dist/base/DummySearchProvider.d.ts @@ -0,0 +1,11 @@ +import { IDummyDataSource } from '../config'; +import '../scss/style.scss'; +import { IResult, ISearchProvider } from 'tdp_core/src/public/search'; +export declare class DummySearchProvider implements ISearchProvider { + private readonly dataSource; + constructor(dataSource: IDummyDataSource); + search(query: string, page: number, pageSize: number): Promise>; + validate(query: string[]): Promise; +} +export declare function createA(): DummySearchProvider; +export declare function createB(): DummySearchProvider; diff --git a/dist/base/DummySearchProvider.js b/dist/base/DummySearchProvider.js new file mode 100644 index 0000000..ee2100b --- /dev/null +++ b/dist/base/DummySearchProvider.js @@ -0,0 +1,28 @@ +import { dataSourceA, dataSourceB } from '../config'; +import { getTDPLookup, getTDPFilteredRows } from 'tdp_core/src/rest'; +import '../scss/style.scss'; +export class DummySearchProvider { + constructor(dataSource) { + this.dataSource = dataSource; + } + search(query, page, pageSize) { + return getTDPLookup('dummy', `${this.dataSource.table}_items`, { + column: `${this.dataSource.table}_name`, + query, + page, + limit: pageSize + }); + } + validate(query) { + return getTDPFilteredRows('dummy', `${this.dataSource.table}_items_verify`, {}, { + [`${this.dataSource.table}_name`]: query + }); + } +} +export function createA() { + return new DummySearchProvider(dataSourceA); +} +export function createB() { + return new DummySearchProvider(dataSourceB); +} +//# sourceMappingURL=DummySearchProvider.js.map \ No newline at end of file diff --git a/dist/base/config.d.ts b/dist/base/config.d.ts new file mode 100644 index 0000000..30e543d --- /dev/null +++ b/dist/base/config.d.ts @@ -0,0 +1,23 @@ +/** + * Created by Samuel Gratzl on 29.01.2016. + */ +export declare const categories: string[]; +export declare const types: string[]; +export declare const samples: string[]; +/** + * List of ids for parameter form elements + * Reuse this ids and activate the `useSession` option for form elements to have the same selectedIndex between different views + */ +export declare class ParameterFormIds { + static SAMPLE: string; + static TYPE: string; + static SCORE_ATTRIBUTE: string; + static SCORE_AGGREGATION: string; +} +export interface IDummyDataSource { + name: string; + idType: string; + table: string; +} +export declare const dataSourceA: IDummyDataSource; +export declare const dataSourceB: IDummyDataSource; diff --git a/dist/base/config.js b/dist/base/config.js new file mode 100644 index 0000000..5ef07c6 --- /dev/null +++ b/dist/base/config.js @@ -0,0 +1,28 @@ +/** + * Created by Samuel Gratzl on 29.01.2016. + */ +export const categories = ['ACat 1', 'ACat 2', 'ACat 3']; +export const types = ['ABCat 1', 'ABCat 2', 'ABCat 3']; +export const samples = ['BCatB 1', 'BCatB 2', 'BCatB 3', 'BCatB 4', 'BCatB 5']; +/** + * List of ids for parameter form elements + * Reuse this ids and activate the `useSession` option for form elements to have the same selectedIndex between different views + */ +//TODO simplify by using unique prefix to avoid collisions +export class ParameterFormIds { +} +ParameterFormIds.SAMPLE = 'dummySample'; +ParameterFormIds.TYPE = 'dummyType'; +ParameterFormIds.SCORE_ATTRIBUTE = 'dummyAttr'; +ParameterFormIds.SCORE_AGGREGATION = 'dummyAggregation'; +export const dataSourceA = { + name: 'a', + idType: 'IDTypeA', + table: 'a' +}; +export const dataSourceB = { + name: 'b', + idType: 'IDTypeB', + table: 'b' +}; +//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/dist/base/index.d.ts b/dist/base/index.d.ts new file mode 100644 index 0000000..847bb7f --- /dev/null +++ b/dist/base/index.d.ts @@ -0,0 +1,3 @@ +export * from './config'; +export * from './DummyMenuSection'; +export * from './DummySearchProvider'; diff --git a/dist/base/index.js b/dist/base/index.js new file mode 100644 index 0000000..2892da7 --- /dev/null +++ b/dist/base/index.js @@ -0,0 +1,4 @@ +export * from './config'; +export * from './DummyMenuSection'; +export * from './DummySearchProvider'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/config.d.ts b/dist/config.d.ts new file mode 100644 index 0000000..e70169c --- /dev/null +++ b/dist/config.d.ts @@ -0,0 +1,26 @@ +/** + * Created by Samuel Gratzl on 29.01.2016. + */ +export var categories: string[]; +export var types: string[]; +export var samples: string[]; +export namespace dataSourceA { + export const name: string; + export const idType: string; + export const table: string; +} +export namespace dataSourceB { + const name_1: string; + export { name_1 as name }; + const idType_1: string; + export { idType_1 as idType }; + const table_1: string; + export { table_1 as table }; +} +export function ParameterFormIds(): void; +export namespace ParameterFormIds { + export const SAMPLE: string; + export const TYPE: string; + export const SCORE_ATTRIBUTE: string; + export const SCORE_AGGREGATION: string; +} diff --git a/dist/config.js b/dist/config.js new file mode 100644 index 0000000..045fb6b --- /dev/null +++ b/dist/config.js @@ -0,0 +1,33 @@ +/** + * Created by Samuel Gratzl on 29.01.2016. + */ +export var categories = ['ACat 1', 'ACat 2', 'ACat 3']; +export var types = ['ABCat 1', 'ABCat 2', 'ABCat 3']; +export var samples = ['BCatB 1', 'BCatB 2', 'BCatB 3', 'BCatB 4', 'BCatB 5']; +/** + * List of ids for parameter form elements + * Reuse this ids and activate the `useSession` option for form elements to have the same selectedIndex between different views + */ +//TODO simplify by using unique prefix to avoid collisions +var ParameterFormIds = /** @class */ (function () { + function ParameterFormIds() { + } + ParameterFormIds.SAMPLE = 'dummySample'; + ParameterFormIds.TYPE = 'dummyType'; + ParameterFormIds.SCORE_ATTRIBUTE = 'dummyAttr'; + ParameterFormIds.SCORE_AGGREGATION = 'dummyAggregation'; + return ParameterFormIds; +}()); +export { ParameterFormIds }; +export var dataSourceA = { + name: 'a', + idType: 'IDTypeA', + table: 'a' +}; +export var dataSourceB = { + name: 'b', + idType: 'IDTypeB', + table: 'b' +}; +//# sourceMappingURL=config.js.map +//# sourceMappingURL=config.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..c270974 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,3 @@ +export * from './scores'; +export * from './views'; +export * from './base'; diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..5a13df8 --- /dev/null +++ b/dist/index.js @@ -0,0 +1,3 @@ +export * from './views'; +export * from './base'; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/scores/DummyScore.d.ts b/dist/scores/DummyScore.d.ts new file mode 100644 index 0000000..932a1c4 --- /dev/null +++ b/dist/scores/DummyScore.d.ts @@ -0,0 +1,4 @@ +/** + * Created by Samuel Gratzl on 27.04.2016. + */ +export {}; diff --git a/dist/scores/DummyScore.js b/dist/scores/DummyScore.js new file mode 100644 index 0000000..fba3ce6 --- /dev/null +++ b/dist/scores/DummyScore.js @@ -0,0 +1,86 @@ +/** + * Created by Samuel Gratzl on 27.04.2016. + */ +import { samples, ParameterFormIds, dataSourceA, dataSourceB } from '../base/config'; +import { resolve } from 'phovea_core'; +import { FormDialog, FormElementType } from 'tdp_core'; +import { getTDPScore } from 'tdp_core'; +class DummyScore { + constructor(table, score, tumorSample, aggregation) { + this.score = score; + this.tumorSample = tumorSample; + this.aggregation = aggregation; + this.dataSource = table === 'a' ? dataSourceA : dataSourceB; + } + get idType() { + return resolve(this.dataSource.idType); + } + createDesc() { + return { + type: 'number', + label: `${this.aggregation} ${this.score} @ ${this.tumorSample}`, + domain: this.score === 'ab_int' ? [0, 100] : [-1, 1] + }; + } + compute() { + return getTDPScore('dummy', `${this.dataSource.table}_score`, { + data_subtype: this.score, + agg: this.aggregation, + filter_b_cat2: this.tumorSample + }); + } + static createScore(params) { + return new DummyScore(params.table, params.score, params.tumorSample, params.aggregation); + } + static create(desc) { + const table = desc.idType === dataSourceA.idType ? 'a' : 'b'; + const dialog = new FormDialog('Add Score Column', 'Add Score Column'); + const formDesc = [ + { + type: FormElementType.SELECT, + label: 'Sample', + id: ParameterFormIds.SAMPLE, + options: { + optionsData: samples + }, + useSession: true + }, + { + type: FormElementType.SELECT, + label: 'Score', + id: ParameterFormIds.SCORE_ATTRIBUTE, + options: { + optionsData: [ + { value: 'ab_real', name: 'Real', data: 'ab_real' }, + { value: 'ab_int', name: 'Int', data: 'ab_int' } + ] + }, + useSession: true + }, + { + type: FormElementType.SELECT, + label: 'Aggregation', + id: ParameterFormIds.SCORE_AGGREGATION, + options: { + optionsData: [ + { value: 'avg', name: 'AVG', data: 'avg' }, + { value: 'min', name: 'MIN', data: 'min' }, + { value: 'max', name: 'MAX', data: 'max' } + ] + }, + useSession: true + } + ]; + dialog.append(...formDesc); + return dialog.showAsPromise((builder) => { + const data = builder.getElementData(); + return { + table, + score: data[ParameterFormIds.SCORE_ATTRIBUTE], + tumorSample: data[ParameterFormIds.SAMPLE], + aggregation: data[ParameterFormIds.SCORE_AGGREGATION] + }; + }); + } +} +//# sourceMappingURL=DummyScore.js.map \ No newline at end of file diff --git a/dist/scores/index.d.ts b/dist/scores/index.d.ts new file mode 100644 index 0000000..680f3c6 --- /dev/null +++ b/dist/scores/index.d.ts @@ -0,0 +1 @@ +export * from './DummyScore'; diff --git a/dist/scores/index.js b/dist/scores/index.js new file mode 100644 index 0000000..8332f84 --- /dev/null +++ b/dist/scores/index.js @@ -0,0 +1 @@ +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/views/DummyComposite.d.ts b/dist/views/DummyComposite.d.ts new file mode 100644 index 0000000..0794807 --- /dev/null +++ b/dist/views/DummyComposite.d.ts @@ -0,0 +1,12 @@ +import { ATableView } from 'tdp_core/src/views/ATableView'; +import { AView } from 'tdp_core/src/views/AView'; +export declare class DummyA extends AView { + initImpl(): void; +} +export declare class DummyB extends ATableView { + protected loadRows(): any[]; + protected sharedChanged(name: string): void; +} +export declare class DummyC extends AView { + initImpl(): void; +} diff --git a/dist/views/DummyComposite.js b/dist/views/DummyComposite.js new file mode 100644 index 0000000..989b116 --- /dev/null +++ b/dist/views/DummyComposite.js @@ -0,0 +1,45 @@ +import { ATableView } from 'tdp_core/src/views/ATableView'; +import { AView } from 'tdp_core/src/views/AView'; +import { VIEW_COMPOSITE_EVENT_CHANGE_RATIOS } from 'tdp_core/src/views/CompositeView'; +export class DummyA extends AView { + initImpl() { + super.initImpl(); + this.node.innerHTML = 'A'; + let i = 0; + this.node.onclick = () => { + this.updateShared('SHARED', (i++)); + if (i === 2) { + this.fire(VIEW_COMPOSITE_EVENT_CHANGE_RATIOS, 0.2, 0.8); + } + }; + } +} +export class DummyB extends ATableView { + loadRows() { + const v = this.getShared('SHARED') || 1; + const r = []; + for (let i = 0; i < v; ++i) { + r.push({ id: 'a', _id: -1, v: String(v) }); + } + return r; + } + sharedChanged(name) { + if (name === 'SHARED') { + this.reloadData(); + } + } +} +export class DummyC extends AView { + initImpl() { + super.initImpl(); + this.node.innerHTML = 'CCC'; + let i = 0; + this.node.onclick = () => { + this.updateShared('SHARED2', (i++)); + if (i === 2) { + this.fire(VIEW_COMPOSITE_EVENT_CHANGE_RATIOS, 0.2, 0.8); + } + }; + } +} +//# sourceMappingURL=DummyComposite.js.map \ No newline at end of file diff --git a/dist/views/DummyDependentBList.d.ts b/dist/views/DummyDependentBList.d.ts new file mode 100644 index 0000000..dad4577 --- /dev/null +++ b/dist/views/DummyDependentBList.d.ts @@ -0,0 +1,10 @@ +import { ARankingView } from 'tdp_core'; +export declare class DummyDependentBList extends ARankingView { + protected getParameterFormDescs(): any; + get itemIDType(): any; + protected loadColumnDesc(): any; + protected loadRows(): any; + protected createSelectionAdapter(): any; + private static getSelectionColumnDesc; + private loadSelectionColumnData; +} diff --git a/dist/views/DummyDependentBList.js b/dist/views/DummyDependentBList.js new file mode 100644 index 0000000..177d471 --- /dev/null +++ b/dist/views/DummyDependentBList.js @@ -0,0 +1,54 @@ +/** + * Created by Samuel Gratzl on 29.01.2016. + */ +import { types, dataSourceA, ParameterFormIds } from '../base/config'; +import { FormElementType } from 'tdp_core'; +import { single, ARankingView, numberCol } from 'tdp_core'; +import { getTDPDesc, getTDPRows, getTDPScore } from 'tdp_core'; +import { resolve } from 'phovea_core'; +export class DummyDependentBList extends ARankingView { + getParameterFormDescs() { + return super.getParameterFormDescs().concat([ + { + type: FormElementType.SELECT, + label: 'Type', + id: ParameterFormIds.TYPE, + options: { + optionsData: types + }, + useSession: true + } + ]); + } + get itemIDType() { + return resolve(dataSourceA.idType); + } + loadColumnDesc() { + return getTDPDesc('dummy', 'a'); + } + loadRows() { + return getTDPRows('dummy', 'a'); + } + createSelectionAdapter() { + return single({ + loadData: (_id, id) => this.loadSelectionColumnData(id), + createDesc: (_id, id) => DummyDependentBList.getSelectionColumnDesc(_id, id) + }); + } + static getSelectionColumnDesc(_id, label) { + const s = numberCol(`col_${_id}`, 0, 1, { label }); + s.constantDomain = true; + return s; + } + loadSelectionColumnData(name) { + const param = { + attribute: 'ab_real', + name + }; + const filters = { + ab_cat: this.getParameterData(ParameterFormIds.TYPE) + }; + return getTDPScore('dummy', 'a_single_score', param, filters); + } +} +//# sourceMappingURL=DummyDependentBList.js.map \ No newline at end of file diff --git a/dist/views/DummyDependentList.d.ts b/dist/views/DummyDependentList.d.ts new file mode 100644 index 0000000..53135f5 --- /dev/null +++ b/dist/views/DummyDependentList.d.ts @@ -0,0 +1,10 @@ +import { ARankingView } from 'tdp_core'; +export declare class DummyDependentList extends ARankingView { + protected getParameterFormDescs(): any; + get itemIDType(): any; + protected loadColumnDesc(): any; + protected loadRows(): any; + protected createSelectionAdapter(): any; + private static getSelectionColumnDesc; + private loadSelectionColumnData; +} diff --git a/dist/views/DummyDependentList.js b/dist/views/DummyDependentList.js new file mode 100644 index 0000000..aee7196 --- /dev/null +++ b/dist/views/DummyDependentList.js @@ -0,0 +1,64 @@ +/** + * Created by Samuel Gratzl on 29.01.2016. + */ +import { types, samples, ParameterFormIds, dataSourceB } from '../base/config'; +import { FormElementType } from 'tdp_core'; +import { single, ARankingView, numberCol } from 'tdp_core'; +import { getTDPDesc, getTDPRows, getTDPScore } from 'tdp_core'; +import { resolve } from 'phovea_core'; +export class DummyDependentList extends ARankingView { + getParameterFormDescs() { + return super.getParameterFormDescs().concat([ + { + type: FormElementType.SELECT, + label: 'Type', + id: ParameterFormIds.TYPE, + options: { + optionsData: types + }, + useSession: true + }, + { + type: FormElementType.SELECT, + label: 'Sample Type', + id: ParameterFormIds.SAMPLE, + options: { + optionsData: samples + }, + useSession: true + } + ]); + } + get itemIDType() { + return resolve(dataSourceB.idType); + } + loadColumnDesc() { + return getTDPDesc('dummy', 'b'); + } + loadRows() { + return getTDPRows('dummy', 'b'); + } + createSelectionAdapter() { + return single({ + loadData: (_id, id) => this.loadSelectionColumnData(id), + createDesc: (_id, id) => DummyDependentList.getSelectionColumnDesc(_id, id) + }); + } + static getSelectionColumnDesc(_id, label) { + const s = numberCol(`col_${_id}`, 0, 1, { label }); + s.constantDomain = true; + return s; + } + loadSelectionColumnData(name) { + const param = { + attribute: 'ab_real', + name + }; + const filters = { + ab_cat: this.getParameterData(ParameterFormIds.TYPE), + b_cat2: this.getParameterData(ParameterFormIds.SAMPLE), + }; + return getTDPScore('dummy', 'b_single_score', param, filters); + } +} +//# sourceMappingURL=DummyDependentList.js.map \ No newline at end of file diff --git a/dist/views/DummyDetailView.d.ts b/dist/views/DummyDetailView.d.ts new file mode 100644 index 0000000..8f8fac4 --- /dev/null +++ b/dist/views/DummyDetailView.d.ts @@ -0,0 +1,19 @@ +/** + * Created by Samuel Gratzl on 27.04.2016. + */ +import '../scss/style.scss'; +import { AD3View } from 'tdp_core/src/views/AD3View'; +export declare class DummyDetailView extends AD3View { + private readonly x; + private readonly y; + private readonly xAxis; + private readonly yAxis; + protected initImpl(): Promise<{ + value1: number; + value2: number; + }[]>; + private build; + private updateChart; + selectionChanged(): void; + private update; +} diff --git a/dist/views/DummyDetailView.js b/dist/views/DummyDetailView.js new file mode 100644 index 0000000..b8a18b3 --- /dev/null +++ b/dist/views/DummyDetailView.js @@ -0,0 +1,81 @@ +/** + * Created by Samuel Gratzl on 27.04.2016. + */ +import '../scss/style.scss'; +import { AD3View } from 'tdp_core/src/views/AD3View'; +import { errorAlert } from 'tdp_core/src/notifications'; +import * as d3 from 'd3'; +import { getTDPData } from 'tdp_core/src/rest'; +export class DummyDetailView extends AD3View { + constructor() { + super(...arguments); + this.x = d3.scale.linear(); + this.y = d3.scale.linear(); + this.xAxis = d3.svg.axis().orient('bottom').scale(this.x); + this.yAxis = d3.svg.axis().orient('left').scale(this.y); + } + initImpl() { + super.initImpl(); + this.$node.classed('dummy-detail', true); + this.build(); + return this.update(); + } + build() { + const margin = { top: 10, right: 30, bottom: 30, left: 30 }, width = 960 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; + const svg = this.$node.append('svg') + .attr('width', width + margin.left + margin.right) + .attr('height', height + margin.top + margin.bottom) + .append('g') + .attr('transform', 'translate(' + margin.left + ',' + margin.top + ')'); + this.x.range([0, width]); + this.y.range([height, 0]); + svg.append('g') + .attr('class', 'x axis') + .attr('transform', 'translate(0,' + height + ')'); + svg.append('g') + .attr('class', 'y axis'); + } + updateChart(xlabel, ylabel, rows) { + this.x.domain(d3.extent(rows, (d) => d.value1)); + this.y.domain(d3.extent(rows, (d) => d.value2)); + const svg = this.$node.select('svg g'); + svg.select('g.x.axis').call(this.xAxis); + svg.select('g.y.axis').call(this.yAxis); + const marks = svg.selectAll('.mark').data(rows); + marks.enter().append('circle').classed('mark', true).attr('r', 5); + marks.transition().attr({ + cx: (d) => this.x(d.value1), + cy: (d) => this.y(d.value2), + }); + marks.exit().remove(); + } + selectionChanged() { + super.selectionChanged(); + this.update(); + } + update() { + this.setBusy(true); + let names = null; + const promise = this.resolveSelection() + .then((_names) => { + names = _names; + return getTDPData('dummy', 'dummy_detail', { + a_id1: _names[0], + a_id2: _names[1] + }); + }); + // on success + promise.then((rows) => { + this.updateChart(names[0], names[1], rows); + this.setBusy(false); + }); + // on error + promise.catch(errorAlert) + .catch((error) => { + console.error(error); + this.setBusy(false); + }); + return promise; + } +} +//# sourceMappingURL=DummyDetailView.js.map \ No newline at end of file diff --git a/dist/views/DummyInstantView.d.ts b/dist/views/DummyInstantView.d.ts new file mode 100644 index 0000000..91c45af --- /dev/null +++ b/dist/views/DummyInstantView.d.ts @@ -0,0 +1,5 @@ +import { AInstantView } from 'tdp_core/src/views/AInstantView'; +export declare class DummyInstantView extends AInstantView { + protected initImpl(): void; + private build; +} diff --git a/dist/views/DummyInstantView.js b/dist/views/DummyInstantView.js new file mode 100644 index 0000000..cc5543a --- /dev/null +++ b/dist/views/DummyInstantView.js @@ -0,0 +1,27 @@ +import { AInstantView } from 'tdp_core/src/views/AInstantView'; +export class DummyInstantView extends AInstantView { + initImpl() { + super.initImpl(); + this.build(); + } + build() { + const items = this.selection.items; + this.node.innerHTML = ` + + + + ${items.map((d) => ``).join('')} + + + + ${items.map((d) => ``).join('')} + + + + ${items.map((d) => ``).join('')} + + +
ID${d._id}
Name${d.id}
Label${d.text}
`; + } +} +//# sourceMappingURL=DummyInstantView.js.map \ No newline at end of file diff --git a/dist/views/DummyList.d.ts b/dist/views/DummyList.d.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/dist/views/DummyList.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/dist/views/DummyList.js b/dist/views/DummyList.js new file mode 100644 index 0000000..0b87b7a --- /dev/null +++ b/dist/views/DummyList.js @@ -0,0 +1,26 @@ +import { dataSourceA, dataSourceB } from '../base/config'; +import { getTDPDesc, getTDPFilteredRows } from 'tdp_core/src/rest'; +import { AStartList } from 'tdp_core/src/views/AStartList'; +class DummyStartList extends AStartList { + constructor(context, dataSource, selection, parent, options = {}) { + super(context, selection, parent, Object.assign({ + itemName: dataSource.name, + itemIDType: dataSource.idType + }, options)); + this.dataSource = dataSource; + } + loadColumnDesc() { + return getTDPDesc('dummy', this.dataSource.table); + } + loadRows() { + const filters = this.buildNamedSetFilters('namedset4id'); + return getTDPFilteredRows('dummy', this.dataSource.table, {}, filters); + } + static createStartA(context, selection, parent, options) { + return new DummyStartList(context, dataSourceA, selection, parent, options); + } + static createStartB(context, selection, parent, options) { + return new DummyStartList(context, dataSourceB, selection, parent, options); + } +} +//# sourceMappingURL=DummyList.js.map \ No newline at end of file diff --git a/dist/views/index.d.ts b/dist/views/index.d.ts new file mode 100644 index 0000000..734adb6 --- /dev/null +++ b/dist/views/index.d.ts @@ -0,0 +1,6 @@ +export * from './DummyComposite'; +export * from './DummyDependentBList'; +export * from './DummyDependentList'; +export * from './DummyDetailView'; +export * from './DummyInstantView'; +export * from './DummyList'; diff --git a/dist/views/index.js b/dist/views/index.js new file mode 100644 index 0000000..9856ead --- /dev/null +++ b/dist/views/index.js @@ -0,0 +1,6 @@ +export * from './DummyComposite'; +export * from './DummyDependentBList'; +export * from './DummyDependentList'; +export * from './DummyDetailView'; +export * from './DummyInstantView'; +//# sourceMappingURL=index.js.map \ No newline at end of file From 53c881b491522b3dad944b0c3d8a04d7908d8610 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 27 May 2020 15:21:32 +0200 Subject: [PATCH 32/44] update imports --- dist/base/DummyMenuSection.js | 4 ++-- dist/base/DummySearchProvider.d.ts | 6 +++--- dist/base/DummySearchProvider.js | 8 ++++---- dist/scores/DummyScore.js | 8 ++++---- dist/scss/_idtype_color.scss | 6 ++++++ dist/scss/style.scss | 4 ++++ dist/views/DummyComposite.d.ts | 4 ++-- dist/views/DummyComposite.js | 10 +++++----- dist/views/DummyDependentBList.d.ts | 10 +++++----- dist/views/DummyDependentBList.js | 18 +++++++++--------- dist/views/DummyDependentList.d.ts | 10 +++++----- dist/views/DummyDependentList.js | 18 +++++++++--------- dist/views/DummyDetailView.d.ts | 2 +- dist/views/DummyDetailView.js | 10 +++++----- dist/views/DummyList.js | 8 ++++---- src/base/DummyMenuSection.ts | 4 ++-- src/base/DummySearchProvider.ts | 10 +++++----- src/scores/DummyScore.ts | 8 ++++---- src/views/DummyComposite.ts | 10 +++++----- src/views/DummyDependentBList.ts | 18 +++++++++--------- src/views/DummyDependentList.ts | 18 +++++++++--------- src/views/DummyDetailView.ts | 10 +++++----- src/views/DummyList.ts | 10 +++++----- 23 files changed, 112 insertions(+), 102 deletions(-) create mode 100644 dist/scss/_idtype_color.scss create mode 100644 dist/scss/style.scss diff --git a/dist/base/DummyMenuSection.js b/dist/base/DummyMenuSection.js index 7057d08..0f14856 100644 --- a/dist/base/DummyMenuSection.js +++ b/dist/base/DummyMenuSection.js @@ -2,12 +2,12 @@ * Created by Holger Stitz on 10.08.2016. */ import { categories } from '../config'; -import { resolve } from 'phovea_core'; +import { IDTypeManager } from 'phovea_core'; import { NamedSetList } from 'tdp_core'; export class DummyMenuSection { constructor(parent, desc, options) { this.desc = desc; - this.idType = resolve('IDTypeA'); + this.idType = IDTypeManager.getInstance().resolveIdType('IDTypeA'); const createSession = (namedSet) => { if (options.session) { options.session(this.desc.viewId, { namedSet }, {}); diff --git a/dist/base/DummySearchProvider.d.ts b/dist/base/DummySearchProvider.d.ts index cfe622d..b976ff1 100644 --- a/dist/base/DummySearchProvider.d.ts +++ b/dist/base/DummySearchProvider.d.ts @@ -1,10 +1,10 @@ -import { IDummyDataSource } from '../config'; +import { IDummyDataSource } from './config'; import '../scss/style.scss'; -import { IResult, ISearchProvider } from 'tdp_core/src/public/search'; +import { IResult, ISearchProvider } from 'tdp_core'; export declare class DummySearchProvider implements ISearchProvider { private readonly dataSource; constructor(dataSource: IDummyDataSource); - search(query: string, page: number, pageSize: number): Promise>; + search(query: string, page: number, pageSize: number): Promise>; validate(query: string[]): Promise; } export declare function createA(): DummySearchProvider; diff --git a/dist/base/DummySearchProvider.js b/dist/base/DummySearchProvider.js index ee2100b..bd6fe5b 100644 --- a/dist/base/DummySearchProvider.js +++ b/dist/base/DummySearchProvider.js @@ -1,12 +1,12 @@ -import { dataSourceA, dataSourceB } from '../config'; -import { getTDPLookup, getTDPFilteredRows } from 'tdp_core/src/rest'; +import { dataSourceA, dataSourceB } from './config'; +import { RestBaseUtils } from 'tdp_core'; import '../scss/style.scss'; export class DummySearchProvider { constructor(dataSource) { this.dataSource = dataSource; } search(query, page, pageSize) { - return getTDPLookup('dummy', `${this.dataSource.table}_items`, { + return RestBaseUtils.getTDPLookup('dummy', `${this.dataSource.table}_items`, { column: `${this.dataSource.table}_name`, query, page, @@ -14,7 +14,7 @@ export class DummySearchProvider { }); } validate(query) { - return getTDPFilteredRows('dummy', `${this.dataSource.table}_items_verify`, {}, { + return RestBaseUtils.getTDPFilteredRows('dummy', `${this.dataSource.table}_items_verify`, {}, { [`${this.dataSource.table}_name`]: query }); } diff --git a/dist/scores/DummyScore.js b/dist/scores/DummyScore.js index fba3ce6..88ae9a5 100644 --- a/dist/scores/DummyScore.js +++ b/dist/scores/DummyScore.js @@ -2,9 +2,9 @@ * Created by Samuel Gratzl on 27.04.2016. */ import { samples, ParameterFormIds, dataSourceA, dataSourceB } from '../base/config'; -import { resolve } from 'phovea_core'; +import { IDTypeManager } from 'phovea_core'; import { FormDialog, FormElementType } from 'tdp_core'; -import { getTDPScore } from 'tdp_core'; +import { RestBaseUtils } from 'tdp_core'; class DummyScore { constructor(table, score, tumorSample, aggregation) { this.score = score; @@ -13,7 +13,7 @@ class DummyScore { this.dataSource = table === 'a' ? dataSourceA : dataSourceB; } get idType() { - return resolve(this.dataSource.idType); + return IDTypeManager.getInstance().resolveIdType(this.dataSource.idType); } createDesc() { return { @@ -23,7 +23,7 @@ class DummyScore { }; } compute() { - return getTDPScore('dummy', `${this.dataSource.table}_score`, { + return RestBaseUtils.getTDPScore('dummy', `${this.dataSource.table}_score`, { data_subtype: this.score, agg: this.aggregation, filter_b_cat2: this.tumorSample diff --git a/dist/scss/_idtype_color.scss b/dist/scss/_idtype_color.scss new file mode 100644 index 0000000..c1d66a6 --- /dev/null +++ b/dist/scss/_idtype_color.scss @@ -0,0 +1,6 @@ +@import "~tdp_core/src/styles/idtype_color"; + +* { + @include idtype_color('IDTypeA', #73dbff); + @include idtype_color('IDTypeB', #ff82a0); +} diff --git a/dist/scss/style.scss b/dist/scss/style.scss new file mode 100644 index 0000000..1fbea77 --- /dev/null +++ b/dist/scss/style.scss @@ -0,0 +1,4 @@ +/** + * Created by Samuel Gratzl on 16.12.2015 + */ +@import './idtype_color'; diff --git a/dist/views/DummyComposite.d.ts b/dist/views/DummyComposite.d.ts index 0794807..992b2da 100644 --- a/dist/views/DummyComposite.d.ts +++ b/dist/views/DummyComposite.d.ts @@ -1,5 +1,5 @@ -import { ATableView } from 'tdp_core/src/views/ATableView'; -import { AView } from 'tdp_core/src/views/AView'; +import { ATableView } from 'tdp_core'; +import { AView } from 'tdp_core'; export declare class DummyA extends AView { initImpl(): void; } diff --git a/dist/views/DummyComposite.js b/dist/views/DummyComposite.js index 989b116..d1a346d 100644 --- a/dist/views/DummyComposite.js +++ b/dist/views/DummyComposite.js @@ -1,6 +1,6 @@ -import { ATableView } from 'tdp_core/src/views/ATableView'; -import { AView } from 'tdp_core/src/views/AView'; -import { VIEW_COMPOSITE_EVENT_CHANGE_RATIOS } from 'tdp_core/src/views/CompositeView'; +import { ATableView } from 'tdp_core'; +import { AView } from 'tdp_core'; +import { CompositeView } from 'tdp_core'; export class DummyA extends AView { initImpl() { super.initImpl(); @@ -9,7 +9,7 @@ export class DummyA extends AView { this.node.onclick = () => { this.updateShared('SHARED', (i++)); if (i === 2) { - this.fire(VIEW_COMPOSITE_EVENT_CHANGE_RATIOS, 0.2, 0.8); + this.fire(CompositeView.VIEW_COMPOSITE_EVENT_CHANGE_RATIOS, 0.2, 0.8); } }; } @@ -37,7 +37,7 @@ export class DummyC extends AView { this.node.onclick = () => { this.updateShared('SHARED2', (i++)); if (i === 2) { - this.fire(VIEW_COMPOSITE_EVENT_CHANGE_RATIOS, 0.2, 0.8); + this.fire(CompositeView.VIEW_COMPOSITE_EVENT_CHANGE_RATIOS, 0.2, 0.8); } }; } diff --git a/dist/views/DummyDependentBList.d.ts b/dist/views/DummyDependentBList.d.ts index dad4577..e4a4e32 100644 --- a/dist/views/DummyDependentBList.d.ts +++ b/dist/views/DummyDependentBList.d.ts @@ -1,10 +1,10 @@ import { ARankingView } from 'tdp_core'; export declare class DummyDependentBList extends ARankingView { - protected getParameterFormDescs(): any; - get itemIDType(): any; - protected loadColumnDesc(): any; - protected loadRows(): any; - protected createSelectionAdapter(): any; + protected getParameterFormDescs(): import("tdp_core").IFormElementDesc[]; + get itemIDType(): import("phovea_core").IDType; + protected loadColumnDesc(): Promise>; + protected loadRows(): Promise; + protected createSelectionAdapter(): import("tdp_core").ISelectionAdapter; private static getSelectionColumnDesc; private loadSelectionColumnData; } diff --git a/dist/views/DummyDependentBList.js b/dist/views/DummyDependentBList.js index 177d471..f233653 100644 --- a/dist/views/DummyDependentBList.js +++ b/dist/views/DummyDependentBList.js @@ -3,9 +3,9 @@ */ import { types, dataSourceA, ParameterFormIds } from '../base/config'; import { FormElementType } from 'tdp_core'; -import { single, ARankingView, numberCol } from 'tdp_core'; -import { getTDPDesc, getTDPRows, getTDPScore } from 'tdp_core'; -import { resolve } from 'phovea_core'; +import { AdapterUtils, ARankingView, ColumnDescUtils } from 'tdp_core'; +import { RestBaseUtils } from 'tdp_core'; +import { IDTypeManager } from 'phovea_core'; export class DummyDependentBList extends ARankingView { getParameterFormDescs() { return super.getParameterFormDescs().concat([ @@ -21,22 +21,22 @@ export class DummyDependentBList extends ARankingView { ]); } get itemIDType() { - return resolve(dataSourceA.idType); + return IDTypeManager.getInstance().resolveIdType(dataSourceA.idType); } loadColumnDesc() { - return getTDPDesc('dummy', 'a'); + return RestBaseUtils.getTDPDesc('dummy', 'a'); } loadRows() { - return getTDPRows('dummy', 'a'); + return RestBaseUtils.getTDPRows('dummy', 'a'); } createSelectionAdapter() { - return single({ + return AdapterUtils.single({ loadData: (_id, id) => this.loadSelectionColumnData(id), createDesc: (_id, id) => DummyDependentBList.getSelectionColumnDesc(_id, id) }); } static getSelectionColumnDesc(_id, label) { - const s = numberCol(`col_${_id}`, 0, 1, { label }); + const s = ColumnDescUtils.numberCol(`col_${_id}`, 0, 1, { label }); s.constantDomain = true; return s; } @@ -48,7 +48,7 @@ export class DummyDependentBList extends ARankingView { const filters = { ab_cat: this.getParameterData(ParameterFormIds.TYPE) }; - return getTDPScore('dummy', 'a_single_score', param, filters); + return RestBaseUtils.getTDPScore('dummy', 'a_single_score', param, filters); } } //# sourceMappingURL=DummyDependentBList.js.map \ No newline at end of file diff --git a/dist/views/DummyDependentList.d.ts b/dist/views/DummyDependentList.d.ts index 53135f5..4d663ba 100644 --- a/dist/views/DummyDependentList.d.ts +++ b/dist/views/DummyDependentList.d.ts @@ -1,10 +1,10 @@ import { ARankingView } from 'tdp_core'; export declare class DummyDependentList extends ARankingView { - protected getParameterFormDescs(): any; - get itemIDType(): any; - protected loadColumnDesc(): any; - protected loadRows(): any; - protected createSelectionAdapter(): any; + protected getParameterFormDescs(): import("tdp_core").IFormElementDesc[]; + get itemIDType(): import("phovea_core").IDType; + protected loadColumnDesc(): Promise>; + protected loadRows(): Promise; + protected createSelectionAdapter(): import("tdp_core").ISelectionAdapter; private static getSelectionColumnDesc; private loadSelectionColumnData; } diff --git a/dist/views/DummyDependentList.js b/dist/views/DummyDependentList.js index aee7196..cea7bb2 100644 --- a/dist/views/DummyDependentList.js +++ b/dist/views/DummyDependentList.js @@ -3,9 +3,9 @@ */ import { types, samples, ParameterFormIds, dataSourceB } from '../base/config'; import { FormElementType } from 'tdp_core'; -import { single, ARankingView, numberCol } from 'tdp_core'; -import { getTDPDesc, getTDPRows, getTDPScore } from 'tdp_core'; -import { resolve } from 'phovea_core'; +import { ARankingView, AdapterUtils, ColumnDescUtils } from 'tdp_core'; +import { RestBaseUtils } from 'tdp_core'; +import { IDTypeManager } from 'phovea_core'; export class DummyDependentList extends ARankingView { getParameterFormDescs() { return super.getParameterFormDescs().concat([ @@ -30,22 +30,22 @@ export class DummyDependentList extends ARankingView { ]); } get itemIDType() { - return resolve(dataSourceB.idType); + return IDTypeManager.getInstance().resolveIdType(dataSourceB.idType); } loadColumnDesc() { - return getTDPDesc('dummy', 'b'); + return RestBaseUtils.getTDPDesc('dummy', 'b'); } loadRows() { - return getTDPRows('dummy', 'b'); + return RestBaseUtils.getTDPRows('dummy', 'b'); } createSelectionAdapter() { - return single({ + return AdapterUtils.single({ loadData: (_id, id) => this.loadSelectionColumnData(id), createDesc: (_id, id) => DummyDependentList.getSelectionColumnDesc(_id, id) }); } static getSelectionColumnDesc(_id, label) { - const s = numberCol(`col_${_id}`, 0, 1, { label }); + const s = ColumnDescUtils.numberCol(`col_${_id}`, 0, 1, { label }); s.constantDomain = true; return s; } @@ -58,7 +58,7 @@ export class DummyDependentList extends ARankingView { ab_cat: this.getParameterData(ParameterFormIds.TYPE), b_cat2: this.getParameterData(ParameterFormIds.SAMPLE), }; - return getTDPScore('dummy', 'b_single_score', param, filters); + return RestBaseUtils.getTDPScore('dummy', 'b_single_score', param, filters); } } //# sourceMappingURL=DummyDependentList.js.map \ No newline at end of file diff --git a/dist/views/DummyDetailView.d.ts b/dist/views/DummyDetailView.d.ts index 8f8fac4..5a15688 100644 --- a/dist/views/DummyDetailView.d.ts +++ b/dist/views/DummyDetailView.d.ts @@ -2,7 +2,7 @@ * Created by Samuel Gratzl on 27.04.2016. */ import '../scss/style.scss'; -import { AD3View } from 'tdp_core/src/views/AD3View'; +import { AD3View } from 'tdp_core'; export declare class DummyDetailView extends AD3View { private readonly x; private readonly y; diff --git a/dist/views/DummyDetailView.js b/dist/views/DummyDetailView.js index b8a18b3..69209da 100644 --- a/dist/views/DummyDetailView.js +++ b/dist/views/DummyDetailView.js @@ -2,10 +2,10 @@ * Created by Samuel Gratzl on 27.04.2016. */ import '../scss/style.scss'; -import { AD3View } from 'tdp_core/src/views/AD3View'; -import { errorAlert } from 'tdp_core/src/notifications'; +import { AD3View } from 'tdp_core'; +import { ErrorAlertHandler } from 'tdp_core'; import * as d3 from 'd3'; -import { getTDPData } from 'tdp_core/src/rest'; +import { RestBaseUtils } from 'tdp_core'; export class DummyDetailView extends AD3View { constructor() { super(...arguments); @@ -59,7 +59,7 @@ export class DummyDetailView extends AD3View { const promise = this.resolveSelection() .then((_names) => { names = _names; - return getTDPData('dummy', 'dummy_detail', { + return RestBaseUtils.getTDPData('dummy', 'dummy_detail', { a_id1: _names[0], a_id2: _names[1] }); @@ -70,7 +70,7 @@ export class DummyDetailView extends AD3View { this.setBusy(false); }); // on error - promise.catch(errorAlert) + promise.catch(ErrorAlertHandler.getInstance().errorAlert) .catch((error) => { console.error(error); this.setBusy(false); diff --git a/dist/views/DummyList.js b/dist/views/DummyList.js index 0b87b7a..d40cb0e 100644 --- a/dist/views/DummyList.js +++ b/dist/views/DummyList.js @@ -1,6 +1,6 @@ import { dataSourceA, dataSourceB } from '../base/config'; -import { getTDPDesc, getTDPFilteredRows } from 'tdp_core/src/rest'; -import { AStartList } from 'tdp_core/src/views/AStartList'; +import { RestBaseUtils } from 'tdp_core'; +import { AStartList } from 'tdp_core'; class DummyStartList extends AStartList { constructor(context, dataSource, selection, parent, options = {}) { super(context, selection, parent, Object.assign({ @@ -10,11 +10,11 @@ class DummyStartList extends AStartList { this.dataSource = dataSource; } loadColumnDesc() { - return getTDPDesc('dummy', this.dataSource.table); + return RestBaseUtils.getTDPDesc('dummy', this.dataSource.table); } loadRows() { const filters = this.buildNamedSetFilters('namedset4id'); - return getTDPFilteredRows('dummy', this.dataSource.table, {}, filters); + return RestBaseUtils.getTDPFilteredRows('dummy', this.dataSource.table, {}, filters); } static createStartA(context, selection, parent, options) { return new DummyStartList(context, dataSourceA, selection, parent, options); diff --git a/src/base/DummyMenuSection.ts b/src/base/DummyMenuSection.ts index e4c3b2b..c5ed1a1 100644 --- a/src/base/DummyMenuSection.ts +++ b/src/base/DummyMenuSection.ts @@ -6,11 +6,11 @@ import {IPluginDesc} from 'phovea_core'; import {categories} from '../config'; import {INamedSet} from 'tdp_core'; import {IStartMenuSection, IStartMenuSectionOptions} from 'ordino/src/extensions'; -import {resolve} from 'phovea_core'; +import {IDTypeManager} from 'phovea_core'; import {NamedSetList} from 'tdp_core'; export class DummyMenuSection implements IStartMenuSection { - private readonly idType = resolve('IDTypeA'); + private readonly idType = IDTypeManager.getInstance().resolveIdType('IDTypeA'); private readonly list: NamedSetList; constructor(parent: HTMLElement, public readonly desc: IPluginDesc, options: IStartMenuSectionOptions) { diff --git a/src/base/DummySearchProvider.ts b/src/base/DummySearchProvider.ts index 9ebc0ab..30e44dd 100644 --- a/src/base/DummySearchProvider.ts +++ b/src/base/DummySearchProvider.ts @@ -1,7 +1,7 @@ -import {IDummyDataSource, dataSourceA, dataSourceB} from '../config'; -import {getTDPLookup, getTDPFilteredRows} from 'tdp_core/src/rest'; +import {IDummyDataSource, dataSourceA, dataSourceB} from './config'; +import {RestBaseUtils} from 'tdp_core'; import '../scss/style.scss'; -import {IResult, ISearchProvider} from 'tdp_core/src/public/search'; +import {IResult, ISearchProvider} from 'tdp_core'; export class DummySearchProvider implements ISearchProvider { @@ -10,7 +10,7 @@ export class DummySearchProvider implements ISearchProvider { } search(query: string, page: number, pageSize: number) { - return getTDPLookup('dummy', `${this.dataSource.table}_items`, { + return RestBaseUtils.getTDPLookup('dummy', `${this.dataSource.table}_items`, { column: `${this.dataSource.table}_name`, query, page, @@ -19,7 +19,7 @@ export class DummySearchProvider implements ISearchProvider { } validate(query: string[]): Promise { - return >getTDPFilteredRows('dummy', `${this.dataSource.table}_items_verify`, {}, { + return >RestBaseUtils.getTDPFilteredRows('dummy', `${this.dataSource.table}_items_verify`, {}, { [`${this.dataSource.table}_name`]: query }); } diff --git a/src/scores/DummyScore.ts b/src/scores/DummyScore.ts index c395534..badec2c 100644 --- a/src/scores/DummyScore.ts +++ b/src/scores/DummyScore.ts @@ -4,9 +4,9 @@ import {IScore, IScoreParam} from 'tdp_core'; import {samples, ParameterFormIds, IDummyDataSource, dataSourceA, dataSourceB} from '../base/config'; -import {resolve} from 'phovea_core'; +import {IDTypeManager} from 'phovea_core'; import {FormDialog, IFormElementDesc, FormElementType} from 'tdp_core'; -import {getTDPScore} from 'tdp_core'; +import {RestBaseUtils} from 'tdp_core'; class DummyScore implements IScore { private readonly dataSource: IDummyDataSource; @@ -16,7 +16,7 @@ class DummyScore implements IScore { } get idType() { - return resolve(this.dataSource.idType); + return IDTypeManager.getInstance().resolveIdType(this.dataSource.idType); } createDesc() { @@ -28,7 +28,7 @@ class DummyScore implements IScore { } compute(): Promise { - return getTDPScore('dummy', `${this.dataSource.table}_score`, { + return RestBaseUtils.getTDPScore('dummy', `${this.dataSource.table}_score`, { data_subtype: this.score, agg: this.aggregation, filter_b_cat2: this.tumorSample diff --git a/src/views/DummyComposite.ts b/src/views/DummyComposite.ts index ea3fc95..5d571db 100644 --- a/src/views/DummyComposite.ts +++ b/src/views/DummyComposite.ts @@ -1,6 +1,6 @@ -import {ATableView} from 'tdp_core/src/views/ATableView'; -import {AView} from 'tdp_core/src/views/AView'; -import {VIEW_COMPOSITE_EVENT_CHANGE_RATIOS} from 'tdp_core/src/views/CompositeView'; +import {ATableView} from 'tdp_core'; +import {AView} from 'tdp_core'; +import {CompositeView} from 'tdp_core'; export class DummyA extends AView { @@ -11,7 +11,7 @@ export class DummyA extends AView { this.node.onclick = () => { this.updateShared('SHARED', (i++)); if (i === 2) { - this.fire(VIEW_COMPOSITE_EVENT_CHANGE_RATIOS, 0.2, 0.8); + this.fire(CompositeView.VIEW_COMPOSITE_EVENT_CHANGE_RATIOS, 0.2, 0.8); } }; } @@ -42,7 +42,7 @@ export class DummyC extends AView { this.node.onclick = () => { this.updateShared('SHARED2', (i++)); if (i === 2) { - this.fire(VIEW_COMPOSITE_EVENT_CHANGE_RATIOS, 0.2, 0.8); + this.fire(CompositeView.VIEW_COMPOSITE_EVENT_CHANGE_RATIOS, 0.2, 0.8); } }; } diff --git a/src/views/DummyDependentBList.ts b/src/views/DummyDependentBList.ts index 5e3a04d..701092a 100644 --- a/src/views/DummyDependentBList.ts +++ b/src/views/DummyDependentBList.ts @@ -3,9 +3,9 @@ */ import {types, dataSourceA, ParameterFormIds} from '../base/config'; import {FormElementType} from 'tdp_core'; -import {single, ARankingView, numberCol} from 'tdp_core'; -import {getTDPDesc, getTDPRows, getTDPScore} from 'tdp_core'; -import {resolve} from 'phovea_core'; +import {AdapterUtils, ARankingView, ColumnDescUtils} from 'tdp_core'; +import {RestBaseUtils} from 'tdp_core'; +import {IDTypeManager} from 'phovea_core'; export class DummyDependentBList extends ARankingView { @@ -24,26 +24,26 @@ export class DummyDependentBList extends ARankingView { } get itemIDType() { - return resolve(dataSourceA.idType); + return IDTypeManager.getInstance().resolveIdType(dataSourceA.idType); } protected loadColumnDesc() { - return getTDPDesc('dummy', 'a'); + return RestBaseUtils.getTDPDesc('dummy', 'a'); } protected loadRows() { - return getTDPRows('dummy', 'a'); + return RestBaseUtils.getTDPRows('dummy', 'a'); } protected createSelectionAdapter() { - return single({ + return AdapterUtils.single({ loadData: (_id: number, id: string) => this.loadSelectionColumnData(id), createDesc: (_id: number, id: string) => DummyDependentBList.getSelectionColumnDesc(_id, id) }); } private static getSelectionColumnDesc(_id: number, label: string) { - const s: any = numberCol(`col_${_id}`, 0, 1, {label}); + const s: any = ColumnDescUtils.numberCol(`col_${_id}`, 0, 1, {label}); s.constantDomain = true; return s; } @@ -56,6 +56,6 @@ export class DummyDependentBList extends ARankingView { const filters = { ab_cat: this.getParameterData(ParameterFormIds.TYPE) }; - return getTDPScore('dummy', 'a_single_score', param, filters); + return RestBaseUtils.getTDPScore('dummy', 'a_single_score', param, filters); } } diff --git a/src/views/DummyDependentList.ts b/src/views/DummyDependentList.ts index 6aaf116..edd556e 100644 --- a/src/views/DummyDependentList.ts +++ b/src/views/DummyDependentList.ts @@ -3,9 +3,9 @@ */ import {types, samples, ParameterFormIds, dataSourceB} from '../base/config'; import {FormElementType} from 'tdp_core'; -import {single, ARankingView, numberCol} from 'tdp_core'; -import {getTDPDesc, getTDPRows, getTDPScore} from 'tdp_core'; -import {resolve} from 'phovea_core'; +import {ARankingView, AdapterUtils, ColumnDescUtils} from 'tdp_core'; +import {RestBaseUtils} from 'tdp_core'; +import {IDTypeManager} from 'phovea_core'; export class DummyDependentList extends ARankingView { @@ -33,26 +33,26 @@ export class DummyDependentList extends ARankingView { } get itemIDType() { - return resolve(dataSourceB.idType); + return IDTypeManager.getInstance().resolveIdType(dataSourceB.idType); } protected loadColumnDesc() { - return getTDPDesc('dummy', 'b'); + return RestBaseUtils.getTDPDesc('dummy', 'b'); } protected loadRows() { - return getTDPRows('dummy', 'b'); + return RestBaseUtils.getTDPRows('dummy', 'b'); } protected createSelectionAdapter() { - return single({ + return AdapterUtils.single({ loadData: (_id: number, id: string) => this.loadSelectionColumnData(id), createDesc: (_id: number, id: string) => DummyDependentList.getSelectionColumnDesc(_id, id) }); } private static getSelectionColumnDesc(_id: number, label: string) { - const s: any = numberCol(`col_${_id}`, 0, 1, {label}); + const s: any = ColumnDescUtils.numberCol(`col_${_id}`, 0, 1, {label}); s.constantDomain = true; return s; } @@ -66,6 +66,6 @@ export class DummyDependentList extends ARankingView { ab_cat: this.getParameterData(ParameterFormIds.TYPE), b_cat2: this.getParameterData(ParameterFormIds.SAMPLE), }; - return getTDPScore('dummy', 'b_single_score', param, filters); + return RestBaseUtils.getTDPScore('dummy', 'b_single_score', param, filters); } } diff --git a/src/views/DummyDetailView.ts b/src/views/DummyDetailView.ts index 5bd6bca..a7e8dfa 100644 --- a/src/views/DummyDetailView.ts +++ b/src/views/DummyDetailView.ts @@ -2,10 +2,10 @@ * Created by Samuel Gratzl on 27.04.2016. */ import '../scss/style.scss'; -import {AD3View} from 'tdp_core/src/views/AD3View'; -import {errorAlert} from 'tdp_core/src/notifications'; +import {AD3View} from 'tdp_core'; +import {ErrorAlertHandler} from 'tdp_core'; import * as d3 from 'd3'; -import {getTDPData} from 'tdp_core/src/rest'; +import {RestBaseUtils} from 'tdp_core'; export class DummyDetailView extends AD3View { @@ -76,7 +76,7 @@ export class DummyDetailView extends AD3View { const promise = this.resolveSelection() .then((_names) => { names = _names; - return getTDPData<{ value1: number, value2: number }>('dummy', 'dummy_detail', { + return RestBaseUtils.getTDPData<{ value1: number, value2: number }>('dummy', 'dummy_detail', { a_id1: _names[0], a_id2: _names[1] }); @@ -89,7 +89,7 @@ export class DummyDetailView extends AD3View { }); // on error - promise.catch(errorAlert) + promise.catch(ErrorAlertHandler.getInstance().errorAlert) .catch((error) => { console.error(error); this.setBusy(false); diff --git a/src/views/DummyList.ts b/src/views/DummyList.ts index 9eac35d..3b53168 100644 --- a/src/views/DummyList.ts +++ b/src/views/DummyList.ts @@ -1,10 +1,10 @@ /** * Created by Samuel Gratzl on 29.01.2016. */ -import {IViewContext, ISelection} from 'tdp_core/src/views'; +import {IViewContext, ISelection} from 'tdp_core'; import {IDummyDataSource, dataSourceA, dataSourceB} from '../base/config'; -import {getTDPDesc, getTDPFilteredRows} from 'tdp_core/src/rest'; -import {AStartList} from 'tdp_core/src/views/AStartList'; +import {RestBaseUtils} from 'tdp_core'; +import {AStartList} from 'tdp_core'; class DummyStartList extends AStartList { @@ -16,12 +16,12 @@ class DummyStartList extends AStartList { } protected loadColumnDesc() { - return getTDPDesc('dummy', this.dataSource.table); + return RestBaseUtils.getTDPDesc('dummy', this.dataSource.table); } protected loadRows() { const filters = this.buildNamedSetFilters('namedset4id'); - return getTDPFilteredRows('dummy', this.dataSource.table, {}, filters); + return RestBaseUtils.getTDPFilteredRows('dummy', this.dataSource.table, {}, filters); } static createStartA(context: IViewContext, selection: ISelection, parent: HTMLElement, options?) { From 2929911c43eddbc64e67ee233feb8ef3071c70d3 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 27 May 2020 15:26:20 +0200 Subject: [PATCH 33/44] use correct path --- src/base/DummyMenuSection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/DummyMenuSection.ts b/src/base/DummyMenuSection.ts index c5ed1a1..d1977d3 100644 --- a/src/base/DummyMenuSection.ts +++ b/src/base/DummyMenuSection.ts @@ -3,7 +3,7 @@ */ import {IPluginDesc} from 'phovea_core'; -import {categories} from '../config'; +import {categories} from './config'; import {INamedSet} from 'tdp_core'; import {IStartMenuSection, IStartMenuSectionOptions} from 'ordino/src/extensions'; import {IDTypeManager} from 'phovea_core'; From f6649df099461ec9dea70daaca2c1e5ad8c2749b Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 3 Jun 2020 14:35:54 +0200 Subject: [PATCH 34/44] remove pretest:web script --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 46311c4..aeecf52 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ "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", - "pretest:web": "npm run compile", "pretest:python": "npm run check", "posttest:web": "npm run lint", "test:web": "test ! $(find tests -name \"*.ts\") || jest", From cdfecbb7fa3ee24cb408833676cbe067bf704701 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 3 Jun 2020 14:36:30 +0200 Subject: [PATCH 35/44] update scripts to work cross-platform --- package.json | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index aeecf52..96879dc 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ "test:watch": "jest --watch", "build": "npm run build:web && npm run build:python", "build:web": "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", @@ -82,10 +82,10 @@ "devDependencies": { "@types/jest": "25.1.4", "extract-loader": "0.1.0", - "identity-obj-proxy": "^3.0.0", - "ifdef-loader": "2.0.0", "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", @@ -93,9 +93,10 @@ "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" From f9ba1ba4e9faf7e9b430b0ed2b6faca1a6f46f5a Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 3 Jun 2020 14:44:06 +0200 Subject: [PATCH 36/44] fix dynamic imports in phovea.js and update paths --- dist/base/DummyMenuSection.js | 2 +- dist/config.d.ts | 26 -------------------------- dist/config.js | 33 --------------------------------- phovea.js | 32 ++++++++++++++++---------------- 4 files changed, 17 insertions(+), 76 deletions(-) delete mode 100644 dist/config.d.ts delete mode 100644 dist/config.js diff --git a/dist/base/DummyMenuSection.js b/dist/base/DummyMenuSection.js index 0f14856..ecd33ae 100644 --- a/dist/base/DummyMenuSection.js +++ b/dist/base/DummyMenuSection.js @@ -1,7 +1,7 @@ /** * Created by Holger Stitz on 10.08.2016. */ -import { categories } from '../config'; +import { categories } from './config'; import { IDTypeManager } from 'phovea_core'; import { NamedSetList } from 'tdp_core'; export class DummyMenuSection { diff --git a/dist/config.d.ts b/dist/config.d.ts deleted file mode 100644 index e70169c..0000000 --- a/dist/config.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Created by Samuel Gratzl on 29.01.2016. - */ -export var categories: string[]; -export var types: string[]; -export var samples: string[]; -export namespace dataSourceA { - export const name: string; - export const idType: string; - export const table: string; -} -export namespace dataSourceB { - const name_1: string; - export { name_1 as name }; - const idType_1: string; - export { idType_1 as idType }; - const table_1: string; - export { table_1 as table }; -} -export function ParameterFormIds(): void; -export namespace ParameterFormIds { - export const SAMPLE: string; - export const TYPE: string; - export const SCORE_ATTRIBUTE: string; - export const SCORE_AGGREGATION: string; -} diff --git a/dist/config.js b/dist/config.js deleted file mode 100644 index 045fb6b..0000000 --- a/dist/config.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Created by Samuel Gratzl on 29.01.2016. - */ -export var categories = ['ACat 1', 'ACat 2', 'ACat 3']; -export var types = ['ABCat 1', 'ABCat 2', 'ABCat 3']; -export var samples = ['BCatB 1', 'BCatB 2', 'BCatB 3', 'BCatB 4', 'BCatB 5']; -/** - * List of ids for parameter form elements - * Reuse this ids and activate the `useSession` option for form elements to have the same selectedIndex between different views - */ -//TODO simplify by using unique prefix to avoid collisions -var ParameterFormIds = /** @class */ (function () { - function ParameterFormIds() { - } - ParameterFormIds.SAMPLE = 'dummySample'; - ParameterFormIds.TYPE = 'dummyType'; - ParameterFormIds.SCORE_ATTRIBUTE = 'dummyAttr'; - ParameterFormIds.SCORE_AGGREGATION = 'dummyAggregation'; - return ParameterFormIds; -}()); -export { ParameterFormIds }; -export var dataSourceA = { - name: 'a', - idType: 'IDTypeA', - table: 'a' -}; -export var dataSourceB = { - name: 'b', - idType: 'IDTypeB', - table: 'b' -}; -//# sourceMappingURL=config.js.map -//# sourceMappingURL=config.js.map \ No newline at end of file diff --git a/phovea.js b/phovea.js index 441536b..02f4f9d 100644 --- a/phovea.js +++ b/phovea.js @@ -12,7 +12,7 @@ module.exports = function (registry, feature) { /// #if include('ordino') registry.push('ordinoStartMenuSection', 'dummy_start_a', function () { - return import('./src/DummyMenuSection'); + return import('./src/base/DummyMenuSection').then((d) => d.DummyMenuSection); }, { name: 'Dummy Data', cssClass: 'targidDummyData', @@ -23,7 +23,7 @@ module.exports = function (registry, feature) { /// #endif registry.push('tdpView', 'dummy_start_a', function () { - return import('./src/views/DummyList'); + return import('./src/views/DummyList').then((d) => d.DummyStartList); }, { name: 'Dummy A', factory: 'createStartA', @@ -32,7 +32,7 @@ module.exports = function (registry, feature) { }); registry.push('tdpView', 'dummy_start_B', function () { - return import('./src/views/DummyList'); + return import('./src/views/DummyList').then((d) => d.DummyStartList); }, { name: 'Dummy B', factory: 'createStartB', @@ -41,7 +41,7 @@ module.exports = function (registry, feature) { }); registry.push('tdpView', 'dummy_detail', function () { - return import('./src/views/DummyDetailView'); + return import('./src/views/DummyDetailView').then((d) => d.DummyDetailView); }, { name: 'Dummy Detail View', idtype: 'IDTypeA', @@ -49,7 +49,7 @@ module.exports = function (registry, feature) { }); registry.push('tdpView', 'dummy_dependent', function () { - return import('./src/views/DummyDependentList'); + return import('./src/views/DummyDependentList').then((d) => d.DummyDependentList); }, { name: 'Dummy Dependent List', idtype: 'IDTypeA', @@ -57,7 +57,7 @@ module.exports = function (registry, feature) { }); registry.push('tdpView', 'dummyb_dependent', function () { - return import('./src/views/DummyDependentBList'); + return import('./src/views/DummyDependentBList').then((d) => d.DummyDependentBList); }, { name: 'Dummy Dependent List', idtype: 'IDTypeB', @@ -65,7 +65,7 @@ module.exports = function (registry, feature) { }); registry.push('tdpView', 'dummy_composite', function () { - return import('tdp_core/src/views/CompositeView'); + return import('tdp_core/src/views/CompositeView').then((c) => c.CompositeView); }, { name: 'DummyComposite', idtype: 'IDTypeA', @@ -74,21 +74,21 @@ module.exports = function (registry, feature) { { key: 'a', loader: function () { - return import('./src/views/DummyComposite') + return import('./src/views/DummyComposite').then((d) => d.DummyA) }, factory: 'new DummyA' }, { key: 'b', loader: function () { - return import('./src/views/DummyComposite') + return import('./src/views/DummyComposite').then((d) => d.DummyB) }, factory: 'new DummyB' }, { key: 'c', loader: function () { - return import('./src/views/DummyComposite') + return import('./src/views/DummyComposite').then((d) => d.DummyC) }, factory: 'new DummyC' } @@ -100,7 +100,7 @@ module.exports = function (registry, feature) { }); registry.push('tdpView', 'dummy_external', function () { - return import('tdp_core/src/views/ProxyView'); + return import('tdp_core/src/views/ProxyView').then((p) => p.ProxyView); }, { name: 'Wikipedia', site: 'https://wikipedia.org/w/index.php?search={id}', @@ -110,33 +110,33 @@ module.exports = function (registry, feature) { }); registry.push('tdpInstantView', 'dummy', function () { - return import('./src/views/DummyInstantView'); + return import('./src/views/DummyInstantView').then((d) => d.DummyInstantView); }, { name: 'Info', idtype: 'IDTypeA' }); registry.push('tdpScore', 'dummy_score', function () { - return import('./src/scores/DummyScore'); + return import('./src/scores/DummyScore').then((d) => d.DummyScore); }, { name: 'Dummy Score', idtype: 'IDTypeA' }); registry.push('tdpScoreImpl', 'dummy_score', function () { - return import('./src/scores/DummyScore'); + return import('./src/scores/DummyScore').then((d) => d.DummyScore); }, { factory: 'createScore' }); registry.push('dTilesSearchProvider', 'dummyA', function () { - return import('./src/DummySearchProvider') + return import('./src/base/DummySearchProvider').then((d) => d.DummySearchProvider) }, { idType: 'IDTypeA', factory: 'createA' }); registry.push('dTilesSearchProvider', 'dummyB', function () { - return import('./src/DummySearchProvider') + return import('./src/base/DummySearchProvider').then((d) => d.DummySearchProvider) }, { idType: 'IDTypeB', factory: 'createB' From 356055874171d73209c81ad4f22cf8b1f099ad3c Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Mon, 15 Jun 2020 07:33:48 +0200 Subject: [PATCH 37/44] update config files --- dist/base/DummyMenuSection.d.ts | 2 +- dist/base/DummySearchProvider.d.ts | 2 +- dist/base/DummySearchProvider.js | 2 +- dist/index.d.ts | 2 +- dist/index.js | 2 +- package.json | 18 +++--------------- src/base/DummyMenuSection.ts | 2 +- src/base/DummySearchProvider.ts | 2 +- src/index.ts | 2 +- tsconfig.json | 11 ++--------- tsd.d.ts | 26 +++++--------------------- 11 files changed, 18 insertions(+), 53 deletions(-) diff --git a/dist/base/DummyMenuSection.d.ts b/dist/base/DummyMenuSection.d.ts index 77d1853..daa4772 100644 --- a/dist/base/DummyMenuSection.d.ts +++ b/dist/base/DummyMenuSection.d.ts @@ -3,7 +3,7 @@ */ import { IPluginDesc } from 'phovea_core'; import { INamedSet } from 'tdp_core'; -import { IStartMenuSection, IStartMenuSectionOptions } from 'ordino/src/extensions'; +import { IStartMenuSection, IStartMenuSectionOptions } from 'ordino'; export declare class DummyMenuSection implements IStartMenuSection { readonly desc: IPluginDesc; private readonly idType; diff --git a/dist/base/DummySearchProvider.d.ts b/dist/base/DummySearchProvider.d.ts index b976ff1..f2a041f 100644 --- a/dist/base/DummySearchProvider.d.ts +++ b/dist/base/DummySearchProvider.d.ts @@ -1,5 +1,5 @@ import { IDummyDataSource } from './config'; -import '../scss/style.scss'; +import '../scss/main.scss'; import { IResult, ISearchProvider } from 'tdp_core'; export declare class DummySearchProvider implements ISearchProvider { private readonly dataSource; diff --git a/dist/base/DummySearchProvider.js b/dist/base/DummySearchProvider.js index bd6fe5b..84a326f 100644 --- a/dist/base/DummySearchProvider.js +++ b/dist/base/DummySearchProvider.js @@ -1,6 +1,6 @@ import { dataSourceA, dataSourceB } from './config'; import { RestBaseUtils } from 'tdp_core'; -import '../scss/style.scss'; +import '../scss/main.scss'; export class DummySearchProvider { constructor(dataSource) { this.dataSource = dataSource; diff --git a/dist/index.d.ts b/dist/index.d.ts index c270974..5e4ccf2 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -1,3 +1,3 @@ +export * from './base'; export * from './scores'; export * from './views'; -export * from './base'; diff --git a/dist/index.js b/dist/index.js index 5a13df8..904b09c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,3 +1,3 @@ -export * from './views'; export * from './base'; +export * from './views'; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/package.json b/package.json index 96879dc..5d4348a 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,6 @@ }, "files": [ "src", - "index.js", - "phovea.js", "phovea_registry.js", "dist", "tdp_dummy", @@ -53,8 +51,8 @@ "test:watch": "jest --watch", "build": "npm run build:web && npm run build:python", "build:web": "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", @@ -73,7 +71,6 @@ "predist:python": "npm run build:python && npm run docs:python" }, "dependencies": { - "madge": "^3.9.0", "tdp_core": "github:datavisyn/tdp_core#vstoiber/refactoring" }, "optionalDependencies": { @@ -81,24 +78,15 @@ }, "devDependencies": { "@types/jest": "25.1.4", - "extract-loader": "0.1.0", - "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/src/base/DummyMenuSection.ts b/src/base/DummyMenuSection.ts index d1977d3..e0e9e92 100644 --- a/src/base/DummyMenuSection.ts +++ b/src/base/DummyMenuSection.ts @@ -5,7 +5,7 @@ import {IPluginDesc} from 'phovea_core'; import {categories} from './config'; import {INamedSet} from 'tdp_core'; -import {IStartMenuSection, IStartMenuSectionOptions} from 'ordino/src/extensions'; +import {IStartMenuSection, IStartMenuSectionOptions} from 'ordino'; import {IDTypeManager} from 'phovea_core'; import {NamedSetList} from 'tdp_core'; diff --git a/src/base/DummySearchProvider.ts b/src/base/DummySearchProvider.ts index 30e44dd..d217451 100644 --- a/src/base/DummySearchProvider.ts +++ b/src/base/DummySearchProvider.ts @@ -1,6 +1,6 @@ import {IDummyDataSource, dataSourceA, dataSourceB} from './config'; import {RestBaseUtils} from 'tdp_core'; -import '../scss/style.scss'; +import '../scss/main.scss'; import {IResult, ISearchProvider} from 'tdp_core'; export class DummySearchProvider implements ISearchProvider { diff --git a/src/index.ts b/src/index.ts index c270974..5e4ccf2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,3 @@ +export * from './base'; export * from './scores'; export * from './views'; -export * from './base'; diff --git a/tsconfig.json b/tsconfig.json index 5e27e6a..32f2f74 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,22 +11,15 @@ "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 + "resolveJsonModule": true, + "allowSyntheticDefaultImports": true }, "include": [ - "dist/index.d.ts", "src/**/*.ts", "src/**/*.tsx", - "index.ts", "tsd.d.ts" ] } diff --git a/tsd.d.ts b/tsd.d.ts index 146f562..4bd749e 100644 --- a/tsd.d.ts +++ b/tsd.d.ts @@ -1,16 +1,10 @@ -/* ***************************************************************************** - * 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 - **************************************************************************** */ - //allow sass modules declare module "*.scss" { - const content:string; + const content: string; export default content; } declare module "*.css" { - const content:string; + const content: string; export default content; } // allow image dependencies @@ -21,20 +15,10 @@ declare module "*.webp"; declare module "*.svg"; //allow html dependencies declare module "*.html" { - const content:string; + const content: string; export default content; } declare module "*.xml" { - const content:string; + 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!*"; +} \ No newline at end of file From 52bd4dfca7736db7539c1df7bc739f367358453c Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Tue, 16 Jun 2020 05:34:10 +0200 Subject: [PATCH 38/44] update config --- dist/index.js | 1 + dist/phovea.d.ts | 0 dist/phovea.js | 132 ++++++++++++++++++++++++++++ dist/scores/DummyScore.d.ts | 23 ++++- dist/scores/DummyScore.js | 2 +- dist/scores/index.js | 1 + dist/scss/{style.scss => main.scss} | 0 dist/views/DummyDetailView.js | 2 +- dist/views/DummyList.d.ts | 15 +++- dist/views/DummyList.js | 2 +- dist/views/index.js | 1 + jest.config.js | 18 ++-- package.json | 1 + phovea_registry.js | 5 +- phovea.js => src/phovea.ts | 34 +++---- src/scores/DummyScore.ts | 2 +- src/scss/{style.scss => main.scss} | 0 src/views/DummyDetailView.ts | 2 +- src/views/DummyList.ts | 2 +- 19 files changed, 204 insertions(+), 39 deletions(-) create mode 100644 dist/phovea.d.ts create mode 100644 dist/phovea.js rename dist/scss/{style.scss => main.scss} (100%) rename phovea.js => src/phovea.ts (72%) rename src/scss/{style.scss => main.scss} (100%) diff --git a/dist/index.js b/dist/index.js index 904b09c..dca4748 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,3 +1,4 @@ export * from './base'; +export * from './scores'; export * from './views'; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/dist/phovea.d.ts b/dist/phovea.d.ts new file mode 100644 index 0000000..e69de29 diff --git a/dist/phovea.js b/dist/phovea.js new file mode 100644 index 0000000..cc7457b --- /dev/null +++ b/dist/phovea.js @@ -0,0 +1,132 @@ +/* ***************************************************************************** + * 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, feature) { + //registry.push('extension-type', 'extension-id', function() { return import('./src/extension_impl'); }, {}); + // generator-phovea:begin + /// #if include('ordino') + registry.push('ordinoStartMenuSection', 'dummy_start_a', function () { + return import('./base/DummyMenuSection').then((d) => d.DummyMenuSection); + }, { + name: 'Dummy Data', + cssClass: 'targidDummyData', + priority: 20, + viewId: 'dummy_start_a', + idType: 'IDTypeA' + }); + /// #endif + registry.push('tdpView', 'dummy_start_a', function () { + return import('./views/DummyList').then((d) => d.DummyStartList); + }, { + name: 'Dummy A', + factory: 'createStartA', + idtype: 'IDTypeA', + selection: 'none' + }); + registry.push('tdpView', 'dummy_start_B', function () { + return import('./views/DummyList').then((d) => d.DummyStartList); + }, { + name: 'Dummy B', + factory: 'createStartB', + idtype: 'IDTypeB', + selection: 'none' + }); + registry.push('tdpView', 'dummy_detail', function () { + return import('./views/DummyDetailView').then((d) => d.DummyDetailView); + }, { + name: 'Dummy Detail View', + idtype: 'IDTypeA', + selection: '2' + }); + registry.push('tdpView', 'dummy_dependent', function () { + return import('./views/DummyDependentList').then((d) => d.DummyDependentList); + }, { + name: 'Dummy Dependent List', + idtype: 'IDTypeA', + selection: 'some' + }); + registry.push('tdpView', 'dummyb_dependent', function () { + return import('./views/DummyDependentBList').then((d) => d.DummyDependentBList); + }, { + name: 'Dummy Dependent List', + idtype: 'IDTypeB', + selection: 'some' + }); + registry.push('tdpView', 'dummy_composite', function () { + return import('tdp_core/src/views/CompositeView').then((c) => c.CompositeView); + }, { + name: 'DummyComposite', + idtype: 'IDTypeA', + selection: 'some', + elements: [ + { + key: 'a', + loader() { + return import('./views/DummyComposite').then((d) => d.DummyA); + }, + factory: 'new DummyA' + }, + { + key: 'b', + loader() { + return import('./views/DummyComposite').then((d) => d.DummyB); + }, + factory: 'new DummyB' + }, + { + key: 'c', + loader() { + return import('./views/DummyComposite').then((d) => d.DummyC); + }, + factory: 'new DummyC' + } + ], + layout: { + type: 'vsplit', + keys: ['a', { type: 'hsplit', keys: ['b', 'c'] }] + } + }); + registry.push('tdpView', 'dummy_external', function () { + return import('tdp_core/src/views/ProxyView').then((p) => p.ProxyView); + }, { + name: 'Wikipedia', + site: 'https://wikipedia.org/w/index.php?search={id}', + argument: 'id', + idtype: 'IDTypeA', + selection: 'chooser' + }); + registry.push('tdpInstantView', 'dummy', function () { + return import('./views/DummyInstantView').then((d) => d.DummyInstantView); + }, { + name: 'Info', + idtype: 'IDTypeA' + }); + registry.push('tdpScore', 'dummy_score', function () { + return import('./scores/DummyScore').then((d) => d.DummyScore); + }, { + name: 'Dummy Score', + idtype: 'IDTypeA' + }); + registry.push('tdpScoreImpl', 'dummy_score', function () { + return import('./scores/DummyScore').then((d) => d.DummyScore); + }, { + factory: 'createScore' + }); + registry.push('dTilesSearchProvider', 'dummyA', function () { + return import('./base/DummySearchProvider').then((d) => d.DummySearchProvider); + }, { + idType: 'IDTypeA', + factory: 'createA' + }); + registry.push('dTilesSearchProvider', 'dummyB', function () { + return import('./base/DummySearchProvider').then((d) => d.DummySearchProvider); + }, { + idType: 'IDTypeB', + factory: 'createB' + }); + // generator-phovea:end +}; +//# sourceMappingURL=phovea.js.map \ No newline at end of file diff --git a/dist/scores/DummyScore.d.ts b/dist/scores/DummyScore.d.ts index 932a1c4..86f5b08 100644 --- a/dist/scores/DummyScore.d.ts +++ b/dist/scores/DummyScore.d.ts @@ -1,4 +1,25 @@ /** * Created by Samuel Gratzl on 27.04.2016. */ -export {}; +import { IScore, IScoreParam } from 'tdp_core'; +export declare class DummyScore implements IScore { + private readonly score; + private readonly tumorSample; + private readonly aggregation; + private readonly dataSource; + constructor(table: 'a' | 'b', score: string, tumorSample: string, aggregation: string); + get idType(): import("phovea_core").IDType; + createDesc(): { + type: string; + label: string; + domain: number[]; + }; + compute(): Promise; + static createScore(params: { + table: 'a' | 'b'; + score: string; + tumorSample: string; + aggregation: string; + }): DummyScore; + static create(desc: any): Promise; +} diff --git a/dist/scores/DummyScore.js b/dist/scores/DummyScore.js index 88ae9a5..3300dd5 100644 --- a/dist/scores/DummyScore.js +++ b/dist/scores/DummyScore.js @@ -5,7 +5,7 @@ import { samples, ParameterFormIds, dataSourceA, dataSourceB } from '../base/con import { IDTypeManager } from 'phovea_core'; import { FormDialog, FormElementType } from 'tdp_core'; import { RestBaseUtils } from 'tdp_core'; -class DummyScore { +export class DummyScore { constructor(table, score, tumorSample, aggregation) { this.score = score; this.tumorSample = tumorSample; diff --git a/dist/scores/index.js b/dist/scores/index.js index 8332f84..111ce91 100644 --- a/dist/scores/index.js +++ b/dist/scores/index.js @@ -1 +1,2 @@ +export * from './DummyScore'; //# sourceMappingURL=index.js.map \ No newline at end of file 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/dist/views/DummyDetailView.js b/dist/views/DummyDetailView.js index 69209da..66ce324 100644 --- a/dist/views/DummyDetailView.js +++ b/dist/views/DummyDetailView.js @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 27.04.2016. */ -import '../scss/style.scss'; +import '../scss/main.scss'; import { AD3View } from 'tdp_core'; import { ErrorAlertHandler } from 'tdp_core'; import * as d3 from 'd3'; diff --git a/dist/views/DummyList.d.ts b/dist/views/DummyList.d.ts index cb0ff5c..3d4fbf4 100644 --- a/dist/views/DummyList.d.ts +++ b/dist/views/DummyList.d.ts @@ -1 +1,14 @@ -export {}; +/** + * Created by Samuel Gratzl on 29.01.2016. + */ +import { IViewContext, ISelection } from 'tdp_core'; +import { IDummyDataSource } from '../base/config'; +import { AStartList } from 'tdp_core'; +export declare class DummyStartList extends AStartList { + private readonly dataSource; + constructor(context: IViewContext, dataSource: IDummyDataSource, selection: ISelection, parent: HTMLElement, options?: {}); + protected loadColumnDesc(): Promise>; + protected loadRows(): Promise; + static createStartA(context: IViewContext, selection: ISelection, parent: HTMLElement, options?: any): DummyStartList; + static createStartB(context: IViewContext, selection: ISelection, parent: HTMLElement, options?: any): DummyStartList; +} diff --git a/dist/views/DummyList.js b/dist/views/DummyList.js index d40cb0e..6944a5b 100644 --- a/dist/views/DummyList.js +++ b/dist/views/DummyList.js @@ -1,7 +1,7 @@ import { dataSourceA, dataSourceB } from '../base/config'; import { RestBaseUtils } from 'tdp_core'; import { AStartList } from 'tdp_core'; -class DummyStartList extends AStartList { +export class DummyStartList extends AStartList { constructor(context, dataSource, selection, parent, options = {}) { super(context, selection, parent, Object.assign({ itemName: dataSource.name, diff --git a/dist/views/index.js b/dist/views/index.js index 9856ead..3ea8c71 100644 --- a/dist/views/index.js +++ b/dist/views/index.js @@ -3,4 +3,5 @@ export * from './DummyDependentBList'; export * from './DummyDependentList'; export * from './DummyDetailView'; export * from './DummyInstantView'; +export * from './DummyList'; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/jest.config.js b/jest.config.js index a66b095..8024c72 100644 --- a/jest.config.js +++ b/jest.config.js @@ -30,26 +30,20 @@ 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 + // has to be set to true, otherwise i18n import fails + "ts-jest": { "tsConfig": { - "esModuleInterop": true, + "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" } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 5d4348a..0d0528c 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "predist": "echo hybrid", "dist": "npm run dist:web && npm run dist:python", "compile": "tsc", + "compile:watch": "tsc -w", "lint": "tslint -c tslint.json -p . 'src/**/*.ts?(x)' 'tests/**/*.ts?(x)'", "docs": "npm run docs:web && npm run docs:python", "prebuild": "echo hybrid", diff --git a/phovea_registry.js b/phovea_registry.js index 52fe1c2..a7562e9 100644 --- a/phovea_registry.js +++ b/phovea_registry.js @@ -4,7 +4,8 @@ * Licensed under the new BSD license, available at http://caleydo.org/license **************************************************************************** */ -import {register} from 'phovea_core'; +import {PluginRegistry} from 'phovea_core'; +import reg from './dist/phovea'; /** * build a registry by registering all phovea modules @@ -14,4 +15,4 @@ import {register} from 'phovea_core'; import 'ordino/phovea_registry.js'; /// #endif //self -register('tdp_dummy',require('./phovea.js')); +PluginRegistry.getInstance().register('tdp_dummy',reg); diff --git a/phovea.js b/src/phovea.ts similarity index 72% rename from phovea.js rename to src/phovea.ts index 02f4f9d..7586d5d 100644 --- a/phovea.js +++ b/src/phovea.ts @@ -12,7 +12,7 @@ module.exports = function (registry, feature) { /// #if include('ordino') registry.push('ordinoStartMenuSection', 'dummy_start_a', function () { - return import('./src/base/DummyMenuSection').then((d) => d.DummyMenuSection); + return import('./base/DummyMenuSection').then((d) => d.DummyMenuSection); }, { name: 'Dummy Data', cssClass: 'targidDummyData', @@ -23,7 +23,7 @@ module.exports = function (registry, feature) { /// #endif registry.push('tdpView', 'dummy_start_a', function () { - return import('./src/views/DummyList').then((d) => d.DummyStartList); + return import('./views/DummyList').then((d) => d.DummyStartList); }, { name: 'Dummy A', factory: 'createStartA', @@ -32,7 +32,7 @@ module.exports = function (registry, feature) { }); registry.push('tdpView', 'dummy_start_B', function () { - return import('./src/views/DummyList').then((d) => d.DummyStartList); + return import('./views/DummyList').then((d) => d.DummyStartList); }, { name: 'Dummy B', factory: 'createStartB', @@ -41,7 +41,7 @@ module.exports = function (registry, feature) { }); registry.push('tdpView', 'dummy_detail', function () { - return import('./src/views/DummyDetailView').then((d) => d.DummyDetailView); + return import('./views/DummyDetailView').then((d) => d.DummyDetailView); }, { name: 'Dummy Detail View', idtype: 'IDTypeA', @@ -49,7 +49,7 @@ module.exports = function (registry, feature) { }); registry.push('tdpView', 'dummy_dependent', function () { - return import('./src/views/DummyDependentList').then((d) => d.DummyDependentList); + return import('./views/DummyDependentList').then((d) => d.DummyDependentList); }, { name: 'Dummy Dependent List', idtype: 'IDTypeA', @@ -57,7 +57,7 @@ module.exports = function (registry, feature) { }); registry.push('tdpView', 'dummyb_dependent', function () { - return import('./src/views/DummyDependentBList').then((d) => d.DummyDependentBList); + return import('./views/DummyDependentBList').then((d) => d.DummyDependentBList); }, { name: 'Dummy Dependent List', idtype: 'IDTypeB', @@ -73,22 +73,22 @@ module.exports = function (registry, feature) { elements: [ { key: 'a', - loader: function () { - return import('./src/views/DummyComposite').then((d) => d.DummyA) + loader() { + return import('./views/DummyComposite').then((d) => d.DummyA); }, factory: 'new DummyA' }, { key: 'b', - loader: function () { - return import('./src/views/DummyComposite').then((d) => d.DummyB) + loader() { + return import('./views/DummyComposite').then((d) => d.DummyB); }, factory: 'new DummyB' }, { key: 'c', - loader: function () { - return import('./src/views/DummyComposite').then((d) => d.DummyC) + loader() { + return import('./views/DummyComposite').then((d) => d.DummyC); }, factory: 'new DummyC' } @@ -110,33 +110,33 @@ module.exports = function (registry, feature) { }); registry.push('tdpInstantView', 'dummy', function () { - return import('./src/views/DummyInstantView').then((d) => d.DummyInstantView); + return import('./views/DummyInstantView').then((d) => d.DummyInstantView); }, { name: 'Info', idtype: 'IDTypeA' }); registry.push('tdpScore', 'dummy_score', function () { - return import('./src/scores/DummyScore').then((d) => d.DummyScore); + return import('./scores/DummyScore').then((d) => d.DummyScore); }, { name: 'Dummy Score', idtype: 'IDTypeA' }); registry.push('tdpScoreImpl', 'dummy_score', function () { - return import('./src/scores/DummyScore').then((d) => d.DummyScore); + return import('./scores/DummyScore').then((d) => d.DummyScore); }, { factory: 'createScore' }); registry.push('dTilesSearchProvider', 'dummyA', function () { - return import('./src/base/DummySearchProvider').then((d) => d.DummySearchProvider) + return import('./base/DummySearchProvider').then((d) => d.DummySearchProvider); }, { idType: 'IDTypeA', factory: 'createA' }); registry.push('dTilesSearchProvider', 'dummyB', function () { - return import('./src/base/DummySearchProvider').then((d) => d.DummySearchProvider) + return import('./base/DummySearchProvider').then((d) => d.DummySearchProvider); }, { idType: 'IDTypeB', factory: 'createB' diff --git a/src/scores/DummyScore.ts b/src/scores/DummyScore.ts index badec2c..7a00af5 100644 --- a/src/scores/DummyScore.ts +++ b/src/scores/DummyScore.ts @@ -8,7 +8,7 @@ import {IDTypeManager} from 'phovea_core'; import {FormDialog, IFormElementDesc, FormElementType} from 'tdp_core'; import {RestBaseUtils} from 'tdp_core'; -class DummyScore implements IScore { +export class DummyScore implements IScore { private readonly dataSource: IDummyDataSource; constructor(table: 'a' | 'b', private readonly score: string, private readonly tumorSample: string, private readonly aggregation: string) { 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 diff --git a/src/views/DummyDetailView.ts b/src/views/DummyDetailView.ts index a7e8dfa..914a47b 100644 --- a/src/views/DummyDetailView.ts +++ b/src/views/DummyDetailView.ts @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 27.04.2016. */ -import '../scss/style.scss'; +import '../scss/main.scss'; import {AD3View} from 'tdp_core'; import {ErrorAlertHandler} from 'tdp_core'; import * as d3 from 'd3'; diff --git a/src/views/DummyList.ts b/src/views/DummyList.ts index 3b53168..d458707 100644 --- a/src/views/DummyList.ts +++ b/src/views/DummyList.ts @@ -7,7 +7,7 @@ import {RestBaseUtils} from 'tdp_core'; import {AStartList} from 'tdp_core'; -class DummyStartList extends AStartList { +export class DummyStartList extends AStartList { constructor(context: IViewContext, private readonly dataSource: IDummyDataSource, selection: ISelection, parent: HTMLElement, options = {}) { super(context, selection, parent, Object.assign({ itemName: dataSource.name, From 0f723690bd906e99a649eb0e163e707f9843c8ba Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Tue, 14 Jul 2020 13:33:13 +0200 Subject: [PATCH 39/44] add mappings --- .gitignore | 4 ++-- dist/base/DummyMenuSection.js.map | 1 + dist/base/DummySearchProvider.js.map | 1 + dist/base/config.js.map | 1 + dist/base/index.js.map | 1 + dist/index.js.map | 1 + dist/phovea.js.map | 1 + dist/scores/DummyScore.js.map | 1 + dist/scores/index.js.map | 1 + dist/views/DummyComposite.js.map | 1 + dist/views/DummyDependentBList.js.map | 1 + dist/views/DummyDependentList.js.map | 1 + dist/views/DummyDetailView.d.ts | 2 +- dist/views/DummyDetailView.js.map | 1 + dist/views/DummyInstantView.js.map | 1 + dist/views/DummyList.js.map | 1 + dist/views/index.js.map | 1 + package.json | 3 +-- 18 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 dist/base/DummyMenuSection.js.map create mode 100644 dist/base/DummySearchProvider.js.map create mode 100644 dist/base/config.js.map create mode 100644 dist/base/index.js.map create mode 100644 dist/index.js.map create mode 100644 dist/phovea.js.map create mode 100644 dist/scores/DummyScore.js.map create mode 100644 dist/scores/index.js.map create mode 100644 dist/views/DummyComposite.js.map create mode 100644 dist/views/DummyDependentBList.js.map create mode 100644 dist/views/DummyDependentList.js.map create mode 100644 dist/views/DummyDetailView.js.map create mode 100644 dist/views/DummyInstantView.js.map create mode 100644 dist/views/DummyList.js.map create mode 100644 dist/views/index.js.map diff --git a/.gitignore b/.gitignore index f479ed9..8d6a52a 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,7 @@ __pycache__/ node_modules/ /src/**/*.js /tests/**/*.js -*.map +/src/**/*.map +/tests/**/*.map *.css -/.cache-loader package-lock.json diff --git a/dist/base/DummyMenuSection.js.map b/dist/base/DummyMenuSection.js.map new file mode 100644 index 0000000..7c1dbd0 --- /dev/null +++ b/dist/base/DummyMenuSection.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DummyMenuSection.js","sourceRoot":"","sources":["../../src/base/DummyMenuSection.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAGpC,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AAEtC,MAAM,OAAO,gBAAgB;IAI3B,YAAY,MAAmB,EAAkB,IAAiB,EAAE,OAAiC;QAApD,SAAI,GAAJ,IAAI,CAAa;QAHjD,WAAM,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAK7E,MAAM,aAAa,GAAG,CAAC,QAAmB,EAAE,EAAE;YAC5C,IAAI,OAAO,CAAC,OAAO,EAAE;gBACnB,OAAO,CAAC,OAAO,CAAO,IAAI,CAAC,IAAK,CAAC,MAAM,EAAE,EAAC,QAAQ,EAAC,EAAE,EAAE,CAAC,CAAC;aAC1D;iBAAM;gBACL,OAAO,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAC;aACnE;QACH,CAAC,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;QAE/E,eAAe;QACf,MAAM,OAAO,GAAa,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC9C,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAEvB,8BAA8B;QAC9B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YAClC,OAAkB;gBAChB,IAAI,EAAE,CAAC;gBACP,WAAW,EAAE,EAAE;gBACf,MAAM,EAAE,EAAE;gBACV,GAAG,EAAE,EAAE;gBACP,UAAU,EAAE,KAAK;gBACjB,YAAY,EAAE,CAAC;gBACf,OAAO,EAAE,EAAE;aACZ,CAAC;QACJ,CAAC,CAAC,CAAC,CAAC;QAEJ,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IAED,IAAI,CAAC,QAAmB;QACtB,IAAI,QAAQ,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;YACtC,OAAO,KAAK,CAAC;SACd;QACD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;CACF"} \ No newline at end of file diff --git a/dist/base/DummySearchProvider.js.map b/dist/base/DummySearchProvider.js.map new file mode 100644 index 0000000..d600e3c --- /dev/null +++ b/dist/base/DummySearchProvider.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DummySearchProvider.js","sourceRoot":"","sources":["../../src/base/DummySearchProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,WAAW,EAAE,WAAW,EAAC,MAAM,UAAU,CAAC;AACpE,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,OAAO,mBAAmB,CAAC;AAG3B,MAAM,OAAO,mBAAmB;IAE9B,YAA6B,UAA4B;QAA5B,eAAU,GAAV,UAAU,CAAkB;IAEzD,CAAC;IAED,MAAM,CAAC,KAAa,EAAE,IAAY,EAAE,QAAgB;QAClD,OAAO,aAAa,CAAC,YAAY,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,QAAQ,EAAE;YAC3E,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,OAAO;YACvC,KAAK;YACL,IAAI;YACJ,KAAK,EAAE,QAAQ;SAChB,CAAC,CAAC;IACL,CAAC;IAED,QAAQ,CAAC,KAAe;QACtB,OAA2B,aAAa,CAAC,kBAAkB,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,eAAe,EAAE,EAAE,EAAE;YAChH,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,OAAO,CAAC,EAAE,KAAK;SACzC,CAAC,CAAC;IACL,CAAC;CACF;AAGD,MAAM,UAAU,OAAO;IACrB,OAAO,IAAI,mBAAmB,CAAC,WAAW,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,OAAO;IACrB,OAAO,IAAI,mBAAmB,CAAC,WAAW,CAAC,CAAC;AAC9C,CAAC"} \ No newline at end of file diff --git a/dist/base/config.js.map b/dist/base/config.js.map new file mode 100644 index 0000000..d2e76bf --- /dev/null +++ b/dist/base/config.js.map @@ -0,0 +1 @@ +{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/base/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACzD,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAG/E;;;GAGG;AACH,0DAA0D;AAC1D,MAAM,OAAO,gBAAgB;;AACpB,uBAAM,GAAG,aAAa,CAAC;AACvB,qBAAI,GAAG,WAAW,CAAC;AAEnB,gCAAe,GAAG,WAAW,CAAC;AAC9B,kCAAiB,GAAG,kBAAkB,CAAC;AAUhD,MAAM,CAAC,MAAM,WAAW,GAAqB;IAC3C,IAAI,EAAE,GAAG;IACT,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,GAAG;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAqB;IAC3C,IAAI,EAAE,GAAG;IACT,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,GAAG;CACX,CAAC"} \ 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..d43d019 --- /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,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,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..be4ddb2 --- /dev/null +++ b/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"} \ No newline at end of file diff --git a/dist/phovea.js.map b/dist/phovea.js.map new file mode 100644 index 0000000..16866af --- /dev/null +++ b/dist/phovea.js.map @@ -0,0 +1 @@ +{"version":3,"file":"phovea.js","sourceRoot":"","sources":["../src/phovea.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAEhF,qEAAqE;AACrE,MAAM,CAAC,OAAO,GAAG,UAAU,QAAQ,EAAE,OAAO;IAC1C,6GAA6G;IAC7G,yBAAyB;IAGzB,yBAAyB;IACzB,QAAQ,CAAC,IAAI,CAAC,wBAAwB,EAAE,eAAe,EAAE;QACvD,OAAO,MAAM,CAAC,yBAAyB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC3E,CAAC,EAAE;QACA,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,iBAAiB;QAC3B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE,SAAS;KACnB,CAAC,CAAC;IACH,UAAU;IAEV,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe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AC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;IACjF,CAAC,EAAE;QACD,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,SAAS;KACnB,CAAC,CAAC;IAEH,QAAQ,CAAC,IAAI,CAAC,sBAAsB,EAAE,QAAQ,EAAE;QAC9C,OAAO,MAAM,CAAC,4BAA4B,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;IACjF,CAAC,EAAE;QACD,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,SAAS;KACnB,CAAC,CAAC;IACH,uBAAuB;AACzB,CAAC,CAAC"} \ No newline at end of file diff --git a/dist/scores/DummyScore.js.map b/dist/scores/DummyScore.js.map new file mode 100644 index 0000000..c18c6f0 --- /dev/null +++ b/dist/scores/DummyScore.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DummyScore.js","sourceRoot":"","sources":["../../src/scores/DummyScore.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAC,OAAO,EAAE,gBAAgB,EAAoB,WAAW,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAC;AACrG,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAC,UAAU,EAAoB,eAAe,EAAC,MAAM,UAAU,CAAC;AACvE,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,MAAM,OAAO,UAAU;IAGrB,YAAY,KAAgB,EAAmB,KAAa,EAAmB,WAAmB,EAAmB,WAAmB;QAAzF,UAAK,GAAL,KAAK,CAAQ;QAAmB,gBAAW,GAAX,WAAW,CAAQ;QAAmB,gBAAW,GAAX,WAAW,CAAQ;QACtI,IAAI,CAAC,UAAU,GAAG,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC;IAC9D,CAAC;IAED,IAAI,MAAM;QACR,OAA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,iBAAiB,CAAC;aACtD,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF"} \ No newline at end of file diff --git a/dist/scores/index.js.map b/dist/scores/index.js.map new file mode 100644 index 0000000..d4215e4 --- /dev/null +++ b/dist/scores/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/scores/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"} \ No newline at end of file diff --git a/dist/views/DummyComposite.js.map b/dist/views/DummyComposite.js.map new file mode 100644 index 0000000..efa32d7 --- /dev/null +++ b/dist/views/DummyComposite.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DummyComposite.js","sourceRoot":"","sources":["../../src/views/DummyComposite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AACpC,OAAO,EAAC,KAAK,EAAC,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAGvC,MAAM,OAAO,MAAO,SAAQ,KAAK;IAC/B,QAAQ;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC;QAC1B,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,GAAG,EAAE;YACvB,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACnC,IAAI,CAAC,KAAK,CAAC,EAAE;gBACX,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,kCAAkC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aACvE;QACH,CAAC,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,MAAO,SAAQ,UAAe;IAC/B,QAAQ;QAChB,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACxC,MAAM,CAAC,GAAU,EAAE,CAAC;QACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE;YAC1B,CAAC,CAAC,IAAI,CAAC,EAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAC,CAAC,CAAC;SAC1C;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IAES,aAAa,CAAC,IAAY;QAClC,IAAI,IAAI,KAAK,QAAQ,EAAE;YACrB,IAAI,CAAC,UAAU,EAAE,CAAC;SACnB;IACH,CAAC;CACF;AAED,MAAM,OAAO,MAAO,SAAQ,KAAK;IAC/B,QAAQ;QACN,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QAC5B,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,GAAG,EAAE;YACvB,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACpC,IAAI,CAAC,KAAK,CAAC,EAAE;gBACX,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,kCAAkC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;aACvE;QACH,CAAC,CAAC;IACJ,CAAC;CACF"} \ No newline at end of file diff --git a/dist/views/DummyDependentBList.js.map b/dist/views/DummyDependentBList.js.map new file mode 100644 index 0000000..afa5e51 --- /dev/null +++ b/dist/views/DummyDependentBList.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DummyDependentBList.js","sourceRoot":"","sources":["../../src/views/DummyDependentBList.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAC,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAC,eAAe,EAAC,MAAM,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E,CAAC,EAAE,EAAC,KAAK,EAAC,CAAC,CAAC;QACtE,CAAC,CAAC,cAAc,GAAG,IAAI,CAAC;QACxB,OAAO,CAAC,CAAC;IACX,CAAC;IAEO,uBAAuB,CAAC,IAAY;QAC1C,MAAM,KAAK,GAAG;YACZ,SAAS,EAAE,SAAS;YACpB,IAAI;SACL,CAAC;QACF,MAAM,OAAO,GAAG;YACd,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC;SACrD,CAAC;QACF,OAAO,aAAa,CAAC,WAAW,CAAS,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;CACF"} \ No newline at end of file diff --git a/dist/views/DummyDependentList.js.map b/dist/views/DummyDependentList.js.map new file mode 100644 index 0000000..a7d2303 --- /dev/null +++ b/dist/views/DummyDependentList.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DummyDependentList.js","sourceRoot":"","sources":["../../src/views/DummyDependentList.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAC,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAC,eAAe,EAAC,MAAM,UAAU,CAAC;AACzC,OAAO,EAAC,YAAY,EAAE,YAAY,EAAE,eAAe,EAAC,MAAM,UAAU,CAAC;AACrE,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAE1C,MAAM,OAAO,kBAAmB,SAAQ,YAAY;IAExC,qBAAqB;QAC7B,OAAO,KAAK,CAAC,qBAAqB,EAAE,CAAC,MAAM,CAAC;YAC1C;gBACE,IAAI,EAAE,eAAe,CAAC,MAAM;gBAC5B,KAAK,EAAE,MAAM;gBACb,EAAE,EAAE,gBAAgB,CAAC,IAAI;gBACzB,OAAO,EAAE;oBACP,WAAW,EAAE,KAAK;iBACn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AI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC;YACpD,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,MAAM,CAAC;SACvD,CAAC;QACF,OAAO,aAAa,CAAC,WAAW,CAAS,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;CACF"} \ No newline at end of file diff --git a/dist/views/DummyDetailView.d.ts b/dist/views/DummyDetailView.d.ts index 5a15688..fba44c5 100644 --- a/dist/views/DummyDetailView.d.ts +++ b/dist/views/DummyDetailView.d.ts @@ -1,7 +1,7 @@ /** * Created by Samuel Gratzl on 27.04.2016. */ -import '../scss/style.scss'; +import '../scss/main.scss'; import { AD3View } from 'tdp_core'; export declare class DummyDetailView extends AD3View { private readonly x; diff --git a/dist/views/DummyDetailView.js.map b/dist/views/DummyDetailView.js.map new file mode 100644 index 0000000..c2ea313 --- /dev/null +++ b/dist/views/DummyDetailView.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DummyDetailView.js","sourceRoot":"","sources":["../../src/views/DummyDetailView.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AACjC,OAAO,EAAC,iBAAiB,EAAC,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,MAAM,OAAO,eAAgB,SAAQ,OAAO;IAA5C;;QAEmB,MAAC,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QACtB,MAAC,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QACtB,UAAK,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,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,CAAC;CACF"} \ No newline at end of file diff --git a/dist/views/DummyInstantView.js.map b/dist/views/DummyInstantView.js.map new file mode 100644 index 0000000..66cbbf1 --- /dev/null +++ b/dist/views/DummyInstantView.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DummyInstantView.js","sourceRoot":"","sources":["../../src/views/DummyInstantView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAC;AAG7D,MAAM,OAAO,gBAAiB,SAAQ,YAAY;IAEtC,QAAQ;QAChB,KAAK,CAAC,QAAQ,EAAE,CAAC;QAEjB,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAEO,KAAK;QACX,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG;;;;cAIZ,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;;;;cAI9C,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;;;;cAI7C,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;;;aAGhD,CAAC;IACZ,CAAC;CACF"} \ No newline at end of file diff --git a/dist/views/DummyList.js.map b/dist/views/DummyList.js.map new file mode 100644 index 0000000..da35590 --- /dev/null +++ b/dist/views/DummyList.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DummyList.js","sourceRoot":"","sources":["../../src/views/DummyList.ts"],"names":[],"mappings":"AAIA,OAAO,EAAmB,WAAW,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,OAAO,EAAC,UAAU,EAAC,MAAM,UAAU,CAAC;AAGpC,MAAM,OAAO,cAAe,SAAQ,UAAU;IAC5C,YAAY,OAAqB,EAAmB,UAA4B,EAAE,SAAqB,EAAE,MAAmB,EAAE,OAAO,GAAG,EAAE;QACxI,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;YAC9C,QAAQ,EAAE,UAAU,CAAC,IAAI;YACzB,UAAU,EAAE,UAAU,CAAC,MAAM;SAC9B,EAAE,OAAO,CAAC,CAAC,CAAC;QAJqC,eAAU,GAAV,UAAU,CAAkB;IAKhF,CAAC;IAES,cAAc;QACtB,OAAO,aAAa,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;IAES,QAAQ;QAChB,MAAM,OAAO,GAAG,IAAI,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC;QACzD,OAAO,aAAa,CAAC,kBAAkB,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACvF,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,OAAqB,EAAE,SAAqB,EAAE,MAAmB,EAAE,OAAQ;QAC7F,OAAO,IAAI,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,OAAqB,EAAE,SAAqB,EAAE,MAAmB,EAAE,OAAQ;QAC7F,OAAO,IAAI,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACF"} \ No newline at end of file diff --git a/dist/views/index.js.map b/dist/views/index.js.map new file mode 100644 index 0000000..01d7da5 --- /dev/null +++ b/dist/views/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/views/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"} \ No newline at end of file diff --git a/package.json b/package.json index 0d0528c..abef2b9 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,7 @@ "redhat_packages.txt" ], "scripts": { - "clean": "rimraf dist lib && 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 dist lib", "check": "flake8 --exclude=.git,venv,deploy,docs,__pycache__,node_modules", "pretest": "echo hybrid", "test": "npm run test:web && npm run test:python", From c12b2432a3c40481f8512bdae6b829386362c7e4 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 22 Jul 2020 12:48:40 +0200 Subject: [PATCH 40/44] final update --- package.json | 26 ++++++++++++++------------ tsconfig.json | 3 ++- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index abef2b9..e846b8c 100644 --- a/package.json +++ b/package.json @@ -44,13 +44,15 @@ "dist": "npm run dist:web && npm run dist:python", "compile": "tsc", "compile:watch": "tsc -w", + "postcompile": "npm run copy", "lint": "tslint -c tslint.json -p . 'src/**/*.ts?(x)' 'tests/**/*.ts?(x)'", "docs": "npm run docs:web && npm run docs:python", "prebuild": "echo hybrid", "posttest": "echo hybrid", "test:watch": "jest --watch", "build": "npm run build:web && npm run build:python", - "build:web": "npm run clean && npm run compile && npm run copy-assets && npm run copy-styles", + "build:web": "npm run clean && npm run compile", + "copy": "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", "release:major": "npm version major && npm publish && git push --follow-tags", @@ -77,16 +79,16 @@ "ordino": "github:Caleydo/ordino#vstoiber/use_refactoring_branches" }, "devDependencies": { - "@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 32f2f74..e7bc9b2 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 492d764000bd9356bc3f227a396476c58f93f6ab Mon Sep 17 00:00:00 2001 From: anita-steiner Date: Sun, 26 Jul 2020 12:41:07 +0200 Subject: [PATCH 41/44] update dependencies --- buildInfo.js | 176 ---------------------------------------------- package.json | 5 +- tsconfig_dev.json | 6 -- 3 files changed, 3 insertions(+), 184 deletions(-) delete mode 100644 buildInfo.js delete mode 100644 tsconfig_dev.json 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 e846b8c..a862b1a 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ ], "scripts": { "clean": "rimraf dist lib", + "delete-dependencies": "rimraf node_modules", "check": "flake8 --exclude=.git,venv,deploy,docs,__pycache__,node_modules", "pretest": "echo hybrid", "test": "npm run test:web && npm run test:python", @@ -73,10 +74,10 @@ "predist:python": "npm run build:python && npm run docs:python" }, "dependencies": { - "tdp_core": "github:datavisyn/tdp_core#vstoiber/refactoring" + "tdp_core": "github:datavisyn/tdp_core#develop" }, "optionalDependencies": { - "ordino": "github:Caleydo/ordino#vstoiber/use_refactoring_branches" + "ordino": "github:Caleydo/ordino#develop" }, "devDependencies": { "@types/jest": "~26.0.5", 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" - } -} From bf45b0f6a68604af1d4da8ff564ebc8b8d607e46 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 19 Aug 2020 07:34:19 +0200 Subject: [PATCH 42/44] update paths --- dist/scss/_idtype_color.scss | 2 +- dist/views/DummyInstantView.d.ts | 2 +- dist/views/DummyInstantView.js | 2 +- dist/views/DummyInstantView.js.map | 2 +- src/scss/_idtype_color.scss | 2 +- src/views/DummyInstantView.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/scss/_idtype_color.scss b/dist/scss/_idtype_color.scss index c1d66a6..715f38e 100644 --- a/dist/scss/_idtype_color.scss +++ b/dist/scss/_idtype_color.scss @@ -1,4 +1,4 @@ -@import "~tdp_core/src/styles/idtype_color"; +@import "~tdp_core/dist/scss/idtype_color"; * { @include idtype_color('IDTypeA', #73dbff); diff --git a/dist/views/DummyInstantView.d.ts b/dist/views/DummyInstantView.d.ts index 91c45af..bc287de 100644 --- a/dist/views/DummyInstantView.d.ts +++ b/dist/views/DummyInstantView.d.ts @@ -1,4 +1,4 @@ -import { AInstantView } from 'tdp_core/src/views/AInstantView'; +import { AInstantView } from 'tdp_core'; export declare class DummyInstantView extends AInstantView { protected initImpl(): void; private build; diff --git a/dist/views/DummyInstantView.js b/dist/views/DummyInstantView.js index cc5543a..6a20ba5 100644 --- a/dist/views/DummyInstantView.js +++ b/dist/views/DummyInstantView.js @@ -1,4 +1,4 @@ -import { AInstantView } from 'tdp_core/src/views/AInstantView'; +import { AInstantView } from 'tdp_core'; export class DummyInstantView extends AInstantView { initImpl() { super.initImpl(); diff --git a/dist/views/DummyInstantView.js.map b/dist/views/DummyInstantView.js.map index 66cbbf1..8bdb1f2 100644 --- a/dist/views/DummyInstantView.js.map +++ b/dist/views/DummyInstantView.js.map @@ -1 +1 @@ -{"version":3,"file":"DummyInstantView.js","sourceRoot":"","sources":["../../src/views/DummyInstantView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,iCAAiC,CAAC;AAG7D,MAAM,OAAO,gBAAiB,SAAQ,YAAY;IAEtC,QAAQ;QAChB,KAAK,CAAC,QAAQ,EAAE,CAAC;QAEjB,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAEO,KAAK;QACX,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG;;;;cAIZ,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;;;;cAI9C,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;;;;cAI7C,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;;;aAGhD,CAAC;IACZ,CAAC;CACF"} \ No newline at end of file +{"version":3,"file":"DummyInstantView.js","sourceRoot":"","sources":["../../src/views/DummyInstantView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AAGtC,MAAM,OAAO,gBAAiB,SAAQ,YAAY;IAEtC,QAAQ;QAChB,KAAK,CAAC,QAAQ,EAAE,CAAC;QAEjB,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAEO,KAAK;QACX,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG;;;;cAIZ,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;;;;cAI9C,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;;;;cAI7C,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;;;aAGhD,CAAC;IACZ,CAAC;CACF"} \ No newline at end of file diff --git a/src/scss/_idtype_color.scss b/src/scss/_idtype_color.scss index c1d66a6..715f38e 100644 --- a/src/scss/_idtype_color.scss +++ b/src/scss/_idtype_color.scss @@ -1,4 +1,4 @@ -@import "~tdp_core/src/styles/idtype_color"; +@import "~tdp_core/dist/scss/idtype_color"; * { @include idtype_color('IDTypeA', #73dbff); diff --git a/src/views/DummyInstantView.ts b/src/views/DummyInstantView.ts index acad4d8..b5bba25 100644 --- a/src/views/DummyInstantView.ts +++ b/src/views/DummyInstantView.ts @@ -1,4 +1,4 @@ -import {AInstantView} from 'tdp_core/src/views/AInstantView'; +import {AInstantView} from 'tdp_core'; export class DummyInstantView extends AInstantView { From f4916fc89999f79ff22b9106e84482610ea9a124 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 19 Aug 2020 07:34:28 +0200 Subject: [PATCH 43/44] update phovea.ts --- dist/phovea.js | 27 +++++++++++++++++---------- dist/phovea.js.map | 2 +- src/phovea.ts | 27 +++++++++++++++++---------- 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/dist/phovea.js b/dist/phovea.js index cc7457b..4306c80 100644 --- a/dist/phovea.js +++ b/dist/phovea.js @@ -9,9 +9,10 @@ module.exports = function (registry, feature) { // generator-phovea:begin /// #if include('ordino') registry.push('ordinoStartMenuSection', 'dummy_start_a', function () { - return import('./base/DummyMenuSection').then((d) => d.DummyMenuSection); + return import('./base/DummyMenuSection'); }, { name: 'Dummy Data', + factory: 'new DummyMenuSection', cssClass: 'targidDummyData', priority: 20, viewId: 'dummy_start_a', @@ -35,51 +36,55 @@ module.exports = function (registry, feature) { selection: 'none' }); registry.push('tdpView', 'dummy_detail', function () { - return import('./views/DummyDetailView').then((d) => d.DummyDetailView); + return import('./views/DummyDetailView'); }, { name: 'Dummy Detail View', + factory: 'new DummyDetailView', idtype: 'IDTypeA', selection: '2' }); registry.push('tdpView', 'dummy_dependent', function () { - return import('./views/DummyDependentList').then((d) => d.DummyDependentList); + return import('./views/DummyDependentList'); }, { name: 'Dummy Dependent List', + factory: 'new DummyDependentList', idtype: 'IDTypeA', selection: 'some' }); registry.push('tdpView', 'dummyb_dependent', function () { - return import('./views/DummyDependentBList').then((d) => d.DummyDependentBList); + return import('./views/DummyDependentBList'); }, { name: 'Dummy Dependent List', + factory: 'new DummyDependentBList', idtype: 'IDTypeB', selection: 'some' }); registry.push('tdpView', 'dummy_composite', function () { - return import('tdp_core/src/views/CompositeView').then((c) => c.CompositeView); + return import('tdp_core/dist/views/CompositeView'); }, { name: 'DummyComposite', + factory: 'new CompositeView', idtype: 'IDTypeA', selection: 'some', elements: [ { key: 'a', loader() { - return import('./views/DummyComposite').then((d) => d.DummyA); + return import('./views/DummyComposite'); }, factory: 'new DummyA' }, { key: 'b', loader() { - return import('./views/DummyComposite').then((d) => d.DummyB); + return import('./views/DummyComposite'); }, factory: 'new DummyB' }, { key: 'c', loader() { - return import('./views/DummyComposite').then((d) => d.DummyC); + return import('./views/DummyComposite'); }, factory: 'new DummyC' } @@ -90,18 +95,20 @@ module.exports = function (registry, feature) { } }); registry.push('tdpView', 'dummy_external', function () { - return import('tdp_core/src/views/ProxyView').then((p) => p.ProxyView); + return import('tdp_core/dist/views/ProxyView'); }, { name: 'Wikipedia', + factory: 'new ProxyView', site: 'https://wikipedia.org/w/index.php?search={id}', argument: 'id', idtype: 'IDTypeA', selection: 'chooser' }); registry.push('tdpInstantView', 'dummy', function () { - return import('./views/DummyInstantView').then((d) => d.DummyInstantView); + return import('./views/DummyInstantView'); }, { name: 'Info', + factory: 'new DummyInstantView', idtype: 'IDTypeA' }); registry.push('tdpScore', 'dummy_score', function () { diff --git a/dist/phovea.js.map b/dist/phovea.js.map index 16866af..f27880d 100644 --- a/dist/phovea.js.map +++ b/dist/phovea.js.map @@ -1 +1 @@ -{"version":3,"file":"phovea.js","sourceRoot":"","sources":["../src/phovea.ts"],"names":[],"mappings":"AAAA;;;;gFAIgF;AAEhF,qEAAqE;AACrE,MAAM,CAAC,OAAO,GAAG,UAAU,QAAQ,EAAE,OAAO;IAC1C,6GAA6G;IAC7G,yBAAyB;IAGzB,yBAAyB;IACzB,QAAQ,CAAC,IAAI,CAAC,wBAAwB,EAAE,eAAe,EAAE;QACvD,OAAO,MAAM,CAAC,yBAAyB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC;IAC3E,CAAC,EAAE;QACA,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,iBAAiB;QAC3B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE,SAAS;KACnB,CAAC,CAAC;IACH,UAAU;IAEV,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,EAAE;QACxC,OAAO,MAAM,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,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ACjE,CAAC,EAAE;QACA,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,SAAS;KACnB,CAAC,CAAC;IACH,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,aAAa,EAAE;QAC3C,OAAO,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IACjE,CAAC,EAAE;QACD,OAAO,EAAE,aAAa;KACvB,CAAC,CAAC;IAEH,QAAQ,CAAC,IAAI,CAAC,sBAAsB,EAAE,QAAQ,EAAE;QAC9C,OAAO,MAAM,CAAC,4BAA4B,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;IACjF,CAAC,EAAE;QACD,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,SAAS;KACnB,CAAC,CAAC;IAEH,QAAQ,CAAC,IAAI,CAAC,sBAAsB,EAAE,QAAQ,EAAE;QAC9C,OAAO,MAAM,CAAC,4BAA4B,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC;IACjF,CAAC,EAAE;QACD,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,SAAS;KACnB,CAAC,CAAC;IACH,uBAAuB;AACzB,CAAC,CAAC"} \ No newline at end of file diff --git a/src/phovea.ts b/src/phovea.ts index 7586d5d..1e51cbe 100644 --- a/src/phovea.ts +++ b/src/phovea.ts @@ -12,9 +12,10 @@ module.exports = function (registry, feature) { /// #if include('ordino') registry.push('ordinoStartMenuSection', 'dummy_start_a', function () { - return import('./base/DummyMenuSection').then((d) => d.DummyMenuSection); + return import('./base/DummyMenuSection'); }, { name: 'Dummy Data', + factory: 'new DummyMenuSection', cssClass: 'targidDummyData', priority: 20, viewId: 'dummy_start_a', @@ -41,54 +42,58 @@ module.exports = function (registry, feature) { }); registry.push('tdpView', 'dummy_detail', function () { - return import('./views/DummyDetailView').then((d) => d.DummyDetailView); + return import('./views/DummyDetailView'); }, { name: 'Dummy Detail View', + factory: 'new DummyDetailView', idtype: 'IDTypeA', selection: '2' }); registry.push('tdpView', 'dummy_dependent', function () { - return import('./views/DummyDependentList').then((d) => d.DummyDependentList); + return import('./views/DummyDependentList'); }, { name: 'Dummy Dependent List', + factory: 'new DummyDependentList', idtype: 'IDTypeA', selection: 'some' }); registry.push('tdpView', 'dummyb_dependent', function () { - return import('./views/DummyDependentBList').then((d) => d.DummyDependentBList); + return import('./views/DummyDependentBList'); }, { name: 'Dummy Dependent List', + factory: 'new DummyDependentBList', idtype: 'IDTypeB', selection: 'some' }); registry.push('tdpView', 'dummy_composite', function () { - return import('tdp_core/src/views/CompositeView').then((c) => c.CompositeView); + return import('tdp_core/dist/views/CompositeView'); }, { name: 'DummyComposite', + factory: 'new CompositeView', idtype: 'IDTypeA', selection: 'some', elements: [ { key: 'a', loader() { - return import('./views/DummyComposite').then((d) => d.DummyA); + return import('./views/DummyComposite'); }, factory: 'new DummyA' }, { key: 'b', loader() { - return import('./views/DummyComposite').then((d) => d.DummyB); + return import('./views/DummyComposite'); }, factory: 'new DummyB' }, { key: 'c', loader() { - return import('./views/DummyComposite').then((d) => d.DummyC); + return import('./views/DummyComposite'); }, factory: 'new DummyC' } @@ -100,9 +105,10 @@ module.exports = function (registry, feature) { }); registry.push('tdpView', 'dummy_external', function () { - return import('tdp_core/src/views/ProxyView').then((p) => p.ProxyView); + return import('tdp_core/dist/views/ProxyView'); }, { name: 'Wikipedia', + factory: 'new ProxyView', site: 'https://wikipedia.org/w/index.php?search={id}', argument: 'id', idtype: 'IDTypeA', @@ -110,9 +116,10 @@ module.exports = function (registry, feature) { }); registry.push('tdpInstantView', 'dummy', function () { - return import('./views/DummyInstantView').then((d) => d.DummyInstantView); + return import('./views/DummyInstantView'); }, { name: 'Info', + factory: 'new DummyInstantView', idtype: 'IDTypeA' }); From 224992e23c26c20588a6d89683133f0df899bae1 Mon Sep 17 00:00:00 2001 From: dvvanessastoiber Date: Wed, 19 Aug 2020 09:53:27 +0200 Subject: [PATCH 44/44] prepare release 8.0.0 --- package.json | 6 +++--- requirements.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index a862b1a..272e5c5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "tdp_dummy", "description": "", "homepage": "https://phovea.caleydo.org", - "version": "7.0.1-SNAPSHOT", + "version": "8.0.0", "author": { "name": "The Caleydo Team", "email": "contact@caleydo.org", @@ -74,10 +74,10 @@ "predist:python": "npm run build:python && npm run docs:python" }, "dependencies": { - "tdp_core": "github:datavisyn/tdp_core#develop" + "tdp_core": "^10.0.1" }, "optionalDependencies": { - "ordino": "github:Caleydo/ordino#develop" + "ordino": "github:Caleydo/ordino#semver:^8.0.1" }, "devDependencies": { "@types/jest": "~26.0.5", diff --git a/requirements.txt b/requirements.txt index 185cf08..3b2b590 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ --e git+https://github.com/datavisyn/tdp_core.git@develop#egg=tdp_core +tdp_core>=10.0.0,<11.0.0