graphdb-workbench 3.4.0-TR3 → 3.4.0-TR5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/19057.a52dd7b0e356e884a792.bundle.js +3 -0
- package/dist/19057.a52dd7b0e356e884a792.bundle.js.map +1 -0
- package/dist/23236.1490d29a6e40f437885b.bundle.js +2 -0
- package/dist/23236.1490d29a6e40f437885b.bundle.js.map +1 -0
- package/dist/24125.0fd6b7797f2630fe59c6.bundle.js +2 -0
- package/dist/24125.0fd6b7797f2630fe59c6.bundle.js.map +1 -0
- package/dist/24690.79fd696f08f3ebbb1c6f.bundle.js +2 -0
- package/dist/24690.79fd696f08f3ebbb1c6f.bundle.js.map +1 -0
- package/dist/{3395.8452312923e6a77d2ffd.bundle.js → 3395.8dfba5922c8aad6d860c.bundle.js} +2 -2
- package/dist/3395.8dfba5922c8aad6d860c.bundle.js.map +1 -0
- package/dist/34985.8ef74b317fc8bff7e8e1.bundle.js +2 -0
- package/dist/34985.8ef74b317fc8bff7e8e1.bundle.js.map +1 -0
- package/dist/50244.69475a004173b61902a8.bundle.js +2 -0
- package/dist/50244.69475a004173b61902a8.bundle.js.map +1 -0
- package/dist/60447.4fd8b4ce9b95b98deade.bundle.js +2 -0
- package/dist/60447.4fd8b4ce9b95b98deade.bundle.js.map +1 -0
- package/dist/63842.68a1c5451a236b8ede97.bundle.js +2 -0
- package/dist/63842.68a1c5451a236b8ede97.bundle.js.map +1 -0
- package/dist/{64709.9f6594f730a4b54d6fc9.bundle.js → 64709.93e616541b4b18e88892.bundle.js} +2 -2
- package/dist/{64709.9f6594f730a4b54d6fc9.bundle.js.map → 64709.93e616541b4b18e88892.bundle.js.map} +1 -1
- package/dist/{65677.038185dcd07233e07f52.bundle.js → 65677.77bf484a0da0eec48f0b.bundle.js} +2 -2
- package/dist/{65677.038185dcd07233e07f52.bundle.js.map → 65677.77bf484a0da0eec48f0b.bundle.js.map} +1 -1
- package/dist/66574.cae68c94f87ba873b322.bundle.js +2 -0
- package/dist/66574.cae68c94f87ba873b322.bundle.js.map +1 -0
- package/dist/{80933.ef5e85af9b19067ee89b.bundle.js → 80933.ddbcb2688f7d93009c04.bundle.js} +2 -2
- package/dist/{80933.ef5e85af9b19067ee89b.bundle.js.map → 80933.ddbcb2688f7d93009c04.bundle.js.map} +1 -1
- package/dist/{82917.e537e5e649be4a5a0e20.bundle.js → 82917.e234e043395ff0b7d48f.bundle.js} +2 -2
- package/dist/82917.e234e043395ff0b7d48f.bundle.js.map +1 -0
- package/dist/{86099.acb890d2b6e1d841c4c3.bundle.js → 86099.0abe4f96d87490fe332e.bundle.js} +2 -2
- package/dist/{86099.acb890d2b6e1d841c4c3.bundle.js.map → 86099.0abe4f96d87490fe332e.bundle.js.map} +1 -1
- package/dist/{90418.0a737513ff59bfee423a.bundle.js → 90418.ee1af575862a64c12457.bundle.js} +2 -2
- package/dist/90418.ee1af575862a64c12457.bundle.js.map +1 -0
- package/dist/{96972.896f91c5874df70d14bb.bundle.js → 96972.fc25a13bb1bc69ad785c.bundle.js} +2 -2
- package/dist/96972.fc25a13bb1bc69ad785c.bundle.js.map +1 -0
- package/dist/9923.74654347e1812dd0f90a.bundle.js +3 -0
- package/dist/9923.74654347e1812dd0f90a.bundle.js.map +1 -0
- package/dist/api/models/application-settings/application-settings.d.ts +8 -1
- package/dist/api/models/application-settings/test/application-settings.spec.d.ts +1 -0
- package/dist/api/ontotext-workbench-api.js +1 -1
- package/dist/api/ontotext-workbench-api.js.map +1 -1
- package/dist/api/services/application-settings/application-settings-storage.service.d.ts +6 -0
- package/dist/api/services/runtime-configuration/runtime-configuration-context.service.d.ts +20 -0
- package/dist/api/services/theme/theme.service.d.ts +14 -3
- package/dist/css/explore.css +1 -1
- package/dist/css/lib/ontotext-yasgui-web-component.css +1 -1
- package/dist/css/user.css +1 -1
- package/dist/i18n/locale-en.json +4 -1
- package/dist/i18n/locale-fr.json +6 -3
- 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 +13 -16
- 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.77dd92ce99a75c4ee674.js → legacyWorkbench.cb08fa647eed6afe60e8.js} +3 -3
- package/dist/{legacyWorkbench.77dd92ce99a75c4ee674.js.map → legacyWorkbench.cb08fa647eed6afe60e8.js.map} +1 -1
- package/dist/{main.6db145d35852092cde59.js → main.1198f08d1cc597b94cbc.js} +3 -3
- package/dist/main.1198f08d1cc597b94cbc.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 +5 -3
- package/dist/pages/dependencies.html +3 -3
- package/dist/pages/domainRangeInfo.html +2 -2
- package/dist/pages/edit.html +1 -1
- package/dist/pages/explore.html +72 -75
- 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/onto-graph-explore-split-button.cjs.entry.js +1 -1
- package/dist/shared-components/collection/components/onto-graph-explore-split-button/onto-graph-explore-split-button.js +1 -1
- package/dist/shared-components/esm/onto-graph-explore-split-button.entry.js +1 -1
- package/dist/shared-components/shared-components/p-cd5cc683.entry.js +1 -0
- package/dist/shared-components/shared-components/shared-components.esm.js +1 -1
- package/package.json +1 -1
- package/dist/19057.c644732712725c1a6d3d.bundle.js +0 -3
- package/dist/19057.c644732712725c1a6d3d.bundle.js.map +0 -1
- package/dist/23236.36dabf6a87d61107178d.bundle.js +0 -2
- package/dist/23236.36dabf6a87d61107178d.bundle.js.map +0 -1
- package/dist/24125.fc41760fdae44b0480c8.bundle.js +0 -2
- package/dist/24125.fc41760fdae44b0480c8.bundle.js.map +0 -1
- package/dist/24690.d4ed1c24eded4eb0da85.bundle.js +0 -2
- package/dist/24690.d4ed1c24eded4eb0da85.bundle.js.map +0 -1
- package/dist/3395.8452312923e6a77d2ffd.bundle.js.map +0 -1
- package/dist/34985.a6b52e4b364c7efd3046.bundle.js +0 -2
- package/dist/34985.a6b52e4b364c7efd3046.bundle.js.map +0 -1
- package/dist/50244.35b37c35412261341adb.bundle.js +0 -2
- package/dist/50244.35b37c35412261341adb.bundle.js.map +0 -1
- package/dist/60447.fd8b44d92859a3481ad7.bundle.js +0 -2
- package/dist/60447.fd8b44d92859a3481ad7.bundle.js.map +0 -1
- package/dist/63842.e62b43ae192a642531c6.bundle.js +0 -2
- package/dist/63842.e62b43ae192a642531c6.bundle.js.map +0 -1
- package/dist/66574.8591bdbb6983d8d07c04.bundle.js +0 -2
- package/dist/66574.8591bdbb6983d8d07c04.bundle.js.map +0 -1
- package/dist/82917.e537e5e649be4a5a0e20.bundle.js.map +0 -1
- package/dist/90418.0a737513ff59bfee423a.bundle.js.map +0 -1
- package/dist/96972.896f91c5874df70d14bb.bundle.js.map +0 -1
- package/dist/9923.6963c46c47330a6ba2d0.bundle.js +0 -3
- package/dist/9923.6963c46c47330a6ba2d0.bundle.js.map +0 -1
- package/dist/main.6db145d35852092cde59.js.map +0 -1
- package/dist/shared-components/shared-components/p-1b143527.entry.js +0 -1
- /package/dist/{19057.c644732712725c1a6d3d.bundle.js.LICENSE.txt → 19057.a52dd7b0e356e884a792.bundle.js.LICENSE.txt} +0 -0
- /package/dist/{9923.6963c46c47330a6ba2d0.bundle.js.LICENSE.txt → 9923.74654347e1812dd0f90a.bundle.js.LICENSE.txt} +0 -0
- /package/dist/{legacyWorkbench.77dd92ce99a75c4ee674.js.LICENSE.txt → legacyWorkbench.cb08fa647eed6afe60e8.js.LICENSE.txt} +0 -0
- /package/dist/{main.6db145d35852092cde59.js.LICENSE.txt → main.1198f08d1cc597b94cbc.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3395.8dfba5922c8aad6d860c.bundle.js","mappings":"0QAuBAA,QAAQC,OAAO,sCAXC,CACZ,YACA,SACA,qEACA,wEACA,uEACA,6EACA,iDACA,4D,wCCVJD,QACKC,OAAO,uEAPI,CACZ,0FACA,qFACA,sFAKCC,UAAU,uBAAwBC,GAEvCA,EAAqBC,QAAU,CAAC,WAAY,YAAa,aAAc,SAAU,6BAEjF,MAAMC,EAAqB,CACvBC,WAAY,aACZC,MAAO,QACPC,aAAc,gBAGlB,SAASL,EAAqBM,EAAUC,EAAWC,EAAYC,EAAQC,GACnE,MAAO,CACHC,SAAU,IACVC,YAAa,0FACbC,MAAO,CACHC,YAAa,IACbC,aAAc,IACdC,qBAAsB,KAE1BC,KAAOC,IAIH,MAAMC,EAAgB,GAKtBD,EAAOhB,mBAAqBA,EAC5BgB,EAAOE,UAAYlB,EAAmBC,WAKtCe,EAAOG,+BAAiC,KACpCX,EAA0BY,iCAG9BJ,EAAOK,UAAY,CAACC,EAAQC,KACxBP,EAAOE,UAAYK,GAkBvBP,EAAOQ,IAAI,WAAY,WAHnBP,EAAcQ,QAASC,GAAiBA,KAKxCV,EAAOG,gCACX,GAdIF,E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KAAK4B,EAChD,CASA,qBAAOP,CAAeO,EAAKR,GACvB,OAAQ,IAAIS,OAAOT,GAASpB,KAAK4B,EACrC,CASA,yBAAOH,CAAmBG,EAAKL,GAE3B,OADwB,IAAIM,OAAO,KAAON,EAAkBvI,KAAK,KAAO,OAAQ,KACxDgH,KAAK4B,EACjC,E,eCvCJE,IAAAA,EAAAA,EAAAA,EAAO,CAAC,UAAK,WACAxO,GASL,SAASyO,EAAcC,EAAWzC,GAC9B,OAAOyC,EAAUC,KAAK,WAClB,IAAIC,EAAI3C,EAAI4C,MAAMC,KAAMC,WAAYC,EAAI/O,OAAO6O,MAC/C,IAAK,IAAIG,KAAQL,EAAGI,EAAE1L,KAAK2L,EAAML,EAAEK,GACvC,EACJ,CAEA,SAASC,EAAYR,EAAWzC,GAC5B,IAAK,IAAIgD,KAAQhD,EAAKyC,EAAUpL,KAAK2L,EAAMhD,EAAIgD,IAC/C,OAAOP,CACX,CAuBA,YAtC8F,IAAP1O,IAC/EA,EAAKsM,EAAQ,QAoBrBtM,EAAG0O,UAAUS,UAAU5C,MAJvB,SAAyBN,GACrB,OAAuB,mBAARA,EAAqBwC,EAAgBS,GAAaJ,KAAM7C,EAC3E,EAIAjM,EAAG0O,UAAUS,UAAUC,YAAc,WACjC,OAAON,KAAKH,KAAK,WACb3O,EAAGC,OAAO6O,KAAKO,WAAWC,YAAYR,MAC1C,EACJ,EAEA9O,EAAG0O,UAAUS,UAAUI,WAAa,WAChC,OAAOT,KAAKH,KAAK,WACb,MAAMa,EAAaV,KAAKO,WAAWG,WAC/BA,GACAV,KAAKO,WAAWI,aAAaX,KAAMU,EAE3C,EACJ,EAEOxP,CACV,sC","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/app.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/cluster-configuration.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/cluster-nodes.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/cluster-properties.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-configuration/multi-region.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-graphical-view.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/clustermanagement/directives/cluster-nodes-configuration.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/ascii-validator.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/length-validator.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/validate-duplicate-url.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/core/directives/validate-url.directive.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/utils/url-utils.js","webpack://root-config/./packages/legacy-workbench/src/js/lib/d3.patch.js"],"sourcesContent":["import 'angular/core/services';\nimport 'angular/core/directives';\nimport 'angular/clustermanagement/controllers/cluster-management.controller';\nimport 'angular/clustermanagement/directives/cluster-graphical-view.directive';\nimport 'angular/clustermanagement/directives/cluster-configuration/cluster-configuration.directive';\nimport 'angular/clustermanagement/directives/cluster-nodes-configuration.directive';\nimport 'angular/core/services/repositories.service';\nimport 'lib/d3.patch.js';\nimport 'angular-pageslide-directive/dist/angular-pageslide-directive';\nimport 'angular/core/directives/validate-url.directive';\nimport 'angular/core/directives/validate-duplicate-url.directive';\n\nconst modules = [\n 'ngAnimate',\n 'toastr',\n 'graphdb.framework.clustermanagement.controllers.cluster-management',\n 'graphdb.framework.clustermanagement.directives.cluster-graphical-view',\n 'graphdb.framework.clustermanagement.directives.cluster-configuration',\n 'graphdb.framework.clustermanagement.directives.cluster-nodes-configuration',\n 'graphdb.framework.core.directives.validate-url',\n 'graphdb.framework.core.directives.validate-duplicate-url'\n];\n\nangular.module('graphdb.framework.clustermanagement', modules);\n","import 'angular/clustermanagement/directives/cluster-configuration/cluster-properties.directive';\nimport 'angular/clustermanagement/directives/cluster-configuration/cluster-nodes.directive';\nimport 'angular/clustermanagement/directives/cluster-configuration/multi-region.directive';\n\nconst modules = [\n 'graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties',\n 'graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes',\n 'graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region'\n];\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration', modules)\n .directive('clusterConfiguration', ClusterConfiguration);\n\nClusterConfiguration.$inject = ['$jwtAuth', '$uibModal', '$translate', 'toastr', 'ClusterViewContextService'];\n\nconst CONFIGURATION_TABS = {\n PROPERTIES: 'properties',\n NODES: 'nodes',\n MULTI_REGION: 'multi_region'\n};\n\nfunction ClusterConfiguration($jwtAuth, $uibModal, $translate, toastr, ClusterViewContextService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/cluster-configuration.html',\n scope: {\n currentNode: '=',\n clusterModel: '=',\n clusterConfiguration: '='\n },\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const subscriptions = [];\n\n // =========================\n // Public variables\n // =========================\n $scope.CONFIGURATION_TABS = CONFIGURATION_TABS;\n $scope.activeTab = CONFIGURATION_TABS.PROPERTIES;\n\n // =========================\n // Public functions\n // =========================\n $scope.closeClusterConfigurationPanel = () => {\n ClusterViewContextService.hideClusterConfigurationPanel();\n };\n\n $scope.switchTab = ($event, tab) => {\n $scope.activeTab = tab;\n };\n\n // =========================\n // Events and watchers\n // =========================\n const subscribeHandlers = () => {\n subscriptions.push(ClusterViewContextService.onShowClusterConfigurationPanel((show) => {\n if (!show) {\n $scope.activeTab = CONFIGURATION_TABS.PROPERTIES;\n }\n }));\n };\n\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n $scope.$on('$destroy', function () {\n removeAllListeners();\n $scope.closeClusterConfigurationPanel();\n });\n\n // =========================\n // Initialization\n // =========================\n const init = () => {\n subscribeHandlers();\n };\n init();\n }\n };\n}\n","const modules = [];\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-nodes', modules)\n .directive('clusterNodes', ClusterNodes);\n\nClusterNodes.$inject = [];\n\nfunction ClusterNodes() {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/cluster-nodes.html',\n scope: {\n currentNode: '=',\n clusterModel: '='\n }\n };\n}\n","import {DELETE_CLUSTER, UPDATE_CLUSTER} from \"../../events\";\nimport {\n AuthorizationService,\n AuthenticationService,\n service,\n} from '@ontotext/workbench-api';\n\nconst modules = [];\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration.cluster-properties', modules)\n .directive('clusterProperties', ClusterProperties);\n\nClusterProperties.$inject = ['$jwtAuth', '$uibModal'];\n\nfunction ClusterProperties($jwtAuth, $uibModal) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/cluster-properties.html',\n scope: {\n currentNode: '=',\n clusterModel: '=',\n clusterConfiguration: '='\n },\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const authorizationService = service(AuthorizationService);\n const authenticationService = service(AuthenticationService);\n\n // =========================\n // Public variables\n // =========================\n $scope.isAdmin = false;\n\n // =========================\n // Public functions\n // =========================\n $scope.showEditConfigurationDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/cluster-edit-dialog.html',\n controller: 'EditClusterCtrl',\n size: 'lg',\n resolve: {\n data: () => {\n return {\n clusterConfiguration: $scope.clusterConfiguration\n };\n }\n }\n });\n\n modalInstance.result.finally(function () {\n $scope.$emit(UPDATE_CLUSTER, {force: true});\n });\n };\n\n $scope.showDeleteDialog = () => {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/clustermanagement/templates/modal/cluster-delete-dialog.html',\n controller: 'DeleteClusterCtrl'\n });\n\n modalInstance.result.then((forceDelete) => {\n $scope.$emit(DELETE_CLUSTER, {force: forceDelete});\n });\n };\n\n // =========================\n // Initialization\n // =========================\n const init = () => {\n $scope.isAdmin = authenticationService.isAuthenticated() && authorizationService.isAdmin();\n };\n init();\n }\n };\n}\n","import 'angular/core/directives/ascii-validator.directive';\nimport 'angular/core/directives/length-validator.directive';\nimport {ClusterConfiguration, ClusterModel} from \"../../../models/clustermanagement/cluster\";\nimport {NodeState, TopologyState} from \"../../../models/clustermanagement/states\";\nimport {\n AuthorizationService,\n AuthenticationService,\n service,\n} from '@ontotext/workbench-api';\n\nconst modules = [\n 'graphdb.framework.core.directives.ascii-validator',\n 'graphdb.framework.core.directives.length-validator'\n];\n\nconst TagLengthConstraints = {\n minLen: '3',\n maxLen: '255'\n};\n\nangular\n .module('graphdb.framework.clustermanagement.directives.cluster-configuration.multi-region', modules)\n .directive('multiRegion', MultiRegion);\n\nMultiRegion.$inject = ['$jwtAuth', '$translate', '$timeout', 'toastr', 'ModalService', 'ClusterRestService', 'ClusterViewContextService'];\n\nfunction MultiRegion($jwtAuth, $translate, $timeout, toastr, ModalService, ClusterRestService, ClusterViewContextService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-configuration/multi-region.html',\n scope: {\n clusterModel: '=',\n clusterConfiguration: '='\n },\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const authorizationService = service(AuthorizationService);\n const authenticationService = service(AuthenticationService);\n const subscriptions = [];\n\n // =========================\n // Public variables\n // =========================\n /**\n * @type {TopologyStatus}\n */\n $scope.topology = undefined;\n $scope.TopologyState = TopologyState;\n $scope.isAdmin = false;\n $scope.addingTag = false;\n $scope.loaderTimeout = undefined;\n $scope.secondaryTag = undefined;\n $scope.TagLengthConstraints = TagLengthConstraints;\n\n // =========================\n // Public functions\n // =========================\n $scope.add = () => {\n $scope.addingTag = true;\n };\n\n $scope.cancel = () => {\n $scope.addingTag = false;\n };\n\n $scope.createTag = (tag) => {\n const payload = {\n tag\n };\n setLoader(true);\n return ClusterRestService.addCusterTag(payload)\n .then(() => {\n toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.created_tag', {tag}));\n }).catch((response) => {\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.creating'));\n }).finally(() => {\n $scope.addingTag = false;\n setLoader(false);\n });\n };\n\n $scope.deleteTag = (tag) => {\n ModalService.openSimpleModal({\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.delete', {tag}),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.warning'),\n warning: true,\n backdrop: 'static',\n stopPropagation: true\n }).result\n .then(() => {\n setLoader(true);\n return ClusterRestService.deleteClusterTag(tag);\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.deleted_tag', {tag})))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.deleting'));\n })\n .finally(() => setLoader(false));\n };\n\n $scope.enableSecondaryMode = () => {\n $scope.addingTag = false;\n const confirmConfig = {\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.enable_secondary'),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.enable_secondary_warning'),\n warning: true,\n backdrop: 'static',\n confirmButtonKey: 'common.ok.btn',\n stopPropagation: true\n };\n\n ModalService.openSimpleModal(confirmConfig).result\n .then(() => openSecondaryModeModal())\n .then((payload) => {\n setLoader(true);\n return ClusterRestService.enableSecondaryMode(payload);\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.secondary_enabled')))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.secondary'));\n })\n .finally(() => setLoader(false));\n };\n\n $scope.disableSecondaryMode = () => {\n ModalService.openSimpleModal({\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode'),\n message: $translate.instant('cluster_management.cluster_configuration_multi_region.confirm.disable_secondary_mode_warning'),\n warning: true,\n backdrop: 'static',\n stopPropagation: true\n }).result\n .then(() => {\n setLoader(true);\n return ClusterRestService.disableSecondaryMode();\n })\n .then(() => toastr.success($translate.instant('cluster_management.cluster_configuration_multi_region.disabled_secondary_mode')))\n .catch((response) => {\n if (response === 'cancel' || response === 'escape key press') {\n return;\n }\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.disabling'));\n })\n .finally(() => setLoader(false));\n };\n\n // =========================\n // Private functions\n // =========================\n const setTopology = (clusterModel) => {\n const leader = clusterModel.nodes.find((node) => node.nodeState === NodeState.LEADER);\n $scope.topology = leader.topologyStatus;\n };\n\n const openSecondaryModeModal = () => {\n const secondaryModalConfig = {\n title: $translate.instant('cluster_management.cluster_configuration_multi_region.secondary_cluster_settings'),\n templateUrl: 'js/angular/clustermanagement/templates/modal/secondary-mode-modal.html',\n controller: ['$scope', '$uibModalInstance', 'config', secondaryModeModalController],\n size: 'lg',\n warning: true,\n backdrop: 'static'\n };\n\n return ModalService.openCustomModal(secondaryModalConfig).result;\n\n // Controller for the secondary mode modal\n function secondaryModeModalController($scope, $uibModalInstance, config) {\n $scope.rpcAddress = '';\n $scope.tag = '';\n $scope.title = config.title;\n\n $scope.onClick = ($event) => $event.stopPropagation();\n $scope.ok = () => {\n $uibModalInstance.close({\n primaryNode: $scope.rpcAddress,\n tag: $scope.tag\n });\n };\n $scope.cancel = () => {\n $uibModalInstance.dismiss('cancel');\n };\n }\n };\n\n const updateClusterData = (clusterModel) => {\n setLoader(true);\n ClusterRestService.getClusterConfig()\n .then((response) => {\n $scope.secondaryTag = ClusterConfiguration.fromJSON(response.data).secondaryTag;\n setTopology(ClusterModel.fromJSON(clusterModel));\n }).catch((response) => {\n const msg = getError(response);\n toastr.error(msg, $translate.instant('cluster_management.cluster_configuration_multi_region.error.disabling'));\n })\n .finally(() => setLoader(false));\n };\n\n const handleClusterConfigurationPanelVisibility = (show) => {\n if (!show) {\n $scope.addingTag = false;\n }\n };\n\n const setLoader = (loader, message) => {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderMessage = message;\n $scope.loaderTimeout = $timeout(() => {\n $scope.loader = loader;\n }, 150);\n } else {\n $scope.loader = false;\n }\n };\n\n // =========================\n // Events and watchers\n // =========================\n const subscribeHandlers = () => {\n subscriptions.push($scope.$watch('clusterModel', function(newValue, oldValue) {\n if (newValue !== oldValue) {\n updateClusterData(newValue);\n }\n }, true));\n subscriptions.push(ClusterViewContextService.onShowClusterConfigurationPanel(handleClusterConfigurationPanelVisibility));\n };\n\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n $scope.$on('$destroy', function () {\n removeAllListeners();\n });\n\n // =========================\n // Initialization\n // =========================\n const init = () => {\n $scope.isAdmin = authenticationService.isAuthenticated() && authorizationService.isAdmin();\n subscribeHandlers();\n updateClusterData($scope.clusterModel);\n };\n init();\n }\n };\n}\n","import 'angular/utils/local-storage-adapter';\nimport 'angular/clustermanagement/directives/cluster-legend.directive';\nimport * as CDS from \"../services/cluster-drawing.service\";\nimport {ARROW_CONFIG} from \"../services/cluster-drawing.service\";\nimport {cloneDeep, isEmpty} from \"lodash\";\nimport {CLICK_IN_VIEW, CREATE_CLUSTER, MODEL_UPDATED, NODE_SELECTED} from \"../events\";\nimport {select} from 'd3';\nimport {\n AuthorizationService,\n service,\n} from '@ontotext/workbench-api';\n\nconst d3 = {select};\nconst navigationBarWidthFull = 240;\nconst navigationBarWidthCollapsed = 70;\nlet navigationBarWidth = navigationBarWidthFull;\nconst nodeRadius = 45;\n\n// Labels in translation map is dynamically translated and reassigned. It contains defaults\nconst translationsMap = {\n no_cluster_configured: '',\n create_cluster_btn: '',\n legend_node_state: '',\n legend_link_state: '',\n node_state_leader: \"Leader\",\n node_state_follower: \"Follower\",\n node_state_candidate: \"Candidate\",\n node_state_no_cluster: \"No cluster\",\n node_state_out_of_sync: \"Out of sync\",\n node_state_no_connection: \"No connection\",\n node_state_read_only: \"Read only\",\n node_state_restricted: \"Restricted\",\n link_state_in_sync: \"In sync\",\n link_state_syncing: \"Syncing\",\n link_state_out_of_sync: \"Out of sync\",\n recovery_state: {\n searching_for_node: \"Searching for node\",\n waiting_for_snapshot: \"Waiting for snapshot from node\",\n receiving_snapshot: \"Receiving a snapshot from node\",\n applying_snapshot: \"Applying a snapshot\",\n building_snapshot: \"Building a snapshot for node\",\n sending_snapshot: \"Sending a snapshot to node\",\n recovery_operation_failure_warning: \"Node unable to recover. Action required\",\n },\n};\n\nconst idTranslationKeyMap = {\n node_state: 'legend_node_state',\n link_state: 'legend_link_state',\n};\n\nconst clusterManagementDirectives = angular.module('graphdb.framework.clustermanagement.directives.cluster-graphical-view', [\n 'graphdb.framework.utils.localstorageadapter',\n 'graphdb.framework.clustermanagement.directives.cluster-legend',\n]);\n\nclusterManagementDirectives.directive('clusterGraphicalView', ['$window', 'LocalStorageAdapter', 'LSKeys', 'UriUtils', '$translate', '$jwtAuth', '$rootScope', 'ClusterViewContextService',\n function($window, LocalStorageAdapter, LSKeys, UriUtils, $translate, $jwtAuth, $rootScope, ClusterViewContextService) {\n return {\n restrict: 'E',\n scope: {\n clusterModel: '=',\n },\n link: function(scope, element) {\n // =========================\n // Private variables\n // =========================\n const authorizationService = service(AuthorizationService);\n\n const w = angular.element($window);\n const subscriptions = [];\n let hasAccess;\n let width = getWindowWidth();\n let height = getWindowHeight();\n let clusterZoneRadius = Math.min(width, height) / 2 - 100;\n let clusterZoneX = width / 2;\n let clusterZoneY = height / 2;\n let hasCluster;\n\n // SVG components\n let clusterZone;\n let nodesGroup;\n let linksGroup;\n\n // =========================\n // Public variables\n // =========================\n\n // =========================\n // Public functions\n // =========================\n\n scope.width = function() {\n return width;\n };\n\n scope.height = function() {\n return height;\n };\n\n // =========================\n // Private functions\n // =========================\n\n function resize() {\n const svg = ClusterViewContextService.getClusterViewD3Container();\n // recalculates with new screen width\n width = getWindowWidth();\n height = getWindowHeight();\n svg.attr(\"width\", width);\n svg.attr(\"height\", height);\n plot();\n }\n\n function updateTranslations(translationMapObject, translationAppend = '') {\n Object.keys(translationMapObject).forEach((key) => {\n let compoundKey = '';\n if (translationAppend) {\n compoundKey += translationAppend;\n }\n compoundKey += `.${key}`;\n const value = translationMapObject[key];\n if (typeof value === 'string') {\n translationMapObject[key] = $translate.instant(`cluster_management.cluster_graphical_view${compoundKey}`);\n } else if (typeof value === 'object') {\n updateTranslations(value, compoundKey);\n }\n });\n }\n\n function getWindowWidth() {\n const collapsed = LocalStorageAdapter.get(LSKeys.MENU_STATE) === 'collapsedMenu';\n navigationBarWidth = collapsed ? navigationBarWidthCollapsed : navigationBarWidthFull;\n // 95% avoids horizontal scrollbars and adds some margin\n return Math.max(Math.floor(($window.innerWidth - navigationBarWidth) * 0.95), 600);\n }\n\n function getWindowHeight() {\n // 95% avoids horizontal scrollbars and adds some margin\n return Math.max((($window.innerHeight - 250) * 0.95), 675);\n }\n\n function updateLabels() {\n CDS.updateClusterZoneLabels(hasCluster, clusterZone, translationsMap);\n Object.keys(idTranslationKeyMap).forEach((elementId) => {\n d3.select(`#${elementId}`).text(getLabelFor(elementId));\n });\n }\n\n function getLabelFor(elementId) {\n const labelKey = idTranslationKeyMap[elementId];\n return translationsMap[labelKey];\n }\n\n function createClusterZone(hasCluster) {\n const svg = CDS.createClusterSvgElement(element[0])\n .attr('width', width)\n .attr('height', height);\n\n clusterZone = CDS.createClusterZone(svg, hasCluster);\n\n linksGroup = svg.append('g').attr('id', 'links-group');\n nodesGroup = svg.append('g').attr('id', 'nodes-group');\n\n CDS.addArrowHead(svg, ARROW_CONFIG.BIG);\n CDS.addArrowHead(svg, ARROW_CONFIG.SMALL);\n\n ClusterViewContextService.updateClusterViewD3Container(svg);\n }\n\n function createNodes(nodes) {\n const nodeData = nodesGroup.selectAll('#node-group').data(nodes, (node) => node.address);\n const nodesElements = CDS.createNodes(nodeData, nodeRadius);\n nodesElements\n .on('click', (event, d) => {\n scope.$emit(NODE_SELECTED, d);\n // position the tooltip according to the node!\n const tooltip = d3.select('.nodetooltip');\n const windowWidth = $(window).width();\n if (event.pageX < windowWidth / 2) {\n // left\n tooltip.style(\"left\", event.pageX + \"px\");\n tooltip.style(\"right\", \"\");\n } else {\n // right\n tooltip.style(\"left\", \"\");\n tooltip.style(\"right\", (windowWidth - event.pageX) + \"px\");\n }\n tooltip.style(\"top\", (event.pageY - 28) + \"px\");\n });\n CDS.updateNodes(nodesElements);\n CDS.positionNodesOnClusterZone(nodesElements, clusterZoneX, clusterZoneY, clusterZoneRadius);\n }\n\n function drawLinks(links, nodes) {\n const linksData = linksGroup.selectAll('.link').data(links, (link) => link.id);\n CDS.createLinks(linksData);\n CDS.updateLinks(linksData, nodes);\n CDS.updateLinkIcons(linksGroup, links, nodes);\n }\n\n function resizeClusterComponent() {\n calculateClusterZoneProperties();\n CDS.moveElement(clusterZone, clusterZoneX, clusterZoneY);\n clusterZone\n .select('.cluster-zone')\n .attr('r', clusterZoneRadius);\n }\n\n function calculateClusterZoneProperties() {\n clusterZoneRadius = Math.min(width, height) / 2 - 100;\n clusterZoneX = width / 2;\n clusterZoneY = height / 2;\n }\n\n function setClusterZoneType(hasCluster) {\n CDS.setCreateClusterZone(hasCluster, clusterZone, translationsMap, hasAccess);\n if (!hasCluster && hasAccess) {\n clusterZone.on('mouseup', () => {\n scope.$emit(CREATE_CLUSTER);\n });\n }\n }\n\n function getNodesModel() {\n const nodes = cloneDeep(scope.clusterModel.nodes) || [];\n nodes.forEach((node) => {\n node.hostname = UriUtils.shortenIri(node.endpoint);\n if (!isEmpty(node.recoveryStatus)) {\n let messageLabelKey = `cluster_management.cluster_graphical_view.recovery_state.${node.recoveryStatus.state.toLowerCase()}`;\n const hasAffectedNodes = node.recoveryStatus.affectedNodes && node.recoveryStatus.affectedNodes.length > 0;\n if (hasAffectedNodes) {\n messageLabelKey += '_with_affected_node';\n }\n node.recoveryStatus.message = $translate.instant(messageLabelKey, {node: node.recoveryStatus.affectedNodes.join(', ')});\n }\n });\n return nodes;\n }\n\n function mousedownHandler(event) {\n scope.$emit(CLICK_IN_VIEW, event.target);\n }\n\n function plot() {\n resizeClusterComponent();\n if (hasCluster !== scope.clusterModel.hasCluster) {\n hasCluster = !!scope.clusterModel.hasCluster;\n setClusterZoneType(hasCluster);\n }\n const nodes = getNodesModel();\n createNodes(nodes);\n const links = cloneDeep(scope.clusterModel.links) || [];\n drawLinks(links, nodes);\n }\n\n // =========================\n // Events and watchers\n // =========================\n\n const subscribeHandlers = () => {\n w.bind('resize', resize);\n w.bind('mousedown', mousedownHandler);\n\n subscriptions.push($rootScope.$on('$translateChangeSuccess', function() {\n updateTranslations(translationsMap);\n updateLabels();\n }));\n\n subscriptions.push(scope.$on(MODEL_UPDATED, function() {\n plot();\n }));\n };\n\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n scope.$on(\"$destroy\", function() {\n w.unbind('resize', resize);\n w.unbind('mousedown', mousedownHandler);\n CDS.removeEventListeners();\n removeAllListeners();\n });\n\n // =========================\n // Initialization\n // =========================\n\n function initialize() {\n hasAccess = authorizationService.isAdmin();\n subscribeHandlers();\n updateTranslations(translationsMap);\n const hasCluster = !!(scope.clusterModel.nodes && scope.clusterModel.nodes.length);\n createClusterZone(hasCluster);\n plot();\n }\n initialize();\n },\n };\n },\n]);\n","import {Location} from \"../../models/clustermanagement/cluster\";\n\nconst modules = [];\nangular.module('graphdb.framework.clustermanagement.directives.cluster-nodes-configuration', modules)\n .directive('clusterNodesConfiguration', ClusterNodesConfigurationComponent);\n\nClusterNodesConfigurationComponent.$inject = ['$translate', '$timeout', 'productInfo', 'toastr', 'RemoteLocationsService', 'ClusterContextService', 'ModalService'];\n\nfunction ClusterNodesConfigurationComponent($translate, $timeout, productInfo, toastr, RemoteLocationsService, ClusterContextService, ModalService) {\n return {\n restrict: 'E',\n templateUrl: 'js/angular/clustermanagement/templates/cluster-nodes-configuration.html',\n link: ($scope) => {\n // =========================\n // Private variables\n // =========================\n const subscriptions = [];\n\n // =========================\n // Public variables\n // =========================\n $scope.rowHeights = {};\n $scope.editedNodeIndex = undefined;\n $scope.allSuggestions = [];\n $scope.loader = false;\n $scope.errors = [];\n $scope.addNewLocation = false;\n $scope.hasCluster = false;\n\n /**\n * Adds a new (empty) node to the list of cluster nodes for editing.\n */\n $scope.addNode = () => {\n $scope.addNewLocation = true;\n $scope.newLocation = new Location();\n // Timeout used because field is added dynamically on \"Add Node\" and needs to render before it can be focused\n $timeout(function() {\n const input = document.querySelector(\"input[name='location']\");\n if (input) {\n input.focus();\n }\n }, 0);\n };\n\n /**\n * Filters suggestions based on user input for node's endpoint.\n * @param {Object} node - The node object with an endpoint property.\n */\n $scope.filterSuggestions = (node) => {\n const query = node.endpoint && node.endpoint.toLowerCase();\n if (query) {\n $scope.suggestions = $scope.allSuggestions.filter((item) => item.toLowerCase().includes(query));\n $scope.showDropdown = true;\n } else {\n $scope.suggestions = [];\n $scope.showDropdown = false;\n }\n };\n\n /**\n * Selects a suggestion from the dropdown and updates the node's endpoint.\n * @param {Object} node - The node object to update.\n * @param {string} suggestion - The selected suggestion for the node's endpoint.\n */\n $scope.selectSuggestion = (node, suggestion) => {\n node.endpoint = suggestion;\n $scope.suggestions = [];\n $scope.showDropdown = false;\n };\n\n /**\n * Hides the suggestions dropdown after a timeout, used after user selection or clicking away.\n */\n $scope.hideSuggestions = () => {\n $timeout(() => {\n $scope.showDropdown = false;\n }, 200);\n };\n\n /**\n * Handles keyboard events for form input fields.\n * Processes Enter key to save the node when form is valid and Escape key to cancel.\n *\n * @param {KeyboardEvent} event - The keyboard event object\n * @param {boolean} formValid - Whether the current form is valid\n * @param {string} endpoint - The endpoint URL to save\n */\n $scope.handleKeydown = function(event, formValid, endpoint) {\n if (event.key === 'Enter' && formValid) {\n event.preventDefault();\n $scope.saveNode(endpoint);\n } else if (event.key === 'Escape') {\n $scope.cancel();\n }\n };\n\n /**\n * Saves a node to the cluster based on the provided endpoint.\n * If the node is found in the cluster deletion list, it is restored.\n * If the node is available in the cluster, it is added.\n * Otherwise, a new location is created and added.\n *\n * @param {string} endpoint - The endpoint of the node to save.\n */\n $scope.saveNode = (endpoint) => {\n const availableList = ClusterContextService.getAvailable(true);\n const node = ClusterContextService.findByEndpoint(availableList, endpoint) || new Location(endpoint);\n const oldNode = ClusterContextService.getPendingReplace();\n\n handleNodeSave(node, oldNode);\n };\n\n /**\n * Deletes a node from the cluster.\n * @param {number} index - The index of the node to delete.\n * @param {ClusterItemViewModel} itemView - The item to delete.\n * @return {void}\n */\n $scope.deleteNode = (index, itemView) => {\n ModalService.openSimpleModal({\n title: $translate.instant('location.confirm.detach'),\n message: $translate.instant('location.confirm.detach.warning', {uri: itemView.endpoint}),\n warning: true,\n }).result.then(() => {\n ClusterContextService.deleteFromCluster(itemView.item);\n });\n };\n\n /**\n * Initiates the replacement of a node in the cluster view.\n * @param {number} index - The zero-based index of the node in the cluster view array that is to be replaced.\n * @param {ClusterItemViewModel} itemView - The node object representing the current state of the node to be replaced.\n * @return {void}\n */\n $scope.replaceNode = (index, itemView) => {\n ModalService.openSimpleModal({\n title: $translate.instant('location.change.confirm'),\n message: $translate.instant('location.change.confirm.warning'),\n warning: true,\n }).result.then(() => {\n ClusterContextService.setPendingReplace(itemView.item);\n $scope.editedNodeIndex = index;\n });\n };\n\n /**\n * Checks if the current cluster configuration is valid.\n * The configuration is considered valid if there are at least two nodes and no nodes are being edited.\n * @return {boolean} True if the configuration is valid, false otherwise.\n */\n $scope.isClusterConfigurationValid = () => {\n const isNotInEditMode = $scope.editedNodeIndex === undefined;\n const isNotInAddMode = $scope.addNewLocation === false;\n const hasValidNodes = ClusterContextService.hasValidNodesCount();\n const hasValidConfiguration = $scope.form.$valid;\n return isNotInEditMode && isNotInAddMode && hasValidNodes && hasValidConfiguration;\n };\n\n /**\n * Sets the loader state with a message.\n * The loader state is shown with a delay to avoid flickering for short operations.\n * @param {boolean} loader - Whether to show the loader.\n * @param {string} [message] - The message to show with the loader.\n */\n $scope.setLoader = (loader, message) => {\n $timeout.cancel($scope.loaderTimeout);\n if (loader) {\n $scope.loaderTimeout = $timeout(() => {\n $scope.loader = loader;\n $scope.loaderMessage = message;\n }, 300);\n } else {\n $scope.loader = false;\n }\n };\n\n /**\n * Determines the CSS class for the advanced options button based on its expanded state.\n *\n * @return {string} - Returns 'ri-arrow-down-s-line' if the 'advancedOptions' element is expanded, otherwise 'ri-arrow-right-s-line'.\n */\n $scope.getAdvancedOptionsClass = () => {\n const optionsModule = document.getElementById('advancedOptions');\n\n if (optionsModule) {\n const isAriaExpanded = optionsModule.getAttribute('aria-expanded');\n if (isAriaExpanded && isAriaExpanded === 'true') {\n return 'ri-arrow-down-s-line';\n }\n }\n return 'ri-arrow-right-s-line';\n };\n\n /**\n * Cancels the current action and resets the form state.\n *\n * @return {void}\n */\n $scope.cancel = () => {\n $scope.editedNodeIndex = undefined;\n $scope.addNewLocation = false;\n resetNodeEditState();\n ClusterContextService.emitUpdateClusterView();\n };\n\n $scope.restoreNode = (node) => {\n ClusterContextService.restoreNode(node.item);\n };\n\n // =========================\n // Private functions\n // =========================\n /**\n * Handles the saving of an existing node in the cluster.\n * @param {Object} node - The node object found in the cluster.\n * @param {Object|null} oldNode - The old node that is being replaced (if any).\n */\n function handleNodeSave(node, oldNode) {\n if (oldNode) {\n ClusterContextService.replace(oldNode, node);\n } else {\n ClusterContextService.addLocation(node);\n }\n resetNodeEditState();\n }\n\n /**\n * Resets the state of the node edit operation.\n */\n const resetNodeEditState = () => {\n ClusterContextService.setPendingReplace(undefined);\n $scope.editedNodeIndex = undefined;\n $scope.addNewLocation = false;\n };\n\n const onClusterViewChanged = (cluster) => {\n $scope.hasCluster = ClusterContextService.hasCluster();\n $scope.viewModel = ClusterContextService.getViewModel();\n $scope.clusterNodesEndpoints = $scope.viewModel.map((node) => node.endpoint);\n $scope.clusterConfiguration = ClusterContextService.getClusterConfiguration();\n $scope.allSuggestions = ClusterContextService.getAvailableNodeEndpoints();\n $scope.canDeleteNode = ClusterContextService.canDeleteNode();\n };\n\n // =========================\n // Subscriptions\n // =========================\n\n /**\n * Removes all listeners and unsubscribes from events when the directive is destroyed.\n */\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n const unwatch = $scope.$watchGroup([\n 'editedNodeIndex',\n 'addNewLocation',\n 'clusterConfiguration.electionMinTimeout',\n 'clusterConfiguration.electionRangeTimeout',\n 'clusterConfiguration.heartbeatInterval',\n 'clusterConfiguration.messageSizeKB',\n 'clusterConfiguration.verificationTimeout',\n 'clusterConfiguration.transactionLogMaximumSizeGB',\n ], (newValues, oldValues) => {\n const isValid = $scope.isClusterConfigurationValid();\n ClusterContextService.updateClusterValidity(isValid);\n });\n\n subscriptions.push(unwatch);\n subscriptions.push(ClusterContextService.onClusterViewChanged(onClusterViewChanged));\n $scope.$on('$destroy', removeAllListeners);\n },\n };\n}\n","/**\n * @ngdoc directive\n * @name asciiValidator\n * @restrict A\n * @module graphdb.framework.core.directives.ascii-validator\n * @description\n * A custom AngularJS directive that validates if an input string contains only printable ASCII characters,\n * excluding spaces. Printable ASCII characters range from ASCII code 33 (`!`) to ASCII code 126 (`~`).\n *\n * **Usage:**\n * ```html\n * <input type=\"text\" ng-model=\"inputText\" ascii-validator>\n * ```\n *\n * @requires ngModel\n */\nangular.module('graphdb.framework.core.directives.ascii-validator', [])\n .directive('asciiValidator', function () {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attrs, ngModel) {\n function validateAscii(value) {\n // Regular expression for printable ASCII characters excluding space (ASCII codes 33-126)\n const asciiRegex = /^[\\x21-\\x7E]*$/;\n\n const isValid = asciiRegex.test(value);\n ngModel.$setValidity('asciiValidator', isValid);\n return value;\n }\n ngModel.$parsers.push(validateAscii);\n ngModel.$formatters.push(validateAscii);\n }\n };\n});\n","/**\n * @ngdoc directive\n * @name lengthValidator\n * @restrict A\n * @module graphdb.framework.core.directives.length-validator\n * @description\n * A custom AngularJS directive that validates the length of an input string.\n * The directive ensures that the string length falls within a specified range,\n * using the `min-length` and `max-length` attributes.\n *\n * If no `min-length` is provided, the minimum length is set to 0.\n * If no `max-length` is provided, the maximum length is set to Infinity.\n *\n * **Usage:**\n * ```html\n * <input type=\"text\" ng-model=\"inputText\" length-validator min-length=\"5\" max-length=\"10\">\n * ```\n *\n * @param {number} minLength (optional) The minimum length of the input string. Defaults to 0 if not provided.\n * @param {number} maxLength (optional) The maximum length of the input string. Defaults to Infinity if not provided.\n * @requires ngModel\n */\nangular.module('graphdb.framework.core.directives.length-validator', [])\n .directive('lengthValidator', function () {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function(scope, element, attrs, ngModel) {\n function validateLength(value) {\n const minLength = attrs.minLength ? parseInt(attrs.minLength, 10) : 0;\n const maxLength = attrs.maxLength ? parseInt(attrs.maxLength, 10) : Infinity;\n const isValid = value && value.length >= minLength && value.length <= maxLength;\n ngModel.$setValidity('lengthValidator', isValid);\n return value;\n }\n ngModel.$parsers.push(validateLength);\n ngModel.$formatters.push(validateLength);\n }\n };\n});\n","/**\n * @ngdoc directive\n * @name validateDuplicateUrl\n * @module graphdb.framework.core.directives.validate-duplicate-url\n * @restrict A\n *\n * @description\n * This directive validates an input field for duplicate URLs. It checks whether the input URL\n * exists within a provided list of excluded or duplicate URLs and marks the input as invalid if a match is found.\n *\n * The directive requires an array of URLs to be passed using the `excluded-urls` attribute.\n * If the input URL is found within this array, a `duplicateUrl` error is added to the form control.\n *\n * This directive works in conjunction with other validators such as `validate-url` for format validation.\n *\n * @example\n * <pre>\n * <form name=\"myForm\">\n * <!-- Basic URL duplicate validation -->\n * <input type=\"text\" name=\"urlField\" ng-model=\"url\" validate-duplicate-url excluded-urls=\"existingUrls\"/>\n * <div ng-show=\"myForm.urlField.$error.duplicateUrl\">\n * URL already exists.\n * </div>\n * </form>\n * </pre>\n *\n * @usage\n * This directive can be added as an attribute to any input field where duplicate URL validation is required.\n * It will automatically validate the input value against the provided list of excluded URLs.\n *\n * @param {Array} excludedUrls - An array of URLs to check against for duplicates.\n * @returns {boolean} Whether the URL is valid. It returns `true` if the URL is not in the `excludedUrls` array and `false` if it is.\n */\nangular\n .module('graphdb.framework.core.directives.validate-duplicate-url', [])\n .directive('validateDuplicateUrl', validateDuplicateUrl);\n\nfunction validateDuplicateUrl() {\n return {\n restrict: 'A',\n require: 'ngModel',\n scope: {\n excludedUrls: '='\n },\n link: function (scope, element, attr, ctrl) {\n ctrl.$validators.duplicateUrl = function (modelValue, viewValue) {\n if (scope.excludedUrls && scope.excludedUrls.includes(viewValue)) {\n ctrl.$setValidity('duplicateUrl', false);\n return false;\n } else {\n ctrl.$setValidity('duplicateUrl', true);\n }\n return true;\n };\n }\n };\n}\n","/**\n * @ngdoc directive\n * @name validateUrl\n * @module graphdb.framework.core.directives.validate-url\n * @restrict A\n *\n * @description\n * This directive validates the URL input field based on a specified pattern.\n * It ensures that the input URL adheres to standard URL formats and provides\n * visual feedback to the user if the URL is invalid.\n *\n * The directive can also be configured to exclude certain substrings or protocols from valid URLs,\n * and to control whether empty input values are considered valid.\n *\n * @example\n * <pre>\n * <form name=\"myForm\">\n * <!-- Basic URL validation -->\n * <input type=\"text\" name=\"urlField\" ng-model=\"url\" validate-url/>\n * <div ng-show=\"myForm.urlField.$error.validUrl\">\n * Invalid URL format.\n * </div>\n *\n * <!-- URL validation excluding a specific substring -->\n * <input type=\"text\" name=\"urlFieldWithExclusion\" ng-model=\"url\" validate-url exclude=\"/repositories\"/>\n * <div ng-show=\"myForm.urlFieldWithExclusion.$error.validUrl\">\n * Invalid URL format or contains excluded substring.\n * </div>\n *\n * <!-- URL validation excluding a specific protocol -->\n * <input type=\"text\" name=\"urlFieldWithProtocolExclusion\" ng-model=\"url\" validate-url exclude-protocol=\"ftp\"/>\n * <div ng-show=\"myForm.urlFieldWithProtocolExclusion.$error.validUrl\">\n * Invalid URL format or uses an excluded protocol.\n * </div>\n *\n * <!-- URL validation that does not allow empty values -->\n * <input type=\"text\" name=\"urlFieldNoEmpty\" ng-model=\"url\" validate-url allow-empty=\"false\"/>\n * <div ng-show=\"myForm.urlFieldNoEmpty.$error.validUrl\">\n * Invalid URL format or empty value not allowed.\n * </div>\n *\n * <!-- URL validation with both substring and protocol exclusions, and empty values not allowed -->\n * <input type=\"text\" name=\"urlFieldFullValidation\" ng-model=\"url\" validate-url exclude=\"/repositories\" exclude-protocol=\"ftp\" allow-empty=\"false\"/>\n * <div ng-show=\"myForm.urlFieldFullValidation.$error.validUrl\">\n * Invalid URL format, contains excluded substring, uses an excluded protocol, or empty value not allowed.\n * </div>\n * </form>\n * </pre>\n *\n * @usage\n * This directive can be added as an attribute to any input field where URL validation is required.\n * It will automatically validate the input value.\n *\n * Optional attributes:\n * - `exclude`: A string specifying a substring that must not be present in the URL.\n * - `exclude-protocol`: A comma-separated list of protocols (e.g., `ftp,http`) that must not be used in the URL.\n * - `allow-empty`: A boolean attribute (`true` by default). If set to `false`, empty values are considered invalid.\n */\n\nimport {UrlUtils} from \"../../utils/url-utils\";\n\nconst modules = [];\n\nangular\n .module('graphdb.framework.core.directives.validate-url', modules)\n .directive('validateUrl', validateUrl);\n\nfunction validateUrl() {\n return {\n restrict: 'A',\n require: 'ngModel',\n link: function (scope, element, attr, ctrl) {\n ctrl.$validators.validUrl = function (modelValue, viewValue) {\n // Check if empty values should be allowed\n if (ctrl.$isEmpty(viewValue)) {\n return attr.allowEmpty !== 'false';\n }\n\n if (!UrlUtils.isValidUrl(viewValue)) {\n return false;\n }\n\n if (attr.exclude && !UrlUtils.doesNotContain(viewValue, attr.exclude)) {\n return false;\n }\n\n if (attr.excludeProtocol) {\n const excludedProtocols = attr.excludeProtocol.split(',');\n if (!UrlUtils.doesNotUseProtocol(viewValue, excludedProtocols)) {\n return false;\n }\n }\n return true;\n };\n }\n };\n}\n","const httpRegex = /^(h|ht|htt|http|https|http:|https:|http:\\/|https:\\/|http:\\/\\/|https:\\/\\/|https?:\\/\\/[\\S]*)$/i;\nconst ftpRegex = /^(f|ft|ftp|ftps|ftp:|ftps:|ftp:\\/|ftps:\\/|ftp:\\/\\/|ftps:\\/\\/[\\S]*)$/i;\n\n\n/**\n * Utilities for URL manipulation, validation, etc.\n */\nexport class UrlUtils {\n /**\n * Validates whether the given string is a valid URL or a partial URL that follows the rules.\n *\n * @param {string} url - The URL string to validate.\n * @return {boolean} True if the URL is valid or a valid partial URL, false otherwise.\n */\n static isValidUrl(url) {\n return httpRegex.test(url) || ftpRegex.test(url);\n }\n\n /**\n * Checks if the URL contains an excluded substring.\n *\n * @param {string} url - The URL string to check.\n * @param {string} exclude - The substring to exclude.\n * @return {boolean} True if the URL does not contain the substring, false if it does.\n */\n static doesNotContain(url, exclude) {\n return !new RegExp(exclude).test(url);\n }\n\n /**\n * Checks if the URL uses an excluded protocol.\n *\n * @param {string} url - The URL string to check.\n * @param {Array<string>} excludedProtocols - The protocols to exclude.\n * @return {boolean} True if the URL does not use the excluded protocols, false if it does.\n */\n static doesNotUseProtocol(url, excludedProtocols) {\n const protocolPattern = new RegExp('^(' + excludedProtocols.join('|') + ')://', 'i');\n return !protocolPattern.test(url);\n }\n}\n","define(['d3'],\n function(d3) {\n (function() {\n\n // Node/CommonJS - require D3\n if (typeof (module) !== 'undefined' && typeof (exports) !== 'undefined' && typeof (d3) == 'undefined') {\n d3 = require('d3');\n }\n })();\n\n function attrsFunction(selection, map) {\n return selection.each(function () {\n var x = map.apply(this, arguments), s = select(this);\n for (var name in x) s.attr(name, x[name]);\n });\n }\n\n function attrsObject(selection, map) {\n for (var name in map) selection.attr(name, map[name]);\n return selection;\n }\n\n function selection_attrs(map) {\n return (typeof map === \"function\" ? attrsFunction : attrsObject)(this, map);\n }\n\n d3.selection.prototype.attrs = selection_attrs\n\n d3.selection.prototype.moveToFront = function () {\n return this.each(function () {\n d3.select(this.parentNode.appendChild(this));\n });\n };\n\n d3.selection.prototype.moveToBack = function () {\n return this.each(function () {\n const firstChild = this.parentNode.firstChild;\n if (firstChild) {\n this.parentNode.insertBefore(this, firstChild);\n }\n });\n };\n\n return d3;\n });\n"],"names":["angular","module","directive","ClusterConfiguration","$inject","CONFIGURATION_TABS","PROPERTIES","NODES","MULTI_REGION","$jwtAuth","$uibModal","$translate","toastr","ClusterViewContextService","restrict","templateUrl","scope","currentNode","clusterModel","clusterConfiguration","link","$scope","subscriptions","activeTab","closeClusterConfigurationPanel","hideClusterConfigurationPanel","switchTab","$event","tab","$on","forEach","subscription","push","onShowClusterConfigurationPanel","show","ClusterNodes","ClusterProperties","authorizationService","service","AuthorizationService","authenticationService","AuthenticationService","isAdmin","showEditConfigurationDialog","open","controller","size","resolve","data","result","finally","$emit","UPDATE_CLUSTER","force","showDeleteDialog","then","forceDelete","DELETE_CLUSTER","isAuthenticated","TagLengthConstraints","minLen","maxLen","MultiRegion","$timeout","ModalService","ClusterRestService","topology","undefined","TopologyState","addingTag","loaderTimeout","secondaryTag","add","cancel","createTag","tag","payload","setLoader","addCusterTag","success","instant","catch","response","msg","getError","error","deleteTag","openSimpleModal","title","message","warning","backdrop","stopPropagation","deleteClusterTag","enableSecondaryMode","confirmConfig","confirmButtonKey","openSecondaryModeModal","disableSecondaryMode","secondaryModalConfig","$uibModalInstance","config","rpcAddress","onClick","ok","close","primaryNode","dismiss","openCustomModal","updateClusterData","getClusterConfig","fromJSON","leader","nodes","find","node","nodeState","NodeState","LEADER","topologyStatus","setTopology","ClusterModel","loader","loaderMessage","$watch","newValue","oldValue","d3","select","navigationBarWidth","translationsMap","no_cluster_configured","create_cluster_btn","legend_node_state","legend_link_state","node_state_leader","node_state_follower","node_state_candidate","node_state_no_cluster","node_state_out_of_sync","node_state_no_connection","node_state_read_only","node_state_restricted","link_state_in_sync","link_state_syncing","link_state_out_of_sync","recovery_state","searching_for_node","waiting_for_snapshot","receiving_snapshot","applying_snapshot","building_snapshot","sending_snapshot","recovery_operation_failure_warning","idTranslationKeyMap","node_state","link_state","$window","LocalStorageAdapter","LSKeys","UriUtils","$rootScope","element","w","hasAccess","hasCluster","clusterZone","nodesGroup","linksGroup","width","getWindowWidth","height","getWindowHeight","clusterZoneRadius","Math","min","clusterZoneX","clusterZoneY","resize","svg","getClusterViewD3Container","attr","plot","updateTranslations","translationMapObject","translationAppend","Object","keys","key","compoundKey","value","collapsed","get","MENU_STATE","max","floor","innerWidth","innerHeight","mousedownHandler","event","CLICK_IN_VIEW","target","CDS","on","CREATE_CLUSTER","setClusterZoneType","cloneDeep","hostname","shortenIri","endpoint","isEmpty","recoveryStatus","messageLabelKey","state","toLowerCase","affectedNodes","length","join","getNodesModel","nodeData","selectAll","address","nodesElements","d","NODE_SELECTED","tooltip","windowWidth","$","window","pageX","style","pageY","createNodes","links","linksData","id","drawLinks","unbind","bind","elementId","text","getLabelFor","MODEL_UPDATED","append","ARROW_CONFIG","BIG","SMALL","updateClusterViewD3Container","createClusterZone","ClusterNodesConfigurationComponent","productInfo","RemoteLocationsService","ClusterContextService","rowHeights","editedNodeIndex","allSuggestions","errors","addNewLocation","addNode","newLocation","Location","input","document","querySelector","focus","filterSuggestions","query","suggestions","filter","item","includes","showDropdown","selectSuggestion","suggestion","hideSuggestions","handleKeydown","formValid","preventDefault","saveNode","availableList","getAvailable","oldNode","findByEndpoint","getPendingReplace","replace","addLocation","resetNodeEditState","deleteNode","index","itemView","uri","deleteFromCluster","replaceNode","setPendingReplace","isClusterConfigurationValid","isNotInEditMode","isNotInAddMode","hasValidNodes","hasValidNodesCount","hasValidConfiguration","form","$valid","getAdvancedOptionsClass","optionsModule","getElementById","isAriaExpanded","getAttribute","emitUpdateClusterView","restoreNode","unwatch","$watchGroup","newValues","oldValues","isValid","updateClusterValidity","onClusterViewChanged","cluster","viewModel","getViewModel","clusterNodesEndpoints","map","getClusterConfiguration","getAvailableNodeEndpoints","canDeleteNode","removeAllListeners","require","attrs","ngModel","validateAscii","test","$setValidity","$parsers","$formatters","validateLength","minLength","parseInt","maxLength","Infinity","excludedUrls","ctrl","$validators","duplicateUrl","modelValue","viewValue","validUrl","$isEmpty","allowEmpty","UrlUtils","isValidUrl","exclude","doesNotContain","excludeProtocol","excludedProtocols","split","doesNotUseProtocol","httpRegex","ftpRegex","url","RegExp","define","attrsFunction","selection","each","x","apply","this","arguments","s","name","attrsObject","prototype","moveToFront","parentNode","appendChild","moveToBack","firstChild","insertBefore"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export const __webpack_esm_id__=34985;export const __webpack_esm_ids__=[5533,22917,23713,34985,39456,62628,85799,99362];export const __webpack_esm_modules__={10027(e,t,o){o(62628),o(23713);var r=o(47775),n=o(41767),s=o(22917),a=o(99362),i=o(5533),c=o(39456),l=o(49722),u=o(40653),p=o(82380),d=o(57154),f=o(33645);function m(e,t,o,n,m,g,x,h,w,y,v,I,R,T){const b=(0,d.service)(d.SecurityContextService),C=(0,d.service)(d.GraphConfigService);let $;e.ContextTypes=a.L,e.contextTypes=a.E.getAllType(),e.currentContextTypeId=a.L.EXPLICIT.id,e.roles=[i.T.SUBJECT,i.T.PREDICATE,i.T.OBJECT,i.T.CONTEXT,i.T.ALL],e.resourceInfo=void 0,e.isLoading=!1,e.fileTypes=y,e.toggleSameAs=()=>{e.resourceInfo.sameAs=!e.resourceInfo.sameAs,e.exploreResource()},e.getActiveRepository=()=>m.getActiveRepository(),e.isTripleResource=()=>!!e.resourceInfo.triple,e.encodeURIComponent=e=>encodeURIComponent(e),e.getRdfStarLocalNames=e=>{let t=e.slice();return e.replace(/[<>]+/g,"").split(" ").forEach(e=>{t=t.replace(e,x.getLocalName(e))}),t},e.getLocalName=e=>x.getLocalName(e),e.loadResource=()=>{T.getResourceDetails(e.resourceInfo.uri,e.resourceInfo.triple,e.resourceInfo.context).success(t=>{e.resourceInfo.details=t,e.resourceInfo.context=e.resourceInfo.details.context,"object"!==e.resourceInfo.uri&&(e.resourceInfo.details.encodeURI=encodeURIComponent(e.resourceInfo.details.uri))}).error(e=>o.error(I.instant("explore.error.resource.details",{data:getError(e)}))),e.exploreResource()},e.isContextAvailable=()=>null!==e.resourceInfo.context&&"http://rdf4j.org/schema/rdf4j#SHACLShapeGraph"===e.resourceInfo.context,e.goToGraphsViz=({detail:o})=>{"create"!==o.action?t.path("graphs-visualizations").search("uri",e.resourceInfo.uri).search("config",o.graphConfig?.id):(0,d.openInNewTab)("graphs-visualizations")},e.fetchGraphConfigs=()=>()=>C.getGraphConfigs().then(e=>e.getItems()),e.exploreResource=()=>{E(!0),f.B.isNullOrUndefined(n.context)&&(e.resourceInfo.context=n.context),t.search("role",e.resourceInfo.role),t.replace(),S()},e.downloadExport=t=>{T.getGraph(e.resourceInfo,t.type).then(e=>{t.type.indexOf("json")>-1&&(e=JSON.stringify(e));const o=navigator.userAgent.toLowerCase();if(-1!==o.indexOf("safari")&&-1===o.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const o=new Blob([e],{type:t.type});(0,r.saveAs)(o,"statements"+t.extension)}}).catch(e=>{o.error(getError(e),I.instant("common.error"))}).finally(()=>{E(!1)})},e.openJSONLDExportSettings=function(t){g.open({templateUrl:"js/angular/core/components/export-settings-modal/exportSettingsModal.html",controller:p.V,size:"lg",scope:e,resolve:{format:function(){return t.name}}}).result.then(function(o){e.downloadJSONLDExport(t,o.link,o.currentMode)})},e.downloadJSONLDExport=function(t,n,s){T.getGraph(e.resourceInfo,t.type,n).then(async function(e){if("JSON"===t.name&&(e=JSON.stringify(e)),"JSON-LD"===t.name)switch(s.name){case"expanded":e=await u.expand(e),e=JSON.stringify(e);break;case"flattened":e=await u.flatten(e,n),e=JSON.stringify(e);break;case"compacted":case"framed":e=await u.compact(e,n),e=JSON.stringify(e);break;case"context":e=await u.context(e,n),e=JSON.stringify(e);break;case"frame":e=await u.frame(e,n),e=JSON.stringify(e)}const o=navigator.userAgent.toLowerCase();if(-1!==o.indexOf("safari")&&-1===o.indexOf("chrome"))window.open('data:attachment/csv;filename="statements.'+t.extension+'",'+encodeURIComponent(e),"statements."+t.extension);else{const o=new Blob([e],{type:t.type});(0,r.saveAs)(o,"statements"+t.extension)}}).catch(function(e){const t=getError(e);o.error(t,I.instant("common.error"))})},e.changeRole=t=>{e.resourceInfo.role=t,e.resourceInfo.role===i.T.CONTEXT&&(e.resourceInfo.contextType=a.L.EXPLICIT),e.exploreResource()},e.changeInference=t=>{e.resourceInfo.contextType=a.E.getContextType(t),e.exploreResource()},e.copyToClipboardResult=e=>{h.openCopyToClipboardModal(e)},window.Cypress&&(window.jsonld=u);const E=t=>{e.isLoading=!!t},S=()=>{T.getGraph(e.resourceInfo).then(t=>{((t={})=>{const o={};angular.extend(o,e.yasguiConfig||{showEditorTabs:!1,showToolbar:!1,showResultTabs:!1,showFullscreenButton:!1,showResultInfo:!0,downloadAsOn:!1,showQueryButton:!1,componentId:"resource-view-component",prefixes:$,maxPersistentResponseSize:0,render:c.o.YASR,showYasqeActionButtons:!1,yasqeActionButtons:l._f},t),e.yasguiConfig=o})({sparqlResponse:t})}).catch(e=>{o.error(I.instant("explore.error.resource",{data:getError(e)}))}).finally(()=>{E(!1)})};e.$on("$destroy",()=>{A.forEach(e=>e())});const A=[];A.push(e.$watch(function(){return e.getActiveRepositoryObject()},function(r){r&&(()=>{const r=b.getAuthenticatedUser();m.getPrefixes(m.getActiveRepository()).then(o=>{var c;e.resourceInfo||(e.resourceInfo=new s.r,c=e.resourceInfo,n.prefix&&n.localName&&$[n.prefix]?c.uri=$[n.prefix]+n.localName:t.search().uri?c.uri=t.search().uri+(t.hash()?"#"+t.hash():""):t.search().triple?c.triple=t.search().triple+(t.hash()?"#"+t.hash():""):c.uri=t.absUrl(),c.uri=c.uri&&c.uri.replace(/<|>/g,""),f.B.isNullOrUndefined(n.context)&&(e.resourceInfo.context=n.context),e.resourceInfo.role=t.search().role?t.search().role:i.T.SUBJECT),(t=>{e.resourceInfo.contextType=t.appSettings.DEFAULT_INFERENCE&&!e.resourceInfo.role===i.T.CONTEXT?a.L.ALL:a.L.EXPLICIT,e.resourceInfo.sameAs=t.appSettings.DEFAULT_INFERENCE&&t.appSettings.DEFAULT_SAMEAS})(r),$=o,e.loadResource()}).catch(e=>{o.error(I.instant("get.namespaces.error.msg",{error:getError(e)}))})})()}))}function g(e,t,o,r,s,a,i,c,l,u,p,d){function f(){c.checkAutocompleteStatus().success(function(t){if(!t){const e=(0,n.Gz)(d.instant("explore.autocomplete.warning.msg"));i.warning("",`<div class="autocomplete-toast"><a href="autocomplete">${e}</a></div>`,{allowHtml:!0})}e.autocompleteEnabled=t}).error(function(){i.error(d.instant("explore.error.autocomplete"))})}function m(){p.getNamespaces(r.getActiveRepository()).success(function(t){e.namespaces=t.results.bindings.map(function(e){return{prefix:e.prefix.value,uri:e.namespace.value}}),e.loader=!1}).error(function(t){const o=getError(t);i.error(o,d.instant("common.error")),e.loader=!1})}function g(e){const t=e.indexOf("<")>=0&&e.lastIndexOf(">")===e.length-1,o=-1===e.indexOf("<")&&-1===e.lastIndexOf(">"),r=/^<?[http|urn].*>?$/.test(e)&&(t||o);let n=!1;if(r)if(e.indexOf("http")>=0){const t=e.indexOf("//");n=t>4&&e.substring(t+2).length>0}else e.indexOf("urn")>=0&&(n=e.substring(4).length>0);return r&&n}let x,h;function w(t){function r(t){a(function(){e.form&&(e.form.$dirty=t)})}t||(t=document.getElementById("resources_finder_value").value),t&&g(t)?(r(!1),o.path("resource").search("uri",t)):(r(!0),t&&i.error(d.instant("explore.error.invalid.input")))}e.submit=w,e.getAutocompleteSuggestions=function(t){if(!/<|>/.test(t)&&":"===t.slice(-1)){const o=l.getNamespaceUriForPrefix(e.namespaces,t.slice(0,-1));h=o!==h?o:h,h&&$("#resources_finder_value").val(h)}let o;if(e.autocompleteEnabled){const e=t.replace(h,h+";");o=c.getAutocompleteSuggestions(e)}else o=s.when(e.autocompleteEnabled);return o},e.inputChangedFn=function(){x=document.getElementById("resources_finder_value").value,e.form.$dirty=!(x&&g(x))},e.selectedUriCallback=function(t){e.selectedUri={name:t.title},w(e.selectedUri.name)},e.selectedUri={name:""},e.autocompleteEnabled=!1,angular.isDefined(u.search)&&a(function(){$("#resources_finder_value").val(u.search),$(".search-button").click()},500),e.getActiveRepository()&&(f(),m()),e.$on("repositoryIsSet",function(){f(),m()})}function x(e,t,o,r,n,s,a,i,c,l,u){e.uriParam=o.search().uri,e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newResource=!1,e.datatypeOptions=c.getDatatypeOptions(),e.activeRepository=function(){return n.getActiveRepository()},e.getClassInstancesDetails=function(){l.getNamespaces(e.activeRepository()).success(function(t){e.namespaces=t.results.bindings.map(function(e){return{prefix:e.prefix.value,uri:e.namespace.value}}),e.loader=!1}).error(function(t){const o=getError(t);r.error(o,u.instant("common.error")),e.loader=!1}),i.getDetails(e.uriParam).success(function(t){e.details=t,e.details.encodeURI=encodeURIComponent(e.details.uri)}).error(function(e){r.error(u.instant("explore.error.resource.details",{data:getError(e)}))}),i.getGraph(e.uriParam).then(function(t){const o=c.buildStatements(t,e.uriParam);e.statements=o,e.newResource=!o.length})},e.addStatement=function(){e.newRowPredicate.$setSubmitted(),e.newRowObject.$setSubmitted(),e.newRowContext.$setSubmitted(),e.newRowPredicate.$valid&&e.newRowObject.$valid&&e.newRowContext.$valid&&(e.statements.push(_.cloneDeep(e.newRow)),e.newRow={subject:e.uriParam,object:{type:"uri",datatype:""}},e.newRowPredicate.$setPristine(),e.newRowPredicate.$setUntouched(),e.newRowObject.$setPristine(),e.newRowObject.$setUntouched(),e.newRowContext.$setPristine(),e.newRowContext.$setUntouched())},e.removeStatement=function(t){e.statements.splice(t,1)},e.getLocalName=function(e){return i.getLocalName(e)},e.checkValid=function(e){return!angular.isUndefined(e)||u.instant("explore.validation")},e.validEditRow=function(){return e.rowform.$valid},e.viewTrig=function(){s.open({templateUrl:"js/angular/explore/templates/viewTrig.html",controller:"ViewTrigCtrl",size:"lg",resolve:{data:function(){return c.transformToTrig(e.statements)}}})},e.save=function(){const n=e.newResource?"POST":"PUT";t({method:n,url:"rest/resource?uri="+encodeURIComponent(e.uriParam),headers:{"Content-Type":"application/x-trig"},data:c.transformToTrig(e.statements)}).success(function(){r.success(u.instant("explore.resource.saved"));const t=a(function(){o.path("resource").search("uri",e.uriParam)},500);e.$on("$destroy",function(){a.cancel(t)})}).error(function(e){r.error(getError(e))})},e.$watch(function(){return n.getActiveRepository()},function(){e.activeRepository()&&e.getClassInstancesDetails()}),e.validateUri=function(t){let o=!0;const r=t||"";if(-1===r.indexOf(":"))o=!1;else{const t=r.substring(0,r.indexOf(":"));if(""===i.getNamespaceUriForPrefix(e.namespaces,t)){!1===/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/.test(r)&&(o=!1);const e=r.match(/\//g);(void 0===e||e.length<3)&&(o=!1)}else r.substring(r.indexOf(":")+1).trim().length<1&&(o=!1)}return o}}function h(e,t,o){e.trig=o,e.cancel=function(){t.dismiss("cancel")}}angular.module("graphdb.framework.explore.controllers",["ngCookies","ngRoute","ui.bootstrap","toastr","graphdb.framework.core","graphdb.framework.core.services.repositories","graphdb.framework.explore.services","graphdb.workbench.utils.filetypes","graphdb.framework.rest.explore.rest.service"]).controller("FindResourceCtrl",g).controller("ExploreCtrl",m).controller("EditResourceCtrl",x).controller("ViewTrigCtrl",h),m.$inject=["$scope","$location","toastr","$routeParams","$repositories","$uibModal","ClassInstanceDetailsService","ModalService","RDF4JRepositoriesRestService","FileTypes","$jwtAuth","$translate","$q","ExploreRestService"],g.$inject=["$scope","$http","$location","$repositories","$q","$timeout","toastr","AutocompleteRestService","ClassInstanceDetailsService","$routeParams","RDF4JRepositoriesRestService","$translate"],x.$inject=["$scope","$http","$location","toastr","$repositories","$uibModal","$timeout","ClassInstanceDetailsService","StatementsService","RDF4JRepositoriesRestService","$translate"],h.$inject=["$scope","$uibModalInstance","data"]},39456(e,t,o){o.d(t,{o:()=>r});const r={YASGUI:"mode-yasgui",YASQE:"mode-yasqe",YASR:"mode-yasr"}},99362(e,t,o){o.d(t,{E:()=>r,L:()=>n});class r{constructor(e,t){this.id=e,this.labelKey=t}static getAllType(){return[n.ALL,n.EXPLICIT,n.IMPLICIT]}static getContextType(e){return this.getAllType().find(t=>t.id===e)}}const n={ALL:new r("all","explore.explicit.implicit"),EXPLICIT:new r("explicit","explore.explicit"),IMPLICIT:new r("implicit","explore.implicit")}},85799(e,t,o){o.d(t,{x:()=>r});class r{constructor(){this.image=void 0,this.uri=void 0,this.label=void 0,this.encodeURI=void 0,this.comment=void 0,this.context=void 0}}},22917(e,t,o){o.d(t,{r:()=>s});var r=o(85799),n=o(99362);class s{constructor(){this.role="subject",this.uri=void 0,this.triple=void 0,this.context=void 0,this.contextType=n.L.EXPLICIT,this.sameAs=!0,this.details=new r.x,this.blanks=!0}}},5533(e,t,o){o.d(t,{T:()=>r});const r={SUBJECT:"subject",PREDICATE:"predicate",OBJECT:"object",CONTEXT:"context",ALL:"all"}},23713(){angular.module("graphdb.framework.rest.explore.rest.service",[]).factory("ExploreRestService",t),t.$inject=["$http"];const e="rest/explore";function t(t){return{getResourceDetails:(o,r,n,s)=>t.get(`${e}/details`,{params:{uri:o,triple:r,context:n},headers:{Accept:s||"application/json"}}),getGraph:(o,r,n)=>t.get(`${e}/graph`,{params:{uri:o.uri,triple:o.triple,inference:o.contextType.id,role:o.role,bnodes:o.blanks,sameAs:o.sameAs,context:o.context},headers:{Accept:r||"application/x-graphdb-table-results+json",Link:n?"<"+n+">":""}}).then(e=>e.data)}}},62628(){angular.module("graphdb.workbench.utils.filetypes",[]).value("FileTypes",[{name:"JSON",translateKey:"download.as.json",type:"application/rdf+json",extension:".json"},{name:"JSON-LD",translateKey:"download.as.jsonld",type:"application/ld+json",extension:".jsonld"},{name:"NDJSON-LD",translateKey:"download.as.ndjsonld",type:"application/x-ld+ndjson",extension:".ndjsonld"},{name:"RDF-XML",translateKey:"download.as.rdfxml",type:"application/rdf+xml",extension:".rdf"},{name:"N3",translateKey:"download.as.n3",type:"text/rdf+n3",extension:".n3"},{name:"N-Triples",translateKey:"download.as.ntriples",type:"text/plain",extension:".nt"},{name:"N-Quads",translateKey:"download.as.nquads",type:"text/x-nquads",extension:".nq"},{name:"Turtle",translateKey:"download.as.turtle",type:"text/turtle",extension:".ttl"},{name:"Turtle*",translateKey:"download.as.turtlestar",type:"application/x-turtlestar",extension:".ttls"},{name:"TriX",translateKey:"download.as.trix",type:"application/trix",extension:".trix"},{name:"TriG",translateKey:"download.as.trig",type:"application/x-trig",extension:".trig"},{name:"TriG*",translateKey:"download.as.trigstar",type:"application/x-trigstar",extension:".trigs"},{name:"Binary RDF",translateKey:"download.as.binaryrdf",type:"application/x-binary-rdf",extension:".brf"}])},53291(){}};
|
|
2
|
+
//# sourceMappingURL=34985.8ef74b317fc8bff7e8e1.bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"34985.8ef74b317fc8bff7e8e1.bundle.js","mappings":"yTAsDA,SAASA,EACLC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,GACA,MAAMC,GAAyBC,EAAAA,EAAAA,SAAQC,EAAAA,wBACjCC,GAAqBF,EAAAA,EAAAA,SAAQG,EAAAA,oBAanC,IAAIC,EAXJnB,EAAOoB,aAAeA,EAAAA,EACtBpB,EAAOqB,aAAeC,EAAAA,EAAYC,aAClCvB,EAAOwB,qBAAuBJ,EAAAA,EAAaK,SAASC,GACpD1B,EAAO2B,MAAQ,CAACC,EAAAA,EAASC,QAASD,EAAAA,EAASE,UAAWF,EAAAA,EAASG,OAAQH,EAAAA,EAASI,QAASJ,EAAAA,EAASK,KAElGjC,EAAOkC,kBAAeC,EAGtBnC,EAAOoC,WAAY,EACnBpC,EAAOqC,UAAY5B,EAOnBT,EAAOsC,aAAe,KAClBtC,EAAOkC,aAAaK,QAAUvC,EAAOkC,aAA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Ac,wBAAyBrN,KAAM,2BAA4BU,UAAW,S","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/explore/controllers.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/ontotext-yasgui/rendering-mode.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/resource/context-type.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/resource/resource-details.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/resource/resource-info.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/models/resource/role-type.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/rest/explore.rest.service.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/utils/file-types.js"],"sourcesContent":["import 'angular/utils/file-types';\nimport 'angular/rest/explore.rest.service';\nimport {saveAs} from 'lib/FileSaver-patch';\nimport {decodeHTML} from \"../../../app\";\nimport {ResourceInfo} from \"../models/resource/resource-info\";\nimport {ContextType, ContextTypes} from \"../models/resource/context-type\";\nimport {RoleType} from \"../models/resource/role-type\";\nimport {RenderingMode} from \"../models/ontotext-yasgui/rendering-mode\";\nimport {DISABLE_YASQE_BUTTONS_CONFIGURATION} from \"../core/directives/yasgui-component/yasgui-component-directive.util\";\nimport * as jsonld from 'jsonld';\nimport {ExportSettingsCtrl} from \"../core/components/export-settings-modal/controller\";\nimport {\n GraphConfigService,\n openInNewTab,\n SecurityContextService,\n service,\n} from '@ontotext/workbench-api';\nimport {ObjectUtils} from '../utils/object-utils';\n\nconst modules = [\n 'ngCookies',\n 'ngRoute',\n 'ui.bootstrap',\n 'toastr',\n 'graphdb.framework.core',\n 'graphdb.framework.core.services.repositories',\n 'graphdb.framework.explore.services',\n 'graphdb.workbench.utils.filetypes',\n 'graphdb.framework.rest.explore.rest.service',\n];\n\nangular\n .module('graphdb.framework.explore.controllers', modules)\n .controller('FindResourceCtrl', FindResourceCtrl)\n .controller('ExploreCtrl', ExploreCtrl)\n .controller('EditResourceCtrl', EditResourceCtrl)\n .controller('ViewTrigCtrl', ViewTrigCtrl);\n\nExploreCtrl.$inject = [\n '$scope',\n '$location',\n 'toastr',\n '$routeParams',\n '$repositories',\n '$uibModal',\n 'ClassInstanceDetailsService',\n 'ModalService',\n 'RDF4JRepositoriesRestService',\n 'FileTypes',\n '$jwtAuth',\n '$translate',\n '$q',\n 'ExploreRestService'];\n\nfunction ExploreCtrl(\n $scope,\n $location,\n toastr,\n $routeParams,\n $repositories,\n $uibModal,\n ClassInstanceDetailsService,\n ModalService,\n RDF4JRepositoriesRestService,\n FileTypes,\n $jwtAuth,\n $translate,\n $q,\n ExploreRestService) {\n const securityContextService = service(SecurityContextService);\n const graphConfigService = service(GraphConfigService);\n\n $scope.ContextTypes = ContextTypes;\n $scope.contextTypes = ContextType.getAllType();\n $scope.currentContextTypeId = ContextTypes.EXPLICIT.id;\n $scope.roles = [RoleType.SUBJECT, RoleType.PREDICATE, RoleType.OBJECT, RoleType.CONTEXT, RoleType.ALL];\n\n $scope.resourceInfo = undefined;\n\n // Defaults\n $scope.isLoading = false;\n $scope.fileTypes = FileTypes;\n\n let usedPrefixes;\n\n // =========================\n // Public functions\n // =========================\n $scope.toggleSameAs = () => {\n $scope.resourceInfo.sameAs = !$scope.resourceInfo.sameAs;\n $scope.exploreResource();\n };\n\n $scope.getActiveRepository = () => {\n return $repositories.getActiveRepository();\n };\n\n $scope.isTripleResource = () => {\n return !!$scope.resourceInfo.triple;\n };\n\n // TODO move this to core\n $scope.encodeURIComponent = (param) => {\n return encodeURIComponent(param);\n };\n\n $scope.getRdfStarLocalNames = (triple) => {\n let localNames = triple.slice();\n const trimmed = triple.replace(/[<>]+/g, '');\n trimmed.split(' ').forEach((uri) => {\n localNames = localNames.replace(uri, ClassInstanceDetailsService.getLocalName(uri));\n });\n return localNames;\n };\n\n $scope.getLocalName = (uri) => {\n return ClassInstanceDetailsService.getLocalName(uri);\n };\n\n const initResourceReference = (resourceInfo) => {\n if ($routeParams.prefix && $routeParams.localName && usedPrefixes[$routeParams.prefix]) {\n // /resource/PREFIX/LOCAL -> URI = expanded PREFIX + LOCAL\n resourceInfo.uri = usedPrefixes[$routeParams.prefix] + $routeParams.localName;\n } else if ($location.search().uri) {\n // uri parameter -> URI\n resourceInfo.uri = $location.search().uri + ($location.hash() ? '#' + $location.hash() : '');\n } else if ($location.search().triple) {\n // uri parameter -> URI\n resourceInfo.triple = $location.search().triple + ($location.hash() ? '#' + $location.hash() : '');\n } else {\n // absolute URI -> URI\n resourceInfo.uri = $location.absUrl();\n }\n // remove angle brackets which were allowed when filling out the search input field\n // but are forbidden when passing the uri as a query parameter\n resourceInfo.uri = resourceInfo.uri && resourceInfo.uri.replace(/<|>/g, \"\");\n };\n\n $scope.loadResource = () => {\n // Get resource details\n ExploreRestService.getResourceDetails($scope.resourceInfo.uri, $scope.resourceInfo.triple, $scope.resourceInfo.context)\n .success((data) => {\n $scope.resourceInfo.details = data;\n $scope.resourceInfo.context = $scope.resourceInfo.details.context;\n if ($scope.resourceInfo.uri !== 'object') {\n $scope.resourceInfo.details.encodeURI = encodeURIComponent($scope.resourceInfo.details.uri);\n }\n })\n .error((data) => toastr.error($translate.instant('explore.error.resource.details', {data: getError(data)})));\n\n $scope.exploreResource();\n };\n\n $scope.isContextAvailable = () => {\n return $scope.resourceInfo.context !== null && $scope.resourceInfo.context === \"http://rdf4j.org/schema/rdf4j#SHACLShapeGraph\";\n };\n\n $scope.goToGraphsViz = ({detail: payload}) => {\n if (payload.action === 'create') {\n openInNewTab('graphs-visualizations');\n return;\n }\n\n $location\n .path('graphs-visualizations')\n .search('uri', $scope.resourceInfo.uri)\n .search('config', payload.graphConfig?.id);\n };\n\n $scope.fetchGraphConfigs = () => {\n return () => graphConfigService.getGraphConfigs().then((graphConfigs) => graphConfigs.getItems());\n };\n\n // Get resource table\n $scope.exploreResource = () => {\n toggleOntoLoader(true);\n if (ObjectUtils.isNullOrUndefined($routeParams.context)) {\n $scope.resourceInfo.context = $routeParams.context;\n }\n // Remember the role in the URL so the URL is stable and leads back to the same view\n $location.search('role', $scope.resourceInfo.role);\n // Changing the URL parameters adds a history entry in the browser history, and this causes incorrect behavior of the browser's back button functionality.\n // To resolve this issue, we replace the current URL without adding a new history entry.\n $location.replace();\n getGraph();\n };\n\n $scope.downloadExport = (fileType) => {\n ExploreRestService.getGraph($scope.resourceInfo, fileType.type)\n .then((data) => {\n if (fileType.type.indexOf('json') > -1) {\n data = JSON.stringify(data);\n }\n // TODO: Use bowser library to get the browser type\n const ua = navigator.userAgent.toLowerCase();\n if (ua.indexOf('safari') !== -1 && ua.indexOf('chrome') === -1) {\n window.open('data:attachment/csv;filename=\"statements.' + fileType.extension + '\",' + encodeURIComponent(data), 'statements.' + fileType.extension);\n } else {\n const file = new Blob([data], {type: fileType.type});\n saveAs(file, 'statements' + fileType.extension);\n }\n })\n .catch((error) => {\n toastr.error(getError(error), $translate.instant('common.error'));\n })\n .finally(() => {\n toggleOntoLoader(false);\n });\n };\n\n $scope.openJSONLDExportSettings = function(format) {\n const modalInstance = $uibModal.open({\n templateUrl: 'js/angular/core/components/export-settings-modal/exportSettingsModal.html',\n controller: ExportSettingsCtrl,\n size: 'lg',\n scope: $scope,\n resolve: {\n format: function() {\n return format.name;\n },\n },\n });\n\n modalInstance.result.then(function(data) {\n $scope.downloadJSONLDExport(format, data.link, data.currentMode);\n });\n };\n\n $scope.downloadJSONLDExport = function(format, link, mode) {\n ExploreRestService.getGraph($scope.resourceInfo, format.type, link)\n .then(async function(data) {\n if (format.name === \"JSON\") {\n data = JSON.stringify(data);\n }\n\n if (format.name === 'JSON-LD') {\n switch (mode.name) {\n case \"expanded\":\n data = await jsonld.expand(data);\n data = JSON.stringify(data);\n break;\n case \"flattened\":\n data = await jsonld.flatten(data, link);\n data = JSON.stringify(data);\n break;\n case \"compacted\":\n data = await jsonld.compact(data, link);\n data = JSON.stringify(data);\n break;\n case \"context\":\n data = await jsonld.context(data, link);\n data = JSON.stringify(data);\n break;\n case \"frame\":\n data = await jsonld.frame(data, link);\n data = JSON.stringify(data);\n break;\n case \"framed\":\n data = await jsonld.compact(data, link);\n data = JSON.stringify(data);\n break;\n }\n }\n // TODO: Use bowser library to get the browser type\n const ua = navigator.userAgent.toLowerCase();\n if (ua.indexOf('safari') !== -1 && ua.indexOf('chrome') === -1) {\n window.open('data:attachment/csv;filename=\"statements.' + format.extension + '\",' + encodeURIComponent(data), 'statements.' + format.extension);\n } else {\n const file = new Blob([data], {type: format.type});\n saveAs(file, 'statements' + format.extension);\n }\n }).catch(function(data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n });\n };\n\n $scope.changeRole = (role) => {\n $scope.resourceInfo.role = role;\n if ($scope.resourceInfo.role === RoleType.CONTEXT) {\n $scope.resourceInfo.contextType = ContextTypes.EXPLICIT;\n }\n $scope.exploreResource();\n };\n\n $scope.changeInference = (contextTypeId) => {\n $scope.resourceInfo.contextType = ContextType.getContextType(contextTypeId);\n $scope.exploreResource();\n };\n\n $scope.copyToClipboardResult = (uri) => {\n ModalService.openCopyToClipboardModal(uri);\n };\n\n /**\n * ================================================\n * Cypress test support — global exposure hack ️\n * ================================================\n * `jsonld` id imported as local ES modules\n * and is not available in the global `window` scope at runtime.\n *\n * However, Cypress tests often rely on mocking/stubbing or spying on\n * functions like `jsonld.compact()` to isolate behavior.\n *\n * Cypress’ `cy.stub(win, 'someFunction')` only works for **own properties**\n * of the `window` object. That means: unless `jsonld` is explicitly attached\n * to `window`, Cypress cannot replace or observe it.\n *\n * This block ensures that in cypress mode (`window.Cypress`),\n * we attach `jsonld` to `window`, making it accessible\n * to Cypress tests that need to stub or assert usage.\n */\n if (window.Cypress) {\n window.jsonld = jsonld;\n }\n\n // =========================\n // Private functions\n // =========================\n const initComponent = () => {\n const principal = securityContextService.getAuthenticatedUser();\n $repositories.getPrefixes($repositories.getActiveRepository())\n .then((usedPrefixesResponse) => {\n initResourceInfo();\n setInferAndSameAs(principal);\n usedPrefixes = usedPrefixesResponse;\n $scope.loadResource();\n })\n .catch((error) => {\n toastr.error($translate.instant('get.namespaces.error.msg', {error: getError(error)}));\n });\n };\n\n const initResourceInfo = () => {\n if ($scope.resourceInfo) {\n return;\n }\n $scope.resourceInfo = new ResourceInfo();\n initResourceReference($scope.resourceInfo);\n\n if (ObjectUtils.isNullOrUndefined($routeParams.context)) {\n $scope.resourceInfo.context = $routeParams.context;\n }\n\n $scope.resourceInfo.role = $location.search().role ? $location.search().role : RoleType.SUBJECT;\n };\n\n const toggleOntoLoader = (showLoader) => {\n $scope.isLoading = !!showLoader;\n };\n\n const updateYasguiConfiguration = (additionalConfiguration = {}) => {\n const config = {};\n angular.extend(config, $scope.yasguiConfig || getDefaultYasguiConfiguration(), additionalConfiguration);\n $scope.yasguiConfig = config;\n };\n\n const getDefaultYasguiConfiguration = () => {\n return {\n showEditorTabs: false,\n showToolbar: false,\n showResultTabs: false,\n showFullscreenButton: false,\n showResultInfo: true,\n downloadAsOn: false,\n showQueryButton: false,\n componentId: 'resource-view-component',\n prefixes: usedPrefixes,\n maxPersistentResponseSize: 0,\n render: RenderingMode.YASR,\n showYasqeActionButtons: false,\n yasqeActionButtons: DISABLE_YASQE_BUTTONS_CONFIGURATION,\n };\n };\n\n const getGraph = () => {\n ExploreRestService.getGraph($scope.resourceInfo)\n .then((data) => {\n updateYasguiConfiguration({sparqlResponse: data});\n })\n .catch((error) => {\n toastr.error($translate.instant('explore.error.resource', {data: getError(error)}));\n })\n .finally(() => {\n toggleOntoLoader(false);\n });\n };\n\n const setInferAndSameAs = (principal) => {\n // Get the predefined settings for sameAs and inference per user\n $scope.resourceInfo.contextType = principal.appSettings['DEFAULT_INFERENCE'] && !$scope.resourceInfo.role === RoleType.CONTEXT ? ContextTypes.ALL : ContextTypes.EXPLICIT;\n $scope.resourceInfo.sameAs = principal.appSettings['DEFAULT_INFERENCE'] && principal.appSettings['DEFAULT_SAMEAS'];\n };\n\n const removeAllListeners = () => {\n subscriptions.forEach((subscription) => subscription());\n };\n\n // =========================\n // Event handler functions\n // =========================\n\n $scope.$on('$destroy', removeAllListeners);\n const subscriptions = [];\n\n // Wait until the active repository object is set, otherwise \"canWriteActiveRepo()\" may return a wrong result and the \"ontotext-yasgui\"\n // readOnly configuration may be incorrect.\n subscriptions.push($scope.$watch(function() {\n return $scope.getActiveRepositoryObject();\n }, function(activeRepo) {\n if (activeRepo) {\n initComponent();\n }\n }));\n}\n\nFindResourceCtrl.$inject = ['$scope', '$http', '$location', '$repositories', '$q', '$timeout', 'toastr', 'AutocompleteRestService', 'ClassInstanceDetailsService', '$routeParams', 'RDF4JRepositoriesRestService', '$translate'];\n\nfunction FindResourceCtrl($scope, $http, $location, $repositories, $q, $timeout, toastr, AutocompleteRestService, ClassInstanceDetailsService, $routeParams, RDF4JRepositoriesRestService, $translate) {\n $scope.submit = submit;\n $scope.getAutocompleteSuggestions = getAutocompleteSuggestions;\n $scope.inputChangedFn = inputChangedFn;\n $scope.selectedUriCallback = selectedUriCallback;\n\n $scope.selectedUri = {name: \"\"};\n\n $scope.autocompleteEnabled = false;\n\n if (angular.isDefined($routeParams.search)) {\n $timeout(function() {\n $('#resources_finder_value').val($routeParams.search);\n $('.search-button').click();\n }, 500);\n }\n\n function checkAutocompleteStatus() {\n AutocompleteRestService.checkAutocompleteStatus()\n .success(function(response) {\n if (!response) {\n const warningMsg = decodeHTML($translate.instant('explore.autocomplete.warning.msg'));\n toastr.warning('', `<div class=\"autocomplete-toast\"><a href=\"autocomplete\">${warningMsg}</a></div>`,\n {allowHtml: true});\n }\n $scope.autocompleteEnabled = response;\n })\n .error(function() {\n toastr.error($translate.instant('explore.error.autocomplete'));\n });\n }\n\n function getAllNamespacesForActiveRepository() {\n RDF4JRepositoriesRestService.getNamespaces($repositories.getActiveRepository())\n .success(function(data) {\n $scope.namespaces = data.results.bindings.map(function(e) {\n return {\n prefix: e.prefix.value,\n uri: e.namespace.value,\n };\n });\n $scope.loader = false;\n }).error(function(data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n }\n\n function validateRdfUri(value) {\n // has a pair of angle brackets and the closing one is the last char of the string\n const hasAngleBrackets = value.indexOf(\"<\") >= 0 && value.lastIndexOf(\">\") === value.length - 1;\n\n // does not have a pair of angle bracket - if only one of the is available that is incorrect\n const noAngleBrackets = value.indexOf(\"<\") === -1 && value.lastIndexOf(\">\") === -1;\n\n const validProtocol = /^<?[http|urn].*>?$/.test(value) && (hasAngleBrackets || noAngleBrackets);\n let validPath = false;\n if (validProtocol) {\n if (value.indexOf(\"http\") >= 0) {\n const schemaSlashesIdx = value.indexOf('//');\n validPath = schemaSlashesIdx > 4\n && value.substring(schemaSlashesIdx + 2).length > 0;\n } else if (value.indexOf(\"urn\") >= 0) {\n validPath = value.substring(4).length > 0;\n }\n }\n return validProtocol && validPath;\n }\n\n let uri;\n\n function submit(uri) {\n function setFormInvalid(isDirty) {\n // does not work yet\n $timeout(function() {\n if ($scope.form) {\n $scope.form.$dirty = isDirty;\n }\n });\n }\n\n if (!uri) {\n uri = document.getElementById(\"resources_finder_value\").value;\n }\n if (uri && validateRdfUri(uri)) {\n setFormInvalid(false);\n $location\n .path('resource')\n .search('uri', uri);\n } else {\n setFormInvalid(true);\n if (uri) {\n toastr.error($translate.instant('explore.error.invalid.input'));\n }\n }\n }\n\n if ($scope.getActiveRepository()) {\n checkAutocompleteStatus();\n getAllNamespacesForActiveRepository();\n }\n\n // use a global var to keep old uri in order to change it when a new one appears\n let expandedUri;\n\n function getAutocompleteSuggestions(str) {\n // expand prefix to uri only if the last character of the input is a colon and\n // there are no angle brackets because they are allowed only for absolute uris\n const ANGLE_BRACKETS_REGEX = /<|>/;\n if (!ANGLE_BRACKETS_REGEX.test(str) && str.slice(-1) === ':') {\n const newExpandedUri = ClassInstanceDetailsService.getNamespaceUriForPrefix($scope.namespaces, str.slice(0, -1));\n expandedUri = (newExpandedUri !== expandedUri) ? newExpandedUri : expandedUri;\n if (expandedUri) {\n $(\"#resources_finder_value\").val(expandedUri);\n }\n }\n\n let promise;\n if ($scope.autocompleteEnabled) {\n // add semicolon after the expanded uri in order to filter only by local names for this uri\n const query = str.replace(expandedUri, expandedUri + ';');\n promise = AutocompleteRestService.getAutocompleteSuggestions(query);\n } else {\n // return empty promise\n promise = $q.when($scope.autocompleteEnabled);\n }\n return promise;\n }\n\n $scope.$on('repositoryIsSet', function() {\n checkAutocompleteStatus();\n getAllNamespacesForActiveRepository();\n });\n\n function inputChangedFn() {\n uri = document.getElementById(\"resources_finder_value\").value;\n $scope.form.$dirty = !(uri && validateRdfUri(uri));\n }\n\n function selectedUriCallback(selected) {\n $scope.selectedUri = {name: selected.title};\n submit($scope.selectedUri.name);\n }\n}\n\nEditResourceCtrl.$inject = ['$scope', '$http', '$location', 'toastr', '$repositories', '$uibModal', '$timeout', 'ClassInstanceDetailsService', 'StatementsService', 'RDF4JRepositoriesRestService', '$translate'];\n\nfunction EditResourceCtrl($scope, $http, $location, toastr, $repositories, $uibModal, $timeout, ClassInstanceDetailsService, StatementsService, RDF4JRepositoriesRestService, $translate) {\n $scope.uriParam = $location.search().uri;\n $scope.newRow = {\n subject: $scope.uriParam,\n object: {\n type: 'uri',\n datatype: '',\n },\n };\n $scope.newResource = false;\n $scope.datatypeOptions = StatementsService.getDatatypeOptions();\n\n $scope.activeRepository = function() {\n return $repositories.getActiveRepository();\n };\n\n $scope.getClassInstancesDetails = getClassInstancesDetails;\n $scope.addStatement = addStatement;\n $scope.removeStatement = removeStatement;\n $scope.getLocalName = getLocalName;\n $scope.checkValid = checkValid;\n $scope.validEditRow = validEditRow;\n $scope.viewTrig = viewTrig;\n $scope.save = save;\n\n function getClassInstancesDetails() {\n RDF4JRepositoriesRestService.getNamespaces($scope.activeRepository())\n .success(function(data) {\n $scope.namespaces = data.results.bindings.map(function(e) {\n return {\n prefix: e.prefix.value,\n uri: e.namespace.value,\n };\n });\n $scope.loader = false;\n }).error(function(data) {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n $scope.loader = false;\n });\n\n ClassInstanceDetailsService.getDetails($scope.uriParam)\n .success(function(data) {\n $scope.details = data;\n $scope.details.encodeURI = encodeURIComponent($scope.details.uri);\n }).error(function(data) {\n toastr.error($translate.instant('explore.error.resource.details', {data: getError(data)}));\n });\n\n ClassInstanceDetailsService.getGraph($scope.uriParam)\n .then(function(res) {\n const statements = StatementsService.buildStatements(res, $scope.uriParam);\n $scope.statements = statements;\n $scope.newResource = !statements.length;\n });\n }\n\n $scope.$watch(function() {\n return $repositories.getActiveRepository();\n }, function() {\n if ($scope.activeRepository()) {\n $scope.getClassInstancesDetails();\n }\n });\n\n $scope.validateUri = function(val) {\n let check = true;\n const text = val ? val : '';\n\n if (text.indexOf(':') === -1) {\n check = false;\n } else {\n const prefix = text.substring(0, text.indexOf(':'));\n const uriForPrefixNotAvailable = ClassInstanceDetailsService.getNamespaceUriForPrefix($scope.namespaces, prefix) === '';\n if (uriForPrefixNotAvailable) {\n // TODO: There's this reported useless escape character for this regex, but I'm not sure if and can I fix it.\n if (/^(http:\\/\\/www\\.|https:\\/\\/www\\.|http:\\/\\/|https:\\/\\/)[a-z0-9]+([\\-\\.]{1}[a-z0-9]+)*\\.[a-z]{2,5}(:[0-9]{1,5})?(\\/.*)?$/.test(text) === false) {\n check = false;\n }\n\n const count = text.match(/\\//g);\n\n if (count === undefined || count.length < 3) {\n check = false;\n }\n } else {\n const restText = text.substring(text.indexOf(':') + 1).trim();\n if (restText.length < 1) {\n check = false;\n }\n }\n }\n\n return check;\n };\n\n function addStatement() {\n $scope.newRowPredicate.$setSubmitted();\n $scope.newRowObject.$setSubmitted();\n $scope.newRowContext.$setSubmitted();\n if ($scope.newRowPredicate.$valid && $scope.newRowObject.$valid && $scope.newRowContext.$valid) {\n $scope.statements.push(_.cloneDeep($scope.newRow));\n $scope.newRow = {\n subject: $scope.uriParam,\n object: {\n type: 'uri',\n datatype: '',\n },\n };\n $scope.newRowPredicate.$setPristine();\n $scope.newRowPredicate.$setUntouched();\n $scope.newRowObject.$setPristine();\n $scope.newRowObject.$setUntouched();\n $scope.newRowContext.$setPristine();\n $scope.newRowContext.$setUntouched();\n }\n }\n\n function checkValid(data) {\n if (!angular.isUndefined(data)) {\n return true;\n }\n return $translate.instant('explore.validation');\n }\n\n function validEditRow() {\n return $scope.rowform.$valid;\n }\n\n function removeStatement(idx) {\n $scope.statements.splice(idx, 1);\n }\n\n function getLocalName(uri) {\n return ClassInstanceDetailsService.getLocalName(uri);\n }\n\n function viewTrig() {\n $uibModal.open({\n templateUrl: 'js/angular/explore/templates/viewTrig.html',\n controller: 'ViewTrigCtrl',\n size: 'lg',\n resolve: {\n data: function() {\n return StatementsService.transformToTrig($scope.statements);\n },\n },\n });\n }\n\n function save() {\n const method = $scope.newResource ? 'POST' : 'PUT';\n $http({\n method: method,\n url: 'rest/resource?uri=' + encodeURIComponent($scope.uriParam),\n headers: {\n 'Content-Type': 'application/x-trig',\n },\n data: StatementsService.transformToTrig($scope.statements),\n }).success(function() {\n toastr.success($translate.instant('explore.resource.saved'));\n const timer = $timeout(function() {\n $location.path('resource').search('uri', $scope.uriParam);\n }, 500);\n $scope.$on(\"$destroy\", function() {\n $timeout.cancel(timer);\n });\n }).error(function(data) {\n toastr.error(getError(data));\n });\n }\n}\n\nViewTrigCtrl.$inject = ['$scope', '$uibModalInstance', 'data'];\n\nfunction ViewTrigCtrl($scope, $uibModalInstance, data) {\n $scope.trig = data;\n\n $scope.cancel = function() {\n $uibModalInstance.dismiss('cancel');\n };\n}\n","export const RenderingMode = {\n YASGUI: 'mode-yasgui',\n YASQE: 'mode-yasqe',\n YASR: 'mode-yasr'\n};\n","export class ContextType {\n constructor(id, labelKey) {\n this.id = id;\n this.labelKey = labelKey;\n }\n\n static getAllType() {\n return [ContextTypes.ALL, ContextTypes.EXPLICIT, ContextTypes.IMPLICIT];\n }\n\n static getContextType(id) {\n return this.getAllType().find((contextType) => contextType.id === id);\n }\n}\n\nexport const ContextTypes = {\n 'ALL': new ContextType('all', 'explore.explicit.implicit'),\n 'EXPLICIT': new ContextType('explicit', 'explore.explicit'),\n 'IMPLICIT': new ContextType('implicit', 'explore.implicit')\n};\n","export class ResourceDetails {\n constructor() {\n this.image = undefined;\n this.uri = undefined;\n this.label = undefined;\n this.encodeURI = undefined;\n this.comment = undefined;\n this.context = undefined;\n }\n}\n","import {ResourceDetails} from \"./resource-details\";\nimport {ContextTypes} from \"./context-type\";\n\nexport class ResourceInfo {\n constructor() {\n this.role = 'subject';\n this.uri = undefined;\n this.triple = undefined;\n this.context = undefined;\n this.contextType = ContextTypes.EXPLICIT;\n this.sameAs = true;\n this.details = new ResourceDetails();\n this.blanks = true;\n }\n}\n","export const RoleType = {\n 'SUBJECT': 'subject',\n 'PREDICATE': 'predicate',\n 'OBJECT': 'object',\n 'CONTEXT': 'context',\n 'ALL': 'all'\n};\n","angular\n .module('graphdb.framework.rest.explore.rest.service', [])\n .factory('ExploreRestService', ExploreRestService);\n\nExploreRestService.$inject = ['$http'];\n\nconst EXPLORE_ENDPOINT = 'rest/explore';\n\nfunction ExploreRestService($http) {\n\n const getResourceDetails = (uri, triple, context, accept) => {\n return $http.get(`${EXPLORE_ENDPOINT}/details`, {\n params: {\n uri,\n triple,\n context\n },\n headers: {\n 'Accept': accept || 'application/json'\n }\n });\n };\n\n /**\n * Fetches graph of a resource.\n *\n * @param {ResourceInfo} resourceInfo - holds information about the resource.\n * @param {string} accept - specifies the content type of response.\n * @param {String} link - specifies JSON-LD context/frame link\n * @return {ResourceGraphResponse}\n */\n const getGraph = (resourceInfo, accept, link) => {\n return $http.get(`${EXPLORE_ENDPOINT}/graph`, {\n params: {\n uri: resourceInfo.uri,\n triple: resourceInfo.triple,\n inference: resourceInfo.contextType.id,\n role: resourceInfo.role,\n bnodes: resourceInfo.blanks,\n sameAs: resourceInfo.sameAs,\n context: resourceInfo.context\n },\n headers: {\n 'Accept': accept || 'application/x-graphdb-table-results+json',\n 'Link': link ? '<' + link + '>' : \"\"\n }\n })\n .then((response) => response.data);\n };\n\n\n return {\n getResourceDetails,\n getGraph\n };\n}\n","angular.module('graphdb.workbench.utils.filetypes', [])\n .value('FileTypes', [\n {name: 'JSON', translateKey: 'download.as.json', type: 'application/rdf+json', extension: '.json'},\n {name: 'JSON-LD', translateKey: 'download.as.jsonld', type: 'application/ld+json', extension: '.jsonld'},\n {name: 'NDJSON-LD', translateKey: 'download.as.ndjsonld', type: 'application/x-ld+ndjson', extension: '.ndjsonld'},\n {name: 'RDF-XML', translateKey: 'download.as.rdfxml', type: 'application/rdf+xml', extension: '.rdf'},\n {name: 'N3', translateKey: 'download.as.n3', type: 'text/rdf+n3', extension: '.n3'},\n {name: 'N-Triples', translateKey: 'download.as.ntriples', type: 'text/plain', extension: '.nt'},\n {name: 'N-Quads', translateKey: 'download.as.nquads', type: 'text/x-nquads', extension: '.nq'},\n {name: 'Turtle', translateKey: 'download.as.turtle', type: 'text/turtle', extension: '.ttl'},\n {name: 'Turtle*', translateKey: 'download.as.turtlestar', type: 'application/x-turtlestar', extension: '.ttls'},\n {name: 'TriX', translateKey: 'download.as.trix', type: 'application/trix', extension: '.trix'},\n {name: 'TriG', translateKey: 'download.as.trig', type: 'application/x-trig', extension: '.trig'},\n {name: 'TriG*', translateKey: 'download.as.trigstar', type: 'application/x-trigstar', extension: '.trigs'},\n {name: 'Binary RDF', translateKey: 'download.as.binaryrdf', type: 'application/x-binary-rdf', extension: '.brf'}\n ]);\n"],"names":["ExploreCtrl","$scope","$location","toastr","$routeParams","$repositories","$uibModal","ClassInstanceDetailsService","ModalService","RDF4JRepositoriesRestService","FileTypes","$jwtAuth","$translate","$q","ExploreRestService","securityContextService","service","SecurityContextService","graphConfigService","GraphConfigService","usedPrefixes","ContextTypes","contextTypes","ContextType","getAllType","currentContextTypeId","EXPLICIT","id","roles","RoleType","SUBJECT","PREDICATE","OBJECT","CONTEXT","ALL","resourceInfo","undefined","isLoading","fileTypes","toggleSameAs","sameAs","exploreResource","getActiveRepository","isTripleResource","triple","encodeURIComponent","param","getRdfStarLocalNames","localNames","slice","replace","split","forEach","uri","getLocalName","loadResource","getResourceDetails","context","success","data","details","encodeURI","error","instant","getError","isContextAvailable","goToGraphsViz","detail","payload","action","path","search","graphConfig","openInNewTab","fetchGraphConfigs","getGraphConfigs","then","graphConfigs","getItems","toggleOntoLoader","ObjectUtils","isNullOrUndefined","role","getGraph","downloadExport","fileType","type","indexOf","JSON","stringify","ua","navigator","userAgent","toLowerCase","window","open","extension","file","Blob","saveAs","catch","finally","openJSONLDExportSettings","format","templateUrl","controller","ExportSettingsCtrl","size","scope","resolve","name","result","downloadJSONLDExport","link","currentMode","mode","async","jsonld","msg","changeRole","contextType","changeInference","contextTypeId","getContextType","copyToClipboardResult","openCopyToClipboardModal","Cypress","showLoader","updateYasguiConfiguration","additionalConfiguration","config","angular","extend","yasguiConfig","showEditorTabs","showToolbar","showResultTabs","showFullscreenButton","showResultInfo","downloadAsOn","showQueryButton","componentId","prefixes","maxPersistentResponseSize","render","RenderingMode","YASR","showYasqeActionButtons","yasqeActionButtons","DISABLE_YASQE_BUTTONS_CONFIGURATION","sparqlResponse","$on","removeAllListeners","subscriptions","subscription","push","$watch","getActiveRepositoryObject","activeRepo","initComponent","principal","getAuthenticatedUser","getPrefixes","usedPrefixesResponse","initResourceInfo","ResourceInfo","prefix","localName","hash","absUrl","appSettings","setInferAndSameAs","FindResourceCtrl","$http","$timeout","AutocompleteRestService","checkAutocompleteStatus","response","warningMsg","decodeHTML","warning","allowHtml","autocompleteEnabled","getAllNamespacesForActiveRepository","getNamespaces","namespaces","results","bindings","map","e","value","namespace","loader","validateRdfUri","hasAngleBrackets","lastIndexOf","length","noAngleBrackets","validProtocol","test","validPath","schemaSlashesIdx","substring","expandedUri","submit","setFormInvalid","isDirty","form","$dirty","document","getElementById","getAutocompleteSuggestions","str","newExpandedUri","getNamespaceUriForPrefix","$","val","promise","query","when","inputChangedFn","selectedUriCallback","selected","selectedUri","title","isDefined","click","EditResourceCtrl","StatementsService","uriParam","newRow","subject","object","datatype","newResource","datatypeOptions","getDatatypeOptions","activeRepository","getClassInstancesDetails","getDetails","res","statements","buildStatements","addStatement","newRowPredicate","$setSubmitted","newRowObject","newRowContext","$valid","_","cloneDeep","$setPristine","$setUntouched","removeStatement","idx","splice","checkValid","isUndefined","validEditRow","rowform","viewTrig","transformToTrig","save","method","url","headers","timer","cancel","validateUri","check","text","count","match","trim","ViewTrigCtrl","$uibModalInstance","trig","dismiss","module","$inject","YASGUI","YASQE","constructor","labelKey","this","IMPLICIT","find","ResourceDetails","image","label","comment","blanks","factory","EXPLORE_ENDPOINT","accept","get","params","inference","bnodes","translateKey"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export const __webpack_esm_id__=50244;export const __webpack_esm_ids__=[1767,50244];export const __webpack_esm_modules__={50244(e,t,r){r(82146);var s=r(1767),n=r(82805),o=r(57154);function i(e,t,r,i,a,c,u,d,h,m,l,g){angular.extend(this,u("CommonUserCtrl",{$scope:e,passwordPlaceholder:"security.new.password"}));const p=(0,o.service)(o.SecurityService),S=(0,o.service)(o.AuthenticationService),w=(0,o.service)(o.SecurityContextService),v=(0,o.service)(o.LicenseService),y=(0,o.service)(o.ApplicationSettingsStorageService),_=(0,o.service)(o.NavigationContextService),k=(0,o.service)(o.ThemeService),C=(0,o.service)(o.RuntimeConfigurationContextService);let U;e.mode="settings",e.showWorkbenchSettings=!0,e.currentSystemTheme=k.getPreferredScheme(),e.themeModeOptions=[{mode:o.ThemeMode.system,labelKey:"security.workbench.settings.theme.mode.system"},{mode:o.ThemeMode.light,labelKey:"security.workbench.settings.theme.mode.light"},{mode:o.ThemeMode.dark,labelKey:"security.workbench.settings.theme.mode.dark"}],e.workbenchSettings=y.getApplicationSettings(),e.themeChanged=!1,e.saveButtonText=h.instant("common.save.btn"),e.pageTitle=h.instant("view.settings.title"),e.passwordPlaceholder=h.instant("security.new.password"),e.grantedAuthorities={[s.aj]:{},[s.DX]:{},[s.w0]:{}},e.loader=!1,e.noPassword=!1,e.showCookiePolicyLink=!1,e.showCookieConsentModal=!1,e.hasEditRestrictions=function(){return!0},e.onThemeChange=function(){e.themeChanged=e.workbenchSettings.themeMode!==e.initialThemeMode},e.isUser=function(){return e.userType===n.ut.USER},e.goBack=function(){const e=_.getPreviousRoute();(0,o.navigate)(e??"./")},e.updateCurrentUserData=function(){S.getCurrentUser().then(e=>w.updateAuthenticatedUser(e))},e.redirectAdmin=function(){e.currentUserData||c.redirectToLogin()},e.submit=function(){e.noPassword&&e.userType===n.ut.ADMIN?d.openSimpleModal({title:h.instant("security.save.admin.settings"),message:h.instant("security.admin.pass.unset"),warning:!0}).result.then(function(){e.updateUser()}):e.updateUser()},e.updateUserHttp=function(){e.loader=!0;const r=new o.User({username:e.user.username,password:e.noPassword?"":e.user.password||void 0,appSettings:e.user.appSettings});p.updateAuthenticatedUser(r).then(()=>{t.success(h.instant("security.user.updated",{name:e.user.username})),e.updateCurrentUserData(),y.setApplicationSettings(e.workbenchSettings),e.initialThemeMode=e.workbenchSettings.themeMode,e.themeChanged=!1,e.workbenchSettings.isSystemMode()?k.applyColorScheme():k.setThemeMode(e.workbenchSettings.themeMode),T()}).catch(e=>{const r=getError(e);t.error(r,h.instant("common.error"))}).finally(()=>{e.loader=!1})},e.updateUser=function(){if(!e.validateForm())return!1;e.updateUserHttp()},e.validateForm=function(){return e.validatePassword()},e.onDialogClose=()=>{e.showCookieConsentModal=!1},e.showCookiePolicy=t=>{t.preventDefault(),e.showCookieConsentModal=!0};const T=()=>{U=i(function(){e.loader=!1;const t=_.getPreviousRoute();(0,o.navigate)(t??"./")},2e3)},M=[C.onSystemThemeChanged(t=>{t&&(e.currentSystemTheme=t)})];e.$on("$destroy",function(){i.cancel(U),M.forEach(e=>e())}),(()=>{const t=w.getAuthenticatedUser();e.currentUserData=t.toUser(),e.redirectAdmin(),e.user={username:e.currentUserData.username},e.user.password="",e.user.confirmpassword="",e.user.external=e.currentUserData.external,e.user.appSettings=e.currentUserData.appSettings,void 0===e.user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA&&(e.user.appSettings.DEFAULT_VIS_GRAPH_SCHEMA=!0),e.userType=e.currentUserData.getUserType(),e.grantedAuthorities=e.currentUserData.authorities.toUIModel(),e.customRoles=e.currentUserData.authorities.getCustomRoles()})(),e.workbenchSettings.themeMode=k.getThemeModeOrSystem(),e.initialThemeMode=e.workbenchSettings.themeMode,v.updateLicenseStatus().then(()=>{e.showCookiePolicyLink=g.isTrackingAllowed()})}angular.module("graphdb.framework.security.controllers.user-settings",["graphdb.framework.core.services.security-service"]).controller("UserSettingsController",i),i.$inject=["$scope","toastr","$window","$timeout","$jwtAuth","$rootScope","$controller","ModalService","$translate","$q","$uibModal","TrackingService"]},1767(e,t,r){r.d(t,{B1:()=>u,DX:()=>i,_5:()=>c,aj:()=>n,n5:()=>s,w0:()=>a,xF:()=>o});const s="SYSTEM",n="READ_REPO",o="READ_REPO_",i="WRITE_REPO",a="GRAPHQL",c="WRITE_REPO_",u="GRAPHQL_"}};
|
|
2
|
+
//# sourceMappingURL=50244.69475a004173b61902a8.bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"50244.69475a004173b61902a8.bundle.js","mappings":"oLAuCA,SAASA,EAAuBC,EAAQC,EAAQC,EAASC,EAAUC,EAAUC,EAAYC,EAAaC,EAAcC,EAAYC,EAAIC,EAAWC,GAC3IC,QAAQC,OAAOC,KAAMR,EAAY,iBAAkB,CAACN,OAAQA,EAAQe,oBAAqB,2BAKzF,MAAMC,GAAkBC,EAAAA,EAAAA,SAAQC,EAAAA,iBAC1BC,GAAwBF,EAAAA,EAAAA,SAAQG,EAAAA,uBAChCC,GAAyBJ,EAAAA,EAAAA,SAAQK,EAAAA,wBACjCC,GAAiBN,EAAAA,EAAAA,SAAQO,EAAAA,gBAEzBC,GAAoCR,EAAAA,EAAAA,SAAQS,EAAAA,mCAC5CC,GAA2BV,EAAAA,EAAAA,SAAQW,EAAAA,0BACnCC,GAAeZ,EAAAA,EAAAA,SAAQa,EAAAA,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","sources":["webpack://root-config/./packages/legacy-workbench/src/js/angular/security/controllers/user-settings.controller.js","webpack://root-config/./packages/legacy-workbench/src/js/angular/security/services/constants.js"],"sourcesContent":["import 'angular/core/services/security.service';\nimport {GRAPHQL, READ_REPO, WRITE_REPO} from '../services/constants';\nimport {UserType} from 'angular/utils/user-utils';\nimport {\n navigate,\n ThemeMode,\n ThemeService,\n ApplicationSettingsStorageService,\n RuntimeConfigurationContextService,\n NavigationContextService,\n SecurityService,\n AuthenticationService,\n SecurityContextService,\n LicenseService,\n service,\n User,\n} from '@ontotext/workbench-api';\n\nangular\n .module('graphdb.framework.security.controllers.user-settings', [\n 'graphdb.framework.core.services.security-service',\n ])\n .controller('UserSettingsController', UserSettingsController);\n\nUserSettingsController.$inject = [\n '$scope',\n 'toastr',\n '$window',\n '$timeout',\n '$jwtAuth',\n '$rootScope',\n '$controller',\n 'ModalService',\n '$translate',\n '$q',\n '$uibModal',\n 'TrackingService',\n];\n\nfunction UserSettingsController($scope, toastr, $window, $timeout, $jwtAuth, $rootScope, $controller, ModalService, $translate, $q, $uibModal, TrackingService) {\n angular.extend(this, $controller('CommonUserCtrl', {$scope: $scope, passwordPlaceholder: 'security.new.password'}));\n\n // =========================\n // Private variables\n // =========================\n const securityService = service(SecurityService);\n const authenticationService = service(AuthenticationService);\n const securityContextService = service(SecurityContextService);\n const licenseService = service(LicenseService);\n\n const applicationSettingsStorageService = service(ApplicationSettingsStorageService);\n const navigationContextService = service(NavigationContextService);\n const themeService = service(ThemeService);\n const runtimeConfigurationContextService = service(RuntimeConfigurationContextService);\n\n /**\n * A timer task that will redirect back to the previous page after the user has been updated.\n * @type {Promise}\n */\n let waitBeforeRedirectBack;\n\n // =========================\n // Public variables\n // =========================\n\n $scope.mode = 'settings';\n $scope.showWorkbenchSettings = true;\n $scope.currentSystemTheme = themeService.getPreferredScheme();\n /**\n * The list of available theme mode options shown in the dropdown.\n * @type {{mode: ThemeMode, labelKey: string}[]}\n */\n $scope.themeModeOptions = [\n {mode: ThemeMode.system, labelKey: 'security.workbench.settings.theme.mode.system'},\n {mode: ThemeMode.light, labelKey: 'security.workbench.settings.theme.mode.light'},\n {mode: ThemeMode.dark, labelKey: 'security.workbench.settings.theme.mode.dark'},\n ];\n /**\n * @type {ApplicationSettings}\n */\n $scope.workbenchSettings = applicationSettingsStorageService.getApplicationSettings();\n $scope.themeChanged = false;\n $scope.saveButtonText = $translate.instant('common.save.btn');\n $scope.pageTitle = $translate.instant('view.settings.title');\n $scope.passwordPlaceholder = $translate.instant('security.new.password');\n $scope.grantedAuthorities = {\n [READ_REPO]: {},\n [WRITE_REPO]: {},\n [GRAPHQL]: {},\n };\n $scope.loader = false;\n /**\n * Allows to reset the password when updating the user.\n * @type {boolean}\n */\n $scope.noPassword = false;\n /**\n * If the button that opens the cookie policy modal should be visible or not.\n * @type {boolean}\n */\n $scope.showCookiePolicyLink = false;\n /**\n * Flag that controls the visibility of the cookie policy modal.\n * @type {boolean}\n */\n $scope.showCookieConsentModal = false;\n\n // =========================\n // Public functions\n // =========================\n\n $scope.hasEditRestrictions = function() {\n return true;\n };\n\n $scope.onThemeChange = function() {\n $scope.themeChanged = $scope.workbenchSettings.themeMode !== $scope.initialThemeMode;\n };\n\n $scope.isUser = function() {\n return $scope.userType === UserType.USER;\n };\n\n $scope.goBack = function() {\n const previousRoute = navigationContextService.getPreviousRoute();\n navigate(previousRoute ?? './');\n };\n\n $scope.updateCurrentUserData = function() {\n authenticationService.getCurrentUser()\n .then((authenticatedUser) => securityContextService.updateAuthenticatedUser(authenticatedUser));\n };\n\n $scope.redirectAdmin = function() {\n if (!$scope.currentUserData) {\n $rootScope.redirectToLogin();\n }\n };\n\n $scope.submit = function() {\n if ($scope.noPassword && $scope.userType === UserType.ADMIN) {\n ModalService.openSimpleModal({\n title: $translate.instant('security.save.admin.settings'),\n message: $translate.instant('security.admin.pass.unset'),\n warning: true,\n }).result.then(function() {\n $scope.updateUser();\n });\n } else {\n $scope.updateUser();\n }\n };\n\n $scope.updateUserHttp = function() {\n $scope.loader = true;\n const user = new User({\n username: $scope.user.username,\n password: $scope.noPassword ? '' : $scope.user.password || undefined,\n appSettings: $scope.user.appSettings,\n });\n securityService.updateAuthenticatedUser(user)\n .then(() => {\n toastr.success($translate.instant('security.user.updated', {name: $scope.user.username}));\n $scope.updateCurrentUserData();\n applicationSettingsStorageService.setApplicationSettings($scope.workbenchSettings);\n $scope.initialThemeMode = $scope.workbenchSettings.themeMode;\n $scope.themeChanged = false;\n if ($scope.workbenchSettings.isSystemMode()) {\n themeService.applyColorScheme();\n } else {\n themeService.setThemeMode($scope.workbenchSettings.themeMode);\n }\n goBackToPreviousView();\n }).catch((data) => {\n const msg = getError(data);\n toastr.error(msg, $translate.instant('common.error'));\n })\n .finally(() => {\n $scope.loader = false;\n });\n };\n\n $scope.updateUser = function() {\n if (!$scope.validateForm()) {\n return false;\n }\n $scope.updateUserHttp();\n };\n\n $scope.validateForm = function() {\n return $scope.validatePassword();\n };\n\n\n /**\n * Handler for the cookie policy modal close event, sets the flag to hide the modal.\n */\n $scope.onDialogClose = () => {\n $scope.showCookieConsentModal = false;\n };\n\n /**\n * Handler for the cookie policy link click event, sets the flag to show the modal.\n * @param $event\n */\n $scope.showCookiePolicy = ($event) => {\n // The button that triggers this handler is inside a form which has a submit property,\n // and we need to prevent that because it leads to a redirect to the home page.\n $event.preventDefault();\n $scope.showCookieConsentModal = true;\n };\n\n // =========================\n // Private functions\n // =========================\n\n const showCookiePolicyLink = () => {\n licenseService.updateLicenseStatus().then(() => {\n $scope.showCookiePolicyLink = TrackingService.isTrackingAllowed();\n });\n };\n\n const goBackToPreviousView = () => {\n waitBeforeRedirectBack = $timeout(function() {\n $scope.loader = false;\n const previousRoute = navigationContextService.getPreviousRoute();\n navigate(previousRoute ?? './');\n }, 2000);\n };\n\n const initUserData = function() {\n // Copy needed so that Cancel would work correctly, need to call updateCurrentUserData on OK\n $scope.user = {username: $scope.currentUserData.username};\n $scope.user.password = '';\n $scope.user.confirmpassword = '';\n $scope.user.external = $scope.currentUserData.external;\n $scope.user.appSettings = $scope.currentUserData.appSettings;\n // For backward compatibility\n if ($scope.user.appSettings['DEFAULT_VIS_GRAPH_SCHEMA'] === undefined) {\n $scope.user.appSettings['DEFAULT_VIS_GRAPH_SCHEMA'] = true;\n }\n $scope.userType = $scope.currentUserData.getUserType();\n $scope.grantedAuthorities = $scope.currentUserData.authorities.toUIModel();\n $scope.customRoles = $scope.currentUserData.authorities.getCustomRoles();\n };\n\n const processUser = () => {\n const principal = securityContextService.getAuthenticatedUser();\n $scope.currentUserData = principal.toUser();\n $scope.redirectAdmin();\n initUserData();\n };\n\n const onSystemThemeChanged = (theme) => {\n if (theme) {\n $scope.currentSystemTheme = theme;\n }\n };\n\n const subscriptions = [\n runtimeConfigurationContextService.onSystemThemeChanged(onSystemThemeChanged),\n ];\n\n // =========================\n // Subscriptions\n // =========================\n\n $scope.$on('$destroy', function() {\n $timeout.cancel(waitBeforeRedirectBack);\n subscriptions.forEach((unsubscribe) => unsubscribe());\n });\n\n // =========================\n // Initialization\n // =========================\n\n const initView = () => {\n processUser();\n $scope.workbenchSettings.themeMode = themeService.getThemeModeOrSystem();\n $scope.initialThemeMode = $scope.workbenchSettings.themeMode;\n showCookiePolicyLink();\n };\n\n initView();\n}\n","export const SYSTEM_REPO = 'SYSTEM';\nexport const READ_REPO = 'READ_REPO';\nexport const READ_REPO_PREFIX = 'READ_REPO_';\nexport const WRITE_REPO = 'WRITE_REPO';\nexport const GRAPHQL = 'GRAPHQL';\nexport const WRITE_REPO_PREFIX = 'WRITE_REPO_';\nexport const GRAPHQL_PREFIX = 'GRAPHQL_';\nexport const GRAPHQL_SUFFIX = 'GRAPHQL';\nexport const SUFFIX_DELIMITER = ':';\nexport const GRAPHQL_SUFFIX_WITH_DELIMITER = SUFFIX_DELIMITER + GRAPHQL_SUFFIX;\nexport const CUSTOM_PREFIX = 'CUSTOM_'\n"],"names":["UserSettingsController","$scope","toastr","$window","$timeout","$jwtAuth","$rootScope","$controller","ModalService","$translate","$q","$uibModal","TrackingService","angular","extend","this","passwordPlaceholder","securityService","service","SecurityService","authenticationService","AuthenticationService","securityContextService","SecurityContextService","licenseService","LicenseService","applicationSettingsStorageService","ApplicationSettingsStorageService","navigationContextService","NavigationContextService","themeService","ThemeService","runtimeConfigurationContextService","RuntimeConfigurationContextService","waitBeforeRedirectBack","mode","showWorkbenchSettings","currentSystemTheme","getPreferredScheme","themeModeOptions","ThemeMode","system","labelKey","light","dark","workbenchSettings","getApplicationSettings","themeChanged","saveButtonText","instant","pageTitle","grantedAuthorities","READ_REPO","WRITE_REPO","GRAPHQL","loader","noPassword","showCookiePolicyLink","showCookieConsentModal","hasEditRestrictions","onThemeChange","themeMode","initialThemeMode","isUser","userType","UserType","USER","goBack","previousRoute","getPreviousRoute","navigate","updateCurrentUserData","getCurrentUser","then","authenticatedUser","updateAuthenticatedUser","redirectAdmin","currentUserData","redirectToLogin","submit","ADMIN","openSimpleModal","title","message","warning","result","updateUser","updateUserHttp","user","User","username","password","undefined","appSettings","success","name","setApplicationSettings","isSystemMode","applyColorScheme","setThemeMode","goBackToPreviousView","catch","data","msg","getError","error","finally","validateForm","validatePassword","onDialogClose","showCookiePolicy","$event","preventDefault","subscriptions","onSystemThemeChanged","theme","$on","cancel","forEach","unsubscribe","processUser","principal","getAuthenticatedUser","toUser","confirmpassword","external","getUserType","authorities","toUIModel","customRoles","getCustomRoles","getThemeModeOrSystem","updateLicenseStatus","isTrackingAllowed","module","controller","$inject","SYSTEM_REPO","READ_REPO_PREFIX","WRITE_REPO_PREFIX","GRAPHQL_PREFIX"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export const __webpack_esm_id__=60447;export const __webpack_esm_ids__=[60447];export const __webpack_esm_modules__={48099(e,t,r){r.d(t,{D:()=>o});class o{constructor(){this._dropdownTooltipTrigger="manual"}get name(){return this._name}setName(e){return this._name=e,this}get nameLabelKey(){return this._nameLabelKey}setNameLabelKey(e){return this._nameLabelKey=e,this}get tooltip(){return this._tooltip}setTooltip(e){return this._tooltip=e,this}get tooltipLabelKey(){return this._tooltipLabelKey}setTooltipLabelKey(e){return this._tooltipLabelKey=e,this}get iconClass(){return this._iconClass}setIconClass(e){return this._iconClass=e,this}get iconImage(){return this._iconImage}setIconImage(e){return this._iconImage=e,this}get value(){return this._value}setValue(e){return this._value=e,this}get dropdownTooltipTrigger(){return this._dropdownTooltipTrigger}setDropdownTooltipTrigger(e){return this._dropdownTooltipTrigger=e,this}get cssClass(){return this._cssClass}setCssClass(e){return this._cssClass=e,this}get guideSelector(){return this._guideSelector}setGuideSelector(e){return this._guideSelector=e,this}}},38696(e,t,r){var o;r.d(t,{D:()=>o}),function(e){e.RIGHT="right",e.LEFT="left"}(o||(o={}))},60447(e,t,r){r.r(t),r.d(t,{onto_graph_explore_split_button:()=>h});var o,a=r(18072),n=r(48099),s=r(38696),i=r(36015),l=r(51494),g=r(57154);!function(e){e.DEFAULT="default",e.SELECT="select",e.CREATE="create"}(o||(o={}));const p={[g.StartMode.NODE]:"assets/images/node-icon_32X21.png",[g.StartMode.QUERY]:"assets/images/query-icon_32x21.png",[g.StartMode.SEARCH]:"assets/images/search-icon_32x21.png"},h=class{constructor(e){(0,a.r)(this,e),this.graphExplore=(0,a.c)(this,"graphExplore"),this.logger=i.L.logger,this.items=[],this.isDropdownOpen=!1,this.handleDefaultClick=()=>{this.emitGraphExplore()},this.handleToggle=e=>{this.dropdownToggledHandler(e)},this.handleValueChanged=e=>{this.emitGraphExplore(o.SELECT,e.detail)},this.handleCreateClick=()=>{this.emitGraphExplore(o.CREATE)}}componentWillLoad(){this.loadGraphConfigItems()}dropdownToggledHandler(e){this.isDropdownOpen=e.detail,this.isDropdownOpen&&this.loadGraphConfigItems()}emitGraphExplore(e=o.DEFAULT,t){this.graphExplore.emit({action:e,graphConfig:t})}loadGraphConfigItems(){"function"==typeof this.fetchGraphConfigs&&this.fetchGraphConfigs().then(e=>{this.items=[...e].sort((e,t)=>e.name.localeCompare(t.name)).map(e=>(new n.D).setTooltip(e.name).setName(e.name).setIconImage(p[e.startMode]).setValue(e))}).catch(e=>{this.items=[],this.logger.error("Failed to load graph configurations ",e)})}render(){return(0,a.h)("div",{key:"5543384583a43321346bcd132d364a14f173954e",class:"explore-visual-graph-button-group"},(0,a.h)("button",{key:"5a53e979fed2808d9e0dd46d8c7b465d2ecae8c8",class:"explore-visual-graph-button icon-data",onClick:this.handleDefaultClick,"guide-selector":"explore-visual","tooltip-content":i.T.translate("graph_explore_split_button.buttons.explore_visual_graph.tooltip"),"tooltip-placement":l.O.TOP},this.label),(0,a.h)("div",{key:"15444dadd120d4a42d149f87c5377d3d084898ce",class:"dropdown-wrapper"},(0,a.h)("onto-dropdown",{key:"9d304a272d1e4aaf7c810b0f8dcf2eb8c8d73071",class:"explore-visual-graph-dropdown",autoClose:!0,items:this.items,onToggle:this.handleToggle,onValueChanged:this.handleValueChanged,dropdownAlignment:s.D.RIGHT,tooltipPlacement:l.O.TOP,dropdownButtonTooltip:i.T.translate("graph_explore_split_button.buttons.explore_visual_graph_dropdown.tooltip")}),this.isDropdownOpen&&0===this.items.length?(0,a.h)("div",{class:"no-configurations-message"},(0,a.h)("i",{class:"icon-info"}),(0,a.h)("div",{class:"message-text"},(0,a.h)("div",null,(0,a.h)("translate-label",{labelKey:"graph_explore_split_button.messages.missing_graph_configuration"})),(0,a.h)("div",null,(0,a.h)("translate-label",{labelKey:"graph_explore_split_button.messages.create_graph_configuration"})," ",(0,a.h)("button",{class:"btn btn-link graph-create-link",onClick:this.handleCreateClick},(0,a.h)("translate-label",{labelKey:"graph_explore_split_button.messages.create_graph_configuration_link"}))))):""))}};h.style=".explore-visual-graph-button-group{display:flex;gap:1px;height:100%}.explore-visual-graph-button-group .explore-visual-graph-button{display:flex;align-items:center;gap:5px;background-color:var(--gw-button-primary-background);color:var(--gw-button-primary-color);border:none;outline:none;padding-left:1em;padding-right:1em}.explore-visual-graph-button-group .explore-visual-graph-button:hover{background-color:var(--gw-button-primary-hover-background);color:var(--gw-button-primary-hover-color);cursor:pointer}.explore-visual-graph-button-group .dropdown-wrapper{position:relative}.explore-visual-graph-button-group .explore-visual-graph-dropdown .onto-dropdown,.explore-visual-graph-button-group .explore-visual-graph-dropdown .onto-dropdown-button{background-color:var(--gw-button-primary-background);color:var(--gw-button-primary-color);height:100%}.explore-visual-graph-button-group .explore-visual-graph-dropdown .onto-dropdown-button{background-color:var(--gw-button-primary-background);color:var(--gw-button-primary-color);gap:0;padding:0 0.3em}.explore-visual-graph-button-group .explore-visual-graph-dropdown .onto-dropdown-button:hover{background-color:var(--gw-button-primary-hover-background);color:var(--gw-button-primary-hover-color)}.explore-visual-graph-button-group .explore-visual-graph-dropdown .onto-dropdown-menu-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:22.5rem}.explore-visual-graph-button-group .no-configurations-message{background-color:var(--gw-message-info-background);border:1px solid var(--gw-message-info-border-color);box-shadow:0 3px 6px rgba(0, 0, 0, 0.1);color:var(--gw-message-info-color);display:flex;gap:8px;justify-content:center;margin-top:1px;padding:0.5em 0.8em;position:absolute;right:0;z-index:1001}.explore-visual-graph-button-group .no-configurations-message .graph-create-link{padding:0}"},51494(e,t,r){var o;r.d(t,{O:()=>o}),function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e.AUTO="auto"}(o||(o={}))},36015(e,t,r){r.d(t,{L:()=>a,T:()=>i,s:()=>n});var o=r(57154);class a{static get logger(){return o.Loggers.getLoggerInstance("SharedComponents")}}function n(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}class s{constructor(){this.languageContextService=o.ServiceProvider.get(o.LanguageContextService),this.translationChangedObservers={},this.logger=a.logger,this.defaultBundle=this.languageContextService.getDefaultBundle(),this.subscribeToBundleChange()}onTranslate(e,t=[],r=()=>{}){this.translationChangedObservers[e]=this.translationChangedObservers[e]||[];const o={parameters:t,callback:r};return this.translationChangedObservers[e].push(o),r(this.translate(e,t)),()=>{const t=this.translationChangedObservers[e].indexOf(o);-1!==t&&this.translationChangedObservers[e].splice(t,1)}}translate(e,t){return this.translateInLocale(e,t)}translateInLocale(e,t){let r=this.translateFromBundle(this.currentBundle,e);return r||(r=this.translateFromBundle(this.defaultBundle,e)),r?(r=this.applyParameters(r,t),n(r)):(this.logger.warn(`Missing translation for key: [${e}]`),e)}translateFromBundle(e,t){if(!e)return;let r=e[t];return"string"!=typeof r&&(r=this.translateAsJsonObject(e,t)),r}translateAsJsonObject(e,t){if(!t)return;let r=t.split(".");return this.getTranslation(e,r)}getTranslation(e,t){if(!t||!e)return;const r=e[t.splice(0,1)[0]];return 0===t.length?r:"string"!=typeof r?t.length>0?this.getTranslation(r,t):r:void 0}applyParameters(e,t){return t?t.reduce((e,t)=>s.replaceAll(e,t),e):e}static replaceAll(e,t){return t?e.split(`{{${t.key}}}`).join(t.value):e}notifyTranslationsChanged(){Object.keys(this.translationChangedObservers).forEach(e=>{(this.translationChangedObservers[e]||[]).forEach(t=>t.callback(this.translate(e,t.parameters)))})}subscribeToBundleChange(){this.languageChangeSubscription=this.languageContextService.onLanguageBundleChanged(e=>{e&&(this.currentBundle=e,this.notifyTranslationsChanged())})}destroy(){this.languageChangeSubscription&&this.languageChangeSubscription()}}const i=new s}};
|
|
2
|
+
//# sourceMappingURL=60447.4fd8b4ce9b95b98deade.bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"60447.4fd8b4ce9b95b98deade.bundle.js","mappings":"mJAGA,MAAMA,EACFC,WAAAA,GAIIC,KAAKC,wBAA0B,QACnC,CACA,QAAIC,GACA,OAAOF,KAAKG,KAChB,CACAC,OAAAA,CAAQC,GAEJ,OADAL,KAAKG,MAAQE,EACNL,IACX,CACA,gBAAIM,GACA,OAAON,KAAKO,aAChB,CACAC,eAAAA,CAAgBH,GAEZ,OADAL,KAAKO,cAAgBF,EACdL,IACX,CACA,WAAIS,GACA,OAAOT,KAAKU,QAChB,CACAC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AIsD,EAAOtD,EAAIuD,MAAM,KACrB,OAAOpI,KAAKqI,eAAeJ,EAAQE,EACvC,CASAE,cAAAA,CAAeC,EAAYH,GAEvB,IAAKA,IAASG,EACV,OAEJ,MAAMC,EAAoBD,EAAWH,EAAKT,OAAO,EAAG,GAAG,IACvD,OAAoB,IAAhBS,EAAKvC,OACE2C,EAEsB,iBAAtBA,EAEHJ,EAAKvC,OAAS,EACP5F,KAAKqI,eAAeE,EAAmBJ,GAE3CI,OALX,CAQJ,CACAR,eAAAA,CAAgBH,EAAaP,GACzB,OAAIA,EACOA,EAAWmB,OAElB,CAACZ,EAAaa,IAAclC,EAAkCmC,WAAWd,EAAaa,GAAYb,GAE/FA,CACX,CACA,iBAAOc,CAAWd,EAAaa,GAC3B,OAAOA,EAAYb,EAAYQ,MAAM,KAAKK,EAAU5D,SAAS8D,KAAKF,EAAUpI,OAASuH,CACzF,CACAgB,yBAAAA,GACIC,OAAOC,KAAK9I,KAAK4G,6BAA6BmC,QAASC,KACjChJ,KAAK4G,4BAA4BoC,IAAc,IACvDD,QAAS3B,GAAaA,EAASE,SAAStH,KAAKiF,UAAU+D,EAAW5B,EAASC,eAE7F,CACAN,uBAAAA,GACI/G,KAAKiJ,2BAA6BjJ,KAAKwG,uBAAuB0C,wBAAyBjB,IAC/EA,IACAjI,KAAK8H,cAAgBG,EACrBjI,KAAK4I,8BAGjB,CACAO,OAAAA,GACQnJ,KAAKiJ,4BACLjJ,KAAKiJ,4BAEb,EAEJ,MAAMjE,EAAqB,IAAIuB,C","sources":["webpack://root-config/./packages/shared-components/dist/esm/dropdown-item-WQYHXM0G.js","webpack://root-config/./packages/shared-components/dist/esm/dropdown-item-alignment-DghTf3pJ.js","webpack://root-config/./packages/shared-components/dist/esm/onto-graph-explore-split-button.entry.js","webpack://root-config/./packages/shared-components/dist/esm/onto-tooltip-placement-D_J2-9CG.js","webpack://root-config/./packages/shared-components/dist/esm/translation.service-FB05Sh97.js"],"sourcesContent":["/**\n * Model that holds a dropdown item configuration.\n */\nclass DropdownItem {\n constructor() {\n /**\n * Specifies the events that trigger the dropdown item tooltip to appear. Multiple event names should be separated by spaces.\n */\n this._dropdownTooltipTrigger = 'manual';\n }\n get name() {\n return this._name;\n }\n setName(value) {\n this._name = value;\n return this;\n }\n get nameLabelKey() {\n return this._nameLabelKey;\n }\n setNameLabelKey(value) {\n this._nameLabelKey = value;\n return this;\n }\n get tooltip() {\n return this._tooltip;\n }\n setTooltip(value) {\n this._tooltip = value;\n return this;\n }\n get tooltipLabelKey() {\n return this._tooltipLabelKey;\n }\n setTooltipLabelKey(value) {\n this._tooltipLabelKey = value;\n return this;\n }\n get iconClass() {\n return this._iconClass;\n }\n setIconClass(value) {\n this._iconClass = value;\n return this;\n }\n get iconImage() {\n return this._iconImage;\n }\n setIconImage(value) {\n this._iconImage = value;\n return this;\n }\n get value() {\n return this._value;\n }\n setValue(value) {\n this._value = value;\n return this;\n }\n get dropdownTooltipTrigger() {\n return this._dropdownTooltipTrigger;\n }\n setDropdownTooltipTrigger(value) {\n this._dropdownTooltipTrigger = value;\n return this;\n }\n get cssClass() {\n return this._cssClass;\n }\n setCssClass(value) {\n this._cssClass = value;\n return this;\n }\n get guideSelector() {\n return this._guideSelector;\n }\n setGuideSelector(value) {\n this._guideSelector = value;\n return this;\n }\n}\n\nexport { DropdownItem as D };\n","var DropdownItemAlignment;\n(function (DropdownItemAlignment) {\n DropdownItemAlignment[\"RIGHT\"] = \"right\";\n DropdownItemAlignment[\"LEFT\"] = \"left\";\n})(DropdownItemAlignment || (DropdownItemAlignment = {}));\n\nexport { DropdownItemAlignment as D };\n","import { r as registerInstance, c as createEvent, h } from './index-BntG-4Sv.js';\nimport { D as DropdownItem } from './dropdown-item-WQYHXM0G.js';\nimport { D as DropdownItemAlignment } from './dropdown-item-alignment-DghTf3pJ.js';\nimport { L as LoggerProvider, T as TranslationService } from './translation.service-FB05Sh97.js';\nimport { O as OntoTooltipPlacement } from './onto-tooltip-placement-D_J2-9CG.js';\nimport { StartMode } from '@ontotext/workbench-api';\n\n/**\n * Actions triggered from the Graph Explore split button UI.\n */\nvar GraphExploreAction;\n(function (GraphExploreAction) {\n GraphExploreAction[\"DEFAULT\"] = \"default\";\n GraphExploreAction[\"SELECT\"] = \"select\";\n GraphExploreAction[\"CREATE\"] = \"create\";\n})(GraphExploreAction || (GraphExploreAction = {}));\n\nconst ontoGraphExploreSplitButtonCss = \".explore-visual-graph-button-group{display:flex;gap:1px;height:100%}.explore-visual-graph-button-group .explore-visual-graph-button{display:flex;align-items:center;gap:5px;background-color:var(--gw-button-primary-background);color:var(--gw-button-primary-color);border:none;outline:none;padding-left:1em;padding-right:1em}.explore-visual-graph-button-group .explore-visual-graph-button:hover{background-color:var(--gw-button-primary-hover-background);color:var(--gw-button-primary-hover-color);cursor:pointer}.explore-visual-graph-button-group .dropdown-wrapper{position:relative}.explore-visual-graph-button-group .explore-visual-graph-dropdown .onto-dropdown,.explore-visual-graph-button-group .explore-visual-graph-dropdown .onto-dropdown-button{background-color:var(--gw-button-primary-background);color:var(--gw-button-primary-color);height:100%}.explore-visual-graph-button-group .explore-visual-graph-dropdown .onto-dropdown-button{background-color:var(--gw-button-primary-background);color:var(--gw-button-primary-color);gap:0;padding:0 0.3em}.explore-visual-graph-button-group .explore-visual-graph-dropdown .onto-dropdown-button:hover{background-color:var(--gw-button-primary-hover-background);color:var(--gw-button-primary-hover-color)}.explore-visual-graph-button-group .explore-visual-graph-dropdown .onto-dropdown-menu-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:22.5rem}.explore-visual-graph-button-group .no-configurations-message{background-color:var(--gw-message-info-background);border:1px solid var(--gw-message-info-border-color);box-shadow:0 3px 6px rgba(0, 0, 0, 0.1);color:var(--gw-message-info-color);display:flex;gap:8px;justify-content:center;margin-top:1px;padding:0.5em 0.8em;position:absolute;right:0;z-index:1001}.explore-visual-graph-button-group .no-configurations-message .graph-create-link{padding:0}\";\n\nconst START_MODE_IMAGE_MAP = {\n [StartMode.NODE]: 'assets/images/node-icon_32X21.png',\n [StartMode.QUERY]: 'assets/images/query-icon_32x21.png',\n [StartMode.SEARCH]: 'assets/images/search-icon_32x21.png',\n};\nconst OntoGraphExploreSplitButton = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.graphExplore = createEvent(this, \"graphExplore\");\n this.logger = LoggerProvider.logger;\n /**\n * Dropdown items representing available graph configurations.\n */\n this.items = [];\n /**\n * Flag indicating whether the dropdown is open.\n */\n this.isDropdownOpen = false;\n this.handleDefaultClick = () => {\n this.emitGraphExplore();\n };\n this.handleToggle = (event) => {\n this.dropdownToggledHandler(event);\n };\n this.handleValueChanged = (event) => {\n this.emitGraphExplore(GraphExploreAction.SELECT, event.detail);\n };\n this.handleCreateClick = () => {\n this.emitGraphExplore(GraphExploreAction.CREATE);\n };\n }\n componentWillLoad() {\n this.loadGraphConfigItems();\n }\n /**\n * Handles changes to the dropdown open/close state.\n *\n * @param event - Custom event containing the dropdown state (`isOpen` flag)\n */\n dropdownToggledHandler(event) {\n this.isDropdownOpen = event.detail;\n if (this.isDropdownOpen) {\n this.loadGraphConfigItems();\n }\n }\n /**\n * Emits a graph exploration event based on the user interaction source.\n *\n * @param action - The type of exploration action:\n * - `default`: triggered by primary button click\n * - `select`: triggered by selecting a dropdown menu item\n * - `create`: triggered when navigating to create a graph view\n *\n * @param graphConfig - Optional graph configuration associated with the selected item.\n */\n emitGraphExplore(action = GraphExploreAction.DEFAULT, graphConfig) {\n this.graphExplore.emit({ action, graphConfig });\n }\n /**\n * Fetches graph configurations and maps them to dropdown items. Populates `this.items` with the result\n * or a fallback list if no data is returned or the request fails.\n */\n loadGraphConfigItems() {\n if (typeof this.fetchGraphConfigs === 'function') {\n this.fetchGraphConfigs()\n .then((configs) => {\n this.items = [...configs]\n .sort((a, b) => a.name.localeCompare(b.name))\n .map(config => new DropdownItem()\n .setTooltip(config.name)\n .setName(config.name)\n .setIconImage(START_MODE_IMAGE_MAP[config.startMode])\n .setValue(config));\n })\n .catch((error) => {\n this.items = [];\n this.logger.error('Failed to load graph configurations ', error);\n });\n }\n }\n render() {\n return (h(\"div\", { key: '5543384583a43321346bcd132d364a14f173954e', class: 'explore-visual-graph-button-group' }, h(\"button\", { key: '5a53e979fed2808d9e0dd46d8c7b465d2ecae8c8', class: 'explore-visual-graph-button icon-data', onClick: this.handleDefaultClick, \"guide-selector\": 'explore-visual', \"tooltip-content\": TranslationService.translate('graph_explore_split_button.buttons.explore_visual_graph.tooltip'), \"tooltip-placement\": OntoTooltipPlacement.TOP }, this.label), h(\"div\", { key: '15444dadd120d4a42d149f87c5377d3d084898ce', class: 'dropdown-wrapper' }, h(\"onto-dropdown\", { key: '9d304a272d1e4aaf7c810b0f8dcf2eb8c8d73071', class: 'explore-visual-graph-dropdown', autoClose: true, items: this.items, onToggle: this.handleToggle, onValueChanged: this.handleValueChanged, dropdownAlignment: DropdownItemAlignment.RIGHT, tooltipPlacement: OntoTooltipPlacement.TOP, dropdownButtonTooltip: TranslationService.translate('graph_explore_split_button.buttons.explore_visual_graph_dropdown.tooltip') }), this.isDropdownOpen && this.items.length === 0 ? (h(\"div\", { class: \"no-configurations-message\" }, h(\"i\", { class: \"icon-info\" }), h(\"div\", { class: \"message-text\" }, h(\"div\", null, h(\"translate-label\", { labelKey: 'graph_explore_split_button.messages.missing_graph_configuration' })), h(\"div\", null, h(\"translate-label\", { labelKey: 'graph_explore_split_button.messages.create_graph_configuration' }), \"\\u00A0\", h(\"button\", { class: 'btn btn-link graph-create-link', onClick: this.handleCreateClick }, h(\"translate-label\", { labelKey: 'graph_explore_split_button.messages.create_graph_configuration_link' })))))) : '')));\n }\n};\nOntoGraphExploreSplitButton.style = ontoGraphExploreSplitButtonCss;\n\nexport { OntoGraphExploreSplitButton as onto_graph_explore_split_button };\n","var OntoTooltipPlacement;\n(function (OntoTooltipPlacement) {\n OntoTooltipPlacement[\"LEFT\"] = \"left\";\n OntoTooltipPlacement[\"RIGHT\"] = \"right\";\n OntoTooltipPlacement[\"TOP\"] = \"top\";\n OntoTooltipPlacement[\"BOTTOM\"] = \"bottom\";\n OntoTooltipPlacement[\"AUTO\"] = \"auto\";\n})(OntoTooltipPlacement || (OntoTooltipPlacement = {}));\n\nexport { OntoTooltipPlacement as O };\n","import { Loggers, ServiceProvider, LanguageContextService } from '@ontotext/workbench-api';\n\nconst MODULE_NAME = 'SharedComponents';\n/**\n * Logger for the Shared Components module.\n */\nclass LoggerProvider {\n /**\n * Gets the logger instance for the Shared Components module.\n *\n * @returns LoggerService instance for the Shared Components module\n */\n static get logger() {\n return Loggers.getLoggerInstance(MODULE_NAME);\n }\n}\n\nfunction sanitizeHTML(html) {\n const element = document.createElement('textarea');\n element.innerHTML = html;\n return element.value;\n}\n\n/**\n * Service responsible for translation operations in the component.\n */\nclass TranslationServiceClassDefinition {\n constructor() {\n this.languageContextService = ServiceProvider.get(LanguageContextService);\n this.translationChangedObservers = {};\n this.logger = LoggerProvider.logger;\n // log with background color\n this.defaultBundle = this.languageContextService.getDefaultBundle();\n this.subscribeToBundleChange();\n }\n /**\n * Translates the <code>messageLabelKey</code> with <code>translationParameter</code> and call <code>translationCallback</code> with translation of current language.\n * The <code>translationCallback</code> is called upon subscription and whenever the selected language is changed.\n *\n * @param messageLabelKey - The label key for the translation.\n * @param translationParameter - Parameters, if needed, for translation.\n * @param translationCallback - A function to be called when translating the `messageLabelKey`.\n * @returns A function that, when called, unsubscribes the provided callback from further translation updates.\n */\n onTranslate(messageLabelKey, translationParameter = [], translationCallback = () => { }) {\n this.translationChangedObservers[messageLabelKey] = this.translationChangedObservers[messageLabelKey] || [];\n const observer = { parameters: translationParameter, callback: translationCallback };\n this.translationChangedObservers[messageLabelKey].push(observer);\n translationCallback(this.translate(messageLabelKey, translationParameter));\n return () => {\n const index = this.translationChangedObservers[messageLabelKey].indexOf(observer);\n if (index !== -1) {\n this.translationChangedObservers[messageLabelKey].splice(index, 1);\n }\n };\n }\n /**\n * Translates the provided key using the currently selected language by applying the parameters if\n * provided.\n * @param key The key for the label which needs to be translated.\n * @param parameters Optional parameters which to be applied during the translation.\n */\n translate(key, parameters) {\n return this.translateInLocale(key, parameters);\n }\n /**\n * Translates a given key into the specified locale. If parameters are provided,\n * they will be applied to the translation.\n *\n * @param key - The translation key, which can be dot-separated for nested translations.\n * @param parameters - Optional parameters to be substituted into the translation string.\n * @returns The translated string with parameters applied if available, or the key itself if not found.\n */\n translateInLocale(key, parameters) {\n // Attempt to retrieve the translation from the specified locale's bundle.\n let translation = this.translateFromBundle(this.currentBundle, key);\n // If not found, fall back to the default language bundle.\n if (!translation) {\n translation = this.translateFromBundle(this.defaultBundle, key);\n }\n // If translation was found, apply any parameters provided and return the result.\n if (translation) {\n translation = this.applyParameters(translation, parameters);\n return sanitizeHTML(translation);\n }\n this.logger.warn(`Missing translation for key: [${key}]`);\n return key;\n }\n /**\n * Retrieves a translation from a specified translation bundle using the given key.\n * If the key represents a nested JSON path, it attempts to resolve the key as such.\n *\n * @param bundle - The translation bundle for the specified locale.\n * @param key - The key to translate, which may be a simple key or dot-separated for nested keys.\n * @returns The translation string if found, or `undefined` if not available.\n */\n translateFromBundle(bundle, key) {\n if (!bundle) {\n return undefined;\n }\n // Try to retrieve the translation directly if it is defined as a whole string,\n // for instance as \"some_function.btn.label\".\n let translation = bundle[key];\n // If not found, attempt to retrieve the translation if it is defined as a JSON object.\n if (typeof translation !== 'string') {\n translation = this.translateAsJsonObject(bundle, key);\n }\n return translation;\n }\n /**\n * Resolves a nested translation key by treating it as a path in a JSON object.\n * For example, if the key is \"some.key.path\", this method will navigate through\n * the JSON object structure to retrieve the value at that path.\n *\n * @param bundle - The translation bundle containing nested keys.\n * @param key - The dot-separated key representing the path to the translation.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n translateAsJsonObject(bundle, key) {\n if (!key) {\n return;\n }\n let path = key.split('.');\n return this.getTranslation(bundle, path);\n }\n /**\n * Recursively navigates through a JSON object based on a path array to retrieve\n * a translation string. Each element in the path array represents a nested key.\n *\n * @param jsonObject - The current JSON object or nested object being searched.\n * @param path - An array representing the path to the translation, where each element is a key.\n * @returns The translation string if found, or `undefined` if the path does not exist.\n */\n getTranslation(jsonObject, path) {\n // Stop the recursion if path or reach the inner element\n if (!path || !jsonObject) {\n return undefined;\n }\n const jsonOrTranslation = jsonObject[path.splice(0, 1)[0]];\n if (path.length === 0) {\n return jsonOrTranslation;\n }\n if (typeof jsonOrTranslation !== 'string') {\n // continue if the inner element is not reached.\n if (path.length > 0) {\n return this.getTranslation(jsonOrTranslation, path);\n }\n return jsonOrTranslation;\n }\n return undefined;\n }\n applyParameters(translation, parameters) {\n if (parameters) {\n return parameters.reduce(\n // replace all occurrence of parameter key with parameter value.\n (translation, parameter) => TranslationServiceClassDefinition.replaceAll(translation, parameter), translation);\n }\n return translation;\n }\n static replaceAll(translation, parameter) {\n return parameter ? translation.split(`{{${parameter.key}}}`).join(parameter.value) : translation;\n }\n notifyTranslationsChanged() {\n Object.keys(this.translationChangedObservers).forEach((eventName) => {\n const observers = this.translationChangedObservers[eventName] || [];\n observers.forEach((observer) => observer.callback(this.translate(eventName, observer.parameters)));\n });\n }\n subscribeToBundleChange() {\n this.languageChangeSubscription = this.languageContextService.onLanguageBundleChanged((bundle) => {\n if (bundle) {\n this.currentBundle = bundle;\n this.notifyTranslationsChanged();\n }\n });\n }\n destroy() {\n if (this.languageChangeSubscription) {\n this.languageChangeSubscription();\n }\n }\n}\nconst TranslationService = new TranslationServiceClassDefinition();\n\nexport { LoggerProvider as L, TranslationService as T, sanitizeHTML as s };\n"],"names":["DropdownItem","constructor","this","_dropdownTooltipTrigger","name","_name","setName","value","nameLabelKey","_nameLabelKey","setNameLabelKey","tooltip","_tooltip","setTooltip","tooltipLabelKey","_tooltipLabelKey","setTooltipLabelKey","iconClass","_iconClass","setIconClass","iconImage","_iconImage","setIconImage","_value","setValue","dropdownTooltipTrigger","setDropdownTooltipTrigger","cssClass","_cssClass","setCssClass","guideSelector","_guideSelector","setGuideSelector","DropdownItemAlignment","GraphExploreAction","START_MODE_IMAGE_MAP","StartMode","NODE","QUERY","SEARCH","OntoGraphExploreSplitButton","hostRef","registerInstance","graphExplore","createEvent","logger","LoggerProvider","items","isDropdownOpen","handleDefaultClick","emitGraphExplore","handleToggle","event","dropdownToggledHandler","handleValueChanged","SELECT","detail","handleCreateClick","CREATE","componentWillLoad","loadGraphConfigItems","action","DEFAULT","graphConfig","emit","fetchGraphConfigs","then","configs","sort","a","b","localeCompare","map","config","startMode","catch","error","render","h","key","class","onClick","TranslationService","translate","OntoTooltipPlacement","TOP","label","autoClose","onToggle","onValueChanged","dropdownAlignment","RIGHT","tooltipPlacement","dropdownButtonTooltip","length","labelKey","style","Loggers","getLoggerInstance","sanitizeHTML","html","element","document","createElement","innerHTML","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","reduce","parameter","replaceAll","join","notifyTranslationsChanged","Object","keys","forEach","eventName","languageChangeSubscription","onLanguageBundleChanged","destroy"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export const __webpack_esm_id__=63842;export const __webpack_esm_ids__=[63842];export const __webpack_esm_modules__={63842(e,t,s){var r=s(22835),n=s(57154);const o={select:s(44482).select},a="WAIT",i="NO_REPO",l="READY",c="IN_PROGRESS",u="ERROR",d={contextID:{type:"all",value:"all.graphs.label",uri:""}};function p(e){if(e<1e3)return e;const t=Math.floor(Math.log(e)/Math.log(1e3));let s=e/Math.pow(1e3,t);return s=s%1>1/Math.pow(1e3,t-1)?s.toFixed(2):s.toFixed(0),s+["K","M","G","T","P","H"][t-1]}function g(e,t,s,p,g,h,f,m,C,y,R,S){const x=(0,n.service)(n.RepositoryContextService);let v=null;e.hasMoreGraphs=!1,e.status=x.getSelectedRepository()?.id?a:i,e.graphsDropdownToggled=t=>{e.hasMoreGraphs&&t&&p.warning(S.instant("dependencies.graphs.too.many.warning",{graphsLimit:r.Z.formatNumberToLocaleString(1e3,S.use())}))};let w=d;const D=function(){R.resolveGraphs(x.getSelectedRepository()?.id,1001).success(function(t){e.graphsInRepo=t.results.bindings,e.hasMoreGraphs=e.graphsInRepo.length>1002,$(),e.isSystemRepository()?"READY"!==e.status&&E():(e.status="WAIT",E(!0))}).error(function(t){e.repositoryError=getError(t),p.error(getError(t),S.instant("graphexplore.error.getting.graph"))})},$=function(){const t=y.get(`dependencies-selectedGraph-${x.getSelectedRepository()?.id}`);null!==t&&e.graphsInRepo.some(e=>e.contextID.uri===t.contextID.uri)?w=t:y.set(`dependencies-selectedGraph-${x.getSelectedRepository()?.id}`,w)},b=function(t){o.select("#dependencies-chord").html(""),e.status=a,f.getRelationshipsData(t,e.direction,w.contextID.uri).success(function(t){e.dependenciesData={matrix:t.right,nodes:t.left,hasLinks:_.sum(_.map(t.right,function(e){return _.sum(e)}))>0,direction:e.direction},e.status=l}).error(function(t){e.status=l,p.error(getError(t),S.instant("graphexplore.error.dependencies.count"))})},E=function(t){(e.status!==l||t)&&(e.status=a,f.getRelationshipsStatus(w.contextID.uri).success(function(t){if(e.status=t,e.status===c){if(null!==v)return;v=h(()=>E(),2e3)}e.status===l&&(null!==v&&(h.cancel(v),v=null),f.getRelationshipsClasses(e.direction,w.contextID.uri).success(function(t,s){e.allClasses.items=_.filter(t,k),e.allNotFilteredClasses=t,e.selectedClasses=void 0,angular.isUndefined(e.selectedClasses)&&(e.selectedClasses=t.slice(0,10)),b(e.selectedClasses),207===s&&p.warning(S.instant("graphexplore.update.diagram"),S.instant("graphexplore.repository.data.changed"))})),0===e.status.indexOf("ERROR;")&&(e.status=u,null!==v&&(h.cancel(v),v=null),p.error(S.instant("graphexplore.error.dependencies.calc",{error:e.status.substring(6)})))}).error(function(t){e.status=u,p.error(getError(t),S.instant("graphexplore.error.dependencies.count.status"))}))};e.allClasses={},e.allClasses.items=[],e.allNotFilteredClasses=[],e.direction="all";const G={};let I=0,M=0;function k(t){return-1!==t.name.toLowerCase().indexOf(e.classQuery.query.toLowerCase())}t.key="",G.get=function(t,s,r){m.initLazyList(t,s,r,I,e.allClasses.items)},t.$watch(function(){return t.key},function(){I=0,_.each(e.allClasses.items,function(e){t.key>e&&I++}),M++}),G.revision=function(){return M},e.datasource=G,e.adapterContainer={adapter:{remain:!0}},e.classQuery={},e.classQuery.query="",e.classFilterFunc=k,e.$watch("allClasses.items",function(){e.allClasses.items.length>0&&g(function(){e.adapterContainer.adapter.reload()},30)}),e.$watch("direction",function(){const t=x.getSelectedRepository();!t||e.isSystemRepository()||t.isFedx()||D()}),e.$on("$destroy",function(){h.cancel(v),O()}),e.isLoading=function(){return e.status===c||e.status===a},e.confirmCalculateDependencies=function(){C.openSimpleModal({title:S.instant("confirm.operation"),message:S.instant("graphexplore.calculating.relationships"),warning:!0}).result.then(function(){e.calculateDependencies()})},e.calculateDependencies=function(){e.status=a,e.selectedClasses=void 0,f.calculateRelationships(w.contextID.uri).success(function(t){0===t.indexOf("ERROR;")?p.error(S.instant("graphexplore.error.dependencies.calc",{error:e.status.substring(6)})):E()}).error(function(e){p.error(S.instant("graphexplore.error.could.not.force.count",{error:getError(e)}))})},e.addClass=function(t){e.selectedClasses.push(t),b(e.selectedClasses)},e.removeClass=function(t){_.remove(e.selectedClasses,function(e){return e.name===t.name}),b(e.selectedClasses)},e.showClass=function(t){e.classToShow=t},e.isClassByNameShown=function(t){return void 0!==_.find(e.selectedClasses,{name:t})},e.addClassByName=function(t){e.selectedClasses.push(_.find(e.allClasses.items,{name:t})),b(e.selectedClasses)},e.removeClassByName=function(t){_.remove(e.selectedClasses,function(e){return e.name===t}),b(e.selectedClasses)},e.removeAllClasses=function(){e.selectedClasses=[],b(e.selectedClasses)},e.isSystemRepository=function(){return"SYSTEM"===x.getSelectedRepository()?.id};const O=x.onSelectedRepositoryChanged(()=>function(){e.classQuery={},e.classQuery.query="",e.repositoryError=null,w=d;const t=x.getSelectedRepository();t&&!t.isFedx()?D():e.status=i}());e.selectGraph=function(e){w=e,E(!0),y.set(`dependencies-selectedGraph-${x.getSelectedRepository()?.id}`,w)},e.getSelectedGraphValue=function(){return w.contextID.value},e.isAllGraphsSelected=function(){return"all.graphs.label"===e.getSelectedGraphValue()}}Object.defineProperty(s.g,"allGraphs",{get:()=>d}),angular.module("graphdb.framework.graphexplore.controllers.dependencies",["ui.scroll.jqlite","ui.scroll","toastr","ui.bootstrap","graphdb.framework.core.services.repositories","graphdb.framework.utils.localstorageadapter"]).controller("DependenciesChordCtrl",g).config(["$uibTooltipProvider",function(e){e.options({appendToBody:!0})}]).filter("humanize",function(){return p}),g.$inject=["$scope","$rootScope","$repositories","toastr","$timeout","$interval","GraphDataRestService","UiScrollService","ModalService","LocalStorageAdapter","RDF4JRepositoriesRestService","$translate"]}};
|
|
2
|
+
//# sourceMappingURL=63842.68a1c5451a236b8ede97.bundle.js.map
|