graphdb-workbench 4.0.0-RC1 → 4.0.0-RC2

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.
Files changed (132) hide show
  1. package/dist/10027.05870e3f5f1276be0609.bundle.js +2 -0
  2. package/dist/10027.05870e3f5f1276be0609.bundle.js.map +1 -0
  3. package/dist/43239.143cfe87c9635f5a618a.bundle.js +2 -0
  4. package/dist/43239.143cfe87c9635f5a618a.bundle.js.map +1 -0
  5. package/dist/{49771.75949fd69454e4b2c35c.bundle.js → 49771.e1b5f6312e839e802227.bundle.js} +2 -2
  6. package/dist/49771.e1b5f6312e839e802227.bundle.js.map +1 -0
  7. package/dist/{64709.67552296e3eba61b8f2a.bundle.js → 64709.44c3b845e1c56524a33b.bundle.js} +2 -2
  8. package/dist/{64709.67552296e3eba61b8f2a.bundle.js.map → 64709.44c3b845e1c56524a33b.bundle.js.map} +1 -1
  9. package/dist/65677.b20a7ba3bfea9896d893.bundle.js +2 -0
  10. package/dist/65677.b20a7ba3bfea9896d893.bundle.js.map +1 -0
  11. package/dist/{80933.d0e4a4df57a9ad083d4b.bundle.js → 80933.58506508af6d8a0bf9a8.bundle.js} +2 -2
  12. package/dist/{80933.d0e4a4df57a9ad083d4b.bundle.js.map → 80933.58506508af6d8a0bf9a8.bundle.js.map} +1 -1
  13. package/dist/{82917.764d8d2bd851d0744445.bundle.js → 82917.795572b0c0dee28e1cef.bundle.js} +2 -2
  14. package/dist/{82917.764d8d2bd851d0744445.bundle.js.map → 82917.795572b0c0dee28e1cef.bundle.js.map} +1 -1
  15. package/dist/{86099.e7831890b2b82c8bad04.bundle.js → 86099.1a17cb5538b171ff09a0.bundle.js} +2 -2
  16. package/dist/{86099.e7831890b2b82c8bad04.bundle.js.map → 86099.1a17cb5538b171ff09a0.bundle.js.map} +1 -1
  17. package/dist/9923.1066d5bd24b8a217e613.bundle.js +2 -0
  18. package/dist/9923.1066d5bd24b8a217e613.bundle.js.map +1 -0
  19. package/dist/api/ontotext-workbench-api.js +1 -1
  20. package/dist/api/ontotext-workbench-api.js.map +1 -1
  21. package/dist/api/services/domain/security/auth-strategies/openid-auth-strategy.d.ts +1 -1
  22. package/dist/api/services/domain/security/authentication-storage.service.d.ts +8 -0
  23. package/dist/api/services/domain/security/openid/index.d.ts +2 -2
  24. package/dist/api/services/domain/security/openid/openid-auth-flow-handler.d.ts +1 -1
  25. package/dist/api/services/domain/security/openid/{openid-storage.service.d.ts → openid-local-storage.service.d.ts} +3 -15
  26. package/dist/api/services/domain/security/openid/openid-service.d.ts +2 -1
  27. package/dist/api/services/domain/security/openid/openid-session-storage.service.d.ts +66 -0
  28. package/dist/api/services/domain/security/openid/openid-token-refresh-manager.d.ts +1 -1
  29. package/dist/api/services/domain/security/openid/openid-token-utils.d.ts +2 -1
  30. package/dist/api/services/storage/browser-storage.service.d.ts +63 -0
  31. package/dist/api/services/storage/index.d.ts +1 -0
  32. package/dist/api/services/storage/local-storage.service.d.ts +4 -53
  33. package/dist/api/services/storage/session-storage.service.d.ts +14 -0
  34. package/dist/api/services/storage/test/session-storage.service.spec.d.ts +1 -0
  35. package/dist/assets/i18n/language-config.json +1 -1
  36. package/dist/i18n/locale-en.json +1 -0
  37. package/dist/i18n/locale-fr.json +1 -0
  38. package/dist/index.html +9 -9
  39. package/dist/js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html +1 -1
  40. package/dist/js/angular/clustermanagement/templates/cluster-configuration/multi-region.html +1 -1
  41. package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
  42. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  43. package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
  44. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  45. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  46. package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
  47. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +7 -7
  48. package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
  49. package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
  50. package/dist/js/angular/core/templates/core-errors.html +1 -1
  51. package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
  52. package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
  53. package/dist/js/angular/core/templates/search-resource-input.html +1 -1
  54. package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
  55. package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
  56. package/dist/js/angular/graphql/templates/graphql-playground.html +2 -2
  57. package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
  58. package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
  59. package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
  60. package/dist/js/angular/security/templates/user.html +2 -2
  61. package/dist/js/angular/security/templates/users.html +1 -1
  62. package/dist/js/angular/templates/repositorySize.html +1 -1
  63. package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
  64. package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
  65. package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
  66. package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
  67. package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
  68. package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
  69. package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +3 -3
  70. package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
  71. package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
  72. package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
  73. package/dist/{legacyWorkbench.2c1399d4d4593717e6da.js → legacyWorkbench.3fcfc1f854dc1b7c2d8c.js} +3 -3
  74. package/dist/{legacyWorkbench.2c1399d4d4593717e6da.js.map → legacyWorkbench.3fcfc1f854dc1b7c2d8c.js.map} +1 -1
  75. package/dist/license-checker.json +41 -1358
  76. package/dist/{main.ae5ef2a30e968308898a.js → main.96208465fa22f8a3a038.js} +3 -3
  77. package/dist/{main.ae5ef2a30e968308898a.js.map → main.96208465fa22f8a3a038.js.map} +1 -1
  78. package/dist/pages/aclmanagement.html +1 -1
  79. package/dist/pages/autocomplete.html +1 -1
  80. package/dist/pages/choose-repository-type.html +1 -1
  81. package/dist/pages/cluster-management/clusterInfo.html +2 -2
  82. package/dist/pages/create-index.html +1 -1
  83. package/dist/pages/dependencies.html +1 -1
  84. package/dist/pages/domainRangeInfo.html +2 -2
  85. package/dist/pages/edit.html +6 -5
  86. package/dist/pages/explore.html +1 -1
  87. package/dist/pages/export.html +1 -1
  88. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  89. package/dist/pages/graphs-visualizations.html +7 -7
  90. package/dist/pages/guides.html +1 -1
  91. package/dist/pages/home.html +1 -1
  92. package/dist/pages/import.html +2 -2
  93. package/dist/pages/jdbc-create.html +1 -1
  94. package/dist/pages/jdbc.html +1 -1
  95. package/dist/pages/monitor/backup-and-restore.html +1 -1
  96. package/dist/pages/monitor/queries.html +1 -1
  97. package/dist/pages/monitor/resources.html +1 -1
  98. package/dist/pages/namespaces.html +2 -2
  99. package/dist/pages/plugins.html +1 -1
  100. package/dist/pages/rdfClassHierarchyInfo.html +8 -8
  101. package/dist/pages/rdfrank.html +2 -2
  102. package/dist/pages/repositories.html +1 -1
  103. package/dist/pages/repository.html +1 -1
  104. package/dist/pages/similarity-indexes.html +1 -1
  105. package/dist/pages/sparql-editor.html +1 -1
  106. package/dist/pages/sparql-template-create.html +1 -1
  107. package/dist/pages/sparql-templates.html +1 -1
  108. package/dist/pages/ux-test1.html +2 -2
  109. package/dist/res/swagger5/index.html +8 -8
  110. package/dist/sbom.cdx.json +2379 -8267
  111. package/dist/shared-components/cjs/onto-layout.cjs.entry.js +1 -1
  112. package/dist/shared-components/collection/components/onto-layout/onto-layout.js +1 -1
  113. package/dist/shared-components/esm/onto-layout.entry.js +1 -1
  114. package/dist/shared-components/shared-components/p-474b4bf3.entry.js +1 -0
  115. package/dist/shared-components/shared-components/shared-components.esm.js +1 -1
  116. package/dist/shared-components/types/components/onto-layout/onto-layout.d.ts +2 -3
  117. package/dist/workbench/workbench/697.0331f4fea7f04707.js +1 -0
  118. package/dist/workbench/workbench/workbenchApp.js +1 -1
  119. package/package.json +1 -1
  120. package/dist/10027.209fde0e712bf6c356d3.bundle.js +0 -2
  121. package/dist/10027.209fde0e712bf6c356d3.bundle.js.map +0 -1
  122. package/dist/43239.c76fc77febaf50657b13.bundle.js +0 -2
  123. package/dist/43239.c76fc77febaf50657b13.bundle.js.map +0 -1
  124. package/dist/49771.75949fd69454e4b2c35c.bundle.js.map +0 -1
  125. package/dist/65677.9c399bbb23b8b4478225.bundle.js +0 -2
  126. package/dist/65677.9c399bbb23b8b4478225.bundle.js.map +0 -1
  127. package/dist/9923.b1935ab381c7e60a9898.bundle.js +0 -2
  128. package/dist/9923.b1935ab381c7e60a9898.bundle.js.map +0 -1
  129. package/dist/shared-components/shared-components/p-6fd8a7ef.entry.js +0 -1
  130. package/dist/workbench/workbench/697.8c546098c3e91234.js +0 -1
  131. /package/dist/{legacyWorkbench.2c1399d4d4593717e6da.js.LICENSE.txt → legacyWorkbench.3fcfc1f854dc1b7c2d8c.js.LICENSE.txt} +0 -0
  132. /package/dist/{main.ae5ef2a30e968308898a.js.LICENSE.txt → main.96208465fa22f8a3a038.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench",
3
- "version": "4.0.0-RC1",
3
+ "version": "4.0.0-RC2",
4
4
  "description": "The web application for GraphDB APIs",
5
5
  "engines": {
6
6
  "node": ">=22.17"
@@ -1,2 +0,0 @@
1
- export const __webpack_esm_id__=10027;export const __webpack_esm_ids__=[5533,10027,22917,23713,39456,62628,85799,99362];export const __webpack_esm_modules__={10027(e,t,r){r(62628),r(23713);var o=r(47775),n=r(22917),s=r(99362),a=r(5533),i=r(39456),c=r(49722),l=r(40653),p=r(82380),u=r(57154),d=r(33645);const f=[a.T.SUBJECT,a.T.PREDICATE,a.T.OBJECT,a.T.CONTEXT,a.T.ALL];function m(e,t,r,m,g,h,x,w,T,y,I,R,v,E){const b=(0,u.service)(u.SecurityContextService),C=(0,u.service)(u.GraphConfigService);let L;e.ContextTypes=s.L,e.contextTypes=s.E.getAllType(),e.currentContextTypeId=s.L.EXPLICIT.id,e.roles=[a.T.TRIPLE_TERM,...f],e.resourceInfo=void 0,e.isLoading=!1,e.fileTypes=y,e.toggleSameAs=()=>{e.resourceInfo.sameAs=!e.resourceInfo.sameAs,e.exploreResource()},e.getActiveRepository=()=>g.getActiveRepository(),e.isTripleResource=()=>!!e.resourceInfo?.triple,e.isRoleTabVisible=t=>t!==a.T.TRIPLE_TERM||e.isTripleResource(),e.getTripleTermLocalNames=e=>e.replace(/<([^<>\s]*)>/g,(e,t)=>`<${x.getLocalName(t)}>`),e.getTripleTermLookupLink=e=>`sparql?query=${encodeURIComponent(`SELECT ?s ?p ?tt\nWHERE {\n VALUES ?tt {\n ${e}\n }\n ?s ?p ?tt .\n}`)}`,e.getLocalName=e=>x.getLocalName(e),e.loadResource=()=>{E.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=>r.error(R.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=({detail:r})=>{"create"!==r.action?t.path("graphs-visualizations").search("uri",e.resourceInfo.uri).search("config",r.graphConfig?.id):(0,u.openInNewTab)("graphs-visualizations")},e.goToGraphNavigator=()=>{t.path("graph-navigator").search("uri",e.resourceInfo.uri)},e.fetchGraphConfigs=()=>()=>C.getGraphConfigs().then(e=>e.getItems()),e.exploreResource=()=>{$(!0),d.B.isNullOrUndefined(m.context)&&(e.resourceInfo.context=m.context),t.search("role",e.resourceInfo.role),t.replace(),A()},e.downloadExport=t=>{E.getGraph(e.resourceInfo,t.type).then(e=>{t.type.indexOf("json")>-1&&(e=JSON.stringify(e));const r=navigator.userAgent.toLowerCase();if(-1!==r.indexOf("safari")&&-1===r.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const r=new Blob([e],{type:t.type});(0,o.saveAs)(r,"statements"+t.extension)}}).catch(e=>{r.error(getError(e),R.instant("common.error"))}).finally(()=>{$(!1)})},e.openJSONLDExportSettings=function(t){h.open({templateUrl:"js/angular/core/components/export-settings-modal/exportSettingsModal.html",controller:p.V,size:"lg",scope:e,resolve:{format:function(){return t.name}}}).result.then(function(r){e.downloadJSONLDExport(t,r.link,r.currentMode)})},e.downloadJSONLDExport=function(t,n,s){E.getGraph(e.resourceInfo,t.type,n).then(async function(e){if("JSON"===t.name&&(e=JSON.stringify(e)),"JSON-LD"===t.name)switch(s.name){case"expanded":e=await l.expand(e),e=JSON.stringify(e);break;case"flattened":e=await l.flatten(e,n),e=JSON.stringify(e);break;case"compacted":case"framed":e=await l.compact(e,n),e=JSON.stringify(e);break;case"context":e=await l.context(e,n),e=JSON.stringify(e);break;case"frame":e=await l.frame(e,n),e=JSON.stringify(e)}const r=navigator.userAgent.toLowerCase();if(-1!==r.indexOf("safari")&&-1===r.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const r=new Blob([e],{type:t.type});(0,o.saveAs)(r,"statements"+t.extension)}}).catch(function(e){const t=getError(e);r.error(t,R.instant("common.error"))})},e.changeRole=t=>{e.resourceInfo.triple||(e.resourceInfo.role=t,e.resourceInfo.role===a.T.CONTEXT&&(e.resourceInfo.contextType=s.L.EXPLICIT),e.exploreResource())},e.changeInference=t=>{e.resourceInfo.contextType=s.E.getContextType(t),e.exploreResource()},e.copyToClipboardResult=e=>{w.openCopyToClipboardModal(e)},window.Cypress&&(window.jsonld=l);const S=()=>{if(e.resourceInfo.triple)return a.T.TRIPLE_TERM;const r=t.search().role;return f.includes(r)?r:a.T.SUBJECT},$=t=>{e.isLoading=!!t},A=()=>{E.getGraph(e.resourceInfo).then(t=>{((t={})=>{const r={};angular.extend(r,e.yasguiConfig||{showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showFullscreenButton:!1,showResultInfo:!0,downloadAsOn:!1,showQueryButton:!1,componentId:"resource-view-component",prefixes:L,maxPersistentResponseSize:0,render:i.o.YASR,showYasqeActionButtons:!1,yasqeActionButtons:c._f},t),e.yasguiConfig=r})({sparqlResponse:t})}).catch(e=>{r.error(R.instant("explore.error.resource",{data:getError(e)}))}).finally(()=>{$(!1)})};e.$on("$destroy",()=>{N.forEach(e=>e())});const N=[];N.push(e.$watch(function(){return e.getActiveRepositoryObject()},function(o){o&&(()=>{const o=b.getAuthenticatedUser();g.getPrefixes(g.getActiveRepository()).then(r=>{var i;e.resourceInfo||(e.resourceInfo=new n.r,i=e.resourceInfo,m.prefix&&m.localName&&L[m.prefix]?i.uri=L[m.prefix]+m.localName:t.search().uri?i.uri=t.search().uri+(t.hash()?"#"+t.hash():""):t.search().triple?i.triple=t.search().triple+(t.hash()?"#"+t.hash():""):i.uri=t.absUrl(),i.uri=i.uri&&i.uri.replace(/<|>/g,""),d.B.isNullOrUndefined(m.context)&&(e.resourceInfo.context=m.context),e.resourceInfo.role=S()),(t=>{e.resourceInfo.contextType=t.appSettings.DEFAULT_INFERENCE&&!e.resourceInfo.role===a.T.CONTEXT?s.L.ALL:s.L.EXPLICIT,e.resourceInfo.sameAs=t.appSettings.DEFAULT_INFERENCE&&t.appSettings.DEFAULT_SAMEAS})(o),L=r,e.loadResource()}).catch(e=>{r.error(R.instant("get.namespaces.error.msg",{error:getError(e)}))})})()}))}function g(e,t,r,o,n,s,a,i,c,l,p){e.uriParam=r.search().uri,e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newResource=!1,e.datatypeOptions=c.getDatatypeOptions(),e.activeRepository=function(){return n.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 r=getError(t);o.error(r,p.instant("common.error")),e.loader=!1}),i.getDetails(e.uriParam).success(function(t){e.details=t,e.details.encodeURI=encodeURIComponent(e.details.uri)}).error(function(e){o.error(p.instant("explore.error.resource.details",{data:getError(e)}))}),i.getGraph(e.uriParam).then(function(t){const r=c.buildStatements(t,e.uriParam);e.statements=r,e.newResource=!r.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 i.getLocalName(e)},e.checkValid=function(e){return!angular.isUndefined(e)||p.instant("explore.validation")},e.validEditRow=function(){return e.rowform.$valid},e.viewTrig=function(){s.open({templateUrl:"js/angular/explore/templates/viewTrig.html",controller:"ViewTrigCtrl",size:"lg",resolve:{data:function(){return c.transformToTrig(e.statements)}}})},e.save=function(){const n=e.newResource?"POST":"PUT";t({method:n,url:"rest/resource?uri="+encodeURIComponent(e.uriParam),headers:{"Content-Type":"application/x-trig"},data:c.transformToTrig(e.statements)}).success(function(){o.success(p.instant("explore.resource.saved"));const t=a(function(){r.path("resource").search("uri",e.uriParam)},500);e.$on("$destroy",function(){a.cancel(t)})}).error(function(e){o.error(getError(e))})},e.$watch(function(){return n.getActiveRepository()},function(){e.activeRepository()&&e.getClassInstancesDetails()}),e.validateUri=function(t){let r=!0;const o=t||"";if(-1===o.indexOf(":"))r=!1;else{const t=o.substring(0,o.indexOf(":"));if(""===i.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)&&(r=!1);const e=o.match(/\//g);(void 0===e||e.length<3)&&(r=!1)}else o.substring(o.indexOf(":")+1).trim().length<1&&(r=!1)}return r}}function h(e,t,r){e.trig=r,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("ExploreCtrl",m).controller("EditResourceCtrl",g).controller("ViewTrigCtrl",h),m.$inject=["$scope","$location","toastr","$routeParams","$repositories","$uibModal","ClassInstanceDetailsService","ModalService","RDF4JRepositoriesRestService","FileTypes","$jwtAuth","$translate","$q","ExploreRestService"],g.$inject=["$scope","$http","$location","toastr","$repositories","$uibModal","$timeout","ClassInstanceDetailsService","StatementsService","RDF4JRepositoriesRestService","$translate"],h.$inject=["$scope","$uibModalInstance","data"]},39456(e,t,r){r.d(t,{o:()=>o});const o={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},99362(e,t,r){r.d(t,{E:()=>o,L:()=>n});class o{constructor(e,t){this.id=e,this.labelKey=t}static getAllType(){return[n.ALL,n.EXPLICIT,n.IMPLICIT]}static getContextType(e){return this.getAllType().find(t=>t.id===e)}}const n={ALL:new o("all","explore.explicit.implicit"),EXPLICIT:new o("explicit","explore.explicit"),IMPLICIT:new o("implicit","explore.implicit")}},85799(e,t,r){r.d(t,{x:()=>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}}},22917(e,t,r){r.d(t,{r:()=>s});var o=r(85799),n=r(99362);class s{constructor(){this.role="subject",this.uri=void 0,this.triple=void 0,this.context=void 0,this.contextType=n.L.EXPLICIT,this.sameAs=!0,this.details=new o.x,this.blanks=!0}}},5533(e,t,r){r.d(t,{T:()=>o});const o={SUBJECT:"subject",PREDICATE:"predicate",OBJECT:"object",CONTEXT:"context",ALL:"all",TRIPLE_TERM:"triple-term"}},23713(e,t,r){var o=r(57154);angular.module("graphdb.framework.rest.explore.rest.service",[]).factory("ExploreRestService",s),s.$inject=["$http"];const n="rest/explore";function s(e){return{getResourceDetails:(t,r,o,s)=>e.get(`${n}/details`,{params:{uri:t,triple:r,context:o},headers:{Accept:s||"application/json"}}),getGraph:(t,r,s)=>e.get(`${n}/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:o.RdfVersionUtil.withVersion(r||"application/x-graphdb-table-results+json"),Link:s?"<"+s+">":""}}).then(e=>e.data)}}},62628(){angular.module("graphdb.workbench.utils.filetypes",[]).value("FileTypes",[{name:"JSON",translateKey:"download.as.json",type:"application/rdf+json",extension:".json"},{name:"JSON-LD",translateKey:"download.as.jsonld",type:"application/ld+json",extension:".jsonld"},{name:"NDJSON-LD",translateKey:"download.as.ndjsonld",type:"application/x-ld+ndjson",extension:".ndjsonld"},{name:"RDF-XML",translateKey:"download.as.rdfxml",type:"application/rdf+xml",extension:".rdf"},{name:"N3",translateKey:"download.as.n3",type:"text/rdf+n3",extension:".n3"},{name:"N-Triples",translateKey:"download.as.ntriples",type:"text/plain",extension:".nt"},{name:"N-Quads",translateKey:"download.as.nquads",type:"text/x-nquads",extension:".nq"},{name:"Turtle",translateKey:"download.as.turtle",type:"text/turtle",extension:".ttl"},{name:"TriX",translateKey:"download.as.trix",type:"application/trix",extension:".trix"},{name:"TriG",translateKey:"download.as.trig",type:"application/x-trig",extension:".trig"},{name:"Binary RDF",translateKey:"download.as.binaryrdf",type:"application/x-binary-rdf",extension:".brf"}])}};
2
- //# sourceMappingURL=10027.209fde0e712bf6c356d3.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"10027.209fde0e712bf6c356d3.bundle.js","mappings":"8SAsBA,MAAMA,EAAuB,CAACC,EAAAA,EAASC,QAASD,EAAAA,EAASE,UAAWF,EAAAA,EAASG,OAAQH,EAAAA,EAASI,QAASJ,EAAAA,EAASK,KAoChH,SAASC,EACLC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GACA,MAAMC,GAAyBC,EAAAA,EAAAA,SAAQC,EAAAA,wBACjCC,GAAqBF,EAAAA,EAAAA,SAAQG,EAAAA,oBAanC,IAAIC,EAXJnB,EAAOoB,aAAeA,EAAAA,EACtBpB,EAAOqB,aAAeC,EAAAA,EAAYC,aAClCvB,EAAOwB,qBAAuBJ,EAAAA,EAAaK,SAASC,GACpD1B,EAAO2B,MAAQ,CAAClC,EAAAA,EAASmC,eAAgBpC,GAEzCQ,EAAO6B,kBAAeC,EAGtB9B,EAAO+B,WAAY,EACnB/B,EAAOgC,UAAYvB,EAOnBT,EAAOiC,aAAe,KAClBjC,EAAO6B,aAAaK,QAAUlC,EAAO6B,aAAaK,OAClDlC,EAAOmC,mBAGXnC,EAAOoC,oBAAsB,IAClBhC,EAAcgC,sBAGzBpC,EAAOqC,iBAAmB,MACbrC,EAAO6B,cAAcS,OASlCtC,EAAOuC,iBAAoBC,GAChBA,IAAS/C,EAAAA,EAASmC,aAAe5B,EA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qC,EAAAA,eAAeC,YAAYN,GAAU,4CAC/C,KAAQhJ,EAAO,IAAMA,EAAO,IAAM,MAGrCpC,KAAM2L,GAAaA,EAAS7M,MAQzC,C,UCxDA0E,QAAQ4G,OAAO,oCAAqC,IAC/C9C,MAAM,YAAa,CAChB,CAACrF,KAAM,OAAQ2J,aAAc,mBAAoBnL,KAAM,uBAAwBU,UAAW,SAC1F,CAACc,KAAM,UAAW2J,aAAc,qBAAsBnL,KAAM,sBAAuBU,UAAW,WAC9F,CAACc,KAAM,YAAa2J,aAAc,uBAAwBnL,KAAM,0BAA2BU,UAAW,aACtG,CAACc,KAAM,UAAW2J,aAAc,qBAAsBnL,KAAM,sBAAuBU,UAAW,QAC9F,CAACc,KAAM,KAAM2J,aAAc,iBAAkBnL,KAAM,cAAeU,UAAW,OAC7E,CAACc,KAAM,YAAa2J,aAAc,uBAAwBnL,KAAM,aAAcU,UAAW,OACzF,CAACc,KAAM,UAAW2J,aAAc,qBAAsBnL,KAAM,gBAAiBU,UAAW,OACxF,CAACc,KAAM,SAAU2J,aAAc,qBAAsBnL,KAAM,cAAeU,UAAW,QACrF,CAACc,KAAM,OAAQ2J,aAAc,mBAAoBnL,KAAM,mBAAoBU,UAAW,SACtF,CAACc,KAAM,OAAQ2J,aAAc,mBAAoBnL,KAAM,qBAAsBU,UAAW,SACxF,CAACc,KAAM,aAAc2J,aAAc,wBAAyBnL,KAAM,2BAA4BU,UAAW,S","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/explore/controllers.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ontotext-yasgui/rendering-mode.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/resource/context-type.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/resource/resource-details.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/resource/resource-info.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/resource/role-type.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/rest/explore.rest.service.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/utils/file-types.js"],"sourcesContent":["import 'angular/utils/file-types';\nimport 'angular/rest/explore.rest.service';\nimport {saveAs} from 'lib/FileSaver-patch';\nimport {ResourceInfo} from \"../models/resource/resource-info\";\nimport {ContextType, ContextTypes} from \"../models/resource/context-type\";\nimport {RoleType} from \"../models/resource/role-type\";\nimport {RenderingMode} from \"../models/ontotext-yasgui/rendering-mode\";\nimport {DISABLE_YASQE_BUTTONS_CONFIGURATION} from \"../core/directives/yasgui-component/yasgui-component-directive.util\";\nimport * as jsonld from 'jsonld';\nimport {ExportSettingsCtrl} from \"../core/components/export-settings-modal/controller\";\nimport {\n GraphConfigService,\n openInNewTab,\n SecurityContextService,\n service,\n} from '@ontotext/workbench-api';\nimport {ObjectUtils} from '../utils/object-utils';\n\n/**\n * The roles which apply to a resource which is not a triple term.\n * @type {string[]}\n */\nconst PLAIN_RESOURCE_ROLES = [RoleType.SUBJECT, RoleType.PREDICATE, RoleType.OBJECT, RoleType.CONTEXT, RoleType.ALL];\n\nconst modules = [\n 'ngCookies',\n 'ngRoute',\n 'ui.bootstrap',\n 'toastr',\n 'graphdb.framework.core',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.explore.services',\n 'graphdb.workbench.utils.filetypes',\n 'graphdb.framework.rest.explore.rest.service',\n];\n\nangular\n .module('graphdb.framework.explore.controllers', modules)\n .controller('ExploreCtrl', ExploreCtrl)\n .controller('EditResourceCtrl', EditResourceCtrl)\n .controller('ViewTrigCtrl', ViewTrigCtrl);\n\nExploreCtrl.$inject = [\n '$scope',\n '$location',\n 'toastr',\n '$routeParams',\n '$repositories',\n '$uibModal',\n 'ClassInstanceDetailsService',\n 'ModalService',\n 'RDF4JRepositoriesRestService',\n 'FileTypes',\n '$jwtAuth',\n '$translate',\n '$q',\n 'ExploreRestService'];\n\nfunction ExploreCtrl(\n $scope,\n $location,\n toastr,\n $routeParams,\n $repositories,\n $uibModal,\n ClassInstanceDetailsService,\n ModalService,\n RDF4JRepositoriesRestService,\n FileTypes,\n $jwtAuth,\n $translate,\n $q,\n ExploreRestService) {\n const securityContextService = service(SecurityContextService);\n const graphConfigService = service(GraphConfigService);\n\n $scope.ContextTypes = ContextTypes;\n $scope.contextTypes = ContextType.getAllType();\n $scope.currentContextTypeId = ContextTypes.EXPLICIT.id;\n $scope.roles = [RoleType.TRIPLE_TERM, ...PLAIN_RESOURCE_ROLES];\n\n $scope.resourceInfo = undefined;\n\n // Defaults\n $scope.isLoading = false;\n $scope.fileTypes = FileTypes;\n\n let usedPrefixes;\n\n // =========================\n // Public functions\n // =========================\n $scope.toggleSameAs = () => {\n $scope.resourceInfo.sameAs = !$scope.resourceInfo.sameAs;\n $scope.exploreResource();\n };\n\n $scope.getActiveRepository = () => {\n return $repositories.getActiveRepository();\n };\n\n $scope.isTripleResource = () => {\n return !!$scope.resourceInfo?.triple;\n };\n\n /**\n * The \"triple term\" role applies to triple terms only, so its tab is not rendered for any other resource.\n *\n * @param {string} role the role of the tab\n * @return {boolean} true if the tab of the given role has to be rendered\n */\n $scope.isRoleTabVisible = (role) => {\n return role !== RoleType.TRIPLE_TERM || $scope.isTripleResource();\n };\n\n /**\n * Shortens the IRIs of a triple term to their local names, e.g.\n * <<(<http://example.com/s> <http://example.com/p> <http://example.com/o>)>> becomes <<(<s> <p> <o>)>>.\n * Blank nodes and literals are left as they are.\n *\n * @param {string} tripleTerm the triple term, wrapped in <<( )>>\n * @return {string} the triple term with its IRIs replaced by their local names\n */\n $scope.getTripleTermLocalNames = (tripleTerm) => {\n return tripleTerm.replace(/<([^<>\\s]*)>/g, (match, iri) => `<${ClassInstanceDetailsService.getLocalName(iri)}>`);\n };\n\n /**\n * Builds a link to the SPARQL editor holding a query which looks up all statements\n * that have the given triple term as their object.\n *\n * @param {string} tripleTerm the triple term, wrapped in <<( )>>\n * @return {string} a relative link to the SPARQL editor with the query as a parameter\n */\n $scope.getTripleTermLookupLink = (tripleTerm) => {\n const query = `SELECT ?s ?p ?tt\nWHERE {\n VALUES ?tt {\n ${tripleTerm}\n }\n ?s ?p ?tt .\n}`;\n return `sparql?query=${encodeURIComponent(query)}`;\n };\n\n $scope.getLocalName = (uri) => {\n return ClassInstanceDetailsService.getLocalName(uri);\n };\n\n const initResourceReference = (resourceInfo) => {\n if ($routeParams.prefix && $routeParams.localName && usedPrefixes[$routeParams.prefix]) {\n // /resource/PREFIX/LOCAL -> URI = expanded PREFIX + LOCAL\n resourceInfo.uri = usedPrefixes[$routeParams.prefix] + $routeParams.localName;\n } else if ($location.search().uri) {\n // uri parameter -> URI\n resourceInfo.uri = $location.search().uri + ($location.hash() ? '#' + $location.hash() : '');\n } else if ($location.search().triple) {\n // uri parameter -> URI\n resourceInfo.triple = $location.search().triple + ($location.hash() ? '#' + $location.hash() : '');\n } else {\n // absolute URI -> URI\n resourceInfo.uri = $location.absUrl();\n }\n // remove angle brackets which were allowed when filling out the search input field\n // but are forbidden when passing the uri as a query parameter\n resourceInfo.uri = resourceInfo.uri && resourceInfo.uri.replace(/<|>/g, \"\");\n };\n\n $scope.loadResource = () => {\n // Get resource details\n ExploreRestService.getResourceDetails($scope.resourceInfo.uri, $scope.resourceInfo.triple, $scope.resourceInfo.context)\n .success((data) => {\n $scope.resourceInfo.details = data;\n $scope.resourceInfo.context = $scope.resourceInfo.details.context;\n if ($scope.resourceInfo.uri !== 'object') {\n $scope.resourceInfo.details.encodeURI = encodeURIComponent($scope.resourceInfo.details.uri);\n }\n })\n .error((data) => toastr.error($translate.instant('explore.error.resource.details', {data: getError(data)})));\n\n $scope.exploreResource();\n };\n\n $scope.isContextAvailable = () => {\n return $scope.resourceInfo.context !== null && $scope.resourceInfo.context === \"http://rdf4j.org/schema/rdf4j#SHACLShapeGraph\";\n };\n\n $scope.goToGraphsViz = ({detail: payload}) => {\n if (payload.action === 'create') {\n openInNewTab('graphs-visualizations');\n return;\n }\n\n $location\n .path('graphs-visualizations')\n .search('uri', $scope.resourceInfo.uri)\n .search('config', payload.graphConfig?.id);\n };\n\n $scope.goToGraphNavigator = () => {\n $location\n .path('graph-navigator')\n .search('uri', $scope.resourceInfo.uri);\n };\n\n $scope.fetchGraphConfigs = () => {\n return () => graphConfigService.getGraphConfigs().then((graphConfigs) => graphConfigs.getItems());\n };\n\n // Get resource table\n $scope.exploreResource = () => {\n toggleOntoLoader(true);\n if (ObjectUtils.isNullOrUndefined($routeParams.context)) {\n $scope.resourceInfo.context = $routeParams.context;\n }\n // Remember the role in the URL so the URL is stable and leads back to the same view\n $location.search('role', $scope.resourceInfo.role);\n // Changing the URL parameters adds a history entry in the browser history, and this causes incorrect behavior of the browser's back button functionality.\n // To resolve this issue, we replace the current URL without adding a new history entry.\n $location.replace();\n getGraph();\n };\n\n $scope.downloadExport = (fileType) => {\n ExploreRestService.getGraph($scope.resourceInfo, fileType.type)\n .then((data) => {\n if (fileType.type.indexOf('json') > -1) {\n data = JSON.stringify(data);\n }\n // TODO: Use bowser library to get the browser type\n const ua = navigator.userAgent.toLowerCase();\n if (ua.indexOf('safari') !== -1 && ua.indexOf('chrome') === -1) {\n window.open('data:attachment/csv;filename=\"statements.' + fileType.extension + '\",' + encodeURIComponent(data), 'statements.' + fileType.extension);\n } else {\n const file = new Blob([data], {type: fileType.type});\n saveAs(file, 'statements' + fileType.extension);\n }\n })\n .catch((error) => {\n toastr.error(getError(error), $translate.instant('common.error'));\n })\n .finally(() => {\n toggleOntoLoader(false);\n });\n };\n\n $scope.openJSONLDExportSettings = function(format) {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/core/components/export-settings-modal/exportSettingsModal.html',\n controller: ExportSettingsCtrl,\n size: 'lg',\n scope: $scope,\n resolve: {\n format: function() {\n return format.name;\n },\n },\n });\n\n modalInstance.result.then(function(data) {\n $scope.downloadJSONLDExport(format, data.link, data.currentMode);\n });\n };\n\n $scope.downloadJSONLDExport = function(format, link, mode) {\n ExploreRestService.getGraph($scope.resourceInfo, format.type, link)\n .then(async function(data) {\n if (format.name === \"JSON\") {\n data = JSON.stringify(data);\n }\n\n if (format.name === 'JSON-LD') {\n switch (mode.name) {\n case \"expanded\":\n data = await jsonld.expand(data);\n data = JSON.stringify(data);\n break;\n case \"flattened\":\n data = await jsonld.flatten(data, link);\n data = JSON.stringify(data);\n break;\n case \"compacted\":\n data = await jsonld.compact(data, link);\n data = JSON.stringify(data);\n break;\n case \"context\":\n data = await jsonld.context(data, link);\n data = JSON.stringify(data);\n break;\n case \"frame\":\n data = await jsonld.frame(data, link);\n data = JSON.stringify(data);\n break;\n case \"framed\":\n data = await jsonld.compact(data, link);\n data = JSON.stringify(data);\n break;\n }\n }\n // TODO: Use bowser library to get the browser type\n const ua = navigator.userAgent.toLowerCase();\n if (ua.indexOf('safari') !== -1 && ua.indexOf('chrome') === -1) {\n window.open('data:attachment/csv;filename=\"statements.' + format.extension + '\",' + encodeURIComponent(data), 'statements.' + format.extension);\n } else {\n const file = new Blob([data], {type: format.type});\n saveAs(file, 'statements' + format.extension);\n }\n }).catch(function(data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n });\n };\n\n $scope.changeRole = (role) => {\n if ($scope.resourceInfo.triple) {\n return;\n }\n $scope.resourceInfo.role = role;\n if ($scope.resourceInfo.role === RoleType.CONTEXT) {\n $scope.resourceInfo.contextType = ContextTypes.EXPLICIT;\n }\n $scope.exploreResource();\n };\n\n $scope.changeInference = (contextTypeId) => {\n $scope.resourceInfo.contextType = ContextType.getContextType(contextTypeId);\n $scope.exploreResource();\n };\n\n $scope.copyToClipboardResult = (uri) => {\n ModalService.openCopyToClipboardModal(uri);\n };\n\n /**\n * ================================================\n * Cypress test support — global exposure hack ️\n * ================================================\n * `jsonld` id imported as local ES modules\n * and is not available in the global `window` scope at runtime.\n *\n * However, Cypress tests often rely on mocking/stubbing or spying on\n * functions like `jsonld.compact()` to isolate behavior.\n *\n * Cypress’ `cy.stub(win, 'someFunction')` only works for **own properties**\n * of the `window` object. That means: unless `jsonld` is explicitly attached\n * to `window`, Cypress cannot replace or observe it.\n *\n * This block ensures that in cypress mode (`window.Cypress`),\n * we attach `jsonld` to `window`, making it accessible\n * to Cypress tests that need to stub or assert usage.\n */\n if (window.Cypress) {\n window.jsonld = jsonld;\n }\n\n // =========================\n // Private functions\n // =========================\n const initComponent = () => {\n const principal = securityContextService.getAuthenticatedUser();\n $repositories.getPrefixes($repositories.getActiveRepository())\n .then((usedPrefixesResponse) => {\n initResourceInfo();\n setInferAndSameAs(principal);\n usedPrefixes = usedPrefixesResponse;\n $scope.loadResource();\n })\n .catch((error) => {\n toastr.error($translate.instant('get.namespaces.error.msg', {error: getError(error)}));\n });\n };\n\n const initResourceInfo = () => {\n if ($scope.resourceInfo) {\n return;\n }\n $scope.resourceInfo = new ResourceInfo();\n initResourceReference($scope.resourceInfo);\n\n if (ObjectUtils.isNullOrUndefined($routeParams.context)) {\n $scope.resourceInfo.context = $routeParams.context;\n }\n\n $scope.resourceInfo.role = resolveRole();\n };\n\n /**\n * Resolves the role of the loaded resource. A triple term always takes the \"triple term\" role, and that\n * role applies to nothing else, so an unknown role, or a \"triple term\" role, coming from the url is\n * discarded for any other resource in favour of the default one.\n *\n * @return {string} the role of the loaded resource\n */\n const resolveRole = () => {\n if ($scope.resourceInfo.triple) {\n return RoleType.TRIPLE_TERM;\n }\n const role = $location.search().role;\n return PLAIN_RESOURCE_ROLES.includes(role) ? role : RoleType.SUBJECT;\n };\n\n const toggleOntoLoader = (showLoader) => {\n $scope.isLoading = !!showLoader;\n };\n\n const updateYasguiConfiguration = (additionalConfiguration = {}) => {\n const config = {};\n angular.extend(config, $scope.yasguiConfig || getDefaultYasguiConfiguration(), additionalConfiguration);\n $scope.yasguiConfig = config;\n };\n\n const getDefaultYasguiConfiguration = () => {\n return {\n showEditorTabs: false,\n showToolbar: false,\n showResultTabs: false,\n showFullscreenButton: false,\n showResultInfo: true,\n downloadAsOn: false,\n showQueryButton: false,\n componentId: 'resource-view-component',\n prefixes: usedPrefixes,\n maxPersistentResponseSize: 0,\n render: RenderingMode.YASR,\n showYasqeActionButtons: false,\n yasqeActionButtons: DISABLE_YASQE_BUTTONS_CONFIGURATION,\n };\n };\n\n const getGraph = () => {\n ExploreRestService.getGraph($scope.resourceInfo)\n .then((data) => {\n updateYasguiConfiguration({sparqlResponse: data});\n })\n .catch((error) => {\n toastr.error($translate.instant('explore.error.resource', {data: getError(error)}));\n })\n .finally(() => {\n toggleOntoLoader(false);\n });\n };\n\n const setInferAndSameAs = (principal) => {\n // Get the predefined settings for sameAs and inference per user\n $scope.resourceInfo.contextType = principal.appSettings['DEFAULT_INFERENCE'] && !$scope.resourceInfo.role === RoleType.CONTEXT ? ContextTypes.ALL : ContextTypes.EXPLICIT;\n $scope.resourceInfo.sameAs = principal.appSettings['DEFAULT_INFERENCE'] && principal.appSettings['DEFAULT_SAMEAS'];\n };\n\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n // =========================\n // Event handler functions\n // =========================\n\n $scope.$on('$destroy', removeAllListeners);\n const subscriptions = [];\n\n // Wait until the active repository object is set, otherwise \"canWriteActiveRepo()\" may return a wrong result and the \"ontotext-yasgui\"\n // readOnly configuration may be incorrect.\n subscriptions.push($scope.$watch(function() {\n return $scope.getActiveRepositoryObject();\n }, function(activeRepo) {\n if (activeRepo) {\n initComponent();\n }\n }));\n}\n\nEditResourceCtrl.$inject = ['$scope', '$http', '$location', 'toastr', '$repositories', '$uibModal', '$timeout', 'ClassInstanceDetailsService', 'StatementsService', 'RDF4JRepositoriesRestService', '$translate'];\n\nfunction EditResourceCtrl($scope, $http, $location, toastr, $repositories, $uibModal, $timeout, ClassInstanceDetailsService, StatementsService, RDF4JRepositoriesRestService, $translate) {\n $scope.uriParam = $location.search().uri;\n $scope.newRow = {\n subject: $scope.uriParam,\n object: {\n type: 'uri',\n datatype: '',\n },\n };\n $scope.newResource = false;\n $scope.datatypeOptions = StatementsService.getDatatypeOptions();\n\n $scope.activeRepository = function() {\n return $repositories.getActiveRepository();\n };\n\n $scope.getClassInstancesDetails = getClassInstancesDetails;\n $scope.addStatement = addStatement;\n $scope.removeStatement = removeStatement;\n $scope.getLocalName = getLocalName;\n $scope.checkValid = checkValid;\n $scope.validEditRow = validEditRow;\n $scope.viewTrig = viewTrig;\n $scope.save = save;\n\n function getClassInstancesDetails() {\n RDF4JRepositoriesRestService.getNamespaces($scope.activeRepository())\n .success(function(data) {\n $scope.namespaces = data.results.bindings.map(function(e) {\n return {\n prefix: e.prefix.value,\n uri: e.namespace.value,\n };\n });\n $scope.loader = false;\n }).error(function(data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n\n ClassInstanceDetailsService.getDetails($scope.uriParam)\n .success(function(data) {\n $scope.details = data;\n $scope.details.encodeURI = encodeURIComponent($scope.details.uri);\n }).error(function(data) {\n toastr.error($translate.instant('explore.error.resource.details', {data: getError(data)}));\n });\n\n ClassInstanceDetailsService.getGraph($scope.uriParam)\n .then(function(res) {\n const statements = StatementsService.buildStatements(res, $scope.uriParam);\n $scope.statements = statements;\n $scope.newResource = !statements.length;\n });\n }\n\n $scope.$watch(function() {\n return $repositories.getActiveRepository();\n }, function() {\n if ($scope.activeRepository()) {\n $scope.getClassInstancesDetails();\n }\n });\n\n $scope.validateUri = function(val) {\n let check = true;\n const text = val ? val : '';\n\n if (text.indexOf(':') === -1) {\n check = false;\n } else {\n const prefix = text.substring(0, text.indexOf(':'));\n const uriForPrefixNotAvailable = ClassInstanceDetailsService.getNamespaceUriForPrefix($scope.namespaces, prefix) === '';\n if (uriForPrefixNotAvailable) {\n // TODO: There's this reported useless escape character for this regex, but I'm not sure if and can I fix it.\n if (/^(http:\\/\\/www\\.|https:\\/\\/www\\.|http:\\/\\/|https:\\/\\/)[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,5}(:[0-9]{1,5})?(\\/.*)?$/.test(text) === false) {\n check = false;\n }\n\n const count = text.match(/\\//g);\n\n if (count === undefined || count.length < 3) {\n check = false;\n }\n } else {\n const restText = text.substring(text.indexOf(':') + 1).trim();\n if (restText.length < 1) {\n check = false;\n }\n }\n }\n\n return check;\n };\n\n function addStatement() {\n $scope.newRowPredicate.$setSubmitted();\n $scope.newRowObject.$setSubmitted();\n $scope.newRowContext.$setSubmitted();\n if ($scope.newRowPredicate.$valid && $scope.newRowObject.$valid && $scope.newRowContext.$valid) {\n $scope.statements.push(_.cloneDeep($scope.newRow));\n $scope.newRow = {\n subject: $scope.uriParam,\n object: {\n type: 'uri',\n datatype: '',\n },\n };\n $scope.newRowPredicate.$setPristine();\n $scope.newRowPredicate.$setUntouched();\n $scope.newRowObject.$setPristine();\n $scope.newRowObject.$setUntouched();\n $scope.newRowContext.$setPristine();\n $scope.newRowContext.$setUntouched();\n }\n }\n\n function checkValid(data) {\n if (!angular.isUndefined(data)) {\n return true;\n }\n return $translate.instant('explore.validation');\n }\n\n function validEditRow() {\n return $scope.rowform.$valid;\n }\n\n function removeStatement(idx) {\n $scope.statements.splice(idx, 1);\n }\n\n function getLocalName(uri) {\n return ClassInstanceDetailsService.getLocalName(uri);\n }\n\n function viewTrig() {\n $uibModal.open({\n templateUrl: 'js/angular/explore/templates/viewTrig.html',\n controller: 'ViewTrigCtrl',\n size: 'lg',\n resolve: {\n data: function() {\n return StatementsService.transformToTrig($scope.statements);\n },\n },\n });\n }\n\n function save() {\n const method = $scope.newResource ? 'POST' : 'PUT';\n $http({\n method: method,\n url: 'rest/resource?uri=' + encodeURIComponent($scope.uriParam),\n headers: {\n 'Content-Type': 'application/x-trig',\n },\n data: StatementsService.transformToTrig($scope.statements),\n }).success(function() {\n toastr.success($translate.instant('explore.resource.saved'));\n const timer = $timeout(function() {\n $location.path('resource').search('uri', $scope.uriParam);\n }, 500);\n $scope.$on(\"$destroy\", function() {\n $timeout.cancel(timer);\n });\n }).error(function(data) {\n toastr.error(getError(data));\n });\n }\n}\n\nViewTrigCtrl.$inject = ['$scope', '$uibModalInstance', 'data'];\n\nfunction ViewTrigCtrl($scope, $uibModalInstance, data) {\n $scope.trig = data;\n\n $scope.cancel = function() {\n $uibModalInstance.dismiss('cancel');\n };\n}\n","export const RenderingMode = {\n YASGUI: 'mode-yasgui',\n YASQE: 'mode-yasqe',\n YASR: 'mode-yasr'\n};\n","export class ContextType {\n constructor(id, labelKey) {\n this.id = id;\n this.labelKey = labelKey;\n }\n\n static getAllType() {\n return [ContextTypes.ALL, ContextTypes.EXPLICIT, ContextTypes.IMPLICIT];\n }\n\n static getContextType(id) {\n return this.getAllType().find((contextType) => contextType.id === id);\n }\n}\n\nexport const ContextTypes = {\n 'ALL': new ContextType('all', 'explore.explicit.implicit'),\n 'EXPLICIT': new ContextType('explicit', 'explore.explicit'),\n 'IMPLICIT': new ContextType('implicit', 'explore.implicit')\n};\n","export class ResourceDetails {\n constructor() {\n this.image = undefined;\n this.uri = undefined;\n this.label = undefined;\n this.encodeURI = undefined;\n this.comment = undefined;\n this.context = undefined;\n }\n}\n","import {ResourceDetails} from \"./resource-details\";\nimport {ContextTypes} from \"./context-type\";\n\nexport class ResourceInfo {\n constructor() {\n this.role = 'subject';\n this.uri = undefined;\n this.triple = undefined;\n this.context = undefined;\n this.contextType = ContextTypes.EXPLICIT;\n this.sameAs = true;\n this.details = new ResourceDetails();\n this.blanks = true;\n }\n}\n","export const RoleType = {\n 'SUBJECT': 'subject',\n 'PREDICATE': 'predicate',\n 'OBJECT': 'object',\n 'CONTEXT': 'context',\n 'ALL': 'all',\n 'TRIPLE_TERM': 'triple-term',\n};\n","import {RdfVersionUtil} from '@ontotext/workbench-api';\n\nangular\n .module('graphdb.framework.rest.explore.rest.service', [])\n .factory('ExploreRestService', ExploreRestService);\n\nExploreRestService.$inject = ['$http'];\n\nconst EXPLORE_ENDPOINT = 'rest/explore';\n\nfunction ExploreRestService($http) {\n const getResourceDetails = (uri, triple, context, accept) => {\n return $http.get(`${EXPLORE_ENDPOINT}/details`, {\n params: {\n uri,\n triple,\n context,\n },\n headers: {\n 'Accept': accept || 'application/json',\n },\n });\n };\n\n /**\n * Fetches graph of a resource.\n *\n * @param {ResourceInfo} resourceInfo - holds information about the resource.\n * @param {string} accept - specifies the content type of response.\n * @param {String} link - specifies JSON-LD context/frame link\n * @return {ResourceGraphResponse}\n */\n const getGraph = (resourceInfo, accept, link) => {\n return $http.get(`${EXPLORE_ENDPOINT}/graph`, {\n params: {\n uri: resourceInfo.uri,\n triple: resourceInfo.triple,\n inference: resourceInfo.contextType.id,\n role: resourceInfo.role,\n bnodes: resourceInfo.blanks,\n sameAs: resourceInfo.sameAs,\n context: resourceInfo.context,\n },\n headers: {\n 'Accept': RdfVersionUtil.withVersion(accept || 'application/x-graphdb-table-results+json'),\n 'Link': link ? '<' + link + '>' : \"\",\n },\n })\n .then((response) => response.data);\n };\n\n\n return {\n getResourceDetails,\n getGraph,\n };\n}\n","angular.module('graphdb.workbench.utils.filetypes', [])\n .value('FileTypes', [\n {name: 'JSON', translateKey: 'download.as.json', type: 'application/rdf+json', extension: '.json'},\n {name: 'JSON-LD', translateKey: 'download.as.jsonld', type: 'application/ld+json', extension: '.jsonld'},\n {name: 'NDJSON-LD', translateKey: 'download.as.ndjsonld', type: 'application/x-ld+ndjson', extension: '.ndjsonld'},\n {name: 'RDF-XML', translateKey: 'download.as.rdfxml', type: 'application/rdf+xml', extension: '.rdf'},\n {name: 'N3', translateKey: 'download.as.n3', type: 'text/rdf+n3', extension: '.n3'},\n {name: 'N-Triples', translateKey: 'download.as.ntriples', type: 'text/plain', extension: '.nt'},\n {name: 'N-Quads', translateKey: 'download.as.nquads', type: 'text/x-nquads', extension: '.nq'},\n {name: 'Turtle', translateKey: 'download.as.turtle', type: 'text/turtle', extension: '.ttl'},\n {name: 'TriX', translateKey: 'download.as.trix', type: 'application/trix', extension: '.trix'},\n {name: 'TriG', translateKey: 'download.as.trig', type: 'application/x-trig', extension: '.trig'},\n {name: 'Binary RDF', translateKey: 'download.as.binaryrdf', type: 'application/x-binary-rdf', extension: '.brf'}\n ]);\n"],"names":["PLAIN_RESOURCE_ROLES","RoleType","SUBJECT","PREDICATE","OBJECT","CONTEXT","ALL","ExploreCtrl","$scope","$location","toastr","$routeParams","$repositories","$uibModal","ClassInstanceDetailsService","ModalService","RDF4JRepositoriesRestService","FileTypes","$jwtAuth","$translate","$q","ExploreRestService","securityContextService","service","SecurityContextService","graphConfigService","GraphConfigService","usedPrefixes","ContextTypes","contextTypes","ContextType","getAllType","currentContextTypeId","EXPLICIT","id","roles","TRIPLE_TERM","resourceInfo","undefined","isLoading","fileTypes","toggleSameAs","sameAs","exploreResource","getActiveRepository","isTripleResource","triple","isRoleTabVisible","role","getTripleTermLocalNames","tripleTerm","replace","match","iri","getLocalName","getTripleTermLookupLink","encodeURIComponent","uri","loadResource","getResourceDetails","context","success","data","details","encodeURI","error","instant","getError","isContextAvailable","goToGraphsViz","detail","payload","action","path","search","graphConfig","openInNewTab","goToGraphNavigator","fetchGraphConfigs","getGraphConfigs","then","graphConfigs","getItems","toggleOntoLoader","ObjectUtils","isNullOrUndefined","getGraph","downloadExport","fileType","type","indexOf","JSON","stringify","ua","navigator","userAgent","toLowerCase","window","open","extension","file","Blob","saveAs","catch","finally","openJSONLDExportSettings","format","templateUrl","controller","ExportSettingsCtrl","size","scope","resolve","name","result","downloadJSONLDExport","link","currentMode","mode","async","jsonld","msg","changeRole","contextType","changeInference","contextTypeId","getContextType","copyToClipboardResult","openCopyToClipboardModal","Cypress","resolveRole","includes","showLoader","updateYasguiConfiguration","additionalConfiguration","config","angular","extend","yasguiConfig","showEditorTabs","showToolbar","showResultTabs","showFullscreenButton","showResultInfo","downloadAsOn","showQueryButton","componentId","prefixes","maxPersistentResponseSize","render","RenderingMode","YASR","showYasqeActionButtons","yasqeActionButtons","DISABLE_YASQE_BUTTONS_CONFIGURATION","sparqlResponse","$on","removeAllListeners","subscriptions","forEach","subscription","push","$watch","getActiveRepositoryObject","activeRepo","initComponent","principal","getAuthenticatedUser","getPrefixes","usedPrefixesResponse","initResourceInfo","ResourceInfo","prefix","localName","hash","absUrl","appSettings","setInferAndSameAs","EditResourceCtrl","$http","$timeout","StatementsService","uriParam","newRow","subject","object","datatype","newResource","datatypeOptions","getDatatypeOptions","activeRepository","getClassInstancesDetails","getNamespaces","namespaces","results","bindings","map","e","value","namespace","loader","getDetails","res","statements","buildStatements","length","addStatement","newRowPredicate","$setSubmitted","newRowObject","newRowContext","$valid","_","cloneDeep","$setPristine","$setUntouched","removeStatement","idx","splice","checkValid","isUndefined","validEditRow","rowform","viewTrig","transformToTrig","save","method","url","headers","timer","cancel","validateUri","val","check","text","substring","getNamespaceUriForPrefix","test","count","trim","ViewTrigCtrl","$uibModalInstance","trig","dismiss","module","$inject","YASGUI","YASQE","constructor","labelKey","this","IMPLICIT","find","ResourceDetails","image","label","comment","blanks","factory","EXPLORE_ENDPOINT","accept","get","params","inference","bnodes","RdfVersionUtil","withVersion","response","translateKey"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_esm_id__=43239;export const __webpack_esm_ids__=[43239];export const __webpack_esm_modules__={29229(e,t,i){function a(e,t=300){let i;return(...a)=>{clearTimeout(i),i=setTimeout(()=>e.apply(this,a),t)}}i.d(t,{d:()=>a})},53325(e,t,i){i.d(t,{L:()=>n});var a=i(57154);class n{static get logger(){return a.Loggers.getLoggerInstance("SharedComponents")}}},43239(e,t,i){i.r(t),i.d(t,{onto_layout:()=>c});var a=i(18072),n=i(29229),s=i(57154),o=i(19003);i(53325);const r="main-content",c=class{constructor(e){(0,a.r)(this,e),this.authenticationService=(0,s.service)(s.AuthenticationService),this.authorizationService=(0,s.service)(s.AuthorizationService),this.navigationContextService=(0,s.service)(s.NavigationContextService),this.authStorageService=(0,s.service)(s.AuthenticationStorageService),this.runtimeConfigurationContextService=(0,s.service)(s.RuntimeConfigurationContextService),this.eventService=(0,s.service)(s.EventService),this.applicationLifecycleContextService=(0,s.service)(s.ApplicationLifecycleContextService),this.fullJwtKey=`${s.StorageKey.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.jwtKey}`,this.fullAuthenticatedKey=`${s.StorageKey.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.authenticatedKey}`,this.authEvents=[this.fullJwtKey,this.fullAuthenticatedKey],this.isLowResolution=!1,this.showHeader=this.isAuthenticatedFully(),this.showNavbar=!1,this.isEmbedded=!1,this.loading=!0,this.subscriptions=new s.SubscriptionList,this.isNavbarCollapsed=!1,this.shouldFocusMainContentAfterLoading=!1,this.isPageChanging=!1,this.onSkipLinkClick=e=>{e.preventDefault(),this.focusMainContent()},this.handleStorageChange=e=>{(0,s.service)(s.LocalStorageSubscriptionHandlerService).handleStorageChange(e),this.handleAuthChange(e.key)},this.windowResizeObserver=(0,n.d)(()=>this.windowResizeHandler(),50),s.WindowService.getWindow().addEventListener("storage",this.handleStorageChange)}componentWillLoad(){this.applicationLifecycleContextService.getApplicationsState()&&(this.loading=!1),this.keepMainContentInPlace()}componentDidRender(){this.windowResizeHandler(),this.shouldFocusMainContentAfterLoading&&!this.loading&&(this.shouldFocusMainContentAfterLoading=!1,((0,o.i)()||this.isFocusInNavbar())&&this.focusMainContent())}connectedCallback(){this.subscribeToSecurityChanges(),this.updateVisibility(),this.subscribeToNavigationEnd(),this.subscribeToRuntimeConfigurationChanges(),this.subscribeToNavigationStart(),this.subscribeToBeforeMountRouting()}disconnectedCallback(){this.subscriptions.unsubscribeAll()}render(){return(0,a.h)(a.a,{key:"cf3499ffab935630b1a6f5418707e125d49bea64",class:{"wb-layout":!0,"is-embedded":this.isEmbedded,"hide-navbar":!this.showNavbar,loading:this.loading}},!this.isEmbedded&&this.showNavbar&&(0,a.h)("a",{key:"b5cbb0f69e2a7684c96a28be6f0b33cf0ce92f1e",class:"skip-link",href:`#${r}`,onClick:this.onSkipLinkClick},(0,a.h)("translate-label",{key:"48bc88ceb3d26c655a057df035494c8c73c1525a",labelKey:"layout.skip_to_main_content"})),(0,a.h)("div",{key:"a9324c1ac2c5ae522e0790a6628c9adc881b4442",class:"default-slot-wrapper"},(0,a.h)("slot",{key:"fb79a12af9f53ecc5a3760638e65e1b7bd362542",name:"default"})),!this.isEmbedded&&(0,a.h)("div",{key:"53d252627426b22677b512c169c55615b00fc8af",class:"wb-header"},(0,a.h)("header",{key:"7878ea9d5a00c19c83020b0a13fa79d493fc21f9"},this.showHeader&&(0,a.h)("onto-header",{key:"57aef16e9fb847c90c5e9a8b600327e0537caed5"}))),!this.isEmbedded&&this.showNavbar&&(0,a.h)("nav",{key:"5e3611d14501c19396d493e16a3539f5cd31bf88",class:"wb-navbar"},(0,a.h)("onto-navbar",{key:"23477f1077adf3a45cc2271351b247450e405041",ref:this.assignNavbarRef(),"navbar-collapsed":this.isLowResolution})),(0,a.h)("slot",{key:"2d33a33a7ede92666a935d8c2a5ca39f52f9cb9b",name:"main"},(0,a.h)("onto-loader",{key:"61910e13a38677899006f35bc4ef41c3c93b4a49",loading:this.loading,targetSelector:"main",size:96,messageText:o.T.translate("common.loading")})),!this.isEmbedded&&(0,a.h)("footer",{key:"3f25bad884d021a76a22ffe028a15e24960974c2",class:"wb-footer"},(0,a.h)("onto-footer",{key:"fa4818df751564c12e0df2a52810286e42c3415b"})))}onNavbarToggled(e){this.isNavbarCollapsed=e.detail.payload,this.isNavbarCollapsed?this.hostElement.classList.add("expanded"):this.hostElement.classList.remove("expanded")}onResize(){this.windowResizeObserver()}handleDocumentKeydown(e){if("Tab"===e.key&&e.shiftKey){const t=document.querySelector('[data-backward-focus-target="true"]');t&&(e.preventDefault(),this.focusBackwardTargetInNav(t))}}handleGlobalFocus(e){const t=document.querySelector('[data-backward-focus-target="true"]');t&&e.target.getAttribute("id")!==r&&delete t.dataset.backwardFocusTarget}focusMainContent(){var e;null===(e=document.getElementById(r))||void 0===e||e.focus()}windowResizeHandler(){var e,t,i,a,n;this.isLowResolution=s.WindowService.getWindow().innerWidth<=768;const o=document.querySelector(".navbar-component"),r=null!==(i=null===(t=null===(e=document.querySelector(".wb-header"))||void 0===e?void 0:e.getBoundingClientRect())||void 0===t?void 0:t.height)&&void 0!==i?i:0;if(document.documentElement.style.setProperty("--wb-header-height",`${r}px`),o){const e=document.querySelector(".cookie-consent-banner"),t=null!==(n=null===(a=null==e?void 0:e.getBoundingClientRect())||void 0===a?void 0:a.height)&&void 0!==n?n:0;o.style.height=`calc(100% - ${r}px - ${t}px)`}this.isLowResolution||this.isNavbarCollapsed?this.hostElement.classList.add("expanded"):this.hostElement.classList.remove("expanded")}handleAuthChange(e){var t;e&&this.authEvents.includes(e)&&(this.authStorageService.isAuthenticated()?(0,s.navigate)(null!==(t=this.navigationContextService.getPreviousRoute())&&void 0!==t?t:"./"):(0,s.isLoginPage)()||(0,s.navigateToLoginPage)(),s.WindowService.getWindow().location.reload())}focusBackwardTargetInNav(e){var t,i;if(null==e?void 0:e.classList.contains("sub-menu-link")){const a=null===(i=null===(t=e.parentElement)||void 0===t?void 0:t.parentElement)||void 0===i?void 0:i.previousElementSibling;"false"===(null==a?void 0:a.getAttribute("aria-expanded"))&&a.click()}setTimeout(()=>{e.focus(),delete e.dataset.backwardFocusTarget},10)}keepMainContentInPlace(){const e=this.hostElement,t=e.insertBefore.bind(e);e.insertBefore=(i,a)=>i.parentNode===e&&"MAIN"===i.nodeName&&a===e.firstChild?i:t(i,a)}subscribeToSecurityChanges(){const e=(0,s.service)(s.SecurityContextService);this.subscriptions.add(e.onAuthenticatedUserChanged(e=>{this.authenticatedUser=e,this.updateVisibility()})),this.subscriptions.add(e.onSecurityConfigChanged(e=>{this.securityConfig=e,this.updateVisibility()})),this.subscriptions.add(this.eventService.subscribe(s.EventName.LOGIN,()=>{this.setNavbarItemVisibility(),this.updateVisibility()})),this.subscriptions.add(this.eventService.subscribe(s.EventName.LOGGED_OUT,()=>{this.setNavbarItemVisibility(),this.updateVisibility(),(0,s.navigateToLoginPage)()}))}subscribeToRuntimeConfigurationChanges(){this.subscriptions.add(this.runtimeConfigurationContextService.onRuntimeConfigurationChanged(e=>{var t;this.isEmbedded=null!==(t=null==e?void 0:e.isEmbedded)&&void 0!==t&&t}))}updateVisibility(){this.authenticationService.isSecurityEnabled()?(this.showHeader=this.authenticationService.isAuthenticated()||this.authorizationService.hasFreeAccess(),this.showNavbar=this.authenticationService.isAuthenticated()||this.authorizationService.hasFreeAccess()):(this.showNavbar=!0,this.showHeader=!0)}isAuthenticatedFully(){return!this.authenticationService.isSecurityEnabled()||this.authenticationService.isAuthenticated()||this.authorizationService.hasFreeAccess()}shouldShowMenu(e){return this.isAuthenticatedFully()&&this.authorizationService.hasRole(e)}assignNavbarRef(){return e=>{this.navbarRef=e,this.navbarRef&&(this.navbarRef.menuItems=s.WindowService.getPluginRegistry().get(s.MainMenuExtensionPoint.NAME),this.setNavbarItemVisibility())}}setNavbarItemVisibility(){var e,t,i;if(!(null===(e=this.navbarRef)||void 0===e?void 0:e.menuItems))return;const a=e=>{var t;e.shouldShow=this.shouldShowMenu(e.role),(null===(t=e.children)||void 0===t?void 0:t.length)&&e.children.forEach(a)};null===(i=null===(t=this.navbarRef)||void 0===t?void 0:t.menuItems)||void 0===i||i.forEach(e=>{e.items.forEach(a)}),this.navbarRef.menuItems=[...this.navbarRef.menuItems]}subscribeToNavigationEnd(){this.subscriptions.add(this.eventService.subscribe(s.EventName.NAVIGATION_END,e=>{this.navigationContextService.updatePreviousRoute(e.oldUrl),this.focusMainContentOnPageChange(e),setTimeout(()=>{this.loading=!1})}))}focusMainContentOnPageChange({oldUrl:e,newUrl:t}){!e||(0,s.isSamePage)(e,t)||!this.isFocusInNavbar()&&!this.isFocusLostOrInMainContent()||this.isFocusInNavbar()&&this.isPointerNavigation()||(this.loading?this.shouldFocusMainContentAfterLoading=!0:this.focusMainContent())}isFocusLostOrInMainContent(){var e;return(0,o.i)()||!!(null===(e=document.getElementById(r))||void 0===e?void 0:e.contains(document.activeElement))}isFocusInNavbar(){var e;return!!(null===(e=document.getElementById("navbar"))||void 0===e?void 0:e.contains(document.activeElement))}isPointerNavigation(){var e,t;const i=null===(e=document.activeElement)||void 0===e?void 0:e.dataset.pointerType;return null===(t=document.activeElement)||void 0===t||delete t.dataset.pointerType,"mouse"===i||"touch"===i||"pen"===i}subscribeToNavigationStart(){this.subscriptions.add(this.eventService.subscribe(s.EventName.NAVIGATION_START,({oldUrl:e,newUrl:t})=>{this.isPageChanging=!e||!t||!(0,s.isSamePage)(e,t);const i=document.querySelector('[data-backward-focus-target="true"]');this.isPageChanging&&"page"===(null==i?void 0:i.dataset.ariaCurrent)&&delete i.dataset.backwardFocusTarget}))}subscribeToBeforeMountRouting(){this.subscriptions.add(this.eventService.subscribe(s.EventName.BEFORE_MOUNT_ROUTING_EVENT,()=>{this.isPageChanging&&(this.loading=!0)}))}get hostElement(){return(0,a.d)(this)}};c.style=':host{display:block;height:100%}.wb-layout{display:grid;grid-template:"header header" auto "nav main" 1fr "nav footer" auto/15rem minmax(200px, 1fr);min-height:100vh;margin:0;}.wb-layout.expanded{grid-template-columns:4.375rem 1fr}.wb-layout.is-embedded{grid-template-columns:1fr;grid-template-areas:"main";padding-top:1rem}.wb-layout.hide-navbar{grid-template:"header" auto "main" 1fr "footer" auto/1fr;}.wb-layout.hide-navbar.expanded{grid-template-columns:1fr}.wb-layout main .main-container{margin-left:0}.wb-layout main{grid-area:main}.wb-layout main:focus{outline:none}.wb-layout.loading main{position:relative;visibility:hidden}.wb-layout .default-slot-wrapper{display:none}.wb-layout .wb-header{grid-area:header;position:sticky;top:0;z-index:999}.wb-layout nav{grid-area:nav}.wb-layout footer{grid-area:footer}.wb-layout .skip-link:not(:focus){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.wb-layout .skip-link:focus{position:fixed;top:0.5rem;left:0.5rem;z-index:1000;display:inline-flex;align-items:center;gap:var(--gw-button-gap);padding:var(--gw-button-padding-y) var(--gw-button-padding-x);border:1px solid var(--gw-button-secondary-border-color);border-radius:var(--gw-button-border-radius);background:var(--gw-background-elevated);color:var(--gw-button-secondary-color);font-family:var(--gw-button-label-typography-font-family);font-size:var(--gw-button-label-typography-font-size);font-weight:var(--gw-button-label-typography-font-weight);line-height:var(--gw-button-label-typography-line-height);text-decoration:none;white-space:nowrap;outline:var(--gw-button-focus-ring-width) var(--gw-button-focus-ring-style) var(--gw-button-secondary-focus-ring-color);outline-offset:var(--gw-button-focus-ring-offset)}.wb-layout .skip-link:focus:hover{border-color:var(--gw-button-secondary-hover-border-color);color:var(--gw-button-secondary-hover-color)}.wb-layout .skip-link:focus:active{border-color:var(--gw-button-secondary-active-border-color);color:var(--gw-button-secondary-active-color)}'},19003(e,t,i){i.d(t,{T:()=>l,e:()=>o,i:()=>r,s:()=>s});var a=i(57154),n=i(53325);function s(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}function o(e){return e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):""}function r(){const e=document.activeElement;return!e||e===document.body}class c{constructor(){this.languageContextService=a.ServiceProvider.get(a.LanguageContextService),this.translationChangedObservers={},this.logger=n.L.logger,this.defaultBundle=this.languageContextService.getDefaultBundle(),this.subscribeToBundleChange()}onTranslate(e,t=[],i=()=>{}){this.translationChangedObservers[e]=this.translationChangedObservers[e]||[];const a={parameters:t,callback:i};return this.translationChangedObservers[e].push(a),i(this.translate(e,t)),()=>{const t=this.translationChangedObservers[e].indexOf(a);-1!==t&&this.translationChangedObservers[e].splice(t,1)}}translate(e,t){return this.translateInLocale(e,t)}translateInLocale(e,t){let i=this.translateFromBundle(this.currentBundle,e);return i||(i=this.translateFromBundle(this.defaultBundle,e)),i?(i=this.applyParameters(i,t),s(i)):(this.logger.warn(`Missing translation for key: [${e}]`),e)}translateFromBundle(e,t){if(!e)return;let i=e[t];return"string"!=typeof i&&(i=this.translateAsJsonObject(e,t)),i}translateAsJsonObject(e,t){if(!t)return;let i=t.split(".");return this.getTranslation(e,i)}getTranslation(e,t){if(!t||!e)return;const i=e[t.splice(0,1)[0]];return 0===t.length?i:"string"!=typeof i?t.length>0?this.getTranslation(i,t):i:void 0}applyParameters(e,t){return t?t.reduce((e,t)=>c.replaceAll(e,t),e):e}static replaceAll(e,t){return t?e.split(`{{${t.key}}}`).join(t.value):e}notifyTranslationsChanged(){Object.keys(this.translationChangedObservers).forEach(e=>{(this.translationChangedObservers[e]||[]).forEach(t=>t.callback(this.translate(e,t.parameters)))})}subscribeToBundleChange(){this.languageChangeSubscription=this.languageContextService.onLanguageBundleChanged(e=>{e&&(this.currentBundle=e,this.notifyTranslationsChanged())})}destroy(){this.languageChangeSubscription&&this.languageChangeSubscription()}}const l=new c}};
2
- //# sourceMappingURL=43239.c76fc77febaf50657b13.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"43239.c76fc77febaf50657b13.bundle.js","mappings":"kIAAA,SAASA,EAASC,EAAMC,EAAO,KAC3B,IAAIC,EACJ,MAAO,IAAIC,KACPC,aAAaF,GACbA,EAAQG,WAAW,IAAML,EAAKM,MAAMC,KAAMJ,GAAOF,GAEzD,C,+DCAA,MAAMO,EAMF,iBAAWC,GACP,OAAOC,EAAAA,QAAQC,kBAXH,mBAYhB,E,0GCRJ,MASMC,EAAkB,eAOlBC,EAAa,MAIfC,WAAAA,CAAYC,IACRC,EAAAA,EAAAA,GAAiBT,KAAMQ,GAIvBR,KAAKU,uBAAwBC,EAAAA,EAAAA,SAAQC,EAAAA,uBACrCZ,KAAKa,sBAAuBF,EAAAA,EAAAA,SAAQG,EAAAA,sBACpCd,KAAKe,0BAA2BJ,EAAAA,EAAAA,SAAQK,EAAAA,0BACxChB,KAAKiB,oBAAqBN,EAAAA,EAAAA,SAAQO,EAAAA,8BAClClB,KAAKmB,oCAAqCR,EAAAA,EAAAA,SAAQS,EAAAA,oCAClDpB,KAAKqB,cAAeV,EAAAA,EAAAA,SAAQW,EAAAA,cAC5BtB,KAAKuB,oCAAqCZ,EAAAA,EAAAA,SAAQa,EAAAA,oCAClDxB,KAAKyB,WAAa,GAAGC,EAAAA,WA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,IAAhBS,EAAKxD,OACE4D,EAEsB,iBAAtBA,EAEHJ,EAAKxD,OAAS,EACP7K,KAAKuO,eAAeE,EAAmBJ,GAE3CI,OALX,CAQJ,CACAR,eAAAA,CAAgBH,EAAaP,GACzB,OAAIA,EACOA,EAAWmB,OAElB,CAACZ,EAAaa,IAAcjC,EAAkCkC,WAAWd,EAAaa,GAAYb,GAE/FA,CACX,CACA,iBAAOc,CAAWd,EAAaa,GAC3B,OAAOA,EAAYb,EAAYQ,MAAM,KAAKK,EAAUxL,SAAS0L,KAAKF,EAAUtC,OAASyB,CACzF,CACAgB,yBAAAA,GACIC,OAAOC,KAAKhP,KAAK8M,6BAA6BhC,QAASmE,KACjCjP,KAAK8M,4BAA4BmC,IAAc,IACvDnE,QAASwC,GAAaA,EAASE,SAASxN,KAAKsF,UAAU2J,EAAW3B,EAASC,eAE7F,CACAN,uBAAAA,GACIjN,KAAKkP,2BAA6BlP,KAAK2M,uBAAuBwC,wBAAyBhB,IAC/EA,IACAnO,KAAKgO,cAAgBG,EACrBnO,KAAK8O,8BAGjB,CACAM,OAAAA,GACQpP,KAAKkP,4BACLlP,KAAKkP,4BAEb,EAEJ,MAAM7J,EAAqB,IAAIqH,C","sources":["webpack://root-config/./packages/shared-components/dist/esm/function-utils-D1ZpXQQS.js","webpack://root-config/./packages/shared-components/dist/esm/logger-provider-BIkLC5Zf.js","webpack://root-config/./packages/shared-components/dist/esm/onto-layout.entry.js","webpack://root-config/./packages/shared-components/dist/esm/translation.service-BIRn4Afp.js"],"sourcesContent":["function debounce(func, wait = 300) {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(() => func.apply(this, args), wait);\n };\n}\n\nexport { debounce as d };\n","import { Loggers } from '@ontotext/workbench-api';\n\nconst MODULE_NAME = 'SharedComponents';\n/**\n * Logger for the Shared Components module.\n */\nclass LoggerProvider {\n /**\n * Gets the logger instance for the Shared Components module.\n *\n * @returns LoggerService instance for the Shared Components module\n */\n static get logger() {\n return Loggers.getLoggerInstance(MODULE_NAME);\n }\n}\n\nexport { LoggerProvider as L };\n","import { r as registerInstance, h, a as Host, d as getElement } from './index-BntG-4Sv.js';\nimport { d as debounce } from './function-utils-D1ZpXQQS.js';\nimport { service, AuthenticationService, AuthorizationService, NavigationContextService, AuthenticationStorageService, RuntimeConfigurationContextService, EventService, ApplicationLifecycleContextService, StorageKey, SubscriptionList, LocalStorageSubscriptionHandlerService, WindowService, navigate, isLoginPage, navigateToLoginPage, SecurityContextService, EventName, MainMenuExtensionPoint, isSamePage } from '@ontotext/workbench-api';\nimport { i as isFocusLost, T as TranslationService } from './translation.service-BIRn4Afp.js';\nimport './logger-provider-BIkLC5Zf.js';\n\nconst RESPONSIVE_BREAKPOINTS = {\n MD: 768};\n/**\n * The width of the window in pixels at which the navbar should collapse.\n */\nconst WINDOW_WIDTH_FOR_COLLAPSED_NAVBAR = RESPONSIVE_BREAKPOINTS.MD;\n\nconst ontoLayoutCss = \":host{display:block;height:100%}.wb-layout{display:grid;grid-template:\\\"header header\\\" auto \\\"nav main\\\" 1fr \\\"nav footer\\\" auto/15rem minmax(200px, 1fr);min-height:100vh;margin:0;}.wb-layout.expanded{grid-template-columns:4.375rem 1fr}.wb-layout.is-embedded{grid-template-columns:1fr;grid-template-areas:\\\"main\\\";padding-top:1rem}.wb-layout.hide-navbar{grid-template:\\\"header\\\" auto \\\"main\\\" 1fr \\\"footer\\\" auto/1fr;}.wb-layout.hide-navbar.expanded{grid-template-columns:1fr}.wb-layout main .main-container{margin-left:0}.wb-layout main{grid-area:main}.wb-layout main:focus{outline:none}.wb-layout.loading main{position:relative;visibility:hidden}.wb-layout .default-slot-wrapper{display:none}.wb-layout .wb-header{grid-area:header;position:sticky;top:0;z-index:999}.wb-layout nav{grid-area:nav}.wb-layout footer{grid-area:footer}.wb-layout .skip-link:not(:focus){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.wb-layout .skip-link:focus{position:fixed;top:0.5rem;left:0.5rem;z-index:1000;display:inline-flex;align-items:center;gap:var(--gw-button-gap);padding:var(--gw-button-padding-y) var(--gw-button-padding-x);border:1px solid var(--gw-button-secondary-border-color);border-radius:var(--gw-button-border-radius);background:var(--gw-background-elevated);color:var(--gw-button-secondary-color);font-family:var(--gw-button-label-typography-font-family);font-size:var(--gw-button-label-typography-font-size);font-weight:var(--gw-button-label-typography-font-weight);line-height:var(--gw-button-label-typography-line-height);text-decoration:none;white-space:nowrap;outline:var(--gw-button-focus-ring-width) var(--gw-button-focus-ring-style) var(--gw-button-secondary-focus-ring-color);outline-offset:var(--gw-button-focus-ring-offset)}.wb-layout .skip-link:focus:hover{border-color:var(--gw-button-secondary-hover-border-color);color:var(--gw-button-secondary-hover-color)}.wb-layout .skip-link:focus:active{border-color:var(--gw-button-secondary-active-border-color);color:var(--gw-button-secondary-active-color)}\";\n\nconst MAIN_CONTENT_ID = 'main-content';\nconst NAVBAR_ID = 'navbar';\nconst POINTER_TYPES = {\n MOUSE: 'mouse',\n TOUCH: 'touch',\n PEN: 'pen'\n};\nconst OntoLayout = class {\n // ========================\n // Lifecycle methods\n // ========================\n constructor(hostRef) {\n registerInstance(this, hostRef);\n // ========================\n // Services\n // ========================\n this.authenticationService = service(AuthenticationService);\n this.authorizationService = service(AuthorizationService);\n this.navigationContextService = service(NavigationContextService);\n this.authStorageService = service(AuthenticationStorageService);\n this.runtimeConfigurationContextService = service(RuntimeConfigurationContextService);\n this.eventService = service(EventService);\n this.applicationLifecycleContextService = service(ApplicationLifecycleContextService);\n this.fullJwtKey = `${StorageKey.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.jwtKey}`;\n this.fullAuthenticatedKey = `${StorageKey.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.authenticatedKey}`;\n this.authEvents = [this.fullJwtKey, this.fullAuthenticatedKey];\n this.isLowResolution = false;\n this.showHeader = this.isAuthenticatedFully();\n this.showNavbar = false;\n this.isEmbedded = false;\n this.loading = true;\n // ========================\n // Private\n // ========================\n /**\n * List of subscriptions to manage component lifecycle\n * */\n this.subscriptions = new SubscriptionList();\n this.isNavbarCollapsed = false;\n /**\n * The main content is hidden while loading and cannot keep the focus, so it is focused after the loading ends.\n */\n this.shouldFocusMainContentAfterLoading = false;\n /**\n * Whether the ongoing navigation changes the page. Query and hash changes keep the page, so the loader is not shown.\n */\n this.isPageChanging = false;\n // ========================\n // Handlers\n // ========================\n this.onSkipLinkClick = (event) => {\n // Keep the hash out of the URL, single-spa would treat it as a route change.\n event.preventDefault();\n this.focusMainContent();\n };\n this.handleStorageChange = (event) => {\n const localStorageSubscriptionHandlerService = service(LocalStorageSubscriptionHandlerService);\n localStorageSubscriptionHandlerService.handleStorageChange(event);\n this.handleAuthChange(event.key);\n };\n this.windowResizeObserver = debounce(() => this.windowResizeHandler(), 50);\n WindowService.getWindow().addEventListener('storage', this.handleStorageChange);\n }\n componentWillLoad() {\n // When GraphDB serves the Workbench, the layout can load after single-spa has mounted the first application and\n // emitted its NAVIGATION_END, which then never reaches the layout and would leave it loading forever.\n if (this.applicationLifecycleContextService.getApplicationsState()) {\n this.loading = false;\n }\n this.keepMainContentInPlace();\n }\n componentDidRender() {\n this.windowResizeHandler();\n if (this.shouldFocusMainContentAfterLoading && !this.loading) {\n this.shouldFocusMainContentAfterLoading = false;\n // The old page content is hidden while loading and drops the focus, so a focused element in the main content\n // belongs to the new page or was focused by the user and must keep the focus.\n if (isFocusLost() || this.isFocusInNavbar()) {\n this.focusMainContent();\n }\n }\n }\n connectedCallback() {\n this.subscribeToSecurityChanges();\n this.updateVisibility();\n this.subscribeToNavigationEnd();\n this.subscribeToRuntimeConfigurationChanges();\n this.subscribeToNavigationStart();\n this.subscribeToBeforeMountRouting();\n }\n /**\n * Lifecycle method called when the component is about to be removed from the DOM.\n * Unsubscribes from all subscriptions to prevent memory leaks.\n */\n disconnectedCallback() {\n this.subscriptions.unsubscribeAll();\n }\n render() {\n return (h(Host, { key: 'cf3499ffab935630b1a6f5418707e125d49bea64', class: {\n 'wb-layout': true,\n 'is-embedded': this.isEmbedded,\n 'hide-navbar': !this.showNavbar,\n 'loading': this.loading\n } }, !this.isEmbedded && this.showNavbar &&\n h(\"a\", { key: 'b5cbb0f69e2a7684c96a28be6f0b33cf0ce92f1e', class: \"skip-link\", href: `#${MAIN_CONTENT_ID}`, onClick: this.onSkipLinkClick }, h(\"translate-label\", { key: '48bc88ceb3d26c655a057df035494c8c73c1525a', labelKey: 'layout.skip_to_main_content' })), h(\"div\", { key: 'a9324c1ac2c5ae522e0790a6628c9adc881b4442', class: \"default-slot-wrapper\" }, h(\"slot\", { key: 'fb79a12af9f53ecc5a3760638e65e1b7bd362542', name: \"default\" })), !this.isEmbedded && h(\"div\", { key: '53d252627426b22677b512c169c55615b00fc8af', class: \"wb-header\" }, h(\"header\", { key: '7878ea9d5a00c19c83020b0a13fa79d493fc21f9' }, this.showHeader && h(\"onto-header\", { key: '57aef16e9fb847c90c5e9a8b600327e0537caed5' }))), !this.isEmbedded && this.showNavbar &&\n h(\"nav\", { key: '5e3611d14501c19396d493e16a3539f5cd31bf88', class: \"wb-navbar\" }, h(\"onto-navbar\", { key: '23477f1077adf3a45cc2271351b247450e405041', ref: this.assignNavbarRef(), \"navbar-collapsed\": this.isLowResolution })), h(\"slot\", { key: '2d33a33a7ede92666a935d8c2a5ca39f52f9cb9b', name: \"main\" }, h(\"onto-loader\", { key: '61910e13a38677899006f35bc4ef41c3c93b4a49', loading: this.loading, targetSelector: 'main', size: 96, messageText: TranslationService.translate('common.loading') })), !this.isEmbedded &&\n h(\"footer\", { key: '3f25bad884d021a76a22ffe028a15e24960974c2', class: \"wb-footer\" }, h(\"onto-footer\", { key: 'fa4818df751564c12e0df2a52810286e42c3415b' }))));\n }\n // ========================\n // Event Listeners\n // ========================\n /**\n * Event listener for the navbar toggled event. The layout needs to respond properly when the navbar is toggled in\n * order to fit the content.\n * @param event\n */\n onNavbarToggled(event) {\n this.isNavbarCollapsed = event.detail.payload;\n if (this.isNavbarCollapsed) {\n this.hostElement.classList.add('expanded');\n }\n else {\n this.hostElement.classList.remove('expanded');\n }\n }\n /**\n * Event listener for window resize event. We need to handle this in order to allow the navbar to collapse when the\n * window is resized.\n */\n onResize() {\n this.windowResizeObserver();\n }\n /**\n * Event listener for document keydown events. Handles backward focus targeting when Shift + Tab is pressed.\n * @param event\n */\n handleDocumentKeydown(event) {\n if (event.key === 'Tab' && event.shiftKey) {\n const backwardFocusTarget = document.querySelector('[data-backward-focus-target=\"true\"]');\n if (backwardFocusTarget) {\n event.preventDefault();\n this.focusBackwardTargetInNav(backwardFocusTarget);\n }\n }\n }\n /**\n * Event listener for global focusin events. Handles cleanup of the backward focus target dataset attribute.\n */\n handleGlobalFocus(event) {\n const backwardFocusTarget = document.querySelector('[data-backward-focus-target=\"true\"]');\n if (backwardFocusTarget && event.target.getAttribute('id') !== MAIN_CONTENT_ID) {\n delete backwardFocusTarget.dataset.backwardFocusTarget;\n }\n }\n focusMainContent() {\n var _a;\n (_a = document.getElementById(MAIN_CONTENT_ID)) === null || _a === void 0 ? void 0 : _a.focus();\n }\n windowResizeHandler() {\n var _a, _b, _c, _d, _e;\n this.isLowResolution = WindowService.getWindow().innerWidth <= WINDOW_WIDTH_FOR_COLLAPSED_NAVBAR;\n const navbar = document.querySelector('.navbar-component');\n const headerHeight = (_c = (_b = (_a = document.querySelector('.wb-header')) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.height) !== null && _c !== void 0 ? _c : 0;\n // Used by the global styles to keep the focused element from being scrolled under the sticky header.\n document.documentElement.style.setProperty('--wb-header-height', `${headerHeight}px`);\n if (navbar) {\n const cookieBanner = document.querySelector('.cookie-consent-banner');\n const bannerHeight = (_e = (_d = cookieBanner === null || cookieBanner === void 0 ? void 0 : cookieBanner.getBoundingClientRect()) === null || _d === void 0 ? void 0 : _d.height) !== null && _e !== void 0 ? _e : 0;\n navbar.style.height = `calc(100% - ${headerHeight}px - ${bannerHeight}px)`;\n }\n if (!this.isLowResolution && !this.isNavbarCollapsed) {\n this.hostElement.classList.remove('expanded');\n }\n else {\n this.hostElement.classList.add('expanded');\n }\n }\n handleAuthChange(changedKey) {\n var _a;\n if (!changedKey) {\n return;\n }\n if (this.authEvents.includes(changedKey)) {\n const authenticated = this.authStorageService.isAuthenticated();\n if (authenticated) {\n navigate((_a = this.navigationContextService.getPreviousRoute()) !== null && _a !== void 0 ? _a : './');\n }\n else if (!isLoginPage()) {\n navigateToLoginPage();\n }\n WindowService.getWindow().location.reload();\n }\n }\n focusBackwardTargetInNav(backwardFocusTarget) {\n var _a, _b;\n if (backwardFocusTarget === null || backwardFocusTarget === void 0 ? void 0 : backwardFocusTarget.classList.contains('sub-menu-link')) {\n const parentContainer = (_b = (_a = backwardFocusTarget.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.previousElementSibling;\n if ((parentContainer === null || parentContainer === void 0 ? void 0 : parentContainer.getAttribute('aria-expanded')) === 'false') {\n parentContainer.click();\n }\n }\n setTimeout(() => {\n backwardFocusTarget.focus();\n delete backwardFocusTarget.dataset.backwardFocusTarget;\n }, 10);\n }\n // ========================\n // Main content position\n // ========================\n /**\n * The host application may re-insert its `<main>` container as the first child of the layout (e.g. on routing),\n * which puts the main content before the header and the navigation in the Tab order. The layout ignores that move,\n * so the main content keeps the slot position it got on the first render.\n */\n keepMainContentInPlace() {\n const host = this.hostElement;\n const nativeInsertBefore = host.insertBefore.bind(host);\n host.insertBefore = (node, child) => {\n const isMainContent = node.parentNode === host && node.nodeName === 'MAIN';\n return isMainContent && child === host.firstChild ? node : nativeInsertBefore(node, child);\n };\n }\n // ========================\n // Security & Permissions\n // ========================\n subscribeToSecurityChanges() {\n const securityContextService = service(SecurityContextService);\n this.subscriptions.add(securityContextService.onAuthenticatedUserChanged((authenticatedUser) => {\n this.authenticatedUser = authenticatedUser;\n this.updateVisibility();\n }));\n this.subscriptions.add(securityContextService.onSecurityConfigChanged((securityConfig) => {\n this.securityConfig = securityConfig;\n this.updateVisibility();\n }));\n this.subscriptions.add(this.eventService.subscribe(EventName.LOGIN, () => {\n this.setNavbarItemVisibility();\n this.updateVisibility();\n }));\n this.subscriptions.add(this.eventService.subscribe(EventName.LOGGED_OUT, () => {\n this.setNavbarItemVisibility();\n this.updateVisibility();\n navigateToLoginPage();\n }));\n }\n subscribeToRuntimeConfigurationChanges() {\n this.subscriptions.add(this.runtimeConfigurationContextService.onRuntimeConfigurationChanged((config) => {\n var _a;\n this.isEmbedded = (_a = config === null || config === void 0 ? void 0 : config.isEmbedded) !== null && _a !== void 0 ? _a : false;\n }));\n }\n updateVisibility() {\n if (!this.authenticationService.isSecurityEnabled()) {\n this.showNavbar = true;\n this.showHeader = true;\n }\n else {\n this.showHeader = this.authenticationService.isAuthenticated() || this.authorizationService.hasFreeAccess();\n this.showNavbar = this.authenticationService.isAuthenticated() || this.authorizationService.hasFreeAccess();\n }\n }\n isAuthenticatedFully() {\n return !this.authenticationService.isSecurityEnabled() || this.authenticationService.isAuthenticated() || this.authorizationService.hasFreeAccess();\n }\n shouldShowMenu(role) {\n return this.isAuthenticatedFully() && this.authorizationService.hasRole(role);\n }\n // ========================\n // Navbar logic\n // ========================\n assignNavbarRef() {\n return (navbar) => {\n this.navbarRef = navbar;\n if (!this.navbarRef) {\n return;\n }\n this.navbarRef.menuItems = WindowService.getPluginRegistry().get(MainMenuExtensionPoint.NAME);\n this.setNavbarItemVisibility();\n };\n }\n setNavbarItemVisibility() {\n var _a, _b, _c;\n if (!((_a = this.navbarRef) === null || _a === void 0 ? void 0 : _a.menuItems)) {\n return;\n }\n // recursively check for children and set their shouldShow property\n const processItem = (item) => {\n var _a;\n item.shouldShow = this.shouldShowMenu(item.role);\n if ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) {\n item.children.forEach(processItem);\n }\n };\n (_c = (_b = this.navbarRef) === null || _b === void 0 ? void 0 : _b.menuItems) === null || _c === void 0 ? void 0 : _c.forEach(plugin => {\n plugin.items.forEach(processItem);\n });\n // Update the reference to trigger a re-render\n this.navbarRef.menuItems = [...this.navbarRef.menuItems];\n }\n subscribeToNavigationEnd() {\n this.subscriptions.add(this.eventService.subscribe(EventName.NAVIGATION_END, (navigationEndPayload) => {\n this.navigationContextService.updatePreviousRoute(navigationEndPayload.oldUrl);\n this.focusMainContentOnPageChange(navigationEndPayload);\n // NAVIGATION_END appears to happen in the same tick as BeforeMountRouting, so the loader never gets shown\n setTimeout(() => {\n this.loading = false;\n });\n }));\n }\n /**\n * Moves the focus to the main content after an in-app page change, when the focus was in the old page content or\n * already lost to the body, so that it does not fall back to the body.\n *\n * @param navigationEndPayload - The old and the new URL of the navigation.\n */\n focusMainContentOnPageChange({ oldUrl, newUrl }) {\n if (!oldUrl ||\n isSamePage(oldUrl, newUrl) ||\n (!this.isFocusInNavbar() && !this.isFocusLostOrInMainContent()) ||\n (this.isFocusInNavbar() && this.isPointerNavigation())) {\n // The initial load, a query or hash change, or the focus is outside the main content, e.g. in the navbar.\n return;\n }\n if (this.loading) {\n this.shouldFocusMainContentAfterLoading = true;\n }\n else {\n this.focusMainContent();\n }\n }\n isFocusLostOrInMainContent() {\n var _a;\n return isFocusLost() || !!((_a = document.getElementById(MAIN_CONTENT_ID)) === null || _a === void 0 ? void 0 : _a.contains(document.activeElement));\n }\n isFocusInNavbar() {\n var _a;\n return !!((_a = document.getElementById(NAVBAR_ID)) === null || _a === void 0 ? void 0 : _a.contains(document.activeElement));\n }\n // Determines if the last navigation was triggered by a pointer device (mouse, touch, or pen) by \n // accessing the dataset of the active element. \n // Specific for main navbar.\n isPointerNavigation() {\n var _a, _b;\n const pointerType = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.dataset.pointerType;\n (_b = document.activeElement) === null || _b === void 0 ? true : delete _b.dataset.pointerType;\n return pointerType === POINTER_TYPES.MOUSE || pointerType === POINTER_TYPES.TOUCH || pointerType === POINTER_TYPES.PEN;\n }\n subscribeToNavigationStart() {\n this.subscriptions.add(this.eventService.subscribe(EventName.NAVIGATION_START, ({ oldUrl, newUrl }) => {\n this.isPageChanging = !oldUrl || !newUrl || !isSamePage(oldUrl, newUrl);\n // Cleanup the backward focus target dataset attribute if the page is changing and the target is the not current page.\n const backwardFocusTarget = document.querySelector('[data-backward-focus-target=\"true\"]');\n if (this.isPageChanging && (backwardFocusTarget === null || backwardFocusTarget === void 0 ? void 0 : backwardFocusTarget.dataset.ariaCurrent) === 'page') {\n delete backwardFocusTarget.dataset.backwardFocusTarget;\n }\n }));\n }\n subscribeToBeforeMountRouting() {\n this.subscriptions.add(this.eventService.subscribe(EventName.BEFORE_MOUNT_ROUTING_EVENT, () => {\n // Hiding the main content on a query or hash change only flashes the loader and drops the focus.\n if (this.isPageChanging) {\n this.loading = true;\n }\n }));\n }\n get hostElement() { return getElement(this); }\n};\nOntoLayout.style = ontoLayoutCss;\n\nexport { OntoLayout as onto_layout };\n","import { ServiceProvider, LanguageContextService } from '@ontotext/workbench-api';\nimport { L as LoggerProvider } from './logger-provider-BIkLC5Zf.js';\n\nfunction sanitizeHTML(html) {\n const element = document.createElement('textarea');\n element.innerHTML = html;\n return element.value;\n}\n/**\n * Escapes the characters that have a special meaning in HTML, so that the text can be written into an HTML string,\n * as content or as an attribute value.\n *\n * @param text The text to escape.\n * @returns The escaped text, or an empty string if no text is provided.\n */\nfunction escapeHtml(text) {\n if (!text) {\n return '';\n }\n return text\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n .replace(/\"/g, '&quot;')\n .replace(/'/g, '&#039;');\n}\n/**\n * Checks whether the focus is lost to the body.\n *\n * @returns True if the focus is lost to the body, false otherwise.\n */\nfunction isFocusLost() {\n const activeElement = document.activeElement;\n return !activeElement || activeElement === document.body;\n}\n\n/**\n * Service responsible for translation operations in the component.\n */\nclass TranslationServiceClassDefinition {\n constructor() {\n this.languageContextService = ServiceProvider.get(LanguageContextService);\n this.translationChangedObservers = {};\n this.logger = LoggerProvider.logger;\n // log with background color\n this.defaultBundle = this.languageContextService.getDefaultBundle();\n this.subscribeToBundleChange();\n }\n /**\n * Translates the <code>messageLabelKey</code> with <code>translationParameter</code> and call <code>translationCallback</code> with translation of current language.\n * The <code>translationCallback</code> is called upon subscription and whenever the selected language is changed.\n *\n * @param messageLabelKey - The label key for the translation.\n * @param translationParameter - Parameters, if needed, for translation.\n * @param translationCallback - A function to be called when translating the `messageLabelKey`.\n * @returns A function that, when called, unsubscribes the provided callback from further translation updates.\n */\n onTranslate(messageLabelKey, translationParameter = [], translationCallback = () => { }) {\n this.translationChangedObservers[messageLabelKey] = this.translationChangedObservers[messageLabelKey] || [];\n const observer = { parameters: translationParameter, callback: translationCallback };\n this.translationChangedObservers[messageLabelKey].push(observer);\n translationCallback(this.translate(messageLabelKey, translationParameter));\n return () => {\n const index = this.translationChangedObservers[messageLabelKey].indexOf(observer);\n if (index !== -1) {\n this.translationChangedObservers[messageLabelKey].splice(index, 1);\n }\n };\n }\n /**\n * Translates the provided key using the currently selected language by applying the parameters if\n * provided.\n * @param key The key for the label which needs to be translated.\n * @param parameters Optional parameters which to be applied during the translation.\n */\n translate(key, parameters) {\n return this.translateInLocale(key, parameters);\n }\n /**\n * Translates a given key into the specified locale. If parameters are provided,\n * they will be applied to the translation.\n *\n * @param key - The translation key, which can be dot-separated for nested translations.\n * @param parameters - Optional parameters to be substituted into the translation string.\n * @returns The translated string with parameters applied if available, or the key itself if not found.\n */\n translateInLocale(key, parameters) {\n // Attempt to retrieve the translation from the specified locale's bundle.\n let translation = this.translateFromBundle(this.currentBundle, key);\n // If not found, fall back to the default language bundle.\n if (!translation) {\n translation = this.translateFromBundle(this.defaultBundle, key);\n }\n // If translation was found, apply any parameters provided and return the result.\n if (translation) {\n translation = this.applyParameters(translation, parameters);\n return sanitizeHTML(translation);\n }\n this.logger.warn(`Missing translation for key: [${key}]`);\n return key;\n }\n /**\n * Retrieves a translation from a specified translation bundle using the given key.\n * If the key represents a nested JSON path, it attempts to resolve the key as such.\n *\n * @param bundle - The translation bundle for the specified locale.\n * @param key - The key to translate, which may be a simple key or dot-separated for nested keys.\n * @returns The translation string if found, or `undefined` if not available.\n */\n translateFromBundle(bundle, key) {\n if (!bundle) {\n return undefined;\n }\n // Try to retrieve the translation directly if it is defined as a whole string,\n // for instance as \"some_function.btn.label\".\n let translation = bundle[key];\n // If not found, attempt to retrieve the translation if it is defined as a JSON object.\n if (typeof translation !== 'string') {\n translation = this.translateAsJsonObject(bundle, key);\n }\n return translation;\n }\n /**\n * Resolves a nested translation key by treating it as a path in a JSON object.\n * For example, if the key is \"some.key.path\", this method will navigate through\n * the JSON object structure to retrieve the value at that path.\n *\n * @param bundle - The translation bundle containing nested keys.\n * @param key - The dot-separated key representing the path to the translation.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n translateAsJsonObject(bundle, key) {\n if (!key) {\n return;\n }\n let path = key.split('.');\n return this.getTranslation(bundle, path);\n }\n /**\n * Recursively navigates through a JSON object based on a path array to retrieve\n * a translation string. Each element in the path array represents a nested key.\n *\n * @param jsonObject - The current JSON object or nested object being searched.\n * @param path - An array representing the path to the translation, where each element is a key.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n getTranslation(jsonObject, path) {\n // Stop the recursion if path or reach the inner element\n if (!path || !jsonObject) {\n return undefined;\n }\n const jsonOrTranslation = jsonObject[path.splice(0, 1)[0]];\n if (path.length === 0) {\n return jsonOrTranslation;\n }\n if (typeof jsonOrTranslation !== 'string') {\n // continue if the inner element is not reached.\n if (path.length > 0) {\n return this.getTranslation(jsonOrTranslation, path);\n }\n return jsonOrTranslation;\n }\n return undefined;\n }\n applyParameters(translation, parameters) {\n if (parameters) {\n return parameters.reduce(\n // replace all occurrence of parameter key with parameter value.\n (translation, parameter) => TranslationServiceClassDefinition.replaceAll(translation, parameter), translation);\n }\n return translation;\n }\n static replaceAll(translation, parameter) {\n return parameter ? translation.split(`{{${parameter.key}}}`).join(parameter.value) : translation;\n }\n notifyTranslationsChanged() {\n Object.keys(this.translationChangedObservers).forEach((eventName) => {\n const observers = this.translationChangedObservers[eventName] || [];\n observers.forEach((observer) => observer.callback(this.translate(eventName, observer.parameters)));\n });\n }\n subscribeToBundleChange() {\n this.languageChangeSubscription = this.languageContextService.onLanguageBundleChanged((bundle) => {\n if (bundle) {\n this.currentBundle = bundle;\n this.notifyTranslationsChanged();\n }\n });\n }\n destroy() {\n if (this.languageChangeSubscription) {\n this.languageChangeSubscription();\n }\n }\n}\nconst TranslationService = new TranslationServiceClassDefinition();\n\nexport { TranslationService as T, escapeHtml as e, isFocusLost as i, sanitizeHTML as s };\n"],"names":["debounce","func","wait","timer","args","clearTimeout","setTimeout","apply","this","LoggerProvider","logger","Loggers","getLoggerInstance","MAIN_CONTENT_ID","OntoLayout","constructor","hostRef","registerInstance","authenticationService","service","AuthenticationService","authorizationService","AuthorizationService","navigationContextService","NavigationContextService","authStorageService","AuthenticationStorageService","runtimeConfigurationContextService","RuntimeConfigurationContextService","eventService","EventService","applicationLifecycleContextService","ApplicationLifecycleContextService","fullJwtKey","StorageKey","GLOBAL_NAMESPACE","NAMESPACE","jwtKey","fullAuthenticatedKey","authenticatedKey","authEvents","isLowResolution","showHeader","isAuthenticatedFully","showNavbar","isEmbedded","loading","subscriptions","SubscriptionList","isNavbarCollapsed","shouldFocusMainContentAfterLoading","isPageChanging","onSkipLinkClick","event","preventDefault","focusMainContent","handleStorageChange","LocalStorageSubscriptionHandlerService","handleAuthChange","key","windowResizeObserver","windowResizeHandler","WindowService","getWindow","addEventListener","componentWillLoad","getApplicationsState","keepMainContentInPlace","componentDidRender","isFocusLost","isFocusInNavbar","connectedCallback","subscribeToSecurityChanges","updateVisibility","subscribeToNavigationEnd","subscribeToRuntimeConfigurationChanges","subscribeToNavigationStart","subscribeToBeforeMountRouting","disconnectedCallback","unsubscribeAll","render","h","Host","class","href","onClick","labelKey","name","ref","assignNavbarRef","targetSelector","size","messageText","TranslationService","translate","onNavbarToggled","detail","payload","hostElement","classList","add","remove","onResize","handleDocumentKeydown","shiftKey","backwardFocusTarget","document","querySelector","focusBackwardTargetInNav","handleGlobalFocus","target","getAttribute","dataset","_a","getElementById","focus","_b","_c","_d","_e","innerWidth","navbar","headerHeight","getBoundingClientRect","height","documentElement","style","setProperty","cookieBanner","bannerHeight","changedKey","includes","isAuthenticated","navigate","getPreviousRoute","isLoginPage","navigateToLoginPage","location","reload","contains","parentContainer","parentElement","previousElementSibling","click","host","nativeInsertBefore","insertBefore","bind","node","child","parentNode","nodeName","firstChild","securityContextService","SecurityContextService","onAuthenticatedUserChanged","authenticatedUser","onSecurityConfigChanged","securityConfig","subscribe","EventName","LOGIN","setNavbarItemVisibility","LOGGED_OUT","onRuntimeConfigurationChanged","config","isSecurityEnabled","hasFreeAccess","shouldShowMenu","role","hasRole","navbarRef","menuItems","getPluginRegistry","get","MainMenuExtensionPoint","NAME","processItem","item","shouldShow","children","length","forEach","plugin","items","NAVIGATION_END","navigationEndPayload","updatePreviousRoute","oldUrl","focusMainContentOnPageChange","newUrl","isSamePage","isFocusLostOrInMainContent","isPointerNavigation","activeElement","pointerType","NAVIGATION_START","ariaCurrent","BEFORE_MOUNT_ROUTING_EVENT","getElement","sanitizeHTML","html","element","createElement","innerHTML","value","escapeHtml","text","replace","body","TranslationServiceClassDefinition","languageContextService","ServiceProvider","LanguageContextService","translationChangedObservers","defaultBundle","getDefaultBundle","subscribeToBundleChange","onTranslate","messageLabelKey","translationParameter","translationCallback","observer","parameters","callback","push","index","indexOf","splice","translateInLocale","translation","translateFromBundle","currentBundle","applyParameters","warn","bundle","translateAsJsonObject","path","split","getTranslation","jsonObject","jsonOrTranslation","reduce","parameter","replaceAll","join","notifyTranslationsChanged","Object","keys","eventName","languageChangeSubscription","onLanguageBundleChanged","destroy"],"sourceRoot":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"49771.75949fd69454e4b2c35c.bundle.js","mappings":"kIAaA,SAASA,EAAqBC,EAAQC,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Q,WAC1C7D,EAAqB0E,uBAAuBlF,EAAO+E,2BAC9CjD,QAAQ,SAAUqD,GACfnF,EAAOoF,UAAYD,EAASE,MAC5BrF,EAAOsF,YAAcH,EAASI,OAClC,GACCC,MAAM,WACH7E,EAAO6E,MAAM5E,EAAW6E,QAAQ,wCACpC,IAEJzF,EAAOsF,iBAAcI,EACrB1F,EAAOoF,eAAYM,GAGvB1F,EAAOa,cAAcE,MAAQ,GAG7Bf,EAAOc,mBAAmBE,MAAQ,GAIlC,MAAM2E,EAAWlB,EAAWkB,SACtBlB,EAAWkB,SACXhB,EAAWgB,SAEjB1D,EAAEC,KAAKyD,EAAU,SAAUzB,GACvB,MAAM0B,EAAM,CAAC,EACbA,EAAIC,OAASf,mBAAmBZ,EAAKd,KACrCwC,EAAIE,iBAAmB5B,EAAKd,IAC5BwC,EAAIzB,YAAcD,EAAKZ,KACvBsC,EAAIG,WAAa7B,EAAK8B,SACtBhG,EAAOa,cAAcE,MAAMkF,KAAKL,EACpC,GACA5F,EAAOiB,0BAA4BjB,EAAOa,cAAcE,KAC5D,CA9DQmF,CAAsClG,EAAOwE,kBAErD,GAiEA2B,EAAEC,UAAUC,MAAM,WACdF,EAAE,wBAAwBG,MAAM,WAC5BH,EAAE,YAAYI,MAClB,EACJ,GAuCA,IAAI9C,EAA0BrD,EAAcsD,qBAUhD,C,SAzMArC,QACKmF,OAAO,yDAA0D,CAC9D,mBACA,YACA,aACA,gDAEHC,WAAW,uBAAwB1G,GAExCA,EAAqB2G,QAAU,CAAC,SAAU,YAAa,aAAc,WAAY,gBAAiB,UAAW,sBAAuB,SAAU,uBAAwB,kBAAmB,eAAgB,SAAU,a","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/graphexplore/controllers/domain-range-graph.controller.js"],"sourcesContent":["import 'angular/utils/local-storage-adapter';\n\nangular\n .module('graphdb.framework.graphexplore.controllers.domainrange', [\n 'ui.scroll.jqlite',\n 'ui.scroll',\n 'ngSanitize',\n 'graphdb.framework.utils.localstorageadapter'\n ])\n .controller('DomainRangeGraphCtlr', DomainRangeGraphCtlr);\n\nDomainRangeGraphCtlr.$inject = ['$scope', '$location', '$rootScope', '$timeout', '$repositories', '$window', 'LocalStorageAdapter', 'LSKeys', 'GraphDataRestService', 'UiScrollService', 'ModalService', 'toastr', '$translate'];\n\nfunction DomainRangeGraphCtlr($scope, $location, $rootScope, $timeout, $repositories, $window, LocalStorageAdapter, LSKeys, GraphDataRestService, UiScrollService, ModalService, toastr, $translate) {\n $scope.predicatesObj = {};\n $scope.predicatesQueryObj = {};\n $scope.predicatesObj.items = [];\n $scope.predicatesQueryObj.query = '';\n $scope.predicatesListNotFiltered = [];\n $scope.predicatesSearchPlaceholder = 'Search predicates';\n\n // Handle pageslide directive callbacks which incidentally appeared to be present in the angular's\n // scope, so we need to define our's and pass them to pageslide, otherwise it throws an error.\n $scope.onopen = $scope.onclose = () => angular.noop();\n\n // creating datasource for predicates data\n const datasource = {};\n let position = 0;\n let current = 0;\n $rootScope.key = '';\n datasource.get = function (index, count, success) {\n return UiScrollService.initLazyList(index, count, success, position, $scope.predicatesObj.items);\n };\n $rootScope.$watch(function () {\n return $rootScope.key;\n }, function () {\n position = 0;\n _.each($scope.predicatesObj.items, function (item) {\n if ($rootScope.key > item) position++;\n });\n current++;\n });\n\n datasource.revision = function () {\n return current;\n };\n\n // adapter implementation for ui-scroll directive\n $scope.adapterContainer = {adapter: {remain: true}};\n\n\n const doCollapseEdges = LocalStorageAdapter.get(LSKeys.DOMAIN_RANGE_COLLAPSE_EDGES);\n if (doCollapseEdges === null) {\n $scope.collapseEdges = true;\n } else {\n $scope.collapseEdges = doCollapseEdges === 'true';\n }\n\n $scope.datasource = datasource;\n\n $scope.$on('reloadDomainRangeGraphView', reloadDomainRangeGraphView);\n $scope.$on('switchEdgeMode', switchEdgeMode);\n $scope.$on('repositoryIsSet', onRepositoryIsSet);\n $scope.$on('changeCollapsedEdgesState', function (event, collapsed) {\n $scope.collapseEdges = !collapsed;\n LocalStorageAdapter.set(LSKeys.DOMAIN_RANGE_COLLAPSE_EDGES, $scope.collapseEdges);\n });\n\n $scope.goToClassHierarchyView = goToClassHierarchyView;\n $scope.copyToClipboard = copyToClipboard;\n $scope.toggleCollapseEdgesState = toggleCollapseEdgesState;\n $scope.predicatesListFilterFunc = predicatesListFilterFunc;\n\n $scope.$watch('predicatesObj.items', function () {\n if ($scope.predicatesObj.items > 0) {\n $timeout(function () {\n $scope.adapterContainer.adapter.reload();\n }, 30);\n }\n });\n\n $scope.$watch('selectedPredicate', function () {\n if ($scope.showPredicatesInfoPanel) {\n prepareDataForPredicatesInfoSidePanel($scope.selectedPredicate);\n }\n });\n\n function predicatesListFilterFunc(pred) {\n return pred.resolvedUri\n .toLowerCase()\n .indexOf($scope.predicatesQueryObj.query.toLowerCase()) >= 0;\n }\n\n function prepareDataForPredicatesInfoSidePanel(selectedPredicate) {\n const targetNode = selectedPredicate.target;\n const sourceNode = selectedPredicate.source;\n\n $scope.encodedUri = encodeURIComponent(selectedPredicate.uri);\n\n $scope.sourceTargetObjectNodeUri = targetNode.objectPropClassUri\n ? targetNode.objectPropClassUri\n : sourceNode.objectPropClassUri;\n\n $scope.encodedSourceTargetObjectNodeUri = encodeURIComponent($scope.sourceTargetObjectNodeUri);\n\n $scope.sourceTargetObjectNodeName = targetNode.objectPropClassName\n ? targetNode.objectPropClassName\n : sourceNode.objectPropClassName\n ? sourceNode.objectPropClassName\n : '<i>Literal</i>';\n\n if ($scope.sourceTargetObjectNodeName.indexOf('Literal') === -1) {\n GraphDataRestService.getRdfsLabelAndComment($scope.sourceTargetObjectNodeUri)\n .success(function (response) {\n $scope.rdfsLabel = response.label;\n $scope.rdfsComment = response.comment;\n })\n .error(function () {\n toastr.error($translate.instant('domain.range.error.get.label.comment'));\n });\n } else {\n $scope.rdfsComment = undefined;\n $scope.rdfsLabel = undefined;\n }\n\n $scope.predicatesObj.items = [];\n\n // clear predicates search input field when changing edges\n $scope.predicatesQueryObj.query = '';\n\n // if target node of selected predicate has no edges then it is a left edge and edges should\n // come from the source node\n const allEdges = targetNode.allEdges\n ? targetNode.allEdges\n : sourceNode.allEdges;\n\n _.each(allEdges, function (pred) {\n const obj = {};\n obj.absUri = encodeURIComponent(pred.uri);\n obj.absUriNonEncoded = pred.uri;\n obj.resolvedUri = pred.name;\n obj.isImplicit = pred.implicit;\n $scope.predicatesObj.items.push(obj);\n });\n $scope.predicatesListNotFiltered = $scope.predicatesObj.items;\n }\n\n\n // Hack needed to force hide collapsed-mode toggle tooltip in order not be\n // visible after icon is switched\n $(document).ready(function () {\n $('.compact-mode-toggle').click(function () {\n $('.tooltip').hide();\n });\n });\n\n function reloadDomainRangeGraphView(event, selectedClass) {\n const uri = selectedClass.objectPropClassUri;\n const name = selectedClass.objectPropClassName;\n\n $location\n .path('domain-range-graph')\n .search('uri', uri)\n .search('name', name);\n }\n\n function switchEdgeMode(event, selectedClass) {\n $location\n .path('domain-range-graph')\n .search('uri', selectedClass.uri)\n .search('name', selectedClass.name)\n .search('collapsed', selectedClass.collapsed);\n }\n\n function goToClassHierarchyView() {\n const lastSelectedClass = LocalStorageAdapter.get(LSKeys.CLASS_HIERARCHY_LAST_SELECTED_CLASS);\n\n $location\n .search('')\n .hash(lastSelectedClass)\n .path('hierarchy');\n }\n\n function toggleCollapseEdgesState() {\n $scope.collapseEdges = !$scope.collapseEdges;\n $window.history.pushState({collapsed: $scope.collapseEdges}, 'domainRangePage', null);\n }\n\n function copyToClipboard(uri) {\n ModalService.openCopyToClipboardModal(uri);\n }\n\n\n let currentActiveRepository = $repositories.getActiveRepository();\n\n function onRepositoryIsSet() {\n if (currentActiveRepository === $repositories.getActiveRepository()) {\n return;\n } else {\n currentActiveRepository = $repositories.getActiveRepository();\n }\n goToClassHierarchyView();\n }\n}\n"],"names":["DomainRangeGraphCtlr","$scope","$location","$rootScope","$timeout","$repositories","$window","LocalStorageAdapter","LSKeys","GraphDataRestService","UiScrollService","ModalService","toastr","$translate","predicatesObj","predicatesQueryObj","items","query","predicatesListNotFiltered","predicatesSearchPlaceholder","onopen","onclose","angular","noop","datasource","position","current","key","get","index","count","success","initLazyList","$watch","_","each","item","revision","adapterContainer","adapter","remain","doCollapseEdges","DOMAIN_RANGE_COLLAPSE_EDGES","goToClassHierarchyView","lastSelectedClass","CLASS_HIERARCHY_LAST_SELECTED_CLASS","search","hash","path","collapseEdges","$on","event","selectedClass","uri","objectPropClassUri","name","objectPropClassName","collapsed","currentActiveRepository","getActiveRepository","set","copyToClipboard","openCopyToClipboardModal","toggleCollapseEdgesState","history","pushState","predicatesListFilterFunc","pred","resolvedUri","toLowerCase","indexOf","reload","showPredicatesInfoPanel","selectedPredicate","targetNode","target","sourceNode","source","encodedUri","encodeURIComponent","sourceTargetObjectNodeUri","encodedSourceTargetObjectNodeUri","sourceTargetObjectNodeName","getRdfsLabelAndComment","response","rdfsLabel","label","rdfsComment","comment","error","instant","undefined","allEdges","obj","absUri","absUriNonEncoded","isImplicit","implicit","push","prepareDataForPredicatesInfoSidePanel","$","document","ready","click","hide","module","controller","$inject"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- export const __webpack_esm_id__=65677;export const __webpack_esm_ids__=[65677];export const __webpack_esm_modules__={65677(t,e,r){var a=r(66886),n=r(9508),o=(r(38473),r(44482));function s(t,e,r,s,c,i,l,d,p,u,f,g,h){return{restrict:"AE",template:'<div id="domain-range"></div>',scope:{showPredicatesInfoPanel:"=",selectedPredicate:"=",collapseEdges:"="},link:function(u){const f=d(function(){!function(u){var f=1200,y=f/18,x=f/110,m=x/2,v=f/90,b=1.2,k=o.select("#domain-range").append("svg").attr("viewBox","0 0 1200 600").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null),w=o.forceSimulation(),E=o.drag().subject(function(t){return t}).on("start",function(t,e){w.stop(),e.fx=t.x,e.fy=t.y,o.select(this).classed("selected",!0)}).on("end",function(t,e){e.fx=null,e.fy=null,o.select(this).classed("selected",!1),C?(w.alpha(.2).restart(),C=!1):w.restart()}).on("drag",function(t,e){C=!0,w.alphaTarget(0).restart(),e.fx=t.x,e.fy=t.y}),N=k.append("defs");N.append("marker").attrs({id:"arrow",viewBox:"0 -5 10 10",refX:10,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:g}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),N.append("marker").attrs({id:"collapsed-arrow",viewBox:"0 -5 10 10",refX:9,refY:0,markerUnits:"strokeWidth",markerWidth:4,markerHeight:4,orient:"auto",fill:g}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),N.append("marker").attrs({id:"arrow-loop",viewBox:"0 -5 10 10",refX:7,refY:0,markerUnits:"strokeWidth",markerWidth:5,markerHeight:5,orient:"auto",fill:g}).append("path").attrs({d:"M0,-5L10,0L0,5",class:"arrowHead"}),o.select("#download-svg").on("mouseover",function(){var t=a.A.Export.getCSSRules("css/domain-range-graph.css?v=4.0.0-RC1");$("defs").append('<style type="text/css"><![CDATA['+t+"]]></style>");var e=a.A.Export.generateBase64ImageSource("#domain-range svg");o.select(this).attrs({href:e,download:"domain-range-graph-"+r.getActiveRepository()+".svg"})}),function(){var t=f/7,e=205.7142857142857,r=o.select(".legend-container").append("svg").attr("viewBox","0 0 "+t+" "+e).attr("preserveAspectRatio","xMidYMid meet");r.append("rect").attrs({width:t,height:e}).style("fill","rgba(235, 235, 235, 0.9)");var a=16,n=42.66666666666667,s=n+f/90,i=v/1.1,l=(r.append("circle").attrs({class:"legend-class-node",cx:29.333333333333336,cy:30,r:y/4.5}),30+f/370);r.append("text").attrs({x:s,y:l}).style("font-size",i+"px").text("main class node"),r.append("circle").attrs({class:"legend-object-node",cx:29.333333333333336,cy:70,r:8.727272727272727});var d=l+40;r.append("text").attrs({x:s,y:d}).style("font-size",i+"px").text("class node");var p=70+f/45;r.append("circle").attrs({class:"legend-datatype-node",cx:29.333333333333336,cy:p,r:m});var u=d+f/45;r.append("text").attrs({x:s,y:u}).style("font-size",i+"px").text("datatype node");var g=123.33333333333334;r.append("line").attrs({class:"property-arrow",x1:a,y1:g,x2:n,y2:g}).style("stroke-width",b).attr("marker-end","url("+c.absUrl()+"#arrow)"),r.append("text").attrs({x:s,y:126.57657657657658}).style("font-size",i+"px").text("explicit property");var h=150;r.append("line").attrs({class:"implicit-property-arrow",x1:a,y1:h,x2:n,y2:h}).style("stroke-width",b).attr("marker-end","url("+c.absUrl()+"#arrow)"),r.append("text").attrs({x:s,y:153.24324324324326}).style("font-size",i+"px").text("implicit property");var x=176.66666666666666;r.append("line").attrs({class:"collapsed-property-arrow",x1:a,y1:x,x2:n,y2:x}).style("stroke-width",2).attr("marker-end","url("+c.absUrl()+"#collapsed-arrow)"),r.append("text").attrs({x:s,y:179.9099099099099}).style("font-size",i+"px").text("collapsed property")}();var R=c.search().uri,A=c.search().name;const L=c.search().collapsed;(function(t,e){s.getDomainRangeData(t,e).success(function(t,e,r){u.domainRangeGraphData=t}).error(function(t){p.error("Request for "+A+" failed!")})})(R,L),$(window).on("popstate",function(){i.set(l.DOMAIN_RANGE_WENT_BACK,!0)}),e.onpopstate=function(e){e.state&&t.$broadcast("changeCollapsedEdgesState",e.state.collapsed)},u.$watch("collapseEdges",function(){angular.isUndefined(u.collapseEdges)||(i.set(l.DOMAIN_RANGE_COLLAPSE_EDGES,u.collapseEdges),"true"!==i.get(l.DOMAIN_RANGE_WENT_BACK)&&function(e){t.$broadcast("switchEdgeMode",{uri:R,name:A,collapsed:e})}(u.collapseEdges),i.remove(l.DOMAIN_RANGE_WENT_BACK))}),u.$watch("domainRangeGraphData",function(){if(u.domainRangeGraphData){var r=_.cloneDeep(u.domainRangeGraphData);const S=r.nodes,I=r.links;w.nodes(S).force("x",o.forceX(600)).force("y",o.forceY(300)).force("charge",o.forceManyBody().strength(-800)).force("link",o.forceLink(I).distance(f/3.5));var a=k.selectAll(".link").data(I).enter().append("g");function B(t){t.style("stroke",g),t.style("stroke-width",2),t.attr("marker-end","url("+c.absUrl()+"#collapsed-arrow)")}var s,i,l=0;a.each(function(t){if(t.objectPropNodeClassUri!==R)s=a.append("line").attrs({class:"link","marker-end":"url("+c.absUrl()+"#arrow)"}).style("stroke-width",b).each(function(t){switch(t.propertyType){case"objectLeft":t.targetRadius=y;break;case"objectRight":t.targetRadius=x;break;case"datatype":t.targetRadius=m;break;default:t.targetRadius=0}var e=o.select(this);t.targetNodeEdgeCount>1?B(e):t.implicit&&e.style("stroke-dasharray","3, 3")});else{if(angular.isUndefined(i)){var e=y/2;i=o.select(this).append("path").attrs({d:"M 0 0 A "+e+" "+e+" 0 1 1 0 "+e,class:"loop-link",fill:"none","marker-end":"url("+c.absUrl()+"#arrow-loop)"}).style("stroke-width",b)}(l+=t.targetNodeEdgeCount)>1&&B(o.select(".loop-link"))}});var p={};function G(){$.isEmptyObject(p)||(p.text.style("fill","black"),p.background.style("fill","#f0f0f0"))}function W(t,e){G(),p.text=o.select(this),p.background=o.select(this.previousSibling),p.text.style("fill","white"),p.background.style("fill",g),d(function(){u.showPredicatesInfoPanel=!0,u.selectedPredicate=e}),t.stopPropagation()}$("document").ready(function(){$("#domain-range").bind("click",G)});var N=a.append("text").attr("class",function(t){return t.objectPropNodeClassUri===R?"loop-link-property-name":"property-name"}).attr("dx",function(t){return y/2*("objectLeft"===t.propertyType?1:-1)}).style("text-anchor",function(t){return"objectLeft"===t.propertyType?"end":"start"}).style("font-size",v).text(function(t){return t.targetNodeEdgeCount>1?t.targetNodeEdgeCount+" predicates":t.name});N.each(function(t){var r=o.select(this);/\d\spredicates/.test(r.text())?r.style("font-weight","bold").on("click",W):r.on("click",function(t,r){e.open("resource?uri="+encodeURIComponent(r.uri),"_blank")})});var L=a.append("rect").attr("class",function(t){return t.objectPropNodeClassUri!==R?"link-background":"loop-link-background"}).attr("width",function(t){return t.calculatedWidth=this.previousSibling.getBBox().width,t.calculatedWidth+4}).attr("height",function(t){return t.calculatedHeight=this.previousSibling.getBBox().height,t.calculatedHeight+2}).attr("transform",function(t){var e=2-y/2*("objectLeft"===t.propertyType?1:-1);return"objectLeft"===t.propertyType&&(e+=t.calculatedWidth),"translate(-"+e+",-"+(2+t.calculatedHeight/2)+")"}).on("click",function(t){t.stopPropagation()}),C=k.selectAll(".node").data(S).enter().append("g"),P=C.filter(function(t){return t.objectPropClassUri!==R}).append("circle").each(function(t){var e=o.select(this);"main"===t.classPosition?e.attrs({class:"class-node",r:y}).attr("marker-end","url("+c.absUrl()+"#loop-link)"):null===t.objectPropClassName?e.attrs({class:"datatype-node",r:m}):e.attrs({class:"object-prop-node",r:x})}).call(E);function z(e,r,a){u.$apply(function(){t.$broadcast("reloadDomainRangeGraphView",r,a)})}o.selectAll(".object-prop-node").on("dblclick",z),C.filter(function(t){return t.objectPropClassName&&t.objectPropClassUri!==R}).append("text").attr("class",function(t){return t.classPosition+"-class-label"}).style("font-size",v).text(function(t){return t.objectPropClassName}).on("click",function(t,r){e.open("resource?uri="+encodeURIComponent(r.objectPropClassUri),"_blank")});var U=C.select("text");k.select(".class-node").each(function(){o.select(this.parentNode).append("text").attr("class","rdf-class-label").style("font-size",function(t){return n.A.Text.calcFontSize(A,y)}).text(A).on("click",function(){e.open("resource?uri="+encodeURIComponent(R),"_blank")})});var j=k.select(".class-node + text"),T=o.select(".class-node"),M=o.selectAll(".loop-link-background"),O=o.selectAll(".loop-link-property-name");if(N=o.selectAll(".property-name"),!angular.isUndefined(i)){var D=[];M.each(function(t,e){o.select(this),D.push({idx:e,width:t.calculatedWidth,height:t.calculatedHeight})})}function F(t){var e=8*w.alpha();function r(t){var e=t.x+2*y,r=t.y-35.08771929824562;var a=[];M.each(function(n,s){a.push(n),s<h?function(a,n){var o=$.grep(D,function(t){return t.idx==n});n>0&&(e+=parseFloat(n*(o[0].height/(n/1.4)))),a.attrs({transform:"rotate(270, "+t.x+","+t.y+") translate("+e+","+r+")",width:o[0].height,height:o[0].width})}(o.select(this),s):o.select(this).remove()}),function(t){var e;o.select(".view-more-preds-label").style("font-weight","bold").each(function(r){r.target.allEdges=t,e=this.getComputedTextLength()}).on("click",W),o.select(".view-more-preds-rect").attr("height",e+4)}(a)}s.filter(function(t){return t.objectPropNodeClassUri!==R}).attr("x1",function(t){return t.source.x}).attr("y1",function(t){return t.source.y}).attr("x2",function(t){return t.targetX}).attr("y2",function(t){return t.targetY}).each(function(t){!function(t){"objectLeft"===t.propertyType?(t.source.x-=8*e,t.source.y-=e/9):(t.target.x+=8*e,t.target.y-=e/9)}(t);var r=Math.atan2(t.target.y-t.source.y,t.target.x-t.source.x);t.targetX=t.target.x-Math.cos(r)*t.targetRadius,t.targetY=t.target.y-Math.sin(r)*t.targetRadius}),P.each(function(t){"main"!==t.classPosition||angular.isUndefined(i)||(function(t){var e=t.x+64,r=t.y-y/5.7-5;i.attr("transform","rotate(270, "+t.x+","+t.y+") translate("+e+","+r+")")}(t),function(t){function e(e,r){var a=$.grep(D,function(t){return t.idx==r}),n=0;r>0&&(n=parseFloat(2*r*(a[0].height/1.4)));var o=t.x,s=t.y-2.1*y-n;e.attrs({x:o,y:s}).moveToFront()}O.each(function(t,r){var a=o.select(this),n=O.size()-h;n<0?e(a,r):(0==r&&!u.collapseEdges&&n>1&&(function(t,e,r){t.classed("view-more-preds-label",!0).text(r+" predicates more ..."),null!==this.nextSibling&&e.classed("view-more-preds-rect",!0)}(a,o.select(this.nextSibling),n),e(a,r)),r<h?e(a,r):a.remove())})}(t),r(t)),t.objectPropClassUri!==R&&o.select(this).attr("cx",function(t){return"main"===t.classPosition?function(t){!window.ActiveXObject&&"ActiveXObject"in window&&(Math.log10=function(t){return Math.log(t)/Math.LN10});var e=T.attr("cx")-600,r=.5*Math.log10(Math.abs(e));return t.x+=e>0?-r:r,t.x}(t):t.x}).attr("cy",function(t){return t.y})}),j.attr("x",function(t){return t.x}).attr("y",function(t){return t.y}).moveToFront(),L.filter(function(t){return t.objectPropNodeClassUri!==R}).attr("x",function(t){return t.target.x>t.source.x?t.source.x+(t.target.x-t.source.x)/2:t.target.x+(t.source.x-t.target.x)/2}).attr("y",function(t){return t.target.y>t.source.y?t.source.y+(t.target.y-t.source.y)/2:t.target.y+(t.source.y-t.target.y)/2}).moveToFront(),N.attr("x",function(t){return t.target.x>t.source.x?t.source.x+(t.target.x-t.source.x)/2:t.target.x+(t.source.x-t.target.x)/2}).attr("y",function(t){return t.target.y>t.source.y?t.source.y+(t.target.y-t.source.y)/2:t.target.y+(t.source.y-t.target.y)/2}).moveToFront(),U.attr("x",function(t){return"right"===t.classPosition?t.x+13.09090909090909:t.x-13.09090909090909}).attr("y",function(t){return t.y}).moveToFront()}w.on("tick",F)}});let C=!1}(u)},50);u.$on("$destroy",function(){d.cancel(f)})}}}angular.module("graphdb.framework.graphexplore.directives.domainrange",["graphdb.framework.graphexplore.controllers.domainrange","graphdb.framework.utils.localstorageadapter"]).constant("ONTO_RED","var(--gw-primary-base)").constant("ONTO_GREEN","var(--gw-tertiary-base)").constant("ONTO_BLUE","var(--gw-secondary-base)").constant("NON_COLLAPSED_REFLEXIVE_LINK_LIMIT",6).directive("domainRangeGraph",s),s.$inject=["$rootScope","$window","$repositories","GraphDataRestService","$location","LocalStorageAdapter","LSKeys","$timeout","toastr","ONTO_RED","ONTO_GREEN","ONTO_BLUE","NON_COLLAPSED_REFLEXIVE_LINK_LIMIT"]}};
2
- //# sourceMappingURL=65677.9c399bbb23b8b4478225.bundle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"65677.9c399bbb23b8b4478225.bundle.js","mappings":"iLAkBA,SAASA,EAA0BC,EAAYC,EAASC,EAAeC,EAAsBC,EAAWC,EAAqBC,EAAQC,EAAUC,EAAQC,EAAUC,EAAYC,EAAWC,GACpL,MAAO,CACHC,SAAU,KACVC,SAAU,gCACVC,MAAO,CACHC,wBAAyB,IACzBC,kBAAmB,IACnBC,cAAe,KAEnBC,KAGJ,SAAkBJ,GACd,MAAMK,EAAQb,EAAS,YAS3B,SAAgCQ,GAC5B,IAAIM,EAAQ,KAGRC,EAAgBD,EAAQ,GACxBE,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CC,UAAU,mBAAoBjP,GAEnCA,EAA0BkP,QAAU,CAAC,aAAc,UAAW,gBAAiB,uBAAwB,YAAa,sBAAuB,SAAU,WAAY,SAAU,WAAY,aAAc,YAAa,qC","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/graphexplore/directives/domain-range-graph.directive.js"],"sourcesContent":["import SVG from 'lib/common/svg-export';\nimport D3 from 'lib/common/d3-utils';\nimport 'angular/utils/local-storage-adapter';\nimport * as d3 from 'd3';\n\nangular\n .module('graphdb.framework.graphexplore.directives.domainrange', [\n 'graphdb.framework.graphexplore.controllers.domainrange',\n 'graphdb.framework.utils.localstorageadapter'\n ])\n .constant('ONTO_RED', 'var(--gw-primary-base)')\n .constant('ONTO_GREEN', 'var(--gw-tertiary-base)')\n .constant('ONTO_BLUE', 'var(--gw-secondary-base)')\n .constant('NON_COLLAPSED_REFLEXIVE_LINK_LIMIT', 6)\n .directive('domainRangeGraph', domainRangeGraphDirective);\n\ndomainRangeGraphDirective.$inject = ['$rootScope', '$window', '$repositories', 'GraphDataRestService', '$location', 'LocalStorageAdapter', 'LSKeys', '$timeout', 'toastr', 'ONTO_RED', 'ONTO_GREEN', 'ONTO_BLUE', 'NON_COLLAPSED_REFLEXIVE_LINK_LIMIT'];\n\nfunction domainRangeGraphDirective($rootScope, $window, $repositories, GraphDataRestService, $location, LocalStorageAdapter, LSKeys, $timeout, toastr, ONTO_RED, ONTO_GREEN, ONTO_BLUE, NON_COLLAPSED_REFLEXIVE_LINK_LIMIT) {\n return {\n restrict: 'AE',\n template: '<div id=\"domain-range\"></div>',\n scope: {\n showPredicatesInfoPanel: '=',\n selectedPredicate: '=',\n collapseEdges: '='\n },\n link: linkFunc\n };\n\n function linkFunc(scope) {\n const timer = $timeout(function () {\n renderDomainRangeGraph(scope);\n }, 50);\n\n scope.$on(\"$destroy\", function () {\n $timeout.cancel(timer);\n });\n }\n\n function renderDomainRangeGraph(scope) {\n var width = 1200,\n height = 600;\n\n var mainClassSize = width / 18,\n otherClassSize = width / 110,\n datatypeSize = otherClassSize / 2,\n labelFontSize = width / 90,\n basicArrowStrokeWidth = width / 1000,\n collapsedArrowStrokeWidth = width / 600;\n\n var svg = d3.select(\"#domain-range\")\n .append(\"svg\")\n .attr(\"viewBox\", \"0 0 \" + width + \" \" + height)\n .attr(\"preserveAspectRatio\", \"xMidYMid meet\")\n .on(\"dblclick.zoom\", null);\n\n var force = d3.forceSimulation();\n\n var drag = d3.drag()\n .subject(function (d) {\n return d;\n })\n .on(\"start\", dragStart)\n .on(\"end\", dragEnd)\n .on(\"drag\", dragged);\n\n var defs = svg.append(\"defs\");\n generateMarkers(defs);\n\n function generateMarkers(defElement) {\n defs.append(\"marker\")\n .attrs({\n id: \"arrow\",\n viewBox: \"0 -5 10 10\",\n refX: 10,\n refY: 0,\n markerUnits: \"strokeWidth\",\n markerWidth: 5,\n markerHeight: 5,\n orient: \"auto\",\n fill: ONTO_BLUE\n })\n .append(\"path\")\n .attrs({\n d: \"M0,-5L10,0L0,5\",\n class: \"arrowHead\"\n });\n\n defs.append(\"marker\")\n .attrs({\n id: \"collapsed-arrow\",\n viewBox: \"0 -5 10 10\",\n refX: 9,\n refY: 0,\n markerUnits: \"strokeWidth\",\n markerWidth: 4,\n markerHeight: 4,\n orient: \"auto\",\n fill: ONTO_BLUE\n })\n .append(\"path\")\n .attrs({\n d: \"M0,-5L10,0L0,5\",\n class: \"arrowHead\"\n });\n\n defs.append(\"marker\")\n .attrs({\n id: \"arrow-loop\",\n viewBox: \"0 -5 10 10\",\n refX: 7,\n refY: 0,\n markerUnits: \"strokeWidth\",\n markerWidth: 5,\n markerHeight: 5,\n orient: \"auto\",\n fill: ONTO_BLUE\n })\n .append(\"path\")\n .attrs({\n d: \"M0,-5L10,0L0,5\",\n class: \"arrowHead\"\n });\n }\n\n /*\n * Prepares SVG document image export by adding xml namespaces and\n * additional style information\n */\n function prepareForSVGImageExport() {\n // get css rules for the diagram\n var cssRules = SVG.Export.getCSSRules(\"css/domain-range-graph.css?v=4.0.0-RC1\");\n\n // inline css rules in a defs tag\n $(\"defs\").append('<style type=\"text/css\"><![CDATA[' + cssRules + ']]></style>');\n\n // convert selected html to base64\n var imgSrc = SVG.Export.generateBase64ImageSource(\"#domain-range svg\");\n\n // set the binary image and a name for the downloadable file on the export button\n d3.select(this).attrs({\n href: imgSrc,\n download: \"domain-range-graph-\" + $repositories.getActiveRepository() + \".svg\"\n });\n }\n\n d3.select(\"#download-svg\")\n .on(\"mouseover\", prepareForSVGImageExport);\n\n generateLegend();\n\n function generateLegend() {\n // start of code for legend\n\n var legendBackgroundWidth = width / 7;\n var legendBackgroundHeight = legendBackgroundWidth * 1.2;\n\n var svgLegend = d3.select(\".legend-container\")\n .append(\"svg\")\n .attr(\"viewBox\", \"0 0 \" + legendBackgroundWidth + \" \" + legendBackgroundHeight)\n .attr(\"preserveAspectRatio\", \"xMidYMid meet\");\n\n var legendCellGroup = svgLegend;\n\n legendCellGroup.append(\"rect\")\n .attrs({\n width: legendBackgroundWidth,\n height: legendBackgroundHeight\n })\n .style(\"fill\", \"rgba(235, 235, 235, 0.9)\");\n\n var sourceX = width / 75;\n var sourceY = width / 40;\n var targetX = sourceX + mainClassSize / 2.5;\n var targetY = sourceY;\n\n var legendTextX = targetX + width / 90;\n var legendLabelFontSize = labelFontSize / 1.1;\n\n var classNodeY = sourceY;\n var legendClassNode = legendCellGroup\n .append(\"circle\")\n .attrs({\n class: \"legend-class-node\",\n cx: (sourceX + targetX) / 2,\n cy: classNodeY,\n r: mainClassSize / 4.5\n });\n\n var classNodeTextY = targetY + width / 370;\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: classNodeTextY\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"main class node\");\n\n var objectNodeY = classNodeY + width / 30;\n legendCellGroup\n .append(\"circle\")\n .attrs({\n class: \"legend-object-node\",\n cx: (sourceX + targetX) / 2,\n cy: objectNodeY,\n r: otherClassSize / 1.25\n });\n\n var objectNodeTextY = classNodeTextY + width / 30;\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: objectNodeTextY\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"class node\");\n\n var datatypeNodeY = objectNodeY + width / 45;\n legendCellGroup\n .append(\"circle\")\n .attrs({\n class: \"legend-datatype-node\",\n cx: (sourceX + targetX) / 2,\n cy: datatypeNodeY,\n r: datatypeSize\n });\n\n var datatypeNodeTextY = objectNodeTextY + width / 45;\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: datatypeNodeTextY\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"datatype node\");\n\n var basicPropertyArrowY = datatypeNodeY + width / 45;\n legendCellGroup\n .append(\"line\")\n .attrs({\n class: \"property-arrow\",\n x1: sourceX,\n y1: basicPropertyArrowY,\n x2: targetX,\n y2: basicPropertyArrowY\n })\n .style(\"stroke-width\", basicArrowStrokeWidth)\n .attr(\"marker-end\", \"url(\" + $location.absUrl() + \"#arrow)\");\n\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: basicPropertyArrowY + (width / 370)\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"explicit property\");\n\n var implicitPropArrowY = basicPropertyArrowY + width / 45;\n legendCellGroup\n .append(\"line\")\n .attrs({\n class: \"implicit-property-arrow\",\n x1: sourceX,\n y1: implicitPropArrowY,\n x2: targetX,\n y2: implicitPropArrowY\n })\n .style(\"stroke-width\", basicArrowStrokeWidth)\n .attr(\"marker-end\", \"url(\" + $location.absUrl() + \"#arrow)\");\n\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: implicitPropArrowY + (width / 370)\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"implicit property\");\n\n var collapsedPropArrowY = implicitPropArrowY + width / 45;\n legendCellGroup\n .append(\"line\")\n .attrs({\n class: \"collapsed-property-arrow\",\n x1: sourceX,\n y1: collapsedPropArrowY,\n x2: targetX,\n y2: collapsedPropArrowY\n })\n .style(\"stroke-width\", collapsedArrowStrokeWidth)\n .attr(\"marker-end\", \"url(\" + $location.absUrl() + \"#collapsed-arrow)\");\n\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: collapsedPropArrowY + (width / 370)\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"collapsed property\");\n // end of code for legend\n }\n\n var selectedRdfUri = $location.search().uri;\n var classNodeLabel = $location.search().name;\n const collapsed = $location.search().collapsed;\n\n getDomainRangeData(selectedRdfUri, collapsed);\n\n function getDomainRangeData(selectedRdfUri, collapsed) {\n GraphDataRestService.getDomainRangeData(selectedRdfUri, collapsed)\n .success(function (response, status, headers) {\n scope.domainRangeGraphData = response;\n }).error(function (response) {\n toastr.error(\"Request for \" + classNodeLabel + \" failed!\");\n });\n }\n\n function switchEdgeMode(collapsed) {\n $rootScope.$broadcast('switchEdgeMode', {\n uri: selectedRdfUri,\n name: classNodeLabel,\n collapsed: collapsed\n });\n }\n\n // intercept back button press and set action to local storage\n $(window).on('popstate', function () {\n LocalStorageAdapter.set(LSKeys.DOMAIN_RANGE_WENT_BACK, true);\n });\n\n $window.onpopstate = function (event) {\n if (event.state) {\n $rootScope.$broadcast(\"changeCollapsedEdgesState\", event.state.collapsed);\n }\n };\n\n scope.$watch('collapseEdges', function () {\n if (!angular.isUndefined(scope.collapseEdges)) {\n LocalStorageAdapter.set(LSKeys.DOMAIN_RANGE_COLLAPSE_EDGES, scope.collapseEdges);\n\n // if the back button has not been pressed, then switch to collapsed or non collapsed mode\n // otherwise skip, because back button will not function properly and will not pop the entire\n // history stack\n if (LocalStorageAdapter.get(LSKeys.DOMAIN_RANGE_WENT_BACK) !== \"true\") {\n switchEdgeMode(scope.collapseEdges);\n }\n\n // after back button status has been checked, remove the action from local storage in order\n // to be clean for next check\n LocalStorageAdapter.remove(LSKeys.DOMAIN_RANGE_WENT_BACK);\n }\n });\n\n scope.$watch('domainRangeGraphData', function () {\n if (scope.domainRangeGraphData) {\n var graph = _.cloneDeep(scope.domainRangeGraphData);\n\n const nodes = graph.nodes;\n const links = graph.links;\n\n force.nodes(nodes)\n .force('x', d3.forceX(width / 2))\n .force('y', d3.forceY(height / 2))\n .force(\"charge\", d3.forceManyBody().strength(-800))\n .force(\"link\", d3.forceLink(links).distance(width / 3.5))\n\n var linkGroup = svg.selectAll(\".link\")\n .data(links)\n .enter()\n .append(\"g\");\n\n function styleArrowsInCollapsedMode(sel) {\n sel.style(\"stroke\", ONTO_BLUE);\n sel.style(\"stroke-width\", collapsedArrowStrokeWidth);\n sel.attr(\"marker-end\", \"url(\" + $location.absUrl() + \"#collapsed-arrow)\");\n }\n\n var link,\n loopLink,\n loopLinkEdgeCount = 0;\n\n\n linkGroup\n .each(function (d) {\n if (d.objectPropNodeClassUri !== selectedRdfUri) {\n link = linkGroup\n .append(\"line\")\n .attrs({\n class: \"link\",\n // absolute url needed because angular inserts a <base> tag\n \"marker-end\": \"url(\" + $location.absUrl() + \"#arrow)\"\n })\n .style(\"stroke-width\", basicArrowStrokeWidth)\n .each(function (d) {\n switch (d.propertyType) {\n case \"objectLeft\":\n d.targetRadius = mainClassSize;\n break;\n case \"objectRight\":\n d.targetRadius = otherClassSize;\n break;\n case \"datatype\":\n d.targetRadius = datatypeSize;\n break;\n default:\n d.targetRadius = 0;\n }\n var sel = d3.select(this);\n if (d.targetNodeEdgeCount > 1) {\n styleArrowsInCollapsedMode(sel);\n } else if (d.implicit) {\n sel.style(\"stroke-dasharray\", \"3, 3\");\n }\n });\n } else {\n if (angular.isUndefined(loopLink)) {\n var loopLinkSize = mainClassSize / 2;\n loopLink = d3.select(this)\n .append(\"path\")\n .attrs({\n d: \"M 0 0 A \" + loopLinkSize + \" \" + loopLinkSize + \" 0 1 1 0 \" + loopLinkSize,\n class: \"loop-link\",\n fill: \"none\",\n \"marker-end\": \"url(\" + $location.absUrl() + \"#arrow-loop)\"\n })\n .style(\"stroke-width\", basicArrowStrokeWidth);\n }\n\n loopLinkEdgeCount += d.targetNodeEdgeCount;\n if (loopLinkEdgeCount > 1) {\n styleArrowsInCollapsedMode(d3.select(\".loop-link\"));\n }\n }\n });\n\n var previousPropertyNameSelection = {};\n\n function disableCollapsedPredicateLabelHightlighting() {\n if (!$.isEmptyObject(previousPropertyNameSelection)) {\n previousPropertyNameSelection.text.style(\"fill\", \"black\");\n previousPropertyNameSelection.background.style(\"fill\", \"#f0f0f0\");\n }\n }\n\n // when clicking anywhere else but the collapsed labels disable highlighting\n // of the currently selected one\n $(\"document\").ready(function () {\n $(\"#domain-range\").bind(\"click\", disableCollapsedPredicateLabelHightlighting);\n });\n\n function onCollapsedPropertyNameClick(event, d) {\n disableCollapsedPredicateLabelHightlighting();\n previousPropertyNameSelection.text = d3.select(this);\n\n previousPropertyNameSelection.background = d3.select(this.previousSibling);\n previousPropertyNameSelection.text.style(\"fill\", \"white\");\n\n previousPropertyNameSelection.background.style(\"fill\", ONTO_BLUE);\n $timeout(function () {\n scope.showPredicatesInfoPanel = true;\n scope.selectedPredicate = d;\n });\n event.stopPropagation();\n }\n\n\n var propertyNames = linkGroup\n .append(\"text\")\n .attr(\"class\", function (d) {\n return d.objectPropNodeClassUri === selectedRdfUri ? \"loop-link-property-name\" : \"property-name\";\n })\n .attr(\"dx\", function (d) {\n // offset text more towards the main class\n return mainClassSize / 2 * (d.propertyType === \"objectLeft\" ? 1 : -1);\n })\n .style(\"text-anchor\", function (d) {\n return d.propertyType === \"objectLeft\" ? \"end\" : \"start\";\n })\n .style(\"font-size\", labelFontSize)\n .text(function (d) {\n return d.targetNodeEdgeCount > 1 ? d.targetNodeEdgeCount + \" predicates\" : d.name;\n });\n\n\n propertyNames\n .each(function (d) {\n var sel = d3.select(this);\n var isCompoundEdge = /\\d\\spredicates/.test(sel.text());\n\n // handle collapsed predicates by making their font bold, make them highlight when clicked\n // and make them trigger the side panel to display the collapsed edges\n if (isCompoundEdge) {\n sel\n .style(\"font-weight\", \"bold\")\n .on(\"click\", onCollapsedPropertyNameClick);\n } else {\n // for regular predicate labels just attach a link to the \"Resources\" view\n // for more helpful information regarding them\n sel.on(\"click\", function (event, d) {\n $window.open(\"resource?uri=\" + encodeURIComponent(d.uri), \"_blank\");\n });\n }\n });\n var textPadding = width / 600;\n\n\n var linkRect = linkGroup\n .append(\"rect\")\n .attr(\"class\", function (d) {\n return d.objectPropNodeClassUri !== selectedRdfUri ? \"link-background\" : \"loop-link-background\"\n })\n .attr(\"width\", function (d) {\n d.calculatedWidth = this.previousSibling.getBBox().width;\n return d.calculatedWidth + textPadding * 2;\n })\n .attr(\"height\", function (d) {\n d.calculatedHeight = this.previousSibling.getBBox().height;\n return d.calculatedHeight + textPadding;\n })\n .attr(\"transform\", function (d) {\n // offset rect by the same amount as text (besides the padding)\n var translateX = textPadding - mainClassSize / 2 * (d.propertyType === \"objectLeft\" ? 1 : -1);\n if (d.propertyType === \"objectLeft\") {\n translateX += d.calculatedWidth;\n }\n return \"translate(-\" + translateX + \",-\" + (textPadding + d.calculatedHeight / 2) + \")\";\n })\n .on(\"click\", function (event) {\n event.stopPropagation();\n });\n\n\n var nodeGroup = svg.selectAll(\".node\")\n .data(nodes)\n .enter()\n .append(\"g\");\n\n var node = nodeGroup\n .filter(function (d) {\n return d.objectPropClassUri !== selectedRdfUri;\n })\n .append(\"circle\")\n .each(function (d) {\n var sel = d3.select(this);\n if (d.classPosition === \"main\") {\n sel.attrs({\n class: \"class-node\",\n r: mainClassSize\n })\n .attr(\"marker-end\", \"url(\" + $location.absUrl() + \"#loop-link)\");\n } else if (d.objectPropClassName === null) {\n sel.attrs({\n class: \"datatype-node\",\n r: datatypeSize\n });\n } else {\n sel.attrs({\n class: \"object-prop-node\",\n r: otherClassSize\n });\n }\n })\n .call(drag);\n\n\n function reloadDomainRangeGraphView(event, d, collapsed) {\n scope.$apply(function () {\n $rootScope.$broadcast('reloadDomainRangeGraphView', d, collapsed);\n });\n }\n\n d3.selectAll(\".object-prop-node\")\n .on(\"dblclick\", reloadDomainRangeGraphView);\n\n\n nodeGroup\n .filter(function (d) {\n return d.objectPropClassName && d.objectPropClassUri !== selectedRdfUri;\n })\n .append(\"text\")\n .attr(\"class\", function (d) {\n return d.classPosition + \"-class-label\";\n })\n .style(\"font-size\", labelFontSize)\n .text(function (d) {\n return d.objectPropClassName;\n })\n .on(\"click\", function (event, d) {\n $window.open(\"resource?uri=\" + encodeURIComponent(d.objectPropClassUri), \"_blank\");\n });\n\n var objectPropClassName = nodeGroup.select(\"text\");\n\n svg.select(\".class-node\")\n .each(function () {\n d3.select(this.parentNode)\n .append(\"text\")\n .attr(\"class\", \"rdf-class-label\")\n .style(\"font-size\", function (d) {\n return D3.Text.calcFontSize(classNodeLabel, mainClassSize)\n })\n .text(classNodeLabel)\n .on(\"click\", function () {\n $window.open(\"resource?uri=\" + encodeURIComponent(selectedRdfUri), \"_blank\");\n });\n });\n\n\n var rdfClassName = svg.select(\".class-node + text\"),\n classNode = d3.select(\".class-node\"),\n loopLinkBackgroundSel = d3.selectAll(\".loop-link-background\"),\n loopLinkPropertyName = d3.selectAll(\".loop-link-property-name\");\n\n propertyNames = d3.selectAll(\".property-name\");\n\n if (!angular.isUndefined(loopLink)) {\n var loopLinkBackgroundProps = [];\n\n loopLinkBackgroundSel.each(function (d, i) {\n var sel = d3.select(this);\n loopLinkBackgroundProps.push({\n idx: i,\n width: d.calculatedWidth,\n height: d.calculatedHeight\n });\n });\n }\n\n function tick(e) {\n var k = 8 * force.alpha();\n\n function pushEdgesToLeftAndRight(d) {\n if (d.propertyType === \"objectLeft\") {\n d.source.x -= 8 * k;\n d.source.y -= k / 9;\n } else {\n d.target.x += 8 * k;\n d.target.y -= k / 9;\n }\n }\n\n link\n .filter(function (d) {\n return d.objectPropNodeClassUri !== selectedRdfUri;\n })\n .attr(\"x1\", function (d) {\n return d.source.x;\n })\n .attr(\"y1\", function (d) {\n return d.source.y;\n })\n .attr(\"x2\", function (d) {\n return d.targetX;\n })\n .attr(\"y2\", function (d) {\n return d.targetY;\n })\n .each(function (d) {\n pushEdgesToLeftAndRight(d);\n\n // shortens the line to compensate for the circle at the target\n var angle = Math.atan2(d.target.y - d.source.y, d.target.x - d.source.x);\n d.targetX = d.target.x - Math.cos(angle) * d.targetRadius;\n d.targetY = d.target.y - Math.sin(angle) * d.targetRadius;\n });\n\n function positionLoopLink(d) {\n var loopTranslateX = d.x + mainClassSize * 0.96,\n loopTranslateY = d.y - mainClassSize / 5.7 - 5;\n loopLink.attr(\"transform\", \"rotate(270, \" + d.x + \",\" + d.y + \") translate(\" + loopTranslateX + \",\" + loopTranslateY + \")\");\n }\n\n function positionLoopLinkLabels(d) {\n function reposition(sel, i) {\n var foundLoopLinkBackgroundProps =\n $.grep(loopLinkBackgroundProps, function (obj) {\n return obj.idx == i;\n });\n var currentBackgroundHeight = 0;\n if (i > 0) {\n currentBackgroundHeight = parseFloat(2 * i * (foundLoopLinkBackgroundProps[0].height / 1.4));\n }\n\n var loopLinkLabelX = d.x,\n loopLinkLabelY = d.y - mainClassSize * 2.1 - currentBackgroundHeight;\n\n sel\n .attrs({\n x: loopLinkLabelX,\n y: loopLinkLabelY\n })\n .moveToFront();\n }\n\n /**\n * Create a \"View more\" label to depict that the are more reflexive link labels\n * left that could be seen in the side panel when clicking this label.\n *\n * @param labelSel\n * d3 selection of the text label\n * @param backgroundSel\n * d3 selection of the rectangle element background\n * @param predicatesLeft\n * number of predicates left that are collapsed\n */\n function createViewMorePredicatesLabel(labelSel, backgroundSel, predicatesLeft) {\n labelSel\n .classed(\"view-more-preds-label\", true)\n .text(predicatesLeft + \" predicates more ...\");\n if (this.nextSibling !== null) {\n backgroundSel\n .classed(\"view-more-preds-rect\", true);\n }\n }\n\n loopLinkPropertyName.each(function (dd, i) {\n var sel = d3.select(this);\n\n var predicatesLeft = loopLinkPropertyName.size() - NON_COLLAPSED_REFLEXIVE_LINK_LIMIT;\n if (predicatesLeft < 0) {\n reposition(sel, i);\n } else {\n if (i == 0 && !scope.collapseEdges && predicatesLeft > 1) {\n createViewMorePredicatesLabel(sel, d3.select(this.nextSibling), predicatesLeft);\n reposition(sel, i);\n }\n\n if (i < NON_COLLAPSED_REFLEXIVE_LINK_LIMIT) {\n reposition(sel, i);\n } else {\n sel.remove();\n }\n }\n });\n // loopLinkPropertyName.each(function (dd, i) {\n // var sel = d3.select(this);\n // if (i < NON_COLLAPSED_REFLEXIVE_LINK_LIMIT) {\n // reposition(sel, i);\n // } else if (i == NON_COLLAPSED_REFLEXIVE_LINK_LIMIT) {\n // createViewMorePredicatesLabel(sel, d3.select(this.nextSibling));\n // reposition(sel, i);\n // } else {\n // sel.remove();\n // }\n // });\n }\n\n function positionLoopLinkBackgrounds(d) {\n var loopLinkBackgroundY = d.x + mainClassSize * 2,\n loopLinkBackgroundX = d.y - mainClassSize / 1.9;\n\n function reposition(sel, i) {\n var foundLoopLinkBackgroundProps =\n $.grep(loopLinkBackgroundProps, function (obj) {\n return obj.idx == i;\n });\n if (i > 0) {\n loopLinkBackgroundY += parseFloat(i * (foundLoopLinkBackgroundProps[0].height / (i / 1.4)));\n }\n\n sel\n .attrs({\n transform: \"rotate(270, \" + d.x + \",\" + d.y + \") translate(\" + loopLinkBackgroundY + \",\" + loopLinkBackgroundX + \")\",\n width: foundLoopLinkBackgroundProps[0].height,\n height: foundLoopLinkBackgroundProps[0].width\n });\n }\n\n /**\n * Adjust new width of \"View more\" label background and add all reflexive link metadata the this\n * label in order to render them in the side panel.\n *\n * @param allLoopLinkEdges\n * all reflexive links to the current class\n */\n function adjustViewMorePredicatesLabel(allLoopLinkEdges) {\n var viewMoreTextWidth;\n d3.select(\".view-more-preds-label\")\n // make label bold to resemble a collapsed label\n .style(\"font-weight\", \"bold\")\n .each(function (d) {\n // attach all reflexive links to the \"view more\" collapsed predicate\n // because in non collapsed mode the backend does not provide them\n d.target.allEdges = allLoopLinkEdges;\n\n // calculate text width in pixels in order to adjust background width accordingly\n viewMoreTextWidth = this.getComputedTextLength();\n })\n .on(\"click\", onCollapsedPropertyNameClick);\n\n d3.select(\".view-more-preds-rect\")\n // we modify height property instead of width because they are reversed\n // when we repositioned loop link labels\n .attr(\"height\", viewMoreTextWidth + 2 * textPadding);\n }\n\n var allLoopLinkEdges = [];\n loopLinkBackgroundSel.each(function (dd, i) {\n allLoopLinkEdges.push(dd);\n if (i < NON_COLLAPSED_REFLEXIVE_LINK_LIMIT) {\n reposition(d3.select(this), i);\n } else {\n d3.select(this).remove();\n }\n });\n\n adjustViewMorePredicatesLabel(allLoopLinkEdges);\n }\n\n\n function centerClassNode(d) {\n if (!(window.ActiveXObject) && \"ActiveXObject\" in window) {\n Math.log10 = function (x) {\n return Math.log(x) / Math.LN10;\n };\n }\n var absDiff = classNode.attr(\"cx\") - width / 2,\n logOffset = Math.log10(Math.abs(absDiff)) * 0.5;\n d.x += absDiff > 0 ? -logOffset : logOffset;\n return d.x;\n }\n\n node\n .each(function (d) {\n if (d.classPosition === \"main\" && !angular.isUndefined(loopLink)) {\n positionLoopLink(d);\n positionLoopLinkLabels(d);\n positionLoopLinkBackgrounds(d);\n }\n\n if (d.objectPropClassUri !== selectedRdfUri) {\n d3.select(this)\n .attr(\"cx\", function (d) {\n // pushes the main class circle to the centre\n if (d.classPosition === \"main\") {\n return centerClassNode(d);\n }\n return d.x;\n })\n .attr(\"cy\", function (d) {\n return d.y;\n });\n }\n });\n\n\n rdfClassName\n .attr(\"x\", function (d) {\n return d.x;\n })\n .attr(\"y\", function (d) {\n return d.y;\n })\n .moveToFront();\n\n\n linkRect\n .filter(function (d) {\n return d.objectPropNodeClassUri !== selectedRdfUri;\n })\n .attr(\"x\", function (d) {\n if (d.target.x > d.source.x) {\n return (d.source.x + (d.target.x - d.source.x) / 2);\n } else {\n return (d.target.x + (d.source.x - d.target.x) / 2);\n }\n })\n .attr(\"y\", function (d) {\n if (d.target.y > d.source.y) {\n return (d.source.y + (d.target.y - d.source.y) / 2);\n } else {\n return (d.target.y + (d.source.y - d.target.y) / 2);\n }\n })\n .moveToFront();\n\n\n propertyNames\n .attr(\"x\", function (d) {\n if (d.target.x > d.source.x) {\n return (d.source.x + (d.target.x - d.source.x) / 2);\n } else {\n return (d.target.x + (d.source.x - d.target.x) / 2);\n }\n })\n .attr(\"y\", function (d) {\n if (d.target.y > d.source.y) {\n return (d.source.y + (d.target.y - d.source.y) / 2);\n } else {\n return (d.target.y + (d.source.y - d.target.y) / 2);\n }\n })\n .moveToFront();\n\n\n objectPropClassName\n .attr(\"x\", function (d) {\n if (d.classPosition === \"right\") {\n return d.x + otherClassSize * 1.2;\n } else {\n return d.x - otherClassSize * 1.2;\n }\n })\n .attr(\"y\", function (d) {\n return d.y;\n })\n .moveToFront();\n }\n\n force.on(\"tick\", tick)\n\n }\n });\n\n let isDragged = false;\n\n function dragStart(event, d) {\n force.stop();\n d.fx = event.x;\n d.fy = event.y;\n d3.select(this).classed(\"selected\", true);\n\n }\n\n // Update the subject (dragged node) position during drag.\n function dragged(event, d) {\n isDragged = true;\n\n force.alphaTarget(0).restart();\n d.fx = event.x;\n d.fy = event.y;\n }\n\n // Restore the target alpha so the simulation cools after dragging ends.\n // Unfix the subject position now that it’s no longer being dragged.\n function dragEnd(event, d) {\n d.fx = null;\n d.fy = null;\n d3.select(this).classed(\"selected\", false);\n if (isDragged) {\n force.alpha(0.2).restart();\n isDragged = false;\n } else {\n force.restart();\n }\n }\n\n }\n}\n"],"names":["domainRangeGraphDirective","$rootScope","$window","$repositories","GraphDataRestService","$location","LocalStorageAdapter","LSKeys","$timeout","toastr","ONTO_RED","ONTO_GREEN","ONTO_BLUE","NON_COLLAPSED_REFLEXIVE_LINK_LIMIT","restrict","template","scope","showPredicatesInfoPanel","selectedPredicate","collapseEdges","link","timer","width","mainClassSize","otherClassSize","datatypeSize","labelFontSize","basicArrowStrokeWidth","svg","d3","append","attr","on","force","drag","subject","d","event","stop","fx","x","fy","y","this","classed","isDragged","alpha","restart","alphaTarget","defs","attrs","id","viewBox","refX","refY","markerUnits","markerWidth","markerHeight","orient","fill","class","cssRules","SVG","Export","getCSSRules","$","imgSrc","generateBase64ImageSource","href","download","getActiveRepository","legendBackgroundWidth","legendBackgroundHeight","legendCellGroup","height","style","sourceX","targetX","legendTextX","legendLabelFontSize","classNodeTextY","cx","cy","r","text","classNodeY","objectNodeTextY","datatypeNodeY","datatypeNodeTextY","basicPropertyArrowY","x1","y1","x2","y2","absUrl","implicitPropArrowY","collapsedPropArrowY","generateLegend","selectedRdfUri","search","uri","classNodeLabel","name","collapsed","getDomainRangeData","success","response","status","headers","domainRangeGraphData","error","window","set","DOMAIN_RANGE_WENT_BACK","onpopstate","state","$broadcast","$watch","angular","isUndefined","DOMAIN_RANGE_COLLAPSE_EDGES","get","switchEdgeMode","remove","graph","_","cloneDeep","nodes","links","strength","distance","linkGroup","selectAll","data","enter","styleArrowsInCollapsedMode","sel","loopLink","loopLinkEdgeCount","each","objectPropNodeClassUri","propertyType","targetRadius","targetNodeEdgeCount","implicit","loopLinkSize","previousPropertyNameSelection","disableCollapsedPredicateLabelHightlighting","isEmptyObject","background","onCollapsedPropertyNameClick","previousSibling","stopPropagation","ready","bind","propertyNames","test","open","encodeURIComponent","linkRect","calculatedWidth","getBBox","textPadding","calculatedHeight","translateX","nodeGroup","node","filter","objectPropClassUri","classPosition","objectPropClassName","call","reloadDomainRangeGraphView","$apply","select","parentNode","D3","Text","calcFontSize","rdfClassName","classNode","loopLinkBackgroundSel","loopLinkPropertyName","loopLinkBackgroundProps","i","push","idx","tick","e","k","positionLoopLinkBackgrounds","loopLinkBackgroundY","loopLinkBackgroundX","allLoopLinkEdges","dd","foundLoopLinkBackgroundProps","grep","obj","parseFloat","transform","reposition","viewMoreTextWidth","target","allEdges","getComputedTextLength","adjustViewMorePredicatesLabel","source","targetY","pushEdgesToLeftAndRight","angle","Math","atan2","cos","sin","loopTranslateX","loopTranslateY","positionLoopLink","currentBackgroundHeight","loopLinkLabelX","loopLinkLabelY","moveToFront","predicatesLeft","size","labelSel","backgroundSel","nextSibling","createViewMorePredicatesLabel","positionLoopLinkLabels","ActiveXObject","log10","log","LN10","absDiff","logOffset","abs","centerClassNode","renderDomainRangeGraph","$on","cancel","module","constant","directive","$inject"],"sourceRoot":""}