diff --git a/shrine-webclient/src/main/js/client/js-shrine/assets/css/styles.css b/shrine-webclient/src/main/js/client/js-shrine/assets/css/styles.css index 9e116bad1..00d134422 100644 --- a/shrine-webclient/src/main/js/client/js-shrine/assets/css/styles.css +++ b/shrine-webclient/src/main/js/client/js-shrine/assets/css/styles.css @@ -1,258 +1,258 @@ -.mailto { - box-sizing: border-box; - display: flex; - justify-content: center; - align-items: center; - width: 100%; - height: 100%; - padding: 10px; - color: #333; - background: #f2f2f2; - height: 100% p; - height-font-size: 16px; - height-line-height: 1.6em; } - .mailto .button { - border: 1px solid #6576a8; - background: #6d85ad; - border: 0; - outline: 0; - font-weight: bold; - text-transform: uppercase; - text-decoration: none; - letter-spacing: 1px; - color: #fff; - cursor: pointer; } - .mailto .button:hover { - background: #9cb8d9; } - .mailto .button:active { - background: #6576a8; } - .mailto .button--large { - position: relative; - padding: 15px 30px; - border-radius: 5px; - font-size: 16px; } - .mailto .button--large:active { - top: 1px; } - .mailto .content { - max-width: 350px; - text-align: center; } - .mailto .email { - position: relative; } - @import url(http://fonts.googleapis.com/css?family=Roboto:400,500,300,700); body { overflow: hidden; background: rgba(255, 255, 255, 0.9); font-family: 'Roboto', sans-serif; } html, body, .box-wrapper { width: 100%; height: 100%; margin: 0; } .box-wrapper { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -ms-flex-wrap: wrap; flex-wrap: wrap; } .box-wrapper > .box { margin-top: 1%; width: 100%; transition: all .2s ease; } .box-wrapper > .box .hideextra { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .box-wrapper > .box section { margin: 20 0 6 0; } .box-wrapper > .box section .v-full { height: 90vh; } .box-wrapper > .box section .v-full > table { padding-bottom: 10%; } .box-wrapper > .box section .v-min { height: 100px; } .box-wrapper > .box section .v-min > table { padding-bottom: 1%; } .box-wrapper > .box section .tbl-content { overflow: auto; margin-top: 0px; border: 1px solid rgba(98, 108, 146, 0.3); } .box-wrapper > .box table { width: 100%; table-layout: fixed; } .box-wrapper > .box table .tbl-header { background-color: rgba(98, 108, 146, 0.3); } .box-wrapper > .box table .tbl-header div.tbl-header { max-width: 5rem; } .box-wrapper > .box table tr { background: white; cursor: pointer; } .box-wrapper > .box table tr:hover { background: rgba(98, 108, 146, 0.3) !important; } .box-wrapper > .box table tr:nth-child(odd) { background: rgba(98, 108, 146, 0.1); } .box-wrapper > .box table th { padding: 2px 4px 4px 2px; text-align: left; font-weight: 500; font-size: .75rem; color: #626C92; text-transform: uppercase; border-bottom: solid 1px rgba(98, 108, 146, 0.1); border-left: solid 1px rgba(98, 108, 146, 0.1); } .box-wrapper > .box table td { transition: all .5s ease; padding: 2px; text-align: left; vertical-align: top; font-weight: 300; font-size: 12px; color: black; border-bottom: solid 1px rgba(98, 108, 146, 0.1); border-left: solid 1px rgba(98, 108, 146, 0.1); } .circle-pagination { position: absolute; z-index: 1000; list-style-type: none; margin: 0; top: -.3rem; } .circle-pagination li { border-radius: 50%; border: 2px solid #626C92; width: 12px; height: 12px; padding: 4px; margin: 6px; cursor: pointer; float: left; transition: all .2s ease; } .circle-pagination li.active, .circle-pagination li:hover { background: #626C92; width: 14px; height: 14px; } .circle-pagination li.active div, .circle-pagination li div:hover { color: white; } .circle-pagination li div { font-size: .6rem; width: 24px; position: relative; left: -6px; top: 1px; color: #626C92; font-weight: 600; text-transform: capitalize; } +.mailto { + box-sizing: border-box; + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 100%; + padding: 10px; + color: #333; + background: #f2f2f2; + height: 100% p; + height-font-size: 16px; + height-line-height: 1.6em; } + .mailto .button { + border: 1px solid #6576a8; + background: #6d85ad; + border: 0; + outline: 0; + font-weight: bold; + text-transform: uppercase; + text-decoration: none; + letter-spacing: 1px; + color: #fff; + cursor: pointer; } + .mailto .button:hover { + background: #9cb8d9; } + .mailto .button:active { + background: #6576a8; } + .mailto .button--large { + position: relative; + padding: 15px 30px; + border-radius: 5px; + font-size: 16px; } + .mailto .button--large:active { + top: 1px; } + .mailto .content { + max-width: 350px; + text-align: center; } + .mailto .email { + position: relative; } + @import url(http://fonts.googleapis.com/css?family=Roboto:400,300&subset=latin,latin-ext); ul.context-menu { transition: opacity 0.2s linear; list-style: none; margin: 0; padding: 0; font: 200 11px "Roboto", sans-serif; position: absolute; color: #626C92; box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.2); border-radius: 5px; border: 1px solid rgba(98, 108, 146, 0.25); } ul.context-menu * { transition: color 0.2s, background 0.2s; } ul.context-menu.hide { visibility: hidden; opacity: 0; } ul.context-menu.show { visibility: visible; opacity: 1; } ul.context-menu li { min-width: 100px; overflow: hidden; white-space: nowrap; padding: 6px 8px; background-color: #fff; border-bottom: 1px solid #ecf0f1; } ul.context-menu li a { color: #626C92; text-decoration: none; } ul.context-menu li:hover { background-color: #ecf0f1; color: #2980b9; } ul.context-menu li:hover a { color: #2980b9; } ul.context-menu li:first-child { border-radius: 5px 5px 0 0; } ul.context-menu li:last-child { border-bottom: 0; border-radius: 0 0 5px 5px; } @import url(http://fonts.googleapis.com/css?family=Roboto:400,300&subset=latin,latin-ext); .loader { background: #fff; margin: 50px 300px; /*todo cleanup with mixin*/ } .loader h1 { color: #626C92; font: 300 11px "Roboto", sans-serif; } .loader div.slider { position: absolute; width: 200px; height: 2px; margin-top: -30px; } .loader div.slider div.line { position: absolute; background: rgba(0, 0, 0, 0.2); width: 200px; height: 2px; } .loader div.slider div.break { position: absolute; width: 50%; height: 2px; } .loader div.slider div.break.dot1 { animation: loading 2s infinite; background: #D9ECF0; } .loader div.slider div.break.dot2 { animation: loading 2s 0.5s infinite; background: #6677AA; } .loader div.slider div.break.dot3 { animation: loading 2s 1s infinite; background: #D9ECF0; } @-webkit-keyframes "loading" { from { left: 0; opacity: 1; } to { left: 200px; opacity: 1; } } @-moz-keyframes "loading" { from { left: 0; opacity: 0; } to { left: 200px; opacity: 1; } } @-o-keyframes "loading" { from { left: 0; opacity: 0; } to { left: 200px; opacity: 1; } } @keyframes "loading" { from { left: 0; opacity: 0; } to { left: 200px; opacity: 1; } } diff --git a/shrine-webclient/src/main/js/client/js-shrine/dist/app-build.js b/shrine-webclient/src/main/js/client/js-shrine/dist/app-build.js index 2e1031277..4bb2ac1cf 100644 --- a/shrine-webclient/src/main/js/client/js-shrine/dist/app-build.js +++ b/shrine-webclient/src/main/js/client/js-shrine/dist/app-build.js @@ -1 +1 @@ -"bundle";System.register("main.js",[],function(a,b){"use strict";function c(a){a.use.standardConfiguration().developmentLogging(),a.start().then(function(){return a.setRoot("shell")})}return a("configure",c),{setters:[],execute:function(){}}}),function(){var a=System.amdDefine;a("shell.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return""})}(),System.register("shell.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d;return{setters:[],execute:function(){a("Shell",d=function(){function a(){c(this,a)}return a.prototype.configureRouter=function(a,b){a.title="SHRINE Webclient Plugin",a.map([{route:"mailto",moduleId:"views/mailto/mailto"},{route:["","query-viewer"],moduleId:"views/query-viewer/query-viewer"}]),this.router=b},a}()),a("Shell",d)}}}),function(){var a=System.amdDefine;a("views/mailto/mailto.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return''})}(),System.register("views/mailto/mailto.service.js",["aurelia-framework","repository/qep.repository"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f,g,h;return{setters:[function(a){d=a.inject},function(a){e=a.QEPRepository}],execute:function(){a("MailToService",(f=d(e),h=f(g=function(){function a(b){c(this,a),this.repository=b}return a.prototype.fetchStewardEmail=function(){return this.repository.fetchStewardEmail()},a}())||g)),a("MailToService",h)}}}),System.register("views/mailto/mailto.config.js",[],function(a,b){"use strict";var c;return{setters:[],execute:function(){a("MailConfig",c={mailto:"mailto:",subject:"subject="+encodeURIComponent("Question from a SHRINE User"),body:encodeURIComponent("Please enter the suggested information and your question. Your data steward will reply to this email.\n\n***Never send patient information, passwords, or other sensitive information by email****\nName:\nTitle:\nUser name (to log into SHRINE):\nTelephone Number (optional):\nPreferred email address (optional):\n\nQuestion or Comment:")}),a("MailConfig",c)}}}),System.register("views/mailto/mailto.js",["aurelia-framework","views/mailto/mailto.service","views/mailto/mailto.config"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f,g,h,i;return{setters:[function(a){d=a.inject},function(a){e=a.MailToService},function(a){f=a.MailConfig}],execute:function(){a("MailTo",(g=d(e,f),i=g(h=function(){function a(b,d){c(this,a),this.service=b,this.config=d}return a.prototype.openEmail=function(){var a=this;this.service.fetchStewardEmail().then(function(b){return window.top.location=a.getComposition(b),a})},a.prototype.getComposition=function(a){return this.config.mailto+a+"?"+this.config.subject+"&"+this.config.body},a}())||h)),a("MailTo",i)}}}),System.register("views/query-viewer/box-style.converter.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d;return{setters:[],execute:function(){a("BoxStyleValueConverter",d=function(){function a(){c(this,a)}return a.prototype.toView=function(a){return"transform: translate("+String(-100*a)+"%);"},a}()),a("BoxStyleValueConverter",d)}}}),function(){var a=System.amdDefine;a("views/query-viewer/context-menu/context-menu.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return''})}(),System.register("views/query-viewer/context-menu/context-menu.js",["aurelia-framework","common/i2b2.service.js"],function(a,b){"use strict";function c(a,b,c,d){c&&Object.defineProperty(a,b,{enumerable:c.enumerable,configurable:c.configurable,writable:c.writable,value:c.initializer?c.initializer.call(d):void 0})}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b,c,d,e){var f={};return Object.keys(d).forEach(function(a){f[a]=d[a]}),f.enumerable=!!f.enumerable,f.configurable=!!f.configurable,("value"in f||f.initializer)&&(f.writable=!0),f=c.slice().reverse().reduce(function(c,d){return d(a,b,c)||c},f),e&&void 0!==f.initializer&&(f.value=f.initializer?f.initializer.call(e):void 0,f.initializer=void 0),void 0===f.initializer&&(Object.defineProperty(a,b,f),f=null),f}var f,g,h,i,j,k,l,m;return{setters:[function(a){f=a.inject,g=a.bindable},function(a){h=a.I2B2Service}],execute:function(){a("ContextMenu",(i=f(h),m=i((k=function b(a){var e=this;d(this,b),c(this,"context",l,this),this.loadQuery=function(b){a.loadQuery(b),e.context["class"]="hide"},this.loadHistory=function(){a.loadHistory(),e.context["class"]="hide"}},l=e(k.prototype,"context",[g],{enumerable:!0,initializer:null}),j=k))||j)),a("ContextMenu",m)}}}),function(){var a=System.amdDefine;a("views/query-viewer/loading-bar/loading-bar.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return''})}(),System.register("views/query-viewer/loading-bar/loading-bar.js",["aurelia-framework"],function(a,b){"use strict";function c(a,b,c,d){c&&Object.defineProperty(a,b,{enumerable:c.enumerable,configurable:c.configurable,writable:c.writable,value:c.initializer?c.initializer.call(d):void 0})}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b,c,d,e){var f={};return Object.keys(d).forEach(function(a){f[a]=d[a]}),f.enumerable=!!f.enumerable,f.configurable=!!f.configurable,("value"in f||f.initializer)&&(f.writable=!0),f=c.slice().reverse().reduce(function(c,d){return d(a,b,c)||c},f),e&&void 0!==f.initializer&&(f.value=f.initializer?f.initializer.call(e):void 0,f.initializer=void 0),void 0===f.initializer&&(Object.defineProperty(a,b,f),f=null),f}var f,g,h,i;return{setters:[function(a){f=a.bindable}],execute:function(){a("LoadingBar",(g=function b(){d(this,b),c(this,"status",h,this)},h=e(g.prototype,"status",[f],{enumerable:!0,initializer:null}),i=g)),a("LoadingBar",i)}}}),function(){var a=System.amdDefine;a("views/query-viewer/query-viewer.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return''})}(),System.register("repository/qep.repository.js",["aurelia-framework","aurelia-fetch-client","fetch"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f,g,h,i;return{setters:[function(a){d=a.inject},function(a){e=a.HttpClient},function(a){}],execute:function(){f=function(){function a(a,b){for(var c=0;c1&&void 0!==arguments[1]?arguments[1]:0;return this.http.fetch("qep/queryResults?limit="+a+"&skip="+b).then(function(a){return a.json()})["catch"](function(a){return a})},a.prototype.fetchStewardEmail=function(){return this.http.fetch("data?key=stewardEmail").then(function(a){return a.json()}).then(function(a){return a.indexOf('"')>0?a.split('"')[1]:a})["catch"](function(){return""})},f(a,[{key:"url",get:function(){var a=document.URL,b=":6443/shrine-metadata/";return a.substring(0,a.lastIndexOf(":"))+b}},{key:"auth",get:function(){var a=sessionStorage.getItem("shrine.auth");return sessionStorage.removeItem("shrine.auth"),a}}]),a}())||h)),a("QEPRepository",i)}}}),System.register("views/query-viewer/query-viewer.service.js",["aurelia-framework","repository/qep.repository","./query-viewer.config"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f,g,h,i;return{setters:[function(a){d=a.inject},function(a){e=a.QEPRepository},function(a){f=a.QueryViewerConfig}],execute:function(){a("QueryViewerService",(g=d(e,f),i=g(h=function(){function a(b,d,e){c(this,a),this.repository=b,this.config=d}return a.prototype.fetchPreviousQueries=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.maxQueriesPerScroll;return this.repository.fetchPreviousQueries(a)},a.prototype.getScreens=function(a,b){var c=this;return new Promise(function(d,e){for(var f=a.sort().length,g=[],h=0;h0&&void 0!==arguments[0]?arguments[0]:window;c(this,b);var f=e.of(a),g=d.curry(function(a,b){return b.value?e.of(d.prop(a,b.value)):e.of(null)}),h=d.compose(g("i2b2"),g("window"),g("parent")),i=d.compose(g("CRC"),h),j=d.compose(g("events"),h);this.onResize=function(a){return j(f).map(function(b){return b.changedZoomWindows.subscribe(a)})},this.onHistory=function(a){return i(f).map(function(b){return b.ctrlr.history.events.onDataUpdate.subscribe(a)})},this.onQuery=function(a){return j(f).map(function(b){return b.afterQueryInit.subscribe(a)})},this.loadHistory=function(){return i(f).map(function(a){return a.view.history.doRefreshAll()})},this.loadQuery=function(a){return i(f).map(function(b){return b.ctrlr.QT.doQueryLoad(a)})}}),a("I2B2Service",f)}}}),System.register("views/query-viewer/query-viewer.model.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e;return{setters:[],execute:function(){d=function(){function a(a,b){for(var c=0;c0}}]),a}()),a("QueryViewerModel",e)}}}),System.register("common/container.js",["ramda"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f;return{setters:[function(a){d=a}],execute:function(){e=function(){function a(a,b){for(var c=0;c1,e.screens=a,e.processing=!1},k=function(){return f.service.fetchPreviousQueries(e.loadedCount+j.maxQueriesPerScroll).then(g).then(h)["catch"](function(a){return console.log(a)})},l=function(a,b){return f.runningQuery=b[0].name},m=function(){return e.hasData?h(e.screens):k()},n=function(a){return 1===i.scrollRatio(a).value&&e.moreToLoad&&!e.processing};this.onScroll=function(a){n(a)&&(k(),e.processing=!0)};var o=function(a){return"ADD"!==a.action},p=function(a,b){return f.vertStyle=b.find(o)?"v-min":"v-full"};d.onResize(p),d.onHistory(k),d.onQuery(l),m()}return a.prototype.getContext=function(a,b){return{x:a.pageX,y:a.pageY,id:b.id,"class":"show"}},a}())||l)),a("QueryViewer",m)}}}),System.register("views/query-viewer/result-style.converter.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d;return{setters:[],execute:function(){a("ResultStyleValueConverter",d=function(){function a(){c(this,a)}return a.prototype.toView=function(a){var b=this.isUnresolved(a)?"color:"+this.getColorValue(a):"";return b},a.prototype.isUnresolved=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"FINISHED";return!a||a.status!==b},a.prototype.getColorValue=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ERROR",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#FF0000",d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#00FF00";return a&&a.status!==b?d:c},a}()),a("ResultStyleValueConverter",d)}}}),System.register("views/query-viewer/result-value.converter.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d;return{setters:[],execute:function(){a("ResultValueConverter",d=function(){function a(){c(this,a)}return a.prototype.toView=function(a){return a?"FINISHED"!==a.status?a.status:a.count<0?"<=10":a.count:"not available"},a}()),a("ResultValueConverter",d)}}}); \ No newline at end of file +"bundle";System.register("main.js",[],function(a,b){"use strict";function c(a){a.use.standardConfiguration().developmentLogging(),a.start().then(function(){return a.setRoot("shell")})}return a("configure",c),{setters:[],execute:function(){}}}),function(){var a=System.amdDefine;a("shell.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return""})}(),System.register("shell.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d;return{setters:[],execute:function(){a("Shell",d=function(){function a(){c(this,a)}return a.prototype.configureRouter=function(a,b){a.title="SHRINE Webclient Plugin",a.map([{route:"mailto",moduleId:"views/mailto/mailto"},{route:["","query-viewer"],moduleId:"views/query-viewer/query-viewer"}]),this.router=b},a}()),a("Shell",d)}}}),function(){var a=System.amdDefine;a("views/mailto/mailto.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return''})}(),System.register("views/mailto/mailto.service.js",["aurelia-framework","repository/qep.repository"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f,g,h;return{setters:[function(a){d=a.inject},function(a){e=a.QEPRepository}],execute:function(){a("MailToService",(f=d(e),h=f(g=function(){function a(b){c(this,a),this.repository=b}return a.prototype.fetchStewardEmail=function(){return this.repository.fetchStewardEmail()},a}())||g)),a("MailToService",h)}}}),System.register("views/mailto/mailto.config.js",[],function(a,b){"use strict";var c;return{setters:[],execute:function(){a("MailConfig",c={mailto:"mailto:",subject:"subject="+encodeURIComponent("Question from a SHRINE User"),body:encodeURIComponent("Please enter the suggested information and your question. Your data steward will reply to this email.\n\n***Never send patient information, passwords, or other sensitive information by email****\nName:\nTitle:\nUser name (to log into SHRINE):\nTelephone Number (optional):\nPreferred email address (optional):\n\nQuestion or Comment:")}),a("MailConfig",c)}}}),System.register("views/mailto/mailto.js",["aurelia-framework","views/mailto/mailto.service","views/mailto/mailto.config"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f,g,h,i;return{setters:[function(a){d=a.inject},function(a){e=a.MailToService},function(a){f=a.MailConfig}],execute:function(){a("MailTo",(g=d(e,f),i=g(h=function(){function a(b,d){c(this,a),this.service=b,this.config=d}return a.prototype.openEmail=function(){var a=this;this.service.fetchStewardEmail().then(function(b){return window.top.location=a.getComposition(b),a})},a.prototype.getComposition=function(a){return this.config.mailto+a+"?"+this.config.subject+"&"+this.config.body},a}())||h)),a("MailTo",i)}}}),System.register("views/query-viewer/box-style.converter.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d;return{setters:[],execute:function(){a("BoxStyleValueConverter",d=function(){function a(){c(this,a)}return a.prototype.toView=function(a){return"transform: translate("+String(-100*a)+"%);"},a}()),a("BoxStyleValueConverter",d)}}}),function(){var a=System.amdDefine;a("views/query-viewer/context-menu/context-menu.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return''})}(),System.register("views/query-viewer/context-menu/context-menu.js",["aurelia-framework","common/i2b2.service.js"],function(a,b){"use strict";function c(a,b,c,d){c&&Object.defineProperty(a,b,{enumerable:c.enumerable,configurable:c.configurable,writable:c.writable,value:c.initializer?c.initializer.call(d):void 0})}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b,c,d,e){var f={};return Object.keys(d).forEach(function(a){f[a]=d[a]}),f.enumerable=!!f.enumerable,f.configurable=!!f.configurable,("value"in f||f.initializer)&&(f.writable=!0),f=c.slice().reverse().reduce(function(c,d){return d(a,b,c)||c},f),e&&void 0!==f.initializer&&(f.value=f.initializer?f.initializer.call(e):void 0,f.initializer=void 0),void 0===f.initializer&&(Object.defineProperty(a,b,f),f=null),f}var f,g,h,i,j,k,l,m;return{setters:[function(a){f=a.inject,g=a.bindable},function(a){h=a.I2B2Service}],execute:function(){a("ContextMenu",(i=f(h),m=i((k=function b(a){var e=this;d(this,b),c(this,"context",l,this),this.loadQuery=function(b){a.loadQuery(b),e.context["class"]="hide"},this.loadHistory=function(){a.loadHistory(),e.context["class"]="hide"}},l=e(k.prototype,"context",[g],{enumerable:!0,initializer:null}),j=k))||j)),a("ContextMenu",m)}}}),function(){var a=System.amdDefine;a("views/query-viewer/loading-bar/loading-bar.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return''})}(),System.register("views/query-viewer/loading-bar/loading-bar.js",["aurelia-framework"],function(a,b){"use strict";function c(a,b,c,d){c&&Object.defineProperty(a,b,{enumerable:c.enumerable,configurable:c.configurable,writable:c.writable,value:c.initializer?c.initializer.call(d):void 0})}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b,c,d,e){var f={};return Object.keys(d).forEach(function(a){f[a]=d[a]}),f.enumerable=!!f.enumerable,f.configurable=!!f.configurable,("value"in f||f.initializer)&&(f.writable=!0),f=c.slice().reverse().reduce(function(c,d){return d(a,b,c)||c},f),e&&void 0!==f.initializer&&(f.value=f.initializer?f.initializer.call(e):void 0,f.initializer=void 0),void 0===f.initializer&&(Object.defineProperty(a,b,f),f=null),f}var f,g,h,i;return{setters:[function(a){f=a.bindable}],execute:function(){a("LoadingBar",(g=function b(){d(this,b),c(this,"status",h,this)},h=e(g.prototype,"status",[f],{enumerable:!0,initializer:null}),i=g)),a("LoadingBar",i)}}}),function(){var a=System.amdDefine;a("views/query-viewer/query-viewer.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return''})}(),System.register("repository/qep.repository.js",["aurelia-framework","aurelia-fetch-client","fetch"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f,g,h,i;return{setters:[function(a){d=a.inject},function(a){e=a.HttpClient},function(a){}],execute:function(){f=function(){function a(a,b){for(var c=0;c1&&void 0!==arguments[1]?arguments[1]:0;return this.http.fetch("qep/queryResults?limit="+a+"&skip="+b).then(function(a){return a.json()})["catch"](function(a){return a})},a.prototype.fetchStewardEmail=function(){return this.http.fetch("data?key=stewardEmail").then(function(a){return a.json()}).then(function(a){return a.indexOf('"')>0?a.split('"')[1]:a})["catch"](function(){return""})},f(a,[{key:"url",get:function(){var a=document.URL,b=":6443/shrine-metadata/";return a.substring(0,a.lastIndexOf(":"))+b}},{key:"auth",get:function(){var a=sessionStorage.getItem("shrine.auth");return sessionStorage.removeItem("shrine.auth"),a}}]),a}())||h)),a("QEPRepository",i)}}}),System.register("views/query-viewer/query-viewer.service.js",["aurelia-framework","repository/qep.repository","./query-viewer.config"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f,g,h,i;return{setters:[function(a){d=a.inject},function(a){e=a.QEPRepository},function(a){f=a.QueryViewerConfig}],execute:function(){a("QueryViewerService",(g=d(e,f),i=g(h=function(){function a(b,d,e){c(this,a),this.repository=b,this.config=d}return a.prototype.fetchPreviousQueries=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.maxQueriesPerScroll;return this.repository.fetchPreviousQueries(a)},a.prototype.getScreens=function(a,b){var c=this;return new Promise(function(d,e){for(var f=a.sort().length,g=[],h=0;h0&&void 0!==arguments[0]?arguments[0]:window;c(this,b);var f=e.of(a),g=d.curry(function(a,b){return b.value?e.of(d.prop(a,b.value)):e.of(null)}),h=d.compose(g("i2b2"),g("window"),g("parent")),i=d.compose(g("CRC"),h),j=d.compose(g("events"),h);this.onResize=function(a){return j(f).map(function(b){return b.changedZoomWindows.subscribe(a)})},this.onHistory=function(a){return i(f).map(function(b){return b.ctrlr.history.events.onDataUpdate.subscribe(a)})},this.onQuery=function(a){return j(f).map(function(b){return b.afterQueryInit.subscribe(a)})},this.loadHistory=function(){return i(f).map(function(a){return a.view.history.doRefreshAll()})},this.loadQuery=function(a){return i(f).map(function(b){return b.ctrlr.QT.doQueryLoad(a)})}}),a("I2B2Service",f)}}}),System.register("views/query-viewer/query-viewer.model.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e;return{setters:[],execute:function(){d=function(){function a(a,b){for(var c=0;c0}}]),a}()),a("QueryViewerModel",e)}}}),System.register("common/container.js",["ramda"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f;return{setters:[function(a){d=a}],execute:function(){e=function(){function a(a,b){for(var c=0;c1,e.screens=a,e.processing=!1},k=function(){return f.service.fetchPreviousQueries(e.loadedCount+j.maxQueriesPerScroll).then(g).then(h)["catch"](function(a){return console.log(a)})},l=function(a,b){return f.runningQuery=b[0].name},m=function(){return e.hasData?h(e.screens):k()},n=function(a){return 1===i.scrollRatio(a).value&&e.moreToLoad&&!e.processing};this.onScroll=function(a){n(a)&&(k(),e.processing=!0)};var o=function(a){return"ADD"!==a.action},p=function(a,b){return f.vertStyle=b.find(o)?"v-min":"v-full"};d.onResize(p),d.onHistory(k),d.onQuery(l),m()}return a.prototype.getContext=function(a,b){return{x:a.pageX,y:a.pageY,id:b.id,"class":"show"}},a}())||l)),a("QueryViewer",m)}}}),System.register("views/query-viewer/result-style.converter.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d;return{setters:[],execute:function(){a("ResultStyleValueConverter",d=function(){function a(){c(this,a)}return a.prototype.toView=function(a){var b=this.isUnresolved(a)?"color:"+this.getColorValue(a):"";return b},a.prototype.isUnresolved=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"FINISHED";return!a||a.status!==b},a.prototype.getColorValue=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ERROR",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#FF0000",d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#00FF00";return a&&a.status!==b?d:c},a}()),a("ResultStyleValueConverter",d)}}}),System.register("views/query-viewer/result-value.converter.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d;return{setters:[],execute:function(){a("ResultValueConverter",d=function(){function a(){c(this,a)}return a.prototype.toView=function(a){return a?"FINISHED"!==a.status?a.status:a.count<0?"<=10":a.count:"not available"},a}()),a("ResultValueConverter",d)}}}); \ No newline at end of file diff --git a/shrine-webclient/src/main/js/client/js-shrine/dist/views/query-viewer/query-viewer.js b/shrine-webclient/src/main/js/client/js-shrine/dist/views/query-viewer/query-viewer.js index 07e03b079..025e358cb 100644 --- a/shrine-webclient/src/main/js/client/js-shrine/dist/views/query-viewer/query-viewer.js +++ b/shrine-webclient/src/main/js/client/js-shrine/dist/views/query-viewer/query-viewer.js @@ -1,108 +1,108 @@ System.register(['aurelia-framework', 'views/query-viewer/query-viewer.service', 'common/i2b2.service.js', './query-viewer.model', './scroll.service', './query-viewer.config'], function (_export, _context) { "use strict"; var inject, computedFrom, QueryViewerService, I2B2Service, QueryViewerModel, ScrollService, QueryViewerConfig, _dec, _class, QueryViewer; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } return { setters: [function (_aureliaFramework) { inject = _aureliaFramework.inject; computedFrom = _aureliaFramework.computedFrom; }, function (_viewsQueryViewerQueryViewerService) { QueryViewerService = _viewsQueryViewerQueryViewerService.QueryViewerService; }, function (_commonI2b2ServiceJs) { I2B2Service = _commonI2b2ServiceJs.I2B2Service; }, function (_queryViewerModel) { QueryViewerModel = _queryViewerModel.QueryViewerModel; }, function (_scrollService) { ScrollService = _scrollService.ScrollService; }, function (_queryViewerConfig) { QueryViewerConfig = _queryViewerConfig.QueryViewerConfig; }], execute: function () { _export('QueryViewer', QueryViewer = (_dec = inject(QueryViewerService, I2B2Service, QueryViewerModel), _dec(_class = function () { function QueryViewer(service, i2b2Svc, model) { var _this = this; _classCallCheck(this, QueryViewer); this.screenIndex = 0; this.showCircles = false; this.showLoader = true; this.runningQuery = null; this.service = service; this.vertStyle = 'v-min'; this.scrollRatio = 0; var parseResultToScreens = function parseResultToScreens(result) { model.totalQueries = result.rowCount; - model.loadedCount = model.loadedCount + result.queryResults.length; + model.loadedCount = result.queryResults.length; return _this.service.getScreens(result.adapters, result.queryResults); }; var setVM = function setVM(screens) { _this.showLoader = false; _this.runningQuery = null; _this.screens = screens; _this.showCircles = _this.screens.length > 1; model.screens = screens; model.processing = false; }; var refresh = function refresh() { return _this.service.fetchPreviousQueries(model.loadedCount + QueryViewerConfig.maxQueriesPerScroll).then(parseResultToScreens).then(setVM).catch(function (error) { return console.log(error); }); }; var addQuery = function addQuery(event, data) { return _this.runningQuery = data[0].name; }; var init = function init() { return model.hasData ? setVM(model.screens) : refresh(); }; var loadMoreQueries = function loadMoreQueries(e) { return ScrollService.scrollRatio(e).value === 1 && model.moreToLoad && !model.processing; }; this.onScroll = function (e) { if (loadMoreQueries(e)) { refresh(); model.processing = true; } }; var isMinimized = function isMinimized(e) { return e.action !== 'ADD'; }; var setVertStyle = function setVertStyle(a, b) { return _this.vertStyle = b.find(isMinimized) ? 'v-min' : 'v-full'; }; i2b2Svc.onResize(setVertStyle); i2b2Svc.onHistory(refresh); i2b2Svc.onQuery(addQuery); init(); } QueryViewer.prototype.getContext = function getContext(event, result) { return { x: event.pageX, y: event.pageY, id: result.id, class: 'show' }; }; return QueryViewer; }()) || _class)); _export('QueryViewer', QueryViewer); } }; }); //# sourceMappingURL=query-viewer.js.map diff --git a/shrine-webclient/src/main/js/client/js-shrine/dist/views/query-viewer/query-viewer.js.map b/shrine-webclient/src/main/js/client/js-shrine/dist/views/query-viewer/query-viewer.js.map index f08f96dfe..c08a0530d 100644 --- a/shrine-webclient/src/main/js/client/js-shrine/dist/views/query-viewer/query-viewer.js.map +++ b/shrine-webclient/src/main/js/client/js-shrine/dist/views/query-viewer/query-viewer.js.map @@ -1 +1 @@ -{"version":3,"sources":["views/query-viewer/query-viewer.js"],"names":["inject","computedFrom","QueryViewerService","I2B2Service","QueryViewerModel","ScrollService","QueryViewerConfig","QueryViewer","service","i2b2Svc","model","screenIndex","showCircles","showLoader","runningQuery","vertStyle","scrollRatio","parseResultToScreens","totalQueries","result","rowCount","loadedCount","queryResults","length","getScreens","adapters","setVM","screens","processing","refresh","fetchPreviousQueries","maxQueriesPerScroll","then","catch","console","log","error","addQuery","event","data","name","init","hasData","loadMoreQueries","e","value","moreToLoad","onScroll","isMinimized","action","setVertStyle","a","b","find","onResize","onHistory","onQuery","getContext","x","pageX","y","pageY","id","class"],"mappings":"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","file":"query-viewer.js","sourceRoot":"/src"} \ No newline at end of file +{"version":3,"sources":["views/query-viewer/query-viewer.js"],"names":["inject","computedFrom","QueryViewerService","I2B2Service","QueryViewerModel","ScrollService","QueryViewerConfig","QueryViewer","service","i2b2Svc","model","screenIndex","showCircles","showLoader","runningQuery","vertStyle","scrollRatio","parseResultToScreens","totalQueries","result","rowCount","loadedCount","queryResults","length","getScreens","adapters","setVM","screens","processing","refresh","fetchPreviousQueries","maxQueriesPerScroll","then","catch","console","log","error","addQuery","event","data","name","init","hasData","loadMoreQueries","e","value","moreToLoad","onScroll","isMinimized","action","setVertStyle","a","b","find","onResize","onHistory","onQuery","getContext","x","pageX","y","pageY","id","class"],"mappings":"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","file":"query-viewer.js","sourceRoot":"/src"} \ No newline at end of file diff --git a/shrine-webclient/src/main/js/client/js-shrine/export/assets/css/styles.css b/shrine-webclient/src/main/js/client/js-shrine/export/assets/css/styles.css index 9e116bad1..00d134422 100644 --- a/shrine-webclient/src/main/js/client/js-shrine/export/assets/css/styles.css +++ b/shrine-webclient/src/main/js/client/js-shrine/export/assets/css/styles.css @@ -1,258 +1,258 @@ -.mailto { - box-sizing: border-box; - display: flex; - justify-content: center; - align-items: center; - width: 100%; - height: 100%; - padding: 10px; - color: #333; - background: #f2f2f2; - height: 100% p; - height-font-size: 16px; - height-line-height: 1.6em; } - .mailto .button { - border: 1px solid #6576a8; - background: #6d85ad; - border: 0; - outline: 0; - font-weight: bold; - text-transform: uppercase; - text-decoration: none; - letter-spacing: 1px; - color: #fff; - cursor: pointer; } - .mailto .button:hover { - background: #9cb8d9; } - .mailto .button:active { - background: #6576a8; } - .mailto .button--large { - position: relative; - padding: 15px 30px; - border-radius: 5px; - font-size: 16px; } - .mailto .button--large:active { - top: 1px; } - .mailto .content { - max-width: 350px; - text-align: center; } - .mailto .email { - position: relative; } - @import url(http://fonts.googleapis.com/css?family=Roboto:400,500,300,700); body { overflow: hidden; background: rgba(255, 255, 255, 0.9); font-family: 'Roboto', sans-serif; } html, body, .box-wrapper { width: 100%; height: 100%; margin: 0; } .box-wrapper { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -ms-flex-wrap: wrap; flex-wrap: wrap; } .box-wrapper > .box { margin-top: 1%; width: 100%; transition: all .2s ease; } .box-wrapper > .box .hideextra { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .box-wrapper > .box section { margin: 20 0 6 0; } .box-wrapper > .box section .v-full { height: 90vh; } .box-wrapper > .box section .v-full > table { padding-bottom: 10%; } .box-wrapper > .box section .v-min { height: 100px; } .box-wrapper > .box section .v-min > table { padding-bottom: 1%; } .box-wrapper > .box section .tbl-content { overflow: auto; margin-top: 0px; border: 1px solid rgba(98, 108, 146, 0.3); } .box-wrapper > .box table { width: 100%; table-layout: fixed; } .box-wrapper > .box table .tbl-header { background-color: rgba(98, 108, 146, 0.3); } .box-wrapper > .box table .tbl-header div.tbl-header { max-width: 5rem; } .box-wrapper > .box table tr { background: white; cursor: pointer; } .box-wrapper > .box table tr:hover { background: rgba(98, 108, 146, 0.3) !important; } .box-wrapper > .box table tr:nth-child(odd) { background: rgba(98, 108, 146, 0.1); } .box-wrapper > .box table th { padding: 2px 4px 4px 2px; text-align: left; font-weight: 500; font-size: .75rem; color: #626C92; text-transform: uppercase; border-bottom: solid 1px rgba(98, 108, 146, 0.1); border-left: solid 1px rgba(98, 108, 146, 0.1); } .box-wrapper > .box table td { transition: all .5s ease; padding: 2px; text-align: left; vertical-align: top; font-weight: 300; font-size: 12px; color: black; border-bottom: solid 1px rgba(98, 108, 146, 0.1); border-left: solid 1px rgba(98, 108, 146, 0.1); } .circle-pagination { position: absolute; z-index: 1000; list-style-type: none; margin: 0; top: -.3rem; } .circle-pagination li { border-radius: 50%; border: 2px solid #626C92; width: 12px; height: 12px; padding: 4px; margin: 6px; cursor: pointer; float: left; transition: all .2s ease; } .circle-pagination li.active, .circle-pagination li:hover { background: #626C92; width: 14px; height: 14px; } .circle-pagination li.active div, .circle-pagination li div:hover { color: white; } .circle-pagination li div { font-size: .6rem; width: 24px; position: relative; left: -6px; top: 1px; color: #626C92; font-weight: 600; text-transform: capitalize; } +.mailto { + box-sizing: border-box; + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 100%; + padding: 10px; + color: #333; + background: #f2f2f2; + height: 100% p; + height-font-size: 16px; + height-line-height: 1.6em; } + .mailto .button { + border: 1px solid #6576a8; + background: #6d85ad; + border: 0; + outline: 0; + font-weight: bold; + text-transform: uppercase; + text-decoration: none; + letter-spacing: 1px; + color: #fff; + cursor: pointer; } + .mailto .button:hover { + background: #9cb8d9; } + .mailto .button:active { + background: #6576a8; } + .mailto .button--large { + position: relative; + padding: 15px 30px; + border-radius: 5px; + font-size: 16px; } + .mailto .button--large:active { + top: 1px; } + .mailto .content { + max-width: 350px; + text-align: center; } + .mailto .email { + position: relative; } + @import url(http://fonts.googleapis.com/css?family=Roboto:400,300&subset=latin,latin-ext); ul.context-menu { transition: opacity 0.2s linear; list-style: none; margin: 0; padding: 0; font: 200 11px "Roboto", sans-serif; position: absolute; color: #626C92; box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.2); border-radius: 5px; border: 1px solid rgba(98, 108, 146, 0.25); } ul.context-menu * { transition: color 0.2s, background 0.2s; } ul.context-menu.hide { visibility: hidden; opacity: 0; } ul.context-menu.show { visibility: visible; opacity: 1; } ul.context-menu li { min-width: 100px; overflow: hidden; white-space: nowrap; padding: 6px 8px; background-color: #fff; border-bottom: 1px solid #ecf0f1; } ul.context-menu li a { color: #626C92; text-decoration: none; } ul.context-menu li:hover { background-color: #ecf0f1; color: #2980b9; } ul.context-menu li:hover a { color: #2980b9; } ul.context-menu li:first-child { border-radius: 5px 5px 0 0; } ul.context-menu li:last-child { border-bottom: 0; border-radius: 0 0 5px 5px; } @import url(http://fonts.googleapis.com/css?family=Roboto:400,300&subset=latin,latin-ext); .loader { background: #fff; margin: 50px 300px; /*todo cleanup with mixin*/ } .loader h1 { color: #626C92; font: 300 11px "Roboto", sans-serif; } .loader div.slider { position: absolute; width: 200px; height: 2px; margin-top: -30px; } .loader div.slider div.line { position: absolute; background: rgba(0, 0, 0, 0.2); width: 200px; height: 2px; } .loader div.slider div.break { position: absolute; width: 50%; height: 2px; } .loader div.slider div.break.dot1 { animation: loading 2s infinite; background: #D9ECF0; } .loader div.slider div.break.dot2 { animation: loading 2s 0.5s infinite; background: #6677AA; } .loader div.slider div.break.dot3 { animation: loading 2s 1s infinite; background: #D9ECF0; } @-webkit-keyframes "loading" { from { left: 0; opacity: 1; } to { left: 200px; opacity: 1; } } @-moz-keyframes "loading" { from { left: 0; opacity: 0; } to { left: 200px; opacity: 1; } } @-o-keyframes "loading" { from { left: 0; opacity: 0; } to { left: 200px; opacity: 1; } } @keyframes "loading" { from { left: 0; opacity: 0; } to { left: 200px; opacity: 1; } } diff --git a/shrine-webclient/src/main/js/client/js-shrine/export/dist/app-build.js b/shrine-webclient/src/main/js/client/js-shrine/export/dist/app-build.js index 2e1031277..4bb2ac1cf 100644 --- a/shrine-webclient/src/main/js/client/js-shrine/export/dist/app-build.js +++ b/shrine-webclient/src/main/js/client/js-shrine/export/dist/app-build.js @@ -1 +1 @@ -"bundle";System.register("main.js",[],function(a,b){"use strict";function c(a){a.use.standardConfiguration().developmentLogging(),a.start().then(function(){return a.setRoot("shell")})}return a("configure",c),{setters:[],execute:function(){}}}),function(){var a=System.amdDefine;a("shell.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return""})}(),System.register("shell.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d;return{setters:[],execute:function(){a("Shell",d=function(){function a(){c(this,a)}return a.prototype.configureRouter=function(a,b){a.title="SHRINE Webclient Plugin",a.map([{route:"mailto",moduleId:"views/mailto/mailto"},{route:["","query-viewer"],moduleId:"views/query-viewer/query-viewer"}]),this.router=b},a}()),a("Shell",d)}}}),function(){var a=System.amdDefine;a("views/mailto/mailto.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return''})}(),System.register("views/mailto/mailto.service.js",["aurelia-framework","repository/qep.repository"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f,g,h;return{setters:[function(a){d=a.inject},function(a){e=a.QEPRepository}],execute:function(){a("MailToService",(f=d(e),h=f(g=function(){function a(b){c(this,a),this.repository=b}return a.prototype.fetchStewardEmail=function(){return this.repository.fetchStewardEmail()},a}())||g)),a("MailToService",h)}}}),System.register("views/mailto/mailto.config.js",[],function(a,b){"use strict";var c;return{setters:[],execute:function(){a("MailConfig",c={mailto:"mailto:",subject:"subject="+encodeURIComponent("Question from a SHRINE User"),body:encodeURIComponent("Please enter the suggested information and your question. Your data steward will reply to this email.\n\n***Never send patient information, passwords, or other sensitive information by email****\nName:\nTitle:\nUser name (to log into SHRINE):\nTelephone Number (optional):\nPreferred email address (optional):\n\nQuestion or Comment:")}),a("MailConfig",c)}}}),System.register("views/mailto/mailto.js",["aurelia-framework","views/mailto/mailto.service","views/mailto/mailto.config"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f,g,h,i;return{setters:[function(a){d=a.inject},function(a){e=a.MailToService},function(a){f=a.MailConfig}],execute:function(){a("MailTo",(g=d(e,f),i=g(h=function(){function a(b,d){c(this,a),this.service=b,this.config=d}return a.prototype.openEmail=function(){var a=this;this.service.fetchStewardEmail().then(function(b){return window.top.location=a.getComposition(b),a})},a.prototype.getComposition=function(a){return this.config.mailto+a+"?"+this.config.subject+"&"+this.config.body},a}())||h)),a("MailTo",i)}}}),System.register("views/query-viewer/box-style.converter.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d;return{setters:[],execute:function(){a("BoxStyleValueConverter",d=function(){function a(){c(this,a)}return a.prototype.toView=function(a){return"transform: translate("+String(-100*a)+"%);"},a}()),a("BoxStyleValueConverter",d)}}}),function(){var a=System.amdDefine;a("views/query-viewer/context-menu/context-menu.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return''})}(),System.register("views/query-viewer/context-menu/context-menu.js",["aurelia-framework","common/i2b2.service.js"],function(a,b){"use strict";function c(a,b,c,d){c&&Object.defineProperty(a,b,{enumerable:c.enumerable,configurable:c.configurable,writable:c.writable,value:c.initializer?c.initializer.call(d):void 0})}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b,c,d,e){var f={};return Object.keys(d).forEach(function(a){f[a]=d[a]}),f.enumerable=!!f.enumerable,f.configurable=!!f.configurable,("value"in f||f.initializer)&&(f.writable=!0),f=c.slice().reverse().reduce(function(c,d){return d(a,b,c)||c},f),e&&void 0!==f.initializer&&(f.value=f.initializer?f.initializer.call(e):void 0,f.initializer=void 0),void 0===f.initializer&&(Object.defineProperty(a,b,f),f=null),f}var f,g,h,i,j,k,l,m;return{setters:[function(a){f=a.inject,g=a.bindable},function(a){h=a.I2B2Service}],execute:function(){a("ContextMenu",(i=f(h),m=i((k=function b(a){var e=this;d(this,b),c(this,"context",l,this),this.loadQuery=function(b){a.loadQuery(b),e.context["class"]="hide"},this.loadHistory=function(){a.loadHistory(),e.context["class"]="hide"}},l=e(k.prototype,"context",[g],{enumerable:!0,initializer:null}),j=k))||j)),a("ContextMenu",m)}}}),function(){var a=System.amdDefine;a("views/query-viewer/loading-bar/loading-bar.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return''})}(),System.register("views/query-viewer/loading-bar/loading-bar.js",["aurelia-framework"],function(a,b){"use strict";function c(a,b,c,d){c&&Object.defineProperty(a,b,{enumerable:c.enumerable,configurable:c.configurable,writable:c.writable,value:c.initializer?c.initializer.call(d):void 0})}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b,c,d,e){var f={};return Object.keys(d).forEach(function(a){f[a]=d[a]}),f.enumerable=!!f.enumerable,f.configurable=!!f.configurable,("value"in f||f.initializer)&&(f.writable=!0),f=c.slice().reverse().reduce(function(c,d){return d(a,b,c)||c},f),e&&void 0!==f.initializer&&(f.value=f.initializer?f.initializer.call(e):void 0,f.initializer=void 0),void 0===f.initializer&&(Object.defineProperty(a,b,f),f=null),f}var f,g,h,i;return{setters:[function(a){f=a.bindable}],execute:function(){a("LoadingBar",(g=function b(){d(this,b),c(this,"status",h,this)},h=e(g.prototype,"status",[f],{enumerable:!0,initializer:null}),i=g)),a("LoadingBar",i)}}}),function(){var a=System.amdDefine;a("views/query-viewer/query-viewer.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return''})}(),System.register("repository/qep.repository.js",["aurelia-framework","aurelia-fetch-client","fetch"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f,g,h,i;return{setters:[function(a){d=a.inject},function(a){e=a.HttpClient},function(a){}],execute:function(){f=function(){function a(a,b){for(var c=0;c1&&void 0!==arguments[1]?arguments[1]:0;return this.http.fetch("qep/queryResults?limit="+a+"&skip="+b).then(function(a){return a.json()})["catch"](function(a){return a})},a.prototype.fetchStewardEmail=function(){return this.http.fetch("data?key=stewardEmail").then(function(a){return a.json()}).then(function(a){return a.indexOf('"')>0?a.split('"')[1]:a})["catch"](function(){return""})},f(a,[{key:"url",get:function(){var a=document.URL,b=":6443/shrine-metadata/";return a.substring(0,a.lastIndexOf(":"))+b}},{key:"auth",get:function(){var a=sessionStorage.getItem("shrine.auth");return sessionStorage.removeItem("shrine.auth"),a}}]),a}())||h)),a("QEPRepository",i)}}}),System.register("views/query-viewer/query-viewer.service.js",["aurelia-framework","repository/qep.repository","./query-viewer.config"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f,g,h,i;return{setters:[function(a){d=a.inject},function(a){e=a.QEPRepository},function(a){f=a.QueryViewerConfig}],execute:function(){a("QueryViewerService",(g=d(e,f),i=g(h=function(){function a(b,d,e){c(this,a),this.repository=b,this.config=d}return a.prototype.fetchPreviousQueries=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.maxQueriesPerScroll;return this.repository.fetchPreviousQueries(a)},a.prototype.getScreens=function(a,b){var c=this;return new Promise(function(d,e){for(var f=a.sort().length,g=[],h=0;h0&&void 0!==arguments[0]?arguments[0]:window;c(this,b);var f=e.of(a),g=d.curry(function(a,b){return b.value?e.of(d.prop(a,b.value)):e.of(null)}),h=d.compose(g("i2b2"),g("window"),g("parent")),i=d.compose(g("CRC"),h),j=d.compose(g("events"),h);this.onResize=function(a){return j(f).map(function(b){return b.changedZoomWindows.subscribe(a)})},this.onHistory=function(a){return i(f).map(function(b){return b.ctrlr.history.events.onDataUpdate.subscribe(a)})},this.onQuery=function(a){return j(f).map(function(b){return b.afterQueryInit.subscribe(a)})},this.loadHistory=function(){return i(f).map(function(a){return a.view.history.doRefreshAll()})},this.loadQuery=function(a){return i(f).map(function(b){return b.ctrlr.QT.doQueryLoad(a)})}}),a("I2B2Service",f)}}}),System.register("views/query-viewer/query-viewer.model.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e;return{setters:[],execute:function(){d=function(){function a(a,b){for(var c=0;c0}}]),a}()),a("QueryViewerModel",e)}}}),System.register("common/container.js",["ramda"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f;return{setters:[function(a){d=a}],execute:function(){e=function(){function a(a,b){for(var c=0;c1,e.screens=a,e.processing=!1},k=function(){return f.service.fetchPreviousQueries(e.loadedCount+j.maxQueriesPerScroll).then(g).then(h)["catch"](function(a){return console.log(a)})},l=function(a,b){return f.runningQuery=b[0].name},m=function(){return e.hasData?h(e.screens):k()},n=function(a){return 1===i.scrollRatio(a).value&&e.moreToLoad&&!e.processing};this.onScroll=function(a){n(a)&&(k(),e.processing=!0)};var o=function(a){return"ADD"!==a.action},p=function(a,b){return f.vertStyle=b.find(o)?"v-min":"v-full"};d.onResize(p),d.onHistory(k),d.onQuery(l),m()}return a.prototype.getContext=function(a,b){return{x:a.pageX,y:a.pageY,id:b.id,"class":"show"}},a}())||l)),a("QueryViewer",m)}}}),System.register("views/query-viewer/result-style.converter.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d;return{setters:[],execute:function(){a("ResultStyleValueConverter",d=function(){function a(){c(this,a)}return a.prototype.toView=function(a){var b=this.isUnresolved(a)?"color:"+this.getColorValue(a):"";return b},a.prototype.isUnresolved=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"FINISHED";return!a||a.status!==b},a.prototype.getColorValue=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ERROR",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#FF0000",d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#00FF00";return a&&a.status!==b?d:c},a}()),a("ResultStyleValueConverter",d)}}}),System.register("views/query-viewer/result-value.converter.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d;return{setters:[],execute:function(){a("ResultValueConverter",d=function(){function a(){c(this,a)}return a.prototype.toView=function(a){return a?"FINISHED"!==a.status?a.status:a.count<0?"<=10":a.count:"not available"},a}()),a("ResultValueConverter",d)}}}); \ No newline at end of file +"bundle";System.register("main.js",[],function(a,b){"use strict";function c(a){a.use.standardConfiguration().developmentLogging(),a.start().then(function(){return a.setRoot("shell")})}return a("configure",c),{setters:[],execute:function(){}}}),function(){var a=System.amdDefine;a("shell.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return""})}(),System.register("shell.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d;return{setters:[],execute:function(){a("Shell",d=function(){function a(){c(this,a)}return a.prototype.configureRouter=function(a,b){a.title="SHRINE Webclient Plugin",a.map([{route:"mailto",moduleId:"views/mailto/mailto"},{route:["","query-viewer"],moduleId:"views/query-viewer/query-viewer"}]),this.router=b},a}()),a("Shell",d)}}}),function(){var a=System.amdDefine;a("views/mailto/mailto.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return''})}(),System.register("views/mailto/mailto.service.js",["aurelia-framework","repository/qep.repository"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f,g,h;return{setters:[function(a){d=a.inject},function(a){e=a.QEPRepository}],execute:function(){a("MailToService",(f=d(e),h=f(g=function(){function a(b){c(this,a),this.repository=b}return a.prototype.fetchStewardEmail=function(){return this.repository.fetchStewardEmail()},a}())||g)),a("MailToService",h)}}}),System.register("views/mailto/mailto.config.js",[],function(a,b){"use strict";var c;return{setters:[],execute:function(){a("MailConfig",c={mailto:"mailto:",subject:"subject="+encodeURIComponent("Question from a SHRINE User"),body:encodeURIComponent("Please enter the suggested information and your question. Your data steward will reply to this email.\n\n***Never send patient information, passwords, or other sensitive information by email****\nName:\nTitle:\nUser name (to log into SHRINE):\nTelephone Number (optional):\nPreferred email address (optional):\n\nQuestion or Comment:")}),a("MailConfig",c)}}}),System.register("views/mailto/mailto.js",["aurelia-framework","views/mailto/mailto.service","views/mailto/mailto.config"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f,g,h,i;return{setters:[function(a){d=a.inject},function(a){e=a.MailToService},function(a){f=a.MailConfig}],execute:function(){a("MailTo",(g=d(e,f),i=g(h=function(){function a(b,d){c(this,a),this.service=b,this.config=d}return a.prototype.openEmail=function(){var a=this;this.service.fetchStewardEmail().then(function(b){return window.top.location=a.getComposition(b),a})},a.prototype.getComposition=function(a){return this.config.mailto+a+"?"+this.config.subject+"&"+this.config.body},a}())||h)),a("MailTo",i)}}}),System.register("views/query-viewer/box-style.converter.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d;return{setters:[],execute:function(){a("BoxStyleValueConverter",d=function(){function a(){c(this,a)}return a.prototype.toView=function(a){return"transform: translate("+String(-100*a)+"%);"},a}()),a("BoxStyleValueConverter",d)}}}),function(){var a=System.amdDefine;a("views/query-viewer/context-menu/context-menu.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return''})}(),System.register("views/query-viewer/context-menu/context-menu.js",["aurelia-framework","common/i2b2.service.js"],function(a,b){"use strict";function c(a,b,c,d){c&&Object.defineProperty(a,b,{enumerable:c.enumerable,configurable:c.configurable,writable:c.writable,value:c.initializer?c.initializer.call(d):void 0})}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b,c,d,e){var f={};return Object.keys(d).forEach(function(a){f[a]=d[a]}),f.enumerable=!!f.enumerable,f.configurable=!!f.configurable,("value"in f||f.initializer)&&(f.writable=!0),f=c.slice().reverse().reduce(function(c,d){return d(a,b,c)||c},f),e&&void 0!==f.initializer&&(f.value=f.initializer?f.initializer.call(e):void 0,f.initializer=void 0),void 0===f.initializer&&(Object.defineProperty(a,b,f),f=null),f}var f,g,h,i,j,k,l,m;return{setters:[function(a){f=a.inject,g=a.bindable},function(a){h=a.I2B2Service}],execute:function(){a("ContextMenu",(i=f(h),m=i((k=function b(a){var e=this;d(this,b),c(this,"context",l,this),this.loadQuery=function(b){a.loadQuery(b),e.context["class"]="hide"},this.loadHistory=function(){a.loadHistory(),e.context["class"]="hide"}},l=e(k.prototype,"context",[g],{enumerable:!0,initializer:null}),j=k))||j)),a("ContextMenu",m)}}}),function(){var a=System.amdDefine;a("views/query-viewer/loading-bar/loading-bar.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return''})}(),System.register("views/query-viewer/loading-bar/loading-bar.js",["aurelia-framework"],function(a,b){"use strict";function c(a,b,c,d){c&&Object.defineProperty(a,b,{enumerable:c.enumerable,configurable:c.configurable,writable:c.writable,value:c.initializer?c.initializer.call(d):void 0})}function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b,c,d,e){var f={};return Object.keys(d).forEach(function(a){f[a]=d[a]}),f.enumerable=!!f.enumerable,f.configurable=!!f.configurable,("value"in f||f.initializer)&&(f.writable=!0),f=c.slice().reverse().reduce(function(c,d){return d(a,b,c)||c},f),e&&void 0!==f.initializer&&(f.value=f.initializer?f.initializer.call(e):void 0,f.initializer=void 0),void 0===f.initializer&&(Object.defineProperty(a,b,f),f=null),f}var f,g,h,i;return{setters:[function(a){f=a.bindable}],execute:function(){a("LoadingBar",(g=function b(){d(this,b),c(this,"status",h,this)},h=e(g.prototype,"status",[f],{enumerable:!0,initializer:null}),i=g)),a("LoadingBar",i)}}}),function(){var a=System.amdDefine;a("views/query-viewer/query-viewer.html!github:systemjs/plugin-text@0.0.8.js",[],function(){return''})}(),System.register("repository/qep.repository.js",["aurelia-framework","aurelia-fetch-client","fetch"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f,g,h,i;return{setters:[function(a){d=a.inject},function(a){e=a.HttpClient},function(a){}],execute:function(){f=function(){function a(a,b){for(var c=0;c1&&void 0!==arguments[1]?arguments[1]:0;return this.http.fetch("qep/queryResults?limit="+a+"&skip="+b).then(function(a){return a.json()})["catch"](function(a){return a})},a.prototype.fetchStewardEmail=function(){return this.http.fetch("data?key=stewardEmail").then(function(a){return a.json()}).then(function(a){return a.indexOf('"')>0?a.split('"')[1]:a})["catch"](function(){return""})},f(a,[{key:"url",get:function(){var a=document.URL,b=":6443/shrine-metadata/";return a.substring(0,a.lastIndexOf(":"))+b}},{key:"auth",get:function(){var a=sessionStorage.getItem("shrine.auth");return sessionStorage.removeItem("shrine.auth"),a}}]),a}())||h)),a("QEPRepository",i)}}}),System.register("views/query-viewer/query-viewer.service.js",["aurelia-framework","repository/qep.repository","./query-viewer.config"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f,g,h,i;return{setters:[function(a){d=a.inject},function(a){e=a.QEPRepository},function(a){f=a.QueryViewerConfig}],execute:function(){a("QueryViewerService",(g=d(e,f),i=g(h=function(){function a(b,d,e){c(this,a),this.repository=b,this.config=d}return a.prototype.fetchPreviousQueries=function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.maxQueriesPerScroll;return this.repository.fetchPreviousQueries(a)},a.prototype.getScreens=function(a,b){var c=this;return new Promise(function(d,e){for(var f=a.sort().length,g=[],h=0;h0&&void 0!==arguments[0]?arguments[0]:window;c(this,b);var f=e.of(a),g=d.curry(function(a,b){return b.value?e.of(d.prop(a,b.value)):e.of(null)}),h=d.compose(g("i2b2"),g("window"),g("parent")),i=d.compose(g("CRC"),h),j=d.compose(g("events"),h);this.onResize=function(a){return j(f).map(function(b){return b.changedZoomWindows.subscribe(a)})},this.onHistory=function(a){return i(f).map(function(b){return b.ctrlr.history.events.onDataUpdate.subscribe(a)})},this.onQuery=function(a){return j(f).map(function(b){return b.afterQueryInit.subscribe(a)})},this.loadHistory=function(){return i(f).map(function(a){return a.view.history.doRefreshAll()})},this.loadQuery=function(a){return i(f).map(function(b){return b.ctrlr.QT.doQueryLoad(a)})}}),a("I2B2Service",f)}}}),System.register("views/query-viewer/query-viewer.model.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e;return{setters:[],execute:function(){d=function(){function a(a,b){for(var c=0;c0}}]),a}()),a("QueryViewerModel",e)}}}),System.register("common/container.js",["ramda"],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d,e,f;return{setters:[function(a){d=a}],execute:function(){e=function(){function a(a,b){for(var c=0;c1,e.screens=a,e.processing=!1},k=function(){return f.service.fetchPreviousQueries(e.loadedCount+j.maxQueriesPerScroll).then(g).then(h)["catch"](function(a){return console.log(a)})},l=function(a,b){return f.runningQuery=b[0].name},m=function(){return e.hasData?h(e.screens):k()},n=function(a){return 1===i.scrollRatio(a).value&&e.moreToLoad&&!e.processing};this.onScroll=function(a){n(a)&&(k(),e.processing=!0)};var o=function(a){return"ADD"!==a.action},p=function(a,b){return f.vertStyle=b.find(o)?"v-min":"v-full"};d.onResize(p),d.onHistory(k),d.onQuery(l),m()}return a.prototype.getContext=function(a,b){return{x:a.pageX,y:a.pageY,id:b.id,"class":"show"}},a}())||l)),a("QueryViewer",m)}}}),System.register("views/query-viewer/result-style.converter.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d;return{setters:[],execute:function(){a("ResultStyleValueConverter",d=function(){function a(){c(this,a)}return a.prototype.toView=function(a){var b=this.isUnresolved(a)?"color:"+this.getColorValue(a):"";return b},a.prototype.isUnresolved=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"FINISHED";return!a||a.status!==b},a.prototype.getColorValue=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ERROR",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#FF0000",d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#00FF00";return a&&a.status!==b?d:c},a}()),a("ResultStyleValueConverter",d)}}}),System.register("views/query-viewer/result-value.converter.js",[],function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d;return{setters:[],execute:function(){a("ResultValueConverter",d=function(){function a(){c(this,a)}return a.prototype.toView=function(a){return a?"FINISHED"!==a.status?a.status:a.count<0?"<=10":a.count:"not available"},a}()),a("ResultValueConverter",d)}}}); \ No newline at end of file diff --git a/shrine-webclient/src/main/js/client/js-shrine/src/views/query-viewer/query-viewer.js b/shrine-webclient/src/main/js/client/js-shrine/src/views/query-viewer/query-viewer.js index b39182642..7018c05f0 100644 --- a/shrine-webclient/src/main/js/client/js-shrine/src/views/query-viewer/query-viewer.js +++ b/shrine-webclient/src/main/js/client/js-shrine/src/views/query-viewer/query-viewer.js @@ -1,75 +1,75 @@ import { inject, computedFrom } from 'aurelia-framework'; import { QueryViewerService } from 'views/query-viewer/query-viewer.service'; import { I2B2Service } from 'common/i2b2.service.js'; import { QueryViewerModel } from './query-viewer.model'; import {ScrollService} from './scroll.service'; import {QueryViewerConfig} from './query-viewer.config'; @inject(QueryViewerService, I2B2Service, QueryViewerModel) export class QueryViewer { constructor(service, i2b2Svc, model) { // -- init -- // this.screenIndex = 0; this.showCircles = false; this.showLoader = true; this.runningQuery = null; this.service = service; this.vertStyle = 'v-min'; this.scrollRatio = 0; // -- fetch queries -- // const parseResultToScreens = result => { model.totalQueries = result.rowCount; - model.loadedCount = model.loadedCount + result.queryResults.length; + model.loadedCount = result.queryResults.length; return this.service.getScreens(result.adapters, result.queryResults); } const setVM = screens => { this.showLoader = false; this.runningQuery = null; this.screens = screens; this.showCircles = this.screens.length > 1; model.screens = screens; model.processing = false; }; const refresh = () => this.service .fetchPreviousQueries(model.loadedCount + QueryViewerConfig.maxQueriesPerScroll) .then(parseResultToScreens) .then(setVM) .catch(error => console.log(error)); const addQuery = (event, data) => this.runningQuery = data[0].name; const init = () => (model.hasData) ? setVM(model.screens) : refresh(); const loadMoreQueries = e => ScrollService.scrollRatio(e).value === 1 && model.moreToLoad && !model.processing; // -- scroll event -- // this.onScroll = e => { if(loadMoreQueries(e)){ refresh(); model.processing = true; } } // -- add i2b2 event listener -- // const isMinimized = e => e.action !== 'ADD'; const setVertStyle = (a, b) => this.vertStyle = b.find(isMinimized) ? 'v-min' : 'v-full'; i2b2Svc.onResize(setVertStyle); i2b2Svc.onHistory(refresh); i2b2Svc.onQuery(addQuery); init(); } getContext(event, result) { return { x: event.pageX, y: event.pageY, id: result.id, class: 'show' }; } }