From 27e772705c70348d5345121fbce4dc5871d1d4d7 Mon Sep 17 00:00:00 2001 From: doomsayer2 Date: Tue, 18 Apr 2017 10:50:40 +0200 Subject: [PATCH] Cleans up. (refs #1) --- src/app.js | 107 -------------------------------------------- src/app.js.map | 1 - src/index.js | 12 ----- src/index.js.map | 1 - src/language.js | 14 ------ src/language.js.map | 1 - 6 files changed, 136 deletions(-) delete mode 100644 src/app.js delete mode 100644 src/app.js.map delete mode 100644 src/index.js delete mode 100644 src/index.js.map delete mode 100644 src/language.js delete mode 100644 src/language.js.map diff --git a/src/app.js b/src/app.js deleted file mode 100644 index 66c020a..0000000 --- a/src/app.js +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Main entry point of the whole application, where all views are loaded and created. - * - * Created by Valid Team on 10.04.2016. - * Framework Created by Caleydo Team on 31.08.2016. - */ -import * as d3 from 'd3'; -import * as plugins from 'phovea_core/src/plugin'; -import { AppConstants } from './app_constants'; -/** - * The main class for the Valid app - */ -var App = (function () { - function App(parent) { - /** - * Enter here the views you want to append. You can choose between either the - * 'dataLoadingView' --> Here the file dialog and load for data is placed - * 'dataVizView' --> This contains the final visualization - * - * @type {[{view: string; parent: string; options: {cssClass: string; eventName: string}}]} - */ - this.views = [ - /** - * { - * view: 'ClassNameOfView', - * parent: 'Name of parent view', - * options: { leave empty if not needed } - * } - */ - { - view: 'SankeyDiagram', - parent: 'dataVizView', - options: {} - } - ]; - this.$node = d3.select(parent); - this.$node.append('div').classed('dataLoadingView', true); - this.$node.append('div').classed('dataVizView', true); - } - /** - * Initialize the view and return a promise - * that is resolved as soon the view is completely initialized. - * @returns {Promise} - */ - App.prototype.init = function () { - //This method is used to add the event listeners to the view - this.addListeners(); - //This method calls the build function which fills the DOM with elements - return this.build(); - }; - /** - * Initialize all necessary listeners here - */ - App.prototype.addListeners = function () { - //Add listeners here - }; - /** - * Load and initialize all necessary views - * @returns {Promise} - */ - App.prototype.build = function () { - var _this = this; - this.setBusy(true); // show loading indicator before loading - // wrap view ids from package.json as plugin and load the necessary files - var pluginPromises = this.views - .map(function (d) { return plugins.get(AppConstants.VIEW, d.view); }) - .filter(function (d) { return d !== undefined; }) // filter views that does not exists - .map(function (d) { return d.load(); }); - // when everything is loaded, then create and init the views - var buildPromise = Promise.all(pluginPromises) - .then(function (plugins) { - _this.$node.select('h3').remove(); // remove loading text from index.html template - var initPromises = plugins.map(function (p, index) { - var view = p.factory(_this.$node.select("." + _this.views[index].parent).node(), // parent node - _this.views[index].options || {} // options - ); - return view.init(); - }); - // wait until all views are initialized, before going to next then - return Promise.all(initPromises); - }) - .then(function (viewInstances) { - // loading and initialization has finished -> hide loading indicator - _this.setBusy(false); - return _this; - }); - return buildPromise; - }; - /** - * Show or hide the application loading indicator - * @param isBusy - */ - App.prototype.setBusy = function (isBusy) { - this.$node.select('.busy').classed('hidden', !isBusy); - }; - return App; -}()); -export { App }; -/** - * Factory method to create a new app instance - * @param parent - * @returns {App} - */ -export function create(parent) { - return new App(parent); -} -//# sourceMappingURL=app.js.map \ No newline at end of file diff --git a/src/app.js.map b/src/app.js.map deleted file mode 100644 index dad7a57..0000000 --- a/src/app.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AA0B7C;;GAEG;AACH;IA2BE,aAAY,MAAc;QAvB1B;;;;;;WAMG;QACK,UAAK,GAAmB;YAC9B;;;;;;eAMG;YAEH;gBACE,IAAI,EAAE,eAAe;gBACrB,MAAM,EAAE,aAAa;gBACrB,OAAO,EAAE,EAAE;aACZ;SACF,CAAC;QAGA,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAE/B,IAAI,CAAC,KAAK,CAA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K,CAAC,MAAM,CAAC,MAAI,KAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAQ,CAAC,CAAC,IAAI,EAAE,EAAE,cAAc;gBACxE,KAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC,UAAU;iBAC3C,CAAC;gBACF,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC,CAAC,CAAC;YAEH,kEAAkE;YAClE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACnC,CAAC,CAAC;aACD,IAAI,CAAC,UAAC,aAAa;YAClB,oEAAoE;YACpE,KAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,CAAC,KAAI,CAAC;QACd,CAAC,CAAC,CAAC;QAEL,MAAM,CAAC,YAAY,CAAC;IACtB,CAAC;IAED;;;OAGG;IACH,qBAAO,GAAP,UAAQ,MAAe;QACrB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC;IACxD,CAAC;IAEH,UAAC;AAAD,CAAC,AAnGD,IAmGC;;AAED;;;;GAIG;AACH,MAAM,iBAAiB,MAAc;IACnC,MAAM,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;AACzB,CAAC"} \ No newline at end of file diff --git a/src/index.js b/src/index.js deleted file mode 100644 index 6865c8f..0000000 --- a/src/index.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Created by Caleydo Team on 31.08.2016. - */ -import 'file-loader?name=index.html!extract-loader!html-loader!./index.html'; -import 'file-loader?name=404.html-loader!./404.html'; -import 'file-loader?name=robots.txt!./robots.txt'; -import 'phovea_ui/src/_bootstrap'; -import './style.scss'; -import * as app from './app'; -var parent = document.querySelector('#app'); -app.create(parent).init(); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/src/index.js.map b/src/index.js.map deleted file mode 100644 index 2f63375..0000000 --- a/src/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,qEAAqE,CAAC;AAC7E,OAAO,6CAA6C,CAAC;AACrD,OAAO,0CAA0C,CAAC;AAClD,OAAO,0BAA0B,CAAC;AAClC,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAK7B,IAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AAC9C,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC"} \ No newline at end of file diff --git a/src/language.js b/src/language.js deleted file mode 100644 index adc82af..0000000 --- a/src/language.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Created by Florian Grassinger on Mon, 10 Apr 2017 08:54:58 GMT. - * - * Add your constants here or Strings in order to make it possible for future distributions to change the language. - * If all strings and texts are written in constants it's easier to change the language depending on the region settings. - */ -/** - * Created by Florian Grassinger on Mon, 10 Apr 2017 08:54:58 GMT. - * - * Add your constants here or Strings in order to make it possible for future distributions to change the language. - * If all strings and texts are written in constants it's easier to change the language depending on the region settings. - */ export var APP_NAME = 'Valid'; -export var HELLO_WORLD = 'Hello World this is VALID... or will be...'; -//# sourceMappingURL=language.js.map \ No newline at end of file diff --git a/src/language.js.map b/src/language.js.map deleted file mode 100644 index 89267c2..0000000 --- a/src/language.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"language.js","sourceRoot":"","sources":["language.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,AAPA;;;;;GAKG,CAEH,MAAM,CAAC,IAAM,QAAQ,GAAG,OAAO,CAAC;AAChC,MAAM,CAAC,IAAM,WAAW,GAAG,4CAA4C,CAAC"} \ No newline at end of file