diff --git a/.bowerrc b/.bowerrc
deleted file mode 100644
index 17cc086e..00000000
--- a/.bowerrc
+++ /dev/null
@@ -1 +0,0 @@
-{"directory":"components"}
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index fa7394a1..0f94983d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -40,7 +40,6 @@ a node environment manager such as [nvm](https://github.com/nvm-sh/nvm)).
We assume you have the following global packages:
- browserify
-- bower
- grunt
- coffeescript
- brfs
@@ -48,7 +47,7 @@ We assume you have the following global packages:
to install, run:
```sh
-npm install -g browserify bower grunt coffeescript brfs
+npm install -g browserify grunt coffeescript brfs
```
#### Build library and install dependencies
@@ -60,16 +59,32 @@ npm install
```
Start a development server, which builds (and rebuilds the test indices) and
-serves them to the world (and runs the tests):
+serves them to the world:
```sh
npm start
```
+To view the running instance, navigate to `localhost:9000`.
+Note that this build execute all tests if changes are made to any file while the script is running.
+
+To get a similar instance running in the `watch` mode _without_ any tests, run the script:
+```bash
+npm run dev
+```
+Both these builds use Flymine as the service root and hence do not require setting up a local testmine.
+
+### Testing
To use the test indices you will need a data server running the intermine-demo
application at port 8080 on your machine - you can get this by running the
`testmodel/setup.sh` script in the `intermine/intermine` repo.
+Apart from this, the current configuration includes a `watchTests` task defined in the [Gruntfile](https://github.com/intermine/im-tables/blob/dev/Gruntfile.js). This can be used to run tests on the project in `watch` mode. Type in the following command into your terminal:
+```bash
+grunt watchTests
+```
+The task uses `mocha` (the default testing framework for this project) and will log the test results after any changes are made.
+
### Coding Style
Code contributed to this library is expected to be coffee-script files, following
diff --git a/Gruntfile.js b/Gruntfile.js
index d877fcfe..59d16b3f 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -9,6 +9,7 @@ grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-notify');
grunt.loadNpmTasks('grunt-run');
grunt.loadNpmTasks('grunt-sandbox-css');
+grunt.loadNpmTasks('grunt-concurrent');
var env = process.env;
@@ -17,16 +18,22 @@ var serverPort = (grunt.option('port') || env.PORT || env.npm_package_config_por
var NO_SPAWN = {spawn: false};
grunt.initConfig({
- watch: { // Hwat! This task lays out the dependency graph.
+ watch: {
coffee: {
files: ['src/**', 'templates/**', 'package.json'],
tasks: [
'compile',
- 'run:test',
'build'
],
options: NO_SPAWN
},
+ coffee_test: {
+ files: ['src/**', 'templates/**', 'package.json'],
+ tasks: [
+ 'run:test',
+ ],
+ options: NO_SPAWN
+ },
umd_consumers: {
files: ['test/scripts/**'],
tasks: [
@@ -108,10 +115,6 @@ grunt.initConfig({
test: {
exec: "mocha --require coffeescript/register test/unit/*"
},
- bower_install: {
- cmd: 'bower',
- args: ['install']
- },
bundle_test_indices: {
cmd: './bin/bundle-test-indices'
},
@@ -175,6 +178,13 @@ grunt.initConfig({
prefix: '.imtables'
}
}
+ },
+ concurrent: {
+ start: ['watchTests', 'serve'],
+ options: {
+ logConcurrentOutput: true,
+ indent: false
+ }
}
});
@@ -195,9 +205,15 @@ grunt.registerTask('style', [
'sandbox_css'
]);
+grunt.registerTask('watchTests', [
+ 'watch:coffee_test',
+ 'watch:test',
+ 'watch:test_styles',
+ 'watch:indices'
+]);
+
grunt.registerTask('build', [
'build:dist',
- 'build:test',
'notify:build'
]);
@@ -210,7 +226,6 @@ grunt.registerTask('build:dist', [
]);
grunt.registerTask('build:test', [
- 'run:bower_install',
'run:build_custom_style',
'run:compile_umd_consumers',
'run:bundle_test_indices',
@@ -219,7 +234,12 @@ grunt.registerTask('build:test', [
grunt.registerTask('serve', [
'build',
'run:server',
- 'watch'
+ 'watch:coffee',
+ 'watch:umd_consumers',
+ 'watch:less',
+ 'notify:build'
]);
+grunt.registerTask('start', ['concurrent:start']);
+
grunt.registerTask('default', ['build']);
diff --git a/bower.json b/bower.json
deleted file mode 100644
index 88d22a66..00000000
--- a/bower.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "name": "im-tables",
- "version": "2.1.0",
- "description": "ui widgets for displaying query results in interactive tables",
- "main": [
- "dist/imtables.min.js",
- "dist/main.css"
- ],
- "dependencies": {
- },
- "devDependencies": {
- "mocha": ">=1.8.1",
- "chai": ">=1.5.0"
- },
- "ignore": [
- "test/",
- "templates/",
- "build/",
- "src/",
- "js/",
- "less/",
- "components",
- "examples",
- "Makefile",
- "bin/",
- "coverage.html",
- "doc/",
- "node_modules/",
- "package.json",
- "tasks/",
- "grunt.js",
- "BUILD_ORDER",
- "EVENTS.md",
- "DESIGN.md",
- "DEVELOPING.md",
- "CHANGES",
- "TODO"
- ]
-}
diff --git a/dist/imtables.js b/dist/imtables.js
index fe7384c9..10269b55 100644
--- a/dist/imtables.js
+++ b/dist/imtables.js
@@ -5456,7 +5456,7 @@ function getTemplate (name) {
}
// Simple templates we can define inline.
TEMPLATES.clear = '
\n";
diff --git a/dist/imtables.min.js b/dist/imtables.min.js
index e61090b3..83ecc033 100644
--- a/dist/imtables.min.js
+++ b/dist/imtables.min.js
@@ -1 +1 @@
-!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).imtables=t()}}(function(){return function o(s,a,l){function u(e,t){if(!a[e]){if(!s[e]){var n="function"==typeof require&&require;if(!t&&n)return n(e,!0);if(c)return c(e,!0);var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}var r=a[e]={exports:{}};s[e][0].call(r.exports,function(t){return u(s[e][1][t]||t)},r,r.exports,o,s,a,l)}return a[e].exports}for(var c="function"==typeof require&&require,t=0;t').appendTo("head").attr({href:i+t}),n):r.ajax({url:i+t,cache:!0,dataType:"script"}).then(function(){return n})}},n.load=function(t){var i,r,o,e,n;return e=s.get("CDN.server"),r=s.get(["CDN","resources",t]),n=s.get(["CDN","tests",t]),o=u(e),r?l.isArray(r)?a.all(function(){var t,e,n;for(n=[],t=0,e=r.length;t"},s.prototype.iconWithProps=function(t,e){return this.icon(t,null,e)},s.prototype.getSize=function(t){var e;return null!=(e=this.get("size"+t.toUpperCase()))?e:""},s.prototype.iconClasses=function(t){return this.get("Base")+" "+this.get(t)},s.prototype._loadIconSet=function(){var t;if((t=i[this.options.get("icons")])&&(this.clear({silent:!0}),null!=t))return this.set(t)},s.prototype.initialize=function(t){return this.options=null!=t?t:n,this._loadIconSet(),this.listenTo(this.options,"change:icons",this._loadIconSet)},t=s,i.glyphicons={Base:"glyphicon",unsorted:"glyphicon-resize-vertical",ASC:"glyphicon-arrow-up",DESC:"glyphicon-arrow-down",headerIcon:"icon",headerIconRemove:"glyphicon-remove",headerIconHide:"glyphicon-minus",headerIconReveal:"glyphicon-fullscreen",SortStringASC:"glyphicon-sort-by-alphabet",SortStringDESC:"glyphicon-sort-by-alphabet-alt",SortNumericASC:"glyphicon-sort-by-order",SortNumericDESC:"glyphicon-sort-by-order-alt",RootClass:"glyphicon-stop",Yes:"glyphicon-star",No:"glyphicon-star-empty",Table:"glyphicon-list",Script:"glyphicon-console",Export:"glyphicon-cloud-download",Error:"glyphicon-warning-sign",Info:"glyphicon-info-sign",Warning:"glyphicon-warning-sign",Remove:"glyphicon-minus-sign",OK:"glyphicon-ok",Cancel:"glyphicon-remove",Check:"glyphicon-check",UnCheck:"glyphicon-unchecked",CheckUnCheck:"glyphicon-ok-none",Add:"glyphicon-plus-sign",Move:"glyphicon-move",More:"glyphicon-plus-sign",Filter:"glyphicon-filter",Summary:"glyphicon-stats",Undo:"glyphicon-refresh",Refresh:"glyphicon-refresh",Columns:"glyphicon-pause",Collapsed:"glyphicon-chevron-right",Expanded:"glyphicon-chevron-down",CollapsedSection:"glyphicon-triangle-right",ExpandedSection:"glyphicon-triangle-bottom",MoveDown:"glyphicon-chevron-down",GoBack:"glyphicon-chevron-left",GoForward:"glyphicon-chevron-right",MoveUp:"glyphicon-chevron-up",Toggle:"glyphicon-random",ExpandCollapse:"glyphicon-chevron-right icon-chevron-down",Help:"glyphicon-question-sign",ReverseRef:"glyphicon-retweet",Reorder:"glyphicon-menu-hamburger",Edit:"glyphicon-edit",ExtraValue:"glyphicon-map-marker",Tree:"glyphicon-plus",Download:"glyphicon-save-file",download:"glyphicon-cloud-download",Options:"glyphicon-tasks",ClipBoard:"glyphicon-paperclip",Composed:"glyphicon-tags",RemoveConstraint:"glyphicon-remove-sign",Dismiss:"glyphicon-remove-sign",ClosedReference:"glyphicon-expand",OpenReference:"glyphicon-collapse-down",Lock:"glyphicon-lock",Lists:"glyphicon-list-alt",Attribute:"glyphicon-unchecked",ExternalLink:"glyphicon-globe",tsv:"glyphicon-list",csv:"glyphicon-list",xml:"glyphicon-xml",json:"glyphicon-json",fake:"glyphicon-bug",Bug:"glyphicon-bug",Rubbish:"glyphicon-trash",RubbishFull:"glyphicon-trash",Joins:"glyphicon-link",Mail:"glyphicon-envelope"},i.fontawesome={Base:"fa",unsorted:"fa-unsorted",ASC:"fa-sort-up",DESC:"fa-sort-down",SortStringASC:"fa-sort-alpha-asc",SortStringDESC:"fa-sort-alpha-desc",SortNumericASC:"fa-sort-numeric-asc",SortNumericDESC:"fa-sort-numeric-desc",headerIcon:"fa",headerIconRemove:"fa-times",headerIconHide:"fa-ellipsis-h",headerIconReveal:"fa-arrows-h",sizeLG:"fa-2x",Yes:"fa-star",No:"fa-star-o",Table:"fa-list",EmptyTable:"fa-table",Script:"fa-file-code-o",Export:"fa-cloud-download",Remove:"fa-minus-circle",OK:"fa-check",Cancel:"fa-remove",Check:"fa-toggle-on",UnCheck:"fa-toggle-off",CheckUnCheck:"fa-toggle-on fa-toggle-off",Add:"fa-plus",Move:"fa-arrows",More:"fa-plus",Dropbox:"fa-dropbox",Drive:"fa-google",download:"fa-cloud-download",Galaxy:"fa-cloud-upload",Filter:"fa-filter",Summary:"fa-bar-chart-o",Undo:"fa-undo",Refresh:"fa-refresh",Columns:"fa-columns",Collapsed:"fa-chevron-right",Expanded:"fa-chevron-down",CollapsedSection:"fa-caret-right",ExpandedSection:"fa-caret-down",MoveDown:"fa-chevron-down",GoBack:"fa-chevron-left",GoForward:"fa-chevron-right",MoveUp:"fa-chevron-up",Toggle:"fa-retweet",ExpandCollapse:"fa-chevron-right fa-chevron-down",Help:"fa-question-circle",Tree:"fa-sitemap",ReverseRef:"fa-retweet",Reorder:"fa-reorder",Options:"fa-tasks",Edit:"fa-edit",ExtraValue:"fa-database",Download:"fa-file-archive-o",ClipBoard:"fa-paperclip",Composed:"fa-tags",RemoveConstraint:"fa-times-circle",Dismiss:"fa-times-circle",Error:"fa-warning",Info:"fa-info-circle",Warning:"fa-warning",Lock:"fa-lock",RootClass:"fa-square",Attribute:"fa-tag",ClosedReference:"fa-plus-square",OpenReference:"fa-plus-square-o",CodeFile:"fa-file-code-o",Rubbish:"fa-trash-o",RubbishFull:"fa-trash",Joins:"fa-share-alt",ExternalLink:"fa-globe",Lists:"fa-cloud-upload",tsv:"fa-file-excel-o",csv:"fa-file-excel-o",xml:"fa-code",json:"fa-json",fake:"fa-bug",Bug:"fa-bug",Mail:"fa-envelope"},u.exports=new t,u.exports.Icons=t,u.exports.registerIconSet=r,u.exports.names=function(){var t,e,n;return t=function(){var t;for(e in t=[],i)n=i[e],t.push(a.keys(n));return t}(),a.union.apply(null,t)}}).call(this)},{"./core-model":2,"./options":63,underscore:257}],15:[function(h,t,g){(function(){var e,t,n,p,a,i,l,f,d,u,c,r,o,s;f=h("underscore"),h("./shim"),u=h("imjs").Service.connect,a=h("es6-promise").Promise,s=h("./version"),l=h("./core/type-assertions"),e=h("./views/dashboard"),i=h("./views/table"),p=h("./options"),n=h("./messages"),t=h("./formatting"),o=h("./utils/simple-formatter"),r=function(o){var s;return s=function(t,e,n){var i,r;return l.Query.test(n)?new a(c(o,t,n,e)):(r=n.service,i=n.query,(l.Service.test(r)?r:u(r)).query(i).then(f.partial(s,t,e)))}},c=function(l,u,c,h){return null==h&&(h={}),function(t){var e,n,i,r,o,s,a;for(n=d(u),o="undefined"!=typeof page&&null!==page?f.pick(h,"start","size"):null,h=f.extend(f.omit(h,"start","size"),{model:o,query:c}),(a=l(h)).setElement(n),i=0,r=(s=f.result(a,"className").split(" ")).length;i Format","export.category.Columns":"<%= columns %> Columns","export.category.Preview":"Preview","export.preview.Limit":"Preview is limited to at most 3 results.","export.heading.Columns":"Columns","export.category.Rows":"<% if (rowCount === max) { %>\n All\n<% } else { %>\n <%= rowCount %> of <%= max %>\n<% } %>\nRows","export.category.Compression":"<% if (compression) { %>\n <%= compression.toUpperCase() %>\n<% } else { %>\n No\n<% } %> Compression","export.category.Options":"Options","export.category.JsonFormat":"As <%= (jsonFormat === 'objects') ? 'Objects' : 'Rows' %>","export.category.FastaFormat":"FASTA options","export.category.ColumnHeaders":"<% if (headers) { %>\n <%= {friendly: 'Formatted', path: 'Raw'}[headerType] %>\n<% } else { %>\n No\n<% } %>\nColumn Headers","export.category.Destination":"<% if (dest === 'download') { %>\n Download <%= format.EXT %> file\n<% } else { %>\n Send <%= format.EXT %> to <%= dest %>\n<% } %>","export.galaxy.name":["<% if (orgs.length === 1) { %><%= orgs[0] %> <% } %>","<%= cls %> data","<% if (branding) { %> from <%= branding.name %><% } %>"].join(""),"export.galaxy.info":"<%= query.root %> data from <%= query.service.root %>.\nUploaded from <%= currentLocation %>.\n<% if (lists.length) { %>source: <%= lists.join(', ') %><% } %>\n<% if (orgs.length) { %>organisms: <%= orgs.join(', ') %><% } %>","export.format.description.TSV":"A flat file format suitable for spreadsheet programmes","export.format.name.TSV":"Tab separated values.","export.format.description.CSV":"A flat file format, suitable for spreadsheet programmes","export.format.name.CSV":"Comma separated values.","export.format.description.XML":"A text format suitable for machine processing.","export.format.name.XML":"XML","export.format.name.JSON":"JSON","export.format.description.JSON":"A text format suitable for machine processing.","export.format.name.FASTA":"FASTA sequence.","export.format.description.FASTA":"FASTA output for sequence data.","export.format.name.GFF3":"GFF3 features.","export.format.description.GFF3":"GFF3 output for sequence features.","export.format.name.BED":"BED locations.","export.format.description.BED":"BED output for sequence feature locations.","export.format.name.FAKE":"Fake","export.format.description.FAKE":"Fake format for testing. Should only appear if the\nquery has departments in the view.","export.format.name.FAKE_2":"Also Fake","export.format.description.FAKE_2":"Fake format for testing. Should only appear if the\nquery has companies in the view.","export.param.Size":"Size: <%= size %>","export.param.Format":"Format","export.param.Start":"Offset: <%= start %>","export.param.Destination":"Destination","export.param.Name":"File name","export.help.AdditionalCols":"You can add any attributes of objects which are already\nin the query.","rows.All":"No limit","export.cloud.FileLocation":"Upload to <%- cloud %> successful. Your file is available at:","export.UseCompression":"Compress results","export.UseGZIP":"Use GZIP compression (produces a .gzip archive)","export.UseZIP":"Use Zip compression (produces a .zip archive)","export.AddHeaders":"Add column headers","export.json.Rows":"Return results as rows - each row is an Array of JSON values, e.g.:","export.SetTablePage":"Select rows in table","export.ResetRowSelection":"Select all rows","export.json.RowsExample":'["eve", "2R", 5866824, 5868300]',"export.json.ObjExample":'{\n "class": "Gene",\n "symbol": "eve",\n "chromosomeLocation": {\n "class": "ChromosomeLocation",\n "start": 5866824,\n "end": 5868300\n "locatedOn": {\n "class": "Chromosome",\n "primaryIdentifier": "2R"\n }\n }\n}',"export.json.Objects":"Return results as objects - each result is a nested graph of\ndata, e.g.:","export.json.ObjWarning":"Please note that it is not recommended to set the size parameters\nwhen requesting object results, since the size of the result\nset, and the position of the offsets will differ when multiple\nrows are replaced by a single object with a collection.","export.ff.FriendlyHeaders":'Human readable headers (eg. "Gene > Organism Name")',"export.ff.PathHeaders":'Raw path headers (eg. "Gene.organism.shortName)',"export.error.NoColumnsSelected":"No columns selected","export.error.OffsetOutOfBounds":"The offset is greater than the total number of results.",ListNameDuplicate:"List names must be unique. This name is already taken",ListNameEmpty:"Lists must have names. Please enter one",ListNameIllegal:"Some characters are not allowed in list names. This name contains the following\nillegal characters: <%- illegals.join(', ') %>. Please remove them.",ExportTitle:"Download results for <%= name || 'query' %>",ConfigureExport:"Configure Export",GetData:"Download Data",ExportHelp:"Download file containing results to your computer",ExportButton:"Download","download-file":"Download File",download:"Download file",Galaxy:"Send to Galaxy",Drive:"Save to Google Drive",Dropbox:"Save to Dropbox","Destdownload-file":"File",DestGalaxy:"Galaxy",ExportAlt:"Send Data Somewhere Else",ExportLong:'Download\nFile\nto your Computer',SendToGalaxy:'Send to\nGalaxy\nfor analysis',MyGalaxy:"Send to your Galaxy",ForgetGalaxy:"Clear this galaxy URL",GalaxyHelp:"Start a file upload job within Galaxy",GalaxyURILabel:"Galaxy Location:",GalaxyAlt:"Send to a specific Galaxy",SaveGalaxyURL:"Make this my default Galaxy",WhatIsGalaxy:"What is Galaxy?",WhatIsGalaxyURL:"https://galaxyproject.org/tutorials/g101/",GalaxyAuthExplanation:"If you have already logged into Galaxy with this browser, then the data\nwill be sent into your active account. Otherwise it will appear in a \ntemporary anonymous account.",CopyToClipBoard:"Copy to clipboard: +C, ",IsPrivateData:"This link provides access to data stored in your private lists. In order to do so\nit uses the API access token provided on initialisation. If this is your permanent\nAPI token you should be as careful of this link as you would of the data is provides\naccess to. If this is just a 24 hour access token, then you will need to replace it\nonce it becomes invalid.",LongURI:"The normal URI for this query (which includes the full query XML in the \nparameters) is too long for a GET request. The URI you can see here uses a\nquery-id, which has a limited validity. You should not store this URI for long\nterm use.",SendToOtherGalaxy:"Send",AllRows:"Whole Result Set",SomeRows:"Specific Range",WhichRows:"Rows to Export",RowsHelp:"Export all rows, or define a range of rows to export.",AllColumns:"All Current Columns",SomeColumns:"Choose Columns",CompressResults:"Compress results",NoCompression:"No compression",GZIPCompression:"GZIP",ZIPCompression:"ZIP",Copy:"copy to clip-board",ResultsPermaLink:"Perma-link to results",ResultsPermaLinkText:"Results URI",QueryXML:"Query XML",ResultsPermaLinkTitle:"Get a permanent URL for these results, suitable for your own use",ResultsPermaLinkShareTitle:"Get a permanent URL for these results, suitable for sharing with others",ColumnsHelp:"Export all columns, or choose specific columns to export.",WhichColumns:"Columns to Export",ResetColumns:"Reset Columns.",FirstRow:"From",LastRow:"To",SpreadsheetOptions:"Spreadsheet Options",ColumnHeaders:"Include Column Headers",PossibleColumns:"You can add any attribute from these nodes without changing your results:",ExportedColumns:"Exported Columns (drag to reorder)",ChangeColumns:"You may add any of the columns in the right hand box by clicking on the\nplus sign. You may remove unwanted columns by clicking on the minus signs\nin the left hand box. Note that while adding these columns will not alter your query,\nif you remove all the attributes from an item, then you may change the results\nyou receive.",OuterJoinWarning:"This query has outer-joined collections. This means that the number of rows in \nthe table is likely to be different from the number of rows in the exported results.\nYou are strongly discouraged from specifying specific ranges for export. If\nyou do specify a certain range, please check that you did in fact get all the \nresults you wanted.",IncludedFeatures:"Exportable parts of this Query - choose at least one:",FastaFeatures:"Features with Sequences in this Query - select one:",FastaOptions:"FASTA Specific Options",FastaExtension:"Extension (eg: 100/100bp/5kbp/0.5mbp):",ExtraAttributes:"Columns to include as extra attributes on each exported record:",NoSuitableColumns:"There are no columns of a suitable type for this format.",BEDOptions:"BED Specific Options",Gff3Options:"GFF3 Specific Options",ChrPrefix:'Prefix "chr" to the chromosome identifier as per UCSC convention (eg: chr2)',ConfigureExportHelp:"Configure the export options in these categories","largetable.ok":"Set page size to <%- size %>","largetable.abort":"Cancel","largetable.appeal":"You have requested a very large table size (<%= size %> rows per page). Your\nbrowser may struggle to render such a large table,\nand the page could become unresponsive. In any case,\nwill be very difficult for you to read the whole table\nin the page. We suggest the following alternatives:"}}).call(this)},{}],18:[function(t,e,n){(function(){var n;(n=t("../messages")).setWithPrefix("codegen",{AsHTML:"As HTML page",DialogueTitle:'Generated <%= Messages.getText("codegen.Lang", {lang: lang}) %>\nCode for <%= query.name || "Query" %>',CannotExportXML:"You cannot save the XML as a file directly. Please use your browser's cut\nand paste functionality.",PrimaryAction:"Save",ChooseLang:"Choose Language",ShowBoilerPlate:"Show comments",HighlightSyntax:"Highlight Syntax",GenerateCodeIn:function(t){var e;return e=t.lang,"Generate "+n.getText("codegen.Lang",{lang:e})+"\n"+("xml"!==e?"code":"")},Lang:function(t){var e;switch(e=t.lang){case"py":return"Python";case"pl":return"Perl";case"java":return"Java";case"rb":return"Ruby";case"js":return"JavaScript";case"xml":return"XML";default:throw new Error("Unknown language "+e)}}})}).call(this)},{"../messages":16}],19:[function(t,e,n){(function(){t("../messages").setWithPrefix("columns",{DialogueTitle:"Manage Columns",ApplyChanges:"Apply Changes",FindColumnToAdd:"Add a Column",AddColumn:"<% if (num < 1) { %>\n No columns chosen\n<% } else { %>\n Add <%= num %> new <%= pluralise('column', num) %>\n<% } %>",AddColumnToSortOrder:"Sort by this column",NoChangesToApply:"There are no changes to apply.",OrderVerb:"Add / Remove / Re-Arrange",OrderTitle:"Columns",SortVerb:"Configure",SortTitle:"Sort-Order",OnlyColsInView:"Only show columns in the table:",SortingHelpTitle:"What Columns Can I Sort by?",ViewTabTitle:"Selected Columns",SortOrderTabTitle:"Sort Order",CurrentView:"Current Columns",CurrentViewHelp:"Re-arrange or remove columns by dragging, or by using the buttons",CurrentSortOrder:"<% if (oes.length) { %>\n <%= oes.length %> Order <%= pluralise('Elements', oes.length) %>\n<% } else { %>\n Not sorted.\n<% } %>",NoSortOrder:"No sort order. Drop columns here to sort the table.",RemoveOrderElement:"Remove this column from the sort-order",CurrentSortOrderHelp:"Re-arrange, add or remove columns. The full set of available\ncolumns is listed below.",ColumnsSelected:'<%= columns.length %> <%= pluralise("Column", columns.length) %>\nSelected<% if (removed) { %>, <%= removed %> Removed<% } %>',ChooseAPathFrom:"Choose a path from <%= root %>",RemoveColumn:"Remove this column",MoveUp:"Move this column up",MoveDown:"Move this column down",ColumnWillBeRemoved:"This column will be removed",RestoreColumn:"Add this column back to the table",ChangeDirection:"Change sort direction",CurrentDirection:"Sorted in\n<%= (dir === 'DESC') ? 'reverse' : void 0 %>\n<%= numeric ? 'numerical' : 'alphabetical' %>\norder.",ManageColumns:"Manage Columns",ManageColumnsShort:"Columns"})}).call(this)},{"../messages":16}],20:[function(t,e,n){(function(){e.exports={All:"All",Reset:"Reset",Export:"Download",Clear:"Clear",Cancel:"Cancel",Complete:"Complete",Error:"Error",Warning:"Warning",Filter:"Filter",Loading:"Loading",Undo:"Undo",and:"and",or:"or",comma:",",Number:"<%= formatNumber(n) %>","modal.DefaultTitle":"Excuse me...","modal.Dismiss":"Close","modal.OK":"OK","modal.ApplyChanges":"Apply Changes","core.NoOptions":"There are no options to select from.",ErrorTitle:function(t){switch(t.level){case"Error":return"Error";case"Warning":return"Warning";case"Info":return"nb";case"Positive":return"Success";default:return"Error"}}}}).call(this)},{}],21:[function(t,e,n){(function(){t("../messages").setWithPrefix("constraints",{Heading:'<%= n %> Active <%= pluralise("Filter", n) %>',AddNewFilter:"Add New Filter",AddFilter:"Add filter",AddNew:"Add Filter",DefineNew:"Define a new filter",EditOrRemove:"edit or remove the currently active filters",None:"No active filters",NoOfValues:'<%= (n === 1) ? "one" : formatNumber(n) %> <%= pluralise("value", n) %>',NoOfIds:'<%= (n === 1) ? "one" : formatNumber(n) %> <%= pluralise("ID", n) %>',ISA:"is a",LookupIn:"in",AddConFor:"Add filter to\n<% if (isAttribute && !hideType) { %><%= typeName %><% } %>\n<%= _.last(parts) %>",ManageFilters:"Manage Filters",ManageFiltersShort:"Filters"})}).call(this)},{"../messages":16}],22:[function(e,t,n){(function(){var t;(t=e("../messages")).setWithPrefix("error",{Oops:"Oops! - Sorry we cannot get that table for you.",EmailHelp:"Send a bug report",ShowQuery:"Show query",ShowError:"Show error",ConnectionError:"Could not connect to server"}),t.setWithPrefix("error.mail",{Subject:"[IMTABLES] - Error running query."}),t.setWithPrefix("error.client",{Heading:"Application error.",Body:"This is due to an unexpected error in the tables\napplication - this is our fault, and we are sorry for the\ninconvenience. Please send us the pre-filled bug report so\nwe can fix this as soon as possible."}),t.setWithPrefix("error.server",{Heading:"Server error - our bad!",Body:"This is most likely related to the query that was just run. If you have\ntwo minutes, please send us an email with details of this query to help us\ndiagnose and fix this bug - we have already pre-filled the bug report,\nyou just need to hit send (and maybe give us some extra details).\nAlternatively, you might be able to fix this query by changing its column, \nfilters or joins; use the tools above to do so."})}).call(this)},{"../messages":16}],23:[function(e,t,n){(function(){var t;(t=e("../messages")).setWithPrefix("joins",{Heading:"Manage Relationships",Manage:function(){return t.getText("joins.Heading")},ManageShort:"Relationships",Inner:"Required",Outer:"Optional",ExplanationTitle:"What does this do?",Explanation:"You can specify the entity relationships within the query here. This\nhas a couple of effects - one is to exclude a class of matched results, the\nother is to change the way the results are presented in the table.\nIf set to required, then an entity which matches the filters\nbut lacks the given relationship will not be returned in the results,\nwhereas if set to optional it will. This also has an effect on the\nway that results are laid out: required collection relationships\nare returned inline, whereas optional collection relationships are\nreturned as nested sub-tables within the main result set."})}).call(this)},{"../messages":16}],24:[function(e,t,n){(function(){var t;(t=e("../messages")).setWithPrefix("lists",{DefaultName:"<%= typeName %> List (<%= new Date() %>)",Create:"Create List",Append:"Add to List",SaveAsList:"Save as List",CreateListTitle:"Create a new List\n<% if (state.count) { %>\n of <%= formatNumber(state.count) %>\n <%= pluralise(state.typeName, (state.count || 0)) %>\n<% } %>",AppendToListTitle:"Add\n<% if (state.count) { %>\n <%= formatNumber(state.count) %>\n <%= pluralise(state.typeName, (state.count || 0)) %>\n<% } %>\nto\n<%= target || 'a List' %>",NoTags:"No tags",AddTag:"Add a new tag",AddTagBtn:"add",RemoveTag:"Remove this tag",ShowExtraOptions:"<% if (minimised) { %>Show <% } %>Optional attributes",TargetDoesNotExist:"Your target list does not exist.",NoTargetSelected:"Please select a target list.",PossibleAppendTarget:"<%= name %> (<%= formatNumber(size) %> <%= pluralise((typeName || 'item'), size) %>)",NoObjectsSelected:"No objects selected. Choose objects from the table beneath. You can\ndrag this dialog around if it is in the way.",StartPicking:"Pick items from the table",NoCommonType:"There is no common type for these objects."}),t.setWithPrefix("lists.error",{MustBeLoggedIn:"You are not logged in. Anonymous users cannot create lists."}),t.setWithPrefix("lists.params",{Name:"List Name",NamePlaceholder:"List name is required",Desc:"List Description",DescPlaceholder:"Enter a description",Target:"Choose list to append items to"}),t.setWithPrefix("lists.params.help",{Name:"You must provide a unique list name",Target:"You must select a target list"}),t.setWithPrefix("lists.picker",{Expand:"show more options",Collapse:"show fewer options"}),t.setWithPrefix("lists.append",{NoSuitableLists:"No suitable lists were found\n<% if (model.type) { %>\n for <%- model.type %>.\n<% } else { %>\n because no items are selected, or they have no common type.\n<% } %>"})}).call(this)},{"../messages":16}],25:[function(e,t,n){(function(){var t;(t=e("../messages")).setWithPrefix("logic",{Heading:"Manage Constraint Logic",Manage:function(){return t.getText("logic.Heading")},ManageShort:"Constraint Logic",LogicLabel:function(){return t.getText("logic.ManageShort")},ApplyLogic:"Change logic"})}).call(this)},{"../messages":16}],26:[function(t,e,n){(function(){t("../messages").setWithPrefix("subtables",{OpenHint:"Click to view/hide rows",RemoveColumn:"Remove this column"})}).call(this)},{"../messages":16}],27:[function(t,e,n){(function(){t("../messages").setWithPrefix("summary",{Got:"<% if (available > got) { %>Showing <%= formatNumber(got) %> of<% } %>",Max:"Maximum",Min:"Minimum",Bucket:"<%= range.min %> to <%= range.max %>: <%= count %> values",Count:"Count",Item:"Item",Average:"Average",StdDev:"Standard Deviation",OnlyOne:"There is only one <%- names.typeName %> <%- names.endName %>:\n<%- item.item %>, which occurs\n\n <% if (item.count === 1) { %>\n once\n <% } else if (item.count === 2) { %>\n twice\n <% } else { %>\n <%- formatNumber(item.count) %> times\n <% } %>\n",NumericDistribution:"Showing distribution of <%= formatNumber(n) %>",FilterValuesPlaceholder:"Filter values",DownloadData:"Download data",DownloadFormat:"As",MoreItems:"Load more items",Include:"Restrict table to matching rows",Exclude:"Exclude matching rows from table",Reset:"Reset selection",Toggle:"Toggle selection",SelectFilter:"Select filter type",FacetBar:"rgba(206, 210, 222, <%= opacity %>)",NoResults:"No results for <%= path %>",SelectedCount:"<%= isApprox ? \"ca. \" : void 0 %><%= formatNumber(selectedCount) %>\n<%= pluralise('Item', selectedCount) %> Selected",Total:"<% if (filtered) { %>(filtered from <%= formatNumber(total) %>)<% } %>"})}).call(this)},{"../messages":16}],28:[function(e,t,n){(function(){var t;(t=e("../messages")).setWithPrefix("table",{Building:"Loading Table ...",OverlayText:"Requesting data...",Empty:"No Results",EmptyWhy:"This query returns no results. You may wish to change its filters"}),t.setWithPrefix("table.lg",{ShowingAll:"Showing all <%= formatNumber(count) %> rows",ShowingRange:'Showing <%= formatNumber(first) %> to <%= formatNumber(last) %>\nof <%= formatNumber(count) %> <%= pluralise("row", count) %>'}),t.setWithPrefix("table.md",{ShowingAll:"All <%= formatNumber(count) %> rows",ShowingRange:"Showing rows <%= formatNumber(first) %> to <%= formatNumber(last) %>\nof <%= formatNumber(count) %>"}),t.setWithPrefix("table.sm",{ShowingAll:"All rows",ShowingRange:"Rows <%= formatNumber(first) %> to <%= formatNumber(last) %>\nof <%= formatNumber(count) %>"}),t.setWithPrefix("table.xs",{ShowingAll:"All rows",ShowingRange:"<%= formatNumber(first) %> to <%= formatNumber(last) %>\nof <%= formatNumber(count) %>"}),t.setWithPrefix("table.header",{FailedToInitSortMenu:"Could not initialise the sorting menu.",FailedToInitFilter:"Could not initialise the filter menu.",FailedToInitSummary:"Could not intitialise the column summary.",ViewSummary:"View column summary",ToggleColumn:"Toggle column visibility",RemoveColumn:"Remove this column",SortColumn:"<% if (dir === 'ASC') { %>\n Sorted in ascending order.\n<% } else if (dir === 'DESC') { %>\n Sorted in descending order.\n<% } else { %>\n Sort this column.\n<% } %>",ToggleTables:"Expand/collapse all sub-tables",Composed:"This column replaces <%= replaces.length %> others. Click here\nto show the individual columns separately.",FilterTitle:"<% if (count > 0) { %>\n <%= count %> active filters.\n<% } else { %>\n Filter by values in this column.\n<% } %>"})}).call(this)},{"../messages":16}],29:[function(t,e,n){(function(){t("../messages").setWithPrefix("undo",{StepTitle:"<% if (label === 'Initial') { %>\n Initial State\n<% } else if (verb === 'Added') { %>\n <% if (label === 'sort order element') { %>\n Added <%= formatNumber(number) %> <%= pluralise('column', number) %> to the sort order\n <% } else if (label === 'column') { %>\n Selected <%= formatNumber(number) %> <%= pluralise('column', number) %>\n <% } else { %>\n Added <%= formatNumber(number) %> <%= pluralise(label, number) %>\n <% } %>\n<% } else if (verb === 'Removed') { %>\n <% if (label === 'sort order element') { %>\n Removed <%= formatNumber(number) %> <%= pluralise('column', number) %> from the sort order\n <% } else if (label === 'column') { %>\n Unselected <%= formatNumber(number) %> <%= pluralise('column', number) %>\n <% } else { %>\n Removed <%= formatNumber(number) %> <%= pluralise(label, number) %>\n <% } %>\n<% } else if (verb === 'Changed') { %>\n <% if (label === 'sort order element') { %>\n Changed sort order\n <% } else { %>\n Changed <%= pluralise(label, 2) %>\n <% } %>\n<% } else if (verb === 'Rearranged') { %>\n Rearranged <%= pluralise(label, 2) %>\n<% } else { %>\n !!!Cannot handle <%= verb %> <%= label %>!!!\n<% } %>",StepCount:'<%= formatNumber(count) %> <%= pluralise("row", count) %>',RevertToState:"Revert to this state",IsCurrentState:"This is the current state",ViewCount:'<%= n %> <%= pluralise("column", n) %> selected',ConstraintCount:"<% if (n) { %>\n <%= n %> <%= pluralise('filter', n) %>\n<% } else { %>\n No filters\n<% } %>",OrderElemCount:"<% if (n) { %>\n Sorted on <%= n %> <%= pluralise('column', n) %>\n<% } else { %>\n Not sorted\n<% } %>",ShowAllStates:"Show <%= n %> hidden <%= pluralise('state', n) %>",ToggleTrivial:'<%= hideTrivial ? "Hiding" : "Hide" %> minor steps',ToggleTrivialTitle:'<%= hideTrivial ? "Hiding" : "Hide" %> steps that did not change the row count',Revision:"no. <%= v %>",RevisionTitle:"revision <%= v %>",MoreSteps:'<%= more %> more <%= pluralise("step", more) %>'})}).call(this)},{"../messages":16}],30:[function(t,e,r){(function(){var i,n;i=t("jquery"),n=function(t){var e,n;return e=i("body").width(),n=t.width(),t.css({left:(e-n)/2,top:50})},r._showModal=function(){var t,e;return(t=this.$el).modal({show:!1}).addClass("im-floating").draggable({handle:".modal-header"}).show(function(){return n(t),t.animate({opacity:1},{complete:function(){return t.addClass("in")}})}),this.listenToOnce(this,"remove",(e=this,function(){return e.$el.draggable("destroy")}))},r._hideModal=function(){return this.$el.removeClass("in"),this.onHidden()}}).call(this)},{jquery:252}],31:[function(t,e,n){(function(){var p;p=t("underscore"),n.setChildIndices=function(e,n,t){var i,r,o,s,a,l,u,c,h;for(null==n&&(n="top"),null==t&&(t="collection"),s=this.children,i=this[t],h=p.compact(i.map(function(t){return s[e(t)]})),l=[],r=o=0,a=(u=p.sortBy(h,function(t){return t.el.getBoundingClientRect()[n]})).length;oe;)this.pop();return this.watch(t),null!=n&&n.trigger("replaced:by",t.get("query")),this.triggerChangedCurrent()},n)}).call(this)},{"../core/collection":5,"./step":59,underscore:257}],46:[function(e,o,t){(function(){var t,n,r={}.hasOwnProperty;function i(t,e,n){i.__super__.constructor.call(this,{classes:null!=e?e.map(String):void 0,id:n}),this.set({"service:base":t}),this.freeze("service:base","id","classes")}n=e("underscore"),t=e("../core-model"),o.exports=(function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(i,t),i.prototype.toJSON=function(){var t,e;return e=this.get("service:url"),t=/^http/.test(e)?e:this.get("service:base")+e,n.extend(i.__super__.toJSON.apply(this,arguments),{"report:uri":t})},i.prototype.merge=function(t,e){return this.set(e,t.value),this.set({"service:url":t.url})},i)}).call(this)},{"../core-model":2,underscore:257}],47:[function(a,l,t){(function(){function t(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t}var e,c,h,n,i,r={}.hasOwnProperty;function o(t){var e,n;e=t.path,n=t.style,o.__super__.constructor.call(this,e),null!=n&&this.set({style:n})}function s(){return s.__super__.constructor.apply(this,arguments)}i=a("underscore"),e=a("../core/collection"),n=a("./path"),t(o,n),o.prototype.defaults=function(){return i.extend(o.__super__.defaults.apply(this,arguments),{style:"INNER"})},c=o,l.exports=(t(s,e),s.prototype.model=c,s.prototype.comparator="displayName",s.prototype.initialize=function(){return s.__super__.initialize.apply(this,arguments),this.listenTo(this,"change:displayName",this.sort)},s.prototype.getJoins=function(){return i.object(this.where({style:"OUTER"}).map(function(t){return[t.get("path"),t.get("style")]}))},h=s),h.fromQuery=function(t){var e,n,i,r,o,s,a,l,u;for(o in n=new h,a=t.joins)u=a[o],s=t.makePath(o),n.add(new c({style:u,path:s}));for(e=0,i=(l=t.getQueryNodes()).length;e "))}),r.set({contentName:o.compact([r.get("columnTypeName"),r.get("fieldName")]).join(" ")})}))},e.prototype.getPath=function(){return this.get("column")},e.prototype.toJSON=function(){return o.extend(e.__super__.toJSON.apply(this,arguments),{column:this.get("column").toString(),node:this.get("node").toString(),rows:this.get("rows").map(function(t){return t.map(function(t){return t.toJSON()})})})},e)}).call(this)},{"../core-model":2,underscore:257}],49:[function(e,i,t){(function(){var t,r={}.hasOwnProperty;function n(t,e){n.__super__.constructor.call(this),this.set({id:null,isNULL:!0,classes:[t],"service:base":"","service:url":"","report:uri":null}),e&&this.set(e,null)}t=e("../core-model"),i.exports=(function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(n,t),n)}).call(this)},{"../core-model":2}],50:[function(e,n,t){(function(){var t,i,r={}.hasOwnProperty;function o(){return o.__super__.constructor.apply(this,arguments)}i=e("underscore"),t=e("backbone"),n.exports=(function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(o,t.Model),o.prototype._defaults={},o.prototype.setLimits=function(t){return i.extend(this._defaults,t)},o.prototype.get=function(t){var e;return null!=(e=o.__super__.get.call(this,t))?e:t in this._defaults?this._defaults[t]:null},o.prototype.toJSON=function(){return i.extend({},this._defaults,this.attributes)},o.prototype.nullify=function(){var t,e,n,i,r;for(this.unset("min"),this.unset("max"),this.nulled=!0,r=[],e=0,n=(i=["change:min","change:max","change"]).length;e= 0");if(null!=this.size&&this.size<0)throw new Error("Size must be null or Natural")}e.exports=(t.prototype.end=function(){return this.all()?null:this.start+this.size},t.prototype.all=function(){return!this.size},t.prototype.isBefore=function(t){return null!=this.size&&this.end() ")}),e.freeze("displayName","parts")}));var e},n.prototype.setTypeName=function(t){var e;return(t.isAttribute()?t.getParent():t).getType().getDisplayName().then((e=this,function(t){return e.set({typeName:t})}))},n.prototype.pathAttributes=function(t){var e,n,i,r,o;return r=String(t),e={id:(n=t.isAttribute())?r:r+".id",path:r,type:null!=(i=(o=t.getType()).name)?i:o},n?(e.isNumeric=0<=l.call(a,o),e.isBoolean=0<=l.call(s,o)):(e.isReference=!0,e.isAttribute=!1),e},n)}).call(this)},{"../core-model":2,imjs:250}],57:[function(l,u,t){(function(){function t(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t}var e,n,i,o,r={}.hasOwnProperty;function s(){return s.__super__.constructor.apply(this,arguments)}function a(){return a.__super__.constructor.apply(this,arguments)}o=l("underscore"),n=l("../core-model"),e=l("../core/collection"),t(s,n),s.prototype.defaults=function(){return{index:null,query:null,cells:[]}},s.prototype.toJSON=function(){var r;return o.extend(s.__super__.toJSON.apply(this,arguments),{cells:function(){var t,e,n,i;for(i=[],t=0,e=(n=this.get("cells")).length;t',n.code_gen_js='<% if (asHTML) { %>\n\x3c!-- The Element we will target --\x3e\n\n\x3c!-- The imtables source --\x3e\n
+
+
+