graphdb-workbench 3.3.3-TR1 → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{10759.b2e1d643d681ebd9c124.bundle.js → 10759.57059f90014058a86952.bundle.js} +2 -2
- package/dist/10759.57059f90014058a86952.bundle.js.map +1 -0
- package/dist/{18961.01ff5fcc0f4b9f99236e.bundle.js → 18961.732c0c355509452ac6da.bundle.js} +2 -2
- package/dist/18961.732c0c355509452ac6da.bundle.js.map +1 -0
- package/dist/{20694.4becb7771236462dcc5a.bundle.js → 20694.03b5abf23347ae0bad65.bundle.js} +2 -2
- package/dist/{20694.4becb7771236462dcc5a.bundle.js.map → 20694.03b5abf23347ae0bad65.bundle.js.map} +1 -1
- package/dist/38644.7c01b17edbb63f7bf2cc.bundle.js +2 -0
- package/dist/38644.7c01b17edbb63f7bf2cc.bundle.js.map +1 -0
- package/dist/39518.a40451f994622fd35756.bundle.js +2 -0
- package/dist/{39518.1c641a7dc1c50a526845.bundle.js.map → 39518.a40451f994622fd35756.bundle.js.map} +1 -1
- package/dist/{39874.710e94f211579215f997.bundle.js → 39874.17dde6245fc4cc91bb58.bundle.js} +2 -2
- package/dist/39874.17dde6245fc4cc91bb58.bundle.js.map +1 -0
- package/dist/{45758.1212136a37dd4f7528f8.bundle.js → 45758.b9ce5fe0ed6c8c4fc141.bundle.js} +2 -2
- package/dist/45758.b9ce5fe0ed6c8c4fc141.bundle.js.map +1 -0
- package/dist/{60560.6ba1b091a34af6c00770.bundle.js → 60560.62ed0cb0b3d07fecbf28.bundle.js} +2 -2
- package/dist/60560.62ed0cb0b3d07fecbf28.bundle.js.map +1 -0
- package/dist/{60730.35493812d428872eddb6.bundle.js → 60730.a9fc5342637039776562.bundle.js} +2 -2
- package/dist/60730.a9fc5342637039776562.bundle.js.map +1 -0
- package/dist/67888.6279be833ab8b2f2f9e6.bundle.js +2 -0
- package/dist/67888.6279be833ab8b2f2f9e6.bundle.js.map +1 -0
- package/dist/{7815.2aec5ebbcd434f5582ff.bundle.js → 7815.89cc59b6625e84913351.bundle.js} +2 -2
- package/dist/7815.89cc59b6625e84913351.bundle.js.map +1 -0
- package/dist/{78681.9e1d4e064e9e1fb5fb21.bundle.js → 78681.6c8614aad7e5465be505.bundle.js} +2 -2
- package/dist/78681.6c8614aad7e5465be505.bundle.js.map +1 -0
- package/dist/{82206.229877d7931849236456.bundle.js → 82206.473f6d4f79e12f6a9da6.bundle.js} +2 -2
- package/dist/82206.473f6d4f79e12f6a9da6.bundle.js.map +1 -0
- package/dist/{82926.bbdac6a7e9eb883ae97b.bundle.js → 82926.164acb5a9d5ffd8e8ce3.bundle.js} +2 -2
- package/dist/{82926.bbdac6a7e9eb883ae97b.bundle.js.map → 82926.164acb5a9d5ffd8e8ce3.bundle.js.map} +1 -1
- package/dist/99448.b8ccb0c0fd74bb99d5a5.bundle.js +2 -0
- package/dist/99448.b8ccb0c0fd74bb99d5a5.bundle.js.map +1 -0
- package/dist/css/splash-screen.css +1 -1
- package/dist/index.html +9 -9
- package/dist/js/angular/clustermanagement/templates/cluster-nodes-configuration.html +1 -1
- package/dist/js/angular/core/directives/autocomplete/templates/autocomplete.html +1 -1
- package/dist/js/angular/core/directives/dynamic-form/templates/dynamic-form.html +1 -1
- package/dist/js/angular/core/directives/operations-statuses-monitor/templates/operations-statuses-monitor.html +1 -1
- package/dist/js/angular/core/directives/rdfresourcesearch/templates/rdfResourceSearchTemplate.html +1 -1
- package/dist/js/angular/core/directives/shuttle-multiselect/templates/shuttle-multiselect.html +1 -1
- package/dist/js/angular/core/directives/yasgui-component/templates/yasgui-component.html +2 -2
- package/dist/js/angular/core/templates/cookie-policy/cookie-consent.html +1 -1
- package/dist/js/angular/core/templates/cookie-policy/cookie-policy.html +1 -1
- package/dist/js/angular/core/templates/editable-content/editable-content.html +1 -1
- package/dist/js/angular/core/templates/markdown-content/markdown-content.html +1 -1
- package/dist/js/angular/core/templates/search-resource-input.html +1 -1
- package/dist/js/angular/graphql/templates/create-graphql-endpoint.html +2 -2
- package/dist/js/angular/graphql/templates/graphql-endpoint-management.html +1 -1
- package/dist/js/angular/graphql/templates/graphql-playground.html +2 -2
- package/dist/js/angular/graphql/templates/modal/endpoint-configuration-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/endpoint-generation-failure-result-modal.html +1 -1
- package/dist/js/angular/graphql/templates/modal/import-endpoint-definition-modal.html +1 -1
- package/dist/js/angular/security/templates/user.html +2 -2
- package/dist/js/angular/ttyg/templates/agent-list.html +1 -1
- package/dist/js/angular/ttyg/templates/agent-select-menu.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-item-detail.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-list.html +1 -1
- package/dist/js/angular/ttyg/templates/chat-panel.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-instructions-explain-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/modal/agent-settings-modal.html +3 -3
- package/dist/js/angular/ttyg/templates/modal/external-integration-configuration-modal.html +1 -1
- package/dist/js/angular/ttyg/templates/no-agents-view.html +1 -1
- package/dist/js/angular/ttyg/templates/ttyg.html +1 -1
- package/dist/legacyWorkbench.ce850285bee5789a585d.js +3 -0
- package/dist/{legacyWorkbench.4d8a4e8dde83fc9ac427.js.map → legacyWorkbench.ce850285bee5789a585d.js.map} +1 -1
- package/dist/main.83f9d186d9b0827c6774.js +3 -0
- package/dist/main.83f9d186d9b0827c6774.js.map +1 -0
- package/dist/pages/aclmanagement.html +1 -1
- package/dist/pages/autocomplete.html +1 -1
- package/dist/pages/choose-repository-type.html +1 -1
- package/dist/pages/cluster-management/clusterInfo.html +3 -3
- package/dist/pages/create-index.html +1 -1
- package/dist/pages/dependencies.html +1 -1
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +1 -1
- package/dist/pages/export.html +1 -1
- package/dist/pages/find.html +1 -1
- package/dist/pages/graph-config/saveGraphConfig.html +8 -8
- package/dist/pages/graphs-visualizations.html +7 -7
- package/dist/pages/guides.html +1 -1
- package/dist/pages/home.html +1 -1
- package/dist/pages/import.html +2 -2
- package/dist/pages/jdbc-create.html +1 -1
- package/dist/pages/jdbc.html +1 -1
- package/dist/pages/monitor/backup-and-restore.html +1 -1
- package/dist/pages/monitor/queries.html +1 -1
- package/dist/pages/monitor/resources.html +1 -1
- package/dist/pages/namespaces.html +2 -2
- package/dist/pages/plugins.html +1 -1
- package/dist/pages/rdfClassHierarchyInfo.html +7 -7
- package/dist/pages/rdfrank.html +2 -2
- package/dist/pages/repositories.html +1 -1
- package/dist/pages/repository.html +1 -1
- package/dist/pages/similarity-indexes.html +1 -1
- package/dist/pages/sparql-editor.html +1 -1
- package/dist/pages/sparql-template-create.html +1 -1
- package/dist/pages/sparql-templates.html +1 -1
- package/dist/pages/ux-test1.html +2 -2
- package/dist/pages/webapi.html +2 -2
- package/dist/res/swagger5/index.html +11 -11
- package/dist/shared-components/cjs/index-CTK5NoJt.js +2 -0
- package/dist/shared-components/cjs/loader.cjs.js +1 -1
- package/dist/shared-components/cjs/onto-cookie-consent_2.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-dialog_2.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-dropdown.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-footer_5.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-language-selector_9.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-layout.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-permission-banner.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-test-context.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/onto-toastr.cjs.entry.js +1 -1
- package/dist/shared-components/cjs/shared-components.cjs.js +1 -1
- package/dist/shared-components/cjs/translate-label.cjs.entry.js +1 -1
- package/dist/shared-components/collection/collection-manifest.json +2 -2
- package/dist/shared-components/collection/components/dialogs/onto-dialog.js +1 -1
- package/dist/shared-components/collection/components/onto-dropdown/onto-dropdown.js +1 -1
- package/dist/shared-components/collection/components/onto-language-selector/onto-language-selector.js +1 -1
- package/dist/shared-components/collection/components/onto-license-alert/onto-license-alert.js +1 -1
- package/dist/shared-components/collection/components/onto-loader/onto-loader.js +1 -1
- package/dist/shared-components/collection/components/onto-navbar/onto-navbar.js +1 -1
- package/dist/shared-components/collection/components/onto-operations-notification/onto-operations-notification.js +1 -1
- package/dist/shared-components/collection/components/onto-repository-selector/onto-repository-selector.js +1 -1
- package/dist/shared-components/collection/components/onto-search-resource-input/onto-search-resource-input.js +1 -1
- package/dist/shared-components/collection/components/onto-test-context/onto-test-context.js +1 -1
- package/dist/shared-components/collection/components/onto-toggle-switch/onto-toggle-switch.js +1 -1
- package/dist/shared-components/collection/components/onto-user-menu/onto-user-menu.js +1 -1
- package/dist/shared-components/collection/components/translate-label/translate-label.js +1 -1
- package/dist/shared-components/esm/index-EiAqSNMq.js +2 -0
- package/dist/shared-components/esm/loader.js +1 -1
- package/dist/shared-components/esm/onto-cookie-consent_2.entry.js +1 -1
- package/dist/shared-components/esm/onto-dialog_2.entry.js +1 -1
- package/dist/shared-components/esm/onto-dropdown.entry.js +1 -1
- package/dist/shared-components/esm/onto-footer_5.entry.js +1 -1
- package/dist/shared-components/esm/onto-language-selector_9.entry.js +1 -1
- package/dist/shared-components/esm/onto-layout.entry.js +1 -1
- package/dist/shared-components/esm/onto-permission-banner.entry.js +1 -1
- package/dist/shared-components/esm/onto-test-context.entry.js +1 -1
- package/dist/shared-components/esm/onto-toastr.entry.js +1 -1
- package/dist/shared-components/esm/shared-components.js +1 -1
- package/dist/shared-components/esm/translate-label.entry.js +1 -1
- package/dist/shared-components/shared-components/{p-6d34b2cb.entry.js → p-1103d100.entry.js} +1 -1
- package/dist/shared-components/shared-components/{p-9b2c6e80.entry.js → p-2e2bb175.entry.js} +1 -1
- package/dist/shared-components/shared-components/{p-b754971e.entry.js → p-50735428.entry.js} +1 -1
- package/dist/shared-components/shared-components/{p-7e47d850.entry.js → p-59707503.entry.js} +1 -1
- package/dist/shared-components/shared-components/{p-598d33d7.entry.js → p-6a37f808.entry.js} +1 -1
- package/dist/shared-components/shared-components/{p-9214bb16.entry.js → p-6fb5eec5.entry.js} +1 -1
- package/dist/shared-components/shared-components/{p-c27fe716.entry.js → p-97930684.entry.js} +1 -1
- package/dist/shared-components/shared-components/p-EiAqSNMq.js +2 -0
- package/dist/shared-components/shared-components/{p-b5d4081d.entry.js → p-a5a49d87.entry.js} +1 -1
- package/dist/shared-components/shared-components/{p-74888633.entry.js → p-d134e207.entry.js} +1 -1
- package/dist/shared-components/shared-components/{p-5886e663.entry.js → p-ec2f4ea5.entry.js} +1 -1
- package/dist/shared-components/shared-components/shared-components.esm.js +1 -1
- package/dist/shared-components/types/stencil-public-runtime.d.ts +10 -147
- package/package.json +1 -1
- package/dist/10759.b2e1d643d681ebd9c124.bundle.js.map +0 -1
- package/dist/18961.01ff5fcc0f4b9f99236e.bundle.js.map +0 -1
- package/dist/38644.cc471c67239fa24901cc.bundle.js +0 -2
- package/dist/38644.cc471c67239fa24901cc.bundle.js.map +0 -1
- package/dist/39518.1c641a7dc1c50a526845.bundle.js +0 -2
- package/dist/39874.710e94f211579215f997.bundle.js.map +0 -1
- package/dist/45758.1212136a37dd4f7528f8.bundle.js.map +0 -1
- package/dist/60560.6ba1b091a34af6c00770.bundle.js.map +0 -1
- package/dist/60730.35493812d428872eddb6.bundle.js.map +0 -1
- package/dist/67888.7224e1b2689d73c4d468.bundle.js +0 -2
- package/dist/67888.7224e1b2689d73c4d468.bundle.js.map +0 -1
- package/dist/7815.2aec5ebbcd434f5582ff.bundle.js.map +0 -1
- package/dist/78681.9e1d4e064e9e1fb5fb21.bundle.js.map +0 -1
- package/dist/82206.229877d7931849236456.bundle.js.map +0 -1
- package/dist/99448.b9922814bd15808a9d1c.bundle.js +0 -2
- package/dist/99448.b9922814bd15808a9d1c.bundle.js.map +0 -1
- package/dist/legacyWorkbench.4d8a4e8dde83fc9ac427.js +0 -3
- package/dist/main.14f083264cd64618d96a.js +0 -3
- package/dist/main.14f083264cd64618d96a.js.map +0 -1
- package/dist/shared-components/cjs/app-globals-V2Kpy_OQ.js +0 -1
- package/dist/shared-components/cjs/index-L_ZmIeD5.js +0 -2
- package/dist/shared-components/esm/app-globals-DQuL1Twl.js +0 -1
- package/dist/shared-components/esm/index-CGqARDX4.js +0 -2
- package/dist/shared-components/shared-components/p-CGqARDX4.js +0 -2
- package/dist/shared-components/shared-components/p-DQuL1Twl.js +0 -1
- /package/dist/{legacyWorkbench.4d8a4e8dde83fc9ac427.js.LICENSE.txt → legacyWorkbench.ce850285bee5789a585d.js.LICENSE.txt} +0 -0
- /package/dist/{main.14f083264cd64618d96a.js.LICENSE.txt → main.83f9d186d9b0827c6774.js.LICENSE.txt} +0 -0
- /package/dist/shared-components/cjs/{index-L_ZmIeD5.js.LICENSE.txt → index-CTK5NoJt.js.LICENSE.txt} +0 -0
- /package/dist/shared-components/esm/{index-CGqARDX4.js.LICENSE.txt → index-EiAqSNMq.js.LICENSE.txt} +0 -0
- /package/dist/shared-components/shared-components/{p-CGqARDX4.js.LICENSE.txt → p-EiAqSNMq.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"38644.cc471c67239fa24901cc.bundle.js","mappings":"kLAkBA,SAASA,EAA0BC,EAAYC,EAASC,EAAeC,EAAsBC,EAAWC,EAAqBC,EAAQC,EAAUC,EAAQC,EAAUC,EAAYC,EAAWC,GACpL,MAAO,CACHC,SAAU,KACVC,SAAU,gCACVC,MAAO,CACHC,wBAAyB,IACzBC,kBAAmB,IACnBC,cAAe,KAEnBC,KAGJ,SAAkBJ,GACd,MAAMK,EAAQb,EAAS,YAS3B,SAAgCQ,GAC5B,IAAIM,EAAQ,KAGRC,EAAgBD,EAAQ,GACxBE,EAAiBF,EAAQ,IACzBG,EAAeD,EAAiB,EAChCE,EAAgBJ,EAAQ,GACxBK,EA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uBAAwB,YAAa,sBAAuB,SAAU,WAAY,SAAU,WAAY,aAAc,YAAa,qC","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/graphexplore/directives/domain-range-graph.directive.js"],"sourcesContent":["import SVG from 'lib/common/svg-export';\nimport D3 from 'lib/common/d3-utils';\nimport 'angular/utils/local-storage-adapter';\nimport * as d3 from 'd3';\n\nangular\n .module('graphdb.framework.graphexplore.directives.domainrange', [\n 'graphdb.framework.graphexplore.controllers.domainrange',\n 'graphdb.framework.utils.localstorageadapter'\n ])\n .constant('ONTO_RED', 'var(--gw-primary-base)')\n .constant('ONTO_GREEN', 'var(--gw-tertiary-base)')\n .constant('ONTO_BLUE', 'var(--gw-secondary-base)')\n .constant('NON_COLLAPSED_REFLEXIVE_LINK_LIMIT', 6)\n .directive('domainRangeGraph', domainRangeGraphDirective);\n\ndomainRangeGraphDirective.$inject = ['$rootScope', '$window', '$repositories', 'GraphDataRestService', '$location', 'LocalStorageAdapter', 'LSKeys', '$timeout', 'toastr', 'ONTO_RED', 'ONTO_GREEN', 'ONTO_BLUE', 'NON_COLLAPSED_REFLEXIVE_LINK_LIMIT'];\n\nfunction domainRangeGraphDirective($rootScope, $window, $repositories, GraphDataRestService, $location, LocalStorageAdapter, LSKeys, $timeout, toastr, ONTO_RED, ONTO_GREEN, ONTO_BLUE, NON_COLLAPSED_REFLEXIVE_LINK_LIMIT) {\n return {\n restrict: 'AE',\n template: '<div id=\"domain-range\"></div>',\n scope: {\n showPredicatesInfoPanel: '=',\n selectedPredicate: '=',\n collapseEdges: '='\n },\n link: linkFunc\n };\n\n function linkFunc(scope) {\n const timer = $timeout(function () {\n renderDomainRangeGraph(scope);\n }, 50);\n\n scope.$on(\"$destroy\", function () {\n $timeout.cancel(timer);\n });\n }\n\n function renderDomainRangeGraph(scope) {\n var width = 1200,\n height = 600;\n\n var mainClassSize = width / 18,\n otherClassSize = width / 110,\n datatypeSize = otherClassSize / 2,\n labelFontSize = width / 90,\n basicArrowStrokeWidth = width / 1000,\n collapsedArrowStrokeWidth = width / 600;\n\n var svg = d3.select(\"#domain-range\")\n .append(\"svg\")\n .attr(\"viewBox\", \"0 0 \" + width + \" \" + height)\n .attr(\"preserveAspectRatio\", \"xMidYMid meet\")\n .on(\"dblclick.zoom\", null);\n\n var force = d3.forceSimulation();\n\n var drag = d3.drag()\n .subject(function (d) {\n return d;\n })\n .on(\"start\", dragStart)\n .on(\"end\", dragEnd)\n .on(\"drag\", dragged);\n\n var defs = svg.append(\"defs\");\n generateMarkers(defs);\n\n function generateMarkers(defElement) {\n defs.append(\"marker\")\n .attrs({\n id: \"arrow\",\n viewBox: \"0 -5 10 10\",\n refX: 10,\n refY: 0,\n markerUnits: \"strokeWidth\",\n markerWidth: 5,\n markerHeight: 5,\n orient: \"auto\",\n fill: ONTO_BLUE\n })\n .append(\"path\")\n .attrs({\n d: \"M0,-5L10,0L0,5\",\n class: \"arrowHead\"\n });\n\n defs.append(\"marker\")\n .attrs({\n id: \"collapsed-arrow\",\n viewBox: \"0 -5 10 10\",\n refX: 9,\n refY: 0,\n markerUnits: \"strokeWidth\",\n markerWidth: 4,\n markerHeight: 4,\n orient: \"auto\",\n fill: ONTO_BLUE\n })\n .append(\"path\")\n .attrs({\n d: \"M0,-5L10,0L0,5\",\n class: \"arrowHead\"\n });\n\n defs.append(\"marker\")\n .attrs({\n id: \"arrow-loop\",\n viewBox: \"0 -5 10 10\",\n refX: 7,\n refY: 0,\n markerUnits: \"strokeWidth\",\n markerWidth: 5,\n markerHeight: 5,\n orient: \"auto\",\n fill: ONTO_BLUE\n })\n .append(\"path\")\n .attrs({\n d: \"M0,-5L10,0L0,5\",\n class: \"arrowHead\"\n });\n }\n\n /*\n * Prepares SVG document image export by adding xml namespaces and\n * additional style information\n */\n function prepareForSVGImageExport() {\n // get css rules for the diagram\n var cssRules = SVG.Export.getCSSRules(\"css/domain-range-graph.css?v=3.3.3-TR1\");\n\n // inline css rules in a defs tag\n $(\"defs\").append('<style type=\"text/css\"><![CDATA[' + cssRules + ']]></style>');\n\n // convert selected html to base64\n var imgSrc = SVG.Export.generateBase64ImageSource(\"#domain-range svg\");\n\n // set the binary image and a name for the downloadable file on the export button\n d3.select(this).attrs({\n href: imgSrc,\n download: \"domain-range-graph-\" + $repositories.getActiveRepository() + \".svg\"\n });\n }\n\n d3.select(\"#download-svg\")\n .on(\"mouseover\", prepareForSVGImageExport);\n\n generateLegend();\n\n function generateLegend() {\n // start of code for legend\n\n var legendBackgroundWidth = width / 7;\n var legendBackgroundHeight = legendBackgroundWidth * 1.2;\n\n var svgLegend = d3.select(\".legend-container\")\n .append(\"svg\")\n .attr(\"viewBox\", \"0 0 \" + legendBackgroundWidth + \" \" + legendBackgroundHeight)\n .attr(\"preserveAspectRatio\", \"xMidYMid meet\");\n\n var legendCellGroup = svgLegend;\n\n legendCellGroup.append(\"rect\")\n .attrs({\n width: legendBackgroundWidth,\n height: legendBackgroundHeight\n })\n .style(\"fill\", \"rgba(235, 235, 235, 0.9)\");\n\n var sourceX = width / 75;\n var sourceY = width / 40;\n var targetX = sourceX + mainClassSize / 2.5;\n var targetY = sourceY;\n\n var legendTextX = targetX + width / 90;\n var legendLabelFontSize = labelFontSize / 1.1;\n\n var classNodeY = sourceY;\n var legendClassNode = legendCellGroup\n .append(\"circle\")\n .attrs({\n class: \"legend-class-node\",\n cx: (sourceX + targetX) / 2,\n cy: classNodeY,\n r: mainClassSize / 4.5\n });\n\n var classNodeTextY = targetY + width / 370;\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: classNodeTextY\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"main class node\");\n\n var objectNodeY = classNodeY + width / 30;\n legendCellGroup\n .append(\"circle\")\n .attrs({\n class: \"legend-object-node\",\n cx: (sourceX + targetX) / 2,\n cy: objectNodeY,\n r: otherClassSize / 1.25\n });\n\n var objectNodeTextY = classNodeTextY + width / 30;\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: objectNodeTextY\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"class node\");\n\n var datatypeNodeY = objectNodeY + width / 45;\n legendCellGroup\n .append(\"circle\")\n .attrs({\n class: \"legend-datatype-node\",\n cx: (sourceX + targetX) / 2,\n cy: datatypeNodeY,\n r: datatypeSize\n });\n\n var datatypeNodeTextY = objectNodeTextY + width / 45;\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: datatypeNodeTextY\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"datatype node\");\n\n var basicPropertyArrowY = datatypeNodeY + width / 45;\n legendCellGroup\n .append(\"line\")\n .attrs({\n class: \"property-arrow\",\n x1: sourceX,\n y1: basicPropertyArrowY,\n x2: targetX,\n y2: basicPropertyArrowY\n })\n .style(\"stroke-width\", basicArrowStrokeWidth)\n .attr(\"marker-end\", \"url(\" + $location.absUrl() + \"#arrow)\");\n\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: basicPropertyArrowY + (width / 370)\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"explicit property\");\n\n var implicitPropArrowY = basicPropertyArrowY + width / 45;\n legendCellGroup\n .append(\"line\")\n .attrs({\n class: \"implicit-property-arrow\",\n x1: sourceX,\n y1: implicitPropArrowY,\n x2: targetX,\n y2: implicitPropArrowY\n })\n .style(\"stroke-width\", basicArrowStrokeWidth)\n .attr(\"marker-end\", \"url(\" + $location.absUrl() + \"#arrow)\");\n\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: implicitPropArrowY + (width / 370)\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"implicit property\");\n\n var collapsedPropArrowY = implicitPropArrowY + width / 45;\n legendCellGroup\n .append(\"line\")\n .attrs({\n class: \"collapsed-property-arrow\",\n x1: sourceX,\n y1: collapsedPropArrowY,\n x2: targetX,\n y2: collapsedPropArrowY\n })\n .style(\"stroke-width\", collapsedArrowStrokeWidth)\n .attr(\"marker-end\", \"url(\" + $location.absUrl() + \"#collapsed-arrow)\");\n\n legendCellGroup\n .append(\"text\")\n .attrs({\n x: legendTextX,\n y: collapsedPropArrowY + (width / 370)\n })\n .style('font-size', legendLabelFontSize + 'px')\n .text(\"collapsed property\");\n // end of code for legend\n }\n\n var selectedRdfUri = $location.search().uri;\n var classNodeLabel = $location.search().name;\n const collapsed = $location.search().collapsed;\n\n getDomainRangeData(selectedRdfUri, collapsed);\n\n function getDomainRangeData(selectedRdfUri, collapsed) {\n GraphDataRestService.getDomainRangeData(selectedRdfUri, collapsed)\n .success(function (response, status, headers) {\n scope.domainRangeGraphData = response;\n }).error(function (response) {\n toastr.error(\"Request for \" + classNodeLabel + \" failed!\");\n });\n }\n\n function switchEdgeMode(collapsed) {\n $rootScope.$broadcast('switchEdgeMode', {\n uri: selectedRdfUri,\n name: classNodeLabel,\n collapsed: collapsed\n });\n }\n\n // intercept back button press and set action to local storage\n $(window).on('popstate', function () {\n LocalStorageAdapter.set(LSKeys.DOMAIN_RANGE_WENT_BACK, true);\n });\n\n $window.onpopstate = function (event) {\n if (event.state) {\n $rootScope.$broadcast(\"changeCollapsedEdgesState\", event.state.collapsed);\n }\n };\n\n scope.$watch('collapseEdges', function () {\n if (!angular.isUndefined(scope.collapseEdges)) {\n LocalStorageAdapter.set(LSKeys.DOMAIN_RANGE_COLLAPSE_EDGES, scope.collapseEdges);\n\n // if the back button has not been pressed, then switch to collapsed or non collapsed mode\n // otherwise skip, because back button will not function properly and will not pop the entire\n // history stack\n if (LocalStorageAdapter.get(LSKeys.DOMAIN_RANGE_WENT_BACK) !== \"true\") {\n switchEdgeMode(scope.collapseEdges);\n }\n\n // after back button status has been checked, remove the action from local storage in order\n // to be clean for next check\n LocalStorageAdapter.remove(LSKeys.DOMAIN_RANGE_WENT_BACK);\n }\n });\n\n scope.$watch('domainRangeGraphData', function () {\n if (scope.domainRangeGraphData) {\n var graph = _.cloneDeep(scope.domainRangeGraphData);\n\n const nodes = graph.nodes;\n const links = graph.links;\n\n force.nodes(nodes)\n .force('x', d3.forceX(width / 2))\n .force('y', d3.forceY(height / 2))\n .force(\"charge\", d3.forceManyBody().strength(-800))\n .force(\"link\", d3.forceLink(links).distance(width / 3.5))\n\n var linkGroup = svg.selectAll(\".link\")\n .data(links)\n .enter()\n .append(\"g\");\n\n function styleArrowsInCollapsedMode(sel) {\n sel.style(\"stroke\", ONTO_BLUE);\n sel.style(\"stroke-width\", collapsedArrowStrokeWidth);\n sel.attr(\"marker-end\", \"url(\" + $location.absUrl() + \"#collapsed-arrow)\");\n }\n\n var link,\n loopLink,\n loopLinkEdgeCount = 0;\n\n\n linkGroup\n .each(function (d) {\n if (d.objectPropNodeClassUri !== selectedRdfUri) {\n link = linkGroup\n .append(\"line\")\n .attrs({\n class: \"link\",\n // absolute url needed because angular inserts a <base> tag\n \"marker-end\": \"url(\" + $location.absUrl() + \"#arrow)\"\n })\n .style(\"stroke-width\", basicArrowStrokeWidth)\n .each(function (d) {\n switch (d.propertyType) {\n case \"objectLeft\":\n d.targetRadius = mainClassSize;\n break;\n case \"objectRight\":\n d.targetRadius = otherClassSize;\n break;\n case \"datatype\":\n d.targetRadius = datatypeSize;\n break;\n default:\n d.targetRadius = 0;\n }\n var sel = d3.select(this);\n if (d.targetNodeEdgeCount > 1) {\n styleArrowsInCollapsedMode(sel);\n } else if (d.implicit) {\n sel.style(\"stroke-dasharray\", \"3, 3\");\n }\n });\n } else {\n if (angular.isUndefined(loopLink)) {\n var loopLinkSize = mainClassSize / 2;\n loopLink = d3.select(this)\n .append(\"path\")\n .attrs({\n d: \"M 0 0 A \" + loopLinkSize + \" \" + loopLinkSize + \" 0 1 1 0 \" + loopLinkSize,\n class: \"loop-link\",\n fill: \"none\",\n \"marker-end\": \"url(\" + $location.absUrl() + \"#arrow-loop)\"\n })\n .style(\"stroke-width\", basicArrowStrokeWidth);\n }\n\n loopLinkEdgeCount += d.targetNodeEdgeCount;\n if (loopLinkEdgeCount > 1) {\n styleArrowsInCollapsedMode(d3.select(\".loop-link\"));\n }\n }\n });\n\n var previousPropertyNameSelection = {};\n\n function disableCollapsedPredicateLabelHightlighting() {\n if (!$.isEmptyObject(previousPropertyNameSelection)) {\n previousPropertyNameSelection.text.style(\"fill\", \"black\");\n previousPropertyNameSelection.background.style(\"fill\", \"#f0f0f0\");\n }\n }\n\n // when clicking anywhere else but the collapsed labels disable highlighting\n // of the currently selected one\n $(\"document\").ready(function () {\n $(\"#domain-range\").bind(\"click\", disableCollapsedPredicateLabelHightlighting);\n });\n\n function onCollapsedPropertyNameClick(event, d) {\n disableCollapsedPredicateLabelHightlighting();\n previousPropertyNameSelection.text = d3.select(this);\n\n previousPropertyNameSelection.background = d3.select(this.previousSibling);\n previousPropertyNameSelection.text.style(\"fill\", \"white\");\n\n previousPropertyNameSelection.background.style(\"fill\", ONTO_BLUE);\n $timeout(function () {\n scope.showPredicatesInfoPanel = true;\n scope.selectedPredicate = d;\n });\n event.stopPropagation();\n }\n\n\n var propertyNames = linkGroup\n .append(\"text\")\n .attr(\"class\", function (d) {\n return d.objectPropNodeClassUri === selectedRdfUri ? \"loop-link-property-name\" : \"property-name\";\n })\n .attr(\"dx\", function (d) {\n // offset text more towards the main class\n return mainClassSize / 2 * (d.propertyType === \"objectLeft\" ? 1 : -1);\n })\n .style(\"text-anchor\", function (d) {\n return d.propertyType === \"objectLeft\" ? \"end\" : \"start\";\n })\n .style(\"font-size\", labelFontSize)\n .text(function (d) {\n return d.targetNodeEdgeCount > 1 ? d.targetNodeEdgeCount + \" predicates\" : d.name;\n });\n\n\n propertyNames\n .each(function (d) {\n var sel = d3.select(this);\n var isCompoundEdge = /\\d\\spredicates/.test(sel.text());\n\n // handle collapsed predicates by making their font bold, make them highlight when clicked\n // and make them trigger the side panel to display the collapsed edges\n if (isCompoundEdge) {\n sel\n .style(\"font-weight\", \"bold\")\n .on(\"click\", onCollapsedPropertyNameClick);\n } else {\n // for regular predicate labels just attach a link to the \"Resources\" view\n // for more helpful information regarding them\n sel.on(\"click\", function (event, d) {\n $window.open(\"resource?uri=\" + encodeURIComponent(d.uri), \"_blank\");\n });\n }\n });\n var textPadding = width / 600;\n\n\n var linkRect = linkGroup\n .append(\"rect\")\n .attr(\"class\", function (d) {\n return d.objectPropNodeClassUri !== selectedRdfUri ? \"link-background\" : \"loop-link-background\"\n })\n .attr(\"width\", function (d) {\n d.calculatedWidth = this.previousSibling.getBBox().width;\n return d.calculatedWidth + textPadding * 2;\n })\n .attr(\"height\", function (d) {\n d.calculatedHeight = this.previousSibling.getBBox().height;\n return d.calculatedHeight + textPadding;\n })\n .attr(\"transform\", function (d) {\n // offset rect by the same amount as text (besides the padding)\n var translateX = textPadding - mainClassSize / 2 * (d.propertyType === \"objectLeft\" ? 1 : -1);\n if (d.propertyType === \"objectLeft\") {\n translateX += d.calculatedWidth;\n }\n return \"translate(-\" + translateX + \",-\" + (textPadding + d.calculatedHeight / 2) + \")\";\n })\n .on(\"click\", function (event) {\n event.stopPropagation();\n });\n\n\n var nodeGroup = svg.selectAll(\".node\")\n .data(nodes)\n .enter()\n .append(\"g\");\n\n var node = nodeGroup\n .filter(function (d) {\n return d.objectPropClassUri !== selectedRdfUri;\n })\n .append(\"circle\")\n .each(function (d) {\n var sel = d3.select(this);\n if (d.classPosition === \"main\") {\n sel.attrs({\n class: \"class-node\",\n r: mainClassSize\n })\n .attr(\"marker-end\", \"url(\" + $location.absUrl() + \"#loop-link)\");\n } else if (d.objectPropClassName === null) {\n sel.attrs({\n class: \"datatype-node\",\n r: datatypeSize\n });\n } else {\n sel.attrs({\n class: \"object-prop-node\",\n r: otherClassSize\n });\n }\n })\n .call(drag);\n\n\n function reloadDomainRangeGraphView(event, d, collapsed) {\n scope.$apply(function () {\n $rootScope.$broadcast('reloadDomainRangeGraphView', d, collapsed);\n });\n }\n\n d3.selectAll(\".object-prop-node\")\n .on(\"dblclick\", reloadDomainRangeGraphView);\n\n\n nodeGroup\n .filter(function (d) {\n return d.objectPropClassName && d.objectPropClassUri !== selectedRdfUri;\n })\n .append(\"text\")\n .attr(\"class\", function (d) {\n return d.classPosition + \"-class-label\";\n })\n .style(\"font-size\", labelFontSize)\n .text(function (d) {\n return d.objectPropClassName;\n })\n .on(\"click\", function (event, d) {\n $window.open(\"resource?uri=\" + encodeURIComponent(d.objectPropClassUri), \"_blank\");\n });\n\n var objectPropClassName = nodeGroup.select(\"text\");\n\n svg.select(\".class-node\")\n .each(function () {\n d3.select(this.parentNode)\n .append(\"text\")\n .attr(\"class\", \"rdf-class-label\")\n .style(\"font-size\", function (d) {\n return D3.Text.calcFontSize(classNodeLabel, mainClassSize)\n })\n .text(classNodeLabel)\n .on(\"click\", function () {\n $window.open(\"resource?uri=\" + encodeURIComponent(selectedRdfUri), \"_blank\");\n });\n });\n\n\n var rdfClassName = svg.select(\".class-node + text\"),\n classNode = d3.select(\".class-node\"),\n loopLinkBackgroundSel = d3.selectAll(\".loop-link-background\"),\n loopLinkPropertyName = d3.selectAll(\".loop-link-property-name\");\n\n propertyNames = d3.selectAll(\".property-name\");\n\n if (!angular.isUndefined(loopLink)) {\n var loopLinkBackgroundProps = [];\n\n loopLinkBackgroundSel.each(function (d, i) {\n var sel = d3.select(this);\n loopLinkBackgroundProps.push({\n idx: i,\n width: d.calculatedWidth,\n height: d.calculatedHeight\n });\n });\n }\n\n function tick(e) {\n var k = 8 * force.alpha();\n\n function pushEdgesToLeftAndRight(d) {\n if (d.propertyType === \"objectLeft\") {\n d.source.x -= 8 * k;\n d.source.y -= k / 9;\n } else {\n d.target.x += 8 * k;\n d.target.y -= k / 9;\n }\n }\n\n link\n .filter(function (d) {\n return d.objectPropNodeClassUri !== selectedRdfUri;\n })\n .attr(\"x1\", function (d) {\n return d.source.x;\n })\n .attr(\"y1\", function (d) {\n return d.source.y;\n })\n .attr(\"x2\", function (d) {\n return d.targetX;\n })\n .attr(\"y2\", function (d) {\n return d.targetY;\n })\n .each(function (d) {\n pushEdgesToLeftAndRight(d);\n\n // shortens the line to compensate for the circle at the target\n var angle = Math.atan2(d.target.y - d.source.y, d.target.x - d.source.x);\n d.targetX = d.target.x - Math.cos(angle) * d.targetRadius;\n d.targetY = d.target.y - Math.sin(angle) * d.targetRadius;\n });\n\n function positionLoopLink(d) {\n var loopTranslateX = d.x + mainClassSize * 0.96,\n loopTranslateY = d.y - mainClassSize / 5.7 - 5;\n loopLink.attr(\"transform\", \"rotate(270, \" + d.x + \",\" + d.y + \") translate(\" + loopTranslateX + \",\" + loopTranslateY + \")\");\n }\n\n function positionLoopLinkLabels(d) {\n function reposition(sel, i) {\n var foundLoopLinkBackgroundProps =\n $.grep(loopLinkBackgroundProps, function (obj) {\n return obj.idx == i;\n });\n var currentBackgroundHeight = 0;\n if (i > 0) {\n currentBackgroundHeight = parseFloat(2 * i * (foundLoopLinkBackgroundProps[0].height / 1.4));\n }\n\n var loopLinkLabelX = d.x,\n loopLinkLabelY = d.y - mainClassSize * 2.1 - currentBackgroundHeight;\n\n sel\n .attrs({\n x: loopLinkLabelX,\n y: loopLinkLabelY\n })\n .moveToFront();\n }\n\n /**\n * Create a \"View more\" label to depict that the are more reflexive link labels\n * left that could be seen in the side panel when clicking this label.\n *\n * @param labelSel\n * d3 selection of the text label\n * @param backgroundSel\n * d3 selection of the rectangle element background\n * @param predicatesLeft\n * number of predicates left that are collapsed\n */\n function createViewMorePredicatesLabel(labelSel, backgroundSel, predicatesLeft) {\n labelSel\n .classed(\"view-more-preds-label\", true)\n .text(predicatesLeft + \" predicates more ...\");\n if (this.nextSibling !== null) {\n backgroundSel\n .classed(\"view-more-preds-rect\", true);\n }\n }\n\n loopLinkPropertyName.each(function (dd, i) {\n var sel = d3.select(this);\n\n var predicatesLeft = loopLinkPropertyName.size() - NON_COLLAPSED_REFLEXIVE_LINK_LIMIT;\n if (predicatesLeft < 0) {\n reposition(sel, i);\n } else {\n if (i == 0 && !scope.collapseEdges && predicatesLeft > 1) {\n createViewMorePredicatesLabel(sel, d3.select(this.nextSibling), predicatesLeft);\n reposition(sel, i);\n }\n\n if (i < NON_COLLAPSED_REFLEXIVE_LINK_LIMIT) {\n reposition(sel, i);\n } else {\n sel.remove();\n }\n }\n });\n // loopLinkPropertyName.each(function (dd, i) {\n // var sel = d3.select(this);\n // if (i < NON_COLLAPSED_REFLEXIVE_LINK_LIMIT) {\n // reposition(sel, i);\n // } else if (i == NON_COLLAPSED_REFLEXIVE_LINK_LIMIT) {\n // createViewMorePredicatesLabel(sel, d3.select(this.nextSibling));\n // reposition(sel, i);\n // } else {\n // sel.remove();\n // }\n // });\n }\n\n function positionLoopLinkBackgrounds(d) {\n var loopLinkBackgroundY = d.x + mainClassSize * 2,\n loopLinkBackgroundX = d.y - mainClassSize / 1.9;\n\n function reposition(sel, i) {\n var foundLoopLinkBackgroundProps =\n $.grep(loopLinkBackgroundProps, function (obj) {\n return obj.idx == i;\n });\n if (i > 0) {\n loopLinkBackgroundY += parseFloat(i * (foundLoopLinkBackgroundProps[0].height / (i / 1.4)));\n }\n\n sel\n .attrs({\n transform: \"rotate(270, \" + d.x + \",\" + d.y + \") translate(\" + loopLinkBackgroundY + \",\" + loopLinkBackgroundX + \")\",\n width: foundLoopLinkBackgroundProps[0].height,\n height: foundLoopLinkBackgroundProps[0].width\n });\n }\n\n /**\n * Adjust new width of \"View more\" label background and add all reflexive link metadata the this\n * label in order to render them in the side panel.\n *\n * @param allLoopLinkEdges\n * all reflexive links to the current class\n */\n function adjustViewMorePredicatesLabel(allLoopLinkEdges) {\n var viewMoreTextWidth;\n d3.select(\".view-more-preds-label\")\n // make label bold to resemble a collapsed label\n .style(\"font-weight\", \"bold\")\n .each(function (d) {\n // attach all reflexive links to the \"view more\" collapsed predicate\n // because in non collapsed mode the backend does not provide them\n d.target.allEdges = allLoopLinkEdges;\n\n // calculate text width in pixels in order to adjust background width accordingly\n viewMoreTextWidth = this.getComputedTextLength();\n })\n .on(\"click\", onCollapsedPropertyNameClick);\n\n d3.select(\".view-more-preds-rect\")\n // we modify height property instead of width because they are reversed\n // when we repositioned loop link labels\n .attr(\"height\", viewMoreTextWidth + 2 * textPadding);\n }\n\n var allLoopLinkEdges = [];\n loopLinkBackgroundSel.each(function (dd, i) {\n allLoopLinkEdges.push(dd);\n if (i < NON_COLLAPSED_REFLEXIVE_LINK_LIMIT) {\n reposition(d3.select(this), i);\n } else {\n d3.select(this).remove();\n }\n });\n\n adjustViewMorePredicatesLabel(allLoopLinkEdges);\n }\n\n\n function centerClassNode(d) {\n if (!(window.ActiveXObject) && \"ActiveXObject\" in window) {\n Math.log10 = function (x) {\n return Math.log(x) / Math.LN10;\n };\n }\n var absDiff = classNode.attr(\"cx\") - width / 2,\n logOffset = Math.log10(Math.abs(absDiff)) * 0.5;\n d.x += absDiff > 0 ? -logOffset : logOffset;\n return d.x;\n }\n\n node\n .each(function (d) {\n if (d.classPosition === \"main\" && !angular.isUndefined(loopLink)) {\n positionLoopLink(d);\n positionLoopLinkLabels(d);\n positionLoopLinkBackgrounds(d);\n }\n\n if (d.objectPropClassUri !== selectedRdfUri) {\n d3.select(this)\n .attr(\"cx\", function (d) {\n // pushes the main class circle to the centre\n if (d.classPosition === \"main\") {\n return centerClassNode(d);\n }\n return d.x;\n })\n .attr(\"cy\", function (d) {\n return d.y;\n });\n }\n });\n\n\n rdfClassName\n .attr(\"x\", function (d) {\n return d.x;\n })\n .attr(\"y\", function (d) {\n return d.y;\n })\n .moveToFront();\n\n\n linkRect\n .filter(function (d) {\n return d.objectPropNodeClassUri !== selectedRdfUri;\n })\n .attr(\"x\", function (d) {\n if (d.target.x > d.source.x) {\n return (d.source.x + (d.target.x - d.source.x) / 2);\n } else {\n return (d.target.x + (d.source.x - d.target.x) / 2);\n }\n })\n .attr(\"y\", function (d) {\n if (d.target.y > d.source.y) {\n return (d.source.y + (d.target.y - d.source.y) / 2);\n } else {\n return (d.target.y + (d.source.y - d.target.y) / 2);\n }\n })\n .moveToFront();\n\n\n propertyNames\n .attr(\"x\", function (d) {\n if (d.target.x > d.source.x) {\n return (d.source.x + (d.target.x - d.source.x) / 2);\n } else {\n return (d.target.x + (d.source.x - d.target.x) / 2);\n }\n })\n .attr(\"y\", function (d) {\n if (d.target.y > d.source.y) {\n return (d.source.y + (d.target.y - d.source.y) / 2);\n } else {\n return (d.target.y + (d.source.y - d.target.y) / 2);\n }\n })\n .moveToFront();\n\n\n objectPropClassName\n .attr(\"x\", function (d) {\n if (d.classPosition === \"right\") {\n return d.x + otherClassSize * 1.2;\n } else {\n return d.x - otherClassSize * 1.2;\n }\n })\n .attr(\"y\", function (d) {\n return d.y;\n })\n .moveToFront();\n }\n\n force.on(\"tick\", tick)\n\n }\n });\n\n let isDragged = false;\n\n function dragStart(event, d) {\n force.stop();\n d.fx = event.x;\n d.fy = event.y;\n d3.select(this).classed(\"selected\", true);\n\n }\n\n // Update the subject (dragged node) position during drag.\n function dragged(event, d) {\n isDragged = true;\n\n force.alphaTarget(0).restart();\n d.fx = event.x;\n d.fy = event.y;\n }\n\n // Restore the target alpha so the simulation cools after dragging ends.\n // Unfix the subject position now that it’s no longer being dragged.\n function dragEnd(event, d) {\n d.fx = null;\n d.fy = null;\n d3.select(this).classed(\"selected\", false);\n if (isDragged) {\n force.alpha(0.2).restart();\n isDragged = false;\n } else {\n force.restart();\n }\n }\n\n }\n}\n"],"names":["domainRangeGraphDirective","$rootScope","$window","$repositories","GraphDataRestService","$location","LocalStorageAdapter","LSKeys","$timeout","toastr","ONTO_RED","ONTO_GREEN","ONTO_BLUE","NON_COLLAPSED_REFLEXIVE_LINK_LIMIT","restrict","template","scope","showPredicatesInfoPanel","selectedPredicate","collapseEdges","link","timer","width","mainClassSize","otherClassSize","datatypeSize","labelFontSize","basicArrowStrokeWidth","svg","d3","append","attr","on","force","drag","subject","d","event","stop","fx","x","fy","y","this","classed","isDragged","alpha","restart","alphaTarget","defs","attrs","id","viewBox","refX","refY","markerUnits","markerWidth","markerHeight","orient","fill","class","cssRules","SVG","Export","getCSSRules","$","imgSrc","generateBase64ImageSource","href","download","getActiveRepository","legendBackgroundWidth","legendBackgroundHeight","legendCellGroup","height","style","sourceX","targetX","legendTextX","legendLabelFontSize","classNodeTextY","cx","cy","r","text","classNodeY","objectNodeTextY","datatypeNodeY","datatypeNodeTextY","basicPropertyArrowY","x1","y1","x2","y2","absUrl","implicitPropArrowY","collapsedPropArrowY","generateLegend","selectedRdfUri","search","uri","classNodeLabel","name","collapsed","getDomainRangeData","success","response","status","headers","domainRangeGraphData","error","window","set","DOMAIN_RANGE_WENT_BACK","onpopstate","state","$broadcast","$watch","angular","isUndefined","DOMAIN_RANGE_COLLAPSE_EDGES","get","switchEdgeMode","remove","graph","_","cloneDeep","nodes","links","strength","distance","linkGroup","selectAll","data","enter","styleArrowsInCollapsedMode","sel","loopLink","loopLinkEdgeCount","each","objectPropNodeClassUri","propertyType","targetRadius","targetNodeEdgeCount","implicit","loopLinkSize","previousPropertyNameSelection","disableCollapsedPredicateLabelHightlighting","isEmptyObject","background","onCollapsedPropertyNameClick","previousSibling","stopPropagation","ready","bind","propertyNames","test","open","encodeURIComponent","linkRect","calculatedWidth","getBBox","textPadding","calculatedHeight","translateX","nodeGroup","node","filter","objectPropClassUri","classPosition","objectPropClassName","call","reloadDomainRangeGraphView","$apply","select","parentNode","D3","Text","calcFontSize","rdfClassName","classNode","loopLinkBackgroundSel","loopLinkPropertyName","loopLinkBackgroundProps","i","push","idx","tick","e","k","positionLoopLinkBackgrounds","loopLinkBackgroundY","loopLinkBackgroundX","allLoopLinkEdges","dd","foundLoopLinkBackgroundProps","grep","obj","parseFloat","transform","reposition","viewMoreTextWidth","target","allEdges","getComputedTextLength","adjustViewMorePredicatesLabel","source","targetY","pushEdgesToLeftAndRight","angle","Math","atan2","cos","sin","loopTranslateX","loopTranslateY","positionLoopLink","currentBackgroundHeight","loopLinkLabelX","loopLinkLabelY","moveToFront","predicatesLeft","size","labelSel","backgroundSel","nextSibling","createViewMorePredicatesLabel","positionLoopLinkLabels","ActiveXObject","log10","log","LN10","absDiff","logOffset","abs","centerClassNode","renderDomainRangeGraph","$on","cancel","module","constant","directive","$inject"],"ignoreList":[],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const __webpack_esm_id__=39518;export const __webpack_esm_ids__=[14319,39518,49342,78618];export const __webpack_esm_modules__={14319(e,t,n){n.d(t,{Ds:()=>r,VH:()=>i,nj:()=>s,vH:()=>o});const r=[{id:"empty",name:"No inference"},{id:"rdfs-optimized",name:"RDFS (Optimized)"},{id:"rdfs",name:"RDFS"},{id:"rdfsplus-optimized",name:"RDFS-Plus (Optimized)"},{id:"owl-horst-optimized",name:"OWL-Horst (Optimized)"},{id:"owl-horst",name:"OWL-Horst"},{id:"owl2-ql-optimized",name:"OWL2-QL (Optimized)"},{id:"owl2-ql",name:"OWL2-QL"},{id:"owl-max-optimized",name:"OWL-Max (Optimized)"},{id:"owl-max",name:"OWL-Max"},{id:"owl2-rl-optimized",name:"OWL2-RL (Optimized)"},{id:"owl2-rl",name:"OWL2-RL"}],i={graphdbRepo:"graphdb",free:"free",eeWorker:"worker",eeMaster:"master",ontop:"ontop",se:"se",fedx:"fedx"},o=new RegExp("^[a-zA-Z0-9-_]+$"),s=new RegExp("^[0-9]+$")},19935(e,t,n){n.d(t,{A:()=>s}),n(62979);var r=n(93462);const i={dispatch:r.dispatch,pointer:r.pointer};var o=o||{};o.Text=function(){function e(e,t,n,r){n=n||10;var i=t/3;return"string"==typeof e?(i*=10/(e.substring(0,t/3).length+1.5),i+=1,e.match(/[\u0900-\u0DFF\u1100-\u11FF\u2E80-\u2EFF\u3000-\u9FFF]/)&&(i*=.6),i<n&&(i=n),Math.round(i)):(i<n&&(i=n),Math.round(i))}return{calcFontSizeRaw:e,calcFontSize:function(t,n,r,i){return e(t,n,r)+"px"},getTextWithElipsisIfNeeded:function(e,t){return"string"==typeof e&&e.length>t?e.substring(0,t-3)+"...":e}}}(),o.Transition={fadeIn:function(e,t){e.style("opacity",0).transition().duration(t).style("opacity",1)},fadeOut:function(e,t){e.style("opacity",1).transition().duration(t).style("opacity",0)}},o.Click=function(){function e(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}return{delayDblClick:function(){var t=i.dispatch("click","dblclick");return function(t,n){let r,i=1,o=arguments.length;for(;++i<o;)r=arguments[i],t[r]=e(t,n,n[r]);return t}(function(e){var n,r=null;e.on("mousedown",function(){n=i.pointer(document.body),new Date}),e.on("mouseup",function(e,o){var s,a,c;a=n,c=i.pointer(document.body),Math.sqrt(Math.pow(a[0]-c[0],2),Math.pow(a[1]-c[1],2))>5||(r?(window.clearTimeout(r),r=null,t.call("dblclick",e,e,o)):r=window.setTimeout((s=e,function(){t.call("click",s,s,o),r=null}),250))})},t,"on")}}}();const s=o},39518(e,t,n){n(82493),n(96e3),n(18148);var r=n(19935),i=n(75468),o=n(93462),s=(n(32150),n(14319)),a=n(78618),c=n(6418),l=n(72155),d=n(57154);function p(e,t,n,p,u,f,h,g,m,y,v,x,S,I,w,k,L,b,C,T,N,P){const A=(0,d.service)(d.SecurityContextService),M=(0,d.service)(d.RepositoryContextService);e.languageChanged=!1,e.propertiesObj={},e.propertiesObj.items=[],e.propertiesQueryObj={},e.propertiesQueryObj.query="",e.propertiesSearchPlaceholder=C.instant("visual.search.instance.placeholder"),e.propertiesNotFiltered=[],e.searchVisible=!1,e.nodeSelected=!1,e.queryResultsMode=!1,e.embedded=g.search().embedded,e.openedNodeInfoPanel=void 0,e.invalidLimit=!1,e.INVALID_LINKS_MSG=C.instant("sidepanel.invalid.limit.links.msg"),e.INVALID_LINKS_TOOLTIP=C.instant("sidepanel.invalid.limit.links.tooltip"),e.datasource=void 0,e.adapterContainer={adapter:{remain:!0}},e.hasInitedRepository=!1,e.defaultSettings={linksLimit:20,includeInferred:!0,sameAsState:!0,truncateNodeLabels:!0,languages:["en"],showLinksText:!0,preferredTypes:[],rejectedTypes:[],preferredPredicates:[],rejectedPredicates:["http://dbpedia.org/property/logo","http://dbpedia.org/property/hasPhotoCollection","http://dbpedia.org/property/website","http://dbpedia.org/property/homepage","http://dbpedia.org/ontology/thumbnail","http://xmlns.com/foaf/0.1/depiction","http://xmlns.com/foaf/0.1/homepage","http://xmlns.com/foaf/0.1/mbox","http://dbpedia.org/ontology/wikiPage*","http://dbpedia.org/property/wikiPage*","http://factforge.net/*"],preferredTypesOnly:!1,preferredPredicatesOnly:!1,includeSchema:!0},e.saveSettings=_.cloneDeep(e.defaultSettings),e.defaultGraphConfig={id:"default",name:"Easy graph",startMode:"search"},t.key="",e.onopen=e.onclose=()=>angular.noop(),e.goToHome=()=>{z();const{config:e,...t}=g.search();g.path("/graphs-visualizations").search(t)},e.shouldShowSettings=()=>e.configLoaded&&e.configLoaded.id===e.defaultGraphConfig.id,e.shouldDisableSameAs=()=>{const t=$("#sameAsCheck");return e.settings&&!e.settings.includeInferred&&t.prop("checked")&&(t.prop("checked",!1),e.settings.sameAsState=!1),e.settings&&!e.settings.includeInferred},e.propertiesFilterFunc=t=>t.key.toLowerCase().indexOf(e.propertiesQueryObj.query.toLowerCase())>=0,e.toggleMoreInfo=e=>{angular.element(e.currentTarget).parent().next().toggle(200),angular.element(e.currentTarget).children("span").toggleClass("ri-arrow-down-s-line").toggleClass("ri-arrow-up-s-line")},e.copyToClipboard=e=>{v.openCopyToClipboardModal(e)},e.resetSettings=()=>{e.settings=_.cloneDeep(e.defaultSettings),e.validateLinksLimit(),B()},e.changeLimit=t=>{let n=e.settings.linksLimit+t;n<1&&(n=1),n>1e3&&(n=1e3),e.settings.linksLimit=n},e.validateLinksLimit=()=>{e.invalidLimit=!s.nj.test(e.settings.linksLimit)},e.showSettings=()=>{e.showInfoPanel=!0,e.showFilter=!0,e.showNodeInfo=!1,e.showPredicates=!1,e.saveSettings?e.settings=_.cloneDeep(e.saveSettings):e.settings=_.cloneDeep(e.defaultSettings),B()},e.updateSettings=()=>{e.invalidLimit?p.error(e.INVALID_LINKS_TOOLTIP,e.INVALID_LINKS_MSG):(e.saveSettings=e.settings,e.saveSettings.languages=_.map(e.saveSettings.languagesMap,function(e){return e.text}),e.saveSettings.preferredTypes=_.map(e.saveSettings.preferredTypesMap,function(e){return e.text}),e.saveSettings.rejectedTypes=_.map(e.saveSettings.rejectedTypesMap,function(e){return e.text}),e.saveSettings.preferredPredicates=_.map(e.saveSettings.preferredPredicatesMap,function(e){return e.text}),e.saveSettings.rejectedPredicates=_.map(e.saveSettings.rejectedPredicatesMap,function(e){return e.text}),e.rootNodeIri?U(e.rootNodeIri):e.queryResultsMode&&g.search().query?q(g.search().query,g.search().sameAs,g.search().inference):"query"===e.configLoaded.startMode&&X(e.configLoaded),F(),e.showInfoPanel=!1,e.showFilter=!1,I.set(w.GRAPHS_VIZ,e.saveSettings))},e.getGraphConfigs=t=>{L.getGraphConfigs().success(function(n){e.graphConfigs=n,t&&t()}).error(function(e){p.error(getError(e),C.instant("graphexplore.error.graph.configs.short.msg"))})},e.findConfigById=function(t){return t===e.defaultGraphConfig.id?e.defaultGraphConfig:$.grep(e.graphConfigs,function(e){return e.id===t})[0]},e.easyGraphSearch=t=>{e.configLoaded=e.defaultGraphConfig,e.openUri(t)},e.deleteConfig=t=>{v.openSimpleModal({title:C.instant("common.confirm"),message:C.instant("graphexplore.delete.graph",{configName:t.name}),warning:!0}).result.then(function(){L.deleteGraphConfig(t).success(function(){e.getGraphConfigs(),e.refreshSavedGraphs()}).error(function(e){p.error(getError(e),C.instant("graphexplore.error.cannot.delete.config"))})})},e.goToGraphConfig=e=>{const t={config:e.id,[d.REPOSITORY_ID_PARAM]:M.getSelectedRepository().id};j(t,{config:e}),z(),X(e)},e.replaceIRIWithPrefix=t=>{const n=e.namespaces,r=_.findLast(n,function(e){return 0===t.indexOf(e.uri)});return r?r.prefix+":"+t.substring(r.uri.length):t};const R=[];R.push(t.$on("$translateChangeSuccess",function(){e.INVALID_LINKS_MSG=C.instant("sidepanel.invalid.limit.links.msg"),e.INVALID_LINKS_TOOLTIP=C.instant("sidepanel.invalid.limit.links.tooltip"),e.propertiesSearchPlaceholder=C.instant("visual.search.instance.placeholder")})),R.push(N.onAutocompleteEnabledUpdated(t=>{e.isAutocompleteEnabled=t})),R.push(M.onSelectedRepositoryChanged(t=>{t?P.getNamespaces(t.id).then(t=>{e.repositoryNamespaces=t,e.namespaces=t.namespaces}).catch(e=>{const t=getError(e);p.error(t,C.instant("error.getting.namespaces.for.repo"))}):e.repositoryNamespaces=new c.u})),R.push(e.$on("repositoryIsSet",function(t,n){const r=n||{newRepo:!1};r.newRepo&&(e.hasInitedRepository=!1),me(!!r.newRepo),r.newRepo&&(z(),$(".graph-visualization svg").empty(),g.search().query&&(e.goToHome(),W()))})),R.push(t.$watch(()=>t.key,()=>{te=0,_.each(e.propertiesObj.items,function(e){t.key>e&&te++}),ne++})),R.push(e.$watch("propertiesObj.items",()=>{angular.isDefined(e.propertiesObj.items)&&e.propertiesObj.items.length>0&&u(function(){e.adapterContainer.adapter.reload()},500)}));let O=!1,E=0;function G(e){O&&e.stopPropagation()}document.addEventListener("keydown",G,!0),e.$on("$destroy",()=>{R.forEach(e=>e()),document.removeEventListener("keydown",G,!0),window.onpopstate=null});const j=(t,n)=>{e.embedded&&(t.embedded=!0),g.search(t),n.skipOnPopState=!0,g.state(n)},z=()=>{e.searchVisible=!1,e.nodeSelected=!1,e.configLoaded=null,e.queryResultsMode=!1,e.lastSavedGraphName=null,e.lastSavedGraphId=null,e.shared=!1,e.numberOfPinnedNodes=0,re={},ie=0},D=()=>T.isActive()?e.defaultSettings:e.saveSettings,F=()=>{D().showLinksText?o.selectAll("svg .link-wrapper text").style("display","block"):o.selectAll("svg .link-wrapper text").style("display","none")},B=()=>{e.settings.languagesMap=_.map(e.settings.languages,function(e){return{text:e}}),e.settings.preferredTypesMap=_.map(e.settings.preferredTypes,function(e){return{text:e}}),e.settings.rejectedTypesMap=_.map(e.settings.rejectedTypes,function(e){return{text:e}}),e.settings.preferredPredicatesMap=_.map(e.settings.preferredPredicates,function(e){return{text:e}}),e.settings.rejectedPredicatesMap=_.map(e.settings.rejectedPredicates,function(e){return{text:e}})},U=()=>{e.rootNodeIri&&e.$broadcast("onRootNodeChange",e.rootNodeIri)},W=()=>{g.search().query?(e.searchVisible=!1,e.queryResultsMode=!0,q(g.search().query,g.search().sameAs,g.search().inference)):e.$on("onRootNodeChange",function(t,n){e.loading=!0;const r=D();angular.isDefined(n)&&(e.rootNodeIri=n,b.getInstanceNode({iri:n,config:e.configLoaded?e.configLoaded.id:e.defaultGraphConfig.id,languages:e.shouldShowSettings()?r.languages:[],includeInferred:r.includeInferred,sameAsState:r.sameAsState}).then(function(t){e.nodeSelected=!0,e.searchVisible=!1,null===t.data.types&&(t.data.types="greyColor"),ge=new he;const n=ge.addNode(t.data,de/2,pe/2);le=ce,Ee(n,!0)}).catch(function(t){e.loading=!1,p.error(getError(t),C.instant("graphexplore.error.could.not.load.graph"))}))}),g.search().uri&&e.openUri(g.search().uri,!0),g.search().saved&&k.getSavedGraph(g.search().saved).success(function(t){e.loadSavedGraph(t)}).error(function(e){const t=getError(e);p.error(t,C.instant("graphexplore.error.could.not.open"))})},q=(t,n,r)=>{const i=D(),o=void 0===n?i.sameAsState:!0===n,s=void 0===r?i.includeInferred:!0===r;e.loading=!0,b.updateGraph({query:t,linksLimit:i.linksLimit,languages:e.shouldShowSettings()?i.languages:[],includeInferred:s,sameAsState:o}).then(function(e){Re(e)},function(t){e.loading=!1,p.error(getError(t.data),C.instant("graphexplore.error.cannot.load.graph"))})},K=(e,t)=>{const n=e.split(" ");return t?[n[0],n[1],n[2]].join(">"):[n[0],n[2]].join(">")},V=e=>[e.source.iri,e.target.iri].join(">"),H=e=>{if(e.isTriple){const t=document.getElementById((0,a.hK)(K(e.iri)));if(t&&void 0!==t.__data__.x)return t.__data__.x}return e.x},Z=e=>{if(e.isTriple){const t=document.getElementById((0,a.hK)(K(e.iri)));if(t&&void 0!==t.__data__.y)return t.__data__.y}return e.y},Q=e=>{const t=e.trim().split(" ");return`<<<${t[0]}> <${t[1]}> <${t[2]}>>>`},J=e=>{const t=e.source.isTriple?K(e.source.iri,!0):e.source.iri,n=e.target.isTriple?K(e.target.iri,!0):e.target.iri;return(0,a.hK)(`${t}>${n}>marker`)},Y=(e,t)=>{const n=t.map(t=>t[e]);return t.filter((t,r)=>n.indexOf(t[e])===r)},X=t=>{e.configLoaded=t,"search"===t.startMode?e.searchVisible=!0:"node"===t.startMode&&t.startIRI?u(function(){e.openUri(t.startIRI,!0)},0):"query"===t.startMode&&t.startGraphQuery&&(e.loading=!0,L.loadGraphForConfig(t,t.startQueryIncludeInferred,D().linksLimit,t.startQuerySameAs).then(function(e){Re(e)},function(t){e.loading=!1,p.error(getError(t),C.instant("graphexplore.error.graph.load"))}))},ee=function(){var t,n;g.search().config?(t=g.search().config,n=W,t===e.defaultGraphConfig.id?X(e.defaultGraphConfig):L.getConfig(t).then(e=>{X(e),n()}).catch(e=>{p.error(getError(e),C.instant("graphexplore.error.could.not.load.config",{configId:t}))})):g.search().query||g.search().uri?(X(e.defaultGraphConfig),W()):W()};S.onpopstate=function(t){t.state&&t.state.skipOnPopState||(z(),t.state&&(t.state.config?(X(t.state.config),t.state.uri&&e.openUri(t.state.uri,!0)):t.state.savedGraph&&e.loadSavedGraph(t.state.savedGraph,!0)))},e.embedded&&(g.search().query||g.search().uri||g.search().config||g.search().saved)&&(e.noGoHome=!0);let te=0,ne=0,re={},ie=0;const oe=16,se=o.zoom().scaleExtent([.1,10]);let ae;const ce=o.zoomIdentity.translate(0,-70).scale(1);se.on("zoom",function(e){T.isActive()||(le=e.transform,ae.attr("transform",le))});let le=ce;const de=1e3,pe=1e3;let ue,fe;function he(){this.nodes=[],this.links=[],this.tripleNodes=new Map,this.tripleLinksCopy=new Map,this.addNode=function(e,t,n){return e.x=t,e.y=n,this.nodes.push(e),e},this.computeConnectedness=function(){const e={},t={};_.each(this.links,function(n){const r=n.source.iri,i=n.target.iri,o=_.min([r,i])+"|"+_.max([r,i]);t[o]||(t[o]=1,e[r]=(e[r]||0)+1,e[i]=(e[i]||0)+1)}),_.each(this.links,function(t){e[t.source.iri]>1&&e[t.target.iri]>1?t.connectedness=Math.min(5,Math.max(e[t.source.iri],e[t.target.iri])-1):t.connectedness=0})},this.addAndMatchLinks=function(e){const t=this.nodes;Array.prototype.push.apply(this.links,function(e,t){return _.map(e,function(e){let n,r;n=e.isTripleSource?Fe(e.source):_.find(t,function(t){return t.iri===e.source}),r=e.isTripleTarget?Fe(e.target):_.find(t,function(t){return t.iri===e.target});const i={source:n,target:r,predicates:e.predicates};if(e.isTripleSource||e.isTripleTarget){const e=`${i.source.isTriple?K(i.source.iri):i.source.iri}>${i.target.isTriple?K(i.target.iri):i.target.iri}`;if(ge.tripleLinksCopy.has(e)){const t=ge.tripleLinksCopy.get(e);return t[0].predicates.push(...i.predicates),t.push(i),ge.tripleLinksCopy.set(e,t),null}ge.tripleLinksCopy.set(e,[i])}return i})}(e,t));for(const e of ge.tripleLinksCopy.keys())1===ge.tripleLinksCopy.get(e).length&&ge.tripleLinksCopy.delete(e);this.links=this.links.filter(e=>null!==e),this.computeConnectedness()};const t=function(e,t){return n(e,t).length};function n(e,t){return _.filter(t,function(t){return t.source.iri===e.iri||t.target.iri===e.iri})}this.countLinks=t,this.linksTypes=function(e,t){const r=n(e,t),i=_.map(r,function(t){return t.source.iri===e.iri?t.target.types:t.source.types});return _.uniq(_.flatten(i))},this.linksPredicates=function(e,t){const r=n(e,t),i=_.map(r,function(e){return e.predicates});return _.uniq(_.flatten(i))},this.removeTriples=function(e){const t=[];this.tripleNodes.size>0&&e.forEach(e=>{this.tripleNodes.has(e)&&(this.tripleNodes.delete(e),this.links=_.reject(this.links,function(n){const r=e.split(">"),i=K(n.source.iri),o=K(n.target.iri);if(i===e&&ge.tripleNodes.delete(o)){const e=o.split(">");t.push({source:e[0],target:e[1]})}const s=i===e||o===e||n.source.iri===r[0]&&n.target.iri===r[1];return s&&(ge.tripleLinksCopy.delete(`${i}>${o}`),ge.tripleLinksCopy.delete(`${o}>${i}`)),s}))}),t.forEach(e=>{this.links=_.reject(this.links,function(t){return t.source.iri===e.source&&t.target.iri===e.target})})},this.removeNode=function(n){const r=[];this.links=_.reject(this.links,function(e){const t=e.source.iri===n.iri||e.target.iri===n.iri;return t&&(e.target.isTriple&&r.push(K(e.target.iri)),e.source.isTriple||e.target.isTriple||r.push([e.source.iri,e.target.iri].join(">"))),t}),this.removeTriples(r);const i=this.links;this.nodes=_.reject(this.nodes,function(e){return 0===t(e,i)}),0===this.nodes.length&&(e.nodeSelected=!1),this.computeConnectedness()},this.removeNodeLeafLinks=function(e){const r=[];let i=this.links;this.links=_.reject(this.links,function(o){let s=o.source.iri===e.iri&&1===t(o.target,i)&&!o.target.isTriple||o.target.iri===e.iri&&1===t(o.source,i)&&!o.source.isTriple;if(!s){let r;if(o.source.iri!==e.iri||2!==t(o.target,i)||o.target.isTriple?o.target.iri!==e.iri||2!==t(o.source,i)||o.source.isTriple||(r=n(o.source,i)):r=n(o.target,i),!r)return!1;s=(r[0].source.iri===e.iri||r[0].target.iri)&&(r[1].source.iri===e.iri||r[1].target.iri)}return s&&(o.target.isTriple&&r.push(K(o.target.iri)),o.source.isTriple||o.target.isTriple||r.push([o.source.iri,o.target.iri].join(">"))),s}),this.removeTriples(r),i=this.links,this.nodes=_.reject(this.nodes,function(n){return 0===t(n,i)&&n.iri!==e.iri}),this.computeConnectedness()},this.addTriple=function(e,t,n){e.x=t,e.y=n,e.weight=0;const r=K(e.iri);if(this.tripleNodes.has(r)){const t=this.tripleNodes.get(r);t.push(e),this.tripleNodes.set(r,t)}else e.weight=10,this.tripleNodes.set(r,[e])},this.copyState=function(){const e=_.map(this.nodes,function(e){return{iri:e.iri,isTriple:e.isTriple,size:e.size,labels:_.cloneDeep(e.labels),types:_.cloneDeep(e.types),rdfRank:e.rdfRank,x:e.x,y:e.y,fixed:e.fixed}}),t=JSON.stringify(Array.from(this.tripleNodes.entries())),n=JSON.stringify(Array.from(this.tripleLinksCopy.entries()));return{nodes:e,links:_.map(this.links,function(e){return{source:e.source.iri,isTripleSource:e.source.isTriple,target:e.target.iri,isTripleTarget:e.target.isTriple,predicates:e.predicates}}),tripleNodes:t,tripleLinksCopy:n,colorIndex:ie,type2color:re,transform:le}},this.restoreState=function(t){e.nodeSelected=!0,e.searchVisible=!1,this.nodes=_.cloneDeep(t.nodes),this.tripleNodes=t.tripleNodes?new Map(JSON.parse(t.tripleNodes)):new Map,this.links=[],this.addAndMatchLinks(t.links),this.tripleLinksCopy=t.tripleLinksCopy?new Map(JSON.parse(t.tripleLinksCopy)):new Map,_.each(this.nodes,function(t){t.fixed&&e.numberOfPinnedNodes++}),angular.isDefined(t.colorIndex)&&angular.isDefined(t.type2color)&&(ie=t.colorIndex,re=_.cloneDeep(t.type2color)),angular.isDefined(t.transform)&&(le=o.zoomIdentity.translate(t.transform.x,t.transform.y).scale(t.transform.k)),Te()}}e.datasource={get:function(t,n,r){return y.initLazyList(t,n,r,te,e.propertiesObj.items)},revision:function(){return ne}},e.showInfoPanel=!1;let ge=new he;function me(t){!n.getActiveRepository()||e.hasInitedRepository&&!t||(e.hasInitedRepository=!0,t||e.getGraphConfigs(ee))}e.addedTag=function(t){return t.text.indexOf(":")<0?(p.warning(C.instant("graphexplore.absolute.prefixed.iri")),null):(t.text=function(e,t){if(!/^<?(http|urn).*>?/.test(e)){const n=e.split(":"),r=n[0],i=n[1];if(!angular.isUndefined(i)){const e=f.getNamespaceUriForPrefix(t,r);if(e)return e+i}}return e}(t.text,e.namespaces),e.pageslideExpanded=!0,t)},e.validateTag=function(e,t,n){if(e.text.indexOf(":")<0)return n?p.warning(C.instant("graphexplore.absolute.prefixed.iri.option"),t):p.warning(C.instant("graphexplore.absolute.prefixed.iri"),t),!1;const r=e.text.indexOf("*");if(r>=0){if(!n)return p.warning(C.instant("graphexplore.wildcards.not.allowed"),t),!1;if(r<e.text.length-1)return p.warning(C.instant("graphexplore.wildcards.last.char"),t),!1}return!0},e.getTagClass=function(e){return e.endsWith("*")?"tag-item-wildcard":null},e.getActiveRepository=function(){return n.getActiveRepository()},e.isLicenseValid=function(){return(0,d.service)(d.LicenseContextService).getLicenseSnapshot().valid};const ye=500,ve=1.75,xe=o.scaleLinear().domain([0,9]).range(["hsl(0, 100%, 75%)","hsl(360, 90%, 82%)"]).interpolate(o.interpolateHslLong),Se=o.scaleLinear().domain([0,9]).range(["hsl(180, 50%, 75%)","hsl(540, 40%, 82%)"]).interpolate(o.interpolateHslLong);e.getColor=function(e){angular.isUndefined(re[e])&&(re[e]=ie,ie++);const t=re[e];return t>39?"#c2c2c2":t%2==0?xe(t/2):Se(t/2)};const Ie=o.forceX(de/2).strength(.005),we=o.forceY(pe/2).strength(.005),ke=o.forceSimulation().force("x",Ie).force("y",we),Le=o.select(".main-container .graph-visualization").append("svg").attr("viewBox","0 0 "+de+" "+pe).attr("preserveAspectRatio","xMidYMid meet");let be=0,Ce=0;const _e=new function(){this.state=!1,this.setLoadingState=function(e){this.state=e},this.getLoadingState=function(){return this.state},this.init=function(e,t){o.select(t).append("circle").attr("cx",function(){return e.x}).attr("cy",function(){return e.y}).attr("class","loader-container").attr("r",function(){return e.size}).style("fill","fff").style("opacity","0.7"),o.select(t).append("image").attr("xlink:href","js/angular/templates/loader/ot-loader.svg?v=3.3.3-TR1").attr("x",function(){return e.x-e.size+5}).attr("y",function(){return e.y-e.size}).attr("width",function(){return 2*e.size}).attr("height",function(){return 2*e.size}).attr("class","node-loader")}};function Te(t){o.selectAll("svg g").remove(),o.selectAll(".d3-tip").remove(),o.selectAll(".menu-events").remove(),ae=Le.append("g").attr("class","nodes-container").attr("transform",function(){return angular.isDefined(le)&&!t?le:""});const n=(0,i.A)().attr("class","d3-tip").customPosition(function(){const e=ue.getBoundingClientRect();return{top:e.bottom+10+"px",left:e.left-30+"px"}}).html(function(t){let n="";return t.fixed&&(n+='<i class="ri-pushpin-line"></i> '),t.types.length>0?n+=t.types.map(t=>`<div> · ${e.replaceIRIWithPrefix(t)}</div>`).join(""):n+=`<i>${C.instant("visual.node.tooltip.no_types")}</i>`,n}),s=function(e){let t="";return t+=_.join(_.map(e.predicates,function(t,n){if(0===n)return Ue(t);if(n<10)return" · "+Ue(t);if(10===n){const t=function(e){return e.predicates.length-10}(e),n=t>1?t+" predicates":t+" predicate";return" · "+C.instant("graphexplore.tip.text",{textToShow:n})}}),""),t};let c,d;const f=(0,i.A)().attr("class","d3-tip").customPosition(function(e){const t=c.getBoundingClientRect(),n=function(e){const t=s(e),n=document.createElement("canvas").getContext("2d");return n.font="13px Arial",e.predicates.length<10?n.measureText(t).width:n.measureText(t).width/2}(e);return{top:t.top-30+"px",left:t.left-30+"px",width:n+"px"}}).html(function(e){return s(e)});let h;const g=function(){u.cancel(h),u.cancel(be),ue=null,n.hide(),Ce=u(function(){Ge()},500)};Le.call(n),Le.call(f);let m=Le.selectAll(".link"),y=Le.selectAll(".node");const v=o.forceCollide(e=>e.size+5).strength(.5),x=o.forceManyBody().strength(-300),S=o.forceCenter(de/2,pe/2);ke.nodes(ge.nodes).force("charge",x).force("collide",v).force("center",S).force("link",o.forceLink(ge.links).distance(function(e){return e.source.isTriple||e.target.isTriple?0:function(e){const t=$("<span></span>"),n=e.predicates[0].split("/"),r=n[n.length-1];t.addClass("predicate-text").text(r),$("body").append(t);const i=t.width()+2*e.source.size+2*e.target.size+50;return t.remove(),.75*i}(e)+30*e.connectedness})),ae.append("defs").selectAll("marker").data(ge.links).enter().append("marker").attr("class","arrow-marker").attr("id",function(e){return J(e)}).attr("viewBox","0 -5 10 10").attr("refX",function(e){return e.target.isTriple?11:e.target.size+11}).attr("refY",0).attr("markerWidth",10).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M0,-5L10,0L0,5 L10,0 L0, -5"),m=ae.selectAll(".link").data(ge.links).enter().append("g").attr("class","link-wrapper").attr("id",function(e){return(0,a.hK)(V(e))}).append("line").attr("class","link").style("stroke-width",1).style("fill","transparent").style("marker-end",function(e){return`url(#${J(e)})`});const I=ae.selectAll(".link-wrapper").append("text").text(function(e){return Be(e)}).attr("class",function(e){return e.predicates.length>1||ge.tripleNodes.has(V(e))?"predicates":"predicate"}).attr("dy","-0.5em").style("text-anchor","middle").style("display",D().showLinksText?"":"none").on("mouseover",function(e,t){e.stopPropagation(),function(e,t){u.cancel(d);const n=c=e.target;u(function(){c===n&&t.predicates.length>1&&f.show(t,c)},300)}(e,t)}).on("mouseout",function(){u.cancel(d),c=null,f.hide()}).on("click",function(t,n){t.stopPropagation(),function(t,n){$e();const r=V(n);if(1===n.predicates.length&&ge.tripleNodes.has(r)){fe=null;const e=ge.tripleNodes.get(r)[0];if(Ae(e,t.currentTarget,t.button)){const t={};t.iri=e.iri,t.pred=Ue(e.iri.split(" ")[1]),ze(t)}return}!function(t){if(e.showNodeInfo=!1,e.showPredicates=t.predicates.length>1,e.showFilter=!1,e.showInfoPanel=!1,fe===t)return e.showNodeInfo=!1,e.showInfoPanel=!1,void(fe=null);fe=t,e.showPredicates&&(e.predicates=_.map(t.predicates,function(e){const n=function(e,t){const n=V(t);return ge.tripleNodes.has(n)?ge.tripleNodes.get(n).findIndex(t=>t.iri.indexOf(e)>=0):-1}(e,t),r=n>-1;return{value:Ue(e),partOfTriple:r,linkId:r?V(t):"",nodeIndex:n}}),e.showInfoPanel=!0)}(n)}(t,n)});let w,k=0,L=null,b=null;const N=function(t,n,r){const i=Array.isArray(r)?r[n]:r;ge.countLinks(t,ge.links)<=D().linksLimit?Ee(t,!1,i):p.info(C.instant("graphexplore.increase.limit"),C.instant("graphexplore.node.at.max")),e.closeInfoPanel()};function P(e,t){let n,r,i,o,s=!0;if("down"===t)n=2*e.size,r=e.size/3,i=.8,o=.3;else if("down-fixed"===t)n=2*e.size,r=e.size,i=.8,o=.66;else if("up"===t)n=e.size/3,r=2*e.size,i=.3,o=.8;else{if("fixed"!==t)return;n=e.size,i=.66,s=!1}let a=ae.selectAll(".node-wrapper").filter(function(t){return t===e}).append("text").text("").classed("icon-any pinned",!0).style("font-size",n+"px").attr("x",function(e){return e.x}).attr("y",function(e){return e.y}).attr("opacity",i);"fixed"!==t&&"down-fixed"!==t||(e.pin=a),s&&(a=a.transition().duration(1e3).style("font-size",function(){return r+"px"}).attr("opacity",o),"down-fixed"!==t&&a.remove())}const A=o.drag().subject(function(e){return e}).on("start",function(e,t){T.isActive()||0===e.sourceEvent.button&&(t.fixedBeforeDrag=t.fixed,t.isBeingDragged=!0,t.beginDragging=!0,Ge(),o.select(e.currentTarget).classed("dragging",!0),ke.alphaTarget(.3).restart())}).on("drag",function(t,n){n.isBeingDragged&&(n.fx=t.x,n.fy=t.y,n.fixed?n.beginDragging&&P(n,"fixed"):(e.numberOfPinnedNodes++,n.fixed=!0,P(n,"down-fixed")),n.pinWasFixed=!0,n.beginDragging=null)}).on("end",function(e,t){t.isBeingDragged&&(t.pinWasFixed&&(t.pinWasFixed=null,o.select(".pinned").remove()),t.isBeingDragged=!1,o.select(e.currentTarget).classed("dragging",!1)),ke.alphaTarget(0)});y=ae.selectAll(".node").data(ge.nodes).enter().append("g").attr("class","node-wrapper").attr("id",function(e){return e.iri}).append("circle").attr("class","node").attr("r",function(e){return e.size}).style("fill",function(t){return"greyColor"===t.types?"c2c2c2":e.getColor(t.types[0])}).on("mouseover",function(t,r){if(!r.isBeingDragged){u.cancel(Ce);const i=t.currentTarget;be=u(()=>{(function(t,n){return!e.showInfoPanel&&((Pe.closeIcon||Pe.expandIcon||Pe.focusIcon||Pe.copyURIIcon)&&Pe.removeIcons(),ke.alpha()<.1&&(Pe.initIcons(t,n.parentNode),ke.stop(),Ne(),!0))})(r,i)&&function(e,t){u.cancel(h);const r=ue=t.target;u(function(){ue===r&&n.show(e,ue)},300)}(r,t)},400)}}).on("mouseout",g).on("click",function(t,n){if(t.button&&0!==t.button)return;const r=t.currentTarget;if(L&&b===r)return u.cancel(L),L=null,void N(n,0,r.parentNode);b=r,g(),e.showPredicates=!1,T.isActive()||(u.cancel(L),L=u(function(){Ae(n,0,t),L=null},40+ye))}).on("touchstart",(e,t)=>function(e){k=0,w=u(function(){k<5&&Me(e),w=null},1e3)}(t)).on("touchmove",function(){k++}).on("touchend",function(){u.cancel(w),w=null}).on("contextmenu",function(t,r){t.shiftKey||(t.preventDefault(),Ge(),e.closeInfoPanel(),r.fixed?(e.numberOfPinnedNodes--,r.fixed=!1,r.fx=null,r.fy=null,P(r,"up"),ke.alpha(1).restart()):(e.numberOfPinnedNodes++,r.fixed=!0,P(r,"down")),function(e){ue&&n.show(e,ue)}(r))}).on("gdb-expand-node",(e,t)=>N(t,0,e.srcElement.parentNode)).on("gdb-show-node-info",(e,t)=>je(t)).call(A);const M=e.saveSettings.truncateNodeLabels?"hidden":"visible",R=ae.selectAll(".node-wrapper").append("foreignObject").style("pointer-events","none").style("overflow",M).attr("width",function(e){return 2*e.size*ve});ae.insert("g").attr("class","menu-events"),(t=>{t.each(function(e){e.fontSize=r.A.Text.calcFontSizeRaw(e.labels[0].label,e.size,oe,!0)}).attr("height",function(e){return 4.2*e.fontSize}).append("xhtml:div").attr("class","node-label-body").classed("truncated-label",e.saveSettings.truncateNodeLabels).style("font-size",function(e){return e.fontSize+"px"}).append("xhtml:div").html(function(e){return l.U.getText(e.labels[0].label).replaceAll("\n","<br>")})})(R),ke.on("tick",function(){m.attr("x1",function(e){return H(e.source)}).attr("y1",function(e){return Z(e.source)}).attr("x2",function(e){return H(e.target)}).attr("y2",function(e){return Z(e.target)}),I.attr("x",function(e){const t=H(e.source),n=H(e.target);return e.x=.5*(t+n)}).attr("y",function(e){const t=Z(e.source),n=Z(e.target);return e.y=.5*(t+n)}).attr("transform",function(e){return"rotate("+function(e,t){const n=H(e.source),r=Z(e.source),i=H(e.target),o=Z(e.target);if(t)return 180*Math.atan2(o-r,i-n)/Math.PI;{const e=180*Math.atan2(o-r,i-n)/Math.PI;return e<=90&&e>=-90?e:(e>0?-1:1)*(180-Math.abs(e))}}(e,e.direction)+", "+e.x+", "+e.y+")"}),y.attr("cx",function(e){return e.x}).attr("cy",function(e){return e.y}),ae.select(".node-loader").attr("x",function(e){return e.x-e.size+3}).attr("y",function(e){return e.y-e.size}),ae.select(".loader-container").attr("cx",function(e){return e.x}).attr("cy",function(e){return e.y}),R.attr("x",function(e){return e.x-e.size*ve}).attr("y",function(e){return e.y-4.2*e.fontSize/2}),o.select(".pinned").attr("x",function(e){return e.x}).attr("y",function(e){return e.y}),Ne()}),angular.isDefined(_e)&&_e.setLoadingState(!1),e.loading&&(e.loading=!1),o.selectAll(".link-wrapper").each(function(){const e=$(this).attr("id").split(">")[0],t=$(this).attr("id").split(">")[1];o.selectAll(".link").each(function(n){const r=(0,a.hK)(n.source.iri),i=(0,a.hK)(n.target.iri);if(r===t&&i===e){let e=r;e+=">",e+=i;const t=document.createTextNode(" ⟶");document.getElementById(e).lastChild.appendChild(t),n.direction="double"}})}),o.selectAll(".d3-actions-tip").remove(),ke.alpha(.3).restart()}function Ne(){t.d3alpha=ke.alpha()}const Pe=new function(){function n(e,t){return"translate("+(t.x-14+(t.size+15)*Math.cos(e*Math.PI/180-Math.PI/2))+","+(t.y-14+(t.size+15)*Math.sin(e*Math.PI/180-Math.PI/2))+")"}this.closeIcon=void 0,this.expandIcon=void 0,this.collapseIcon=void 0,this.focusIcon=void 0,this.copyURIIcon=void 0,this.actionsTip=void 0,this.removeIcons=function(){this.closeIcon.remove("g"),this.expandIcon&&this.expandIcon.remove("g"),this.collapseIcon&&this.collapseIcon.remove("g"),this.focusIcon.remove("g"),this.copyURIIcon.remove("g"),this.closeIcon=void 0,this.expandIcon=void 0,this.collapseIcon=void 0,this.focusIcon=void 0,this.copyURIIcon=void 0,this.expandedState=!1},this.expandedState=!1,this.initIcons=function(r,s){const a=(0,i.A)().attr("class","d3-tip d3-actions-tip").customPosition(function(e,t){const n=t.target.getBoundingClientRect();return{top:n.top-20+"px",left:n.right+10+"px"}}).html(function(e){return e});Le.call(a),r.isExpanded?(this.collapseIcon=o.select(".menu-events").append("g").attr("class","collapse-icon").attr("name","collapse").attr("transform",function(){return n(20,r)}),this.collapseIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.collapseIcon.append("path").attr("d","M22.67,12a.59.59,0,0,1-.53.65l-6.88.72H15.2a.59.59,0,0,1-.59-.65l.72-6.88A.58.58,0,0,1,16,5.33a.59.59,0,0,1,.53.65L16,11.11,21.3,5.79a.64.64,0,0,1,.91.91L16.89,12,22,11.49A.59.59,0,0,1,22.67,12ZM12.59,14.75l-6.75.85a.59.59,0,0,0-.51.66.58.58,0,0,0,.66.51l4.95-.62-5.2,5.2a.64.64,0,1,0,.91.91l5.2-5.2L11.23,22a.59.59,0,0,0,.51.66h.07a.59.59,0,0,0,.59-.52l.85-6.75a.59.59,0,0,0-.17-.49A.58.58,0,0,0,12.59,14.75Z").style("fill","var(--gw-primary-base)"),this.collapseIcon.on("click",function(){var e;(e=r).isExpanded=!1,ge.removeNodeLeafLinks(e),Te()}).on("mouseover",function(e){a.show(e.currentTarget.getAttribute("name"),e),u.cancel(be),u.cancel(Ce)}).on("mouseout",function(){a.hide(),Ce=u(function(){Ge()},500)})):(this.expandIcon=o.select(".menu-events").append("g").attr("class","expand-icon").attr("name","expand").attr("transform",function(){return n(20,r)}),this.expandIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.expandIcon.append("path").attr("d","M22.37,6.28l-.72,6.88a.59.59,0,0,1-.59.53H21a.59.59,0,0,1-.53-.65L21,7.9l-5.32,5.32a.64.64,0,0,1-.91-.91L20.1,7,15,7.53a.59.59,0,0,1-.12-1.18l6.88-.72a.59.59,0,0,1,.65.65ZM12.89,20.34,7.95,21l5.2-5.2a.64.64,0,0,0-.91-.91L7,20.05l.62-4.95A.59.59,0,0,0,6.48,15l-.85,6.75a.59.59,0,0,0,.59.67h.07L13,21.52a.59.59,0,1,0-.15-1.18Z").style("fill","var(--gw-primary-base)"),this.expandIcon.on("click",function(){Ee(r,!1,s)}).on("mouseover",function(e){a.show(e.currentTarget.getAttribute("name"),e),u.cancel(Ce),u.cancel(be)}).on("mouseout",function(){a.hide(),Ce=u(function(){Ge()},500)})),this.focusIcon=o.select(".menu-events").append("g").attr("class","focus-icon").attr("name","focus").attr("transform",function(){return n(20,r)}),this.focusIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.focusIcon.append("path").attr("d","M14.2,23.81a9.8,9.8,0,1,1,6.93-2.87h0A9.74,9.74,0,0,1,14.2,23.81Zm0-18.17a8.37,8.37,0,1,0,5.92,14.29h0A8.37,8.37,0,0,0,14.2,5.64Zm1.42,6.95a2,2,0,1,0,0,2.85A2,2,0,0,0,15.62,12.59Z").style("fill","var(--gw-primary-base)"),this.focusIcon.on("click",function(){t.$broadcast("onRootNodeChange",r.iri)}).on("mouseover",function(e){a.show(e.currentTarget.getAttribute("name"),e),u.cancel(Ce),u.cancel(be)}).on("mouseout",function(){a.hide(),Ce=u(function(){Ge()},500)}),this.copyURIIcon=o.select(".menu-events").append("g").attr("class","ri-links-line").attr("name","link").attr("transform",function(){return n(20,r)}),this.copyURIIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.copyURIIcon.append("path").attr("d","M 13.457031 10.164062 C 13.648438 10.164062 13.820312 10.242188 13.941406 10.363281 L 15.492188 11.859375 C 15.984375 12.332031 16.292969 12.992188 16.292969 13.714844 C 16.292969 14.441406 15.984375 15.097656 15.492188 15.574219 L 10.394531 20.496094 C 9.902344 20.972656 9.222656 21.265625 8.472656 21.265625 C 7.71875 21.265625 7.039062 20.972656 6.546875 20.496094 L 4.996094 19 C 4.507812 18.523438 4.203125 17.867188 4.203125 17.144531 C 4.203125 16.421875 4.507812 15.765625 4.996094 15.289062 L 7.542969 12.824219 C 7.667969 12.707031 7.84375 12.628906 8.035156 12.628906 C 8.417969 12.628906 8.726562 12.929688 8.726562 13.300781 C 8.726562 13.484375 8.648438 13.652344 8.523438 13.773438 L 5.976562 16.234375 C 5.738281 16.46875 5.589844 16.792969 5.589844 17.148438 C 5.589844 17.503906 5.738281 17.824219 5.976562 18.058594 L 7.527344 19.566406 C 7.773438 19.792969 8.105469 19.929688 8.472656 19.929688 C 8.835938 19.929688 9.167969 19.792969 9.414062 19.566406 L 14.511719 14.644531 C 14.753906 14.410156 14.90625 14.089844 14.90625 13.730469 C 14.90625 13.375 14.753906 13.054688 14.511719 12.820312 L 12.964844 11.324219 C 12.839844 11.203125 12.761719 11.039062 12.761719 10.855469 C 12.761719 10.488281 13.070312 10.1875 13.449219 10.1875 Z M 17.082031 3.976562 C 17.082031 3.976562 17.085938 3.976562 17.085938 3.976562 C 17.824219 3.976562 18.492188 4.261719 18.980469 4.722656 L 20.535156 6.203125 C 21.042969 6.679688 21.355469 7.34375 21.355469 8.082031 C 21.355469 8.792969 21.058594 9.441406 20.582031 9.914062 L 18.0625 12.402344 C 17.9375 12.527344 17.761719 12.605469 17.566406 12.605469 C 17.183594 12.605469 16.875 12.304688 16.875 11.9375 C 16.875 11.753906 16.949219 11.589844 17.070312 11.46875 L 19.605469 8.984375 C 19.847656 8.75 19.996094 8.429688 19.996094 8.070312 C 19.996094 7.714844 19.847656 7.394531 19.605469 7.160156 L 18.019531 5.667969 C 17.773438 5.445312 17.4375 5.304688 17.070312 5.300781 C 16.703125 5.304688 16.367188 5.453125 16.128906 5.691406 L 11.085938 10.667969 C 10.84375 10.898438 10.695312 11.222656 10.695312 11.578125 C 10.695312 11.933594 10.84375 12.257812 11.085938 12.488281 L 12.675781 13.980469 C 12.804688 14.101562 12.882812 14.273438 12.882812 14.457031 C 12.882812 14.828125 12.574219 15.128906 12.191406 15.128906 C 12.003906 15.128906 11.832031 15.054688 11.707031 14.9375 L 10.140625 13.457031 C 9.636719 12.980469 9.324219 12.316406 9.324219 11.582031 C 9.324219 10.863281 9.621094 10.214844 10.101562 9.742188 L 15.140625 4.765625 C 15.625 4.285156 16.304688 3.980469 17.054688 3.976562 Z M 17.082031 3.976562").style("fill","var(--gw-primary-base)"),this.copyURIIcon.on("click",function(){e.copyToClipboard(r.iri),Ge(),a.hide()}).on("mouseover",function(e){a.show("<div style='text-align: center;'><b>Copy to ClipBoard</b><br>"+r.iri+"</div>",e),u.cancel(Ce),u.cancel(be)}).on("mouseout",function(){a.hide(),Ce=u(function(){Ge()},500)}),this.closeIcon=o.select(".menu-events").append("g").attr("class","close-icon").attr("name","remove").attr("transform",function(){return n(20,r)}),this.closeIcon.append("circle").attr("cx",14).attr("cy",14).attr("r",13).style("fill","#eee"),this.closeIcon.append("path").attr("d","M14.94,14l5.87-5.87a.66.66,0,1,0-.94-.94L14,13.06,8.13,7.19a.66.66,0,0,0-.94.94L13.06,14,7.19,19.87a.66.66,0,1,0,.94.94L14,14.94l5.87,5.87a.66.66,0,1,0,.94-.94Z").style("fill","var(--gw-primary-base)"),this.closeIcon.on("click",function(){Me(r)}).on("mouseover",function(e){a.show(e.currentTarget.getAttribute("name"),e),u.cancel(Ce),u.cancel(be)}).on("mouseout",function(){a.hide(),Ce=u(function(){Ge()},500)}),this.animateMenu(r)},this.animateMenu=function(e){const t=100,r=o.easeSin;let i=0,s=20;this.expandIcon&&this.expandIcon.transition().duration(t).style("opacity",1).ease(r).attr("transform",function(){return n(s,e)}).delay(i+=35),this.collapseIcon&&this.collapseIcon.transition().duration(t).style("opacity",1).ease(r).attr("transform",function(){return n(s,e)}).delay(i+=35),this.copyURIIcon.transition().duration(t).style("opacity",1).ease(r).attr("transform",function(){return s+=30,n(s,e)}).delay(i+=35),this.focusIcon.transition().duration(t).style("opacity",1).ease(r).attr("transform",function(){return s+=30,n(s,e)}).delay(i+=35),this.closeIcon.transition().duration(t).style("opacity",1).ease(r).attr("transform",function(){return s+=30,n(s,e)}).delay(i+=35),this.expandedState=!0}};function Ae(n,r,i){return e.showInfoPanel=!1,e.showPredicates=!1,e.showNodeInfo=!1,i.shiftKey&&(i.ctrlKey||i.metaKey)?(t.$broadcast("onRootNodeChange",n.iri),!1):i.ctrlKey||i.metaKey?(Me(n),!1):void 0!==e.openedNodeInfoPanel&&e.openedNodeInfoPanel===n?(e.pageslideExpanded=!1,e.openedNodeInfoPanel=void 0,!1):(je(n),!0)}function Me(e){ge.removeNode(e),Te()}function Re(t){!function(t){e.nodeSelected=!0,null===t.data.types&&(t.data.types="greyColor"),ge=new he,le=ce}(t),Oe(t)}function Oe(t,n,r){let i=t.data;i=_.filter(i,function(e){return-1===_.findIndex(ge.links,function(t){return e.source===t.source.iri&&e.target===t.target.iri})});const o=[],s=ge.tripleLinksCopy.values();for(let e=0;e<ge.tripleLinksCopy.size;e++)s.next().value.forEach(e=>{o.push(e)});i=_.filter(i,function(e){return-1===_.findIndex(o,function(t){return e.source===t.source.iri&&e.target===t.target.iri})}),i=_.filter(i,function(e){return e.source!==e.target});const a=Y("iri",_.union(_.flatten(_.map(t.data,function(e){return[{iri:e.source,isTriple:e.isTripleSource},{iri:e.target,isTriple:e.isTripleTarget}]})))),c=_.map(ge.nodes,function(e){return{iri:e.iri,isTriple:Boolean(e.isTriple)}}),l=ge.tripleNodes.values();for(let e=0;e<ge.tripleNodes.size;e++)l.next().value.forEach(e=>{c.push({iri:e.iri,isTriple:e.isTriple})});const d=_.reject(a,function(e){return _.some(c,e)});if(0===d.length){const e=a.length>0?a.length-1:0;(r||0===i.length)&&p.info(C.instant("graphexplore.error.node.connections",{count:e})),ge.addAndMatchLinks(i),Te()}else{const t=[],r=[],o=D();_.forEach(d,function(n,i){t.push(b.getInstanceNode({iri:n.isTriple?Q(n.iri):n.iri,config:e.configLoaded.id,languages:e.shouldShowSettings()?o.languages:[],includeInferred:o.includeInferred,sameAsState:o.sameAsState}).then(function(e){r[i]=e.data}))}),h.all(t).then(function(){_.forEach(r,function(e,t){const i=2*Math.PI*t/r.length,o=(n?n.x:0)+Math.cos(i)*pe/3,s=(n?n.y:0)+Math.sin(i)*pe/3;e.isTriple?ge.addTriple(e,o,s):ge.addNode(e,o,s)}),ge.addAndMatchLinks(i),n&&(n.isExpanded=!0),Te()})}}function Ee(t,n,r){if(_e.getLoadingState())return;_e.init(t,r);const i=D(),o=t.iri;b.getInstanceNodeLinks({iri:o,linksLimit:i.linksLimit,includeInferred:i.includeInferred,config:e.configLoaded.id,preferredTypes:e.shouldShowSettings()?i.preferredTypes:[],rejectedTypes:e.shouldShowSettings()?i.rejectedTypes:[],preferredPredicates:e.shouldShowSettings()?i.preferredPredicates:[],rejectedPredicates:e.shouldShowSettings()?i.rejectedPredicates:[],preferredTypesOnly:e.shouldShowSettings()?i.preferredTypesOnly:[],preferredPredicatesOnly:e.shouldShowSettings()?i.preferredPredicatesOnly:[],languages:e.shouldShowSettings()?i.languages:[],sameAsState:i.sameAsState,includeSchema:i.includeSchema}).then(function(e){Oe(e,t,n)},function(t){const n=getError(t.data);p.error(n,C.instant("graphexplore.error.exploring.node")),e.loading=!1,_e.setLoadingState(!1)})}function Ge(){angular.isDefined(Pe)&&Pe.expandedState&&Pe.removeIcons()}function je(t){ke.stop(),e.openedNodeInfoPanel=t,e.showNodeInfo=!0,e.showFilter=!1,e.showPredicates=!1,e.nodeLabels=t.labels,e.nodeTypes=t.types,e.rdfRank=t.rdfRank,e.nodeIri=t.iri,e.resourceType=t.isTriple?"triple":"uri",e.encodedIri=t.isTriple?encodeURIComponent(Q(t.iri)):encodeURIComponent(t.iri),e.showInfoPanel=!0,e.rdfsLabel=t.labels[0].label,e.rdfsComment=t.comment,e.expanded=!1,e.propertiesQueryObj.query="",e.dataNodeKeysQuery="";const n=D();b.getProperties({iri:t.isTriple?Q(t.iri):t.iri,config:e.configLoaded.id,languages:e.shouldShowSettings()?n.languages:[],includeInferred:n.includeInferred,sameAsState:n.sameAsState,rejectedPredicates:e.shouldShowSettings()?n.rejectedPredicates:[]}).then(function(t){e.data=_.mapKeys(t.data,function(t,n){return e.replaceIRIWithPrefix(n)}),e.propertiesObj.items=[],_.forEach(e.data,function(t,n){e.propertiesObj.items.push({key:n,value:t})}),e.nodeImage=void 0,e.propertiesNotFiltered=e.propertiesObj.items;const n=_.find(e.propertiesObj.items,function(e){return"image"===e.key});n&&(e.nodeImage=n.value[0].v),e.propertiesObj.items=_.reject(e.propertiesObj.items,function(e){return"image"===e.key}),e.propertiesNotFiltered=e.propertiesObj.items},function(e){p.warning(getError(e.data),"Error")})}function ze(e){De("predicate","var(--gw-primary-dark)",e),De("predicates","var(--gw-primary-dark)",e);const t=document.getElementsByClassName("link");t&&_.each(t,function(t){const n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="var(--gw-primary-dark)",t.style.strokeWidth=4)});const n=document.getElementsByClassName("arrow-marker");n&&_.each(n,function(t){const n=t.__data__;(n.source.iri.indexOf(e.iri)>=0||n.target.iri.indexOf(e.iri)>=0)&&(t.style.stroke="var(--gw-primary-dark)",t.__data__.target.isTriple||t.setAttribute("refX","23"))})}function De(e,t,n){const r=document.getElementsByClassName(e);r&&_.each(r,function(e){const r=e.__data__;n?((r.source.iri.indexOf(n.iri)>=0||r.target.iri.indexOf(n.iri)>=0)&&(e.style.fill=t),K(n.iri)===V(r)&&(e.textContent=n.pred,e.style.fill=t),n.oppLinkIRI&&n.oppLinkIRI===V(r)&&(e.textContent=n.oppTriplePred,e.style.fill=t)):(e.style.fill=t,e.textContent=Be(r))})}function $e(){_.each(e.predicates,function(e){const t=document.getElementById(e.linkId+e.nodeIndex);t&&(t.style.fontWeight="normal")});const t=document.getElementsByClassName("link");t&&_.each(t,function(e){e.style.stroke="#999",e.style.strokeWidth=1}),De("predicate",""),De("predicates","");const n=document.getElementsByClassName("arrow-marker");n&&_.each(n,function(e){e.style.stroke="#999",e.__data__.target.isTriple||e.setAttribute("refX","59")})}function Fe(e){const t=K(e);if(ge.tripleNodes.has(t))return ge.tripleNodes.get(t).find(t=>t.iri===e)}function Be(e){return e.predicates.length>1?e.predicates.length+" predicates":Ue(e.predicates[0])}function Ue(t){const n=e.replaceIRIWithPrefix(t);return n.length===t.length?t.split("/")[t.split("/").length-1]:n}e.toggleSidePanel=function(){e.pageslideExpanded=!e.pageslideExpanded},e.closeInfoPanel=function(){e.pageslideExpanded=!1,e.openedNodeInfoPanel=void 0,e.predicates=[],fe=null,u(function(){e.showInfoPanel=!1})},e.clickLink=function(t){if(ge.tripleNodes.has(t.linkId)){$e();const n=ge.tripleNodes.get(t.linkId)[t.nodeIndex];je(n),e.showPredicates=!0;const r=document.getElementById(t.linkId+t.nodeIndex);r&&(r.style.fontWeight="bold");const i={},o=ge.tripleLinksCopy.values();for(let e=0;e<ge.tripleLinksCopy.size;e++){const e=o.next().value;e.length>1&&e.every(t=>t.source.iri===n.iri?(i.iri=e[0].source.iri,t.target.isTriple&&(i.oppLinkIRI=K(t.target.iri),i.oppTriplePred=Ue(t.target.iri.split(" ")[1])),i.pred=Ue(n.iri.split(" ")[1]),1===t.predicates.length&&(i.linkPred=t.predicates[0]),!1):t.target.iri!==n.iri||(i.iri=e[0].target.iri,t.source.isTriple&&(i.oppLinkIRI=K(t.source.iri),i.oppTriplePred=Ue(t.source.iri.split(" ")[1])),i.pred=Ue(n.iri.split(" ")[1]),1===t.predicates.length&&(i.linkPred=t.predicates[0]),!1))}i.iri||(i.iri=n.iri,i.pred=Ue(n.iri.split(" ")[1])),ze(i)}},e.splitPredicate=function(e){return e.split("/")[e.split("/").length-1]},e.getActiveRepository=function(){return n.getActiveRepository()},e.isLoadingLocation=function(){return n.isLoadingLocation()},e.hasActiveLocation=function(){return n.hasActiveLocation()},e.rotate=function(e){Ge();const t=10*(e?1:-1)*Math.PI/180,n=Math.cos(t),r=Math.sin(t),i=de/2,s=pe/2;o.selectAll(".node-wrapper").each(function(e){e.x=i+(n*(e.x-i)+r*(e.y-s)),e.y=s+(-r*(e.x-i)+n*(e.y-s)),e.fixed&&(e.fx=e.x,e.fy=e.y)}),ke.alpha(1).restart()},e.openUri=function(t,n){if(!n){const n={};e.configLoaded.id!==e.defaultGraphConfig.id&&(n.config=e.configLoaded.id),n.uri=t,n[d.REPOSITORY_ID_PARAM]=M.getSelectedRepository().id,j(n,{uri:t,config:e.configLoaded})}e.$broadcast("onRootNodeChange",t)},e.saveOrUpdateGraph=function(){const t=JSON.stringify(ge.copyState()),n={id:e.lastSavedGraphId,name:e.lastSavedGraphName,data:t,shared:e.shared,repositoryId:M.getSelectedRepository().id};n.id?e.saveGraphModal("update",n):e.saveGraphModal("new",n)},e.renameSavedGraph=function(t){e.saveGraphModal("rename",{id:t.id,name:t.name,config:t.config,shared:t.shared})};e.saveGraphModal=function(t,n,r){const i=x.open({templateUrl:"js/angular/graphexplore/templates/modal/save-graph.html",controller:"SaveGraphModalCtrl",resolve:{data:function(){return{mode:t,graph:n,graphExists:r,shared:n.shared}}}});E++,O=!0,i.result.then(function(t){if(t.restart)e.saveGraphModal(t.mode,t.graph,!1);else switch(t.mode){case"new":!function(t){e.configLoaded&&(t.config=e.configLoaded.id),k.addNewSavedGraph(t).success(function(n,r,i){e.lastSavedGraphName=t.name,e.lastSavedGraphId=i()["x-saved-graph-id"],e.shared=t.shared,e.refreshSavedGraphs(),p.success(C.instant("graphexplore.saved.graph",{name:t.name}))}).error(function(n,r){if(422===r)e.saveGraphModal("new",t,!0);else{const e=getError(n);p.error(e,C.instant("graphexplore.error.cannot.create.graph"))}})}(t.graph);break;case"update":case"rename":n=t.graph,k.editSavedGraph(n).success(function(){e.lastSavedGraphName=n.name,e.shared=n.shared,e.refreshSavedGraphs(),p.success(C.instant("graphexplore.saved.graph.was.edited",{name:n.name}))}).error(function(e){const t=getError(e);p.error(t,C.instant("graphexplore.error.cannot.edit"))})}var n}).finally(()=>{E--,E<=0&&(O=!1,E=0)})},e.refreshSavedGraphs=function(){k.getSavedGraphs().success(function(t){e.savedGraphs=t}).error(function(e){const t=getError(e);p.error(t,C.instant("graphexplore.error.getting.saved.graphs"))})},e.loadSavedGraph=function(t,n){t.owner?(e.lastSavedGraphName=t.name,e.lastSavedGraphId=t.id,e.shared=t.shared,e.configLoaded=e.findConfigById(t.config)):(e.lastSavedGraphName=null,e.lastSavedGraphId=null,e.shared=t.shared),e.configLoaded||(e.configLoaded=e.defaultGraphConfig);const r={...g.search(),saved:t.id,[d.REPOSITORY_ID_PARAM]:M.getSelectedRepository().id};ge.restoreState(JSON.parse(t.data)),n||j(r,{savedGraph:t})},e.copyToClipboardSavedGraph=function(t){const n=new URL(window.location.href);n.searchParams.set("saved",t.id),n.searchParams.set(d.REPOSITORY_ID_PARAM,M.getSelectedRepository().id),e.copyToClipboard(n.toString())},e.deleteSavedGraph=function(t){v.openSimpleModal({title:C.instant("common.confirm"),message:C.instant("graphexplore.confirm.delete.graph",{graphName:t.name}),warning:!0}).result.then(function(){!function(t){k.deleteSavedGraph(t).success(function(){e.refreshSavedGraphs(),p.success(C.instant("graphexplore.saved.graph.was.deleted",{name:t.name}))}).error(function(e){const t=getError(e);p.error(t,C.instant("graphexplore.error.cannot.delete"))})}(t)})},e.openIRI=function(t,n){return n.shiftKey?e.$broadcast("onRootNodeChange",t):window.open(t,"_blank"),!1},e.togglePinAllNodes=function(){Ge();const t=angular.isUndefined(e.numberOfPinnedNodes)||e.numberOfPinnedNodes<=0;e.numberOfPinnedNodes=0,o.selectAll(".node").each(function(n){n.fixed=t,t?(e.numberOfPinnedNodes++,n.fx=n.x,n.fy=n.y):(n.fx=null,n.fy=null)}),ke.alpha(1).restart()},$("body").on("keydown",function(t){!T.isActive()&&"input"!==t.target.nodeName&&e.nodeSelected&&(37===t.keyCode?e.rotate(!0):39===t.keyCode&&e.rotate(!1))}),e.getLiteralFromPropValue=function(e){return e.substring(e.indexOf(":")+1)};let We=!1;(()=>{if(!We){Le.append("rect").attr("width",10*de).attr("height",10*pe).attr("x",-(10*de-de)/2).attr("y",-(10*pe-pe)/2).style("fill","none").style("pointer-events","all").call(se).on("click",function(e){e.stopPropagation(),Ge(),ke.stop()});const e=e=>{e.preventDefault()};Le.node().addEventListener("wheel",e,{passive:!1}),R.push(()=>Le.node().removeEventListener("wheel",e)),We=!0}(t=>{const n=t.appSettings;e.defaultSettings.includeInferred=n.DEFAULT_INFERENCE,e.defaultSettings.sameAsState=n.DEFAULT_INFERENCE&&n.DEFAULT_SAMEAS,e.defaultSettings.includeSchema=n.DEFAULT_VIS_GRAPH_SCHEMA;const r=I.get(w.GRAPHS_VIZ);if(r&&"object"==typeof r)try{e.saveSettings=r,void 0===e.saveSettings.includeSchema&&(e.saveSettings.includeSchema=e.defaultSettings.includeSchema,e.saveSettings.rejectedPredicates=[...e.saveSettings.rejectedPredicates,...e.defaultSettings.rejectedPredicates].unique())}catch{e.saveSettings=_.cloneDeep(e.defaultSettings),I.set(w.GRAPHS_VIZ,e.saveSettings)}else e.saveSettings=_.cloneDeep(e.defaultSettings)})(A.getAuthenticatedUser()),me()})()}function u(e,t,n,r){switch(e.mode=n.mode,e.graph=_.cloneDeep(n.graph),e.graphExists=n.graphExists,e.mode){case"new":e.title=r.instant("graphexplore.create.new.graph"),e.okButtonText=r.instant("common.create.btn");break;case"update":e.title=r.instant("graphexplore.update"),e.okButtonText=r.instant("common.save.btn");break;case"rename":e.title=r.instant("graphexplore.rename"),e.okButtonText=r.instant("common.save.btn")}e.ok=function(){e.form.$valid&&(e.graph.name=i(e.graph.name),t.close({graph:e.graph,mode:e.mode}))},e.saveNew=function(){e.graph.name=i(e.graph.name)+" (new)",t.close({graph:e.graph,mode:"new",restart:!0})},e.cancel=function(){t.dismiss("cancel")};const i=e=>e.replace(/\s+/g," ").trim()}angular.module("graphdb.framework.graphexplore.controllers.graphviz",["ui.scroll.jqlite","ui.scroll","toastr","ui.bootstrap","ngTagsInput","graphdb.framework.utils.localstorageadapter","graphdb.core.services.workbench-context","graphdb.framework.core.services.rdf4j.repositories"]).controller("GraphsVisualizationsCtrl",p).controller("SaveGraphModalCtrl",u).config(["$uibTooltipProvider",function(e){e.options({appendToBody:!0})}]),p.$inject=["$scope","$rootScope","$repositories","toastr","$timeout","ClassInstanceDetailsService","$q","$location","$jwtAuth","UiScrollService","ModalService","$uibModal","$window","LocalStorageAdapter","LSKeys","SavedGraphsRestService","GraphConfigRestService","GraphDataRestService","$translate","GuidesService","WorkbenchContextService","RDF4JRepositoriesService"],u.$inject=["$scope","$uibModalInstance","data","$translate"]},62979(e,t,n){var r,i;r=[n(93462)],i=function(e){function t(e,t){return e.each(function(){var e=t.apply(this,arguments),n=select(this);for(var r in e)n.attr(r,e[r])})}function r(e,t){for(var n in t)e.attr(n,t[n]);return e}return void 0===e&&(e=n(93462)),e.selection.prototype.attrs=function(e){return("function"==typeof e?t:r)(this,e)},e.selection.prototype.moveToFront=function(){return this.each(function(){e.select(this.parentNode.appendChild(this))})},e.selection.prototype.moveToBack=function(){return this.each(function(){const e=this.parentNode.firstChild;e&&this.parentNode.insertBefore(this,e)})},e}.apply(t,r),void 0===i||(e.exports=i)},75468(e,t,n){n.d(t,{A:()=>o});var r=n(93462);const i={select:r.select,selection:r.selection},o=function(){var e=function(){return"n"},t=function(){return[0,0]},n=function(){return" "},r=u(),o=null,s=null,a=null,c=null;function l(e){var t;o="svg"===(t=(t=e).node()).tagName.toLowerCase()?t:t.ownerSVGElement,s=o.createSVGPoint(),document.body.appendChild(r)}l.show=function(){var r=Array.prototype.slice.call(arguments);r[r.length-1]instanceof SVGElement&&(a=r.pop());var i,o=n.apply(this,r),s=t.apply(this,r),u=e.apply(this,r),h=f(),g=p.length,m=document.documentElement.scrollTop||document.body.scrollTop,y=document.documentElement.scrollLeft||document.body.scrollLeft,v=c.apply(this,r);for(h.html(o).style("opacity",1).style("pointer-events","all");g--;)h.classed(p[g],!1);const x=r.filter(e=>e instanceof Event);return i=d.get(u).apply(this,x),v?Object.keys(v).forEach(function(e){h.style(e,v[e])}):h.classed(u,!0).style("top",i.top+s[0]+m+"px").style("left",i.left+s[1]+y+"px"),l},l.hide=function(){return f().style("opacity",0).style("pointer-events","none"),l},l.attr=function(e,t){if(arguments.length<2&&"string"==typeof e)return f().attr(e);var n=Array.prototype.slice.call(arguments);return i.selection.prototype.attr.apply(f(),n),l},l.style=function(e,t){if(arguments.length<2&&"string"==typeof e)return f().style(e);var n=Array.prototype.slice.call(arguments);return i.selection.prototype.style.apply(f(),n),l},l.direction=function(t){return arguments.length?(e=null==t?t:g(t),l):e},l.offset=function(e){return arguments.length?(t=null==e?e:g(e),l):t},l.html=function(e){return arguments.length?(n=null==e?e:g(e),l):n},l.customPosition=function(e){return arguments.length?(c=null==e?e:g(e),l):c},l.destroy=function(){return r&&(f().remove(),r=null),l};var d=new Map(Object.entries({n:function(e){var t=h(e);return{top:t.n.y-r.offsetHeight,left:t.n.x-r.offsetWidth/2}},s:function(e){var t=h(e);return{top:t.s.y,left:t.s.x-r.offsetWidth/2}},e:function(e){var t=h(e);return{top:t.e.y-r.offsetHeight/2,left:t.e.x}},w:function(e){var t=h(e);return{top:t.w.y-r.offsetHeight/2,left:t.w.x-r.offsetWidth}},nw:function(e){var t=h(e);return{top:t.nw.y-r.offsetHeight,left:t.nw.x-r.offsetWidth}},ne:function(e){var t=h(e);return{top:t.ne.y-r.offsetHeight,left:t.ne.x}},sw:function(e){var t=h(e);return{top:t.sw.y,left:t.sw.x-r.offsetWidth}},se:function(e){var t=h(e);return{top:t.se.y,left:t.e.x}}})),p=d.keys();function u(){var e=i.select(document.createElement("div"));return e.style("position","absolute").style("top",0).style("opacity",0).style("pointer-events","none").style("box-sizing","border-box"),e.node()}function f(){return null===r&&(r=u(),document.body.appendChild(r)),i.select(r)}function h(e){for(var t=a||e.target;void 0===t.getScreenCTM&&"undefined"===t.parentNode;)t=t.parentNode;var n={},r=t.getScreenCTM(),i=t.getBBox(),o=i.width,c=i.height,l=i.x,d=i.y;return s.x=l,s.y=d,n.nw=s.matrixTransform(r),s.x+=o,n.ne=s.matrixTransform(r),s.y+=c,n.se=s.matrixTransform(r),s.x-=o,n.sw=s.matrixTransform(r),s.y-=c/2,n.w=s.matrixTransform(r),s.x+=o,n.e=s.matrixTransform(r),s.x-=o/2,s.y-=c/2,n.n=s.matrixTransform(r),s.y+=c,n.s=s.matrixTransform(r),n}function g(e){return"function"==typeof e?e:function(){return e}}return l}},78618(e,t,n){n.d(t,{G4:()=>o,Sn:()=>s,hK:()=>i});var r=n(98980);const i=e=>e.replace(/[()']/g,""),o=e=>"string"==typeof e?"true"===e:Boolean(e),s=e=>e?(0,r.upperFirst)(e.toLowerCase()):e}};
|
|
2
|
-
//# sourceMappingURL=39518.1c641a7dc1c50a526845.bundle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"39874.710e94f211579215f997.bundle.js","mappings":"oNAKA,MASMA,EAAa,MAIfC,WAAAA,CAAYC,IACRC,EAAAA,EAAAA,GAAiBC,KAAMF,GAIvBE,KAAKC,uBAAwBC,EAAAA,EAAAA,SAAQC,EAAAA,uBACrCH,KAAKI,sBAAuBF,EAAAA,EAAAA,SAAQG,EAAAA,sBACpCL,KAAKM,0BAA2BJ,EAAAA,EAAAA,SAAQK,EAAAA,0BACxCP,KAAKQ,oBAAqBN,EAAAA,EAAAA,SAAQO,EAAAA,8BAClCT,KAAKU,oCAAqCR,EAAAA,EAAAA,SAAQS,EAAAA,oCAClDX,KAAKY,cAAeV,EAAAA,EAAAA,SAAQW,EAAAA,cAC5Bb,KAAKc,oCAAqCZ,EAAAA,EAAAA,SAAQa,EAAAA,oCAClDf,KAAKgB,WAAa,GAAGC,EAAAA,WAAWC,oBAAoBlB,KAAKQ,mBAAmBW,aAAanB,KAAKQ,mBAAmBY,SACjHpB,KAAKqB,qBAAuB,GAAGJ,EAAAA,WAAWC,oBAAoBlB,KAAKQ,mBAAmBW,aAAanB,KAAKQ,mBAAmBc,mBAC3HtB,KAAKuB,WAAa,CAACvB,KAAKgB,WAAYhB,KAAKqB,sBACzCrB,KAAKwB,iBAAkB,EACvBxB,KAAKyB,WAAazB,KAAK0B,uBACvB1B,KAAK2B,YAAa,EAClB3B,KAAK4B,YAAa,EAClB5B,KAAK6B,SAAU,EAOf7B,KAAK8B,cAAgB,IAAIC,EAAAA,iBACzB/B,KAAKgC,mBAAoB,EACzBhC,KAAKiC,oBAAuBC,KACuBhC,EAAAA,EAAAA,SAAQiC,EAAAA,wCAChBF,oBAAoBC,GAC3DlC,KAAKoC,iBAAiBF,EAAM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BS,EAAK1D,OACE8D,EAEsB,iBAAtBA,EAEHJ,EAAK1D,OAAS,EACP9G,KAAK0K,eAAeE,EAAmBJ,GAE3CI,OALX,CAQJ,CACAR,eAAAA,CAAgBH,EAAaP,GACzB,OAAIA,EACOA,EAAWmB,OAElB,CAACZ,EAAaa,IAAcjC,EAAkCkC,WAAWd,EAAaa,GAAYb,GAE/FA,CACX,CACA,iBAAOc,CAAWd,EAAaa,GAC3B,OAAOA,EAAYb,EAAYQ,MAAM,KAAKK,EAAUzI,SAAS2I,KAAKF,EAAUtC,OAASyB,CACzF,CACAgB,yBAAAA,GACIC,OAAOC,KAAKnL,KAAKiJ,6BAA6BlC,QAASqE,KACjCpL,KAAKiJ,4BAA4BmC,IAAc,IACvDrE,QAAS0C,GAAaA,EAASE,SAAS3J,KAAK+D,UAAUqH,EAAW3B,EAASC,eAE7F,CACAN,uBAAAA,GACIpJ,KAAKqL,2BAA6BrL,KAAK8I,uBAAuBwC,wBAAyBhB,IAC/EA,IACAtK,KAAKmK,cAAgBG,EACrBtK,KAAKiL,8BAGjB,CACAM,OAAAA,GACQvL,KAAKqL,4BACLrL,KAAKqL,4BAEb,EAEJ,MAAMvH,EAAqB,IAAI+E,C","sources":["webpack://root-config/./packages/shared-components/dist/esm/onto-layout.entry.js","webpack://root-config/./packages/shared-components/dist/esm/function-utils-D1ZpXQQS.js","webpack://root-config/./packages/shared-components/dist/esm/translation.service-nljGIprK.js"],"sourcesContent":["import { r as registerInstance, h, a as Host, g as getElement } from './index-CGqARDX4.js';\nimport { d as debounce } from './function-utils-D1ZpXQQS.js';\nimport { service, AuthenticationService, AuthorizationService, NavigationContextService, AuthenticationStorageService, RuntimeConfigurationContextService, EventService, ApplicationLifecycleContextService, StorageKey, SubscriptionList, LocalStorageSubscriptionHandlerService, WindowService, navigate, SecurityContextService, EventName } from '@ontotext/workbench-api';\nimport { T as TranslationService } from './translation.service-nljGIprK.js';\n\nconst RESPONSIVE_BREAKPOINTS = {\n MD: 768};\n/**\n * The width of the window in pixels at which the navbar should collapse.\n */\nconst WINDOW_WIDTH_FOR_COLLAPSED_NAVBAR = RESPONSIVE_BREAKPOINTS.MD;\n\nconst ontoLayoutCss = () => `:host{display:block;height:100%}.wb-layout{display:grid;grid-template:\"header header\" auto \"nav main\" 1fr \"nav footer\" auto/15rem minmax(200px, 1fr);min-height:100vh;margin:0;}.wb-layout.expanded{grid-template-columns:4.375rem 1fr}.wb-layout.is-embedded{grid-template-columns:1fr;grid-template-areas:\"main\";padding-top:1rem}.wb-layout.hide-navbar{grid-template:\"header\" auto \"main\" 1fr \"footer\" auto/1fr;}.wb-layout.hide-navbar.expanded{grid-template-columns:1fr}.wb-layout main .main-container{margin-left:0}.wb-layout .main-slot-wrapper .loader-wrapper{flex-grow:1;display:flex;align-items:center;justify-content:center}.wb-layout .main-slot-wrapper.loading{display:flex;flex-direction:column}.wb-layout .main-slot-wrapper.loading .page-content{visibility:hidden}.wb-layout .default-slot-wrapper{display:none}.wb-layout .wb-header{position:sticky;top:0;z-index:999}.wb-layout nav{grid-area:nav}.wb-layout header{grid-area:header}.wb-layout main{grid-area:main}.wb-layout footer{grid-area:footer}`;\n\nconst OntoLayout = class {\n // ========================\n // Lifecycle methods\n // ========================\n constructor(hostRef) {\n registerInstance(this, hostRef);\n // ========================\n // Services\n // ========================\n this.authenticationService = service(AuthenticationService);\n this.authorizationService = service(AuthorizationService);\n this.navigationContextService = service(NavigationContextService);\n this.authStorageService = service(AuthenticationStorageService);\n this.runtimeConfigurationContextService = service(RuntimeConfigurationContextService);\n this.eventService = service(EventService);\n this.applicationLifecycleContextService = service(ApplicationLifecycleContextService);\n this.fullJwtKey = `${StorageKey.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.jwtKey}`;\n this.fullAuthenticatedKey = `${StorageKey.GLOBAL_NAMESPACE}.${this.authStorageService.NAMESPACE}.${this.authStorageService.authenticatedKey}`;\n this.authEvents = [this.fullJwtKey, this.fullAuthenticatedKey];\n this.isLowResolution = false;\n this.showHeader = this.isAuthenticatedFully();\n this.showNavbar = false;\n this.isEmbedded = false;\n this.loading = true;\n // ========================\n // Private\n // ========================\n /**\n * List of subscriptions to manage component lifecycle\n * */\n this.subscriptions = new SubscriptionList();\n this.isNavbarCollapsed = false;\n this.handleStorageChange = (event) => {\n const localStorageSubscriptionHandlerService = service(LocalStorageSubscriptionHandlerService);\n localStorageSubscriptionHandlerService.handleStorageChange(event);\n this.handleAuthChange(event.key);\n };\n this.windowResizeObserver = debounce(() => this.windowResizeHandler(), 50);\n WindowService.getWindow().addEventListener('storage', this.handleStorageChange);\n }\n componentDidLoad() {\n this.windowResizeHandler();\n }\n connectedCallback() {\n this.subscribeToSecurityChanges();\n this.updateVisibility();\n this.subscribeToNavigationEnd();\n this.subscribeToRuntimeConfigurationChanges();\n this.subscribeToApplicationChange();\n }\n /**\n * Lifecycle method called when the component is about to be removed from the DOM.\n * Unsubscribes from all subscriptions to prevent memory leaks.\n */\n disconnectedCallback() {\n this.subscriptions.unsubscribeAll();\n }\n render() {\n return (h(Host, { key: 'b8cbbca1f12bf6af844e18397d2a725d6ab4e1fc', class: {\n 'wb-layout': true,\n 'is-embedded': this.isEmbedded,\n 'hide-navbar': !this.showNavbar\n } }, h(\"div\", { key: 'f2e3b7a238b82536bd7605196966bd758330c521', class: \"default-slot-wrapper\" }, h(\"slot\", { key: '5d391e2f612d9aead6c07b2ef3641b961eddc504', name: \"default\" })), !this.isEmbedded &&\n h(\"header\", { key: 'e43c5b68d590e12b2b3e95d4c414505f1fc82abb', class: \"wb-header\" }, this.showHeader && h(\"onto-header\", { key: '21102b279bed2dd3ee857b399683d14c5f3eaf57' })), !this.isEmbedded && this.showNavbar &&\n h(\"nav\", { key: '67dcbf444a30ac933ba83f86ae9f8d08fe5f995f', class: \"wb-navbar\" }, h(\"onto-navbar\", { key: 'a9816369cbbac4d5b58f607be61277d6074556bd', ref: this.assignNavbarRef(), \"navbar-collapsed\": this.isLowResolution })), h(\"div\", { key: 'f3ff0e1734eecc433dc20717e0b9f2871ea40dae', class: { 'main-slot-wrapper': true, 'loading': this.loading } }, this.loading && h(\"div\", { key: '17d9a8024d280f70ad8684e5d114c38b184b529d', class: \"loader-wrapper\" }, h(\"onto-loader\", { key: '534a5d8f89b92051822d1d7750ca56894013c142', size: 96, messageText: TranslationService.translate('common.loading') })), h(\"slot\", { key: 'bcd21d932551dc6f9b9365ccbbafae690f8b7245', name: \"main\" })), !this.isEmbedded &&\n h(\"footer\", { key: '9fcd224439dbb7fd35bb4c277dc343eccab40087', class: \"wb-footer\" }, h(\"onto-footer\", { key: '39d5d1c8275c527ca16aa74f6f15dc3f0cc3686c' })), h(\"onto-tooltip\", { key: '6a70e6d2d67e8a9aa6b8eda66b6768735c0f6dcd' })));\n }\n // ========================\n // Event Listeners\n // ========================\n /**\n * Event listener for the navbar toggled event. The layout needs to respond properly when the navbar is toggled in\n * order to fit the content.\n * @param event\n */\n onNavbarToggled(event) {\n this.isNavbarCollapsed = event.detail.payload;\n if (this.isNavbarCollapsed) {\n this.hostElement.classList.add('expanded');\n }\n else {\n this.hostElement.classList.remove('expanded');\n }\n }\n /**\n * Event listener for window resize event. We need to handle this in order to allow the navbar to collapse when the\n * window is resized.\n */\n onResize() {\n this.windowResizeObserver();\n }\n // ========================\n // Handlers\n // ========================\n windowResizeHandler() {\n this.isLowResolution = WindowService.getWindow().innerWidth <= WINDOW_WIDTH_FOR_COLLAPSED_NAVBAR;\n if (!this.isLowResolution && !this.isNavbarCollapsed) {\n this.hostElement.classList.remove('expanded');\n }\n else {\n this.hostElement.classList.add('expanded');\n }\n }\n handleAuthChange(changedKey) {\n var _a;\n if (!changedKey) {\n return;\n }\n if (this.authEvents.includes(changedKey)) {\n const authenticated = this.authStorageService.isAuthenticated();\n if (authenticated) {\n navigate((_a = this.navigationContextService.getPreviousRoute()) !== null && _a !== void 0 ? _a : './');\n }\n else {\n navigate('login');\n }\n WindowService.getWindow().location.reload();\n }\n }\n // ========================\n // Security & Permissions\n // ========================\n subscribeToSecurityChanges() {\n const securityContextService = service(SecurityContextService);\n this.subscriptions.add(securityContextService.onAuthenticatedUserChanged((authenticatedUser) => {\n this.authenticatedUser = authenticatedUser;\n this.updateVisibility();\n }));\n this.subscriptions.add(securityContextService.onSecurityConfigChanged((securityConfig) => {\n this.securityConfig = securityConfig;\n this.updateVisibility();\n }));\n this.subscriptions.add(this.eventService.subscribe(EventName.LOGIN, () => {\n this.setNavbarItemVisibility();\n this.updateVisibility();\n }));\n this.subscriptions.add(this.eventService.subscribe(EventName.LOGOUT, () => {\n this.setNavbarItemVisibility();\n this.updateVisibility();\n navigate('login');\n }));\n }\n subscribeToRuntimeConfigurationChanges() {\n this.subscriptions.add(this.runtimeConfigurationContextService.onRuntimeConfigurationChanged((config) => {\n var _a;\n this.isEmbedded = (_a = config === null || config === void 0 ? void 0 : config.isEmbedded) !== null && _a !== void 0 ? _a : false;\n }));\n }\n updateVisibility() {\n if (!this.authenticationService.isSecurityEnabled()) {\n this.showNavbar = true;\n this.showHeader = true;\n }\n else {\n this.showHeader = this.authenticationService.isAuthenticated() || this.authorizationService.hasFreeAccess();\n this.showNavbar = this.authenticationService.isAuthenticated() || this.authorizationService.hasFreeAccess();\n }\n }\n isAuthenticatedFully() {\n return !this.authenticationService.isSecurityEnabled() || this.authenticationService.isAuthenticated() || this.authorizationService.hasFreeAccess();\n }\n shouldShowMenu(role) {\n return this.isAuthenticatedFully() && this.authorizationService.hasRole(role);\n }\n // ========================\n // Navbar logic\n // ========================\n assignNavbarRef() {\n return (navbar) => {\n this.navbarRef = navbar;\n if (!this.navbarRef) {\n return;\n }\n this.navbarRef.menuItems = WindowService.getWindow().PluginRegistry.get('main.menu');\n this.setNavbarItemVisibility();\n };\n }\n setNavbarItemVisibility() {\n var _a, _b, _c;\n if (!((_a = this.navbarRef) === null || _a === void 0 ? void 0 : _a.menuItems)) {\n return;\n }\n // recursively check for children and set their shouldShow property\n const processItem = (item) => {\n var _a;\n item.shouldShow = this.shouldShowMenu(item.role);\n if ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) {\n item.children.forEach(processItem);\n }\n };\n (_c = (_b = this.navbarRef) === null || _b === void 0 ? void 0 : _b.menuItems) === null || _c === void 0 ? void 0 : _c.forEach(plugin => {\n plugin.items.forEach(processItem);\n });\n // Update the reference to trigger a re-render\n this.navbarRef.menuItems = [...this.navbarRef.menuItems];\n }\n subscribeToNavigationEnd() {\n this.subscriptions.add(this.eventService.subscribe(EventName.NAVIGATION_END, (navigationEndPayload) => {\n this.navigationContextService.updatePreviousRoute(navigationEndPayload.oldUrl);\n }));\n }\n subscribeToApplicationChange() {\n this.subscriptions.add(this.applicationLifecycleContextService.onApplicationStateBeforeChange((state) => {\n if (state) {\n this.loading = true;\n }\n }));\n this.subscriptions.add(this.applicationLifecycleContextService.onApplicationStateChange((state) => {\n if (state) {\n this.loading = false;\n }\n }));\n }\n get hostElement() { return getElement(this); }\n};\nOntoLayout.style = ontoLayoutCss();\n\nexport { OntoLayout as onto_layout };\n","function debounce(func, wait = 300) {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(() => func.apply(this, args), wait);\n };\n}\n\nexport { debounce as d };\n","import { Loggers, ServiceProvider, LanguageContextService } from '@ontotext/workbench-api';\n\nfunction sanitizeHTML(html) {\n const element = document.createElement('textarea');\n element.innerHTML = html;\n return element.value;\n}\n\nconst MODULE_NAME = 'SharedComponents';\n/**\n * Logger for the Shared Components module.\n */\nclass LoggerProvider {\n /**\n * Gets the logger instance for the Shared Components module.\n *\n * @returns LoggerService instance for the Shared Components module\n */\n static get logger() {\n return Loggers.getLoggerInstance(MODULE_NAME);\n }\n}\n\n/**\n * Service responsible for translation operations in the component.\n */\nclass TranslationServiceClassDefinition {\n constructor() {\n this.languageContextService = ServiceProvider.get(LanguageContextService);\n this.translationChangedObservers = {};\n this.logger = LoggerProvider.logger;\n // log with background color\n this.defaultBundle = this.languageContextService.getDefaultBundle();\n this.subscribeToBundleChange();\n }\n /**\n * Translates the <code>messageLabelKey</code> with <code>translationParameter</code> and call <code>translationCallback</code> with translation of current language.\n * The <code>translationCallback</code> is called upon subscription and whenever the selected language is changed.\n *\n * @param messageLabelKey - The label key for the translation.\n * @param translationParameter - Parameters, if needed, for translation.\n * @param translationCallback - A function to be called when translating the `messageLabelKey`.\n * @returns A function that, when called, unsubscribes the provided callback from further translation updates.\n */\n onTranslate(messageLabelKey, translationParameter = [], translationCallback = () => { }) {\n this.translationChangedObservers[messageLabelKey] = this.translationChangedObservers[messageLabelKey] || [];\n const observer = { parameters: translationParameter, callback: translationCallback };\n this.translationChangedObservers[messageLabelKey].push(observer);\n translationCallback(this.translate(messageLabelKey, translationParameter));\n return () => {\n const index = this.translationChangedObservers[messageLabelKey].indexOf(observer);\n if (index !== -1) {\n this.translationChangedObservers[messageLabelKey].splice(index, 1);\n }\n };\n }\n /**\n * Translates the provided key using the currently selected language by applying the parameters if\n * provided.\n * @param key The key for the label which needs to be translated.\n * @param parameters Optional parameters which to be applied during the translation.\n */\n translate(key, parameters) {\n return this.translateInLocale(key, parameters);\n }\n /**\n * Translates a given key into the specified locale. If parameters are provided,\n * they will be applied to the translation.\n *\n * @param key - The translation key, which can be dot-separated for nested translations.\n * @param parameters - Optional parameters to be substituted into the translation string.\n * @returns The translated string with parameters applied if available, or the key itself if not found.\n */\n translateInLocale(key, parameters) {\n // Attempt to retrieve the translation from the specified locale's bundle.\n let translation = this.translateFromBundle(this.currentBundle, key);\n // If not found, fall back to the default language bundle.\n if (!translation) {\n translation = this.translateFromBundle(this.defaultBundle, key);\n }\n // If translation was found, apply any parameters provided and return the result.\n if (translation) {\n translation = this.applyParameters(translation, parameters);\n return sanitizeHTML(translation);\n }\n this.logger.warn(`Missing translation for key: [${key}]`);\n return key;\n }\n /**\n * Retrieves a translation from a specified translation bundle using the given key.\n * If the key represents a nested JSON path, it attempts to resolve the key as such.\n *\n * @param bundle - The translation bundle for the specified locale.\n * @param key - The key to translate, which may be a simple key or dot-separated for nested keys.\n * @returns The translation string if found, or `undefined` if not available.\n */\n translateFromBundle(bundle, key) {\n if (!bundle) {\n return undefined;\n }\n // Try to retrieve the translation directly if it is defined as a whole string,\n // for instance as \"some_function.btn.label\".\n let translation = bundle[key];\n // If not found, attempt to retrieve the translation if it is defined as a JSON object.\n if (typeof translation !== 'string') {\n translation = this.translateAsJsonObject(bundle, key);\n }\n return translation;\n }\n /**\n * Resolves a nested translation key by treating it as a path in a JSON object.\n * For example, if the key is \"some.key.path\", this method will navigate through\n * the JSON object structure to retrieve the value at that path.\n *\n * @param bundle - The translation bundle containing nested keys.\n * @param key - The dot-separated key representing the path to the translation.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n translateAsJsonObject(bundle, key) {\n let path = key.split('.');\n return this.getTranslation(bundle, path);\n }\n /**\n * Recursively navigates through a JSON object based on a path array to retrieve\n * a translation string. Each element in the path array represents a nested key.\n *\n * @param jsonObject - The current JSON object or nested object being searched.\n * @param path - An array representing the path to the translation, where each element is a key.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n getTranslation(jsonObject, path) {\n // Stop the recursion if path or reach the inner element\n if (!path || !jsonObject) {\n return undefined;\n }\n const jsonOrTranslation = jsonObject[path.splice(0, 1)[0]];\n if (path.length === 0) {\n return jsonOrTranslation;\n }\n if (typeof jsonOrTranslation !== 'string') {\n // continue if the inner element is not reached.\n if (path.length > 0) {\n return this.getTranslation(jsonOrTranslation, path);\n }\n return jsonOrTranslation;\n }\n return undefined;\n }\n applyParameters(translation, parameters) {\n if (parameters) {\n return parameters.reduce(\n // replace all occurrence of parameter key with parameter value.\n (translation, parameter) => TranslationServiceClassDefinition.replaceAll(translation, parameter), translation);\n }\n return translation;\n }\n static replaceAll(translation, parameter) {\n return parameter ? translation.split(`{{${parameter.key}}}`).join(parameter.value) : translation;\n }\n notifyTranslationsChanged() {\n Object.keys(this.translationChangedObservers).forEach((eventName) => {\n const observers = this.translationChangedObservers[eventName] || [];\n observers.forEach((observer) => observer.callback(this.translate(eventName, observer.parameters)));\n });\n }\n subscribeToBundleChange() {\n this.languageChangeSubscription = this.languageContextService.onLanguageBundleChanged((bundle) => {\n if (bundle) {\n this.currentBundle = bundle;\n this.notifyTranslationsChanged();\n }\n });\n }\n destroy() {\n if (this.languageChangeSubscription) {\n this.languageChangeSubscription();\n }\n }\n}\nconst TranslationService = new TranslationServiceClassDefinition();\n\nexport { LoggerProvider as L, TranslationService as T, sanitizeHTML as s };\n"],"names":["OntoLayout","constructor","hostRef","registerInstance","this","authenticationService","service","AuthenticationService","authorizationService","AuthorizationService","navigationContextService","NavigationContextService","authStorageService","AuthenticationStorageService","runtimeConfigurationContextService","RuntimeConfigurationContextService","eventService","EventService","applicationLifecycleContextService","ApplicationLifecycleContextService","fullJwtKey","StorageKey","GLOBAL_NAMESPACE","NAMESPACE","jwtKey","fullAuthenticatedKey","authenticatedKey","authEvents","isLowResolution","showHeader","isAuthenticatedFully","showNavbar","isEmbedded","loading","subscriptions","SubscriptionList","isNavbarCollapsed","handleStorageChange","event","LocalStorageSubscriptionHandlerService","handleAuthChange","key","windowResizeObserver","debounce","windowResizeHandler","WindowService","getWindow","addEventListener","componentDidLoad","connectedCallback","subscribeToSecurityChanges","updateVisibility","subscribeToNavigationEnd","subscribeToRuntimeConfigurationChanges","subscribeToApplicationChange","disconnectedCallback","unsubscribeAll","render","h","Host","class","name","ref","assignNavbarRef","size","messageText","TranslationService","translate","onNavbarToggled","detail","payload","hostElement","classList","add","remove","onResize","innerWidth","changedKey","_a","includes","isAuthenticated","navigate","getPreviousRoute","location","reload","securityContextService","SecurityContextService","onAuthenticatedUserChanged","authenticatedUser","onSecurityConfigChanged","securityConfig","subscribe","EventName","LOGIN","setNavbarItemVisibility","LOGOUT","onRuntimeConfigurationChanged","config","isSecurityEnabled","hasFreeAccess","shouldShowMenu","role","hasRole","navbar","navbarRef","menuItems","PluginRegistry","get","_b","_c","processItem","item","shouldShow","children","length","forEach","plugin","items","NAVIGATION_END","navigationEndPayload","updatePreviousRoute","oldUrl","onApplicationStateBeforeChange","state","onApplicationStateChange","getElement","style","func","wait","timer","args","clearTimeout","setTimeout","apply","sanitizeHTML","html","element","document","createElement","innerHTML","value","LoggerProvider","logger","Loggers","getLoggerInstance","TranslationServiceClassDefinition","languageContextService","ServiceProvider","LanguageContextService","translationChangedObservers","defaultBundle","getDefaultBundle","subscribeToBundleChange","onTranslate","messageLabelKey","translationParameter","translationCallback","observer","parameters","callback","push","index","indexOf","splice","translateInLocale","translation","translateFromBundle","currentBundle","applyParameters","warn","bundle","translateAsJsonObject","path","split","getTranslation","jsonObject","jsonOrTranslation","reduce","parameter","replaceAll","join","notifyTranslationsChanged","Object","keys","eventName","languageChangeSubscription","onLanguageBundleChanged","destroy"],"ignoreList":[],"sourceRoot":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"45758.1212136a37dd4f7528f8.bundle.js","mappings":"2MAIA,MAEMA,EAAiB,MACnBC,WAAAA,CAAYC,IACRC,EAAAA,EAAAA,GAAiBC,KAAMF,GACvBE,KAAKC,8BAAgC,KAIrCD,KAAKE,sBAAwB,EACjC,CACAC,iBAAAA,GACIH,KAAKC,8BAAgCG,EAAAA,EAAmBC,YAAYL,KAAKM,SAAUN,KAAKE,sBAAwBK,GAAoBP,KAAKO,gBAAkBA,EAC/J,CACAC,oBAAAA,GACQR,KAAKC,gCACLD,KAAKC,gCACLD,KAAKC,8BAAgC,KAE7C,CACAQ,MAAAA,GACI,OAAQC,EAAAA,EAAAA,GAAEC,EAAAA,EAAM,CAAEC,IAAK,4CAA8CZ,KAAKO,gBAC9E,GAEJX,EAAeiB,MAxBiB,uB,+DCFhC,SAASC,EAAaC,GAClB,MAAMC,EAAUC,SAASC,cAAc,YAEvC,OADAF,EAAQG,UAAYJ,EACbC,EAAQI,KACnB,CAMA,MAAMC,EAMF,iBAAWC,GACP,OAAOC,EAAAA,QAAQC,kBAXH,mBAYhB,EAMJ,MAAMC,EACF5B,WAAAA,GAC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GAEvB,IAAKA,IAASG,EACV,OAEJ,MAAMC,EAAoBD,EAAWH,EAAKT,OAAO,EAAG,GAAG,IACvD,OAAoB,IAAhBS,EAAKK,OACED,EAEsB,iBAAtBA,EAEHJ,EAAKK,OAAS,EACP1D,KAAKuD,eAAeE,EAAmBJ,GAE3CI,OALX,CAQJ,CACAR,eAAAA,CAAgBH,EAAaR,GACzB,OAAIA,EACOA,EAAWqB,OAElB,CAACb,EAAac,IAAcnC,EAAkCoC,WAAWf,EAAac,GAAYd,GAE/FA,CACX,CACA,iBAAOe,CAAWf,EAAac,GAC3B,OAAOA,EAAYd,EAAYQ,MAAM,KAAKM,EAAUhD,SAASkD,KAAKF,EAAUxC,OAAS0B,CACzF,CACAiB,yBAAAA,GACIC,OAAOC,KAAKjE,KAAK8B,6BAA6BoC,QAASC,KACjCnE,KAAK8B,4BAA4BqC,IAAc,IACvDD,QAAS7B,GAAaA,EAASE,SAASvC,KAAKyC,UAAU0B,EAAW9B,EAASC,eAE7F,CACAL,uBAAAA,GACIjC,KAAKoE,2BAA6BpE,KAAK0B,uBAAuB2C,wBAAyBlB,IAC/EA,IACAnD,KAAKgD,cAAgBG,EACrBnD,KAAK+D,8BAGjB,CACAO,OAAAA,GACQtE,KAAKoE,4BACLpE,KAAKoE,4BAEb,EAEJ,MAAMhE,EAAqB,IAAIqB,C","sources":["webpack://root-config/./packages/shared-components/dist/esm/translate-label.entry.js","webpack://root-config/./packages/shared-components/dist/esm/translation.service-nljGIprK.js"],"sourcesContent":["import { r as registerInstance, h, a as Host } from './index-CGqARDX4.js';\nimport { T as TranslationService } from './translation.service-nljGIprK.js';\nimport '@ontotext/workbench-api';\n\nconst translateLabelCss = () => `:host{display:inline}`;\n\nconst TranslateLabel = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.unsubscribeTranslationChanged = null;\n /**\n * Represents an array of translation parameters.\n */\n this.translationParameters = [];\n }\n connectedCallback() {\n this.unsubscribeTranslationChanged = TranslationService.onTranslate(this.labelKey, this.translationParameters, (translatedLabel) => this.translatedLabel = translatedLabel);\n }\n disconnectedCallback() {\n if (this.unsubscribeTranslationChanged) {\n this.unsubscribeTranslationChanged();\n this.unsubscribeTranslationChanged = null;\n }\n }\n render() {\n return (h(Host, { key: '6f43411609ffbb55a072585c7c1bdd149422b066' }, this.translatedLabel));\n }\n};\nTranslateLabel.style = translateLabelCss();\n\nexport { TranslateLabel as translate_label };\n","import { Loggers, ServiceProvider, LanguageContextService } from '@ontotext/workbench-api';\n\nfunction sanitizeHTML(html) {\n const element = document.createElement('textarea');\n element.innerHTML = html;\n return element.value;\n}\n\nconst MODULE_NAME = 'SharedComponents';\n/**\n * Logger for the Shared Components module.\n */\nclass LoggerProvider {\n /**\n * Gets the logger instance for the Shared Components module.\n *\n * @returns LoggerService instance for the Shared Components module\n */\n static get logger() {\n return Loggers.getLoggerInstance(MODULE_NAME);\n }\n}\n\n/**\n * Service responsible for translation operations in the component.\n */\nclass TranslationServiceClassDefinition {\n constructor() {\n this.languageContextService = ServiceProvider.get(LanguageContextService);\n this.translationChangedObservers = {};\n this.logger = LoggerProvider.logger;\n // log with background color\n this.defaultBundle = this.languageContextService.getDefaultBundle();\n this.subscribeToBundleChange();\n }\n /**\n * Translates the <code>messageLabelKey</code> with <code>translationParameter</code> and call <code>translationCallback</code> with translation of current language.\n * The <code>translationCallback</code> is called upon subscription and whenever the selected language is changed.\n *\n * @param messageLabelKey - The label key for the translation.\n * @param translationParameter - Parameters, if needed, for translation.\n * @param translationCallback - A function to be called when translating the `messageLabelKey`.\n * @returns A function that, when called, unsubscribes the provided callback from further translation updates.\n */\n onTranslate(messageLabelKey, translationParameter = [], translationCallback = () => { }) {\n this.translationChangedObservers[messageLabelKey] = this.translationChangedObservers[messageLabelKey] || [];\n const observer = { parameters: translationParameter, callback: translationCallback };\n this.translationChangedObservers[messageLabelKey].push(observer);\n translationCallback(this.translate(messageLabelKey, translationParameter));\n return () => {\n const index = this.translationChangedObservers[messageLabelKey].indexOf(observer);\n if (index !== -1) {\n this.translationChangedObservers[messageLabelKey].splice(index, 1);\n }\n };\n }\n /**\n * Translates the provided key using the currently selected language by applying the parameters if\n * provided.\n * @param key The key for the label which needs to be translated.\n * @param parameters Optional parameters which to be applied during the translation.\n */\n translate(key, parameters) {\n return this.translateInLocale(key, parameters);\n }\n /**\n * Translates a given key into the specified locale. If parameters are provided,\n * they will be applied to the translation.\n *\n * @param key - The translation key, which can be dot-separated for nested translations.\n * @param parameters - Optional parameters to be substituted into the translation string.\n * @returns The translated string with parameters applied if available, or the key itself if not found.\n */\n translateInLocale(key, parameters) {\n // Attempt to retrieve the translation from the specified locale's bundle.\n let translation = this.translateFromBundle(this.currentBundle, key);\n // If not found, fall back to the default language bundle.\n if (!translation) {\n translation = this.translateFromBundle(this.defaultBundle, key);\n }\n // If translation was found, apply any parameters provided and return the result.\n if (translation) {\n translation = this.applyParameters(translation, parameters);\n return sanitizeHTML(translation);\n }\n this.logger.warn(`Missing translation for key: [${key}]`);\n return key;\n }\n /**\n * Retrieves a translation from a specified translation bundle using the given key.\n * If the key represents a nested JSON path, it attempts to resolve the key as such.\n *\n * @param bundle - The translation bundle for the specified locale.\n * @param key - The key to translate, which may be a simple key or dot-separated for nested keys.\n * @returns The translation string if found, or `undefined` if not available.\n */\n translateFromBundle(bundle, key) {\n if (!bundle) {\n return undefined;\n }\n // Try to retrieve the translation directly if it is defined as a whole string,\n // for instance as \"some_function.btn.label\".\n let translation = bundle[key];\n // If not found, attempt to retrieve the translation if it is defined as a JSON object.\n if (typeof translation !== 'string') {\n translation = this.translateAsJsonObject(bundle, key);\n }\n return translation;\n }\n /**\n * Resolves a nested translation key by treating it as a path in a JSON object.\n * For example, if the key is \"some.key.path\", this method will navigate through\n * the JSON object structure to retrieve the value at that path.\n *\n * @param bundle - The translation bundle containing nested keys.\n * @param key - The dot-separated key representing the path to the translation.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n translateAsJsonObject(bundle, key) {\n let path = key.split('.');\n return this.getTranslation(bundle, path);\n }\n /**\n * Recursively navigates through a JSON object based on a path array to retrieve\n * a translation string. Each element in the path array represents a nested key.\n *\n * @param jsonObject - The current JSON object or nested object being searched.\n * @param path - An array representing the path to the translation, where each element is a key.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n getTranslation(jsonObject, path) {\n // Stop the recursion if path or reach the inner element\n if (!path || !jsonObject) {\n return undefined;\n }\n const jsonOrTranslation = jsonObject[path.splice(0, 1)[0]];\n if (path.length === 0) {\n return jsonOrTranslation;\n }\n if (typeof jsonOrTranslation !== 'string') {\n // continue if the inner element is not reached.\n if (path.length > 0) {\n return this.getTranslation(jsonOrTranslation, path);\n }\n return jsonOrTranslation;\n }\n return undefined;\n }\n applyParameters(translation, parameters) {\n if (parameters) {\n return parameters.reduce(\n // replace all occurrence of parameter key with parameter value.\n (translation, parameter) => TranslationServiceClassDefinition.replaceAll(translation, parameter), translation);\n }\n return translation;\n }\n static replaceAll(translation, parameter) {\n return parameter ? translation.split(`{{${parameter.key}}}`).join(parameter.value) : translation;\n }\n notifyTranslationsChanged() {\n Object.keys(this.translationChangedObservers).forEach((eventName) => {\n const observers = this.translationChangedObservers[eventName] || [];\n observers.forEach((observer) => observer.callback(this.translate(eventName, observer.parameters)));\n });\n }\n subscribeToBundleChange() {\n this.languageChangeSubscription = this.languageContextService.onLanguageBundleChanged((bundle) => {\n if (bundle) {\n this.currentBundle = bundle;\n this.notifyTranslationsChanged();\n }\n });\n }\n destroy() {\n if (this.languageChangeSubscription) {\n this.languageChangeSubscription();\n }\n }\n}\nconst TranslationService = new TranslationServiceClassDefinition();\n\nexport { LoggerProvider as L, TranslationService as T, sanitizeHTML as s };\n"],"names":["TranslateLabel","constructor","hostRef","registerInstance","this","unsubscribeTranslationChanged","translationParameters","connectedCallback","TranslationService","onTranslate","labelKey","translatedLabel","disconnectedCallback","render","h","Host","key","style","sanitizeHTML","html","element","document","createElement","innerHTML","value","LoggerProvider","logger","Loggers","getLoggerInstance","TranslationServiceClassDefinition","languageContextService","ServiceProvider","get","LanguageContextService","translationChangedObservers","defaultBundle","getDefaultBundle","subscribeToBundleChange","messageLabelKey","translationParameter","translationCallback","observer","parameters","callback","push","translate","index","indexOf","splice","translateInLocale","translation","translateFromBundle","currentBundle","applyParameters","warn","bundle","translateAsJsonObject","path","split","getTranslation","jsonObject","jsonOrTranslation","length","reduce","parameter","replaceAll","join","notifyTranslationsChanged","Object","keys","forEach","eventName","languageChangeSubscription","onLanguageBundleChanged","destroy"],"ignoreList":[],"sourceRoot":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"60560.6ba1b091a34af6c00770.bundle.js","mappings":"4PAKA,MAEMA,EAAoB,MACtBC,WAAAA,CAAYC,IACRC,EAAAA,EAAAA,GAAiBC,KAAMF,GACvBE,KAAKC,cAAeC,EAAAA,EAAAA,GAAYF,KAAM,gBAEtCA,KAAKG,WAAY,EAKjBH,KAAKI,UAAaC,IACdA,EAAMC,iBACNN,KAAKG,WAAY,GAMrBH,KAAKO,mBAAqB,KACtBP,KAAKC,aAAaO,OAE1B,CAKAC,aAAAA,GACIT,KAAKG,WAAY,CACrB,CACAO,MAAAA,GACI,OAAQC,EAAAA,EAAAA,GAAEC,EAAAA,EAAM,CAAEC,IAAK,6CAA8CF,EAAAA,EAAAA,GAAE,MAAO,CAAEE,IAAK,2CAA4CC,MAAO,0BAA2BH,EAAAA,EAAAA,GAAE,UAAW,CAAEE,IAAK,2CAA4CC,MAAO,2BAA4BH,EAAAA,EAAAA,GAAE,OAAQ,CAAEE,IAAK,6CAA8CF,EAAAA,EAAAA,GAAE,kBAAmB,CAAEE,IAAK,2CAA4CE,SAAU,2BAA4BJ,EAAAA,EAAAA,GAAE,IAAK,CAAEE,IAAK,2CAA4CG,GAAI,qBAAsBC,KAAM,IAAKC,QAASlB,KAAKI,UAAWU,MAAO,qBAAsBH,EAAAA,EAAAA,GAAE,kBAAmB,CAAEE,IAAK,2CAA4CE,SAAU,oCAAsC,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AAhBS,EAAKK,OACED,EAEsB,iBAAtBA,EAEHJ,EAAKK,OAAS,EACP5H,KAAKyH,eAAeE,EAAmBJ,GAE3CI,OALX,CAQJ,CACAR,eAAAA,CAAgBH,EAAaP,GACzB,OAAIA,EACOA,EAAWoB,OAElB,CAACb,EAAac,IAAcnC,EAAkCoC,WAAWf,EAAac,GAAYd,GAE/FA,CACX,CACA,iBAAOe,CAAWf,EAAac,GAC3B,OAAOA,EAAYd,EAAYQ,MAAM,KAAKM,EAAUjH,SAASmH,KAAKF,EAAUtC,OAASwB,CACzF,CACAiB,yBAAAA,GACIC,OAAOC,KAAKnI,KAAKgG,6BAA6BoC,QAASC,KACjCrI,KAAKgG,4BAA4BqC,IAAc,IACvDD,QAAS5B,GAAaA,EAASE,SAAS1G,KAAKwD,UAAU6E,EAAW7B,EAASC,eAE7F,CACAN,uBAAAA,GACInG,KAAKsI,2BAA6BtI,KAAK4F,uBAAuB2C,wBAAyBlB,IAC/EA,IACArH,KAAKkH,cAAgBG,EACrBrH,KAAKiI,8BAGjB,CACAO,OAAAA,GACQxI,KAAKsI,4BACLtI,KAAKsI,4BAEb,EAEJ,MAAM/E,EAAqB,IAAIoC,C","sources":["webpack://root-config/./packages/shared-components/dist/esm/onto-cookie-consent_2.entry.js","webpack://root-config/./packages/shared-components/dist/esm/function-utils-D1ZpXQQS.js","webpack://root-config/./packages/shared-components/dist/esm/translation.service-nljGIprK.js"],"sourcesContent":["import { r as registerInstance, c as createEvent, h, a as Host } from './index-CGqARDX4.js';\nimport { L as LoggerProvider, T as TranslationService } from './translation.service-nljGIprK.js';\nimport { service, SecurityContextService, SecurityService, TrackingService, DateUtil } from '@ontotext/workbench-api';\nimport { d as debounce } from './function-utils-D1ZpXQQS.js';\n\nconst ontoCookieConsentCss = () => `.cookie-consent-banner{position:fixed;bottom:0;left:0;right:0;background-color:var(--gw-dialog-background);box-shadow:0 -2px 10px rgba(0, 0, 0, 0.1);padding:20px;z-index:1050;width:100%}.cookie-consent-banner .cookie-consent-content{display:flex;justify-content:center;align-items:center}.cookie-consent-banner .cookie-consent-content button{margin-left:12px}.cookie-policy-modal{padding:24px 40px;overflow-y:auto}.cookie-policy-modal .modal-dialog{width:60% !important;max-width:60% !important}.cookie-policy-modal .title{font-size:xx-large;font-weight:bolder}.cookie-policy-modal .heading{font-size:x-large;font-weight:bolder;margin-top:12px}.cookie-policy-modal .subheading{font-size:large;font-weight:bolder;margin-top:8px}.cookie-policy-modal .text{font-size:math}`;\n\nconst OntoCookieConsent = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.consentGiven = createEvent(this, \"consentGiven\");\n /** State to control the visibility of the cookie policy modal */\n this.showModal = false;\n /**\n * Opens the cookie policy modal.\n * @param {Event} event - The event that triggered the modal opening.\n */\n this.openModal = (event) => {\n event.preventDefault();\n this.showModal = true;\n };\n /**\n * Handles the click event on the consent button.\n * Emits the consentGiven event.\n */\n this.handleConsentClick = () => {\n this.consentGiven.emit();\n };\n }\n /**\n * Listener for the closeDialog event emitted by the cookie policy dialog.\n * Sets the showModal state to false to hide the dialog.\n */\n onDialogClose() {\n this.showModal = false;\n }\n render() {\n return (h(Host, { key: 'dba3fc373e9ad60ada7f86d11acbe1b1ed24a92d' }, h(\"div\", { key: '8f1dff5a6b271f721d2079ec44a14207eff38025', class: \"cookie-consent-banner\" }, h(\"section\", { key: '93d51c3f88e12ff6fc5a57506eab507eca5420cb', class: \"cookie-consent-content\" }, h(\"span\", { key: '72be975026e8717da4ab4d99d5560f96017d4436' }, h(\"translate-label\", { key: 'b49c8182a2e94cffb22abb03dd4f2e6c9a7c6b5e', labelKey: 'cookie.cookie_consent' }), h(\"a\", { key: '79675cf4d9c026666093ff3205818f48b845083f', id: \"cookie-policy-link\", href: \"#\", onClick: this.openModal, class: \"btn btn-link p-0\" }, h(\"translate-label\", { key: '8c83694879ff4fb7cce5aa8f3363220767b54c13', labelKey: 'cookie.cookie_policy_url_label' })), \".\"), h(\"button\", { key: 'dfa75c1bd990929564a7b3b61264e1978ea24c95', id: \"accept-cookie-policy\", class: \"onto-btn onto-btn-primary\", onClick: this.handleConsentClick }, h(\"translate-label\", { key: '7a36cad2b993c7aa29f4d64adcf8e359331bdb28', labelKey: 'common.button.ok' })))), this.showModal && h(\"onto-cookie-policy-dialog\", { key: '1daa9af32d60159763f1ea052c1c87e6f4bfdb3e' })));\n }\n};\nOntoCookieConsent.style = ontoCookieConsentCss();\n\nconst ontoCookiePolicyDialogCss = () => `section h4{font-size:x-large;font-weight:bolder;margin-top:12px}`;\n\nvar CookieType;\n(function (CookieType) {\n CookieType[\"THIRD_PARTY\"] = \"thirdParty\";\n CookieType[\"STATISTIC\"] = \"statistic\";\n})(CookieType || (CookieType = {}));\nconst OntoCookiePolicyDialog = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.closeDialog = createEvent(this, \"closeDialog\");\n this.logger = LoggerProvider.logger;\n this.securityContextService = service(SecurityContextService);\n this.securityService = service(SecurityService);\n this.trackingService = service(TrackingService);\n /**\n * Debounced version of the `toggleChanged` method to prevent rapid consecutive calls when the user toggles cookie\n * consent options multiple times in quick succession.\n * This is needed because the `toggleChanged` method involves adding and removing tracking scripts based on the user's\n * consent, and rapid toggling can lead to multiple unnecessary script manipulations, which can cause performance\n * issues and unintended side effects.\n */\n this.toggleChangedDebounced = debounce((event) => this.toggleChanged(event), 300);\n }\n toggleChangeHandler(event) {\n this.toggleChangedDebounced(event);\n }\n toggleChanged(event) {\n this.setUserCookieConsent(this.updateCookieConsent(event.detail));\n this.securityService.updateAuthenticatedUser(this.user.toUser())\n .then(() => this.securityContextService.updateAuthenticatedUser(this.user))\n .catch(this.logger.error)\n .finally(() => this.trackingService.applyTrackingConsent());\n }\n connectedCallback() {\n this.user = this.securityContextService.getAuthenticatedUser();\n this.cookieConsent = this.trackingService.getCookieConsent();\n }\n render() {\n var _a, _b;\n const config = {\n dialogTitle: TranslationService.translate('cookie.policy.title'),\n onClose: () => this.closePolicyDialog(),\n modalClass: 'cookie-policy-modal',\n };\n return (h(\"onto-dialog\", { key: 'bdd402a836636e6c15811b3615703ea1eebd8d7c', config: config }, h(\"div\", { key: '1f1b4d80214907ae882b7322c48190f2152e12d9', slot: 'body' }, h(\"section\", { key: '1b1a59be322de2736ca62ad373a51d18a1a06b79' }, h(\"h4\", { key: 'dede6b4f005e6a661675479f5531ddad7a0235d4' }, h(\"translate-label\", { key: 'ee1741896c0ff590ab9efbec9bf0a5025a30909f', labelKey: 'cookie.policy.purpose_heading' })), h(\"p\", { key: 'e4a5b233c2809f901dd182f8d9aec0de27fc2099' }, h(\"translate-label\", { key: '631d8eb62fb92be49d0ded38b6aa1a280948ae19', labelKey: 'cookie.policy.purpose_text' })), h(\"p\", { key: '1254f3f2632b00bb296c00454a7df7d5b383ece5' }, h(\"translate-label\", { key: '5ceda3dada67081dbd17e1afa867a24a9016a564', labelKey: 'cookie.policy.purpose_enterprise_text' }))), h(\"section\", { key: '4796f96a4798348052387f6d379fcb2057c4b660' }, h(\"h4\", { key: '2ef14f483c1ff6fd1ecb891f7b9a6ed57b628805' }, h(\"translate-label\", { key: '09481c09192b35faa19b2006bdc3b21a9589cbdc', labelKey: 'cookie.policy.privacy_commitment_heading' })), h(\"p\", { key: '2cca9fe31f8f315c9ea123240bffc22f43bdfa77' }, h(\"translate-label\", { key: '4e8a55d364dffb76ea88c395967abd1681ceeec0', labelKey: 'cookie.policy.privacy_commitment_text' })), h(\"ul\", { key: 'ceac17908898768e92263452faa0d05b654355aa' }, h(\"li\", { key: 'c72361f5d3c17e068041f66e1986ba2152153f56' }, h(\"translate-label\", { key: '66a3534fd00d05e038c566c47c27a817e0840312', labelKey: 'cookie.policy.privacy_commitment_1' })), h(\"li\", { key: 'f64a3900424c3df46fabaa81b710626445dd25b9' }, h(\"translate-label\", { key: '1e0e45ea0bba3f66f483217514006e685544f7ce', labelKey: 'cookie.policy.privacy_commitment_2' })))), h(\"section\", { key: '5046d6f2a87f421da264d8ca56e586c96806c8d2' }, h(\"h4\", { key: 'f29934a5affad89f5f29bc18aaf4e0a7431a676c' }, h(\"translate-label\", { key: '88786391aa0c7dfee08e8a69c44cdc8f2fdf86ba', labelKey: 'cookie.policy.cookies_heading' })), h(\"p\", { key: '30445e55fede20a71babaac4656b2aa04bf95029' }, h(\"translate-label\", { key: 'f0a85e21c58d6192b7173a2fdcdadb0cac500d51', labelKey: 'cookie.policy.cookies_text' }))), h(\"section\", { key: '6d63492ca8e98e66ee3dac34a9f2d4804598aae3' }, h(\"h4\", { key: '2acb72a66961b4a7669421631c567ae220c37340' }, h(\"translate-label\", { key: '150994d027db50124deb8382ff86defd4d9f73ca', labelKey: 'cookie.policy.manage_cookies_heading' })), h(\"onto-toggle-switch\", { key: 'abe22d435107f38ff392ece9b1e93436b18d8865', class: \"statistic-cookies-toggle\", checked: (_a = this.cookieConsent) === null || _a === void 0 ? void 0 : _a.statistic, labelKey: 'cookie.policy.statistic_cookies', tooltipTranslationKey: 'cookie.policy.statistic_tooltip', context: CookieType.STATISTIC }), h(\"p\", { key: 'c58bd5346cbf64fc806476af9aca4114ffdf2f19' }, h(\"translate-label\", { key: '5494f13d7c4e5e9b8ad1dd2833d61dcf8abbaadb', labelKey: 'cookie.policy.statistic_text' })), h(\"onto-toggle-switch\", { key: 'a126d4e367ac72f3afabf4cbcad60600c1674256', class: \"third-party-cookies-toggle\", checked: (_b = this.cookieConsent) === null || _b === void 0 ? void 0 : _b.thirdParty, labelKey: 'cookie.policy.third_party_cookies', tooltipTranslationKey: 'cookie.policy.third_party_tooltip', context: CookieType.THIRD_PARTY }), h(\"p\", { key: '98eaa1cd8bf32b975fbf6158151c23ecb75ae775' }, h(\"translate-label\", { key: '3e3480010862cba108e3b2a2ea132e2ec8f7d38f', labelKey: 'cookie.policy.third_party_cookies_text' }))), h(\"p\", { key: '2f229fbfb8e618771c96ff69022bdbe41ae073aa' }, h(\"span\", { key: '89601e4bda0080f30395f7ab7717ed2894003df4' }, h(\"translate-label\", { key: '7e1c004df16f9c96593bd08ed572f330980f9b1f', labelKey: 'cookie.policy.change_cookies' }), h(\"i\", { key: '0b63d510ac728e75687dbfb89baf199a7ff789ac' }, \"\\u00A0\", h(\"translate-label\", { key: '84ca2e5206973463bb76e464c0de825778b5161c', labelKey: 'menu.setup.label' }), \"\\u00A0>\\u00A0\", h(\"translate-label\", { key: '8cd61ed1aa3b45d15845da57adba70c0136cc465', labelKey: 'menu.my.settings.label' }), \"\\u00A0>\\u00A0\", h(\"translate-label\", { key: 'a540e7209ce07f18cade46ca26593c067f0e5967', labelKey: 'security.user.settings' }), \"\\u00A0>\\u00A0\", h(\"translate-label\", { key: '122e0f07061903adb8e68ac632766cdce0544140', labelKey: 'cookie.policy.change_cookies_location4' }), \"\\u00A0\"))))));\n }\n /**\n * TODO: This is comment from the previous implementation in the legacy and needs to be re-evaluated and updated if necessary.\n *\n * Closes the modal and passes a result to indicate if the page should be reloaded.\n * - The page reloads only if the user has\n * (1) toggled third-party consent multiple times (`didAbusedThirdPartyToggle`),\n * (2) left third-party consent as enabled (`hasThirdPartyConsent`), and\n * (3) previously accepted the overall policy (`hasPolicyAccepted`)\n * - This reload is necessary in cases where multiple third-party consent changes\n * lead to duplicate and redundant tracking data being loaded.\n */\n closePolicyDialog() {\n this.closeDialog.emit();\n }\n updateCookieConsent(payload) {\n // Context is either 'thirdParty' or 'statistic'\n this.cookieConsent[payload.context] = payload.checked;\n this.cookieConsent.updatedAt = DateUtil.now();\n return this.cookieConsent;\n }\n setUserCookieConsent(cookieConsent) {\n if (!this.user.appSettings) {\n this.user.setAppSettings();\n }\n this.user.appSettings.COOKIE_CONSENT = cookieConsent;\n }\n};\nOntoCookiePolicyDialog.style = ontoCookiePolicyDialogCss();\n\nexport { OntoCookieConsent as onto_cookie_consent, OntoCookiePolicyDialog as onto_cookie_policy_dialog };\n","function debounce(func, wait = 300) {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(() => func.apply(this, args), wait);\n };\n}\n\nexport { debounce as d };\n","import { Loggers, ServiceProvider, LanguageContextService } from '@ontotext/workbench-api';\n\nfunction sanitizeHTML(html) {\n const element = document.createElement('textarea');\n element.innerHTML = html;\n return element.value;\n}\n\nconst MODULE_NAME = 'SharedComponents';\n/**\n * Logger for the Shared Components module.\n */\nclass LoggerProvider {\n /**\n * Gets the logger instance for the Shared Components module.\n *\n * @returns LoggerService instance for the Shared Components module\n */\n static get logger() {\n return Loggers.getLoggerInstance(MODULE_NAME);\n }\n}\n\n/**\n * Service responsible for translation operations in the component.\n */\nclass TranslationServiceClassDefinition {\n constructor() {\n this.languageContextService = ServiceProvider.get(LanguageContextService);\n this.translationChangedObservers = {};\n this.logger = LoggerProvider.logger;\n // log with background color\n this.defaultBundle = this.languageContextService.getDefaultBundle();\n this.subscribeToBundleChange();\n }\n /**\n * Translates the <code>messageLabelKey</code> with <code>translationParameter</code> and call <code>translationCallback</code> with translation of current language.\n * The <code>translationCallback</code> is called upon subscription and whenever the selected language is changed.\n *\n * @param messageLabelKey - The label key for the translation.\n * @param translationParameter - Parameters, if needed, for translation.\n * @param translationCallback - A function to be called when translating the `messageLabelKey`.\n * @returns A function that, when called, unsubscribes the provided callback from further translation updates.\n */\n onTranslate(messageLabelKey, translationParameter = [], translationCallback = () => { }) {\n this.translationChangedObservers[messageLabelKey] = this.translationChangedObservers[messageLabelKey] || [];\n const observer = { parameters: translationParameter, callback: translationCallback };\n this.translationChangedObservers[messageLabelKey].push(observer);\n translationCallback(this.translate(messageLabelKey, translationParameter));\n return () => {\n const index = this.translationChangedObservers[messageLabelKey].indexOf(observer);\n if (index !== -1) {\n this.translationChangedObservers[messageLabelKey].splice(index, 1);\n }\n };\n }\n /**\n * Translates the provided key using the currently selected language by applying the parameters if\n * provided.\n * @param key The key for the label which needs to be translated.\n * @param parameters Optional parameters which to be applied during the translation.\n */\n translate(key, parameters) {\n return this.translateInLocale(key, parameters);\n }\n /**\n * Translates a given key into the specified locale. If parameters are provided,\n * they will be applied to the translation.\n *\n * @param key - The translation key, which can be dot-separated for nested translations.\n * @param parameters - Optional parameters to be substituted into the translation string.\n * @returns The translated string with parameters applied if available, or the key itself if not found.\n */\n translateInLocale(key, parameters) {\n // Attempt to retrieve the translation from the specified locale's bundle.\n let translation = this.translateFromBundle(this.currentBundle, key);\n // If not found, fall back to the default language bundle.\n if (!translation) {\n translation = this.translateFromBundle(this.defaultBundle, key);\n }\n // If translation was found, apply any parameters provided and return the result.\n if (translation) {\n translation = this.applyParameters(translation, parameters);\n return sanitizeHTML(translation);\n }\n this.logger.warn(`Missing translation for key: [${key}]`);\n return key;\n }\n /**\n * Retrieves a translation from a specified translation bundle using the given key.\n * If the key represents a nested JSON path, it attempts to resolve the key as such.\n *\n * @param bundle - The translation bundle for the specified locale.\n * @param key - The key to translate, which may be a simple key or dot-separated for nested keys.\n * @returns The translation string if found, or `undefined` if not available.\n */\n translateFromBundle(bundle, key) {\n if (!bundle) {\n return undefined;\n }\n // Try to retrieve the translation directly if it is defined as a whole string,\n // for instance as \"some_function.btn.label\".\n let translation = bundle[key];\n // If not found, attempt to retrieve the translation if it is defined as a JSON object.\n if (typeof translation !== 'string') {\n translation = this.translateAsJsonObject(bundle, key);\n }\n return translation;\n }\n /**\n * Resolves a nested translation key by treating it as a path in a JSON object.\n * For example, if the key is \"some.key.path\", this method will navigate through\n * the JSON object structure to retrieve the value at that path.\n *\n * @param bundle - The translation bundle containing nested keys.\n * @param key - The dot-separated key representing the path to the translation.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n translateAsJsonObject(bundle, key) {\n let path = key.split('.');\n return this.getTranslation(bundle, path);\n }\n /**\n * Recursively navigates through a JSON object based on a path array to retrieve\n * a translation string. Each element in the path array represents a nested key.\n *\n * @param jsonObject - The current JSON object or nested object being searched.\n * @param path - An array representing the path to the translation, where each element is a key.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n getTranslation(jsonObject, path) {\n // Stop the recursion if path or reach the inner element\n if (!path || !jsonObject) {\n return undefined;\n }\n const jsonOrTranslation = jsonObject[path.splice(0, 1)[0]];\n if (path.length === 0) {\n return jsonOrTranslation;\n }\n if (typeof jsonOrTranslation !== 'string') {\n // continue if the inner element is not reached.\n if (path.length > 0) {\n return this.getTranslation(jsonOrTranslation, path);\n }\n return jsonOrTranslation;\n }\n return undefined;\n }\n applyParameters(translation, parameters) {\n if (parameters) {\n return parameters.reduce(\n // replace all occurrence of parameter key with parameter value.\n (translation, parameter) => TranslationServiceClassDefinition.replaceAll(translation, parameter), translation);\n }\n return translation;\n }\n static replaceAll(translation, parameter) {\n return parameter ? translation.split(`{{${parameter.key}}}`).join(parameter.value) : translation;\n }\n notifyTranslationsChanged() {\n Object.keys(this.translationChangedObservers).forEach((eventName) => {\n const observers = this.translationChangedObservers[eventName] || [];\n observers.forEach((observer) => observer.callback(this.translate(eventName, observer.parameters)));\n });\n }\n subscribeToBundleChange() {\n this.languageChangeSubscription = this.languageContextService.onLanguageBundleChanged((bundle) => {\n if (bundle) {\n this.currentBundle = bundle;\n this.notifyTranslationsChanged();\n }\n });\n }\n destroy() {\n if (this.languageChangeSubscription) {\n this.languageChangeSubscription();\n }\n }\n}\nconst TranslationService = new TranslationServiceClassDefinition();\n\nexport { LoggerProvider as L, TranslationService as T, sanitizeHTML as s };\n"],"names":["OntoCookieConsent","constructor","hostRef","registerInstance","this","consentGiven","createEvent","showModal","openModal","event","preventDefault","handleConsentClick","emit","onDialogClose","render","h","Host","key","class","labelKey","id","href","onClick","CookieType","style","OntoCookiePolicyDialog","closeDialog","logger","LoggerProvider","securityContextService","service","SecurityContextService","securityService","SecurityService","trackingService","TrackingService","toggleChangedDebounced","debounce","toggleChanged","toggleChangeHandler","setUserCookieConsent","updateCookieConsent","detail","updateAuthenticatedUser","user","toUser","then","catch","error","finally","applyTrackingConsent","connectedCallback","getAuthenticatedUser","cookieConsent","getCookieConsent","_a","_b","config","dialogTitle","TranslationService","translate","onClose","closePolicyDialog","modalClass","slot","checked","statistic","tooltipTranslationKey","context","STATISTIC","thirdParty","THIRD_PARTY","payload","updatedAt","DateUtil","now","appSettings","setAppSettings","COOKIE_CONSENT","func","wait","timer","args","clearTimeout","setTimeout","apply","sanitizeHTML","html","element","document","createElement","innerHTML","value","Loggers","getLoggerInstance","TranslationServiceClassDefinition","languageContextService","ServiceProvider","get","LanguageContextService","translationChangedObservers","defaultBundle","getDefaultBundle","subscribeToBundleChange","onTranslate","messageLabelKey","translationParameter","translationCallback","observer","parameters","callback","push","index","indexOf","splice","translateInLocale","translation","translateFromBundle","currentBundle","applyParameters","warn","bundle","translateAsJsonObject","path","split","getTranslation","jsonObject","jsonOrTranslation","length","reduce","parameter","replaceAll","join","notifyTranslationsChanged","Object","keys","forEach","eventName","languageChangeSubscription","onLanguageBundleChanged","destroy"],"ignoreList":[],"sourceRoot":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"60730.35493812d428872eddb6.bundle.js","mappings":"8LAEA,MAEMA,EAAuB,MACzBC,WAAAA,CAAYC,IACRC,EAAAA,EAAAA,GAAiBC,KAAMF,EAC3B,CACAG,MAAAA,GACI,OAAQC,EAAAA,EAAAA,GAAEC,EAAAA,EAAM,CAAEC,IAAK,2CAA4CC,MAAO,sBAAuBH,EAAAA,EAAAA,GAAE,IAAK,CAAEE,IAAK,2CAA4CC,MAAO,2DAA4DH,EAAAA,EAAAA,GAAE,MAAO,CAAEE,IAAK,2CAA4CC,MAAO,mBAAoBH,EAAAA,EAAAA,GAAE,MAAO,CAAEE,IAAK,2CAA4CC,MAAO,oBAAqBH,EAAAA,EAAAA,GAAE,kBAAmB,CAAEE,IAAK,2CAA4CE,SAAU,uCAAwCJ,EAAAA,EAAAA,GAAE,kBAAmB,CAAEE,IAAK,2CAA4CE,SAAU,oDAC7lB,GAEJV,EAAqBW,MAViB,uV","sources":["webpack://root-config/./packages/shared-components/dist/esm/onto-permission-banner.entry.js"],"sourcesContent":["import { r as registerInstance, h, a as Host } from './index-CGqARDX4.js';\n\nconst ontoPermissionBannerCss = () => `:host{display:block}.permission-banner{margin:0 1rem}.permission-banner-content{display:flex;align-items:center;margin:1rem;padding:0 2rem 3rem 2rem}.label-container{display:flex;flex-direction:column;margin-left:1rem}.icon-warning::before{font-family:\"icomoon\", sans-serif;content:\"\\\\e920\";display:block;font-size:1.5em;pointer-events:none}`;\n\nconst OntoPermissionBanner = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n }\n render() {\n return (h(Host, { key: '9119b184de876a5409f0f5335b644fb4e2325a0f', class: \"permission-banner\" }, h(\"p\", { key: '1b54e279971683070fdb30b923e4943827be42a4', class: \"permission-banner-content onto-alert onto-alert-danger\" }, h(\"div\", { key: 'eaf0e5a1e4803c2aaf039ff34f83137429646fec', class: \"ri-alert-line\" }), h(\"div\", { key: '1b77e50106a3f09621328ce78d92194dfe6a3509', class: \"label-container\" }, h(\"translate-label\", { key: '1aeefa5016d3c4dc3494433f5a9e9f17851c6c52', labelKey: 'permission_banner.no_access_error' }), h(\"translate-label\", { key: '68f57ed9009c2c89056ef763ece875eeeb927e35', labelKey: 'permission_banner.change_menu_or_user_warning' })))));\n }\n};\nOntoPermissionBanner.style = ontoPermissionBannerCss();\n\nexport { OntoPermissionBanner as onto_permission_banner };\n"],"names":["OntoPermissionBanner","constructor","hostRef","registerInstance","this","render","h","Host","key","class","labelKey","style"],"ignoreList":[],"sourceRoot":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export const __webpack_esm_id__=67888;export const __webpack_esm_ids__=[9717,67888,73702,82926,96248];export const __webpack_esm_modules__={9717(){function e(e,r){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-status-info.html",scope:{resource:"="},link:o=>{const t=[];o.popoverTemplate="resourceStatusInfoTemplate.html",o.popoverIsOpen=!1,o.context=o.resource.importResource.context,o.replaceGraphs=o.resource.importResource.replaceGraphs,o.baseUrl=decodeURIComponent(o.resource.importResource.baseURI),o.forceSerial=o.resource.importResource.forceSerial,o.importedOn=o.resource.importResource.importedOn,o.parserSettings=o.resource.importResource.parserSettings,o.open=()=>{o.closeAllDialogs(),o.popoverIsOpen=!0},o.closeAllDialogs=()=>{e.$broadcast("closePopovers")},o.close=()=>{o.popoverIsOpen=!1};const s=e=>{"Escape"===e.key&&o.$apply(()=>{o.close()})};t.push(o.$on("closePopovers",o.close)),r.on("keydown",s),o.$on("$destroy",()=>{r.off("keydown",s),t.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-status-info",[]).directive("importResourceStatusInfo",e),e.$inject=["$rootScope","$document"]},54419(e,r,o){o(96248);var t=o(28847),s=o(78618);function i(e){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-message.html",scope:{resource:"="},link:r=>{r.ImportResourceStatus=t.I,r.toTitleCase=e=>s.Sn(e),r.showMessage=r=>{e.open({templateUrl:"js/angular/import/templates/import-resource-message-dialog.html",controller:"ImportResourceMessageDialogController",size:"lg",windowClass:"import-resource-message-dialog",backdrop:"static",resolve:{message:function(){return r?r.importResource.message:""}}})}}}}angular.module("graphdb.framework.import.directives.import-resource-message",["graphdb.framework.impex.import.controllers.import-resource-message-dialog"]).directive("importResourceMessage",i),i.$inject=["$uibModal"]},67888(e,r,o){o(82493),o(5687),o(39324),o(73702),o(82926),o(83136),o(76933),o(47195),o(56669),angular.module("graphdb.framework.impex.import",["toastr","ngRoute","ngFileUpload","ui.bootstrap","graphdb.framework.impex.import.controllers","graphdb.framework.core.services.repositories","graphdb.framework.import.directives.validate-uri","graphdb.framework.import.directives.import-progress-indicator","graphdb.framework.import.directives.import-resource-tree"])},73702(){function e(e){return{restrict:"A",require:"ngModel",link:function(r,o,t,s){s.$parsers.unshift(function(r){if(s.$setValidity("validateUri",!0),!s.$isEmpty(r)){const o=e.isValidIri(r,r.toString());s.$setValidity("validateUri",o)}return r})}}}angular.module("graphdb.framework.import.directives.validate-uri",[]).directive("validateUri",e),e.$inject=["UriUtils"]},82926(){function e(){return{link:function(e,r,o){e.$watch("file.status",function(){"IMPORTING"!==e.file.status&&"UPLOADING"!==e.file.status||!$(r).has("object").length>0&&$(r).append('<object width="'+o.size+'" height="'+o.size+'" data="js/angular/templates/loader/ot-loader.svg?v=3.3.3-TR1">{{\'common.loading\' | translate}}</object>')})}}}angular.module("graphdb.framework.import.directives.import-progress-indicator",[]).directive("ImportProgressIndicator",e),e.$inject=[]},83136(e,r,o){var t=o(28847),s=(o(54419),o(9717),o(18025)),i=o(57436),c=o(7796),a=o(56636),l=o(57154);const p={FILE:"FILE",DIRECTORY:"DIRECTORY",ALL:"ALL"},n={ALL:"ALL",NONE:"NONE",IMPORTED:"IMPORTED",NOT_IMPORTED:"NOT_IMPORTED"};function u(e,r){return{restrict:"E",templateUrl:"js/angular/import/templates/import-resource-tree.html",scope:{columnKeys:"=",showTypeFilter:"=",sortBy:"=",asc:"=",onImport:"&",onImportAll:"&",onReset:"&",onRemove:"&",onStopImport:"&",onEditResource:"&"},link:(o,u,m)=>{o.resources=new i.k,o.displayResources=[],o.TYPE_FILTER_OPTIONS=p,o.filterByType=p.ALL,o.filterByFileName="",o.STATUS_OPTIONS=n,o.selectedByStatus=void 0,o.areAllDisplayedImportResourcesSelected=!1,o.areAllDisplayedImportResourcesPartialSelected=!1,o.ImportResourceStatus=t.I,o.canRemoveResource=angular.isDefined(m.onRemove),o.canResetSelectedResources=!1,o.SORTING_TYPES=s.R,o.sortAsc=!angular.isDefined(m.asc)||o.asc,o.sortedBy=o.sortBy,o.showLoader=r.getShowLoader(),o.hasSelection=!1,o.selectionChanged=e=>{e.setSelection(e.selected),I(),d(),g()},o.selectResourceWithStatus=e=>{o.selectedByStatus=e,o.resources.setSelection(!1),n.ALL===o.selectedByStatus?o.resources.setSelection(!0):n.IMPORTED===o.selectedByStatus?o.resources.selectAllWithStatus([t.I.DONE]):n.NOT_IMPORTED===o.selectedByStatus&&o.resources.selectAllWithStatus([t.I.IMPORTING,t.I.NONE,t.I.ERROR,t.I.PENDING,t.I.INTERRUPTING]),R(),d()},o.filterByTypeChanged=e=>{o.filterByType=e,R()},o.filterByFileNameChanged=e=>{o.filterByFileName=e,N(R,100)},o.onResetStatus=()=>{const e=o.resources.getAllSelected().map(e=>e.path);e.length>0&&o.onReset({resources:e})},o.resetStatus=e=>{o.onReset({resources:[e.path]})},o.onRemoveResources=()=>{const e=o.resources.getAllSelected();e&&e.length>0&&o.onRemove({resources:e})},o.removeResource=e=>{o.onRemove({resources:[e]})},o.importAll=e=>{const r=o.resources.getAllSelectedForImport();r.length>0&&o.onImportAll({selectedResources:r,withoutChangingSettings:e})},o.stopImport=e=>{o.onStopImport({resource:e})},o.sort=e=>{o.sortedBy===e?o.sortAsc=!o.sortAsc:o.sortAsc=!0,o.sortedBy=e,R()},o.editResource=e=>{o.onEditResource({resource:e})};const d=()=>{o.canResetSelectedResources=o.resources.getSelectedImportedResources()},R=()=>{o.resources.getRoot().updateSelectionState(),y(),o.displayResources=o.resources.toList().filter(A).filter(E),g(),I()},g=()=>{const e=o.resources.getAllSelectedFilesNames();o.hasSelection=e.length>0,r.updateSelectedFilesNames(e)},I=()=>{const e=o.displayResources.some(e=>!e.selected),r=o.displayResources.some(e=>e.selected);o.areAllDisplayedImportResourcesSelected=r&&!e,o.areAllDisplayedImportResourcesPartialSelected=r&&e},y=()=>{s.R.NAME===o.sortedBy?o.resources.sort(f(o.sortAsc)):s.R.SIZE===o.sortedBy?o.resources.sort(h(o.sortAsc)):s.R.MODIFIED===o.sortedBy?o.resources.sort(S(o.sortAsc)):s.R.IMPORTED===o.sortedBy?o.resources.sort(T(o.sortAsc)):s.R.CONTEXT===o.sortedBy&&o.resources.sort(v(o.sortAsc))},f=e=>(r,o)=>e?r.importResource.name.localeCompare(o.importResource.name):o.importResource.name.localeCompare(r.importResource.name),h=e=>(r,o)=>{const t=l.ByteUtils.convertToBytes(r.importResource.size),s=l.ByteUtils.convertToBytes(o.importResource.size);return e?t-s:s-t},S=e=>(r,o)=>{const t=r.importResource.modifiedOn||Number.MAX_VALUE,s=o.importResource.modifiedOn||Number.MAX_VALUE;return e?t-s:s-t},T=e=>(r,o)=>{const t=r.importResource.importedOn||Number.MAX_VALUE,s=o.importResource.importedOn||Number.MAX_VALUE;return e?t-s:s-t},v=e=>(r,o)=>e?r.importResource.context.localeCompare(o.importResource.context):o.importResource.context.localeCompare(r.importResource.context),A=e=>p.ALL===o.filterByType||(o.filterByType===p.FILE?e.isFile():o.filterByType===p.DIRECTORY&&e.isDirectory()),E=e=>!o.filterByFileName||(o.filterByType===p.DIRECTORY?e.hasTextInDirectoriesName(o.filterByFileName):o.filterByType===p.FILE?e.hasTextInFilesName(o.filterByFileName):e.hasTextInResourcesName(o.filterByFileName));let O;const N=(r,o)=>{O&&e.cancel(O),O=e(r,o)},b=[];b.push(r.onResourcesUpdated((e=[])=>{const t=c.D.USER===r.getActiveTabId();o.resources.isEmpty()?(o.resources=a.Fp.toImportResourceTree(e,t),t&&(o.sortedBy=s.R.MODIFIED)):a.Fp.mergeResourceTree(o.resources,e,t),a.Fp.calculateElementIndent(o.resources),a.Fp.setupAfterTreeInitProperties(o.resources),R(),d()})),b.push(r.onShowLoaderUpdated(e=>o.showLoader=e)),b.push(r.onActiveTabIdUpdated(()=>o.resources=new i.k)),o.$on("$destroy",()=>{b.forEach(e=>e())})}}}angular.module("graphdb.framework.import.directives.import-resource-tree",["graphdb.framework.import.directives.import-resource-message","graphdb.framework.import.directives.import-resource-status-info"]).directive("importResourceTree",u),u.$inject=["$timeout","ImportContextService"]},96248(e,r,o){var t=o(304);angular.module("graphdb.framework.impex.import.controllers.import-resource-message-dialog",[]).controller("ImportResourceMessageDialogController",i),i.$inject=["$scope","$uibModalInstance","$translate","toastr","message"];const s=t.I.logger;function i(e,r,o,t,i){e.message=i,e.close=()=>{r.dismiss()},e.copyToClipboard=()=>{navigator.clipboard.writeText(e.message).then(()=>{t.success(o.instant("import.help.messages.copied_to_clipboard")),e.close()},e=>{s.error("Could not copy text: ",e)})}}}};
|
|
2
|
-
//# sourceMappingURL=67888.7224e1b2689d73c4d468.bundle.js.map
|