graphdb-workbench 2.7.0-TR4 → 2.7.0-TR5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/129.c0f963b73843c5073f9c.bundle.js +1 -1
- package/dist/14.d8eea26d8ea92ada564e.bundle.js +1 -0
- package/dist/16.aa3aacba76ae308708ab.bundle.js +1 -1
- package/dist/{17.cfb9ac424944288f79c6.bundle.js → 17.b623dfbda370b75d11e2.bundle.js} +2 -2
- package/dist/18.da7db8ec72404c1eb96e.bundle.js +2 -0
- package/dist/185.30251a3467e338980fd7.bundle.js +1 -0
- package/dist/2.a8c465fd2525319d6b35.bundle.js +2 -0
- package/dist/22.46ba69c135ae3c5da1fe.bundle.js +1 -0
- package/dist/234.0e2e0b7a533d97697bb9.bundle.js +1 -0
- package/dist/259.738329e347b6609e5c63.bundle.js +1 -0
- package/dist/260.7296e9103f4628ff2da9.bundle.js +1 -1
- package/dist/262.6e893a14a93da504bc0f.bundle.js +1 -1
- package/dist/263.1919e74ae4be90921e39.bundle.js +1 -1
- package/dist/264.b3b52b58b0c2d89cec03.bundle.js +1 -1
- package/dist/27.3131ec879b62e0ce3146.bundle.js +1 -1
- package/dist/28.a6728b32a326de61a82f.bundle.js +1 -1
- package/dist/282.4be6fb572bbfad4021c0.bundle.js +1 -0
- package/dist/291.3bdbbb070d373a65b403.bundle.js +1 -1
- package/dist/33.5dfeb44e8f1144e506db.bundle.js +1 -0
- package/dist/38.051296071e4e029d0a10.bundle.js +1 -1
- package/dist/42.222fdebca4d3748cfcde.bundle.js +1 -0
- package/dist/5.186c298dfba17317bf6b.bundle.js +1 -0
- package/dist/55.4772e07be818e403681e.bundle.js +1 -0
- package/dist/62.0ec268eccfe9eddea5ef.bundle.js +1 -1
- package/dist/9.cbaac4f0c99f9bee7025.bundle.js +2 -0
- package/dist/95.7c36d982f0d39f40a47f.bundle.js +1 -0
- package/dist/{bundle.6789b860b65350ff1774.bundle.js → bundle.f233811e1e1f53767477.bundle.js} +2 -2
- package/dist/i18n/locale-en.json +18 -9
- package/dist/i18n/locale-fr.json +18 -9
- package/dist/index.html +3 -3
- package/dist/js/angular/core/components/export-settings-modal/controller.js +3 -3
- package/dist/js/angular/core/components/export-settings-modal/exportSettingsModal.html +9 -9
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +1 -1
- package/dist/js/angular/import/templates/settingsModal.html +1 -1
- package/dist/js/angular/security/templates/user.html +1 -1
- package/dist/license-checker.json +2 -2
- package/dist/pages/aclmanagement.html +2 -2
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +1 -1
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +7 -3
- package/dist/pages/export.html +22 -28
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +8 -8
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/import.html +1 -1
- package/dist/pages/jdbc-create.html +1 -1
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +1 -1
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +1 -1
- package/dist/pages/repository.html +1 -1
- package/dist/pages/similarity-indexes.html +9 -9
- package/dist/pages/sparql-editor.html +1 -1
- package/dist/pages/sparql-template-create.html +1 -1
- package/dist/pages/ux-test1.html +2 -2
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger/index.html +27 -27
- package/package.json +1 -1
- package/dist/14.bae010c47425164176c3.bundle.js +0 -1
- package/dist/18.ff2476b6f43604f7408e.bundle.js +0 -2
- package/dist/185.4b8b11cf31d7fb573d19.bundle.js +0 -1
- package/dist/2.52d6a48354087c938177.bundle.js +0 -2
- package/dist/22.be2107dff80aaeb01a63.bundle.js +0 -1
- package/dist/234.8c34b0ef68a483d396eb.bundle.js +0 -1
- package/dist/259.bc01077ad6a8971c3cb2.bundle.js +0 -1
- package/dist/282.d1dafc01ef1a0e717aac.bundle.js +0 -1
- package/dist/33.6804ea5febf998adee66.bundle.js +0 -1
- package/dist/42.b383d6c625ff164b083d.bundle.js +0 -1
- package/dist/5.735153dfc2461e5a6210.bundle.js +0 -1
- package/dist/55.c3c9a00cd965887f4540.bundle.js +0 -1
- package/dist/9.b1c823a900ec32921991.bundle.js +0 -2
- package/dist/95.0981c42c7a8f4cc0f4a5.bundle.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[17,45,96,100,102,162,176,177,179,215,234],{108:function(e,t){angular.module("graphdb.framework.rest.explore.rest.service",[]).factory("ExploreRestService",n),n.$inject=["$http"];function n(e){return{getResourceDetails:(t,n,r,o)=>e.get("rest/explore/details",{params:{uri:t,triple:n,context:r},headers:{Accept:o||"application/json"}}),getGraph:(t,n,r)=>e.get("rest/explore/graph",{params:{uri:t.uri,triple:t.triple,inference:t.contextType.id,role:t.role,bnodes:t.blanks,sameAs:t.sameAs,context:t.context},headers:{Accept:n||"application/x-graphdb-table-results+json",Link:r?"<"+r+">":""}}).then(e=>e.data)}}},109:function(e,t,n){"use strict";n.r(t),n.d(t,"ResourceInfo",(function(){return i}));var r=n(88),o=n(74);class i{constructor(){this.role="subject",this.uri=void 0,this.triple=void 0,this.context=void 0,this.contextType=o.ContextTypes.EXPLICIT,this.sameAs=!0,this.details=new r.ResourceDetails,this.blanks=!0}}},110:function(e,t,n){"use strict";n.r(t),n.d(t,"RoleType",(function(){return r}));const r={SUBJECT:"subject",PREDICATE:"predicate",OBJECT:"object",CONTEXT:"context",ALL:"all"}},141:function(e,t){function n(e){return{restrict:"A",scope:{min:"=",max:"="},link:function(t,n,r){const o={debounce:_.debounce,delay:100,loadDelay:10,compressor:1,min:r.fitTextMin||"inherit",max:r.fitTextMax||"inherit",calcSize:10,lines:1},i=n.parent(),a=n[0],s=a.style,l=window.getComputedStyle(n[0],null),c=n.children().length||o.lines,u="inherit"===o.min?l["font-size"]:o.min,p="inherit"===o.max?l["font-size"]:o.max,d=l["line-height"],g=l.display;let f;function m(){const e=o.calcSize*c/a.offsetWidth/c;return Math.max(Math.min(function(e){const t=parseFloat(getComputedStyle(i[0]).paddingLeft),n=parseFloat(getComputedStyle(i[0]).paddingRight);return(i[0].offsetWidth-(t+n))*e*o.compressor}(e),parseFloat(p)),parseFloat(u))}function h(){f&&e.cancel(f),f=e((function(){a.offsetHeight*a.offsetWidth!=0&&(s.fontSize=o.calcSize+"px",s.lineHeight="1",s.display="inline-block",s.fontSize=m()+"px",s.lineHeight=d,s.display=g)}),o.loadDelay)}t.$watch((function(){return[i[0].offsetWidth,n[0].offsetWidth].join("_")}),(function(){h()})),$(window).on("resize",o.debounce((function(){t.$apply(h)}),o.delay)),t.$on("$destroy",(function(){f&&e.cancel(f),$(window).off("resize")}))}}}angular.module("graphdb.framework.core.directives.fittext",[]).directive("fitText",n),n.$inject=["$timeout"]},148:function(e,t){function n(){return{transformToTrig:function(e){let t="";const n={};for(let t=0;t<e.length;t++){const r=e[t];if(void 0===r.context?r.context="":r.context=_.trim(r.context),angular.isUndefined(n[r.context])){const e=[];e.push(r),n[r.context]=e}else n[r.context].push(r)}const r=Object.keys(n);for(let e=0;e<r.length;e++){const o=r[e];t+=""===o?"\n{":"\n<"+o+"> {";const i=n[o];for(let e=0;e<i.length;e++){const n=i[e];t+="\n\t<"+n.subject+"> <"+n.predicate+"> ";let r=n.object.value;"uri"===n.object.type?t+="<"+r+"> .":r.toString().includes('"')?("'"===r[0]&&(r='"'+r.slice(1,r.length)),r[r.length-1]&&(r=r.slice(0,-1)+'"'),t+="'''"+r+"'''"+(n.object.datatype?"^^<"+n.object.datatype+">":n.object.lang?"@"+n.object.lang:"")+" ."):t+='"""'+r+'"""'+(n.object.datatype?"^^<"+n.object.datatype+">":n.object.lang?"@"+n.object.lang:"")+" ."}t+="\n}"}return t},buildStatements:function(e,t){const n=[];if(!_.isEmpty(e.data)){const r=e.data[t],o=Object.keys(r);for(let e=0;e<o.length;e++){const i=o[e],a=r[i];for(let e=0;e<a.length;e++){const r=a[e];for(let e=0;e<r.graphs.length;e++){let o=r.graphs[e];"http://www.ontotext.com/explicit"===o&&(o=""),r.lang&&(r.datatype=""),r.datatype||(r.datatype=""),n.push({subject:t,predicate:i,object:{value:r.value,type:r.type,datatype:r.datatype,lang:r.lang},context:o})}}}}return n},getDatatypeOptions:function(){return[{value:"",label:"string"},{value:"http://www.w3.org/2001/XMLSchema#boolean",label:"boolean"},{value:"http://www.w3.org/2001/XMLSchema#decimal",label:"decimal"},{value:"http://www.w3.org/2001/XMLSchema#integer",label:"integer"},{value:"http://www.w3.org/2001/XMLSchema#double",label:"double"},{value:"http://www.w3.org/2001/XMLSchema#float",label:"float"},{value:"http://www.w3.org/2001/XMLSchema#date",label:"date"},{value:"http://www.w3.org/2001/XMLSchema#time",label:"time"},{value:"http://www.w3.org/2001/XMLSchema#dateTime",label:"date time"},{value:"http://www.w3.org/2001/XMLSchema#byte",label:"byte"},{value:"http://www.w3.org/2001/XMLSchema#short",label:"short"},{value:"http://www.w3.org/2001/XMLSchema#int",label:"int"},{value:"http://www.w3.org/2001/XMLSchema#long",label:"long"},{value:"http://www.w3.org/2001/XMLSchema#unsignedByte",label:"unsigned byte"},{value:"http://www.w3.org/2001/XMLSchema#unsignedShort",label:"unsigned short"},{value:"http://www.w3.org/2001/XMLSchema#unsignedInt",label:"unsigned int"},{value:"http://www.w3.org/2001/XMLSchema#unsignedLong",label:"unsigned long"},{value:"http://www.w3.org/2001/XMLSchema#positoveInteger",label:"positive integer"},{value:"http://www.w3.org/2001/XMLSchema#nonNegativeInteger",label:"non-negative integer"},{value:"http://www.w3.org/2001/XMLSchema#negativeInteger",label:"negative integer"},{value:"http://www.w3.org/2001/XMLSchema#nonPositiveInteger",label:"non-positive integer"},{value:"http://www.w3.org/2001/XMLSchema#gYear",label:"gYear"},{value:"http://www.w3.org/2001/XMLSchema#gMonth",label:"gMonth"},{value:"http://www.w3.org/2001/XMLSchema#gDay",label:"gDay"},{value:"http://www.w3.org/2001/XMLSchema#gYearMonth",label:"gYearMonth"},{value:"http://www.w3.org/2001/XMLSchema#gMonthDay",label:"gMonthDay"},{value:"http://www.w3.org/2001/XMLSchema#duration",label:"duration"},{value:"http://www.w3.org/2001/XMLSchema#hexBinary",label:"hex binary"},{value:"http://www.w3.org/2001/XMLSchema#base64Binary",label:"base64 binary"}]}}}angular.module("graphdb.framework.explore.services",[]).factory("StatementsService",n),n.$inject=[]},149:function(e,t,n){"use strict";n.r(t);n(87),n(108);var r=n(422),o=n(0),i=n(109),a=n(74),s=n(110),l=n(62),c=n(14),u=n(501),p=n(77);function d(e,t,n,o,d,g,f,m,h,w,x,v,y,b){let S;e.ContextTypes=a.ContextTypes,e.contextTypes=a.ContextType.getAllType(),e.currentContextTypeId=a.ContextTypes.EXPLICIT.id,e.roles=[s.RoleType.SUBJECT,s.RoleType.PREDICATE,s.RoleType.OBJECT,s.RoleType.CONTEXT,s.RoleType.ALL],e.resourceInfo=void 0,e.isLoading=!1,e.fileTypes=w,e.toggleSameAs=()=>{e.resourceInfo.sameAs=!e.resourceInfo.sameAs,e.exploreResource()},e.getActiveRepository=()=>d.getActiveRepository(),e.isTripleResource=()=>!!e.resourceInfo.triple,e.encodeURIComponent=e=>encodeURIComponent(e),e.getRdfStarLocalNames=e=>{let t=e.slice();return e.replace(/[<>]+/g,"").split(" ").forEach(e=>{t=t.replace(e,f.getLocalName(e))}),t},e.getLocalName=e=>f.getLocalName(e);e.loadResource=()=>{b.getResourceDetails(e.resourceInfo.uri,e.resourceInfo.triple,e.resourceInfo.context).success(t=>{e.resourceInfo.details=t,e.resourceInfo.context=e.resourceInfo.details.context,"object"!==e.resourceInfo.uri&&(e.resourceInfo.details.encodeURI=encodeURIComponent(e.resourceInfo.details.uri))}).error(e=>n.error(v.instant("explore.error.resource.details",{data:getError(e)}))),e.exploreResource()},e.isContextAvailable=()=>null!==e.resourceInfo.context&&"http://rdf4j.org/schema/rdf4j#SHACLShapeGraph"===e.resourceInfo.context,e.goToGraphsViz=()=>{t.path("graphs-visualizations").search("uri",e.resourceInfo.uri)},e.exploreResource=()=>{I(!0),null!=o.context&&(e.resourceInfo.context=o.context),t.search("role",e.resourceInfo.role),t.replace(),T()},e.downloadExport=t=>{b.getGraph(e.resourceInfo,t.type).then(e=>{t.type.indexOf("json")>-1&&(e=JSON.stringify(e));const n=navigator.userAgent.toLowerCase();if(-1!==n.indexOf("safari")&&-1===n.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const n=new Blob([e],{type:t.type});Object(r.saveAs)(n,"statements"+t.extension)}}).catch(e=>{n.error(getError(e),v.instant("common.error"))}).finally(()=>{I(!1)})},e.openJSONLDExportSettings=function(t){g.open({templateUrl:"js/angular/core/components/export-settings-modal/exportSettingsModal.html",controller:p.ExportSettingsCtrl,size:"lg",scope:e}).result.then((function(n){e.downloadJSONLDExport(t,n.link,n.currentMode)}))},e.downloadJSONLDExport=function(t,o,i){b.getGraph(e.resourceInfo,t.type,o).then((async function(e){if("JSON"===t.name&&(e=JSON.stringify(e)),"JSON-LD"===t.name)switch(i.name){case"expanded":e=await u.expand(e),e=JSON.stringify(e);break;case"flattened":e=await u.flatten(e,o),e=JSON.stringify(e);break;case"compacted":e=await u.compact(e,o),e=JSON.stringify(e);break;case"context":e=await u.context(e,o),e=JSON.stringify(e);break;case"frame":e=await u.frame(e,o),e=JSON.stringify(e);break;case"framed":e=await u.compact(e,o),e=JSON.stringify(e)}const n=navigator.userAgent.toLowerCase();if(-1!==n.indexOf("safari")&&-1===n.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const n=new Blob([e],{type:t.type});Object(r.saveAs)(n,"statements"+t.extension)}})).catch((function(e){const t=getError(e);n.error(t,v.instant("common.error"))}))},e.changeRole=t=>{e.resourceInfo.role=t,e.resourceInfo.role===s.RoleType.CONTEXT&&(e.resourceInfo.contextType=a.ContextTypes.EXPLICIT),e.exploreResource()},e.changeInference=t=>{e.resourceInfo.contextType=a.ContextType.getContextType(t),e.exploreResource()},e.copyToClipboardResult=e=>{m.openCopyToClipboardModal(e)};const R=()=>{var n;e.resourceInfo||(e.resourceInfo=new i.ResourceInfo,n=e.resourceInfo,o.prefix&&o.localName&&S[o.prefix]?n.uri=S[o.prefix]+o.localName:t.search().uri?n.uri=t.search().uri+(t.hash()?"#"+t.hash():""):t.search().triple?n.triple=t.search().triple+(t.hash()?"#"+t.hash():""):n.uri=t.absUrl(),n.uri=n.uri&&n.uri.replace(/<|>/g,""),null!=o.context&&(e.resourceInfo.context=o.context),e.resourceInfo.role=t.search().role?t.search().role:s.RoleType.SUBJECT)},I=t=>{e.isLoading=!!t},C=()=>({showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showResultInfo:!0,downloadAsOn:!1,showQueryButton:!1,componentId:"resource-view-component",prefixes:S,maxPersistentResponseSize:0,render:l.RenderingMode.YASR,showYasqeActionButtons:!1,yasqeActionButtons:c.DISABLE_YASQE_BUTTONS_CONFIGURATION}),T=()=>{b.getGraph(e.resourceInfo).then(t=>{((t={})=>{const n={};angular.extend(n,e.yasguiConfig||C(),t),e.yasguiConfig=n})({sparqlResponse:t})}).catch(e=>{n.error(v.instant("explore.error.resource",{data:getError(e)}))}).finally(()=>{I(!1)})},$=t=>{e.resourceInfo.contextType=t.appSettings.DEFAULT_INFERENCE&&!e.resourceInfo.role===s.RoleType.CONTEXT?a.ContextTypes.ALL:a.ContextTypes.EXPLICIT,e.resourceInfo.sameAs=t.appSettings.DEFAULT_INFERENCE&&t.appSettings.DEFAULT_SAMEAS};e.$on("$destroy",()=>{L.forEach(e=>e())});const L=[];L.push(e.$watch((function(){return e.getActiveRepositoryObject()}),(function(t){t&&Promise.all([x.getPrincipal(),d.getPrefixes(d.getActiveRepository())]).then(([t,n])=>{R(),$(t),S=n,e.loadResource()}).catch(e=>{n.error(v.instant("get.namespaces.error.msg",{error:getError(e)}))})})))}function g(e,t,n,r,i,a,s,l,c,u,p,d){function g(){l.checkAutocompleteStatus().success((function(t){if(!t){const e=Object(o.decodeHTML)(d.instant("explore.autocomplete.warning.msg"));s.warning("",`<div class="autocomplete-toast"><a href="autocomplete">${e}</a></div>`,{allowHtml:!0})}e.autocompleteEnabled=t})).error((function(){s.error(d.instant("explore.error.autocomplete"))}))}function f(){p.getNamespaces(r.getActiveRepository()).success((function(t){e.namespaces=t.results.bindings.map((function(e){return{prefix:e.prefix.value,uri:e.namespace.value}})),e.loader=!1})).error((function(t){const n=getError(t);s.error(n,d.instant("common.error")),e.loader=!1}))}function m(e){const t=e.indexOf("<")>=0&&e.lastIndexOf(">")===e.length-1,n=-1===e.indexOf("<")&&-1===e.lastIndexOf(">"),r=/^<?[http|urn].*>?$/.test(e)&&(t||n);let o=!1;if(r)if(e.indexOf("http")>=0){const t=e.indexOf("//");o=t>4&&e.substring(t+2).length>0}else e.indexOf("urn")>=0&&(o=e.substring(4).length>0);return r&&o}let h,w;function x(t){function r(t){a((function(){e.form&&(e.form.$dirty=t)}))}t||(t=document.getElementById("resources_finder_value").value),t&&m(t)?(r(!1),n.path("resource").search("uri",t)):(r(!0),t&&s.error(d.instant("explore.error.invalid.input")))}e.submit=x,e.getAutocompleteSuggestions=function(t){if(!/<|>/.test(t)&&":"===t.slice(-1)){const n=c.getNamespaceUriForPrefix(e.namespaces,t.slice(0,-1));w=n!==w?n:w,w&&$("#resources_finder_value").val(w)}let n;if(e.autocompleteEnabled){const e=t.replace(w,w+";");n=l.getAutocompleteSuggestions(e)}else n=i.when(e.autocompleteEnabled);return n},e.inputChangedFn=function(){h=document.getElementById("resources_finder_value").value,e.form.$dirty=!(h&&m(h))},e.selectedUriCallback=function(t){e.selectedUri={name:t.title},x(e.selectedUri.name)},e.selectedUri={name:""},e.autocompleteEnabled=!1,angular.isDefined(u.search)&&a((function(){$("#resources_finder_value").val(u.search),$(".search-button").click()}),500),e.getActiveRepository()&&(g(),f()),e.$on("repositoryIsSet",(function(){g(),f()}))}function f(e,t,n,r,o,i,a,s,l,c,u){e.uriParam=n.search().uri,e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newResource=!1,e.datatypeOptions=l.getDatatypeOptions(),e.activeRepository=function(){return o.getActiveRepository()},e.getClassInstancesDetails=function(){c.getNamespaces(e.activeRepository()).success((function(t){e.namespaces=t.results.bindings.map((function(e){return{prefix:e.prefix.value,uri:e.namespace.value}})),e.loader=!1})).error((function(t){const n=getError(t);r.error(n,u.instant("common.error")),e.loader=!1})),s.getDetails(e.uriParam).success((function(t){e.details=t,e.details.encodeURI=encodeURIComponent(e.details.uri)})).error((function(e){r.error(u.instant("explore.error.resource.details",{data:getError(e)}))})),s.getGraph(e.uriParam).then((function(t){const n=l.buildStatements(t,e.uriParam);e.statements=n,e.newResource=!n.length}))},e.addStatement=function(){e.newRowPredicate.$setSubmitted(),e.newRowObject.$setSubmitted(),e.newRowContext.$setSubmitted(),e.newRowPredicate.$valid&&e.newRowObject.$valid&&e.newRowContext.$valid&&(e.statements.push(_.cloneDeep(e.newRow)),e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newRowPredicate.$setPristine(),e.newRowPredicate.$setUntouched(),e.newRowObject.$setPristine(),e.newRowObject.$setUntouched(),e.newRowContext.$setPristine(),e.newRowContext.$setUntouched())},e.removeStatement=function(t){e.statements.splice(t,1)},e.getLocalName=function(e){return s.getLocalName(e)},e.checkValid=function(e){if(!angular.isUndefined(e))return!0;return u.instant("explore.validation")},e.validEditRow=function(){return e.rowform.$valid},e.viewTrig=function(){i.open({templateUrl:"js/angular/explore/templates/viewTrig.html",controller:"ViewTrigCtrl",size:"lg",resolve:{data:function(){return l.transformToTrig(e.statements)}}})},e.save=function(){const o=e.newResource?"POST":"PUT";t({method:o,url:"rest/resource?uri="+encodeURIComponent(e.uriParam),headers:{"Content-Type":"application/x-trig"},data:l.transformToTrig(e.statements)}).success((function(){r.success(u.instant("explore.resource.saved"));const t=a((function(){n.path("resource").search("uri",e.uriParam)}),500);e.$on("$destroy",(function(){a.cancel(t)}))})).error((function(e){r.error(getError(e))}))},e.$watch((function(){return o.getActiveRepository()}),(function(){e.activeRepository()&&e.getClassInstancesDetails()})),e.validateUri=function(t){let n=!0;const r=t||"";if(-1===r.indexOf(":"))n=!1;else{const t=r.substring(0,r.indexOf(":"));if(""===s.getNamespaceUriForPrefix(e.namespaces,t)){!1===/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/.test(r)&&(n=!1);const e=r.match(/\//g);(void 0===e||e.length<3)&&(n=!1)}else{r.substring(r.indexOf(":")+1).trim().length<1&&(n=!1)}}return n}}function m(e,t,n){e.trig=n,e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.explore.controllers",["ngCookies","ngRoute","ui.bootstrap","toastr","graphdb.framework.core","graphdb.framework.core.services.repositories","graphdb.framework.explore.services","graphdb.workbench.utils.filetypes","graphdb.framework.rest.explore.rest.service"]).controller("FindResourceCtrl",g).controller("ExploreCtrl",d).controller("EditResourceCtrl",f).controller("ViewTrigCtrl",m),d.$inject=["$scope","$location","toastr","$routeParams","$repositories","$uibModal","ClassInstanceDetailsService","ModalService","RDF4JRepositoriesRestService","FileTypes","$jwtAuth","$translate","$q","ExploreRestService"],g.$inject=["$scope","$http","$location","$repositories","$q","$timeout","toastr","AutocompleteRestService","ClassInstanceDetailsService","$routeParams","RDF4JRepositoriesRestService","$translate"],f.$inject=["$scope","$http","$location","toastr","$repositories","$uibModal","$timeout","ClassInstanceDetailsService","StatementsService","RDF4JRepositoriesRestService","$translate"],m.$inject=["$scope","$uibModalInstance","data"]},150:function(e,t,n){"use strict";n.r(t);n(27);angular.module("graphdb.framework.explore.directives",["graphdb.framework.utils.uriutils"]).directive("uri",["UriUtils",function(e){return{require:"ngModel",link:function(t,n,r,o){o.$parsers.unshift((function(t){if(!angular.isUndefined(t)&&t.length>0){const n=e.validateRdfUri(t);return o.$setValidity("searchStr",n),n?t:void 0}return o.$setValidity("searchStr",!0),t})),o.$formatters.unshift((function(t){return angular.isUndefined(t)||o.$setValidity("searchStr",e.validateRdfUri),t}))}}}])},223:function(e,t,n){"use strict";n.r(t);n(7),n(24),n(148),n(149),n(150),n(509),n(656),n(141),n(82);angular.module("graphdb.framework.explore",["ngRoute","toastr","xeditable","angucomplete-alt-onto","graphdb.framework.explore.services","graphdb.framework.explore.controllers","graphdb.framework.explore.directives","graphdb.framework.core.directives.fittext","graphdb.framework.core.directives.yasgui-component"])},506:function(e,t){},62:function(e,t,n){"use strict";n.r(t),n.d(t,"RenderingMode",(function(){return r}));const r={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},656:function(e,t){
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[17,45,96,100,102,162,176,177,179,215,234],{108:function(e,t){angular.module("graphdb.framework.rest.explore.rest.service",[]).factory("ExploreRestService",n),n.$inject=["$http"];function n(e){return{getResourceDetails:(t,n,r,o)=>e.get("rest/explore/details",{params:{uri:t,triple:n,context:r},headers:{Accept:o||"application/json"}}),getGraph:(t,n,r)=>e.get("rest/explore/graph",{params:{uri:t.uri,triple:t.triple,inference:t.contextType.id,role:t.role,bnodes:t.blanks,sameAs:t.sameAs,context:t.context},headers:{Accept:n||"application/x-graphdb-table-results+json",Link:r?"<"+r+">":""}}).then(e=>e.data)}}},109:function(e,t,n){"use strict";n.r(t),n.d(t,"ResourceInfo",(function(){return i}));var r=n(88),o=n(74);class i{constructor(){this.role="subject",this.uri=void 0,this.triple=void 0,this.context=void 0,this.contextType=o.ContextTypes.EXPLICIT,this.sameAs=!0,this.details=new r.ResourceDetails,this.blanks=!0}}},110:function(e,t,n){"use strict";n.r(t),n.d(t,"RoleType",(function(){return r}));const r={SUBJECT:"subject",PREDICATE:"predicate",OBJECT:"object",CONTEXT:"context",ALL:"all"}},141:function(e,t){function n(e){return{restrict:"A",scope:{min:"=",max:"="},link:function(t,n,r){const o={debounce:_.debounce,delay:100,loadDelay:10,compressor:1,min:r.fitTextMin||"inherit",max:r.fitTextMax||"inherit",calcSize:10,lines:1},i=n.parent(),a=n[0],s=a.style,l=window.getComputedStyle(n[0],null),c=n.children().length||o.lines,u="inherit"===o.min?l["font-size"]:o.min,p="inherit"===o.max?l["font-size"]:o.max,d=l["line-height"],g=l.display;let f;function m(){const e=o.calcSize*c/a.offsetWidth/c;return Math.max(Math.min(function(e){const t=parseFloat(getComputedStyle(i[0]).paddingLeft),n=parseFloat(getComputedStyle(i[0]).paddingRight);return(i[0].offsetWidth-(t+n))*e*o.compressor}(e),parseFloat(p)),parseFloat(u))}function h(){f&&e.cancel(f),f=e((function(){a.offsetHeight*a.offsetWidth!=0&&(s.fontSize=o.calcSize+"px",s.lineHeight="1",s.display="inline-block",s.fontSize=m()+"px",s.lineHeight=d,s.display=g)}),o.loadDelay)}t.$watch((function(){return[i[0].offsetWidth,n[0].offsetWidth].join("_")}),(function(){h()})),$(window).on("resize",o.debounce((function(){t.$apply(h)}),o.delay)),t.$on("$destroy",(function(){f&&e.cancel(f),$(window).off("resize")}))}}}angular.module("graphdb.framework.core.directives.fittext",[]).directive("fitText",n),n.$inject=["$timeout"]},148:function(e,t){function n(){return{transformToTrig:function(e){let t="";const n={};for(let t=0;t<e.length;t++){const r=e[t];if(void 0===r.context?r.context="":r.context=_.trim(r.context),angular.isUndefined(n[r.context])){const e=[];e.push(r),n[r.context]=e}else n[r.context].push(r)}const r=Object.keys(n);for(let e=0;e<r.length;e++){const o=r[e];t+=""===o?"\n{":"\n<"+o+"> {";const i=n[o];for(let e=0;e<i.length;e++){const n=i[e];t+="\n\t<"+n.subject+"> <"+n.predicate+"> ";let r=n.object.value;"uri"===n.object.type?t+="<"+r+"> .":r.toString().includes('"')?("'"===r[0]&&(r='"'+r.slice(1,r.length)),r[r.length-1]&&(r=r.slice(0,-1)+'"'),t+="'''"+r+"'''"+(n.object.datatype?"^^<"+n.object.datatype+">":n.object.lang?"@"+n.object.lang:"")+" ."):t+='"""'+r+'"""'+(n.object.datatype?"^^<"+n.object.datatype+">":n.object.lang?"@"+n.object.lang:"")+" ."}t+="\n}"}return t},buildStatements:function(e,t){const n=[];if(!_.isEmpty(e.data)){const r=e.data[t],o=Object.keys(r);for(let e=0;e<o.length;e++){const i=o[e],a=r[i];for(let e=0;e<a.length;e++){const r=a[e];for(let e=0;e<r.graphs.length;e++){let o=r.graphs[e];"http://www.ontotext.com/explicit"===o&&(o=""),r.lang&&(r.datatype=""),r.datatype||(r.datatype=""),n.push({subject:t,predicate:i,object:{value:r.value,type:r.type,datatype:r.datatype,lang:r.lang},context:o})}}}}return n},getDatatypeOptions:function(){return[{value:"",label:"string"},{value:"http://www.w3.org/2001/XMLSchema#boolean",label:"boolean"},{value:"http://www.w3.org/2001/XMLSchema#decimal",label:"decimal"},{value:"http://www.w3.org/2001/XMLSchema#integer",label:"integer"},{value:"http://www.w3.org/2001/XMLSchema#double",label:"double"},{value:"http://www.w3.org/2001/XMLSchema#float",label:"float"},{value:"http://www.w3.org/2001/XMLSchema#date",label:"date"},{value:"http://www.w3.org/2001/XMLSchema#time",label:"time"},{value:"http://www.w3.org/2001/XMLSchema#dateTime",label:"date time"},{value:"http://www.w3.org/2001/XMLSchema#byte",label:"byte"},{value:"http://www.w3.org/2001/XMLSchema#short",label:"short"},{value:"http://www.w3.org/2001/XMLSchema#int",label:"int"},{value:"http://www.w3.org/2001/XMLSchema#long",label:"long"},{value:"http://www.w3.org/2001/XMLSchema#unsignedByte",label:"unsigned byte"},{value:"http://www.w3.org/2001/XMLSchema#unsignedShort",label:"unsigned short"},{value:"http://www.w3.org/2001/XMLSchema#unsignedInt",label:"unsigned int"},{value:"http://www.w3.org/2001/XMLSchema#unsignedLong",label:"unsigned long"},{value:"http://www.w3.org/2001/XMLSchema#positoveInteger",label:"positive integer"},{value:"http://www.w3.org/2001/XMLSchema#nonNegativeInteger",label:"non-negative integer"},{value:"http://www.w3.org/2001/XMLSchema#negativeInteger",label:"negative integer"},{value:"http://www.w3.org/2001/XMLSchema#nonPositiveInteger",label:"non-positive integer"},{value:"http://www.w3.org/2001/XMLSchema#gYear",label:"gYear"},{value:"http://www.w3.org/2001/XMLSchema#gMonth",label:"gMonth"},{value:"http://www.w3.org/2001/XMLSchema#gDay",label:"gDay"},{value:"http://www.w3.org/2001/XMLSchema#gYearMonth",label:"gYearMonth"},{value:"http://www.w3.org/2001/XMLSchema#gMonthDay",label:"gMonthDay"},{value:"http://www.w3.org/2001/XMLSchema#duration",label:"duration"},{value:"http://www.w3.org/2001/XMLSchema#hexBinary",label:"hex binary"},{value:"http://www.w3.org/2001/XMLSchema#base64Binary",label:"base64 binary"}]}}}angular.module("graphdb.framework.explore.services",[]).factory("StatementsService",n),n.$inject=[]},149:function(e,t,n){"use strict";n.r(t);n(87),n(108);var r=n(422),o=n(0),i=n(109),a=n(74),s=n(110),l=n(62),c=n(14),u=n(501),p=n(77);function d(e,t,n,o,d,g,f,m,h,w,x,v,y,b){let S;e.ContextTypes=a.ContextTypes,e.contextTypes=a.ContextType.getAllType(),e.currentContextTypeId=a.ContextTypes.EXPLICIT.id,e.roles=[s.RoleType.SUBJECT,s.RoleType.PREDICATE,s.RoleType.OBJECT,s.RoleType.CONTEXT,s.RoleType.ALL],e.resourceInfo=void 0,e.isLoading=!1,e.fileTypes=w,e.toggleSameAs=()=>{e.resourceInfo.sameAs=!e.resourceInfo.sameAs,e.exploreResource()},e.getActiveRepository=()=>d.getActiveRepository(),e.isTripleResource=()=>!!e.resourceInfo.triple,e.encodeURIComponent=e=>encodeURIComponent(e),e.getRdfStarLocalNames=e=>{let t=e.slice();return e.replace(/[<>]+/g,"").split(" ").forEach(e=>{t=t.replace(e,f.getLocalName(e))}),t},e.getLocalName=e=>f.getLocalName(e);e.loadResource=()=>{b.getResourceDetails(e.resourceInfo.uri,e.resourceInfo.triple,e.resourceInfo.context).success(t=>{e.resourceInfo.details=t,e.resourceInfo.context=e.resourceInfo.details.context,"object"!==e.resourceInfo.uri&&(e.resourceInfo.details.encodeURI=encodeURIComponent(e.resourceInfo.details.uri))}).error(e=>n.error(v.instant("explore.error.resource.details",{data:getError(e)}))),e.exploreResource()},e.isContextAvailable=()=>null!==e.resourceInfo.context&&"http://rdf4j.org/schema/rdf4j#SHACLShapeGraph"===e.resourceInfo.context,e.goToGraphsViz=()=>{t.path("graphs-visualizations").search("uri",e.resourceInfo.uri)},e.exploreResource=()=>{I(!0),null!=o.context&&(e.resourceInfo.context=o.context),t.search("role",e.resourceInfo.role),t.replace(),T()},e.downloadExport=t=>{b.getGraph(e.resourceInfo,t.type).then(e=>{t.type.indexOf("json")>-1&&(e=JSON.stringify(e));const n=navigator.userAgent.toLowerCase();if(-1!==n.indexOf("safari")&&-1===n.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const n=new Blob([e],{type:t.type});Object(r.saveAs)(n,"statements"+t.extension)}}).catch(e=>{n.error(getError(e),v.instant("common.error"))}).finally(()=>{I(!1)})},e.openJSONLDExportSettings=function(t){g.open({templateUrl:"js/angular/core/components/export-settings-modal/exportSettingsModal.html",controller:p.ExportSettingsCtrl,size:"lg",scope:e,resolve:{format:function(){return t.name}}}).result.then((function(n){e.downloadJSONLDExport(t,n.link,n.currentMode)}))},e.downloadJSONLDExport=function(t,o,i){b.getGraph(e.resourceInfo,t.type,o).then((async function(e){if("JSON"===t.name&&(e=JSON.stringify(e)),"JSON-LD"===t.name)switch(i.name){case"expanded":e=await u.expand(e),e=JSON.stringify(e);break;case"flattened":e=await u.flatten(e,o),e=JSON.stringify(e);break;case"compacted":e=await u.compact(e,o),e=JSON.stringify(e);break;case"context":e=await u.context(e,o),e=JSON.stringify(e);break;case"frame":e=await u.frame(e,o),e=JSON.stringify(e);break;case"framed":e=await u.compact(e,o),e=JSON.stringify(e)}const n=navigator.userAgent.toLowerCase();if(-1!==n.indexOf("safari")&&-1===n.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const n=new Blob([e],{type:t.type});Object(r.saveAs)(n,"statements"+t.extension)}})).catch((function(e){const t=getError(e);n.error(t,v.instant("common.error"))}))},e.changeRole=t=>{e.resourceInfo.role=t,e.resourceInfo.role===s.RoleType.CONTEXT&&(e.resourceInfo.contextType=a.ContextTypes.EXPLICIT),e.exploreResource()},e.changeInference=t=>{e.resourceInfo.contextType=a.ContextType.getContextType(t),e.exploreResource()},e.copyToClipboardResult=e=>{m.openCopyToClipboardModal(e)};const R=()=>{var n;e.resourceInfo||(e.resourceInfo=new i.ResourceInfo,n=e.resourceInfo,o.prefix&&o.localName&&S[o.prefix]?n.uri=S[o.prefix]+o.localName:t.search().uri?n.uri=t.search().uri+(t.hash()?"#"+t.hash():""):t.search().triple?n.triple=t.search().triple+(t.hash()?"#"+t.hash():""):n.uri=t.absUrl(),n.uri=n.uri&&n.uri.replace(/<|>/g,""),null!=o.context&&(e.resourceInfo.context=o.context),e.resourceInfo.role=t.search().role?t.search().role:s.RoleType.SUBJECT)},I=t=>{e.isLoading=!!t},C=()=>({showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showResultInfo:!0,downloadAsOn:!1,showQueryButton:!1,componentId:"resource-view-component",prefixes:S,maxPersistentResponseSize:0,render:l.RenderingMode.YASR,showYasqeActionButtons:!1,yasqeActionButtons:c.DISABLE_YASQE_BUTTONS_CONFIGURATION}),T=()=>{b.getGraph(e.resourceInfo).then(t=>{((t={})=>{const n={};angular.extend(n,e.yasguiConfig||C(),t),e.yasguiConfig=n})({sparqlResponse:t})}).catch(e=>{n.error(v.instant("explore.error.resource",{data:getError(e)}))}).finally(()=>{I(!1)})},$=t=>{e.resourceInfo.contextType=t.appSettings.DEFAULT_INFERENCE&&!e.resourceInfo.role===s.RoleType.CONTEXT?a.ContextTypes.ALL:a.ContextTypes.EXPLICIT,e.resourceInfo.sameAs=t.appSettings.DEFAULT_INFERENCE&&t.appSettings.DEFAULT_SAMEAS};e.$on("$destroy",()=>{L.forEach(e=>e())});const L=[];L.push(e.$watch((function(){return e.getActiveRepositoryObject()}),(function(t){t&&Promise.all([x.getPrincipal(),d.getPrefixes(d.getActiveRepository())]).then(([t,n])=>{R(),$(t),S=n,e.loadResource()}).catch(e=>{n.error(v.instant("get.namespaces.error.msg",{error:getError(e)}))})})))}function g(e,t,n,r,i,a,s,l,c,u,p,d){function g(){l.checkAutocompleteStatus().success((function(t){if(!t){const e=Object(o.decodeHTML)(d.instant("explore.autocomplete.warning.msg"));s.warning("",`<div class="autocomplete-toast"><a href="autocomplete">${e}</a></div>`,{allowHtml:!0})}e.autocompleteEnabled=t})).error((function(){s.error(d.instant("explore.error.autocomplete"))}))}function f(){p.getNamespaces(r.getActiveRepository()).success((function(t){e.namespaces=t.results.bindings.map((function(e){return{prefix:e.prefix.value,uri:e.namespace.value}})),e.loader=!1})).error((function(t){const n=getError(t);s.error(n,d.instant("common.error")),e.loader=!1}))}function m(e){const t=e.indexOf("<")>=0&&e.lastIndexOf(">")===e.length-1,n=-1===e.indexOf("<")&&-1===e.lastIndexOf(">"),r=/^<?[http|urn].*>?$/.test(e)&&(t||n);let o=!1;if(r)if(e.indexOf("http")>=0){const t=e.indexOf("//");o=t>4&&e.substring(t+2).length>0}else e.indexOf("urn")>=0&&(o=e.substring(4).length>0);return r&&o}let h,w;function x(t){function r(t){a((function(){e.form&&(e.form.$dirty=t)}))}t||(t=document.getElementById("resources_finder_value").value),t&&m(t)?(r(!1),n.path("resource").search("uri",t)):(r(!0),t&&s.error(d.instant("explore.error.invalid.input")))}e.submit=x,e.getAutocompleteSuggestions=function(t){if(!/<|>/.test(t)&&":"===t.slice(-1)){const n=c.getNamespaceUriForPrefix(e.namespaces,t.slice(0,-1));w=n!==w?n:w,w&&$("#resources_finder_value").val(w)}let n;if(e.autocompleteEnabled){const e=t.replace(w,w+";");n=l.getAutocompleteSuggestions(e)}else n=i.when(e.autocompleteEnabled);return n},e.inputChangedFn=function(){h=document.getElementById("resources_finder_value").value,e.form.$dirty=!(h&&m(h))},e.selectedUriCallback=function(t){e.selectedUri={name:t.title},x(e.selectedUri.name)},e.selectedUri={name:""},e.autocompleteEnabled=!1,angular.isDefined(u.search)&&a((function(){$("#resources_finder_value").val(u.search),$(".search-button").click()}),500),e.getActiveRepository()&&(g(),f()),e.$on("repositoryIsSet",(function(){g(),f()}))}function f(e,t,n,r,o,i,a,s,l,c,u){e.uriParam=n.search().uri,e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newResource=!1,e.datatypeOptions=l.getDatatypeOptions(),e.activeRepository=function(){return o.getActiveRepository()},e.getClassInstancesDetails=function(){c.getNamespaces(e.activeRepository()).success((function(t){e.namespaces=t.results.bindings.map((function(e){return{prefix:e.prefix.value,uri:e.namespace.value}})),e.loader=!1})).error((function(t){const n=getError(t);r.error(n,u.instant("common.error")),e.loader=!1})),s.getDetails(e.uriParam).success((function(t){e.details=t,e.details.encodeURI=encodeURIComponent(e.details.uri)})).error((function(e){r.error(u.instant("explore.error.resource.details",{data:getError(e)}))})),s.getGraph(e.uriParam).then((function(t){const n=l.buildStatements(t,e.uriParam);e.statements=n,e.newResource=!n.length}))},e.addStatement=function(){e.newRowPredicate.$setSubmitted(),e.newRowObject.$setSubmitted(),e.newRowContext.$setSubmitted(),e.newRowPredicate.$valid&&e.newRowObject.$valid&&e.newRowContext.$valid&&(e.statements.push(_.cloneDeep(e.newRow)),e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newRowPredicate.$setPristine(),e.newRowPredicate.$setUntouched(),e.newRowObject.$setPristine(),e.newRowObject.$setUntouched(),e.newRowContext.$setPristine(),e.newRowContext.$setUntouched())},e.removeStatement=function(t){e.statements.splice(t,1)},e.getLocalName=function(e){return s.getLocalName(e)},e.checkValid=function(e){if(!angular.isUndefined(e))return!0;return u.instant("explore.validation")},e.validEditRow=function(){return e.rowform.$valid},e.viewTrig=function(){i.open({templateUrl:"js/angular/explore/templates/viewTrig.html",controller:"ViewTrigCtrl",size:"lg",resolve:{data:function(){return l.transformToTrig(e.statements)}}})},e.save=function(){const o=e.newResource?"POST":"PUT";t({method:o,url:"rest/resource?uri="+encodeURIComponent(e.uriParam),headers:{"Content-Type":"application/x-trig"},data:l.transformToTrig(e.statements)}).success((function(){r.success(u.instant("explore.resource.saved"));const t=a((function(){n.path("resource").search("uri",e.uriParam)}),500);e.$on("$destroy",(function(){a.cancel(t)}))})).error((function(e){r.error(getError(e))}))},e.$watch((function(){return o.getActiveRepository()}),(function(){e.activeRepository()&&e.getClassInstancesDetails()})),e.validateUri=function(t){let n=!0;const r=t||"";if(-1===r.indexOf(":"))n=!1;else{const t=r.substring(0,r.indexOf(":"));if(""===s.getNamespaceUriForPrefix(e.namespaces,t)){!1===/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/.test(r)&&(n=!1);const e=r.match(/\//g);(void 0===e||e.length<3)&&(n=!1)}else{r.substring(r.indexOf(":")+1).trim().length<1&&(n=!1)}}return n}}function m(e,t,n){e.trig=n,e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.explore.controllers",["ngCookies","ngRoute","ui.bootstrap","toastr","graphdb.framework.core","graphdb.framework.core.services.repositories","graphdb.framework.explore.services","graphdb.workbench.utils.filetypes","graphdb.framework.rest.explore.rest.service"]).controller("FindResourceCtrl",g).controller("ExploreCtrl",d).controller("EditResourceCtrl",f).controller("ViewTrigCtrl",m),d.$inject=["$scope","$location","toastr","$routeParams","$repositories","$uibModal","ClassInstanceDetailsService","ModalService","RDF4JRepositoriesRestService","FileTypes","$jwtAuth","$translate","$q","ExploreRestService"],g.$inject=["$scope","$http","$location","$repositories","$q","$timeout","toastr","AutocompleteRestService","ClassInstanceDetailsService","$routeParams","RDF4JRepositoriesRestService","$translate"],f.$inject=["$scope","$http","$location","toastr","$repositories","$uibModal","$timeout","ClassInstanceDetailsService","StatementsService","RDF4JRepositoriesRestService","$translate"],m.$inject=["$scope","$uibModalInstance","data"]},150:function(e,t,n){"use strict";n.r(t);n(27);angular.module("graphdb.framework.explore.directives",["graphdb.framework.utils.uriutils"]).directive("uri",["UriUtils",function(e){return{require:"ngModel",link:function(t,n,r,o){o.$parsers.unshift((function(t){if(!angular.isUndefined(t)&&t.length>0){const n=e.validateRdfUri(t);return o.$setValidity("searchStr",n),n?t:void 0}return o.$setValidity("searchStr",!0),t})),o.$formatters.unshift((function(t){return angular.isUndefined(t)||o.$setValidity("searchStr",e.validateRdfUri),t}))}}}])},223:function(e,t,n){"use strict";n.r(t);n(7),n(24),n(148),n(149),n(150),n(509),n(656),n(141),n(82);angular.module("graphdb.framework.explore",["ngRoute","toastr","xeditable","angucomplete-alt-onto","graphdb.framework.explore.services","graphdb.framework.explore.controllers","graphdb.framework.explore.directives","graphdb.framework.core.directives.fittext","graphdb.framework.core.directives.yasgui-component"])},506:function(e,t){},62:function(e,t,n){"use strict";n.r(t),n.d(t,"RenderingMode",(function(){return r}));const r={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},656:function(e,t){
|
|
2
2
|
/*! Copyright (c) 2014 Hidenari Nozaki and contributors | Licensed under the MIT license */
|
|
3
|
-
!function(e,t){"use strict";!function(e){e.module("angucomplete-alt-onto",[]).directive("angucompleteAltOnto",["$q","$parse","$http","$sce","$timeout","$templateCache","$interpolate","$rootScope",function(e,t,n,r,o,i,a,s){function l(t,i,a,s){var l,c,u,p,d,g,f=i.find("input"),m=3,h=null,w="autocomplete-required",x=null,v=null,y=i[0].querySelector(".angucomplete-dropdown"),b=!1,S=null;function R(e,n){e&&("object"==typeof e?(t.uri=$(e),T({originalObject:e})):"string"==typeof e&&e.length>0?t.uri=e:console&&console.error&&console.error("Tried to set "+(n?"initial":"")+" value of angucomplete to",e,"which is an invalid value"),E(!0))}function I(e){S=null,t.hideResults(e),document.body.removeEventListener("click",I)}function C(e){return e.which?e.which:e.keyCode}function T(e){"function"==typeof t.selectedObject?t.selectedObject(e):t.selectedObject=e,E(!!e)}function $(e){return t.titleField.split(",").map((function(t){return L(e,t)})).join(" ")}function L(e,t){var n,r;if(t){n=t.split("."),r=e;for(var o=0;o<n.length;o++)r=r[n[o]]}else r=e;return r}function O(e,n){var o,i,a;if(a=new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),e)return e.match&&e.replace||(e=e.toString()),o=(i=e.match(a))?e.replace(a,'<span class="'+t.matchClass+'">'+i[0]+"</span>"):e,r.trustAsHtml(o)}function E(e){t.notEmpty=e,x=t.uri,t.fieldRequired&&s&&t.inputName&&s[t.inputName].$setValidity(w,e)}function j(e){!t.overrideSuggestions||t.selectedObject&&t.selectedObject.originalObject===t.uri||(e&&e.preventDefault(),o.cancel(h),k(),T({originalObject:t.uri}),t.clearSelected&&(t.uri=null),P())}function D(){return i[0].querySelectorAll(".angucomplete-row")[t.currentIndex]}function A(e){y.scrollTop=y.scrollTop+e}function U(){var e=t.results[t.currentIndex];if(t.matchClass){var n=$(e.originalObject);n=n.replace(/<b>|<\/b>/g,""),f.val(n)}else f.val(e.title)}function M(e){return function(n,r,o,i){r||o||i||!n.data||(n=n.data),t.searching=!1,B(L(c(n),t.remoteUrlDataField),e)}}function N(e,n,r,o){0!==n&&-1!==n&&(n||r||o||(n=e.status),t.remoteUrlErrorCallback?t.remoteUrlErrorCallback(e,n,r,o):console&&console.error&&console.error("http error"))}function k(){v&&v.resolve()}function F(r){var o={},i=t.remoteUrl+encodeuriComponent(r);t.remoteUrlRequestFormatter&&(o={params:t.remoteUrlRequestFormatter(r)},i=t.remoteUrl),t.remoteUrlRequestWithCredentials&&(o.withCredentials=!0),k(),v=e.defer(),o.timeout=v.promise,n.get(i,o).success(M(r)).error(N)}function X(n){k(),v=e.defer(),t.remoteApiHandler(n,v.promise).then(M(n)).catch(N)}function P(){t.showDropdown=!1,t.results=[],y&&(y.scrollTop=0)}function q(){t.showDropdown=p,t.currentIndex=t.focusFirst?0:-1,t.results=[]}function J(e){!e||e.length<m||(t.localData?t.$apply((function(){var n;n=void 0!==t.localSearch()?t.localSearch()(e):function(e){var n,r,o,i,a=t.searchFields.split(","),s=[];for(void 0!==t.parseInput()&&(e=t.parseInput()(e)),n=0;n<t.localData.length;n++){for(r=!1,o=0;o<a.length;o++)i=L(t.localData[n],a[o])||"",r=r||i.toString().toLowerCase().indexOf(e.toString().toLowerCase())>=0;r&&(s[s.length]=t.localData[n])}return s}(e),t.searching=!1,B(n,e)})):t.remoteApiHandler?X(e):F(e))}function B(e,n){var r,o,i,a,s,l;if(e&&e.length>0)for(t.results=[],r=0;r<e.length;r++)t.titleField&&""!==t.titleField&&(a=s=$(e[r])),o="",t.descriptionField&&(o=l=L(e[r],t.descriptionField)),i="",t.imageField&&(i=L(e[r],t.imageField)),t.matchClass&&(s=O(a,n),l=O(o,n)),t.results[t.results.length]={title:s,description:l,image:i,originalObject:e[r]};else t.results=[];t.autoMatch&&1===t.results.length&&function(e,n,r){if(!r)return!1;for(var o in n)if(n[o].toLowerCase()===r.toLowerCase())return t.selectResult(e),!0;return!1}(t.results[0],{title:a,desc:o||""},t.uri)?t.showDropdown=!1:0!==t.results.length||d?t.showDropdown=!0:t.showDropdown=!1}function _(){t.localData?B(t.localData,""):t.remoteApiHandler?X(""):F("")}i.on("mousedown",(function(e){e.target.id?(S=e.target.id)===t.id+"_dropdown"&&document.body.addEventListener("click",I):S=e.target.className})),t.currentIndex=t.focusFirst?0:null,t.searching=!1,u=t.$watch("initialValue",(function(e){e&&(u(),R(e,!0))})),t.$watch("fieldRequired",(function(e,n){e!==n&&(e?x&&-1!==t.currentIndex?E(!0):E(!1):s[t.inputName].$setValidity(w,!0))})),t.$on("angucomplete-alt:clearInput",(function(e,n){n&&n!==t.id||(t.uri=null,T(),E(!1),P())})),t.$on("angucomplete-alt:changeInput",(function(e,n,r){n&&n===t.id&&R(r)})),t.onFocusHandler=function(){t.focusIn&&t.focusIn(),0!==m||t.uri&&0!==t.uri.length||(t.currentIndex=t.focusFirst?0:t.currentIndex,t.showDropdown=!0,_())},t.hideResults=function(){S&&(S===t.id+"_dropdown"||S.indexOf("angucomplete")>=0)?S=null:(l=o((function(){P(),t.$apply((function(){t.uri&&t.uri.length>0&&f.val(t.uri)}))}),200),k(),t.focusOut&&t.focusOut(),t.overrideSuggestions&&t.uri&&t.uri.length>0&&-1===t.currentIndex&&j())},t.resetHideResults=function(){l&&o.cancel(l)},t.hoverRow=function(e){t.currentIndex=e},t.selectResult=function(e){t.matchClass&&(e.title=$(e.originalObject),"string"==typeof e.title&&(e.title=e.title.replace(/<b>|<\/b>/g,"")),e.description=L(e.originalObject,t.descriptionField)),t.clearSelected?t.uri=null:t.uri=e.title,T(e),P()},t.inputChangeHandler=function(e){return e.length<m?(k(),P()):0===e.length&&0===m&&(t.searching=!1,_()),t.inputChanged&&(e=t.inputChanged(e)),e},t.fieldRequiredClass&&""!==t.fieldRequiredClass&&(w=t.fieldRequiredClass),t.minlength&&""!==t.minlength&&(m=parseInt(t.minlength,10)),t.pause||(t.pause=500),t.clearSelected||(t.clearSelected=!1),t.overrideSuggestions||(t.overrideSuggestions=!1),t.fieldRequired&&s&&(t.initialValue?E(!0):E(!1)),t.inputType=a.type?a.type:"text",t.textSearching=a.textSearching?a.textSearching:"Searching...",t.textNoResults=a.textNoResults?a.textNoResults:"No results found",p="false"!==t.textSearching,d="false"!==t.textNoResults,t.maxlength=a.maxlength?a.maxlength:524288,f.on("keydown",(function(e){var n=C(e),r=null,o=null;13===n&&t.results?(t.currentIndex>=0&&t.currentIndex<t.results.length?(e.preventDefault(),t.selectResult(t.results[t.currentIndex])):(j(e),P()),t.$apply()):40===n&&t.results?(e.preventDefault(),t.currentIndex+1<t.results.length&&t.showDropdown&&(t.$apply((function(){t.currentIndex++,U()})),b&&(r=D(),y.getBoundingClientRect().top+parseInt(getComputedStyle(y).maxHeight,10)<r.getBoundingClientRect().bottom&&A(function(e){var t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}(r))))):38===n&&t.results?(e.preventDefault(),t.currentIndex>=1?(t.$apply((function(){t.currentIndex--,U()})),b&&(o=D().getBoundingClientRect().top-(y.getBoundingClientRect().top+parseInt(getComputedStyle(y).paddingTop,10)))<0&&A(o-1)):0===t.currentIndex&&t.$apply((function(){t.currentIndex=-1,f.val(t.uri)}))):9===n?t.results&&t.results.length>0&&t.showDropdown?-1===t.currentIndex&&t.overrideSuggestions?j():(-1===t.currentIndex&&(t.currentIndex=0),t.selectResult(t.results[t.currentIndex]),t.$digest()):t.uri&&t.uri.length>0&&j():27===n&&e.preventDefault()})),f.on("keyup",(function(e){var n=C(e);if(37!==n&&39!==n)if(38===n||13===n)e.preventDefault();else if(40===n)e.preventDefault(),!t.showDropdown&&t.uri&&t.uri.length>=m&&(q(),t.searching=!0,J(t.uri));else if(27===n)P(),t.$apply((function(){f.val(t.uri)}));else{if(0===m&&!t.uri)return;t.uri&&""!==t.uri?t.uri.length>=m&&(q(),h&&o.cancel(h),t.searching=!0,h=o((function(){J(t.uri)}),t.pause)):t.showDropdown=!1,x&&x!==t.uri&&!t.clearSelected&&t.$apply((function(){T()}))}})),g="remoteUrlResponseFormatter",c=function(e){return t[g]?t[g](e):e},o((function(){var e=getComputedStyle(y);b=e.maxHeight&&"auto"===e.overflowY}))}return i.put("/angucomplete-alt/index.html",'<div class="angucomplete-holder" ng-class="{\'angucomplete-dropdown-visible\': showDropdown}"> <input id="{{id}}_value" name="{{inputName}}" tabindex="{{fieldTabindex}}" ng-class="{\'angucomplete-input-not-empty\': notEmpty}" ng-model="uri" ng-disabled="disableInput" type="{{inputType}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" ng-focus="onFocusHandler()" class="{{inputClass}}" ng-focus="resetHideResults()" ng-blur="hideResults($event)" autocapitalize="off" autocorrect="off" autocomplete="off" ng-change="inputChangeHandler(uri)" style="overflow: hidden; padding-right: .5em;"/> <div id="{{id}}_dropdown" class="angucomplete-dropdown" ng-show="disableSuggestions && showDropdown"> <div class="angucomplete-searching" ng-show="searching" ng-bind="textSearching"></div> <div class="angucomplete-searching" ng-show="!searching && (!results || results.length == 0)" ng-bind="textNoResults"></div> <div class="angucomplete-row" ng-repeat="result in results" ng-click="selectResult(result)" ng-mouseenter="hoverRow($index)" ng-class="{\'angucomplete-selected-row\': $index == currentIndex}"> <div ng-if="imageField" class="angucomplete-image-holder"> <img ng-if="result.image && result.image != \'\'" ng-src="{{result.image}}" class="angucomplete-image"/> <div ng-if="!result.image && result.image != \'\'" class="angucomplete-image-default"></div> </div> <div class="angucomplete-title" ng-if="matchClass" ng-bind-html="result.title"></div> <div class="angucomplete-title" ng-if="!matchClass">{{ result.title }}</div> <div ng-if="matchClass && result.description && result.description != \'\'" class="angucomplete-description" ng-bind-html="result.description"></div> <div ng-if="!matchClass && result.description && result.description != \'\'" class="angucomplete-description">{{result.description}}</div> </div> </div></div>'),{restrict:"EA",require:"^?form",scope:{selectedObject:"=",disableInput:"=",disableSuggestions:"=",initialValue:"=",localData:"=",localSearch:"&",remoteUrlRequestFormatter:"=",remoteUrlRequestWithCredentials:"@",remoteUrlResponseFormatter:"=",remoteUrlErrorCallback:"=",remoteApiHandler:"=",id:"@",type:"@",placeholder:"@",remoteUrl:"@",remoteUrlDataField:"@",titleField:"@",descriptionField:"@",imageField:"@",inputClass:"@",pause:"@",searchFields:"@",minlength:"@",matchClass:"@",clearSelected:"@",overrideSuggestions:"@",fieldRequired:"=",fieldRequiredClass:"@",inputChanged:"=",autoMatch:"@",focusOut:"&",focusIn:"&",fieldTabindex:"@",inputName:"@",focusFirst:"@",parseInput:"&"},templateUrl:function(e,t){return t.templateUrl||"/angucomplete-alt/index.html"},compile:function(e){var t=a.startSymbol(),n=a.endSymbol();if("{{"!==t||"}}"!==n){var r=e.html().replace(/\{\{/g,t).replace(/\}\}/g,n);e.html(r)}return l}}}])}(window.angular)}()},74:function(e,t,n){"use strict";n.r(t),n.d(t,"ContextType",(function(){return r})),n.d(t,"ContextTypes",(function(){return o}));class r{constructor(e,t){this.id=e,this.labelKey=t}static getAllType(){return[o.ALL,o.EXPLICIT,o.IMPLICIT]}static getContextType(e){return this.getAllType().find(t=>t.id===e)}}const o={ALL:new r("all","explore.explicit.implicit"),EXPLICIT:new r("explicit","explore.explicit"),IMPLICIT:new r("implicit","explore.implicit")}},87:function(e,t){angular.module("graphdb.workbench.utils.filetypes",[]).value("FileTypes",[{name:"JSON",type:"application/rdf+json",extension:".json"},{name:"JSON-LD",type:"application/ld+json",extension:".jsonld"},{name:"RDF-XML",type:"application/rdf+xml",extension:".rdf"},{name:"N3",type:"text/rdf+n3",extension:".n3"},{name:"N-Triples",type:"text/plain",extension:".nt"},{name:"N-Quads",type:"text/x-nquads",extension:".nq"},{name:"Turtle",type:"text/turtle",extension:".ttl"},{name:"Turtle*",type:"application/x-turtlestar",extension:".ttls"},{name:"TriX",type:"application/trix",extension:".trix"},{name:"TriG",type:"application/x-trig",extension:".trig"},{name:"TriG*",type:"application/x-trigstar",extension:".trigs"},{name:"Binary RDF",type:"application/x-binary-rdf",extension:".brf"}])},88:function(e,t,n){"use strict";n.r(t),n.d(t,"ResourceDetails",(function(){return r}));class r{constructor(){this.image=void 0,this.uri=void 0,this.label=void 0,this.encodeURI=void 0,this.comment=void 0,this.context=void 0}}}}]);
|
|
3
|
+
!function(e,t){"use strict";!function(e){e.module("angucomplete-alt-onto",[]).directive("angucompleteAltOnto",["$q","$parse","$http","$sce","$timeout","$templateCache","$interpolate","$rootScope",function(e,t,n,r,o,i,a,s){function l(t,i,a,s){var l,c,u,p,d,g,f=i.find("input"),m=3,h=null,w="autocomplete-required",x=null,v=null,y=i[0].querySelector(".angucomplete-dropdown"),b=!1,S=null;function R(e,n){e&&("object"==typeof e?(t.uri=$(e),T({originalObject:e})):"string"==typeof e&&e.length>0?t.uri=e:console&&console.error&&console.error("Tried to set "+(n?"initial":"")+" value of angucomplete to",e,"which is an invalid value"),E(!0))}function I(e){S=null,t.hideResults(e),document.body.removeEventListener("click",I)}function C(e){return e.which?e.which:e.keyCode}function T(e){"function"==typeof t.selectedObject?t.selectedObject(e):t.selectedObject=e,E(!!e)}function $(e){return t.titleField.split(",").map((function(t){return L(e,t)})).join(" ")}function L(e,t){var n,r;if(t){n=t.split("."),r=e;for(var o=0;o<n.length;o++)r=r[n[o]]}else r=e;return r}function O(e,n){var o,i,a;if(a=new RegExp(n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),e)return e.match&&e.replace||(e=e.toString()),o=(i=e.match(a))?e.replace(a,'<span class="'+t.matchClass+'">'+i[0]+"</span>"):e,r.trustAsHtml(o)}function E(e){t.notEmpty=e,x=t.uri,t.fieldRequired&&s&&t.inputName&&s[t.inputName].$setValidity(w,e)}function j(e){!t.overrideSuggestions||t.selectedObject&&t.selectedObject.originalObject===t.uri||(e&&e.preventDefault(),o.cancel(h),k(),T({originalObject:t.uri}),t.clearSelected&&(t.uri=null),P())}function D(){return i[0].querySelectorAll(".angucomplete-row")[t.currentIndex]}function A(e){y.scrollTop=y.scrollTop+e}function U(){var e=t.results[t.currentIndex];if(t.matchClass){var n=$(e.originalObject);n=n.replace(/<b>|<\/b>/g,""),f.val(n)}else f.val(e.title)}function N(e){return function(n,r,o,i){r||o||i||!n.data||(n=n.data),t.searching=!1,B(L(c(n),t.remoteUrlDataField),e)}}function M(e,n,r,o){0!==n&&-1!==n&&(n||r||o||(n=e.status),t.remoteUrlErrorCallback?t.remoteUrlErrorCallback(e,n,r,o):console&&console.error&&console.error("http error"))}function k(){v&&v.resolve()}function F(r){var o={},i=t.remoteUrl+encodeuriComponent(r);t.remoteUrlRequestFormatter&&(o={params:t.remoteUrlRequestFormatter(r)},i=t.remoteUrl),t.remoteUrlRequestWithCredentials&&(o.withCredentials=!0),k(),v=e.defer(),o.timeout=v.promise,n.get(i,o).success(N(r)).error(M)}function X(n){k(),v=e.defer(),t.remoteApiHandler(n,v.promise).then(N(n)).catch(M)}function P(){t.showDropdown=!1,t.results=[],y&&(y.scrollTop=0)}function q(){t.showDropdown=p,t.currentIndex=t.focusFirst?0:-1,t.results=[]}function J(e){!e||e.length<m||(t.localData?t.$apply((function(){var n;n=void 0!==t.localSearch()?t.localSearch()(e):function(e){var n,r,o,i,a=t.searchFields.split(","),s=[];for(void 0!==t.parseInput()&&(e=t.parseInput()(e)),n=0;n<t.localData.length;n++){for(r=!1,o=0;o<a.length;o++)i=L(t.localData[n],a[o])||"",r=r||i.toString().toLowerCase().indexOf(e.toString().toLowerCase())>=0;r&&(s[s.length]=t.localData[n])}return s}(e),t.searching=!1,B(n,e)})):t.remoteApiHandler?X(e):F(e))}function B(e,n){var r,o,i,a,s,l;if(e&&e.length>0)for(t.results=[],r=0;r<e.length;r++)t.titleField&&""!==t.titleField&&(a=s=$(e[r])),o="",t.descriptionField&&(o=l=L(e[r],t.descriptionField)),i="",t.imageField&&(i=L(e[r],t.imageField)),t.matchClass&&(s=O(a,n),l=O(o,n)),t.results[t.results.length]={title:s,description:l,image:i,originalObject:e[r]};else t.results=[];t.autoMatch&&1===t.results.length&&function(e,n,r){if(!r)return!1;for(var o in n)if(n[o].toLowerCase()===r.toLowerCase())return t.selectResult(e),!0;return!1}(t.results[0],{title:a,desc:o||""},t.uri)?t.showDropdown=!1:0!==t.results.length||d?t.showDropdown=!0:t.showDropdown=!1}function _(){t.localData?B(t.localData,""):t.remoteApiHandler?X(""):F("")}i.on("mousedown",(function(e){e.target.id?(S=e.target.id)===t.id+"_dropdown"&&document.body.addEventListener("click",I):S=e.target.className})),t.currentIndex=t.focusFirst?0:null,t.searching=!1,u=t.$watch("initialValue",(function(e){e&&(u(),R(e,!0))})),t.$watch("fieldRequired",(function(e,n){e!==n&&(e?x&&-1!==t.currentIndex?E(!0):E(!1):s[t.inputName].$setValidity(w,!0))})),t.$on("angucomplete-alt:clearInput",(function(e,n){n&&n!==t.id||(t.uri=null,T(),E(!1),P())})),t.$on("angucomplete-alt:changeInput",(function(e,n,r){n&&n===t.id&&R(r)})),t.onFocusHandler=function(){t.focusIn&&t.focusIn(),0!==m||t.uri&&0!==t.uri.length||(t.currentIndex=t.focusFirst?0:t.currentIndex,t.showDropdown=!0,_())},t.hideResults=function(){S&&(S===t.id+"_dropdown"||S.indexOf("angucomplete")>=0)?S=null:(l=o((function(){P(),t.$apply((function(){t.uri&&t.uri.length>0&&f.val(t.uri)}))}),200),k(),t.focusOut&&t.focusOut(),t.overrideSuggestions&&t.uri&&t.uri.length>0&&-1===t.currentIndex&&j())},t.resetHideResults=function(){l&&o.cancel(l)},t.hoverRow=function(e){t.currentIndex=e},t.selectResult=function(e){t.matchClass&&(e.title=$(e.originalObject),"string"==typeof e.title&&(e.title=e.title.replace(/<b>|<\/b>/g,"")),e.description=L(e.originalObject,t.descriptionField)),t.clearSelected?t.uri=null:t.uri=e.title,T(e),P()},t.inputChangeHandler=function(e){return e.length<m?(k(),P()):0===e.length&&0===m&&(t.searching=!1,_()),t.inputChanged&&(e=t.inputChanged(e)),e},t.fieldRequiredClass&&""!==t.fieldRequiredClass&&(w=t.fieldRequiredClass),t.minlength&&""!==t.minlength&&(m=parseInt(t.minlength,10)),t.pause||(t.pause=500),t.clearSelected||(t.clearSelected=!1),t.overrideSuggestions||(t.overrideSuggestions=!1),t.fieldRequired&&s&&(t.initialValue?E(!0):E(!1)),t.inputType=a.type?a.type:"text",t.textSearching=a.textSearching?a.textSearching:"Searching...",t.textNoResults=a.textNoResults?a.textNoResults:"No results found",p="false"!==t.textSearching,d="false"!==t.textNoResults,t.maxlength=a.maxlength?a.maxlength:524288,f.on("keydown",(function(e){var n=C(e),r=null,o=null;13===n&&t.results?(t.currentIndex>=0&&t.currentIndex<t.results.length?(e.preventDefault(),t.selectResult(t.results[t.currentIndex])):(j(e),P()),t.$apply()):40===n&&t.results?(e.preventDefault(),t.currentIndex+1<t.results.length&&t.showDropdown&&(t.$apply((function(){t.currentIndex++,U()})),b&&(r=D(),y.getBoundingClientRect().top+parseInt(getComputedStyle(y).maxHeight,10)<r.getBoundingClientRect().bottom&&A(function(e){var t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}(r))))):38===n&&t.results?(e.preventDefault(),t.currentIndex>=1?(t.$apply((function(){t.currentIndex--,U()})),b&&(o=D().getBoundingClientRect().top-(y.getBoundingClientRect().top+parseInt(getComputedStyle(y).paddingTop,10)))<0&&A(o-1)):0===t.currentIndex&&t.$apply((function(){t.currentIndex=-1,f.val(t.uri)}))):9===n?t.results&&t.results.length>0&&t.showDropdown?-1===t.currentIndex&&t.overrideSuggestions?j():(-1===t.currentIndex&&(t.currentIndex=0),t.selectResult(t.results[t.currentIndex]),t.$digest()):t.uri&&t.uri.length>0&&j():27===n&&e.preventDefault()})),f.on("keyup",(function(e){var n=C(e);if(37!==n&&39!==n)if(38===n||13===n)e.preventDefault();else if(40===n)e.preventDefault(),!t.showDropdown&&t.uri&&t.uri.length>=m&&(q(),t.searching=!0,J(t.uri));else if(27===n)P(),t.$apply((function(){f.val(t.uri)}));else{if(0===m&&!t.uri)return;t.uri&&""!==t.uri?t.uri.length>=m&&(q(),h&&o.cancel(h),t.searching=!0,h=o((function(){J(t.uri)}),t.pause)):t.showDropdown=!1,x&&x!==t.uri&&!t.clearSelected&&t.$apply((function(){T()}))}})),g="remoteUrlResponseFormatter",c=function(e){return t[g]?t[g](e):e},o((function(){var e=getComputedStyle(y);b=e.maxHeight&&"auto"===e.overflowY}))}return i.put("/angucomplete-alt/index.html",'<div class="angucomplete-holder" ng-class="{\'angucomplete-dropdown-visible\': showDropdown}"> <input id="{{id}}_value" name="{{inputName}}" tabindex="{{fieldTabindex}}" ng-class="{\'angucomplete-input-not-empty\': notEmpty}" ng-model="uri" ng-disabled="disableInput" type="{{inputType}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" ng-focus="onFocusHandler()" class="{{inputClass}}" ng-focus="resetHideResults()" ng-blur="hideResults($event)" autocapitalize="off" autocorrect="off" autocomplete="off" ng-change="inputChangeHandler(uri)" style="overflow: hidden; padding-right: .5em;"/> <div id="{{id}}_dropdown" class="angucomplete-dropdown" ng-show="disableSuggestions && showDropdown"> <div class="angucomplete-searching" ng-show="searching" ng-bind="textSearching"></div> <div class="angucomplete-searching" ng-show="!searching && (!results || results.length == 0)" ng-bind="textNoResults"></div> <div class="angucomplete-row" ng-repeat="result in results" ng-click="selectResult(result)" ng-mouseenter="hoverRow($index)" ng-class="{\'angucomplete-selected-row\': $index == currentIndex}"> <div ng-if="imageField" class="angucomplete-image-holder"> <img ng-if="result.image && result.image != \'\'" ng-src="{{result.image}}" class="angucomplete-image"/> <div ng-if="!result.image && result.image != \'\'" class="angucomplete-image-default"></div> </div> <div class="angucomplete-title" ng-if="matchClass" ng-bind-html="result.title"></div> <div class="angucomplete-title" ng-if="!matchClass">{{ result.title }}</div> <div ng-if="matchClass && result.description && result.description != \'\'" class="angucomplete-description" ng-bind-html="result.description"></div> <div ng-if="!matchClass && result.description && result.description != \'\'" class="angucomplete-description">{{result.description}}</div> </div> </div></div>'),{restrict:"EA",require:"^?form",scope:{selectedObject:"=",disableInput:"=",disableSuggestions:"=",initialValue:"=",localData:"=",localSearch:"&",remoteUrlRequestFormatter:"=",remoteUrlRequestWithCredentials:"@",remoteUrlResponseFormatter:"=",remoteUrlErrorCallback:"=",remoteApiHandler:"=",id:"@",type:"@",placeholder:"@",remoteUrl:"@",remoteUrlDataField:"@",titleField:"@",descriptionField:"@",imageField:"@",inputClass:"@",pause:"@",searchFields:"@",minlength:"@",matchClass:"@",clearSelected:"@",overrideSuggestions:"@",fieldRequired:"=",fieldRequiredClass:"@",inputChanged:"=",autoMatch:"@",focusOut:"&",focusIn:"&",fieldTabindex:"@",inputName:"@",focusFirst:"@",parseInput:"&"},templateUrl:function(e,t){return t.templateUrl||"/angucomplete-alt/index.html"},compile:function(e){var t=a.startSymbol(),n=a.endSymbol();if("{{"!==t||"}}"!==n){var r=e.html().replace(/\{\{/g,t).replace(/\}\}/g,n);e.html(r)}return l}}}])}(window.angular)}()},74:function(e,t,n){"use strict";n.r(t),n.d(t,"ContextType",(function(){return r})),n.d(t,"ContextTypes",(function(){return o}));class r{constructor(e,t){this.id=e,this.labelKey=t}static getAllType(){return[o.ALL,o.EXPLICIT,o.IMPLICIT]}static getContextType(e){return this.getAllType().find(t=>t.id===e)}}const o={ALL:new r("all","explore.explicit.implicit"),EXPLICIT:new r("explicit","explore.explicit"),IMPLICIT:new r("implicit","explore.implicit")}},87:function(e,t){angular.module("graphdb.workbench.utils.filetypes",[]).value("FileTypes",[{name:"JSON",type:"application/rdf+json",extension:".json"},{name:"JSON-LD",type:"application/ld+json",extension:".jsonld"},{name:"NDJSON-LD",type:"application/x-ld+ndjson",extension:".ndjsonld"},{name:"RDF-XML",type:"application/rdf+xml",extension:".rdf"},{name:"N3",type:"text/rdf+n3",extension:".n3"},{name:"N-Triples",type:"text/plain",extension:".nt"},{name:"N-Quads",type:"text/x-nquads",extension:".nq"},{name:"Turtle",type:"text/turtle",extension:".ttl"},{name:"Turtle*",type:"application/x-turtlestar",extension:".ttls"},{name:"TriX",type:"application/trix",extension:".trix"},{name:"TriG",type:"application/x-trig",extension:".trig"},{name:"TriG*",type:"application/x-trigstar",extension:".trigs"},{name:"Binary RDF",type:"application/x-binary-rdf",extension:".brf"}])},88:function(e,t,n){"use strict";n.r(t),n.d(t,"ResourceDetails",(function(){return r}));class r{constructor(){this.image=void 0,this.uri=void 0,this.label=void 0,this.encodeURI=void 0,this.comment=void 0,this.context=void 0}}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[18,45,95,162,176,177,179,215,234],{108:function(e,t){angular.module("graphdb.framework.rest.explore.rest.service",[]).factory("ExploreRestService",n),n.$inject=["$http"];function n(e){return{getResourceDetails:(t,n,o,r)=>e.get("rest/explore/details",{params:{uri:t,triple:n,context:o},headers:{Accept:r||"application/json"}}),getGraph:(t,n,o)=>e.get("rest/explore/graph",{params:{uri:t.uri,triple:t.triple,inference:t.contextType.id,role:t.role,bnodes:t.blanks,sameAs:t.sameAs,context:t.context},headers:{Accept:n||"application/x-graphdb-table-results+json",Link:o?"<"+o+">":""}}).then(e=>e.data)}}},109:function(e,t,n){"use strict";n.r(t),n.d(t,"ResourceInfo",(function(){return i}));var o=n(88),r=n(74);class i{constructor(){this.role="subject",this.uri=void 0,this.triple=void 0,this.context=void 0,this.contextType=r.ContextTypes.EXPLICIT,this.sameAs=!0,this.details=new o.ResourceDetails,this.blanks=!0}}},110:function(e,t,n){"use strict";n.r(t),n.d(t,"RoleType",(function(){return o}));const o={SUBJECT:"subject",PREDICATE:"predicate",OBJECT:"object",CONTEXT:"context",ALL:"all"}},149:function(e,t,n){"use strict";n.r(t);n(87),n(108);var o=n(422),r=n(0),i=n(109),s=n(74),a=n(110),c=n(62),l=n(14),u=n(501),p=n(77);function d(e,t,n,r,d,f,m,g,x,h,w,y,R,S){let T;e.ContextTypes=s.ContextTypes,e.contextTypes=s.ContextType.getAllType(),e.currentContextTypeId=s.ContextTypes.EXPLICIT.id,e.roles=[a.RoleType.SUBJECT,a.RoleType.PREDICATE,a.RoleType.OBJECT,a.RoleType.CONTEXT,a.RoleType.ALL],e.resourceInfo=void 0,e.isLoading=!1,e.fileTypes=h,e.toggleSameAs=()=>{e.resourceInfo.sameAs=!e.resourceInfo.sameAs,e.exploreResource()},e.getActiveRepository=()=>d.getActiveRepository(),e.isTripleResource=()=>!!e.resourceInfo.triple,e.encodeURIComponent=e=>encodeURIComponent(e),e.getRdfStarLocalNames=e=>{let t=e.slice();return e.replace(/[<>]+/g,"").split(" ").forEach(e=>{t=t.replace(e,m.getLocalName(e))}),t},e.getLocalName=e=>m.getLocalName(e);e.loadResource=()=>{S.getResourceDetails(e.resourceInfo.uri,e.resourceInfo.triple,e.resourceInfo.context).success(t=>{e.resourceInfo.details=t,e.resourceInfo.context=e.resourceInfo.details.context,"object"!==e.resourceInfo.uri&&(e.resourceInfo.details.encodeURI=encodeURIComponent(e.resourceInfo.details.uri))}).error(e=>n.error(y.instant("explore.error.resource.details",{data:getError(e)}))),e.exploreResource()},e.isContextAvailable=()=>null!==e.resourceInfo.context&&"http://rdf4j.org/schema/rdf4j#SHACLShapeGraph"===e.resourceInfo.context,e.goToGraphsViz=()=>{t.path("graphs-visualizations").search("uri",e.resourceInfo.uri)},e.exploreResource=()=>{I(!0),null!=r.context&&(e.resourceInfo.context=r.context),t.search("role",e.resourceInfo.role),t.replace(),O()},e.downloadExport=t=>{S.getGraph(e.resourceInfo,t.type).then(e=>{t.type.indexOf("json")>-1&&(e=JSON.stringify(e));const n=navigator.userAgent.toLowerCase();if(-1!==n.indexOf("safari")&&-1===n.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const n=new Blob([e],{type:t.type});Object(o.saveAs)(n,"statements"+t.extension)}}).catch(e=>{n.error(getError(e),y.instant("common.error"))}).finally(()=>{I(!1)})},e.openJSONLDExportSettings=function(t){f.open({templateUrl:"js/angular/core/components/export-settings-modal/exportSettingsModal.html",controller:p.ExportSettingsCtrl,size:"lg",scope:e,resolve:{format:function(){return t.name}}}).result.then((function(n){e.downloadJSONLDExport(t,n.link,n.currentMode)}))},e.downloadJSONLDExport=function(t,r,i){S.getGraph(e.resourceInfo,t.type,r).then((async function(e){if("JSON"===t.name&&(e=JSON.stringify(e)),"JSON-LD"===t.name)switch(i.name){case"expanded":e=await u.expand(e),e=JSON.stringify(e);break;case"flattened":e=await u.flatten(e,r),e=JSON.stringify(e);break;case"compacted":e=await u.compact(e,r),e=JSON.stringify(e);break;case"context":e=await u.context(e,r),e=JSON.stringify(e);break;case"frame":e=await u.frame(e,r),e=JSON.stringify(e);break;case"framed":e=await u.compact(e,r),e=JSON.stringify(e)}const n=navigator.userAgent.toLowerCase();if(-1!==n.indexOf("safari")&&-1===n.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const n=new Blob([e],{type:t.type});Object(o.saveAs)(n,"statements"+t.extension)}})).catch((function(e){const t=getError(e);n.error(t,y.instant("common.error"))}))},e.changeRole=t=>{e.resourceInfo.role=t,e.resourceInfo.role===a.RoleType.CONTEXT&&(e.resourceInfo.contextType=s.ContextTypes.EXPLICIT),e.exploreResource()},e.changeInference=t=>{e.resourceInfo.contextType=s.ContextType.getContextType(t),e.exploreResource()},e.copyToClipboardResult=e=>{g.openCopyToClipboardModal(e)};const v=()=>{var n;e.resourceInfo||(e.resourceInfo=new i.ResourceInfo,n=e.resourceInfo,r.prefix&&r.localName&&T[r.prefix]?n.uri=T[r.prefix]+r.localName:t.search().uri?n.uri=t.search().uri+(t.hash()?"#"+t.hash():""):t.search().triple?n.triple=t.search().triple+(t.hash()?"#"+t.hash():""):n.uri=t.absUrl(),n.uri=n.uri&&n.uri.replace(/<|>/g,""),null!=r.context&&(e.resourceInfo.context=r.context),e.resourceInfo.role=t.search().role?t.search().role:a.RoleType.SUBJECT)},I=t=>{e.isLoading=!!t},b=()=>({showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showResultInfo:!0,downloadAsOn:!1,showQueryButton:!1,componentId:"resource-view-component",prefixes:T,maxPersistentResponseSize:0,render:c.RenderingMode.YASR,showYasqeActionButtons:!1,yasqeActionButtons:l.DISABLE_YASQE_BUTTONS_CONFIGURATION}),O=()=>{S.getGraph(e.resourceInfo).then(t=>{((t={})=>{const n={};angular.extend(n,e.yasguiConfig||b(),t),e.yasguiConfig=n})({sparqlResponse:t})}).catch(e=>{n.error(y.instant("explore.error.resource",{data:getError(e)}))}).finally(()=>{I(!1)})},E=t=>{e.resourceInfo.contextType=t.appSettings.DEFAULT_INFERENCE&&!e.resourceInfo.role===a.RoleType.CONTEXT?s.ContextTypes.ALL:s.ContextTypes.EXPLICIT,e.resourceInfo.sameAs=t.appSettings.DEFAULT_INFERENCE&&t.appSettings.DEFAULT_SAMEAS};e.$on("$destroy",()=>{N.forEach(e=>e())});const N=[];N.push(e.$watch((function(){return e.getActiveRepositoryObject()}),(function(t){t&&Promise.all([w.getPrincipal(),d.getPrefixes(d.getActiveRepository())]).then(([t,n])=>{v(),E(t),T=n,e.loadResource()}).catch(e=>{n.error(y.instant("get.namespaces.error.msg",{error:getError(e)}))})})))}function f(e,t,n,o,i,s,a,c,l,u,p,d){function f(){c.checkAutocompleteStatus().success((function(t){if(!t){const e=Object(r.decodeHTML)(d.instant("explore.autocomplete.warning.msg"));a.warning("",`<div class="autocomplete-toast"><a href="autocomplete">${e}</a></div>`,{allowHtml:!0})}e.autocompleteEnabled=t})).error((function(){a.error(d.instant("explore.error.autocomplete"))}))}function m(){p.getNamespaces(o.getActiveRepository()).success((function(t){e.namespaces=t.results.bindings.map((function(e){return{prefix:e.prefix.value,uri:e.namespace.value}})),e.loader=!1})).error((function(t){const n=getError(t);a.error(n,d.instant("common.error")),e.loader=!1}))}function g(e){const t=e.indexOf("<")>=0&&e.lastIndexOf(">")===e.length-1,n=-1===e.indexOf("<")&&-1===e.lastIndexOf(">"),o=/^<?[http|urn].*>?$/.test(e)&&(t||n);let r=!1;if(o)if(e.indexOf("http")>=0){const t=e.indexOf("//");r=t>4&&e.substring(t+2).length>0}else e.indexOf("urn")>=0&&(r=e.substring(4).length>0);return o&&r}let x,h;function w(t){function o(t){s((function(){e.form&&(e.form.$dirty=t)}))}t||(t=document.getElementById("resources_finder_value").value),t&&g(t)?(o(!1),n.path("resource").search("uri",t)):(o(!0),t&&a.error(d.instant("explore.error.invalid.input")))}e.submit=w,e.getAutocompleteSuggestions=function(t){if(!/<|>/.test(t)&&":"===t.slice(-1)){const n=l.getNamespaceUriForPrefix(e.namespaces,t.slice(0,-1));h=n!==h?n:h,h&&$("#resources_finder_value").val(h)}let n;if(e.autocompleteEnabled){const e=t.replace(h,h+";");n=c.getAutocompleteSuggestions(e)}else n=i.when(e.autocompleteEnabled);return n},e.inputChangedFn=function(){x=document.getElementById("resources_finder_value").value,e.form.$dirty=!(x&&g(x))},e.selectedUriCallback=function(t){e.selectedUri={name:t.title},w(e.selectedUri.name)},e.selectedUri={name:""},e.autocompleteEnabled=!1,angular.isDefined(u.search)&&s((function(){$("#resources_finder_value").val(u.search),$(".search-button").click()}),500),e.getActiveRepository()&&(f(),m()),e.$on("repositoryIsSet",(function(){f(),m()}))}function m(e,t,n,o,r,i,s,a,c,l,u){e.uriParam=n.search().uri,e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newResource=!1,e.datatypeOptions=c.getDatatypeOptions(),e.activeRepository=function(){return r.getActiveRepository()},e.getClassInstancesDetails=function(){l.getNamespaces(e.activeRepository()).success((function(t){e.namespaces=t.results.bindings.map((function(e){return{prefix:e.prefix.value,uri:e.namespace.value}})),e.loader=!1})).error((function(t){const n=getError(t);o.error(n,u.instant("common.error")),e.loader=!1})),a.getDetails(e.uriParam).success((function(t){e.details=t,e.details.encodeURI=encodeURIComponent(e.details.uri)})).error((function(e){o.error(u.instant("explore.error.resource.details",{data:getError(e)}))})),a.getGraph(e.uriParam).then((function(t){const n=c.buildStatements(t,e.uriParam);e.statements=n,e.newResource=!n.length}))},e.addStatement=function(){e.newRowPredicate.$setSubmitted(),e.newRowObject.$setSubmitted(),e.newRowContext.$setSubmitted(),e.newRowPredicate.$valid&&e.newRowObject.$valid&&e.newRowContext.$valid&&(e.statements.push(_.cloneDeep(e.newRow)),e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newRowPredicate.$setPristine(),e.newRowPredicate.$setUntouched(),e.newRowObject.$setPristine(),e.newRowObject.$setUntouched(),e.newRowContext.$setPristine(),e.newRowContext.$setUntouched())},e.removeStatement=function(t){e.statements.splice(t,1)},e.getLocalName=function(e){return a.getLocalName(e)},e.checkValid=function(e){if(!angular.isUndefined(e))return!0;return u.instant("explore.validation")},e.validEditRow=function(){return e.rowform.$valid},e.viewTrig=function(){i.open({templateUrl:"js/angular/explore/templates/viewTrig.html",controller:"ViewTrigCtrl",size:"lg",resolve:{data:function(){return c.transformToTrig(e.statements)}}})},e.save=function(){const r=e.newResource?"POST":"PUT";t({method:r,url:"rest/resource?uri="+encodeURIComponent(e.uriParam),headers:{"Content-Type":"application/x-trig"},data:c.transformToTrig(e.statements)}).success((function(){o.success(u.instant("explore.resource.saved"));const t=s((function(){n.path("resource").search("uri",e.uriParam)}),500);e.$on("$destroy",(function(){s.cancel(t)}))})).error((function(e){o.error(getError(e))}))},e.$watch((function(){return r.getActiveRepository()}),(function(){e.activeRepository()&&e.getClassInstancesDetails()})),e.validateUri=function(t){let n=!0;const o=t||"";if(-1===o.indexOf(":"))n=!1;else{const t=o.substring(0,o.indexOf(":"));if(""===a.getNamespaceUriForPrefix(e.namespaces,t)){!1===/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/.test(o)&&(n=!1);const e=o.match(/\//g);(void 0===e||e.length<3)&&(n=!1)}else{o.substring(o.indexOf(":")+1).trim().length<1&&(n=!1)}}return n}}function g(e,t,n){e.trig=n,e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.explore.controllers",["ngCookies","ngRoute","ui.bootstrap","toastr","graphdb.framework.core","graphdb.framework.core.services.repositories","graphdb.framework.explore.services","graphdb.workbench.utils.filetypes","graphdb.framework.rest.explore.rest.service"]).controller("FindResourceCtrl",f).controller("ExploreCtrl",d).controller("EditResourceCtrl",m).controller("ViewTrigCtrl",g),d.$inject=["$scope","$location","toastr","$routeParams","$repositories","$uibModal","ClassInstanceDetailsService","ModalService","RDF4JRepositoriesRestService","FileTypes","$jwtAuth","$translate","$q","ExploreRestService"],f.$inject=["$scope","$http","$location","$repositories","$q","$timeout","toastr","AutocompleteRestService","ClassInstanceDetailsService","$routeParams","RDF4JRepositoriesRestService","$translate"],m.$inject=["$scope","$http","$location","toastr","$repositories","$uibModal","$timeout","ClassInstanceDetailsService","StatementsService","RDF4JRepositoriesRestService","$translate"],g.$inject=["$scope","$uibModalInstance","data"]},421:function(e,t){(function(t){e.exports=t}).call(this,{})},422:function(e,t,n){var o,r=r||function(e){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,n=function(){return e.URL||e.webkitURL||e},o=t.createElementNS("http://www.w3.org/1999/xhtml","a"),r=e.webkitRequestFileSystem,i=e.requestFileSystem||r||e.mozRequestFileSystem,s=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},a=0,c=function(t){var o=function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()};e.chrome?o():setTimeout(o,500)},l=function(e,t,n){for(var o=(t=[].concat(t)).length;o--;){var r=e["on"+t[o]];if("function"==typeof r)try{r.call(e,n||e)}catch(e){s(e)}}},u=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e},p=function(t,s){t=u(t);var p,d,f,m=this,g=t.type,x=!1,h=function(){l(m,"writestart progress write writeend".split(" "))},w=function(){(!x&&p||(p=n().createObjectURL(t)),d)?d.location.href=p:null==e.open(p,"_blank")&&"undefined"!=typeof safari&&(e.location.href=p);m.readyState=m.DONE,h(),c(p)},y=function(e){return function(){if(m.readyState!==m.DONE)return e.apply(this,arguments)}},R={create:!0,exclusive:!1};if(m.readyState=m.INIT,s||(s="download"),o)return p=n().createObjectURL(t),o.href=p,o.download=s,void setTimeout((function(){var e,t;e=o,t=new MouseEvent("click"),e.dispatchEvent(t),h(),c(p),m.readyState=m.DONE}));e.chrome&&g&&"application/octet-stream"!==g&&(f=t.slice||t.webkitSlice,t=f.call(t,0,t.size,"application/octet-stream"),x=!0),r&&"download"!==s&&(s+=".download"),("application/octet-stream"===g||r)&&(d=e),i?(a+=t.size,i(e.TEMPORARY,a,y((function(e){e.root.getDirectory("saved",R,y((function(e){var n=function(){e.getFile(s,R,y((function(e){e.createWriter(y((function(n){n.onwriteend=function(t){d.location.href=e.toURL(),m.readyState=m.DONE,l(m,"writeend",t),c(e)},n.onerror=function(){var e=n.error;e.code!==e.ABORT_ERR&&w()},"writestart progress write abort".split(" ").forEach((function(e){n["on"+e]=m["on"+e]})),n.write(t),m.abort=function(){n.abort(),m.readyState=m.DONE},m.readyState=m.WRITING})),w)})),w)};e.getFile(s,{create:!1},y((function(e){e.remove(),n()})),y((function(e){e.code===e.NOT_FOUND_ERR?n():w()})))})),w)})),w)):w()},d=p.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t){return navigator.msSaveOrOpenBlob(u(e),t)}:(d.abort=function(){this.readyState=this.DONE,l(this,"abort")},d.readyState=d.INIT=0,d.WRITING=1,d.DONE=2,d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null,function(e,t){return new p(e,t)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);
|
|
2
|
+
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */e.exports?e.exports.saveAs=r:null!==n(432)&&null!=n(421)&&(void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o))},432:function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},506:function(e,t){},62:function(e,t,n){"use strict";n.r(t),n.d(t,"RenderingMode",(function(){return o}));const o={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},74:function(e,t,n){"use strict";n.r(t),n.d(t,"ContextType",(function(){return o})),n.d(t,"ContextTypes",(function(){return r}));class o{constructor(e,t){this.id=e,this.labelKey=t}static getAllType(){return[r.ALL,r.EXPLICIT,r.IMPLICIT]}static getContextType(e){return this.getAllType().find(t=>t.id===e)}}const r={ALL:new o("all","explore.explicit.implicit"),EXPLICIT:new o("explicit","explore.explicit"),IMPLICIT:new o("implicit","explore.implicit")}},77:function(e,t,n){"use strict";function o(e,t,n,o,r){e.JSONLDModes=[{name:"framed",link:"http://www.w3.org/ns/json-ld#framed"},{name:"expanded",link:"http://www.w3.org/ns/json-ld#expanded"},{name:"flattened",link:"http://www.w3.org/ns/json-ld#flattened"},{name:"compacted",link:"http://www.w3.org/ns/json-ld#compacted"}],e.JSONLDModesNames=e.JSONLDModes.reduce((function(e,t){return e[t.name]=t.name,e}),{}),e.JSONLDFramedModes=[e.JSONLDModesNames.framed],e.JSONLDContextModes=[e.JSONLDModesNames.compacted,e.JSONLDModesNames.flattened],e.defaultMode=e.JSONLDModes.find(e=>"expanded"===e.name),e.currentMode=e.defaultMode,e.link=null,e.fileFormat=r.toLowerCase(),e.setJSONLDSettingsToLocalStorage=function(e,t,r){n.set(o.JSONLD_EXPORT_SETTINGS,JSON.stringify({jsonldFormName:e,jsonldFormLink:t,jsonldLink:r}))},e.cancel=function(){t.dismiss()},e.reset=function(){e.currentMode=e.defaultMode,e.link="",e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link)},e.clearLinkInput=function(){e.link="",e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link)},e.exportJsonLD=function(){e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link),t.close({currentMode:e.currentMode,link:e.link})};!function(){const t=n.get(o.JSONLD_EXPORT_SETTINGS);t&&(e.currentMode=e.JSONLDModes.find(e=>e.name===t.jsonldFormName),e.link=t.jsonldLink)}()}n.r(t),n.d(t,"ExportSettingsCtrl",(function(){return o})),angular.module("graphdb.framework.core.components.export-settings-modal",["graphdb.framework.utils.localstorageadapter"]).controller("ExportSettingsCtrl",o),o.$inject=["$scope","$uibModalInstance","LocalStorageAdapter","LSKeys","format"]},87:function(e,t){angular.module("graphdb.workbench.utils.filetypes",[]).value("FileTypes",[{name:"JSON",type:"application/rdf+json",extension:".json"},{name:"JSON-LD",type:"application/ld+json",extension:".jsonld"},{name:"NDJSON-LD",type:"application/x-ld+ndjson",extension:".ndjsonld"},{name:"RDF-XML",type:"application/rdf+xml",extension:".rdf"},{name:"N3",type:"text/rdf+n3",extension:".n3"},{name:"N-Triples",type:"text/plain",extension:".nt"},{name:"N-Quads",type:"text/x-nquads",extension:".nq"},{name:"Turtle",type:"text/turtle",extension:".ttl"},{name:"Turtle*",type:"application/x-turtlestar",extension:".ttls"},{name:"TriX",type:"application/trix",extension:".trix"},{name:"TriG",type:"application/x-trig",extension:".trig"},{name:"TriG*",type:"application/x-trigstar",extension:".trigs"},{name:"Binary RDF",type:"application/x-binary-rdf",extension:".brf"}])},88:function(e,t,n){"use strict";n.r(t),n.d(t,"ResourceDetails",(function(){return o}));class o{constructor(){this.image=void 0,this.uri=void 0,this.label=void 0,this.encodeURI=void 0,this.comment=void 0,this.context=void 0}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[185],{120:function(e,t,T){"use strict";T.r(t),T.d(t,"SimilarityResultType",(function(){return s}));const s={TERM_RESULT:"termResult",DOCUMENT_RESULT:"documentResult",ENTITY_RESULT:"entityResult",isResultDocumentType:e=>s.DOCUMENT_RESULT===e,isResultTermType:e=>s.TERM_RESULT===e}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[2,20,29,60,66,80,95,99,149,150,151,152,153,154,155,158,159,160,161,163,164,171,191,193,195,236],{100:function(e,t,n){"use strict";n.r(t),n.d(t,"CountQueryResponseEvent",(function(){return o}));var r=n(69);class o{constructor(e){this.TYPE=e.TYPE,this.response=e.payload.response}hasResponse(){return this.response&&this.response.body}getResponseBody(){if(this.hasResponse())return this.response.body}isResponseNumber(){return!!this.hasResponse()&&Object(r.isNumber)(this.response.body)}isResponseArray(){return!!this.hasResponse()&&Array.isArray(this.response.body)}getBindings(){if(this.hasResponse())return this.response.body.results.bindings}hasBindingResponse(){return!!this.hasResponse()&&this.response.body.results.bindings[0]}setTotalElements(e){this.response.body.totalElements=e}}},101:function(e,t,n){"use strict";n.r(t),n.d(t,"CountQueryRequestEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.query=e.payload.query,this.queryMode=e.payload.queryMode,this.queryType=e.payload.queryType,this.pageSize=e.payload.pageSize,this.request=e.payload.request}setPageSize(e){this.request._data.pageSize=e}setPageNumber(e){this.request._data.pageNumber=e}setCount(e){this.request._data.count=e}}},102:function(e,t,n){"use strict";n.r(t),n.d(t,"DownloadAsEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.contentType=e.payload.value,this.pluginName=e.payload.pluginName,this.query=e.payload.query,this.infer=e.payload.infer,this.sameAs=e.payload.sameAs}}},103:function(e,t,n){"use strict";n.r(t),n.d(t,"NotificationMessageEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.message=e.payload.message,this.code=e.payload.code,this.messageType=e.payload.messageType}}},104:function(e,t,n){"use strict";n.r(t),n.d(t,"QueryExecutedEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.duration=e.payload.duration,this.tabId=e.payload.tabId}}},105:function(e,t,n){"use strict";n.r(t),n.d(t,"SaveQueryOpened",(function(){return r}));class r{constructor(e){this.tab=e.payload.tab}getTab(){return this.tab}}},106:function(e,t,n){"use strict";n.r(t),n.d(t,"RequestAbortedEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.request=e.payload.request,this.queryMode=e.payload.queryMode}getQueryTrackAlias(){if(this.request)return this.request.header["X-GraphDB-Track-Alias"]}getRepository(){if(this.request){const e=this.request.url;return e.substring(e.lastIndexOf("/")+1)}}}},107:function(e,t,n){"use strict";n.r(t),n.d(t,"YasrPluginName",(function(){return r}));const r={EXTENDED_TABLE:"extended_table",RAW_RESPONSE:"response",TABLE:"table"}},142:function(e,t){function n(e){const t=["en","fr"];let n;return{getTranslations:()=>(n||(n={},t.forEach(t=>n[t]=e.getTranslationTable(t))),n)}}angular.module("graphdb.framework.core.services.translation-service",[]).service("TranslationService",n),n.$inject=["$translate"]},143:function(e,t,n){"use strict";n.r(t);var r=n(83);angular.module("graphdb.framework.sparql-editor.share-query.service",[]).factory("ShareQueryLinkService",(function(){return{createShareSavedQueryLink:function(t,n){let o=`${e()}?${r.RouteConstants.savedQueryName}=${encodeURIComponent(t)}`;null!=n&&(o+=`&${r.RouteConstants.savedQueryOwner}=${encodeURIComponent(n)}`);return o},createShareQueryLink:function(t){return e()+"?"+$.param({name:t.name,query:t.body,infer:t.inference||!0,sameAs:t.sameAs||!0})}};function e(){return[location.protocol,"//",location.host,location.pathname].join("")}}))},144:function(e,t,n){"use strict";n.r(t),n.d(t,"toEventData",(function(){return y})),n.d(t,"toYasguiOutputModel",(function(){return g})),n.d(t,"downloadAsFile",(function(){return E}));var r=n(98),o=n(78),s=n(99),a=n(100),i=n(101),u=n(102),c=n(103),d=n(104),l=n(105),p=n(106);const y=e=>new r.EventData(e.detail.TYPE,e.detail.payload),g=e=>{const t=y(e);switch(t.TYPE){case o.EventDataType.DOWNLOAD_AS:return new u.DownloadAsEvent(t);case o.EventDataType.NOTIFICATION_MESSAGE:return new c.NotificationMessageEvent(t);case o.EventDataType.COUNT_QUERY:return new i.CountQueryRequestEvent(t);case o.EventDataType.COUNT_QUERY_RESPONSE:return new a.CountQueryResponseEvent(t);case o.EventDataType.QUERY:return new s.QueryRequestEvent(t);case o.EventDataType.QUERY_EXECUTED:return new d.QueryExecutedEvent(t);case o.EventDataType.SAVE_QUERY_OPENED:return new l.SaveQueryOpened(t);case o.EventDataType.REQUEST_ABORTED:return new p.RequestAbortedEvent(t);default:return t}},E=(e,t,n)=>{const r=document.createElement("a");r.setAttribute("href",`data:${t};charset=utf-8, + ${encodeURIComponent(n)}`),r.setAttribute("download",e),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)}},145:function(e,t,n){"use strict";n.r(t),n.d(t,"YasguiComponent",(function(){return o}));var r=n(14);class o{constructor(e=r.YasguiComponentDirectiveUtil.getOntotextYasguiElement("#query-editor")){this.yasguiComponent=e}changeRenderMode(e){return this.yasguiComponent.changeRenderMode(e)}setQuery(e){return this.yasguiComponent.setQuery(e)}query(e){return this.yasguiComponent.query(e)}getQuery(){return this.yasguiComponent.getQuery()}isQueryValid(){return this.yasguiComponent.isQueryValid()}openTab(e){return this.yasguiComponent.openTab(e)}getQueryMode(){return this.yasguiComponent.getQueryMode()}getQueryType(){return this.yasguiComponent.getQueryType()}getEmbeddedResultAsJson(){return this.yasguiComponent.getEmbeddedResultAsJson()}getEmbeddedResultAsCSV(){return this.yasguiComponent.getEmbeddedResultAsCSV()}hideYasqeActionButton(e){return this.yasguiComponent.hideYasqeActionButton(e)}showYasqeActionButton(e){return this.yasguiComponent.showYasqeActionButton(e)}abortQuery(){return this.yasguiComponent.abortQuery()}getOngoingRequestsInfo(){return this.yasguiComponent.getOngoingRequestsInfo()}abortAllRequests(){return this.yasguiComponent.abortAllRequests()}resetYasrResults(){return this.yasguiComponent.resetResults()}}},146:function(e,t,n){"use strict";n.r(t),n.d(t,"KeyboardShortcutName",(function(){return r}));const r={TRIGGER_AUTOCOMPLETION:"trigger_autocompletion",DELETE_CURRENT_LINE:"delete_current_line",COMMENT_SELECTED_LINE:"comment_selected_line",COPY_LINE_DOWN:"copy_line_down",COPY_LINE_UP:"copy_line_up",AUTO_FORMAT_SELECTED_LINE:"auto_format_selected_line",INDENT_CURRENT_LINE_MORE:"indent_current_line_more",INDENT_CURRENT_LINE_LESS:"indent_current_line_less",EXECUTE_QUERY_OR_UPDATE:"execute_query_or_update",EXECUTE_EXPLAIN_PLAN_FOR_QUERY:"execute_explain_plan_for_query",EXECUTE_CHAT_GPT_EXPLAIN_PLAN_FOR_QUERY:"execute_chat_gpt_explain_plan_for_query",CREATE_TAB:"create_tab",CREATE_SAVE_QUERY:"create_save_query",SWITCH_NEXT_TAB:"switch_next_tab",SWITCH_PREVIOUS_TAB:"switch_previous_tab",CLOSES_ALL_TABS:"closes_all_tabs",FULL_SCREEN:"full_screen",ESC:"esc"}},147:function(e,t,n){"use strict";n.r(t),n.d(t,"YasguiPersistenceMigrationService",(function(){return i}));var r=n(86);const o="yagui__"+r.VIEW_SPARQL_EDITOR,s="completed",a="rejected",i=function(){const e=()=>({val:{active:null,tabs:[],tabConfig:{}}}),t=(e,t,n=null)=>{e.val.migration={date:(new Date).toISOString(),status:t,error:n}},n=(e,t)=>{e.val.tabs.push(t)},r=(e,t)=>{e.val.tabConfig[t.id]=t},i=e=>{let t=localStorage.getItem(e);if(t)return t=JSON.parse(t),t},u=e=>{e.val.tabs=e.val.tabs.filter(e=>!e.startsWith("_"))},c=e=>{for(const t in e.val.tabConfig)t.startsWith("_")&&delete e.val.tabConfig[t]},d=(e,t)=>{localStorage.setItem(e,JSON.stringify(t))},l=(e,t)=>`${t} ${e}`,p=()=>Math.random().toString(36).substring(7);return{isMigrationNeeded:()=>{const e=i(o);let t=!1;return e&&(t=e.val.migration&&(e.val.migration.status===s||e.val.migration.status===a)),!(!localStorage.getItem("ls.tabs-state")||t)},revertMigration:()=>{const e=i(o);u(e),c(e),d(o,e)},migrateYasguiPersistence:a=>{let u=i("ls.tabs-state");u=Object.freeze(u);let c=i(o);c||(c=e()),u.map(e=>({id:e.id,name:e.name,yasqe:{value:e.query,sameAs:e.sameAs,infer:e.inference,pageSize:1e3,pageNumber:1},yasr:{response:null,settings:{selectedPlugin:"extended_table",pluginsConfig:{}}},requestConfig:{method:"POST"}})).forEach((e,t)=>{e.id="_"+p(),e.name=e.name||l(t,a),n(c,e.id),r(c,e)}),c.val.active=c.val.tabs[0],t(c,s),d(o,c)},rejectMigration:()=>{const e=i(o);t(e,a),d(o,e)}}}()},422:function(e,t,n){var r,o=o||function(e){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS("http://www.w3.org/1999/xhtml","a"),o=e.webkitRequestFileSystem,s=e.requestFileSystem||o||e.mozRequestFileSystem,a=function(t){(e.setImmediate||e.setTimeout)((function(){throw t}),0)},i=0,u=function(t){var r=function(){"string"==typeof t?n().revokeObjectURL(t):t.remove()};e.chrome?r():setTimeout(r,500)},c=function(e,t,n){for(var r=(t=[].concat(t)).length;r--;){var o=e["on"+t[r]];if("function"==typeof o)try{o.call(e,n||e)}catch(e){a(e)}}},d=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e},l=function(t,a){t=d(t);var l,p,y,g=this,E=t.type,m=!1,f=function(){c(g,"writestart progress write writeend".split(" "))},h=function(){(!m&&l||(l=n().createObjectURL(t)),p)?p.location.href=l:null==e.open(l,"_blank")&&"undefined"!=typeof safari&&(e.location.href=l);g.readyState=g.DONE,f(),u(l)},S=function(e){return function(){if(g.readyState!==g.DONE)return e.apply(this,arguments)}},T={create:!0,exclusive:!1};if(g.readyState=g.INIT,a||(a="download"),r)return l=n().createObjectURL(t),r.href=l,r.download=a,void setTimeout((function(){var e,t;e=r,t=new MouseEvent("click"),e.dispatchEvent(t),f(),u(l),g.readyState=g.DONE}));e.chrome&&E&&"application/octet-stream"!==E&&(y=t.slice||t.webkitSlice,t=y.call(t,0,t.size,"application/octet-stream"),m=!0),o&&"download"!==a&&(a+=".download"),("application/octet-stream"===E||o)&&(p=e),s?(i+=t.size,s(e.TEMPORARY,i,S((function(e){e.root.getDirectory("saved",T,S((function(e){var n=function(){e.getFile(a,T,S((function(e){e.createWriter(S((function(n){n.onwriteend=function(t){p.location.href=e.toURL(),g.readyState=g.DONE,c(g,"writeend",t),u(e)},n.onerror=function(){var e=n.error;e.code!==e.ABORT_ERR&&h()},"writestart progress write abort".split(" ").forEach((function(e){n["on"+e]=g["on"+e]})),n.write(t),g.abort=function(){n.abort(),g.readyState=g.DONE},g.readyState=g.WRITING})),h)})),h)};e.getFile(a,{create:!1},S((function(e){e.remove(),n()})),S((function(e){e.code===e.NOT_FOUND_ERR?n():h()})))})),h)})),h)):h()},p=l.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t){return navigator.msSaveOrOpenBlob(d(e),t)}:(p.abort=function(){this.readyState=this.DONE,c(this,"abort")},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,function(e,t){return new l(e,t)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);
|
|
2
|
+
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */e.exports?e.exports.saveAs=o:null!==n(432)&&null!=n(421)&&(void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r))},77:function(e,t,n){"use strict";function r(e,t,n,r,o){e.JSONLDModes=[{name:"framed",link:"http://www.w3.org/ns/json-ld#framed"},{name:"expanded",link:"http://www.w3.org/ns/json-ld#expanded"},{name:"flattened",link:"http://www.w3.org/ns/json-ld#flattened"},{name:"compacted",link:"http://www.w3.org/ns/json-ld#compacted"}],e.JSONLDModesNames=e.JSONLDModes.reduce((function(e,t){return e[t.name]=t.name,e}),{}),e.JSONLDFramedModes=[e.JSONLDModesNames.framed],e.JSONLDContextModes=[e.JSONLDModesNames.compacted,e.JSONLDModesNames.flattened],e.defaultMode=e.JSONLDModes.find(e=>"expanded"===e.name),e.currentMode=e.defaultMode,e.link=null,e.fileFormat=o.toLowerCase(),e.setJSONLDSettingsToLocalStorage=function(e,t,o){n.set(r.JSONLD_EXPORT_SETTINGS,JSON.stringify({jsonldFormName:e,jsonldFormLink:t,jsonldLink:o}))},e.cancel=function(){t.dismiss()},e.reset=function(){e.currentMode=e.defaultMode,e.link="",e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link)},e.clearLinkInput=function(){e.link="",e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link)},e.exportJsonLD=function(){e.setJSONLDSettingsToLocalStorage(e.currentMode.name,e.currentMode.link,e.link),t.close({currentMode:e.currentMode,link:e.link})};!function(){const t=n.get(r.JSONLD_EXPORT_SETTINGS);t&&(e.currentMode=e.JSONLDModes.find(e=>e.name===t.jsonldFormName),e.link=t.jsonldLink)}()}n.r(t),n.d(t,"ExportSettingsCtrl",(function(){return r})),angular.module("graphdb.framework.core.components.export-settings-modal",["graphdb.framework.utils.localstorageadapter"]).controller("ExportSettingsCtrl",r),r.$inject=["$scope","$uibModalInstance","LocalStorageAdapter","LSKeys","format"]},78:function(e,t,n){"use strict";n.r(t),n.d(t,"EventDataType",(function(){return r}));const r={DOWNLOAD_AS:"downloadAs",NOTIFICATION_MESSAGE:"notificationMessage",QUERY:"query",COUNT_QUERY:"countQuery",COUNT_QUERY_RESPONSE:"countQueryResponse",REQUEST_ABORTED:"requestAborted",QUERY_EXECUTED:"queryExecuted",SAVE_QUERY_OPENED:"saveQueryOpened"}},82:function(e,t,n){"use strict";n.r(t);n(142),n(143);var r=n(97),o=n(69),s=n(422),a=n(144),i=n(78),u=n(12),c=n(107),d=n(517),l=n(85),p=n(145),y=n(14),g=n(146),E=n(147),m=n(77);function f(e,t,n,f,h,S,T,v,_,R,b,O,N,C,A,q){return{restrict:"E",templateUrl:"js/angular/core/directives/yasgui-component/templates/yasgui-component.html",scope:{yasguiConfig:"=",afterInit:"&",queryChanged:"&"},link:(f,q,w)=>{f.classToApply=w.class||"";const Q=new Map,L=f.yasguiConfig&&f.yasguiConfig.outputHandlers?new Map(f.yasguiConfig.outputHandlers):new Map;let D=void 0;f.getOntotextYasguiElements=()=>q.find("ontotext-yasgui"),f.getOntotextYasguiElement=()=>new p.YasguiComponent(f.getOntotextYasguiElements()[0]),f.createSavedQuery=e=>{const t=Object(r.queryPayloadFromEvent)(e);C.addNewSavedQuery(t).then(()=>z(t)).catch($)},f.updateSavedQuery=e=>{const t=Object(r.queryPayloadFromEvent)(e);C.editSavedQuery(t).then(()=>X(t)).catch($)},f.deleteSavedQuery=e=>{const t=Object(r.queryPayloadFromEvent)(e);C.deleteSavedQuery(t.name).then(()=>{_.success(n.instant("query.editor.delete.saved.query.success.msg",{savedQueryName:t.name}))}).catch(e=>{const t=getError(e);_.error(t,n.instant("query.editor.delete.saved.query.error"))})},f.shareSavedQuery=e=>{const t=Object(r.queryPayloadFromEvent)(e);f.savedQueryConfig={shareQueryLink:A.createShareSavedQueryLink(t.name,t.owner)}},f.shareQuery=e=>{const t=Object(r.queryPayloadFromEvent)(e);f.savedQueryConfig={shareQueryLink:A.createShareQueryLink(t)}},f.queryShareLinkCopied=()=>{_.success(n.instant("modal.ctr.copy.url.success"))},f.loadSavedQueries=()=>{C.getSavedQueries().then(e=>{const t=Object(r.savedQueriesResponseMapper)(e);f.savedQueryConfig={savedQueries:t}}).catch(e=>{const t=getError(e);_.error(t,n.instant("query.editor.get.saved.queries.error"))})},f.saveQueryOpened=e=>{y.YasguiComponentDirectiveUtil.highlightTabName(Object(a.toYasguiOutputModel)(e).getTab())},f.output=e=>{const t=Object(a.toYasguiOutputModel)(e);L.has(t.TYPE)&&L.get(t.TYPE)(t)};L.set(i.EventDataType.QUERY,e=>{const t=e.getPageNumber(),n=e.getPageSize();n&&t&&(e.setOffset((t-1)*(n-1)),e.setLimit(n)),e.setPageNumber(void 0),e.setPageSize(void 0)});L.set(i.EventDataType.COUNT_QUERY,e=>{e.setPageSize(void 0),e.setPageNumber(void 0),e.setCount(1)});L.set(i.EventDataType.COUNT_QUERY_RESPONSE,e=>{e.setTotalElements(B(e))});L.set(i.EventDataType.DOWNLOAD_AS,e=>{const t=Q.get(e.pluginName);t&&t(e)});L.set(i.EventDataType.NOTIFICATION_MESSAGE,e=>{const t=_[e.messageType];Object(o.isFunction)(t)&&t(e.message)});Q.set("extended_response",e=>{"application/sparql-results+json"===e.contentType?f.getOntotextYasguiElement().getEmbeddedResultAsJson().then(t=>{const n=JSON.stringify(t,null,"\t");Object(a.downloadAsFile)(j()+"_queryResults.json",e.contentType,n)}):"text/csv"===e.contentType&&f.getOntotextYasguiElement().getEmbeddedResultAsCSV().then(t=>{Object(a.downloadAsFile)(j()+"_queryResults.csv",e.contentType,t)})});const P=(e,r,o,a,i,u)=>{const c={query:e,infer:r,sameAs:o,authToken:a};O.downloadResultsAsFile(t.getActiveRepository(),c,i,u).then((function({data:e,filename:t}){Object(s.saveAs)(e,t)})).catch((function(e){e.data.text().then(t=>{431===e.status?_.error(e.statusText,n.instant("common.error")):_.error(t,n.instant("common.error"))})})).finally(()=>{f.setLoader(!1)})};Q.set(c.YasrPluginName.EXTENDED_TABLE,e=>{const t=e.query,n=e.infer,r=e.sameAs,o=e.contentType,s=T.getAuthToken()||"";if("application/ld+json"===e.contentType||"application/x-ld+ndjson"===e.contentType){S.open({templateUrl:"js/angular/core/components/export-settings-modal/exportSettingsModal.html",controller:m.ExportSettingsCtrl,size:"lg",scope:f,resolve:{format:function(){return"application/ld+json"===e.contentType?"JSON-LD":"NDJSON-LD"}}}).result.then((function(e){const a=o+";profile="+e.currentMode.link,i=e.link?"<"+e.link+">":"";P(t,n,r,s,a,i)}))}else P(t,n,r,s,o,"")});const M=[],Y=()=>f.getOntotextYasguiElement().getQuery().then(e=>{D=JSON.stringify(e)});M.push(f.$watch("yasguiConfig",(r,o)=>{if(!f.ontotextYasguiConfig&&r||r&&!Object(d.isEqual)(r,o)){const o=t.isActiveRepoOntopType(),s={isVirtualRepository:o,infer:o||r.infer,immutableInfer:o,sameAs:o||r.sameAs,immutableSameAs:o,yasqeAutocomplete:{LocalNamesAutocompleter:t=>{const n=e.defer();return W(t,n)}},language:h.getLanguage(),i18n:R.getTranslations(),getRepositoryStatementsCount:V,onQueryAborted:K};if(angular.extend(s,J(),f.yasguiConfig),void 0===s.showQueryButton||s.showQueryButton){const e=s.keyboardShortcutConfiguration||{};e[g.KeyboardShortcutName.EXECUTE_EXPLAIN_PLAN_FOR_QUERY]=!0,e[g.KeyboardShortcutName.EXECUTE_CHAT_GPT_EXPLAIN_PLAN_FOR_QUERY]=!0,s.keyboardShortcutConfiguration=e}else{const e=s.keyboardShortcutConfiguration||{};e[g.KeyboardShortcutName.EXECUTE_QUERY_OR_UPDATE]=!1,e[g.KeyboardShortcutName.EXECUTE_EXPLAIN_PLAN_FOR_QUERY]=!1,e[g.KeyboardShortcutName.EXECUTE_CHAT_GPT_EXPLAIN_PLAN_FOR_QUERY]=!1,e[g.KeyboardShortcutName.CREATE_TAB]=!1,e[g.KeyboardShortcutName.CREATE_SAVE_QUERY]=!1,e[g.KeyboardShortcutName.SWITCH_NEXT_TAB]=!1,e[g.KeyboardShortcutName.SWITCH_PREVIOUS_TAB]=!1,e[g.KeyboardShortcutName.CLOSES_ALL_TABS]=!1,s.keyboardShortcutConfiguration=e}E.YasguiPersistenceMigrationService.isMigrationNeeded()&&E.YasguiPersistenceMigrationService.migrateYasguiPersistence(n.instant("sparql.tab.directive.unnamed.tab.title")),f.ontotextYasguiConfig=s,U(),Y().then(()=>{angular.isFunction(f.afterInit)&&f.afterInit()})}}));const I=()=>{let e;const t=f.getOntotextYasguiElement();t.getQuery().then(t=>(e=JSON.stringify(t),e)).then(C.addKnownPrefixes).then(n=>{e=n.data,t.setQuery(e)}).then(()=>{x(JSON.stringify(e))}).catch(e=>{const t=getError(e);_.error(t,n.instant("common.add.known.prefixes.error"))})},U=()=>{const e=v((function(){const t=f.getOntotextYasguiElements();t&&(t.on("paste.sparqlQuery",".CodeMirror",I),t.on("keyup.sparqlQuery",".CodeMirror textarea",k),v.cancel(e))}))},k=e=>{f.getOntotextYasguiElement().getQuery().then(e=>{x(JSON.stringify(e))})},x=e=>{f.queryChanged(e),f.$emit("queryChanged",{dirty:D!==e})};M.push(f.$on("language-changed",(function(e,t){f.language=t.locale})));f.$on("$destroy",()=>{M.forEach(e=>e());const e=f.getOntotextYasguiElements();e.off("paste.sparqlQuery"),e.off("keyup.sparqlQuery")});const j=()=>{const e=new Date;return`${e.toLocaleDateString(f.language)}_${e.toLocaleTimeString(f.language)}`},B=e=>{if(e.isResponseNumber())return e.getResponseBody();if(e.isResponseArray()){const t=e.getResponseBody();if(t["http://www.ontotext.com/"])return t["http://www.ontotext.com/"]["http://www.ontotext.com/"][0].value}if(e.hasBindingResponse()){const t=e.getResponseBody();if(t){const e=t.results.bindings[0],n=t.head.vars,r=Object.keys(e).find((function(t){return n.indexOf(t)>-1&&!isNaN(e[t].value)}));if(r.length>0)return e[r].value}}},F=e=>{const n=e.getTab().getYasqe(),r={"Content-Type":"application/x-www-form-urlencoded","X-GraphDB-Local-Consistency":"updating","X-GraphDB-Catch":n.getPageSize()+"; throw","X-GraphDB-Track-Alias":`yasgui-component-${performance.now()}-${Date.now()}`,"X-GraphDB-Repository-Location":t.getActiveRepositoryObject().location,"X-Requested-With":"XMLHttpRequest"},o=T.getAuthToken();o&&(r.Authorization=o);const s=n.getQueryType();return u.QueryMode.UPDATE===n.getQueryMode()?r.Accept="text/plain,/;q=0.9":l.QueryType.CONSTRUCT===s||l.QueryType.DESCRIBE===s?r.Accept="application/x-graphdb-table-results+json, application/rdf+json;q=0.9, */*;q=0.8":r.Accept="application/x-sparqlstar-results+json, application/sparql-results+json;q=0.9, */*;q=0.8",r},J=()=>({showEditorTabs:!0,showToolbar:!0,componentId:"yasgui-component",headers:F,pageSize:1e3,maxPersistentResponseSize:5e5,showResultTabs:!0}),$=e=>{const t=getError(e),r=n.instant("query.editor.create.saved.query.error");_.error(t,r),f.savedQueryConfig=Object(o.merge)({},f.savedQueryConfig,{saveSuccess:!1,errorMessage:[r]})},X=e=>G(n.instant("query.editor.edit.saved.query.success.msg",{name:e.name})),z=e=>G(n.instant("query.editor.save.saved.query.success.msg",{name:e.name})),G=e=>{_.success(e),f.savedQueryConfig=Object(o.merge)({},f.savedQueryConfig,{saveSuccess:!0})},W=(e,t)=>b.getAutocompleteSuggestions(e,t.promise).then((function(e){return t=null,e.data})),V=()=>O.getRepositorySize(t.getActiveRepository()).then(e=>parseInt(e.data)).catch((function(e){const r={repo:t.getActiveRepository(),error:getError(e)};_.warning(n.instant("query.editor.repo.size.error",r))})),K=e=>{if(e){const t=e.url.substring(e.url.lastIndexOf("/")+1),n=e.header["X-GraphDB-Track-Alias"];return N.deleteQuery(n,t)}}}}}angular.module("graphdb.framework.core.directives.yasgui-component",["graphdb.framework.core.services.translation-service","graphdb.framework.sparql-editor.share-query.service"]).directive("yasguiComponent",f),f.$inject=["$q","$repositories","$translate","$location","$languageService","$uibModal","AuthTokenService","$interval","toastr","TranslationService","AutocompleteRestService","RDF4JRepositoriesRestService","MonitoringRestService","SparqlRestService","ShareQueryLinkService","ModalService"]},83:function(e,t,n){"use strict";n.r(t),n.d(t,"RouteConstants",(function(){return r}));const r={savedQueryName:"savedQueryName",savedQueryOwner:"owner",query:"query",name:"name",owner:"owner"}},84:function(e,t,n){"use strict";n.r(t),n.d(t,"TabQueryModel",(function(){return r}));class r{constructor(e,t,n,r=!0){this.queryName=e,this.query=t,this.owner=n,this.isPublic=r}}},85:function(e,t,n){"use strict";n.r(t),n.d(t,"QueryType",(function(){return r}));const r={SELECT:"SELECT",CONSTRUCT:"CONSTRUCT",ASK:"ASK",DESCRIBE:"DESCRIBE",INSERT:"INSERT",DELETE:"DELETE",LOAD:"LOAD",CLEAR:"CLEAR",CREATE:"CREATE",DROP:"DROP",COPY:"COPY",MOVE:"MOVE",ADD:"ADD"}},86:function(e,t,n){"use strict";n.r(t),n.d(t,"VIEW_SPARQL_EDITOR",(function(){return r}));const r="graphdb-workbench-sparql-editor"},97:function(e,t,n){"use strict";n.r(t),n.d(t,"buildQueryModel",(function(){return o})),n.d(t,"savedQueriesResponseMapper",(function(){return s})),n.d(t,"savedQueryResponseMapper",(function(){return a})),n.d(t,"queryPayloadFromEvent",(function(){return i}));var r=n(84);const o=(e,t,n,o)=>new r.TabQueryModel(t,e,n,o),s=e=>e&&e.data?e.data.map?e.data.map(e=>o(e.body,e.name,e.owner,e.shared)):[o(e.data.body,e.data.name,e.data.owner,e.data.shared)]:[],a=e=>{const t=s(e);return t.length?t[0]:null},i=e=>({name:e.detail.queryName,body:e.detail.query,shared:e.detail.isPublic})},98:function(e,t,n){"use strict";n.r(t),n.d(t,"EventData",(function(){return r}));class r{constructor(e,t){this.TYPE=e,this.payload=t}}},99:function(e,t,n){"use strict";n.r(t),n.d(t,"QueryRequestEvent",(function(){return r}));class r{constructor(e){this.TYPE=e.TYPE,this.query=e.payload.query,this.queryMode=e.payload.queryMode,this.queryType=e.payload.queryType,this.pageSize=e.payload.pageSize,this.request=e.payload.request}setPageSize(e){this.request._data.pageSize=e}getPageSize(){return this.request._data.pageSize?parseInt(this.request._data.pageSize):void 0}setPageNumber(e){this.request._data.pageNumber=e}getPageNumber(){return this.request._data.pageNumber?parseInt(this.request._data.pageNumber):void 0}setOffset(e){this.request._data.offset=e}setLimit(e){this.request._data.limit=e}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[22,39,46,65,162,182,183,185,186],{120:function(e,t,i){"use strict";i.r(t),i.d(t,"SimilarityResultType",(function(){return r}));const r={TERM_RESULT:"termResult",DOCUMENT_RESULT:"documentResult",ENTITY_RESULT:"entityResult",isResultDocumentType:e=>r.DOCUMENT_RESULT===e,isResultTermType:e=>r.TERM_RESULT===e}},121:function(e,t,i){"use strict";i.r(t),i.d(t,"SimilaritySearch",(function(){return a}));var r=i(76);class a{constructor(){this.type=r.SimilaritySearchType.SEARCH_TERM,this.predicate="",this.termOrSubject=""}isSearchAnalogicalType(){return r.SimilaritySearchType.isSearchAnalogicalType(this.type)}isSearchTermType(){return r.SimilaritySearchType.isSearchTermType(this.type)}isSearchEntityType(){return r.SimilaritySearchType.isSearchEntityType(this.type)}isSearchEntityPredicateType(){return r.SimilaritySearchType.isSearchEntityPredicateType(this.type)}isSearchDocumentType(){return r.SimilaritySearchType.isSearchDocumentType(this.type)}}},201:function(e,t,i){"use strict";i.r(t);var r=i(0),a=i(76),s=i(120),n=i(67),c=i(66),l=i(94),y=i(121),o=i(62);function u(e,t,i,u,p,S,d,T,m,h,I,E,R,x){const g="http://www.ontotext.com/graphdb/similarity/",A="http://www.ontotext.com/graphdb/similarity/psi/",b=A+"any";e.pluginName="similarity",e.pluginIsActive=!0,e.isLoading=!1,e.selectedSimilarityIndex=void 0,e.similarityIndexStatus=n.SimilarityIndexStatus,e.similarityIndexType=c.SimilarityIndexType,e.similaritySearchType=a.SimilaritySearchType,e.searchType=a.SimilaritySearchType.SEARCH_TERM,e.similarityResultType=s.SimilarityResultType,e.resultType=s.SimilarityResultType.TERM_RESULT,e.info=I,e.isGraphDBRepository=void 0,e.canEditRepo=e.canWriteActiveRepo(),e.loadSimilarityIndexesTimer=void 0,e.loadSimilarityIndexes=()=>{e.isGraphDBRepository&&e.pluginIsActive&&m.getIndexes().success(t=>e.similarityIndexes=Object(l.mapIndexesResponseToSimilarityIndex)(t)).error(e=>i.error(getError(e),R.instant("similarity.could.not.get.indexes.error")))},e.reloadSimilarityIndexes=()=>{e.loadSimilarityIndexes(),e.loadSimilarityIndexesTimer||(e.loadSimilarityIndexesTimer=t((function(){e.$broadcast("checkIsActive"),"false"!==$("#indexes-table").attr("aria-expanded")&&e.loadSimilarityIndexes()}),5e3))},e.goToSimilarityIndex=t=>{(t.isBuiltStatus()||t.isOutdatedStatus()||t.isRebuildingStatus())&&(e.empty=!0,e.selectedSimilarityIndex!==t&&(e.lastSearch=void 0,e.selectedSimilarityIndex=t),t.isTextType()?e.searchType=a.SimilaritySearchType.SEARCH_TERM:t.isPredicationType()&&(e.searchType=a.SimilaritySearchType.SEARCH_ENTITY),(t.isTextType()||t.isPredicationType())&&$("#indexes-table").collapse("hide"))},e.performSearch=(t,r,a,s,n)=>{e.isLoading=!0,j(a,r);const c=U(t,r,a,s,n);x.getQueryResult(u.getActiveRepository(),c,"application/x-sparqlstar-results+json, application/sparql-results+json;q=0.9, */*;q=0.8").then(e=>M(e)).catch(e=>i.error(getError(e.data),R.instant("similarity.get.resource.error"))).finally(()=>e.isLoading=!1)},e.viewSearchQuery=()=>{let t;t=e.lastSearch.isSearchAnalogicalType()?e.selectedSimilarityIndex.analogicalQuery?e.selectedSimilarityIndex.analogicalQuery:e.searchQueries.analogical:e.selectedSimilarityIndex.searchQuery?e.selectedSimilarityIndex.searchQuery:e.searchQueries[e.selectedSimilarityIndex.type];let i=[],r="";i=t.match(/[a-zA-Z0-9-]+:<http:\/\/www.ontotext.com\/graphdb\/similarity\/instance\/>/),r=null==i?"similarity-index":i[0].substring(0,i[0].indexOf(":"));const s=t.replace("?index",r+":"+e.selectedSimilarityIndex.name).replace("?query",e.lastSearch.termOrSubject).replace("?searchType",(e.selectedSimilarityIndex.isTextType()?":":"psi:")+(e.lastSearch.isSearchEntityPredicateType()?a.SimilaritySearchType.SEARCH_ENTITY:e.lastSearch.type)).replace("?resultType",e.selectedSimilarityIndex.isTextType()?":"+e.resultType:"psi:entityResult").replace("?parameters",C(e.searchParameters?e.searchParameters:"")).replace("?psiPredicate",e.lastSearch.predicate?O(e.lastSearch.predicate):O(b)).replace("?givenSubject",O(e.analogicalSubject)).replace("?givenObject",O(e.analogicalObject)).replace("?searchSubject",O(e.searchSubject));T.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:()=>s}})},e.deleteSimilarityIndex=t=>{d.openSimpleModal({title:R.instant("common.confirm"),message:R.instant("similarity.delete.index.warning",{name:t.name}),warning:!0}).result.then((function(){m.deleteIndex(t).then(()=>e.loadSimilarityIndexes()).catch(e=>i.error(getError(e)))}))},e.viewCreateQuery=e=>{m.getQuery({indexName:e.name,indexOptions:e.options,query:e.selectQuery,indexStopList:e.stopList,queryInference:e.infer,querySameAs:e.sameAs,viewType:e.type,indexAnalyzer:e.analyzer}).success(e=>{T.open({templateUrl:"pages/viewQuery.html",controller:"ViewQueryCtrl",resolve:{query:()=>e}})})},e.rebuildIndex=t=>{t.searchQuery||(t.searchQuery=t.type?e.searchQueries[t.type]:e.searchQueries.text),d.openSimpleModal({title:R.instant("common.confirm"),message:Object(r.decodeHTML)(R.instant("similarity.rebuild.index.warning",{name:t.name})),warning:!0}).result.then(()=>{t.status=n.SimilarityIndexStatus.REBUILDING,m.rebuildIndex(t).catch(e=>i.error(getError(e)))})},e.setPluginIsActive=t=>{e.pluginIsActive=t},e.encodeURIComponent=e=>encodeURIComponent(e),e.copyToClipboardResult=e=>{d.openCopyToClipboardModal(e)},e.trimIRI=e=>_.trim(e,"<>"),e.updateSearchType=t=>{e.searchType=t},e.updateResultType=t=>{e.resultType=t},e.editSimilarityIndex=e=>{L(e)},e.cloneSimilataryIndex=e=>{L(e,!0)},e.setPsiSubject=t=>{e.psiSubject=t},e.setAnalogicalSubject=t=>{e.analogicalSubject=t},e.setAnalogicalObject=t=>{e.analogicalObject=t};const L=(e,t=!1)=>{const i={selectQuery:e.selectQuery,options:e.options,name:e.name,editSearchQuery:!t,infer:e.infer,sameAs:e.sameAs,stopList:e.stopList,type:e.type,analyzer:e.analyzer,searchQuery:e.searchQuery?e.searchQuery:"",analogicalQuery:e.analogicalQuery?e.analogicalQuery:""};S.path("similarity/index/create").search(i)},Q=()=>{const t=e.getActiveRepository();t&&e.activeRepository!==t&&(e.canEditRepo=e.canWriteActiveRepo(),e.activeRepository=t,e.isGraphDBRepository=w(),e.isGraphDBRepository&&(p.isLicenseValid()&&e.reloadSimilarityIndexes(),v()))},v=()=>{m.getSearchQueries().success(t=>e.searchQueries=t).error(e=>i.error(getError(e),R.instant("similarity.could.not.get.search.queries.error")))},C=e=>'"'+e+'"',O=e=>void 0===e||e.startsWith("<<")&&e.endsWith(">>")?e:"<"+e+">",w=()=>e.getActiveRepository()&&!e.isActiveRepoOntopType()&&!e.isActiveRepoFedXType(),f=[];f.push(e.$on("repositoryIsSet",Q));e.$on("$destroy",()=>{D(),e.loadSimilarityIndexesTimer&&t.cancel(e.loadSimilarityIndexesTimer)});const D=()=>{f.forEach(e=>e())};f.push(e.$on("autocompleteStatus",()=>{p.isLicenseValid()&&(e.getAutocompletePromise=h.checkAutocompleteStatus())}));f.push(e.$watch("searchType",()=>{e.empty=!0}));const N=e.$watch(e.getActiveRepositoryObject,e=>{e&&(Q(),N())}),U=(t,i,r,n,c)=>{const l={query:P(e.lastSearch.type),$index:O("http://www.ontotext.com/graphdb/similarity/instance/"+t.name),$query:e.lastSearch.termOrSubject,$searchType:O((e.selectedSimilarityIndex.isTextType()?g:A)+(a.SimilaritySearchType.isSearchEntityPredicateType(r)?a.SimilaritySearchType.SEARCH_ENTITY:r)),$resultType:O(e.selectedSimilarityIndex.isTextType()?g+n:A+s.SimilarityResultType.ENTITY_RESULT),$parameters:C(c)};return a.SimilaritySearchType.isSearchEntityPredicateType(r)&&(l.$psiPredicate=e.lastSearch.predicate?O(e.lastSearch.predicate):O(b)),a.SimilaritySearchType.isSearchAnalogicalType(r)&&(e.searchSubject=i,l.$givenSubject=O(e.analogicalSubject),l.$givenObject=O(e.analogicalObject),l.$searchSubject=O(i)),l},j=(t,i)=>{e.lastSearch=new y.SimilaritySearch,e.lastSearch.type=t,a.SimilaritySearchType.isSearchEntityPredicateType(t)&&(e.lastSearch.predicate=i),e.lastSearch.termOrSubject=B(e.lastSearch.type,i,e.psiSubject)},P=t=>{let i;return i=a.SimilaritySearchType.isSearchAnalogicalType(t)?e.selectedSimilarityIndex.analogicalQuery?e.selectedSimilarityIndex.analogicalQuery:e.searchQueries.analogical:e.selectedSimilarityIndex.searchQuery?e.selectedSimilarityIndex.searchQuery:e.searchQueries[e.selectedSimilarityIndex.type],i},B=(e,t,i)=>{let r=t;return r=a.SimilaritySearchType.isSearchEntityPredicateType(e)?i:a.SimilaritySearchType.isSearchTermType(e)?C(r):O(r),r},M=t=>{e.yasguiConfig={showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showQueryButton:!1,downloadAsOn:!1,showResultInfo:!1,componentId:"similarity-list-component",maxPersistentResponseSize:0,render:o.RenderingMode.YASR,sparqlResponse:t.data}}}angular.module("graphdb.framework.similarity.controllers.list",[]).controller("SimilarityCtrl",u),u.$inject=["$scope","$interval","toastr","$repositories","$licenseService","$location","ModalService","$uibModal","SimilarityRestService","AutocompleteRestService","productInfo","RDF4JRepositoriesRestService","$translate","SparqlRestService"]},62:function(e,t,i){"use strict";i.r(t),i.d(t,"RenderingMode",(function(){return r}));const r={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},66:function(e,t,i){"use strict";i.r(t),i.d(t,"SimilarityIndexType",(function(){return r}));const r={TEXT:"text",TEXT_LITERAL:"textLiteral",PREDICATION:"predication",isTextType:e=>r.TEXT===e,isTextLiteralType:e=>r.TEXT_LITERAL===e,isPredicationType:e=>r.PREDICATION===e}},67:function(e,t,i){"use strict";i.r(t),i.d(t,"SimilarityIndexStatus",(function(){return r}));const r={CREATING:"CREATING",BUILDING:"BUILDING",BUILT:"BUILT",REBUILDING:"REBUILDING",OUTDATED:"OUTDATED",INTERRUPTED:"INTERRUPTED",OBSOLETE:"OBSOLETE",FAILED:"FAILED",isCreatingStatus:e=>r.CREATING===e,isBuildingStatus:e=>r.BUILDING===e,isBuiltStatus:e=>r.BUILT===e,isRebuildingStatus:e=>r.REBUILDING===e,isOutdatedStatus:e=>r.OUTDATED===e,isInterruptedStatus:e=>r.INTERRUPTED===e,isObsoleteStatus:e=>r.OBSOLETE===e,isFailedStatus:e=>r.FAILED===e}},70:function(e,t,i){"use strict";i.r(t),i.d(t,"SimilarityIndex",(function(){return s}));var r=i(66),a=i(67);class s{constructor(){this.analyzer="",this.infer=!0,this.options="",this.sameAs=!0,this.searchQuery="",this.selectQuery="",this.stopList=void 0,this.name="",this.type=r.SimilarityIndexType.TEXT,this.status=void 0,this.analogicalQuery=void 0,this.inputIndex=void 0,this.isLiteralIndex=""}isTextType(){return r.SimilarityIndexType.isTextType(this.type)}isTextLiteralType(){return r.SimilarityIndexType.isTextLiteralType(this.type)}isPredicationType(){return r.SimilarityIndexType.isPredicationType(this.type)}isCreatingStatus(){return a.SimilarityIndexStatus.isCreatingStatus(this.status)}isBuildingStatus(){return a.SimilarityIndexStatus.isBuildingStatus(this.status)}isBuiltStatus(){return a.SimilarityIndexStatus.isBuiltStatus(this.status)}isRebuildingStatus(){return a.SimilarityIndexStatus.isRebuildingStatus(this.status)}isOutdatedStatus(){return a.SimilarityIndexStatus.isOutdatedStatus(this.status)}isInterruptedStatus(){return a.SimilarityIndexStatus.isInterruptedStatus(this.status)}isObsoleteStatus(){return a.SimilarityIndexStatus.isObsoleteStatus(this.status)}isFailedStatus(){return a.SimilarityIndexStatus.isFailedStatus(this.status)}}},76:function(e,t,i){"use strict";i.r(t),i.d(t,"SimilaritySearchType",(function(){return r}));const r={SEARCH_TERM:"searchTerm",SEARCH_ANALOGICAL:"searchAnalogical",SEARCH_ENTITY:"searchEntity",SEARCH_ENTITY_PREDICATE:"searchEntityPredicate",SEARCH_DOCUMENT:"searchDocumentID",isSearchTermType:e=>r.SEARCH_TERM===e,isSearchAnalogicalType:e=>r.SEARCH_ANALOGICAL===e,isSearchEntityType:e=>r.SEARCH_ENTITY===e,isSearchEntityPredicateType:e=>r.SEARCH_ENTITY_PREDICATE===e,isSearchDocumentType:e=>r.SEARCH_DOCUMENT===e}},94:function(e,t,i){"use strict";i.r(t),i.d(t,"mapIndexesResponseToSimilarityIndex",(function(){return a}));var r=i(70);const a=e=>e.map(e=>{const t=new r.SimilarityIndex;return t.type=e.type,t.stopList=e.stopList,t.status=e.status,t.selectQuery=e.selectQuery,t.searchQuery=e.searchQuery,t.sameAs=e.sameAs,t.options=e.options,t.name=e.name,t.infer=e.infer,t.analyzer=e.analyzer,t.analogicalQuery=e.analogicalQuery,t})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[234],{87:function(n,e){angular.module("graphdb.workbench.utils.filetypes",[]).value("FileTypes",[{name:"JSON",type:"application/rdf+json",extension:".json"},{name:"JSON-LD",type:"application/ld+json",extension:".jsonld"},{name:"NDJSON-LD",type:"application/x-ld+ndjson",extension:".ndjsonld"},{name:"RDF-XML",type:"application/rdf+xml",extension:".rdf"},{name:"N3",type:"text/rdf+n3",extension:".n3"},{name:"N-Triples",type:"text/plain",extension:".nt"},{name:"N-Quads",type:"text/x-nquads",extension:".nq"},{name:"Turtle",type:"text/turtle",extension:".ttl"},{name:"Turtle*",type:"application/x-turtlestar",extension:".ttls"},{name:"TriX",type:"application/trix",extension:".trix"},{name:"TriG",type:"application/x-trig",extension:".trig"},{name:"TriG*",type:"application/x-trigstar",extension:".trigs"},{name:"Binary RDF",type:"application/x-binary-rdf",extension:".brf"}])}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[259],{353:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<div class="modal-header">\n <button type="button" class="close" ng-click="cancel()"></button>\n <h4 class="modal-title">{{\'export.settings.\' + fileFormat | translate}}</h4>\n</div>\n\n<div class="modal-body">\n <form name="exportSettingsForm" class="export-settings-form">\n <div class="form-horizontal">\n <div class="form-group row">\n <label class="col-lg-3 col-form-label" for="wb-JSONLD-mode">\n {{fileFormat + \'.form\' | translate}}\n <span class="btn btn-link p-0"\n uib-popover="{{fileFormat + \'.form.info\' | translate}}"\n popover-trigger="mouseenter"\n popover-placement="right"><em class="icon icon-info"></em></span>\n </label>\n <div class="col-lg-9">\n <select class="form-control" id="wb-JSONLD-mode"\n ng-model="currentMode"\n ng-options="mode.link for mode in JSONLDModes track by mode.link"\n ng-change="clearLinkInput()">\n </select>\n </div>\n </div>\n\n <div class="form-group row" ng-if="JSONLDFramedModes.indexOf(currentMode.name) > -1">\n <label class="col-lg-3 col-form-label" for="wb-JSONLD-frame">\n {{fileFormat + \'.frame.link\' | translate}}\n <span class="btn btn-link p-0"\n uib-popover="{{fileFormat + \'.frame.link.info\' | translate}}"\n popover-trigger="mouseenter"\n popover-placement="right"><em class="icon icon-info"></em></span>\n </label>\n <div class="col-lg-9">\n <input class="form-control" id="wb-JSONLD-frame" type="text"\n ng-model="$parent.link" placeholder="{{fileFormat + \'.frame.uri.placeholder\' | translate}}" autofocus="autofocus" />\n </div>\n </div>\n\n <div class="form-group row"\n ng-if="JSONLDContextModes.indexOf(currentMode.name) > -1">\n <label class="col-lg-3 col-form-label" for="wb-JSONLD-context">\n {{fileFormat + \'.context.link\' | translate}}\n <span class="btn btn-link p-0"\n uib-popover="{{fileFormat + \'.context.link.info\' | translate}}"\n popover-trigger="mouseenter"\n popover-placement="right"><em class="icon icon-info"></em></span>\n </label>\n <div class="col-lg-9">\n <input class="form-control" id="wb-JSONLD-context" type="text"\n ng-model="$parent.link" placeholder="{{fileFormat + \'.context.uri.placeholder\' | translate}}"\n autofocus="autofocus" />\n </div>\n </div>\n </div>\n </form>\n</div>\n\n<div class="modal-footer">\n <button type="button" class="btn btn-link pull-left restore-defaults" ng-click="reset()">{{\'import.restore.defaults.btn\' | translate}}</button>\n <button type="button" ng-click="cancel()" class="btn btn-secondary">{{\'common.cancel.btn\' | translate}}</button>\n <button id="wb-export-JSONLD" class="btn btn-primary" type="button"\n ng-click="exportJsonLD()">\n {{\'export\' | translate}}\n </button>\n</div>\n';return __p}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[260],{354:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<link href="css/autocomplete-select.css?v=2.7.0-
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[260],{354:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<link href="css/autocomplete-select.css?v=2.7.0-TR5" rel="stylesheet"/>\n\n<div class="autocomplete-select-wrapper">\n <div class="autocomplete-select">\n <div ng-hide="isMultiline">\n <input type="text" ng-model="searchInput" ng-change="onChange()" ng-keydown="onKeyDown($event)"\n ng-blur="onBlur()" ng-required="required"\n class="autocomplete-input autocomplete-editable" ng-class="styleClass" placeholder="{{placeholder}}">\n </div>\n <div ng-show="isMultiline">\n <textarea\n ng-model="searchInput"\n ng-change="onChange()"\n ng-keydown="onKeyDown($event)"\n ng-blur="onBlur()"\n ng-required="required"\n class="autocomplete-textarea autocomplete-editable" ng-class="styleClass"\n placeholder="{{placeholder}}"\n rows="{{initialRows}}">\n </textarea>\n </div>\n </div>\n <div class="autocomplete-results-wrapper card">\n <div ng-repeat="autoCompleteUriResult in autoCompleteUriResults track by $index"\n ng-click="selectResource(autoCompleteUriResult)"\n ng-mousemove="setActiveItemIndex($index)"\n ng-class="{active: activeSearchElm === $index, selected: selectedElementIndex === $index}"\n class="result-item">\n <p ng-bind-html="getResultItemHtml(autoCompleteUriResult)"></p>\n </div>\n </div>\n</div>\n';return __p}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[262],{356:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<link href="css/operations-statuses-monitor.css?v=2.7.0-
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[262],{356:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<link href="css/operations-statuses-monitor.css?v=2.7.0-TR5" rel="stylesheet"/>\n\n<div ng-if="activeOperations && activeOperations.operations && activeOperations.operations.length > 0"\n class="operations-statuses btn-group">\n <button type="button"\n class="btn btn-secondary operations-statuses-dropdown-toggle dropdown-toggle" data-toggle="dropdown"\n ng-if="operationsSummary && operationsSummary.length > 0"\n ng-class="{\n \'btn-fade-danger\': OPERATION_STATUS.CRITICAL === activeOperations.status,\n \'btn-fade-warning\': OPERATION_STATUS.WARNING === activeOperations.status\n }">\n <div class="operation-status-header" ng-repeat="operationGroup in operationsSummary">\n <div ng-class="{\n \'icon-import\': OPERATION_GROUP_TYPE.IMPORT_OPERATION === operationGroup.type,\n \'icon-exchange\': OPERATION_GROUP_TYPE.QUERIES_OPERATION === operationGroup.type,\n \'fa fa-archive\': OPERATION_GROUP_TYPE.BACKUP_AND_RESTORE_OPERATION === operationGroup.type,\n \'fa fa-sitemap\': OPERATION_GROUP_TYPE.CLUSTER_OPERATION === operationGroup.type,\n \'status-critical\': OPERATION_STATUS.CRITICAL === operationGroup.status,\n \'status-information\': OPERATION_STATUS.INFORMATION === operationGroup.status,\n \'status-warning\': OPERATION_STATUS.WARNING === operationGroup.status}">\n </div>\n <span ng-if="operationGroup.runningOperations" class="running-operation-count">\n <sup class="tag-info">{{operationGroup.runningOperations}}</sup>\n </span>\n </div>\n <span class="caret"></span>\n </button>\n <ul role="menu" class="dropdown-menu dropdown-menu-right">\n <div class="operations-statuses-content">\n <li ng-repeat="operationStatus in activeOperations.operations">\n <a class="operation-status-content btn btn-secondary row" target="_blank" ng-attr-href="{{operationStatus.monitoringViewUrl}}"\n ng-class="{\n \'status-critical\': OPERATION_STATUS.CRITICAL === operationStatus.status,\n \'status-information\': OPERATION_STATUS.INFORMATION === operationStatus.status,\n \'status-warning\': OPERATION_STATUS.WARNING === operationStatus.status\n }">\n <div class="operation-icon col-sm-1" ng-style="noPadding">\n <div ng-class="{\n \'icon-import\': OPERATION_TYPE.IMPORTS === operationStatus.type,\n \'icon-exchange\': OPERATION_TYPE.QUERIES === operationStatus.type || OPERATION_TYPE.UPDATES === operationStatus.type,\n \'fa fa-archive\': OPERATION_TYPE.BACKUP_RESTORE === operationStatus.type,\n \'fa fa-sitemap\': OPERATION_TYPE.CLUSTER_STATUS === operationStatus.type}">\n </div>\n </div>\n <div class="col-sm-8 operation-status-label">\n {{ \'global.operations_statuses.\' + operationStatus.titleLabelKey + \'.title\' | translate }}\n </div>\n <div class="operation-number col-sm-3">\n <div ng-if="operationStatus.runningOperationCount" class="operation-status-running-operation-count tag-info">\n {{operationStatus.runningOperationCount}}\n </div>\n </div>\n </a>\n </li>\n </div>\n </ul>\n</div>\n';return __p}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[263],{357:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<link href="css/rdf-resource-search.css?v=2.7.0-
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[263],{357:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<link href="css/rdf-resource-search.css?v=2.7.0-TR5" rel="stylesheet"/>\n\n<div ng-if="getActiveRepository() && hasActiveLocation() && isNotLoading()" ng-cloak>\n <div id="search-box" class="card search-rdf-input" ng-keydown="onKeyDown($event)" ng-if="!isHomePage()">\n <div class="card-block">\n <search-resource-input namespacespromise="getNamespacesPromise"\n autocompletepromisestatus="getAutocompletePromise"\n empty="empty"\n open-in-new-tab="true"\n preserve-search="true"\n radio-buttons="true"\n clear-input-icon="true">\n </search-resource-input>\n <button class="btn btn-link close-rdf-search-btn"\n gdb-tooltip="{{\'search.resource.close.msg\' | translate}}" tooltip-placement="bottom"\n ng-click="hideInput()">\n <i class="icon-close icon-2x" aria-hidden="true"></i>\n </button>\n </div>\n </div>\n <button class="btn btn-link search-rdf-btn"\n gdb-tooltip="{{\'search.resources.msg\' | translate}}"\n tooltip-placement="bottom"\n ng-click="showInput()">\n <i class="icon-search" aria-hidden="true"></i>\n </button>\n</div>\n';return __p}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[264],{358:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<link href="css/lib/ontotext-yasgui-web-component.css?v=2.7.0-
|
|
1
|
+
(window.webpackJsonp=window.webpackJsonp||[]).push([[264],{358:function(module,exports){module.exports=function(obj){obj||(obj={});var __t,__p="";with(obj)__p+='<link href="css/lib/ontotext-yasgui-web-component.css?v=2.7.0-TR5" rel="stylesheet">\n\n<ontotext-yasgui\n class="{{classToApply}}"\n ng-custom-element\n ngce-prop-config="ontotextYasguiConfig"\n ngce-prop-saved_query_config="savedQueryConfig"\n ngce-prop-language="language"\n ngce-on-create_saved_query="createSavedQuery($event)"\n ngce-on-update_saved_query="updateSavedQuery($event)"\n ngce-on-delete_saved_query="deleteSavedQuery($event)"\n ngce-on-share_saved_query="shareSavedQuery($event)"\n ngce-on-share_query="shareQuery($event)"\n ngce-on-query_share_link_copied="queryShareLinkCopied()"\n ngce-on-load_saved_queries="loadSavedQueries($event)"\n ngce-on-save_query_opened="saveQueryOpened($event)"\n ngce-on-output="output($event)">\n</ontotext-yasgui>\n';return __p}}}]);
|