graphdb-workbench 4.0.0-TR24 → 4.0.0-TR25

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 (118) hide show
  1. package/dist/10804.62d23036c15bd05ab8f4.bundle.js +2 -0
  2. package/dist/10804.62d23036c15bd05ab8f4.bundle.js.map +1 -0
  3. package/dist/29733.55b41709d810fa99e672.bundle.js +2 -0
  4. package/dist/29733.55b41709d810fa99e672.bundle.js.map +1 -0
  5. package/dist/38046.d5fcf560e9573afe0793.bundle.js +2 -0
  6. package/dist/38046.d5fcf560e9573afe0793.bundle.js.map +1 -0
  7. package/dist/43239.c76fc77febaf50657b13.bundle.js +2 -0
  8. package/dist/43239.c76fc77febaf50657b13.bundle.js.map +1 -0
  9. package/dist/54231.86549d1df408d58c8d9c.bundle.js +2 -0
  10. package/dist/54231.86549d1df408d58c8d9c.bundle.js.map +1 -0
  11. package/dist/6345.4c432e9c50769f9fed92.bundle.js +2 -0
  12. package/dist/6345.4c432e9c50769f9fed92.bundle.js.map +1 -0
  13. package/dist/{64709.692234bce97b3d7c3f08.bundle.js → 64709.62285597fe955d9a4e6f.bundle.js} +2 -2
  14. package/dist/{64709.692234bce97b3d7c3f08.bundle.js.map → 64709.62285597fe955d9a4e6f.bundle.js.map} +1 -1
  15. package/dist/{65677.f973a5e87a056639df3d.bundle.js → 65677.5b3c1615bec7865c3bb9.bundle.js} +2 -2
  16. package/dist/{65677.f973a5e87a056639df3d.bundle.js.map → 65677.5b3c1615bec7865c3bb9.bundle.js.map} +1 -1
  17. package/dist/{80933.e68a74507b277bc3029e.bundle.js → 80933.3c17cb7ee7edbf6e82e5.bundle.js} +2 -2
  18. package/dist/{80933.e68a74507b277bc3029e.bundle.js.map → 80933.3c17cb7ee7edbf6e82e5.bundle.js.map} +1 -1
  19. package/dist/{82917.025cdb8ee0ac54edcab1.bundle.js → 82917.577cefdef6ecc843b821.bundle.js} +2 -2
  20. package/dist/{82917.025cdb8ee0ac54edcab1.bundle.js.map → 82917.577cefdef6ecc843b821.bundle.js.map} +1 -1
  21. package/dist/{86099.27eafa3d7848c2893767.bundle.js → 86099.38ff7f3b1e3b7db27e13.bundle.js} +2 -2
  22. package/dist/{86099.27eafa3d7848c2893767.bundle.js.map → 86099.38ff7f3b1e3b7db27e13.bundle.js.map} +1 -1
  23. package/dist/assets/i18n/language-config.json +1 -1
  24. package/dist/i18n/locale-en.json +4 -3
  25. package/dist/i18n/locale-fr.json +4 -3
  26. package/dist/index.html +9 -9
  27. package/dist/js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html +1 -1
  28. package/dist/js/angular/clustermanagement/templates/cluster-configuration/multi-region.html +1 -1
  29. package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
  30. package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
  31. package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
  32. package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
  33. package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
  34. package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
  35. package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +7 -7
  36. package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
  37. package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
  38. package/dist/js/angular/core/templates/core-errors.html +1 -1
  39. package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
  40. package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
  41. package/dist/js/angular/core/templates/search-resource-input.html +1 -1
  42. package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
  43. package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
  44. package/dist/js/angular/graphql/templates/graphql-playground.html +2 -2
  45. package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
  46. package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
  47. package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
  48. package/dist/js/angular/security/templates/user.html +2 -2
  49. package/dist/js/angular/security/templates/users.html +1 -1
  50. package/dist/js/angular/templates/repositorySize.html +1 -1
  51. package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
  52. package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
  53. package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
  54. package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
  55. package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
  56. package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
  57. package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +3 -3
  58. package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
  59. package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
  60. package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
  61. package/dist/{legacyWorkbench.ba7ff32677564dfd4fe1.js → legacyWorkbench.fa4203b20bf8d73ada10.js} +3 -3
  62. package/dist/{legacyWorkbench.ba7ff32677564dfd4fe1.js.map → legacyWorkbench.fa4203b20bf8d73ada10.js.map} +1 -1
  63. package/dist/{main.d7968e926ea5592be2a6.js → main.6692816e0953b1a60712.js} +3 -3
  64. package/dist/{main.d7968e926ea5592be2a6.js.map → main.6692816e0953b1a60712.js.map} +1 -1
  65. package/dist/pages/aclmanagement.html +1 -1
  66. package/dist/pages/autocomplete.html +1 -1
  67. package/dist/pages/choose-repository-type.html +1 -1
  68. package/dist/pages/cluster-management/clusterInfo.html +2 -2
  69. package/dist/pages/create-index.html +1 -1
  70. package/dist/pages/dependencies.html +1 -1
  71. package/dist/pages/domainRangeInfo.html +2 -2
  72. package/dist/pages/edit.html +1 -1
  73. package/dist/pages/explore.html +1 -1
  74. package/dist/pages/export.html +1 -1
  75. package/dist/pages/graph-config/saveGraphConfig.html +8 -8
  76. package/dist/pages/graphs-visualizations.html +7 -7
  77. package/dist/pages/guides.html +1 -1
  78. package/dist/pages/home.html +1 -1
  79. package/dist/pages/import.html +2 -2
  80. package/dist/pages/jdbc-create.html +1 -1
  81. package/dist/pages/jdbc.html +1 -1
  82. package/dist/pages/monitor/backup-and-restore.html +1 -1
  83. package/dist/pages/monitor/queries.html +4 -4
  84. package/dist/pages/monitor/resources.html +1 -1
  85. package/dist/pages/namespaces.html +2 -2
  86. package/dist/pages/plugins.html +1 -1
  87. package/dist/pages/rdfClassHierarchyInfo.html +8 -8
  88. package/dist/pages/rdfrank.html +2 -2
  89. package/dist/pages/repositories.html +1 -1
  90. package/dist/pages/repository.html +1 -1
  91. package/dist/pages/similarity-indexes.html +1 -1
  92. package/dist/pages/sparql-editor.html +1 -1
  93. package/dist/pages/sparql-template-create.html +1 -1
  94. package/dist/pages/sparql-templates.html +1 -1
  95. package/dist/pages/ux-test1.html +2 -2
  96. package/dist/res/swagger5/index.html +8 -8
  97. package/dist/sbom.cdx.json +6 -6
  98. package/dist/shared-components/cjs/onto-layout.cjs.entry.js +1 -1
  99. package/dist/shared-components/collection/components/onto-layout/onto-layout.js +1 -1
  100. package/dist/shared-components/esm/onto-layout.entry.js +1 -1
  101. package/dist/shared-components/shared-components/p-6fd8a7ef.entry.js +1 -0
  102. package/dist/shared-components/shared-components/shared-components.esm.js +1 -1
  103. package/dist/shared-components/types/components/onto-layout/onto-layout.d.ts +1 -0
  104. package/package.json +1 -1
  105. package/dist/10804.9c5eb1358106e43a56ff.bundle.js +0 -2
  106. package/dist/10804.9c5eb1358106e43a56ff.bundle.js.map +0 -1
  107. package/dist/29733.eb663d4b8d6aa7331953.bundle.js +0 -2
  108. package/dist/29733.eb663d4b8d6aa7331953.bundle.js.map +0 -1
  109. package/dist/38046.76b9f6100b53827a1d44.bundle.js +0 -2
  110. package/dist/38046.76b9f6100b53827a1d44.bundle.js.map +0 -1
  111. package/dist/43239.40282ca142f86c6dde15.bundle.js +0 -2
  112. package/dist/43239.40282ca142f86c6dde15.bundle.js.map +0 -1
  113. package/dist/54231.a271c2f8a5cf643b3fcf.bundle.js +0 -2
  114. package/dist/54231.a271c2f8a5cf643b3fcf.bundle.js.map +0 -1
  115. package/dist/6345.2368e0979b55e4b52e55.bundle.js +0 -1
  116. package/dist/shared-components/shared-components/p-6bb1e333.entry.js +0 -1
  117. /package/dist/{legacyWorkbench.ba7ff32677564dfd4fe1.js.LICENSE.txt → legacyWorkbench.fa4203b20bf8d73ada10.js.LICENSE.txt} +0 -0
  118. /package/dist/{main.d7968e926ea5592be2a6.js.LICENSE.txt → main.6692816e0953b1a60712.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
- export const __webpack_esm_id__=86099;export const __webpack_esm_ids__=[86099];export const __webpack_esm_modules__={86099(e,t,n){var a=n(82667),r=n(89687),i=n(9508),s=n(44482),c=n(66886),o=(n(38473),n(57154));function l(e,t,n,l,d,h,u,f,p,g,x,m){return{restrict:"AE",template:'<div id="classChart"></div>',scope:{classHierarchyData:"=",flattenedClassNames:"=",selectedClass:"=",currentSliderValue:"=",showClassInfoPanel:"=",showExternalElements:"=",hidePrefixes:"=",currentBrowserLimit:"="},link:function(y,A,v){!function(y){let A=!1;let v,S;const C=s.pack().size([780,780]),R=s.scaleLinear().domain([0,4]).range(["hsl(19, 70%, 90%)","hsl(19, 70%, 50%)"]).interpolate(s.interpolateHcl),E=s.select("#classChart").insert("svg:svg","h2").attr("viewBox","0 0 800 800").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null);function P(){return E.append("svg:g").attrs({id:"main-group",transform:"translate(400,400)"})}function w(){return"true"===g.get(x.CLASS_HIERARCHY_HIDE_PREFIXES)}function H(){const e=c.A.Export.getCSSRules("css/rdf-class-hierarchy-labels.css?v=4.0.0-TR24");s.selectAll("#main-group").append("defs"),$("defs").append('<style type="text/css"><![CDATA['+e+"]]></style>"),s.selectAll("g").style("opacity",1);const t=c.A.Export.generateBase64ImageSource("#classChart svg");s.select(this).attrs({href:t,download:"class-hierarchy-"+h.getActiveRepository()+".svg"})}y.hidePrefixes=w();let I=P();const T=!!y.classHierarchyData?.classCount,L=h.getActiveRepository()&&!h.isSystemRepository();let k,D,N,b,F;(0,o.service)(o.LicenseContextService).onLicenseChanged(t=>{t?.valid&&!T&&L&&function(){e.loader=!0,e.hierarchyError=!1;const t=g.get(`classHierarchy-selectedGraph-${h.getActiveRepository()}`);n.getClassHierarchyData(null!==t?t.contextID.uri:"").success(function(t,n){e.loader=!1,207===n&&u.warning(m.instant("graphexplore.update.diagram"),m.instant("graphexplore.repository.data.changed")),y.classHierarchyData=t,s.select("#download-svg").on("mouseover",H)}).error(function(t){e.loader=!1,e.hierarchyError=getError(t),u.error(m.instant("graphexplore.error.request.failed",{name:p,error:getError(t)}))})}()});const O={};function z(n,c,o,h){b&&b(),F&&F(),s.selectAll("#main-group").remove(),I=P(),r.A.SingleChild.addPlaceholders(n,!0),S=s.hierarchy(n),S.sum(function(e){return e.size}),N=o||S,C(S);const u=S.descendants();let g;N.isInFocusTransitive=!0,r.A.SingleChild.removePlaceholders(u),r.A.SingleChild.centerNodes(u),r.A.SingleChild.makePositionsRelativeToZero(u),v||(v=(0,a.A)().attr("class","d3-tip").customPosition(function(e,t){return{top:"inherit",bottom:l.innerHeight-t.clientY+"px",right:l.innerWidth-t.clientX+"px"}}).html(function(e){return e.data.name}),E.call(v));const x=I.selectAll("circle").data(u).enter().append("g");c.doFade&&x.each(function(e){i.A.Transition.fadeIn(s.select(this),550)});let m=[];const w=x.append("circle").attr("class",function(e){return e.data.role}).attr("data-test",function(e){return"class-"+e.data.name}).attr("guide-selector",function(e){return"class-"+e.data.name}).style("fill",function(e){return e.children?R(e.depth):"#E0D0D0"}).each(function(e){if(e.circle=s.select(this),e.data.name!==p){const t=e.data.name;m.push({name:t}),O[[t]]=e,e.circle.classed("rdf-class",!0),e.circle.on("mouseover",function(t){c.noPrefixes||e.textHidden?v.show(e,t):v.hide(e)}),e.circle.on("mouseout",v.hide)}}).on("gdb-focus",(e,t)=>D(t)).on("gdb-zoom",(e,t)=>Z(t));let H;function T(e){s.selectAll(".selected").classed("selected",e.selected=!1),e.circle.classed("selected",e.selected=!0),H=e}function L(){y.showClassInfoPanel=!1}m&&(m=_.uniqBy(m,"name"),y.flattenedClassNames=m);const $=i.A.Click.delayDblClick();s.selectAll(".parent, .topLevelParent, .child, .root").call($),D=function(e){Z(e),e.data.name===p?(L(),s.selectAll(".selected").classed("selected",!1)):(T(e),A||(y.selectedClass=H,y.showClassInfoPanel=!0),y.$on("sidePanelClosed",function(t){s.selectAll(".selected").classed("selected",e.selected=!1)}))},$.on("click",function(e,t){t.data.id&&l.history.pushState({id:t.data.id},"classHierarchyPage"+t.data.id,"hierarchy#"+t.data.id),v.hide(),D(t)}),$.on("dblclick",function(t,a){a!==n&&(v.hide(),T(a),e.$broadcast("goToDomainRangeGraphView",H,N),t.stopPropagation())});let z=0;E.on("wheel",function(e){v.hide(),e.preventDefault(),e.stopPropagation();const t=Date.now();if(!(t-z>100))return;z=t;let n="";e.deltaY<=-1?n="in":e.deltaY>=1&&(n="out");let a=e.target.__data__;if(a||(a=N),"in"===n){if(a!==N){for(;a.parent&&!a.parent.isInFocusTransitive;)a=a.parent;a.depth<N.depth&&(a=N)}if(a===N&&a.children){let e=a.children[0];for(let t=1;t<a.children.length;t++)a.children[t].sortingRank>e.sortingRank&&(e=a.children[t]);e.children&&(a=e)}else a.children||(a=a.parent);Z(a,!0)}else"out"===n&&(a=N.parent,a&&Z(a,!0));N.data.name===p&&l.history.replaceState({id:1},"classHierarchyPage1","hierarchy#1"),U()});const Y=I.selectAll("text").data(u).enter().append("text").attr("class",function(e){return e.children&&e.children.length?"label":"label child-label"}).each(function(e){e.textSel=s.select(this)});c.noPrefixes?(Y.each(function(e){const t=e.data.name.indexOf(":");e.data.name.indexOf("http://")>-1?e.noPrefixName=e.data.name:t>-1&&(e.noPrefixName=e.data.name.substring(t+1))}),Y.style("font-size",function(e){return i.A.Text.calcFontSize(e.noPrefixName,e.r)}).text(function(e){return i.A.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r/3)})):Y.style("font-size",function(e){return i.A.Text.calcFontSize(e.data.name,e.r)}).text(function(e){return i.A.Text.getTextWithElipsisIfNeeded(e.data.name,e.r/3)}),Y.style("display",function(e){return e.parent&&e.parent.data===N.data?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,null):(e.textHidden=!0,"none")}),c.doFade&&!c.keepPrevState&&Y.each(function(e){i.A.Transition.fadeIn(s.select(this),550)}),k=function(){function e(e){e&&w.each(function(t){+e===t.data.id&&D(t)})}const n=t.hash();l.onpopstate=function(t){t.state&&!t.state.skipOnPopState&&e(t.state.id)},e(n)};const B=I.selectAll("circle, text");function V(e,t){const n=800/e[2];g=e,B.attr("transform",function(t){return"translate("+(t.x-e[0])*n+","+(t.y-e[1])*n+")"}),w.attr("r",function(e){return e.r*n}),t&&Y.each(function(e){e.data.fullName!==N.data.topLevelParentUri&&N.data.topLevelParentUri!==p||(e.textSel.style("display","none"),N.children&&N.children.length?_.each(N.children,function(e){e.textSel.style("display","inline")}):N.textSel.style("display","inline"),N.parent&&_.each(N.parent.children,function(e){e.data.name!==N.data.name&&e.textSel.style("display","inline")}))}),Y.style("font-size",function(e){return c.noPrefixes?i.A.Text.calcFontSize(e.noPrefixName,e.r*n):i.A.Text.calcFontSize(e.data.name,e.r*n)}).text(function(e){return c.noPrefixes?i.A.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r*n/3):i.A.Text.getTextWithElipsisIfNeeded(e.data.name,e.r*n/3)})}function M(e){let t=2*e+20;return 2*e/t<.3&&(t=2*e+2),t}function W(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,this.style.display=""):(e.textHidden=!0,this.style.display="none")}function Z(e,t){if(d(function(){y.showExternalElements=e.data.name===p}),N===e)return;if(e.data.id&&l.history.replaceState({id:e.data.id,skipOnPopState:!0},"classHierarchyPage"+e.data.id,"hierarchy#"+e.data.id),!e.children&&(e=e.parent,N===e))return;if(t&&(L(),s.selectAll(".selected").classed("selected",!1)),N.parent){let e=N;for(;e;)e.isInFocusTransitive=!1,e=e.parent}let n=e;for(;n;)n.isInFocusTransitive=!!n.children,n=n.parent;N=e,2*N.r/(2*N.r+20)<.3||y.currentSliderValue>y.currentBrowserLimit?(V([N.x,N.y,M(N.r)]),Y.each(function(e){W.call(this,e)})):s.transition().duration(f).tween("zoom",function(e){const t=s.interpolateZoom(g,[N.x,N.y,M(N.r)]);return function(e){V(t(e))}}).selectAll("text").each(W)}V([N.x,N.y,M(N.r)],h),b=y.$on("rootFocus",function(){l.history.pushState({id:1},"classHierarchyPage1","hierarchy#1"),D(S)}),F=y.$on("classSearch",function(e){D(e)})}function U(){const t=y.classHierarchyData.classCount;let n=g.get(x.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);(!n||n>t)&&(n=t,g.set(x.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,n)),e.$broadcast("classCount",t,n)}let Y,B,V,M;window.addEventListener("resize",U),window.addEventListener("beforeunload",function e(){window.removeEventListener("resize",U),window.removeEventListener("beforeunload",e)}),y.$watch("classHierarchyData",function(){Y&&Y(),B&&B(),V&&V(),M&&M();let e=w();if(y.classHierarchyData.classCount){U();const t=structuredClone(y.classHierarchyData);const n=s.hierarchy(t).descendants().sort(function(e,t){return e.data.sortingRank>t.data.sortingRank?-1:e.data.sortingRank<t.data.sortingRank||e.data.depth>t.data.depth?1:e.data.depth<t.data.depth?-1:0});let a,r;function i(e,t){const n={keepPrevState:!0,noPrefixes:w()};r=n.noPrefixes,z(a||e,n,N,!0),d(()=>{g.set(x.CLASS_HIERARCHY_SWITCH_PREFIXES,t),k(),A=!1},70)}function c(e,n,s){if(!e)return;g.set(x.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,e),a={name:p,children:[]};const c=new Set;for(let t=1;t<=e;t++)c.add(n[t].data.id),n[t].parent===n[0]&&a.children.push(n[t].data);(function e(t){if(!t.children)return;const n=[];for(const e of t.children)c.has(e.id)&&n.push($.extend({},e));t.children=n;for(const n of t.children)e(n)})(a),s?(r=angular.isUndefined(r)?w():r,z(a,{noPrefixes:r})):i(t)}const o=g.get(x.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);if(o)c(o,n);else{const h={doFade:!0,keepPrevState:!0,noPrefixes:w()};z(t,h),k()}let l;Y=y.$watch("hidePrefixes",function(n){angular.isUndefined(n)||e?e=void 0:d(function(){A=!0,function(e){angular.isUndefined(e)||g.set(x.CLASS_HIERARCHY_HIDE_PREFIXES,e)}(n),i(t,!0)},50)},!0),B=y.$watch("currentSliderValue",function(e){c(e,n,!0)},!0),M=y.$on("onEnterKeypressSearchAction",function(e){l&&D(l)}),V=y.$on("searchedClass",function(e,t){l=O[t.name],l&&D(l)})}},!0)}(y)}}}angular.module("graphdb.framework.graphexplore.directives.class",["graphdb.framework.graphexplore.controllers.class","graphdb.framework.utils.localstorageadapter"]).constant("ZOOM_DURATION",500).constant("ROOT_OBJ_NAME","RDF Class Hierarchy").directive("rdfClassHierarchy",l),l.$inject=["$rootScope","$location","GraphDataRestService","$window","$timeout","$repositories","toastr","ZOOM_DURATION","ROOT_OBJ_NAME","LocalStorageAdapter","LSKeys","$translate"]},89687(e,t,n){n.d(t,{A:()=>r});var a=a||{};a.SingleChild={addPlaceholders:function e(t,n){if(t.children){for(var a=0;a<t.children.length;a++)e(t.children[a]);if(1===t.children.length){var r=1.2*t.size;n&&(r=.1*t.children[0].size),t.children.push({name:"placeholder",size:r})}}},removePlaceholders:function e(t){for(var n=t.length-1;n>=0;n--){var a=t[n];"placeholder"===a.data.name?t.splice(n,1):a.children&&e(a.children)}},centerNodes:function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.children&&1===n.children.length){var a=n.x-n.children[0].x;n.children[0].x+=a,r(n.children[0],a)}}function r(e,t){if(e.children)for(var n=0;n<e.children.length;n++)e.children[n].x+=t,r(e.children[n],t)}},makePositionsRelativeToZero:function(e){for(var t=e[0].x,n=e[0].y,a=0;a<e.length;a++){var r=e[a];r.x-=t,r.y-=n}}};const r=a},66886(e,t,n){n.d(t,{A:()=>i}),n(11014);const a={selectAll:n(44482).selectAll};var r=r||{};r.Export={getCSSRules:function(e){const t=$('link[href="'+e+'"]')[0].sheet.rules;let n="";return _.each(t,function(e){n+=e.cssText}),n},generateBase64ImageSource:function(e){e||(e="svg");const t=a.selectAll(e).attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").node().parentNode.innerHTML;return"data:image/svg+xml;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(t)))}};const i=r}};
2
- //# sourceMappingURL=86099.27eafa3d7848c2893767.bundle.js.map
1
+ export const __webpack_esm_id__=86099;export const __webpack_esm_ids__=[86099];export const __webpack_esm_modules__={86099(e,t,n){var a=n(82667),r=n(89687),i=n(9508),s=n(44482),c=n(66886),o=(n(38473),n(57154));function l(e,t,n,l,d,h,u,f,p,g,x,m){return{restrict:"AE",template:'<div id="classChart"></div>',scope:{classHierarchyData:"=",flattenedClassNames:"=",selectedClass:"=",currentSliderValue:"=",showClassInfoPanel:"=",showExternalElements:"=",hidePrefixes:"=",currentBrowserLimit:"="},link:function(y,A,v){!function(y){let A=!1;let v,S;const C=s.pack().size([780,780]),R=s.scaleLinear().domain([0,4]).range(["hsl(19, 70%, 90%)","hsl(19, 70%, 50%)"]).interpolate(s.interpolateHcl),E=s.select("#classChart").insert("svg:svg","h2").attr("viewBox","0 0 800 800").attr("preserveAspectRatio","xMidYMid meet").on("dblclick.zoom",null);function P(){return E.append("svg:g").attrs({id:"main-group",transform:"translate(400,400)"})}function w(){return"true"===g.get(x.CLASS_HIERARCHY_HIDE_PREFIXES)}function H(){const e=c.A.Export.getCSSRules("css/rdf-class-hierarchy-labels.css?v=4.0.0-TR25");s.selectAll("#main-group").append("defs"),$("defs").append('<style type="text/css"><![CDATA['+e+"]]></style>"),s.selectAll("g").style("opacity",1);const t=c.A.Export.generateBase64ImageSource("#classChart svg");s.select(this).attrs({href:t,download:"class-hierarchy-"+h.getActiveRepository()+".svg"})}y.hidePrefixes=w();let I=P();const T=!!y.classHierarchyData?.classCount,L=h.getActiveRepository()&&!h.isSystemRepository();let k,D,N,b,F;(0,o.service)(o.LicenseContextService).onLicenseChanged(t=>{t?.valid&&!T&&L&&function(){e.loader=!0,e.hierarchyError=!1;const t=g.get(`classHierarchy-selectedGraph-${h.getActiveRepository()}`);n.getClassHierarchyData(null!==t?t.contextID.uri:"").success(function(t,n){e.loader=!1,207===n&&u.warning(m.instant("graphexplore.update.diagram"),m.instant("graphexplore.repository.data.changed")),y.classHierarchyData=t,s.select("#download-svg").on("mouseover",H)}).error(function(t){e.loader=!1,e.hierarchyError=getError(t),u.error(m.instant("graphexplore.error.request.failed",{name:p,error:getError(t)}))})}()});const O={};function z(n,c,o,h){b&&b(),F&&F(),s.selectAll("#main-group").remove(),I=P(),r.A.SingleChild.addPlaceholders(n,!0),S=s.hierarchy(n),S.sum(function(e){return e.size}),N=o||S,C(S);const u=S.descendants();let g;N.isInFocusTransitive=!0,r.A.SingleChild.removePlaceholders(u),r.A.SingleChild.centerNodes(u),r.A.SingleChild.makePositionsRelativeToZero(u),v||(v=(0,a.A)().attr("class","d3-tip").customPosition(function(e,t){return{top:"inherit",bottom:l.innerHeight-t.clientY+"px",right:l.innerWidth-t.clientX+"px"}}).html(function(e){return e.data.name}),E.call(v));const x=I.selectAll("circle").data(u).enter().append("g");c.doFade&&x.each(function(e){i.A.Transition.fadeIn(s.select(this),550)});let m=[];const w=x.append("circle").attr("class",function(e){return e.data.role}).attr("data-test",function(e){return"class-"+e.data.name}).attr("guide-selector",function(e){return"class-"+e.data.name}).style("fill",function(e){return e.children?R(e.depth):"#E0D0D0"}).each(function(e){if(e.circle=s.select(this),e.data.name!==p){const t=e.data.name;m.push({name:t}),O[[t]]=e,e.circle.classed("rdf-class",!0),e.circle.on("mouseover",function(t){c.noPrefixes||e.textHidden?v.show(e,t):v.hide(e)}),e.circle.on("mouseout",v.hide)}}).on("gdb-focus",(e,t)=>D(t)).on("gdb-zoom",(e,t)=>Z(t));let H;function T(e){s.selectAll(".selected").classed("selected",e.selected=!1),e.circle.classed("selected",e.selected=!0),H=e}function L(){y.showClassInfoPanel=!1}m&&(m=_.uniqBy(m,"name"),y.flattenedClassNames=m);const $=i.A.Click.delayDblClick();s.selectAll(".parent, .topLevelParent, .child, .root").call($),D=function(e){Z(e),e.data.name===p?(L(),s.selectAll(".selected").classed("selected",!1)):(T(e),A||(y.selectedClass=H,y.showClassInfoPanel=!0),y.$on("sidePanelClosed",function(t){s.selectAll(".selected").classed("selected",e.selected=!1)}))},$.on("click",function(e,t){t.data.id&&l.history.pushState({id:t.data.id},"classHierarchyPage"+t.data.id,"hierarchy#"+t.data.id),v.hide(),D(t)}),$.on("dblclick",function(t,a){a!==n&&(v.hide(),T(a),e.$broadcast("goToDomainRangeGraphView",H,N),t.stopPropagation())});let z=0;E.on("wheel",function(e){v.hide(),e.preventDefault(),e.stopPropagation();const t=Date.now();if(!(t-z>100))return;z=t;let n="";e.deltaY<=-1?n="in":e.deltaY>=1&&(n="out");let a=e.target.__data__;if(a||(a=N),"in"===n){if(a!==N){for(;a.parent&&!a.parent.isInFocusTransitive;)a=a.parent;a.depth<N.depth&&(a=N)}if(a===N&&a.children){let e=a.children[0];for(let t=1;t<a.children.length;t++)a.children[t].sortingRank>e.sortingRank&&(e=a.children[t]);e.children&&(a=e)}else a.children||(a=a.parent);Z(a,!0)}else"out"===n&&(a=N.parent,a&&Z(a,!0));N.data.name===p&&l.history.replaceState({id:1},"classHierarchyPage1","hierarchy#1"),U()});const Y=I.selectAll("text").data(u).enter().append("text").attr("class",function(e){return e.children&&e.children.length?"label":"label child-label"}).each(function(e){e.textSel=s.select(this)});c.noPrefixes?(Y.each(function(e){const t=e.data.name.indexOf(":");e.data.name.indexOf("http://")>-1?e.noPrefixName=e.data.name:t>-1&&(e.noPrefixName=e.data.name.substring(t+1))}),Y.style("font-size",function(e){return i.A.Text.calcFontSize(e.noPrefixName,e.r)}).text(function(e){return i.A.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r/3)})):Y.style("font-size",function(e){return i.A.Text.calcFontSize(e.data.name,e.r)}).text(function(e){return i.A.Text.getTextWithElipsisIfNeeded(e.data.name,e.r/3)}),Y.style("display",function(e){return e.parent&&e.parent.data===N.data?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,null):(e.textHidden=!0,"none")}),c.doFade&&!c.keepPrevState&&Y.each(function(e){i.A.Transition.fadeIn(s.select(this),550)}),k=function(){function e(e){e&&w.each(function(t){+e===t.data.id&&D(t)})}const n=t.hash();l.onpopstate=function(t){t.state&&!t.state.skipOnPopState&&e(t.state.id)},e(n)};const B=I.selectAll("circle, text");function V(e,t){const n=800/e[2];g=e,B.attr("transform",function(t){return"translate("+(t.x-e[0])*n+","+(t.y-e[1])*n+")"}),w.attr("r",function(e){return e.r*n}),t&&Y.each(function(e){e.data.fullName!==N.data.topLevelParentUri&&N.data.topLevelParentUri!==p||(e.textSel.style("display","none"),N.children&&N.children.length?_.each(N.children,function(e){e.textSel.style("display","inline")}):N.textSel.style("display","inline"),N.parent&&_.each(N.parent.children,function(e){e.data.name!==N.data.name&&e.textSel.style("display","inline")}))}),Y.style("font-size",function(e){return c.noPrefixes?i.A.Text.calcFontSize(e.noPrefixName,e.r*n):i.A.Text.calcFontSize(e.data.name,e.r*n)}).text(function(e){return c.noPrefixes?i.A.Text.getTextWithElipsisIfNeeded(e.noPrefixName,e.r*n/3):i.A.Text.getTextWithElipsisIfNeeded(e.data.name,e.r*n/3)})}function M(e){let t=2*e+20;return 2*e/t<.3&&(t=2*e+2),t}function W(e){!e.isInFocusTransitive&&e.parent&&e.parent.isInFocusTransitive?(e.textHidden=this.textContent.indexOf("...")+3===this.textContent.length,this.style.display=""):(e.textHidden=!0,this.style.display="none")}function Z(e,t){if(d(function(){y.showExternalElements=e.data.name===p}),N===e)return;if(e.data.id&&l.history.replaceState({id:e.data.id,skipOnPopState:!0},"classHierarchyPage"+e.data.id,"hierarchy#"+e.data.id),!e.children&&(e=e.parent,N===e))return;if(t&&(L(),s.selectAll(".selected").classed("selected",!1)),N.parent){let e=N;for(;e;)e.isInFocusTransitive=!1,e=e.parent}let n=e;for(;n;)n.isInFocusTransitive=!!n.children,n=n.parent;N=e,2*N.r/(2*N.r+20)<.3||y.currentSliderValue>y.currentBrowserLimit?(V([N.x,N.y,M(N.r)]),Y.each(function(e){W.call(this,e)})):s.transition().duration(f).tween("zoom",function(e){const t=s.interpolateZoom(g,[N.x,N.y,M(N.r)]);return function(e){V(t(e))}}).selectAll("text").each(W)}V([N.x,N.y,M(N.r)],h),b=y.$on("rootFocus",function(){l.history.pushState({id:1},"classHierarchyPage1","hierarchy#1"),D(S)}),F=y.$on("classSearch",function(e){D(e)})}function U(){const t=y.classHierarchyData.classCount;let n=g.get(x.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);(!n||n>t)&&(n=t,g.set(x.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,n)),e.$broadcast("classCount",t,n)}let Y,B,V,M;window.addEventListener("resize",U),window.addEventListener("beforeunload",function e(){window.removeEventListener("resize",U),window.removeEventListener("beforeunload",e)}),y.$watch("classHierarchyData",function(){Y&&Y(),B&&B(),V&&V(),M&&M();let e=w();if(y.classHierarchyData.classCount){U();const t=structuredClone(y.classHierarchyData);const n=s.hierarchy(t).descendants().sort(function(e,t){return e.data.sortingRank>t.data.sortingRank?-1:e.data.sortingRank<t.data.sortingRank||e.data.depth>t.data.depth?1:e.data.depth<t.data.depth?-1:0});let a,r;function i(e,t){const n={keepPrevState:!0,noPrefixes:w()};r=n.noPrefixes,z(a||e,n,N,!0),d(()=>{g.set(x.CLASS_HIERARCHY_SWITCH_PREFIXES,t),k(),A=!1},70)}function c(e,n,s){if(!e)return;g.set(x.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE,e),a={name:p,children:[]};const c=new Set;for(let t=1;t<=e;t++)c.add(n[t].data.id),n[t].parent===n[0]&&a.children.push(n[t].data);(function e(t){if(!t.children)return;const n=[];for(const e of t.children)c.has(e.id)&&n.push($.extend({},e));t.children=n;for(const n of t.children)e(n)})(a),s?(r=angular.isUndefined(r)?w():r,z(a,{noPrefixes:r})):i(t)}const o=g.get(x.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);if(o)c(o,n);else{const h={doFade:!0,keepPrevState:!0,noPrefixes:w()};z(t,h),k()}let l;Y=y.$watch("hidePrefixes",function(n){angular.isUndefined(n)||e?e=void 0:d(function(){A=!0,function(e){angular.isUndefined(e)||g.set(x.CLASS_HIERARCHY_HIDE_PREFIXES,e)}(n),i(t,!0)},50)},!0),B=y.$watch("currentSliderValue",function(e){c(e,n,!0)},!0),M=y.$on("onEnterKeypressSearchAction",function(e){l&&D(l)}),V=y.$on("searchedClass",function(e,t){l=O[t.name],l&&D(l)})}},!0)}(y)}}}angular.module("graphdb.framework.graphexplore.directives.class",["graphdb.framework.graphexplore.controllers.class","graphdb.framework.utils.localstorageadapter"]).constant("ZOOM_DURATION",500).constant("ROOT_OBJ_NAME","RDF Class Hierarchy").directive("rdfClassHierarchy",l),l.$inject=["$rootScope","$location","GraphDataRestService","$window","$timeout","$repositories","toastr","ZOOM_DURATION","ROOT_OBJ_NAME","LocalStorageAdapter","LSKeys","$translate"]},89687(e,t,n){n.d(t,{A:()=>r});var a=a||{};a.SingleChild={addPlaceholders:function e(t,n){if(t.children){for(var a=0;a<t.children.length;a++)e(t.children[a]);if(1===t.children.length){var r=1.2*t.size;n&&(r=.1*t.children[0].size),t.children.push({name:"placeholder",size:r})}}},removePlaceholders:function e(t){for(var n=t.length-1;n>=0;n--){var a=t[n];"placeholder"===a.data.name?t.splice(n,1):a.children&&e(a.children)}},centerNodes:function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.children&&1===n.children.length){var a=n.x-n.children[0].x;n.children[0].x+=a,r(n.children[0],a)}}function r(e,t){if(e.children)for(var n=0;n<e.children.length;n++)e.children[n].x+=t,r(e.children[n],t)}},makePositionsRelativeToZero:function(e){for(var t=e[0].x,n=e[0].y,a=0;a<e.length;a++){var r=e[a];r.x-=t,r.y-=n}}};const r=a},66886(e,t,n){n.d(t,{A:()=>i}),n(11014);const a={selectAll:n(44482).selectAll};var r=r||{};r.Export={getCSSRules:function(e){const t=$('link[href="'+e+'"]')[0].sheet.rules;let n="";return _.each(t,function(e){n+=e.cssText}),n},generateBase64ImageSource:function(e){e||(e="svg");const t=a.selectAll(e).attr("version","1.1").attr("xmlns","http://www.w3.org/2000/svg").node().parentNode.innerHTML;return"data:image/svg+xml;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(t)))}};const i=r}};
2
+ //# sourceMappingURL=86099.38ff7f3b1e3b7db27e13.bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"86099.27eafa3d7848c2893767.bundle.js","mappings":"kNAoBA,SAASA,EAAwBC,EAAYC,EAAWC,EAAsBC,EAASC,EAAUC,EAAeC,EAAQC,EAAeC,EAAeC,EAAqBC,EAAQC,GAC/K,MAAO,CACHC,SAAU,KACVC,SAAU,8BACVC,MAAO,CACHC,mBAAoB,IACpBC,oBAAqB,IACrBC,cAAe,IACfC,mBAAoB,IACpBC,mBAAoB,IACpBC,qBAAsB,IACtBC,aAAc,IACdC,oBAAqB,KAEzBC,KAGJ,SAAkBT,EAAOU,EAASC,IAIlC,SAA6BX,GAKzB,IAAIY,GAAoB,EAMxB,IAAIC,EACAC,EAEJ,MAAMC,EAAaC,EAAAA,OACdC,KAAK,CAACC,IAAmBA,MAExBC,EAAQH,EAAAA,cACTI,OAAO,CAAC,EAAG,IACXC,MAAM,CAAC,oBAAqB,sBAC5BC,YAAYN,EAAAA,gBAEXO,EAAMP,EAAAA,OAAU,eACjBQ,OAAO,UAAW,MAClBC,KAAK,U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E,IAAIC,EAAS,GAIb,OAHAvH,EAAEpB,KAAK9E,EAAU,SAAU0N,GACvBD,GAAUC,EAAMC,OACpB,GACOF,CACX,EAkBIlN,0BAhBJ,SAAmCqN,GAC1BA,IACDA,EAAmB,OAGvB,MAAMC,EAAYhP,EAAG8F,UAAUiJ,GAC1BtO,KAAK,UAAW,OAChBA,KAAK,QAAS,8BACduJ,OAAOiF,WAAWC,UAGvB,MAAO,2CAA6CC,KAAKC,SAASC,mBAAmBL,IACzF,GAQJ,S","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/graphexplore/directives/rdf-class-hierarchy.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/lib/common/circle-packing.js","webpack://root-config/./packages/legacy-workbench/src/js/lib/common/svg-export.js"],"sourcesContent":["/* eslint-disable no-invalid-this */\nimport d3tip from 'lib/d3-tip/d3-tip-patch';\nimport CirclePacking from 'lib/common/circle-packing';\nimport D3 from 'lib/common/d3-utils';\nimport * as d3 from 'd3';\nimport SVG from 'lib/common/svg-export';\nimport 'angular/utils/local-storage-adapter';\nimport {service, LicenseContextService} from '@ontotext/workbench-api';\n\nangular\n .module('graphdb.framework.graphexplore.directives.class', [\n 'graphdb.framework.graphexplore.controllers.class',\n 'graphdb.framework.utils.localstorageadapter',\n ])\n .constant(\"ZOOM_DURATION\", 500)\n .constant(\"ROOT_OBJ_NAME\", \"RDF Class Hierarchy\")\n .directive('rdfClassHierarchy', classHierarchyDirective);\n\nclassHierarchyDirective.$inject = ['$rootScope', '$location', 'GraphDataRestService', '$window', '$timeout', '$repositories', 'toastr', 'ZOOM_DURATION', 'ROOT_OBJ_NAME', 'LocalStorageAdapter', 'LSKeys', '$translate'];\n\nfunction classHierarchyDirective($rootScope, $location, GraphDataRestService, $window, $timeout, $repositories, toastr, ZOOM_DURATION, ROOT_OBJ_NAME, LocalStorageAdapter, LSKeys, $translate) {\n return {\n restrict: 'AE',\n template: '<div id=\"classChart\"></div>',\n scope: {\n classHierarchyData: '=',\n flattenedClassNames: '=',\n selectedClass: '=',\n currentSliderValue: '=',\n showClassInfoPanel: '=',\n showExternalElements: '=',\n hidePrefixes: '=',\n currentBrowserLimit: '=',\n },\n link: linkFunc,\n };\n\n function linkFunc(scope, element, attrs) {\n renderCirclePacking(scope, element);\n }\n\n function renderCirclePacking(scope, element) {\n /**\n * A boolean flag that determines whether the opening of the side info panel\n * should be suppressed when focusing on the chart while a class is selected.\n */\n let suppressPanelOpen = false;\n\n const width = 800;\n const height = 800;\n const diameter = height;\n const margin = 20;\n let tip;\n let rootHierarchy;\n\n const packLayout = d3.pack()\n .size([diameter - margin, diameter - margin]);\n\n const color = d3.scaleLinear()\n .domain([0, 4])\n .range([\"hsl(19, 70%, 90%)\", \"hsl(19, 70%, 50%)\"])\n .interpolate(d3.interpolateHcl);\n\n const svg = d3.select(\"#classChart\")\n .insert(\"svg:svg\", \"h2\")\n .attr(\"viewBox\", \"0 0 \" + width + \" \" + height)\n .attr(\"preserveAspectRatio\", \"xMidYMid meet\")\n .on(\"dblclick.zoom\", null);\n\n function appendMainGroup() {\n return svg.append(\"svg:g\")\n .attrs({\n id: \"main-group\",\n transform: \"translate(\" + width / 2 + \",\" + height / 2 + \")\",\n });\n }\n\n function savePrefixesState(hidePrefixes) {\n if (!angular.isUndefined(hidePrefixes)) {\n LocalStorageAdapter.set(LSKeys.CLASS_HIERARCHY_HIDE_PREFIXES, hidePrefixes);\n }\n }\n\n function getPrefixesState() {\n return LocalStorageAdapter.get(LSKeys.CLASS_HIERARCHY_HIDE_PREFIXES) === \"true\";\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 const cssRules = SVG.Export.getCSSRules(\"css/rdf-class-hierarchy-labels.css?v=4.0.0-TR24\");\n // inline css rules in a defs tag\n d3.selectAll(\"#main-group\")\n .append(\"defs\");\n $(\"defs\").append('<style type=\"text/css\"><![CDATA[' + cssRules + ']]></style>');\n\n // switch opacity to visible\n d3.selectAll(\"g\")\n .style(\"opacity\", 1);\n\n // convert selected html to base64\n const imgSrc = SVG.Export.generateBase64ImageSource(\"#classChart 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: \"class-hierarchy-\" + $repositories.getActiveRepository() + \".svg\",\n });\n }\n\n scope.hidePrefixes = getPrefixesState();\n\n let g = appendMainGroup();\n\n function fetchClassHierarchy() {\n $rootScope.loader = true;\n $rootScope.hierarchyError = false;\n const selGraphFromCache = LocalStorageAdapter.get(`classHierarchy-selectedGraph-${$repositories.getActiveRepository()}`);\n GraphDataRestService.getClassHierarchyData(selGraphFromCache !== null ? selGraphFromCache.contextID.uri : \"\")\n .success(function(response, status) {\n $rootScope.loader = false;\n if (status === 207) {\n toastr.warning(\n $translate.instant('graphexplore.update.diagram'),\n $translate.instant('graphexplore.repository.data.changed'),\n );\n }\n scope.classHierarchyData = response;\n d3.select(\"#download-svg\").on(\"mouseover\", prepareForSVGImageExport);\n })\n .error(function(response) {\n $rootScope.loader = false;\n $rootScope.hierarchyError = getError(response);\n toastr.error(\n $translate.instant('graphexplore.error.request.failed', {\n name: ROOT_OBJ_NAME,\n error: getError(response),\n }),\n );\n });\n }\n\n const hasData = !!scope.classHierarchyData?.classCount;\n const canUseRepo = $repositories.getActiveRepository() && !$repositories.isSystemRepository();\n\n service(LicenseContextService).onLicenseChanged((license) => {\n if (license?.valid && !hasData && canUseRepo) {\n fetchClassHierarchy();\n }\n });\n\n let autoZoomToPreviousState;\n let doFocus;\n\n let focus;\n let rootFocusEvent;\n let classSearchEvent;\n const flattenedClassData = {};\n\n function drawDiagram(root, config, newFocus, switchPrefixes) {\n if (rootFocusEvent) rootFocusEvent();\n if (classSearchEvent) classSearchEvent();\n // remove old group tag containing the diagram\n d3.selectAll(\"#main-group\").remove();\n\n // append new empty group tag in order to rerender new diagram\n g = appendMainGroup();\n\n // fix for single child classes\n CirclePacking.SingleChild.addPlaceholders(root, true);\n\n rootHierarchy = d3.hierarchy(root);\n rootHierarchy.sum(function(d) {\n return d.size;\n });\n focus = newFocus ? newFocus : rootHierarchy;\n\n packLayout(rootHierarchy);\n\n const nodes = rootHierarchy.descendants();\n let view;\n\n focus.isInFocusTransitive = true;\n\n // fixes for single child classes\n CirclePacking.SingleChild.removePlaceholders(nodes);\n CirclePacking.SingleChild.centerNodes(nodes);\n CirclePacking.SingleChild.makePositionsRelativeToZero(nodes);\n\n if (!tip) {\n tip = d3tip()\n .attr('class', 'd3-tip')\n .customPosition(function(d, event) {\n return {\n top: 'inherit',\n bottom: ($window.innerHeight - event.clientY) + 'px',\n right: ($window.innerWidth - event.clientX) + 'px',\n };\n })\n .html(function(d) {\n return d.data.name;\n });\n svg.call(tip);\n }\n\n const circleGroup = g.selectAll(\"circle\")\n .data(nodes)\n .enter().append(\"g\");\n\n if (config.doFade) {\n circleGroup.each(function(d) {\n D3.Transition.fadeIn(d3.select(this), 550);\n });\n }\n\n let flattenedClassNames = [];\n\n const circle = circleGroup\n .append(\"circle\")\n .attr(\"class\", function(d) {\n return d.data.role;\n })\n .attr(\"data-test\", function(d) {\n return \"class-\" + d.data.name;\n })\n .attr(\"guide-selector\", function(d) {\n return \"class-\" + d.data.name;\n })\n .style(\"fill\", function(d) {\n //return colors[d.depth % 6];\n return d.children ? color(d.depth) : \"#E0D0D0\";\n })\n .each(function(d) {\n d.circle = d3.select(this);\n if (d.data.name !== ROOT_OBJ_NAME) {\n const key = d.data.name;\n flattenedClassNames.push({name: key});\n flattenedClassData[[key]] = d;\n\n d.circle.classed(\"rdf-class\", true);\n d.circle.on('mouseover', function(event) {\n if (config.noPrefixes) {\n tip.show(d, event);\n } else if (!d.textHidden) {\n tip.hide(d);\n } else {\n tip.show(d, event);\n }\n });\n d.circle.on('mouseout', tip.hide);\n }\n })\n // custom event used when user is following a guide\n .on(\"gdb-focus\", (event, d) => doFocus(d))\n .on(\"gdb-zoom\", (event, d) => zoom(d));\n\n\n if (flattenedClassNames) {\n flattenedClassNames = _.uniqBy(flattenedClassNames, 'name');\n scope.flattenedClassNames = flattenedClassNames;\n }\n\n let selectedClass;\n\n function getCurrentClassDataAndMarkSelected(obj) {\n d3.selectAll(\".selected\").classed(\"selected\", obj.selected = false);\n obj.circle.classed(\"selected\", obj.selected = true);\n selectedClass = obj;\n }\n\n function showClassInfoPanel() {\n scope.selectedClass = selectedClass;\n scope.showClassInfoPanel = true;\n }\n\n function closeClassInfoPanel() {\n scope.showClassInfoPanel = false;\n }\n\n function goToDomainRangeGraphView() {\n $rootScope.$broadcast('goToDomainRangeGraphView', selectedClass, focus);\n }\n\n const clickCancel = D3.Click.delayDblClick();\n d3.selectAll(\".parent, .topLevelParent, .child, .root\")\n .call(clickCancel);\n\n doFocus = function(obj) {\n zoom(obj);\n\n if (obj.data.name === ROOT_OBJ_NAME) {\n closeClassInfoPanel();\n d3.selectAll(\".selected\").classed(\"selected\", false);\n } else {\n getCurrentClassDataAndMarkSelected(obj);\n if (!suppressPanelOpen) {\n showClassInfoPanel();\n }\n\n // FIXME: is it ok to bind this event handler every time and not just once?\n scope.$on('sidePanelClosed', function(event) {\n d3.selectAll(\".selected\").classed(\"selected\", obj.selected = false);\n });\n }\n\n\n //do not stop event propagation here\n };\n\n clickCancel.on(\"click\", function(event, obj) {\n // add clicked class to browser history\n if (obj.data.id) {\n $window.history.pushState({id: obj.data.id}, \"classHierarchyPage\" + obj.data.id, \"hierarchy#\" + obj.data.id);\n }\n\n //hide current d3-tip tooltip\n tip.hide();\n\n doFocus(obj);\n });\n\n clickCancel.on(\"dblclick\", function(event, obj) {\n if (obj === root) {\n return;\n }\n // hide current d3-tip tooltip in order not to appear in the next view\n tip.hide();\n getCurrentClassDataAndMarkSelected(obj);\n goToDomainRangeGraphView();\n\n event.stopPropagation();\n });\n\n let lastTimeWheel = 0;\n svg.on('wheel', function(event) {\n // hide current d3-tip tooltip\n tip.hide();\n\n event.preventDefault();\n event.stopPropagation();\n\n // at least 100ms must have passed since last time we updated\n const now = Date.now();\n if (now - lastTimeWheel > 100) {\n lastTimeWheel = now;\n } else {\n return;\n }\n\n let direction = '';\n if (event.deltaY <= -1) {\n direction = 'in';\n } else if (event.deltaY >= 1) {\n direction = 'out';\n }\n\n let obj = event.target.__data__;\n\n if (!obj) {\n // scroll outside the big circle\n obj = focus;\n }\n\n if (direction === 'in') {\n // determine object to zoom to\n\n if (obj !== focus) {\n // consider the object on which the scroll event occurred\n // and find the furthest parent that has no focused children\n while (obj.parent && !obj.parent.isInFocusTransitive) {\n obj = obj.parent;\n }\n if (obj.depth < focus.depth) {\n // however if that parent is of lower depth than the focus we ignore it\n obj = focus;\n }\n }\n\n if (obj === focus && obj.children) {\n // if object is in focus and it has children we zoom to its biggest child\n // TODO: sort children on backend\n let newobj = obj.children[0];\n for (let i = 1; i < obj.children.length; i++) {\n if (obj.children[i].sortingRank > newobj.sortingRank) {\n newobj = obj.children[i];\n }\n }\n if (newobj.children) {\n // Use the child only if it has children\n obj = newobj;\n }\n } else if (!obj.children) {\n // If node has no children use its parent instead\n obj = obj.parent;\n }\n\n zoom(obj, true);\n } else if (direction === 'out') {\n // zooming out simply goes one parent up\n obj = focus.parent;\n if (obj) {\n zoom(obj, true);\n }\n }\n\n if (focus.data.name === ROOT_OBJ_NAME) {\n $window.history.replaceState({id: 1}, \"classHierarchyPage1\", \"hierarchy#1\");\n }\n\n // redraw slider on zoom out\n sendSliderData();\n });\n\n const text = g.selectAll(\"text\")\n .data(nodes)\n .enter().append(\"text\")\n .attr(\"class\", function(d) {\n return d.children && d.children.length ? \"label\" : \"label child-label\";\n })\n .each(function(d) {\n d.textSel = d3.select(this);\n });\n\n function trimPrefixes(d) {\n const idx = d.data.name.indexOf(\":\");\n const absUriIdx = d.data.name.indexOf(\"http://\");\n if (absUriIdx > -1) {\n // if we have no prefix available ignore\n d.noPrefixName = d.data.name;\n } else if (idx > -1) {\n d.noPrefixName = d.data.name.substring(idx + 1);\n }\n }\n\n if (config.noPrefixes) {\n text.each(trimPrefixes);\n text\n .style(\"font-size\", function(d) {\n return D3.Text.calcFontSize(d.noPrefixName, d.r);\n })\n .text(function(d) {\n return D3.Text.getTextWithElipsisIfNeeded(d.noPrefixName, d.r / 3);\n });\n } else {\n text\n .style(\"font-size\", function(d) {\n return D3.Text.calcFontSize(d.data.name, d.r);\n })\n .text(function(d) {\n return D3.Text.getTextWithElipsisIfNeeded(d.data.name, d.r / 3);\n });\n }\n\n // TODO: make this use the full version (same as zoom)\n text.style(\"display\", function(d) {\n if (d.parent && d.parent.data === focus.data) {\n d.textHidden = this.textContent.indexOf(\"...\") + 3 === this.textContent.length;\n return null;\n } else {\n d.textHidden = true;\n return \"none\";\n }\n });\n\n if (config.doFade && !config.keepPrevState) {\n text.each(function(d) {\n D3.Transition.fadeIn(d3.select(this), 550);\n });\n }\n\n autoZoomToPreviousState = function() {\n function focusOnCurrentClass(focusHistoryId) {\n if (focusHistoryId) {\n circle.each(function(d) {\n if (+focusHistoryId === d.data.id) {\n doFocus(d);\n }\n });\n }\n }\n\n const focusHistoryId = $location.hash();\n\n $window.onpopstate = function(event) {\n if (event.state && !event.state.skipOnPopState) {\n const focusHistoryId = event.state.id;\n focusOnCurrentClass(focusHistoryId);\n }\n };\n\n focusOnCurrentClass(focusHistoryId);\n };\n\n const node = g.selectAll(\"circle, text\");\n\n function zoomTo(v, switchPrefixes) {\n const k = diameter / v[2];\n view = v;\n\n node.attr(\"transform\", function(d) {\n return \"translate(\" + (d.x - v[0]) * k + \",\" + (d.y - v[1]) * k + \")\";\n });\n\n circle.attr(\"r\", function(d) {\n return d.r * k;\n });\n\n function switchPrefixesInPlace(d) {\n // if uris match with the topLevelParentUri of the focused element\n // or your focus is a top level parent hide its label and if it is not\n // a child element show all of its child labels. If it is a child element\n // only show its label.\n if (d.data.fullName === focus.data.topLevelParentUri || focus.data.topLevelParentUri === ROOT_OBJ_NAME) {\n d.textSel.style(\"display\", \"none\");\n if (focus.children && focus.children.length) {\n _.each(focus.children, function(c) {\n c.textSel.style(\"display\", \"inline\");\n });\n } else {\n focus.textSel.style(\"display\", \"inline\");\n }\n\n // in order to show prefixes of siblings check if the focused\n // element has a parent and show all of its children except\n // for the name of the focused element because you need to see\n // its children\n if (focus.parent) {\n _.each(focus.parent.children, function(c) {\n if (c.data.name !== focus.data.name) {\n c.textSel.style(\"display\", \"inline\");\n }\n });\n }\n }\n }\n\n if (switchPrefixes) {\n text.each(switchPrefixesInPlace);\n }\n\n text\n .style(\"font-size\", function(d) {\n if (config.noPrefixes) {\n return D3.Text.calcFontSize(d.noPrefixName, d.r * k);\n }\n return D3.Text.calcFontSize(d.data.name, d.r * k);\n })\n .text(function(d) {\n if (config.noPrefixes) {\n return D3.Text.getTextWithElipsisIfNeeded(d.noPrefixName, d.r * k / 3);\n }\n return D3.Text.getTextWithElipsisIfNeeded(d.data.name, d.r * k / 3);\n });\n }\n\n\n function adjustRadius(r) {\n let newr = r * 2 + margin;\n if (r * 2 / newr < 0.3) {\n // for very small circles we need to adjust\n newr = r * 2 + 2;\n }\n return newr;\n }\n\n zoomTo([focus.x, focus.y, adjustRadius(focus.r)], switchPrefixes);\n\n function textUpdate(d) {\n if (d.isInFocusTransitive || !(d.parent && d.parent.isInFocusTransitive)) {\n // hide labels of classes that are in focus (including children) OR whose parents aren't in focus\n d.textHidden = true;\n this.style.display = \"none\";\n } else {\n // show all other labels\n d.textHidden = this.textContent.indexOf(\"...\") + 3 === this.textContent.length;\n this.style.display = \"\";\n }\n }\n\n function zoom(d, shouldClosePanel) {\n // use empty timeout to force the following code to be executed on the next $digest cycle\n // in order to avoid '$digest in progress' error\n $timeout(function() {\n scope.showExternalElements = (d.data.name === ROOT_OBJ_NAME);\n });\n\n if (focus === d) {\n // Node is already zoomed to\n // Important to return before we modify the history, otherwise we choke the browser\n return;\n }\n\n if (d.data.id) {\n // Set the `skipOnPopState` flag so the popstate handler ignores this history update,\n // preventing a recursive history state change triggered by the zoom operation.\n $window.history.replaceState({id: d.data.id, skipOnPopState: true}, \"classHierarchyPage\" + d.data.id, \"hierarchy#\" + d.data.id);\n }\n\n if (!d.children) {\n // No children - zoom to parent instead\n d = d.parent;\n if (focus === d) {\n // Parent is already zoomed to\n return;\n }\n }\n\n if (shouldClosePanel) {\n closeClassInfoPanel();\n d3.selectAll(\".selected\").classed(\"selected\", false);\n }\n\n if (focus.parent) {\n let p = focus;\n while (p) {\n p.isInFocusTransitive = false;\n p = p.parent;\n }\n }\n\n let p = d;\n while (p) {\n p.isInFocusTransitive = !!p.children;\n p = p.parent;\n }\n\n focus = d;\n\n const isVerySmallCircle = focus.r * 2 / (focus.r * 2 + margin) < 0.3;\n\n if (isVerySmallCircle || scope.currentSliderValue > scope.currentBrowserLimit) {\n // no fancy animation for slower browsers if above the limit or if zooming to a very small circle\n zoomTo([focus.x, focus.y, adjustRadius(focus.r)]);\n\n text.each(function(d) {\n textUpdate.call(this, d);\n });\n } else {\n // the fancy version for faster browsers\n const transition = d3.transition()\n .duration(ZOOM_DURATION)\n .tween(\"zoom\", function(d) {\n const i = d3.interpolateZoom(view, [focus.x, focus.y, adjustRadius(focus.r)]);\n return function(t) {\n zoomTo(i(t));\n };\n });\n\n transition.selectAll(\"text\")\n // Experimental: hide texts to be hidden on \"start\", show texts to be shown on \"end\"\n .each(textUpdate);\n }\n }\n\n rootFocusEvent = scope.$on('rootFocus', function() {\n $window.history.pushState({id: 1}, \"classHierarchyPage1\", \"hierarchy#1\");\n doFocus(rootHierarchy);\n });\n\n classSearchEvent = scope.$on('classSearch', function(selectedClass) {\n doFocus(selectedClass);\n });\n }\n\n function sendSliderData() {\n const currentClassCount = scope.classHierarchyData.classCount;\n let currentSliderValue = LocalStorageAdapter.get(LSKeys.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);\n\n if (!currentSliderValue || currentSliderValue > currentClassCount) {\n currentSliderValue = currentClassCount;\n LocalStorageAdapter.set(LSKeys.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE, currentSliderValue);\n }\n\n $rootScope.$broadcast(\"classCount\", currentClassCount, currentSliderValue);\n }\n\n window.addEventListener('resize', sendSliderData);\n\n window.addEventListener('beforeunload', removeResizeListener);\n\n function removeResizeListener() {\n window.removeEventListener('resize', sendSliderData);\n window.removeEventListener('beforeunload', removeResizeListener);\n }\n\n let prefixesWatch;\n let currentClassCountWatch;\n let searchedClassBroadcast;\n let onEnterClassSearchBroadcast;\n\n scope.$watch('classHierarchyData', function() {\n // when data changes unregister watchers by calling them\n if (prefixesWatch) prefixesWatch();\n if (currentClassCountWatch) currentClassCountWatch();\n if (searchedClassBroadcast) searchedClassBroadcast();\n if (onEnterClassSearchBroadcast) onEnterClassSearchBroadcast();\n\n // get initial state of prefixes (hidden or not) when changing repositories\n // in order to avoid triggering an unwanted prefixes watch\n let initialPrefixesState = getPrefixesState();\n\n if (scope.classHierarchyData.classCount) {\n sendSliderData();\n\n const rootData = structuredClone(scope.classHierarchyData);\n\n const root = d3.hierarchy(rootData);\n\n function sortRoot(root) {\n // add all classes to a flat array, add parent information\n // and sort according to instancesCount DESC, depth ASC\n\n return root.descendants()\n .sort(function(a, b) {\n if (a.data.sortingRank > b.data.sortingRank) {\n return -1;\n } else if (a.data.sortingRank < b.data.sortingRank) {\n return 1;\n } else if (a.data.depth > b.data.depth) {\n return 1;\n } else if (a.data.depth < b.data.depth) {\n return -1;\n } else {\n return 0;\n }\n });\n }\n\n const sortedChildren = sortRoot(root);\n\n // we start with an empty new rootData\n let filteredRootData;\n let noPrefixesGlobal;\n\n\n function restoreDiagramState(currentRootData, switchPrefixes) {\n const prefixesConfig = {\n keepPrevState: true,\n noPrefixes: getPrefixesState(),\n };\n\n // get noPrefixes flag from drawDiagram configuration params\n noPrefixesGlobal = prefixesConfig.noPrefixes;\n\n if (filteredRootData) {\n drawDiagram(filteredRootData, prefixesConfig, focus, true);\n } else {\n drawDiagram(currentRootData, prefixesConfig, focus, true);\n }\n\n $timeout(() => {\n LocalStorageAdapter.set(LSKeys.CLASS_HIERARCHY_SWITCH_PREFIXES, switchPrefixes);\n autoZoomToPreviousState();\n // Need to set this to false to enable the info panel to work when selecting a class.\n // The panel opening will be suppressed only when the prefixes are toggled.\n suppressPanelOpen = false;\n }, 70);\n }\n\n function redrawFilteredDiagram(currentSliderValue, sortedChildrenArray, useSlider) {\n if (!currentSliderValue) {\n return;\n }\n\n LocalStorageAdapter.set(LSKeys.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE, currentSliderValue);\n\n filteredRootData = {\n name: ROOT_OBJ_NAME,\n children: [],\n };\n\n // walk through the given count of (sortedChildrenArray) classes\n // - record the id of each class we've seen\n // - add the rootData level classes to the new rootData\n const addedIds = new Set();\n for (let k = 1; k <= currentSliderValue; k++) {\n addedIds.add(sortedChildrenArray[k].data.id);\n if (sortedChildrenArray[k].parent === sortedChildrenArray[0]) { // i.e. the parent is the \"class hierarchy\"\n filteredRootData.children.push(sortedChildrenArray[k].data);\n }\n }\n\n // walk through all the classes in the new rootData and only keep those that have an \"added id\"\n // we create separate copies of the arrays in order not to contaminate the original data\n // we also copy each class's object ($.extend ...) for the same reason\n function fixChildren(node) {\n if (!node.children) {\n return;\n }\n const newChildren = [];\n for (const child of node.children) {\n if (addedIds.has(child.id)) {\n newChildren.push($.extend({}, child));\n }\n }\n node.children = newChildren;\n for (const child of node.children) {\n fixChildren(child);\n }\n }\n\n fixChildren(filteredRootData);\n\n if (useSlider) {\n // redraw diagram when slider value changes and persist current state\n // in local storage\n noPrefixesGlobal = angular.isUndefined(noPrefixesGlobal) ? getPrefixesState() : noPrefixesGlobal;\n const redrawConfig = {\n noPrefixes: noPrefixesGlobal,\n };\n drawDiagram(filteredRootData, redrawConfig);\n } else {\n // if the user returns to the diagram with back browser button\n // read the saved state (show/hide prefixes, current slider value)\n // from local storage and render the diagram according to the saved metrics\n restoreDiagramState(rootData);\n }\n }\n\n const currentSliderValue = LocalStorageAdapter.get(LSKeys.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);\n if (currentSliderValue) {\n redrawFilteredDiagram(currentSliderValue, sortedChildren);\n } else {\n const basicConfig = {\n doFade: true,\n keepPrevState: true,\n noPrefixes: getPrefixesState(),\n };\n drawDiagram(rootData, basicConfig);\n autoZoomToPreviousState();\n }\n\n prefixesWatch = scope.$watch('hidePrefixes', function(hidePrefixes) {\n if (angular.isUndefined(hidePrefixes) || initialPrefixesState) {\n initialPrefixesState = undefined;\n return;\n }\n // if digest overflows a possible fix might be wrapping this in $timeout\n $timeout(function() {\n suppressPanelOpen = true;\n savePrefixesState(hidePrefixes);\n restoreDiagramState(rootData, true);\n }, 50);\n }, true);\n\n currentClassCountWatch = scope.$watch('currentSliderValue', function(currentSliderValue) {\n redrawFilteredDiagram(currentSliderValue, sortedChildren, true);\n }, true);\n\n // we handle this event for the cases where we already have searched for a given class and\n // hit enter again on the already selected class in order again react and zoom to it again\n // if we are not at the moment\n let currentSearchedClass;\n onEnterClassSearchBroadcast = scope.$on('onEnterKeypressSearchAction', function(event) {\n if (currentSearchedClass) {\n doFocus(currentSearchedClass);\n }\n });\n\n searchedClassBroadcast = scope.$on('searchedClass', function(event, searchedClass) {\n currentSearchedClass = flattenedClassData[searchedClass.name];\n if (currentSearchedClass) {\n doFocus(currentSearchedClass);\n }\n });\n }\n }, true);\n }\n}\n","var CirclePacking = CirclePacking || {};\n\nCirclePacking.SingleChild = function () {\n /*\n Functions that enable single child circles to display properly, see\n http://stackoverflow.com/questions/22307486/d3-js-packed-circle-layout-how-to-adjust-child-radius\n */\n function addPlaceholders(node, first) {\n if (node.children) {\n for (var i = 0; i < node.children.length; i++) {\n var child = node.children[i];\n addPlaceholders(child);\n }\n\n if (node.children.length === 1) {\n var placeholderSize = node.size * 1.2;\n if (first) {\n placeholderSize = node.children[0].size * 0.1;\n }\n node.children.push({\n name: 'placeholder', size: placeholderSize,\n // children: []\n });\n }\n }\n }\n\n function removePlaceholders(nodes) {\n for (var i = nodes.length - 1; i >= 0; i--) {\n var node = nodes[i];\n\n if (node.data.name === 'placeholder') {\n nodes.splice(i, 1);\n } else {\n if (node.children) {\n removePlaceholders(node.children);\n }\n }\n }\n }\n\n function centerNodes(nodes) {\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n\n if (node.children) {\n if (node.children.length === 1) {\n var offset = node.x - node.children[0].x;\n node.children[0].x += offset;\n reposition(node.children[0], offset);\n }\n }\n }\n\n function reposition(node, offset) {\n if (node.children) {\n for (var i = 0; i < node.children.length; i++) {\n node.children[i].x += offset;\n reposition(node.children[i], offset);\n }\n }\n }\n }\n\n function makePositionsRelativeToZero(nodes) {\n //use this to have vis centered at 0,0,0 (easier for positioning)\n var offsetX = nodes[0].x;\n var offsetY = nodes[0].y;\n\n for (var i = 0; i < nodes.length; i++) {\n\n var node = nodes[i];\n\n node.x -= offsetX;\n node.y -= offsetY;\n }\n }\n\n return {\n addPlaceholders: addPlaceholders,\n removePlaceholders: removePlaceholders,\n centerNodes: centerNodes,\n makePositionsRelativeToZero: makePositionsRelativeToZero\n }\n}();\n\nexport default CirclePacking;\n","import 'lib/d3.patch.js'\nimport {selectAll} from 'd3';\n\nconst d3 = {selectAll};\nvar SVG = SVG || {};\n\nSVG.Export = function () {\n function getCSSRules(cssSourceFilePath) {\n const cssRules = $('link[href=\"' + cssSourceFilePath + '\"]')[0].sheet.rules;\n let cssStr = \"\";\n _.each(cssRules, function (value) {\n cssStr += value.cssText;\n });\n return cssStr;\n }\n\n function generateBase64ImageSource(svgSelectorClass) {\n if (!svgSelectorClass) {\n svgSelectorClass = \"svg\";\n }\n // add needed xml namespace\n const exportSvg = d3.selectAll(svgSelectorClass)\n .attr(\"version\", \"1.1\")\n .attr(\"xmlns\", \"http://www.w3.org/2000/svg\")\n .node().parentNode.innerHTML;\n\n // convert selected html to base64\n return \"data:image/svg+xml;charset=utf-8;base64,\" + btoa(unescape(encodeURIComponent(exportSvg)));\n }\n\n return {\n getCSSRules: getCSSRules,\n generateBase64ImageSource: generateBase64ImageSource\n };\n}();\n\nexport default SVG;\n"],"names":["classHierarchyDirective","$rootScope","$location","GraphDataRestService","$window","$timeout","$repositories","toastr","ZOOM_DURATION","ROOT_OBJ_NAME","LocalStorageAdapter","LSKeys","$translate","restrict","template","scope","classHierarchyData","flattenedClassNames","selectedClass","currentSliderValue","showClassInfoPanel","showExternalElements","hidePrefixes","currentBrowserLimit","link","element","attrs","suppressPanelOpen","tip","rootHierarchy","packLayout","d3","size","diameter","color","domain","range","interpolate","svg","insert","attr","on","appendMainGroup","append","id","transform","getPrefixesState","get","CLASS_HIERARCHY_HIDE_PREFIXES","prepareForSVGImageExport","cssRules","SVG","Export","getCSSRules","$","style","imgSrc","generateBase64ImageSource","this","href","download","getActiveRepository","g","hasData","classCount","canUseRepo","isSystemRepository","autoZoomToPreviousState","doFocus","focus","rootFocusEvent","classSearchEvent","service","LicenseContextService","onLicenseChanged","license","valid","loader","hierarchyError","selGraphFromCache","getClassHierarchyData","contextID","uri","success","response","status","warning","instant","error","getError","name","fetchClassHierarchy","flattenedClassData","drawDiagram","root","config","newFocus","switchPrefixes","remove","CirclePacking","SingleChild","addPlaceholders","sum","d","nodes","descendants","view","isInFocusTransitive","removePlaceholders","centerNodes","makePositionsRelativeToZero","d3tip","customPosition","event","top","bottom","innerHeight","clientY","right","innerWidth","clientX","html","data","call","circleGroup","selectAll","enter","doFade","each","D3","Transition","fadeIn","circle","role","children","depth","key","push","classed","noPrefixes","textHidden","show","hide","zoom","getCurrentClassDataAndMarkSelected","obj","selected","closeClassInfoPanel","_","uniqBy","clickCancel","Click","delayDblClick","$on","history","pushState","$broadcast","stopPropagation","lastTimeWheel","preventDefault","now","Date","direction","deltaY","target","__data__","parent","newobj","i","length","sortingRank","replaceState","sendSliderData","text","textSel","idx","indexOf","noPrefixName","substring","Text","calcFontSize","r","getTextWithElipsisIfNeeded","textContent","keepPrevState","focusOnCurrentClass","focusHistoryId","hash","onpopstate","state","skipOnPopState","node","zoomTo","v","k","x","y","fullName","topLevelParentUri","c","adjustRadius","newr","textUpdate","display","shouldClosePanel","p","duration","tween","t","currentClassCount","CLASS_HIERARCHY_CURRENT_SLIDER_VALUE","set","prefixesWatch","currentClassCountWatch","searchedClassBroadcast","onEnterClassSearchBroadcast","window","addEventListener","removeResizeListener","removeEventListener","$watch","initialPrefixesState","rootData","structuredClone","sortedChildren","sort","a","b","filteredRootData","noPrefixesGlobal","restoreDiagramState","currentRootData","prefixesConfig","CLASS_HIERARCHY_SWITCH_PREFIXES","redrawFilteredDiagram","sortedChildrenArray","useSlider","addedIds","Set","add","fixChildren","newChildren","child","has","extend","angular","isUndefined","basicConfig","currentSearchedClass","undefined","savePrefixesState","searchedClass","renderCirclePacking","module","constant","directive","$inject","first","placeholderSize","splice","offset","reposition","offsetX","offsetY","cssSourceFilePath","sheet","rules","cssStr","value","cssText","svgSelectorClass","exportSvg","parentNode","innerHTML","btoa","unescape","encodeURIComponent"],"sourceRoot":""}
1
+ {"version":3,"file":"86099.38ff7f3b1e3b7db27e13.bundle.js","mappings":"kNAoBA,SAASA,EAAwBC,EAAYC,EAAWC,EAAsBC,EAASC,EAAUC,EAAeC,EAAQC,EAAeC,EAAeC,EAAqBC,EAAQC,GAC/K,MAAO,CACHC,SAAU,KACVC,SAAU,8BACVC,MAAO,CACHC,mBAAoB,IACpBC,oBAAqB,IACrBC,cAAe,IACfC,mBAAoB,IACpBC,mBAAoB,IACpBC,qBAAsB,IACtBC,aAAc,IACdC,oBAAqB,KAEzBC,KAGJ,SAAkBT,EAAOU,EAASC,IAIlC,SAA6BX,GAKzB,IAAIY,GAAoB,EAMxB,IAAIC,EACAC,EAEJ,MAAMC,EAAaC,EAAAA,OACdC,KAAK,CAACC,IAAmBA,MAExBC,EAAQH,EAAAA,cACTI,OAAO,CAAC,EAAG,IACXC,MAAM,CAAC,oBAAqB,sBAC5BC,YAAYN,EAAAA,gBAEXO,EAAMP,EAAAA,OAAU,eACjBQ,OAAO,UAAW,MAClBC,KAAK,UAAW,eAChBA,KAAK,sBAAuB,iBAC5BC,GAAG,gBAAiB,MAEzB,SAASC,IACL,OAAOJ,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AAMC,OACpB,GACOF,CACX,EAkBIlN,0BAhBJ,SAAmCqN,GAC1BA,IACDA,EAAmB,OAGvB,MAAMC,EAAYhP,EAAG8F,UAAUiJ,GAC1BtO,KAAK,UAAW,OAChBA,KAAK,QAAS,8BACduJ,OAAOiF,WAAWC,UAGvB,MAAO,2CAA6CC,KAAKC,SAASC,mBAAmBL,IACzF,GAQJ,S","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/graphexplore/directives/rdf-class-hierarchy.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/lib/common/circle-packing.js","webpack://root-config/./packages/legacy-workbench/src/js/lib/common/svg-export.js"],"sourcesContent":["/* eslint-disable no-invalid-this */\nimport d3tip from 'lib/d3-tip/d3-tip-patch';\nimport CirclePacking from 'lib/common/circle-packing';\nimport D3 from 'lib/common/d3-utils';\nimport * as d3 from 'd3';\nimport SVG from 'lib/common/svg-export';\nimport 'angular/utils/local-storage-adapter';\nimport {service, LicenseContextService} from '@ontotext/workbench-api';\n\nangular\n .module('graphdb.framework.graphexplore.directives.class', [\n 'graphdb.framework.graphexplore.controllers.class',\n 'graphdb.framework.utils.localstorageadapter',\n ])\n .constant(\"ZOOM_DURATION\", 500)\n .constant(\"ROOT_OBJ_NAME\", \"RDF Class Hierarchy\")\n .directive('rdfClassHierarchy', classHierarchyDirective);\n\nclassHierarchyDirective.$inject = ['$rootScope', '$location', 'GraphDataRestService', '$window', '$timeout', '$repositories', 'toastr', 'ZOOM_DURATION', 'ROOT_OBJ_NAME', 'LocalStorageAdapter', 'LSKeys', '$translate'];\n\nfunction classHierarchyDirective($rootScope, $location, GraphDataRestService, $window, $timeout, $repositories, toastr, ZOOM_DURATION, ROOT_OBJ_NAME, LocalStorageAdapter, LSKeys, $translate) {\n return {\n restrict: 'AE',\n template: '<div id=\"classChart\"></div>',\n scope: {\n classHierarchyData: '=',\n flattenedClassNames: '=',\n selectedClass: '=',\n currentSliderValue: '=',\n showClassInfoPanel: '=',\n showExternalElements: '=',\n hidePrefixes: '=',\n currentBrowserLimit: '=',\n },\n link: linkFunc,\n };\n\n function linkFunc(scope, element, attrs) {\n renderCirclePacking(scope, element);\n }\n\n function renderCirclePacking(scope, element) {\n /**\n * A boolean flag that determines whether the opening of the side info panel\n * should be suppressed when focusing on the chart while a class is selected.\n */\n let suppressPanelOpen = false;\n\n const width = 800;\n const height = 800;\n const diameter = height;\n const margin = 20;\n let tip;\n let rootHierarchy;\n\n const packLayout = d3.pack()\n .size([diameter - margin, diameter - margin]);\n\n const color = d3.scaleLinear()\n .domain([0, 4])\n .range([\"hsl(19, 70%, 90%)\", \"hsl(19, 70%, 50%)\"])\n .interpolate(d3.interpolateHcl);\n\n const svg = d3.select(\"#classChart\")\n .insert(\"svg:svg\", \"h2\")\n .attr(\"viewBox\", \"0 0 \" + width + \" \" + height)\n .attr(\"preserveAspectRatio\", \"xMidYMid meet\")\n .on(\"dblclick.zoom\", null);\n\n function appendMainGroup() {\n return svg.append(\"svg:g\")\n .attrs({\n id: \"main-group\",\n transform: \"translate(\" + width / 2 + \",\" + height / 2 + \")\",\n });\n }\n\n function savePrefixesState(hidePrefixes) {\n if (!angular.isUndefined(hidePrefixes)) {\n LocalStorageAdapter.set(LSKeys.CLASS_HIERARCHY_HIDE_PREFIXES, hidePrefixes);\n }\n }\n\n function getPrefixesState() {\n return LocalStorageAdapter.get(LSKeys.CLASS_HIERARCHY_HIDE_PREFIXES) === \"true\";\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 const cssRules = SVG.Export.getCSSRules(\"css/rdf-class-hierarchy-labels.css?v=4.0.0-TR25\");\n // inline css rules in a defs tag\n d3.selectAll(\"#main-group\")\n .append(\"defs\");\n $(\"defs\").append('<style type=\"text/css\"><![CDATA[' + cssRules + ']]></style>');\n\n // switch opacity to visible\n d3.selectAll(\"g\")\n .style(\"opacity\", 1);\n\n // convert selected html to base64\n const imgSrc = SVG.Export.generateBase64ImageSource(\"#classChart 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: \"class-hierarchy-\" + $repositories.getActiveRepository() + \".svg\",\n });\n }\n\n scope.hidePrefixes = getPrefixesState();\n\n let g = appendMainGroup();\n\n function fetchClassHierarchy() {\n $rootScope.loader = true;\n $rootScope.hierarchyError = false;\n const selGraphFromCache = LocalStorageAdapter.get(`classHierarchy-selectedGraph-${$repositories.getActiveRepository()}`);\n GraphDataRestService.getClassHierarchyData(selGraphFromCache !== null ? selGraphFromCache.contextID.uri : \"\")\n .success(function(response, status) {\n $rootScope.loader = false;\n if (status === 207) {\n toastr.warning(\n $translate.instant('graphexplore.update.diagram'),\n $translate.instant('graphexplore.repository.data.changed'),\n );\n }\n scope.classHierarchyData = response;\n d3.select(\"#download-svg\").on(\"mouseover\", prepareForSVGImageExport);\n })\n .error(function(response) {\n $rootScope.loader = false;\n $rootScope.hierarchyError = getError(response);\n toastr.error(\n $translate.instant('graphexplore.error.request.failed', {\n name: ROOT_OBJ_NAME,\n error: getError(response),\n }),\n );\n });\n }\n\n const hasData = !!scope.classHierarchyData?.classCount;\n const canUseRepo = $repositories.getActiveRepository() && !$repositories.isSystemRepository();\n\n service(LicenseContextService).onLicenseChanged((license) => {\n if (license?.valid && !hasData && canUseRepo) {\n fetchClassHierarchy();\n }\n });\n\n let autoZoomToPreviousState;\n let doFocus;\n\n let focus;\n let rootFocusEvent;\n let classSearchEvent;\n const flattenedClassData = {};\n\n function drawDiagram(root, config, newFocus, switchPrefixes) {\n if (rootFocusEvent) rootFocusEvent();\n if (classSearchEvent) classSearchEvent();\n // remove old group tag containing the diagram\n d3.selectAll(\"#main-group\").remove();\n\n // append new empty group tag in order to rerender new diagram\n g = appendMainGroup();\n\n // fix for single child classes\n CirclePacking.SingleChild.addPlaceholders(root, true);\n\n rootHierarchy = d3.hierarchy(root);\n rootHierarchy.sum(function(d) {\n return d.size;\n });\n focus = newFocus ? newFocus : rootHierarchy;\n\n packLayout(rootHierarchy);\n\n const nodes = rootHierarchy.descendants();\n let view;\n\n focus.isInFocusTransitive = true;\n\n // fixes for single child classes\n CirclePacking.SingleChild.removePlaceholders(nodes);\n CirclePacking.SingleChild.centerNodes(nodes);\n CirclePacking.SingleChild.makePositionsRelativeToZero(nodes);\n\n if (!tip) {\n tip = d3tip()\n .attr('class', 'd3-tip')\n .customPosition(function(d, event) {\n return {\n top: 'inherit',\n bottom: ($window.innerHeight - event.clientY) + 'px',\n right: ($window.innerWidth - event.clientX) + 'px',\n };\n })\n .html(function(d) {\n return d.data.name;\n });\n svg.call(tip);\n }\n\n const circleGroup = g.selectAll(\"circle\")\n .data(nodes)\n .enter().append(\"g\");\n\n if (config.doFade) {\n circleGroup.each(function(d) {\n D3.Transition.fadeIn(d3.select(this), 550);\n });\n }\n\n let flattenedClassNames = [];\n\n const circle = circleGroup\n .append(\"circle\")\n .attr(\"class\", function(d) {\n return d.data.role;\n })\n .attr(\"data-test\", function(d) {\n return \"class-\" + d.data.name;\n })\n .attr(\"guide-selector\", function(d) {\n return \"class-\" + d.data.name;\n })\n .style(\"fill\", function(d) {\n //return colors[d.depth % 6];\n return d.children ? color(d.depth) : \"#E0D0D0\";\n })\n .each(function(d) {\n d.circle = d3.select(this);\n if (d.data.name !== ROOT_OBJ_NAME) {\n const key = d.data.name;\n flattenedClassNames.push({name: key});\n flattenedClassData[[key]] = d;\n\n d.circle.classed(\"rdf-class\", true);\n d.circle.on('mouseover', function(event) {\n if (config.noPrefixes) {\n tip.show(d, event);\n } else if (!d.textHidden) {\n tip.hide(d);\n } else {\n tip.show(d, event);\n }\n });\n d.circle.on('mouseout', tip.hide);\n }\n })\n // custom event used when user is following a guide\n .on(\"gdb-focus\", (event, d) => doFocus(d))\n .on(\"gdb-zoom\", (event, d) => zoom(d));\n\n\n if (flattenedClassNames) {\n flattenedClassNames = _.uniqBy(flattenedClassNames, 'name');\n scope.flattenedClassNames = flattenedClassNames;\n }\n\n let selectedClass;\n\n function getCurrentClassDataAndMarkSelected(obj) {\n d3.selectAll(\".selected\").classed(\"selected\", obj.selected = false);\n obj.circle.classed(\"selected\", obj.selected = true);\n selectedClass = obj;\n }\n\n function showClassInfoPanel() {\n scope.selectedClass = selectedClass;\n scope.showClassInfoPanel = true;\n }\n\n function closeClassInfoPanel() {\n scope.showClassInfoPanel = false;\n }\n\n function goToDomainRangeGraphView() {\n $rootScope.$broadcast('goToDomainRangeGraphView', selectedClass, focus);\n }\n\n const clickCancel = D3.Click.delayDblClick();\n d3.selectAll(\".parent, .topLevelParent, .child, .root\")\n .call(clickCancel);\n\n doFocus = function(obj) {\n zoom(obj);\n\n if (obj.data.name === ROOT_OBJ_NAME) {\n closeClassInfoPanel();\n d3.selectAll(\".selected\").classed(\"selected\", false);\n } else {\n getCurrentClassDataAndMarkSelected(obj);\n if (!suppressPanelOpen) {\n showClassInfoPanel();\n }\n\n // FIXME: is it ok to bind this event handler every time and not just once?\n scope.$on('sidePanelClosed', function(event) {\n d3.selectAll(\".selected\").classed(\"selected\", obj.selected = false);\n });\n }\n\n\n //do not stop event propagation here\n };\n\n clickCancel.on(\"click\", function(event, obj) {\n // add clicked class to browser history\n if (obj.data.id) {\n $window.history.pushState({id: obj.data.id}, \"classHierarchyPage\" + obj.data.id, \"hierarchy#\" + obj.data.id);\n }\n\n //hide current d3-tip tooltip\n tip.hide();\n\n doFocus(obj);\n });\n\n clickCancel.on(\"dblclick\", function(event, obj) {\n if (obj === root) {\n return;\n }\n // hide current d3-tip tooltip in order not to appear in the next view\n tip.hide();\n getCurrentClassDataAndMarkSelected(obj);\n goToDomainRangeGraphView();\n\n event.stopPropagation();\n });\n\n let lastTimeWheel = 0;\n svg.on('wheel', function(event) {\n // hide current d3-tip tooltip\n tip.hide();\n\n event.preventDefault();\n event.stopPropagation();\n\n // at least 100ms must have passed since last time we updated\n const now = Date.now();\n if (now - lastTimeWheel > 100) {\n lastTimeWheel = now;\n } else {\n return;\n }\n\n let direction = '';\n if (event.deltaY <= -1) {\n direction = 'in';\n } else if (event.deltaY >= 1) {\n direction = 'out';\n }\n\n let obj = event.target.__data__;\n\n if (!obj) {\n // scroll outside the big circle\n obj = focus;\n }\n\n if (direction === 'in') {\n // determine object to zoom to\n\n if (obj !== focus) {\n // consider the object on which the scroll event occurred\n // and find the furthest parent that has no focused children\n while (obj.parent && !obj.parent.isInFocusTransitive) {\n obj = obj.parent;\n }\n if (obj.depth < focus.depth) {\n // however if that parent is of lower depth than the focus we ignore it\n obj = focus;\n }\n }\n\n if (obj === focus && obj.children) {\n // if object is in focus and it has children we zoom to its biggest child\n // TODO: sort children on backend\n let newobj = obj.children[0];\n for (let i = 1; i < obj.children.length; i++) {\n if (obj.children[i].sortingRank > newobj.sortingRank) {\n newobj = obj.children[i];\n }\n }\n if (newobj.children) {\n // Use the child only if it has children\n obj = newobj;\n }\n } else if (!obj.children) {\n // If node has no children use its parent instead\n obj = obj.parent;\n }\n\n zoom(obj, true);\n } else if (direction === 'out') {\n // zooming out simply goes one parent up\n obj = focus.parent;\n if (obj) {\n zoom(obj, true);\n }\n }\n\n if (focus.data.name === ROOT_OBJ_NAME) {\n $window.history.replaceState({id: 1}, \"classHierarchyPage1\", \"hierarchy#1\");\n }\n\n // redraw slider on zoom out\n sendSliderData();\n });\n\n const text = g.selectAll(\"text\")\n .data(nodes)\n .enter().append(\"text\")\n .attr(\"class\", function(d) {\n return d.children && d.children.length ? \"label\" : \"label child-label\";\n })\n .each(function(d) {\n d.textSel = d3.select(this);\n });\n\n function trimPrefixes(d) {\n const idx = d.data.name.indexOf(\":\");\n const absUriIdx = d.data.name.indexOf(\"http://\");\n if (absUriIdx > -1) {\n // if we have no prefix available ignore\n d.noPrefixName = d.data.name;\n } else if (idx > -1) {\n d.noPrefixName = d.data.name.substring(idx + 1);\n }\n }\n\n if (config.noPrefixes) {\n text.each(trimPrefixes);\n text\n .style(\"font-size\", function(d) {\n return D3.Text.calcFontSize(d.noPrefixName, d.r);\n })\n .text(function(d) {\n return D3.Text.getTextWithElipsisIfNeeded(d.noPrefixName, d.r / 3);\n });\n } else {\n text\n .style(\"font-size\", function(d) {\n return D3.Text.calcFontSize(d.data.name, d.r);\n })\n .text(function(d) {\n return D3.Text.getTextWithElipsisIfNeeded(d.data.name, d.r / 3);\n });\n }\n\n // TODO: make this use the full version (same as zoom)\n text.style(\"display\", function(d) {\n if (d.parent && d.parent.data === focus.data) {\n d.textHidden = this.textContent.indexOf(\"...\") + 3 === this.textContent.length;\n return null;\n } else {\n d.textHidden = true;\n return \"none\";\n }\n });\n\n if (config.doFade && !config.keepPrevState) {\n text.each(function(d) {\n D3.Transition.fadeIn(d3.select(this), 550);\n });\n }\n\n autoZoomToPreviousState = function() {\n function focusOnCurrentClass(focusHistoryId) {\n if (focusHistoryId) {\n circle.each(function(d) {\n if (+focusHistoryId === d.data.id) {\n doFocus(d);\n }\n });\n }\n }\n\n const focusHistoryId = $location.hash();\n\n $window.onpopstate = function(event) {\n if (event.state && !event.state.skipOnPopState) {\n const focusHistoryId = event.state.id;\n focusOnCurrentClass(focusHistoryId);\n }\n };\n\n focusOnCurrentClass(focusHistoryId);\n };\n\n const node = g.selectAll(\"circle, text\");\n\n function zoomTo(v, switchPrefixes) {\n const k = diameter / v[2];\n view = v;\n\n node.attr(\"transform\", function(d) {\n return \"translate(\" + (d.x - v[0]) * k + \",\" + (d.y - v[1]) * k + \")\";\n });\n\n circle.attr(\"r\", function(d) {\n return d.r * k;\n });\n\n function switchPrefixesInPlace(d) {\n // if uris match with the topLevelParentUri of the focused element\n // or your focus is a top level parent hide its label and if it is not\n // a child element show all of its child labels. If it is a child element\n // only show its label.\n if (d.data.fullName === focus.data.topLevelParentUri || focus.data.topLevelParentUri === ROOT_OBJ_NAME) {\n d.textSel.style(\"display\", \"none\");\n if (focus.children && focus.children.length) {\n _.each(focus.children, function(c) {\n c.textSel.style(\"display\", \"inline\");\n });\n } else {\n focus.textSel.style(\"display\", \"inline\");\n }\n\n // in order to show prefixes of siblings check if the focused\n // element has a parent and show all of its children except\n // for the name of the focused element because you need to see\n // its children\n if (focus.parent) {\n _.each(focus.parent.children, function(c) {\n if (c.data.name !== focus.data.name) {\n c.textSel.style(\"display\", \"inline\");\n }\n });\n }\n }\n }\n\n if (switchPrefixes) {\n text.each(switchPrefixesInPlace);\n }\n\n text\n .style(\"font-size\", function(d) {\n if (config.noPrefixes) {\n return D3.Text.calcFontSize(d.noPrefixName, d.r * k);\n }\n return D3.Text.calcFontSize(d.data.name, d.r * k);\n })\n .text(function(d) {\n if (config.noPrefixes) {\n return D3.Text.getTextWithElipsisIfNeeded(d.noPrefixName, d.r * k / 3);\n }\n return D3.Text.getTextWithElipsisIfNeeded(d.data.name, d.r * k / 3);\n });\n }\n\n\n function adjustRadius(r) {\n let newr = r * 2 + margin;\n if (r * 2 / newr < 0.3) {\n // for very small circles we need to adjust\n newr = r * 2 + 2;\n }\n return newr;\n }\n\n zoomTo([focus.x, focus.y, adjustRadius(focus.r)], switchPrefixes);\n\n function textUpdate(d) {\n if (d.isInFocusTransitive || !(d.parent && d.parent.isInFocusTransitive)) {\n // hide labels of classes that are in focus (including children) OR whose parents aren't in focus\n d.textHidden = true;\n this.style.display = \"none\";\n } else {\n // show all other labels\n d.textHidden = this.textContent.indexOf(\"...\") + 3 === this.textContent.length;\n this.style.display = \"\";\n }\n }\n\n function zoom(d, shouldClosePanel) {\n // use empty timeout to force the following code to be executed on the next $digest cycle\n // in order to avoid '$digest in progress' error\n $timeout(function() {\n scope.showExternalElements = (d.data.name === ROOT_OBJ_NAME);\n });\n\n if (focus === d) {\n // Node is already zoomed to\n // Important to return before we modify the history, otherwise we choke the browser\n return;\n }\n\n if (d.data.id) {\n // Set the `skipOnPopState` flag so the popstate handler ignores this history update,\n // preventing a recursive history state change triggered by the zoom operation.\n $window.history.replaceState({id: d.data.id, skipOnPopState: true}, \"classHierarchyPage\" + d.data.id, \"hierarchy#\" + d.data.id);\n }\n\n if (!d.children) {\n // No children - zoom to parent instead\n d = d.parent;\n if (focus === d) {\n // Parent is already zoomed to\n return;\n }\n }\n\n if (shouldClosePanel) {\n closeClassInfoPanel();\n d3.selectAll(\".selected\").classed(\"selected\", false);\n }\n\n if (focus.parent) {\n let p = focus;\n while (p) {\n p.isInFocusTransitive = false;\n p = p.parent;\n }\n }\n\n let p = d;\n while (p) {\n p.isInFocusTransitive = !!p.children;\n p = p.parent;\n }\n\n focus = d;\n\n const isVerySmallCircle = focus.r * 2 / (focus.r * 2 + margin) < 0.3;\n\n if (isVerySmallCircle || scope.currentSliderValue > scope.currentBrowserLimit) {\n // no fancy animation for slower browsers if above the limit or if zooming to a very small circle\n zoomTo([focus.x, focus.y, adjustRadius(focus.r)]);\n\n text.each(function(d) {\n textUpdate.call(this, d);\n });\n } else {\n // the fancy version for faster browsers\n const transition = d3.transition()\n .duration(ZOOM_DURATION)\n .tween(\"zoom\", function(d) {\n const i = d3.interpolateZoom(view, [focus.x, focus.y, adjustRadius(focus.r)]);\n return function(t) {\n zoomTo(i(t));\n };\n });\n\n transition.selectAll(\"text\")\n // Experimental: hide texts to be hidden on \"start\", show texts to be shown on \"end\"\n .each(textUpdate);\n }\n }\n\n rootFocusEvent = scope.$on('rootFocus', function() {\n $window.history.pushState({id: 1}, \"classHierarchyPage1\", \"hierarchy#1\");\n doFocus(rootHierarchy);\n });\n\n classSearchEvent = scope.$on('classSearch', function(selectedClass) {\n doFocus(selectedClass);\n });\n }\n\n function sendSliderData() {\n const currentClassCount = scope.classHierarchyData.classCount;\n let currentSliderValue = LocalStorageAdapter.get(LSKeys.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);\n\n if (!currentSliderValue || currentSliderValue > currentClassCount) {\n currentSliderValue = currentClassCount;\n LocalStorageAdapter.set(LSKeys.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE, currentSliderValue);\n }\n\n $rootScope.$broadcast(\"classCount\", currentClassCount, currentSliderValue);\n }\n\n window.addEventListener('resize', sendSliderData);\n\n window.addEventListener('beforeunload', removeResizeListener);\n\n function removeResizeListener() {\n window.removeEventListener('resize', sendSliderData);\n window.removeEventListener('beforeunload', removeResizeListener);\n }\n\n let prefixesWatch;\n let currentClassCountWatch;\n let searchedClassBroadcast;\n let onEnterClassSearchBroadcast;\n\n scope.$watch('classHierarchyData', function() {\n // when data changes unregister watchers by calling them\n if (prefixesWatch) prefixesWatch();\n if (currentClassCountWatch) currentClassCountWatch();\n if (searchedClassBroadcast) searchedClassBroadcast();\n if (onEnterClassSearchBroadcast) onEnterClassSearchBroadcast();\n\n // get initial state of prefixes (hidden or not) when changing repositories\n // in order to avoid triggering an unwanted prefixes watch\n let initialPrefixesState = getPrefixesState();\n\n if (scope.classHierarchyData.classCount) {\n sendSliderData();\n\n const rootData = structuredClone(scope.classHierarchyData);\n\n const root = d3.hierarchy(rootData);\n\n function sortRoot(root) {\n // add all classes to a flat array, add parent information\n // and sort according to instancesCount DESC, depth ASC\n\n return root.descendants()\n .sort(function(a, b) {\n if (a.data.sortingRank > b.data.sortingRank) {\n return -1;\n } else if (a.data.sortingRank < b.data.sortingRank) {\n return 1;\n } else if (a.data.depth > b.data.depth) {\n return 1;\n } else if (a.data.depth < b.data.depth) {\n return -1;\n } else {\n return 0;\n }\n });\n }\n\n const sortedChildren = sortRoot(root);\n\n // we start with an empty new rootData\n let filteredRootData;\n let noPrefixesGlobal;\n\n\n function restoreDiagramState(currentRootData, switchPrefixes) {\n const prefixesConfig = {\n keepPrevState: true,\n noPrefixes: getPrefixesState(),\n };\n\n // get noPrefixes flag from drawDiagram configuration params\n noPrefixesGlobal = prefixesConfig.noPrefixes;\n\n if (filteredRootData) {\n drawDiagram(filteredRootData, prefixesConfig, focus, true);\n } else {\n drawDiagram(currentRootData, prefixesConfig, focus, true);\n }\n\n $timeout(() => {\n LocalStorageAdapter.set(LSKeys.CLASS_HIERARCHY_SWITCH_PREFIXES, switchPrefixes);\n autoZoomToPreviousState();\n // Need to set this to false to enable the info panel to work when selecting a class.\n // The panel opening will be suppressed only when the prefixes are toggled.\n suppressPanelOpen = false;\n }, 70);\n }\n\n function redrawFilteredDiagram(currentSliderValue, sortedChildrenArray, useSlider) {\n if (!currentSliderValue) {\n return;\n }\n\n LocalStorageAdapter.set(LSKeys.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE, currentSliderValue);\n\n filteredRootData = {\n name: ROOT_OBJ_NAME,\n children: [],\n };\n\n // walk through the given count of (sortedChildrenArray) classes\n // - record the id of each class we've seen\n // - add the rootData level classes to the new rootData\n const addedIds = new Set();\n for (let k = 1; k <= currentSliderValue; k++) {\n addedIds.add(sortedChildrenArray[k].data.id);\n if (sortedChildrenArray[k].parent === sortedChildrenArray[0]) { // i.e. the parent is the \"class hierarchy\"\n filteredRootData.children.push(sortedChildrenArray[k].data);\n }\n }\n\n // walk through all the classes in the new rootData and only keep those that have an \"added id\"\n // we create separate copies of the arrays in order not to contaminate the original data\n // we also copy each class's object ($.extend ...) for the same reason\n function fixChildren(node) {\n if (!node.children) {\n return;\n }\n const newChildren = [];\n for (const child of node.children) {\n if (addedIds.has(child.id)) {\n newChildren.push($.extend({}, child));\n }\n }\n node.children = newChildren;\n for (const child of node.children) {\n fixChildren(child);\n }\n }\n\n fixChildren(filteredRootData);\n\n if (useSlider) {\n // redraw diagram when slider value changes and persist current state\n // in local storage\n noPrefixesGlobal = angular.isUndefined(noPrefixesGlobal) ? getPrefixesState() : noPrefixesGlobal;\n const redrawConfig = {\n noPrefixes: noPrefixesGlobal,\n };\n drawDiagram(filteredRootData, redrawConfig);\n } else {\n // if the user returns to the diagram with back browser button\n // read the saved state (show/hide prefixes, current slider value)\n // from local storage and render the diagram according to the saved metrics\n restoreDiagramState(rootData);\n }\n }\n\n const currentSliderValue = LocalStorageAdapter.get(LSKeys.CLASS_HIERARCHY_CURRENT_SLIDER_VALUE);\n if (currentSliderValue) {\n redrawFilteredDiagram(currentSliderValue, sortedChildren);\n } else {\n const basicConfig = {\n doFade: true,\n keepPrevState: true,\n noPrefixes: getPrefixesState(),\n };\n drawDiagram(rootData, basicConfig);\n autoZoomToPreviousState();\n }\n\n prefixesWatch = scope.$watch('hidePrefixes', function(hidePrefixes) {\n if (angular.isUndefined(hidePrefixes) || initialPrefixesState) {\n initialPrefixesState = undefined;\n return;\n }\n // if digest overflows a possible fix might be wrapping this in $timeout\n $timeout(function() {\n suppressPanelOpen = true;\n savePrefixesState(hidePrefixes);\n restoreDiagramState(rootData, true);\n }, 50);\n }, true);\n\n currentClassCountWatch = scope.$watch('currentSliderValue', function(currentSliderValue) {\n redrawFilteredDiagram(currentSliderValue, sortedChildren, true);\n }, true);\n\n // we handle this event for the cases where we already have searched for a given class and\n // hit enter again on the already selected class in order again react and zoom to it again\n // if we are not at the moment\n let currentSearchedClass;\n onEnterClassSearchBroadcast = scope.$on('onEnterKeypressSearchAction', function(event) {\n if (currentSearchedClass) {\n doFocus(currentSearchedClass);\n }\n });\n\n searchedClassBroadcast = scope.$on('searchedClass', function(event, searchedClass) {\n currentSearchedClass = flattenedClassData[searchedClass.name];\n if (currentSearchedClass) {\n doFocus(currentSearchedClass);\n }\n });\n }\n }, true);\n }\n}\n","var CirclePacking = CirclePacking || {};\n\nCirclePacking.SingleChild = function () {\n /*\n Functions that enable single child circles to display properly, see\n http://stackoverflow.com/questions/22307486/d3-js-packed-circle-layout-how-to-adjust-child-radius\n */\n function addPlaceholders(node, first) {\n if (node.children) {\n for (var i = 0; i < node.children.length; i++) {\n var child = node.children[i];\n addPlaceholders(child);\n }\n\n if (node.children.length === 1) {\n var placeholderSize = node.size * 1.2;\n if (first) {\n placeholderSize = node.children[0].size * 0.1;\n }\n node.children.push({\n name: 'placeholder', size: placeholderSize,\n // children: []\n });\n }\n }\n }\n\n function removePlaceholders(nodes) {\n for (var i = nodes.length - 1; i >= 0; i--) {\n var node = nodes[i];\n\n if (node.data.name === 'placeholder') {\n nodes.splice(i, 1);\n } else {\n if (node.children) {\n removePlaceholders(node.children);\n }\n }\n }\n }\n\n function centerNodes(nodes) {\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n\n if (node.children) {\n if (node.children.length === 1) {\n var offset = node.x - node.children[0].x;\n node.children[0].x += offset;\n reposition(node.children[0], offset);\n }\n }\n }\n\n function reposition(node, offset) {\n if (node.children) {\n for (var i = 0; i < node.children.length; i++) {\n node.children[i].x += offset;\n reposition(node.children[i], offset);\n }\n }\n }\n }\n\n function makePositionsRelativeToZero(nodes) {\n //use this to have vis centered at 0,0,0 (easier for positioning)\n var offsetX = nodes[0].x;\n var offsetY = nodes[0].y;\n\n for (var i = 0; i < nodes.length; i++) {\n\n var node = nodes[i];\n\n node.x -= offsetX;\n node.y -= offsetY;\n }\n }\n\n return {\n addPlaceholders: addPlaceholders,\n removePlaceholders: removePlaceholders,\n centerNodes: centerNodes,\n makePositionsRelativeToZero: makePositionsRelativeToZero\n }\n}();\n\nexport default CirclePacking;\n","import 'lib/d3.patch.js'\nimport {selectAll} from 'd3';\n\nconst d3 = {selectAll};\nvar SVG = SVG || {};\n\nSVG.Export = function () {\n function getCSSRules(cssSourceFilePath) {\n const cssRules = $('link[href=\"' + cssSourceFilePath + '\"]')[0].sheet.rules;\n let cssStr = \"\";\n _.each(cssRules, function (value) {\n cssStr += value.cssText;\n });\n return cssStr;\n }\n\n function generateBase64ImageSource(svgSelectorClass) {\n if (!svgSelectorClass) {\n svgSelectorClass = \"svg\";\n }\n // add needed xml namespace\n const exportSvg = d3.selectAll(svgSelectorClass)\n .attr(\"version\", \"1.1\")\n .attr(\"xmlns\", \"http://www.w3.org/2000/svg\")\n .node().parentNode.innerHTML;\n\n // convert selected html to base64\n return \"data:image/svg+xml;charset=utf-8;base64,\" + btoa(unescape(encodeURIComponent(exportSvg)));\n }\n\n return {\n getCSSRules: getCSSRules,\n generateBase64ImageSource: generateBase64ImageSource\n };\n}();\n\nexport default SVG;\n"],"names":["classHierarchyDirective","$rootScope","$location","GraphDataRestService","$window","$timeout","$repositories","toastr","ZOOM_DURATION","ROOT_OBJ_NAME","LocalStorageAdapter","LSKeys","$translate","restrict","template","scope","classHierarchyData","flattenedClassNames","selectedClass","currentSliderValue","showClassInfoPanel","showExternalElements","hidePrefixes","currentBrowserLimit","link","element","attrs","suppressPanelOpen","tip","rootHierarchy","packLayout","d3","size","diameter","color","domain","range","interpolate","svg","insert","attr","on","appendMainGroup","append","id","transform","getPrefixesState","get","CLASS_HIERARCHY_HIDE_PREFIXES","prepareForSVGImageExport","cssRules","SVG","Export","getCSSRules","$","style","imgSrc","generateBase64ImageSource","this","href","download","getActiveRepository","g","hasData","classCount","canUseRepo","isSystemRepository","autoZoomToPreviousState","doFocus","focus","rootFocusEvent","classSearchEvent","service","LicenseContextService","onLicenseChanged","license","valid","loader","hierarchyError","selGraphFromCache","getClassHierarchyData","contextID","uri","success","response","status","warning","instant","error","getError","name","fetchClassHierarchy","flattenedClassData","drawDiagram","root","config","newFocus","switchPrefixes","remove","CirclePacking","SingleChild","addPlaceholders","sum","d","nodes","descendants","view","isInFocusTransitive","removePlaceholders","centerNodes","makePositionsRelativeToZero","d3tip","customPosition","event","top","bottom","innerHeight","clientY","right","innerWidth","clientX","html","data","call","circleGroup","selectAll","enter","doFade","each","D3","Transition","fadeIn","circle","role","children","depth","key","push","classed","noPrefixes","textHidden","show","hide","zoom","getCurrentClassDataAndMarkSelected","obj","selected","closeClassInfoPanel","_","uniqBy","clickCancel","Click","delayDblClick","$on","history","pushState","$broadcast","stopPropagation","lastTimeWheel","preventDefault","now","Date","direction","deltaY","target","__data__","parent","newobj","i","length","sortingRank","replaceState","sendSliderData","text","textSel","idx","indexOf","noPrefixName","substring","Text","calcFontSize","r","getTextWithElipsisIfNeeded","textContent","keepPrevState","focusOnCurrentClass","focusHistoryId","hash","onpopstate","state","skipOnPopState","node","zoomTo","v","k","x","y","fullName","topLevelParentUri","c","adjustRadius","newr","textUpdate","display","shouldClosePanel","p","duration","tween","t","currentClassCount","CLASS_HIERARCHY_CURRENT_SLIDER_VALUE","set","prefixesWatch","currentClassCountWatch","searchedClassBroadcast","onEnterClassSearchBroadcast","window","addEventListener","removeResizeListener","removeEventListener","$watch","initialPrefixesState","rootData","structuredClone","sortedChildren","sort","a","b","filteredRootData","noPrefixesGlobal","restoreDiagramState","currentRootData","prefixesConfig","CLASS_HIERARCHY_SWITCH_PREFIXES","redrawFilteredDiagram","sortedChildrenArray","useSlider","addedIds","Set","add","fixChildren","newChildren","child","has","extend","angular","isUndefined","basicConfig","currentSearchedClass","undefined","savePrefixesState","searchedClass","renderCirclePacking","module","constant","directive","$inject","first","placeholderSize","splice","offset","reposition","offsetX","offsetY","cssSourceFilePath","sheet","rules","cssStr","value","cssText","svgSelectorClass","exportSvg","parentNode","innerHTML","btoa","unescape","encodeURIComponent"],"sourceRoot":""}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "defaultLanguage": "en",
3
- "languageBundleVersion": "4.0.0-TR24",
3
+ "languageBundleVersion": "4.0.0-TR25",
4
4
  "availableLanguages": [
5
5
  {
6
6
  "key": "en",
@@ -1478,6 +1478,7 @@
1478
1478
  "operations.label": "operations",
1479
1479
  "query.abort.request": "Query was requested to abort and will be terminated on the first I/O operation",
1480
1480
  "update.requested": "Update was requested to abort and will be terminated if possible",
1481
+ "update.cluster_replicating": "Update cannot be aborted while being replicated to the cluster",
1481
1482
  "click.to.abort.query": "Click to abort query",
1482
1483
  "click.to.abort.update": "Click to abort update",
1483
1484
  "stop.was.requested": "Stop has been requested",
@@ -2571,10 +2572,10 @@
2571
2572
  "repoTooltips.queryLimitResults": "Sets the maximum number of results returned from a query after which the evaluation of a query will be terminated; values less than or equal to zero mean no limit.",
2572
2573
  "repoTooltips.nonInterpretablePredicates": "Semicolon-delimited list of predicates (full URIs) that GraphDB will not try to process with the registered GraphDB plugins.",
2573
2574
  "repoTooltips.enableFtsIndex": "Enable full-text search (FTS) index.",
2574
- "repoTooltips.ftsIndexes": "Comma delimited list of languages that should have specific index with appropriate analyzer for full-text search. Possible values are: default, iri, ar, bg, bn, br, ca, ja, ko, zh, ku, cz, da, de, el, en, es, et, eu, fa, fi, fr, ga, gl, hi, hu, hy, id, it, lt, lv, ne, nl, no, pt, ro, ru, sr, sv, ta, te, th, tr",
2575
+ "repoTooltips.ftsIndexes": "Comma delimited list of languages that should have specific index with appropriate analyzer for full-text search. Possible values are: default, iri, ar, be, bg, bn, br, ca, ckb, cs, cz, da, de, el, en, es, et, eu, fa, fi, fr, ga, gl, hi, hr, hu, hy, id, it, ja, ka, km, kmr, ko, ku, kur, la, lki, lo, lt, lv, mk, mr, ms, mt, my, nb, ne, nl, nn, no, pl, pt, ro, ru, sdh, se, si, sk, sl, sq, sr, sv, sw, ta, te, th, tr, uk, vi, zh and x-any. x-any is a catch-all index for language-tagged literals without a specific index and must be the last value",
2575
2576
  "repoTooltips.entityIndexSize": "This property should be lowered or increased based on the expected size of repository, i.e. if you plan to have 100m triples, then the default 10m size is okay but if you plan on having 1m statements you should decrease the index size to 100k.",
2576
- "repoTooltips.ftsStringLiteralsIndex": "The index in which the string literals (xsd:string) are indexed. Possible values are: none, default or 2 letter language code",
2577
- "repoTooltips.ftsIrisIndex": "The index in which the IRIs are indexed for full-text search. Possible values are: none, default or 2 letter language code",
2577
+ "repoTooltips.ftsStringLiteralsIndex": "The index in which the string literals (xsd:string) are indexed. Possible values are: none, default, x-any or a language code from the FTS indexes. The index must be enabled in the FTS indexes",
2578
+ "repoTooltips.ftsIrisIndex": "The index in which the IRIs are indexed for full-text search. Possible values are: none, default, x-any or a language code from the FTS indexes. The index must be enabled in the FTS indexes",
2578
2579
  "repoTooltips.ftsDefaultAnalyzer": "The analyzer to use for the 'default' index. Possible values are: standard, simple, keyword, whitespace, unicodewhitespace, url, email, ar, bg, bn, br, ca, cjk, ckb, cz, da, de, el, en, es, et, eu, fa, fi, fr, ga, gl, hi, hu, hy, id, it, lt, lv, ne, nl, no, pt, ro, ru, sr, sv, ta, te, th, tr",
2579
2580
  "repoTooltips.ontop.driverType": "Determines the type of SQL database to connect to.",
2580
2581
  "repoTooltips.ontop.propertiesFile": "Describes the JDBC configuration such as hostname and database name to connect to.",
@@ -1477,6 +1477,7 @@
1477
1477
  "operations.label": "opérations",
1478
1478
  "query.abort.request": "Il a été demandé d'interrompre la requête et celle-ci sera interrompue lors de la première opération d'E/S.",
1479
1479
  "update.requested": "Il a été demandé d'interrompre la mise à jour, qui sera interrompue si possible.",
1480
+ "update.cluster_replicating": "La mise à jour ne peut pas être interrompue pendant sa réplication dans le cluster",
1480
1481
  "click.to.abort.query": "Cliquez pour annuler la requête",
1481
1482
  "click.to.abort.update": "Cliquez pour interrompre la mise à jour",
1482
1483
  "stop.was.requested": "L'arrêt a été demandé",
@@ -2569,10 +2570,10 @@
2569
2570
  "repoTooltips.queryLimitResults": "Définit le nombre maximum de résultats renvoyés par une requête après lequel l'évaluation de celle-ci sera terminée; les valeurs inférieures ou égales à zéro signifient l'absence de limite.",
2570
2571
  "repoTooltips.nonInterpretablePredicates": "Liste délimitée par des points-virgules de prédicats (URI complets) que GraphDB n'essaiera pas de traiter avec les plugins GraphDB enregistrés.",
2571
2572
  "repoTooltips.enableFtsIndex": "Activer l'index de recherche en texte intégral (FTS).",
2572
- "repoTooltips.ftsIndexes": "Liste de langues délimitées par des virgules qui doivent avoir un index spécifique avec un analyseur approprié pour la recherche en texte intégral. Les valeurs possibles sont : default, iri, ar, bg, bn, br, ca, ja, ko, zh, ku, cz, da, de, el, en, es, et, eu, fa, fi, fr, ga, gl, hi, hu, hy, id, it, lt, lv, ne, nl, no, pt, ro, ru, sr, sv, ta, te, th, tr",
2573
+ "repoTooltips.ftsIndexes": "Liste de langues délimitées par des virgules qui doivent avoir un index spécifique avec un analyseur approprié pour la recherche en texte intégral. Les valeurs possibles sont : default, iri, ar, be, bg, bn, br, ca, ckb, cs, cz, da, de, el, en, es, et, eu, fa, fi, fr, ga, gl, hi, hr, hu, hy, id, it, ja, ka, km, kmr, ko, ku, kur, la, lki, lo, lt, lv, mk, mr, ms, mt, my, nb, ne, nl, nn, no, pl, pt, ro, ru, sdh, se, si, sk, sl, sq, sr, sv, sw, ta, te, th, tr, uk, vi, zh et x-any. x-any est un index fourre-tout pour les littéraux avec une étiquette de langue sans index spécifique et doit être la dernière valeur",
2573
2574
  "repoTooltips.entityIndexSize": "Cette propriété doit être diminuée ou augmentée en fonction de la taille prévue du référentiel. Par exemple, si vous prévoyez d'avoir 100 millions de triplets, la taille par défaut de 10 millions est appropriée. En revanche, si vous prévoyez d'avoir 1 million d'énoncés, vous devriez réduire la taille de l'index à 100 000.",
2574
- "repoTooltips.ftsStringLiteralsIndex": "Index dans lequel les littéraux de chaîne (xsd:string) sont indexés. Les valeurs possibles sont : aucun, par défaut ou code de langue à 2 lettres.",
2575
- "repoTooltips.ftsIrisIndex": "Index dans lequel les IRI sont indexés pour la recherche en texte intégral. Les valeurs possibles sont : aucun, par défaut ou code de langue à 2 lettres.",
2575
+ "repoTooltips.ftsStringLiteralsIndex": "Index dans lequel les littéraux de chaîne (xsd:string) sont indexés. Les valeurs possibles sont : none, default, x-any ou un code de langue des index FTS. L'index doit être activé dans les index FTS.",
2576
+ "repoTooltips.ftsIrisIndex": "Index dans lequel les IRI sont indexés pour la recherche en texte intégral. Les valeurs possibles sont : none, default, x-any ou un code de langue des index FTS. L'index doit être activé dans les index FTS.",
2576
2577
  "repoTooltips.ftsDefaultAnalyzer": "L'analyseur à utiliser pour l'index « par défaut ». Les valeurs possibles sont : standard, simple, keyword, whitespace, unicodewhitespace, url, email, ar, bg, bn, br, ca, cjk, ckb, cz, da, de, el, en, es, et, eu, fa, fi, fr, ga, gl, hi, hu, hy, id, it, lt, lv, ne, nl, no, pt, ro, ru, sr, sv, ta, te, th, tr",
2577
2578
  "repoTooltips.ontop.driverType": "Détermine le type de base de données SQL à laquelle se connecter.",
2578
2579
  "repoTooltips.ontop.propertiesFile": "Décrit la configuration JDBC telle que le nom d'hôte et le nom de la base de données à laquelle se connecter.",
package/dist/index.html CHANGED
@@ -5,15 +5,15 @@
5
5
  const clean = pathname.slice(0, -1) + search + hash;
6
6
  window.history.replaceState({}, '', clean);
7
7
  }
8
- })();</script><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="X-UA-Compatible" content="ie=edge"><link id="favicon" rel="icon" type="image/png" href="assets/favicon.png"><link rel="stylesheet" href="css/splash-screen.css?v=4.0.0-TR24"><title>GraphDB Workbench</title><script src="resources/runtime.js?v=4.0.0-TR24"></script><meta name="importmap-type" use-injector/><script>window.wbDevMode = false;</script><script type="injector-importmap">{
8
+ })();</script><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="X-UA-Compatible" content="ie=edge"><link id="favicon" rel="icon" type="image/png" href="assets/favicon.png"><link rel="stylesheet" href="css/splash-screen.css?v=4.0.0-TR25"><title>GraphDB Workbench</title><script src="resources/runtime.js?v=4.0.0-TR25"></script><meta name="importmap-type" use-injector/><script>window.wbDevMode = false;</script><script type="injector-importmap">{
9
9
  "imports": {
10
- "single-spa": "./resources/single-spa.min.js?v=4.0.0-TR24",
11
- "@ontotext/workbench-api": "./api/ontotext-workbench-api.js?v=4.0.0-TR24",
12
- "@ontotext/root-config": "./main.d7968e926ea5592be2a6.js",
13
- "@ontotext/legacy-workbench": "./legacyWorkbench.ba7ff32677564dfd4fe1.js",
14
- "@ontotext/workbench": "./workbench/workbench/workbenchApp.js?v=4.0.0-TR24"
10
+ "single-spa": "./resources/single-spa.min.js?v=4.0.0-TR25",
11
+ "@ontotext/workbench-api": "./api/ontotext-workbench-api.js?v=4.0.0-TR25",
12
+ "@ontotext/root-config": "./main.6692816e0953b1a60712.js",
13
+ "@ontotext/legacy-workbench": "./legacyWorkbench.fa4203b20bf8d73ada10.js",
14
+ "@ontotext/workbench": "./workbench/workbench/workbenchApp.js?v=4.0.0-TR25"
15
15
  }
16
- }</script><meta name="import-map-overrides-domains" content="denylist:prod.example.com"/><script src="resources/import-map-overrides.js?v=4.0.0-TR24"></script><script src="resources/import-map-injector.js?v=4.0.0-TR24"></script><style>/* Default light/dark background is hardcodded here because our variables are not present yet. */
16
+ }</script><meta name="import-map-overrides-domains" content="denylist:prod.example.com"/><script src="resources/import-map-overrides.js?v=4.0.0-TR25"></script><script src="resources/import-map-injector.js?v=4.0.0-TR25"></script><style>/* Default light/dark background is hardcodded here because our variables are not present yet. */
17
17
  body {
18
18
  background-color: hsla(220, 40%, 7%);
19
19
  }
@@ -25,7 +25,7 @@
25
25
  import('@ontotext/root-config')
26
26
  .then(() => {
27
27
  const pluginScript = document.createElement('script');
28
- pluginScript.src = 'plugins.js?v=4.0.0-TR24';
28
+ pluginScript.src = 'plugins.js?v=4.0.0-TR25';
29
29
  document.body.appendChild(pluginScript);
30
30
  });
31
- });</script><import-map-overrides-full show-when-local-storage="devtools" dev-libs></import-map-overrides-full><figure id="splash-screen"><img decoding="sync" src="assets/graphdb-splash.svg?v=4.0.0-TR24" alt="GraphDB Workbench is loading..."></figure><onto-toastr></onto-toastr><onto-tooltip></onto-tooltip><onto-confirm-cancel-dialog></onto-confirm-cancel-dialog></body></html>
31
+ });</script><import-map-overrides-full show-when-local-storage="devtools" dev-libs></import-map-overrides-full><figure id="splash-screen"><img decoding="sync" src="assets/graphdb-splash.svg?v=4.0.0-TR25" alt="GraphDB Workbench is loading..."></figure><onto-toastr></onto-toastr><onto-tooltip></onto-tooltip><onto-confirm-cancel-dialog></onto-confirm-cancel-dialog></body></html>
@@ -1,4 +1,4 @@
1
- <link href="css/cluster-configuration/cluster-configuration.css?v=4.0.0-TR24" rel="stylesheet"/>
1
+ <link href="css/cluster-configuration/cluster-configuration.css?v=4.0.0-TR25" rel="stylesheet"/>
2
2
  <div class="cluster-configuration break-word-alt p-1 pt-2">
3
3
  <div class="cluster-configuration-title">
4
4
  <button class="close mb-1 ml-1" ng-click="closeClusterConfigurationPanel()"></button>
@@ -1,4 +1,4 @@
1
- <link href="css/cluster-configuration/multi-region.css?v=4.0.0-TR24" rel="stylesheet"/>
1
+ <link href="css/cluster-configuration/multi-region.css?v=4.0.0-TR25" rel="stylesheet"/>
2
2
 
3
3
  <div onto-loader ng-if="loader" class="multi-region-loader" message="getLoaderMessage" size="100"></div>
4
4
 
@@ -1,4 +1,4 @@
1
- <link href="css/cluster-nodes-configuration.css?v=4.0.0-TR24" rel="stylesheet"/>
1
+ <link href="css/cluster-nodes-configuration.css?v=4.0.0-TR25" rel="stylesheet"/>
2
2
 
3
3
  <div onto-loader ng-if="loader" class="create-cluster-loader" message="getLoaderMessage" size="100"></div>
4
4
  <div class="add-node-wrapper pull-right mb-1">
@@ -1,4 +1,4 @@
1
- <link href="css/autocomplete-select.css?v=4.0.0-TR24" rel="stylesheet"/>
1
+ <link href="css/autocomplete-select.css?v=4.0.0-TR25" rel="stylesheet"/>
2
2
 
3
3
  <div class="autocomplete-select-wrapper">
4
4
  <div class="autocomplete-select">
@@ -1,4 +1,4 @@
1
- <link href="css/dynamic-form.css?v=4.0.0-TR24" rel="stylesheet"/>
1
+ <link href="css/dynamic-form.css?v=4.0.0-TR25" rel="stylesheet"/>
2
2
 
3
3
  <div class="dynamic-form-container">
4
4
  <form name="dynamicForm" novalidate class="dynamic-form">
@@ -1,4 +1,4 @@
1
- <link href="css/operations-statuses-monitor.css?v=4.0.0-TR24" rel="stylesheet"/>
1
+ <link href="css/operations-statuses-monitor.css?v=4.0.0-TR25" rel="stylesheet"/>
2
2
 
3
3
  <div ng-if="activeOperations && activeOperations.operations && activeOperations.operations.length > 0"
4
4
  class="operations-statuses btn-group">
@@ -1,4 +1,4 @@
1
- <link href="css/rdf-resource-search.css?v=4.0.0-TR24" rel="stylesheet"/>
1
+ <link href="css/rdf-resource-search.css?v=4.0.0-TR25" rel="stylesheet"/>
2
2
 
3
3
  <div ng-cloak>
4
4
  <div id="search-box"
@@ -1,4 +1,4 @@
1
- <link href="css/shuttle-multiselect.css?v=4.0.0-TR24" rel="stylesheet"/>
1
+ <link href="css/shuttle-multiselect.css?v=4.0.0-TR25" rel="stylesheet"/>
2
2
 
3
3
  <div class="shuttle-multiselect">
4
4
  <div class="shuttle-panel available-options">
@@ -1,10 +1,10 @@
1
- <link href="css/lib/codemirror/moxer.css?v=4.0.0-TR24" rel="stylesheet">
2
- <link href="css/lib/ontotext-yasgui-web-component-styles/yasgui-styles.css?v=4.0.0-TR24" rel="stylesheet">
3
- <link href="css/lib/ontotext-yasgui-web-component-styles/yasqe-styles.css?v=4.0.0-TR24" rel="stylesheet">
4
- <link href="css/lib/ontotext-yasgui-web-component-styles/yasr-styles.css?v=4.0.0-TR24" rel="stylesheet">
5
- <link href="css/lib/ontotext-yasgui-web-component-styles/yasr-tables-styles.css?v=4.0.0-TR24" rel="stylesheet">
6
- <link href="css/lib/ontotext-yasgui-web-component-styles/dialogs-styles.css?v=4.0.0-TR24" rel="stylesheet">
7
- <link href="css/lib/ontotext-yasgui-web-component-styles/responsive-styles.css?v=4.0.0-TR24" rel="stylesheet">
1
+ <link href="css/lib/codemirror/moxer.css?v=4.0.0-TR25" rel="stylesheet">
2
+ <link href="css/lib/ontotext-yasgui-web-component-styles/yasgui-styles.css?v=4.0.0-TR25" rel="stylesheet">
3
+ <link href="css/lib/ontotext-yasgui-web-component-styles/yasqe-styles.css?v=4.0.0-TR25" rel="stylesheet">
4
+ <link href="css/lib/ontotext-yasgui-web-component-styles/yasr-styles.css?v=4.0.0-TR25" rel="stylesheet">
5
+ <link href="css/lib/ontotext-yasgui-web-component-styles/yasr-tables-styles.css?v=4.0.0-TR25" rel="stylesheet">
6
+ <link href="css/lib/ontotext-yasgui-web-component-styles/dialogs-styles.css?v=4.0.0-TR25" rel="stylesheet">
7
+ <link href="css/lib/ontotext-yasgui-web-component-styles/responsive-styles.css?v=4.0.0-TR25" rel="stylesheet">
8
8
 
9
9
  <ontotext-yasgui
10
10
  class="{{classToApply}}"
@@ -1,4 +1,4 @@
1
- <link href="css/cookie-policy.css?v=4.0.0-TR24" rel="stylesheet"/>
1
+ <link href="css/cookie-policy.css?v=4.0.0-TR25" rel="stylesheet"/>
2
2
 
3
3
  <div class="cookie-consent-modal" ng-show="showCookieConsent">
4
4
  <div class="cookie-consent-content">
@@ -1,4 +1,4 @@
1
- <link href="css/cookie-policy.css?v=4.0.0-TR24" rel="stylesheet"/>
1
+ <link href="css/cookie-policy.css?v=4.0.0-TR25" rel="stylesheet"/>
2
2
 
3
3
  <div class="cookie-policy-modal">
4
4
  <div class="title">{{'cookie.policy.title' | translate}}</div>
@@ -1,4 +1,4 @@
1
- <link href="css/core-errors.css?v=4.0.0-TR24" rel="stylesheet"/>
1
+ <link href="css/core-errors.css?v=4.0.0-TR25" rel="stylesheet"/>
2
2
  <div class="repository-errors-container mb-2 row" ng-hide="getActiveRepository() && !isRestricted">
3
3
  <div role="alert">
4
4
  <div class="mb-1 mt-1 ml-1 mr-1">
@@ -1,4 +1,4 @@
1
- <link href="css/editable-content.css?v=4.0.0-TR24" rel="stylesheet"/>
1
+ <link href="css/editable-content.css?v=4.0.0-TR25" rel="stylesheet"/>
2
2
  <div
3
3
  ng-attr-contenteditable="{{!ngDisabled}}"
4
4
  ng-attr-disabled="{{ngDisabled ? true : undefined}}"
@@ -1,2 +1,2 @@
1
- <link href="css/markdown-content.css?v=4.0.0-TR24" rel="stylesheet"/>
1
+ <link href="css/markdown-content.css?v=4.0.0-TR25" rel="stylesheet"/>
2
2
  <div class="markdown-content"></div>