├── .gitignore ├── CNAME ├── README.md ├── bare.html ├── blank.html ├── bower.json ├── dist ├── README ├── yasr.bundled.js ├── yasr.bundled.js.map ├── yasr.bundled.min.js ├── yasr.bundled.min.js.map ├── yasr.css ├── yasr.js ├── yasr.js.map ├── yasr.min.css ├── yasr.min.js └── yasr.min.js.map ├── doc ├── doc.min.css ├── doc.min.js ├── imgs │ ├── blacktocat.png │ ├── blacktocat_black.png │ ├── data2semantics.png │ ├── favicon.png │ ├── npm.png │ ├── triply.svg │ ├── yasgui.png │ └── yasr.png ├── index.html ├── main.js └── main.scss ├── gulp ├── makeCss.js ├── makeJs.js ├── makeMainPage.js ├── modifyYasqeInclude.js ├── optionalShim.js ├── paths.js ├── serve.js └── version.js ├── gulpFile.js ├── index.html ├── lib ├── colResizable-1.4.js └── jquery.csv-0.71.js ├── license.txt ├── package-lock.json ├── package.json └── src ├── bindingsToCsv.js ├── boolean.js ├── boolean.scss ├── defaults.js ├── entry.js ├── error.js ├── error.scss ├── exceptions.js ├── gChartLoader.js ├── gchart.js ├── gchart.scss ├── imgs.js ├── jquery ├── extendJquery.js └── tableToCsv.js ├── leaflet.js ├── leaflet.scss ├── main.js ├── main.scss ├── parsers ├── csv.js ├── dlv.js ├── graphJson.js ├── json.js ├── tsv.js ├── wrapper.js └── xml.js ├── pivot.js ├── pivot.scss ├── rawResponse.js ├── rawResponse.scss ├── scss ├── cssIncludes │ ├── _codemirror.scss │ ├── _foldgutter.scss │ ├── _jquery.dataTables.scss │ ├── _leaflet.scss │ └── _pivot.scss ├── global.scss ├── scoped.scss ├── variables.scss └── yasr.scss ├── table.js ├── table.scss └── utils.js /.gitignore: -------------------------------------------------------------------------------- 1 | .project 2 | .settings 3 | node_modules 4 | test 5 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | yasr.yasgui.org 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # This repository is deprecated. 2 | 3 | For the Yasgui monorepo see https://github.com/TriplyDB/Yasgui. 4 | 5 | For Yasgui documentation, see https://triply.cc/docs/yasgui 6 | 7 | 8 | ----- 9 | 10 | [![NPM](https://img.shields.io/npm/v/yasgui-yasr.svg)](https://www.npmjs.org/package/yasgui-yasr) 11 | [![Bower](https://img.shields.io/bower/v/yasgui-yasr.svg)](https://github.com/OpenTriply/YASR) 12 | 13 | # YASR 14 | 15 | *YASR* (Yet Another SPARQL Resultset visualizer) is part of the 16 | the [*YASGUI*](https://github.com/OpenTriply/YASGUI) suite of SPARQL 17 | tools. For more information about *YASR*, its features, and a HOWTO 18 | for includign it in your own web site, visit http://yasr.yasgui.org. 19 | 20 | ## Developing YASR 21 | 22 | Feel free to fork and develop this tool. You can submit your 23 | contributions as Github pull requests. To develop *YASR* locally: 24 | 25 | * `npm install` 26 | * `npm run dev` for local development 27 | * `npm run build` for creating the packages 28 | 29 | ## Used by many 30 | 31 | *YASGUI* is used by many triple stores, data tools, and data 32 | publishers. Here is a partial list: 33 | 34 | ### Triple Stores 35 | 36 | * [**Apache Jena**](https://jena.apache.org/) 37 | * [**OntoText GraphDB**](http://ontotext.com/products/graphdb/) 38 | * [**RDF4J**](http://rdf4j.org/) (previously: OpenRDF Sesame) 39 | * [**ClioPatria**](http://cliopatria.swi-prolog.org/home) 40 | 41 | ### Data Tools 42 | 43 | * [**Gosparqled**](https://github.com/scampi/gosparqled) 44 | ([demo](http://scampi.github.io/gosparqled/)) 45 | * [**Snapper**](https://github.com/jiemakel/snapper) Turtle editor 46 | ([demo](http://jiemakel.github.io/snapper/#/)) 47 | * [**Viso**](https://github.com/jiemakel/visu) 48 | ([demo](http://demo.seco.tkk.fi/visu/)) 49 | * [**Brwsr**](https://github.com/Data2Semantics/brwsr), Linked Data 50 | browser 51 | * [**Trifid**](https://github.com/zazuko/trifid) 52 | light-weight Linked Data Server and Proxy 53 | 54 | ### Data Publishers 55 | 56 | * [**Dutch Cadastre**](https://data.pdok.nl/yasgui) 57 | * [**Swiss Federal Geoportal**](https://ld.geo.admin.ch/sparql/) 58 | * [**HealthData.gov**](http://www.healthdata.gov/sparql) 59 | * [**Smithsonian American Art Museum**](http://americanart.si.edu/collections/search/lod/about/sparql.cfm) 60 | * [**German National Library of Economics (ZWB)**](http://zbw.eu/labs/en/blog/publishing-sparql-queries-live) 61 | * [**Linked Open Vocabularies**](http://lov.okfn.org/dataset/lov/sparql) 62 | * [**LOD Laundromat**](http://lodlaundromat.org/sparql) 63 | * [**MetaLex**](http://doc.metalex.eu/query) 64 | * [**CEDAR project**](http://lod.cedar-project.nl/cedar/data.html) 65 | -------------------------------------------------------------------------------- /bare.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | YASR 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /blank.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "yasr", 3 | "version": "2.12.16", 4 | "homepage": "http://yasr.yasgui.org", 5 | "authors": [ 6 | "Laurens Rietveld " 7 | ], 8 | "description": "Yet Another SPARQL Resultset GUI", 9 | "main": "dist/yasr.bundled.min.js", 10 | "moduleType": [ 11 | "globals" 12 | ], 13 | "keywords": [ 14 | "SPARQL", 15 | "Linked Data" 16 | ], 17 | "license": "MIT", 18 | "ignore": [ 19 | "**/.*", 20 | "node_modules", 21 | "bower_components", 22 | "test", 23 | "tests" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /dist/README: -------------------------------------------------------------------------------- 1 | We provide two versions of YASQE: 2 | - Bundled with all dependencies (bundled) 3 | - Lightweight without dependencies. In this case, make sure you have CodeMirror, jQuery and the jQuery DataTables plugin included in your page 4 | -------------------------------------------------------------------------------- /doc/imgs/blacktocat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Triply-Dev/YASGUI.YASR-deprecated/bf32af359646472c50c6f32e3950fed227dbd4b5/doc/imgs/blacktocat.png -------------------------------------------------------------------------------- /doc/imgs/blacktocat_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Triply-Dev/YASGUI.YASR-deprecated/bf32af359646472c50c6f32e3950fed227dbd4b5/doc/imgs/blacktocat_black.png -------------------------------------------------------------------------------- /doc/imgs/data2semantics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Triply-Dev/YASGUI.YASR-deprecated/bf32af359646472c50c6f32e3950fed227dbd4b5/doc/imgs/data2semantics.png -------------------------------------------------------------------------------- /doc/imgs/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Triply-Dev/YASGUI.YASR-deprecated/bf32af359646472c50c6f32e3950fed227dbd4b5/doc/imgs/favicon.png -------------------------------------------------------------------------------- /doc/imgs/npm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Triply-Dev/YASGUI.YASR-deprecated/bf32af359646472c50c6f32e3950fed227dbd4b5/doc/imgs/npm.png -------------------------------------------------------------------------------- /doc/imgs/triply.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/imgs/yasgui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Triply-Dev/YASGUI.YASR-deprecated/bf32af359646472c50c6f32e3950fed227dbd4b5/doc/imgs/yasgui.png -------------------------------------------------------------------------------- /doc/imgs/yasr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Triply-Dev/YASGUI.YASR-deprecated/bf32af359646472c50c6f32e3950fed227dbd4b5/doc/imgs/yasr.png -------------------------------------------------------------------------------- /doc/main.js: -------------------------------------------------------------------------------- 1 | var $ = jQuery = require("jquery"); 2 | require("../node_modules/bootstrap-sass/assets/javascripts/bootstrap/affix.js"); 3 | require("../node_modules/bootstrap-sass/assets/javascripts/bootstrap/scrollspy.js"); 4 | 5 | $(document).ready(function() { 6 | //get the latest hosted version 7 | if ($("#cdnDownload").length > 0) { 8 | var name = "yasr"; 9 | var npmName = "yasgui-" + name; 10 | //only draw when we've got some place to print this info (might not be on all pages where we include this js file) 11 | $.get("https://data.jsdelivr.com/v1/package/npm/" + npmName, function(data) { 12 | var version = data.tags.latest; 13 | if (version) { 14 | $("#" + name + "Css").text( 15 | "" 22 | ); 23 | $("#" + name + "JsBundled").text( 24 | " 191 | 192 | 193 | 194 | 195 | 245 | 246 | 247 | -------------------------------------------------------------------------------- /lib/colResizable-1.4.js: -------------------------------------------------------------------------------- 1 | /** 2 | _ _____ _ _ _ 3 | | | __ \ (_) | | | | 4 | ___ ___ | | |__) |___ ___ _ ______ _| |__ | | ___ 5 | / __/ _ \| | _ // _ \/ __| |_ / _` | '_ \| |/ _ \ 6 | | (_| (_) | | | \ \ __/\__ \ |/ / (_| | |_) | | __/ 7 | \___\___/|_|_| \_\___||___/_/___\__,_|_.__/|_|\___| 8 | 9 | v 1.4 - a jQuery plugin by Alvaro Prieto Lauroba 10 | 11 | Licences: MIT & GPL 12 | Feel free to use or modify this plugin as far as my full name is kept 13 | 14 | If you are going to use this plugin in production environments it is 15 | strongly recomended to use its minified version: colResizable.min.js 16 | 17 | */ 18 | 19 | var $ = require('jquery'); 20 | var d = $(document); //window object 21 | var h = $("head"); //head object 22 | var drag = null; //reference to the current grip that is being dragged 23 | var tables = []; //array of the already processed tables (table.id as key) 24 | var count = 0; //internal count to create unique IDs when needed. 25 | 26 | //common strings for minification (in the minified version there are plenty more) 27 | var ID = "id"; 28 | var PX = "px"; 29 | var SIGNATURE ="JColResizer"; 30 | 31 | //shortcuts 32 | var I = parseInt; 33 | var M = Math; 34 | var ie = navigator.userAgent.indexOf('Trident/4.0')>0; 35 | var S; 36 | try{S = sessionStorage;}catch(e){} //Firefox crashes when executed as local file system 37 | 38 | //append required CSS rules 39 | h.append(""); 40 | 41 | 42 | /** 43 | * Function to allow column resizing for table objects. It is the starting point to apply the plugin. 44 | * @param {DOM node} tb - refrence to the DOM table object to be enhanced 45 | * @param {Object} options - some customization values 46 | */ 47 | var init = function( tb, options){ 48 | var t = $(tb); //the table object is wrapped 49 | if(options.disable) return destroy(t); //the user is asking to destroy a previously colResized table 50 | var id = t.id = t.attr(ID) || SIGNATURE+count++; //its id is obtained, if null new one is generated 51 | t.p = options.postbackSafe; //shortcut to detect postback safe 52 | if(!t.is("table") || tables[id]) return; //if the object is not a table or if it was already processed then it is ignored. 53 | t.addClass(SIGNATURE).attr(ID, id).before('
'); //the grips container object is added. Signature class forces table rendering in fixed-layout mode to prevent column's min-width 54 | t.opt = options; t.g = []; t.c = []; t.w = t.width(); t.gc = t.prev(); //t.c and t.g are arrays of columns and grips respectively 55 | if(options.marginLeft) t.gc.css("marginLeft", options.marginLeft); //if the table contains margins, it must be specified 56 | if(options.marginRight) t.gc.css("marginRight", options.marginRight); //since there is no (direct) way to obtain margin values in its original units (%, em, ...) 57 | t.cs = I(ie? tb.cellSpacing || tb.currentStyle.borderSpacing :t.css('border-spacing'))||2; //table cellspacing (not even jQuery is fully cross-browser) 58 | t.b = I(ie? tb.border || tb.currentStyle.borderLeftWidth :t.css('border-left-width'))||1; //outer border width (again cross-browser isues) 59 | // if(!(tb.style.width || tb.width)) t.width(t.width()); //I am not an IE fan at all, but it is a pitty that only IE has the currentStyle attribute working as expected. For this reason I can not check easily if the table has an explicit width or if it is rendered as "auto" 60 | tables[id] = t; //the table object is stored using its id as key 61 | createGrips(t); //grips are created 62 | 63 | }; 64 | 65 | 66 | /** 67 | * This function allows to remove any enhancements performed by this plugin on a previously processed table. 68 | * @param {jQuery ref} t - table object 69 | */ 70 | var destroy = function(t){ 71 | var id=t.attr(ID), t=tables[id]; //its table object is found 72 | if(!t||!t.is("table")) return; //if none, then it wasnt processed 73 | t.removeClass(SIGNATURE).gc.remove(); //class and grips are removed 74 | delete tables[id]; //clean up data 75 | }; 76 | 77 | 78 | /** 79 | * Function to create all the grips associated with the table given by parameters 80 | * @param {jQuery ref} t - table object 81 | */ 82 | var createGrips = function(t){ 83 | 84 | var th = t.find(">thead>tr>th,>thead>tr>td"); //if table headers are specified in its semantically correct tag, are obtained 85 | if(!th.length) th = t.find(">tbody>tr:first>th,>tr:first>th,>tbody>tr:first>td, >tr:first>td"); //but headers can also be included in different ways 86 | t.cg = t.find("col"); //a table can also contain a colgroup with col elements 87 | t.ln = th.length; //table length is stored 88 | if(t.p && S && S[t.id])memento(t,th); //if 'postbackSafe' is enabled and there is data for the current table, its coloumn layout is restored 89 | th.each(function(i){ //iterate through the table column headers 90 | var c = $(this); //jquery wrap for the current column 91 | var g = $(t.gc.append('
')[0].lastChild); //add the visual node to be used as grip 92 | g.t = t; g.i = i; g.c = c; c.w =c.width(); //some values are stored in the grip's node data 93 | t.g.push(g); t.c.push(c); //the current grip and column are added to its table object 94 | c.width(c.w).removeAttr("width"); //the width of the column is converted into pixel-based measurements 95 | if (i < t.ln-1) { 96 | g.bind('touchstart mousedown', onGripMouseDown).append(t.opt.gripInnerHtml).append('
'); //bind the mousedown event to start dragging 97 | } else g.addClass("JCLRLastGrip").removeClass("JCLRgrip"); //the last grip is used only to store data 98 | g.data(SIGNATURE, {i:i, t:t.attr(ID)}); //grip index and its table name are stored in the HTML 99 | }); 100 | t.cg.removeAttr("width"); //remove the width attribute from elements in the colgroup (in any) 101 | syncGrips(t); //the grips are positioned according to the current table layout 102 | //there is a small problem, some cells in the table could contain dimension values interfering with the 103 | //width value set by this plugin. Those values are removed 104 | t.find('td, th').not(th).not('table th, table td').each(function(){ 105 | $(this).removeAttr('width'); //the width attribute is removed from all table cells which are not nested in other tables and dont belong to the header 106 | }); 107 | 108 | 109 | }; 110 | 111 | 112 | /** 113 | * Function to allow the persistence of columns dimensions after a browser postback. It is based in 114 | * the HTML5 sessionStorage object, which can be emulated for older browsers using sessionstorage.js 115 | * @param {jQuery ref} t - table object 116 | * @param {jQuery ref} th - reference to the first row elements (only set in deserialization) 117 | */ 118 | var memento = function(t, th){ 119 | var w,m=0,i=0,aux =[]; 120 | if(th){ //in deserialization mode (after a postback) 121 | t.cg.removeAttr("width"); 122 | if(t.opt.flush){ S[t.id] =""; return;} //if flush is activated, stored data is removed 123 | w = S[t.id].split(";"); //column widths is obtained 124 | for(;i*{cursor:"+ t.opt.dragCursor +"!important}"); //change the mouse cursor 248 | g.addClass(t.opt.draggingClass); //add the dragging class (to allow some visual feedback) 249 | drag = g; //the current grip is stored as the current dragging object 250 | if(t.c[o.i].l) for(var i=0,c; i= 0) { 39 | //use double quotes to escape these 40 | value = value.replace(new RegExp(quote, "g"), quote + quote); 41 | } 42 | //and finally add quotes all around 43 | value = quote + value + quote; 44 | } 45 | csvString += value + delimiter; 46 | }; 47 | 48 | var needToQuoteString = function(value) { 49 | //quote when it contains whitespace or the delimiter 50 | var needQuoting = false; 51 | if (value.match("[\\w|" + delimiter + "|" + quote + "]")) { 52 | needQuoting = true; 53 | } 54 | return needQuoting; 55 | }; 56 | 57 | var csvString = ""; 58 | createHeader(); 59 | createBody(); 60 | return csvString; 61 | }; 62 | -------------------------------------------------------------------------------- /src/boolean.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var $ = require("jquery"); 3 | 4 | /** 5 | * Constructor of plugin which displays boolean info 6 | * 7 | * @param yasr {object} 8 | * @param parent {DOM element} 9 | * @param options {object} 10 | * @class YASR.plugins.boolean 11 | * @return yasr-boolean (doc) 12 | * 13 | */ 14 | var root = module.exports = function(yasr) { 15 | var container = $("
"); 16 | var draw = function() { 17 | container.empty().appendTo(yasr.resultsContainer); 18 | var booleanVal = yasr.results.getBoolean(); 19 | 20 | var imgId = null; 21 | var textVal = null; 22 | if (booleanVal === true) { 23 | imgId = "check"; 24 | textVal = "True"; 25 | } else if (booleanVal === false) { 26 | imgId = "cross"; 27 | textVal = "False"; 28 | } else { 29 | container.width("140"); 30 | textVal = "Could not find boolean value in response"; 31 | } 32 | 33 | //add icon 34 | if (imgId) require("yasgui-utils").svg.draw(container, require("./imgs.js")[imgId]); 35 | 36 | $("").text(textVal).appendTo(container); 37 | }; 38 | 39 | var canHandleResults = function() { 40 | return yasr.results.getBoolean && (yasr.results.getBoolean() === true || yasr.results.getBoolean() == false); 41 | }; 42 | 43 | return { 44 | name: null, //don't need to set this: we don't show it in the selection widget anyway, so don't need a human-friendly name 45 | draw: draw, 46 | hideFromSelection: true, 47 | getPriority: 10, 48 | canHandleResults: canHandleResults 49 | }; 50 | }; 51 | 52 | root.version = { 53 | "YASR-boolean": require("../package.json").version, 54 | jquery: $.fn.jquery 55 | }; 56 | -------------------------------------------------------------------------------- /src/boolean.scss: -------------------------------------------------------------------------------- 1 | 2 | .booleanResult { 3 | width: 70px; 4 | margin: 0 auto; 5 | vertical-align: middle; 6 | svg { 7 | margin-bottom: -10px; 8 | margin-right: 7px; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/defaults.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var $ = require("jquery"); 3 | module.exports = { 4 | /** 5 | * key of default plugin to use 6 | * @property output 7 | * @type string 8 | * @default "table" 9 | */ 10 | output: "table", 11 | useGoogleCharts: true, 12 | outputPlugins: ["table", "error", "boolean", "rawResponse", "pivot", "gchart", "leaflet"], 13 | pluginSettings: { 14 | //allows overwriting plugin settings. useful when passing settings via yasr constructor 15 | table: {}, 16 | error: {}, 17 | boolean: {}, 18 | rawResponse: {}, 19 | pivot: {}, 20 | gchart: {}, 21 | leaflet: {} 22 | }, 23 | /** 24 | * Draw the output selector widget 25 | * 26 | * @property drawOutputSelector 27 | * @type boolean 28 | * @default true 29 | */ 30 | drawOutputSelector: true, 31 | 32 | /** 33 | * Draw download icon. This issues html5 download functionality to 'download' files created on the client-side. 34 | * This allows the user to download results already queried for, such as a CSV when a table is shown, or the original response when the raw response output is selected 35 | * 36 | * @property drawDownloadIcon 37 | * @type boolean 38 | * @default true 39 | */ 40 | drawDownloadIcon: true, 41 | /** 42 | * Open links (anchor tags) of SPARQL results in a new browser tab/window (_blank), or the current one (_self) 43 | * 44 | * @property uriTarget 45 | * @type string ('_blank' | '_self') 46 | * @default '_blank' 47 | */ 48 | uriTarget: "_blank", 49 | onQuotaExceeded: function(e) { 50 | //fail silently 51 | console.warn("Could not store in localstorage. Skipping..", e); 52 | }, 53 | getUsedPrefixes: null, 54 | /** 55 | * Make certain settings and values of YASR persistent. Setting a key 56 | * to null, will disable persistancy: nothing is stored between browser 57 | * sessions Setting the values to a string (or a function which returns a 58 | * string), will store the query in localstorage using the specified string. 59 | * By default, the ID is dynamically generated by finding the nearest DOM element with an "id" set, 60 | * to avoid collissions when using multiple YASR items on one page 61 | * 62 | * @property persistency 63 | * @type object 64 | */ 65 | persistency: { 66 | prefix: function(yasr) { 67 | return "yasr_" + $(yasr.container).closest("[id]").attr("id") + "_"; 68 | }, 69 | /** 70 | * Persistency setting for the selected output 71 | * 72 | * @property persistency.outputSelector 73 | * @type string|function 74 | * @default function (determine unique id) 75 | */ 76 | outputSelector: function(yasr) { 77 | return "selector"; 78 | }, 79 | /** 80 | * Persistency setting for query results. 81 | * 82 | * @property persistency.results 83 | * @type object 84 | */ 85 | results: { 86 | /** 87 | * Get the key to store results in 88 | * 89 | * @property persistency.results.id 90 | * @type string|function 91 | * @default function (determine unique id) 92 | */ 93 | id: function(yasr) { 94 | return "results_" + $(yasr.container).closest("[id]").attr("id"); 95 | }, 96 | key: "results", 97 | /** 98 | * The result set might too large to fit in local storage. 99 | * It is impossible to detect how large the local storage is. 100 | * Therefore, we do not store all results in local storage, depending on a max number of characters in the SPARQL result serialization. 101 | * Set this function conservitavely. (especially when using multiple YASR instances on one page) 102 | * 103 | * @property persistency.results.maxSize 104 | * @type int 105 | * @default 100000 106 | */ 107 | maxSize: 100000 //char count 108 | } 109 | } 110 | }; 111 | -------------------------------------------------------------------------------- /src/entry.js: -------------------------------------------------------------------------------- 1 | //this is the entry-point for browserify. 2 | //the current browserify version does not support require-ing js files which are used as entry-point 3 | //this way, we can still require our main.js file 4 | module.exports = require("./main.js"); 5 | -------------------------------------------------------------------------------- /src/error.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var $ = require("jquery"); 3 | 4 | /** 5 | * Constructor of plugin which displays SPARQL errors 6 | * 7 | * @param yasr {object} 8 | * @param parent {DOM element} 9 | * @param options {object} 10 | * @class YASR.plugins.boolean 11 | * @return yasr-erro (doc) 12 | * 13 | */ 14 | var root = module.exports = function(yasr) { 15 | var $container = $("
"); 16 | var options = $.extend(true, {}, root.defaults); 17 | 18 | var getTryBtn = function() { 19 | var $tryBtn = null; 20 | if (options.tryQueryLink) { 21 | var link = options.tryQueryLink(); 22 | $tryBtn = $("